@webitel/ui-sdk 26.6.17 → 26.6.18

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 (79) hide show
  1. package/dist/{contacts-x411Rwez.js → contacts-CW3-LZxF.js} +2 -2
  2. package/dist/{index-D_POp8ob.js → index-CVZdV0CY.js} +1 -1
  3. package/dist/{install-Cu0d6sby.js → install-Cr0bk3L_.js} +1847 -1849
  4. package/dist/{isObject-ByASj__U.js → isObject-CiKYzHrL.js} +1 -1
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.js +3 -3
  7. package/dist/ui-sdk.umd.cjs +487 -492
  8. package/dist/{useVidstackSrc-BhJ70gII.js → useVidstackSrc-eIh94IOa.js} +1 -1
  9. package/dist/{vidstack-Bq6c3Bam-Bah3VB6-.js → vidstack-Bq6c3Bam-C9bvNDeZ.js} +3 -3
  10. package/dist/{vidstack-D2pY00kU-ByV8VY12.js → vidstack-D2pY00kU-32fYwL0c.js} +3 -3
  11. package/dist/{vidstack-DDXt6fpN-AnGHyGmH.js → vidstack-DDXt6fpN-Bdj16PRi.js} +2 -2
  12. package/dist/{vidstack-D_-9AA6_-BYSsKBwR.js → vidstack-D_-9AA6_-DU-Z0scc.js} +2 -2
  13. package/dist/{vidstack-DqAw8m9J-DswYN2KC.js → vidstack-DqAw8m9J-D4iW7Pk4.js} +1 -1
  14. package/dist/{vidstack-audio-BBZWJaJs.js → vidstack-audio-D57MQWMi.js} +2 -2
  15. package/dist/{vidstack-dash-DioDLqSD.js → vidstack-dash-DQ3tW9tH.js} +4 -4
  16. package/dist/{vidstack-google-cast-BKifCUBj.js → vidstack-google-cast-Chny36ds.js} +4 -4
  17. package/dist/{vidstack-hls-B410PN9l.js → vidstack-hls-BJVMAGc7.js} +4 -4
  18. package/dist/{vidstack-video-BhR43aHZ.js → vidstack-video-0rGus1eV.js} +3 -3
  19. package/dist/{vidstack-vimeo-D8KMx3dH.js → vidstack-vimeo-y__Gq7-Z.js} +4 -4
  20. package/dist/{vidstack-youtube-B3lNuheF.js → vidstack-youtube-DP3qUcr_.js} +3 -3
  21. package/dist/{wt-action-bar-DJunx8Bz.js → wt-action-bar-CMKn5_2O.js} +1 -1
  22. package/dist/{wt-button-select-IxMhW3aN.js → wt-button-select-Ce3BQoKR.js} +1 -1
  23. package/dist/{wt-call-media-action-l26Ebm1n.js → wt-call-media-action-ZuyF3TA9.js} +1 -1
  24. package/dist/{wt-chat-emoji-CGS_HHH7.js → wt-chat-emoji-CL-ZeHBE.js} +65 -65
  25. package/dist/{wt-confirm-dialog-Bz4AG75V.js → wt-confirm-dialog-msvvphR9.js} +1 -1
  26. package/dist/{wt-context-menu-D2h6Iosh.js → wt-context-menu-D4f_AGoC.js} +1 -1
  27. package/dist/{wt-copy-action-wZ1BFpR3.js → wt-copy-action-Cf-_NtcG.js} +1 -1
  28. package/dist/{wt-datepicker-DVJlOegR.js → wt-datepicker-CGfAsCbg.js} +1 -1
  29. package/dist/{wt-display-chip-items-BskP208B.js → wt-display-chip-items-NXvaxIwQ.js} +1 -1
  30. package/dist/{wt-dual-panel-Bf0cLkn2.js → wt-dual-panel-DTmyhNDA.js} +1 -1
  31. package/dist/{wt-dummy-CnH3EakG.js → wt-dummy-DRMzAM9O.js} +1 -1
  32. package/dist/{wt-error-page-CTDXxrpz.js → wt-error-page-bVs4FU_6.js} +1 -1
  33. package/dist/{wt-expansion-card-DqpKEDzd.js → wt-expansion-card-C6Gor6XB.js} +1 -1
  34. package/dist/{wt-expansion-panel-B1FlwwsJ.js → wt-expansion-panel-CuGG2_bc.js} +1 -1
  35. package/dist/{wt-filters-panel-wrapper-Cam5mBQD.js → wt-filters-panel-wrapper-B75QdN0o.js} +1 -1
  36. package/dist/{wt-galleria-C4qtQYNG.js → wt-galleria-CaXq22nn.js} +1 -1
  37. package/dist/{wt-inline-add-panel-BcmGzVUY.js → wt-inline-add-panel-BMPB9HLd.js} +1 -1
  38. package/dist/{wt-navigation-menu-jlgb2OVE.js → wt-navigation-menu-Btme7T0n.js} +1 -1
  39. package/dist/{wt-notifications-bar-D5BgIbDJ.js → wt-notifications-bar-DgC8bv6A.js} +2 -2
  40. package/dist/{wt-pagination-CzWjNHGr.js → wt-pagination-PBVxACl3.js} +1 -1
  41. package/dist/{wt-player-DPoW9DsS.js → wt-player-3OnI8Gkb.js} +2 -2
  42. package/dist/{wt-screen-recordings-action-CnD3u6l1.js → wt-screen-recordings-action-DwlOgzfd.js} +1 -1
  43. package/dist/{wt-search-bar-w5yRXUJM.js → wt-search-bar-D6qMRH-b.js} +1 -1
  44. package/dist/{wt-selection-popup-BQ2nxFxN.js → wt-selection-popup-DwA5WMWd.js} +1 -1
  45. package/dist/{wt-send-message-popup-CIROO7qp.js → wt-send-message-popup-BNHfgzV6.js} +18 -18
  46. package/dist/{wt-start-page-Co2Dr7sd.js → wt-start-page-DVyRr6sN.js} +12 -12
  47. package/dist/{wt-status-select-B5RBn4az.js → wt-status-select--ogDeIvZ.js} +1 -1
  48. package/dist/{wt-stepper-D-5zkV_o.js → wt-stepper-DpszO5_T.js} +1 -1
  49. package/dist/{wt-table-CIwgA4bb.js → wt-table--CESQOx6.js} +1 -1
  50. package/dist/{wt-table-actions-cdZk4uQg.js → wt-table-actions-FVBMiBzy.js} +1 -1
  51. package/dist/{wt-table-column-select-xScdacRt.js → wt-table-column-select-CDlRxNrk.js} +2 -2
  52. package/dist/{wt-tabs-Brwfb9Xt.js → wt-tabs-C0lD3Xw6.js} +1 -1
  53. package/dist/{wt-timepicker-fVxaUiFH.js → wt-timepicker-hOlzDr60.js} +1 -1
  54. package/dist/wt-tree-NhBg3C84.js +2777 -0
  55. package/dist/{wt-tree-table-DNr013Ft.js → wt-tree-table-CK9T8KmU.js} +22 -22
  56. package/dist/wt-type-extension-value-input-C3J9mXbz.js +121 -0
  57. package/dist/{wt-vidstack-player-BjA03boO.js → wt-vidstack-player-CW5GMIcG.js} +10 -10
  58. package/package.json +1 -1
  59. package/src/components/_internals/composables/useSelect/useSelectUtils.ts +11 -3
  60. package/src/components/index.js +0 -5
  61. package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +14 -11
  62. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +6 -6
  63. package/src/modules/Filters/components/filter-select.vue +15 -6
  64. package/src/modules/ObjectPermissions/_internals/components/permissions-role-select.vue +8 -9
  65. package/src/modules/ObjectPermissions/components/permissions-tab.vue +12 -12
  66. package/src/modules/QueryFilters/components/abstract-api-filter.vue +29 -7
  67. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +31 -6
  68. package/src/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue +9 -9
  69. package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +2 -3
  70. package/dist/index-LgFKTZzs.js +0 -2508
  71. package/dist/wt-tags-input-BDmXu8bo.js +0 -244
  72. package/dist/wt-tree-jn8eK1wC.js +0 -275
  73. package/dist/wt-type-extension-value-input-C-Kgj75G.js +0 -123
  74. package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +0 -89
  75. package/src/components/wt-tags-input/mixin/__tests__/taggableMixin.spec.js +0 -27
  76. package/src/components/wt-tags-input/wt-tags-input.vue +0 -275
  77. package/types/components/wt-tags-input/__tests__/WtTagsInput.spec.d.ts +0 -1
  78. package/types/components/wt-tags-input/mixin/__tests__/taggableMixin.spec.d.ts +0 -1
  79. package/types/components/wt-tags-input/wt-tags-input.vue.d.ts +0 -3
