blixify-ui-web 1.2.60 → 1.2.64

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 (121) hide show
  1. package/lib/components/action/radioList/index.d.ts +3 -0
  2. package/lib/components/action/radioList/index.d.ts.map +1 -1
  3. package/lib/components/action/radioList/index.js +25 -11
  4. package/lib/components/action/radioList/index.js.map +1 -1
  5. package/lib/components/advanced/popUp/index.d.ts +2 -0
  6. package/lib/components/advanced/popUp/index.d.ts.map +1 -1
  7. package/lib/components/advanced/popUp/index.js +1 -1
  8. package/lib/components/advanced/popUp/index.js.map +1 -1
  9. package/lib/components/data/dataTemplate/dataStateModel.d.ts +10 -0
  10. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  11. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  12. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  13. package/lib/components/data/dataTemplate/index.js +698 -429
  14. package/lib/components/data/dataTemplate/index.js.map +1 -1
  15. package/lib/components/data/dataTemplate/model.d.ts +5 -0
  16. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  17. package/lib/components/data/dataTemplate/pagination.js +1 -1
  18. package/lib/components/data/dataTemplate/pagination.js.map +1 -1
  19. package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
  20. package/lib/components/data/dataWrapper/index.js +3 -3
  21. package/lib/components/data/dataWrapper/index.js.map +1 -1
  22. package/lib/components/data/flexFilter/index.d.ts +6 -2
  23. package/lib/components/data/flexFilter/index.d.ts.map +1 -1
  24. package/lib/components/data/flexFilter/index.js +31 -27
  25. package/lib/components/data/flexFilter/index.js.map +1 -1
  26. package/lib/components/data/listModule.d.ts.map +1 -1
  27. package/lib/components/data/listModule.js +7 -1
  28. package/lib/components/data/listModule.js.map +1 -1
  29. package/lib/components/data/moduleUtils.d.ts +1 -0
  30. package/lib/components/data/moduleUtils.d.ts.map +1 -1
  31. package/lib/components/data/moduleUtils.js +144 -114
  32. package/lib/components/data/moduleUtils.js.map +1 -1
  33. package/lib/components/data/readModule.d.ts.map +1 -1
  34. package/lib/components/data/readModule.js +24 -6
  35. package/lib/components/data/readModule.js.map +1 -1
  36. package/lib/components/data/testSchema.js +1 -1
  37. package/lib/components/data/testSchema.js.map +1 -1
  38. package/lib/components/data/updateModule.d.ts +6 -0
  39. package/lib/components/data/updateModule.d.ts.map +1 -1
  40. package/lib/components/data/updateModule.js +79 -41
  41. package/lib/components/data/updateModule.js.map +1 -1
  42. package/lib/components/data/utils.d.ts +2 -0
  43. package/lib/components/data/utils.d.ts.map +1 -1
  44. package/lib/components/data/utils.js +42 -1
  45. package/lib/components/data/utils.js.map +1 -1
  46. package/lib/components/display/detailList/index.d.ts +1 -0
  47. package/lib/components/display/detailList/index.d.ts.map +1 -1
  48. package/lib/components/display/detailList/index.js +7 -3
  49. package/lib/components/display/detailList/index.js.map +1 -1
  50. package/lib/components/display/drawer/index.d.ts +2 -0
  51. package/lib/components/display/drawer/index.d.ts.map +1 -1
  52. package/lib/components/display/drawer/index.js +7 -2
  53. package/lib/components/display/drawer/index.js.map +1 -1
  54. package/lib/components/display/flexTable/index.d.ts +14 -0
  55. package/lib/components/display/flexTable/index.d.ts.map +1 -1
  56. package/lib/components/display/flexTable/index.js +97 -17
  57. package/lib/components/display/flexTable/index.js.map +1 -1
  58. package/lib/components/display/modal/index.d.ts +1 -0
  59. package/lib/components/display/modal/index.d.ts.map +1 -1
  60. package/lib/components/display/modal/index.js +6 -4
  61. package/lib/components/display/modal/index.js.map +1 -1
  62. package/lib/components/display/newCalendar/index.d.ts.map +1 -1
  63. package/lib/components/display/newCalendar/index.js +61 -27
  64. package/lib/components/display/newCalendar/index.js.map +1 -1
  65. package/lib/components/display/newFeeds/index.d.ts +2 -0
  66. package/lib/components/display/newFeeds/index.d.ts.map +1 -1
  67. package/lib/components/display/newFeeds/index.js +7 -7
  68. package/lib/components/display/newFeeds/index.js.map +1 -1
  69. package/lib/components/display/newKanban/index.d.ts.map +1 -1
  70. package/lib/components/display/newKanban/index.js +53 -17
  71. package/lib/components/display/newKanban/index.js.map +1 -1
  72. package/lib/components/display/newList/index.d.ts.map +1 -1
  73. package/lib/components/display/newList/index.js +11 -64
  74. package/lib/components/display/newList/index.js.map +1 -1
  75. package/lib/components/display/newPagination/index.d.ts +23 -0
  76. package/lib/components/display/newPagination/index.d.ts.map +1 -0
  77. package/lib/components/display/newPagination/index.js +69 -0
  78. package/lib/components/display/newPagination/index.js.map +1 -0
  79. package/lib/components/display/newTable/index.d.ts +8 -0
  80. package/lib/components/display/newTable/index.d.ts.map +1 -1
  81. package/lib/components/display/newTable/index.js +381 -204
  82. package/lib/components/display/newTable/index.js.map +1 -1
  83. package/lib/components/display/notification/index.d.ts +2 -0
  84. package/lib/components/display/notification/index.d.ts.map +1 -1
  85. package/lib/components/display/notification/index.js +2 -1
  86. package/lib/components/display/notification/index.js.map +1 -1
  87. package/lib/components/display/scrollShadow/index.d.ts +9 -0
  88. package/lib/components/display/scrollShadow/index.d.ts.map +1 -0
  89. package/lib/components/display/scrollShadow/index.js +66 -0
  90. package/lib/components/display/scrollShadow/index.js.map +1 -0
  91. package/lib/components/display/stepper/index.d.ts +3 -0
  92. package/lib/components/display/stepper/index.d.ts.map +1 -1
  93. package/lib/components/display/stepper/index.js +28 -11
  94. package/lib/components/display/stepper/index.js.map +1 -1
  95. package/lib/components/display/table/index.d.ts.map +1 -1
  96. package/lib/components/display/table/index.js +3 -2
  97. package/lib/components/display/table/index.js.map +1 -1
  98. package/lib/components/index.d.ts +1 -0
  99. package/lib/components/index.d.ts.map +1 -1
  100. package/lib/components/index.js +4 -2
  101. package/lib/components/index.js.map +1 -1
  102. package/lib/components/input/checkbox/index.d.ts.map +1 -1
  103. package/lib/components/input/checkbox/index.js.map +1 -1
  104. package/lib/components/input/datePicker/index.d.ts.map +1 -1
  105. package/lib/components/input/datePicker/index.js +9 -9
  106. package/lib/components/input/datePicker/index.js.map +1 -1
  107. package/lib/components/input/select/index.d.ts.map +1 -1
  108. package/lib/components/input/select/index.js +57 -22
  109. package/lib/components/input/select/index.js.map +1 -1
  110. package/lib/components/input/textArea/index.d.ts.map +1 -1
  111. package/lib/components/input/textArea/index.js +22 -4
  112. package/lib/components/input/textArea/index.js.map +1 -1
  113. package/lib/components/input/textInput/index.d.ts.map +1 -1
  114. package/lib/components/input/textInput/index.js +32 -12
  115. package/lib/components/input/textInput/index.js.map +1 -1
  116. package/lib/components/input/uploadInput/index.js +1 -1
  117. package/lib/components/input/uploadInput/index.js.map +1 -1
  118. package/lib/components/navigation/tabs/index.js +1 -1
  119. package/lib/components/navigation/tabs/index.js.map +1 -1
  120. package/lib/tail.css +2 -2
  121. package/package.json +1 -1
@@ -108,6 +108,7 @@ var calendar_1 = require("../../display/calendar");
108
108
  var detailList_1 = require("../../display/detailList");
109
109
  var emptyState_1 = require("../../display/emptyState");
110
110
  var feeds_1 = require("../../display/feeds");
111
+ var newFeeds_1 = require("../../display/newFeeds");
111
112
  var grid_1 = require("../../display/grid");
112
113
  var kanban_1 = require("../../display/kanban");
113
114
  var list_1 = require("../../display/list");
@@ -147,6 +148,7 @@ var authModal_1 = require("./authModal");
147
148
  var dataStateModel_1 = require("./dataStateModel");
148
149
  var indexedDb_1 = require("./indexedDb");
149
150
  var socket_1 = require("./socket");
151
+ var newPagination_1 = require("../../display/newPagination");
150
152
  var pagination_1 = require("./pagination");
151
153
  var referenceModal_1 = require("./referenceModal");
152
154
  var settingsModal_1 = require("./settingsModal");
@@ -166,8 +168,20 @@ var handleGetWriteErrorMessage = function (response) {
166
168
  return response.data.err;
167
169
  return "Please contact our administrator for assistance or try your request again later. We apologize for any inconvenience";
168
170
  };
171
+ // INFO: apps hide the library's action buttons by returning an empty fragment
172
+ // from bareUpdateActionComponent — an empty fragment must not leave an empty
173
+ // floating bar behind
174
+ var handleIsEmptyElement = function (element) {
175
+ var _a;
176
+ return element === undefined ||
177
+ element === null ||
178
+ element === false ||
179
+ (react_1.default.isValidElement(element) &&
180
+ element.type === react_1.default.Fragment &&
181
+ !((_a = element.props) === null || _a === void 0 ? void 0 : _a.children));
182
+ };
169
183
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
170
- 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;
184
+ 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, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64;
171
185
  var intialiseDefaultFilterValues = function () {
172
186
  var _a;
173
187
  var initialFilterSearch = {};
@@ -228,67 +242,75 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
228
242
  initialFilterReferenceDate: initialFilterReferenceDate,
229
243
  };
230
244
  };
231
- var _51 = intialiseDefaultFilterValues(), initialFilterSearch = _51.initialFilterSearch, initialFilterSearchParams = _51.initialFilterSearchParams, initialFilterSelection = _51.initialFilterSelection, initialFilterReference = _51.initialFilterReference, initialFilterReferenceDate = _51.initialFilterReferenceDate;
245
+ var _65 = intialiseDefaultFilterValues(), initialFilterSearch = _65.initialFilterSearch, initialFilterSearchParams = _65.initialFilterSearchParams, initialFilterSelection = _65.initialFilterSelection, initialFilterReference = _65.initialFilterReference, initialFilterReferenceDate = _65.initialFilterReferenceDate;
232
246
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
233
- var _52 = (0, viewStatePersistence_1.usePersistedViewState)({
247
+ var _66 = (0, viewStatePersistence_1.usePersistedViewState)({
234
248
  mode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistViewState,
235
249
  collectionId: props.collectionId,
236
250
  uniqueLabel: props.uniqueLabel,
237
251
  type: props.type,
238
- }), persistedState = _52.persistedState, isPersistEnabled = _52.isEnabled, handleSaveView = _52.handleSaveView;
239
- var _53 = (0, react_1.useState)(false), loading = _53[0], setLoading = _53[1];
240
- var _54 = (0, react_1.useState)(), notification = _54[0], setNotification = _54[1];
252
+ }), persistedState = _66.persistedState, isPersistEnabled = _66.isEnabled, handleSaveView = _66.handleSaveView;
253
+ var _67 = (0, react_1.useState)(false), loading = _67[0], setLoading = _67[1];
254
+ var _68 = (0, react_1.useState)(), notification = _68[0], setNotification = _68[1];
255
+ // INFO: a success toast is confirmation, not a decision — it clears itself so
256
+ // it never sits on the floating step bar; errors stay until dismissed
257
+ (0, react_1.useEffect)(function () {
258
+ if (!(notification === null || notification === void 0 ? void 0 : notification.type))
259
+ return;
260
+ var timer = setTimeout(function () { return setNotification(null); }, 4000);
261
+ return function () { return clearTimeout(timer); };
262
+ }, [notification]);
241
263
  //INFO : Used by List
242
- 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
- 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];
244
- var _57 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _d !== void 0 ? _d : initialFilterSelection), filterSelection = _57[0], setFilterSelection = _57[1];
245
- var _58 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _e !== void 0 ? _e : initialFilterReference), filterReference = _58[0], setFilterReference = _58[1];
246
- var _59 = (0, react_1.useState)({}), filterReferenceSearch = _59[0], setFilterReferenceSearch = _59[1];
247
- var _60 = (0, react_1.useState)({}), filterReferenceList = _60[0], setFilterReferenceList = _60[1];
248
- var _61 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
264
+ var _69 = (0, react_1.useState)((_b = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _b !== void 0 ? _b : initialFilterSearch), filterSearch = _69[0], setFilterSearch = _69[1];
265
+ var _70 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearchParams), filterSearchParams = _70[0], setFilterSearchParams = _70[1];
266
+ var _71 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _d !== void 0 ? _d : initialFilterSelection), filterSelection = _71[0], setFilterSelection = _71[1];
267
+ var _72 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _e !== void 0 ? _e : initialFilterReference), filterReference = _72[0], setFilterReference = _72[1];
268
+ var _73 = (0, react_1.useState)({}), filterReferenceSearch = _73[0], setFilterReferenceSearch = _73[1];
269
+ var _74 = (0, react_1.useState)({}), filterReferenceList = _74[0], setFilterReferenceList = _74[1];
270
+ var _75 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
249
271
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
250
- : initialFilterReferenceDate), filterReferenceDate = _61[0], setFilterReferenceDate = _61[1];
251
- var _62 = (0, react_1.useState)(true), tableLoading = _62[0], setTableLoading = _62[1];
252
- var _63 = (0, react_1.useState)(""), cursor = _63[0], setCursor = _63[1];
253
- var _64 = (0, react_1.useState)(""), lastCursor = _64[0], setLastCursor = _64[1];
254
- var _65 = (0, react_1.useState)([]), tableData = _65[0], setTableData = _65[1];
255
- var _66 = (0, react_1.useState)([]), spaceTableData = _66[0], setSpaceTableData = _66[1];
256
- var _67 = (0, react_1.useState)(0), size = _67[0], setSize = _67[1];
257
- var _68 = (0, react_1.useState)((_h = (_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _f !== void 0 ? _f : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.pageIndex) !== null && _h !== void 0 ? _h : 0), pageIndex = _68[0], setPageIndex = _68[1];
258
- var _69 = (0, react_1.useState)([]), selectedIds = _69[0], setSelectedIds = _69[1];
259
- var _70 = (0, react_1.useState)(false), selectAll = _70[0], setSelectAll = _70[1];
260
- var _71 = (0, react_1.useState)(""), deletePasscode = _71[0], setDeletePasscode = _71[1];
261
- var _72 = (0, react_1.useState)(""), deletePasscodeInput = _72[0], setDeletePasscodeInput = _72[1];
262
- var _73 = (0, react_1.useState)(""), deleteFeedId = _73[0], setDeleteFeedId = _73[1];
272
+ : initialFilterReferenceDate), filterReferenceDate = _75[0], setFilterReferenceDate = _75[1];
273
+ var _76 = (0, react_1.useState)(true), tableLoading = _76[0], setTableLoading = _76[1];
274
+ var _77 = (0, react_1.useState)(""), cursor = _77[0], setCursor = _77[1];
275
+ var _78 = (0, react_1.useState)(""), lastCursor = _78[0], setLastCursor = _78[1];
276
+ var _79 = (0, react_1.useState)([]), tableData = _79[0], setTableData = _79[1];
277
+ var _80 = (0, react_1.useState)([]), spaceTableData = _80[0], setSpaceTableData = _80[1];
278
+ var _81 = (0, react_1.useState)(0), size = _81[0], setSize = _81[1];
279
+ var _82 = (0, react_1.useState)((_h = (_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _f !== void 0 ? _f : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.pageIndex) !== null && _h !== void 0 ? _h : 0), pageIndex = _82[0], setPageIndex = _82[1];
280
+ var _83 = (0, react_1.useState)([]), selectedIds = _83[0], setSelectedIds = _83[1];
281
+ var _84 = (0, react_1.useState)(false), selectAll = _84[0], setSelectAll = _84[1];
282
+ var _85 = (0, react_1.useState)(""), deletePasscode = _85[0], setDeletePasscode = _85[1];
283
+ var _86 = (0, react_1.useState)(""), deletePasscodeInput = _86[0], setDeletePasscodeInput = _86[1];
284
+ var _87 = (0, react_1.useState)(""), deleteFeedId = _87[0], setDeleteFeedId = _87[1];
263
285
  //INFO : Used by List Organise
264
- var _74 = (0, react_1.useState)(false), sortModal = _74[0], setSortModal = _74[1];
265
- var _75 = (0, react_1.useState)(false), filterModal = _75[0], setFilterModal = _75[1];
286
+ var _88 = (0, react_1.useState)(false), sortModal = _88[0], setSortModal = _88[1];
287
+ var _89 = (0, react_1.useState)(false), filterModal = _89[0], setFilterModal = _89[1];
266
288
  // INFO: Internal sort state that overrides props.organise?.sort when
267
289
  // persistViewState is enabled and a persisted sort exists
268
- var _76 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _j !== void 0 ? _j : undefined), persistedSort = _76[0], setPersistedSort = _76[1];
269
- var _77 = (0, react_1.useState)(false), filterDraft = _77[0], setFilterDraft = _77[1];
270
- var _78 = (0, react_1.useState)(false), addTabModal = _78[0], setAddTabModal = _78[1];
271
- var _79 = (0, react_1.useState)(false), overviewModal = _79[0], setOverviewModal = _79[1];
290
+ var _90 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _j !== void 0 ? _j : undefined), persistedSort = _90[0], setPersistedSort = _90[1];
291
+ var _91 = (0, react_1.useState)(false), filterDraft = _91[0], setFilterDraft = _91[1];
292
+ var _92 = (0, react_1.useState)(false), addTabModal = _92[0], setAddTabModal = _92[1];
293
+ var _93 = (0, react_1.useState)(false), overviewModal = _93[0], setOverviewModal = _93[1];
272
294
  //INFO : resolve the initial tab synchronously so the mount cond is already
