@atscript/vue-form 0.1.58

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 (190) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/dist/as-action-71f9E_bL.cjs +208 -0
  4. package/dist/as-action-DU17rykn.mjs +203 -0
  5. package/dist/as-action.cjs +2 -0
  6. package/dist/as-action.d.cts +2 -0
  7. package/dist/as-action.d.mts +2 -0
  8. package/dist/as-action.mjs +2 -0
  9. package/dist/as-action.vue-BdbAOZCL.d.cts +13 -0
  10. package/dist/as-action.vue-CmY3eil1.d.mts +13 -0
  11. package/dist/as-adornment-shell-9UmdNIPR.cjs +97 -0
  12. package/dist/as-adornment-shell-knFiB7Ct.mjs +92 -0
  13. package/dist/as-array-Bn27x9cq.cjs +466 -0
  14. package/dist/as-array-DwarTaKP.mjs +455 -0
  15. package/dist/as-array-clear-btn-DAGervXL.cjs +48 -0
  16. package/dist/as-array-clear-btn-DIhzCKC9.mjs +43 -0
  17. package/dist/as-array.cjs +11 -0
  18. package/dist/as-array.d.cts +2 -0
  19. package/dist/as-array.d.mts +2 -0
  20. package/dist/as-array.mjs +11 -0
  21. package/dist/as-array.vue-C5r_ycIa.d.mts +9 -0
  22. package/dist/as-array.vue-CeBZRVm7.d.cts +9 -0
  23. package/dist/as-checkbox-B_9mwla6.mjs +285 -0
  24. package/dist/as-checkbox-DXGTVHPE.cjs +296 -0
  25. package/dist/as-checkbox.cjs +6 -0
  26. package/dist/as-checkbox.d.cts +2 -0
  27. package/dist/as-checkbox.d.mts +2 -0
  28. package/dist/as-checkbox.mjs +6 -0
  29. package/dist/as-checkbox.vue-BL53Xjmi.d.mts +9 -0
  30. package/dist/as-checkbox.vue-Da1KVG5J.d.cts +9 -0
  31. package/dist/as-collapsible-CqxeJut7.cjs +148 -0
  32. package/dist/as-collapsible-DtNCofNT.mjs +143 -0
  33. package/dist/as-date-C7tFQDkh.mjs +253 -0
  34. package/dist/as-date-k3MW3dmA.cjs +258 -0
  35. package/dist/as-date.cjs +8 -0
  36. package/dist/as-date.d.cts +2 -0
  37. package/dist/as-date.d.mts +2 -0
  38. package/dist/as-date.mjs +8 -0
  39. package/dist/as-date.vue-C5JaS3Sd.d.mts +9 -0
  40. package/dist/as-date.vue-e2ewS_V4.d.cts +9 -0
  41. package/dist/as-datetime-C030mzI5.cjs +258 -0
  42. package/dist/as-datetime-elcOoDT5.mjs +253 -0
  43. package/dist/as-datetime.cjs +8 -0
  44. package/dist/as-datetime.d.cts +2 -0
  45. package/dist/as-datetime.d.mts +2 -0
  46. package/dist/as-datetime.mjs +8 -0
  47. package/dist/as-datetime.vue-ClsSnJSV.d.mts +9 -0
  48. package/dist/as-datetime.vue-vfHFsby6.d.cts +9 -0
  49. package/dist/as-decimal-BJIGgPXU.cjs +711 -0
  50. package/dist/as-decimal-DtXjFPhe.mjs +694 -0
  51. package/dist/as-decimal.cjs +7 -0
  52. package/dist/as-decimal.d.cts +2 -0
  53. package/dist/as-decimal.d.mts +2 -0
  54. package/dist/as-decimal.mjs +7 -0
  55. package/dist/as-decimal.vue-B1pEKdjM.d.cts +25 -0
  56. package/dist/as-decimal.vue-CSCtYRRa.d.mts +25 -0
  57. package/dist/as-field-CXVjrEPQ.mjs +481 -0
  58. package/dist/as-field-shell-B2iTn-iM.cjs +346 -0
  59. package/dist/as-field-shell-Pdy3sAvr.mjs +341 -0
  60. package/dist/as-field-shell.cjs +5 -0
  61. package/dist/as-field-shell.d.cts +2 -0
  62. package/dist/as-field-shell.d.mts +2 -0
  63. package/dist/as-field-shell.mjs +5 -0
  64. package/dist/as-field-shell.vue-Ddnp8KxY.d.mts +37 -0
  65. package/dist/as-field-shell.vue-Dmt05vGD.d.cts +37 -0
  66. package/dist/as-field-wLYoaZnT.cjs +498 -0
  67. package/dist/as-field.cjs +4 -0
  68. package/dist/as-field.d.cts +25 -0
  69. package/dist/as-field.d.mts +26 -0
  70. package/dist/as-field.mjs +4 -0
  71. package/dist/as-form-CWwgyvfw.mjs +425 -0
  72. package/dist/as-form-DAIkyt7H.cjs +448 -0
  73. package/dist/as-form.cjs +7 -0
  74. package/dist/as-form.d.cts +2 -0
  75. package/dist/as-form.d.mts +2 -0
  76. package/dist/as-form.mjs +7 -0
  77. package/dist/as-form.vue-B4Bn0pbC.d.cts +158 -0
  78. package/dist/as-form.vue-DRrb_yoj.d.mts +158 -0
  79. package/dist/as-input-CpbV2k3s.cjs +231 -0
  80. package/dist/as-input-DIa8BzLv.mjs +226 -0
  81. package/dist/as-input-control-BzELjheN.mjs +266 -0
  82. package/dist/as-input-control-C5-DelZT.cjs +271 -0
  83. package/dist/as-input.cjs +8 -0
  84. package/dist/as-input.d.cts +2 -0
  85. package/dist/as-input.d.mts +2 -0
  86. package/dist/as-input.mjs +8 -0
  87. package/dist/as-input.vue-11ldp9uT.d.cts +17 -0
  88. package/dist/as-input.vue-fUhcvfv2.d.mts +17 -0
  89. package/dist/as-iterator-BYMNe6UJ.cjs +61 -0
  90. package/dist/as-iterator-CT5y1jyn.mjs +56 -0
  91. package/dist/as-iterator.cjs +5 -0
  92. package/dist/as-iterator.d.cts +14 -0
  93. package/dist/as-iterator.d.mts +15 -0
  94. package/dist/as-iterator.mjs +5 -0
  95. package/dist/as-number-BA55JIq1.cjs +387 -0
  96. package/dist/as-number-JPEwPK8Q.mjs +376 -0
  97. package/dist/as-number.cjs +8 -0
  98. package/dist/as-number.d.cts +2 -0
  99. package/dist/as-number.d.mts +2 -0
  100. package/dist/as-number.mjs +8 -0
  101. package/dist/as-number.vue-Bk-W7Vwv.d.mts +26 -0
  102. package/dist/as-number.vue-C2Aih98s.d.cts +26 -0
  103. package/dist/as-object-CT6lNEqt.mjs +300 -0
  104. package/dist/as-object-qUL7l8V1.cjs +305 -0
  105. package/dist/as-object.cjs +11 -0
  106. package/dist/as-object.d.cts +2 -0
  107. package/dist/as-object.d.mts +2 -0
  108. package/dist/as-object.mjs +11 -0
  109. package/dist/as-object.vue-CKwMyM_F.d.cts +13 -0
  110. package/dist/as-object.vue-Cg52b61-.d.mts +13 -0
  111. package/dist/as-paragraph-BGO-j4US.cjs +203 -0
  112. package/dist/as-paragraph-jIG_dg7_.mjs +198 -0
  113. package/dist/as-paragraph.cjs +2 -0
  114. package/dist/as-paragraph.d.cts +2 -0
  115. package/dist/as-paragraph.d.mts +2 -0
  116. package/dist/as-paragraph.mjs +2 -0
  117. package/dist/as-paragraph.vue-BDt0pBG-.d.cts +9 -0
  118. package/dist/as-paragraph.vue-C3FgTEt5.d.mts +9 -0
  119. package/dist/as-radio-B1N-gmoI.mjs +242 -0
  120. package/dist/as-radio-U3OK7bTg.cjs +247 -0
  121. package/dist/as-radio.cjs +6 -0
  122. package/dist/as-radio.d.cts +2 -0
  123. package/dist/as-radio.d.mts +2 -0
  124. package/dist/as-radio.mjs +6 -0
  125. package/dist/as-radio.vue-D_fweoN1.d.mts +9 -0
  126. package/dist/as-radio.vue-ZC4kLBnT.d.cts +9 -0
  127. package/dist/as-ref-CIifSSCQ.mjs +337 -0
  128. package/dist/as-ref-SImaIrwK.cjs +342 -0
  129. package/dist/as-ref.cjs +7 -0
  130. package/dist/as-ref.d.cts +2 -0
  131. package/dist/as-ref.d.mts +2 -0
  132. package/dist/as-ref.mjs +7 -0
  133. package/dist/as-ref.vue-BNeQeQpO.d.cts +9 -0
  134. package/dist/as-ref.vue-Cr5jeNDn.d.mts +9 -0
  135. package/dist/as-select-BB3uxACS.cjs +246 -0
  136. package/dist/as-select-UBGCVhku.mjs +241 -0
  137. package/dist/as-select.cjs +6 -0
  138. package/dist/as-select.d.cts +2 -0
  139. package/dist/as-select.d.mts +2 -0
  140. package/dist/as-select.mjs +6 -0
  141. package/dist/as-select.vue-Dd7huPq2.d.cts +9 -0
  142. package/dist/as-select.vue-RYpbZbKt.d.mts +9 -0
  143. package/dist/as-time-C24rvslH.cjs +258 -0
  144. package/dist/as-time-CQsxUs8P.mjs +253 -0
  145. package/dist/as-time.cjs +8 -0
  146. package/dist/as-time.d.cts +2 -0
  147. package/dist/as-time.d.mts +2 -0
  148. package/dist/as-time.mjs +8 -0
  149. package/dist/as-time.vue-huLx2B4l.d.mts +9 -0
  150. package/dist/as-time.vue-nMEHLXke.d.cts +9 -0
  151. package/dist/as-tuple-BU--cuuI.cjs +351 -0
  152. package/dist/as-tuple-DkI9swlW.mjs +340 -0
  153. package/dist/as-tuple.cjs +11 -0
  154. package/dist/as-tuple.d.cts +2 -0
  155. package/dist/as-tuple.d.mts +2 -0
  156. package/dist/as-tuple.mjs +11 -0
  157. package/dist/as-tuple.vue-CQhzOJsn.d.mts +9 -0
  158. package/dist/as-tuple.vue-DyskCkf-.d.cts +9 -0
  159. package/dist/as-union-BGvdxr3G.mjs +351 -0
  160. package/dist/as-union-C0btoJn3.cjs +368 -0
  161. package/dist/as-union.cjs +6 -0
  162. package/dist/as-union.d.cts +2 -0
  163. package/dist/as-union.d.mts +2 -0
  164. package/dist/as-union.mjs +6 -0
  165. package/dist/as-union.vue-BjlDPZn0.d.mts +9 -0
  166. package/dist/as-union.vue-CqjU3O10.d.cts +9 -0
  167. package/dist/as-variant-picker-BVs0AvjK.mjs +96 -0
  168. package/dist/as-variant-picker-DObQZHmm.cjs +107 -0
  169. package/dist/index.cjs +173 -0
  170. package/dist/index.d.cts +966 -0
  171. package/dist/index.d.mts +966 -0
  172. package/dist/index.mjs +105 -0
  173. package/dist/types-C4HRSxgV.d.cts +233 -0
  174. package/dist/types-Czm-Gtud.d.mts +233 -0
  175. package/dist/use-as-date-B7CtcRQd.cjs +329 -0
  176. package/dist/use-as-date-C39i9mzE.mjs +318 -0
  177. package/dist/use-as-dropdown-BMnEm6jF.mjs +82 -0
  178. package/dist/use-as-dropdown-C-Qy7Vt0.cjs +105 -0
  179. package/dist/use-as-locale-BrFdAgnU.mjs +23 -0
  180. package/dist/use-as-locale-C4z5stwD.cjs +34 -0
  181. package/dist/use-as-nested-sections-store-jdMRxjBE.cjs +80 -0
  182. package/dist/use-as-nested-sections-store-lhi0z5z1.mjs +63 -0
  183. package/dist/use-as-optional-add-flow-CuXEir_i.mjs +43 -0
  184. package/dist/use-as-optional-add-flow-STOaQWo9.cjs +48 -0
  185. package/dist/use-as-value-help-CBykDEjZ.mjs +89 -0
  186. package/dist/use-as-value-help-uANI3zWa.cjs +100 -0
  187. package/dist/use-form-context-Dwr8Ai1v.cjs +207 -0
  188. package/dist/use-form-context-bAj7UoSe.mjs +106 -0
  189. package/package.json +180 -0
  190. package/styles.d.ts +2 -0
