@lavalogic/scoria 0.0.13 → 0.0.15
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/dist/Components/Button.svelte +0 -3
- package/dist/Components/Contexts/ContextMenuOption.svelte +0 -3
- package/dist/Components/DatePicker.svelte +1 -6
- package/dist/Components/DimensionInput.svelte +5 -6
- package/dist/Components/DimensionInput.svelte.d.ts +4 -4
- package/dist/Components/FileUpload.svelte +4 -2
- package/dist/Components/GridInput.svelte +3 -3
- package/dist/Components/MultiSelect.svelte +0 -4
- package/dist/Components/ProgressBubble.svelte +1 -2
- package/dist/Components/Table/Body/QuickSearchCell.svelte +0 -9
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +1 -5
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +1 -2
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +6 -7
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +2 -5
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +0 -3
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +8 -6
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +12 -19
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +2 -5
- package/dist/Components/Table/Body/Rows/TableRow.svelte +3 -17
- package/dist/Components/Table/Headers/TableHead.svelte +1 -5
- package/dist/Components/Table/Misc/FilterInput.svelte +10 -27
- package/dist/Components/Table/Table.svelte +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.js +6 -5
- package/dist/Components/Table/Types/Context/TableContext.svelte.js +11 -30
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.d.ts +0 -1
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.js +3 -16
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.js +2 -5
- package/dist/Components/Table/Types/Filtering/CustomRemoteFilters.d.ts +1 -2
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.js +1 -5
- package/dist/Components/Touch/DateModal.svelte +0 -5
- package/dist/Components/Touch/UtilityButton.svelte +12 -7
- package/dist/Components/Touch/UtilityButton.svelte.d.ts +1 -1
- package/dist/Contexts/UntypedInputContext.svelte.d.ts +2 -1
- package/dist/Contexts/UntypedInputContext.svelte.js +1 -17
- package/dist/Helpers/Helpers.svelte.d.ts +21 -95
- package/dist/Helpers/Helpers.svelte.js +54 -395
- package/dist/Types/Examples/ExampleItem.d.ts +3 -3
- package/dist/Types/Internal/Misc.d.ts +12 -267
- package/dist/Types/Internal/Misc.js +1 -129
- package/dist/index.d.ts +4 -76
- package/dist/index.js +4 -76
- package/package.json +16 -16
- package/dist/Components/Table/Types/DataRepository/RemoteTableDataRepository.svelte.d.ts +0 -74
- package/dist/Components/Table/Types/DataRepository/RemoteTableDataRepository.svelte.js +0 -521
- package/dist/Components/Table/Types/Filtering/CustomProxyFilter.d.ts +0 -10
- package/dist/Components/Table/Types/Filtering/CustomProxyFilter.js +0 -1
- package/dist/Types/Internal/ApplicationIdentifier.d.ts +0 -39
- package/dist/Types/Internal/ApplicationIdentifier.js +0 -2080
- package/dist/Types/Internal/FloService.d.ts +0 -7
- package/dist/Types/Internal/FloService.js +0 -30
- package/dist/Types/Requests/IFillablePodLineDateRequestBody.d.ts +0 -13
- package/dist/Types/Requests/IFillablePodLineDateRequestBody.js +0 -10
- package/dist/Types/Requests/IRequiredPodLineDateRequestBody.d.ts +0 -14
- package/dist/Types/Requests/IRequiredPodLineDateRequestBody.js +0 -8
- package/dist/Types/Requests/IValidatedPodLineDateRequestBody.d.ts +0 -16
- package/dist/Types/Requests/IValidatedPodLineDateRequestBody.js +0 -10
- package/dist/Types/Responses/AddressType.d.ts +0 -3
- package/dist/Types/Responses/AddressType.js +0 -2
- package/dist/Types/Responses/IAddress.d.ts +0 -39
- package/dist/Types/Responses/IAddress.js +0 -30
- package/dist/Types/Responses/IBaseAddress.d.ts +0 -17
- package/dist/Types/Responses/IBaseAddress.js +0 -15
- package/dist/Types/Responses/ICountry.d.ts +0 -16
- package/dist/Types/Responses/ICountry.js +0 -1
- package/dist/Types/Responses/IDBEntry.d.ts +0 -13
- package/dist/Types/Responses/IDBEntry.js +0 -12
- package/dist/Types/Responses/IErrorResponse.d.ts +0 -10
- package/dist/Types/Responses/IErrorResponse.js +0 -1
- package/dist/Types/Responses/ILabelPrinter.d.ts +0 -4
- package/dist/Types/Responses/ILabelPrinter.js +0 -1
- package/dist/Types/Responses/ILaserPrinter.d.ts +0 -4
- package/dist/Types/Responses/ILaserPrinter.js +0 -1
- package/dist/Types/Responses/ILoginResponse.d.ts +0 -8
- package/dist/Types/Responses/ILoginResponse.js +0 -1
- package/dist/Types/Responses/IPaginatedPayload.d.ts +0 -5
- package/dist/Types/Responses/IPaginatedPayload.js +0 -1
- package/dist/Types/Responses/IPaginatedResponse.d.ts +0 -5
- package/dist/Types/Responses/IPaginatedResponse.js +0 -1
- package/dist/Types/Responses/IPagination.d.ts +0 -9
- package/dist/Types/Responses/IPagination.js +0 -1
- package/dist/Types/Responses/IPayload.d.ts +0 -3
- package/dist/Types/Responses/IPayload.js +0 -1
- package/dist/Types/Responses/IPrinter.d.ts +0 -11
- package/dist/Types/Responses/IPrinter.js +0 -1
- package/dist/Types/Responses/IProcessTypeSelectionMethodOutboundType.d.ts +0 -18
- package/dist/Types/Responses/IProcessTypeSelectionMethodOutboundType.js +0 -12
- package/dist/Types/Responses/IProcessTypeSelectionMethodWarehouseCustomer.d.ts +0 -20
- package/dist/Types/Responses/IProcessTypeSelectionMethodWarehouseCustomer.js +0 -14
- package/dist/Types/Responses/IProcessTypeSelectionMethodWarehouseCustomerType.d.ts +0 -20
- package/dist/Types/Responses/IProcessTypeSelectionMethodWarehouseCustomerType.js +0 -14
- package/dist/Types/Responses/IProductCategory.d.ts +0 -19
- package/dist/Types/Responses/IProductCategory.js +0 -13
- package/dist/Types/Responses/IProductCategoryDetails.d.ts +0 -33
- package/dist/Types/Responses/IProductCategoryDetails.js +0 -13
- package/dist/Types/Responses/IProductIgnoreOnAllocationOutboundType.d.ts +0 -17
- package/dist/Types/Responses/IProductIgnoreOnAllocationOutboundType.js +0 -11
- package/dist/Types/Responses/IProductLocation.d.ts +0 -23
- package/dist/Types/Responses/IProductLocation.js +0 -17
- package/dist/Types/Responses/IResponse.d.ts +0 -8
- package/dist/Types/Responses/IResponse.js +0 -1
- package/dist/Types/Responses/IStockSortationMethodCustomer.d.ts +0 -18
- package/dist/Types/Responses/IStockSortationMethodCustomer.js +0 -12
- package/dist/Types/Responses/Pods/IAttributeTypeWithAI.d.ts +0 -8
- package/dist/Types/Responses/Pods/IAttributeTypeWithAI.js +0 -1
- package/dist/Types/Responses/Pods/IBatchType.d.ts +0 -5
- package/dist/Types/Responses/Pods/IBatchType.js +0 -1
- package/dist/Types/Responses/Pods/IDateType.d.ts +0 -6
- package/dist/Types/Responses/Pods/IDateType.js +0 -1
- package/dist/Types/Responses/Pods/IFillablePodLineAttribute.d.ts +0 -10
- package/dist/Types/Responses/Pods/IFillablePodLineAttribute.js +0 -9
- package/dist/Types/Responses/Pods/IFillablePodLineBatch.d.ts +0 -18
- package/dist/Types/Responses/Pods/IFillablePodLineBatch.js +0 -12
- package/dist/Types/Responses/Pods/IFillablePodLineDate.d.ts +0 -19
- package/dist/Types/Responses/Pods/IFillablePodLineDate.js +0 -13
- package/dist/Types/Responses/Pods/IFillablePodLinePurchaseOrder.d.ts +0 -18
- package/dist/Types/Responses/Pods/IFillablePodLinePurchaseOrder.js +0 -12
- package/dist/Types/Responses/Pods/IFillablePodLineSerial.d.ts +0 -18
- package/dist/Types/Responses/Pods/IFillablePodLineSerial.js +0 -12
- package/dist/Types/Responses/Pods/IFillablePodLineTag.d.ts +0 -18
- package/dist/Types/Responses/Pods/IFillablePodLineTag.js +0 -12
- package/dist/Types/Responses/Pods/IPurchaseOrderType.d.ts +0 -5
- package/dist/Types/Responses/Pods/IPurchaseOrderType.js +0 -1
- package/dist/Types/Responses/Pods/IRequiredOrValidatedAttribute.d.ts +0 -7
- package/dist/Types/Responses/Pods/IRequiredOrValidatedAttribute.js +0 -7
- package/dist/Types/Responses/Pods/IRequiredPodLineBatch.d.ts +0 -18
- package/dist/Types/Responses/Pods/IRequiredPodLineBatch.js +0 -8
- package/dist/Types/Responses/Pods/IRequiredPodLineDate.d.ts +0 -19
- package/dist/Types/Responses/Pods/IRequiredPodLineDate.js +0 -8
- package/dist/Types/Responses/Pods/IRequiredPodLinePurchaseOrder.d.ts +0 -19
- package/dist/Types/Responses/Pods/IRequiredPodLinePurchaseOrder.js +0 -8
- package/dist/Types/Responses/Pods/IRequiredPodLineSerial.d.ts +0 -19
- package/dist/Types/Responses/Pods/IRequiredPodLineSerial.js +0 -8
- package/dist/Types/Responses/Pods/IRequiredPodLineTag.d.ts +0 -19
- package/dist/Types/Responses/Pods/IRequiredPodLineTag.js +0 -8
- package/dist/Types/Responses/Pods/ISerialType.d.ts +0 -6
- package/dist/Types/Responses/Pods/ISerialType.js +0 -1
- package/dist/Types/Responses/Pods/ITagType.d.ts +0 -6
- package/dist/Types/Responses/Pods/ITagType.js +0 -1
- package/dist/Types/Responses/Pods/IValidatedPodLineAttribute.d.ts +0 -13
- package/dist/Types/Responses/Pods/IValidatedPodLineAttribute.js +0 -10
- package/dist/Types/Responses/Pods/IValidatedPodLineBatch.d.ts +0 -19
- package/dist/Types/Responses/Pods/IValidatedPodLineBatch.js +0 -10
- package/dist/Types/Responses/Pods/IValidatedPodLineDate.d.ts +0 -21
- package/dist/Types/Responses/Pods/IValidatedPodLineDate.js +0 -10
- package/dist/Types/Responses/Pods/IValidatedPodLinePurchaseOrder.d.ts +0 -20
- package/dist/Types/Responses/Pods/IValidatedPodLinePurchaseOrder.js +0 -10
- package/dist/Types/Responses/Pods/IValidatedPodLineSerial.d.ts +0 -20
- package/dist/Types/Responses/Pods/IValidatedPodLineSerial.js +0 -10
- package/dist/Types/Responses/Pods/IValidatedPodLineTag.d.ts +0 -20
- package/dist/Types/Responses/Pods/IValidatedPodLineTag.js +0 -10
- package/dist/Types/Responses/Products/IAttributeRule.d.ts +0 -34
- package/dist/Types/Responses/Products/IAttributeRule.js +0 -28
- package/dist/Types/Responses/Products/IBarcode.d.ts +0 -18
- package/dist/Types/Responses/Products/IBarcode.js +0 -12
- package/dist/Types/Responses/Products/IBatchRule.d.ts +0 -36
- package/dist/Types/Responses/Products/IBatchRule.js +0 -9
- package/dist/Types/Responses/Products/ICustomerRule.d.ts +0 -23
- package/dist/Types/Responses/Products/ICustomerRule.js +0 -17
- package/dist/Types/Responses/Products/IDateRule.d.ts +0 -36
- package/dist/Types/Responses/Products/IDateRule.js +0 -9
- package/dist/Types/Responses/Products/IPrice.d.ts +0 -19
- package/dist/Types/Responses/Products/IPrice.js +0 -12
- package/dist/Types/Responses/Products/IProduct.d.ts +0 -436
- package/dist/Types/Responses/Products/IProduct.js +0 -77
- package/dist/Types/Responses/Products/IProductKit.d.ts +0 -24
- package/dist/Types/Responses/Products/IProductKit.js +0 -18
- package/dist/Types/Responses/Products/IProductKitMatrix.d.ts +0 -13
- package/dist/Types/Responses/Products/IProductKitMatrix.js +0 -1
- package/dist/Types/Responses/Products/IProductSupplier.d.ts +0 -18
- package/dist/Types/Responses/Products/IProductSupplier.js +0 -12
- package/dist/Types/Responses/Products/IProductTag.d.ts +0 -33
- package/dist/Types/Responses/Products/IProductTag.js +0 -14
- package/dist/Types/Responses/Products/IProductTagType.d.ts +0 -18
- package/dist/Types/Responses/Products/IProductTagType.js +0 -12
- package/dist/Types/Responses/Products/IProductUnitOfMeasure.d.ts +0 -97
- package/dist/Types/Responses/Products/IProductUnitOfMeasure.js +0 -35
- package/dist/Types/Responses/Products/IProductUnitOfMeasurePrice.d.ts +0 -36
- package/dist/Types/Responses/Products/IProductUnitOfMeasurePrice.js +0 -17
- package/dist/Types/Responses/Products/IPurchaseOrderRule.d.ts +0 -36
- package/dist/Types/Responses/Products/IPurchaseOrderRule.js +0 -9
- package/dist/Types/Responses/Products/ISerialRule.d.ts +0 -36
- package/dist/Types/Responses/Products/ISerialRule.js +0 -9
- package/dist/Types/Responses/Products/ITagRule.d.ts +0 -36
- package/dist/Types/Responses/Products/ITagRule.js +0 -9
- package/dist/Types/Responses/Products/IUnitOfMeasure.d.ts +0 -18
- package/dist/Types/Responses/Products/IUnitOfMeasure.js +0 -12
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
3
|
<script module lang="ts">
|
|
4
|
-
import { dev } from '$app/environment';
|
|
5
4
|
import Button from '../../Button.svelte';
|
|
6
5
|
import MultiSelect from '../../MultiSelect.svelte';
|
|
7
6
|
import NumberInput from '../../NumberInput.svelte';
|
|
@@ -167,11 +166,7 @@
|
|
|
167
166
|
value = (x ?? null) as SelectOption<string | number> | null;
|
|
168
167
|
}
|
|
169
168
|
} catch (e) {
|
|
170
|
-
|
|
171
|
-
console.log(e);
|
|
172
|
-
// eslint-disable-next-line no-debugger
|
|
173
|
-
debugger;
|
|
174
|
-
}
|
|
169
|
+
console.warn(e);
|
|
175
170
|
}
|
|
176
171
|
});
|
|
177
172
|
} else if (def instanceof SelectDef) {
|
|
@@ -185,11 +180,7 @@
|
|
|
185
180
|
});
|
|
186
181
|
selectedOptions = x;
|
|
187
182
|
} catch (e) {
|
|
188
|
-
|
|
189
|
-
console.log(e);
|
|
190
|
-
// eslint-disable-next-line no-debugger
|
|
191
|
-
debugger;
|
|
192
|
-
}
|
|
183
|
+
console.warn(e);
|
|
193
184
|
}
|
|
194
185
|
});
|
|
195
186
|
} else if (isNumeric) {
|
|
@@ -221,11 +212,8 @@
|
|
|
221
212
|
const gotValue = getFilteringStateValue();
|
|
222
213
|
if (gotValue == null || typeof gotValue == 'string' || typeof gotValue == 'number') {
|
|
223
214
|
value = gotValue;
|
|
224
|
-
} else if (dev) {
|
|
225
|
-
console.log(gotValue);
|
|
226
|
-
// eslint-disable-next-line no-debugger
|
|
227
|
-
debugger;
|
|
228
215
|
} else {
|
|
216
|
+
console.log('unknown value type:', gotValue);
|
|
229
217
|
value = gotValue as string; // HACK attempt to keep production running
|
|
230
218
|
}
|
|
231
219
|
}
|
|
@@ -248,11 +236,8 @@
|
|
|
248
236
|
const gotValue = filterOption.value;
|
|
249
237
|
if (gotValue == null || typeof gotValue == 'string' || typeof gotValue == 'number') {
|
|
250
238
|
value = gotValue;
|
|
251
|
-
} else if (dev) {
|
|
252
|
-
console.log(gotValue);
|
|
253
|
-
// eslint-disable-next-line no-debugger
|
|
254
|
-
debugger;
|
|
255
239
|
} else {
|
|
240
|
+
console.warn('unknown value type:', gotValue);
|
|
256
241
|
value = gotValue as string; // HACK attempt to keep production running
|
|
257
242
|
}
|
|
258
243
|
}
|
|
@@ -336,8 +321,6 @@
|
|
|
336
321
|
}}
|
|
337
322
|
/>
|
|
338
323
|
{/if}
|
|
339
|
-
{:else if dev}
|
|
340
|
-
DEBUG: INVALID DATE FILTER VALUES
|
|
341
324
|
{/if}
|
|
342
325
|
{:else if def instanceof SelectDef && !isRemoteSelect}
|
|
343
326
|
<div class="maxwidth">
|
|
@@ -388,8 +371,8 @@
|
|
|
388
371
|
tableContext.__queryValues.set(label ?? _uuid, newValue);
|
|
389
372
|
}}
|
|
390
373
|
/>
|
|
391
|
-
{:else
|
|
392
|
-
|
|
374
|
+
{:else}
|
|
375
|
+
{@debug value}
|
|
393
376
|
{/if}
|
|
394
377
|
{:else}
|
|
395
378
|
<MultiSelect
|
|
@@ -517,8 +500,8 @@
|
|
|
517
500
|
e.stopPropagation();
|
|
518
501
|
}}
|
|
519
502
|
/>
|
|
520
|
-
{:else
|
|
521
|
-
|
|
503
|
+
{:else}
|
|
504
|
+
{@debug value}
|
|
522
505
|
{/if}
|
|
523
506
|
</div>
|
|
524
507
|
{:else}
|
|
@@ -554,8 +537,8 @@
|
|
|
554
537
|
e.stopPropagation();
|
|
555
538
|
}}
|
|
556
539
|
/>
|
|
557
|
-
{:else
|
|
558
|
-
|
|
540
|
+
{:else}
|
|
541
|
+
{@debug value}
|
|
559
542
|
{/if}
|
|
560
543
|
</div>
|
|
561
544
|
{/if}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
3
|
<script lang="ts" module>
|
|
4
|
-
import { browser } from '$app/environment';
|
|
5
4
|
import {
|
|
6
5
|
ContextMenuContext,
|
|
7
6
|
type IContextMenuOption
|
|
@@ -240,7 +239,7 @@
|
|
|
240
239
|
const idToFocusTo = `#${tableContext.tableName}-cell-${fs.row}-${fs.id}`;
|
|
241
240
|
|
|
242
241
|
tick().then(() => {
|
|
243
|
-
if (idToFocusTo
|
|
242
|
+
if (idToFocusTo) {
|
|
244
243
|
(document.querySelector(idToFocusTo) as HTMLTableCellElement | undefined)?.focus();
|
|
245
244
|
}
|
|
246
245
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ColumnType } from '../ColumnType.js';
|
|
2
|
-
import { dev } from '$app/environment';
|
|
3
2
|
export class ColumnDef {
|
|
4
3
|
constructor(props) {
|
|
5
4
|
this.id = $derived(props.id);
|
|
@@ -53,8 +52,9 @@ export class ColumnDef {
|
|
|
53
52
|
return this._isResizing;
|
|
54
53
|
}
|
|
55
54
|
set isResizing(v) {
|
|
56
|
-
if (v && !this.resizable
|
|
57
|
-
|
|
55
|
+
if (v && !this.resizable) {
|
|
56
|
+
console.warn(`Column ${this.id} is not resizable`);
|
|
57
|
+
return;
|
|
58
58
|
}
|
|
59
59
|
this._isResizing = v;
|
|
60
60
|
}
|
|
@@ -63,8 +63,9 @@ export class ColumnDef {
|
|
|
63
63
|
return this._visible;
|
|
64
64
|
}
|
|
65
65
|
set visible(v) {
|
|
66
|
-
if (v && !this.enableSorting
|
|
67
|
-
|
|
66
|
+
if (v && !this.enableSorting) {
|
|
67
|
+
console.warn(`Column ${this.id} is not sortable`);
|
|
68
|
+
return;
|
|
68
69
|
}
|
|
69
70
|
this._isResizing = v;
|
|
70
71
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser, dev } from '$app/environment';
|
|
2
1
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
3
2
|
import { ColumnType } from '../Columns/ColumnType.js';
|
|
4
3
|
import { ToolbarPosition } from '../Toolbar/ToolbarPosition.js';
|
|
@@ -36,9 +35,7 @@ export class TableContext {
|
|
|
36
35
|
}
|
|
37
36
|
// #region constructor
|
|
38
37
|
constructor(INTERNAL_ONLY, defaultColumnDefs, tableName, dataRepo, allowCopy, enableResize, allowColumnReordering, allowQuickFiltering, allowAdvancedFiltering, toolbarPosition, displayFooter, selectionExtractor, getUserId, _onEditCell = async () => {
|
|
39
|
-
|
|
40
|
-
throw new Error('Cannot edit immutable table');
|
|
41
|
-
}
|
|
38
|
+
console.warn('Cannot edit immutable table');
|
|
42
39
|
}) {
|
|
43
40
|
this.defaultColumnDefs = defaultColumnDefs;
|
|
44
41
|
this.tableName = tableName;
|
|
@@ -66,12 +63,10 @@ export class TableContext {
|
|
|
66
63
|
// this.tableOptions.manualSorting = dataRepo.manualSorting;
|
|
67
64
|
}
|
|
68
65
|
this.userId = $derived(getUserId());
|
|
69
|
-
if (
|
|
66
|
+
if (localStorage) {
|
|
70
67
|
this._getUserDefaults();
|
|
71
68
|
const removeInvalidPresets = () => {
|
|
72
|
-
|
|
73
|
-
console.warn('invalid presets');
|
|
74
|
-
}
|
|
69
|
+
console.warn('invalid presets');
|
|
75
70
|
localStorage.removeItem(`${this.userId}-${tableName}-presets`);
|
|
76
71
|
localStorage.removeItem(`${this.userId}-${tableName}-selected-preset-name`);
|
|
77
72
|
const visibilityState = {};
|
|
@@ -877,9 +872,6 @@ export class TableContext {
|
|
|
877
872
|
case 'Enter':
|
|
878
873
|
case 'F2':
|
|
879
874
|
if (!e.target?.classList?.contains('editable')) {
|
|
880
|
-
if (dev) {
|
|
881
|
-
console.log('not editable. cancelling...');
|
|
882
|
-
}
|
|
883
875
|
break;
|
|
884
876
|
}
|
|
885
877
|
e.preventDefault();
|
|
@@ -1014,7 +1006,7 @@ export class TableContext {
|
|
|
1014
1006
|
: `#${this.tableName}-cell-quicksearch-${fs.id}`);
|
|
1015
1007
|
this.showQuickFiltering = !this.showQuickFiltering;
|
|
1016
1008
|
tick().then(() => {
|
|
1017
|
-
if (idToFocusTo
|
|
1009
|
+
if (idToFocusTo) {
|
|
1018
1010
|
document.querySelector(idToFocusTo)?.focus();
|
|
1019
1011
|
}
|
|
1020
1012
|
});
|
|
@@ -1052,7 +1044,7 @@ export class TableContext {
|
|
|
1052
1044
|
lastPage = $derived(this.dataRepo?.lastPage ?? 0);
|
|
1053
1045
|
measureHeaderWidth = (columnDef) => {
|
|
1054
1046
|
const label = columnDef.header;
|
|
1055
|
-
if (typeof label === 'string' &&
|
|
1047
|
+
if (typeof label === 'string' && localStorage) {
|
|
1056
1048
|
const extraWidth = columnDef.enableSorting ? SORTING_ICON_WIDTH : 0;
|
|
1057
1049
|
const canvasContext = getCanvasContext();
|
|
1058
1050
|
if (canvasContext) {
|
|
@@ -1072,7 +1064,7 @@ export class TableContext {
|
|
|
1072
1064
|
return 0;
|
|
1073
1065
|
};
|
|
1074
1066
|
autoResize = async (columnDef) => {
|
|
1075
|
-
if (!
|
|
1067
|
+
if (!localStorage) {
|
|
1076
1068
|
return;
|
|
1077
1069
|
}
|
|
1078
1070
|
const ctx = getCanvasContext();
|
|
@@ -1114,9 +1106,7 @@ export class TableContext {
|
|
|
1114
1106
|
});
|
|
1115
1107
|
const originalIndex = newDefs.findIndex((it) => it.id === this.dragTarget?.id);
|
|
1116
1108
|
if (originalIndex === -1) {
|
|
1117
|
-
|
|
1118
|
-
alert("couldn't find target's original index");
|
|
1119
|
-
}
|
|
1109
|
+
console.warn("couldn't find target's original index");
|
|
1120
1110
|
return newDefs;
|
|
1121
1111
|
}
|
|
1122
1112
|
newDefs.splice(originalIndex, 1);
|
|
@@ -1532,8 +1522,8 @@ export class TableContext {
|
|
|
1532
1522
|
setSelectedPreset = (preset) => {
|
|
1533
1523
|
this.columnDefs = preset.columnDefs;
|
|
1534
1524
|
if (preset.sortingState) {
|
|
1535
|
-
if (!this.paginationRepo?.updateSorting
|
|
1536
|
-
|
|
1525
|
+
if (!this.paginationRepo?.updateSorting) {
|
|
1526
|
+
console.warn('no sorting state found');
|
|
1537
1527
|
}
|
|
1538
1528
|
this.paginationRepo?.updateSorting?.(preset.sortingState);
|
|
1539
1529
|
}
|
|
@@ -1612,9 +1602,7 @@ export class TableContext {
|
|
|
1612
1602
|
return;
|
|
1613
1603
|
}
|
|
1614
1604
|
if (!this.focusEnd) {
|
|
1615
|
-
|
|
1616
|
-
console.warn('no current found');
|
|
1617
|
-
}
|
|
1605
|
+
console.warn('no focusEnd found');
|
|
1618
1606
|
return;
|
|
1619
1607
|
}
|
|
1620
1608
|
const rows = this.paginationRowModel.rows;
|
|
@@ -1626,9 +1614,7 @@ export class TableContext {
|
|
|
1626
1614
|
}
|
|
1627
1615
|
_moveFocusRow(offset) {
|
|
1628
1616
|
if (!this.focusStart) {
|
|
1629
|
-
|
|
1630
|
-
console.warn('no this.focusStart found');
|
|
1631
|
-
}
|
|
1617
|
+
console.warn('no focusStart found');
|
|
1632
1618
|
return null;
|
|
1633
1619
|
}
|
|
1634
1620
|
const newEndRowIndex = (() => {
|
|
@@ -1736,11 +1722,6 @@ export class TableContext {
|
|
|
1736
1722
|
const startRowIndex = model?.rows.findIndex((row) => row.index === startRowIndexId) ?? -1;
|
|
1737
1723
|
const endRowIndex = model?.rows.findIndex((row) => row.index === endRowIndexId) ?? -1;
|
|
1738
1724
|
if (!this.dataRepo || startRowIndex == -1 || endRowIndex == -1) {
|
|
1739
|
-
if (dev) {
|
|
1740
|
-
console.warn('was missing one of the two indices');
|
|
1741
|
-
// eslint-disable-next-line no-debugger
|
|
1742
|
-
debugger;
|
|
1743
|
-
}
|
|
1744
1725
|
throw new Error(`copy was missing one of the two indices. First: ${startRowIndex}, second: ${endRowIndex}`);
|
|
1745
1726
|
}
|
|
1746
1727
|
const minRowIndex = Math.min(startRowIndex, endRowIndex);
|
|
@@ -15,7 +15,6 @@ export declare class LocalTableDataRepository<T extends object> extends TableDat
|
|
|
15
15
|
private _isLoading;
|
|
16
16
|
get isLoading(): boolean;
|
|
17
17
|
set isLoading(v: boolean);
|
|
18
|
-
readonly onPaginationChange: (...args: unknown[]) => void;
|
|
19
18
|
private _dataRef;
|
|
20
19
|
get data(): T[];
|
|
21
20
|
private _lastPage;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { dev } from '$app/environment';
|
|
2
1
|
import { FilterType } from '../Filtering/FilterType.js';
|
|
3
2
|
import { NumberDateFilterMode } from '../Filtering/NumberDateFilterMode.js';
|
|
4
3
|
import { StringFilterMode } from '../Filtering/StringFilterMode.js';
|
|
@@ -22,13 +21,6 @@ export class LocalTableDataRepository extends TableDataRepository {
|
|
|
22
21
|
set isLoading(v) {
|
|
23
22
|
this._isLoading = v;
|
|
24
23
|
}
|
|
25
|
-
onPaginationChange = (...args) => {
|
|
26
|
-
if (dev) {
|
|
27
|
-
// eslint-disable-next-line no-debugger
|
|
28
|
-
debugger;
|
|
29
|
-
console.log(args);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
24
|
_dataRef;
|
|
33
25
|
get data() {
|
|
34
26
|
return this._dataRef.value;
|
|
@@ -113,9 +105,6 @@ export class LocalTableDataRepository extends TableDataRepository {
|
|
|
113
105
|
return;
|
|
114
106
|
}
|
|
115
107
|
const lastIndex = Math.ceil(this._dataRef.value.length / size) - 1;
|
|
116
|
-
if (dev) {
|
|
117
|
-
console.log(`changing page size. Page size is now ${size} and the last page index is ${lastIndex}`);
|
|
118
|
-
}
|
|
119
108
|
this.paginationState = {
|
|
120
109
|
pageSize: size,
|
|
121
110
|
pageIndex: Math.max(0, Math.min(this.paginationState.pageIndex, lastIndex))
|
|
@@ -166,9 +155,7 @@ export class LocalTableDataRepository extends TableDataRepository {
|
|
|
166
155
|
return columnValue <= dateToTimestamp;
|
|
167
156
|
}
|
|
168
157
|
else {
|
|
169
|
-
|
|
170
|
-
alert('no valid dateFrom or dateTo exist in filter');
|
|
171
|
-
}
|
|
158
|
+
console.warn('no valid dateFrom or dateTo exist in filter');
|
|
172
159
|
//should never happen
|
|
173
160
|
}
|
|
174
161
|
return true;
|
|
@@ -302,8 +289,8 @@ export class LocalTableDataRepository extends TableDataRepository {
|
|
|
302
289
|
if (filterType === StringFilterMode.StartsWith) {
|
|
303
290
|
return columnValue.startsWith(filterValue);
|
|
304
291
|
}
|
|
305
|
-
if (
|
|
306
|
-
|
|
292
|
+
if (filterType !== StringFilterMode.Contains) {
|
|
293
|
+
console.warn(`unhandled filter type value ${filterType}`);
|
|
307
294
|
}
|
|
308
295
|
//default
|
|
309
296
|
return columnValue.includes(filterValue);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser, dev } from '$app/environment';
|
|
2
1
|
import { SvelteMap } from 'svelte/reactivity';
|
|
3
2
|
export class TableDataRepository {
|
|
4
3
|
tableName;
|
|
@@ -17,7 +16,7 @@ export class TableDataRepository {
|
|
|
17
16
|
set paginationState(v) {
|
|
18
17
|
this._previouslyViewedPage = this._paginationState?.pageIndex;
|
|
19
18
|
this._paginationState = v;
|
|
20
|
-
if (
|
|
19
|
+
if (localStorage) {
|
|
21
20
|
localStorage.setItem(`${this.getUserId()}-${this.tableName}-page-size`, v.pageSize.toString());
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -30,9 +29,7 @@ export class TableDataRepository {
|
|
|
30
29
|
}
|
|
31
30
|
filterModes = $state(new SvelteMap());
|
|
32
31
|
_forceRefresh = $state(() => {
|
|
33
|
-
|
|
34
|
-
console.warn('tried to force refresh without a callback registered');
|
|
35
|
-
}
|
|
32
|
+
console.warn('tried to force refresh without a callback registered');
|
|
36
33
|
});
|
|
37
34
|
get forceRefresh() {
|
|
38
35
|
return this._forceRefresh;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { dev } from '$app/environment';
|
|
2
1
|
import { Colour } from '../../../../scss/colours.js';
|
|
3
2
|
import { Validity } from '../../../../Types/Internal/Validity.js';
|
|
4
3
|
import { tick } from 'svelte';
|
|
@@ -128,10 +127,7 @@ export class TableFocusDetails {
|
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
catch (e) {
|
|
131
|
-
|
|
132
|
-
console.log(e);
|
|
133
|
-
alert('validity error');
|
|
134
|
-
}
|
|
130
|
+
console.warn('validity error:', e);
|
|
135
131
|
return tick().then(() => {
|
|
136
132
|
this.toastCallback(e);
|
|
137
133
|
return [Validity.Valid, undefined];
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts" module>
|
|
4
4
|
import { tick, type Snippet } from 'svelte';
|
|
5
|
-
import { dev } from '$app/environment';
|
|
6
5
|
import TouchModal from './TouchModal.svelte';
|
|
7
6
|
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
8
7
|
import { ColourSet } from '../../scss/colours.js';
|
|
@@ -183,10 +182,6 @@
|
|
|
183
182
|
colourSet={isBeingEdited ? ColourSet.Primary : ColourSet.Secondary}
|
|
184
183
|
onclick={() => {
|
|
185
184
|
if (!allowOverride) {
|
|
186
|
-
if (dev) {
|
|
187
|
-
// eslint-disable-next-line no-debugger
|
|
188
|
-
debugger;
|
|
189
|
-
}
|
|
190
185
|
return;
|
|
191
186
|
}
|
|
192
187
|
isBeingEdited = !isBeingEdited;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
3
|
<script lang="ts" module>
|
|
4
|
-
import type
|
|
5
|
-
import { browser } from '$app/environment';
|
|
4
|
+
import { onMount, type Snippet } from 'svelte';
|
|
6
5
|
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
7
6
|
import { ColourSet } from '../../scss/colours.js';
|
|
8
7
|
import { Side } from '../../Types/Internal/Side.js';
|
|
@@ -44,12 +43,18 @@
|
|
|
44
43
|
children
|
|
45
44
|
}: UtilityButtonProps = $props();
|
|
46
45
|
|
|
46
|
+
let isMounted = $state(false);
|
|
47
|
+
|
|
48
|
+
onMount(() => {
|
|
49
|
+
isMounted = true;
|
|
50
|
+
});
|
|
47
51
|
const size = $derived(
|
|
48
|
-
|
|
49
|
-
?
|
|
50
|
-
|
|
52
|
+
isMounted
|
|
53
|
+
? (explicitSize ?? icon instanceof SVGSVGElement)
|
|
54
|
+
? Size.DoubleXLarge
|
|
55
|
+
: (icon?.size ?? Size.DoubleXLarge)
|
|
56
|
+
: Size.DoubleXLarge
|
|
51
57
|
);
|
|
52
|
-
|
|
53
58
|
let slotSpan: HTMLSpanElement | undefined = $state();
|
|
54
59
|
</script>
|
|
55
60
|
|
|
@@ -73,7 +78,7 @@
|
|
|
73
78
|
}}
|
|
74
79
|
onkeydown={passthrough}
|
|
75
80
|
>
|
|
76
|
-
{#if
|
|
81
|
+
{#if isMounted && icon}
|
|
77
82
|
<div
|
|
78
83
|
class="expand"
|
|
79
84
|
class:left={side == Side.Left}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export type StringCallback = (value: string) => boolean | void | Promise<boolean | void>;
|
|
2
|
+
import type { Unsubscriber } from '../Types/Internal/Misc.js';
|
|
2
3
|
export declare class UntypedInputContext {
|
|
3
4
|
static readonly identifier: unique symbol;
|
|
4
5
|
private readonly registeredListeners;
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import { dev } from '$app/environment';
|
|
2
1
|
export class UntypedInputContext {
|
|
3
2
|
static identifier = Symbol();
|
|
4
3
|
registeredListeners = [];
|
|
5
4
|
registerListener = (listener) => {
|
|
6
|
-
if (dev) {
|
|
7
|
-
console.log('subscribing');
|
|
8
|
-
}
|
|
9
5
|
this.registeredListeners.push(listener);
|
|
10
6
|
return () => {
|
|
11
7
|
const foundListenerIndex = this.registeredListeners.findIndex((it) => it === listener);
|
|
12
8
|
if (foundListenerIndex > -1) {
|
|
13
9
|
this.registeredListeners.splice(foundListenerIndex, 1);
|
|
14
|
-
if (dev) {
|
|
15
|
-
console.log('successfully unsubscribed');
|
|
16
|
-
}
|
|
17
10
|
}
|
|
18
11
|
else {
|
|
19
|
-
|
|
20
|
-
alert('listener not found');
|
|
21
|
-
console.log(`listeners: ${this.registeredListeners}, this listener: ${listener}`);
|
|
22
|
-
}
|
|
12
|
+
console.warn(`listener not found. listeners: ${this.registeredListeners}, this listener: ${listener}`);
|
|
23
13
|
}
|
|
24
14
|
};
|
|
25
15
|
};
|
|
26
16
|
fire = async () => {
|
|
27
|
-
if (dev) {
|
|
28
|
-
console.log(`firing with ${this.untypedValue}`);
|
|
29
|
-
}
|
|
30
17
|
for (let i = this.registeredListeners.length - 1; i > -1; i--) {
|
|
31
18
|
const shouldStop = await this.registeredListeners[i](this.untypedValue);
|
|
32
19
|
if (shouldStop) {
|
|
@@ -60,9 +47,6 @@ export class UntypedInputContext {
|
|
|
60
47
|
return;
|
|
61
48
|
}
|
|
62
49
|
if (e.key.length == 1) {
|
|
63
|
-
if (dev) {
|
|
64
|
-
console.log(`adding ${e.key}`);
|
|
65
|
-
}
|
|
66
50
|
this.untypedValue += e.key;
|
|
67
51
|
}
|
|
68
52
|
// else {
|
|
@@ -1,102 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IResponse } from '../Types/Responses/IResponse.js';
|
|
3
|
-
import type { Static, TSchema } from '@sinclair/typebox';
|
|
4
|
-
import type { INamed } from './INamed.js';
|
|
5
|
-
import type { IErrorResponse } from '../Types/Responses/IErrorResponse.js';
|
|
6
|
-
import type { IPrinter } from '../Types/Responses/IPrinter.js';
|
|
7
|
-
import type { ILaserPrinter } from '../Types/Responses/ILaserPrinter.js';
|
|
8
|
-
import type { ILabelPrinter } from '../Types/Responses/ILabelPrinter.js';
|
|
9
|
-
import type { ToastMessage } from '../Types/Internal/ToastMessage.js';
|
|
10
|
-
import type { IFillablePodLineDate } from '../Types/Responses/Pods/IFillablePodLineDate.js';
|
|
11
|
-
import type { IFillablePodLineAttribute } from '../Types/Responses/Pods/IFillablePodLineAttribute.js';
|
|
12
|
-
import type { IValidatedPodLineAttribute } from '../Types/Responses/Pods/IValidatedPodLineAttribute.js';
|
|
1
|
+
import type { InputDate, InputDateWithTime, SQLDate } from '../Types/Internal/Misc.js';
|
|
13
2
|
import type { RefWrapper } from '../Types/Internal/RefWrapper.js';
|
|
14
|
-
export declare function capitalise(string: string): string;
|
|
15
3
|
export declare function autoPluralise(text: string, quantity?: number, { capitalise }?: {
|
|
16
4
|
capitalise?: boolean | undefined;
|
|
17
5
|
}): string;
|
|
18
|
-
export declare const utc: Intl.DateTimeFormat;
|
|
19
|
-
export declare const local: Intl.DateTimeFormat;
|
|
20
|
-
export declare function tomorrow(): Date;
|
|
21
|
-
export declare function inputFriendly(date: FloDate | Date): InputDate;
|
|
22
|
-
export declare function inputFriendlyWithTime(date: FloDate | Date): InputDateWithTime;
|
|
23
|
-
export declare function floFriendly(date: InputDate | FloDate | Date): FloDate;
|
|
24
|
-
/** @deprecated Use floFriendlyWithLocalTime() instead */
|
|
25
|
-
export declare function floFriendlyWithTime(date: InputDate | FloDate | Date, timeDate?: InputDate | FloDate | Date | null): FloDate;
|
|
26
|
-
export declare function floFriendlyWithLocalTime(date: InputDate | InputDateWithTime | FloDate | Date, timeDate?: InputDate | InputDateWithTime | FloDate | Date | null): FloDate;
|
|
27
|
-
export declare function lastSec(): Date;
|
|
28
|
-
export declare function isErrorResponse(error: unknown): error is IErrorResponse;
|
|
29
|
-
export declare function isMessage(response: unknown): response is IResponse<string | string[]>;
|
|
30
|
-
export declare function isThrowable(error: unknown): error is Error;
|
|
31
|
-
export declare function getErrorMessage(error: unknown, includeUUID?: boolean): string;
|
|
32
|
-
export declare function isValidEmailAddress(emailAddress: string): RegExpMatchArray | null;
|
|
33
|
-
export declare function validateBarcodeCommand(value: string, allBarcodes: Set<string>, previousValue: string, hasDynamicParameter?: boolean): BarcodeValidationResult;
|
|
34
|
-
export type BarcodeValidationResult = {
|
|
35
|
-
shouldUpdate: false;
|
|
36
|
-
isError: boolean;
|
|
37
|
-
reason: ToastMessage;
|
|
38
|
-
finalValue?: undefined;
|
|
39
|
-
} | {
|
|
40
|
-
shouldUpdate: boolean;
|
|
41
|
-
isError: false;
|
|
42
|
-
reason?: undefined;
|
|
43
|
-
finalValue: string;
|
|
44
|
-
};
|
|
45
|
-
export declare function isValidLaserPrinter(printer: IPrinter): printer is ILaserPrinter;
|
|
46
|
-
export declare function isValidLabelPrinter(printer: IPrinter): printer is ILabelPrinter;
|
|
47
|
-
export declare const getLocalStorageStringOrDefault: (key: string, defaultValue: string) => string;
|
|
48
|
-
export declare const getLocalStorageIntOrDefault: <T extends number>(key: string, defaultValue: T) => T;
|
|
49
|
-
export declare const getLocalStorageFloatOrDefault: <T extends number>(key: string, defaultValue: T) => T;
|
|
50
|
-
export declare const getLocalStorageBoolOrDefault: (key: string, defaultValue: boolean) => boolean;
|
|
51
|
-
export declare const FormatAccountNames: (accounts: INamed[]) => string;
|
|
52
|
-
export declare const FormatWarehouseNames: (accounts: INamed[]) => string;
|
|
53
|
-
export declare function getCanvasContext(): CanvasRenderingContext2D;
|
|
54
|
-
export declare function assertIsOnBrowser(): void;
|
|
55
|
-
export declare function asyncMap<T, R>(array: Array<T>, asyncCallback: (item: T, index: number) => Promise<R>): Promise<Awaited<R>[]>;
|
|
56
|
-
export declare function asyncForEach<T>(array: Array<T>, asyncCallback: (item: T, index: number) => Promise<void>): Promise<void>;
|
|
57
|
-
export declare function asyncFlatMap<T, R>(array: Array<T>, asyncCallback: (item: T, index: number) => Promise<R>): Promise<(Awaited<R> extends infer T_1 ? T_1 extends Awaited<R> ? T_1 extends readonly (infer InnerArr)[] ? InnerArr : T_1 : never : never)[]>;
|
|
58
|
-
export declare function asyncSome<T>(array: Array<T>, asyncCallback: (item: T, index: number) => Promise<boolean>): Promise<boolean>;
|
|
59
6
|
export declare const vowels: Set<string>;
|
|
60
|
-
export declare function assertUnreachable(_: never): never;
|
|
61
|
-
export declare function isFocusable(item: HTMLElement): boolean;
|
|
62
|
-
export declare function focusNextFocusable(element: HTMLElement): boolean;
|
|
63
|
-
export declare const readonly: {
|
|
64
|
-
readOnly: boolean;
|
|
65
|
-
};
|
|
66
|
-
export declare function assert<T extends TSchema>(schema: T, value: Static<T>): void;
|
|
67
|
-
export declare function toFloFriendlyWithLocalTime(date: IFillablePodLineDate & {
|
|
68
|
-
podValue?: FloDate | null;
|
|
69
|
-
}): {
|
|
70
|
-
value: FloDate | null;
|
|
71
|
-
overwriteValue: boolean;
|
|
72
|
-
_overwrittenValue: (string & {
|
|
73
|
-
__brand: "FloDate";
|
|
74
|
-
}) | null;
|
|
75
|
-
type: "requiredAt" | "validateAt";
|
|
76
|
-
dateType_id: import("../Types/Internal/Misc.js").PodLineDateTypeID;
|
|
77
|
-
podValue?: FloDate | null;
|
|
78
|
-
};
|
|
79
|
-
/** @deprecated Use toFloFriendlyWithLocalTime() instead */
|
|
80
|
-
export declare function toFloFriendlyWithTime(date: IFillablePodLineDate & {
|
|
81
|
-
podValue?: FloDate | null;
|
|
82
|
-
}): {
|
|
83
|
-
value: FloDate | null;
|
|
84
|
-
overwriteValue: boolean;
|
|
85
|
-
_overwrittenValue: (string & {
|
|
86
|
-
__brand: "FloDate";
|
|
87
|
-
}) | null;
|
|
88
|
-
type: "requiredAt" | "validateAt";
|
|
89
|
-
dateType_id: import("../Types/Internal/Misc.js").PodLineDateTypeID;
|
|
90
|
-
podValue?: FloDate | null;
|
|
91
|
-
};
|
|
92
|
-
export declare function saveBlob(blob: Blob, fileName: string): void;
|
|
93
|
-
export declare function isAttributeMissing(item: IFillablePodLineAttribute): boolean;
|
|
94
|
-
export declare function isAttributeInvalid(item: IValidatedPodLineAttribute): boolean;
|
|
95
|
-
export declare function isAttributeDateInvalid(item: IValidatedPodLineAttribute): boolean;
|
|
96
|
-
export type Milliseconds = number;
|
|
97
|
-
export declare function asyncSleep(delay: Milliseconds): Promise<void>;
|
|
98
|
-
export declare function getOrCreateDeviceUUID(): string;
|
|
99
|
-
export declare function passthrough(e: KeyboardEvent): void;
|
|
100
|
-
export declare function generateUUID<T extends string>(): T;
|
|
101
7
|
export declare function generateShortUUID<T extends string>(): T;
|
|
8
|
+
export declare function generateUUID<T extends string>(): T;
|
|
102
9
|
export declare function refWrapper<T>(initial: T): RefWrapper<T>;
|
|
10
|
+
export declare function SQLFriendly(date: InputDate | SQLDate | Date): SQLDate;
|
|
11
|
+
export declare function SQLFriendlyWithLocalTime(date: InputDate | InputDateWithTime | SQLDate | Date, timeDate?: InputDate | InputDateWithTime | SQLDate | Date | null): SQLDate;
|
|
12
|
+
export declare const localTimeFormat: Intl.DateTimeFormat;
|
|
13
|
+
export declare function passthrough(e: KeyboardEvent): void;
|
|
14
|
+
export declare function getCanvasContext(): CanvasRenderingContext2D;
|
|
15
|
+
interface IErrorResponse {
|
|
16
|
+
readonly errors: readonly {
|
|
17
|
+
code: string;
|
|
18
|
+
message: string;
|
|
19
|
+
originatingService: string;
|
|
20
|
+
}[] | string;
|
|
21
|
+
readonly payload: unknown;
|
|
22
|
+
readonly statusCode: number;
|
|
23
|
+
readonly uuid: string | null;
|
|
24
|
+
}
|
|
25
|
+
export declare function isErrorResponse(error: unknown): error is IErrorResponse;
|
|
26
|
+
export declare function getErrorMessage(error: unknown, includeUUID?: boolean): string;
|
|
27
|
+
export declare function isValidEmailAddress(emailAddress: string): RegExpMatchArray | null;
|
|
28
|
+
export {};
|