@webitel/ui-sdk 26.4.18 → 26.4.19

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 (147) hide show
  1. package/dist/{index-Dvhbo446.js → index-CeADjYK9.js} +1 -1
  2. package/dist/{index-B0AYwz58.js → index-DZ_bvNVs.js} +1 -1
  3. package/dist/{install-CrJnxpPS.js → install-Dofcp90y.js} +55 -61
  4. package/dist/{isObject-BsWrydYX.js → isObject-B2zd2O3f.js} +1 -1
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.js +1 -1
  7. package/dist/ui-sdk.umd.cjs +204 -204
  8. package/dist/{useVidstackSrc-Bmp2wHly.js → useVidstackSrc-D9uo15mF.js} +3 -4
  9. package/dist/{vidstack-Bq6c3Bam-N3JOOQyW.js → vidstack-Bq6c3Bam-Bs73fRdp.js} +3 -3
  10. package/dist/{vidstack-D2pY00kU-ByaRFZub.js → vidstack-D2pY00kU-BVC5bxHL.js} +3 -3
  11. package/dist/{vidstack-DDXt6fpN-H7PZzMEr.js → vidstack-DDXt6fpN-DA-lnlhX.js} +2 -2
  12. package/dist/{vidstack-D_-9AA6_-BgRVFwPt.js → vidstack-D_-9AA6_-C0QZLaX5.js} +2 -2
  13. package/dist/{vidstack-DqAw8m9J-BODJkoui.js → vidstack-DqAw8m9J-DAs7LwX_.js} +1 -1
  14. package/dist/{vidstack-audio-Cnpq73DL.js → vidstack-audio-BrbZotHa.js} +2 -2
  15. package/dist/{vidstack-dash-Bzo3Gzfd.js → vidstack-dash-KNjyvq2R.js} +4 -4
  16. package/dist/{vidstack-google-cast--giiu8Z5.js → vidstack-google-cast-DMZQ1jRD.js} +4 -4
  17. package/dist/{vidstack-hls-CrDFf1Gs.js → vidstack-hls-BfOysul0.js} +4 -4
  18. package/dist/{vidstack-video-h7Tsw5LU.js → vidstack-video-PWMSQ3Gk.js} +3 -3
  19. package/dist/{vidstack-vimeo-CbcdGN2R.js → vidstack-vimeo-C5Khtd48.js} +4 -4
  20. package/dist/{vidstack-youtube-DKzx3LPK.js → vidstack-youtube-CPcpsir2.js} +3 -3
  21. package/dist/{wt-action-bar-GCDVmO0b.js → wt-action-bar-By55sdZf.js} +1 -1
  22. package/dist/{wt-button-select-BBsJj7FV.js → wt-button-select-C34W0lYV.js} +1 -1
  23. package/dist/{wt-chat-emoji-MhnNs-SG.js → wt-chat-emoji-DjgWXA_2.js} +2 -2
  24. package/dist/{wt-confirm-dialog-B4J3ZU2r.js → wt-confirm-dialog-GNka4gxY.js} +1 -1
  25. package/dist/{wt-context-menu-Cekc6Rva.js → wt-context-menu-Bjl5aGzG.js} +1 -1
  26. package/dist/{wt-copy-action-CT_0bHmt.js → wt-copy-action-Xo2DsqJZ.js} +1 -1
  27. package/dist/{wt-datepicker-B513Tw-Z.js → wt-datepicker-CL3jLy5h.js} +1 -1
  28. package/dist/{wt-display-chip-items-CMB33VOU.js → wt-display-chip-items-CCNWd5Nt.js} +1 -1
  29. package/dist/{wt-dual-panel-DjHHFx8Y.js → wt-dual-panel-CMUeBmf-.js} +1 -1
  30. package/dist/{wt-dummy-BivOEKRK.js → wt-dummy-BOgeleXm.js} +1 -1
  31. package/dist/{wt-error-page-krwX0484.js → wt-error-page-Ctl0-_Yp.js} +1 -1
  32. package/dist/{wt-expansion-card-Mrne6YQJ.js → wt-expansion-card-BCOBdTuS.js} +1 -1
  33. package/dist/{wt-expansion-panel-D0SABYA1.js → wt-expansion-panel-C7W_5dxd.js} +1 -1
  34. package/dist/{wt-filters-panel-wrapper-Dffe4cS8.js → wt-filters-panel-wrapper-CkLHeV4o.js} +1 -1
  35. package/dist/{wt-galleria-CB3UNqGT.js → wt-galleria-Bls8Xxh4.js} +2 -2
  36. package/dist/{wt-navigation-menu-CozB-VN3.js → wt-navigation-menu-CFPMD9o1.js} +1 -1
  37. package/dist/{wt-notifications-bar-CBv9RpW3.js → wt-notifications-bar-BTDN7hSn.js} +2 -2
  38. package/dist/{wt-pagination-CrnHm3Ei.js → wt-pagination-DtjeKcpO.js} +1 -1
  39. package/dist/{wt-player-Be7Ts4oe.js → wt-player-Co3Ib7qU.js} +13 -13
  40. package/dist/{wt-screen-recordings-action-VJpYH40a.js → wt-screen-recordings-action-CmY7R2B-.js} +1 -1
  41. package/dist/{wt-search-bar-BNUpiOyg.js → wt-search-bar-CmN8Nq-n.js} +1 -1
  42. package/dist/{wt-selection-popup-DZG_s5cn.js → wt-selection-popup-BNKNa5jy.js} +1 -1
  43. package/dist/{wt-start-page-B1Ya211Z.js → wt-start-page-BC4r_EPK.js} +1 -1
  44. package/dist/{wt-status-select-ByEBtG_Z.js → wt-status-select-CBq_ihcS.js} +11 -14
  45. package/dist/{wt-stepper-Bke8hGIN.js → wt-stepper-DvmRISSE.js} +1 -1
  46. package/dist/{wt-table-rT0puxyU.js → wt-table-BDnXcyai.js} +14 -14
  47. package/dist/{wt-table-actions-D2QF78Jq.js → wt-table-actions-52X557c8.js} +1 -1
  48. package/dist/{wt-table-column-select-BtcIByjb.js → wt-table-column-select-vKGXHla2.js} +2 -2
  49. package/dist/{wt-tabs-BIn8m45h.js → wt-tabs-zXlsvaeU.js} +16 -17
  50. package/dist/{wt-tags-input-Bz3T5KC7.js → wt-tags-input-B8w0KXPv.js} +2 -2
  51. package/dist/{wt-timepicker-CuMYCWnA.js → wt-timepicker-Cm4aLsPK.js} +1 -1
  52. package/dist/{wt-tree-DftQx0vm.js → wt-tree-IVOTwA3x.js} +4 -4
  53. package/dist/{wt-tree-table-Cqt8iSLj.js → wt-tree-table-zA7HHvru.js} +3 -3
  54. package/dist/{wt-type-extension-value-input-rX_qRFjQ.js → wt-type-extension-value-input-DTmneCoP.js} +4 -7
  55. package/dist/{wt-vidstack-player-CWmoXIAG.js → wt-vidstack-player-DHmGgiDL.js} +13 -13
  56. package/package.json +3 -2
  57. package/src/api/clients/agents/agentChats.js +0 -1
  58. package/src/api/clients/agents/agents.js +1 -1
  59. package/src/api/clients/caseSources/caseSources.ts +1 -1
  60. package/src/api/clients/chatGateways/defaults/webChatGateway.js +5 -5
  61. package/src/api/clients/contactGroups/contactGroups.js +0 -1
  62. package/src/api/clients/queues/queues.js +16 -22
  63. package/src/api/clients/users/users.js +10 -2
  64. package/src/api/clients//321/201ontacts/contacts.js +0 -1
  65. package/src/api/clients//321/201ontacts/index.js +1 -1
  66. package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +1 -1
  67. package/src/api/transformers/addQueryParamsToUrl/addQueryParamsToUrl.transformer.js +2 -2
  68. package/src/api/transformers/sanitize/sanitize.transformer.js +2 -4
  69. package/src/api/websocket/WebSocketClientController.ts +6 -4
  70. package/src/components/index.js +3 -3
  71. package/src/components/wt-app-header/wt-app-navigator.vue +8 -11
  72. package/src/components/wt-galleria/wt-galleria.vue +1 -1
  73. package/src/components/wt-intersection-observer/wt-intersection-observer.vue +1 -1
  74. package/src/components/wt-player/src/components/buttons/mute-button.vue +0 -1
  75. package/src/components/wt-rounded-action/_variables.css +0 -3
  76. package/src/components/wt-select/mixins/multiselectMixin.js +0 -1
  77. package/src/components/wt-select/multiselect.css +2 -0
  78. package/src/components/wt-select/wt-select-v2.vue +3 -2
  79. package/src/components/wt-status-select/wt-status-select.vue +2 -4
  80. package/src/components/wt-switcher/wt-switcher.vue +1 -1
  81. package/src/components/wt-table/wt-table.vue +1 -1
  82. package/src/components/wt-tabs/wt-tabs.vue +1 -2
  83. package/src/components/wt-textarea/wt-textarea.vue +3 -4
  84. package/src/components/wt-tree/__tests__/WtTree.spec.js +1 -1
  85. package/src/components/wt-tree/wt-tree.vue +92 -60
  86. package/src/components/wt-tree-line/wt-tree-line.vue +2 -2
  87. package/src/components/wt-tree-table/wt-tree-table.vue +90 -84
  88. package/src/components/wt-tree-table-row/wt-tree-table-row.vue +2 -2
  89. package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +2 -2
  90. package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +1 -1
  91. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +1 -1
  92. package/src/composables/useCard/useCardComponent.js +1 -1
  93. package/src/composables/useInputControl/useInputControl.ts +1 -1
  94. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
  95. package/src/composables/useTableColumnDrag/useTableColumnDrag.ts +1 -1
  96. package/src/enums/index.ts +0 -1
  97. package/src/install.ts +1 -1
  98. package/src/locale/kz/kz.js +2 -4
  99. package/src/locale/pl/pl.js +2 -4
  100. package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +1 -1
  101. package/src/modules/AgentPdfs/components/agent-pdfs-tab.vue +104 -96
  102. package/src/modules/AgentStatusSelect/api/agent-status.js +9 -13
  103. package/src/modules/AuditForm/components/audit-form.vue +1 -1
  104. package/src/modules/AuditForm/components/form-answers/answer-editing-info/audit-form-answer-editing-info.vue +1 -1
  105. package/src/modules/CSVExport/XLSExport.js +5 -7
  106. package/src/modules/CSVExport/composables/useCSVExport.ts +3 -3
  107. package/src/modules/CSVExport/mixins/exportCSVMixin.js +1 -5
  108. package/src/modules/CSVExport/mixins/exportXLSMixin.js +1 -5
  109. package/src/modules/FilesExport/composables/useFilesExport.ts +1 -1
  110. package/src/modules/FilesExport/types/types.ts +1 -1
  111. package/src/modules/Filters/store/FiltersStoreModule.js +27 -27
  112. package/src/modules/Notifications/store/NotificationsStoreModule.js +1 -1
  113. package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js +0 -4
  114. package/src/modules/ObjectPermissions/components/permissions-tab.vue +5 -7
  115. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +2 -2
  116. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  117. package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +5 -6
  118. package/src/modules/TableStoreModule/store/TableStoreModule.js +10 -18
  119. package/src/modules/UploadCsvPopup/scripts/normalizeCSVData.ts +9 -9
  120. package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +1 -1
  121. package/src/modules/Userinfo/composables/createUserAccessControl.ts +2 -2
  122. package/src/modules/Userinfo/composables/types/CreateUserAccessControl.d.ts +2 -4
  123. package/src/modules/Userinfo/scripts/utils.ts +4 -2
  124. package/src/scripts/compareSize.ts +7 -6
  125. package/src/store/new/modules/tableStoreModule/tableStoreModule.js +17 -29
  126. package/src/validations/vuelidate/validators/decimalValidator.js +2 -1
  127. package/src/validations/vuelidate/validators/websocketValidator/websocketValidator.js +1 -1
  128. package/types/api/clients//321/201ontacts/index.d.ts +2 -2
  129. package/types/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.d.ts +1 -1
  130. package/types/components/wt-switcher/wt-switcher.vue.d.ts +1 -1
  131. package/types/components/wt-table/wt-table.vue.d.ts +1 -1
  132. package/types/components/wt-textarea/wt-textarea.vue.d.ts +3 -4
  133. package/types/components/wt-tree/wt-tree.vue.d.ts +6 -6
  134. package/types/components/wt-tree-line/wt-tree-line.vue.d.ts +2 -2
  135. package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +2 -2
  136. package/types/components/wt-tree-table-row/wt-tree-table-row.vue.d.ts +1 -1
  137. package/types/install.d.ts +1 -2
  138. package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +1 -1
  139. package/types/modules/CSVExport/composables/useCSVExport.d.ts +3 -3
  140. package/types/modules/FilesExport/composables/useFilesExport.d.ts +1 -1
  141. package/types/modules/FilesExport/types/types.d.ts +1 -1
  142. package/types/modules/Filters/store/FiltersStoreModule.d.ts +2 -2
  143. package/types/modules/Notifications/store/NotificationsStoreModule.d.ts +1 -1
  144. package/types/modules/TableStoreModule/store/TableStoreModule.d.ts +2 -2
  145. package/types/modules/Userinfo/composables/createUserAccessControl.d.ts +2 -2
  146. package/types/modules/Userinfo/scripts/utils.d.ts +1 -1
  147. package/types/store/new/modules/tableStoreModule/tableStoreModule.d.ts +2 -2
