blixify-ui-web 1.2.60 → 1.2.63

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 (69) hide show
  1. package/lib/components/action/radioList/index.d.ts +2 -0
  2. package/lib/components/action/radioList/index.d.ts.map +1 -1
  3. package/lib/components/action/radioList/index.js +13 -7
  4. package/lib/components/action/radioList/index.js.map +1 -1
  5. package/lib/components/data/dataTemplate/dataStateModel.d.ts +9 -0
  6. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  7. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  8. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  9. package/lib/components/data/dataTemplate/index.js +404 -184
  10. package/lib/components/data/dataTemplate/index.js.map +1 -1
  11. package/lib/components/data/dataTemplate/model.d.ts +4 -0
  12. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  13. package/lib/components/data/listModule.d.ts.map +1 -1
  14. package/lib/components/data/listModule.js +7 -1
  15. package/lib/components/data/listModule.js.map +1 -1
  16. package/lib/components/data/moduleUtils.d.ts +1 -0
  17. package/lib/components/data/moduleUtils.d.ts.map +1 -1
  18. package/lib/components/data/moduleUtils.js +144 -114
  19. package/lib/components/data/moduleUtils.js.map +1 -1
  20. package/lib/components/data/readModule.d.ts.map +1 -1
  21. package/lib/components/data/readModule.js +24 -6
  22. package/lib/components/data/readModule.js.map +1 -1
  23. package/lib/components/data/testSchema.js +1 -1
  24. package/lib/components/data/testSchema.js.map +1 -1
  25. package/lib/components/data/updateModule.d.ts +3 -0
  26. package/lib/components/data/updateModule.d.ts.map +1 -1
  27. package/lib/components/data/updateModule.js +44 -17
  28. package/lib/components/data/updateModule.js.map +1 -1
  29. package/lib/components/data/utils.d.ts +2 -0
  30. package/lib/components/data/utils.d.ts.map +1 -1
  31. package/lib/components/data/utils.js +42 -1
  32. package/lib/components/data/utils.js.map +1 -1
  33. package/lib/components/display/flexTable/index.d.ts +14 -0
  34. package/lib/components/display/flexTable/index.d.ts.map +1 -1
  35. package/lib/components/display/flexTable/index.js +97 -17
  36. package/lib/components/display/flexTable/index.js.map +1 -1
  37. package/lib/components/display/newTable/index.d.ts +8 -0
  38. package/lib/components/display/newTable/index.d.ts.map +1 -1
  39. package/lib/components/display/newTable/index.js +428 -107
  40. package/lib/components/display/newTable/index.js.map +1 -1
  41. package/lib/components/display/notification/index.d.ts +2 -0
  42. package/lib/components/display/notification/index.d.ts.map +1 -1
  43. package/lib/components/display/notification/index.js +2 -1
  44. package/lib/components/display/notification/index.js.map +1 -1
  45. package/lib/components/display/scrollShadow/index.d.ts +9 -0
  46. package/lib/components/display/scrollShadow/index.d.ts.map +1 -0
  47. package/lib/components/display/scrollShadow/index.js +66 -0
  48. package/lib/components/display/scrollShadow/index.js.map +1 -0
  49. package/lib/components/display/stepper/index.d.ts +3 -0
  50. package/lib/components/display/stepper/index.d.ts.map +1 -1
  51. package/lib/components/display/stepper/index.js +28 -11
  52. package/lib/components/display/stepper/index.js.map +1 -1
  53. package/lib/components/display/table/index.d.ts.map +1 -1
  54. package/lib/components/display/table/index.js +3 -2
  55. package/lib/components/display/table/index.js.map +1 -1
  56. package/lib/components/input/datePicker/index.d.ts.map +1 -1
  57. package/lib/components/input/datePicker/index.js +5 -5
  58. package/lib/components/input/datePicker/index.js.map +1 -1
  59. package/lib/components/input/select/index.d.ts.map +1 -1
  60. package/lib/components/input/select/index.js +10 -9
  61. package/lib/components/input/select/index.js.map +1 -1
  62. package/lib/components/input/textArea/index.d.ts.map +1 -1
  63. package/lib/components/input/textArea/index.js +19 -3
  64. package/lib/components/input/textArea/index.js.map +1 -1
  65. package/lib/components/input/textInput/index.d.ts.map +1 -1
  66. package/lib/components/input/textInput/index.js +23 -10
  67. package/lib/components/input/textInput/index.js.map +1 -1
  68. package/lib/tail.css +2 -2
  69. package/package.json +1 -1
@@ -166,6 +166,18 @@ var handleGetWriteErrorMessage = function (response) {
166
166
  return response.data.err;
167
167
  return "Please contact our administrator for assistance or try your request again later. We apologize for any inconvenience";
168
168
  };
169
+ // INFO: apps hide the library's action buttons by returning an empty fragment
170
+ // from bareUpdateActionComponent — an empty fragment must not leave an empty
171
+ // floating bar behind
172
+ var handleIsEmptyElement = function (element) {
173
+ var _a;
174
+ return element === undefined ||
175
+ element === null ||
176
+ element === false ||
177
+ (react_1.default.isValidElement(element) &&
178
+ element.type === react_1.default.Fragment &&
179
+ !((_a = element.props) === null || _a === void 0 ? void 0 : _a.children));
180
+ };
169
181
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
170
182
  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, _49, _50;
171
183
  var intialiseDefaultFilterValues = function () {
@@ -238,6 +250,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
238
250
  }), persistedState = _52.persistedState, isPersistEnabled = _52.isEnabled, handleSaveView = _52.handleSaveView;
239
251
  var _53 = (0, react_1.useState)(false), loading = _53[0], setLoading = _53[1];
240
252
  var _54 = (0, react_1.useState)(), notification = _54[0], setNotification = _54[1];
253
+ // INFO: a success toast is confirmation, not a decision — it clears itself so
254
+ // it never sits on the floating step bar; errors stay until dismissed
255
+ (0, react_1.useEffect)(function () {
256
+ if (!(notification === null || notification === void 0 ? void 0 : notification.type))
257
+ return;
258
+ var timer = setTimeout(function () { return setNotification(null); }, 4000);
259
+ return function () { return clearTimeout(timer); };
260
+ }, [notification]);
241
261
  //INFO : Used by List
242
262
  var _55 = (0, react_1.useState)((_b = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _b !== void 0 ? _b : initialFilterSearch), filterSearch = _55[0], setFilterSearch = _55[1];
243
263
  var _56 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearchParams), filterSearchParams = _56[0], setFilterSearchParams = _56[1];
@@ -462,6 +482,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
462
482
  // overwriting persisted structure with props.model on the first render
463
483
  var persistedViewMountedRef = (0, react_1.useRef)(false);
464
484
  var formRef = (0, react_1.createRef)();
485
+ // INFO: a draft written because the user moved to another step is routine —
486
+ // the toast is reserved for an explicit Save; the ref is read by the draft
487
+ // notification and reset straight after
488
+ var silentDraftRef = (0, react_1.useRef)(false);
465
489
  var objectFormRef = (0, react_1.createRef)();
466
490
  var listAddressFromRef = (0, react_1.createRef)();
467
491
  var listAddressInputRef = (0, react_1.createRef)();
