@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.
Files changed (176) hide show
  1. package/README.md +11 -0
  2. package/dist/module.d.mts +45 -0
  3. package/dist/module.json +9 -0
  4. package/dist/module.mjs +110 -0
  5. package/dist/runtime/assets/overrides.css +1 -0
  6. package/dist/runtime/assets/tailwind.css +1 -0
  7. package/dist/runtime/components/AuthorizedContent.d.vue.ts +10 -0
  8. package/dist/runtime/components/AuthorizedContent.vue +14 -0
  9. package/dist/runtime/components/AuthorizedContent.vue.d.ts +10 -0
  10. package/dist/runtime/components/Bake.d.vue.ts +20 -0
  11. package/dist/runtime/components/Bake.vue +50 -0
  12. package/dist/runtime/components/Bake.vue.d.ts +20 -0
  13. package/dist/runtime/components/BasePersistentPopover.d.vue.ts +178 -0
  14. package/dist/runtime/components/BasePersistentPopover.vue +41 -0
  15. package/dist/runtime/components/BasePersistentPopover.vue.d.ts +178 -0
  16. package/dist/runtime/components/CardLink.d.vue.ts +11 -0
  17. package/dist/runtime/components/CardLink.vue +57 -0
  18. package/dist/runtime/components/CardLink.vue.d.ts +11 -0
  19. package/dist/runtime/components/DataPanel.d.vue.ts +20 -0
  20. package/dist/runtime/components/DataPanel.vue +138 -0
  21. package/dist/runtime/components/DataPanel.vue.d.ts +20 -0
  22. package/dist/runtime/components/DataTable.d.vue.ts +11 -0
  23. package/dist/runtime/components/DataTable.vue +213 -0
  24. package/dist/runtime/components/DataTable.vue.d.ts +11 -0
  25. package/dist/runtime/components/DefaultLayout.d.vue.ts +18 -0
  26. package/dist/runtime/components/DefaultLayout.vue +44 -0
  27. package/dist/runtime/components/DefaultLayout.vue.d.ts +18 -0
  28. package/dist/runtime/components/DeferredTabContent.d.vue.ts +16 -0
  29. package/dist/runtime/components/DeferredTabContent.vue +23 -0
  30. package/dist/runtime/components/DeferredTabContent.vue.d.ts +16 -0
  31. package/dist/runtime/components/Error.d.vue.ts +3 -0
  32. package/dist/runtime/components/Error.vue +13 -0
  33. package/dist/runtime/components/Error.vue.d.ts +3 -0
  34. package/dist/runtime/components/ErrorPage.d.vue.ts +11 -0
  35. package/dist/runtime/components/ErrorPage.vue +65 -0
  36. package/dist/runtime/components/ErrorPage.vue.d.ts +11 -0
  37. package/dist/runtime/components/Filter.d.vue.ts +11 -0
  38. package/dist/runtime/components/Filter.vue +23 -0
  39. package/dist/runtime/components/Filter.vue.d.ts +11 -0
  40. package/dist/runtime/components/Header.d.vue.ts +11 -0
  41. package/dist/runtime/components/Header.vue +78 -0
  42. package/dist/runtime/components/Header.vue.d.ts +11 -0
  43. package/dist/runtime/components/Icon.d.vue.ts +11 -0
  44. package/dist/runtime/components/Icon.vue +14 -0
  45. package/dist/runtime/components/Icon.vue.d.ts +11 -0
  46. package/dist/runtime/components/LanguageSwitcher.d.vue.ts +11 -0
  47. package/dist/runtime/components/LanguageSwitcher.vue +57 -0
  48. package/dist/runtime/components/LanguageSwitcher.vue.d.ts +11 -0
  49. package/dist/runtime/components/Layout.d.vue.ts +10 -0
  50. package/dist/runtime/components/Layout.vue +38 -0
  51. package/dist/runtime/components/Layout.vue.d.ts +10 -0
  52. package/dist/runtime/components/Logo.d.vue.ts +9 -0
  53. package/dist/runtime/components/Logo.vue +18 -0
  54. package/dist/runtime/components/Logo.vue.d.ts +9 -0
  55. package/dist/runtime/components/MenuPage.d.vue.ts +11 -0
  56. package/dist/runtime/components/MenuPage.vue +93 -0
  57. package/dist/runtime/components/MenuPage.vue.d.ts +11 -0
  58. package/dist/runtime/components/Message.d.vue.ts +11 -0
  59. package/dist/runtime/components/Message.vue +33 -0
  60. package/dist/runtime/components/Message.vue.d.ts +11 -0
  61. package/dist/runtime/components/ModalLayout.d.vue.ts +18 -0
  62. package/dist/runtime/components/ModalLayout.vue +14 -0
  63. package/dist/runtime/components/ModalLayout.vue.d.ts +18 -0
  64. package/dist/runtime/components/Money.d.vue.ts +11 -0
  65. package/dist/runtime/components/Money.vue +27 -0
  66. package/dist/runtime/components/Money.vue.d.ts +11 -0
  67. package/dist/runtime/components/NavLink.d.vue.ts +11 -0
  68. package/dist/runtime/components/NavLink.vue +30 -0
  69. package/dist/runtime/components/NavLink.vue.d.ts +11 -0
  70. package/dist/runtime/components/None.d.vue.ts +11 -0
  71. package/dist/runtime/components/None.vue +25 -0
  72. package/dist/runtime/components/None.vue.d.ts +11 -0
  73. package/dist/runtime/components/Number.d.vue.ts +11 -0
  74. package/dist/runtime/components/Number.vue +27 -0
  75. package/dist/runtime/components/Number.vue.d.ts +11 -0
  76. package/dist/runtime/components/Page.d.vue.ts +3 -0
  77. package/dist/runtime/components/Page.vue +24 -0
  78. package/dist/runtime/components/Page.vue.d.ts +3 -0
  79. package/dist/runtime/components/PageTitle.d.vue.ts +22 -0
  80. package/dist/runtime/components/PageTitle.vue +171 -0
  81. package/dist/runtime/components/PageTitle.vue.d.ts +22 -0
  82. package/dist/runtime/components/Parameters.d.vue.ts +11 -0
  83. package/dist/runtime/components/Parameters.vue +60 -0
  84. package/dist/runtime/components/Parameters.vue.d.ts +11 -0
  85. package/dist/runtime/components/PersistentPopover.d.vue.ts +46 -0
  86. package/dist/runtime/components/PersistentPopover.vue +335 -0
  87. package/dist/runtime/components/PersistentPopover.vue.d.ts +46 -0
  88. package/dist/runtime/components/QueryParameters.d.vue.ts +11 -0
  89. package/dist/runtime/components/QueryParameters.vue +103 -0
  90. package/dist/runtime/components/QueryParameters.vue.d.ts +11 -0
  91. package/dist/runtime/components/Rate.d.vue.ts +11 -0
  92. package/dist/runtime/components/Rate.vue +22 -0
  93. package/dist/runtime/components/Rate.vue.d.ts +11 -0
  94. package/dist/runtime/components/ReportPage.d.vue.ts +11 -0
  95. package/dist/runtime/components/ReportPage.vue +147 -0
  96. package/dist/runtime/components/ReportPage.vue.d.ts +11 -0
  97. package/dist/runtime/components/Select.d.vue.ts +11 -0
  98. package/dist/runtime/components/Select.vue +120 -0
  99. package/dist/runtime/components/Select.vue.d.ts +11 -0
  100. package/dist/runtime/components/SelectButton.d.vue.ts +11 -0
  101. package/dist/runtime/components/SelectButton.vue +94 -0
  102. package/dist/runtime/components/SelectButton.vue.d.ts +11 -0
  103. package/dist/runtime/components/SideMenu.d.vue.ts +20 -0
  104. package/dist/runtime/components/SideMenu.vue +121 -0
  105. package/dist/runtime/components/SideMenu.vue.d.ts +20 -0
  106. package/dist/runtime/components/SideMenuItem.d.vue.ts +11 -0
  107. package/dist/runtime/components/SideMenuItem.vue +33 -0
  108. package/dist/runtime/components/SideMenuItem.vue.d.ts +11 -0
  109. package/dist/runtime/components/Text.d.vue.ts +11 -0
  110. package/dist/runtime/components/Text.vue +36 -0
  111. package/dist/runtime/components/Text.vue.d.ts +11 -0
  112. package/dist/runtime/composables/useBreakpoints.d.ts +1 -0
  113. package/dist/runtime/composables/useBreakpoints.js +48 -0
  114. package/dist/runtime/composables/useCache.d.ts +13 -0
  115. package/dist/runtime/composables/useCache.js +60 -0
  116. package/dist/runtime/composables/useComponentResolver.d.ts +3 -0
  117. package/dist/runtime/composables/useComponentResolver.js +13 -0
  118. package/dist/runtime/composables/useComposableResolver.d.ts +3 -0
  119. package/dist/runtime/composables/useComposableResolver.js +15 -0
  120. package/dist/runtime/composables/useConditional.d.ts +3 -0
  121. package/dist/runtime/composables/useConditional.js +15 -0
  122. package/dist/runtime/composables/useContext.d.ts +15 -0
  123. package/dist/runtime/composables/useContext.js +60 -0
  124. package/dist/runtime/composables/useDataFetcher.d.ts +15 -0
  125. package/dist/runtime/composables/useDataFetcher.js +203 -0
  126. package/dist/runtime/composables/useFormat.d.ts +16 -0
  127. package/dist/runtime/composables/useFormat.js +116 -0
  128. package/dist/runtime/composables/useLayouts.d.ts +3 -0
  129. package/dist/runtime/composables/useLayouts.js +21 -0
  130. package/dist/runtime/composables/useLocalization.d.ts +6 -0
  131. package/dist/runtime/composables/useLocalization.js +34 -0
  132. package/dist/runtime/composables/useLoginRedirect.d.ts +3 -0
  133. package/dist/runtime/composables/useLoginRedirect.js +15 -0
  134. package/dist/runtime/composables/useMutex.d.ts +3 -0
  135. package/dist/runtime/composables/useMutex.js +26 -0
  136. package/dist/runtime/composables/useNuxtError.d.ts +3 -0
  137. package/dist/runtime/composables/useNuxtError.js +13 -0
  138. package/dist/runtime/composables/useNuxtRoute.d.ts +3 -0
  139. package/dist/runtime/composables/useNuxtRoute.js +13 -0
  140. package/dist/runtime/composables/usePages.d.ts +5 -0
  141. package/dist/runtime/composables/usePages.js +27 -0
  142. package/dist/runtime/composables/useQuery.d.ts +3 -0
  143. package/dist/runtime/composables/useQuery.js +13 -0
  144. package/dist/runtime/composables/useToast.d.ts +1 -0
  145. package/dist/runtime/composables/useToast.js +5 -0
  146. package/dist/runtime/composables/useToken.d.ts +11 -0
  147. package/dist/runtime/composables/useToken.js +99 -0
  148. package/dist/runtime/composables/useUiStates.d.ts +9 -0
  149. package/dist/runtime/composables/useUiStates.js +9 -0
  150. package/dist/runtime/composables/useUnref.d.ts +3 -0
  151. package/dist/runtime/composables/useUnref.js +109 -0
  152. package/dist/runtime/plugins/auth.d.ts +2 -0
  153. package/dist/runtime/plugins/auth.js +81 -0
  154. package/dist/runtime/plugins/baked.d.ts +10 -0
  155. package/dist/runtime/plugins/baked.js +50 -0
  156. package/dist/runtime/plugins/cacheApplication.d.ts +2 -0
  157. package/dist/runtime/plugins/cacheApplication.js +27 -0
  158. package/dist/runtime/plugins/cacheUser.d.ts +2 -0
  159. package/dist/runtime/plugins/cacheUser.js +37 -0
  160. package/dist/runtime/plugins/errorHandling.d.ts +14 -0
  161. package/dist/runtime/plugins/errorHandling.js +96 -0
  162. package/dist/runtime/plugins/fetch.d.ts +2 -0
  163. package/dist/runtime/plugins/fetch.js +80 -0
  164. package/dist/runtime/plugins/localization.d.ts +2 -0
  165. package/dist/runtime/plugins/localization.js +18 -0
  166. package/dist/runtime/plugins/mutex.d.ts +7 -0
  167. package/dist/runtime/plugins/mutex.js +15 -0
  168. package/dist/runtime/plugins/primeVue.d.ts +2 -0
  169. package/dist/runtime/plugins/primeVue.js +75 -0
  170. package/dist/runtime/plugins/toast.d.ts +6 -0
  171. package/dist/runtime/plugins/toast.js +18 -0
  172. package/dist/runtime/plugins/trailingSlash.d.ts +2 -0
  173. package/dist/runtime/plugins/trailingSlash.js +18 -0
  174. package/dist/runtime/server/tsconfig.json +3 -0
  175. package/dist/types.d.mts +3 -0
  176. package/package.json +74 -0
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <div class="space-y-4">
3
+ <Bake
4
+ v-if="header"
5
+ name="header"
6
+ :descriptor="header"
7
+ />
8
+ <div
9
+ v-if="sectionsData.length > 0"
10
+ class="flex flex-col gap-6"
11
+ >
12
+ <div
13
+ v-for="section in sectionsData"
14
+ :key="section.title"
15
+ >
16
+ <h2
17
+ v-if="section.title"
18
+ class="
19
+ text-zinc-400 dark:text-zinc-600
20
+ text-xs font-bold
21
+ "
22
+ >
23
+ {{ l(section.title).toLocaleUpperCase(locale) }}
24
+ </h2>
25
+ <Divider
26
+ v-if="section.title"
27
+ type="dashed"
28
+ class="mt-2"
29
+ />
30
+ <div
31
+ class="
32
+ grid gap-4 grid-cols-1
33
+ md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-6
34
+ "
35
+ >
36
+ <Bake
37
+ v-for="(link, i) in section.links"
38
+ :key="link.title"
39
+ :name="`links/${i}`"
40
+ :descriptor="link.component"
41
+ />
42
+ </div>
43
+ </div>
44
+ </div>
45
+ <div v-if="sectionsData.length === 0">
46
+ {{ lc("No item available!") }}
47
+ </div>
48
+ </div>
49
+ </template>
50
+
51
+ <script setup>
52
+ import { useRuntimeConfig } from "#app";
53
+ import { Bake } from "#components";
54
+ import { useContext, useLocalization } from "#imports";
55
+ import { Divider } from "primevue";
56
+ import { ref, watch } from "vue";
57
+ const context = useContext();
58
+ const { localize: l } = useLocalization();
59
+ const { localize: lc } = useLocalization({ group: "MenuPage" });
60
+ const { public: { composables } } = useRuntimeConfig();
61
+ const { schema } = defineProps({
62
+ schema: { type: null, required: true },
63
+ data: { type: null, default: null }
64
+ });
65
+ const { header, sections, filterPageContextKey } = schema;
66
+ const locale = composables?.useFormat?.locale || "en-US";
67
+ const sectionsData = ref(sections);
68
+ const page = context.injectPage();
69
+ if (filterPageContextKey) {
70
+ watch(
71
+ () => page[filterPageContextKey],
72
+ (newValue, oldValue) => {
73
+ if (newValue === oldValue || newValue === void 0) {
74
+ return;
75
+ }
76
+ if (!newValue.trim()) {
77
+ sectionsData.value = sections;
78
+ return;
79
+ }
80
+ const searchTerm = newValue.toLocaleLowerCase(locale);
81
+ const sectionsWithFilteredLinks = sections.map((section) => ({
82
+ title: section.title,
83
+ links: section.links.filter((link) => {
84
+ const title = l(link.title);
85
+ return title?.toLocaleLowerCase(locale).startsWith(searchTerm);
86
+ })
87
+ }));
88
+ sectionsData.value = sectionsWithFilteredLinks.filter((section) => section.links.length > 0);
89
+ },
90
+ { immediate: true }
91
+ );
92
+ }
93
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <Message
3
+ :severity="severity"
4
+ :pt="{ text: { class: 'min-w-[10rem] min-h-[1.5rem]' } }"
5
+ >
6
+ <template
7
+ v-if="icon"
8
+ #icon
9
+ >
10
+ <i :class="`pi ${icon}`" />
11
+ </template>
12
+ <Skeleton
13
+ v-if="loading"
14
+ height="1.5rem"
15
+ width="100%"
16
+ />
17
+ <span v-else-if="data">{{ localizeMessage ? l(data) : data }}</span>
18
+ <span v-else>-</span>
19
+ </Message>
20
+ </template>
21
+
22
+ <script setup>
23
+ import { Message, Skeleton } from "primevue";
24
+ import { useContext, useLocalization } from "#imports";
25
+ const context = useContext();
26
+ const { localize: l } = useLocalization();
27
+ const { schema } = defineProps({
28
+ schema: { type: null, default: null },
29
+ data: { type: null, default: null }
30
+ });
31
+ const { icon, severity, localizeMessage } = schema;
32
+ const loading = context.injectLoading();
33
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,18 @@
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
+ $props: Partial<typeof __VLS_props>;
9
+ schema: any;
10
+ data: any;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ type __VLS_Slots = {
13
+ default?: ((props: {}) => any) | undefined;
14
+ };
15
+ declare const __VLS_props: {
16
+ readonly schema: any;
17
+ readonly data: any;
18
+ };
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div class="h-screen">
3
+ <div class="flex flex-col gap-8 justify-center items-center h-3/4">
4
+ <slot />
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ defineProps({
11
+ schema: { type: null, default: null },
12
+ data: { type: null, default: null }
13
+ });
14
+ </script>
@@ -0,0 +1,18 @@
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
+ $props: Partial<typeof __VLS_props>;
9
+ schema: any;
10
+ data: any;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ type __VLS_Slots = {
13
+ default?: ((props: {}) => any) | undefined;
14
+ };
15
+ declare const __VLS_props: {
16
+ readonly schema: any;
17
+ readonly data: any;
18
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <Skeleton
3
+ v-if="loading"
4
+ height="1.5rem"
5
+ />
6
+ <span
7
+ v-else-if="data"
8
+ v-tooltip.bottom="tooltip"
9
+ class="max-sm:select-none"
10
+ >{{ display }}</span>
11
+ <span v-else>-</span>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { computed } from "vue";
16
+ import { Skeleton } from "primevue";
17
+ import { useContext, useFormat } from "#imports";
18
+ const context = useContext();
19
+ const { asCurrency } = useFormat();
20
+ const { data } = defineProps({
21
+ schema: { type: null, required: true },
22
+ data: { type: null, required: true }
23
+ });
24
+ const loading = context.injectLoading();
25
+ const display = computed(() => asCurrency(data));
26
+ const tooltip = computed(() => display.value.shortened ? `${asCurrency(data, { shorten: false })}` : null);
27
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <Skeleton
3
+ v-if="loading"
4
+ height="1.5rem"
5
+ />
6
+ <Button
7
+ v-else-if="data"
8
+ as="router-link"
9
+ link
10
+ :label="l(text)"
11
+ :to
12
+ />
13
+ </template>
14
+
15
+ <script setup>
16
+ import { computed } from "vue";
17
+ import { Button, Skeleton } from "primevue";
18
+ import { useContext, useFormat, useLocalization } from "#imports";
19
+ const context = useContext();
20
+ const { format } = useFormat();
21
+ const { localize: l } = useLocalization();
22
+ const { schema, data } = defineProps({
23
+ schema: { type: null, required: true },
24
+ data: { type: null, required: true }
25
+ });
26
+ const { path, idProp, textProp } = schema;
27
+ const loading = context.injectLoading();
28
+ const to = computed(() => format(path, [data[idProp]]));
29
+ const text = computed(() => data[textProp]);
30
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <span class="bg-red-500 p-1 rounded-md">
3
+ <Skeleton
4
+ v-if="loading"
5
+ width="3rem"
6
+ class="inline-block"
7
+ />
8
+ <code v-else-if="data">
9
+ {{ json }}
10
+ </code>
11
+ </span>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { computed } from "vue";
16
+ import { Skeleton } from "primevue";
17
+ import { useContext } from "#imports";
18
+ const context = useContext();
19
+ const { data } = defineProps({
20
+ schema: { type: null, required: true },
21
+ data: { type: null, required: true }
22
+ });
23
+ const loading = context.injectLoading();
24
+ const json = computed(() => JSON.stringify(data));
25
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <Skeleton
3
+ v-if="loading"
4
+ height="1.5rem"
5
+ />
6
+ <span
7
+ v-else-if="data"
8
+ v-tooltip.bottom="tooltip"
9
+ class="max-sm:select-none"
10
+ >{{ display }}</span>
11
+ <span v-else>-</span>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { computed } from "vue";
16
+ import { Skeleton } from "primevue";
17
+ import { useContext, useFormat } from "#imports";
18
+ const context = useContext();
19
+ const { asNumber } = useFormat();
20
+ const { data } = defineProps({
21
+ schema: { type: null, required: true },
22
+ data: { type: null, required: true }
23
+ });
24
+ const loading = context.injectLoading();
25
+ const display = computed(() => asNumber(data));
26
+ const tooltip = computed(() => display.value.shortened ? `${asNumber(data, { shorten: false })}` : null);
27
+ </script>
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ schema: any;
6
+ data: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_props: {
9
+ readonly schema: any;
10
+ readonly data: any;
11
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <Bake
3
+ :name="name"
4
+ :descriptor="descriptor"
5
+ :class="classes"
6
+ />
7
+ </template>
8
+
9
+ <script setup>
10
+ import { reactive } from "vue";
11
+ import { useRoute, useRuntimeConfig } from "#app";
12
+ import { useContext, useFormat, useHead, usePages } from "#imports";
13
+ import { Bake } from "#components";
14
+ const context = useContext();
15
+ const { asClasses } = useFormat();
16
+ const pages = usePages();
17
+ const route = useRoute();
18
+ const { public: { components } } = useRuntimeConfig();
19
+ useHead({ title: components?.Page?.title });
20
+ context.providePage(reactive({}));
21
+ const name = route.params?.baked === "" ? "index" : route.params?.baked.join("/");
22
+ const descriptor = await pages.fetch(name);
23
+ const classes = [asClasses("page"), asClasses(name, "b-route--")];
24
+ </script>
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,22 @@
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
+ $props: Partial<typeof __VLS_props>;
9
+ schema: any;
10
+ data: any;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ type __VLS_Slots = {
13
+ actions?: ((props: {}) => any) | undefined;
14
+ } & {
15
+ actions?: ((props: {}) => any) | undefined;
16
+ } & {
17
+ extra?: ((props: {}) => any) | undefined;
18
+ };
19
+ declare const __VLS_props: {
20
+ readonly schema: any;
21
+ readonly data: any;
22
+ };
@@ -0,0 +1,171 @@
1
+ <template>
2
+ <div
3
+ id="page-title"
4
+ class="
5
+ sticky -top-1 z-10 space-y-4 bg-body
6
+ max-md:space-y-0 max-lg:space-y-2
7
+ "
8
+ >
9
+ <div
10
+ class="
11
+ flex gap-2 items-start
12
+ md:max-xl:items-center
13
+ "
14
+ >
15
+ <div
16
+ class="
17
+ w-full mt-1
18
+ flex flex-row gap-2
19
+ items-baseline justify-start
20
+ xl:flex-col xl:mt-2
21
+ "
22
+ >
23
+ <div class="grid">
24
+ <h1 class="font-bold text-xl truncate">
25
+ {{ l(title) }}
26
+ </h1>
27
+ </div>
28
+ <div class="relative">
29
+ <div
30
+ data-testid="description"
31
+ class="
32
+ text-sm text-gray-600 dark:text-gray-400
33
+ text-nowrap overflow-hidden
34
+ hidden xl:grid
35
+ "
36
+ >
37
+ <span class="truncate">
38
+ {{ l(description) || '&nbsp;' }}
39
+ </span>
40
+ </div>
41
+ <Button
42
+ v-if="description"
43
+ v-tooltip.focus.bottom="{ value: l(description) }"
44
+ class="xl:hidden"
45
+ icon="pi pi-info-circle"
46
+ variant="text"
47
+ size="small"
48
+ rounded
49
+ />
50
+ </div>
51
+ </div>
52
+ <div
53
+ v-focustrap
54
+ class="
55
+ min-w-min flex gap-2 row-span-2 items-end text-nowrap
56
+ max-lg:text-sm md:max-xl:items-center xl:pt-6
57
+ "
58
+ >
59
+ <template v-if="isMd">
60
+ <Bake
61
+ v-for="action in actions"
62
+ :key="action.schema.name"
63
+ :name="`actions/${action.schema.name}`"
64
+ :descriptor="action"
65
+ />
66
+ <slot
67
+ v-if="$slots.actions"
68
+ name="actions"
69
+ />
70
+ </template>
71
+ <template v-else>
72
+ <Button
73
+ v-if="actions?.length > 0 || $slots.actions"
74
+ variant="text"
75
+ icon="pi pi-filter"
76
+ class="lg:hidden"
77
+ rounded
78
+ @click="togglePopover"
79
+ />
80
+ <PersistentPopover
81
+ ref="popover"
82
+ fixed
83
+ class="!z-[1002]"
84
+ >
85
+ <div
86
+ class="
87
+ flex flex-col flex-start
88
+ justify-between w-full
89
+ gap-4 text-sm px-2 py-2"
90
+ >
91
+ <Bake
92
+ v-for="action in actions"
93
+ :key="action.schema.name"
94
+ :name="`actions/${action.schema.name}`"
95
+ :descriptor="action"
96
+ />
97
+ <slot
98
+ v-if="$slots.actions"
99
+ name="actions"
100
+ />
101
+ </div>
102
+ </PersistentPopover>
103
+ </template>
104
+ </div>
105
+ </div>
106
+ <slot name="extra" />
107
+ </div>
108
+ </template>
109
+
110
+ <script setup>
111
+ import { onMounted, ref } from "vue";
112
+ import { Button } from "primevue";
113
+ import { useRuntimeConfig } from "#app";
114
+ import { Bake, PersistentPopover } from "#components";
115
+ import { useBreakpoints, useHead, useLocalization } from "#imports";
116
+ const { isMd } = useBreakpoints();
117
+ const { localize: l } = useLocalization();
118
+ const { public: { components } } = useRuntimeConfig();
119
+ const { schema } = defineProps({
120
+ schema: { type: null, required: true },
121
+ data: { type: null, default: null }
122
+ });
123
+ const { title, description, actions } = schema;
124
+ const popover = ref();
125
+ useHead({
126
+ title: components?.Page?.title ? `${components.Page.title} - ${title}` : title
127
+ });
128
+ onMounted(() => {
129
+ const el = document.querySelector("#page-title");
130
+ if (!el) {
131
+ return;
132
+ }
133
+ const observer = new IntersectionObserver(
134
+ ([e]) => {
135
+ toggleClasses(
136
+ e.target,
137
+ e.intersectionRatio < 1,
138
+ [
139
+ "-mx-4",
140
+ "px-4",
141
+ "pb-4",
142
+ "border-b",
143
+ "border-slate-300",
144
+ "dark:border-zinc-800",
145
+ "drop-shadow",
146
+ "md:max-xl:pt-4",
147
+ "max-md:pt-2"
148
+ ]
149
+ );
150
+ },
151
+ { threshold: [1] }
152
+ );
153
+ try {
154
+ observer.observe(el);
155
+ } catch (e) {
156
+ console.warn(e);
157
+ }
158
+ });
159
+ function toggleClasses(element, toggle, classes) {
160
+ for (const cls of classes) {
161
+ element.classList.toggle(cls, toggle);
162
+ }
163
+ }
164
+ function togglePopover(event) {
165
+ popover.value.toggle(event);
166
+ }
167
+ </script>
168
+
169
+ <style scoped>
170
+ .sticky{top:-1px}
171
+ </style>