@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,99 +1,105 @@
1
1
  <template>
2
- <section class="table-wrapper table-page table-wrapper--tab-table">
3
- <slot
4
- name="header"
5
- :selected="selected"
6
- :load-data-list="loadDataList"
7
- :ask-delete-confirmation="askDeleteConfirmation"
8
- :handle-delete="handleDelete"
9
- />
10
-
11
- <delete-confirmation-popup
12
- :shown="isDeleteConfirmationPopup"
13
- :callback="deleteCallback"
14
- :delete-count="deleteCount"
15
- @close="closeDelete"
16
- />
17
-
18
- <wt-loader v-show="isLoading" />
19
-
20
- <wt-empty
21
- v-show="showEmpty"
22
- :image="imageEmpty"
23
- :headline="textEmpty"
24
- />
25
-
26
- <div v-if="dataList?.length" class="table-section__table-wrapper">
27
- <wt-table
28
- v-if="dataList?.length"
29
- :data="dataList"
30
- :headers="shownHeaders"
31
- :selected="selected"
32
- sortable
33
- @sort="updateSort"
34
- @update:selected="updateSelected"
35
- >
36
- <template #preview="{ item }">
37
- <pdf-status-preview
38
- :status="item.status"
39
- :clickable="item.status === WebitelMediaExporterExportStatus.Done"
40
- @click="openPdfInNewWindow(item.fileId)"
41
- />
42
- </template>
43
-
44
- <template #name="{ item }">
45
- {{ item.name }}
46
- </template>
47
-
48
- <template #status="{ item }">
49
- <pdf-status :status="item.status" />
50
- </template>
51
-
52
- <template #valid_until="{ item }">
53
- {{ prettifyTimestamp(item.validUntil) }}
54
- </template>
55
-
56
- <template #created_at="{ item }">
57
- {{ prettifyTimestamp(item.createdAt) }}
58
- </template>
59
-
60
- <template #created_by="{ item }">
61
- {{ item.createdBy }}
62
- </template>
63
-
64
- <template #actions="{ item }">
65
- <wt-icon-action
66
- action="download"
67
- :disabled="isDownloadDisabled(item)"
68
- @click="downloadPdf(item.fileId)"
69
- />
70
- <wt-icon-action
71
- action="delete"
72
- :disabled="isDeleteDisabled(item) || !hasDeleteAccess"
73
- @click="
74
- askDeleteConfirmation({
75
- deleted: [item],
76
- callback: () => handleDelete([item]),
77
- })
78
- "
79
- />
80
- </template>
81
- </wt-table>
82
-
83
- <wt-pagination
84
- :next="next"
85
- :prev="page > 1"
86
- :size="size"
87
- debounce
88
- @change="updateSize"
89
- @next="updatePage(page + 1)"
90
- @prev="updatePage(page - 1)"
91
- />
92
- </div>
93
- </section>
2
+ <section class="table-wrapper table-page table-wrapper--tab-table">
3
+ <slot
4
+ name="header"
5
+ :selected="selected"
6
+ :load-data-list="loadDataList"
7
+ :ask-delete-confirmation="askDeleteConfirmation"
8
+ :handle-delete="handleDelete"
9
+ />
10
+
11
+ <delete-confirmation-popup
12
+ :shown="isDeleteConfirmationPopup"
13
+ :callback="deleteCallback"
14
+ :delete-count="deleteCount"
15
+ @close="closeDelete"
16
+ />
17
+
18
+ <wt-loader v-show="isLoading" />
19
+
20
+ <wt-empty
21
+ v-show="showEmpty"
22
+ :image="imageEmpty"
23
+ :headline="textEmpty"
24
+ />
25
+
26
+ <div
27
+ v-if="dataList?.length"
28
+ class="table-section__table-wrapper"
29
+ >
30
+ <wt-table
31
+ v-if="dataList?.length"
32
+ :data="dataList"
33
+ :headers="shownHeaders"
34
+ :selected="selected"
35
+ sortable
36
+ @sort="updateSort"
37
+ @update:selected="updateSelected"
38
+ >
39
+ <template #preview="{ item }">
40
+ <pdf-status-preview
41
+ :status="item.status"
42
+ :clickable="item.status === WebitelMediaExporterExportStatus.Done"
43
+ @click="openPdfInNewWindow(item.fileId)"
44
+ />
45
+ </template>
46
+
47
+ <template #name="{ item }">
48
+ {{ item.name }}
49
+ </template>
50
+
51
+ <template #status="{ item }">
52
+ <pdf-status :status="item.status" />
53
+ </template>
54
+
55
+ <template #valid_until="{ item }">
56
+ {{ prettifyTimestamp(item.validUntil) }}
57
+ </template>
58
+
59
+ <template #created_at="{ item }">
60
+ {{ prettifyTimestamp(item.createdAt) }}
61
+ </template>
62
+
63
+ <template #created_by="{ item }">
64
+ {{ item.createdBy }}
65
+ </template>
66
+
67
+ <template #actions="{ item }">
68
+ <wt-icon-action
69
+ action="download"
70
+ :disabled="isDownloadDisabled(item)"
71
+ @click="downloadPdf(item.fileId)"
72
+ />
73
+ <wt-icon-action
74
+ action="delete"
75
+ :disabled="isDeleteDisabled(item) || !hasDeleteAccess"
76
+ @click="
77
+ askDeleteConfirmation({
78
+ deleted: [item],
79
+ callback: () => handleDelete([item]),
80
+ })
81
+ "
82
+ />
83
+ </template>
84
+ </wt-table>
85
+
86
+ <wt-pagination
87
+ :next="next"
88
+ :prev="page > 1"
89
+ :size="size"
90
+ debounce
91
+ @change="updateSize"
92
+ @next="updatePage(page + 1)"
93
+ @prev="updatePage(page - 1)"
94
+ />
95
+ </div>
96
+ </section>
94
97
  </template>
