@mouseless/baked 1.8.6 → 1.9.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 (52) hide show
  1. package/dist/module.d.mts +5 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +5 -2
  4. package/dist/runtime/assets/components.css +2 -2
  5. package/dist/runtime/components/Check.d.vue.ts +13 -0
  6. package/dist/runtime/components/Check.vue +28 -0
  7. package/dist/runtime/components/Check.vue.d.ts +13 -0
  8. package/dist/runtime/components/Date.d.vue.ts +21 -0
  9. package/dist/runtime/components/Date.vue +41 -0
  10. package/dist/runtime/components/Date.vue.d.ts +21 -0
  11. package/dist/runtime/components/InputCheckbox.d.vue.ts +25 -0
  12. package/dist/runtime/components/InputCheckbox.vue +59 -0
  13. package/dist/runtime/components/InputCheckbox.vue.d.ts +25 -0
  14. package/dist/runtime/components/InputDate.d.vue.ts +25 -0
  15. package/dist/runtime/components/InputDate.vue +94 -0
  16. package/dist/runtime/components/InputDate.vue.d.ts +25 -0
  17. package/dist/runtime/components/InputMailAddress.d.vue.ts +25 -0
  18. package/dist/runtime/components/InputMailAddress.vue +49 -0
  19. package/dist/runtime/components/InputMailAddress.vue.d.ts +25 -0
  20. package/dist/runtime/components/InputMoney.d.vue.ts +25 -0
  21. package/dist/runtime/components/InputMoney.vue +53 -0
  22. package/dist/runtime/components/InputMoney.vue.d.ts +25 -0
  23. package/dist/runtime/components/InputRate.d.vue.ts +25 -0
  24. package/dist/runtime/components/InputRate.vue +86 -0
  25. package/dist/runtime/components/InputRate.vue.d.ts +25 -0
  26. package/dist/runtime/components/InputText.vue +1 -1
  27. package/dist/runtime/components/InputUrl.d.vue.ts +25 -0
  28. package/dist/runtime/components/InputUrl.vue +59 -0
  29. package/dist/runtime/components/InputUrl.vue.d.ts +25 -0
  30. package/dist/runtime/components/MissingComponent.vue +4 -4
  31. package/dist/runtime/components/MultiSelect.d.vue.ts +33 -0
  32. package/dist/runtime/components/MultiSelect.vue +98 -0
  33. package/dist/runtime/components/MultiSelect.vue.d.ts +33 -0
  34. package/dist/runtime/components/MultiSelectButton.d.vue.ts +33 -0
  35. package/dist/runtime/components/MultiSelectButton.vue +74 -0
  36. package/dist/runtime/components/MultiSelectButton.vue.d.ts +33 -0
  37. package/dist/runtime/components/NavLink.vue +13 -12
  38. package/dist/runtime/components/Select.vue +16 -39
  39. package/dist/runtime/components/SelectButton.vue +14 -37
  40. package/dist/runtime/components/TextLink.d.vue.ts +21 -0
  41. package/dist/runtime/components/TextLink.vue +43 -0
  42. package/dist/runtime/components/TextLink.vue.d.ts +21 -0
  43. package/dist/runtime/components/Textarea.d.vue.ts +25 -0
  44. package/dist/runtime/components/Textarea.vue +36 -0
  45. package/dist/runtime/components/Textarea.vue.d.ts +25 -0
  46. package/dist/runtime/composables/useInputValidator.d.ts +20 -0
  47. package/dist/runtime/composables/useInputValidator.js +111 -0
  48. package/dist/runtime/composables/useSelection.d.ts +13 -0
  49. package/dist/runtime/composables/useSelection.js +94 -0
  50. package/dist/runtime/composables/useToken.js +8 -2
  51. package/dist/types.d.mts +1 -1
  52. package/package.json +16 -15
