@webitel/ui-datalist 1.0.95 → 1.0.96
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-datalist",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.96",
|
|
4
4
|
"description": "Toolkit for building data lists in webitel ui system",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run utils:publish",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@vuelidate/core": "^2.0.3",
|
|
37
37
|
"@vuelidate/validators": "^2.0.4",
|
|
38
38
|
"@vueuse/core": "^13.3.0",
|
|
39
|
-
"@webitel/api-services": "^0.0.
|
|
39
|
+
"@webitel/api-services": "^0.0.105",
|
|
40
40
|
"@webitel/styleguide": "^24.12.61",
|
|
41
41
|
"@webitel/ui-sdk": "^25.8.62",
|
|
42
42
|
"zod": "^3.25.55"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import deepEqual from 'deep-equal';
|
|
1
2
|
import set from 'lodash/fp/set';
|
|
2
|
-
import { type Ref, ref, watch } from 'vue';
|
|
3
|
+
import { type Ref, ref, toRaw, watch } from 'vue';
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
createDatalistStore,
|
|
@@ -23,7 +24,6 @@ export const tableStoreBody = <Entity extends { id: string; etag?: string }>(
|
|
|
23
24
|
disablePersistence,
|
|
24
25
|
storeType,
|
|
25
26
|
isAppendDataList,
|
|
26
|
-
trackSelectedRowBy,
|
|
27
27
|
} = config;
|
|
28
28
|
const usePaginationStore = createTablePaginationStore(namespace, config);
|
|
29
29
|
const useHeadersStore = createTableHeadersStore(namespace, config, {
|
|
@@ -118,6 +118,13 @@ export const tableStoreBody = <Entity extends { id: string; etag?: string }>(
|
|
|
118
118
|
|
|
119
119
|
dataList.value = items;
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @author: @Oleksandr Palonnyi
|
|
123
|
+
*
|
|
124
|
+
* [WTEL-8571](https://webitel.atlassian.net/browse/WTEL-8571)
|
|
125
|
+
*
|
|
126
|
+
* link to refactor task - https://webitel.atlassian.net/browse/WTEL-8599
|
|
127
|
+
* */
|
|
121
128
|
updateSelected(filterSelected(items));
|
|
122
129
|
|
|
123
130
|
$patchPaginationStore({ next });
|
|
@@ -130,8 +137,11 @@ export const tableStoreBody = <Entity extends { id: string; etag?: string }>(
|
|
|
130
137
|
};
|
|
131
138
|
|
|
132
139
|
function filterSelected(items: Entity[]): Entity[] {
|
|
133
|
-
const
|
|
134
|
-
|
|
140
|
+
const selectedToRaw = selected.value.map(toRaw);
|
|
141
|
+
|
|
142
|
+
return items.filter((item) =>
|
|
143
|
+
selectedToRaw.some((s) => deepEqual(s, item)),
|
|
144
|
+
);
|
|
135
145
|
}
|
|
136
146
|
|
|
137
147
|
const appendToDataList = async () => {
|
|
@@ -10,7 +10,6 @@ export interface useTableStoreConfig<Entity> {
|
|
|
10
10
|
disablePersistence?: boolean | [];
|
|
11
11
|
storeType?: DatalistStoreProviderType;
|
|
12
12
|
isAppendDataList?: boolean;
|
|
13
|
-
trackSelectedRowBy?: TrackSelectedRowBy<Entity>;
|
|
14
13
|
}
|
|
15
14
|
export interface PatchItemPropertyParams {
|
|
16
15
|
index: number;
|