@ironsource/shared-ui 2.1.11-rc.25 → 2.1.11-rc.27
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/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +1 -0
- package/README.md +4 -15
- package/components/dropdown/common/Dropdown.common.js +141 -135
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +6 -6
- package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +36 -32
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +10 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +100 -77
- package/components/dropdown/v4/DropdownV4.vue.d.ts +11 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +27 -25
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +2 -2
- package/components/dropdown/v4/index.d.ts +81 -2
- package/components/icon/v4/consts.d.ts +1 -1
- package/components/icon/v4/consts.js +1 -1
- package/components/table/common/Table.common.js +48 -48
- package/components/table/v3/Table.vue.d.ts +1 -1
- package/components/table/v3/index.d.ts +5 -5
- package/components/table/v4/DataGrid.vue.d.ts +6 -1
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +124 -117
- package/components/table/v4/index.d.ts +25 -6
- package/design-foundation.stories/icons/iconsData.d.ts +1 -1
- package/index.d.ts +222 -26
- package/index.js +1 -1
- package/mocks/words.d.ts +1 -1
- package/package.json +1 -1
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_ba28c717_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3d7ef976_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_b1bde483_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_df830bf5_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.button-trigger.open[data-v-f9a13e27]{background:var(--action-selected);outline:2px solid var(--action-active);outline-offset:-2px;transition:outline 0s}.button-trigger.open[data-v-f9a13e27]:hover{background:var(--action-selected)}.button-trigger .label[data-v-f9a13e27]{white-space:nowrap}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chip-trigger[data-v-039dd922]{border:1px solid var(--default-outlined-border);padding:.3125rem .3125rem .3125rem .4375rem;border-radius:100px;cursor:pointer;user-select:none;display:inline-flex;max-width:250px}.chip-trigger[data-v-039dd922]:hover{border-color:var(--action-active);background:var(--action-selected)}.chip-trigger.active[data-v-039dd922]{border:none;background:var(--primary-light);padding:.375rem .375rem .375rem .5rem}.chip-trigger.active .chip-trigger--content[data-v-039dd922]{color:var(--primary-contrast-text)}.chip-trigger.active[data-v-039dd922]:hover{border:.0625rem solid var(--primary-main-50-p);padding:.3125rem .3125rem .3125rem .4375rem}.chip-trigger.open[data-v-039dd922]{border:.125rem solid var(--action-active);padding:.25rem .25rem .25rem .375rem;background:var(--action-selected)}.chip-trigger.open.active[data-v-039dd922]{border:.125rem solid var(--primary-main-50-p);background:var(--primary-light);padding:.25rem .25rem .25rem .375rem}.chip-trigger.disabled[data-v-039dd922]{cursor:auto}.chip-trigger--content[data-v-039dd922]{color:var(--text-primary);display:flex;column-gap:4px;width:100%}.chip-trigger--content .x-circle-wrapper[data-v-039dd922]{color:var(--primary-dark)}.chip-trigger--content .x-circle-wrapper[data-v-039dd922]:hover{color:var(--primary-darker)}.chip-trigger--text[data-v-039dd922]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left;width:100%}.chip-trigger--icon[data-v-039dd922]{color:var(--action-active)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-list-area[data-v-2aee12ad]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-2aee12ad]{width:100%}.contain-accept[data-v-2aee12ad]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-2aee12ad]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-2aee12ad]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sticky[data-v-2406226b]{position:sticky}.table-container[data-v-2406226b]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-2406226b]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-2406226b]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-2406226b]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-2406226b]{width:13.75rem}.table-header.isStickyHeader[data-v-2406226b]{z-index:calc(var(--e46a2c5a) + 3);top:0}.table-head-container[data-v-2406226b]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-2406226b]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-2406226b]{display:inline-table}.table-header-actions[data-v-2406226b]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-2406226b]{position:relative}.table-row.loading[data-v-2406226b]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-2406226b]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-2406226b]{border-bottom:none}.expanded-row[data-v-2406226b]{grid-column:var(--3c10b207);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-2406226b]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md);border-collapse:collapse;border-spacing:0}table.hasFooter[data-v-2406226b]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-2406226b],table th[data-v-2406226b]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-2406226b]:first-of-type,table th[data-v-2406226b]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-2406226b]:last-of-type,table th[data-v-2406226b]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-2406226b],table th.expand-toggle-cell[data-v-2406226b]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-2406226b]{border-bottom:none;z-index:calc(var(--e46a2c5a) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-2406226b]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--42785f40)}table>thead>tr>th[data-v-2406226b]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-2406226b]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-2406226b]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-2406226b]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-2406226b]{cursor:pointer}table>thead.sticky[data-v-2406226b]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-2406226b]{z-index:calc(var(--e46a2c5a) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-2406226b]{display:block}table>tbody>*>tr[data-v-2406226b]{background-color:var(--background-default);min-height:var(--403d20c8);height:auto;display:grid;align-items:center;grid-template-columns:var(--42785f40)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-2406226b]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-2406226b],table>tbody>*>tr.activeMenu>td[data-v-2406226b]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-2406226b]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--403d20c8);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-2406226b]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-2406226b]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-2406226b]{justify-content:flex-end;text-align:right}.section-container[data-v-2406226b]{left:0}.sections[data-v-2406226b]{display:flex}.section[data-v-2406226b]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-2406226b]{width:100%}.empty-state[data-v-2406226b]{min-height:250px}.floating-row[data-v-2406226b]{display:flex;inset:0;pointer-events:none;position:absolute;z-index:calc(var(--e46a2c5a) + 1)}.floating-row *[data-v-2406226b-s]{pointer-events:auto}.checkbox-cell-sticky[data-v-2406226b]{position:sticky;left:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.v-enter-active[data-v-6466948d],.v-leave-active[data-v-6466948d]{transition:opacity .25s ease}ol[data-v-6466948d],ul[data-v-6466948d],menu[data-v-6466948d]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-6466948d],.dropdown.full-width .button__container[data-v-6466948d]{width:100%}.dropdown-list-wrapper[data-v-6466948d]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-6466948d]{padding:.5rem}.list-container--multi[data-v-6466948d]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-6466948d]{display:flex;gap:4px;padding-bottom:.25rem}.inline-search .inline-search-wrapper .search-container[data-v-6466948d]{width:100%}.inline-search .list-container[data-v-6466948d]{padding-top:0}.no-result-container[data-v-6466948d]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-6466948d]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-6466948d]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-6466948d]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list--with-conditions[data-v-6466948d]{min-height:0;margin-bottom:0}.image-slot[data-v-6466948d]{margin-right:.5rem}.actions-wrapper[data-v-6466948d]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between;margin-top:.25rem}.apply-button[data-v-6466948d]{margin-left:.5rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.label[data-v-2c2947b3]{color:#41454d}.item-container[data-v-2c2947b3]{width:100%;display:flex;align-items:center;cursor:pointer;border-radius:var(--border-radius-lg);margin-bottom:.25rem;color:var(--text-primary);padding:6px 8px}.item-container--disabled[data-v-2c2947b3]{cursor:initial;color:var(--text-disabled)}.item-container[data-v-2c2947b3]:hover:not(.item-container--disabled){background-color:var(--action-hover)}.item-container--active[data-v-2c2947b3],.item-container[data-v-2c2947b3]:active{background-color:var(--action-selected)}.item-container:not(.item-container--multi).item-container--selected[data-v-2c2947b3]{background-color:var(--action-selected)}.subtitle[data-v-2c2947b3]{color:#7b838c;line-height:1rem}.clear-button[data-v-2c2947b3]{display:flex;padding:0 4px;color:#7b838c;align-items:center;height:auto;background-image:none;min-width:auto;border:none;background-color:transparent}.clear-button[data-v-2c2947b3]:hover{color:#3083ff}.item[data-v-2c2947b3]{width:100%;display:flex;gap:.5rem;align-items:center}.item--with-icon[data-v-2c2947b3],.item--multi[data-v-2c2947b3]{display:flex;flex-direction:row;align-items:center;justify-content:start}.item .image[data-v-2c2947b3]{width:20px;height:20px;flex:none}.item .image img[data-v-2c2947b3]{width:20px;height:20px;border-radius:4px}.item .flag[data-v-2c2947b3]{width:16px;height:16px}.item .flag img[data-v-2c2947b3]{width:16px;height:16px;border-radius:50%}.item .start-icon[data-v-2c2947b3],.item .end-icon[data-v-2c2947b3]{display:flex;color:var(--action-active)}.item .end-text-icon[data-v-2c2947b3]{display:inline-flex}.item .option-text[data-v-2c2947b3]{line-height:1.1875rem}.text-container[data-v-2c2947b3]{width:100%;text-overflow:ellipsis;overflow:hidden}.tooltip-option[data-v-2c2947b3]{display:block}.tooltip-option[data-v-2c2947b3] .container{width:100%}.app-trigger--icon[data-v-2c2947b3]{color:var(--action-active);transform:rotate(-90deg);transition:transform .2s}.app-trigger--icon.expanded[data-v-2c2947b3]{transform:rotate(0)}.option-content[data-v-2c2947b3]{display:flex}.option-content[data-v-2c2947b3]:not(.option-content-vertical){gap:.5rem;align-items:center}.option-content-horizontal[data-v-2c2947b3]{justify-content:space-between;gap:.5rem}.option-content-vertical[data-v-2c2947b3]{flex-direction:column}.option-text .main-text[data-v-2c2947b3]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left}.option-text .main-text .conditional-option-label[data-v-2c2947b3]{color:var(--text-secondary);display:inline-flex}.option-text .main-text .conditional-option-value[data-v-2c2947b3]{margin-left:4px;display:inline-flex;color:var(--primary-main)}.option-text .caption-text[data-v-2c2947b3]{color:var(--text-secondary)}.multiline-tooltip[data-v-2c2947b3]{display:flex;flex-direction:column}
|
package/README.md
CHANGED
|
@@ -149,21 +149,10 @@ For uploading a new custom icon like 'ad-network' icon type, follow the next ste
|
|
|
149
149
|
|
|
150
150
|
- Upload to S3
|
|
151
151
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
- Go to the right folder for you
|
|
157
|
-
- Drag your SVG files to the table in order to upload them
|
|
158
|
-
|
|
159
|
-
- Invalidate Cache
|
|
160
|
-
|
|
161
|
-
- Connect to AWS through Okta
|
|
162
|
-
- Go to CloudFront
|
|
163
|
-
- Search a distribution named 'fusion.ironsrc.net'
|
|
164
|
-
- Go to the 'Invalidations' tab
|
|
165
|
-
- Create the correct invalidation according to what you've uploaded earlier (example: '/assets/icons/v4/ad-networks/\*')
|
|
166
|
-
- Note: you can use the old invalidations by clicking 'Copy to new'
|
|
152
|
+
- Go to https://github.com/ironsource-mobile/shared-platform-assets repo
|
|
153
|
+
- Add relevant asset to a relevant place
|
|
154
|
+
- Make PR and Merge after to main
|
|
155
|
+
- It will be automatically deployed with cache invalidation
|
|
167
156
|
|
|
168
157
|
- Clear your browser cache
|
|
169
158
|
- Go to your StoryBook link
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { useToggle as
|
|
2
|
-
import { inject as
|
|
1
|
+
import { useToggle as _e } from "../../../composables/useToggle.js";
|
|
2
|
+
import { inject as Ve, ref as r, computed as c, watch as b, useSlots as ke, toRaw as P, nextTick as K, provide as Ge, onMounted as Le } from "vue";
|
|
3
3
|
import { isObjectInArray as ae } from "../../../utils/array.js";
|
|
4
4
|
import { objectsEqual as Be } from "../../../utils/object.js";
|
|
5
|
-
import { useClamp as
|
|
6
|
-
import { Mode as T, Type as
|
|
5
|
+
import { useClamp as He, useVirtualList as Ue, onClickOutside as ne, useInfiniteScroll as qe } from "@vueuse/core";
|
|
6
|
+
import { Mode as T, Type as L, DropdownContext as Xe } from "./DropdownContext.js";
|
|
7
7
|
import { pxToRem as $e } from "../../../utils/style.js";
|
|
8
8
|
import { useEditableContext as je } from "../../table-cells/common/EditableContext.js";
|
|
9
|
-
import { useGroupedOptions as
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
sortOutGroups:
|
|
9
|
+
import { useGroupedOptions as ze } from "./useGroupedOptions.js";
|
|
10
|
+
const tl = (l, f, g) => {
|
|
11
|
+
const B = Ve("isTreeDropdown", !1), {
|
|
12
|
+
sortOutGroups: H,
|
|
13
13
|
flattenAndMarkGroupOptions: ue,
|
|
14
|
-
isGroup:
|
|
14
|
+
isGroup: U,
|
|
15
15
|
selectAllWithGroups: ie,
|
|
16
16
|
isIndeterminateGrouped: re,
|
|
17
|
-
allSelectedGrouped:
|
|
17
|
+
allSelectedGrouped: q,
|
|
18
18
|
areAllPreviousSelected: oe
|
|
19
|
-
} =
|
|
20
|
-
(
|
|
19
|
+
} = ze(l), ce = (e, t) => l.multi && Array.isArray(e) ? l.comparingKey ? e?.findIndex(
|
|
20
|
+
(i) => i[l.comparingKey] === t[l.comparingKey]
|
|
21
21
|
) > -1 : ae(e, t) : l.comparingKey ? e?.[l.comparingKey] === t[l.comparingKey] : e === t;
|
|
22
|
-
let
|
|
22
|
+
let X;
|
|
23
23
|
((e) => {
|
|
24
24
|
e[e.None = 0] = "None", e[e.Next = 1] = "Next", e[e.Previous = -1] = "Previous", e[e.NextPage = 10] = "NextPage", e[e.PrevPage = -10] = "PrevPage";
|
|
25
|
-
})(
|
|
26
|
-
const a =
|
|
25
|
+
})(X || (X = {}));
|
|
26
|
+
const a = r(
|
|
27
27
|
l.selected
|
|
28
28
|
), R = je(), n = c({
|
|
29
29
|
get() {
|
|
30
30
|
return R?.value?.value ?? a.value;
|
|
31
31
|
},
|
|
32
32
|
set(e) {
|
|
33
|
-
R.onChange?.(e), R.onClose?.(),
|
|
33
|
+
R.onChange?.(e), R.onClose?.(), f("update:selected", e);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
b(
|
|
@@ -39,7 +39,7 @@ const ll = (l, A, O) => {
|
|
|
39
39
|
a.value = l.selected, d.value = l.selected;
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
const se =
|
|
42
|
+
const se = ke(), w = r(null), m = r(null), $ = r(null), E = r(null), j = r(null), I = r(null), de = r(), z = r(null), W = r(null), J = r(null), ve = 8, fe = c(() => I.value ? I.value.getBoundingClientRect().height + ve + l.distance : 0), D = r(!1), y = r([]), x = r(-1), h = r(""), d = r(l.selected || []), Q = () => I.value?.focus(), [O, ge, ye] = _e({
|
|
43
43
|
disabled: l.disabled,
|
|
44
44
|
initialValue: l.defaultOpen
|
|
45
45
|
});
|
|
@@ -49,99 +49,99 @@ const ll = (l, A, O) => {
|
|
|
49
49
|
e !== void 0 && ye(e);
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
const
|
|
52
|
+
const Y = (e) => {
|
|
53
53
|
he.value = ge(e);
|
|
54
54
|
}, he = c({
|
|
55
55
|
get() {
|
|
56
56
|
return l.isOpen;
|
|
57
57
|
},
|
|
58
58
|
set(e) {
|
|
59
|
-
|
|
59
|
+
f("update:isOpen", e);
|
|
60
60
|
}
|
|
61
|
-
}), Oe = c(() =>
|
|
61
|
+
}), Oe = c(() => o.value.length - 1), v = He(0, 0, Oe), Z = c(() => n.value ? l.displayValue(n.value) : ""), Se = (e) => {
|
|
62
62
|
if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
|
|
63
63
|
return l.placeholder;
|
|
64
64
|
const t = !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix ? `${e.value.length} selected` : `${l.multiOptionsPlaceholderPrefix ?? ""}${e.value.length ?? "0"}${l.multiOptionsPlaceholderSuffix ?? ""}`;
|
|
65
65
|
return e.value.length == 1 && l.displayValue ? l.displayValue(e.value[0]) : t;
|
|
66
|
-
},
|
|
66
|
+
}, me = c(() => {
|
|
67
67
|
if (!l.multi)
|
|
68
68
|
return n.value ? l.displayValue(n.value) : l.placeholder;
|
|
69
69
|
if (Array.isArray(a.value))
|
|
70
|
-
return
|
|
70
|
+
return Se(a);
|
|
71
71
|
}), M = c(() => {
|
|
72
72
|
if (Array.isArray(a.value))
|
|
73
|
-
return l.groupedOptions ?
|
|
73
|
+
return l.groupedOptions ? q(o, a) : a.value.length === o.value.length;
|
|
74
74
|
}), Ae = c(() => !l.multi || !Array.isArray(a.value) ? !1 : l.groupedOptions ? re(
|
|
75
|
-
|
|
75
|
+
o,
|
|
76
76
|
a
|
|
77
|
-
) : a.value.length > 0 && a.value.length <
|
|
78
|
-
|
|
79
|
-
},
|
|
77
|
+
) : a.value.length > 0 && a.value.length < o.value.length), _ = (e) => {
|
|
78
|
+
h.value = e;
|
|
79
|
+
}, N = c(() => l.groupedOptions ? ue(l.options) : l.options), be = c(() => {
|
|
80
80
|
if (oe(
|
|
81
|
-
|
|
81
|
+
N,
|
|
82
82
|
d
|
|
83
83
|
))
|
|
84
|
-
return
|
|
84
|
+
return N.value;
|
|
85
85
|
const e = {
|
|
86
86
|
selected: [],
|
|
87
87
|
notSelected: []
|
|
88
88
|
};
|
|
89
|
-
P(
|
|
90
|
-
const
|
|
91
|
-
(
|
|
92
|
-
) > -1 : d.value.includes(
|
|
93
|
-
e[
|
|
89
|
+
P(N).value.forEach((i) => {
|
|
90
|
+
const u = (l.comparingKey ? d.value.findIndex(
|
|
91
|
+
(G) => G[l.comparingKey] === i[l.comparingKey]
|
|
92
|
+
) > -1 : d.value.includes(i)) ? "selected" : "notSelected";
|
|
93
|
+
e[u].push(i);
|
|
94
94
|
});
|
|
95
|
-
const t = l.groupedOptions ?
|
|
95
|
+
const t = l.groupedOptions ? H(e.notSelected) : e.notSelected;
|
|
96
96
|
return [].concat(e.selected, t);
|
|
97
|
-
}),
|
|
98
|
-
const e = Array.isArray(d.value) && l.multi &&
|
|
97
|
+
}), o = c(() => {
|
|
98
|
+
const e = Array.isArray(d.value) && l.multi && g.VERSION === 4 && !B ? be.value : N.value;
|
|
99
99
|
if (l.onSearch) {
|
|
100
|
-
const t = e.filter((
|
|
101
|
-
return l.groupedOptions ?
|
|
100
|
+
const t = e.filter((i) => l.groupedOptions && U(i) ? i : l.onSearch(i, h.value));
|
|
101
|
+
return l.groupedOptions ? H(t) : t;
|
|
102
102
|
} else
|
|
103
103
|
return e;
|
|
104
|
-
}), Pe = c(() =>
|
|
105
|
-
() => Pe.value ?
|
|
104
|
+
}), Pe = c(() => y.value[0]?.hasSubtitle), F = c(() => s.mode === T.Multi), p = c(
|
|
105
|
+
() => Pe.value ? g.MULTILINE_LIST_HEIGHT : g.LIST_HEIGHT
|
|
106
106
|
), {
|
|
107
|
-
list:
|
|
108
|
-
containerProps:
|
|
107
|
+
list: ee,
|
|
108
|
+
containerProps: V,
|
|
109
109
|
wrapperProps: Te,
|
|
110
110
|
scrollTo: C
|
|
111
|
-
} = Ue(
|
|
112
|
-
itemHeight:
|
|
111
|
+
} = Ue(o, {
|
|
112
|
+
itemHeight: p.value,
|
|
113
113
|
overscan: l.disableVirtualScroll ? 1 / 0 : 2
|
|
114
114
|
});
|
|
115
115
|
b(
|
|
116
116
|
() => l.isOpen,
|
|
117
117
|
(e) => {
|
|
118
|
-
|
|
118
|
+
Y(e);
|
|
119
119
|
}
|
|
120
120
|
), b([x], async () => {
|
|
121
|
-
await
|
|
121
|
+
await K();
|
|
122
122
|
}), b(
|
|
123
|
-
[
|
|
123
|
+
[O, v, x],
|
|
124
124
|
async ([e], [t]) => {
|
|
125
|
-
|
|
126
|
-
l.multi &&
|
|
125
|
+
O.value && (await K(), x.value !== -1 && e !== t && setTimeout(() => {
|
|
126
|
+
l.multi && g.VERSION === 4 || C(x.value);
|
|
127
127
|
}), v.value && setTimeout(() => {
|
|
128
128
|
C(v.value);
|
|
129
129
|
}));
|
|
130
130
|
}
|
|
131
|
-
), b(
|
|
132
|
-
|
|
131
|
+
), b(h, () => {
|
|
132
|
+
f("onsearch", h.value), C(0);
|
|
133
133
|
});
|
|
134
|
-
const
|
|
135
|
-
l.disabled || (
|
|
136
|
-
|
|
134
|
+
const A = (e, t = !1) => {
|
|
135
|
+
l.disabled || (Y(e), K(() => {
|
|
136
|
+
O.value && f("opened"), O.value || f("closed"), w.value && t && w.value.focus();
|
|
137
137
|
}));
|
|
138
138
|
};
|
|
139
|
-
b(
|
|
139
|
+
b(O, (e) => {
|
|
140
140
|
if (e) {
|
|
141
|
-
|
|
141
|
+
h.value = "", F.value && Array.isArray(n.value) && (d.value = P(n.value).slice());
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
Q();
|
|
145
145
|
});
|
|
146
146
|
const we = () => {
|
|
147
147
|
if (M.value) {
|
|
@@ -150,80 +150,80 @@ const ll = (l, A, O) => {
|
|
|
150
150
|
}
|
|
151
151
|
if (Array.isArray(a.value)) {
|
|
152
152
|
if (l.groupedOptions)
|
|
153
|
-
ie(
|
|
153
|
+
ie(o, a);
|
|
154
154
|
else {
|
|
155
|
-
if (a.value.length ===
|
|
155
|
+
if (a.value.length === o.value.length) {
|
|
156
156
|
a.value = [];
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
a.value =
|
|
159
|
+
a.value = o.value;
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
f("selectAll");
|
|
162
162
|
}
|
|
163
163
|
}, Ie = () => {
|
|
164
|
-
we(),
|
|
164
|
+
we(), g.VERSION !== 4 && (n.value = a.value);
|
|
165
165
|
}, xe = (e = !0) => {
|
|
166
|
-
a.value = [], e && (n.value = [], d.value = []),
|
|
166
|
+
a.value = [], e && (n.value = [], d.value = []), f("clear");
|
|
167
167
|
}, k = (e, t) => {
|
|
168
|
-
if (e = P(e),
|
|
168
|
+
if (e = P(e), g.VERSION === 4 ? e[l.disabledOptionKey] : y.value[t]?.disabled)
|
|
169
169
|
return;
|
|
170
170
|
if (x.value = t, !l.multi) {
|
|
171
|
-
l.keepOpen ||
|
|
171
|
+
l.keepOpen || A(!1), s.goToOption(
|
|
172
172
|
0
|
|
173
173
|
/* None */
|
|
174
|
-
), n.value = e,
|
|
174
|
+
), n.value = e, _(""), Q(), s.type === L.Search && m.value && (m.value.value = l.displayValue(e)), le();
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
if (!Array.isArray(a.value))
|
|
178
178
|
return;
|
|
179
179
|
m.value?.focus();
|
|
180
|
-
const
|
|
181
|
-
if (ae(
|
|
182
|
-
(
|
|
180
|
+
const S = P(a.value);
|
|
181
|
+
if (ae(S, e) || l.comparingKey && S.findIndex(
|
|
182
|
+
(u) => u[l.comparingKey] === e[l.comparingKey]
|
|
183
183
|
) > -1) {
|
|
184
|
-
a.value =
|
|
184
|
+
a.value = S.filter((u) => l.comparingKey ? u[l.comparingKey] !== e[l.comparingKey] : !Be(u, e));
|
|
185
185
|
return;
|
|
186
186
|
} else {
|
|
187
|
-
a.value = [...
|
|
187
|
+
a.value = [...S, e];
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
}, De = (e) =>
|
|
190
|
+
}, De = (e) => y.value[e]?.disabled, s = {
|
|
191
191
|
activeIndex: v,
|
|
192
|
-
options:
|
|
192
|
+
options: y,
|
|
193
193
|
selectedOption: n,
|
|
194
194
|
labelRef: j,
|
|
195
195
|
activeOption: E,
|
|
196
196
|
listRef: w,
|
|
197
197
|
clearable: l.clearable,
|
|
198
|
-
type: se.input ?
|
|
198
|
+
type: se.input ? L.Search : L.Dropdown,
|
|
199
199
|
mode: l.multi ? T.Multi : T.Single,
|
|
200
|
-
query:
|
|
201
|
-
selectedValue:
|
|
202
|
-
toggle:
|
|
200
|
+
query: h,
|
|
201
|
+
selectedValue: Z,
|
|
202
|
+
toggle: A,
|
|
203
203
|
disabled: l.disabled,
|
|
204
|
-
open:
|
|
204
|
+
open: O,
|
|
205
205
|
mandatory: l.mandatory,
|
|
206
206
|
size: l.size,
|
|
207
207
|
placeholder: l.placeholder,
|
|
208
208
|
select: k,
|
|
209
209
|
clearSelection: () => {
|
|
210
|
-
|
|
210
|
+
_(""), n.value = s.mode === T.Single ? null : [], d.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
|
|
211
211
|
},
|
|
212
|
-
search:
|
|
212
|
+
search: _,
|
|
213
213
|
goToOption: async (e) => {
|
|
214
|
-
if (!
|
|
214
|
+
if (!O.value)
|
|
215
215
|
return;
|
|
216
216
|
let t = v.value + e;
|
|
217
|
-
const
|
|
218
|
-
(
|
|
219
|
-
).length,
|
|
220
|
-
for (t >
|
|
221
|
-
if (!
|
|
222
|
-
E.value =
|
|
217
|
+
const i = y.value.filter(
|
|
218
|
+
(u) => u.disabled
|
|
219
|
+
).length, S = o.value.length - i;
|
|
220
|
+
for (t > S && (t = S + 1); ; ) {
|
|
221
|
+
if (!y.value[t]?.disabled) {
|
|
222
|
+
E.value = o.value[t], v.value = t;
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!De(v.value)) {
|
|
226
|
-
E.value =
|
|
226
|
+
E.value = o.value[t], v.value = t;
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -231,54 +231,54 @@ const ll = (l, A, O) => {
|
|
|
231
231
|
registerInput: (e) => {
|
|
232
232
|
m.value = e.value;
|
|
233
233
|
},
|
|
234
|
-
registerOption: (e, t,
|
|
235
|
-
|
|
234
|
+
registerOption: (e, t, i) => {
|
|
235
|
+
y.value = [...y.value, { id: e, disabled: t, hasSubtitle: i }];
|
|
236
236
|
},
|
|
237
237
|
unRegisterOption(e) {
|
|
238
|
-
|
|
238
|
+
y.value = y.value.filter((t) => t.id !== e);
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
Ge(
|
|
241
|
+
Ge(Xe, s), ne(
|
|
242
242
|
w,
|
|
243
243
|
() => {
|
|
244
|
-
|
|
244
|
+
O.value && te();
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
ignore: [
|
|
248
248
|
I,
|
|
249
|
-
X,
|
|
250
249
|
z,
|
|
251
250
|
W,
|
|
251
|
+
J,
|
|
252
252
|
m,
|
|
253
|
-
|
|
253
|
+
V.ref
|
|
254
254
|
]
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
|
-
const
|
|
257
|
+
const Me = () => {
|
|
258
258
|
m.value && (m.value.value = s.query.value = "");
|
|
259
259
|
};
|
|
260
|
-
|
|
261
|
-
l.autoFocus && (await
|
|
260
|
+
Le(async () => {
|
|
261
|
+
l.autoFocus && (await K(), setTimeout(() => {
|
|
262
262
|
$.value.focus();
|
|
263
|
-
})), s.goToOption(0), l.multi && !
|
|
264
|
-
|
|
263
|
+
})), s.goToOption(0), l.multi && !B && (l.groupedOptions ? D.value = q(
|
|
264
|
+
o,
|
|
265
265
|
a
|
|
266
266
|
) : D.value = l.options.length === l.selected.length);
|
|
267
267
|
});
|
|
268
268
|
const le = () => {
|
|
269
|
-
l.multi && (D.value = M.value, n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice())),
|
|
269
|
+
l.multi && (D.value = M.value, n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice())), f("apply", n.value), f("allSelectedChanged", M.value), A(!1), Me();
|
|
270
270
|
}, te = () => {
|
|
271
|
-
|
|
272
|
-
},
|
|
271
|
+
F.value && Array.isArray(d.value) && (n.value = P(d.value).slice()), h.value = "", A(!1);
|
|
272
|
+
}, Ne = (e) => {
|
|
273
273
|
if (!l.disableKeyboardEvents)
|
|
274
274
|
switch (e.key) {
|
|
275
275
|
case "Space":
|
|
276
276
|
case "Enter":
|
|
277
277
|
case "ArrowUp":
|
|
278
278
|
case "ArrowDown":
|
|
279
|
-
|
|
279
|
+
A(!0), e.preventDefault();
|
|
280
280
|
}
|
|
281
|
-
},
|
|
281
|
+
}, Ce = (e) => {
|
|
282
282
|
if (!l.disableKeyboardEvents)
|
|
283
283
|
switch (e.key) {
|
|
284
284
|
case "ArrowUp": {
|
|
@@ -296,7 +296,7 @@ const ll = (l, A, O) => {
|
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
case "Escape": {
|
|
299
|
-
|
|
299
|
+
A(!1), e.preventDefault();
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
case "PageUp": {
|
|
@@ -314,48 +314,54 @@ const ll = (l, A, O) => {
|
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
316
|
case "Enter": {
|
|
317
|
-
if (!
|
|
318
|
-
|
|
317
|
+
if (!O.value) {
|
|
318
|
+
A(!0);
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
k(
|
|
321
|
+
k(o.value[v.value], v.value), s.mode === T.Single && !l.keepOpen && A(!1), e.preventDefault();
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, Ke = c(() => {
|
|
326
326
|
if (l.loading)
|
|
327
327
|
return 8.5;
|
|
328
|
-
const e = l.customNumberOfDisplayedOptions ||
|
|
329
|
-
const
|
|
330
|
-
return
|
|
331
|
-
}, 0), t = l.multi && l.showSelectAll && !
|
|
332
|
-
let
|
|
333
|
-
return l.noResultsText &&
|
|
334
|
-
|
|
328
|
+
const e = l.loadMoreLoading && g.MAX_NUMBER_OF_OPTIONS || l.customNumberOfDisplayedOptions || ee.value.reduce((G, Re) => {
|
|
329
|
+
const Ee = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Re.data) : 1;
|
|
330
|
+
return G + Ee;
|
|
331
|
+
}, 0), t = l.multi && l.showSelectAll && !h.value ? 1 : 0, i = e > g.MAX_NUMBER_OF_OPTIONS, S = e + t;
|
|
332
|
+
let u = i ? g.MAX_NUMBER_OF_OPTIONS + 0.1 : S;
|
|
333
|
+
return l.loadMoreLoading && l.multi && (u = u - 0.9), l.noResultsText && u === 0 && (u = u + 1), l.withConditions && h.value && (u = u + 1), $e(
|
|
334
|
+
u * p.value + g.PADDING_PX
|
|
335
335
|
);
|
|
336
336
|
});
|
|
337
|
-
return
|
|
338
|
-
|
|
337
|
+
return qe(
|
|
338
|
+
V.ref,
|
|
339
|
+
() => {
|
|
340
|
+
!l.loadMoreLoading && l.infiniteLoading && f("loadMore");
|
|
341
|
+
},
|
|
342
|
+
{ distance: l.infiniteScrollThreshold }
|
|
343
|
+
), {
|
|
344
|
+
onKeydown: Ce,
|
|
339
345
|
location: fe,
|
|
340
|
-
open:
|
|
341
|
-
toggleMenu:
|
|
342
|
-
onButtonKeydown:
|
|
343
|
-
displayedValue:
|
|
346
|
+
open: O,
|
|
347
|
+
toggleMenu: A,
|
|
348
|
+
onButtonKeydown: Ne,
|
|
349
|
+
displayedValue: me,
|
|
344
350
|
labelRef: j,
|
|
345
|
-
query:
|
|
346
|
-
containerProps:
|
|
347
|
-
calculateTableHeight:
|
|
351
|
+
query: h,
|
|
352
|
+
containerProps: V,
|
|
353
|
+
calculateTableHeight: Ke,
|
|
348
354
|
wrapperProps: Te,
|
|
349
|
-
filteredOptions:
|
|
355
|
+
filteredOptions: o,
|
|
350
356
|
allSelected: M,
|
|
351
357
|
allSelectedApplied: D,
|
|
352
358
|
isIndeterminate: Ae,
|
|
353
359
|
onSelectAll: Ie,
|
|
354
|
-
virtualOptions:
|
|
360
|
+
virtualOptions: ee,
|
|
355
361
|
isSelected: ce,
|
|
356
362
|
selectedOption: n,
|
|
357
363
|
selectedOptionPrevious: d,
|
|
358
|
-
selectedValue:
|
|
364
|
+
selectedValue: Z,
|
|
359
365
|
onSelect: k,
|
|
360
366
|
activeIndex: v,
|
|
361
367
|
onCancel: te,
|
|
@@ -364,15 +370,15 @@ const ll = (l, A, O) => {
|
|
|
364
370
|
onClickOutside: ne,
|
|
365
371
|
listRef: w,
|
|
366
372
|
buttonRef: I,
|
|
367
|
-
apply:
|
|
368
|
-
cancel:
|
|
373
|
+
apply: z,
|
|
374
|
+
cancel: W,
|
|
369
375
|
el: $,
|
|
370
376
|
triggerRef: de,
|
|
371
|
-
clearAll:
|
|
377
|
+
clearAll: J,
|
|
372
378
|
onClearAllSelections: xe,
|
|
373
|
-
isGroup:
|
|
379
|
+
isGroup: U
|
|
374
380
|
};
|
|
375
381
|
};
|
|
376
382
|
export {
|
|
377
|
-
|
|
383
|
+
tl as dropdownCommon
|
|
378
384
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ButtonDropdownTrigger.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../ButtonDropdownTrigger.
|
|
4
|
-
const p = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f9a13e27"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../../../ButtonDropdownTrigger.
|
|
2
|
-
import
|
|
1
|
+
import "../../../ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css"; import { defineComponent as l, openBlock as o, createBlock as i, unref as d, normalizeClass as r, withCtx as s, renderSlot as c, createElementVNode as u, toDisplayString as m } from "vue";
|
|
2
|
+
import f from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "../../button/v4/ButtonGroup.vue.js";
|
|
5
5
|
import "../../button/v4/ToggleButtonGroupAB.vue.js";
|
|
6
|
-
const p = /* @__PURE__ */ l({
|
|
6
|
+
const b = { class: "label" }, p = /* @__PURE__ */ l({
|
|
7
7
|
__name: "ButtonDropdownTrigger",
|
|
8
8
|
props: {
|
|
9
9
|
label: null,
|
|
@@ -18,7 +18,7 @@ const p = /* @__PURE__ */ l({
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["click"],
|
|
20
20
|
setup(e, { emit: a }) {
|
|
21
|
-
return (n, t) => (o(), i(d(
|
|
21
|
+
return (n, t) => (o(), i(d(f), {
|
|
22
22
|
class: r(["button-trigger", { open: e.open }]),
|
|
23
23
|
disabled: e.disabled,
|
|
24
24
|
color: "default",
|
|
@@ -29,11 +29,11 @@ const p = /* @__PURE__ */ l({
|
|
|
29
29
|
"end-icon-name": e.hideEndIcon ? null : "caret-down",
|
|
30
30
|
content: e.label,
|
|
31
31
|
"test-id": e.testId,
|
|
32
|
-
onClick: t[0] || (t[0] = (
|
|
32
|
+
onClick: t[0] || (t[0] = (y) => a("click"))
|
|
33
33
|
}, {
|
|
34
34
|
default: s(() => [
|
|
35
35
|
c(n.$slots, "default", {}, () => [
|
|
36
|
-
u(
|
|
36
|
+
u("div", b, m(e.label), 1)
|
|
37
37
|
], !0)
|
|
38
38
|
]),
|
|
39
39
|
_: 3
|