@mparticle/aquarium 1.19.3 → 1.19.4-chore-better-types.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/aquarium.js +1 -0
- package/dist/aquarium.umd.cjs +1 -1
- package/dist/index.d.ts +83 -28
- package/dist/style.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,10 +33,12 @@ 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 } from '
|
|
37
|
-
import {
|
|
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';
|
|
38
39
|
import { ConfigOptions } from 'antd/es/message/interface';
|
|
39
40
|
import { ConfigProvider } from './other/ConfigProvider/ConfigProvider';
|
|
41
|
+
import { CookieOptions } from '../../../../../../../../src/utils/Cookies';
|
|
40
42
|
import { CountdownProps } from 'antd';
|
|
41
43
|
import { CSSProperties } from 'react';
|
|
42
44
|
import { DatePickerProps } from 'antd';
|
|
@@ -99,7 +101,6 @@ import { INavigationCreateProps as INavigationCreateProps_2 } from '../../../../
|
|
|
99
101
|
import { INavigationOrg } from './navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelectorItems';
|
|
100
102
|
import { INavigationOrg as INavigationOrg_2 } from '../../../../../../../../../src/components';
|
|
101
103
|
import { INavigationWorkspace } from './navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelectorItems';
|
|
102
|
-
import { INewExperienceReminderOptions } from '../hooks/NewExperienceReminder/useNewExperienceReminder';
|
|
103
104
|
import { INewExperienceReminderOptions as INewExperienceReminderOptions_2 } from '../../../../../../../../../src/components';
|
|
104
105
|
import { Input as Input_2 } from 'antd';
|
|
105
106
|
import { InputNumberProps } from 'antd';
|
|
@@ -133,7 +134,6 @@ import { ModalFunc } from 'antd/es/modal/confirm';
|
|
|
133
134
|
import { modalGlobalConfig } from 'antd/es/modal/confirm';
|
|
134
135
|
import { ModalProps } from 'antd';
|
|
135
136
|
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,16 +208,12 @@ 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 {
|
|
212
|
-
import {
|
|
213
|
-
import {
|
|
214
|
-
import {
|
|
215
|
-
import {
|
|
216
|
-
import {
|
|
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';
|
|
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';
|
|
221
217
|
import { WatermarkProps } from 'antd';
|
|
222
218
|
|
|
223
219
|
export declare const Affix: (props: IAffixProps) => JSX_2.Element;
|
|
@@ -303,9 +299,18 @@ export { ColumnsType }
|
|
|
303
299
|
|
|
304
300
|
export { ColumnType }
|
|
305
301
|
|
|
306
|
-
export
|
|
302
|
+
export declare type CompositeUserPreferences<UserPreferenceId extends PropertyKey> = {
|
|
303
|
+
[Id in UserPreferenceId]: UserPreference;
|
|
304
|
+
};
|
|
307
305
|
|
|
308
|
-
export
|
|
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
|
+
}
|
|
309
314
|
|
|
310
315
|
declare type CompoundedComponent = ForwardRefExoticComponent<IInputProps & RefAttributes<InputRef>> & {
|
|
311
316
|
Group: typeof Input_2.Group;
|
|
@@ -316,6 +321,8 @@ declare type CompoundedComponent = ForwardRefExoticComponent<IInputProps & RefAt
|
|
|
316
321
|
|
|
317
322
|
export { ConfigProvider }
|
|
318
323
|
|
|
324
|
+
declare type ContextHolder = ReactNode;
|
|
325
|
+
|
|
319
326
|
export declare const DatePicker: {
|
|
320
327
|
(props: IDatePickerProps): JSX_2.Element;
|
|
321
328
|
generatePicker: typeof default_4;
|
|
@@ -603,7 +610,14 @@ export { INavigationOrg }
|
|
|
603
610
|
|
|
604
611
|
export { INavigationWorkspace }
|
|
605
612
|
|
|
606
|
-
export
|
|
613
|
+
export declare interface INewExperienceReminderOptions {
|
|
614
|
+
onClose: () => void;
|
|
615
|
+
onRemindMeLater: () => void;
|
|
616
|
+
onTakeMeThere: () => void;
|
|
617
|
+
duration?: number;
|
|
618
|
+
title?: string;
|
|
619
|
+
message?: string;
|
|
620
|
+
}
|
|
607
621
|
|
|
608
622
|
export declare interface INotificationProps extends NotificationArgsProps {
|
|
609
623
|
children: React.ReactNode;
|
|
@@ -798,7 +812,7 @@ export declare const Modal: {
|
|
|
798
812
|
useModal: typeof default_10;
|
|
799
813
|
};
|
|
800
814
|
|
|
801
|
-
export
|
|
815
|
+
export declare type NewExperienceReminderHook = [OpenNotificationFn, ContextHolder];
|
|
802
816
|
|
|
803
817
|
export { notification }
|
|
804
818
|
|
|
@@ -815,6 +829,8 @@ declare const Notification_2: {
|
|
|
815
829
|
};
|
|
816
830
|
export { Notification_2 as Notification }
|
|
817
831
|
|
|
832
|
+
declare type OpenNotificationFn = () => void;
|
|
833
|
+
|
|
818
834
|
export declare const Pagination: (props: IPaginationProps) => JSX_2.Element;
|
|
819
835
|
|
|
820
836
|
export declare const Popconfirm: (props: IPopconfirmProps) => JSX_2.Element;
|
|
@@ -968,25 +984,64 @@ export declare const Upload: {
|
|
|
968
984
|
LIST_IGNORE: string;
|
|
969
985
|
};
|
|
970
986
|
|
|
971
|
-
export
|
|
987
|
+
export declare const useNewExperienceReminder: (options: INewExperienceReminderOptions) => NewExperienceReminderHook;
|
|
972
988
|
|
|
973
|
-
export
|
|
989
|
+
export declare const USER_PREFERENCE_SCOPE_SEPARATOR = "-";
|
|
974
990
|
|
|
975
|
-
export
|
|
991
|
+
export declare interface UserPreference {
|
|
992
|
+
optedIn: boolean;
|
|
993
|
+
}
|
|
976
994
|
|
|
977
|
-
export
|
|
995
|
+
export declare interface UserPreferenceDefinition {
|
|
996
|
+
isOptedInByDefault: boolean;
|
|
997
|
+
allowedScope: UserPreferenceScopeType;
|
|
998
|
+
}
|
|
978
999
|
|
|
979
|
-
export
|
|
1000
|
+
export declare type UserPreferenceDefinitions<UserPreferenceId extends PropertyKey> = {
|
|
1001
|
+
[Id in UserPreferenceId]?: UserPreferenceDefinition;
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
export declare const UserPreferenceGlobalScope: "global";
|
|
1005
|
+
|
|
1006
|
+
declare type UserPreferenceGlobalScopeType = `global`;
|
|
980
1007
|
|
|
981
|
-
|
|
1008
|
+
declare type UserPreferenceLevelOneScopeType = `${number}`;
|
|
982
1009
|
|
|
983
|
-
|
|
1010
|
+
declare type UserPreferenceLevelThreeScopeType = `${number}-${number}-${number}`;
|
|
984
1011
|
|
|
985
|
-
|
|
1012
|
+
declare type UserPreferenceLevelTwoScopeType = `${number}-${number}`;
|
|
986
1013
|
|
|
987
|
-
export
|
|
1014
|
+
export declare type UserPreferences<UserPreferenceId extends PropertyKey> = {
|
|
1015
|
+
[K in UserPreferenceScope]?: {
|
|
1016
|
+
[Id in UserPreferenceId]: UserPreference;
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
988
1019
|
|
|
989
|
-
export
|
|
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
|
+
}
|
|
990
1045
|
|
|
991
1046
|
export declare const Watermark: (props: IWatermarkProps) => JSX_2.Element;
|
|
992
1047
|
|
package/dist/style.ts
CHANGED
|
@@ -326,7 +326,7 @@ export const SizeXl = "32px";
|
|
|
326
326
|
export const SizeLg = "24px";
|
|
327
327
|
export const SizeMd = "20px";
|
|
328
328
|
export const SizeMs = "16px";
|
|
329
|
-
export const Size = "
|
|
329
|
+
export const Size = "16px";
|
|
330
330
|
export const SizeSm = "12px";
|
|
331
331
|
export const SizeXs = "8px";
|
|
332
332
|
export const SizeXxs = "4px";
|