blixify-ui-web 1.2.82 → 1.2.84

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.
@@ -115,6 +115,7 @@ var kanban_1 = require("../../display/kanban");
115
115
  var list_1 = require("../../display/list");
116
116
  var loading_1 = require("../../display/loading");
117
117
  var mapView_1 = require("../../display/mapView");
118
+ var drawer_1 = require("../../display/drawer");
118
119
  var modal_1 = require("../../display/modal");
119
120
  var notification_1 = require("../../display/notification");
120
121
  var stepper_1 = require("../../display/stepper");
@@ -184,7 +185,40 @@ var handleIsEmptyElement = function (element) {
184
185
  // INFO: rows-per-page choices offered in the view settings panel
185
186
  var PAGE_LIMIT_OPTIONS = [10, 25, 50, 100];
186
187
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
187
- 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, _65, _66, _67, _68, _69;
188
+ // INFO: props.type is what the caller asked for; resolvedType is what THIS
189
+ // instance renders. They differ in exactly one case: readDrawer is on and the
190
+ // caller asked for a read, so this instance keeps rendering the LIST while a
191
+ // nested instance draws the record in a panel over it. That is what preserves
192
+ // scroll position, page index and filters across opening a record.
193
+ //
194
+ // Every read of the view type below uses resolvedType. The distinction matters
195
+ // most in effect dependency arrays — following props.type there would leave
196
+ // the list never refetching while the panel is open, which fails silently.
197
+ 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, _65, _66, _67, _68, _69, _70;
198
+ // INFO: the panel cannot navigate its way out — handleNavigate("read") is
199
+ // routed straight back into it — so expand-to-full-page is local state.
200
+ var _71 = (0, react_1.useState)(false), drawerPageView = _71[0], setDrawerPageView = _71[1];
201
+ // INFO: the panel keeps rendering the record it was opened with rather than
202
+ // live props. Without this, navigating back to the list would re-render the
203
+ // still-mounted panel as a second list behind the overlay.
204
+ var drawerReadIdRef = (0, react_1.useRef)(undefined);
205
+ var isDrawerRead = !!((_a = props.viewSettings) === null || _a === void 0 ? void 0 : _a.readDrawer) &&
206
+ props.type === "read" &&
207
+ !!props.id &&
208
+ props.id !== "new";
209
+ // INFO: while the escape is active the read takes the page normally and the
210
+ // panel stays closed behind it.
211
+ var isDrawerHost = isDrawerRead && !drawerPageView;
212
+ var resolvedType = isDrawerHost ? "list" : props.type;
213
+ if (isDrawerRead)
214
+ drawerReadIdRef.current = props.id;
215
+ // INFO: leaving the record or the read view ends the escape, so the next row
216
+ // opened from the list peeks in the panel again rather than inheriting a full
217
+ // page the user asked for once.
218
+ (0, react_1.useEffect)(function () {
219
+ if (drawerPageView && props.type !== "read")
220
+ setDrawerPageView(false);
221
+ }, [props.type, props.id, drawerPageView]);
188
222
  var intialiseDefaultFilterValues = function () {
189
223
  var _a;
190
224
  var initialFilterSearch = {};
@@ -245,16 +279,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
245
279
  initialFilterReferenceDate: initialFilterReferenceDate,
246
280
  };
247
281
  };
248
- var _70 = intialiseDefaultFilterValues(), initialFilterSearch = _70.initialFilterSearch, initialFilterSearchParams = _70.initialFilterSearchParams, initialFilterSelection = _70.initialFilterSelection, initialFilterReference = _70.initialFilterReference, initialFilterReferenceDate = _70.initialFilterReferenceDate;
282
+ var _72 = intialiseDefaultFilterValues(), initialFilterSearch = _72.initialFilterSearch, initialFilterSearchParams = _72.initialFilterSearchParams, initialFilterSelection = _72.initialFilterSelection, initialFilterReference = _72.initialFilterReference, initialFilterReferenceDate = _72.initialFilterReferenceDate;
249
283
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
250
- var _71 = (0, viewStatePersistence_1.usePersistedViewState)({
251
- mode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistViewState,
284
+ var _73 = (0, viewStatePersistence_1.usePersistedViewState)({
285
+ mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
252
286
  collectionId: props.collectionId,
253
287
  uniqueLabel: props.uniqueLabel,
254
- type: props.type,
255
- }), persistedState = _71.persistedState, isPersistEnabled = _71.isEnabled, handleSaveView = _71.handleSaveView;
256
- var _72 = (0, react_1.useState)(false), loading = _72[0], setLoading = _72[1];
257
- var _73 = (0, react_1.useState)(), notification = _73[0], setNotification = _73[1];
288
+ type: resolvedType,
289
+ }), persistedState = _73.persistedState, isPersistEnabled = _73.isEnabled, handleSaveView = _73.handleSaveView;
290
+ var _74 = (0, react_1.useState)(false), loading = _74[0], setLoading = _74[1];
291
+ var _75 = (0, react_1.useState)(), notification = _75[0], setNotification = _75[1];
258
292
  // INFO: a success toast is confirmation, not a decision — it clears itself so
259
293
  // it never sits on the floating step bar; errors stay until dismissed
260
294
  (0, react_1.useEffect)(function () {
@@ -264,53 +298,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
264
298
  return function () { return clearTimeout(timer); };
265
299
  }, [notification]);
266
300
  //INFO : Used by List
267
- var _74 = (0, react_1.useState)((_b = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _b !== void 0 ? _b : initialFilterSearch), filterSearch = _74[0], setFilterSearch = _74[1];
268
- var _75 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearchParams), filterSearchParams = _75[0], setFilterSearchParams = _75[1];
269
- var _76 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _d !== void 0 ? _d : initialFilterSelection), filterSelection = _76[0], setFilterSelection = _76[1];
270
- var _77 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _e !== void 0 ? _e : initialFilterReference), filterReference = _77[0], setFilterReference = _77[1];
271
- var _78 = (0, react_1.useState)({}), filterReferenceSearch = _78[0], setFilterReferenceSearch = _78[1];
272
- var _79 = (0, react_1.useState)({}), filterReferenceList = _79[0], setFilterReferenceList = _79[1];
273
- var _80 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
301
+ var _76 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearch), filterSearch = _76[0], setFilterSearch = _76[1];
302
+ var _77 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearchParams), filterSearchParams = _77[0], setFilterSearchParams = _77[1];
303
+ var _78 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _e !== void 0 ? _e : initialFilterSelection), filterSelection = _78[0], setFilterSelection = _78[1];
304
+ var _79 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _f !== void 0 ? _f : initialFilterReference), filterReference = _79[0], setFilterReference = _79[1];
305
+ var _80 = (0, react_1.useState)({}), filterReferenceSearch = _80[0], setFilterReferenceSearch = _80[1];
306
+ var _81 = (0, react_1.useState)({}), filterReferenceList = _81[0], setFilterReferenceList = _81[1];
307
+ var _82 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
274
308
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
275
- : initialFilterReferenceDate), filterReferenceDate = _80[0], setFilterReferenceDate = _80[1];
276
- var _81 = (0, react_1.useState)(true), tableLoading = _81[0], setTableLoading = _81[1];
277
- var _82 = (0, react_1.useState)(""), cursor = _82[0], setCursor = _82[1];
278
- var _83 = (0, react_1.useState)(""), lastCursor = _83[0], setLastCursor = _83[1];
279
- var _84 = (0, react_1.useState)([]), tableData = _84[0], setTableData = _84[1];
280
- var _85 = (0, react_1.useState)([]), spaceTableData = _85[0], setSpaceTableData = _85[1];
281
- var _86 = (0, react_1.useState)(0), size = _86[0], setSize = _86[1];
282
- var _87 = (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 = _87[0], setPageIndex = _87[1];
283
- var _88 = (0, react_1.useState)([]), selectedIds = _88[0], setSelectedIds = _88[1];
284
- var _89 = (0, react_1.useState)(false), selectAll = _89[0], setSelectAll = _89[1];
285
- var _90 = (0, react_1.useState)(""), deletePasscode = _90[0], setDeletePasscode = _90[1];
286
- var _91 = (0, react_1.useState)(""), deletePasscodeInput = _91[0], setDeletePasscodeInput = _91[1];
287
- var _92 = (0, react_1.useState)(""), deleteFeedId = _92[0], setDeleteFeedId = _92[1];
309
+ : initialFilterReferenceDate), filterReferenceDate = _82[0], setFilterReferenceDate = _82[1];
310
+ var _83 = (0, react_1.useState)(true), tableLoading = _83[0], setTableLoading = _83[1];
311
+ var _84 = (0, react_1.useState)(""), cursor = _84[0], setCursor = _84[1];
312
+ var _85 = (0, react_1.useState)(""), lastCursor = _85[0], setLastCursor = _85[1];
313
+ var _86 = (0, react_1.useState)([]), tableData = _86[0], setTableData = _86[1];
314
+ var _87 = (0, react_1.useState)([]), spaceTableData = _87[0], setSpaceTableData = _87[1];
315
+ var _88 = (0, react_1.useState)(0), size = _88[0], setSize = _88[1];
316
+ var _89 = (0, react_1.useState)((_j = (_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _g !== void 0 ? _g : (_h = props.organise) === null || _h === void 0 ? void 0 : _h.pageIndex) !== null && _j !== void 0 ? _j : 0), pageIndex = _89[0], setPageIndex = _89[1];
317
+ var _90 = (0, react_1.useState)([]), selectedIds = _90[0], setSelectedIds = _90[1];
318
+ var _91 = (0, react_1.useState)(false), selectAll = _91[0], setSelectAll = _91[1];
319
+ var _92 = (0, react_1.useState)(""), deletePasscode = _92[0], setDeletePasscode = _92[1];
320
+ var _93 = (0, react_1.useState)(""), deletePasscodeInput = _93[0], setDeletePasscodeInput = _93[1];
321
+ var _94 = (0, react_1.useState)(""), deleteFeedId = _94[0], setDeleteFeedId = _94[1];
288
322
  //INFO : Used by List Organise
289
323
  // INFO: Internal sort state that overrides props.organise?.sort when
290
324
  // persistViewState is enabled and a persisted sort exists
291
- var _93 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _j !== void 0 ? _j : undefined), persistedSort = _93[0], setPersistedSort = _93[1];
292
- var _94 = (0, react_1.useState)(false), filterDraft = _94[0], setFilterDraft = _94[1];
293
- var _95 = (0, react_1.useState)(false), addTabModal = _95[0], setAddTabModal = _95[1];
325
+ var _95 = (0, react_1.useState)((_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _k !== void 0 ? _k : undefined), persistedSort = _95[0], setPersistedSort = _95[1];
326
+ var _96 = (0, react_1.useState)(false), filterDraft = _96[0], setFilterDraft = _96[1];
327
+ var _97 = (0, react_1.useState)(false), addTabModal = _97[0], setAddTabModal = _97[1];
294
328
  //INFO : resolve the initial tab synchronously so the mount cond is already
295
329
  // tab-scoped — an empty initial tab caused a second wasted list fetch
296
- var _96 = (0, react_1.useState)(function () {
330
+ var _98 = (0, react_1.useState)(function () {
297
331
  var _a, _b;
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);
299
- }), selectedTab = _96[0], setSelectedTab = _96[1];
300
- var _97 = (0, react_1.useState)("dayGridMonth"), calendarView = _97[0], setCalendarView = _97[1];
332
+ return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, 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);
333
+ }), selectedTab = _98[0], setSelectedTab = _98[1];
334
+ var _99 = (0, react_1.useState)("dayGridMonth"), calendarView = _99[0], setCalendarView = _99[1];
301
335
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
302
336
  // (calendarView above drives the matching range query)