95
98
 
96
- <script lang="ts" setup>
99
+ <script
100
+ lang="ts"
101
+ setup
102
+ >
97
103
  import {
98
104
  downloadFile,
99
105
  FileServicesAPI,
@@ -120,7 +126,7 @@ import PdfStatus from './pdf-status.vue';
120
126
  import PdfStatusPreview from './pdf-status-preview.vue';
121
127
 
122
128
  const props = defineProps<{
123
- store?: any;
129
+ store?: unknown;
124
130
  entityIdKey?: string;
125
131
  entityIdValue?: string | number;
126
132
  isCreatedAtFilter: boolean;
@@ -275,5 +281,7 @@ const openPdfInNewWindow = (fileId: string) => {
275
281
  };
276
282
  </script>
277
283
 
278
- <style lang="scss" scoped></style>
279
-
284
+ <style
285
+ lang="scss"
286
+ scoped
287
+ ></style>
@@ -9,19 +9,15 @@ const AgentStatusAPIFactory = ({ instance, OpenAPIConfig }) => {
9
9
  pauseCause,
10
10
  statusComment,
11
11
  }) => {
12
- try {
13
- const res = await service.updateAgentStatus(agentId, {
14
- status,
15
- id: agentId,
16
- payload: pauseCause,
17
- status_comment: statusComment,
18
- });
19
- return {
20
- success: !!res,
21
- };
22
- } catch (err) {
23
- throw err;
24
- }
12
+ const res = await service.updateAgentStatus(agentId, {
13
+ status,
14
+ id: agentId,
15
+ payload: pauseCause,
16
+ status_comment: statusComment,
17
+ });
18
+ return {
19
+ success: !!res,
20
+ };
25
21
  };
26
22
 
27
23
  return {
@@ -164,7 +164,7 @@ function handleAnswerUpdate({ key, value }) {
164
164
  }
165
165
 
166
166
  function initAnswers() {
167
- if (!answersModel.value || !answersModel.value.length) {
167
+ if (!answersModel.value?.length) {
168
168
  answersModel.value = props.questions.map(() => ({}));
169
169
  }
170
170
  }
@@ -61,7 +61,7 @@ const initialComment =
61
61
 
62
62
  const updateTime = computed(() => {
63
63
  return formatDate(
64
- Number.parseInt(props.answer.updatedAt),
64
+ Number.parseInt(props.answer.updatedAt, 10),
65
65
  FormatDateMode.DATETIME,
66
66
  );
67
67
  });
@@ -59,13 +59,11 @@ export default class XLSExport {
59
59
  });
60
60
 
61
61
  return columns.reduce((acc, column) => {
62
- return {
63
- ...acc,
64
- [column]:
65
- this.extractNameFromObject(item[column]) ||
66
- flatVariables[column] ||
67
- '',
68
- };
62
+ acc[column] =
63
+ this.extractNameFromObject(item[column]) ||
64
+ flatVariables[column] ||
65
+ '';
66
+ return acc;
69
67
  }, {});
70
68
  });
71
69
 
