@casoon/opengrid 0.14.0 → 0.16.0
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/CHANGELOG.md +621 -19
- package/README.md +19 -2
- package/engine/opengrid_wasm_bg.wasm +0 -0
- package/loader.d.ts +451 -24
- package/loader.js +584 -132
- package/package.json +13 -6
- package/pkg/opengrid_web_components.d.ts +94 -23
- package/pkg/opengrid_web_components.js +451 -59
- package/pkg/opengrid_web_components_bg.wasm +0 -0
- package/pkg/opengrid_web_components_bg.wasm.d.ts +15 -6
- package/pkg/snippets/opengrid-web-components-35ed06b453a9b215/inline0.js +8 -0
- package/pkg/snippets/opengrid-web-components-35ed06b453a9b215/inline1.js +58 -0
- package/pkg/snippets/opengrid-web-core-b41714d4e7311909/inline2.js +89 -0
- package/react/index.d.ts +20 -2
- package/react/index.js +32 -6
- package/svelte/Opengrid.svelte +46 -11
- package/svelte/OpengridGrid.svelte +20 -1
- package/svelte/OpengridPivot.svelte +3 -3
- package/svelte/OpengridTable.svelte +1 -1
- package/svelte/index.d.ts +57 -18
- package/svelte/index.js +1 -1
- package/texts/de.d.ts +5 -0
- package/texts/de.js +245 -0
- package/vue/index.d.ts +49 -7
- package/vue/index.js +41 -11
- package/worker.js +6 -3
- package/xlsx/opengrid_xlsx.d.ts +69 -0
- package/xlsx/opengrid_xlsx.js +375 -0
- package/xlsx/opengrid_xlsx_bg.wasm +0 -0
- package/xlsx/opengrid_xlsx_bg.wasm.d.ts +16 -0
- package/pkg/snippets/opengrid-web-components-56667a20e9158a6a/inline0.js +0 -17
- /package/pkg/snippets/{opengrid-web-core-a3505e32fee0c1ed → opengrid-web-core-b41714d4e7311909}/inline0.js +0 -0
- /package/pkg/snippets/{opengrid-web-core-a3505e32fee0c1ed → opengrid-web-core-b41714d4e7311909}/inline1.js +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A workbook being written; what `loader.js` drives.
|
|
6
|
+
*/
|
|
7
|
+
export class XlsxBook {
|
|
8
|
+
free(): void;
|
|
9
|
+
[Symbol.dispose](): void;
|
|
10
|
+
/**
|
|
11
|
+
* The next piece of the result: the answer of the provider, in either form.
|
|
12
|
+
*/
|
|
13
|
+
add(piece: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* The workbook as a file, a `Uint8Array`.
|
|
16
|
+
*/
|
|
17
|
+
finish(): Uint8Array;
|
|
18
|
+
/**
|
|
19
|
+
* Header texts by field name, `{ column: "Band · Column" }` (issue #353),
|
|
20
|
+
* before the first piece. Anything but strings is ignored.
|
|
21
|
+
*/
|
|
22
|
+
headers(headers: any): void;
|
|
23
|
+
/**
|
|
24
|
+
* `sheet` names the one sheet — the source's name; Excel's rules for a
|
|
25
|
+
* sheet name are the writer's, which falls back to `export`.
|
|
26
|
+
*/
|
|
27
|
+
constructor(sheet: string);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
31
|
+
|
|
32
|
+
export interface InitOutput {
|
|
33
|
+
readonly memory: WebAssembly.Memory;
|
|
34
|
+
readonly __wbg_xlsxbook_free: (a: number, b: number) => void;
|
|
35
|
+
readonly xlsxbook_add: (a: number, b: any) => [number, number];
|
|
36
|
+
readonly xlsxbook_finish: (a: number) => [number, number, number, number];
|
|
37
|
+
readonly xlsxbook_headers: (a: number, b: any) => void;
|
|
38
|
+
readonly xlsxbook_new: (a: number, b: number) => [number, number, number];
|
|
39
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
40
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
41
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
42
|
+
readonly __externref_table_alloc: () => number;
|
|
43
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
44
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
45
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
46
|
+
readonly __wbindgen_start: () => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
53
|
+
* a precompiled `WebAssembly.Module`.
|
|
54
|
+
*
|
|
55
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
56
|
+
*
|
|
57
|
+
* @returns {InitOutput}
|
|
58
|
+
*/
|
|
59
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
63
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
64
|
+
*
|
|
65
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
66
|
+
*
|
|
67
|
+
* @returns {Promise<InitOutput>}
|
|
68
|
+
*/
|
|
69
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/* @ts-self-types="./opengrid_xlsx.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A workbook being written; what `loader.js` drives.
|
|
5
|
+
*/
|
|
6
|
+
export class XlsxBook {
|
|
7
|
+
__destroy_into_raw() {
|
|
8
|
+
const ptr = this.__wbg_ptr;
|
|
9
|
+
this.__wbg_ptr = 0;
|
|
10
|
+
XlsxBookFinalization.unregister(this);
|
|
11
|
+
return ptr;
|
|
12
|
+
}
|
|
13
|
+
free() {
|
|
14
|
+
const ptr = this.__destroy_into_raw();
|
|
15
|
+
wasm.__wbg_xlsxbook_free(ptr, 0);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The next piece of the result: the answer of the provider, in either form.
|
|
19
|
+
* @param {any} piece
|
|
20
|
+
*/
|
|
21
|
+
add(piece) {
|
|
22
|
+
const ret = wasm.xlsxbook_add(this.__wbg_ptr, piece);
|
|
23
|
+
if (ret[1]) {
|
|
24
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The workbook as a file, a `Uint8Array`.
|
|
29
|
+
* @returns {Uint8Array}
|
|
30
|
+
*/
|
|
31
|
+
finish() {
|
|
32
|
+
const ret = wasm.xlsxbook_finish(this.__wbg_ptr);
|
|
33
|
+
if (ret[3]) {
|
|
34
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
35
|
+
}
|
|
36
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
37
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
38
|
+
return v1;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Header texts by field name, `{ column: "Band · Column" }` (issue #353),
|
|
42
|
+
* before the first piece. Anything but strings is ignored.
|
|
43
|
+
* @param {any} headers
|
|
44
|
+
*/
|
|
45
|
+
headers(headers) {
|
|
46
|
+
wasm.xlsxbook_headers(this.__wbg_ptr, headers);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `sheet` names the one sheet — the source's name; Excel's rules for a
|
|
50
|
+
* sheet name are the writer's, which falls back to `export`.
|
|
51
|
+
* @param {string} sheet
|
|
52
|
+
*/
|
|
53
|
+
constructor(sheet) {
|
|
54
|
+
const ptr0 = passStringToWasm0(sheet, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
55
|
+
const len0 = WASM_VECTOR_LEN;
|
|
56
|
+
const ret = wasm.xlsxbook_new(ptr0, len0);
|
|
57
|
+
if (ret[2]) {
|
|
58
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
59
|
+
}
|
|
60
|
+
this.__wbg_ptr = ret[0];
|
|
61
|
+
XlsxBookFinalization.register(this, this.__wbg_ptr, this);
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (Symbol.dispose) XlsxBook.prototype[Symbol.dispose] = XlsxBook.prototype.free;
|
|
66
|
+
function __wbg_get_imports() {
|
|
67
|
+
const import0 = {
|
|
68
|
+
__proto__: null,
|
|
69
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
70
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
71
|
+
return ret;
|
|
72
|
+
},
|
|
73
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
74
|
+
const val = arg0;
|
|
75
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
76
|
+
return ret;
|
|
77
|
+
},
|
|
78
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
79
|
+
const obj = arg1;
|
|
80
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
81
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
82
|
+
var len1 = WASM_VECTOR_LEN;
|
|
83
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
84
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
85
|
+
},
|
|
86
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
87
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
88
|
+
},
|
|
89
|
+
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
90
|
+
const ret = Object.entries(arg0);
|
|
91
|
+
return ret;
|
|
92
|
+
},
|
|
93
|
+
__wbg_from_13e323c65fc8f464: function(arg0) {
|
|
94
|
+
const ret = Array.from(arg0);
|
|
95
|
+
return ret;
|
|
96
|
+
},
|
|
97
|
+
__wbg_getRandomValues_cc7f052a444bb2ce: function() { return handleError(function (arg0, arg1) {
|
|
98
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
99
|
+
}, arguments); },
|
|
100
|
+
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
101
|
+
const ret = arg0[arg1 >>> 0];
|
|
102
|
+
return ret;
|
|
103
|
+
},
|
|
104
|
+
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
105
|
+
const ret = arg0[arg1 >>> 0];
|
|
106
|
+
return ret;
|
|
107
|
+
},
|
|
108
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
109
|
+
let result;
|
|
110
|
+
try {
|
|
111
|
+
result = arg0 instanceof ArrayBuffer;
|
|
112
|
+
} catch (_) {
|
|
113
|
+
result = false;
|
|
114
|
+
}
|
|
115
|
+
const ret = result;
|
|
116
|
+
return ret;
|
|
117
|
+
},
|
|
118
|
+
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
119
|
+
let result;
|
|
120
|
+
try {
|
|
121
|
+
result = arg0 instanceof Uint8Array;
|
|
122
|
+
} catch (_) {
|
|
123
|
+
result = false;
|
|
124
|
+
}
|
|
125
|
+
const ret = result;
|
|
126
|
+
return ret;
|
|
127
|
+
},
|
|
128
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
129
|
+
const ret = arg0.length;
|
|
130
|
+
return ret;
|
|
131
|
+
},
|
|
132
|
+
__wbg_length_370319915dc99107: function(arg0) {
|
|
133
|
+
const ret = arg0.length;
|
|
134
|
+
return ret;
|
|
135
|
+
},
|
|
136
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
137
|
+
const ret = new Uint8Array(arg0);
|
|
138
|
+
return ret;
|
|
139
|
+
},
|
|
140
|
+
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
141
|
+
const ret = Date.now();
|
|
142
|
+
return ret;
|
|
143
|
+
},
|
|
144
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
145
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
146
|
+
},
|
|
147
|
+
__wbindgen_init_externref_table: function() {
|
|
148
|
+
const table = wasm.__wbindgen_externrefs;
|
|
149
|
+
const offset = table.grow(4);
|
|
150
|
+
table.set(0, undefined);
|
|
151
|
+
table.set(offset + 0, undefined);
|
|
152
|
+
table.set(offset + 1, null);
|
|
153
|
+
table.set(offset + 2, true);
|
|
154
|
+
table.set(offset + 3, false);
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
return {
|
|
158
|
+
__proto__: null,
|
|
159
|
+
"./opengrid_xlsx_bg.js": import0,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const XlsxBookFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
164
|
+
? { register: () => {}, unregister: () => {} }
|
|
165
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_xlsxbook_free(ptr, 1));
|
|
166
|
+
|
|
167
|
+
function addToExternrefTable0(obj) {
|
|
168
|
+
const idx = wasm.__externref_table_alloc();
|
|
169
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
170
|
+
return idx;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
174
|
+
ptr = ptr >>> 0;
|
|
175
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
let cachedDataViewMemory0 = null;
|
|
179
|
+
function getDataViewMemory0() {
|
|
180
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
181
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
182
|
+
}
|
|
183
|
+
return cachedDataViewMemory0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function getStringFromWasm0(ptr, len) {
|
|
187
|
+
return decodeText(ptr >>> 0, len);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
let cachedUint8ArrayMemory0 = null;
|
|
191
|
+
function getUint8ArrayMemory0() {
|
|
192
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
193
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
194
|
+
}
|
|
195
|
+
return cachedUint8ArrayMemory0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function handleError(f, args) {
|
|
199
|
+
try {
|
|
200
|
+
return f.apply(this, args);
|
|
201
|
+
} catch (e) {
|
|
202
|
+
const idx = addToExternrefTable0(e);
|
|
203
|
+
wasm.__wbindgen_exn_store(idx);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function isLikeNone(x) {
|
|
208
|
+
return x === undefined || x === null;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
212
|
+
if (realloc === undefined) {
|
|
213
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
214
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
215
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
216
|
+
WASM_VECTOR_LEN = buf.length;
|
|
217
|
+
return ptr;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
let len = arg.length;
|
|
221
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
222
|
+
|
|
223
|
+
const mem = getUint8ArrayMemory0();
|
|
224
|
+
|
|
225
|
+
let offset = 0;
|
|
226
|
+
|
|
227
|
+
for (; offset < len; offset++) {
|
|
228
|
+
const code = arg.charCodeAt(offset);
|
|
229
|
+
if (code > 0x7F) break;
|
|
230
|
+
mem[ptr + offset] = code;
|
|
231
|
+
}
|
|
232
|
+
if (offset !== len) {
|
|
233
|
+
if (offset !== 0) {
|
|
234
|
+
arg = arg.slice(offset);
|
|
235
|
+
}
|
|
236
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
237
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
238
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
239
|
+
|
|
240
|
+
offset += ret.written;
|
|
241
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
WASM_VECTOR_LEN = offset;
|
|
245
|
+
return ptr;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function takeFromExternrefTable0(idx) {
|
|
249
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
250
|
+
wasm.__externref_table_dealloc(idx);
|
|
251
|
+
return value;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
255
|
+
cachedTextDecoder.decode();
|
|
256
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
257
|
+
let numBytesDecoded = 0;
|
|
258
|
+
function decodeText(ptr, len) {
|
|
259
|
+
numBytesDecoded += len;
|
|
260
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
261
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
262
|
+
cachedTextDecoder.decode();
|
|
263
|
+
numBytesDecoded = len;
|
|
264
|
+
}
|
|
265
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const cachedTextEncoder = new TextEncoder();
|
|
269
|
+
|
|
270
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
271
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
272
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
273
|
+
view.set(buf);
|
|
274
|
+
return {
|
|
275
|
+
read: arg.length,
|
|
276
|
+
written: buf.length
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
let WASM_VECTOR_LEN = 0;
|
|
282
|
+
|
|
283
|
+
let wasmModule, wasmInstance, wasm;
|
|
284
|
+
function __wbg_finalize_init(instance, module) {
|
|
285
|
+
wasmInstance = instance;
|
|
286
|
+
wasm = instance.exports;
|
|
287
|
+
wasmModule = module;
|
|
288
|
+
cachedDataViewMemory0 = null;
|
|
289
|
+
cachedUint8ArrayMemory0 = null;
|
|
290
|
+
wasm.__wbindgen_start();
|
|
291
|
+
return wasm;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
async function __wbg_load(module, imports) {
|
|
295
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
296
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
297
|
+
try {
|
|
298
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
299
|
+
} catch (e) {
|
|
300
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
301
|
+
|
|
302
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
303
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
304
|
+
|
|
305
|
+
} else { throw e; }
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const bytes = await module.arrayBuffer();
|
|
310
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
311
|
+
} else {
|
|
312
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
313
|
+
|
|
314
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
315
|
+
return { instance, module };
|
|
316
|
+
} else {
|
|
317
|
+
return instance;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function expectedResponseType(type) {
|
|
322
|
+
switch (type) {
|
|
323
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
324
|
+
}
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function initSync(module) {
|
|
330
|
+
if (wasm !== undefined) return wasm;
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
if (module !== undefined) {
|
|
334
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
335
|
+
({module} = module)
|
|
336
|
+
} else {
|
|
337
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const imports = __wbg_get_imports();
|
|
342
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
343
|
+
module = new WebAssembly.Module(module);
|
|
344
|
+
}
|
|
345
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
346
|
+
return __wbg_finalize_init(instance, module);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
async function __wbg_init(module_or_path) {
|
|
350
|
+
if (wasm !== undefined) return wasm;
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
if (module_or_path !== undefined) {
|
|
354
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
355
|
+
({module_or_path} = module_or_path)
|
|
356
|
+
} else {
|
|
357
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (module_or_path === undefined) {
|
|
362
|
+
module_or_path = new URL('opengrid_xlsx_bg.wasm', import.meta.url);
|
|
363
|
+
}
|
|
364
|
+
const imports = __wbg_get_imports();
|
|
365
|
+
|
|
366
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
367
|
+
module_or_path = fetch(module_or_path);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
371
|
+
|
|
372
|
+
return __wbg_finalize_init(instance, module);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_xlsxbook_free: (a: number, b: number) => void;
|
|
5
|
+
export const xlsxbook_add: (a: number, b: any) => [number, number];
|
|
6
|
+
export const xlsxbook_finish: (a: number) => [number, number, number, number];
|
|
7
|
+
export const xlsxbook_headers: (a: number, b: any) => void;
|
|
8
|
+
export const xlsxbook_new: (a: number, b: number) => [number, number, number];
|
|
9
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
10
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
11
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
|
12
|
+
export const __externref_table_alloc: () => number;
|
|
13
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
14
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
15
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
16
|
+
export const __wbindgen_start: () => void;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export function __opengrid_intl_formatter(kind, locale, options) {
|
|
3
|
-
const loc = locale || undefined;
|
|
4
|
-
const format = kind === 'date'
|
|
5
|
-
? new Intl.DateTimeFormat(loc, options)
|
|
6
|
-
: new Intl.NumberFormat(loc, options);
|
|
7
|
-
return (text, value) => {
|
|
8
|
-
if (value === null || value === undefined) return '';
|
|
9
|
-
if (kind === 'date') {
|
|
10
|
-
const at = Date.parse(typeof value === 'string' && value.length === 10
|
|
11
|
-
? value + 'T00:00:00Z' : value);
|
|
12
|
-
return Number.isNaN(at) ? text : format.format(new Date(at));
|
|
13
|
-
}
|
|
14
|
-
const number = Number(value);
|
|
15
|
-
return Number.isFinite(number) ? format.format(number) : text;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
File without changes
|
|
File without changes
|