@@ -1468,7 +1492,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1468
1492
  switch (_a.label) {
1469
1493
  case 0:
1470
1494
  refFields = structure.filter(function (s) {
1471
- return (utils_1.REFERENCE_DATA_TYPES.includes(s.type)) &&
1495
+ return utils_1.REFERENCE_DATA_TYPES.includes(s.type) &&
1472
1496
  s.referenceSpaceId &&
1473
1497
  s.referenceLabel;
1474
1498
  });
@@ -1948,8 +1972,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1948
1972
  var handleSeedListReferenceOptions = function (details) {
1949
1973
  var seeded = {};
1950
1974
  Object.entries(details !== null && details !== void 0 ? details : {}).forEach(function (_a) {
1975
+ var _b, _c;
1951
1976
  var eachKey = _a[0], eachDocs = _a[1];
1952
- var model = structure.find(function (eachModel) { return eachModel.id === eachKey; });
1977
+ // INFO: "careExpert.organisationId" points at a reference nested in an
1978
+ // object — resolve its label settings from the object's own structure
1979
+ var _d = eachKey.split("."), objectId = _d[0], subId = _d[1];
1980
+ var model = subId
1981
+ ? (_c = (_b = structure
1982
+ .find(function (eachModel) { return eachModel.id === objectId; })) === null || _b === void 0 ? void 0 : _b.objectData) === null || _c === void 0 ? void 0 : _c.find(function (eachSub) { return eachSub.id === subId; })
1983
+ : structure.find(function (eachModel) { return eachModel.id === eachKey; });
1953
1984
  if (!model || !Array.isArray(eachDocs))
1954
1985
  return;
1955
1986
  seeded[eachKey] = eachDocs.map(function (eachDoc) {
@@ -2160,20 +2191,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2160
2191
  return __generator(this, function (_a) {
2161
2192
  switch (_a.label) {
2162
2193
  case 0:
2163
- if (!((utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type)) &&
2194
+ if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type) &&
2164
2195
  eachModel.referenceMapColumnId)) return [3 /*break*/, 2];
2165
2196
  return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachModel, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, undefined, undefined, undefined, undefined, props.type === "read")];
2166
2197
  case 1:
2167
2198
  _a.sent();
2168
2199
  _a.label = 2;
2169
2200
  case 2:
2170
- if (!((utils_1.OBJECT_DATA_TYPES.includes(eachModel.type)) &&
2201
+ if (!(utils_1.OBJECT_DATA_TYPES.includes(eachModel.type) &&
2171
2202
  eachModel.objectData)) return [3 /*break*/, 4];
2172
2203
  return [4 /*yield*/, Promise.all(eachModel.objectData.map(function (eachObjectData) { return __awaiter(void 0, void 0, void 0, function () {
2173
2204
  return __generator(this, function (_a) {
2174
2205
  switch (_a.label) {
2175
2206
  case 0:
2176
- if (!((utils_1.REFERENCE_DATA_TYPES.includes(eachObjectData.type)) &&
2207
+ if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachObjectData.type) &&
2177
2208
  eachObjectData.referenceMapColumnId)) return [3 /*break*/, 2];
2178
2209
  return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachObjectData, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, eachModel.id, eachModel.type === "listObject", selectedData, undefined, props.type === "read")];
2179
2210
  case 1:
@@ -3024,7 +3055,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3024
3055
  case 1:
3025
3056
  _a.sent();
3026
3057
  multiImageAttribute = model.filter(function (eachAttribute) {
3027
- return (utils_1.MULTIPLE_ASSET_DATA_TYPES.includes(eachAttribute.type));
3058
+ return utils_1.MULTIPLE_ASSET_DATA_TYPES.includes(eachAttribute.type);
3028
3059
  });
3029
3060
  return [4 /*yield*/, Promise.all(multiImageAttribute.map(function (eachImage) { return __awaiter(void 0, void 0, void 0, function () {
3030
3061
  var _a, _b, _c, _d;
@@ -4431,15 +4462,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4431
4462
  _x.sent();
4432
4463
  _x.label = 37;
4433
4464
  case 37:
4434
- setNotification({
4435
- type: true,
4436
- title: props.id === "new"
4437
- ? "Created Successfully"
4438
- : "Updated Successfully",
4439
- msg: props.id === "new"
4440
- ? "Data sucessfully created"
4441
- : "Data sucessfully updated",
4442
- });
4465
+ // INFO: a draft save announces itself (or stays silent on a step
4466
+ // change) further up — this toast is for a real update only
4467
+ if (!isDraft) {
4468
+ setNotification({
4469
+ type: true,
4470
+ title: props.id === "new"
4471
+ ? "Created Successfully"
4472
+ : "Updated Successfully",
4473
+ msg: props.id === "new"
4474
+ ? "Data sucessfully created"
4475
+ : "Data sucessfully updated",
4476
+ });
4477
+ }
4443
4478
  _x.label = 38;
4444
4479
  case 38:
4445
4480
  dataId = res ? id : "";
@@ -4665,11 +4700,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4665
4700
  if (props.id === "new" || !props.id) {
4666
4701
  (_g = (_f = props.organise) === null || _f === void 0 ? void 0 : _f.handleNavigate) === null || _g === void 0 ? void 0 : _g.call(_f, "update", res, (_h = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.id) !== null && _h !== void 0 ? _h : "general");
4667
4702
  }
4668
- setNotification({
4669
- type: true,
4670
- title: "Draft Saved",
4671
- msg: "Your changes have been saved",
4672
- });
4703
+ if (silentDraftRef.current) {
4704
+ silentDraftRef.current = false;
4705
+ }
4706
+ else {
4707
+ setNotification({
4708
+ type: true,
4709
+ title: "Draft Saved",
4710
+ msg: "Your changes have been saved",
4711
+ });
4712
+ }
4673
4713
  }
4674
4714
  else {
4675
4715
  // INFO: Non-draft (final submit) — reset dirty tracking and rebase baseline.
@@ -4767,7 +4807,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4767
4807
  // INFO: convert raw docs to Option[] format so reference Select
4768
4808
  // components receive { key, label, secondaryLabel } as expected
4769
4809
  // (mirrors the shape handleRetrieveObjectReferenceOptions builds online)
4770
- if ((utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type)) &&
4810
+ if (utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type) &&
4771
4811
  eachModel.referenceLabel) {
4772
4812
  clonedReferencesOptions_1[eachModel.id] = offlineData.map(function (r) {
4773
4813
  var _a, _b, _c, _d;
@@ -5225,13 +5265,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5225
5265
  var selectedModel = structure.find(function (eachModel) {
5226
5266
  return eachModel.id === eachValue;
5227
5267
  });
5228
- if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "object" || (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "listObject") {
5268
+ if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "object" ||
5269
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "listObject") {
5229
5270
  var selectedObjectModel = (_c = selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.objectData) === null || _c === void 0 ? void 0 : _c.find(function (eachModel) {
5230
5271
  return eachModel.id === listCSVObjAttribute[eachKey];
5231
5272
  });
5232
5273
  if ((selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "image" ||
5233
5274
  (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "file" ||
5234
- (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleImage" || (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleFile") {
5275
+ (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleImage" ||
5276
+ (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleFile") {
5235
5277
  csvList_1.push({
5236
5278
  id: (_d = listCSVObjAttribute[eachKey]) !== null && _d !== void 0 ? _d : "",
5237
5279
  ori: Number(eachKey),
@@ -5255,7 +5297,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5255
5297
  }
5256
5298
  else if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "image" ||
5257
5299
  (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "file" ||
5258
- (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleImage" || (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleFile") {
5300
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleImage" ||
5301
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleFile") {
5259
5302
  csvList_1.push({
5260
5303
  id: eachValue !== null && eachValue !== void 0 ? eachValue : "",
5261
5304
  ori: Number(eachKey),
@@ -6163,7 +6206,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6163
6206
  var renderDetailListData = function (model) {
6164
6207
  var detailList = [];
6165
6208
  model
6166
- .filter(function (eachAttribute) { return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type); })
6209
+ .filter(function (eachAttribute) {
6210
+ return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type);
6211
+ })
6167
6212
  .map(function (eachAttribute) {
6168
6213
  var _a, _b, _c, _d, _e, _f;
6169
6214
  var selectedDataKey = Object.keys(selectedData).find(function (eachKey) { return eachKey === eachAttribute.id; });
@@ -6431,90 +6476,186 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6431
6476
  // INFO: placement is decided by the caller (see isBottom in renderContent), so this only
6432
6477
  // builds the buttons. It previously took an isBottom argument purely to add a top margin
6433
6478
  // to the list's create button when that button was pushed below the table.
6434
- var renderActionButtons = function (type, hasTabAlign, uniqueTabIds) {
6435
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6479
+ // INFO: the labelled footer of a multi-tab update form — Previous, a step
6480
+ // counter, then the same Save / Submit the header offers and a Continue
6481
+ // button that reuses the bareSaveOnTabChange draft-save. Replaces the bare
6482
+ // chevron icons, which gave no sense of position in a long form.
6483
+ var renderStepBar = function (uniqueTabIds) {
6484
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6485
+ var hasTabAlign = ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabAlign) || ((_b = props.space) === null || _b === void 0 ? void 0 : _b.tabAlign);
6486
+ if (props.type !== "update")
6487
+ return null;
6488
+ // INFO: navigation only makes sense with more than one tab; the actions
6489
+ // are the same floating bar on every update form
6490
+ var isTabbed = !!hasTabAlign && uniqueTabIds.length > 1;
6491
+ var currentTabIndex = uniqueTabIds.findIndex(function (tabId) { return tabId === (activeTab || ""); });
6492
+ var isFirst = currentTabIndex <= 0;
6493
+ var isLast = currentTabIndex >= uniqueTabIds.length - 1;
6494
+ var handleMoveTab = function (direction) { return __awaiter(void 0, void 0, void 0, function () {
6495
+ var _a;
6496
+ return __generator(this, function (_b) {
6497
+ switch (_b.label) {
6498
+ case 0:
6499
+ if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareSaveOnTabChange)) return [3 /*break*/, 2];
6500
+ // INFO: the form's save resolves before the request does, so the flag
6501
+ // is consumed by the notification itself; the timer only covers a save
6502
+ // that never reaches it (validation stop, network error)
6503
+ silentDraftRef.current = true;
6504
+ setTimeout(function () {
6505
+ silentDraftRef.current = false;
6506
+ }, 5000);
6507
+ return [4 /*yield*/, handleFormSaveDraft()];
6508
+ case 1:
6509
+ _b.sent();
6510
+ _b.label = 2;
6511
+ case 2:
6512
+ handleUpdateTabId(uniqueTabIds[currentTabIndex + direction]);
6513
+ return [2 /*return*/];
6514
+ }
6515
+ });
6516
+ }); };
6517
+ var bareActionComponent = (_e = (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareUpdateActionComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData, formRef)) !== null && _e !== void 0 ? _e : undefined;
6518
+ var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6519
+ var hasActions = bareActionComponent ? hasCustomActions : true;
6520
+ var showDelete = !!((_f = props.edit) === null || _f === void 0 ? void 0 : _f.deleteBtn) && isEditor && props.id !== "new";
6521
+ if (!isTabbed && !hasActions && !showDelete)
6522
+ return null;
6523
+ return (
6524
+ // INFO: sticky, not fixed — it stays visible on a long tab yet never
6525
+ // covers content that is not the form's own
6526
+ // INFO: one row at every width — a phone keeps the whole bar under
6527
+ // 60px, so it never hides the field being edited. Left cluster is
6528
+ // navigation (Previous · counter · Next), right cluster is actions
6529
+ // (Save · Submit or the caller's own component)
6530
+ react_1.default.createElement("div", { "data-testid": "dtw-step-bar", className: "sticky bottom-3 z-20 -mx-2 mt-6 flex flex-row items-center gap-2 whitespace-nowrap rounded-2xl border border-gray-200 bg-white/95 px-3 py-2 shadow-lg backdrop-blur sm:mx-0 sm:px-4" },
6531
+ isTabbed && (react_1.default.createElement(react_1.default.Fragment, null,
6532
+ react_1.default.createElement("div", { className: "sm:hidden" },
6533
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-previous-icon", size: "small", background: "bg-white border border-gray-300 hover:bg-gray-50", icon: react_1.default.createElement(HeroIcons.ChevronLeftIcon, { className: "w-5 h-5 text-gray-700" }), disabled: isFirst, onClick: function () { return handleMoveTab(-1); } })),
6534
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6535
+ react_1.default.createElement(button_1.Button, { id: "dtw-previous", text: "Previous", type: "light", size: "small", icon: react_1.default.createElement(HeroIcons.ChevronLeftIcon, { className: "w-4 h-4" }), disable: isFirst, onClick: function () { return handleMoveTab(-1); } })),
6536
+ react_1.default.createElement("span", { "data-testid": "dtw-step-counter", className: "text-xs text-gray-500 sm:text-sm" },
6537
+ react_1.default.createElement("span", { className: "sm:hidden" },
6538
+ currentTabIndex + 1,
6539
+ "/",
6540
+ uniqueTabIds.length),
6541
+ react_1.default.createElement("span", { className: "hidden sm:inline" },
6542
+ "Step ",
6543
+ currentTabIndex + 1,
6544
+ " of ",
6545
+ uniqueTabIds.length)),
6546
+ react_1.default.createElement("div", { className: "sm:hidden" },
6547
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-next-icon", size: "small", background: isLast
6548
+ ? "bg-gray-100 border border-gray-200"
6549
+ : "bg-white border border-gray-300 hover:bg-gray-50", icon: react_1.default.createElement(HeroIcons.ChevronRightIcon, { className: "w-5 h-5 ".concat(isLast ? "text-gray-400" : "text-gray-700") }), disabled: isLast, onClick: function () { return handleMoveTab(1); } })),
6550
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6551
+ react_1.default.createElement(button_1.Button, { id: "dtw-continue", text: "Next", type: "light", size: "small", disable: isLast, onClick: function () { return handleMoveTab(1); } })))),
6552
+ react_1.default.createElement("div", { className: "flex-1" }),
6553
+ react_1.default.createElement("div", { className: "flex flex-row items-center gap-2" },
6554
+ ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && isEditor && props.id !== "new" && (react_1.default.createElement(react_1.default.Fragment, null,
6555
+ react_1.default.createElement("div", { className: "sm:hidden" },
6556
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-delete-icon", size: "small", background: "bg-white border border-red-200 hover:bg-red-50", icon: react_1.default.createElement(HeroIcons.TrashIcon, { className: "w-5 h-5 text-red-600" }), onClick: function () {
6557
+ setDeleteModal(true);
6558
+ } })),
6559
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6560
+ react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", type: "light", size: "small", className: "!text-red-600", onClick: function () {
6561
+ setDeleteModal(true);
6562
+ } })))),
6563
+ hasCustomActions && bareActionComponent,
6564
+ !bareActionComponent && ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.enableUpdateDraft) && (react_1.default.createElement(button_1.Button, { id: "dtw-step-save", text: "Save", type: "light", size: "small", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6565
+ return __generator(this, function (_a) {
6566
+ switch (_a.label) {
6567
+ case 0: return [4 /*yield*/, handleFormSaveDraft()];
6568
+ case 1:
6569
+ _a.sent();
6570
+ return [2 /*return*/];
6571
+ }
6572
+ });
6573
+ }); } })),
6574
+ !bareActionComponent && (react_1.default.createElement(button_1.Button, { id: "dtw-step-submit", text: "Submit", type: "normal", size: "small", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6575
+ return __generator(this, function (_a) {
6576
+ switch (_a.label) {
6577
+ case 0: return [4 /*yield*/, handleFormSubmit()];
6578
+ case 1:
6579
+ _a.sent();
6580
+ return [2 /*return*/];
6581
+ }
6582
+ });
6583
+ }); } })))));
6584
+ };
6585
+ // INFO: the read view's floating bar — the same pill as the update form,
6586
+ // carrying Update (or the caller's own component), Export PDF and Log
6587
+ var renderReadBar = function () {
6588
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6589
+ if (props.type !== "read")
6590
+ return null;
6436
6591
  var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef)) !== null && _c !== void 0 ? _c : undefined;
6437
- if (type === "read") {
6438
- return (react_1.default.createElement("div", { className: "flex flex-row mt-3 sm:ml-3 sm:mt-0" },
6439
- bareActionComponent,
6440
- ((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF) && (react_1.default.createElement(button_1.Button, { type: "normal", text: "Export PDF", className: "mr-3", onClick: handleExportReadPDF })),
6441
- isActivityLog && (react_1.default.createElement(button_1.Button, { type: "normal", text: "Log", onClick: function () { return setActivityModal(true); }, className: !bareActionComponent ? "mr-3" : "" })),
6442
- !bareActionComponent && !((_f = props.edit) === null || _f === void 0 ? void 0 : _f.disabledUpdate) && (react_1.default.createElement("div", { className: "w-xs" }, hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", className: "w-full", type: "normal", onClick: function () {
6592
+ var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6593
+ var showUpdate = !bareActionComponent && !((_d = props.edit) === null || _d === void 0 ? void 0 : _d.disabledUpdate);
6594
+ var showExport = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.exportSettings) === null || _f === void 0 ? void 0 : _f.enableExportReadPDF);
6595
+ var showDelete = !!((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && isEditor && props.id !== "new";
6596
+ if (!hasCustomActions &&
6597
+ !showUpdate &&
6598
+ !showExport &&
6599
+ !isActivityLog &&
6600
+ !showDelete)
6601
+ return null;
6602
+ return (react_1.default.createElement("div", { "data-testid": "dtw-read-bar", className: "sticky bottom-3 z-20 -mx-2 mt-6 flex flex-row items-center justify-end gap-2 whitespace-nowrap rounded-2xl border border-gray-200 bg-white/95 px-3 py-2 shadow-lg backdrop-blur sm:mx-0 sm:px-4" },
6603
+ ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.deleteBtn) && isEditor && props.id !== "new" && (react_1.default.createElement(react_1.default.Fragment, null,
6604
+ react_1.default.createElement("div", { className: "sm:hidden" },
6605
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-delete-icon", size: "small", background: "bg-white border border-red-200 hover:bg-red-50", icon: react_1.default.createElement(HeroIcons.TrashIcon, { className: "w-5 h-5 text-red-600" }), onClick: function () {
6606
+ setDeleteModal(true);
6607
+ } })),
6608
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6609
+ react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", type: "light", size: "small", className: "!text-red-600", onClick: function () {
6610
+ setDeleteModal(true);
6611
+ } })))),
6612
+ showExport && (react_1.default.createElement(button_1.Button, { type: "light", text: "Export PDF", size: "small", onClick: handleExportReadPDF })),
6613
+ isActivityLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
6614
+ hasCustomActions && bareActionComponent,
6615
+ showUpdate &&
6616
+ (hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small", onClick: function () {
6443
6617
  var _a, _b;
6444
6618
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", props.id);
6445
- } })) : (react_1.default.createElement(link_1.Link, { className: "w-full", href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=update&collection=").concat(props.collectionId, "&view=general"), linkType: props.linkType, custom: props.custom },
6446
- react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", className: "w-full", type: "normal" }))))),
6447
- ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && (react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", className: "w-xs ml-3", type: "danger", onClick: function () {
6448
- setDeleteModal(true);
6449
- } }))));
6619
+ } })) : (react_1.default.createElement(link_1.Link, { href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=update&collection=").concat(props.collectionId, "&view=general"), linkType: props.linkType, custom: props.custom },
6620
+ react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small" }))))));
6621
+ };
6622
+ // INFO: tab navigation moved to renderStepBar — the alignment and tab ids
6623
+ // are still accepted so existing call sites stay unchanged
6624
+ // INFO: a tabbed update form has exactly one action bar — the sticky step bar
6625
+ // under the form. Its header row keeps only Delete, a destructive action that
6626
+ // should not sit at the end of a "continue, continue" flow.
6627
+ var renderActionButtons = function (type, _hasTabAlign, _uniqueTabIds) {
6628
+ var _a, _b, _c, _d, _e, _f;
6629
+ var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef)) !== null && _c !== void 0 ? _c : undefined;
6630
+ // INFO: every update form carries Save / Submit in the floating bar, so
6631
+ // the header keeps only Delete
6632
+ var isTabbedUpdate = type === "update";
6633
+ if (type === "read") {
6634
+ // INFO: every read-view action, Delete included, lives in the floating bar
6635
+ return null;
6450
6636
  }
6451
6637
  else if (type === "update") {
6452
- var currentTabIndex_1 = (uniqueTabIds || []).findIndex(function (tabId) { return tabId === (activeTab || ""); });
6453
- return (react_1.default.createElement("div", { className: "flex flex-row h-fit w-full mt-5 sm:justify-end sm:mt-0" },
6454
- bareActionComponent ? (bareActionComponent) : (react_1.default.createElement(react_1.default.Fragment, null,
6455
- hasTabAlign && (uniqueTabIds || []).length > 1 && (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ChevronLeftIcon, { className: "w-5 h-5 text-primary-500" }), onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6456
- var previousTabId;
6457
- var _a;
6458
- return __generator(this, function (_b) {
6459
- switch (_b.label) {
6460
- case 0:
6461
- if (!(currentTabIndex_1 > 0)) return [3 /*break*/, 3];
6462
- if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareSaveOnTabChange)) return [3 /*break*/, 2];
6463
- return [4 /*yield*/, handleFormSaveDraft()];
6464
- case 1:
6465
- _b.sent();
6466
- _b.label = 2;
6467
- case 2:
6468
- previousTabId = (uniqueTabIds || [])[currentTabIndex_1 - 1];
6469
- handleUpdateTabId(previousTabId);
6470
- _b.label = 3;
6471
- case 3: return [2 /*return*/];
6472
- }
6473
- });
6474
- }); }, disabled: currentTabIndex_1 <= 0, className: "mr-3", background: "bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800" })),
6475
- ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.enableUpdateDraft) && (react_1.default.createElement(button_1.Button, { id: "dtw-save", text: "Save", type: "light", className: "w-xs mr-3", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6476
- return __generator(this, function (_a) {
6477
- switch (_a.label) {
6478
- case 0: return [4 /*yield*/, handleFormSaveDraft()];
6479
- case 1:
6480
- _a.sent();
6481
- return [2 /*return*/];
6482
- }
6483
- });
6484
- }); } })),
6485
- react_1.default.createElement(button_1.Button, { id: "dtw-submit", text: "Submit", type: "normal", className: "w-xs", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6486
- return __generator(this, function (_a) {
6487
- switch (_a.label) {
6488
- case 0: return [4 /*yield*/, handleFormSubmit()];
6489
- case 1:
6490
- _a.sent();
6491
- return [2 /*return*/];
6492
- }
6493
- });
6494
- }); } }),
6495
- hasTabAlign && (uniqueTabIds || []).length > 1 && (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ChevronRightIcon, { className: "w-5 h-5 text-primary-500" }), onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6496
- var nextTabId;
6497
- var _a;
6498
- return __generator(this, function (_b) {
6499
- switch (_b.label) {
6500
- case 0:
6501
- if (!(currentTabIndex_1 < (uniqueTabIds || []).length - 1)) return [3 /*break*/, 3];
6502
- if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareSaveOnTabChange)) return [3 /*break*/, 2];
6503
- return [4 /*yield*/, handleFormSaveDraft()];
6504
- case 1:
6505
- _b.sent();
6506
- _b.label = 2;
6507
- case 2:
6508
- nextTabId = (uniqueTabIds || [])[currentTabIndex_1 + 1];
6509
- handleUpdateTabId(nextTabId);
6510
- _b.label = 3;
6511
- case 3: return [2 /*return*/];
6512
- }
6513
- });
6514
- }); }, disabled: currentTabIndex_1 >= (uniqueTabIds || []).length - 1, className: "ml-2", background: "bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800" })))),
6515
- ((_j = props.edit) === null || _j === void 0 ? void 0 : _j.deleteBtn) && isEditor && props.id !== "new" && (react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", type: "danger", className: "w-xs ml-3", onClick: function () {
6516
- setDeleteModal(true);
6517
- } }))));
6638
+ return (react_1.default.createElement("div", { className: "flex flex-row h-fit w-full mt-5 sm:justify-end sm:mt-0" }, isTabbedUpdate ? null : bareActionComponent ? (bareActionComponent) : (react_1.default.createElement(react_1.default.Fragment, null,
6639
+ ((_d = props.edit) === null || _d === void 0 ? void 0 : _d.enableUpdateDraft) && (react_1.default.createElement(button_1.Button, { id: "dtw-save", text: "Save", type: "light", className: "w-xs mr-3", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6640
+ return __generator(this, function (_a) {
6641
+ switch (_a.label) {
6642
+ case 0: return [4 /*yield*/, handleFormSaveDraft()];
6643
+ case 1:
6644
+ _a.sent();
6645
+ return [2 /*return*/];
6646
+ }
6647
+ });
6648
+ }); } })),
6649
+ react_1.default.createElement(button_1.Button, { id: "dtw-submit", text: "Submit", type: "normal", className: "w-xs", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
6650
+ return __generator(this, function (_a) {
6651
+ switch (_a.label) {
6652
+ case 0: return [4 /*yield*/, handleFormSubmit()];
6653
+ case 1:
6654
+ _a.sent();
6655
+ return [2 /*return*/];
6656
+ }
6657
+ });
6658
+ }); } })))));
6518
6659
  }
