@webitel/ui-sdk 26.6.58 → 26.6.60

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 (53) hide show
  1. package/dist/{clients-CX7SniM1.js → clients-DPvJvOx5.js} +2 -2
  2. package/dist/{components-reoSYpZx.js → components-DOO_6hoi.js} +1133 -2403
  3. package/dist/{enums-CBWwTuq7.js → enums-BwgSueOO.js} +32 -28
  4. package/dist/{generateInstance-DpLUt03M.js → generateInstance-C9d7J_TX.js} +1134 -866
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.js +4 -4
  7. package/dist/ui-sdk.umd.cjs +540 -541
  8. package/dist/{useValidation-B0voza7s.js → useValidation-Hdk6hzmc.js} +1 -1
  9. package/dist/{wt-action-bar-B17FBHD7.js → wt-action-bar-Dbt6CgEp.js} +2 -2
  10. package/dist/{wt-button-0kP5bPMs.js → wt-button-BgDPcxu9.js} +2 -2
  11. package/dist/{wt-chat-emoji-C_fb9LZF.js → wt-chat-emoji-BnQcxXLU.js} +4 -4
  12. package/dist/{wt-datepicker-baNcFWZ1.js → wt-datepicker-BjbWDS8B.js} +2 -2
  13. package/dist/{wt-display-chip-items-CgrbKQ5R.js → wt-display-chip-items-qXM0MwuL.js} +1 -1
  14. package/dist/{wt-dual-panel-C5LZm1Tr.js → wt-dual-panel-C54Hwdwc.js} +1 -1
  15. package/dist/{wt-expansion-card-C2qETdn0.js → wt-expansion-card-CVPU9twV.js} +1 -1
  16. package/dist/{wt-expansion-panel-Dvzj9PTk.js → wt-expansion-panel-B1u06Hz8.js} +1 -1
  17. package/dist/{wt-icon-DIdpwmpC.js → wt-icon-BvXjK8Em.js} +1 -1
  18. package/dist/{wt-icon-action-C8WN2oVD.js → wt-icon-action-mNjxBL1c.js} +1 -1
  19. package/dist/{wt-icon-btn-BLnhJADA.js → wt-icon-btn-B6tKLQWp.js} +1 -1
  20. package/dist/{wt-notifications-bar-Dx1YPqFu.js → wt-notifications-bar-DcvWx8Qw.js} +2 -2
  21. package/dist/{wt-player-CCwEyUzv.js → wt-player-4BH0EIfk.js} +3 -3
  22. package/dist/{wt-search-bar-CiQJ9ViN.js → wt-search-bar-CPfD4657.js} +1 -1
  23. package/dist/{wt-send-message-popup-CIH2cusg.js → wt-send-message-popup-MrXwTh6z.js} +2 -2
  24. package/dist/wt-status-select-DCiMHd9K.js +77 -0
  25. package/dist/{wt-timepicker-DyM1OQX4.js → wt-timepicker-4bwYBaKQ.js} +2 -2
  26. package/dist/{wt-toast-KTAx-8zA.js → wt-toast-CdwZ-muC.js} +2 -2
  27. package/dist/{wt-tree-table-BlZEw4tr.js → wt-tree-table-CTCLe3FC.js} +1 -1
  28. package/dist/{wt-type-extension-value-input-Dw24yOLg.js → wt-type-extension-value-input-EKmzk5WF.js} +3 -3
  29. package/dist/{wt-vidstack-player-CLtfGaGj.js → wt-vidstack-player-DK-S0uAl.js} +4 -4
  30. package/package.json +2 -2
  31. package/src/components/index.js +0 -3
  32. package/src/components/wt-indicator/_variables.css +7 -2
  33. package/src/components/wt-single-select/wt-single-select.vue +7 -0
  34. package/src/components/wt-status-select/__tests__/WtStatusSelect.spec.js +3 -3
  35. package/src/components/wt-status-select/_internals/StatusOptions.lookup.js +1 -1
  36. package/src/components/wt-status-select/wt-status-select.vue +80 -139
  37. package/src/css/components-variables.css +0 -1
  38. package/types/components/wt-single-select/wt-single-select.vue.d.ts +1 -0
  39. package/types/components/wt-status-select/wt-status-select.vue.d.ts +21 -1
  40. package/dist/AgentStatus.enum-C3IGHtvR.js +0 -9
  41. package/dist/wt-status-select-A5t6Vjm4.js +0 -101
  42. package/src/components/wt-select/__tests__/WtSelect.spec.js +0 -30
  43. package/src/components/wt-select/_variables.css +0 -12
  44. package/src/components/wt-select/mixins/__tests__/multiselectMixin.spec.js +0 -50
  45. package/src/components/wt-select/mixins/multiselectMixin.js +0 -279
  46. package/src/components/wt-select/multiselect.css +0 -239
  47. package/src/components/wt-select/wt-select.vue +0 -386
  48. package/src/components/wt-tags-input/mixin/taggableMixin.js +0 -43
  49. package/types/components/wt-select/__tests__/WtSelect.spec.d.ts +0 -1
  50. package/types/components/wt-select/mixins/__tests__/multiselectMixin.spec.d.ts +0 -1
  51. package/types/components/wt-select/mixins/multiselectMixin.d.ts +0 -129
  52. package/types/components/wt-select/wt-select.vue.d.ts +0 -229
  53. package/types/components/wt-tags-input/mixin/taggableMixin.d.ts +0 -7
