@piying/view-vue 1.1.13 → 1.1.14

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 (2) hide show
  1. package/index.js +45 -45
  2. package/package.json +25 -25
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var L = Object.defineProperty;
2
2
  var U = (o, e, n) => e in o ? L(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
3
  var F = (o, e, n) => U(o, typeof e != "symbol" ? e + "" : e, n);
4
- import { inject as B, shallowRef as O, watchEffect as G, defineComponent as j, computed as v, createBlock as y, renderSlot as T, openBlock as i, resolveDynamicComponent as k, mergeProps as I, unref as d, toHandlers as b, withCtx as D, createVNode as J, normalizeProps as M, guardReactiveProps as Q, defineAsyncComponent as X, provide as N, ref as S, watch as H, onUnmounted as Y, createElementBlock as E, createCommentVNode as A, Fragment as P, renderList as Z } from "vue";
4
+ import { inject as B, shallowRef as O, watchEffect as G, defineComponent as j, computed as v, createBlock as y, renderSlot as T, openBlock as c, resolveDynamicComponent as k, mergeProps as I, unref as p, toHandlers as b, withCtx as D, createVNode as J, normalizeProps as M, guardReactiveProps as Q, defineAsyncComponent as X, provide as N, ref as S, watch as H, onUnmounted as Y, createElementBlock as E, createCommentVNode as A, Fragment as P, renderList as Z } from "vue";
5
5
  import { CoreSchemaHandle as ee, FormBuilder as te, isFieldControl as oe, createViewControlLink as ne, convert as re } from "@piying/view-core";
6
6
  import { effect as W, createRootInjector as le, ChangeDetectionSchedulerImpl as ae, ChangeDetectionScheduler as se, createInjector as ue, DestroyRef as ie, untracked as ce } from "static-injector";
7
7
  import { deepEqual as de } from "fast-equals";
@@ -37,13 +37,13 @@ const q = /* @__PURE__ */ j({
37
37
  },
38
38
  setup(o) {
39
39
  const e = o, n = v(() => e.wrappers.slice(1)), r = v(() => e.wrappers[0]), l = m(() => {
40
- var a, p;
41
- return { ...(a = r.value) == null ? void 0 : a.inputs(), ...(p = r.value) == null ? void 0 : p.attributes() };
40
+ var a, u;
41
+ return { ...(a = r.value) == null ? void 0 : a.inputs(), ...(u = r.value) == null ? void 0 : u.attributes() };
42
42
  }), t = v(() => {
43
43
  var a;
44
44
  return ((a = r.value) == null ? void 0 : a.outputs) ?? {};
45
45
  });
46
- return (a, p) => r.value ? (i(), y(k(r.value.type), I({ key: 0 }, d(l), b(t.value)), {
46
+ return (a, u) => r.value ? (c(), y(k(r.value.type), I({ key: 0 }, p(l), b(t.value)), {
47
47
  default: D(() => [
48
48
  J(q, M(Q({ wrappers: n.value })), {
49
49
  default: D(() => [
@@ -61,26 +61,26 @@ const q = /* @__PURE__ */ j({
61
61
  field: {}
62
62
  },
63
63
  setup(o) {
64
- const e = o, n = B(R), r = m(() => e.field.inputs()), l = m(() => e.field.outputs()), t = m(() => e.field.renderConfig()), a = m(() => e.field.attributes()), p = v(() => ({ ...r.value, fields: e.field.fieldGroup() })), x = v(() => ({ ...r.value, fields: e.field.fieldArray() })), $ = m(() => e.field.wrappers()), g = m(() => {
65
- var s, u;
66
- return (u = (s = e.field).fieldGroup) == null ? void 0 : u.call(s);
64
+ const e = o, n = B(R), r = m(() => e.field.inputs()), l = m(() => e.field.outputs()), t = m(() => e.field.renderConfig()), a = m(() => e.field.attributes()), u = v(() => ({ ...a.value, ...r.value })), x = v(() => ({ ...u.value, fields: e.field.fieldGroup() })), $ = v(() => ({ ...u.value, fields: e.field.fieldArray() })), h = m(() => e.field.wrappers()), g = m(() => {
65
+ var s, i;
66
+ return (i = (s = e.field).fieldGroup) == null ? void 0 : i.call(s);
67
67
  }), w = m(() => {
68
- var s, u;
69
- return (u = (s = e.field).fieldArray) == null ? void 0 : u.call(s);
70
- }), _ = v(() => ({ ...a.value, ...r.value })), c = v(
68
+ var s, i;
69
+ return (i = (s = e.field).fieldArray) == null ? void 0 : i.call(s);
70
+ }), d = v(
71
71
  () => {
72
- var s, u, V;
73
- return typeof ((s = e.field.define) == null ? void 0 : s.type) == "function" ? X((u = e.field.define) == null ? void 0 : u.type) : (V = e.field.define) == null ? void 0 : V.type;
72
+ var s, i, V;
73
+ return typeof ((s = e.field.define) == null ? void 0 : s.type) == "function" ? X((i = e.field.define) == null ? void 0 : i.type) : (V = e.field.define) == null ? void 0 : V.type;
74
74
  }
75
- ), h = v(() => e.field);
76
- N(me, h);
77
- const C = S(null), K = oe(h.value.form.control);
75
+ ), _ = v(() => e.field);
76
+ N(me, _);
77
+ const C = S(null), K = oe(_.value.form.control);
78
78
  let f;
79
79
  return H(
80
- [C, h],
81
- ([s, u]) => {
80
+ [C, _],
81
+ ([s, i]) => {
82
82
  f == null || f(), K && s && (f = ne(
83
- () => u.form.control,
83
+ () => i.form.control,
84
84
  s.cva,
85
85
  n
86
86
  ));
@@ -88,19 +88,19 @@ const q = /* @__PURE__ */ j({
88
88
  { immediate: !0 }
89
89
  ), Y(() => {
90
90
  f == null || f(), f = void 0;
91
- }), (s, u) => {
91
+ }), (s, i) => {
92
92
  var V;
93
- return d(t).hidden ? A("", !0) : (i(), E(P, { key: 0 }, [
94
- (V = h.value.define) != null && V.type ? (i(), y(q, {
93
+ return p(t).hidden ? A("", !0) : (c(), E(P, { key: 0 }, [
94
+ (V = _.value.define) != null && V.type ? (c(), y(q, {
95
95
  key: 0,
96
- wrappers: d($)
96
+ wrappers: p(h)
97
97
  }, {
98
98
  default: D(() => [
99
- d(g) ? (i(), y(k(c.value), I({ key: 0 }, p.value, b(d(l))), null, 16)) : d(w) ? (i(), y(k(c.value), I({ key: 1 }, x.value, b(d(l))), null, 16)) : (i(), E(P, { key: 2 }, [
100
- h.value.form.control ? (i(), y(k(c.value), I({ key: 0 }, _.value, b(d(l)), {
99
+ p(g) ? (c(), y(k(d.value), I({ key: 0 }, x.value, b(p(l))), null, 16)) : p(w) ? (c(), y(k(d.value), I({ key: 1 }, $.value, b(p(l))), null, 16)) : (c(), E(P, { key: 2 }, [
100
+ _.value.form.control ? (c(), y(k(d.value), I({ key: 0 }, u.value, b(p(l)), {
101
101
  ref_key: "childRef",
102
102
  ref: C
103
- }), null, 16)) : (i(), y(k(c.value), I({ key: 1 }, _.value, b(d(l))), null, 16))
103
+ }), null, 16)) : (c(), y(k(d.value), I({ key: 1 }, u.value, b(p(l))), null, 16))
104
104
  ], 64))
105
105
  ]),
106
106
  _: 1
@@ -140,43 +140,43 @@ const Ce = /* @__PURE__ */ j({
140
140
  const t = O(void 0);
141
141
  return H(
142
142
  () => [n.schema, n.options],
143
- ([a, p], x, $) => {
144
- const g = ue({ providers: [], parent: l }), w = re(a, {
143
+ ([a, u], x, $) => {
144
+ const h = ue({ providers: [], parent: l }), g = re(a, {
145
145
  handle: pe,
146
146
  builder: fe,
147
- injector: g,
148
- registerOnDestroy: (c) => {
149
- g.get(ie).onDestroy(() => {
150
- c();
147
+ injector: h,
148
+ registerOnDestroy: (d) => {
149
+ h.get(ie).onDestroy(() => {
150
+ d();
151
151
  });
152
152
  },
153
- ...p
153
+ ...u
154
154
  });
155
- t.value = w;
156
- let _;
157
- if (w.form.control) {
158
- const c = n.modelValue;
159
- _ = ve(
160
- typeof c < "u" ? c : void 0,
161
- w.form.control,
162
- g,
163
- (h) => {
155
+ t.value = g;
156
+ let w;
157
+ if (g.form.control) {
158
+ const d = n.modelValue;
159
+ w = ve(
160
+ typeof d < "u" ? d : void 0,
161
+ g.form.control,
162
+ h,
163
+ (_) => {
164
164
  ce(() => {
165
165
  var C;
166
- (C = w.form.control) != null && C.valueNoError$$() && r("update:modelValue", h);
166
+ (C = g.form.control) != null && C.valueNoError$$() && r("update:modelValue", _);
167
167
  });
168
168
  }
169
169
  );
170
170
  }
171
171
  $(() => {
172
- g.destroy(), _ == null || _.destroy();
172
+ h.destroy(), w == null || w.destroy();
173
173
  });
174
174
  },
175
175
  { immediate: !0 }
176
176
  ), G(() => {
177
177
  var a;
178
178
  (a = t.value.form.control) == null || a.updateValue(n.modelValue);
179
- }), (a, p) => (i(), y(z, {
179
+ }), (a, u) => (c(), y(z, {
180
180
  field: t.value
181
181
  }, null, 8, ["field"]));
182
182
  }
@@ -216,7 +216,7 @@ const ke = /* @__PURE__ */ j({
216
216
  },
217
217
  setup(o) {
218
218
  const e = o;
219
- return (n, r) => (i(!0), E(P, null, Z(e.fields, (l, t) => (i(), y(z, {
219
+ return (n, r) => (c(!0), E(P, null, Z(e.fields, (l, t) => (c(), y(z, {
220
220
  key: t,
221
221
  field: l
222
222
  }, null, 8, ["field"]))), 128));
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
- {
2
- "name": "@piying/view-vue",
3
- "version": "1.1.13",
4
- "type": "module",
5
- "dependencies": {
6
- "@piying/view-core": "^0.6.27",
7
- "fast-equals": "^5.2.2",
8
- "rfdc": "^1.4.1",
9
- "static-injector": "^6.1.2"
10
- },
11
- "sideEffects": false,
12
- "peerDependencies": {
13
- "vue": "^3.4.21"
14
- },
15
- "module": "index.js",
16
- "typings": "index.d.ts",
17
- "exports": {
18
- "./package.json": {
19
- "default": "./package.json"
20
- },
21
- ".": {
22
- "types": "./index.d.ts",
23
- "default": "./index.js"
24
- }
25
- }
1
+ {
2
+ "name": "@piying/view-vue",
3
+ "version": "1.1.14",
4
+ "type": "module",
5
+ "dependencies": {
6
+ "@piying/view-core": "^0.6.27",
7
+ "fast-equals": "^5.2.2",
8
+ "rfdc": "^1.4.1",
9
+ "static-injector": "^6.1.2"
10
+ },
11
+ "sideEffects": false,
12
+ "peerDependencies": {
13
+ "vue": "^3.4.21"
14
+ },
15
+ "module": "index.js",
16
+ "typings": "index.d.ts",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./index.d.ts",
23
+ "default": "./index.js"
24
+ }
25
+ }
26
26
  }