6519
6660
  else if (type === "list") {
6520
6661
  var listActionBtns = [];
@@ -6524,7 +6665,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6524
6665
  if (bareActionComponent) {
6525
6666
  listActionBtns.push(bareActionComponent);
6526
6667
  }
6527
- else if (((_k = props.edit) === null || _k === void 0 ? void 0 : _k.allEditable) || ((_l = props.edit) === null || _l === void 0 ? void 0 : _l.createBtn)) {
6668
+ else if (((_e = props.edit) === null || _e === void 0 ? void 0 : _e.allEditable) || ((_f = props.edit) === null || _f === void 0 ? void 0 : _f.createBtn)) {
6528
6669
  listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
6529
6670
  hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-create", icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
6530
6671
  var _a, _b;
@@ -6656,7 +6797,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6656
6797
  authList));
6657
6798
  };
6658
6799
  var renderContent = function () {
6659
- 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;
6800
+ 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;
6660
6801
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
6661
6802
  var tabs = renderTabs();
6662
6803
  var pages = [
@@ -6695,7 +6836,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6695
6836
  hasReadHeading && (react_1.default.createElement("div", { className: "flex flex-col" },
6696
6837
  props.title && (react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title)),
6697
6838
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
6698
- !isBottom && renderActionButtons(props.type))),
6839
+ renderActionButtons(props.type))),
6699
6840
  (schemaPresent || ((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_j = props.organise) === null || _j === void 0 ? void 0 : _j.darkMode })),
