blixify-ui-web 1.2.264 → 1.2.266
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/dataStateModel.d.ts +1 -1
- 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 +378 -281
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +3 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js +6 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +12 -6
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +176 -14
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/flexFilter/model.d.ts +1 -0
- package/lib/components/data/flexFilter/model.d.ts.map +1 -1
- package/lib/components/display/detailList/index.d.ts.map +1 -1
- package/lib/components/display/detailList/index.js +7 -1
- package/lib/components/display/detailList/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -235,7 +235,7 @@ var handleCheckEmptyCardValue = function (value) {
|
|
|
235
235
|
};
|
|
236
236
|
exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
|
|
237
237
|
exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
238
|
-
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, _116, _117, _118, _119, _120, _121, _122, _123, _124
|
|
238
|
+
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, _116, _117, _118, _119, _120, _121, _122, _123, _124;
|
|
239
239
|
// INFO: every view draws a lookup as its source column's type, read-only, so
|
|
240
240
|
// no type branch below meets "lookup"; rawProps.model keeps the lookups as
|
|
241
241
|
// stored for the columns handed back to the host
|
|
@@ -254,7 +254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
254
254
|
// the list never refetching while the panel is open, which fails silently.
|
|
255
255
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
256
256
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
257
|
-
var
|
|
257
|
+
var _125 = (0, react_1.useState)(false), drawerPageView = _125[0], setDrawerPageView = _125[1];
|
|
258
258
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
259
259
|
// live props. Without this, navigating back to the list would re-render the
|
|
260
260
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -309,7 +309,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
309
309
|
drawerFormEditedRef.current = false;
|
|
310
310
|
}
|
|
311
311
|
drawerOpenRef.current = isDrawerHost;
|
|
312
|
-
var
|
|
312
|
+
var _126 = (0, react_1.useState)(false), drawerDiscardModal = _126[0], setDrawerDiscardModal = _126[1];
|
|
313
313
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
314
314
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
315
315
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -388,14 +388,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
388
388
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
|
-
var
|
|
391
|
+
var _127 = intialiseDefaultFilterValues(), initialFilterSearch = _127.initialFilterSearch, initialFilterSearchParams = _127.initialFilterSearchParams, initialFilterSelection = _127.initialFilterSelection, initialFilterReference = _127.initialFilterReference, initialFilterReferenceDate = _127.initialFilterReferenceDate;
|
|
392
392
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
393
|
-
var
|
|
393
|
+
var _128 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
394
394
|
mode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.persistViewState,
|
|
395
395
|
collectionId: props.collectionId,
|
|
396
396
|
persistKey: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistKey,
|
|
397
397
|
type: resolvedType,
|
|
398
|
-
}), rawPersistedState =
|
|
398
|
+
}), rawPersistedState = _128.persistedState, isPersistEnabled = _128.isEnabled, handleSaveView = _128.handleSaveView, handleRegisterViewSnapshot = _128.handleRegisterViewSnapshot;
|
|
399
399
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
400
400
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
401
401
|
var _a, _b, _c, _d;
|
|
@@ -411,8 +411,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
411
411
|
(_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterListObjects,
|
|
412
412
|
(_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterRelated,
|
|
413
413
|
]);
|
|
414
|
-
var
|
|
415
|
-
var
|
|
414
|
+
var _129 = (0, react_1.useState)(false), loading = _129[0], setLoading = _129[1];
|
|
415
|
+
var _130 = (0, react_1.useState)(), notification = _130[0], setNotification = _130[1];
|
|
416
416
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
417
417
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
418
418
|
(0, react_1.useEffect)(function () {
|
|
@@ -422,67 +422,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
422
422
|
return function () { return clearTimeout(timer); };
|
|
423
423
|
}, [notification]);
|
|
424
424
|
//INFO : Used by List
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
var
|
|
425
|
+
var _131 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _q !== void 0 ? _q : initialFilterSearch), filterSearch = _131[0], setFilterSearch = _131[1];
|
|
426
|
+
var _132 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _r !== void 0 ? _r : initialFilterSearchParams), filterSearchParams = _132[0], setFilterSearchParams = _132[1];
|
|
427
|
+
var _133 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _s !== void 0 ? _s : initialFilterSelection), filterSelection = _133[0], setFilterSelection = _133[1];
|
|
428
|
+
var _134 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _t !== void 0 ? _t : initialFilterReference), filterReference = _134[0], setFilterReference = _134[1];
|
|
429
|
+
var _135 = (0, react_1.useState)({}), filterReferenceSearch = _135[0], setFilterReferenceSearch = _135[1];
|
|
430
|
+
var _136 = (0, react_1.useState)({}), filterReferenceList = _136[0], setFilterReferenceList = _136[1];
|
|
431
|
+
var _137 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
432
432
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
433
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
438
|
-
var
|
|
433
|
+
: initialFilterReferenceDate), filterReferenceDate = _137[0], setFilterReferenceDate = _137[1];
|
|
434
|
+
var _138 = (0, react_1.useState)(true), tableLoading = _138[0], setTableLoading = _138[1];
|
|
435
|
+
var _139 = (0, react_1.useState)(""), cursor = _139[0], setCursor = _139[1];
|
|
436
|
+
var _140 = (0, react_1.useState)(""), lastCursor = _140[0], setLastCursor = _140[1];
|
|
437
|
+
var _141 = (0, react_1.useState)([]), tableData = _141[0], setTableData = _141[1];
|
|
438
|
+
var _142 = (0, react_1.useState)([]), spaceTableData = _142[0], setSpaceTableData = _142[1];
|
|
439
439
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
440
440
|
// the state it closed over can predate an earlier save on the same row
|
|
441
441
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
442
442
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
443
443
|
tableDataRef.current = tableData;
|
|
444
444
|
spaceTableDataRef.current = spaceTableData;
|
|
445
|
-
var
|
|
446
|
-
var
|
|
445
|
+
var _143 = (0, react_1.useState)(0), size = _143[0], setSize = _143[1];
|
|
446
|
+
var _144 = (0, react_1.useState)((_w = (_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _u !== void 0 ? _u : (_v = props.organise) === null || _v === void 0 ? void 0 : _v.pageIndex) !== null && _w !== void 0 ? _w : 0), pageIndex = _144[0], setPageIndex = _144[1];
|
|
447
447
|
// INFO: every change of page, including the return to the first page when a
|
|
448
448
|
// filter or search changes, which onChangePagination does not always report
|
|
449
449
|
(0, react_1.useEffect)(function () {
|
|
450
450
|
var _a, _b;
|
|
451
451
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
452
452
|
}, [pageIndex]);
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var
|
|
457
|
-
var
|
|
453
|
+
var _145 = (0, react_1.useState)([]), selectedIds = _145[0], setSelectedIds = _145[1];
|
|
454
|
+
var _146 = (0, react_1.useState)(false), selectAll = _146[0], setSelectAll = _146[1];
|
|
455
|
+
var _147 = (0, react_1.useState)(""), deletePasscode = _147[0], setDeletePasscode = _147[1];
|
|
456
|
+
var _148 = (0, react_1.useState)(""), deletePasscodeInput = _148[0], setDeletePasscodeInput = _148[1];
|
|
457
|
+
var _149 = (0, react_1.useState)(""), deleteFeedId = _149[0], setDeleteFeedId = _149[1];
|
|
458
458
|
//INFO : Used by List Organise
|
|
459
459
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
460
460
|
// persistViewState is enabled and a persisted sort exists
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var
|
|
461
|
+
var _150 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _x !== void 0 ? _x : undefined), persistedSort = _150[0], setPersistedSort = _150[1];
|
|
462
|
+
var _151 = (0, react_1.useState)(false), filterDraft = _151[0], setFilterDraft = _151[1];
|
|
463
|
+
var _152 = (0, react_1.useState)(false), addTabModal = _152[0], setAddTabModal = _152[1];
|
|
464
|
+
var _153 = (0, react_1.useState)(-1), editTabIndex = _153[0], setEditTabIndex = _153[1];
|
|
465
465
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
466
466
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
467
|
-
var
|
|
467
|
+
var _154 = (0, react_1.useState)(function () {
|
|
468
468
|
var _a;
|
|
469
469
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
470
|
-
}), selectedTab =
|
|
471
|
-
var
|
|
470
|
+
}), selectedTab = _154[0], setSelectedTab = _154[1];
|
|
471
|
+
var _155 = (0, react_1.useState)("dayGridMonth"), calendarView = _155[0], setCalendarView = _155[1];
|
|
472
472
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
473
473
|
// (calendarView above drives the matching range query)
|
|
474
|
-
var
|
|
475
|
-
var
|
|
474
|
+
var _156 = (0, react_1.useState)("month"), newCalendarViewMode = _156[0], setNewCalendarViewMode = _156[1];
|
|
475
|
+
var _157 = (0, react_1.useState)(new Date()), calendarTabMonth = _157[0], setCalendarTabMonth = _157[1];
|
|
476
476
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
477
477
|
// whenever its settings change, and that must not undo the user's switch
|
|
478
478
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
479
|
-
var
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
var
|
|
479
|
+
var _158 = (0, react_1.useState)(true), kanbanDroppable = _158[0], setKanbanDroppable = _158[1];
|
|
480
|
+
var _159 = (0, react_1.useState)([]), kanbanOptions = _159[0], setKanbanOptions = _159[1];
|
|
481
|
+
var _160 = (0, react_1.useState)(false), batchUpdateModal = _160[0], setBatchUpdateModal = _160[1];
|
|
482
|
+
var _161 = (0, react_1.useState)({
|
|
483
483
|
columnId: "",
|
|
484
484
|
columnData: {},
|
|
485
|
-
}), batchUpdateData =
|
|
485
|
+
}), batchUpdateData = _161[0], setBatchUpdateData = _161[1];
|
|
486
486
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
487
487
|
// join the structure hidden; the ones a user shows are kept per view
|
|
488
488
|
var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
|
|
@@ -490,12 +490,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
490
490
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
491
491
|
? 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; }); })
|
|
492
492
|
: [];
|
|
493
|
-
var
|
|
493
|
+
var _162 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _162[0], setShownSystemColumnIds = _162[1];
|
|
494
494
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
495
495
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
496
496
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
497
497
|
};
|
|
498
|
-
var
|
|
498
|
+
var _163 = (0, react_1.useState)(function () {
|
|
499
499
|
var _a;
|
|
500
500
|
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 : []);
|
|
501
501
|
if (!persistedState)
|
|
@@ -522,8 +522,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
return model;
|
|
525
|
-
}), structure =
|
|
526
|
-
var
|
|
525
|
+
}), structure = _163[0], setStructure = _163[1];
|
|
526
|
+
var _164 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _164[0], setAdditionalQuery = _164[1];
|
|
527
527
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
528
528
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
529
529
|
var defaultFlexFilterRow = [
|
|
@@ -541,7 +541,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
541
541
|
: (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
542
542
|
? persistedState.flexFilters
|
|
543
543
|
: defaultFlexFilterRow;
|
|
544
|
-
var
|
|
544
|
+
var _165 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _165[0], setFlexFilters = _165[1];
|
|
545
545
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
546
546
|
// clear methods so chained calls in one tick aren't stale.
|
|
547
547
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -554,91 +554,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
554
554
|
}, [flexFilters]);
|
|
555
555
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
556
556
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
557
|
-
var
|
|
557
|
+
var _166 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _166[0], setFlexFiltersDebounced = _166[1];
|
|
558
558
|
// INFO: the filter rows of the export being set up — started from the
|
|
559
559
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var
|
|
560
|
+
var _167 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _167[0], setExportFlexFilters = _167[1];
|
|
561
|
+
var _168 = (0, react_1.useState)({}), flexFilterReferenceOptions = _168[0], setFlexFilterReferenceOptions = _168[1];
|
|
562
|
+
var _169 = (0, react_1.useState)({}), flexFilterReferenceSearch = _169[0], setFlexFilterReferenceSearch = _169[1];
|
|
563
|
+
var _170 = (0, react_1.useState)(false), flexFilterModalOpen = _170[0], setFlexFilterModalOpen = _170[1];
|
|
564
|
+
var _171 = (0, react_1.useState)(false), viewSettingsModalOpen = _171[0], setViewSettingsModalOpen = _171[1];
|
|
565
565
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
566
566
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
567
567
|
// structure to props.model whenever props change, which would wipe the
|
|
568
568
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
569
569
|
// structure — writing user hides there would blur the two concepts.
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
var
|
|
570
|
+
var _172 = (0, react_1.useState)((_3 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _3 !== void 0 ? _3 : []), userHiddenColumnIds = _172[0], setUserHiddenColumnIds = _172[1];
|
|
571
|
+
var _173 = (0, react_1.useState)(""), columnSearch = _173[0], setColumnSearch = _173[1];
|
|
572
|
+
var _174 = (0, react_1.useState)([]), savedViews = _174[0], setSavedViews = _174[1];
|
|
573
|
+
var _175 = (0, react_1.useState)(null), activeSavedViewId = _175[0], setActiveSavedViewId = _175[1];
|
|
574
574
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
575
|
-
var
|
|
575
|
+
var _176 = (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 = _176[0], setColumnWidths = _176[1];
|
|
576
576
|
// INFO: the columns the view on screen freezes at the left edge
|
|
577
|
-
var
|
|
577
|
+
var _177 = (0, react_1.useState)(function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.pinnedColumnIds; }), pinnedColumnIds = _177[0], setPinnedColumnIds = _177[1];
|
|
578
578
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
579
579
|
// so the defaults drawn before it never overwrite a person's own
|
|
580
|
-
var
|
|
580
|
+
var _178 = (0, react_1.useState)(false), isViewDraftReady = _178[0], setIsViewDraftReady = _178[1];
|
|
581
581
|
// INFO: null while the name box is closed
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
var
|
|
582
|
+
var _179 = (0, react_1.useState)(null), savedViewName = _179[0], setSavedViewName = _179[1];
|
|
583
|
+
var _180 = (0, react_1.useState)(null), deletingSavedViewId = _180[0], setDeletingSavedViewId = _180[1];
|
|
584
|
+
var _181 = (0, react_1.useState)(null), renamingSavedView = _181[0], setRenamingSavedView = _181[1];
|
|
585
|
+
var _182 = (0, react_1.useState)(false), isSavedViewsExpanded = _182[0], setIsSavedViewsExpanded = _182[1];
|
|
586
|
+
var _183 = (0, react_1.useState)(null), draggingColumnId = _183[0], setDraggingColumnId = _183[1];
|
|
587
587
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
588
588
|
//INFO : Used by Auth
|
|
589
|
-
var
|
|
589
|
+
var _184 = (0, react_1.useState)({
|
|
590
590
|
email: "",
|
|
591
591
|
google: "",
|
|
592
592
|
phone: "",
|
|
593
593
|
disabled: false,
|
|
594
594
|
create: false,
|
|
595
|
-
}), authMethods =
|
|
596
|
-
var
|
|
595
|
+
}), authMethods = _184[0], setAuthMethods = _184[1];
|
|
596
|
+
var _185 = (0, react_1.useState)(""), selectedAuthMethod = _185[0], setSelectedAuthMethod = _185[1];
|
|
597
597
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
598
598
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
599
|
-
var
|
|
599
|
+
var _186 = (0, react_1.useState)(false), authLoading = _186[0], setAuthLoading = _186[1];
|
|
600
600
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
601
601
|
// the state has rendered, and the state disables the confirm button
|
|
602
602
|
var deletingRef = (0, react_1.useRef)(false);
|
|
603
|
-
var
|
|
603
|
+
var _187 = (0, react_1.useState)(false), deleting = _187[0], setDeleting = _187[1];
|
|
604
604
|
// INFO: Used by Activity Log
|
|
605
|
-
var
|
|
606
|
-
var
|
|
605
|
+
var _188 = (0, react_1.useState)(false), activityModal = _188[0], setActivityModal = _188[1];
|
|
606
|
+
var _189 = (0, react_1.useState)(""), activityId = _189[0], setActivityId = _189[1];
|
|
607
607
|
//INFO : Used by Export
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
var
|
|
608
|
+
var _190 = (0, react_1.useState)(null), csvFile = _190[0], setCSVFile = _190[1];
|
|
609
|
+
var _191 = (0, react_1.useState)([]), csvFileData = _191[0], setCSVFileData = _191[1];
|
|
610
|
+
var _192 = (0, react_1.useState)(0), stepCSVIndex = _192[0], setStepCSVIndex = _192[1];
|
|
611
|
+
var _193 = (0, react_1.useState)({}), listCSVMapAttribute = _193[0], setListCSVMapAttribute = _193[1];
|
|
612
|
+
var _194 = (0, react_1.useState)({}), listCSVObjAttribute = _194[0], setListCSVObjAttribute = _194[1];
|
|
613
|
+
var _195 = (0, react_1.useState)([]), csvAPIAttribute = _195[0], setCSVAPIAttribute = _195[1];
|
|
614
|
+
var _196 = (0, react_1.useState)(((_4 = props.devSettings.currentUser) === null || _4 === void 0 ? void 0 : _4.userEmail) || ""), exportCSVEmail = _196[0], setExportCSVEmail = _196[1];
|
|
615
|
+
var _197 = (0, react_1.useState)(((_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.defaultExportPDFName) || ""), exportPDFTitle = _197[0], setExportPDFTitle = _197[1];
|
|
616
|
+
var _198 = (0, react_1.useState)(false), exportPDFLoading = _198[0], setExportPDFLoading = _198[1];
|
|
617
|
+
var _199 = (0, react_1.useState)(false), exportReadPDFLoading = _199[0], setExportReadPDFLoading = _199[1];
|
|
618
|
+
var _200 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.sumColumnId) !== null && _9 !== void 0 ? _9 : []), exportSumAttributeIds = _200[0], setExportSumAttributeIds = _200[1];
|
|
619
|
+
var _201 = (0, react_1.useState)((_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.exportSettings) === null || _11 === void 0 ? void 0 : _11.hideSubItems) !== null && _12 !== void 0 ? _12 : false), hideSubItems = _201[0], setHideSubItems = _201[1];
|
|
620
|
+
var _202 = (0, react_1.useState)([]), importTableData = _202[0], setImportTableData = _202[1];
|
|
621
|
+
var _203 = (0, react_1.useState)([]), queryList = _203[0], setQueryList = _203[1];
|
|
622
|
+
var _204 = (0, react_1.useState)(undefined), allQueryList = _204[0], setAllQueryList = _204[1];
|
|
623
623
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
624
624
|
// ungrouped, so it opens ungrouped
|
|
625
|
-
var
|
|
625
|
+
var _205 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
626
626
|
? persistedState.groupBy || undefined
|
|
627
|
-
: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId =
|
|
627
|
+
: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId = _205[0], setGroupId = _205[1];
|
|
628
628
|
// INFO: each group's total per number column, keyed by section id
|
|
629
|
-
var
|
|
629
|
+
var _206 = (0, react_1.useState)({}), groupSummaries = _206[0], setGroupSummaries = _206[1];
|
|
630
630
|
// INFO: each group's row count over every row the filters match; null until
|
|
631
631
|
// read. A band paged alone shows it until its own first page lands, and a
|
|
632
632
|
// band it counts empty is left out instead of waiting to be read
|
|
633
|
-
var
|
|
633
|
+
var _207 = (0, react_1.useState)(null), groupTotals = _207[0], setGroupTotals = _207[1];
|
|
634
634
|
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
635
|
-
var
|
|
635
|
+
var _208 = (0, react_1.useState)({}), commentCounts = _208[0], setCommentCounts = _208[1];
|
|
636
636
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
637
637
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
638
638
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
639
639
|
// next page as the user scrolls inside that band, independent of every other
|
|
640
640
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
641
|
-
var
|
|
641
|
+
var _209 = (0, react_1.useState)({}), groupPageState = _209[0], setGroupPageState = _209[1];
|
|
642
642
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
643
643
|
// in one tick do not re-fetch an already in-flight page.
|
|
644
644
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -653,62 +653,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
653
653
|
var groupLoadingKeyRef = (0, react_1.useRef)(null);
|
|
654
654
|
var groupLoadQueueRef = (0, react_1.useRef)([]);
|
|
655
655
|
var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
|
|
656
|
-
var
|
|
657
|
-
var
|
|
656
|
+
var _210 = (0, react_1.useState)(""), readTabSection = _210[0], setReadTabSection = _210[1];
|
|
657
|
+
var _211 = (0, react_1.useState)(false), readFloatingNav = _211[0], setReadFloatingNav = _211[1];
|
|
658
658
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
659
659
|
//INFO : Used by Read
|
|
660
660
|
//INFO : Used by Update
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
666
|
-
var
|
|
667
|
-
var
|
|
661
|
+
var _212 = (0, react_1.useState)(false), modalVisible = _212[0], setModalVisible = _212[1];
|
|
662
|
+
var _213 = (0, react_1.useState)(false), deleteModal = _213[0], setDeleteModal = _213[1];
|
|
663
|
+
var _214 = (0, react_1.useState)(false), excelModal = _214[0], setExcelModal = _214[1];
|
|
664
|
+
var _215 = (0, react_1.useState)(false), exportExcel = _215[0], setExportExcel = _215[1];
|
|
665
|
+
var _216 = (0, react_1.useState)(""), exportType = _216[0], setExportType = _216[1];
|
|
666
|
+
var _217 = (0, react_1.useState)(false), exportQR = _217[0], setExportQR = _217[1];
|
|
667
|
+
var _218 = (0, react_1.useState)(function () {
|
|
668
668
|
var _a, _b;
|
|
669
669
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
670
670
|
return firstTabId;
|
|
671
|
-
}), activeTab =
|
|
672
|
-
var
|
|
673
|
-
var
|
|
674
|
-
var
|
|
675
|
-
var
|
|
676
|
-
var
|
|
677
|
-
var
|
|
678
|
-
var
|
|
671
|
+
}), activeTab = _218[0], setActiveTab = _218[1];
|
|
672
|
+
var _219 = (0, react_1.useState)(false), signatureSigning = _219[0], setSignatureSigning = _219[1];
|
|
673
|
+
var _220 = (0, react_1.useState)({}), selectedData = _220[0], setSelectedData = _220[1];
|
|
674
|
+
var _221 = (0, react_1.useState)(""), selectedObjectStructureId = _221[0], setSelectedObjectStructureId = _221[1];
|
|
675
|
+
var _222 = (0, react_1.useState)(""), selectedObjectId = _222[0], setSelectedObjectId = _222[1];
|
|
676
|
+
var _223 = (0, react_1.useState)(""), selectedListAddressId = _223[0], setSelectedListAddressId = _223[1];
|
|
677
|
+
var _224 = (0, react_1.useState)(-1), selectedListAddressIndex = _224[0], setSelectedListAddressIndex = _224[1];
|
|
678
|
+
var _225 = (0, react_1.useState)({
|
|
679
679
|
lat: 0,
|
|
680
680
|
lng: 0,
|
|
681
681
|
name: "",
|
|
682
|
-
}), selectedListAddress =
|
|
683
|
-
var
|
|
684
|
-
var
|
|
685
|
-
var
|
|
686
|
-
var
|
|
687
|
-
var
|
|
688
|
-
var
|
|
682
|
+
}), selectedListAddress = _225[0], setSelectedListAddress = _225[1];
|
|
683
|
+
var _226 = (0, react_1.useState)({}), selectedObjectData = _226[0], setSelectedObjectData = _226[1];
|
|
684
|
+
var _227 = (0, react_1.useState)(null), objectCellEdit = _227[0], setObjectCellEdit = _227[1];
|
|
685
|
+
var _228 = (0, react_1.useState)(false), referenceLoading = _228[0], setReferenceLoading = _228[1];
|
|
686
|
+
var _229 = (0, react_1.useState)({}), referencesOptions = _229[0], setReferencesOptions = _229[1];
|
|
687
|
+
var _230 = (0, react_1.useState)({}), referencesDetails = _230[0], setReferencesDetails = _230[1];
|
|
688
|
+
var _231 = (0, react_1.useState)({}), listReferencesOptions = _231[0], setListReferencesOptions = _231[1];
|
|
689
689
|
// INFO: the referenced records themselves, for a table cell that picks from
|
|
690
690
|
// a list on one (referenceSelection)
|
|
691
|
-
var
|
|
692
|
-
var
|
|
693
|
-
var
|
|
694
|
-
var
|
|
695
|
-
var
|
|
691
|
+
var _232 = (0, react_1.useState)({}), listReferencesDetails = _232[0], setListReferencesDetails = _232[1];
|
|
692
|
+
var _233 = (0, react_1.useState)({}), referenceDeleteTableData = _233[0], setReferenceDeleteTableData = _233[1];
|
|
693
|
+
var _234 = (0, react_1.useState)([]), relatedSections = _234[0], setRelatedSections = _234[1];
|
|
694
|
+
var _235 = (0, react_1.useState)(0), referenceDeleteIndex = _235[0], setReferenceDeleteIndex = _235[1];
|
|
695
|
+
var _236 = (0, react_1.useState)({
|
|
696
696
|
id: "",
|
|
697
697
|
name: "",
|
|
698
698
|
type: "string",
|
|
699
|
-
}), referenceCreationModal =
|
|
700
|
-
var
|
|
701
|
-
var
|
|
699
|
+
}), referenceCreationModal = _236[0], setReferenceCreationModal = _236[1];
|
|
700
|
+
var _237 = (0, react_1.useState)({}), referenceModelSchema = _237[0], setReferenceSchema = _237[1];
|
|
701
|
+
var _238 = (0, react_1.useState)([]), kanbanChecked = _238[0], setKanbanChecked = _238[1];
|
|
702
702
|
//INFO : Offline
|
|
703
|
-
var
|
|
704
|
-
var
|
|
703
|
+
var _239 = (0, react_1.useState)(0), offlineDataLength = _239[0], setOfflineDataLength = _239[1];
|
|
704
|
+
var _240 = (0, react_1.useState)(false), offlineModal = _240[0], setOfflineModal = _240[1];
|
|
705
705
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
706
|
-
var
|
|
707
|
-
var
|
|
706
|
+
var _241 = (0, react_1.useState)(false), isLive = _241[0], setIsLive = _241[1];
|
|
707
|
+
var _242 = (0, react_1.useState)(false), isLiveOffline = _242[0], setIsLiveOffline = _242[1];
|
|
708
708
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
709
709
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
710
710
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
711
|
-
var
|
|
711
|
+
var _243 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _243[0], setIsNetworkOffline = _243[1];
|
|
712
712
|
var previousType = (0, react_1.useRef)(null);
|
|
713
713
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
714
714
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -890,7 +890,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
890
890
|
return;
|
|
891
891
|
var collectionId = props.collectionId;
|
|
892
892
|
recordIds.forEach(function (eachId) { return commentCountedIdsRef.current.add(eachId); });
|
|
893
|
-
onFetchCommentCounts(recordIds)
|
|
893
|
+
onFetchCommentCounts(recordIds, collectionId)
|
|
894
894
|
.then(function (counts) {
|
|
895
895
|
if (collectionId !== commentCollectionRef.current)
|
|
896
896
|
return;
|
|
@@ -1036,7 +1036,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1036
1036
|
var isSchemaHideMode = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.onChangeHide) ? true : false;
|
|
1037
1037
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1038
1038
|
// the persisted value and falls back to the consumer's limit
|
|
1039
|
-
var
|
|
1039
|
+
var _244 = (0, react_1.useState)((_27 = (_26 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _26 !== void 0 ? _26 : props.limit) !== null && _27 !== void 0 ? _27 : 10), pageLimit = _244[0], setPageLimit = _244[1];
|
|
1040
1040
|
var limit = pageLimit;
|
|
1041
1041
|
var isSavedViewsEnabled = !!((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.savedViews) && resolvedType === "list";
|
|
1042
1042
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
@@ -1084,13 +1084,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1084
1084
|
// INFO: a referenced record and related rows are joined by MongoWrapper's
|
|
1085
1085
|
// lookups and a list row is matched by its Mongo path — neither Firebase nor
|
|
1086
1086
|
// a union read runs them
|
|
1087
|
-
|
|
1087
|
+
// INFO: a people filter's "me" needs only who is signed in, which any
|
|
1088
|
+
// backend can match
|
|
1089
|
+
var currentUserId = (_34 = props.devSettings.currentUser) === null || _34 === void 0 ? void 0 : _34.userId;
|
|
1090
|
+
var flexFilterExtras = !isFirebase && !((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.unionCollections) === null || _36 === void 0 ? void 0 : _36.length)
|
|
1088
1091
|
? {
|
|
1089
|
-
references: (
|
|
1090
|
-
listObjects: (
|
|
1091
|
-
related: (
|
|
1092
|
+
references: (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareFlexFilterReferences,
|
|
1093
|
+
listObjects: (_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareFlexFilterListObjects,
|
|
1094
|
+
related: (_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareFlexFilterRelated,
|
|
1095
|
+
currentUserId: currentUserId,
|
|
1092
1096
|
}
|
|
1093
|
-
:
|
|
1097
|
+
: currentUserId
|
|
1098
|
+
? { currentUserId: currentUserId }
|
|
1099
|
+
: undefined;
|
|
1094
1100
|
// INFO: a formula filter is matched in the browser and the rest on the
|
|
1095
1101
|
// server, so a group is split between them: a group of formula filters
|
|
1096
1102
|
// only still matches any of them here, while a formula filter grouped with
|
|
@@ -1177,18 +1183,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1177
1183
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1178
1184
|
};
|
|
1179
1185
|
};
|
|
1180
|
-
var
|
|
1181
|
-
var isEditor = ((
|
|
1182
|
-
var isOffline = (
|
|
1186
|
+
var _245 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _245.canUpdateRecord, canInlineUpdate = _245.canInlineUpdate, canBatchUpdate = _245.canBatchUpdate, canDeleteRecord = _245.canDeleteRecord;
|
|
1187
|
+
var isEditor = ((_40 = props.edit) === null || _40 === void 0 ? void 0 : _40.allEditable) ? true : false;
|
|
1188
|
+
var isOffline = (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareOffline;
|
|
1183
1189
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1184
1190
|
// the live network state — online saves go to the server even if bareOffline
|
|
1185
1191
|
// is true, offline saves go to IDB as normal.
|
|
1186
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1187
|
-
var showId = (
|
|
1192
|
+
var isOfflineNetworkListener = isOffline && ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareOfflineNetworkListener);
|
|
1193
|
+
var showId = (_43 = props.space) === null || _43 === void 0 ? void 0 : _43.showId;
|
|
1188
1194
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1189
|
-
var idField = ((
|
|
1190
|
-
var pipeline = (
|
|
1191
|
-
if ((
|
|
1195
|
+
var idField = ((_44 = props.space) === null || _44 === void 0 ? void 0 : _44.idField) || ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.idField);
|
|
1196
|
+
var pipeline = (_46 = props === null || props === void 0 ? void 0 : props.space) === null || _46 === void 0 ? void 0 : _46.pipeline;
|
|
1197
|
+
if ((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListPipeline) {
|
|
1192
1198
|
pipeline = pipeline
|
|
1193
1199
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1194
1200
|
}
|
|
@@ -1201,24 +1207,74 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1201
1207
|
* three records came back instead of five files, and each tile received the
|
|
1202
1208
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1203
1209
|
*/
|
|
1204
|
-
var fileViewColumnId = (
|
|
1210
|
+
var fileViewColumnId = (_51 = (_50 = ((_49 = (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.extendedTabs) !== null && _49 !== void 0 ? _49 : []).find(function (eachTab) {
|
|
1205
1211
|
return eachTab.viewType === "file" &&
|
|
1206
1212
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1207
|
-
})) === null ||
|
|
1208
|
-
var hasNavigation = ((
|
|
1213
|
+
})) === null || _50 === void 0 ? void 0 : _50.fileSettings) === null || _51 === void 0 ? void 0 : _51.columnId;
|
|
1214
|
+
var hasNavigation = ((_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.handleNavigate) ? true : false;
|
|
1209
1215
|
var formColumn = "grid-cols-12";
|
|
1210
|
-
var useMobileView = (
|
|
1216
|
+
var useMobileView = (_54 = (_53 = props.bareSettings) === null || _53 === void 0 ? void 0 : _53.bareUpdateMobileView) !== null && _54 !== void 0 ? _54 : false;
|
|
1211
1217
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1212
|
-
var isActivityLog = (((
|
|
1213
|
-
((
|
|
1214
|
-
(((
|
|
1215
|
-
((
|
|
1216
|
-
|
|
1218
|
+
var isActivityLog = (((_56 = (_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.activityLog) === null || _56 === void 0 ? void 0 : _56.enableComments) &&
|
|
1219
|
+
((_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.activityLog.commentCollectionId)) ||
|
|
1220
|
+
(((_59 = (_58 = props.edit) === null || _58 === void 0 ? void 0 : _58.activityLog) === null || _59 === void 0 ? void 0 : _59.enableLogs) &&
|
|
1221
|
+
((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.activityLog.logsCollectionId));
|
|
1222
|
+
// INFO: a record's comments and logs shown in place of the record rather than
|
|
1223
|
+
// in a drawer of their own — a related tab already sits inside the read
|
|
1224
|
+
// drawer, and a second drawer over it hid the row being discussed. It opens
|
|
1225
|
+
// the row through handleNavigate, so without one it stays off and the
|
|
1226
|
+
// drawer is used, rather than leaving a comment button that does nothing
|
|
1227
|
+
var isInlineActivity = !!isActivityLog &&
|
|
1228
|
+
!!((_61 = props.bareSettings) === null || _61 === void 0 ? void 0 : _61.bareInlineActivity) &&
|
|
1229
|
+
hasNavigation;
|
|
1230
|
+
// INFO: each row button opens what it shows: the comment button the row's
|
|
1231
|
+
// comments and logs alone, the eye (or the row) its details alone, so
|
|
1232
|
+
// neither has to be scrolled past to reach the other
|
|
1233
|
+
var _246 = (0, react_1.useState)(false), inlineActivityOnly = _246[0], setInlineActivityOnly = _246[1];
|
|
1234
|
+
var isActivityOnly = isInlineActivity && inlineActivityOnly;
|
|
1235
|
+
// INFO: the row whose comments were shown; going back to the list asks its
|
|
1236
|
+
// comment count again, as the drawer does when it closes
|
|
1237
|
+
var inlineActivityIdRef = (0, react_1.useRef)("");
|
|
1238
|
+
// INFO: the flag is cleared only on the way back from a row, not while the
|
|
1239
|
+
// list is still on screen — a host may open the row a render after the click
|
|
1240
|
+
var lastInlineTypeRef = (0, react_1.useRef)(resolvedType);
|
|
1241
|
+
(0, react_1.useEffect)(function () {
|
|
1242
|
+
var previousType = lastInlineTypeRef.current;
|
|
1243
|
+
lastInlineTypeRef.current = resolvedType;
|
|
1244
|
+
if (!isInlineActivity)
|
|
1245
|
+
return;
|
|
1246
|
+
if (resolvedType === "read" && props.id) {
|
|
1247
|
+
if (inlineActivityOnly)
|
|
1248
|
+
inlineActivityIdRef.current = props.id;
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
if (resolvedType !== "list" || previousType !== "read")
|
|
1252
|
+
return;
|
|
1253
|
+
setInlineActivityOnly(false);
|
|
1254
|
+
var shownId = inlineActivityIdRef.current;
|
|
1255
|
+
inlineActivityIdRef.current = "";
|
|
1256
|
+
if (shownId)
|
|
1257
|
+
handleFetchCommentCounts([shownId]);
|
|
1258
|
+
/* eslint-disable */
|
|
1259
|
+
}, [resolvedType, props.id, isInlineActivity]);
|
|
1260
|
+
/* eslint-enable */
|
|
1261
|
+
var renderActivityPanel = function (dataId) {
|
|
1262
|
+
var _a, _b, _c, _d;
|
|
1263
|
+
return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
1264
|
+
? props.title
|
|
1265
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: dataId, activityLog: (_a = props.edit) === null || _a === void 0 ? void 0 : _a.activityLog,
|
|
1266
|
+
// INFO: names the record in the panel's heading; without it the lookup
|
|
1267
|
+
// reads a "title" field most datasheets lack and the heading shows the
|
|
1268
|
+
// record's id. A title or name column comes first, then the first text
|
|
1269
|
+
// column
|
|
1270
|
+
recordTitleColumn: (_d = ((_c = (_b = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _b !== void 0 ? _b : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _c !== void 0 ? _c : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _d === void 0 ? void 0 : _d.id, model: structure }));
|
|
1271
|
+
};
|
|
1272
|
+
var customPaginationSize = ((_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.customPaginationCount)
|
|
1217
1273
|
? props.organise.customPaginationCount(size)
|
|
1218
1274
|
: undefined;
|
|
1219
1275
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1220
1276
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1221
|
-
dbModule: (
|
|
1277
|
+
dbModule: (_63 = props.lib) === null || _63 === void 0 ? void 0 : _63.axios,
|
|
1222
1278
|
dbType: devSettings.server,
|
|
1223
1279
|
dbCollection: props.collectionId,
|
|
1224
1280
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1226,7 +1282,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1226
1282
|
dbUserToken: devSettings.dbUserToken,
|
|
1227
1283
|
});
|
|
1228
1284
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1229
|
-
dbModule: (
|
|
1285
|
+
dbModule: (_64 = props.lib) === null || _64 === void 0 ? void 0 : _64.axios,
|
|
1230
1286
|
dbType: devSettings.server,
|
|
1231
1287
|
dbCollection: props.collectionId,
|
|
1232
1288
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1234,12 +1290,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1234
1290
|
dbUserToken: devSettings.dbUserToken,
|
|
1235
1291
|
});
|
|
1236
1292
|
var moreButtonPopUp = [
|
|
1237
|
-
((
|
|
1293
|
+
((_65 = props.edit) === null || _65 === void 0 ? void 0 : _65.allEditable) &&
|
|
1238
1294
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1239
1295
|
// datasheet served through one can import; only the browser-direct
|
|
1240
1296
|
// Firebase client has no server to import through
|
|
1241
1297
|
!isFirebaseClient &&
|
|
1242
|
-
!((
|
|
1298
|
+
!((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideImportCSV)
|
|
1243
1299
|
? {
|
|
1244
1300
|
text: "Import Excel",
|
|
1245
1301
|
onClick: function () {
|
|
@@ -1248,7 +1304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1248
1304
|
},
|
|
1249
1305
|
}
|
|
1250
1306
|
: null,
|
|
1251
|
-
!((
|
|
1307
|
+
!((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportCSV)
|
|
1252
1308
|
? {
|
|
1253
1309
|
text: "Export CSV",
|
|
1254
1310
|
onClick: function () {
|
|
@@ -1258,7 +1314,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1258
1314
|
},
|
|
1259
1315
|
}
|
|
1260
1316
|
: null,
|
|
1261
|
-
!((
|
|
1317
|
+
!((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportExcel)
|
|
1262
1318
|
? {
|
|
1263
1319
|
text: "Export Excel",
|
|
1264
1320
|
onClick: function () {
|
|
@@ -1268,7 +1324,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1268
1324
|
},
|
|
1269
1325
|
}
|
|
1270
1326
|
: null,
|
|
1271
|
-
!((
|
|
1327
|
+
!((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportPDF)
|
|
1272
1328
|
? {
|
|
1273
1329
|
text: "Export PDF",
|
|
1274
1330
|
onClick: function () {
|
|
@@ -1278,7 +1334,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1278
1334
|
},
|
|
1279
1335
|
}
|
|
1280
1336
|
: null,
|
|
1281
|
-
!((
|
|
1337
|
+
!((_75 = (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.exportSettings) === null || _75 === void 0 ? void 0 : _75.hideExportQR)
|
|
1282
1338
|
? {
|
|
1283
1339
|
text: "Export QR",
|
|
1284
1340
|
onClick: function () {
|
|
@@ -1288,7 +1344,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1288
1344
|
},
|
|
1289
1345
|
}
|
|
1290
1346
|
: null,
|
|
1291
|
-
!((
|
|
1347
|
+
!((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportQR)
|
|
1292
1348
|
? {
|
|
1293
1349
|
text: "Export QR(Data)",
|
|
1294
1350
|
onClick: function () {
|
|
@@ -1298,7 +1354,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1298
1354
|
},
|
|
1299
1355
|
}
|
|
1300
1356
|
: null,
|
|
1301
|
-
!((
|
|
1357
|
+
!((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.exportSettings) === null || _79 === void 0 ? void 0 : _79.hideExportPrint)
|
|
1302
1358
|
? {
|
|
1303
1359
|
text: "Print",
|
|
1304
1360
|
onClick: function () {
|
|
@@ -1310,8 +1366,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1310
1366
|
: null,
|
|
1311
1367
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1312
1368
|
// nothing to find on any other page
|
|
1313
|
-
((
|
|
1314
|
-
!((
|
|
1369
|
+
((_80 = props.edit) === null || _80 === void 0 ? void 0 : _80.enableUpdateDraft) &&
|
|
1370
|
+
!((_82 = (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.exportSettings) === null || _82 === void 0 ? void 0 : _82.hideExportDraft)
|
|
1315
1371
|
? {
|
|
1316
1372
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1317
1373
|
onClick: function () {
|
|
@@ -1320,7 +1376,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1320
1376
|
}
|
|
1321
1377
|
: null,
|
|
1322
1378
|
].filter(Boolean);
|
|
1323
|
-
if ((
|
|
1379
|
+
if ((_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.moreSettings)
|
|
1324
1380
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1325
1381
|
//=====================================================================================
|
|
1326
1382
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1688,6 +1744,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1688
1744
|
}
|
|
1689
1745
|
}
|
|
1690
1746
|
}
|
|
1747
|
+
// INFO: a sort on a linked record's field needs that record joined in,
|
|
1748
|
+
// which a condition every row passes carries to the server
|
|
1749
|
+
var linkedSort = (0, flexFilter_1.handleResolveReferenceSort)(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId, structure, flexFilterExtras);
|
|
1750
|
+
if (linkedSort)
|
|
1751
|
+
query = __spreadArray(__spreadArray([], (query !== null && query !== void 0 ? query : []), true), [linkedSort.lookup], false);
|
|
1691
1752
|
// INFO: a search shares the server's single $or with flex OR groups, so it
|
|
1692
1753
|
// is folded into their blocks; Firestore has no OR to fold into
|
|
1693
1754
|
return query && !isFirebase ? (0, flexFilter_1.handleMergeOrQueries)(query) : query;
|
|
@@ -1760,14 +1821,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1760
1821
|
//=====================================================================================
|
|
1761
1822
|
//SECTION: Saved Views
|
|
1762
1823
|
//=====================================================================================
|
|
1763
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1824
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.persistKey, (_85 = devSettings.currentUser) === null || _85 === void 0 ? void 0 : _85.userEmail);
|
|
1764
1825
|
(0, react_1.useEffect)(function () {
|
|
1765
1826
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1766
1827
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1767
1828
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1768
1829
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1769
1830
|
// browser until the person updates the view for everyone or resets it
|
|
1770
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1831
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.allView) !== undefined;
|
|
1771
1832
|
var handleGetViewDraftKey = function (viewId) {
|
|
1772
1833
|
var _a, _b;
|
|
1773
1834
|
return (0, viewStatePersistence_1.buildViewDraftKey)(props.collectionId, viewId !== null && viewId !== void 0 ? viewId : "all", (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistKey, (_b = devSettings.currentUser) === null || _b === void 0 ? void 0 : _b.userEmail);
|
|
@@ -1851,7 +1912,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1851
1912
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1852
1913
|
(0, react_1.useEffect)(function () {
|
|
1853
1914
|
lastSentSharedViewsRef.current = null;
|
|
1854
|
-
}, [(
|
|
1915
|
+
}, [(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.sharedViews]);
|
|
1855
1916
|
var handleStoreSharedViews = function (update) {
|
|
1856
1917
|
var _a, _b, _c;
|
|
1857
1918
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1896,13 +1957,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1896
1957
|
/* eslint-disable */
|
|
1897
1958
|
}, [
|
|
1898
1959
|
isSavedViewsEnabled,
|
|
1899
|
-
(
|
|
1900
|
-
(
|
|
1901
|
-
(
|
|
1960
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.initialSavedViewId,
|
|
1961
|
+
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.defaultSavedViewId,
|
|
1962
|
+
(_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.sharedViews,
|
|
1902
1963
|
savedViews,
|
|
1903
1964
|
]);
|
|
1904
1965
|
/* eslint-enable */
|
|
1905
|
-
var defaultSavedViewIds = ((
|
|
1966
|
+
var defaultSavedViewIds = ((_92 = (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.defaultSavedViews) !== null && _92 !== void 0 ? _92 : [])
|
|
1906
1967
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1907
1968
|
.join("|");
|
|
1908
1969
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -2232,8 +2293,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2232
2293
|
groupId,
|
|
2233
2294
|
columnWidths,
|
|
2234
2295
|
pinnedColumnIds,
|
|
2235
|
-
(
|
|
2236
|
-
(
|
|
2296
|
+
(_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.allView,
|
|
2297
|
+
(_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.sharedViews,
|
|
2237
2298
|
savedViews,
|
|
2238
2299
|
]);
|
|
2239
2300
|
/* eslint-enable */
|
|
@@ -2273,7 +2334,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2273
2334
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
2274
2335
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
2275
2336
|
/* eslint-disable */
|
|
2276
|
-
}, [props.collectionId, (
|
|
2337
|
+
}, [props.collectionId, (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.persistKey]);
|
|
2277
2338
|
/* eslint-enable */
|
|
2278
2339
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2279
2340
|
(0, react_1.useEffect)(function () {
|
|
@@ -2308,7 +2369,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2308
2369
|
(0, react_1.useEffect)(function () {
|
|
2309
2370
|
handleOfflinePrefetch();
|
|
2310
2371
|
/* eslint-disable */
|
|
2311
|
-
}, [props.collectionId, (
|
|
2372
|
+
}, [props.collectionId, (_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.bareOffline]);
|
|
2312
2373
|
/* eslint-enable */
|
|
2313
2374
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2314
2375
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2328,7 +2389,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2328
2389
|
}, interval);
|
|
2329
2390
|
return function () { return clearInterval(timer); };
|
|
2330
2391
|
/* eslint-disable */
|
|
2331
|
-
}, [(
|
|
2392
|
+
}, [(_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.barePollingInterval, isLive, isNetworkOffline]);
|
|
2332
2393
|
/* eslint-enable */
|
|
2333
2394
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2334
2395
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2370,7 +2431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2370
2431
|
};
|
|
2371
2432
|
/* eslint-disable */
|
|
2372
2433
|
}, [
|
|
2373
|
-
(
|
|
2434
|
+
(_98 = props.bareSettings) === null || _98 === void 0 ? void 0 : _98.bareSocketName,
|
|
2374
2435
|
props.collectionId,
|
|
2375
2436
|
props.devSettings.sseEndpoint,
|
|
2376
2437
|
props.devSettings.dbAPIToken,
|
|
@@ -2644,10 +2705,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2644
2705
|
props.collectionId,
|
|
2645
2706
|
props.model,
|
|
2646
2707
|
props.localURLEndpoint,
|
|
2647
|
-
(
|
|
2708
|
+
(_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.extendedTabs,
|
|
2648
2709
|
listViewId,
|
|
2649
|
-
(
|
|
2650
|
-
(
|
|
2710
|
+
(_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.additionalQuery,
|
|
2711
|
+
(_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.groupBy,
|
|
2651
2712
|
resolvedType,
|
|
2652
2713
|
]);
|
|
2653
2714
|
/**
|
|
@@ -2799,7 +2860,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2799
2860
|
};
|
|
2800
2861
|
}, 100);
|
|
2801
2862
|
return function () { return clearTimeout(timeoutId); };
|
|
2802
|
-
}, [(
|
|
2863
|
+
}, [(_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2803
2864
|
(0, react_1.useEffect)(function () {
|
|
2804
2865
|
if (resolvedType !== "read")
|
|
2805
2866
|
return;
|
|
@@ -3283,9 +3344,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3283
3344
|
var sort = (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) && formulaColumnIds.includes(activeSortId.sortId)
|
|
3284
3345
|
? undefined
|
|
3285
3346
|
: activeSortId || undefined;
|
|
3347
|
+
// INFO: a linked record's field sorts on the joined record, whose lookup
|
|
3348
|
+
// renderImpSearchFilterConditions adds to the query
|
|
3349
|
+
var linkedSort = (0, flexFilter_1.handleResolveReferenceSort)(sort === null || sort === void 0 ? void 0 : sort.sortId, structure, flexFilterExtras);
|
|
3350
|
+
if (sort && linkedSort)
|
|
3351
|
+
sort = __assign(__assign({}, sort), { sortId: linkedSort.sortId });
|
|
3286
3352
|
// INFO: a date range sorts on its start, a timer on its total and the
|
|
3287
3353
|
// Record ID column on the record's own id
|
|
3288
|
-
if (sort === null || sort === void 0 ? void 0 : sort.sortId) {
|
|
3354
|
+
else if (sort === null || sort === void 0 ? void 0 : sort.sortId) {
|
|
3289
3355
|
var sortColumn = structure.find(function (each) { return each.id === (sort === null || sort === void 0 ? void 0 : sort.sortId); });
|
|
3290
3356
|
if ((sortColumn === null || sortColumn === void 0 ? void 0 : sortColumn.type) === "dateRange")
|
|
3291
3357
|
sort = __assign(__assign({}, sort), { sortId: (0, dateRange_1.handleGetDateRangeQueryId)(sortColumn.id) });
|
|
@@ -5945,7 +6011,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5945
6011
|
var columnTypeActions = {
|
|
5946
6012
|
canUpdate: canUpdateRecord,
|
|
5947
6013
|
dateWarnings: isDateWarnings,
|
|
5948
|
-
onButtonClick: (
|
|
6014
|
+
onButtonClick: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.onButtonClick,
|
|
5949
6015
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5950
6016
|
var _a;
|
|
5951
6017
|
return __generator(this, function (_b) {
|
|
@@ -5962,7 +6028,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5962
6028
|
}
|
|
5963
6029
|
});
|
|
5964
6030
|
}); },
|
|
5965
|
-
onTimeTrackingAction: ((
|
|
6031
|
+
onTimeTrackingAction: ((_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.onTimeTrackingAction) && canUpdateRecord
|
|
5966
6032
|
? function (rowId, columnId, action) {
|
|
5967
6033
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5968
6034
|
}
|
|
@@ -8149,14 +8215,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8149
8215
|
react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Sort"),
|
|
8150
8216
|
react_1.default.createElement("div", { className: "mt-1 flex flex-row items-center gap-x-2" },
|
|
8151
8217
|
react_1.default.createElement("div", { className: "grow min-w-0" },
|
|
8152
|
-
react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-column", portalDropdown: true, label: "", containerClassName: "min-w-0", value: (_b = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _b !== void 0 ? _b : "", placeholder: "Column", darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, options: viewColumns
|
|
8153
|
-
.filter(function (eachColumn) {
|
|
8218
|
+
react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-column", portalDropdown: true, label: "", containerClassName: "min-w-0", value: (_b = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _b !== void 0 ? _b : "", placeholder: "Column", darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, options: __spreadArray(__spreadArray([], viewColumns.filter(function (eachColumn) {
|
|
8154
8219
|
return (isFormulaViewSupported ||
|
|
8155
8220
|
eachColumn.type !== "formula") &&
|
|
8156
8221
|
(0, lookup_1.handleIsQueryableColumn)(eachColumn) &&
|
|
8157
8222
|
!utils_1.NON_SORT_COLUMN_DATA_TYPES.includes(eachColumn.type);
|
|
8158
|
-
})
|
|
8159
|
-
.
|
|
8223
|
+
}), true), ((flexFilterExtras === null || flexFilterExtras === void 0 ? void 0 : flexFilterExtras.references)
|
|
8224
|
+
? flexFilterStructure.filter(function (eachColumn) {
|
|
8225
|
+
return eachColumn.id.includes(">") &&
|
|
8226
|
+
!utils_1.NON_SORT_COLUMN_DATA_TYPES.includes(eachColumn.type);
|
|
8227
|
+
})
|
|
8228
|
+
: []), true).map(function (eachColumn) {
|
|
8160
8229
|
var _a;
|
|
8161
8230
|
return ({
|
|
8162
8231
|
key: eachColumn.id,
|
|
@@ -8205,8 +8274,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8205
8274
|
: rows;
|
|
8206
8275
|
};
|
|
8207
8276
|
/* eslint-disable */
|
|
8208
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
8209
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
8277
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_105 = props.bareSettings) === null || _105 === void 0 ? void 0 : _105.bareNewDTW]);
|
|
8278
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_106 = props.bareSettings) === null || _106 === void 0 ? void 0 : _106.bareNewDTW]);
|
|
8210
8279
|
/* eslint-enable */
|
|
8211
8280
|
// INFO: beside a record's title, the pencil opens its edit form for whoever
|
|
8212
8281
|
// may update, and the bubble opens comments and logs for anyone who can see
|
|
@@ -8218,15 +8287,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8218
8287
|
handleCaptureListScroll(id);
|
|
8219
8288
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", id, "general");
|
|
8220
8289
|
};
|
|
8221
|
-
var handleOpenRecordActivity = function (id) {
|
|
8222
|
-
setActivityId(id);
|
|
8223
|
-
setActivityModal(true);
|
|
8224
|
-
};
|
|
8225
8290
|
var handleOpenRecordRead = function (id) {
|
|
8226
8291
|
var _a, _b;
|
|
8227
8292
|
handleCaptureListScroll(id);
|
|
8228
8293
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
8229
8294
|
};
|
|
8295
|
+
// INFO: with the activity shown in place, a row's comment button opens that
|
|
8296
|
+
// row's comments and logs where the list was, rather than stacking a second
|
|
8297
|
+
// drawer
|
|
8298
|
+
var handleOpenRecordActivity = function (id) {
|
|
8299
|
+
if (isInlineActivity) {
|
|
8300
|
+
setInlineActivityOnly(true);
|
|
8301
|
+
handleOpenRecordRead(id);
|
|
8302
|
+
return;
|
|
8303
|
+
}
|
|
8304
|
+
setActivityId(id);
|
|
8305
|
+
setActivityModal(true);
|
|
8306
|
+
};
|
|
8230
8307
|
var recordEditAction = canUpdateRecord ? handleOpenRecordEdit : undefined;
|
|
8231
8308
|
// INFO: the chevron only navigates through handleNavigate, so a host that
|
|
8232
8309
|
// routes by url gets none rather than a button that does nothing
|
|
@@ -8321,7 +8398,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8321
8398
|
return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type);
|
|
8322
8399
|
})
|
|
8323
8400
|
.map(function (eachAttribute) {
|
|
8324
|
-
var _a, _b, _c, _d, _e
|
|
8401
|
+
var _a, _b, _c, _d, _e;
|
|
8325
8402
|
var selectedDataKey = Object.keys(selectedData).find(function (eachKey) { return eachKey === eachAttribute.id; });
|
|
8326
8403
|
if (selectedDataKey) {
|
|
8327
8404
|
var showIdCondition = showId
|
|
@@ -8335,14 +8412,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8335
8412
|
var bareReadDescFunc = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadDescription;
|
|
8336
8413
|
if (bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_c = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _c !== void 0 ? _c : "", selectedData[selectedDataKey]))
|
|
8337
8414
|
currentValue = bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_d = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _d !== void 0 ? _d : "", selectedData[selectedDataKey]);
|
|
8338
|
-
|
|
8339
|
-
|
|
8415
|
+
// INFO: a failed lookup leaves the read module's anomaly notice
|
|
8416
|
+
// here instead of the list, which is shown as it is
|
|
8417
|
+
if (eachAttribute.type === "listReference" &&
|
|
8418
|
+
Array.isArray(selectedData[selectedDataKey])) {
|
|
8419
|
+
currentValue = selectedData[selectedDataKey].map(function (eachData) {
|
|
8340
8420
|
var _a, _b;
|
|
8341
8421
|
return ((_b = eachData === null || eachData === void 0 ? void 0 : eachData[(_a = eachAttribute.referenceLabel) !== null && _a !== void 0 ? _a : ""]) !== null && _b !== void 0 ? _b : (0, moduleUtils_1.renderReferenceStringAttribute)(eachData));
|
|
8342
8422
|
});
|
|
8343
8423
|
}
|
|
8344
8424
|
detailList.push({
|
|
8345
|
-
title: (
|
|
8425
|
+
title: (_e = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.name) !== null && _e !== void 0 ? _e : "",
|
|
8346
8426
|
text: currentValue,
|
|
8347
8427
|
});
|
|
8348
8428
|
}
|
|
@@ -8729,10 +8809,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8729
8809
|
var showUpdate = !bareActionComponent && canUpdateRecord;
|
|
8730
8810
|
var showExport = !!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF);
|
|
8731
8811
|
var showDelete = canDeleteRecord && props.id !== "new";
|
|
8812
|
+
// INFO: with the activity shown in place there is no Log button, so a
|
|
8813
|
+
// related row with nothing else to act on draws no bar at all
|
|
8814
|
+
var showLog = !!isActivityLog && !isInlineActivity;
|
|
8732
8815
|
if (!hasCustomActions &&
|
|
8733
8816
|
!showUpdate &&
|
|
8734
8817
|
!showExport &&
|
|
8735
|
-
!
|
|
8818
|
+
!showLog &&
|
|
8736
8819
|
!showDelete)
|
|
8737
8820
|
return null;
|
|
8738
8821
|
return (react_1.default.createElement("div", { "data-testid": "dtw-read-bar", className: handleActionBarClassName(true) },
|
|
@@ -8746,7 +8829,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8746
8829
|
setDeleteModal(true);
|
|
8747
8830
|
} })))),
|
|
8748
8831
|
showExport && (react_1.default.createElement(button_1.Button, { type: "light", text: "Export PDF", size: "small", onClick: handleExportReadPDF })),
|
|
8749
|
-
|
|
8832
|
+
showLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
|
|
8750
8833
|
hasCustomActions && bareActionComponent,
|
|
8751
8834
|
showUpdate &&
|
|
8752
8835
|
(hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small", onClick: function () {
|
|
@@ -8761,7 +8844,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8761
8844
|
// under the form. Its header row keeps only Delete, a destructive action that
|
|
8762
8845
|
// should not sit at the end of a "continue, continue" flow.
|
|
8763
8846
|
var renderActionButtons = function (type, _hasTabAlign, _uniqueTabIds) {
|
|
8764
|
-
var _a, _b, _c, _d, _e, _f;
|
|
8847
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
8765
8848
|
var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef, handleResolveRawData())) !== null && _c !== void 0 ? _c : undefined;
|
|
8766
8849
|
// INFO: every update form carries Save / Submit in the floating bar, so
|
|
8767
8850
|
// the header keeps only Delete
|
|
@@ -8795,8 +8878,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8795
8878
|
}
|
|
8796
8879
|
else if (type === "list") {
|
|
8797
8880
|
var listActionBtns = [];
|
|
8798
|
-
if (isActivityLog) {
|
|
8799
|
-
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () {
|
|
8881
|
+
if (isActivityLog && !((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareHideCollectionActivity)) {
|
|
8882
|
+
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-collection-activity", icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () {
|
|
8800
8883
|
setActivityId("");
|
|
8801
8884
|
setActivityModal(true);
|
|
8802
8885
|
}, background: "bg-primary-500 hover:bg-primary-600" }));
|
|
@@ -8804,7 +8887,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8804
8887
|
if (bareActionComponent) {
|
|
8805
8888
|
listActionBtns.push(bareActionComponent);
|
|
8806
8889
|
}
|
|
8807
|
-
else if (((
|
|
8890
|
+
else if (((_f = props.edit) === null || _f === void 0 ? void 0 : _f.allEditable) || ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.createBtn)) {
|
|
8808
8891
|
listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
8809
8892
|
hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-create", icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
8810
8893
|
var _a, _b;
|
|
@@ -9018,7 +9101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9018
9101
|
handleNavigateFromDrawer("list", "");
|
|
9019
9102
|
} }))); } })); };
|
|
9020
9103
|
var renderContent = function () {
|
|
9021
|
-
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;
|
|
9104
|
+
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;
|
|
9022
9105
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
9023
9106
|
var tabs = renderTabs();
|
|
9024
9107
|
var pages = [
|
|
@@ -9065,16 +9148,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9065
9148
|
renderBareReadComp(),
|
|
9066
9149
|
((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateActionTop) &&
|
|
9067
9150
|
!selectedRelated &&
|
|
9151
|
+
!isActivityOnly &&
|
|
9068
9152
|
renderReadBar(),
|
|
9069
9153
|
(anyAuthMethod ||
|
|
9070
9154
|
(authLoading && ((_o = props.space) === null || _o === void 0 ? void 0 : _o.authDatabase))) && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, authLoading ? (react_1.default.createElement("div", { className: "flex justify-center py-1", "data-testid": "dtw-auth-loading" },
|
|
9071
9155
|
react_1.default.createElement(loading_1.Loading, { sizeClassName: "h-6 w-6" }))) : (renderAuthContent()))),
|
|
9072
|
-
react_1.default.createElement("div", { ref: exportReadPDFRef },
|
|
9073
|
-
selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (
|
|
9074
|
-
((
|
|
9075
|
-
renderBareReadComp()),
|
|
9076
|
-
!((
|
|
9156
|
+
isActivityOnly && !selectedRelated ? (react_1.default.createElement("div", { "data-testid": "dt-activity-inline", className: "mt-4" }, renderActivityPanel((_p = props.id) !== null && _p !== void 0 ? _p : ""))) : (react_1.default.createElement("div", { ref: exportReadPDFRef },
|
|
9157
|
+
selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (_q = props.id) !== null && _q !== void 0 ? _q : "", renderList: renderRelatedList })) : (!((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType)))),
|
|
9158
|
+
((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareReadComponentPos) !== "top" &&
|
|
9159
|
+
renderBareReadComp())),
|
|
9160
|
+
!((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareUpdateActionTop) &&
|
|
9077
9161
|
!selectedRelated &&
|
|
9162
|
+
!isActivityOnly &&
|
|
9078
9163
|
renderReadBar()))));
|
|
9079
9164
|
case "update":
|
|
9080
9165
|
if (props.id !== "new") {
|
|
@@ -9085,12 +9170,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9085
9170
|
});
|
|
9086
9171
|
}
|
|
9087
9172
|
pages.push({
|
|
9088
|
-
name: (
|
|
9173
|
+
name: (_w = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.breadcrumbAttributeId) !== null && _v !== void 0 ? _v : serverId]) !== null && _w !== void 0 ? _w : (props.id ? props.id : "new"),
|
|
9089
9174
|
href: "#",
|
|
9090
9175
|
current: true,
|
|
9091
9176
|
});
|
|
9092
9177
|
var filterModel_1 = [];
|
|
9093
|
-
var disabledOnEnter_1 = (
|
|
9178
|
+
var disabledOnEnter_1 = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disabledOnEnter) !== null && _y !== void 0 ? _y : false;
|
|
9094
9179
|
structure.map(function (eachModel) {
|
|
9095
9180
|
var _a;
|
|
9096
9181
|
var present = false;
|
|
@@ -9203,12 +9288,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9203
9288
|
}
|
|
9204
9289
|
}
|
|
9205
9290
|
};
|
|
9206
|
-
var hasTabAlign_1 = ((
|
|
9207
|
-
var leftTabAlign = ((
|
|
9208
|
-
((
|
|
9209
|
-
var topTabAlign = ((
|
|
9210
|
-
var stepperTabAlign = ((
|
|
9211
|
-
((
|
|
9291
|
+
var hasTabAlign_1 = ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.tabAlign) || ((_0 = props.space) === null || _0 === void 0 ? void 0 : _0.tabAlign);
|
|
9292
|
+
var leftTabAlign = ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.tabAlign) === "left" ||
|
|
9293
|
+
((_2 = props.space) === null || _2 === void 0 ? void 0 : _2.tabAlign) === "left";
|
|
9294
|
+
var topTabAlign = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.tabAlign) === "top" || ((_4 = props.space) === null || _4 === void 0 ? void 0 : _4.tabAlign) === "top";
|
|
9295
|
+
var stepperTabAlign = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "stepper" ||
|
|
9296
|
+
((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.tabAlign) === "stepper";
|
|
9212
9297
|
var uniqueTabIds_2 = Array.from(new Set(filterModel_1
|
|
9213
9298
|
.map(function (item) { return item.tabId; })
|
|
9214
9299
|
.filter(function (id) { return id !== undefined; })));
|
|
@@ -9217,7 +9302,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9217
9302
|
if (shouldIncludeOthers) {
|
|
9218
9303
|
uniqueTabIds_2.push("");
|
|
9219
9304
|
}
|
|
9220
|
-
var customTabComponent_1 = (
|
|
9305
|
+
var customTabComponent_1 = (_9 = (_8 = (_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareUpdateTabComponent) === null || _8 === void 0 ? void 0 : _8.call(_7, uniqueTabIds_2)) !== null && _9 !== void 0 ? _9 : [];
|
|
9221
9306
|
var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
|
|
9222
9307
|
var _a, _b;
|
|
9223
9308
|
var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
|
|
@@ -9253,7 +9338,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9253
9338
|
props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
|
|
9254
9339
|
dbModule: dbModule,
|
|
9255
9340
|
dbType: devSettings.server,
|
|
9256
|
-
dbCollection: (
|
|
9341
|
+
dbCollection: (_11 = (_10 = props === null || props === void 0 ? void 0 : props.space) === null || _10 === void 0 ? void 0 : _10.pipelineDefaultSpaceId) !== null && _11 !== void 0 ? _11 : props.collectionId,
|
|
9257
9342
|
dbEndpoint: devSettings.dbEndpoint,
|
|
9258
9343
|
dbAPIToken: devSettings.dbAPIToken,
|
|
9259
9344
|
dbUserToken: devSettings.dbUserToken,
|
|
@@ -9261,11 +9346,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9261
9346
|
type: "get",
|
|
9262
9347
|
id: props.id,
|
|
9263
9348
|
pipeline: pipeline,
|
|
9264
|
-
}, offline: ((
|
|
9349
|
+
}, offline: ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
|
|
9265
9350
|
renderBreadcrumb(pages),
|
|
9266
9351
|
react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
|
|
9267
9352
|
(props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
|
|
9268
|
-
props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((
|
|
9353
|
+
props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.darkMode) ? "text-white" : "") }, props.title)),
|
|
9269
9354
|
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
|
|
9270
9355
|
(!isBottom || hasTabAlign_1 || resolvedType === "update") &&
|
|
9271
9356
|
renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)),
|
|
@@ -9284,10 +9369,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9284
9369
|
var tabId = uniqueTabIds_2[stepIndex];
|
|
9285
9370
|
handleUpdateTabId(tabId);
|
|
9286
9371
|
} })),
|
|
9287
|
-
((
|
|
9288
|
-
((
|
|
9289
|
-
((
|
|
9290
|
-
((
|
|
9372
|
+
((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponentAbove) &&
|
|
9373
|
+
((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent) &&
|
|
9374
|
+
((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponent(selectedData, handleResolveRawData())),
|
|
9375
|
+
((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateActionTop) &&
|
|
9291
9376
|
renderStepBar(uniqueTabIds_2),
|
|
9292
9377
|
react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
|
|
9293
9378
|
uniqueTabIds_2.map(function (tabId) {
|
|
@@ -9309,8 +9394,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9309
9394
|
((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.tabDescriptions) === null || _c === void 0 ? void 0 : _c[tabId]) && (react_1.default.createElement("p", { className: "text-sm mt-0.5 ".concat(((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "text-gray-400" : "text-gray-500") }, props.organise.tabDescriptions[tabId])))),
|
|
9310
9395
|
renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
|
|
9311
9396
|
}),
|
|
9312
|
-
!((
|
|
9313
|
-
((
|
|
9397
|
+
!((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
|
|
9398
|
+
((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) && (
|
|
9314
9399
|
// INFO: the form is a grid-cols-12. A child with no column span is one
|
|
9315
9400
|
// column, and a grid item cannot shrink below its longest word, so on a
|
|
9316
9401
|
// phone it wraps one word per line. `contents` takes this wrapper out of
|
|
@@ -9320,20 +9405,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9320
9405
|
react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
|
|
9321
9406
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
|
|
9322
9407
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
|
|
9323
|
-
!((
|
|
9408
|
+
!((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateActionTop) &&
|
|
9324
9409
|
renderStepBar(uniqueTabIds_2),
|
|
9325
9410
|
isBottom &&
|
|
9326
9411
|
resolvedType !== "update" &&
|
|
9327
9412
|
renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
|
|
9328
|
-
((
|
|
9329
|
-
((
|
|
9330
|
-
((
|
|
9331
|
-
((
|
|
9413
|
+
((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponentAbove) &&
|
|
9414
|
+
((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateComponent) &&
|
|
9415
|
+
((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateComponent(selectedData, handleResolveRawData())),
|
|
9416
|
+
((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateActionTop) &&
|
|
9332
9417
|
renderStepBar(uniqueTabIds_2),
|
|
9333
9418
|
react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
|
|
9334
9419
|
renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
|
|
9335
|
-
!((
|
|
9336
|
-
((
|
|
9420
|
+
!((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponentAbove) &&
|
|
9421
|
+
((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateComponent) && (
|
|
9337
9422
|
// INFO: the form is a grid-cols-12. A child with no column span is one
|
|
9338
9423
|
// column, and a grid item cannot shrink below its longest word, so on a
|
|
9339
9424
|
// phone it wraps one word per line. `contents` takes this wrapper out of
|
|
@@ -9343,7 +9428,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9343
9428
|
react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
|
|
9344
9429
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
|
|
9345
9430
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
|
|
9346
|
-
!((
|
|
9431
|
+
!((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareUpdateActionTop) &&
|
|
9347
9432
|
renderStepBar(uniqueTabIds_2)))));
|
|
9348
9433
|
case "list":
|
|
9349
9434
|
case "union":
|
|
@@ -9354,27 +9439,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9354
9439
|
// Counts query output so the badge matches what's actually filtered.
|
|
9355
9440
|
// INFO: one per filter row that filters — several rows on one related
|
|
9356
9441
|
// datasheet send one condition, and a list count can send two
|
|
9357
|
-
var activeFlexFilterCount_1 = ((
|
|
9442
|
+
var activeFlexFilterCount_1 = ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareFlexFilters)
|
|
9358
9443
|
? flexFilters.filter(function (eachFilter) {
|
|
9359
9444
|
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
|
|
9360
9445
|
}).length
|
|
9361
9446
|
: 0;
|
|
9362
9447
|
// INFO: without the floating bar these buttons would have nowhere to
|
|
9363
9448
|
// go, so a hidden search keeps the normal header
|
|
9364
|
-
var isMobileToolbar_1 = !!((
|
|
9365
|
-
!!((
|
|
9366
|
-
!((
|
|
9449
|
+
var isMobileToolbar_1 = !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileToolbar) &&
|
|
9450
|
+
!!((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) &&
|
|
9451
|
+
!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hideSearch);
|
|
9367
9452
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
9368
9453
|
dbModule: dbModule,
|
|
9369
9454
|
dbType: devSettings.server,
|
|
9370
|
-
dbCollection: (
|
|
9455
|
+
dbCollection: (_33 = (_32 = props === null || props === void 0 ? void 0 : props.space) === null || _32 === void 0 ? void 0 : _32.pipelineDefaultSpaceId) !== null && _33 !== void 0 ? _33 : props.collectionId,
|
|
9371
9456
|
dbEndpoint: devSettings.dbEndpoint,
|
|
9372
9457
|
dbAPIToken: devSettings.dbAPIToken,
|
|
9373
9458
|
dbUserToken: devSettings.dbUserToken,
|
|
9374
|
-
}, cond: handleReadQueryHocCond(), offline: ((
|
|
9459
|
+
}, cond: handleReadQueryHocCond(), offline: ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
|
|
9375
9460
|
handleGetListData(data, "", "", cond);
|
|
9376
9461
|
}, onError: handleGetItemError }));
|
|
9377
|
-
if ((
|
|
9462
|
+
if ((_35 = props.renderSettings) === null || _35 === void 0 ? void 0 : _35.renderListUI) {
|
|
9378
9463
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
9379
9464
|
listReadQueryHOC,
|
|
9380
9465
|
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
@@ -9588,47 +9673,47 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9588
9673
|
listReadQueryHOC,
|
|
9589
9674
|
react_1.default.createElement("div", { className: "flex py-2 ".concat(isMobileToolbar_1
|
|
9590
9675
|
? "w-full flex-row items-center md:items-end"
|
|
9591
|
-
: ((
|
|
9676
|
+
: ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareCompactMode)
|
|
9592
9677
|
? // INFO: the grow spacer is hidden on phones (search lives in
|
|
9593
9678
|
// the floating bar), so the row itself pushes the actions right
|
|
9594
9679
|
"w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
|
|
9595
9680
|
: "flex-col md:items-end md:flex-row") },
|
|
9596
9681
|
(props.title || props.description) && (react_1.default.createElement("div", { className: "flex min-w-0 flex-col" },
|
|
9597
9682
|
props.title && (react_1.default.createElement("div", { className: "flex min-w-0 items-center gap-2" },
|
|
9598
|
-
react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((
|
|
9599
|
-
((
|
|
9683
|
+
react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkMode) ? "text-white" : "") }, props.title),
|
|
9684
|
+
((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareSocketName) &&
|
|
9600
9685
|
isLive &&
|
|
9601
9686
|
!isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700" },
|
|
9602
9687
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
|
|
9603
9688
|
"LIVE")),
|
|
9604
|
-
((
|
|
9689
|
+
((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
|
|
9605
9690
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
|
|
9606
9691
|
"OFFLINE")))),
|
|
9607
9692
|
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500 ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "") }, props.description)))),
|
|
9608
|
-
react_1.default.createElement("div", { className: ((
|
|
9693
|
+
react_1.default.createElement("div", { className: ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareCompactMode)
|
|
9609
9694
|
? "hidden sm:block grow"
|
|
9610
9695
|
: "grow" }),
|
|
9611
9696
|
react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end ".concat(isMobileToolbar_1 ? "shrink-0" : "") },
|
|
9612
9697
|
renderListFilterElements(),
|
|
9613
9698
|
renderListActionElements())),
|
|
9614
9699
|
renderListNewRowFilterElements(),
|
|
9615
|
-
(schemaPresent || ((
|
|
9700
|
+
(schemaPresent || ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.darkMode })),
|
|
9616
9701
|
renderScopedTabContent(tabs, resolvedType, viewType),
|
|
9617
|
-
((
|
|
9618
|
-
((
|
|
9702
|
+
((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
|
|
9703
|
+
((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareListMobileFloatingSearch) &&
|
|
9619
9704
|
(0, listModule_1.renderFloatingMobileSearch)({
|
|
9620
9705
|
filterSearch: filterSearch,
|
|
9621
9706
|
handleNameSearch: handleNameSearch,
|
|
9622
9707
|
onFilterClick: function () { return setFlexFilterModalOpen(true); },
|
|
9623
|
-
hideSearch: (
|
|
9624
|
-
darkMode: (
|
|
9625
|
-
floatingOffset: (
|
|
9626
|
-
hideFilter: !((
|
|
9627
|
-
activeFilterCount: ((
|
|
9708
|
+
hideSearch: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.hideSearch,
|
|
9709
|
+
darkMode: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.darkMode,
|
|
9710
|
+
floatingOffset: (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListFloatingActionOffset,
|
|
9711
|
+
hideFilter: !((_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareFlexFilters),
|
|
9712
|
+
activeFilterCount: ((_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareFlexFilters)
|
|
9628
9713
|
? activeFlexFilterCount_1
|
|
9629
9714
|
: undefined,
|
|
9630
9715
|
// INFO: Hides when items are selected so NewTable's multi-action bar takes over.
|
|
9631
|
-
hidden: selectAll || ((
|
|
9716
|
+
hidden: selectAll || ((_50 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _50 !== void 0 ? _50 : 0) > 0,
|
|
9632
9717
|
onRefreshClick: isMobileToolbar_1 && schemaPresent
|
|
9633
9718
|
? function () { return handleRefresh(); }
|
|
9634
9719
|
: undefined,
|
|
@@ -10197,20 +10282,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10197
10282
|
// of its own, and a picked row opens in place instead of navigating away, so
|
|
10198
10283
|
// this record's tabs stay put.
|
|
10199
10284
|
var renderRelatedList = function (source, query, openId, onOpen) {
|
|
10200
|
-
var _a, _b, _c, _d;
|
|
10201
|
-
return (react_1.default.createElement(exports.DataTemplate, { title: "", description: "", type: openId ? "read" : "list", id: openId, collectionId: source.collectionId, model: source.schema, localURLEndpoint: props.localURLEndpoint, devSettings: __assign(__assign({}, props.devSettings), { schemaEndpoint: "" }), lib: props.lib,
|
|
10202
|
-
|
|
10203
|
-
|
|
10285
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10286
|
+
return (react_1.default.createElement(exports.DataTemplate, { title: "", description: "", type: openId ? "read" : "list", id: openId, collectionId: source.collectionId, model: source.schema, localURLEndpoint: props.localURLEndpoint, devSettings: __assign(__assign({}, props.devSettings), { schemaEndpoint: "" }), lib: props.lib,
|
|
10287
|
+
// INFO: comments and logs only — the edit, delete and inline-edit
|
|
10288
|
+
// switches are this record's sheet's, not the related sheet's, so they
|
|
10289
|
+
// stay off and the related rows stay read-only
|
|
10290
|
+
edit: ((_a = props.edit) === null || _a === void 0 ? void 0 : _a.activityLog)
|
|
10291
|
+
? { activityLog: props.edit.activityLog }
|
|
10292
|
+
: undefined, organise: {
|
|
10293
|
+
darkMode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode,
|
|
10294
|
+
darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg,
|
|
10204
10295
|
breadcrumbType: "hidden",
|
|
10205
10296
|
handleNavigate: function (type, selectedId) {
|
|
10206
10297
|
return onOpen(type === "read" && selectedId ? selectedId : "");
|
|
10207
10298
|
},
|
|
10299
|
+
// INFO: asked with the related collection's id, so a host counts the
|
|
10300
|
+
// comments on these rows rather than on its own sheet's
|
|
10301
|
+
onFetchCommentCounts: ((_d = props.edit) === null || _d === void 0 ? void 0 : _d.activityLog)
|
|
10302
|
+
? (_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts
|
|
10303
|
+
: undefined,
|
|
10208
10304
|
}, bareSettings: {
|
|
10209
10305
|
bareListFilterQuery: query,
|
|
10210
|
-
bareNewDTW: (
|
|
10306
|
+
bareNewDTW: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareNewDTW,
|
|
10211
10307
|
// INFO: the related list sits inside this record, so it takes the
|
|
10212
10308
|
// record's layout rather than the full one
|
|
10213
|
-
bareCompactMode: (
|
|
10309
|
+
bareCompactMode: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareCompactMode,
|
|
10310
|
+
// INFO: drawn like the table it was opened from, so the record's own
|
|
10311
|
+
// list and its related tabs read as one
|
|
10312
|
+
bareListGridLines: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridLines,
|
|
10313
|
+
bareHideCollectionActivity: true,
|
|
10314
|
+
// INFO: a row's comment button opens its comments and logs alone in
|
|
10315
|
+
// this tab, not in a second drawer over the read drawer
|
|
10316
|
+
bareInlineActivity: true,
|
|
10214
10317
|
} }));
|
|
10215
10318
|
};
|
|
10216
10319
|
var renderAddMathColumn = function (id, onClose) {
|
|
@@ -12611,14 +12714,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12611
12714
|
};
|
|
12612
12715
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
12613
12716
|
renderNotification("root"),
|
|
12614
|
-
((
|
|
12717
|
+
((_108 = (_107 = props.renderSettings) === null || _107 === void 0 ? void 0 : _107.renderLoadingUI) === null || _108 === void 0 ? void 0 : _108.call(_107)) && loading ? ((_109 = props.renderSettings) === null || _109 === void 0 ? void 0 : _109.renderLoadingUI()) : (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, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
12615
12718
|
var _a, _b;
|
|
12616
12719
|
if (loading)
|
|
12617
12720
|
return;
|
|
12618
12721
|
handlePopUpModal(false);
|
|
12619
12722
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
12620
12723
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
12621
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12724
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
12622
12725
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
12623
12726
|
if (dataId) {
|
|
12624
12727
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -12634,19 +12737,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12634
12737
|
}, onClose: function () {
|
|
12635
12738
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
12636
12739
|
} }),
|
|
12637
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12740
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkMode, darkModeBg: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
12638
12741
|
setReferenceDeleteTableData({});
|
|
12639
12742
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12640
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12743
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkMode, darkModeBg: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
12641
12744
|
setDeletePasscodeInput("");
|
|
12642
12745
|
setDeleteModal(!deleteModal);
|
|
12643
12746
|
setDeleteFeedId("");
|
|
12644
12747
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12645
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12748
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkMode, darkModeBg: (_119 = props.organise) === null || _119 === void 0 ? void 0 : _119.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
12646
12749
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
12647
12750
|
setBatchUpdateModal(false);
|
|
12648
12751
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12649
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12752
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_120 = props.organise) === null || _120 === void 0 ? void 0 : _120.darkMode, darkModeBg: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
12650
12753
|
var _a, _b;
|
|
12651
12754
|
if (props.space)
|
|
12652
12755
|
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 }));
|
|
@@ -12658,22 +12761,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12658
12761
|
renderReadDrawer(),
|
|
12659
12762
|
canHostDrawer && renderDrawerDiscardModal(),
|
|
12660
12763
|
isActivityLog &&
|
|
12764
|
+
!isInlineActivity &&
|
|
12661
12765
|
typeof document !== "undefined" &&
|
|
12662
12766
|
(0, react_dom_1.createPortal)(
|
|
12663
12767
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
12664
12768
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
12665
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
12769
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_122 = props.organise) === null || _122 === void 0 ? void 0 : _122.darkMode, darkModeBg: (_123 = props.organise) === null || _123 === void 0 ? void 0 : _123.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
12666
12770
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
12667
12771
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
12668
12772
|
// toolbar's collection-wide button clears it when it opens.
|
|
12669
|
-
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content:
|
|
12670
|
-
? props.title
|
|
12671
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_122 = props.id) !== null && _122 !== void 0 ? _122 : "") : activityId, activityLog: (_123 = props.edit) === null || _123 === void 0 ? void 0 : _123.activityLog,
|
|
12672
|
-
// INFO: names the record in the drawer's heading; without it
|
|
12673
|
-
// the lookup reads a "title" field most datasheets lack and
|
|
12674
|
-
// the heading shows the record's id. A title or name column
|
|
12675
|
-
// comes first, then the first text column
|
|
12676
|
-
recordTitleColumn: (_126 = ((_125 = (_124 = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _124 !== void 0 ? _124 : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _125 !== void 0 ? _125 : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _126 === void 0 ? void 0 : _126.id, model: structure }) })), document.body),
|
|
12773
|
+
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_124 = props.id) !== null && _124 !== void 0 ? _124 : "") : activityId) })), document.body),
|
|
12677
12774
|
renderScrollSentinel()));
|
|
12678
12775
|
});
|
|
12679
12776
|
//# sourceMappingURL=index.js.map
|