alytus-ff 1.0.2 → 1.0.4
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/App.vue.d.ts +2 -0
- package/dist/alytus-ff.js +10929 -4910
- package/dist/alytus-ff.umd.cjs +1 -1
- package/dist/bundle-stats.html +1 -1
- package/dist/components/DataTable/DataTableFilters.vue.d.ts +1 -343
- package/dist/components/Page/InnerLeftMenu.vue.d.ts +15 -4
- package/dist/types/DataTable.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/DataTable/DataTableFilters.vue +2 -2
- package/src/components/Page/InnerLeftMenu.vue +7 -9
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { MenuItem } from '../../types/Nav.ts';
|
|
3
2
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
3
|
items: {
|
|
5
|
-
type: PropType<
|
|
4
|
+
type: PropType<{
|
|
5
|
+
title: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
type?: "subheader" | "link";
|
|
8
|
+
}[]>;
|
|
6
9
|
required: true;
|
|
7
10
|
};
|
|
8
11
|
}>, {
|
|
9
|
-
goTo: (to:
|
|
12
|
+
goTo: (to: {
|
|
13
|
+
id: unknown;
|
|
14
|
+
value: boolean;
|
|
15
|
+
path: unknown[];
|
|
16
|
+
}) => void;
|
|
10
17
|
isActive: (path: string) => boolean;
|
|
11
18
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
19
|
items: {
|
|
13
|
-
type: PropType<
|
|
20
|
+
type: PropType<{
|
|
21
|
+
title: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
type?: "subheader" | "link";
|
|
24
|
+
}[]>;
|
|
14
25
|
required: true;
|
|
15
26
|
};
|
|
16
27
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
-
import {type Component, defineComponent, type PropType
|
|
15
|
+
import {type Component, computed, defineComponent, type PropType} from "vue"
|
|
16
16
|
import type {GetFilterComponentFx, Filter, FilterValue} from "../../types/DataTable.ts"
|
|
17
17
|
|
|
18
18
|
|
|
@@ -39,7 +39,7 @@ export default defineComponent({
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
setup(props) {
|
|
42
|
-
const filters =
|
|
42
|
+
const filters = computed<FilterComponent[]>(() => props.filters.map(x => ({...x, component: props.getFilterComponent(x), value: x.default})))
|
|
43
43
|
return {filters}
|
|
44
44
|
}
|
|
45
45
|
})
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-list class="inner-left-menu mobile-horizontal">
|
|
3
|
-
<v-list-item v-for="item in items" :active="isActive(item.link)" @click="goTo(item.link)">
|
|
4
|
-
<v-list-item-title>{{ item.text }}</v-list-item-title>
|
|
5
|
-
</v-list-item>
|
|
6
|
-
</v-list>
|
|
2
|
+
<v-list class="inner-left-menu mobile-horizontal" :items="items" :selected="items.filter(x => x.value && isActive(x.value)).map(x => x.value)" @click:select="goTo($event)"></v-list>
|
|
7
3
|
</template>
|
|
8
4
|
|
|
9
5
|
<script lang="ts">
|
|
10
6
|
import {defineComponent, type PropType} from 'vue'
|
|
11
|
-
import {useRoute, useRouter} from "vue-router"
|
|
12
|
-
import {type MenuItem} from "../../types/Nav.ts";
|
|
7
|
+
import {useRoute, useRouter} from "vue-router"
|
|
13
8
|
|
|
14
9
|
export default defineComponent({
|
|
15
10
|
name: 'InnerLeftMenu',
|
|
16
11
|
components: {},
|
|
17
12
|
props: {
|
|
18
13
|
items: {
|
|
19
|
-
type: Array as PropType<
|
|
14
|
+
type: Array as PropType<{ title: string; value?: string; type?: 'subheader' | 'link' }[]>,
|
|
20
15
|
required: true
|
|
21
16
|
}
|
|
22
17
|
},
|
|
@@ -24,7 +19,10 @@ export default defineComponent({
|
|
|
24
19
|
const router = useRouter()
|
|
25
20
|
const route = useRoute()
|
|
26
21
|
|
|
27
|
-
const goTo = (to:
|
|
22
|
+
const goTo = (to: { id: unknown; value: boolean; path: unknown[] }) => {
|
|
23
|
+
if (to.id)
|
|
24
|
+
router.push(to.id)
|
|
25
|
+
}
|
|
28
26
|
const isActive = (path: string) => route.fullPath.startsWith(path)
|
|
29
27
|
|
|
30
28
|
return {goTo, isActive}
|