blixify-ui-web 1.2.212 → 1.2.214
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/data/dataTemplate/activityAttachments.d.ts +42 -0
- package/lib/components/data/dataTemplate/activityAttachments.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/activityAttachments.js +214 -0
- package/lib/components/data/dataTemplate/activityAttachments.js.map +1 -0
- package/lib/components/data/dataTemplate/activityComposer.d.ts +21 -1
- package/lib/components/data/dataTemplate/activityComposer.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/activityComposer.js +60 -16
- package/lib/components/data/dataTemplate/activityComposer.js.map +1 -1
- package/lib/components/data/dataTemplate/activityEmojiPicker.d.ts +16 -0
- package/lib/components/data/dataTemplate/activityEmojiPicker.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/activityEmojiPicker.js +138 -0
- package/lib/components/data/dataTemplate/activityEmojiPicker.js.map +1 -0
- package/lib/components/data/dataTemplate/activityModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/activityModal.js +416 -105
- package/lib/components/data/dataTemplate/activityModal.js.map +1 -1
- package/lib/components/data/dataTemplate/activityReactions.d.ts +49 -0
- package/lib/components/data/dataTemplate/activityReactions.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/activityReactions.js +519 -0
- package/lib/components/data/dataTemplate/activityReactions.js.map +1 -0
- package/lib/components/data/dataTemplate/activityReplies.d.ts +35 -0
- package/lib/components/data/dataTemplate/activityReplies.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/activityReplies.js +217 -0
- package/lib/components/data/dataTemplate/activityReplies.js.map +1 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +96 -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 +210 -187
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/tail.css +2 -2
- package/package.json +1 -1
|
@@ -221,6 +221,7 @@ var handleGetCalendarSwitchRange = function (date, view) {
|
|
|
221
221
|
end: (0, dayjs_1.default)(date).endOf(unit).toDate(),
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
|
+
var RELATED_VIEW_PREFIX = "blixify_related_";
|
|
224
225
|
// INFO: " - " is what the list prints for a lookup it could not resolve, an
|
|
225
226
|
// empty reference list included
|
|
226
227
|
var handleCheckEmptyCardValue = function (value) {
|
|
@@ -248,10 +249,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
248
249
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
249
250
|
// most in effect dependency arrays — following props.type there would leave
|
|
250
251
|
// the list never refetching while the panel is open, which fails silently.
|
|
251
|
-
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, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115
|
|
252
|
+
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, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115;
|
|
252
253
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
253
254
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
254
|
-
var
|
|
255
|
+
var _116 = (0, react_1.useState)(false), drawerPageView = _116[0], setDrawerPageView = _116[1];
|
|
255
256
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
256
257
|
// live props. Without this, navigating back to the list would re-render the
|
|
257
258
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -273,6 +274,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
273
274
|
var resolvedType = isDrawerHost ? "list" : props.type;
|
|
274
275
|
if (isDrawerRecord)
|
|
275
276
|
drawerReadIdRef.current = props.id;
|
|
277
|
+
// INFO: the view in the url belongs to the record while its panel is open. A
|
|
278
|
+
// list following it through the record's tabs cleared its rows and page and
|
|
279
|
+
// read them again behind the panel, so it keeps the view it was opened on.
|
|
280
|
+
var handleResolveListViewId = function () {
|
|
281
|
+
var _a, _b, _c;
|
|
282
|
+
return ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId) === null || _b === void 0 ? void 0 : _b.startsWith(RELATED_VIEW_PREFIX))
|
|
283
|
+
? undefined
|
|
284
|
+
: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.viewId;
|
|
285
|
+
};
|
|
286
|
+
var hostedListViewIdRef = (0, react_1.useRef)(handleResolveListViewId());
|
|
287
|
+
if (!isDrawerHost)
|
|
288
|
+
hostedListViewIdRef.current = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId;
|
|
289
|
+
var listViewId = isDrawerHost
|
|
290
|
+
? hostedListViewIdRef.current
|
|
291
|
+
: (_f = props.organise) === null || _f === void 0 ? void 0 : _f.viewId;
|
|
276
292
|
// INFO: the route has already gone back to the list while the panel slides out,
|
|
277
293
|
// so it keeps drawing what it was opened as until it is gone
|
|
278
294
|
var drawerFormRef = (0, react_1.useRef)(false);
|
|
@@ -292,7 +308,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
292
308
|
drawerFormEditedRef.current = false;
|
|
293
309
|
}
|
|
294
310
|
drawerOpenRef.current = isDrawerHost;
|
|
295
|
-
var
|
|
311
|
+
var _117 = (0, react_1.useState)(false), drawerDiscardModal = _117[0], setDrawerDiscardModal = _117[1];
|
|
296
312
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
297
313
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
298
314
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -371,14 +387,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
371
387
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
372
388
|
};
|
|
373
389
|
};
|
|
374
|
-
var
|
|
390
|
+
var _118 = intialiseDefaultFilterValues(), initialFilterSearch = _118.initialFilterSearch, initialFilterSearchParams = _118.initialFilterSearchParams, initialFilterSelection = _118.initialFilterSelection, initialFilterReference = _118.initialFilterReference, initialFilterReferenceDate = _118.initialFilterReferenceDate;
|
|
375
391
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
376
|
-
var
|
|
377
|
-
mode: (
|
|
392
|
+
var _119 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
393
|
+
mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
|
|
378
394
|
collectionId: props.collectionId,
|
|
379
|
-
persistKey: (
|
|
395
|
+
persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
|
|
380
396
|
type: resolvedType,
|
|
381
|
-
}), rawPersistedState =
|
|
397
|
+
}), rawPersistedState = _119.persistedState, isPersistEnabled = _119.isEnabled, handleSaveView = _119.handleSaveView, handleRegisterViewSnapshot = _119.handleRegisterViewSnapshot;
|
|
382
398
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
383
399
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
384
400
|
var _a, _b, _c;
|
|
@@ -389,11 +405,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
389
405
|
}, [
|
|
390
406
|
rawPersistedState,
|
|
391
407
|
props.model,
|
|
392
|
-
(
|
|
393
|
-
(
|
|
408
|
+
(_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareFlexFilterReferences,
|
|
409
|
+
(_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
|
|
394
410
|
]);
|
|
395
|
-
var
|
|
396
|
-
var
|
|
411
|
+
var _120 = (0, react_1.useState)(false), loading = _120[0], setLoading = _120[1];
|
|
412
|
+
var _121 = (0, react_1.useState)(), notification = _121[0], setNotification = _121[1];
|
|
397
413
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
398
414
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
399
415
|
(0, react_1.useEffect)(function () {
|
|
@@ -403,80 +419,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
403
419
|
return function () { return clearTimeout(timer); };
|
|
404
420
|
}, [notification]);
|
|
405
421
|
//INFO : Used by List
|
|
406
|
-
var
|
|
407
|
-
var
|
|
408
|
-
var
|
|
409
|
-
var
|
|
410
|
-
var
|
|
411
|
-
var
|
|
412
|
-
var
|
|
422
|
+
var _122 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _l !== void 0 ? _l : initialFilterSearch), filterSearch = _122[0], setFilterSearch = _122[1];
|
|
423
|
+
var _123 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearchParams), filterSearchParams = _123[0], setFilterSearchParams = _123[1];
|
|
424
|
+
var _124 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _o !== void 0 ? _o : initialFilterSelection), filterSelection = _124[0], setFilterSelection = _124[1];
|
|
425
|
+
var _125 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _p !== void 0 ? _p : initialFilterReference), filterReference = _125[0], setFilterReference = _125[1];
|
|
426
|
+
var _126 = (0, react_1.useState)({}), filterReferenceSearch = _126[0], setFilterReferenceSearch = _126[1];
|
|
427
|
+
var _127 = (0, react_1.useState)({}), filterReferenceList = _127[0], setFilterReferenceList = _127[1];
|
|
428
|
+
var _128 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
413
429
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
414
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
415
|
-
var
|
|
416
|
-
var
|
|
417
|
-
var
|
|
418
|
-
var
|
|
419
|
-
var
|
|
430
|
+
: initialFilterReferenceDate), filterReferenceDate = _128[0], setFilterReferenceDate = _128[1];
|
|
431
|
+
var _129 = (0, react_1.useState)(true), tableLoading = _129[0], setTableLoading = _129[1];
|
|
432
|
+
var _130 = (0, react_1.useState)(""), cursor = _130[0], setCursor = _130[1];
|
|
433
|
+
var _131 = (0, react_1.useState)(""), lastCursor = _131[0], setLastCursor = _131[1];
|
|
434
|
+
var _132 = (0, react_1.useState)([]), tableData = _132[0], setTableData = _132[1];
|
|
435
|
+
var _133 = (0, react_1.useState)([]), spaceTableData = _133[0], setSpaceTableData = _133[1];
|
|
420
436
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
421
437
|
// the state it closed over can predate an earlier save on the same row
|
|
422
438
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
423
439
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
424
440
|
tableDataRef.current = tableData;
|
|
425
441
|
spaceTableDataRef.current = spaceTableData;
|
|
426
|
-
var
|
|
427
|
-
var
|
|
442
|
+
var _134 = (0, react_1.useState)(0), size = _134[0], setSize = _134[1];
|
|
443
|
+
var _135 = (0, react_1.useState)((_s = (_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _q !== void 0 ? _q : (_r = props.organise) === null || _r === void 0 ? void 0 : _r.pageIndex) !== null && _s !== void 0 ? _s : 0), pageIndex = _135[0], setPageIndex = _135[1];
|
|
428
444
|
// INFO: every change of page, including the return to the first page when a
|
|
429
445
|
// filter or search changes, which onChangePagination does not always report
|
|
430
446
|
(0, react_1.useEffect)(function () {
|
|
431
447
|
var _a, _b;
|
|
432
448
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
433
449
|
}, [pageIndex]);
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
438
|
-
var
|
|
450
|
+
var _136 = (0, react_1.useState)([]), selectedIds = _136[0], setSelectedIds = _136[1];
|
|
451
|
+
var _137 = (0, react_1.useState)(false), selectAll = _137[0], setSelectAll = _137[1];
|
|
452
|
+
var _138 = (0, react_1.useState)(""), deletePasscode = _138[0], setDeletePasscode = _138[1];
|
|
453
|
+
var _139 = (0, react_1.useState)(""), deletePasscodeInput = _139[0], setDeletePasscodeInput = _139[1];
|
|
454
|
+
var _140 = (0, react_1.useState)(""), deleteFeedId = _140[0], setDeleteFeedId = _140[1];
|
|
439
455
|
//INFO : Used by List Organise
|
|
440
456
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
441
457
|
// persistViewState is enabled and a persisted sort exists
|
|
442
|
-
var
|
|
443
|
-
var
|
|
444
|
-
var
|
|
445
|
-
var
|
|
458
|
+
var _141 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _t !== void 0 ? _t : undefined), persistedSort = _141[0], setPersistedSort = _141[1];
|
|
459
|
+
var _142 = (0, react_1.useState)(false), filterDraft = _142[0], setFilterDraft = _142[1];
|
|
460
|
+
var _143 = (0, react_1.useState)(false), addTabModal = _143[0], setAddTabModal = _143[1];
|
|
461
|
+
var _144 = (0, react_1.useState)(-1), editTabIndex = _144[0], setEditTabIndex = _144[1];
|
|
446
462
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
447
463
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
448
|
-
var
|
|
449
|
-
var _a
|
|
450
|
-
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs,
|
|
451
|
-
}), selectedTab =
|
|
452
|
-
var
|
|
464
|
+
var _145 = (0, react_1.useState)(function () {
|
|
465
|
+
var _a;
|
|
466
|
+
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
467
|
+
}), selectedTab = _145[0], setSelectedTab = _145[1];
|
|
468
|
+
var _146 = (0, react_1.useState)("dayGridMonth"), calendarView = _146[0], setCalendarView = _146[1];
|
|
453
469
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
454
470
|
// (calendarView above drives the matching range query)
|
|
455
|
-
var
|
|
456
|
-
var
|
|
471
|
+
var _147 = (0, react_1.useState)("month"), newCalendarViewMode = _147[0], setNewCalendarViewMode = _147[1];
|
|
472
|
+
var _148 = (0, react_1.useState)(new Date()), calendarTabMonth = _148[0], setCalendarTabMonth = _148[1];
|
|
457
473
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
458
474
|
// whenever its settings change, and that must not undo the user's switch
|
|
459
475
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
460
|
-
var
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
var
|
|
476
|
+
var _149 = (0, react_1.useState)(true), kanbanDroppable = _149[0], setKanbanDroppable = _149[1];
|
|
477
|
+
var _150 = (0, react_1.useState)([]), kanbanOptions = _150[0], setKanbanOptions = _150[1];
|
|
478
|
+
var _151 = (0, react_1.useState)(false), batchUpdateModal = _151[0], setBatchUpdateModal = _151[1];
|
|
479
|
+
var _152 = (0, react_1.useState)({
|
|
464
480
|
columnId: "",
|
|
465
481
|
columnData: {},
|
|
466
|
-
}), batchUpdateData =
|
|
482
|
+
}), batchUpdateData = _152[0], setBatchUpdateData = _152[1];
|
|
467
483
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
468
484
|
// join the structure hidden; the ones a user shows are kept per view
|
|
469
|
-
var isSystemColumnsEnabled = !!((
|
|
470
|
-
var isSystemColumnsLocked = !!((
|
|
485
|
+
var isSystemColumnsEnabled = !!((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareSystemColumns);
|
|
486
|
+
var isSystemColumnsLocked = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumnsLocked);
|
|
471
487
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
472
488
|
? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
|
|
473
489
|
: [];
|
|
474
|
-
var
|
|
490
|
+
var _153 = (0, react_1.useState)((_w = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _w !== void 0 ? _w : []), shownSystemColumnIds = _153[0], setShownSystemColumnIds = _153[1];
|
|
475
491
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
476
492
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
477
493
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
478
494
|
};
|
|
479
|
-
var
|
|
495
|
+
var _154 = (0, react_1.useState)(function () {
|
|
480
496
|
var _a;
|
|
481
497
|
var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
|
|
482
498
|
if (!persistedState)
|
|
@@ -503,8 +519,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
503
519
|
});
|
|
504
520
|
}
|
|
505
521
|
return model;
|
|
506
|
-
}), structure =
|
|
507
|
-
var
|
|
522
|
+
}), structure = _154[0], setStructure = _154[1];
|
|
523
|
+
var _155 = (0, react_1.useState)(((_x = props === null || props === void 0 ? void 0 : props.organise) === null || _x === void 0 ? void 0 : _x.additionalQuery) || []), additionalQuery = _155[0], setAdditionalQuery = _155[1];
|
|
508
524
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
509
525
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
510
526
|
var defaultFlexFilterRow = [
|
|
@@ -515,9 +531,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
515
531
|
value: undefined,
|
|
516
532
|
},
|
|
517
533
|
];
|
|
518
|
-
var
|
|
534
|
+
var _156 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
519
535
|
? persistedState.flexFilters
|
|
520
|
-
: defaultFlexFilterRow), flexFilters =
|
|
536
|
+
: defaultFlexFilterRow), flexFilters = _156[0], setFlexFilters = _156[1];
|
|
521
537
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
522
538
|
// clear methods so chained calls in one tick aren't stale.
|
|
523
539
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -530,81 +546,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
530
546
|
}, [flexFilters]);
|
|
531
547
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
532
548
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
533
|
-
var
|
|
549
|
+
var _157 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
534
550
|
? persistedState.flexFilters
|
|
535
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
551
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _157[0], setFlexFiltersDebounced = _157[1];
|
|
536
552
|
// INFO: the filter rows of the export being set up — started from the
|
|
537
553
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
538
|
-
var
|
|
539
|
-
var
|
|
540
|
-
var
|
|
541
|
-
var
|
|
542
|
-
var
|
|
554
|
+
var _158 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _158[0], setExportFlexFilters = _158[1];
|
|
555
|
+
var _159 = (0, react_1.useState)({}), flexFilterReferenceOptions = _159[0], setFlexFilterReferenceOptions = _159[1];
|
|
556
|
+
var _160 = (0, react_1.useState)({}), flexFilterReferenceSearch = _160[0], setFlexFilterReferenceSearch = _160[1];
|
|
557
|
+
var _161 = (0, react_1.useState)(false), flexFilterModalOpen = _161[0], setFlexFilterModalOpen = _161[1];
|
|
558
|
+
var _162 = (0, react_1.useState)(false), viewSettingsModalOpen = _162[0], setViewSettingsModalOpen = _162[1];
|
|
543
559
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
544
560
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
545
561
|
// structure to props.model whenever props change, which would wipe the
|
|
546
562
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
547
563
|
// structure — writing user hides there would blur the two concepts.
|
|
548
|
-
var
|
|
549
|
-
var
|
|
550
|
-
var
|
|
551
|
-
var
|
|
564
|
+
var _163 = (0, react_1.useState)((_y = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _y !== void 0 ? _y : []), userHiddenColumnIds = _163[0], setUserHiddenColumnIds = _163[1];
|
|
565
|
+
var _164 = (0, react_1.useState)(""), columnSearch = _164[0], setColumnSearch = _164[1];
|
|
566
|
+
var _165 = (0, react_1.useState)([]), savedViews = _165[0], setSavedViews = _165[1];
|
|
567
|
+
var _166 = (0, react_1.useState)(null), activeSavedViewId = _166[0], setActiveSavedViewId = _166[1];
|
|
552
568
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
553
|
-
var
|
|
569
|
+
var _167 = (0, react_1.useState)(function () { var _a, _b, _c; return (_c = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.columnWidths) !== null && _c !== void 0 ? _c : {}; }), columnWidths = _167[0], setColumnWidths = _167[1];
|
|
554
570
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
555
571
|
// so the defaults drawn before it never overwrite a person's own
|
|
556
|
-
var
|
|
572
|
+
var _168 = (0, react_1.useState)(false), isViewDraftReady = _168[0], setIsViewDraftReady = _168[1];
|
|
557
573
|
// INFO: null while the name box is closed
|
|
558
|
-
var
|
|
559
|
-
var
|
|
560
|
-
var
|
|
574
|
+
var _169 = (0, react_1.useState)(null), savedViewName = _169[0], setSavedViewName = _169[1];
|
|
575
|
+
var _170 = (0, react_1.useState)(null), deletingSavedViewId = _170[0], setDeletingSavedViewId = _170[1];
|
|
576
|
+
var _171 = (0, react_1.useState)(null), draggingColumnId = _171[0], setDraggingColumnId = _171[1];
|
|
561
577
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
562
578
|
//INFO : Used by Auth
|
|
563
|
-
var
|
|
579
|
+
var _172 = (0, react_1.useState)({
|
|
564
580
|
email: "",
|
|
565
581
|
google: "",
|
|
566
582
|
phone: "",
|
|
567
583
|
disabled: false,
|
|
568
584
|
create: false,
|
|
569
|
-
}), authMethods =
|
|
570
|
-
var
|
|
585
|
+
}), authMethods = _172[0], setAuthMethods = _172[1];
|
|
586
|
+
var _173 = (0, react_1.useState)(""), selectedAuthMethod = _173[0], setSelectedAuthMethod = _173[1];
|
|
571
587
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
572
588
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
573
|
-
var
|
|
589
|
+
var _174 = (0, react_1.useState)(false), authLoading = _174[0], setAuthLoading = _174[1];
|
|
574
590
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
575
591
|
// the state has rendered, and the state disables the confirm button
|
|
576
592
|
var deletingRef = (0, react_1.useRef)(false);
|
|
577
|
-
var
|
|
593
|
+
var _175 = (0, react_1.useState)(false), deleting = _175[0], setDeleting = _175[1];
|
|
578
594
|
// INFO: Used by Activity Log
|
|
579
|
-
var
|
|
580
|
-
var
|
|
595
|
+
var _176 = (0, react_1.useState)(false), activityModal = _176[0], setActivityModal = _176[1];
|
|
596
|
+
var _177 = (0, react_1.useState)(""), activityId = _177[0], setActivityId = _177[1];
|
|
581
597
|
//INFO : Used by Export
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
var
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
596
|
-
var
|
|
598
|
+
var _178 = (0, react_1.useState)(null), csvFile = _178[0], setCSVFile = _178[1];
|
|
599
|
+
var _179 = (0, react_1.useState)([]), csvFileData = _179[0], setCSVFileData = _179[1];
|
|
600
|
+
var _180 = (0, react_1.useState)(0), stepCSVIndex = _180[0], setStepCSVIndex = _180[1];
|
|
601
|
+
var _181 = (0, react_1.useState)({}), listCSVMapAttribute = _181[0], setListCSVMapAttribute = _181[1];
|
|
602
|
+
var _182 = (0, react_1.useState)({}), listCSVObjAttribute = _182[0], setListCSVObjAttribute = _182[1];
|
|
603
|
+
var _183 = (0, react_1.useState)([]), csvAPIAttribute = _183[0], setCSVAPIAttribute = _183[1];
|
|
604
|
+
var _184 = (0, react_1.useState)(((_z = props.devSettings.currentUser) === null || _z === void 0 ? void 0 : _z.userEmail) || ""), exportCSVEmail = _184[0], setExportCSVEmail = _184[1];
|
|
605
|
+
var _185 = (0, react_1.useState)(((_1 = (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.exportSettings) === null || _1 === void 0 ? void 0 : _1.defaultExportPDFName) || ""), exportPDFTitle = _185[0], setExportPDFTitle = _185[1];
|
|
606
|
+
var _186 = (0, react_1.useState)(false), exportPDFLoading = _186[0], setExportPDFLoading = _186[1];
|
|
607
|
+
var _187 = (0, react_1.useState)(false), exportReadPDFLoading = _187[0], setExportReadPDFLoading = _187[1];
|
|
608
|
+
var _188 = (0, react_1.useState)((_4 = (_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.exportSettings) === null || _3 === void 0 ? void 0 : _3.sumColumnId) !== null && _4 !== void 0 ? _4 : []), exportSumAttributeIds = _188[0], setExportSumAttributeIds = _188[1];
|
|
609
|
+
var _189 = (0, react_1.useState)((_7 = (_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.hideSubItems) !== null && _7 !== void 0 ? _7 : false), hideSubItems = _189[0], setHideSubItems = _189[1];
|
|
610
|
+
var _190 = (0, react_1.useState)([]), importTableData = _190[0], setImportTableData = _190[1];
|
|
611
|
+
var _191 = (0, react_1.useState)([]), queryList = _191[0], setQueryList = _191[1];
|
|
612
|
+
var _192 = (0, react_1.useState)(undefined), allQueryList = _192[0], setAllQueryList = _192[1];
|
|
597
613
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
598
614
|
// ungrouped, so it opens ungrouped
|
|
599
|
-
var
|
|
615
|
+
var _193 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
600
616
|
? persistedState.groupBy || undefined
|
|
601
|
-
: (
|
|
617
|
+
: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.groupBy), groupId = _193[0], setGroupId = _193[1];
|
|
602
618
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
603
619
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
604
620
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
605
621
|
// next page as the user scrolls inside that band, independent of every other
|
|
606
622
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
607
|
-
var
|
|
623
|
+
var _194 = (0, react_1.useState)({}), groupPageState = _194[0], setGroupPageState = _194[1];
|
|
608
624
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
609
625
|
// in one tick do not re-fetch an already in-flight page.
|
|
610
626
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -613,59 +629,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
613
629
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
614
630
|
// arrival instead of appending rows that belong to the old list
|
|
615
631
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
616
|
-
var
|
|
617
|
-
var
|
|
632
|
+
var _195 = (0, react_1.useState)(""), readTabSection = _195[0], setReadTabSection = _195[1];
|
|
633
|
+
var _196 = (0, react_1.useState)(false), readFloatingNav = _196[0], setReadFloatingNav = _196[1];
|
|
618
634
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
619
635
|
//INFO : Used by Read
|
|
620
636
|
//INFO : Used by Update
|
|
621
|
-
var
|
|
622
|
-
var
|
|
623
|
-
var
|
|
624
|
-
var
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var
|
|
637
|
+
var _197 = (0, react_1.useState)(false), modalVisible = _197[0], setModalVisible = _197[1];
|
|
638
|
+
var _198 = (0, react_1.useState)(false), deleteModal = _198[0], setDeleteModal = _198[1];
|
|
639
|
+
var _199 = (0, react_1.useState)(false), excelModal = _199[0], setExcelModal = _199[1];
|
|
640
|
+
var _200 = (0, react_1.useState)(false), exportExcel = _200[0], setExportExcel = _200[1];
|
|
641
|
+
var _201 = (0, react_1.useState)(""), exportType = _201[0], setExportType = _201[1];
|
|
642
|
+
var _202 = (0, react_1.useState)(false), exportQR = _202[0], setExportQR = _202[1];
|
|
643
|
+
var _203 = (0, react_1.useState)(function () {
|
|
628
644
|
var _a, _b;
|
|
629
645
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
630
646
|
return firstTabId;
|
|
631
|
-
}), activeTab =
|
|
632
|
-
var
|
|
633
|
-
var
|
|
634
|
-
var
|
|
635
|
-
var
|
|
636
|
-
var
|
|
637
|
-
var
|
|
638
|
-
var
|
|
647
|
+
}), activeTab = _203[0], setActiveTab = _203[1];
|
|
648
|
+
var _204 = (0, react_1.useState)(false), signatureSigning = _204[0], setSignatureSigning = _204[1];
|
|
649
|
+
var _205 = (0, react_1.useState)({}), selectedData = _205[0], setSelectedData = _205[1];
|
|
650
|
+
var _206 = (0, react_1.useState)(""), selectedObjectStructureId = _206[0], setSelectedObjectStructureId = _206[1];
|
|
651
|
+
var _207 = (0, react_1.useState)(""), selectedObjectId = _207[0], setSelectedObjectId = _207[1];
|
|
652
|
+
var _208 = (0, react_1.useState)(""), selectedListAddressId = _208[0], setSelectedListAddressId = _208[1];
|
|
653
|
+
var _209 = (0, react_1.useState)(-1), selectedListAddressIndex = _209[0], setSelectedListAddressIndex = _209[1];
|
|
654
|
+
var _210 = (0, react_1.useState)({
|
|
639
655
|
lat: 0,
|
|
640
656
|
lng: 0,
|
|
641
657
|
name: "",
|
|
642
|
-
}), selectedListAddress =
|
|
643
|
-
var
|
|
644
|
-
var
|
|
645
|
-
var
|
|
646
|
-
var
|
|
647
|
-
var
|
|
648
|
-
var
|
|
649
|
-
var
|
|
650
|
-
var
|
|
651
|
-
var
|
|
652
|
-
var
|
|
658
|
+
}), selectedListAddress = _210[0], setSelectedListAddress = _210[1];
|
|
659
|
+
var _211 = (0, react_1.useState)({}), selectedObjectData = _211[0], setSelectedObjectData = _211[1];
|
|
660
|
+
var _212 = (0, react_1.useState)(null), objectCellEdit = _212[0], setObjectCellEdit = _212[1];
|
|
661
|
+
var _213 = (0, react_1.useState)(false), referenceLoading = _213[0], setReferenceLoading = _213[1];
|
|
662
|
+
var _214 = (0, react_1.useState)({}), referencesOptions = _214[0], setReferencesOptions = _214[1];
|
|
663
|
+
var _215 = (0, react_1.useState)({}), referencesDetails = _215[0], setReferencesDetails = _215[1];
|
|
664
|
+
var _216 = (0, react_1.useState)({}), listReferencesOptions = _216[0], setListReferencesOptions = _216[1];
|
|
665
|
+
var _217 = (0, react_1.useState)({}), referenceDeleteTableData = _217[0], setReferenceDeleteTableData = _217[1];
|
|
666
|
+
var _218 = (0, react_1.useState)([]), relatedSections = _218[0], setRelatedSections = _218[1];
|
|
667
|
+
var _219 = (0, react_1.useState)(0), referenceDeleteIndex = _219[0], setReferenceDeleteIndex = _219[1];
|
|
668
|
+
var _220 = (0, react_1.useState)({
|
|
653
669
|
id: "",
|
|
654
670
|
name: "",
|
|
655
671
|
type: "string",
|
|
656
|
-
}), referenceCreationModal =
|
|
657
|
-
var
|
|
658
|
-
var
|
|
672
|
+
}), referenceCreationModal = _220[0], setReferenceCreationModal = _220[1];
|
|
673
|
+
var _221 = (0, react_1.useState)({}), referenceModelSchema = _221[0], setReferenceSchema = _221[1];
|
|
674
|
+
var _222 = (0, react_1.useState)([]), kanbanChecked = _222[0], setKanbanChecked = _222[1];
|
|
659
675
|
//INFO : Offline
|
|
660
|
-
var
|
|
661
|
-
var
|
|
676
|
+
var _223 = (0, react_1.useState)(0), offlineDataLength = _223[0], setOfflineDataLength = _223[1];
|
|
677
|
+
var _224 = (0, react_1.useState)(false), offlineModal = _224[0], setOfflineModal = _224[1];
|
|
662
678
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
663
|
-
var
|
|
664
|
-
var
|
|
679
|
+
var _225 = (0, react_1.useState)(false), isLive = _225[0], setIsLive = _225[1];
|
|
680
|
+
var _226 = (0, react_1.useState)(false), isLiveOffline = _226[0], setIsLiveOffline = _226[1];
|
|
665
681
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
666
682
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
667
683
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
668
|
-
var
|
|
684
|
+
var _227 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _227[0], setIsNetworkOffline = _227[1];
|
|
669
685
|
var previousType = (0, react_1.useRef)(null);
|
|
670
686
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
671
687
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -782,11 +798,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
782
798
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
783
799
|
* shared link or a back button.
|
|
784
800
|
*/
|
|
785
|
-
var defaultTabName = (
|
|
801
|
+
var defaultTabName = (_11 = (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.extendedTabs) === null || _10 === void 0 ? void 0 : _10.find(function (eachTab) { return eachTab.defaultTab; })) === null || _11 === void 0 ? void 0 : _11.name;
|
|
786
802
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
787
803
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
788
804
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
789
|
-
var viewType =
|
|
805
|
+
var viewType = listViewId !== null && listViewId !== void 0 ? listViewId : (resolvedType === "list" && defaultTabName
|
|
790
806
|
? (0, utils_1.lowercaseTextToId)(defaultTabName)
|
|
791
807
|
: "general");
|
|
792
808
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
@@ -846,7 +862,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
846
862
|
};
|
|
847
863
|
return [2 /*return*/, referenceSources
|
|
848
864
|
.map(function (eachSource, index) { return ({
|
|
849
|
-
id: "
|
|
865
|
+
id: "".concat(RELATED_VIEW_PREFIX).concat(eachSource.collectionId, "_").concat(eachSource.column.id),
|
|
850
866
|
label: handleIsShared(eachSource.collectionId)
|
|
851
867
|
? "".concat(eachSource.collectionName, " \u00B7 ").concat(eachSource.column.name)
|
|
852
868
|
: eachSource.collectionName,
|
|
@@ -889,7 +905,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
889
905
|
var isSchemaHideMode = ((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.onChangeHide) ? true : false;
|
|
890
906
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
891
907
|
// the persisted value and falls back to the consumer's limit
|
|
892
|
-
var
|
|
908
|
+
var _228 = (0, react_1.useState)((_20 = (_19 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _19 !== void 0 ? _19 : props.limit) !== null && _20 !== void 0 ? _20 : 10), pageLimit = _228[0], setPageLimit = _228[1];
|
|
893
909
|
var limit = pageLimit;
|
|
894
910
|
var isSavedViewsEnabled = !!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.savedViews) && resolvedType === "list";
|
|
895
911
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
@@ -1001,7 +1017,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1001
1017
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1002
1018
|
};
|
|
1003
1019
|
};
|
|
1004
|
-
var
|
|
1020
|
+
var _229 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _229.canUpdateRecord, canInlineUpdate = _229.canInlineUpdate, canBatchUpdate = _229.canBatchUpdate, canDeleteRecord = _229.canDeleteRecord;
|
|
1005
1021
|
var isEditor = ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.allEditable) ? true : false;
|
|
1006
1022
|
var isOffline = (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareOffline;
|
|
1007
1023
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -2236,21 +2252,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2236
2252
|
previousType.current = resolvedType;
|
|
2237
2253
|
}, [resolvedType, props.id]);
|
|
2238
2254
|
(0, react_1.useEffect)(function () {
|
|
2239
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
2255
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2240
2256
|
var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
2241
2257
|
var currentTab, defaultViewSwitch, kanbanSettings, kanbanTitle_1, kanbanRefRQ_1, kanbanRefOption_1, kanbanRefLabel_1, kanbanRefQuery;
|
|
2242
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
2243
|
-
return __generator(this, function (
|
|
2244
|
-
switch (
|
|
2258
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2259
|
+
return __generator(this, function (_h) {
|
|
2260
|
+
switch (_h.label) {
|
|
2245
2261
|
case 0:
|
|
2246
|
-
currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs,
|
|
2262
|
+
currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
2247
2263
|
if (!(resolvedType === "list")) return [3 /*break*/, 5];
|
|
2248
2264
|
setSelectedTab(currentTab);
|
|
2249
2265
|
if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "calendar")) return [3 /*break*/, 1];
|
|
2250
|
-
if ((
|
|
2266
|
+
if ((_b = currentTab === null || currentTab === void 0 ? void 0 : currentTab.calendarSettings) === null || _b === void 0 ? void 0 : _b.defaultStartDate) {
|
|
2251
2267
|
setCalendarTabMonth((0, dayjs_1.default)(currentTab.calendarSettings.defaultStartDate).toDate());
|
|
2252
2268
|
}
|
|
2253
|
-
defaultViewSwitch = (
|
|
2269
|
+
defaultViewSwitch = (_c = currentTab === null || currentTab === void 0 ? void 0 : currentTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultViewSwitch;
|
|
2254
2270
|
if (defaultViewSwitch && !calendarViewInitRef.current) {
|
|
2255
2271
|
setNewCalendarViewMode(defaultViewSwitch);
|
|
2256
2272
|
setCalendarView(CALENDAR_VIEW_BY_SWITCH[defaultViewSwitch]);
|
|
@@ -2262,7 +2278,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2262
2278
|
case 1:
|
|
2263
2279
|
if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "kanban")) return [3 /*break*/, 4];
|
|
2264
2280
|
kanbanSettings = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings;
|
|
2265
|
-
kanbanTitle_1 = (
|
|
2281
|
+
kanbanTitle_1 = (_d = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _d !== void 0 ? _d : "";
|
|
2266
2282
|
kanbanRefRQ_1 = null;
|
|
2267
2283
|
kanbanRefOption_1 = [];
|
|
2268
2284
|
kanbanRefLabel_1 = "";
|
|
@@ -2287,10 +2303,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2287
2303
|
return [4 /*yield*/, kanbanRefRQ_1.call({
|
|
2288
2304
|
type: "list",
|
|
2289
2305
|
limit: limit,
|
|
2290
|
-
query: ((
|
|
2306
|
+
query: ((_e = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings) === null || _e === void 0 ? void 0 : _e.query) || undefined,
|
|
2291
2307
|
})];
|
|
2292
2308
|
case 2:
|
|
2293
|
-
kanbanRefQuery =
|
|
2309
|
+
kanbanRefQuery = _h.sent();
|
|
2294
2310
|
if (kanbanRefQuery.data) {
|
|
2295
2311
|
kanbanRefQuery.data.map(function (eachData) {
|
|
2296
2312
|
kanbanRefOption_1.push({
|
|
@@ -2300,7 +2316,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2300
2316
|
return null;
|
|
2301
2317
|
});
|
|
2302
2318
|
}
|
|
2303
|
-
|
|
2319
|
+
_h.label = 3;
|
|
2304
2320
|
case 3:
|
|
2305
2321
|
setKanbanOptions(kanbanRefOption_1);
|
|
2306
2322
|
return [3 /*break*/, 5];
|
|
@@ -2313,14 +2329,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2313
2329
|
setFilterSearch({});
|
|
2314
2330
|
setFilterSearchParams({});
|
|
2315
2331
|
if (currentTab.structure)
|
|
2316
|
-
setStructure((
|
|
2332
|
+
setStructure((_f = currentTab.structure) !== null && _f !== void 0 ? _f : []);
|
|
2317
2333
|
if (currentTab.additionalQuery)
|
|
2318
|
-
setAdditionalQuery((
|
|
2334
|
+
setAdditionalQuery((_g = currentTab.additionalQuery) !== null && _g !== void 0 ? _g : []);
|
|
2319
2335
|
if (currentTab.groupBy)
|
|
2320
2336
|
setGroupId(currentTab.groupBy);
|
|
2321
2337
|
setExportPDFTitle(currentTab === null || currentTab === void 0 ? void 0 : currentTab.name);
|
|
2322
2338
|
}
|
|
2323
|
-
|
|
2339
|
+
_h.label = 5;
|
|
2324
2340
|
case 5: return [2 /*return*/];
|
|
2325
2341
|
}
|
|
2326
2342
|
});
|
|
@@ -2359,9 +2375,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2359
2375
|
model: props.model,
|
|
2360
2376
|
localURLEndpoint: props.localURLEndpoint,
|
|
2361
2377
|
extendedTabs: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.extendedTabs,
|
|
2362
|
-
viewId:
|
|
2363
|
-
additionalQuery: (
|
|
2364
|
-
groupBy: (
|
|
2378
|
+
viewId: listViewId,
|
|
2379
|
+
additionalQuery: (_j = props.organise) === null || _j === void 0 ? void 0 : _j.additionalQuery,
|
|
2380
|
+
groupBy: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.groupBy,
|
|
2365
2381
|
type: resolvedType,
|
|
2366
2382
|
};
|
|
2367
2383
|
var safeReplacer = function () {
|
|
@@ -2388,9 +2404,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2388
2404
|
props.model,
|
|
2389
2405
|
props.localURLEndpoint,
|
|
2390
2406
|
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.extendedTabs,
|
|
2391
|
-
|
|
2392
|
-
(
|
|
2393
|
-
(
|
|
2407
|
+
listViewId,
|
|
2408
|
+
(_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.additionalQuery,
|
|
2409
|
+
(_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.groupBy,
|
|
2394
2410
|
resolvedType,
|
|
2395
2411
|
]);
|
|
2396
2412
|
/**
|
|
@@ -2542,7 +2558,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2542
2558
|
};
|
|
2543
2559
|
}, 100);
|
|
2544
2560
|
return function () { return clearTimeout(timeoutId); };
|
|
2545
|
-
}, [(
|
|
2561
|
+
}, [(_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2546
2562
|
(0, react_1.useEffect)(function () {
|
|
2547
2563
|
if (resolvedType !== "read")
|
|
2548
2564
|
return;
|
|
@@ -5618,7 +5634,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5618
5634
|
// update an inline cell edit makes, gated on the same update right
|
|
5619
5635
|
var columnTypeActions = {
|
|
5620
5636
|
canUpdate: canUpdateRecord,
|
|
5621
|
-
onButtonClick: (
|
|
5637
|
+
onButtonClick: (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.onButtonClick,
|
|
5622
5638
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5623
5639
|
var _a;
|
|
5624
5640
|
return __generator(this, function (_b) {
|
|
@@ -5635,7 +5651,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5635
5651
|
}
|
|
5636
5652
|
});
|
|
5637
5653
|
}); },
|
|
5638
|
-
onTimeTrackingAction: ((
|
|
5654
|
+
onTimeTrackingAction: ((_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.onTimeTrackingAction) && canUpdateRecord
|
|
5639
5655
|
? function (rowId, columnId, action) {
|
|
5640
5656
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5641
5657
|
}
|
|
@@ -7849,8 +7865,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7849
7865
|
: rows;
|
|
7850
7866
|
};
|
|
7851
7867
|
/* eslint-disable */
|
|
7852
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7853
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
7868
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.bareNewDTW]);
|
|
7869
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.bareNewDTW]);
|
|
7854
7870
|
/* eslint-enable */
|
|
7855
7871
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7856
7872
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -10494,7 +10510,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10494
10510
|
renderTabContent(tabs, dataType, requestedViewType),
|
|
10495
10511
|
react_1.default.createElement("span", { ref: scrollScopeEndRef, hidden: true, "aria-hidden": "true" }))); };
|
|
10496
10512
|
var renderTabContent = function (tabs, dataType, requestedViewType) {
|
|
10497
|
-
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;
|
|
10513
|
+
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;
|
|
10498
10514
|
var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
|
|
10499
10515
|
/**
|
|
10500
10516
|
* INFO: a list tab must not supply the content of a read view. The selected
|
|
@@ -11210,22 +11226,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11210
11226
|
className: ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareNewDTW)
|
|
11211
11227
|
? ""
|
|
11212
11228
|
: "p-4 rounded-lg ".concat(((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode) ? "bg-white/5" : "bg-white") },
|
|
11213
|
-
((_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.darkMode,
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11229
|
+
((_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.darkMode,
|
|
11230
|
+
// INFO: rows are clickable only where a click can open the
|
|
11231
|
+
// record. Without a navigate handler (the activity panel's
|
|
11232
|
+
// comments) the click did nothing, yet every row showed the
|
|
11233
|
+
// pointer cursor.
|
|
11234
|
+
onClickItem: ((_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.handleNavigate)
|
|
11235
|
+
? function (id) {
|
|
11236
|
+
var _a, _b;
|
|
11237
|
+
handleCaptureListScroll(id);
|
|
11238
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
11239
|
+
}
|
|
11240
|
+
: undefined })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode })),
|
|
11218
11241
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
11219
11242
|
contentList_1.length > 0 &&
|
|
11220
|
-
!((
|
|
11221
|
-
((
|
|
11243
|
+
!((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
|
|
11244
|
+
((_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) {
|
|
11222
11245
|
handlePagination(value);
|
|
11223
11246
|
} })),
|
|
11224
11247
|
contentList_1.length > 0 &&
|
|
11225
|
-
!((
|
|
11226
|
-
!((
|
|
11248
|
+
!((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.hidePagination) &&
|
|
11249
|
+
!((_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) {
|
|
11227
11250
|
handlePagination(value);
|
|
11228
|
-
}, darkMode: (
|
|
11251
|
+
}, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, customPaginationSize: customPaginationSize }))))));
|
|
11229
11252
|
}
|
|
11230
11253
|
else if (selectedTabData.viewType === "map") {
|
|
11231
11254
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -11328,7 +11351,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11328
11351
|
}
|
|
11329
11352
|
else if (selectedTabData.viewType === "kanban") {
|
|
11330
11353
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
11331
|
-
var kanbanTitle_2 = (
|
|
11354
|
+
var kanbanTitle_2 = (_56 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _56 !== void 0 ? _56 : "";
|
|
11332
11355
|
var nullColumn_1 = false;
|
|
11333
11356
|
var groupBy_1 = [];
|
|
11334
11357
|
var groupLabel_1 = [];
|
|
@@ -11349,13 +11372,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11349
11372
|
});
|
|
11350
11373
|
var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
|
|
11351
11374
|
// INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
|
|
11352
|
-
if ((
|
|
11375
|
+
if ((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareNewDTW) {
|
|
11353
11376
|
return (
|
|
11354
11377
|
// INFO: the same top spacing as the table, list and grid
|
|
11355
11378
|
react_1.default.createElement("div", { className: "mt-5" },
|
|
11356
11379
|
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
|
|
11357
11380
|
? "Data has exceeded limit, please apply filters"
|
|
11358
|
-
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (
|
|
11381
|
+
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareListMobileView, onUpdateData: canUpdateRecord
|
|
11359
11382
|
? function (cardId, _fromCol, toCol) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11360
11383
|
var _a;
|
|
11361
11384
|
return __generator(this, function (_b) {
|
|
@@ -11382,7 +11405,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11382
11405
|
var _a, _b;
|
|
11383
11406
|
handleCaptureListScroll(id);
|
|
11384
11407
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
11385
|
-
}, onCardEdit: recordEditAction, onCardActivity: recordActivityAction, darkMode: (
|
|
11408
|
+
}, onCardEdit: recordEditAction, onCardActivity: recordActivityAction, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg })));
|
|
11386
11409
|
}
|
|
11387
11410
|
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
|
|
11388
11411
|
? "Data has exceeded limit, please apply filters"
|
|
@@ -11416,7 +11439,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11416
11439
|
} }));
|
|
11417
11440
|
}
|
|
11418
11441
|
else if (selectedTabData.viewType === "chart") {
|
|
11419
|
-
return (react_1.default.createElement(chartView_1.ChartView, { charts: (
|
|
11442
|
+
return (react_1.default.createElement(chartView_1.ChartView, { charts: (_61 = selectedTabData.chartSettings) !== null && _61 !== void 0 ? _61 : [], structure: structure, collectionId: props.collectionId, devSettings: props.devSettings, filterQuery: (_62 = renderImpSearchFilterConditions()) !== null && _62 !== void 0 ? _62 : [], editable: isEditor, darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, onChangeCharts: ((_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.onChangeTabs)
|
|
11420
11443
|
? function (charts) {
|
|
11421
11444
|
return handleChangeTabCharts(selectedTabData.name, charts);
|
|
11422
11445
|
}
|
|
@@ -11887,14 +11910,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11887
11910
|
};
|
|
11888
11911
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11889
11912
|
renderNotification("root"),
|
|
11890
|
-
((
|
|
11913
|
+
((_98 = (_97 = props.renderSettings) === null || _97 === void 0 ? void 0 : _97.renderLoadingUI) === null || _98 === void 0 ? void 0 : _98.call(_97)) && loading ? ((_99 = props.renderSettings) === null || _99 === void 0 ? void 0 : _99.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkMode, darkModeBg: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11891
11914
|
var _a, _b;
|
|
11892
11915
|
if (loading)
|
|
11893
11916
|
return;
|
|
11894
11917
|
handlePopUpModal(false);
|
|
11895
11918
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11896
11919
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11897
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11920
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11898
11921
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11899
11922
|
if (dataId) {
|
|
11900
11923
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11910,19 +11933,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11910
11933
|
}, onClose: function () {
|
|
11911
11934
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11912
11935
|
} }),
|
|
11913
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11936
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11914
11937
|
setReferenceDeleteTableData({});
|
|
11915
11938
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11916
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11939
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11917
11940
|
setDeletePasscodeInput("");
|
|
11918
11941
|
setDeleteModal(!deleteModal);
|
|
11919
11942
|
setDeleteFeedId("");
|
|
11920
11943
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11921
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11944
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11922
11945
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11923
11946
|
setBatchUpdateModal(false);
|
|
11924
11947
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11925
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11948
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11926
11949
|
var _a, _b;
|
|
11927
11950
|
if (props.space)
|
|
11928
11951
|
return (react_1.default.createElement(authModal_1.AuthModal, { space: props.space, userId: (_a = props.id) !== null && _a !== void 0 ? _a : "", client: (_b = props.lib) === null || _b === void 0 ? void 0 : _b.axios, type: selectedAuthMethod, authMethods: authMethods, onComplete: handleAuthComplete }));
|
|
@@ -11938,13 +11961,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11938
11961
|
(0, react_dom_1.createPortal)(
|
|
11939
11962
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11940
11963
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11941
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11964
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11942
11965
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11943
11966
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11944
11967
|
// toolbar's collection-wide button clears it when it opens.
|
|
11945
11968
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
11946
11969
|
? props.title
|
|
11947
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11970
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_114 = props.id) !== null && _114 !== void 0 ? _114 : "") : activityId, activityLog: (_115 = props.edit) === null || _115 === void 0 ? void 0 : _115.activityLog, model: structure }) })), document.body),
|
|
11948
11971
|
renderScrollSentinel()));
|
|
11949
11972
|
});
|
|
11950
11973
|
//# sourceMappingURL=index.js.map
|