@mparticle/aquarium 1.35.1-fix-typography.1 → 1.36.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.
@@ -60,6 +60,8 @@ import DirectoryIcon from '../../../../../../../../src/assets/svg/mp_pm_lt_direc
60
60
  import LockIcon from '../../../../../../../../src/assets/svg/mp_act_lt_lock.svg?react';
61
61
  import UnlockIcon from '../../../../../../../../src/assets/svg/mp_act_lt_unlock.svg?react';
62
62
  import NotificationIcon from '../../../../../../../../src/assets/svg/mp_pm_lt_notification.svg?react';
63
+ import NotificationSubscriptionsIcon from '../../../../../../../../src/assets/svg/mp_pm_lt_notification_subscriptions.svg?react';
64
+ import NotificationSubscribeIcon from '../../../../../../../../src/assets/svg/mp_pm_lt_notification_subscribe.svg?react';
63
65
  import PremiumIconDt from '../../../../../../../../src/assets/svg/mp_info_dt_premium.svg?react';
64
66
  import OverviewIconDt from '../../../../../../../../src/assets/svg/mp_pm_dt_overview.svg?react';
65
67
  import FilterIcon from '../../../../../../../../src/assets/svg/mp_act_lt_filter.svg?react';
@@ -86,4 +88,5 @@ import FullScreen from '../../../../../../../../src/assets/svg/mp_act_lt_full-sc
86
88
  import Edit from '../../../../../../../../src/assets/svg/mp_act_lt_edit.svg?react';
87
89
  import Copy from '../../../../../../../../src/assets/svg/mp_act_lt_copy.svg?react';
88
90
  import MoreActions from '../../../../../../../../src/assets/svg/mp_act_lt_more-actions.svg?react';
