@tanstack/svelte-table 8.0.4 → 8.0.6
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/svelte-table/src/index.js.map +1 -1
- package/build/cjs/svelte-table/src/render-component.js.map +1 -1
- package/build/cjs/table-core/build/esm/index.js +12 -3
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +12 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/umd/index.development.js +12 -3
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/index.ts"],"sourcesContent":["import {\n createTableFactory,\n createTableInstance as coreCreateTableInstance,\n PartialKeys,\n Table,\n TableGenerics,\n TableOptions,\n TableOptionsResolved,\n} from '@tanstack/table-core'\nimport Placeholder from './placeholder'\nimport { SvelteComponent } from 'svelte/internal'\nimport { readable, writable, derived, Readable, get } from 'svelte/store'\nimport { renderComponent } from './render-component'\n\nexport { renderComponent } from './render-component'\n\nexport * from '@tanstack/table-core'\n\nfunction isSvelteServerComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$render === 'function' &&\n typeof component.render === 'function'\n )\n}\n\nfunction isSvelteClientComponent(component: any) {\n let isHMR = '__SVELTE_HMR' in window\n\n return (\n component.prototype instanceof SvelteComponent ||\n (isHMR &&\n component.name?.startsWith('Proxy<') &&\n component.name?.endsWith('>'))\n )\n}\n\nfunction isSvelteComponent(component: any) {\n if (typeof document === 'undefined') {\n return isSvelteServerComponent(component)\n } else {\n return isSvelteClientComponent(component)\n }\n}\n\nfunction wrapInPlaceholder(content: any) {\n return renderComponent(Placeholder, { content })\n}\n\nexport function render(component: any, props: any) {\n if (!component) return null\n\n if (isSvelteComponent(component)) {\n return renderComponent(component, props)\n }\n\n if (typeof component === 'function') {\n const result = component(props)\n\n if (isSvelteComponent(result)) {\n return result\n }\n\n return wrapInPlaceholder(result)\n }\n\n return wrapInPlaceholder(component)\n}\n\nexport const createTable = createTableFactory({ render })\n\ntype ReadableOrVal<T> = T | Readable<T>\n\nexport function createTableInstance<TGenerics extends TableGenerics>(\n table: Table<TGenerics>,\n options: ReadableOrVal<TableOptions<TGenerics>>\n) {\n let optionsStore: Readable<TableOptions<TGenerics>>\n\n if ('subscribe' in options) {\n optionsStore = options\n } else {\n optionsStore = readable(options)\n }\n\n let resolvedOptions: TableOptionsResolved<TGenerics> = {\n ...table.options,\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n renderFallbackValue: null,\n ...get(optionsStore),\n }\n\n let instance = coreCreateTableInstance(resolvedOptions)\n\n let stateStore = writable(/** @type {number} */ instance.initialState)\n // combine stores\n let stateOptionsStore = derived([stateStore, optionsStore], s => s)\n const instanceReadable = readable(instance, function start(set) {\n const unsubscribe = stateOptionsStore.subscribe(([state, options]) => {\n instance.setOptions(prev => {\n return {\n ...prev,\n ...options,\n state: { ...state, ...options.state },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n if (updater instanceof Function) {\n stateStore.update(updater)\n } else {\n stateStore.set(updater)\n }\n\n resolvedOptions.onStateChange?.(updater)\n },\n }\n })\n\n // it didn't seem to rerender without setting the instance\n set(instance)\n })\n\n return function stop() {\n unsubscribe()\n }\n })\n\n return instanceReadable\n}\n"],"names":["isSvelteServerComponent","component","$$render","render","isSvelteClientComponent","isHMR","window","prototype","SvelteComponent","name","startsWith","endsWith","isSvelteComponent","document","wrapInPlaceholder","content","renderComponent","Placeholder","props","result","createTable","createTableFactory","createTableInstance","table","options","optionsStore","readable","resolvedOptions","state","onStateChange","renderFallbackValue","get","instance","coreCreateTableInstance","stateStore","writable","initialState","stateOptionsStore","derived","s","instanceReadable","start","set","unsubscribe","subscribe","setOptions","prev","updater","Function","update","stop"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,SAASA,uBAAT,CAAiCC,SAAjC,EAAiD;AAC/C,EAAA,OACE,OAAOA,SAAP,KAAqB,QAArB,IACA,OAAOA,SAAS,CAACC,QAAjB,KAA8B,UAD9B,IAEA,OAAOD,SAAS,CAACE,MAAjB,KAA4B,UAH9B,CAAA;AAKD,CAAA;;AAED,SAASC,uBAAT,CAAiCH,SAAjC,EAAiD;AAAA,EAAA,IAAA,eAAA,EAAA,gBAAA,CAAA;;AAC/C,EAAA,IAAII,KAAK,IAAG,cAAkBC,IAAAA,MAArB,CAAT,CAAA;AAEA,EAAA,OACEL,SAAS,CAACM,SAAV,YAA+BC,wBAA/B,IACCH,KAAK,KAAA,CAAA,eAAA,GACJJ,SAAS,CAACQ,IADN,KAAA,IAAA,GAAA,KAAA,CAAA,GACJ,eAAgBC,CAAAA,UAAhB,CAA2B,QAA3B,CADI,CAAL,KAECT,CAAAA,gBAAAA,GAAAA,SAAS,CAACQ,IAFX,KAEC,IAAA,GAAA,KAAA,CAAA,GAAA,gBAAA,CAAgBE,QAAhB,CAAyB,GAAzB,CAFD,CAFH,CAAA;AAMD,CAAA;;AAED,SAASC,iBAAT,CAA2BX,SAA3B,EAA2C;AACzC,EAAA,IAAI,OAAOY,QAAP,KAAoB,WAAxB,EAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/index.ts"],"sourcesContent":["import {\n createTableFactory,\n createTableInstance as coreCreateTableInstance,\n PartialKeys,\n Table,\n TableGenerics,\n TableOptions,\n TableOptionsResolved,\n} from '@tanstack/table-core'\nimport Placeholder from './placeholder'\nimport { SvelteComponent } from 'svelte/internal'\nimport { readable, writable, derived, Readable, get } from 'svelte/store'\nimport { renderComponent } from './render-component'\n\nexport { renderComponent } from './render-component'\n\nexport * from '@tanstack/table-core'\n\nfunction isSvelteServerComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$render === 'function' &&\n typeof component.render === 'function'\n )\n}\n\nfunction isSvelteClientComponent(component: any) {\n let isHMR = '__SVELTE_HMR' in window\n\n return (\n component.prototype instanceof SvelteComponent ||\n (isHMR &&\n component.name?.startsWith('Proxy<') &&\n component.name?.endsWith('>'))\n )\n}\n\nfunction isSvelteComponent(component: any) {\n if (typeof document === 'undefined') {\n return isSvelteServerComponent(component)\n } else {\n return isSvelteClientComponent(component)\n }\n}\n\nfunction wrapInPlaceholder(content: any) {\n return renderComponent(Placeholder, { content })\n}\n\nexport function render(component: any, props: any) {\n if (!component) return null\n\n if (isSvelteComponent(component)) {\n return renderComponent(component, props)\n }\n\n if (typeof component === 'function') {\n const result = component(props)\n\n if (isSvelteComponent(result)) {\n return result\n }\n\n return wrapInPlaceholder(result)\n }\n\n return wrapInPlaceholder(component)\n}\n\nexport const createTable = createTableFactory({ render })\n\ntype ReadableOrVal<T> = T | Readable<T>\n\nexport function createTableInstance<TGenerics extends TableGenerics>(\n table: Table<TGenerics>,\n options: ReadableOrVal<TableOptions<TGenerics>>\n) {\n let optionsStore: Readable<TableOptions<TGenerics>>\n\n if ('subscribe' in options) {\n optionsStore = options\n } else {\n optionsStore = readable(options)\n }\n\n let resolvedOptions: TableOptionsResolved<TGenerics> = {\n ...table.options,\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n render,\n renderFallbackValue: null,\n ...get(optionsStore),\n }\n\n let instance = coreCreateTableInstance(resolvedOptions)\n\n let stateStore = writable(/** @type {number} */ instance.initialState)\n // combine stores\n let stateOptionsStore = derived([stateStore, optionsStore], s => s)\n const instanceReadable = readable(instance, function start(set) {\n const unsubscribe = stateOptionsStore.subscribe(([state, options]) => {\n instance.setOptions(prev => {\n return {\n ...prev,\n ...options,\n state: { ...state, ...options.state },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n if (updater instanceof Function) {\n stateStore.update(updater)\n } else {\n stateStore.set(updater)\n }\n\n resolvedOptions.onStateChange?.(updater)\n },\n }\n })\n\n // it didn't seem to rerender without setting the instance\n set(instance)\n })\n\n return function stop() {\n unsubscribe()\n }\n })\n\n return instanceReadable\n}\n"],"names":["isSvelteServerComponent","component","$$render","render","isSvelteClientComponent","isHMR","window","prototype","SvelteComponent","name","startsWith","endsWith","isSvelteComponent","document","wrapInPlaceholder","content","renderComponent","Placeholder","props","result","createTable","createTableFactory","createTableInstance","table","options","optionsStore","readable","resolvedOptions","state","onStateChange","renderFallbackValue","get","instance","coreCreateTableInstance","stateStore","writable","initialState","stateOptionsStore","derived","s","instanceReadable","start","set","unsubscribe","subscribe","setOptions","prev","updater","Function","update","stop"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,SAASA,uBAAT,CAAiCC,SAAjC,EAAiD;AAC/C,EAAA,OACE,OAAOA,SAAP,KAAqB,QAArB,IACA,OAAOA,SAAS,CAACC,QAAjB,KAA8B,UAD9B,IAEA,OAAOD,SAAS,CAACE,MAAjB,KAA4B,UAH9B,CAAA;AAKD,CAAA;;AAED,SAASC,uBAAT,CAAiCH,SAAjC,EAAiD;AAAA,EAAA,IAAA,eAAA,EAAA,gBAAA,CAAA;;AAC/C,EAAA,IAAII,KAAK,IAAG,cAAkBC,IAAAA,MAArB,CAAT,CAAA;AAEA,EAAA,OACEL,SAAS,CAACM,SAAV,YAA+BC,wBAA/B,IACCH,KAAK,KAAA,CAAA,eAAA,GACJJ,SAAS,CAACQ,IADN,KAAA,IAAA,GAAA,KAAA,CAAA,GACJ,eAAgBC,CAAAA,UAAhB,CAA2B,QAA3B,CADI,CAAL,KAECT,CAAAA,gBAAAA,GAAAA,SAAS,CAACQ,IAFX,KAEC,IAAA,GAAA,KAAA,CAAA,GAAA,gBAAA,CAAgBE,QAAhB,CAAyB,GAAzB,CAFD,CAFH,CAAA;AAMD,CAAA;;AAED,SAASC,iBAAT,CAA2BX,SAA3B,EAA2C;AACzC,EAAA,IAAI,OAAOY,QAAP,KAAoB,WAAxB,EAAqC;AACnC,IAAOb,OAAAA,uBAAuB,CAACC,SAAD,CAA9B,CAAA;AACD,GAFD,MAEO;AACL,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A,IAAA,GAAA,KAAA,CAAA,GAAAF,eAAe,CAACE,aAAhB,CAAgCkB,OAAhC,CAAA,CAAA;AACD,WAAA;AAdI,SAAP,CAAA;AAgBD,OAjBD,EADoE;;AAqBpEL,MAAAA,GAAG,CAACV,QAAD,CAAH,CAAA;AACD,KAtBmB,CAApB,CAAA;AAwBA,IAAO,OAAA,SAASkB,IAAT,GAAgB;AACrBP,MAAAA,WAAW,EAAA,CAAA;AACZ,KAFD,CAAA;AAGD,GA5BgC,CAAjC,CAAA;AA8BA,EAAA,OAAOH,gBAAP,CAAA;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-component.js","sources":["../../../../src/render-component.ts"],"sourcesContent":["import {\n SvelteComponent,\n claim_component,\n create_component,\n destroy_component,\n init,\n mount_component,\n noop,\n safe_not_equal,\n transition_in,\n transition_out,\n create_ssr_component,\n validate_component,\n} from 'svelte/internal'\n\nfunction create_fragment(ctx: any, Comp: any, props: any) {\n let c: any\n let current: any\n c = new Comp({ props, $$inline: true })\n\n return {\n c() {\n create_component(c.$$.fragment)\n },\n l(nodes: any) {\n claim_component(c.$$.fragment, nodes)\n },\n m(target: any, anchor: any) {\n // @ts-ignore\n mount_component(c, target, anchor)\n current = true\n },\n p: noop,\n i(local: any) {\n if (current) return\n transition_in(c.$$.fragment, local)\n current = true\n },\n o(local: any) {\n transition_out(c.$$.fragment, local)\n current = false\n },\n d(detaching: any) {\n destroy_component(c, detaching)\n },\n }\n}\n\nfunction renderClient(Comp: any, props: any): any {\n return class WrapperComp extends SvelteComponent {\n constructor(options: any) {\n super()\n init(\n this,\n options,\n null,\n (ctx: any) => create_fragment(ctx, Comp, props),\n safe_not_equal,\n {},\n undefined\n )\n }\n }\n}\n\nfunction renderServer(Comp: any, props: any) {\n const WrapperComp = create_ssr_component(\n ($$result: any, $$props: any, $$bindings: any, slots: any) => {\n return `${validate_component(Comp, 'TableComponent').$$render(\n $$result,\n props,\n {},\n {}\n )}`\n }\n )\n\n return WrapperComp\n}\n\nexport const renderComponent =\n typeof window === 'undefined' ? renderServer : renderClient\n"],"names":["create_fragment","ctx","Comp","props","c","current","$$inline","create_component","$$","fragment","l","nodes","claim_component","m","target","anchor","mount_component","p","noop","i","local","transition_in","o","transition_out","d","detaching","destroy_component","renderClient","WrapperComp","SvelteComponent","constructor","options","init","safe_not_equal","undefined","renderServer","create_ssr_component","$$result","$$props","$$bindings","slots","validate_component","$$render","renderComponent","window"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAASA,eAAT,CAAyBC,GAAzB,EAAmCC,IAAnC,EAA8CC,KAA9C,EAA0D;AACxD,EAAA,IAAIC,CAAJ,CAAA;AACA,EAAA,IAAIC,OAAJ,CAAA;
|
|
1
|
+
{"version":3,"file":"render-component.js","sources":["../../../../src/render-component.ts"],"sourcesContent":["import {\n SvelteComponent,\n claim_component,\n create_component,\n destroy_component,\n init,\n mount_component,\n noop,\n safe_not_equal,\n transition_in,\n transition_out,\n create_ssr_component,\n validate_component,\n} from 'svelte/internal'\n\nfunction create_fragment(ctx: any, Comp: any, props: any) {\n let c: any\n let current: any\n c = new Comp({ props, $$inline: true })\n\n return {\n c() {\n create_component(c.$$.fragment)\n },\n l(nodes: any) {\n claim_component(c.$$.fragment, nodes)\n },\n m(target: any, anchor: any) {\n // @ts-ignore\n mount_component(c, target, anchor)\n current = true\n },\n p: noop,\n i(local: any) {\n if (current) return\n transition_in(c.$$.fragment, local)\n current = true\n },\n o(local: any) {\n transition_out(c.$$.fragment, local)\n current = false\n },\n d(detaching: any) {\n destroy_component(c, detaching)\n },\n }\n}\n\nfunction renderClient(Comp: any, props: any): any {\n return class WrapperComp extends SvelteComponent {\n constructor(options: any) {\n super()\n init(\n this,\n options,\n null,\n (ctx: any) => create_fragment(ctx, Comp, props),\n safe_not_equal,\n {},\n undefined\n )\n }\n }\n}\n\nfunction renderServer(Comp: any, props: any) {\n const WrapperComp = create_ssr_component(\n ($$result: any, $$props: any, $$bindings: any, slots: any) => {\n return `${validate_component(Comp, 'TableComponent').$$render(\n $$result,\n props,\n {},\n {}\n )}`\n }\n )\n\n return WrapperComp\n}\n\nexport const renderComponent =\n typeof window === 'undefined' ? renderServer : renderClient\n"],"names":["create_fragment","ctx","Comp","props","c","current","$$inline","create_component","$$","fragment","l","nodes","claim_component","m","target","anchor","mount_component","p","noop","i","local","transition_in","o","transition_out","d","detaching","destroy_component","renderClient","WrapperComp","SvelteComponent","constructor","options","init","safe_not_equal","undefined","renderServer","create_ssr_component","$$result","$$props","$$bindings","slots","validate_component","$$render","renderComponent","window"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAASA,eAAT,CAAyBC,GAAzB,EAAmCC,IAAnC,EAA8CC,KAA9C,EAA0D;AACxD,EAAA,IAAIC,CAAJ,CAAA;AACA,EAAA,IAAIC,OAAJ,CAAA;AACAD,EAAAA,CAAC,GAAG,IAAIF,IAAJ,CAAS;AAAEC,IAAAA,KAAF;AAASG,IAAAA,QAAQ,EAAE,IAAA;AAAnB,GAAT,CAAJ,CAAA;AAEA,EAAO,OAAA;AACLF,IAAAA,CAAC,GAAG;AACFG,MAAAA,yBAAgB,CAACH,CAAC,CAACI,EAAF,CAAKC,QAAN,CAAhB,CAAA;AACD,KAHI;;AAILC,IAAAA,CAAC,CAACC,KAAD,EAAa;AACZC,MAAAA,wBAAe,CAACR,CAAC,CAACI,EAAF,CAAKC,QAAN,EAAgBE,KAAhB,CAAf,CAAA;AACD,KANI;;AAOLE,IAAAA,CAAC,CAACC,MAAD,EAAcC,MAAd,EAA2B;AAC1B;AACAC,MAAAA,wBAAe,CAACZ,CAAD,EAAIU,MAAJ,EAAYC,MAAZ,CAAf,CAAA;AACAV,MAAAA,OAAO,GAAG,IAAV,CAAA;AACD,KAXI;;AAYLY,IAAAA,CAAC,EAAEC,aAZE;;AAaLC,IAAAA,CAAC,CAACC,KAAD,EAAa;AACZ,MAAA,IA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AAMD,GARqC,CAAxC,CAAA;AAWA,EAAA,OAAOyB,WAAP,CAAA;AACD,CAAA;;AAEM,MAAMe,eAAe,GAC1B,OAAOC,MAAP,KAAkB,WAAlB,GAAgCT,YAAhC,GAA+CR;;;;"}
|
|
@@ -2311,6 +2311,9 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2311
2311
|
const newSelectedRowsById = {}; // Filters top level and nested rows
|
|
2312
2312
|
|
|
2313
2313
|
const recurseRows = function (rows, depth) {
|
|
2314
|
+
if (depth === void 0) {
|
|
2315
|
+
depth = 0;
|
|
2316
|
+
}
|
|
2314
2317
|
|
|
2315
2318
|
return rows.map(row => {
|
|
2316
2319
|
var _row$subRows2;
|
|
@@ -2324,7 +2327,7 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2324
2327
|
|
|
2325
2328
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
2326
2329
|
row = { ...row,
|
|
2327
|
-
subRows: recurseRows(row.subRows)
|
|
2330
|
+
subRows: recurseRows(row.subRows, depth + 1)
|
|
2328
2331
|
};
|
|
2329
2332
|
}
|
|
2330
2333
|
|
|
@@ -3249,6 +3252,9 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3249
3252
|
const newFilteredRowsById = {};
|
|
3250
3253
|
|
|
3251
3254
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3255
|
+
if (depth === void 0) {
|
|
3256
|
+
depth = 0;
|
|
3257
|
+
}
|
|
3252
3258
|
|
|
3253
3259
|
const rows = []; // Filter from children up first
|
|
3254
3260
|
|
|
@@ -3260,7 +3266,7 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3260
3266
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3261
3267
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3262
3268
|
newRow.columnFilters = row.columnFilters;
|
|
3263
|
-
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3269
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3264
3270
|
|
|
3265
3271
|
if (!newRow.subRows.length) {
|
|
3266
3272
|
continue;
|
|
@@ -3290,6 +3296,9 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3290
3296
|
const newFilteredRowsById = {}; // Filters top level and nested rows
|
|
3291
3297
|
|
|
3292
3298
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3299
|
+
if (depth === void 0) {
|
|
3300
|
+
depth = 0;
|
|
3301
|
+
}
|
|
3293
3302
|
|
|
3294
3303
|
// Filter from parents downward first
|
|
3295
3304
|
const rows = []; // Apply the filter to any subRows
|
|
@@ -3303,7 +3312,7 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3303
3312
|
|
|
3304
3313
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
3305
3314
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3306
|
-
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3315
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3307
3316
|
row = newRow;
|
|
3308
3317
|
}
|
|
3309
3318
|
|