quasar-ui-danx 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -31,20 +31,8 @@ const props = defineProps({
31
31
  type: Object,
32
32
  required: true
33
33
  },
34
- filterGroups: {
35
- type: Array,
36
- required: true
37
- },
38
34
  showFilters: Boolean
39
35
  });
40
36
 
41
- const filterNameDictionary = computed(() => {
42
- return props.filterGroups.reduce((acc, fg) => {
43
- fg.fields.forEach(f => {
44
- acc[f.name] = true;
45
- });
46
- return acc;
47
- }, {});
48
- });
49
- const activeCount = computed(() => Object.keys(props.filter).filter(key => props.filter[key] !== undefined && filterNameDictionary.value[key]).length);
37
+ const activeCount = computed(() => Object.keys(props.filter).filter(key => props.filter[key] !== undefined).length);
50
38
  </script>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="w-full flex justify-end items-center flex-nowrap border-b">
3
+ <FilterListToggle
4
+ :show-filters="showFilters"
5
+ :filter="filter"
6
+ class="border-r p-4 flex-shrink-0"
7
+ @update:show-filters="$emit('update:show-filters', $event)"
8
+ @update:filter="$emit('update:filter', $event)"
9
+ />
10
+
11
+ <div class="flex-grow">
12
+ <slot />
13
+ </div>
14
+
15
+ <div v-if="$slots['right-side']" class="flex justify-end items-stretch flex-nowrap p-4">
16
+ <QSeparator vertical class="mx-4 h-10 self-center" />
17
+
18
+ <slot name="right-side" />
19
+ </div>
20
+ </div>
21
+ </template>
22
+ <script setup>
23
+ import { FilterListToggle } from "quasar-ui-danx";
24
+
25
+ defineEmits(["update:show-filters", "update:filter"]);
26
+ defineProps({
27
+ filter: {
28
+ type: Object,
29
+ default: null
30
+ },
31
+ showFilters: Boolean
32
+ });
33
+ </script>
@@ -3,3 +3,4 @@ export {
3
3
  } from "./CollapsableFiltersSidebar.vue";
4
4
  export { default as FilterGroupList } from "./FilterGroupList.vue";
5
5
  export { default as FilterListToggle } from "./FilterListToggle.vue";
6
+ export { default as FilterToolbarLayout } from "./FilterToolbarLayout.vue";