@lv-x-software-house/x_view 1.2.8-dev.17 → 1.2.8-dev.19

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
@@ -16211,51 +16211,33 @@ function XViewScene({
16211
16211
  return null;
16212
16212
  };
16213
16213
  Object.values(nodeObjects).forEach((mesh) => {
16214
- const dateProp = mesh.userData.Date;
16214
+ var _a2;
16215
+ const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16216
+ (p) => {
16217
+ var _a3;
16218
+ return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16219
+ }
16220
+ )) == null ? void 0 : _a2.value);
16215
16221
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16216
16222
  if (dateProp) {
16217
- if (dateProp.date) {
16218
- const date = parseDate2(dateProp.date);
16219
- if (date) {
16220
- nodeInfo.startDate = date;
16221
- nodeInfo.endDate = date;
16222
- nodeInfo.label = dateProp.date;
16223
- nodeInfo.isUndated = false;
16224
- allTimePoints.add(date.getTime());
16225
- }
16226
- } else if (dateProp.year) {
16227
- const year = parseInt(dateProp.year, 10);
16228
- if (!isNaN(year)) {
16229
- const date = new Date(year, 0, 1);
16230
- nodeInfo.startDate = date;
16231
- nodeInfo.endDate = date;
16232
- nodeInfo.label = String(year);
16233
- nodeInfo.isUndated = false;
16234
- allTimePoints.add(date.getTime());
16235
- }
16236
- } else if (dateProp.date_interval && dateProp.date_interval.start) {
16237
- const startYear = parseInt(dateProp.date_interval.start, 10);
16238
- const endYear = parseInt(dateProp.date_interval.end, 10) || startYear;
16239
- if (!isNaN(startYear)) {
16240
- const startDate = new Date(startYear, 0, 1);
16241
- const endDate = new Date(endYear, 11, 31);
16242
- nodeInfo.type = "interval";
16243
- nodeInfo.startDate = startDate;
16244
- nodeInfo.endDate = endDate;
16245
- nodeInfo.label = `${startYear} - ${endYear}`;
16246
- nodeInfo.isUndated = false;
16247
- allTimePoints.add(startDate.getTime());
16248
- allTimePoints.add(endDate.getTime());
16249
- }
16223
+ const info = parseDateProp(dateProp);
16224
+ if (!info.isUndated) {
16225
+ nodeInfo.startDate = info.startDate;
16226
+ nodeInfo.endDate = info.endDate;
16227
+ nodeInfo.label = info.label;
16228
+ nodeInfo.type = info.type;
16229
+ nodeInfo.isUndated = false;
16230
+ allTimePoints.add(info.startDate.getTime());
16231
+ if (info.endDate) allTimePoints.add(info.endDate.getTime());
16250
16232
  }
16251
16233
  }
16252
16234
  timelineNodes.push(nodeInfo);
16253
16235
  });
16254
16236
  if (timelineNodes.length === 0) return;