303
- var _98 = (0, react_1.useState)("month"), newCalendarViewMode = _98[0], setNewCalendarViewMode = _98[1];
304
- var _99 = (0, react_1.useState)(new Date()), calendarTabMonth = _99[0], setCalendarTabMonth = _99[1];
305
- var _100 = (0, react_1.useState)(true), kanbanDroppable = _100[0], setKanbanDroppable = _100[1];
306
- var _101 = (0, react_1.useState)([]), kanbanOptions = _101[0], setKanbanOptions = _101[1];
307
- var _102 = (0, react_1.useState)(false), queryForm = _102[0], setQueryForm = _102[1];
308
- var _103 = (0, react_1.useState)(false), batchUpdateModal = _103[0], setBatchUpdateModal = _103[1];
309
- var _104 = (0, react_1.useState)({
337
+ var _100 = (0, react_1.useState)("month"), newCalendarViewMode = _100[0], setNewCalendarViewMode = _100[1];
338
+ var _101 = (0, react_1.useState)(new Date()), calendarTabMonth = _101[0], setCalendarTabMonth = _101[1];
339
+ var _102 = (0, react_1.useState)(true), kanbanDroppable = _102[0], setKanbanDroppable = _102[1];
340
+ var _103 = (0, react_1.useState)([]), kanbanOptions = _103[0], setKanbanOptions = _103[1];
341
+ var _104 = (0, react_1.useState)(false), queryForm = _104[0], setQueryForm = _104[1];
342
+ var _105 = (0, react_1.useState)(false), batchUpdateModal = _105[0], setBatchUpdateModal = _105[1];
343
+ var _106 = (0, react_1.useState)({
310
344
  columnId: "",
311
345
  columnData: {},
312
- }), batchUpdateData = _104[0], setBatchUpdateData = _104[1];
313
- var _105 = (0, react_1.useState)(function () {
346
+ }), batchUpdateData = _106[0], setBatchUpdateData = _106[1];
347
+ var _107 = (0, react_1.useState)(function () {
314
348
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
315
349
  if (!persistedState)
316
350
  return baseModel;
@@ -336,8 +370,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
336
370
  });
337
371
  }
338
372
  return model;
339
- }), structure = _105[0], setStructure = _105[1];
340
- var _106 = (0, react_1.useState)(((_k = props === null || props === void 0 ? void 0 : props.organise) === null || _k === void 0 ? void 0 : _k.additionalQuery) || []), additionalQuery = _106[0], setAdditionalQuery = _106[1];
373
+ }), structure = _107[0], setStructure = _107[1];
374
+ var _108 = (0, react_1.useState)(((_l = props === null || props === void 0 ? void 0 : props.organise) === null || _l === void 0 ? void 0 : _l.additionalQuery) || []), additionalQuery = _108[0], setAdditionalQuery = _108[1];
341
375
  // INFO: State for user-configurable flex filters (Monday.com-style)
342
376
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
343
377
  var defaultFlexFilterRow = [
@@ -348,109 +382,109 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
348
382
  value: undefined,
349
383
  },
350
384
  ];
351
- var _107 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
385
+ var _109 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
352
386
  ? persistedState.flexFilters
353
- : defaultFlexFilterRow), flexFilters = _107[0], setFlexFilters = _107[1];
387
+ : defaultFlexFilterRow), flexFilters = _109[0], setFlexFilters = _109[1];
354
388
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
355
389
  // to prevent API calls on every keystroke when typing in value inputs
356
- var _108 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
390
+ var _110 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
357
391
  ? persistedState.flexFilters
358
- : defaultFlexFilterRow), flexFiltersDebounced = _108[0], setFlexFiltersDebounced = _108[1];
359
- var _109 = (0, react_1.useState)({}), flexFilterReferenceOptions = _109[0], setFlexFilterReferenceOptions = _109[1];
360
- var _110 = (0, react_1.useState)({}), flexFilterReferenceSearch = _110[0], setFlexFilterReferenceSearch = _110[1];
361
- var _111 = (0, react_1.useState)(false), flexFilterModalOpen = _111[0], setFlexFilterModalOpen = _111[1];
362
- var _112 = (0, react_1.useState)(false), viewSettingsModalOpen = _112[0], setViewSettingsModalOpen = _112[1];
392
+ : defaultFlexFilterRow), flexFiltersDebounced = _110[0], setFlexFiltersDebounced = _110[1];
393
+ var _111 = (0, react_1.useState)({}), flexFilterReferenceOptions = _111[0], setFlexFilterReferenceOptions = _111[1];
394
+ var _112 = (0, react_1.useState)({}), flexFilterReferenceSearch = _112[0], setFlexFilterReferenceSearch = _112[1];
395
+ var _113 = (0, react_1.useState)(false), flexFilterModalOpen = _113[0], setFlexFilterModalOpen = _113[1];
396
+ var _114 = (0, react_1.useState)(false), viewSettingsModalOpen = _114[0], setViewSettingsModalOpen = _114[1];
363
397
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
364
398
  // Deliberately kept out of `structure`: the props-sync effect below resets
365
399
  // structure to props.model whenever props change, which would wipe the
366
400
  // choice, and the persist effect derives schema-level hiddenColumnIds from
367
401
  // structure — writing user hides there would blur the two concepts.
368
- var _113 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _l !== void 0 ? _l : []), userHiddenColumnIds = _113[0], setUserHiddenColumnIds = _113[1];
369
- var _114 = (0, react_1.useState)(""), columnSearch = _114[0], setColumnSearch = _114[1];
370
- var _115 = (0, react_1.useState)(null), draggingColumnId = _115[0], setDraggingColumnId = _115[1];
402
+ var _115 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _m !== void 0 ? _m : []), userHiddenColumnIds = _115[0], setUserHiddenColumnIds = _115[1];
403
+ var _116 = (0, react_1.useState)(""), columnSearch = _116[0], setColumnSearch = _116[1];
404
+ var _117 = (0, react_1.useState)(null), draggingColumnId = _117[0], setDraggingColumnId = _117[1];
371
405
  var columnRowRefs = (0, react_1.useRef)({});
372
406
  //INFO : Used by Auth
373
- var _116 = (0, react_1.useState)({
407
+ var _118 = (0, react_1.useState)({
374
408
  email: "",
375
409
  google: "",
376
410
  phone: "",
377
411
  disabled: false,
378
412
  create: false,
379
- }), authMethods = _116[0], setAuthMethods = _116[1];
380
- var _117 = (0, react_1.useState)(""), selectedAuthMethod = _117[0], setSelectedAuthMethod = _117[1];
413
+ }), authMethods = _118[0], setAuthMethods = _118[1];
414
+ var _119 = (0, react_1.useState)(""), selectedAuthMethod = _119[0], setSelectedAuthMethod = _119[1];
381
415
  // INFO: Used by Activity Log
