@milaboratories/uikit 2.2.94 → 2.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +30 -25
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.d.ts +77 -0
- package/dist/components/PlDropdown/OptionList.vue.d.ts.map +1 -0
- package/dist/components/PlDropdown/OptionList.vue.js +88 -0
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -0
- package/dist/components/PlDropdown/OptionList.vue2.js +5 -0
- package/dist/components/PlDropdown/OptionList.vue2.js.map +1 -0
- package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +110 -122
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdown/types.d.ts +7 -0
- package/dist/components/PlDropdown/types.d.ts.map +1 -0
- package/dist/components/PlDropdown/useGroupBy.d.ts +7 -0
- package/dist/components/PlDropdown/useGroupBy.d.ts.map +1 -0
- package/dist/components/PlDropdown/useGroupBy.js +36 -0
- package/dist/components/PlDropdown/useGroupBy.js.map +1 -0
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -10
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue.d.ts +19 -19
- package/dist/components/PlElementList/PlElementList.vue.d.ts.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue2.js +145 -133
- package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue3.js +33 -33
- package/dist/components/PlSlideModal/PlSlideModal.vue.js +1 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +2 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/sdk/model/dist/index.js +1 -1
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/TextLabel.vue.d.ts +18 -0
- package/dist/utils/TextLabel.vue.d.ts.map +1 -0
- package/dist/utils/TextLabel.vue.js +26 -0
- package/dist/utils/TextLabel.vue.js.map +1 -0
- package/dist/utils/TextLabel.vue2.js +13 -0
- package/dist/utils/TextLabel.vue2.js.map +1 -0
- package/package.json +4 -4
- package/src/components/PlAccordion/PlAccordionSection.vue +3 -3
- package/src/components/PlAutocomplete/PlAutocomplete.vue +1 -1
- package/src/components/PlDropdown/OptionList.vue +71 -0
- package/src/components/PlDropdown/PlDropdown.vue +29 -25
- package/src/components/PlDropdown/pl-dropdown.scss +4 -0
- package/src/components/PlDropdown/types.ts +3 -0
- package/src/components/PlDropdown/useGroupBy.ts +63 -0
- package/src/components/PlDropdownRef/PlDropdownRef.vue +1 -0
- package/src/components/PlElementList/PlElementList.vue +81 -70
- package/src/components/PlElementList/PlElementListItem.vue +2 -2
- package/src/helpers/utils.ts +1 -0
- package/src/types.ts +5 -15
- package/src/utils/TextLabel.vue +43 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlDropdown.vue.js","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport './pl-dropdown.scss';\nimport { computed, reactive, ref, unref, useSlots, useTemplateRef, watch, watchPostEffect } from 'vue';\nimport { tap } from '../../helpers/functions';\nimport { PlTooltip } from '../PlTooltip';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport type { ListOption, ListOptionNormalized } from '../../types';\nimport { deepEqual } from '../../helpers/objects';\nimport DropdownListItem from '../DropdownListItem.vue';\nimport LongText from '../LongText.vue';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { DropdownOverlay } from '../../utils/DropdownOverlay';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: string;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: string;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst slots = defineSlots<{\n [key: string]: unknown;\n}>();\n\nconst rootRef = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst overlayRef = useTemplateRef('overlay');\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n optionsHeight: 0,\n});\n\nconst findActiveIndex = () =>\n tap(\n filteredRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n rootRef?.value?.focus();\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => {\n data.open = !data.open;\n if (!data.open) {\n data.search = '';\n }\n};\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!rootRef.value?.contains(relatedTarget) && !overlayRef.value?.listRef?.contains(relatedTarget)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n rootRef.value?.focus();\n }\n\n const filtered = unref(filteredRef);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = filteredRef.value[newIndex].index ?? -1;\n};\n\nuseLabelNotch(rootRef);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n overlayRef.value?.scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"pl-dropdown__envelope\" @click=\"setFocusOnInput\">\n <div\n ref=\"rootRef\"\n :tabindex=\"tabindex\"\n class=\"pl-dropdown\"\n :class=\"{ open: data.open, error, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"pl-dropdown__container\">\n <div class=\"pl-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" class=\"input-value\">\n <LongText> {{ textValue }} </LongText>\n </div>\n\n <div class=\"pl-dropdown__controls\">\n <PlMaskIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div class=\"pl-dropdown__arrow-wrapper\" @click.stop=\"toggleOpen\">\n <div v-if=\"arrowIconLarge\" class=\"arrow-icon\" :class=\"[`icon-24 ${arrowIconLarge}`]\" />\n <div v-else-if=\"arrowIcon\" class=\"arrow-icon\" :class=\"[`icon-16 ${arrowIcon}`]\" />\n <div v-else class=\"arrow-icon arrow-icon-default\" />\n </div>\n </div>\n </div>\n <label v-if=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <DropdownOverlay v-if=\"data.open\" ref=\"overlay\" :root=\"rootRef\" class=\"pl-dropdown__options\" tabindex=\"-1\" :gap=\"3\">\n <DropdownListItem\n v-for=\"(item, index) in filteredRef\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n <div v-if=\"!filteredRef.length\" class=\"nothing-found\">Nothing found</div>\n </DropdownOverlay>\n <DoubleContour class=\"pl-dropdown__contour\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"pl-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"pl-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"pl-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","slots","_useSlots","rootRef","ref","input","overlayRef","useTemplateRef","data","reactive","findActiveIndex","tap","filteredRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","options","search","tabindex","selectOption","_a","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","relatedTarget","_c","_b","handleKeydown","open","activeIndex","filtered","length","it","localIndex","delta","newIndex","useLabelNotch","watch","watchPostEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIeA,KAAA;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;AAqBA,UAAMC,IAAOC,GAOPC,IAAQC,GAuERC,IAAQC,GAEV,GAEEC,IAAUC,EAA6B,GACvCC,IAAQD,EAAkC,GAE1CE,IAAaC,GAAe,SAAS,GAErCC,IAAOC,GAAS;AAAA,MACpB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,MAAM;AAAA,MACN,eAAe;AAAA,IAAA,CAChB,GAEKC,IAAkB,M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;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"PlDropdown.vue.js","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport './pl-dropdown.scss';\nimport { computed, reactive, ref, unref, useTemplateRef, watch, watchPostEffect } from 'vue';\nimport { tap } from '../../helpers/functions';\nimport { PlTooltip } from '../PlTooltip';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport type { ListOption, ListOptionNormalized } from '../../types';\nimport { deepEqual } from '../../helpers/objects';\nimport LongText from '../LongText.vue';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport OptionList from './OptionList.vue';\nimport { useGroupBy } from './useGroupBy';\nimport type { LOption } from './types';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: string;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: string;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst slots = defineSlots<{\n [key: string]: unknown;\n}>();\n\nconst rootRef = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst optionListRef = useTemplateRef<InstanceType<typeof OptionList>>('optionListRef');\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n optionsHeight: 0,\n});\n\nconst findActiveIndex = () =>\n tap(\n orderedRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed<LOption<M>[]>(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst { orderedRef, groupsRef, restRef } = useGroupBy(filteredRef, 'group');\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n rootRef?.value?.focus();\n};\n\nconst selectOptionWrapper = (v: unknown) => {\n selectOption(v as M | undefined);\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => {\n data.open = !data.open;\n if (!data.open) {\n data.search = '';\n }\n};\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!rootRef.value?.contains(relatedTarget) && !optionListRef.value?.listRef?.contains(relatedTarget)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n rootRef.value?.focus();\n }\n\n const ordered = orderedRef.value;\n\n const { length } = ordered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(ordered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = ordered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = ordered[newIndex].index ?? -1;\n};\n\nuseLabelNotch(rootRef);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n optionListRef.value?.scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"pl-dropdown__envelope\" @click=\"setFocusOnInput\">\n <div\n ref=\"rootRef\"\n :tabindex=\"tabindex\"\n class=\"pl-dropdown\"\n :class=\"{ open: data.open, error, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"pl-dropdown__container\">\n <div class=\"pl-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" class=\"input-value\">\n <LongText> {{ textValue }} </LongText>\n </div>\n\n <div class=\"pl-dropdown__controls\">\n <PlMaskIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div class=\"pl-dropdown__arrow-wrapper\" @click.stop=\"toggleOpen\">\n <div v-if=\"arrowIconLarge\" class=\"arrow-icon\" :class=\"[`icon-24 ${arrowIconLarge}`]\" />\n <div v-else-if=\"arrowIcon\" class=\"arrow-icon\" :class=\"[`icon-16 ${arrowIcon}`]\" />\n <div v-else class=\"arrow-icon arrow-icon-default\" />\n </div>\n </div>\n </div>\n <label v-if=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <OptionList\n v-if=\"data.open\"\n ref=\"optionListRef\"\n :root-ref=\"rootRef!\"\n :groups=\"groupsRef\"\n :rest=\"restRef\"\n :option-size=\"optionSize\"\n :select-option=\"selectOptionWrapper\"\n />\n <DoubleContour class=\"pl-dropdown__contour\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"pl-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"pl-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"pl-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","slots","_useSlots","rootRef","ref","input","optionListRef","useTemplateRef","data","reactive","findActiveIndex","tap","orderedRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","filteredRef","options","search","groupsRef","restRef","useGroupBy","tabindex","selectOption","_a","selectOptionWrapper","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","relatedTarget","_c","_b","handleKeydown","open","activeIndex","ordered","length","it","localIndex","delta","newIndex","useLabelNotch","watch","watchPostEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIeA,KAAA;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;AAsBA,UAAMC,IAAOC,GAOPC,IAAQC,G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AAK;AAAA,MACX,CAAC4C,MAAU;;AAAA,eAAAA,KAAOZ,IAAAnC,EAAM,UAAN,gBAAAmC,EAAa,UAAU;AAAA;AAAA,IAC3C,GAEAsB,GAAgB,MAAM;;AAEf,MAAAtD,EAAA,QAEDA,EAAK,eAAe,KAAKA,EAAK,UAChCgC,IAAAlC,EAAc,UAAd,QAAAkC,EAAqB;AAAA,IACvB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,OAAO,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare function useGroupBy<T, K extends keyof T>(list: Ref<T[]>, byKey: K): {
|
|
3
|
+
orderedRef: import('vue').ComputedRef<T[]>;
|
|
4
|
+
groupsRef: import('vue').ComputedRef<Map<NonNullable<T[K]>, T[]>>;
|
|
5
|
+
restRef: import('vue').ComputedRef<T[]>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=useGroupBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGroupBy.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdown/useGroupBy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AA6C/B,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAC7C,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EACd,KAAK,EAAE,CAAC;;;;EAeT"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { computed as c } from "vue";
|
|
2
|
+
function d(o, t) {
|
|
3
|
+
var u;
|
|
4
|
+
const e = /* @__PURE__ */ new Map();
|
|
5
|
+
if (!o)
|
|
6
|
+
return {
|
|
7
|
+
grouped: e,
|
|
8
|
+
rest: [],
|
|
9
|
+
ordered: []
|
|
10
|
+
};
|
|
11
|
+
for (const s of o) {
|
|
12
|
+
const r = s[t];
|
|
13
|
+
r !== void 0 && r !== null && (e.has(r) || e.set(r, []), (u = e.get(r)) == null || u.push(s));
|
|
14
|
+
}
|
|
15
|
+
const n = o.filter((s) => {
|
|
16
|
+
const r = s[t];
|
|
17
|
+
return r == null;
|
|
18
|
+
}), f = [...Array.from(e.values()).flat(), ...n];
|
|
19
|
+
return {
|
|
20
|
+
grouped: e,
|
|
21
|
+
rest: n,
|
|
22
|
+
ordered: f
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function l(o, t) {
|
|
26
|
+
const e = c(() => d(o.value, t)), n = c(() => e.value.ordered), f = c(() => e.value.grouped), u = c(() => e.value.rest);
|
|
27
|
+
return {
|
|
28
|
+
orderedRef: n,
|
|
29
|
+
groupsRef: f,
|
|
30
|
+
restRef: u
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
l as useGroupBy
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=useGroupBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGroupBy.js","sources":["../../../src/components/PlDropdown/useGroupBy.ts"],"sourcesContent":["import type { Ref } from 'vue';\nimport { computed } from 'vue';\n\nfunction groupBy<T, K extends keyof T>(\n list: T[],\n groupBy: K,\n): {\n grouped: Map<NonNullable<T[K]>, T[]>;\n rest: T[];\n ordered: T[];\n } {\n const grouped: Map<NonNullable<T[K]>, T[]> = new Map();\n\n if (!list) {\n return {\n grouped,\n rest: [],\n ordered: [],\n };\n }\n\n // Group items by the specified key\n for (const item of list) {\n const key = item[groupBy];\n if (key === undefined) continue;\n if (key === null) continue;\n if (!grouped.has(key)) grouped.set(key, []);\n grouped.get(key)?.push(item);\n }\n\n // Items without a group key\n const rest = list.filter((item: T) => {\n const key = item[groupBy];\n return key === undefined || key === null;\n });\n\n const ordered = [...Array.from(grouped.values()).flat(), ...rest];\n\n return {\n grouped,\n rest,\n ordered,\n };\n}\n\nexport function useGroupBy<T, K extends keyof T>(\n list: Ref<T[]>,\n byKey: K,\n) {\n const result = computed(() => groupBy(list.value, byKey));\n\n const orderedRef = computed(() => result.value.ordered);\n\n const groupsRef = computed(() => result.value.grouped);\n\n const restRef = computed(() => result.value.rest);\n\n return {\n orderedRef,\n groupsRef,\n restRef,\n };\n}\n"],"names":["groupBy","list","grouped","item","key","_a","rest","ordered","useGroupBy","byKey","result","computed","orderedRef","groupsRef","restRef"],"mappings":";AAGA,SAASA,EACPC,GACAD,GAKE;;AACI,QAAAE,wBAA2C,IAAI;AAErD,MAAI,CAACD;AACI,WAAA;AAAA,MACL,SAAAC;AAAA,MACA,MAAM,CAAC;AAAA,MACP,SAAS,CAAA;AAAA,IACX;AAIF,aAAWC,KAAQF,GAAM;AACjB,UAAAG,IAAMD,EAAKH,CAAO;AACxB,IAAII,MAAQ,UACRA,MAAQ,SACPF,EAAQ,IAAIE,CAAG,KAAWF,EAAA,IAAIE,GAAK,EAAE,IAC1CC,IAAAH,EAAQ,IAAIE,CAAG,MAAf,QAAAC,EAAkB,KAAKF;AAAA,EAAI;AAI7B,QAAMG,IAAOL,EAAK,OAAO,CAACE,MAAY;AAC9B,UAAAC,IAAMD,EAAKH,CAAO;AACjB,WAAqBI,KAAQ;AAAA,EAAA,CACrC,GAEKG,IAAU,CAAC,GAAG,MAAM,KAAKL,EAAQ,OAAO,CAAC,EAAE,QAAQ,GAAGI,CAAI;AAEzD,SAAA;AAAA,IACL,SAAAJ;AAAA,IACA,MAAAI;AAAA,IACA,SAAAC;AAAA,EACF;AACF;AAEgB,SAAAC,EACdP,GACAQ,GACA;AACA,QAAMC,IAASC,EAAS,MAAMX,EAAQC,EAAK,OAAOQ,CAAK,CAAC,GAElDG,IAAaD,EAAS,MAAMD,EAAO,MAAM,OAAO,GAEhDG,IAAYF,EAAS,MAAMD,EAAO,MAAM,OAAO,GAE/CI,IAAUH,EAAS,MAAMD,EAAO,MAAM,IAAI;AAEzC,SAAA;AAAA,IACL,YAAAE;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,EACF;AACF;"}
|
|
@@ -115,8 +115,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
115
115
|
helper: string;
|
|
116
116
|
placeholder: string;
|
|
117
117
|
clearable: boolean;
|
|
118
|
-
loadingOptionsHelper: string;
|
|
119
118
|
optionSize: "small" | "medium";
|
|
119
|
+
loadingOptionsHelper: string;
|
|
120
120
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
121
121
|
tooltip?(_: {}): any;
|
|
122
122
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlDropdownRef.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdownRef/PlDropdownRef.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlDropdownRef.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdownRef/PlDropdownRef.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKvD;;GAEG;;IAcC;;OAEG;gBACS,QAAQ,GAAG,SAAS;IAChC;;OAEG;YACK,MAAM;IACd;;OAEG;cACO,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC/B;;OAEG;aACM,MAAM;IACf;;OAEG;2BACoB,MAAM;IAC7B;;OAEG;YACK,OAAO;IACf;;OAEG;kBACW,MAAM;IACpB;;OAEG;gBACS,OAAO;IACnB;;OAEG;eACQ,OAAO;IAClB;;OAEG;eACQ,OAAO;IAClB;;OAEG;iBACU,OAAO,GAAG,QAAQ;;;;;;;;;IA3C/B;;OAEG;gBACS,QAAQ,GAAG,SAAS;IAChC;;OAEG;YACK,MAAM;IACd;;OAEG;cACO,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC/B;;OAEG;aACM,MAAM;IACf;;OAEG;2BACoB,MAAM;IAC7B;;OAEG;YACK,OAAO;IACf;;OAEG;kBACW,MAAM;IACpB;;OAEG;gBACS,OAAO;IACnB;;OAEG;eACQ,OAAO;IAClB;;OAEG;eACQ,OAAO;IAClB;;OAEG;iBACU,OAAO,GAAG,QAAQ;;;;;;;;;aAhCrB,QAAQ,CAAC,SAAS,EAAE,CAAC;;WAJvB,MAAM;cA4BH,OAAO;cAIP,OAAO;YAxBT,MAAM;iBAYD,MAAM;eAIR,OAAO;gBAYN,OAAO,GAAG,QAAQ;0BAxBR,MAAM;;qBA+GJ,GAAG;;AA/IhC,wBA4LK;AAcL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, useSlots as u, computed as t, createBlock as f, openBlock as m, unref as a, mergeProps as c, createSlots as
|
|
1
|
+
import { defineComponent as s, useSlots as u, computed as t, createBlock as f, openBlock as m, unref as a, mergeProps as c, createSlots as g, withCtx as v, renderSlot as b } from "vue";
|
|
2
2
|
import _ from "../PlDropdown/PlDropdown.vue.js";
|
|
3
3
|
const k = {
|
|
4
4
|
name: "PlDropdownRef"
|
|
@@ -19,25 +19,26 @@ const k = {
|
|
|
19
19
|
},
|
|
20
20
|
emits: ["update:modelValue"],
|
|
21
21
|
setup(n) {
|
|
22
|
-
const
|
|
22
|
+
const r = u(), l = n, i = t(
|
|
23
23
|
() => {
|
|
24
24
|
var e;
|
|
25
25
|
return (e = l.options) == null ? void 0 : e.map((o) => ({
|
|
26
26
|
label: o.label,
|
|
27
|
-
value: o.ref
|
|
27
|
+
value: o.ref,
|
|
28
|
+
group: o.group
|
|
28
29
|
}));
|
|
29
30
|
}
|
|
30
|
-
),
|
|
31
|
+
), d = t(() => l.disabled ? "icon-link-disabled" : "icon-link");
|
|
31
32
|
return (e, o) => (m(), f(a(_), c(l, {
|
|
32
|
-
options:
|
|
33
|
+
options: i.value,
|
|
33
34
|
"loading-options-helper": e.loadingOptionsHelper,
|
|
34
|
-
"arrow-icon-large":
|
|
35
|
+
"arrow-icon-large": d.value,
|
|
35
36
|
"onUpdate:modelValue": o[0] || (o[0] = (p) => e.$emit("update:modelValue", p))
|
|
36
|
-
}),
|
|
37
|
-
a(
|
|
37
|
+
}), g({ _: 2 }, [
|
|
38
|
+
a(r).tooltip ? {
|
|
38
39
|
name: "tooltip",
|
|
39
|
-
fn:
|
|
40
|
-
|
|
40
|
+
fn: v(() => [
|
|
41
|
+
b(e.$slots, "tooltip")
|
|
41
42
|
]),
|
|
42
43
|
key: "0"
|
|
43
44
|
} : void 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlDropdownRef.vue.js","sources":["../../../src/components/PlDropdownRef/PlDropdownRef.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdownRef',\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ModelRef, RefOption } from '../../types';\nimport { PlDropdown } from '../PlDropdown';\nimport { computed, useSlots } from 'vue';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst slots: any = useSlots();\n\ndefineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: ModelRef | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected ref of the dropdown.\n */\n modelValue: ModelRef | undefined;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available ref options for the dropdown\n */\n options?: Readonly<RefOption[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst options = computed(() =>\n props.options?.map((opt) => ({\n label: opt.label,\n value: opt.ref,\n })),\n);\n\nconst arrowIcon = computed(() => (props.disabled ? 'icon-link-disabled' : 'icon-link'));\n</script>\n\n<template>\n <PlDropdown\n v-bind=\"props\"\n :options=\"options\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :arrow-icon-large=\"arrowIcon\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"names":["__default__","slots","useSlots","props","__props","options","computed","_a","opt","arrowIcon"],"mappings":";;AAIA,MAAeA,IAAA;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;AASA,UAAMC,IAAaC,EAAS,GAStBC,IAAQC,GA8DRC,IAAUC;AAAA,MAAS,MAAA;;AACvB,gBAAAC,IAAAJ,EAAM,YAAN,gBAAAI,EAAe,IAAI,CAACC,OAAS;AAAA,UAC3B,OAAOA,EAAI;AAAA,UACX,OAAOA,EAAI;AAAA,QAAA;AAAA;AAAA,IAEf,GAEMC,IAAYH,EAAS,MAAOH,EAAM,WAAW,uBAAuB,WAAY;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"PlDropdownRef.vue.js","sources":["../../../src/components/PlDropdownRef/PlDropdownRef.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdownRef',\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ModelRef, RefOption } from '../../types';\nimport { PlDropdown } from '../PlDropdown';\nimport { computed, useSlots } from 'vue';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst slots: any = useSlots();\n\ndefineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: ModelRef | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected ref of the dropdown.\n */\n modelValue: ModelRef | undefined;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available ref options for the dropdown\n */\n options?: Readonly<RefOption[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst options = computed(() =>\n props.options?.map((opt) => ({\n label: opt.label,\n value: opt.ref,\n group: opt.group,\n })),\n);\n\nconst arrowIcon = computed(() => (props.disabled ? 'icon-link-disabled' : 'icon-link'));\n</script>\n\n<template>\n <PlDropdown\n v-bind=\"props\"\n :options=\"options\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :arrow-icon-large=\"arrowIcon\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"names":["__default__","slots","useSlots","props","__props","options","computed","_a","opt","arrowIcon"],"mappings":";;AAIA,MAAeA,IAAA;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;AASA,UAAMC,IAAaC,EAAS,GAStBC,IAAQC,GA8DRC,IAAUC;AAAA,MAAS,MAAA;;AACvB,gBAAAC,IAAAJ,EAAM,YAAN,gBAAAI,EAAe,IAAI,CAACC,OAAS;AAAA,UAC3B,OAAOA,EAAI;AAAA,UACX,OAAOA,EAAI;AAAA,UACX,OAAOA,EAAI;AAAA,QAAA;AAAA;AAAA,IAEf,GAEMC,IAAYH,EAAS,MAAOH,EAAM,WAAW,uBAAuB,WAAY;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
declare const _default: <T extends unknown = unknown, K extends number | string = string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
2
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
3
3
|
readonly "onUpdate:items"?: ((value: T[]) => any) | undefined;
|
|
4
|
-
readonly "onUpdate:draggableItems"?: ((value: Set<
|
|
5
|
-
readonly "onUpdate:removableItems"?: ((value: Set<
|
|
6
|
-
readonly "onUpdate:expandableItems"?: ((value: Set<
|
|
7
|
-
readonly "onUpdate:expandedItems"?: ((value: Set<
|
|
8
|
-
readonly "onUpdate:pinnableItems"?: ((value: Set<
|
|
9
|
-
readonly "onUpdate:pinnedItems"?: ((value: Set<
|
|
10
|
-
readonly "onUpdate:toggableItems"?: ((value: Set<
|
|
11
|
-
readonly "onUpdate:toggledItems"?: ((value: Set<
|
|
4
|
+
readonly "onUpdate:draggableItems"?: ((value: Set<K>) => any) | undefined;
|
|
5
|
+
readonly "onUpdate:removableItems"?: ((value: Set<K>) => any) | undefined;
|
|
6
|
+
readonly "onUpdate:expandableItems"?: ((value: Set<K>) => any) | undefined;
|
|
7
|
+
readonly "onUpdate:expandedItems"?: ((value: Set<K>) => any) | undefined;
|
|
8
|
+
readonly "onUpdate:pinnableItems"?: ((value: Set<K>) => any) | undefined;
|
|
9
|
+
readonly "onUpdate:pinnedItems"?: ((value: Set<K>) => any) | undefined;
|
|
10
|
+
readonly "onUpdate:toggableItems"?: ((value: Set<K>) => any) | undefined;
|
|
11
|
+
readonly "onUpdate:toggledItems"?: ((value: Set<K>) => any) | undefined;
|
|
12
12
|
readonly onItemClick?: ((item: T) => any) | undefined;
|
|
13
13
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:items" | "onUpdate:draggableItems" | "onUpdate:removableItems" | "onUpdate:expandableItems" | "onUpdate:expandedItems" | "onUpdate:pinnableItems" | "onUpdate:pinnedItems" | "onUpdate:toggableItems" | "onUpdate:toggledItems" | "onItemClick"> & ({
|
|
14
14
|
items: T[];
|
|
15
|
-
draggableItems?: Set<
|
|
16
|
-
removableItems?: Set<
|
|
17
|
-
expandableItems?: Set<
|
|
18
|
-
expandedItems?: Set<
|
|
19
|
-
pinnableItems?: Set<
|
|
20
|
-
pinnedItems?: Set<
|
|
21
|
-
toggableItems?: Set<
|
|
22
|
-
toggledItems?: Set<
|
|
15
|
+
draggableItems?: Set<K>;
|
|
16
|
+
removableItems?: Set<K>;
|
|
17
|
+
expandableItems?: Set<K>;
|
|
18
|
+
expandedItems?: Set<K>;
|
|
19
|
+
pinnableItems?: Set<K>;
|
|
20
|
+
pinnedItems?: Set<K>;
|
|
21
|
+
toggableItems?: Set<K>;
|
|
22
|
+
toggledItems?: Set<K>;
|
|
23
23
|
} & {
|
|
24
|
+
getItemKey: (item: T, index: number) => K;
|
|
24
25
|
itemClass?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
25
|
-
activeItems?: Set<
|
|
26
|
+
activeItems?: Set<K>;
|
|
26
27
|
enableDragging?: boolean;
|
|
27
|
-
getItemKey?: (item: T) => K;
|
|
28
28
|
onDragEnd?: (oldIndex: number, newIndex: number) => void | boolean;
|
|
29
29
|
onSort?: (oldIndex: number, newIndex: number) => void | boolean;
|
|
30
30
|
enableExpanding?: boolean;
|
|
@@ -57,7 +57,7 @@ declare const _default: <T extends unknown = unknown, K extends number | string
|
|
|
57
57
|
index: number;
|
|
58
58
|
}) => unknown;
|
|
59
59
|
};
|
|
60
|
-
emit: ((e: "itemClick", item: T) => void) & (((evt: "update:items", value: T[]) => void) & ((evt: "update:draggableItems", value: Set<
|
|
60
|
+
emit: ((e: "itemClick", item: T) => void) & (((evt: "update:items", value: T[]) => void) & ((evt: "update:draggableItems", value: Set<K>) => void) & ((evt: "update:removableItems", value: Set<K>) => void) & ((evt: "update:expandableItems", value: Set<K>) => void) & ((evt: "update:expandedItems", value: Set<K>) => void) & ((evt: "update:pinnableItems", value: Set<K>) => void) & ((evt: "update:pinnedItems", value: Set<K>) => void) & ((evt: "update:toggableItems", value: Set<K>) => void) & ((evt: "update:toggledItems", value: Set<K>) => void));
|
|
61
61
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
62
62
|
[key: string]: any;
|
|
63
63
|
}> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlElementList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlElementList/PlElementList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlElementList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlElementList/PlElementList.vue"],"names":[],"mappings":"yBAqWiB,CAAC,SAAS,OAAO,YAAY,CAAC,SAAS,MAAM,GAAG,MAAM,iCACzD,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAyiB1D,mBAAmB,CAAC;;;;;;;;;;;;eAlRnB,CAAC,EAAE;yBACO,GAAG,CAAC,CAAC,CAAC;yBACN,GAAG,CAAC,CAAC,CAAC;0BACL,GAAG,CAAC,CAAC,CAAC;wBACR,GAAG,CAAC,CAAC,CAAC;wBACN,GAAG,CAAC,CAAC,CAAC;sBACR,GAAG,CAAC,CAAC,CAAC;wBACJ,GAAG,CAAC,CAAC,CAAC;uBACP,GAAG,CAAC,CAAC,CAAC;;oBA/QP,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;oBAE7B,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,CAAC;sBACjE,GAAG,CAAC,CAAC,CAAC;yBAEH,OAAO;oBACZ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;iBACzD,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MA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