@vc-shell/framework 1.0.159 → 1.0.161
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../shared/modules/dynamic/composables/useFilterBuilder/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../shared/modules/dynamic/composables/useFilterBuilder/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,QAAQ,EAIR,eAAe,EACf,YAAY,EACZ,KAAK,EACL,WAAW,EAIZ,MAAM,KAAK,CAAC;AAGb,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,UAAU,EAAmC,MAAM,aAAa,CAAC;AAS1E,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,CAAC,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAChD,KAAK,CACH,YAAY,EACZ,eAAe,EACf;QAEE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CACF,GACD,SAAS,CAAC;IACd,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;;UAGO,UAAU,GAAG,SAAS;;;WAGrB,YAAY,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS;MACjD,gBAAgB;AALpB,wBA+ME"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.161",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"whatwg-fetch": "^3.6.19"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
57
|
-
"@vc-shell/config-generator": "^1.0.
|
|
58
|
-
"@vc-shell/ts-config": "^1.0.
|
|
56
|
+
"@vc-shell/api-client-generator": "^1.0.161",
|
|
57
|
+
"@vc-shell/config-generator": "^1.0.161",
|
|
58
|
+
"@vc-shell/ts-config": "^1.0.161",
|
|
59
59
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
60
60
|
"sass": "^1.69.6",
|
|
61
61
|
"typescript": "^5.3.3",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toReactive, createUnrefFn } from "@vueuse/core";
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
3
|
import {
|
|
3
4
|
h,
|
|
@@ -7,7 +8,6 @@ import {
|
|
|
7
8
|
unref,
|
|
8
9
|
Component,
|
|
9
10
|
onMounted,
|
|
10
|
-
reactive,
|
|
11
11
|
RendererElement,
|
|
12
12
|
RendererNode,
|
|
13
13
|
VNode,
|
|
@@ -20,10 +20,8 @@ import * as _ from "lodash-es";
|
|
|
20
20
|
import { Checkbox, InputField } from "../../components/factories";
|
|
21
21
|
import { AsyncAction } from "../../../../../core/composables";
|
|
22
22
|
import { VcButton, VcCol, VcContainer, VcRow } from "../../../../../ui/components";
|
|
23
|
-
import { createUnrefFn } from "@vueuse/core";
|
|
24
23
|
import { useI18n } from "vue-i18n";
|
|
25
24
|
import { FilterBase, FilterCheckbox, FilterDateInput } from "../../types";
|
|
26
|
-
import { onBeforeUnmount } from "vue";
|
|
27
25
|
|
|
28
26
|
interface Control {
|
|
29
27
|
title: string;
|
|
@@ -165,14 +163,14 @@ export default <Query>(args: {
|
|
|
165
163
|
}
|
|
166
164
|
|
|
167
165
|
async function applyFilters(filterHandlerFn: () => void) {
|
|
166
|
+
appliedFilter.value = {
|
|
167
|
+
...filter.value,
|
|
168
|
+
};
|
|
168
169
|
filterHandlerFn();
|
|
169
170
|
await _search({
|
|
170
171
|
...unref(args.query),
|
|
171
172
|
...filter.value,
|
|
172
173
|
});
|
|
173
|
-
appliedFilter.value = {
|
|
174
|
-
...filter.value,
|
|
175
|
-
};
|
|
176
174
|
}
|
|
177
175
|
|
|
178
176
|
async function resetFilters(filterHandlerFn: () => void) {
|
|
@@ -192,9 +190,7 @@ export default <Query>(args: {
|
|
|
192
190
|
VcContainer,
|
|
193
191
|
{
|
|
194
192
|
onVnodeBeforeMount: () => {
|
|
195
|
-
|
|
196
|
-
filter.value = _.cloneDeep(appliedFilter.value);
|
|
197
|
-
}
|
|
193
|
+
filter.value = { ...appliedFilter.value };
|
|
198
194
|
},
|
|
199
195
|
},
|
|
200
196
|
() => [
|
|
@@ -247,7 +243,7 @@ export default <Query>(args: {
|
|
|
247
243
|
}
|
|
248
244
|
|
|
249
245
|
async function reset() {
|
|
250
|
-
Object.keys(filter).forEach((key: string) => (filter.value[key] = undefined));
|
|
246
|
+
Object.keys(filter.value).forEach((key: string) => (filter.value[key] = undefined));
|
|
251
247
|
|
|
252
248
|
appliedFilter.value = {};
|
|
253
249
|
}
|
|
@@ -255,7 +251,7 @@ export default <Query>(args: {
|
|
|
255
251
|
return {
|
|
256
252
|
filterComponent: render,
|
|
257
253
|
activeFilterCount,
|
|
258
|
-
filter: readonly(filter
|
|
254
|
+
filter: readonly(toReactive(filter)),
|
|
259
255
|
isFilterVisible: computed(() => isFilterVisible.value),
|
|
260
256
|
reset,
|
|
261
257
|
};
|