@ironsource/shared-ui 1.4.3-rc.3 → 1.4.3-rc.5

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.
Files changed (33) hide show
  1. package/Editable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  2. package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  3. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  4. package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  5. package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  6. package/components/button/index.d.ts +6 -6
  7. package/components/dateRange/consts.d.ts +5 -0
  8. package/components/dateRange/consts.vue.js +8 -0
  9. package/components/dateRange/index.d.ts +3 -3
  10. package/components/emptyState/index.d.ts +3 -3
  11. package/components/icon/Icon.vue.js +1 -0
  12. package/components/icon/icons/TableEdit.vue.d.ts +2 -0
  13. package/components/icon/icons/TableEdit.vue.js +24 -0
  14. package/components/icon/icons/index.d.ts +3 -3
  15. package/components/icon/icons/index.vue.js +3 -3
  16. package/components/icon/index.d.ts +3 -3
  17. package/components/includeExclude/IncludeExclude.vue.js +2 -2
  18. package/components/includeExclude/IncludeExcludeAppHeader.vue.js +7 -4
  19. package/components/includeExclude/IncludeExcludeChipFilter.vue.js +6 -4
  20. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +125 -0
  21. package/components/includeExclude/IncludeExcludeDragDrop.vue.js +610 -0
  22. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +43 -0
  23. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.js +126 -0
  24. package/components/includeExclude/includeExcludeMocks.d.ts +12 -0
  25. package/components/includeExclude/index.d.ts +228 -7
  26. package/components/includeExclude/index.vue.js +6 -0
  27. package/components/table/Table.types.d.ts +1 -0
  28. package/components/table/Table.vue.d.ts +13 -0
  29. package/components/table/Table.vue.js +33 -11
  30. package/components/table/index.d.ts +25 -0
  31. package/components/table-cells/Editable.vue.js +1 -1
  32. package/index.vue.js +3 -1
  33. package/package.json +3 -2
