zakeke-configurator-react 0.0.127 → 0.0.128

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.
@@ -83,6 +83,7 @@ export declare class ZakekeEnvironment {
83
83
  isExplodedMode: boolean;
84
84
  isAssetsLoading: boolean;
85
85
  extensionFields: ExtensionFields[];
86
+ useLegacyScreenshot: boolean;
86
87
  get isFullscreenMode(): boolean;
87
88
  get isViewerReady(): boolean;
88
89
  eventMessages: EventMessage[] | null;
@@ -23,6 +23,7 @@ export interface ProviderValue {
23
23
  price: number;
24
24
  culture: string;
25
25
  currency: string;
26
+ useLegacyScreenshot: boolean;
26
27
  isSceneLoading: boolean;
27
28
  isAddToCartLoading: boolean;
28
29
  isViewerReady: boolean;
package/dist/index.js CHANGED
@@ -25010,6 +25010,7 @@ class ZakekeEnvironment {
25010
25010
  this.isExplodedMode = false;
25011
25011
  this.isAssetsLoading = false;
25012
25012
  this.extensionFields = [];
25013
+ this.useLegacyScreenshot = false;
25013
25014
  this.eventMessages = null;
25014
25015
  this.parseParameters = (parameters) => {
25015
25016
  console.info("Parameters", parameters);
@@ -25066,6 +25067,9 @@ class ZakekeEnvironment {
25066
25067
  case "viewerMode":
25067
25068
  this.isViewerMode = value;
25068
25069
  break;
25070
+ case "legacyScreenshot":
25071
+ this.useLegacyScreenshot = value == 1;
25072
+ break;
25069
25073
  }
25070
25074
  // Attributes collection
25071
25075
  if (key.indexOf("attributes") == 0) {
@@ -25135,6 +25139,9 @@ class ZakekeEnvironment {
25135
25139
  case "viewerMode":
25136
25140
  this.isViewerMode = true;
25137
25141
  break;
25142
+ case "legacyScreenshot":
25143
+ this.useLegacyScreenshot = value == '1';
25144
+ break;
25138
25145
  }
25139
25146
  // Attributes collection
25140
25147
  if (key.indexOf("attributes") == 0) {
@@ -28458,6 +28465,7 @@ const createProviderValue = (state, dispatch) => {
28458
28465
  price: state.environment.price,
28459
28466
  currency: state.environment.currency,
28460
28467
  culture: state.environment.culture,
28468
+ useLegacyScreenshot: state.environment.useLegacyScreenshot,
28461
28469
  quantity: state.environment.quantity,
28462
28470
  quantityRule: state.environment.quantityRule,
28463
28471
  internalProduct: state.environment.internalProduct,
@@ -28981,7 +28989,9 @@ class DesignPriceCalculatorRuleBased {
28981
28989
  // if (item.get('itemColors') && !isEmpty(item.get('itemColors')))
28982
28990
  // colors.push(item.get('itemColors'));
28983
28991
  // });
28984
- const colors = pContext.items.filter(item => item.get('itemColors') && !(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(item.get('itemColors'))).flatMap(item => item.get('itemColors'));
28992
+ const colors = (0,lodash__WEBPACK_IMPORTED_MODULE_1__.uniq)(pContext.items
28993
+ .filter(item => item.get('itemColors') && !(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(item.get('itemColors')))
28994
+ .flatMap(item => item.get('itemColors')));
28985
28995
  if (operatorsFunctions(formula.operator)(colors.filter(this.distinct).length, formula.values[0])) {
28986
28996
  result.result = true;
28987
28997
  result.multiplier = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zakeke-configurator-react",
3
- "version": "0.0.127",
3
+ "version": "0.0.128",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/declarations/composer/Module/src/index.d.ts",