@cakemail-org/ui-components-v2 2.2.22 → 2.2.24

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.
@@ -7,7 +7,9 @@ export default function getMuiTableCell(theme: Theme): {
7
7
  marginBottom: string;
8
8
  border: string;
9
9
  maxWidth: string;
10
- overflow: string;
10
+ "&:not(th)": {
11
+ overflow: string;
12
+ };
11
13
  ".cellContainer .MuiTypography-root, .cellContainer p": {
12
14
  maxWidth: string;
13
15
  overflow: string;
package/dist/cjs/index.js CHANGED
@@ -4286,10 +4286,12 @@ class Interpolator {
4286
4286
  clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
4287
4287
  clonedOptions.applyPostProcessor = false;
4288
4288
  delete clonedOptions.defaultValue;
4289
- const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);
4290
- if (keyEndIndex !== -1) {
4291
- formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);
4292
- match[1] = match[1].slice(0, keyEndIndex);
4289
+ let doReduce = false;
4290
+ if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
4291
+ const r = match[1].split(this.formatSeparator).map(elem => elem.trim());
4292
+ match[1] = r.shift();
4293
+ formatters = r;
4294
+ doReduce = true;
4293
4295
  }
4294
4296
  value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
4295
4297
  if (value && match[0] === str && !isString(value)) return value;
@@ -4298,7 +4300,7 @@ class Interpolator {
4298
4300
  this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
4299
4301
  value = '';
4300
4302
  }
4301
- if (formatters.length) {
4303
+ if (doReduce) {
4302
4304
  value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
4303
4305
  ...options,
4304
4306
  interpolationkey: match[1].trim()
@@ -4820,13 +4822,9 @@ class I18n extends EventEmitter {
4820
4822
  prepend: this.options.pluralSeparator,
4821
4823
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
4822
4824
  });
4823
- const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;
4824
- if (usingLegacyFormatFunction) {
4825
- this.logger.warn(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);
4826
- }
4827
4825
  if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
4828
4826
  s.formatter = createClassOnDemand(formatter);
4829
- if (s.formatter.init) s.formatter.init(s, this.options);
4827
+ s.formatter.init(s, this.options);
4830
4828
  this.options.interpolation.format = s.formatter.format.bind(s.formatter);
4831
4829
  }
4832
4830
  s.interpolator = new Interpolator(this.options);
@@ -5141,16 +5139,8 @@ class I18n extends EventEmitter {
5141
5139
  dir(lng) {
5142
5140
  if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
5143
5141
  if (!lng) return 'rtl';
5144
- if (Intl.Locale) {
5145
- const l = new Intl.Locale(lng);
5146
- if (l && l.getTextInfo) {
5147
- const ti = l.getTextInfo();
5148
- if (ti && ti.direction) return ti.direction;
5149
- }
5150
- }
5151
5142
  const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
5152
5143
  const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
5153
- if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
5154
5144
  return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
5155
5145
  }
5156
5146
  static createInstance(options = {}, callback) {
@@ -5321,6 +5311,8 @@ exports.EEvents = void 0;
5321
5311
  EEvents["ACCOUNT_CONVERTED_ORGANIZATION"] = "Account.Converted.Organization";
5322
5312
  EEvents["ACCOUNT_CONVERT_PARTNER_REQUESTED"] = "Account.Convert.Partner.Requested";
5323
5313
  EEvents["ACCOUNT_SETUP_FORM"] = "Account.Setup.Form";
5314
+ EEvents["ACCOUNT_DELETED"] = "Account.Deleted";
5315
+ EEvents["ACCOUNT_UNSUSPENDED"] = "Account.Unsuspended";
5324
5316
  EEvents["ONBOARDING_COMPLETED"] = "Onboarding.Completed";
5325
5317
  EEvents["PLAN_DOWNGRADE_INITIATED"] = "Plan.Downgrade.Initiated";
5326
5318
  EEvents["PLAN_DOWNGRADE_CANCELLED"] = "Plan.Downgrade.Cancelled";
@@ -7021,7 +7013,9 @@ function getMuiTableCell(theme) {
7021
7013
  marginBottom: theme.spacing(5),
7022
7014
  border: "none",
7023
7015
  maxWidth: "25rem !important",
7024
- overflow: "hidden",
7016
+ "&:not(th)": {
7017
+ overflow: "hidden",
7018
+ },
7025
7019
  ".cellContainer .MuiTypography-root, .cellContainer p": {
7026
7020
  maxWidth: "23rem !important",
7027
7021
  overflow: "hidden",
@@ -9651,6 +9645,33 @@ function logOutService() {
9651
9645
  }
9652
9646
  });
9653
9647
  }
9648
+ function deleteAccount(_a) {
9649
+ var id = _a.id;
9650
+ return callApi({
9651
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id,
9652
+ fetchOptions: {
9653
+ method: exports.EMethods.delete
9654
+ }
9655
+ });
9656
+ }
9657
+ function suspendAccount(_a) {
9658
+ var id = _a.id;
9659
+ return callApi({
9660
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/suspend",
9661
+ fetchOptions: {
9662
+ method: exports.EMethods.post
9663
+ }
9664
+ });
9665
+ }
9666
+ function unSuspendAccount(_a) {
9667
+ var id = _a.id;
9668
+ return callApi({
9669
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/unsuspend",
9670
+ fetchOptions: {
9671
+ method: exports.EMethods.post
9672
+ }
9673
+ });
9674
+ }
9654
9675
 
9655
9676
  function getDomainsService(_a) {
9656
9677
  var id = _a.id;
@@ -9795,6 +9816,45 @@ var AccountModel = /** @class */ (function () {
9795
9816
  });
9796
9817
  });
9797
9818
  };
