@mouseless/baked 1.0.2 → 1.1.0
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.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +34 -23
- package/dist/runtime/components/AwaitLoading.d.ts +14 -0
- package/dist/runtime/components/AwaitLoading.js +27 -0
- package/dist/runtime/components/Bake.d.vue.ts +25 -11
- package/dist/runtime/components/Bake.vue +87 -16
- package/dist/runtime/components/Bake.vue.d.ts +25 -11
- package/dist/runtime/components/Button.d.vue.ts +27 -0
- package/dist/runtime/components/Button.vue +26 -0
- package/dist/runtime/components/Button.vue.d.ts +27 -0
- package/dist/runtime/components/CardLink.d.vue.ts +11 -9
- package/dist/runtime/components/CardLink.vue +1 -2
- package/dist/runtime/components/CardLink.vue.d.ts +11 -9
- package/dist/runtime/components/Composite.d.vue.ts +13 -0
- package/dist/runtime/components/Composite.vue +17 -0
- package/dist/runtime/components/Composite.vue.d.ts +13 -0
- package/dist/runtime/components/Conditional.d.vue.ts +23 -0
- package/dist/runtime/components/Conditional.vue +31 -0
- package/dist/runtime/components/Conditional.vue.d.ts +23 -0
- package/dist/runtime/components/Contents.d.vue.ts +40 -0
- package/dist/runtime/components/Contents.vue +25 -0
- package/dist/runtime/components/Contents.vue.d.ts +40 -0
- package/dist/runtime/components/DataPanel.d.vue.ts +13 -11
- package/dist/runtime/components/DataPanel.vue +35 -36
- package/dist/runtime/components/DataPanel.vue.d.ts +13 -11
- package/dist/runtime/components/DataTable.d.vue.ts +19 -9
- package/dist/runtime/components/DataTable.vue +69 -55
- package/dist/runtime/components/DataTable.vue.d.ts +19 -9
- package/dist/runtime/components/DefaultLayout.d.vue.ts +11 -9
- package/dist/runtime/components/DefaultLayout.vue +1 -2
- package/dist/runtime/components/DefaultLayout.vue.d.ts +11 -9
- package/dist/runtime/components/DeferredTabContent.d.vue.ts +26 -8
- package/dist/runtime/components/DeferredTabContent.vue +4 -3
- package/dist/runtime/components/DeferredTabContent.vue.d.ts +26 -8
- package/dist/runtime/components/Dialog.d.vue.ts +17 -0
- package/dist/runtime/components/Dialog.vue +57 -0
- package/dist/runtime/components/Dialog.vue.d.ts +17 -0
- package/dist/runtime/components/Error.vue +6 -0
- package/dist/runtime/components/ErrorPage.d.vue.ts +20 -8
- package/dist/runtime/components/ErrorPage.vue.d.ts +20 -8
- package/dist/runtime/components/Fieldset.d.vue.ts +21 -0
- package/dist/runtime/components/Fieldset.vue +38 -0
- package/dist/runtime/components/Fieldset.vue.d.ts +21 -0
- package/dist/runtime/components/Filter.d.vue.ts +23 -9
- package/dist/runtime/components/Filter.vue +5 -7
- package/dist/runtime/components/Filter.vue.d.ts +23 -9
- package/dist/runtime/components/FormPage.d.vue.ts +17 -0
- package/dist/runtime/components/FormPage.vue +48 -0
- package/dist/runtime/components/FormPage.vue.d.ts +17 -0
- package/dist/runtime/components/Header.d.vue.ts +19 -9
- package/dist/runtime/components/Header.vue +27 -29
- package/dist/runtime/components/Header.vue.d.ts +19 -9
- package/dist/runtime/components/Icon.d.vue.ts +11 -9
- package/dist/runtime/components/Icon.vue +1 -2
- package/dist/runtime/components/Icon.vue.d.ts +11 -9
- package/dist/runtime/components/Input.d.vue.ts +25 -0
- package/dist/runtime/components/Input.vue +78 -0
- package/dist/runtime/components/Input.vue.d.ts +25 -0
- package/dist/runtime/components/InputNumber.d.vue.ts +25 -0
- package/dist/runtime/components/InputNumber.vue +35 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +25 -0
- package/dist/runtime/components/InputText.d.vue.ts +25 -0
- package/dist/runtime/components/InputText.vue +31 -0
- package/dist/runtime/components/InputText.vue.d.ts +25 -0
- package/dist/runtime/components/Inputs.d.vue.ts +29 -0
- package/dist/runtime/components/Inputs.vue +50 -0
- package/dist/runtime/components/Inputs.vue.d.ts +29 -0
- package/dist/runtime/components/LanguageSwitcher.d.vue.ts +1 -9
- package/dist/runtime/components/LanguageSwitcher.vue +0 -4
- package/dist/runtime/components/LanguageSwitcher.vue.d.ts +1 -9
- package/dist/runtime/components/Layout.vue +9 -5
- package/dist/runtime/components/Logo.d.vue.ts +11 -7
- package/dist/runtime/components/Logo.vue.d.ts +11 -7
- package/dist/runtime/components/MenuPage.d.vue.ts +11 -9
- package/dist/runtime/components/MenuPage.vue +28 -29
- package/dist/runtime/components/MenuPage.vue.d.ts +11 -9
- package/dist/runtime/components/Message.d.vue.ts +19 -9
- package/dist/runtime/components/Message.vue +10 -14
- package/dist/runtime/components/Message.vue.d.ts +19 -9
- package/dist/runtime/components/MissingComponent.d.vue.ts +21 -0
- package/dist/runtime/components/MissingComponent.vue +174 -0
- package/dist/runtime/components/MissingComponent.vue.d.ts +21 -0
- package/dist/runtime/components/ModalLayout.d.vue.ts +10 -15
- package/dist/runtime/components/ModalLayout.vue +0 -7
- package/dist/runtime/components/ModalLayout.vue.d.ts +10 -15
- package/dist/runtime/components/Money.d.vue.ts +11 -9
- package/dist/runtime/components/Money.vue +10 -15
- package/dist/runtime/components/Money.vue.d.ts +11 -9
- package/dist/runtime/components/NavLink.d.vue.ts +19 -9
- package/dist/runtime/components/NavLink.vue +34 -20
- package/dist/runtime/components/NavLink.vue.d.ts +19 -9
- package/dist/runtime/components/Number.d.vue.ts +11 -9
- package/dist/runtime/components/Number.vue +10 -15
- package/dist/runtime/components/Number.vue.d.ts +11 -9
- package/dist/runtime/components/Page.vue +7 -4
- package/dist/runtime/components/PageTitle.d.vue.ts +15 -9
- package/dist/runtime/components/PageTitle.vue +39 -8
- package/dist/runtime/components/PageTitle.vue.d.ts +15 -9
- package/dist/runtime/components/PersistentPopover.vue +1 -1
- package/dist/runtime/components/ProvideParentContext.d.vue.ts +28 -0
- package/dist/runtime/components/ProvideParentContext.vue +14 -0
- package/dist/runtime/components/ProvideParentContext.vue.d.ts +28 -0
- package/dist/runtime/components/Rate.d.vue.ts +11 -9
- package/dist/runtime/components/Rate.vue +6 -11
- package/dist/runtime/components/Rate.vue.d.ts +11 -9
- package/dist/runtime/components/Select.d.vue.ts +31 -9
- package/dist/runtime/components/Select.vue +30 -49
- package/dist/runtime/components/Select.vue.d.ts +31 -9
- package/dist/runtime/components/SelectButton.d.vue.ts +31 -9
- package/dist/runtime/components/SelectButton.vue +21 -36
- package/dist/runtime/components/SelectButton.vue.d.ts +31 -9
- package/dist/runtime/components/SideMenu.d.vue.ts +19 -9
- package/dist/runtime/components/SideMenu.vue.d.ts +19 -9
- package/dist/runtime/components/SideMenuItem.d.vue.ts +19 -9
- package/dist/runtime/components/SideMenuItem.vue.d.ts +19 -9
- package/dist/runtime/components/SimpleForm.d.vue.ts +17 -0
- package/dist/runtime/components/SimpleForm.vue +108 -0
- package/dist/runtime/components/SimpleForm.vue.d.ts +17 -0
- package/dist/runtime/components/SimplePage.d.vue.ts +13 -0
- package/dist/runtime/components/SimplePage.vue +19 -0
- package/dist/runtime/components/SimplePage.vue.d.ts +13 -0
- package/dist/runtime/components/TabbedPage.d.vue.ts +13 -0
- package/dist/runtime/components/{ReportPage.vue → TabbedPage.vue} +47 -65
- package/dist/runtime/components/TabbedPage.vue.d.ts +13 -0
- package/dist/runtime/components/Text.d.vue.ts +19 -9
- package/dist/runtime/components/Text.vue +9 -13
- package/dist/runtime/components/Text.vue.d.ts +19 -9
- package/dist/runtime/composables/useActionExecuter.d.ts +7 -0
- package/dist/runtime/composables/useActionExecuter.js +108 -0
- package/dist/runtime/composables/useConstraintEvaluator.d.ts +7 -0
- package/dist/runtime/composables/useConstraintEvaluator.js +58 -0
- package/dist/runtime/composables/useContext.d.ts +13 -8
- package/dist/runtime/composables/useContext.js +42 -18
- package/dist/runtime/composables/useDataFetcher.d.ts +6 -6
- package/dist/runtime/composables/useDataFetcher.js +66 -40
- package/dist/runtime/composables/useEvents.d.ts +7 -0
- package/dist/runtime/composables/useEvents.js +33 -0
- package/dist/runtime/composables/useFormat.d.ts +0 -1
- package/dist/runtime/composables/useFormat.js +0 -13
- package/dist/runtime/composables/useLoginRedirect.d.ts +1 -1
- package/dist/runtime/composables/useLoginRedirect.js +2 -2
- package/dist/runtime/composables/useNuxtError.d.ts +1 -1
- package/dist/runtime/composables/useNuxtError.js +2 -2
- package/dist/runtime/composables/useNuxtRoute.d.ts +1 -1
- package/dist/runtime/composables/useNuxtRoute.js +3 -3
- package/dist/runtime/composables/usePathBuilder.d.ts +3 -0
- package/dist/runtime/composables/usePathBuilder.js +18 -0
- package/dist/runtime/composables/useReactionHandler.d.ts +6 -0
- package/dist/runtime/composables/useReactionHandler.js +104 -0
- package/dist/runtime/composables/useRedirect.d.ts +3 -0
- package/dist/runtime/composables/useRedirect.js +17 -0
- package/dist/runtime/composables/useToken.js +2 -2
- package/dist/runtime/plugins/auth.js +16 -3
- package/dist/runtime/plugins/baked.js +23 -0
- package/dist/runtime/plugins/fetch.js +2 -2
- package/package.json +18 -18
- package/dist/runtime/components/None.d.vue.ts +0 -11
- package/dist/runtime/components/None.vue +0 -25
- package/dist/runtime/components/None.vue.d.ts +0 -11
- package/dist/runtime/components/Parameters.d.vue.ts +0 -11
- package/dist/runtime/components/Parameters.vue +0 -61
- package/dist/runtime/components/Parameters.vue.d.ts +0 -11
- package/dist/runtime/components/QueryParameters.d.vue.ts +0 -11
- package/dist/runtime/components/QueryParameters.vue +0 -109
- package/dist/runtime/components/QueryParameters.vue.d.ts +0 -11
- package/dist/runtime/components/ReportPage.d.vue.ts +0 -11
- package/dist/runtime/components/ReportPage.vue.d.ts +0 -11
- package/dist/runtime/composables/useConditional.d.ts +0 -3
- package/dist/runtime/composables/useConditional.js +0 -15
- package/dist/runtime/composables/useQuery.d.ts +0 -3
- package/dist/runtime/composables/useQuery.js +0 -13
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
schema: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
data: {
|
|
9
|
+
type: null;
|
|
10
|
+
default: null;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
data: {
|
|
18
|
+
type: null;
|
|
19
|
+
default: null;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {
|
|
22
|
+
data: any;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
contents: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
namePrefix: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
fullScreen: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
contents: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
namePrefix: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: null;
|
|
28
|
+
};
|
|
29
|
+
fullScreen: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {
|
|
34
|
+
contents: unknown[];
|
|
35
|
+
namePrefix: string;
|
|
36
|
+
fullScreen: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
type __VLS_Slots = {
|
|
39
|
+
default?: ((props: {}) => any) | undefined;
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="b-Contents w-full grid grid-cols-1 gap-4 lg:grid-cols-2"
|
|
4
|
+
:class="{ 'max-w-screen-xl 3xl:max-w-screen-2xl': !fullScreen }"
|
|
5
|
+
>
|
|
6
|
+
<slot v-if="$slots.default" />
|
|
7
|
+
<Bake
|
|
8
|
+
v-for="content in contents"
|
|
9
|
+
:key="`content-${content.key}`"
|
|
10
|
+
:name="`${mergedNamePrefix}/${content.key}`"
|
|
11
|
+
:descriptor="content.component"
|
|
12
|
+
:class="{ 'lg:col-span-2': !content.narrow }"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import { Bake } from "#components";
|
|
19
|
+
const { namePrefix } = defineProps({
|
|
20
|
+
contents: { type: Array, default: () => [] },
|
|
21
|
+
namePrefix: { type: String, default: null },
|
|
22
|
+
fullScreen: { type: Boolean, default: false }
|
|
23
|
+
});
|
|
24
|
+
const mergedNamePrefix = namePrefix ? `${namePrefix}/contents` : "contents";
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
contents: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
namePrefix: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
fullScreen: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
contents: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
namePrefix: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: null;
|
|
28
|
+
};
|
|
29
|
+
fullScreen: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {
|
|
34
|
+
contents: unknown[];
|
|
35
|
+
namePrefix: string;
|
|
36
|
+
fullScreen: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
type __VLS_Slots = {
|
|
39
|
+
default?: ((props: {}) => any) | undefined;
|
|
40
|
+
};
|
|
@@ -4,17 +4,19 @@ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
|
4
4
|
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
5
|
$slots: S;
|
|
6
6
|
});
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
schema: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
18
|
type __VLS_Slots = {
|
|
13
|
-
|
|
19
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
14
20
|
} & {
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_props: {
|
|
18
|
-
readonly schema: any;
|
|
19
|
-
readonly data: any;
|
|
21
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
20
22
|
};
|
|
@@ -13,25 +13,26 @@
|
|
|
13
13
|
@update:collapsed="onCollapsed"
|
|
14
14
|
>
|
|
15
15
|
<template
|
|
16
|
-
v-if="$slots.
|
|
16
|
+
v-if="$slots.inputs || inputs.length > 0"
|
|
17
17
|
#icons
|
|
18
18
|
>
|
|
19
19
|
<template v-if="isMd">
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
<div class="flex gap-2 text-xs">
|
|
21
|
+
<Inputs
|
|
22
|
+
v-if="inputs.length > 0"
|
|
23
|
+
:inputs="inputs"
|
|
24
|
+
@ready="onReady"
|
|
25
|
+
@changed="onChanged"
|
|
26
|
+
/>
|
|
27
|
+
<slot
|
|
28
|
+
v-if="$slots.inputs"
|
|
29
|
+
name="inputs"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
31
32
|
</template>
|
|
32
33
|
<template v-else>
|
|
33
34
|
<Button
|
|
34
|
-
v-if="
|
|
35
|
+
v-if="inputs.length > 0 || $slots.inputs"
|
|
35
36
|
variant="text"
|
|
36
37
|
icon="pi pi-sliders-h"
|
|
37
38
|
class="lg:hidden"
|
|
@@ -41,21 +42,20 @@
|
|
|
41
42
|
<PersistentPopover ref="popover">
|
|
42
43
|
<div
|
|
43
44
|
class="
|
|
44
|
-
flex flex-
|
|
45
|
-
|
|
46
|
-
gap-4 text-xs px-2 py-2
|
|
45
|
+
flex flex-col gap-2 min-w-24
|
|
46
|
+
w-full px-2 py-2 text-xs
|
|
47
47
|
"
|
|
48
48
|
>
|
|
49
|
-
<
|
|
50
|
-
v-if="
|
|
51
|
-
:
|
|
52
|
-
class="
|
|
49
|
+
<Inputs
|
|
50
|
+
v-if="inputs.length > 0"
|
|
51
|
+
:inputs="inputs"
|
|
52
|
+
input-class="max-md:w-full"
|
|
53
53
|
@ready="onReady"
|
|
54
54
|
@changed="onChanged"
|
|
55
55
|
/>
|
|
56
56
|
<slot
|
|
57
|
-
v-if="$slots.
|
|
58
|
-
name="
|
|
57
|
+
v-if="$slots.inputs"
|
|
58
|
+
name="inputs"
|
|
59
59
|
/>
|
|
60
60
|
</div>
|
|
61
61
|
</PersistentPopover>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<script setup>
|
|
83
83
|
import { computed, onMounted, ref, useTemplateRef } from "vue";
|
|
84
84
|
import { Message, Panel, Button } from "primevue";
|
|
85
|
-
import { Bake,
|
|
85
|
+
import { Bake, Inputs, PersistentPopover } from "#components";
|
|
86
86
|
import { useBreakpoints, useContext, useDataFetcher, useUiStates, useLocalization } from "#imports";
|
|
87
87
|
const { value: { panelStates } } = useUiStates();
|
|
88
88
|
const { isMd } = useBreakpoints();
|
|
@@ -91,32 +91,31 @@ const dataFetcher = useDataFetcher();
|
|
|
91
91
|
const { localize: l } = useLocalization();
|
|
92
92
|
const { localize: lc } = useLocalization({ group: "DataPanel" });
|
|
93
93
|
const panel = useTemplateRef("panel");
|
|
94
|
-
const popover = ref();
|
|
95
|
-
function togglePopover(event) {
|
|
96
|
-
popover.value.toggle(event);
|
|
97
|
-
}
|
|
98
94
|
const { schema } = defineProps({
|
|
99
|
-
schema: { type: null, required: true }
|
|
100
|
-
data: { type: null, default: null }
|
|
95
|
+
schema: { type: null, required: true }
|
|
101
96
|
});
|
|
102
|
-
const { collapsed, content,
|
|
103
|
-
const
|
|
97
|
+
const { collapsed, content, inputs, localizeTitle, title: titleData } = schema;
|
|
98
|
+
const contextData = context.injectContextData();
|
|
104
99
|
const path = context.injectPath();
|
|
105
100
|
const collapsedState = computed(() => panelStates[path] ?? collapsed);
|
|
106
101
|
const loaded = ref(!collapsedState.value);
|
|
107
|
-
const ready = ref(
|
|
102
|
+
const ready = ref(inputs.length === 0);
|
|
108
103
|
const uniqueKey = ref("");
|
|
104
|
+
const popover = ref();
|
|
109
105
|
const values = ref({});
|
|
110
|
-
if (
|
|
111
|
-
|
|
106
|
+
if (inputs.length > 0) {
|
|
107
|
+
contextData.parent["parameters"] = values;
|
|
112
108
|
}
|
|
113
|
-
const title = ref(dataFetcher.get({ data: titleData,
|
|
109
|
+
const title = ref(dataFetcher.get({ data: titleData, contextData }));
|
|
114
110
|
const shouldLoadTitle = dataFetcher.shouldLoad(titleData.type);
|
|
115
111
|
onMounted(async () => {
|
|
116
112
|
if (shouldLoadTitle) {
|
|
117
|
-
title.value = await dataFetcher.fetch({ data: titleData,
|
|
113
|
+
title.value = await dataFetcher.fetch({ data: titleData, contextData });
|
|
118
114
|
}
|
|
119
115
|
});
|
|
116
|
+
function togglePopover(event) {
|
|
117
|
+
popover.value.toggle(event);
|
|
118
|
+
}
|
|
120
119
|
function onCollapsed(collapsed2) {
|
|
121
120
|
panelStates[path] = collapsed2;
|
|
122
121
|
if (!collapsed2 && !loaded.value) {
|
|
@@ -4,17 +4,19 @@ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
|
4
4
|
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
5
|
$slots: S;
|
|
6
6
|
});
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
schema: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
18
|
type __VLS_Slots = {
|
|
13
|
-
|
|
19
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
14
20
|
} & {
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_props: {
|
|
18
|
-
readonly schema: any;
|
|
19
|
-
readonly data: any;
|
|
21
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
20
22
|
};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
schema: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
data: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
data: {
|
|
18
|
+
type: null;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
<Column
|
|
26
26
|
v-for="column in columns"
|
|
27
|
-
:key="column.
|
|
27
|
+
:key="column.key"
|
|
28
28
|
:header="l(column.title)"
|
|
29
|
-
:field="column.
|
|
29
|
+
:field="column.key"
|
|
30
30
|
class="text-nowrap"
|
|
31
31
|
:class="{ 'min-w-40': column.minWidth, 'text-right': column.alignRight }"
|
|
32
32
|
:exportable="column.exportable"
|
|
@@ -39,50 +39,70 @@
|
|
|
39
39
|
:frozen="column.frozen"
|
|
40
40
|
>
|
|
41
41
|
<template #body="{ data: row, index }">
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}"
|
|
56
|
-
/>
|
|
57
|
-
<span v-else>-</span>
|
|
42
|
+
<AwaitLoading :skeleton="{ class:'min-h-5' }">
|
|
43
|
+
<ProvideParentContext
|
|
44
|
+
v-if="data"
|
|
45
|
+
:data="row.$getRow()"
|
|
46
|
+
data-key="row"
|
|
47
|
+
>
|
|
48
|
+
<Bake
|
|
49
|
+
:name="`rows/${index}/${column.key}`"
|
|
50
|
+
:descriptor="column.component"
|
|
51
|
+
/>
|
|
52
|
+
</ProvideParentContext>
|
|
53
|
+
<span v-else>-</span>
|
|
54
|
+
</AwaitLoading>
|
|
58
55
|
</template>
|
|
59
56
|
</Column>
|
|
60
57
|
<Column
|
|
61
|
-
v-if="exportOptions"
|
|
58
|
+
v-if="exportOptions || actions"
|
|
62
59
|
:pt="{
|
|
63
60
|
bodyCell: { class: 'max-xs:!inset-auto' },
|
|
64
|
-
headerCell: { class: 'max-xs:!inset-auto' }
|
|
61
|
+
headerCell: { class: 'max-xs:!inset-auto' },
|
|
62
|
+
columnHeaderContent: 'justify-end'
|
|
65
63
|
}"
|
|
66
64
|
:exportable="false"
|
|
67
65
|
class="w-0 py-0"
|
|
68
66
|
frozen
|
|
69
67
|
align-frozen="right"
|
|
70
68
|
>
|
|
71
|
-
<template
|
|
69
|
+
<template
|
|
70
|
+
v-if="exportOptions"
|
|
71
|
+
#header
|
|
72
|
+
>
|
|
72
73
|
<Button
|
|
73
74
|
type="button"
|
|
74
75
|
icon="pi pi-ellipsis-v"
|
|
75
76
|
severity="secondary"
|
|
76
77
|
variant="text"
|
|
77
78
|
size="small"
|
|
78
|
-
@click="
|
|
79
|
+
@click="toggleHeaderActionsMenu"
|
|
79
80
|
/>
|
|
80
81
|
<Menu
|
|
81
|
-
ref="
|
|
82
|
-
:model="
|
|
82
|
+
ref="headerActionsMenu"
|
|
83
|
+
:model="headerActions"
|
|
83
84
|
:popup="true"
|
|
84
85
|
/>
|
|
85
86
|
</template>
|
|
87
|
+
<template
|
|
88
|
+
v-if="actions"
|
|
89
|
+
#body="{ data: row, index }"
|
|
90
|
+
>
|
|
91
|
+
<AwaitLoading :skeleton="{ class:'min-h-5' }">
|
|
92
|
+
<ProvideParentContext
|
|
93
|
+
v-if="data"
|
|
94
|
+
:data="row.$getRow()"
|
|
95
|
+
data-key="row"
|
|
96
|
+
>
|
|
97
|
+
<div class="flex">
|
|
98
|
+
<Bake
|
|
99
|
+
:name="`rows/${index}/actions`"
|
|
100
|
+
:descriptor="actions.component"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</ProvideParentContext>
|
|
104
|
+
</AwaitLoading>
|
|
105
|
+
</template>
|
|
86
106
|
</Column>
|
|
87
107
|
<ColumnGroup
|
|
88
108
|
v-if="footerTemplate"
|
|
@@ -96,30 +116,22 @@
|
|
|
96
116
|
/>
|
|
97
117
|
<Column
|
|
98
118
|
v-for="column in footerTemplate.columns"
|
|
99
|
-
:key="column.
|
|
119
|
+
:key="column.key"
|
|
100
120
|
:class="{ 'text-right': column.alignRight }"
|
|
101
121
|
>
|
|
102
122
|
<template #footer>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
...conditional.find(column.component, data),
|
|
112
|
-
data: {
|
|
113
|
-
type: 'Inline',
|
|
114
|
-
value: data[column.prop]
|
|
115
|
-
}
|
|
116
|
-
}"
|
|
117
|
-
/>
|
|
118
|
-
<span v-else>-</span>
|
|
123
|
+
<AwaitLoading :skeleton="{ class:'min-h-5' }">
|
|
124
|
+
<Bake
|
|
125
|
+
v-if="data"
|
|
126
|
+
:name="`rows/footer/${column.key}`"
|
|
127
|
+
:descriptor="column.component"
|
|
128
|
+
/>
|
|
129
|
+
<span v-else>-</span>
|
|
130
|
+
</AwaitLoading>
|
|
119
131
|
</template>
|
|
120
132
|
</Column>
|
|
121
133
|
<Column
|
|
122
|
-
v-if="exportOptions"
|
|
134
|
+
v-if="exportOptions || actions"
|
|
123
135
|
:exportable="false"
|
|
124
136
|
class="w-0"
|
|
125
137
|
frozen
|
|
@@ -133,11 +145,10 @@
|
|
|
133
145
|
<script setup>
|
|
134
146
|
import { computed, onMounted, ref } from "vue";
|
|
135
147
|
import Column from "primevue/column";
|
|
136
|
-
import { Button, ColumnGroup, DataTable, Menu, Row
|
|
148
|
+
import { Button, ColumnGroup, DataTable, Menu, Row } from "primevue";
|
|
137
149
|
import { useRuntimeConfig } from "#app";
|
|
138
|
-
import { Bake } from "#components";
|
|
139
|
-
import { useComposableResolver,
|
|
140
|
-
const conditional = useConditional();
|
|
150
|
+
import { AwaitLoading, Bake, ProvideParentContext } from "#components";
|
|
151
|
+
import { useComposableResolver, useContext, useDataFetcher, useLocalization } from "#imports";
|
|
141
152
|
const context = useContext();
|
|
142
153
|
const composableResolver = useComposableResolver();
|
|
143
154
|
const dataFetcher = useDataFetcher();
|
|
@@ -148,13 +159,12 @@ const { schema, data } = defineProps({
|
|
|
148
159
|
schema: { type: null, required: true },
|
|
149
160
|
data: { type: null, required: true }
|
|
150
161
|
});
|
|
151
|
-
const { columns, dataKey, exportOptions, footerTemplate, itemsProp, paginator, rows, rowsWhenLoading, scrollHeight, virtualScrollerOptions } = schema;
|
|
162
|
+
const { actions, columns, dataKey, exportOptions, footerTemplate, itemsProp, paginator, rows, rowsWhenLoading, scrollHeight, virtualScrollerOptions } = schema;
|
|
163
|
+
const contextData = context.injectContextData();
|
|
152
164
|
const dataDescriptor = context.injectDataDescriptor();
|
|
153
|
-
const injectedData = context.injectData();
|
|
154
|
-
const loading = context.injectLoading();
|
|
155
165
|
const dataTable = ref();
|
|
156
|
-
const
|
|
157
|
-
const
|
|
166
|
+
const headerActionsMenu = ref();
|
|
167
|
+
const headerActions = ref([]);
|
|
158
168
|
const value = computed(() => {
|
|
159
169
|
const items = data ? itemsProp ? data[itemsProp] : data : new Array(rowsWhenLoading || 5).fill({});
|
|
160
170
|
const result = [];
|
|
@@ -171,7 +181,7 @@ const footerColSpan = computed(() => columns.length - footerTemplate?.columns.le
|
|
|
171
181
|
const exportFilename = ref(exportOptions?.fileName ? l(exportOptions.fileName) : null);
|
|
172
182
|
let formatter = null;
|
|
173
183
|
if (exportOptions) {
|
|
174
|
-
|
|
184
|
+
headerActions.value.push({
|
|
175
185
|
label: l(exportOptions.buttonLabel),
|
|
176
186
|
icon: exportOptions.buttonIcon,
|
|
177
187
|
command: () => dataTable.value.exportCSV()
|
|
@@ -193,7 +203,7 @@ onMounted(async () => {
|
|
|
193
203
|
parameterFormatter = (await composableResolver.resolve(parameterFormatterName)).default();
|
|
194
204
|
}
|
|
195
205
|
if (appendParameters && dataDescriptor) {
|
|
196
|
-
let parameters = await dataFetcher.fetchParameters({ data: dataDescriptor,
|
|
206
|
+
let parameters = await dataFetcher.fetchParameters({ data: dataDescriptor, contextData });
|
|
197
207
|
if (parameterFormatter) {
|
|
198
208
|
parameters = parameters.map((p, i) => parameterFormatter.format(p, i));
|
|
199
209
|
}
|
|
@@ -201,8 +211,8 @@ onMounted(async () => {
|
|
|
201
211
|
}
|
|
202
212
|
}
|
|
203
213
|
});
|
|
204
|
-
function
|
|
205
|
-
|
|
214
|
+
function toggleHeaderActionsMenu(event) {
|
|
215
|
+
headerActionsMenu.value.toggle(event);
|
|
206
216
|
}
|
|
207
217
|
function exportFunction({ data: data2, field }) {
|
|
208
218
|
if (!formatter) {
|
|
@@ -211,3 +221,7 @@ function exportFunction({ data: data2, field }) {
|
|
|
211
221
|
return formatter.format(data2.value, { prop: field, row: data2.$getRow() });
|
|
212
222
|
}
|
|
213
223
|
</script>
|
|
224
|
+
|
|
225
|
+
<style>
|
|
226
|
+
.b-component--DataTable .p-datatable-table-container{max-width:calc(100vw - 4.25rem)}.b-component--DataTable a{@apply text-sm}.b-component--DataTable .p-button{@apply -my-2}
|
|
227
|
+
</style>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
schema: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
data: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
data: {
|
|
18
|
+
type: null;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -4,15 +4,17 @@ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
|
4
4
|
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
5
|
$slots: S;
|
|
6
6
|
});
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
schema: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
18
|
type __VLS_Slots = {
|
|
13
19
|
default?: ((props: {}) => any) | undefined;
|
|
14
20
|
};
|
|
15
|
-
declare const __VLS_props: {
|
|
16
|
-
readonly schema: any;
|
|
17
|
-
readonly data: any;
|
|
18
|
-
};
|
|
@@ -35,8 +35,7 @@ import { ScrollTop } from "primevue";
|
|
|
35
35
|
import { Bake } from "#components";
|
|
36
36
|
const route = useRoute();
|
|
37
37
|
const { schema } = defineProps({
|
|
38
|
-
schema: { type: null, required: true }
|
|
39
|
-
data: { type: null, default: null }
|
|
38
|
+
schema: { type: null, required: true }
|
|
40
39
|
});
|
|
41
40
|
const { header, sideMenu } = schema;
|
|
42
41
|
const scrollTopOptions = { threshold: 250, ...schema.scrollTopOptions };
|
|
@@ -4,15 +4,17 @@ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
|
4
4
|
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
5
|
$slots: S;
|
|
6
6
|
});
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
schema: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
schema: {
|
|
14
|
+
type: null;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
18
|
type __VLS_Slots = {
|
|
13
19
|
default?: ((props: {}) => any) | undefined;
|
|
14
20
|
};
|
|
15
|
-
declare const __VLS_props: {
|
|
16
|
-
readonly schema: any;
|
|
17
|
-
readonly data: any;
|
|
18
|
-
};
|