firstly 0.0.13 → 0.0.15
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/CHANGELOG.md +16 -0
- package/esm/ROUTES.d.ts +2 -0
- package/esm/ROUTES.js +1 -0
- package/esm/auth/AuthController.d.ts +12 -23
- package/esm/auth/AuthController.js +12 -31
- package/esm/auth/server/AuthController.server.d.ts +11 -11
- package/esm/auth/server/AuthController.server.js +84 -18
- package/esm/auth/server/helperFirstly.d.ts +1 -1
- package/esm/auth/server/helperFirstly.js +1 -0
- package/esm/auth/server/module.d.ts +4 -7
- package/esm/auth/server/module.js +1 -1
- package/esm/auth/server/providers/github.d.ts +2 -1
- package/esm/auth/server/providers/github.js +1 -1
- package/esm/auth/static/assets/Page-B1GE_oYi.d.ts +6 -0
- package/esm/auth/static/assets/Page-B1GE_oYi.js +1 -0
- package/esm/auth/static/assets/Page-CDHFtYuN.d.ts +6 -0
- package/esm/auth/static/assets/Page-CDHFtYuN.js +1 -0
- package/esm/auth/static/assets/Page-Dh8pvAo6.d.ts +6 -0
- package/esm/auth/static/assets/Page-Dh8pvAo6.js +20 -0
- package/esm/auth/static/assets/Page-mK42zGEw.css +1 -0
- package/esm/auth/static/assets/index-7Nh2ct-y.d.ts +151 -0
- package/esm/auth/static/assets/index-7Nh2ct-y.js +42 -0
- package/esm/auth/static/index.html +3 -3
- package/esm/auth/types.d.ts +26 -3
- package/esm/bin/cmd.js +343 -143
- package/esm/changeLog/server/index.d.ts +1 -1
- package/esm/changeLog/server/index.js +1 -1
- package/esm/cron/server/index.d.ts +1 -1
- package/esm/cron/server/index.js +1 -1
- package/esm/feedback/FeedbackController.js +57 -51
- package/esm/feedback/server/index.d.ts +7 -16
- package/esm/feedback/server/index.js +5 -6
- package/esm/feedback/types.d.ts +14 -0
- package/esm/feedback/types.js +4 -0
- package/esm/feedback/ui/DialogIssue.svelte +78 -62
- package/esm/feedback/ui/DialogIssue.svelte.d.ts +20 -18
- package/esm/feedback/ui/DialogIssues.svelte +37 -28
- package/esm/feedback/ui/DialogIssues.svelte.d.ts +20 -18
- package/esm/feedback/ui/DialogMilestones.svelte +18 -12
- package/esm/feedback/ui/DialogMilestones.svelte.d.ts +18 -16
- package/esm/feedback/ui/Feedback.svelte +11 -9
- package/esm/feedback/ui/Feedback.svelte.d.ts +16 -14
- package/esm/mail/server/index.d.ts +9 -2
- package/esm/mail/server/index.js +6 -2
- package/esm/mail/templates/DefaultMail.svelte +64 -44
- package/esm/mail/templates/DefaultMail.svelte.d.ts +28 -26
- package/esm/{api → server}/index.d.ts +8 -0
- package/esm/storeItem.d.ts +1 -1
- package/esm/storeList.d.ts +1 -1
- package/esm/sveltekit/server/index.d.ts +1 -10
- package/esm/sveltekit/server/index.js +1 -1
- package/esm/ui/Button.svelte +79 -56
- package/esm/ui/Button.svelte.d.ts +34 -24
- package/esm/ui/Clipboardable.svelte +18 -11
- package/esm/ui/Clipboardable.svelte.d.ts +34 -23
- package/esm/ui/Field.svelte +189 -136
- package/esm/ui/Field.svelte.d.ts +13 -6
- package/esm/ui/FieldGroup.svelte +74 -53
- package/esm/ui/FieldGroup.svelte.d.ts +17 -6
- package/esm/ui/Grid.svelte +110 -86
- package/esm/ui/Grid.svelte.d.ts +17 -6
- package/esm/ui/GridLoading.svelte +10 -5
- package/esm/ui/GridLoading.svelte.d.ts +19 -17
- package/esm/ui/GridPaginate.svelte +30 -23
- package/esm/ui/GridPaginate.svelte.d.ts +21 -19
- package/esm/ui/Icon.svelte +67 -32
- package/esm/ui/Icon.svelte.d.ts +52 -43
- package/esm/ui/Loading.svelte +5 -3
- package/esm/ui/Loading.svelte.d.ts +29 -18
- package/esm/ui/Tooltip.svelte +22 -19
- package/esm/ui/Tooltip.svelte.d.ts +30 -20
- package/esm/ui/dialog/DialogForm.svelte +48 -41
- package/esm/ui/dialog/DialogForm.svelte.d.ts +18 -16
- package/esm/ui/dialog/DialogManagement.svelte.d.ts +22 -21
- package/esm/ui/dialog/DialogPrimitive.svelte +32 -26
- package/esm/ui/dialog/DialogPrimitive.svelte.d.ts +35 -25
- package/esm/ui/dialog/FormEditAction.svelte +20 -12
- package/esm/ui/dialog/FormEditAction.svelte.d.ts +13 -6
- package/esm/ui/dialog/dialog.d.ts +1 -1
- package/esm/ui/internals/FieldContainer.svelte +13 -6
- package/esm/ui/internals/FieldContainer.svelte.d.ts +37 -28
- package/esm/ui/internals/Input.svelte +110 -76
- package/esm/ui/internals/Input.svelte.d.ts +34 -32
- package/esm/ui/internals/Textarea.svelte +39 -31
- package/esm/ui/internals/Textarea.svelte.d.ts +31 -28
- package/esm/ui/internals/select/MultiSelectMelt.svelte +174 -126
- package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +29 -27
- package/esm/ui/internals/select/SelectMelt.svelte +168 -133
- package/esm/ui/internals/select/SelectMelt.svelte.d.ts +34 -32
- package/esm/ui/internals/select/SelectRadio.svelte +17 -11
- package/esm/ui/internals/select/SelectRadio.svelte.d.ts +24 -22
- package/esm/ui/link/Link.svelte +11 -6
- package/esm/ui/link/Link.svelte.d.ts +31 -22
- package/esm/ui/link/LinkPlus.svelte +19 -16
- package/esm/ui/link/LinkPlus.svelte.d.ts +20 -18
- package/esm/vite/index.d.ts +2 -3
- package/esm/vite/index.js +33 -26
- package/package.json +14 -14
- package/esm/auth/static/assets/Page-BUfjaN-D.d.ts +0 -5
- package/esm/auth/static/assets/Page-BUfjaN-D.js +0 -19
- package/esm/auth/static/assets/Page-CJ58H1vl.css +0 -1
- package/esm/auth/static/assets/Page-CaDAqmBS.d.ts +0 -5
- package/esm/auth/static/assets/Page-CaDAqmBS.js +0 -1
- package/esm/auth/static/assets/Page-DhdZddzJ.d.ts +0 -5
- package/esm/auth/static/assets/Page-DhdZddzJ.js +0 -1
- package/esm/auth/static/assets/index-D-Ztdt2o.d.ts +0 -54
- package/esm/auth/static/assets/index-D-Ztdt2o.js +0 -2
- /package/esm/auth/static/assets/{index-BDy4A_14.css → index-DKWpA6v7.css} +0 -0
- /package/esm/{api → server}/index.js +0 -0
package/esm/ui/Grid.svelte
CHANGED
|
@@ -1,89 +1,113 @@
|
|
|
1
|
-
<script generics="T extends Record<any, any>">
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export let
|
|
33
|
-
export let
|
|
34
|
-
export let
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
1
|
+
<script lang="ts" generics="T extends Record<any, any>">
|
|
2
|
+
import { createEventDispatcher } from 'svelte'
|
|
3
|
+
|
|
4
|
+
import type { EntityOrderBy } from 'remult'
|
|
5
|
+
|
|
6
|
+
import type { Cell } from '../cellsBuildor.js'
|
|
7
|
+
import {
|
|
8
|
+
displayWithDefaultAndSuffix,
|
|
9
|
+
getEntityDisplayValue,
|
|
10
|
+
getEntityDisplayValueFromField,
|
|
11
|
+
getFieldLinkDisplayValue,
|
|
12
|
+
getFieldMetaType,
|
|
13
|
+
} from '../helper.js'
|
|
14
|
+
import { LibIcon_Delete, LibIcon_Edit, type StoreList } from '../index.js'
|
|
15
|
+
import Button from './Button.svelte'
|
|
16
|
+
import Clipboardable from './Clipboardable.svelte'
|
|
17
|
+
import GridLoading from './GridLoading.svelte'
|
|
18
|
+
import Icon from './Icon.svelte'
|
|
19
|
+
import { align, getAligns } from './index.js'
|
|
20
|
+
import {
|
|
21
|
+
LibIcon_Add,
|
|
22
|
+
LibIcon_Settings,
|
|
23
|
+
LibIcon_Sort,
|
|
24
|
+
LibIcon_SortAsc,
|
|
25
|
+
LibIcon_SortDesc,
|
|
26
|
+
} from './LibIcon.js'
|
|
27
|
+
import LinkPlus from './link/LinkPlus.svelte'
|
|
28
|
+
|
|
29
|
+
export let cells: Cell<T>[]
|
|
30
|
+
export let store: StoreList<T>
|
|
31
|
+
|
|
32
|
+
export let withAdd = false
|
|
33
|
+
export let withEdit = false
|
|
34
|
+
export let withDelete = false
|
|
35
|
+
|
|
36
|
+
export let loadingRows = 5
|
|
37
|
+
|
|
38
|
+
export let classes = {
|
|
39
|
+
table: 'table-pin-rows table-pin-cols',
|
|
40
|
+
}
|
|
41
|
+
export let orderBy: EntityOrderBy<T> | undefined = undefined
|
|
42
|
+
export let orderByCols: (keyof T)[] | true | undefined = undefined
|
|
43
|
+
export let settingsLeft = false
|
|
44
|
+
|
|
45
|
+
export let dicoNoResult = 'Aucun résultat !'
|
|
46
|
+
|
|
47
|
+
const dispatch = createEventDispatcher()
|
|
48
|
+
|
|
49
|
+
const sorting = (toSort: boolean, b: Cell<T>) => {
|
|
50
|
+
if (!toSort) {
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
if (orderBy === undefined) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
orderBy = { [b.field.key]: 'asc' }
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
} else if (orderBy[b.field.key] === 'asc') {
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
orderBy = { [b.field.key]: 'desc' }
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
} else if (orderBy[b.field.key] === undefined) {
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
orderBy = { [b.field.key]: 'asc' }
|
|
64
|
+
} else {
|
|
65
|
+
orderBy = undefined
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const sortingIcon = (toSort: boolean, b: Cell<T>, _orderBy: EntityOrderBy<T> | undefined) => {
|
|
70
|
+
if (!toSort) {
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
if (_orderBy && _orderBy[b.field.key] === 'asc') {
|
|
75
|
+
return { data: LibIcon_SortAsc, class: 'text-primary' }
|
|
76
|
+
}
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
if (_orderBy && _orderBy[b.field.key] === 'desc') {
|
|
79
|
+
return { data: LibIcon_SortDesc, class: 'text-primary' }
|
|
80
|
+
}
|
|
81
|
+
return { data: LibIcon_Sort }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const cellsToTake = (cells: Cell<T>[]) => {
|
|
85
|
+
return cells.filter((c) => c.modeView !== 'hide')
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const classForRounding = (i: number) => {
|
|
89
|
+
if (settingsLeft && (withEdit || withDelete || withAdd)) {
|
|
90
|
+
if (i === 0) {
|
|
91
|
+
return ''
|
|
92
|
+
} else if (i === cells.length - 1) {
|
|
93
|
+
return 'rounded-tr-lg'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (!settingsLeft && (withEdit || withDelete || withAdd)) {
|
|
98
|
+
if (i === 0) {
|
|
99
|
+
return 'rounded-tl-lg'
|
|
100
|
+
} else if (i === cells.length - 1) {
|
|
101
|
+
return ''
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (i === 0) {
|
|
106
|
+
return 'rounded-tl-lg'
|
|
107
|
+
} else if (i === cells.length - 1) {
|
|
108
|
+
return 'rounded-tr-lg'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
87
111
|
</script>
|
|
88
112
|
|
|
89
113
|
<div class="overflow-x-auto">
|
package/esm/ui/Grid.svelte.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { EntityOrderBy } from 'remult';
|
|
3
2
|
import type { Cell } from '../cellsBuildor.js';
|
|
4
3
|
import { type StoreList } from '../index.js';
|
|
@@ -38,10 +37,22 @@ declare class __sveltets_Render<T extends Record<any, any>> {
|
|
|
38
37
|
};
|
|
39
38
|
extra: {};
|
|
40
39
|
};
|
|
40
|
+
bindings(): string;
|
|
41
|
+
exports(): {};
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
interface $$IsomorphicComponent {
|
|
44
|
+
new <T extends Record<any, any>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']> & {
|
|
45
|
+
children?: any;
|
|
46
|
+
}>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
47
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
48
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
49
|
+
<T extends Record<any, any>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
|
|
50
|
+
$$events?: ReturnType<__sveltets_Render<T>['events']>;
|
|
51
|
+
$$slots?: ReturnType<__sveltets_Render<T>['slots']>;
|
|
52
|
+
children?: any;
|
|
53
|
+
}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
54
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
46
55
|
}
|
|
47
|
-
|
|
56
|
+
declare const Grid: $$IsomorphicComponent;
|
|
57
|
+
type Grid<T extends Record<any, any>> = InstanceType<typeof Grid<T>>;
|
|
58
|
+
export default Grid;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tw } from '../utils/tailwind'
|
|
3
|
+
import type { Align } from './index.js'
|
|
4
|
+
import Loading from './Loading.svelte'
|
|
5
|
+
|
|
6
|
+
export let columns: Align[]
|
|
7
|
+
export let loadingRows = 5
|
|
8
|
+
|
|
9
|
+
// Random with different size
|
|
10
|
+
let size = ['', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6']
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<!-- Do 10 rows -->
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { Align } from './index.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
7
12
|
};
|
|
8
|
-
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
exports?: {} | undefined;
|
|
13
|
-
bindings?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
export type GridLoadingProps = typeof __propDef.props;
|
|
16
|
-
export type GridLoadingEvents = typeof __propDef.events;
|
|
17
|
-
export type GridLoadingSlots = typeof __propDef.slots;
|
|
18
|
-
export default class GridLoading extends SvelteComponent<GridLoadingProps, GridLoadingEvents, GridLoadingSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
19
14
|
}
|
|
20
|
-
|
|
15
|
+
declare const GridLoading: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
columns: Align[];
|
|
17
|
+
loadingRows?: number;
|
|
18
|
+
}, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, string>;
|
|
21
|
+
type GridLoading = InstanceType<typeof GridLoading>;
|
|
22
|
+
export default GridLoading;
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Icon from './Icon.svelte'
|
|
3
|
+
import FieldContainer from './internals/FieldContainer.svelte'
|
|
4
|
+
|
|
5
|
+
import './LibIcon'
|
|
6
|
+
|
|
7
|
+
import { LibIcon_ChevronLeft, LibIcon_ChevronRight } from './LibIcon'
|
|
8
|
+
import Loading from './Loading.svelte'
|
|
9
|
+
|
|
10
|
+
export let label = 'Pagination'
|
|
11
|
+
export let pageDisplayed: number
|
|
12
|
+
export let totalCount: number | undefined | null = undefined
|
|
13
|
+
export let pageSize: number = 25
|
|
14
|
+
|
|
15
|
+
const update = (op: '+' | '-') => {
|
|
16
|
+
if (op === '+') {
|
|
17
|
+
if (canGoNext) {
|
|
18
|
+
pageDisplayed = pageDisplayed + 1
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
if (pageDisplayed > 1) {
|
|
22
|
+
pageDisplayed = pageDisplayed - 1
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
$: isValidValue = totalCount !== undefined && totalCount !== null
|
|
28
|
+
$: needPaginate = isValidValue && (totalCount ?? 0) > pageSize
|
|
29
|
+
$: canGoNext =
|
|
30
|
+
isValidValue && needPaginate && pageDisplayed < Math.ceil((totalCount ?? 0) / pageSize)
|
|
24
31
|
</script>
|
|
25
32
|
|
|
26
33
|
<FieldContainer {label} forId="paginate" classes={{ label: 'justify-end' }}>
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import './LibIcon';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
9
12
|
};
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {};
|
|
14
|
-
exports?: {} | undefined;
|
|
15
|
-
bindings?: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
export type GridPaginateProps = typeof __propDef.props;
|
|
18
|
-
export type GridPaginateEvents = typeof __propDef.events;
|
|
19
|
-
export type GridPaginateSlots = typeof __propDef.slots;
|
|
20
|
-
export default class GridPaginate extends SvelteComponent<GridPaginateProps, GridPaginateEvents, GridPaginateSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
21
14
|
}
|
|
22
|
-
|
|
15
|
+
declare const GridPaginate: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
label?: string;
|
|
17
|
+
pageDisplayed: number;
|
|
18
|
+
totalCount?: number | undefined | null;
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type GridPaginate = InstanceType<typeof GridPaginate>;
|
|
24
|
+
export default GridPaginate;
|
package/esm/ui/Icon.svelte
CHANGED
|
@@ -1,35 +1,70 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
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
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { BROWSER } from 'esm-env'
|
|
3
|
+
|
|
4
|
+
import './LibIcon'
|
|
5
|
+
|
|
6
|
+
import { LibIcon_Empty } from './LibIcon'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* directly <svg ... /> or d of <path ... />
|
|
10
|
+
*
|
|
11
|
+
* with \@mdi/js
|
|
12
|
+
* ```js
|
|
13
|
+
* import { mdiAccountTieWoman } from "@mdi/js";
|
|
14
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* with \@iconify-json/mdi && unplugin-icons with Icons({ compiler: "raw" })
|
|
18
|
+
* ```js
|
|
19
|
+
* import Woman from "virtual:icons/mdi/account-tie-woman";
|
|
20
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export let data: string | string[] = ''
|
|
24
|
+
|
|
25
|
+
export let size: string | number = '1.5rem'
|
|
26
|
+
|
|
27
|
+
export let caption: string | undefined = undefined
|
|
28
|
+
const rmvWarning = caption
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* By default, svg are not rendered on the server side.
|
|
32
|
+
* But the size will be respected to not have glitch on the client side when the icon is coming.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
export let ssr = false
|
|
36
|
+
|
|
37
|
+
let className: string | string[] | undefined = ''
|
|
38
|
+
export { className as class }
|
|
39
|
+
export let style: string | string[] | undefined = ''
|
|
40
|
+
|
|
41
|
+
let width = size
|
|
42
|
+
let height = size
|
|
43
|
+
let viewBox = '0 0 24 24'
|
|
44
|
+
|
|
45
|
+
let svg = ''
|
|
46
|
+
let path: string | string[] = ''
|
|
47
|
+
|
|
48
|
+
$: if (typeof data === 'string') {
|
|
49
|
+
if (data.toLowerCase().includes('<svg')) {
|
|
50
|
+
svg = data
|
|
51
|
+
.replace(/width="[^"]*"/, `width="${width}"`)
|
|
52
|
+
.replace(/height="[^"]*"/, `height="${height}"`)
|
|
53
|
+
} else {
|
|
54
|
+
path = data
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
path = data
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const getInfoProps = (props: string | string[] | undefined, i: number = 0) => {
|
|
61
|
+
if (Array.isArray(props)) {
|
|
62
|
+
return props[i] ?? ''
|
|
63
|
+
}
|
|
64
|
+
return props ?? ''
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const role = 'img'
|
|
33
68
|
</script>
|
|
34
69
|
|
|
35
70
|
{#if BROWSER || ssr}
|
package/esm/ui/Icon.svelte.d.ts
CHANGED
|
@@ -1,46 +1,55 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import './LibIcon';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
* with \@iconify-json/mdi && unplugin-icons with Icons({ compiler: "raw" })
|
|
15
|
-
* ```js
|
|
16
|
-
* import Woman from "virtual:icons/mdi/account-tie-woman";
|
|
17
|
-
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
18
|
-
* ```
|
|
19
|
-
*/ data?: string | string[];
|
|
20
|
-
size?: string | number;
|
|
21
|
-
caption?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* By default, svg are not rendered on the server side.
|
|
24
|
-
* But the size will be respected to not have glitch on the client side when the icon is coming.
|
|
25
|
-
* @default false
|
|
26
|
-
*/ ssr?: boolean;
|
|
27
|
-
class?: string | string[] | undefined;
|
|
28
|
-
style?: string | string[] | undefined;
|
|
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
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
29
12
|
};
|
|
30
|
-
|
|
31
|
-
click: MouseEvent;
|
|
32
|
-
} & {
|
|
33
|
-
[evt: string]: CustomEvent<any>;
|
|
34
|
-
};
|
|
35
|
-
slots: {
|
|
36
|
-
default: {};
|
|
37
|
-
};
|
|
38
|
-
exports?: {} | undefined;
|
|
39
|
-
bindings?: string | undefined;
|
|
40
|
-
};
|
|
41
|
-
export type IconProps = typeof __propDef.props;
|
|
42
|
-
export type IconEvents = typeof __propDef.events;
|
|
43
|
-
export type IconSlots = typeof __propDef.slots;
|
|
44
|
-
export default class Icon extends SvelteComponent<IconProps, IconEvents, IconSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
45
14
|
}
|
|
46
|
-
|
|
15
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
+
default: any;
|
|
17
|
+
} ? Props extends Record<string, never> ? any : {
|
|
18
|
+
children?: any;
|
|
19
|
+
} : {});
|
|
20
|
+
declare const Icon: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
+
/**
|
|
22
|
+
* directly <svg ... /> or d of <path ... />
|
|
23
|
+
*
|
|
24
|
+
* with \@mdi/js
|
|
25
|
+
* ```js
|
|
26
|
+
* import { mdiAccountTieWoman } from "@mdi/js";
|
|
27
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* with \@iconify-json/mdi && unplugin-icons with Icons({ compiler: "raw" })
|
|
31
|
+
* ```js
|
|
32
|
+
* import Woman from "virtual:icons/mdi/account-tie-woman";
|
|
33
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
34
|
+
* ```
|
|
35
|
+
*/ data?: string | string[];
|
|
36
|
+
size?: string | number;
|
|
37
|
+
caption?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* By default, svg are not rendered on the server side.
|
|
40
|
+
* But the size will be respected to not have glitch on the client side when the icon is coming.
|
|
41
|
+
* @default false
|
|
42
|
+
*/ ssr?: boolean;
|
|
43
|
+
class?: string | string[] | undefined;
|
|
44
|
+
style?: string | string[] | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
default: {};
|
|
47
|
+
}>, {
|
|
48
|
+
click: MouseEvent;
|
|
49
|
+
} & {
|
|
50
|
+
[evt: string]: CustomEvent<any>;
|
|
51
|
+
}, {
|
|
52
|
+
default: {};
|
|
53
|
+
}, {}, string>;
|
|
54
|
+
type Icon = InstanceType<typeof Icon>;
|
|
55
|
+
export default Icon;
|
package/esm/ui/Loading.svelte
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tw } from '../utils/tailwind'
|
|
3
|
+
|
|
4
|
+
export { extraClass as class }
|
|
5
|
+
let extraClass = ''
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
8
|
<!-- To fix one capa & cadb are on the same css -->
|