blixify-ui-web 1.2.197 → 1.2.199

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 (92) hide show
  1. package/lib/components/data/columnTypes/buttonCell.d.ts +17 -0
  2. package/lib/components/data/columnTypes/buttonCell.d.ts.map +1 -0
  3. package/lib/components/data/columnTypes/buttonCell.js +160 -0
  4. package/lib/components/data/columnTypes/buttonCell.js.map +1 -0
  5. package/lib/components/data/columnTypes/context.d.ts +13 -0
  6. package/lib/components/data/columnTypes/context.d.ts.map +1 -0
  7. package/lib/components/data/columnTypes/context.js +8 -0
  8. package/lib/components/data/columnTypes/context.js.map +1 -0
  9. package/lib/components/data/columnTypes/dateRange.d.ts +24 -0
  10. package/lib/components/data/columnTypes/dateRange.d.ts.map +1 -0
  11. package/lib/components/data/columnTypes/dateRange.js +75 -0
  12. package/lib/components/data/columnTypes/dateRange.js.map +1 -0
  13. package/lib/components/data/columnTypes/dateRangeCell.d.ts +20 -0
  14. package/lib/components/data/columnTypes/dateRangeCell.d.ts.map +1 -0
  15. package/lib/components/data/columnTypes/dateRangeCell.js +210 -0
  16. package/lib/components/data/columnTypes/dateRangeCell.js.map +1 -0
  17. package/lib/components/data/columnTypes/groupSections.d.ts +56 -0
  18. package/lib/components/data/columnTypes/groupSections.d.ts.map +1 -0
  19. package/lib/components/data/columnTypes/groupSections.js +170 -0
  20. package/lib/components/data/columnTypes/groupSections.js.map +1 -0
  21. package/lib/components/data/columnTypes/index.d.ts +15 -0
  22. package/lib/components/data/columnTypes/index.d.ts.map +1 -0
  23. package/lib/components/data/columnTypes/index.js +31 -0
  24. package/lib/components/data/columnTypes/index.js.map +1 -0
  25. package/lib/components/data/columnTypes/ratingCell.d.ts +29 -0
  26. package/lib/components/data/columnTypes/ratingCell.d.ts.map +1 -0
  27. package/lib/components/data/columnTypes/ratingCell.js +176 -0
  28. package/lib/components/data/columnTypes/ratingCell.js.map +1 -0
  29. package/lib/components/data/columnTypes/systemColumns.d.ts +27 -0
  30. package/lib/components/data/columnTypes/systemColumns.d.ts.map +1 -0
  31. package/lib/components/data/columnTypes/systemColumns.js +118 -0
  32. package/lib/components/data/columnTypes/systemColumns.js.map +1 -0
  33. package/lib/components/data/columnTypes/timeTracking.d.ts +27 -0
  34. package/lib/components/data/columnTypes/timeTracking.d.ts.map +1 -0
  35. package/lib/components/data/columnTypes/timeTracking.js +127 -0
  36. package/lib/components/data/columnTypes/timeTracking.js.map +1 -0
  37. package/lib/components/data/columnTypes/timeTrackingCell.d.ts +17 -0
  38. package/lib/components/data/columnTypes/timeTrackingCell.d.ts.map +1 -0
  39. package/lib/components/data/columnTypes/timeTrackingCell.js +146 -0
  40. package/lib/components/data/columnTypes/timeTrackingCell.js.map +1 -0
  41. package/lib/components/data/dataTemplate/activityChanges.d.ts.map +1 -1
  42. package/lib/components/data/dataTemplate/activityChanges.js +7 -0
  43. package/lib/components/data/dataTemplate/activityChanges.js.map +1 -1
  44. package/lib/components/data/dataTemplate/dataStateModel.d.ts +6 -0
  45. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  46. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  47. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  48. package/lib/components/data/dataTemplate/index.js +519 -332
  49. package/lib/components/data/dataTemplate/index.js.map +1 -1
  50. package/lib/components/data/dataTemplate/model.d.ts +26 -2
  51. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  52. package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
  53. package/lib/components/data/dataTemplate/settingsModal.js +13 -6
  54. package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
  55. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +1 -0
  56. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
  57. package/lib/components/data/dataTemplate/viewStatePersistence.js +18 -3
  58. package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
  59. package/lib/components/data/flexFilter/index.d.ts.map +1 -1
  60. package/lib/components/data/flexFilter/index.js +17 -1
  61. package/lib/components/data/flexFilter/index.js.map +1 -1
  62. package/lib/components/data/formula/builder.d.ts.map +1 -1
  63. package/lib/components/data/formula/builder.js +30 -10
  64. package/lib/components/data/formula/builder.js.map +1 -1
  65. package/lib/components/data/formula/functions.d.ts +3 -0
  66. package/lib/components/data/formula/functions.d.ts.map +1 -1
  67. package/lib/components/data/formula/functions.js +269 -1
  68. package/lib/components/data/formula/functions.js.map +1 -1
  69. package/lib/components/data/formula/index.d.ts +8 -0
  70. package/lib/components/data/formula/index.d.ts.map +1 -1
  71. package/lib/components/data/formula/index.js +80 -13
  72. package/lib/components/data/formula/index.js.map +1 -1
  73. package/lib/components/data/listModule.d.ts +2 -0
  74. package/lib/components/data/listModule.d.ts.map +1 -1
  75. package/lib/components/data/listModule.js +109 -53
  76. package/lib/components/data/listModule.js.map +1 -1
  77. package/lib/components/data/readModule.d.ts.map +1 -1
  78. package/lib/components/data/readModule.js +105 -74
  79. package/lib/components/data/readModule.js.map +1 -1
  80. package/lib/components/data/updateModule.d.ts.map +1 -1
  81. package/lib/components/data/updateModule.js +78 -28
  82. package/lib/components/data/updateModule.js.map +1 -1
  83. package/lib/components/data/utils.d.ts +1 -0
  84. package/lib/components/data/utils.d.ts.map +1 -1
  85. package/lib/components/data/utils.js +32 -12
  86. package/lib/components/data/utils.js.map +1 -1
  87. package/lib/components/display/newTable/index.d.ts +9 -0
  88. package/lib/components/display/newTable/index.d.ts.map +1 -1
  89. package/lib/components/display/newTable/index.js +362 -109
  90. package/lib/components/display/newTable/index.js.map +1 -1
  91. package/lib/tail.css +2 -2
  92. package/package.json +1 -1
