@roomle/web-sdk 3.3.0 → 3.4.0

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.
Files changed (49) hide show
  1. package/lib/{BufferGeometry-DDTUVCTZ.mjs → BufferGeometry-Br8QIDeK.mjs} +2 -2
  2. package/lib/{BufferGeometry-DDTUVCTZ.mjs.map → BufferGeometry-Br8QIDeK.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-C6OIpz7t.mjs → GLTFExporter-DUjuGznV.mjs} +2 -2
  5. package/lib/{GLTFExporter-C6OIpz7t.mjs.map → GLTFExporter-DUjuGznV.mjs.map} +1 -1
  6. package/lib/{PointLightHelper-D-8-D0hG.mjs → PointLightHelper-_pWwb-rd.mjs} +3 -3
  7. package/lib/{PointLightHelper-D-8-D0hG.mjs.map → PointLightHelper-_pWwb-rd.mjs.map} +1 -1
  8. package/lib/RoomleCore.wasm +0 -0
  9. package/lib/RoomleToolsCore.wasm +0 -0
  10. package/lib/{SpotLightHelper-BNxNjZFU.mjs → SpotLightHelper-DiuKfHVi.mjs} +3 -3
  11. package/lib/{SpotLightHelper-BNxNjZFU.mjs.map → SpotLightHelper-DiuKfHVi.mjs.map} +1 -1
  12. package/lib/{USDZExporter-B5KX4zn1.mjs → USDZExporter-B9ygWQMw.mjs} +2 -2
  13. package/lib/{USDZExporter-B5KX4zn1.mjs.map → USDZExporter-B9ygWQMw.mjs.map} +1 -1
  14. package/lib/{banana-for-scale-D3fCVX5d.mjs → banana-for-scale-Bio4mpMQ.mjs} +2 -2
  15. package/lib/{banana-for-scale-D3fCVX5d.mjs.map → banana-for-scale-Bio4mpMQ.mjs.map} +1 -1
  16. package/lib/{component-dimensioning-B8w976QK.mjs → component-dimensioning-Bar2YYNs.mjs} +2 -2
  17. package/lib/{component-dimensioning-B8w976QK.mjs.map → component-dimensioning-Bar2YYNs.mjs.map} +1 -1
  18. package/lib/{continuous-drawing-helper-Cl60wfg_.mjs → continuous-drawing-helper-BYjzGaWD.mjs} +2 -2
  19. package/lib/{continuous-drawing-helper-Cl60wfg_.mjs.map → continuous-drawing-helper-BYjzGaWD.mjs.map} +1 -1
  20. package/lib/{homag-intelligence-CqhmLFsQ.mjs → homag-intelligence-Bb8gfi80.mjs} +55 -44
  21. package/lib/homag-intelligence-Bb8gfi80.mjs.map +1 -0
  22. package/lib/{imos-ix-poc-export-helper-Pz2nfFtn.mjs → imos-ix-poc-export-helper-Bl13RKd1.mjs} +2 -2
  23. package/lib/{imos-ix-poc-export-helper-Pz2nfFtn.mjs.map → imos-ix-poc-export-helper-Bl13RKd1.mjs.map} +1 -1
  24. package/lib/{index-pH24sRMW.mjs → index-DYoZpNEJ.mjs} +19 -19
  25. package/lib/{index-pH24sRMW.mjs.map → index-DYoZpNEJ.mjs.map} +1 -1
  26. package/lib/{material-viewer-C-w5d8Zk.mjs → material-viewer-DqZ9kv7j.mjs} +2 -2
  27. package/lib/{material-viewer-C-w5d8Zk.mjs.map → material-viewer-DqZ9kv7j.mjs.map} +1 -1
  28. package/lib/roomle-sdk.d.ts +2 -0
  29. package/lib/roomle-sdk.js +1 -1
  30. package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
  31. package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
  32. package/lib/static/roomle-core-hsc/RoomleServiceCore.wasm +0 -0
  33. package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
  34. package/lib/static/roomle-core-hsc/configuratorCoreInterface.d.ts +1 -0
  35. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.d.ts +1 -0
  36. package/lib/static/roomle-core-hsc/package.json +1 -1
  37. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +1 -0
  38. package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  39. package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  40. package/lib/static/roomle-core-hsc/wasm_modern/RoomleServiceCore.wasm +0 -0
  41. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  42. package/lib/{stats-helper-CVB69dXL.mjs → stats-helper-BedaceYL.mjs} +2 -2
  43. package/lib/{stats-helper-CVB69dXL.mjs.map → stats-helper-BedaceYL.mjs.map} +1 -1
  44. package/lib/{three.webgpu-D0cV0tjO.mjs → three.webgpu-Bk8XgilA.mjs} +3 -3
  45. package/lib/{three.webgpu-D0cV0tjO.mjs.map → three.webgpu-Bk8XgilA.mjs.map} +1 -1
  46. package/lib/{tools-core-CDh9Csn-.mjs → tools-core-D1vOTlAR.mjs} +2 -2
  47. package/lib/{tools-core-CDh9Csn-.mjs.map → tools-core-D1vOTlAR.mjs.map} +1 -1
  48. package/package.json +1 -1
  49. package/lib/homag-intelligence-CqhmLFsQ.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { A as _, J as g, K as L, N as R, O as M, Q as A, V as w } from "./index-pH24sRMW.mjs";
