@grapecity/wijmo.react.base 5.20252.44 → 5.20261.48

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/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  # Wijmo
4
4
 
5
+ **Note: Starting from 2027v1, Wijmo npm packages will be published only under the @mescius scope. Users using the @grapecity scope during the 2026 period will need to migrate to @mescius.**
6
+
7
+ ---
8
+
5
9
  Wijmo is a complete set of [JavaScript UI components](https://developer.mescius.com/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) for enterprise development. It includes a powerful data grid, charts, pivot tools, inputs, and much more and is available in your favorite framework, including [Angular](https://developer.mescius.com/wijmo/angular-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm), [React](https://developer.mescius.com/wijmo/react-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm), and [Vue](https://developer.mescius.com/wijmo/vue-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm).
6
10
 
7
11
  Cut your development time in half with Wijmo's lightweight, high-performance JavaScript UI components.
@@ -122,6 +126,10 @@ Submit questions to our team of [Wijmo Experts](https://developer.mescius.com/fo
122
126
 
123
127
  ## Wijmo JP
124
128
 
129
+ **注:2027v1以降、Wijmoのnpmパッケージは@mesciusスコープでのみ公開されます。2026年期間中に@grapecityスコープを使用しているユーザーは、@mesciusに移行する必要があります。**
130
+
131
+ ---
132
+
125
133
  [Wijmo](https://developer.mescius.jp/wijmo)は、Webアプリケーション開発に最適な数多くのUIを搭載するJavaScriptコンポーネントセットです。高速・軽量であり、開発工数の削減に大きく寄与します。データグリッド、チャート、ピボットテーブル、入力など、業務アプリケーション開発に必要となるコントロールを多数収録し、またAngularやReact、Vue.jsといったJavaScriptフレームワークにも対応しています。
126
134
 
127
135
  なお、日本語版での動作保証は日本語版サイトで公開しているバージョンのみとなります。
@@ -161,6 +169,10 @@ Submit questions to our team of [Wijmo Experts](https://developer.mescius.com/fo
161
169
 
162
170
  ## Wijmo CN
163
171
 
172
+ **注意:从 2027v1 开始,Wijmo 的 npm 包将仅在 @mescius 作用域下发布。在 2026 年期间仍在使用 @grapecity 作用域的用户,需要迁移到 @mescius。**
173
+
174
+ ---
175
+
164
176
  Wijmo 是一套完整的企业级 JavaScript UI 开发组件。 它包括强大的表格、图表、数据透视、输入等组件,并且可以支持各类主流前端框架,包括 Angular、React 和 Vue。
165
177
 
166
178
  Wijmo 的轻量级、高性能 JavaScript UI 组件可以将您的开发时间缩短一半。
@@ -255,6 +267,11 @@ Wijmo 开发包可以从 [这里](https://www.grapecity.com.cn/developer/wijmojs
255
267
 
256
268
  # Wijmo KR
257
269
 
270
+ **참고: 2027 v1부터 Wijmo npm 패키지는 @mescius 스코프에서만 제공됩니다.
271
+ 현재 @grapecity 스코프를 사용 중인 사용자는 2026년 내에 @mescius 스코프로 마이그레이션해 주시기 바랍니다.**
272
+
273
+ ---
274
+
258
275
  Wijmo(위즈모)는 고성능의 Web App 개발을 위한 완전한 JavaScript UI 컴포넌트 세트입니다. 강력한 데이터 그리드(DataGrid), 차트(Chart), 피벗 도구(OLAP/Pivop), 입력(Input) 등 개발에 필요한 100+의 다양한 컨트롤이 포함되어 있습니다.
259
276
 
260
277
  또한, Wijmo는 Angular, React 및 Vue 등 개발자가 빠른 웹 개발과 효율적인 코드 유지 관리를 쉽게 할 수 있도록 JavaScript 프레임워크에 대한 지원을 제공합니다.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.48
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,6 @@
11
11
  *
12
12
  */
13
13
 
14
- "use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),ReactDOM=__importStar(require("react-dom")),React=__importStar(require("react")),flushSyncPolyfill=e=>{e()},createRootPolyfill=()=>{throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill};let reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function*(){try{const e=yield Promise.resolve().then(()=>__importStar(require("react-dom/client")));setReactDomClient(e.default||e)}catch(e){try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}}reactDomClientReady=!0}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function*(){reactDomClientLoadPromise&&(yield reactDomClientLoadPromise)}))}let _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){const e=parseInt(React.version);_reactMajorVersion=e;e>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}function wjForwardRef(e){return _reactMajorVersion>=19?t=>e(t,t.ref):React.forwardRef(e)}exports.wjForwardRef=wjForwardRef;let _oldSyncBehavior=!0;function strictStateMode(e=!1){e==_oldSyncBehavior&&(_oldSyncBehavior=!wijmo_1.asBoolean(e,!1))}exports.strictStateMode=strictStateMode;exports.ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};const alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,t){const n=e.controlRef.current,r={},o={};if(t){const s=wijmo_1.isArray(t)?t.flat(1/0):[t],c=[];let i=0;const a=new Set;for(let e of s){if(e&&e.type&&e.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?c.push(e.type.render(e.props,e.props.ref)):c.push(e.type.render(e.props,e.ref));c[c.length-1].$index=i;c[c.length-1].$key=e.key}else if(e&&wijmo_1.isFunction(e.type)){c.push(e.type(e.props));c[c.length-1].$index=i;c[c.length-1].$key=e.key}e||a.add(i);i++}const l=[];for(let e of c)if(e.assignedToParent){if(e.wjProperty){e.parentProp=wijmo_1.asString(e.wjProperty);e.isParentPropArray=n[e.parentProp]&&wijmo_1.isArray(n[e.parentProp])}e.isParentPropArray&&!r[e.parentProp]&&(r[e.parentProp]=[]);e.isParentPropArray?r[e.parentProp].push({getInstance:e.getInstance,props:e.props,$key:e.$key,$index:e.$index}):r[e.parentProp]={getInstance:e.getInstance,props:e.props}}else l.push(e);const u=e.childInfo;for(let e in r)if(wijmo_1.isArray(r[e])){let t=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;t=!0}let s=u[e];o[e]=[];let c=!1;if(!u[e]){s=[];if(n[e]&&n[e].clear){n[e].clear();c=!0}else n[e]||(n[e]=new wijmo_1.ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();c=!0}}else if(!isKeyOrderSame(s,r[e],"$key")&&n[e]&&n[e].clear){n[e].clear();c=!0}if(_oldSyncBehavior)for(let t=s.length-1;t>=0;t--)if(a.has(s[t].$index)){n[e].remove(s[t].instance);s.splice(t,1)}const i=[],l={};for(let e of s)null!=e.$key?l[""+e.$key]=e:i.push(e);let p=0;const getExistingInstance=(e=null)=>{if(null!=e){let t=l[e];null!=t&&delete l[e];return t}return i[p++]};for(let t=0;t<r[e].length;t++){let s=getExistingInstance(r[e][t].$key),i=!1;if(s)s.updateProps(r[e][t].props);else{s=r[e][t].getInstance(n);i=!0}s.$index=r[e][t].$index;s.$key=r[e][t].$key;(c||i)&&(n[e].length==t?n[e].push(s.instance):n[e].splice(t,0,s.instance));o[e].push(s)}for(let t of Object.keys(l))n[e].remove(l[t].instance);for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(t){n[e]._updating--;!c&&u[e]&&u[e].length==r[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{let t=u[e];if(t)t.updateProps(r[e].props);else{t=r[e].getInstance(n);n[e]=t.instance}o[e]=t}const p=[];for(let e of u.$_nonassignable||[])a.has(e.$index)?e.instance&&e.instance.dispose&&wijmo_1.isFunction(e.instance.dispose)&&e.instance.dispose():p.push(e);const d=[];let f=0;for(;f<l.length;f++){let e=p[f];e?e.updateProps(l[f].props):e=l[f].getInstance(n);e.$index=l[f].$index;d.push(e)}o.$_nonassignable=d;for(;f<p.length;f++)p[f].instance&&p[f].instance.dispose&&wijmo_1.isFunction(p[f].instance.dispose)&&p[f].instance.dispose()}if(_oldSyncBehavior)for(let t of Object.keys(e.childInfo))if(wijmo_1.isArray(e.childInfo[t])&&!r[t]&&n[t]&&n[t].remove)for(let r of e.childInfo[t])n[t].remove(r.instance);return o}function getPropsAccordingToSyncMode(e,t,n=null){if(!t||!_oldSyncBehavior){return Object.assign({},e)}let r={};for(let o in e){let s=!1;n&&(s=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!s||e[o]!==t[o])&&(r[o]=e[o])}return r}function useWjComponentBase(e){const t=React.useRef({}),n=React.useRef(),r=React.useRef(),o=React.useRef(),s=React.useRef(),c=React.useRef({}),i=React.useRef(!1),a=React.useRef(null),l=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}let u=e.props;if(s.current){u=getPropsAccordingToSyncMode(e.props,t.current,n.current);t.current=e.props}const p={},d={},f={},h={},m={},y=e.ref||null;for(let t in u)if(n.current.knowProperties.has(t))p[t]=u[t];else if(n.current.knowEvents.has(t)){d[t]=u[t];p[t]=u[t]}else e.customProps[t]?h[t]=u[t]:buildInProps.has(t)?m[t]=u[t]:specialProps.has(t)||(f[t]=u[t]);if(s.current&&_oldSyncBehavior)for(let e in d)delete p[e];const updateProps=()=>{y&&y.current&&(y.current.props=e.props);updateChildProps();let t=[],n=p;if(o.current&&s.current&&!_oldSyncBehavior){for(let e in o.current)if(s.current[e]){if(s.current[e]._handlersChanged){s.current[e]._cachedHandlersChanged=s.current[e]._handlersChanged;s.current[e]._handlersChanged=null;t.push(s.current[e])}s.current[e].removeHandler(o.current[e])}n=Object.assign({},p);for(let e in d){delete n[e];s.current[e].addHandler(d[e])}}else if(!o.current){n=Object.assign({},p);for(let e in d)delete n[e]}o.current=d;if(s.current){wijmo_1.copy(s.current,n,!1,!0);for(let e in m)_setHostAttribute(s.current.hostElement,e,m[e]);for(let t in h)e.customProps[t](s.current,h[t]);(()=>{for(let e of t)if(e._cachedHandlersChanged){e._handlersChanged=e._cachedHandlersChanged;e._cachedHandlersChanged=null}t=[]})()}},updateChildProps=()=>{c.current=updateChildProperties({controlRef:s,childInfo:c.current},e.props.children)};React.useLayoutEffect(()=>{if(r.current&&!s.current){s.current=new e.constructor(r.current,p);e.prePropsInit&&e.prePropsInit(s.current);if(y)if(wijmo_1.isFunction(y)){const t=y({control:s.current,props:e.props});wijmo_1.isFunction(t)&&(a.current=t)}else y.current&&y.current.control==s.current||(y.current={control:s.current,props:e.props});for(let e in m)_setHostAttribute(s.current.hostElement,e,m[e]);e.props.children&&updateProps();e.initControl&&e.initControl(s.current);e.props.initialized&&setTimeout(()=>{s.current&&e.props.initialized(s.current)})}else i.current&&(i.current=!1);return()=>{if(s.current){const e=s.current;i.current=!0;queueMicrotask(()=>{if(i.current){e.dispose();s.current=null;c.current={};i.current=!1;a.current&&a.current()}})}}},[]);s.current&&queueMicrotask(()=>updateProps());const _=React.createElement("div",Object.assign({},f,{ref:r}),[]),_setHostAttribute=(e,t,n)=>{if(e)switch(t){case"className":const t=l.current;if(t!==n){wijmo_1.removeClass(e,t);wijmo_1.addClass(e,n);l.current=n}}};return{renderResult:_,wjControl:s.current}}exports.useWjComponentBase=useWjComponentBase;function filterKnownProps(e,t,n){const r={};for(let o in e)(t.has(o)||n.has(o))&&(r[o]=e[o]);return r}function clearAndGetEvents(e,t,n,r){const o=r.current,s={};for(let e in t)n.has(e)&&(s[e]=t[e]);for(let n in o)e[n]&&(!_oldSyncBehavior||t[n]?e[n].removeHandler(o[n]):s[n]=o[n]);return s}function getCustomPropsData(e,t){const n={};for(let r in t)void 0!==e[r]&&(n[r]=e[r]);return n}function useWjComponentChildBase(e){const t={};t.knowProperties=new Set(e.properties);t.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:n=>{const r={current:{}},o={current:{}},s={current:{}},c=getPropsAccordingToSyncMode(e.props,r.current),i=filterKnownProps(c,t.knowProperties,t.knowEvents),a=getCustomPropsData(c,e.customProps||{}),l=e.customConstructor?e.customConstructor(n,i,a):new e.constructor(e.needParentInstance?n:i,e.needParentInstance?i:void 0);e.ref&&(wijmo_1.isFunction(e.ref)?e.ref({control:l,props:e.props}):e.ref.current&&e.ref.current.control==l||(e.ref.current={control:l,props:e.props}));s.current=clearAndGetEvents(l,c,t.knowEvents,s);const updateProps=n=>{const c=getPropsAccordingToSyncMode(n,r.current);r.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);s.current=clearAndGetEvents(l,c,t.knowEvents,s);const i=filterKnownProps(c,t.knowProperties,t.knowEvents);l.initialize?l.initialize(i):wijmo_1.copy(l,i,!1,!0);for(let t in e.customProps)void 0!==c[t]&&e.customProps[t](l,c[t]);a=n.children||[],o.current=updateChildProperties({controlRef:{current:l},childInfo:o.current},a);var a};updateProps(e.props||[]);e.props.initialized&&wijmo_1.isFunction(e.props.initialized)&&e.props.initialized(l);return{instance:l,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}exports.useWjComponentChildBase=useWjComponentChildBase;const flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{const e=console.error;let t=!1;console.error=function(){const e=arguments[0]||"";e.includes("flushSync")&&(t=!0)};flushSync(()=>{});console.error=e;flushSyncStateCache.isReactRendering=t}catch(e){}finally{queueMicrotask(()=>{flushSyncStateCache.isReactRendering=null})}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,t,n=!1){isReactRendering()&&(n=!0);const r=elemRootMap.findIndex(e=>e.host===t);let o;if(-1===r){o=reactDomClient.createRoot(t);elemRootMap.push({host:t,root:o})}else o=elemRootMap[r].root;o.__scheduledForUnmount=!1;n?queueMicrotask(()=>{flushSync(()=>{o.render(e)})}):flushSync(()=>{o.render(e)})}function selectiveDomRender(e,t,n=!1){if(_reactMajorVersion<18){(0,getReactDOM().render)(e,t)}else if(reactDomClientReady)_doRender(e,t,n);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doRender(e,t,n)})))()}return t}exports.selectiveDomRender=selectiveDomRender;function unmountSafely(e){const t=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&t==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){const t=elemRootMap.findIndex(t=>t.host===e);if(-1!==t){const e=elemRootMap[t].root;if(isReactRendering()){e.__scheduledForUnmount=!0;queueMicrotask(()=>{e.__scheduledForUnmount&&flushSync(()=>{unmountSafely(e);elemRootMap.splice(t,1)})})}else flushSync(()=>{unmountSafely(e);elemRootMap.splice(t,1)})}}function selectiveDomUnmount(e){if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doUnmount(e)})))()}}exports.selectiveDomUnmount=selectiveDomUnmount;function isKeyOrderSame(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r][n]!=t[r][n])return!1;return!0}function baseFlushSync(){flushSync(()=>{})}exports.baseFlushSync=baseFlushSync;
14
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):new t((function(n){n(e.value)})).then(fulfilled,rejected)}step((r=r.apply(e,n||[])).next())}))},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);n.default=e;return n};Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),ReactDOM=__importStar(require("react-dom")),React=__importStar(require("react")),flushSyncPolyfill=e=>{e()},createRootPolyfill=()=>{throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill};let reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function*(){try{
15
+ // Fix bug WJM-37456: webpackIgnore prevents Webpack from statically analyzing
16
+ const e=yield Promise.resolve().then(()=>__importStar(require(/* webpackIgnore: true */"react-dom/client")));setReactDomClient(e.default||e)}catch(e){try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}}reactDomClientReady=!0}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function*(){reactDomClientLoadPromise&&(yield reactDomClientLoadPromise)}))}let _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){const e=parseInt(React.version);_reactMajorVersion=e;e>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}function wjForwardRef(e){return _reactMajorVersion>=19?n=>e(n,n.ref):React.forwardRef(e)}exports.wjForwardRef=wjForwardRef;let _oldSyncBehavior=!0;function strictStateMode(e=!1){e==_oldSyncBehavior&&(_oldSyncBehavior=!wijmo_1.asBoolean(e,!1))}exports.strictStateMode=strictStateMode;exports.ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};const alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,n){const t=e.controlRef.current,r={},o={};if(n){const s=wijmo_1.isArray(n)?n.flat(1/0):[n],c=[];let i=0;const a=new Set;for(const e of s){if(e&&e.type&&e.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?c.push(e.type.render(e.props,e.props.ref)):c.push(e.type.render(e.props,e.ref));c[c.length-1].$index=i;c[c.length-1].$key=e.key}else if(e&&wijmo_1.isFunction(e.type)){c.push(e.type(e.props));c[c.length-1].$index=i;c[c.length-1].$key=e.key}e||a.add(i);i++}const l=[];for(const e of c)if(e.assignedToParent){if(e.wjProperty){e.parentProp=wijmo_1.asString(e.wjProperty);e.isParentPropArray=t[e.parentProp]&&wijmo_1.isArray(t[e.parentProp])}e.isParentPropArray&&!r[e.parentProp]&&(r[e.parentProp]=[]);e.isParentPropArray?r[e.parentProp].push({getInstance:e.getInstance,props:e.props,$key:e.$key,$index:e.$index}):r[e.parentProp]={getInstance:e.getInstance,props:e.props}}else l.push(e);const u=e.childInfo;for(const e in r)if(wijmo_1.isArray(r[e])){let n=!1;if(t[e]&&null!=t[e]._updating&&!unsuppressedChangedEventProps.has(e)){t[e]._updating++;n=!0}let s=u[e];o[e]=[];let c=!1;if(!u[e]){s=[];if(t[e]&&t[e].clear){t[e].clear();c=!0}else t[e]||(t[e]=new wijmo_1.ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(t[e]&&t[e].clear){t[e].clear();c=!0}}else if(!isKeyOrderSame(s,r[e],"$key")&&t[e]&&t[e].clear){t[e].clear();c=!0}if(_oldSyncBehavior)for(let n=s.length-1;n>=0;n--)if(a.has(s[n].$index)){t[e].remove(s[n].instance);s.splice(n,1)}const i=[],l={};for(const e of s)null!=e.$key?l[""+e.$key]=e:i.push(e);let p=0;const getExistingInstance=(e=null)=>{if(null!=e){const n=l[e];null!=n&&delete l[e];return n}return i[p++]};for(let n=0;n<r[e].length;n++){let s=getExistingInstance(r[e][n].$key),i=!1;if(s)s.updateProps(r[e][n].props);else{s=r[e][n].getInstance(t);i=!0}s.$index=r[e][n].$index;s.$key=r[e][n].$key;(c||i)&&(t[e].length==n?t[e].push(s.instance):t[e].splice(n,0,s.instance));o[e].push(s)}for(const n of Object.keys(l))t[e].remove(l[n].instance);for(;!_oldSyncBehavior&&t[e].length>o[e].length;)t[e].pop();if(n){t[e]._updating--;!c&&u[e]&&u[e].length==r[e].length||t[e]._raiseCollectionChanged&&t[e]._raiseCollectionChanged()}}else{let n=u[e];if(n)n.updateProps(r[e].props);else{n=r[e].getInstance(t);t[e]=n.instance}o[e]=n}const p=[];for(const e of u.$_nonassignable||[])a.has(e.$index)?e.instance&&e.instance.dispose&&wijmo_1.isFunction(e.instance.dispose)&&e.instance.dispose():p.push(e);const d=[];let f=0;for(;f<l.length;f++){let e=p[f];e?e.updateProps(l[f].props):e=l[f].getInstance(t);e.$index=l[f].$index;d.push(e)}o.$_nonassignable=d;for(;f<p.length;f++)p[f].instance&&p[f].instance.dispose&&wijmo_1.isFunction(p[f].instance.dispose)&&p[f].instance.dispose()}if(_oldSyncBehavior)for(const n of Object.keys(e.childInfo))if(wijmo_1.isArray(e.childInfo[n])&&!r[n]&&t[n]&&t[n].remove)for(const r of e.childInfo[n])t[n].remove(r.instance);return o}function getPropsAccordingToSyncMode(e,n,t=null){if(!n||!_oldSyncBehavior){return Object.assign({},e)}const r={};for(const o in e){let s=!1;t&&(s=t.knowProperties.has(o)||t.knowEvents.has(o)||t.knowCustomProps.has(o));(t&&!s||e[o]!==n[o])&&(r[o]=e[o])}return r}function useWjComponentBase(e){const n=React.useRef({}),t=React.useRef(),r=React.useRef(),o=React.useRef(),s=React.useRef(),c=React.useRef({}),i=React.useRef(!1),a=React.useRef(null),l=React.useRef(null);e.customProps||(e.customProps={});if(!t.current){t.current={};t.current.knowProperties=new Set(e.properties);t.current.knowEvents=new Set(e.events);t.current.knowCustomProps=new Set(Object.keys(e.customProps))}let u=e.props;if(s.current){u=getPropsAccordingToSyncMode(e.props,n.current,t.current);n.current=e.props}const p={},d={},f={},h={},m={},y=e.ref||null;for(const n in u)if(t.current.knowProperties.has(n))p[n]=u[n];else if(t.current.knowEvents.has(n)){d[n]=u[n];p[n]=u[n]}else e.customProps[n]?h[n]=u[n]:buildInProps.has(n)?m[n]=u[n]:specialProps.has(n)||(f[n]=u[n]);if(s.current&&_oldSyncBehavior)for(const e in d)delete p[e];const updateProps=()=>{y&&y.current&&(y.current.props=e.props);updateChildProps();let n=[],t=p;if(o.current&&s.current&&!_oldSyncBehavior){for(const e in o.current)if(s.current[e]){if(s.current[e]._handlersChanged){s.current[e]._cachedHandlersChanged=s.current[e]._handlersChanged;s.current[e]._handlersChanged=null;n.push(s.current[e])}s.current[e].removeHandler(o.current[e])}t=Object.assign({},p);for(const e in d){delete t[e];s.current[e].addHandler(d[e])}}else if(!o.current){t=Object.assign({},p);for(const e in d)delete t[e]}o.current=d;if(s.current){wijmo_1.copy(s.current,t,!1,!0);for(const e in m)_setHostAttribute(s.current.hostElement,e,m[e]);for(const n in h)e.customProps[n](s.current,h[n]);(()=>{for(const e of n)if(e._cachedHandlersChanged){e._handlersChanged=e._cachedHandlersChanged;e._cachedHandlersChanged=null}n=[]})()}},updateChildProps=()=>{c.current=updateChildProperties({controlRef:s,childInfo:c.current},e.props.children)};React.useLayoutEffect(()=>{if(r.current&&!s.current){s.current=new e.constructor(r.current,p);e.prePropsInit&&e.prePropsInit(s.current);if(y)if(wijmo_1.isFunction(y)){const n=y({control:s.current,props:e.props});wijmo_1.isFunction(n)&&(a.current=n)}else y.current&&y.current.control==s.current||(y.current={control:s.current,props:e.props});for(const e in m)_setHostAttribute(s.current.hostElement,e,m[e]);e.props.children&&updateProps();e.initControl&&e.initControl(s.current);e.props.initialized&&setTimeout(()=>{s.current&&e.props.initialized(s.current)})}else i.current&&(i.current=!1);return()=>{if(s.current){const e=s.current;i.current=!0;queueMicrotask(()=>{if(i.current){e.dispose();s.current=null;c.current={};i.current=!1;a.current&&a.current()}})}}},[]);s.current&&queueMicrotask(()=>updateProps());const _=React.createElement("div",Object.assign({},f,{ref:r}),[]),_setHostAttribute=(e,n,t)=>{if(e)switch(n){case"className":{const n=l.current;if(n!==t){wijmo_1.removeClass(e,n);wijmo_1.addClass(e,t);l.current=t}break}}};return{renderResult:_,wjControl:s.current}}exports.useWjComponentBase=useWjComponentBase;function filterKnownProps(e,n,t){const r={};for(const o in e)(n.has(o)||t.has(o))&&(r[o]=e[o]);return r}function clearAndGetEvents(e,n,t,r){const o=r.current,s={};for(const e in n)t.has(e)&&(s[e]=n[e]);for(const t in o)e[t]&&(!_oldSyncBehavior||n[t]?e[t].removeHandler(o[t]):s[t]=o[t]);return s}function getCustomPropsData(e,n){const t={};for(const r in n)void 0!==e[r]&&(t[r]=e[r]);return t}function useWjComponentChildBase(e){const n={};n.knowProperties=new Set(e.properties);n.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:t=>{const r={current:{}},o={current:{}},s={current:{}},c=getPropsAccordingToSyncMode(e.props,r.current),i=filterKnownProps(c,n.knowProperties,n.knowEvents),a=getCustomPropsData(c,e.customProps||{}),l=e.customConstructor?e.customConstructor(t,i,a):new e.constructor(e.needParentInstance?t:i,e.needParentInstance?i:void 0);e.ref&&(wijmo_1.isFunction(e.ref)?e.ref({control:l,props:e.props}):e.ref.current&&e.ref.current.control==l||(e.ref.current={control:l,props:e.props}));s.current=clearAndGetEvents(l,c,n.knowEvents,s);const updateProps=t=>{const c=getPropsAccordingToSyncMode(t,r.current);r.current=t;e.ref&&e.ref.current&&(e.ref.current.props=t);s.current=clearAndGetEvents(l,c,n.knowEvents,s);const i=filterKnownProps(c,n.knowProperties,n.knowEvents);l.initialize?l.initialize(i):wijmo_1.copy(l,i,!1,!0);for(const n in e.customProps)void 0!==c[n]&&e.customProps[n](l,c[n]);a=t.children||[],o.current=updateChildProperties({controlRef:{current:l},childInfo:o.current},a);var a};updateProps(e.props||[]);e.props.initialized&&wijmo_1.isFunction(e.props.initialized)&&e.props.initialized(l);return{instance:l,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}exports.useWjComponentChildBase=useWjComponentChildBase;const flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{const e=console.error;let n=!1;console.error=function(){const e=arguments[0]||"";e.includes("flushSync")&&(n=!0)};flushSync(()=>{});console.error=e;flushSyncStateCache.isReactRendering=n}catch(e){}finally{queueMicrotask(()=>{flushSyncStateCache.isReactRendering=null})}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,n,t=!1){isReactRendering()&&(t=!0);const r=elemRootMap.findIndex(e=>e.host===n);let o;if(-1===r){o=reactDomClient.createRoot(n);elemRootMap.push({host:n,root:o})}else o=elemRootMap[r].root;o.__scheduledForUnmount=!1;t?queueMicrotask(()=>{flushSync(()=>{o.render(e)})}):flushSync(()=>{o.render(e)})}function selectiveDomRender(e,n,t=!1){if(_reactMajorVersion<18){(0,getReactDOM().render)(e,n)}else if(reactDomClientReady)_doRender(e,n,t);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doRender(e,n,t)})))()}return n}exports.selectiveDomRender=selectiveDomRender;function unmountSafely(e){const n=e._internalRoot&&e._internalRoot.containerInfo.firstChild,t=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;t&&n==t?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){const n=elemRootMap.findIndex(n=>n.host===e);if(-1!==n){const e=elemRootMap[n].root;if(isReactRendering()){e.__scheduledForUnmount=!0;queueMicrotask(()=>{e.__scheduledForUnmount&&flushSync(()=>{unmountSafely(e);elemRootMap.splice(n,1)})})}else flushSync(()=>{unmountSafely(e);elemRootMap.splice(n,1)})}}function selectiveDomUnmount(e){if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doUnmount(e)})))()}}exports.selectiveDomUnmount=selectiveDomUnmount;function isKeyOrderSame(e,n,t){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(e[r][t]!=n[r][t])return!1;return!0}function baseFlushSync(){flushSync(()=>{})}exports.baseFlushSync=baseFlushSync;
package/es2015-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.48
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,6 @@
11
11
  *