@@ -101,6 +101,9 @@ var textInput_1 = require("../input/textInput");
101
101
  var uploadInput_1 = require("../input/uploadInput");
102
102
  var blobModule_1 = require("./blobModule");
103
103
  var indexedDb_1 = require("./dataTemplate/indexedDb");
104
+ var dateRange_1 = require("./columnTypes/dateRange");
105
+ var ratingCell_1 = require("./columnTypes/ratingCell");
106
+ var timeTrackingCell_1 = require("./columnTypes/timeTrackingCell");
104
107
  var detailList_1 = require("../display/detailList");
105
108
  var readQuery_1 = require("./readQuery");
106
109
  var utils_1 = require("./utils");
@@ -1299,6 +1302,14 @@ exports.renderEachListObject = renderEachListObject;
1299
1302
  // stack and blow the row height out, so those fall back to the plain dropdown.
1300
1303
  // modal is only a button, so it fits. Anything new defaults to the dropdown.
1301
1304
  var CELL_SAFE_LIST_VIEWS = ["modal"];
1305
+ // INFO: the label block every field shows above its control, for the
1306
+ // controls that draw no label of their own
1307
+ var renderFormFieldFrame = function (id, label, labelExtra, subLabel, darkMode, control) { return (react_1.default.createElement("div", { key: "field-".concat(id), "data-testid": "form-field-".concat(id) },
1308
+ label && (react_1.default.createElement("label", { className: "block text-sm font-medium ".concat(darkMode ? "text-white" : "text-gray-700") },
1309
+ label,
1310
+ labelExtra)),
1311
+ subLabel && (react_1.default.createElement("p", { className: "text-xs ".concat(darkMode ? "text-gray-300" : "text-gray-500") }, subLabel)),
1312
+ react_1.default.createElement("div", { className: label ? "mt-1" : "" }, control))); };
1302
1313
  var renderDataTemplateForm = function (data, model, formInputRef, updateMethod, modalInput, cellInput, props, referenceProps, fileProps, objectProps, signatureProps, isForm, offline, columnType, bareUpdateIndividualComponent, mobileView,
1303
1314
  // INFO: app-supplied barcode scanner (e.g. a Capacitor native plugin) routed
1304
1315
  // to barcodeEnabled string fields where the browser BarcodeDetector API is
@@ -1334,7 +1345,7 @@ barcodeScanRequest) {
1334
1345
  cellInput.onBlur(__assign(__assign({}, clonedSelectedData), (_a = {}, _a[id] = value, _a)), { keepEditing: true });
1335
1346
  };