@@ -4,9 +4,9 @@ import { useRoute } from 'vue-router';
4
4
 
5
5
  import CSVExport from '../CSVExport';
6
6
 
7
- export type CSVRow = Record<string, any>;
7
+ export type CSVRow = Record<string, unknown>;
8
8
 
9
- export type FetchMethod = (params: Record<string, any>) => Promise<{
9
+ export type FetchMethod = (params: Record<string, unknown>) => Promise<{
10
10
  items: CSVRow[];
11
11
  next: boolean;
12
12
  }>;
@@ -39,7 +39,7 @@ export function useCSVExport({ selected }: { selected: Ref<number[]> }) {
39
39
  CSVExportInstance.value = new CSVExport(fetchMethod, options);
40
40
  }
41
41
 
42
- async function exportCSV(exportParams?: Record<string, any>) {
42
+ async function exportCSV(exportParams?: Record<string, unknown>) {
43
43
  const routeQuery = route.query;
44
44
  const params = {
45
45
  ...(exportParams || routeQuery),
@@ -36,11 +36,7 @@ export default {
36
36
  };
37
37
  if (this.isAnySelected) params.id = this.selectedIds;
38
38
 
39
- try {
40
- await this.CSVExport.export(params);
41
- } catch (err) {
42
- throw err;
43
- }
39
+ await this.CSVExport.export(params);
44
40
  },
45
41
  },
46
42
  };
@@ -35,11 +35,7 @@ export default {
35
35
  };
36
36
  if (this.isAnySelected) params.id = this.selectedIds;
37
37
 
38
- try {
39
- await this.XLSExport.export(params);
40
- } catch (err) {
41
- throw err;
42
- }
38
+ await this.XLSExport.export(params);
43
39
  },
44
40
  },
45
41
  };
@@ -2,7 +2,7 @@ import JSZip from 'jszip';
2
2
  import { ref } from 'vue';
3
3
 
4
4
  import { _wtUiLog } from '../../../scripts/logger';