12
12
  */
13
13
 
14
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};import{ObservableArray,asString,copy,isArray,isFunction,removeClass,addClass,asBoolean}from"@grapecity/wijmo";import*as ReactDOM from"react-dom";import*as React from"react";const flushSyncPolyfill=e=>{e()},createRootPolyfill=()=>{throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill};let reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function*(){try{const e=yield import("react-dom/client");setReactDomClient(e.default||e)}catch(e){try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}}reactDomClientReady=!0}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function*(){reactDomClientLoadPromise&&(yield reactDomClientLoadPromise)}))}let _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){const e=parseInt(React.version);_reactMajorVersion=e;e>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}export function wjForwardRef(e){return _reactMajorVersion>=19?t=>e(t,t.ref):React.forwardRef(e)}let _oldSyncBehavior=!0;export function strictStateMode(e=!1){e==_oldSyncBehavior&&(_oldSyncBehavior=!asBoolean(e,!1))}export const ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};const alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,t){const n=e.controlRef.current,r={},o={};if(t){const s=isArray(t)?t.flat(1/0):[t],c=[];let i=0;const a=new Set;for(let e of s){if(e&&e.type&&e.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?c.push(e.type.render(e.props,e.props.ref)):c.push(e.type.render(e.props,e.ref));c[c.length-1].$index=i;c[c.length-1].$key=e.key}else if(e&&isFunction(e.type)){c.push(e.type(e.props));c[c.length-1].$index=i;c[c.length-1].$key=e.key}e||a.add(i);i++}const l=[];for(let e of c)if(e.assignedToParent){if(e.wjProperty){e.parentProp=asString(e.wjProperty);e.isParentPropArray=n[e.parentProp]&&isArray(n[e.parentProp])}e.isParentPropArray&&!r[e.parentProp]&&(r[e.parentProp]=[]);e.isParentPropArray?r[e.parentProp].push({getInstance:e.getInstance,props:e.props,$key:e.$key,$index:e.$index}):r[e.parentProp]={getInstance:e.getInstance,props:e.props}}else l.push(e);const u=e.childInfo;for(let e in r)if(isArray(r[e])){let t=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;t=!0}let s=u[e];o[e]=[];let c=!1;if(!u[e]){s=[];if(n[e]&&n[e].clear){n[e].clear();c=!0}else n[e]||(n[e]=new ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();c=!0}}else if(!isKeyOrderSame(s,r[e],"$key")&&n[e]&&n[e].clear){n[e].clear();c=!0}if(_oldSyncBehavior)for(let t=s.length-1;t>=0;t--)if(a.has(s[t].$index)){n[e].remove(s[t].instance);s.splice(t,1)}const i=[],l={};for(let e of s)null!=e.$key?l[""+e.$key]=e:i.push(e);let p=0;const getExistingInstance=(e=null)=>{if(null!=e){let t=l[e];null!=t&&delete l[e];return t}return i[p++]};for(let t=0;t<r[e].length;t++){let s=getExistingInstance(r[e][t].$key),i=!1;if(s)s.updateProps(r[e][t].props);else{s=r[e][t].getInstance(n);i=!0}s.$index=r[e][t].$index;s.$key=r[e][t].$key;(c||i)&&(n[e].length==t?n[e].push(s.instance):n[e].splice(t,0,s.instance));o[e].push(s)}for(let t of Object.keys(l))n[e].remove(l[t].instance);for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(t){n[e]._updating--;!c&&u[e]&&u[e].length==r[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{let t=u[e];if(t)t.updateProps(r[e].props);else{t=r[e].getInstance(n);n[e]=t.instance}o[e]=t}const p=[];for(let e of u.$_nonassignable||[])a.has(e.$index)?e.instance&&e.instance.dispose&&isFunction(e.instance.dispose)&&e.instance.dispose():p.push(e);const d=[];let f=0;for(;f<l.length;f++){let e=p[f];e?e.updateProps(l[f].props):e=l[f].getInstance(n);e.$index=l[f].$index;d.push(e)}o.$_nonassignable=d;for(;f<p.length;f++)p[f].instance&&p[f].instance.dispose&&isFunction(p[f].instance.dispose)&&p[f].instance.dispose()}if(_oldSyncBehavior)for(let t of Object.keys(e.childInfo))if(isArray(e.childInfo[t])&&!r[t]&&n[t]&&n[t].remove)for(let r of e.childInfo[t])n[t].remove(r.instance);return o}function getPropsAccordingToSyncMode(e,t,n=null){if(!t||!_oldSyncBehavior){return Object.assign({},e)}let r={};for(let o in e){let s=!1;n&&(s=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!s||e[o]!==t[o])&&(r[o]=e[o])}return r}export function useWjComponentBase(e){const t=React.useRef({}),n=React.useRef(),r=React.useRef(),o=React.useRef(),s=React.useRef(),c=React.useRef({}),i=React.useRef(!1),a=React.useRef(null),l=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}let u=e.props;if(s.current){u=getPropsAccordingToSyncMode(e.props,t.current,n.current);t.current=e.props}const p={},d={},f={},h={},y={},m=e.ref||null;for(let t in u)if(n.current.knowProperties.has(t))p[t]=u[t];else if(n.current.knowEvents.has(t)){d[t]=u[t];p[t]=u[t]}else e.customProps[t]?h[t]=u[t]:buildInProps.has(t)?y[t]=u[t]:specialProps.has(t)||(f[t]=u[t]);if(s.current&&_oldSyncBehavior)for(let e in d)delete p[e];const updateProps=()=>{m&&m.current&&(m.current.props=e.props);updateChildProps();let t=[],n=p;if(o.current&&s.current&&!_oldSyncBehavior){for(let e in o.current)if(s.current[e]){if(s.current[e]._handlersChanged){s.current[e]._cachedHandlersChanged=s.current[e]._handlersChanged;s.current[e]._handlersChanged=null;t.push(s.current[e])}s.current[e].removeHandler(o.current[e])}n=Object.assign({},p);for(let e in d){delete n[e];s.current[e].addHandler(d[e])}}else if(!o.current){n=Object.assign({},p);for(let e in d)delete n[e]}o.current=d;if(s.current){copy(s.current,n,!1,!0);for(let e in y)_setHostAttribute(s.current.hostElement,e,y[e]);for(let t in h)e.customProps[t](s.current,h[t]);(()=>{for(let e of t)if(e._cachedHandlersChanged){e._handlersChanged=e._cachedHandlersChanged;e._cachedHandlersChanged=null}t=[]})()}},updateChildProps=()=>{c.current=updateChildProperties({controlRef:s,childInfo:c.current},e.props.children)};React.useLayoutEffect(()=>{if(r.current&&!s.current){s.current=new e.constructor(r.current,p);e.prePropsInit&&e.prePropsInit(s.current);if(m)if(isFunction(m)){const t=m({control:s.current,props:e.props});isFunction(t)&&(a.current=t)}else m.current&&m.current.control==s.current||(m.current={control:s.current,props:e.props});for(let e in y)_setHostAttribute(s.current.hostElement,e,y[e]);e.props.children&&updateProps();e.initControl&&e.initControl(s.current);e.props.initialized&&setTimeout(()=>{s.current&&e.props.initialized(s.current)})}else i.current&&(i.current=!1);return()=>{if(s.current){const e=s.current;i.current=!0;queueMicrotask(()=>{if(i.current){e.dispose();s.current=null;c.current={};i.current=!1;a.current&&a.current()}})}}},[]);s.current&&queueMicrotask(()=>updateProps());const R=React.createElement("div",Object.assign({},f,{ref:r}),[]),_setHostAttribute=(e,t,n)=>{if(e)switch(t){case"className":const t=l.current;if(t!==n){removeClass(e,t);addClass(e,n);l.current=n}}};return{renderResult:R,wjControl:s.current}}function filterKnownProps(e,t,n){const r={};for(let o in e)(t.has(o)||n.has(o))&&(r[o]=e[o]);return r}function clearAndGetEvents(e,t,n,r){const o=r.current,s={};for(let e in t)n.has(e)&&(s[e]=t[e]);for(let n in o)e[n]&&(!_oldSyncBehavior||t[n]?e[n].removeHandler(o[n]):s[n]=o[n]);return s}function getCustomPropsData(e,t){const n={};for(let r in t)void 0!==e[r]&&(n[r]=e[r]);return n}export function useWjComponentChildBase(e){const t={};t.knowProperties=new Set(e.properties);t.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:n=>{const r={current:{}},o={current:{}},s={current:{}},c=getPropsAccordingToSyncMode(e.props,r.current),i=filterKnownProps(c,t.knowProperties,t.knowEvents),a=getCustomPropsData(c,e.customProps||{}),l=e.customConstructor?e.customConstructor(n,i,a):new e.constructor(e.needParentInstance?n:i,e.needParentInstance?i:void 0);e.ref&&(isFunction(e.ref)?e.ref({control:l,props:e.props}):e.ref.current&&e.ref.current.control==l||(e.ref.current={control:l,props:e.props}));s.current=clearAndGetEvents(l,c,t.knowEvents,s);const updateProps=n=>{const c=getPropsAccordingToSyncMode(n,r.current);r.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);s.current=clearAndGetEvents(l,c,t.knowEvents,s);const i=filterKnownProps(c,t.knowProperties,t.knowEvents);l.initialize?l.initialize(i):copy(l,i,!1,!0);for(let t in e.customProps)void 0!==c[t]&&e.customProps[t](l,c[t]);a=n.children||[],o.current=updateChildProperties({controlRef:{current:l},childInfo:o.current},a);var a};updateProps(e.props||[]);e.props.initialized&&isFunction(e.props.initialized)&&e.props.initialized(l);return{instance:l,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}const flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{const e=console.error;let t=!1;console.error=function(){const e=arguments[0]||"";e.includes("flushSync")&&(t=!0)};flushSync(()=>{});console.error=e;flushSyncStateCache.isReactRendering=t}catch(e){}finally{queueMicrotask(()=>{flushSyncStateCache.isReactRendering=null})}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,t,n=!1){isReactRendering()&&(n=!0);const r=elemRootMap.findIndex(e=>e.host===t);let o;if(-1===r){o=reactDomClient.createRoot(t);elemRootMap.push({host:t,root:o})}else o=elemRootMap[r].root;o.__scheduledForUnmount=!1;n?queueMicrotask(()=>{flushSync(()=>{o.render(e)})}):flushSync(()=>{o.render(e)})}export function selectiveDomRender(e,t,n=!1){if(_reactMajorVersion<18){(0,getReactDOM().render)(e,t)}else if(reactDomClientReady)_doRender(e,t,n);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doRender(e,t,n)})))()}return t}function unmountSafely(e){const t=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&t==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){const t=elemRootMap.findIndex(t=>t.host===e);if(-1!==t){const e=elemRootMap[t].root;if(isReactRendering()){e.__scheduledForUnmount=!0;queueMicrotask(()=>{e.__scheduledForUnmount&&flushSync(()=>{unmountSafely(e);elemRootMap.splice(t,1)})})}else flushSync(()=>{unmountSafely(e);elemRootMap.splice(t,1)})}}export function selectiveDomUnmount(e){if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doUnmount(e)})))()}}function isKeyOrderSame(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r][n]!=t[r][n])return!1;return!0}export function baseFlushSync(){flushSync(()=>{})}
14
+ var __awaiter=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):new t((function(n){n(e.value)})).then(fulfilled,rejected)}step((r=r.apply(e,n||[])).next())}))};import{ObservableArray,asString,copy,isArray,isFunction,removeClass,addClass,asBoolean}from"@grapecity/wijmo";import*as ReactDOM from"react-dom";import*as React from"react";const flushSyncPolyfill=e=>{e()},createRootPolyfill=()=>{throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill};let reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function*(){try{
15
+ // Fix bug WJM-37456: webpackIgnore prevents Webpack from statically analyzing
16
+ const e=yield import(/* webpackIgnore: true */"react-dom/client");setReactDomClient(e.default||e)}catch(e){try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}}reactDomClientReady=!0}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function*(){reactDomClientLoadPromise&&(yield reactDomClientLoadPromise)}))}let _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){const e=parseInt(React.version);_reactMajorVersion=e;e>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}export function wjForwardRef(e){return _reactMajorVersion>=19?n=>e(n,n.ref):React.forwardRef(e)}let _oldSyncBehavior=!0;export function strictStateMode(e=!1){e==_oldSyncBehavior&&(_oldSyncBehavior=!asBoolean(e,!1))}export const ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};const alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,n){const t=e.controlRef.current,r={},o={};if(n){const s=isArray(n)?n.flat(1/0):[n],c=[];let i=0;const a=new Set;for(const e of s){if(e&&e.type&&e.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?c.push(e.type.render(e.props,e.props.ref)):c.push(e.type.render(e.props,e.ref));c[c.length-1].$index=i;c[c.length-1].$key=e.key}else if(e&&isFunction(e.type)){c.push(e.type(e.props));c[c.length-1].$index=i;c[c.length-1].$key=e.key}e||a.add(i);i++}const l=[];for(const e of c)if(e.assignedToParent){if(e.wjProperty){e.parentProp=asString(e.wjProperty);e.isParentPropArray=t[e.parentProp]&&isArray(t[e.parentProp])}e.isParentPropArray&&!r[e.parentProp]&&(r[e.parentProp]=[]);e.isParentPropArray?r[e.parentProp].push({getInstance:e.getInstance,props:e.props,$key:e.$key,$index:e.$index}):r[e.parentProp]={getInstance:e.getInstance,props:e.props}}else l.push(e);const u=e.childInfo;for(const e in r)if(isArray(r[e])){let n=!1;if(t[e]&&null!=t[e]._updating&&!unsuppressedChangedEventProps.has(e)){t[e]._updating++;n=!0}let s=u[e];o[e]=[];let c=!1;if(!u[e]){s=[];if(t[e]&&t[e].clear){t[e].clear();c=!0}else t[e]||(t[e]=new ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(t[e]&&t[e].clear){t[e].clear();c=!0}}else if(!isKeyOrderSame(s,r[e],"$key")&&t[e]&&t[e].clear){t[e].clear();c=!0}if(_oldSyncBehavior)for(let n=s.length-1;n>=0;n--)if(a.has(s[n].$index)){t[e].remove(s[n].instance);s.splice(n,1)}const i=[],l={};for(const e of s)null!=e.$key?l[""+e.$key]=e:i.push(e);let p=0;const getExistingInstance=(e=null)=>{if(null!=e){const n=l[e];null!=n&&delete l[e];return n}return i[p++]};for(let n=0;n<r[e].length;n++){let s=getExistingInstance(r[e][n].$key),i=!1;if(s)s.updateProps(r[e][n].props);else{s=r[e][n].getInstance(t);i=!0}s.$index=r[e][n].$index;s.$key=r[e][n].$key;(c||i)&&(t[e].length==n?t[e].push(s.instance):t[e].splice(n,0,s.instance));o[e].push(s)}for(const n of Object.keys(l))t[e].remove(l[n].instance);for(;!_oldSyncBehavior&&t[e].length>o[e].length;)t[e].pop();if(n){t[e]._updating--;!c&&u[e]&&u[e].length==r[e].length||t[e]._raiseCollectionChanged&&t[e]._raiseCollectionChanged()}}else{let n=u[e];if(n)n.updateProps(r[e].props);else{n=r[e].getInstance(t);t[e]=n.instance}o[e]=n}const p=[];for(const e of u.$_nonassignable||[])a.has(e.$index)?e.instance&&e.instance.dispose&&isFunction(e.instance.dispose)&&e.instance.dispose():p.push(e);const d=[];let f=0;for(;f<l.length;f++){let e=p[f];e?e.updateProps(l[f].props):e=l[f].getInstance(t);e.$index=l[f].$index;d.push(e)}o.$_nonassignable=d;for(;f<p.length;f++)p[f].instance&&p[f].instance.dispose&&isFunction(p[f].instance.dispose)&&p[f].instance.dispose()}if(_oldSyncBehavior)for(const n of Object.keys(e.childInfo))if(isArray(e.childInfo[n])&&!r[n]&&t[n]&&t[n].remove)for(const r of e.childInfo[n])t[n].remove(r.instance);return o}function getPropsAccordingToSyncMode(e,n,t=null){if(!n||!_oldSyncBehavior){return Object.assign({},e)}const r={};for(const o in e){let s=!1;t&&(s=t.knowProperties.has(o)||t.knowEvents.has(o)||t.knowCustomProps.has(o));(t&&!s||e[o]!==n[o])&&(r[o]=e[o])}return r}export function useWjComponentBase(e){const n=React.useRef({}),t=React.useRef(),r=React.useRef(),o=React.useRef(),s=React.useRef(),c=React.useRef({}),i=React.useRef(!1),a=React.useRef(null),l=React.useRef(null);e.customProps||(e.customProps={});if(!t.current){t.current={};t.current.knowProperties=new Set(e.properties);t.current.knowEvents=new Set(e.events);t.current.knowCustomProps=new Set(Object.keys(e.customProps))}let u=e.props;if(s.current){u=getPropsAccordingToSyncMode(e.props,n.current,t.current);n.current=e.props}const p={},d={},f={},h={},y={},m=e.ref||null;for(const n in u)if(t.current.knowProperties.has(n))p[n]=u[n];else if(t.current.knowEvents.has(n)){d[n]=u[n];p[n]=u[n]}else e.customProps[n]?h[n]=u[n]:buildInProps.has(n)?y[n]=u[n]:specialProps.has(n)||(f[n]=u[n]);if(s.current&&_oldSyncBehavior)for(const e in d)delete p[e];const updateProps=()=>{m&&m.current&&(m.current.props=e.props);updateChildProps();let n=[],t=p;if(o.current&&s.current&&!_oldSyncBehavior){for(const e in o.current)if(s.current[e]){if(s.current[e]._handlersChanged){s.current[e]._cachedHandlersChanged=s.current[e]._handlersChanged;s.current[e]._handlersChanged=null;n.push(s.current[e])}s.current[e].removeHandler(o.current[e])}t=Object.assign({},p);for(const e in d){delete t[e];s.current[e].addHandler(d[e])}}else if(!o.current){t=Object.assign({},p);for(const e in d)delete t[e]}o.current=d;if(s.current){copy(s.current,t,!1,!0);for(const e in y)_setHostAttribute(s.current.hostElement,e,y[e]);for(const n in h)e.customProps[n](s.current,h[n]);(()=>{for(const e of n)if(e._cachedHandlersChanged){e._handlersChanged=e._cachedHandlersChanged;e._cachedHandlersChanged=null}n=[]})()}},updateChildProps=()=>{c.current=updateChildProperties({controlRef:s,childInfo:c.current},e.props.children)};React.useLayoutEffect(()=>{if(r.current&&!s.current){s.current=new e.constructor(r.current,p);e.prePropsInit&&e.prePropsInit(s.current);if(m)if(isFunction(m)){const n=m({control:s.current,props:e.props});isFunction(n)&&(a.current=n)}else m.current&&m.current.control==s.current||(m.current={control:s.current,props:e.props});for(const e in y)_setHostAttribute(s.current.hostElement,e,y[e]);e.props.children&&updateProps();e.initControl&&e.initControl(s.current);e.props.initialized&&setTimeout(()=>{s.current&&e.props.initialized(s.current)})}else i.current&&(i.current=!1);return()=>{if(s.current){const e=s.current;i.current=!0;queueMicrotask(()=>{if(i.current){e.dispose();s.current=null;c.current={};i.current=!1;a.current&&a.current()}})}}},[]);s.current&&queueMicrotask(()=>updateProps());const R=React.createElement("div",Object.assign({},f,{ref:r}),[]),_setHostAttribute=(e,n,t)=>{if(e)switch(n){case"className":{const n=l.current;if(n!==t){removeClass(e,n);addClass(e,t);l.current=t}break}}};return{renderResult:R,wjControl:s.current}}function filterKnownProps(e,n,t){const r={};for(const o in e)(n.has(o)||t.has(o))&&(r[o]=e[o]);return r}function clearAndGetEvents(e,n,t,r){const o=r.current,s={};for(const e in n)t.has(e)&&(s[e]=n[e]);for(const t in o)e[t]&&(!_oldSyncBehavior||n[t]?e[t].removeHandler(o[t]):s[t]=o[t]);return s}function getCustomPropsData(e,n){const t={};for(const r in n)void 0!==e[r]&&(t[r]=e[r]);return t}export function useWjComponentChildBase(e){const n={};n.knowProperties=new Set(e.properties);n.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:t=>{const r={current:{}},o={current:{}},s={current:{}},c=getPropsAccordingToSyncMode(e.props,r.current),i=filterKnownProps(c,n.knowProperties,n.knowEvents),a=getCustomPropsData(c,e.customProps||{}),l=e.customConstructor?e.customConstructor(t,i,a):new e.constructor(e.needParentInstance?t:i,e.needParentInstance?i:void 0);e.ref&&(isFunction(e.ref)?e.ref({control:l,props:e.props}):e.ref.current&&e.ref.current.control==l||(e.ref.current={control:l,props:e.props}));s.current=clearAndGetEvents(l,c,n.knowEvents,s);const updateProps=t=>{const c=getPropsAccordingToSyncMode(t,r.current);r.current=t;e.ref&&e.ref.current&&(e.ref.current.props=t);s.current=clearAndGetEvents(l,c,n.knowEvents,s);const i=filterKnownProps(c,n.knowProperties,n.knowEvents);l.initialize?l.initialize(i):copy(l,i,!1,!0);for(const n in e.customProps)void 0!==c[n]&&e.customProps[n](l,c[n]);a=t.children||[],o.current=updateChildProperties({controlRef:{current:l},childInfo:o.current},a);var a};updateProps(e.props||[]);e.props.initialized&&isFunction(e.props.initialized)&&e.props.initialized(l);return{instance:l,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}const flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{const e=console.error;let n=!1;console.error=function(){const e=arguments[0]||"";e.includes("flushSync")&&(n=!0)};flushSync(()=>{});console.error=e;flushSyncStateCache.isReactRendering=n}catch(e){}finally{queueMicrotask(()=>{flushSyncStateCache.isReactRendering=null})}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,n,t=!1){isReactRendering()&&(t=!0);const r=elemRootMap.findIndex(e=>e.host===n);let o;if(-1===r){o=reactDomClient.createRoot(n);elemRootMap.push({host:n,root:o})}else o=elemRootMap[r].root;o.__scheduledForUnmount=!1;t?queueMicrotask(()=>{flushSync(()=>{o.render(e)})}):flushSync(()=>{o.render(e)})}export function selectiveDomRender(e,n,t=!1){if(_reactMajorVersion<18){(0,getReactDOM().render)(e,n)}else if(reactDomClientReady)_doRender(e,n,t);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doRender(e,n,t)})))()}return n}function unmountSafely(e){const n=e._internalRoot&&e._internalRoot.containerInfo.firstChild,t=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;t&&n==t?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){const n=elemRootMap.findIndex(n=>n.host===e);if(-1!==n){const e=elemRootMap[n].root;if(isReactRendering()){e.__scheduledForUnmount=!0;queueMicrotask(()=>{e.__scheduledForUnmount&&flushSync(()=>{unmountSafely(e);elemRootMap.splice(n,1)})})}else flushSync(()=>{unmountSafely(e);elemRootMap.splice(n,1)})}}export function selectiveDomUnmount(e){if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{(()=>__awaiter(this,void 0,void 0,(function*(){yield ensureReactDomClientLoaded();_doUnmount(e)})))()}}function isKeyOrderSame(e,n,t){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(e[r][t]!=n[r][t])return!1;return!0}export function baseFlushSync(){flushSync(()=>{})}
package/es5-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.48
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)},__awaiter=this&&this.__awaiter||function(e,r,n,t){return new(n||(n=Promise))((function(o,a){function fulfilled(e){try{step(t.next(e))}catch(e){a(e)}}function rejected(e){try{step(t.throw(e))}catch(e){a(e)}}function step(e){e.done?o(e.value):new n((function(r){r(e.value)})).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var n,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function verb(a){return function(s){return function step(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;(t=0,o)&&(a=[2&a[0],o.value]);switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:!1};case 5:i.label++;t=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}o[2]&&i.ops.pop();i.trys.pop();continue}a=r.call(e,i)}catch(e){a=[6,e];t=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};import{ObservableArray,asString,copy,isArray,isFunction,removeClass,addClass,asBoolean}from"@grapecity/wijmo";import*as ReactDOM from"react-dom";import*as React from"react";var flushSyncPolyfill=function(e){e()},createRootPolyfill=function(){throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill},reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,import("react-dom/client")];case 1:e=r.sent();setReactDomClient(e.default||e);return[3,3];case 2:r.sent();try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}return[3,3];case 3:reactDomClientReady=!0;return[2]}}))}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return reactDomClientLoadPromise?[4,reactDomClientLoadPromise]:[3,2];case 1:e.sent();e.label=2;case 2:return[2]}}))}))}var _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){var version=parseInt(React.version);_reactMajorVersion=version;version>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}export function wjForwardRef(e){return _reactMajorVersion>=19?function(r){return e(r,r.ref)}:React.forwardRef(e)}var _oldSyncBehavior=!0;export function strictStateMode(e){void 0===e&&(e=!1);e==_oldSyncBehavior&&(_oldSyncBehavior=!asBoolean(e,!1))}export var ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};var alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,r){var n=e.controlRef.current,t={},o={};if(r){for(var a=isArray(r)?r.flat(1/0):[r],i=[],s=0,c=new Set,u=0,l=a;u<l.length;u++){if((_=l[u])&&_.type&&_.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?i.push(_.type.render(_.props,_.props.ref)):i.push(_.type.render(_.props,_.ref));i[i.length-1].$index=s;i[i.length-1].$key=_.key}else if(_&&isFunction(_.type)){i.push(_.type(_.props));i[i.length-1].$index=s;i[i.length-1].$key=_.key}_||c.add(s);s++}for(var p=[],f=0,d=i;f<d.length;f++){if((_=d[f]).assignedToParent){if(_.wjProperty){_.parentProp=asString(_.wjProperty);_.isParentPropArray=n[_.parentProp]&&isArray(n[_.parentProp])}_.isParentPropArray&&!t[_.parentProp]&&(t[_.parentProp]=[]);_.isParentPropArray?t[_.parentProp].push({getInstance:_.getInstance,props:_.props,$key:_.$key,$index:_.$index}):t[_.parentProp]={getInstance:_.getInstance,props:_.props}}else p.push(_)}var h=e.childInfo,_loop_1=function(e){if(isArray(t[e])){var r=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;r=!0}var a=h[e];o[e]=[];var i=!1;if(!h[e]){a=[];if(n[e]&&n[e].clear){n[e].clear();i=!0}else n[e]||(n[e]=new ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();i=!0}}else if(!isKeyOrderSame(a,t[e],"$key")&&n[e]&&n[e].clear){n[e].clear();i=!0}if(_oldSyncBehavior)for(var s=a.length-1;s>=0;s--)if(c.has(a[s].$index)){n[e].remove(a[s].instance);a.splice(s,1)}for(var u=[],l={},p=0,f=a;p<f.length;p++){var d=f[p];null!=d.$key?l[""+d.$key]=d:u.push(d)}for(var v=0,getExistingInstance=function(e){void 0===e&&(e=null);if(null!=e){var r=l[e];null!=r&&delete l[e];return r}return u[v++]},y=0;y<t[e].length;y++){var m=!1;if(P=getExistingInstance(t[e][y].$key))P.updateProps(t[e][y].props);else{P=t[e][y].getInstance(n);m=!0}P.$index=t[e][y].$index;P.$key=t[e][y].$key;(i||m)&&(n[e].length==y?n[e].push(P.instance):n[e].splice(y,0,P.instance));o[e].push(P)}for(var g=0,_=Object.keys(l);g<_.length;g++){var R=_[g];n[e].remove(l[R].instance)}for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(r){n[e]._updating--;!i&&h[e]&&h[e].length==t[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{var P;if(P=h[e])P.updateProps(t[e].props);else{P=t[e].getInstance(n);n[e]=P.instance}o[e]=P}};for(var v in t)_loop_1(v);for(var y=[],m=0,g=h.$_nonassignable||[];m<g.length;m++){var _=g[m];c.has(_.$index)?_.instance&&_.instance.dispose&&isFunction(_.instance.dispose)&&_.instance.dispose():y.push(_)}for(var R=[],P=0;P<p.length;P++){var w=y[P];w?w.updateProps(p[P].props):w=p[P].getInstance(n);w.$index=p[P].$index;R.push(w)}o.$_nonassignable=R;for(;P<y.length;P++)y[P].instance&&y[P].instance.dispose&&isFunction(y[P].instance.dispose)&&y[P].instance.dispose()}if(_oldSyncBehavior)for(var C=0,S=Object.keys(e.childInfo);C<S.length;C++){var b=S[C];if(isArray(e.childInfo[b])&&!t[b]&&n[b]&&n[b].remove)for(var k=0,D=e.childInfo[b];k<D.length;k++){var M=D[k];n[b].remove(M.instance)}}return o}function getPropsAccordingToSyncMode(e,r,n){void 0===n&&(n=null);if(!r||!_oldSyncBehavior){return __assign({},e)}var t={};for(var o in e){var a=!1;n&&(a=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!a||e[o]!==r[o])&&(t[o]=e[o])}return t}export function useWjComponentBase(e){var r=React.useRef({}),n=React.useRef(),t=React.useRef(),o=React.useRef(),a=React.useRef(),i=React.useRef({}),s=React.useRef(!1),c=React.useRef(null),u=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}var l=e.props;if(a.current){l=getPropsAccordingToSyncMode(e.props,r.current,n.current);r.current=e.props}var p={},f={},d={},h={},v={},y=e.ref||null;for(var m in l)if(n.current.knowProperties.has(m))p[m]=l[m];else if(n.current.knowEvents.has(m)){f[m]=l[m];p[m]=l[m]}else e.customProps[m]?h[m]=l[m]:buildInProps.has(m)?v[m]=l[m]:specialProps.has(m)||(d[m]=l[m]);if(a.current&&_oldSyncBehavior)for(var m in f)delete p[m];var updateProps=function(){y&&y.current&&(y.current.props=e.props);updateChildProps();var r=[],n=p;if(o.current&&a.current&&!_oldSyncBehavior){for(var t in o.current)if(a.current[t]){if(a.current[t]._handlersChanged){a.current[t]._cachedHandlersChanged=a.current[t]._handlersChanged;a.current[t]._handlersChanged=null;r.push(a.current[t])}a.current[t].removeHandler(o.current[t])}n=__assign({},p);for(var i in f){delete n[i];a.current[i].addHandler(f[i])}}else if(!o.current){n=__assign({},p);for(var i in f)delete n[i]}o.current=f;if(a.current){copy(a.current,n,!1,!0);for(var s in v)_setHostAttribute(a.current.hostElement,s,v[s]);for(var s in h)e.customProps[s](a.current,h[s]);!function(){for(var e=0,n=r;e<n.length;e++){var t=n[e];if(t._cachedHandlersChanged){t._handlersChanged=t._cachedHandlersChanged;t._cachedHandlersChanged=null}}r=[]}()}},updateChildProps=function(){i.current=updateChildProperties({controlRef:a,childInfo:i.current},e.props.children)};React.useLayoutEffect((function(){if(t.current&&!a.current){a.current=new e.constructor(t.current,p);e.prePropsInit&&e.prePropsInit(a.current);if(y)if(isFunction(y)){var r=y({control:a.current,props:e.props});isFunction(r)&&(c.current=r)}else y.current&&y.current.control==a.current||(y.current={control:a.current,props:e.props});for(var n in v)_setHostAttribute(a.current.hostElement,n,v[n]);e.props.children&&updateProps();e.initControl&&e.initControl(a.current);e.props.initialized&&setTimeout((function(){a.current&&e.props.initialized(a.current)}))}else s.current&&(s.current=!1);return function(){if(a.current){var e=a.current;s.current=!0;queueMicrotask((function(){if(s.current){e.dispose();a.current=null;i.current={};s.current=!1;c.current&&c.current()}}))}}}),[]);a.current&&queueMicrotask((function(){return updateProps()}));var g=React.createElement("div",__assign({},d,{ref:t}),[]),_setHostAttribute=function(e,r,n){if(e)switch(r){case"className":var t=u.current;if(t!==n){removeClass(e,t);addClass(e,n);u.current=n}}};return{renderResult:g,wjControl:a.current}}function filterKnownProps(e,r,n){var t={};for(var o in e)(r.has(o)||n.has(o))&&(t[o]=e[o]);return t}function clearAndGetEvents(e,r,n,t){var o=t.current,a={};for(var i in r)n.has(i)&&(a[i]=r[i]);for(var s in o)e[s]&&(!_oldSyncBehavior||r[s]?e[s].removeHandler(o[s]):a[s]=o[s]);return a}function getCustomPropsData(e,r){var n={};for(var t in r)void 0!==e[t]&&(n[t]=e[t]);return n}export function useWjComponentChildBase(e){var r={};r.knowProperties=new Set(e.properties);r.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:function(n){var t={current:{}},o={current:{}},a={current:{}},i=getPropsAccordingToSyncMode(e.props,t.current),s=filterKnownProps(i,r.knowProperties,r.knowEvents),c=getCustomPropsData(i,e.customProps||{}),u=e.customConstructor?e.customConstructor(n,s,c):new e.constructor(e.needParentInstance?n:s,e.needParentInstance?s:void 0);e.ref&&(isFunction(e.ref)?e.ref({control:u,props:e.props}):e.ref.current&&e.ref.current.control==u||(e.ref.current={control:u,props:e.props}));a.current=clearAndGetEvents(u,i,r.knowEvents,a);var updateProps=function(n){var i=getPropsAccordingToSyncMode(n,t.current);t.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);a.current=clearAndGetEvents(u,i,r.knowEvents,a);var s,c=filterKnownProps(i,r.knowProperties,r.knowEvents);u.initialize?u.initialize(c):copy(u,c,!1,!0);for(var l in e.customProps)void 0!==i[l]&&e.customProps[l](u,i[l]);s=n.children||[],o.current=updateChildProperties({controlRef:{current:u},childInfo:o.current},s)};updateProps(e.props||[]);e.props.initialized&&isFunction(e.props.initialized)&&e.props.initialized(u);return{instance:u,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}var flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{var e=console.error,r=!1;console.error=function(){var e=arguments[0]||"";e.includes("flushSync")&&(r=!0)};flushSync((function(){}));console.error=e;flushSyncStateCache.isReactRendering=r}catch(e){}finally{queueMicrotask((function(){flushSyncStateCache.isReactRendering=null}))}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,r,n){void 0===n&&(n=!1);isReactRendering()&&(n=!0);var t,o=elemRootMap.findIndex((function(e){return e.host===r}));if(-1===o){t=reactDomClient.createRoot(r);elemRootMap.push({host:r,root:t})}else t=elemRootMap[o].root;t.__scheduledForUnmount=!1;n?queueMicrotask((function(){flushSync((function(){t.render(e)}))})):flushSync((function(){t.render(e)}))}export function selectiveDomRender(e,r,n){var t=this;void 0===n&&(n=!1);if(_reactMajorVersion<18){(0,getReactDOM().render)(e,r)}else if(reactDomClientReady)_doRender(e,r,n);else{__awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:t.sent();_doRender(e,r,n);return[2]}}))}))}return r}function unmountSafely(e){var r=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&r==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){var r=elemRootMap.findIndex((function(r){return r.host===e}));if(-1!==r){var n=elemRootMap[r].root;if(isReactRendering()){n.__scheduledForUnmount=!0;queueMicrotask((function(){n.__scheduledForUnmount&&flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}))}else flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}}export function selectiveDomUnmount(e){var r=this;if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{__awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:r.sent();_doUnmount(e);return[2]}}))}))}}function isKeyOrderSame(e,r,n){if(e.length!=r.length)return!1;for(var t=0;t<e.length;t++)if(e[t][n]!=r[t][n])return!1;return!0}export function baseFlushSync(){flushSync((function(){}))}
14
+ var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)},__awaiter=this&&this.__awaiter||function(e,r,n,t){return new(n||(n=Promise))((function(o,a){function fulfilled(e){try{step(t.next(e))}catch(e){a(e)}}function rejected(e){try{step(t.throw(e))}catch(e){a(e)}}function step(e){e.done?o(e.value):new n((function(r){r(e.value)})).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var n,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function verb(a){return function(s){return function step(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;(t=0,o)&&(a=[2&a[0],o.value]);switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:!1};case 5:i.label++;t=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}o[2]&&i.ops.pop();i.trys.pop();continue}a=r.call(e,i)}catch(e){a=[6,e];t=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};import{ObservableArray,asString,copy,isArray,isFunction,removeClass,addClass,asBoolean}from"@grapecity/wijmo";import*as ReactDOM from"react-dom";import*as React from"react";var flushSyncPolyfill=function(e){e()},createRootPolyfill=function(){throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill},reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,import(/* webpackIgnore: true */"react-dom/client")];case 1:e=r.sent();setReactDomClient(e.default||e);return[3,3];case 2:r.sent();try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}return[3,3];case 3:reactDomClientReady=!0;return[2]}}))}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return reactDomClientLoadPromise?[4,reactDomClientLoadPromise]:[3,2];case 1:e.sent();e.label=2;case 2:return[2]}}))}))}var _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){var version=parseInt(React.version);_reactMajorVersion=version;version>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}export function wjForwardRef(e){return _reactMajorVersion>=19?function(r){return e(r,r.ref)}:React.forwardRef(e)}var _oldSyncBehavior=!0;export function strictStateMode(e){void 0===e&&(e=!1);e==_oldSyncBehavior&&(_oldSyncBehavior=!asBoolean(e,!1))}export var ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};var alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,r){var n=e.controlRef.current,t={},o={};if(r){for(var a=isArray(r)?r.flat(1/0):[r],i=[],s=0,c=new Set,u=0,l=a;u<l.length;u++){if((_=l[u])&&_.type&&_.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?i.push(_.type.render(_.props,_.props.ref)):i.push(_.type.render(_.props,_.ref));i[i.length-1].$index=s;i[i.length-1].$key=_.key}else if(_&&isFunction(_.type)){i.push(_.type(_.props));i[i.length-1].$index=s;i[i.length-1].$key=_.key}_||c.add(s);s++}for(var p=[],f=0,d=i;f<d.length;f++){if((_=d[f]).assignedToParent){if(_.wjProperty){_.parentProp=asString(_.wjProperty);_.isParentPropArray=n[_.parentProp]&&isArray(n[_.parentProp])}_.isParentPropArray&&!t[_.parentProp]&&(t[_.parentProp]=[]);_.isParentPropArray?t[_.parentProp].push({getInstance:_.getInstance,props:_.props,$key:_.$key,$index:_.$index}):t[_.parentProp]={getInstance:_.getInstance,props:_.props}}else p.push(_)}var h=e.childInfo,_loop_1=function(e){if(isArray(t[e])){var r=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;r=!0}var a=h[e];o[e]=[];var i=!1;if(!h[e]){a=[];if(n[e]&&n[e].clear){n[e].clear();i=!0}else n[e]||(n[e]=new ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();i=!0}}else if(!isKeyOrderSame(a,t[e],"$key")&&n[e]&&n[e].clear){n[e].clear();i=!0}if(_oldSyncBehavior)for(var s=a.length-1;s>=0;s--)if(c.has(a[s].$index)){n[e].remove(a[s].instance);a.splice(s,1)}for(var u=[],l={},p=0,f=a;p<f.length;p++){var d=f[p];null!=d.$key?l[""+d.$key]=d:u.push(d)}for(var v=0,getExistingInstance=function(e){void 0===e&&(e=null);if(null!=e){var r=l[e];null!=r&&delete l[e];return r}return u[v++]},y=0;y<t[e].length;y++){var m=!1;if(P=getExistingInstance(t[e][y].$key))P.updateProps(t[e][y].props);else{P=t[e][y].getInstance(n);m=!0}P.$index=t[e][y].$index;P.$key=t[e][y].$key;(i||m)&&(n[e].length==y?n[e].push(P.instance):n[e].splice(y,0,P.instance));o[e].push(P)}for(var g=0,_=Object.keys(l);g<_.length;g++){var R=_[g];n[e].remove(l[R].instance)}for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(r){n[e]._updating--;!i&&h[e]&&h[e].length==t[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{var P;if(P=h[e])P.updateProps(t[e].props);else{P=t[e].getInstance(n);n[e]=P.instance}o[e]=P}};for(var v in t)_loop_1(v);for(var y=[],m=0,g=h.$_nonassignable||[];m<g.length;m++){var _=g[m];c.has(_.$index)?_.instance&&_.instance.dispose&&isFunction(_.instance.dispose)&&_.instance.dispose():y.push(_)}for(var R=[],P=0;P<p.length;P++){var w=y[P];w?w.updateProps(p[P].props):w=p[P].getInstance(n);w.$index=p[P].$index;R.push(w)}o.$_nonassignable=R;for(;P<y.length;P++)y[P].instance&&y[P].instance.dispose&&isFunction(y[P].instance.dispose)&&y[P].instance.dispose()}if(_oldSyncBehavior)for(var C=0,S=Object.keys(e.childInfo);C<S.length;C++){var b=S[C];if(isArray(e.childInfo[b])&&!t[b]&&n[b]&&n[b].remove)for(var k=0,D=e.childInfo[b];k<D.length;k++){var M=D[k];n[b].remove(M.instance)}}return o}function getPropsAccordingToSyncMode(e,r,n){void 0===n&&(n=null);if(!r||!_oldSyncBehavior){return __assign({},e)}var t={};for(var o in e){var a=!1;n&&(a=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!a||e[o]!==r[o])&&(t[o]=e[o])}return t}export function useWjComponentBase(e){var r=React.useRef({}),n=React.useRef(),t=React.useRef(),o=React.useRef(),a=React.useRef(),i=React.useRef({}),s=React.useRef(!1),c=React.useRef(null),u=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}var l=e.props;if(a.current){l=getPropsAccordingToSyncMode(e.props,r.current,n.current);r.current=e.props}var p={},f={},d={},h={},v={},y=e.ref||null;for(var m in l)if(n.current.knowProperties.has(m))p[m]=l[m];else if(n.current.knowEvents.has(m)){f[m]=l[m];p[m]=l[m]}else e.customProps[m]?h[m]=l[m]:buildInProps.has(m)?v[m]=l[m]:specialProps.has(m)||(d[m]=l[m]);if(a.current&&_oldSyncBehavior)for(var m in f)delete p[m];var updateProps=function(){y&&y.current&&(y.current.props=e.props);updateChildProps();var r=[],n=p;if(o.current&&a.current&&!_oldSyncBehavior){for(var t in o.current)if(a.current[t]){if(a.current[t]._handlersChanged){a.current[t]._cachedHandlersChanged=a.current[t]._handlersChanged;a.current[t]._handlersChanged=null;r.push(a.current[t])}a.current[t].removeHandler(o.current[t])}n=__assign({},p);for(var i in f){delete n[i];a.current[i].addHandler(f[i])}}else if(!o.current){n=__assign({},p);for(var i in f)delete n[i]}o.current=f;if(a.current){copy(a.current,n,!1,!0);for(var s in v)_setHostAttribute(a.current.hostElement,s,v[s]);for(var s in h)e.customProps[s](a.current,h[s]);!function(){for(var e=0,n=r;e<n.length;e++){var t=n[e];if(t._cachedHandlersChanged){t._handlersChanged=t._cachedHandlersChanged;t._cachedHandlersChanged=null}}r=[]}()}},updateChildProps=function(){i.current=updateChildProperties({controlRef:a,childInfo:i.current},e.props.children)};React.useLayoutEffect((function(){if(t.current&&!a.current){a.current=new e.constructor(t.current,p);e.prePropsInit&&e.prePropsInit(a.current);if(y)if(isFunction(y)){var r=y({control:a.current,props:e.props});isFunction(r)&&(c.current=r)}else y.current&&y.current.control==a.current||(y.current={control:a.current,props:e.props});for(var n in v)_setHostAttribute(a.current.hostElement,n,v[n]);e.props.children&&updateProps();e.initControl&&e.initControl(a.current);e.props.initialized&&setTimeout((function(){a.current&&e.props.initialized(a.current)}))}else s.current&&(s.current=!1);return function(){if(a.current){var e=a.current;s.current=!0;queueMicrotask((function(){if(s.current){e.dispose();a.current=null;i.current={};s.current=!1;c.current&&c.current()}}))}}}),[]);a.current&&queueMicrotask((function(){return updateProps()}));var g=React.createElement("div",__assign({},d,{ref:t}),[]),_setHostAttribute=function(e,r,n){if(e)switch(r){case"className":var t=u.current;if(t!==n){removeClass(e,t);addClass(e,n);u.current=n}}};return{renderResult:g,wjControl:a.current}}function filterKnownProps(e,r,n){var t={};for(var o in e)(r.has(o)||n.has(o))&&(t[o]=e[o]);return t}function clearAndGetEvents(e,r,n,t){var o=t.current,a={};for(var i in r)n.has(i)&&(a[i]=r[i]);for(var s in o)e[s]&&(!_oldSyncBehavior||r[s]?e[s].removeHandler(o[s]):a[s]=o[s]);return a}function getCustomPropsData(e,r){var n={};for(var t in r)void 0!==e[t]&&(n[t]=e[t]);return n}export function useWjComponentChildBase(e){var r={};r.knowProperties=new Set(e.properties);r.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:function(n){var t={current:{}},o={current:{}},a={current:{}},i=getPropsAccordingToSyncMode(e.props,t.current),s=filterKnownProps(i,r.knowProperties,r.knowEvents),c=getCustomPropsData(i,e.customProps||{}),u=e.customConstructor?e.customConstructor(n,s,c):new e.constructor(e.needParentInstance?n:s,e.needParentInstance?s:void 0);e.ref&&(isFunction(e.ref)?e.ref({control:u,props:e.props}):e.ref.current&&e.ref.current.control==u||(e.ref.current={control:u,props:e.props}));a.current=clearAndGetEvents(u,i,r.knowEvents,a);var updateProps=function(n){var i=getPropsAccordingToSyncMode(n,t.current);t.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);a.current=clearAndGetEvents(u,i,r.knowEvents,a);var s,c=filterKnownProps(i,r.knowProperties,r.knowEvents);u.initialize?u.initialize(c):copy(u,c,!1,!0);for(var l in e.customProps)void 0!==i[l]&&e.customProps[l](u,i[l]);s=n.children||[],o.current=updateChildProperties({controlRef:{current:u},childInfo:o.current},s)};updateProps(e.props||[]);e.props.initialized&&isFunction(e.props.initialized)&&e.props.initialized(u);return{instance:u,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}var flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{var e=console.error,r=!1;console.error=function(){var e=arguments[0]||"";e.includes("flushSync")&&(r=!0)};flushSync((function(){}));console.error=e;flushSyncStateCache.isReactRendering=r}catch(e){}finally{queueMicrotask((function(){flushSyncStateCache.isReactRendering=null}))}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,r,n){void 0===n&&(n=!1);isReactRendering()&&(n=!0);var t,o=elemRootMap.findIndex((function(e){return e.host===r}));if(-1===o){t=reactDomClient.createRoot(r);elemRootMap.push({host:r,root:t})}else t=elemRootMap[o].root;t.__scheduledForUnmount=!1;n?queueMicrotask((function(){flushSync((function(){t.render(e)}))})):flushSync((function(){t.render(e)}))}export function selectiveDomRender(e,r,n){var t=this;void 0===n&&(n=!1);if(_reactMajorVersion<18){(0,getReactDOM().render)(e,r)}else if(reactDomClientReady)_doRender(e,r,n);else{__awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:t.sent();_doRender(e,r,n);return[2]}}))}))}return r}function unmountSafely(e){var r=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&r==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){var r=elemRootMap.findIndex((function(r){return r.host===e}));if(-1!==r){var n=elemRootMap[r].root;if(isReactRendering()){n.__scheduledForUnmount=!0;queueMicrotask((function(){n.__scheduledForUnmount&&flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}))}else flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}}export function selectiveDomUnmount(e){var r=this;if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{__awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:r.sent();_doUnmount(e);return[2]}}))}))}}function isKeyOrderSame(e,r,n){if(e.length!=r.length)return!1;for(var t=0;t<e.length;t++)if(e[t][n]!=r[t][n])return!1;return!0}export function baseFlushSync(){flushSync((function(){}))}
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.48
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -24,58 +24,58 @@ export interface WjForwardRefExoticComponent<P> extends React.NamedExoticCompone
24
24
  defaultProps?: Partial<P>;