6700
6841
  ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadComponentPos) === "top" &&
6701
6842
  renderBareReadComp(),
@@ -6704,9 +6845,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6704
6845
  !((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, props.type, viewType))),
6705
6846
  ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) !== "top" &&
6706
6847
  renderBareReadComp()),
6707
- isBottom && (
6708
- // INFO: matches the update view's bottom bar, which is already sm:justify-end
6709
- react_1.default.createElement("div", { className: "flex sm:justify-end" }, renderActionButtons(props.type)))))));
6848
+ renderReadBar()))));
6710
6849
  case "update":
6711
6850
  if (props.id !== "new") {
6712
6851
  pages.push({
@@ -6850,9 +6989,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6850
6989
  }
6851
6990
  var customTabComponent_1 = (_3 = (_2 = (_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareUpdateTabComponent) === null || _2 === void 0 ? void 0 : _2.call(_1, uniqueTabIds_2)) !== null && _3 !== void 0 ? _3 : [];
6852
6991
  var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
6992
+ var _a, _b;
6853
6993
  var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
6854
6994
  return {
6855
6995
  title: eachTabId ? eachTabId : "Others",
6996
+ shortTitle: (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabShortLabels) === null || _b === void 0 ? void 0 : _b[eachTabId],
6856
6997
  description: "",
6857
6998
  icon: customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.icon,
6858
6999
  skip: (customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.skip) ? true : false,
@@ -6868,6 +7009,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6868
7009
  icon: function () { return react_1.default.createElement("div", null); },
6869
7010
  };
6870
7011
  });
7012
+ var railSteps = uniqueTabIds_2.map(function (eachTabId) {
7013
+ var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
7014
+ return {
7015
+ id: eachTabId || "Others",
7016
+ title: eachTabId ? eachTabId : "Others",
7017
+ completed: (0, utils_1.handleIsTabComplete)(filterModel_1, selectedData, eachTabId),
7018
+ icon: customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.icon,
7019
+ };
7020
+ });
6871
7021
  return (react_1.default.createElement(react_1.default.Fragment, null,
6872
7022
  props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
6873
7023
  dbModule: dbModule,
@@ -6886,15 +7036,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6886
7036
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
6887
7037
  props.title && (react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title)),
6888
7038
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
6889
- !isBottom &&
7039
+ (!isBottom || hasTabAlign_1 || props.type === "update") &&
6890
7040
  renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)),