89
- export { Account, ActiveIcon, AddIcon, AlicornIcon, AnalyticsIconDt, Annotation, C360IconDt, CatalogIcon, ChartColumnIcon, ChartLineIcon, CheckIcon, CircleNodesIcon, CloudIcon, Cohort, ConnectionsIcon, ConversionIcon, Copy, Dashboard, DatabaseIcon, DataPlatformIconDt, Delete, DirectoryIcon, DragAndDropIcon, DropdownClose, DropdownOpen, DsrIcon, Edit, EmptyIcon, EnrichmentIcon, EventAttributeIcon, EventIcon, FilterIcon, FitToScreen, FolderClosedIcon, ForwardingIcon, FullScreen, Funnel, GearIcon, GridIcon, HeartIcon, HelpIcon, HelpVideoIcon, IdentityIcon, InfoIcon, JourneyAnalysis, JumpToIcon, LightBulbIcon, LinkIcon, LiveStreamIcon, LockIcon, MessageQuestionIcon, MoreActions, MpLogoIcon, NextIcon, NotificationIcon, ObservabilityIcon, OpenTabIcon, Organization, OversightIconDt, OverviewIconDt, PaywallIcon, Placeholder, PredictionsIcon, PredictionsIconDt, PremiumIcon, PremiumIconDt, PreviousIcon, Privileges, RefreshFrequency, RemoveIcon, ScheduledReport, SearchIcon, SegmentationAnalysis, SegmentationIconDt, ShieldKeyholeIcon, SignoutIcon, SplitIcon, SystemAlertsIcon, TextWidget, TransformationsIcon, UnlockIcon, UploadIcon, UserAttributeIcon, UserProfilesIcon, UsersIcon, WrenchIcon, ZoomIn, ZoomOut, };
91
+ import AbSplit from '../../../../../../../../src/assets/svg/mp_info_lt_ab-split.svg?react';
92
+ export { AbSplit, Account, ActiveIcon, AddIcon, AlicornIcon, AnalyticsIconDt, Annotation, C360IconDt, CatalogIcon, ChartColumnIcon, ChartLineIcon, CheckIcon, CircleNodesIcon, CloudIcon, Cohort, ConnectionsIcon, ConversionIcon, Copy, Dashboard, DatabaseIcon, DataPlatformIconDt, Delete, DirectoryIcon, DragAndDropIcon, DropdownClose, DropdownOpen, DsrIcon, Edit, EmptyIcon, EnrichmentIcon, EventAttributeIcon, EventIcon, FilterIcon, FitToScreen, FolderClosedIcon, ForwardingIcon, FullScreen, Funnel, GearIcon, GridIcon, HeartIcon, HelpIcon, HelpVideoIcon, IdentityIcon, InfoIcon, JourneyAnalysis, JumpToIcon, LightBulbIcon, LinkIcon, LiveStreamIcon, LockIcon, MessageQuestionIcon, MoreActions, MpLogoIcon, NextIcon, NotificationIcon, NotificationSubscriptionsIcon, NotificationSubscribeIcon, ObservabilityIcon, OpenTabIcon, Organization, OversightIconDt, OverviewIconDt, PaywallIcon, Placeholder, PredictionsIcon, PredictionsIconDt, PremiumIcon, PremiumIconDt, PreviousIcon, Privileges, RefreshFrequency, RemoveIcon, ScheduledReport, SearchIcon, SegmentationAnalysis, SegmentationIconDt, ShieldKeyholeIcon, SignoutIcon, SplitIcon, SystemAlertsIcon, TextWidget, TransformationsIcon, UnlockIcon, UploadIcon, UserAttributeIcon, UserProfilesIcon, UsersIcon, WrenchIcon, ZoomIn, ZoomOut, };
@@ -78,9 +78,8 @@ export type { INavigationOrg, INavigationWorkspace, INavigationAccount, IWorkspa
78
78
  export { type INotificationCenterProps, NotificationCenterZIndex, } from './navigation/GlobalNavigation/NotificationCenter';
79
79
  export { SuiteLogo } from './navigation/GlobalNavigation/SuiteLogo';
80
80
  export { Typography } from './general/Typography/Typography';
81
- export { UserPreferencesService } from '../services/user-preferences/user-preferences';
81
+ export { UserPreferencesService } from '../services/user-preferences';
82
82
  export { CompositeUserPreferencesService } from '../services/user-preferences/composite-user-preferences-service';
83
- export { type CompositeUserPreferences } from '../services/user-preferences/models/user-preferences/composite-user-preferences';
84
- export { UserPreferenceScopeType, type UserPreferenceDefinition, type UserPreferenceDefinitions, } from '../services/user-preferences/models/definitions';
85
- export { type UserPreferences, USER_PREFERENCE_SCOPE_SEPARATOR, UserPreferenceGlobalScope, type UserPreference, type UserPreferenceScope, } from '../services/user-preferences/models/storage-models';
83
+ export { UserPreferenceScopeType, type UserPreferenceDefinition, type UserPreferenceDefinitions, type UserPreferencesPerScope, } from '../services/user-preferences/models/definitions';
84
+ export { USER_PREFERENCE_SCOPE_SEPARATOR, UserPreferenceGlobalScope, type UserPreferenceScope, } from '../services/user-preferences/models/storage-models';
86
85
  export { useNewExperienceReminder, type INewExperienceReminderOptions, type NewExperienceReminderHook, } from '../hooks/NewExperienceReminder/useNewExperienceReminder';
@@ -1,13 +1,9 @@
1
- import { type UserPreferences } from '../../../../../../../../../src/services/user-preferences/models/storage-models/user-preferences';
2
- import { type UserPreferenceScope } from '../../../../../../../../../src/services/user-preferences/models/storage-models/user-preference-scope';
3
- import { type UserPreferenceDefinitions } from '../../../../../../../../../src/services/user-preferences/models/definitions/user-preference-definitions';
4
- import { type CompositeUserPreferences } from '../../../../../../../../../src/services/user-preferences/models/user-preferences/composite-user-preferences';
5
- import { UserPreferenceScopeType } from '../../../../../../../../../src/services/user-preferences/models/definitions/user-preference-scope-type';
6
- export declare class CompositeUserPreferencesService<TPreferenceIds extends PropertyKey> {
7
- getScopedUserPreferences(storedPreferences: UserPreferences<TPreferenceIds>, currentScope: UserPreferenceScope, definitions: UserPreferenceDefinitions<TPreferenceIds>): CompositeUserPreferences<TPreferenceIds>;
8
- getUpdatedUserPreferenceStorageObject(preferenceId: TPreferenceIds, isOptedIn: boolean, currentScope: UserPreferenceScope, currentPreferences: UserPreferences<TPreferenceIds>, allowedScope: UserPreferenceScopeType): UserPreferences<TPreferenceIds>;
1
+ import { UserPreferenceScopeType, type UserPreferenceDefinitions } from '../../../../../../../../../src/services/user-preferences/models/definitions';
2
+ import { type UserPreferenceScope } from '../../../../../../../../../src/services/user-preferences/models/storage-models';
3
+ import { type UserPreferencesPerScope } from '../models/definitions/user-preference-per-scope';
4
+ export declare class CompositeUserPreferencesService<T extends Record<string, unknown>> {
5
+ getScopedUserPreferences(userPreferencesPerScope: UserPreferencesPerScope<T>, currentScope: UserPreferenceScope, definitions: UserPreferenceDefinitions<T>): T;
6
+ getUpdatedUserPreferenceStorageObject<TKey extends keyof T>(userPreferenceKey: TKey, value: T[TKey], currentScope: UserPreferenceScope, currentPreferences: UserPreferencesPerScope<T>, allowedScope: UserPreferenceScopeType): UserPreferencesPerScope<T>;
9
7
  private createUserPreferenceEntryFromDefinition;
10
8
  private getEffectiveScope;
11
- private createPreferenceEntry;
12
- private createCompositePreferencesFromEntries;
13
9
  }
@@ -0,0 +1 @@
1
+ export * from './user-preferences-service';
@@ -1,3 +1,4 @@
1
1
  export * from './user-preference-definition';
2
2
  export * from './user-preference-definitions';
3
3
  export * from './user-preference-scope-type';
4
+ export * from './user-preference-per-scope';
@@ -1,5 +1,5 @@
1
1
  import { type UserPreferenceScopeType } from './user-preference-scope-type';
2
- export interface UserPreferenceDefinition {
3
- isOptedInByDefault: boolean;
2
+ export type UserPreferenceDefinition<T> = {
4
3
  allowedScope: UserPreferenceScopeType;
5
- }
4
+ defaultValue: T;
5
+ };
@@ -1,4 +1,4 @@
1
1
  import { type UserPreferenceDefinition } from './user-preference-definition';
2
- export type UserPreferenceDefinitions<UserPreferenceId extends PropertyKey> = {
3
- [Id in UserPreferenceId]?: UserPreferenceDefinition;
2
+ export type UserPreferenceDefinitions<T> = {
3
+ [P in keyof T]: UserPreferenceDefinition<T[P]>;
4
4
  };
@@ -0,0 +1,4 @@
1
+ import { type UserPreferenceScope } from '../storage-models';
2
+ export type UserPreferencesPerScope<T> = {
3
+ [K in UserPreferenceScope]?: T;
4
+ };
@@ -1,3 +1 @@
1
- export * from './user-preference';
2
1
  export * from './user-preference-scope';
3
- export * from './user-preferences';
@@ -0,0 +1,19 @@
1
+ import { type UserPreferenceScope } from '../../../../../../../../src/services/user-preferences/models/storage-models';
2
+ import { type CookieOptions } from '../../../../../../../../src/utils/Cookies';
3
+ import { type UserPreferenceDefinitions } from '../../../../../../../../src/components';
4
+ export declare class UserPreferencesService<T extends Record<string, unknown>> {
5
+ private readonly definitions;
6
+ private readonly currentScope;
7
+ private readonly cookieOptions;
8
+ private readonly onUpdate?;
9
+ private preferences;
10
+ private readonly compositeUserPreferencesService;
11
+ constructor(definitions: UserPreferenceDefinitions<T>, currentScope: UserPreferenceScope, cookieOptions: CookieOptions & {
12
+ key: string;
13
+ }, onUpdate?: ((resolvedPreferences: T) => void) | undefined);
14
+ getPreference<TKey extends keyof T, TValue extends T[TKey]>(key: TKey): Promise<TValue>;
15
+ setPreference<TKey extends keyof T, TValue extends T[TKey]>(key: TKey, value: TValue): Promise<void>;
16
+ init(): Promise<void>;
17
+ private getStoredPreferences;
18
+ private setStoredPreferences;
19
+ }
@@ -1,22 +1,26 @@
1
1
  import { type UserPreferenceScope } from '../../../../../../../../src/services/user-preferences/models/storage-models/user-preference-scope';
2
- import { type UserPreferences } from '../../../../../../../../src/services/user-preferences/models/storage-models/user-preferences';
3
- import { type UserPreferenceDefinitions } from '../../../../../../../../src/services/user-preferences/models/definitions/user-preference-definitions';
4
2
  import { UserPreferenceScopeType } from '../../../../../../../../src/services/user-preferences/models/definitions/user-preference-scope-type';
5
3
  import { type Sync } from 'factory.ts';
6
- export declare enum TestUserPreferenceId {
7
- Default = "default-id",
8
- PreferenceOne = "preference-one"
9
- }
4
+ import { type UserPreferenceDefinitions } from '../../../../../../../../src/components';
5
+ import { type UserPreferencesPerScope } from './models/definitions/user-preference-per-scope';
6
+ export type TestType = {
7
+ Default: {
8
+ isOptedIn: boolean;
9
+ };
10
+ PreferenceOne: {
11
+ isOptedIn: boolean;
12
+ };
13
+ };
10
14
  export declare function TestUserPreferenceDefinitionsFakeFactory(config?: Array<{
11
- id: TestUserPreferenceId;
15
+ id: string;
12
16
  isOptedInByDefault?: boolean;
13
17
  allowedScope?: UserPreferenceScopeType;
14
- }>): Sync.Builder<UserPreferenceDefinitions<TestUserPreferenceId>, keyof UserPreferenceDefinitions<TestUserPreferenceId>>;
18
+ }>): Sync.Builder<UserPreferenceDefinitions<TestType>, keyof UserPreferenceDefinitions<TestType>>;
15
19
  export interface TestUserPreferencesFakeBuilder {
16
20
  wantsRandom?: boolean;
17
21
  scope?: UserPreferenceScope;
18
- userPreferenceIds?: TestUserPreferenceId[];
19
- optedIns?: boolean[];
22
+ keys?: string[];
23
+ defaultValues?: any[];
20
24
  }
21
- export declare function makeBuilderFromDefinition(definitions: UserPreferenceDefinitions<TestUserPreferenceId>, scope?: UserPreferenceScope): TestUserPreferencesFakeBuilder;
22
- export declare function TestUserPreferencesFakeFactory(scopes?: TestUserPreferencesFakeBuilder[]): Sync.Builder<UserPreferences<TestUserPreferenceId>, keyof UserPreferences<TestUserPreferenceId>>;
25
+ export declare function makeBuilderFromDefinition(definitions: UserPreferenceDefinitions<TestType>, scope?: UserPreferenceScope): TestUserPreferencesFakeBuilder;
26
+ export declare function TestUserPreferencesFakeFactory(scopes?: TestUserPreferencesFakeBuilder[]): Sync.Builder<UserPreferencesPerScope<TestType>, keyof UserPreferencesPerScope<TestType>>;
@@ -7,4 +7,4 @@ export type IconOptions = RequireAtLeastOne<{
7
7
  default: IconVariant;
8
8
  deprecated?: string;
9
9
  }, IconVariant>;
10
- export type IconNames = 'account' | 'active' | 'add' | 'alicorn' | 'analytics' | 'annotation' | 'api' | 'audiences' | 'C360' | 'catalog' | 'chartColumn' | 'chartLine' | 'check' | 'circleNodes' | 'close' | 'cloud' | 'cohort' | 'connections' | 'conversion' | 'copy' | 'dashboard' | 'database' | 'dataPlatform' | 'delete' | 'directory' | 'dragAndDrop' | 'dropdownClose' | 'dropdownOpen' | 'dsr' | 'edit' | 'empty' | 'enrichment' | 'event' | 'eventAttribute' | 'favorite' | 'filter' | 'fitToScreen' | 'folderClosed' | 'forwarding' | 'fullScreen' | 'funnel' | 'gear' | 'grid' | 'heart' | 'help' | 'helpVideo' | 'identity' | 'info' | 'insights' | 'journeyAnalysis' | 'journeys' | 'jumpTo' | 'lightBulb' | 'link' | 'liveStream' | 'lock' | 'logout' | 'messageQuestion' | 'moreActions' | 'mpLogo' | 'myHub' | 'next' | 'notification' | 'observability' | 'openTab' | 'organization' | 'oversight' | 'overview' | 'paywall' | 'pipelines' | 'placeholder' | 'predictions' | 'premium' | 'premiumDt' | 'previous' | 'privacy' | 'privileges' | 'refreshFrequency' | 'remove' | 'savedProjects' | 'scheduledReport' | 'search' | 'segmentation' | 'segmentationAnalysis' | 'selected' | 'settings' | 'setup' | 'shieldKeyhole' | 'signout' | 'siteMap' | 'sparkles' | 'split' | 'support' | 'systemAlerts' | 'textWidget' | 'transformation' | 'trends' | 'unlock' | 'upload' | 'userAttribute' | 'userProfiles' | 'users' | 'wrench' | 'zoomIn' | 'zoomOut';
10
+ export type IconNames = 'abSplit' | 'account' | 'active' | 'add' | 'alicorn' | 'analytics' | 'annotation' | 'api' | 'audiences' | 'C360' | 'catalog' | 'chartColumn' | 'chartLine' | 'check' | 'circleNodes' | 'close' | 'cloud' | 'cohort' | 'connections' | 'conversion' | 'copy' | 'dashboard' | 'database' | 'dataPlatform' | 'delete' | 'directory' | 'dragAndDrop' | 'dropdownClose' | 'dropdownOpen' | 'dsr' | 'edit' | 'empty' | 'enrichment' | 'event' | 'eventAttribute' | 'favorite' | 'filter' | 'fitToScreen' | 'folderClosed' | 'forwarding' | 'fullScreen' | 'funnel' | 'gear' | 'grid' | 'heart' | 'help' | 'helpVideo' | 'identity' | 'info' | 'insights' | 'journeyAnalysis' | 'journeys' | 'jumpTo' | 'lightBulb' | 'link' | 'liveStream' | 'lock' | 'logout' | 'messageQuestion' | 'moreActions' | 'mpLogo' | 'myHub' | 'next' | 'notification' | 'notificationSubscriptions' | 'notificationSubscribe' | 'observability' | 'openTab' | 'organization' | 'oversight' | 'overview' | 'paywall' | 'pipelines' | 'placeholder' | 'predictions' | 'premium' | 'premiumDt' | 'previous' | 'privacy' | 'privileges' | 'refreshFrequency' | 'remove' | 'savedProjects' | 'scheduledReport' | 'search' | 'segmentation' | 'segmentationAnalysis' | 'selected' | 'settings' | 'setup' | 'shieldKeyhole' | 'signout' | 'siteMap' | 'sparkles' | 'split' | 'support' | 'systemAlerts' | 'textWidget' | 'transformation' | 'trends' | 'unlock' | 'upload' | 'userAttribute' | 'userProfiles' | 'users' | 'wrench' | 'zoomIn' | 'zoomOut';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/aquarium",
3
- "version": "1.35.1-fix-typography.1",
3
+ "version": "1.36.0",
4
4
  "description": "mParticle Component Library",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -52,6 +52,7 @@
52
52
  "@types/multer": "1.4.12",
53
53
  "@typescript-eslint/eslint-plugin": "6.19.0",
54
54
  "@vitejs/plugin-react": "4.2.1",
55
+ "@vitest/coverage-v8": "1.3.1",
55
56
  "concurrently": "8.2.2",
56
57
  "cz-conventional-changelog": "3.3.0",
57
58
  "eslint": "8.56.0",
@@ -1,3 +0,0 @@
1
- export interface UserPreference {
2
- optedIn: boolean;
3
- }
@@ -1,7 +0,0 @@
1
- import { type UserPreferenceScope } from './user-preference-scope';
2
- import { type UserPreference } from './user-preference';
3
- export type UserPreferences<UserPreferenceId extends PropertyKey> = {
4
- [K in UserPreferenceScope]?: {
5
- [Id in UserPreferenceId]: UserPreference;
6
- };
7
- };
@@ -1,4 +0,0 @@
1
- import { type UserPreference } from '../storage-models/user-preference';
2
- export type CompositeUserPreferences<UserPreferenceId extends PropertyKey> = {
3
- [Id in UserPreferenceId]: UserPreference;
4
- };
@@ -1,21 +0,0 @@
1
- import { type CompositeUserPreferences } from '../../../../../../../../src/services/user-preferences/models/user-preferences/composite-user-preferences';
2
- import { type UserPreferenceScope } from '../../../../../../../../src/services/user-preferences/models/storage-models/user-preference-scope';
3
- import { type UserPreferenceDefinitions } from '../../../../../../../../src/services/user-preferences/models/definitions/user-preference-definitions';
4
- import { type CompositeUserPreferencesService } from '../../../../../../../../src/services/user-preferences/composite-user-preferences-service';
5
- import { type CookieOptions } from '../../../../../../../../src/utils/Cookies';
6
- export declare class UserPreferencesService<TUserPreferenceId extends PropertyKey> {
7
- private readonly definitions;
8
- private readonly compositeUserPreferencesService;
9
- private readonly currentScope;
10
- private readonly cookieOptions;
11
- private readonly onUpdate?;
12
- preferences: CompositeUserPreferences<TUserPreferenceId>;
13
- constructor(definitions: UserPreferenceDefinitions<TUserPreferenceId>, compositeUserPreferencesService: CompositeUserPreferencesService<TUserPreferenceId>, currentScope: UserPreferenceScope, cookieOptions: CookieOptions & {
14
- key: string;
15
- }, onUpdate?: ((resolvedPreferences: CompositeUserPreferences<TUserPreferenceId>) => void) | undefined);
16
- init(): Promise<void>;
17
- isOptedIn(userPreferenceId: TUserPreferenceId): Promise<boolean | undefined>;
18
- setPreference(userPreferenceId: TUserPreferenceId, isOptedIn: boolean): Promise<void>;
19
- private getStoredPreferences;
20
- private setStoredPreferences;
21
- }