@soleil-se/config-svelte 1.27.3 → 1.27.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.
|
@@ -4,13 +4,19 @@ export default createI18n({
|
|
|
4
4
|
sv: {
|
|
5
5
|
add: 'Lägg till...',
|
|
6
6
|
edit: 'Redigera',
|
|
7
|
+
ok: 'OK',
|
|
8
|
+
remove: 'Ta bort',
|
|
7
9
|
},
|
|
8
10
|
no: {
|
|
9
11
|
add: 'Legg till...',
|
|
10
12
|
edit: 'Redigere',
|
|
13
|
+
ok: 'OK',
|
|
14
|
+
remove: 'Fjern',
|
|
11
15
|
},
|
|
12
16
|
en: {
|
|
13
17
|
add: 'Add...',
|
|
14
18
|
edit: 'Edit',
|
|
19
|
+
ok: 'OK',
|
|
20
|
+
remove: 'Remove',
|
|
15
21
|
},
|
|
16
22
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { createEventDispatcher } from 'svelte';
|
|
3
3
|
|
|
4
|
+
import i18n from '../i18n';
|
|
5
|
+
|
|
4
6
|
export let id;
|
|
5
7
|
export let disabled;
|
|
6
8
|
export let icon;
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
</script>
|
|
18
20
|
|
|
19
21
|
<!-- This is handled by the click event on the edit button -->
|
|
22
|
+
<!-- eslint-disable-next-line svelte/no-unused-svelte-ignore -->
|
|
20
23
|
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-static-element-interactions -->
|
|
21
24
|
<div class="list-component__item" on:dblclick={editItem} on:click>
|
|
22
25
|
{#if icon}
|
|
@@ -26,10 +29,10 @@
|
|
|
26
29
|
<slot />
|
|
27
30
|
</span>
|
|
28
31
|
<div class="list-component__item-actions">
|
|
29
|
-
<button {disabled} on:click={editItem}>
|
|
32
|
+
<button aria-label={i18n('ok')} {disabled} on:click={editItem}>
|
|
30
33
|
<i class="glyphicons edit" aria-hidden="true"></i>
|
|
31
34
|
</button>
|
|
32
|
-
<button {disabled} on:click={removeItem}>
|
|
35
|
+
<button aria-label={i18n('remove')} {disabled} on:click={removeItem}>
|
|
33
36
|
<i class="glyphicons remove-2" aria-hidden="true"></i>
|
|
34
37
|
</button>
|
|
35
38
|
<i class="glyphicons move" aria-hidden="true"></i>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint svelte/no-unused-svelte-ignore: "off" */
|
|
3
3
|
|
|
4
4
|
import validate from '@soleil-se/config-validate';
|
|
5
|
-
import { onMount, createEventDispatcher } from 'svelte';
|
|
5
|
+
import { onMount, onDestroy, createEventDispatcher } from 'svelte';
|
|
6
6
|
import A11yDialog from 'a11y-dialog';
|
|
7
7
|
import { generateId } from '../../utils';
|
|
8
8
|
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
onMount(() => {
|
|
107
|
-
a11yDialog = new A11yDialog(element)
|
|
107
|
+
a11yDialog = new A11yDialog(element);
|
|
108
108
|
|
|
109
109
|
a11yDialog.on('show', () => {
|
|
110
110
|
select2DropAddedObserver.observe(document.body, { childList: true });
|
|
@@ -131,6 +131,10 @@
|
|
|
131
131
|
|
|
132
132
|
if (open) a11yDialog.show();
|
|
133
133
|
});
|
|
134
|
+
|
|
135
|
+
onDestroy(() => {
|
|
136
|
+
a11yDialog?.destroy();
|
|
137
|
+
});
|
|
134
138
|
</script>
|
|
135
139
|
|
|
136
140
|
<svelte:window on:keydown={handleEscape} />
|
|
@@ -3,11 +3,20 @@ import createI18n from '../../utils/createI18n';
|
|
|
3
3
|
export default createI18n({
|
|
4
4
|
sv: {
|
|
5
5
|
add: 'Lägg till...',
|
|
6
|
+
ok: 'OK',
|
|
7
|
+
remove: 'Ta bort',
|
|
8
|
+
cancel: 'Avbryt',
|
|
6
9
|
},
|
|
7
10
|
no: {
|
|
8
11
|
add: 'Legg till...',
|
|
12
|
+
ok: 'OK',
|
|
13
|
+
remove: 'Fjern',
|
|
14
|
+
cancel: 'Avbryt',
|
|
9
15
|
},
|
|
10
16
|
en: {
|
|
11
17
|
add: 'Add...',
|
|
18
|
+
ok: 'OK',
|
|
19
|
+
remove: 'Remove',
|
|
20
|
+
cancel: 'Cancel',
|
|
12
21
|
},
|
|
13
22
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { tick, createEventDispatcher, onMount } from 'svelte';
|
|
3
3
|
|
|
4
|
+
import i18n from '../i18n';
|
|
5
|
+
|
|
4
6
|
export let id;
|
|
5
7
|
export let value;
|
|
6
8
|
export let edit = false;
|
|
@@ -67,24 +69,30 @@
|
|
|
67
69
|
/>
|
|
68
70
|
|
|
69
71
|
<span class="input-group-btn">
|
|
70
|
-
<button class="btn btn-default" type="button" on:click={updateItem}>
|
|
72
|
+
<button class="btn btn-default" aria-label={i18n('ok')} type="button" on:click={updateItem}>
|
|
71
73
|
<i class="glyphicons ok-2"></i>
|
|
72
74
|
</button>
|
|
73
|
-
<button
|
|
75
|
+
<button
|
|
76
|
+
class="btn btn-default"
|
|
77
|
+
aria-label={i18n('remove')}
|
|
78
|
+
type="button"
|
|
79
|
+
on:click={abortEdit}
|
|
80
|
+
>
|
|
74
81
|
<i class="glyphicons remove-2"></i>
|
|
75
82
|
</button>
|
|
76
83
|
</span>
|
|
77
84
|
</div>
|
|
78
85
|
</div>
|
|
79
86
|
{:else}
|
|
87
|
+
<!-- eslint-disable-next-line svelte/no-unused-svelte-ignore -->
|
|
80
88
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
81
89
|
<div on:dblclick={editItem}>
|
|
82
90
|
<span class="item-name">{value}</span>
|
|
83
91
|
<div class="list-component__item-actions">
|
|
84
|
-
<button on:click={editItem}>
|
|
92
|
+
<button aria-label={i18n('ok')} on:click={editItem}>
|
|
85
93
|
<i class="glyphicons edit" aria-hidden="true"></i>
|
|
86
94
|
</button>
|
|
87
|
-
<button on:click={removeItem}>
|
|
95
|
+
<button aria-label={i18n('cancel')} on:click={removeItem}>
|
|
88
96
|
<i class="glyphicons remove-2" aria-hidden="true"></i>
|
|
89
97
|
</button>
|
|
90
98
|
<i class="glyphicons move" aria-hidden="true"></i>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soleil-se/config-svelte",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.4",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"svelte": "./index.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
37
37
|
"eslint-config-prettier": "^9.1.0",
|
|
38
38
|
"eslint-plugin-import": "^2.30.0",
|
|
39
|
-
"eslint-plugin-svelte": "^2.44.
|
|
39
|
+
"eslint-plugin-svelte": "^2.44.1",
|
|
40
40
|
"glob": "^11.0.0",
|
|
41
41
|
"stylelint": "^16.9.0",
|
|
42
42
|
"sveld": "^0.20.2",
|
|
43
43
|
"svelte": "^4.2.19",
|
|
44
|
-
"svelte-preprocess": "^6.0.
|
|
44
|
+
"svelte-preprocess": "^6.0.3"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@soleil-se/config-validate": "^1.2.1",
|
|
48
48
|
"a11y-dialog": "8.1.1",
|
|
49
|
-
"svelte-dnd-action": "^0.9.
|
|
49
|
+
"svelte-dnd-action": "^0.9.51"
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://docs.soleil.se/packages/config-svelte",
|
|
52
52
|
"scripts": {
|