@moser-inc/moser-labs-react 6.8.1 → 7.0.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.
Files changed (79) hide show
  1. package/README.md +6 -15
  2. package/dist/index.d.ts +20903 -0
  3. package/dist/index.js +1104 -0
  4. package/package.json +41 -33
  5. package/dist/moser-labs-react.css +0 -1
  6. package/dist/moser-labs-react.d.ts +0 -2
  7. package/dist/moser-labs-react.js +0 -21137
  8. package/dist/package.json.d.ts +0 -84
  9. package/dist/src/_dev/App.d.ts +0 -1
  10. package/dist/src/_dev/components/DevDirectoryLink.d.ts +0 -27
  11. package/dist/src/_dev/components/DevLink.d.ts +0 -10
  12. package/dist/src/_dev/layouts/App.layout.d.ts +0 -1
  13. package/dist/src/_dev/lib/directory.d.ts +0 -29
  14. package/dist/src/_dev/lib/router.d.ts +0 -1
  15. package/dist/src/_dev/lib/routerContext.d.ts +0 -1
  16. package/dist/src/_dev/sandbox.d.ts +0 -0
  17. package/dist/src/_dev/utils/createDocsHeader.d.ts +0 -1
  18. package/dist/src/_dev/views/Base.view.d.ts +0 -2
  19. package/dist/src/_dev/views/FAQ.view.d.ts +0 -2
  20. package/dist/src/_dev/views/Inputs.view.d.ts +0 -205
  21. package/dist/src/_dev/views/Presentation.view.d.ts +0 -2
  22. package/dist/src/components/FieldContainer/FieldContainer.d.ts +0 -16
  23. package/dist/src/components/FieldContainer/FieldContainerHint.d.ts +0 -12
  24. package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +0 -8
  25. package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +0 -9
  26. package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +0 -9
  27. package/dist/src/components/LabsAuthGate.d.ts +0 -6
  28. package/dist/src/components/LabsButton.d.ts +0 -10
  29. package/dist/src/components/LabsCalendar.d.ts +0 -8
  30. package/dist/src/components/LabsCheckbox.d.ts +0 -9
  31. package/dist/src/components/LabsCount.d.ts +0 -8
  32. package/dist/src/components/LabsDate.d.ts +0 -7
  33. package/dist/src/components/LabsEmpty.d.ts +0 -6
  34. package/dist/src/components/LabsLoader.d.ts +0 -6
  35. package/dist/src/components/LabsLogoutTimer.d.ts +0 -9
  36. package/dist/src/components/LabsMain.d.ts +0 -7
  37. package/dist/src/components/LabsMainDesktopNav.d.ts +0 -9
  38. package/dist/src/components/LabsMainHeaderActions.d.ts +0 -10
  39. package/dist/src/components/LabsMainMobileNav.d.ts +0 -9
  40. package/dist/src/components/LabsMenuNav.d.ts +0 -8
  41. package/dist/src/components/LabsMultiSelect.d.ts +0 -24
  42. package/dist/src/components/LabsSelect.d.ts +0 -21
  43. package/dist/src/components/LabsSelectCascade.d.ts +0 -23
  44. package/dist/src/components/LabsSpeedDialNav.d.ts +0 -8
  45. package/dist/src/components/LabsText.d.ts +0 -7
  46. package/dist/src/components/LabsTextCurrency.d.ts +0 -3
  47. package/dist/src/components/LabsTextSearch.d.ts +0 -3
  48. package/dist/src/components/LabsTextarea.d.ts +0 -7
  49. package/dist/src/components/LabsToggle.d.ts +0 -6
  50. package/dist/src/constants/app.d.ts +0 -1
  51. package/dist/src/hooks/useAnalytics.d.ts +0 -7
  52. package/dist/src/hooks/useAuth.d.ts +0 -1
  53. package/dist/src/hooks/useBreakpoints.d.ts +0 -4
  54. package/dist/src/hooks/useLabs.d.ts +0 -1
  55. package/dist/src/layouts/Base.layout.d.ts +0 -3
  56. package/dist/src/layouts/Centered.layout.d.ts +0 -3
  57. package/dist/src/layouts/Main.layout.d.ts +0 -18
  58. package/dist/src/lib/analytics/analyticsContext.d.ts +0 -9
  59. package/dist/src/lib/analytics/createAnalytics.d.ts +0 -8
  60. package/dist/src/lib/analytics/index.d.ts +0 -1
  61. package/dist/src/lib/auth/authContext.d.ts +0 -20
  62. package/dist/src/lib/auth/authUtils.d.ts +0 -110
  63. package/dist/src/lib/auth/index.d.ts +0 -4
  64. package/dist/src/lib/dayjs.d.ts +0 -2
  65. package/dist/src/lib/head/headContext.d.ts +0 -5
  66. package/dist/src/lib/head/index.d.ts +0 -1
  67. package/dist/src/lib/labs/index.d.ts +0 -1
  68. package/dist/src/lib/labs/labsContext.d.ts +0 -17
  69. package/dist/src/lib/prime/index.d.ts +0 -1
  70. package/dist/src/lib/prime/primeContext.d.ts +0 -5
  71. package/dist/src/main.d.ts +0 -42
  72. package/dist/src/types/DirectoryValue.type.d.ts +0 -6
  73. package/dist/src/types/ReactHookForm.type.d.ts +0 -6
  74. package/dist/src/utils/animations.d.ts +0 -90
  75. package/dist/src/utils/fieldHelpers.d.ts +0 -5
  76. package/dist/src/utils/forwardRefInferGenerics.d.ts +0 -2
  77. package/dist/src/utils/number.d.ts +0 -2
  78. package/dist/src/utils/pluralize.d.ts +0 -1
  79. package/dist/src/utils/reactHookFormHelpers.d.ts +0 -89
