@vunk/form 2.19.12 → 2.19.15

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 (108) hide show
  1. package/components/api-tables-select/src/ctx.d.ts +14 -10
  2. package/components/api-tables-select/src/index.vue.d.ts +30 -21
  3. package/components/button/src/ctx.d.ts +4 -0
  4. package/components/button/src/index.vue.d.ts +18 -0
  5. package/components/card-input-collection/src/core.vue.d.ts +9 -0
  6. package/components/card-input-collection/src/ctx.d.ts +4 -0
  7. package/components/card-input-collection/src/index.vue.d.ts +9 -0
  8. package/components/cascader/src/ctx.d.ts +5 -1
  9. package/components/cascader/src/index.vue.d.ts +12 -3
  10. package/components/checkbox/src/ctx.d.ts +5 -1
  11. package/components/checkbox/src/index.vue.d.ts +19 -1
  12. package/components/collapse/index.cjs +1 -0
  13. package/components/collapse/index.d.ts +4 -0
  14. package/components/collapse/index.mjs +45 -0
  15. package/components/collapse/src/index.vue.d.ts +15 -0
  16. package/components/collapse/src/set-attrs.vue.d.ts +23 -0
  17. package/components/collapse-item/index.cjs +1 -0
  18. package/components/collapse-item/index.d.ts +6 -0
  19. package/components/collapse-item/index.mjs +63 -0
  20. package/components/collapse-item/src/ctx.d.ts +7 -0
  21. package/components/collapse-item/src/index.vue.d.ts +36 -0
  22. package/components/collapse-item/src/types.d.ts +1 -0
  23. package/components/collapse-item/src/use.d.ts +13 -0
  24. package/components/color-picker/src/ctx.d.ts +4 -0
  25. package/components/color-picker/src/index.vue.d.ts +10 -1
  26. package/components/date-picker/src/ctx.d.ts +5 -1
  27. package/components/date-picker/src/index.vue.d.ts +13 -4
  28. package/components/date-picker-range/src/ctx.d.ts +90 -86
  29. package/components/date-picker-range/src/index.vue.d.ts +198 -180
  30. package/components/dialog/src/ctx.d.ts +1 -1
  31. package/components/dialog-input-collection/src/ctx.d.ts +4 -0
  32. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
  33. package/components/dialog-input-collection/src/index.vue.d.ts +9 -0
  34. package/components/download-plus/src/ctx.d.ts +4 -0
  35. package/components/download-plus/src/index.vue.d.ts +18 -0
  36. package/components/editable-text/src/ctx.d.ts +4 -0
  37. package/components/editable-text/src/index.vue.d.ts +9 -0
  38. package/components/el-slider/src/slider-core.vue.d.ts +2 -2
  39. package/components/esri-input-geojson/src/ctx.d.ts +5 -1
  40. package/components/esri-input-geojson/src/index.vue.d.ts +34 -6
  41. package/components/form/index.cjs +1 -1
  42. package/components/form/index.d.ts +1 -0
  43. package/components/form/index.mjs +115 -80
  44. package/components/form/src/index.vue.d.ts +1 -1
  45. package/components/form/src/types.d.ts +2 -1
  46. package/components/form/src/use.d.ts +206 -0
  47. package/components/form-item/index.cjs +1 -1
  48. package/components/form-item/index.mjs +103 -80
  49. package/components/form-item/src/core.vue.d.ts +4 -0
  50. package/components/form-item/src/ctx.d.ts +6 -1
  51. package/components/form-item/src/index.vue.d.ts +9 -0
  52. package/components/information-collection/src/ctx.d.ts +4 -0
  53. package/components/information-collection/src/index.vue.d.ts +9 -0
  54. package/components/information-tag/src/index.vue.d.ts +2 -2
  55. package/components/input/src/ctx.d.ts +5 -1
  56. package/components/input/src/index.vue.d.ts +21 -3
  57. package/components/input-array/src/ctx.d.ts +4 -0
  58. package/components/input-array/src/index.vue.d.ts +9 -0
  59. package/components/input-collection/src/core.vue.d.ts +9 -0
  60. package/components/input-collection/src/ctx.d.ts +4 -0
  61. package/components/input-collection/src/index.vue.d.ts +9 -0
  62. package/components/input-file/src/index.vue.d.ts +9 -0
  63. package/components/input-link/src/ctx.d.ts +4 -0
  64. package/components/input-link/src/index.vue.d.ts +31 -4
  65. package/components/input-number/src/ctx.d.ts +5 -1
  66. package/components/input-number/src/index.vue.d.ts +21 -3
  67. package/components/input-tag/src/ctx.d.ts +5 -1
  68. package/components/input-tag/src/index.vue.d.ts +25 -7
  69. package/components/monaco-editor/src/ctx.d.ts +4 -0
  70. package/components/monaco-editor/src/index.vue.d.ts +18 -0
  71. package/components/radio/src/ctx.d.ts +4 -0
  72. package/components/radio/src/index.vue.d.ts +21 -3
  73. package/components/radio/src/wraper.vue.d.ts +10 -1
  74. package/components/select/src/core.vue.d.ts +33 -15
  75. package/components/select/src/ctx.d.ts +5 -1
  76. package/components/select/src/index.vue.d.ts +15 -6
  77. package/components/slider/src/ctx.d.ts +4 -0
  78. package/components/slider/src/index.vue.d.ts +11 -2
  79. package/components/switch/src/ctx.d.ts +4 -0
  80. package/components/switch/src/index.vue.d.ts +9 -0
  81. package/components/tables-select/src/ctx.d.ts +5 -1
  82. package/components/tables-select/src/index.vue.d.ts +10 -1
  83. package/components/templates-default/src/index.vue.d.ts +218 -38
  84. package/components/templates-esri/src/index.vue.d.ts +34 -6
  85. package/components/templates-variant/src/index.vue.d.ts +198 -180
  86. package/components/time-picker/src/ctx.d.ts +5 -1
  87. package/components/time-picker/src/index.vue.d.ts +13 -4
  88. package/components/upload/src/ctx.d.ts +5 -1
  89. package/components/upload/src/index.vue.d.ts +18 -0
  90. package/components/upload/src/wraper.vue.d.ts +9 -0
  91. package/components/upload-plus/src/ctx.d.ts +4 -0
  92. package/components/upload-plus/src/index.vue.d.ts +9 -0
  93. package/components/van-cascader/src/ctx.d.ts +4 -0
  94. package/components/van-cascader/src/index.vue.d.ts +12 -3
  95. package/components/var-datetime-picker/src/ctx.d.ts +4 -0
  96. package/components/var-datetime-picker/src/index.vue.d.ts +18 -0
  97. package/components/vditor/src/ctx.d.ts +4 -0
  98. package/components/vditor/src/index.vue.d.ts +18 -0
  99. package/composables/form-mitt/index.cjs +1 -0
  100. package/composables/form-mitt/index.d.ts +37 -0
  101. package/composables/form-mitt/index.mjs +41 -0
  102. package/composables/index.cjs +1 -1
  103. package/composables/index.d.ts +1 -0
  104. package/composables/index.mjs +16 -14
  105. package/package.json +19 -1
  106. package/shared/element-plus/ctx.d.ts +14 -13
  107. package/shared/element-plus/index.cjs +1 -1
  108. package/shared/element-plus/index.mjs +57 -56