@@ -1,279 +0,0 @@
1
- import VueMultiselect from 'vue-multiselect';
2
- import { ObserveVisibility } from 'vue-observe-visibility';
3
-
4
- import debounce from '../../../scripts/debounce.js';
5
- import isEmpty from '../../../scripts/isEmpty.js';
6
- import labelUsageMixin from '../../wt-label/mixins/labelUsageMixin.js';
7
-
8
- export default {
9
- mixins: [
10
- labelUsageMixin,
11
- ],
12
- directives: {
13
- ObserveVisibility,
14
- },
15
- components: {
16
- VueMultiselect,
17
- },
18
- props: {
19
- options: {
20
- type: Array,
21
- default: () => [],
22
- },
23
-
24
- placeholder: {
25
- type: String,
26
- default: '',
27
- },
28
-
29
- trackBy: {
30
- type: String,
31
- default: 'id',
32
- },
33
-
34
- optionLabel: {
35
- type: String,
36
- },
37
-
38
- searchMethod: {
39
- type: Function,
40
- },
41
-
42
- disabled: {
43
- type: Boolean,
44
- default: false,
45
- },
46
-
47
- required: {
48
- type: Boolean,
49
- default: false,
50
- },
51
-
52
- allowEmpty: {
53
- type: Boolean,
54
- default: false,
55
- },
56
- /**
57
- * pass "value" prop as string, receive @input event with string,
58
- * but pass options as objects and calculate value from options by this prop
59
- */
60
- useValueFromOptionsByProp: {
61
- type: String,
62
- default: '',
63
- },
64
- },
65
- data: () => ({
66
- apiOptions: [],
67
- cachedOptionsMap: {}, // is needed for props.useValueFromOptionsByProp
68
- isLoading: false,
69
- defaultOptionLabel: 'name',
70
-
71
- searchParams: {
72
- search: '',
73
- page: 1,
74
- },
75
- searchHasNext: true,
76
- // https://webitel.atlassian.net/browse/WTEL-9569
77
- // prevents cascade page loads when the sentinel stays visible after a page appends to the list
78
- _canLoadNext: true,
79
- }),
80
- computed: {
81
- selectOptionLabel() {
82
- // trackBy === null means that options are not objects but primitives
83
- if (this.trackBy === null) return null;
84
- return this.optionLabel || this.defaultOptionLabel;
85
- },
86
- isApiMode() {
87
- return !!this.searchMethod;
88
- },
89
- showIntersectionObserver() {
90
- return this.isApiMode && !this.isLoading && this.apiOptions.length;
91
- },
92
- selectValue() {
93
- /* vue-multiselect doesn't show placeholder if value is empty object */
94
- if (!this.isValue) return '';
95
-
96
- let returnedValue = this.value;
97
-
98
- /*
99
- coerce single value to array, if it was passed with `multiple` prop
100
- by dev mistake or internal error
101
- */
102
- if (this.multiple && !Array.isArray(returnedValue)) {
103
- console.warn(
104
- 'wt-select: value prop should be an array when using multiple mode',
105
- );
106
- returnedValue = [
107
- returnedValue,
108
- ];
109
- }
110
-
111
- if (this.useValueFromOptionsByProp) {
112
- if (this.multiple) {
113
- returnedValue = returnedValue.map(
114
- (item) => this.cachedOptionsMap[item] || item,
115
- );
116
- } else {
117
- returnedValue = this.cachedOptionsMap[returnedValue] || returnedValue;
118
- }
119
- }
120
-
121
- return returnedValue;
122
- },
123
-
124
- selectOptions() {
125
- return this.isApiMode ? this.apiOptions : this.options;
126
- },
127
-
128
- isValue() {
129
- return !isEmpty(this.value);
130
- },
131
- listeners() {
132
- return {
133
- 'update:model-value': this.input,
134
- close: this.close,
135
- tag: this.tag,
136
- 'search-change': (search) => {
137
- this.$emit('search-change', search);
138
- this.handleSearchChange(search);
139
- },
140
- };
141
- },
142
- },
143
-
144
- methods: {
145
- getOptionLabel({ option, optionLabel }) {
146
- // https://webitel.atlassian.net/browse/WTEL-3181
147
- // if allowCustomValue select mode, return vue-multiselect label as is
148
- if (this.allowCustomValues && option.isTag) return option.label;
149
-
150
- if (optionLabel && option[optionLabel]) return option[optionLabel];
151
- if (option.locale) {
152
- if (Array.isArray(option.locale)) return this.$t(...option.locale);
153
- return this.$t(option.locale);
154
- }
155
- return option[this.defaultOptionLabel] || option;
156
- },
157
- handleSearchChange(search) {
158
- // search can be used in non-api mode too
159
- this.searchParams.search = search;
160
-
161
- if (!this.isApiMode) return;
162
- this.isLoading = true;
163
- this.searchParams.page = 1;
164
- // block auto-load until sentinel leaves the viewport: list is being reset,
165
- // so the sentinel may still be visible from the previous result set
166
- this._canLoadNext = false;
167
- this.fetchOptions();
168
- },
169
-
170
- handleAfterListIntersect(isVisible) {
171
- if (!isVisible) {
172
- // sentinel left the viewport — user scrolled up or list shrank;
173
- // next intersection will be a genuine scroll-to-bottom
174
- this._canLoadNext = true;
175
- return;
176
- }
177
- if (this.searchHasNext && this._canLoadNext) {
178
- // sentinel entered the viewport after user scrolled to the bottom
179
- this._canLoadNext = false;
180
- this.isLoading = true;
181
- this.searchParams.page += 1;
182
- this.fetchOptions();
183
- }
184
- },
185
-
186
- async fetchOptions({ search, page } = this.searchParams) {
187
- if (!this.isApiMode) return;
188
- const { items, next } = await this.searchMethod({
189
- search,
190
- page,
191
- });
192
- this.apiOptions =
193
- this.searchParams.page === 1 ? items : this.apiOptions.concat(items);
194
- this.searchHasNext = next;
195
- this.isLoading = false;
196
- },
197
-
198
- input(value) {
199
- let emittedValue = value;
200
- if (this.useValueFromOptionsByProp) {
201
- if (this.multiple) {
202
- emittedValue = value.map(
203
- (item) => item[this.useValueFromOptionsByProp],
204
- );
205
- } else {
206
- emittedValue = value[this.useValueFromOptionsByProp];
207
- }
208
- }
209
- this.$emit('input', emittedValue); // vue 2
210
- this.$emit('update:model-value', emittedValue); // vue 3
211
- },
212
-
213
- close(event) {
214
- this.$emit('closed', event);
215
- },
216
-
217
- tag() {},
218
- },
219
-
220
- watch: {
221
- disabled() {
222
- // load options if becomes enabled
223
- if (!this.disabled) this.fetchOptions();
224
- },
225
- selectOptions: {
226
- handler() {
227
- if (this.trackBy === null) return; // then, options are primitives
228
-
229
- for (const opt of this.selectOptions) {
230
- this.cachedOptionsMap[
231
- opt[this.useValueFromOptionsByProp || this.trackBy]
232
- ] = opt;
233
- }
234
- },
235
- immediate: true,
236
- },
237
- value: {
238
- async handler() {
239
- /*
240
- use case: select api option while using `useValueFromOptionsByProp` prop,
241
- then, refresh page and restore selected id. but it may not be in options list,
242
-
243
- when using api-fetched options, selected value, tracked by id,
244
- may be not in returned options list,
245
- so its necessary to fetch those values separately
246
- */
247
- if (this.useValueFromOptionsByProp && this.isApiMode) {
248
- const valuesArr = Array.isArray(this.value)
249
- ? this.value
250
- : [
251
- this.value,
252
- ];
253
- const uncachedValues = valuesArr.filter(() => {
254
- return !this.cachedOptionsMap[this.value];
255
- });
256
-
257
- if (uncachedValues.length) {
258
- const { items } = await this.searchMethod({
259
- id: uncachedValues,
260
- size: uncachedValues.length,
261
- });
262
- items.forEach((item) => {
263
- this.cachedOptionsMap[item[this.useValueFromOptionsByProp]] =
264
- item;
265
- });
266
- }
267
- }
268
- },
269
- immediate: true,
270
- },
271
- },
272
-
273
- created() {
274
- // load options only if not disabled
275
- if (!this.disabled) this.fetchOptions();
276
-
277
- this.fetchOptions = debounce(this.fetchOptions, 500);
278
- },
279
- };
@@ -1,239 +0,0 @@
1
- /* THIS FILE IS ADDED TO BIOME IGNORE coz it fails to parse Vue :deep() selector*/
2
-
3
- :deep(.multiselect) {
4
- position: relative;
5
- cursor: pointer;
6
- }
7
-
8
- :deep(.multiselect) .multiselect__select {
9
- position: absolute;
10
- top: var(--select-icon-top-pos);
11
- right: var(--select-caret-right-pos);
12
- transition: var(--transition);
13
- background: transparent;
14
- padding: 0;
15
- /* reset default */
16
- width: fit-content;
17
- /* reset default */
18
- height: fit-content;
19
- /* reset default */
20
- }
21
-
22
- :deep(.multiselect) .multiselect__select::before {
23
- display: none;
24
- /* reset default */
25
- }
26
-
27
- :deep(.multiselect) .multiselect__limit {
28
- position: absolute;
29
- top: var(--select-chip-top-pos);
30
- }
31
-
32
- :deep(.multiselect) .multiselect__clear {
33
- position: absolute;
34
- top: var(--select-icon-top-pos);
35
- z-index: 1;
36
- }
37
-
38
- /* visible select input wrapper */
39
- :deep(.multiselect) .multiselect__tags {
40
- border: var(--select-tags-border);
41
- border-color: var(--wt-text-field-input-border-color);
42
- border-radius: var(--border-radius);
43
- background: transparent;
44
- padding: calc(var(--spacing-xs) - 1px);
45
- /* borders */
46
- }
47
-
48
- :deep(.multiselect) .multiselect__input,
49
- :deep(.multiselect) .multiselect__single,
50
- :deep(.multiselect) .multiselect__placeholder {
51
- /* typo-body-1 */
52
- font-family: 'Montserrat', monospace;
53
- font-size: 14px;
54
- font-weight: 400;
55
- line-height: 24px;
56
- text-transform: none;
57
- margin: 0;
58
- /* reset default */
59
- background: transparent;
60
- padding: 0;
61
- /* reset default */
62
- color: var(--wt-text-field-text-color);
63
- }
64
-
65
- :deep(.multiselect) .multiselect__input::placeholder,
66
- :deep(.multiselect) .multiselect__input::-webkit-input-placeholder,
67
- :deep(.multiselect) .multiselect__input::-moz-placeholder,
68
- :deep(.multiselect) .multiselect__input:-moz-placeholder,
69
- :deep(.multiselect) .multiselect__input:-ms-input-placeholder {
70
- font: inherit;
71
- transition: var(--transition);
72
- color: var(--wt-text-field-placeholder-color);
73
- }
74
-
75
- :deep(.multiselect) .multiselect__custom-tag,
76
- :deep(.multiselect) .multiselect__single-label {
77
- color: var(--wt-text-field-text-color);
78
- }
79
-
80
- :deep(.multiselect) .multiselect__placeholder {
81
- /* wt-placeholder */
82
- transition: var(--transition);
83
- color: var(--wt-text-field-placeholder-color);
84
- display: block;
85
- max-width: 100%;
86
- overflow: hidden;
87
- text-overflow: ellipsis;
88
- /* text overflow 3 dots */
89
- white-space: nowrap;
90
- }
91
-
92
- /* select options wrapper */
93
- :deep(.multiselect) .multiselect__content-wrapper {
94
- /* wt-distant-scrollbar */
95
- transition: var(--transition);
96
- box-shadow: var(--elevation-10);
97
- border: var(--select-tags-border);
98
- border-color: var(--wt-text-field-select-option-wrapper-border-color);
99
- border-radius: var(--border-radius);
100
- background: transparent;
101
- }
102
-
103
- :deep(.multiselect) .multiselect__content-wrapper::-webkit-scrollbar {
104
- width: 14px;
105
- height: 18px;
106
- background-color: var(--scrollbar-bg-color);
107
- }
108
-
109
- :deep(.multiselect) .multiselect__content-wrapper::-webkit-scrollbar-thumb {
110
- height: 2px;
111
- border: 4px solid rgba(0, 0, 0, 0);
112
- border-radius: var(--scrollbar-border-radius);
113
- background-color: var(--scrollbar-thumb-color);
114
- background-clip: padding-box;
115
- }
116
-
117
- /* select options */
118
- :deep(.multiselect) .multiselect__option {
119
- /* typo-body-1 */
120
- font-family: 'Montserrat', monospace;
121
- font-size: 14px;
122
- font-weight: 400;
123
- line-height: 24px;
124
- text-transform: none;
125
- background: var(--wt-text-field-select-option-background-color);
126
- padding: var(--select-options-padding);
127
- color: var(--wt-text-field-select-option-text-color);
128
- }
129
-
130
- :deep(.multiselect) .multiselect__option::after {
131
- display: none;
132
- }
133
-
134
- :deep(.multiselect) .multiselect__option--highlight {
135
- background: var(--wt-text-field-select-option-background-hover-color);
136
- color: var(--wt-text-field-select-option-text-hover-color);
137
- }
138
-
139
- :deep(.multiselect) .multiselect__option--selected {
140
- background: var(--wt-text-field-select-option-background-selected-color);
141
- color: var(--wt-text-field-select-option-text-selected-color);
142
- font-weight: normal;
143
- /* reset */
144
- }
145
-
146
- :deep(.multiselect--active) .multiselect__select.multiselect__arrow .wt-icon {
147
- fill: var(--icon-active-color);
148
- }
149
-
150
- :deep(.multiselect--active) .multiselect__select.multiselect__custom-value {
151
- transform: none;
152
- }
153
-
154
- .wt-select--loading :deep(.multiselect) .multiselect__content-wrapper,
155
- .wt-tags-input--loading :deep(.multiselect) .multiselect__content-wrapper {
156
- overflow-y: hidden;
157
- }
158
-
159
- .wt-select--loading :deep(.multiselect) .multiselect__loading-wrapper,
160
- .wt-tags-input--loading :deep(.multiselect) .multiselect__loading-wrapper {
161
- display: flex;
162
- position: sticky;
163
- top: 0;
164
- left: 0;
165
- justify-content: center;
166
- align-items: center;
167
- z-index: 1;
168
- backdrop-filter: blur(4px);
169
- width: 100%;
170
- height: 300px;
171
- /* max dropdown panel height */
172
- }
173
-
174
- .wt-select.wt-select--invalid :deep(.multiselect) .multiselect__tags,
175
- .wt-tags-input.wt-tags-input--invalid :deep(.multiselect) .multiselect__tags {
176
- outline: none;
177
- /* prevent outline overlapping false color */
178
- border-color: var(--wt-text-field-input-border-error-color);
179
- }
180
-
181
- .wt-select.wt-select--invalid :deep(.multiselect) .multiselect__custom-tag,
182
- .wt-select.wt-select--invalid :deep(.multiselect) .multiselect__single-label,
183
- .wt-tags-input.wt-tags-input--invalid :deep(.multiselect) .multiselect__custom-tag,
184
- .wt-tags-input.wt-tags-input--invalid :deep(.multiselect) .multiselect__single-label {
185
- color: var(--wt-text-field-placeholder-error-color);
186
- }
187
-
188
- .wt-select.wt-select--invalid :deep(.multiselect) .multiselect__placeholder,
189
- .wt-tags-input.wt-tags-input--invalid :deep(.multiselect) .multiselect__placeholder {
190
- /* wt-placeholder--error */
191
- transition: var(--transition);
192
- color: var(--wt-text-field-placeholder-error-color);
193
- }
194
-
195
- .wt-select--disabled,
196
- .wt-tags-input--disabled {
197
- pointer-events: none;
198
- }
199
-
200
- .wt-select--disabled .multiselect--disabled,
201
- .wt-tags-input--disabled .multiselect--disabled {
202
- opacity: 1;
203
- background: none;
204
- }
205
-
206
- .wt-select--disabled .multiselect__select,
207
- .wt-tags-input--disabled .multiselect__select {
208
- background: transparent;
209
- /* reset default */
210
- }
211
-
212
- .wt-select--disabled :deep(.multiselect) .multiselect__tags,
213
- .wt-tags-input--disabled :deep(.multiselect) .multiselect__tags {
214
- border-color: var(--wt-text-field-input-border-disabled-color);
215
- background: var(--wt-text-field-input-background-disabled-color);
216
- }
217
-
218
- .wt-select--disabled :deep(.multiselect) .multiselect__placeholder,
219
- .wt-tags-input--disabled :deep(.multiselect) .multiselect__placeholder {
220
- /* wt-placeholder--disabled */
221
- transition: var(--transition);
222
- color: var(--wt-text-field-placeholder-disabled-color);
223
- }
224
-
225
- /* override .wt-select colors on chips */
226
- .wt-tags-input :deep(.multiselect) .multiselect__tags .multiselect__custom-tag,
227
- .wt-tags-input :deep(.multiselect) .multiselect__tags .multiselect__single-label,
228
- .wt-tags-input--invalid :deep(.multiselect) .multiselect__tags .multiselect__custom-tag,
229
- .wt-tags-input--invalid :deep(.multiselect) .multiselect__tags .multiselect__single-label {
230
- color: var(--wt-chip-main-text-color);
231
- }
232
-
233
- .multiselect__custom-tag {
234
- display: block;
235
- overflow: hidden;
236
- max-width: 100%;
237
- white-space: nowrap;
238
- text-overflow: ellipsis;
239
- }