273
295
  // tab-scoped — an empty initial tab caused a second wasted list fetch
274
- var _80 = (0, react_1.useState)(function () {
296
+ var _94 = (0, react_1.useState)(function () {
275
297
  var _a, _b;
276
298
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
277
- }), selectedTab = _80[0], setSelectedTab = _80[1];
278
- var _81 = (0, react_1.useState)("dayGridMonth"), calendarView = _81[0], setCalendarView = _81[1];
299
+ }), selectedTab = _94[0], setSelectedTab = _94[1];
300
+ var _95 = (0, react_1.useState)("dayGridMonth"), calendarView = _95[0], setCalendarView = _95[1];
279
301
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
280
302
  // (calendarView above drives the matching range query)
281
- var _82 = (0, react_1.useState)("month"), newCalendarViewMode = _82[0], setNewCalendarViewMode = _82[1];
282
- var _83 = (0, react_1.useState)(new Date()), calendarTabMonth = _83[0], setCalendarTabMonth = _83[1];
283
- var _84 = (0, react_1.useState)(true), kanbanDroppable = _84[0], setKanbanDroppable = _84[1];
284
- var _85 = (0, react_1.useState)([]), kanbanOptions = _85[0], setKanbanOptions = _85[1];
285
- var _86 = (0, react_1.useState)(false), queryForm = _86[0], setQueryForm = _86[1];
286
- var _87 = (0, react_1.useState)(false), batchUpdateModal = _87[0], setBatchUpdateModal = _87[1];
287
- var _88 = (0, react_1.useState)({
303
+ var _96 = (0, react_1.useState)("month"), newCalendarViewMode = _96[0], setNewCalendarViewMode = _96[1];
304
+ var _97 = (0, react_1.useState)(new Date()), calendarTabMonth = _97[0], setCalendarTabMonth = _97[1];
305
+ var _98 = (0, react_1.useState)(true), kanbanDroppable = _98[0], setKanbanDroppable = _98[1];
306
+ var _99 = (0, react_1.useState)([]), kanbanOptions = _99[0], setKanbanOptions = _99[1];
307
+ var _100 = (0, react_1.useState)(false), queryForm = _100[0], setQueryForm = _100[1];
308
+ var _101 = (0, react_1.useState)(false), batchUpdateModal = _101[0], setBatchUpdateModal = _101[1];
309
+ var _102 = (0, react_1.useState)({
288
310
  columnId: "",
289
311
  columnData: {},
290
- }), batchUpdateData = _88[0], setBatchUpdateData = _88[1];
291
- var _89 = (0, react_1.useState)(function () {
312
+ }), batchUpdateData = _102[0], setBatchUpdateData = _102[1];
313
+ var _103 = (0, react_1.useState)(function () {
292
314
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
293
315
  if (!persistedState)
294
316
  return baseModel;
@@ -314,8 +336,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
314
336
  });
315
337
  }
316
338
  return model;
317
- }), structure = _89[0], setStructure = _89[1];
318
- var _90 = (0, react_1.useState)(((_k = props === null || props === void 0 ? void 0 : props.organise) === null || _k === void 0 ? void 0 : _k.additionalQuery) || []), additionalQuery = _90[0], setAdditionalQuery = _90[1];
339
+ }), structure = _103[0], setStructure = _103[1];
340
+ var _104 = (0, react_1.useState)(((_k = props === null || props === void 0 ? void 0 : props.organise) === null || _k === void 0 ? void 0 : _k.additionalQuery) || []), additionalQuery = _104[0], setAdditionalQuery = _104[1];
319
341
  // INFO: State for user-configurable flex filters (Monday.com-style)
320
342
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
321
343
  var defaultFlexFilterRow = [
@@ -326,105 +348,105 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
326
348
  value: undefined,
327
349
  },
328
350
  ];
329
- var _91 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
351
+ var _105 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
330
352
  ? persistedState.flexFilters
331
- : defaultFlexFilterRow), flexFilters = _91[0], setFlexFilters = _91[1];
353
+ : defaultFlexFilterRow), flexFilters = _105[0], setFlexFilters = _105[1];
332
354
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
333
355
  // to prevent API calls on every keystroke when typing in value inputs
334
- var _92 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
356
+ var _106 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
335
357
  ? persistedState.flexFilters
336
- : defaultFlexFilterRow), flexFiltersDebounced = _92[0], setFlexFiltersDebounced = _92[1];
337
- var _93 = (0, react_1.useState)({}), flexFilterReferenceOptions = _93[0], setFlexFilterReferenceOptions = _93[1];
338
- var _94 = (0, react_1.useState)({}), flexFilterReferenceSearch = _94[0], setFlexFilterReferenceSearch = _94[1];
339
- var _95 = (0, react_1.useState)(false), flexFilterModalOpen = _95[0], setFlexFilterModalOpen = _95[1];
358
+ : defaultFlexFilterRow), flexFiltersDebounced = _106[0], setFlexFiltersDebounced = _106[1];
359
+ var _107 = (0, react_1.useState)({}), flexFilterReferenceOptions = _107[0], setFlexFilterReferenceOptions = _107[1];
360
+ var _108 = (0, react_1.useState)({}), flexFilterReferenceSearch = _108[0], setFlexFilterReferenceSearch = _108[1];
361
+ var _109 = (0, react_1.useState)(false), flexFilterModalOpen = _109[0], setFlexFilterModalOpen = _109[1];
340
362
  // INFO: Columns the end user chose to hide (organise.hideColumnEnabled).
341
363
  // Deliberately kept out of `structure`: the props-sync effect below resets
342
364
  // structure to props.model whenever props change, which would wipe the
343
365
  // choice, and the persist effect derives schema-level hiddenColumnIds from
344
366
  // structure — writing user hides there would blur the two concepts.
345
- var _96 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _l !== void 0 ? _l : []), userHiddenColumnIds = _96[0], setUserHiddenColumnIds = _96[1];
367
+ var _110 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _l !== void 0 ? _l : []), userHiddenColumnIds = _110[0], setUserHiddenColumnIds = _110[1];
346
368
  //INFO : Used by Auth
347
- var _97 = (0, react_1.useState)({
369
+ var _111 = (0, react_1.useState)({
348
370
  email: "",
349
371
  google: "",
350
372
  phone: "",
351
373
  disabled: false,
352
374
  create: false,
353
- }), authMethods = _97[0], setAuthMethods = _97[1];
354
- var _98 = (0, react_1.useState)(""), selectedAuthMethod = _98[0], setSelectedAuthMethod = _98[1];
375
+ }), authMethods = _111[0], setAuthMethods = _111[1];
376
+ var _112 = (0, react_1.useState)(""), selectedAuthMethod = _112[0], setSelectedAuthMethod = _112[1];
355
377
  // INFO: Used by Activity Log
356
- var _99 = (0, react_1.useState)(false), activityModal = _99[0], setActivityModal = _99[1];
357
- var _100 = (0, react_1.useState)(""), activityId = _100[0], setActivityId = _100[1];
378
+ var _113 = (0, react_1.useState)(false), activityModal = _113[0], setActivityModal = _113[1];
379
+ var _114 = (0, react_1.useState)(""), activityId = _114[0], setActivityId = _114[1];
358
380
  //INFO : Used by Export
359
- var _101 = (0, react_1.useState)(null), csvFile = _101[0], setCSVFile = _101[1];
360
- var _102 = (0, react_1.useState)([]), csvFileData = _102[0], setCSVFileData = _102[1];
361
- var _103 = (0, react_1.useState)(0), stepCSVIndex = _103[0], setStepCSVIndex = _103[1];
362
- var _104 = (0, react_1.useState)({}), listCSVMapAttribute = _104[0], setListCSVMapAttribute = _104[1];
363
- var _105 = (0, react_1.useState)({}), listCSVObjAttribute = _105[0], setListCSVObjAttribute = _105[1];
364
- var _106 = (0, react_1.useState)([]), csvAPIAttribute = _106[0], setCSVAPIAttribute = _106[1];
365
- var _107 = (0, react_1.useState)(((_m = props.devSettings.currentUser) === null || _m === void 0 ? void 0 : _m.userEmail) || ""), exportCSVEmail = _107[0], setExportCSVEmail = _107[1];
366
- var _108 = (0, react_1.useState)(((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.exportSettings) === null || _p === void 0 ? void 0 : _p.defaultExportPDFName) || ""), exportPDFTitle = _108[0], setExportPDFTitle = _108[1];
367
- var _109 = (0, react_1.useState)(false), exportPDFLoading = _109[0], setExportPDFLoading = _109[1];
368
- var _110 = (0, react_1.useState)(false), exportReadPDFLoading = _110[0], setExportReadPDFLoading = _110[1];
369
- var _111 = (0, react_1.useState)((_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.sumColumnId) !== null && _s !== void 0 ? _s : []), exportSumAttributeIds = _111[0], setExportSumAttributeIds = _111[1];
370
- var _112 = (0, react_1.useState)((_v = (_u = (_t = props.organise) === null || _t === void 0 ? void 0 : _t.exportSettings) === null || _u === void 0 ? void 0 : _u.hideSubItems) !== null && _v !== void 0 ? _v : false), hideSubItems = _112[0], setHideSubItems = _112[1];
371
- var _113 = (0, react_1.useState)([]), importTableData = _113[0], setImportTableData = _113[1];
372
- var _114 = (0, react_1.useState)([]), queryList = _114[0], setQueryList = _114[1];
373
- var _115 = (0, react_1.useState)(undefined), allQueryList = _115[0], setAllQueryList = _115[1];
374
- var _116 = (0, react_1.useState)(-1), queryIndex = _116[0], setQueryIndex = _116[1];
375
- var _117 = (0, react_1.useState)((_w = props.organise) === null || _w === void 0 ? void 0 : _w.groupBy), groupId = _117[0], setGroupId = _117[1];
376
- var _118 = (0, react_1.useState)(""), readTabSection = _118[0], setReadTabSection = _118[1];
377
- var _119 = (0, react_1.useState)(false), readFloatingNav = _119[0], setReadFloatingNav = _119[1];
381
+ var _115 = (0, react_1.useState)(null), csvFile = _115[0], setCSVFile = _115[1];
382
+ var _116 = (0, react_1.useState)([]), csvFileData = _116[0], setCSVFileData = _116[1];
383
+ var _117 = (0, react_1.useState)(0), stepCSVIndex = _117[0], setStepCSVIndex = _117[1];
384
+ var _118 = (0, react_1.useState)({}), listCSVMapAttribute = _118[0], setListCSVMapAttribute = _118[1];
385
+ var _119 = (0, react_1.useState)({}), listCSVObjAttribute = _119[0], setListCSVObjAttribute = _119[1];
386
+ var _120 = (0, react_1.useState)([]), csvAPIAttribute = _120[0], setCSVAPIAttribute = _120[1];
387
+ var _121 = (0, react_1.useState)(((_m = props.devSettings.currentUser) === null || _m === void 0 ? void 0 : _m.userEmail) || ""), exportCSVEmail = _121[0], setExportCSVEmail = _121[1];
388
+ var _122 = (0, react_1.useState)(((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.exportSettings) === null || _p === void 0 ? void 0 : _p.defaultExportPDFName) || ""), exportPDFTitle = _122[0], setExportPDFTitle = _122[1];
389
+ var _123 = (0, react_1.useState)(false), exportPDFLoading = _123[0], setExportPDFLoading = _123[1];
390
+ var _124 = (0, react_1.useState)(false), exportReadPDFLoading = _124[0], setExportReadPDFLoading = _124[1];
391
+ var _125 = (0, react_1.useState)((_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.sumColumnId) !== null && _s !== void 0 ? _s : []), exportSumAttributeIds = _125[0], setExportSumAttributeIds = _125[1];
392
+ var _126 = (0, react_1.useState)((_v = (_u = (_t = props.organise) === null || _t === void 0 ? void 0 : _t.exportSettings) === null || _u === void 0 ? void 0 : _u.hideSubItems) !== null && _v !== void 0 ? _v : false), hideSubItems = _126[0], setHideSubItems = _126[1];
393
+ var _127 = (0, react_1.useState)([]), importTableData = _127[0], setImportTableData = _127[1];
394
+ var _128 = (0, react_1.useState)([]), queryList = _128[0], setQueryList = _128[1];
395
+ var _129 = (0, react_1.useState)(undefined), allQueryList = _129[0], setAllQueryList = _129[1];
396
+ var _130 = (0, react_1.useState)(-1), queryIndex = _130[0], setQueryIndex = _130[1];
397
+ var _131 = (0, react_1.useState)((_w = props.organise) === null || _w === void 0 ? void 0 : _w.groupBy), groupId = _131[0], setGroupId = _131[1];
398
+ var _132 = (0, react_1.useState)(""), readTabSection = _132[0], setReadTabSection = _132[1];
399
+ var _133 = (0, react_1.useState)(false), readFloatingNav = _133[0], setReadFloatingNav = _133[1];
378
400
  var readTabSectionRefs = (0, react_1.useRef)({});
379
401
  //INFO : Used by Read
380
402
  //INFO : Used by Update
