@mparticle/aquarium 1.19.4-chore-better-types.1 → 1.21.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/index.d.ts CHANGED
@@ -33,12 +33,10 @@ import { CollapseProps } from 'antd';
33
33
  import { ColorPickerProps } from 'antd';
34
34
  import { ColumnsType } from 'antd/es/table';
35
35
  import { ColumnType } from 'antd/es/table/interface';
36
- import { CompositeUserPreferences as CompositeUserPreferences_2 } from '../../../../../../../../src/services/user-preferences/models/user-preferences/composite-user-preferences';
37
- import { CompositeUserPreferences as CompositeUserPreferences_3 } from '../../../../../../../../../src/services/user-preferences/models/user-preferences/composite-user-preferences';
38
- import { CompositeUserPreferencesService as CompositeUserPreferencesService_2 } from '../../../../../../../../src/services/user-preferences/composite-user-preferences-service';
36
+ import { CompositeUserPreferences } from '../services/user-preferences/models/user-preferences/composite-user-preferences';
37
+ import { CompositeUserPreferencesService } from '../services/user-preferences/composite-user-preferences-service';
39
38
  import { ConfigOptions } from 'antd/es/message/interface';
40
39
  import { ConfigProvider } from './other/ConfigProvider/ConfigProvider';
41
- import { CookieOptions } from '../../../../../../../../src/utils/Cookies';
42
40
  import { CountdownProps } from 'antd';
43
41
  import { CSSProperties } from 'react';
44
42
  import { DatePickerProps } from 'antd';
@@ -101,6 +99,7 @@ import { INavigationCreateProps as INavigationCreateProps_2 } from '../../../../
101
99
  import { INavigationOrg } from './navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelectorItems';
102
100
  import { INavigationOrg as INavigationOrg_2 } from '../../../../../../../../../src/components';
103
101
  import { INavigationWorkspace } from './navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelectorItems';
102
+ import { INewExperienceReminderOptions } from '../hooks/NewExperienceReminder/useNewExperienceReminder';
104
103
  import { INewExperienceReminderOptions as INewExperienceReminderOptions_2 } from '../../../../../../../../../src/components';
105
104
  import { Input as Input_2 } from 'antd';
106
105
  import { InputNumberProps } from 'antd';
@@ -134,6 +133,7 @@ import { ModalFunc } from 'antd/es/modal/confirm';
134
133
  import { modalGlobalConfig } from 'antd/es/modal/confirm';
135
134
  import { ModalProps } from 'antd';
136
135
  import { NamedExoticComponent } from 'react';
136
+ import { NewExperienceReminderHook } from '../hooks/NewExperienceReminder/useNewExperienceReminder';
137
137
  import { NewExperienceReminderHook as NewExperienceReminderHook_2 } from '../../../../../../../../../src/components';
138
138
  import { notification } from 'antd';
139
139
  import { NotificationArgsProps } from 'antd';
@@ -208,12 +208,16 @@ import { UploadProps } from 'antd';
208
208
  import { UploadRef } from 'antd/es/upload/Upload';
209
209
  import { useAppProps } from 'antd/es/app/context';
210
210
  import { useForm } from 'antd/es/form/Form';
211
- import { UserPreferenceDefinitions as UserPreferenceDefinitions_2 } from '../../../../../../../../src/services/user-preferences/models/definitions/user-preference-definitions';
212
- import { UserPreferenceDefinitions as UserPreferenceDefinitions_3 } from '../../../../../../../../../src/services/user-preferences/models/definitions/user-preference-definitions';
213
- import { UserPreferences as UserPreferences_2 } from '../../../../../../../../../src/services/user-preferences/models/storage-models/user-preferences';
214
- import { UserPreferenceScope as UserPreferenceScope_2 } from '../../../../../../../../src/services/user-preferences/models/storage-models/user-preference-scope';
215
- import { UserPreferenceScope as UserPreferenceScope_3 } from '../../../../../../../../../src/services/user-preferences/models/storage-models/user-preference-scope';
216
- import { UserPreferenceScopeType as UserPreferenceScopeType_2 } from '../../../../../../../../../src/services/user-preferences/models/definitions/user-preference-scope-type';
211
+ import { useNewExperienceReminder } from '../hooks/NewExperienceReminder/useNewExperienceReminder';
212
+ import { USER_PREFERENCE_SCOPE_SEPARATOR } from '../services/user-preferences/models/storage-models';
213
+ import { UserPreference } from '../services/user-preferences/models/storage-models';
214
+ import { UserPreferenceDefinition } from '../services/user-preferences/models/definitions';
215
+ import { UserPreferenceDefinitions } from '../services/user-preferences/models/definitions';
216
+ import { UserPreferenceGlobalScope } from '../services/user-preferences/models/storage-models';
217
+ import { UserPreferences } from '../services/user-preferences/models/storage-models';
218
+ import { UserPreferenceScope } from '../services/user-preferences/models/storage-models';
219
+ import { UserPreferenceScopeType } from '../services/user-preferences/models/definitions';
220
+ import { UserPreferencesService } from '../services/user-preferences/user-preferences';
217
221
  import { WatermarkProps } from 'antd';
