@dative-gpi/foundation-core-components 1.1.4-groupings-08 → 1.1.5

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.
@@ -42,6 +42,7 @@
42
42
  :singleSelect="$props.singleSelect"
43
43
  :entity-type="$props.entityType"
44
44
  :tableCode="tableCode"
45
+ :selectable="true"
45
46
  :modelValue="$props.modelValue"
46
47
  @update:modelValue="$emit('update:modelValue', $event)"
47
48
  v-bind="baseTableAttrs"
@@ -118,7 +118,7 @@
118
118
  <template
119
119
  #item.subgroupings="{ item }"
120
120
  >
121
- <FSSubgroupingsChipList
121
+ <FSSubgroupingsChipGroup
122
122
  :subgroupings="item.subgroupings"
123
123
  />
124
124
  </template>
@@ -216,13 +216,13 @@ import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSI
216
216
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
217
217
  import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
218
218
  import FSSpan from '@dative-gpi/foundation-shared-components/components/FSSpan.vue';
219
- import FSSubgroupingsChipList from "../subgroupings/FSSubgroupingsChipList.vue";
219
+ import FSSubgroupingsChipGroup from "../subgroupings/FSSubgroupingsChipGroup.vue";
220
220
 
221
221
  export default defineComponent({
222
222
  name: "FSBaseDeviceOrganisationsList",
223
223
  components: {
224
224
  FSDeviceOrganisationTileUI,
225
- FSSubgroupingsChipList,
225
+ FSSubgroupingsChipGroup,
226
226
  FSSubgroupingChip,
227
227
  FSStatusesCarousel,
228
228
  FSConnectivity,
@@ -80,7 +80,7 @@ export default defineComponent({
80
80
  selectable: {
81
81
  type: Boolean,
82
82
  required: false,
83
- default: true
83
+ default: false
84
84
  },
85
85
  singleSelect: {
86
86
  type: Boolean,
@@ -26,6 +26,7 @@ export default defineComponent({
26
26
  default: () => ({})
27
27
  }
28
28
  },
29
+ innheritAttrs: false,
29
30
  setup(props){
30
31
  const { entities: groups, getMany, fetching } = useGroups();
31
32
 
@@ -5,7 +5,7 @@
5
5
  :itemTo="$props.itemTo"
6
6
  :tableCode="$props.tableCode"
7
7
  :selectable="$props.selectable"
8
- :showSearch="true"
8
+ :showSearch="$props.showSearch"
9
9
  :disableIterator="true"
10
10
  :singleSelect="$props.singleSelect"
11
11
  :groupBy="groupBy"
@@ -27,15 +27,22 @@
27
27
  >
28
28
  <FSRow
29
29
  height="54px"
30
- padding="16px 16px 16px 56px"
31
30
  align="center-left"
32
- :style="{ backgroundColor: getColors(ColorEnum.Light).base }"
33
31
  >
34
- <FSGroupingChip
35
- :label="getGroupingLabel(item.value)"
36
- :iconColor="getGroupingColor(item.value)"
37
- :icon="getGroupingIcon(item.value)"
38
- />
32
+ <FSCard
33
+ padding="16px 16px 16px 56px"
34
+ height="100%"
35
+ width="100%"
36
+ :borderRadius="0"
37
+ :variant="CardVariants.Full"
38
+ :color="getColors(ColorEnum.Light).base"
39
+ >
40
+ <FSGroupingChip
41
+ :label="getGroupingLabel(item.value)"
42
+ :iconColor="getGroupingColor(item.value)"
43
+ :icon="getGroupingIcon(item.value)"
44
+ />
45
+ </FSCard>
39
46
  </FSRow>
40
47
  </template>
41
48
  <template
@@ -75,9 +82,10 @@ import FSDataTable from "../FSDataTable.vue";
75
82
  import FSSubgroupingTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSSubgroupingTileUI.vue";
76
83
  import FSGroupingChip from "@dative-gpi/foundation-shared-components/components/FSGroupingChip.vue";
77
84
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
85
+ import FSCard from "@dative-gpi/foundation-shared-components/components/FSCard.vue";
78
86
  import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
79
87
 
80
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
88
+ import { ColorEnum, CardVariants } from "@dative-gpi/foundation-shared-components/models";
81
89
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
82
90
 
83
91
  export default defineComponent({
@@ -87,6 +95,7 @@ export default defineComponent({
87
95
  FSGroupingChip,
88
96
  FSDataTable,
89
97
  FSIcon,
98
+ FSCard,
90
99
  FSRow
91
100
  },
92
101
  props: {
@@ -114,12 +123,18 @@ export default defineComponent({
114
123
  required: false,
115
124
  default: false
116
125
  },
126
+ showSearch: {
127
+ type: Boolean,
128
+ required: false,
129
+ default: true
130
+ },
117
131
  modelValue: {
118
132
  type: Array as PropType<string[]>,
119
133
  required: false,
120
134
  default: () => []
121
135
  }
122
136
  },
137
+ inheritAttrs: false,
123
138
  emits: ["update:modelValue"],
124
139
  setup(props) {
125
140
  const { getMany: fetchSubgroupings, fetching: fetchingSubgroupings, entities: subgroupings } = useSubgroupings();
@@ -142,15 +157,15 @@ export default defineComponent({
142
157
  });
143
158
 
144
159
  const getGroupingLabel = (groupingId: string): string => {
145
- return groupingMap.value[groupingId]?.label ?? "";
160
+ return groupingMap.value[groupingId].label;
146
161
  };
147
162
 
148
163
  const getGroupingColor = (groupingId: string): string => {
149
- return groupingMap.value[groupingId]?.color ?? "";
164
+ return groupingMap.value[groupingId].color;
150
165
  };
151
166
 
152
167
  const getGroupingIcon = (groupingId: string): string => {
153
- return groupingMap.value[groupingId]?.icon ?? "";
168
+ return groupingMap.value[groupingId].icon;
154
169
  };
155
170
 
156
171
  const isSelected = (id: string) => {
@@ -169,10 +184,11 @@ export default defineComponent({
169
184
  getGroupingColor,
170
185
  getGroupingIcon,
171
186
  subgroupings,
187
+ CardVariants,
172
188
  isSelected,
173
189
  getColors,
174
190
  ColorEnum,
175
- groupBy
191
+ groupBy,
176
192
  };
177
193
  }
178
194
  });
@@ -26,6 +26,7 @@ export default defineComponent({
26
26
  default: () => ({})
27
27
  }
28
28
  },
29
+ inheritAttrs: false,
29
30
  setup(props) {
30
31
  const { entities: subgroupings, getMany, fetching } = useSubgroupings();
31
32
 
@@ -1,18 +1,21 @@
1
1
  <template>
2
2
  <FSChipGroup
3
3
  v-if="$props.subgroupings && $props.subgroupings.length > 0"
4
- :variant="$props.variant"
4
+ :items="$props.subgroupings"
5
+ :maxItems="$props.maxItems"
5
6
  >
6
- <FSSubgroupingChip
7
- v-for="(item, index) in $props.subgroupings"
8
- :key="index"
9
- :groupingLabel="item.groupingLabel"
10
- :groupingIcon="item.groupingIcon"
11
- :groupingColor="item.groupingColor"
12
- :label="item.label"
13
- :icon="item.icon"
14
- :to="$props.itemTo ? $props.itemTo(item) : null"
15
- />
7
+ <template
8
+ #item.chip="{ item }"
9
+ >
10
+ <FSSubgroupingChip
11
+ :groupingLabel="item.groupingLabel"
12
+ :groupingIcon="item.groupingIcon"
13
+ :groupingColor="item.groupingColor"
14
+ :label="item.label"
15
+ :icon="item.icon"
16
+ :to="$props.itemTo ? $props.itemTo(item) : null"
17
+ />
18
+ </template>
16
19
  </FSChipGroup>
17
20
  </template>
18
21
 
@@ -27,7 +30,7 @@ import FSSubgroupingChip from "@dative-gpi/foundation-shared-components/componen
27
30
  import FSChipGroup from "@dative-gpi/foundation-shared-components/components/FSChipGroup.vue";
28
31
 
29
32
  export default defineComponent({
30
- name: "FSSubgroupingsChipList",
33
+ name: "FSSubgroupingsChipGroup",
31
34
  components: {
32
35
  FSSubgroupingChip,
33
36
  FSChipGroup
@@ -41,10 +44,10 @@ export default defineComponent({
41
44
  type: Function as PropType<(item: SubgroupingInfos) => Partial<RouteLocation>>,
42
45
  required: false
43
46
  },
44
- variant: {
45
- type: String as PropType<"wrap" | "slide" | "menu">,
47
+ maxItems: {
48
+ type: Number as PropType<number | null>,
46
49
  required: false,
47
- default: "menu"
50
+ default: 1
48
51
  }
49
52
  }
50
53
  });
@@ -12,7 +12,7 @@
12
12
  <FSChipGroup
13
13
  v-else
14
14
  :color="ColorEnum.Light"
15
- :labels="userOrganisations?.map(u => u.name)"
15
+ :items="userOrganisations?.map(u => u.name)"
16
16
  v-bind="$attrs"
17
17
  />
18
18
  </template>
@@ -28,7 +28,7 @@ import FSLoader from "@dative-gpi/foundation-shared-components/components/FSLoad
28
28
  import FSChipGroup from "@dative-gpi/foundation-shared-components/components/FSChipGroup.vue";
29
29
 
30
30
  export default defineComponent({
31
- name: "FSChipUserOrganisationsList",
31
+ name: "FSUserOrganisationsChipGroup",
32
32
  components: {
33
33
  FSChipGroup,
34
34
  FSLoader,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
5
5
  },
6
6
  "sideEffects": false,
7
- "version": "1.1.4-groupings-08",
7
+ "version": "1.1.5",
8
8
  "description": "",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -13,11 +13,11 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@dative-gpi/foundation-core-domain": "1.1.4-groupings-08",
17
- "@dative-gpi/foundation-core-services": "1.1.4-groupings-08",
18
- "@dative-gpi/foundation-shared-components": "1.1.4-groupings-08",
19
- "@dative-gpi/foundation-shared-domain": "1.1.4-groupings-08",
20
- "@dative-gpi/foundation-shared-services": "1.1.4-groupings-08"
16
+ "@dative-gpi/foundation-core-domain": "1.1.5",
17
+ "@dative-gpi/foundation-core-services": "1.1.5",
18
+ "@dative-gpi/foundation-shared-components": "1.1.5",
19
+ "@dative-gpi/foundation-shared-domain": "1.1.5",
20
+ "@dative-gpi/foundation-shared-services": "1.1.5"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -29,5 +29,5 @@
29
29
  "sass": "1.71.1",
30
30
  "sass-loader": "13.3.2"
31
31
  },
32
- "gitHead": "85231e416ac50f2f86c289cbb1ed0622ffac7ac5"
32
+ "gitHead": "6b5102bcda554056f4d0fa0fba7e5a5e8f24e91e"
33
33
  }