@softwareone/spi-sv5-library 1.11.4 → 1.11.5
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/Accordion/Accordion.svelte +1 -0
- package/dist/DeleteConfirmation/DeleteConfirmation.svelte +8 -2
- package/dist/ErrorPage/ErrorPage.svelte +2 -2
- package/dist/Form/Form.svelte +3 -2
- package/dist/Form/Form.svelte.d.ts +1 -0
- package/dist/Form/context.d.ts +2 -2
- package/dist/Form/context.js +13 -5
- package/dist/Menu/Sidebar.svelte +1 -1
- package/dist/Modal/ModalFooter.svelte +1 -1
- package/dist/ProgressPage/ProgressPage.svelte +1 -1
- package/dist/ProgressWizard/ProgressWizard.svelte +3 -2
- package/dist/Table/AdvancedFilter.svelte +1 -0
- package/dist/Table/Table.svelte +4 -2
- package/dist/Waffle/WaffleItems.svelte +3 -2
- package/package.json +1 -1
|
@@ -59,7 +59,13 @@
|
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
61
|
{#snippet footer()}
|
|
62
|
-
<Button
|
|
62
|
+
<Button
|
|
63
|
+
type="button"
|
|
64
|
+
variant="primary"
|
|
65
|
+
variantColor="danger"
|
|
66
|
+
disabled={!enableButton}
|
|
67
|
+
onclick={handleDelete}
|
|
68
|
+
>
|
|
63
69
|
Delete
|
|
64
70
|
</Button>
|
|
65
71
|
{/snippet}
|
|
@@ -72,7 +78,7 @@
|
|
|
72
78
|
gap: 16px;
|
|
73
79
|
width: 100%;
|
|
74
80
|
}
|
|
75
|
-
|
|
81
|
+
|
|
76
82
|
p {
|
|
77
83
|
margin: 0;
|
|
78
84
|
user-select: none;
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
</p>
|
|
40
40
|
|
|
41
41
|
<div class="feedback-footer">
|
|
42
|
-
<Button variant="outline" onclick={() => window.history.back()}>Back</Button>
|
|
43
|
-
<Button variant="primary" onclick={() => goto(page.url.origin)}>Go home</Button>
|
|
42
|
+
<Button type="button" variant="outline" onclick={() => window.history.back()}>Back</Button>
|
|
43
|
+
<Button type="button" variant="primary" onclick={() => goto(page.url.origin)}>Go home</Button>
|
|
44
44
|
</div>
|
|
45
45
|
</section>
|
|
46
46
|
|
package/dist/Form/Form.svelte
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
enctype?: FormEncodingType;
|
|
28
28
|
invalidateAll?: boolean;
|
|
29
29
|
spinnerFixed?: boolean;
|
|
30
|
+
contextName?: string;
|
|
30
31
|
onsuccess: (data?: Record<string, unknown>) => void;
|
|
31
32
|
onfailure?: (status: number | undefined, error: unknown) => void;
|
|
32
33
|
children?: Snippet;
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
enctype = 'application/x-www-form-urlencoded',
|
|
42
43
|
invalidateAll = true,
|
|
43
44
|
spinnerFixed = false,
|
|
45
|
+
contextName,
|
|
44
46
|
onsuccess,
|
|
45
47
|
onfailure = undefined,
|
|
46
48
|
children
|
|
@@ -49,8 +51,7 @@
|
|
|
49
51
|
let actionResult: ActionResult;
|
|
50
52
|
let isLoading = $state(false);
|
|
51
53
|
|
|
52
|
-
const { form, errors, isFormValid } = getFormContext<Schema>();
|
|
53
|
-
|
|
54
|
+
const { form, errors, isFormValid } = getFormContext<Schema>(contextName);
|
|
54
55
|
$form = structuredClone($state.snapshot(initialData));
|
|
55
56
|
|
|
56
57
|
const onUpdated = () => {
|
|
@@ -9,6 +9,7 @@ declare const Form: import("svelte").Component<{
|
|
|
9
9
|
enctype?: "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
10
10
|
invalidateAll?: boolean;
|
|
11
11
|
spinnerFixed?: boolean;
|
|
12
|
+
contextName?: string;
|
|
12
13
|
onsuccess: (data?: Record<string, unknown>) => void;
|
|
13
14
|
onfailure?: (status: number | undefined, error: unknown) => void;
|
|
14
15
|
children?: Snippet;
|
package/dist/Form/context.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { FormContext } from './types.js';
|
|
2
|
-
export declare const setFormContext: <T>() => FormContext<T>;
|
|
3
|
-
export declare const getFormContext: <T>() => FormContext<T>;
|
|
2
|
+
export declare const setFormContext: <T>(name?: string) => FormContext<T>;
|
|
3
|
+
export declare const getFormContext: <T>(name?: string) => FormContext<T>;
|
package/dist/Form/context.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { getContext, setContext } from 'svelte';
|
|
2
2
|
import { writable } from 'svelte/store';
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const symbolCache = new Map();
|
|
4
|
+
const getFormContextKey = (name) => {
|
|
5
|
+
const DEFAULT_KEY = 'formContext';
|
|
6
|
+
const key = name ? `${DEFAULT_KEY}-${name}` : DEFAULT_KEY;
|
|
7
|
+
if (!symbolCache.has(key)) {
|
|
8
|
+
symbolCache.set(key, Symbol(key));
|
|
9
|
+
}
|
|
10
|
+
return symbolCache.get(key);
|
|
11
|
+
};
|
|
12
|
+
export const setFormContext = (name) => {
|
|
5
13
|
const formContext = {
|
|
6
14
|
form: writable({}),
|
|
7
15
|
errors: writable({}),
|
|
8
16
|
isFormValid: writable(false)
|
|
9
17
|
};
|
|
10
|
-
setContext(
|
|
18
|
+
setContext(getFormContextKey(name), formContext);
|
|
11
19
|
return formContext;
|
|
12
20
|
};
|
|
13
|
-
export const getFormContext = () => {
|
|
14
|
-
return getContext(
|
|
21
|
+
export const getFormContext = (name) => {
|
|
22
|
+
return getContext(getFormContextKey(name));
|
|
15
23
|
};
|
package/dist/Menu/Sidebar.svelte
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
<div class="category-items">
|
|
44
|
-
<button class="button" onclick={toggleSidebar}>
|
|
44
|
+
<button type="button" class="button" onclick={toggleSidebar}>
|
|
45
45
|
<span class="material-icons-outlined icon-span">
|
|
46
46
|
{isCollapsed ? 'menu' : 'menu_open'}
|
|
47
47
|
</span>
|
|
@@ -114,19 +114,20 @@
|
|
|
114
114
|
</article>
|
|
115
115
|
</section>
|
|
116
116
|
<section class="progress-wizard-footer">
|
|
117
|
-
<Button variant="outline-none" onclick={oncancel}>Cancel</Button>
|
|
117
|
+
<Button type="button" variant="outline-none" onclick={oncancel}>Cancel</Button>
|
|
118
118
|
|
|
119
119
|
<div class="actions">
|
|
120
120
|
{#if !allStepsDisabled}
|
|
121
121
|
{#if !readonly}
|
|
122
122
|
<Button
|
|
123
|
+
type="button"
|
|
123
124
|
variant="secondary"
|
|
124
125
|
disabled={currentStep === firstActiveStep}
|
|
125
126
|
onclick={onclickBack}>Back</Button
|
|
126
127
|
>
|
|
127
128
|
|
|
128
129
|
{#if currentStep < lastActiveStep}
|
|
129
|
-
<Button variant="primary" onclick={onclickNext}>Next</Button>
|
|
130
|
+
<Button type="button" variant="primary" onclick={onclickNext}>Next</Button>
|
|
130
131
|
{/if}
|
|
131
132
|
{/if}
|
|
132
133
|
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -266,8 +266,10 @@
|
|
|
266
266
|
/>
|
|
267
267
|
{/if}
|
|
268
268
|
{#if enableExportExcel}
|
|
269
|
-
<Button
|
|
270
|
-
|
|
269
|
+
<Button
|
|
270
|
+
type="button"
|
|
271
|
+
variant="secondary"
|
|
272
|
+
onclick={() => exportExcel(table, excelSetting)}>Export</Button
|
|
271
273
|
>
|
|
272
274
|
{/if}
|
|
273
275
|
{@render header?.()}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
let { title, icon, onclickwaffleitems }: Props = $props();
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
|
-
<button onclick={onclickwaffleitems} class="waffle-item-button">
|
|
11
|
+
<button type="button" onclick={onclickwaffleitems} class="waffle-item-button">
|
|
12
12
|
<figure class="waffle-icon-container" aria-hidden="true">
|
|
13
13
|
{@html icon}
|
|
14
14
|
</figure>
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
background: #f4f6f8;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.waffle-item-button:focus,
|
|
42
|
+
.waffle-item-button:focus,
|
|
43
|
+
.waffle-item-button:focus-visible {
|
|
43
44
|
background: #eaecff;
|
|
44
45
|
}
|
|
45
46
|
|