218
222
 
219
223
  export declare const Affix: (props: IAffixProps) => JSX_2.Element;
@@ -299,18 +303,9 @@ export { ColumnsType }
299
303
 
300
304
  export { ColumnType }
301
305
 
302
- export declare type CompositeUserPreferences<UserPreferenceId extends PropertyKey> = {
303
- [Id in UserPreferenceId]: UserPreference;
304
- };
306
+ export { CompositeUserPreferences }
305
307
 
306
- export declare class CompositeUserPreferencesService<TPreferenceIds extends PropertyKey> {
307
- getScopedUserPreferences(storedPreferences: UserPreferences_2<TPreferenceIds>, currentScope: UserPreferenceScope_3, definitions: UserPreferenceDefinitions_3<TPreferenceIds>): CompositeUserPreferences_3<TPreferenceIds>;
308
- getUpdatedUserPreferenceStorageObject(preferenceId: TPreferenceIds, isOptedIn: boolean, currentScope: UserPreferenceScope_3, currentPreferences: UserPreferences_2<TPreferenceIds>, allowedScope: UserPreferenceScopeType_2): UserPreferences_2<TPreferenceIds>;
309
- private createUserPreferenceEntryFromDefinition;
310
- private getEffectiveScope;
311
- private createPreferenceEntry;
312
- private createCompositePreferencesFromEntries;
313
- }
308
+ export { CompositeUserPreferencesService }
314
309
 