9819
+ AccountModel.prototype.delete = function () {
9820
+ return __awaiter(this, void 0, void 0, function () {
9821
+ return __generator(this, function (_a) {
9822
+ if (!this.id) {
9823
+ throw new Error("Account was not initialized");
9824
+ }
9825
+ trackEvent(exports.EEvents.ACCOUNT_DELETED, { id: this.id, lineage: this.lineage, name: this.name });
9826
+ return [2 /*return*/, deleteAccount({ id: this.id }).then(function (data) {
9827
+ return data.data;
9828
+ })];
9829
+ });
9830
+ });
9831
+ };
9832
+ AccountModel.prototype.suspend = function () {
9833
+ return __awaiter(this, void 0, void 0, function () {
9834
+ return __generator(this, function (_a) {
9835
+ if (!this.id) {
9836
+ throw new Error("Account was not initialized");
9837
+ }
9838
+ trackEvent(exports.EEvents.ACCOUNT_SUSPENDED, { id: this.id, lineage: this.lineage, name: this.name });
9839
+ return [2 /*return*/, suspendAccount({ id: this.id }).then(function (data) {
9840
+ return new AccountModel(data.data);
9841
+ })];
9842
+ });
9843
+ });
9844
+ };
9845
+ AccountModel.prototype.unsuspend = function () {
9846
+ return __awaiter(this, void 0, void 0, function () {
9847
+ return __generator(this, function (_a) {
9848
+ if (!this.id) {
9849
+ throw new Error("Account was not initialized");
9850
+ }
9851
+ trackEvent(exports.EEvents.ACCOUNT_UNSUSPENDED, { id: this.id, lineage: this.lineage, name: this.name });
9852
+ return [2 /*return*/, unSuspendAccount({ id: this.id }).then(function (data) {
9853
+ return new AccountModel(data.data);
9854
+ })];
9855
+ });
9856
+ });
9857
+ };
9798
9858
  AccountModel.prototype.isPartnerOrOrganization = function () {
9799
9859
  return this.partner || this.organization;
9800
9860
  };
@@ -14289,7 +14349,7 @@ var propTypesExports = propTypes.exports;
14289
14349
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
14290
14350
 
