@cloudparker/moldex.js 0.0.65 → 0.0.67
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/dist/services/dialog/dialog-service.d.ts +11 -11
- package/dist/services/navigation/navigation-service.d.ts +17 -0
- package/dist/services/navigation/navigation-service.js +38 -0
- package/dist/services/utils/melody-service.d.ts +5 -0
- package/dist/services/utils/melody-service.js +41 -0
- package/dist/tailwind.css +1 -1
- package/dist/views/core/button/components/button/button.svelte +84 -133
- package/dist/views/core/button/components/button/button.svelte.d.ts +8 -7
- package/dist/views/core/button/components/button-back/button-back.svelte +16 -29
- package/dist/views/core/button/components/button-close/button-close.svelte +2 -4
- package/dist/views/core/button/components/button-close/button-close.svelte.d.ts +2 -2
- package/dist/views/core/button/components/button-close-icon/button-close-icon.svelte +16 -30
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte +86 -0
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte.d.ts +38 -0
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte +65 -132
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte.d.ts +22 -31
- package/dist/views/core/button/components/button-menu/button-menu.svelte +72 -235
- package/dist/views/core/button/components/button-menu/button-menu.svelte.d.ts +23 -43
- package/dist/views/core/button/components/button-ok/button-ok.svelte +2 -4
- package/dist/views/core/button/components/button-ok/button-ok.svelte.d.ts +2 -2
- package/dist/views/core/button/components/button-search/button-search.svelte +39 -0
- package/dist/views/core/button/components/button-search/button-search.svelte.d.ts +31 -0
- package/dist/views/core/button/index.d.ts +8 -5
- package/dist/views/core/button/index.js +4 -2
- package/dist/views/core/content-area/components/content-area.svelte +27 -40
- package/dist/views/core/dialog/components/cropper-dialog/cropper-dialog.svelte +33 -49
- package/dist/views/core/dialog/components/dialog/dialog.svelte +164 -263
- package/dist/views/core/dialog/components/dialog/dialog.svelte.d.ts +12 -12
- package/dist/views/core/dialog/components/list-dialog/list-picker-dialog.svelte +112 -158
- package/dist/views/core/dialog/components/loading-dialog/loading-dialog.svelte +18 -30
- package/dist/views/core/dialog/components/msg-dialog/msg-dialog.svelte +13 -22
- package/dist/views/core/dialog/components/text-field-dialog/text-field-dialog.svelte +35 -41
- package/dist/views/core/dialog/components/text-field-dialog/text-field-dialog.svelte.d.ts +2 -2
- package/dist/views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte +25 -40
- package/dist/views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte.d.ts +2 -2
- package/dist/views/core/dialog/index.d.ts +2 -2
- package/dist/views/core/drawer/components/drawer/drawer.svelte +35 -57
- package/dist/views/core/icon/components/icon/icon.svelte +14 -26
- package/dist/views/core/icon/services/icon-path-service.d.ts +1 -0
- package/dist/views/core/icon/services/icon-path-service.js +1 -0
- package/dist/views/core/input/components/checkbox-field/checkbox-field.svelte +25 -44
- package/dist/views/core/input/components/color-field/color-field.svelte +69 -81
- package/dist/views/core/input/components/color-field/color-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte +256 -331
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte.d.ts +18 -17
- package/dist/views/core/input/components/date-field/date-field.svelte +30 -39
- package/dist/views/core/input/components/date-field/date-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte +12 -18
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/email-field/email-field.svelte +12 -17
- package/dist/views/core/input/components/email-field/email-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/file-field/file-field.svelte +64 -78
- package/dist/views/core/input/components/file-field/file-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/input-field/input-field.svelte +159 -261
- package/dist/views/core/input/components/input-field/input-field.svelte.d.ts +8 -8
- package/dist/views/core/input/components/label/label.svelte +10 -24
- package/dist/views/core/input/components/number-field/number-field.svelte +12 -18
- package/dist/views/core/input/components/number-field/number-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/password-field/password-field.svelte +57 -70
- package/dist/views/core/input/components/password-field/password-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/phone-field/phone-field.svelte +118 -172
- package/dist/views/core/input/components/phone-field/phone-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/radio-field/radio-field.svelte +53 -84
- package/dist/views/core/input/components/radio-field/radio-field.svelte.d.ts +7 -7
- package/dist/views/core/input/components/range-field/range-field.svelte +42 -66
- package/dist/views/core/input/components/range-field/range-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/search-field/search-field.svelte +45 -62
- package/dist/views/core/input/components/search-field/search-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/text-field/text-field.svelte +16 -21
- package/dist/views/core/input/components/text-field/text-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte +12 -17
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/time-field/time-field.svelte +12 -17
- package/dist/views/core/input/components/time-field/time-field.svelte.d.ts +2 -2
- package/dist/views/core/input/index.d.ts +4 -3
- package/dist/views/core/navbar/components/navbar/navbar.svelte +39 -77
- package/dist/views/core/no-data/components/no-data/no-data.svelte +20 -37
- package/dist/views/core/pagination/components/pagination/pagination.svelte +73 -102
- package/dist/views/core/progressbar/components/progressbar/progressbar.svelte +23 -37
- package/dist/views/core/ruler/components/vertical-ruler/verticcal-ruler.svelte +2 -6
- package/dist/views/core/screen-detector/components/screen-detector.svelte +9 -13
- package/dist/views/core/sidebar/components/sidebar.svelte +23 -36
- package/dist/views/core/spinner/components/spinner/spinner.svelte +2 -7
- package/dist/views/core/text/components/text-await/text-await.svelte +2 -8
- package/dist/views/core/text/components/text-copy/text-copy.svelte +17 -28
- package/dist/views/core/text/components/text-country/text-country.svelte +29 -41
- package/dist/views/core/text/components/text-country-state/text-country-state.svelte +29 -37
- package/dist/views/core/text/components/text-currency/text-currency.svelte +10 -21
- package/dist/views/core/text/components/text-date/text-date.svelte +21 -33
- package/dist/views/core/text/components/text-email/text-email.svelte +4 -13
- package/dist/views/core/text/components/text-html/text-html.svelte +2 -3
- package/dist/views/core/text/components/text-phone/text-phone.svelte +4 -13
- package/dist/views/core/toast/components/toast/toast.svelte +21 -44
- package/package.json +1 -1
|
@@ -1,42 +1,33 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function handleInput(ev: Event) {
|
|
34
|
-
let target: HTMLInputElement = ev?.target as HTMLInputElement;
|
|
35
|
-
if (target?.value) {
|
|
36
|
-
value = toDate(target?.value) as Date;
|
|
37
|
-
console.log('handleInput value', value)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
<script lang="ts">import { dateFormat, toDate } from "../../../../../services";
|
|
2
|
+
import InputField, {} from "../input-field/input-field.svelte";
|
|
3
|
+
let {
|
|
4
|
+
value = $bindable(null),
|
|
5
|
+
...props
|
|
6
|
+
} = $props();
|
|
7
|
+
let _value = $state(void 0);
|
|
8
|
+
$effect(() => {
|
|
9
|
+
if (value) {
|
|
10
|
+
_value = dateFormat(toDate(value), "YYYY-MM-DD");
|
|
11
|
+
console.log("_value", _value);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
let inputFieldRef = $state(null);
|
|
15
|
+
export function focus() {
|
|
16
|
+
inputFieldRef?.focus();
|
|
17
|
+
}
|
|
18
|
+
export function getElement() {
|
|
19
|
+
return inputFieldRef;
|
|
20
|
+
}
|
|
21
|
+
export function select() {
|
|
22
|
+
inputFieldRef && inputFieldRef.select();
|
|
23
|
+
}
|
|
24
|
+
function handleInput(ev) {
|
|
25
|
+
let target = ev?.target;
|
|
26
|
+
if (target?.value) {
|
|
27
|
+
value = toDate(target?.value);
|
|
28
|
+
console.log("handleInput value", value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
40
31
|
</script>
|
|
41
32
|
|
|
42
33
|
<InputField bind:this={inputFieldRef} {...props} type="date" value={_value} onInput={handleInput} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type InputFieldProps } from '../input-field/input-field.svelte';
|
|
2
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -12,7 +12,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const DateField: $$__sveltets_2_IsomorphicComponent<
|
|
15
|
+
declare const DateField: $$__sveltets_2_IsomorphicComponent<InputFieldProps & {
|
|
16
16
|
value?: Date | string | number | null | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return inputFieldRef;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function select(){
|
|
17
|
-
inputFieldRef && inputFieldRef.select();
|
|
18
|
-
}
|
|
1
|
+
<script lang="ts">import InputField, {} from "../input-field/input-field.svelte";
|
|
2
|
+
let { value = $bindable(), ...props } = $props();
|
|
3
|
+
let inputFieldRef = $state(null);
|
|
4
|
+
export function focus() {
|
|
5
|
+
inputFieldRef?.focus();
|
|
6
|
+
}
|
|
7
|
+
export function getElement() {
|
|
8
|
+
return inputFieldRef;
|
|
9
|
+
}
|
|
10
|
+
export function select() {
|
|
11
|
+
inputFieldRef && inputFieldRef.select();
|
|
12
|
+
}
|
|
19
13
|
</script>
|
|
20
14
|
|
|
21
15
|
<InputField bind:this={inputFieldRef} {...props} type="datetime-local" bind:value />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type InputFieldProps } from '../input-field/input-field.svelte';
|
|
2
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -12,7 +12,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const DatetimeField: $$__sveltets_2_IsomorphicComponent<
|
|
15
|
+
declare const DatetimeField: $$__sveltets_2_IsomorphicComponent<InputFieldProps, {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
17
17
|
}, {}, {
|
|
18
18
|
focus: () => void;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function select(){
|
|
16
|
-
inputFieldRef && inputFieldRef.select();
|
|
17
|
-
}
|
|
1
|
+
<script lang="ts">import InputField, {} from "../input-field/input-field.svelte";
|
|
2
|
+
let { value = $bindable(""), ...props } = $props();
|
|
3
|
+
let inputFieldRef = $state(null);
|
|
4
|
+
export function focus() {
|
|
5
|
+
inputFieldRef?.focus();
|
|
6
|
+
}
|
|
7
|
+
export function getElement() {
|
|
8
|
+
return inputFieldRef;
|
|
9
|
+
}
|
|
10
|
+
export function select() {
|
|
11
|
+
inputFieldRef && inputFieldRef.select();
|
|
12
|
+
}
|
|
18
13
|
</script>
|
|
19
14
|
|
|
20
15
|
<InputField
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type InputFieldProps } from '../input-field/input-field.svelte';
|
|
2
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -12,7 +12,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const EmailField: $$__sveltets_2_IsomorphicComponent<
|
|
15
|
+
declare const EmailField: $$__sveltets_2_IsomorphicComponent<InputFieldProps, {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
17
17
|
}, {}, {
|
|
18
18
|
focus: () => void;
|
|
@@ -1,81 +1,67 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
btnIconSizeClassName = '!h-5 !w-5';
|
|
66
|
-
break;
|
|
67
|
-
case 'xs':
|
|
68
|
-
btnIconSizeClassName = '!h-4 !w-4';
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
$effect(() => {
|
|
75
|
-
if (!appearance || appearance == 'normal') {
|
|
76
|
-
btnRoundedClassName = 'rounded-tr-lg rounded-br-lg';
|
|
77
|
-
}
|
|
78
|
-
});
|
|
1
|
+
<script lang="ts">import { ripple } from "../../../../../actions";
|
|
2
|
+
import { openFilePickerDialog } from "../../../../../services";
|
|
3
|
+
import { mdiAttachment } from "../../../icon";
|
|
4
|
+
import Icon from "../../../icon/components/icon/icon.svelte";
|
|
5
|
+
import InputField, {} from "../input-field/input-field.svelte";
|
|
6
|
+
let {
|
|
7
|
+
appearance,
|
|
8
|
+
size,
|
|
9
|
+
className,
|
|
10
|
+
accepts = "",
|
|
11
|
+
multiple = false,
|
|
12
|
+
value = $bindable(null),
|
|
13
|
+
...props
|
|
14
|
+
} = $props();
|
|
15
|
+
let btnRoundedClassName = $state("");
|
|
16
|
+
let btnIconSizeClassName = $state("");
|
|
17
|
+
let fileNameDisplay = $state("");
|
|
18
|
+
let inputFieldRef = $state(null);
|
|
19
|
+
export function focus() {
|
|
20
|
+
inputFieldRef?.focus();
|
|
21
|
+
}
|
|
22
|
+
export function getElement() {
|
|
23
|
+
return inputFieldRef;
|
|
24
|
+
}
|
|
25
|
+
export function select() {
|
|
26
|
+
inputFieldRef && inputFieldRef.select();
|
|
27
|
+
}
|
|
28
|
+
async function handleFileAttachment() {
|
|
29
|
+
let res = null;
|
|
30
|
+
res = await openFilePickerDialog(accepts, { multiple: multiple || false });
|
|
31
|
+
if (res) {
|
|
32
|
+
value = res;
|
|
33
|
+
if (multiple) {
|
|
34
|
+
let files = value;
|
|
35
|
+
fileNameDisplay = files.map((file) => file.name).join(", ");
|
|
36
|
+
} else {
|
|
37
|
+
let file = value;
|
|
38
|
+
fileNameDisplay = file.name;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
$effect(() => {
|
|
43
|
+
if (size) {
|
|
44
|
+
switch (size) {
|
|
45
|
+
case "lg":
|
|
46
|
+
btnIconSizeClassName = "!h-7 !w-7";
|
|
47
|
+
break;
|
|
48
|
+
case "md":
|
|
49
|
+
btnIconSizeClassName = "!h-6 !w-6";
|
|
50
|
+
break;
|
|
51
|
+
case "sm":
|
|
52
|
+
btnIconSizeClassName = "!h-5 !w-5";
|
|
53
|
+
break;
|
|
54
|
+
case "xs":
|
|
55
|
+
btnIconSizeClassName = "!h-4 !w-4";
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
$effect(() => {
|
|
61
|
+
if (!appearance || appearance == "normal") {
|
|
62
|
+
btnRoundedClassName = "rounded-tr-lg rounded-br-lg";
|
|
63
|
+
}
|
|
64
|
+
});
|
|
79
65
|
</script>
|
|
80
66
|
|
|
81
67
|
{#snippet fileButton()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type InputFieldProps } from '../input-field/input-field.svelte';
|
|
2
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -12,7 +12,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const FileField: $$__sveltets_2_IsomorphicComponent<
|
|
15
|
+
declare const FileField: $$__sveltets_2_IsomorphicComponent<InputFieldProps & {
|
|
16
16
|
accepts?: string;
|
|
17
17
|
multiple?: boolean;
|
|
18
18
|
value?: File | File[] | null;
|