381
- var _120 = (0, react_1.useState)(false), modalVisible = _120[0], setModalVisible = _120[1];
382
- var _121 = (0, react_1.useState)(false), deleteModal = _121[0], setDeleteModal = _121[1];
383
- var _122 = (0, react_1.useState)(false), excelModal = _122[0], setExcelModal = _122[1];
384
- var _123 = (0, react_1.useState)(false), exportExcel = _123[0], setExportExcel = _123[1];
385
- var _124 = (0, react_1.useState)(""), exportType = _124[0], setExportType = _124[1];
386
- var _125 = (0, react_1.useState)(false), exportQR = _125[0], setExportQR = _125[1];
387
- var _126 = (0, react_1.useState)(function () {
403
+ var _134 = (0, react_1.useState)(false), modalVisible = _134[0], setModalVisible = _134[1];
404
+ var _135 = (0, react_1.useState)(false), deleteModal = _135[0], setDeleteModal = _135[1];
405
+ var _136 = (0, react_1.useState)(false), excelModal = _136[0], setExcelModal = _136[1];
406
+ var _137 = (0, react_1.useState)(false), exportExcel = _137[0], setExportExcel = _137[1];
407
+ var _138 = (0, react_1.useState)(""), exportType = _138[0], setExportType = _138[1];
408
+ var _139 = (0, react_1.useState)(false), exportQR = _139[0], setExportQR = _139[1];
409
+ var _140 = (0, react_1.useState)(function () {
388
410
  var _a, _b;
389
411
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
390
412
  return firstTabId;
391
- }), activeTab = _126[0], setActiveTab = _126[1];
392
- var _127 = (0, react_1.useState)(false), signatureSigning = _127[0], setSignatureSigning = _127[1];
393
- var _128 = (0, react_1.useState)({}), selectedData = _128[0], setSelectedData = _128[1];
394
- var _129 = (0, react_1.useState)(""), selectedObjectStructureId = _129[0], setSelectedObjectStructureId = _129[1];
395
- var _130 = (0, react_1.useState)(""), selectedObjectId = _130[0], setSelectedObjectId = _130[1];
396
- var _131 = (0, react_1.useState)(""), selectedListAddressId = _131[0], setSelectedListAddressId = _131[1];
397
- var _132 = (0, react_1.useState)(-1), selectedListAddressIndex = _132[0], setSelectedListAddressIndex = _132[1];
398
- var _133 = (0, react_1.useState)({
413
+ }), activeTab = _140[0], setActiveTab = _140[1];
414
+ var _141 = (0, react_1.useState)(false), signatureSigning = _141[0], setSignatureSigning = _141[1];
415
+ var _142 = (0, react_1.useState)({}), selectedData = _142[0], setSelectedData = _142[1];
416
+ var _143 = (0, react_1.useState)(""), selectedObjectStructureId = _143[0], setSelectedObjectStructureId = _143[1];
417
+ var _144 = (0, react_1.useState)(""), selectedObjectId = _144[0], setSelectedObjectId = _144[1];
418
+ var _145 = (0, react_1.useState)(""), selectedListAddressId = _145[0], setSelectedListAddressId = _145[1];
419
+ var _146 = (0, react_1.useState)(-1), selectedListAddressIndex = _146[0], setSelectedListAddressIndex = _146[1];
420
+ var _147 = (0, react_1.useState)({
399
421
  lat: 0,
400
422
  lng: 0,
401
423
  name: "",
402
- }), selectedListAddress = _133[0], setSelectedListAddress = _133[1];
403
- var _134 = (0, react_1.useState)({}), selectedObjectData = _134[0], setSelectedObjectData = _134[1];
404
- var _135 = (0, react_1.useState)(null), objectCellEdit = _135[0], setObjectCellEdit = _135[1];
405
- var _136 = (0, react_1.useState)(false), referenceLoading = _136[0], setReferenceLoading = _136[1];
406
- var _137 = (0, react_1.useState)({}), referencesOptions = _137[0], setReferencesOptions = _137[1];
407
- var _138 = (0, react_1.useState)({}), referencesDetails = _138[0], setReferencesDetails = _138[1];
408
- var _139 = (0, react_1.useState)({}), listReferencesOptions = _139[0], setListReferencesOptions = _139[1];
409
- var _140 = (0, react_1.useState)({}), referenceDeleteTableData = _140[0], setReferenceDeleteTableData = _140[1];
410
- var _141 = (0, react_1.useState)(0), referenceDeleteIndex = _141[0], setReferenceDeleteIndex = _141[1];
411
- var _142 = (0, react_1.useState)({
424
+ }), selectedListAddress = _147[0], setSelectedListAddress = _147[1];
425
+ var _148 = (0, react_1.useState)({}), selectedObjectData = _148[0], setSelectedObjectData = _148[1];
426
+ var _149 = (0, react_1.useState)(null), objectCellEdit = _149[0], setObjectCellEdit = _149[1];
427
+ var _150 = (0, react_1.useState)(false), referenceLoading = _150[0], setReferenceLoading = _150[1];
428
+ var _151 = (0, react_1.useState)({}), referencesOptions = _151[0], setReferencesOptions = _151[1];
429
+ var _152 = (0, react_1.useState)({}), referencesDetails = _152[0], setReferencesDetails = _152[1];
430
+ var _153 = (0, react_1.useState)({}), listReferencesOptions = _153[0], setListReferencesOptions = _153[1];
431
+ var _154 = (0, react_1.useState)({}), referenceDeleteTableData = _154[0], setReferenceDeleteTableData = _154[1];
432
+ var _155 = (0, react_1.useState)(0), referenceDeleteIndex = _155[0], setReferenceDeleteIndex = _155[1];
433
+ var _156 = (0, react_1.useState)({
412
434
  id: "",
413
435
  name: "",
414
436
  type: "string",
415
- }), referenceCreationModal = _142[0], setReferenceCreationModal = _142[1];
416
- var _143 = (0, react_1.useState)({}), referenceModelSchema = _143[0], setReferenceSchema = _143[1];
417
- var _144 = (0, react_1.useState)([]), kanbanChecked = _144[0], setKanbanChecked = _144[1];
437
+ }), referenceCreationModal = _156[0], setReferenceCreationModal = _156[1];
438
+ var _157 = (0, react_1.useState)({}), referenceModelSchema = _157[0], setReferenceSchema = _157[1];
439
+ var _158 = (0, react_1.useState)([]), kanbanChecked = _158[0], setKanbanChecked = _158[1];
418
440
  //INFO : Offline
419
- var _145 = (0, react_1.useState)(0), offlineDataLength = _145[0], setOfflineDataLength = _145[1];
420
- var _146 = (0, react_1.useState)(false), offlineModal = _146[0], setOfflineModal = _146[1];
441
+ var _159 = (0, react_1.useState)(0), offlineDataLength = _159[0], setOfflineDataLength = _159[1];
442
+ var _160 = (0, react_1.useState)(false), offlineModal = _160[0], setOfflineModal = _160[1];
421
443
  // INFO: live-stream state — driven by socket connection and navigator.onLine
422
- var _147 = (0, react_1.useState)(false), isLive = _147[0], setIsLive = _147[1];
423
- var _148 = (0, react_1.useState)(false), isLiveOffline = _148[0], setIsLiveOffline = _148[1];
444
+ var _161 = (0, react_1.useState)(false), isLive = _161[0], setIsLive = _161[1];
445
+ var _162 = (0, react_1.useState)(false), isLiveOffline = _162[0], setIsLiveOffline = _162[1];
424
446
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
425
447
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
426
448
  // Independent of SSE status so it works even when bareSocketName is not set.
427
- var _149 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _149[0], setIsNetworkOffline = _149[1];
449
+ var _163 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _163[0], setIsNetworkOffline = _163[1];
428
450
  var previousType = (0, react_1.useRef)(null);
429
451
  var previousSelectedData = (0, react_1.useRef)(null);
430
452
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -462,6 +484,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
462
484
  // overwriting persisted structure with props.model on the first render
463
485
  var persistedViewMountedRef = (0, react_1.useRef)(false);
464
486
  var formRef = (0, react_1.createRef)();
487
+ // INFO: a draft written because the user moved to another step is routine —
488
+ // the toast is reserved for an explicit Save; the ref is read by the draft
489
+ // notification and reset straight after
490
+ var silentDraftRef = (0, react_1.useRef)(false);
465
491
  var objectFormRef = (0, react_1.createRef)();
466
492
  var listAddressFromRef = (0, react_1.createRef)();
467
493
  var listAddressInputRef = (0, react_1.createRef)();
@@ -1468,7 +1494,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1468
1494
  switch (_a.label) {
1469
1495
  case 0:
1470
1496
  refFields = structure.filter(function (s) {
1471
- return (utils_1.REFERENCE_DATA_TYPES.includes(s.type)) &&
1497
+ return utils_1.REFERENCE_DATA_TYPES.includes(s.type) &&
1472
1498
  s.referenceSpaceId &&
1473
1499
  s.referenceLabel;
1474
1500
  });
@@ -1948,8 +1974,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1948
1974
  var handleSeedListReferenceOptions = function (details) {
1949
1975
  var seeded = {};
1950
1976
  Object.entries(details !== null && details !== void 0 ? details : {}).forEach(function (_a) {
1977
+ var _b, _c;
1951
1978
  var eachKey = _a[0], eachDocs = _a[1];
1952
- var model = structure.find(function (eachModel) { return eachModel.id === eachKey; });
1979
+ // INFO: "careExpert.organisationId" points at a reference nested in an
1980
+ // object — resolve its label settings from the object's own structure
1981
+ var _d = eachKey.split("."), objectId = _d[0], subId = _d[1];
1982
+ var model = subId
1983
+ ? (_c = (_b = structure
1984
+ .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; })
1985
+ : structure.find(function (eachModel) { return eachModel.id === eachKey; });
1953
1986
  if (!model || !Array.isArray(eachDocs))
1954
1987
  return;
1955
1988
  seeded[eachKey] = eachDocs.map(function (eachDoc) {
@@ -2160,20 +2193,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2160
2193
  return __generator(this, function (_a) {
2161
2194
  switch (_a.label) {
2162
2195
  case 0:
2163
- if (!((utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type)) &&
2196
+ if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type) &&
2164
2197
  eachModel.referenceMapColumnId)) return [3 /*break*/, 2];
2165
2198
  return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachModel, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, undefined, undefined, undefined, undefined, props.type === "read")];
2166
2199
  case 1:
2167
2200
  _a.sent();
2168
2201
  _a.label = 2;
2169
2202
  case 2:
2170
- if (!((utils_1.OBJECT_DATA_TYPES.includes(eachModel.type)) &&
2203
+ if (!(utils_1.OBJECT_DATA_TYPES.includes(eachModel.type) &&
2171
2204
  eachModel.objectData)) return [3 /*break*/, 4];
2172
2205
  return [4 /*yield*/, Promise.all(eachModel.objectData.map(function (eachObjectData) { return __awaiter(void 0, void 0, void 0, function () {
2173
2206
  return __generator(this, function (_a) {
2174
2207
  switch (_a.label) {
2175
2208
  case 0:
2176
- if (!((utils_1.REFERENCE_DATA_TYPES.includes(eachObjectData.type)) &&
2209
+ if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachObjectData.type) &&
2177
2210
  eachObjectData.referenceMapColumnId)) return [3 /*break*/, 2];
2178
2211
  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
2212
  case 1:
@@ -3024,7 +3057,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3024
3057
  case 1:
3025
3058
  _a.sent();
3026
3059
  multiImageAttribute = model.filter(function (eachAttribute) {
3027
- return (utils_1.MULTIPLE_ASSET_DATA_TYPES.includes(eachAttribute.type));
3060
+ return utils_1.MULTIPLE_ASSET_DATA_TYPES.includes(eachAttribute.type);
3028
3061
  });
3029
3062
  return [4 /*yield*/, Promise.all(multiImageAttribute.map(function (eachImage) { return __awaiter(void 0, void 0, void 0, function () {
3030
3063
  var _a, _b, _c, _d;
@@ -4431,15 +4464,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4431
4464
  _x.sent();
4432
4465
  _x.label = 37;
4433
4466
  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
- });
4467
+ // INFO: a draft save announces itself (or stays silent on a step
4468
+ // change) further up — this toast is for a real update only
4469
+ if (!isDraft) {
4470
+ setNotification({
4471
+ type: true,
4472
+ title: props.id === "new"
4473
+ ? "Created Successfully"
4474
+ : "Updated Successfully",
4475
+ msg: props.id === "new"
4476
+ ? "Data sucessfully created"
4477
+ : "Data sucessfully updated",
4478
+ });
4479
+ }
4443
4480
  _x.label = 38;
4444
4481
  case 38:
4445
4482
  dataId = res ? id : "";
@@ -4665,11 +4702,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4665
4702
  if (props.id === "new" || !props.id) {
4666
4703
  (_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
4704
  }
4668
- setNotification({
4669
- type: true,
4670
- title: "Draft Saved",
4671
- msg: "Your changes have been saved",
4672
- });
4705
+ if (silentDraftRef.current) {
4706
+ silentDraftRef.current = false;
4707
+ }
4708
+ else {
4709
+ setNotification({
4710
+ type: true,
4711
+ title: "Draft Saved",
4712
+ msg: "Your changes have been saved",
4713
+ });
4714
+ }
4673
4715
  }
4674
4716
  else {
4675
4717
  // INFO: Non-draft (final submit) — reset dirty tracking and rebase baseline.
@@ -4767,7 +4809,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4767
4809
  // INFO: convert raw docs to Option[] format so reference Select
4768
4810
  // components receive { key, label, secondaryLabel } as expected
4769
4811
  // (mirrors the shape handleRetrieveObjectReferenceOptions builds online)
4770
- if ((utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type)) &&
4812
+ if (utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type) &&
4771
4813
  eachModel.referenceLabel) {
4772
4814
  clonedReferencesOptions_1[eachModel.id] = offlineData.map(function (r) {
4773
4815
  var _a, _b, _c, _d;
@@ -5225,13 +5267,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5225
5267
  var selectedModel = structure.find(function (eachModel) {
5226
5268
  return eachModel.id === eachValue;
5227
5269
  });
5228
- if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "object" || (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "listObject") {
5270
+ if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "object" ||
5271
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "listObject") {
5229
5272
  var selectedObjectModel = (_c = selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.objectData) === null || _c === void 0 ? void 0 : _c.find(function (eachModel) {
5230
5273
  return eachModel.id === listCSVObjAttribute[eachKey];
5231
5274
  });
5232
5275
  if ((selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "image" ||
5233
5276
  (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") {
5277
+ (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleImage" ||
5278
+ (selectedObjectModel === null || selectedObjectModel === void 0 ? void 0 : selectedObjectModel.type) === "multipleFile") {
5235
5279
  csvList_1.push({
5236
5280
  id: (_d = listCSVObjAttribute[eachKey]) !== null && _d !== void 0 ? _d : "",
5237
5281
  ori: Number(eachKey),
@@ -5255,7 +5299,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5255
5299
  }
5256
5300
  else if ((selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "image" ||
5257
5301
  (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") {
5302
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleImage" ||
5303
+ (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) === "multipleFile") {
5259
5304
  csvList_1.push({
5260
5305
  id: eachValue !== null && eachValue !== void 0 ? eachValue : "",
5261
5306
  ori: Number(eachKey),
@@ -6163,7 +6208,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6163
6208
  var renderDetailListData = function (model) {
6164
6209
  var detailList = [];
6165
6210
  model
6166
- .filter(function (eachAttribute) { return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type); })
6211
+ .filter(function (eachAttribute) {
6212
+ return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type);
6213
+ })
6167
6214
  .map(function (eachAttribute) {
6168
6215
  var _a, _b, _c, _d, _e, _f;
6169
6216
  var selectedDataKey = Object.keys(selectedData).find(function (eachKey) { return eachKey === eachAttribute.id; });
@@ -6330,7 +6377,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6330
6377
  });
6331
6378
  var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, remainId);
6332
6379
  isListObject.map(function (eachListObject) {
6333
- var _a, _b;
6380
+ var _a, _b, _c;
6334
6381
  var flexTableRefIndex = props.model
6335
6382
  .filter(function (model) { return model.type === "listObject" && model.listFlexTable; })
6336
6383
  .findIndex(function (model) { return model.id === eachListObject.id; });
@@ -6339,6 +6386,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6339
6386
  tabId: eachListObject.tabId,
6340
6387
  activeTab: activeTab,
6341
6388
  hasTabAlign: !!hasTabAlign,
6389
+ darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode,
6342
6390
  }));
6343
6391
  return null;
6344
6392
  });
@@ -6431,90 +6479,199 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6431
6479
  // INFO: placement is decided by the caller (see isBottom in renderContent), so this only
6432
6480
  // builds the buttons. It previously took an isBottom argument purely to add a top margin
6433
6481
  // 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;
6482
+ // INFO: the labelled footer of a multi-tab update form — Previous, a step
6483
+ // counter, then the same Save / Submit the header offers and a Continue
6484
+ // button that reuses the bareSaveOnTabChange draft-save. Replaces the bare
6485
+ // chevron icons, which gave no sense of position in a long form.
6486
+ // INFO: bareUpdateActionBottom opts out of the floating pill — a short form
6487
+ // inside a modal reads better with a plain button row than a card inside a
6488
+ // card; tabbed and long forms keep the sticky bar so Submit stays reachable
6489
+ var handleActionBarClassName = function (justifyEnd) {
6490
+ var _a, _b, _c, _d, _e;
6491
+ var layout = "mt-6 flex flex-row items-center gap-2 whitespace-nowrap".concat(justifyEnd ? " justify-end" : "");
6492
+ if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom)
6493
+ return "".concat(layout).concat(((_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode) ? " text-white" : "");
6494
+ var surface = ((_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode)
6495
+ ? "border-gray-700 ".concat((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg) !== null && _e !== void 0 ? _e : "bg-gray-900/95", " text-white")
6496
+ : "border-gray-200 bg-white/95";
6497
+ return "sticky bottom-3 z-20 -mx-2 ".concat(layout, " rounded-2xl border ").concat(surface, " px-3 py-2 shadow-lg backdrop-blur sm:mx-0 sm:px-4");
6498
+ };
6499
+ var renderStepBar = function (uniqueTabIds) {
6500
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6501
+ var hasTabAlign = ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabAlign) || ((_b = props.space) === null || _b === void 0 ? void 0 : _b.tabAlign);
6502
+ if (props.type !== "update")
6503
+ return null;
6504
+ // INFO: navigation only makes sense with more than one tab; the actions
6505
+ // are the same floating bar on every update form
6506
+ var isTabbed = !!hasTabAlign && uniqueTabIds.length > 1;
6507
+ var currentTabIndex = uniqueTabIds.findIndex(function (tabId) { return tabId === (activeTab || ""); });
6508
+ var isFirst = currentTabIndex <= 0;
6509
+ var isLast = currentTabIndex >= uniqueTabIds.length - 1;
6510
+ var handleMoveTab = function (direction) { return __awaiter(void 0, void 0, void 0, function () {
6511
+ var _a;
6512
+ return __generator(this, function (_b) {
6513
+ switch (_b.label) {
6514
+ case 0:
6515
+ if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareSaveOnTabChange)) return [3 /*break*/, 2];
6516
+ // INFO: the form's save resolves before the request does, so the flag
6517
+ // is consumed by the notification itself; the timer only covers a save
6518
+ // that never reaches it (validation stop, network error)
6519
+ silentDraftRef.current = true;
6520
+ setTimeout(function () {
6521
+ silentDraftRef.current = false;
6522
+ }, 5000);
6523
+ return [4 /*yield*/, handleFormSaveDraft()];
6524
+ case 1:
6525
+ _b.sent();
6526
+ _b.label = 2;
6527
+ case 2:
6528
+ handleUpdateTabId(uniqueTabIds[currentTabIndex + direction]);
6529
+ return [2 /*return*/];
6530
+ }
6531
+ });
6532
+ }); };
6533
+ 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;
6534
+ var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6535
+ var hasActions = bareActionComponent ? hasCustomActions : true;
6536
+ var showDelete = !!((_f = props.edit) === null || _f === void 0 ? void 0 : _f.deleteBtn) && isEditor && props.id !== "new";
6537
+ if (!isTabbed && !hasActions && !showDelete)
6538
+ return null;
6539
+ return (
6540
+ // INFO: sticky, not fixed — it stays visible on a long tab yet never
6541
+ // covers content that is not the form's own
6542
+ // INFO: one row at every width — a phone keeps the whole bar under
6543
+ // 60px, so it never hides the field being edited. Left cluster is
6544
+ // navigation (Previous · counter · Next), right cluster is actions
6545
+ // (Save · Submit or the caller's own component)
6546
+ react_1.default.createElement("div", { "data-testid": "dtw-step-bar", className: handleActionBarClassName(false) },
6547
+ isTabbed && (react_1.default.createElement(react_1.default.Fragment, null,
6548
+ react_1.default.createElement("div", { className: "sm:hidden" },
6549
+ 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); } })),
6550
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6551
+ 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); } })),
6552
+ react_1.default.createElement("span", { "data-testid": "dtw-step-counter", className: "text-xs text-gray-500 sm:text-sm" },
6553
+ react_1.default.createElement("span", { className: "sm:hidden" },
6554
+ currentTabIndex + 1,
6555
+ "/",
6556
+ uniqueTabIds.length),
6557
+ react_1.default.createElement("span", { className: "hidden sm:inline" },
6558
+ "Step ",
6559
+ currentTabIndex + 1,
6560
+ " of ",
6561
+ uniqueTabIds.length)),
6562
+ react_1.default.createElement("div", { className: "sm:hidden" },
6563
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-next-icon", size: "small", background: isLast
6564
+ ? "bg-gray-100 border border-gray-200"
6565
+ : "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); } })),
6566
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6567
+ react_1.default.createElement(button_1.Button, { id: "dtw-continue", text: "Next", type: "light", size: "small", disable: isLast, onClick: function () { return handleMoveTab(1); } })))),
6568
+ react_1.default.createElement("div", { className: "flex-1" }),
6569
+ react_1.default.createElement("div", { className: "flex flex-row items-center gap-2" },
6570
+ ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && isEditor && props.id !== "new" && (react_1.default.createElement(react_1.default.Fragment, null,
6571
+ react_1.default.createElement("div", { className: "sm:hidden" },
6572
+ 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 () {
6573
+ setDeleteModal(true);
6574
+ } })),
6575
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6576
+ react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", type: "light", size: "small", className: "!text-red-600", onClick: function () {
6577
+ setDeleteModal(true);
6578
+ } })))),
6579
+ hasCustomActions && bareActionComponent,
6580
+ !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 () {
6581
+ return __generator(this, function (_a) {
6582
+ switch (_a.label) {
6583
+ case 0: return [4 /*yield*/, handleFormSaveDraft()];
6584
+ case 1:
6585
+ _a.sent();
6586
+ return [2 /*return*/];
6587
+ }
6588
+ });
6589
+ }); } })),
6590
+ !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 () {
6591
+ return __generator(this, function (_a) {
6592
+ switch (_a.label) {
6593
+ case 0: return [4 /*yield*/, handleFormSubmit()];
6594
+ case 1:
6595
+ _a.sent();
6596
+ return [2 /*return*/];
6597
+ }
6598
+ });
6599
+ }); } })))));
6600
+ };
6601
+ // INFO: the read view's floating bar — the same pill as the update form,
6602
+ // carrying Update (or the caller's own component), Export PDF and Log
6603
+ var renderReadBar = function () {
6604
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6605
+ if (props.type !== "read")
6606
+ return null;
6436
6607
  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 () {
6608
+ var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6609
+ var showUpdate = !bareActionComponent && !((_d = props.edit) === null || _d === void 0 ? void 0 : _d.disabledUpdate);
6610
+ var showExport = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.exportSettings) === null || _f === void 0 ? void 0 : _f.enableExportReadPDF);
6611
+ var showDelete = !!((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && isEditor && props.id !== "new";
6612
+ if (!hasCustomActions &&
6613
+ !showUpdate &&
6614
+ !showExport &&
6615
+ !isActivityLog &&
6616
+ !showDelete)
6617
+ return null;
6618
+ return (react_1.default.createElement("div", { "data-testid": "dtw-read-bar", className: handleActionBarClassName(true) },
6619
+ ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.deleteBtn) && isEditor && props.id !== "new" && (react_1.default.createElement(react_1.default.Fragment, null,
6620
+ react_1.default.createElement("div", { className: "sm:hidden" },
6621
+ 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 () {
6622
+ setDeleteModal(true);
6623
+ } })),
6624
+ react_1.default.createElement("div", { className: "hidden sm:block" },
6625
+ react_1.default.createElement(button_1.Button, { id: "dtw-delete", text: "Delete", type: "light", size: "small", className: "!text-red-600", onClick: function () {
6626
+ setDeleteModal(true);
6627
+ } })))),
6628
+ showExport && (react_1.default.createElement(button_1.Button, { type: "light", text: "Export PDF", size: "small", onClick: handleExportReadPDF })),
6629
+ isActivityLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
6630
+ hasCustomActions && bareActionComponent,
6631
+ showUpdate &&
6632
+ (hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small", onClick: function () {
6443
6633
  var _a, _b;
6444
6634
  (_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
- } }))));
6635
+ } })) : (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 },
6636
+ react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small" }))))));
6637
+ };
6638
+ // INFO: tab navigation moved to renderStepBar — the alignment and tab ids
6639
+ // are still accepted so existing call sites stay unchanged
6640
+ // INFO: a tabbed update form has exactly one action bar — the sticky step bar
6641
+ // under the form. Its header row keeps only Delete, a destructive action that
6642
+ // should not sit at the end of a "continue, continue" flow.
6643
+ var renderActionButtons = function (type, _hasTabAlign, _uniqueTabIds) {
6644
+ var _a, _b, _c, _d, _e, _f;
6645
+ 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;
6646
+ // INFO: every update form carries Save / Submit in the floating bar, so
6647
+ // the header keeps only Delete
6648
+ var isTabbedUpdate = type === "update";
6649
+ if (type === "read") {
6650
+ // INFO: every read-view action, Delete included, lives in the floating bar
6651
+ return null;
6450
6652
  }
6451
6653
  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
- } }))));
6654
+ 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,
6655
+ ((_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 () {
6656
+ return __generator(this, function (_a) {
6657
+ switch (_a.label) {
6658
+ case 0: return [4 /*yield*/, handleFormSaveDraft()];
6659
+ case 1:
6660
+ _a.sent();
6661
+ return [2 /*return*/];
6662
+ }
6663
+ });
6664
+ }); } })),
6665
+ 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 () {
6666
+ return __generator(this, function (_a) {
6667
+ switch (_a.label) {
6668
+ case 0: return [4 /*yield*/, handleFormSubmit()];
6669
+ case 1:
6670
+ _a.sent();
6671
+ return [2 /*return*/];
6672
+ }
6673
+ });
6674
+ }); } })))));
6518
6675
  }
