@mouseless/baked 0.19.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/README.md +11 -0
- package/dist/module.d.mts +45 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +110 -0
- package/dist/runtime/assets/overrides.css +1 -0
- package/dist/runtime/assets/tailwind.css +1 -0
- package/dist/runtime/components/AuthorizedContent.d.vue.ts +10 -0
- package/dist/runtime/components/AuthorizedContent.vue +14 -0
- package/dist/runtime/components/AuthorizedContent.vue.d.ts +10 -0
- package/dist/runtime/components/Bake.d.vue.ts +20 -0
- package/dist/runtime/components/Bake.vue +50 -0
- package/dist/runtime/components/Bake.vue.d.ts +20 -0
- package/dist/runtime/components/BasePersistentPopover.d.vue.ts +178 -0
- package/dist/runtime/components/BasePersistentPopover.vue +41 -0
- package/dist/runtime/components/BasePersistentPopover.vue.d.ts +178 -0
- package/dist/runtime/components/CardLink.d.vue.ts +11 -0
- package/dist/runtime/components/CardLink.vue +57 -0
- package/dist/runtime/components/CardLink.vue.d.ts +11 -0
- package/dist/runtime/components/DataPanel.d.vue.ts +20 -0
- package/dist/runtime/components/DataPanel.vue +138 -0
- package/dist/runtime/components/DataPanel.vue.d.ts +20 -0
- package/dist/runtime/components/DataTable.d.vue.ts +11 -0
- package/dist/runtime/components/DataTable.vue +213 -0
- package/dist/runtime/components/DataTable.vue.d.ts +11 -0
- package/dist/runtime/components/DefaultLayout.d.vue.ts +18 -0
- package/dist/runtime/components/DefaultLayout.vue +44 -0
- package/dist/runtime/components/DefaultLayout.vue.d.ts +18 -0
- package/dist/runtime/components/DeferredTabContent.d.vue.ts +16 -0
- package/dist/runtime/components/DeferredTabContent.vue +23 -0
- package/dist/runtime/components/DeferredTabContent.vue.d.ts +16 -0
- package/dist/runtime/components/Error.d.vue.ts +3 -0
- package/dist/runtime/components/Error.vue +13 -0
- package/dist/runtime/components/Error.vue.d.ts +3 -0
- package/dist/runtime/components/ErrorPage.d.vue.ts +11 -0
- package/dist/runtime/components/ErrorPage.vue +65 -0
- package/dist/runtime/components/ErrorPage.vue.d.ts +11 -0
- package/dist/runtime/components/Filter.d.vue.ts +11 -0
- package/dist/runtime/components/Filter.vue +23 -0
- package/dist/runtime/components/Filter.vue.d.ts +11 -0
- package/dist/runtime/components/Header.d.vue.ts +11 -0
- package/dist/runtime/components/Header.vue +78 -0
- package/dist/runtime/components/Header.vue.d.ts +11 -0
- package/dist/runtime/components/Icon.d.vue.ts +11 -0
- package/dist/runtime/components/Icon.vue +14 -0
- package/dist/runtime/components/Icon.vue.d.ts +11 -0
- package/dist/runtime/components/LanguageSwitcher.d.vue.ts +11 -0
- package/dist/runtime/components/LanguageSwitcher.vue +57 -0
- package/dist/runtime/components/LanguageSwitcher.vue.d.ts +11 -0
- package/dist/runtime/components/Layout.d.vue.ts +10 -0
- package/dist/runtime/components/Layout.vue +38 -0
- package/dist/runtime/components/Layout.vue.d.ts +10 -0
- package/dist/runtime/components/Logo.d.vue.ts +9 -0
- package/dist/runtime/components/Logo.vue +18 -0
- package/dist/runtime/components/Logo.vue.d.ts +9 -0
- package/dist/runtime/components/MenuPage.d.vue.ts +11 -0
- package/dist/runtime/components/MenuPage.vue +93 -0
- package/dist/runtime/components/MenuPage.vue.d.ts +11 -0
- package/dist/runtime/components/Message.d.vue.ts +11 -0
- package/dist/runtime/components/Message.vue +33 -0
- package/dist/runtime/components/Message.vue.d.ts +11 -0
- package/dist/runtime/components/ModalLayout.d.vue.ts +18 -0
- package/dist/runtime/components/ModalLayout.vue +14 -0
- package/dist/runtime/components/ModalLayout.vue.d.ts +18 -0
- package/dist/runtime/components/Money.d.vue.ts +11 -0
- package/dist/runtime/components/Money.vue +27 -0
- package/dist/runtime/components/Money.vue.d.ts +11 -0
- package/dist/runtime/components/NavLink.d.vue.ts +11 -0
- package/dist/runtime/components/NavLink.vue +30 -0
- package/dist/runtime/components/NavLink.vue.d.ts +11 -0
- package/dist/runtime/components/None.d.vue.ts +11 -0
- package/dist/runtime/components/None.vue +25 -0
- package/dist/runtime/components/None.vue.d.ts +11 -0
- package/dist/runtime/components/Number.d.vue.ts +11 -0
- package/dist/runtime/components/Number.vue +27 -0
- package/dist/runtime/components/Number.vue.d.ts +11 -0
- package/dist/runtime/components/Page.d.vue.ts +3 -0
- package/dist/runtime/components/Page.vue +24 -0
- package/dist/runtime/components/Page.vue.d.ts +3 -0
- package/dist/runtime/components/PageTitle.d.vue.ts +22 -0
- package/dist/runtime/components/PageTitle.vue +171 -0
- package/dist/runtime/components/PageTitle.vue.d.ts +22 -0
- package/dist/runtime/components/Parameters.d.vue.ts +11 -0
- package/dist/runtime/components/Parameters.vue +60 -0
- package/dist/runtime/components/Parameters.vue.d.ts +11 -0
- package/dist/runtime/components/PersistentPopover.d.vue.ts +46 -0
- package/dist/runtime/components/PersistentPopover.vue +335 -0
- package/dist/runtime/components/PersistentPopover.vue.d.ts +46 -0
- package/dist/runtime/components/QueryParameters.d.vue.ts +11 -0
- package/dist/runtime/components/QueryParameters.vue +103 -0
- package/dist/runtime/components/QueryParameters.vue.d.ts +11 -0
- package/dist/runtime/components/Rate.d.vue.ts +11 -0
- package/dist/runtime/components/Rate.vue +22 -0
- package/dist/runtime/components/Rate.vue.d.ts +11 -0
- package/dist/runtime/components/ReportPage.d.vue.ts +11 -0
- package/dist/runtime/components/ReportPage.vue +147 -0
- package/dist/runtime/components/ReportPage.vue.d.ts +11 -0
- package/dist/runtime/components/Select.d.vue.ts +11 -0
- package/dist/runtime/components/Select.vue +120 -0
- package/dist/runtime/components/Select.vue.d.ts +11 -0
- package/dist/runtime/components/SelectButton.d.vue.ts +11 -0
- package/dist/runtime/components/SelectButton.vue +94 -0
- package/dist/runtime/components/SelectButton.vue.d.ts +11 -0
- package/dist/runtime/components/SideMenu.d.vue.ts +20 -0
- package/dist/runtime/components/SideMenu.vue +121 -0
- package/dist/runtime/components/SideMenu.vue.d.ts +20 -0
- package/dist/runtime/components/SideMenuItem.d.vue.ts +11 -0
- package/dist/runtime/components/SideMenuItem.vue +33 -0
- package/dist/runtime/components/SideMenuItem.vue.d.ts +11 -0
- package/dist/runtime/components/Text.d.vue.ts +11 -0
- package/dist/runtime/components/Text.vue +36 -0
- package/dist/runtime/components/Text.vue.d.ts +11 -0
- package/dist/runtime/composables/useBreakpoints.d.ts +1 -0
- package/dist/runtime/composables/useBreakpoints.js +48 -0
- package/dist/runtime/composables/useCache.d.ts +13 -0
- package/dist/runtime/composables/useCache.js +60 -0
- package/dist/runtime/composables/useComponentResolver.d.ts +3 -0
- package/dist/runtime/composables/useComponentResolver.js +13 -0
- package/dist/runtime/composables/useComposableResolver.d.ts +3 -0
- package/dist/runtime/composables/useComposableResolver.js +15 -0
- package/dist/runtime/composables/useConditional.d.ts +3 -0
- package/dist/runtime/composables/useConditional.js +15 -0
- package/dist/runtime/composables/useContext.d.ts +15 -0
- package/dist/runtime/composables/useContext.js +60 -0
- package/dist/runtime/composables/useDataFetcher.d.ts +15 -0
- package/dist/runtime/composables/useDataFetcher.js +203 -0
- package/dist/runtime/composables/useFormat.d.ts +16 -0
- package/dist/runtime/composables/useFormat.js +116 -0
- package/dist/runtime/composables/useLayouts.d.ts +3 -0
- package/dist/runtime/composables/useLayouts.js +21 -0
- package/dist/runtime/composables/useLocalization.d.ts +6 -0
- package/dist/runtime/composables/useLocalization.js +34 -0
- package/dist/runtime/composables/useLoginRedirect.d.ts +3 -0
- package/dist/runtime/composables/useLoginRedirect.js +15 -0
- package/dist/runtime/composables/useMutex.d.ts +3 -0
- package/dist/runtime/composables/useMutex.js +26 -0
- package/dist/runtime/composables/useNuxtError.d.ts +3 -0
- package/dist/runtime/composables/useNuxtError.js +13 -0
- package/dist/runtime/composables/useNuxtRoute.d.ts +3 -0
- package/dist/runtime/composables/useNuxtRoute.js +13 -0
- package/dist/runtime/composables/usePages.d.ts +5 -0
- package/dist/runtime/composables/usePages.js +27 -0
- package/dist/runtime/composables/useQuery.d.ts +3 -0
- package/dist/runtime/composables/useQuery.js +13 -0
- package/dist/runtime/composables/useToast.d.ts +1 -0
- package/dist/runtime/composables/useToast.js +5 -0
- package/dist/runtime/composables/useToken.d.ts +11 -0
- package/dist/runtime/composables/useToken.js +99 -0
- package/dist/runtime/composables/useUiStates.d.ts +9 -0
- package/dist/runtime/composables/useUiStates.js +9 -0
- package/dist/runtime/composables/useUnref.d.ts +3 -0
- package/dist/runtime/composables/useUnref.js +109 -0
- package/dist/runtime/plugins/auth.d.ts +2 -0
- package/dist/runtime/plugins/auth.js +81 -0
- package/dist/runtime/plugins/baked.d.ts +10 -0
- package/dist/runtime/plugins/baked.js +50 -0
- package/dist/runtime/plugins/cacheApplication.d.ts +2 -0
- package/dist/runtime/plugins/cacheApplication.js +27 -0
- package/dist/runtime/plugins/cacheUser.d.ts +2 -0
- package/dist/runtime/plugins/cacheUser.js +37 -0
- package/dist/runtime/plugins/errorHandling.d.ts +14 -0
- package/dist/runtime/plugins/errorHandling.js +96 -0
- package/dist/runtime/plugins/fetch.d.ts +2 -0
- package/dist/runtime/plugins/fetch.js +80 -0
- package/dist/runtime/plugins/localization.d.ts +2 -0
- package/dist/runtime/plugins/localization.js +18 -0
- package/dist/runtime/plugins/mutex.d.ts +7 -0
- package/dist/runtime/plugins/mutex.js +15 -0
- package/dist/runtime/plugins/primeVue.d.ts +2 -0
- package/dist/runtime/plugins/primeVue.js +75 -0
- package/dist/runtime/plugins/toast.d.ts +6 -0
- package/dist/runtime/plugins/toast.js +18 -0
- package/dist/runtime/plugins/trailingSlash.d.ts +2 -0
- package/dist/runtime/plugins/trailingSlash.js +18 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/types.d.mts +3 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
Baked is an opinionated framework for .NET and Vue.
|
|
4
|
+
|
|
5
|
+
It proposes well designed conventions to help you express your application
|
|
6
|
+
logic with ease. It doesn't reinvent libraries that already exists, but brings
|
|
7
|
+
them together with built-in configurations.
|
|
8
|
+
|
|
9
|
+
Check out our documentation site for more information: [baked.mouseless.codes][]
|
|
10
|
+
|
|
11
|
+
[baked.mouseless.codes]: https://baked.mouseless.codes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { NuxtI18nOptions } from '@nuxtjs/i18n';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions {
|
|
5
|
+
components?: Components;
|
|
6
|
+
composables: Composables;
|
|
7
|
+
primevue: PrimeVueOptions;
|
|
8
|
+
i18n: NuxtI18nOptions;
|
|
9
|
+
}
|
|
10
|
+
interface Components {
|
|
11
|
+
Page?: PageOptions;
|
|
12
|
+
}
|
|
13
|
+
interface PageOptions {
|
|
14
|
+
title?: String;
|
|
15
|
+
}
|
|
16
|
+
interface PrimeVueOptions {
|
|
17
|
+
theme: any;
|
|
18
|
+
locale?: any;
|
|
19
|
+
}
|
|
20
|
+
interface Composables {
|
|
21
|
+
useBreakpoints?: UseBreakpointsOptions;
|
|
22
|
+
useDataFetcher: UseDataFetcherOptions;
|
|
23
|
+
useFormat?: UseFormatOptions;
|
|
24
|
+
}
|
|
25
|
+
interface UseDataFetcherOptions {
|
|
26
|
+
baseURL: String;
|
|
27
|
+
retry?: RetryOptions | Boolean;
|
|
28
|
+
}
|
|
29
|
+
interface RetryOptions {
|
|
30
|
+
maxRetry?: Number;
|
|
31
|
+
delay?: Number;
|
|
32
|
+
}
|
|
33
|
+
interface UseFormatOptions {
|
|
34
|
+
currency?: String;
|
|
35
|
+
}
|
|
36
|
+
interface UseBreakpointsOptions {
|
|
37
|
+
screens?: ScreenOptions;
|
|
38
|
+
}
|
|
39
|
+
interface ScreenOptions {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
}
|
|
42
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
43
|
+
|
|
44
|
+
export { _default as default };
|
|
45
|
+
export type { Components, Composables, ModuleOptions, PageOptions, PrimeVueOptions, RetryOptions, ScreenOptions, UseBreakpointsOptions, UseDataFetcherOptions, UseFormatOptions };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createResolver, defineNuxtModule, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
|
|
2
|
+
import { pathToFileURL } from 'url';
|
|
3
|
+
|
|
4
|
+
const resolver = createResolver(import.meta.url);
|
|
5
|
+
const module = defineNuxtModule({
|
|
6
|
+
meta: {
|
|
7
|
+
name: "@mouseless/baked",
|
|
8
|
+
configKey: "baked"
|
|
9
|
+
},
|
|
10
|
+
defaults: {},
|
|
11
|
+
moduleDependencies: {
|
|
12
|
+
"@nuxtjs/i18n": {
|
|
13
|
+
version: "10.1.1",
|
|
14
|
+
defaults: {
|
|
15
|
+
strategy: "no_prefix",
|
|
16
|
+
detectBrowserLanguage: {
|
|
17
|
+
useCookie: true,
|
|
18
|
+
cookieKey: "i18n_cookie"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"@nuxtjs/tailwindcss": {
|
|
23
|
+
version: "6.14.0",
|
|
24
|
+
defaults: {
|
|
25
|
+
exposeConfig: true,
|
|
26
|
+
cssPath: resolver.resolve("./runtime/assets/tailwind.css"),
|
|
27
|
+
config: {
|
|
28
|
+
content: {
|
|
29
|
+
files: [
|
|
30
|
+
resolver.resolve("./runtime/components/**/*.{vue,mjs,ts}"),
|
|
31
|
+
resolver.resolve("./runtime/*.{mjs,js,ts}")
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
onInstall() {
|
|
39
|
+
},
|
|
40
|
+
onUpgrade() {
|
|
41
|
+
},
|
|
42
|
+
// this setup runs after `defineNuxtConfig` so it should set default values
|
|
43
|
+
// carefully.
|
|
44
|
+
async setup(_options, _nuxt) {
|
|
45
|
+
if (process.env.npm_lifecycle_script?.includes("nuxt-module-build")) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const entryProjectResolver = createResolver(_nuxt.options.rootDir);
|
|
49
|
+
const appJsonPath = pathToFileURL(entryProjectResolver.resolve("./.baked/app.json"));
|
|
50
|
+
const app = (await import(appJsonPath.href, { with: { type: 'json' } })).default;
|
|
51
|
+
_options.composables.useBreakpoints ||= {};
|
|
52
|
+
_options.composables.useBreakpoints.screens ||= {
|
|
53
|
+
"2xs": "340px",
|
|
54
|
+
"xs": "480px",
|
|
55
|
+
"sm": "640px",
|
|
56
|
+
"md": "768px",
|
|
57
|
+
"lg": "1024px",
|
|
58
|
+
"xl": "1280px",
|
|
59
|
+
"2xl": "1536px",
|
|
60
|
+
"3xl": "1920px"
|
|
61
|
+
};
|
|
62
|
+
_nuxt.options.runtimeConfig.public.error = app?.error;
|
|
63
|
+
_nuxt.options.runtimeConfig.public.primevue = _options.primevue;
|
|
64
|
+
_nuxt.options.runtimeConfig.public.components = _options.components;
|
|
65
|
+
_nuxt.options.runtimeConfig.public.composables = _options.composables;
|
|
66
|
+
_nuxt.options.css.push("primeicons/primeicons.css");
|
|
67
|
+
_nuxt.options.css.push(resolver.resolve("./runtime/assets/overrides.css"));
|
|
68
|
+
_nuxt.options.devtools = { enabled: false };
|
|
69
|
+
_nuxt.options.experimental.payloadExtraction = false;
|
|
70
|
+
_nuxt.options.features.inlineStyles = false;
|
|
71
|
+
_nuxt.options.ssr = false;
|
|
72
|
+
addComponentsDir({ path: resolver.resolve("./runtime/components") });
|
|
73
|
+
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
74
|
+
for (const plugin of app?.plugins ?? []) {
|
|
75
|
+
_nuxt.options.runtimeConfig.public[plugin.name] = plugin;
|
|
76
|
+
addPlugin(resolver.resolve(`./runtime/plugins/${plugin.name}`));
|
|
77
|
+
}
|
|
78
|
+
addPlugin(resolver.resolve("./runtime/plugins/mutex"));
|
|
79
|
+
addPlugin(resolver.resolve("./runtime/plugins/toast"));
|
|
80
|
+
addPlugin(resolver.resolve("./runtime/plugins/trailingSlash"));
|
|
81
|
+
addPlugin(resolver.resolve("./runtime/plugins/baked"));
|
|
82
|
+
addPlugin(resolver.resolve("./runtime/plugins/primeVue"));
|
|
83
|
+
addPlugin(resolver.resolve("./runtime/plugins/fetch"), {});
|
|
84
|
+
_nuxt.options.i18n = {
|
|
85
|
+
vueI18n: entryProjectResolver.resolve("./i18n.config.ts"),
|
|
86
|
+
langDir: entryProjectResolver.resolve("./"),
|
|
87
|
+
locales: app?.i18n?.supportedLanguages?.map((i) => {
|
|
88
|
+
const files = [
|
|
89
|
+
entryProjectResolver.resolve(`./.baked/locale.${i.code}.json`),
|
|
90
|
+
entryProjectResolver.resolve(`./locales/locale.${i.code}.json`)
|
|
91
|
+
];
|
|
92
|
+
return {
|
|
93
|
+
code: i.code,
|
|
94
|
+
name: i.name,
|
|
95
|
+
files
|
|
96
|
+
};
|
|
97
|
+
}),
|
|
98
|
+
defaultLocale: app?.i18n?.defaultLanguage?.code
|
|
99
|
+
};
|
|
100
|
+
_nuxt.options.tailwindcss = {
|
|
101
|
+
config: {
|
|
102
|
+
theme: {
|
|
103
|
+
screens: _options.composables.useBreakpoints.screens
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export { module as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html{@apply max-xs:text-[smaller]}.bg-body{background-color:#fff}.p-datatable-tbody td.p-datatable-frozen-column{background:inherit}.p-popover-content>div{@apply max-sm:p-0}@media (prefers-color-scheme:dark){.bg-body{background-color:#121212}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer tailwind-base{@tailwind base}@layer tailwind-utilities{@tailwind components;@tailwind utilities;@tailwind variants}
|
|
@@ -0,0 +1,10 @@
|
|
|
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").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
default?: ((props: {}) => any) | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot v-if="authorized" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { onMounted, ref } from "vue";
|
|
7
|
+
import { useToken } from "#imports";
|
|
8
|
+
const token = useToken();
|
|
9
|
+
const authorized = ref(false);
|
|
10
|
+
onMounted(async () => {
|
|
11
|
+
const result = await token.current(false);
|
|
12
|
+
authorized.value = result !== null;
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
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").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
default?: ((props: {}) => any) | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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<{}, {
|
|
8
|
+
$emit: typeof emit;
|
|
9
|
+
$props: Partial<typeof __VLS_props>;
|
|
10
|
+
name: string;
|
|
11
|
+
descriptor: any;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
default?: ((props: {}) => any) | undefined;
|
|
15
|
+
};
|
|
16
|
+
declare const emit: (event: "loaded", ...args: any[]) => void;
|
|
17
|
+
declare const __VLS_props: {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly descriptor: any;
|
|
20
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="is"
|
|
4
|
+
:key="loading"
|
|
5
|
+
v-model="model"
|
|
6
|
+
:schema="descriptor.schema"
|
|
7
|
+
:data
|
|
8
|
+
:class="classes"
|
|
9
|
+
>
|
|
10
|
+
<slot v-if="$slots.default" />
|
|
11
|
+
</component>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { onMounted, ref } from "vue";
|
|
16
|
+
import { useComponentResolver, useContext, useDataFetcher, useFormat } from "#imports";
|
|
17
|
+
const componentResolver = useComponentResolver();
|
|
18
|
+
const context = useContext();
|
|
19
|
+
const dataFetcher = useDataFetcher();
|
|
20
|
+
const { asClasses } = useFormat();
|
|
21
|
+
const { name, descriptor } = defineProps({
|
|
22
|
+
name: { type: String, required: true },
|
|
23
|
+
descriptor: { type: null, required: true }
|
|
24
|
+
});
|
|
25
|
+
const model = defineModel({ type: null });
|
|
26
|
+
const emit = defineEmits(["loaded"]);
|
|
27
|
+
context.providePath(name);
|
|
28
|
+
context.provideDataDescriptor(descriptor.data);
|
|
29
|
+
const is = componentResolver.resolve(descriptor.type, "None");
|
|
30
|
+
const injectedData = context.injectData();
|
|
31
|
+
const data = ref(dataFetcher.get({ data: descriptor.data, injectedData }));
|
|
32
|
+
const shouldLoad = dataFetcher.shouldLoad(descriptor.data?.type);
|
|
33
|
+
const loading = ref(shouldLoad);
|
|
34
|
+
const classes = [`b-component--${descriptor.type}`, ...asClasses(name)];
|
|
35
|
+
context.provideData(data, "ParentData");
|
|
36
|
+
if (shouldLoad) {
|
|
37
|
+
context.provideLoading(loading);
|
|
38
|
+
}
|
|
39
|
+
onMounted(async () => {
|
|
40
|
+
if (!shouldLoad) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
data.value = await dataFetcher.fetch({
|
|
44
|
+
data: descriptor.data,
|
|
45
|
+
injectedData
|
|
46
|
+
});
|
|
47
|
+
loading.value = false;
|
|
48
|
+
emit("loaded");
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
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<{}, {
|
|
8
|
+
$emit: typeof emit;
|
|
9
|
+
$props: Partial<typeof __VLS_props>;
|
|
10
|
+
name: string;
|
|
11
|
+
descriptor: any;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
default?: ((props: {}) => any) | undefined;
|
|
15
|
+
};
|
|
16
|
+
declare const emit: (event: "loaded", ...args: any[]) => void;
|
|
17
|
+
declare const __VLS_props: {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly descriptor: any;
|
|
20
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
dismissable: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
appendTo: {
|
|
9
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
baseZIndex: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
autoZIndex: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
breakpoints: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
closeOnEscape: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, typeof BaseComponent, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
dismissable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
appendTo: {
|
|
34
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
baseZIndex: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
autoZIndex: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
breakpoints: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
default: null;
|
|
48
|
+
};
|
|
49
|
+
closeOnEscape: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
|
+
dismissable: boolean;
|
|
55
|
+
appendTo: string | Record<string, any>;
|
|
56
|
+
baseZIndex: number;
|
|
57
|
+
autoZIndex: boolean;
|
|
58
|
+
breakpoints: Record<string, any>;
|
|
59
|
+
closeOnEscape: boolean;
|
|
60
|
+
}, {}, {}, {}, string, () => {
|
|
61
|
+
$pcPopover: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
dismissable: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
appendTo: {
|
|
67
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
baseZIndex: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: number;
|
|
73
|
+
};
|
|
74
|
+
autoZIndex: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
breakpoints: {
|
|
79
|
+
type: ObjectConstructor;
|
|
80
|
+
default: null;
|
|
81
|
+
};
|
|
82
|
+
closeOnEscape: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, typeof BaseComponent, {}, {}, {}, false, {}, {}, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
87
|
+
P: {};
|
|
88
|
+
B: {};
|
|
89
|
+
D: {};
|
|
90
|
+
C: {};
|
|
91
|
+
M: {};
|
|
92
|
+
Defaults: {};
|
|
93
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
+
dismissable: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
98
|
+
appendTo: {
|
|
99
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
baseZIndex: {
|
|
103
|
+
type: NumberConstructor;
|
|
104
|
+
default: number;
|
|
105
|
+
};
|
|
106
|
+
autoZIndex: {
|
|
107
|
+
type: BooleanConstructor;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
breakpoints: {
|
|
111
|
+
type: ObjectConstructor;
|
|
112
|
+
default: null;
|
|
113
|
+
};
|
|
114
|
+
closeOnEscape: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
119
|
+
$parentInstance: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
120
|
+
dismissable: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: boolean;
|
|
123
|
+
};
|
|
124
|
+
appendTo: {
|
|
125
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
baseZIndex: {
|
|
129
|
+
type: NumberConstructor;
|
|
130
|
+
default: number;
|
|
131
|
+
};
|
|
132
|
+
autoZIndex: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
breakpoints: {
|
|
137
|
+
type: ObjectConstructor;
|
|
138
|
+
default: null;
|
|
139
|
+
};
|
|
140
|
+
closeOnEscape: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, typeof BaseComponent, {}, {}, {}, false, {}, {}, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
145
|
+
P: {};
|
|
146
|
+
B: {};
|
|
147
|
+
D: {};
|
|
148
|
+
C: {};
|
|
149
|
+
M: {};
|
|
150
|
+
Defaults: {};
|
|
151
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
152
|
+
dismissable: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
appendTo: {
|
|
157
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
158
|
+
default: string;
|
|
159
|
+
};
|
|
160
|
+
baseZIndex: {
|
|
161
|
+
type: NumberConstructor;
|
|
162
|
+
default: number;
|
|
163
|
+
};
|
|
164
|
+
autoZIndex: {
|
|
165
|
+
type: BooleanConstructor;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
168
|
+
breakpoints: {
|
|
169
|
+
type: ObjectConstructor;
|
|
170
|
+
default: null;
|
|
171
|
+
};
|
|
172
|
+
closeOnEscape: {
|
|
173
|
+
type: BooleanConstructor;
|
|
174
|
+
default: boolean;
|
|
175
|
+
};
|
|
176
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
177
|
+
}, true, {}, any>;
|
|
178
|
+
import BaseComponent from "@primevue/core/basecomponent";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import BaseComponent from "@primevue/core/basecomponent";
|
|
3
|
+
import PopoverStyle from "primevue/popover/style";
|
|
4
|
+
export default {
|
|
5
|
+
name: "BasePopover",
|
|
6
|
+
extends: BaseComponent,
|
|
7
|
+
provide() {
|
|
8
|
+
return {
|
|
9
|
+
$pcPopover: this,
|
|
10
|
+
$parentInstance: this
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
dismissable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true
|
|
17
|
+
},
|
|
18
|
+
appendTo: {
|
|
19
|
+
type: [String, Object],
|
|
20
|
+
default: "body"
|
|
21
|
+
},
|
|
22
|
+
baseZIndex: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
autoZIndex: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
},
|
|
30
|
+
breakpoints: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
closeOnEscape: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
style: PopoverStyle
|
|
40
|
+
};
|
|
41
|
+
</script>
|