@@ -1,244 +0,0 @@
1
- import { d as O } from "./index-LgFKTZzs.js";
2
- import { H as h, _ as E, C as S, M as z, J as A, K as B } from "./install-Cu0d6sby.js";
3
- import { resolveComponent as n, resolveDirective as R, createElementBlock as I, openBlock as v, normalizeClass as P, createBlock as p, createCommentVNode as c, createVNode as o, mergeProps as g, withCtx as a, renderSlot as b, normalizeProps as f, guardReactiveProps as $, createTextVNode as d, toDisplayString as r, toHandlers as j, createSlots as q, withDirectives as V, createElementVNode as w, vShow as H, withModifiers as N } from "vue";
4
- const D = {
5
- props: {
6
- // validation rules
7
- v: {
8
- type: Object
9
- },
10
- customValidators: {
11
- type: Array,
12
- default: () => []
13
- }
14
- },
15
- computed: {
16
- isValidation() {
17
- return !!this.v && !!Object.keys(this.v).length;
18
- },
19
- invalid() {
20
- return this.isValidation && this.v.$error;
21
- },
22
- validationText() {
23
- let i = "";
24
- this.isValidation && this.invalid && (this.v.required?.$invalid ? i = this.$t("validation.required") : this.v.numeric?.$invalid ? i = this.$t("validation.numeric") : this.v.email?.$invalid ? i = this.$t("validation.email") : this.v.gatewayHostValidator?.$invalid ? i = this.$t("validation.gatewayHostValidator") : this.v.ipValidator?.$invalid ? i = this.$t("validation.ipValidator") : this.v.macValidator?.$invalid ? i = this.$t("validation.macValidator") : this.v.minValue?.$invalid ? i = this.$t("validation.minValue", {
25
- min: this.v.minValue.$params.min
26
- }) : this.v.maxValue?.$invalid ? i = this.$t("validation.maxValue", {
27
- max: this.v.maxValue.$params.max
28
- }) : this.v.sipAccountValidator?.$invalid ? i = this.$t("validation.sipAccountValidator") : this.v.minLength?.$invalid ? i = this.$t("validation.minLength", {
29
- min: this.v.minLength.$params.min
30
- }) : this.v.maxLength?.$invalid ? i = this.$t("validation.maxLength", {
31
- max: this.v.maxLength.$params.max
32
- }) : this.v.url?.$invalid ? i = `${this.$t("validation.url")}` : this.v.regExpValidator?.$invalid ? i = `${this.$t("validation.regExpValidator")}` : this.v.sameAs?.$invalid ? i = `${this.$t("validation.sameAs")}` : this.v.domainValidator?.$invalid ? i = `${this.$t("validation.domainValidator")}` : this.v.decimalValidator?.$invalid ? i = `${this.$t("validation.decimalValidator")} ${this.v.decimalValidator.$params.count}` : this.v.websocketValidator?.$invalid ? i = `${this.$t("validation.websocketValidator")}` : this.v.integer?.$invalid ? i = `${this.$t("validation.integer")}` : this.v.isRegExpMatched?.$invalid && (i = this.v.isRegExpMatched?.$params?.errorMessage || `${t("validation.isRegExpMatched")} ${this.v.isRegExpMatched?.$params?.regExp}`));
33
- for (const { name: l, text: e } of this.customValidators)
34
- this.v[l]?.$invalid && (i = e);
35
- return i;
36
- },
37
- validationTextColor() {
38
- return this.invalid ? h.ERROR : h.SUCCESS;
39
- }
40
- }
41
- }, x = {
42
- name: "WtTagsInput",
43
- mixins: [
44
- D,
45
- A,
46
- // taggableMixin is used to add custom select values, see [https://my.webitel.com/browse/WTEL-3181
47
- B
48
- ],
49
- /**
50
- * @emits {Array} input - Fires when tags value changes. Emits value array
51
- * @emits {string} tag - Fires when tag is added (if manualTagging is true). Emits vue-multiselect "tag" value
52
- * @emits {string} search-change - Fires when search query changes
53
- * @emits {void} closed - Fires when dropdown is closed
54
- *
55
- * Note: This component inherits props from multiselectMixin (options, placeholder, optionLabel, searchMethod, disabled, required, allowEmpty, useValueFromOptionsByProp)
56
- * and validationMixin (v, customValidators). Also inherits label-related props from labelUsageMixin (label, labelProps).
57
- */
58
- props: {
59
- /**
60
- * Current tags value (v-model). Default mode for tags input is array of strings, not objects (that is the difference between tags input and select).
61
- * @type {Array}
62
- * @model value
63
- */
64
- value: {
65
- type: Array
66
- },
67
- /**
68
- * Default mode for tags input is array of strings, not objects (that is the difference between tags input and select).
69
- * @type {string}
70
- * @default null
71
- */
72
- trackBy: {
73
- type: String,
74
- default: null
75
- },
76
- /**
77
- * If true, user can add tags by himself
78
- * @type {boolean}
79
- * @default false
80
- */
81
- taggable: {
82
- type: Boolean,
83
- default: !1
84
- },
85
- /**
86
- * Represented property of select object. REQUIRED IN OBJECT-DATA TAG-INPUTS TO PREVENT OPTION DUPLICATION.
87
- * @type {string}
88
- * @default null
89
- */
90
- optionLabel: {
91
- type: String,
92
- default: null
93
- },
94
- /**
95
- * False: "tag" method automatically pushes { optionLabel | "name", trackBy } object to value array and $emits "input" event.
96
- * True: "tag" method only $emits "tag" event. Tag addition is responsibility of client side.
97
- * @type {boolean}
98
- * @default false
99
- */
100
- manualTagging: {
101
- type: Boolean,
102
- default: !1,
103
- description: `
104
- False: "tag" method automatically pushes { optionLabel | "name", trackBy } object to value
105
- array and $emits "input" event.
106
-
107
- True: "tag" method only $emits "tag" event. Tag addition is responsibility of client side.
108
- `
109
- }
110
- },
111
- emits: [
112
- "input",
113
- "tag",
114
- "search-change",
115
- "closed"
116
- ],
117
- data: () => ({
118
- defaultOptionLabel: "label",
119
- // [https://webitel.atlassian.net/browse/WTEL-4310]
120
- // Multiple value is needed in TaggableMixin mixin to correctly add custom values
121
- multiple: !0,
122
- // Expose enums to template
123
- MessageVariant: z,
124
- ComponentSize: S
125
- }),
126
- created() {
127
- this.isApiMode || this.initializeOptions();
128
- },
129
- methods: {
130
- getTagOptionLabel({ optionLabel: i, option: l }) {
131
- const e = this.getOptionLabel({
132
- optionLabel: i,
133
- option: l
134
- });
135
- return typeof e == "object" ? l.label : e;
136
- },
137
- initializeOptions() {
138
- if (!this.value)
139
- return [];
140
- const i = this.value.filter((l) => !this.options.find((e) => O(e, l)));
141
- this.options.unshift(...i);
142
- }
143
- }
144
- }, F = { class: "multiselect__loading-wrapper" };
145
- function J(i, l, e, K, U, u) {
146
- const y = n("wt-label"), m = n("wt-icon-btn"), L = n("wt-chip"), M = n("wt-loader"), _ = n("vue-multiselect"), k = n("wt-message"), T = R("observe-visibility");
147
- return v(), I("div", {
148
- class: P([{
149
- "wt-tags-input--disabled": i.disabled,
150
- "wt-tags-input--invalid": i.invalid,
151
- "wt-tags-input--loading": i.isLoading
152
- }, "wt-tags-input"])
153
- }, [
154
- i.hasLabel ? (v(), p(y, g({ key: 0 }, i.labelProps, {
155
- disabled: i.disabled,
156
- invalid: i.invalid,
157
- class: "wt-tags-input__label"
158
- }), {
159
- default: a(() => [
160
- b(i.$slots, "label", f($({ label: i.label })), () => [
161
- d(r(i.requiredLabel), 1)
162
- ], !0)
163
- ], void 0, !0),
164
- _: 3
165
- }, 16, ["disabled", "invalid"])) : c("", !0),
166
- o(_, g(i.$attrs, {
167
- ref: "vue-multiselect",
168
- "close-on-select": !1,
169
- disabled: i.disabled,
170
- "internal-search": !i.searchMethod,
171
- label: i.selectOptionLabel,
172
- loading: !1,
173
- "model-value": i.selectValue,
174
- multiple: i.multiple,
175
- options: i.selectOptions,
176
- placeholder: i.placeholder || i.label,
177
- taggable: e.taggable,
178
- "track-by": e.trackBy,
179
- class: "wt-tags-input__select"
180
- }, j(i.listeners)), q({
181
- tag: a(({ option: s, remove: C }) => [
182
- o(L, { class: "multiselect__custom-tag" }, {
183
- default: a(() => [
184
- d(r(u.getTagOptionLabel({ option: s, optionLabel: e.optionLabel })) + " ", 1),
185
- o(m, {
186
- color: "on-primary",
187
- icon: "close--filled",
188
- size: "sm",
189
- onClick: (W) => C(s)
190
- }, null, 8, ["onClick"])
191
- ], void 0, !0),
192
- _: 2
193
- }, 1024)
194
- ]),
195
- option: a(({ option: s }) => [
196
- b(i.$slots, "option", f($({ option: s, optionLabel: e.optionLabel })), () => [
197
- d(r(u.getTagOptionLabel({ option: s, optionLabel: e.optionLabel })), 1)
198
- ], !0)
199
- ]),
200
- caret: a(({ toggle: s }) => [
201
- o(m, {
202
- disabled: i.disabled,
203
- class: "multiselect__select",
204
- color: "active",
205
- icon: "arrow-down",
206
- onMousedown: N(s, ["prevent", "stop"])
207
- }, null, 8, ["disabled", "onMousedown"])
208
- ]),
209
- beforeList: a(() => [
210
- V(w("div", F, [
211
- o(M, { size: "sm" })
212
- ], 512), [
213
- [H, i.isLoading]
214
- ])
215
- ]),
216
- _: 2
217
- }, [
218
- i.showIntersectionObserver ? {
219
- name: "afterList",
220
- fn: a(() => [
221
- V(w("div", null, null, 512), [
222
- [T, i.handleAfterListIntersect]
223
- ])
224
- ]),
225
- key: "0"
226
- } : void 0
227
- ]), 1040, ["disabled", "internal-search", "label", "model-value", "multiple", "options", "placeholder", "taggable", "track-by"]),
228
- i.isValidation && i.validationText ? (v(), p(k, {
229
- key: 1,
230
- color: i.validationTextColor,
231
- variant: i.MessageVariant.SIMPLE,
232
- size: i.ComponentSize.SM
233
- }, {
234
- default: a(() => [
235
- d(r(i.validationText), 1)
236
- ], void 0, !0),
237
- _: 1
238
- }, 8, ["color", "variant", "size"])) : c("", !0)
239
- ], 2);
240
- }
241
- const Y = /* @__PURE__ */ E(x, [["render", J], ["__scopeId", "data-v-ded5a365"]]);
242
- export {
243
- Y as default
244
- };
@@ -1,275 +0,0 @@
1
- import { defineComponent as z, computed as L, ref as J, onMounted as K, watch as Q, resolveComponent as I, createElementBlock as v, openBlock as i, Fragment as x, createElementVNode as D, withDirectives as X, renderSlot as T, createBlock as w, createCommentVNode as b, renderList as A, normalizeClass as M, toDisplayString as O, createVNode as Y, withCtx as W, createSlots as U, normalizeProps as q, guardReactiveProps as F, vShow as Z, unref as N } from "vue";
2
- import { d as P } from "./index-LgFKTZzs.js";
3
- import { W as _, _ as R } from "./install-Cu0d6sby.js";
4
- const ee = { class: "wt-tree-line" }, te = { class: "wt-tree-line__icon-wrapper" }, ae = { class: "wt-tree-line__label typo-body-1" }, le = /* @__PURE__ */ z({
5
- __name: "wt-tree-line",
6
- props: {
7
- modelValue: {},
8
- data: {},
9
- itemLabel: {},
10
- itemData: {},
11
- childrenProp: { default: "children" },
12
- nestedLevel: { default: 0 },
13
- lastChild: { type: Boolean, default: !1 },
14
- selectedParent: { type: Boolean, default: !1 },
15
- nestedIcons: {},
16
- nextElement: { type: Boolean, default: !1 },
17
- multiple: { type: Boolean, default: !1 },
18
- allowParent: { type: Boolean, default: !1 },
19
- searchedProp: { default: "searched" },
20
- rootData: {}
21
- },
22
- emits: ["openParent", "update:modelValue"],
23
- setup(t, { emit: E }) {
24
- const e = t, u = E, $ = L(
25
- () => e.itemLabel ? e.data[e.itemLabel] : e.data
26
- ), B = L(() => {
27
- const a = e.nestedIcons ? [
28
- ...e.nestedIcons
29
- ] : [];
30
- return e.nestedLevel === 0 || a.push({
31
- icon: "tree-line",
32
- hidden: !e.nextElement
33
- }), a;
34
- }), g = () => Array.isArray(e.modelValue) ? e.itemData ? e.modelValue.includes(e.data[e.itemData]) : !!e.modelValue.find((l) => P(l, e.data)) : !1, n = L(() => e.multiple ? g() : e.itemData ? e.data[e.itemData] === e.modelValue : P(e.modelValue, e.data)), f = L(() => e.multiple ? n.value : n.value || e.selectedParent), m = (a, l, d) => {
35
- const r = e.itemData ? a[e.itemData] : a;
36
- if (l)
37
- d.some((o) => P(o, r)) || d.push(r);
38
- else {
39
- const o = d.findIndex((c) => P(c, r));
40
- o !== -1 && d.splice(o, 1);
41
- }
42
- if (a && Array.isArray(a[e.childrenProp]) && a[e.childrenProp].length)
43
- for (const o of a[e.childrenProp])
44
- m(o, l, d);
45
- }, s = (a, l, d) => {
46
- const r = (o, c) => {
47
- if (o === a) {
48
- if (c) {
49
- const h = e.itemData ? c[e.itemData] : c, y = d.findIndex((H) => P(H, h));
50
- y !== -1 && d.splice(y, 1);
51
- }
52
- return !0;
53
- }
54
- if (o && Array.isArray(o[e.childrenProp]) && o[e.childrenProp].length) {
55
- for (const h of o[e.childrenProp])
56
- if (r(h, o))
57
- return !0;
58
- }
59
- return !1;
60
- };
61
- r(l, null);
62
- }, k = () => {
63
- const a = n.value, l = [
64
- ...e.modelValue
65
- ];
66
- m(e.data, !a, l), a && s(e.data, e.rootData, l), u("update:modelValue", l);
67
- }, V = () => {
68
- const a = e.itemData ? e.data[e.itemData] : e.data;
69
- let l;
70
- if (e.itemData ? l = e.modelValue.indexOf(e.data[e.itemData]) : l = e.modelValue.findIndex(
71
- (r) => P(r, e.data)
72
- ), l === -1) {
73
- const r = [
74
- ...e.modelValue
75
- ];
76
- r.push(a), u("update:modelValue", r);
77
- return;
78
- }
79
- const d = [
80
- ...e.modelValue
81
- ];
82
- d.splice(l, 1), u("update:modelValue", d);
83
- }, j = () => {
84
- if (e.multiple) {
85
- e.data[e.childrenProp]?.length ? k() : V();
86
- return;
87
- }
88
- if (e.allowParent && !e.data[e.childrenProp])
89
- return u(
90
- "update:modelValue",
91
- e.itemData ? e.data[e.itemData] : e.data
92
- );
93
- if (e.data[e.childrenProp]?.length) {
94
- p.value = !p.value;
95
- return;
96
- }
97
- u(
98
- "update:modelValue",
99
- e.itemData ? e.data[e.itemData] : e.data
100
- );
101
- }, p = J(!0), C = () => {
102
- e.nestedLevel > 0 && u("openParent");
103
- }, G = () => {
104
- p.value = !1, C();
105
- };
106
- return K(() => {
107
- n.value && C(), e.searchedProp && e.data[e.searchedProp] && C();
108
- }), Q(
109
- () => e.modelValue,
110
- () => {
111
- n.value && C();
112
- }
113
- ), (a, l) => {
114
- const d = I("wt-icon"), r = I("wt-icon-btn"), o = I("wt-tree-line", !0);
115
- return i(), v(x, null, [
116
- D("div", ee, [
117
- D("div", te, [
118
- (i(!0), v(x, null, A(t.nestedIcons, (c, h) => (i(), w(d, {
119
- key: h,
120
- icon: c.icon,
121
- class: M({ hidden: c.hidden })
122
- }, null, 8, ["icon", "class"]))), 128)),
123
- t.nestedLevel >= 1 ? (i(), w(d, {
124
- key: 0,
125
- icon: t.lastChild ? "tree-corner" : "tree-cross"
126
- }, null, 8, ["icon"])) : b("", !0),
127
- t.data[t.childrenProp] && t.data[t.childrenProp].length ? (i(), w(r, {
128
- key: 1,
129
- icon: p.value ? "plus" : "minus",
130
- onClick: l[0] || (l[0] = (c) => p.value = !p.value)
131
- }, null, 8, ["icon"])) : b("", !0)
132
- ]),
133
- T(a.$slots, "item-prefix", {
134
- class: "mr-1",
135
- data: t.data,
136
- rootData: t.rootData || t.data,
137
- nestedLevel: t.nestedLevel,
138
- active: f.value,
139
- hasChildren: !!(t.data[t.childrenProp] && t.data[t.childrenProp].length),
140
- selectedParent: t.selectedParent
141
- }, void 0, !0),
142
- D("div", {
143
- class: M([{
144
- active: f.value,
145
- searched: e.data[e.searchedProp]
146
- }, "wt-tree-line__label-wrapper"]),
147
- onClick: j
148
- }, [
149
- D("p", ae, O($.value), 1),
150
- f.value ? (i(), w(d, {
151
- key: 0,
152
- icon: "chat-message-status-sent"
153
- })) : b("", !0)
154
- ], 2)
155
- ]),
156
- X(Y(_, null, {
157
- default: W(() => [
158
- D("div", null, [
159
- (i(!0), v(x, null, A(t.data[t.childrenProp], (c, h) => (i(), w(o, {
160
- key: h,
161
- "model-value": t.modelValue,
162
- data: c,
163
- "children-prop": t.childrenProp,
164
- "item-label": t.itemLabel,
165
- "item-data": t.itemData,
166
- "nested-level": t.nestedLevel + 1,
167
- "selected-parent": n.value || t.selectedParent,
168
- "next-element": !!t.data[t.childrenProp][h + 1],
169
- "nested-icons": B.value,
170
- "last-child": h === t.data[t.childrenProp].length - 1,
171
- multiple: t.multiple,
172
- "allow-parent": t.allowParent,
173
- "root-data": t.rootData || t.data,
174
- onOpenParent: G,
175
- "onUpdate:modelValue": l[1] || (l[1] = (y) => u("update:modelValue", y))
176
- }, U({ _: 2 }, [
177
- a.$slots["item-prefix"] ? {
178
- name: "item-prefix",
179
- fn: W((y) => [
180
- T(a.$slots, "item-prefix", q(F(y)), void 0, !0)
181
- ]),
182
- key: "0"
183
- } : void 0
184
- ]), 1032, ["model-value", "data", "children-prop", "item-label", "item-data", "nested-level", "selected-parent", "next-element", "nested-icons", "last-child", "multiple", "allow-parent", "root-data"]))), 128))
185
- ])
186
- ], void 0, !0),
187
- _: 3
188
- }, 512), [
189
- [Z, !p.value]
190
- ])
191
- ], 64);
192
- };
193
- }
194
- }), ne = /* @__PURE__ */ R(le, [["__scopeId", "data-v-ced3d83b"]]), S = {
195
- Tree: "tree",
196
- List: "list"
197
- }, ie = { class: "wt-tree" }, de = {
198
- key: 0,
199
- class: "wt-tree__content"
200
- }, oe = {
201
- key: 1,
202
- class: "wt-tree__list-content"
203
- }, re = ["onClick"], se = /* @__PURE__ */ z({
204
- __name: "wt-tree",
205
- props: {
206
- modelValue: {},
207
- data: {},
208
- itemLabel: {},
209
- itemData: {},
210
- mode: { default: S.Tree },
211
- childrenProp: { default: "children" },
212
- multiple: { type: Boolean },
213
- allowParent: { type: Boolean, default: !1 }
214
- },
215
- emits: ["select", "update:modelValue"],
216
- setup(t, { emit: E }) {
217
- const e = t, u = E, $ = L(() => {
218
- const n = [], f = (m) => {
219
- n.push(m), m[e.childrenProp] && m[e.childrenProp].forEach((s) => {
220
- f(s);
221
- });
222
- };
223
- return e.data.forEach((m) => {
224
- f(m);
225
- }), n;
226
- }), B = (n) => {
227
- u("update:modelValue", e.itemData ? n[e.itemData] : n);
228
- }, g = (n) => e.itemData ? n[e.itemData] === e.modelValue : P(e.modelValue, n);
229
- return (n, f) => {
230
- const m = I("wt-icon");
231
- return i(), v("div", ie, [
232
- t.mode === N(S).Tree ? (i(), v("div", de, [
233
- (i(!0), v(x, null, A(t.data, (s, k) => (i(), w(ne, {
234
- key: k,
235
- "model-value": t.modelValue,
236
- "item-label": t.itemLabel,
237
- "item-data": t.itemData,
238
- data: s,
239
- "children-prop": t.childrenProp,
240
- multiple: t.multiple,
241
- "allow-parent": t.allowParent,
242
- "onUpdate:modelValue": f[0] || (f[0] = (V) => u("update:modelValue", V))
243
- }, U({ _: 2 }, [
244
- n.$slots["item-prefix"] ? {
245
- name: "item-prefix",
246
- fn: W((V) => [
247
- T(n.$slots, "item-prefix", q(F(V)), void 0, !0)
248
- ]),
249
- key: "0"
250
- } : void 0
251
- ]), 1032, ["model-value", "item-label", "item-data", "data", "children-prop", "multiple", "allow-parent"]))), 128))
252
- ])) : b("", !0),
253
- t.mode === N(S).List ? (i(), v("div", oe, [
254
- (i(!0), v(x, null, A($.value, (s, k) => (i(), v("span", {
255
- key: k,
256
- class: M(["wt-tree__label-wrapper", { active: g(s) }])
257
- }, [
258
- D("p", {
259
- class: "wt-tree__label",
260
- onClick: (V) => B(s)
261
- }, O(t.itemLabel ? s[t.itemLabel] : s), 9, re),
262
- g(s) ? (i(), w(m, {
263
- key: 0,
264
- icon: "chat-message-status-sent",
265
- class: "wt-tree__label-icon"
266
- })) : b("", !0)
267
- ], 2))), 128))
268
- ])) : b("", !0)
269
- ]);
270
- };
271
- }
272
- }), fe = /* @__PURE__ */ R(se, [["__scopeId", "data-v-f86ae40a"]]);
273
- export {
274
- fe as default
275
- };
@@ -1,123 +0,0 @@
1
- import { defineComponent as q, mergeModels as I, useModel as T, computed as r, resolveComponent as h, createBlock as P, renderSlot as m, createCommentVNode as $, unref as l, openBlock as S, mergeProps as s, createVNode as c } from "vue";
2
- import { S as x } from "./contacts-x411Rwez.js";
3
- import "./index-D_POp8ob.js";
4
- import "lodash-es";
5
- import "@aliasedDeps/api-services/axios";
6
- import { B as N, a8 as W, a9 as V, aa as E } from "./install-Cu0d6sby.js";
7
- const a = {
8
- Text: "string",
9
- Number: "int32",
10
- Select: "lookup",
11
- Multiselect: "list",
12
- Calendar: "datetime",
13
- Boolean: "bool"
14
- }, F = /* @__PURE__ */ q({
15
- __name: "wt-type-extension-value-input",
16
- props: /* @__PURE__ */ I({
17
- field: {},
18
- label: {},
19
- required: { type: Boolean },
20
- v: {}
21
- }, {
22
- modelValue: {},
23
- modelModifiers: {}
24
- }),
25
- emits: ["update:modelValue"],
26
- setup(u) {
27
- const f = T(u, "modelValue"), n = u;
28
- n.v?.$touch();
29
- const { t: B } = N(), C = r(() => n.label || B(n.field?.name || "vocabulary.labels")), M = r(() => n.required ?? n.field.required), o = r(() => f.value), t = r(() => ({
30
- label: C.value,
31
- required: M.value,
32
- v: n.v
33
- })), k = r(() => ({
34
- clearable: !0,
35
- trackBy: "id",
36
- searchMethod: () => b(n.field.lookup)
37
- })), y = r(() => ({
38
- ...k.value,
39
- multiple: !0
40
- })), d = (e) => {
41
- f.value = e;
42
- }, b = ({ path: e, display: i, primary: v }) => (p) => x.getSysTypeRecordsLookup({
43
- ...p,
44
- path: e,
45
- display: i,
46
- primary: v
47
- }), w = (e) => {
48
- if (Object.values(e).length === 0)
49
- return d(null);
50
- d({
51
- id: e.id,
52
- name: e.name
53
- });
54
- }, g = (e) => {
55
- d(
56
- e.map((i) => ({
57
- id: i.id,
58
- name: i.name
59
- }))
60
- );
61
- };
62
- return (e, i) => {
63
- const v = h("wt-input-text"), p = h("wt-input-number");
64
- return u.field.kind === l(a).Text ? (S(), P(v, s({ key: 0 }, t.value, {
65
- "model-value": o.value,
66
- "onUpdate:modelValue": d
67
- }), null, 16, ["model-value"])) : u.field.kind === l(a).Number ? (S(), P(p, s({ key: 1 }, t.value, {
68
- "model-value": o.value,
69
- "onUpdate:modelValue": d
70
- }), null, 16, ["model-value"])) : u.field.kind === l(a).Boolean ? m(e.$slots, l(a).Boolean, {
71
- key: 2,
72
- defaultProps: { ...t.value }
73
- }, () => [
74
- c(l(W), s(t.value, {
75
- "model-value": o.value,
76
- "onUpdate:modelValue": d
77
- }), null, 16, ["model-value"])
78
- ]) : u.field.kind === l(a).Select ? m(e.$slots, l(a).Select, {
79
- key: 3,
80
- defaultProps: {
81
- ...t.value,
82
- ...k.value,
83
- value: o.value
84
- }
85
- }, () => [
86
- c(l(V), s(t.value, {
87
- value: o.value,
88
- "search-method": b(u.field.lookup),
89
- "track-by": "id",
90
- clearable: "",
91
- onInput: w
92
- }), null, 16, ["value", "search-method"])
93
- ]) : u.field.kind === l(a).Multiselect ? m(e.$slots, l(a).Multiselect, {
94
- key: 4,
95
- defaultProps: {
96
- ...t.value,
97
- ...y.value,
98
- value: o.value
99
- }
100
- }, () => [
101
- c(l(V), s({ ...t.value, ...y.value }, {
102
- value: o.value,
103
- onInput: g
104
- }), null, 16, ["value"])
105
- ]) : u.field.kind === l(a).Calendar ? m(e.$slots, l(a).Calendar, {
106
- key: 5,
107
- defaultProps: {
108
- ...t.value,
109
- value: o.value
110
- }
111
- }, () => [
112
- c(l(E), s(t.value, {
113
- value: o.value,
114
- mode: "datetime",
115
- onInput: d
116
- }), null, 16, ["value"])
117
- ]) : $("", !0);
118
- };
119
- }
120
- });
121
- export {
122
- F as default
123
- };