@soleil-se/config-svelte 1.0.0 → 1.0.2

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
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+ ## [1.0.2] - 2020-12-08
7
+ ### Fixed
8
+ - Array destructuring not working in TextList for IE11.
9
+ - RadioGroup value not working in IE11.
10
+ - Added missing polyfills for IE11 in docs and demo.
11
+
12
+ ## [1.0.1] - 2020-12-08
13
+ ### Fixed
14
+ - Selectable props in NodeSelector, ListSelector and DropdownSelector now also accepts a string.
15
+ - Margin on CheckboxGroup and RadioGroup controls.
6
16
 
7
17
  ## [1.0.0] - 2020-11-20
8
18
  - Initial release!
@@ -74,7 +74,7 @@
74
74
 
75
75
  label {
76
76
  position: relative;
77
- padding-right: 5px;
77
+ padding-right: 10px;
78
78
  padding-left: 0;
79
79
 
80
80
  &::before {
@@ -13,6 +13,8 @@
13
13
  export let required = false;
14
14
  export let disabled = false;
15
15
  export let value = '';
16
+
17
+ selectable = Array.isArray(selectable) ? selectable.join(',') : selectable;
16
18
  value = name ? values[name] ?? value : value;
17
19
 
18
20
  let className = '';
@@ -45,7 +47,7 @@
45
47
  {disabled}
46
48
  data-component={type}
47
49
  data-removable
48
- data-types={[...selectable].join(',')}
50
+ data-types={selectable}
49
51
  />
50
52
  <slot />
51
53
  </div>
@@ -14,6 +14,7 @@
14
14
  export let selectable = [];
15
15
  export let value = [];
16
16
 
17
+ selectable = Array.isArray(selectable) ? selectable.join(',') : selectable;
17
18
  // SiteVision saves as an object, we need the value as comma separated string.
18
19
  value = (values[name] ?? value).map((v) => v.value).join(',');
19
20
 
@@ -24,7 +25,7 @@
24
25
  };
25
26
 
26
27
  onMount(() => {
27
- const [element] = setupComponent(id);
28
+ const element = setupComponent(id)[0];
28
29
 
29
30
  // SiteVision doesn't provide any change or update events, MutationObserver workaround.
30
31
  const observer = new MutationObserver(([{ attributeName, target }]) => {
@@ -46,7 +47,7 @@
46
47
  type="hidden"
47
48
  data-component={type}
48
49
  {required}
49
- data-types={[...selectable].join(',')}
50
+ data-types={selectable}
50
51
  {value}
51
52
  />
52
53
  {#if disabled}
@@ -16,6 +16,8 @@
16
16
  export let removable = false;
17
17
  export let selectable = [];
18
18
  export let value = '';
19
+
20
+ selectable = Array.isArray(selectable) ? selectable.join(',') : selectable;
19
21
  value = name ? values[name] ?? value : value;
20
22
 
21
23
  let className = '';
@@ -58,7 +60,7 @@
58
60
  {readonly}
59
61
  data-removable={removable}
60
62
  data-component={type}
61
- data-types={[...selectable].join(',')}
63
+ data-types={selectable}
62
64
  value={displayName}
63
65
  data-value={value}
64
66
  />
@@ -25,14 +25,15 @@
25
25
  </script>
26
26
 
27
27
  <template>
28
+ {value}
28
29
  <fieldset class="form-group">
29
30
  <legend>{legend}</legend>
30
31
  {#each options as option, index}
31
32
  <input
32
33
  id={`${id}_${index}`}
33
- {name}
34
34
  bind:group={value}
35
35
  value={option.value || option}
36
+ checked={option.value || option}
36
37
  disabled={isDisabled(option)}
37
38
  type="radio"
38
39
  class="sr-only"
@@ -43,6 +44,7 @@
43
44
  </label>
44
45
  {/each}
45
46
  </fieldset>
47
+ <input type="hidden" {value} {name} />
46
48
  </template>
47
49
 
48
50
  <style lang="scss">
@@ -55,7 +57,7 @@
55
57
 
56
58
  label {
57
59
  position: relative;
58
- padding-right: 5px;
60
+ padding-right: 10px;
59
61
  padding-left: 0;
60
62
 
61
63
  &::before {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/config-svelte",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "./index.js",
5
5
  "module": "./index.js",
6
6
  "svelte": "./index.js",