This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/es5/components/VCombobox/VCombobox.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
11 KiB
Text

{"version":3,"sources":["../../../src/components/VCombobox/VCombobox.ts"],"names":[],"mappings":";;;;;;;AACA;;AAGA;;AACA;;AAGA;;;;;;;;;;AAKA;gBACe,wBAAc,MAAd,CAAqB;AAClC,EAAA,IAAI,EAAE,YAD4B;AAGlC,EAAA,KAAK,EAAE;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,OAAO,EAAE;AAAA,eAAO,EAAP;AAAA;AAFC,KADP;AAKL,IAAA,YAAY,EAAE;AACZ,MAAA,IAAI,EAAE,OADM;AAEZ,MAAA,OAAO,EAAE;AAFG;AALT,GAH2B;AAclC,EAAA,IAAI,EAAE;AAAA,WAAO;AACX,MAAA,YAAY,EAAE,CAAC;AADJ,KAAP;AAAA,GAd4B;AAkBlC,EAAA,QAAQ,EAAE;AACR,IAAA,YADQ,0BACI;AACV,aAAO,KAAK,QAAL,GACH,KAAK,aAAL,CAAmB,MADhB,GAEH,CAAC,KAAK,cAAL,IAAuB,EAAxB,EAA4B,QAA5B,GAAuC,MAF3C;AAGD,KALO;AAMR,IAAA,OANQ,qBAMD;AACL,aAAO,iBAAQ,OAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,IAAjC,CAAsC,IAAtC,KAA+C,KAAK,QAA3D;AACD,KARO;AASR,IAAA,iBATQ,+BASS;AACf,aAAO,IAAP;AACD,KAXO;AAYR,IAAA,WAZQ,yBAYG;AACT,UAAI,CAAC,KAAK,SAAV,EAAqB,OAAO,KAAP;AAErB,aAAO,KAAK,iBAAL,IACJ,CAAC,CAAC,KAAK,MAAL,CAAY,SAAZ,CAAF,IAA4B,CAAC,KAAK,UADrC;AAED;AAjBO,GAlBwB;AAsClC,EAAA,OAAO,EAAE;AACP,IAAA,u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QAAL,GATlD,CAWZ;AACA;;AACA,UAAI,WAAJ,EAAiB,KAAK,cAAL,GAAsB,SAAtB;AAClB,KAtIM;AAuIP,IAAA,UAvIO,wBAuIG;AACR,WAAK,QAAL,GAAgB,KAAK,UAAL,EAAhB,GAAoC,KAAK,cAAL,EAApC;AACD,KAzIM;AA0IP,IAAA,UA1IO,wBA0IG;AACR,UAAM,SAAS,GAAG,KAAK,YAAL,EAAlB,CADQ,CAGR;AACA;AACA;;AACA,UAAI,SAAS,GAAG,CAAZ,IACF,CAAC,KAAK,aADR,EAEE;;AAEF,UAAI,KAAK,YAAL,GAAoB,CAAC,CAAzB,EAA4B;AAC1B,eAAO,KAAK,aAAL,EAAP;AACD;;AAED,UAAM,KAAK,GAAG,KAAK,aAAL,CAAmB,OAAnB,CAA2B,KAAK,cAAhC,CAAd,CAdQ,CAeR;AACA;AACA;;AACA,UAAI,KAAK,GAAG,CAAC,CAAb,EAAgB;AACd,YAAM,aAAa,GAAG,KAAK,aAAL,CAAmB,KAAnB,EAAtB;AACA,QAAA,aAAa,CAAC,MAAd,CAAqB,KAArB,EAA4B,CAA5B;AAEA,aAAK,QAAL,CAAc,aAAd;AACD,OAvBO,CAyBR;AACA;AACA;;;AACA,UAAI,SAAS,GAAG,CAAC,CAAjB,EAAoB,OAAQ,KAAK,cAAL,GAAsB,IAA9B;AAEpB,WAAK,UAAL,CAAgB,KAAK,cAArB;AACA,WAAK,cAAL,GAAsB,IAAtB;AACD;AA1KM;AAtCyB,CAArB,C","sourcesContent":["// Styles\nimport '../VAutocomplete/VAutocomplete.sass'\n\n// Extensions\nimport VSelect from '../VSelect/VSelect'\nimport VAutocomplete from '../VAutocomplete/VAutocomplete'\n\n// Utils\nimport { keyCodes } from '../../util/helpers'\n\n// Types\nimport { PropValidator } from 'vue/types/options'\n\n/* @vue/component */\nexport default VAutocomplete.extend({\n name: 'v-combobox',\n\n props: {\n delimiters: {\n type: Array,\n default: () => ([]),\n } as PropValidator<any[]>,\n returnObject: {\n type: Boolean,\n default: true,\n },\n },\n\n data: () => ({\n editingIndex: -1,\n }),\n\n computed: {\n counterValue (): number {\n return this.multiple\n ? this.selectedItems.length\n : (this.internalSearch || '').toString().length\n },\n hasSlot (): boolean {\n return VSelect.options.computed.hasSlot.call(this) || this.multiple\n },\n isAnyValueAllowed (): boolean {\n return true\n },\n menuCanShow (): boolean {\n if (!this.isFocused) return false\n\n return this.hasDisplayedItems ||\n (!!this.$slots['no-data'] && !this.hideNoData)\n },\n },\n\n methods: {\n onInternalSearchChanged (val: any) {\n if (\n val &&\n this.multiple &&\n this.delimiters.length\n ) {\n const delimiter = this.delimiters.find(d => val.endsWith(d))\n if (delimiter != null) {\n this.internalSearch = val.slice(0, val.length - delimiter.length)\n this.updateTags()\n }\n }\n\n this.updateMenuDimensions()\n },\n genChipSelection (item: object, index: number) {\n const chip = VSelect.options.methods.genChipSelection.call(this, item, index)\n\n // Allow user to update an existing value\n if (this.multiple) {\n chip.componentOptions!.listeners! = {\n ...chip.componentOptions!.listeners!,\n dblclick: () => {\n this.editingIndex = index\n this.internalSearch = this.getText(item)\n this.selectedIndex = -1\n },\n }\n }\n\n return chip\n },\n onChipInput (item: object) {\n VSelect.options.methods.onChipInput.call(this, item)\n\n this.editingIndex = -1\n },\n // Requires a manual definition\n // to overwrite removal in v-autocomplete\n onEnterDown (e: Event) {\n e.preventDefault()\n\n this.$nextTick(() => {\n // If has menu index, let v-select-list handle\n if (this.getMenuIndex() > -1) return\n this.updateSelf()\n })\n },\n onFilteredItemsChanged (val: never[], oldVal: never[]) {\n if (!this.autoSelectFirst) return\n\n VAutocomplete.options.methods.onFilteredItemsChanged.call(this, val, oldVal)\n },\n onKeyDown (e: KeyboardEvent) {\n const keyCode = e.keyCode\n\n VSelect.options.methods.onKeyDown.call(this, e)\n\n // If user is at selection index of 0\n // create a new tag\n if (this.multiple &&\n keyCode === keyCodes.left &&\n this.$refs.input.selectionStart === 0\n ) {\n this.updateSelf()\n } else if (keyCode === keyCodes.enter) {\n this.onEnterDown(e)\n }\n\n // The ordering is important here\n // allows new value to be updated\n // and then moves the index to the\n // proper location\n this.changeSelectedIndex(keyCode)\n },\n onTabDown (e: KeyboardEvent) {\n // When adding tags, if searching and\n // there is not a filtered options,\n // add the value to the tags list\n if (this.multiple &&\n this.internalSearch &&\n this.getMenuIndex() === -1\n ) {\n e.preventDefault()\n e.stopPropagation()\n\n return this.updateTags()\n }\n\n VAutocomplete.options.methods.onTabDown.call(this, e)\n },\n selectItem (item: object) {\n // Currently only supports items:<string[]>\n if (this.editingIndex > -1) {\n this.updateEditing()\n } else {\n VSelect.options.methods.selectItem.call(this, item)\n }\n },\n setSelectedItems () {\n if (this.internalValue == null ||\n this.internalValue === ''\n ) {\n this.selectedItems = []\n } else {\n this.selectedItems = this.multiple ? this.internalValue : [this.internalValue]\n }\n },\n setValue (value?: any) {\n VSelect.options.methods.setValue.call(this, value || this.internalSearch)\n },\n updateEditing () {\n const value = this.internalValue.slice()\n value[this.editingIndex] = this.internalSearch\n\n this.setValue(value)\n\n this.editingIndex = -1\n },\n updateCombobox () {\n const isUsingSlot = Boolean(this.$scopedSlots.selection) || this.hasChips\n\n // If search is not dirty and is\n // using slot, do nothing\n if (isUsingSlot && !this.searchIsDirty) return\n\n // The internal search is not matching\n // the internal value, update the input\n if (this.internalSearch !== this.getText(this.internalValue)) this.setValue()\n\n // Reset search if using slot\n // to avoid a double input\n if (isUsingSlot) this.internalSearch = undefined\n },\n updateSelf () {\n this.multiple ? this.updateTags() : this.updateCombobox()\n },\n updateTags () {\n const menuIndex = this.getMenuIndex()\n\n // If the user is not searching\n // and no menu item is selected\n // do nothing\n if (menuIndex < 0 &&\n !this.searchIsDirty\n ) return\n\n if (this.editingIndex > -1) {\n return this.updateEditing()\n }\n\n const index = this.selectedItems.indexOf(this.internalSearch)\n // If it already exists, do nothing\n // this might need to change to bring\n // the duplicated item to the last entered\n if (index > -1) {\n const internalValue = this.internalValue.slice()\n internalValue.splice(index, 1)\n\n this.setValue(internalValue)\n }\n\n // If menu index is greater than 1\n // the selection is handled elsewhere\n // TODO: find out where\n if (menuIndex > -1) return (this.internalSearch = null)\n\n this.selectItem(this.internalSearch)\n this.internalSearch = null\n },\n },\n})\n"],"sourceRoot":"","file":"VCombobox.js"}