kitchen-simulator 1.0.0-clark.66 → 1.0.0-clark.70

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.
@@ -20,6 +20,7 @@ export default function (_ref) {
20
20
  alti = _ref.alti,
21
21
  obj_property = _ref.obj_property,
22
22
  outlineSVGData = _ref.outlineSVGData,
23
+ customer_property = _ref.customer_property,
23
24
  cds = _ref.cds;
24
25
  var _length = alti || 0;
25
26
  // const length = convert(_length).from("in").to("cm");
@@ -136,6 +137,7 @@ export default function (_ref) {
136
137
  img: base,
137
138
  obj: obj_property,
138
139
  cds: cds,
140
+ customer_property: customer_property,
139
141
  render2D: function render2D(element, layer, scene) {
140
142
  return render2DItem.call(this, element, layer, scene, sizeinfo, layoutpos, is_corner, shape_svg);
141
143
  },
package/es/class/item.js CHANGED
@@ -71,9 +71,7 @@ var Item = /*#__PURE__*/function () {
71
71
  }
72
72
  var setSizeOfItemByDoorStyle = function setSizeOfItemByDoorStyle() {
73
73
  var doorStyle = item.get('doorStyle').toJS();
74
- var euroCDS = state.catalog.getIn(['elements', type, 'cds']).data.filter(function (element) {
75
- return element && element.is_euro_cds;
76
- });
74
+ var euroCDS = state.catalog.getIn(['elements', type, 'customer_property']).is_euro_cds;
77
75
  if (doorStyle.door_style_name === 'Euro & Frameless' && euroCDS.length > 0) {
78
76
  var newProperties = item.get('properties').toJS();
79
77
  if (newProperties.hasOwnProperty('depth')) {
package/es/models.js CHANGED
@@ -339,7 +339,8 @@ export var CatalogElement = /*#__PURE__*/function (_Record1) {
339
339
  properties: new Map(),
340
340
  obj: new Map(),
341
341
  type: '',
342
- cds: new Map()
342
+ cds: new Map(),
343
+ customer_property: new Map()
343
344
  }, 'CatalogElement'));
344
345
  export var Catalog = /*#__PURE__*/function (_Record10) {
345
346
  function Catalog() {
@@ -504,6 +504,11 @@ function _handleExternalEvent() {
504
504
  }
505
505
  _element = evt.payload;
506
506
  catalog = state.getIn(['catalog']).toJS(); // add item to catalog of state
507
+ _element = _objectSpread(_objectSpread({}, _element), {}, {
508
+ cds: {
509
+ itemID: _element.itemID
510
+ }
511
+ });
507
512
  if (!isEmpty(catalog === null || catalog === void 0 ? void 0 : catalog.elements[_element.name])) {
508
513
  _context5.next = 8;
509
514
  break;
@@ -27,6 +27,7 @@ function _default(_ref) {
27
27
  alti = _ref.alti,
28
28
  obj_property = _ref.obj_property,
29
29
  outlineSVGData = _ref.outlineSVGData,
30
+ customer_property = _ref.customer_property,
30
31
  cds = _ref.cds;
31
32
  var _length = alti || 0;
32
33
  // const length = convert(_length).from("in").to("cm");
@@ -143,6 +144,7 @@ function _default(_ref) {
143
144
  img: base,
144
145
  obj: obj_property,
145
146
  cds: cds,
147
+ customer_property: customer_property,
146
148
  render2D: function render2D(element, layer, scene) {
147
149
  return render2DItem.call(this, element, layer, scene, sizeinfo, layoutpos, is_corner, shape_svg);
148
150
  },
package/lib/class/item.js CHANGED
@@ -78,9 +78,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
78
78
  }
79
79
  var setSizeOfItemByDoorStyle = function setSizeOfItemByDoorStyle() {
80
80
  var doorStyle = item.get('doorStyle').toJS();
81
- var euroCDS = state.catalog.getIn(['elements', type, 'cds']).data.filter(function (element) {
82
- return element && element.is_euro_cds;
83
- });
81
+ var euroCDS = state.catalog.getIn(['elements', type, 'customer_property']).is_euro_cds;
84
82
  if (doorStyle.door_style_name === 'Euro & Frameless' && euroCDS.length > 0) {
85
83
  var newProperties = item.get('properties').toJS();
86
84
  if (newProperties.hasOwnProperty('depth')) {
package/lib/models.js CHANGED
@@ -346,7 +346,8 @@ var CatalogElement = exports.CatalogElement = /*#__PURE__*/function (_Record1) {
346
346
  properties: new _immutable.Map(),
347
347
  obj: new _immutable.Map(),
348
348
  type: '',
349
- cds: new _immutable.Map()
349
+ cds: new _immutable.Map(),
350
+ customer_property: new _immutable.Map()
350
351
  }, 'CatalogElement'));
351
352
  var Catalog = exports.Catalog = /*#__PURE__*/function (_Record10) {
352
353
  function Catalog() {
@@ -512,6 +512,11 @@ function _handleExternalEvent() {
512
512
  }
513
513
  _element = evt.payload;
514
514
  catalog = state.getIn(['catalog']).toJS(); // add item to catalog of state
515
+ _element = _objectSpread(_objectSpread({}, _element), {}, {
516
+ cds: {
517
+ itemID: _element.itemID
518
+ }
519
+ });
515
520
  if (!(0, _helper.isEmpty)(catalog === null || catalog === void 0 ? void 0 : catalog.elements[_element.name])) {
516
521
  _context5.next = 8;
517
522
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "1.0.0-clark.66",
3
+ "version": "1.0.0-clark.70",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",