382
- var _118 = (0, react_1.useState)(false), activityModal = _118[0], setActivityModal = _118[1];
383
- var _119 = (0, react_1.useState)(""), activityId = _119[0], setActivityId = _119[1];
416
+ var _120 = (0, react_1.useState)(false), activityModal = _120[0], setActivityModal = _120[1];
417
+ var _121 = (0, react_1.useState)(""), activityId = _121[0], setActivityId = _121[1];
384
418
  //INFO : Used by Export
385
- var _120 = (0, react_1.useState)(null), csvFile = _120[0], setCSVFile = _120[1];
386
- var _121 = (0, react_1.useState)([]), csvFileData = _121[0], setCSVFileData = _121[1];
387
- var _122 = (0, react_1.useState)(0), stepCSVIndex = _122[0], setStepCSVIndex = _122[1];
388
- var _123 = (0, react_1.useState)({}), listCSVMapAttribute = _123[0], setListCSVMapAttribute = _123[1];
389
- var _124 = (0, react_1.useState)({}), listCSVObjAttribute = _124[0], setListCSVObjAttribute = _124[1];
390
- var _125 = (0, react_1.useState)([]), csvAPIAttribute = _125[0], setCSVAPIAttribute = _125[1];
391
- var _126 = (0, react_1.useState)(((_m = props.devSettings.currentUser) === null || _m === void 0 ? void 0 : _m.userEmail) || ""), exportCSVEmail = _126[0], setExportCSVEmail = _126[1];
392
- var _127 = (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 = _127[0], setExportPDFTitle = _127[1];
393
- var _128 = (0, react_1.useState)(false), exportPDFLoading = _128[0], setExportPDFLoading = _128[1];
394
- var _129 = (0, react_1.useState)(false), exportReadPDFLoading = _129[0], setExportReadPDFLoading = _129[1];
395
- var _130 = (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 = _130[0], setExportSumAttributeIds = _130[1];
396
- var _131 = (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 = _131[0], setHideSubItems = _131[1];
397
- var _132 = (0, react_1.useState)([]), importTableData = _132[0], setImportTableData = _132[1];
398
- var _133 = (0, react_1.useState)([]), queryList = _133[0], setQueryList = _133[1];
399
- var _134 = (0, react_1.useState)(undefined), allQueryList = _134[0], setAllQueryList = _134[1];
400
- var _135 = (0, react_1.useState)(-1), queryIndex = _135[0], setQueryIndex = _135[1];
401
- var _136 = (0, react_1.useState)((_w = props.organise) === null || _w === void 0 ? void 0 : _w.groupBy), groupId = _136[0], setGroupId = _136[1];
402
- var _137 = (0, react_1.useState)(""), readTabSection = _137[0], setReadTabSection = _137[1];
403
- var _138 = (0, react_1.useState)(false), readFloatingNav = _138[0], setReadFloatingNav = _138[1];
419
+ var _122 = (0, react_1.useState)(null), csvFile = _122[0], setCSVFile = _122[1];
420
+ var _123 = (0, react_1.useState)([]), csvFileData = _123[0], setCSVFileData = _123[1];
421
+ var _124 = (0, react_1.useState)(0), stepCSVIndex = _124[0], setStepCSVIndex = _124[1];
422
+ var _125 = (0, react_1.useState)({}), listCSVMapAttribute = _125[0], setListCSVMapAttribute = _125[1];
423
+ var _126 = (0, react_1.useState)({}), listCSVObjAttribute = _126[0], setListCSVObjAttribute = _126[1];
424
+ var _127 = (0, react_1.useState)([]), csvAPIAttribute = _127[0], setCSVAPIAttribute = _127[1];
425
+ var _128 = (0, react_1.useState)(((_o = props.devSettings.currentUser) === null || _o === void 0 ? void 0 : _o.userEmail) || ""), exportCSVEmail = _128[0], setExportCSVEmail = _128[1];
426
+ var _129 = (0, react_1.useState)(((_q = (_p = props.organise) === null || _p === void 0 ? void 0 : _p.exportSettings) === null || _q === void 0 ? void 0 : _q.defaultExportPDFName) || ""), exportPDFTitle = _129[0], setExportPDFTitle = _129[1];
427
+ var _130 = (0, react_1.useState)(false), exportPDFLoading = _130[0], setExportPDFLoading = _130[1];
428
+ var _131 = (0, react_1.useState)(false), exportReadPDFLoading = _131[0], setExportReadPDFLoading = _131[1];
429
+ var _132 = (0, react_1.useState)((_t = (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.exportSettings) === null || _s === void 0 ? void 0 : _s.sumColumnId) !== null && _t !== void 0 ? _t : []), exportSumAttributeIds = _132[0], setExportSumAttributeIds = _132[1];
430
+ var _133 = (0, react_1.useState)((_w = (_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.exportSettings) === null || _v === void 0 ? void 0 : _v.hideSubItems) !== null && _w !== void 0 ? _w : false), hideSubItems = _133[0], setHideSubItems = _133[1];
431
+ var _134 = (0, react_1.useState)([]), importTableData = _134[0], setImportTableData = _134[1];
432
+ var _135 = (0, react_1.useState)([]), queryList = _135[0], setQueryList = _135[1];
433
+ var _136 = (0, react_1.useState)(undefined), allQueryList = _136[0], setAllQueryList = _136[1];
434
+ var _137 = (0, react_1.useState)(-1), queryIndex = _137[0], setQueryIndex = _137[1];
435
+ var _138 = (0, react_1.useState)((_x = props.organise) === null || _x === void 0 ? void 0 : _x.groupBy), groupId = _138[0], setGroupId = _138[1];
436
+ var _139 = (0, react_1.useState)(""), readTabSection = _139[0], setReadTabSection = _139[1];
437
+ var _140 = (0, react_1.useState)(false), readFloatingNav = _140[0], setReadFloatingNav = _140[1];
404
438
  var readTabSectionRefs = (0, react_1.useRef)({});
405
439
  //INFO : Used by Read
406
440
  //INFO : Used by Update
407
- var _139 = (0, react_1.useState)(false), modalVisible = _139[0], setModalVisible = _139[1];
408
- var _140 = (0, react_1.useState)(false), deleteModal = _140[0], setDeleteModal = _140[1];
409
- var _141 = (0, react_1.useState)(false), excelModal = _141[0], setExcelModal = _141[1];
410
- var _142 = (0, react_1.useState)(false), exportExcel = _142[0], setExportExcel = _142[1];
411
- var _143 = (0, react_1.useState)(""), exportType = _143[0], setExportType = _143[1];
412
- var _144 = (0, react_1.useState)(false), exportQR = _144[0], setExportQR = _144[1];
413
- var _145 = (0, react_1.useState)(function () {
441
+ var _141 = (0, react_1.useState)(false), modalVisible = _141[0], setModalVisible = _141[1];
442
+ var _142 = (0, react_1.useState)(false), deleteModal = _142[0], setDeleteModal = _142[1];
443
+ var _143 = (0, react_1.useState)(false), excelModal = _143[0], setExcelModal = _143[1];
444
+ var _144 = (0, react_1.useState)(false), exportExcel = _144[0], setExportExcel = _144[1];
445
+ var _145 = (0, react_1.useState)(""), exportType = _145[0], setExportType = _145[1];
446
+ var _146 = (0, react_1.useState)(false), exportQR = _146[0], setExportQR = _146[1];
447
+ var _147 = (0, react_1.useState)(function () {
414
448
  var _a, _b;
415
449
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
416
450
  return firstTabId;
417
- }), activeTab = _145[0], setActiveTab = _145[1];
418
- var _146 = (0, react_1.useState)(false), signatureSigning = _146[0], setSignatureSigning = _146[1];
419
- var _147 = (0, react_1.useState)({}), selectedData = _147[0], setSelectedData = _147[1];
420
- var _148 = (0, react_1.useState)(""), selectedObjectStructureId = _148[0], setSelectedObjectStructureId = _148[1];
421
- var _149 = (0, react_1.useState)(""), selectedObjectId = _149[0], setSelectedObjectId = _149[1];
422
- var _150 = (0, react_1.useState)(""), selectedListAddressId = _150[0], setSelectedListAddressId = _150[1];
423
- var _151 = (0, react_1.useState)(-1), selectedListAddressIndex = _151[0], setSelectedListAddressIndex = _151[1];
424
- var _152 = (0, react_1.useState)({
451
+ }), activeTab = _147[0], setActiveTab = _147[1];
452
+ var _148 = (0, react_1.useState)(false), signatureSigning = _148[0], setSignatureSigning = _148[1];
453
+ var _149 = (0, react_1.useState)({}), selectedData = _149[0], setSelectedData = _149[1];
454
+ var _150 = (0, react_1.useState)(""), selectedObjectStructureId = _150[0], setSelectedObjectStructureId = _150[1];
455
+ var _151 = (0, react_1.useState)(""), selectedObjectId = _151[0], setSelectedObjectId = _151[1];
456
+ var _152 = (0, react_1.useState)(""), selectedListAddressId = _152[0], setSelectedListAddressId = _152[1];
457
+ var _153 = (0, react_1.useState)(-1), selectedListAddressIndex = _153[0], setSelectedListAddressIndex = _153[1];
458
+ var _154 = (0, react_1.useState)({
425
459
  lat: 0,
426
460
  lng: 0,
427
461
  name: "",
428
- }), selectedListAddress = _152[0], setSelectedListAddress = _152[1];
429
- var _153 = (0, react_1.useState)({}), selectedObjectData = _153[0], setSelectedObjectData = _153[1];
430
- var _154 = (0, react_1.useState)(null), objectCellEdit = _154[0], setObjectCellEdit = _154[1];
431
- var _155 = (0, react_1.useState)(false), referenceLoading = _155[0], setReferenceLoading = _155[1];
432
- var _156 = (0, react_1.useState)({}), referencesOptions = _156[0], setReferencesOptions = _156[1];
433
- var _157 = (0, react_1.useState)({}), referencesDetails = _157[0], setReferencesDetails = _157[1];
434
- var _158 = (0, react_1.useState)({}), listReferencesOptions = _158[0], setListReferencesOptions = _158[1];
435
- var _159 = (0, react_1.useState)({}), referenceDeleteTableData = _159[0], setReferenceDeleteTableData = _159[1];
436
- var _160 = (0, react_1.useState)(0), referenceDeleteIndex = _160[0], setReferenceDeleteIndex = _160[1];
437
- var _161 = (0, react_1.useState)({
462
+ }), selectedListAddress = _154[0], setSelectedListAddress = _154[1];
463
+ var _155 = (0, react_1.useState)({}), selectedObjectData = _155[0], setSelectedObjectData = _155[1];
464
+ var _156 = (0, react_1.useState)(null), objectCellEdit = _156[0], setObjectCellEdit = _156[1];
465
+ var _157 = (0, react_1.useState)(false), referenceLoading = _157[0], setReferenceLoading = _157[1];
466
+ var _158 = (0, react_1.useState)({}), referencesOptions = _158[0], setReferencesOptions = _158[1];
467
+ var _159 = (0, react_1.useState)({}), referencesDetails = _159[0], setReferencesDetails = _159[1];
468
+ var _160 = (0, react_1.useState)({}), listReferencesOptions = _160[0], setListReferencesOptions = _160[1];
469
+ var _161 = (0, react_1.useState)({}), referenceDeleteTableData = _161[0], setReferenceDeleteTableData = _161[1];
470
+ var _162 = (0, react_1.useState)(0), referenceDeleteIndex = _162[0], setReferenceDeleteIndex = _162[1];
471
+ var _163 = (0, react_1.useState)({
438
472
  id: "",
439
473
  name: "",
440
474
  type: "string",
441
- }), referenceCreationModal = _161[0], setReferenceCreationModal = _161[1];
442
- var _162 = (0, react_1.useState)({}), referenceModelSchema = _162[0], setReferenceSchema = _162[1];
443
- var _163 = (0, react_1.useState)([]), kanbanChecked = _163[0], setKanbanChecked = _163[1];
475
+ }), referenceCreationModal = _163[0], setReferenceCreationModal = _163[1];
476
+ var _164 = (0, react_1.useState)({}), referenceModelSchema = _164[0], setReferenceSchema = _164[1];
477
+ var _165 = (0, react_1.useState)([]), kanbanChecked = _165[0], setKanbanChecked = _165[1];
444
478
  //INFO : Offline
445
- var _164 = (0, react_1.useState)(0), offlineDataLength = _164[0], setOfflineDataLength = _164[1];
446
- var _165 = (0, react_1.useState)(false), offlineModal = _165[0], setOfflineModal = _165[1];
479
+ var _166 = (0, react_1.useState)(0), offlineDataLength = _166[0], setOfflineDataLength = _166[1];
480
+ var _167 = (0, react_1.useState)(false), offlineModal = _167[0], setOfflineModal = _167[1];
447
481
  // INFO: live-stream state — driven by socket connection and navigator.onLine
448
- var _166 = (0, react_1.useState)(false), isLive = _166[0], setIsLive = _166[1];
449
- var _167 = (0, react_1.useState)(false), isLiveOffline = _167[0], setIsLiveOffline = _167[1];
482
+ var _168 = (0, react_1.useState)(false), isLive = _168[0], setIsLive = _168[1];
483
+ var _169 = (0, react_1.useState)(false), isLiveOffline = _169[0], setIsLiveOffline = _169[1];
450
484
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
451
485
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
452
486
  // Independent of SSE status so it works even when bareSocketName is not set.
453
- var _168 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _168[0], setIsNetworkOffline = _168[1];
487
+ var _170 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _170[0], setIsNetworkOffline = _170[1];
454
488
  var previousType = (0, react_1.useRef)(null);
455
489
  var previousSelectedData = (0, react_1.useRef)(null);
456
490
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -530,59 +564,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
530
564
  var isSubmittingRef = (0, react_1.useRef)(false);
531
565
  var devSettings = props.devSettings;
532
566
  var serverId = (0, utils_1.parseServerId)(devSettings.server);
533
- var viewType = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.viewId) !== null && _y !== void 0 ? _y : "general";
567
+ var viewType = (_z = (_y = props.organise) === null || _y === void 0 ? void 0 : _y.viewId) !== null && _z !== void 0 ? _z : "general";
534
568
  var isFirebaseClient = devSettings.server === "firebase";
535
569
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
536
- var dbModule = isFirebaseClient ? (_z = props.lib) === null || _z === void 0 ? void 0 : _z.firebase : (_0 = props.lib) === null || _0 === void 0 ? void 0 : _0.axios;
570
+ var dbModule = isFirebaseClient ? (_0 = props.lib) === null || _0 === void 0 ? void 0 : _0.firebase : (_1 = props.lib) === null || _1 === void 0 ? void 0 : _1.axios;
537
571
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
538
572
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
539
573
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
540
- var isViewSettingsEnabled = ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareViewSettings) || ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareNewDTW)
574
+ var isViewSettingsEnabled = ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareViewSettings) || ((_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareNewDTW)
541
575
  ? true
542
576
  : false;
543
577
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
544
578
  // (Space, Sun Luan) — toggling writes to the model and calls back. Without it
545
579
  // the hide is this user's own and lives in userHiddenColumnIds.
546
- var isSchemaHideMode = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.onChangeHide) ? true : false;
580
+ var isSchemaHideMode = ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.onChangeHide) ? true : false;
547
581
  // INFO: rows per page is a view setting the user can change, so it starts from