1336
1347
  filteredModel.forEach(function (eachAttribute, index) {
1337
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45;
1348
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48;
1338
1349
  var shouldShow = (0, exports.renderShowCondition)(eachAttribute, clonedSelectedData, isForm);
1339
1350
  if (!shouldShow)
1340
1351
  return;
@@ -1745,9 +1756,18 @@ barcodeScanRequest) {
1745
1756
  : undefined, customElement: eachAttribute.customElement, mobileView: mobileView, imageTagEdit: eachAttribute.imageTagEdit, imageTagOptions: eachAttribute.imageTagOptions, imageTagNewOption: eachAttribute.imageTagNewOption, imageDefaultTag: eachAttribute.imageDefaultTag, imageTagToggleMode: eachAttribute.imageTagToggleMode }));
1746
1757
  break;
1747
1758
  case "number":
1759
+ if (eachAttribute.ratingMax) {
1760
+ inputList[groupId].push(renderFormFieldFrame(eachAttribute.id, label, labelExtra, subLabel, props === null || props === void 0 ? void 0 : props.darkMode, react_1.default.createElement(ratingCell_1.RatingStars, { id: eachAttribute.id, ref: isOptional
1761
+ ? null
1762
+ : formInputRef[(_9 = eachAttribute.refIndex) !== null && _9 !== void 0 ? _9 : index], size: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? "cell" : "form", value: clonedSelectedData[eachAttribute.id], max: eachAttribute.ratingMax, optional: isOptional, readOnly: !!disabled, onChange: function (value) {
1763
+ updateMethod.handleOnChangeDate(eachAttribute.id, value);
1764
+ handleCommitCellPick(eachAttribute.id, value);
1765
+ } })));
1766
+ break;
1767
+ }
1748
1768
  inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
1749
1769
  ? null
1750
- : formInputRef[(_9 = eachAttribute.refIndex) !== null && _9 !== void 0 ? _9 : index], type: "number", value: (_10 = clonedSelectedData[eachAttribute.id]) !== null && _10 !== void 0 ? _10 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, minNumber: eachAttribute.minNumber, maxNumber: eachAttribute.maxNumber, cellInput: {
1770
+ : formInputRef[(_10 = eachAttribute.refIndex) !== null && _10 !== void 0 ? _10 : index], type: "number", value: (_11 = clonedSelectedData[eachAttribute.id]) !== null && _11 !== void 0 ? _11 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, minNumber: eachAttribute.minNumber, maxNumber: eachAttribute.maxNumber, cellInput: {
1751
1771
  active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
1752
1772
  onBlur: cellInput === null || cellInput === void 0 ? void 0 : cellInput.onBlur,
1753
1773
  }, customElement: selectInputCustomElement, mobileView: mobileView }));