@@ -1,23 +0,0 @@
1
- import { CascadeSelectChangeEvent, CascadeSelectProps } from 'primereact/cascadeselect';
2
- import { IconType } from 'primereact/utils';
3
- import { FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
4
- export interface LabsSelectCascadeOption<T = unknown> {
5
- label?: string;
6
- value?: T;
7
- className?: string;
8
- icon?: IconType<unknown>;
9
- title?: string;
10
- disabled?: boolean;
11
- items?: LabsSelectCascadeOption<T>[];
12
- }
13
- type FieldProps = Partial<CascadeSelectProps> & FieldContainerInputProps;
14
- type LabsSelectCascadeChangeEvent<TValue> = Omit<CascadeSelectChangeEvent, 'value'> & {
15
- value: TValue;
16
- };
17
- export interface LabsSelectCascadeProps<TValue extends string | number> extends FieldProps {
18
- value?: TValue;
19
- options?: LabsSelectCascadeOption<TValue>[];
20
- onChange?: (event: LabsSelectCascadeChangeEvent<TValue>) => void;
21
- }
22
- export declare const LabsSelectCascade: <TValue extends string | number>(props: LabsSelectCascadeProps<TValue>) => import("react/jsx-runtime").JSX.Element;
23
- export {};
@@ -1,8 +0,0 @@
1
- import { MenuItem } from 'primereact/menuitem';
2
- import { SpeedDialProps } from 'primereact/speeddial';
3
- import { DirectoryValueBase } from '../types/DirectoryValue.type';
4
- export interface LabsSpeedDialNavProps<TDirectoryValue extends DirectoryValueBase = DirectoryValueBase> extends SpeedDialProps {
5
- items: readonly TDirectoryValue[];
6
- renderItem: (item: TDirectoryValue) => MenuItem;
7
- }
8
- export declare const LabsSpeedDialNav: <TDirectoryValue extends DirectoryValueBase = DirectoryValueBase>({ items, renderItem, model, role, ...rest }: LabsSpeedDialNavProps<TDirectoryValue>) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { InputTextProps } from 'primereact/inputtext';
2
- import { FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
3
- type FieldProps = Partial<InputTextProps> & FieldContainerInputProps;
4
- export type LabsTextProps = FieldProps;
5
- export type LabsTextElement = HTMLInputElement;
6
- export declare const LabsText: import('react').ForwardRefExoticComponent<Partial<InputTextProps> & FieldContainerInputProps & import('react').RefAttributes<HTMLInputElement>>;
7
- export {};
@@ -1,3 +0,0 @@
1
- import { LabsTextProps } from './LabsText';
2
- export type LabsTextCurrencyProps = LabsTextProps;
3
- export declare const LabsTextCurrency: import('react').ForwardRefExoticComponent<Partial<import('primereact/inputtext').InputTextProps> & import('./FieldContainer/FieldContainerInput').FieldContainerInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,3 +0,0 @@
1
- import { LabsTextProps } from './LabsText';
2
- export type LabsTextSearchProps = LabsTextProps;
3
- export declare const LabsTextSearch: import('react').ForwardRefExoticComponent<Partial<import('primereact/inputtext').InputTextProps> & import('./FieldContainer/FieldContainerInput').FieldContainerInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,7 +0,0 @@
1
- import { InputTextareaProps } from 'primereact/inputtextarea';
2
- import { FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
3
- type FieldProps = Partial<InputTextareaProps> & FieldContainerInputProps;
4
- export type LabsTextareaProps = FieldProps;
5
- export type LabsTextareaElement = HTMLTextAreaElement;
6
- export declare const LabsTextarea: import('react').ForwardRefExoticComponent<Partial<InputTextareaProps> & FieldContainerInputProps & import('react').RefAttributes<HTMLTextAreaElement>>;
7
- export {};
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface LabsToggleProps {
3
- title: ReactNode;
4
- children: ReactNode;
5
- }
6
- export declare const LabsToggle: ({ title, children, ...rest }: LabsToggleProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const VERSION: string;
@@ -1,7 +0,0 @@
1
- import { KeycloakUser } from '../lib/auth';
2
- export declare const useAnalytics: () => {
3
- readonly analytics: import('analytics').AnalyticsInstance;
4
- readonly identifyUser: (user: KeycloakUser) => void;
5
- readonly trackEntity: (eventName: string, entityName?: string, entityId?: string, payload?: Record<string, unknown>) => void;
6
- readonly trackPageView: () => void;
7
- };
@@ -1 +0,0 @@
1
- export declare const useAuth: () => import('../lib/auth').LabsAuthContextValue;
@@ -1,4 +0,0 @@
1
- export declare const useBreakpoints: () => {
2
- readonly isDesktop: boolean | undefined;
3
- readonly isMobile: boolean | undefined;
4
- };
@@ -1 +0,0 @@
1
- export declare const useLabs: () => import('../lib/labs').LabsContextValue;
@@ -1,3 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- export type LayoutBaseProps = ComponentPropsWithoutRef<'div'>;
3
- export declare const LayoutBase: ({ className, children, ...rest }: LayoutBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { LayoutBaseProps } from '../main';
2
- export type LayoutCenteredProps = LayoutBaseProps;
3
- export declare const LayoutCentered: React.FC<LayoutCenteredProps>;
@@ -1,18 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { LabsMainDesktopNavProps } from '../components/LabsMainDesktopNav';
3
- import { LabsMainMobileNavProps } from '../components/LabsMainMobileNav';
4
- import { DirectoryValueBase } from '../types/DirectoryValue.type';
5
- export interface LayoutMainProps<TDirectoryValue extends DirectoryValueBase = DirectoryValueBase> {
6
- actions?: (() => ReactNode) | ReactNode;
7
- children: ReactNode;
8
- loader?: ReactNode;
9
- name?: ((appName: string) => ReactNode) | ReactNode;
10
- subtitle?: ((appName: string) => ReactNode) | ReactNode;
11
- navigation: TDirectoryValue[];
12
- navigationMobile?: TDirectoryValue[];
13
- renderNavigation: LabsMainDesktopNavProps<TDirectoryValue>['renderItem'];
14
- renderNavigationMobile?: LabsMainMobileNavProps<TDirectoryValue>['renderItem'];
15
- desktopNavProps?: Partial<LabsMainDesktopNavProps<TDirectoryValue>>;
16
- mobileNavProps?: Partial<LabsMainMobileNavProps<TDirectoryValue>>;
17
- }
18
- export declare const LayoutMain: <TDirectoryValue extends DirectoryValueBase = DirectoryValueBase>({ actions, children, loader, name, subtitle, navigation, navigationMobile, renderNavigation, renderNavigationMobile, desktopNavProps, mobileNavProps, }: LayoutMainProps<TDirectoryValue>) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { AnalyticsInstance } from 'analytics';
2
- import { ReactNode } from 'react';
3
- import { CreateAnalyticsProps } from './createAnalytics';
4
- export type LabsAnalyticsInstance = AnalyticsInstance;
5
- export declare const LabsAnalyticsContext: import('react').Context<AnalyticsInstance | null>;
6
- export interface LabsAnalyticsProviderProps extends CreateAnalyticsProps {
7
- children: ReactNode;
8
- }
9
- export declare const LabsAnalyticsProvider: ({ appName, children, options, }: LabsAnalyticsProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export interface CreateAnalyticsProps {
2
- appName: string;
3
- options?: {
4
- debug?: boolean;
5
- tokenMixpanel?: string;
6
- };
7
- }
8
- export declare const createAnalytics: ({ appName, options: optionsInit, }: CreateAnalyticsProps) => import('analytics').AnalyticsInstance;
@@ -1 +0,0 @@
1
- export * from './analyticsContext';
@@ -1,20 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { KeycloakUser, auth, refreshToken } from '.';
3
- export type Role = string;
4
- export type LabsAuthContextValue = {
5
- keycloak: typeof auth;
6
- user: KeycloakUser | null;
7
- hasAllRoles: (roles: Role | readonly Role[] | undefined) => boolean;
8
- hasRole: (roles: Role | readonly Role[] | undefined) => boolean;
9
- isAuthenticated: boolean;
10
- isLoading: boolean;
11
- logout: () => void;
12
- refreshToken: typeof refreshToken;
13
- };
14
- export declare const LabsAuthContext: import('react').Context<LabsAuthContextValue | null>;
15
- export interface LabsAuthProviderProps {
16
- labsApiUri?: string;
17
- rolesClientId?: string;
18
- children: ReactNode;
19
- }
20
- export declare const LabsAuthProvider: ({ labsApiUri, rolesClientId, children, }: LabsAuthProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,110 +0,0 @@
1
- export interface KeycloakUser {
2
- id: string;
3
- userId: string;
4
- name: string;
5
- firstName: string;
6
- lastName: string;
7
- email: string;
8
- jobTitle: string;
9
- roles: string[];
10
- }
11
- export declare const getParsedUserInfo: (rolesClientId?: string) => KeycloakUser | null;
12
- export declare const refreshToken: () => Promise<boolean>;
13
- export declare const withAuthHeader: (headers?: HeadersInit) => [string, string][] | Record<string, string> | Headers | {
14
- authorization: string;
15
- length: number;
16
- toString(): string;
17
- toLocaleString(): string;
18
- toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
19
- pop(): [string, string] | undefined;
20
- push(...items: [string, string][]): number;
21
- concat(...items: ConcatArray<[string, string]>[]): [string, string][];
22
- concat(...items: ([string, string] | ConcatArray<[string, string]>)[]): [string, string][];
23
- join(separator?: string): string;
24
- reverse(): [string, string][];
25
- shift(): [string, string] | undefined;
26
- slice(start?: number, end?: number): [string, string][];
27
- sort(compareFn?: ((a: [string, string], b: [string, string]) => number) | undefined): [string, string][];
28
- splice(start: number, deleteCount?: number): [string, string][];
29
- splice(start: number, deleteCount: number, ...items: [string, string][]): [string, string][];
30
- unshift(...items: [string, string][]): number;
31
- indexOf(searchElement: [string, string], fromIndex?: number): number;
32
- lastIndexOf(searchElement: [string, string], fromIndex?: number): number;
33
- every<S extends [string, string]>(predicate: (value: [string, string], index: number, array: [string, string][]) => value is S, thisArg?: any): this is S[];
34
- every(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): boolean;
35
- some(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): boolean;
36
- forEach(callbackfn: (value: [string, string], index: number, array: [string, string][]) => void, thisArg?: any): void;
37
- map<U>(callbackfn: (value: [string, string], index: number, array: [string, string][]) => U, thisArg?: any): U[];
38
- filter<S extends [string, string]>(predicate: (value: [string, string], index: number, array: [string, string][]) => value is S, thisArg?: any): S[];
39
- filter(predicate: (value: [string, string], index: number, array: [string, string][]) => unknown, thisArg?: any): [string, string][];
40
- reduce(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string]): [string, string];
41
- reduce(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string], initialValue: [string, string]): [string, string];
42
- reduce<U>(callbackfn: (previousValue: U, currentValue: [string, string], currentIndex: number, array: [string, string][]) => U, initialValue: U): U;
43
- reduceRight(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string]): [string, string];
44
- reduceRight(callbackfn: (previousValue: [string, string], currentValue: [string, string], currentIndex: number, array: [string, string][]) => [string, string], initialValue: [string, string]): [string, string];
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;
47
- find(predicate: (value: [string, string], index: number, obj: [string, string][]) => unknown, thisArg?: any): [string, string] | undefined;
48
- findIndex(predicate: (value: [string, string], index: number, obj: [string, string][]) => unknown, thisArg?: any): number;
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[];
56
- flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
57
- at(index: number): [string, string] | undefined;
58
- [Symbol.iterator](): ArrayIterator<[string, string]>;
59
- [Symbol.unscopables]: {
60
- [x: number]: boolean | undefined;
61
- length?: boolean | undefined;
62
- toString?: boolean | undefined;
63
- toLocaleString?: boolean | undefined;
64
- pop?: boolean | undefined;
65
- push?: boolean | undefined;
66
- concat?: boolean | undefined;
67
- join?: boolean | undefined;
68
- reverse?: boolean | undefined;
69
- shift?: boolean | undefined;
70
- slice?: boolean | undefined;
71
- sort?: boolean | undefined;
72
- splice?: boolean | undefined;
73
- unshift?: boolean | undefined;
74
- indexOf?: boolean | undefined;
75
- lastIndexOf?: boolean | undefined;
76
- every?: boolean | undefined;
77
- some?: boolean | undefined;
78
- forEach?: boolean | undefined;
79
- map?: boolean | undefined;
80
- filter?: boolean | undefined;
81
- reduce?: boolean | undefined;
82
- reduceRight?: boolean | undefined;
83
- find?: boolean | undefined;
84
- findIndex?: boolean | undefined;
85
- fill?: boolean | undefined;
86
- copyWithin?: boolean | undefined;
87
- entries?: boolean | undefined;
88
- keys?: boolean | undefined;
89
- values?: boolean | undefined;
90
- includes?: boolean | undefined;
91
- flatMap?: boolean | undefined;
92
- flat?: boolean | undefined;
93
- at?: boolean | undefined;
94
- [Symbol.iterator]?: boolean | undefined;
95
- readonly [Symbol.unscopables]?: boolean | undefined;
96
- };
97
- } | {
98
- authorization: string;
99
- append(name: string, value: string): void;
100
- delete(name: string): void;
101
- get(name: string): string | null;
102
- getSetCookie(): string[];
103
- has(name: string): boolean;
104
- set(name: string, value: string): void;
105
- forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
106
- entries(): HeadersIterator<[string, string]>;
107
- keys(): HeadersIterator<string>;
108
- values(): HeadersIterator<string>;
109
- [Symbol.iterator](): HeadersIterator<[string, string]>;
110
- } | undefined;
@@ -1,4 +0,0 @@
1
- import { default as Keycloak } from 'keycloak-js';
2
- export declare const auth: Keycloak;
3
- export * from './authContext';
4
- export * from './authUtils';
@@ -1,2 +0,0 @@
1
- import { default as dayjs } from 'dayjs';
2
- export default dayjs;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface LabsHeadProviderProps {
3
- children: ReactNode;
4
- }
5
- export declare const LabsHeadProvider: ({ children }: LabsHeadProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './headContext';
@@ -1 +0,0 @@
1
- export * from './labsContext';
@@ -1,17 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface LabsContextValue {
3
- appName: string;
4
- favicons: {
5
- dark: string;
6
- light: string;
7
- };
8
- themes?: {
9
- dark: string;
10
- light: string;
11
- };
12
- }
13
- export declare const LabsContext: import('react').Context<LabsContextValue | null>;
14
- export interface LabsProviderProps extends LabsContextValue {
15
- children: ReactNode;
16
- }
17
- export declare const LabsProvider: ({ children, ...rest }: LabsProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './primeContext';
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface LabsPrimeProviderProps {
3
- children: ReactNode;
4
- }
5
- export declare const LabsPrimeProvider: ({ children }: LabsPrimeProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,42 +0,0 @@
1
- export * from './constants/app';
2
- export * from './components/LabsAuthGate';
3
- export * from './components/LabsButton';
4
- export * from './components/LabsCalendar';
5
- export * from './components/LabsCheckbox';
6
- export * from './components/LabsCount';
7
- export * from './components/LabsDate';
8
- export * from './components/LabsEmpty';
9
- export * from './components/LabsLoader';
10
- export * from './components/LabsLogoutTimer';
11
- export * from './components/LabsMain';
12
- export * from './components/LabsMainDesktopNav';
13
- export * from './components/LabsMainMobileNav';
14
- export * from './components/LabsMainHeaderActions';
15
- export * from './components/LabsMenuNav';
16
- export * from './components/LabsMultiSelect';
17
- export * from './components/LabsSelect';
18
- export * from './components/LabsSelectCascade';
19
- export * from './components/LabsSpeedDialNav';
20
- export * from './components/LabsText';
21
- export * from './components/LabsTextCurrency';
22
- export * from './components/LabsTextSearch';
23
- export * from './components/LabsTextarea';
24
- export * from './components/LabsToggle';
25
- export * from './hooks/useAnalytics';
26
- export * from './hooks/useAuth';
27
- export * from './hooks/useBreakpoints';
28
- export * from './hooks/useLabs';
29
- export * from './layouts/Base.layout';
30
- export * from './layouts/Centered.layout';
31
- export * from './layouts/Main.layout';
32
- export * from './lib/analytics';
33
- export * from './lib/auth';
34
- export * from './lib/head';
35
- export * from './lib/labs';
36
- export * from './lib/prime';
37
- export * from './types/DirectoryValue.type';
38
- export * from './types/ReactHookForm.type';
39
- export * from './utils/animations';
40
- export * from './utils/number';
41
- export * from './utils/pluralize';
42
- export * from './utils/reactHookFormHelpers';
@@ -1,6 +0,0 @@
1
- export interface DirectoryValueBase {
2
- ICON: string;
3
- PATH: string;
4
- TITLE: string;
5
- [key: string]: unknown;
6
- }
@@ -1,6 +0,0 @@
1
- import { ControllerFieldState, ControllerRenderProps, FieldPath, FieldValues, UseFormStateReturn } from 'react-hook-form';
2
- export type ControllerRenderParams<TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>> = {
3
- field: ControllerRenderProps<TValues, TName>;
4
- fieldState: ControllerFieldState;
5
- formState: UseFormStateReturn<TValues>;
6
- };
@@ -1,90 +0,0 @@
1
- export declare const DEFAULT_TRANSITION_MS = 150;
2
- export declare const DEFAULT_TRANSITION_SECONDS: number;
3
- export declare const fadeAnimation: {
4
- readonly transition: {
5
- readonly duration: number;
6
- };
7
- readonly variants: {
8
- readonly enter: {
9
- readonly opacity: 1;
10
- };
11
- readonly exit: {
12
- readonly opacity: 0;
13
- };
14
- };
15
- readonly initial: "exit";
16
- readonly animate: "enter";
17
- readonly exit: "exit";
18
- };
19
- export declare const slideYFadeAnimation: {
20
- readonly transition: {
21
- readonly duration: number;
22
- };
23
- readonly variants: {
24
- readonly enter: {
25
- readonly y: "0rem";
26
- readonly opacity: 1;
27
- };
28
- readonly exit: {
29
- readonly y: "-0.25rem";
30
- readonly opacity: 0;
31
- };
32
- };
33
- readonly initial: "exit";
34
- readonly animate: "enter";
35
- readonly exit: "exit";
36
- };
37
- export declare const slideYFadeReverseAnimation: {
38
- readonly transition: {
39
- readonly duration: number;
40
- };
41
- readonly variants: {
42
- readonly enter: {
43
- readonly y: "0rem";
44
- readonly opacity: 1;
45
- };
46
- readonly exit: {
47
- readonly y: "0.25rem";
48
- readonly opacity: 0;
49
- };
50
- };
51
- readonly initial: "exit";
52
- readonly animate: "enter";
53
- readonly exit: "exit";
54
- };
55
- export declare const scaleFadeAnimation: {
56
- readonly transition: {
57
- readonly duration: number;
58
- };
59
- readonly variants: {
60
- readonly enter: {
61
- readonly scale: 1;
62
- readonly opacity: 1;
63
- };
64
- readonly exit: {
65
- readonly scale: 0;
66
- readonly opacity: 0;
67
- };
68
- };
69
- readonly initial: "exit";
70
- readonly animate: "enter";
71
- readonly exit: "exit";
72
- };
73
- export declare const scaleFadeSubtleAnimation: {
74
- readonly transition: {
75
- readonly duration: number;
76
- };
77
- readonly variants: {
78
- readonly enter: {
79
- readonly scale: 1;
80
- readonly opacity: 1;
81
- };
82
- readonly exit: {
83
- readonly scale: 0.98;
84
- readonly opacity: 0;
85
- };
86
- };
87
- readonly initial: "exit";
88
- readonly animate: "enter";
89
- readonly exit: "exit";
90
- };
@@ -1,5 +0,0 @@
1
- import { FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
2
- export declare const toFieldInputProps: (fieldProps: Partial<FieldContainerInputProps>) => Partial<FieldContainerInputProps>;
3
- export declare const toFieldSharedProps: (fieldProps: FieldContainerInputProps) => {
4
- className: string;
5
- };
@@ -1,2 +0,0 @@
1
- import { RefAttributes } from 'react';
2
- export declare const forwardRefInferGenerics: <T, P = Record<string, unknown>>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null) => (props: P & RefAttributes<T>) => React.ReactElement | null;
@@ -1,2 +0,0 @@
1
- export declare const toCurrency: (number: number | string) => string | number;
2
- export declare const toPrecision: (number?: number, precision?: number) => string;
@@ -1 +0,0 @@
1
- export declare const pluralize: (count: string | number, singular: string, plural: string, inclusive?: boolean) => string;
@@ -1,89 +0,0 @@
1
- import { FormEvent } from 'primereact/ts-helpers';
2
- import { ControllerFieldState, FieldPath, FieldValues } from 'react-hook-form';
3
- import { ControllerRenderParams } from '../types/ReactHookForm.type';
4
- export declare const toFieldContainerProps: (fieldState: ControllerFieldState) => {
5
- message: string | undefined;
6
- };
7
- export declare const toLabsCheckboxProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
8
- inputRef: import('react-hook-form').RefCallBack;
9
- checked: TValues[TName];
10
- onChange: (event: import('primereact/checkbox').CheckboxChangeEvent) => void;
11
- message: string | undefined;
12
- onBlur: import('react-hook-form').Noop;
13
- disabled?: boolean;
14
- name: TName;
15
- };
16
- export declare const toLabsDateProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
17
- inputRef: import('react-hook-form').RefCallBack;
18
- value: TValues[TName];
19
- onChange: (event: FormEvent<TValues[TName]>) => void;
20
- message: string | undefined;
21
- onBlur: import('react-hook-form').Noop;
22
- disabled?: boolean;
23
- name: TName;
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
- };
34
- export declare const toLabsSelectProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
35
- inputRef: import('react-hook-form').RefCallBack;
36
- value: TValues[TName];
37
- onChange: (event: FormEvent<TValues[TName], import('react').SyntheticEvent<Element, Event>>) => void;
38
- message: string | undefined;
39
- onBlur: import('react-hook-form').Noop;
40
- disabled?: boolean;
41
- name: TName;
42
- };
43
- export declare const toLabsSelectCascadeProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
44
- inputRef: import('react-hook-form').RefCallBack;
45
- value: TValues[TName];
46
- onChange: (event: Omit<import('primereact/cascadeselect').CascadeSelectChangeEvent, "value"> & {
47
- value: TValues[TName];
48
- }) => void;
49
- message: string | undefined;
50
- onBlur: import('react-hook-form').Noop;
51
- disabled?: boolean;
52
- name: TName;
53
- };
54
- export declare const toLabsTextProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
55
- ref: import('react-hook-form').RefCallBack;
56
- value: TValues[TName];
57
- message: string | undefined;
58
- onChange: (...event: any[]) => void;
59
- onBlur: import('react-hook-form').Noop;
60
- disabled?: boolean;
61
- name: TName;
62
- };
63
- export declare const toLabsTextCurrencyProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
64
- ref: import('react-hook-form').RefCallBack;
65
- value: TValues[TName];
66
- message: string | undefined;
67
- onChange: (...event: any[]) => void;
68
- onBlur: import('react-hook-form').Noop;
69
- disabled?: boolean;
70
- name: TName;
71
- };
72
- export declare const toLabsTextSearchProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
73
- ref: import('react-hook-form').RefCallBack;
74
- value: TValues[TName];
75
- message: string | undefined;
76
- onChange: (...event: any[]) => void;
77
- onBlur: import('react-hook-form').Noop;
78
- disabled?: boolean;
79
- name: TName;
80
- };
81
- export declare const toLabsTextareaProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field: { ref, value, ...field }, fieldState, }: ControllerRenderParams<TValues, TName>) => {
82
- ref: import('react-hook-form').RefCallBack;
83
- value: TValues[TName];
84
- message: string | undefined;
85
- onChange: (...event: any[]) => void;
86
- onBlur: import('react-hook-form').Noop;
87
- disabled?: boolean;
88
- name: TName;
89
- };