315
310
  declare type CompoundedComponent = ForwardRefExoticComponent<IInputProps & RefAttributes<InputRef>> & {
316
311
  Group: typeof Input_2.Group;
@@ -321,8 +316,6 @@ declare type CompoundedComponent = ForwardRefExoticComponent<IInputProps & RefAt
321
316
 
322
317
  export { ConfigProvider }
323
318
 
324
- declare type ContextHolder = ReactNode;
325
-
326
319
  export declare const DatePicker: {
327
320
  (props: IDatePickerProps): JSX_2.Element;
328
321
  generatePicker: typeof default_4;
@@ -468,13 +461,7 @@ export declare interface IColorPickerProps extends ColorPickerProps {
468
461
 
469
462
  export { IColProps }
470
463
 
471
- export declare const Icon: {
472
- (props: IIconProps): JSX_2.Element;
473
- defaultProps: {
474
- color: "default";
475
- size: "lg";
476
- };
477
- };
464
+ export declare const Icon: (props: IIconProps) => JSX_2.Element;
478
465
 
479
466
  declare type IconColor = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'white' | 'black' | 'text' | 'strong' | 'brand';
480
467
 
@@ -610,14 +597,7 @@ export { INavigationOrg }
610
597
 
611
598
  export { INavigationWorkspace }
612
599
 
613
- export declare interface INewExperienceReminderOptions {
614
- onClose: () => void;
615
- onRemindMeLater: () => void;
616
- onTakeMeThere: () => void;
617
- duration?: number;
618
- title?: string;
619
- message?: string;
620
- }
600
+ export { INewExperienceReminderOptions }
621
601
 
622
602
  export declare interface INotificationProps extends NotificationArgsProps {
623
603
  children: React.ReactNode;
@@ -629,6 +609,19 @@ export declare const InputNumber: (props: IInputNumberProps) => JSX_2.Element;
629
609
 
630
610
  export { InputRef }
631
611
 
612
+ export declare interface INumberInputProps {
613
+ value?: number | undefined;
614
+ disabled?: boolean;
615
+ errorMessage?: string;
616
+ autoFocus: boolean;
617
+ placeholder?: string;
618
+ min?: number;
619
+ max?: number;
620
+ step?: number;
621
+ onChange?: (value: number | undefined) => void;
622
+ onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
623
+ }
624
+
632
625
  export declare interface IPaginationProps extends PaginationProps {
633
626
  }
634
627
 
@@ -812,7 +805,7 @@ export declare const Modal: {
812
805
  useModal: typeof default_10;
813
806
  };
814
807
 
815
- export declare type NewExperienceReminderHook = [OpenNotificationFn, ContextHolder];
808
+ export { NewExperienceReminderHook }
816
809
 
817
810
  export { notification }
818
811
 
@@ -829,8 +822,6 @@ declare const Notification_2: {
829
822
  };
830
823
  export { Notification_2 as Notification }
831
824
 
832
- declare type OpenNotificationFn = () => void;
833
-
834
825
  export declare const Pagination: (props: IPaginationProps) => JSX_2.Element;
835
826
 
836
827
  export declare const Popconfirm: (props: IPopconfirmProps) => JSX_2.Element;
@@ -984,64 +975,25 @@ export declare const Upload: {
984
975
  LIST_IGNORE: string;
985
976
  };
986
977
 
987
- export declare const useNewExperienceReminder: (options: INewExperienceReminderOptions) => NewExperienceReminderHook;
978
+ export { useNewExperienceReminder }
988
979
 
989
- export declare const USER_PREFERENCE_SCOPE_SEPARATOR = "-";
980
+ export { USER_PREFERENCE_SCOPE_SEPARATOR }
990
981
 
991
- export declare interface UserPreference {
992
- optedIn: boolean;
993
- }
994
-
995
- export declare interface UserPreferenceDefinition {
996
- isOptedInByDefault: boolean;
997
- allowedScope: UserPreferenceScopeType;
998
- }
999
-
1000
- export declare type UserPreferenceDefinitions<UserPreferenceId extends PropertyKey> = {
1001
- [Id in UserPreferenceId]?: UserPreferenceDefinition;
1002
- };
982
+ export { UserPreference }
1003
983
 
1004
- export declare const UserPreferenceGlobalScope: "global";
984
+ export { UserPreferenceDefinition }
1005
985
 
1006
- declare type UserPreferenceGlobalScopeType = `global`;
986
+ export { UserPreferenceDefinitions }
1007
987
 
1008
- declare type UserPreferenceLevelOneScopeType = `${number}`;
988
+ export { UserPreferenceGlobalScope }
1009
989
 
1010
- declare type UserPreferenceLevelThreeScopeType = `${number}-${number}-${number}`;
990
+ export { UserPreferences }
1011
991
 
1012
- declare type UserPreferenceLevelTwoScopeType = `${number}-${number}`;
992
+ export { UserPreferenceScope }
1013
993
 
1014
- export declare type UserPreferences<UserPreferenceId extends PropertyKey> = {
1015
- [K in UserPreferenceScope]?: {
1016
- [Id in UserPreferenceId]: UserPreference;
1017
- };
1018
- };
994
+ export { UserPreferenceScopeType }
1019
995
 
1020
- export declare type UserPreferenceScope = UserPreferenceLevelOneScopeType | UserPreferenceLevelTwoScopeType | UserPreferenceLevelThreeScopeType | UserPreferenceGlobalScopeType;
1021
-
1022
- export declare enum UserPreferenceScopeType {
1023
- Global = 0,
1024
- LevelOneScope = 1,
1025
- LevelTwoScope = 2,
1026
- LevelThreeScope = 3
1027
- }
1028
-
1029
- export declare class UserPreferencesService<TUserPreferenceId extends PropertyKey> {
1030
- private readonly definitions;
1031
- private readonly compositeUserPreferencesService;
1032
- private readonly currentScope;
1033
- private readonly cookieOptions;
1034
- private readonly onUpdate?;
1035
- preferences: CompositeUserPreferences_2<TUserPreferenceId>;
1036
- constructor(definitions: UserPreferenceDefinitions_2<TUserPreferenceId>, compositeUserPreferencesService: CompositeUserPreferencesService_2<TUserPreferenceId>, currentScope: UserPreferenceScope_2, cookieOptions: CookieOptions & {
1037
- key: string;
1038
- }, onUpdate?: ((resolvedPreferences: CompositeUserPreferences_2<TUserPreferenceId>) => void) | undefined);
1039
- init(): Promise<void>;
1040
- isOptedIn(userPreferenceId: TUserPreferenceId): Promise<boolean | undefined>;
1041
- setPreference(userPreferenceId: TUserPreferenceId, isOptedIn: boolean): Promise<void>;
1042
- private getStoredPreferences;
1043
- private setStoredPreferences;
1044
- }
996
+ export { UserPreferencesService }
1045
997
 
1046
998
  export declare const Watermark: (props: IWatermarkProps) => JSX_2.Element;
1047
999
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/aquarium",
3
- "version": "1.19.4-chore-better-types.1",
3
+ "version": "1.21.0",
4
4
  "description": "mParticle Component Library",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [