@lavalogic/scoria 0.0.18 → 0.0.20
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/Components/DateInput.svelte +23 -7
- package/dist/Components/DateInput.svelte.d.ts +23 -5
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +2 -8
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte.d.ts +2 -7
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.d.ts +1 -0
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.js +3 -0
- package/dist/Types/Internal/GridItem.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -6,13 +6,10 @@
|
|
|
6
6
|
import { Size } from '../Types/Internal/Size.js';
|
|
7
7
|
import Icon, { type PartialIconProps } from './Icon.svelte';
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
export type DateInputProps = DateOnlyInputProps | DateTimeInputProps;
|
|
10
10
|
|
|
11
|
-
export interface
|
|
12
|
-
|
|
13
|
-
ValueType = DT extends undefined | 'date' ? InputDate : InputDateWithTime
|
|
14
|
-
> {
|
|
15
|
-
value?: ValueType | null;
|
|
11
|
+
export interface DateOnlyInputProps {
|
|
12
|
+
value?: InputDate | null;
|
|
16
13
|
label?: string;
|
|
17
14
|
placeholder?: string;
|
|
18
15
|
required?: boolean;
|
|
@@ -20,7 +17,26 @@
|
|
|
20
17
|
min?: string;
|
|
21
18
|
max?: string;
|
|
22
19
|
optional?: boolean;
|
|
23
|
-
type?:
|
|
20
|
+
type?: 'date';
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
leftIcon?: PartialIconProps;
|
|
23
|
+
rightIcon?: PartialIconProps;
|
|
24
|
+
inputRef?: HTMLInputElement;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
onblur?: (e: FocusEvent) => void;
|
|
27
|
+
onfocus?: (e: FocusEvent) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DateTimeInputProps {
|
|
31
|
+
value?: InputDateWithTime | null;
|
|
32
|
+
label?: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
variant?: InputVariant;
|
|
36
|
+
min?: string;
|
|
37
|
+
max?: string;
|
|
38
|
+
optional?: boolean;
|
|
39
|
+
type?: 'datetime-local';
|
|
24
40
|
disabled?: boolean;
|
|
25
41
|
leftIcon?: PartialIconProps;
|
|
26
42
|
rightIcon?: PartialIconProps;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { InputVariant } from '../Types/Internal/InputVariant.js';
|
|
2
2
|
import type { InputDate, InputDateWithTime } from '../Types/Internal/Misc.js';
|
|
3
3
|
import { type PartialIconProps } from './Icon.svelte';
|
|
4
|
-
type
|
|
5
|
-
export interface
|
|
6
|
-
value?:
|
|
4
|
+
export type DateInputProps = DateOnlyInputProps | DateTimeInputProps;
|
|
5
|
+
export interface DateOnlyInputProps {
|
|
6
|
+
value?: InputDate | null;
|
|
7
7
|
label?: string;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
required?: boolean;
|
|
@@ -11,7 +11,7 @@ export interface DateInputProps<DT = DTType, ValueType = DT extends undefined |
|
|
|
11
11
|
min?: string;
|
|
12
12
|
max?: string;
|
|
13
13
|
optional?: boolean;
|
|
14
|
-
type?:
|
|
14
|
+
type?: 'date';
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
leftIcon?: PartialIconProps;
|
|
17
17
|
rightIcon?: PartialIconProps;
|
|
@@ -20,6 +20,24 @@ export interface DateInputProps<DT = DTType, ValueType = DT extends undefined |
|
|
|
20
20
|
onblur?: (e: FocusEvent) => void;
|
|
21
21
|
onfocus?: (e: FocusEvent) => void;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
export interface DateTimeInputProps {
|
|
24
|
+
value?: InputDateWithTime | null;
|
|
25
|
+
label?: string;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
variant?: InputVariant;
|
|
29
|
+
min?: string;
|
|
30
|
+
max?: string;
|
|
31
|
+
optional?: boolean;
|
|
32
|
+
type?: 'datetime-local';
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
leftIcon?: PartialIconProps;
|
|
35
|
+
rightIcon?: PartialIconProps;
|
|
36
|
+
inputRef?: HTMLInputElement;
|
|
37
|
+
invalid?: boolean;
|
|
38
|
+
onblur?: (e: FocusEvent) => void;
|
|
39
|
+
onfocus?: (e: FocusEvent) => void;
|
|
40
|
+
}
|
|
41
|
+
declare const DateInput: import("svelte").Component<DateInputProps, {}, "value">;
|
|
24
42
|
type DateInput = ReturnType<typeof DateInput>;
|
|
25
43
|
export default DateInput;
|
|
@@ -13,16 +13,10 @@
|
|
|
13
13
|
import { Size } from '../../../../../Types/Internal/Size.js';
|
|
14
14
|
import { Validity } from '../../../../../Types/Internal/Validity.js';
|
|
15
15
|
|
|
16
|
-
export interface
|
|
16
|
+
export interface ValidityCellProps<T extends object> {
|
|
17
17
|
cell: TableCell<T>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export interface IconCellModalProps<T extends object> {
|
|
21
|
-
cell: TableCell<T>;
|
|
22
|
-
onclose: () => void;
|
|
23
|
-
onsubmit?: (e: SubmitEvent) => void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
20
|
const iconSets: Record<Validity, IconProps> = {
|
|
27
21
|
[Validity.Invalid]: {
|
|
28
22
|
name: 'circle-cross',
|
|
@@ -49,7 +43,7 @@
|
|
|
49
43
|
<script lang="ts" generics="T extends object">
|
|
50
44
|
import { getContext, tick, untrack } from 'svelte';
|
|
51
45
|
|
|
52
|
-
const { cell }:
|
|
46
|
+
const { cell }: ValidityCellProps<T> = $props();
|
|
53
47
|
|
|
54
48
|
const tableContext = getContext<TableContext<T>>(TableContext.identifier);
|
|
55
49
|
const { toast } = getContext<ToastContext>(ToastContext.identifier);
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { TableCell } from '../../../Types/Columns/TableCell.js';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ValidityCellProps<T extends object> {
|
|
3
3
|
cell: TableCell<T>;
|
|
4
4
|
}
|
|
5
|
-
export interface IconCellModalProps<T extends object> {
|
|
6
|
-
cell: TableCell<T>;
|
|
7
|
-
onclose: () => void;
|
|
8
|
-
onsubmit?: (e: SubmitEvent) => void;
|
|
9
|
-
}
|
|
10
5
|
declare function $$render<T extends object>(): {
|
|
11
|
-
props:
|
|
6
|
+
props: ValidityCellProps<T>;
|
|
12
7
|
exports: {};
|
|
13
8
|
bindings: "";
|
|
14
9
|
slots: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GridNumberItem } from './GridNumberItem.js';
|
|
2
2
|
import type { GridSelectItem } from './GridSelectItem.js';
|
|
3
3
|
import type { GridTextItem } from './GridTextItem.js';
|
|
4
|
-
export type GridItem<V, VP> = GridTextItem | GridNumberItem | (V extends object ? (VP extends string & keyof V ? GridSelectItem<V, VP> : never) : never);
|
|
4
|
+
export type GridItem<V = unknown, VP = unknown> = GridTextItem | GridNumberItem | (V extends object ? (VP extends string & keyof V ? GridSelectItem<V, VP> : never) : never);
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { type QueryDefProps, QueryDef } from './Components/Table/Types/Columns/D
|
|
|
9
9
|
export { type SelectDefProps, SelectDef } from './Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.js';
|
|
10
10
|
export { type TextInputDefProps, TextInputDef } from './Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.js';
|
|
11
11
|
export { type ActionsDefProps, ActionsDef } from './Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.js';
|
|
12
|
-
export { type AbstractDisplayDefProps, AbstractDisplayDef } from './Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
|
|
12
|
+
export { type DisplayDefModalProps, type AbstractDisplayDefProps, AbstractDisplayDef } from './Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
|
|
13
13
|
export { type BubbleDefProps, BubbleDef } from './Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.js';
|
|
14
14
|
export { type DisplayDefProps, DisplayDef } from './Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.js';
|
|
15
15
|
export { type ProgressBarDefProps, ProgressBarDef } from './Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.js';
|
|
@@ -87,7 +87,7 @@ export { default as Button } from './Components/Button.svelte';
|
|
|
87
87
|
export { default as Checkbox } from './Components/Checkbox.svelte';
|
|
88
88
|
export { default as CollapsibleCard } from './Components/CollapsibleCard.svelte';
|
|
89
89
|
export { default as DataMatrixIcon } from './Components/DataMatrixIcon.svelte';
|
|
90
|
-
export { default as DateInput } from './Components/DateInput.svelte';
|
|
90
|
+
export { default as DateInput, type DateOnlyInputProps, type DateTimeInputProps } from './Components/DateInput.svelte';
|
|
91
91
|
export { default as DatePicker } from './Components/DatePicker.svelte';
|
|
92
92
|
export { default as DesktopModal } from './Components/DesktopModal.svelte';
|
|
93
93
|
export { default as Dial } from './Components/Dial.svelte';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lavalogic/scoria",
|
|
3
3
|
"description": "Svelte components used for the FloWMS Web Frontend",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
7
7
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"publint": "^0.3.14",
|
|
57
57
|
"sass-embedded": "^1.93.2",
|
|
58
58
|
"storybook": "^9.1.10",
|
|
59
|
-
"svelte": "^5.
|
|
59
|
+
"svelte": "^5.40.0",
|
|
60
60
|
"svelte-check": "^4.3.3",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
62
|
"typescript-eslint": "^8.46.1",
|