@milaboratories/uikit 2.6.1 → 2.6.3
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 +143 -143
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/base/BtnBase.vue.js +18 -18
- package/dist/base/BtnBase.vue.js.map +1 -1
- package/dist/components/ContextProvider.vue.js.map +1 -1
- package/dist/components/DataTable/BaseCellComponent.vue.js +20 -20
- package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnCaret.vue.js +6 -6
- package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/TScroll.vue.js +12 -12
- package/dist/components/DataTable/TScroll.vue.js.map +1 -1
- package/dist/components/DataTable/TableComponent.vue.js +5 -3
- package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
- package/dist/components/DataTable/TdCell.vue.js +36 -36
- package/dist/components/DataTable/TdCell.vue.js.map +1 -1
- package/dist/components/DataTable/ThCell.vue.js +27 -27
- package/dist/components/DataTable/ThCell.vue.js.map +1 -1
- package/dist/components/DataTable/TrBody.vue.js +12 -12
- package/dist/components/DataTable/TrBody.vue.js.map +1 -1
- package/dist/components/DataTable/TrHead.vue.js.map +1 -1
- package/dist/components/DataTable/assets/TableIcon.vue.js +2 -2
- package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
- package/dist/components/DropdownListItem.vue.js +18 -18
- package/dist/components/DropdownListItem.vue.js.map +1 -1
- package/dist/components/HScroll.vue.js.map +1 -1
- package/dist/components/InputRange.vue.js.map +1 -1
- package/dist/components/LongText.vue.js +1 -1
- package/dist/components/LongText.vue.js.map +1 -1
- package/dist/components/LongText.vue3.js +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
- package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.js +23 -23
- package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts +4 -0
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +112 -106
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts +4 -0
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +100 -94
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
- package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
- package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js +21 -21
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js +34 -34
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
- package/dist/components/PlBtnLink/PlBtnLink.vue.js +12 -12
- package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
- package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
- package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +31 -31
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +18 -18
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +15 -15
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckbox.vue.js +13 -13
- package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js +6 -6
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +28 -28
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
- package/dist/components/PlChip/PlChip.vue.js +20 -20
- package/dist/components/PlChip/PlChip.vue.js.map +1 -1
- package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
- package/dist/components/PlConfirmDialog.vue.js +14 -14
- package/dist/components/PlConfirmDialog.vue.js.map +1 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.js +30 -30
- package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.js +40 -40
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.d.ts +8 -0
- package/dist/components/PlDropdown/PlDropdown.vue.js +102 -95
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +95 -93
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +4 -4
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/ResizableInput.vue.js +12 -12
- package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts +4 -0
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +88 -82
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -11
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js +36 -36
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue.d.ts +20 -0
- package/dist/components/PlElementList/PlElementList.vue2.js +180 -135
- package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue.d.ts +20 -0
- package/dist/components/PlElementList/PlElementListItem.vue2.js +101 -76
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
- package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +24 -24
- package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.js +38 -38
- package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Remote.vue.js +2 -2
- package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Shortcuts.vue2.js +4 -4
- package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.d.ts +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js +78 -76
- package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
- package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +11 -11
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +62 -60
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js +22 -22
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.d.ts +6 -1
- package/dist/components/PlNumberField/PlNumberField.vue.js +66 -60
- package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
- package/dist/components/PlProgressBar/PlProgressBar.vue.js +12 -12
- package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
- package/dist/components/PlProgressCell/PlProgressCell.vue.js +20 -20
- package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
- package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
- package/dist/components/PlRadio/PlRadioGroup.vue2.js +8 -8
- package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue2.js +19 -19
- package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +8 -8
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +5 -3
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
- package/dist/components/PlSplash/PlSplash.vue.js +16 -16
- package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
- package/dist/components/PlStatusTag/PlStatusTag.vue.js +7 -7
- package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
- package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
- package/dist/components/PlTabs/PlTabs.vue.js +18 -18
- package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
- package/dist/components/PlTabs/Tab.vue.js +9 -9
- package/dist/components/PlTabs/Tab.vue.js.map +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js +55 -53
- package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
- package/dist/components/PlTextField/PlTextField.vue.d.ts +4 -0
- package/dist/components/PlTextField/PlTextField.vue.js +66 -60
- package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js +14 -14
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
- package/dist/components/PlTooltip/Beak.vue.js +2 -2
- package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue.js +50 -50
- package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
- package/dist/components/Scrollable.vue.js.map +1 -1
- package/dist/components/Slider.vue.js +35 -35
- package/dist/components/Slider.vue.js.map +1 -1
- package/dist/components/SliderRange.vue.js +47 -47
- package/dist/components/SliderRange.vue.js.map +1 -1
- package/dist/components/SliderRangeTriple.vue.js +47 -47
- package/dist/components/SliderRangeTriple.vue.js.map +1 -1
- package/dist/components/TabItem.vue.js.map +1 -1
- package/dist/components/ThemeSwitcher.vue.js +2 -2
- package/dist/components/ThemeSwitcher.vue.js.map +1 -1
- package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
- package/dist/components/VScroll.vue.js.map +1 -1
- package/dist/components/contextMenu/Menu.vue2.js +12 -12
- package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
- package/dist/composition/filters/metadata.d.ts +205 -0
- package/dist/composition/filters/metadata.js +129 -19
- package/dist/composition/filters/metadata.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js +27 -27
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
- package/dist/layout/PlContainer/PlContainer.vue.js +10 -10
- package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
- package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
- package/dist/layout/PlRow/PlRow.vue.js +8 -8
- package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
- package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
- package/dist/utils/DoubleContour.vue.d.ts +7 -1
- package/dist/utils/DoubleContour.vue.js +20 -13
- package/dist/utils/DoubleContour.vue.js.map +1 -1
- package/dist/utils/DoubleContour.vue3.js +7 -0
- package/dist/utils/DoubleContour.vue3.js.map +1 -0
- package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
- package/dist/utils/PlCloseModalBtn.vue.js +2 -2
- package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
- package/dist/utils/TextLabel.vue.js.map +1 -1
- package/package.json +5 -5
- package/src/components/PlAutocomplete/PlAutocomplete.vue +6 -1
- package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +6 -1
- package/src/components/PlDropdown/PlDropdown.vue +12 -2
- package/src/components/PlDropdownMulti/PlDropdownMulti.vue +6 -1
- package/src/components/PlElementList/PlElementList.vue +40 -6
- package/src/components/PlElementList/PlElementListItem.vue +64 -47
- package/src/components/PlNumberField/PlNumberField.vue +4 -1
- package/src/components/PlTextField/PlTextField.vue +5 -1
- package/src/composition/filters/metadata.ts +105 -0
- package/src/utils/DoubleContour.vue +68 -2
- package/dist/utils/DoubleContour.vue2.js +0 -7
- package/dist/utils/DoubleContour.vue2.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as M, useModel as k, ref as w, computed as E, onMounted as V, createElementBlock as
|
|
1
|
+
import { defineComponent as L, mergeModels as M, useModel as k, ref as w, computed as E, onMounted as V, createElementBlock as u, openBlock as d, normalizeStyle as b, normalizeClass as m, unref as t, createElementVNode as p, createCommentVNode as h, withDirectives as C, toDisplayString as g, withKeys as v, vModelText as T } from "vue";
|
|
2
2
|
import { useTransformedModel as B } from "../../composition/useTransformedModel.js";
|
|
3
|
-
import
|
|
3
|
+
import f from "./pl-editable-title.module.scss.js";
|
|
4
4
|
const S = { key: 0 }, W = ["placeholder"], N = /* @__PURE__ */ L({
|
|
5
5
|
__name: "PlEditableTitle",
|
|
6
6
|
props: /* @__PURE__ */ M({
|
|
@@ -15,65 +15,65 @@ const S = { key: 0 }, W = ["placeholder"], N = /* @__PURE__ */ L({
|
|
|
15
15
|
modelModifiers: {}
|
|
16
16
|
}),
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
18
|
+
setup(a) {
|
|
19
|
+
const i = k(a, "modelValue"), o = a, e = B(i, {
|
|
20
20
|
update() {
|
|
21
21
|
return !1;
|
|
22
22
|
},
|
|
23
|
-
parse: (
|
|
24
|
-
if (typeof
|
|
23
|
+
parse: (r) => {
|
|
24
|
+
if (typeof r != "string")
|
|
25
25
|
throw Error("value should be a string");
|
|
26
|
-
if (
|
|
27
|
-
throw Error(`Max title length is ${
|
|
28
|
-
if (
|
|
29
|
-
throw Error(`Min title length is ${
|
|
30
|
-
return
|
|
26
|
+
if (o.maxLength && r.length > o.maxLength)
|
|
27
|
+
throw Error(`Max title length is ${o.maxLength} characters`);
|
|
28
|
+
if (o.minLength && r.length < o.minLength)
|
|
29
|
+
throw Error(`Min title length is ${o.minLength} characters`);
|
|
30
|
+
return r.trim();
|
|
31
31
|
}
|
|
32
|
-
}),
|
|
33
|
-
maxWidth:
|
|
34
|
-
})),
|
|
35
|
-
|
|
32
|
+
}), s = w(), x = E(() => ({
|
|
33
|
+
maxWidth: o.maxWidth ?? "80%"
|
|
34
|
+
})), y = () => {
|
|
35
|
+
i.value = e.value && !e.error ? e.value : i.value, e.reset();
|
|
36
36
|
};
|
|
37
37
|
return V(() => {
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
}), (
|
|
41
|
-
class:
|
|
42
|
-
style: b(
|
|
38
|
+
var r;
|
|
39
|
+
o.autofocus && ((r = s.value) == null || r.focus());
|
|
40
|
+
}), (r, l) => (d(), u("div", {
|
|
41
|
+
class: m(["pl-editable-title", t(f).component]),
|
|
42
|
+
style: b(x.value)
|
|
43
43
|
}, [
|
|
44
|
-
|
|
45
|
-
class:
|
|
44
|
+
p("div", {
|
|
45
|
+
class: m(t(f).container),
|
|
46
46
|
onClick: l[3] || (l[3] = () => {
|
|
47
47
|
var n;
|
|
48
|
-
return (n =
|
|
48
|
+
return (n = s.value) == null ? void 0 : n.focus();
|
|
49
49
|
})
|
|
50
50
|
}, [
|
|
51
|
-
|
|
52
|
-
C(
|
|
51
|
+
a.prefix ? (d(), u("span", S, g(a.prefix.trim()) + " ", 1)) : h("", !0),
|
|
52
|
+
C(p("input", {
|
|
53
53
|
ref_key: "inputRef",
|
|
54
|
-
ref:
|
|
55
|
-
"onUpdate:modelValue": l[0] || (l[0] = (n) =>
|
|
56
|
-
placeholder:
|
|
57
|
-
onFocusout:
|
|
54
|
+
ref: s,
|
|
55
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => t(e).value = n),
|
|
56
|
+
placeholder: a.placeholder,
|
|
57
|
+
onFocusout: y,
|
|
58
58
|
onKeydown: [
|
|
59
59
|
l[1] || (l[1] = v(
|
|
60
60
|
//@ts-ignore
|
|
61
|
-
(...n) =>
|
|
61
|
+
(...n) => t(e).reset && t(e).reset(...n),
|
|
62
62
|
["escape"]
|
|
63
63
|
)),
|
|
64
64
|
l[2] || (l[2] = v((n) => {
|
|
65
|
-
var
|
|
66
|
-
return (
|
|
65
|
+
var c;
|
|
66
|
+
return (c = n.target) == null ? void 0 : c.blur();
|
|
67
67
|
}, ["enter"]))
|
|
68
68
|
]
|
|
69
69
|
}, null, 40, W), [
|
|
70
|
-
[T,
|
|
70
|
+
[T, t(e).value]
|
|
71
71
|
])
|
|
72
72
|
], 2),
|
|
73
|
-
|
|
73
|
+
t(e).error ? (d(), u("div", {
|
|
74
74
|
key: 0,
|
|
75
|
-
class:
|
|
76
|
-
}, g(
|
|
75
|
+
class: m(t(f).error)
|
|
76
|
+
}, g(t(e).error), 3)) : h("", !0)
|
|
77
77
|
], 6));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlEditableTitle.vue.js","sources":["../../../src/components/PlEditableTitle/PlEditableTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useTransformedModel } from '../../composition/useTransformedModel';\nimport style from './pl-editable-title.module.scss';\nimport { computed, onMounted, ref } from 'vue';\n\nconst model = defineModel<string>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Standard input placeholder\n */\n placeholder?: string;\n /**\n * Any css `width` value (px, %), default is 80%\n */\n maxWidth?: string;\n /**\n * Fixed non-editable prefix\n */\n prefix?: string;\n /**\n * Max title length (default is 1000)\n */\n maxLength?: number;\n /**\n * Min title length\n */\n minLength?: number;\n /**\n * If true, input will be focused on mount\n */\n autofocus?: boolean;\n }>(),\n {\n placeholder: 'Title',\n maxWidth: '80%',\n prefix: undefined,\n maxLength: 1000,\n minLength: undefined,\n },\n);\n\nconst local = useTransformedModel(model, {\n update() {\n return false;\n },\n parse: (v): string => {\n if (typeof v !== 'string') {\n throw Error('value should be a string');\n }\n\n if (props.maxLength && v.length > props.maxLength) {\n throw Error(`Max title length is ${props.maxLength} characters`);\n }\n\n if (props.minLength && v.length < props.minLength) {\n throw Error(`Min title length is ${props.minLength} characters`);\n }\n\n return v.trim();\n },\n});\n\nconst inputRef = ref<HTMLInputElement>();\n\nconst computedStyle = computed(() => ({\n maxWidth: props.maxWidth ?? '80%',\n}));\n\nconst save = () => {\n model.value = local.value && !local.error ? local.value : model.value;\n local.reset();\n};\n\nonMounted(() => {\n if (props.autofocus) {\n inputRef.value?.focus();\n }\n});\n\n</script>\n\n<template>\n <div class=\"pl-editable-title\" :class=\"style.component\" :style=\"computedStyle\">\n <div :class=\"style.container\" @click=\"() => inputRef?.focus()\">\n <span v-if=\"prefix\">{{ prefix.trim() }} </span>\n <input\n ref=\"inputRef\"\n v-model=\"local.value\"\n :placeholder=\"placeholder\"\n @focusout=\"save\"\n @keydown.escape=\"local.reset\"\n @keydown.enter=\"(ev) => (ev.target as HTMLInputElement)?.blur()\"\n />\n </div>\n <div v-if=\"local.error\" :class=\"style.error\">{{ local.error }}</div>\n </div>\n</template>\n"],"names":["model","_useModel","__props","props","local","useTransformedModel","v","inputRef","ref","computedStyle","computed","save","onMounted","_a"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,EAAmBC,GAAA,YAAC,GAE5BC,IAAQD,GAoCRE,IAAQC,EAAoBL,GAAO;AAAA,MACvC,SAAS;AACP,eAAO;AAAA,MACT;AAAA,MACA,OAAO,CAACM,MAAc;AACpB,YAAI,OAAOA,KAAM;AACf,gBAAM,MAAM,0BAA0B;AAGxC,YAAIH,EAAM,aAAaG,EAAE,SAASH,EAAM;AACtC,gBAAM,MAAM,uBAAuBA,EAAM,SAAS,aAAa;AAGjE,YAAIA,EAAM,aAAaG,EAAE,SAASH,EAAM;AACtC,gBAAM,MAAM,uBAAuBA,EAAM,SAAS,aAAa;AAGjE,eAAOG,EAAE,KAAA;AAAA,MACX;AAAA,IAAA,CACD,GAEKC,IAAWC,EAAA,GAEXC,IAAgBC,EAAS,OAAO;AAAA,MACpC,UAAUP,EAAM,YAAY;AAAA,IAAA,EAC5B,GAEIQ,IAAO,MAAM;AACjB,MAAAX,EAAM,QAAQI,EAAM,SAAS,CAACA,EAAM,QAAQA,EAAM,QAAQJ,EAAM,OAChEI,EAAM,MAAA;AAAA,IACR;AAEA,WAAAQ,EAAU,MAAM;;AACd,MAAIT,EAAM,eACRU,IAAAN,EAAS,UAAT,QAAAM,EAAgB;AAAA,IAEpB,CAAC
|
|
1
|
+
{"version":3,"file":"PlEditableTitle.vue.js","sources":["../../../src/components/PlEditableTitle/PlEditableTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useTransformedModel } from '../../composition/useTransformedModel';\nimport style from './pl-editable-title.module.scss';\nimport { computed, onMounted, ref } from 'vue';\n\nconst model = defineModel<string>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Standard input placeholder\n */\n placeholder?: string;\n /**\n * Any css `width` value (px, %), default is 80%\n */\n maxWidth?: string;\n /**\n * Fixed non-editable prefix\n */\n prefix?: string;\n /**\n * Max title length (default is 1000)\n */\n maxLength?: number;\n /**\n * Min title length\n */\n minLength?: number;\n /**\n * If true, input will be focused on mount\n */\n autofocus?: boolean;\n }>(),\n {\n placeholder: 'Title',\n maxWidth: '80%',\n prefix: undefined,\n maxLength: 1000,\n minLength: undefined,\n },\n);\n\nconst local = useTransformedModel(model, {\n update() {\n return false;\n },\n parse: (v): string => {\n if (typeof v !== 'string') {\n throw Error('value should be a string');\n }\n\n if (props.maxLength && v.length > props.maxLength) {\n throw Error(`Max title length is ${props.maxLength} characters`);\n }\n\n if (props.minLength && v.length < props.minLength) {\n throw Error(`Min title length is ${props.minLength} characters`);\n }\n\n return v.trim();\n },\n});\n\nconst inputRef = ref<HTMLInputElement>();\n\nconst computedStyle = computed(() => ({\n maxWidth: props.maxWidth ?? '80%',\n}));\n\nconst save = () => {\n model.value = local.value && !local.error ? local.value : model.value;\n local.reset();\n};\n\nonMounted(() => {\n if (props.autofocus) {\n inputRef.value?.focus();\n }\n});\n\n</script>\n\n<template>\n <div class=\"pl-editable-title\" :class=\"style.component\" :style=\"computedStyle\">\n <div :class=\"style.container\" @click=\"() => inputRef?.focus()\">\n <span v-if=\"prefix\">{{ prefix.trim() }} </span>\n <input\n ref=\"inputRef\"\n v-model=\"local.value\"\n :placeholder=\"placeholder\"\n @focusout=\"save\"\n @keydown.escape=\"local.reset\"\n @keydown.enter=\"(ev) => (ev.target as HTMLInputElement)?.blur()\"\n />\n </div>\n <div v-if=\"local.error\" :class=\"style.error\">{{ local.error }}</div>\n </div>\n</template>\n"],"names":["model","_useModel","__props","props","local","useTransformedModel","v","inputRef","ref","computedStyle","computed","save","onMounted","_a","_createElementBlock","_normalizeClass","_unref","style","_createElementVNode","_cache","_openBlock","_hoisted_1","_toDisplayString","$event","args","_withKeys","ev","_vModelText"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,EAAmBC,GAAA,YAAC,GAE5BC,IAAQD,GAoCRE,IAAQC,EAAoBL,GAAO;AAAA,MACvC,SAAS;AACP,eAAO;AAAA,MACT;AAAA,MACA,OAAO,CAACM,MAAc;AACpB,YAAI,OAAOA,KAAM;AACf,gBAAM,MAAM,0BAA0B;AAGxC,YAAIH,EAAM,aAAaG,EAAE,SAASH,EAAM;AACtC,gBAAM,MAAM,uBAAuBA,EAAM,SAAS,aAAa;AAGjE,YAAIA,EAAM,aAAaG,EAAE,SAASH,EAAM;AACtC,gBAAM,MAAM,uBAAuBA,EAAM,SAAS,aAAa;AAGjE,eAAOG,EAAE,KAAA;AAAA,MACX;AAAA,IAAA,CACD,GAEKC,IAAWC,EAAA,GAEXC,IAAgBC,EAAS,OAAO;AAAA,MACpC,UAAUP,EAAM,YAAY;AAAA,IAAA,EAC5B,GAEIQ,IAAO,MAAM;AACjB,MAAAX,EAAM,QAAQI,EAAM,SAAS,CAACA,EAAM,QAAQA,EAAM,QAAQJ,EAAM,OAChEI,EAAM,MAAA;AAAA,IACR;AAEA,WAAAQ,EAAU,MAAM;;AACd,MAAIT,EAAM,eACRU,IAAAN,EAAS,UAAT,QAAAM,EAAgB;AAAA,IAEpB,CAAC,mBAKCC,EAaM,OAAA;AAAA,MAbD,OAAKC,EAAA,CAAC,qBAA4BC,EAAAC,CAAA,EAAM,SAAS,CAAA;AAAA,MAAG,SAAOR,EAAA,KAAa;AAAA,IAAA;MAC3ES,EAUM,OAAA;AAAA,QAVA,OAAKH,EAAEC,EAAAC,CAAA,EAAM,SAAS;AAAA,QAAG,SAAKE,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,MAAA;;AAAQ,kBAAAN,IAAAN,EAAA,UAAA,gBAAAM,EAAU;AAAA;AAAA,MAAK;QAC7CX,EAAA,UAAZkB,EAAA,GAAAN,EAAoD,QAAAO,GAAAC,EAA7BpB,EAAA,OAAO,KAAA,KAAS,KAAM,CAAA;UAC7CgB,EAOE,SAAA;AAAA,mBANI;AAAA,UAAJ,KAAIX;AAAA,UACK,uBAAAY,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAI,MAAAP,EAAAZ,CAAA,EAAM,QAAKmB;AAAA,UACnB,aAAarB,EAAA;AAAA,UACb,YAAUS;AAAA,UACV,WAAO;AAAA;;cAAS,IAAAa,MAAAR,EAAAZ,CAAA,EAAM,SAANY,EAAAZ,CAAA,EAAM,MAAK,GAAAoB,CAAA;AAAA,cAAA,CAAA,QAAA;AAAA,YAAA;AAAA,YACXL,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAM,EAAA,CAAAC,MAAA;;AAAQ,sBAAAb,IAAAa,EAAG,WAAH,gBAAAb,EAAgC;AAAA,eAAI,CAAA,OAAA,CAAA;AAAA,UAAA;AAAA;UAJpD,CAAAc,GAAAX,EAAAZ,CAAA,EAAM,KAAK;AAAA,QAAA;;MAObY,EAAAZ,CAAA,EAAM,cAAjBU,EAAoE,OAAA;AAAA;QAA3C,OAAKC,EAAEC,EAAAC,CAAA,EAAM,KAAK;AAAA,MAAA,GAAKK,EAAAN,EAAAZ,CAAA,EAAM,KAAK,GAAA,CAAA;;;;"}
|
|
@@ -7,6 +7,10 @@ declare const _default: <T extends unknown = unknown, K extends number | string
|
|
|
7
7
|
} & {
|
|
8
8
|
getItemKey?: (item: T, index: number) => K;
|
|
9
9
|
itemClass?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
10
|
+
itemClassTitle?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
11
|
+
itemClassBefore?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
12
|
+
itemClassAfter?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
13
|
+
itemClassContent?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
10
14
|
isActive?: (item: T, index: number) => boolean;
|
|
11
15
|
disableDragging?: boolean;
|
|
12
16
|
isDraggable?: (item: T, index: number) => boolean;
|
|
@@ -39,6 +43,14 @@ declare const _default: <T extends unknown = unknown, K extends number | string
|
|
|
39
43
|
item: T;
|
|
40
44
|
index: number;
|
|
41
45
|
}) => unknown;
|
|
46
|
+
"item-before"?: (props: {
|
|
47
|
+
item: T;
|
|
48
|
+
index: number;
|
|
49
|
+
}) => unknown;
|
|
50
|
+
"item-after"?: (props: {
|
|
51
|
+
item: T;
|
|
52
|
+
index: number;
|
|
53
|
+
}) => unknown;
|
|
42
54
|
}> & {
|
|
43
55
|
"item-title": (props: {
|
|
44
56
|
item: T;
|
|
@@ -48,6 +60,14 @@ declare const _default: <T extends unknown = unknown, K extends number | string
|
|
|
48
60
|
item: T;
|
|
49
61
|
index: number;
|
|
50
62
|
}) => unknown;
|
|
63
|
+
"item-before"?: (props: {
|
|
64
|
+
item: T;
|
|
65
|
+
index: number;
|
|
66
|
+
}) => unknown;
|
|
67
|
+
"item-after"?: (props: {
|
|
68
|
+
item: T;
|
|
69
|
+
index: number;
|
|
70
|
+
}) => unknown;
|
|
51
71
|
};
|
|
52
72
|
emit: ((e: "itemClick", item: T) => void) & ((evt: "update:items", value: T[]) => void);
|
|
53
73
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { shallowHash as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import
|
|
5
|
-
import { moveElements as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as ue, mergeModels as x, useModel as ce, useSlots as ge, computed as u, shallowRef as R, watch as me, createElementBlock as F, openBlock as v, normalizeClass as C, createElementVNode as ve, createCommentVNode as de, Fragment as I, renderList as p, createBlock as ee, unref as r, createSlots as te, withCtx as c, renderSlot as g } from "vue";
|
|
2
|
+
import { shallowHash as T, isFunction as d } from "@milaboratories/helpers";
|
|
3
|
+
import { useSortable as be } from "@vueuse/integrations/useSortable";
|
|
4
|
+
import ae from "./PlElementListItem.vue.js";
|
|
5
|
+
import { moveElements as le } from "./utils.js";
|
|
6
|
+
const Fe = /* @__PURE__ */ ue({
|
|
7
7
|
__name: "PlElementList",
|
|
8
|
-
props: /* @__PURE__ */
|
|
9
|
-
getItemKey: { type: Function, default: (
|
|
8
|
+
props: /* @__PURE__ */ x({
|
|
9
|
+
getItemKey: { type: Function, default: (E) => JSON.stringify(E) },
|
|
10
10
|
itemClass: { type: [String, Array, Function], default: void 0 },
|
|
11
|
+
itemClassTitle: { type: [String, Array, Function], default: void 0 },
|
|
12
|
+
itemClassBefore: { type: [String, Array, Function], default: void 0 },
|
|
13
|
+
itemClassAfter: { type: [String, Array, Function], default: void 0 },
|
|
14
|
+
itemClassContent: { type: [String, Array, Function], default: void 0 },
|
|
11
15
|
isActive: { type: Function, default: void 0 },
|
|
12
16
|
disableDragging: { type: Boolean, default: void 0 },
|
|
13
17
|
isDraggable: { type: Function, default: void 0 },
|
|
@@ -32,206 +36,247 @@ const be = /* @__PURE__ */ ae({
|
|
|
32
36
|
items: { required: !0 },
|
|
33
37
|
itemsModifiers: {}
|
|
34
38
|
}),
|
|
35
|
-
emits: /* @__PURE__ */
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
38
|
-
const l =
|
|
39
|
-
if (
|
|
40
|
-
if (l.length !==
|
|
41
|
-
const e =
|
|
42
|
-
for (let
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
return
|
|
39
|
+
emits: /* @__PURE__ */ x(["itemClick"], ["update:items"]),
|
|
40
|
+
setup(E, { emit: ie }) {
|
|
41
|
+
const m = ce(E, "items"), t = E, k = ie, b = ge(), D = u(() => t.disableDragging !== !0), f = u(() => m.value.filter(q)), oe = u(() => f.value.length > 0), h = u(() => m.value.filter((a, l) => !q(a, l))), S = u(() => h.value.length > 0), P = R(), A = R(), $ = R(), w = (a, l) => `${re.value}-${t.getItemKey(a, l)}`, se = u(() => f.value.map(w)), ne = u(() => h.value.map(w)), re = u((a) => {
|
|
42
|
+
const l = m.value.map(t.getItemKey);
|
|
43
|
+
if (P.value === void 0) return a ?? T(...l);
|
|
44
|
+
if (l.length !== P.value.length) return T(...l);
|
|
45
|
+
const e = P.value.map(t.getItemKey), i = new Set(e);
|
|
46
|
+
for (let o = 0; o < l.length; o++)
|
|
47
|
+
if (i.has(l[o]) && e[o] !== l[o])
|
|
48
|
+
return T(...l);
|
|
49
|
+
return a ?? T(...l);
|
|
46
50
|
});
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
const
|
|
51
|
+
B(oe, A, f, () => 0), B(S, $, h, () => f.value.length);
|
|
52
|
+
function B(a, l, e, i) {
|
|
53
|
+
const o = be(l, e, {
|
|
50
54
|
handle: '[data-draggable="true"]',
|
|
51
55
|
animation: 150,
|
|
52
56
|
forceFallback: !0,
|
|
53
57
|
fallbackOnBody: !0,
|
|
54
58
|
scrollSensitivity: 80,
|
|
55
59
|
forceAutoScrollFallback: !0,
|
|
56
|
-
onUpdate: (
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
60
|
+
onUpdate: (s) => {
|
|
61
|
+
var n;
|
|
62
|
+
if (s.oldIndex == null || s.newIndex == null)
|
|
59
63
|
throw new Error("Sortable event has no index");
|
|
60
|
-
((
|
|
64
|
+
((n = t.onDragEnd) == null ? void 0 : n.call(t, s.oldIndex, s.newIndex)) !== !1 && K(i() + s.oldIndex, i() + s.newIndex, !0);
|
|
61
65
|
}
|
|
62
66
|
});
|
|
63
|
-
return
|
|
64
|
-
[l, () => t.disableDragging,
|
|
65
|
-
([
|
|
66
|
-
!
|
|
67
|
+
return me(
|
|
68
|
+
[l, () => t.disableDragging, a],
|
|
69
|
+
([s, n, fe]) => {
|
|
70
|
+
!s || n || !fe ? o.stop() : o.start();
|
|
67
71
|
},
|
|
68
72
|
{ immediate: !0 }
|
|
69
|
-
),
|
|
73
|
+
), o;
|
|
70
74
|
}
|
|
71
|
-
function K(
|
|
72
|
-
var
|
|
73
|
-
if (
|
|
74
|
-
e && (
|
|
75
|
+
function K(a, l, e) {
|
|
76
|
+
var o;
|
|
77
|
+
if (a === l) return;
|
|
78
|
+
e && (P.value = le(m.value.slice(), a, l)), ((o = t.onSort) == null ? void 0 : o.call(t, a, l)) === !1 || le(m.value, a, l);
|
|
75
79
|
}
|
|
76
|
-
function
|
|
80
|
+
function H(a, l) {
|
|
77
81
|
var e;
|
|
78
|
-
return ((e = t.isActive) == null ? void 0 : e.call(t,
|
|
82
|
+
return ((e = t.isActive) == null ? void 0 : e.call(t, a, l)) ?? !1;
|
|
79
83
|
}
|
|
80
|
-
function
|
|
84
|
+
function j(a, l) {
|
|
81
85
|
var e;
|
|
82
|
-
return t.disableDragging === !0 ? !1 : ((e = t.isDraggable) == null ? void 0 : e.call(t,
|
|
86
|
+
return t.disableDragging === !0 ? !1 : ((e = t.isDraggable) == null ? void 0 : e.call(t, a, l)) ?? !0;
|
|
83
87
|
}
|
|
84
|
-
function
|
|
88
|
+
function L(a, l) {
|
|
85
89
|
var e;
|
|
86
|
-
return t.disableRemoving === !0 ? !1 : ((e = t.isRemovable) == null ? void 0 : e.call(t,
|
|
90
|
+
return t.disableRemoving === !0 ? !1 : ((e = t.isRemovable) == null ? void 0 : e.call(t, a, l)) ?? !0;
|
|
87
91
|
}
|
|
88
|
-
function
|
|
92
|
+
function M(a, l) {
|
|
89
93
|
var e;
|
|
90
|
-
return t.disableToggling === !0 ? !1 : ((e = t.isToggable) == null ? void 0 : e.call(t,
|
|
94
|
+
return t.disableToggling === !0 ? !1 : ((e = t.isToggable) == null ? void 0 : e.call(t, a, l)) ?? (d(t.isToggled) || d(t.onToggle));
|
|
91
95
|
}
|
|
92
|
-
function
|
|
96
|
+
function N(a, l) {
|
|
93
97
|
var e;
|
|
94
|
-
return ((e = t.isToggled) == null ? void 0 : e.call(t,
|
|
98
|
+
return ((e = t.isToggled) == null ? void 0 : e.call(t, a, l)) ?? !1;
|
|
95
99
|
}
|
|
96
|
-
function
|
|
100
|
+
function U(a, l) {
|
|
97
101
|
var e;
|
|
98
|
-
return t.disablePinning === !0 ? !1 : ((e = t.isPinnable) == null ? void 0 : e.call(t,
|
|
102
|
+
return t.disablePinning === !0 ? !1 : ((e = t.isPinnable) == null ? void 0 : e.call(t, a, l)) ?? (d(t.isPinned) || d(t.onPin));
|
|
99
103
|
}
|
|
100
|
-
function
|
|
104
|
+
function q(a, l) {
|
|
101
105
|
var e;
|
|
102
|
-
return ((e = t.isPinned) == null ? void 0 : e.call(t,
|
|
106
|
+
return ((e = t.isPinned) == null ? void 0 : e.call(t, a, l)) ?? !1;
|
|
103
107
|
}
|
|
104
|
-
function
|
|
108
|
+
function z(a, l) {
|
|
105
109
|
var e;
|
|
106
|
-
return t.disableExpanding === !0 ? !1 : ((e = t.isExpandable) == null ? void 0 : e.call(t,
|
|
110
|
+
return t.disableExpanding === !0 ? !1 : ((e = t.isExpandable) == null ? void 0 : e.call(t, a, l)) ?? (d(t.isExpanded) || d(t.onExpand));
|
|
107
111
|
}
|
|
108
|
-
function
|
|
112
|
+
function J(a, l) {
|
|
109
113
|
var e;
|
|
110
|
-
return ((e = t.isExpanded) == null ? void 0 : e.call(t,
|
|
114
|
+
return ((e = t.isExpanded) == null ? void 0 : e.call(t, a, l)) ?? !1;
|
|
111
115
|
}
|
|
112
|
-
function
|
|
116
|
+
function O(a, l) {
|
|
113
117
|
var e;
|
|
114
|
-
(e = t.onExpand) == null || e.call(t,
|
|
118
|
+
(e = t.onExpand) == null || e.call(t, a, l);
|
|
115
119
|
}
|
|
116
|
-
function
|
|
120
|
+
function V(a, l) {
|
|
117
121
|
var e;
|
|
118
|
-
(e = t.onToggle) == null || e.call(t,
|
|
122
|
+
(e = t.onToggle) == null || e.call(t, a, l);
|
|
119
123
|
}
|
|
120
|
-
function
|
|
121
|
-
var
|
|
124
|
+
function G(a, l) {
|
|
125
|
+
var i;
|
|
122
126
|
if (l === -1)
|
|
123
127
|
throw new Error("Pinnable item not found");
|
|
124
|
-
const e =
|
|
125
|
-
((
|
|
128
|
+
const e = f.value.includes(a);
|
|
129
|
+
((i = t.onPin) == null ? void 0 : i.call(t, a, l)) !== !1 && K(l, f.value.length + (e ? 0 : -1), !1);
|
|
126
130
|
}
|
|
127
|
-
function
|
|
131
|
+
function Q(a, l) {
|
|
128
132
|
var e;
|
|
129
|
-
((e = t.onRemove) == null ? void 0 : e.call(t,
|
|
133
|
+
((e = t.onRemove) == null ? void 0 : e.call(t, a, l)) !== !1 && m.value.splice(l, 1);
|
|
134
|
+
}
|
|
135
|
+
function y(a) {
|
|
136
|
+
return (l, e) => typeof a == "function" ? a(l, e) : a ?? null;
|
|
130
137
|
}
|
|
131
|
-
const
|
|
132
|
-
return (
|
|
133
|
-
class:
|
|
138
|
+
const W = y(t.itemClass), X = y(t.itemClassTitle), Y = y(t.itemClassContent), Z = y(t.itemClassBefore), _ = y(t.itemClassAfter);
|
|
139
|
+
return (a, l) => (v(), F("div", {
|
|
140
|
+
class: C(a.$style.root)
|
|
134
141
|
}, [
|
|
135
|
-
|
|
142
|
+
ve("div", {
|
|
136
143
|
ref_key: "pinnedContainerRef",
|
|
137
|
-
ref:
|
|
138
|
-
class:
|
|
144
|
+
ref: A,
|
|
145
|
+
class: C(a.$style.list)
|
|
139
146
|
}, [
|
|
140
|
-
(
|
|
141
|
-
key:
|
|
142
|
-
class:
|
|
143
|
-
|
|
147
|
+
(v(!0), F(I, null, p(f.value, (e, i) => (v(), ee(ae, {
|
|
148
|
+
key: se.value[i],
|
|
149
|
+
class: C([a.$style.item, r(W)(e, i)]),
|
|
150
|
+
titleClass: r(X)(e, i),
|
|
151
|
+
contentClass: r(Y)(e, i),
|
|
152
|
+
beforeClass: r(Z)(e, i),
|
|
153
|
+
afterClass: r(_)(e, i),
|
|
154
|
+
index: i,
|
|
144
155
|
item: e,
|
|
145
|
-
showDragHandle:
|
|
146
|
-
isActive:
|
|
147
|
-
isDraggable:
|
|
148
|
-
isRemovable:
|
|
149
|
-
isToggable:
|
|
150
|
-
isToggled:
|
|
151
|
-
isPinnable:
|
|
156
|
+
showDragHandle: D.value,
|
|
157
|
+
isActive: H(e, i),
|
|
158
|
+
isDraggable: j(e, i),
|
|
159
|
+
isRemovable: L(e, i),
|
|
160
|
+
isToggable: M(e, i),
|
|
161
|
+
isToggled: N(e, i),
|
|
162
|
+
isPinnable: U(e, i),
|
|
152
163
|
isPinned: !0,
|
|
153
|
-
isExpandable:
|
|
154
|
-
isExpanded:
|
|
155
|
-
onClick: (
|
|
156
|
-
onRemove:
|
|
157
|
-
onToggle:
|
|
158
|
-
onPin:
|
|
159
|
-
onExpand:
|
|
160
|
-
},
|
|
161
|
-
title:
|
|
162
|
-
|
|
163
|
-
index:
|
|
164
|
-
item:
|
|
164
|
+
isExpandable: z(e, i),
|
|
165
|
+
isExpanded: J(e, i),
|
|
166
|
+
onClick: (o) => k("itemClick", e),
|
|
167
|
+
onRemove: Q,
|
|
168
|
+
onToggle: V,
|
|
169
|
+
onPin: G,
|
|
170
|
+
onExpand: O
|
|
171
|
+
}, te({
|
|
172
|
+
title: c(({ item: o, index: s }) => [
|
|
173
|
+
g(a.$slots, "item-title", {
|
|
174
|
+
index: s,
|
|
175
|
+
item: o
|
|
165
176
|
})
|
|
166
177
|
]),
|
|
167
178
|
_: 2
|
|
168
179
|
}, [
|
|
169
|
-
|
|
170
|
-
name: "
|
|
171
|
-
fn:
|
|
172
|
-
|
|
173
|
-
index:
|
|
174
|
-
item:
|
|
180
|
+
b["item-before"] ? {
|
|
181
|
+
name: "before",
|
|
182
|
+
fn: c(({ item: o, index: s }) => [
|
|
183
|
+
g(a.$slots, "item-before", {
|
|
184
|
+
index: s,
|
|
185
|
+
item: o
|
|
175
186
|
})
|
|
176
187
|
]),
|
|
177
188
|
key: "0"
|
|
189
|
+
} : void 0,
|
|
190
|
+
b["item-content"] ? {
|
|
191
|
+
name: "content",
|
|
192
|
+
fn: c(({ item: o, index: s }) => [
|
|
193
|
+
g(a.$slots, "item-content", {
|
|
194
|
+
index: s,
|
|
195
|
+
item: o
|
|
196
|
+
})
|
|
197
|
+
]),
|
|
198
|
+
key: "1"
|
|
199
|
+
} : void 0,
|
|
200
|
+
b["item-after"] ? {
|
|
201
|
+
name: "after",
|
|
202
|
+
fn: c(({ item: o, index: s }) => [
|
|
203
|
+
g(a.$slots, "item-after", {
|
|
204
|
+
index: s,
|
|
205
|
+
item: o
|
|
206
|
+
})
|
|
207
|
+
]),
|
|
208
|
+
key: "2"
|
|
178
209
|
} : void 0
|
|
179
|
-
]), 1032, ["class", "index", "item", "showDragHandle", "isActive", "isDraggable", "isRemovable", "isToggable", "isToggled", "isPinnable", "isExpandable", "isExpanded", "onClick"]))), 128))
|
|
210
|
+
]), 1032, ["class", "titleClass", "contentClass", "beforeClass", "afterClass", "index", "item", "showDragHandle", "isActive", "isDraggable", "isRemovable", "isToggable", "isToggled", "isPinnable", "isExpandable", "isExpanded", "onClick"]))), 128))
|
|
180
211
|
], 2),
|
|
181
|
-
|
|
212
|
+
S.value ? (v(), F("div", {
|
|
182
213
|
key: 0,
|
|
183
214
|
ref_key: "unpinnedContainerRef",
|
|
184
|
-
ref:
|
|
185
|
-
class:
|
|
215
|
+
ref: $,
|
|
216
|
+
class: C(a.$style.list)
|
|
186
217
|
}, [
|
|
187
|
-
(
|
|
188
|
-
var
|
|
189
|
-
return
|
|
190
|
-
key:
|
|
191
|
-
class:
|
|
192
|
-
|
|
218
|
+
(v(!0), F(I, null, p(h.value, (e, i) => {
|
|
219
|
+
var o;
|
|
220
|
+
return v(), ee(ae, {
|
|
221
|
+
key: ne.value[i],
|
|
222
|
+
class: C([a.$style.item, r(W)(e, i)]),
|
|
223
|
+
titleClass: r(X)(e, i),
|
|
224
|
+
contentClass: r(Y)(e, i),
|
|
225
|
+
beforeClass: r(Z)(e, i),
|
|
226
|
+
afterClass: r(_)(e, i),
|
|
227
|
+
index: i + (((o = f.value) == null ? void 0 : o.length) ?? 0),
|
|
193
228
|
item: e,
|
|
194
|
-
showDragHandle:
|
|
195
|
-
isActive:
|
|
196
|
-
isDraggable:
|
|
197
|
-
isRemovable:
|
|
198
|
-
isToggable:
|
|
199
|
-
isToggled:
|
|
200
|
-
isPinnable:
|
|
229
|
+
showDragHandle: D.value,
|
|
230
|
+
isActive: H(e, i),
|
|
231
|
+
isDraggable: j(e, i),
|
|
232
|
+
isRemovable: L(e, i),
|
|
233
|
+
isToggable: M(e, i),
|
|
234
|
+
isToggled: N(e, i),
|
|
235
|
+
isPinnable: U(e, i),
|
|
201
236
|
isPinned: !1,
|
|
202
|
-
isExpandable:
|
|
203
|
-
isExpanded:
|
|
204
|
-
onClick: (
|
|
205
|
-
onRemove:
|
|
206
|
-
onToggle:
|
|
207
|
-
onPin:
|
|
208
|
-
onExpand:
|
|
209
|
-
},
|
|
210
|
-
title:
|
|
211
|
-
|
|
212
|
-
index:
|
|
213
|
-
item:
|
|
237
|
+
isExpandable: z(e, i),
|
|
238
|
+
isExpanded: J(e, i),
|
|
239
|
+
onClick: (s) => k("itemClick", e),
|
|
240
|
+
onRemove: Q,
|
|
241
|
+
onToggle: V,
|
|
242
|
+
onPin: G,
|
|
243
|
+
onExpand: O
|
|
244
|
+
}, te({
|
|
245
|
+
title: c(({ item: s, index: n }) => [
|
|
246
|
+
g(a.$slots, "item-title", {
|
|
247
|
+
index: n,
|
|
248
|
+
item: s
|
|
214
249
|
})
|
|
215
250
|
]),
|
|
216
251
|
_: 2
|
|
217
252
|
}, [
|
|
218
|
-
|
|
253
|
+
b["item-content"] ? {
|
|
219
254
|
name: "content",
|
|
220
|
-
fn:
|
|
221
|
-
|
|
222
|
-
index:
|
|
223
|
-
item:
|
|
255
|
+
fn: c(({ item: s, index: n }) => [
|
|
256
|
+
g(a.$slots, "item-content", {
|
|
257
|
+
index: n,
|
|
258
|
+
item: s
|
|
224
259
|
})
|
|
225
260
|
]),
|
|
226
261
|
key: "0"
|
|
262
|
+
} : void 0,
|
|
263
|
+
b["item-after"] ? {
|
|
264
|
+
name: "after",
|
|
265
|
+
fn: c(({ item: s, index: n }) => [
|
|
266
|
+
g(a.$slots, "item-after", {
|
|
267
|
+
index: n,
|
|
268
|
+
item: s
|
|
269
|
+
})
|
|
270
|
+
]),
|
|
271
|
+
key: "1"
|
|
227
272
|
} : void 0
|
|
228
|
-
]), 1032, ["class", "index", "item", "showDragHandle", "isActive", "isDraggable", "isRemovable", "isToggable", "isToggled", "isPinnable", "isExpandable", "isExpanded", "onClick"]);
|
|
273
|
+
]), 1032, ["class", "titleClass", "contentClass", "beforeClass", "afterClass", "index", "item", "showDragHandle", "isActive", "isDraggable", "isRemovable", "isToggable", "isToggled", "isPinnable", "isExpandable", "isExpanded", "onClick"]);
|
|
229
274
|
}), 128))
|
|
230
|
-
], 2)) :
|
|
275
|
+
], 2)) : de("", !0)
|
|
231
276
|
], 2));
|
|
232
277
|
}
|
|
233
278
|
});
|
|
234
279
|
export {
|
|
235
|
-
|
|
280
|
+
Fe as default
|
|
236
281
|
};
|
|
237
282
|
//# sourceMappingURL=PlElementList.vue2.js.map
|