@tanstack/react-table 8.0.0-alpha.32 → 8.0.0-alpha.34
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/build/cjs/index.js +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +3 -0
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +20 -20
- package/build/umd/index.development.js +3 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +4 -0
package/build/cjs/index.js
CHANGED
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","React","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,IAAMA,MAAM,GAAG,SAATA,MAAS,CACpBC,IADoB,EAEpBC,KAFoB,EAAA;AAAA,EAAA,OAIpB,CAACD,IAAD,GAAQ,IAAR,GAAeE,gBAAgB,CAACF,IAAD,CAAhB,gBAAyBG,+BAAC,IAAD,EAAUF,KAAV,CAAzB,GAA+CD,IAJ1C,CAAA;AAAA,EAAf;;AAQP,SAASE,gBAAT,CAA0BE,SAA1B,EAAqE;AACnE,EAAA,OACEC,gBAAgB,CAACD,SAAD,CAAhB,IACA,OAAOA,SAAP,KAAqB,UADrB,IAEAE,iBAAiB,CAACF,SAAD,CAHnB,CAAA;AAKD,CAAA;;AAED,SAASC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AAf,CAAnB;AAAA,MAAOM,QAAP,sBAX0B;;;AAgB1B,EAA0BvB,IAAAA,gBAAAA,GAAAA,gBAAK,CAACqB,QAAN,CAAe,YAAA;AAAA,IAAME,OAAAA,QAAQ,CAACC,YAAf,CAAA;AAAA,GAAf,CAA1B;AAAA,MAAOL,KAAP,GAAA,gBAAA,CAAA,CAAA,CAAA;AAAA,MAAcM,QAAd,uBAhB0B;AAmB1B;;;AACAF,EAAAA,QAAQ,CAACG,UAAT,CAAoB,UAAAC,IAAI,EAAA;AAAA,IACnBA,OAAAA,oCAAAA,CAAAA,EAAAA,EAAAA,IADmB,EAEnBX,OAFmB,EAAA;AAGtBG,MAAAA,KAAK,EACAA,oCAAAA,CAAAA,EAAAA,EAAAA,KADA,EAEAH,OAAO,CAACG,KAFR,CAHiB;AAOtB;AACA;AACAC,MAAAA,aAAa,EAAE,SAAAQ,aAAAA,CAAAA,OAAO,EAAI;AACxBH,QAAAA,QAAQ,CAACG,OAAD,CAAR,CAAA;AACAZ,QAAAA,OAAO,CAACI,aAAR,IAAA,IAAA,GAAA,KAAA,CAAA,GAAAJ,OAAO,CAACI,aAAR,CAAwBQ,OAAxB,CAAA,CAAA;AACD,OAAA;AAZqB,KAAA,CAAA,CAAA;AAAA,GAAxB,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n React.useLayoutEffect(() => {\n instance.willUpdate()\n })\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","React","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater","useLayoutEffect","willUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,IA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6B,eAAN,CAAsB,YAAM;AAC1BN,IAAAA,QAAQ,CAACO,UAAT,EAAA,CAAA;AACD,GAFD,CAAA,CAAA;AAIA,EAAA,OAAOP,QAAP,CAAA;AACD;;;;;;;;;;;;;"}
|
package/build/esm/index.js
CHANGED
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","React","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,IAAMA,MAAM,GAAG,SAATA,MAAS,CACpBC,IADoB,EAEpBC,KAFoB,EAAA;AAAA,EAAA,OAIpB,CAACD,IAAD,GAAQ,IAAR,GAAeE,gBAAgB,CAACF,IAAD,CAAhB,gBAAyB,oBAAC,IAAD,EAAUC,KAAV,CAAzB,GAA+CD,IAJ1C,CAAA;AAAA,EAAf;;AAQP,SAASE,gBAAT,CAA0BC,SAA1B,EAAqE;AACnE,EAAA,OACEC,gBAAgB,CAACD,SAAD,CAAhB,IACA,OAAOA,SAAP,KAAqB,UADrB,IAEAE,iBAAiB,CAACF,SAAD,CAHnB,CAAA;AAKD,CAAA;;AAED,SAASC,gBAAT,CAA0BD,SAA1B,EAA0C;AACxC,EAAA,OACE,OAAOA,SAAP,KAAqB,UAArB,IACC,YAAM;AACL,IAAA,IAAMG,KAAK,GAAGC,MAAM,CAACC,cAAP,CAAsBL,SAAtB,CAAd,CAAA;AACA,IAAOG,OAAAA,KAAK,CAACG,SAAN,IAAmBH,KAAK,CAACG,SAAN,CAAgBP,gBAA1C,CAAA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AAmB1B;;;AACAF,EAAAA,QAAQ,CAACG,UAAT,CAAoB,UAAAC,IAAI,EAAA;AAAA,IACnBA,OAAAA,QAAAA,CAAAA,EAAAA,EAAAA,IADmB,EAEnBZ,OAFmB,EAAA;AAGtBG,MAAAA,KAAK,EACAA,QAAAA,CAAAA,EAAAA,EAAAA,KADA,EAEAH,OAAO,CAACG,KAFR,CAHiB;AAOtB;AACA;AACAC,MAAAA,aAAa,EAAE,SAAAS,aAAAA,CAAAA,OAAO,EAAI;AACxBH,QAAAA,QAAQ,CAACG,OAAD,CAAR,CAAA;AACAb,QAAAA,OAAO,CAACI,aAAR,IAAA,IAAA,GAAA,KAAA,CAAA,GAAAJ,OAAO,CAACI,aAAR,CAAwBS,OAAxB,CAAA,CAAA;AACD,OAAA;AAZqB,KAAA,CAAA,CAAA;AAAA,GAAxB,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n React.useLayoutEffect(() => {\n instance.willUpdate()\n })\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","React","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater","useLayoutEffect","willUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,IAAMA,MAAM,GAAG,SAATA,MAAS,CACpBC,IADoB,EAEpBC,KAFoB,EAAA;AAAA,EAAA,OAIpB,CAACD,IAAD,GAAQ,IAAR,GAAeE,gBAAgB,CAACF,IAAD,CAAhB,gBAAyB,oBAAC,IAAD,EAAUC,KAAV,CAAzB,GAA+CD,IAJ1C,CAAA;AAAA,EAAf;;AAQP,SAASE,gBAAT,CAA0BC,SAA1B,EAAqE;AACnE,E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AW1B,EAAmBK,IAAAA,eAAAA,GAAAA,KAAK,CAACC,QAAN,CAAe,YAAA;AAAA,IAChCC,OAAAA,mBAAmB,CAAYN,eAAZ,CADa,CAAA;AAAA,GAAf,CAAnB;AAAA,MAAOO,QAAP,sBAX0B;;;AAgB1B,EAA0BH,IAAAA,gBAAAA,GAAAA,KAAK,CAACC,QAAN,CAAe,YAAA;AAAA,IAAME,OAAAA,QAAQ,CAACC,YAAf,CAAA;AAAA,GAAf,CAA1B;AAAA,MAAON,KAAP,GAAA,gBAAA,CAAA,CAAA,CAAA;AAAA,MAAcO,QAAd,uBAhB0B;AAmB1B;;;AACAF,EAAAA,QAAQ,CAACG,UAAT,CAAoB,UAAAC,IAAI,EAAA;AAAA,IACnBA,OAAAA,QAAAA,CAAAA,EAAAA,EAAAA,IADmB,EAEnBZ,OAFmB,EAAA;AAGtBG,MAAAA,KAAK,EACAA,QAAAA,CAAAA,EAAAA,EAAAA,KADA,EAEAH,OAAO,CAACG,KAFR,CAHiB;AAOtB;AACA;AACAC,MAAAA,aAAa,EAAE,SAAAS,aAAAA,CAAAA,OAAO,EAAI;AACxBH,QAAAA,QAAQ,CAACG,OAAD,CAAR,CAAA;AACAb,QAAAA,OAAO,CAACI,aAAR,IAAA,IAAA,GAAA,KAAA,CAAA,GAAAJ,OAAO,CAACI,aAAR,CAAwBS,OAAxB,CAAA,CAAA;AACD,OAAA;AAZqB,KAAA,CAAA,CAAA;AAAA,GAAxB,CAAA,CAAA;AAeAR,EAAAA,KAAK,CAACS,eAAN,CAAsB,YAAM;AAC1BN,IAAAA,QAAQ,CAACO,UAAT,EAAA,CAAA;AACD,GAFD,CAAA,CAAA;AAIA,EAAA,OAAOP,QAAP,CAAA;AACD;;;;"}
|
package/build/stats-html.html
CHANGED
|
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
|
|
|
2669
2669
|
</script>
|
|
2670
2670
|
<script>
|
|
2671
2671
|
/*<!--*/
|
|
2672
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"
|
|
2672
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"88ad-115","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"packages/react-table/src/index.tsx","uid":"88ad-117"}]}],"isRoot":true},"nodeParts":{"88ad-115":{"renderedLength":410,"gzipLength":231,"brotliLength":0,"mainUid":"88ad-114"},"88ad-117":{"renderedLength":2474,"gzipLength":882,"brotliLength":0,"mainUid":"88ad-116"}},"nodeMetas":{"88ad-114":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"88ad-115"},"imported":[],"importedBy":[{"uid":"88ad-116"}]},"88ad-116":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"88ad-117"},"imported":[{"uid":"88ad-114"},{"uid":"88ad-118"},{"uid":"88ad-119"}],"importedBy":[],"isEntry":true},"88ad-118":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"88ad-116"}],"isExternal":true},"88ad-119":{"id":"@tanstack/table-core","moduleParts":{},"imported":[],"importedBy":[{"uid":"88ad-116"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
2673
2673
|
|
|
2674
2674
|
const run = () => {
|
|
2675
2675
|
const width = window.innerWidth;
|
package/build/stats-react.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"name": "index.production.js",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"uid": "
|
|
10
|
+
"uid": "88ad-121",
|
|
11
11
|
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "packages/react-table/src/index.tsx",
|
|
15
|
-
"uid": "
|
|
15
|
+
"uid": "88ad-123"
|
|
16
16
|
}
|
|
17
17
|
]
|
|
18
18
|
}
|
|
@@ -20,69 +20,69 @@
|
|
|
20
20
|
"isRoot": true
|
|
21
21
|
},
|
|
22
22
|
"nodeParts": {
|
|
23
|
-
"
|
|
23
|
+
"88ad-121": {
|
|
24
24
|
"renderedLength": 410,
|
|
25
25
|
"gzipLength": 231,
|
|
26
26
|
"brotliLength": 0,
|
|
27
|
-
"mainUid": "
|
|
27
|
+
"mainUid": "88ad-120"
|
|
28
28
|
},
|
|
29
|
-
"
|
|
30
|
-
"renderedLength":
|
|
31
|
-
"gzipLength":
|
|
29
|
+
"88ad-123": {
|
|
30
|
+
"renderedLength": 2474,
|
|
31
|
+
"gzipLength": 882,
|
|
32
32
|
"brotliLength": 0,
|
|
33
|
-
"mainUid": "
|
|
33
|
+
"mainUid": "88ad-122"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"nodeMetas": {
|
|
37
|
-
"
|
|
37
|
+
"88ad-120": {
|
|
38
38
|
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
39
39
|
"moduleParts": {
|
|
40
|
-
"index.production.js": "
|
|
40
|
+
"index.production.js": "88ad-121"
|
|
41
41
|
},
|
|
42
42
|
"imported": [],
|
|
43
43
|
"importedBy": [
|
|
44
44
|
{
|
|
45
|
-
"uid": "
|
|
45
|
+
"uid": "88ad-122"
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
"
|
|
49
|
+
"88ad-122": {
|
|
50
50
|
"id": "/packages/react-table/src/index.tsx",
|
|
51
51
|
"moduleParts": {
|
|
52
|
-
"index.production.js": "
|
|
52
|
+
"index.production.js": "88ad-123"
|
|
53
53
|
},
|
|
54
54
|
"imported": [
|
|
55
55
|
{
|
|
56
|
-
"uid": "
|
|
56
|
+
"uid": "88ad-120"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
"uid": "
|
|
59
|
+
"uid": "88ad-124"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"uid": "
|
|
62
|
+
"uid": "88ad-125"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"importedBy": [],
|
|
66
66
|
"isEntry": true
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"88ad-124": {
|
|
69
69
|
"id": "react",
|
|
70
70
|
"moduleParts": {},
|
|
71
71
|
"imported": [],
|
|
72
72
|
"importedBy": [
|
|
73
73
|
{
|
|
74
|
-
"uid": "
|
|
74
|
+
"uid": "88ad-122"
|
|
75
75
|
}
|
|
76
76
|
],
|
|
77
77
|
"isExternal": true
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"88ad-125": {
|
|
80
80
|
"id": "@tanstack/table-core",
|
|
81
81
|
"moduleParts": {},
|
|
82
82
|
"imported": [],
|
|
83
83
|
"importedBy": [
|
|
84
84
|
{
|
|
85
|
-
"uid": "
|
|
85
|
+
"uid": "88ad-122"
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
88
|
"isExternal": true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.development.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","React","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAMA,MAAM,GAAG,SAATA,MAAS,CACpBC,IADoB,EAEpBC,KAFoB,EAAA;EAAA,EAAA,OAIpB,CAACD,IAAD,GAAQ,IAAR,GAAeE,gBAAgB,CAACF,IAAD,CAAhB,gBAAyBG,+BAAC,IAAD,EAAUF,KAAV,CAAzB,GAA+CD,IAJ1C,CAAA;EAAA,EAAf;;EAQP,SAASE,gBAAT,CAA0BE,SAA1B,EAAqE;EACnE,EAAA,OACEC,g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BhB,IAAAA,eAAAA,GAAAA,gBAAK,CAACqB,QAAN,CAAe,YAAA;EAAA,IAChCC,OAAAA,6BAAmB,CAAYL,eAAZ,CADa,CAAA;EAAA,GAAf,CAAnB;EAAA,MAAOM,QAAP,sBAX0B;;;EAgB1B,EAA0BvB,IAAAA,gBAAAA,GAAAA,gBAAK,CAACqB,QAAN,CAAe,YAAA;EAAA,IAAME,OAAAA,QAAQ,CAACC,YAAf,CAAA;EAAA,GAAf,CAA1B;EAAA,MAAOL,KAAP,GAAA,gBAAA,CAAA,CAAA,CAAA;EAAA,MAAcM,QAAd,uBAhB0B;EAmB1B;;;EACAF,EAAAA,QAAQ,CAACG,UAAT,CAAoB,UAAAC,IAAI,EAAA;EAAA,IACnBA,OAAAA,QAAAA,CAAAA,EAAAA,EAAAA,IADmB,EAEnBX,OAFmB,EAAA;EAGtBG,MAAAA,KAAK,EACAA,QAAAA,CAAAA,EAAAA,EAAAA,KADA,EAEAH,OAAO,CAACG,KAFR,CAHiB;EAOtB;EACA;EACAC,MAAAA,aAAa,EAAE,SAAAQ,aAAAA,CAAAA,OAAO,EAAI;EACxBH,QAAAA,QAAQ,CAACG,OAAD,CAAR,CAAA;EACAZ,QAAAA,OAAO,CAACI,aAAR,IAAA,IAAA,GAAA,KAAA,CAAA,GAAAJ,OAAO,CAACI,aAAR,CAAwBQ,OAAxB,CAAA,CAAA;EACD,OAAA;EAZqB,KAAA,CAAA,CAAA;EAAA,GAAxB,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"index.development.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n React.useLayoutEffect(() => {\n instance.willUpdate()\n })\n\n return instance\n}\n"],"names":["render","Comp","props","isReactComponent","React","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description","init","createTable","createTableFactory","useTableInstance","table","options","resolvedOptions","__options","state","onStateChange","useState","createTableInstance","instance","initialState","setState","setOptions","prev","updater","useLayoutEffect","willUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAMA,MAAM,GAAG,SAATA,MAAS,CACpBC,IADoB,EAEpBC,KAFoB,EAAA;EAAA,EAAA,OAIpB,CAACD,IAAD,GAAQ,IAAR,GAAeE,gBAAgB,CAACF,IAAD,CAAhB,gBAAyBG,+BAAC,IAAD,EAAUF,KAAV,CAAzB,GAA+CD,IAJ1C,CAAA;EAAA,EAAf;;EAQP,SAASE,gBAAT,CAA0BE,SAA1B,EAAqE;EACnE,EAAA,OACEC,gBAAgB,CAACD,SAAD,CAAhB,IACA,OAAOA,SAAP,KAAqB,UADrB,IAEAE,iBAAiB,CAACF,SAAD,CAHnB,CAAA;EAKD,CAAA;;EAED,SAASC,gBAAT,CAA0BD,SAA1B,EAA0C;EACxC,EAAA,OACE,OAAOA,SAAP,KAAqB,UAArB,IACC,YAAM;EACL,IAAA,IAAMG,KAAK,GAAGC,MAAM,CAACC,cAAP,CAAsBL,SAAtB,CAAd,CAAA;EACA,IAAOG,OAAAA,KAAK,CAACG,SAAN,IAAmBH,KAAK,CAACG,SAAN,CAAgBR,gBAA1C,CAAA;EACD,GAHD,EAFF,CAAA;EAOD,CAAA;;EAED,SAASI,iBAAT,CAA2BF,SAA3B,EAA2C;EACzC,EACE,OAAA,OAAOA,SAAP,KAAqB,QAArB,IACA,OAAOA,SAAS,CAACO,QAAjB,KAA8B,QAD9B,IAEA,CAAC,YAAD,EAAe,mBAAf,CAAA,CAAoCC,QAApC,CAA6CR,SAAS,CAACO,QAAV,CAAmBE,WAAhE,CAHF,CAAA;EAKD,CAAA;;AAED,MAAA,KAAA,GAA4CC,cAAI,CAAC;EAAEf,EAAAA,MAAM,EAANA,MAAAA;EAAF,CAAD,CAAhD,CAAA;EAAA,IAAQgB,WAAR,SAAQA,WAAR,CAAA;EAAA,IAAqBC,kB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OAAO,CAACI,aAAR,CAAwBQ,OAAxB,CAAA,CAAA;EACD,OAAA;EAZqB,KAAA,CAAA,CAAA;EAAA,GAAxB,CAAA,CAAA;EAeA5B,EAAAA,gBAAK,CAAC6B,eAAN,CAAsB,YAAM;EAC1BN,IAAAA,QAAQ,CAACO,UAAT,EAAA,CAAA;EACD,GAFD,CAAA,CAAA;EAIA,EAAA,OAAOP,QAAP,CAAA;EACD;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@tanstack/table-core")):"function"==typeof define&&define.amd?define(["exports","react","@tanstack/table-core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTable={},e.React,e.TableCore)}(this,(function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(t);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var c=function(e,t){return e?function(e){return"function"==typeof e&&((t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent);var t}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?o.createElement(e,t):e:null;var n};var u=n.init({render:c}),f=u.createTable,i=u.createTableFactory;e.createTable=f,e.createTableFactory=i,e.render=c,e.useTableInstance=function(e,t){var r,u=a({},null!=(r=e.__options)?r:{},{state:{},onStateChange:function(){},render:c},t),f=o.useState((function(){return n.createTableInstance(u)}))[0],i=o.useState((function(){return f.initialState})),l=i[0],s=i[1];return f.setOptions((function(e){return a({},e,t,{state:a({},l,t.state),onStateChange:function(e){s(e),null==t.onStateChange||t.onStateChange(e)}})})),f},Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
11
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@tanstack/table-core")):"function"==typeof define&&define.amd?define(["exports","react","@tanstack/table-core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTable={},e.React,e.TableCore)}(this,(function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(t);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var c=function(e,t){return e?function(e){return"function"==typeof e&&((t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent);var t}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?o.createElement(e,t):e:null;var n};var u=n.init({render:c}),f=u.createTable,i=u.createTableFactory;e.createTable=f,e.createTableFactory=i,e.render=c,e.useTableInstance=function(e,t){var r,u=a({},null!=(r=e.__options)?r:{},{state:{},onStateChange:function(){},render:c},t),f=o.useState((function(){return n.createTableInstance(u)}))[0],i=o.useState((function(){return f.initialState})),l=i[0],s=i[1];return f.setOptions((function(e){return a({},e,t,{state:a({},l,t.state),onStateChange:function(e){s(e),null==t.onStateChange||t.onStateChange(e)}})})),o.useLayoutEffect((function(){f.willUpdate()})),f},Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
12
12
|
//# sourceMappingURL=index.production.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.production.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n return instance\n}\n"],"names":["render","Comp","props","component","proto","Object","getPrototypeOf","prototype","isReactComponent","isClassComponent","$$typeof","includes","description","isExoticComponent","React","_init","init","createTable","createTableFactory","table","options","_table$__options","resolvedOptions","__options","state","onStateChange","instance","useState","createTableInstance","initialState","_React$useState2","setState","setOptions","prev","updater"],"mappings":";;;;;;;;;;o1BAmBaA,IAAAA,EAAS,SACpBC,EACAC,GAFoB,OAInBD,EAYH,SAA0BE,GACxB,MACuB,mBAAdA,KAECC,EAAQC,OAAOC,eAAeH,IACvBI,WAAaH,EAAMG,UAAUC,kBAF3C,IACOJ,EAVRK,CAFsBN,EAJQF,IAOT,mBAAdE,GAeX,SAA2BA,GAEvB,MAAqB,iBAAdA,GACuB,iBAAvBA,EAAUO,UACjB,CAAC,aAAc,qBAAqBC,SAASR,EAAUO,SAASE,aAlBhEC,CAAkBV,GARoBW,gBAACb,EAASC,GAAYD,EAAtD,KAIV,IAA0BE,GA0B1B,IAAAY,EAA4CC,EAAAA,KAAK,CAAEhB,OAAAA,IAA3CiB,IAAAA,YAAaC,IAAAA,wFAId,SACLC,EACAC,GAO0B,IAAAC,EAEpBC,EACAH,EAAAA,UAAAA,EAAAA,EAAMI,aAAa,GADgB,CAEvCC,MAAO,GACPC,cAAe,aACfzB,OAAAA,GACGoB,GAIEM,EAAYZ,EAAMa,UAAS,WAChCC,OAAAA,EAAAA,oBAA+BN,SAIPR,EAAAA,EAAMa,UAAS,WAAMD,OAAAA,EAASG,gBAAjDL,EAAPM,EAAA,GAAcC,
|
|
1
|
+
{"version":3,"file":"index.production.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nexport * from '@tanstack/table-core'\n\nimport {\n createTableInstance,\n PartialKeys,\n Options,\n TableInstance,\n CreateTableFactoryOptions,\n Table,\n init,\n AnyGenerics,\n} from '@tanstack/table-core'\n\nexport type Renderable<TProps> =\n | React.ReactNode\n | React.FunctionComponent<TProps>\n | React.Component<TProps>\n\nexport const render = <TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode =>\n !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n\nexport type Render = typeof render\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\nconst { createTable, createTableFactory } = init({ render })\n\nexport { createTable, createTableFactory }\n\nexport function useTableInstance<TGenerics extends AnyGenerics>(\n table: Table<TGenerics>,\n options: PartialKeys<\n Omit<\n Options<TGenerics>,\n keyof CreateTableFactoryOptions<any, any, any, any>\n >,\n 'state' | 'onStateChange'\n >\n): TableInstance<TGenerics> {\n // Compose in the generic options to the user options\n const resolvedOptions: Options<TGenerics> = {\n ...(table.__options ?? {}),\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n ...options,\n }\n\n // Create a new table instance and store it in state\n const [instance] = React.useState(() =>\n createTableInstance<TGenerics>(resolvedOptions)\n )\n\n // By default, manage table state here using the instance's initial state\n const [state, setState] = React.useState(() => instance.initialState)\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n instance.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state,\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater)\n options.onStateChange?.(updater)\n },\n }))\n\n React.useLayoutEffect(() => {\n instance.willUpdate()\n })\n\n return instance\n}\n"],"names":["render","Comp","props","component","proto","Object","getPrototypeOf","prototype","isReactComponent","isClassComponent","$$typeof","includes","description","isExoticComponent","React","_init","init","createTable","createTableFactory","table","options","_table$__options","resolvedOptions","__options","state","onStateChange","instance","useState","createTableInstance","initialState","_React$useState2","setState","setOptions","prev","updater","useLayoutEffect","willUpdate"],"mappings":";;;;;;;;;;o1BAmBaA,IAAAA,EAAS,SACpBC,EACAC,GAFoB,OAInBD,EAYH,SAA0BE,GACxB,MACuB,mBAAdA,KAECC,EAAQC,OAAOC,eAAeH,IACvBI,WAAaH,EAAMG,UAAUC,kBAF3C,IACOJ,EAVRK,CAFsBN,EAJQF,IAOT,mBAAdE,GAeX,SAA2BA,GAEvB,MAAqB,iBAAdA,GACuB,iBAAvBA,EAAUO,UACjB,CAAC,aAAc,qBAAqBC,SAASR,EAAUO,SAASE,aAlBhEC,CAAkBV,GARoBW,gBAACb,EAASC,GAAYD,EAAtD,KAIV,IAA0BE,GA0B1B,IAAAY,EAA4CC,EAAAA,KAAK,CAAEhB,OAAAA,IAA3CiB,IAAAA,YAAaC,IAAAA,wFAId,SACLC,EACAC,GAO0B,IAAAC,EAEpBC,EACAH,EAAAA,UAAAA,EAAAA,EAAMI,aAAa,GADgB,CAEvCC,MAAO,GACPC,cAAe,aACfzB,OAAAA,GACGoB,GAIEM,EAAYZ,EAAMa,UAAS,WAChCC,OAAAA,EAAAA,oBAA+BN,SAIPR,EAAAA,EAAMa,UAAS,WAAMD,OAAAA,EAASG,gBAAjDL,EAAPM,EAAA,GAAcC,OAuBd,OAnBAL,EAASM,YAAW,SAAAC,GACfA,OAAAA,EAAAA,GAAAA,EACAb,EAFmB,CAGtBI,MACKA,EAAAA,GAAAA,EACAJ,EAAQI,OAIbC,cAAe,SAAAS,GACbH,EAASG,GACT,MAAAd,EAAQK,eAARL,EAAQK,cAAgBS,SAI5BpB,EAAMqB,iBAAgB,WACpBT,EAASU,gBAGJV"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-table",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.34",
|
|
5
5
|
"description": "Hooks for building lightweight, fast and extendable datagrids for React",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/tanstack/react-table#readme",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"src"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tanstack/table-core": "8.0.0-alpha.
|
|
37
|
+
"@tanstack/table-core": "8.0.0-alpha.34"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=16",
|