@cakemail-org/ui-components-v2 2.2.23 → 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.
- package/dist/cjs/index.js +101 -65
- package/dist/cjs/models/account/index.d.ts +4 -1
- package/dist/cjs/models/account/types.d.ts +5 -0
- package/dist/cjs/services/accounts/index.d.ts +9 -0
- package/dist/cjs/utils/posthog.d.ts +2 -0
- package/dist/esm/index.js +99 -66
- package/dist/esm/models/account/index.d.ts +4 -1
- package/dist/esm/models/account/types.d.ts +5 -0
- package/dist/esm/services/accounts/index.d.ts +9 -0
- package/dist/esm/utils/posthog.d.ts +2 -0
- package/package.json +1 -1
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
|
-
|
|
4290
|
-
if (
|
|
4291
|
-
|
|
4292
|
-
match[1] =
|
|
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 (
|
|
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
|
-
|
|
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";
|
|
@@ -9653,6 +9645,33 @@ function logOutService() {
|
|
|
9653
9645
|
}
|
|
9654
9646
|
});
|
|
9655
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
|
+
}
|
|
9656
9675
|
|
|
9657
9676
|
function getDomainsService(_a) {
|
|
9658
9677
|
var id = _a.id;
|
|
@@ -9797,6 +9816,45 @@ var AccountModel = /** @class */ (function () {
|
|
|
9797
9816
|
});
|
|
9798
9817
|
});
|
|
9799
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
|
+
};
|
|
9800
9858
|
AccountModel.prototype.isPartnerOrOrganization = function () {
|
|
9801
9859
|
return this.partner || this.organization;
|
|
9802
9860
|
};
|
|
@@ -14291,7 +14349,7 @@ var propTypesExports = propTypes.exports;
|
|
|
14291
14349
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
14292
14350
|
|
|
14293
14351
|
/**
|
|
14294
|
-
* @mui/styled-engine v7.
|
|
14352
|
+
* @mui/styled-engine v7.1.1
|
|
14295
14353
|
*
|
|
14296
14354
|
* @license MIT
|
|
14297
14355
|
* This source code is licensed under the MIT license found in the
|
|
@@ -15833,8 +15891,7 @@ function unstable_createStyleFunctionSx() {
|
|
|
15833
15891
|
function styleFunctionSx(props) {
|
|
15834
15892
|
const {
|
|
15835
15893
|
sx,
|
|
15836
|
-
theme = {}
|
|
15837
|
-
nested
|
|
15894
|
+
theme = {}
|
|
15838
15895
|
} = props || {};
|
|
15839
15896
|
if (!sx) {
|
|
15840
15897
|
return null; // Emotion & styled-components will neglect null
|
|
@@ -15875,8 +15932,7 @@ function unstable_createStyleFunctionSx() {
|
|
|
15875
15932
|
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
15876
15933
|
css[styleKey] = styleFunctionSx({
|
|
15877
15934
|
sx: value,
|
|
15878
|
-
theme
|
|
15879
|
-
nested: true
|
|
15935
|
+
theme
|
|
15880
15936
|
});
|
|
15881
15937
|
} else {
|
|
15882
15938
|
css = merge(css, breakpointsValues);
|
|
@@ -15887,11 +15943,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
15887
15943
|
}
|
|
15888
15944
|
}
|
|
15889
15945
|
});
|
|
15890
|
-
if (!nested && theme.modularCssLayers) {
|
|
15891
|
-
return {
|
|
15892
|
-
'@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
|
|
15893
|
-
};
|
|
15894
|
-
}
|
|
15895
15946
|
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
|
|
15896
15947
|
}
|
|
15897
15948
|
return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
|
|
@@ -16204,13 +16255,6 @@ const systemDefaultTheme = createTheme();
|
|
|
16204
16255
|
function shouldForwardProp(prop) {
|
|
16205
16256
|
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
|
16206
16257
|
}
|
|
16207
|
-
function shallowLayer(serialized, layerName) {
|
|
16208
|
-
if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.
|
|
16209
|
-
) {
|
|
16210
|
-
serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
|
|
16211
|
-
}
|
|
16212
|
-
return serialized;
|
|
16213
|
-
}
|
|
16214
16258
|
function defaultOverridesResolver(slot) {
|
|
16215
16259
|
if (!slot) {
|
|
16216
16260
|
return null;
|
|
@@ -16220,7 +16264,7 @@ function defaultOverridesResolver(slot) {
|
|
|
16220
16264
|
function attachTheme(props, themeId, defaultTheme) {
|
|
16221
16265
|
props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;
|
|
16222
16266
|
}
|
|
16223
|
-
function processStyle(props, style
|
|
16267
|
+
function processStyle(props, style) {
|
|
16224
16268
|
/*
|
|
16225
16269
|
* Style types:
|
|
16226
16270
|
* - null/undefined
|
|
@@ -16232,27 +16276,27 @@ function processStyle(props, style, layerName) {
|
|
|
16232
16276
|
|
|
16233
16277
|
const resolvedStyle = typeof style === 'function' ? style(props) : style;
|
|
16234
16278
|
if (Array.isArray(resolvedStyle)) {
|
|
16235
|
-
return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle
|
|
16279
|
+
return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle));
|
|
16236
16280
|
}
|
|
16237
16281
|
if (Array.isArray(resolvedStyle?.variants)) {
|
|
16238
16282
|
let rootStyle;
|
|
16239
16283
|
if (resolvedStyle.isProcessed) {
|
|
16240
|
-
rootStyle =
|
|
16284
|
+
rootStyle = resolvedStyle.style;
|
|
16241
16285
|
} else {
|
|
16242
16286
|
const {
|
|
16243
16287
|
variants,
|
|
16244
16288
|
...otherStyles
|
|
16245
16289
|
} = resolvedStyle;
|
|
16246
|
-
rootStyle =
|
|
16290
|
+
rootStyle = otherStyles;
|
|
16247
16291
|
}
|
|
16248
|
-
return processStyleVariants(props, resolvedStyle.variants, [rootStyle]
|
|
16292
|
+
return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);
|
|
16249
16293
|
}
|
|
16250
16294
|
if (resolvedStyle?.isProcessed) {
|
|
16251
|
-
return
|
|
16295
|
+
return resolvedStyle.style;
|
|
16252
16296
|
}
|
|
16253
|
-
return
|
|
16297
|
+
return resolvedStyle;
|
|
16254
16298
|
}
|
|
16255
|
-
function processStyleVariants(props, variants, results = []
|
|
16299
|
+
function processStyleVariants(props, variants, results = []) {
|
|
16256
16300
|
let mergedState; // We might not need it, initialized lazily
|
|
16257
16301
|
|
|
16258
16302
|
variantLoop: for (let i = 0; i < variants.length; i += 1) {
|
|
@@ -16279,9 +16323,9 @@ function processStyleVariants(props, variants, results = [], layerName = undefin
|
|
|
16279
16323
|
...props.ownerState,
|
|
16280
16324
|
ownerState: props.ownerState
|
|
16281
16325
|
};
|
|
16282
|
-
results.push(
|
|
16326
|
+
results.push(variant.style(mergedState));
|
|
16283
16327
|
} else {
|
|
16284
|
-
results.push(
|
|
16328
|
+
results.push(variant.style);
|
|
16285
16329
|
}
|
|
16286
16330
|
}
|
|
16287
16331
|
return results;
|
|
@@ -16310,7 +16354,6 @@ function createStyled(input = {}) {
|
|
|
16310
16354
|
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
|
|
16311
16355
|
...options
|
|
16312
16356
|
} = inputOptions;
|
|
16313
|
-
const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';
|
|
16314
16357
|
|
|
16315
16358
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
16316
16359
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
|
|
@@ -16347,16 +16390,16 @@ function createStyled(input = {}) {
|
|
|
16347
16390
|
}
|
|
16348
16391
|
if (typeof style === 'function') {
|
|
16349
16392
|
return function styleFunctionProcessor(props) {
|
|
16350
|
-
return processStyle(props, style
|
|
16393
|
+
return processStyle(props, style);
|
|
16351
16394
|
};
|
|
16352
16395
|
}
|
|
16353
16396
|
if (isPlainObject(style)) {
|
|
16354
16397
|
const serialized = preprocessStyles(style);
|
|
16398
|
+
if (!serialized.variants) {
|
|
16399
|
+
return serialized.style;
|
|
16400
|
+
}
|
|
16355
16401
|
return function styleObjectProcessor(props) {
|
|
16356
|
-
|
|
16357
|
-
return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;
|
|
16358
|
-
}
|
|
16359
|
-
return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);
|
|
16402
|
+
return processStyle(props, serialized);
|
|
16360
16403
|
};
|
|
16361
16404
|
}
|
|
16362
16405
|
return style;
|
|
@@ -16381,7 +16424,7 @@ function createStyled(input = {}) {
|
|
|
16381
16424
|
// TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
|
|
16382
16425
|
// eslint-disable-next-line guard-for-in
|
|
16383
16426
|
for (const slotKey in styleOverrides) {
|
|
16384
|
-
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]
|
|
16427
|
+
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
|
|
16385
16428
|
}
|
|
16386
16429
|
return overridesResolver(props, resolvedStyleOverrides);
|
|
16387
16430
|
});
|
|
@@ -16393,7 +16436,7 @@ function createStyled(input = {}) {
|
|
|
16393
16436
|
if (!themeVariants) {
|
|
16394
16437
|
return null;
|
|
16395
16438
|
}
|
|
16396
|
-
return processStyleVariants(props, themeVariants
|
|
16439
|
+
return processStyleVariants(props, themeVariants);
|
|
16397
16440
|
});
|
|
16398
16441
|
}
|
|
16399
16442
|
if (!skipSx) {
|
|
@@ -16482,12 +16525,9 @@ const styled = createStyled();
|
|
|
16482
16525
|
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
16483
16526
|
* @param defaultProps
|
|
16484
16527
|
* @param props
|
|
16485
|
-
* @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.
|
|
16486
|
-
* When `false` (default), props override defaultProps. When `true`, `className` values are concatenated
|
|
16487
|
-
* and `style` objects are merged with props taking precedence.
|
|
16488
16528
|
* @returns resolved props
|
|
16489
16529
|
*/
|
|
16490
|
-
function resolveProps(defaultProps, props
|
|
16530
|
+
function resolveProps(defaultProps, props) {
|
|
16491
16531
|
const output = {
|
|
16492
16532
|
...props
|
|
16493
16533
|
};
|
|
@@ -16513,17 +16553,10 @@ function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
|
|
|
16513
16553
|
for (const slotKey in defaultSlotProps) {
|
|
16514
16554
|
if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
|
|
16515
16555
|
const slotPropName = slotKey;
|
|
16516
|
-
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]
|
|
16556
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
16517
16557
|
}
|
|
16518
16558
|
}
|
|
16519
16559
|
}
|
|
16520
|
-
} else if (propName === 'className' && mergeClassNameAndStyle && props.className) {
|
|
16521
|
-
output.className = clsx(defaultProps?.className, props?.className);
|
|
16522
|
-
} else if (propName === 'style' && mergeClassNameAndStyle && props.style) {
|
|
16523
|
-
output.style = {
|
|
16524
|
-
...defaultProps?.style,
|
|
16525
|
-
...props?.style
|
|
16526
|
-
};
|
|
16527
16560
|
} else if (output[propName] === undefined) {
|
|
16528
16561
|
output[propName] = defaultProps[propName];
|
|
16529
16562
|
}
|
|
@@ -19463,6 +19496,7 @@ exports.createPopup = createPopup;
|
|
|
19463
19496
|
exports.createSuppressedEmailExport = createSuppressedEmailExport;
|
|
19464
19497
|
exports.createTemplate = createTemplate;
|
|
19465
19498
|
exports.deepMergeObject = deepMergeObject;
|
|
19499
|
+
exports.deleteAccount = deleteAccount;
|
|
19466
19500
|
exports.deleteAnyAutomation = deleteAnyAutomation;
|
|
19467
19501
|
exports.deleteAutomation = deleteAutomation;
|
|
19468
19502
|
exports.deleteCampaign = deleteCampaign;
|
|
@@ -19623,6 +19657,7 @@ exports.splitArray = splitArray;
|
|
|
19623
19657
|
exports.splitObject = splitObject;
|
|
19624
19658
|
exports.stableSort = stableSort;
|
|
19625
19659
|
exports.startPromisePool = startPromisePool;
|
|
19660
|
+
exports.suspendAccount = suspendAccount;
|
|
19626
19661
|
exports.suspendCampaign = suspendCampaign;
|
|
19627
19662
|
exports.trackEvent = trackEvent;
|
|
19628
19663
|
exports.truncateEmail = truncateEmail;
|
|
@@ -19630,6 +19665,7 @@ exports.truncateText = truncateText;
|
|
|
19630
19665
|
exports.uiKitConfig = uiKitConfig;
|
|
19631
19666
|
exports.unArchiveCampaign = unArchiveCampaign;
|
|
19632
19667
|
exports.unScheduleCampaign = unScheduleCampaign;
|
|
19668
|
+
exports.unSuspendAccount = unSuspendAccount;
|
|
19633
19669
|
exports.unshareTemplate = unshareTemplate;
|
|
19634
19670
|
exports.updateAccount = updateAccount;
|
|
19635
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;
|
|
@@ -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/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
|
-
|
|
4270
|
-
if (
|
|
4271
|
-
|
|
4272
|
-
match[1] =
|
|
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 (
|
|
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
|
-
|
|
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";
|
|
@@ -9633,6 +9625,33 @@ function logOutService() {
|
|
|
9633
9625
|
}
|
|
9634
9626
|
});
|
|
9635
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
|
+
}
|
|
9636
9655
|
|
|
9637
9656
|
function getDomainsService(_a) {
|
|
9638
9657
|
var id = _a.id;
|
|
@@ -9777,6 +9796,45 @@ var AccountModel = /** @class */ (function () {
|
|
|
9777
9796
|
});
|
|
9778
9797
|
});
|
|
9779
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
|
+
};
|
|
9780
9838
|
AccountModel.prototype.isPartnerOrOrganization = function () {
|
|
9781
9839
|
return this.partner || this.organization;
|
|
9782
9840
|
};
|
|
@@ -14271,7 +14329,7 @@ var propTypesExports = propTypes.exports;
|
|
|
14271
14329
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
14272
14330
|
|
|
14273
14331
|
/**
|
|
14274
|
-
* @mui/styled-engine v7.
|
|
14332
|
+
* @mui/styled-engine v7.1.1
|
|
14275
14333
|
*
|
|
14276
14334
|
* @license MIT
|
|
14277
14335
|
* This source code is licensed under the MIT license found in the
|
|
@@ -15813,8 +15871,7 @@ function unstable_createStyleFunctionSx() {
|
|
|
15813
15871
|
function styleFunctionSx(props) {
|
|
15814
15872
|
const {
|
|
15815
15873
|
sx,
|
|
15816
|
-
theme = {}
|
|
15817
|
-
nested
|
|
15874
|
+
theme = {}
|
|
15818
15875
|
} = props || {};
|
|
15819
15876
|
if (!sx) {
|
|
15820
15877
|
return null; // Emotion & styled-components will neglect null
|
|
@@ -15855,8 +15912,7 @@ function unstable_createStyleFunctionSx() {
|
|
|
15855
15912
|
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
15856
15913
|
css[styleKey] = styleFunctionSx({
|
|
15857
15914
|
sx: value,
|
|
15858
|
-
theme
|
|
15859
|
-
nested: true
|
|
15915
|
+
theme
|
|
15860
15916
|
});
|
|
15861
15917
|
} else {
|
|
15862
15918
|
css = merge(css, breakpointsValues);
|
|
@@ -15867,11 +15923,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
15867
15923
|
}
|
|
15868
15924
|
}
|
|
15869
15925
|
});
|
|
15870
|
-
if (!nested && theme.modularCssLayers) {
|
|
15871
|
-
return {
|
|
15872
|
-
'@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
|
|
15873
|
-
};
|
|
15874
|
-
}
|
|
15875
15926
|
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
|
|
15876
15927
|
}
|
|
15877
15928
|
return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
|
|
@@ -16184,13 +16235,6 @@ const systemDefaultTheme = createTheme();
|
|
|
16184
16235
|
function shouldForwardProp(prop) {
|
|
16185
16236
|
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
|
16186
16237
|
}
|
|
16187
|
-
function shallowLayer(serialized, layerName) {
|
|
16188
|
-
if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.
|
|
16189
|
-
) {
|
|
16190
|
-
serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
|
|
16191
|
-
}
|
|
16192
|
-
return serialized;
|
|
16193
|
-
}
|
|
16194
16238
|
function defaultOverridesResolver(slot) {
|
|
16195
16239
|
if (!slot) {
|
|
16196
16240
|
return null;
|
|
@@ -16200,7 +16244,7 @@ function defaultOverridesResolver(slot) {
|
|
|
16200
16244
|
function attachTheme(props, themeId, defaultTheme) {
|
|
16201
16245
|
props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;
|
|
16202
16246
|
}
|
|
16203
|
-
function processStyle(props, style
|
|
16247
|
+
function processStyle(props, style) {
|
|
16204
16248
|
/*
|
|
16205
16249
|
* Style types:
|
|
16206
16250
|
* - null/undefined
|
|
@@ -16212,27 +16256,27 @@ function processStyle(props, style, layerName) {
|
|
|
16212
16256
|
|
|
16213
16257
|
const resolvedStyle = typeof style === 'function' ? style(props) : style;
|
|
16214
16258
|
if (Array.isArray(resolvedStyle)) {
|
|
16215
|
-
return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle
|
|
16259
|
+
return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle));
|
|
16216
16260
|
}
|
|
16217
16261
|
if (Array.isArray(resolvedStyle?.variants)) {
|
|
16218
16262
|
let rootStyle;
|
|
16219
16263
|
if (resolvedStyle.isProcessed) {
|
|
16220
|
-
rootStyle =
|
|
16264
|
+
rootStyle = resolvedStyle.style;
|
|
16221
16265
|
} else {
|
|
16222
16266
|
const {
|
|
16223
16267
|
variants,
|
|
16224
16268
|
...otherStyles
|
|
16225
16269
|
} = resolvedStyle;
|
|
16226
|
-
rootStyle =
|
|
16270
|
+
rootStyle = otherStyles;
|
|
16227
16271
|
}
|
|
16228
|
-
return processStyleVariants(props, resolvedStyle.variants, [rootStyle]
|
|
16272
|
+
return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);
|
|
16229
16273
|
}
|
|
16230
16274
|
if (resolvedStyle?.isProcessed) {
|
|
16231
|
-
return
|
|
16275
|
+
return resolvedStyle.style;
|
|
16232
16276
|
}
|
|
16233
|
-
return
|
|
16277
|
+
return resolvedStyle;
|
|
16234
16278
|
}
|
|
16235
|
-
function processStyleVariants(props, variants, results = []
|
|
16279
|
+
function processStyleVariants(props, variants, results = []) {
|
|
16236
16280
|
let mergedState; // We might not need it, initialized lazily
|
|
16237
16281
|
|
|
16238
16282
|
variantLoop: for (let i = 0; i < variants.length; i += 1) {
|
|
@@ -16259,9 +16303,9 @@ function processStyleVariants(props, variants, results = [], layerName = undefin
|
|
|
16259
16303
|
...props.ownerState,
|
|
16260
16304
|
ownerState: props.ownerState
|
|
16261
16305
|
};
|
|
16262
|
-
results.push(
|
|
16306
|
+
results.push(variant.style(mergedState));
|
|
16263
16307
|
} else {
|
|
16264
|
-
results.push(
|
|
16308
|
+
results.push(variant.style);
|
|
16265
16309
|
}
|
|
16266
16310
|
}
|
|
16267
16311
|
return results;
|
|
@@ -16290,7 +16334,6 @@ function createStyled(input = {}) {
|
|
|
16290
16334
|
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
|
|
16291
16335
|
...options
|
|
16292
16336
|
} = inputOptions;
|
|
16293
|
-
const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';
|
|
16294
16337
|
|
|
16295
16338
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
16296
16339
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
|
|
@@ -16327,16 +16370,16 @@ function createStyled(input = {}) {
|
|
|
16327
16370
|
}
|
|
16328
16371
|
if (typeof style === 'function') {
|
|
16329
16372
|
return function styleFunctionProcessor(props) {
|
|
16330
|
-
return processStyle(props, style
|
|
16373
|
+
return processStyle(props, style);
|
|
16331
16374
|
};
|
|
16332
16375
|
}
|
|
16333
16376
|
if (isPlainObject(style)) {
|
|
16334
16377
|
const serialized = preprocessStyles(style);
|
|
16378
|
+
if (!serialized.variants) {
|
|
16379
|
+
return serialized.style;
|
|
16380
|
+
}
|
|
16335
16381
|
return function styleObjectProcessor(props) {
|
|
16336
|
-
|
|
16337
|
-
return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;
|
|
16338
|
-
}
|
|
16339
|
-
return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);
|
|
16382
|
+
return processStyle(props, serialized);
|
|
16340
16383
|
};
|
|
16341
16384
|
}
|
|
16342
16385
|
return style;
|
|
@@ -16361,7 +16404,7 @@ function createStyled(input = {}) {
|
|
|
16361
16404
|
// TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
|
|
16362
16405
|
// eslint-disable-next-line guard-for-in
|
|
16363
16406
|
for (const slotKey in styleOverrides) {
|
|
16364
|
-
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]
|
|
16407
|
+
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
|
|
16365
16408
|
}
|
|
16366
16409
|
return overridesResolver(props, resolvedStyleOverrides);
|
|
16367
16410
|
});
|
|
@@ -16373,7 +16416,7 @@ function createStyled(input = {}) {
|
|
|
16373
16416
|
if (!themeVariants) {
|
|
16374
16417
|
return null;
|
|
16375
16418
|
}
|
|
16376
|
-
return processStyleVariants(props, themeVariants
|
|
16419
|
+
return processStyleVariants(props, themeVariants);
|
|
16377
16420
|
});
|
|
16378
16421
|
}
|
|
16379
16422
|
if (!skipSx) {
|
|
@@ -16462,12 +16505,9 @@ const styled = createStyled();
|
|
|
16462
16505
|
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
16463
16506
|
* @param defaultProps
|
|
16464
16507
|
* @param props
|
|
16465
|
-
* @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.
|
|
16466
|
-
* When `false` (default), props override defaultProps. When `true`, `className` values are concatenated
|
|
16467
|
-
* and `style` objects are merged with props taking precedence.
|
|
16468
16508
|
* @returns resolved props
|
|
16469
16509
|
*/
|
|
16470
|
-
function resolveProps(defaultProps, props
|
|
16510
|
+
function resolveProps(defaultProps, props) {
|
|
16471
16511
|
const output = {
|
|
16472
16512
|
...props
|
|
16473
16513
|
};
|
|
@@ -16493,17 +16533,10 @@ function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
|
|
|
16493
16533
|
for (const slotKey in defaultSlotProps) {
|
|
16494
16534
|
if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
|
|
16495
16535
|
const slotPropName = slotKey;
|
|
16496
|
-
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]
|
|
16536
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
16497
16537
|
}
|
|
16498
16538
|
}
|
|
16499
16539
|
}
|
|
16500
|
-
} else if (propName === 'className' && mergeClassNameAndStyle && props.className) {
|
|
16501
|
-
output.className = clsx(defaultProps?.className, props?.className);
|
|
16502
|
-
} else if (propName === 'style' && mergeClassNameAndStyle && props.style) {
|
|
16503
|
-
output.style = {
|
|
16504
|
-
...defaultProps?.style,
|
|
16505
|
-
...props?.style
|
|
16506
|
-
};
|
|
16507
16540
|
} else if (output[propName] === undefined) {
|
|
16508
16541
|
output[propName] = defaultProps[propName];
|
|
16509
16542
|
}
|
|
@@ -19302,4 +19335,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
19302
19335
|
return UsersFactory;
|
|
19303
19336
|
}());
|
|
19304
19337
|
|
|
19305
|
-
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;
|
|
@@ -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",
|