548
582
  // the persisted value and falls back to the consumer's limit
549
- var _169 = (0, react_1.useState)((_5 = (_4 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _4 !== void 0 ? _4 : props.limit) !== null && _5 !== void 0 ? _5 : 10), pageLimit = _169[0], setPageLimit = _169[1];
583
+ var _171 = (0, react_1.useState)((_6 = (_5 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _5 !== void 0 ? _5 : props.limit) !== null && _6 !== void 0 ? _6 : 10), pageLimit = _171[0], setPageLimit = _171[1];
550
584
  var limit = pageLimit;
551
- var activeSortId = (isPersistEnabled && persistedSort) || ((_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.sort);
585
+ var activeSortId = (isPersistEnabled && persistedSort) || ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.sort);
552
586
  var handleSortColumn = function (value) {
553
587
  var _a, _b;
554
588
  if (isPersistEnabled)
555
589
  setPersistedSort(value);
556
590
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
557
591
  };
558
- var isEditor = ((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.allEditable) ? true : false;
559
- var isOffline = (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareOffline;
592
+ var isEditor = ((_8 = props.edit) === null || _8 === void 0 ? void 0 : _8.allEditable) ? true : false;
593
+ var isOffline = (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareOffline;
560
594
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
561
595
  // the live network state — online saves go to the server even if bareOffline
562
596
  // is true, offline saves go to IDB as normal.
563
- var isOfflineNetworkListener = isOffline && ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareOfflineNetworkListener);
564
- var showId = (_10 = props.space) === null || _10 === void 0 ? void 0 : _10.showId;
597
+ var isOfflineNetworkListener = isOffline && ((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareOfflineNetworkListener);
598
+ var showId = (_11 = props.space) === null || _11 === void 0 ? void 0 : _11.showId;
565
599
  var remainId = showId || selectedObjectStructureId ? true : false;
566
- var idField = ((_11 = props.space) === null || _11 === void 0 ? void 0 : _11.idField) || ((_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.idField);
567
- var pipeline = (_13 = props === null || props === void 0 ? void 0 : props.space) === null || _13 === void 0 ? void 0 : _13.pipeline;
568
- if ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareListPipeline) {
600
+ var idField = ((_12 = props.space) === null || _12 === void 0 ? void 0 : _12.idField) || ((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.idField);
601
+ var pipeline = (_14 = props === null || props === void 0 ? void 0 : props.space) === null || _14 === void 0 ? void 0 : _14.pipeline;
602
+ if ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareListPipeline) {
569
603
  pipeline = pipeline
570
604
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
571
605
  }
572
- var hasNavigation = ((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.handleNavigate) ? true : false;
606
+ var hasNavigation = ((_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.handleNavigate) ? true : false;
573
607
  var formColumn = "grid-cols-12";
574
- var useMobileView = (_17 = (_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateMobileView) !== null && _17 !== void 0 ? _17 : false;
608
+ var useMobileView = (_18 = (_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateMobileView) !== null && _18 !== void 0 ? _18 : false;
575
609
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
576
- var isActivityLog = (((_19 = (_18 = props.edit) === null || _18 === void 0 ? void 0 : _18.activityLog) === null || _19 === void 0 ? void 0 : _19.enableComments) &&
577
- ((_20 = props.edit) === null || _20 === void 0 ? void 0 : _20.activityLog.commentCollectionId)) ||
578
- (((_22 = (_21 = props.edit) === null || _21 === void 0 ? void 0 : _21.activityLog) === null || _22 === void 0 ? void 0 : _22.enableLogs) &&
579
- ((_23 = props.edit) === null || _23 === void 0 ? void 0 : _23.activityLog.logsCollectionId));
580
- var customPaginationSize = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.customPaginationCount)
610
+ var isActivityLog = (((_20 = (_19 = props.edit) === null || _19 === void 0 ? void 0 : _19.activityLog) === null || _20 === void 0 ? void 0 : _20.enableComments) &&
611
+ ((_21 = props.edit) === null || _21 === void 0 ? void 0 : _21.activityLog.commentCollectionId)) ||
612
+ (((_23 = (_22 = props.edit) === null || _22 === void 0 ? void 0 : _22.activityLog) === null || _23 === void 0 ? void 0 : _23.enableLogs) &&
613
+ ((_24 = props.edit) === null || _24 === void 0 ? void 0 : _24.activityLog.logsCollectionId));
614
+ var customPaginationSize = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.customPaginationCount)
581
615
  ? props.organise.customPaginationCount(size)
582
616
  : undefined;
583
617
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
584
618
  var writeServerQuery = new writeQuery_1.WriteQuery({
585
- dbModule: (_25 = props.lib) === null || _25 === void 0 ? void 0 : _25.axios,
619
+ dbModule: (_26 = props.lib) === null || _26 === void 0 ? void 0 : _26.axios,
586
620
  dbType: devSettings.server,
587
621
  dbCollection: props.collectionId,
588
622
  dbEndpoint: devSettings.dbEndpoint,
@@ -590,7 +624,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
590
624
  dbUserToken: devSettings.dbUserToken,
591
625
  });
592
626
  var readServerQuery = new readQuery_1.ReadQuery({
593
- dbModule: (_26 = props.lib) === null || _26 === void 0 ? void 0 : _26.axios,
627
+ dbModule: (_27 = props.lib) === null || _27 === void 0 ? void 0 : _27.axios,
594
628
  dbType: devSettings.server,
595
629
  dbCollection: props.collectionId,
596
630
  dbEndpoint: devSettings.dbEndpoint,
@@ -598,9 +632,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
598
632
  dbUserToken: devSettings.dbUserToken,
599
633
  });
600
634
  var moreButtonPopUp = [
601
- ((_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.allEditable) &&
635
+ ((_28 = props.edit) === null || _28 === void 0 ? void 0 : _28.allEditable) &&
602
636
  !isFirebase &&
603
- !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.exportSettings) === null || _29 === void 0 ? void 0 : _29.hideImportCSV)
637
+ !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.exportSettings) === null || _30 === void 0 ? void 0 : _30.hideImportCSV)
604
638
  ? {
605
639
  text: "Import Excel",
606
640
  onClick: function () {
@@ -609,7 +643,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
609
643
  },
610
644
  }
611
645
  : null,
612
- !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.exportSettings) === null || _31 === void 0 ? void 0 : _31.hideExportCSV)
646
+ !((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.exportSettings) === null || _32 === void 0 ? void 0 : _32.hideExportCSV)
613
647
  ? {
614
648
  text: "Export CSV",
615
649
  onClick: function () {
@@ -619,7 +653,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
619
653
  },
620
654
  }
621
655
  : null,
622
- !((_33 = (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.exportSettings) === null || _33 === void 0 ? void 0 : _33.hideExportExcel)
656
+ !((_34 = (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.exportSettings) === null || _34 === void 0 ? void 0 : _34.hideExportExcel)
623
657
  ? {
624
658
  text: "Export Excel",
625
659
  onClick: function () {
@@ -629,7 +663,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
629
663
  },
630
664
  }
631
665
  : null,
632
- !((_35 = (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.exportSettings) === null || _35 === void 0 ? void 0 : _35.hideExportPDF)
666
+ !((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.exportSettings) === null || _36 === void 0 ? void 0 : _36.hideExportPDF)
633
667
  ? {
634
668
  text: "Export PDF",
635
669
  onClick: function () {
@@ -639,7 +673,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
639
673
  },
640
674
  }
641
675
  : null,
642
- !((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.exportSettings) === null || _37 === void 0 ? void 0 : _37.hideExportQR)
676
+ !((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.exportSettings) === null || _38 === void 0 ? void 0 : _38.hideExportQR)
643
677
  ? {
644
678
  text: "Export QR",
645
679
  onClick: function () {
@@ -649,7 +683,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
649
683
  },
650
684
  }
651
685
  : null,
652
- !((_39 = (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.exportSettings) === null || _39 === void 0 ? void 0 : _39.hideExportQR)
686
+ !((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.exportSettings) === null || _40 === void 0 ? void 0 : _40.hideExportQR)
653
687
  ? {
654
688
  text: "Export QR(Data)",
655
689
  onClick: function () {
@@ -659,7 +693,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
659
693
  },
660
694
  }
661
695
  : null,
662
- !((_41 = (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.exportSettings) === null || _41 === void 0 ? void 0 : _41.hideExportPrint)
696
+ !((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.exportSettings) === null || _42 === void 0 ? void 0 : _42.hideExportPrint)
663
697
  ? {
664
698
  text: "Print",
665
699
  onClick: function () {
@@ -669,7 +703,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
669
703
  },
670
704
  }
671
705
  : null,
672
- !((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.exportSettings) === null || _43 === void 0 ? void 0 : _43.hideExportDraft)
706
+ !((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.exportSettings) === null || _44 === void 0 ? void 0 : _44.hideExportDraft)
673
707
  ? {
674
708
  text: filterDraft ? "Show All Items" : "Filter Draft",
675
709
  onClick: function () {
@@ -678,7 +712,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
678
712
  }
679
713
  : null,
680
714
  ].filter(Boolean);
681
- if ((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.moreSettings)
715
+ if ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.moreSettings)
682
716
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
683
717
  //=====================================================================================
684
718
  //SECTION: User Column Visibility Handlers
@@ -964,7 +998,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
964
998
  (0, react_1.useEffect)(function () {
965
999
  handleOfflinePrefetch();
966
1000
  /* eslint-disable */
967
- }, [props.collectionId, (_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareOffline]);
1001
+ }, [props.collectionId, (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOffline]);
968
1002
  /* eslint-enable */
969
1003
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
970
1004
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -984,7 +1018,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
984
1018
  }, interval);
985
1019
  return function () { return clearInterval(timer); };
986
1020
  /* eslint-disable */
987
- }, [(_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.barePollingInterval, isLive, isNetworkOffline]);
1021
+ }, [(_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.barePollingInterval, isLive, isNetworkOffline]);
988
1022
  /* eslint-enable */
989
1023
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
990
1024
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -1026,7 +1060,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1026
1060
  };
1027
1061
  /* eslint-disable */
1028
1062
  }, [
1029
- (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareSocketName,
1063
+ (_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareSocketName,
1030
1064
  props.collectionId,
1031
1065
  props.devSettings.sseEndpoint,
1032
1066
  props.devSettings.dbAPIToken,
@@ -1098,7 +1132,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1098
1132
  //INFO : Change Data Type & ID Refresh
1099
1133
  (0, react_1.useEffect)(function () {
1100
1134
  var _a, _b, _c, _d;
1101
- switch (props.type) {
1135
+ switch (resolvedType) {
1102
1136
  case "read":
1103
1137
  case "update":
1104
1138
  setReferencesOptions({});
@@ -1114,8 +1148,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1114
1148
  if (props.id !== "new" && props.id !== "") {
1115
1149
  setModalVisible(true);
1116
1150
  setLoading(true);
1117
- if ((previousType.current === "read" && props.type === "update") ||
1118
- (previousType.current === "update" && props.type === "read")) {
1151
+ if ((previousType.current === "read" && resolvedType === "update") ||
1152
+ (previousType.current === "update" && resolvedType === "read")) {
1119
1153
  (_c = readQueryHocRef.current) === null || _c === void 0 ? void 0 : _c.handleRefresh();
1120
1154
  }
1121
1155
  }
@@ -1129,7 +1163,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1129
1163
  handleObjectReferenceOptions();
1130
1164
  }
1131
1165
  //INFO : Auth Feature
1132
- if (props.type === "read")
1166
+ if (resolvedType === "read")
1133
1167
  handleDTAuthMethods();
1134
1168
  break;
1135
1169
  case "list":
@@ -1137,8 +1171,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1137
1171
  setReferencesDetails({});
1138
1172
  break;
1139
1173
  }
1140
- previousType.current = props.type;
1141
- }, [props.type, props.id]);
1174
+ previousType.current = resolvedType;
1175
+ }, [resolvedType, props.id]);
1142
1176
  (0, react_1.useEffect)(function () {
1143
1177
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1144
1178
  var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -1147,8 +1181,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1147
1181
  return __generator(this, function (_h) {
1148
1182
  switch (_h.label) {
1149
1183
  case 0:
1150
- currentTab = (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);
1151
- if (!(props.type === "list")) return [3 /*break*/, 5];
1184
+ currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, 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);
1185
+ if (!(resolvedType === "list")) return [3 /*break*/, 5];
1152
1186
  setSelectedTab(currentTab);
1153
1187
  if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "calendar")) return [3 /*break*/, 1];
1154
1188
  if ((_c = currentTab === null || currentTab === void 0 ? void 0 : currentTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultStartDate) {
@@ -1243,7 +1277,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1243
1277
  viewId: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.viewId,
1244
1278
  additionalQuery: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.additionalQuery,
1245
1279
  groupBy: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.groupBy,
1246
- type: props.type,
1280
+ type: resolvedType,
1247
1281
  };
1248
1282
  var safeReplacer = function () {
1249
1283
  var seen = new WeakSet();
@@ -1268,11 +1302,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1268
1302
  props.collectionId,
1269
1303
  props.model,
1270
1304
  props.localURLEndpoint,
1271
- (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.extendedTabs,
1272
- (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.viewId,
1273
- (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.additionalQuery,
1274
- (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.groupBy,
1275
- props.type,
1305
+ (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.extendedTabs,
1306
+ (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.viewId,
1307
+ (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.additionalQuery,
1308
+ (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.groupBy,
1309
+ resolvedType,
1276
1310
  ]);
1277
1311
  (0, react_1.useEffect)(function () {
1278
1312
  if (props.devSettings.schemaReference)
@@ -1323,7 +1357,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1323
1357
  }, [selectedData]);
1324
1358
  (0, react_1.useEffect)(function () {
1325
1359
  var _a;
1326
- if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.showReadFloatingNav) || props.type !== "read")
1360
+ if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.showReadFloatingNav) || resolvedType !== "read")
1327
1361
  return;
1328
1362
  var timeoutId = setTimeout(function () {
1329
1363
  var sections = Object.keys(readTabSectionRefs.current);
@@ -1361,9 +1395,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1361
1395
  };
1362
1396
  }, 100);
1363
1397
  return function () { return clearTimeout(timeoutId); };
1364
- }, [(_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.showReadFloatingNav, props.type, props.id, loading]);
1398
+ }, [(_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.showReadFloatingNav, resolvedType, props.id, loading]);
1365
1399
  (0, react_1.useEffect)(function () {
1366
- if (props.type !== "read")
1400
+ if (resolvedType !== "read")
1367
1401
  return;
1368
1402
  var hasTabs = structure.some(function (eachModel) { return eachModel.tabId; });
1369
1403
  var shouldGroup = structure.some(function (eachModel) { return eachModel.groupId; }) || hasTabs;
@@ -1401,7 +1435,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1401
1435
  setReadTabSection(allTabSections[0]);
1402
1436
  }
1403
1437
  }
1404
- }, [structure, props.type, readTabSection]);
1438
+ }, [structure, resolvedType, readTabSection]);
1405
1439
  // INFO: reset stepper create deduplication refs when the form resets to a
1406
1440
  // fresh create session (props.id changes back to "new"). Without this, a
1407
1441
  // second form session in the same component instance would see
@@ -1639,7 +1673,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1639
1673
  return __generator(this, function (_c) {
1640
1674
  switch (_c.label) {
1641
1675
  case 0:
1642
- isListView = props.type === "list";
1676
+ isListView = resolvedType === "list";
1643
1677
  if (!isListView) return [3 /*break*/, 13];
1644
1678
  prettifyRecords = function (records) { return __awaiter(void 0, void 0, void 0, function () {
1645
1679
  var resolved;
@@ -2039,7 +2073,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2039
2073
  else {
2040
2074
  setSelectedIds([]);
2041
2075
  setSelectAll(false);
2042
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, props.type, props.id, id);
2076
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, resolvedType, props.id, id);
2043
2077
  }
2044
2078
  };
2045
2079
  // INFO: the list already fetches every referenced document once per page to
@@ -2271,7 +2305,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2271
2305
  case 0:
2272
2306
  if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachModel.type) &&
2273
2307
  eachModel.referenceMapColumnId)) return [3 /*break*/, 2];
2274
- return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachModel, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, undefined, undefined, undefined, undefined, props.type === "read")];
2308
+ return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachModel, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, undefined, undefined, undefined, undefined, resolvedType === "read")];
2275
2309
  case 1:
2276
2310
  _a.sent();
2277
2311
  _a.label = 2;
@@ -2284,7 +2318,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2284
2318
  case 0:
2285
2319
  if (!(utils_1.REFERENCE_DATA_TYPES.includes(eachObjectData.type) &&
2286
2320
  eachObjectData.referenceMapColumnId)) return [3 /*break*/, 2];
2287
- 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")];
2321
+ return [4 /*yield*/, (0, updateModule_1.handleRetrieveObjectReferenceOptions)(eachObjectData, clonedOptions_1, clonedDetails_1, selectedData, dbModule, devSettings, eachModel.id, eachModel.type === "listObject", selectedData, undefined, resolvedType === "read")];
2288
2322
  case 1:
2289
2323
  _a.sent();
2290
2324
  _a.label = 2;
@@ -2377,7 +2411,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2377
2411
  setTableLoading(true);
2378
2412
  setModalVisible(false);
2379
2413
  setLoading(false);
2380
- if (props.type === "update" || props.type === "read") {
2414
+ if (resolvedType === "update" || resolvedType === "read") {
2381
2415
  if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate)
2382
2416
  props.organise.handleNavigate("list", "");
2383
2417
  }
@@ -4844,13 +4878,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4844
4878
  switch (_k.label) {
4845
4879
  case 0:
4846
4880
  if (process.env.NODE_ENV !== "production") {
4847
- console.debug("[DTW read] handleRetrieveSelectedData called", "offline=", (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareOffline, "hasData=", !!(responseData === null || responseData === void 0 ? void 0 : responseData.data), "type=", props.type);
4881
+ console.debug("[DTW read] handleRetrieveSelectedData called", "offline=", (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareOffline, "hasData=", !!(responseData === null || responseData === void 0 ? void 0 : responseData.data), "type=", resolvedType);
4848
4882
  }
4849
4883
  if (!responseData.data) return [3 /*break*/, 9];
4850
4884
  if (!((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareOffline)) return [3 /*break*/, 5];
4851
4885
  // INFO: Mark as programmatic so initial data load doesn't populate dirtyFields
4852
4886
  programmaticUpdateRef.current = true;
4853
- if (!(props.type === "read")) return [3 /*break*/, 2];
4887
+ if (!(resolvedType === "read")) return [3 /*break*/, 2];
4854
4888
  return [4 /*yield*/, handleResolveOfflineReferences([
4855
4889
  responseData.data,
4856
4890
  ])];
@@ -4943,7 +4977,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4943
4977
  case 5:
4944
4978
  dummyRespData = JSON.parse(JSON.stringify(responseData.data), utils_1.jsonReviver);
4945
4979
  dummyReferenceModelSchema = JSON.parse(JSON.stringify(referenceModelSchema));
4946
- if (!(props.type === "read")) return [3 /*break*/, 7];
4980
+ if (!(resolvedType === "read")) return [3 /*break*/, 7];
4947
4981
  return [4 /*yield*/, (0, readModule_1.handleRetrieveDeepModel)(dummyRespData, structure !== null && structure !== void 0 ? structure : [], dbModule, devSettings, {
4948
4982
  assetParentId: (_f = props.id) !== null && _f !== void 0 ? _f : "",
4949
4983
  bucketName: (_g = devSettings.bucketName) !== null && _g !== void 0 ? _g : "",
@@ -4966,9 +5000,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4966
5000
  loadedSelectedData.current = JSON.parse(JSON.stringify(newRespData));
4967
5001
  if ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareReadHandleData)
4968
5002
  props.bareSettings.bareReadHandleData(newRespData);
4969
- if ((props.type === "update" || props.type === "read") &&
5003
+ if ((resolvedType === "update" || resolvedType === "read") &&
4970
5004
  props.id !== "new") {
4971
- (0, updateModule_1.handleRetrieveReferenceOptions)(newRespData, structure, dbModule, devSettings, setReferencesOptions, setReferencesDetails, props.type === "read");
5005
+ (0, updateModule_1.handleRetrieveReferenceOptions)(newRespData, structure, dbModule, devSettings, setReferencesOptions, setReferencesDetails, resolvedType === "read");
4972
5006
  }
4973
5007
  _k.label = 9;
4974
5008
  case 9:
@@ -6019,13 +6053,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6019
6053
  };
6020
6054
  var handleDeleteModal = function () {
6021
6055
  if ((selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) !== "feeds") {
6022
- if (props.type === "read" && isEditor && props.id && props.id !== "new") {
6056
+ if (resolvedType === "read" && isEditor && props.id && props.id !== "new") {
6023
6057
  setDeleteModal(true);
6024
6058
  }
6025
- else if (props.type === "update" && props.id) {
6059
+ else if (resolvedType === "update" && props.id) {
6026
6060
  setDeleteModal(true);
6027
6061
  }
6028
- else if (props.type === "list" &&
6062
+ else if (resolvedType === "list" &&
6029
6063
  (selectAll || selectedIds.length > 0)) {
6030
6064
  handleGenerateDeletePasscode();
6031
6065
  setDeleteModal(true);
@@ -6625,7 +6659,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6625
6659
  var renderStepBar = function (uniqueTabIds) {
6626
6660
  var _a, _b, _c, _d, _e, _f, _g, _h;
6627
6661
  var hasTabAlign = ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabAlign) || ((_b = props.space) === null || _b === void 0 ? void 0 : _b.tabAlign);
6628
- if (props.type !== "update")
6662
+ if (resolvedType !== "update")
6629
6663
  return null;
6630
6664
  // INFO: navigation only makes sense with more than one tab; the actions
6631
6665
  // are the same floating bar on every update form
@@ -6728,7 +6762,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6728
6762
  // carrying Update (or the caller's own component), Export PDF and Log
6729
6763
  var renderReadBar = function () {
6730
6764
  var _a, _b, _c, _d, _e, _f, _g, _h;
6731
- if (props.type !== "read")
6765
+ if (resolvedType !== "read")
6732
6766
  return null;
6733
6767
  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;
6734
6768
  var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
@@ -6938,6 +6972,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6938
6972
  react_1.default.createElement("p", { className: "text-md font-bold mb-1" }, "Authenticated Via : "),
6939
6973
  authList));
6940
6974
  };
6975
+ // INFO: the record is rendered by a NESTED DataTemplate with readDrawer
6976
+ // removed, so the inner instance takes the ordinary read branch and the
6977
+ // recursion terminates at one level. Everything else about it — the schema,
6978
+ // the endpoints, the roles — is this instance's own props, so a consumer
6979
+ // configures the table once and the panel inherits it.
6980
+ var renderReadDrawer = function () {
6981
+ var _a, _b, _c, _d;
6982
+ if (!isDrawerRead)
6983
+ return null;
6984
+ var _e = (_b = (_a = props.viewSettings) === null || _a === void 0 ? void 0 : _a.readDrawer) !== null && _b !== void 0 ? _b : {}, anchor = _e.anchor, maxWidth = _e.maxWidth, maxHeight = _e.maxHeight, desc = _e.desc, disableExpand = _e.disableExpand, title = _e.title;
6985
+ return (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg, testId: "dt-read-drawer", open: isDrawerHost, onClose: function () { 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, "list", ""); }, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl", maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : "75", title: title !== null && title !== void 0 ? title : (typeof props.title === "string" && props.title
6986
+ ? props.title
6987
+ : "Details"), desc: desc, expandable: !disableExpand, onExpand: function () { return setDrawerPageView(true); }, content: react_1.default.createElement(exports.DataTemplate, __assign({}, props, { id: drawerReadIdRef.current, type: "read",
6988
+ // INFO: strips the flag so the nested instance renders the record
6989
+ // rather than hosting another drawer
6990
+ viewSettings: undefined,
6991
+ // INFO: the panel header already names the record, and a
6992
+ // list/detail breadcrumb is meaningless while the list is still on
6993
+ // screen behind it
6994
+ title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign({
6995
+ // INFO: DetailList's stacked rows waste a panel this narrow —
6996
+ // compact puts label and value on one row. Overridable.
6997
+ bareCompactMode: true }, props.bareSettings), (isDrawerHost
6998
+ ? {}
6999
+ : { barePollingInterval: undefined, bareSocketName: undefined })) })) }));
7000
+ };
6941
7001
  var renderContent = function () {
6942
7002
  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;
6943
7003
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
@@ -6949,7 +7009,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6949
7009
  current: false,
6950
7010
  },
6951
7011
  ];
6952
- switch (props.type) {
7012
+ switch (resolvedType) {
6953
7013
  case "read":
6954
7014
  var anyAuthMethod = Object.values(authMethods).some(function (value) { return value; });
6955
7015
  var hasReadHeading = !!(props.title || props.description);
@@ -6978,13 +7038,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6978
7038
  hasReadHeading && (react_1.default.createElement("div", { className: "flex flex-col" },
6979
7039
  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)),
6980
7040
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
6981
- renderActionButtons(props.type))),
7041
+ renderActionButtons(resolvedType))),
6982
7042
  (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 })),
6983
7043
  ((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentPos) === "top" &&
6984
7044
  renderBareReadComp(),
6985
7045
  anyAuthMethod && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, renderAuthContent())),
6986
7046
  react_1.default.createElement("div", { ref: exportReadPDFRef },
6987
- !((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, props.type, viewType))),
7047
+ !((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType))),
6988
7048
  ((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareReadComponentPos) !== "top" &&
6989
7049
  renderBareReadComp()),