@@ -1755,13 +1775,13 @@ barcodeScanRequest) {
1755
1775
  case "reference":
1756
1776
  case "listReference": {
1757
1777
  var selectedReferenceOptions = (props === null || props === void 0 ? void 0 : props.isObject)
1758
- ? ((_11 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions[(objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) + "." + eachAttribute.id]) !== null && _11 !== void 0 ? _11 : [])
1759
- : ((_12 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions[eachAttribute.id]) !== null && _12 !== void 0 ? _12 : []);
1778
+ ? ((_12 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions[(objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) + "." + eachAttribute.id]) !== null && _12 !== void 0 ? _12 : [])
1779
+ : ((_13 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions[eachAttribute.id]) !== null && _13 !== void 0 ? _13 : []);
1760
1780
  if (eachAttribute.referenceMapColumnId) {
1761
1781
  var referenceKey = (props === null || props === void 0 ? void 0 : props.isObject)
1762
1782
  ? "".concat(objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId, ".").concat(eachAttribute.id)
1763
1783
  : eachAttribute.id;
1764
- var referenceDocs = (_14 = (_13 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesDetails) === null || _13 === void 0 ? void 0 : _13[referenceKey]) !== null && _14 !== void 0 ? _14 : [];
1784
+ var referenceDocs = (_15 = (_14 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesDetails) === null || _14 === void 0 ? void 0 : _14[referenceKey]) !== null && _15 !== void 0 ? _15 : [];
1765
1785
  var polygonList_1 = [];
1766
1786
  if (referenceDocs.length > 0) {
1767
1787
  referenceDocs.forEach(function (doc) {
@@ -1827,9 +1847,9 @@ barcodeScanRequest) {
1827
1847
  : null;
1828
1848
  var displayValue = "";
1829
1849
  if (selectedOption) {
1830
- displayValue = "".concat(selectedOption[(_15 = eachAttribute.referenceLabel) !== null && _15 !== void 0 ? _15 : ""], " ");
1850
+ displayValue = "".concat(selectedOption[(_16 = eachAttribute.referenceLabel) !== null && _16 !== void 0 ? _16 : ""], " ");
1831
1851
  if (eachAttribute.referenceMapLabelColumnId) {
1832
- displayValue += "(".concat(selectedOption[(_16 = eachAttribute.referenceMapLabelColumnId) !== null && _16 !== void 0 ? _16 : ""], ")");
1852
+ displayValue += "(".concat(selectedOption[(_17 = eachAttribute.referenceMapLabelColumnId) !== null && _17 !== void 0 ? _17 : ""], ")");
1833
1853
  }
1834
1854
  }
1835
1855
  inputList[groupId].push(react_1.default.createElement("div", { id: eachAttribute.id, className: "flex flex-col gap-y-2" },
@@ -1845,7 +1865,7 @@ barcodeScanRequest) {
1845
1865
  inputList[groupId].push(react_1.default.createElement(react_1.default.Fragment, null,
1846
1866
  react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
1847
1867
  ? null
1848
- : formInputRef[(_17 = eachAttribute.refIndex) !== null && _17 !== void 0 ? _17 : index], id: eachAttribute.id, value: (_18 = clonedSelectedData[eachAttribute.id]) !== null && _18 !== void 0 ? _18 : (eachAttribute.type === "reference" ? "" : []), label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, placeholder: placeholder !== eachAttribute.name
1868
+ : formInputRef[(_18 = eachAttribute.refIndex) !== null && _18 !== void 0 ? _18 : index], id: eachAttribute.id, value: (_19 = clonedSelectedData[eachAttribute.id]) !== null && _19 !== void 0 ? _19 : (eachAttribute.type === "reference" ? "" : []), label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, placeholder: placeholder !== eachAttribute.name
1849
1869
  ? placeholder
1850
1870
  : "Select An Option", showTag: eachAttribute.showTagSelections, disableKeyboard: eachAttribute.disabledKeyboardSearch, options: selectedReferenceOptions, onChange: function (value) {
1851
1871
  updateMethod.handleOnChangeSelect(eachAttribute.id, value);
@@ -1936,14 +1956,14 @@ barcodeScanRequest) {
1936
1956
  }
1937
1957
  inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
1938
1958
  ? null
1939
- : formInputRef[(_19 = eachAttribute.refIndex) !== null && _19 !== void 0 ? _19 : index], type: textType, value: (_20 = clonedSelectedData[eachAttribute.id]) !== null && _20 !== void 0 ? _20 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, cellInput: {
1959
+ : formInputRef[(_20 = eachAttribute.refIndex) !== null && _20 !== void 0 ? _20 : index], type: textType, value: (_21 = clonedSelectedData[eachAttribute.id]) !== null && _21 !== void 0 ? _21 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, cellInput: {
1940
1960
  active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
1941
1961
  onBlur: cellInput === null || cellInput === void 0 ? void 0 : cellInput.onBlur,
1942
1962
  }, mobilePicker: true, mobileCountryEditable: eachAttribute.mobileCountryEditable, capitalize: eachAttribute.type === "string"
1943
1963
  ? eachAttribute.capitalize
1944
1964
  : undefined, strSuggestions: eachAttribute.type === "string" &&
1945
1965
  eachAttribute.stringSuggestions &&
1946
- ((_21 = eachAttribute.stringSuggestions) === null || _21 === void 0 ? void 0 : _21.length) > 0
1966
+ ((_22 = eachAttribute.stringSuggestions) === null || _22 === void 0 ? void 0 : _22.length) > 0
1947
1967
  ? eachAttribute.stringSuggestions
1948
1968
  : undefined, barcodeEnabled:
1949
1969
  // INFO: a table cell editor closes on blur, so tapping scan would
@@ -1964,8 +1984,8 @@ barcodeScanRequest) {
1964
1984
  clonedSelectedData[eachAttribute.id] instanceof Date)
1965
1985
  dateValue = clonedSelectedData[eachAttribute.id];
1966
1986
  else if (typeof clonedSelectedData[eachAttribute.id] === "object")
1967
- dateValue = ((_22 = clonedSelectedData === null || clonedSelectedData === void 0 ? void 0 : clonedSelectedData[eachAttribute.id]) === null || _22 === void 0 ? void 0 : _22["_seconds"])
1968
- ? (0, dayjs_1.default)((_23 = clonedSelectedData === null || clonedSelectedData === void 0 ? void 0 : clonedSelectedData[eachAttribute.id]) === null || _23 === void 0 ? void 0 : _23["_seconds"]).toDate()
1987
+ dateValue = ((_23 = clonedSelectedData === null || clonedSelectedData === void 0 ? void 0 : clonedSelectedData[eachAttribute.id]) === null || _23 === void 0 ? void 0 : _23["_seconds"])
1988
+ ? (0, dayjs_1.default)((_24 = clonedSelectedData === null || clonedSelectedData === void 0 ? void 0 : clonedSelectedData[eachAttribute.id]) === null || _24 === void 0 ? void 0 : _24["_seconds"]).toDate()
1969
1989
  : (0, dayjs_1.default)().toDate();
1970
1990
  else if (clonedSelectedData[eachAttribute.id] === undefined)
1971
1991
  dateValue = undefined;
@@ -1973,7 +1993,7 @@ barcodeScanRequest) {
1973
1993
  var hideDate = eachAttribute.hideShowDate ? true : false;
1974
1994
  inputList[groupId].push(react_1.default.createElement(datePicker_1.InputDatePicker, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, title: label, labelExtra: labelExtra, subLabel: subLabel, id: eachAttribute.id, optional: isOptional, ref: isOptional
1975
1995
  ? null
1976
- : formInputRef[(_24 = eachAttribute.refIndex) !== null && _24 !== void 0 ? _24 : index], onChange: function (id, value) {
1996
+ : formInputRef[(_25 = eachAttribute.refIndex) !== null && _25 !== void 0 ? _25 : index], onChange: function (id, value) {
1977
1997
  updateMethod.handleOnChangeDate(id, value);
1978
1998
  handleCommitCellPick(id, value);
1979
1999
  }, value: dateValue, disabled: disabled, cellInput: {
@@ -1981,16 +2001,46 @@ barcodeScanRequest) {
1981
2001
  onBlur: cellInput === null || cellInput === void 0 ? void 0 : cellInput.onBlur,
1982
2002
  }, minDate: eachAttribute.minDate, maxDate: eachAttribute.maxDate, staticDropdown: modalInput, showTime: showTime, hideDate: hideDate, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, mobileView: mobileView }));
1983
2003
  break;
2004
+ case "dateRange": {
2005
+ var rangeValue_1 = (0, dateRange_1.handleNormaliseDateRange)(clonedSelectedData[eachAttribute.id]);
2006
+ inputList[groupId].push(react_1.default.createElement(datePicker_1.InputDatePicker, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, title: label, labelExtra: labelExtra, subLabel: subLabel, id: eachAttribute.id, range: true,
2007
+ // INFO: a range draws its two ends' titles in place of the field's
2008
+ // own label, so the column's name goes into them
2009
+ startDateTitle: label ? "".concat(label, " Start") : "Start", endDateTitle: label ? "".concat(label, " End") : "End", optional: isOptional, ref: isOptional
2010
+ ? null
2011
+ : formInputRef[(_26 = eachAttribute.refIndex) !== null && _26 !== void 0 ? _26 : index], startDate: rangeValue_1.start, endDate: rangeValue_1.end,
2012
+ // INFO: the date picker hands each end over on its own; the
2013
+ // other end is kept as it is, and a day-only range drops the time
2014
+ onChange: function (id, value, part) {
2015
+ var _a;
2016
+ var nextValue = (_a = {
2017
+ start: rangeValue_1.start,
2018
+ end: rangeValue_1.end
2019
+ },
2020
+ _a[part === "end" ? "end" : "start"] = value,
2021
+ _a);
2022
+ updateMethod.handleOnChangeDate(id, nextValue);
2023
+ handleCommitCellPick(id, nextValue);
2024
+ }, disabled: disabled, minDate: eachAttribute.minDate, maxDate: eachAttribute.maxDate, staticDropdown: modalInput, showTime: false, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, mobileView: mobileView }));
2025
+ break;
2026
+ }
2027
+ case "timeTracking":
2028
+ // INFO: a timer is started and stopped from the table or read view,
2029
+ // never typed into a form — the form shows where it stands
2030
+ if ((props === null || props === void 0 ? void 0 : props.id) === "new" || (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active))
2031
+ break;
2032
+ inputList[groupId].push(renderFormFieldFrame(eachAttribute.id, label, undefined, subLabel, props === null || props === void 0 ? void 0 : props.darkMode, react_1.default.createElement(timeTrackingCell_1.TimeTrackingCell, { column: eachAttribute, rowId: (_27 = props === null || props === void 0 ? void 0 : props.id) !== null && _27 !== void 0 ? _27 : "", value: clonedSelectedData[eachAttribute.id], readOnly: true })));
2033
+ break;
1984
2034
  case "markdown":
1985
2035
  // INFO: read views render markdown statically — mounting a ProseMirror
1986
2036
  // editor per field (even read-only) freezes text-heavy records.
1987
2037
  // MarkdownStatic reproduces the editor's exact output with no editor.
1988
2038
  if ((props === null || props === void 0 ? void 0 : props.type) === "read") {
1989
- inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownStatic, { key: eachAttribute.id, id: eachAttribute.id, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_25 = clonedSelectedData[eachAttribute.id]) !== null && _25 !== void 0 ? _25 : "" }));
2039
+ inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownStatic, { key: eachAttribute.id, id: eachAttribute.id, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_28 = clonedSelectedData[eachAttribute.id]) !== null && _28 !== void 0 ? _28 : "" }));
1990
2040
  break;
1991
2041
  }
1992
- var markdownRef = formInputRef[(_26 = eachAttribute.refIndex) !== null && _26 !== void 0 ? _26 : index];
1993
- inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: markdownRef, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_27 = clonedSelectedData[eachAttribute.id]) !== null && _27 !== void 0 ? _27 : "", placeholder: placeholder, optional: isOptional, onChange: updateMethod.handleOnChangeMarkdown, disabled: disabled, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, lib: ((_28 = props === null || props === void 0 ? void 0 : props.lib) === null || _28 === void 0 ? void 0 : _28.axios) ? { axios: props.lib.axios } : undefined, uploadEndpoint: ((_29 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings) === null || _29 === void 0 ? void 0 : _29.uploadEndpoint) ||
2042
+ var markdownRef = formInputRef[(_29 = eachAttribute.refIndex) !== null && _29 !== void 0 ? _29 : index];
2043
+ inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: markdownRef, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_30 = clonedSelectedData[eachAttribute.id]) !== null && _30 !== void 0 ? _30 : "", placeholder: placeholder, optional: isOptional, onChange: updateMethod.handleOnChangeMarkdown, disabled: disabled, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, lib: ((_31 = props === null || props === void 0 ? void 0 : props.lib) === null || _31 === void 0 ? void 0 : _31.axios) ? { axios: props.lib.axios } : undefined, uploadEndpoint: ((_32 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings) === null || _32 === void 0 ? void 0 : _32.uploadEndpoint) ||
1994
2044
  eachAttribute.uploadEndpoint, enableImageUpload: eachAttribute.enableImageUpload, enableVideoUpload: eachAttribute.enableVideoUpload, compress: eachAttribute.maxFileSize && eachAttribute.compressfileQuality
1995
2045
  ? {
1996
2046
  maxFileSize: eachAttribute.maxFileSize,
@@ -2001,7 +2051,7 @@ barcodeScanRequest) {
2001
2051
  case "textArea":
2002
2052
  inputList[groupId].push(react_1.default.createElement(textArea_1.TextArea, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
2003
2053
  ? null
2004
- : formInputRef[(_30 = eachAttribute.refIndex) !== null && _30 !== void 0 ? _30 : index], label: label, labelExtra: labelExtra, subLabel: subLabel, placeholder: placeholder, value: (_31 = clonedSelectedData[eachAttribute.id]) !== null && _31 !== void 0 ? _31 : "", rows: 4, optional: isOptional, onChange: updateMethod.handleOnChangeText, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, disabled: disabled, customElement: selectInputCustomElement, cellInput: {
2054
+ : formInputRef[(_33 = eachAttribute.refIndex) !== null && _33 !== void 0 ? _33 : index], label: label, labelExtra: labelExtra, subLabel: subLabel, placeholder: placeholder, value: (_34 = clonedSelectedData[eachAttribute.id]) !== null && _34 !== void 0 ? _34 : "", rows: 4, optional: isOptional, onChange: updateMethod.handleOnChangeText, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, disabled: disabled, customElement: selectInputCustomElement, cellInput: {
2005
2055
  active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
2006
2056
  onBlur: cellInput === null || cellInput === void 0 ? void 0 : cellInput.onBlur,
2007
2057
  } }));
@@ -2014,7 +2064,7 @@ barcodeScanRequest) {
2014
2064
  signatureUrl = (0, blobModule_1.renderImageUrlFromPath)(fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint, eachAttribute.imageCollectionName, props === null || props === void 0 ? void 0 : props.id, eachAttribute.imageFileName, clonedSelectedData[eachAttribute.id], fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName);
2015
2065
  }
2016
2066
  inputList[groupId].push(react_1.default.createElement("div", { className: eachAttribute.description ? "w-full min-h-72" : "w-full h-72" },
2017
- react_1.default.createElement(signature_1.Signature, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: formInputRef[(_32 = eachAttribute.refIndex) !== null && _32 !== void 0 ? _32 : index], label: label, labelExtra: labelExtra, description: eachAttribute.description, subLabel: undefined, dataURL: signatureUrl, optional: isOptional, signing: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.signing, onChange: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.setSigning, onSubmit: function (_, dataURL) {
2067
+ react_1.default.createElement(signature_1.Signature, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: formInputRef[(_35 = eachAttribute.refIndex) !== null && _35 !== void 0 ? _35 : index], label: label, labelExtra: labelExtra, description: eachAttribute.description, subLabel: undefined, dataURL: signatureUrl, optional: isOptional, signing: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.signing, onChange: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.setSigning, onSubmit: function (_, dataURL) {
2018
2068
  return updateMethod.handleSignatureComplete(dataURL, eachAttribute.id);
2019
2069
  }, signatureClear: true, canvasContainerClassName: "shadow-none", infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement })));
2020
2070
  break;
@@ -2024,14 +2074,14 @@ barcodeScanRequest) {
2024
2074
  eachAttribute.listFlexTable) {
2025
2075
  var flexTableRef = undefined;
2026
2076
  if (eachAttribute.listFlexTable) {
2027
- var flexTableRefIndex = ((_33 = objectProps === null || objectProps === void 0 ? void 0 : objectProps.flexTableModel) !== null && _33 !== void 0 ? _33 : model)
2077
+ var flexTableRefIndex = ((_36 = objectProps === null || objectProps === void 0 ? void 0 : objectProps.flexTableModel) !== null && _36 !== void 0 ? _36 : model)
2028
2078
  .filter(function (m) { return m.type === "listObject" && m.listFlexTable; })
2029
2079
  .findIndex(function (m) { return m.id === eachAttribute.id; });
2030
2080
  if (flexTableRefIndex >= 0 && (objectProps === null || objectProps === void 0 ? void 0 : objectProps.flexTableRefs)) {
2031
2081
  flexTableRef = objectProps.flexTableRefs[flexTableRefIndex];
2032
2082
  }
2033
2083
  }
2034
- inputList[groupId].push((0, exports.renderEachListObject)((_34 = props === null || props === void 0 ? void 0 : props.type) !== null && _34 !== void 0 ? _34 : "read", eachAttribute.id, model, data, (_35 = props === null || props === void 0 ? void 0 : props.id) !== null && _35 !== void 0 ? _35 : "", (props === null || props === void 0 ? void 0 : props.remainId) ? false : true, isForm ? false : true, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.organiseListObjTableView) ? true : false, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handleSelectListObjectData, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectStructureId, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handlePopUpModal, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedData, flexTableRef, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode }));
2084
+ inputList[groupId].push((0, exports.renderEachListObject)((_37 = props === null || props === void 0 ? void 0 : props.type) !== null && _37 !== void 0 ? _37 : "read", eachAttribute.id, model, data, (_38 = props === null || props === void 0 ? void 0 : props.id) !== null && _38 !== void 0 ? _38 : "", (props === null || props === void 0 ? void 0 : props.remainId) ? false : true, isForm ? false : true, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.organiseListObjTableView) ? true : false, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handleSelectListObjectData, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectStructureId, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handlePopUpModal, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedData, flexTableRef, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode }));
2035
2085
  }
