not-bulma 2.0.15 → 2.0.17
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/package.json +1 -1
- package/src/elements/block/ui.block.inner.vertical.svelte +4 -5
- package/src/elements/block/ui.block.svelte +10 -13
- package/src/elements/block/ui.box.svelte +10 -13
- package/src/elements/block/ui.content.svelte +10 -14
- package/src/elements/list/ui.list.block.svelte +11 -6
- package/src/elements/list/ui.list.item.svelte +27 -36
- package/src/elements/list/ui.list.select.buttons.with.groups.svelte +10 -19
- package/src/elements/list/ui.list.select.svelte +17 -30
- package/src/elements/list/ui.list.select.with.groups.svelte +30 -38
- package/src/elements/list/ui.list.svelte +15 -16
- package/src/elements/various/ui.loader.svelte +19 -9
- package/src/frame/components/table/notTable.svelte +95 -46
- package/src/frame/components/table/notTable.svelte.js +53 -24
- package/src/frame/components/table/notTableRow.svelte +1 -1
- package/src/frame/crud/actions/list.js +17 -22
- package/src/frame/ui.adapter.svelte.js +5 -0
- package/src/scss/_loader.scss +9 -0
- package/src/frame/components/table/notTable.js +0 -850
package/package.json
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { run } from 'svelte/legacy';
|
|
3
|
-
|
|
4
2
|
import UIBlock from "./ui.block.svelte";
|
|
5
3
|
/**
|
|
6
4
|
* @typedef {Object} Props
|
|
@@ -10,14 +8,15 @@
|
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
10
|
/** @type {Props} */
|
|
13
|
-
let { id
|
|
11
|
+
let { id, class: classes = "", children } = $props();
|
|
14
12
|
|
|
15
13
|
let classesInner;
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
$effect(() => {
|
|
17
16
|
classesInner = `block-inner-vertical ${classes}`;
|
|
18
17
|
});
|
|
19
18
|
</script>
|
|
20
19
|
|
|
21
|
-
<UIBlock
|
|
20
|
+
<UIBlock {id} class={classesInner}>
|
|
22
21
|
{@render children?.()}
|
|
23
22
|
</UIBlock>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createBubbler } from 'svelte/legacy';
|
|
3
|
-
|
|
4
|
-
const bubble = createBubbler();
|
|
5
|
-
import { createEventDispatcher } from "svelte";
|
|
6
|
-
const dispatch = createEventDispatcher();
|
|
7
2
|
/**
|
|
8
3
|
* @typedef {Object} Props
|
|
9
4
|
* @property {string} [id]
|
|
@@ -12,15 +7,17 @@
|
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
/** @type {Props} */
|
|
15
|
-
let {
|
|
10
|
+
let {
|
|
11
|
+
id = "",
|
|
12
|
+
class: classes = "",
|
|
13
|
+
role = "button",
|
|
14
|
+
onclick,
|
|
15
|
+
onkeyup,
|
|
16
|
+
onkeydown,
|
|
17
|
+
children,
|
|
18
|
+
} = $props();
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
<div
|
|
19
|
-
{id}
|
|
20
|
-
class="block {classes}"
|
|
21
|
-
onclick={bubble('click')}
|
|
22
|
-
onkeyup={() => dispatch("click")}
|
|
23
|
-
role="button"
|
|
24
|
-
>
|
|
21
|
+
<div {id} class="block {classes}" {role} {onclick} {onkeyup} {onkeydown}>
|
|
25
22
|
{@render children?.()}
|
|
26
23
|
</div>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createBubbler } from 'svelte/legacy';
|
|
3
|
-
|
|
4
|
-
const bubble = createBubbler();
|
|
5
|
-
import { createEventDispatcher } from "svelte";
|
|
6
|
-
const dispatch = createEventDispatcher();
|
|
7
2
|
/**
|
|
8
3
|
* @typedef {Object} Props
|
|
9
4
|
* @property {string} [id]
|
|
@@ -12,15 +7,17 @@
|
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
/** @type {Props} */
|
|
15
|
-
let {
|
|
10
|
+
let {
|
|
11
|
+
id = "",
|
|
12
|
+
class: classes = "",
|
|
13
|
+
role = "button",
|
|
14
|
+
onclick,
|
|
15
|
+
onkeyup,
|
|
16
|
+
onkeydown,
|
|
17
|
+
children,
|
|
18
|
+
} = $props();
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
<div
|
|
19
|
-
{id}
|
|
20
|
-
class="box {classes} "
|
|
21
|
-
onclick={bubble('click')}
|
|
22
|
-
onkeyup={() => dispatch("click")}
|
|
23
|
-
role="button"
|
|
24
|
-
>
|
|
21
|
+
<div {id} class="box {classes} " {onclick} {onkeyup} {onkeydown} {role}>
|
|
25
22
|
{@render children?.()}
|
|
26
23
|
</div>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createBubbler } from 'svelte/legacy';
|
|
3
|
-
|
|
4
|
-
const bubble = createBubbler();
|
|
5
|
-
import { createEventDispatcher } from "svelte";
|
|
6
|
-
const dispatch = createEventDispatcher();
|
|
7
2
|
/**
|
|
8
3
|
* @typedef {Object} Props
|
|
9
4
|
* @property {string} [id]
|
|
@@ -12,16 +7,17 @@
|
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
/** @type {Props} */
|
|
15
|
-
let {
|
|
10
|
+
let {
|
|
11
|
+
id = "",
|
|
12
|
+
class: classes = "",
|
|
13
|
+
role = "button",
|
|
14
|
+
onclick,
|
|
15
|
+
onkeyup,
|
|
16
|
+
onkeydown,
|
|
17
|
+
children,
|
|
18
|
+
} = $props();
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
<div
|
|
19
|
-
role="button"
|
|
20
|
-
tabindex="0"
|
|
21
|
-
{id}
|
|
22
|
-
class="content {classes}"
|
|
23
|
-
onclick={bubble('click')}
|
|
24
|
-
onkeyup={() => dispatch("click")}
|
|
25
|
-
>
|
|
21
|
+
<div {id} class="content {classes} " {onclick} {onkeyup} {onkeydown} {role}>
|
|
26
22
|
{@render children?.()}
|
|
27
23
|
</div>
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
descriptionComponentProps = {},
|
|
35
35
|
imageComponent,
|
|
36
36
|
imageComponentProps = {},
|
|
37
|
+
onclick = () => {},
|
|
38
|
+
onclickContent = () => {},
|
|
39
|
+
onclickDescription = () => {},
|
|
40
|
+
onclickImage = () => {},
|
|
41
|
+
onclickTitle = () => {},
|
|
37
42
|
} = $props();
|
|
38
43
|
</script>
|
|
39
44
|
|
|
@@ -52,15 +57,15 @@
|
|
|
52
57
|
listActions={actions}
|
|
53
58
|
listLinks={links}
|
|
54
59
|
commonClasses={itemClasses}
|
|
55
|
-
|
|
60
|
+
bindvalue={items[index]}
|
|
56
61
|
{index}
|
|
57
62
|
first={index === 0}
|
|
58
63
|
last={index === items.length - 1}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
{onclick}
|
|
65
|
+
{onclickContent}
|
|
66
|
+
{onclickDescription}
|
|
67
|
+
{onclickImage}
|
|
68
|
+
{onclickTitle}
|
|
64
69
|
/>
|
|
65
70
|
{/each}
|
|
66
71
|
{/if}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
2
|
+
import { preventDefault } from "svelte/legacy";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
const dispatch = createEventDispatcher();
|
|
4
|
+
import { onMount } from "svelte";
|
|
6
5
|
|
|
7
6
|
import UITitle from "../various/ui.title.svelte";
|
|
8
7
|
import UIButtons from "../button/ui.buttons.svelte";
|
|
9
8
|
import UILinks from "../link/ui.links.svelte";
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
10
|
/**
|
|
19
11
|
* @typedef {Object} Props
|
|
20
12
|
* @property {any} title
|
|
@@ -58,22 +50,27 @@
|
|
|
58
50
|
descriptionComponent,
|
|
59
51
|
descriptionComponentProps = {},
|
|
60
52
|
imageComponent,
|
|
61
|
-
imageComponentProps = {}
|
|
53
|
+
imageComponentProps = {},
|
|
54
|
+
onclick = () => {},
|
|
55
|
+
onclickImage = () => {},
|
|
56
|
+
onclickContent = () => {},
|
|
57
|
+
onclickTitle = () => {},
|
|
58
|
+
onclickDescription = () => {},
|
|
62
59
|
} = $props();
|
|
63
60
|
|
|
64
61
|
function onClick() {
|
|
65
|
-
|
|
62
|
+
onclick(value);
|
|
66
63
|
}
|
|
67
64
|
|
|
68
65
|
let allActions = $state([]);
|
|
69
|
-
|
|
66
|
+
$effect(() => {
|
|
70
67
|
allActions = [...actions, ...listActions].map((btn) => {
|
|
71
68
|
return { ...btn, action: () => btn.action(value) };
|
|
72
69
|
});
|
|
73
70
|
});
|
|
74
71
|
|
|
75
72
|
let allLinks = $state([]);
|
|
76
|
-
|
|
73
|
+
$effect(() => {
|
|
77
74
|
allLinks = [...links, ...listLinks];
|
|
78
75
|
});
|
|
79
76
|
</script>
|
|
@@ -102,27 +99,21 @@
|
|
|
102
99
|
onkeyup={preventDefault((e) => {
|
|
103
100
|
if (e && e.key == "Enter") {
|
|
104
101
|
onClick();
|
|
105
|
-
|
|
102
|
+
onclickImage(value);
|
|
106
103
|
}
|
|
107
104
|
})}
|
|
108
105
|
onclick={preventDefault(() => {
|
|
109
106
|
onClick();
|
|
110
|
-
|
|
107
|
+
onclickImage(value);
|
|
111
108
|
})}
|
|
112
109
|
>
|
|
113
110
|
{#if imageComponent}
|
|
114
111
|
{#if typeof image === "string"}
|
|
115
112
|
{@const SvelteComponent = imageComponent}
|
|
116
|
-
<SvelteComponent
|
|
117
|
-
value={image}
|
|
118
|
-
{...imageComponentProps}
|
|
119
|
-
/>
|
|
113
|
+
<SvelteComponent value={image} {...imageComponentProps} />
|
|
120
114
|
{:else}
|
|
121
115
|
{@const SvelteComponent_1 = imageComponent}
|
|
122
|
-
<SvelteComponent_1
|
|
123
|
-
{...image}
|
|
124
|
-
{...imageComponentProps}
|
|
125
|
-
/>
|
|
116
|
+
<SvelteComponent_1 {...image} {...imageComponentProps} />
|
|
126
117
|
{/if}
|
|
127
118
|
{:else}
|
|
128
119
|
<figure class="image is-64x64">
|
|
@@ -137,12 +128,12 @@
|
|
|
137
128
|
class="list-item-content"
|
|
138
129
|
onclick={preventDefault(() => {
|
|
139
130
|
onClick();
|
|
140
|
-
|
|
131
|
+
onclickContent(value);
|
|
141
132
|
})}
|
|
142
133
|
onkeyup={preventDefault((e) => {
|
|
143
134
|
if (e && e.key == "Enter") {
|
|
144
135
|
onClick();
|
|
145
|
-
|
|
136
|
+
onclickContent(value);
|
|
146
137
|
}
|
|
147
138
|
})}
|
|
148
139
|
>
|
|
@@ -154,12 +145,12 @@
|
|
|
154
145
|
onkeyup={preventDefault((e) => {
|
|
155
146
|
if (e && e.key == "Enter") {
|
|
156
147
|
onClick();
|
|
157
|
-
|
|
148
|
+
onclickTitle(value);
|
|
158
149
|
}
|
|
159
150
|
})}
|
|
160
151
|
onclick={preventDefault(() => {
|
|
161
152
|
onClick();
|
|
162
|
-
|
|
153
|
+
onclickTitle(value);
|
|
163
154
|
})}
|
|
164
155
|
>
|
|
165
156
|
{#if titleComponent}
|
|
@@ -168,14 +159,14 @@
|
|
|
168
159
|
<SvelteComponent_2
|
|
169
160
|
{title}
|
|
170
161
|
{...titleComponentProps}
|
|
171
|
-
|
|
162
|
+
{onchange}
|
|
172
163
|
/>
|
|
173
164
|
{:else}
|
|
174
165
|
{@const SvelteComponent_3 = titleComponent}
|
|
175
166
|
<SvelteComponent_3
|
|
176
167
|
{...title}
|
|
177
168
|
{...titleComponentProps}
|
|
178
|
-
|
|
169
|
+
{onchange}
|
|
179
170
|
/>
|
|
180
171
|
{/if}
|
|
181
172
|
{:else}
|
|
@@ -190,13 +181,13 @@
|
|
|
190
181
|
onkeyup={preventDefault((e) => {
|
|
191
182
|
if (e && e.key == "Enter") {
|
|
192
183
|
onClick();
|
|
193
|
-
|
|
184
|
+
onclickDescription(value);
|
|
194
185
|
}
|
|
195
186
|
})}
|
|
196
187
|
class="list-item-description"
|
|
197
188
|
onclick={preventDefault(() => {
|
|
198
189
|
onClick();
|
|
199
|
-
|
|
190
|
+
onclickDescription(value);
|
|
200
191
|
})}
|
|
201
192
|
>
|
|
202
193
|
{#if descriptionComponent}
|
|
@@ -205,16 +196,16 @@
|
|
|
205
196
|
<SvelteComponent_4
|
|
206
197
|
value={description}
|
|
207
198
|
{...descriptionComponentProps}
|
|
208
|
-
|
|
209
|
-
|
|
199
|
+
{onchange}
|
|
200
|
+
{onclick}
|
|
210
201
|
/>
|
|
211
202
|
{:else}
|
|
212
203
|
{@const SvelteComponent_5 = descriptionComponent}
|
|
213
204
|
<SvelteComponent_5
|
|
214
205
|
{...description}
|
|
215
206
|
{...descriptionComponentProps}
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
{onchange}
|
|
208
|
+
{onclick}
|
|
218
209
|
/>
|
|
219
210
|
{/if}
|
|
220
211
|
{:else}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount
|
|
3
|
-
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
|
|
4
4
|
//
|
|
5
5
|
import UIList from "./ui.list.svelte";
|
|
6
6
|
import UITitle from "../various/ui.title.svelte";
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
import UIButtons from "../button/ui.buttons.svelte";
|
|
9
9
|
import UIButtonsSwitchers from "../button/ui.buttons.switchers.svelte";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
11
|
/**
|
|
22
12
|
* @typedef {Object} Props
|
|
23
13
|
* @property {string} [fieldname]
|
|
@@ -82,11 +72,12 @@ value: variantId
|
|
|
82
72
|
listComponentProps = {},
|
|
83
73
|
actionsList = ["selectAll", "deselectAll"],
|
|
84
74
|
sublimeValue = (value) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
return {
|
|
76
|
+
groupId: value.group,
|
|
77
|
+
valueId: value.id,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
onchange = () => {},
|
|
90
81
|
} = $props();
|
|
91
82
|
//
|
|
92
83
|
|
|
@@ -187,7 +178,7 @@ value: variantId
|
|
|
187
178
|
|
|
188
179
|
function triggerChange() {
|
|
189
180
|
value = getSelectedItems();
|
|
190
|
-
|
|
181
|
+
onchange({
|
|
191
182
|
fieldname,
|
|
192
183
|
value,
|
|
193
184
|
});
|
|
@@ -200,7 +191,7 @@ value: variantId
|
|
|
200
191
|
|
|
201
192
|
<SvelteComponent
|
|
202
193
|
{...listComponentProps}
|
|
203
|
-
|
|
194
|
+
items={variants}
|
|
204
195
|
{titleComponent}
|
|
205
196
|
{titleComponentProps}
|
|
206
197
|
{descriptionComponent}
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount
|
|
3
|
-
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
|
|
4
4
|
//
|
|
5
5
|
import UIList from "./ui.list.svelte";
|
|
6
6
|
import UITitle from "../various/ui.title.svelte";
|
|
7
7
|
import UIImage from "../image/ui.image.svelte";
|
|
8
8
|
import UIButtons from "../button/ui.buttons.svelte";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
10
|
/**
|
|
25
11
|
* @typedef {Object} Props
|
|
26
12
|
* @property {string} [fieldname]
|
|
@@ -72,22 +58,23 @@ value:object
|
|
|
72
58
|
listComponentProps = {},
|
|
73
59
|
sublimeValue = (value) => value.id,
|
|
74
60
|
getItem = ({ valueId }) => {
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
return variants.find((btnVal) => btnVal.value.id === valueId);
|
|
62
|
+
},
|
|
77
63
|
getItemValue = ({ valueId }) => {
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
return getItem({ valueId }).value;
|
|
65
|
+
},
|
|
80
66
|
getDefaultItemSublime = () => {
|
|
81
|
-
|
|
82
|
-
|
|
67
|
+
return variants[0].id;
|
|
68
|
+
},
|
|
83
69
|
uiOn = (item) => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
70
|
+
item.color = "success";
|
|
71
|
+
item.outlined = false;
|
|
72
|
+
},
|
|
87
73
|
uiOff = (item) => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
74
|
+
item.color = false;
|
|
75
|
+
item.outlined = true;
|
|
76
|
+
},
|
|
77
|
+
onchange = () => {},
|
|
91
78
|
} = $props();
|
|
92
79
|
|
|
93
80
|
onMount(() => {
|
|
@@ -172,7 +159,7 @@ value:object
|
|
|
172
159
|
//
|
|
173
160
|
updateValue();
|
|
174
161
|
//
|
|
175
|
-
|
|
162
|
+
onchange({
|
|
176
163
|
field: fieldname,
|
|
177
164
|
value,
|
|
178
165
|
});
|
|
@@ -217,7 +204,7 @@ value:object
|
|
|
217
204
|
|
|
218
205
|
<SvelteComponent
|
|
219
206
|
{...listComponentProps}
|
|
220
|
-
|
|
207
|
+
items={variants}
|
|
221
208
|
{titleComponent}
|
|
222
209
|
{titleComponentProps}
|
|
223
210
|
{descriptionComponent}
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount
|
|
3
|
-
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
|
|
4
4
|
//
|
|
5
5
|
import UIList from "./ui.list.svelte";
|
|
6
6
|
import UITitle from "../various/ui.title.svelte";
|
|
7
7
|
import UIImage from "../image/ui.image.svelte";
|
|
8
8
|
import UIButtons from "../button/ui.buttons.svelte";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
10
|
/**
|
|
22
11
|
* @typedef {Object} Props
|
|
23
12
|
* @property {string} [fieldname]
|
|
@@ -91,33 +80,36 @@ value: variantId
|
|
|
91
80
|
listComponent = UIList,
|
|
92
81
|
listComponentProps = {},
|
|
93
82
|
sublimeValue = (value) => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
return {
|
|
84
|
+
groupId: value.group,
|
|
85
|
+
valueId: value.id,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
99
88
|
getItem = ({ groupId, valueId }) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
return variants
|
|
90
|
+
.find((group) => group.id === groupId)
|
|
91
|
+
.description.values.find(
|
|
92
|
+
(btnVal) => btnVal.value.id === valueId
|
|
93
|
+
);
|
|
94
|
+
},
|
|
104
95
|
getItemValue = ({ groupId, valueId }) => {
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
return getItem({ groupId, valueId }).value;
|
|
97
|
+
},
|
|
107
98
|
getDefaultItemSublime = () => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
return {
|
|
100
|
+
groupId: variants[0].id,
|
|
101
|
+
valueId: variants[0].description.values[0].value.id,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
113
104
|
uiOn = (item) => {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
item.color = "success";
|
|
106
|
+
item.outlined = false;
|
|
107
|
+
},
|
|
117
108
|
uiOff = (item) => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
item.color = false;
|
|
110
|
+
item.outlined = false;
|
|
111
|
+
},
|
|
112
|
+
onchange = () => {},
|
|
121
113
|
} = $props();
|
|
122
114
|
|
|
123
115
|
onMount(() => {
|
|
@@ -236,12 +228,12 @@ value: variantId
|
|
|
236
228
|
//
|
|
237
229
|
function toggle(detail) {
|
|
238
230
|
let ui = updateSelected(detail);
|
|
239
|
-
|
|
231
|
+
|
|
240
232
|
updateUI(ui);
|
|
241
233
|
//
|
|
242
234
|
updateValue();
|
|
243
235
|
//
|
|
244
|
-
|
|
236
|
+
onchange({
|
|
245
237
|
field: fieldname,
|
|
246
238
|
value,
|
|
247
239
|
});
|
|
@@ -313,7 +305,7 @@ value: variantId
|
|
|
313
305
|
|
|
314
306
|
<SvelteComponent
|
|
315
307
|
{...listComponentProps}
|
|
316
|
-
|
|
308
|
+
items={variants}
|
|
317
309
|
{titleComponent}
|
|
318
310
|
{titleComponentProps}
|
|
319
311
|
{descriptionComponent}
|
|
@@ -4,13 +4,8 @@
|
|
|
4
4
|
import UIListBlock from "./ui.list.block.svelte";
|
|
5
5
|
import UITitle from "../various/ui.title.svelte";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
7
|
//customization
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
|
|
14
9
|
/**
|
|
15
10
|
* @typedef {Object} Props
|
|
16
11
|
* @property {string} [classes]
|
|
@@ -58,7 +53,13 @@
|
|
|
58
53
|
descriptionComponent,
|
|
59
54
|
descriptionComponentProps = {},
|
|
60
55
|
imageComponent,
|
|
61
|
-
imageComponentProps = {}
|
|
56
|
+
imageComponentProps = {},
|
|
57
|
+
onchange = () => {},
|
|
58
|
+
onclick = () => {},
|
|
59
|
+
onclickContent = () => {},
|
|
60
|
+
onclickDescription = () => {},
|
|
61
|
+
onclickImage = () => {},
|
|
62
|
+
onclickTitle = () => {},
|
|
62
63
|
} = $props();
|
|
63
64
|
</script>
|
|
64
65
|
|
|
@@ -87,17 +88,15 @@
|
|
|
87
88
|
{imageComponentProps}
|
|
88
89
|
{actions}
|
|
89
90
|
{links}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
{onchange}
|
|
92
|
+
{onclick}
|
|
93
|
+
{onclickContent}
|
|
94
|
+
{onclickDescription}
|
|
95
|
+
{onclickImage}
|
|
96
|
+
{onclickTitle}
|
|
96
97
|
/>
|
|
97
98
|
</div>
|
|
98
99
|
{:else}
|
|
99
100
|
{@const SvelteComponent = emptyListPlaceholderComponent}
|
|
100
|
-
<SvelteComponent
|
|
101
|
-
{...emptyListPlaceholderComponentProps}
|
|
102
|
-
/>
|
|
101
|
+
<SvelteComponent {...emptyListPlaceholderComponentProps} />
|
|
103
102
|
{/if}
|