@moser-inc/moser-labs-react 1.3.3 → 1.4.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/components/{FieldContainerInput.d.ts → FieldContainer/FieldContainerInput.d.ts} +1 -1
- package/dist/components/LabsCheckbox.d.ts +1 -1
- package/dist/components/LabsDate.d.ts +1 -1
- package/dist/components/LabsIcon.d.ts +1 -1
- package/dist/components/LabsLogoutTimer.d.ts +9 -0
- package/dist/components/LabsSelect.d.ts +1 -1
- package/dist/components/LabsText.d.ts +1 -1
- package/dist/components/LabsTextCurrency.d.ts +1 -1
- package/dist/components/LabsTextSearch.d.ts +1 -1
- package/dist/lib/auth/authContext.d.ts +1 -2
- package/dist/main.d.ts +1 -0
- package/dist/moser-labs-react.cjs +69 -69
- package/dist/moser-labs-react.js +8336 -7843
- package/dist/types/DirectoryValue.type.d.ts +1 -1
- package/package.json +3 -2
- package/dist/constants/roles.constant.d.ts +0 -5
- /package/dist/components/{FieldContainer.d.ts → FieldContainer/FieldContainer.d.ts} +0 -0
- /package/dist/components/{FieldContainerLabel.d.ts → FieldContainer/FieldContainerLabel.d.ts} +0 -0
- /package/dist/components/{FieldContainerMessage.d.ts → FieldContainer/FieldContainerMessage.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckboxProps } from 'primereact/checkbox';
|
|
2
2
|
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
3
|
-
import { FieldContainerProps } from '../components/FieldContainer';
|
|
3
|
+
import { FieldContainerProps } from '../components/FieldContainer/FieldContainer';
|
|
4
4
|
import { ControllerRenderParams } from '../types/ReactHookForm.type';
|
|
5
5
|
type FieldProps = Partial<CheckboxProps> & FieldContainerProps;
|
|
6
6
|
export type LabsCheckboxProps = FieldProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
2
|
-
import { type FieldContainerInputProps } from '../components/FieldContainerInput';
|
|
2
|
+
import { type FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
|
|
3
3
|
import { LabsCalendarProps } from '../components/LabsCalendar';
|
|
4
4
|
import { ControllerRenderParams } from '../types/ReactHookForm.type';
|
|
5
5
|
type FieldProps = LabsCalendarProps & FieldContainerInputProps;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface LabsLogoutTimerProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
options?: {
|
|
5
|
+
delay: number;
|
|
6
|
+
};
|
|
7
|
+
onLogout: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const LabsLogoutTimer: ({ children, options, onLogout, }: LabsLogoutTimerProps) => ReactNode;
|
|
@@ -3,7 +3,7 @@ import { DropdownProps } from 'primereact/dropdown';
|
|
|
3
3
|
import { FormEvent } from 'primereact/ts-helpers';
|
|
4
4
|
import type { IconType } from 'primereact/utils';
|
|
5
5
|
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
6
|
-
import { type FieldContainerInputProps } from '../components/FieldContainerInput';
|
|
6
|
+
import { type FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
|
|
7
7
|
import { ControllerRenderParams } from '../types/ReactHookForm.type';
|
|
8
8
|
export interface LabsSelectOption<T = unknown> {
|
|
9
9
|
label?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputTextProps } from 'primereact/inputtext';
|
|
3
3
|
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
4
|
-
import { type FieldContainerInputProps } from '../components/FieldContainerInput';
|
|
4
|
+
import { type FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
|
|
5
5
|
import { ControllerRenderParams } from '../types/ReactHookForm.type';
|
|
6
6
|
type FieldProps = Partial<InputTextProps> & FieldContainerInputProps;
|
|
7
7
|
export type LabsTextProps = FieldProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LabsTextProps } from '../components/LabsText';
|
|
3
3
|
export type LabsTextCurrencyProps = LabsTextProps;
|
|
4
|
-
export declare const LabsTextCurrency: import("react").ForwardRefExoticComponent<Partial<import("primereact/inputtext").InputTextProps> & import("./FieldContainerInput").FieldContainerInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export declare const LabsTextCurrency: import("react").ForwardRefExoticComponent<Partial<import("primereact/inputtext").InputTextProps> & import("./FieldContainer/FieldContainerInput").FieldContainerInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export declare const toLabsTextCurrencyProps: <TValues extends import("react-hook-form").FieldValues = import("react-hook-form").FieldValues, TName extends import("react-hook-form").FieldPath<TValues> = import("react-hook-form").FieldPath<TValues>>({ field, fieldState, }: import("../main").ControllerRenderParams<TValues, TName>) => {
|
|
6
6
|
value: string;
|
|
7
7
|
message: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LabsTextProps } from '../components/LabsText';
|
|
3
3
|
export type LabsTextSearchProps = LabsTextProps;
|
|
4
|
-
export declare const LabsTextSearch: import("react").ForwardRefExoticComponent<Partial<import("primereact/inputtext").InputTextProps> & import("./FieldContainerInput").FieldContainerInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export declare const LabsTextSearch: import("react").ForwardRefExoticComponent<Partial<import("primereact/inputtext").InputTextProps> & import("./FieldContainer/FieldContainerInput").FieldContainerInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export declare const toLabsTextSearchProps: <TValues extends import("react-hook-form").FieldValues = import("react-hook-form").FieldValues, TName extends import("react-hook-form").FieldPath<TValues> = import("react-hook-form").FieldPath<TValues>>({ field, fieldState, }: import("../main").ControllerRenderParams<TValues, TName>) => {
|
|
6
6
|
value: string;
|
|
7
7
|
message: string | undefined;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Role } from '../../constants/roles.constant';
|
|
3
2
|
import { User, refreshToken } from '../../lib/auth';
|
|
3
|
+
export type Role = string;
|
|
4
4
|
export type AuthContextValue = {
|
|
5
5
|
user: User | null;
|
|
6
6
|
hasAllRoles: (roles: Role | readonly Role[] | undefined) => boolean;
|
|
7
7
|
hasRole: (roles: Role | readonly Role[] | undefined) => boolean;
|
|
8
|
-
isAdmin: boolean;
|
|
9
8
|
isAuthenticated: boolean;
|
|
10
9
|
isLoading: boolean;
|
|
11
10
|
logout: () => void;
|
package/dist/main.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './components/LabsCheckbox';
|
|
|
4
4
|
export * from './components/LabsDate';
|
|
5
5
|
export * from './components/LabsIcon';
|
|
6
6
|
export * from './components/LabsLoader';
|
|
7
|
+
export * from './components/LabsLogoutTimer';
|
|
7
8
|
export * from './components/LabsMain';
|
|
8
9
|
export * from './components/LabsMainDesktopNav';
|
|
9
10
|
export * from './components/LabsMainMobileNav';
|