@lv-x-software-house/x_view 1.2.8-dev.21 → 1.2.8-dev.22

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/index.js CHANGED
@@ -3437,6 +3437,17 @@ var parseDate = (str) => {
3437
3437
  }
3438
3438
  return null;
3439
3439
  };
3440
+ function extractDatePropFromNode(node) {
3441
+ if (!node) return null;
3442
+ if (node.Date) return node.Date;
3443
+ if (node._customPropTypes) {
3444
+ const dateKey = Object.keys(node._customPropTypes).find(
3445
+ (k) => node._customPropTypes[k] === "date"
3446
+ );
3447
+ if (dateKey && node[dateKey]) return node[dateKey];
3448
+ }
3449
+ return null;
3450
+ }
3440
3451
  var parseDateProp = (dateProp) => {
3441
3452
  let info = { isUndated: true, label: "", type: "point" };
3442
3453
  if (!dateProp) return info;
@@ -16210,13 +16221,7 @@ function XViewScene({
16210
16221
  return null;
16211
16222
  };
16212
16223
  Object.values(nodeObjects).forEach((mesh) => {
16213
- var _a2;
16214
- const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16215
- (p) => {
16216
- var _a3;
16217
- return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16218
- }
16219
- )) == null ? void 0 : _a2.value);
16224
+ const dateProp = extractDatePropFromNode(mesh.userData);
16220
16225
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16221
16226
  if (dateProp) {
16222
16227
  const info = parseDateProp(dateProp);
@@ -16355,13 +16360,7 @@ function XViewScene({
16355
16360
  return null;
16356
16361
  };
16357
16362
  versionMeshes.forEach((mesh) => {
16358
- var _a2;
16359
- const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16360
- (p) => {
16361
- var _a3;
16362
- return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16363
- }
16364
- )) == null ? void 0 : _a2.value);
16363
+ const dateProp = extractDatePropFromNode(mesh.userData);
16365
16364
  if (!dateProp) return;
16366
16365
  const info = parseDateProp(dateProp);
16367
16366
  if (!info.isUndated) {
package/dist/index.mjs CHANGED
@@ -3398,6 +3398,17 @@ var parseDate = (str) => {
3398
3398
  }
3399
3399
  return null;
3400
3400
  };
3401
+ function extractDatePropFromNode(node) {
3402
+ if (!node) return null;
3403
+ if (node.Date) return node.Date;
3404
+ if (node._customPropTypes) {
3405
+ const dateKey = Object.keys(node._customPropTypes).find(
3406
+ (k) => node._customPropTypes[k] === "date"
3407
+ );
3408
+ if (dateKey && node[dateKey]) return node[dateKey];
3409
+ }
3410
+ return null;
3411
+ }
3401
3412
  var parseDateProp = (dateProp) => {
3402
3413
  let info = { isUndated: true, label: "", type: "point" };
3403
3414
  if (!dateProp) return info;
@@ -16273,13 +16284,7 @@ function XViewScene({
16273
16284
  return null;
16274
16285
  };
16275
16286
  Object.values(nodeObjects).forEach((mesh) => {
16276
- var _a2;
16277
- const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16278
- (p) => {
16279
- var _a3;
16280
- return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16281
- }
16282
- )) == null ? void 0 : _a2.value);
16287
+ const dateProp = extractDatePropFromNode(mesh.userData);
16283
16288
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16284
16289
  if (dateProp) {
16285
16290
  const info = parseDateProp(dateProp);
@@ -16418,13 +16423,7 @@ function XViewScene({
16418
16423
  return null;
16419
16424
  };
16420
16425
  versionMeshes.forEach((mesh) => {
16421
- var _a2;
16422
- const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16423
- (p) => {
16424
- var _a3;
16425
- return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16426
- }
16427
- )) == null ? void 0 : _a2.value);
16426
+ const dateProp = extractDatePropFromNode(mesh.userData);
16428
16427
  if (!dateProp) return;
16429
16428
  const info = parseDateProp(dateProp);
16430
16429
  if (!info.isUndated) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lv-x-software-house/x_view",
3
- "version": "1.2.8-dev.21",
3
+ "version": "1.2.8-dev.22",
4
4
  "description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
5
5
  "author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
6
6
  "license": "UNLICENSED",