@lv-x-software-house/x_view 1.2.8-dev.20 → 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
@@ -2667,7 +2667,7 @@ function createNewCustomProperty(existingProps = []) {
2667
2667
  nextValue = [{ id: (0, import_uuid.v4)(), name: "1", value: "" }];
2668
2668
  break;
2669
2669
  case "date":
2670
- nextKey = "Date";
2670
+ nextKey = "Data";
2671
2671
  nextValue = { type: "Data", value: "" };
2672
2672
  break;
2673
2673
  case "number":
@@ -2921,7 +2921,7 @@ var IGNORED_KEYS = [
2921
2921
  ];
2922
2922
  function extractCustomPropsFromNode(node) {
2923
2923
  const customPropTypes = node._customPropTypes || {};
2924
- return Object.keys(node).filter((k) => !IGNORED_KEYS.includes(k)).map((key) => {
2924
+ return Object.keys(node).filter((k) => !IGNORED_KEYS.includes(k) || customPropTypes[k]).map((key) => {
2925
2925
  const val = node[key];
2926
2926
  const t = customPropTypes[key] || inferPropType(val);
2927
2927
  if (t === "date") {
@@ -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;
@@ -5110,7 +5121,7 @@ function CustomPropertyDisplay({
5110
5121
  links: "Links",
5111
5122
  images: "Images",
5112
5123
  documents: "Documents",
5113
- date: "Date"
5124
+ date: "Data"
5114
5125
  };
5115
5126
  const oldKeyIsFixed = Object.values(fixedKeyMap).includes(tempProp.key);
5116
5127
  if (fixedKeyMap[value]) {
@@ -12489,7 +12500,6 @@ function QuestDetailsPanel({
12489
12500
  setIsSaving(false);
12490
12501
  }
12491
12502
  };
12492
- const filteredCustomProps = customProps.filter((p) => p.key !== "Date" && p.key !== "Data");
12493
12503
  const handleAddTimelineNote = async () => {
12494
12504
  if (!noteText.trim() && noteLinks.length === 0 && noteImages.length === 0 || isSaving) return;
12495
12505
  setIsSaving(true);
@@ -16211,13 +16221,7 @@ function XViewScene({
16211
16221
  return null;
16212
16222
  };
16213
16223
  Object.values(nodeObjects).forEach((mesh) => {
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);
16224
+ const dateProp = extractDatePropFromNode(mesh.userData);
16221
16225
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16222
16226
  if (dateProp) {
16223
16227
  const info = parseDateProp(dateProp);
@@ -16356,13 +16360,7 @@ function XViewScene({
16356
16360
  return null;
16357
16361
  };
16358
16362
  versionMeshes.forEach((mesh) => {
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";
16364
- }
16365
- )) == null ? void 0 : _a2.value);
16363
+ const dateProp = extractDatePropFromNode(mesh.userData);
16366
16364
  if (!dateProp) return;
16367
16365
  const info = parseDateProp(dateProp);
16368
16366
  if (!info.isUndated) {
package/dist/index.mjs CHANGED
@@ -2628,7 +2628,7 @@ function createNewCustomProperty(existingProps = []) {
2628
2628
  nextValue = [{ id: uuidv4(), name: "1", value: "" }];
2629
2629
  break;
2630
2630
  case "date":
2631
- nextKey = "Date";
2631
+ nextKey = "Data";
2632
2632
  nextValue = { type: "Data", value: "" };
2633
2633
  break;
2634
2634
  case "number":
@@ -2882,7 +2882,7 @@ var IGNORED_KEYS = [
2882
2882
  ];
2883
2883
  function extractCustomPropsFromNode(node) {
2884
2884
  const customPropTypes = node._customPropTypes || {};
2885
- return Object.keys(node).filter((k) => !IGNORED_KEYS.includes(k)).map((key) => {
2885
+ return Object.keys(node).filter((k) => !IGNORED_KEYS.includes(k) || customPropTypes[k]).map((key) => {
2886
2886
  const val = node[key];
2887
2887
  const t = customPropTypes[key] || inferPropType(val);
2888
2888
  if (t === "date") {
@@ -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;
@@ -5071,7 +5082,7 @@ function CustomPropertyDisplay({
5071
5082
  links: "Links",
5072
5083
  images: "Images",
5073
5084
  documents: "Documents",
5074
- date: "Date"
5085
+ date: "Data"
5075
5086
  };
5076
5087
  const oldKeyIsFixed = Object.values(fixedKeyMap).includes(tempProp.key);
5077
5088
  if (fixedKeyMap[value]) {
@@ -12527,7 +12538,6 @@ function QuestDetailsPanel({
12527
12538
  setIsSaving(false);
12528
12539
  }
12529
12540
  };
12530
- const filteredCustomProps = customProps.filter((p) => p.key !== "Date" && p.key !== "Data");
12531
12541
  const handleAddTimelineNote = async () => {
12532
12542
  if (!noteText.trim() && noteLinks.length === 0 && noteImages.length === 0 || isSaving) return;
12533
12543
  setIsSaving(true);
@@ -16274,13 +16284,7 @@ function XViewScene({
16274
16284
  return null;
16275
16285
  };
16276
16286
  Object.values(nodeObjects).forEach((mesh) => {
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);
16287
+ const dateProp = extractDatePropFromNode(mesh.userData);
16284
16288
  let nodeInfo = { mesh, type: "point", label: "", isUndated: true };
16285
16289
  if (dateProp) {
16286
16290
  const info = parseDateProp(dateProp);
@@ -16419,13 +16423,7 @@ function XViewScene({
16419
16423
  return null;
16420
16424
  };
16421
16425
  versionMeshes.forEach((mesh) => {
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";
16427
- }
16428
- )) == null ? void 0 : _a2.value);
16426
+ const dateProp = extractDatePropFromNode(mesh.userData);
16429
16427
  if (!dateProp) return;
16430
16428
  const info = parseDateProp(dateProp);
16431
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.20",
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",