@moser-inc/moser-labs-react 1.16.5 → 1.17.0
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.cjs +2018 -88
- package/dist/moser-labs-react.d.ts +1 -0
- package/dist/moser-labs-react.js +38130 -22371
- package/dist/src/_dev/components/DevDirectoryLink.d.ts +0 -1
- package/dist/src/_dev/components/DevLink.d.ts +1 -2
- package/dist/src/_dev/lib/directory.d.ts +0 -1
- package/dist/src/_dev/sandbox.d.ts +0 -1
- package/dist/src/_dev/views/Base.view.d.ts +0 -1
- package/dist/src/_dev/views/Inputs.view.d.ts +38 -39
- package/dist/src/_dev/views/Presentation.view.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainer.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +0 -1
- package/dist/src/components/LabsAuthGate.d.ts +0 -1
- package/dist/src/components/LabsButton.d.ts +0 -1
- package/dist/src/components/LabsCalendar.d.ts +0 -1
- package/dist/src/components/LabsCheckbox.d.ts +1 -2
- package/dist/src/components/LabsCount.d.ts +0 -1
- package/dist/src/components/LabsDate.d.ts +3 -3
- package/dist/src/components/LabsIcon.d.ts +0 -1
- package/dist/src/components/LabsLoader.d.ts +0 -1
- package/dist/src/components/LabsLogoutTimer.d.ts +0 -1
- package/dist/src/components/LabsMain.d.ts +0 -1
- package/dist/src/components/LabsMainDesktopNav.d.ts +0 -1
- package/dist/src/components/LabsMainHeaderActions.d.ts +10 -0
- package/dist/src/components/LabsMainMobileNav.d.ts +0 -1
- package/dist/src/components/LabsMenuNav.d.ts +0 -1
- package/dist/src/components/LabsPlaceholder.d.ts +0 -1
- package/dist/src/components/LabsSelect.d.ts +1 -2
- package/dist/src/components/LabsSpeedDialNav.d.ts +0 -1
- package/dist/src/components/LabsText.d.ts +1 -2
- package/dist/src/components/LabsTextCurrency.d.ts +1 -2
- package/dist/src/components/LabsTextSearch.d.ts +1 -2
- package/dist/src/components/LabsTextarea.d.ts +1 -2
- package/dist/src/components/LabsToggle.d.ts +0 -1
- package/dist/src/components/LabsTypeahead.d.ts +2 -3
- package/dist/src/components/LabsUser.d.ts +0 -1
- package/dist/src/hooks/useAnalytics.d.ts +7 -8
- package/dist/src/layouts/Base.layout.d.ts +0 -1
- package/dist/src/layouts/Centered.layout.d.ts +0 -1
- package/dist/src/layouts/Main.layout.d.ts +0 -1
- package/dist/src/lib/analytics/analyticsContext.d.ts +0 -1
- package/dist/src/lib/analytics/createAnalytics.d.ts +0 -1
- package/dist/src/lib/auth/authContext.d.ts +4 -3
- package/dist/src/lib/auth/authUtils.d.ts +22 -21
- package/dist/src/lib/auth/index.d.ts +0 -1
- package/dist/src/lib/dayjs.d.ts +0 -1
- package/dist/src/main.d.ts +1 -1
- package/dist/src/types/DirectoryValue.type.d.ts +0 -1
- package/dist/src/types/ReactHookForm.type.d.ts +0 -1
- package/dist/src/utils/animations.d.ts +0 -1
- package/dist/src/utils/fieldHelpers.d.ts +0 -1
- package/dist/src/utils/forwardRefInferGenerics.d.ts +0 -1
- package/package.json +35 -40
- package/dist/src/_dev/components/DevLabsUser.d.ts +0 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AnalyticsInstance } from 'analytics';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { CreateAnalyticsProps } from './createAnalytics';
|
|
4
|
-
|
|
5
4
|
export declare const LabsAnalyticsContext: import('react').Context<AnalyticsInstance | null>;
|
|
6
5
|
export interface LabsAnalyticsProviderProps extends CreateAnalyticsProps {
|
|
7
6
|
children: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { User, refreshToken } from '.';
|
|
2
|
-
|
|
1
|
+
import { User, auth, refreshToken } from '.';
|
|
3
2
|
export type Role = string;
|
|
4
3
|
export type LabsAuthContextValue = {
|
|
4
|
+
keycloak: typeof auth;
|
|
5
5
|
user: User | null;
|
|
6
6
|
hasAllRoles: (roles: Role | readonly Role[] | undefined) => boolean;
|
|
7
7
|
hasRole: (roles: Role | readonly Role[] | undefined) => boolean;
|
|
@@ -13,6 +13,7 @@ export type LabsAuthContextValue = {
|
|
|
13
13
|
export declare const LabsAuthContext: import('react').Context<LabsAuthContextValue | null>;
|
|
14
14
|
export interface LabsAuthProviderProps {
|
|
15
15
|
appIdentifier: string;
|
|
16
|
+
labsApiUri?: string;
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
}
|
|
18
|
-
export declare const LabsAuthProvider: ({ appIdentifier, children, }: LabsAuthProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const LabsAuthProvider: ({ appIdentifier, labsApiUri, children, }: LabsAuthProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,45 +15,46 @@ export declare const withAuthHeader: (headers?: HeadersInit) => [string, string]
|
|
|
15
15
|
length: number;
|
|
16
16
|
toString(): string;
|
|
17
17
|
toLocaleString(): string;
|
|
18
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
18
19
|
pop(): [string, string] | undefined;
|
|
19
20
|
push(...items: [string, string][]): number;
|
|
20
21
|
concat(...items: ConcatArray<[string, string]>[]): [string, string][];
|
|
21
22
|
concat(...items: ([string, string] | ConcatArray<[string, string]>)[]): [string, string][];
|
|
22
|
-
join(separator?: string
|
|
23
|
+
join(separator?: string): string;
|
|
23
24
|
reverse(): [string, string][];
|
|
24
25
|
shift(): [string, string] | undefined;
|
|
25
|
-
slice(start?: number
|
|
26
|
+
slice(start?: number, end?: number): [string, string][];
|
|
26
27
|
sort(compareFn?: ((a: [string, string], b: [string, string]) => number) | undefined): [string, string][];
|
|
27
|
-
splice(start: number, deleteCount?: number
|
|
28
|
+
splice(start: number, deleteCount?: number): [string, string][];
|
|
28
29
|
splice(start: number, deleteCount: number, ...items: [string, string][]): [string, string][];
|
|
29
30
|
unshift(...items: [string, string][]): number;
|
|
30
|
-
indexOf(searchElement: [string, string], fromIndex?: number
|
|
31
|
-
lastIndexOf(searchElement: [string, string], fromIndex?: number
|
|
31
|
+
indexOf(searchElement: [string, string], fromIndex?: number): number;
|
|
32
|
+
lastIndexOf(searchElement: [string, string], fromIndex?: number): number;
|
|
32
33
|
every<S extends [string, string]>(predicate: (value: [string, string], index: number, array: [string, string][]) => value is S, thisArg?: any): this is S[];
|
|
33
34
|
every(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): boolean;
|
|
34
35
|
some(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): boolean;
|
|
35
36
|
forEach(callbackfn: (value: [string, string], index: number, array: [string, string][]) => void, thisArg?: any): void;
|
|
36
37
|
map<U>(callbackfn: (value: [string, string], index: number, array: [string, string][]) => U, thisArg?: any): U[];
|
|
37
|
-
filter<
|
|
38
|
+
filter<S extends [string, string]>(predicate: (value: [string, string], index: number, array: [string, string][]) => value is S, thisArg?: any): S[];
|
|
38
39
|
filter(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): [string, string][];
|
|
39
40
|
reduce(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string]): [string, string];
|
|
40
41
|
reduce(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string], initialValue: [string, string]): [string, string];
|
|
41
|
-
reduce<
|
|
42
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: [string, string], currentIndex: number, array: [string, string][]) => U, initialValue: U): U;
|
|
42
43
|
reduceRight(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string]): [string, string];
|
|
43
44
|
reduceRight(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string], initialValue: [string, string]): [string, string];
|
|
44
|
-
reduceRight<
|
|
45
|
-
find<
|
|
45
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: [string, string], currentIndex: number, array: [string, string][]) => U, initialValue: U): U;
|
|
46
|
+
find<S extends [string, string]>(predicate: (value: [string, string], index: number, obj: [string, string][]) => value is S, thisArg?: any): S | undefined;
|
|
46
47
|
find(predicate: (value: [string, string], index: number, obj: [string, string][]) => unknown, thisArg?: any): [string, string] | undefined;
|
|
47
48
|
findIndex(predicate: (value: [string, string], index: number, obj: [string, string][]) => unknown, thisArg?: any): number;
|
|
48
|
-
fill(value: [string, string], start?: number
|
|
49
|
-
copyWithin(target: number, start: number, end?: number
|
|
50
|
-
entries():
|
|
51
|
-
keys():
|
|
52
|
-
values():
|
|
53
|
-
includes(searchElement: [string, string], fromIndex?: number
|
|
54
|
-
flatMap<
|
|
49
|
+
fill(value: [string, string], start?: number, end?: number): [string, string][];
|
|
50
|
+
copyWithin(target: number, start: number, end?: number): [string, string][];
|
|
51
|
+
entries(): ArrayIterator<[number, [string, string]]>;
|
|
52
|
+
keys(): ArrayIterator<number>;
|
|
53
|
+
values(): ArrayIterator<[string, string]>;
|
|
54
|
+
includes(searchElement: [string, string], fromIndex?: number): boolean;
|
|
55
|
+
flatMap<U, This = undefined>(callback: (this: This, value: [string, string], index: number, array: [string, string][]) => U | readonly U[], thisArg?: This | undefined): U[];
|
|
55
56
|
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
|
|
56
|
-
[Symbol.iterator]():
|
|
57
|
+
[Symbol.iterator](): ArrayIterator<[string, string]>;
|
|
57
58
|
[Symbol.unscopables]: {
|
|
58
59
|
[x: number]: boolean | undefined;
|
|
59
60
|
length?: boolean | undefined;
|
|
@@ -102,9 +103,9 @@ export declare const withAuthHeader: (headers?: HeadersInit) => [string, string]
|
|
|
102
103
|
has(name: string): boolean;
|
|
103
104
|
set(name: string, value: string): void;
|
|
104
105
|
forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
|
|
105
|
-
entries():
|
|
106
|
-
keys():
|
|
107
|
-
values():
|
|
108
|
-
[Symbol.iterator]():
|
|
106
|
+
entries(): HeadersIterator<[string, string]>;
|
|
107
|
+
keys(): HeadersIterator<string>;
|
|
108
|
+
values(): HeadersIterator<string>;
|
|
109
|
+
[Symbol.iterator](): HeadersIterator<[string, string]>;
|
|
109
110
|
} | undefined;
|
|
110
111
|
export declare const refreshToken: () => Promise<boolean>;
|
package/dist/src/lib/dayjs.d.ts
CHANGED
package/dist/src/main.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
export * from './constants/app';
|
|
3
2
|
export * from './components/LabsAuthGate';
|
|
4
3
|
export * from './components/LabsButton';
|
|
@@ -12,6 +11,7 @@ export * from './components/LabsLogoutTimer';
|
|
|
12
11
|
export * from './components/LabsMain';
|
|
13
12
|
export * from './components/LabsMainDesktopNav';
|
|
14
13
|
export * from './components/LabsMainMobileNav';
|
|
14
|
+
export * from './components/LabsMainHeaderActions';
|
|
15
15
|
export * from './components/LabsMenuNav';
|
|
16
16
|
export * from './components/LabsPlaceholder';
|
|
17
17
|
export * from './components/LabsSelect';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ControllerFieldState, ControllerRenderProps, FieldPath, FieldValues, UseFormStateReturn } from 'react-hook-form';
|
|
2
|
-
|
|
3
2
|
export type ControllerRenderParams<TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>> = {
|
|
4
3
|
field: ControllerRenderProps<TValues, TName>;
|
|
5
4
|
fieldState: ControllerFieldState;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
|
|
2
|
-
|
|
3
2
|
export declare const toFieldInputProps: (fieldProps: Partial<FieldContainerInputProps>) => Partial<Partial<FieldContainerInputProps>>;
|
|
4
3
|
export declare const toFieldSharedProps: (fieldProps: FieldContainerInputProps) => {
|
|
5
4
|
className: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moser-inc/moser-labs-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "React components for the Moser Labs suite of applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
29
|
"dev": "vite",
|
|
30
|
-
"build": "
|
|
31
|
-
"lint": "eslint
|
|
30
|
+
"build": "vite build",
|
|
31
|
+
"lint": "eslint . --max-warnings 0",
|
|
32
32
|
"preview": "vite preview",
|
|
33
33
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
34
34
|
"type-check": "tsc --noEmit",
|
|
@@ -37,53 +37,48 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@types/react": ">= 18.2.14 < 19",
|
|
39
39
|
"@types/react-dom": ">= 18.2.6 < 19",
|
|
40
|
-
"primereact": ">= 9.6.0
|
|
40
|
+
"primereact": ">= 9.6.0 <= 10.4.0",
|
|
41
41
|
"react": ">= 18.2.0 < 19",
|
|
42
42
|
"react-dom": ">= 18.2.0 < 19",
|
|
43
43
|
"react-router-dom": ">= 6 < 7"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@analytics/mixpanel": "^0.4.0",
|
|
47
|
-
"@hookform/resolvers": "^3.
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
47
|
+
"@hookform/resolvers": "^3.9.1",
|
|
48
|
+
"@moser-inc/moser-labs-custom-elements": "2.3.3",
|
|
49
|
+
"@react-hookz/web": "^24.0.4",
|
|
50
|
+
"analytics": "^0.8.14",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"dayjs": "^1.11.13",
|
|
53
|
+
"framer-motion": "^11.13.5",
|
|
54
|
+
"js-sha256": "^0.10.1",
|
|
55
|
+
"keycloak-js": "23.0.3",
|
|
54
56
|
"lodash": "^4.17.21",
|
|
55
|
-
"mixpanel-browser": "^2.
|
|
56
|
-
"
|
|
57
|
-
"react": "
|
|
58
|
-
"react-dom": ">= 18.2.0 < 19",
|
|
59
|
-
"react-helmet-async": "^1.3.0",
|
|
60
|
-
"react-hook-form": "^7.45.4",
|
|
57
|
+
"mixpanel-browser": "^2.56.0",
|
|
58
|
+
"react-helmet-async": "^2.0.5",
|
|
59
|
+
"react-hook-form": "^7.54.0",
|
|
61
60
|
"react-idle-timer": "^5.7.2",
|
|
62
|
-
"react-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"zod": "^3.22.2"
|
|
61
|
+
"react-select": "^5.8.3",
|
|
62
|
+
"styled-components": "^6.1.13",
|
|
63
|
+
"zod": "^3.24.0"
|
|
66
64
|
},
|
|
67
65
|
"devDependencies": {
|
|
68
|
-
"@iconify-json/mdi": "^1.1
|
|
69
|
-
"@iconify-json/mingcute": "^1.1
|
|
70
|
-
"@iconify-json/ph": "^1.1
|
|
71
|
-
"@iconify-json/solar": "^1.1
|
|
72
|
-
"@moser-inc/eslint-config-react": "^2.
|
|
66
|
+
"@iconify-json/mdi": "^1.2.1",
|
|
67
|
+
"@iconify-json/mingcute": "^1.2.1",
|
|
68
|
+
"@iconify-json/ph": "^1.2.1",
|
|
69
|
+
"@iconify-json/solar": "^1.2.1",
|
|
70
|
+
"@moser-inc/eslint-config-react": "^2.3.2",
|
|
73
71
|
"@moser-inc/unocss-preset-moser-labs": "^1.18.0",
|
|
74
|
-
"@
|
|
75
|
-
"@types/
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"unocss": "^0.64.1",
|
|
86
|
-
"vite": "^5.2.12",
|
|
87
|
-
"vite-plugin-dts": "^3.9.1"
|
|
72
|
+
"@types/lodash": "^4.17.13",
|
|
73
|
+
"@types/react-helmet": "^6.1.11",
|
|
74
|
+
"@unocss/eslint-config": "^0.65.1",
|
|
75
|
+
"@vitejs/plugin-basic-ssl": "^1.2.0",
|
|
76
|
+
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
77
|
+
"eslint": "^9.16.0",
|
|
78
|
+
"prettier": "^3.4.2",
|
|
79
|
+
"typescript": "^5.7.2",
|
|
80
|
+
"unocss": "^0.65.1",
|
|
81
|
+
"vite": "^5.4.11",
|
|
82
|
+
"vite-plugin-dts": "^4.3.0"
|
|
88
83
|
}
|
|
89
84
|
}
|