@@ -0,0 +1,610 @@
1
+ import { defineComponent, computed, ref, watch, provide, openBlock, createBlock, unref, withCtx, createElementVNode, renderSlot, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, createVNode, Transition, createElementBlock, mergeProps, Fragment, renderList, toRaw, isRef, nextTick } from 'vue';
2
+ import _sfc_main$1 from '../popover/Popover.vue.js';
3
+ import Button from '../button/Button.vue.js';
4
+ /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
5
+ /* empty css */import Text from '../typography/Text.vue.js';
6
+ /* empty css *//* empty css *//* empty css */import 'floating-vue';
7
+ /* empty css *//* empty css */import Search from '../search/Search.vue.js';
8
+ import Checkbox from '../checkbox/Checkbox.vue.js';
9
+ import Skeleton from '../skeleton/Skeleton.vue.js';
10
+ import EmptyState from '../emptyState/EmptyState.vue.js';
11
+ import { useToggle } from '../../composables/useToggle.vue.js';
12
+ import { IncludeExcludeContext } from './IncludeExcludeContext.vue.js';
13
+ import { onClickOutside, useClamp, useVirtualList } from '@vueuse/core';
14
+ import draggable from 'vuedraggable';
15
+ /* empty css */
16
+ import "../../IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_true_lang.css";
17
+ const _hoisted_1 = { class: "include-exclude-header" };
18
+ const _hoisted_2 = { class: "include-exclude-header-left-section" };
19
+ const _hoisted_3 = { class: "include-exclude-header-right-section" };
20
+ const _hoisted_4 = { class: "include-exclude-container-wrapper" };
21
+ const _hoisted_5 = {
22
+ key: 0,
23
+ class: "include-exclude-container"
24
+ };
25
+ const _hoisted_6 = {
26
+ key: 1,
27
+ class: "include-exclude-container"
28
+ };
29
+ const _hoisted_7 = { class: "include-exclude-list-wrapper" };
30
+ const _hoisted_8 = {
31
+ key: 1,
32
+ class: "loader-wrapper"
33
+ };
34
+ const _hoisted_9 = ["aria-selected", "aria-disabled", "onClick"];
35
+ const _hoisted_10 = ["onClick"];
36
+ const _hoisted_11 = { key: 1 };
37
+ const _hoisted_12 = { class: "loader-wrapper" };
38
+ const _hoisted_13 = { class: "include-exclude-selected-wrapper" };
39
+ const _hoisted_14 = {
40
+ key: 0,
41
+ class: "loader-wrapper"
42
+ };
43
+ const _hoisted_15 = { class: "include-exclude-selected-header-left" };
44
+ const _hoisted_16 = { class: "include-exclude-selected-header-right" };
45
+ const _hoisted_17 = { class: "drag-item" };
46
+ const _hoisted_18 = { key: 1 };
47
+ const _hoisted_19 = { class: "loader-wrapper" };
48
+ const _hoisted_20 = { class: "include-exclude-footer" };
49
+ const _hoisted_21 = { class: "include-exclude-footer-buttons" };
50
+ const _sfc_main = /* @__PURE__ */ defineComponent({
51
+ __name: "IncludeExcludeDragDrop",
52
+ props: {
53
+ titleText: { default: "" },
54
+ loading: { type: Boolean, default: false },
55
+ disabled: { type: Boolean, default: false },
56
+ modelValue: null,
57
+ clearable: { type: Boolean },
58
+ placement: { default: "bottom-start" },
59
+ options: null,
60
+ autoFocus: { type: Boolean, default: true },
61
+ onSearch: { type: Function, default: () => true },
62
+ searchPlaceholder: { default: "Search" },
63
+ isOnTop: { type: Boolean, default: false },
64
+ alwayesOpen: { type: Boolean, default: false },
65
+ defaultOpen: { type: Boolean, default: false },
66
+ showClearAll: { type: Boolean, default: true },
67
+ distance: { default: 0 },
68
+ distanceOffset: { default: 0 },
69
+ skiddingOffset: { default: 0 },
70
+ hasSubtitle: { type: Boolean, default: false },
71
+ keyField: null,
72
+ isDraggable: { type: Boolean, default: false },
73
+ draggableArgs: { default: null }
74
+ },
75
+ emits: ["update:modelValue", "changeDragDrop", "clickOutside"],
76
+ setup(__props, { emit }) {
77
+ const props = __props;
78
+ const scrollPrerenderedItems = 50;
79
+ const skeletonItems = 3;
80
+ const boxDistanceBottom = 6;
81
+ const OPTION_HEIGHT = 32;
82
+ const OPTION_WITH_SUBTITLE_HEIGHT = 48;
83
+ const popoverDistance = computed(() => {
84
+ const notTopDistance = props.placement?.includes("bottom") ? boxDistanceBottom : 0;
85
+ return props.isOnTop ? -buttonRef.value?.getBoundingClientRect().height : notTopDistance;
86
+ });
87
+ const listRef = ref(null);
88
+ const query = ref("");
89
+ const shouldResetAfterCancel = ref(false);
90
+ const buttonRef = ref(null);
91
+ const apply = ref(null);
92
+ const cancel = ref(null);
93
+ const inputRef = ref(null);
94
+ const searchRef = ref(null);
95
+ const activeOption = ref(null);
96
+ const selectedOptionRef = ref(props.modelValue);
97
+ const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay));
98
+ const selectedOption = computed({
99
+ get() {
100
+ return selectedOptionRef.value;
101
+ },
102
+ set(value) {
103
+ emit("update:modelValue", value);
104
+ }
105
+ });
106
+ const onCancel = () => {
107
+ if (selectedOption.value?.length !== props.options?.length) {
108
+ shouldResetAfterCancel.value = true;
109
+ }
110
+ toggleMenu(false);
111
+ };
112
+ watch(
113
+ () => props.modelValue,
114
+ () => {
115
+ selectedOptionRef.value = props.modelValue;
116
+ }
117
+ );
118
+ watch(
119
+ () => selectedOptionRef.value,
120
+ () => {
121
+ emit("update:modelValue", selectedOptionRef.value);
122
+ }
123
+ );
124
+ const selectedOptionFiltered = computed(() => {
125
+ return selectedOptionRef.value.filter(
126
+ (x) => props.onSearch(x, query.value)
127
+ );
128
+ });
129
+ const filteredOptionsWithoutGroup = computed(() => {
130
+ return filteredOptions.value.filter(
131
+ (option) => !option?.groupOption
132
+ );
133
+ });
134
+ const onApply = () => {
135
+ if (selectedOption.value?.length !== props.options?.length) {
136
+ selectedOption.value = selectedOptionRef.value;
137
+ }
138
+ toggleMenu(false);
139
+ };
140
+ const triggerAction = () => {
141
+ toggleMenu();
142
+ };
143
+ const clearSelections = () => {
144
+ selectedOptionRef.value = [];
145
+ };
146
+ const optionHeight = computed(() => {
147
+ return () => props.hasSubtitle ? OPTION_WITH_SUBTITLE_HEIGHT : OPTION_HEIGHT;
148
+ });
149
+ const isIn = computed(
150
+ () => (arr1, arr2) => arr1.every(
151
+ (val) => arr2.some((val2) => val2[props.keyField] === val[props.keyField])
152
+ )
153
+ );
154
+ const isAllFilteredSelected = computed(() => {
155
+ if (!open.value) {
156
+ return false;
157
+ }
158
+ const selected = selectedOptionRef.value;
159
+ const filtered = filteredOptionsWithoutGroup.value || filteredOptions.value;
160
+ if (selected === filtered) {
161
+ return true;
162
+ }
163
+ if (selected?.length !== filtered?.length) {
164
+ return false;
165
+ }
166
+ return isIn.value(selected, filtered) && isIn.value(filtered, selected);
167
+ });
168
+ const popoverWrapperRef = ref(null);
169
+ const [open, toggle] = useToggle({
170
+ disabled: props.disabled,
171
+ initialValue: props.defaultOpen
172
+ });
173
+ const afterClose = (delay = 300) => {
174
+ const isAllOptionsSelected = selectedOption.value?.length === props.options?.length;
175
+ nextTick(async () => {
176
+ if (isAllOptionsSelected) {
177
+ selectedOption.value = [];
178
+ }
179
+ await sleep(delay);
180
+ api.resetInput();
181
+ });
182
+ };
183
+ watch(
184
+ () => [open.value, searchRef?.value?.inputRef],
185
+ ([isOpen, searchInput]) => {
186
+ if (isOpen && searchInput) {
187
+ afterOpen();
188
+ }
189
+ }
190
+ );
191
+ const focusOnSearch = () => {
192
+ if (!props.autoFocus) {
193
+ return;
194
+ }
195
+ searchRef.value?.inputRef.focus();
196
+ };
197
+ const afterOpen = async (delay = 300) => {
198
+ await sleep(delay);
199
+ focusOnSearch();
200
+ };
201
+ const toggleMenu = (value) => {
202
+ if (props.disabled) {
203
+ return;
204
+ }
205
+ if (!value) {
206
+ afterClose();
207
+ }
208
+ toggle(value);
209
+ expandCollapseIds.value = [];
210
+ };
211
+ onClickOutside(popoverWrapperRef, () => {
212
+ if (open.value) {
213
+ onCancel();
214
+ emit("clickOutside", selectedOptionRef.value);
215
+ }
216
+ });
217
+ const optionsIds = ref([]);
218
+ const maxClamped = computed(() => {
219
+ return filteredOptions.value?.length - 1;
220
+ });
221
+ const queryChanged = (value) => {
222
+ query.value = value;
223
+ };
224
+ const activeIndex = useClamp(0, 0, maxClamped);
225
+ const onSelect = (option) => {
226
+ if (option?.groupOption) {
227
+ return;
228
+ }
229
+ inputRef.value?.focus();
230
+ const rawSelectedOption = selectedOptionRef.value;
231
+ if (rawSelectedOption.includes(option)) {
232
+ selectedOptionRef.value = rawSelectedOption.filter(
233
+ (item) => item !== option
234
+ );
235
+ } else {
236
+ selectedOptionRef.value = [.../* @__PURE__ */ new Set([...rawSelectedOption, option])];
237
+ }
238
+ };
239
+ const removeSelection = (option) => {
240
+ onSelect(option);
241
+ };
242
+ const api = {
243
+ toggle: toggleMenu,
244
+ disabled: props.disabled,
245
+ options: optionsIds,
246
+ clearable: props.clearable,
247
+ resetInput: () => {
248
+ queryChanged("");
249
+ if (inputRef.value) {
250
+ inputRef.value.value = "";
251
+ }
252
+ if (shouldResetAfterCancel.value) {
253
+ selectedOptionRef.value = props.modelValue;
254
+ shouldResetAfterCancel.value = false;
255
+ }
256
+ },
257
+ search: queryChanged,
258
+ select: onSelect,
259
+ activeIndex,
260
+ selectedOption,
261
+ activeOption,
262
+ listRef,
263
+ query,
264
+ open,
265
+ removeSelection
266
+ };
267
+ const toggleSelectAll = () => {
268
+ selectedOptionRef.value = selectedOptionRef.value?.length !== filteredOptionsWithoutGroup.value?.length ? filteredOptionsWithoutGroup.value : [];
269
+ setTimeout(() => {
270
+ scrollToEnd(selectedOptionRef.value.length);
271
+ }, 300);
272
+ };
273
+ provide(IncludeExcludeContext, api);
274
+ const filteredOptions = computed(() => {
275
+ if (!query.value?.length) {
276
+ return props.options;
277
+ }
278
+ return props.options?.filter((option) => props.onSearch(option, query.value));
279
+ });
280
+ const {
281
+ list: virtualOptions,
282
+ containerProps,
283
+ wrapperProps
284
+ } = useVirtualList(filteredOptions, {
285
+ itemHeight: optionHeight.value,
286
+ overscan: scrollPrerenderedItems
287
+ });
288
+ const {
289
+ list: virtualOptionsSelected,
290
+ containerProps: containerPropsSelected,
291
+ wrapperProps: wrapperPropsSelected,
292
+ scrollTo: scrollToEnd
293
+ } = useVirtualList(selectedOptionFiltered, {
294
+ itemHeight: optionHeight.value,
295
+ overscan: scrollPrerenderedItems
296
+ });
297
+ const onButtonKeydown = (event) => {
298
+ if (["Enter", " ", "Space"].includes(event.key)) {
299
+ toggleMenu();
300
+ return;
301
+ }
302
+ if (event.key === "ArrowUp") {
303
+ toggleMenu(false);
304
+ return;
305
+ }
306
+ if (event.key === "ArrowDown") {
307
+ toggleMenu(true);
308
+ event.preventDefault();
309
+ }
310
+ };
311
+ const expandCollapseIds = ref([]);
312
+ const isCollapsed = (option) => {
313
+ return expandCollapseIds.value.includes(option?.[props.keyField]);
314
+ };
315
+ const toggleCollapse = (option) => {
316
+ if (option.groupOption) {
317
+ option.groupOption.isCollapse = !option?.groupOption.isCollapse;
318
+ }
319
+ expandCollapseIds.value = virtualOptions.value.filter((item) => item?.data?.groupOption?.isCollapse).flatMap((item) => item?.data?.groupOption?.childOptionsIds || []);
320
+ };
321
+ const onChangeDragDrop = () => {
322
+ emit("changeDragDrop", virtualOptionsSelected.value);
323
+ };
324
+ return (_ctx, _cache) => {
325
+ return openBlock(), createBlock(unref(_sfc_main$1), {
326
+ distance: unref(popoverDistance) + __props.distanceOffset,
327
+ skidding: __props.skiddingOffset,
328
+ trigger: "managed",
329
+ open: unref(open) || __props.alwayesOpen,
330
+ placement: __props.placement
331
+ }, {
332
+ trigger: withCtx(() => [
333
+ createElementVNode("div", {
334
+ ref_key: "buttonRef",
335
+ ref: buttonRef,
336
+ class: "include-exclude-trigger",
337
+ tabindex: "0",
338
+ onClick: triggerAction,
339
+ onKeydown: onButtonKeydown
340
+ }, [
341
+ renderSlot(_ctx.$slots, "trigger", {}, () => [
342
+ createElementVNode("button", {
343
+ ref_key: "buttonRef",
344
+ ref: buttonRef
345
+ }, "Default trigger", 512)
346
+ ], true)
347
+ ], 544)
348
+ ]),
349
+ content: withCtx(() => [
350
+ createElementVNode("div", {
351
+ ref_key: "popoverWrapperRef",
352
+ ref: popoverWrapperRef,
353
+ class: normalizeClass(["include-exclude-content", {
354
+ "include-exclude-content-draggable": __props.isDraggable
355
+ }])
356
+ }, [
357
+ createElementVNode("div", _hoisted_1, [
358
+ createElementVNode("div", _hoisted_2, [
359
+ renderSlot(_ctx.$slots, "header-left-section", {}, () => [
360
+ __props.titleText ? (openBlock(), createBlock(unref(Text), {
361
+ key: 0,
362
+ class: "include-exclude-header-left-section-title",
363
+ size: "md",
364
+ strong: ""
365
+ }, {
366
+ default: withCtx(() => [
367
+ createTextVNode(toDisplayString(__props.titleText), 1)
368
+ ]),
369
+ _: 1
370
+ })) : createCommentVNode("", true)
371
+ ], true)
372
+ ]),
373
+ createElementVNode("div", _hoisted_3, [
374
+ renderSlot(_ctx.$slots, "header-right-section", {}, () => [
375
+ createVNode(unref(Search), {
376
+ ref_key: "searchRef",
377
+ ref: searchRef,
378
+ modelValue: query.value,
379
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
380
+ class: "include-exclude-header-right-section-search-input",
381
+ variant: "transparent",
382
+ placeholder: __props.searchPlaceholder,
383
+ disabled: __props.loading
384
+ }, null, 8, ["modelValue", "placeholder", "disabled"])
385
+ ], true)
386
+ ])
387
+ ]),
388
+ createElementVNode("div", _hoisted_4, [
389
+ createVNode(Transition, {
390
+ name: "switch",
391
+ mode: "out-in"
392
+ }, {
393
+ default: withCtx(() => [
394
+ !unref(filteredOptions)?.length && !__props.loading ? (openBlock(), createElementBlock("div", _hoisted_5, [
395
+ renderSlot(_ctx.$slots, "no-result", {}, () => [
396
+ createVNode(unref(EmptyState), {
397
+ size: "lg",
398
+ title: "No results found",
399
+ subtitle: "Try diffrent keyword",
400
+ "icon-width": 72,
401
+ "icon-height": 72
402
+ })
403
+ ], true)
404
+ ])) : (openBlock(), createElementBlock("div", _hoisted_6, [
405
+ createElementVNode("div", _hoisted_7, [
406
+ createElementVNode("div", {
407
+ class: normalizeClass(["include-exclude-list-header", {
408
+ "include-exclude-list-header-loading": __props.loading,
409
+ "include-exclude-list-header-loaded": !__props.loading
410
+ }])
411
+ }, [
412
+ !__props.loading ? (openBlock(), createBlock(unref(Checkbox), {
413
+ key: 0,
414
+ size: "sm",
415
+ "is-checked": unref(isAllFilteredSelected),
416
+ "is-indeterminate": unref(selectedOption)?.length > 0 && !unref(isAllFilteredSelected),
417
+ disabled: !unref(filteredOptions)?.length,
418
+ label: "Select all",
419
+ onClick: toggleSelectAll
420
+ }, null, 8, ["is-checked", "is-indeterminate", "disabled"])) : createCommentVNode("", true),
421
+ __props.loading ? (openBlock(), createElementBlock("div", _hoisted_8, [
422
+ createVNode(unref(Skeleton), {
423
+ class: "dot-skeleton",
424
+ round: ""
425
+ }),
426
+ createVNode(unref(Skeleton), { round: "" })
427
+ ])) : createCommentVNode("", true)
428
+ ], 2),
429
+ createElementVNode("div", mergeProps({ class: "include-exclude-list" }, unref(containerProps), {
430
+ class: {
431
+ "include-exclude-list-draggable": __props.isDraggable
432
+ }
433
+ }), [
434
+ !__props.loading ? (openBlock(), createElementBlock("ul", mergeProps({ key: 0 }, unref(wrapperProps), {
435
+ ref_key: "listRef",
436
+ ref: listRef,
437
+ tabindex: "1"
438
+ }), [
439
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualOptions), ({ data, index }) => {
440
+ return openBlock(), createElementBlock("li", {
441
+ key: index,
442
+ "aria-selected": toRaw(unref(selectedOption)) === data,
443
+ "aria-disabled": !!__props.disabled,
444
+ onClick: () => onSelect(data)
445
+ }, [
446
+ data.groupOption ? (openBlock(), createElementBlock("div", {
447
+ key: 0,
448
+ class: "option-collapse",
449
+ onClick: ($event) => toggleCollapse(data)
450
+ }, [
451
+ renderSlot(_ctx.$slots, "option-group", { option: data }, void 0, true)
452
+ ], 8, _hoisted_10)) : createCommentVNode("", true),
453
+ !data.groupOption && !isCollapsed(data) ? renderSlot(_ctx.$slots, "option", {
454
+ key: 1,
455
+ showCheckbox: true,
456
+ option: data,
457
+ selected: toRaw(unref(selectedOption)) === data,
458
+ active: toRaw(unref(activeIndex)) === index
459
+ }, void 0, true) : createCommentVNode("", true)
460
+ ], 8, _hoisted_9);
461
+ }), 128))
462
+ ], 16)) : createCommentVNode("", true),
463
+ __props.loading ? (openBlock(), createElementBlock("ul", _hoisted_11, [
464
+ (openBlock(), createElementBlock(Fragment, null, renderList(skeletonItems, (n) => {
465
+ return createElementVNode("li", {
466
+ key: n,
467
+ class: "include-exclude-list-item-skeleton"
468
+ }, [
469
+ createElementVNode("div", _hoisted_12, [
470
+ createVNode(unref(Skeleton), {
471
+ class: "dot-skeleton",
472
+ round: ""
473
+ }),
474
+ createVNode(unref(Skeleton), { round: "" })
475
+ ])
476
+ ]);
477
+ }), 64))
478
+ ])) : createCommentVNode("", true)
479
+ ], 16)
480
+ ]),
481
+ createElementVNode("div", _hoisted_13, [
482
+ createElementVNode("div", {
483
+ class: normalizeClass(["include-exclude-selected-header", {
484
+ "include-exclude-list-selected-header-loading": __props.loading,
485
+ "include-exclude-list-header-loaded": !__props.loading
486
+ }])
487
+ }, [
488
+ __props.loading ? (openBlock(), createElementBlock("div", _hoisted_14, [
489
+ createVNode(unref(Skeleton), { round: "" })
490
+ ])) : createCommentVNode("", true),
491
+ createElementVNode("div", _hoisted_15, [
492
+ !__props.loading ? (openBlock(), createBlock(unref(Text), {
493
+ key: 0,
494
+ class: "include-exclude-selected-header-left-selected",
495
+ size: "sm"
496
+ }, {
497
+ default: withCtx(() => [
498
+ createTextVNode(toDisplayString(unref(selectedOption)?.length) + " Selected", 1)
499
+ ]),
500
+ _: 1
501
+ })) : createCommentVNode("", true)
502
+ ]),
503
+ createElementVNode("div", _hoisted_16, [
504
+ renderSlot(_ctx.$slots, "selected-header-right", {}, () => [
505
+ unref(selectedOption)?.length && !__props.loading && __props.showClearAll ? (openBlock(), createBlock(unref(Button), {
506
+ key: 0,
507
+ variant: "link",
508
+ theme: "third",
509
+ size: "md",
510
+ strong: false,
511
+ onClick: clearSelections
512
+ }, {
513
+ default: withCtx(() => [
514
+ createTextVNode("Clear all")
515
+ ]),
516
+ _: 1
517
+ })) : createCommentVNode("", true)
518
+ ], true)
519
+ ])
520
+ ], 2),
521
+ createElementVNode("div", mergeProps({
522
+ class: ["include-exclude-selected-list", {
523
+ "include-exclude-list-draggable": __props.isDraggable
524
+ }]
525
+ }, unref(containerPropsSelected)), [
526
+ unref(selectedOption)?.length && !__props.loading && __props.isDraggable ? (openBlock(), createElementBlock("ul", mergeProps({ key: 0 }, unref(wrapperPropsSelected), {
527
+ ref: "SelectedlistRef",
528
+ tabindex: "2"
529
+ }), [
530
+ createVNode(unref(draggable), mergeProps({
531
+ modelValue: unref(virtualOptionsSelected),
532
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(virtualOptionsSelected) ? virtualOptionsSelected.value = $event : null)
533
+ }, __props.draggableArgs, { onChange: onChangeDragDrop }), {
534
+ item: withCtx(({ element }) => [
535
+ createElementVNode("div", _hoisted_17, [
536
+ renderSlot(_ctx.$slots, "selected_option_draggable", {
537
+ option: element.data,
538
+ selected: toRaw(unref(selectedOption)) === element.data,
539
+ active: toRaw(unref(activeIndex)) === element.data.draggableItemKey
540
+ }, void 0, true)
541
+ ])
542
+ ]),
543
+ _: 3
544
+ }, 16, ["modelValue"])
545
+ ], 16)) : createCommentVNode("", true),
546
+ __props.loading ? (openBlock(), createElementBlock("ul", _hoisted_18, [
547
+ (openBlock(), createElementBlock(Fragment, null, renderList(skeletonItems, (n) => {
548
+ return createElementVNode("li", {
549
+ key: n,
550
+ class: "include-exclude-list-item-skeleton"
551
+ }, [
552
+ createElementVNode("div", _hoisted_19, [
553
+ createVNode(unref(Skeleton), { round: "" })
554
+ ])
555
+ ]);
556
+ }), 64))
557
+ ])) : createCommentVNode("", true)
558
+ ], 16)
559
+ ])
560
+ ]))
561
+ ]),
562
+ _: 3
563
+ })
564
+ ]),
565
+ renderSlot(_ctx.$slots, "footer", {
566
+ handleApply: onApply,
567
+ handleCancel: onCancel
568
+ }, () => [
569
+ createElementVNode("div", _hoisted_20, [
570
+ createElementVNode("div", _hoisted_21, [
571
+ createVNode(unref(Button), {
572
+ ref_key: "cancel",
573
+ ref: cancel,
574
+ size: "sm",
575
+ variant: "border",
576
+ theme: "third",
577
+ text: "Cancel",
578
+ onClick: onCancel
579
+ }, {
580
+ default: withCtx(() => [
581
+ createTextVNode("Cancel")
582
+ ]),
583
+ _: 1
584
+ }, 512),
585
+ createVNode(unref(Button), {
586
+ ref_key: "apply",
587
+ ref: apply,
588
+ size: "sm",
589
+ theme: "primary",
590
+ text: "Apply",
591
+ onClick: onApply
592
+ }, {
593
+ default: withCtx(() => [
594
+ createTextVNode("Apply")
595
+ ]),
596
+ _: 1
597
+ }, 512)
598
+ ])
599
+ ])
600
+ ], true)
601
+ ], 2)
602
+ ]),
603
+ _: 3
604
+ }, 8, ["distance", "skidding", "open", "placement"]);
605
+ };
606
+ }
607
+ });
608
+ var IncludeExcludeDragDrop = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-22459799"]]);
609
+
610
+ export { IncludeExcludeDragDrop as default };
@@ -0,0 +1,43 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ option: unknown;
3
+ subtitle?: string;
4
+ disabled?: boolean;
5
+ clearable?: boolean;
6
+ titleText?: string;
7
+ }>, {
8
+ subtitle: string;
9
+ disabled: boolean;
10
+ clearable: boolean;
11
+ titleText: string;
12
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
13
+ option: unknown;
14
+ subtitle?: string;
15
+ disabled?: boolean;
16
+ clearable?: boolean;
17
+ titleText?: string;
18
+ }>, {
19
+ subtitle: string;
20
+ disabled: boolean;
21
+ clearable: boolean;
22
+ titleText: string;
23
+ }>>>, {
24
+ disabled: boolean;
25
+ subtitle: string;
26
+ clearable: boolean;
27
+ titleText: string;
28
+ }>;
29
+ export default _default;
30
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
+ type __VLS_TypePropsToRuntimeProps<T> = {
32
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
33
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
34
+ } : {
35
+ type: import('vue').PropType<T[K]>;
36
+ required: true;
37
+ };
38
+ };
39
+ type __VLS_WithDefaults<P, D> = {
40
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
41
+ default: D[K];
42
+ } : P[K];
43
+ };