package/dist/module.d.mts CHANGED
@@ -12,6 +12,7 @@ interface ModuleOptions {
12
12
  interface Components {
13
13
  Page?: PageOptions;
14
14
  NavLink?: NavLinkOptions;
15
+ InputMoney?: InputMoneyOptions;
15
16
  }
16
17
  interface PageOptions {
17
18
  title?: String;
@@ -25,6 +26,9 @@ interface NavLinkOptions {
25
26
  hide?: number;
26
27
  };
27
28
  }
29
+ interface InputMoneyOptions {
30
+ icon?: String;
31
+ }
28
32
  interface PrimeVueOptions {
29
33
  theme: any;
30
34
  locale?: any;
@@ -60,4 +64,4 @@ interface ScreenOptions {
60
64
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
61
65
 
62
66
  export { _default as default };
63
- export type { CacheOptions, Components, Composables, ModuleOptions, NavLinkOptions, PageOptions, Plugins, PrimeVueOptions, RetryOptions, ScreenOptions, UseBreakpointsOptions, UseDataFetcherOptions, UseFormatOptions };
67
+ export type { CacheOptions, Components, Composables, InputMoneyOptions, ModuleOptions, NavLinkOptions, PageOptions, Plugins, PrimeVueOptions, RetryOptions, ScreenOptions, UseBreakpointsOptions, UseDataFetcherOptions, UseFormatOptions };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
3
  "configKey": "baked",
4
- "version": "1.8.6",
4
+ "version": "1.9.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -12,7 +12,7 @@ const module$1 = defineNuxtModule({
12
12
  defaults: {},
13
13
  moduleDependencies: {
14
14
  "@nuxtjs/i18n": {
15
- version: "10.5.0",
15
+ version: "10.6.0",
16
16
  defaults: {
17
17
  strategy: "no_prefix",
18
18
  detectBrowserLanguage: {
@@ -37,7 +37,7 @@ const module$1 = defineNuxtModule({
37
37
  rootDir: createResolver(_nuxt.options.rootDir)
38
38
  };
39
39
  const appJsonPath = pathToFileURL(resolver.rootDir.resolve("./.baked/app.json"));
40
- const app = (await import(appJsonPath.href, { with: { type: 'json' } })).default;
40
+ const app = (await import(appJsonPath.href, { with: { type: "json" } })).default;
41
41
  _options.composables.useBreakpoints ||= {};
42
42
  _options.composables.useBreakpoints.screens ||= {
43
43
  "2xs": "340px",
@@ -49,6 +49,9 @@ const module$1 = defineNuxtModule({
49
49
  "2xl": "1536px",
50
50
  "3xl": "1920px"
51
51
  };
52
+ _options.components ||= {};
53
+ _options.components.InputMoney ||= {};
54
+ _options.components.InputMoney.icon ||= "pi-dollar";
52
55
  _nuxt.options.runtimeConfig.public.error = app?.error;
53
56
  _nuxt.options.runtimeConfig.public.inlineError = app?.inlineError;
54
57
  _nuxt.options.runtimeConfig.public.primevue = _options.primevue;
@@ -1,4 +1,4 @@
1
- @reference "./theme.css";@layer utilities{html{@apply max-xs:text-[smaller]}.bg-body,html{@apply bg-white dark:bg-zinc-925}.p-panel-content:has(.b-component--DataContainer) .b-component--DataContainer{@apply border-none rounded-none}.b-component--DataContainer div{@apply [&:has(.p-datatable)]:p-0}.b-component--DataContainer .p-button{@apply self-stretch}.b-component--DataContainer .p-button .p-button-icon+.p-button-label{@apply max-sm:hidden}.b-component--DataTable .p-datatable-tbody td.p-datatable-frozen-column{background:inherit}.b-component--DataContainer:has(.b-component--DataTable) .b-component--DataTable,.p-panel-content:has(.b-component--DataTable) .b-component--DataTable{@apply border-none rounded-none}.b-component--DataContainer:has(.b-component--DataTable) .b-component--DataTable .p-datatable-table-container,.p-panel-content:has(.b-component--DataTable) .b-component--DataTable .p-datatable-table-container{@apply border-none}.b-component--DataTable{@apply border border-slate-200 dark:border-zinc-700 justify-self-center w-full rounded-datatable}.b-component--DataTable .p-datatable-table-container{@apply border-none rounded-datatable}.b-component--DataTable:has(.p-datatable-paginator-bottom) .p-datatable-paginator-bottom{@apply border-t rounded-t-none rounded-b-datatable border-b-0}.b-component--DataTable:has(.p-datatable-paginator-bottom) .p-datatable-table-container{@apply rounded-b-none}.b-component--DataTable tbody>tr:last-child>td{@apply border-b-0}.b-component--DataTable tfoot>tr>td{@apply border-t}.b-component--DataTable .b-label-column--wide{@apply 3xl:w-[30%] 2xl:w-[20%] xl:w-[15%]}.b-component--DataTable .b-label-column--narrow{@apply 3xl:w-[40%] 2xl:w-[30%] xl:w-[20%]}.b-component--DataTable a{@apply text-sm}.b-component--DataTable .p-button{@apply -my-2}.b-component--DataTable td.p-datatable-frozen-column{@apply z-[1]}.b-component--DataTable .p-datatable-thead{@apply z-[2]}.b-component--DataPanel .p-panel-content{@apply [&:has(.p-datatable)]:p-0}.b-component--FormPage .reset-min-w *{@apply min-w-0}.p-iftalabel:has(.p-selectbutton){@apply mt-4}.b-component--Message.message-outlined{@apply border rounded-md}.b-component--Message.message-outlined .b-message-body{@apply py-[0.50rem] px-[0.75rem] min-w-[10rem] min-h-[1.5rem]}.b-component--Message.message-simple{@apply !bg-transparent}.b-component--Message.message-simple .b-message-icon{@apply text-sm}.b-component--Message.message-simple .b-message-body{@apply px-0}.b-component--Message.message-info{@apply bg-blue-50/95 text-blue-600 border-blue-200
1
+ @reference "./theme.css";@layer utilities{html{@apply max-xs:text-[smaller]}.bg-body,html{@apply bg-white dark:bg-zinc-925}.p-panel-content:has(.b-component--DataContainer) .b-component--DataContainer{@apply border-none rounded-none}.b-component--DataContainer div{@apply [&:has(.p-datatable)]:p-0}.b-component--DataContainer .p-button{@apply self-stretch}.b-component--DataContainer .p-button .p-button-icon+.p-button-label{@apply max-sm:hidden}.b-component--DataTable .p-datatable-tbody td.p-datatable-frozen-column{background:inherit}.b-component--DataContainer:has(.b-component--DataTable) .b-component--DataTable,.p-panel-content:has(.b-component--DataTable) .b-component--DataTable{@apply border-none rounded-none}.b-component--DataContainer:has(.b-component--DataTable) .b-component--DataTable .p-datatable-table-container,.p-panel-content:has(.b-component--DataTable) .b-component--DataTable .p-datatable-table-container{@apply border-none}.b-component--DataTable{@apply border border-slate-200 dark:border-zinc-700 justify-self-center w-full rounded-datatable}.b-component--DataTable .p-datatable-table-container{@apply border-none rounded-datatable}.b-component--DataTable:has(.p-datatable-paginator-bottom) .p-datatable-paginator-bottom{@apply border-t rounded-t-none rounded-b-datatable border-b-0}.b-component--DataTable:has(.p-datatable-paginator-bottom) .p-datatable-table-container{@apply rounded-b-none}.b-component--DataTable tbody>tr:last-child>td{@apply border-b-0}.b-component--DataTable tfoot>tr>td{@apply border-t}.b-component--DataTable .b-label-column--wide{@apply 3xl:w-[30%] 2xl:w-[20%] xl:w-[15%]}.b-component--DataTable .b-label-column--narrow{@apply 3xl:w-[40%] 2xl:w-[30%] xl:w-[20%]}.b-component--DataTable a{@apply text-sm}.b-component--DataTable .p-button{@apply -my-2}.b-component--DataTable td.p-datatable-frozen-column{@apply z-[1]}.b-component--DataTable .p-datatable-thead{@apply z-[2]}.b-component--DataPanel .p-panel-content{@apply [&:has(.p-datatable)]:p-0}.b-component--FormPage .reset-min-w *{@apply min-w-0}.b-component--FormPage .grid .flex:has(.b-component--InputCheckbox):not(.b-input-group){@apply self-center}.b-component--InputCheckbox .p-iftalabel{@apply cursor-auto}.b-component--InputCheckbox .p-checkbox-lg+label{@apply text-sm -mt-1.5 ml-2 relative top-0 left-0 pointer-events-auto select-none cursor-pointer self-center}.p-iftalabel:has(.p-selectbutton){@apply mt-4}.b-component--Message.message-outlined{@apply border rounded-md}.b-component--Message.message-outlined .b-message-body{@apply py-[0.50rem] px-[0.75rem] min-w-[10rem] min-h-[1.5rem]}.b-component--Message.message-simple{@apply !bg-transparent}.b-component--Message.message-simple .b-message-icon{@apply text-sm}.b-component--Message.message-simple .b-message-body{@apply px-0}.b-component--Message.message-info{@apply bg-blue-50/95 text-blue-600 border-blue-200
2
2
  dark:bg-blue-950/95 dark:text-blue-500 dark:border-blue-700/65}.b-component--Message.message-error{@apply bg-red-50/95 text-red-600 border-red-200
3
3
  dark:bg-red-950/95 dark:text-red-500 dark:border-red-700/65}.b-component--Message.message-warn{@apply bg-yellow-50/95 text-yellow-600 border-yellow-200
4
4
  dark:bg-yellow-950/95 dark:text-yellow-500 dark:border-yellow-700/65}.b-component--Message.message-success{@apply bg-green-50/95 text-green-600 border-green-200
@@ -6,4 +6,4 @@
6
6
  dark:text-zinc-400 dark:border-zinc-400}.b-component--Message.message-contrast{@apply bg-transparent text-slate-950 border-slate-950
7
7
  dark:text-white dark:border-white}.c--missing-component-dialog code:not(:has(pre)){@apply rounded p-1 text-xs bg-zinc-50 text-orange-700
8
8
  dark:bg-zinc-950 dark:text-orange-400}.c--missing-component-dialog pre{@apply block rounded-lg overflow-auto max-h-[20em]
9
- bg-zinc-950 p-4 text-xs text-sky-300}.c--missing-component-dialog pre .c--code-comment{@apply text-green-800}.c--missing-component-dialog pre .c--code-string{@apply text-orange-400}.c--missing-component-dialog pre .c--code-keyword{@apply text-purple-400}.c--missing-component-dialog pre .c--code-symbol{@apply text-gray-100}.c--missing-component-dialog pre .c--code-type{@apply text-blue-400}.c--missing-component-dialog pre .c--code-method{@apply text-yellow-100}.p-scrolltop{@apply right-6 bottom-6 max-md:bottom-24 py-icon-only-width}.b-component--Select .p-placeholder{@apply opacity-0}.b-component--Select .p-select-label{@apply text-[length:inherit]}.p-popover-content .b-component--Select{@apply max-md:w-full}.b-component--SelectButton .p-togglebutton-content{@apply whitespace-nowrap}.p-popover-content .b-component--SelectButton .p-selectbutton,.p-popover-content .b-component--SelectButton.p-selectbutton{@apply max-sm:flex max-sm:flex-col}.p-popover-content .b-component--SelectButton .p-selectbutton .p-togglebutton:first-child,.p-popover-content .b-component--SelectButton.p-selectbutton .p-togglebutton:first-child{@apply max-sm:rounded-t-lg max-sm:rounded-es-none}.p-popover-content .b-component--SelectButton .p-selectbutton .p-togglebutton:last-child,.p-popover-content .b-component--SelectButton.p-selectbutton .p-togglebutton:last-child{@apply max-sm:rounded-b-lg max-sm:rounded-se-none}.b-component--SimpleForm.horizontal :has(.p-iftalabel) .p-button[data-p=large]{@apply mt-1}.b-component--SimpleForm.horizontal :has(.p-iftalabel) .p-button:not([data-p=large]){@apply mt-2}.b-component--PageSize .p-select-label{@apply text-[length:inherit]}.b-component--PageTitle .p-button{@apply self-stretch}.b-component--PageTitle .p-button .p-button-icon+.p-button-label{@apply max-sm:hidden}.p-popover-content>div{@apply max-sm:p-0}}
9
+ bg-zinc-950 p-4 text-xs text-sky-300}.c--missing-component-dialog pre .c--code-comment{@apply text-green-800}.c--missing-component-dialog pre .c--code-string{@apply text-orange-400}.c--missing-component-dialog pre .c--code-keyword{@apply text-purple-400}.c--missing-component-dialog pre .c--code-symbol{@apply text-gray-100}.c--missing-component-dialog pre .c--code-type{@apply text-blue-400}.c--missing-component-dialog pre .c--code-method{@apply text-yellow-100}.b-component--MultiSelect .p-placeholder{@apply opacity-0}.b-component--MultiSelect .p-multiselect-label{font-size:inherit}.p-popover-content .b-component--MultiSelectButton.p-selectbutton{@apply max-sm:flex-col}.p-popover-content .b-component--MultiSelectButton.p-selectbutton .p-togglebutton:first-child{@apply max-sm:rounded-t-lg max-sm:rounded-es-none}.p-popover-content .b-component--MultiSelectButton.p-selectbutton .p-togglebutton:last-child{@apply max-sm:rounded-b-lg max-sm:rounded-se-none}.b-component--MultiSelectButton:has(.p-iftalabel) .p-iftalabel{@apply mt-4}@media (hover:none){.b-component--NavLink .popover-icon{@apply flex -ml-1}}.b-component--PageTitle .grid+.relative>div:has(.b-component--NavLink)>span:first-child{@apply hidden}.p-scrolltop{@apply right-6 bottom-6 max-md:bottom-24 py-icon-only-width}.b-component--Select .p-placeholder{@apply opacity-0}.b-component--Select .p-select-label{@apply text-[length:inherit]}.p-popover-content .b-component--Select{@apply max-md:w-full}.b-component--SelectButton .p-togglebutton-content{@apply whitespace-nowrap}.p-popover-content .b-component--SelectButton .p-selectbutton,.p-popover-content .b-component--SelectButton.p-selectbutton{@apply max-sm:flex max-sm:flex-col}.p-popover-content .b-component--SelectButton .p-selectbutton .p-togglebutton:first-child,.p-popover-content .b-component--SelectButton.p-selectbutton .p-togglebutton:first-child{@apply max-sm:rounded-t-lg max-sm:rounded-es-none}.p-popover-content .b-component--SelectButton .p-selectbutton .p-togglebutton:last-child,.p-popover-content .b-component--SelectButton.p-selectbutton .p-togglebutton:last-child{@apply max-sm:rounded-b-lg max-sm:rounded-se-none}.b-component--SimpleForm.horizontal :has(.p-iftalabel) .p-button[data-p=large]{@apply mt-1}.b-component--SimpleForm.horizontal :has(.p-iftalabel) .p-button:not([data-p=large]){@apply mt-2}.b-component--PageSize .p-select-label{@apply text-[length:inherit]}.b-component--PageTitle .p-button{@apply self-stretch}.b-component--PageTitle .p-button .p-button-icon+.p-button-label{@apply max-sm:hidden}.p-popover-content>div{@apply max-sm:p-0}}
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
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>;
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <AwaitLoading>
3
+ <span v-if="data === true">
4
+ <i
5
+ class="
6
+ text-xs pi pi-check
7
+ text-green-600 dark:text-green-400
8
+ "
9
+ />
10
+ </span>
11
+ <span v-else-if="data === false">
12
+ <i
13
+ class="
14
+ text-xs pi pi-times
15
+ text-red-600 dark:text-red-400
16
+ "
17
+ />
18
+ </span>
19
+ <span v-else>-</span>
20
+ </AwaitLoading>
21
+ </template>
22
+
23
+ <script setup>
24
+ import { AwaitLoading } from "#components";
25
+ defineProps({
26
+ data: { type: null, required: true }
27
+ });
28
+ </script>
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
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>;
@@ -0,0 +1,21 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ data: {
9
+ type: null;
10
+ 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>;
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <AwaitLoading :skeleton="{ height: '1.5rem' }">
3
+ <span v-if="data">{{ text }}</span>
4
+ <span v-else>-</span>
5
+ </AwaitLoading>
6
+ </template>
7
+
8
+ <script setup>
9
+ import { computed } from "vue";
10
+ import AwaitLoading from "./AwaitLoading";
11
+ const { schema, data: rawData } = defineProps({
12
+ schema: { type: null, required: true },
13
+ data: { type: null, required: true }
14
+ });
15
+ const { prop, format = "dd/MM/yyyy" } = schema;
16
+ const data = computed(() => {
17
+ if (!rawData) {
18
+ return null;
19
+ }
20
+ if (prop) {
21
+ return rawData[prop];
22
+ }
23
+ return rawData;
24
+ });
25
+ const text = computed(() => {
26
+ if (!data.value || !format) {
27
+ return data.value;
28
+ }
29
+ const date = new Date(data.value);
30
+ if (isNaN(date.getTime())) {
31
+ return data.value;
32
+ }
33
+ const dd = String(date.getDate()).padStart(2, "0");
34
+ const MM = String(date.getMonth() + 1).padStart(2, "0");
35
+ const yyyy = String(date.getFullYear());
36
+ const HH = String(date.getHours()).padStart(2, "0");
37
+ const mm = String(date.getMinutes()).padStart(2, "0");
38
+ const ss = String(date.getSeconds()).padStart(2, "0");
39
+ return format.replace("dd", dd).replace("MM", MM).replace("yyyy", yyyy).replace("HH", HH).replace("mm", mm).replace("ss", ss);
40
+ });
41
+ </script>
@@ -0,0 +1,21 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ data: {
9
+ type: null;
10
+ 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>;
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <AwaitLoading
3
+ :skeleton="{
4
+ height: label.mode === 'ifta' ? '3.6rem' : '2.6rem',
5
+ class: 'min-w-24'
6
+ }"
7
+ >
8
+ <div class="flex items-center gap-2 justify-start min-h-10">
9
+ <Validation>
10
+ <Labeler
11
+ :label
12
+ :path
13
+ class="w-full cursor-pointer text-slate-500 dark:text-zinc-400"
14
+ :dt="{
15
+ colorScheme: {
16
+ light: {
17
+ ['position.x']: '2rem'
18
+ },
19
+ dark: {
20
+ ['position.x']: '2rem'
21
+ }
22
+ }
23
+ }"
24
+ >
25
+ <Checkbox
26
+ v-model="checkboxModel"
27
+ :input-id="path"
28
+ binary
29
+ size="large"
30
+ :indeterminate="indeterminate && checkboxModel === undefined"
31
+ />
32
+ </Labeler>
33
+ </Validation>
34
+ </div>
35
+ </AwaitLoading>
36
+ </template>
37
+
38
+ <script setup>
39
+ import { computed, watch } from "vue";
40
+ import { Checkbox } from "primevue";
41
+ import { useContext } from "#imports";
42
+ import { AwaitLoading, Labeler, Validation } from "#components";
43
+ const context = useContext();
44
+ const { schema } = defineProps({
45
+ schema: { type: null, required: true }
46
+ });
47
+ const model = defineModel({ type: null, required: true });
48
+ const { label, indeterminate } = schema;
49
+ const path = context.injectPath();
50
+ const checkboxModel = computed({
51
+ get: () => model.value,
52
+ set: (value) => model.value = indeterminate && model.value === false && value === true ? void 0 : value
53
+ });
54
+ watch(model, (newValue) => {
55
+ if (typeof newValue === "string") {
56
+ model.value = newValue === "true";
57
+ }
58
+ });
59
+ </script>
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <AwaitLoading
3
+ :skeleton="{
4
+ height: label.mode === 'ifta' ? '3.6rem' : '2.6rem',
5
+ class: 'min-w-60'
6
+ }"
7
+ >
8
+ <Validation>
9
+ <Labeler
10
+ :label
11
+ :path
12
+ class="w-full"
13
+ >
14
+ <InputMask
15
+ v-if="!usePicker"
16
+ :id="path"
17
+ v-model="inputModel"
18
+ v-bind="$attrs"
19
+ slot-char="__/__/____"
20
+ :mask
21
+ placeholder="__/__/____"
22
+ :unmask="true"
23
+ :auto-clear="false"
24
+ class="min-w-60"
25
+ @update:model-value="onUpdateInputModel"
26
+ />
27
+ <DatePicker
28
+ v-else
29
+ :id="path"
30
+ v-model="inputModel"
31
+ v-bind="$attrs"
32
+ placeholder="__/__/____"
33
+ class="min-w-60"
34
+ update-model-type="string"
35
+ :date-format="format"
36
+ show-icon
37
+ @update:model-value="onUpdateInputModel"
38
+ />
39
+ </Labeler>
40
+ </Validation>
41
+ </AwaitLoading>
42
+ </template>
43
+
44
+ <script setup>
45
+ import { ref, watch } from "vue";
46
+ import { InputMask, DatePicker } from "primevue";
47
+ import { useContext, useInputValidator } from "#imports";
48
+ import { AwaitLoading, Labeler, Validation } from "#components";
49
+ const context = useContext();
50
+ const { date: validator } = useInputValidator();
51
+ const { schema } = defineProps({
52
+ schema: { type: null, required: true }
53
+ });
54
+ const model = defineModel({ type: null, required: true });
55
+ const { label, format = "dd/MM/yyyy", usePicker } = schema;
56
+ const path = context.injectPath();
57
+ const mask = format?.replace(/[dMy]/g, "9");
58
+ const inputModel = ref("");
59
+ watch(model, (newModel) => {
60
+ const value = fromAPIFormat(newModel);
61
+ const valid = validator.validate(value, { silent: true });
62
+ if (!valid) {
63
+ return;
64
+ }
65
+ if (usePicker) {
66
+ const { dd, mm, yyyy } = toFormat(value);
67
+ inputModel.value = `${dd}/${mm}/${yyyy}`;
68
+ return;
69
+ }
70
+ inputModel.value = value;
71
+ }, { immediate: true });
72
+ function onUpdateInputModel(value) {
73
+ const val = String(value || "").replace(/\D/g, "");
74
+ const valid = validator.validate(val);
75
+ model.value = valid ? toAPIFormat(val) : null;
76
+ }
77
+ function toAPIFormat(value) {
78
+ const { dd, mm, yyyy } = toFormat(value);
79
+ return `${yyyy}-${mm}-${dd}`;
80
+ }
81
+ function fromAPIFormat(value) {
82
+ if (!value) {
83
+ return;
84
+ }
85
+ const [yyyy, MM, dd] = value.split("-");
86
+ return [dd, MM, yyyy].join("");
87
+ }
88
+ function toFormat(value) {
89
+ const dd = value.slice(0, 2);
90
+ const mm = value.slice(2, 4);
91
+ const yyyy = value.slice(4, 8);
92
+ return { dd, mm, yyyy };
93
+ }
94
+ </script>
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <AwaitLoading
3
+ :skeleton="{
4
+ height: label.mode === 'ifta' ? '3.6rem' : '2.6rem',
5
+ class: 'min-w-60'
6
+ }"
7
+ >
8
+ <Validation>
9
+ <Labeler
10
+ :label
11
+ :path
12
+ class="w-full"
13
+ >
14
+ <InputText
15
+ :id="path"
16
+ v-model="inputModel"
17
+ type="email"
18
+ v-bind="$attrs"
19
+ placeholder="___@___.___"
20
+ class="min-w-60"
21
+ @input="onInput"
22
+ />
23
+ </Labeler>
24
+ </Validation>
25
+ </AwaitLoading>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { ref, watch } from "vue";
30
+ import { InputText } from "primevue";
31
+ import { useContext, useInputValidator } from "#imports";
32
+ import { AwaitLoading, Labeler, Validation } from "#components";
33
+ const context = useContext();
34
+ const { mailAddress: validator } = useInputValidator();
35
+ const { schema } = defineProps({
36
+ schema: { type: null, required: true }
37
+ });
38
+ const model = defineModel({ type: null, required: true });
39
+ const { label } = schema;
40
+ const path = context.injectPath();
41
+ const inputModel = ref("");
42
+ watch(model, (newModel) => {
43
+ inputModel.value = validator.validate(newModel, { silent: true }) ? newModel : inputModel.value;
44
+ }, { immediate: true });
45
+ function onInput(event) {
46
+ const valid = validator.validate(event.target.value);
47
+ model.value = valid ? event.target.value : null;
48
+ }
49
+ </script>
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ schema: {
5
+ type: null;
6
+ required: true;
7
+ };
8
+ modelValue: {
9
+ type: import("vue").PropType<any>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: any) => any;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ schema: {
16
+ type: null;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: import("vue").PropType<any>;
21
+ required: true;
22
+ };
23
+ }>> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;