@ironsource/shared-ui 2.1.12-test.98 → 2.1.12
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/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_ca558859_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_9c4df598_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_a685cf5e_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_9623dbbd_lang.css +1 -0
- package/ColumnConfigurator.vue_vue_type_style_index_0_scoped_702ad52e_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_ea8c7024_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8cc86a27_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +1 -0
- package/DataGridContainer.vue_vue_type_style_index_0_scoped_9a30b10c_lang.css +1 -0
- package/DataGridHeader.vue_vue_type_style_index_0_scoped_0e826456_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css +1 -0
- package/DialogFooter.vue_vue_type_style_index_0_scoped_8b7f64fe_lang.css +1 -0
- package/DialogHeader.vue_vue_type_style_index_0_scoped_9a814ec3_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_cc99f1e3_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_a594c97e_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_76757f22_lang.css +1 -0
- package/Link.vue_vue_type_style_index_0_scoped_1a766750_lang.css +1 -0
- package/LoaderBars.vue_vue_type_style_index_0_scoped_d976ec65_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css +1 -0
- package/OptionChip.vue_vue_type_style_index_0_scoped_538e4a21_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +1 -0
- package/RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css +1 -0
- package/RemoveButton.vue_vue_type_style_index_0_scoped_ca7fc11d_lang.css +1 -0
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +1 -0
- package/SectionHeaderText.vue_vue_type_style_index_0_scoped_0b8d3d79_lang.css +1 -0
- package/{SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css → SettingsHeader.vue_vue_type_style_index_0_scoped_a869d327_lang.css} +1 -1
- package/ShowMoreLink.vue_vue_type_style_index_0_scoped_9fc3bc1b_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_c72be7ed_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_a534c7af_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_9aec4e9b_lang.css +1 -0
- package/SortableSelectableList.vue_vue_type_style_index_0_scoped_40b0a4de_lang.css +1 -0
- package/TagsField.vue_vue_type_style_index_0_scoped_9760426b_lang.css +1 -0
- package/TagsFieldChip.vue_vue_type_style_index_0_scoped_d186b7ef_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_3b7a3661_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_63dc057e_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +21 -1
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +130 -114
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +49 -44
- package/components/chart/ChartHeaderTrend.vue.d.ts +5 -0
- package/components/chart/ChartHeaderTrend.vue.js +2 -2
- package/components/chart/ChartHeaderTrend.vue2.js +43 -39
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +76 -71
- package/components/chart/ChartPlane.vue.d.ts +15 -0
- package/components/chart/ChartPlane.vue.js +5 -5
- package/components/chart/ChartPlane.vue2.js +173 -156
- package/components/chart/ChartStoryArgs.d.ts +17 -0
- package/components/chart/ChartTooltip.vue.d.ts +5 -0
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +39 -35
- package/components/chart/LegendSorting.vue.d.ts +5 -0
- package/components/chart/LegendSorting.vue.js +16 -14
- package/components/chart/SettingsHeader.vue.d.ts +19 -3
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +36 -29
- package/components/chart/TooltipHeader.vue.js +3 -3
- package/components/chart/TooltipHeader.vue2.js +26 -26
- package/components/chart/colorPalette.d.ts +2 -1
- package/components/chart/colorPalette.js +47 -33
- package/components/chart/composables/useColorsMap.d.ts +3 -1
- package/components/chart/composables/useColorsMap.js +32 -30
- package/components/chart/consts.d.ts +5 -1
- package/components/chart/consts.js +30 -26
- package/components/chart/index.d.ts +77 -1
- package/components/chart/mockData.d.ts +15 -0
- package/components/chart/types.d.ts +3 -1
- package/components/chart/types.js +5 -5
- package/components/chart/utils/utils.d.ts +1 -1
- package/components/chart/utils/utils.js +20 -14
- package/components/columnConfigurator/ColumnConfigurator.types.d.ts +12 -0
- package/components/columnConfigurator/ColumnConfigurator.vue.d.ts +61 -0
- package/components/columnConfigurator/ColumnConfigurator.vue.js +7 -0
- package/components/columnConfigurator/ColumnConfigurator.vue2.js +113 -0
- package/components/columnConfigurator/SectionDropdown.vue.d.ts +39 -0
- package/components/columnConfigurator/SectionDropdown.vue.js +7 -0
- package/components/columnConfigurator/SectionDropdown.vue2.js +57 -0
- package/components/columnConfigurator/SectionHeaderText.vue.d.ts +34 -0
- package/components/columnConfigurator/SectionHeaderText.vue.js +7 -0
- package/components/columnConfigurator/SectionHeaderText.vue2.js +22 -0
- package/components/columnConfigurator/ShowMoreLink.vue.d.ts +33 -0
- package/components/columnConfigurator/ShowMoreLink.vue.js +7 -0
- package/components/columnConfigurator/ShowMoreLink.vue2.js +41 -0
- package/components/columnConfigurator/consts.d.ts +1 -0
- package/components/columnConfigurator/consts.js +4 -0
- package/components/columnConfigurator/index.d.ts +73 -0
- package/components/columnConfigurator/index.js +6 -0
- package/components/columnConfigurator/mockData.d.ts +30 -0
- package/components/columnConfigurator/utils.d.ts +2 -0
- package/components/columnConfigurator/utils.js +18 -0
- package/components/columnPicker/ColumnPicker.vue.d.ts +119 -0
- package/components/columnPicker/ColumnPicker.vue.js +7 -0
- package/components/columnPicker/ColumnPicker.vue2.js +322 -0
- package/components/columnPicker/OptionChip.vue.d.ts +53 -0
- package/components/columnPicker/OptionChip.vue.js +7 -0
- package/components/columnPicker/OptionChip.vue2.js +46 -0
- package/components/columnPicker/RemoveButton.vue.d.ts +38 -0
- package/components/columnPicker/RemoveButton.vue.js +7 -0
- package/components/columnPicker/RemoveButton.vue2.js +35 -0
- package/components/columnPicker/index.d.ts +388 -0
- package/components/columnPicker/index.js +6 -0
- package/components/columnPicker/mockData.d.ts +8 -0
- package/components/dateRange/common/DateRange.common.js +60 -60
- package/components/dialog/v3/Dialog.vue.d.ts +3 -3
- package/components/dialog/v3/index.d.ts +46 -46
- package/components/dialog/v4/DialogFooter.vue.d.ts +78 -0
- package/components/dialog/v4/DialogFooter.vue.js +7 -0
- package/components/dialog/v4/DialogFooter.vue2.js +60 -0
- package/components/dialog/v4/DialogHeader.vue.d.ts +60 -0
- package/components/dialog/v4/DialogHeader.vue.js +7 -0
- package/components/dialog/v4/DialogHeader.vue2.js +58 -0
- package/components/dialog/v4/DialogV4.vue.d.ts +9 -9
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +65 -107
- package/components/dialog/v4/index.d.ts +157 -157
- package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
- package/components/dropdown/v3/index.d.ts +20 -20
- package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +194 -187
- package/components/dropdown/v4/DropdownV4.vue.d.ts +7 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +118 -107
- package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +83 -70
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +10 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +155 -151
- package/components/dropdown/v4/index.d.ts +81 -3
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +5 -0
- package/components/emptyState/v4/EmptyStateV4.vue.js +2 -2
- package/components/emptyState/v4/EmptyStateV4.vue2.js +37 -34
- package/components/emptyState/v4/index.d.ts +20 -1
- package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +70 -70
- package/components/input/v4/TextField.vue.d.ts +12 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +129 -105
- package/components/input/v4/index.d.ts +46 -2
- package/components/link/Link.vue.d.ts +95 -0
- package/components/link/Link.vue.js +7 -0
- package/components/link/Link.vue2.js +65 -0
- package/components/link/index.d.ts +296 -0
- package/components/link/index.js +6 -0
- package/components/radioButton/v3/RadioButton.vue.d.ts +5 -0
- package/components/radioButton/v3/RadioButton.vue.js +3 -3
- package/components/radioButton/v3/RadioButton.vue2.js +42 -39
- package/components/radioButton/v3/index.d.ts +20 -1
- package/components/sortableList/LoaderBars.vue.d.ts +34 -0
- package/components/sortableList/LoaderBars.vue.js +7 -0
- package/components/sortableList/LoaderBars.vue2.js +25 -0
- package/components/sortableList/SortableItem.vue.d.ts +17 -2
- package/components/sortableList/SortableItem.vue.js +5 -5
- package/components/sortableList/SortableItem.vue2.js +86 -70
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +26 -23
- package/components/sortableList/SortableList.types.d.ts +1 -0
- package/components/sortableList/SortableList.vue.d.ts +12 -2
- package/components/sortableList/SortableList.vue.js +5 -5
- package/components/sortableList/SortableList.vue2.js +111 -113
- package/components/sortableList/SortableSelectableList.vue.d.ts +107 -0
- package/components/sortableList/SortableSelectableList.vue.js +7 -0
- package/components/sortableList/SortableSelectableList.vue2.js +128 -0
- package/components/sortableList/composables/useDraggableHelpers.d.ts +5 -0
- package/components/sortableList/composables/useDraggableHelpers.js +20 -0
- package/components/sortableList/composables/useHoverEffect.js +1 -1
- package/components/sortableList/consts.d.ts +2 -0
- package/components/sortableList/consts.js +4 -2
- package/components/sortableList/index.d.ts +77 -39
- package/components/table/common/consts.d.ts +2 -0
- package/components/table/common/consts.js +6 -4
- package/components/table/v4/DataGrid.vue.d.ts +12 -7
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +273 -268
- package/components/table/v4/DataGridContainer.vue.d.ts +10 -0
- package/components/table/v4/DataGridContainer.vue.js +7 -0
- package/components/table/v4/DataGridContainer.vue2.js +19 -0
- package/components/table/v4/DataGridHeader.vue.d.ts +85 -0
- package/components/table/v4/DataGridHeader.vue.js +7 -0
- package/components/table/v4/DataGridHeader.vue2.js +84 -0
- package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
- package/components/table/v4/DataGridRowsCounter.vue2.js +12 -12
- package/components/table/v4/MultipleDataGrid.vue.d.ts +8 -7
- package/components/table/v4/MultipleDataGrid.vue.js +2 -2
- package/components/table/v4/MultipleDataGrid.vue2.js +92 -90
- package/components/table/v4/index.d.ts +646 -332
- package/components/table/v4/index.js +11 -5
- package/components/table/v4/storyUtils.d.ts +25 -0
- package/components/tagsField/TagsField.types.d.ts +4 -0
- package/components/tagsField/TagsField.vue.d.ts +65 -0
- package/components/tagsField/TagsField.vue.js +7 -0
- package/components/tagsField/TagsField.vue2.js +90 -0
- package/components/tagsField/TagsFieldChip.vue.d.ts +45 -0
- package/components/tagsField/TagsFieldChip.vue.js +7 -0
- package/components/tagsField/TagsFieldChip.vue2.js +81 -0
- package/components/tagsField/consts.d.ts +1 -0
- package/components/tagsField/consts.js +4 -0
- package/components/tagsField/index.d.ts +75 -0
- package/components/tagsField/index.js +6 -0
- package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +18 -17
- package/components/tooltip/v4/index.d.ts +20 -1
- package/index.d.ts +2675 -1649
- package/index.js +137 -121
- package/package.json +18 -1
- package/testids/index.d.ts +47 -1
- package/testids/index.js +40 -32
- package/utils/date.d.ts +1 -0
- package/utils/date.js +9 -0
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +38 -21
- package/utils/object.d.ts +2 -0
- package/utils/object.js +9 -5
- package/utils/search.js +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_e8f25a03_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_b21a79b1_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_934163c0_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_020a9896_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +0 -1
- package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +0 -1
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +0 -1
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import "../../SortableList.
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useVModel as
|
|
8
|
-
import { matchString as
|
|
9
|
-
import { useTestIdAttrs as
|
|
10
|
-
import { SortableListTestIdModifiers as
|
|
11
|
-
import {
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_9aec4e9b_lang.css"; import { defineComponent as M, useCssVars as P, useSlots as z, computed as g, openBlock as s, createElementBlock as u, mergeProps as T, unref as t, normalizeClass as U, renderSlot as f, createCommentVNode as c, createBlock as S, isRef as x, withCtx as p, Fragment as D, renderList as H, createSlots as R, createVNode as w, createTextVNode as K, toDisplayString as Q } from "vue";
|
|
2
|
+
import { VueDraggable as j } from "vue-draggable-plus";
|
|
3
|
+
import $ from "./SortableItem.vue.js";
|
|
4
|
+
import J from "./LoaderBars.vue.js";
|
|
5
|
+
import W from "../search/v4/SearchV4.vue.js";
|
|
6
|
+
import X from "../typography/v4/Typography.vue.js";
|
|
7
|
+
import { useVModel as Y } from "@vueuse/core";
|
|
8
|
+
import { matchString as N } from "../../utils/search.js";
|
|
9
|
+
import { useTestIdAttrs as Z } from "../../utils/testIds.js";
|
|
10
|
+
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
11
|
+
import { useDraggableHelpers as _ } from "./composables/useDraggableHelpers.js";
|
|
12
|
+
import { DRAGGABLE_HANDLE_SELECTOR as ee, DRAGGABLE_AREA_SELECTOR as le } from "./consts.js";
|
|
12
13
|
const te = {
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "sortable-list-container"
|
|
15
|
-
},
|
|
16
|
+
}, ae = {
|
|
16
17
|
key: 3,
|
|
17
18
|
class: "empty-state-title"
|
|
18
|
-
},
|
|
19
|
+
}, me = /* @__PURE__ */ M({
|
|
19
20
|
__name: "SortableList",
|
|
20
21
|
props: {
|
|
21
22
|
items: { default: () => [] },
|
|
22
|
-
displayValue: { type: Function, default: (
|
|
23
|
+
displayValue: { type: Function, default: (a) => a.displayText || a.toString() },
|
|
23
24
|
openId: { default: null },
|
|
24
25
|
selectedId: { default: null },
|
|
25
26
|
selectedChildId: { default: null },
|
|
27
|
+
variant: { default: "default" },
|
|
28
|
+
draggableArea: { default: "handle" },
|
|
26
29
|
search: { default: null },
|
|
27
30
|
showSearch: { type: Boolean, default: !1 },
|
|
28
31
|
searchPlaceholder: { default: "Search" },
|
|
@@ -36,144 +39,139 @@ const te = {
|
|
|
36
39
|
testId: { default: "" }
|
|
37
40
|
},
|
|
38
41
|
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
"
|
|
42
|
+
setup(a, { emit: n }) {
|
|
43
|
+
const r = a;
|
|
44
|
+
P((l) => ({
|
|
45
|
+
"0d58eb02": a.zIndexBase
|
|
43
46
|
}));
|
|
44
|
-
const y =
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
}) :
|
|
47
|
+
const y = z(), i = Y(r, "search", n), b = g(() => !!i.value?.trim()), C = g(() => b.value ? r.items.filter((l) => {
|
|
48
|
+
const d = l.children || [], e = i.value;
|
|
49
|
+
return r.searchHandler ? r.searchHandler(l, e) : N(l.displayText, e) || // match parent item
|
|
50
|
+
d.some((o) => N(o.displayText, e));
|
|
51
|
+
}) : r.items), h = g({
|
|
49
52
|
get() {
|
|
50
|
-
return C.value.filter((
|
|
53
|
+
return C.value.filter((l) => !l.isLocked);
|
|
51
54
|
},
|
|
52
|
-
set(
|
|
53
|
-
n("update:items", [...
|
|
55
|
+
set(l) {
|
|
56
|
+
n("update:items", [...l, ...k.value]);
|
|
54
57
|
}
|
|
55
|
-
}),
|
|
56
|
-
() => C.value.filter((
|
|
57
|
-
),
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, w = (t, a) => {
|
|
69
|
-
n("update:selectedChildId", t.id), n("update:selectedId", a.id), n("update:openId", a.id);
|
|
70
|
-
}, T = ee(i.testId, v);
|
|
71
|
-
return (t, a) => (s(), r("div", V({ class: "sortable-list-and-header-container" }, l(T)[l(v).CONTAINER]), [
|
|
72
|
-
l(y).header || d.showSearch ? (s(), r("div", {
|
|
58
|
+
}), k = g(
|
|
59
|
+
() => C.value.filter((l) => l.isLocked)
|
|
60
|
+
), G = g(
|
|
61
|
+
() => r.draggableArea === "handle" ? ee : le
|
|
62
|
+
), { onDragStart: O, onDragEnd: q, draggingInProgress: F } = _(n), A = (l) => (b.value || l.id === r.openId) && !F.value, E = (l, d) => {
|
|
63
|
+
d ? n("update:openId", l.id) : n("update:openId", null);
|
|
64
|
+
}, m = (l) => l.id === r.selectedId, V = (l) => {
|
|
65
|
+
n("update:selectedId", l.id), n("update:selectedChildId", null);
|
|
66
|
+
}, B = (l, d) => {
|
|
67
|
+
n("update:selectedChildId", l.id), n("update:selectedId", d.id), n("update:openId", d.id);
|
|
68
|
+
}, L = Z(r.testId, I);
|
|
69
|
+
return (l, d) => (s(), u("div", T({ class: "sortable-list-and-header-container" }, t(L)[t(I).CONTAINER]), [
|
|
70
|
+
t(y).header || a.showSearch ? (s(), u("div", {
|
|
73
71
|
key: 0,
|
|
74
|
-
class:
|
|
72
|
+
class: U(["header-container", { sticky: a.isSticky }])
|
|
75
73
|
}, [
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
t(y).header ? f(l.$slots, "header", { key: 0 }, void 0, !0) : c("", !0),
|
|
75
|
+
a.showSearch ? (s(), S(t(W), {
|
|
78
76
|
key: 1,
|
|
79
|
-
modelValue:
|
|
80
|
-
"onUpdate:modelValue":
|
|
81
|
-
placeholder:
|
|
82
|
-
"test-id":
|
|
83
|
-
onOnClear:
|
|
84
|
-
}, null, 8, ["modelValue", "placeholder", "test-id"])) :
|
|
85
|
-
], 2)) :
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]))), 128))
|
|
94
|
-
])
|
|
95
|
-
], !0) : (s(), r("div", te, [
|
|
96
|
-
l(f).length ? (s(), p(l(W), V({
|
|
77
|
+
modelValue: t(i),
|
|
78
|
+
"onUpdate:modelValue": d[0] || (d[0] = (e) => x(i) ? i.value = e : null),
|
|
79
|
+
placeholder: a.searchPlaceholder,
|
|
80
|
+
"test-id": a.testId,
|
|
81
|
+
onOnClear: d[1] || (d[1] = (e) => n("clearSearch"))
|
|
82
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : c("", !0)
|
|
83
|
+
], 2)) : c("", !0),
|
|
84
|
+
a.isLoading ? f(l.$slots, "loader", { key: 2 }, () => [
|
|
85
|
+
w(J, {
|
|
86
|
+
"loading-row-count": a.loadingRowCount,
|
|
87
|
+
variant: a.variant
|
|
88
|
+
}, null, 8, ["loading-row-count", "variant"])
|
|
89
|
+
], !0) : (s(), u("div", te, [
|
|
90
|
+
t(h).length ? (s(), S(t(j), T({
|
|
97
91
|
key: 0,
|
|
98
|
-
modelValue:
|
|
99
|
-
"onUpdate:modelValue":
|
|
92
|
+
modelValue: t(h),
|
|
93
|
+
"onUpdate:modelValue": d[2] || (d[2] = (e) => x(h) ? h.value = e : null),
|
|
100
94
|
class: "sortable-list",
|
|
101
95
|
filter: ".expand-icon",
|
|
102
96
|
animation: 150,
|
|
103
|
-
handle:
|
|
104
|
-
disabled:
|
|
105
|
-
},
|
|
106
|
-
onStart:
|
|
107
|
-
onEnd:
|
|
97
|
+
handle: t(G),
|
|
98
|
+
disabled: t(b)
|
|
99
|
+
}, t(L)[t(I).DRAGGABLE_LIST], {
|
|
100
|
+
onStart: t(O),
|
|
101
|
+
onEnd: t(q)
|
|
108
102
|
}), {
|
|
109
|
-
default:
|
|
110
|
-
(s(!0),
|
|
103
|
+
default: p(() => [
|
|
104
|
+
(s(!0), u(D, null, H(t(h), (e, o) => (s(), S($, {
|
|
111
105
|
key: e.id,
|
|
112
106
|
"data-id": e.id,
|
|
113
107
|
item: e,
|
|
114
108
|
index: o,
|
|
115
|
-
"is-open":
|
|
109
|
+
"is-open": A(e),
|
|
116
110
|
"is-selected": m(e),
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"search-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
"is-disabled": !!e.isDisabled,
|
|
112
|
+
"selected-child-id": m(e) ? a.selectedChildId : null,
|
|
113
|
+
"display-value": a.displayValue,
|
|
114
|
+
"search-query": t(i),
|
|
115
|
+
"search-handler": a.searchHandler,
|
|
116
|
+
variant: a.variant,
|
|
117
|
+
"draggable-area": a.draggableArea,
|
|
118
|
+
onToggle: (v) => E(e, v),
|
|
119
|
+
onSelect: (v) => V(e),
|
|
120
|
+
onSelectChild: (v) => B(v, e)
|
|
121
|
+
}, R({ _: 2 }, [
|
|
122
|
+
t(y).menu ? {
|
|
126
123
|
name: "menu",
|
|
127
|
-
fn:
|
|
128
|
-
|
|
124
|
+
fn: p(() => [
|
|
125
|
+
f(l.$slots, "menu", { item: e }, void 0, !0)
|
|
129
126
|
]),
|
|
130
127
|
key: "0"
|
|
131
128
|
} : void 0
|
|
132
|
-
]), 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
129
|
+
]), 1032, ["data-id", "item", "index", "is-open", "is-selected", "is-disabled", "selected-child-id", "display-value", "search-query", "search-handler", "variant", "draggable-area", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
133
130
|
]),
|
|
134
131
|
_: 3
|
|
135
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
136
|
-
|
|
132
|
+
}, 16, ["modelValue", "handle", "disabled", "onStart", "onEnd"])) : c("", !0),
|
|
133
|
+
t(k).length ? (s(), u("div", T({
|
|
137
134
|
key: 1,
|
|
138
135
|
class: "locked-list"
|
|
139
|
-
},
|
|
140
|
-
(s(!0),
|
|
136
|
+
}, t(L)[t(I).LOCKED_LIST]), [
|
|
137
|
+
(s(!0), u(D, null, H(t(k), (e) => (s(), S($, {
|
|
141
138
|
key: e.id,
|
|
142
139
|
item: e,
|
|
143
|
-
"is-open":
|
|
140
|
+
"is-open": A(e),
|
|
144
141
|
"is-selected": m(e),
|
|
145
|
-
"selected-child-id": m(e) ?
|
|
146
|
-
"display-value":
|
|
147
|
-
"search-query":
|
|
148
|
-
"on-search":
|
|
149
|
-
"child-list-max-height":
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
"selected-child-id": m(e) ? a.selectedChildId : null,
|
|
143
|
+
"display-value": a.displayValue,
|
|
144
|
+
"search-query": t(i),
|
|
145
|
+
"on-search": a.searchHandler,
|
|
146
|
+
"child-list-max-height": a.childListMaxHeight,
|
|
147
|
+
variant: a.variant,
|
|
148
|
+
onToggle: (o) => E(e, o),
|
|
149
|
+
onSelect: (o) => V(e),
|
|
150
|
+
onSelectChild: (o) => B(o, e)
|
|
151
|
+
}, R({ _: 2 }, [
|
|
152
|
+
t(y).menu ? {
|
|
155
153
|
name: "menu",
|
|
156
|
-
fn:
|
|
157
|
-
|
|
154
|
+
fn: p(() => [
|
|
155
|
+
f(l.$slots, "menu", { item: e }, void 0, !0)
|
|
158
156
|
]),
|
|
159
157
|
key: "0"
|
|
160
158
|
} : void 0
|
|
161
|
-
]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "child-list-max-height", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
162
|
-
], 16)) :
|
|
159
|
+
]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "child-list-max-height", "variant", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
160
|
+
], 16)) : c("", !0)
|
|
163
161
|
])),
|
|
164
|
-
!
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
default:
|
|
168
|
-
|
|
162
|
+
!t(C).length && !a.isLoading ? (s(), u("div", ae, [
|
|
163
|
+
f(l.$slots, "empty-state", {}, () => [
|
|
164
|
+
w(t(X), { variant: "body2" }, {
|
|
165
|
+
default: p(() => [
|
|
166
|
+
K(Q(a.emptyStateTitle), 1)
|
|
169
167
|
]),
|
|
170
168
|
_: 1
|
|
171
169
|
})
|
|
172
170
|
], !0)
|
|
173
|
-
])) :
|
|
171
|
+
])) : c("", !0)
|
|
174
172
|
], 16));
|
|
175
173
|
}
|
|
176
174
|
});
|
|
177
175
|
export {
|
|
178
|
-
|
|
176
|
+
me as default
|
|
179
177
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { SortableListItem } from '@/components/sortableList/SortableList.types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
items: SortableListItem[];
|
|
4
|
+
displayValue?: (item: SortableListItem) => string;
|
|
5
|
+
openId?: string | number;
|
|
6
|
+
selectedChildPerItem?: Record<string | number, string | number>;
|
|
7
|
+
variant?: "default" | "compact";
|
|
8
|
+
draggableArea?: "handle" | "full";
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
loadingRowCount?: number;
|
|
11
|
+
alwaysVisibleCount?: number;
|
|
12
|
+
zIndexBase?: number;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}>, {
|
|
15
|
+
items: () => any[];
|
|
16
|
+
displayValue: (item: SortableListItem) => string;
|
|
17
|
+
openId: any;
|
|
18
|
+
selectedChildPerItem: () => {};
|
|
19
|
+
alwaysVisibleCount: any;
|
|
20
|
+
variant: string;
|
|
21
|
+
draggableArea: string;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
loadingRowCount: number;
|
|
24
|
+
zIndexBase: number;
|
|
25
|
+
testId: string;
|
|
26
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
sortableItemDragged: (event: {
|
|
28
|
+
id: string;
|
|
29
|
+
newIndex: number;
|
|
30
|
+
}) => void;
|
|
31
|
+
"update:items": (items: SortableListItem[]) => void;
|
|
32
|
+
"update:openId": (id: string | number) => void;
|
|
33
|
+
"update:selectedChildPerItem": (value: Record<string | number, string | number>) => void;
|
|
34
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
35
|
+
items: SortableListItem[];
|
|
36
|
+
displayValue?: (item: SortableListItem) => string;
|
|
37
|
+
openId?: string | number;
|
|
38
|
+
selectedChildPerItem?: Record<string | number, string | number>;
|
|
39
|
+
variant?: "default" | "compact";
|
|
40
|
+
draggableArea?: "handle" | "full";
|
|
41
|
+
isLoading?: boolean;
|
|
42
|
+
loadingRowCount?: number;
|
|
43
|
+
alwaysVisibleCount?: number;
|
|
44
|
+
zIndexBase?: number;
|
|
45
|
+
testId?: string;
|
|
46
|
+
}>, {
|
|
47
|
+
items: () => any[];
|
|
48
|
+
displayValue: (item: SortableListItem) => string;
|
|
49
|
+
openId: any;
|
|
50
|
+
selectedChildPerItem: () => {};
|
|
51
|
+
alwaysVisibleCount: any;
|
|
52
|
+
variant: string;
|
|
53
|
+
draggableArea: string;
|
|
54
|
+
isLoading: boolean;
|
|
55
|
+
loadingRowCount: number;
|
|
56
|
+
zIndexBase: number;
|
|
57
|
+
testId: string;
|
|
58
|
+
}>>> & {
|
|
59
|
+
onSortableItemDragged?: (event: {
|
|
60
|
+
id: string;
|
|
61
|
+
newIndex: number;
|
|
62
|
+
}) => any;
|
|
63
|
+
"onUpdate:items"?: (items: SortableListItem[]) => any;
|
|
64
|
+
"onUpdate:openId"?: (id: string | number) => any;
|
|
65
|
+
"onUpdate:selectedChildPerItem"?: (value: Record<string | number, string | number>) => any;
|
|
66
|
+
}, {
|
|
67
|
+
testId: string;
|
|
68
|
+
variant: "default" | "compact";
|
|
69
|
+
isLoading: boolean;
|
|
70
|
+
displayValue: (item: SortableListItem) => string;
|
|
71
|
+
items: SortableListItem[];
|
|
72
|
+
draggableArea: "handle" | "full";
|
|
73
|
+
loadingRowCount: number;
|
|
74
|
+
openId: string | number;
|
|
75
|
+
selectedChildPerItem: Record<string | number, string | number>;
|
|
76
|
+
alwaysVisibleCount: number;
|
|
77
|
+
zIndexBase: number;
|
|
78
|
+
}>, {
|
|
79
|
+
header?(_: {}): any;
|
|
80
|
+
menu?(_: {
|
|
81
|
+
item: SortableListItem;
|
|
82
|
+
}): any;
|
|
83
|
+
loader?(_: {}): any;
|
|
84
|
+
}>;
|
|
85
|
+
export default _default;
|
|
86
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
87
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
88
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
89
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
90
|
+
} : {
|
|
91
|
+
type: import('vue').PropType<T[K]>;
|
|
92
|
+
required: true;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
type __VLS_WithDefaults<P, D> = {
|
|
96
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
97
|
+
default: D[K];
|
|
98
|
+
}> : P[K];
|
|
99
|
+
};
|
|
100
|
+
type __VLS_Prettify<T> = {
|
|
101
|
+
[K in keyof T]: T[K];
|
|
102
|
+
} & {};
|
|
103
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
104
|
+
new (): {
|
|
105
|
+
$slots: S;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./SortableSelectableList.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableSelectableList.vue_vue_type_style_index_0_scoped_40b0a4de_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-40b0a4de"]]);
|
|
5
|
+
export {
|
|
6
|
+
a as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import "../../SortableSelectableList.vue_vue_type_style_index_0_scoped_40b0a4de_lang.css"; import { defineComponent as x, useCssVars as G, useSlots as N, ref as O, computed as u, watch as H, openBlock as s, createElementBlock as g, mergeProps as w, unref as l, renderSlot as b, createCommentVNode as c, createBlock as C, isRef as S, withCtx as V, Fragment as $, renderList as z, createSlots as F, createVNode as M } from "vue";
|
|
2
|
+
import { VueDraggable as U } from "vue-draggable-plus";
|
|
3
|
+
import j from "./SortableItem.vue.js";
|
|
4
|
+
import { useTestIdAttrs as q } from "../../utils/testIds.js";
|
|
5
|
+
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
6
|
+
import { useDraggableHelpers as J } from "./composables/useDraggableHelpers.js";
|
|
7
|
+
import K from "./LoaderBars.vue.js";
|
|
8
|
+
import Q from "../columnConfigurator/ShowMoreLink.vue.js";
|
|
9
|
+
import { DRAGGABLE_HANDLE_SELECTOR as W, DRAGGABLE_AREA_SELECTOR as X } from "./consts.js";
|
|
10
|
+
const Y = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "header-container"
|
|
13
|
+
}, Z = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "sortable-list-container"
|
|
16
|
+
}, re = /* @__PURE__ */ x({
|
|
17
|
+
__name: "SortableSelectableList",
|
|
18
|
+
props: {
|
|
19
|
+
items: { default: () => [] },
|
|
20
|
+
displayValue: { type: Function, default: (n) => n.displayText || n.toString() },
|
|
21
|
+
openId: { default: null },
|
|
22
|
+
selectedChildPerItem: { default: () => ({}) },
|
|
23
|
+
variant: { default: "default" },
|
|
24
|
+
draggableArea: { default: "handle" },
|
|
25
|
+
isLoading: { type: Boolean, default: !1 },
|
|
26
|
+
loadingRowCount: { default: 3 },
|
|
27
|
+
alwaysVisibleCount: { default: null },
|
|
28
|
+
zIndexBase: { default: 100 },
|
|
29
|
+
testId: { default: "" }
|
|
30
|
+
},
|
|
31
|
+
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedChildPerItem"],
|
|
32
|
+
setup(n, { emit: o }) {
|
|
33
|
+
const t = n;
|
|
34
|
+
G((e) => ({
|
|
35
|
+
"3cf7ee9d": n.zIndexBase
|
|
36
|
+
}));
|
|
37
|
+
const f = N(), L = (e) => {
|
|
38
|
+
if (!e.children)
|
|
39
|
+
return t.displayValue(e);
|
|
40
|
+
const d = t.selectedChildPerItem[e.id] ?? null, a = e.children.find((h) => h.id === d);
|
|
41
|
+
return a ? t.displayValue(a) : t.displayValue(e);
|
|
42
|
+
}, i = O(!1), m = u({
|
|
43
|
+
get: () => !i.value,
|
|
44
|
+
set: (e) => i.value = !e
|
|
45
|
+
}), y = u(() => {
|
|
46
|
+
const e = t.alwaysVisibleCount ?? 0;
|
|
47
|
+
return t.items?.length > e;
|
|
48
|
+
});
|
|
49
|
+
H(y, (e, d) => {
|
|
50
|
+
d === !0 && e === !1 && (i.value = !1);
|
|
51
|
+
});
|
|
52
|
+
const r = u({
|
|
53
|
+
get() {
|
|
54
|
+
return i.value && t.alwaysVisibleCount ? t.items.slice(0, t.alwaysVisibleCount) : t.items;
|
|
55
|
+
},
|
|
56
|
+
set(e) {
|
|
57
|
+
o("update:items", [...e, ...A.value]);
|
|
58
|
+
}
|
|
59
|
+
}), A = u(() => i.value ? t.alwaysVisibleCount ? t.items.slice(t.alwaysVisibleCount) : [] : []), E = u(
|
|
60
|
+
() => t.draggableArea === "handle" ? W : X
|
|
61
|
+
), { onDragStart: k, onDragEnd: B, draggingInProgress: T } = J(o), D = (e) => e.id === t.openId && !T.value, R = (e, d) => {
|
|
62
|
+
d ? o("update:openId", e.id) : o("update:openId", null);
|
|
63
|
+
}, P = (e, d) => {
|
|
64
|
+
o("update:selectedChildPerItem", {
|
|
65
|
+
...t.selectedChildPerItem,
|
|
66
|
+
[d.id]: e.id
|
|
67
|
+
}), o("update:openId", d.id);
|
|
68
|
+
}, v = q(t.testId, I);
|
|
69
|
+
return (e, d) => (s(), g("div", w({ class: "sortable-selectable-list" }, l(v)[l(I).CONTAINER]), [
|
|
70
|
+
l(f).header ? (s(), g("div", Y, [
|
|
71
|
+
l(f).header ? b(e.$slots, "header", { key: 0 }, void 0, !0) : c("", !0)
|
|
72
|
+
])) : c("", !0),
|
|
73
|
+
l(r).length && !n.isLoading ? (s(), g("div", Z, [
|
|
74
|
+
l(r).length ? (s(), C(l(U), w({
|
|
75
|
+
key: 0,
|
|
76
|
+
modelValue: l(r),
|
|
77
|
+
"onUpdate:modelValue": d[0] || (d[0] = (a) => S(r) ? r.value = a : null),
|
|
78
|
+
class: "sortable-list",
|
|
79
|
+
filter: ".expand-icon",
|
|
80
|
+
animation: 150,
|
|
81
|
+
handle: l(E)
|
|
82
|
+
}, l(v)[l(I).DRAGGABLE_LIST], {
|
|
83
|
+
onStart: l(k),
|
|
84
|
+
onEnd: l(B)
|
|
85
|
+
}), {
|
|
86
|
+
default: V(() => [
|
|
87
|
+
(s(!0), g($, null, z(l(r), (a, h) => (s(), C(j, {
|
|
88
|
+
key: a.id,
|
|
89
|
+
"data-id": a.id,
|
|
90
|
+
item: a,
|
|
91
|
+
index: h,
|
|
92
|
+
"is-open": D(a),
|
|
93
|
+
"is-disabled": !!a.isDisabled,
|
|
94
|
+
"selected-child-id": n.selectedChildPerItem[a.id] ?? null,
|
|
95
|
+
"display-value": L,
|
|
96
|
+
variant: n.variant,
|
|
97
|
+
"draggable-area": n.draggableArea,
|
|
98
|
+
onToggle: (p) => R(a, p),
|
|
99
|
+
onSelectChild: (p) => P(p, a)
|
|
100
|
+
}, F({ _: 2 }, [
|
|
101
|
+
l(f).menu ? {
|
|
102
|
+
name: "menu",
|
|
103
|
+
fn: V(() => [
|
|
104
|
+
b(e.$slots, "menu", { item: a }, void 0, !0)
|
|
105
|
+
]),
|
|
106
|
+
key: "0"
|
|
107
|
+
} : void 0
|
|
108
|
+
]), 1032, ["data-id", "item", "index", "is-open", "is-disabled", "selected-child-id", "variant", "draggable-area", "onToggle", "onSelectChild"]))), 128))
|
|
109
|
+
]),
|
|
110
|
+
_: 3
|
|
111
|
+
}, 16, ["modelValue", "handle", "onStart", "onEnd"])) : c("", !0),
|
|
112
|
+
l(y) ? (s(), C(Q, {
|
|
113
|
+
key: 1,
|
|
114
|
+
"all-shown": l(m),
|
|
115
|
+
"onUpdate:all-shown": d[1] || (d[1] = (a) => S(m) ? m.value = a : null)
|
|
116
|
+
}, null, 8, ["all-shown"])) : c("", !0)
|
|
117
|
+
])) : n.isLoading ? b(e.$slots, "loader", { key: 2 }, () => [
|
|
118
|
+
M(K, {
|
|
119
|
+
"loading-row-count": n.loadingRowCount,
|
|
120
|
+
variant: n.variant
|
|
121
|
+
}, null, 8, ["loading-row-count", "variant"])
|
|
122
|
+
], !0) : c("", !0)
|
|
123
|
+
], 16));
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
export {
|
|
127
|
+
re as default
|
|
128
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ref as d } from "vue";
|
|
2
|
+
import { DRAG_CURSOR_CSS_CLASS as r } from "../consts.js";
|
|
3
|
+
const u = (a) => {
|
|
4
|
+
const t = d(!1);
|
|
5
|
+
return {
|
|
6
|
+
onDragStart: (e) => {
|
|
7
|
+
t.value = !0, setTimeout(() => e.target.classList.add(r), 50);
|
|
8
|
+
},
|
|
9
|
+
onDragEnd: (e) => {
|
|
10
|
+
const { target: s, item: o, newIndex: n } = e;
|
|
11
|
+
t.value = !1, s.classList.remove(r);
|
|
12
|
+
const g = o.attributes["data-id"]?.value;
|
|
13
|
+
a("sortableItemDragged", { id: g, newIndex: n });
|
|
14
|
+
},
|
|
15
|
+
draggingInProgress: t
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
u as useDraggableHelpers
|
|
20
|
+
};
|