@moser-inc/moser-labs-react 6.7.9 → 6.8.1
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/moser-labs-react.css +1 -1
- package/dist/moser-labs-react.js +8795 -8358
- package/dist/package.json.d.ts +17 -17
- package/dist/src/_dev/components/DevDirectoryLink.d.ts +6 -1
- package/dist/src/_dev/components/DevLink.d.ts +6 -3
- package/dist/src/_dev/views/Inputs.view.d.ts +20 -0
- package/dist/src/components/LabsMultiSelect.d.ts +24 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/utils/reactHookFormHelpers.d.ts +9 -0
- package/package.json +17 -17
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@moser-inc/moser-labs-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.1",
|
|
4
4
|
"description": "React components for the Moser Labs suite of applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,35 +48,35 @@ declare const _default: {
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@analytics/mixpanel": "^0.4.0",
|
|
51
|
-
"@moser-inc/moser-labs-custom-elements": "2.5.
|
|
51
|
+
"@moser-inc/moser-labs-custom-elements": "2.5.8",
|
|
52
52
|
"@react-hookz/web": "^25.2.0",
|
|
53
53
|
"analytics": "^0.8.19",
|
|
54
54
|
"clsx": "^2.1.1",
|
|
55
55
|
"dayjs": "^1.11.19",
|
|
56
56
|
"keycloak-js": "23.0.3",
|
|
57
|
-
"mixpanel-browser": "^2.
|
|
58
|
-
"motion": "^12.
|
|
57
|
+
"mixpanel-browser": "^2.74.0",
|
|
58
|
+
"motion": "^12.29.3",
|
|
59
59
|
"react-idle-timer": "^5.7.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@hookform/resolvers": "^5.2.2",
|
|
63
|
-
"@moser-inc/eslint-config-react": "^
|
|
64
|
-
"@moser-inc/unocss-preset-moser-labs": "^
|
|
65
|
-
"@tsconfig/
|
|
63
|
+
"@moser-inc/eslint-config-react": "^5.1.3",
|
|
64
|
+
"@moser-inc/unocss-preset-moser-labs": "^6.0.0",
|
|
65
|
+
"@tsconfig/node24": "^24.0.4",
|
|
66
66
|
"@tsconfig/vite-react": "^7.0.2",
|
|
67
|
-
"@unocss/eslint-config": "^66.
|
|
68
|
-
"@vitejs/plugin-basic-ssl": "^2.1.
|
|
69
|
-
"@vitejs/plugin-react": "^5.1.
|
|
67
|
+
"@unocss/eslint-config": "^66.6.4",
|
|
68
|
+
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
69
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
70
70
|
"eslint": "^9.39.2",
|
|
71
|
-
"prettier": "^3.
|
|
72
|
-
"react-hook-form": "^7.
|
|
73
|
-
"react-router": "^7.
|
|
74
|
-
"react-router-dom": "^7.
|
|
71
|
+
"prettier": "^3.8.1",
|
|
72
|
+
"react-hook-form": "^7.71.2",
|
|
73
|
+
"react-router": "^7.13.1",
|
|
74
|
+
"react-router-dom": "^7.13.1",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
|
-
"unocss": "^66.
|
|
77
|
-
"vite": "^7.3.
|
|
76
|
+
"unocss": "^66.6.4",
|
|
77
|
+
"vite": "^7.3.1",
|
|
78
78
|
"vite-plugin-dts": "^4.5.4",
|
|
79
|
-
"zod": "^4.
|
|
79
|
+
"zod": "^4.3.6"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
;
|
|
@@ -7,7 +7,12 @@ export interface DevDirectoryLinkProps extends DevDirectoryLinkBaseProps {
|
|
|
7
7
|
item: DirectoryValue;
|
|
8
8
|
refreshOnSameUrl?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const DevDirectoryLink:
|
|
10
|
+
export declare const DevDirectoryLink: {
|
|
11
|
+
({ ref, item, children, refreshOnSameUrl, reloadDocument, ...rest }: DevDirectoryLinkProps & {
|
|
12
|
+
ref?: React.RefObject<HTMLAnchorElement | null>;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
11
16
|
export interface DirectoryMenuItem extends MenuItem {
|
|
12
17
|
linkClassName?: DevDirectoryLinkProps['className'];
|
|
13
18
|
iconClassName?: string;
|
|
@@ -2,6 +2,9 @@ import { LinkProps } from 'react-router-dom';
|
|
|
2
2
|
export type DevLinkProps = LinkProps & {
|
|
3
3
|
refreshOnSameUrl?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare const DevLink:
|
|
6
|
-
refreshOnSameUrl
|
|
7
|
-
|
|
5
|
+
export declare const DevLink: {
|
|
6
|
+
({ ref, refreshOnSameUrl, ...props }: DevLinkProps & {
|
|
7
|
+
ref?: React.RefObject<HTMLAnchorElement | null>;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
@@ -4,6 +4,7 @@ export declare const SampleFormSchema: z.ZodObject<{
|
|
|
4
4
|
checkbox: z.ZodBoolean;
|
|
5
5
|
date: z.ZodPipe<z.ZodNullable<z.ZodDate>, z.ZodTransform<Date | null, Date | null>>;
|
|
6
6
|
select: z.ZodString;
|
|
7
|
+
multiSelect: z.ZodArray<z.ZodString>;
|
|
7
8
|
text: z.ZodString;
|
|
8
9
|
textCurrency: z.ZodString;
|
|
9
10
|
textSearch: z.ZodString;
|
|
@@ -15,6 +16,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
15
16
|
checkbox: z.ZodBoolean;
|
|
16
17
|
date: z.ZodPipe<z.ZodNullable<z.ZodDate>, z.ZodTransform<Date | null, Date | null>>;
|
|
17
18
|
select: z.ZodString;
|
|
19
|
+
multiSelect: z.ZodArray<z.ZodString>;
|
|
18
20
|
text: z.ZodString;
|
|
19
21
|
textCurrency: z.ZodString;
|
|
20
22
|
textSearch: z.ZodString;
|
|
@@ -24,6 +26,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
24
26
|
checkbox: boolean;
|
|
25
27
|
date: Date | null;
|
|
26
28
|
select: string;
|
|
29
|
+
multiSelect: string[];
|
|
27
30
|
text: string;
|
|
28
31
|
textCurrency: string;
|
|
29
32
|
textSearch: string;
|
|
@@ -33,6 +36,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
33
36
|
checkbox: boolean;
|
|
34
37
|
date: Date | null;
|
|
35
38
|
select: string;
|
|
39
|
+
multiSelect: string[];
|
|
36
40
|
text: string;
|
|
37
41
|
textCurrency: string;
|
|
38
42
|
textSearch: string;
|
|
@@ -42,6 +46,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
42
46
|
checkbox: boolean;
|
|
43
47
|
date: Date | null;
|
|
44
48
|
select: string;
|
|
49
|
+
multiSelect: string[];
|
|
45
50
|
text: string;
|
|
46
51
|
textCurrency: string;
|
|
47
52
|
textSearch: string;
|
|
@@ -51,6 +56,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
51
56
|
checkbox: boolean;
|
|
52
57
|
date: Date | null;
|
|
53
58
|
select: string;
|
|
59
|
+
multiSelect: string[];
|
|
54
60
|
text: string;
|
|
55
61
|
textCurrency: string;
|
|
56
62
|
textSearch: string;
|
|
@@ -60,6 +66,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
60
66
|
checkbox: boolean;
|
|
61
67
|
date: Date | null;
|
|
62
68
|
select: string;
|
|
69
|
+
multiSelect: string[];
|
|
63
70
|
text: string;
|
|
64
71
|
textCurrency: string;
|
|
65
72
|
textSearch: string;
|
|
@@ -69,6 +76,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
69
76
|
checkbox: boolean;
|
|
70
77
|
date: Date | null;
|
|
71
78
|
select: string;
|
|
79
|
+
multiSelect: string[];
|
|
72
80
|
text: string;
|
|
73
81
|
textCurrency: string;
|
|
74
82
|
textSearch: string;
|
|
@@ -78,6 +86,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
78
86
|
checkbox: boolean;
|
|
79
87
|
date: Date | null;
|
|
80
88
|
select: string;
|
|
89
|
+
multiSelect: string[];
|
|
81
90
|
text: string;
|
|
82
91
|
textCurrency: string;
|
|
83
92
|
textSearch: string;
|
|
@@ -87,6 +96,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
87
96
|
checkbox: boolean;
|
|
88
97
|
date: Date | null;
|
|
89
98
|
select: string;
|
|
99
|
+
multiSelect: string[];
|
|
90
100
|
text: string;
|
|
91
101
|
textCurrency: string;
|
|
92
102
|
textSearch: string;
|
|
@@ -96,6 +106,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
96
106
|
checkbox: boolean;
|
|
97
107
|
date: Date | null;
|
|
98
108
|
select: string;
|
|
109
|
+
multiSelect: string[];
|
|
99
110
|
text: string;
|
|
100
111
|
textCurrency: string;
|
|
101
112
|
textSearch: string;
|
|
@@ -105,6 +116,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
105
116
|
checkbox: boolean;
|
|
106
117
|
date: Date | null;
|
|
107
118
|
select: string;
|
|
119
|
+
multiSelect: string[];
|
|
108
120
|
text: string;
|
|
109
121
|
textCurrency: string;
|
|
110
122
|
textSearch: string;
|
|
@@ -114,6 +126,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
114
126
|
checkbox: boolean;
|
|
115
127
|
date: Date | null;
|
|
116
128
|
select: string;
|
|
129
|
+
multiSelect: string[];
|
|
117
130
|
text: string;
|
|
118
131
|
textCurrency: string;
|
|
119
132
|
textSearch: string;
|
|
@@ -122,6 +135,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
122
135
|
checkbox: boolean;
|
|
123
136
|
date: Date | null;
|
|
124
137
|
select: string;
|
|
138
|
+
multiSelect: string[];
|
|
125
139
|
text: string;
|
|
126
140
|
textCurrency: string;
|
|
127
141
|
textSearch: string;
|
|
@@ -131,6 +145,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
131
145
|
checkbox: boolean;
|
|
132
146
|
date: Date | null;
|
|
133
147
|
select: string;
|
|
148
|
+
multiSelect: string[];
|
|
134
149
|
text: string;
|
|
135
150
|
textCurrency: string;
|
|
136
151
|
textSearch: string;
|
|
@@ -140,6 +155,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
140
155
|
checkbox: boolean;
|
|
141
156
|
date: Date | null;
|
|
142
157
|
select: string;
|
|
158
|
+
multiSelect: string[];
|
|
143
159
|
text: string;
|
|
144
160
|
textCurrency: string;
|
|
145
161
|
textSearch: string;
|
|
@@ -148,6 +164,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
148
164
|
checkbox: boolean;
|
|
149
165
|
date: Date | null;
|
|
150
166
|
select: string;
|
|
167
|
+
multiSelect: string[];
|
|
151
168
|
text: string;
|
|
152
169
|
textCurrency: string;
|
|
153
170
|
textSearch: string;
|
|
@@ -157,6 +174,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
157
174
|
checkbox: boolean;
|
|
158
175
|
date: Date | null;
|
|
159
176
|
select: string;
|
|
177
|
+
multiSelect: string[];
|
|
160
178
|
text: string;
|
|
161
179
|
textCurrency: string;
|
|
162
180
|
textSearch: string;
|
|
@@ -166,6 +184,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
166
184
|
checkbox: boolean;
|
|
167
185
|
date: Date | null;
|
|
168
186
|
select: string;
|
|
187
|
+
multiSelect: string[];
|
|
169
188
|
text: string;
|
|
170
189
|
textCurrency: string;
|
|
171
190
|
textSearch: string;
|
|
@@ -175,6 +194,7 @@ export declare const useSampleForm: ({ resolver, defaultValues, ...rest }?: UseF
|
|
|
175
194
|
checkbox: boolean;
|
|
176
195
|
date: Date | null;
|
|
177
196
|
select: string;
|
|
197
|
+
multiSelect: string[];
|
|
178
198
|
text: string;
|
|
179
199
|
textCurrency: string;
|
|
180
200
|
textSearch: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MultiSelectChangeEvent, MultiSelectProps } from 'primereact/multiselect';
|
|
2
|
+
import { IconType } from 'primereact/utils';
|
|
3
|
+
import { FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
|
|
4
|
+
export interface LabsMultiSelectOption<T = unknown> {
|
|
5
|
+
label?: string;
|
|
6
|
+
value?: T;
|
|
7
|
+
className?: string;
|
|
8
|
+
icon?: IconType<unknown>;
|
|
9
|
+
title?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
items?: LabsMultiSelectOption<T>[];
|
|
12
|
+
}
|
|
13
|
+
type FieldProps = Partial<MultiSelectProps> & FieldContainerInputProps;
|
|
14
|
+
export type LabsMultiSelectChangeEvent<TValue> = Omit<MultiSelectChangeEvent, 'value' | 'selectedOption'> & {
|
|
15
|
+
value: TValue[];
|
|
16
|
+
selectedOption: LabsMultiSelectOption<TValue>;
|
|
17
|
+
};
|
|
18
|
+
export interface LabsMultiSelectProps<TValue extends string | number> extends FieldProps {
|
|
19
|
+
value?: TValue[];
|
|
20
|
+
options?: LabsMultiSelectOption<TValue>[];
|
|
21
|
+
onChange?: (event: LabsMultiSelectChangeEvent<TValue>) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const LabsMultiSelect: <TValue extends string | number>(props: LabsMultiSelectProps<TValue>) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
package/dist/src/main.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './components/LabsMainDesktopNav';
|
|
|
13
13
|
export * from './components/LabsMainMobileNav';
|
|
14
14
|
export * from './components/LabsMainHeaderActions';
|
|
15
15
|
export * from './components/LabsMenuNav';
|
|
16
|
+
export * from './components/LabsMultiSelect';
|
|
16
17
|
export * from './components/LabsSelect';
|
|
17
18
|
export * from './components/LabsSelectCascade';
|
|
18
19
|
export * from './components/LabsSpeedDialNav';
|
|
@@ -22,6 +22,15 @@ export declare const toLabsDateProps: <TValues extends FieldValues = FieldValues
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
name: TName;
|
|
24
24
|
};
|
|
25
|
+
export declare const toLabsMultiSelectProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
|
|
26
|
+
inputRef: import('react-hook-form').RefCallBack;
|
|
27
|
+
value: TValues[TName];
|
|
28
|
+
onChange: (event: import('../components/LabsMultiSelect').LabsMultiSelectChangeEvent<TValues[TName][number]>) => void;
|
|
29
|
+
message: string | undefined;
|
|
30
|
+
onBlur: import('react-hook-form').Noop;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
name: TName;
|
|
33
|
+
};
|
|
25
34
|
export declare const toLabsSelectProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
|
|
26
35
|
inputRef: import('react-hook-form').RefCallBack;
|
|
27
36
|
value: TValues[TName];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moser-inc/moser-labs-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.1",
|
|
4
4
|
"description": "React components for the Moser Labs suite of applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,34 +48,34 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@analytics/mixpanel": "^0.4.0",
|
|
51
|
-
"@moser-inc/moser-labs-custom-elements": "2.5.
|
|
51
|
+
"@moser-inc/moser-labs-custom-elements": "2.5.8",
|
|
52
52
|
"@react-hookz/web": "^25.2.0",
|
|
53
53
|
"analytics": "^0.8.19",
|
|
54
54
|
"clsx": "^2.1.1",
|
|
55
55
|
"dayjs": "^1.11.19",
|
|
56
56
|
"keycloak-js": "23.0.3",
|
|
57
|
-
"mixpanel-browser": "^2.
|
|
58
|
-
"motion": "^12.
|
|
57
|
+
"mixpanel-browser": "^2.74.0",
|
|
58
|
+
"motion": "^12.29.3",
|
|
59
59
|
"react-idle-timer": "^5.7.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@hookform/resolvers": "^5.2.2",
|
|
63
|
-
"@moser-inc/eslint-config-react": "^
|
|
64
|
-
"@moser-inc/unocss-preset-moser-labs": "^
|
|
65
|
-
"@tsconfig/
|
|
63
|
+
"@moser-inc/eslint-config-react": "^5.1.3",
|
|
64
|
+
"@moser-inc/unocss-preset-moser-labs": "^6.0.0",
|
|
65
|
+
"@tsconfig/node24": "^24.0.4",
|
|
66
66
|
"@tsconfig/vite-react": "^7.0.2",
|
|
67
|
-
"@unocss/eslint-config": "^66.
|
|
68
|
-
"@vitejs/plugin-basic-ssl": "^2.1.
|
|
69
|
-
"@vitejs/plugin-react": "^5.1.
|
|
67
|
+
"@unocss/eslint-config": "^66.6.4",
|
|
68
|
+
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
69
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
70
70
|
"eslint": "^9.39.2",
|
|
71
|
-
"prettier": "^3.
|
|
72
|
-
"react-hook-form": "^7.
|
|
73
|
-
"react-router": "^7.
|
|
74
|
-
"react-router-dom": "^7.
|
|
71
|
+
"prettier": "^3.8.1",
|
|
72
|
+
"react-hook-form": "^7.71.2",
|
|
73
|
+
"react-router": "^7.13.1",
|
|
74
|
+
"react-router-dom": "^7.13.1",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
|
-
"unocss": "^66.
|
|
77
|
-
"vite": "^7.3.
|
|
76
|
+
"unocss": "^66.6.4",
|
|
77
|
+
"vite": "^7.3.1",
|
|
78
78
|
"vite-plugin-dts": "^4.5.4",
|
|
79
|
-
"zod": "^4.
|
|
79
|
+
"zod": "^4.3.6"
|
|
80
80
|
}
|
|
81
81
|
}
|