25
25
  propTypes?: React.WeakValidationMap<P>;
26
26
  /** bugFix: WJM-35713
27
- * **NOTE**: Due to the limitations of React Exotic components, we need to
28
- * redeclare the props function signature here.
29
- *
30
- * Exotic components in React (such as those created by `React.forwardRef`
31
- * or `React.memo`) are treated as non-callable. This means that the default
32
- * behavior of exotic components doesn't allow us to directly call them as
33
- * normal functions. As a workaround, we explicitly redeclare the function
34
- * signature to ensure proper handling of `props` in our custom implementation.
35
- *
36
- * This is done to maintain compatibility with React's internal `ExoticComponent`
37
- * type while allowing the component to function as expected with `props`.
38
- */
39
- (props: P): (React.ReactElement | null);
27
+ * **NOTE**: Due to the limitations of React Exotic components, we need to
28
+ * redeclare the props function signature here.
29
+ *
30
+ * Exotic components in React (such as those created by `React.forwardRef`
31
+ * or `React.memo`) are treated as non-callable. This means that the default
32
+ * behavior of exotic components doesn't allow us to directly call them as
33
+ * normal functions. As a workaround, we explicitly redeclare the function
34
+ * signature to ensure proper handling of `props` in our custom implementation.
35
+ *
36
+ * This is done to maintain compatibility with React's internal `ExoticComponent`
37
+ * type while allowing the component to function as expected with `props`.
38
+ */
39
+ (props: P): React.ReactElement | null;
40
40
  }
