@tanstack/svelte-table 8.5.15 → 8.5.16
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 +8 -20
- package/build/cjs/svelte-table/src/index.js.map +1 -1
- package/build/cjs/svelte-table/src/placeholder.js.map +1 -1
- package/build/cjs/svelte-table/src/placeholder.svelte.js +1 -1
- package/build/cjs/svelte-table/src/render-component.js +0 -11
- package/build/cjs/svelte-table/src/render-component.js.map +1 -1
- package/build/cjs/table-core/build/esm/index.js +264 -504
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +273 -536
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +51 -41
- package/build/stats-react.json +51 -51
- package/build/umd/index.development.js +273 -534
- 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
|
@@ -21,14 +21,11 @@ var renderComponent = require('./render-component.js');
|
|
|
21
21
|
function isSvelteServerComponent(component) {
|
|
22
22
|
return typeof component === 'object' && typeof component.$$render === 'function' && typeof component.render === 'function';
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
function isSvelteClientComponent(component) {
|
|
26
25
|
var _component$name, _component$name2;
|
|
27
|
-
|
|
28
26
|
let isHMR = ('__SVELTE_HMR' in window);
|
|
29
27
|
return component.prototype instanceof internal.SvelteComponent || isHMR && ((_component$name = component.name) == null ? void 0 : _component$name.startsWith('Proxy<')) && ((_component$name2 = component.name) == null ? void 0 : _component$name2.endsWith('>'));
|
|
30
28
|
}
|
|
31
|
-
|
|
32
29
|
function isSvelteComponent(component) {
|
|
33
30
|
if (typeof document === 'undefined') {
|
|
34
31
|
return isSvelteServerComponent(component);
|
|
@@ -36,41 +33,32 @@ function isSvelteComponent(component) {
|
|
|
36
33
|
return isSvelteClientComponent(component);
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
|
-
|
|
40
36
|
function wrapInPlaceholder(content) {
|
|
41
37
|
return renderComponent.renderComponent(placeholder["default"], {
|
|
42
38
|
content
|
|
43
39
|
});
|
|
44
40
|
}
|
|
45
|
-
|
|
46
41
|
function flexRender(component, props) {
|
|
47
42
|
if (!component) return null;
|
|
48
|
-
|
|
49
43
|
if (isSvelteComponent(component)) {
|
|
50
44
|
return renderComponent.renderComponent(component, props);
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
if (typeof component === 'function') {
|
|
54
47
|
const result = component(props);
|
|
55
|
-
|
|
56
48
|
if (isSvelteComponent(result)) {
|
|
57
49
|
return result;
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
return wrapInPlaceholder(result);
|
|
61
52
|
}
|
|
62
|
-
|
|
63
53
|
return wrapInPlaceholder(component);
|
|
64
54
|
}
|
|
65
55
|
function createSvelteTable(options) {
|
|
66
56
|
let optionsStore;
|
|
67
|
-
|
|
68
57
|
if ('subscribe' in options) {
|
|
69
58
|
optionsStore = options;
|
|
70
59
|
} else {
|
|
71
60
|
optionsStore = store.readable(options);
|
|
72
61
|
}
|
|
73
|
-
|
|
74
62
|
let resolvedOptions = {
|
|
75
63
|
state: {},
|
|
76
64
|
// Dummy state
|
|
@@ -80,18 +68,18 @@ function createSvelteTable(options) {
|
|
|
80
68
|
...store.get(optionsStore)
|
|
81
69
|
};
|
|
82
70
|
let table = index.createTable(resolvedOptions);
|
|
83
|
-
let stateStore = store.writable(
|
|
84
|
-
|
|
85
|
-
table.initialState); // combine stores
|
|
86
|
-
|
|
71
|
+
let stateStore = store.writable( /** @type {number} */table.initialState);
|
|
72
|
+
// combine stores
|
|
87
73
|
let stateOptionsStore = store.derived([stateStore, optionsStore], s => s);
|
|
88
74
|
const tableReadable = store.readable(table, function start(set) {
|
|
89
75
|
const unsubscribe = stateOptionsStore.subscribe(_ref => {
|
|
90
76
|
let [state, options] = _ref;
|
|
91
77
|
table.setOptions(prev => {
|
|
92
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
...prev,
|
|
93
80
|
...options,
|
|
94
|
-
state: {
|
|
81
|
+
state: {
|
|
82
|
+
...state,
|
|
95
83
|
...options.state
|
|
96
84
|
},
|
|
97
85
|
// Similarly, we'll maintain both our internal state and any user-provided
|
|
@@ -102,12 +90,12 @@ function createSvelteTable(options) {
|
|
|
102
90
|
} else {
|
|
103
91
|
stateStore.set(updater);
|
|
104
92
|
}
|
|
105
|
-
|
|
106
93
|
resolvedOptions.onStateChange == null ? void 0 : resolvedOptions.onStateChange(updater);
|
|
107
94
|
}
|
|
108
95
|
};
|
|
109
|
-
});
|
|
96
|
+
});
|
|
110
97
|
|
|
98
|
+
// it didn't seem to rerender without setting the table
|
|
111
99
|
set(table);
|
|
112
100
|
});
|
|
113
101
|
return function stop() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/index.ts"],"sourcesContent":["import {\n RowData,\n createTable,\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 flexRender(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\ntype ReadableOrVal<T> = T | Readable<T>\n\nexport function createSvelteTable<TData extends RowData>(\n options: ReadableOrVal<TableOptions<TData>>\n) {\n let optionsStore: Readable<TableOptions<TData>>\n\n if ('subscribe' in options) {\n optionsStore = options\n } else {\n optionsStore = readable(options)\n }\n\n let resolvedOptions: TableOptionsResolved<TData> = {\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n renderFallbackValue: null,\n ...get(optionsStore),\n }\n\n let table = createTable(resolvedOptions)\n\n let stateStore = writable(/** @type {number} */ table.initialState)\n // combine stores\n let stateOptionsStore = derived([stateStore, optionsStore], s => s)\n const tableReadable = readable(table, function start(set) {\n const unsubscribe = stateOptionsStore.subscribe(([state, options]) => {\n table.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 table\n set(table)\n })\n\n return function stop() {\n unsubscribe()\n }\n })\n\n return tableReadable\n}\n"],"names":["isSvelteServerComponent","component","$$render","render","isSvelteClientComponent","isHMR","window","prototype","SvelteComponent","name","startsWith","endsWith","isSvelteComponent","document","wrapInPlaceholder","content","renderComponent","Placeholder","flexRender","props","result","createSvelteTable","options","optionsStore","readable","resolvedOptions","state","onStateChange","renderFallbackValue","get","table","createTable","stateStore","writable","initialState","stateOptionsStore","derived","s","tableReadable","start","set","unsubscribe","subscribe","setOptions","prev","updater","Function","update","stop"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/index.ts"],"sourcesContent":["import {\n RowData,\n createTable,\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 flexRender(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\ntype ReadableOrVal<T> = T | Readable<T>\n\nexport function createSvelteTable<TData extends RowData>(\n options: ReadableOrVal<TableOptions<TData>>\n) {\n let optionsStore: Readable<TableOptions<TData>>\n\n if ('subscribe' in options) {\n optionsStore = options\n } else {\n optionsStore = readable(options)\n }\n\n let resolvedOptions: TableOptionsResolved<TData> = {\n state: {}, // Dummy state\n onStateChange: () => {}, // noop\n renderFallbackValue: null,\n ...get(optionsStore),\n }\n\n let table = createTable(resolvedOptions)\n\n let stateStore = writable(/** @type {number} */ table.initialState)\n // combine stores\n let stateOptionsStore = derived([stateStore, optionsStore], s => s)\n const tableReadable = readable(table, function start(set) {\n const unsubscribe = stateOptionsStore.subscribe(([state, options]) => {\n table.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 table\n set(table)\n })\n\n return function stop() {\n unsubscribe()\n }\n })\n\n return tableReadable\n}\n"],"names":["isSvelteServerComponent","component","$$render","render","isSvelteClientComponent","isHMR","window","prototype","SvelteComponent","name","startsWith","endsWith","isSvelteComponent","document","wrapInPlaceholder","content","renderComponent","Placeholder","flexRender","props","result","createSvelteTable","options","optionsStore","readable","resolvedOptions","state","onStateChange","renderFallbackValue","get","table","createTable","stateStore","writable","initialState","stateOptionsStore","derived","s","tableReadable","start","set","unsubscribe","subscribe","setOptions","prev","updater","Function","update","stop"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeA,SAASA,uBAAuB,CAACC,SAAc,EAAE;AAC/C,EAAA,OACE,OAAOA,SAAS,KAAK,QAAQ,IAC7B,OAAOA,SAAS,CAACC,QAAQ,KAAK,UAAU,IACxC,OAAOD,SAAS,CAACE,MAAM,KAAK,UAAU,CAAA;AAE1C,CAAA;AAEA,SAASC,uBAAuB,CAACH,SAAc,EAAE;AAAA,EAAA,IAAA,eAAA,EAAA,gBAAA,CAAA;AAC/C,EAAA,IAAII,KAAK,IAAG,cAAc,IAAIC,MAAM,CAAA,CAAA;EAEpC,OACEL,SAAS,CAACM,SAAS,YAAYC,wBAAe,IAC7CH,KAAK,KACJJ,CAAAA,eAAAA,GAAAA,SAAS,CAACQ,IAAI,KAAd,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAgBC,UAAU,CAAC,QAAQ,CAAC,CACpCT,KAAAA,CAAAA,gBAAAA,GAAAA,SAAS,CAACQ,IAAI,KAAd,IAAA,GAAA,KAAA,CAAA,GAAA,gBAAA,CAAgBE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;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G,CAACV,KAAK,CAAC,CAAA;AACZ,KAAC,CAAC,CAAA;IAEF,OAAO,SAASkB,IAAI,GAAG;AACrBP,MAAAA,WAAW,EAAE,CAAA;KACd,CAAA;AACH,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOH,aAAa,CAAA;AACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.js","sources":["../../../../src/placeholder.ts"],"sourcesContent":["import type { SvelteComponentDev } from 'svelte/internal'\nimport { create_ssr_component, escape } from 'svelte/internal'\nimport PlaceholderClient from './placeholder.svelte'\n\ntype X = typeof PlaceholderClient\n\nconst PlaceholderServer = create_ssr_component(\n ($$result: any, $$props: any, $$bindings: any, slots: any) => {\n return `${escape($$props.content)}`\n }\n) as any as typeof SvelteComponentDev\n\nexport default typeof document === 'undefined'\n ? PlaceholderServer\n : PlaceholderClient\n"],"names":["PlaceholderServer","create_ssr_component","$$result","$$props","$$bindings","slots","escape","content","document","PlaceholderClient"],"mappings":";;;;;;;;;;;;;;;;;AAMA,MAAMA,iBAAiB,GAAGC,6BAAoB,CAC5C,CAACC,
|
|
1
|
+
{"version":3,"file":"placeholder.js","sources":["../../../../src/placeholder.ts"],"sourcesContent":["import type { SvelteComponentDev } from 'svelte/internal'\nimport { create_ssr_component, escape } from 'svelte/internal'\nimport PlaceholderClient from './placeholder.svelte'\n\ntype X = typeof PlaceholderClient\n\nconst PlaceholderServer = create_ssr_component(\n ($$result: any, $$props: any, $$bindings: any, slots: any) => {\n return `${escape($$props.content)}`\n }\n) as any as typeof SvelteComponentDev\n\nexport default typeof document === 'undefined'\n ? PlaceholderServer\n : PlaceholderClient\n"],"names":["PlaceholderServer","create_ssr_component","$$result","$$props","$$bindings","slots","escape","content","document","PlaceholderClient"],"mappings":";;;;;;;;;;;;;;;;;AAMA,MAAMA,iBAAiB,GAAGC,6BAAoB,CAC5C,CAACC,QAAa,EAAEC,OAAY,EAAEC,UAAe,EAAEC,KAAU,KAAK;AAC5D,EAAA,OAAQ,GAAEC,eAAM,CAACH,OAAO,CAACI,OAAO,CAAE,CAAC,CAAA,CAAA;AACrC,CAAC,CACkC,CAAA;AAErC,kBAAe,OAAOC,QAAQ,KAAK,WAAW,GAC1CR,iBAAiB,GACjBS,sBAAiB;;;;"}
|
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
14
14
|
|
|
15
15
|
var internal = require('svelte/internal');
|
|
16
16
|
|
|
17
|
-
/* packages/svelte-table/src/placeholder.svelte generated by Svelte v3.
|
|
17
|
+
/* packages/svelte-table/src/placeholder.svelte generated by Svelte v3.52.0 */
|
|
18
18
|
|
|
19
19
|
function create_fragment(ctx) {
|
|
20
20
|
let t;
|
|
@@ -25,54 +25,43 @@ function create_fragment(ctx, Comp, props) {
|
|
|
25
25
|
c() {
|
|
26
26
|
internal.create_component(c.$$.fragment);
|
|
27
27
|
},
|
|
28
|
-
|
|
29
28
|
l(nodes) {
|
|
30
29
|
internal.claim_component(c.$$.fragment, nodes);
|
|
31
30
|
},
|
|
32
|
-
|
|
33
31
|
m(target, anchor) {
|
|
34
32
|
// @ts-ignore
|
|
35
33
|
internal.mount_component(c, target, anchor);
|
|
36
34
|
current = true;
|
|
37
35
|
},
|
|
38
|
-
|
|
39
36
|
p: internal.noop,
|
|
40
|
-
|
|
41
37
|
i(local) {
|
|
42
38
|
if (current) return;
|
|
43
39
|
internal.transition_in(c.$$.fragment, local);
|
|
44
40
|
current = true;
|
|
45
41
|
},
|
|
46
|
-
|
|
47
42
|
o(local) {
|
|
48
43
|
internal.transition_out(c.$$.fragment, local);
|
|
49
44
|
current = false;
|
|
50
45
|
},
|
|
51
|
-
|
|
52
46
|
d(detaching) {
|
|
53
47
|
internal.destroy_component(c, detaching);
|
|
54
48
|
}
|
|
55
|
-
|
|
56
49
|
};
|
|
57
50
|
}
|
|
58
|
-
|
|
59
51
|
function renderClient(Comp, props) {
|
|
60
52
|
return class WrapperComp extends internal.SvelteComponent {
|
|
61
53
|
constructor(options) {
|
|
62
54
|
super();
|
|
63
55
|
internal.init(this, options, null, ctx => create_fragment(ctx, Comp, props), internal.safe_not_equal, {}, undefined);
|
|
64
56
|
}
|
|
65
|
-
|
|
66
57
|
};
|
|
67
58
|
}
|
|
68
|
-
|
|
69
59
|
function renderServer(Comp, props) {
|
|
70
60
|
const WrapperComp = internal.create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
71
61
|
return `${internal.validate_component(Comp, 'TableComponent').$$render($$result, props, {}, {})}`;
|
|
72
62
|
});
|
|
73
63
|
return WrapperComp;
|
|
74
64
|
}
|
|
75
|
-
|
|
76
65
|
const renderComponent = typeof window === 'undefined' ? renderServer : renderClient;
|
|
77
66
|
|
|
78
67
|
exports.renderComponent = renderComponent;
|
|
@@ -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,
|
|
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,eAAe,CAACC,GAAQ,EAAEC,IAAS,EAAEC,KAAU,EAAE;AACxD,EAAA,IAAIC,CAAM,CAAA;AACV,EAAA,IAAIC,OAAY,CAAA;EAChBD,CAAC,GAAG,IAAIF,IAAI,CAAC;IAAEC,KAAK;AAAEG,IAAAA,QAAQ,EAAE,IAAA;AAAK,GAAC,CAAC,CAAA;EAEvC,OAAO;AACLF,IAAAA,CAAC,GAAG;AACFG,MAAAA,yBAAgB,CAACH,CAAC,CAACI,EAAE,CAACC,QAAQ,CAAC,CAAA;KAChC;IACDC,CAAC,CAACC,KAAU,EAAE;MACZC,wBAAe,CAACR,CAAC,CAACI,EAAE,CAACC,QAAQ,EAAEE,KAAK,CAAC,CAAA;KACtC;AACDE,IAAAA,CAAC,CAACC,MAAW,EAAEC,MAAW,EAAE;AAC1B;AACAC,MAAAA,wBAAe,CAACZ,CAAC,EAAEU,MAAM,EAAEC,MAAM,CAAC,CAAA;AAClCV,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDY,IAAAA,CAAC,EAAEC,aAAI;IACPC,CAAC,CAACC,KAAU,EAAE;AACZ,MAAA,IAAIf,OAAO,EAAE,OAAA;MACbgB,sBAAa,CAACjB,CAAC,CAACI,EAAE,CAACC,QAAQ,EAAEW,KAAK,C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