claude-web/node_modules/primevue/inputmask/index.mjs.map

1 line
60 KiB
Plaintext
Raw Permalink Normal View History

2026-02-23 02:23:38 +00:00
{"version":3,"file":"index.mjs","sources":["../../src/inputmask/BaseInputMask.vue","../../src/inputmask/InputMask.vue","../../src/inputmask/InputMask.vue?vue&type=template&id=33e57309&lang.js"],"sourcesContent":["<script>\nimport BaseInput from '@primevue/core/baseinput';\nimport InputMaskStyle from 'primevue/inputmask/style';\n\nexport default {\n name: 'BaseInputMask',\n extends: BaseInput,\n props: {\n slotChar: {\n type: String,\n default: '_'\n },\n id: {\n type: String,\n default: null\n },\n class: {\n type: [String, Object],\n default: null\n },\n mask: {\n type: String,\n default: null\n },\n placeholder: {\n type: String,\n default: null\n },\n autoClear: {\n type: Boolean,\n default: true\n },\n unmask: {\n type: Boolean,\n default: false\n },\n readonly: {\n type: Boolean,\n default: false\n }\n },\n style: InputMaskStyle,\n provide() {\n return {\n $pcInputMask: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <InputText\n :id=\"id\"\n :value=\"currentVal\"\n :class=\"inputClass\"\n :readonly=\"readonly\"\n :disabled=\"disabled\"\n :invalid=\"invalid\"\n :size=\"size\"\n :name=\"name\"\n :variant=\"variant\"\n :placeholder=\"placeholder\"\n :fluid=\"$fluid\"\n :unstyled=\"unstyled\"\n @input=\"onInput\"\n @compositionend=\"onInput\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"onKeyDown\"\n @keypress=\"onKeyPress\"\n @paste=\"onPaste\"\n :pt=\"rootPTOptions\"\n />\n</template>\n\n<script>\nimport { getUserAgent } from '@primeuix/utils/dom';\nimport InputText from 'primevue/inputtext';\nimport { mergeProps } from 'vue';\nimport BaseInputMask from './BaseInputMask.vue';\n\nexport default {\n name: 'InputMask',\n extends: BaseInputMask,\n inheritAttrs: false,\n emits: ['focus', 'blur', 'keydown', 'complete', 'keypress', 'paste'],\n inject: {\n $pcFluid: { default: null }\n },\n data() {\n return {\n currentVal: ''\n };\n },\n watch: {\n mask(newMask, oldMask) {\n if (oldMask !== newMask) {\n this.initMask();\n }\n },\n disabled(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.updateValue();\n }\n }\n },\n mounted() {\n this.initMask();\n },\n updated() {\n if (this.isValueUpdated()) {\n this.updateValue();\n }\n },\n methods: {\n onInput(event) {\n // Check if the event is part of a text composition process (e.g., for Asian languages).\n // If event.isComposing is true, it means the user is still composing text and the input is not finalized.\n if (!event.isComposing) {\n if (this.androidChrome) this.handleAndroidInput(event);\n else this.handleInputChange(event);\n\n this.updateModelValue(event.target.value);\n }\n },\n onFocus(event) {\n if (this.readonly) {\n return;\n }\n\n this.focus = true;\n this.focusText = this.$el.value;\n\n if (!this.$el.value || this.$el.value === this.defaultBuffer) {\n requestAnimationFrame(() => {\n if (this.$el === document.activeElement) {\n this.caret(0, 0);\n }\n });\n } else {\n let pos = this.checkVal();\n\n this.caretTimeoutId = setTimeout(() => {\n if (this.$el !== document.activeElement) {\n re