6519
6676
  else if (type === "list") {
6520
6677
  var listActionBtns = [];
@@ -6524,7 +6681,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6524
6681
  if (bareActionComponent) {
6525
6682
  listActionBtns.push(bareActionComponent);
6526
6683
  }
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)) {
6684
+ 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
6685
  listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
6529
6686
  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
6687
  var _a, _b;
@@ -6656,7 +6813,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6656
6813
  authList));
6657
6814
  };
6658
6815
  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;
6816
+ 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;
6660
6817
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
6661
6818
  var tabs = renderTabs();
6662
6819
  var pages = [
@@ -6693,20 +6850,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6693
6850
  react_1.default.createElement("div", null,
6694
6851
  react_1.default.createElement("div", { className: "flex flex-col sm:py-2 sm:items-center sm:flex-row ".concat(hasReadHeading ? "justify-between" : "sm:justify-end") },
6695
6852
  hasReadHeading && (react_1.default.createElement("div", { className: "flex flex-col" },
6696
- props.title && (react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title)),
6853
+ props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_h = props.organise) === null || _h === void 0 ? void 0 : _h.darkMode) ? "text-white" : "") }, props.title)),
6697
6854
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
6698
- !isBottom && renderActionButtons(props.type))),
6699
- (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
- ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadComponentPos) === "top" &&
6855
+ renderActionButtons(props.type))),
6856
+ (schemaPresent || ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.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: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode })),
6857
+ ((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentPos) === "top" &&
6701
6858
  renderBareReadComp(),
6702
6859
  anyAuthMethod && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, renderAuthContent())),
6703
6860
  react_1.default.createElement("div", { ref: exportReadPDFRef },
6704
- !((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, props.type, viewType))),
6705
- ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) !== "top" &&
6861
+ !((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, props.type, viewType))),
6862
+ ((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareReadComponentPos) !== "top" &&
6706
6863
  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)))))));
6864
+ renderReadBar()))));
6710
6865
  case "update":
6711
6866
  if (props.id !== "new") {
6712
6867
  pages.push({
@@ -6716,12 +6871,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6716
6871
  });
6717
6872
  }
6718
6873
  pages.push({
6719
- name: (_q = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.breadcrumbAttributeId) !== null && _p !== void 0 ? _p : serverId]) !== null && _q !== void 0 ? _q : (props.id ? props.id : "new"),
6874
+ name: (_r = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_q = (_p = props.organise) === null || _p === void 0 ? void 0 : _p.breadcrumbAttributeId) !== null && _q !== void 0 ? _q : serverId]) !== null && _r !== void 0 ? _r : (props.id ? props.id : "new"),
6720
6875
  href: "#",
6721
6876
  current: true,
6722
6877
  });
6723
6878
  var filterModel_1 = [];
6724
- var disabledOnEnter_1 = (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.disabledOnEnter) !== null && _s !== void 0 ? _s : false;
6879
+ var disabledOnEnter_1 = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.disabledOnEnter) !== null && _t !== void 0 ? _t : false;
6725
6880
  structure.map(function (eachModel) {
6726
6881
  var _a;
6727
6882
  var present = false;
@@ -6834,12 +6989,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6834
6989
  }
6835
6990
  }
6836
6991
  };
6837
- var hasTabAlign_1 = ((_t = props.organise) === null || _t === void 0 ? void 0 : _t.tabAlign) || ((_u = props.space) === null || _u === void 0 ? void 0 : _u.tabAlign);
6838
- var leftTabAlign = ((_v = props.organise) === null || _v === void 0 ? void 0 : _v.tabAlign) === "left" ||
6839
- ((_w = props.space) === null || _w === void 0 ? void 0 : _w.tabAlign) === "left";
6840
- var topTabAlign = ((_x = props.organise) === null || _x === void 0 ? void 0 : _x.tabAlign) === "top" || ((_y = props.space) === null || _y === void 0 ? void 0 : _y.tabAlign) === "top";
6841
- var stepperTabAlign = ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.tabAlign) === "stepper" ||
6842
- ((_0 = props.space) === null || _0 === void 0 ? void 0 : _0.tabAlign) === "stepper";
6992
+ var hasTabAlign_1 = ((_u = props.organise) === null || _u === void 0 ? void 0 : _u.tabAlign) || ((_v = props.space) === null || _v === void 0 ? void 0 : _v.tabAlign);
6993
+ var leftTabAlign = ((_w = props.organise) === null || _w === void 0 ? void 0 : _w.tabAlign) === "left" ||
6994
+ ((_x = props.space) === null || _x === void 0 ? void 0 : _x.tabAlign) === "left";
6995
+ var topTabAlign = ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.tabAlign) === "top" || ((_z = props.space) === null || _z === void 0 ? void 0 : _z.tabAlign) === "top";
6996
+ var stepperTabAlign = ((_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.tabAlign) === "stepper" ||
6997
+ ((_1 = props.space) === null || _1 === void 0 ? void 0 : _1.tabAlign) === "stepper";
6843
6998
  var uniqueTabIds_2 = Array.from(new Set(filterModel_1
6844
6999
  .map(function (item) { return item.tabId; })
6845
7000
  .filter(function (id) { return id !== undefined; })));
@@ -6848,11 +7003,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6848
7003
  if (shouldIncludeOthers) {
6849
7004
  uniqueTabIds_2.push("");
6850
7005
  }
6851
- 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 : [];
7006
+ var customTabComponent_1 = (_4 = (_3 = (_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareUpdateTabComponent) === null || _3 === void 0 ? void 0 : _3.call(_2, uniqueTabIds_2)) !== null && _4 !== void 0 ? _4 : [];
6852
7007
  var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
7008
+ var _a, _b;
6853
7009
  var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
6854
7010
  return {
6855
7011
  title: eachTabId ? eachTabId : "Others",
7012
+ shortTitle: (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabShortLabels) === null || _b === void 0 ? void 0 : _b[eachTabId],
6856
7013
  description: "",
6857
7014
  icon: customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.icon,
6858
7015
  skip: (customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.skip) ? true : false,
@@ -6868,11 +7025,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6868
7025
  icon: function () { return react_1.default.createElement("div", null); },
6869
7026
  };
6870
7027
  });
7028
+ var railSteps = uniqueTabIds_2.map(function (eachTabId) {
7029
+ var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
7030
+ return {
7031
+ id: eachTabId || "Others",
7032
+ title: eachTabId ? eachTabId : "Others",
7033
+ completed: (0, utils_1.handleIsTabComplete)(filterModel_1, selectedData, eachTabId),
7034
+ icon: customTabMatch === null || customTabMatch === void 0 ? void 0 : customTabMatch.icon,
7035
+ };
7036
+ });
6871
7037
  return (react_1.default.createElement(react_1.default.Fragment, null,
6872
7038
  props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
6873
7039
  dbModule: dbModule,
6874
7040
  dbType: devSettings.server,
6875
- dbCollection: (_5 = (_4 = props === null || props === void 0 ? void 0 : props.space) === null || _4 === void 0 ? void 0 : _4.pipelineDefaultSpaceId) !== null && _5 !== void 0 ? _5 : props.collectionId,
7041
+ dbCollection: (_6 = (_5 = props === null || props === void 0 ? void 0 : props.space) === null || _5 === void 0 ? void 0 : _5.pipelineDefaultSpaceId) !== null && _6 !== void 0 ? _6 : props.collectionId,
6876
7042
  dbEndpoint: devSettings.dbEndpoint,
6877
7043
  dbAPIToken: devSettings.dbAPIToken,
6878
7044
  dbUserToken: devSettings.dbUserToken,
@@ -6880,21 +7046,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6880
7046
  type: "get",
6881
7047
  id: props.id,
6882
7048
  pipeline: pipeline,
6883
- }, offline: ((_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
7049
+ }, offline: ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
6884
7050
  renderBreadcrumb(pages),
6885
7051
  react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
6886
7052
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
6887
- props.title && (react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title)),
7053
+ props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkMode) ? "text-white" : "") }, props.title)),
6888
7054
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
6889
- !isBottom &&
7055
+ (!isBottom || hasTabAlign_1 || props.type === "update") &&
6890
7056
  renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)),
6891
7057
  hasTabAlign_1 ? (react_1.default.createElement("div", { className: "w-full ".concat(leftTabAlign
6892
7058
  ? "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5"
6893
7059
  : "") },
6894
7060
  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 }))),
7061
+ react_1.default.createElement(stepper_1.Stepper, { variant: "checklist", steps: railSteps, stepIndex: uniqueTabIds_2.findIndex(function (tabId) { return tabId === (activeTab || ""); }), onChange: function (stepIndex) {
7062
+ handleUpdateTabId(uniqueTabIds_2[stepIndex] || "");
7063
+ } }))),
6898
7064
  react_1.default.createElement("div", { className: "w-full ".concat(leftTabAlign ? " md:col-span-2 lg:col-span-3" : "") },
6899
7065
  topTabAlign && uniqueTabIds_2.length >= 1 && (react_1.default.createElement(bars_1.Bars, { bars: tabBars, selectedId: activeTab || "Others", onClick: function (tabId) {
6900
7066
  handleUpdateTabId(tabId);
@@ -6903,11 +7069,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6903
7069
  var tabId = uniqueTabIds_2[stepIndex];
6904
7070
  handleUpdateTabId(tabId);
6905
7071
  } })),
6906
- ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareUpdateComponentAbove) &&
6907
- ((_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareUpdateComponent) &&
6908
- ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateComponent(selectedData)),
7072
+ ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateComponentAbove) &&
7073
+ ((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareUpdateComponent) &&
7074
+ ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateComponent(selectedData)),
6909
7075
  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