6990
7050
  renderReadBar()))));
@@ -7178,8 +7238,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7178
7238
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
7179
7239
  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)),
7180
7240
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
7181
- (!isBottom || hasTabAlign_1 || props.type === "update") &&
7182
- renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)),
7241
+ (!isBottom || hasTabAlign_1 || resolvedType === "update") &&
7242
+ renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)),
7183
7243
  hasTabAlign_1 ? (react_1.default.createElement("div", { className: "w-full ".concat(leftTabAlign
7184
7244
  ? "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5"
7185
7245
  : "") },
@@ -7221,12 +7281,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7221
7281
  !((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponentAbove) &&
7222
7282
  ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponent) &&
7223
7283
  ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent(selectedData))),
7224
- react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
7225
- react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
7284
+ react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
7285
+ react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
7226
7286
  renderStepBar(uniqueTabIds_2),
7227
7287
  isBottom &&
7228
- props.type !== "update" &&
7229
- renderActionButtons(props.type, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
7288
+ resolvedType !== "update" &&
7289
+ renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
7230
7290
  ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponentAbove) &&
7231
7291
  ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponent) &&
7232
7292
  ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent(selectedData)),
@@ -7235,14 +7295,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7235
7295
  !((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
7236
7296
  ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) &&
7237
7297
  ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponent(selectedData))),
