@softwareone/spi-sv5-library 1.8.2 → 1.8.4
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.
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
import { addToast, Spinner } from '../../index.js';
|
|
14
14
|
import { getFormContext } from './context.js';
|
|
15
|
-
import type { FormError } from './types.js';
|
|
16
15
|
import { isEqual } from './helper.js';
|
|
16
|
+
import type { FormError } from './types.js';
|
|
17
17
|
|
|
18
18
|
type Schema = z.infer<typeof schema>;
|
|
19
|
-
type
|
|
19
|
+
type FormEncodingType = 'application/x-www-form-urlencoded' | 'multipart/form-data';
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
22
|
id?: string;
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
action: string;
|
|
25
25
|
schema: z.ZodObject;
|
|
26
26
|
extraData?: Record<string, string | number>;
|
|
27
|
-
enctype?:
|
|
27
|
+
enctype?: FormEncodingType;
|
|
28
|
+
invalidateAll?: boolean;
|
|
28
29
|
onsuccess: (data?: Record<string, unknown>) => void;
|
|
29
30
|
onfailure?: (status: number | undefined, error: unknown) => void;
|
|
30
31
|
children?: Snippet;
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
schema,
|
|
38
39
|
extraData,
|
|
39
40
|
enctype = 'application/x-www-form-urlencoded',
|
|
41
|
+
invalidateAll = true,
|
|
40
42
|
onsuccess,
|
|
41
43
|
onfailure = undefined,
|
|
42
44
|
children
|
|
@@ -79,6 +81,7 @@
|
|
|
79
81
|
applyAction: false,
|
|
80
82
|
autoFocusOnError: true,
|
|
81
83
|
dataType: 'json',
|
|
84
|
+
invalidateAll,
|
|
82
85
|
resetForm: false,
|
|
83
86
|
scrollToError: 'smooth',
|
|
84
87
|
validationMethod: 'oninput',
|
|
@@ -7,6 +7,7 @@ declare const Form: import("svelte").Component<{
|
|
|
7
7
|
schema: z.ZodObject;
|
|
8
8
|
extraData?: Record<string, string | number>;
|
|
9
9
|
enctype?: "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
10
|
+
invalidateAll?: boolean;
|
|
10
11
|
onsuccess: (data?: Record<string, unknown>) => void;
|
|
11
12
|
onfailure?: (status: number | undefined, error: unknown) => void;
|
|
12
13
|
children?: Snippet;
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<header class="header-container">
|
|
58
58
|
<nav class="header-section">
|
|
59
|
+
<div class="header-buttons-container">
|
|
59
60
|
{#if !hideLoader}
|
|
60
61
|
<HeaderLoader />
|
|
61
62
|
{/if}
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
<a href={homeUrl} title="Home">
|
|
87
88
|
<HeaderLogo />
|
|
88
89
|
</a>
|
|
90
|
+
</div>
|
|
89
91
|
<h2 class="header-title">
|
|
90
92
|
{title}
|
|
91
93
|
</h2>
|
|
@@ -111,6 +113,7 @@
|
|
|
111
113
|
width: 40px;
|
|
112
114
|
height: 40px;
|
|
113
115
|
transition: background-color 0.2s ease-in-out;
|
|
116
|
+
padding: 8px;
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
.header-button:hover {
|
|
@@ -122,10 +125,6 @@
|
|
|
122
125
|
color: #374151;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
.header-button .menu-icon {
|
|
126
|
-
transform: scale(1.26);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
128
|
.icon-span {
|
|
130
129
|
font-size: 24px;
|
|
131
130
|
color: #6b7180;
|
|
@@ -136,10 +135,11 @@
|
|
|
136
135
|
gap: 24px;
|
|
137
136
|
justify-content: space-between;
|
|
138
137
|
align-items: center;
|
|
139
|
-
padding:
|
|
138
|
+
padding: 20px 16px;
|
|
140
139
|
background: #fff;
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
box-shadow:
|
|
141
|
+
0 1px 3px 0 rgba(107, 113, 128, 0.2),
|
|
142
|
+
0 1px 16px 0 rgba(107, 113, 128, 0.1);
|
|
143
143
|
position: relative;
|
|
144
144
|
z-index: 50;
|
|
145
145
|
}
|
|
@@ -147,12 +147,19 @@
|
|
|
147
147
|
.header-section {
|
|
148
148
|
display: flex;
|
|
149
149
|
align-items: center;
|
|
150
|
-
gap:
|
|
150
|
+
gap: 32px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.header-buttons-container {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 12px;
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
.header-title {
|
|
154
160
|
color: #000;
|
|
155
161
|
font-size: 24px;
|
|
156
|
-
font-weight:
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
cursor: default;
|
|
157
164
|
}
|
|
158
165
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="86.6667" height="32" viewBox="0 0 65 24" fill="none">
|
|
2
2
|
<path
|
|
3
3
|
d="M22.6371 14.1927C21.6122 19.5775 16.8887 23.4706 11.4225 23.4706C5.12455 23.4706 0 18.3245 0 12C0 5.66061 5.12455 0.529419 11.4225 0.529419C16.9036 0.529419 21.6122 4.42256 22.6371 9.80732V1.17082H29.1282V3.82591C30.9404 1.54372 32.9604 0.529419 35.649 0.529419C40.3725 0.529419 43.2987 3.96015 43.2987 9.509V9.91173C44.1899 4.2734 48.5866 0.529419 54.3499 0.529419C60.6776 0.529419 65 5.31753 65 12.2983V13.7452H49.6115C50.072 16.9075 51.9138 18.7123 54.6766 18.7123C56.6967 18.7123 58.1524 17.7726 58.598 16.1616H64.7029C63.8414 20.547 59.8012 23.4706 54.5875 23.4706C48.7351 23.4706 44.2047 19.7117 43.2987 14.1032V22.8292H36.7036V10.1951C36.7036 7.48039 35.3668 5.97385 32.9753 5.97385C30.7324 5.97385 29.247 7.64447 29.247 10.1951V22.8292H22.6371V14.1927ZM58.5535 9.56866C58.1376 6.74949 56.5334 5.10871 54.2162 5.10871C51.8841 5.10871 50.2502 6.71966 49.7155 9.56866H58.5535Z"
|
|
4
4
|
fill="black"
|