@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.
Files changed (47) hide show
  1. package/dist/moser-labs-react.cjs +97 -91
  2. package/dist/moser-labs-react.js +17600 -17589
  3. package/dist/src/_dev/components/DevDirectoryLink.d.ts +2 -2
  4. package/dist/src/_dev/components/DevLink.d.ts +3 -3
  5. package/dist/src/_dev/lib/directory.d.ts +1 -0
  6. package/dist/src/_dev/lib/router.d.ts +1 -1
  7. package/dist/src/_dev/sandbox.d.ts +1 -0
  8. package/dist/src/_dev/views/Inputs.view.d.ts +54 -54
  9. package/dist/src/components/FieldContainer/FieldContainer.d.ts +2 -1
  10. package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +1 -0
  11. package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +1 -0
  12. package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +1 -0
  13. package/dist/src/components/LabsAuthGate.d.ts +1 -0
  14. package/dist/src/components/LabsButton.d.ts +1 -0
  15. package/dist/src/components/LabsCalendar.d.ts +2 -2
  16. package/dist/src/components/LabsCheckbox.d.ts +6 -4
  17. package/dist/src/components/LabsDate.d.ts +7 -5
  18. package/dist/src/components/LabsIcon.d.ts +2 -1
  19. package/dist/src/components/LabsLogoutTimer.d.ts +1 -0
  20. package/dist/src/components/LabsMain.d.ts +1 -0
  21. package/dist/src/components/LabsMainDesktopNav.d.ts +1 -0
  22. package/dist/src/components/LabsMainMobileNav.d.ts +1 -0
  23. package/dist/src/components/LabsMenuNav.d.ts +1 -0
  24. package/dist/src/components/LabsSelect.d.ts +8 -7
  25. package/dist/src/components/LabsSpeedDialNav.d.ts +1 -0
  26. package/dist/src/components/LabsText.d.ts +6 -5
  27. package/dist/src/components/LabsTextCurrency.d.ts +6 -5
  28. package/dist/src/components/LabsTextSearch.d.ts +6 -5
  29. package/dist/src/components/LabsTextarea.d.ts +6 -5
  30. package/dist/src/components/LabsToggle.d.ts +1 -0
  31. package/dist/src/components/LabsTypeahead.d.ts +7 -6
  32. package/dist/src/hooks/useAnalytics.d.ts +6 -6
  33. package/dist/src/layouts/Base.layout.d.ts +1 -0
  34. package/dist/src/layouts/Main.layout.d.ts +1 -1
  35. package/dist/src/lib/analytics/analyticsContext.d.ts +2 -1
  36. package/dist/src/lib/analytics/createAnalytics.d.ts +1 -1
  37. package/dist/src/lib/auth/authContext.d.ts +2 -2
  38. package/dist/src/lib/auth/index.d.ts +2 -1
  39. package/dist/src/lib/dayjs.d.ts +2 -1
  40. package/dist/src/main.d.ts +1 -0
  41. package/dist/src/types/DirectoryValue.type.d.ts +1 -0
  42. package/dist/src/types/ReactHookForm.type.d.ts +2 -1
  43. package/dist/src/utils/animations.d.ts +1 -0
  44. package/dist/src/utils/fieldHelpers.d.ts +1 -0
  45. package/dist/src/utils/forwardRefInferGenerics.d.ts +2 -1
  46. package/dist/style.css +1 -1
  47. 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, { GroupBase, Props as BaseSelectProps } from 'react-select';
4
- import { type FieldContainerInputProps } from './FieldContainer/FieldContainerInput';
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("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;
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("react-hook-form").Noop;
17
+ onBlur: import('react-hook-form').Noop;
18
+ disabled?: boolean | undefined;
18
19
  name: TName;
19
- ref: import("react-hook-form").RefCallBack;
20
+ ref: import('react-hook-form').RefCallBack;
20
21
  };
21
22
  export {};
@@ -1,16 +1,16 @@
1
- /// <reference types="analytics" />
2
- import type { User } from '../lib/auth';
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("analytics").PageData<string> | undefined, options?: any, callback?: ((...params: any[]) => any) | undefined) => Promise<any>;
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("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;
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,4 +1,5 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
+
2
3
  export type LayoutBaseProps = ComponentPropsWithoutRef<'div'> & {
3
4
  appName: string;
4
5
  favicon?: {
@@ -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
- export declare const LabsAnalyticsContext: import("react").Context<AnalyticsInstance | null>;
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("analytics").AnalyticsInstance;
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("react").Context<LabsAuthContextValue | null>;
13
+ export declare const LabsAuthContext: import('react').Context<LabsAuthContextValue | null>;
14
14
  export interface LabsAuthProviderProps {
15
15
  appIdentifier: string;
16
16
  children: React.ReactNode;
@@ -1,4 +1,5 @@
1
- import Keycloak from 'keycloak-js';
1
+ import { default as Keycloak } from 'keycloak-js';
2
+
2
3
  export declare const auth: Keycloak;
3
4
  export * from './authContext';
4
5
  export * from './authUtils';
@@ -1,2 +1,3 @@
1
- import dayjs from 'dayjs';
1
+ import { default as dayjs } from 'dayjs';
2
+
2
3
  export default dayjs;
@@ -1,3 +1,4 @@
1
+
1
2
  export * from './constants/app';
2
3
  export * from './components/LabsAuthGate';
3
4
  export * from './components/LabsButton';
@@ -1,4 +1,5 @@
1
1
  import { Role } from '../main';
2
+
2
3
  export type DirectoryValue = {
3
4
  EXACT?: boolean;
4
5
  ICON: string;
@@ -1,4 +1,5 @@
1
- import type { ControllerFieldState, ControllerRenderProps, FieldPath, FieldValues, UseFormStateReturn } from 'react-hook-form';
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,2 +1,3 @@
1
1
  import { MotionProps } from 'framer-motion';
2
+
2
3
  export declare const slideYFadeAnimation: MotionProps;
@@ -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
- export declare const forwardRefInferGenerics: <T, P = Record<string, unknown>>(render: (props: P, ref: import("react").Ref<T>) => React.ReactElement | null) => (props: P & RefAttributes<T>) => React.ReactElement | null;
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;