7238
- react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
7239
- react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
7298
+ react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
7299
+ react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
7240
7300
  renderStepBar(uniqueTabIds_2)))));
7241
7301
  case "list":
7242
7302
  case "union":
7243
7303
  var filterComponent_1 = renderSearchContent();
7244
- var dataComponent = renderTabContent(tabs, props.type, viewType);
7245
- var actionComponent = renderActionButtons(props.type);
7304
+ var dataComponent = renderTabContent(tabs, resolvedType, viewType);
7305
+ var actionComponent = renderActionButtons(resolvedType);
7246
7306
  // INFO: Active flex filter count — used by both the filter icon badge and floating search bar
7247
7307
  var activeFlexFilterCount_1 = ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareFlexFilters)
7248
7308
  ? flexFilters.filter(function (eachFilter) {
@@ -7415,7 +7475,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7415
7475
  // INFO: bareUpdateActionBottom positions the read/update action bar. The list's own
7416
7476
  // create and offline-upload buttons stay in the filter row either way — they belong
7417
7477
  // with the controls they sit beside, not stranded below the table and pagination.
7418
- var actionBtns = renderActionButtons(props.type);
7478
+ var actionBtns = renderActionButtons(resolvedType);
7419
7479
  if (actionBtns)
7420
7480
  actionElementList.push(actionBtns);
7421
7481
  if (schemaPresent || ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.showExport)) {
@@ -7493,7 +7553,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7493
7553
  renderListActionElements())),
