@cloudparker/moldex.js 0.0.28 → 0.0.30
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 +16 -0
- package/dist/services/dialog/dialog-service.js +23 -1
- package/dist/services/utils/utils-service.d.ts +3 -0
- package/dist/services/utils/utils-service.js +26 -0
- package/dist/tailwind.css +1 -1
- package/dist/views/core/button/components/button/button.svelte +57 -34
- package/dist/views/core/button/components/button/button.svelte.d.ts +19 -18
- package/dist/views/core/button/components/button-back/button-back.svelte +44 -0
- package/dist/views/core/button/components/button-back/button-back.svelte.d.ts +24 -0
- package/dist/views/core/button/components/button-close/button-close.svelte +7 -0
- package/dist/views/core/button/components/button-close/button-close.svelte.d.ts +19 -0
- package/dist/views/core/button/components/button-close-icon/button-close-icon.svelte +47 -0
- package/dist/views/core/button/components/button-close-icon/button-close-icon.svelte.d.ts +25 -0
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte +94 -42
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte.d.ts +11 -11
- package/dist/views/core/button/components/button-menu/button-menu.svelte +155 -103
- package/dist/views/core/button/components/button-menu/button-menu.svelte.d.ts +7 -7
- package/dist/views/core/button/components/button-ok/button-ok.svelte +7 -0
- package/dist/views/core/button/components/button-ok/button-ok.svelte.d.ts +19 -0
- package/dist/views/core/button/index.d.ts +5 -1
- package/dist/views/core/button/index.js +10 -1
- package/dist/views/core/dialog/components/dialog/dialog.svelte +328 -231
- package/dist/views/core/dialog/components/dialog/dialog.svelte.d.ts +6 -10
- package/dist/views/core/dialog/components/list-dialog/list-picker-dialog.svelte +189 -0
- package/dist/views/core/dialog/components/list-dialog/list-picker-dialog.svelte.d.ts +41 -0
- package/dist/views/core/dialog/components/msg-dialog/msg-dialog.svelte +22 -13
- package/dist/views/core/dialog/index.d.ts +4 -2
- package/dist/views/core/dialog/index.js +2 -2
- package/dist/views/core/drawer/components/drawer/drawer.svelte +52 -34
- package/dist/views/core/icon/components/icon/icon.svelte +25 -12
- package/dist/views/core/icon/components/icon/icon.svelte.d.ts +1 -0
- package/dist/views/core/icon/services/icon-path-service.d.ts +6 -0
- package/dist/views/core/icon/services/icon-path-service.js +6 -0
- package/dist/views/core/index.d.ts +2 -0
- package/dist/views/core/index.js +2 -0
- package/dist/views/core/input/components/color-field/color-field.svelte +114 -0
- package/dist/views/core/input/components/color-field/color-field.svelte.d.ts +23 -0
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte +467 -0
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte.d.ts +63 -0
- package/dist/views/core/input/components/date-field/date-field.svelte +13 -0
- package/dist/views/core/input/components/date-field/date-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte +13 -0
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/email-field/email-field.svelte +12 -0
- package/dist/views/core/input/components/email-field/email-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/file-field/file-field.svelte +92 -0
- package/dist/views/core/input/components/file-field/file-field.svelte.d.ts +25 -0
- package/dist/views/core/input/components/input-field/input-field.svelte +382 -0
- package/dist/views/core/{form → input}/components/input-field/input-field.svelte.d.ts +51 -35
- package/dist/views/core/input/components/label/label.svelte +46 -0
- package/dist/views/core/input/components/number-field/number-field.svelte +13 -0
- package/dist/views/core/input/components/number-field/number-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/password-field/password-field.svelte +83 -0
- package/dist/views/core/input/components/password-field/password-field.svelte.d.ts +24 -0
- package/dist/views/core/input/components/phone-field/phone-field.svelte +90 -0
- package/dist/views/core/input/components/phone-field/phone-field.svelte.d.ts +24 -0
- package/dist/views/core/input/components/range-field/range-field.svelte +72 -0
- package/dist/views/core/input/components/range-field/range-field.svelte.d.ts +31 -0
- package/dist/views/core/input/components/search-field/search-field.svelte +67 -0
- package/dist/views/core/input/components/search-field/search-field.svelte.d.ts +24 -0
- package/dist/views/core/input/components/text-field/text-field.svelte +12 -0
- package/dist/views/core/input/components/text-field/text-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte +12 -0
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte.d.ts +21 -0
- package/dist/views/core/input/components/time-field/time-field.svelte +12 -0
- package/dist/views/core/input/components/time-field/time-field.svelte.d.ts +21 -0
- package/dist/views/core/input/index.d.ts +19 -0
- package/dist/views/core/input/index.js +19 -0
- package/dist/views/core/navbar/components/navbar/navbar.svelte +71 -39
- package/dist/views/core/navbar/components/navbar/navbar.svelte.d.ts +3 -3
- package/dist/views/core/no-data/components/no-data/no-data.svelte +51 -0
- package/dist/views/core/no-data/components/no-data/no-data.svelte.d.ts +27 -0
- package/dist/views/core/no-data/index.d.ts +2 -0
- package/dist/views/core/no-data/index.js +2 -0
- package/dist/views/core/pagination/components/pagination/pagination.svelte +100 -71
- package/dist/views/core/progressbar/components/progressbar/progressbar.svelte +37 -23
- package/dist/views/core/referrer/components/referrer.svelte +15 -13
- package/dist/views/core/ruler/components/vertical-ruler/verticcal-ruler.svelte +6 -2
- package/dist/views/core/screen-detector/components/screen-detector.svelte +13 -9
- package/dist/views/core/spinner/components/spinner/spinner.svelte +7 -2
- package/dist/views/core/text/components/text-await/text-await.svelte +8 -2
- package/dist/views/core/text/components/text-copy/text-copy.svelte +28 -17
- package/dist/views/core/text/components/text-country/text-country.svelte +42 -29
- package/dist/views/core/text/components/text-country-state/text-country-state.svelte +38 -30
- package/dist/views/core/text/components/text-currency/text-currency.svelte +21 -10
- package/dist/views/core/text/components/text-date/text-date.svelte +33 -21
- package/dist/views/core/text/components/text-email/text-email.svelte +13 -4
- package/dist/views/core/text/components/text-html/text-html.svelte +3 -2
- package/dist/views/core/text/components/text-phone/text-phone.svelte +13 -4
- package/dist/views/core/toast/components/toast/toast.svelte +44 -21
- package/package.json +2 -2
- package/dist/views/core/form/components/input-field/input-field.svelte +0 -233
- package/dist/views/core/form/components/label/label.svelte +0 -32
- package/dist/views/core/form/index.d.ts +0 -3
- package/dist/views/core/form/index.js +0 -3
- /package/dist/views/core/{form → input}/components/label/label.svelte.d.ts +0 -0
|
@@ -1,34 +1,66 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
import Button from '../../../button/components/button/button.svelte';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
import { Icon, mdiMenu } from '../../../icon';
|
|
6
|
+
|
|
7
|
+
type PropsType = {
|
|
8
|
+
id?: string;
|
|
9
|
+
className?: String;
|
|
10
|
+
hasDrawer?: boolean;
|
|
11
|
+
drawerIconPath?: string;
|
|
12
|
+
drawerButtonClassName?: string;
|
|
13
|
+
logoButtonClassName?: string;
|
|
14
|
+
hasLogo?: boolean;
|
|
15
|
+
logoIconPath?: string;
|
|
16
|
+
logoIconClassName?: string;
|
|
17
|
+
logoImgSrc?: string;
|
|
18
|
+
logoImgClassName?: string;
|
|
19
|
+
leftContainerClassName?: string;
|
|
20
|
+
centerContainerClassName?: string;
|
|
21
|
+
rightContainerClassName?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
titleClassName?: string;
|
|
25
|
+
subtitleClassName?: string;
|
|
26
|
+
hasTitle?: boolean;
|
|
27
|
+
hasSubtitle?: boolean;
|
|
28
|
+
children?: Snippet;
|
|
29
|
+
leftSnippet?: Snippet;
|
|
30
|
+
centerSnippet?: Snippet;
|
|
31
|
+
rightSnippet?: Snippet;
|
|
32
|
+
ondrawer?: () => void;
|
|
33
|
+
onlogo?: () => void;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
let {
|
|
37
|
+
id = '',
|
|
38
|
+
children,
|
|
39
|
+
leftSnippet,
|
|
40
|
+
centerSnippet,
|
|
41
|
+
rightSnippet,
|
|
42
|
+
className = '',
|
|
43
|
+
drawerIconPath = mdiMenu,
|
|
44
|
+
drawerButtonClassName = '',
|
|
45
|
+
hasDrawer = false,
|
|
46
|
+
hasLogo = false,
|
|
47
|
+
logoButtonClassName = '',
|
|
48
|
+
logoIconPath,
|
|
49
|
+
logoIconClassName = 'text-indigo-600',
|
|
50
|
+
logoImgSrc,
|
|
51
|
+
logoImgClassName = '',
|
|
52
|
+
leftContainerClassName = '',
|
|
53
|
+
centerContainerClassName = '',
|
|
54
|
+
rightContainerClassName = '',
|
|
55
|
+
title = '',
|
|
56
|
+
subtitle = '',
|
|
57
|
+
titleClassName = '',
|
|
58
|
+
subtitleClassName = '',
|
|
59
|
+
hasTitle = false,
|
|
60
|
+
hasSubtitle = false,
|
|
61
|
+
ondrawer,
|
|
62
|
+
onlogo
|
|
63
|
+
}: PropsType = $props();
|
|
32
64
|
</script>
|
|
33
65
|
|
|
34
66
|
<div
|
|
@@ -42,11 +74,11 @@ let {
|
|
|
42
74
|
className="h-full px-2 text-gray-500 hover:text-gray-600 {drawerButtonClassName}"
|
|
43
75
|
iconPath={drawerIconPath}
|
|
44
76
|
disabled={!ondrawer}
|
|
45
|
-
|
|
77
|
+
onClick={ondrawer}
|
|
46
78
|
></Button>
|
|
47
79
|
{/if}
|
|
48
80
|
{#if hasLogo}
|
|
49
|
-
<Button className="h-full px-2 {logoButtonClassName}" disabled={!onlogo}
|
|
81
|
+
<Button className="h-full px-2 {logoButtonClassName}" disabled={!onlogo} onClick={onlogo}>
|
|
50
82
|
{#if logoIconPath}
|
|
51
83
|
<Icon path={logoIconPath} className="h-10 w-10 {logoIconClassName}" />
|
|
52
84
|
{/if}
|
|
@@ -65,18 +97,18 @@ let {
|
|
|
65
97
|
{/if}
|
|
66
98
|
</div>
|
|
67
99
|
<div class={leftContainerClassName}>
|
|
68
|
-
{#if
|
|
69
|
-
{@render
|
|
100
|
+
{#if leftSnippet}
|
|
101
|
+
{@render leftSnippet()}
|
|
70
102
|
{/if}
|
|
71
103
|
</div>
|
|
72
104
|
<div class="flex-grow flex justify-center {centerContainerClassName}">
|
|
73
|
-
{#if
|
|
74
|
-
{@render
|
|
105
|
+
{#if centerSnippet}
|
|
106
|
+
{@render centerSnippet()}
|
|
75
107
|
{/if}
|
|
76
108
|
</div>
|
|
77
109
|
<div class={rightContainerClassName}>
|
|
78
|
-
{#if
|
|
79
|
-
{@render
|
|
110
|
+
{#if rightSnippet}
|
|
111
|
+
{@render rightSnippet()}
|
|
80
112
|
{/if}
|
|
81
113
|
</div>
|
|
82
114
|
</div>
|
|
@@ -35,9 +35,9 @@ declare const Navbar: $$__sveltets_2_IsomorphicComponent<{
|
|
|
35
35
|
hasTitle?: boolean;
|
|
36
36
|
hasSubtitle?: boolean;
|
|
37
37
|
children?: Snippet;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
leftSnippet?: Snippet;
|
|
39
|
+
centerSnippet?: Snippet;
|
|
40
|
+
rightSnippet?: Snippet;
|
|
41
41
|
ondrawer?: () => void;
|
|
42
42
|
onlogo?: () => void;
|
|
43
43
|
}, {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import '../../../../../tailwind.css';
|
|
5
|
+
|
|
6
|
+
type PlacementType = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
|
|
8
|
+
type PropsType = {
|
|
9
|
+
message?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
iconPath?: string;
|
|
12
|
+
iconClassName?: string;
|
|
13
|
+
iconPlacement?: PlacementType;
|
|
14
|
+
children?: Snippet;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
message = 'No data found!',
|
|
19
|
+
className = '',
|
|
20
|
+
iconPath = '',
|
|
21
|
+
iconClassName = '',
|
|
22
|
+
iconPlacement = 'top',
|
|
23
|
+
children
|
|
24
|
+
}: PropsType = $props();
|
|
25
|
+
|
|
26
|
+
const iconPlacementClassNameMap: any = {
|
|
27
|
+
top: 'flex-col',
|
|
28
|
+
bottom: 'flex-col-reverse',
|
|
29
|
+
left: 'flex-row',
|
|
30
|
+
right: 'flex-row-reverse'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
let iconPlacementClassName: string = $state('');
|
|
34
|
+
|
|
35
|
+
$effect(() => {
|
|
36
|
+
iconPlacementClassName = iconPlacementClassNameMap[iconPlacement];
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
class="flex items-center justify-center gap-3 text-gray-500 p-4 {iconPlacementClassName} {className}"
|
|
42
|
+
>
|
|
43
|
+
{#if children}
|
|
44
|
+
{@render children()}
|
|
45
|
+
{:else}
|
|
46
|
+
{#if iconPath}
|
|
47
|
+
<Icon path={iconPath} className="w-6 h-6 {iconClassName}" />
|
|
48
|
+
{/if}
|
|
49
|
+
<div>{@html message}</div>
|
|
50
|
+
{/if}
|
|
51
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
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> {
|
|
4
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
|
+
$$bindings?: Bindings;
|
|
6
|
+
} & Exports;
|
|
7
|
+
(internal: unknown, props: Props & {
|
|
8
|
+
$$events?: Events;
|
|
9
|
+
$$slots?: Slots;
|
|
10
|
+
}): Exports & {
|
|
11
|
+
$set?: any;
|
|
12
|
+
$on?: any;
|
|
13
|
+
};
|
|
14
|
+
z_$$bindings?: Bindings;
|
|
15
|
+
}
|
|
16
|
+
declare const NoData: $$__sveltets_2_IsomorphicComponent<{
|
|
17
|
+
message?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
iconPath?: string;
|
|
20
|
+
iconClassName?: string;
|
|
21
|
+
iconPlacement?: "top" | "bottom" | "left" | "right";
|
|
22
|
+
children?: Snippet;
|
|
23
|
+
}, {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
}, {}, {}, "">;
|
|
26
|
+
type NoData = InstanceType<typeof NoData>;
|
|
27
|
+
export default NoData;
|
|
@@ -1,74 +1,103 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
import { ripple } from '../../../../../actions';
|
|
4
|
+
import ButtonMenu from '../../../button/components/button-menu/button-menu.svelte';
|
|
5
|
+
import Button from '../../../button/components/button/button.svelte';
|
|
6
|
+
import { BROWSER } from 'esm-env';
|
|
7
|
+
import { mdiChevronLeft, mdiChevronRight, mdiPageFirst, mdiPageLast } from '../../../icon';
|
|
8
|
+
|
|
9
|
+
type PropsType = {
|
|
10
|
+
length?: number;
|
|
11
|
+
pageIndex?: number;
|
|
12
|
+
pageSize?: number;
|
|
13
|
+
pageSizeOptions?: number[];
|
|
14
|
+
itemsText?: string;
|
|
15
|
+
pageSizeText?: string;
|
|
16
|
+
pageText?: string;
|
|
17
|
+
onPageSizeChange?: (size: number) => void;
|
|
18
|
+
onPageIndexChange?: (index: number) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
length = 0,
|
|
23
|
+
pageIndex = 0,
|
|
24
|
+
pageSize = 10,
|
|
25
|
+
pageSizeOptions = [5, 10, 25, 50, 100, 200],
|
|
26
|
+
itemsText = 'Items',
|
|
27
|
+
pageSizeText = 'Page Size',
|
|
28
|
+
pageText = 'Page',
|
|
29
|
+
onPageSizeChange,
|
|
30
|
+
onPageIndexChange
|
|
31
|
+
}: PropsType = $props();
|
|
32
|
+
|
|
33
|
+
let pageCount: number = $state(0);
|
|
34
|
+
|
|
35
|
+
let hasFirst: boolean = $state(true);
|
|
36
|
+
let hasLast: boolean = $state(true);
|
|
37
|
+
let hasNext: boolean = $state(true);
|
|
38
|
+
let hasPrev: boolean = $state(true);
|
|
39
|
+
|
|
40
|
+
const handlePageSize = (size: any) => {
|
|
41
|
+
// console.log('handlePageSize', size);
|
|
42
|
+
pageSize = size;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const handlePage = (type?: string) => {
|
|
46
|
+
// console.log('handlePage');
|
|
47
|
+
let index = 0;
|
|
48
|
+
switch (type) {
|
|
49
|
+
case 'first':
|
|
50
|
+
index = 0;
|
|
51
|
+
break;
|
|
52
|
+
case 'last':
|
|
53
|
+
index = pageCount - 1;
|
|
54
|
+
break;
|
|
55
|
+
case 'next':
|
|
56
|
+
index = pageIndex;
|
|
57
|
+
index++;
|
|
58
|
+
break;
|
|
59
|
+
case 'prev':
|
|
60
|
+
index = pageIndex;
|
|
61
|
+
index--;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
if (index <= 0) index = 0;
|
|
65
|
+
if (index >= pageCount) index = pageCount - 1;
|
|
66
|
+
|
|
67
|
+
pageIndex = index;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
function preparePage(..._: any) {
|
|
71
|
+
// console.log('preparePage');
|
|
72
|
+
hasFirst = true;
|
|
73
|
+
hasPrev = true;
|
|
74
|
+
|
|
75
|
+
hasNext = true;
|
|
76
|
+
hasLast = true;
|
|
77
|
+
|
|
78
|
+
length = length || 0;
|
|
79
|
+
pageSize = pageSize || 10;
|
|
80
|
+
pageCount = Math.ceil(length / pageSize);
|
|
81
|
+
|
|
82
|
+
if (pageIndex <= 0) {
|
|
83
|
+
pageIndex = 0;
|
|
84
|
+
hasPrev = false;
|
|
85
|
+
hasFirst = false;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (pageCount && pageIndex >= pageCount - 1) {
|
|
89
|
+
pageIndex = pageCount - 1;
|
|
90
|
+
hasNext = false;
|
|
91
|
+
hasLast = false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
onPageSizeChange && onPageSizeChange(pageSize);
|
|
95
|
+
onPageIndexChange && onPageIndexChange(pageIndex);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
$effect(() => {
|
|
99
|
+
BROWSER && preparePage(length, pageSize, pageIndex, pageCount);
|
|
100
|
+
});
|
|
72
101
|
</script>
|
|
73
102
|
|
|
74
103
|
{#snippet pageButton({ onclick, disabled, icon }: any)}
|
|
@@ -1,26 +1,40 @@
|
|
|
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
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
type PropsType = {
|
|
6
|
+
className?: string;
|
|
7
|
+
backgroundClassName?: string;
|
|
8
|
+
value?: number;
|
|
9
|
+
showValue?: boolean;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
backgroundClassName = '',
|
|
15
|
+
className = 'h-4',
|
|
16
|
+
value = 0,
|
|
17
|
+
showValue = false,
|
|
18
|
+
children
|
|
19
|
+
}: PropsType = $props();
|
|
20
|
+
|
|
21
|
+
let progressValue: number = $state(0);
|
|
22
|
+
|
|
23
|
+
$effect(() => {
|
|
24
|
+
if (!className) {
|
|
25
|
+
className = 'h-4';
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
$effect(() => {
|
|
30
|
+
if (value < 0) {
|
|
31
|
+
progressValue = 0;
|
|
32
|
+
} else if (value >= 100) {
|
|
33
|
+
progressValue = 100;
|
|
34
|
+
} else {
|
|
35
|
+
progressValue = value;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
24
38
|
</script>
|
|
25
39
|
|
|
26
40
|
<div class="w-full bg-gray-200 rounded-full progressbar-container {backgroundClassName}" style="">
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { page } from '$app/stores';
|
|
3
|
+
import { referrer } from '../../../../services/navigation/navigation-service';
|
|
4
|
+
import { BROWSER } from 'esm-env';
|
|
5
|
+
|
|
6
|
+
$effect(() => {
|
|
7
|
+
if (BROWSER) {
|
|
8
|
+
const unsubscribe = page.subscribe((_) => {
|
|
9
|
+
referrer.referer = referrer.referer === location.href ? referrer.referer : location.href;
|
|
10
|
+
});
|
|
11
|
+
return () => {
|
|
12
|
+
unsubscribe && unsubscribe();
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
});
|
|
14
16
|
</script>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
type PropsType = {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
let { className = '' }: PropsType = $props();
|
|
3
7
|
</script>
|
|
4
8
|
|
|
5
9
|
<div class="h-6 lg:w-px lg:bg-gray-200 {className}" aria-hidden="true"></div>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { handleScreenSizeUpdate } from '../../../../services';
|
|
3
|
+
import { BROWSER } from 'esm-env';
|
|
4
|
+
|
|
5
|
+
let innerWidth: number = $state(0);
|
|
6
|
+
|
|
7
|
+
function screenSizeChanged(size: number) {
|
|
8
|
+
handleScreenSizeUpdate(size);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
$effect(() => {
|
|
12
|
+
BROWSER && screenSizeChanged(innerWidth);
|
|
13
|
+
});
|
|
10
14
|
</script>
|
|
11
15
|
|
|
12
16
|
<svelte:window bind:innerWidth />
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
type PropsType = {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
let { className = '' }: PropsType = $props();
|
|
3
8
|
</script>
|
|
4
9
|
|
|
5
10
|
<svg
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
type PropsType = {
|
|
4
|
+
input?: Promise<any | null> | undefined;
|
|
5
|
+
key?: string;
|
|
6
|
+
hasTitle?: string;
|
|
7
|
+
};
|
|
8
|
+
let { input, key, hasTitle }: PropsType = $props();
|
|
3
9
|
</script>
|
|
4
10
|
|
|
5
11
|
{#if input}
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../../../../../tailwind.css';
|
|
3
|
+
import Button from '../../../button/components/button/button.svelte';
|
|
4
|
+
import { copyText, showToast } from '../../../../../services/index.js';
|
|
5
|
+
import { mdiContentCopy } from '../../../icon';
|
|
6
|
+
|
|
7
|
+
type PropsType = {
|
|
8
|
+
input: string;
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
buttonClassName?: string;
|
|
11
|
+
iconClassName?: string;
|
|
12
|
+
iconPath?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
input,
|
|
17
|
+
containerClassName = '',
|
|
18
|
+
buttonClassName = '',
|
|
19
|
+
iconClassName = '',
|
|
20
|
+
iconPath = mdiContentCopy
|
|
21
|
+
}: PropsType = $props();
|
|
22
|
+
|
|
23
|
+
function handleCopy() {
|
|
24
|
+
if (input) {
|
|
25
|
+
copyText(input);
|
|
26
|
+
showToast('Copied!');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
</script>
|
|
19
30
|
|
|
20
31
|
<span class="flex items-center {containerClassName}">
|