7076
  uniqueTabIds_2.map(function (tabId) {
7077
+ var _a, _b, _c, _d;
6911
7078
  var filterByTab = filterModel_1
6912
7079
  .map(function (model, index) { return (__assign(__assign({}, model), { refIndex: index })); })
6913
7080
  .filter(function (model) {
@@ -6919,34 +7086,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6919
7086
  ? activeTab === tabId
6920
7087
  ? ""
6921
7088
  : "hidden"
6922
- : "") }, renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
7089
+ : "") },
7090
+ hasTabAlign_1 && (react_1.default.createElement("div", { className: "col-span-12" },
7091
+ react_1.default.createElement("p", { className: "text-lg font-semibold ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "text-white" : "text-gray-900") }, tabId || "Others"),
7092
+ ((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.tabDescriptions) === null || _c === void 0 ? void 0 : _c[tabId]) && (react_1.default.createElement("p", { className: "text-sm mt-0.5 ".concat(((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "text-gray-400" : "text-gray-500") }, props.organise.tabDescriptions[tabId])))),
7093
+ renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
6923
7094
  }),
6924
- !((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareUpdateComponentAbove) &&
6925
- ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateComponent) &&
6926
- ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponent(selectedData))),
7095
+ !((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponentAbove) &&
7096
+ ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponent) &&
7097
+ ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent(selectedData))),
6927
7098
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
6928
7099
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
7100
+ renderStepBar(uniqueTabIds_2),
6929
7101
  isBottom &&
7102
+ props.type !== "update" &&
6930
7103
  renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
6931
- ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponentAbove) &&
6932
- ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent) &&
6933
- ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent(selectedData)),
7104
+ ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponentAbove) &&
7105
+ ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponent) &&
7106
+ ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent(selectedData)),
6934
7107
  react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
6935
7108
  renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
6936
- !((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponentAbove) &&
6937
- ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent) &&
6938
- ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent(selectedData))),
7109
+ !((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
7110
+ ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) &&
7111
+ ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponent(selectedData))),
6939
7112
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
6940
7113
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
6941
- isBottom &&
6942
- renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)))));
7114
+ renderStepBar(uniqueTabIds_2)))));
6943
7115
  case "list":
6944
7116
  case "union":
6945
7117
  var filterComponent_1 = renderSearchContent();
6946
7118
  var dataComponent = renderTabContent(tabs, props.type, viewType);
6947
7119
  var actionComponent = renderActionButtons(props.type);
6948
7120
  // INFO: Active flex filter count — used by both the filter icon badge and floating search bar
6949
- var activeFlexFilterCount_1 = ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareFlexFilters)
7121
+ var activeFlexFilterCount_1 = ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareFlexFilters)
6950
7122
  ? flexFilters.filter(function (eachFilter) {
6951
7123
  return eachFilter.columnId && eachFilter.operator && eachFilter.value;
6952
7124
  }).length
@@ -6954,14 +7126,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6954
7126
  var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
6955
7127
  dbModule: dbModule,
6956
7128
  dbType: devSettings.server,
6957
- dbCollection: (_21 = (_20 = props === null || props === void 0 ? void 0 : props.space) === null || _20 === void 0 ? void 0 : _20.pipelineDefaultSpaceId) !== null && _21 !== void 0 ? _21 : props.collectionId,
7129
+ dbCollection: (_23 = (_22 = props === null || props === void 0 ? void 0 : props.space) === null || _22 === void 0 ? void 0 : _22.pipelineDefaultSpaceId) !== null && _23 !== void 0 ? _23 : props.collectionId,
6958
7130
  dbEndpoint: devSettings.dbEndpoint,
6959
7131
  dbAPIToken: devSettings.dbAPIToken,
6960
7132
  dbUserToken: devSettings.dbUserToken,
6961
- }, cond: handleReadQueryHocCond(), offline: ((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareOffline) && isNetworkOffline, onChangeData: function (data) {
7133
+ }, cond: handleReadQueryHocCond(), offline: ((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareOffline) && isNetworkOffline, onChangeData: function (data) {
6962
7134
  handleGetListData(data, "", "");
6963
7135
  }, onError: handleGetItemError }));
6964
- if ((_23 = props.renderSettings) === null || _23 === void 0 ? void 0 : _23.renderListUI) {
7136
+ if ((_25 = props.renderSettings) === null || _25 === void 0 ? void 0 : _25.renderListUI) {
6965
7137
  return (react_1.default.createElement(react_1.default.Fragment, null,
6966
7138
  listReadQueryHOC,
6967
7139
  props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
@@ -7008,53 +7180,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7008
7180
  return null;
7009
7181
  };
7010
7182
  var renderListActionElements = function () {
7011
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
7183
+ 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;
7012
7184
  var actionElementList = [];
7013
7185
  if (schemaPresent) {
7014
7186
  actionElementList.push(react_1.default.createElement(react_1.default.Fragment, null,
7015
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white", onClick: function () {
7187
+ react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/10" : "bg-white", onClick: function () {
7016
7188
  handlePopUpModal(true, "sort");
7017
7189
  } }),
7018
7190
  react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7019
7191
  handlePopUpModal(true, "filter");
7020
- }, bgColor: "bg-white" }),
7192
+ }, bgColor: ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode) ? "bg-white/10" : "bg-white" }),
7021
7193
  react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7022
7194
  handlePopUpModal(true, "overview");
7023
- }, bgColor: "bg-white" }),
7195
+ }, bgColor: ((_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode) ? "bg-white/10" : "bg-white" }),
7024
7196
  react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7025
7197
  // INFO - When Refresh Don't Clear Filter
7026
7198
  handleRefresh();
7027
- }, bgColor: "bg-white" })));
7199
+ }, bgColor: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "bg-white/10" : "bg-white" })));
7028
7200
  }
7029
- if ((((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListFilterAsPopup) ||
7030
- ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareCompactMode)) &&
7031
- !((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareFlexFilters) &&
7201
+ if ((((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListFilterAsPopup) ||
7202
+ ((_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareCompactMode)) &&
7203
+ !((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareFlexFilters) &&
7032
7204
  filterComponent_1 &&
7033
7205
  Array.isArray(filterComponent_1) &&
7034
7206
  filterComponent_1.length > 0) {
7035
7207
  // INFO: in compact mode, the search input is rendered inline by
7036
7208
  // renderListFilterElements, so drop the trailing search element
7037
7209
  // from the popup to avoid duplication.
7038
- var popupFilters = ((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareCompactMode) && !((_e = props.organise) === null || _e === void 0 ? void 0 : _e.hideSearch)
7210
+ var popupFilters = ((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareCompactMode) && !((_j = props.organise) === null || _j === void 0 ? void 0 : _j.hideSearch)
7039
7211
  ? filterComponent_1.slice(0, -1)
7040
7212
  : filterComponent_1;
7041
7213
  if (popupFilters.length > 0) {
7042
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg p-4 flex flex-col space-y-3 w-[calc(100vw-2rem)] max-w-[320px]" }, popupFilters.map(function (filterEl, index) { return (react_1.default.createElement("div", { key: index }, filterEl)); })), anchor: "right", excludePortalIds: ["datepicker-portal"], lib: { Transition: (_f = props === null || props === void 0 ? void 0 : props.lib) === null || _f === void 0 ? void 0 : _f.Transition } }));
7214
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg p-4 flex flex-col space-y-3 w-[calc(100vw-2rem)] max-w-[320px]" }, popupFilters.map(function (filterEl, index) { return (react_1.default.createElement("div", { key: index }, filterEl)); })), anchor: "right", excludePortalIds: ["datepicker-portal"], lib: { Transition: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Transition } }));
7043
7215
  }
7044
7216
  }
7045
7217
  // INFO: User column hiding — the schemaPresent path already exposes
7046
7218
  // OverviewModal, which writes hide back to the schema in the database.
7047
7219
  // This one is the client-only counterpart for bare DTWs.
7048
- if (!schemaPresent && ((_g = props.organise) === null || _g === void 0 ? void 0 : _g.hideColumnEnabled)) {
7220
+ if (!schemaPresent && ((_o = props.organise) === null || _o === void 0 ? void 0 : _o.hideColumnEnabled)) {
7049
7221
  var hiddenColumnCount = getUserHiddenColumnCount();
7050
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement("div", { className: "relative w-fit h-fit" },
7222
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.darkMode, ctaComp: react_1.default.createElement("div", { className: "relative w-fit h-fit" },
7051
7223
  hiddenColumnCount > 0 && (react_1.default.createElement("div", { "data-testid": "dtw-hide-columns-count", className: "absolute top-0 right-0 translate-x-1/4 -translate-y-1/4 z-[1] rounded-full bg-primary-500 text-white flex items-center justify-center w-5 h-5 text-[10px]" }, hiddenColumnCount)),
7052
7224
  react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-hide-columns-btn", icon: react_1.default.createElement(outline_1.EyeSlashIcon, { className: "h-7 w-7 ".concat(hiddenColumnCount > 0
7053
7225
  ? "text-white"
7054
- : "text-primary-500") }), bgColor: hiddenColumnCount > 0 ? "bg-primary-500" : "bg-white" })), renderComp: renderHideColumnPopupContent(), anchor: "right", lib: { Transition: (_h = props === null || props === void 0 ? void 0 : props.lib) === null || _h === void 0 ? void 0 : _h.Transition } }));
7226
+ : "text-primary-500") }), bgColor: hiddenColumnCount > 0 ? "bg-primary-500" : "bg-white" })), renderComp: renderHideColumnPopupContent(), anchor: "right", lib: { Transition: (_q = props === null || props === void 0 ? void 0 : props.lib) === null || _q === void 0 ? void 0 : _q.Transition } }));
7055
7227
  }
7056
7228
  // INFO: Flex filter — desktop uses PopUp, mobile uses Modal
7057
- if ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareFlexFilters) {
7229
+ if ((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareFlexFilters) {
7058
7230
  var flexActions = {
7059
7231
  handleAddFilter: handleFlexFilterAdd,
7060
7232
  handleRemoveFilter: handleFlexFilterRemove,
@@ -7067,31 +7239,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7067
7239
  };
7068
7240
  // INFO: Search input will only render above flex filters if bareListFilterAsPopup is true
7069
7241
  var searchInput = !isFirebase &&
7070
- ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListFilterAsPopup) &&
7071
- !((_l = props.organise) === null || _l === void 0 ? void 0 : _l.hideSearch) &&
7242
+ ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareListFilterAsPopup) &&
7243
+ !((_t = props.organise) === null || _t === void 0 ? void 0 : _t.hideSearch) &&
7072
7244
  filterComponent_1 &&
7073
7245
  Array.isArray(filterComponent_1) &&
7074
7246
  filterComponent_1.length > 0
7075
7247
  ? filterComponent_1[filterComponent_1.length - 1]
7076
7248
  : undefined;
7077
7249
  var flexFilterLength_1 = activeFlexFilterCount_1;
7078
- if (!((_m = props.organise) === null || _m === void 0 ? void 0 : _m.hideSearch) &&
7079
- ((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListFilterAsPopup) &&
7250
+ if (!((_u = props.organise) === null || _u === void 0 ? void 0 : _u.hideSearch) &&
7251
+ ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareListFilterAsPopup) &&
7080
7252
  (filterSearchParams === null || filterSearchParams === void 0 ? void 0 : filterSearchParams["search"]))
7081
7253
  flexFilterLength_1 += 1;
7082
7254
  var flexFilterIconBtn = function (mobile) {
7255
+ var _a;
7083
7256
  return (react_1.default.createElement("div", { className: "relative w-fit h-fit" },
7084
7257
  flexFilterLength_1 > 0 && (react_1.default.createElement("div", { className: "absolute top-0 right-0 translate-x-1/4 -translate-y-1/4 z-[1] rounded-full bg-primary-500 text-white flex items-center justify-center w-5 h-5 text-[10px]" }, flexFilterLength_1)),
7085
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white", onClick: mobile ? function () { return setFlexFilterModalOpen(true); } : undefined })));
7258
+ react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/10" : "bg-white", onClick: mobile ? function () { return setFlexFilterModalOpen(true); } : undefined })));
7086
7259
  };
7087
7260
  // INFO: Desktop — PopUp (hidden on mobile)
7088
7261
  actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
7089
- react_1.default.createElement(popUp_1.PopUp, { ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareListFilterQuery, searchInput, (_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareListFilterAddComponent), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_r = props === null || props === void 0 ? void 0 : props.lib) === null || _r === void 0 ? void 0 : _r.Transition } })));
7262
+ react_1.default.createElement(popUp_1.PopUp, { darkMode: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListFilterQuery, searchInput, (_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListFilterAddComponent, undefined, {
7263
+ darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode,
7264
+ darkModeBg: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkModeBg,
7265
+ }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_1 = props === null || props === void 0 ? void 0 : props.lib) === null || _1 === void 0 ? void 0 : _1.Transition } })));
7090
7266
  // INFO: Mobile — IconButton that opens a Modal (hidden on desktop)
7091
7267
  actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
7092
- !((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareListMobileFloatingSearch) &&
7268
+ !((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareListMobileFloatingSearch) &&
7093
7269
  flexFilterIconBtn(true),
7094
- (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareListFilterQuery, searchInput, (_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareListFilterAddComponent)));
7270
+ (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListFilterQuery, searchInput, (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListFilterAddComponent, {
7271
+ darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode,
7272
+ darkModeBg: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.darkModeBg,
7273
+ })));
7095
7274
  }
7096
7275
  // INFO: bareUpdateActionBottom positions the read/update action bar. The list's own
7097
7276
  // create and offline-upload buttons stay in the filter row either way — they belong
@@ -7099,14 +7278,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7099
7278
  var actionBtns = renderActionButtons(props.type);
7100
7279
  if (actionBtns)
7101
7280
  actionElementList.push(actionBtns);
7102
- if (schemaPresent || ((_v = props.organise) === null || _v === void 0 ? void 0 : _v.showExport)) {
7103
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
7281
+ if (schemaPresent || ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.showExport)) {
7282
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
7104
7283
  //TODO: Bug - Crash on Next Js
7105
7284
  // <Menu.Item>
7106
7285
  react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
7107
7286
  // </Menu.Item>
7108
7287
  ); })), lib: {
7109
- Transition: (_w = props === null || props === void 0 ? void 0 : props.lib) === null || _w === void 0 ? void 0 : _w.Transition,
7288
+ Transition: (_10 = props === null || props === void 0 ? void 0 : props.lib) === null || _10 === void 0 ? void 0 : _10.Transition,
7110
7289
  } }));
7111
7290
  }
7112
7291
  if (actionElementList.length > 0) {
@@ -7149,30 +7328,34 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7149
7328
  };
7150
7329
  return (react_1.default.createElement(react_1.default.Fragment, null,
7151
7330
  listReadQueryHOC,
7152
- 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"
7331
+ react_1.default.createElement("div", { className: "flex py-2 ".concat(((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareCompactMode)
7332
+ ? // INFO: the grow spacer is hidden on phones (search lives in
7333
+ // the floating bar), so the row itself pushes the actions right
7334
+ "w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
7154
7335
  : "flex-col md:items-end md:flex-row") },
7155
7336
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col" },
7156
7337
  props.title && (react_1.default.createElement("div", { className: "flex items-center gap-2" },
7157
- react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
7158
- ((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareSocketName) &&
7338
+ react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.darkMode) ? "text-white" : "") }, props.title),
7339
+ ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareSocketName) &&
7159
7340
  isLive &&
7160
7341
  !isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700" },
7161
7342
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
7162
7343
  "LIVE")),
7163
- ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
7344
+ ((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
7164
7345
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
7165
7346
  "OFFLINE")))),
7166
7347
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
7167
- react_1.default.createElement("div", { className: ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareCompactMode)
7348
+ react_1.default.createElement("div", { className: ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareCompactMode)
7168
7349
  ? "hidden sm:block grow"
7169
7350
  : "grow" }),
7170
- renderListFilterElements(),
7171
- renderListActionElements()),
7351
+ react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end" },
7352
+ renderListFilterElements(),
7353
+ renderListActionElements())),
7172
7354
  renderListNewRowFilterElements(),
7173
- (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 })),
7355
+ (schemaPresent || ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.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: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode })),
7174
7356
  renderTabContent(tabs, props.type, viewType),
7175
- ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) &&
7357
+ ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
7358
+ ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareListMobileFloatingSearch) &&
7176
7359
  (0, listModule_1.renderFloatingMobileSearch)({
7177
7360
  filterSearch: filterSearch,
7178
7361
  handleNameSearch: handleNameSearch,
@@ -7185,15 +7368,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7185
7368
  handlePopUpModal(true, "filter");
7186
7369
  }
7187
7370
  },
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)
7371
+ hideSearch: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hideSearch,
7372
+ darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode,
7373
+ floatingOffset: (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareListFloatingActionOffset,
7374
+ hideFilter: !((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareFlexFilters),
7375
+ activeFilterCount: ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareFlexFilters)
7193
7376
  ? activeFlexFilterCount_1
7194
7377
  : undefined,
7195
7378
  // 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,
7379
+ hidden: selectAll || ((_40 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _40 !== void 0 ? _40 : 0) > 0,
7197
7380
  })));