@@ -0,0 +1,158 @@
1
+ import { a as TAsTypeComponents, i as TAsComponentProps, n as TAsChangeType } from "./types-Czm-Gtud.mjs";
2
+ import * as vue from "vue";
3
+ import { Component } from "vue";
4
+ import { ClientFactory, FormDef } from "@atscript/ui";
5
+
6
+ //#region src/composables/types.d.ts
7
+ type TFormRule<TValue, TFormData, TContext> = (v: TValue, data?: TFormData, context?: TContext) => boolean | string;
8
+ interface TFormFieldCallbacks {
9
+ validate: () => boolean | string;
10
+ clearErrors: () => void;
11
+ reset: () => void;
12
+ setExternalError: (msg?: string) => void;
13
+ }
14
+ interface TFormFieldRegistration {
15
+ path: () => string;
16
+ callbacks: TFormFieldCallbacks;
17
+ }
18
+ interface TFormState {
19
+ firstSubmitHappened: boolean;
20
+ firstValidation: "on-change" | "touched-on-blur" | "on-blur" | "on-submit" | "none";
21
+ /**
22
+ * Fields registered AFTER `firstSubmitHappened` flipped to true. They stay
23
+ * in this set until either the user edits the field (model watch removes
24
+ * the id) or the next submit fires (set is cleared). Live validation is
25
+ * suppressed for these fields so a freshly-added array item doesn't render
26
+ * red required-field errors before the user has had a chance to type.
27
+ */
28
+ freshFields: Set<symbol>;
29
+ register: (id: symbol, registration: TFormFieldRegistration) => void;
30
+ unregister: (id: symbol) => void;
31
+ }
32
+ //#endregion
33
+ //#region src/components/as-form.vue.d.ts
34
+ interface Props<TF, TC> {
35
+ def: FormDef;
36
+ formData?: TF;
37
+ formContext?: TC;
38
+ firstValidation?: TFormState["firstValidation"];
39
+ components?: Record<string, Component<TAsComponentProps>>;
40
+ /**
41
+ * Type-to-component map for field rendering. Maps field types to Vue components.
42
+ * Must include entries for all built-in field types. Use `createDefaultTypes()`
43
+ * for a pre-filled map, or supply your own.
44
+ */
45
+ types: TAsTypeComponents;
46
+ errors?: Record<string, string | undefined>;
47
+ /**
48
+ * Per-form client factory override. Creates `Client` instances from URL paths
49
+ * for FK value-help pickers inside this form. Falls back to the app-wide
50
+ * default (`setDefaultClientFactory`) and then to the built-in `new Client(url)`
51
+ * factory when unset.
52
+ */
53
+ clientFactory?: ClientFactory;
54
+ /**
55
+ * Suppress the root field's title rendering. Use when the form is mounted
56
+ * inside a chrome that already shows the form's `@meta.label` (e.g. a
57
+ * dialog header). Nested fields keep their own headings.
58
+ */
59
+ hideRootTitle?: boolean;
60
+ /**
61
+ * Suppress the default submit button. Use when the host chrome owns the
62
+ * submit affordance (e.g. a dialog footer with its own submit button
63
+ * wired via HTML5 `<button form="...">`). Vue 3 treats an empty
64
+ * `<template #form.submit />` as "slot not provided" and falls back to
65
+ * the default button — this prop is the explicit way to skip it.
66
+ */
67
+ hideSubmit?: boolean;
68
+ /**
69
+ * When true, freezes the form: the body becomes `inert` (blocks pointer
70
+ * events + keyboard focus) and a loading overlay paints over the entire
71
+ * form area. Used by `<AsWfForm>` to lock interaction during a server
72
+ * round-trip so the user can't edit a field whose response is racing in.
73
+ * Visual is shared with `<AsTable>`'s query overlay via vunor
74
+ * `inner-loading`.
75
+ */
76
+ loading?: boolean;
77
+ }
78
+ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
79
+ props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
80
+ onError?: ((errors: {
81
+ path: string;
82
+ message: string;
83
+ }[]) => any) | undefined;
84
+ onAction?: ((name: string, data: TFormData) => any) | undefined;
85
+ onSubmit?: ((data: TFormData) => any) | undefined;
86
+ "onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
87
+ onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
88
+ }> & (typeof globalThis extends {
89
+ __VLS_PROPS_FALLBACK: infer P;
90
+ } ? P : {});
91
+ expose: (exposed: {}) => void;
92
+ attrs: any;
93
+ slots: {
94
+ 'form.header'?: (props: {
95
+ clearErrors: () => void;
96
+ reset: () => Promise<void>;
97
+ setErrors: (errors: Record<string, string>) => void;
98
+ formContext: TFormContext | undefined;
99
+ disabled: boolean;
100
+ }) => any;
101
+ } & {
102
+ 'form.before'?: (props: {
103
+ clearErrors: () => void;
104
+ reset: () => Promise<void>;
105
+ setErrors: (errors: Record<string, string>) => void;
106
+ formContext: TFormContext | undefined;
107
+ disabled: boolean;
108
+ }) => any;
109
+ } & {
110
+ 'form.after'?: (props: {
111
+ clearErrors: () => void;
112
+ reset: () => Promise<void>;
113
+ setErrors: (errors: Record<string, string>) => void;
114
+ disabled: boolean;
115
+ formContext: TFormContext | undefined;
116
+ }) => any;
117
+ } & {
118
+ 'form.error'?: (props: {
119
+ message: string;
120
+ dismiss: () => void;
121
+ }) => any;
122
+ } & {
123
+ 'form.submit'?: (props: {
124
+ disabled: boolean;
125
+ text: string;
126
+ clearErrors: () => void;
127
+ reset: () => Promise<void>;
128
+ setErrors: (errors: Record<string, string>) => void;
129
+ formContext: TFormContext | undefined;
130
+ }) => any;
131
+ } & {
132
+ 'form.footer'?: (props: {
133
+ disabled: boolean;
134
+ clearErrors: () => void;
135
+ reset: () => Promise<void>;
136
+ setErrors: (errors: Record<string, string>) => void;
137
+ formContext: TFormContext | undefined;
138
+ }) => any;
139
+ } & {
140
+ 'form.loading'?: (props: {}) => any;
141
+ };
142
+ emit: {
143
+ (e: "submit", data: TFormData): void;
144
+ (e: "error", errors: {
145
+ path: string;
146
+ message: string;
147
+ }[]): void;
148
+ (e: "action", name: string, data: TFormData): void;
149
+ (e: "unsupported-action", name: string, data: TFormData): void;
150
+ (e: "change", type: TAsChangeType, path: string, value: unknown, formData: TFormData): void;
151
+ };
152
+ }>) => vue.VNode & {
153
+ __ctx?: Awaited<typeof __VLS_setup>;
154
+ };
155
+ declare const _default: typeof __VLS_export;
156
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
157
+ //#endregion
158
+ export { TFormRule as a, TFormFieldRegistration as i, _default as n, TFormState as o, TFormFieldCallbacks as r, Props as t };
@@ -0,0 +1,231 @@
1
+ const require_as_field_shell = require("./as-field-shell-B2iTn-iM.cjs");
2
+ const require_as_input_control = require("./as-input-control-C5-DelZT.cjs");
3
+ const require_as_adornment_shell = require("./as-adornment-shell-9UmdNIPR.cjs");
4
+ let vue = require("vue");
5
+ //#endregion
6
+ //#region src/components/defaults/as-input.vue
7
+ var as_input_default = /* @__PURE__ */ (0, vue.defineComponent)({
8
+ __name: "as-input",
9
+ props: {
10
+ onBlur: {
11
+ type: Function,
12
+ required: true
13
+ },
14
+ error: {
15
+ type: String,
16
+ required: false
17
+ },
18
+ model: {
19
+ type: Object,
20
+ required: true
21
+ },
22
+ value: {
23
+ type: null,
24
+ required: false
25
+ },
26
+ label: {
27
+ type: String,
28
+ required: false
29
+ },
30
+ description: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ hint: {
35
+ type: String,
36
+ required: false
37
+ },
38
+ placeholder: {
39
+ type: String,
40
+ required: false
41
+ },
42
+ prefixIcon: {
43
+ type: String,
44
+ required: false
45
+ },
46
+ suffixIcon: {
47
+ type: String,
48
+ required: false
49
+ },
50
+ class: {
51
+ type: [Object, String],
52
+ required: false
53
+ },
54
+ style: {
55
+ type: [Object, String],
56
+ required: false
57
+ },
58
+ optional: {
59
+ type: Boolean,
60
+ required: false,
61
+ skipCheck: true
62
+ },
63
+ onToggleOptional: {
64
+ type: Function,
65
+ required: false
66
+ },
67
+ required: {
68
+ type: Boolean,
69
+ required: false,
70
+ skipCheck: true
71
+ },
72
+ readonly: {
73
+ type: Boolean,
74
+ required: false,
75
+ skipCheck: true
76
+ },
77
+ type: {
78
+ type: String,
79
+ required: true
80
+ },
81
+ formAction: {
82
+ type: Object,
83
+ required: false
84
+ },
85
+ name: {
86
+ type: String,
87
+ required: false
88
+ },
89
+ field: {
90
+ type: Object,
91
+ required: false
92
+ },
93
+ options: {
94
+ type: Array,
95
+ required: false
96
+ },
97
+ maxLength: {
98
+ type: Number,
99
+ required: false
100
+ },
101
+ autocomplete: {
102
+ type: String,
103
+ required: false
104
+ },
105
+ title: {
106
+ type: String,
107
+ required: false
108
+ },
109
+ level: {
110
+ type: Number,
111
+ required: false
112
+ },
113
+ onRemove: {
114
+ type: Function,
115
+ required: false
116
+ },
117
+ canRemove: {
118
+ type: Boolean,
119
+ required: false
120
+ },
121
+ removeLabel: {
122
+ type: String,
123
+ required: false
124
+ },
125
+ arrayIndex: {
126
+ type: Number,
127
+ required: false
128
+ },
129
+ path: {
130
+ type: String,
131
+ required: true
132
+ },
133
+ valueHelp: {
134
+ type: Object,
135
+ required: false
136
+ },
137
+ singularLabel: {
138
+ type: String,
139
+ required: false
140
+ },
141
+ inputId: {
142
+ type: String,
143
+ required: true
144
+ },
145
+ errorId: {
146
+ type: String,
147
+ required: true
148
+ },
149
+ descId: {
150
+ type: String,
151
+ required: true
152
+ },
153
+ ariaDescribedBy: {
154
+ type: String,
155
+ required: false
156
+ },
157
+ currencyCode: {
158
+ type: String,
159
+ required: false
160
+ },
161
+ unitCode: {
162
+ type: String,
163
+ required: false
164
+ },
165
+ precisionScale: {
166
+ type: Number,
167
+ required: false
168
+ },
169
+ prefix: {
170
+ type: String,
171
+ required: false
172
+ },
173
+ suffix: {
174
+ type: String,
175
+ required: false
176
+ },
177
+ scale: {
178
+ type: Number,
179
+ required: false
180
+ },
181
+ hasAdornment: {
182
+ type: Boolean,
183
+ required: false
184
+ },
185
+ disabled: {
186
+ type: Boolean,
187
+ required: false
188
+ },
189
+ hidden: {
190
+ type: Boolean,
191
+ required: false
192
+ }
193
+ },
194
+ setup(__props) {
195
+ const props = __props;
196
+ const shellTitle = (0, vue.computed)(() => props.currencyCode ?? props.unitCode ?? void 0);
197
+ return (_ctx, _cache) => {
198
+ return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
199
+ default: (0, vue.withCtx)(({ inputId }) => [__props.hasAdornment ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_adornment_shell.as_adornment_shell_default, {
200
+ key: 0,
201
+ "prefix-icon": __props.prefixIcon,
202
+ prefix: __props.prefix,
203
+ suffix: __props.suffix,
204
+ "suffix-icon": __props.suffixIcon,
205
+ error: __props.error,
206
+ required: __props.required,
207
+ title: shellTitle.value
208
+ }, {
209
+ default: (0, vue.withCtx)(() => [(0, vue.createVNode)(require_as_input_control.as_input_control_default, (0, vue.mergeProps)(_ctx.$props, { "input-id": inputId }), null, 16, ["input-id"])]),
210
+ _: 2
211
+ }, 1032, [
212
+ "prefix-icon",
213
+ "prefix",
214
+ "suffix",
215
+ "suffix-icon",
216
+ "error",
217
+ "required",
218
+ "title"
219
+ ])) : ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_input_control.as_input_control_default, (0, vue.mergeProps)({ key: 1 }, _ctx.$props, { "input-id": inputId }), null, 16, ["input-id"]))]),
220
+ _: 1
221
+ }, 16);
222
+ };
223
+ }
224
+ });
225
+ //#endregion
226
+ Object.defineProperty(exports, "as_input_default", {
227
+ enumerable: true,
228
+ get: function() {
229
+ return as_input_default;
230
+ }
231
+ });
@@ -0,0 +1,226 @@
1
+ import { t as as_field_shell_default } from "./as-field-shell-Pdy3sAvr.mjs";
2
+ import { t as as_input_control_default } from "./as-input-control-BzELjheN.mjs";
3
+ import { t as as_adornment_shell_default } from "./as-adornment-shell-knFiB7Ct.mjs";
4
+ import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, withCtx } from "vue";
5
+ //#endregion
6
+ //#region src/components/defaults/as-input.vue
7
+ var as_input_default = /* @__PURE__ */ defineComponent({
8
+ __name: "as-input",
9
+ props: {
10
+ onBlur: {
11
+ type: Function,
12
+ required: true
13
+ },
14
+ error: {
15
+ type: String,
16
+ required: false
17
+ },
18
+ model: {
19
+ type: Object,
20
+ required: true
21
+ },
22
+ value: {
23
+ type: null,
24
+ required: false
25
+ },
26
+ label: {
27
+ type: String,
28
+ required: false
29
+ },
30
+ description: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ hint: {
35
+ type: String,
36
+ required: false
37
+ },
38
+ placeholder: {
39
+ type: String,
40
+ required: false
41
+ },
42
+ prefixIcon: {
43
+ type: String,
44
+ required: false
45
+ },
46
+ suffixIcon: {
47
+ type: String,
48
+ required: false
49
+ },
50
+ class: {
51
+ type: [Object, String],
52
+ required: false
53
+ },
54
+ style: {
55
+ type: [Object, String],
56
+ required: false
57
+ },
58
+ optional: {
59
+ type: Boolean,
60
+ required: false,
61
+ skipCheck: true
62
+ },
63
+ onToggleOptional: {
64
+ type: Function,
65
+ required: false
66
+ },
67
+ required: {
68
+ type: Boolean,
69
+ required: false,
70
+ skipCheck: true
71
+ },
72
+ readonly: {
73
+ type: Boolean,
74
+ required: false,
75
+ skipCheck: true
76
+ },
77
+ type: {
78
+ type: String,
79
+ required: true
80
+ },
81
+ formAction: {
82
+ type: Object,
83
+ required: false
84
+ },
85
+ name: {
86
+ type: String,
87
+ required: false
88
+ },
89
+ field: {
90
+ type: Object,
91
+ required: false
92
+ },
93
+ options: {
94
+ type: Array,
95
+ required: false
96
+ },
97
+ maxLength: {
98
+ type: Number,
99
+ required: false
100
+ },
101
+ autocomplete: {
102
+ type: String,
103
+ required: false
104
+ },
105
+ title: {
106
+ type: String,
107
+ required: false
108
+ },
109
+ level: {
110
+ type: Number,
111
+ required: false
112
+ },
113
+ onRemove: {
114
+ type: Function,
115
+ required: false
116
+ },
117
+ canRemove: {
118
+ type: Boolean,
119
+ required: false
120
+ },
121
+ removeLabel: {
122
+ type: String,
123
+ required: false
124
+ },
125
+ arrayIndex: {
126
+ type: Number,
127
+ required: false
128
+ },
129
+ path: {
130
+ type: String,
131
+ required: true
132
+ },
133
+ valueHelp: {
134
+ type: Object,
135
+ required: false
136
+ },
137
+ singularLabel: {
138
+ type: String,
139
+ required: false
140
+ },
141
+ inputId: {
142
+ type: String,
143
+ required: true
144
+ },
145
+ errorId: {
146
+ type: String,
147
+ required: true
148
+ },
149
+ descId: {
150
+ type: String,
151
+ required: true
152
+ },
153
+ ariaDescribedBy: {
154
+ type: String,
155
+ required: false
156
+ },
157
+ currencyCode: {
158
+ type: String,
159
+ required: false
160
+ },
161
+ unitCode: {
162
+ type: String,
163
+ required: false
164
+ },
165
+ precisionScale: {
166
+ type: Number,
167
+ required: false
168
+ },
169
+ prefix: {
170
+ type: String,
171
+ required: false
172
+ },
173
+ suffix: {
174
+ type: String,
175
+ required: false
176
+ },
177
+ scale: {
178
+ type: Number,
179
+ required: false
180
+ },
181
+ hasAdornment: {
182
+ type: Boolean,
183
+ required: false
184
+ },
185
+ disabled: {
186
+ type: Boolean,
187
+ required: false
188
+ },
189
+ hidden: {
190
+ type: Boolean,
191
+ required: false
192
+ }
193
+ },
194
+ setup(__props) {
195
+ const props = __props;
196
+ const shellTitle = computed(() => props.currencyCode ?? props.unitCode ?? void 0);
197
+ return (_ctx, _cache) => {
198
+ return openBlock(), createBlock(as_field_shell_default, normalizeProps(guardReactiveProps(_ctx.$props)), {
199
+ default: withCtx(({ inputId }) => [__props.hasAdornment ? (openBlock(), createBlock(as_adornment_shell_default, {
200
+ key: 0,
201
+ "prefix-icon": __props.prefixIcon,
202
+ prefix: __props.prefix,
203
+ suffix: __props.suffix,
204
+ "suffix-icon": __props.suffixIcon,
205
+ error: __props.error,
206
+ required: __props.required,
207
+ title: shellTitle.value
208
+ }, {
209
+ default: withCtx(() => [createVNode(as_input_control_default, mergeProps(_ctx.$props, { "input-id": inputId }), null, 16, ["input-id"])]),
210
+ _: 2
211
+ }, 1032, [
212
+ "prefix-icon",
213
+ "prefix",
214
+ "suffix",
215
+ "suffix-icon",
216
+ "error",
217
+ "required",
218
+ "title"
219
+ ])) : (openBlock(), createBlock(as_input_control_default, mergeProps({ key: 1 }, _ctx.$props, { "input-id": inputId }), null, 16, ["input-id"]))]),
220
+ _: 1
221
+ }, 16);
222
+ };
223
+ }
224
+ });
225
+ //#endregion
226
+ export { as_input_default as t };