photon-grid-react 2.0.1 → 2.0.4
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 +10 -7
- package/index.cjs +1 -1
- package/index.d.ts +2 -0
- package/index.js +101 -101
- package/package.json +2 -2
- package/photon-grid.d.ts +29 -0
- package/react-renderer-adapter.d.ts +9 -2
package/README.md
CHANGED
|
@@ -157,12 +157,12 @@ Supports all modern browsers: Chrome, Edge, Firefox, and Safari.
|
|
|
157
157
|
|
|
158
158
|
## Ecosystem
|
|
159
159
|
|
|
160
|
-
| Package | Description |
|
|
161
|
-
| ------- | ----------- |
|
|
162
|
-
| [`photon-grid-core`](https://www.npmjs.com/package/photon-grid-core) | Framework-agnostic engine |
|
|
163
|
-
| [`photon-grid-react`](https://www.npmjs.com/package/photon-grid-react) | React wrapper (this package) |
|
|
164
|
-
| [`photon-grid-angular`](https://www.npmjs.com/package/photon-grid-angular) | Angular wrapper |
|
|
165
|
-
| [`photon-grid-vue`](https://www.npmjs.com/package/photon-grid-vue) | Vue 3 wrapper |
|
|
160
|
+
| Package | Description | NPM |
|
|
161
|
+
| ------- | ----------- | --- |
|
|
162
|
+
| [`photon-grid-core`](https://www.npmjs.com/package/photon-grid-core) | Framework-agnostic engine | https://www.npmjs.com/package/photon-grid-core |
|
|
163
|
+
| [`photon-grid-react`](https://www.npmjs.com/package/photon-grid-react) | React wrapper (this package) | https://www.npmjs.com/package/photon-grid-react |
|
|
164
|
+
| [`photon-grid-angular`](https://www.npmjs.com/package/photon-grid-angular) | Angular wrapper | https://www.npmjs.com/package/photon-grid-angular |
|
|
165
|
+
| [`photon-grid-vue`](https://www.npmjs.com/package/photon-grid-vue) | Vue 3 wrapper | https://www.npmjs.com/package/photon-grid-vue |
|
|
166
166
|
|
|
167
167
|
---
|
|
168
168
|
|
|
@@ -188,7 +188,10 @@ MIT License
|
|
|
188
188
|
|
|
189
189
|
- **GitHub** — https://github.com/abdulwahid-csit/photon-grid
|
|
190
190
|
- **Issues** — https://github.com/abdulwahid-csit/photon-grid/issues
|
|
191
|
-
- **NPM** — https://www.npmjs.com/package/photon-grid-react
|
|
191
|
+
- **NPM React** — https://www.npmjs.com/package/photon-grid-react
|
|
192
|
+
- **NPM Angular** — https://www.npmjs.com/package/photon-grid-angular
|
|
193
|
+
- **NPM Vue** — https://www.npmjs.com/package/photon-grid-vue
|
|
194
|
+
- **NPM Core** — https://www.npmjs.com/package/photon-grid-core
|
|
192
195
|
|
|
193
196
|
---
|
|
194
197
|
|
package/index.cjs
CHANGED
|
@@ -223,4 +223,4 @@ Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map==`func
|
|
|
223
223
|
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:``),`font-weight:bold`)}e.createRoot=function(e,t){if(!v(e))throw Error(`Target container is not a DOM element.`);Tf(e);var n=!1,r=``,i=rs,a=is,o=as;return t!=null&&(t.hydrate?console.warn(`hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.`):typeof t==`object`&&t&&t.$$typeof===Af&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
224
224
|
|
|
225
225
|
let root = createRoot(domContainer);
|
|
226
|
-
root.render(<App />);`),!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Zd(e,1,!1,null,null,n,r,null,i,a,o,Sf),e[qp]=t.current,lu(e),new Cf(t)},e.hydrateRoot=function(e,t,n){if(!v(e))throw Error(`Target container is not a DOM element.`);Tf(e),t===void 0&&console.error(`Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)`);var r=!1,i=``,a=rs,o=is,s=as,c=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=Zd(e,1,!0,t,n??null,r,i,c,a,o,s,Sf),t.context=Qd(null),n=t.current,r=nl(n),r=We(r),i=na(r),i.callback=null,ra(n,i,r),fi(r,`hydrateRoot()`,null),n=r,t.current.lanes=n,ze(t,n),P(t),e[qp]=t.current,lu(e),new wf(t)},e.version=`19.2.7`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),u=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`)){if(process.env.NODE_ENV!==`production`)throw Error(`^_^`);try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}}process.env.NODE_ENV===`production`?(n(),t.exports=c()):t.exports=l()}))();function d(e){return e?typeof e==`object`&&`kind`in e&&e.kind===`component`||typeof e==`object`&&e&&`$$typeof`in e?!0:typeof e==`function`&&/^[A-Z]/.test(e.name??``):!1}var f=class{root;container;entries=new Map;observer;pendingFlush=!1;observe(e){this.observer||(this.container=document.createElement(`div`),this.container.className=`photon-grid-react__portal`,this.container.style.position=`absolute`,this.container.style.inset=`0`,this.container.style.pointerEvents=`none`,this.container.style.overflow=`hidden`,e.appendChild(this.container),this.root=(0,u.createRoot)(this.container),this.flush(),this.observer=new MutationObserver(e=>{for(let t of e)for(let e of Array.from(t.removedNodes))this.unmountNode(e)}),this.observer.observe(e,{childList:!0,subtree:!0}))}adaptColumns(e){return e.map(e=>{if(!e.renderer)return e;let t={};for(let n of[`display`,`editor`,`option`,`filter`,`tooltip`,`group`,`header`,`summary`]){let r=e.renderer?.[n];d(r)?t[n]=e=>this.mountComponent(r,e):typeof r==`function`&&(t[n]=r)}return{...e,renderer:t}})}dispose(){this.observer?.disconnect(),this.observer=void 0;let e=this.root;this.root=void 0,queueMicrotask(()=>{e?.unmount()}),this.root=void 0,this.entries.clear(),this.container?.remove(),this.container=void 0,this.pendingFlush=!1}mountComponent(e,t){let n=this.getRendererKey(t);if(n){let r=this.entries.get(n);if(r){let n=this.getRendererProps(e,t);return r.component===this.getComponent(e)&&this.propsMatch(r.props,n)?r.host:(r.component=this.getComponent(e),r.props=n,this.flush(),r.host)}}let r=document.createElement(`div`);return r.className=`photon-grid-react__renderer-host`,r.style.width=`100%`,r.style.height=`100%`,r.style.pointerEvents=`auto`,r.style.display=`block`,n&&(this.entries.set(n,{key:n,host:r,component:this.getComponent(e),props:this.getRendererProps(e,t)}),this.flush()),r}flush(){!this.root||!this.container||this.pendingFlush||(this.pendingFlush=!0,requestAnimationFrame(()=>{this.pendingFlush=!1,this.root&&this.root.render((0,t.createElement)(this.renderFrame,{entries:Array.from(this.entries.values())}))}))}renderFrame(e){return(0,t.createElement)(`div`,{className:`photon-grid-react__frame`,style:{display:`contents`}},e.entries.map(e=>(0,t.createElement)(`div`,{key:e.key,style:{display:`contents`}},(0,r.createPortal)((0,t.createElement)(e.component,e.props??{}),e.host))))}getComponent(e){return typeof e==`object`&&e&&`kind`in e?e.component:e}getRendererProps(e,t){return typeof e==`object`&&e&&`kind`in e&&typeof e.props==`function`?{...this.getBaseProps(t),...e.props(t)}:this.getBaseProps(t)}getBaseProps(e){if(!e||typeof e!=`object`)return{};let t=e;return{...t,row:t.row??t.data,rowIndex:t.rowIndex,value:t.value,colDef:t.colDef,api:t.api,colIndex:t.colIndex}}propsMatch(e,t){if(!e)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}getRendererKey(e){if(!e||typeof e!=`object`)return null;let t=e;return`${t.colDef?.colId??t.colDef?.field??`cell`}:${typeof t.rowIndex==`number`?t.rowIndex:`unknown`}:${typeof t.colIndex==`number`?t.colIndex:`unknown`}`}unmountNode(e){e instanceof HTMLElement&&(this.unmountHost(e),e.querySelectorAll(`*`).forEach(e=>{this.unmountHost(e)}))}unmountHost(e){for(let[t,n]of this.entries.entries())if(n.host===e){requestAnimationFrame(()=>{this.flush()});break}}};function p(e){let r=(0,t.useRef)(null),a=(0,t.useRef)(null),o=(0,t.useRef)(null),s=(0,t.useRef)([]),{columns:c=[],dataSet:l=[],options:u={}}=e;return(0,t.useEffect)(()=>{if(!r.current)return;let t=r.current,i=new f;i.observe(t),o.current=i;let d=new n.GridCore(t,{...u,columns:i.adaptColumns(c),data:l});a.current=d;let p=[],m=(e,t)=>{if(!t)return;let n=d.api.on(e,e=>t(e));p.push(n)};return m(n.GridEventType.DATA_CHANGED,e.onDataChanged),m(n.GridEventType.ROW_CLICKED,e.onRowClicked),m(n.GridEventType.ROW_DOUBLE_CLICKED,e.onRowDoubleClicked),m(n.GridEventType.ROW_SELECTED,e.onRowSelected),m(n.GridEventType.CELL_CLICKED,e.onCellClicked),m(n.GridEventType.CELL_DOUBLE_CLICKED,e.onCellDoubleClicked),m(n.GridEventType.CELL_VALUE_CHANGED,e.onCellValueChanged),m(n.GridEventType.CELL_SELECTION_CHANGED,e.onCellSelectionChanged),m(n.GridEventType.COLUMN_RESIZED,e.onColumnResized),m(n.GridEventType.COLUMN_MOVED,e.onColumnMoved),m(n.GridEventType.SORT_CHANGED,e.onSortChanged),m(n.GridEventType.FILTER_CHANGED,e.onFilterChanged),m(n.GridEventType.PAGE_CHANGED,e.onPageChanged),m(n.GridEventType.COLUMNS_STATE_CHANGED,e.onColumnsStateChanged),m(n.GridEventType.THEME_CHANGED,e.onThemeChanged),m(n.GridEventType.EXPORT_COMPLETE,e.onExportComplete),s.current=p,e.onGridReady?.(d.api),()=>{for(let e of s.current)e();s.current=[],a.current?.destroy(),a.current=null,o.current?.dispose(),o.current=null}},[c,l,u]),(0,t.useEffect)(()=>()=>{for(let e of s.current)e();s.current=[],a.current?.destroy(),a.current=null,o.current?.dispose(),o.current=null},[]),(0,i.jsx)(`div`,{ref:r,className:`photon-grid__host`})}exports.PhotonGrid=p,exports.ReactRendererAdapter=f;
|
|
226
|
+
root.render(<App />);`),!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Zd(e,1,!1,null,null,n,r,null,i,a,o,Sf),e[qp]=t.current,lu(e),new Cf(t)},e.hydrateRoot=function(e,t,n){if(!v(e))throw Error(`Target container is not a DOM element.`);Tf(e),t===void 0&&console.error(`Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)`);var r=!1,i=``,a=rs,o=is,s=as,c=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=Zd(e,1,!0,t,n??null,r,i,c,a,o,s,Sf),t.context=Qd(null),n=t.current,r=nl(n),r=We(r),i=na(r),i.callback=null,ra(n,i,r),fi(r,`hydrateRoot()`,null),n=r,t.current.lanes=n,ze(t,n),P(t),e[qp]=t.current,lu(e),new wf(t)},e.version=`19.2.7`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),u=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`)){if(process.env.NODE_ENV!==`production`)throw Error(`^_^`);try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}}process.env.NODE_ENV===`production`?(n(),t.exports=c()):t.exports=l()}))();function d(e){return e?typeof e==`object`&&`kind`in e&&e.kind===`component`||typeof e==`object`&&e&&`$$typeof`in e?!0:typeof e==`function`&&/^[A-Z]/.test(e.name??``):!1}var f=class{root;container;entries=new Map;observer;pendingFlush=!1;observe(e){this.observer||(this.container=document.createElement(`div`),this.container.className=`photon-grid-react__portal`,this.container.style.position=`absolute`,this.container.style.inset=`0`,this.container.style.pointerEvents=`none`,this.container.style.overflow=`hidden`,e.appendChild(this.container),this.root=(0,u.createRoot)(this.container),this.flush(),this.observer=new MutationObserver(e=>{for(let t of e)for(let e of Array.from(t.removedNodes))this.unmountNode(e)}),this.observer.observe(e,{childList:!0,subtree:!0}))}adaptColumns(e){return e.map(e=>{if(!e.renderer)return e;let t={};for(let n of[`display`,`editor`,`option`,`filter`,`tooltip`,`group`,`header`,`summary`]){let r=e.renderer?.[n];d(r)?t[n]=e=>this.mountComponent(r,e):typeof r==`function`&&(t[n]=r)}return{...e,renderer:t}})}dispose(){this.observer?.disconnect(),this.observer=void 0;let e=this.root;this.root=void 0,queueMicrotask(()=>{e?.unmount()}),this.root=void 0,this.entries.clear(),this.container?.remove(),this.container=void 0,this.pendingFlush=!1}mountComponent(e,t){let n=this.getRendererKey(t);if(n){let r=this.entries.get(n);if(r){let n=this.getRendererProps(e,t);return r.component===this.getComponent(e)&&this.propsMatch(r.props,n)?r.host:(r.component=this.getComponent(e),r.props=n,this.flush(),r.host)}}let r=document.createElement(`div`);return r.className=`photon-grid-react__renderer-host`,r.style.width=`100%`,r.style.height=`100%`,r.style.pointerEvents=`auto`,r.style.display=`block`,n&&(this.entries.set(n,{key:n,host:r,component:this.getComponent(e),props:this.getRendererProps(e,t)}),this.flush()),r}flush(){!this.root||!this.container||this.pendingFlush||(this.pendingFlush=!0,requestAnimationFrame(()=>{this.pendingFlush=!1,this.root&&this.root.render((0,t.createElement)(this.renderFrame,{entries:Array.from(this.entries.values())}))}))}renderFrame(e){return(0,t.createElement)(`div`,{className:`photon-grid-react__frame`,style:{display:`contents`}},e.entries.map(e=>(0,t.createElement)(`div`,{key:e.key,style:{display:`contents`}},(0,r.createPortal)((0,t.createElement)(e.component,e.props??{}),e.host))))}getComponent(e){return typeof e==`object`&&e&&`kind`in e?e.component:e}getRendererProps(e,t){return typeof e==`object`&&e&&`kind`in e&&typeof e.props==`function`?{...this.getBaseProps(t),...e.props(t)}:this.getBaseProps(t)}getBaseProps(e){if(!e||typeof e!=`object`)return{};let t=e;return{...t,row:t.row??t.data,rowIndex:t.rowIndex,value:t.value,colDef:t.colDef,api:t.api,colIndex:t.colIndex}}propsMatch(e,t){if(!e)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}getRendererKey(e){if(!e||typeof e!=`object`)return null;let t=e;return`${t.colDef?.colId??t.colDef?.field??`cell`}:${typeof t.rowIndex==`number`?t.rowIndex:`unknown`}:${typeof t.colIndex==`number`?t.colIndex:`unknown`}`}unmountNode(e){e instanceof HTMLElement&&(this.unmountHost(e),e.querySelectorAll(`*`).forEach(e=>{this.unmountHost(e)}))}unmountHost(e){for(let[t,n]of this.entries.entries())if(n.host===e){requestAnimationFrame(()=>{this.flush()});break}}};function p(e){let r=(0,t.useRef)(null),a=(0,t.useRef)(null),o=(0,t.useRef)(null),s=(0,t.useRef)([]),{columns:c=[],dataSet:l=[],options:u={}}=e;return(0,t.useEffect)(()=>{if(!r.current)return;let t=r.current,i=new f;i.observe(t),o.current=i;let d=new n.GridCore(t,{...u,columns:i.adaptColumns(c),data:l});a.current=d;let p=[],m=(e,t)=>{if(!t)return;let n=d.api.on(e,e=>t(e));p.push(n)};return m(n.GridEventType.DATA_CHANGED,e.onDataChanged),m(n.GridEventType.ROW_CLICKED,e.onRowClicked),m(n.GridEventType.ROW_DOUBLE_CLICKED,e.onRowDoubleClicked),m(n.GridEventType.ROW_SELECTED,e.onRowSelected),m(n.GridEventType.CELL_CLICKED,e.onCellClicked),m(n.GridEventType.CELL_DOUBLE_CLICKED,e.onCellDoubleClicked),m(n.GridEventType.CELL_VALUE_CHANGED,e.onCellValueChanged),m(n.GridEventType.CELL_SELECTION_CHANGED,e.onCellSelectionChanged),m(n.GridEventType.COLUMN_RESIZED,e.onColumnResized),m(n.GridEventType.COLUMN_MOVED,e.onColumnMoved),m(n.GridEventType.SORT_CHANGED,e.onSortChanged),m(n.GridEventType.FILTER_CHANGED,e.onFilterChanged),m(n.GridEventType.PAGE_CHANGED,e.onPageChanged),m(n.GridEventType.COLUMNS_STATE_CHANGED,e.onColumnsStateChanged),m(n.GridEventType.THEME_CHANGED,e.onThemeChanged),m(n.GridEventType.EXPORT_COMPLETE,e.onExportComplete),s.current=p,e.onGridReady?.(d.api),()=>{for(let e of s.current)e();s.current=[],a.current?.destroy(),a.current=null,o.current?.dispose(),o.current=null}},[c,l,u]),(0,t.useEffect)(()=>()=>{for(let e of s.current)e();s.current=[],a.current?.destroy(),a.current=null,o.current?.dispose(),o.current=null},[]),(0,i.jsx)(`div`,{ref:r,className:`photon-grid__host`})}Object.defineProperty(exports,"PhotonAIProviderType",{enumerable:!0,get:function(){return n.PhotonAIProviderType}}),exports.PhotonGrid=p,exports.ReactRendererAdapter=f;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createElement as e, useEffect as t, useRef as n } from "react";
|
|
2
|
-
import { GridCore as r, GridEventType as i } from "photon-grid-core";
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { jsx as
|
|
2
|
+
import { GridCore as r, GridEventType as i, PhotonAIProviderType as a } from "photon-grid-core";
|
|
3
|
+
import { createPortal as o } from "react-dom";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
|
-
var
|
|
6
|
+
var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), l = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
7
7
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
8
8
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
9
|
-
}),
|
|
9
|
+
}), u = /* @__PURE__ */ c(((e) => {
|
|
10
10
|
function t(e, t) {
|
|
11
11
|
var n = e.length;
|
|
12
12
|
e.push(t);
|
|
@@ -203,7 +203,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
};
|
|
206
|
-
})),
|
|
206
|
+
})), d = /* @__PURE__ */ c(((e) => {
|
|
207
207
|
process.env.NODE_ENV !== "production" && (function() {
|
|
208
208
|
function t() {
|
|
209
209
|
if (x = !1, re) {
|
|
@@ -400,10 +400,10 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
400
400
|
};
|
|
401
401
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
402
402
|
})();
|
|
403
|
-
})),
|
|
404
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
405
|
-
})),
|
|
406
|
-
var t =
|
|
403
|
+
})), f = /* @__PURE__ */ c(((e, t) => {
|
|
404
|
+
process.env.NODE_ENV === "production" ? t.exports = u() : t.exports = d();
|
|
405
|
+
})), p = /* @__PURE__ */ c(((e) => {
|
|
406
|
+
var t = f(), n = l("react"), r = l("react-dom");
|
|
407
407
|
function i(e) {
|
|
408
408
|
var t = "https://react.dev/errors/" + e;
|
|
409
409
|
if (1 < arguments.length) {
|
|
@@ -433,7 +433,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
433
433
|
}
|
|
434
434
|
return null;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function c(e) {
|
|
437
437
|
if (e.tag === 31) {
|
|
438
438
|
var t = e.memoizedState;
|
|
439
439
|
if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null) return t.dehydrated;
|
|
@@ -443,7 +443,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
443
443
|
function u(e) {
|
|
444
444
|
if (o(e) !== e) throw Error(i(188));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function d(e) {
|
|
447
447
|
var t = e.alternate;
|
|
448
448
|
if (!t) {
|
|
449
449
|
if (t = o(e), t === null) throw Error(i(188));
|
|
@@ -7457,7 +7457,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
7457
7457
|
if (e = s(t), e !== null) return e;
|
|
7458
7458
|
e = null;
|
|
7459
7459
|
} else if (n === 31) {
|
|
7460
|
-
if (e =
|
|
7460
|
+
if (e = c(t), e !== null) return e;
|
|
7461
7461
|
e = null;
|
|
7462
7462
|
} else if (n === 3) {
|
|
7463
7463
|
if (t.stateNode.current.memoizedState.isDehydrated) return t.tag === 3 ? t.stateNode.containerInfo : null;
|
|
@@ -7608,7 +7608,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
7608
7608
|
return;
|
|
7609
7609
|
}
|
|
7610
7610
|
} else if (t === 31) {
|
|
7611
|
-
if (t =
|
|
7611
|
+
if (t = c(n), t !== null) {
|
|
7612
7612
|
e.blockedOn = t, ht(e.priority, function() {
|
|
7613
7613
|
vp(n);
|
|
7614
7614
|
});
|
|
@@ -7755,7 +7755,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
7755
7755
|
T.findDOMNode = function(e) {
|
|
7756
7756
|
var t = e._reactInternals;
|
|
7757
7757
|
if (t === void 0) throw typeof e.render == "function" ? Error(i(188)) : (e = Object.keys(e).join(","), Error(i(268, e)));
|
|
7758
|
-
return e =
|
|
7758
|
+
return e = d(t), e = e === null ? null : p(e), e = e === null ? null : e.stateNode, e;
|
|
7759
7759
|
};
|
|
7760
7760
|
var Xp = {
|
|
7761
7761
|
bundleType: 0,
|
|
@@ -7779,7 +7779,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
7779
7779
|
var r = !1, o = "", s = rc, c = ic, l = ac, u = null;
|
|
7780
7780
|
return n != null && (!0 === n.unstable_strictMode && (r = !0), n.identifierPrefix !== void 0 && (o = n.identifierPrefix), n.onUncaughtError !== void 0 && (s = n.onUncaughtError), n.onCaughtError !== void 0 && (c = n.onCaughtError), n.onRecoverableError !== void 0 && (l = n.onRecoverableError), n.formState !== void 0 && (u = n.formState)), t = fp(e, 1, !0, t, n ?? null, r, o, u, s, c, l, Kp), t.context = pp(null), n = t.current, r = Tu(), r = ft(r), o = Xa(r), o.callback = null, Za(n, o, r), n = r, t.current.lanes = n, st(t, n), gd(t), e[yt] = t.current, Fd(e), new Jp(t);
|
|
7781
7781
|
}, e.version = "19.2.7";
|
|
7782
|
-
})),
|
|
7782
|
+
})), m = /* @__PURE__ */ c(((e) => {
|
|
7783
7783
|
process.env.NODE_ENV !== "production" && (function() {
|
|
7784
7784
|
function t(e, t) {
|
|
7785
7785
|
for (e = e.memoizedState; e !== null && 0 < t;) e = e.next, t--;
|
|
@@ -7814,13 +7814,13 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
7814
7814
|
function s() {
|
|
7815
7815
|
return null;
|
|
7816
7816
|
}
|
|
7817
|
-
function
|
|
7817
|
+
function c() {
|
|
7818
7818
|
console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks");
|
|
7819
7819
|
}
|
|
7820
7820
|
function u() {
|
|
7821
7821
|
console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
|
|
7822
7822
|
}
|
|
7823
|
-
function
|
|
7823
|
+
function d() {}
|
|
7824
7824
|
function p() {}
|
|
7825
7825
|
function m(e) {
|
|
7826
7826
|
var t = [];
|
|
@@ -11671,7 +11671,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
11671
11671
|
function Io(e, t, n, r) {
|
|
11672
11672
|
if (e.tag !== 5) throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");
|
|
11673
11673
|
var i = Lo(e).queue;
|
|
11674
|
-
mi(e), Fo(e, i, t, vC, n === null ?
|
|
11674
|
+
mi(e), Fo(e, i, t, vC, n === null ? d : function() {
|
|
11675
11675
|
return Ro(e), n(r);
|
|
11676
11676
|
});
|
|
11677
11677
|
}
|
|
@@ -16786,7 +16786,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
16786
16786
|
e[Jp] && (e._reactRootContainer ? console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.") : console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."));
|
|
16787
16787
|
}
|
|
16788
16788
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
16789
|
-
var Df =
|
|
16789
|
+
var Df = f(), Of = l("react"), kf = l("react-dom"), z = Object.assign, Af = Symbol.for("react.element"), jf = Symbol.for("react.transitional.element"), Mf = Symbol.for("react.portal"), Nf = Symbol.for("react.fragment"), Pf = Symbol.for("react.strict_mode"), Ff = Symbol.for("react.profiler"), If = Symbol.for("react.consumer"), Lf = Symbol.for("react.context"), Rf = Symbol.for("react.forward_ref"), zf = Symbol.for("react.suspense"), Bf = Symbol.for("react.suspense_list"), Vf = Symbol.for("react.memo"), Hf = Symbol.for("react.lazy"), Uf = Symbol.for("react.activity"), Wf = Symbol.for("react.memo_cache_sentinel"), Gf = Symbol.iterator, Kf = Symbol.for("react.client.reference"), qf = Array.isArray, B = Of.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Jf = kf.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Yf = Object.freeze({
|
|
16790
16790
|
pending: !1,
|
|
16791
16791
|
data: null,
|
|
16792
16792
|
method: null,
|
|
@@ -18383,28 +18383,28 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18383
18383
|
return u(), si(e);
|
|
18384
18384
|
},
|
|
18385
18385
|
use: function(e) {
|
|
18386
|
-
return
|
|
18386
|
+
return c(), Fa(e);
|
|
18387
18387
|
},
|
|
18388
18388
|
useCallback: function(e, t) {
|
|
18389
|
-
return X = "useCallback",
|
|
18389
|
+
return X = "useCallback", c(), k(), To(e, t);
|
|
18390
18390
|
},
|
|
18391
18391
|
useContext: function(e) {
|
|
18392
|
-
return X = "useContext",
|
|
18392
|
+
return X = "useContext", c(), k(), si(e);
|
|
18393
18393
|
},
|
|
18394
18394
|
useEffect: function(e, t) {
|
|
18395
|
-
return X = "useEffect",
|
|
18395
|
+
return X = "useEffect", c(), k(), vo(e, t);
|
|
18396
18396
|
},
|
|
18397
18397
|
useImperativeHandle: function(e, t, n) {
|
|
18398
|
-
return X = "useImperativeHandle",
|
|
18398
|
+
return X = "useImperativeHandle", c(), k(), Co(e, t, n);
|
|
18399
18399
|
},
|
|
18400
18400
|
useInsertionEffect: function(e, t) {
|
|
18401
|
-
X = "useInsertionEffect",
|
|
18401
|
+
X = "useInsertionEffect", c(), k(), go(4, hy, e, t);
|
|
18402
18402
|
},
|
|
18403
18403
|
useLayoutEffect: function(e, t) {
|
|
18404
|
-
return X = "useLayoutEffect",
|
|
18404
|
+
return X = "useLayoutEffect", c(), k(), xo(e, t);
|
|
18405
18405
|
},
|
|
18406
18406
|
useMemo: function(e, t) {
|
|
18407
|
-
X = "useMemo",
|
|
18407
|
+
X = "useMemo", c(), k();
|
|
18408
18408
|
var n = B.H;
|
|
18409
18409
|
B.H = Hy;
|
|
18410
18410
|
try {
|
|
@@ -18414,7 +18414,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18414
18414
|
}
|
|
18415
18415
|
},
|
|
18416
18416
|
useReducer: function(e, t, n) {
|
|
18417
|
-
X = "useReducer",
|
|
18417
|
+
X = "useReducer", c(), k();
|
|
18418
18418
|
var r = B.H;
|
|
18419
18419
|
B.H = Hy;
|
|
18420
18420
|
try {
|
|
@@ -18424,10 +18424,10 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18424
18424
|
}
|
|
18425
18425
|
},
|
|
18426
18426
|
useRef: function(e) {
|
|
18427
|
-
return X = "useRef",
|
|
18427
|
+
return X = "useRef", c(), k(), ho(e);
|
|
18428
18428
|
},
|
|
18429
18429
|
useState: function(e) {
|
|
18430
|
-
X = "useState",
|
|
18430
|
+
X = "useState", c(), k();
|
|
18431
18431
|
var t = B.H;
|
|
18432
18432
|
B.H = Hy;
|
|
18433
18433
|
try {
|
|
@@ -18437,66 +18437,66 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18437
18437
|
}
|
|
18438
18438
|
},
|
|
18439
18439
|
useDebugValue: function() {
|
|
18440
|
-
X = "useDebugValue",
|
|
18440
|
+
X = "useDebugValue", c(), k();
|
|
18441
18441
|
},
|
|
18442
18442
|
useDeferredValue: function(e, t) {
|
|
18443
|
-
return X = "useDeferredValue",
|
|
18443
|
+
return X = "useDeferredValue", c(), k(), ko(e, t);
|
|
18444
18444
|
},
|
|
18445
18445
|
useTransition: function() {
|
|
18446
|
-
return X = "useTransition",
|
|
18446
|
+
return X = "useTransition", c(), k(), zo();
|
|
18447
18447
|
},
|
|
18448
18448
|
useSyncExternalStore: function(e, t, n) {
|
|
18449
|
-
return X = "useSyncExternalStore",
|
|
18449
|
+
return X = "useSyncExternalStore", c(), k(), Ha(e, t, n);
|
|
18450
18450
|
},
|
|
18451
18451
|
useId: function() {
|
|
18452
|
-
return X = "useId",
|
|
18452
|
+
return X = "useId", c(), k(), Uo();
|
|
18453
18453
|
},
|
|
18454
18454
|
useFormState: function(e, t) {
|
|
18455
|
-
return X = "useFormState",
|
|
18455
|
+
return X = "useFormState", c(), k(), co(e, t);
|
|
18456
18456
|
},
|
|
18457
18457
|
useActionState: function(e, t) {
|
|
18458
|
-
return X = "useActionState",
|
|
18458
|
+
return X = "useActionState", c(), k(), co(e, t);
|
|
18459
18459
|
},
|
|
18460
18460
|
useOptimistic: function(e) {
|
|
18461
|
-
return X = "useOptimistic",
|
|
18461
|
+
return X = "useOptimistic", c(), k(), Za(e);
|
|
18462
18462
|
},
|
|
18463
18463
|
useMemoCache: function(e) {
|
|
18464
|
-
return
|
|
18464
|
+
return c(), Ia(e);
|
|
18465
18465
|
},
|
|
18466
18466
|
useHostTransitionStatus: Ho,
|
|
18467
18467
|
useCacheRefresh: function() {
|
|
18468
18468
|
return X = "useCacheRefresh", k(), Wo();
|
|
18469
18469
|
},
|
|
18470
18470
|
useEffectEvent: function(e) {
|
|
18471
|
-
return X = "useEffectEvent",
|
|
18471
|
+
return X = "useEffectEvent", c(), k(), bo(e);
|
|
18472
18472
|
}
|
|
18473
18473
|
}, Uy = {
|
|
18474
18474
|
readContext: function(e) {
|
|
18475
18475
|
return u(), si(e);
|
|
18476
18476
|
},
|
|
18477
18477
|
use: function(e) {
|
|
18478
|
-
return
|
|
18478
|
+
return c(), Fa(e);
|
|
18479
18479
|
},
|
|
18480
18480
|
useCallback: function(e, t) {
|
|
18481
|
-
return X = "useCallback",
|
|
18481
|
+
return X = "useCallback", c(), A(), Eo(e, t);
|
|
18482
18482
|
},
|
|
18483
18483
|
useContext: function(e) {
|
|
18484
|
-
return X = "useContext",
|
|
18484
|
+
return X = "useContext", c(), A(), si(e);
|
|
18485
18485
|
},
|
|
18486
18486
|
useEffect: function(e, t) {
|
|
18487
|
-
X = "useEffect",
|
|
18487
|
+
X = "useEffect", c(), A(), _o(2048, _y, e, t);
|
|
18488
18488
|
},
|
|
18489
18489
|
useImperativeHandle: function(e, t, n) {
|
|
18490
|
-
return X = "useImperativeHandle",
|
|
18490
|
+
return X = "useImperativeHandle", c(), A(), wo(e, t, n);
|
|
18491
18491
|
},
|
|
18492
18492
|
useInsertionEffect: function(e, t) {
|
|
18493
|
-
return X = "useInsertionEffect",
|
|
18493
|
+
return X = "useInsertionEffect", c(), A(), _o(4, hy, e, t);
|
|
18494
18494
|
},
|
|
18495
18495
|
useLayoutEffect: function(e, t) {
|
|
18496
|
-
return X = "useLayoutEffect",
|
|
18496
|
+
return X = "useLayoutEffect", c(), A(), _o(4, gy, e, t);
|
|
18497
18497
|
},
|
|
18498
18498
|
useMemo: function(e, t) {
|
|
18499
|
-
X = "useMemo",
|
|
18499
|
+
X = "useMemo", c(), A();
|
|
18500
18500
|
var n = B.H;
|
|
18501
18501
|
B.H = Uy;
|
|
18502
18502
|
try {
|
|
@@ -18506,7 +18506,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18506
18506
|
}
|
|
18507
18507
|
},
|
|
18508
18508
|
useReducer: function(e, t, n) {
|
|
18509
|
-
X = "useReducer",
|
|
18509
|
+
X = "useReducer", c(), A();
|
|
18510
18510
|
var r = B.H;
|
|
18511
18511
|
B.H = Uy;
|
|
18512
18512
|
try {
|
|
@@ -18516,10 +18516,10 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18516
18516
|
}
|
|
18517
18517
|
},
|
|
18518
18518
|
useRef: function() {
|
|
18519
|
-
return X = "useRef",
|
|
18519
|
+
return X = "useRef", c(), A(), j().memoizedState;
|
|
18520
18520
|
},
|
|
18521
18521
|
useState: function() {
|
|
18522
|
-
X = "useState",
|
|
18522
|
+
X = "useState", c(), A();
|
|
18523
18523
|
var e = B.H;
|
|
18524
18524
|
B.H = Uy;
|
|
18525
18525
|
try {
|
|
@@ -18529,66 +18529,66 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18529
18529
|
}
|
|
18530
18530
|
},
|
|
18531
18531
|
useDebugValue: function() {
|
|
18532
|
-
X = "useDebugValue",
|
|
18532
|
+
X = "useDebugValue", c(), A();
|
|
18533
18533
|
},
|
|
18534
18534
|
useDeferredValue: function(e, t) {
|
|
18535
|
-
return X = "useDeferredValue",
|
|
18535
|
+
return X = "useDeferredValue", c(), A(), Ao(e, t);
|
|
18536
18536
|
},
|
|
18537
18537
|
useTransition: function() {
|
|
18538
|
-
return X = "useTransition",
|
|
18538
|
+
return X = "useTransition", c(), A(), Bo();
|
|
18539
18539
|
},
|
|
18540
18540
|
useSyncExternalStore: function(e, t, n) {
|
|
18541
|
-
return X = "useSyncExternalStore",
|
|
18541
|
+
return X = "useSyncExternalStore", c(), A(), Ua(e, t, n);
|
|
18542
18542
|
},
|
|
18543
18543
|
useId: function() {
|
|
18544
|
-
return X = "useId",
|
|
18544
|
+
return X = "useId", c(), A(), j().memoizedState;
|
|
18545
18545
|
},
|
|
18546
18546
|
useFormState: function(e) {
|
|
18547
|
-
return X = "useFormState",
|
|
18547
|
+
return X = "useFormState", c(), A(), lo(e);
|
|
18548
18548
|
},
|
|
18549
18549
|
useActionState: function(e) {
|
|
18550
|
-
return X = "useActionState",
|
|
18550
|
+
return X = "useActionState", c(), A(), lo(e);
|
|
18551
18551
|
},
|
|
18552
18552
|
useOptimistic: function(e, t) {
|
|
18553
|
-
return X = "useOptimistic",
|
|
18553
|
+
return X = "useOptimistic", c(), A(), Qa(e, t);
|
|
18554
18554
|
},
|
|
18555
18555
|
useMemoCache: function(e) {
|
|
18556
|
-
return
|
|
18556
|
+
return c(), Ia(e);
|
|
18557
18557
|
},
|
|
18558
18558
|
useHostTransitionStatus: Ho,
|
|
18559
18559
|
useCacheRefresh: function() {
|
|
18560
18560
|
return X = "useCacheRefresh", A(), j().memoizedState;
|
|
18561
18561
|
},
|
|
18562
18562
|
useEffectEvent: function(e) {
|
|
18563
|
-
return X = "useEffectEvent",
|
|
18563
|
+
return X = "useEffectEvent", c(), A(), M(e);
|
|
18564
18564
|
}
|
|
18565
18565
|
}, Wy = {
|
|
18566
18566
|
readContext: function(e) {
|
|
18567
18567
|
return u(), si(e);
|
|
18568
18568
|
},
|
|
18569
18569
|
use: function(e) {
|
|
18570
|
-
return
|
|
18570
|
+
return c(), Fa(e);
|
|
18571
18571
|
},
|
|
18572
18572
|
useCallback: function(e, t) {
|
|
18573
|
-
return X = "useCallback",
|
|
18573
|
+
return X = "useCallback", c(), A(), Eo(e, t);
|
|
18574
18574
|
},
|
|
18575
18575
|
useContext: function(e) {
|
|
18576
|
-
return X = "useContext",
|
|
18576
|
+
return X = "useContext", c(), A(), si(e);
|
|
18577
18577
|
},
|
|
18578
18578
|
useEffect: function(e, t) {
|
|
18579
|
-
X = "useEffect",
|
|
18579
|
+
X = "useEffect", c(), A(), _o(2048, _y, e, t);
|
|
18580
18580
|
},
|
|
18581
18581
|
useImperativeHandle: function(e, t, n) {
|
|
18582
|
-
return X = "useImperativeHandle",
|
|
18582
|
+
return X = "useImperativeHandle", c(), A(), wo(e, t, n);
|
|
18583
18583
|
},
|
|
18584
18584
|
useInsertionEffect: function(e, t) {
|
|
18585
|
-
return X = "useInsertionEffect",
|
|
18585
|
+
return X = "useInsertionEffect", c(), A(), _o(4, hy, e, t);
|
|
18586
18586
|
},
|
|
18587
18587
|
useLayoutEffect: function(e, t) {
|
|
18588
|
-
return X = "useLayoutEffect",
|
|
18588
|
+
return X = "useLayoutEffect", c(), A(), _o(4, gy, e, t);
|
|
18589
18589
|
},
|
|
18590
18590
|
useMemo: function(e, t) {
|
|
18591
|
-
X = "useMemo",
|
|
18591
|
+
X = "useMemo", c(), A();
|
|
18592
18592
|
var n = B.H;
|
|
18593
18593
|
B.H = Uy;
|
|
18594
18594
|
try {
|
|
@@ -18598,7 +18598,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18598
18598
|
}
|
|
18599
18599
|
},
|
|
18600
18600
|
useReducer: function(e, t, n) {
|
|
18601
|
-
X = "useReducer",
|
|
18601
|
+
X = "useReducer", c(), A();
|
|
18602
18602
|
var r = B.H;
|
|
18603
18603
|
B.H = Uy;
|
|
18604
18604
|
try {
|
|
@@ -18608,10 +18608,10 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18608
18608
|
}
|
|
18609
18609
|
},
|
|
18610
18610
|
useRef: function() {
|
|
18611
|
-
return X = "useRef",
|
|
18611
|
+
return X = "useRef", c(), A(), j().memoizedState;
|
|
18612
18612
|
},
|
|
18613
18613
|
useState: function() {
|
|
18614
|
-
X = "useState",
|
|
18614
|
+
X = "useState", c(), A();
|
|
18615
18615
|
var e = B.H;
|
|
18616
18616
|
B.H = Uy;
|
|
18617
18617
|
try {
|
|
@@ -18621,38 +18621,38 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18621
18621
|
}
|
|
18622
18622
|
},
|
|
18623
18623
|
useDebugValue: function() {
|
|
18624
|
-
X = "useDebugValue",
|
|
18624
|
+
X = "useDebugValue", c(), A();
|
|
18625
18625
|
},
|
|
18626
18626
|
useDeferredValue: function(e, t) {
|
|
18627
|
-
return X = "useDeferredValue",
|
|
18627
|
+
return X = "useDeferredValue", c(), A(), jo(e, t);
|
|
18628
18628
|
},
|
|
18629
18629
|
useTransition: function() {
|
|
18630
|
-
return X = "useTransition",
|
|
18630
|
+
return X = "useTransition", c(), A(), Vo();
|
|
18631
18631
|
},
|
|
18632
18632
|
useSyncExternalStore: function(e, t, n) {
|
|
18633
|
-
return X = "useSyncExternalStore",
|
|
18633
|
+
return X = "useSyncExternalStore", c(), A(), Ua(e, t, n);
|
|
18634
18634
|
},
|
|
18635
18635
|
useId: function() {
|
|
18636
|
-
return X = "useId",
|
|
18636
|
+
return X = "useId", c(), A(), j().memoizedState;
|
|
18637
18637
|
},
|
|
18638
18638
|
useFormState: function(e) {
|
|
18639
|
-
return X = "useFormState",
|
|
18639
|
+
return X = "useFormState", c(), A(), po(e);
|
|
18640
18640
|
},
|
|
18641
18641
|
useActionState: function(e) {
|
|
18642
|
-
return X = "useActionState",
|
|
18642
|
+
return X = "useActionState", c(), A(), po(e);
|
|
18643
18643
|
},
|
|
18644
18644
|
useOptimistic: function(e, t) {
|
|
18645
|
-
return X = "useOptimistic",
|
|
18645
|
+
return X = "useOptimistic", c(), A(), eo(e, t);
|
|
18646
18646
|
},
|
|
18647
18647
|
useMemoCache: function(e) {
|
|
18648
|
-
return
|
|
18648
|
+
return c(), Ia(e);
|
|
18649
18649
|
},
|
|
18650
18650
|
useHostTransitionStatus: Ho,
|
|
18651
18651
|
useCacheRefresh: function() {
|
|
18652
18652
|
return X = "useCacheRefresh", A(), j().memoizedState;
|
|
18653
18653
|
},
|
|
18654
18654
|
useEffectEvent: function(e) {
|
|
18655
|
-
return X = "useEffectEvent",
|
|
18655
|
+
return X = "useEffectEvent", c(), A(), M(e);
|
|
18656
18656
|
}
|
|
18657
18657
|
};
|
|
18658
18658
|
var Gy = {}, Ky = /* @__PURE__ */ new Set(), qy = /* @__PURE__ */ new Set(), Jy = /* @__PURE__ */ new Set(), Yy = /* @__PURE__ */ new Set(), Xy = /* @__PURE__ */ new Set(), Zy = /* @__PURE__ */ new Set(), Qy = /* @__PURE__ */ new Set(), $y = /* @__PURE__ */ new Set(), eb = /* @__PURE__ */ new Set(), tb = /* @__PURE__ */ new Set();
|
|
@@ -18939,7 +18939,7 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18939
18939
|
return n != null && (!0 === n.unstable_strictMode && (r = !0), n.identifierPrefix !== void 0 && (i = n.identifierPrefix), n.onUncaughtError !== void 0 && (a = n.onUncaughtError), n.onCaughtError !== void 0 && (o = n.onCaughtError), n.onRecoverableError !== void 0 && (s = n.onRecoverableError), n.formState !== void 0 && (c = n.formState)), t = Qd(e, 1, !0, t, n ?? null, r, i, c, a, o, s, Cf), t.context = $d(null), n = t.current, r = rl(n), r = Ge(r), i = ra(r), i.callback = null, ia(n, i, r), pi(r, "hydrateRoot()", null), n = r, t.current.lanes = n, Be(t, n), P(t), e[Jp] = t.current, uu(e), new Tf(t);
|
|
18940
18940
|
}, e.version = "19.2.7", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
18941
18941
|
})();
|
|
18942
|
-
})),
|
|
18942
|
+
})), h = (/* @__PURE__ */ c(((e, t) => {
|
|
18943
18943
|
function n() {
|
|
18944
18944
|
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
18945
18945
|
if (process.env.NODE_ENV !== "production") throw Error("^_^");
|
|
@@ -18950,19 +18950,19 @@ var s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
18950
18950
|
}
|
|
18951
18951
|
}
|
|
18952
18952
|
}
|
|
18953
|
-
process.env.NODE_ENV === "production" ? (n(), t.exports =
|
|
18953
|
+
process.env.NODE_ENV === "production" ? (n(), t.exports = p()) : t.exports = m();
|
|
18954
18954
|
})))();
|
|
18955
|
-
function
|
|
18955
|
+
function g(e) {
|
|
18956
18956
|
return e ? typeof e == "object" && "kind" in e && e.kind === "component" || typeof e == "object" && e && "$$typeof" in e ? !0 : typeof e == "function" && /^[A-Z]/.test(e.name ?? "") : !1;
|
|
18957
18957
|
}
|
|
18958
|
-
var
|
|
18958
|
+
var _ = class {
|
|
18959
18959
|
root;
|
|
18960
18960
|
container;
|
|
18961
18961
|
entries = /* @__PURE__ */ new Map();
|
|
18962
18962
|
observer;
|
|
18963
18963
|
pendingFlush = !1;
|
|
18964
18964
|
observe(e) {
|
|
18965
|
-
this.observer || (this.container = document.createElement("div"), this.container.className = "photon-grid-react__portal", this.container.style.position = "absolute", this.container.style.inset = "0", this.container.style.pointerEvents = "none", this.container.style.overflow = "hidden", e.appendChild(this.container), this.root = (0,
|
|
18965
|
+
this.observer || (this.container = document.createElement("div"), this.container.className = "photon-grid-react__portal", this.container.style.position = "absolute", this.container.style.inset = "0", this.container.style.pointerEvents = "none", this.container.style.overflow = "hidden", e.appendChild(this.container), this.root = (0, h.createRoot)(this.container), this.flush(), this.observer = new MutationObserver((e) => {
|
|
18966
18966
|
for (let t of e) for (let e of Array.from(t.removedNodes)) this.unmountNode(e);
|
|
18967
18967
|
}), this.observer.observe(e, {
|
|
18968
18968
|
childList: !0,
|
|
@@ -18984,7 +18984,7 @@ var g = class {
|
|
|
18984
18984
|
"summary"
|
|
18985
18985
|
]) {
|
|
18986
18986
|
let r = e.renderer?.[n];
|
|
18987
|
-
|
|
18987
|
+
g(r) ? t[n] = (e) => this.mountComponent(r, e) : typeof r == "function" && (t[n] = r);
|
|
18988
18988
|
}
|
|
18989
18989
|
return {
|
|
18990
18990
|
...e,
|
|
@@ -19028,7 +19028,7 @@ var g = class {
|
|
|
19028
19028
|
}, t.entries.map((t) => e("div", {
|
|
19029
19029
|
key: t.key,
|
|
19030
19030
|
style: { display: "contents" }
|
|
19031
|
-
},
|
|
19031
|
+
}, o(e(t.component, t.props ?? {}), t.host))));
|
|
19032
19032
|
}
|
|
19033
19033
|
getComponent(e) {
|
|
19034
19034
|
return typeof e == "object" && e && "kind" in e ? e.component : e;
|
|
@@ -19080,26 +19080,26 @@ var g = class {
|
|
|
19080
19080
|
};
|
|
19081
19081
|
//#endregion
|
|
19082
19082
|
//#region src/photon-grid.tsx
|
|
19083
|
-
function
|
|
19084
|
-
let a = n(null),
|
|
19083
|
+
function v(e) {
|
|
19084
|
+
let a = n(null), o = n(null), c = n(null), l = n([]), { columns: u = [], dataSet: d = [], options: f = {} } = e;
|
|
19085
19085
|
return t(() => {
|
|
19086
19086
|
if (!a.current) return;
|
|
19087
|
-
let t = a.current, n = new
|
|
19087
|
+
let t = a.current, n = new _();
|
|
19088
19088
|
n.observe(t), c.current = n;
|
|
19089
|
-
let
|
|
19089
|
+
let s = new r(t, {
|
|
19090
19090
|
...f,
|
|
19091
19091
|
columns: n.adaptColumns(u),
|
|
19092
19092
|
data: d
|
|
19093
19093
|
});
|
|
19094
|
-
|
|
19094
|
+
o.current = s;
|
|
19095
19095
|
let p = [], m = (e, t) => {
|
|
19096
19096
|
if (!t) return;
|
|
19097
|
-
let n =
|
|
19097
|
+
let n = s.api.on(e, (e) => t(e));
|
|
19098
19098
|
p.push(n);
|
|
19099
19099
|
};
|
|
19100
|
-
return m(i.DATA_CHANGED, e.onDataChanged), m(i.ROW_CLICKED, e.onRowClicked), m(i.ROW_DOUBLE_CLICKED, e.onRowDoubleClicked), m(i.ROW_SELECTED, e.onRowSelected), m(i.CELL_CLICKED, e.onCellClicked), m(i.CELL_DOUBLE_CLICKED, e.onCellDoubleClicked), m(i.CELL_VALUE_CHANGED, e.onCellValueChanged), m(i.CELL_SELECTION_CHANGED, e.onCellSelectionChanged), m(i.COLUMN_RESIZED, e.onColumnResized), m(i.COLUMN_MOVED, e.onColumnMoved), m(i.SORT_CHANGED, e.onSortChanged), m(i.FILTER_CHANGED, e.onFilterChanged), m(i.PAGE_CHANGED, e.onPageChanged), m(i.COLUMNS_STATE_CHANGED, e.onColumnsStateChanged), m(i.THEME_CHANGED, e.onThemeChanged), m(i.EXPORT_COMPLETE, e.onExportComplete), l.current = p, e.onGridReady?.(
|
|
19100
|
+
return m(i.DATA_CHANGED, e.onDataChanged), m(i.ROW_CLICKED, e.onRowClicked), m(i.ROW_DOUBLE_CLICKED, e.onRowDoubleClicked), m(i.ROW_SELECTED, e.onRowSelected), m(i.CELL_CLICKED, e.onCellClicked), m(i.CELL_DOUBLE_CLICKED, e.onCellDoubleClicked), m(i.CELL_VALUE_CHANGED, e.onCellValueChanged), m(i.CELL_SELECTION_CHANGED, e.onCellSelectionChanged), m(i.COLUMN_RESIZED, e.onColumnResized), m(i.COLUMN_MOVED, e.onColumnMoved), m(i.SORT_CHANGED, e.onSortChanged), m(i.FILTER_CHANGED, e.onFilterChanged), m(i.PAGE_CHANGED, e.onPageChanged), m(i.COLUMNS_STATE_CHANGED, e.onColumnsStateChanged), m(i.THEME_CHANGED, e.onThemeChanged), m(i.EXPORT_COMPLETE, e.onExportComplete), l.current = p, e.onGridReady?.(s.api), () => {
|
|
19101
19101
|
for (let e of l.current) e();
|
|
19102
|
-
l.current = [],
|
|
19102
|
+
l.current = [], o.current?.destroy(), o.current = null, c.current?.dispose(), c.current = null;
|
|
19103
19103
|
};
|
|
19104
19104
|
}, [
|
|
19105
19105
|
u,
|
|
@@ -19107,11 +19107,11 @@ function _(e) {
|
|
|
19107
19107
|
f
|
|
19108
19108
|
]), t(() => () => {
|
|
19109
19109
|
for (let e of l.current) e();
|
|
19110
|
-
l.current = [],
|
|
19111
|
-
}, []), /* @__PURE__ */
|
|
19110
|
+
l.current = [], o.current?.destroy(), o.current = null, c.current?.dispose(), c.current = null;
|
|
19111
|
+
}, []), /* @__PURE__ */ s("div", {
|
|
19112
19112
|
ref: a,
|
|
19113
19113
|
className: "photon-grid__host"
|
|
19114
19114
|
});
|
|
19115
19115
|
}
|
|
19116
19116
|
//#endregion
|
|
19117
|
-
export {
|
|
19117
|
+
export { a as PhotonAIProviderType, v as PhotonGrid, _ as ReactRendererAdapter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "photon-grid-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "A high-performance React data grid built on Photon Grid Core with virtualization, sorting, filtering, editing, grouping, and custom React renderers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"*"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"photon-grid-core": "^2.0.
|
|
50
|
+
"photon-grid-core": "^2.0.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=18",
|
package/photon-grid.d.ts
CHANGED
|
@@ -4,6 +4,35 @@ import { PhotonGridColumnDef } from './react-renderer-adapter';
|
|
|
4
4
|
export interface PhotonGridProps {
|
|
5
5
|
columns?: PhotonGridColumnDef[];
|
|
6
6
|
dataSet?: Record<string, unknown>[];
|
|
7
|
+
/**
|
|
8
|
+
* Additional grid options (theme, selection, features…), forwarded verbatim
|
|
9
|
+
* to the core. Enable the natural-language AI panel — and, optionally, its
|
|
10
|
+
* Gemini generative back-end — through `options.photonAI`:
|
|
11
|
+
*
|
|
12
|
+
* @example Deterministic (offline) AI panel
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <PhotonGrid options={{ photonAI: { enabled: true } }} />
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example Gemini-powered AI panel
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { PhotonAIProviderType } from 'photon-grid-react';
|
|
20
|
+
*
|
|
21
|
+
* <PhotonGrid
|
|
22
|
+
* options={{
|
|
23
|
+
* photonAI: {
|
|
24
|
+
* enabled: true,
|
|
25
|
+
* defaultOpen: true,
|
|
26
|
+
* provider: {
|
|
27
|
+
* type: PhotonAIProviderType.Gemini,
|
|
28
|
+
* apiKey: import.meta.env.VITE_GEMINI_API_KEY,
|
|
29
|
+
* model: 'gemini-2.5-flash',
|
|
30
|
+
* },
|
|
31
|
+
* },
|
|
32
|
+
* }}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
7
36
|
options?: Partial<GridOptions>;
|
|
8
37
|
onGridReady?: (api: GridApi) => void;
|
|
9
38
|
onDataChanged?: (event: DataChangedEvent) => void;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import { ColumnDef, RendererOutput } from 'photon-grid-core';
|
|
2
|
+
import { ColumnDef, ColumnDefInput, RendererOutput } from 'photon-grid-core';
|
|
3
3
|
export interface ReactRendererSpec {
|
|
4
4
|
kind: 'component';
|
|
5
5
|
component: ComponentType<Record<string, unknown>>;
|
|
6
6
|
props?: (params: unknown) => Record<string, unknown>;
|
|
7
7
|
}
|
|
8
8
|
type RendererSlotValue = ((params: unknown) => RendererOutput) | ReactRendererSpec | ComponentType<Record<string, unknown>> | undefined;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* React column definition. Built on the core's {@link ColumnDefInput}, so it
|
|
11
|
+
* inherits the same relaxed contract: **only `field` is required**; `colId`,
|
|
12
|
+
* `header` and `type` are optional and defaulted by the core (auto `colId`,
|
|
13
|
+
* header from the field in Title Case, `type` defaulting to `'string'`). The
|
|
14
|
+
* `renderer` slots additionally accept React components/specs.
|
|
15
|
+
*/
|
|
16
|
+
type PhotonGridColumnDef = Omit<ColumnDefInput, 'renderer'> & {
|
|
10
17
|
renderer?: {
|
|
11
18
|
display?: RendererSlotValue;
|
|
12
19
|
editor?: RendererSlotValue;
|