@lavalogic/scoria 0.34.0 → 0.35.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/README.md +58 -58
- package/dist/Components/AccordionGroup.svelte +42 -42
- package/dist/Components/AccordionGroupButton.svelte +99 -99
- package/dist/Components/Action.svelte +138 -138
- package/dist/Components/AlertModal.svelte +125 -125
- package/dist/Components/Base/ContextWrapper.svelte +50 -50
- package/dist/Components/Base/Pagination.svelte +190 -190
- package/dist/Components/Base/Snippets.svelte +29 -29
- package/dist/Components/BigRadioSet.svelte +29 -29
- package/dist/Components/Bubble.svelte +77 -77
- package/dist/Components/Button.svelte +197 -197
- package/dist/Components/Checkbox.svelte +68 -68
- package/dist/Components/CollapsibleCard.svelte +70 -70
- package/dist/Components/Contexts/ContextMenu.svelte +157 -157
- package/dist/Components/Contexts/ContextMenuDivider.svelte +11 -11
- package/dist/Components/Contexts/ContextMenuOption.svelte +52 -52
- package/dist/Components/Contexts/Toast.svelte +61 -61
- package/dist/Components/Contexts/ToastContainer.svelte +46 -46
- package/dist/Components/Contexts/Tooltip.svelte +26 -26
- package/dist/Components/DataMatrixIcon.svelte +41 -41
- package/dist/Components/DateInput.svelte +109 -109
- package/dist/Components/DatePicker.svelte +312 -312
- package/dist/Components/DesktopModal.svelte +106 -106
- package/dist/Components/Dial.svelte +151 -151
- package/dist/Components/DimensionInput.svelte +184 -184
- package/dist/Components/DragMenu/DragMenuHolder.svelte +106 -106
- package/dist/Components/DragMenu/DraggableCard.svelte +41 -41
- package/dist/Components/FileCard.svelte +20 -20
- package/dist/Components/FileUpload.svelte +196 -196
- package/dist/Components/GridInput.svelte +190 -190
- package/dist/Components/GridInputSet.svelte +22 -22
- package/dist/Components/HorizontalTabGroup.svelte +78 -78
- package/dist/Components/HorizontalTabGroupButton.svelte +96 -96
- package/dist/Components/Icon.svelte +97 -97
- package/dist/Components/Icons.js +357 -357
- package/dist/Components/LoadingAnimation.svelte +32 -32
- package/dist/Components/LoadingModal.svelte +47 -47
- package/dist/Components/LoadingOverlay.svelte +27 -27
- package/dist/Components/Modal.svelte +251 -251
- package/dist/Components/MultiSelect.svelte +197 -197
- package/dist/Components/Nav/Nav.svelte +97 -97
- package/dist/Components/Nav/NavServiceMenuList.svelte +34 -34
- package/dist/Components/Nav/NavTab.svelte +91 -91
- package/dist/Components/Nav/ServiceMenuItem.svelte +91 -91
- package/dist/Components/Nav/ServicesNav.svelte +53 -53
- package/dist/Components/NumberInput.svelte +144 -144
- package/dist/Components/PageHeading.svelte +36 -36
- package/dist/Components/PasswordInput.svelte +73 -73
- package/dist/Components/Portal.svelte +25 -25
- package/dist/Components/ProgressBubble.svelte +80 -80
- package/dist/Components/QuerySelect.svelte +411 -411
- package/dist/Components/SingleSelect.svelte +261 -261
- package/dist/Components/StepButton.svelte +120 -120
- package/dist/Components/StepForm.svelte +108 -108
- package/dist/Components/Switch.svelte +36 -36
- package/dist/Components/Table/Body/QuickSearchCell.svelte +632 -632
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +30 -30
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +56 -56
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +179 -179
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +49 -49
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +180 -180
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +102 -102
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +119 -119
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +114 -114
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +96 -96
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +72 -72
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +131 -131
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +144 -144
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +238 -238
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +358 -358
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +338 -338
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +183 -183
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +309 -309
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +369 -369
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +170 -170
- package/dist/Components/Table/Body/Rows/TableRow.svelte +259 -259
- package/dist/Components/Table/Body/TableBody.svelte +67 -67
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +39 -39
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +28 -28
- package/dist/Components/Table/Headers/TableHead.svelte +260 -260
- package/dist/Components/Table/Misc/ColumnPanel.svelte +78 -78
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +99 -99
- package/dist/Components/Table/Misc/FilterInput.svelte +556 -556
- package/dist/Components/Table/Misc/FilterPanel.svelte +46 -46
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +67 -67
- package/dist/Components/Table/Misc/SidePanel.svelte +32 -32
- package/dist/Components/Table/Misc/TableFooter.svelte +304 -304
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +156 -156
- package/dist/Components/Table/Misc/TableSidebar.svelte +176 -176
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +77 -77
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +91 -91
- package/dist/Components/Table/NestedTable.svelte +84 -84
- package/dist/Components/Table/Table.svelte +492 -492
- package/dist/Components/Test/TestContextConsumer.svelte +13 -13
- package/dist/Components/TextArea.svelte +108 -108
- package/dist/Components/TextInput.svelte +147 -147
- package/dist/Components/ThreeStateRadio.svelte +124 -124
- package/dist/Components/Touch/BoolCard.svelte +52 -52
- package/dist/Components/Touch/DateModal.svelte +217 -217
- package/dist/Components/Touch/EditCard.svelte +52 -52
- package/dist/Components/Touch/InfoCard.svelte +24 -24
- package/dist/Components/Touch/InfoTextCard.svelte +21 -21
- package/dist/Components/Touch/ModalExplanation.svelte +20 -20
- package/dist/Components/Touch/NumberKeyboard.svelte +268 -268
- package/dist/Components/Touch/NumberModal.svelte +69 -69
- package/dist/Components/Touch/PlusMinusCard.svelte +50 -50
- package/dist/Components/Touch/SelectModal.svelte +105 -105
- package/dist/Components/Touch/SummaryCard.svelte +65 -65
- package/dist/Components/Touch/TextAreaModal.svelte +86 -86
- package/dist/Components/Touch/TextModal.svelte +123 -123
- package/dist/Components/Touch/TouchCard.svelte +28 -28
- package/dist/Components/Touch/TouchModal.svelte +259 -259
- package/dist/Components/Touch/UtilityButton.svelte +91 -91
- package/dist/Components/VerticalTabGroup.svelte +66 -66
- package/dist/Components/VerticalTabGroupButton.svelte +97 -97
- package/dist/Helpers/Datamatrix.d.ts +10 -10
- package/dist/Helpers/Datamatrix.js +1 -1
- package/dist/Helpers/Helpers.svelte.js +6 -4
- package/dist/Types/Examples/ExampleModal.svelte +34 -34
- package/dist/scss/_basics.scss +12 -12
- package/dist/scss/_colours.scss +134 -134
- package/dist/scss/_mixins.scss +3016 -3016
- package/dist/scss/_sizing.scss +69 -69
- package/dist/scss/_transitions.scss +8 -8
- package/package.json +2 -2
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
5
|
-
import { ColourSet } from '../../scss/colours.js';
|
|
6
|
-
import { Side } from '../../Types/Internal/Side.js';
|
|
7
|
-
import { Size } from '../../Types/Internal/Size.js';
|
|
8
|
-
import { onMount } from 'svelte';
|
|
9
|
-
import DataMatrixIcon from '../DataMatrixIcon.svelte';
|
|
10
|
-
import Icon from '../Icon.svelte';
|
|
11
|
-
import type { UtilityButtonProps } from './UtilityButtonProps.js';
|
|
12
|
-
let {
|
|
13
|
-
type = 'button',
|
|
14
|
-
colourSet = ColourSet.Secondary,
|
|
15
|
-
icon,
|
|
16
|
-
side = Side.Top,
|
|
17
|
-
size: explicitSize,
|
|
18
|
-
notifications,
|
|
19
|
-
ref = $bindable(),
|
|
20
|
-
disabled = false,
|
|
21
|
-
onEditBarcode,
|
|
22
|
-
onclick,
|
|
23
|
-
onfocus,
|
|
24
|
-
onblur,
|
|
25
|
-
children
|
|
26
|
-
}: UtilityButtonProps = $props();
|
|
27
|
-
|
|
28
|
-
let isMounted = $state(false);
|
|
29
|
-
|
|
30
|
-
onMount(() => {
|
|
31
|
-
isMounted = true;
|
|
32
|
-
});
|
|
33
|
-
const size = $derived(
|
|
34
|
-
isMounted
|
|
35
|
-
? (explicitSize ?? icon instanceof SVGSVGElement)
|
|
36
|
-
? Size.DoubleXLarge
|
|
37
|
-
: (icon?.size ?? Size.DoubleXLarge)
|
|
38
|
-
: Size.DoubleXLarge
|
|
39
|
-
);
|
|
40
|
-
let slotSpan: HTMLSpanElement | undefined = $state();
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<button
|
|
44
|
-
{type}
|
|
45
|
-
class:call-to-action={colourSet === ColourSet.Primary || colourSet === ColourSet.CallToAction}
|
|
46
|
-
disabled={disabled ? true : undefined}
|
|
47
|
-
class:left={side == Side.Left}
|
|
48
|
-
class:right={side == Side.Right}
|
|
49
|
-
class:top={side == Side.Top}
|
|
50
|
-
class:bottom={side == Side.Bottom}
|
|
51
|
-
bind:this={ref}
|
|
52
|
-
{onclick}
|
|
53
|
-
{onfocus}
|
|
54
|
-
{onblur}
|
|
55
|
-
oncontextmenu={(e) => {
|
|
56
|
-
if (onEditBarcode) {
|
|
57
|
-
e.preventDefault();
|
|
58
|
-
onEditBarcode();
|
|
59
|
-
}
|
|
60
|
-
}}
|
|
61
|
-
onkeydown={passthrough}
|
|
62
|
-
>
|
|
63
|
-
{#if isMounted && icon}
|
|
64
|
-
<div
|
|
65
|
-
class="expand"
|
|
66
|
-
class:left={side == Side.Left}
|
|
67
|
-
class:right={side == Side.Right}
|
|
68
|
-
class:top={side == Side.Top}
|
|
69
|
-
class:bottom={side == Side.Bottom}
|
|
70
|
-
>
|
|
71
|
-
{#if icon instanceof SVGSVGElement}
|
|
72
|
-
<DataMatrixIcon title={slotSpan?.textContent ?? '{unknown}'} {icon} />
|
|
73
|
-
{:else}
|
|
74
|
-
{#if notifications}
|
|
75
|
-
<span class="notification">{notifications}</span>
|
|
76
|
-
{/if}
|
|
77
|
-
|
|
78
|
-
<Icon {...icon} {size} />
|
|
79
|
-
{/if}
|
|
80
|
-
</div>
|
|
81
|
-
{/if}
|
|
82
|
-
<span class="utility-label">
|
|
83
|
-
{#if notifications && icon instanceof SVGSVGElement}
|
|
84
|
-
<span class="notification-on-text">{notifications}</span>
|
|
85
|
-
{/if}<span bind:this={slotSpan}
|
|
86
|
-
>{#if children}{@render children()}{/if}</span
|
|
87
|
-
>
|
|
88
|
-
</span>
|
|
89
|
-
</button>
|
|
90
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
5
|
+
import { ColourSet } from '../../scss/colours.js';
|
|
6
|
+
import { Side } from '../../Types/Internal/Side.js';
|
|
7
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
8
|
+
import { onMount } from 'svelte';
|
|
9
|
+
import DataMatrixIcon from '../DataMatrixIcon.svelte';
|
|
10
|
+
import Icon from '../Icon.svelte';
|
|
11
|
+
import type { UtilityButtonProps } from './UtilityButtonProps.js';
|
|
12
|
+
let {
|
|
13
|
+
type = 'button',
|
|
14
|
+
colourSet = ColourSet.Secondary,
|
|
15
|
+
icon,
|
|
16
|
+
side = Side.Top,
|
|
17
|
+
size: explicitSize,
|
|
18
|
+
notifications,
|
|
19
|
+
ref = $bindable(),
|
|
20
|
+
disabled = false,
|
|
21
|
+
onEditBarcode,
|
|
22
|
+
onclick,
|
|
23
|
+
onfocus,
|
|
24
|
+
onblur,
|
|
25
|
+
children
|
|
26
|
+
}: UtilityButtonProps = $props();
|
|
27
|
+
|
|
28
|
+
let isMounted = $state(false);
|
|
29
|
+
|
|
30
|
+
onMount(() => {
|
|
31
|
+
isMounted = true;
|
|
32
|
+
});
|
|
33
|
+
const size = $derived(
|
|
34
|
+
isMounted
|
|
35
|
+
? (explicitSize ?? icon instanceof SVGSVGElement)
|
|
36
|
+
? Size.DoubleXLarge
|
|
37
|
+
: (icon?.size ?? Size.DoubleXLarge)
|
|
38
|
+
: Size.DoubleXLarge
|
|
39
|
+
);
|
|
40
|
+
let slotSpan: HTMLSpanElement | undefined = $state();
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<button
|
|
44
|
+
{type}
|
|
45
|
+
class:call-to-action={colourSet === ColourSet.Primary || colourSet === ColourSet.CallToAction}
|
|
46
|
+
disabled={disabled ? true : undefined}
|
|
47
|
+
class:left={side == Side.Left}
|
|
48
|
+
class:right={side == Side.Right}
|
|
49
|
+
class:top={side == Side.Top}
|
|
50
|
+
class:bottom={side == Side.Bottom}
|
|
51
|
+
bind:this={ref}
|
|
52
|
+
{onclick}
|
|
53
|
+
{onfocus}
|
|
54
|
+
{onblur}
|
|
55
|
+
oncontextmenu={(e) => {
|
|
56
|
+
if (onEditBarcode) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
onEditBarcode();
|
|
59
|
+
}
|
|
60
|
+
}}
|
|
61
|
+
onkeydown={passthrough}
|
|
62
|
+
>
|
|
63
|
+
{#if isMounted && icon}
|
|
64
|
+
<div
|
|
65
|
+
class="expand"
|
|
66
|
+
class:left={side == Side.Left}
|
|
67
|
+
class:right={side == Side.Right}
|
|
68
|
+
class:top={side == Side.Top}
|
|
69
|
+
class:bottom={side == Side.Bottom}
|
|
70
|
+
>
|
|
71
|
+
{#if icon instanceof SVGSVGElement}
|
|
72
|
+
<DataMatrixIcon title={slotSpan?.textContent ?? '{unknown}'} {icon} />
|
|
73
|
+
{:else}
|
|
74
|
+
{#if notifications}
|
|
75
|
+
<span class="notification">{notifications}</span>
|
|
76
|
+
{/if}
|
|
77
|
+
|
|
78
|
+
<Icon {...icon} {size} />
|
|
79
|
+
{/if}
|
|
80
|
+
</div>
|
|
81
|
+
{/if}
|
|
82
|
+
<span class="utility-label">
|
|
83
|
+
{#if notifications && icon instanceof SVGSVGElement}
|
|
84
|
+
<span class="notification-on-text">{notifications}</span>
|
|
85
|
+
{/if}<span bind:this={slotSpan}
|
|
86
|
+
>{#if children}{@render children()}{/if}</span
|
|
87
|
+
>
|
|
88
|
+
</span>
|
|
89
|
+
</button>
|
|
90
|
+
|
|
91
91
|
<style>button {
|
|
92
92
|
background-color: #f4f7f9;
|
|
93
93
|
box-sizing: border-box;
|
|
@@ -176,4 +176,4 @@ button:not([disabled]).call-to-action:not([disabled]):focus, button:not([disable
|
|
|
176
176
|
}
|
|
177
177
|
button:not([disabled]).call-to-action:not([disabled]):focus {
|
|
178
178
|
outline-offset: -2px;
|
|
179
|
-
}</style>
|
|
179
|
+
}</style>
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
generics="CommonDenominator"
|
|
6
|
-
>
|
|
7
|
-
import { onMount, untrack } from 'svelte';
|
|
8
|
-
import VerticalTabGroupButton from './VerticalTabGroupButton.svelte';
|
|
9
|
-
import type { VerticalTabGroupProps } from './VerticalTabGroupProps.js';
|
|
10
|
-
let {
|
|
11
|
-
name,
|
|
12
|
-
tabs,
|
|
13
|
-
selected,
|
|
14
|
-
style,
|
|
15
|
-
noscroll,
|
|
16
|
-
noTabMessage,
|
|
17
|
-
nohistory = false,
|
|
18
|
-
}: VerticalTabGroupProps<CommonDenominator> = $props();
|
|
19
|
-
|
|
20
|
-
onMount(() => {
|
|
21
|
-
if (name && !nohistory) {
|
|
22
|
-
const tabName = sessionStorage.getItem(`${name}-active-tab`);
|
|
23
|
-
if (tabName) {
|
|
24
|
-
tabs.find((it) => it.label === tabName)?.onclick();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
$effect(() => {
|
|
30
|
-
if (name && selected) {
|
|
31
|
-
untrack(() => {
|
|
32
|
-
sessionStorage.setItem(`${name}-active-tab`, selected.label);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<div
|
|
39
|
-
class="wrapper"
|
|
40
|
-
class:noscroll
|
|
41
|
-
{style}
|
|
42
|
-
>
|
|
43
|
-
<div class="tabs">
|
|
44
|
-
{#each tabs as option (option)}
|
|
45
|
-
<VerticalTabGroupButton
|
|
46
|
-
{option}
|
|
47
|
-
selected={selected?.label === option.label}
|
|
48
|
-
/>
|
|
49
|
-
{/each}
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div
|
|
53
|
-
class="content"
|
|
54
|
-
class:noscroll
|
|
55
|
-
>
|
|
56
|
-
{#if selected}
|
|
57
|
-
{@render selected.content(selected.args)}
|
|
58
|
-
{:else}
|
|
59
|
-
<div class="wrapper bg">
|
|
60
|
-
<span class="red">{noTabMessage ?? 'No Tab Selected'}</span>
|
|
61
|
-
</div>
|
|
62
|
-
{/if}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="CommonDenominator"
|
|
6
|
+
>
|
|
7
|
+
import { onMount, untrack } from 'svelte';
|
|
8
|
+
import VerticalTabGroupButton from './VerticalTabGroupButton.svelte';
|
|
9
|
+
import type { VerticalTabGroupProps } from './VerticalTabGroupProps.js';
|
|
10
|
+
let {
|
|
11
|
+
name,
|
|
12
|
+
tabs,
|
|
13
|
+
selected,
|
|
14
|
+
style,
|
|
15
|
+
noscroll,
|
|
16
|
+
noTabMessage,
|
|
17
|
+
nohistory = false,
|
|
18
|
+
}: VerticalTabGroupProps<CommonDenominator> = $props();
|
|
19
|
+
|
|
20
|
+
onMount(() => {
|
|
21
|
+
if (name && !nohistory) {
|
|
22
|
+
const tabName = sessionStorage.getItem(`${name}-active-tab`);
|
|
23
|
+
if (tabName) {
|
|
24
|
+
tabs.find((it) => it.label === tabName)?.onclick();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
$effect(() => {
|
|
30
|
+
if (name && selected) {
|
|
31
|
+
untrack(() => {
|
|
32
|
+
sessionStorage.setItem(`${name}-active-tab`, selected.label);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
class="wrapper"
|
|
40
|
+
class:noscroll
|
|
41
|
+
{style}
|
|
42
|
+
>
|
|
43
|
+
<div class="tabs">
|
|
44
|
+
{#each tabs as option (option)}
|
|
45
|
+
<VerticalTabGroupButton
|
|
46
|
+
{option}
|
|
47
|
+
selected={selected?.label === option.label}
|
|
48
|
+
/>
|
|
49
|
+
{/each}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div
|
|
53
|
+
class="content"
|
|
54
|
+
class:noscroll
|
|
55
|
+
>
|
|
56
|
+
{#if selected}
|
|
57
|
+
{@render selected.content(selected.args)}
|
|
58
|
+
{:else}
|
|
59
|
+
<div class="wrapper bg">
|
|
60
|
+
<span class="red">{noTabMessage ?? 'No Tab Selected'}</span>
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
66
|
<style>.bg {
|
|
67
67
|
padding: 1.5rem;
|
|
68
68
|
background-color: #f9e9e9;
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
}
|
|
136
136
|
.wrapper .content.noscroll {
|
|
137
137
|
overflow: visible;
|
|
138
|
-
}</style>
|
|
138
|
+
}</style>
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
generics="Args"
|
|
6
|
-
>
|
|
7
|
-
import { devCatch } from '../Helpers/Helpers.svelte.js';
|
|
8
|
-
import { Colour } from '../scss/colours.js';
|
|
9
|
-
import { Size } from '../Types/Internal/Size.js';
|
|
10
|
-
import Icon from './Icon.svelte';
|
|
11
|
-
import type { TabGroupButtonProps } from './TabGroupButtonProps.js';
|
|
12
|
-
|
|
13
|
-
let { option, selected }: TabGroupButtonProps<Args> = $props();
|
|
14
|
-
|
|
15
|
-
let disabled = $state(true);
|
|
16
|
-
let visible = $state(true);
|
|
17
|
-
let isValid = $state(true);
|
|
18
|
-
|
|
19
|
-
$effect(() => {
|
|
20
|
-
if (typeof option.isValid === 'boolean') {
|
|
21
|
-
isValid = option.isValid;
|
|
22
|
-
} else {
|
|
23
|
-
option.isValid
|
|
24
|
-
?.then((v) => {
|
|
25
|
-
isValid = v;
|
|
26
|
-
})
|
|
27
|
-
.catch(devCatch);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
$effect(() => {
|
|
31
|
-
if (typeof option.disabled === 'boolean') {
|
|
32
|
-
disabled = option.disabled;
|
|
33
|
-
} else if (option.disabled == undefined) {
|
|
34
|
-
disabled = false;
|
|
35
|
-
} else {
|
|
36
|
-
option.disabled
|
|
37
|
-
.then((v) => {
|
|
38
|
-
disabled = v;
|
|
39
|
-
})
|
|
40
|
-
.catch(devCatch);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
$effect(() => {
|
|
45
|
-
if (typeof option.visible === 'boolean') {
|
|
46
|
-
visible = option.visible;
|
|
47
|
-
} else if (option.visible == undefined) {
|
|
48
|
-
visible = true;
|
|
49
|
-
} else {
|
|
50
|
-
option.visible
|
|
51
|
-
.then((v) => {
|
|
52
|
-
visible = v;
|
|
53
|
-
})
|
|
54
|
-
.catch(devCatch);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<button
|
|
60
|
-
class:selected
|
|
61
|
-
{disabled}
|
|
62
|
-
onclick={() => {
|
|
63
|
-
option.onclick();
|
|
64
|
-
}}
|
|
65
|
-
type="button"
|
|
66
|
-
class="tab"
|
|
67
|
-
class:invalid={!isValid}
|
|
68
|
-
class:hidden={!visible}
|
|
69
|
-
>
|
|
70
|
-
<div
|
|
71
|
-
class="bordered"
|
|
72
|
-
class:invalid={!isValid}
|
|
73
|
-
>
|
|
74
|
-
{#if option.iconLeft}
|
|
75
|
-
<Icon
|
|
76
|
-
{...option.iconLeft}
|
|
77
|
-
colour={Colour['$brand-primary']}
|
|
78
|
-
/>
|
|
79
|
-
{/if}
|
|
80
|
-
{option.label}
|
|
81
|
-
{#if !isValid}
|
|
82
|
-
<Icon
|
|
83
|
-
name="error"
|
|
84
|
-
colour={Colour['$error-border']}
|
|
85
|
-
size={Size.Small}
|
|
86
|
-
/>
|
|
87
|
-
{:else if option.iconRight}
|
|
88
|
-
<Icon
|
|
89
|
-
colour={Colour['$brand-primary']}
|
|
90
|
-
size={Size.Small}
|
|
91
|
-
{...option.iconRight}
|
|
92
|
-
/>
|
|
93
|
-
{/if}
|
|
94
|
-
</div>
|
|
95
|
-
</button>
|
|
96
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="Args"
|
|
6
|
+
>
|
|
7
|
+
import { devCatch } from '../Helpers/Helpers.svelte.js';
|
|
8
|
+
import { Colour } from '../scss/colours.js';
|
|
9
|
+
import { Size } from '../Types/Internal/Size.js';
|
|
10
|
+
import Icon from './Icon.svelte';
|
|
11
|
+
import type { TabGroupButtonProps } from './TabGroupButtonProps.js';
|
|
12
|
+
|
|
13
|
+
let { option, selected }: TabGroupButtonProps<Args> = $props();
|
|
14
|
+
|
|
15
|
+
let disabled = $state(true);
|
|
16
|
+
let visible = $state(true);
|
|
17
|
+
let isValid = $state(true);
|
|
18
|
+
|
|
19
|
+
$effect(() => {
|
|
20
|
+
if (typeof option.isValid === 'boolean') {
|
|
21
|
+
isValid = option.isValid;
|
|
22
|
+
} else {
|
|
23
|
+
option.isValid
|
|
24
|
+
?.then((v) => {
|
|
25
|
+
isValid = v;
|
|
26
|
+
})
|
|
27
|
+
.catch(devCatch);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
$effect(() => {
|
|
31
|
+
if (typeof option.disabled === 'boolean') {
|
|
32
|
+
disabled = option.disabled;
|
|
33
|
+
} else if (option.disabled == undefined) {
|
|
34
|
+
disabled = false;
|
|
35
|
+
} else {
|
|
36
|
+
option.disabled
|
|
37
|
+
.then((v) => {
|
|
38
|
+
disabled = v;
|
|
39
|
+
})
|
|
40
|
+
.catch(devCatch);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
$effect(() => {
|
|
45
|
+
if (typeof option.visible === 'boolean') {
|
|
46
|
+
visible = option.visible;
|
|
47
|
+
} else if (option.visible == undefined) {
|
|
48
|
+
visible = true;
|
|
49
|
+
} else {
|
|
50
|
+
option.visible
|
|
51
|
+
.then((v) => {
|
|
52
|
+
visible = v;
|
|
53
|
+
})
|
|
54
|
+
.catch(devCatch);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<button
|
|
60
|
+
class:selected
|
|
61
|
+
{disabled}
|
|
62
|
+
onclick={() => {
|
|
63
|
+
option.onclick();
|
|
64
|
+
}}
|
|
65
|
+
type="button"
|
|
66
|
+
class="tab"
|
|
67
|
+
class:invalid={!isValid}
|
|
68
|
+
class:hidden={!visible}
|
|
69
|
+
>
|
|
70
|
+
<div
|
|
71
|
+
class="bordered"
|
|
72
|
+
class:invalid={!isValid}
|
|
73
|
+
>
|
|
74
|
+
{#if option.iconLeft}
|
|
75
|
+
<Icon
|
|
76
|
+
{...option.iconLeft}
|
|
77
|
+
colour={Colour['$brand-primary']}
|
|
78
|
+
/>
|
|
79
|
+
{/if}
|
|
80
|
+
{option.label}
|
|
81
|
+
{#if !isValid}
|
|
82
|
+
<Icon
|
|
83
|
+
name="error"
|
|
84
|
+
colour={Colour['$error-border']}
|
|
85
|
+
size={Size.Small}
|
|
86
|
+
/>
|
|
87
|
+
{:else if option.iconRight}
|
|
88
|
+
<Icon
|
|
89
|
+
colour={Colour['$brand-primary']}
|
|
90
|
+
size={Size.Small}
|
|
91
|
+
{...option.iconRight}
|
|
92
|
+
/>
|
|
93
|
+
{/if}
|
|
94
|
+
</div>
|
|
95
|
+
</button>
|
|
96
|
+
|
|
97
97
|
<style>button.tab.hidden {
|
|
98
98
|
display: none !important;
|
|
99
99
|
}
|
|
@@ -140,4 +140,4 @@
|
|
|
140
140
|
}
|
|
141
141
|
.tab.selected.invalid {
|
|
142
142
|
border-bottom-color: #aa1414;
|
|
143
|
-
}</style>
|
|
143
|
+
}</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface IDatamatrixOptions {
|
|
2
|
-
msg: string;
|
|
3
|
-
dim?: number;
|
|
4
|
-
rct?: number;
|
|
5
|
-
pad?: number;
|
|
6
|
-
pal?: [string, string];
|
|
7
|
-
vrb?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export declare function DATAMatrix(value: IDatamatrixOptions | string): SVGSVGElement;
|
|
1
|
+
export interface IDatamatrixOptions {
|
|
2
|
+
msg: string;
|
|
3
|
+
dim?: number;
|
|
4
|
+
rct?: number;
|
|
5
|
+
pad?: number;
|
|
6
|
+
pal?: [string, string];
|
|
7
|
+
vrb?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare function DATAMatrix(value: IDatamatrixOptions | string): SVGSVGElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** https://github.com/datalog/datamatrix-svg under MIT license */
|
|
1
|
+
/** https://github.com/datalog/datamatrix-svg under MIT license */
|
|
2
2
|
'use strict';export function DATAMatrix(r){var e=[],n=0,t=0,f=function(r,n){e[n]=e[n]||[],e[n][r]=1},o=function(r){for(var e=[],n=r.length,t=0;t<n;t++){var f=r.charCodeAt(t),o=t+1<n?r.charCodeAt(t+1):0;f>47&&f<58&&o>47&&o<58?(e.push(10*(f-48)+o+82),t++):f>127?(e.push(235),e.push(f-127&255)):e.push(f+1)}return e},h=function(r,e){var n,t,f=0,h=0,i=r.length,u=[e[0]],a=function(r){h=40*h+r,2==f++&&(u.push(++h>>8),u.push(255&h),f=h=0)};for(n=0;n<i&&(0!=f||n!=i-1);n++){var s=r.charCodeAt(n);for(s>127&&238!=u[0]&&(a(1),a(30),s-=128),t=1;s>e[t];t+=3);var l=e[t+1];if(8==l||9==l&&0==f&&n==i-1)return[];if(l<5&&2==f&&n==i-1)break;l<5&&a(l),a(s-e[t+2])}return 2==f&&238!==u[0]&&a(0),u.push(254),(f>0||n<i)&&(u=u.concat(o(r.substr(n-f)))),u},i=function(r,e){r=unescape(encodeURI(r));var i=o(r),u=i.length,a=h(r,[230,31,0,0,32,9,29,47,1,33,57,9,44,64,1,43,90,9,51,95,1,69,127,2,96,255,1,0]),s=a.length;s>0&&s<u&&(i=a,u=s),(s=(a=h(r,[239,31,0,0,32,9,29,47,1,33,57,9,44,64,1,43,90,2,64,95,1,69,122,9,83,127,2,96,255,1,0])).length)>0&&s<u&&(i=a,u=s),(s=(a=h(r,[238,12,8,0,13,9,13,31,8,0,32,9,29,41,8,0,42,9,41,47,8,0,57,9,44,64,8,0,90,9,51,255,8,0])).length)>0&&s<u&&(i=a,u=s),(s=(a=function(r){for(var e,n=r.length,t=n+1&-4,f=0,h=t>0?[240]:[],i=0;i<t;i++){if(i<t-1){if((e=r.charCodeAt(i))<32||e>94)return[]}else e=31;f=64*f+(63&e),3==(3&i)&&(h.push(f>>16),h.push(f>>8&255),h.push(255&f),f=0)}return t>n?h:h.concat(o(r.substr(0==t?0:t-1)))}(r)).length)>0&&s<u&&(i=a,u=s),(s=(a=function(r){var e=[231],n=r.length;250<n&&e.push(37+(n/250|0)&255),e.push(n%250+149*(e.length+1)%255+1&255);for(var t=0;t<n;t++)e.push(r.charCodeAt(t)+149*(e.length+1)%255+1&255);return e}(r)).length)>0&&s<u&&(i=a,u=s);var l,c,p,v,g,d,w,A,m=1,C=1,b=-1,y=1,M=new Array(70),x=new Array(70),z=new Array(256),E=new Array(255);if(e&&u<50){a=[16,7,28,11,24,14,32,18,32,24,44,28];do{s=(c=a[++b])*(l=6+(12&b))/8}while(s-a[++b]<u);c>25&&(m=2)}else{c=l=6,g=2,a=[5,7,10,12,14,18,20,24,28,36,42,48,56,68,84,112,144,192,224,272,336,408,496,620];do{if(++b==a.length)return[0,0];c>11*g&&(g=4+g&12),s=(c=l+=g)*l>>3}while(s-a[b]<u);c>27&&(C=m=2*(c/54|0)+2),s>255&&(y=2*(s>>9)+2)}for(p=c/m,v=l/C,u<s-(A=a[b])&&(i[u++]=129);u<s-A;)i[u++]=(149*u%253+130)%254;for(A/=y,b=1,g=0;g<255;g++)E[g]=b,z[b]=g,(b+=b)>255&&(b^=301);for(M[A]=0,g=1;g<=A;g++)for(M[b=A-g]=1;b<A;b++)M[b]=M[b+1]^E[(z[M[b]]+g)%255];for(d=0;d<y;d++){for(g=0;g<=A;g++)x[g]=0;for(g=d;g<u;g+=y)for(b=0,j=x[0]^i[g];b<A;b++)x[b]=x[b+1]^(j?E[(z[M[b]]+z[j])%255]:0);for(g=0;g<A;g++)i[u+d+g*y]=x[g]}for(g=0;g<l+2*C;g+=v+2)for(b=0;b<c+2*m;b++)f(b,g+v+1),0==(1&b)&&f(b,g);for(g=0;g<c+2*m;g+=p+2)for(b=0;b<l;b++)f(g,b+2*(b/v|0)+1),1==(1&b)&&f(g+p+1,b+2*(b/v|0));for(A=2,d=0,w=4,y=[0,0,-1,0,-2,0,0,-1,-1,-1,-2,-1,-1,-2,-2,-2],g=0;g<s;w-=A,d+=A){if(w==l-3&&-1==d)a=[c,6-l,c,5-l,c,4-l,c,3-l,c-1,3-l,3,2,2,2,1,2];else if(w==l+1&&1==d&&0==(7&c)&&6==(7&l))a=[c-2,-l,c-3,-l,c-4,-l,c-2,-1-l,c-3,-1-l,c-4,-1-l,c-2,-2,-1,-2];else{if(0==w&&d==c-2&&3&c)continue;if(w<0||d>=c||w>=l||d<0)for(w+=2+(A=-A)/2,d+=2-A/2;w<0||d>=c||w>=l||d<0;)w-=A,d+=A;if(w==l-2&&0==d&&3&c)a=[c-1,3-l,c-1,2-l,c-2,2-l,c-3,2-l,c-4,2-l,0,1,0,0,0,-1];else if(w==l-2&&0==d&&4==(7&c))a=[c-1,5-l,c-1,4-l,c-1,3-l,c-1,2-l,c-2,2-l,0,1,0,0,0,-1];else{if(1==w&&d==c-1&&0==(7&c)&&6==(7&l))continue;a=y}}for(u=i[g++],b=0;u>0;b+=2,u>>=1)if(1&u){var j=d+a[b],k=w+a[b+1];j<0&&(j+=c,k+=4-(c+4&7)),k<0&&(k+=l,j+=4-(l+4&7)),f(j+2*(j/p|0)+1,k+2*(k/v|0)+1)}}for(g=c;3&g;g--)f(g,g);n=c+2*m,t=l+2*C};return function(){function f(r){return/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r)}function o(r,e){for(var n in r=document.createElementNS(g,r),e||{})r.setAttribute(n,e[n]);return r}var h,u,a,s,l,c,p,v=Math.abs,g="http://www.w3.org/2000/svg",d="",w="string"==typeof r?{msg:r}:r||{},A=w.pal||["#000"],m=v(w.dim)||256,C=[1,0,0,1,p=(p=v(w.pad))>-1?p:0,p],b=f(b=A[0])?b:"#000",y=f(y=A[1])?y:0,M=w.vrb?0:1;for(i(w.msg||"",w.rct),l=n+2*p,c=t+2*p,a=t;a--;)for(s=0,u=n;u--;)e[a][u]&&(M?(s++,e[a][u-1]||(d+="M"+u+","+a+"h"+s+"v1h-"+s+"v-1z",s=0)):d+="M"+u+","+a+"h1v1h-1v-1z");return h=o("svg",{viewBox:[0,0,l,c].join(" "),width:m/c*l|0,height:m,fill:b,"shape-rendering":"crispEdges",xmlns:g,version:"1.1"}),y&&h.appendChild(o("path",{fill:y,d:"M0,0v"+c+"h"+l+"V0H0Z"})),h.appendChild(o("path",{transform:"matrix("+C+")",d:d})),h}()}
|
|
@@ -84,10 +84,12 @@ export function SQLFriendlyWithLocalTime(date, timeDate) {
|
|
|
84
84
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
85
85
|
timeDate = new Date(timeDate);
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
const d = date;
|
|
88
|
+
const t = (timeDate ?? date);
|
|
89
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
90
|
+
const off = -t.getTimezoneOffset();
|
|
91
|
+
const sign = off >= 0 ? '+' : '-';
|
|
92
|
+
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(t.getHours())}:${pad(t.getMinutes())}:${pad(t.getSeconds())}${sign}${pad(Math.floor(Math.abs(off) / 60))}:${pad(Math.abs(off) % 60)}`;
|
|
91
93
|
}
|
|
92
94
|
export const localTimeFormat = new Intl.DateTimeFormat('en-GB', {
|
|
93
95
|
hour: '2-digit',
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import DesktopModal from '../../Components/DesktopModal.svelte';
|
|
5
|
-
import Switch from '../../Components/Switch.svelte';
|
|
6
|
-
import type { DisplayDefModalProps } from '../../Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
|
|
7
|
-
import type { ExampleItem } from './ExampleItem.js';
|
|
8
|
-
|
|
9
|
-
const { cell, onclose, onsubmit }: DisplayDefModalProps<ExampleItem> = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<DesktopModal
|
|
13
|
-
width="1220px"
|
|
14
|
-
headerLabel="Hello World"
|
|
15
|
-
{onclose}
|
|
16
|
-
{onsubmit}
|
|
17
|
-
buttons={[{ label: 'Close', callback: onclose }]}
|
|
18
|
-
>
|
|
19
|
-
<div class="wrapper">
|
|
20
|
-
This is an Example modal where you can do additional work through cell.row.original or a custom
|
|
21
|
-
context
|
|
22
|
-
<div>
|
|
23
|
-
<Switch
|
|
24
|
-
label="{cell.row.original.id} checked?"
|
|
25
|
-
value={cell.row.original.isChecked}
|
|
26
|
-
onchange={() => {
|
|
27
|
-
cell.row.original.isChecked = !cell.row.original.isChecked;
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</DesktopModal>
|
|
33
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import DesktopModal from '../../Components/DesktopModal.svelte';
|
|
5
|
+
import Switch from '../../Components/Switch.svelte';
|
|
6
|
+
import type { DisplayDefModalProps } from '../../Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
|
|
7
|
+
import type { ExampleItem } from './ExampleItem.js';
|
|
8
|
+
|
|
9
|
+
const { cell, onclose, onsubmit }: DisplayDefModalProps<ExampleItem> = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DesktopModal
|
|
13
|
+
width="1220px"
|
|
14
|
+
headerLabel="Hello World"
|
|
15
|
+
{onclose}
|
|
16
|
+
{onsubmit}
|
|
17
|
+
buttons={[{ label: 'Close', callback: onclose }]}
|
|
18
|
+
>
|
|
19
|
+
<div class="wrapper">
|
|
20
|
+
This is an Example modal where you can do additional work through cell.row.original or a custom
|
|
21
|
+
context
|
|
22
|
+
<div>
|
|
23
|
+
<Switch
|
|
24
|
+
label="{cell.row.original.id} checked?"
|
|
25
|
+
value={cell.row.original.isChecked}
|
|
26
|
+
onchange={() => {
|
|
27
|
+
cell.row.original.isChecked = !cell.row.original.isChecked;
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</DesktopModal>
|
|
33
|
+
|
|
34
34
|
<style>.wrapper div {
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
margin-top: 1rem;
|
|
37
37
|
width: 300px;
|
|
38
|
-
}</style>
|
|
38
|
+
}</style>
|