@@ -1,29 +1,62 @@
1
1
  <template>
2
- <div class="wt-tree">
3
- <div v-if="mode === WtTreeMode.Tree" class="wt-tree__content">
4
- <wt-tree-line
5
- v-for="(item, index) in data" :key="index" :model-value="modelValue" :item-label="itemLabel"
6
- :item-data="itemData" :data="item" :children-prop="childrenProp" :multiple="multiple"
7
- :allow-parent="allowParent" @update:model-value="emit('update:modelValue', $event)">
8
- <template v-if="$slots['item-prefix']" #item-prefix="slotProps">
9
- <slot name="item-prefix" v-bind="slotProps" />
10
- </template>
11
- </wt-tree-line>
12
- </div>
13
- <div v-if="mode === WtTreeMode.List" class="wt-tree__list-content">
14
- <span
15
- v-for="(item, index) in allData" :key="index" class="wt-tree__label-wrapper"
16
- :class="{ active: compareSelectElement(item) }">
17
- <p class="wt-tree__label" @click="selectElement(item)">
18
- {{ itemLabel ? item[itemLabel] : item }}
19
- </p>
20
- <wt-icon v-if="compareSelectElement(item)" icon="chat-message-status-sent" class="wt-tree__label-icon" />
21
- </span>
22
- </div>
23
- </div>
2
+ <div class="wt-tree">
3
+ <div
4
+ v-if="mode === WtTreeMode.Tree"
5
+ class="wt-tree__content"
6
+ >
7
+ <wt-tree-line
8
+ v-for="(item, index) in data"
9
+ :key="index"
10
+ :model-value="modelValue"
11
+ :item-label="itemLabel"
12
+ :item-data="itemData"
13
+ :data="item"
14
+ :children-prop="childrenProp"
15
+ :multiple="multiple"
16
+ :allow-parent="allowParent"
17
+ @update:model-value="emit('update:modelValue', $event)"
18
+ >
19
+ <template
20
+ v-if="$slots['item-prefix']"
21
+ #item-prefix="slotProps"
22
+ >
23
+ <slot
24
+ name="item-prefix"
25
+ v-bind="slotProps"
26
+ />
27
+ </template>
28
+ </wt-tree-line>
29
+ </div>
30
+ <div
31
+ v-if="mode === WtTreeMode.List"
32
+ class="wt-tree__list-content"
33
+ >
34
+ <span
35
+ v-for="(item, index) in allData"
36
+ :key="index"
37
+ class="wt-tree__label-wrapper"
38
+ :class="{ active: compareSelectElement(item) }"
39
+ >
40
+ <p
41
+ class="wt-tree__label"
42
+ @click="selectElement(item)"
43
+ >
44
+ {{ itemLabel ? item[itemLabel] : item }}
45
+ </p>
46
+ <wt-icon
47
+ v-if="compareSelectElement(item)"
48
+ icon="chat-message-status-sent"
49
+ class="wt-tree__label-icon"
50
+ />
51
+ </span>
52
+ </div>
53
+ </div>
24
54
  </template>