1
+ import { A as _, J as g, K as R, N as w, O as I, Q as M, V as P } from "./index-DYoZpNEJ.mjs";
2
2
  class O {
3
3
  }
4
4
  const f = {
@@ -15,7 +15,7 @@ const f = {
15
15
  TC_CONFIG: "tc-config",
16
16
  RML_OBJECT: "rml-object"
17
17
  };
18
- class P {
18
+ class C {
19
19
  constructor(t) {
20
20
  this._callbacks = null, this._contextType = _.PLANNER, this._selectionMode = null, this._hiSelection = {
21
21
  type: b.NONE,
@@ -91,9 +91,9 @@ class P {
91
91
  ));
92
92
  }
93
93
  }
94
- class G {
94
+ const S = class S {
95
95
  constructor(t, e = null) {
96
- this._libraryData = /* @__PURE__ */ new Map(), this._posDataForLoading = null, this._posArticleMap = /* @__PURE__ */ new Map(), this._posSubArticleMap = /* @__PURE__ */ new Map(), this._groupMap = /* @__PURE__ */ new Map(), this._nextPosDataId = 1, this._hiCallbacks = null, this._pendingGroupsToBeLoaded = [], this._planCompletelyLoaded = !1, this._validSubArticles = [], this._designerRequests = t, this._hiCallbacks = e, this._hiObjectSelection = new P(e);
96
+ this._libraryData = /* @__PURE__ */ new Map(), this._posDataForLoading = null, this._posArticleMap = /* @__PURE__ */ new Map(), this._posSubArticleMap = /* @__PURE__ */ new Map(), this._groupMap = /* @__PURE__ */ new Map(), this._nextPosDataId = 1, this._hiCallbacks = null, this._pendingGroupsToBeLoaded = [], this._planCompletelyLoaded = !1, this._validSubArticles = [], this._designerRequests = t, this._hiCallbacks = e, this._hiObjectSelection = new C(e);
97
97
  }
98
98
  get hiCallbacks() {
99
99
  return this._hiCallbacks;
@@ -135,7 +135,7 @@ class G {
135
135
  return this._posDataForLoading?.groups ?? null;
136
136
  }
137
137
  async newPosDataFromId(t) {
138
- L(t) && (t = R(t));
138
+ R(t) && (t = w(t));
139
139
  let e = !1, o;
140
140
  if (this._posArticleMap.has(t) ? o = g(this._posArticleMap.get(t)) : this._posSubArticleMap.has(t) && (e = !0, o = g(this._posSubArticleMap.get(t))), !o)
141
141
  return;
@@ -526,7 +526,7 @@ class G {
526
526
  "Calculation already in progress for group:",
527
527
  t.posDataJson.id
528
528
  ), t.posDataJson;
529
- t.calculationInProgress = !0, await M(0);
529
+ t.calculationInProgress = !0, await I(0);
530
530
  try {
531
531
  const e = this._calculate(t.posDataJson);
532
532
  return e ? (t.posDataJson = e, this._groupMap.set(t.posDataJson.id, t), e) : t.posDataJson;
@@ -701,11 +701,11 @@ class G {
701
701
  }
702
702
  _getKindRank(t) {
703
703
  switch (t) {
704
- case A.Normal:
704
+ case M.Normal:
705
705
  return 0;
706
- case A.Conflicting:
706
+ case M.Conflicting:
707
707
  return 1;
708
- case A.Invalid:
708
+ case M.Invalid:
709
709
  return 2;
710
710
  default:
711
711
  return 3;
@@ -727,6 +727,12 @@ class G {
727
727
  updateProperty(t, e, o) {
728
728
  if (!t || !e || o === void 0)
729
729
  return;
730
+ if (S.CHANGEABLE_PROPERTIES.indexOf(e) === -1) {
731
+ console.error(
732
+ `Unsupported property name '${e}'. Supported property names: ${S.CHANGEABLE_PROPERTIES.join(", ")}`
733
+ );
734
+ return;
735
+ }
730
736
  const r = this._findRootModuleInAllGroups(t);
731
737
  if (!r) {
732
738
  console.error(
@@ -901,7 +907,7 @@ class G {
901
907
  console.error("Calculation already in progress for group:", r.id);
902
908
  return;
903
909
  }
904
- o.calculationInProgress = !0, await M(0);
910
+ o.calculationInProgress = !0, await I(0);
905
911
  try {
906
912
  for (const a of s) {
907
913
  const n = this._findSubModule(
@@ -1071,27 +1077,32 @@ class G {
1071
1077
  i.libraryId = a?.libraryId ?? t, i.articleName = a?.articleName ?? a?.articleId ?? n?.name ?? n?.id, i.articleId = a?.articleId ?? a?.articleName ?? n?.id ?? n?.name, i.imageUrl = a?.imageUrl ?? n?.imageUrl, i.desc = a?.desc ?? n?.desc, i.category = a?.category, i.additionalText = a?.additionalText, i.canBeDeleted === void 0 && (i.canBeDeleted = !i.isGenerated), this._setSubmoduleImages(i, s);
1072
1078
  });
1073
1079
  }
1074
- }
1080
+ };
1081
+ S.CHANGEABLE_PROPERTIES = [
1082
+ "additionalText",
1083
+ "quantity"
1084
+ ];
1085
+ let D = S;
1075
1086
  const d = [];
1076
1087
  for (let u = 0; u < 256; ++u)
1077
1088
  d.push((u + 256).toString(16).slice(1));
1078
- function C(u, t = 0) {
1089
+ function v(u, t = 0) {
1079
1090
  return (d[u[t + 0]] + d[u[t + 1]] + d[u[t + 2]] + d[u[t + 3]] + "-" + d[u[t + 4]] + d[u[t + 5]] + "-" + d[u[t + 6]] + d[u[t + 7]] + "-" + d[u[t + 8]] + d[u[t + 9]] + "-" + d[u[t + 10]] + d[u[t + 11]] + d[u[t + 12]] + d[u[t + 13]] + d[u[t + 14]] + d[u[t + 15]]).toLowerCase();
1080
1091
  }
1081
- let D;
1082
- const v = new Uint8Array(16);
1092
+ let G;
1093
+ const E = new Uint8Array(16);
1083
1094
  function T() {
1084
- if (!D) {
1095
+ if (!G) {
1085
1096
  if (typeof crypto > "u" || !crypto.getRandomValues)
1086
1097
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1087
- D = crypto.getRandomValues.bind(crypto);
1098
+ G = crypto.getRandomValues.bind(crypto);
1088
1099
  }
1089
- return D(v);
1100
+ return G(E);
1090
1101
  }
1091
- const E = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), I = { randomUUID: E };
1092
- function q(u, t, e) {
1093
- if (I.randomUUID && !t && !u)
1094
- return I.randomUUID();
1102
+ const q = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), L = { randomUUID: q };
1103
+ function F(u, t, e) {
1104
+ if (L.randomUUID && !t && !u)
1105
+ return L.randomUUID();
1095
1106
  u = u || {};
1096
1107
  const o = u.random || (u.rng || T)();
1097
1108
  if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
@@ -1100,9 +1111,9 @@ function q(u, t, e) {
1100
1111
  t[e + r] = o[r];
1101
1112
  return t;
1102
1113
  }
1103
- return C(o);
1114
+ return v(o);
1104
1115
  }
1105
- const F = (u, t) => {
1116
+ const N = (u, t) => {
1106
1117
  u.callbacks.onCompletelyLoaded = () => {
1107
1118
  t.groupsCompletelyLoaded();
1108
1119
  }, u.callbacks.onExternalObjectModuleSelected = (e, o, r) => {
@@ -1124,7 +1135,7 @@ const F = (u, t) => {
1124
1135
  }, u.callbacks.onSelectionCancel = (e) => {
1125
1136
  t.hiObjectSelection.selectionCancel(e);
1126
1137
  };
1127
- }, S = (u = /* @__PURE__ */ new Date()) => {
1138
+ }, A = (u = /* @__PURE__ */ new Date()) => {
1128
1139
  let t = u.toISOString();
1129
1140
  t = t.slice(0, -1);
1130
1141
  const e = t.lastIndexOf(".");
@@ -1135,7 +1146,7 @@ const F = (u, t) => {
1135
1146
  "0"
1136
1147
  )}:${String(i).padStart(2, "0")}`;
1137
1148
  return o + n;
1138
- }, N = () => ({
1149
+ }, U = () => ({
1139
1150
  id: window.uuidv4 ? window.uuidv4() : "00000000-0000-0000-0000-000000000000",
1140
1151
  state: "New",
1141
1152
  orderNumber: "736362",
@@ -1143,8 +1154,8 @@ const F = (u, t) => {
1143
1154
  orderDescription: "Lorem ipsum dolor sit amet...",
1144
1155
  project: "Single family house Müller John",
1145
1156
  personInCharge: "Joe",
1146
- orderDate: S(),
1147
- deliveryDatePlanned: S(
1157
+ orderDate: A(),
1158
+ deliveryDatePlanned: A(
1148
1159
  new Date(Date.now() + 336 * 60 * 60 * 1e3)
1149
1160
  ),
1150
1161
  addresses: [
@@ -1159,11 +1170,11 @@ const F = (u, t) => {
1159
1170
  ],
1160
1171
  customerName: "Müller & Co.",
1161
1172
  customerNumber: "462642",
1162
- createdAt: S(),
1163
- changedAt: S(),
1173
+ createdAt: A(),
1174
+ changedAt: A(),
1164
1175
  changedBy: "Selfish",
1165
1176
  items: []
1166
- }), U = async (u, t) => {
1177
+ }), k = async (u, t) => {
1167
1178
  const e = await u.getPlanOverview(), o = {}, r = e.objects.reduce((a, n) => (n.catalogItemId && (o[n.catalogItemId] || (o[n.catalogItemId] = 0, a.push(n.catalogItemId)), o[n.catalogItemId]++), a), []), i = (Array.isArray(r) && r.length > 0 ? await u.getRapiAccess().getItems(r) : []).filter((a) => a.manufacturerSKU !== void 0 ? (a.count = o[a.id], !0) : !1);
1168
1179
  if (Array.isArray(i) && i.length > 0) {
1169
1180
  t.items || (t.items = []);
@@ -1178,7 +1189,7 @@ const F = (u, t) => {
1178
1189
  });
1179
1190
  }
1180
1191
  };
1181
- class k {
1192
+ class J {
1182
1193
  constructor(t, e) {
1183
1194
  this._roomlePlanner = t, this._glueLogic = e;
1184
1195
  }
@@ -1193,7 +1204,7 @@ class k {
1193
1204
  return;
1194
1205
  }
1195
1206
  let r = t ? await this._fetchOrderDataWithPrice(o.orderData, e) : null, s;
1196
- r ? s = r.orderData : (s = this._createOrder(e), s.items.push(o.orderData), await U(this._roomlePlanner, o.orderData)), this._addAdditionalDataToOrder(s.items[0], o), await this._glueLogic.hiCallbacks?.onPlaceOrder(s);
1207
+ r ? s = r.orderData : (s = this._createOrder(e), s.items.push(o.orderData), await k(this._roomlePlanner, o.orderData)), this._addAdditionalDataToOrder(s.items[0], o), await this._glueLogic.hiCallbacks?.onPlaceOrder(s);
1197
1208
  }
1198
1209
  _addAdditionalDataToOrder(t, e) {
1199
1210
  Array.isArray(t.additionalData) || (t.additionalData = []), e.perspectiveImageLink && t.additionalData.push({
@@ -1218,10 +1229,10 @@ class k {
1218
1229
  return t ? {
1219
1230
  ...t,
1220
1231
  items: []
1221
- } : N();
1232
+ } : U();
1222
1233
  }
1223
1234
  }
1224
- class J {
1235
+ class x {
1225
1236
  constructor(t, e) {
1226
1237
  this._glueLogic = t, this._hiCallbacks = e;
1227
1238
  }
@@ -1482,22 +1493,22 @@ class V {
1482
1493
  }
1483
1494
  }
1484
1495
  console.warn("Homag Intelligence plugin is loaded.");
1485
- class j extends O {
1496
+ class B extends O {
1486
1497
  constructor() {
1487
- super(), this._roomlePlanner = null, this._api = null, this._glueLogic = null, this._orders = null, window.uuidv4 || (window.uuidv4 = q);
1498
+ super(), this._roomlePlanner = null, this._api = null, this._glueLogic = null, this._orders = null, window.uuidv4 || (window.uuidv4 = F);
1488
1499
  }
1489
1500
  async init(t, e, o) {
1490
- if (this._roomlePlanner = t, this._roomlePlanner.setHomagIntelligence(this), this._api = new w(this._roomlePlanner), e?.debugLogging) {
1491
- const s = new V(this._api, o), i = new G(s, o);
1492
- this._glueLogic = new J(
1501
+ if (this._roomlePlanner = t, this._roomlePlanner.setHomagIntelligence(this), this._api = new P(this._roomlePlanner), e?.debugLogging) {
1502
+ const s = new V(this._api, o), i = new D(s, o);
1503
+ this._glueLogic = new x(
1493
1504
  i,
1494
1505
  o
1495
1506
  );
1496
1507
  } else
1497
- this._glueLogic = new G(this._api, o);
1498
- F(this._roomlePlanner, this._glueLogic);
1508
+ this._glueLogic = new D(this._api, o);
1509
+ N(this._roomlePlanner, this._glueLogic);
1499
1510
  const r = await o.onGetSavedPosGroupData() ?? null;
1500
- return await this._glueLogic.setPosDataForLoading(r), this._orders = new k(t, this._glueLogic), this;
1511
+ return await this._glueLogic.setPosDataForLoading(r), this._orders = new J(t, this._glueLogic), this;
1501
1512
  }
1502
1513
  async loadLibrary(t) {
1503
1514
  if (!this._glueLogic)
@@ -1610,6 +1621,6 @@ class j extends O {
1610
1621
  }
1611
1622
  }
1612
1623
  export {
1613
- j as HomagIntelligence
1624
+ B as HomagIntelligence
1614
1625
  };
1615
- //# sourceMappingURL=homag-intelligence-CqhmLFsQ.mjs.map
1626
+ //# sourceMappingURL=homag-intelligence-Bb8gfi80.mjs.map