7198
7381
  default:
7199
7382
  return react_1.default.createElement(react_1.default.Fragment, null);
@@ -7203,7 +7386,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7203
7386
  //SECTION: Render Utils
7204
7387
  //=====================================================================================
7205
7388
  var renderDataTemplateFormContent = function (state, model, ref, isObject, isObjectList, modalInput, parentData) {
7206
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7389
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7207
7390
  return (0, updateModule_1.renderDataTemplateForm)(state, model, ref, {
7208
7391
  handleOnChangeAddress: handleOnChangeAddress,
7209
7392
  handleOnChangeText: handleOnChangeText,
@@ -7225,10 +7408,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7225
7408
  showId: showId,
7226
7409
  remainId: remainId,
7227
7410
  groupIdCollapsible: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.groupIdCollapsible,
7411
+ groupDescriptions: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.groupDescriptions,
7412
+ darkMode: (_e = props.organise) === null || _e === void 0 ? void 0 : _e.darkMode,
7413
+ darkModeBg: (_f = props.organise) === null || _f === void 0 ? void 0 : _f.darkModeBg,
7228
7414
  }, {
7229
7415
  dbModule: dbModule,
7230
7416
  devSettings: devSettings,
7231
- referencesOptions: referencesOptions,
7417
+ // INFO: the object editor opened from a list cell has no read/update
7418
+ // fetch behind it — the list-load seed is what gives its nested
7419
+ // reference Select a label before the user searches
7420
+ referencesOptions: __assign(__assign({}, listReferencesOptions), referencesOptions),
7232
7421
  referencesDetails: referencesDetails,
7233
7422
  referenceLoading: referenceLoading,
7234
7423
  setReferenceLoading: setReferenceLoading,
@@ -7238,12 +7427,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7238
7427
  imageEndpoint: devSettings.imageEndpoint,
7239
7428
  maxFileSize: devSettings.maxFileSize,
7240
7429
  imageBucketName: devSettings.bucketName,
7241
- handleCustomDownloadFile: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.handleCustomDownloadFile,
7430
+ handleCustomDownloadFile: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.handleCustomDownloadFile,
7242
7431
  }, {
7243
7432
  selectedObjectId: selectedObjectId,
7244
7433
  selectedObjectStructureId: selectedObjectStructureId,
7245
7434
  parentData: parentData,
7246
- organiseListObjTableView: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.listObjectTableView)
7435
+ organiseListObjTableView: ((_h = props.organise) === null || _h === void 0 ? void 0 : _h.listObjectTableView)
7247
7436
  ? true
7248
7437
  : false,
7249
7438
  setSelectedObjectStructureId: setSelectedObjectStructureId,
@@ -7253,7 +7442,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7253
7442
  renderObjectTags: renderObjectTags,
7254
7443
  setSelectedData: setSelectedData,
7255
7444
  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);
7445
+ }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareOffline, (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdateColumnType) !== null && _l !== void 0 ? _l : "two", (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateIndividualComponent, (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateMobileView);
7257
7446
  };
7258
7447
  var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName) {
7259
7448
  var _a, _b;
@@ -7555,9 +7744,54 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7555
7744
  var _a, _b, _c;
7556
7745
  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
7746
  };
7747
+ // INFO: for NewTable, groupBy stays inside one table — rows are handed over
7748
+ // as coloured, collapsible bands keyed the same way the legacy split is
7749
+ var handleBuildNewTableGroups = function () {
7750
+ var _a;
7751
+ if (!groupId || !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW))
7752
+ return undefined;
7753
+ var groupAttributeDS = structure.find(function (eachDS) { return eachDS.id === groupId; });
7754
+ var groups = [];
7755
+ (spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : []).forEach(function (eachData, index) {
7756
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7757
+ // INFO: key off the raw row — the display row holds a Tag element for a
7758
+ // coloured list value, which would put every row under "Unknown"
7759
+ 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];
7760
+ var key;
7761
+ if ((groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.type) === "date" && rawValue && rawValue !== " - ") {
7762
+ key = (0, dayjs_1.default)(isFirebase ? (rawValue === null || rawValue === void 0 ? void 0 : rawValue._seconds) * 1000 : rawValue)
7763
+ .startOf("day")
7764
+ .format("YYYY-MM-DD");
7765
+ }
7766
+ else {
7767
+ key =
7768
+ rawValue && rawValue !== " - " && typeof rawValue !== "object"
7769
+ ? String(rawValue)
7770
+ : "Unknown/No Value";
7771
+ }
7772
+ 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;
7773
+ if (!rowId)
7774
+ return;
7775
+ var group = groups.find(function (eachGroup) { return eachGroup.id === key; });
7776
+ if (!group) {
7777
+ 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;
7778
+ group = {
7779
+ id: key,
7780
+ title: key,
7781
+ colour: optionIndex >= 0
7782
+ ? (_h = groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.listSelectionColour) === null || _h === void 0 ? void 0 : _h[optionIndex]
7783
+ : undefined,
7784
+ rowIds: [],
7785
+ };
7786
+ groups.push(group);
7787
+ }
7788
+ group.rowIds.push(rowId);
7789
+ });
7790
+ return groups;
7791
+ };
7558
7792
  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) {
7793
+ 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;
7794
+ if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
7561
7795
  var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
7562
7796
  var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
7563
7797
  var _a;
@@ -7680,9 +7914,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7680
7914
  }
7681
7915
  else {
7682
7916
  // 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)
7917
+ if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
7918
+ return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, 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: (_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.disableSelectFullData) === null || _e === void 0 ? void 0 : _e.table, maxSelectedCount: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMaxSelectedCount, mobileView: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMobileView, mobileTooltip: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (!((_j = props.edit) === null || _j === void 0 ? void 0 : _j.disabledUpdate) &&
7919
+ !((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareHideTableExtraMultipleAction)
7686
7920
  ? [
7687
7921
  {
7688
7922
  id: "draft",
@@ -7697,7 +7931,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7697
7931
  hide: selectedIds.length === 0,
7698
7932
  },
7699
7933
  ]
7700
- : []), true), (((_j = props.edit) === null || _j === void 0 ? void 0 : _j.deleteBtn)
7934
+ : []), true), (((_l = props.edit) === null || _l === void 0 ? void 0 : _l.deleteBtn)
7701
7935
  ? [
7702
7936
  {
7703
7937
  id: "delete",
@@ -7708,7 +7942,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7708
7942
  },
7709
7943
  },
7710
7944
  ]
7711
- : []), true), (!isFirebase && !((_k = props.edit) === null || _k === void 0 ? void 0 : _k.disableBatchUpdate)
7945
+ : []), true), (!isFirebase && !((_m = props.edit) === null || _m === void 0 ? void 0 : _m.disableBatchUpdate)
7712
7946
  ? [
7713
7947
  {
7714
7948
  id: "update",
@@ -7716,7 +7950,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7716
7950
  onClick: function () { return setBatchUpdateModal(true); },
7717
7951
  },
7718
7952
  ]
7719
- : []), true), (((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListMultipleSelectAddtionalActions)
7953
+ : []), true), (((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListMultipleSelectAddtionalActions)
7720
7954
  ? props.bareSettings.bareListMultipleSelectAddtionalActions.map(function (eachButton) { return ({
7721
7955
  id: "dt-list-multi-action-btn-" + eachButton.text,
7722
7956
  btnText: eachButton.text,
@@ -7725,23 +7959,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7725
7959
  return (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
7726
7960
  },
7727
7961
  }); })
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) {
7962
+ : []), true), multiActionFloatingOffset: (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
7729
7963
  var _a, _b;
7730
7964
  (_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) {
7965
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_r = (_q = props.newTabUrl) === null || _q === void 0 ? void 0 : _q.default) !== null && _r !== void 0 ? _r : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_t = (_s = props.newTabUrl) === null || _s === void 0 ? void 0 : _s.addons) !== null && _t !== void 0 ? _t : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
7732
7966
  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,
7967
+ }, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.fixedPagination, advSettings: {
7968
+ addColumnEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.addColumnEnabled,
7735
7969
  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)
7970
+ dragEnabled: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.advDragEnabled,
7971
+ sortEnabled: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advSortEnabled,
7972
+ filterEnabled: ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareFlexFilters)
7739
7973
  ? false
7740
- : (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advFilterEnabled,
7974
+ : (_z = props.organise) === null || _z === void 0 ? void 0 : _z.advFilterEnabled,
7741
7975
  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),
7976
+ sortOptions: (_1 = (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.renderReferenceLabelOptions) === null || _1 === void 0 ? void 0 : _1.call(_0),
7743
7977
  onSortColumn: handleSortColumn,
7744
- onDragColumn: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.onChangeDrag,
7978
+ onDragColumn: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.onChangeDrag,
7745
7979
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7746
7980
  var _a;
7747
7981
  return {
@@ -7758,7 +7992,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7758
7992
  return renderSearchContent(newQuery);
7759
7993
  },
7760
7994
  }, editable: {
7761
- active: ((_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.listEditable) && !props.edit.disabledUpdate
7995
+ active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listEditable) && !props.edit.disabledUpdate
7762
7996
  ? true
7763
7997
  : false,
7764
7998
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -7772,7 +8006,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7772
8006
  });
7773
8007
  }); },
7774
8008
  }, onObjectEdit: handleObjectCellEdit, addable: {
7775
- active: ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.listAddable) ? true : false,
8009
+ active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
7776
8010
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
7777
8011
  return __generator(this, function (_a) {
7778
8012
  switch (_a.label) {
@@ -7783,27 +8017,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7783
8017
  }
7784
8018
  });
7785
8019
  }); },
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 }));
8020
+ }, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode, hidePagination: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.disableEllipsisOnLongWord, pinColumns: (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareListTablePinColumns }));
7787
8021
  }
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" },
8022
+ 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: (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.disableSelectFullData) === null || _10 === void 0 ? void 0 : _10.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
7789
8023
  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,
8024
+ !((_11 = props.edit) === null || _11 === void 0 ? void 0 : _11.disabledUpdate) &&
8025
+ !((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
7792
8026
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
7793
8027
  handleBatchDraftData();
7794
8028
  } }),
7795
8029
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
7796
8030
  handleCloneSelectedData();
7797
8031
  } }))),
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 () {
8032
+ ((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
7799
8033
  handleGenerateDeletePasscode();
7800
8034
  setDeleteModal(true);
7801
8035
  } })),
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 () {
8036
+ !isFirebase && !((_14 = props.edit) === null || _14 === void 0 ? void 0 : _14.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
7803
8037
  setBatchUpdateModal(true);
7804
8038
  } })),
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) {
8039
+ ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareListMultipleSelectAddtionalActions) &&
8040
+ ((_17 = (_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareListMultipleSelectAddtionalActions) === null || _17 === void 0 ? void 0 : _17.map(function (eachButton) {
7807
8041
  return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
7808
8042
  var _a, _b;
7809
8043
  (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
@@ -7811,20 +8045,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7811
8045
  }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
7812
8046
  var _a, _b;
7813
8047
  (_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) {
8048
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_19 = (_18 = props.newTabUrl) === null || _18 === void 0 ? void 0 : _18.default) !== null && _19 !== void 0 ? _19 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_21 = (_20 = props.newTabUrl) === null || _20 === void 0 ? void 0 : _20.addons) !== null && _21 !== void 0 ? _21 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
7815
8049
  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,
8050
+ }, className: "mt-5", lib: { axios: (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.fixedPagination, advSettings: {
8051
+ addColumnEnabled: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.addColumnEnabled,
7818
8052
  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)
8053
+ dragEnabled: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.advDragEnabled,
8054
+ sortEnabled: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.advSortEnabled,
8055
+ filterEnabled: ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
7822
8056
  ? false
7823
- : (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.advFilterEnabled,
8057
+ : (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.advFilterEnabled,
7824
8058
  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),
8059
+ sortOptions: (_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.renderReferenceLabelOptions) === null || _30 === void 0 ? void 0 : _30.call(_29),
7826
8060
  onSortColumn: handleSortColumn,
7827
- onDragColumn: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.onChangeDrag,
8061
+ onDragColumn: (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.onChangeDrag,
7828
8062
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7829
8063
  var _a;
7830
8064
  return {
@@ -7841,7 +8075,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7841
8075
  return renderSearchContent(newQuery);
7842
8076
  },
7843
8077
  }, editable: {
7844
- active: ((_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.listEditable) && !props.edit.disabledUpdate
8078
+ active: ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.listEditable) && !props.edit.disabledUpdate
7845
8079
  ? true
7846
8080
  : false,
7847
8081
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -7855,7 +8089,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7855
8089
  });
7856
8090
  }); },
7857
8091
  }, onObjectEdit: handleObjectCellEdit, addable: {
7858
- active: ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.listAddable) ? true : false,
8092
+ active: ((_33 = props.edit) === null || _33 === void 0 ? void 0 : _33.listAddable) ? true : false,
7859
8093
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
7860
8094
  return __generator(this, function (_a) {
7861
8095
  switch (_a.label) {
@@ -7866,11 +8100,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7866
8100
  }
7867
8101
  });
7868
8102
  }); },
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 }));
8103
+ }, darkMode: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.darkMode, hidePagination: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.disableEllipsisOnLongWord }));
7870
8104
  }
7871
8105
  };
7872
8106
  var renderTabContent = function (tabs, dataType, viewType) {
7873
- 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;
8107
+ 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, _51, _52, _53, _54, _55;
7874
8108
  var selectedTabData = tabs.find(function (eachTab) {
7875
8109
  if (eachTab.id === viewType) {
7876
8110
  return eachTab;
@@ -7944,7 +8178,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7944
8178
  });
7945
8179
  var tabElement = [];
7946
8180
  sortedGroups.forEach(function (eachKey) {
7947
- var _a, _b, _c;
8181
+ var _a, _b, _c, _d, _e, _f, _g;
7948
8182
  var listObjModels = groups[eachKey].filter(function (eachModel) {
7949
8183
  return eachModel.type === "listObject" && !eachModel.hideRead;
7950
8184
  });
@@ -7952,13 +8186,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7952
8186
  if ((Array.isArray(listData) && (listData === null || listData === void 0 ? void 0 : listData.length) > 0) ||
7953
8187
  listObjModels.length > 0) {
7954
8188
  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)
8189
+ Array.isArray(listData) && (listData === null || listData === void 0 ? void 0 : listData.length) > 0 && (react_1.default.createElement(detailList_1.DetailList, { darkMode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode, darkModeBg: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkModeBg, model: groups[eachKey], referenceModel: referenceModelSchema, className: "mt-5 rounded-md ".concat(((_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode) ? "bg-white/5" : "bg-white"), title: eachKey, list: listData,
8190
+ // INFO: a tabbed form is long by definition — its read
8191
+ // view uses the dense label : value rows
8192
+ size: ((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareCompactMode) || hasTabs_1
7956
8193
  ? "compact"
7957
8194
  : "default", handleReferenceLink: !schemaPresent &&
7958
- ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadReferenceView)
8195
+ ((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareReadReferenceView)
7959
8196
  ? props.bareSettings.bareReadReferenceView
7960
- : 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; }))))));
8197
+ : undefined, splitView: (_f = props.organise) === null || _f === void 0 ? void 0 : _f.splitView })),
8198
+ listObjModels.length > 0 && (
8199
+ // INFO: same card as the DetailList sections above so a
8200
+ // nested table lines up with them instead of sitting
8201
+ // indented on the page background
8202
+ react_1.default.createElement("div", { className: "mt-5 rounded-md px-4 pb-4 sm:px-6 ".concat(((_g = props.organise) === null || _g === void 0 ? void 0 : _g.darkMode) ? "bg-white/5" : "bg-white") }, renderListObject("read", listObjModels.map(function (eachModel) { return eachModel.id; }))))));
7962
8203
  }
7963
8204
  });
7964
8205
  var allGanttCharts = Object.values(groups)
@@ -7977,15 +8218,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7977
8218
  readElement_1.push(react_1.default.createElement("div", { key: "tab-section-".concat(eachTab), ref: function (el) {
7978
8219
  readTabSectionRefs.current[eachTab] = el;
7979
8220
  } },
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))),
8221
+ hasTabs_1 && (react_1.default.createElement("div", { className: "bg-primary-500 rounded-lg mt-5 px-4 py-2" },
8222
+ react_1.default.createElement("h2", { className: "text-white font-semibold text-base" }, eachTab))),
7986
8223
  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; }))))));
8224
+ allGanttCharts.length > 0 && (react_1.default.createElement("div", { className: "mt-5 rounded-md px-4 pb-4 sm:px-6 ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/5" : "bg-white") }, renderGanttChart("read", allGanttCharts.map(function (eachModel) { return eachModel.id; })))),
8225
+ allCanvas.length > 0 && (react_1.default.createElement("div", { className: "mt-5 rounded-md px-4 pb-4 sm:px-6 ".concat(((_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode) ? "bg-white/5" : "bg-white") }, renderCanvas("read", allCanvas.map(function (eachModel) { return eachModel.id; }))))));
7989
8226
  }
