@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
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/>
|
|
2
|
+
<AwaitLoading :skeleton="{ height: '1.5rem' }">
|
|
3
|
+
<Button
|
|
4
|
+
:icon
|
|
5
|
+
:label="data"
|
|
6
|
+
:to
|
|
7
|
+
as="router-link"
|
|
8
|
+
link
|
|
9
|
+
class="m-0 p-0"
|
|
10
|
+
/>
|
|
11
|
+
</AwaitLoading>
|
|
13
12
|
</template>
|
|
14
13
|
|
|
15
14
|
<script setup>
|
|
16
|
-
import { computed } from "vue";
|
|
17
|
-
import { Button
|
|
18
|
-
import { useContext,
|
|
15
|
+
import { computed, onMounted, ref } from "vue";
|
|
16
|
+
import { Button } from "primevue";
|
|
17
|
+
import { useContext, useDataFetcher, usePathBuilder } from "#imports";
|
|
18
|
+
import { AwaitLoading } from "#components";
|
|
19
19
|
const context = useContext();
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const dataFetcher = useDataFetcher();
|
|
21
|
+
const pathBuilder = usePathBuilder();
|
|
22
22
|
const { schema, data } = defineProps({
|
|
23
23
|
schema: { type: null, required: true },
|
|
24
24
|
data: { type: null, required: true }
|
|
25
25
|
});
|
|
26
|
-
const { path,
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
26
|
+
const { icon, path, query: queryData, params: paramsData } = schema;
|
|
27
|
+
const contextData = context.injectContextData();
|
|
28
|
+
const query = ref(queryData ? dataFetcher.get({ data: queryData, contextData }) : null);
|
|
29
|
+
const shouldLoadQuery = queryData ? dataFetcher.shouldLoad(queryData.type) : false;
|
|
30
|
+
const params = ref(paramsData ? dataFetcher.get({ data: paramsData, contextData }) : null);
|
|
31
|
+
const shouldLoadParams = paramsData ? dataFetcher.shouldLoad(paramsData.type) : false;
|
|
32
|
+
const to = computed(() => ({
|
|
33
|
+
path: params.value ? pathBuilder.build(path, params.value, { forRoute: true }) : path,
|
|
34
|
+
query: query.value
|
|
35
|
+
}));
|
|
36
|
+
onMounted(async () => {
|
|
37
|
+
if (shouldLoadQuery) {
|
|
38
|
+
query.value = await dataFetcher.fetch({ data: queryData, contextData });
|
|
39
|
+
}
|
|
40
|
+
if (shouldLoadParams) {
|
|
41
|
+
params.value = await dataFetcher.fetch({ data: paramsData, contextData });
|
|
42
|
+
}
|
|
43
|
+
});
|
|
30
44
|
</script>
|
|
@@ -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>;
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
data: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
data: {
|
|
10
|
+
type: null;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
v-
|
|
9
|
-
|
|
10
|
-
>{{ display }}</span>
|
|
11
|
-
<span v-else>-</span>
|
|
2
|
+
<AwaitLoading :skeleton="{ height: '1.5rem' }">
|
|
3
|
+
<span
|
|
4
|
+
v-if="data"
|
|
5
|
+
v-tooltip.bottom="tooltip"
|
|
6
|
+
class="max-sm:select-none"
|
|
7
|
+
>{{ display }}</span>
|
|
8
|
+
<span v-else>-</span>
|
|
9
|
+
</AwaitLoading>
|
|
12
10
|
</template>
|
|
13
11
|
|
|
14
12
|
<script setup>
|
|
15
13
|
import { computed } from "vue";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
const context = useContext();
|
|
14
|
+
import { useFormat } from "#imports";
|
|
15
|
+
import { AwaitLoading } from "#components";
|
|
19
16
|
const { asNumber } = useFormat();
|
|
20
17
|
const { data } = defineProps({
|
|
21
|
-
schema: { type: null, required: true },
|
|
22
18
|
data: { type: null, required: true }
|
|
23
19
|
});
|
|
24
|
-
const loading = context.injectLoading();
|
|
25
20
|
const display = computed(() => asNumber(data));
|
|
26
21
|
const tooltip = computed(() => display.value.shortened ? `${asNumber(data, { shorten: false })}` : null);
|
|
27
22
|
</script>
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
data: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
data: {
|
|
10
|
+
type: null;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -9,16 +9,19 @@
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { reactive } from "vue";
|
|
11
11
|
import { useRoute, useRuntimeConfig } from "#app";
|
|
12
|
-
import { useContext, useFormat, useHead, usePages } from "#imports";
|
|
12
|
+
import { useContext, useEvents, useFormat, useHead, usePages } from "#imports";
|
|
13
13
|
import { Bake } from "#components";
|
|
14
14
|
const context = useContext();
|
|
15
|
+
const events = useEvents();
|
|
15
16
|
const { asClasses } = useFormat();
|
|
16
17
|
const pages = usePages();
|
|
17
18
|
const route = useRoute();
|
|
18
19
|
const { public: { components } } = useRuntimeConfig();
|
|
19
20
|
useHead({ title: components?.Page?.title });
|
|
20
|
-
context.
|
|
21
|
-
|
|
21
|
+
context.provideEvents(events.create());
|
|
22
|
+
context.providePageContext(reactive({}));
|
|
23
|
+
const name = route.matched[0].name;
|
|
24
|
+
const className = name.replace("[", "").replace("]", "");
|
|
22
25
|
const descriptor = await pages.fetch(name);
|
|
23
|
-
const classes = [asClasses("page"), asClasses(
|
|
26
|
+
const classes = [asClasses("page"), asClasses(className, "b-route--")];
|
|
24
27
|
</script>
|
|
@@ -4,19 +4,25 @@ 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 = {
|
|
19
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
20
|
+
} & {
|
|
13
21
|
actions?: ((props: {}) => any) | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
14
24
|
} & {
|
|
15
25
|
actions?: ((props: {}) => any) | undefined;
|
|
16
26
|
} & {
|
|
17
27
|
extra?: ((props: {}) => any) | undefined;
|
|
18
28
|
};
|
|
19
|
-
declare const __VLS_props: {
|
|
20
|
-
readonly schema: any;
|
|
21
|
-
readonly data: any;
|
|
22
|
-
};
|
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
"
|
|
58
58
|
>
|
|
59
59
|
<template v-if="isMd">
|
|
60
|
+
<slot
|
|
61
|
+
v-if="$slots.inputs"
|
|
62
|
+
name="inputs"
|
|
63
|
+
/>
|
|
60
64
|
<Bake
|
|
61
65
|
v-for="action in actions"
|
|
62
66
|
:key="action.schema.name"
|
|
@@ -70,15 +74,15 @@
|
|
|
70
74
|
</template>
|
|
71
75
|
<template v-else>
|
|
72
76
|
<Button
|
|
73
|
-
v-if="
|
|
77
|
+
v-if="$slots.inputs"
|
|
74
78
|
variant="text"
|
|
75
79
|
icon="pi pi-filter"
|
|
76
80
|
class="lg:hidden"
|
|
77
81
|
rounded
|
|
78
|
-
@click="
|
|
82
|
+
@click="togglePopoverInputs"
|
|
79
83
|
/>
|
|
80
84
|
<PersistentPopover
|
|
81
|
-
ref="
|
|
85
|
+
ref="popoverInputs"
|
|
82
86
|
fixed
|
|
83
87
|
>
|
|
84
88
|
<div
|
|
@@ -86,6 +90,30 @@
|
|
|
86
90
|
flex flex-col flex-start
|
|
87
91
|
justify-between w-full
|
|
88
92
|
gap-4 text-sm px-2 py-2"
|
|
93
|
+
>
|
|
94
|
+
<slot
|
|
95
|
+
v-if="$slots.inputs"
|
|
96
|
+
name="inputs"
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
</PersistentPopover>
|
|
100
|
+
<Button
|
|
101
|
+
v-if="$slots.actions || actions?.length > 0"
|
|
102
|
+
variant="text"
|
|
103
|
+
icon="pi pi-ellipsis-h"
|
|
104
|
+
class="lg:hidden"
|
|
105
|
+
rounded
|
|
106
|
+
@click="togglePopoverActions"
|
|
107
|
+
/>
|
|
108
|
+
<PersistentPopover
|
|
109
|
+
ref="popoverActions"
|
|
110
|
+
fixed
|
|
111
|
+
>
|
|
112
|
+
<div
|
|
113
|
+
class="
|
|
114
|
+
flex flex-col flex-start
|
|
115
|
+
justify-between w-full min-w-52
|
|
116
|
+
gap-4 text-sm px-2 py-2"
|
|
89
117
|
>
|
|
90
118
|
<Bake
|
|
91
119
|
v-for="action in actions"
|
|
@@ -116,11 +144,11 @@ const { isMd } = useBreakpoints();
|
|
|
116
144
|
const { localize: l } = useLocalization();
|
|
117
145
|
const { public: { components } } = useRuntimeConfig();
|
|
118
146
|
const { schema } = defineProps({
|
|
119
|
-
schema: { type: null, required: true }
|
|
120
|
-
data: { type: null, default: null }
|
|
147
|
+
schema: { type: null, required: true }
|
|
121
148
|
});
|
|
122
149
|
const { title, description, actions } = schema;
|
|
123
|
-
const
|
|
150
|
+
const popoverInputs = ref();
|
|
151
|
+
const popoverActions = ref();
|
|
124
152
|
useHead({
|
|
125
153
|
title: components?.Page?.title ? `${components.Page.title} - ${title}` : title
|
|
126
154
|
});
|
|
@@ -161,8 +189,11 @@ function toggleClasses(element, toggle, classes) {
|
|
|
161
189
|
element.classList.toggle(cls, toggle);
|
|
162
190
|
}
|
|
163
191
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
192
|
+
function togglePopoverInputs(event) {
|
|
193
|
+
popoverInputs.value.toggle(event);
|
|
194
|
+
}
|
|
195
|
+
function togglePopoverActions(event) {
|
|
196
|
+
popoverActions.value.toggle(event);
|
|
166
197
|
}
|
|
167
198
|
</script>
|
|
168
199
|
|
|
@@ -4,19 +4,25 @@ 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 = {
|
|
19
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
20
|
+
} & {
|
|
13
21
|
actions?: ((props: {}) => any) | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
inputs?: ((props: {}) => any) | undefined;
|
|
14
24
|
} & {
|
|
15
25
|
actions?: ((props: {}) => any) | undefined;
|
|
16
26
|
} & {
|
|
17
27
|
extra?: ((props: {}) => any) | undefined;
|
|
18
28
|
};
|
|
19
|
-
declare const __VLS_props: {
|
|
20
|
-
readonly schema: any;
|
|
21
|
-
readonly data: any;
|
|
22
|
-
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
data: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
dataKey: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
data: {
|
|
18
|
+
type: null;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
dataKey: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
type __VLS_Slots = {
|
|
27
|
+
default?: ((props: {}) => any) | undefined;
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { useContext } from "#imports";
|
|
7
|
+
const context = useContext();
|
|
8
|
+
const { data, dataKey } = defineProps({
|
|
9
|
+
data: { type: null, required: true },
|
|
10
|
+
dataKey: { type: String, required: true }
|
|
11
|
+
});
|
|
12
|
+
const parentContext = context.injectParentContext();
|
|
13
|
+
context.provideParentContext({ ...parentContext, [dataKey]: data });
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
data: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
dataKey: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
data: {
|
|
18
|
+
type: null;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
dataKey: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
type __VLS_Slots = {
|
|
27
|
+
default?: ((props: {}) => any) | undefined;
|
|
28
|
+
};
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
data: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
data: {
|
|
10
|
+
type: null;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-if="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<span v-else-if="data">{{ display }}</span>
|
|
7
|
-
<span v-else>-</span>
|
|
2
|
+
<AwaitLoading :skeleton="{ height: '1.5rem' }">
|
|
3
|
+
<span v-if="data">{{ display }}</span>
|
|
4
|
+
<span v-else>-</span>
|
|
5
|
+
</AwaitLoading>
|
|
8
6
|
</template>
|
|
9
7
|
|
|
10
8
|
<script setup>
|
|
11
9
|
import { computed } from "vue";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
const context = useContext();
|
|
10
|
+
import { useFormat } from "#imports";
|
|
11
|
+
import { AwaitLoading } from "#components";
|
|
15
12
|
const { asPercentage } = useFormat();
|
|
16
13
|
const { data } = defineProps({
|
|
17
|
-
schema: { type: null, required: true },
|
|
18
14
|
data: { type: null, required: true }
|
|
19
15
|
});
|
|
20
|
-
const loading = context.injectLoading();
|
|
21
16
|
const display = computed(() => asPercentage(data));
|
|
22
17
|
</script>
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
data: {
|
|
5
|
+
type: null;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
data: {
|
|
10
|
+
type: null;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,11 +1,33 @@
|
|
|
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
|
+
modelValue: {
|
|
13
|
+
type: import("vue").PropType<any>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: any) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
schema: {
|
|
20
|
+
type: null;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
data: {
|
|
24
|
+
type: null;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: import("vue").PropType<any>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|