@@ -1,9 +1,10 @@
1
- import { isRef as M, ref as v, computed as i, unref as D, inject as d, watch as k, onBeforeUnmount as A, shallowReactive as B, provide as S } from "vue";
1
+ import { isRef as E, ref as v, computed as i, unref as D, inject as d, watch as k, onBeforeUnmount as A, shallowReactive as B, provide as S } from "vue";
2
+ import { useFormMitt as J } from "@vunk/form/composables/form-mitt";
2
3
  import { noop as K } from "@vunk/shared/function";
3
4
  import { formContextKey as P } from "element-plus";
4
5
  import { getValue as w, defaultIntoUndefined as R } from "@vunk/core";
5
6
  const N = (e, n = {}) => {
6
- M(e) || (e = v(e));
7
+ E(e) || (e = v(e));
7
8
  const a = {
8
9
  ...n,
9
10
  slotsChildren: ["default"]
@@ -11,8 +12,8 @@ const N = (e, n = {}) => {
11
12
  n.slotsChildren && a.slotsChildren.push(...n.slotsChildren);
12
13
  const t = i(() => {
13
14
  const c = {}, y = {}, g = {};
14
- function p(E, h = []) {
15
- E.forEach((s, I) => {
15
+ function p(T, h = []) {
16
+ T.forEach((s, I) => {
16
17
  const u = [...h, I], f = {
17
18
  source: s,
18
19
  key: u,
@@ -40,10 +41,10 @@ const N = (e, n = {}) => {
40
41
  getManagerInfoById: (c) => t.value.idRecord[c]
41
42
  }
42
43
  ];
43
- }, V = () => d("vkfFormVm", null), Y = (e) => {
44
- const n = V();
44
+ }, F = () => d("vkfFormVm", null), Y = (e) => {
45
+ const n = F();
45
46
  return i(() => e.readonly ?? (n == null ? void 0 : n.props.readonly) ?? !1);
46
- }, j = (e) => {
47
+ }, V = (e) => {
47
48
  const n = v(0), a = i(() => {
48
49
  n.value;
49
50
  const r = e.value;
@@ -70,18 +71,18 @@ const N = (e, n = {}) => {
70
71
  ), A(() => t == null ? void 0 : t.disconnect()), a;
71
72
  };
72
73
  function _(e, n) {
73
- const a = j(e), t = d(P, null);
74
+ const a = V(e), t = d(P, null);
74
75
  return i(() => {
75
76
  K(e.value);
76
77
  const o = n.value ?? D(t == null ? void 0 : t.labelPosition);
77
78
  return o === "start" ? a.value ? "right" : "left" : o === "end" ? a.value ? "left" : "right" : o;
78
79
  });
79
80
  }
80
- const C = Symbol("PARENT_KEY"), T = () => d(
81
+ const C = Symbol("PARENT_KEY"), M = () => d(
81
82
  "vkTemplateInstances",
82
83
  null
83
84
  ), L = () => {
84
- const e = T(), n = (t) => t == null ? void 0 : t[C];
85
+ const e = M(), n = (t) => t == null ? void 0 : t[C];
85
86
  return {
86
87
  templateInstances: e,
87
88
  getTemplateInstance: (t) => {
@@ -97,7 +98,7 @@ const C = Symbol("PARENT_KEY"), T = () => d(
97
98
  getParent: n
98
99
  };
99
100
  }, O = () => {
100
- const e = T(), n = B({});
101
+ const e = M(), n = B({});
101
102
  return n[C] = e, S("vkTemplateInstances", n), n;
102
103
  }, q = (e, n) => {
103
104
  const a = i(() => e.data), r = {
@@ -120,10 +121,11 @@ export {
120
121
  O as initTemplateInstances,
121
122
  _ as useComputedLabelPosition,
122
123
  Y as useComputedReadonly,
123
- V as useForm,
124
+ F as useForm,
125
+ J as useFormMitt,
124
126
  z as useRendererData,
125
- j as useRtl,
127
+ V as useRtl,
126
128
  N as useSourceManager,
127
- T as useTemplateInstances,
129
+ M as useTemplateInstances,
128
130
  L as useTemplateInstancesContext
129
131
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "2.19.12",
3
+ "version": "2.19.15",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {
@@ -97,6 +97,11 @@
97
97
  "types": "./composables/index.d.ts",
98
98
  "require": "./composables/index.cjs"
99
99
  },
100
+ "./composables/form-mitt": {
101
+ "import": "./composables/form-mitt/index.mjs",
102
+ "types": "./composables/form-mitt/index.d.ts",
103
+ "require": "./composables/form-mitt/index.cjs"
104
+ },
100
105
  "./composables/element-plus": {
101
106
  "import": "./composables/element-plus/index.mjs",
102
107
  "types": "./composables/element-plus/index.d.ts",
@@ -337,6 +342,16 @@
337
342
  "types": "./components/color-picker/index.d.ts",
338
343
  "require": "./components/color-picker/index.cjs"
339
344
  },
345
+ "./components/collapse-item": {
346
+ "import": "./components/collapse-item/index.mjs",
347
+ "types": "./components/collapse-item/index.d.ts",
348
+ "require": "./components/collapse-item/index.cjs"
349
+ },
350
+ "./components/collapse": {
351
+ "import": "./components/collapse/index.mjs",
352
+ "types": "./components/collapse/index.d.ts",
353
+ "require": "./components/collapse/index.cjs"
354
+ },
340
355
  "./components/checkbox": {
341
356
  "import": "./components/checkbox/index.mjs",
342
357
  "types": "./components/checkbox/index.d.ts",
@@ -491,6 +506,9 @@
491
506
  "./components/color-picker/src/types": {
492
507
  "types": "./components/color-picker/src/types.d.ts"
493
508
  },
509
+ "./components/collapse-item/src/types": {
510
+ "types": "./components/collapse-item/src/types.d.ts"
511
+ },
494
512
  "./components/checkbox/src/types": {
495
513
  "types": "./components/checkbox/src/types.d.ts"
496
514
  },