7990
8227
  });
7991
8228
  var showReadFloatingNav_1 = ((_f = props.organise) === null || _f === void 0 ? void 0 : _f.showReadFloatingNav) && allTabSections_1.length > 1;
@@ -8024,9 +8261,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8024
8261
  }
8025
8262
  else {
8026
8263
  return (react_1.default.createElement(react_1.default.Fragment, null,
8027
- react_1.default.createElement(detailList_1.DetailList, { model: structure, referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: "General Details", list: renderDetailListData(structure), size: ((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareCompactMode) ? "compact" : "default", handleReferenceLink: !schemaPresent && ((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareReadReferenceView)
8264
+ react_1.default.createElement(detailList_1.DetailList, { darkMode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.darkMode, darkModeBg: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.darkModeBg, model: structure, referenceModel: referenceModelSchema, className: "mt-5 rounded-md ".concat(((_j = props.organise) === null || _j === void 0 ? void 0 : _j.darkMode)
8265
+ ? ((_l = (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkModeBg) !== null && _l !== void 0 ? _l : "bg-gray-900")
8266
+ : "bg-white"), title: "General Details", list: renderDetailListData(structure), size: ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareCompactMode) ? "compact" : "default", handleReferenceLink: !schemaPresent && ((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareReadReferenceView)
8028
8267
  ? props.bareSettings.bareReadReferenceView
8029
- : undefined, splitView: (_j = props.organise) === null || _j === void 0 ? void 0 : _j.splitView }),
8268
+ : undefined, splitView: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.splitView }),
8030
8269
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(dataType)),
8031
8270
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(dataType)),
8032
8271
  react_1.default.createElement("div", { className: "mt-8" }, renderGanttChart(dataType)),
@@ -8035,76 +8274,85 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8035
8274
  }
8036
8275
  }
8037
8276
  else if (selectedTabData) {
8038
- if ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListComponent) {
8277
+ if ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareListComponent) {
8039
8278
  return (react_1.default.createElement(react_1.default.Fragment, null,
8040
8279
  props.bareSettings.bareListComponent(tableData, spaceTableData, tableLoading, pageIndex),
8041
- !((_l = props.organise) === null || _l === void 0 ? void 0 : _l.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8280
+ !((_r = props.organise) === null || _r === void 0 ? void 0 : _r.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8042
8281
  handlePagination(value);
8043
- }, darkMode: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.darkMode, customPaginationSize: customPaginationSize }))));
8282
+ }, darkMode: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkMode, customPaginationSize: customPaginationSize }))));
8044
8283
  }
8045
8284
  else if (selectedTabData.viewType === "iframe") {
8046
8285
  if (selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.customComponent) {
8047
8286
  return selectedTabData.customComponent;
8048
8287
  }
8049
8288
  else {
8050
- return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (_o = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.iframeSrc) !== null && _o !== void 0 ? _o : "", title: (_p = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.id) !== null && _p !== void 0 ? _p : "", onLoad: props.onLoadIframe }));
8289
+ return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (_t = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.iframeSrc) !== null && _t !== void 0 ? _t : "", title: (_u = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.id) !== null && _u !== void 0 ? _u : "", onLoad: props.onLoadIframe }));
8051
8290
  }
8052
8291
  }
8053
8292
  else if (selectedTabData.viewType === "list") {
8054
8293
  // INFO: when bareNewDTW is enabled, render NewList instead of legacy List
8055
- if ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareNewDTW) {
8056
- return (react_1.default.createElement(newList_1.NewList, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.disableSelectFullData) === null || _s === void 0 ? void 0 : _s.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8057
- selectedIds.length > 0 && !((_u = props.edit) === null || _u === void 0 ? void 0 : _u.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
8294
+ if ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareNewDTW) {
8295
+ return (react_1.default.createElement(newList_1.NewList, { darkModeBg: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disableSelectFullData) === null || _y === void 0 ? void 0 : _y.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8296
+ selectedIds.length > 0 && !((_0 = props.edit) === null || _0 === void 0 ? void 0 : _0.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
8058
8297
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
8059
8298
  handleBatchDraftData();
8060
8299
  } }),
8061
8300
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
8062
8301
  handleCloneSelectedData();
8063
8302
  } }))),
8064
- ((_v = props.edit) === null || _v === void 0 ? void 0 : _v.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8303
+ ((_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8065
8304
  handleGenerateDeletePasscode();
8066
8305
  setDeleteModal(true);
8067
8306
  } })),
8068
- !isFirebase && !((_w = props.edit) === null || _w === void 0 ? void 0 : _w.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8307
+ !isFirebase && !((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8069
8308
  setBatchUpdateModal(true);
8070
8309
  } }))), onClickRow: function (id) {
8071
8310
  var _a, _b;
8072
8311
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8073
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_y = (_x = props.newTabUrl) === null || _x === void 0 ? void 0 : _x.default) !== null && _y !== void 0 ? _y : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_0 = (_z = props.newTabUrl) === null || _z === void 0 ? void 0 : _z.addons) !== null && _0 !== void 0 ? _0 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8312
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_4 = (_3 = props.newTabUrl) === null || _3 === void 0 ? void 0 : _3.default) !== null && _4 !== void 0 ? _4 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_6 = (_5 = props.newTabUrl) === null || _5 === void 0 ? void 0 : _5.addons) !== null && _6 !== void 0 ? _6 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8074
8313
  handlePagination(value);
8075
- }, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode, className: "mt-5", hidePagination: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.hidePagination, customPaginationSize: customPaginationSize, mobileTooltip: (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListMobileTooltip }));
8314
+ }, darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode, className: "mt-5", hidePagination: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.hidePagination, customPaginationSize: customPaginationSize, mobileTooltip: (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareListMobileTooltip }));
8076
8315
  }
8077
8316
  return (react_1.default.createElement(react_1.default.Fragment, null,
8078
- react_1.default.createElement(list_1.List, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.disableSelectFullData) === null || _5 === void 0 ? void 0 : _5.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8079
- selectedIds.length > 0 && !((_6 = props.edit) === null || _6 === void 0 ? void 0 : _6.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
8317
+ react_1.default.createElement(list_1.List, { darkModeBg: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.disableSelectFullData) === null || _12 === void 0 ? void 0 : _12.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8318
+ selectedIds.length > 0 && !((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
8080
8319
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
8081
8320
  handleBatchDraftData();
8082
8321
  } }),
8083
8322
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
8084
8323
  handleCloneSelectedData();
8085
8324
  } }))),
8086
- ((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8325
+ ((_14 = props.edit) === null || _14 === void 0 ? void 0 : _14.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8087
8326
  handleGenerateDeletePasscode();
8088
8327
  setDeleteModal(true);
8089
8328
  } })),
8090
- !isFirebase && !((_8 = props.edit) === null || _8 === void 0 ? void 0 : _8.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8329
+ !isFirebase && !((_15 = props.edit) === null || _15 === void 0 ? void 0 : _15.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8091
8330
  setBatchUpdateModal(true);
8092
8331
  } }))), onClickRow: function (id) {
8093
8332
  var _a, _b;
8094
8333
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8095
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_10 = (_9 = props.newTabUrl) === null || _9 === void 0 ? void 0 : _9.default) !== null && _10 !== void 0 ? _10 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_12 = (_11 = props.newTabUrl) === null || _11 === void 0 ? void 0 : _11.addons) !== null && _12 !== void 0 ? _12 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8334
+ }, 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) {
8096
8335
  handlePagination(value);
8097
- }, className: "mt-5", hidePagination: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.hidePagination, customPaginationSize: customPaginationSize })));
8336
+ }, className: "mt-5", hidePagination: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.hidePagination, customPaginationSize: customPaginationSize })));
8098
8337
  }
8099
8338
  else if (selectedTabData.viewType === "grid") {
8100
8339
  var isScrollMode = renderCheckScrollMode();
8101
8340
  return (react_1.default.createElement(react_1.default.Fragment, null,
8102
- react_1.default.createElement(grid_1.Grid, { paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8341
+ react_1.default.createElement(grid_1.Grid, { darkMode: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.darkMode, darkModeBg: (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8103
8342
  var _a, _b;
8104
8343
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8105
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_15 = (_14 = props.newTabUrl) === null || _14 === void 0 ? void 0 : _14.default) !== null && _15 !== void 0 ? _15 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.addons) !== null && _17 !== void 0 ? _17 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8344
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_24 = (_23 = props.newTabUrl) === null || _23 === void 0 ? void 0 : _23.default) !== null && _24 !== void 0 ? _24 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_26 = (_25 = props.newTabUrl) === null || _25 === void 0 ? void 0 : _25.addons) !== null && _26 !== void 0 ? _26 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8345
+ handlePagination(value);
8346
+ }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareListGridColClassName, className: "mt-5",
8347
+ // INFO: under the new DTW the grid keeps the same footer as the
8348
+ // table and list views instead of its own legacy page buttons
8349
+ hidePagination: ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.hidePagination) ||
8350
+ !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareNewDTW), customPaginationSize: customPaginationSize }),
8351
+ ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareNewDTW) &&
8352
+ !((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
8353
+ .length, customPaginationSize: customPaginationSize, darkMode: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode, darkModeBg: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkModeBg, handleUpdatePageIndex: function (value) {
8106
8354
  handlePagination(value);
8107
- }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareListGridColClassName, className: "mt-5", hidePagination: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.hidePagination, customPaginationSize: customPaginationSize })));
8355
+ } }))));
8108
8356
  }
8109
8357
  else if (selectedTabData.viewType === "calendar") {
8110
8358
  var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
@@ -8204,7 +8452,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8204
8452
  return eventAvailabilities;
8205
8453
  };
8206
8454
  // INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
8207
- if ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareNewDTW) {
8455
+ if ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareNewDTW) {
8208
8456
  var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
8209
8457
  var _a, _b, _c, _d;
8210
8458
  return ({
@@ -8224,13 +8472,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8224
8472
  // INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
8225
8473
  // query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
8226
8474
  // agenda lists the fetched month chronologically.
8227
- var viewSwitchOptions = (_21 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _21 !== void 0 ? _21 : [];
8475
+ var viewSwitchOptions = (_35 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _35 !== void 0 ? _35 : [];
8228
8476
  var VIEW_VARIANT_MAP = {
8229
8477
  month: "fullMonth",
8230
8478
  week: "weekTimeGrid",
8231
8479
  agenda: "agenda",
8232
8480
  };
8233
- var activeVariant = (_22 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _22 !== void 0 ? _22 : "fullMonth";
8481
+ var activeVariant = (_36 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _36 !== void 0 ? _36 : "fullMonth";
8234
8482
  return (react_1.default.createElement("div", { className: "mt-4" },
8235
8483
  viewSwitchOptions.length > 1 && (react_1.default.createElement("div", { className: "mb-2 flex justify-end" },
8236
8484
  react_1.default.createElement("div", { className: "inline-flex rounded-lg border border-gray-200 bg-white p-0.5" }, viewSwitchOptions.map(function (view) { return (react_1.default.createElement("button", { key: view, type: "button", onClick: function () {
@@ -8272,9 +8520,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8272
8520
  var _a, _b;
8273
8521
  if (event.id)
8274
8522
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", event.id, "general");
8275
- }, darkMode: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.darkMode, className: "w-full" }))));
8523
+ }, darkMode: (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkMode, className: "w-full" }))));
8276
8524
  }
8277
- return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_24 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _24 !== void 0 ? _24 : calendarView, handleMonthChange: function (date) {
8525
+ return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_38 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _38 !== void 0 ? _38 : calendarView, handleMonthChange: function (date) {
8278
8526
  var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
8279
8527
  var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
8280
8528
  if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
@@ -8292,11 +8540,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8292
8540
  else if (selectedTabData.viewType === "feeds") {
8293
8541
  var contentList_1 = [];
8294
8542
  var feedsSettings_1 = selectedTabData.feedsSettings;
8295
- var customFeedsData = (_25 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _25 === void 0 ? void 0 : _25.call(feedsSettings_1, tableData, spaceTableData);
8543
+ var customFeedsData = (_39 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _39 === void 0 ? void 0 : _39.call(feedsSettings_1, tableData, spaceTableData);
8296
8544
  if (customFeedsData && customFeedsData.length > 0) {
8297
8545
  customFeedsData.map(function (eachData) {
8298
8546
  var _a, _b, _c, _d;
8299
8547
  var content = {
8548
+ id: eachData.id,
8300
8549
  content: (_a = eachData.title) !== null && _a !== void 0 ? _a : "",
8301
8550
  addContent: (_b = eachData.content) !== null && _b !== void 0 ? _b : "",
8302
8551
  step: (react_1.default.createElement("div", { className: "flex flex-col" },
@@ -8319,6 +8568,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8319
8568
  var _a, _b;
8320
8569
  if (feedsSettings_1 && feedsSettings_1.title && feedsSettings_1.desc) {
8321
8570
  var content = {
8571
+ id: eachData.id,
8322
8572
  content: (_a = eachData[feedsSettings_1.title || ""]) !== null && _a !== void 0 ? _a : "",
8323
8573
  addContent: (react_1.default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, (_b = eachData[feedsSettings_1.content || ""]) !== null && _b !== void 0 ? _b : "")),
8324
8574
  step: (react_1.default.createElement("div", { className: "flex flex-col" },
@@ -8332,12 +8582,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8332
8582
  return null;
8333
8583
  });
8334
8584
  }
8335
- return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", { className: "p-4 bg-white rounded-lg" },
8336
- react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.darkMode }),
8585
+ return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
8586
+ // INFO: NewFeeds is already a card like the table and list, so the new
8587
+ // DTW renders it bare; the legacy feed still needs its own surface
8588
+ className: ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareNewDTW)
8589
+ ? ""
8590
+ : "p-4 rounded-lg ".concat(((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode) ? "bg-white/5" : "bg-white") },
8591
+ ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.darkMode, onClickItem: function (id) { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general"); } })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode })),
8337
8592
  react_1.default.createElement("div", { className: "my-10" }),
8338
- contentList_1.length > 0 && !((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8593
+ contentList_1.length > 0 &&
8594
+ !((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.hidePagination) &&
8595
+ ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.darkMode, darkModeBg: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkModeBg, handleUpdatePageIndex: function (value) {
8339
8596
  handlePagination(value);
8340
- }, darkMode: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.darkMode, customPaginationSize: customPaginationSize }))))));
8597
+ } })),
8598
+ contentList_1.length > 0 &&
8599
+ !((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
8600
+ !((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8601
+ handlePagination(value);
8602
+ }, darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, customPaginationSize: customPaginationSize }))))));
8341
8603
  }
8342
8604
  else if (selectedTabData.viewType === "map") {
8343
8605
  var mapSettings_1 = selectedTabData.mapSettings;
@@ -8436,7 +8698,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8436
8698
  }
8437
8699
  else if (selectedTabData.viewType === "kanban") {
8438
8700
  var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
8439
- var kanbanTitle_2 = (_29 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _29 !== void 0 ? _29 : "";
8701
+ var kanbanTitle_2 = (_52 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _52 !== void 0 ? _52 : "";
8440
8702
  var nullColumn_1 = false;
8441
8703
  var groupBy_1 = [];
8442
8704
  var groupLabel_1 = [];
@@ -8457,10 +8719,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8457
8719
  });
8458
8720
  var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
8459
8721
  // INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
8460
- if ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareNewDTW) {
8722
+ if ((_53 = props.bareSettings) === null || _53 === void 0 ? void 0 : _53.bareNewDTW) {
8461
8723
  return (react_1.default.createElement(newKanban_1.NewKanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
8462
8724
  ? "Data has exceeded limit, please apply filters"
8463
- : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
8725
+ : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
8464
8726
  var _a;
8465
8727
  setKanbanDroppable(false);
8466
8728
  handleSubmitData("update", cardId, kanbanTitle_2, (_a = {},
@@ -8469,7 +8731,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8469
8731
  }, onClickData: function (id) {
8470
8732
  var _a, _b;
8471
8733
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8472
- }, darkMode: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode }));
8734
+ }, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode }));
8473
8735
  }
8474
8736
  return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
8475
8737
  ? "Data has exceeded limit, please apply filters"
@@ -8500,7 +8762,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8500
8762
  return null;
8501
8763
  };
