@moser-inc/moser-labs-react 1.15.3 → 1.16.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.cjs +97 -91
- package/dist/moser-labs-react.js +17600 -17589
- package/dist/src/_dev/components/DevDirectoryLink.d.ts +2 -2
- package/dist/src/_dev/components/DevLink.d.ts +3 -3
- package/dist/src/_dev/lib/directory.d.ts +1 -0
- package/dist/src/_dev/lib/router.d.ts +1 -1
- package/dist/src/_dev/sandbox.d.ts +1 -0
- package/dist/src/_dev/views/Inputs.view.d.ts +54 -54
- package/dist/src/components/FieldContainer/FieldContainer.d.ts +2 -1
- package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +1 -0
- package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +1 -0
- package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +1 -0
- package/dist/src/components/LabsAuthGate.d.ts +1 -0
- package/dist/src/components/LabsButton.d.ts +1 -0
- package/dist/src/components/LabsCalendar.d.ts +2 -2
- package/dist/src/components/LabsCheckbox.d.ts +6 -4
- package/dist/src/components/LabsDate.d.ts +7 -5
- package/dist/src/components/LabsIcon.d.ts +2 -1
- package/dist/src/components/LabsLogoutTimer.d.ts +1 -0
- package/dist/src/components/LabsMain.d.ts +1 -0
- package/dist/src/components/LabsMainDesktopNav.d.ts +1 -0
- package/dist/src/components/LabsMainMobileNav.d.ts +1 -0
- package/dist/src/components/LabsMenuNav.d.ts +1 -0
- package/dist/src/components/LabsSelect.d.ts +8 -7
- package/dist/src/components/LabsSpeedDialNav.d.ts +1 -0
- package/dist/src/components/LabsText.d.ts +6 -5
- package/dist/src/components/LabsTextCurrency.d.ts +6 -5
- package/dist/src/components/LabsTextSearch.d.ts +6 -5
- package/dist/src/components/LabsTextarea.d.ts +6 -5
- package/dist/src/components/LabsToggle.d.ts +1 -0
- package/dist/src/components/LabsTypeahead.d.ts +7 -6
- package/dist/src/hooks/useAnalytics.d.ts +6 -6
- package/dist/src/layouts/Base.layout.d.ts +1 -0
- package/dist/src/layouts/Main.layout.d.ts +1 -1
- package/dist/src/lib/analytics/analyticsContext.d.ts +2 -1
- package/dist/src/lib/analytics/createAnalytics.d.ts +1 -1
- package/dist/src/lib/auth/authContext.d.ts +2 -2
- package/dist/src/lib/auth/index.d.ts +2 -1
- package/dist/src/lib/dayjs.d.ts +2 -1
- package/dist/src/main.d.ts +1 -0
- package/dist/src/types/DirectoryValue.type.d.ts +1 -0
- package/dist/src/types/ReactHookForm.type.d.ts +2 -1
- package/dist/src/utils/animations.d.ts +1 -0
- package/dist/src/utils/fieldHelpers.d.ts +1 -0
- package/dist/src/utils/forwardRefInferGenerics.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +13 -12
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
3
|
-
import BaseSelect,
|
|
4
|
-
import {
|
|
2
|
+
import { default as BaseSelect, GroupBase, Props as BaseSelectProps } from 'react-select';
|
|
3
|
+
import { FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
|
|
5
4
|
import { ControllerRenderParams } from '../types/ReactHookForm.type';
|
|
5
|
+
|
|
6
6
|
interface BaseProps extends FieldContainerInputProps {
|
|
7
7
|
createable?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export type LabsTypeaheadProps<Option, Multi extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = BaseSelectProps<Option, Multi, Group> & BaseProps;
|
|
10
10
|
export type LabsTypeaheadElement = BaseSelect;
|
|
11
|
-
export declare const LabsTypeahead: <Option, Multi extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: Omit<import(
|
|
11
|
+
export declare const LabsTypeahead: <Option, Multi extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: Omit<import('react-select/dist/declarations/src/Select').PublicBaseSelectProps<Option, Multi, Group>, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<import('react-select/dist/declarations/src/Select').PublicBaseSelectProps<Option, Multi, Group>> & import('react-select/dist/declarations/src/useStateManager').StateManagerAdditionalProps<Option> & BaseProps & import('react').RefAttributes<BaseSelect>) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | null;
|
|
12
12
|
export declare const toLabsTypeaheadProps: <TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ field, fieldState, }: ControllerRenderParams<TValues, TName>) => {
|
|
13
13
|
value: null;
|
|
14
14
|
hasError: boolean;
|
|
15
15
|
message: string | undefined;
|
|
16
16
|
onChange: (...event: any[]) => void;
|
|
17
|
-
onBlur: import(
|
|
17
|
+
onBlur: import('react-hook-form').Noop;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
18
19
|
name: TName;
|
|
19
|
-
ref: import(
|
|
20
|
+
ref: import('react-hook-form').RefCallBack;
|
|
20
21
|
};
|
|
21
22
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { User } from '../lib/auth';
|
|
2
|
+
|
|
3
3
|
export declare const useAnalytics: () => {
|
|
4
4
|
readonly trackEntity: (eventName: string, entityName?: string, entityId?: string, payload?: Record<string, unknown>) => void;
|
|
5
5
|
readonly trackUser: (user: User) => void;
|
|
6
6
|
readonly identify: (userId: string, traits?: any, options?: any, callback?: ((...params: any[]) => any) | undefined) => Promise<any>;
|
|
7
7
|
readonly track: (eventName: string, payload?: any, options?: any, callback?: ((...params: any[]) => any) | undefined) => Promise<any>;
|
|
8
|
-
readonly page: (data?: import(
|
|
8
|
+
readonly page: (data?: import('analytics').PageData<string> | undefined, options?: any, callback?: ((...params: any[]) => any) | undefined) => Promise<any>;
|
|
9
9
|
readonly user: (key?: string | undefined) => any;
|
|
10
10
|
readonly reset: (callback?: ((...params: any[]) => any) | undefined) => Promise<any>;
|
|
11
|
-
readonly ready: (callback: (...params: any[]) => any) => import(
|
|
12
|
-
readonly on: (name: string, callback: (...params: any[]) => any) => import(
|
|
13
|
-
readonly once: (name: string, callback: (...params: any[]) => any) => import(
|
|
11
|
+
readonly ready: (callback: (...params: any[]) => any) => import('analytics').DetachListeners;
|
|
12
|
+
readonly on: (name: string, callback: (...params: any[]) => any) => import('analytics').DetachListeners;
|
|
13
|
+
readonly once: (name: string, callback: (...params: any[]) => any) => import('analytics').DetachListeners;
|
|
14
14
|
readonly getState: (key?: string | undefined) => any;
|
|
15
15
|
readonly storage: {
|
|
16
16
|
getItem: (key: string, options?: any) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LabsMainDesktopNavProps } from '../components/LabsMainDesktopNav';
|
|
3
2
|
import { LabsMainMobileNavProps } from '../components/LabsMainMobileNav';
|
|
4
3
|
import { DirectoryValue } from '../types/DirectoryValue.type';
|
|
4
|
+
|
|
5
5
|
interface LayoutMainProps {
|
|
6
6
|
actions?: (() => React.ReactNode) | React.ReactNode;
|
|
7
7
|
appName: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AnalyticsInstance } from 'analytics';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { CreateAnalyticsProps } from './createAnalytics';
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
export declare const LabsAnalyticsContext: import('react').Context<AnalyticsInstance | null>;
|
|
5
6
|
export interface LabsAnalyticsProviderProps extends CreateAnalyticsProps {
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
}
|
|
@@ -6,4 +6,4 @@ export interface CreateAnalyticsProps {
|
|
|
6
6
|
tokenMixpanel?: string;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export declare const createAnalytics: ({ appName, options: optionsInit, }: CreateAnalyticsProps) => import(
|
|
9
|
+
export declare const createAnalytics: ({ appName, options: optionsInit, }: CreateAnalyticsProps) => import('analytics').AnalyticsInstance;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { User, refreshToken } from '.';
|
|
2
|
+
|
|
3
3
|
export type Role = string;
|
|
4
4
|
export type LabsAuthContextValue = {
|
|
5
5
|
user: User | null;
|
|
@@ -10,7 +10,7 @@ export type LabsAuthContextValue = {
|
|
|
10
10
|
logout: () => void;
|
|
11
11
|
refreshToken: typeof refreshToken;
|
|
12
12
|
};
|
|
13
|
-
export declare const LabsAuthContext: import(
|
|
13
|
+
export declare const LabsAuthContext: import('react').Context<LabsAuthContextValue | null>;
|
|
14
14
|
export interface LabsAuthProviderProps {
|
|
15
15
|
appIdentifier: string;
|
|
16
16
|
children: React.ReactNode;
|
package/dist/src/lib/dayjs.d.ts
CHANGED
package/dist/src/main.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ControllerFieldState, ControllerRenderProps, FieldPath, FieldValues, UseFormStateReturn } from 'react-hook-form';
|
|
2
|
+
|
|
2
3
|
export type ControllerRenderParams<TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>> = {
|
|
3
4
|
field: ControllerRenderProps<TValues, TName>;
|
|
4
5
|
fieldState: ControllerFieldState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldContainerInputProps } from '../components/FieldContainer/FieldContainerInput';
|
|
2
|
+
|
|
2
3
|
export declare const toFieldInputProps: (fieldProps: Partial<FieldContainerInputProps>) => Partial<Partial<FieldContainerInputProps>>;
|
|
3
4
|
export declare const toFieldSharedProps: (fieldProps: FieldContainerInputProps) => {
|
|
4
5
|
className: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { RefAttributes } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
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;
|