not-bulma 2.0.4 → 2.0.6
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/button/ui.buttons.svelte +21 -14
- package/src/elements/common.js +7 -0
- package/src/elements/form/ui.json.area.svelte +1 -1
- package/src/elements/form/ui.list.of.models.svelte +1 -1
- package/src/elements/form/ui.select.from.model.svelte +3 -3
- package/src/elements/image/ui.images.svelte +1 -1
- package/src/elements/link/ui.link.svelte +25 -33
- package/src/elements/modal/ui.generic.selector.svelte +79 -101
- package/src/elements/modal/ui.overlay.svelte +8 -8
- package/src/elements/navigation/item/ui.navbar.item.svelte +1 -1
- package/src/elements/navigation/menu/ui.navbar.menu.svelte +8 -1
- package/src/elements/navigation/ui.navbar.svelte +9 -8
- package/src/elements/various/ui.select.from.model.on.demand.inline.svelte +7 -6
- package/src/elements/various/ui.select.from.model.with.search.modal.svelte +6 -14
- package/src/frame/app.js +1 -1
- package/src/frame/base.js +2 -2
- package/src/frame/components/action/action.ui.js +5 -5
- package/src/frame/components/breadcrumbs/breadcrumbs.svelte.js +5 -7
- package/src/frame/components/breadcrumbs/index.js +1 -1
- package/src/frame/components/breadcrumbs/ui.breadcrumbs.svelte +40 -32
- package/src/frame/components/form/form.js +16 -16
- package/src/frame/components/form/form.set.js +3 -3
- package/src/frame/components/form/form.set.svelte +3 -2
- package/src/frame/components/form/form.set.svelte.js +9 -9
- package/src/frame/components/form/form.svelte.js +41 -45
- package/src/frame/components/navigation/index.js +2 -2
- package/src/frame/components/navigation/menu.svelte.js +295 -0
- package/src/frame/components/navigation/side/index.js +1 -1
- package/src/frame/components/navigation/side/index.svelte.js +1 -1
- package/src/frame/components/navigation/side/ui.burger.svelte +40 -40
- package/src/frame/components/navigation/side/ui.item.label.svelte +16 -21
- package/src/frame/components/navigation/side/ui.item.with.children.svelte +42 -37
- package/src/frame/components/navigation/side/ui.item.without.children.svelte +39 -42
- package/src/frame/components/navigation/side/ui.items.svelte +65 -49
- package/src/frame/components/navigation/side/ui.section.svelte +30 -36
- package/src/frame/components/navigation/side/ui.side.menu.svelte +32 -24
- package/src/frame/components/navigation/side/ui.trigger.svelte +7 -6
- package/src/frame/components/navigation/side.menu.svelte.js +216 -0
- package/src/frame/components/navigation/top/index.js +4 -4
- package/src/frame/components/navigation/top/index.svelte.js +29 -53
- package/src/frame/components/navigation/top.menu.svelte.js +111 -0
- package/src/frame/components/table/controls/ui.switch.svelte +44 -41
- package/src/frame/components/table/controls/ui.tags.svelte +8 -13
- package/src/frame/components/table/notTable.js +18 -16
- package/src/frame/components/table/notTable.svelte +28 -34
- package/src/frame/components/table/notTableCell.svelte +3 -3
- package/src/frame/components/table/notTableRow.svelte +53 -47
- package/src/frame/controller.js +3 -3
- package/src/frame/crud/actions/generic/action.js +20 -12
- package/src/frame/crud/actions/generic/create.js +3 -3
- package/src/frame/crud/actions/generic/read.js +3 -6
- package/src/frame/crud/actions/generic/update.js +6 -9
- package/src/frame/crud/controller.crud.svelte.js +466 -0
- package/src/frame/crud/create.crud.action.ui.update.js +3 -3
- package/src/frame/crud/create.crud.action.ui.view.js +14 -7
- package/src/frame/crud/message.js +3 -2
- package/src/frame/crud/search.service.js +26 -22
- package/src/frame/index.js +5 -1
- package/src/frame/router.js +2 -2
- package/src/frame/ui.adapter.svelte.js +106 -0
- package/src/locale/notLocale.js +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import UIButton from "./ui.button.svelte";
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
import UICommon from "../common";
|
|
5
4
|
|
|
5
|
+
import UIButton from "./ui.button.svelte";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {Object} Props
|
|
@@ -21,10 +21,15 @@
|
|
|
21
21
|
right = false,
|
|
22
22
|
classes = "",
|
|
23
23
|
buttonComponent = UIButton,
|
|
24
|
+
onclick = () => {},
|
|
24
25
|
action = (e) => {
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
onclick(e);
|
|
27
|
+
},
|
|
27
28
|
} = $props();
|
|
29
|
+
|
|
30
|
+
if (!values.every((itm) => Object.hasOwn(itm, "id"))) {
|
|
31
|
+
values = UICommon.addIds(values);
|
|
32
|
+
}
|
|
28
33
|
</script>
|
|
29
34
|
|
|
30
35
|
<div
|
|
@@ -32,13 +37,15 @@
|
|
|
32
37
|
? 'is-right'
|
|
33
38
|
: ''} {classes}"
|
|
34
39
|
>
|
|
35
|
-
{#
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
{#if Array.isArray(values)}
|
|
41
|
+
{#each values as item (item.id)}
|
|
42
|
+
{@const SvelteComponent = buttonComponent}
|
|
43
|
+
<SvelteComponent
|
|
44
|
+
{...item}
|
|
45
|
+
bind:value={item.value}
|
|
46
|
+
action={item.action ? item.action : action}
|
|
47
|
+
{onclick}
|
|
48
|
+
/>
|
|
49
|
+
{/each}
|
|
50
|
+
{/if}
|
|
44
51
|
</div>
|
package/src/elements/common.js
CHANGED
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
function onChange(e) {
|
|
101
101
|
if (returnVariant) {
|
|
102
102
|
onchange({
|
|
103
|
-
...e
|
|
104
|
-
value: variants.find((itm) => itm.id === e.
|
|
103
|
+
...e,
|
|
104
|
+
value: variants.find((itm) => itm.id === e.value),
|
|
105
105
|
});
|
|
106
106
|
} else {
|
|
107
|
-
onchange(e
|
|
107
|
+
onchange(e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
</script>
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { getContext, hasContext, onMount } from "svelte";
|
|
4
3
|
import { LOCALE } from "../../locale";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
4
|
/**
|
|
11
5
|
* @typedef {Object} Props
|
|
12
6
|
* @property {string} [title] - attributes
|
|
13
|
-
* @property {string} [
|
|
7
|
+
* @property {string} [href]
|
|
14
8
|
* @property {any} download
|
|
15
9
|
* @property {string} [target]
|
|
16
10
|
* @property {any} rel
|
|
@@ -35,7 +29,7 @@
|
|
|
35
29
|
/** @type {Props} */
|
|
36
30
|
let {
|
|
37
31
|
title = "",
|
|
38
|
-
|
|
32
|
+
href = "",
|
|
39
33
|
download,
|
|
40
34
|
target = "_blank",
|
|
41
35
|
rel,
|
|
@@ -50,40 +44,38 @@
|
|
|
50
44
|
type = "",
|
|
51
45
|
color = "",
|
|
52
46
|
size = "",
|
|
53
|
-
classes =
|
|
47
|
+
class: classes = "",
|
|
54
48
|
icon = false,
|
|
55
49
|
iconSide = "right",
|
|
56
|
-
action = () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children
|
|
50
|
+
action: onclick = () => {
|
|
51
|
+
return true;
|
|
52
|
+
},
|
|
53
|
+
children,
|
|
60
54
|
} = $props();
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
classes =
|
|
64
|
-
(button ? "button " : "") +
|
|
65
|
-
(state && state.length > 0 ? ` is-${state} ` : "") +
|
|
66
|
-
(light ? ` is-light ` : "") +
|
|
67
|
-
(type && type.length > 0 ? ` is-${type} ` : "") +
|
|
68
|
-
(size && size.length > 0 ? ` is-${size} ` : "");
|
|
69
|
-
});
|
|
56
|
+
const root = hasContext("root") ? getContext("root") || "" : "";
|
|
70
57
|
</script>
|
|
71
58
|
|
|
72
59
|
<a
|
|
73
|
-
onclick
|
|
60
|
+
{onclick}
|
|
74
61
|
{target}
|
|
75
|
-
href={
|
|
62
|
+
href={root + href}
|
|
76
63
|
{download}
|
|
77
64
|
{rel}
|
|
78
|
-
class=
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
class={[
|
|
66
|
+
classes,
|
|
67
|
+
button && "button",
|
|
68
|
+
inverted && "is-inverted",
|
|
69
|
+
outlined && "is-outlined",
|
|
70
|
+
raised && "is-raised",
|
|
71
|
+
rounded && "is-rounded",
|
|
72
|
+
loading && "is-loading",
|
|
73
|
+
light && `is-light`,
|
|
74
|
+
color && `is-${color}`,
|
|
75
|
+
state && `is-${state}`,
|
|
76
|
+
type && `is-${type}`,
|
|
77
|
+
size && `is-${size}`,
|
|
78
|
+
]}
|
|
87
79
|
>
|
|
88
80
|
{#if icon}
|
|
89
81
|
{#if iconSide === "left"}
|
|
@@ -1,117 +1,95 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {LOCALE} from
|
|
3
|
-
import UIButtons from
|
|
4
|
-
import UIOverlay from
|
|
5
|
-
|
|
6
|
-
import {UIEndlessList} from
|
|
7
|
-
import UISimpleSearchInput from
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
import { LOCALE } from "../../locale";
|
|
3
|
+
import UIButtons from "../button/ui.buttons.svelte";
|
|
4
|
+
import UIOverlay from "./ui.overlay.svelte";
|
|
5
|
+
|
|
6
|
+
import { UIEndlessList } from "../list/endless";
|
|
7
|
+
import UISimpleSearchInput from "../various/ui.simple.search.input.svelte";
|
|
8
|
+
|
|
9
|
+
import { onMount } from "svelte";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Object} Props
|
|
13
|
+
* @property {boolean} [show]
|
|
14
|
+
* @property {string} [term]
|
|
15
|
+
* @property {string} [size]
|
|
16
|
+
* @property {any} [inputComponent]
|
|
17
|
+
* @property {any} [inputComponentProps]
|
|
18
|
+
* @property {any} [outputComponent]
|
|
19
|
+
* @property {any} [outputComponentProps]
|
|
20
|
+
* @property {any} [results]
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** @type {Props} */
|
|
24
|
+
let {
|
|
25
|
+
show = true,
|
|
26
|
+
term = $bindable(""),
|
|
27
|
+
size = "narrow",
|
|
28
|
+
inputComponent = UISimpleSearchInput,
|
|
29
|
+
inputComponentProps = {},
|
|
30
|
+
outputComponent = UIEndlessList,
|
|
31
|
+
outputComponentProps = {},
|
|
32
|
+
results = $bindable({ list: [], page: 0, pages: 0, skip: 0, count: 0 }),
|
|
33
|
+
onreject = () => {},
|
|
34
|
+
onresolve = () => {},
|
|
35
|
+
onTermChange = () => {},
|
|
36
|
+
onprev = () => {},
|
|
37
|
+
onnext = () => {},
|
|
38
|
+
} = $props();
|
|
39
|
+
|
|
40
|
+
onMount(() => {});
|
|
28
41
|
|
|
29
|
-
/** @type {Props} */
|
|
30
|
-
let {
|
|
31
|
-
show = true,
|
|
32
|
-
term = $bindable(''),
|
|
33
|
-
size = 'narrow',
|
|
34
|
-
inputComponent = UISimpleSearchInput,
|
|
35
|
-
inputComponentProps = {},
|
|
36
|
-
outputComponent = UIEndlessList,
|
|
37
|
-
outputComponentProps = {},
|
|
38
|
-
results = $bindable({list:[], page:0, pages:0,skip:0,count:0})
|
|
39
|
-
} = $props();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onMount(() => {
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
|
|
46
42
|
const buttons = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
{
|
|
44
|
+
title: $LOCALE["not-node:button_cancel_label"],
|
|
45
|
+
action: onreject,
|
|
46
|
+
},
|
|
51
47
|
];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function select({
|
|
58
|
-
detail
|
|
59
|
-
}) {
|
|
60
|
-
console.log('selected user', detail);
|
|
61
|
-
dispatch('resolve', detail);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function reject(){
|
|
65
|
-
dispatch('reject');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<UIOverlay on:reject="{overlayClosed}" {show} closeOnClick={true} closeButton={false}>
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<UIOverlay {onreject} {show} closeOnClick={true} closeButton={false}>
|
|
73
51
|
{@const SvelteComponent = inputComponent}
|
|
74
52
|
{@const SvelteComponent_1 = outputComponent}
|
|
75
53
|
<div class="paper box block {size}">
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
54
|
+
<SvelteComponent {onTermChange} bind:term {...inputComponentProps}
|
|
55
|
+
></SvelteComponent>
|
|
56
|
+
<SvelteComponent_1
|
|
57
|
+
bind:data={results}
|
|
58
|
+
{onprev}
|
|
59
|
+
{onnext}
|
|
60
|
+
onselect={onresolve}
|
|
61
|
+
{...outputComponentProps}
|
|
83
62
|
></SvelteComponent_1>
|
|
84
|
-
<UIButtons values={buttons} centered={true} classes="mt-5"/>
|
|
63
|
+
<UIButtons values={buttons} centered={true} classes="mt-5" />
|
|
85
64
|
</div>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
65
|
+
</UIOverlay>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
89
68
|
.paper.box {
|
|
90
|
-
|
|
69
|
+
margin: 10vh auto auto auto;
|
|
91
70
|
}
|
|
92
|
-
|
|
93
|
-
.paper.box.fullscreen{
|
|
94
|
-
|
|
71
|
+
|
|
72
|
+
.paper.box.fullscreen {
|
|
73
|
+
width: 100vw;
|
|
95
74
|
}
|
|
96
|
-
|
|
97
|
-
.paper.box.wide{
|
|
98
|
-
|
|
75
|
+
|
|
76
|
+
.paper.box.wide {
|
|
77
|
+
width: 75vw;
|
|
99
78
|
}
|
|
100
|
-
|
|
101
|
-
.paper.box.normal{
|
|
102
|
-
|
|
79
|
+
|
|
80
|
+
.paper.box.normal {
|
|
81
|
+
width: 50vw;
|
|
103
82
|
}
|
|
104
|
-
|
|
105
|
-
.paper.box.narrow{
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
83
|
+
|
|
84
|
+
.paper.box.narrow {
|
|
85
|
+
width: 25vw;
|
|
86
|
+
}
|
|
87
|
+
|
|
109
88
|
@media (max-width: 700px) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
89
|
+
.paper.box {
|
|
90
|
+
width: 100vw;
|
|
91
|
+
height: 100vh;
|
|
92
|
+
margin: 0vh auto auto auto;
|
|
93
|
+
}
|
|
115
94
|
}
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
</style>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { run } from
|
|
2
|
+
import { run } from "svelte/legacy";
|
|
3
3
|
|
|
4
4
|
let overflowSave = $state("");
|
|
5
5
|
|
|
6
6
|
import { fade } from "svelte/transition";
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { onMount, onDestroy } from "svelte";
|
|
9
9
|
|
|
10
10
|
const zIndexStep = 1000;
|
|
11
11
|
|
|
12
|
-
const dispatch = createEventDispatcher();
|
|
13
|
-
|
|
14
12
|
/**
|
|
15
13
|
* @typedef {Object} Props
|
|
16
14
|
* @property {boolean} [closeButton]
|
|
@@ -30,7 +28,8 @@
|
|
|
30
28
|
closeSize = "normal",
|
|
31
29
|
layer = 1,
|
|
32
30
|
classes = "",
|
|
33
|
-
children
|
|
31
|
+
children,
|
|
32
|
+
onreject = () => {},
|
|
34
33
|
} = $props();
|
|
35
34
|
|
|
36
35
|
run(() => {
|
|
@@ -62,11 +61,11 @@
|
|
|
62
61
|
rejectOverlay();
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
} catch
|
|
64
|
+
} catch {}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
function rejectOverlay(data = {}) {
|
|
69
|
-
|
|
68
|
+
onreject(data);
|
|
70
69
|
}
|
|
71
70
|
/*
|
|
72
71
|
function resolveOverlay(data = {}) {
|
|
@@ -93,7 +92,8 @@
|
|
|
93
92
|
style="z-index: {zIndexStep * layer};"
|
|
94
93
|
>
|
|
95
94
|
{#if closeButton}
|
|
96
|
-
<button onclick={closeButtonClick} class="delete is-{closeSize}"
|
|
95
|
+
<button onclick={closeButtonClick} class="delete is-{closeSize}"
|
|
96
|
+
></button>
|
|
97
97
|
{/if}
|
|
98
98
|
{@render children?.()}
|
|
99
99
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import UINavbarItemContent from "./primitives/ui.navbar.item.content.svelte";
|
|
5
5
|
import UINavbarItemDevider from "./primitives/ui.navbar.item.devider.svelte";
|
|
6
6
|
|
|
7
|
-
let { class: classes = "", item, children, ...other } = $props();
|
|
7
|
+
let { class: classes = "", item, children, url, ...other } = $props();
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
{#if item.break}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
onclick,
|
|
16
16
|
class: classes = "",
|
|
17
17
|
children,
|
|
18
|
+
url,
|
|
18
19
|
...other
|
|
19
20
|
} = $props();
|
|
20
21
|
|
|
@@ -50,7 +51,12 @@
|
|
|
50
51
|
<UINavbarMenuStart>
|
|
51
52
|
{#each items as item (item.id)}
|
|
52
53
|
{#if placeIs(item.place, "start")}
|
|
53
|
-
<UINavbarItemGeneric
|
|
54
|
+
<UINavbarItemGeneric
|
|
55
|
+
hidden="touch"
|
|
56
|
+
{root}
|
|
57
|
+
{item}
|
|
58
|
+
{onclick}
|
|
59
|
+
{url}
|
|
54
60
|
></UINavbarItemGeneric>
|
|
55
61
|
{/if}
|
|
56
62
|
{/each}
|
|
@@ -61,6 +67,7 @@
|
|
|
61
67
|
<UINavbarItemGeneric
|
|
62
68
|
hidden="touch"
|
|
63
69
|
{root}
|
|
70
|
+
{url}
|
|
64
71
|
{item}
|
|
65
72
|
{onclick}
|
|
66
73
|
right={true}
|
|
@@ -18,15 +18,16 @@
|
|
|
18
18
|
burgerControlsSidemenu = true,
|
|
19
19
|
class: classes = "",
|
|
20
20
|
onclick = () => {},
|
|
21
|
+
url,
|
|
21
22
|
} = $props();
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
24
|
+
setContext("root", root);
|
|
25
|
+
setContext("navigate", navigate);
|
|
26
|
+
setContext("burgerControlsSidemenu", burgerControlsSidemenu);
|
|
27
|
+
setContext("navbarId", id);
|
|
28
|
+
setContext("onclick", onclick);
|
|
29
|
+
|
|
30
|
+
onMount(() => {});
|
|
30
31
|
|
|
31
32
|
function onBurgerClick() {
|
|
32
33
|
active = !active;
|
|
@@ -44,5 +45,5 @@
|
|
|
44
45
|
{:else if burger}
|
|
45
46
|
<UINavbarBurger {active} onclick={onBurgerClick}></UINavbarBurger>
|
|
46
47
|
{/if}
|
|
47
|
-
<UINavbarMenu {active} {items}></UINavbarMenu>
|
|
48
|
+
<UINavbarMenu {active} {items} {url}></UINavbarMenu>
|
|
48
49
|
</UINavbarWrapper>
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import notCommon from "../../frame/common";
|
|
6
6
|
import { DEFAULT_STATUS_SUCCESS } from "../../frame/const";
|
|
7
7
|
|
|
8
|
-
import { onMount
|
|
9
|
-
const dispatch = createEventDispatcher();
|
|
8
|
+
import { onMount } from "svelte";
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* @typedef {Object} Props
|
|
@@ -59,7 +58,9 @@
|
|
|
59
58
|
validated = false,
|
|
60
59
|
errors = $bindable(false),
|
|
61
60
|
formErrors = false,
|
|
62
|
-
formLevelError = false
|
|
61
|
+
formLevelError = false,
|
|
62
|
+
onreject = () => {},
|
|
63
|
+
onresolve = () => {},
|
|
63
64
|
} = $props();
|
|
64
65
|
|
|
65
66
|
function argumentsSetProvided() {
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
color: "primary",
|
|
118
119
|
action() {
|
|
119
120
|
state = "hidden";
|
|
120
|
-
|
|
121
|
+
onresolve(resolvedValue);
|
|
121
122
|
},
|
|
122
123
|
},
|
|
123
124
|
reject: {
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
color: "danger",
|
|
126
127
|
action() {
|
|
127
128
|
state = "hidden";
|
|
128
|
-
|
|
129
|
+
onreject();
|
|
129
130
|
},
|
|
130
131
|
},
|
|
131
132
|
};
|
|
@@ -152,7 +153,7 @@
|
|
|
152
153
|
{errors}
|
|
153
154
|
{formErrors}
|
|
154
155
|
{formLevelError}
|
|
155
|
-
|
|
156
|
+
onchange={onModelChanged}
|
|
156
157
|
/>
|
|
157
158
|
</div>
|
|
158
159
|
<div class="control">
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { run } from
|
|
2
|
+
import { run } from "svelte/legacy";
|
|
3
3
|
|
|
4
4
|
import notCommon from "../../frame/common";
|
|
5
5
|
|
|
6
6
|
import { UIButtons } from "../button";
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
let dispatch = createEventDispatcher();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
import { onMount } from "svelte";
|
|
18
9
|
|
|
19
10
|
/**
|
|
20
11
|
* @typedef {Object} Props
|
|
@@ -47,7 +38,8 @@
|
|
|
47
38
|
loading = $bindable(false),
|
|
48
39
|
selectedModelTitleFormatter = (data) => `${data._id}`,
|
|
49
40
|
loadingLabel = "not-node:loading_label",
|
|
50
|
-
isEmptyLabel = "not-node:field_value_is_empty_placeholder"
|
|
41
|
+
isEmptyLabel = "not-node:field_value_is_empty_placeholder",
|
|
42
|
+
onchange = () => {},
|
|
51
43
|
} = $props();
|
|
52
44
|
|
|
53
45
|
function getService() {
|
|
@@ -68,7 +60,7 @@
|
|
|
68
60
|
})
|
|
69
61
|
.then((value) => {
|
|
70
62
|
inputStarted = true;
|
|
71
|
-
|
|
63
|
+
onchange({
|
|
72
64
|
field: fieldname,
|
|
73
65
|
value,
|
|
74
66
|
});
|
|
@@ -81,7 +73,7 @@
|
|
|
81
73
|
function resetSelectedModel() {
|
|
82
74
|
value = undefined;
|
|
83
75
|
modelData = null;
|
|
84
|
-
|
|
76
|
+
onchange({
|
|
85
77
|
field: fieldname,
|
|
86
78
|
value,
|
|
87
79
|
});
|
package/src/frame/app.js
CHANGED
package/src/frame/base.js
CHANGED
|
@@ -101,7 +101,7 @@ export default class notBase extends EventEmitter {
|
|
|
101
101
|
} else {
|
|
102
102
|
this.setCommon(this.getData(), arguments);
|
|
103
103
|
}
|
|
104
|
-
this.emit("
|
|
104
|
+
this.emit("onchange");
|
|
105
105
|
return this;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -150,6 +150,6 @@ export default class notBase extends EventEmitter {
|
|
|
150
150
|
this.setOptions(null);
|
|
151
151
|
this.setWorking(null);
|
|
152
152
|
this.setData(null);
|
|
153
|
-
this.emit("
|
|
153
|
+
this.emit("ondestroy");
|
|
154
154
|
}
|
|
155
155
|
}
|