25
55
 
26
- <script setup lang="ts">
56
+ <script
57
+ setup
58
+ lang="ts"
59
+ >
27
60
  import deepEqual from 'deep-equal';
28
61
  import { computed } from 'vue';
29
62
 
@@ -35,11 +68,11 @@ const props = withDefaults(
35
68
  /**
36
69
  * Selected element, it can be an object or a string, related to itemData props
37
70
  */
38
- modelValue?: null | any;
71
+ modelValue?: null | unknown;
39
72
  /**
40
73
  * You need to pass an array of objects that will be displayed in the tree
41
74
  */
42
- data: any[];
75
+ data: unknown[];
43
76
  /**
44
77
  * You can pass the name of the property that will be used as the label of the selected item
45
78
  */
@@ -68,18 +101,18 @@ const props = withDefaults(
68
101
  );
69
102
 
70
103
  const emit = defineEmits<{
71
- (e: 'select', data: any): void;
72
- (e: 'update:modelValue', value: any): void;
104
+ (e: 'select', data: unknown): void;
105
+ (e: 'update:modelValue', value: unknown): void;
73
106
  }>();
74
107
 
75
108
  const allData = computed(() => {
76
109
  const result = [];
77
110
 
78
- const getNestedItems = (item: any) => {
111
+ const getNestedItems = (item: unknown) => {
79
112
  result.push(item);
80
113
 
81
114
  if (item[props.childrenProp]) {
82
- item[props.childrenProp].forEach((child: any) => {
115
+ item[props.childrenProp].forEach((child: unknown) => {
83
116
  getNestedItems(child);
84
117
  });
85
118
  }
@@ -92,11 +125,11 @@ const allData = computed(() => {
92
125
  return result;
93
126
  });
94
127
 
95
- const selectElement = (item: any) => {
128
+ const selectElement = (item: unknown) => {
96
129
  emit('update:modelValue', props.itemData ? item[props.itemData] : item);
97
130
  };
98
131
 
99
- const compareSelectElement = (item: any) => {
132
+ const compareSelectElement = (item: unknown) => {
100
133
  if (props.itemData) {
101
134
  return item[props.itemData] === props.modelValue;
102
135
  }
@@ -107,52 +140,51 @@ const compareSelectElement = (item: any) => {
107
140
 
108
141
  <style scoped>
109
142
  .wt-tree {
110
- border-radius: var(--border-radius);
111
- background: var(--content-wrapper-color);
112
- padding: var(--spacing-sm);
113
- overflow: auto;
143
+ border-radius: var(--border-radius);
144
+ background: var(--content-wrapper-color);
145
+ padding: var(--spacing-sm);
146
+ overflow: auto;
114
147
  }
115
148
 
116
149
  .wt-tree__content {
117
- display: flex;
118
- flex-direction: column;
119
- padding-right: var(--spacing-2xs);
120
- height: 100%;
121
- overflow: auto;
150
+ display: flex;
151
+ flex-direction: column;
152
+ padding-right: var(--spacing-2xs);
153
+ height: 100%;
154
+ overflow: auto;
122
155
  }
123
156
 
124
157
  .wt-tree__list-content {
125
- display: flex;
126
- flex-direction: column;
127
- align-items: flex-start;
128
- gap: var(--spacing-xs);
129
- padding-right: var(--spacing-2xs);
130
- height: 100%;
131
- overflow: auto;
158
+ display: flex;
159
+ flex-direction: column;
160
+ align-items: flex-start;
161
+ gap: var(--spacing-xs);
162
+ padding-right: var(--spacing-2xs);
163
+ height: 100%;
164
+ overflow: auto;
132
165
  }
133
166
 
134
167
  .wt-tree__label-wrapper {
135
- display: flex;
136
- align-items: center;
137
- transition: var(--transition);
138
- cursor: pointer;
139
- border-radius: var(--border-radius);
140
- padding: 0 var(--spacing-2xs);
141
- color: var(--wt-tree-item-on);
168
+ display: flex;
169
+ align-items: center;
170
+ transition: var(--transition);
171
+ cursor: pointer;
172
+ border-radius: var(--border-radius);
173
+ padding: 0 var(--spacing-2xs);
174
+ color: var(--wt-tree-item-on);
142
175
  }
143
176
 
144
177
  .wt-tree__label-wrapper:hover {
145
- background: var(--wt-tree-item-hover);
146
- color: var(--wt-tree-item-hover-on);
178
+ background: var(--wt-tree-item-hover);
179
+ color: var(--wt-tree-item-hover-on);
147
180
  }
148
181
 
149
182
  .wt-tree__label-wrapper.active {
150
- background: var(--wt-tree-item-active);
151
- color: var(--wt-tree-item-active-on);
183
+ background: var(--wt-tree-item-active);
184
+ color: var(--wt-tree-item-active-on);
152
185
  }
153
186
 
154
187
  .wt-tree__label-icon {
155
- flex-shrink: 0;
188
+ flex-shrink: 0;
156
189
  }
157
-
158
190
  </style>
@@ -121,7 +121,7 @@ const props = withDefaults(
121
121
 
122
122
  const emit = defineEmits<{
123
123
  (e: 'openParent'): void;
124
- (e: 'update:modelValue', value: any): void;
124
+ (e: 'update:modelValue', value: unknown): void;
125
125
  }>();
126
126
 
127
127
  const label = computed(() =>
@@ -260,7 +260,7 @@ const setMultipleModelValueWithTree = () => {
260
260
 
261
261
  const setMultipleModelValue = () => {
262
262
  const value = props.itemData ? props.data[props.itemData] : props.data;
263
- let existingIndex;
263
+ let existingIndex: number;
264
264
 
265
265
  if (props.itemData) {
266
266
  existingIndex = props.modelValue.indexOf(props.data[props.itemData]);
@@ -1,101 +1,104 @@
1
1
  <template>
2
2
  <div class="wt-tree-table wt-scrollbar">
3
- <table
4
- class="wt-tree-table-wrapper"
5
- >
3
+ <table class="wt-tree-table-wrapper">
6
4
  <thead class="wt-tree-table-head">
7
- <tr class="wt-tree-table-tr wt-tree-table-tr-head">
8
- <th
9
- v-for="(col, key) of dataHeaders"
10
- :key="String(key) + col?.sort"
11
- :class="[
5
+ <tr class="wt-tree-table-tr wt-tree-table-tr-head">
6
+ <th
7
+ v-for="(col, key) of dataHeaders"
8
+ :key="String(key) + col?.sort"
9
+ :class="[
12
10
  {
13
11
  'wt-tree-table-th--sortable': isColSortable(col),
14
12
  },
15
13
  `wt-tree-table-th--sort-${col.sort}`,
16
14
  ]"
17
- :style="col.width ? `min-width:${col.width}` : ''"
18
- class="wt-tree-table-th typo-body-1"
19
- @click="sort(col, key)"
20
- >
21
- <div class="wt-tree-table-th__content"
22
- :class="{'wt-tree-table-th__content--selectable': key === 0 && selectable}">
15
+ :style="col.width ? `min-width:${col.width}` : ''"
16
+ class="wt-tree-table-th typo-body-1"
17
+ @click="sort(col, key)"
18
+ >
23
19
  <div
24
- v-if="key === 0 && selectable"
25
- @click.stop
20
+ class="wt-tree-table-th__content"
21
+ :class="{ 'wt-tree-table-th__content--selectable': key === 0 && selectable }"
26
22
  >
27
- <wt-checkbox
28
- :selected="isAllSelected"
29
- @update:selected="selectAll"
23
+ <div
24
+ v-if="key === 0 && selectable"
25
+ @click.stop
26
+ >
27
+ <wt-checkbox
28
+ :selected="isAllSelected"
29
+ @update:selected="selectAll"
30
+ />
31
+ </div>
32
+ <div class="wt-tree-table-th__text">
33
+ {{ col.text }}
34
+ </div>
35
+ <wt-icon
36
+ v-if="sortable"
37
+ class="wt-tree-table-th-sort-arrow wt-tree-table-th-sort-arrow--asc"
38
+ icon="sort-arrow-up"
39
+ size="sm"
40
+ />
41
+ <wt-icon
42
+ v-if="sortable"
43
+ class="wt-tree-table-th-sort-arrow wt-tree-table-th-sort-arrow--desc"
44
+ icon="sort-arrow-down"
45
+ size="sm"
30
46
  />
31
47
  </div>
32
- <div class="wt-tree-table-th__text">
33
- {{ col.text }}
48
+ </th>
49
+ <th
50
+ v-if="gridActions"
51
+ class="wt-tree-table-th__actions"
52
+ >
53
+ <div class="wt-tree-table-th__content">
54
+ <slot name="actions-header" />
34
55
  </div>
35
- <wt-icon
36
- v-if="sortable"
37
- class="wt-tree-table-th-sort-arrow wt-tree-table-th-sort-arrow--asc"
38
- icon="sort-arrow-up"
39
- size="sm"
40
- />
41
- <wt-icon
42
- v-if="sortable"
43
- class="wt-tree-table-th-sort-arrow wt-tree-table-th-sort-arrow--desc"
44
- icon="sort-arrow-down"
45
- size="sm"
46
- />
47
- </div>
48
- </th>
49
- <th
50
- v-if="gridActions"
51
- class="wt-tree-table-th__actions"
52
- >
53
- <div class="wt-tree-table-th__content">
54
- <slot name="actions-header" />
55
- </div>
56
- </th>
57
- </tr>
56
+ </th>
57
+ </tr>
58
58
  </thead>
59
59
 
60
60
  <tbody class="wt-tree-table-body">
61
- <wt-tree-table-row
62
- v-for="(row, dataKey) of data"
63
- :key="dataKey"
64
- :row-position="dataKey"
65
- :data-headers="dataHeaders"
66
- :data="row"
67
- :selectable="selectable"
68
- :children-prop="childrenProp"
69
- :selected-elements="selectedElements"
70
- :searched-prop="searchedProp"
71
- @update:selected="handleSelection($event.data, $event.select)"
72
- >
73
- <template #actions="{ item }">
74
- <slot
75
- name="actions"
76
- :item="item"
77
- />
78
- </template>
79
- <template
80
- v-for="(col, headerKey) of dataHeaders"
81
- :key="headerKey"
82
- #[col.value]="{ item }"
61
+ <wt-tree-table-row
62
+ v-for="(row, dataKey) of data"
63
+ :key="dataKey"
64
+ :row-position="dataKey"
65
+ :data-headers="dataHeaders"
66
+ :data="row"
67
+ :selectable="selectable"
68
+ :children-prop="childrenProp"
69
+ :selected-elements="selectedElements"
70
+ :searched-prop="searchedProp"
71
+ @update:selected="handleSelection($event.data, $event.select)"
83
72
  >
84
- <slot
85
- :index="dataKey"
86
- :item="item"
87
- :name="col.value"
73
+ <template #actions="{ item }">
74
+ <slot
75
+ name="actions"
76
+ :item="item"
77
+ />
78
+ </template>
79
+ <template
80
+ v-for="(col, headerKey) of dataHeaders"
81
+ :key="headerKey"
82
+ #[col.value]="{ item }"
88
83
  >
89
- {{ item[col.value] }}
90
- </slot>
91
- </template>
92
- </wt-tree-table-row>
84
+ <slot
85
+ :index="dataKey"
86
+ :item="item"
87
+ :name="col.value"
88
+ >
89
+ {{ item[col.value] }}
90
+ </slot>
91
+ </template>
92
+ </wt-tree-table-row>
93
93
  </tbody>
94
94
  </table>
95
95
  </div>
96
96
  </template>
97
97
 
98
- <script setup lang="ts">
98
+ <script
99
+ setup
100
+ lang="ts"
101
+ >
99
102
  import { computed, toRef } from 'vue';
100
103
 
101
104
  import { useWtTable } from '../../composables/useWtTable/useWtTable';
@@ -113,7 +116,7 @@ const props = withDefaults(
113
116
  /**
114
117
  * 'List of data, represented by table. '
115
118
  */
116
- data: Record<string, any>[];
119
+ data: Record<string, unknown>[];
117
120
  /**
118
121
  * 'If true, draws sorting arrows and sends sorting events at header click. Draws a sorting arrow by "sort": "asc"/"desc" header value. '
119
122
  */
@@ -122,7 +125,7 @@ const props = withDefaults(
122
125
  * 'If true, draws row selection checkboxes. Checkbox toggles data object _isSelected property. It's IMPORTANT to set this property before sending data to table. '
123
126
  */
124
127
  selectable?: boolean;
125
- selected: any[];
128
+ selected: unknown[];
126
129
  /**
127
130
  * 'If true, reserves space for 3 icon actions in the last column. Accessible by "actions" slot. '
128
131
  */
@@ -149,14 +152,14 @@ const emit = defineEmits([
149
152
  'update:selected',
150
153
  ]);
151
154
 
152
- const checkHasChildItems = (item: Record<string, any>) => {
155
+ const checkHasChildItems = (item: Record<string, unknown>) => {
153
156
  return item[props.childrenProp] && Array.isArray(item[props.childrenProp]);
154
157
  };
155
158
 
156
- const getSelectedValue = (items: Record<string, any>[]) => {
159
+ const getSelectedValue = (items: Record<string, unknown>[]) => {
157
160
  const selected = [];
158
161
 
159
- const pushSelectedElement = (item: Record<string, any>) => {
162
+ const pushSelectedElement = (item: Record<string, unknown>) => {
160
163
  if (item._isSelected) {
161
164
  return [
162
165
  item,
@@ -173,10 +176,10 @@ const getSelectedValue = (items: Record<string, any>[]) => {
173
176
  return selected;
174
177
  };
175
178
 
176
- const getAllNestedElements = (item: Record<string, any>) => {
179
+ const getAllNestedElements = (item: Record<string, unknown>) => {
177
180
  const nested = [];
178
181
 
179
- const pushElement = (item: Record<string, any>) => {
182
+ const pushElement = (item: Record<string, unknown>) => {
180
183
  nested.push(item);
181
184
 
182
185
  if (checkHasChildItems(item)) {
@@ -189,7 +192,7 @@ const getAllNestedElements = (item: Record<string, any>) => {
189
192
  return nested;
190
193
  };
191
194
 
192
- const selectedElements = computed<Record<string, any>[]>(() => {
195
+ const selectedElements = computed<Record<string, unknown>[]>(() => {
193
196
  // _isSelected for backwards compatibility
194
197
  return props.selected || getSelectedValue(props.data);
195
198
  });
@@ -220,7 +223,10 @@ const sort = (col: WtTableHeader) => {
220
223
  emit('sort', col, nextSort);
221
224
  };
222
225
 
223
- const changeSelectItem = (items: Record<string, any>[], selected: boolean) => {
226
+ const changeSelectItem = (
227
+ items: Record<string, unknown>[],
228
+ selected: boolean,
229
+ ) => {
224
230
  items.forEach((item) => {
225
231
  item._isSelected = selected;
226
232
 
@@ -124,7 +124,7 @@ const props = withDefaults(
124
124
  */
125
125
  childrenProp: string;
126
126
  selectable?: boolean;
127
- selectedElements: Record<string, any>[];
127
+ selectedElements: Record<string, unknown>[];
128
128
  dataHeaders: WtTableHeader[];
129
129
  gridActions?: boolean;
130
130
  /**
@@ -166,7 +166,7 @@ const openCollapse = () => {
166
166
  emit('expanded-collapse');
167
167
  };
168
168
 
169
- const hasSearchedElement = (data: Record<string, any>, nestedLevel = 0) => {
169
+ const hasSearchedElement = (data: Record<string, unknown>, nestedLevel = 0) => {
170
170
  // Check if the object itself has searched
171
171
  if (data[props.searchedProp] && nestedLevel) return true;
172
172
 
@@ -22,8 +22,8 @@
22
22
  />
23
23
  <toggle-button
24
24
  v-if="!props.hideExpand"
25
- primary-icon="expand"
26
- secondary-icon="collapse"
25
+ primary-icon="collapse"
26
+ secondary-icon="expand"
27
27
  color="on-dark"
28
28
  @toggle="handlePlayerSize"
29
29
  />
@@ -109,6 +109,6 @@ export function normalizeVidstackMediaSrc({
109
109
  /**
110
110
  * "video/object" or "audio/object" types represent JS objects like MediaStream or file Blob
111
111
  */
112
- function isObjectSrcType({ src, type }: { src: unknown; type: string }) {
112
+ function isObjectSrcType({ type }: { src: unknown; type: string }) {
113
113
  return type?.includes('/object');
114
114
  }
@@ -8,7 +8,7 @@ describe('useCachedInterval', () => {
8
8
  });
9
9
  subscribe(callback);
10
10
  expect(callback).toHaveBeenCalledTimes(1);
11
- return await new Promise((resolve, reject) =>
11
+ return await new Promise((resolve) =>
12
12
  setTimeout(() => {
13
13
  expect(callback).toHaveBeenCalledTimes(2);
14
14
  resolve();
@@ -1,4 +1,4 @@
1
- import { computed, onMounted, onUnmounted, ref } from 'vue';
1
+ import { computed, onUnmounted, ref } from 'vue';
2
2
  import { useI18n } from 'vue-i18n';
3
3
  import { useRoute, useRouter } from 'vue-router';
4
4
 
@@ -1,4 +1,4 @@
1
- import { computed, onMounted } from 'vue';
1
+ import { computed } from 'vue';
2
2
 
3
3
  export const useInputControl = (input) => {
4
4
  // inputnumber has span wrapper while inputtext hasnt
@@ -12,7 +12,7 @@ const isDurationOverflow = ({ durationMin, limitMin }) => {
12
12
  return durationMin > limitMin && limitMin !== 0;
13
13
  };
14
14
 
15
- const duration = ({ durationMin, limitMin }) => {
15
+ const duration = ({ durationMin /* limitMin */ }) => {
16
16
  return prettifyPauseCauseDuration(durationMin);
17
17
  };
18
18
 
@@ -52,7 +52,7 @@ export const useTableColumnDrag = (table, reorderableColumns) => {
52
52
  copyEl.style.position = 'absolute';
53
53
  copyEl.style.top = '-9999px';
54
54
  copyEl.style.background = 'var(--p-datatable-header-cell-drag-background)';
55
- copyEl.style.width = event.target.offsetWidth + 'px';
55
+ copyEl.style.width = `${event.target.offsetWidth}px`;
56
56
  document.body.appendChild(copyEl);
57
57
  event.dataTransfer.setDragImage(copyEl, event.offsetX, event.offsetY);
58
58
  // Clean up after drag starts
@@ -1,7 +1,6 @@
1
1
  import AbstractUserStatus from './AbstractUserStatus/AbstractUserStatus.enum.js';
2
2
  import AgentStatus from './AgentStatus/AgentStatus.enum.js';
3
3
  import { ButtonColor } from './ButtonColor/ButtonColor';
4
- import { ButtonSize } from './ButtonSize/ButtonSize';
5
4
  import { ButtonVariant } from './ButtonVariant/ButtonVariant';
6
5
  import ChatGatewayProvider from './ChatGatewayProvider/ChatGatewayProvider.enum.js';
7
6
  import ProviderIconType from './ChatGatewayProvider/ProviderIconType.enum';
package/src/install.ts CHANGED
@@ -13,7 +13,7 @@ import initPrimevue from './plugins/primevue/primevue.plugin';
13
13
  export { fillIconsRepository };
14
14
 
15
15
  export default {
16
- install(app, { eventBus, router, globals = {} }) {
16
+ install(app, { eventBus, globals = {} }) {
17
17
  Object.keys(Directives).forEach((name) => {
18
18
  app.directive(name, Directives[name]);
19
19
  });
@@ -321,11 +321,9 @@ export default {
321
321
  ': ' +
322
322
  linked('objects.case'),
323
323
  [CrmSectionsNew.ContactsExtensions]: ({ linked }) =>
324
- linked('objects.customization.customization') +
325
- ': ' +
326
- linked('objects.contact'),
324
+ `${linked('objects.customization.customization')}: ${linked('objects.contact')}`,
327
325
  [CrmSectionsNew.CustomLookups]: ({ linked }) =>
328
- linked('objects.customization.customization') + ': Жекелендірулер', // dont use linked: objects.customLookup.customLookup, coz "linked" doesnt support pluralization
326
+ `${linked('objects.customization.customization')}: Жекелендірулер`, // dont use linked: objects.customLookup.customLookup, coz "linked" doesnt support pluralization
329
327
  },
330
328
  },
331
329
  },
@@ -321,11 +321,9 @@ export default {
321
321
  ': ' +
322
322
  linked('objects.case'),
323
323
  [CrmSectionsNew.ContactsExtensions]: ({ linked }) =>
324
- linked('objects.customization.customization') +
325
- ': ' +
326
- linked('objects.contact'),
324
+ `${linked('objects.customization.customization')}: ${linked('objects.contact')}`,
327
325
  [CrmSectionsNew.CustomLookups]: ({ linked }) =>
328
- linked('objects.customization.customization') + ': Dostosowania', // dont use linked: objects.customLookup.customLookup, coz "linked" doesnt support pluralization
326
+ `${linked('objects.customization.customization')}: Dostosowania`, // dont use linked: objects.customLookup.customLookup, coz "linked" doesnt support pluralization
329
327
  },
330
328
  },
331
329
  },
@@ -69,7 +69,7 @@ describe('Sort filter mixin', () => {
69
69
  sort: '+queue',
70
70
  },
71
71
  });
72
- const wrapper = shallowMount(Component, {
72
+ shallowMount(Component, {
73
73
  global: {
74
74
  plugins: [
75
75
  router,