16255
- const sortedTimePoints2 = Array.from(allTimePoints).sort((a, b) => a - b);
16256
- const maxTimeIndex = sortedTimePoints2.length - 1;
16237
+ const sortedTimePoints = Array.from(allTimePoints).sort((a, b) => a - b);
16238
+ const maxTimeIndex = sortedTimePoints.length - 1;
16257
16239
  const timeToYMap = new Map(
16258
- sortedTimePoints2.map((time, index) => [
16240
+ sortedTimePoints.map((time, index) => [
16259
16241
  time,
16260
16242
  (index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
16261
16243
  ])
@@ -16374,45 +16356,30 @@ function XViewScene({
16374
16356
  return null;
16375
16357
  };
16376
16358
  versionMeshes.forEach((mesh) => {
16377
- const dateProp = mesh.userData.Date;
16378
- if (!dateProp) return;
16379
- let nodeInfo = { mesh, type: "point", label: "" };
16380
- if (dateProp.date) {
16381
- const date = parseDate2(dateProp.date);
16382
- if (date) {
16383
- nodeInfo.startDate = date;
16384
- nodeInfo.endDate = date;
16385
- nodeInfo.label = dateProp.date;
16386
- allTimePoints.add(date.getTime());
16387
- timelineNodes.push(nodeInfo);
16388
- }
16389
- } else if (dateProp.year) {
16390
- const year = parseInt(dateProp.year, 10);
16391
- if (!isNaN(year)) {
16392
- const date = new Date(year, 0, 1);
16393
- nodeInfo.startDate = date;
16394
- nodeInfo.endDate = date;
16395
- nodeInfo.label = String(year);
16396
- allTimePoints.add(date.getTime());
16397
- timelineNodes.push(nodeInfo);
16398
- }
16399
- } else if (dateProp.date_interval && dateProp.date_interval.start) {
16400
- const startYear = parseInt(dateProp.date_interval.start, 10);
16401
- const endYear = parseInt(dateProp.date_interval.end, 10) || startYear;
16402
- if (!isNaN(startYear)) {
16403
- const startDate = new Date(startYear, 0, 1);
16404
- const endDate = new Date(endYear, 11, 31);
16405
- nodeInfo.type = "interval";
16406
- nodeInfo.startDate = startDate;
16407
- nodeInfo.endDate = endDate;
16408
- nodeInfo.label = `${startYear} - ${endYear}`;
16409
- allTimePoints.add(startDate.getTime());
16410
- allTimePoints.add(endDate.getTime());
16411
- timelineNodes.push(nodeInfo);
16359
+ var _a2;
16360
+ const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16361
+ (p) => {
16362
+ var _a3;
16363
+ return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16412
16364
  }
16365
+ )) == null ? void 0 : _a2.value);
16366
+ if (!dateProp) return;
16367
+ const info = parseDateProp(dateProp);
16368
+ if (!info.isUndated) {
16369
+ const nodeInfo = {
16370
+ mesh,
16371
+ type: info.type,
16372
+ startDate: info.startDate,
16373
+ endDate: info.endDate,
16374
+ label: info.label
16375
+ };
16376
+ allTimePoints.add(info.startDate.getTime());
16377
+ if (info.endDate) allTimePoints.add(info.endDate.getTime());
16378
+ timelineNodes.push(nodeInfo);
16413
16379
  }
16414
16380
  });
16415
16381
  if (timelineNodes.length === 0) return;
16382
+ const sortedTimePoints = Array.from(allTimePoints).sort((a, b) => a - b);
16416
16383
  const maxTimeIndex = sortedTimePoints.length - 1;
16417
16384
  const timeToYMap = new Map(
16418
16385
  sortedTimePoints.map((time, index) => [
@@ -16813,11 +16780,11 @@ function XViewScene({
16813
16780
  }
16814
16781
  }
16815
16782
  });
16816
- const sortedTimePoints2 = Array.from(allActiveTimePoints).sort(
16783
+ const sortedTimePoints = Array.from(allActiveTimePoints).sort(
16817
16784
  (a, b) => a - b
16818
16785
  );
16819
16786
  const timeToYMap = /* @__PURE__ */ new Map();
16820
- sortedTimePoints2.forEach((ms, idx) => {
16787
+ sortedTimePoints.forEach((ms, idx) => {
16821
16788
  timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
16822
16789
  });
16823
16790
  const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
@@ -16836,7 +16803,7 @@ function XViewScene({
16836
16803
  if (!timeInfo.isUndated) {
16837
16804
  nodeY = timeToYMap.get(timeInfo.startDate.getTime());
16838
16805
  } else {
16839
- const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
16806
+ const undatedOffset = sortedTimePoints.length > 0 ? sortedTimePoints.length * 5 : 0;
16840
16807
  nodeY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
16841
16808
  }
16842
16809
  const posKey = `${statusName}_${nodeY}`;
@@ -16919,7 +16886,7 @@ function XViewScene({
16919
16886
  if (!timeInfo.isUndated) {
16920
16887
  targetY = timeToYMap.get(timeInfo.startDate.getTime());
16921
16888
  } else {
16922
- const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
16889
+ const undatedOffset = sortedTimePoints.length > 0 ? sortedTimePoints.length * 5 : 0;
16923
16890
  targetY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
16924
16891
  }
16925
16892
  const posKey = `${statusName}_${targetY}`;
package/dist/index.mjs CHANGED
@@ -16274,51 +16274,33 @@ function XViewScene({
16274
16274
  return null;
16275
16275
  };
16276
16276
  Object.values(nodeObjects).forEach((mesh) => {
16277
- const dateProp = mesh.userData.Date;
16277
+ var _a2;
16278
+ const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16279
+ (p) => {
16280
+ var _a3;
16281
+ return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16282
+ }
16283
+ )) == null ? void 0 : _a2.value);
16278
16284
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16279
16285
  if (dateProp) {
16280
- if (dateProp.date) {
16281
- const date = parseDate2(dateProp.date);
16282
- if (date) {
16283
- nodeInfo.startDate = date;
16284
- nodeInfo.endDate = date;
16285
- nodeInfo.label = dateProp.date;
16286
- nodeInfo.isUndated = false;
16287
- allTimePoints.add(date.getTime());
16288
- }
16289
- } else if (dateProp.year) {
16290
- const year = parseInt(dateProp.year, 10);
16291
- if (!isNaN(year)) {
16292
- const date = new Date(year, 0, 1);
16293
- nodeInfo.startDate = date;
16294
- nodeInfo.endDate = date;
16295
- nodeInfo.label = String(year);
16296
- nodeInfo.isUndated = false;
16297
- allTimePoints.add(date.getTime());
16298
- }
16299
- } else if (dateProp.date_interval && dateProp.date_interval.start) {
16300
- const startYear = parseInt(dateProp.date_interval.start, 10);
16301
- const endYear = parseInt(dateProp.date_interval.end, 10) || startYear;
16302
- if (!isNaN(startYear)) {
16303
- const startDate = new Date(startYear, 0, 1);
16304
- const endDate = new Date(endYear, 11, 31);
16305
- nodeInfo.type = "interval";
16306
- nodeInfo.startDate = startDate;
16307
- nodeInfo.endDate = endDate;
16308
- nodeInfo.label = `${startYear} - ${endYear}`;
16309
- nodeInfo.isUndated = false;
16310
- allTimePoints.add(startDate.getTime());
16311
- allTimePoints.add(endDate.getTime());
16312
- }
16286
+ const info = parseDateProp(dateProp);
16287
+ if (!info.isUndated) {
16288
+ nodeInfo.startDate = info.startDate;
16289
+ nodeInfo.endDate = info.endDate;
16290
+ nodeInfo.label = info.label;
16291
+ nodeInfo.type = info.type;
16292
+ nodeInfo.isUndated = false;
16293
+ allTimePoints.add(info.startDate.getTime());
16294
+ if (info.endDate) allTimePoints.add(info.endDate.getTime());
16313
16295
  }
16314
16296
  }
16315
16297
  timelineNodes.push(nodeInfo);
16316
16298
  });
16317
16299
  if (timelineNodes.length === 0) return;
16318
- const sortedTimePoints2 = Array.from(allTimePoints).sort((a, b) => a - b);
16319
- const maxTimeIndex = sortedTimePoints2.length - 1;
16300
+ const sortedTimePoints = Array.from(allTimePoints).sort((a, b) => a - b);
16301
+ const maxTimeIndex = sortedTimePoints.length - 1;
16320
16302
  const timeToYMap = new Map(
16321
- sortedTimePoints2.map((time, index) => [
16303
+ sortedTimePoints.map((time, index) => [
16322
16304
  time,
16323
16305
  (index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
16324
16306
  ])
@@ -16437,45 +16419,30 @@ function XViewScene({
16437
16419
  return null;
16438
16420
  };
16439
16421
  versionMeshes.forEach((mesh) => {
16440
- const dateProp = mesh.userData.Date;
16441
- if (!dateProp) return;
16442
- let nodeInfo = { mesh, type: "point", label: "" };
16443
- if (dateProp.date) {
16444
- const date = parseDate2(dateProp.date);
16445
- if (date) {
16446
- nodeInfo.startDate = date;
16447
- nodeInfo.endDate = date;
16448
- nodeInfo.label = dateProp.date;
16449
- allTimePoints.add(date.getTime());
16450
- timelineNodes.push(nodeInfo);
16451
- }
16452
- } else if (dateProp.year) {
16453
- const year = parseInt(dateProp.year, 10);
16454
- if (!isNaN(year)) {
16455
- const date = new Date(year, 0, 1);
16456
- nodeInfo.startDate = date;
16457
- nodeInfo.endDate = date;
16458
- nodeInfo.label = String(year);
16459
- allTimePoints.add(date.getTime());
16460
- timelineNodes.push(nodeInfo);
16461
- }
16462
- } else if (dateProp.date_interval && dateProp.date_interval.start) {
16463
- const startYear = parseInt(dateProp.date_interval.start, 10);
16464
- const endYear = parseInt(dateProp.date_interval.end, 10) || startYear;
16465
- if (!isNaN(startYear)) {
16466
- const startDate = new Date(startYear, 0, 1);
16467
- const endDate = new Date(endYear, 11, 31);
16468
- nodeInfo.type = "interval";
16469
- nodeInfo.startDate = startDate;
16470
- nodeInfo.endDate = endDate;
16471
- nodeInfo.label = `${startYear} - ${endYear}`;
16472
- allTimePoints.add(startDate.getTime());
16473
- allTimePoints.add(endDate.getTime());
16474
- timelineNodes.push(nodeInfo);
16422
+ var _a2;
16423
+ const dateProp = mesh.userData.Date || ((_a2 = (mesh.userData.properties || []).find(
16424
+ (p) => {
16425
+ var _a3;
16426
+ return ((_a3 = p.name) == null ? void 0 : _a3.toLowerCase()) === "data";
16475
16427
  }
16428
+ )) == null ? void 0 : _a2.value);
16429
+ if (!dateProp) return;
16430
+ const info = parseDateProp(dateProp);
16431
+ if (!info.isUndated) {
16432
+ const nodeInfo = {
16433
+ mesh,
16434
+ type: info.type,
16435
+ startDate: info.startDate,
16436
+ endDate: info.endDate,
16437
+ label: info.label
16438
+ };
16439
+ allTimePoints.add(info.startDate.getTime());
16440
+ if (info.endDate) allTimePoints.add(info.endDate.getTime());
16441
+ timelineNodes.push(nodeInfo);
16476
16442
  }
16477
16443
  });
16478
16444
  if (timelineNodes.length === 0) return;
16445
+ const sortedTimePoints = Array.from(allTimePoints).sort((a, b) => a - b);
16479
16446
  const maxTimeIndex = sortedTimePoints.length - 1;
16480
16447
  const timeToYMap = new Map(
16481
16448
  sortedTimePoints.map((time, index) => [
@@ -16876,11 +16843,11 @@ function XViewScene({
16876
16843
  }
16877
16844
  }
16878
16845
  });
16879
- const sortedTimePoints2 = Array.from(allActiveTimePoints).sort(
16846
+ const sortedTimePoints = Array.from(allActiveTimePoints).sort(
16880
16847
  (a, b) => a - b
16881
16848
  );
16882
16849
  const timeToYMap = /* @__PURE__ */ new Map();
16883
- sortedTimePoints2.forEach((ms, idx) => {
16850
+ sortedTimePoints.forEach((ms, idx) => {
16884
16851
  timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
16885
16852
  });
16886
16853
  const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
@@ -16899,7 +16866,7 @@ function XViewScene({
16899
16866
  if (!timeInfo.isUndated) {
16900
16867
  nodeY = timeToYMap.get(timeInfo.startDate.getTime());
16901
16868
  } else {
16902
- const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
16869
+ const undatedOffset = sortedTimePoints.length > 0 ? sortedTimePoints.length * 5 : 0;
16903
16870
  nodeY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
16904
16871
  }
16905
16872
  const posKey = `${statusName}_${nodeY}`;
@@ -16982,7 +16949,7 @@ function XViewScene({
16982
16949
  if (!timeInfo.isUndated) {
16983
16950
  targetY = timeToYMap.get(timeInfo.startDate.getTime());
16984
16951
  } else {
16985
- const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
16952
+ const undatedOffset = sortedTimePoints.length > 0 ? sortedTimePoints.length * 5 : 0;
16986
16953
  targetY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
16987
16954
  }
16988
16955
  const posKey = `${statusName}_${targetY}`;
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.17",
3
+ "version": "1.2.8-dev.19",
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",