41
41
  export declare function wjForwardRef(fn: any): any;
42
42
  /**
43
- * From 5.20241.19, React interop now supports strict state mode.
44
- * This means that on each re-render cycle, all of the component properties
45
- * get synced with their values provided in the JSX.
46
- * Setting properties via JSX will make that prop externally controlled, and
47
- * changing its value will be allowed only by updating the state variables passed in JSX.
48
- *
49
- * By default, this option is set to false to maintain compatibility with existing user applications.
50
- * If users want to utilize the Wijmo API in accordance with React's state management philosophy,
51
- * they can set **strictStateMode** to true.
52
- *
53
- * When the strictStateMode flag is false, the value of the underlying component gets synced only when
54
- * the prop value changes and not when the component re-renders. This makes it possible for JSX to become
55
- * out of sync with the rendered state.
56
- *
57
- * Consider the following: if you set the value on an input control like {@link InputDate} and if strictStateMode
58
- * is false, it is possible to select a different value in the control. After the value is selected,
59
- * there is a mismatch between the React-provided state and the rendered state. This leads to potential bugs.
60
- * That is why React recommends using controlled components. In controlled components, once the value is
61
- * provided externally via JSX, the control value is not allowed to change unless the externally provided value
62
- * is changed itself. So in the above scenario (for strictStateMode = true), to be able to change the value,
63
- * we need to handle the valueChanged event and update the state variable to update the controlled value.
64
- *
65
- * ```typescript
66
- * function App() {
67
- * const [date, setDate] = useState(new Date());
68
- *
69
- * return (
70
- * <div>
71
- * <InputDate value={date} valueChanged={(s) => setDate(s.value)} />
72
- * </div>
73
- * );
74
- * }
75
- * ```
76
- *
77
- * @param value Whether to use the strict state mode or not
78
- */
43
+ * From 5.20241.19, React interop now supports strict state mode.
44
+ * This means that on each re-render cycle, all of the component properties
45
+ * get synced with their values provided in the JSX.
46
+ * Setting properties via JSX will make that prop externally controlled, and
47
+ * changing its value will be allowed only by updating the state variables passed in JSX.
48
+ *
49
+ * By default, this option is set to false to maintain compatibility with existing user applications.
50
+ * If users want to utilize the Wijmo API in accordance with React's state management philosophy,
51
+ * they can set **strictStateMode** to true.
52
+ *
53
+ * When the strictStateMode flag is false, the value of the underlying component gets synced only when
54
+ * the prop value changes and not when the component re-renders. This makes it possible for JSX to become
55
+ * out of sync with the rendered state.
56
+ *
57
+ * Consider the following: if you set the value on an input control like {@link InputDate} and if strictStateMode
58
+ * is false, it is possible to select a different value in the control. After the value is selected,
59
+ * there is a mismatch between the React-provided state and the rendered state. This leads to potential bugs.
60
+ * That is why React recommends using controlled components. In controlled components, once the value is
61
+ * provided externally via JSX, the control value is not allowed to change unless the externally provided value
62
+ * is changed itself. So in the above scenario (for strictStateMode = true), to be able to change the value,
63
+ * we need to handle the valueChanged event and update the state variable to update the controlled value.
64
+ *
65
+ * ```typescript
66
+ * function App() {
67
+ * const [date, setDate] = useState(new Date());
68
+ *
69
+ * return (
70
+ * <div>
71
+ * <InputDate value={date} valueChanged={(s) => setDate(s.value)} />
72
+ * </div>
73
+ * );
74
+ * }
75
+ * ```
76
+ *
77
+ * @param value Whether to use the strict state mode or not
78
+ */
79
79
  export declare function strictStateMode(value?: boolean): void;