6891
7041
  hasTabAlign_1 ? (react_1.default.createElement("div", { className: "w-full ".concat(leftTabAlign
6892
7042
  ? "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5"
6893
7043
  : "") },
6894
7044
  leftTabAlign && uniqueTabIds_2.length >= 1 && (react_1.default.createElement("div", { className: "w-full" },
6895
- react_1.default.createElement(bars_1.Bars, { bars: tabBars, selectedId: activeTab || "Others", onClick: function (tabId) {
6896
- handleUpdateTabId(tabId);
6897
- }, primaryColor: true }))),
7045
+ react_1.default.createElement(stepper_1.Stepper, { variant: "checklist", steps: railSteps, stepIndex: uniqueTabIds_2.findIndex(function (tabId) { return tabId === (activeTab || ""); }), onChange: function (stepIndex) {
7046
+ handleUpdateTabId(uniqueTabIds_2[stepIndex] || "");
7047
+ } }))),
6898
7048
  react_1.default.createElement("div", { className: "w-full ".concat(leftTabAlign ? " md:col-span-2 lg:col-span-3" : "") },
6899
7049
  topTabAlign && uniqueTabIds_2.length >= 1 && (react_1.default.createElement(bars_1.Bars, { bars: tabBars, selectedId: activeTab || "Others", onClick: function (tabId) {
6900
7050
  handleUpdateTabId(tabId);
@@ -6908,6 +7058,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6908
7058
  ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateComponent(selectedData)),
6909
7059
  react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
6910
7060
  uniqueTabIds_2.map(function (tabId) {
7061
+ var _a, _b;
6911
7062
  var filterByTab = filterModel_1
6912
7063
  .map(function (model, index) { return (__assign(__assign({}, model), { refIndex: index })); })
6913
7064
  .filter(function (model) {
@@ -6919,14 +7070,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6919
7070
  ? activeTab === tabId
6920
7071
  ? ""
6921
7072
  : "hidden"
6922
- : "") }, renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
7073
+ : "") },
7074
+ hasTabAlign_1 && (react_1.default.createElement("div", { className: "col-span-12" },
7075
+ react_1.default.createElement("p", { className: "text-lg font-semibold text-gray-900" }, tabId || "Others"),
7076
+ ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabDescriptions) === null || _b === void 0 ? void 0 : _b[tabId]) && (react_1.default.createElement("p", { className: "text-sm text-gray-500 mt-0.5" }, props.organise.tabDescriptions[tabId])))),
7077
+ renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
6923
7078
  }),
6924
7079
  !((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareUpdateComponentAbove) &&
6925
7080
  ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateComponent) &&
6926
7081
  ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponent(selectedData))),
6927
7082
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
6928
7083
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
7084
+ renderStepBar(uniqueTabIds_2),
6929
7085
  isBottom &&
7086
+ props.type !== "update" &&
6930
7087
  renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
6931
7088
  ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponentAbove) &&
6932
7089
  ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent) &&
@@ -6938,8 +7095,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6938
7095
  ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent(selectedData))),
6939
7096
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
6940
7097
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
6941
- isBottom &&
6942
- renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)))));
7098
+ renderStepBar(uniqueTabIds_2)))));
6943
7099
  case "list":
6944
7100
  case "union":
6945
7101
  var filterComponent_1 = renderSearchContent();
@@ -7150,7 +7306,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7150
7306
  return (react_1.default.createElement(react_1.default.Fragment, null,
7151
7307
  listReadQueryHOC,
7152
7308
  react_1.default.createElement("div", { className: "flex py-2 ".concat(((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareCompactMode)
7153
- ? "w-full flex-row flex-wrap sm:flex-nowrap items-end"
7309
+ ? // INFO: the grow spacer is hidden on phones (search lives in
7310
+ // the floating bar), so the row itself pushes the actions right
7311
+ "w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
7154
7312
  : "flex-col md:items-end md:flex-row") },
7155
7313
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col" },
7156
7314
  props.title && (react_1.default.createElement("div", { className: "flex items-center gap-2" },
@@ -7167,12 +7325,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7167
7325
  react_1.default.createElement("div", { className: ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareCompactMode)
7168
7326
  ? "hidden sm:block grow"
7169
7327
  : "grow" }),
7170
- renderListFilterElements(),
7171
- renderListActionElements()),
7328
+ react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end" },
7329
+ renderListFilterElements(),
7330
+ renderListActionElements())),
7172
7331
  renderListNewRowFilterElements(),
7173
7332
  (schemaPresent || ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.darkMode })),
