@softwareone/spi-sv5-library 1.14.2 → 1.14.3
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 +2 -2
- package/dist/components/confirmation/Confirmation.svelte +4 -4
- package/dist/components/confirmation/Confirmation.svelte.d.ts +2 -2
- package/dist/components/delete-confirmation/DeleteConfirmation.svelte +4 -4
- package/dist/components/delete-confirmation/DeleteConfirmation.svelte.d.ts +2 -2
- package/dist/components/modal/Modal.svelte +2 -2
- package/dist/components/modal/Modal.svelte.d.ts +1 -1
- package/dist/components/modal/types.d.ts +1 -1
- package/dist/components/processing/Processing.svelte +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Install only what you use:
|
|
|
43
43
|
|
|
44
44
|
<Button onclick={() => (showModal = true)}>Open modal</Button>
|
|
45
45
|
|
|
46
|
-
<Modal bind:showModal title="Hello">
|
|
46
|
+
<Modal bind:show={showModal} title="Hello">
|
|
47
47
|
<p>Modal content goes here.</p>
|
|
48
48
|
</Modal>
|
|
49
49
|
```
|
|
@@ -169,7 +169,7 @@ import { ... } from '@softwareone/spi-sv5-library/table';
|
|
|
169
169
|
</script>
|
|
170
170
|
|
|
171
171
|
<Modal
|
|
172
|
-
bind:showModal
|
|
172
|
+
bind:show={showModal}
|
|
173
173
|
title="Confirm action"
|
|
174
174
|
width="xs" <!-- 'xs' | 'md' | 'lg' | 'xl' -->
|
|
175
175
|
>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
title: string;
|
|
6
6
|
confirmationText: string;
|
|
7
7
|
confirmButtonText?: string;
|
|
8
|
-
|
|
8
|
+
show?: boolean;
|
|
9
9
|
onconfirm: () => Promise<string | void> | string | void;
|
|
10
10
|
onclose?: VoidFunction;
|
|
11
11
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
title,
|
|
15
15
|
confirmationText,
|
|
16
16
|
confirmButtonText = 'Proceed',
|
|
17
|
-
|
|
17
|
+
show = $bindable(false),
|
|
18
18
|
onconfirm,
|
|
19
19
|
onclose
|
|
20
20
|
}: Props = $props();
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
const error = await onconfirm();
|
|
28
28
|
if (error === undefined) {
|
|
29
|
-
|
|
29
|
+
show = false;
|
|
30
30
|
} else {
|
|
31
31
|
addToast({ message: error, type: 'danger' });
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
};
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
|
-
<Modal {title} bind:
|
|
38
|
+
<Modal {title} bind:show {onclose}>
|
|
39
39
|
<Spinner show={isLoading} />
|
|
40
40
|
<p>{confirmationText}</p>
|
|
41
41
|
{#snippet footer()}
|
|
@@ -2,10 +2,10 @@ interface Props {
|
|
|
2
2
|
title: string;
|
|
3
3
|
confirmationText: string;
|
|
4
4
|
confirmButtonText?: string;
|
|
5
|
-
|
|
5
|
+
show?: boolean;
|
|
6
6
|
onconfirm: () => Promise<string | void> | string | void;
|
|
7
7
|
onclose?: VoidFunction;
|
|
8
8
|
}
|
|
9
|
-
declare const Confirmation: import("svelte").Component<Props, {}, "
|
|
9
|
+
declare const Confirmation: import("svelte").Component<Props, {}, "show">;
|
|
10
10
|
type Confirmation = ReturnType<typeof Confirmation>;
|
|
11
11
|
export default Confirmation;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
interface Props {
|
|
5
5
|
confirmationName?: string;
|
|
6
6
|
enableDoubleConfirmation?: boolean;
|
|
7
|
-
|
|
7
|
+
show?: boolean;
|
|
8
8
|
ondelete: () => Promise<string | void> | string | void;
|
|
9
9
|
onclose?: VoidFunction;
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
let {
|
|
13
13
|
confirmationName = '',
|
|
14
14
|
enableDoubleConfirmation = false,
|
|
15
|
-
|
|
15
|
+
show = $bindable(false),
|
|
16
16
|
ondelete,
|
|
17
17
|
onclose
|
|
18
18
|
}: Props = $props();
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
const error = await ondelete();
|
|
31
31
|
if (error === undefined) {
|
|
32
|
-
|
|
32
|
+
show = false;
|
|
33
33
|
} else {
|
|
34
34
|
addToast({ message: error, type: 'danger' });
|
|
35
35
|
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
};
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
|
-
<Modal title="Delete confirmation" bind:
|
|
41
|
+
<Modal title="Delete confirmation" bind:show {onclose}>
|
|
42
42
|
<Spinner show={isLoading} />
|
|
43
43
|
<div class="content">
|
|
44
44
|
<p>{confirmationText}</p>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
confirmationName?: string;
|
|
3
3
|
enableDoubleConfirmation?: boolean;
|
|
4
|
-
|
|
4
|
+
show?: boolean;
|
|
5
5
|
ondelete: () => Promise<string | void> | string | void;
|
|
6
6
|
onclose?: VoidFunction;
|
|
7
7
|
}
|
|
8
|
-
declare const DeleteConfirmation: import("svelte").Component<Props, {}, "
|
|
8
|
+
declare const DeleteConfirmation: import("svelte").Component<Props, {}, "show">;
|
|
9
9
|
type DeleteConfirmation = ReturnType<typeof DeleteConfirmation>;
|
|
10
10
|
export default DeleteConfirmation;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
10
|
// eslint-disable-next-line no-useless-assignment
|
|
11
|
-
|
|
11
|
+
show = $bindable(false),
|
|
12
12
|
title,
|
|
13
13
|
width = 'xs',
|
|
14
14
|
errorIcon,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}: ModalProps = $props();
|
|
21
21
|
|
|
22
22
|
const onHandleClose = () => {
|
|
23
|
-
|
|
23
|
+
show = false;
|
|
24
24
|
onclose?.();
|
|
25
25
|
};
|
|
26
26
|
</script>
|