8502
8764
  var renderNotification = function (location) {
8503
- var _a;
8765
+ var _a, _b;
8504
8766
  if (notification) {
8505
8767
  var correctIcon = (react_1.default.createElement(outline_1.CheckCircleIcon, { className: "w-10 h-10 text-primary-600" }));
8506
8768
  var incorrectIcon = (react_1.default.createElement(outline_1.XCircleIcon, { className: "w-10 h-10 text-primary-600" }));
@@ -8508,12 +8770,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8508
8770
  return null;
8509
8771
  if (location === "root" && modalVisible)
8510
8772
  return null;
8511
- return (react_1.default.createElement(notification_1.Notification, { icon: notification.type ? correctIcon : incorrectIcon, notificationAttribute: {
8773
+ // INFO: nothing a silent step-change save reports is worth a toast
8774
+ if ((notification === null || notification === void 0 ? void 0 : notification.type) && silentDraftRef.current)
8775
+ return null;
8776
+ return (react_1.default.createElement(notification_1.Notification, { darkMode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode,
8777
+ // INFO: phones keep the familiar bottom toast, lifted above the
8778
+ // floating action bar / floating search
8779
+ position: "bottom", mobileOffsetClassName: "pb-28", icon: notification.type ? correctIcon : incorrectIcon, notificationAttribute: {
8512
8780
  title: notification.title,
8513
8781
  desc: notification.msg,
8514
8782
  visible: true,
8515
8783
  }, lib: {
8516
- Transition: (_a = props.lib) === null || _a === void 0 ? void 0 : _a.Transition,
8784
+ Transition: (_b = props.lib) === null || _b === void 0 ? void 0 : _b.Transition,
8517
8785
  }, onClose: function () {
8518
8786
  setNotification(null);
8519
8787
  return "";
@@ -8522,22 +8790,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8522
8790
  return null;
8523
8791
  };
8524
8792
  var renderModalContent = function () {
8525
- 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;
8793
+ 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;
8526
8794
  if (loading) {
8527
8795
  return (react_1.default.createElement("div", { className: "mt-5" },
8528
8796
  react_1.default.createElement(loading_1.Loading, null),
8529
8797
  react_1.default.createElement("div", { className: "mt-3 text-center sm:mt-5" },
8530
- react_1.default.createElement("h3", { className: "text-lg font-medium leading-6 text-gray-900", id: "modal-title" }, "Loading"),
8798
+ react_1.default.createElement("h3", { className: "text-lg font-medium leading-6 ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "text-white" : "text-gray-900"), id: "modal-title" }, "Loading"),
8531
8799
  react_1.default.createElement("div", { className: "mt-2" },
8532
- react_1.default.createElement("p", { className: "text-sm text-gray-500" }, "Please wait while we are proccessing your request")))));
8800
+ react_1.default.createElement("p", { className: "text-sm ".concat(((_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode) ? "text-gray-300" : "text-gray-500") }, "Please wait while we are proccessing your request")))));
8533
8801
  }
8534
8802
  if (exportPDFLoading) {
8535
8803
  return (react_1.default.createElement("div", { className: "mt-5" },
8536
8804
  react_1.default.createElement(loading_1.Loading, null),
8537
8805
  react_1.default.createElement("div", { className: "mt-3 text-center sm:mt-5" },
8538
- react_1.default.createElement("h3", { className: "text-lg font-medium leading-6 text-gray-900", id: "modal-title" }, "Loading"),
8806
+ react_1.default.createElement("h3", { className: "text-lg font-medium leading-6 ".concat(((_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode) ? "text-white" : "text-gray-900"), id: "modal-title" }, "Loading"),
8539
8807
  react_1.default.createElement("div", { className: "mt-2" },
8540
- react_1.default.createElement("p", { className: "text-sm text-gray-500" }, "Please wait while PDF is being generated")))));
8808
+ react_1.default.createElement("p", { className: "text-sm ".concat(((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "text-gray-300" : "text-gray-500") }, "Please wait while PDF is being generated")))));
8541
8809
  }
8542
8810
  else if (excelModal) {
8543
8811
  return (react_1.default.createElement(react_1.default.Fragment, null,
@@ -8563,13 +8831,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8563
8831
  react_1.default.createElement(button_1.Button, { text: "".concat(stepCSVIndex < 2 ? "Next" : "Submit"), type: "normal", onClick: handleStepCSV }))))));
8564
8832
  }
8565
8833
  else if (exportExcel || exportQR) {
8566
- var showEmail = exportType !== "pdf" && !((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.exportSettings) === null || _b === void 0 ? void 0 : _b.disableEmail);
8567
- return (react_1.default.createElement(react_1.default.Fragment, null, queryForm ? (react_1.default.createElement(queryForm_1.QueryForm, { dbModule: (_c = props.lib) === null || _c === void 0 ? void 0 : _c.axios, model: structure, updateQuery: queryIndex >= 0 ? queryList[queryIndex] : undefined, devSettings: props.devSettings, handleCloseForm: function () {
8834
+ var showEmail = exportType !== "pdf" && !((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.exportSettings) === null || _f === void 0 ? void 0 : _f.disableEmail);
8835
+ return (react_1.default.createElement(react_1.default.Fragment, null, queryForm ? (react_1.default.createElement(queryForm_1.QueryForm, { dbModule: (_g = props.lib) === null || _g === void 0 ? void 0 : _g.axios, model: structure, updateQuery: queryIndex >= 0 ? queryList[queryIndex] : undefined, devSettings: props.devSettings, handleCloseForm: function () {
8568
8836
  handleViewQuery(-1);
8569
8837
  }, handleQueryOnComplete: function (queryData) {
8570
8838
  handlePushQueryList(queryData, queryIndex);
8571
- }, renderReferenceLabelOptions: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.renderReferenceLabelOptions)
8572
- ? (_e = props.organise) === null || _e === void 0 ? void 0 : _e.renderReferenceLabelOptions
8839
+ }, renderReferenceLabelOptions: ((_h = props.organise) === null || _h === void 0 ? void 0 : _h.renderReferenceLabelOptions)
8840
+ ? (_j = props.organise) === null || _j === void 0 ? void 0 : _j.renderReferenceLabelOptions
8573
8841
  : function () {
8574
8842
  return [];
8575
8843
  } })) : (react_1.default.createElement("div", null,
@@ -8582,17 +8850,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8582
8850
  : "Export your data to .pdf format to be viewable on Adobe/Browser.",
8583
8851
  "Filter your data exported based on conditions by creating queries at the table below."),
8584
8852
  react_1.default.createElement(react_1.default.Fragment, null,
8585
- react_1.default.createElement(textInput_1.TextInput, { ref: exportCSVEmailInputRef, value: exportCSVEmail, type: "email", label: "Email", subLabel: "A download link will be sent to your email", placeholder: (_g = (_f = props.devSettings.currentUser) === null || _f === void 0 ? void 0 : _f.userEmail) !== null && _g !== void 0 ? _g : "Enter your email", onChange: function (e) { return setExportCSVEmail(e.target.value); } }),
8853
+ react_1.default.createElement(textInput_1.TextInput, { ref: exportCSVEmailInputRef, value: exportCSVEmail, type: "email", label: "Email", subLabel: "A download link will be sent to your email", placeholder: (_l = (_k = props.devSettings.currentUser) === null || _k === void 0 ? void 0 : _k.userEmail) !== null && _l !== void 0 ? _l : "Enter your email", onChange: function (e) { return setExportCSVEmail(e.target.value); } }),
8586
8854
  react_1.default.createElement("div", { className: "flex mt-5 items-center justify-end" },
8587
8855
  react_1.default.createElement(iconButton_1.IconButton, { className: "sm", icon: react_1.default.createElement(outline_1.PlusCircleIcon, { className: "w-6 h-6 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () { return setQueryForm(!queryForm); } })))),
8588
8856
  react_1.default.createElement(table_1.Table, { className: "mt-5", header: dataStateModel_1.queryTableHeader, data: renderQueryData(), loading: false }))) : (react_1.default.createElement(react_1.default.Fragment, null,
8589
8857
  react_1.default.createElement("p", null, "Click the button below to download."),
8590
- (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(textInput_1.TextInput, { containerClassName: "mt-5", value: exportPDFTitle, type: "text", label: "Title (Optional)", placeholder: (_k = (_j = (_h = props.organise) === null || _h === void 0 ? void 0 : _h.exportSettings) === null || _j === void 0 ? void 0 : _j.defaultExportPDFName) !== null && _k !== void 0 ? _k : "Enter your report title", onChange: function (e) { return setExportPDFTitle(e.target.value); } })),
8591
- (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(select_1.Select, { label: "Sum Attribute", containerClassName: "mt-5", value: exportSumAttributeIds, options: (_o = (_m = (_l = props.organise) === null || _l === void 0 ? void 0 : _l.renderReferenceLabelOptions) === null || _m === void 0 ? void 0 : _m.call(_l, "", false, "number")) !== null && _o !== void 0 ? _o : [], staticDropdown: true, onChange: function (value) {
8858
+ (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(textInput_1.TextInput, { containerClassName: "mt-5", value: exportPDFTitle, type: "text", label: "Title (Optional)", placeholder: (_p = (_o = (_m = props.organise) === null || _m === void 0 ? void 0 : _m.exportSettings) === null || _o === void 0 ? void 0 : _o.defaultExportPDFName) !== null && _p !== void 0 ? _p : "Enter your report title", onChange: function (e) { return setExportPDFTitle(e.target.value); } })),
8859
+ (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(select_1.Select, { label: "Sum Attribute", containerClassName: "mt-5", value: exportSumAttributeIds, options: (_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.renderReferenceLabelOptions) === null || _r === void 0 ? void 0 : _r.call(_q, "", false, "number")) !== null && _s !== void 0 ? _s : [], staticDropdown: true, onChange: function (value) {
8592
8860
  setExportSumAttributeIds(value);
8593
8861
  } })))),
8594
8862
  react_1.default.createElement("div", { className: "mt-5 flex items-center justify-between" },
8595
- react_1.default.createElement("label", { className: "text-sm font-medium text-gray-700" }, "Hide Sub Items"),
8863
+ react_1.default.createElement("label", { className: "text-sm font-medium ".concat(((_t = props.organise) === null || _t === void 0 ? void 0 : _t.darkMode) ? "text-gray-200" : "text-gray-700") }, "Hide Sub Items"),
8596
8864
  react_1.default.createElement(toggle_1.Toggle, { text: "", direction: "right", value: hideSubItems, onClick: function () { return setHideSubItems(!hideSubItems); } })),
8597
8865
  react_1.default.createElement("div", { className: "flex justify-end mt-5 " },
8598
8866
  showEmail && (react_1.default.createElement(button_1.Button, { text: "Send to email", size: "small", type: "normal", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -8612,7 +8880,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8612
8880
  } }))))));
8613
8881
  }
8614
8882
  else if (sortModal) {
8615
- return (react_1.default.createElement(settingsModal_1.SortModal, { sort: activeSortId, onChangeSort: handleSortColumn, renderReferenceLabelOptions: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.renderReferenceLabelOptions, onClose: function () {
8883
+ return (react_1.default.createElement(settingsModal_1.SortModal, { sort: activeSortId, onChangeSort: handleSortColumn, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, onClose: function () {
8616
8884
  handlePopUpModal(false);
8617
8885
  } }));
8618
8886
  }
@@ -8627,12 +8895,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8627
8895
  } }));
8628
8896
  }
8629
8897
  else if (filterModal) {
8630
- return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, model: props.model, onChangeFilter: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.onChangeFilter, renderReferenceLabelOptions: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
8898
+ return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, model: props.model, onChangeFilter: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeFilter, renderReferenceLabelOptions: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
8631
8899
  handlePopUpModal(false);
8632
8900
  } }));
8633
8901
  }
8634
8902
  else if (addTabModal) {
8635
- return (react_1.default.createElement(settingsModal_1.TabModal, { type: props.type, tabs: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.extendedTabs, onChangeTabs: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.onChangeTabs, model: structure, renderReferenceLabelOptions: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceLabelOptions, onClose: function () {
8903
+ return (react_1.default.createElement(settingsModal_1.TabModal, { type: props.type, tabs: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.extendedTabs, onChangeTabs: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.onChangeTabs, model: structure, renderReferenceLabelOptions: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.renderReferenceLabelOptions, onClose: function () {
8636
8904
  handlePopUpModal(false);
8637
8905
  } }));
8638
8906
  }
@@ -8694,7 +8962,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8694
8962
  return eachModel.id === selectedObjectStructureId;
8695
8963
  });
8696
8964
  if (filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) {
8697
- var modalModel_1 = (_w = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _w !== void 0 ? _w : [];
8965
+ var modalModel_1 = (_1 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _1 !== void 0 ? _1 : [];
8698
8966
  var handleOnFailValidation = function (refList) {
8699
8967
  var _a, _b;
8700
8968
  if ((refList === null || refList === void 0 ? void 0 : refList.length) > 0) {
@@ -8766,16 +9034,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8766
9034
  disabledOnEnter_2 = true;
8767
9035
  return null;
8768
9036
  });
8769
- if ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListObjectHandleData) {
9037
+ if ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareListObjectHandleData) {
8770
9038
  var listObjectViewType = props.type === "read"
8771
9039
  ? "read"
8772
9040
  : selectedObjectId
8773
9041
  ? "update"
8774
9042
  : "new";
8775
- (_z = (_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListObjectHandleData) === null || _z === void 0 ? void 0 : _z.call(_y, listObjectViewType, selectedObjectData);
9043
+ (_4 = (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListObjectHandleData) === null || _4 === void 0 ? void 0 : _4.call(_3, listObjectViewType, selectedObjectData);
8776
9044
  }
8777
9045
  return (react_1.default.createElement(react_1.default.Fragment, null,
8778
- react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_0 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _0 !== void 0 ? _0 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
9046
+ react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_5 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _5 !== void 0 ? _5 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
8779
9047
  ? selectedData
8780
9048
  : undefined)),
8781
9049
  react_1.default.createElement("div", { className: "flex justify-end pt-8" },
@@ -8840,13 +9108,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8840
9108
  } }))));
8841
9109
  };
8842
9110
  var renderDeleteModalContent = function () {
9111
+ var _a;
8843
9112
  if (!deleteModal)
8844
9113
  return react_1.default.createElement(react_1.default.Fragment, null);
8845
9114
  else
8846
9115
  return (react_1.default.createElement(react_1.default.Fragment, null,
8847
9116
  react_1.default.createElement("div", { className: "px-3 sm:px-0" },
8848
9117
  react_1.default.createElement("div", { className: "flex" },
8849
- react_1.default.createElement("h2", { className: "mt-2 mb-2 text-xl font-bold text-gray-900" }, "Delete Confirmation")),
9118
+ react_1.default.createElement("h2", { className: "mt-2 mb-2 text-xl font-bold ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "text-white" : "text-gray-900") }, "Delete Confirmation")),
8850
9119
  react_1.default.createElement("p", { className: "mt-2 mb-4" },
8851
9120
  "Are you sure you want to permanently delete",
8852
9121
  " ",
@@ -8988,7 +9257,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8988
9257
  };
8989
9258
  return (react_1.default.createElement(react_1.default.Fragment, null,
8990
9259
  renderNotification("root"),
8991
- ((_49 = (_48 = props.renderSettings) === null || _48 === void 0 ? void 0 : _48.renderLoadingUI) === null || _49 === void 0 ? void 0 : _49.call(_48)) && loading ? ((_50 = props.renderSettings) === null || _50 === void 0 ? void 0 : _50.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9260
+ ((_49 = (_48 = props.renderSettings) === null || _48 === void 0 ? void 0 : _48.renderLoadingUI) === null || _49 === void 0 ? void 0 : _49.call(_48)) && loading ? ((_50 = props.renderSettings) === null || _50 === void 0 ? void 0 : _50.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, darkModeBg: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
8992
9261
  var _a, _b;
8993
9262
  if (loading)
8994
9263
  return;
@@ -8999,7 +9268,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8999
9268
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9000
9269
  }
9001
9270
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9002
- react_1.default.createElement(modal_1.Modal, { maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9271
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.darkMode, darkModeBg: (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9003
9272
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9004
9273
  if (dataId) {
9005
9274
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9015,19 +9284,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9015
9284
  }, onClose: function () {
9016
9285
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9017
9286
  } }),
9018
- react_1.default.createElement(modal_1.Modal, { maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9287
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, darkModeBg: (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9019
9288
  setReferenceDeleteTableData({});
9020
9289
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9021
- react_1.default.createElement(modal_1.Modal, { open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9290
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.darkMode, darkModeBg: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9022
9291
  setDeletePasscodeInput("");
9023
9292
  setDeleteModal(!deleteModal);
9024
9293
  setDeleteFeedId("");
9025
9294
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9026
- react_1.default.createElement(modal_1.Modal, { open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9295
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9027
9296
  setBatchUpdateData({ columnId: "", columnData: {} });
9028
9297
  setBatchUpdateModal(false);
9029
9298
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9030
- react_1.default.createElement(modal_1.Modal, { title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9299
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.darkMode, darkModeBg: (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9031
9300
  var _a;
9032
9301
  if (props.space)
9033
9302
  return (react_1.default.createElement(authModal_1.AuthModal, { space: props.space, userId: (_a = props.id) !== null && _a !== void 0 ? _a : "", type: selectedAuthMethod, authMethods: authMethods, onComplete: handleAuthComplete }));
@@ -9035,7 +9304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9035
9304
  }, onClose: function () {
9036
9305
  setSelectedAuthMethod("");
9037
9306
  } }),
9038
- isActivityLog && (react_1.default.createElement(modal_1.Modal, { open: activityModal, title: "Activity Log", renderContent: function () {
9307
+ isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9039
9308
  var _a, _b;
9040
9309
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9041
9310
  ? props.title