@soleil-se/config-svelte 1.3.0 → 1.3.1
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/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.3.
|
|
8
|
+
## [1.3.1] - 2021-04-29
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- Default value for LinkSelector type is not set.
|
|
13
|
+
- ImageSelector does not clear alt-text from image archive.
|
|
14
|
+
|
|
15
|
+
## [1.3.0] - 2021-04-28
|
|
9
16
|
|
|
10
17
|
## Added
|
|
11
18
|
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
validationEl?.setCustomValidity(imageArchiveAlt ? '' : 'Bilden saknar beskrivning (alt-text). Klicka på bilden ovan och skriv texten i fältet Bildbeskrivning.');
|
|
33
33
|
} else {
|
|
34
|
+
imageArchiveAlt = '';
|
|
34
35
|
validationEl?.setCustomValidity('');
|
|
35
36
|
}
|
|
36
37
|
triggerInput(validationEl);
|
|
@@ -4,16 +4,14 @@ const getDefaultValue = (types) => ({
|
|
|
4
4
|
value: '',
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
export default function getSavedValue({ value, name, types }) {
|
|
7
|
+
export default function getSavedValue({ value = {}, name, types }) {
|
|
8
8
|
const values = window.CONFIG_VALUES || {};
|
|
9
9
|
|
|
10
|
+
const defaultValue = getDefaultValue(types);
|
|
11
|
+
|
|
10
12
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: values[`${name}Type`],
|
|
15
|
-
newWindow: values[`${name}NewWindow`],
|
|
16
|
-
value: values[`${name}Value`],
|
|
17
|
-
} : {}),
|
|
13
|
+
type: value.type || values[`${name}Type`] || defaultValue.type,
|
|
14
|
+
newWindow: value.newWindow || values[`${name}NewWindow`] || defaultValue.newWindow,
|
|
15
|
+
value: value.value || values[`${name}Value`] || defaultValue.value,
|
|
18
16
|
};
|
|
19
17
|
}
|