@cakemail-org/ui-components-v2 2.0.41 → 2.0.42

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 CHANGED
@@ -9176,12 +9176,18 @@ var AccountModel = /** @class */ (function () {
9176
9176
  var brandDisabledLimitsFeatures = getNestedProperty(resellerBrand, "config.disabledLimitsFeatures") || [];
9177
9177
  if (brandDisabledLimitsFeatures.includes(feature))
9178
9178
  return true;
9179
- //Some feature flags are inverted
9180
- if (feature === "insert_reseller_logo") {
9181
- return !featureValue;
9179
+ if (Number.isNaN(featureValue)) {
9180
+ //Some feature flags are inverted
9181
+ if (feature === "insert_reseller_logo") {
9182
+ return !featureValue;
9183
+ }
9184
+ else {
9185
+ return Boolean(featureValue);
9186
+ }
9182
9187
  }
9183
9188
  else {
9184
- return featureValue;
9189
+ return true;
9190
+ //return clientLimits[feature] < featureValue
9185
9191
  }
9186
9192
  // TODO have a way to tag the account as primary,
9187
9193
  // This would fetch the account reports and user count and keep track of it
@@ -30,6 +30,6 @@ export declare class AccountModel {
30
30
  }>;
31
31
  logOut(): Promise<any>;
32
32
  isPartnerOrOrganization(): boolean;
33
- hasAccessTo(feature: keyof TAccountLimits, resellerBrand?: TBrand): number | boolean;
33
+ hasAccessTo(feature: keyof TAccountLimits, resellerBrand?: TBrand): boolean;
34
34
  }
35
35
  export * from "./types";
package/dist/esm/index.js CHANGED
@@ -9156,12 +9156,18 @@ var AccountModel = /** @class */ (function () {
9156
9156
  var brandDisabledLimitsFeatures = getNestedProperty(resellerBrand, "config.disabledLimitsFeatures") || [];
9157
9157
  if (brandDisabledLimitsFeatures.includes(feature))
9158
9158
  return true;
9159
- //Some feature flags are inverted
9160
- if (feature === "insert_reseller_logo") {
9161
- return !featureValue;
9159
+ if (Number.isNaN(featureValue)) {
9160
+ //Some feature flags are inverted
9161
+ if (feature === "insert_reseller_logo") {
9162
+ return !featureValue;
9163
+ }
9164
+ else {
9165
+ return Boolean(featureValue);
9166
+ }
9162
9167
  }
9163
9168
  else {
9164
- return featureValue;
9169
+ return true;
9170
+ //return clientLimits[feature] < featureValue
9165
9171
  }
9166
9172
  // TODO have a way to tag the account as primary,
9167
9173
  // This would fetch the account reports and user count and keep track of it
@@ -30,6 +30,6 @@ export declare class AccountModel {
30
30
  }>;
31
31
  logOut(): Promise<any>;
32
32
  isPartnerOrOrganization(): boolean;
33
- hasAccessTo(feature: keyof TAccountLimits, resellerBrand?: TBrand): number | boolean;
33
+ hasAccessTo(feature: keyof TAccountLimits, resellerBrand?: TBrand): boolean;
34
34
  }
35
35
  export * from "./types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.0.41",
3
+ "version": "2.0.42",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",