7494
7554
  renderListNewRowFilterElements(),
7495
7555
  (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 })),
7496
- renderTabContent(tabs, props.type, viewType),
7556
+ renderTabContent(tabs, resolvedType, viewType),
7497
7557
  ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
7498
7558
  ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareListMobileFloatingSearch) &&
7499
7559
  (0, listModule_1.renderFloatingMobileSearch)({
@@ -7536,7 +7596,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7536
7596
  axios: (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios,
7537
7597
  Transition: (_b = props === null || props === void 0 ? void 0 : props.lib) === null || _b === void 0 ? void 0 : _b.Transition,
7538
7598
  },
7539
- type: props.type,
7599
+ type: resolvedType,
7540
7600
  showId: showId,
7541
7601
  remainId: remainId,
7542
7602
  groupIdCollapsible: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.groupIdCollapsible,
@@ -7816,15 +7876,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7816
7876
  var tabs = [
7817
7877
  {
7818
7878
  id: "general",
7819
- name: props.type === "list" ? "Table View" : "Card View",
7820
- href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(props.type, "&collection=").concat(props.collectionId, "&view=general"),
7879
+ name: resolvedType === "list" ? "Table View" : "Card View",
7880
+ href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(resolvedType, "&collection=").concat(props.collectionId, "&view=general"),
7821
7881
  },
7822
7882
  ];
7823
7883
  if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) &&
7824
7884
  ((_b = props.organise.extendedTabs) === null || _b === void 0 ? void 0 : _b.length) > 0) {
7825
7885
  (_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs.map(function (eachTab) {
7826
7886
  var _a, _b, _c, _d, _e;
7827
- var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(props.type, "&collection=").concat(props.collectionId);
7887
+ var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(resolvedType, "&collection=").concat(props.collectionId);
7828
7888
  if (props.id)
7829
7889
  hrefPoint += "&data=".concat(props.id);
7830
7890
  var id = (0, utils_1.lowercaseTextToId)(eachTab.name);
@@ -7851,7 +7911,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7851
7911
  else {
7852
7912
  tabData["viewImage"] = eachTab.viewImage;
7853
7913
  }
7854
- if (eachTab.type === props.type) {
7914
+ if (eachTab.type === resolvedType) {
7855
7915
  tabs.push(__assign(__assign({}, tabData), (!((_e = props.edit) === null || _e === void 0 ? void 0 : _e.disabledTabsDeleteBtn) && {
7856
7916
  del: (react_1.default.createElement(outline_1.XMarkIcon, { className: "h-4 w-4 ml-2 self-center text-red-600 hover:text-red-400 ", onClick: function (e) {
7857
7917
  e.stopPropagation();
@@ -9084,7 +9144,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9084
9144
  } }))))));
9085
9145
  }
9086
9146
  else if (addTabModal) {
9087
- return (react_1.default.createElement(settingsModal_1.TabModal, { type: props.type, tabs: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.extendedTabs, onChangeTabs: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeTabs, model: structure, renderReferenceLabelOptions: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions, onClose: function () {
9147
+ return (react_1.default.createElement(settingsModal_1.TabModal, { type: resolvedType, tabs: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.extendedTabs, onChangeTabs: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeTabs, model: structure, renderReferenceLabelOptions: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions, onClose: function () {
9088
9148
  handlePopUpModal(false);
9089
9149
  } }));
9090
9150
  }
@@ -9122,13 +9182,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9122
9182
  setSelectedListAddress(value);
9123
9183
  }, delayInit: true })),
9124
9184
  react_1.default.createElement("div", { className: "flex justify-end pt-8" },
9125
- selectedObjectId && props.type !== "read" && (react_1.default.createElement(button_1.Button, { className: "mr-5", text: "Delete", type: "danger", onClick: function () { } })),
9126
- react_1.default.createElement(button_1.Button, { text: "".concat(props.type === "read" && !objectCellEdit ? "Close" : "Submit"), type: "normal", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
9185
+ selectedObjectId && resolvedType !== "read" && (react_1.default.createElement(button_1.Button, { className: "mr-5", text: "Delete", type: "danger", onClick: function () { } })),
9186
+ react_1.default.createElement(button_1.Button, { text: "".concat(resolvedType === "read" && !objectCellEdit ? "Close" : "Submit"), type: "normal", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
9127
9187
  var _a;
9128
9188
  return __generator(this, function (_b) {
9129
9189
  switch (_b.label) {
9130
9190
  case 0:
9131
- if (!(props.type === "update")) return [3 /*break*/, 2];
9191
+ if (!(resolvedType === "update")) return [3 /*break*/, 2];
9132
9192
  return [4 /*yield*/, ((_a = listAddressFromRef.current) === null || _a === void 0 ? void 0 : _a.handleSubmit())];
9133
9193
  case 1:
9134
9194
  _b.sent();
@@ -9219,7 +9279,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9219
9279
  return null;
9220
9280
  });
9221
9281
  if ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListObjectHandleData) {
9222
- var listObjectViewType = props.type === "read"
9282
+ var listObjectViewType = resolvedType === "read"
9223
9283
  ? "read"
9224
9284
  : selectedObjectId
9225
9285
  ? "update"
@@ -9232,13 +9292,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9232
9292
  : undefined)),
9233
9293
  react_1.default.createElement("div", { className: "flex justify-end pt-8" },
9234
9294
  filterObjectModel.type === "listObject" &&
9235
- props.type !== "read" && (react_1.default.createElement(button_1.Button, { className: "mr-5", text: "Delete", type: "danger", onClick: handleRemoveObjectListData })),
9236
- react_1.default.createElement(button_1.Button, { text: "".concat(props.type === "read" ? "Close" : "Submit"), type: "normal", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
9295
+ resolvedType !== "read" && (react_1.default.createElement(button_1.Button, { className: "mr-5", text: "Delete", type: "danger", onClick: handleRemoveObjectListData })),
9296
+ react_1.default.createElement(button_1.Button, { text: "".concat(resolvedType === "read" ? "Close" : "Submit"), type: "normal", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
9237
9297
  var _a;
9238
9298
  return __generator(this, function (_b) {
9239
9299
  switch (_b.label) {
9240
9300
  case 0:
9241
- if (!(props.type === "update" || objectCellEdit)) return [3 /*break*/, 2];
9301
+ if (!(resolvedType === "update" || objectCellEdit)) return [3 /*break*/, 2];
9242
9302
  return [4 /*yield*/, ((_a = objectFormRef.current) === null || _a === void 0 ? void 0 : _a.handleSubmit())];
9243
9303
  case 1:
9244
9304
  _b.sent();
@@ -9303,9 +9363,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9303
9363
  react_1.default.createElement("p", { className: "mt-2 mb-4" },
9304
9364
  "Are you sure you want to permanently delete",
9305
9365
  " ",
9306
- props.type === "list" && !deleteFeedId ? "these" : "this",
9366
+ resolvedType === "list" && !deleteFeedId ? "these" : "this",
9307
9367
  " data?"),
9308
- props.type === "list" && !deleteFeedId && (react_1.default.createElement(react_1.default.Fragment, null,
9368
+ resolvedType === "list" && !deleteFeedId && (react_1.default.createElement(react_1.default.Fragment, null,
9309
9369
  react_1.default.createElement("p", { className: "mb-2" },
9310
9370
  "Enter passcode",
9311
9371
  " ",
@@ -9323,7 +9383,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9323
9383
  deleteFeedId) {
9324
9384
  handleRemoveSelectedData();
9325
9385
  }
9326
- else if (props.type === "list") {
9386
+ else if (resolvedType === "list") {
9327
9387
  handleMultipleRemoveSelectedData();
9328
9388
  }
9329
9389
  else
@@ -9435,7 +9495,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9435
9495
  };
9436
9496
  return (react_1.default.createElement(react_1.default.Fragment, null,
9437
9497
  renderNotification("root"),
9438
- ((_54 = (_53 = props.renderSettings) === null || _53 === void 0 ? void 0 : _53.renderLoadingUI) === null || _54 === void 0 ? void 0 : _54.call(_53)) && loading ? ((_55 = props.renderSettings) === null || _55 === void 0 ? void 0 : _55.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.darkMode, darkModeBg: (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9498
+ ((_55 = (_54 = props.renderSettings) === null || _54 === void 0 ? void 0 : _54.renderLoadingUI) === null || _55 === void 0 ? void 0 : _55.call(_54)) && loading ? ((_56 = props.renderSettings) === null || _56 === void 0 ? void 0 : _56.renderLoadingUI()) : (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, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9439
9499
  var _a, _b;
9440
9500
  if (loading)
9441
9501
  return;
@@ -9446,7 +9506,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9446
9506
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9447
9507
  }
9448
9508
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9449
- react_1.default.createElement(modal_1.Modal, { darkMode: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkMode, darkModeBg: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9509
+ 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, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9450
9510
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9451
9511
  if (dataId) {
9452
9512
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9462,19 +9522,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9462
9522
  }, onClose: function () {
9463
9523
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9464
9524
  } }),
9465
- react_1.default.createElement(modal_1.Modal, { darkMode: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkMode, darkModeBg: (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9525
+ 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, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9466
9526
  setReferenceDeleteTableData({});
9467
9527
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9468
- react_1.default.createElement(modal_1.Modal, { darkMode: (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.darkMode, darkModeBg: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9528
+ 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: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9469
9529
  setDeletePasscodeInput("");
9470
9530
  setDeleteModal(!deleteModal);
9471
9531
  setDeleteFeedId("");
9472
9532
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9473
- react_1.default.createElement(modal_1.Modal, { darkMode: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkMode, darkModeBg: (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9533
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.darkMode, darkModeBg: (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9474
9534
  setBatchUpdateData({ columnId: "", columnData: {} });
9475
9535
  setBatchUpdateModal(false);
9476
9536
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9477
- react_1.default.createElement(modal_1.Modal, { darkMode: (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.darkMode, darkModeBg: (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9537
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.darkMode, darkModeBg: (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9478
9538
  var _a;
9479
9539
  if (props.space)
9480
9540
  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 }));
@@ -9482,16 +9542,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9482
9542
  }, onClose: function () {
9483
9543
  setSelectedAuthMethod("");
9484
9544
  } }),
9485
- isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.darkMode, darkModeBg: (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9545
+ isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.darkMode, darkModeBg: (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9486
9546
  var _a, _b;
9487
9547
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9488
9548
  ? props.title
9489
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: props.type === "read" ? ((_a = props.id) !== null && _a !== void 0 ? _a : "") : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog }));
9549
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_a = props.id) !== null && _a !== void 0 ? _a : "") : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog }));
9490
9550
  }, maxWidth: "4xl", onClose: function () {
9491
9551
  setActivityModal(false);
9492
9552
  setActivityId("");
9493
9553
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9494
9554
  renderContent(),
9555
+ renderReadDrawer(),
9495
9556
  renderScrollSentinel()));
9496
9557
  });
9497
9558
  //# sourceMappingURL=index.js.map