7174
7333
  renderTabContent(tabs, props.type, viewType),
7175
- ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) &&
7334
+ ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
7335
+ ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListMobileFloatingSearch) &&
7176
7336
  (0, listModule_1.renderFloatingMobileSearch)({
7177
7337
  filterSearch: filterSearch,
7178
7338
  handleNameSearch: handleNameSearch,
@@ -7185,15 +7345,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7185
7345
  handlePopUpModal(true, "filter");
7186
7346
  }
7187
7347
  },
7188
- hideSearch: (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hideSearch,
7189
- darkMode: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode,
7190
- floatingOffset: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareListFloatingActionOffset,
7191
- hideFilter: !((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilters),
7192
- activeFilterCount: ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareFlexFilters)
7348
+ hideSearch: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.hideSearch,
7349
+ darkMode: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkMode,
7350
+ floatingOffset: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareListFloatingActionOffset,
7351
+ hideFilter: !((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareFlexFilters),
7352
+ activeFilterCount: ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareFlexFilters)
7193
7353
  ? activeFlexFilterCount_1
7194
7354
  : undefined,
7195
7355
  // INFO: Hides when items are selected so NewTable's multi-action bar takes over.
7196
- hidden: selectAll || ((_36 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _36 !== void 0 ? _36 : 0) > 0,
7356
+ hidden: selectAll || ((_37 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _37 !== void 0 ? _37 : 0) > 0,
7197
7357
  })));
7198
7358
  default:
7199
7359
  return react_1.default.createElement(react_1.default.Fragment, null);
@@ -7203,7 +7363,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7203
7363
  //SECTION: Render Utils
7204
7364
  //=====================================================================================
7205
7365
  var renderDataTemplateFormContent = function (state, model, ref, isObject, isObjectList, modalInput, parentData) {
7206
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7366
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
7207
7367
  return (0, updateModule_1.renderDataTemplateForm)(state, model, ref, {
7208
7368
  handleOnChangeAddress: handleOnChangeAddress,
7209
7369
  handleOnChangeText: handleOnChangeText,
@@ -7225,10 +7385,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7225
7385
  showId: showId,
7226
7386
  remainId: remainId,
7227
7387
  groupIdCollapsible: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.groupIdCollapsible,
7388
+ groupDescriptions: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.groupDescriptions,
7228
7389
  }, {
7229
7390
  dbModule: dbModule,
7230
7391
  devSettings: devSettings,
7231
- referencesOptions: referencesOptions,
7392
+ // INFO: the object editor opened from a list cell has no read/update
7393
+ // fetch behind it — the list-load seed is what gives its nested
7394
+ // reference Select a label before the user searches
7395
+ referencesOptions: __assign(__assign({}, listReferencesOptions), referencesOptions),
7232
7396
  referencesDetails: referencesDetails,
7233
7397
  referenceLoading: referenceLoading,
7234
7398
  setReferenceLoading: setReferenceLoading,
@@ -7238,12 +7402,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7238
7402
  imageEndpoint: devSettings.imageEndpoint,
7239
7403
  maxFileSize: devSettings.maxFileSize,
7240
7404
  imageBucketName: devSettings.bucketName,
7241
- handleCustomDownloadFile: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.handleCustomDownloadFile,
7405
+ handleCustomDownloadFile: (_e = props.organise) === null || _e === void 0 ? void 0 : _e.handleCustomDownloadFile,
7242
7406
  }, {
7243
7407
  selectedObjectId: selectedObjectId,
7244
7408
  selectedObjectStructureId: selectedObjectStructureId,
7245
7409
  parentData: parentData,
7246
- organiseListObjTableView: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.listObjectTableView)
7410
+ organiseListObjTableView: ((_f = props.organise) === null || _f === void 0 ? void 0 : _f.listObjectTableView)
7247
7411
  ? true
7248
7412
  : false,
7249
7413
  setSelectedObjectStructureId: setSelectedObjectStructureId,
@@ -7253,7 +7417,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7253
7417
  renderObjectTags: renderObjectTags,
7254
7418
  setSelectedData: setSelectedData,
7255
7419
  flexTableRefs: flexTableRefs,
7256
- }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareOffline, (_h = (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdateColumnType) !== null && _h !== void 0 ? _h : "two", (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareUpdateIndividualComponent, (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdateMobileView);
7420
+ }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareOffline, (_j = (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareUpdateColumnType) !== null && _j !== void 0 ? _j : "two", (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdateIndividualComponent, (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareUpdateMobileView);
7257
7421
  };
7258
7422
  var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName) {
7259
7423
  var _a, _b;
@@ -7555,9 +7719,54 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7555
7719
  var _a, _b, _c;
7556
7720
  return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: structure, renderReferenceLabelOptions: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.renderReferenceSpaceOptions, onAddModelSchema: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onAddColumns, onClose: onClose }));
7557
7721
  };