14291
14351
  /**
14292
- * @mui/styled-engine v7.2.0
14352
+ * @mui/styled-engine v7.1.1
14293
14353
  *
14294
14354
  * @license MIT
14295
14355
  * This source code is licensed under the MIT license found in the
@@ -15831,8 +15891,7 @@ function unstable_createStyleFunctionSx() {
15831
15891
  function styleFunctionSx(props) {
15832
15892
  const {
15833
15893
  sx,
15834
- theme = {},
15835
- nested
15894
+ theme = {}
15836
15895
  } = props || {};
15837
15896
  if (!sx) {
15838
15897
  return null; // Emotion & styled-components will neglect null
@@ -15873,8 +15932,7 @@ function unstable_createStyleFunctionSx() {
15873
15932
  if (objectsHaveSameKeys(breakpointsValues, value)) {
15874
15933
  css[styleKey] = styleFunctionSx({
15875
15934
  sx: value,
15876
- theme,
15877
- nested: true
15935
+ theme
15878
15936
  });
15879
15937
  } else {
15880
15938
  css = merge(css, breakpointsValues);
@@ -15885,11 +15943,6 @@ function unstable_createStyleFunctionSx() {
15885
15943
  }
15886
15944
  }
15887
15945
  });
15888
- if (!nested && theme.modularCssLayers) {
15889
- return {
15890
- '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
15891
- };
15892
- }
15893
15946
  return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
15894
15947
  }
15895
15948
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
@@ -16202,13 +16255,6 @@ const systemDefaultTheme = createTheme();
16202
16255
  function shouldForwardProp(prop) {
16203
16256
  return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
16204
16257
  }
16205
- function shallowLayer(serialized, layerName) {
16206
- if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.
16207
- ) {
16208
- serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
16209
- }
16210
- return serialized;
16211
- }
16212
16258
  function defaultOverridesResolver(slot) {
16213
16259
  if (!slot) {
16214
16260
  return null;
@@ -16218,7 +16264,7 @@ function defaultOverridesResolver(slot) {
16218
16264
  function attachTheme(props, themeId, defaultTheme) {
16219
16265
  props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;
16220
16266
  }
16221
- function processStyle(props, style, layerName) {
16267
+ function processStyle(props, style) {
16222
16268
  /*
16223
16269
  * Style types:
16224
16270
  * - null/undefined
@@ -16230,27 +16276,27 @@ function processStyle(props, style, layerName) {
16230
16276
 
16231
16277
  const resolvedStyle = typeof style === 'function' ? style(props) : style;
16232
16278
  if (Array.isArray(resolvedStyle)) {
16233
- return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));
16279
+ return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle));
16234
16280
  }
16235
16281
  if (Array.isArray(resolvedStyle?.variants)) {
16236
16282
  let rootStyle;
16237
16283
  if (resolvedStyle.isProcessed) {
16238
- rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;
16284
+ rootStyle = resolvedStyle.style;
16239
16285
  } else {
16240
16286
  const {
16241
16287
  variants,
16242
16288
  ...otherStyles
16243
16289
  } = resolvedStyle;
16244
- rootStyle = layerName ? shallowLayer(internal_serializeStyles(otherStyles), layerName) : otherStyles;
16290
+ rootStyle = otherStyles;
16245
16291
  }
16246
- return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);
16292
+ return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);
16247
16293
  }
16248
16294
  if (resolvedStyle?.isProcessed) {
16249
- return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;
16295
+ return resolvedStyle.style;
16250
16296
  }
16251
- return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle), layerName) : resolvedStyle;
16297
+ return resolvedStyle;
16252
16298
  }
16253
- function processStyleVariants(props, variants, results = [], layerName = undefined) {
16299
+ function processStyleVariants(props, variants, results = []) {
16254
16300
  let mergedState; // We might not need it, initialized lazily
16255
16301
 
16256
16302
  variantLoop: for (let i = 0; i < variants.length; i += 1) {
@@ -16277,9 +16323,9 @@ function processStyleVariants(props, variants, results = [], layerName = undefin
16277
16323
  ...props.ownerState,
16278
16324
  ownerState: props.ownerState
16279
16325
  };
16280
- results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));
16326
+ results.push(variant.style(mergedState));
16281
16327
  } else {
16282
- results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style), layerName) : variant.style);
16328
+ results.push(variant.style);
16283
16329
  }
16284
16330
  }
16285
16331
  return results;
@@ -16308,7 +16354,6 @@ function createStyled(input = {}) {
16308
16354
  overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
16309
16355
  ...options
16310
16356
  } = inputOptions;
16311
- const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';
16312
16357
 
16313
16358
  // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
16314
16359
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
@@ -16345,16 +16390,16 @@ function createStyled(input = {}) {
16345
16390
  }
16346
16391
  if (typeof style === 'function') {
16347
16392
  return function styleFunctionProcessor(props) {
16348
- return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);
16393
+ return processStyle(props, style);
16349
16394
  };
16350
16395
  }
16351
16396
  if (isPlainObject(style)) {
16352
16397
  const serialized = preprocessStyles(style);
16398
+ if (!serialized.variants) {
16399
+ return serialized.style;
16400
+ }
16353
16401
  return function styleObjectProcessor(props) {
16354
- if (!serialized.variants) {
16355
- return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;
16356
- }
16357
- return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);
16402
+ return processStyle(props, serialized);
16358
16403
  };
16359
16404
  }
16360
16405
  return style;
@@ -16379,7 +16424,7 @@ function createStyled(input = {}) {
16379
16424
  // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
16380
16425
  // eslint-disable-next-line guard-for-in
16381
16426
  for (const slotKey in styleOverrides) {
16382
- resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);
16427
+ resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
16383
16428
  }
16384
16429
  return overridesResolver(props, resolvedStyleOverrides);
16385
16430
  });
@@ -16391,7 +16436,7 @@ function createStyled(input = {}) {
16391
16436
  if (!themeVariants) {
16392
16437
  return null;
16393
16438
  }
16394
- return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);
16439
+ return processStyleVariants(props, themeVariants);
16395
16440
  });
16396
16441
  }
16397
16442
  if (!skipSx) {
@@ -16480,12 +16525,9 @@ const styled = createStyled();
16480
16525
  * Add keys, values of `defaultProps` that does not exist in `props`
16481
16526
  * @param defaultProps
16482
16527
  * @param props
16483
- * @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.
16484
- * When `false` (default), props override defaultProps. When `true`, `className` values are concatenated
16485
- * and `style` objects are merged with props taking precedence.
16486
16528
  * @returns resolved props
16487
16529
  */
