@atscript/vue-form 0.1.181 → 0.1.182

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 (93) hide show
  1. package/dist/as-action.d.cts +1 -1
  2. package/dist/as-action.d.mts +1 -1
  3. package/dist/{as-action.vue-CQbDa3g4.d.mts → as-action.vue-BmHLq5PU.d.cts} +1 -1
  4. package/dist/{as-action.vue-Cp9Q8a-6.d.cts → as-action.vue-BskkSynK.d.mts} +1 -1
  5. package/dist/as-array.d.cts +1 -1
  6. package/dist/as-array.d.mts +1 -1
  7. package/dist/{as-array.vue-Cgfjz2I-.d.cts → as-array.vue-BWUhWKKn.d.cts} +1 -1
  8. package/dist/{as-array.vue-DpKFsuRS.d.mts → as-array.vue-C4mSQIUB.d.mts} +1 -1
  9. package/dist/as-checkbox.d.cts +1 -1
  10. package/dist/as-checkbox.d.mts +1 -1
  11. package/dist/{as-checkbox.vue-CXiUHIZj.d.cts → as-checkbox.vue-B_LntkDl.d.cts} +1 -1
  12. package/dist/{as-checkbox.vue-Db6OT_lL.d.mts → as-checkbox.vue-CPLwFPve.d.mts} +1 -1
  13. package/dist/as-collapsible.d.cts +1 -1
  14. package/dist/as-collapsible.d.mts +1 -1
  15. package/dist/{as-collapsible.vue-BXwe24OV.d.cts → as-collapsible.vue-9XMYb39s.d.cts} +1 -1
  16. package/dist/{as-collapsible.vue-By-ZBZt3.d.mts → as-collapsible.vue-BtUZuqGF.d.mts} +1 -1
  17. package/dist/as-date.d.cts +1 -1
  18. package/dist/as-date.d.mts +1 -1
  19. package/dist/{as-date.vue-BUaHHI42.d.mts → as-date.vue-CQZp-yqF.d.mts} +1 -1
  20. package/dist/{as-date.vue-axahL_Zv.d.cts → as-date.vue-DQVHGLMc.d.cts} +1 -1
  21. package/dist/as-datetime.d.cts +1 -1
  22. package/dist/as-datetime.d.mts +1 -1
  23. package/dist/{as-datetime.vue-C6ILTI-7.d.cts → as-datetime.vue-DrWth1Pe.d.mts} +1 -1
  24. package/dist/{as-datetime.vue-D3WJpAVe.d.mts → as-datetime.vue-TMgV54Z5.d.cts} +1 -1
  25. package/dist/as-decimal.d.cts +1 -1
  26. package/dist/as-decimal.d.mts +1 -1
  27. package/dist/{as-decimal.vue-BVDyP4LN.d.mts → as-decimal.vue-Bw9vY0br.d.mts} +1 -1
  28. package/dist/{as-decimal.vue-Dgfz9UDJ.d.cts → as-decimal.vue-D-C_ywhy.d.cts} +1 -1
  29. package/dist/as-field-shell.d.cts +1 -1
  30. package/dist/as-field-shell.d.mts +1 -1
  31. package/dist/{as-field-shell.vue-DAcRqi7G.d.cts → as-field-shell.vue-CouocQ2f.d.cts} +1 -1
  32. package/dist/{as-field-shell.vue-DBufTHVO.d.mts → as-field-shell.vue-DIYpxzud.d.mts} +1 -1
  33. package/dist/{as-form-DroFS2lv.cjs → as-form-BTNctHb9.cjs} +15 -7
  34. package/dist/{as-form-B9hRTvod.mjs → as-form-CRDqdXnl.mjs} +15 -7
  35. package/dist/as-form.cjs +1 -1
  36. package/dist/as-form.d.cts +1 -1
  37. package/dist/as-form.d.mts +1 -1
  38. package/dist/as-form.mjs +1 -1
  39. package/dist/{as-form.vue-BdCoE0YG.d.mts → as-form.vue-BI5mC0o7.d.cts} +15 -389
  40. package/dist/{as-form.vue-CPrH175H.d.cts → as-form.vue-BJ79OYA6.d.mts} +15 -389
  41. package/dist/as-input.d.cts +1 -1
  42. package/dist/as-input.d.mts +1 -1
  43. package/dist/{as-input.vue-BiPsULeF.d.mts → as-input.vue-D4UQSSmo.d.cts} +1 -1
  44. package/dist/{as-input.vue-mZ0h1Q2J.d.cts → as-input.vue-Q5EXxW3x.d.mts} +1 -1
  45. package/dist/as-multi-select.d.cts +1 -1
  46. package/dist/as-multi-select.d.mts +1 -1
  47. package/dist/{as-multi-select.vue-Bmngkww7.d.mts → as-multi-select.vue-Ce-V2A81.d.mts} +1 -1
  48. package/dist/{as-multi-select.vue-DAFz9hZR.d.cts → as-multi-select.vue-Iy3G3eu8.d.cts} +1 -1
  49. package/dist/as-number.d.cts +1 -1
  50. package/dist/as-number.d.mts +1 -1
  51. package/dist/{as-number.vue-BsJdJS36.d.cts → as-number.vue-FKc6UVot.d.mts} +1 -1
  52. package/dist/{as-number.vue-C2QSKpVL.d.mts → as-number.vue-PH0wnd3B.d.cts} +1 -1
  53. package/dist/as-object.d.cts +1 -1
  54. package/dist/as-object.d.mts +1 -1
  55. package/dist/{as-object.vue-DFo_5DXv.d.mts → as-object.vue-B0qKMWPB.d.cts} +1 -1
  56. package/dist/{as-object.vue-DduGoHKD.d.cts → as-object.vue-DLCEWLe4.d.mts} +1 -1
  57. package/dist/as-paragraph.d.cts +1 -1
  58. package/dist/as-paragraph.d.mts +1 -1
  59. package/dist/{as-paragraph.vue-BJSA27kd.d.cts → as-paragraph.vue-BIrekTzU.d.mts} +1 -1
  60. package/dist/{as-paragraph.vue-DiHaNFSX.d.mts → as-paragraph.vue-C8JeTZ1s.d.cts} +1 -1
  61. package/dist/as-radio.d.cts +1 -1
  62. package/dist/as-radio.d.mts +1 -1
  63. package/dist/{as-radio.vue-C_ZjbI4s.d.mts → as-radio.vue-Rwknlgr7.d.mts} +1 -1
  64. package/dist/{as-radio.vue-Dw1QaJoY.d.cts → as-radio.vue-jeHiMfc7.d.cts} +1 -1
  65. package/dist/as-ref.d.cts +1 -1
  66. package/dist/as-ref.d.mts +1 -1
  67. package/dist/{as-ref.vue-CvY88H7p.d.cts → as-ref.vue-D0A4vPXL.d.mts} +1 -1
  68. package/dist/{as-ref.vue-DaXQsjsX.d.mts → as-ref.vue-WufE6ltR.d.cts} +1 -1
  69. package/dist/as-select.d.cts +1 -1
  70. package/dist/as-select.d.mts +1 -1
  71. package/dist/{as-select.vue-7xiuC9JG.d.cts → as-select.vue-BIpvu4ba.d.mts} +1 -1
  72. package/dist/{as-select.vue-IGtjEyQD.d.mts → as-select.vue-eMp1zUQE.d.cts} +1 -1
  73. package/dist/as-time.d.cts +1 -1
  74. package/dist/as-time.d.mts +1 -1
  75. package/dist/{as-time.vue-CKVgGb-m.d.mts → as-time.vue-DAeXJ0Zv.d.cts} +1 -1
  76. package/dist/{as-time.vue-CQhIKAs0.d.cts → as-time.vue-DudhL8yx.d.mts} +1 -1
  77. package/dist/as-tuple.d.cts +1 -1
  78. package/dist/as-tuple.d.mts +1 -1
  79. package/dist/{as-tuple.vue-BSh2-1uv.d.cts → as-tuple.vue-C2KTK2RH.d.cts} +1 -1
  80. package/dist/{as-tuple.vue-CDOHXKBr.d.mts → as-tuple.vue-CLIDqVFv.d.mts} +1 -1
  81. package/dist/as-union.d.cts +1 -1
  82. package/dist/as-union.d.mts +1 -1
  83. package/dist/{as-union.vue-BcaUH5bH.d.mts → as-union.vue-43Gq2Lh0.d.cts} +1 -1
  84. package/dist/{as-union.vue-CnF4bNex.d.cts → as-union.vue-CllUYjuh.d.mts} +1 -1
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.d.cts +22 -22
  87. package/dist/index.d.mts +22 -22
  88. package/dist/index.mjs +1 -1
  89. package/dist/types-BbGuPzZk.d.cts +705 -0
  90. package/dist/types-DxmDaJXr.d.mts +705 -0
  91. package/package.json +10 -10
  92. package/dist/types-B0Ey_eD-.d.mts +0 -309
  93. package/dist/types-DoLxVJhd.d.cts +0 -309
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-action.vue-Cp9Q8a-6.cjs";
1
+ import { t as _default } from "./as-action.vue-BmHLq5PU.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-action.vue-CQbDa3g4.mjs";
1
+ import { t as _default } from "./as-action.vue-BskkSynK.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-action.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-action.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-array.vue-Cgfjz2I-.cjs";
1
+ import { t as _default } from "./as-array.vue-BWUhWKKn.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-array.vue-DpKFsuRS.mjs";
1
+ import { t as _default } from "./as-array.vue-C4mSQIUB.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-array.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-array.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-checkbox.vue-CXiUHIZj.cjs";
1
+ import { t as _default } from "./as-checkbox.vue-B_LntkDl.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-checkbox.vue-Db6OT_lL.mjs";
1
+ import { t as _default } from "./as-checkbox.vue-CPLwFPve.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-checkbox.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-checkbox.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-collapsible.vue-BXwe24OV.cjs";
1
+ import { t as _default } from "./as-collapsible.vue-9XMYb39s.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-collapsible.vue-By-ZBZt3.mjs";
1
+ import { t as _default } from "./as-collapsible.vue-BtUZuqGF.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { i as TAsCollapsibleSlots, r as TAsCollapsibleProps } from "./types-DoLxVJhd.cjs";
1
+ import { a as TAsCollapsibleSlots, i as TAsCollapsibleProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/as-collapsible.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { i as TAsCollapsibleSlots, r as TAsCollapsibleProps } from "./types-B0Ey_eD-.mjs";
1
+ import { a as TAsCollapsibleSlots, i as TAsCollapsibleProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/as-collapsible.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-date.vue-axahL_Zv.cjs";
1
+ import { t as _default } from "./as-date.vue-DQVHGLMc.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-date.vue-BUaHHI42.mjs";
1
+ import { t as _default } from "./as-date.vue-CQZp-yqF.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-date.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-date.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-datetime.vue-C6ILTI-7.cjs";
1
+ import { t as _default } from "./as-datetime.vue-TMgV54Z5.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-datetime.vue-D3WJpAVe.mjs";
1
+ import { t as _default } from "./as-datetime.vue-DrWth1Pe.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-datetime.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-datetime.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-decimal.vue-Dgfz9UDJ.cjs";
1
+ import { t as _default } from "./as-decimal.vue-D-C_ywhy.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-decimal.vue-BVDyP4LN.mjs";
1
+ import { t as _default } from "./as-decimal.vue-Bw9vY0br.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-DAcRqi7G.cjs";
1
+ import { t as _default } from "./as-field-shell.vue-CouocQ2f.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-DBufTHVO.mjs";
1
+ import { t as _default } from "./as-field-shell.vue-DIYpxzud.mjs";
2
2
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-DoLxVJhd.cjs";
1
+ import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B0Ey_eD-.mjs";
1
+ import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -441,7 +441,7 @@ function useAsForm(options) {
441
441
  if (patch) (0, vue.provide)(require_use_form_context.FORM_PATCH_KEY, patch);
442
442
  (0, vue.provide)(require_use_form_context.ROOT_DATA_KEY, data);
443
443
  (0, vue.provide)(require_use_form_context.PATH_PREFIX_KEY, (0, vue.computed)(() => ""));
444
- (0, vue.provide)(require_use_form_context.TYPES_KEY, (0, vue.computed)(() => options.types()));
444
+ (0, vue.provide)(require_use_form_context.TYPES_KEY, (0, vue.computed)(() => options.types?.() ?? {}));
445
445
  (0, vue.provide)(require_use_form_context.COMPONENTS_KEY, (0, vue.computed)(() => options.components?.()));
446
446
  (0, vue.provide)(require_use_form_context.HIDE_ROOT_TITLE_KEY, options.hideRootTitle?.() === true);
447
447
  const ext = useAsExternalErrors({ source: () => options.errors?.() });
@@ -555,13 +555,21 @@ function useAsForm(options) {
555
555
  const result = submit();
556
556
  if (result === true) {
557
557
  internalErrors.value = {};
558
- options.emits?.submit?.((0, _atscript_ui.omitSkippedNavFields)(options.def(), data));
559
- } else {
560
- const errs = {};
561
- for (const e of result) errs[e.path] = e.message;
562
- internalErrors.value = errs;
563
- options.emits?.error?.(result);
558
+ const payload = (0, _atscript_ui.omitSkippedNavFields)(options.def(), data);
559
+ options.emits?.submit?.(payload);
560
+ return {
561
+ ok: true,
562
+ data: payload
563
+ };
564
564
  }
565
+ const errs = {};
566
+ for (const e of result) errs[e.path] = e.message;
567
+ internalErrors.value = errs;
568
+ options.emits?.error?.(result);
569
+ return {
570
+ ok: false,
571
+ errors: result
572
+ };
565
573
  }
566
574
  return {
567
575
  data,
@@ -441,7 +441,7 @@ function useAsForm(options) {
441
441
  if (patch) provide(FORM_PATCH_KEY, patch);
442
442
  provide(ROOT_DATA_KEY, data);
443
443
  provide(PATH_PREFIX_KEY, computed(() => ""));
444
- provide(TYPES_KEY, computed(() => options.types()));
444
+ provide(TYPES_KEY, computed(() => options.types?.() ?? {}));
445
445
  provide(COMPONENTS_KEY, computed(() => options.components?.()));
446
446
  provide(HIDE_ROOT_TITLE_KEY, options.hideRootTitle?.() === true);
447
447
  const ext = useAsExternalErrors({ source: () => options.errors?.() });
@@ -555,13 +555,21 @@ function useAsForm(options) {
555
555
  const result = submit();
556
556
  if (result === true) {
557
557
  internalErrors.value = {};
558
- options.emits?.submit?.(omitSkippedNavFields(options.def(), data));
559
- } else {
560
- const errs = {};
561
- for (const e of result) errs[e.path] = e.message;
562
- internalErrors.value = errs;
563
- options.emits?.error?.(result);
558
+ const payload = omitSkippedNavFields(options.def(), data);
559
+ options.emits?.submit?.(payload);
560
+ return {
561
+ ok: true,
562
+ data: payload
563
+ };
564
564
  }
565
+ const errs = {};
566
+ for (const e of result) errs[e.path] = e.message;
567
+ internalErrors.value = errs;
568
+ options.emits?.error?.(result);
569
+ return {
570
+ ok: false,
571
+ errors: result
572
+ };
565
573
  }
566
574
  return {
567
575
  data,
package/dist/as-form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_form = require("./as-form-DroFS2lv.cjs");
1
+ const require_as_form = require("./as-form-BTNctHb9.cjs");
2
2
  module.exports = require_as_form.as_form_default;
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-CPrH175H.cjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-BI5mC0o7.cjs";
2
2
  export { Props, _default as default };
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-BdCoE0YG.mjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-BJ79OYA6.mjs";
2
2
  export { Props, _default as default };
package/dist/as-form.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_form_default } from "./as-form-B9hRTvod.mjs";
1
+ import { t as as_form_default } from "./as-form-CRDqdXnl.mjs";
2
2
  export { as_form_default as default };