@harbor-design/proform 1.1.20 → 1.1.21
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.
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
2
|
var oe = (r, e, t) => e in r ? ie(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var a = (r, e, t) => (oe(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { isRef as x, watch as I, isReactive as
|
|
4
|
+
import { isRef as x, watch as I, isReactive as k, toRaw as E, nextTick as w, ref as q, reactive as ne, createVNode as p, withDirectives as Z, mergeProps as S, vShow as A, createTextVNode as le, isVNode as ae, defineComponent as ue } from "vue";
|
|
5
5
|
class l {
|
|
6
6
|
static typeChecker(e) {
|
|
7
7
|
return {}.toString.call(e);
|
|
@@ -112,10 +112,10 @@ function g(r) {
|
|
|
112
112
|
}
|
|
113
113
|
return t(r);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function U(r, e) {
|
|
116
116
|
return r.replace(/undefined/g, e);
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class ce {
|
|
119
119
|
constructor(e) {
|
|
120
120
|
a(this, "runtimeCore");
|
|
121
121
|
this.formCustomization = e;
|
|
@@ -131,7 +131,7 @@ class fe {
|
|
|
131
131
|
}
|
|
132
132
|
submit() {
|
|
133
133
|
var s;
|
|
134
|
-
const e = (s =
|
|
134
|
+
const e = (s = f.presets.uiPresets[this.runtimeCore.ui]) == null ? void 0 : s.adapter, t = b.adapters[this.runtimeCore.ui];
|
|
135
135
|
return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
|
|
136
136
|
}
|
|
137
137
|
hydrate(e) {
|
|
@@ -151,7 +151,7 @@ class fe {
|
|
|
151
151
|
deep: !0,
|
|
152
152
|
immediate: !0
|
|
153
153
|
}
|
|
154
|
-
) :
|
|
154
|
+
) : k(e) ? I(
|
|
155
155
|
() => e,
|
|
156
156
|
() => {
|
|
157
157
|
m(this.runtimeCore.model.value, e);
|
|
@@ -168,7 +168,7 @@ class fe {
|
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
class
|
|
171
|
+
class N {
|
|
172
172
|
constructor() {
|
|
173
173
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
174
174
|
}
|
|
@@ -184,7 +184,7 @@ class U {
|
|
|
184
184
|
return !t.lazy && e(), this.effects.add(e), () => this.effects.delete(e);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
class
|
|
187
|
+
class fe {
|
|
188
188
|
constructor(e) {
|
|
189
189
|
a(this, "runtimeCore");
|
|
190
190
|
a(this, "processedSchemas");
|
|
@@ -196,8 +196,8 @@ class ce {
|
|
|
196
196
|
a(this, "componentPropsPreset", b.componentPropsPreset);
|
|
197
197
|
a(this, "stableUpdaterProcessProgress");
|
|
198
198
|
a(this, "stableUpdaterTimes", 0);
|
|
199
|
-
a(this, "schemaEffect", new
|
|
200
|
-
a(this, "defaultValueEffect", new
|
|
199
|
+
a(this, "schemaEffect", new N());
|
|
200
|
+
a(this, "defaultValueEffect", new N());
|
|
201
201
|
a(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
202
202
|
a(this, "baseDefaultValueFunctionsLength");
|
|
203
203
|
a(this, "isModelInitialized", !0);
|
|
@@ -265,17 +265,17 @@ class ce {
|
|
|
265
265
|
}).fill(!1);
|
|
266
266
|
this.objectParser({ data: e, index: t, updater: n });
|
|
267
267
|
function n(u) {
|
|
268
|
-
const
|
|
268
|
+
const c = u.index, d = u.key, y = u.keyIndex;
|
|
269
269
|
if (l.isUndefined(u.stable))
|
|
270
270
|
return;
|
|
271
271
|
const O = i.parseStable(u.stable), C = s == null ? void 0 : s.index, v = s == null ? void 0 : s.key;
|
|
272
272
|
let P = O;
|
|
273
273
|
if (l.isProcessInprogress(P) || (o[y] = !0), s) {
|
|
274
|
-
let h = i.processedSchemas.value[C][v][
|
|
275
|
-
h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[C][v][
|
|
274
|
+
let h = i.processedSchemas.value[C][v][c][d];
|
|
275
|
+
h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[C][v][c][d] = P, i.stableUpdater(o);
|
|
276
276
|
} else {
|
|
277
|
-
let h = i.processedSchemas.value[
|
|
278
|
-
h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[
|
|
277
|
+
let h = i.processedSchemas.value[c][d];
|
|
278
|
+
h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[c][d] = P, i.stableUpdater(o);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -307,20 +307,20 @@ class ce {
|
|
|
307
307
|
}) : this.defaultValueEffect.trackEffect(
|
|
308
308
|
() => {
|
|
309
309
|
const u = this.schemaEffect.trackEffect(() => {
|
|
310
|
-
/\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (
|
|
311
|
-
if (!
|
|
312
|
-
return n(
|
|
313
|
-
this.defaultValueInprogressMap.set(t[i],
|
|
310
|
+
/\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (c) => {
|
|
311
|
+
if (!c)
|
|
312
|
+
return n(c);
|
|
313
|
+
this.defaultValueInprogressMap.set(t[i], c), !l.isProcessInprogress(c) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
314
314
|
this.defaultValueInprogressMap.values()
|
|
315
|
-
).every((d) => !d.includes("undefined")) ? (n(
|
|
315
|
+
).every((d) => !d.includes("undefined")) ? (n(c), this.defaultValueEffect.clearEffects(), w(() => {
|
|
316
316
|
u();
|
|
317
|
-
})) : n(
|
|
318
|
-
}) : this.fieldParser(t[i], (
|
|
319
|
-
this.defaultValueInprogressMap.set(t[i],
|
|
317
|
+
})) : n(c);
|
|
318
|
+
}) : this.fieldParser(t[i], (c) => {
|
|
319
|
+
this.defaultValueInprogressMap.set(t[i], c), !l.isProcessInprogress(c) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
320
320
|
this.defaultValueInprogressMap.values()
|
|
321
|
-
).every((d) => !d.includes("undefined")) ? (n(
|
|
321
|
+
).every((d) => !d.includes("undefined")) ? (n(c), this.defaultValueEffect.clearEffects(), w(() => {
|
|
322
322
|
u();
|
|
323
|
-
})) : n(
|
|
323
|
+
})) : n(c);
|
|
324
324
|
});
|
|
325
325
|
});
|
|
326
326
|
},
|
|
@@ -333,11 +333,11 @@ class ce {
|
|
|
333
333
|
}
|
|
334
334
|
promiseFieldParser(e, t, s) {
|
|
335
335
|
l.isPromise(e) ? e.then((i) => {
|
|
336
|
-
l.isString(i) && (i =
|
|
336
|
+
l.isString(i) && (i = U(i, "")), s && l.isObject(i) ? this.objectParser({
|
|
337
337
|
data: i,
|
|
338
338
|
updater: t
|
|
339
339
|
}) : t(i);
|
|
340
|
-
}) : (l.isString(e) && (e =
|
|
340
|
+
}) : (l.isString(e) && (e = U(e, "")), s && l.isObject(e) ? this.objectParser({
|
|
341
341
|
data: e,
|
|
342
342
|
updater: t
|
|
343
343
|
}) : t(e));
|
|
@@ -369,7 +369,7 @@ class ce {
|
|
|
369
369
|
immediate: !0,
|
|
370
370
|
deep: !0
|
|
371
371
|
}
|
|
372
|
-
) :
|
|
372
|
+
) : k(e) ? I(
|
|
373
373
|
() => e,
|
|
374
374
|
() => {
|
|
375
375
|
l.isUndefined(e) || (s && l.isObject(e) ? this.objectParser({
|
|
@@ -401,22 +401,22 @@ class ce {
|
|
|
401
401
|
}
|
|
402
402
|
class F {
|
|
403
403
|
static getFormContainer({ ui: e } = {}) {
|
|
404
|
-
return
|
|
404
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Form;
|
|
405
405
|
}
|
|
406
406
|
static getFormItemContainer({ ui: e } = {}) {
|
|
407
|
-
return
|
|
407
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.FormItem;
|
|
408
408
|
}
|
|
409
409
|
static getItemContainer({ ui: e } = {}) {
|
|
410
|
-
return
|
|
410
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Item;
|
|
411
411
|
}
|
|
412
412
|
static getGroupContainer({ ui: e } = {}) {
|
|
413
|
-
return
|
|
413
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Group;
|
|
414
414
|
}
|
|
415
415
|
static getListContainer({ ui: e } = {}) {
|
|
416
|
-
return
|
|
416
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.List;
|
|
417
417
|
}
|
|
418
418
|
static getListItemContainer({ ui: e } = {}) {
|
|
419
|
-
return
|
|
419
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.ListItem;
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
class de {
|
|
@@ -425,27 +425,27 @@ class de {
|
|
|
425
425
|
}
|
|
426
426
|
getRuntimeField(e) {
|
|
427
427
|
var i;
|
|
428
|
-
const t = (i =
|
|
428
|
+
const t = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = b.adapters[this.ui];
|
|
429
429
|
return (t == null ? void 0 : t.getRuntimeField(e)) ?? (s == null ? void 0 : s.getRuntimeField(e));
|
|
430
430
|
}
|
|
431
431
|
getRuntimeRequired(e) {
|
|
432
432
|
var i;
|
|
433
|
-
const t = (i =
|
|
433
|
+
const t = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = b.adapters[this.ui];
|
|
434
434
|
return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (s == null ? void 0 : s.getRuntimeRequired(e));
|
|
435
435
|
}
|
|
436
436
|
getFormModelPropName() {
|
|
437
437
|
var s;
|
|
438
|
-
const e = (s =
|
|
438
|
+
const e = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, t = b.adapters[this.ui];
|
|
439
439
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
|
|
440
440
|
}
|
|
441
441
|
formComponentRenderer(e) {
|
|
442
442
|
var i;
|
|
443
|
-
const t = (i =
|
|
443
|
+
const t = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = b.adapters[this.ui];
|
|
444
444
|
return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (s == null ? void 0 : s.formComponentRenderer(e));
|
|
445
445
|
}
|
|
446
446
|
clearValidate(e) {
|
|
447
447
|
var i;
|
|
448
|
-
const t = (i =
|
|
448
|
+
const t = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = b.adapters[this.ui];
|
|
449
449
|
return (t == null ? void 0 : t.clearValidate(e)) ?? (s == null ? void 0 : s.clearValidate(e));
|
|
450
450
|
}
|
|
451
451
|
}
|
|
@@ -462,7 +462,7 @@ class he {
|
|
|
462
462
|
list: this.runtimeListProcessor.bind(this)
|
|
463
463
|
});
|
|
464
464
|
a(this, "formRef", q(null));
|
|
465
|
-
a(this, "hydrateEffect", new
|
|
465
|
+
a(this, "hydrateEffect", new N());
|
|
466
466
|
a(this, "native", ne({}));
|
|
467
467
|
a(this, "grid", {});
|
|
468
468
|
a(this, "runtime", {});
|
|
@@ -470,9 +470,9 @@ class he {
|
|
|
470
470
|
props: {},
|
|
471
471
|
slots: {}
|
|
472
472
|
});
|
|
473
|
-
this.setup = e, this.processor = new
|
|
473
|
+
this.setup = e, this.processor = new fe(this);
|
|
474
474
|
const t = this.setup(this);
|
|
475
|
-
if (this.ui = t.ui ??
|
|
475
|
+
if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new de(this.ui), x(t.schemas)) {
|
|
476
476
|
const s = I(() => t.schemas, () => {
|
|
477
477
|
this.processor.parseSchemas(t.schemas.value), w(() => {
|
|
478
478
|
s();
|
|
@@ -480,7 +480,7 @@ class he {
|
|
|
480
480
|
}, {
|
|
481
481
|
deep: !0
|
|
482
482
|
});
|
|
483
|
-
} else if (
|
|
483
|
+
} else if (k(t.schemas)) {
|
|
484
484
|
const s = I(() => t.schemas, () => {
|
|
485
485
|
this.processor.parseSchemas(t.schemas), w(() => {
|
|
486
486
|
s();
|
|
@@ -498,16 +498,16 @@ class he {
|
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
500
|
runtimeItemProcessor(e, t, s = this.model.value, i) {
|
|
501
|
-
var
|
|
501
|
+
var z, $, _, B, D, G, T, K, W, H, J, Q, X;
|
|
502
502
|
const o = E(e.component);
|
|
503
503
|
if (!o)
|
|
504
504
|
return;
|
|
505
|
-
m(this.globalNativeFormOverride.props, ($ = (
|
|
505
|
+
m(this.globalNativeFormOverride.props, ($ = (z = e.native) == null ? void 0 : z.props) == null ? void 0 : $.Form), m(this.globalNativeFormOverride.slots, (B = (_ = e.native) == null ? void 0 : _.slots) == null ? void 0 : B.Form);
|
|
506
506
|
const n = m(g((G = (D = this.native) == null ? void 0 : D.slots) == null ? void 0 : G.FormItem) ?? {}, (K = (T = e.native) == null ? void 0 : T.slots) == null ? void 0 : K.FormItem), u = {
|
|
507
507
|
display: "grid",
|
|
508
508
|
gridColumn: "1 / -1",
|
|
509
509
|
...e.grid
|
|
510
|
-
},
|
|
510
|
+
}, c = m(g((H = (W = this.native) == null ? void 0 : W.props) == null ? void 0 : H.FormItem) ?? {}, (Q = (J = e.native) == null ? void 0 : J.props) == null ? void 0 : Q.FormItem), d = this.runtimeAdapter.getRuntimeField({
|
|
511
511
|
schema: e,
|
|
512
512
|
parentSchema: i,
|
|
513
513
|
index: t
|
|
@@ -516,12 +516,12 @@ class he {
|
|
|
516
516
|
P === void 0 && (P = !0), P || delete s[e.field];
|
|
517
517
|
let h = e.label;
|
|
518
518
|
const V = (i == null ? void 0 : i.runtime) ?? this.runtime;
|
|
519
|
-
if (!l.isUndefined(t) && !l.isObjectEmpty(V) && (h =
|
|
520
|
-
let
|
|
521
|
-
l.isUndefined(y) ? v = `${
|
|
522
|
-
C[y.toLowerCase()], v = `${
|
|
523
|
-
y.toLowerCase().includes(Y.toLowerCase()) && (
|
|
524
|
-
}), v = `${
|
|
519
|
+
if (!l.isUndefined(t) && !l.isObjectEmpty(V) && (h = U((X = V == null ? void 0 : V.customizeItemLabel) == null ? void 0 : X.call(V, e.label ?? "", t + 1), "")), !v) {
|
|
520
|
+
let R = "请输入";
|
|
521
|
+
l.isUndefined(y) ? v = `${R}${h}` : /* @ts-expect-error */ C[y.toLowerCase()] ? (R = // @ts-expect-error
|
|
522
|
+
C[y.toLowerCase()], v = `${R}${h}`) : (Object.keys(C).forEach((Y) => {
|
|
523
|
+
y.toLowerCase().includes(Y.toLowerCase()) && (R = C[Y]);
|
|
524
|
+
}), v = `${R}${h}`);
|
|
525
525
|
}
|
|
526
526
|
const ee = this.runtimeAdapter.getRuntimeRequired({
|
|
527
527
|
...e,
|
|
@@ -531,7 +531,7 @@ class he {
|
|
|
531
531
|
style: u
|
|
532
532
|
}, [p(te, null, {
|
|
533
533
|
default() {
|
|
534
|
-
return Z(p(se,
|
|
534
|
+
return Z(p(se, S(c, {
|
|
535
535
|
label: `${h}:`
|
|
536
536
|
}, d, ee), {
|
|
537
537
|
default() {
|
|
@@ -591,13 +591,13 @@ class he {
|
|
|
591
591
|
default() {
|
|
592
592
|
return s.model.value[e.field].map((n, u) => p(o, null, {
|
|
593
593
|
default() {
|
|
594
|
-
return e.children.map((
|
|
594
|
+
return e.children.map((c) => s.runtimeItemProcessor(c, u, n, e));
|
|
595
595
|
},
|
|
596
596
|
delete({
|
|
597
|
-
container:
|
|
597
|
+
container: c
|
|
598
598
|
} = {}) {
|
|
599
599
|
var y;
|
|
600
|
-
let d =
|
|
600
|
+
let d = c ?? p("button", null, null);
|
|
601
601
|
return Z(p(d, {
|
|
602
602
|
onClick: () => s.deleteListItem(e, u)
|
|
603
603
|
}, null), [[A, ((y = s.model.value[e.field]) == null ? void 0 : y.length) > 1]]);
|
|
@@ -618,14 +618,14 @@ class he {
|
|
|
618
618
|
return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
|
|
619
619
|
}
|
|
620
620
|
exec() {
|
|
621
|
-
var u,
|
|
621
|
+
var u, c, d, y;
|
|
622
622
|
const e = {
|
|
623
623
|
display: "grid",
|
|
624
624
|
gridColumn: "1 / -1",
|
|
625
625
|
gridAutoColumns: "1fr",
|
|
626
626
|
...this.grid
|
|
627
|
-
}, t = this, s = m(g((
|
|
628
|
-
return p(o,
|
|
627
|
+
}, t = this, s = m(g((c = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : c.Form) ?? {}, this.globalNativeFormOverride.props), i = m(g((y = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : y.Form) ?? {}, this.globalNativeFormOverride.slots), o = F.getFormContainer(this), n = this.runtimeAdapter.getFormModelPropName();
|
|
628
|
+
return p(o, S(s, {
|
|
629
629
|
ref: this.formRef
|
|
630
630
|
}, {
|
|
631
631
|
[n]: this.model.value
|
|
@@ -639,9 +639,9 @@ class he {
|
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
class
|
|
642
|
+
class f {
|
|
643
643
|
}
|
|
644
|
-
a(
|
|
644
|
+
a(f, "presets");
|
|
645
645
|
function M({
|
|
646
646
|
parentSchema: r,
|
|
647
647
|
schema: e,
|
|
@@ -686,7 +686,7 @@ const me = {
|
|
|
686
686
|
placeholder: s,
|
|
687
687
|
props: i
|
|
688
688
|
}) {
|
|
689
|
-
return p(r,
|
|
689
|
+
return p(r, S({
|
|
690
690
|
modelValue: e[t.field],
|
|
691
691
|
"onUpdate:modelValue": (o) => e[t.field] = o,
|
|
692
692
|
placeholder: s
|
|
@@ -738,7 +738,7 @@ const me = {
|
|
|
738
738
|
placeholder: s,
|
|
739
739
|
props: i
|
|
740
740
|
}) {
|
|
741
|
-
return p(r,
|
|
741
|
+
return p(r, S({
|
|
742
742
|
modelValue: e[t.field],
|
|
743
743
|
"onUpdate:modelValue": (o) => e[t.field] = o,
|
|
744
744
|
placeholder: s
|
|
@@ -795,7 +795,7 @@ const me = {
|
|
|
795
795
|
placeholder: s,
|
|
796
796
|
props: i
|
|
797
797
|
}) {
|
|
798
|
-
return p(r,
|
|
798
|
+
return p(r, S({
|
|
799
799
|
value: e[t.field],
|
|
800
800
|
"onUpdate:value": (o) => e[t.field] = o,
|
|
801
801
|
placeholder: s
|
|
@@ -875,7 +875,7 @@ const b = {
|
|
|
875
875
|
adapters: {
|
|
876
876
|
...me
|
|
877
877
|
}
|
|
878
|
-
},
|
|
878
|
+
}, ve = /* @__PURE__ */ ue({
|
|
879
879
|
props: {
|
|
880
880
|
setup: {
|
|
881
881
|
type: Function,
|
|
@@ -887,8 +887,8 @@ const b = {
|
|
|
887
887
|
return () => e.exec();
|
|
888
888
|
}
|
|
889
889
|
});
|
|
890
|
-
function
|
|
891
|
-
const e = new
|
|
890
|
+
function ge(r) {
|
|
891
|
+
const e = new ce(r);
|
|
892
892
|
return [
|
|
893
893
|
e.setup.bind(e),
|
|
894
894
|
{
|
|
@@ -897,18 +897,22 @@ function ve(r) {
|
|
|
897
897
|
}
|
|
898
898
|
];
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
|
|
900
|
+
function Ce(r) {
|
|
901
|
+
f.presets = r;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
return e === "
|
|
903
|
+
function ye(r, e) {
|
|
904
|
+
return e === "native" && Object.defineProperty(r, "name", {
|
|
905
905
|
value: `__proform_raw_${r.name}`,
|
|
906
906
|
writable: !0
|
|
907
907
|
}), r;
|
|
908
908
|
}
|
|
909
|
+
function Ie(r) {
|
|
910
|
+
return ye(r, "native");
|
|
911
|
+
}
|
|
909
912
|
export {
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
ge as
|
|
913
|
-
Ce as
|
|
913
|
+
ve as ProForm,
|
|
914
|
+
Ie as markNativeFunction,
|
|
915
|
+
ge as useForm,
|
|
916
|
+
Ce as useFormPresetConfigurer,
|
|
917
|
+
ye as useModifiers
|
|
914
918
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export { default as ProForm } from "./src/form/index";
|
|
|
2
2
|
export { useForm } from "./src/interactions/useForm";
|
|
3
3
|
export { useFormPresetConfigurer } from "./src/interactions/useFormPresetConfigurer";
|
|
4
4
|
export { useModifiers } from "./src/interactions/useModifiers";
|
|
5
|
+
export { markNativeFunction } from "./src/interactions/useModifiers";
|
|
5
6
|
export * from "./src/types/index";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { runtimeMeta } from "../types";
|
|
2
|
-
type Modifier = "
|
|
3
|
-
|
|
4
|
-
rawArgs: any[];
|
|
5
|
-
} & runtimeMeta) => any, modifier: Modifier): (args: {
|
|
2
|
+
type Modifier = "native";
|
|
3
|
+
type FunctionNative = (args: {
|
|
6
4
|
rawArgs: any[];
|
|
7
5
|
} & runtimeMeta) => any;
|
|
6
|
+
export declare function useModifiers(functionNative: FunctionNative, modifier: Modifier): FunctionNative;
|
|
7
|
+
export declare function markNativeFunction(functionNative: FunctionNative): FunctionNative;
|
|
8
8
|
export {};
|