@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.
- package/dist/{index-Dvhbo446.js → index-CeADjYK9.js} +1 -1
- package/dist/{index-B0AYwz58.js → index-DZ_bvNVs.js} +1 -1
- package/dist/{install-CrJnxpPS.js → install-Dofcp90y.js} +55 -61
- package/dist/{isObject-BsWrydYX.js → isObject-B2zd2O3f.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +204 -204
- package/dist/{useVidstackSrc-Bmp2wHly.js → useVidstackSrc-D9uo15mF.js} +3 -4
- package/dist/{vidstack-Bq6c3Bam-N3JOOQyW.js → vidstack-Bq6c3Bam-Bs73fRdp.js} +3 -3
- package/dist/{vidstack-D2pY00kU-ByaRFZub.js → vidstack-D2pY00kU-BVC5bxHL.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-H7PZzMEr.js → vidstack-DDXt6fpN-DA-lnlhX.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-BgRVFwPt.js → vidstack-D_-9AA6_-C0QZLaX5.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-BODJkoui.js → vidstack-DqAw8m9J-DAs7LwX_.js} +1 -1
- package/dist/{vidstack-audio-Cnpq73DL.js → vidstack-audio-BrbZotHa.js} +2 -2
- package/dist/{vidstack-dash-Bzo3Gzfd.js → vidstack-dash-KNjyvq2R.js} +4 -4
- package/dist/{vidstack-google-cast--giiu8Z5.js → vidstack-google-cast-DMZQ1jRD.js} +4 -4
- package/dist/{vidstack-hls-CrDFf1Gs.js → vidstack-hls-BfOysul0.js} +4 -4
- package/dist/{vidstack-video-h7Tsw5LU.js → vidstack-video-PWMSQ3Gk.js} +3 -3
- package/dist/{vidstack-vimeo-CbcdGN2R.js → vidstack-vimeo-C5Khtd48.js} +4 -4
- package/dist/{vidstack-youtube-DKzx3LPK.js → vidstack-youtube-CPcpsir2.js} +3 -3
- package/dist/{wt-action-bar-GCDVmO0b.js → wt-action-bar-By55sdZf.js} +1 -1
- package/dist/{wt-button-select-BBsJj7FV.js → wt-button-select-C34W0lYV.js} +1 -1
- package/dist/{wt-chat-emoji-MhnNs-SG.js → wt-chat-emoji-DjgWXA_2.js} +2 -2
- package/dist/{wt-confirm-dialog-B4J3ZU2r.js → wt-confirm-dialog-GNka4gxY.js} +1 -1
- package/dist/{wt-context-menu-Cekc6Rva.js → wt-context-menu-Bjl5aGzG.js} +1 -1
- package/dist/{wt-copy-action-CT_0bHmt.js → wt-copy-action-Xo2DsqJZ.js} +1 -1
- package/dist/{wt-datepicker-B513Tw-Z.js → wt-datepicker-CL3jLy5h.js} +1 -1
- package/dist/{wt-display-chip-items-CMB33VOU.js → wt-display-chip-items-CCNWd5Nt.js} +1 -1
- package/dist/{wt-dual-panel-DjHHFx8Y.js → wt-dual-panel-CMUeBmf-.js} +1 -1
- package/dist/{wt-dummy-BivOEKRK.js → wt-dummy-BOgeleXm.js} +1 -1
- package/dist/{wt-error-page-krwX0484.js → wt-error-page-Ctl0-_Yp.js} +1 -1
- package/dist/{wt-expansion-card-Mrne6YQJ.js → wt-expansion-card-BCOBdTuS.js} +1 -1
- package/dist/{wt-expansion-panel-D0SABYA1.js → wt-expansion-panel-C7W_5dxd.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-Dffe4cS8.js → wt-filters-panel-wrapper-CkLHeV4o.js} +1 -1
- package/dist/{wt-galleria-CB3UNqGT.js → wt-galleria-Bls8Xxh4.js} +2 -2
- package/dist/{wt-navigation-menu-CozB-VN3.js → wt-navigation-menu-CFPMD9o1.js} +1 -1
- package/dist/{wt-notifications-bar-CBv9RpW3.js → wt-notifications-bar-BTDN7hSn.js} +2 -2
- package/dist/{wt-pagination-CrnHm3Ei.js → wt-pagination-DtjeKcpO.js} +1 -1
- package/dist/{wt-player-Be7Ts4oe.js → wt-player-Co3Ib7qU.js} +13 -13
- package/dist/{wt-screen-recordings-action-VJpYH40a.js → wt-screen-recordings-action-CmY7R2B-.js} +1 -1
- package/dist/{wt-search-bar-BNUpiOyg.js → wt-search-bar-CmN8Nq-n.js} +1 -1
- package/dist/{wt-selection-popup-DZG_s5cn.js → wt-selection-popup-BNKNa5jy.js} +1 -1
- package/dist/{wt-start-page-B1Ya211Z.js → wt-start-page-BC4r_EPK.js} +1 -1
- package/dist/{wt-status-select-ByEBtG_Z.js → wt-status-select-CBq_ihcS.js} +11 -14
- package/dist/{wt-stepper-Bke8hGIN.js → wt-stepper-DvmRISSE.js} +1 -1
- package/dist/{wt-table-rT0puxyU.js → wt-table-BDnXcyai.js} +14 -14
- package/dist/{wt-table-actions-D2QF78Jq.js → wt-table-actions-52X557c8.js} +1 -1
- package/dist/{wt-table-column-select-BtcIByjb.js → wt-table-column-select-vKGXHla2.js} +2 -2
- package/dist/{wt-tabs-BIn8m45h.js → wt-tabs-zXlsvaeU.js} +16 -17
- package/dist/{wt-tags-input-Bz3T5KC7.js → wt-tags-input-B8w0KXPv.js} +2 -2
- package/dist/{wt-timepicker-CuMYCWnA.js → wt-timepicker-Cm4aLsPK.js} +1 -1
- package/dist/{wt-tree-DftQx0vm.js → wt-tree-IVOTwA3x.js} +4 -4
- package/dist/{wt-tree-table-Cqt8iSLj.js → wt-tree-table-zA7HHvru.js} +3 -3
- package/dist/{wt-type-extension-value-input-rX_qRFjQ.js → wt-type-extension-value-input-DTmneCoP.js} +4 -7
- package/dist/{wt-vidstack-player-CWmoXIAG.js → wt-vidstack-player-DHmGgiDL.js} +13 -13
- package/package.json +3 -2
- package/src/api/clients/agents/agentChats.js +0 -1
- package/src/api/clients/agents/agents.js +1 -1
- package/src/api/clients/caseSources/caseSources.ts +1 -1
- package/src/api/clients/chatGateways/defaults/webChatGateway.js +5 -5
- package/src/api/clients/contactGroups/contactGroups.js +0 -1
- package/src/api/clients/queues/queues.js +16 -22
- package/src/api/clients/users/users.js +10 -2
- package/src/api/clients//321/201ontacts/contacts.js +0 -1
- package/src/api/clients//321/201ontacts/index.js +1 -1
- package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +1 -1
- package/src/api/transformers/addQueryParamsToUrl/addQueryParamsToUrl.transformer.js +2 -2
- package/src/api/transformers/sanitize/sanitize.transformer.js +2 -4
- package/src/api/websocket/WebSocketClientController.ts +6 -4
- package/src/components/index.js +3 -3
- package/src/components/wt-app-header/wt-app-navigator.vue +8 -11
- package/src/components/wt-galleria/wt-galleria.vue +1 -1
- package/src/components/wt-intersection-observer/wt-intersection-observer.vue +1 -1
- package/src/components/wt-player/src/components/buttons/mute-button.vue +0 -1
- package/src/components/wt-rounded-action/_variables.css +0 -3
- package/src/components/wt-select/mixins/multiselectMixin.js +0 -1
- package/src/components/wt-select/multiselect.css +2 -0
- package/src/components/wt-select/wt-select-v2.vue +3 -2
- package/src/components/wt-status-select/wt-status-select.vue +2 -4
- package/src/components/wt-switcher/wt-switcher.vue +1 -1
- package/src/components/wt-table/wt-table.vue +1 -1
- package/src/components/wt-tabs/wt-tabs.vue +1 -2
- package/src/components/wt-textarea/wt-textarea.vue +3 -4
- package/src/components/wt-tree/__tests__/WtTree.spec.js +1 -1
- package/src/components/wt-tree/wt-tree.vue +92 -60
- package/src/components/wt-tree-line/wt-tree-line.vue +2 -2
- package/src/components/wt-tree-table/wt-tree-table.vue +90 -84
- package/src/components/wt-tree-table-row/wt-tree-table-row.vue +2 -2
- package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +2 -2
- package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +1 -1
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +1 -1
- package/src/composables/useCard/useCardComponent.js +1 -1
- package/src/composables/useInputControl/useInputControl.ts +1 -1
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
- package/src/composables/useTableColumnDrag/useTableColumnDrag.ts +1 -1
- package/src/enums/index.ts +0 -1
- package/src/install.ts +1 -1
- package/src/locale/kz/kz.js +2 -4
- package/src/locale/pl/pl.js +2 -4
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/AgentPdfs/components/agent-pdfs-tab.vue +104 -96
- package/src/modules/AgentStatusSelect/api/agent-status.js +9 -13
- package/src/modules/AuditForm/components/audit-form.vue +1 -1
- package/src/modules/AuditForm/components/form-answers/answer-editing-info/audit-form-answer-editing-info.vue +1 -1
- package/src/modules/CSVExport/XLSExport.js +5 -7
- package/src/modules/CSVExport/composables/useCSVExport.ts +3 -3
- package/src/modules/CSVExport/mixins/exportCSVMixin.js +1 -5
- package/src/modules/CSVExport/mixins/exportXLSMixin.js +1 -5
- package/src/modules/FilesExport/composables/useFilesExport.ts +1 -1
- package/src/modules/FilesExport/types/types.ts +1 -1
- package/src/modules/Filters/store/FiltersStoreModule.js +27 -27
- package/src/modules/Notifications/store/NotificationsStoreModule.js +1 -1
- package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js +0 -4
- package/src/modules/ObjectPermissions/components/permissions-tab.vue +5 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +5 -6
- package/src/modules/TableStoreModule/store/TableStoreModule.js +10 -18
- package/src/modules/UploadCsvPopup/scripts/normalizeCSVData.ts +9 -9
- package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +1 -1
- package/src/modules/Userinfo/composables/createUserAccessControl.ts +2 -2
- package/src/modules/Userinfo/composables/types/CreateUserAccessControl.d.ts +2 -4
- package/src/modules/Userinfo/scripts/utils.ts +4 -2
- package/src/scripts/compareSize.ts +7 -6
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +17 -29
- package/src/validations/vuelidate/validators/decimalValidator.js +2 -1
- package/src/validations/vuelidate/validators/websocketValidator/websocketValidator.js +1 -1
- package/types/api/clients//321/201ontacts/index.d.ts +2 -2
- package/types/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.d.ts +1 -1
- package/types/components/wt-switcher/wt-switcher.vue.d.ts +1 -1
- package/types/components/wt-table/wt-table.vue.d.ts +1 -1
- package/types/components/wt-textarea/wt-textarea.vue.d.ts +3 -4
- package/types/components/wt-tree/wt-tree.vue.d.ts +6 -6
- package/types/components/wt-tree-line/wt-tree-line.vue.d.ts +2 -2
- package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +2 -2
- package/types/components/wt-tree-table-row/wt-tree-table-row.vue.d.ts +1 -1
- package/types/install.d.ts +1 -2
- package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +1 -1
- package/types/modules/CSVExport/composables/useCSVExport.d.ts +3 -3
- package/types/modules/FilesExport/composables/useFilesExport.d.ts +1 -1
- package/types/modules/FilesExport/types/types.d.ts +1 -1
- package/types/modules/Filters/store/FiltersStoreModule.d.ts +2 -2
- package/types/modules/Notifications/store/NotificationsStoreModule.d.ts +1 -1
- package/types/modules/TableStoreModule/store/TableStoreModule.d.ts +2 -2
- package/types/modules/Userinfo/composables/createUserAccessControl.d.ts +2 -2
- package/types/modules/Userinfo/scripts/utils.d.ts +1 -1
- package/types/store/new/modules/tableStoreModule/tableStoreModule.d.ts +2 -2
|
@@ -1,99 +1,105 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
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?:
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
167
|
+
if (!answersModel.value?.length) {
|
|
168
168
|
answersModel.value = props.questions.map(() => ({}));
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -59,13 +59,11 @@ export default class XLSExport {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
return columns.reduce((acc, column) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
[column]
|
|
65
|
-
|
|
66
|
-
|
|
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,
|
|
7
|
+
export type CSVRow = Record<string, unknown>;
|
|
8
8
|
|
|
9
|
-
export type FetchMethod = (params: Record<string,
|
|
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,
|
|
42
|
+
async function exportCSV(exportParams?: Record<string, unknown>) {
|
|
43
43
|
const routeQuery = route.query;
|
|
44
44
|
const params = {
|
|
45
45
|
...(exportParams || routeQuery),
|
|
@@ -11,7 +11,7 @@ export default class FiltersStoreModule extends BaseStoreModule {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
getters = {
|
|
14
|
-
ROUTER: (
|
|
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
|
-
(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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: (
|
|
45
|
+
GET_FILTERS: (_state, getters) => () => {
|
|
50
46
|
return getters._STATE_FILTER_NAMES.reduce((values, filterName) => {
|
|
51
47
|
const filterValue = getters.GET_FILTER(filterName);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
150
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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))
|
|
221
|
-
|
|
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
|
}
|
package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js
CHANGED
|
@@ -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((
|
|
154
|
-
|
|
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
|
-
|
|
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
|
-
|
|
77
|
+
shallowMount(Component, {
|
|
78
78
|
global: {
|
|
79
79
|
plugins: [
|
|
80
80
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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: (
|
|
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
|
-
|
|
28
|
-
|
|
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: (
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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;
|
|
@@ -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 =
|