2036
2086
  break;
2037
2087
  case "canvas":
@@ -2047,20 +2097,20 @@ barcodeScanRequest) {
2047
2097
  normalizedDrawings = [];
2048
2098
  }
2049
2099
  else {
2050
- normalizedTexts = (_36 = canvasData.texts) !== null && _36 !== void 0 ? _36 : [];
2051
- normalizedDrawings = (_37 = canvasData.drawings) !== null && _37 !== void 0 ? _37 : [];
2100
+ normalizedTexts = (_39 = canvasData.texts) !== null && _39 !== void 0 ? _39 : [];
2101
+ normalizedDrawings = (_40 = canvasData.drawings) !== null && _40 !== void 0 ? _40 : [];
2052
2102
  }
2053
2103
  }
2054
2104
  else {
2055
2105
  // Old format: expect texts[] array
2056
2106
  normalizedTexts = Array.isArray(canvasData)
2057
2107
  ? canvasData
2058
- : ((_38 = canvasData === null || canvasData === void 0 ? void 0 : canvasData.texts) !== null && _38 !== void 0 ? _38 : []);
2108
+ : ((_41 = canvasData === null || canvasData === void 0 ? void 0 : canvasData.texts) !== null && _41 !== void 0 ? _41 : []);
2059
2109
  normalizedDrawings = [];
2060
2110
  }