16488
- function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
16530
+ function resolveProps(defaultProps, props) {
16489
16531
  const output = {
16490
16532
  ...props
16491
16533
  };
@@ -16511,17 +16553,10 @@ function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
16511
16553
  for (const slotKey in defaultSlotProps) {
16512
16554
  if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
16513
16555
  const slotPropName = slotKey;
16514
- output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName], mergeClassNameAndStyle);
16556
+ output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
16515
16557
  }
16516
16558
  }
16517
16559
  }
16518
- } else if (propName === 'className' && mergeClassNameAndStyle && props.className) {
16519
- output.className = clsx(defaultProps?.className, props?.className);
16520
- } else if (propName === 'style' && mergeClassNameAndStyle && props.style) {
16521
- output.style = {
16522
- ...defaultProps?.style,
16523
- ...props?.style
16524
- };
16525
16560
  } else if (output[propName] === undefined) {
16526
16561
  output[propName] = defaultProps[propName];
16527
16562
  }
@@ -19461,6 +19496,7 @@ exports.createPopup = createPopup;
19461
19496
  exports.createSuppressedEmailExport = createSuppressedEmailExport;
19462
19497
  exports.createTemplate = createTemplate;
19463
19498
  exports.deepMergeObject = deepMergeObject;
19499
+ exports.deleteAccount = deleteAccount;
19464
19500
  exports.deleteAnyAutomation = deleteAnyAutomation;
19465
19501
  exports.deleteAutomation = deleteAutomation;
19466
19502
  exports.deleteCampaign = deleteCampaign;
@@ -19621,6 +19657,7 @@ exports.splitArray = splitArray;
19621
19657
  exports.splitObject = splitObject;
19622
19658
  exports.stableSort = stableSort;
19623
19659
  exports.startPromisePool = startPromisePool;
19660
+ exports.suspendAccount = suspendAccount;
19624
19661
  exports.suspendCampaign = suspendCampaign;
19625
19662
  exports.trackEvent = trackEvent;
19626
19663
  exports.truncateEmail = truncateEmail;
@@ -19628,6 +19665,7 @@ exports.truncateText = truncateText;
19628
19665
  exports.uiKitConfig = uiKitConfig;
19629
19666
  exports.unArchiveCampaign = unArchiveCampaign;
19630
19667
  exports.unScheduleCampaign = unScheduleCampaign;
19668
+ exports.unSuspendAccount = unSuspendAccount;
19631
19669
  exports.unshareTemplate = unshareTemplate;
19632
19670
  exports.updateAccount = updateAccount;
19633
19671
  exports.updateAndClearUrlParams = updateAndClearUrlParams;
@@ -1,5 +1,5 @@
1
1
  import { TBrand } from "../../factories";