5
- import {
5
+ import type {
6
6
  ExportedItem,
7
7
  UseFilesExportOptions,
8
8
  UseFilesExportReturn,
@@ -1,4 +1,4 @@
1
- import { Ref } from 'vue';
1
+ import type { Ref } from 'vue';
2
2
 
3
3
  export type ExportedItem = {
4
4
  name: string; // file name inside zip
@@ -11,7 +11,7 @@ export default class FiltersStoreModule extends BaseStoreModule {
11
11
  };
12
12
 
13
13
  getters = {
14
- ROUTER: (state, g, rootState) => {
14
+ ROUTER: (_s, _g, rootState) => {
15
15
  if (rootState.router === undefined) {
16
16
  console.warn(
17
17
  '"rootState.router" is needed for filters to work properly.' +
@@ -22,16 +22,12 @@ export default class FiltersStoreModule extends BaseStoreModule {
22
22
  },
23
23
 
24
24
  _STATE_FILTER_NAMES: (state) => {
25
- return Object.values(state).reduce(
26
- (names, prop) =>
27
- prop.value || prop.name
28
- ? [
29
- ...names,
30
- prop.name,
31
- ]
32
- : names,
33
- [],
34
- );
25
+ return Object.values(state).reduce((names, prop) => {
26
+ if (prop.value || prop.name) {
27
+ names.push(prop.name);
28
+ }
29
+ return names;
30
+ }, []);
35
31
  },
36
32
 
37
33
  // get value of specific filter
@@ -46,15 +42,14 @@ export default class FiltersStoreModule extends BaseStoreModule {
46
42
  },
47
43
 
48
44
  // get all filters values
49
- GET_FILTERS: (state, getters) => () => {
45
+ GET_FILTERS: (_state, getters) => () => {
50
46
  return getters._STATE_FILTER_NAMES.reduce((values, filterName) => {
51
47
  const filterValue = getters.GET_FILTER(filterName);
52
- return isEmpty(filterValue)
53
- ? values
54
- : {
55
- ...values,
56
- [filterName]: filterValue,
57
- };
48
+ if (isEmpty(filterValue)) {
49
+ return values;
50
+ }
51
+ values[filterName] = filterValue;
52
+ return values;
58
53
  }, {});
59
54
  },
60
55
  };
@@ -146,10 +141,8 @@ export default class FiltersStoreModule extends BaseStoreModule {
146
141
  if (context.state[qKey]) {
147
142
  return filteredQuery;
148
143
  }
149
- return {
150
- ...filteredQuery,
151
- [qKey]: qValue,
152
- };
144
+ filteredQuery[qKey] = qValue;
145
+ return filteredQuery;
153
146
  },
154
147
  {},
155
148
  );
@@ -166,9 +159,13 @@ export default class FiltersStoreModule extends BaseStoreModule {
166
159
  },
167
160
 
168
161
  SUBSCRIBE: (context, { event, callback }) => {
169
- const subscribe = () => context.state._emitter.on(event, callback);
170
- if (Array.isArray(event)) event.forEach((e) => subscribe(e, callback));
171
- else subscribe(event, callback);
162
+ if (Array.isArray(event)) {
163
+ event.forEach((e) => {
164
+ context.state._emitter.on(e, callback);
165
+ });
166
+ } else {
167
+ context.state._emitter.on(event, callback);
168
+ }
172
169
  },
173
170
 
174
171
  FLUSH_SUBSCRIBERS: (context) => {
@@ -217,8 +214,11 @@ export default class FiltersStoreModule extends BaseStoreModule {
217
214
  };
218
215
  };
219
216
 
220
- if (Array.isArray(filter)) filter.forEach((f) => setup(f));
221
- else setup(filter);
217
+ if (Array.isArray(filter)) {
218
+ filter.forEach((f) => {
219
+ setup(f);
220
+ });
221
+ } else setup(filter);
222
222
 
223
223
  return this;
224
224
  }
@@ -163,7 +163,7 @@ export default class NotificationsStoreModule extends BaseStoreModule {
163
163
  },
164
164
 
165
165
  SEND_NOTIFICATION: (
166
- context,
166
+ _,
167
167
  {
168
168
  locale,
169
169
  text = i18n.global.t(locale),
@@ -15,10 +15,6 @@ export const createObjectPermissionsStoreModule = (modules) => {
15
15
  objectPermissionsStoreModule(),
16
16
  ]);
17
17
 
18
- const cardSubmodule = [
19
- // empty, now permissions don't have standard card functionality
20
- ];
21
-
22
18
  return createBaseStoreModule([
23
19
  {
24
20
  modules: {
@@ -150,14 +150,12 @@ const {
150
150
 
151
151
  const localizedDataList = computed(() => {
152
152
  return dataList.value.map((item) => {
153
- const access = Object.keys(item.access).reduce((access, rule) => {
154
- return {
155
- ...access,
156
- [rule]: {
157
- ...item.access[rule],
158
- name: t(`access.accessMode.${item.access[rule].id}`),
159
- },
153
+ const access = Object.keys(item.access).reduce((acc, rule) => {
154
+ acc[rule] = {
155
+ ...item.access[rule],
156
+ name: t(`access.accessMode.${item.access[rule].id}`),
160
157
  };
158
+ return acc;
161
159
  }, {});
162
160
 
163
161
  return {
@@ -53,7 +53,7 @@ describe('API filter mixin', () => {
53
53
  team,
54
54
  },
55
55
  });
56
- const wrapper = shallowMount(Component, {
56
+ shallowMount(Component, {
57
57
  global: {
58
58
  plugins: [
59
59
  router,
@@ -74,7 +74,7 @@ describe('API filter mixin', () => {
74
74
  });
75
75
 
76
76
  it('Sets empty array value if $route query is empty', async () => {
77
- const wrapper = shallowMount(Component, {
77
+ shallowMount(Component, {
78
78
  global: {
79
79
  plugins: [
80
80
  router,
@@ -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,
@@ -6,12 +6,11 @@ export default class QueryFiltersStoreModule extends BaseStoreModule {
6
6
  GET_FILTERS: (state, getters) =>
7
7
  Object.keys(state).reduce((filters, filterKey) => {
8
8
  const filterValue = getters.GET_FILTER(filterKey);
9
- return isEmpty(filterValue)
10
- ? filters
11
- : {
12
- ...filters,
13
- [filterKey]: filterValue,
14
- };
9
+ if (isEmpty(filterValue)) {
10
+ return filters;
11
+ }
12
+ filters[filterKey] = filterValue;
13
+ return filters;
15
14
  }, {}),
16
15
  GET_FILTER: (state) => (filter) => {
17
16
  const { value, storedProp, multiple } = state[filter];
@@ -19,15 +19,13 @@ export default class TableStoreModule extends BaseStoreModule {
19
19
  PARENT_ID: () => null, // override me
20
20
 
21
21
  // FIXME: maybe move to filters module?
22
- FILTERS: (state, getters) => getters['filters/GET_FILTERS'],
22
+ FILTERS: (_, getters) => getters['filters/GET_FILTERS'],
23
23
 
24
24
  FIELDS: (state) => {
25
25
  const fields = state.headers.reduce((fields, { show, field }) => {
26
- if (show)
27
- return [
28
- ...fields,
29
- field,
30
- ];
26
+ if (show) {
27
+ fields.push(field);
28
+ }
31
29
  return fields;
32
30
  }, []);
33
31
 
@@ -40,7 +38,7 @@ export default class TableStoreModule extends BaseStoreModule {
40
38
  },
41
39
 
42
40
  // main GET_LIST params collector
43
- GET_LIST_PARAMS: (state, getters) => (overrides) => {
41
+ GET_LIST_PARAMS: (_state, getters) => (overrides) => {
44
42
  const filters = getters.FILTERS();
45
43
  const fields = getters.FIELDS;
46
44
  const parentId = getters.PARENT_ID;
@@ -250,8 +248,6 @@ export default class TableStoreModule extends BaseStoreModule {
250
248
  }
251
249
  try {
252
250
  await context.dispatch(action, deleted);
253
- } catch (err) {
254
- throw err;
255
251
  } finally {
256
252
  await context.dispatch('LOAD_DATA_LIST');
257
253
 
@@ -269,15 +265,11 @@ export default class TableStoreModule extends BaseStoreModule {
269
265
  },
270
266
 
271
267
  DELETE_SINGLE: async (context, { id, etag }) => {
272
- try {
273
- await context.dispatch('api/DELETE_ITEM', {
274
- context,
275
- id,
276
- etag,
277
- });
278
- } catch (err) {
279
- throw err;
280
- }
268
+ await context.dispatch('api/DELETE_ITEM', {
269
+ context,
270
+ id,
271
+ etag,
272
+ });
281
273
  },
282
274
 
283
275
  DELETE_BULK: async (context, deleted) =>
@@ -21,12 +21,12 @@ const normalizeCSVData = ({ data, mappings }) => {
21
21
 
22
22
  return data.map((dataItem, index) => {
23
23
  const normalized = nonEmptyMappingFields.reduce(
24
- (normalizedItem, { name, csv, required }) => {
24
+ (normalizedItem: Record<string, unknown>, { name, csv, required }) => {
25
25
  const value = Array.isArray(csv)
26
26
  ? csv.map((csv) => dataItem[csv])
27
27
  : dataItem[csv];
28
28
 
29
- let filteredValue; // Filter empty values in validation purposes
29
+ let filteredValue: unknown; // Filter empty values in validation purposes
30
30
  if (Array.isArray(value)) {
31
31
  // Because required field can be combined from many fields in multiple select, so we need to check all values.
32
32
  // For example, if we have 3 fields and they are empty, we will get empty array.
@@ -43,14 +43,14 @@ const normalizeCSVData = ({ data, mappings }) => {
43
43
  );
44
44
  }
45
45
 
46
- return isValueEmpty
47
- ? normalizedItem
48
- : {
49
- ...normalizedItem,
50
- [name]: value, // Return the original value for proper mapping (e.g., variables in members)
51
- };
46
+ if (isValueEmpty) {
47
+ return normalizedItem;
48
+ }
49
+ // Original value for proper mapping (e.g., variables in members)
50
+ normalizedItem[name] = value;
51
+ return normalizedItem;
52
52
  },
53
- {},
53
+ {} as Record<string, unknown>,
54
54
  );
55
55
 
56
56
  return normalized;
@@ -6,7 +6,7 @@ const parseCSV = (csvStr, options = {}) =>
6
6
  csvStr,
7
7
  {
8
8
  columns: true,
9
- cast: (value, context) => {
9
+ cast: (value /* context */) => {
10
10
  if (typeof value !== 'string') return value;
11
11
 
12
12
  const trimmed = value.trim();
@@ -1,8 +1,8 @@
1
- import { computed, Ref } from 'vue';
1
+ import { computed, type Ref } from 'vue';
2
2
  import { useRoute } from 'vue-router';
3
3
  import { CrudAction, type WtObject } from '../../../enums';
4
4
  import { _wtUiLog } from '../../../scripts/logger';
5
- import { createUserAccessStore } from '../stores/accessStore';
5
+ import type { createUserAccessStore } from '../stores/accessStore';
6
6
  import type { UserAccessStore } from '../types/UserAccess.d.ts';
7
7
 
8
8
  export type UseUserAccessControlComposableOptions =