@piying/view-react 1.2.1 → 1.3.1
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/component/group.d.ts +1 -3
- package/index.cjs +4 -4
- package/index.js +360 -368
- package/package.json +2 -2
- package/readme.md +27 -1
package/component/group.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { PiResolvedViewFieldConfig } from '../type';
|
|
2
1
|
export interface PiyingGroupProps {
|
|
3
|
-
fields: PiResolvedViewFieldConfig[];
|
|
4
2
|
}
|
|
5
|
-
export declare function PiyingGroup(
|
|
3
|
+
export declare function PiyingGroup(_: PiyingGroupProps): import("react/jsx-runtime").JSX.Element;
|
package/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),v=require("static-injector"),A=require("@piying/view-core"),be=require("fast-equals");require("valibot");var y={exports:{}},x={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var H;function he(){if(H)return x;H=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(u,o,l){var i=null;if(l!==void 0&&(i=""+l),o.key!==void 0&&(i=""+o.key),"key"in o){l={};for(var E in o)E!=="key"&&(l[E]=o[E])}else l=o;return o=l.ref,{$$typeof:r,type:u,key:i,ref:o!==void 0?o:null,props:l}}return x.Fragment=t,x.jsx=n,x.jsxs=n,x}var S={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var X;function Ee(){return X||(X=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case ne:return"Profiler";case te:return"StrictMode";case le:return"Suspense";case ae:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return"Portal";case ue:return(e.displayName||"Context")+".Provider";case oe:return(e._context.displayName||"Context")+".Consumer";case se:var s=e.render;return e=e.displayName,e||(e=s.displayName||s.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ce:return s=e.displayName||null,s!==null?s:r(e.type)||"Memo";case L:s=e._payload,e=e._init;try{return r(e(s))}catch{}}return null}function t(e){return""+e}function n(e){try{t(e);var s=!1}catch{s=!0}if(s){s=console;var c=s.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(e)}}function u(e){if(e===w)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===L)return"<...>";try{var s=r(e);return s?"<"+s+">":"<...>"}catch{return"<...>"}}function o(){var e=I.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function i(e){if(W.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function E(e,s){function c(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s))}c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}function d(){var e=r(this.type);return U[e]||(U[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function T(e,s,c,b,_,R,N,F){return c=R.ref,e={$$typeof:O,type:e,key:s,props:R,_owner:_},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:d}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function k(e,s,c,b,_,R,N,F){var h=s.children;if(h!==void 0)if(b)if(fe(h)){for(b=0;b<h.length;b++)j(h[b]);Object.freeze&&Object.freeze(h)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(h);if(W.call(s,"key")){h=r(e);var C=Object.keys(s).filter(function(me){return me!=="key"});b=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",z[h+b]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,b,
|
|
22
|
+
<%s key={someKey} {...props} />`,b,h,C,h),z[h+b]=!0)}if(h=null,c!==void 0&&(n(c),h=""+c),i(s)&&(n(s.key),h=""+s.key),"key"in s){c={};for(var Y in s)Y!=="key"&&(c[Y]=s[Y])}else c=s;return h&&E(c,typeof e=="function"?e.displayName||e.name||"Unknown":e),T(e,h,R,_,o(),c,N,F)}function j(e){typeof e=="object"&&e!==null&&e.$$typeof===O&&e._store&&(e._store.validated=1)}var g=a,O=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),ue=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),de=Symbol.for("react.client.reference"),I=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,fe=Array.isArray,M=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(e){return e()}};var q,U={},B=g.react_stack_bottom_frame.bind(g,l)(),J=M(u(l)),z={};S.Fragment=w,S.jsx=function(e,s,c,b,_){var R=1e4>I.recentlyCreatedOwnerStacks++;return k(e,s,c,!1,b,_,R?Error("react-stack-top-frame"):B,R?M(u(e)):J)},S.jsxs=function(e,s,c,b,_){var R=1e4>I.recentlyCreatedOwnerStacks++;return k(e,s,c,!0,b,_,R?Error("react-stack-top-frame"):B,R?M(u(e)):J)}}()),S}var Z;function ge(){return Z||(Z=1,process.env.NODE_ENV==="production"?y.exports=he():y.exports=Ee()),y.exports}var f=ge();const V=a.createContext(void 0),P=a.createContext(void 0);function p(r,t){const n=a.useContext(P),[u,o]=a.useState(a.useMemo(()=>t(r),[])),l=a.useRef(u);return a.useEffect(()=>{const i=t(r);Object.is(l.current,i)||(o(i),l.current=i);const E=v.effect(()=>{const d=t(r);Object.is(l.current,d)||(o(d),l.current=d)},{injector:n});return()=>{E.destroy()}},[r,a.useMemo(()=>t,[])]),u}function $(r){const t=a.useMemo(()=>r.wrappers.slice(1),[r.wrappers]),n=r.wrappers[0],u=p(n,()=>({...n?.inputs(),...n?.attributes(),...n?.outputs}));return f.jsx(f.Fragment,{children:n?f.jsx(n.type,{...u,children:f.jsx($,{wrappers:t,children:r.children})}):r.children})}const Q=Symbol.for("ControlValueAccessor");function G(r){const t=p(r.field,m=>m.inputs()),n=p(r.field,m=>m.outputs()),u=p(r.field,m=>m.attributes()),o=a.useMemo(()=>({...u,...t,...n}),[u,t,n]),l=p(r.field,m=>m.renderConfig()),i=p(r.field,m=>m.children?.()),E=p(r.field,m=>m.wrappers()),d=r.field.form.control,T=r.field.define?.type,k=a.useMemo(()=>!!l.hidden||!T,[l.hidden,T]),j=a.useContext(P),g=a.useRef(void 0),O=a.useMemo(()=>({...o,[Q]:g}),[o,g]);return a.useEffect(()=>{let m;return g.current&&(m=A.createViewControlLink(()=>d,g.current,j)),()=>{m?.(),m=void 0}},[g.current,d,j]),f.jsx(f.Fragment,{children:f.jsx(V,{value:r.field,children:k?void 0:f.jsx($,{wrappers:E,children:i?f.jsx(T,{...o}):r.field.form.control?f.jsx(T,{...O}):f.jsx(T,{...o})})})})}function K(r,t,n,u){let o=!0;return v.effect(()=>{const l=t.value$$();o?(be.deepEqual(l,r)||u(l),o=!1):u(l)},{injector:n})}function Re(){const[r,t]=a.useState(void 0),[n,u]=a.useState(!1),o=a.useRef(void 0),l=a.useRef(void 0),i=a.useMemo(()=>({writeValue(d){t(d)},registerOnChange(d){o.current=d},registerOnTouched(d){l.current=d},setDisabledState(d){u(d)}}),[]),E=a.useMemo(()=>({value:r,disabled:n,valueChange:d=>{o.current?.(d),t(d)},touchedChange:()=>{l.current?.()}}),[r,n]);return a.useMemo(()=>({cva:i,cvaa:E}),[E])}function D(r,t){const n=a.useCallback(r,t),u=a.useRef(void 0);a.useMemo(()=>(u.current=n(),u.current),t),a.useEffect(()=>()=>{u.current?.(),u.current=void 0},[])}function pe(r){const t=a.useContext(V),n=p(t,u=>u?.children());return f.jsx(f.Fragment,{children:n.map((u,o)=>f.jsx(G,{field:u},o))})}class ee extends A.CoreSchemaHandle{}class re extends A.FormBuilder{}function _e(r){const t=a.useMemo(()=>v.createRootInjector({providers:[{provide:v.ChangeDetectionScheduler,useClass:v.ChangeDetectionSchedulerImpl}]}),[]),[n,u]=a.useMemo(()=>{const o=v.createInjector({providers:[],parent:t});return[A.convert(r.schema,{handle:ee,builder:re,injector:o,registerOnDestroy:i=>{o.get(v.DestroyRef).onDestroy(i)},...r.options}),o]},[r.schema,r.options]);return D(()=>{let o;if(n.form.control){const l=r.model;o=K(typeof l<"u"?l:void 0,n.form.control,u,i=>{v.untracked(()=>{n.form.control?.valueNoError$$()&&r.modelChange?.(i)})})}return()=>{u.destroy(),o?.destroy()}},[n]),D(()=>{n.form.control?.updateValue(r.model)},[n,r.model]),f.jsx(f.Fragment,{children:f.jsx(P,{value:t,children:f.jsx(G,{field:n})})})}const ve=[],Te={directives:"merge",formConfig:"merge",inputs:"merge",outputs:"merge",props:"merge",renderConfig:"merge",wrappers:"replace"};function Ce(r,t){const n=a.useRef(!1);return a.useMemo(()=>{const u={value:r.value==null?"":r.value,disabled:r.disabled,onBlur:r.touchedChange};return t?{...u,onCompositionStart:()=>{n.current=!0},onCompositionEnd:o=>{n.current=!1,r.valueChange(o.target.value)}}:{...u,onInput:o=>r.valueChange(o.target.value)}},[r,t])}function je(r){return a.useMemo(()=>({checked:r.value??!1,disabled:r.disabled,onBlur:r.touchedChange,onChange:t=>r.valueChange(t.target.checked)}),[r])}function xe(r){return a.useMemo(()=>({value:r.value==null?"":r.value,disabled:r.disabled,onBlur:r.touchedChange,onInput:t=>{const n=t.target.value;r.valueChange(n==""?void 0:parseFloat(n))}}),[r])}function Se(r,t){return a.useMemo(()=>({value:t,checked:Object.is(r.value,t),disabled:r.disabled,onBlur:r.touchedChange,onChange:()=>r.valueChange(t)}),[r])}function ke(r){return a.useMemo(()=>{const t=n=>{const u=n.target.value;r.valueChange(u==""?void 0:parseFloat(u))};return{value:r.value==null?"":r.value,disabled:r.disabled,onBlur:r.touchedChange,onInput:t,onChange:t}},[r])}function Oe(r,t=!1){return a.useMemo(()=>({value:r.value,disabled:r.disabled,onBlur:r.touchedChange,onChange:n=>{const u=[],o=n.target;if(o.selectedOptions!==void 0)for(let l=0;l<o.selectedOptions.length;l++){const i=o.selectedOptions[l];if(u.push(i.value),!t)break}else for(let l=0;l<o.options.length;l++){const i=o.options[l];if(i.selected&&(u.push(i.value),!t))break}r.valueChange(t?u:u[0])}}),[r])}exports.CVA=Q;exports.EMPTY_ARRAY=ve;exports.InjectorToken=P;exports.NG_CONFIG_DEFAULT_MERGE_STRAGEGY=Te;exports.PI_VIEW_FIELD_TOKEN=V;exports.PiyingFieldTemplate=G;exports.PiyingGroup=pe;exports.PiyingView=_e;exports.PiyingWrapper=$;exports.ReactFormBuilder=re;exports.ReactSchemaHandle=ee;exports.initListen=K;exports.useControlValueAccessor=Re;exports.useEffectSync=D;exports.useInputCheckboxModel=je;exports.useInputNumberModel=xe;exports.useInputRadioModel=Se;exports.useInputRangeModel=ke;exports.useInputTextModel=Ce;exports.useSelectModel=Oe;exports.useSignalToRef=p;
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { effect as
|
|
3
|
-
import { createViewControlLink as
|
|
1
|
+
import he, { createContext as Z, useContext as D, useState as Y, useMemo as f, useRef as C, useEffect as M, useCallback as be } from "react";
|
|
2
|
+
import { effect as Q, createRootInjector as ge, ChangeDetectionSchedulerImpl as pe, ChangeDetectionScheduler as Ee, createInjector as Re, DestroyRef as ve, untracked as _e } from "static-injector";
|
|
3
|
+
import { createViewControlLink as Te, CoreSchemaHandle as Ce, FormBuilder as je, convert as xe } from "@piying/view-core";
|
|
4
|
+
import { deepEqual as ke } from "fast-equals";
|
|
4
5
|
import "valibot";
|
|
5
|
-
|
|
6
|
-
var A = { exports: {} }, x = {};
|
|
6
|
+
var w = { exports: {} }, x = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -13,27 +13,27 @@ var A = { exports: {} }, x = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
if (l !== void 0 && (
|
|
16
|
+
var J;
|
|
17
|
+
function Oe() {
|
|
18
|
+
if (J) return x;
|
|
19
|
+
J = 1;
|
|
20
|
+
var r = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
21
|
+
function n(u, o, l) {
|
|
22
|
+
var c = null;
|
|
23
|
+
if (l !== void 0 && (c = "" + l), o.key !== void 0 && (c = "" + o.key), "key" in o) {
|
|
24
24
|
l = {};
|
|
25
|
-
for (var g in
|
|
26
|
-
g !== "key" && (l[g] =
|
|
27
|
-
} else l =
|
|
28
|
-
return
|
|
29
|
-
$$typeof:
|
|
30
|
-
type:
|
|
31
|
-
key:
|
|
32
|
-
ref:
|
|
25
|
+
for (var g in o)
|
|
26
|
+
g !== "key" && (l[g] = o[g]);
|
|
27
|
+
} else l = o;
|
|
28
|
+
return o = l.ref, {
|
|
29
|
+
$$typeof: r,
|
|
30
|
+
type: u,
|
|
31
|
+
key: c,
|
|
32
|
+
ref: o !== void 0 ? o : null,
|
|
33
33
|
props: l
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
return x.Fragment = t, x.jsx =
|
|
36
|
+
return x.Fragment = t, x.jsx = n, x.jsxs = n, x;
|
|
37
37
|
}
|
|
38
38
|
var k = {};
|
|
39
39
|
/**
|
|
@@ -45,375 +45,396 @@ var k = {};
|
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
function e
|
|
52
|
-
if (
|
|
53
|
-
if (typeof
|
|
54
|
-
return
|
|
55
|
-
if (typeof
|
|
56
|
-
switch (
|
|
57
|
-
case
|
|
48
|
+
var z;
|
|
49
|
+
function Se() {
|
|
50
|
+
return z || (z = 1, process.env.NODE_ENV !== "production" && function() {
|
|
51
|
+
function r(e) {
|
|
52
|
+
if (e == null) return null;
|
|
53
|
+
if (typeof e == "function")
|
|
54
|
+
return e.$$typeof === de ? null : e.displayName || e.name || null;
|
|
55
|
+
if (typeof e == "string") return e;
|
|
56
|
+
switch (e) {
|
|
57
|
+
case A:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case
|
|
59
|
+
case ne:
|
|
60
60
|
return "Profiler";
|
|
61
|
-
case
|
|
61
|
+
case te:
|
|
62
62
|
return "StrictMode";
|
|
63
|
-
case se:
|
|
64
|
-
return "Suspense";
|
|
65
63
|
case le:
|
|
64
|
+
return "Suspense";
|
|
65
|
+
case ae:
|
|
66
66
|
return "SuspenseList";
|
|
67
67
|
case ie:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
|
-
if (typeof
|
|
71
|
-
switch (typeof
|
|
70
|
+
if (typeof e == "object")
|
|
71
|
+
switch (typeof e.tag == "number" && console.error(
|
|
72
72
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
|
-
),
|
|
74
|
-
case
|
|
73
|
+
), e.$$typeof) {
|
|
74
|
+
case m:
|
|
75
75
|
return "Portal";
|
|
76
|
-
case oe:
|
|
77
|
-
return (r.displayName || "Context") + ".Provider";
|
|
78
|
-
case ne:
|
|
79
|
-
return (r._context.displayName || "Context") + ".Consumer";
|
|
80
76
|
case ue:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
return (e.displayName || "Context") + ".Provider";
|
|
78
|
+
case oe:
|
|
79
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
80
|
+
case se:
|
|
81
|
+
var s = e.render;
|
|
82
|
+
return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
83
|
+
case ce:
|
|
84
|
+
return s = e.displayName || null, s !== null ? s : r(e.type) || "Memo";
|
|
85
|
+
case $:
|
|
86
|
+
s = e._payload, e = e._init;
|
|
87
87
|
try {
|
|
88
|
-
return e(
|
|
88
|
+
return r(e(s));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
function t(
|
|
95
|
-
return "" +
|
|
94
|
+
function t(e) {
|
|
95
|
+
return "" + e;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function n(e) {
|
|
98
98
|
try {
|
|
99
|
-
t(
|
|
100
|
-
var
|
|
99
|
+
t(e);
|
|
100
|
+
var s = !1;
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
s = !0;
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
return
|
|
108
|
-
|
|
104
|
+
if (s) {
|
|
105
|
+
s = console;
|
|
106
|
+
var a = s.error, h = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
107
|
+
return a.call(
|
|
108
|
+
s,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
111
|
-
), t(
|
|
110
|
+
h
|
|
111
|
+
), t(e);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
114
|
+
function u(e) {
|
|
115
|
+
if (e === A) return "<>";
|
|
116
|
+
if (typeof e == "object" && e !== null && e.$$typeof === $)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var s = r(e);
|
|
120
|
+
return s ? "<" + s + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
var
|
|
127
|
-
return
|
|
125
|
+
function o() {
|
|
126
|
+
var e = y.A;
|
|
127
|
+
return e === null ? null : e.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function l() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
132
|
+
function c(e) {
|
|
133
|
+
if (L.call(e, "key")) {
|
|
134
|
+
var s = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
135
|
+
if (s && s.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return e.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function g(
|
|
140
|
-
function
|
|
139
|
+
function g(e, s) {
|
|
140
|
+
function a() {
|
|
141
141
|
W || (W = !0, console.error(
|
|
142
142
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
143
|
-
|
|
143
|
+
s
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
get:
|
|
146
|
+
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
147
|
+
get: a,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
var
|
|
153
|
-
return
|
|
151
|
+
function i() {
|
|
152
|
+
var e = r(this.type);
|
|
153
|
+
return G[e] || (G[e] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
|
-
)),
|
|
155
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function _(e, s, a, h, R, E, I, N) {
|
|
158
|
+
return a = E.ref, e = {
|
|
159
159
|
$$typeof: S,
|
|
160
|
-
type:
|
|
161
|
-
key:
|
|
160
|
+
type: e,
|
|
161
|
+
key: s,
|
|
162
162
|
props: E,
|
|
163
|
-
_owner:
|
|
164
|
-
}, (
|
|
163
|
+
_owner: R
|
|
164
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
|
-
get:
|
|
167
|
-
}) : Object.defineProperty(
|
|
166
|
+
get: i
|
|
167
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
170
170
|
writable: !0,
|
|
171
171
|
value: 0
|
|
172
|
-
}), Object.defineProperty(
|
|
172
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
173
173
|
configurable: !1,
|
|
174
174
|
enumerable: !1,
|
|
175
175
|
writable: !0,
|
|
176
176
|
value: null
|
|
177
|
-
}), Object.defineProperty(
|
|
177
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value:
|
|
182
|
-
}), Object.defineProperty(
|
|
181
|
+
value: I
|
|
182
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
|
-
value:
|
|
187
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
+
value: N
|
|
187
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
188
188
|
}
|
|
189
|
-
function O(
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
for (
|
|
195
|
-
j(h
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
189
|
+
function O(e, s, a, h, R, E, I, N) {
|
|
190
|
+
var b = s.children;
|
|
191
|
+
if (b !== void 0)
|
|
192
|
+
if (h)
|
|
193
|
+
if (fe(b)) {
|
|
194
|
+
for (h = 0; h < b.length; h++)
|
|
195
|
+
j(b[h]);
|
|
196
|
+
Object.freeze && Object.freeze(b);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
199
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
200
|
);
|
|
201
|
-
else j(
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var T = Object.keys(
|
|
205
|
-
return
|
|
201
|
+
else j(b);
|
|
202
|
+
if (L.call(s, "key")) {
|
|
203
|
+
b = r(e);
|
|
204
|
+
var T = Object.keys(s).filter(function(me) {
|
|
205
|
+
return me !== "key";
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
h = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", q[b + h] || (T = 0 < T.length ? "{" + T.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
211
211
|
React keys must be passed directly to JSX without using spread:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
|
-
b,
|
|
215
214
|
h,
|
|
215
|
+
b,
|
|
216
216
|
T,
|
|
217
|
-
|
|
218
|
-
),
|
|
217
|
+
b
|
|
218
|
+
), q[b + h] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
221
|
-
|
|
222
|
-
for (var
|
|
223
|
-
|
|
224
|
-
} else
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
typeof
|
|
228
|
-
),
|
|
229
|
-
|
|
230
|
-
|
|
220
|
+
if (b = null, a !== void 0 && (n(a), b = "" + a), c(s) && (n(s.key), b = "" + s.key), "key" in s) {
|
|
221
|
+
a = {};
|
|
222
|
+
for (var F in s)
|
|
223
|
+
F !== "key" && (a[F] = s[F]);
|
|
224
|
+
} else a = s;
|
|
225
|
+
return b && g(
|
|
226
|
+
a,
|
|
227
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
228
|
+
), _(
|
|
229
|
+
e,
|
|
230
|
+
b,
|
|
231
231
|
E,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
R,
|
|
233
|
+
o(),
|
|
234
|
+
a,
|
|
235
|
+
I,
|
|
236
|
+
N
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
|
-
function j(
|
|
240
|
-
typeof
|
|
239
|
+
function j(e) {
|
|
240
|
+
typeof e == "object" && e !== null && e.$$typeof === S && e._store && (e._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var p =
|
|
242
|
+
var p = he, S = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), ne = Symbol.for("react.profiler"), oe = Symbol.for("react.consumer"), ue = Symbol.for("react.context"), se = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), ae = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), ie = Symbol.for("react.activity"), de = Symbol.for("react.client.reference"), y = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, fe = Array.isArray, P = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
p = {
|
|
246
|
-
react_stack_bottom_frame: function(
|
|
247
|
-
return
|
|
246
|
+
react_stack_bottom_frame: function(e) {
|
|
247
|
+
return e();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
var W,
|
|
250
|
+
var W, G = {}, U = p.react_stack_bottom_frame.bind(
|
|
251
251
|
p,
|
|
252
252
|
l
|
|
253
|
-
)(),
|
|
254
|
-
k.Fragment =
|
|
255
|
-
var E = 1e4 >
|
|
253
|
+
)(), B = P(u(l)), q = {};
|
|
254
|
+
k.Fragment = A, k.jsx = function(e, s, a, h, R) {
|
|
255
|
+
var E = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return O(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
e,
|
|
258
|
+
s,
|
|
259
|
+
a,
|
|
260
260
|
!1,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
E ? Error("react-stack-top-frame") :
|
|
264
|
-
E ?
|
|
261
|
+
h,
|
|
262
|
+
R,
|
|
263
|
+
E ? Error("react-stack-top-frame") : U,
|
|
264
|
+
E ? P(u(e)) : B
|
|
265
265
|
);
|
|
266
|
-
}, k.jsxs = function(
|
|
267
|
-
var E = 1e4 >
|
|
266
|
+
}, k.jsxs = function(e, s, a, h, R) {
|
|
267
|
+
var E = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return O(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
e,
|
|
270
|
+
s,
|
|
271
|
+
a,
|
|
272
272
|
!0,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
E ? Error("react-stack-top-frame") :
|
|
276
|
-
E ?
|
|
273
|
+
h,
|
|
274
|
+
R,
|
|
275
|
+
E ? Error("react-stack-top-frame") : U,
|
|
276
|
+
E ? P(u(e)) : B
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
279
|
}()), k;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
function
|
|
283
|
-
return
|
|
281
|
+
var H;
|
|
282
|
+
function we() {
|
|
283
|
+
return H || (H = 1, process.env.NODE_ENV === "production" ? w.exports = Oe() : w.exports = Se()), w.exports;
|
|
284
284
|
}
|
|
285
|
-
var
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
return
|
|
290
|
-
const
|
|
291
|
-
Object.is(l.current,
|
|
292
|
-
const g =
|
|
285
|
+
var d = we();
|
|
286
|
+
const K = Z(void 0), V = Z(void 0);
|
|
287
|
+
function v(r, t) {
|
|
288
|
+
const n = D(V), [u, o] = Y(f(() => t(r), [])), l = C(u);
|
|
289
|
+
return M(() => {
|
|
290
|
+
const c = t(r);
|
|
291
|
+
Object.is(l.current, c) || (o(c), l.current = c);
|
|
292
|
+
const g = Q(
|
|
293
293
|
() => {
|
|
294
|
-
const
|
|
295
|
-
Object.is(l.current,
|
|
294
|
+
const i = t(r);
|
|
295
|
+
Object.is(l.current, i) || (o(i), l.current = i);
|
|
296
296
|
},
|
|
297
|
-
{ injector:
|
|
297
|
+
{ injector: n }
|
|
298
298
|
);
|
|
299
299
|
return () => {
|
|
300
300
|
g.destroy();
|
|
301
301
|
};
|
|
302
|
-
}, [
|
|
302
|
+
}, [r, f(() => t, [])]), u;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const t =
|
|
306
|
-
() =>
|
|
307
|
-
[
|
|
308
|
-
),
|
|
309
|
-
...
|
|
310
|
-
...
|
|
311
|
-
...
|
|
304
|
+
function ee(r) {
|
|
305
|
+
const t = f(
|
|
306
|
+
() => r.wrappers.slice(1),
|
|
307
|
+
[r.wrappers]
|
|
308
|
+
), n = r.wrappers[0], u = v(n, () => ({
|
|
309
|
+
...n?.inputs(),
|
|
310
|
+
...n?.attributes(),
|
|
311
|
+
...n?.outputs
|
|
312
312
|
}));
|
|
313
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ d.jsx(d.Fragment, { children: n ? /* @__PURE__ */ d.jsx(n.type, { ...u, children: /* @__PURE__ */ d.jsx(ee, { wrappers: t, children: r.children }) }) : r.children });
|
|
314
314
|
}
|
|
315
315
|
const Ae = Symbol.for("ControlValueAccessor");
|
|
316
|
-
function
|
|
317
|
-
const t =
|
|
318
|
-
() => ({ ...
|
|
319
|
-
[
|
|
320
|
-
), l =
|
|
321
|
-
|
|
322
|
-
(
|
|
323
|
-
),
|
|
324
|
-
|
|
325
|
-
(
|
|
326
|
-
), g = _(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
), m = c(
|
|
330
|
-
() => ({ ...n, fields: a }),
|
|
331
|
-
[n, a]
|
|
332
|
-
), w = c(
|
|
333
|
-
() => ({ ...n, fields: g }),
|
|
334
|
-
[n, g]
|
|
335
|
-
), O = _(e.field, (d) => d.wrappers()), j = e.field.form.control, p = e.field.define?.type, S = c(() => !!l.hidden || !p, [l.hidden, p]), y = K($), R = C(void 0), P = c(
|
|
336
|
-
() => ({ ...n, [Ae]: R }),
|
|
337
|
-
[n, R]
|
|
316
|
+
function re(r) {
|
|
317
|
+
const t = v(r.field, (m) => m.inputs()), n = v(r.field, (m) => m.outputs()), u = v(r.field, (m) => m.attributes()), o = f(
|
|
318
|
+
() => ({ ...u, ...t, ...n }),
|
|
319
|
+
[u, t, n]
|
|
320
|
+
), l = v(
|
|
321
|
+
r.field,
|
|
322
|
+
(m) => m.renderConfig()
|
|
323
|
+
), c = v(
|
|
324
|
+
r.field,
|
|
325
|
+
(m) => m.children?.()
|
|
326
|
+
), g = v(r.field, (m) => m.wrappers()), i = r.field.form.control, _ = r.field.define?.type, O = f(() => !!l.hidden || !_, [l.hidden, _]), j = D(V), p = C(void 0), S = f(
|
|
327
|
+
() => ({ ...o, [Ae]: p }),
|
|
328
|
+
[o, p]
|
|
338
329
|
);
|
|
339
|
-
return
|
|
340
|
-
let
|
|
341
|
-
return
|
|
342
|
-
() =>
|
|
343
|
-
|
|
344
|
-
|
|
330
|
+
return M(() => {
|
|
331
|
+
let m;
|
|
332
|
+
return p.current && (m = Te(
|
|
333
|
+
() => i,
|
|
334
|
+
p.current,
|
|
335
|
+
j
|
|
345
336
|
)), () => {
|
|
346
|
-
|
|
337
|
+
m?.(), m = void 0;
|
|
347
338
|
};
|
|
348
|
-
}, [
|
|
349
|
-
}
|
|
350
|
-
function Ve(e) {
|
|
351
|
-
return /* @__PURE__ */ f.jsx(f.Fragment, { children: e.fields.map((t, o) => /* @__PURE__ */ f.jsx(te, { field: t }, o)) });
|
|
352
|
-
}
|
|
353
|
-
class we extends Te {
|
|
354
|
-
// contents?: any[];
|
|
339
|
+
}, [p.current, i, j]), /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(K, { value: r.field, children: O ? void 0 : /* @__PURE__ */ d.jsx(ee, { wrappers: g, children: c ? /* @__PURE__ */ d.jsx(_, { ...o }) : r.field.form.control ? /* @__PURE__ */ d.jsx(_, { ...S }) : /* @__PURE__ */ d.jsx(_, { ...o }) }) }) });
|
|
355
340
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
let n = !0;
|
|
360
|
-
return ee(
|
|
341
|
+
function ye(r, t, n, u) {
|
|
342
|
+
let o = !0;
|
|
343
|
+
return Q(
|
|
361
344
|
() => {
|
|
362
345
|
const l = t.value$$();
|
|
363
|
-
|
|
346
|
+
o ? (ke(l, r) || u(l), o = !1) : u(l);
|
|
364
347
|
},
|
|
365
|
-
{ injector:
|
|
348
|
+
{ injector: n }
|
|
366
349
|
);
|
|
367
350
|
}
|
|
368
|
-
function
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
351
|
+
function Ve() {
|
|
352
|
+
const [r, t] = Y(void 0), [n, u] = Y(!1), o = C(void 0), l = C(void 0), c = f(() => ({
|
|
353
|
+
writeValue(i) {
|
|
354
|
+
t(i);
|
|
355
|
+
},
|
|
356
|
+
registerOnChange(i) {
|
|
357
|
+
o.current = i;
|
|
358
|
+
},
|
|
359
|
+
registerOnTouched(i) {
|
|
360
|
+
l.current = i;
|
|
361
|
+
},
|
|
362
|
+
setDisabledState(i) {
|
|
363
|
+
u(i);
|
|
364
|
+
}
|
|
365
|
+
}), []), g = f(() => ({
|
|
366
|
+
value: r,
|
|
367
|
+
disabled: n,
|
|
368
|
+
valueChange: (i) => {
|
|
369
|
+
o.current?.(i), t(i);
|
|
370
|
+
},
|
|
371
|
+
touchedChange: () => {
|
|
372
|
+
l.current?.();
|
|
373
|
+
}
|
|
374
|
+
}), [r, n]);
|
|
375
|
+
return f(() => ({
|
|
376
|
+
cva: c,
|
|
377
|
+
cvaa: g
|
|
378
|
+
}), [g]);
|
|
379
|
+
}
|
|
380
|
+
function X(r, t) {
|
|
381
|
+
const n = be(r, t), u = C(void 0);
|
|
382
|
+
f(() => (u.current = n(), u.current), t), M(() => () => {
|
|
383
|
+
u.current?.(), u.current = void 0;
|
|
372
384
|
}, []);
|
|
373
385
|
}
|
|
374
|
-
function $e(
|
|
375
|
-
const t =
|
|
386
|
+
function $e(r) {
|
|
387
|
+
const t = D(K), n = v(t, (u) => u?.children());
|
|
388
|
+
return /* @__PURE__ */ d.jsx(d.Fragment, { children: n.map((u, o) => /* @__PURE__ */ d.jsx(re, { field: u }, o)) });
|
|
389
|
+
}
|
|
390
|
+
class Pe extends Ce {
|
|
391
|
+
// contents?: any[];
|
|
392
|
+
}
|
|
393
|
+
class Ie extends je {
|
|
394
|
+
}
|
|
395
|
+
function Le(r) {
|
|
396
|
+
const t = f(() => ge({
|
|
376
397
|
providers: [
|
|
377
398
|
{
|
|
378
|
-
provide:
|
|
379
|
-
useClass:
|
|
399
|
+
provide: Ee,
|
|
400
|
+
useClass: pe
|
|
380
401
|
}
|
|
381
402
|
]
|
|
382
|
-
}), []), [
|
|
383
|
-
const
|
|
384
|
-
return [
|
|
385
|
-
handle:
|
|
386
|
-
builder:
|
|
387
|
-
injector:
|
|
388
|
-
registerOnDestroy: (
|
|
389
|
-
|
|
403
|
+
}), []), [n, u] = f(() => {
|
|
404
|
+
const o = Re({ providers: [], parent: t });
|
|
405
|
+
return [xe(r.schema, {
|
|
406
|
+
handle: Pe,
|
|
407
|
+
builder: Ie,
|
|
408
|
+
injector: o,
|
|
409
|
+
registerOnDestroy: (c) => {
|
|
410
|
+
o.get(ve).onDestroy(c);
|
|
390
411
|
},
|
|
391
|
-
...
|
|
392
|
-
}),
|
|
393
|
-
}, [
|
|
394
|
-
return
|
|
395
|
-
let
|
|
396
|
-
if (
|
|
397
|
-
const l =
|
|
398
|
-
|
|
412
|
+
...r.options
|
|
413
|
+
}), o];
|
|
414
|
+
}, [r.schema, r.options]);
|
|
415
|
+
return X(() => {
|
|
416
|
+
let o;
|
|
417
|
+
if (n.form.control) {
|
|
418
|
+
const l = r.model;
|
|
419
|
+
o = ye(
|
|
399
420
|
typeof l < "u" ? l : void 0,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
(
|
|
403
|
-
|
|
404
|
-
|
|
421
|
+
n.form.control,
|
|
422
|
+
u,
|
|
423
|
+
(c) => {
|
|
424
|
+
_e(() => {
|
|
425
|
+
n.form.control?.valueNoError$$() && r.modelChange?.(c);
|
|
405
426
|
});
|
|
406
427
|
}
|
|
407
428
|
);
|
|
408
429
|
}
|
|
409
430
|
return () => {
|
|
410
|
-
|
|
431
|
+
u.destroy(), o?.destroy();
|
|
411
432
|
};
|
|
412
|
-
}, [
|
|
413
|
-
|
|
414
|
-
}, [
|
|
433
|
+
}, [n]), X(() => {
|
|
434
|
+
n.form.control?.updateValue(r.model);
|
|
435
|
+
}, [n, r.model]), /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(V, { value: t, children: /* @__PURE__ */ d.jsx(re, { field: n }) }) });
|
|
415
436
|
}
|
|
416
|
-
const
|
|
437
|
+
const We = [], Ge = {
|
|
417
438
|
directives: "merge",
|
|
418
439
|
formConfig: "merge",
|
|
419
440
|
inputs: "merge",
|
|
@@ -422,143 +443,114 @@ const Le = [], Ge = {
|
|
|
422
443
|
renderConfig: "merge",
|
|
423
444
|
wrappers: "replace"
|
|
424
445
|
};
|
|
425
|
-
function
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
const
|
|
429
|
-
value:
|
|
430
|
-
disabled:
|
|
431
|
-
onBlur:
|
|
446
|
+
function Ue(r, t) {
|
|
447
|
+
const n = C(!1);
|
|
448
|
+
return f(() => {
|
|
449
|
+
const u = {
|
|
450
|
+
value: r.value == null ? "" : r.value,
|
|
451
|
+
disabled: r.disabled,
|
|
452
|
+
onBlur: r.touchedChange
|
|
432
453
|
};
|
|
433
454
|
return t ? {
|
|
434
|
-
...
|
|
455
|
+
...u,
|
|
435
456
|
onCompositionStart: () => {
|
|
436
|
-
|
|
457
|
+
n.current = !0;
|
|
437
458
|
},
|
|
438
|
-
onCompositionEnd: (
|
|
439
|
-
|
|
459
|
+
onCompositionEnd: (o) => {
|
|
460
|
+
n.current = !1, r.valueChange(o.target.value);
|
|
440
461
|
}
|
|
441
462
|
} : {
|
|
442
|
-
...
|
|
443
|
-
onInput: (
|
|
463
|
+
...u,
|
|
464
|
+
onInput: (o) => r.valueChange(o.target.value)
|
|
444
465
|
};
|
|
445
|
-
}, [
|
|
466
|
+
}, [r, t]);
|
|
446
467
|
}
|
|
447
|
-
function
|
|
448
|
-
return
|
|
449
|
-
checked:
|
|
450
|
-
disabled:
|
|
451
|
-
onBlur:
|
|
452
|
-
onChange: (t) =>
|
|
453
|
-
}), [
|
|
468
|
+
function Be(r) {
|
|
469
|
+
return f(() => ({
|
|
470
|
+
checked: r.value ?? !1,
|
|
471
|
+
disabled: r.disabled,
|
|
472
|
+
onBlur: r.touchedChange,
|
|
473
|
+
onChange: (t) => r.valueChange(t.target.checked)
|
|
474
|
+
}), [r]);
|
|
454
475
|
}
|
|
455
|
-
function
|
|
456
|
-
return
|
|
457
|
-
value:
|
|
458
|
-
disabled:
|
|
459
|
-
onBlur:
|
|
476
|
+
function qe(r) {
|
|
477
|
+
return f(() => ({
|
|
478
|
+
value: r.value == null ? "" : r.value,
|
|
479
|
+
disabled: r.disabled,
|
|
480
|
+
onBlur: r.touchedChange,
|
|
460
481
|
onInput: (t) => {
|
|
461
|
-
const
|
|
462
|
-
|
|
482
|
+
const n = t.target.value;
|
|
483
|
+
r.valueChange(n == "" ? void 0 : parseFloat(n));
|
|
463
484
|
}
|
|
464
|
-
}), [
|
|
485
|
+
}), [r]);
|
|
465
486
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
487
|
+
function Je(r, t) {
|
|
488
|
+
return f(() => ({
|
|
468
489
|
value: t,
|
|
469
|
-
checked: Object.is(
|
|
470
|
-
disabled:
|
|
471
|
-
onBlur:
|
|
472
|
-
onChange: () =>
|
|
473
|
-
}), [
|
|
490
|
+
checked: Object.is(r.value, t),
|
|
491
|
+
disabled: r.disabled,
|
|
492
|
+
onBlur: r.touchedChange,
|
|
493
|
+
onChange: () => r.valueChange(t)
|
|
494
|
+
}), [r]);
|
|
474
495
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
477
|
-
const t = (
|
|
478
|
-
const
|
|
479
|
-
|
|
496
|
+
function ze(r) {
|
|
497
|
+
return f(() => {
|
|
498
|
+
const t = (n) => {
|
|
499
|
+
const u = n.target.value;
|
|
500
|
+
r.valueChange(u == "" ? void 0 : parseFloat(u));
|
|
480
501
|
};
|
|
481
502
|
return {
|
|
482
|
-
value:
|
|
483
|
-
disabled:
|
|
484
|
-
onBlur:
|
|
503
|
+
value: r.value == null ? "" : r.value,
|
|
504
|
+
disabled: r.disabled,
|
|
505
|
+
onBlur: r.touchedChange,
|
|
485
506
|
onInput: t,
|
|
486
507
|
onChange: t
|
|
487
508
|
};
|
|
488
|
-
}, [
|
|
509
|
+
}, [r]);
|
|
489
510
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
492
|
-
value:
|
|
493
|
-
disabled:
|
|
494
|
-
onBlur:
|
|
495
|
-
onChange: (
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
498
|
-
for (let l = 0; l <
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
511
|
+
function He(r, t = !1) {
|
|
512
|
+
return f(() => ({
|
|
513
|
+
value: r.value,
|
|
514
|
+
disabled: r.disabled,
|
|
515
|
+
onBlur: r.touchedChange,
|
|
516
|
+
onChange: (n) => {
|
|
517
|
+
const u = [], o = n.target;
|
|
518
|
+
if (o.selectedOptions !== void 0)
|
|
519
|
+
for (let l = 0; l < o.selectedOptions.length; l++) {
|
|
520
|
+
const c = o.selectedOptions[l];
|
|
521
|
+
if (u.push(c.value), !t)
|
|
501
522
|
break;
|
|
502
523
|
}
|
|
503
524
|
else
|
|
504
|
-
for (let l = 0; l <
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
525
|
+
for (let l = 0; l < o.options.length; l++) {
|
|
526
|
+
const c = o.options[l];
|
|
527
|
+
if (c.selected && (u.push(c.value), !t))
|
|
507
528
|
break;
|
|
508
529
|
}
|
|
509
|
-
|
|
530
|
+
r.valueChange(t ? u : u[0]);
|
|
510
531
|
}
|
|
511
|
-
}), [
|
|
512
|
-
}
|
|
513
|
-
function He() {
|
|
514
|
-
const [e, t] = M(void 0), [o, s] = M(!1), n = C(void 0), l = C(void 0), a = c(() => ({
|
|
515
|
-
writeValue(m) {
|
|
516
|
-
t(m);
|
|
517
|
-
},
|
|
518
|
-
registerOnChange(m) {
|
|
519
|
-
n.current = m;
|
|
520
|
-
},
|
|
521
|
-
registerOnTouched(m) {
|
|
522
|
-
l.current = m;
|
|
523
|
-
},
|
|
524
|
-
setDisabledState(m) {
|
|
525
|
-
s(m);
|
|
526
|
-
}
|
|
527
|
-
}), []), g = c(() => ({
|
|
528
|
-
value: e,
|
|
529
|
-
disabled: o,
|
|
530
|
-
valueChange: (m) => {
|
|
531
|
-
n.current?.(m), t(m);
|
|
532
|
-
},
|
|
533
|
-
touchedChange: () => {
|
|
534
|
-
l.current?.();
|
|
535
|
-
}
|
|
536
|
-
}), [e, o]);
|
|
537
|
-
return c(() => ({
|
|
538
|
-
cva: a,
|
|
539
|
-
cvaa: g
|
|
540
|
-
}), [g]);
|
|
532
|
+
}), [r]);
|
|
541
533
|
}
|
|
542
534
|
export {
|
|
543
535
|
Ae as CVA,
|
|
544
|
-
|
|
545
|
-
|
|
536
|
+
We as EMPTY_ARRAY,
|
|
537
|
+
V as InjectorToken,
|
|
546
538
|
Ge as NG_CONFIG_DEFAULT_MERGE_STRAGEGY,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
539
|
+
K as PI_VIEW_FIELD_TOKEN,
|
|
540
|
+
re as PiyingFieldTemplate,
|
|
541
|
+
$e as PiyingGroup,
|
|
542
|
+
Le as PiyingView,
|
|
543
|
+
ee as PiyingWrapper,
|
|
544
|
+
Ie as ReactFormBuilder,
|
|
545
|
+
Pe as ReactSchemaHandle,
|
|
546
|
+
ye as initListen,
|
|
547
|
+
Ve as useControlValueAccessor,
|
|
548
|
+
X as useEffectSync,
|
|
549
|
+
Be as useInputCheckboxModel,
|
|
550
|
+
qe as useInputNumberModel,
|
|
551
|
+
Je as useInputRadioModel,
|
|
552
|
+
ze as useInputRangeModel,
|
|
553
|
+
Ue as useInputTextModel,
|
|
554
|
+
He as useSelectModel,
|
|
555
|
+
v as useSignalToRef
|
|
564
556
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piying/view-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Piying view For React;Valibot to Component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://piying-org.github.io/website/docs/client/intro",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@piying/view-core": "^1.
|
|
37
|
+
"@piying/view-core": "^1.3.1",
|
|
38
38
|
"fast-equals": "^5.2.2",
|
|
39
39
|
"static-injector": "^6.1.2",
|
|
40
40
|
"valibot": "^1.1.0"
|
package/readme.md
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
<div><a href="https://www.npmjs.com/package/@piying/view-core"><img src="https://img.shields.io/npm/v/@piying/view-core" alt="NPM Version" /></a> <a href="https://coveralls.io/github/piying-org/piying-view?branch=main"><img src="https://coveralls.io/repos/github/piying-org/piying-view/badge.svg" alt="Coverage Status" ></a> <a href=""><img src="https://img.shields.io/badge/License-MIT-teal.svg" alt="MIT License" /></a></div>
|
|
2
|
+
|
|
3
|
+
## document
|
|
4
|
+
|
|
5
|
+
- https://piying-org.github.io/website/docs/client/intro
|
|
6
|
+
|
|
7
|
+
## start
|
|
8
|
+
|
|
9
|
+
- npm i
|
|
10
|
+
- npm run create-view-core
|
|
11
|
+
|
|
12
|
+
## test
|
|
13
|
+
|
|
14
|
+
- npx playwright install
|
|
15
|
+
- npm run test:all
|
|
16
|
+
|
|
17
|
+
### test Core/Angular
|
|
18
|
+
|
|
19
|
+
- npm run test
|
|
20
|
+
|
|
21
|
+
### test Vue
|
|
22
|
+
|
|
23
|
+
- npm run test:vue
|
|
24
|
+
|
|
25
|
+
### test React
|
|
26
|
+
|
|
27
|
+
- npm run test:react
|