80
80
  export declare type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
81
81
  export declare type WjRef<T> = {
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.48
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- "use strict";var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)},__awaiter=this&&this.__awaiter||function(e,r,n,t){return new(n||(n=Promise))((function(o,i){function fulfilled(e){try{step(t.next(e))}catch(e){i(e)}}function rejected(e){try{step(t.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):new n((function(r){r(e.value)})).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var n,t,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(s){return function step(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;(t=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;t=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e];t=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(r[n]=e[n]);r.default=e;return r};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),ReactDOM=__importStar(require("react-dom")),React=__importStar(require("react")),flushSyncPolyfill=function(e){e()},createRootPolyfill=function(){throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill},reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,Promise.resolve().then((function(){return __importStar(require("react-dom/client"))}))];case 1:e=r.sent();setReactDomClient(e.default||e);return[3,3];case 2:r.sent();try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}return[3,3];case 3:reactDomClientReady=!0;return[2]}}))}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return reactDomClientLoadPromise?[4,reactDomClientLoadPromise]:[3,2];case 1:e.sent();e.label=2;case 2:return[2]}}))}))}var _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){var version=parseInt(React.version);_reactMajorVersion=version;version>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}function wjForwardRef(e){return _reactMajorVersion>=19?function(r){return e(r,r.ref)}:React.forwardRef(e)}exports.wjForwardRef=wjForwardRef;var _oldSyncBehavior=!0;function strictStateMode(e){void 0===e&&(e=!1);e==_oldSyncBehavior&&(_oldSyncBehavior=!wijmo_1.asBoolean(e,!1))}exports.strictStateMode=strictStateMode;exports.ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};var alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,r){var n=e.controlRef.current,t={},o={};if(r){for(var i=wijmo_1.isArray(r)?r.flat(1/0):[r],a=[],s=0,c=new Set,u=0,l=i;u<l.length;u++){if((R=l[u])&&R.type&&R.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?a.push(R.type.render(R.props,R.props.ref)):a.push(R.type.render(R.props,R.ref));a[a.length-1].$index=s;a[a.length-1].$key=R.key}else if(R&&wijmo_1.isFunction(R.type)){a.push(R.type(R.props));a[a.length-1].$index=s;a[a.length-1].$key=R.key}R||c.add(s);s++}for(var p=[],f=0,d=a;f<d.length;f++){if((R=d[f]).assignedToParent){if(R.wjProperty){R.parentProp=wijmo_1.asString(R.wjProperty);R.isParentPropArray=n[R.parentProp]&&wijmo_1.isArray(n[R.parentProp])}R.isParentPropArray&&!t[R.parentProp]&&(t[R.parentProp]=[]);R.isParentPropArray?t[R.parentProp].push({getInstance:R.getInstance,props:R.props,$key:R.$key,$index:R.$index}):t[R.parentProp]={getInstance:R.getInstance,props:R.props}}else p.push(R)}var h=e.childInfo,_loop_1=function(e){if(wijmo_1.isArray(t[e])){var r=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;r=!0}var i=h[e];o[e]=[];var a=!1;if(!h[e]){i=[];if(n[e]&&n[e].clear){n[e].clear();a=!0}else n[e]||(n[e]=new wijmo_1.ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();a=!0}}else if(!isKeyOrderSame(i,t[e],"$key")&&n[e]&&n[e].clear){n[e].clear();a=!0}if(_oldSyncBehavior)for(var s=i.length-1;s>=0;s--)if(c.has(i[s].$index)){n[e].remove(i[s].instance);i.splice(s,1)}for(var u=[],l={},p=0,f=i;p<f.length;p++){var d=f[p];null!=d.$key?l[""+d.$key]=d:u.push(d)}for(var v=0,getExistingInstance=function(e){void 0===e&&(e=null);if(null!=e){var r=l[e];null!=r&&delete l[e];return r}return u[v++]},m=0;m<t[e].length;m++){var _=!1;if(w=getExistingInstance(t[e][m].$key))w.updateProps(t[e][m].props);else{w=t[e][m].getInstance(n);_=!0}w.$index=t[e][m].$index;w.$key=t[e][m].$key;(a||_)&&(n[e].length==m?n[e].push(w.instance):n[e].splice(m,0,w.instance));o[e].push(w)}for(var y=0,R=Object.keys(l);y<R.length;y++){var g=R[y];n[e].remove(l[g].instance)}for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(r){n[e]._updating--;!a&&h[e]&&h[e].length==t[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{var w;if(w=h[e])w.updateProps(t[e].props);else{w=t[e].getInstance(n);n[e]=w.instance}o[e]=w}};for(var v in t)_loop_1(v);for(var m=[],_=0,y=h.$_nonassignable||[];_<y.length;_++){var R=y[_];c.has(R.$index)?R.instance&&R.instance.dispose&&wijmo_1.isFunction(R.instance.dispose)&&R.instance.dispose():m.push(R)}for(var g=[],w=0;w<p.length;w++){var P=m[w];P?P.updateProps(p[w].props):P=p[w].getInstance(n);P.$index=p[w].$index;g.push(P)}o.$_nonassignable=g;for(;w<m.length;w++)m[w].instance&&m[w].instance.dispose&&wijmo_1.isFunction(m[w].instance.dispose)&&m[w].instance.dispose()}if(_oldSyncBehavior)for(var S=0,C=Object.keys(e.childInfo);S<C.length;S++){var j=C[S];if(wijmo_1.isArray(e.childInfo[j])&&!t[j]&&n[j]&&n[j].remove)for(var D=0,b=e.childInfo[j];D<b.length;D++){var k=b[D];n[j].remove(k.instance)}}return o}function getPropsAccordingToSyncMode(e,r,n){void 0===n&&(n=null);if(!r||!_oldSyncBehavior){return __assign({},e)}var t={};for(var o in e){var i=!1;n&&(i=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!i||e[o]!==r[o])&&(t[o]=e[o])}return t}function useWjComponentBase(e){var r=React.useRef({}),n=React.useRef(),t=React.useRef(),o=React.useRef(),i=React.useRef(),a=React.useRef({}),s=React.useRef(!1),c=React.useRef(null),u=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}var l=e.props;if(i.current){l=getPropsAccordingToSyncMode(e.props,r.current,n.current);r.current=e.props}var p={},f={},d={},h={},v={},m=e.ref||null;for(var _ in l)if(n.current.knowProperties.has(_))p[_]=l[_];else if(n.current.knowEvents.has(_)){f[_]=l[_];p[_]=l[_]}else e.customProps[_]?h[_]=l[_]:buildInProps.has(_)?v[_]=l[_]:specialProps.has(_)||(d[_]=l[_]);if(i.current&&_oldSyncBehavior)for(var _ in f)delete p[_];var updateProps=function(){m&&m.current&&(m.current.props=e.props);updateChildProps();var r=[],n=p;if(o.current&&i.current&&!_oldSyncBehavior){for(var t in o.current)if(i.current[t]){if(i.current[t]._handlersChanged){i.current[t]._cachedHandlersChanged=i.current[t]._handlersChanged;i.current[t]._handlersChanged=null;r.push(i.current[t])}i.current[t].removeHandler(o.current[t])}n=__assign({},p);for(var a in f){delete n[a];i.current[a].addHandler(f[a])}}else if(!o.current){n=__assign({},p);for(var a in f)delete n[a]}o.current=f;if(i.current){wijmo_1.copy(i.current,n,!1,!0);for(var s in v)_setHostAttribute(i.current.hostElement,s,v[s]);for(var s in h)e.customProps[s](i.current,h[s]);!function(){for(var e=0,n=r;e<n.length;e++){var t=n[e];if(t._cachedHandlersChanged){t._handlersChanged=t._cachedHandlersChanged;t._cachedHandlersChanged=null}}r=[]}()}},updateChildProps=function(){a.current=updateChildProperties({controlRef:i,childInfo:a.current},e.props.children)};React.useLayoutEffect((function(){if(t.current&&!i.current){i.current=new e.constructor(t.current,p);e.prePropsInit&&e.prePropsInit(i.current);if(m)if(wijmo_1.isFunction(m)){var r=m({control:i.current,props:e.props});wijmo_1.isFunction(r)&&(c.current=r)}else m.current&&m.current.control==i.current||(m.current={control:i.current,props:e.props});for(var n in v)_setHostAttribute(i.current.hostElement,n,v[n]);e.props.children&&updateProps();e.initControl&&e.initControl(i.current);e.props.initialized&&setTimeout((function(){i.current&&e.props.initialized(i.current)}))}else s.current&&(s.current=!1);return function(){if(i.current){var e=i.current;s.current=!0;queueMicrotask((function(){if(s.current){e.dispose();i.current=null;a.current={};s.current=!1;c.current&&c.current()}}))}}}),[]);i.current&&queueMicrotask((function(){return updateProps()}));var y=React.createElement("div",__assign({},d,{ref:t}),[]),_setHostAttribute=function(e,r,n){if(e)switch(r){case"className":var t=u.current;if(t!==n){wijmo_1.removeClass(e,t);wijmo_1.addClass(e,n);u.current=n}}};return{renderResult:y,wjControl:i.current}}exports.useWjComponentBase=useWjComponentBase;function filterKnownProps(e,r,n){var t={};for(var o in e)(r.has(o)||n.has(o))&&(t[o]=e[o]);return t}function clearAndGetEvents(e,r,n,t){var o=t.current,i={};for(var a in r)n.has(a)&&(i[a]=r[a]);for(var s in o)e[s]&&(!_oldSyncBehavior||r[s]?e[s].removeHandler(o[s]):i[s]=o[s]);return i}function getCustomPropsData(e,r){var n={};for(var t in r)void 0!==e[t]&&(n[t]=e[t]);return n}function useWjComponentChildBase(e){var r={};r.knowProperties=new Set(e.properties);r.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:function(n){var t={current:{}},o={current:{}},i={current:{}},a=getPropsAccordingToSyncMode(e.props,t.current),s=filterKnownProps(a,r.knowProperties,r.knowEvents),c=getCustomPropsData(a,e.customProps||{}),u=e.customConstructor?e.customConstructor(n,s,c):new e.constructor(e.needParentInstance?n:s,e.needParentInstance?s:void 0);e.ref&&(wijmo_1.isFunction(e.ref)?e.ref({control:u,props:e.props}):e.ref.current&&e.ref.current.control==u||(e.ref.current={control:u,props:e.props}));i.current=clearAndGetEvents(u,a,r.knowEvents,i);var updateProps=function(n){var a=getPropsAccordingToSyncMode(n,t.current);t.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);i.current=clearAndGetEvents(u,a,r.knowEvents,i);var s,c=filterKnownProps(a,r.knowProperties,r.knowEvents);u.initialize?u.initialize(c):wijmo_1.copy(u,c,!1,!0);for(var l in e.customProps)void 0!==a[l]&&e.customProps[l](u,a[l]);s=n.children||[],o.current=updateChildProperties({controlRef:{current:u},childInfo:o.current},s)};updateProps(e.props||[]);e.props.initialized&&wijmo_1.isFunction(e.props.initialized)&&e.props.initialized(u);return{instance:u,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}exports.useWjComponentChildBase=useWjComponentChildBase;var flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{var e=console.error,r=!1;console.error=function(){var e=arguments[0]||"";e.includes("flushSync")&&(r=!0)};flushSync((function(){}));console.error=e;flushSyncStateCache.isReactRendering=r}catch(e){}finally{queueMicrotask((function(){flushSyncStateCache.isReactRendering=null}))}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,r,n){void 0===n&&(n=!1);isReactRendering()&&(n=!0);var t,o=elemRootMap.findIndex((function(e){return e.host===r}));if(-1===o){t=reactDomClient.createRoot(r);elemRootMap.push({host:r,root:t})}else t=elemRootMap[o].root;t.__scheduledForUnmount=!1;n?queueMicrotask((function(){flushSync((function(){t.render(e)}))})):flushSync((function(){t.render(e)}))}function selectiveDomRender(e,r,n){var t=this;void 0===n&&(n=!1);if(_reactMajorVersion<18){(0,getReactDOM().render)(e,r)}else if(reactDomClientReady)_doRender(e,r,n);else{__awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:t.sent();_doRender(e,r,n);return[2]}}))}))}return r}exports.selectiveDomRender=selectiveDomRender;function unmountSafely(e){var r=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&r==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){var r=elemRootMap.findIndex((function(r){return r.host===e}));if(-1!==r){var n=elemRootMap[r].root;if(isReactRendering()){n.__scheduledForUnmount=!0;queueMicrotask((function(){n.__scheduledForUnmount&&flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}))}else flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}}function selectiveDomUnmount(e){var r=this;if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{__awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:r.sent();_doUnmount(e);return[2]}}))}))}}exports.selectiveDomUnmount=selectiveDomUnmount;function isKeyOrderSame(e,r,n){if(e.length!=r.length)return!1;for(var t=0;t<e.length;t++)if(e[t][n]!=r[t][n])return!1;return!0}function baseFlushSync(){flushSync((function(){}))}exports.baseFlushSync=baseFlushSync;
14
+ "use strict";var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)},__awaiter=this&&this.__awaiter||function(e,r,n,t){return new(n||(n=Promise))((function(o,i){function fulfilled(e){try{step(t.next(e))}catch(e){i(e)}}function rejected(e){try{step(t.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):new n((function(r){r(e.value)})).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var n,t,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(s){return function step(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;(t=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;t=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e];t=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(r[n]=e[n]);r.default=e;return r};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),ReactDOM=__importStar(require("react-dom")),React=__importStar(require("react")),flushSyncPolyfill=function(e){e()},createRootPolyfill=function(){throw"Wijmo: React dependencies not loaded properly"},ReactDomPolyfill={flushSync:flushSyncPolyfill,createRoot:createRootPolyfill},reactDomClient=ReactDOM||ReactDomPolyfill,flushSync=reactDomClient.flushSync,reactDomClientLoadPromise=null,reactDomClientReady=!1;function setReactDomClient(e){reactDomClient=e||ReactDOM||ReactDomPolyfill;flushSync=e&&e.flushSync||flushSync}function lazyImportDomClient(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,Promise.resolve().then((function(){return __importStar(require(/* webpackIgnore: true */"react-dom/client"))}))];case 1:e=r.sent();setReactDomClient(e.default||e);return[3,3];case 2:r.sent();try{setReactDomClient(require("react-dom/client"))}catch(e){reactDomClient=ReactDOM||ReactDomPolyfill}return[3,3];case 3:reactDomClientReady=!0;return[2]}}))}))}function ensureReactDomClientLoaded(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return reactDomClientLoadPromise?[4,reactDomClientLoadPromise]:[3,2];case 1:e.sent();e.label=2;case 2:return[2]}}))}))}var _reactMajorVersion,elemRootMap=[];if(!_reactMajorVersion){var version=parseInt(React.version);_reactMajorVersion=version;version>=18?reactDomClientLoadPromise=lazyImportDomClient():reactDomClientReady=!0}function wjForwardRef(e){return _reactMajorVersion>=19?function(r){return e(r,r.ref)}:React.forwardRef(e)}exports.wjForwardRef=wjForwardRef;var _oldSyncBehavior=!0;function strictStateMode(e){void 0===e&&(e=!1);e==_oldSyncBehavior&&(_oldSyncBehavior=!wijmo_1.asBoolean(e,!1))}exports.strictStateMode=strictStateMode;exports.ControlBaseMeta={inputs:["isDisabled","tabOrder"],events:["gotFocus","invalidInput","lostFocus","refreshed","refreshing"]};var alwaysClearProps=new Set(["columns","columnGroups"]),unsuppressedChangedEventProps=new Set(["panes","columnGroups","columns","items"]),specialProps=new Set(["initialized","wjItemTemplate"]),buildInProps=new Set(["className"]);function updateChildProperties(e,r){var n=e.controlRef.current,t={},o={};if(r){for(var i=wijmo_1.isArray(r)?r.flat(1/0):[r],a=[],s=0,c=new Set,u=0,l=i;u<l.length;u++){if((R=l[u])&&R.type&&R.type.$$typeof==Symbol.for("react.forward_ref")){_reactMajorVersion>=19?a.push(R.type.render(R.props,R.props.ref)):a.push(R.type.render(R.props,R.ref));a[a.length-1].$index=s;a[a.length-1].$key=R.key}else if(R&&wijmo_1.isFunction(R.type)){a.push(R.type(R.props));a[a.length-1].$index=s;a[a.length-1].$key=R.key}R||c.add(s);s++}for(var p=[],f=0,d=a;f<d.length;f++){if((R=d[f]).assignedToParent){if(R.wjProperty){R.parentProp=wijmo_1.asString(R.wjProperty);R.isParentPropArray=n[R.parentProp]&&wijmo_1.isArray(n[R.parentProp])}R.isParentPropArray&&!t[R.parentProp]&&(t[R.parentProp]=[]);R.isParentPropArray?t[R.parentProp].push({getInstance:R.getInstance,props:R.props,$key:R.$key,$index:R.$index}):t[R.parentProp]={getInstance:R.getInstance,props:R.props}}else p.push(R)}var h=e.childInfo,_loop_1=function(e){if(wijmo_1.isArray(t[e])){var r=!1;if(n[e]&&null!=n[e]._updating&&!unsuppressedChangedEventProps.has(e)){n[e]._updating++;r=!0}var i=h[e];o[e]=[];var a=!1;if(!h[e]){i=[];if(n[e]&&n[e].clear){n[e].clear();a=!0}else n[e]||(n[e]=new wijmo_1.ObservableArray)}if(!_oldSyncBehavior&&alwaysClearProps.has(e)){if(n[e]&&n[e].clear){n[e].clear();a=!0}}else if(!isKeyOrderSame(i,t[e],"$key")&&n[e]&&n[e].clear){n[e].clear();a=!0}if(_oldSyncBehavior)for(var s=i.length-1;s>=0;s--)if(c.has(i[s].$index)){n[e].remove(i[s].instance);i.splice(s,1)}for(var u=[],l={},p=0,f=i;p<f.length;p++){var d=f[p];null!=d.$key?l[""+d.$key]=d:u.push(d)}for(var v=0,getExistingInstance=function(e){void 0===e&&(e=null);if(null!=e){var r=l[e];null!=r&&delete l[e];return r}return u[v++]},m=0;m<t[e].length;m++){var _=!1;if(w=getExistingInstance(t[e][m].$key))w.updateProps(t[e][m].props);else{w=t[e][m].getInstance(n);_=!0}w.$index=t[e][m].$index;w.$key=t[e][m].$key;(a||_)&&(n[e].length==m?n[e].push(w.instance):n[e].splice(m,0,w.instance));o[e].push(w)}for(var y=0,R=Object.keys(l);y<R.length;y++){var g=R[y];n[e].remove(l[g].instance)}for(;!_oldSyncBehavior&&n[e].length>o[e].length;)n[e].pop();if(r){n[e]._updating--;!a&&h[e]&&h[e].length==t[e].length||n[e]._raiseCollectionChanged&&n[e]._raiseCollectionChanged()}}else{var w;if(w=h[e])w.updateProps(t[e].props);else{w=t[e].getInstance(n);n[e]=w.instance}o[e]=w}};for(var v in t)_loop_1(v);for(var m=[],_=0,y=h.$_nonassignable||[];_<y.length;_++){var R=y[_];c.has(R.$index)?R.instance&&R.instance.dispose&&wijmo_1.isFunction(R.instance.dispose)&&R.instance.dispose():m.push(R)}for(var g=[],w=0;w<p.length;w++){var P=m[w];P?P.updateProps(p[w].props):P=p[w].getInstance(n);P.$index=p[w].$index;g.push(P)}o.$_nonassignable=g;for(;w<m.length;w++)m[w].instance&&m[w].instance.dispose&&wijmo_1.isFunction(m[w].instance.dispose)&&m[w].instance.dispose()}if(_oldSyncBehavior)for(var S=0,C=Object.keys(e.childInfo);S<C.length;S++){var j=C[S];if(wijmo_1.isArray(e.childInfo[j])&&!t[j]&&n[j]&&n[j].remove)for(var D=0,b=e.childInfo[j];D<b.length;D++){var k=b[D];n[j].remove(k.instance)}}return o}function getPropsAccordingToSyncMode(e,r,n){void 0===n&&(n=null);if(!r||!_oldSyncBehavior){return __assign({},e)}var t={};for(var o in e){var i=!1;n&&(i=n.knowProperties.has(o)||n.knowEvents.has(o)||n.knowCustomProps.has(o));(n&&!i||e[o]!==r[o])&&(t[o]=e[o])}return t}function useWjComponentBase(e){var r=React.useRef({}),n=React.useRef(),t=React.useRef(),o=React.useRef(),i=React.useRef(),a=React.useRef({}),s=React.useRef(!1),c=React.useRef(null),u=React.useRef(null);e.customProps||(e.customProps={});if(!n.current){n.current={};n.current.knowProperties=new Set(e.properties);n.current.knowEvents=new Set(e.events);n.current.knowCustomProps=new Set(Object.keys(e.customProps))}var l=e.props;if(i.current){l=getPropsAccordingToSyncMode(e.props,r.current,n.current);r.current=e.props}var p={},f={},d={},h={},v={},m=e.ref||null;for(var _ in l)if(n.current.knowProperties.has(_))p[_]=l[_];else if(n.current.knowEvents.has(_)){f[_]=l[_];p[_]=l[_]}else e.customProps[_]?h[_]=l[_]:buildInProps.has(_)?v[_]=l[_]:specialProps.has(_)||(d[_]=l[_]);if(i.current&&_oldSyncBehavior)for(var _ in f)delete p[_];var updateProps=function(){m&&m.current&&(m.current.props=e.props);updateChildProps();var r=[],n=p;if(o.current&&i.current&&!_oldSyncBehavior){for(var t in o.current)if(i.current[t]){if(i.current[t]._handlersChanged){i.current[t]._cachedHandlersChanged=i.current[t]._handlersChanged;i.current[t]._handlersChanged=null;r.push(i.current[t])}i.current[t].removeHandler(o.current[t])}n=__assign({},p);for(var a in f){delete n[a];i.current[a].addHandler(f[a])}}else if(!o.current){n=__assign({},p);for(var a in f)delete n[a]}o.current=f;if(i.current){wijmo_1.copy(i.current,n,!1,!0);for(var s in v)_setHostAttribute(i.current.hostElement,s,v[s]);for(var s in h)e.customProps[s](i.current,h[s]);!function(){for(var e=0,n=r;e<n.length;e++){var t=n[e];if(t._cachedHandlersChanged){t._handlersChanged=t._cachedHandlersChanged;t._cachedHandlersChanged=null}}r=[]}()}},updateChildProps=function(){a.current=updateChildProperties({controlRef:i,childInfo:a.current},e.props.children)};React.useLayoutEffect((function(){if(t.current&&!i.current){i.current=new e.constructor(t.current,p);e.prePropsInit&&e.prePropsInit(i.current);if(m)if(wijmo_1.isFunction(m)){var r=m({control:i.current,props:e.props});wijmo_1.isFunction(r)&&(c.current=r)}else m.current&&m.current.control==i.current||(m.current={control:i.current,props:e.props});for(var n in v)_setHostAttribute(i.current.hostElement,n,v[n]);e.props.children&&updateProps();e.initControl&&e.initControl(i.current);e.props.initialized&&setTimeout((function(){i.current&&e.props.initialized(i.current)}))}else s.current&&(s.current=!1);return function(){if(i.current){var e=i.current;s.current=!0;queueMicrotask((function(){if(s.current){e.dispose();i.current=null;a.current={};s.current=!1;c.current&&c.current()}}))}}}),[]);i.current&&queueMicrotask((function(){return updateProps()}));var y=React.createElement("div",__assign({},d,{ref:t}),[]),_setHostAttribute=function(e,r,n){if(e)switch(r){case"className":var t=u.current;if(t!==n){wijmo_1.removeClass(e,t);wijmo_1.addClass(e,n);u.current=n}}};return{renderResult:y,wjControl:i.current}}exports.useWjComponentBase=useWjComponentBase;function filterKnownProps(e,r,n){var t={};for(var o in e)(r.has(o)||n.has(o))&&(t[o]=e[o]);return t}function clearAndGetEvents(e,r,n,t){var o=t.current,i={};for(var a in r)n.has(a)&&(i[a]=r[a]);for(var s in o)e[s]&&(!_oldSyncBehavior||r[s]?e[s].removeHandler(o[s]):i[s]=o[s]);return i}function getCustomPropsData(e,r){var n={};for(var t in r)void 0!==e[t]&&(n[t]=e[t]);return n}function useWjComponentChildBase(e){var r={};r.knowProperties=new Set(e.properties);r.knowEvents=new Set(e.events);e.customProps||(e.customProps={});return{getInstance:function(n){var t={current:{}},o={current:{}},i={current:{}},a=getPropsAccordingToSyncMode(e.props,t.current),s=filterKnownProps(a,r.knowProperties,r.knowEvents),c=getCustomPropsData(a,e.customProps||{}),u=e.customConstructor?e.customConstructor(n,s,c):new e.constructor(e.needParentInstance?n:s,e.needParentInstance?s:void 0);e.ref&&(wijmo_1.isFunction(e.ref)?e.ref({control:u,props:e.props}):e.ref.current&&e.ref.current.control==u||(e.ref.current={control:u,props:e.props}));i.current=clearAndGetEvents(u,a,r.knowEvents,i);var updateProps=function(n){var a=getPropsAccordingToSyncMode(n,t.current);t.current=n;e.ref&&e.ref.current&&(e.ref.current.props=n);i.current=clearAndGetEvents(u,a,r.knowEvents,i);var s,c=filterKnownProps(a,r.knowProperties,r.knowEvents);u.initialize?u.initialize(c):wijmo_1.copy(u,c,!1,!0);for(var l in e.customProps)void 0!==a[l]&&e.customProps[l](u,a[l]);s=n.children||[],o.current=updateChildProperties({controlRef:{current:u},childInfo:o.current},s)};updateProps(e.props||[]);e.props.initialized&&wijmo_1.isFunction(e.props.initialized)&&e.props.initialized(u);return{instance:u,updateProps:updateProps}},props:e.props,parentProp:e.parentProp,wjProperty:e.props.wjProperty,isParentPropArray:e.isParentPropArray,assignedToParent:e.assignedToParent}}exports.useWjComponentChildBase=useWjComponentChildBase;var flushSyncStateCache={isReactRendering:null};function isReactRendering(){if(null==flushSyncStateCache.isReactRendering)try{var e=console.error,r=!1;console.error=function(){var e=arguments[0]||"";e.includes("flushSync")&&(r=!0)};flushSync((function(){}));console.error=e;flushSyncStateCache.isReactRendering=r}catch(e){}finally{queueMicrotask((function(){flushSyncStateCache.isReactRendering=null}))}return!!flushSyncStateCache.isReactRendering}function getReactDOM(){return ReactDOM}function _doRender(e,r,n){void 0===n&&(n=!1);isReactRendering()&&(n=!0);var t,o=elemRootMap.findIndex((function(e){return e.host===r}));if(-1===o){t=reactDomClient.createRoot(r);elemRootMap.push({host:r,root:t})}else t=elemRootMap[o].root;t.__scheduledForUnmount=!1;n?queueMicrotask((function(){flushSync((function(){t.render(e)}))})):flushSync((function(){t.render(e)}))}function selectiveDomRender(e,r,n){var t=this;void 0===n&&(n=!1);if(_reactMajorVersion<18){(0,getReactDOM().render)(e,r)}else if(reactDomClientReady)_doRender(e,r,n);else{__awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:t.sent();_doRender(e,r,n);return[2]}}))}))}return r}exports.selectiveDomRender=selectiveDomRender;function unmountSafely(e){var r=e._internalRoot&&e._internalRoot.containerInfo.firstChild,n=e._internalRoot&&e._internalRoot.current&&e._internalRoot.current.child&&e._internalRoot.current.child.stateNode;n&&r==n?e.unmount():e._internalRoot=null;e.__scheduledForUnmount=null}function _doUnmount(e){var r=elemRootMap.findIndex((function(r){return r.host===e}));if(-1!==r){var n=elemRootMap[r].root;if(isReactRendering()){n.__scheduledForUnmount=!0;queueMicrotask((function(){n.__scheduledForUnmount&&flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}))}else flushSync((function(){unmountSafely(n);elemRootMap.splice(r,1)}))}}function selectiveDomUnmount(e){var r=this;if(_reactMajorVersion<18){(0,getReactDOM().unmountComponentAtNode)(e)}else if(reactDomClientReady)_doUnmount(e);else{__awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,ensureReactDomClientLoaded()];case 1:r.sent();_doUnmount(e);return[2]}}))}))}}exports.selectiveDomUnmount=selectiveDomUnmount;function isKeyOrderSame(e,r,n){if(e.length!=r.length)return!1;for(var t=0;t<e.length;t++)if(e[t][n]!=r[t][n])return!1;return!0}function baseFlushSync(){flushSync((function(){}))}exports.baseFlushSync=baseFlushSync;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@grapecity/wijmo.react.base",
3
- "version": "5.20252.44",
3
+ "version": "5.20261.48",
4
4
  "description": "UI library for pure JS, Angular, React, Vue and more...",
5
5
  "author": "MESCIUS inc",
6
6
  "license": "Commercial",
7
7
  "main": "./index.js",
8
8
  "types": "./index.d.ts",
9
9
  "dependencies": {
10
- "@grapecity/wijmo": "5.20252.44"
10
+ "@grapecity/wijmo": "5.20261.48"
11
11
  },
12
12
  "homepage": "https://developer.mescius.com/wijmo",
13
13
  "bugs": {