@dative-gpi/foundation-core-components 1.0.128-fix-mobile-8 → 1.0.128-remove-deprecated-scenario

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.
@@ -19,7 +19,8 @@
19
19
  :entity-type="$props.entityType"
20
20
  :filters="simpleListFilters"
21
21
  :showEdit="false"
22
- :showRemove="false"
22
+ :showRemove="showRemove"
23
+ @click:remove="onRemove"
23
24
  direction="row"
24
25
  />
25
26
  </FSSlideGroup>
@@ -96,9 +97,14 @@ export default defineComponent({
96
97
  type: Object,
97
98
  required: false,
98
99
  default: null
100
+ },
101
+ showRemove: {
102
+ type: Boolean,
103
+ required: false,
104
+ default: false
99
105
  }
100
106
  },
101
- setup(props, { attrs }){
107
+ setup(props, { emit, attrs }){
102
108
  const simpleListFilters = computed(() => {
103
109
  switch(props.entityType) {
104
110
  case EntityType.Device:
@@ -188,10 +194,15 @@ export default defineComponent({
188
194
  };
189
195
  });
190
196
 
197
+ const onRemove = (id: string) => {
198
+ emit("update:modelValue", props.modelValue.filter((i) => i !== id));
199
+ }
200
+
191
201
  return {
192
202
  simpleListFilters,
193
203
  baseTableAttrs,
194
- tableCode
204
+ tableCode,
205
+ onRemove
195
206
  }
196
207
  }
197
208
  });
@@ -211,8 +211,9 @@
211
211
  </template>
212
212
 
213
213
  <script lang="ts">
214
- import { computed, defineComponent, type PropType, watch } from "vue";
214
+ import type { PropType} from "vue";
215
215
  import type { RouteLocation } from "vue-router";
216
+ import { computed, defineComponent, watch } from "vue";
216
217
  import _ from "lodash";
217
218
 
218
219
  import type { AlertFilters, AlertInfos } from "@dative-gpi/foundation-core-domain/models";
@@ -284,6 +285,7 @@ export default defineComponent({
284
285
  const { getMany: getManyAlerts, entities: alerts, fetching : fetchingAlerts } = useAlerts();
285
286
  const { epochToShortTimeFormat } = useDateFormat();
286
287
 
288
+
287
289
  const criticityColor = (row: any) => {
288
290
  return AlertTools.criticityColor(row.criticity);
289
291
  };
@@ -302,14 +304,14 @@ export default defineComponent({
302
304
 
303
305
  watch(() => [props.alertFilters, props.notAcknowledged, props.hidePending], (next, previous) => {
304
306
  if (!_.isEqual(next, previous)) {
305
- if (props.notAcknowledged) {
307
+ if(props.notAcknowledged){
306
308
  getManyAlerts({
307
309
  ...props.alertFilters,
308
310
  acknowledged: false,
309
311
  statuses: [AlertStatus.Unresolved, AlertStatus.Triggered],
310
312
  });
311
313
  }
312
- else {
314
+ else{
313
315
  getManyAlerts({
314
316
  ...props.alertFilters,
315
317
  statuses: props.hidePending ?
@@ -320,6 +322,7 @@ export default defineComponent({
320
322
  }
321
323
  }, { immediate: true });
322
324
 
325
+
323
326
  return {
324
327
  fetchingAlerts,
325
328
  alertsOrdered,
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.128-fix-mobile-8",
4
+ "version": "1.0.128-remove-deprecated-scenario",
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.128-fix-mobile-8",
14
- "@dative-gpi/foundation-core-services": "1.0.128-fix-mobile-8",
15
- "@dative-gpi/foundation-shared-components": "1.0.128-fix-mobile-8",
16
- "@dative-gpi/foundation-shared-domain": "1.0.128-fix-mobile-8",
17
- "@dative-gpi/foundation-shared-services": "1.0.128-fix-mobile-8"
13
+ "@dative-gpi/foundation-core-domain": "1.0.128-remove-deprecated-scenario",
14
+ "@dative-gpi/foundation-core-services": "1.0.128-remove-deprecated-scenario",
15
+ "@dative-gpi/foundation-shared-components": "1.0.128-remove-deprecated-scenario",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.128-remove-deprecated-scenario",
17
+ "@dative-gpi/foundation-shared-services": "1.0.128-remove-deprecated-scenario"
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": "5b1dcb13a29b9fc131731f859b12dd31dcd6beff"
29
+ "gitHead": "c130943e7cb96800dbd98069299ec689da3c9866"
30
30
  }
@@ -1,70 +0,0 @@
1
- <template>
2
- <FSChartTileUI
3
- v-if="chart"
4
- :label="chart.label"
5
- :icon="chart.icon"
6
- :type="chart.chartType"
7
- :imageId="chart.imageId"
8
- v-bind="$attrs"
9
- />
10
- </template>
11
-
12
- <script lang="ts">
13
- import { computed, defineComponent, type PropType, watch } from "vue";
14
-
15
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
16
- import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
17
-
18
- import { useChartOrganisation, useChartOrganisationType } from "@dative-gpi/foundation-core-services/composables";
19
- import { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
20
-
21
- import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
22
-
23
- export default defineComponent({
24
- name: "FSChartTile",
25
- components: {
26
- FSChartTileUI
27
- },
28
- props: {
29
- chartId: {
30
- type: String,
31
- required: true
32
- },
33
- scope: {
34
- type: Object as PropType<ApplicationScope | number>,
35
- required : true
36
- }
37
- },
38
- setup(props) {
39
- const { get : fetchChartOrganisationType, entity : chartOrganisationType } = useChartOrganisationType();
40
- const { get : fetchChartOrganisation, entity : chartOrganisation } = useChartOrganisation();
41
-
42
- const chart = computed(() => {
43
- if (props.scope == ApplicationScope.Organisation) {
44
- return chartOrganisation.value;
45
- }
46
- else if (props.scope == ApplicationScope.OrganisationType) {
47
- return chartOrganisationType.value;
48
- }
49
- else {
50
- return null
51
- }
52
- });
53
-
54
- watch(() => [props.chartId, props.scope], () => {
55
- if (props.scope == ApplicationScope.Organisation) {
56
- fetchChartOrganisation(props.chartId);
57
- }
58
- else if (props.scope == ApplicationScope.OrganisationType) {
59
- fetchChartOrganisationType(props.chartId)
60
- }
61
- }, {immediate : true})
62
-
63
- return {
64
- ColorEnum,
65
- chart,
66
- chartIcon
67
- };
68
- }
69
- });
70
- </script>