7722
+ // INFO: for NewTable, groupBy stays inside one table — rows are handed over
7723
+ // as coloured, collapsible bands keyed the same way the legacy split is
7724
+ var handleBuildNewTableGroups = function () {
7725
+ var _a;
7726
+ if (!groupId || !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW))
7727
+ return undefined;
7728
+ var groupAttributeDS = structure.find(function (eachDS) { return eachDS.id === groupId; });
7729
+ var groups = [];
7730
+ (spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : []).forEach(function (eachData, index) {
7731
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7732
+ // INFO: key off the raw row — the display row holds a Tag element for a
7733
+ // coloured list value, which would put every row under "Unknown"
7734
+ var rawValue = (_b = (_a = tableData === null || tableData === void 0 ? void 0 : tableData[index]) === null || _a === void 0 ? void 0 : _a[groupId]) !== null && _b !== void 0 ? _b : eachData === null || eachData === void 0 ? void 0 : eachData[groupId];
7735
+ var key;
7736
+ if ((groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.type) === "date" && rawValue && rawValue !== " - ") {
7737
+ key = (0, dayjs_1.default)(isFirebase ? (rawValue === null || rawValue === void 0 ? void 0 : rawValue._seconds) * 1000 : rawValue)
7738
+ .startOf("day")
7739
+ .format("YYYY-MM-DD");
7740
+ }
7741
+ else {
7742
+ key =
7743
+ rawValue && rawValue !== " - " && typeof rawValue !== "object"
7744
+ ? String(rawValue)
7745
+ : "Unknown/No Value";
7746
+ }
7747
+ var rowId = (_d = (_c = tableData === null || tableData === void 0 ? void 0 : tableData[index]) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : (_e = tableData === null || tableData === void 0 ? void 0 : tableData[index]) === null || _e === void 0 ? void 0 : _e._id;
7748
+ if (!rowId)
7749
+ return;
7750
+ var group = groups.find(function (eachGroup) { return eachGroup.id === key; });
7751
+ if (!group) {
7752
+ var optionIndex = (_g = (_f = groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.listSelection) === null || _f === void 0 ? void 0 : _f.indexOf(key)) !== null && _g !== void 0 ? _g : -1;
7753
+ group = {
7754
+ id: key,
7755
+ title: key,
7756
+ colour: optionIndex >= 0
7757
+ ? (_h = groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.listSelectionColour) === null || _h === void 0 ? void 0 : _h[optionIndex]
7758
+ : undefined,
7759
+ rowIds: [],
7760
+ };
7761
+ groups.push(group);
7762
+ }
7763
+ group.rowIds.push(rowId);
7764
+ });
7765
+ return groups;
7766
+ };
7558
7767
  var renderGroupTable = function (multipleSelect) {
7559
- 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;
7560
- if (groupId) {
7768
+ 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;
7769
+ if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
7561
7770
  var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
7562
7771
  var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
7563
7772
  var _a;
@@ -7680,9 +7889,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7680
7889
  }
7681
7890
  else {
7682
7891
  // INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
7683
- if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW) {
7684
- return (react_1.default.createElement(newTable_1.NewTable, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.disableSelectFullData) === null || _c === void 0 ? void 0 : _c.table, maxSelectedCount: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListMaxSelectedCount, mobileView: (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListMobileView, mobileTooltip: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (!((_g = props.edit) === null || _g === void 0 ? void 0 : _g.disabledUpdate) &&
7685
- !((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareHideTableExtraMultipleAction)
7892
+ if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
7893
+ return (react_1.default.createElement(newTable_1.NewTable, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.disableSelectFullData) === null || _d === void 0 ? void 0 : _d.table, maxSelectedCount: (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListMaxSelectedCount, mobileView: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMobileView, mobileTooltip: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (!((_h = props.edit) === null || _h === void 0 ? void 0 : _h.disabledUpdate) &&
7894
+ !((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideTableExtraMultipleAction)
7686
7895
  ? [
7687
7896
  {
7688
7897
  id: "draft",
@@ -7697,7 +7906,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7697
7906
  hide: selectedIds.length === 0,
7698
7907
  },
7699
7908
  ]
7700
- : []), true), (((_j = props.edit) === null || _j === void 0 ? void 0 : _j.deleteBtn)
7909
+ : []), true), (((_k = props.edit) === null || _k === void 0 ? void 0 : _k.deleteBtn)
7701
7910
  ? [
7702
7911
  {
7703
7912
  id: "delete",
@@ -7708,7 +7917,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7708
7917
  },
7709
7918
  },
7710
7919
  ]
7711
- : []), true), (!isFirebase && !((_k = props.edit) === null || _k === void 0 ? void 0 : _k.disableBatchUpdate)
7920
+ : []), true), (!isFirebase && !((_l = props.edit) === null || _l === void 0 ? void 0 : _l.disableBatchUpdate)
7712
7921
  ? [
7713
7922
  {
7714
7923
  id: "update",
@@ -7716,7 +7925,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7716
7925
  onClick: function () { return setBatchUpdateModal(true); },
7717
7926
  },
7718
7927
  ]
7719
- : []), true), (((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListMultipleSelectAddtionalActions)
7928
+ : []), true), (((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListMultipleSelectAddtionalActions)
7720
7929
  ? props.bareSettings.bareListMultipleSelectAddtionalActions.map(function (eachButton) { return ({
7721
7930
  id: "dt-list-multi-action-btn-" + eachButton.text,
7722
7931
  btnText: eachButton.text,
@@ -7725,23 +7934,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7725
7934
  return (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
7726
7935
  },
7727
7936
  }); })
7728
- : []), true), multiActionFloatingOffset: (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
7937
+ : []), true), multiActionFloatingOffset: (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
7729
7938
  var _a, _b;
7730
7939
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
7731
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_p = (_o = props.newTabUrl) === null || _o === void 0 ? void 0 : _o.default) !== null && _p !== void 0 ? _p : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_r = (_q = props.newTabUrl) === null || _q === void 0 ? void 0 : _q.addons) !== null && _r !== void 0 ? _r : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
7940
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_q = (_p = props.newTabUrl) === null || _p === void 0 ? void 0 : _p.default) !== null && _q !== void 0 ? _q : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_s = (_r = props.newTabUrl) === null || _r === void 0 ? void 0 : _r.addons) !== null && _s !== void 0 ? _s : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
7732
7941
  handlePagination(value);
7733
- }, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.fixedPagination, advSettings: {
7734
- addColumnEnabled: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.addColumnEnabled,
7942
+ }, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.fixedPagination, advSettings: {
7943
+ addColumnEnabled: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.addColumnEnabled,
7735
7944
  renderAddColumnElements: renderAddMathColumn,
7736
- dragEnabled: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.advDragEnabled,
7737
- sortEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.advSortEnabled,
7738
- filterEnabled: ((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareFlexFilters)
7945
+ dragEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.advDragEnabled,
7946
+ sortEnabled: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.advSortEnabled,
7947
+ filterEnabled: ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareFlexFilters)
7739
7948
  ? false
7740
- : (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advFilterEnabled,
7949
+ : (_y = props.organise) === null || _y === void 0 ? void 0 : _y.advFilterEnabled,
7741
7950
  sortId: activeSortId,
7742
- sortOptions: (_z = (_y = props.organise) === null || _y === void 0 ? void 0 : _y.renderReferenceLabelOptions) === null || _z === void 0 ? void 0 : _z.call(_y),
7951
+ sortOptions: (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.renderReferenceLabelOptions) === null || _0 === void 0 ? void 0 : _0.call(_z),
7743
7952
  onSortColumn: handleSortColumn,
7744
- onDragColumn: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.onChangeDrag,
7953
+ onDragColumn: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.onChangeDrag,
7745
7954
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7746
7955
  var _a;
7747
7956
  return {
@@ -7758,7 +7967,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7758
7967
  return renderSearchContent(newQuery);
7759
7968
  },
7760
7969
  }, editable: {
7761
- active: ((_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.listEditable) && !props.edit.disabledUpdate
7970
+ active: ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.listEditable) && !props.edit.disabledUpdate
7762
7971
  ? true
7763
7972
  : false,
7764
7973
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -7772,7 +7981,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7772
7981
  });
7773
7982
  }); },
7774
7983
  }, onObjectEdit: handleObjectCellEdit, addable: {
7775
- active: ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.listAddable) ? true : false,
7984
+ active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listAddable) ? true : false,
7776
7985
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
7777
7986
  return __generator(this, function (_a) {
7778
7987
  switch (_a.label) {
@@ -7783,27 +7992,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7783
7992
  }
7784
7993
  });
7785
7994
  }); },
7786
- }, darkMode: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.darkMode, hidePagination: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.disableEllipsisOnLongWord, pinColumns: (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareListTablePinColumns }));
7995
+ }, darkMode: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.darkMode, hidePagination: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.disableEllipsisOnLongWord, pinColumns: (_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareListTablePinColumns }));
7787
7996
  }
7788
- return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.disableSelectFullData) === null || _8 === void 0 ? void 0 : _8.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
7997
+ return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_9 = (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.disableSelectFullData) === null || _9 === void 0 ? void 0 : _9.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
7789
7998
  selectedIds.length > 0 &&
7790
- !((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.disabledUpdate) &&
7791
- !((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
7999
+ !((_10 = props.edit) === null || _10 === void 0 ? void 0 : _10.disabledUpdate) &&
8000
+ !((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
7792
8001
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
7793
8002
  handleBatchDraftData();
7794
8003
  } }),
7795
8004
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
7796
8005
  handleCloneSelectedData();
7797
8006
  } }))),
7798
- ((_11 = props.edit) === null || _11 === void 0 ? void 0 : _11.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8007
+ ((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
7799
8008
  handleGenerateDeletePasscode();
7800
8009
  setDeleteModal(true);
7801
8010
  } })),
7802
- !isFirebase && !((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8011
+ !isFirebase && !((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
7803
8012
  setBatchUpdateModal(true);
7804
8013
  } })),