2
- import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TGetAccountReport } from "./types";
2
+ import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TDeleteAccountResponse, TGetAccountReport } from "./types";
3
3
  export declare class AccountModel {
4
4
  readonly id: number;
5
5
  readonly lineage: string;
@@ -36,6 +36,9 @@ export declare class AccountModel {
36
36
  warning: any;
37
37
  }>;
38
38
  logOut(): Promise<any>;
39
+ delete(): Promise<TDeleteAccountResponse>;
40
+ suspend(): Promise<AccountModel>;
41
+ unsuspend(): Promise<AccountModel>;
39
42
  isPartnerOrOrganization(): boolean;
40
43
  hasAccessTo({ feature, partnerBrand, userCount }: {
41
44
  feature: keyof TAccountLimits;
@@ -111,3 +111,8 @@ export type TAccountDomains = {
111
111
  export type TAccountOwner = {
112
112
  user_id: number;
113
113
  };
114
+ export type TDeleteAccountResponse = {
115
+ id: string;
116
+ object: string;
117
+ deleted: boolean;
118
+ };
@@ -19,4 +19,13 @@ export declare function impersonateService({ id, byContext }: {
19
19
  byContext?: boolean;
20
20
  }): Promise<any>;
21
21
  export declare function logOutService(): Promise<any>;
22
+ export declare function deleteAccount({ id }: {
23
+ id: TNumStr;
24
+ }): Promise<any>;
25
+ export declare function suspendAccount({ id }: {
26
+ id: TNumStr;
27
+ }): Promise<any>;
28
+ export declare function unSuspendAccount({ id }: {
29
+ id: TNumStr;
30
+ }): Promise<any>;
22
31
  export * from "./types";
@@ -21,6 +21,8 @@ export declare enum EEvents {
21
21
  ACCOUNT_CONVERTED_ORGANIZATION = "Account.Converted.Organization",
22
22
  ACCOUNT_CONVERT_PARTNER_REQUESTED = "Account.Convert.Partner.Requested",
23
23
  ACCOUNT_SETUP_FORM = "Account.Setup.Form",
24
+ ACCOUNT_DELETED = "Account.Deleted",
25
+ ACCOUNT_UNSUSPENDED = "Account.Unsuspended",
24
26
  ONBOARDING_COMPLETED = "Onboarding.Completed",
25
27
  PLAN_DOWNGRADE_INITIATED = "Plan.Downgrade.Initiated",
26
28
  PLAN_DOWNGRADE_CANCELLED = "Plan.Downgrade.Cancelled",
@@ -7,7 +7,9 @@ export default function getMuiTableCell(theme: Theme): {
7
7
  marginBottom: string;
8
8
  border: string;
9
9
  maxWidth: string;
10
- overflow: string;
10
+ "&:not(th)": {
11
+ overflow: string;
12
+ };
11
13
  ".cellContainer .MuiTypography-root, .cellContainer p": {
12
14
  maxWidth: string;
13
15
  overflow: string;
package/dist/esm/index.js CHANGED
@@ -4266,10 +4266,12 @@ class Interpolator {
4266
4266
  clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
4267
4267
  clonedOptions.applyPostProcessor = false;
4268
4268
  delete clonedOptions.defaultValue;
4269
- const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);
4270
- if (keyEndIndex !== -1) {
4271
- formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);
4272
- match[1] = match[1].slice(0, keyEndIndex);
4269
+ let doReduce = false;
4270
+ if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
4271
+ const r = match[1].split(this.formatSeparator).map(elem => elem.trim());
4272
+ match[1] = r.shift();
4273
+ formatters = r;
4274
+ doReduce = true;
4273
4275
  }
4274
4276
  value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
4275
4277
  if (value && match[0] === str && !isString(value)) return value;
@@ -4278,7 +4280,7 @@ class Interpolator {
4278
4280
  this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
4279
4281
  value = '';
4280
4282
  }
4281
- if (formatters.length) {
4283
+ if (doReduce) {
4282
4284
  value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
4283
4285
  ...options,
4284
4286
  interpolationkey: match[1].trim()
@@ -4800,13 +4802,9 @@ class I18n extends EventEmitter {
4800
4802
  prepend: this.options.pluralSeparator,
4801
4803
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
4802
4804
  });
4803
- const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;
4804
- if (usingLegacyFormatFunction) {
4805
- this.logger.warn(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);
4806
- }
4807
4805
  if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
4808
4806
  s.formatter = createClassOnDemand(formatter);
4809
- if (s.formatter.init) s.formatter.init(s, this.options);
4807
+ s.formatter.init(s, this.options);
4810
4808
  this.options.interpolation.format = s.formatter.format.bind(s.formatter);
4811
4809
  }
4812
4810
  s.interpolator = new Interpolator(this.options);
@@ -5121,16 +5119,8 @@ class I18n extends EventEmitter {
5121
5119
  dir(lng) {
5122
5120
  if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
5123
5121
  if (!lng) return 'rtl';
5124
- if (Intl.Locale) {
5125
- const l = new Intl.Locale(lng);
5126
- if (l && l.getTextInfo) {
5127
- const ti = l.getTextInfo();
5128
- if (ti && ti.direction) return ti.direction;
5129
- }
5130
- }
5131
5122
  const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
5132
5123
  const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
5133
- if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
5134
5124
  return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
5135
5125
  }
5136
5126
  static createInstance(options = {}, callback) {
@@ -5301,6 +5291,8 @@ var EEvents;
5301
5291
  EEvents["ACCOUNT_CONVERTED_ORGANIZATION"] = "Account.Converted.Organization";
5302
5292
  EEvents["ACCOUNT_CONVERT_PARTNER_REQUESTED"] = "Account.Convert.Partner.Requested";
5303
5293
  EEvents["ACCOUNT_SETUP_FORM"] = "Account.Setup.Form";
5294
+ EEvents["ACCOUNT_DELETED"] = "Account.Deleted";
5295
+ EEvents["ACCOUNT_UNSUSPENDED"] = "Account.Unsuspended";
5304
5296
  EEvents["ONBOARDING_COMPLETED"] = "Onboarding.Completed";
5305
5297
  EEvents["PLAN_DOWNGRADE_INITIATED"] = "Plan.Downgrade.Initiated";
5306
5298
  EEvents["PLAN_DOWNGRADE_CANCELLED"] = "Plan.Downgrade.Cancelled";
@@ -7001,7 +6993,9 @@ function getMuiTableCell(theme) {
7001
6993
  marginBottom: theme.spacing(5),
7002
6994
  border: "none",
7003
6995
  maxWidth: "25rem !important",
7004
- overflow: "hidden",
6996
+ "&:not(th)": {
6997
+ overflow: "hidden",
6998
+ },
7005
6999
  ".cellContainer .MuiTypography-root, .cellContainer p": {
7006
7000
  maxWidth: "23rem !important",
7007
7001
  overflow: "hidden",
@@ -9631,6 +9625,33 @@ function logOutService() {
9631
9625
  }
9632
9626
  });
9633
9627
  }
9628
+ function deleteAccount(_a) {
9629
+ var id = _a.id;
9630
+ return callApi({
9631
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id,
9632
+ fetchOptions: {
9633
+ method: EMethods.delete
9634
+ }
9635
+ });
9636
+ }
9637
+ function suspendAccount(_a) {
9638
+ var id = _a.id;
9639
+ return callApi({
9640
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/suspend",
9641
+ fetchOptions: {
9642
+ method: EMethods.post
9643
+ }
9644
+ });
9645
+ }
9646
+ function unSuspendAccount(_a) {
9647
+ var id = _a.id;
9648
+ return callApi({
9649
+ url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/unsuspend",
9650
+ fetchOptions: {
9651
+ method: EMethods.post
9652
+ }
9653
+ });
9654
+ }
9634
9655
 
9635
9656
  function getDomainsService(_a) {
9636
9657
  var id = _a.id;
@@ -9775,6 +9796,45 @@ var AccountModel = /** @class */ (function () {
9775
9796
  });
9776
9797
  });
9777
9798
  };
9799
+ AccountModel.prototype.delete = function () {
9800
+ return __awaiter(this, void 0, void 0, function () {
9801
+ return __generator(this, function (_a) {
9802
+ if (!this.id) {
9803
+ throw new Error("Account was not initialized");
9804
+ }
9805
+ trackEvent(EEvents.ACCOUNT_DELETED, { id: this.id, lineage: this.lineage, name: this.name });
9806
+ return [2 /*return*/, deleteAccount({ id: this.id }).then(function (data) {
9807
+ return data.data;
9808
+ })];
9809
+ });
9810
+ });
9811
+ };
9812
+ AccountModel.prototype.suspend = function () {
9813
+ return __awaiter(this, void 0, void 0, function () {
9814
+ return __generator(this, function (_a) {
9815
+ if (!this.id) {
9816
+ throw new Error("Account was not initialized");
9817
+ }
9818
+ trackEvent(EEvents.ACCOUNT_SUSPENDED, { id: this.id, lineage: this.lineage, name: this.name });
9819
+ return [2 /*return*/, suspendAccount({ id: this.id }).then(function (data) {
9820
+ return new AccountModel(data.data);
9821
+ })];
9822
+ });
9823
+ });
9824
+ };
9825
+ AccountModel.prototype.unsuspend = function () {
9826
+ return __awaiter(this, void 0, void 0, function () {
9827
+ return __generator(this, function (_a) {
9828
+ if (!this.id) {
9829
+ throw new Error("Account was not initialized");
9830
+ }
9831
+ trackEvent(EEvents.ACCOUNT_UNSUSPENDED, { id: this.id, lineage: this.lineage, name: this.name });
9832
+ return [2 /*return*/, unSuspendAccount({ id: this.id }).then(function (data) {
9833
+ return new AccountModel(data.data);
9834
+ })];
9835
+ });
9836
+ });
9837
+ };
9778
9838
  AccountModel.prototype.isPartnerOrOrganization = function () {
9779
9839
  return this.partner || this.organization;
9780
9840
  };
@@ -14269,7 +14329,7 @@ var propTypesExports = propTypes.exports;
14269
14329
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
14270
14330
 
14271
14331
  /**
14272
- * @mui/styled-engine v7.2.0
14332
+ * @mui/styled-engine v7.1.1
14273
14333
  *
14274
14334
  * @license MIT
14275
14335
  * This source code is licensed under the MIT license found in the
@@ -15811,8 +15871,7 @@ function unstable_createStyleFunctionSx() {
15811
15871
  function styleFunctionSx(props) {
15812
15872
  const {
15813
15873
  sx,
15814
- theme = {},
15815
- nested
15874
+ theme = {}
15816
15875
  } = props || {};
15817
15876
  if (!sx) {
15818
15877
  return null; // Emotion & styled-components will neglect null
@@ -15853,8 +15912,7 @@ function unstable_createStyleFunctionSx() {
15853
15912
  if (objectsHaveSameKeys(breakpointsValues, value)) {
15854
15913
  css[styleKey] = styleFunctionSx({
15855
15914
  sx: value,
15856
- theme,
15857
- nested: true
15915
+ theme
15858
15916
  });
15859
15917
  } else {
15860
15918
  css = merge(css, breakpointsValues);
@@ -15865,11 +15923,6 @@ function unstable_createStyleFunctionSx() {
15865
15923
  }
15866
15924
  }
15867
15925
  });
15868
- if (!nested && theme.modularCssLayers) {
15869
- return {
15870
- '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
15871
- };
15872
- }
15873
15926
  return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
15874
15927
  }
15875
15928
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
@@ -16182,13 +16235,6 @@ const systemDefaultTheme = createTheme();
16182
16235
  function shouldForwardProp(prop) {
16183
16236
  return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
16184
16237
  }
16185
- function shallowLayer(serialized, layerName) {
16186
- if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.
16187
- ) {
16188
- serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
16189
- }
16190
- return serialized;
16191
- }
16192
16238
  function defaultOverridesResolver(slot) {
16193
16239
  if (!slot) {
16194
16240
  return null;
@@ -16198,7 +16244,7 @@ function defaultOverridesResolver(slot) {
16198
16244
  function attachTheme(props, themeId, defaultTheme) {
16199
16245
  props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;
16200
16246
  }
16201
- function processStyle(props, style, layerName) {
16247
+ function processStyle(props, style) {
16202
16248
  /*
16203
16249
  * Style types:
16204
16250
  * - null/undefined
@@ -16210,27 +16256,27 @@ function processStyle(props, style, layerName) {
16210
16256
 
16211
16257
  const resolvedStyle = typeof style === 'function' ? style(props) : style;
16212
16258
  if (Array.isArray(resolvedStyle)) {
16213
- return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));
16259
+ return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle));
16214
16260
  }
16215
16261
  if (Array.isArray(resolvedStyle?.variants)) {
16216
16262
  let rootStyle;
16217
16263
  if (resolvedStyle.isProcessed) {
16218
- rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;
16264
+ rootStyle = resolvedStyle.style;
16219
16265
  } else {
16220
16266
  const {
16221
16267
  variants,
16222
16268
  ...otherStyles
16223
16269
  } = resolvedStyle;
16224
- rootStyle = layerName ? shallowLayer(internal_serializeStyles(otherStyles), layerName) : otherStyles;
16270
+ rootStyle = otherStyles;
16225
16271
  }
16226
- return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);
16272
+ return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);
16227
16273
  }
16228
16274
  if (resolvedStyle?.isProcessed) {
16229
- return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;
16275
+ return resolvedStyle.style;
16230
16276
  }
16231
- return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle), layerName) : resolvedStyle;
16277
+ return resolvedStyle;
16232
16278
  }
16233
- function processStyleVariants(props, variants, results = [], layerName = undefined) {
16279
+ function processStyleVariants(props, variants, results = []) {
16234
16280
  let mergedState; // We might not need it, initialized lazily
16235
16281
 
16236
16282
  variantLoop: for (let i = 0; i < variants.length; i += 1) {
@@ -16257,9 +16303,9 @@ function processStyleVariants(props, variants, results = [], layerName = undefin
16257
16303
  ...props.ownerState,
16258
16304
  ownerState: props.ownerState
16259
16305
  };
16260
- results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));
16306
+ results.push(variant.style(mergedState));
16261
16307
  } else {
16262
- results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style), layerName) : variant.style);
16308
+ results.push(variant.style);
16263
16309
  }
16264
16310
  }
16265
16311
  return results;
@@ -16288,7 +16334,6 @@ function createStyled(input = {}) {
16288
16334
  overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
16289
16335
  ...options
16290
16336
  } = inputOptions;
16291
- const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';
16292
16337
 
16293
16338
  // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
16294
16339
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
@@ -16325,16 +16370,16 @@ function createStyled(input = {}) {
16325
16370
  }
16326
16371
  if (typeof style === 'function') {
16327
16372
  return function styleFunctionProcessor(props) {
16328
- return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);
16373
+ return processStyle(props, style);
16329
16374
  };
16330
16375
  }
16331
16376
  if (isPlainObject(style)) {
16332
16377
  const serialized = preprocessStyles(style);
16378
+ if (!serialized.variants) {
16379
+ return serialized.style;
16380
+ }
16333
16381
  return function styleObjectProcessor(props) {
16334
- if (!serialized.variants) {
16335
- return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;
16336
- }
16337
- return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);
16382
+ return processStyle(props, serialized);
16338
16383
  };
16339
16384
  }
16340
16385
  return style;
@@ -16359,7 +16404,7 @@ function createStyled(input = {}) {
16359
16404
  // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
16360
16405
  // eslint-disable-next-line guard-for-in
16361
16406
  for (const slotKey in styleOverrides) {
16362
- resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);
16407
+ resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
16363
16408
  }
16364
16409
  return overridesResolver(props, resolvedStyleOverrides);
16365
16410
  });
@@ -16371,7 +16416,7 @@ function createStyled(input = {}) {
16371
16416
  if (!themeVariants) {
16372
16417
  return null;
16373
16418
  }
16374
- return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);
16419
+ return processStyleVariants(props, themeVariants);
16375
16420
  });
16376
16421
  }
16377
16422
  if (!skipSx) {
@@ -16460,12 +16505,9 @@ const styled = createStyled();
16460
16505
  * Add keys, values of `defaultProps` that does not exist in `props`
16461
16506
  * @param defaultProps
16462
16507
  * @param props
16463
- * @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.
16464
- * When `false` (default), props override defaultProps. When `true`, `className` values are concatenated
16465
- * and `style` objects are merged with props taking precedence.
16466
16508
  * @returns resolved props
16467
16509
  */
16468
- function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
16510
+ function resolveProps(defaultProps, props) {
16469
16511
  const output = {
16470
16512
  ...props
16471
16513
  };
@@ -16491,17 +16533,10 @@ function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
16491
16533
  for (const slotKey in defaultSlotProps) {
16492
16534
  if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
16493
16535
  const slotPropName = slotKey;
16494
- output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName], mergeClassNameAndStyle);
16536
+ output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
16495
16537
  }
16496
16538
  }
16497
16539
  }
16498
- } else if (propName === 'className' && mergeClassNameAndStyle && props.className) {
16499
- output.className = clsx(defaultProps?.className, props?.className);
16500
- } else if (propName === 'style' && mergeClassNameAndStyle && props.style) {
16501
- output.style = {
16502
- ...defaultProps?.style,
16503
- ...props?.style
16504
- };
16505
16540
  } else if (output[propName] === undefined) {
16506
16541
  output[propName] = defaultProps[propName];
16507
16542
  }
@@ -19300,4 +19335,4 @@ var UsersFactory = /** @class */ (function () {
19300
19335
  return UsersFactory;
19301
19336
  }());
19302
19337
 
19303
- export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
19338
+ export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
@@ -1,5 +1,5 @@
1
1
  import { TBrand } from "../../factories";
2
- import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TGetAccountReport } from "./types";
2
+ import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TDeleteAccountResponse, TGetAccountReport } from "./types";
3
3
  export declare class AccountModel {
4
4
  readonly id: number;
5
5
  readonly lineage: string;
@@ -36,6 +36,9 @@ export declare class AccountModel {
36
36
  warning: any;
37
37
  }>;
38
38
  logOut(): Promise<any>;
39
+ delete(): Promise<TDeleteAccountResponse>;
40
+ suspend(): Promise<AccountModel>;
41
+ unsuspend(): Promise<AccountModel>;
39
42
  isPartnerOrOrganization(): boolean;
40
43
  hasAccessTo({ feature, partnerBrand, userCount }: {
41
44
  feature: keyof TAccountLimits;
@@ -111,3 +111,8 @@ export type TAccountDomains = {
111
111
  export type TAccountOwner = {
112
112
  user_id: number;
113
113
  };
114
+ export type TDeleteAccountResponse = {
115
+ id: string;
116
+ object: string;
117
+ deleted: boolean;
118
+ };
@@ -19,4 +19,13 @@ export declare function impersonateService({ id, byContext }: {
19
19
  byContext?: boolean;
20
20
  }): Promise<any>;
21
21
  export declare function logOutService(): Promise<any>;
22
+ export declare function deleteAccount({ id }: {
23
+ id: TNumStr;
24
+ }): Promise<any>;
25
+ export declare function suspendAccount({ id }: {
26
+ id: TNumStr;
27
+ }): Promise<any>;
28
+ export declare function unSuspendAccount({ id }: {
29
+ id: TNumStr;
30
+ }): Promise<any>;
22
31
  export * from "./types";
@@ -21,6 +21,8 @@ export declare enum EEvents {
21
21
  ACCOUNT_CONVERTED_ORGANIZATION = "Account.Converted.Organization",
22
22
  ACCOUNT_CONVERT_PARTNER_REQUESTED = "Account.Convert.Partner.Requested",
23
23
  ACCOUNT_SETUP_FORM = "Account.Setup.Form",
24
+ ACCOUNT_DELETED = "Account.Deleted",
25
+ ACCOUNT_UNSUSPENDED = "Account.Unsuspended",
24
26
  ONBOARDING_COMPLETED = "Onboarding.Completed",
25
27
  PLAN_DOWNGRADE_INITIATED = "Plan.Downgrade.Initiated",
26
28
  PLAN_DOWNGRADE_CANCELLED = "Plan.Downgrade.Cancelled",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.2.22",
3
+ "version": "2.2.24",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",