blixify-ui-web 1.2.90 → 1.2.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/advanced/collapse/index.d.ts +1 -0
- package/lib/components/advanced/collapse/index.d.ts.map +1 -1
- package/lib/components/advanced/collapse/index.js +4 -1
- package/lib/components/advanced/collapse/index.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +2 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +322 -205
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -1
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts +8 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +41 -3
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +23 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +13 -0
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/readQuery/index.d.ts +12 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -1
- package/lib/components/data/readQuery/index.js +2 -0
- package/lib/components/data/readQuery/index.js.map +1 -1
- package/lib/components/data/readQueryHoc/index.d.ts.map +1 -1
- package/lib/components/data/readQueryHoc/index.js +7 -0
- package/lib/components/data/readQueryHoc/index.js.map +1 -1
- package/lib/components/display/filePreview/index.d.ts +54 -0
- package/lib/components/display/filePreview/index.d.ts.map +1 -0
- package/lib/components/display/filePreview/index.js +120 -0
- package/lib/components/display/filePreview/index.js.map +1 -0
- package/lib/components/display/newList/index.d.ts +3 -2
- package/lib/components/display/newList/index.d.ts.map +1 -1
- package/lib/components/display/newList/index.js +1 -1
- package/lib/components/display/newList/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +4 -2
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +30 -2
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/tag/index.d.ts +2 -1
- package/lib/components/display/tag/index.d.ts.map +1 -1
- package/lib/components/display/tag/index.js.map +1 -1
- package/lib/components/display/tag/utils.d.ts +5 -0
- package/lib/components/display/tag/utils.d.ts.map +1 -1
- package/lib/components/display/tag/utils.js +5 -0
- package/lib/components/display/tag/utils.js.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +7 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/markdown/index.d.ts +9 -0
- package/lib/components/input/markdown/index.d.ts.map +1 -1
- package/lib/components/input/markdown/index.js +198 -3
- package/lib/components/input/markdown/index.js.map +1 -1
- package/lib/components/navigation/tabs/index.d.ts +2 -0
- package/lib/components/navigation/tabs/index.d.ts.map +1 -1
- package/lib/components/navigation/tabs/index.js +11 -2
- package/lib/components/navigation/tabs/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -92,6 +92,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
92
92
|
exports.DataTemplate = void 0;
|
|
93
93
|
var outline_1 = require("@heroicons/react/24/outline");
|
|
94
94
|
var HeroIcons = __importStar(require("@heroicons/react/24/solid"));
|
|
95
|
+
// INFO: the outline bookmark, for a tab that is not the default one. HeroIcons
|
|
96
|
+
// above is the solid set.
|
|
97
|
+
var BookmarkIcon_1 = __importDefault(require("@heroicons/react/24/outline/BookmarkIcon"));
|
|
95
98
|
var solid_1 = require("@heroicons/react/24/solid");
|
|
96
99
|
var html2canvas_1 = __importDefault(require("html2canvas"));
|
|
97
100
|
var jspdf_1 = __importDefault(require("jspdf"));
|
|
@@ -132,6 +135,7 @@ var textInput_1 = require("../../input/textInput");
|
|
|
132
135
|
var uploadInput_1 = require("../../input/uploadInput");
|
|
133
136
|
var bars_1 = require("../../navigation/bars");
|
|
134
137
|
var breadcrumb_1 = require("../../navigation/breadcrumb");
|
|
138
|
+
var filePreview_1 = require("../../display/filePreview");
|
|
135
139
|
var tabs_1 = require("../../navigation/tabs");
|
|
136
140
|
var link_1 = require("../../structure/link");
|
|
137
141
|
var authModule_1 = require("../authModule");
|
|
@@ -194,10 +198,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
194
198
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
195
199
|
// most in effect dependency arrays — following props.type there would leave
|
|
196
200
|
// 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, _71;
|
|
201
|
+
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, _71, _72, _73, _74, _75, _76, _77, _78;
|
|
198
202
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
199
203
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
200
|
-
var
|
|
204
|
+
var _79 = (0, react_1.useState)(false), drawerPageView = _79[0], setDrawerPageView = _79[1];
|
|
201
205
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
202
206
|
// live props. Without this, navigating back to the list would re-render the
|
|
203
207
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -279,16 +283,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
279
283
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
280
284
|
};
|
|
281
285
|
};
|
|
282
|
-
var
|
|
286
|
+
var _80 = intialiseDefaultFilterValues(), initialFilterSearch = _80.initialFilterSearch, initialFilterSearchParams = _80.initialFilterSearchParams, initialFilterSelection = _80.initialFilterSelection, initialFilterReference = _80.initialFilterReference, initialFilterReferenceDate = _80.initialFilterReferenceDate;
|
|
283
287
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
284
|
-
var
|
|
288
|
+
var _81 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
285
289
|
mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
|
|
286
290
|
collectionId: props.collectionId,
|
|
287
291
|
persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
|
|
288
292
|
type: resolvedType,
|
|
289
|
-
}), persistedState =
|
|
290
|
-
var
|
|
291
|
-
var
|
|
293
|
+
}), persistedState = _81.persistedState, isPersistEnabled = _81.isEnabled, handleSaveView = _81.handleSaveView;
|
|
294
|
+
var _82 = (0, react_1.useState)(false), loading = _82[0], setLoading = _82[1];
|
|
295
|
+
var _83 = (0, react_1.useState)(), notification = _83[0], setNotification = _83[1];
|
|
292
296
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
293
297
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
294
298
|
(0, react_1.useEffect)(function () {
|
|
@@ -298,53 +302,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
298
302
|
return function () { return clearTimeout(timer); };
|
|
299
303
|
}, [notification]);
|
|
300
304
|
//INFO : Used by List
|
|
301
|
-
var
|
|
302
|
-
var
|
|
303
|
-
var
|
|
304
|
-
var
|
|
305
|
-
var
|
|
306
|
-
var
|
|
307
|
-
var
|
|
305
|
+
var _84 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _84[0], setFilterSearch = _84[1];
|
|
306
|
+
var _85 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _85[0], setFilterSearchParams = _85[1];
|
|
307
|
+
var _86 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _86[0], setFilterSelection = _86[1];
|
|
308
|
+
var _87 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _87[0], setFilterReference = _87[1];
|
|
309
|
+
var _88 = (0, react_1.useState)({}), filterReferenceSearch = _88[0], setFilterReferenceSearch = _88[1];
|
|
310
|
+
var _89 = (0, react_1.useState)({}), filterReferenceList = _89[0], setFilterReferenceList = _89[1];
|
|
311
|
+
var _90 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
308
312
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
309
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
310
|
-
var
|
|
311
|
-
var
|
|
312
|
-
var
|
|
313
|
-
var
|
|
314
|
-
var
|
|
315
|
-
var
|
|
316
|
-
var
|
|
317
|
-
var
|
|
318
|
-
var
|
|
319
|
-
var
|
|
320
|
-
var
|
|
321
|
-
var
|
|
313
|
+
: initialFilterReferenceDate), filterReferenceDate = _90[0], setFilterReferenceDate = _90[1];
|
|
314
|
+
var _91 = (0, react_1.useState)(true), tableLoading = _91[0], setTableLoading = _91[1];
|
|
315
|
+
var _92 = (0, react_1.useState)(""), cursor = _92[0], setCursor = _92[1];
|
|
316
|
+
var _93 = (0, react_1.useState)(""), lastCursor = _93[0], setLastCursor = _93[1];
|
|
317
|
+
var _94 = (0, react_1.useState)([]), tableData = _94[0], setTableData = _94[1];
|
|
318
|
+
var _95 = (0, react_1.useState)([]), spaceTableData = _95[0], setSpaceTableData = _95[1];
|
|
319
|
+
var _96 = (0, react_1.useState)(0), size = _96[0], setSize = _96[1];
|
|
320
|
+
var _97 = (0, react_1.useState)((_k = (_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _h !== void 0 ? _h : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.pageIndex) !== null && _k !== void 0 ? _k : 0), pageIndex = _97[0], setPageIndex = _97[1];
|
|
321
|
+
var _98 = (0, react_1.useState)([]), selectedIds = _98[0], setSelectedIds = _98[1];
|
|
322
|
+
var _99 = (0, react_1.useState)(false), selectAll = _99[0], setSelectAll = _99[1];
|
|
323
|
+
var _100 = (0, react_1.useState)(""), deletePasscode = _100[0], setDeletePasscode = _100[1];
|
|
324
|
+
var _101 = (0, react_1.useState)(""), deletePasscodeInput = _101[0], setDeletePasscodeInput = _101[1];
|
|
325
|
+
var _102 = (0, react_1.useState)(""), deleteFeedId = _102[0], setDeleteFeedId = _102[1];
|
|
322
326
|
//INFO : Used by List Organise
|
|
323
327
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
324
328
|
// persistViewState is enabled and a persisted sort exists
|
|
325
|
-
var
|
|
326
|
-
var
|
|
327
|
-
var
|
|
329
|
+
var _103 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _103[0], setPersistedSort = _103[1];
|
|
330
|
+
var _104 = (0, react_1.useState)(false), filterDraft = _104[0], setFilterDraft = _104[1];
|
|
331
|
+
var _105 = (0, react_1.useState)(false), addTabModal = _105[0], setAddTabModal = _105[1];
|
|
328
332
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
329
333
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
330
|
-
var
|
|
334
|
+
var _106 = (0, react_1.useState)(function () {
|
|
331
335
|
var _a, _b;
|
|
332
336
|
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 =
|
|
334
|
-
var
|
|
337
|
+
}), selectedTab = _106[0], setSelectedTab = _106[1];
|
|
338
|
+
var _107 = (0, react_1.useState)("dayGridMonth"), calendarView = _107[0], setCalendarView = _107[1];
|
|
335
339
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
336
340
|
// (calendarView above drives the matching range query)
|
|
337
|
-
var
|
|
338
|
-
var
|
|
339
|
-
var
|
|
340
|
-
var
|
|
341
|
-
var
|
|
342
|
-
var
|
|
343
|
-
var
|
|
341
|
+
var _108 = (0, react_1.useState)("month"), newCalendarViewMode = _108[0], setNewCalendarViewMode = _108[1];
|
|
342
|
+
var _109 = (0, react_1.useState)(new Date()), calendarTabMonth = _109[0], setCalendarTabMonth = _109[1];
|
|
343
|
+
var _110 = (0, react_1.useState)(true), kanbanDroppable = _110[0], setKanbanDroppable = _110[1];
|
|
344
|
+
var _111 = (0, react_1.useState)([]), kanbanOptions = _111[0], setKanbanOptions = _111[1];
|
|
345
|
+
var _112 = (0, react_1.useState)(false), queryForm = _112[0], setQueryForm = _112[1];
|
|
346
|
+
var _113 = (0, react_1.useState)(false), batchUpdateModal = _113[0], setBatchUpdateModal = _113[1];
|
|
347
|
+
var _114 = (0, react_1.useState)({
|
|
344
348
|
columnId: "",
|
|
345
349
|
columnData: {},
|
|
346
|
-
}), batchUpdateData =
|
|
347
|
-
var
|
|
350
|
+
}), batchUpdateData = _114[0], setBatchUpdateData = _114[1];
|
|
351
|
+
var _115 = (0, react_1.useState)(function () {
|
|
348
352
|
var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
|
|
349
353
|
if (!persistedState)
|
|
350
354
|
return baseModel;
|
|
@@ -370,8 +374,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
370
374
|
});
|
|
371
375
|
}
|
|
372
376
|
return model;
|
|
373
|
-
}), structure =
|
|
374
|
-
var
|
|
377
|
+
}), structure = _115[0], setStructure = _115[1];
|
|
378
|
+
var _116 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _116[0], setAdditionalQuery = _116[1];
|
|
375
379
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
376
380
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
377
381
|
var defaultFlexFilterRow = [
|
|
@@ -382,109 +386,109 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
382
386
|
value: undefined,
|
|
383
387
|
},
|
|
384
388
|
];
|
|
385
|
-
var
|
|
389
|
+
var _117 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
386
390
|
? persistedState.flexFilters
|
|
387
|
-
: defaultFlexFilterRow), flexFilters =
|
|
391
|
+
: defaultFlexFilterRow), flexFilters = _117[0], setFlexFilters = _117[1];
|
|
388
392
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
389
393
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
390
|
-
var
|
|
394
|
+
var _118 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
391
395
|
? persistedState.flexFilters
|
|
392
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
396
|
-
var
|
|
396
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _118[0], setFlexFiltersDebounced = _118[1];
|
|
397
|
+
var _119 = (0, react_1.useState)({}), flexFilterReferenceOptions = _119[0], setFlexFilterReferenceOptions = _119[1];
|
|
398
|
+
var _120 = (0, react_1.useState)({}), flexFilterReferenceSearch = _120[0], setFlexFilterReferenceSearch = _120[1];
|
|
399
|
+
var _121 = (0, react_1.useState)(false), flexFilterModalOpen = _121[0], setFlexFilterModalOpen = _121[1];
|
|
400
|
+
var _122 = (0, react_1.useState)(false), viewSettingsModalOpen = _122[0], setViewSettingsModalOpen = _122[1];
|
|
397
401
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
398
402
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
399
403
|
// structure to props.model whenever props change, which would wipe the
|
|
400
404
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
401
405
|
// structure — writing user hides there would blur the two concepts.
|
|
402
|
-
var
|
|
403
|
-
var
|
|
404
|
-
var
|
|
406
|
+
var _123 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _123[0], setUserHiddenColumnIds = _123[1];
|
|
407
|
+
var _124 = (0, react_1.useState)(""), columnSearch = _124[0], setColumnSearch = _124[1];
|
|
408
|
+
var _125 = (0, react_1.useState)(null), draggingColumnId = _125[0], setDraggingColumnId = _125[1];
|
|
405
409
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
406
410
|
//INFO : Used by Auth
|
|
407
|
-
var
|
|
411
|
+
var _126 = (0, react_1.useState)({
|
|
408
412
|
email: "",
|
|
409
413
|
google: "",
|
|
410
414
|
phone: "",
|
|
411
415
|
disabled: false,
|
|
412
416
|
create: false,
|
|
413
|
-
}), authMethods =
|
|
414
|
-
var
|
|
417
|
+
}), authMethods = _126[0], setAuthMethods = _126[1];
|
|
418
|
+
var _127 = (0, react_1.useState)(""), selectedAuthMethod = _127[0], setSelectedAuthMethod = _127[1];
|
|
415
419
|
// INFO: Used by Activity Log
|
|
416
|
-
var
|
|
417
|
-
var
|
|
420
|
+
var _128 = (0, react_1.useState)(false), activityModal = _128[0], setActivityModal = _128[1];
|
|
421
|
+
var _129 = (0, react_1.useState)(""), activityId = _129[0], setActivityId = _129[1];
|
|
418
422
|
//INFO : Used by Export
|
|
419
|
-
var
|
|
420
|
-
var
|
|
421
|
-
var
|
|
422
|
-
var
|
|
423
|
-
var
|
|
424
|
-
var
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
var
|
|
432
|
-
var
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
423
|
+
var _130 = (0, react_1.useState)(null), csvFile = _130[0], setCSVFile = _130[1];
|
|
424
|
+
var _131 = (0, react_1.useState)([]), csvFileData = _131[0], setCSVFileData = _131[1];
|
|
425
|
+
var _132 = (0, react_1.useState)(0), stepCSVIndex = _132[0], setStepCSVIndex = _132[1];
|
|
426
|
+
var _133 = (0, react_1.useState)({}), listCSVMapAttribute = _133[0], setListCSVMapAttribute = _133[1];
|
|
427
|
+
var _134 = (0, react_1.useState)({}), listCSVObjAttribute = _134[0], setListCSVObjAttribute = _134[1];
|
|
428
|
+
var _135 = (0, react_1.useState)([]), csvAPIAttribute = _135[0], setCSVAPIAttribute = _135[1];
|
|
429
|
+
var _136 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _136[0], setExportCSVEmail = _136[1];
|
|
430
|
+
var _137 = (0, react_1.useState)(((_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.defaultExportPDFName) || ""), exportPDFTitle = _137[0], setExportPDFTitle = _137[1];
|
|
431
|
+
var _138 = (0, react_1.useState)(false), exportPDFLoading = _138[0], setExportPDFLoading = _138[1];
|
|
432
|
+
var _139 = (0, react_1.useState)(false), exportReadPDFLoading = _139[0], setExportReadPDFLoading = _139[1];
|
|
433
|
+
var _140 = (0, react_1.useState)((_u = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.sumColumnId) !== null && _u !== void 0 ? _u : []), exportSumAttributeIds = _140[0], setExportSumAttributeIds = _140[1];
|
|
434
|
+
var _141 = (0, react_1.useState)((_x = (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.hideSubItems) !== null && _x !== void 0 ? _x : false), hideSubItems = _141[0], setHideSubItems = _141[1];
|
|
435
|
+
var _142 = (0, react_1.useState)([]), importTableData = _142[0], setImportTableData = _142[1];
|
|
436
|
+
var _143 = (0, react_1.useState)([]), queryList = _143[0], setQueryList = _143[1];
|
|
437
|
+
var _144 = (0, react_1.useState)(undefined), allQueryList = _144[0], setAllQueryList = _144[1];
|
|
438
|
+
var _145 = (0, react_1.useState)(-1), queryIndex = _145[0], setQueryIndex = _145[1];
|
|
439
|
+
var _146 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _146[0], setGroupId = _146[1];
|
|
440
|
+
var _147 = (0, react_1.useState)(""), readTabSection = _147[0], setReadTabSection = _147[1];
|
|
441
|
+
var _148 = (0, react_1.useState)(false), readFloatingNav = _148[0], setReadFloatingNav = _148[1];
|
|
438
442
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
439
443
|
//INFO : Used by Read
|
|
440
444
|
//INFO : Used by Update
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
var
|
|
444
|
-
var
|
|
445
|
-
var
|
|
446
|
-
var
|
|
447
|
-
var
|
|
445
|
+
var _149 = (0, react_1.useState)(false), modalVisible = _149[0], setModalVisible = _149[1];
|
|
446
|
+
var _150 = (0, react_1.useState)(false), deleteModal = _150[0], setDeleteModal = _150[1];
|
|
447
|
+
var _151 = (0, react_1.useState)(false), excelModal = _151[0], setExcelModal = _151[1];
|
|
448
|
+
var _152 = (0, react_1.useState)(false), exportExcel = _152[0], setExportExcel = _152[1];
|
|
449
|
+
var _153 = (0, react_1.useState)(""), exportType = _153[0], setExportType = _153[1];
|
|
450
|
+
var _154 = (0, react_1.useState)(false), exportQR = _154[0], setExportQR = _154[1];
|
|
451
|
+
var _155 = (0, react_1.useState)(function () {
|
|
448
452
|
var _a, _b;
|
|
449
453
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
450
454
|
return firstTabId;
|
|
451
|
-
}), activeTab =
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var
|
|
457
|
-
var
|
|
458
|
-
var
|
|
455
|
+
}), activeTab = _155[0], setActiveTab = _155[1];
|
|
456
|
+
var _156 = (0, react_1.useState)(false), signatureSigning = _156[0], setSignatureSigning = _156[1];
|
|
457
|
+
var _157 = (0, react_1.useState)({}), selectedData = _157[0], setSelectedData = _157[1];
|
|
458
|
+
var _158 = (0, react_1.useState)(""), selectedObjectStructureId = _158[0], setSelectedObjectStructureId = _158[1];
|
|
459
|
+
var _159 = (0, react_1.useState)(""), selectedObjectId = _159[0], setSelectedObjectId = _159[1];
|
|
460
|
+
var _160 = (0, react_1.useState)(""), selectedListAddressId = _160[0], setSelectedListAddressId = _160[1];
|
|
461
|
+
var _161 = (0, react_1.useState)(-1), selectedListAddressIndex = _161[0], setSelectedListAddressIndex = _161[1];
|
|
462
|
+
var _162 = (0, react_1.useState)({
|
|
459
463
|
lat: 0,
|
|
460
464
|
lng: 0,
|
|
461
465
|
name: "",
|
|
462
|
-
}), selectedListAddress =
|
|
463
|
-
var
|
|
464
|
-
var
|
|
465
|
-
var
|
|
466
|
-
var
|
|
467
|
-
var
|
|
468
|
-
var
|
|
469
|
-
var
|
|
470
|
-
var
|
|
471
|
-
var
|
|
466
|
+
}), selectedListAddress = _162[0], setSelectedListAddress = _162[1];
|
|
467
|
+
var _163 = (0, react_1.useState)({}), selectedObjectData = _163[0], setSelectedObjectData = _163[1];
|
|
468
|
+
var _164 = (0, react_1.useState)(null), objectCellEdit = _164[0], setObjectCellEdit = _164[1];
|
|
469
|
+
var _165 = (0, react_1.useState)(false), referenceLoading = _165[0], setReferenceLoading = _165[1];
|
|
470
|
+
var _166 = (0, react_1.useState)({}), referencesOptions = _166[0], setReferencesOptions = _166[1];
|
|
471
|
+
var _167 = (0, react_1.useState)({}), referencesDetails = _167[0], setReferencesDetails = _167[1];
|
|
472
|
+
var _168 = (0, react_1.useState)({}), listReferencesOptions = _168[0], setListReferencesOptions = _168[1];
|
|
473
|
+
var _169 = (0, react_1.useState)({}), referenceDeleteTableData = _169[0], setReferenceDeleteTableData = _169[1];
|
|
474
|
+
var _170 = (0, react_1.useState)(0), referenceDeleteIndex = _170[0], setReferenceDeleteIndex = _170[1];
|
|
475
|
+
var _171 = (0, react_1.useState)({
|
|
472
476
|
id: "",
|
|
473
477
|
name: "",
|
|
474
478
|
type: "string",
|
|
475
|
-
}), referenceCreationModal =
|
|
476
|
-
var
|
|
477
|
-
var
|
|
479
|
+
}), referenceCreationModal = _171[0], setReferenceCreationModal = _171[1];
|
|
480
|
+
var _172 = (0, react_1.useState)({}), referenceModelSchema = _172[0], setReferenceSchema = _172[1];
|
|
481
|
+
var _173 = (0, react_1.useState)([]), kanbanChecked = _173[0], setKanbanChecked = _173[1];
|
|
478
482
|
//INFO : Offline
|
|
479
|
-
var
|
|
480
|
-
var
|
|
483
|
+
var _174 = (0, react_1.useState)(0), offlineDataLength = _174[0], setOfflineDataLength = _174[1];
|
|
484
|
+
var _175 = (0, react_1.useState)(false), offlineModal = _175[0], setOfflineModal = _175[1];
|
|
481
485
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
482
|
-
var
|
|
483
|
-
var
|
|
486
|
+
var _176 = (0, react_1.useState)(false), isLive = _176[0], setIsLive = _176[1];
|
|
487
|
+
var _177 = (0, react_1.useState)(false), isLiveOffline = _177[0], setIsLiveOffline = _177[1];
|
|
484
488
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
485
489
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
486
490
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
487
|
-
var
|
|
491
|
+
var _178 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _178[0], setIsNetworkOffline = _178[1];
|
|
488
492
|
var previousType = (0, react_1.useRef)(null);
|
|
489
493
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
490
494
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -494,6 +498,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
494
498
|
// Intentionally separate from previousSelectedData, which advances on every
|
|
495
499
|
// edit and therefore cannot serve as a stable submit baseline.
|
|
496
500
|
var loadedSelectedData = (0, react_1.useRef)(null);
|
|
501
|
+
// INFO: untouched DB doc for the current read record
|
|
502
|
+
var rawReadData = (0, react_1.useRef)(null);
|
|
497
503
|
// INFO: live-stream SSE client — created on mount when bareSocketName is set
|
|
498
504
|
var socketClientRef = (0, react_1.useRef)(null);
|
|
499
505
|
// INFO: always-current ref for handleApplyEnvelope — updated on every render
|
|
@@ -564,59 +570,86 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
564
570
|
var isSubmittingRef = (0, react_1.useRef)(false);
|
|
565
571
|
var devSettings = props.devSettings;
|
|
566
572
|
var serverId = (0, utils_1.parseServerId)(devSettings.server);
|
|
567
|
-
|
|
573
|
+
/**
|
|
574
|
+
* INFO: which CONTENT renders — the tab highlight is selectedTab, and these
|
|
575
|
+
* are resolved separately. So a pinned tab has to be honoured here too, or
|
|
576
|
+
* the tab bar opens on Documents while the table renders underneath it.
|
|
577
|
+
*
|
|
578
|
+
* viewId still wins when present: it is a deliberate destination, from a
|
|
579
|
+
* shared link or a back button.
|
|
580
|
+
*/
|
|
581
|
+
var defaultTabName = (_1 = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.extendedTabs) === null || _0 === void 0 ? void 0 : _0.find(function (eachTab) { return eachTab.defaultTab; })) === null || _1 === void 0 ? void 0 : _1.name;
|
|
582
|
+
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
583
|
+
// record is open resolved the read view to a list tab, which renderTabContent
|
|
584
|
+
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
585
|
+
var viewType = (_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.viewId) !== null && _3 !== void 0 ? _3 : (resolvedType === "list" && defaultTabName
|
|
586
|
+
? (0, utils_1.lowercaseTextToId)(defaultTabName)
|
|
587
|
+
: "general");
|
|
568
588
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
569
589
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
570
|
-
var dbModule = isFirebaseClient ? (
|
|
590
|
+
var dbModule = isFirebaseClient ? (_4 = props.lib) === null || _4 === void 0 ? void 0 : _4.firebase : (_5 = props.lib) === null || _5 === void 0 ? void 0 : _5.axios;
|
|
571
591
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
572
592
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
573
593
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
574
|
-
var isViewSettingsEnabled = ((
|
|
594
|
+
var isViewSettingsEnabled = ((_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareViewSettings) || ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareNewDTW)
|
|
575
595
|
? true
|
|
576
596
|
: false;
|
|
577
597
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
578
598
|
// (Space, Sun Luan) — toggling writes to the model and calls back. Without it
|
|
579
599
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
580
|
-
var isSchemaHideMode = ((
|
|
600
|
+
var isSchemaHideMode = ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.onChangeHide) ? true : false;
|
|
581
601
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
582
602
|
// the persisted value and falls back to the consumer's limit
|
|
583
|
-
var
|
|
603
|
+
var _179 = (0, react_1.useState)((_10 = (_9 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _9 !== void 0 ? _9 : props.limit) !== null && _10 !== void 0 ? _10 : 10), pageLimit = _179[0], setPageLimit = _179[1];
|
|
584
604
|
var limit = pageLimit;
|
|
585
|
-
var activeSortId = (isPersistEnabled && persistedSort) || ((
|
|
605
|
+
var activeSortId = (isPersistEnabled && persistedSort) || ((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.sort);
|
|
586
606
|
var handleSortColumn = function (value) {
|
|
587
607
|
var _a, _b;
|
|
588
608
|
if (isPersistEnabled)
|
|
589
609
|
setPersistedSort(value);
|
|
590
610
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
591
611
|
};
|
|
592
|
-
var isEditor = ((
|
|
593
|
-
var isOffline = (
|
|
612
|
+
var isEditor = ((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.allEditable) ? true : false;
|
|
613
|
+
var isOffline = (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareOffline;
|
|
594
614
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
595
615
|
// the live network state — online saves go to the server even if bareOffline
|
|
596
616
|
// is true, offline saves go to IDB as normal.
|
|
597
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
598
|
-
var showId = (
|
|
617
|
+
var isOfflineNetworkListener = isOffline && ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareOfflineNetworkListener);
|
|
618
|
+
var showId = (_15 = props.space) === null || _15 === void 0 ? void 0 : _15.showId;
|
|
599
619
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
600
|
-
var idField = ((
|
|
601
|
-
var pipeline = (
|
|
602
|
-
if ((
|
|
620
|
+
var idField = ((_16 = props.space) === null || _16 === void 0 ? void 0 : _16.idField) || ((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.idField);
|
|
621
|
+
var pipeline = (_18 = props === null || props === void 0 ? void 0 : props.space) === null || _18 === void 0 ? void 0 : _18.pipeline;
|
|
622
|
+
if ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareListPipeline) {
|
|
603
623
|
pipeline = pipeline
|
|
604
624
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
605
625
|
}
|
|
606
|
-
|
|
626
|
+
/**
|
|
627
|
+
* INFO: the column a file tab lists, or undefined for every other view.
|
|
628
|
+
*
|
|
629
|
+
* Resolved from viewType — the SAME selector the content uses — and not from
|
|
630
|
+
* selectedTab. The two are separate pieces of state and can disagree, and
|
|
631
|
+
* when they did the query lost its unwind while the file grid still rendered:
|
|
632
|
+
* three records came back instead of five files, and each tile received the
|
|
633
|
+
* whole array rather than one file, so every one of them read "Attachment".
|
|
634
|
+
*/
|
|
635
|
+
var fileViewColumnId = (_23 = (_22 = ((_21 = (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.extendedTabs) !== null && _21 !== void 0 ? _21 : []).find(function (eachTab) {
|
|
636
|
+
return eachTab.viewType === "file" &&
|
|
637
|
+
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
638
|
+
})) === null || _22 === void 0 ? void 0 : _22.fileSettings) === null || _23 === void 0 ? void 0 : _23.columnId;
|
|
639
|
+
var hasNavigation = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.handleNavigate) ? true : false;
|
|
607
640
|
var formColumn = "grid-cols-12";
|
|
608
|
-
var useMobileView = (
|
|
641
|
+
var useMobileView = (_26 = (_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateMobileView) !== null && _26 !== void 0 ? _26 : false;
|
|
609
642
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
610
|
-
var isActivityLog = (((
|
|
611
|
-
((
|
|
612
|
-
(((
|
|
613
|
-
((
|
|
614
|
-
var customPaginationSize = ((
|
|
643
|
+
var isActivityLog = (((_28 = (_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.activityLog) === null || _28 === void 0 ? void 0 : _28.enableComments) &&
|
|
644
|
+
((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.activityLog.commentCollectionId)) ||
|
|
645
|
+
(((_31 = (_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.activityLog) === null || _31 === void 0 ? void 0 : _31.enableLogs) &&
|
|
646
|
+
((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.activityLog.logsCollectionId));
|
|
647
|
+
var customPaginationSize = ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.customPaginationCount)
|
|
615
648
|
? props.organise.customPaginationCount(size)
|
|
616
649
|
: undefined;
|
|
617
650
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
618
651
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
619
|
-
dbModule: (
|
|
652
|
+
dbModule: (_34 = props.lib) === null || _34 === void 0 ? void 0 : _34.axios,
|
|
620
653
|
dbType: devSettings.server,
|
|
621
654
|
dbCollection: props.collectionId,
|
|
622
655
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -624,7 +657,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
624
657
|
dbUserToken: devSettings.dbUserToken,
|
|
625
658
|
});
|
|
626
659
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
627
|
-
dbModule: (
|
|
660
|
+
dbModule: (_35 = props.lib) === null || _35 === void 0 ? void 0 : _35.axios,
|
|
628
661
|
dbType: devSettings.server,
|
|
629
662
|
dbCollection: props.collectionId,
|
|
630
663
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -632,9 +665,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
632
665
|
dbUserToken: devSettings.dbUserToken,
|
|
633
666
|
});
|
|
634
667
|
var moreButtonPopUp = [
|
|
635
|
-
((
|
|
668
|
+
((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) &&
|
|
636
669
|
!isFirebase &&
|
|
637
|
-
!((
|
|
670
|
+
!((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.exportSettings) === null || _38 === void 0 ? void 0 : _38.hideImportCSV)
|
|
638
671
|
? {
|
|
639
672
|
text: "Import Excel",
|
|
640
673
|
onClick: function () {
|
|
@@ -643,7 +676,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
643
676
|
},
|
|
644
677
|
}
|
|
645
678
|
: null,
|
|
646
|
-
!((
|
|
679
|
+
!((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.exportSettings) === null || _40 === void 0 ? void 0 : _40.hideExportCSV)
|
|
647
680
|
? {
|
|
648
681
|
text: "Export CSV",
|
|
649
682
|
onClick: function () {
|
|
@@ -653,7 +686,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
653
686
|
},
|
|
654
687
|
}
|
|
655
688
|
: null,
|
|
656
|
-
!((
|
|
689
|
+
!((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.exportSettings) === null || _42 === void 0 ? void 0 : _42.hideExportExcel)
|
|
657
690
|
? {
|
|
658
691
|
text: "Export Excel",
|
|
659
692
|
onClick: function () {
|
|
@@ -663,7 +696,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
663
696
|
},
|
|
664
697
|
}
|
|
665
698
|
: null,
|
|
666
|
-
!((
|
|
699
|
+
!((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.exportSettings) === null || _44 === void 0 ? void 0 : _44.hideExportPDF)
|
|
667
700
|
? {
|
|
668
701
|
text: "Export PDF",
|
|
669
702
|
onClick: function () {
|
|
@@ -673,7 +706,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
673
706
|
},
|
|
674
707
|
}
|
|
675
708
|
: null,
|
|
676
|
-
!((
|
|
709
|
+
!((_46 = (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.exportSettings) === null || _46 === void 0 ? void 0 : _46.hideExportQR)
|
|
677
710
|
? {
|
|
678
711
|
text: "Export QR",
|
|
679
712
|
onClick: function () {
|
|
@@ -683,7 +716,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
683
716
|
},
|
|
684
717
|
}
|
|
685
718
|
: null,
|
|
686
|
-
!((
|
|
719
|
+
!((_48 = (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.exportSettings) === null || _48 === void 0 ? void 0 : _48.hideExportQR)
|
|
687
720
|
? {
|
|
688
721
|
text: "Export QR(Data)",
|
|
689
722
|
onClick: function () {
|
|
@@ -693,7 +726,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
693
726
|
},
|
|
694
727
|
}
|
|
695
728
|
: null,
|
|
696
|
-
!((
|
|
729
|
+
!((_50 = (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.exportSettings) === null || _50 === void 0 ? void 0 : _50.hideExportPrint)
|
|
697
730
|
? {
|
|
698
731
|
text: "Print",
|
|
699
732
|
onClick: function () {
|
|
@@ -703,7 +736,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
703
736
|
},
|
|
704
737
|
}
|
|
705
738
|
: null,
|
|
706
|
-
!((
|
|
739
|
+
!((_52 = (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.exportSettings) === null || _52 === void 0 ? void 0 : _52.hideExportDraft)
|
|
707
740
|
? {
|
|
708
741
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
709
742
|
onClick: function () {
|
|
@@ -712,7 +745,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
712
745
|
}
|
|
713
746
|
: null,
|
|
714
747
|
].filter(Boolean);
|
|
715
|
-
if ((
|
|
748
|
+
if ((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.moreSettings)
|
|
716
749
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
717
750
|
//=====================================================================================
|
|
718
751
|
//SECTION: User Column Visibility Handlers
|
|
@@ -998,7 +1031,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
998
1031
|
(0, react_1.useEffect)(function () {
|
|
999
1032
|
handleOfflinePrefetch();
|
|
1000
1033
|
/* eslint-disable */
|
|
1001
|
-
}, [props.collectionId, (
|
|
1034
|
+
}, [props.collectionId, (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareOffline]);
|
|
1002
1035
|
/* eslint-enable */
|
|
1003
1036
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
1004
1037
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -1018,7 +1051,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1018
1051
|
}, interval);
|
|
1019
1052
|
return function () { return clearInterval(timer); };
|
|
1020
1053
|
/* eslint-disable */
|
|
1021
|
-
}, [(
|
|
1054
|
+
}, [(_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.barePollingInterval, isLive, isNetworkOffline]);
|
|
1022
1055
|
/* eslint-enable */
|
|
1023
1056
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
1024
1057
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -1060,7 +1093,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1060
1093
|
};
|
|
1061
1094
|
/* eslint-disable */
|
|
1062
1095
|
}, [
|
|
1063
|
-
(
|
|
1096
|
+
(_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.bareSocketName,
|
|
1064
1097
|
props.collectionId,
|
|
1065
1098
|
props.devSettings.sseEndpoint,
|
|
1066
1099
|
props.devSettings.dbAPIToken,
|
|
@@ -1169,6 +1202,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1169
1202
|
case "list":
|
|
1170
1203
|
setReferencesOptions({});
|
|
1171
1204
|
setReferencesDetails({});
|
|
1205
|
+
// INFO: leaving read/update for the list — drop the raw read doc so it
|
|
1206
|
+
// does not linger from the previously opened record.
|
|
1207
|
+
rawReadData.current = null;
|
|
1172
1208
|
break;
|
|
1173
1209
|
}
|
|
1174
1210
|
previousType.current = resolvedType;
|
|
@@ -1302,10 +1338,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1302
1338
|
props.collectionId,
|
|
1303
1339
|
props.model,
|
|
1304
1340
|
props.localURLEndpoint,
|
|
1305
|
-
(
|
|
1306
|
-
(
|
|
1307
|
-
(
|
|
1308
|
-
(
|
|
1341
|
+
(_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.extendedTabs,
|
|
1342
|
+
(_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.viewId,
|
|
1343
|
+
(_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.additionalQuery,
|
|
1344
|
+
(_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.groupBy,
|
|
1309
1345
|
resolvedType,
|
|
1310
1346
|
]);
|
|
1311
1347
|
(0, react_1.useEffect)(function () {
|
|
@@ -1395,7 +1431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1395
1431
|
};
|
|
1396
1432
|
}, 100);
|
|
1397
1433
|
return function () { return clearTimeout(timeoutId); };
|
|
1398
|
-
}, [(
|
|
1434
|
+
}, [(_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
1399
1435
|
(0, react_1.useEffect)(function () {
|
|
1400
1436
|
if (resolvedType !== "read")
|
|
1401
1437
|
return;
|
|
@@ -2001,6 +2037,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2001
2037
|
uniqueLabel: props.uniqueLabel,
|
|
2002
2038
|
groupId: props.groupId,
|
|
2003
2039
|
unionCollections: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.unionCollections,
|
|
2040
|
+
// INFO: a file view lists FILES, so the row has to become one. The server
|
|
2041
|
+
// places this before the match, the sort and the skip/limit, which is
|
|
2042
|
+
// what makes filters still apply and pagination count files rather than
|
|
2043
|
+
// records — and it builds its count from the same pipeline, so the total
|
|
2044
|
+
// is the file count with nothing else to configure.
|
|
2045
|
+
unwind: fileViewColumnId,
|
|
2004
2046
|
skip: 0,
|
|
2005
2047
|
};
|
|
2006
2048
|
if (calendarSettings ||
|
|
@@ -4880,7 +4922,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4880
4922
|
if (process.env.NODE_ENV !== "production") {
|
|
4881
4923
|
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);
|
|
4882
4924
|
}
|
|
4883
|
-
if (!responseData.data) return [3 /*break*/,
|
|
4925
|
+
if (!responseData.data) return [3 /*break*/, 10];
|
|
4884
4926
|
if (!((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareOffline)) return [3 /*break*/, 5];
|
|
4885
4927
|
// INFO: Mark as programmatic so initial data load doesn't populate dirtyFields
|
|
4886
4928
|
programmaticUpdateRef.current = true;
|
|
@@ -4901,6 +4943,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4901
4943
|
loadedSelectedData.current = JSON.parse(JSON.stringify(responseData.data));
|
|
4902
4944
|
// INFO: offline path already hands the raw doc as `data`; pass it as
|
|
4903
4945
|
// `rawData` too so the second arg is the raw doc on every path.
|
|
4946
|
+
rawReadData.current = responseData.data;
|
|
4904
4947
|
if ((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareReadHandleData)
|
|
4905
4948
|
props.bareSettings.bareReadHandleData(responseData.data, responseData.data);
|
|
4906
4949
|
clonedReferencesOptions_1 = JSON.parse(JSON.stringify(referencesOptions));
|
|
@@ -5002,6 +5045,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5002
5045
|
loadedSelectedData.current = JSON.parse(JSON.stringify(newRespData));
|
|
5003
5046
|
// INFO: newRespData is the deep/display model (labels + elements);
|
|
5004
5047
|
// responseData.data is the untouched DB doc.
|
|
5048
|
+
rawReadData.current = responseData.data;
|
|
5005
5049
|
if ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareReadHandleData)
|
|
5006
5050
|
props.bareSettings.bareReadHandleData(newRespData, responseData.data);
|
|
5007
5051
|
if ((resolvedType === "update" || resolvedType === "read") &&
|
|
@@ -5009,7 +5053,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5009
5053
|
(0, updateModule_1.handleRetrieveReferenceOptions)(newRespData, structure, dbModule, devSettings, setReferencesOptions, setReferencesDetails, resolvedType === "read");
|
|
5010
5054
|
}
|
|
5011
5055
|
_k.label = 9;
|
|
5012
|
-
case 9:
|
|
5056
|
+
case 9: return [3 /*break*/, 11];
|
|
5057
|
+
case 10:
|
|
5058
|
+
// INFO: no read data loaded — clear the raw doc so bareReadComponent
|
|
5059
|
+
// never renders a previous record's data.
|
|
5060
|
+
rawReadData.current = null;
|
|
5061
|
+
_k.label = 11;
|
|
5062
|
+
case 11:
|
|
5013
5063
|
setModalVisible(false);
|
|
5014
5064
|
setLoading(false);
|
|
5015
5065
|
return [2 /*return*/];
|
|
@@ -6891,8 +6941,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6891
6941
|
};
|
|
6892
6942
|
var renderBareReadComp = function () {
|
|
6893
6943
|
var _a, _b, _c, _d;
|
|
6894
|
-
|
|
6895
|
-
|
|
6944
|
+
// INFO: selectedData is display data (labels + elements); rawReadData is the
|
|
6945
|
+
// untouched DB doc, passed as the second arg like bareReadHandleData.
|
|
6946
|
+
if ((_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareReadComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, rawReadData.current)) {
|
|
6947
|
+
return (react_1.default.createElement("div", { className: "w-full" }, (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareReadComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData, rawReadData.current)));
|
|
6896
6948
|
}
|
|
6897
6949
|
else
|
|
6898
6950
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
@@ -7732,9 +7784,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7732
7784
|
(selectedModel.type === "multipleImage" ||
|
|
7733
7785
|
selectedModel.type === "markdown"))
|
|
7734
7786
|
return null;
|
|
7787
|
+
// INFO: renderer key stays the field id so bareListDescription resolves;
|
|
7788
|
+
// useColumnName only switches the label below, not this key.
|
|
7735
7789
|
var selectedKey = eachKey;
|
|
7736
|
-
if (useColumnName)
|
|
7737
|
-
selectedKey = selectedModel.name;
|
|
7738
7790
|
if (selectedModel.type === "markdown") {
|
|
7739
7791
|
listDescArray.push(react_1.default.createElement("div", { className: "flex flex-col" },
|
|
7740
7792
|
react_1.default.createElement("p", null,
|
|
@@ -7905,7 +7957,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7905
7957
|
if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) &&
|
|
7906
7958
|
((_b = props.organise.extendedTabs) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
7907
7959
|
(_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs.map(function (eachTab) {
|
|
7908
|
-
var _a, _b, _c, _d, _e;
|
|
7960
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7909
7961
|
var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(resolvedType, "&collection=").concat(props.collectionId);
|
|
7910
7962
|
if (props.id)
|
|
7911
7963
|
hrefPoint += "&data=".concat(props.id);
|
|
@@ -7934,7 +7986,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7934
7986
|
tabData["viewImage"] = eachTab.viewImage;
|
|
7935
7987
|
}
|
|
7936
7988
|
if (eachTab.type === resolvedType) {
|
|
7937
|
-
tabs.push(__assign(__assign({}, tabData), (
|
|
7989
|
+
tabs.push(__assign(__assign(__assign({}, tabData), (isEditor &&
|
|
7990
|
+
((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onChangeTabs) && {
|
|
7991
|
+
action: (react_1.default.createElement("span", { role: "button", "data-testid": "tab-default-".concat(tabData.id), "aria-label": eachTab.defaultTab
|
|
7992
|
+
? "Opens by default"
|
|
7993
|
+
: "Open this tab by default", className: "ml-2 self-center ".concat(eachTab.defaultTab
|
|
7994
|
+
? "text-primary-500"
|
|
7995
|
+
: "text-gray-400 opacity-0 group-hover:opacity-100"), onClick: function (e) {
|
|
7996
|
+
e.stopPropagation();
|
|
7997
|
+
e.preventDefault();
|
|
7998
|
+
handleToggleDefaultTab(eachTab.name);
|
|
7999
|
+
} }, eachTab.defaultTab ? (react_1.default.createElement(HeroIcons.BookmarkIcon, { className: "h-4 w-4" })) : (react_1.default.createElement(BookmarkIcon_1.default, { className: "h-4 w-4" })))),
|
|
8000
|
+
})), (!((_f = props.edit) === null || _f === void 0 ? void 0 : _f.disabledTabsDeleteBtn) && {
|
|
7938
8001
|
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) {
|
|
7939
8002
|
e.stopPropagation();
|
|
7940
8003
|
e.preventDefault();
|
|
@@ -7979,6 +8042,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7979
8042
|
var _a, _b;
|
|
7980
8043
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, structure.filter(function (eachColumn) { return eachColumn.id !== columnId; }));
|
|
7981
8044
|
};
|
|
8045
|
+
/**
|
|
8046
|
+
* INFO: only one tab can be the one that opens, so setting one clears the
|
|
8047
|
+
* rest rather than leaving two marked and letting the first found win.
|
|
8048
|
+
* Clicking the current default unsets it, which falls back to Table View.
|
|
8049
|
+
*/
|
|
8050
|
+
var handleToggleDefaultTab = function (name) {
|
|
8051
|
+
var _a, _b, _c, _d;
|
|
8052
|
+
var nextTabs = ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) !== null && _b !== void 0 ? _b : []).map(function (eachTab) { return (__assign(__assign({}, eachTab), { defaultTab: eachTab.name === name ? !eachTab.defaultTab : false })); });
|
|
8053
|
+
(_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onChangeTabs) === null || _d === void 0 ? void 0 : _d.call(_c, nextTabs);
|
|
8054
|
+
};
|
|
7982
8055
|
var renderAddMathColumn = function (id, onClose) {
|
|
7983
8056
|
var _a, _b, _c;
|
|
7984
8057
|
return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: structure, renderReferenceLabelOptions: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.renderReferenceSpaceOptions, onAddModelSchema: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onAddColumns, onClose: onClose }));
|
|
@@ -8389,16 +8462,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8389
8462
|
}, darkMode: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkMode, hidePagination: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.disableEllipsisOnLongWord }));
|
|
8390
8463
|
}
|
|
8391
8464
|
};
|
|
8392
|
-
var renderTabContent = function (tabs, dataType,
|
|
8393
|
-
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;
|
|
8394
|
-
var
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8465
|
+
var renderTabContent = function (tabs, dataType, requestedViewType) {
|
|
8466
|
+
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;
|
|
8467
|
+
var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
|
|
8468
|
+
/**
|
|
8469
|
+
* INFO: a list tab must not supply the content of a read view. The selected
|
|
8470
|
+
* tab survives the navigation into a record — setSelectedTab only runs
|
|
8471
|
+
* while the type is list — so without this a list view renders over the
|
|
8472
|
+
* detail list and the record looks empty.
|
|
8473
|
+
*
|
|
8474
|
+
* Refusing the tab is not enough on its own: the branches below key on the
|
|
8475
|
+
* view type STRING, and a refused tab left it naming a view that no branch
|
|
8476
|
+
* renders, so the record was still empty. A refused list tab reads as
|
|
8477
|
+
* "general" all the way down.
|
|
8478
|
+
*/
|
|
8479
|
+
var isRefusedListTab = dataType === "read" && (matchedTab === null || matchedTab === void 0 ? void 0 : matchedTab.type) === "list";
|
|
8480
|
+
var viewType = isRefusedListTab ? "general" : requestedViewType;
|
|
8481
|
+
var selectedTabData = isRefusedListTab ? undefined : matchedTab;
|
|
8402
8482
|
var multipleSelect = false;
|
|
8403
8483
|
if (!((_a = props.edit) === null || _a === void 0 ? void 0 : _a.disableBatchUpdate))
|
|
8404
8484
|
multipleSelect = true;
|
|
@@ -8578,7 +8658,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8578
8658
|
else if (selectedTabData.viewType === "list") {
|
|
8579
8659
|
// INFO: when bareNewDTW is enabled, render NewList instead of legacy List
|
|
8580
8660
|
if ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareNewDTW) {
|
|
8581
|
-
return (react_1.default.createElement(newList_1.NewList, { darkModeBg: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disableSelectFullData) === null || _y === void 0 ? void 0 : _y.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
8661
|
+
return (react_1.default.createElement(newList_1.NewList, { darkModeBg: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disableSelectFullData) === null || _y === void 0 ? void 0 : _y.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
8582
8662
|
selectedIds.length > 0 && !((_0 = props.edit) === null || _0 === void 0 ? void 0 : _0.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8583
8663
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
8584
8664
|
handleBatchDraftData();
|
|
@@ -8600,7 +8680,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8600
8680
|
}, darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode, className: "mt-5", hidePagination: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.hidePagination, customPaginationSize: customPaginationSize, mobileTooltip: (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareListMobileTooltip }));
|
|
8601
8681
|
}
|
|
8602
8682
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8603
|
-
react_1.default.createElement(list_1.List, { darkModeBg: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.disableSelectFullData) === null || _12 === void 0 ? void 0 : _12.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
8683
|
+
react_1.default.createElement(list_1.List, { darkModeBg: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.disableSelectFullData) === null || _12 === void 0 ? void 0 : _12.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
8604
8684
|
selectedIds.length > 0 && !((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8605
8685
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
8606
8686
|
handleBatchDraftData();
|
|
@@ -8621,22 +8701,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8621
8701
|
handlePagination(value);
|
|
8622
8702
|
}, className: "mt-5", hidePagination: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.hidePagination, customPaginationSize: customPaginationSize })));
|
|
8623
8703
|
}
|
|
8704
|
+
else if (selectedTabData.viewType === "file" && resolvedType === "list") {
|
|
8705
|
+
/**
|
|
8706
|
+
* INFO: the rows are already files — the server unwound the column, so
|
|
8707
|
+
* each row is one element with its record's fields alongside it. The
|
|
8708
|
+
* tile only has to render what it was handed.
|
|
8709
|
+
*
|
|
8710
|
+
* Clicking goes to the RECORD, not the file. Someone browsing files is
|
|
8711
|
+
* looking for the thing a file belongs to, with its status and owner
|
|
8712
|
+
* and everything else around it; landing on a bare download strips
|
|
8713
|
+
* exactly the context they came for. The filename inside the tile is
|
|
8714
|
+
* still a direct link for when the file itself is the point.
|
|
8715
|
+
*/
|
|
8716
|
+
var columnId_2 = (_22 = (_21 = selectedTabData.fileSettings) === null || _21 === void 0 ? void 0 : _21.columnId) !== null && _22 !== void 0 ? _22 : "";
|
|
8717
|
+
return (react_1.default.createElement("div", { className: "mt-4" },
|
|
8718
|
+
tableLoading ? (react_1.default.createElement("div", { className: "flex flex-col items-center py-10" },
|
|
8719
|
+
react_1.default.createElement(loading_1.Loading, null))) : tableData.length === 0 ? (react_1.default.createElement(emptyState_1.EmptyState, { text: "No files here yet", icon: react_1.default.createElement(HeroIcons.PaperClipIcon, { className: "h-10 w-10 text-gray-400" }) })) : (
|
|
8720
|
+
// INFO: the same surface the other list views sit on, so
|
|
8721
|
+
// switching tabs does not change the shape of the page around
|
|
8722
|
+
// the content.
|
|
8723
|
+
react_1.default.createElement("div", { className: "grid grid-cols-2 gap-4 rounded-lg p-4 sm:grid-cols-3 lg:grid-cols-4 ".concat(((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.darkMode) ? "bg-white/5" : "bg-white") }, tableData.map(function (eachRow, eachIndex) {
|
|
8724
|
+
var _a, _b, _c;
|
|
8725
|
+
return (react_1.default.createElement(filePreview_1.FilePreview, { key: "".concat((_b = (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id) !== null && _b !== void 0 ? _b : eachIndex, "-").concat(eachIndex), variant: "tile", file: typeof (eachRow === null || eachRow === void 0 ? void 0 : eachRow[columnId_2]) === "string"
|
|
8726
|
+
? { fileName: eachRow[columnId_2] }
|
|
8727
|
+
: ((_c = eachRow === null || eachRow === void 0 ? void 0 : eachRow[columnId_2]) !== null && _c !== void 0 ? _c : { fileName: "" }), onClick: function () {
|
|
8728
|
+
var _a, _b, _c;
|
|
8729
|
+
// INFO: `id`, not `_id`. handleGetListData renames
|
|
8730
|
+
// every row's _id to id on the way in, the same as the
|
|
8731
|
+
// other views navigate with — reading _id here handed
|
|
8732
|
+
// the read view no id at all, so General Details was
|
|
8733
|
+
// empty.
|
|
8734
|
+
return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", (_c = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _c !== void 0 ? _c : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, "general");
|
|
8735
|
+
} }));
|
|
8736
|
+
}))),
|
|
8737
|
+
react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
|
|
8738
|
+
handlePagination(value);
|
|
8739
|
+
}, darkMode: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.darkMode, customPaginationSize: customPaginationSize })));
|
|
8740
|
+
}
|
|
8624
8741
|
else if (selectedTabData.viewType === "grid") {
|
|
8625
8742
|
var isScrollMode = renderCheckScrollMode();
|
|
8626
8743
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8627
|
-
react_1.default.createElement(grid_1.Grid, { darkMode: (
|
|
8744
|
+
react_1.default.createElement(grid_1.Grid, { darkMode: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.darkMode, darkModeBg: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
|
|
8628
8745
|
var _a, _b;
|
|
8629
8746
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
8630
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
8747
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_28 = (_27 = props.newTabUrl) === null || _27 === void 0 ? void 0 : _27.default) !== null && _28 !== void 0 ? _28 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_30 = (_29 = props.newTabUrl) === null || _29 === void 0 ? void 0 : _29.addons) !== null && _30 !== void 0 ? _30 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
8631
8748
|
handlePagination(value);
|
|
8632
|
-
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (
|
|
8749
|
+
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListGridColClassName, className: "mt-5",
|
|
8633
8750
|
// INFO: under the new DTW the grid keeps the same footer as the
|
|
8634
8751
|
// table and list views instead of its own legacy page buttons
|
|
8635
|
-
hidePagination: ((
|
|
8636
|
-
!!((
|
|
8637
|
-
((
|
|
8638
|
-
!((
|
|
8639
|
-
.length, customPaginationSize: customPaginationSize, darkMode: (
|
|
8752
|
+
hidePagination: ((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.hidePagination) ||
|
|
8753
|
+
!!((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareNewDTW), customPaginationSize: customPaginationSize }),
|
|
8754
|
+
((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareNewDTW) &&
|
|
8755
|
+
!((_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
|
|
8756
|
+
.length, customPaginationSize: customPaginationSize, darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode, darkModeBg: (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkModeBg, handleUpdatePageIndex: function (value) {
|
|
8640
8757
|
handlePagination(value);
|
|
8641
8758
|
} }))));
|
|
8642
8759
|
}
|
|
@@ -8738,7 +8855,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8738
8855
|
return eventAvailabilities;
|
|
8739
8856
|
};
|
|
8740
8857
|
// INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
|
|
8741
|
-
if ((
|
|
8858
|
+
if ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareNewDTW) {
|
|
8742
8859
|
var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
|
|
8743
8860
|
var _a, _b, _c, _d;
|
|
8744
8861
|
return ({
|
|
@@ -8758,13 +8875,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8758
8875
|
// INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
|
|
8759
8876
|
// query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
|
|
8760
8877
|
// agenda lists the fetched month chronologically.
|
|
8761
|
-
var viewSwitchOptions = (
|
|
8878
|
+
var viewSwitchOptions = (_39 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _39 !== void 0 ? _39 : [];
|
|
8762
8879
|
var VIEW_VARIANT_MAP = {
|
|
8763
8880
|
month: "fullMonth",
|
|
8764
8881
|
week: "weekTimeGrid",
|
|
8765
8882
|
agenda: "agenda",
|
|
8766
8883
|
};
|
|
8767
|
-
var activeVariant = (
|
|
8884
|
+
var activeVariant = (_40 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _40 !== void 0 ? _40 : "fullMonth";
|
|
8768
8885
|
return (react_1.default.createElement("div", { className: "mt-4" },
|
|
8769
8886
|
viewSwitchOptions.length > 1 && (react_1.default.createElement("div", { className: "mb-2 flex justify-end" },
|
|
8770
8887
|
react_1.default.createElement("div", { className: "inline-flex rounded-lg border border-gray-200 bg-white p-0.5" }, viewSwitchOptions.map(function (view) { return (react_1.default.createElement("button", { key: view, type: "button", onClick: function () {
|
|
@@ -8806,9 +8923,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8806
8923
|
var _a, _b;
|
|
8807
8924
|
if (event.id)
|
|
8808
8925
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", event.id, "general");
|
|
8809
|
-
}, darkMode: (
|
|
8926
|
+
}, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, className: "w-full" }))));
|
|
8810
8927
|
}
|
|
8811
|
-
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (
|
|
8928
|
+
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_42 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _42 !== void 0 ? _42 : calendarView, handleMonthChange: function (date) {
|
|
8812
8929
|
var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
|
|
8813
8930
|
var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
|
|
8814
8931
|
if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
|
|
@@ -8826,7 +8943,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8826
8943
|
else if (selectedTabData.viewType === "feeds") {
|
|
8827
8944
|
var contentList_1 = [];
|
|
8828
8945
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
8829
|
-
var customFeedsData = (
|
|
8946
|
+
var customFeedsData = (_43 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _43 === void 0 ? void 0 : _43.call(feedsSettings_1, tableData, spaceTableData);
|
|
8830
8947
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
8831
8948
|
customFeedsData.map(function (eachData) {
|
|
8832
8949
|
var _a, _b, _c, _d;
|
|
@@ -8871,21 +8988,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8871
8988
|
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
|
|
8872
8989
|
// INFO: NewFeeds is already a card like the table and list, so the new
|
|
8873
8990
|
// DTW renders it bare; the legacy feed still needs its own surface
|
|
8874
|
-
className: ((
|
|
8991
|
+
className: ((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareNewDTW)
|
|
8875
8992
|
? ""
|
|
8876
|
-
: "p-4 rounded-lg ".concat(((
|
|
8877
|
-
((
|
|
8993
|
+
: "p-4 rounded-lg ".concat(((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode) ? "bg-white/5" : "bg-white") },
|
|
8994
|
+
((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.darkMode, onClickItem: function (id) { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general"); } })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode })),
|
|
8878
8995
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
8879
8996
|
contentList_1.length > 0 &&
|
|
8880
|
-
!((
|
|
8881
|
-
((
|
|
8997
|
+
!((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
|
|
8998
|
+
((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, darkModeBg: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkModeBg, handleUpdatePageIndex: function (value) {
|
|
8882
8999
|
handlePagination(value);
|
|
8883
9000
|
} })),
|
|
8884
9001
|
contentList_1.length > 0 &&
|
|
8885
|
-
!((
|
|
8886
|
-
!((
|
|
9002
|
+
!((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.hidePagination) &&
|
|
9003
|
+
!((_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
|
|
8887
9004
|
handlePagination(value);
|
|
8888
|
-
}, darkMode: (
|
|
9005
|
+
}, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, customPaginationSize: customPaginationSize }))))));
|
|
8889
9006
|
}
|
|
8890
9007
|
else if (selectedTabData.viewType === "map") {
|
|
8891
9008
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -8984,7 +9101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8984
9101
|
}
|
|
8985
9102
|
else if (selectedTabData.viewType === "kanban") {
|
|
8986
9103
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
8987
|
-
var kanbanTitle_2 = (
|
|
9104
|
+
var kanbanTitle_2 = (_56 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _56 !== void 0 ? _56 : "";
|
|
8988
9105
|
var nullColumn_1 = false;
|
|
8989
9106
|
var groupBy_1 = [];
|
|
8990
9107
|
var groupLabel_1 = [];
|
|
@@ -9005,10 +9122,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9005
9122
|
});
|
|
9006
9123
|
var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
|
|
9007
9124
|
// INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
|
|
9008
|
-
if ((
|
|
9125
|
+
if ((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareNewDTW) {
|
|
9009
9126
|
return (react_1.default.createElement(newKanban_1.NewKanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
9010
9127
|
? "Data has exceeded limit, please apply filters"
|
|
9011
|
-
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (
|
|
9128
|
+
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
|
|
9012
9129
|
var _a;
|
|
9013
9130
|
setKanbanDroppable(false);
|
|
9014
9131
|
handleSubmitData("update", cardId, kanbanTitle_2, (_a = {},
|
|
@@ -9017,7 +9134,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9017
9134
|
}, onClickData: function (id) {
|
|
9018
9135
|
var _a, _b;
|
|
9019
9136
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
9020
|
-
}, darkMode: (
|
|
9137
|
+
}, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode }));
|
|
9021
9138
|
}
|
|
9022
9139
|
return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
9023
9140
|
? "Data has exceeded limit, please apply filters"
|
|
@@ -9518,7 +9635,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9518
9635
|
};
|
|
9519
9636
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
9520
9637
|
renderNotification("root"),
|
|
9521
|
-
((
|
|
9638
|
+
((_63 = (_62 = props.renderSettings) === null || _62 === void 0 ? void 0 : _62.renderLoadingUI) === null || _63 === void 0 ? void 0 : _63.call(_62)) && loading ? ((_64 = props.renderSettings) === null || _64 === void 0 ? void 0 : _64.renderLoadingUI()) : (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, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
9522
9639
|
var _a, _b;
|
|
9523
9640
|
if (loading)
|
|
9524
9641
|
return;
|
|
@@ -9529,7 +9646,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9529
9646
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
9530
9647
|
}
|
|
9531
9648
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
9532
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9649
|
+
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, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
9533
9650
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
9534
9651
|
if (dataId) {
|
|
9535
9652
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -9545,19 +9662,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9545
9662
|
}, onClose: function () {
|
|
9546
9663
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
9547
9664
|
} }),
|
|
9548
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9665
|
+
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, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
9549
9666
|
setReferenceDeleteTableData({});
|
|
9550
9667
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
9551
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9668
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.darkMode, darkModeBg: (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
9552
9669
|
setDeletePasscodeInput("");
|
|
9553
9670
|
setDeleteModal(!deleteModal);
|
|
9554
9671
|
setDeleteFeedId("");
|
|
9555
9672
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
9556
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9673
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.darkMode, darkModeBg: (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
9557
9674
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
9558
9675
|
setBatchUpdateModal(false);
|
|
9559
9676
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
9560
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9677
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.darkMode, darkModeBg: (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
9561
9678
|
var _a;
|
|
9562
9679
|
if (props.space)
|
|
9563
9680
|
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 }));
|
|
@@ -9565,7 +9682,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9565
9682
|
}, onClose: function () {
|
|
9566
9683
|
setSelectedAuthMethod("");
|
|
9567
9684
|
} }),
|
|
9568
|
-
isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
9685
|
+
isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.darkMode, darkModeBg: (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
|
|
9569
9686
|
var _a, _b;
|
|
9570
9687
|
return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
9571
9688
|
? props.title
|