2061
2111
  inputList[groupId].push(react_1.default.createElement(canvas_1.Canvas, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
2062
2112
  ? null
2063
- : formInputRef[(_39 = eachAttribute.refIndex) !== null && _39 !== void 0 ? _39 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, optional: isOptional, enableDraw: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableDraw : false, enableImageUpload: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableImageUpload : false, readOnly: (props === null || props === void 0 ? void 0 : props.type) !== "update", texts: normalizedTexts, drawings: normalizedDrawings, backgroundImageUrl: eachAttribute.enableImageUpload &&
2113
+ : formInputRef[(_42 = eachAttribute.refIndex) !== null && _42 !== void 0 ? _42 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, optional: isOptional, enableDraw: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableDraw : false, enableImageUpload: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableImageUpload : false, readOnly: (props === null || props === void 0 ? void 0 : props.type) !== "update", texts: normalizedTexts, drawings: normalizedDrawings, backgroundImageUrl: eachAttribute.enableImageUpload &&
2064
2114
  canvasData &&
2065
2115
  !Array.isArray(canvasData) &&
2066
2116
  canvasData.backgroundImage
@@ -2068,17 +2118,17 @@ barcodeScanRequest) {
2068
2118
  // If it has file but no token, create blob URL from File object
2069
2119
  canvasData.backgroundImage.token
2070
2120
  ? (props === null || props === void 0 ? void 0 : props.isObjectList)
2071
- ? (0, blobModule_1.renderImageUrlFromPath)((_40 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _40 !== void 0 ? _40 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2121
+ ? (0, blobModule_1.renderImageUrlFromPath)((_43 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _43 !== void 0 ? _43 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2072
2122
  "%2F" +
2073
2123
  (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectId) +
2074
2124
  "%2F" +
2075
2125
  eachAttribute.id, canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2076
2126
  : (props === null || props === void 0 ? void 0 : props.isObject)
2077
- ? (0, blobModule_1.renderImageUrlFromPath)((_41 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _41 !== void 0 ? _41 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2127
+ ? (0, blobModule_1.renderImageUrlFromPath)((_44 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _44 !== void 0 ? _44 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2078
2128
  "%2F" +
2079
2129
  eachAttribute.id +
2080
2130
  "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2081
- : (0, blobModule_1.renderImageUrlFromPath)((_42 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _42 !== void 0 ? _42 : "", (_43 = eachAttribute.imageCollectionName) !== null && _43 !== void 0 ? _43 : "", ((_44 = props === null || props === void 0 ? void 0 : props.id) !== null && _44 !== void 0 ? _44 : "") + "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2131
+ : (0, blobModule_1.renderImageUrlFromPath)((_45 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _45 !== void 0 ? _45 : "", (_46 = eachAttribute.imageCollectionName) !== null && _46 !== void 0 ? _46 : "", ((_47 = props === null || props === void 0 ? void 0 : props.id) !== null && _47 !== void 0 ? _47 : "") + "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2082
2132
  : canvasData.backgroundImage.file &&
2083
2133
  canvasData.backgroundImage.file instanceof File
2084
2134
  ? // Image hasn't been uploaded yet - use cached blob URL from File object
@@ -2195,7 +2245,7 @@ barcodeScanRequest) {
2195
2245
  } }));
2196
2246
  break;
2197
2247
  case "ganttchart":
2198
- inputList[groupId].push(react_1.default.createElement(ganttChart_1.GanttChart, { id: eachAttribute.id, title: label, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, tasks: (_45 = clonedSelectedData[eachAttribute.id]) !== null && _45 !== void 0 ? _45 : [], onTaskChange: function (tasks) {
2248
+ inputList[groupId].push(react_1.default.createElement(ganttChart_1.GanttChart, { id: eachAttribute.id, title: label, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, tasks: (_48 = clonedSelectedData[eachAttribute.id]) !== null && _48 !== void 0 ? _48 : [], onTaskChange: function (tasks) {
2199
2249
  updateMethod.handleOnChangeSelect(eachAttribute.id, tasks);
2200
2250
  }, mode: "write", chartOnly: true }));
2201
2251
  break;