7805
- ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareListMultipleSelectAddtionalActions) &&
7806
- ((_15 = (_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareListMultipleSelectAddtionalActions) === null || _15 === void 0 ? void 0 : _15.map(function (eachButton) {
8014
+ ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareListMultipleSelectAddtionalActions) &&
8015
+ ((_16 = (_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareListMultipleSelectAddtionalActions) === null || _16 === void 0 ? void 0 : _16.map(function (eachButton) {
7807
8016
  return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
7808
8017
  var _a, _b;
7809
8018
  (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
@@ -7811,20 +8020,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7811
8020
  }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
7812
8021
  var _a, _b;
7813
8022
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
7814
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.default) !== null && _17 !== void 0 ? _17 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_19 = (_18 = props.newTabUrl) === null || _18 === void 0 ? void 0 : _18.addons) !== null && _19 !== void 0 ? _19 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8023
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_18 = (_17 = props.newTabUrl) === null || _17 === void 0 ? void 0 : _17.default) !== null && _18 !== void 0 ? _18 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_20 = (_19 = props.newTabUrl) === null || _19 === void 0 ? void 0 : _19.addons) !== null && _20 !== void 0 ? _20 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
7815
8024
  handlePagination(value);
7816
- }, className: "mt-5", lib: { axios: (_20 = props.lib) === null || _20 === void 0 ? void 0 : _20.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.fixedPagination, advSettings: {
7817
- addColumnEnabled: (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.addColumnEnabled,
8025
+ }, className: "mt-5", lib: { axios: (_21 = props.lib) === null || _21 === void 0 ? void 0 : _21.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.fixedPagination, advSettings: {
8026
+ addColumnEnabled: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.addColumnEnabled,
7818
8027
  renderAddColumnElements: renderAddMathColumn,
7819
- dragEnabled: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.advDragEnabled,
7820
- sortEnabled: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.advSortEnabled,
7821
- filterEnabled: ((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareFlexFilters)
8028
+ dragEnabled: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.advDragEnabled,
8029
+ sortEnabled: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.advSortEnabled,
8030
+ filterEnabled: ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareFlexFilters)
7822
8031
  ? false
7823
- : (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.advFilterEnabled,
8032
+ : (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.advFilterEnabled,
7824
8033
  sortId: activeSortId,
7825
- sortOptions: (_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.renderReferenceLabelOptions) === null || _28 === void 0 ? void 0 : _28.call(_27),
8034
+ sortOptions: (_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.renderReferenceLabelOptions) === null || _29 === void 0 ? void 0 : _29.call(_28),
7826
8035
  onSortColumn: handleSortColumn,
7827
- onDragColumn: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.onChangeDrag,
8036
+ onDragColumn: (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.onChangeDrag,
7828
8037
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7829
8038
  var _a;
7830
8039
  return {
@@ -7841,7 +8050,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7841
8050
  return renderSearchContent(newQuery);
7842
8051
  },
7843
8052
  }, editable: {
7844
- active: ((_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.listEditable) && !props.edit.disabledUpdate
8053
+ active: ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.listEditable) && !props.edit.disabledUpdate
7845
8054
  ? true
7846
8055
  : false,
7847
8056
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -7855,7 +8064,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7855
8064
  });
7856
8065
  }); },
7857
8066
  }, onObjectEdit: handleObjectCellEdit, addable: {
7858
- active: ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.listAddable) ? true : false,
8067
+ active: ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.listAddable) ? true : false,
7859
8068
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
7860
8069
  return __generator(this, function (_a) {
7861
8070
  switch (_a.label) {
@@ -7866,7 +8075,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7866
8075
  }
7867
8076
  });
7868
8077
  }); },
7869
- }, darkMode: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode, hidePagination: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.disableEllipsisOnLongWord }));
8078
+ }, darkMode: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkMode, hidePagination: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.disableEllipsisOnLongWord }));
7870
8079
  }
7871
8080
  };
7872
8081
  var renderTabContent = function (tabs, dataType, viewType) {
@@ -7933,7 +8142,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7933
8142
  }
7934
8143
  });
7935
8144
  sortedTabs.forEach(function (eachTab) {
7936
- var _a, _b;
7937
8145
  var groups = groupedStructures_1[eachTab];
7938
8146
  var sortedGroups = Object.keys(groups).sort(function (a, b) {
7939
8147
  if (a === "Others")
@@ -7952,13 +8160,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7952
8160
  if ((Array.isArray(listData) && (listData === null || listData === void 0 ? void 0 : listData.length) > 0) ||
7953
8161
  listObjModels.length > 0) {
7954
8162
  tabElement.push(react_1.default.createElement("div", { key: "section-".concat(eachKey) },
7955
- Array.isArray(listData) && (listData === null || listData === void 0 ? void 0 : listData.length) > 0 && (react_1.default.createElement(detailList_1.DetailList, { model: groups[eachKey], referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: eachKey, list: listData, size: ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareCompactMode)
8163
+ Array.isArray(listData) && (listData === null || listData === void 0 ? void 0 : listData.length) > 0 && (react_1.default.createElement(detailList_1.DetailList, { model: groups[eachKey], referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: eachKey, list: listData,
8164
+ // INFO: a tabbed form is long by definition — its read
8165
+ // view uses the dense label : value rows
8166
+ size: ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareCompactMode) || hasTabs_1
7956
8167
  ? "compact"
7957
8168
  : "default", handleReferenceLink: !schemaPresent &&
7958
8169
  ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadReferenceView)
7959
8170
  ? props.bareSettings.bareReadReferenceView
7960
8171
  : undefined, splitView: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.splitView })),
7961
- listObjModels.length > 0 && (react_1.default.createElement("div", { className: "px-6" }, renderListObject("read", listObjModels.map(function (eachModel) { return eachModel.id; }))))));
8172
+ listObjModels.length > 0 && (
8173
+ // INFO: same card as the DetailList sections above so a
8174
+ // nested table lines up with them instead of sitting
8175
+ // indented on the page background
8176
+ react_1.default.createElement("div", { className: "mt-5 rounded-md bg-white px-4 pb-4 sm:px-6" }, renderListObject("read", listObjModels.map(function (eachModel) { return eachModel.id; }))))));
7962
8177
  }
7963
8178
  });
7964
8179
  var allGanttCharts = Object.values(groups)
@@ -7977,15 +8192,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7977
8192
  readElement_1.push(react_1.default.createElement("div", { key: "tab-section-".concat(eachTab), ref: function (el) {
7978
8193
  readTabSectionRefs.current[eachTab] = el;
7979
8194
  } },
7980
- hasTabs_1 && (react_1.default.createElement("div", { className: "bg-primary-500 rounded-lg mt-5 ".concat(((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareCompactMode)
7981
- ? "px-4 py-2"
7982
- : "p-4") },
7983
- react_1.default.createElement("h2", { className: "text-white font-semibold ".concat(((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareCompactMode)
7984
- ? "text-base"
7985
- : "text-lg") }, eachTab))),
8195
+ hasTabs_1 && (react_1.default.createElement("div", { className: "bg-primary-500 rounded-lg mt-5 px-4 py-2" },
8196
+ react_1.default.createElement("h2", { className: "text-white font-semibold text-base" }, eachTab))),
7986
8197
  tabElement,
7987
- allGanttCharts.length > 0 && (react_1.default.createElement("div", { className: "px-6" }, renderGanttChart("read", allGanttCharts.map(function (eachModel) { return eachModel.id; })))),
7988
- allCanvas.length > 0 && (react_1.default.createElement("div", { className: "px-6" }, renderCanvas("read", allCanvas.map(function (eachModel) { return eachModel.id; }))))));
8198
+ allGanttCharts.length > 0 && (react_1.default.createElement("div", { className: "mt-5 rounded-md bg-white px-4 pb-4 sm:px-6" }, renderGanttChart("read", allGanttCharts.map(function (eachModel) { return eachModel.id; })))),
8199
+ allCanvas.length > 0 && (react_1.default.createElement("div", { className: "mt-5 rounded-md bg-white px-4 pb-4 sm:px-6" }, renderCanvas("read", allCanvas.map(function (eachModel) { return eachModel.id; }))))));
7989
8200
  }
7990
8201
  });
7991
8202
  var showReadFloatingNav_1 = ((_f = props.organise) === null || _f === void 0 ? void 0 : _f.showReadFloatingNav) && allTabSections_1.length > 1;
@@ -8508,7 +8719,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8508
8719
  return null;
8509
8720
  if (location === "root" && modalVisible)
8510
8721
  return null;
8511
- return (react_1.default.createElement(notification_1.Notification, { icon: notification.type ? correctIcon : incorrectIcon, notificationAttribute: {
8722
+ // INFO: nothing a silent step-change save reports is worth a toast
8723
+ if ((notification === null || notification === void 0 ? void 0 : notification.type) && silentDraftRef.current)
8724
+ return null;
8725
+ return (react_1.default.createElement(notification_1.Notification
8726
+ // INFO: phones keep the familiar bottom toast, lifted above the
8727
+ // floating action bar / floating search
8728
+ , {
8729
+ // INFO: phones keep the familiar bottom toast, lifted above the
8730
+ // floating action bar / floating search
8731
+ position: "bottom", mobileOffsetClassName: "pb-28", icon: notification.type ? correctIcon : incorrectIcon, notificationAttribute: {
8512
8732
  title: notification.title,
8513
8733
  desc: notification.msg,
8514
8734
  visible: true,