@dative-gpi/foundation-core-components 1.0.118 → 1.0.119
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:showSelect="$props.editable"
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:itemTo="$props.itemTo"
|
|
10
|
-
:noSearch="
|
|
10
|
+
:noSearch="$props.recursiveSearch"
|
|
11
11
|
:modelValue="$props.modelValue"
|
|
12
12
|
@update:modelValue="onUpdate"
|
|
13
13
|
v-model:search="search"
|
|
@@ -159,9 +159,9 @@ import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
|
159
159
|
import { type RouteLocation } from "vue-router";
|
|
160
160
|
import _ from "lodash";
|
|
161
161
|
|
|
162
|
-
import { type DeviceExplorerElementFilters, type DeviceExplorerElementInfos} from "@dative-gpi/foundation-core-domain/models";
|
|
163
162
|
import { ConnectivityStatus, DeviceExplorerElementType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
164
163
|
import { useDeviceExplorerElements } from "@dative-gpi/foundation-core-services/composables";
|
|
164
|
+
import { type DeviceExplorerElementInfos} from "@dative-gpi/foundation-core-domain/models";
|
|
165
165
|
import { useDebounce } from "@dative-gpi/foundation-shared-components/composables";
|
|
166
166
|
|
|
167
167
|
import FSDeviceOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDeviceOrganisationTileUI.vue";
|
|
@@ -192,11 +192,21 @@ export default defineComponent({
|
|
|
192
192
|
required: false,
|
|
193
193
|
default: null
|
|
194
194
|
},
|
|
195
|
-
|
|
196
|
-
type:
|
|
195
|
+
recursiveSearch: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
required: false,
|
|
198
|
+
default: true
|
|
199
|
+
},
|
|
200
|
+
parentId: {
|
|
201
|
+
type: String as PropType<string | null>,
|
|
197
202
|
required: false,
|
|
198
203
|
default: null
|
|
199
204
|
},
|
|
205
|
+
root: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
required: false,
|
|
208
|
+
default: true
|
|
209
|
+
},
|
|
200
210
|
connectedOnly: {
|
|
201
211
|
type: Boolean,
|
|
202
212
|
required: false,
|
|
@@ -257,20 +267,32 @@ export default defineComponent({
|
|
|
257
267
|
}
|
|
258
268
|
|
|
259
269
|
const fetch = () => {
|
|
260
|
-
|
|
270
|
+
if (props.recursiveSearch && search.value) {
|
|
271
|
+
getManyDeviceExplorerElements({
|
|
272
|
+
ancestorId: props.parentId,
|
|
273
|
+
root: props.root,
|
|
274
|
+
search: search.value
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
getManyDeviceExplorerElements({
|
|
279
|
+
parentId: props.parentId,
|
|
280
|
+
root: props.root
|
|
281
|
+
});
|
|
282
|
+
}
|
|
261
283
|
}
|
|
262
284
|
|
|
263
285
|
// Delay to wait before fetching after a search change
|
|
264
286
|
const debounceFetch = (): void => debounce(fetch, 1500);
|
|
265
287
|
|
|
266
|
-
watch(() => props.
|
|
288
|
+
watch([() => props.parentId, () => props.root], (next, previous) => {
|
|
267
289
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
268
290
|
fetch();
|
|
269
291
|
}
|
|
270
292
|
}, { immediate: true });
|
|
271
293
|
|
|
272
294
|
watch(search, (next, previous) => {
|
|
273
|
-
if (
|
|
295
|
+
if (props.recursiveSearch && next !== previous) {
|
|
274
296
|
debounceFetch();
|
|
275
297
|
}
|
|
276
298
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.119",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.119",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.119",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.119",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.119",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.119"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "064069397c01ef8d45ea465fde13ea739f054bdf"
|
|
30
30
|
}
|