@tekkare/auriga 0.2.82 → 0.2.84

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/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.82"
7
+ "version": "0.2.84"
8
8
  }
@@ -46,7 +46,7 @@
46
46
  v-if="
47
47
  filterBlocks.length > 0 &&
48
48
  blockCategories !== null &&
49
- blockCategories.length > 0
49
+ blockCategories?.length > 0
50
50
  "
51
51
  class="oip_list v-start gap-16"
52
52
  >
@@ -55,7 +55,18 @@
55
55
  :key="category"
56
56
  class="oip_list v-start gap-8 category_container"
57
57
  >
58
- <p class="category_label">{{ category }}</p>
58
+ <div class="category_label">
59
+ <arg-icon
60
+ v-if="category.icon"
61
+ :name="category.icon"
62
+ color="var(--medium)"
63
+ size="20"
64
+ thickness="20"
65
+ />
66
+ <p>
67
+ {{ typeof category === "string" ? category : category.label }}
68
+ </p>
69
+ </div>
59
70
  <div class="oip_row v-start gap-16 wrap full_stretch">
60
71
  <div
61
72
  v-for="(block, index) in filterCategoryBlocks(category)"
@@ -270,10 +281,14 @@ export default defineComponent({
270
281
  const categories = ref(null);
271
282
  if (props.appBlocks.length > 0 && props.appBlocks.filter((f) => f.category !== void 0)?.length > 0) {
272
283
  categories.value = [
273
- ...new Set(props.appBlocks.map((a) => a.category))
284
+ ...new Set(
285
+ props.appBlocks.map(
286
+ (a) => typeof a.category === "string" ? a.category : JSON.stringify(a.category)
287
+ )
288
+ )
274
289
  ];
275
290
  }
276
- return categories.value;
291
+ return categories.value !== null ? categories.value.some((a) => a.startsWith("{")) ? categories.value.map((a) => JSON.parse(a)) : categories.value : null;
277
292
  });
278
293
  onBeforeMount(async () => {
279
294
  setLang();
@@ -306,7 +321,9 @@ export default defineComponent({
306
321
  return props.appBlocks.length > 0 ? props.appBlocks.filter((a) => includesValue(a)) : null;
307
322
  });
308
323
  const filterCategoryBlocks = (cat) => {
309
- return props.appBlocks.length > 0 ? props.appBlocks.filter((a) => a.category === cat) : null;
324
+ return props.appBlocks.length > 0 ? props.appBlocks.filter(
325
+ (a) => typeof cat === "string" ? a.category === cat : a.category.label === cat.label
326
+ ) : null;
310
327
  };
311
328
  function includesValue(a) {
312
329
  const hasValue = ref(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.82",
3
+ "version": "0.2.84",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",