blixify-ui-web 1.2.241 → 1.2.243
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/columnTypes/groupSections.d.ts +12 -0
- package/lib/components/data/columnTypes/groupSections.d.ts.map +1 -1
- package/lib/components/data/columnTypes/groupSections.js +56 -1
- package/lib/components/data/columnTypes/groupSections.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +5 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +331 -242
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +14 -0
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +123 -15
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/flexFilter/model.d.ts +1 -1
- package/lib/components/data/flexFilter/model.d.ts.map +1 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +26 -2
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/input/uploadInput/index.d.ts.map +1 -1
- package/lib/components/input/uploadInput/index.js +11 -10
- package/lib/components/input/uploadInput/index.js.map +1 -1
- package/lib/components/input/utils.d.ts +2 -0
- package/lib/components/input/utils.d.ts.map +1 -1
- package/lib/components/input/utils.js +25 -2
- package/lib/components/input/utils.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -251,10 +251,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
251
251
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
252
252
|
// most in effect dependency arrays — following props.type there would leave
|
|
253
253
|
// the list never refetching while the panel is open, which fails silently.
|
|
254
|
-
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;
|
|
254
|
+
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;
|
|
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 _121 = (0, react_1.useState)(false), drawerPageView = _121[0], setDrawerPageView = _121[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.
|
|
@@ -310,7 +310,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
310
310
|
drawerFormEditedRef.current = false;
|
|
311
311
|
}
|
|
312
312
|
drawerOpenRef.current = isDrawerHost;
|
|
313
|
-
var
|
|
313
|
+
var _122 = (0, react_1.useState)(false), drawerDiscardModal = _122[0], setDrawerDiscardModal = _122[1];
|
|
314
314
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
315
315
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
316
316
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -389,14 +389,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
389
389
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
|
-
var
|
|
392
|
+
var _123 = intialiseDefaultFilterValues(), initialFilterSearch = _123.initialFilterSearch, initialFilterSearchParams = _123.initialFilterSearchParams, initialFilterSelection = _123.initialFilterSelection, initialFilterReference = _123.initialFilterReference, initialFilterReferenceDate = _123.initialFilterReferenceDate;
|
|
393
393
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
394
|
-
var
|
|
394
|
+
var _124 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
395
395
|
mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
|
|
396
396
|
collectionId: props.collectionId,
|
|
397
397
|
persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
|
|
398
398
|
type: resolvedType,
|
|
399
|
-
}), rawPersistedState =
|
|
399
|
+
}), rawPersistedState = _124.persistedState, isPersistEnabled = _124.isEnabled, handleSaveView = _124.handleSaveView, handleRegisterViewSnapshot = _124.handleRegisterViewSnapshot;
|
|
400
400
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
401
401
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
402
402
|
var _a, _b, _c, _d;
|
|
@@ -412,8 +412,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
412
412
|
(_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
|
|
413
413
|
(_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
|
|
414
414
|
]);
|
|
415
|
-
var
|
|
416
|
-
var
|
|
415
|
+
var _125 = (0, react_1.useState)(false), loading = _125[0], setLoading = _125[1];
|
|
416
|
+
var _126 = (0, react_1.useState)(), notification = _126[0], setNotification = _126[1];
|
|
417
417
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
418
418
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
419
419
|
(0, react_1.useEffect)(function () {
|
|
@@ -423,67 +423,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
423
423
|
return function () { return clearTimeout(timer); };
|
|
424
424
|
}, [notification]);
|
|
425
425
|
//INFO : Used by List
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
var
|
|
432
|
-
var
|
|
426
|
+
var _127 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _127[0], setFilterSearch = _127[1];
|
|
427
|
+
var _128 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _128[0], setFilterSearchParams = _128[1];
|
|
428
|
+
var _129 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _129[0], setFilterSelection = _129[1];
|
|
429
|
+
var _130 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _130[0], setFilterReference = _130[1];
|
|
430
|
+
var _131 = (0, react_1.useState)({}), filterReferenceSearch = _131[0], setFilterReferenceSearch = _131[1];
|
|
431
|
+
var _132 = (0, react_1.useState)({}), filterReferenceList = _132[0], setFilterReferenceList = _132[1];
|
|
432
|
+
var _133 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
433
433
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
434
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
438
|
-
var
|
|
439
|
-
var
|
|
434
|
+
: initialFilterReferenceDate), filterReferenceDate = _133[0], setFilterReferenceDate = _133[1];
|
|
435
|
+
var _134 = (0, react_1.useState)(true), tableLoading = _134[0], setTableLoading = _134[1];
|
|
436
|
+
var _135 = (0, react_1.useState)(""), cursor = _135[0], setCursor = _135[1];
|
|
437
|
+
var _136 = (0, react_1.useState)(""), lastCursor = _136[0], setLastCursor = _136[1];
|
|
438
|
+
var _137 = (0, react_1.useState)([]), tableData = _137[0], setTableData = _137[1];
|
|
439
|
+
var _138 = (0, react_1.useState)([]), spaceTableData = _138[0], setSpaceTableData = _138[1];
|
|
440
440
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
441
441
|
// the state it closed over can predate an earlier save on the same row
|
|
442
442
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
443
443
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
444
444
|
tableDataRef.current = tableData;
|
|
445
445
|
spaceTableDataRef.current = spaceTableData;
|
|
446
|
-
var
|
|
447
|
-
var
|
|
446
|
+
var _139 = (0, react_1.useState)(0), size = _139[0], setSize = _139[1];
|
|
447
|
+
var _140 = (0, react_1.useState)((_t = (_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _r !== void 0 ? _r : (_s = props.organise) === null || _s === void 0 ? void 0 : _s.pageIndex) !== null && _t !== void 0 ? _t : 0), pageIndex = _140[0], setPageIndex = _140[1];
|
|
448
448
|
// INFO: every change of page, including the return to the first page when a
|
|
449
449
|
// filter or search changes, which onChangePagination does not always report
|
|
450
450
|
(0, react_1.useEffect)(function () {
|
|
451
451
|
var _a, _b;
|
|
452
452
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
453
453
|
}, [pageIndex]);
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var
|
|
457
|
-
var
|
|
458
|
-
var
|
|
454
|
+
var _141 = (0, react_1.useState)([]), selectedIds = _141[0], setSelectedIds = _141[1];
|
|
455
|
+
var _142 = (0, react_1.useState)(false), selectAll = _142[0], setSelectAll = _142[1];
|
|
456
|
+
var _143 = (0, react_1.useState)(""), deletePasscode = _143[0], setDeletePasscode = _143[1];
|
|
457
|
+
var _144 = (0, react_1.useState)(""), deletePasscodeInput = _144[0], setDeletePasscodeInput = _144[1];
|
|
458
|
+
var _145 = (0, react_1.useState)(""), deleteFeedId = _145[0], setDeleteFeedId = _145[1];
|
|
459
459
|
//INFO : Used by List Organise
|
|
460
460
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
461
461
|
// persistViewState is enabled and a persisted sort exists
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var
|
|
465
|
-
var
|
|
462
|
+
var _146 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _146[0], setPersistedSort = _146[1];
|
|
463
|
+
var _147 = (0, react_1.useState)(false), filterDraft = _147[0], setFilterDraft = _147[1];
|
|
464
|
+
var _148 = (0, react_1.useState)(false), addTabModal = _148[0], setAddTabModal = _148[1];
|
|
465
|
+
var _149 = (0, react_1.useState)(-1), editTabIndex = _149[0], setEditTabIndex = _149[1];
|
|
466
466
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
467
467
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
468
|
-
var
|
|
468
|
+
var _150 = (0, react_1.useState)(function () {
|
|
469
469
|
var _a;
|
|
470
470
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
471
|
-
}), selectedTab =
|
|
472
|
-
var
|
|
471
|
+
}), selectedTab = _150[0], setSelectedTab = _150[1];
|
|
472
|
+
var _151 = (0, react_1.useState)("dayGridMonth"), calendarView = _151[0], setCalendarView = _151[1];
|
|
473
473
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
474
474
|
// (calendarView above drives the matching range query)
|
|
475
|
-
var
|
|
476
|
-
var
|
|
475
|
+
var _152 = (0, react_1.useState)("month"), newCalendarViewMode = _152[0], setNewCalendarViewMode = _152[1];
|
|
476
|
+
var _153 = (0, react_1.useState)(new Date()), calendarTabMonth = _153[0], setCalendarTabMonth = _153[1];
|
|
477
477
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
478
478
|
// whenever its settings change, and that must not undo the user's switch
|
|
479
479
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
var
|
|
483
|
-
var
|
|
480
|
+
var _154 = (0, react_1.useState)(true), kanbanDroppable = _154[0], setKanbanDroppable = _154[1];
|
|
481
|
+
var _155 = (0, react_1.useState)([]), kanbanOptions = _155[0], setKanbanOptions = _155[1];
|
|
482
|
+
var _156 = (0, react_1.useState)(false), batchUpdateModal = _156[0], setBatchUpdateModal = _156[1];
|
|
483
|
+
var _157 = (0, react_1.useState)({
|
|
484
484
|
columnId: "",
|
|
485
485
|
columnData: {},
|
|
486
|
-
}), batchUpdateData =
|
|
486
|
+
}), batchUpdateData = _157[0], setBatchUpdateData = _157[1];
|
|
487
487
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
488
488
|
// join the structure hidden; the ones a user shows are kept per view
|
|
489
489
|
var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
|
|
@@ -491,12 +491,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
491
491
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
492
492
|
? 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; }); })
|
|
493
493
|
: [];
|
|
494
|
-
var
|
|
494
|
+
var _158 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _158[0], setShownSystemColumnIds = _158[1];
|
|
495
495
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
496
496
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
497
497
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
498
498
|
};
|
|
499
|
-
var
|
|
499
|
+
var _159 = (0, react_1.useState)(function () {
|
|
500
500
|
var _a;
|
|
501
501
|
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 : []);
|
|
502
502
|
if (!persistedState)
|
|
@@ -523,8 +523,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
return model;
|
|
526
|
-
}), structure =
|
|
527
|
-
var
|
|
526
|
+
}), structure = _159[0], setStructure = _159[1];
|
|
527
|
+
var _160 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _160[0], setAdditionalQuery = _160[1];
|
|
528
528
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
529
529
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
530
530
|
var defaultFlexFilterRow = [
|
|
@@ -535,9 +535,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
535
535
|
value: undefined,
|
|
536
536
|
},
|
|
537
537
|
];
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
538
|
+
// INFO: rows the host opens the list with come before a saved view's
|
|
539
|
+
var initialFlexFilterRows = ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.initialFlexFilters) &&
|
|
540
|
+
props.organise.initialFlexFilters.length > 0
|
|
541
|
+
? props.organise.initialFlexFilters
|
|
542
|
+
: (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
543
|
+
? persistedState.flexFilters
|
|
544
|
+
: defaultFlexFilterRow;
|
|
545
|
+
var _161 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _161[0], setFlexFilters = _161[1];
|
|
541
546
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
542
547
|
// clear methods so chained calls in one tick aren't stale.
|
|
543
548
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -550,85 +555,86 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
550
555
|
}, [flexFilters]);
|
|
551
556
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
552
557
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
553
|
-
var
|
|
554
|
-
? persistedState.flexFilters
|
|
555
|
-
: defaultFlexFilterRow), flexFiltersDebounced = _161[0], setFlexFiltersDebounced = _161[1];
|
|
558
|
+
var _162 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _162[0], setFlexFiltersDebounced = _162[1];
|
|
556
559
|
// INFO: the filter rows of the export being set up — started from the
|
|
557
560
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
558
|
-
var
|
|
559
|
-
var
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
561
|
+
var _163 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _163[0], setExportFlexFilters = _163[1];
|
|
562
|
+
var _164 = (0, react_1.useState)({}), flexFilterReferenceOptions = _164[0], setFlexFilterReferenceOptions = _164[1];
|
|
563
|
+
var _165 = (0, react_1.useState)({}), flexFilterReferenceSearch = _165[0], setFlexFilterReferenceSearch = _165[1];
|
|
564
|
+
var _166 = (0, react_1.useState)(false), flexFilterModalOpen = _166[0], setFlexFilterModalOpen = _166[1];
|
|
565
|
+
var _167 = (0, react_1.useState)(false), viewSettingsModalOpen = _167[0], setViewSettingsModalOpen = _167[1];
|
|
563
566
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
564
567
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
565
568
|
// structure to props.model whenever props change, which would wipe the
|
|
566
569
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
567
570
|
// structure — writing user hides there would blur the two concepts.
|
|
568
|
-
var
|
|
569
|
-
var
|
|
570
|
-
var
|
|
571
|
-
var
|
|
571
|
+
var _168 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _0 !== void 0 ? _0 : []), userHiddenColumnIds = _168[0], setUserHiddenColumnIds = _168[1];
|
|
572
|
+
var _169 = (0, react_1.useState)(""), columnSearch = _169[0], setColumnSearch = _169[1];
|
|
573
|
+
var _170 = (0, react_1.useState)([]), savedViews = _170[0], setSavedViews = _170[1];
|
|
574
|
+
var _171 = (0, react_1.useState)(null), activeSavedViewId = _171[0], setActiveSavedViewId = _171[1];
|
|
572
575
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
573
|
-
var
|
|
576
|
+
var _172 = (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 = _172[0], setColumnWidths = _172[1];
|
|
574
577
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
575
578
|
// so the defaults drawn before it never overwrite a person's own
|
|
576
|
-
var
|
|
579
|
+
var _173 = (0, react_1.useState)(false), isViewDraftReady = _173[0], setIsViewDraftReady = _173[1];
|
|
577
580
|
// INFO: null while the name box is closed
|
|
578
|
-
var
|
|
579
|
-
var
|
|
580
|
-
var
|
|
581
|
+
var _174 = (0, react_1.useState)(null), savedViewName = _174[0], setSavedViewName = _174[1];
|
|
582
|
+
var _175 = (0, react_1.useState)(null), deletingSavedViewId = _175[0], setDeletingSavedViewId = _175[1];
|
|
583
|
+
var _176 = (0, react_1.useState)(null), draggingColumnId = _176[0], setDraggingColumnId = _176[1];
|
|
581
584
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
582
585
|
//INFO : Used by Auth
|
|
583
|
-
var
|
|
586
|
+
var _177 = (0, react_1.useState)({
|
|
584
587
|
email: "",
|
|
585
588
|
google: "",
|
|
586
589
|
phone: "",
|
|
587
590
|
disabled: false,
|
|
588
591
|
create: false,
|
|
589
|
-
}), authMethods =
|
|
590
|
-
var
|
|
592
|
+
}), authMethods = _177[0], setAuthMethods = _177[1];
|
|
593
|
+
var _178 = (0, react_1.useState)(""), selectedAuthMethod = _178[0], setSelectedAuthMethod = _178[1];
|
|
591
594
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
592
595
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
593
|
-
var
|
|
596
|
+
var _179 = (0, react_1.useState)(false), authLoading = _179[0], setAuthLoading = _179[1];
|
|
594
597
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
595
598
|
// the state has rendered, and the state disables the confirm button
|
|
596
599
|
var deletingRef = (0, react_1.useRef)(false);
|
|
597
|
-
var
|
|
600
|
+
var _180 = (0, react_1.useState)(false), deleting = _180[0], setDeleting = _180[1];
|
|
598
601
|
// INFO: Used by Activity Log
|
|
599
|
-
var
|
|
600
|
-
var
|
|
602
|
+
var _181 = (0, react_1.useState)(false), activityModal = _181[0], setActivityModal = _181[1];
|
|
603
|
+
var _182 = (0, react_1.useState)(""), activityId = _182[0], setActivityId = _182[1];
|
|
601
604
|
//INFO : Used by Export
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var
|
|
605
|
-
var
|
|
606
|
-
var
|
|
607
|
-
var
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
605
|
+
var _183 = (0, react_1.useState)(null), csvFile = _183[0], setCSVFile = _183[1];
|
|
606
|
+
var _184 = (0, react_1.useState)([]), csvFileData = _184[0], setCSVFileData = _184[1];
|
|
607
|
+
var _185 = (0, react_1.useState)(0), stepCSVIndex = _185[0], setStepCSVIndex = _185[1];
|
|
608
|
+
var _186 = (0, react_1.useState)({}), listCSVMapAttribute = _186[0], setListCSVMapAttribute = _186[1];
|
|
609
|
+
var _187 = (0, react_1.useState)({}), listCSVObjAttribute = _187[0], setListCSVObjAttribute = _187[1];
|
|
610
|
+
var _188 = (0, react_1.useState)([]), csvAPIAttribute = _188[0], setCSVAPIAttribute = _188[1];
|
|
611
|
+
var _189 = (0, react_1.useState)(((_1 = props.devSettings.currentUser) === null || _1 === void 0 ? void 0 : _1.userEmail) || ""), exportCSVEmail = _189[0], setExportCSVEmail = _189[1];
|
|
612
|
+
var _190 = (0, react_1.useState)(((_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.exportSettings) === null || _3 === void 0 ? void 0 : _3.defaultExportPDFName) || ""), exportPDFTitle = _190[0], setExportPDFTitle = _190[1];
|
|
613
|
+
var _191 = (0, react_1.useState)(false), exportPDFLoading = _191[0], setExportPDFLoading = _191[1];
|
|
614
|
+
var _192 = (0, react_1.useState)(false), exportReadPDFLoading = _192[0], setExportReadPDFLoading = _192[1];
|
|
615
|
+
var _193 = (0, react_1.useState)((_6 = (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.exportSettings) === null || _5 === void 0 ? void 0 : _5.sumColumnId) !== null && _6 !== void 0 ? _6 : []), exportSumAttributeIds = _193[0], setExportSumAttributeIds = _193[1];
|
|
616
|
+
var _194 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.hideSubItems) !== null && _9 !== void 0 ? _9 : false), hideSubItems = _194[0], setHideSubItems = _194[1];
|
|
617
|
+
var _195 = (0, react_1.useState)([]), importTableData = _195[0], setImportTableData = _195[1];
|
|
618
|
+
var _196 = (0, react_1.useState)([]), queryList = _196[0], setQueryList = _196[1];
|
|
619
|
+
var _197 = (0, react_1.useState)(undefined), allQueryList = _197[0], setAllQueryList = _197[1];
|
|
617
620
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
618
621
|
// ungrouped, so it opens ungrouped
|
|
619
|
-
var
|
|
622
|
+
var _198 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
620
623
|
? persistedState.groupBy || undefined
|
|
621
|
-
: (
|
|
624
|
+
: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.groupBy), groupId = _198[0], setGroupId = _198[1];
|
|
622
625
|
// INFO: each group's total per number column, keyed by section id
|
|
623
|
-
var
|
|
626
|
+
var _199 = (0, react_1.useState)({}), groupSummaries = _199[0], setGroupSummaries = _199[1];
|
|
627
|
+
// INFO: each group's row count over every row the filters match, read when
|
|
628
|
+
// the groups are built from one page of the list rather than paged alone
|
|
629
|
+
var _200 = (0, react_1.useState)({}), groupTotals = _200[0], setGroupTotals = _200[1];
|
|
624
630
|
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
625
|
-
var
|
|
631
|
+
var _201 = (0, react_1.useState)({}), commentCounts = _201[0], setCommentCounts = _201[1];
|
|
626
632
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
627
633
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
628
634
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
629
635
|
// next page as the user scrolls inside that band, independent of every other
|
|
630
636
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
631
|
-
var
|
|
637
|
+
var _202 = (0, react_1.useState)({}), groupPageState = _202[0], setGroupPageState = _202[1];
|
|
632
638
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
633
639
|
// in one tick do not re-fetch an already in-flight page.
|
|
634
640
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -637,59 +643,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
637
643
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
638
644
|
// arrival instead of appending rows that belong to the old list
|
|
639
645
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
640
|
-
var
|
|
641
|
-
var
|
|
646
|
+
var _203 = (0, react_1.useState)(""), readTabSection = _203[0], setReadTabSection = _203[1];
|
|
647
|
+
var _204 = (0, react_1.useState)(false), readFloatingNav = _204[0], setReadFloatingNav = _204[1];
|
|
642
648
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
643
649
|
//INFO : Used by Read
|
|
644
650
|
//INFO : Used by Update
|
|
645
|
-
var
|
|
646
|
-
var
|
|
647
|
-
var
|
|
648
|
-
var
|
|
649
|
-
var
|
|
650
|
-
var
|
|
651
|
-
var
|
|
651
|
+
var _205 = (0, react_1.useState)(false), modalVisible = _205[0], setModalVisible = _205[1];
|
|
652
|
+
var _206 = (0, react_1.useState)(false), deleteModal = _206[0], setDeleteModal = _206[1];
|
|
653
|
+
var _207 = (0, react_1.useState)(false), excelModal = _207[0], setExcelModal = _207[1];
|
|
654
|
+
var _208 = (0, react_1.useState)(false), exportExcel = _208[0], setExportExcel = _208[1];
|
|
655
|
+
var _209 = (0, react_1.useState)(""), exportType = _209[0], setExportType = _209[1];
|
|
656
|
+
var _210 = (0, react_1.useState)(false), exportQR = _210[0], setExportQR = _210[1];
|
|
657
|
+
var _211 = (0, react_1.useState)(function () {
|
|
652
658
|
var _a, _b;
|
|
653
659
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
654
660
|
return firstTabId;
|
|
655
|
-
}), activeTab =
|
|
656
|
-
var
|
|
657
|
-
var
|
|
658
|
-
var
|
|
659
|
-
var
|
|
660
|
-
var
|
|
661
|
-
var
|
|
662
|
-
var
|
|
661
|
+
}), activeTab = _211[0], setActiveTab = _211[1];
|
|
662
|
+
var _212 = (0, react_1.useState)(false), signatureSigning = _212[0], setSignatureSigning = _212[1];
|
|
663
|
+
var _213 = (0, react_1.useState)({}), selectedData = _213[0], setSelectedData = _213[1];
|
|
664
|
+
var _214 = (0, react_1.useState)(""), selectedObjectStructureId = _214[0], setSelectedObjectStructureId = _214[1];
|
|
665
|
+
var _215 = (0, react_1.useState)(""), selectedObjectId = _215[0], setSelectedObjectId = _215[1];
|
|
666
|
+
var _216 = (0, react_1.useState)(""), selectedListAddressId = _216[0], setSelectedListAddressId = _216[1];
|
|
667
|
+
var _217 = (0, react_1.useState)(-1), selectedListAddressIndex = _217[0], setSelectedListAddressIndex = _217[1];
|
|
668
|
+
var _218 = (0, react_1.useState)({
|
|
663
669
|
lat: 0,
|
|
664
670
|
lng: 0,
|
|
665
671
|
name: "",
|
|
666
|
-
}), selectedListAddress =
|
|
667
|
-
var
|
|
668
|
-
var
|
|
669
|
-
var
|
|
670
|
-
var
|
|
671
|
-
var
|
|
672
|
-
var
|
|
673
|
-
var
|
|
674
|
-
var
|
|
675
|
-
var
|
|
676
|
-
var
|
|
672
|
+
}), selectedListAddress = _218[0], setSelectedListAddress = _218[1];
|
|
673
|
+
var _219 = (0, react_1.useState)({}), selectedObjectData = _219[0], setSelectedObjectData = _219[1];
|
|
674
|
+
var _220 = (0, react_1.useState)(null), objectCellEdit = _220[0], setObjectCellEdit = _220[1];
|
|
675
|
+
var _221 = (0, react_1.useState)(false), referenceLoading = _221[0], setReferenceLoading = _221[1];
|
|
676
|
+
var _222 = (0, react_1.useState)({}), referencesOptions = _222[0], setReferencesOptions = _222[1];
|
|
677
|
+
var _223 = (0, react_1.useState)({}), referencesDetails = _223[0], setReferencesDetails = _223[1];
|
|
678
|
+
var _224 = (0, react_1.useState)({}), listReferencesOptions = _224[0], setListReferencesOptions = _224[1];
|
|
679
|
+
var _225 = (0, react_1.useState)({}), referenceDeleteTableData = _225[0], setReferenceDeleteTableData = _225[1];
|
|
680
|
+
var _226 = (0, react_1.useState)([]), relatedSections = _226[0], setRelatedSections = _226[1];
|
|
681
|
+
var _227 = (0, react_1.useState)(0), referenceDeleteIndex = _227[0], setReferenceDeleteIndex = _227[1];
|
|
682
|
+
var _228 = (0, react_1.useState)({
|
|
677
683
|
id: "",
|
|
678
684
|
name: "",
|
|
679
685
|
type: "string",
|
|
680
|
-
}), referenceCreationModal =
|
|
681
|
-
var
|
|
682
|
-
var
|
|
686
|
+
}), referenceCreationModal = _228[0], setReferenceCreationModal = _228[1];
|
|
687
|
+
var _229 = (0, react_1.useState)({}), referenceModelSchema = _229[0], setReferenceSchema = _229[1];
|
|
688
|
+
var _230 = (0, react_1.useState)([]), kanbanChecked = _230[0], setKanbanChecked = _230[1];
|
|
683
689
|
//INFO : Offline
|
|
684
|
-
var
|
|
685
|
-
var
|
|
690
|
+
var _231 = (0, react_1.useState)(0), offlineDataLength = _231[0], setOfflineDataLength = _231[1];
|
|
691
|
+
var _232 = (0, react_1.useState)(false), offlineModal = _232[0], setOfflineModal = _232[1];
|
|
686
692
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
687
|
-
var
|
|
688
|
-
var
|
|
693
|
+
var _233 = (0, react_1.useState)(false), isLive = _233[0], setIsLive = _233[1];
|
|
694
|
+
var _234 = (0, react_1.useState)(false), isLiveOffline = _234[0], setIsLiveOffline = _234[1];
|
|
689
695
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
690
696
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
691
697
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
692
|
-
var
|
|
698
|
+
var _235 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _235[0], setIsNetworkOffline = _235[1];
|
|
693
699
|
var previousType = (0, react_1.useRef)(null);
|
|
694
700
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
695
701
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -806,7 +812,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
806
812
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
807
813
|
* shared link or a back button.
|
|
808
814
|
*/
|
|
809
|
-
var defaultTabName = (
|
|
815
|
+
var defaultTabName = (_13 = (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.extendedTabs) === null || _12 === void 0 ? void 0 : _12.find(function (eachTab) { return eachTab.defaultTab; })) === null || _13 === void 0 ? void 0 : _13.name;
|
|
810
816
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
811
817
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
812
818
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
@@ -818,14 +824,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
818
824
|
// INFO: Firestore reads and the monday wrapper join every condition with AND
|
|
819
825
|
// (monday flattens all ORs into one), so a flex OR group is offered on Mongo only
|
|
820
826
|
var isFlexOrSupported = !isFirebase && devSettings.server !== "mondayServer";
|
|
821
|
-
var isDateWarnings = !!((
|
|
822
|
-
var isDatasheetDefaults = !!((
|
|
827
|
+
var isDateWarnings = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.dateWarnings);
|
|
828
|
+
var isDatasheetDefaults = !!((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.datasheetDefaults);
|
|
823
829
|
// INFO: the columns as the views draw them — with datasheet defaults every
|
|
824
830
|
// list option without a colour takes the palette colour of its position
|
|
825
831
|
var displayStructure = isDatasheetDefaults
|
|
826
832
|
? (0, defaultColours_1.handleApplyDefaultColours)(structure)
|
|
827
833
|
: structure;
|
|
828
|
-
var dbModule = isFirebaseClient ? (
|
|
834
|
+
var dbModule = isFirebaseClient ? (_16 = props.lib) === null || _16 === void 0 ? void 0 : _16.firebase : (_17 = props.lib) === null || _17 === void 0 ? void 0 : _17.axios;
|
|
829
835
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
830
836
|
var selectedRelated = resolvedType === "read"
|
|
831
837
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -950,32 +956,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
950
956
|
}, [
|
|
951
957
|
resolvedType,
|
|
952
958
|
props.id,
|
|
953
|
-
(
|
|
959
|
+
(_18 = props.space) === null || _18 === void 0 ? void 0 : _18._id,
|
|
954
960
|
props.devSettings.schemaEndpoint,
|
|
955
|
-
(
|
|
961
|
+
(_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.showRelatedTab,
|
|
956
962
|
]);
|
|
957
963
|
/* eslint-enable */
|
|
958
964
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
959
965
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
960
|
-
var isViewSettingsEnabled = ((
|
|
966
|
+
var isViewSettingsEnabled = ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareViewSettings) || ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareNewDTW)
|
|
961
967
|
? true
|
|
962
968
|
: false;
|
|
963
969
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
964
970
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
965
971
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
966
|
-
var isSchemaHideMode = ((
|
|
972
|
+
var isSchemaHideMode = ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.onChangeHide) ? true : false;
|
|
967
973
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
968
974
|
// the persisted value and falls back to the consumer's limit
|
|
969
|
-
var
|
|
975
|
+
var _236 = (0, react_1.useState)((_24 = (_23 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _23 !== void 0 ? _23 : props.limit) !== null && _24 !== void 0 ? _24 : 10), pageLimit = _236[0], setPageLimit = _236[1];
|
|
970
976
|
var limit = pageLimit;
|
|
971
|
-
var isSavedViewsEnabled = !!((
|
|
977
|
+
var isSavedViewsEnabled = !!((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.savedViews) && resolvedType === "list";
|
|
972
978
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
973
979
|
// every view is the team's and nothing is kept locally
|
|
974
|
-
var isAppViews = ((
|
|
975
|
-
!!((
|
|
980
|
+
var isAppViews = ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.sharedViews) !== undefined ||
|
|
981
|
+
!!((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.onChangeSharedViews);
|
|
976
982
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
977
983
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
978
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
984
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.sort);
|
|
979
985
|
var handleSortColumn = function (value) {
|
|
980
986
|
var _a, _b, _c, _d;
|
|
981
987
|
if (isInternalSort)
|
|
@@ -1005,7 +1011,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1005
1011
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
1006
1012
|
// can hand over the whole set — there formula columns are not offered for
|
|
1007
1013
|
// sorting or filtering, rather than ordering one page
|
|
1008
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
1014
|
+
var isFormulaViewSupported = !isFirebase && !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.unionCollections) === null || _30 === void 0 ? void 0 : _30.length);
|
|
1009
1015
|
var formulaSort = isFormulaViewSupported &&
|
|
1010
1016
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
1011
1017
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -1014,11 +1020,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1014
1020
|
// INFO: a referenced record and related rows are joined by MongoWrapper's
|
|
1015
1021
|
// lookups and a list row is matched by its Mongo path — neither Firebase nor
|
|
1016
1022
|
// a union read runs them
|
|
1017
|
-
var flexFilterExtras = !isFirebase && !((
|
|
1023
|
+
var flexFilterExtras = !isFirebase && !((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.unionCollections) === null || _32 === void 0 ? void 0 : _32.length)
|
|
1018
1024
|
? {
|
|
1019
|
-
references: (
|
|
1020
|
-
listObjects: (
|
|
1021
|
-
related: (
|
|
1025
|
+
references: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterReferences,
|
|
1026
|
+
listObjects: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterListObjects,
|
|
1027
|
+
related: (_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareFlexFilterRelated,
|
|
1022
1028
|
}
|
|
1023
1029
|
: undefined;
|
|
1024
1030
|
// INFO: a formula filter is matched in the browser and the rest on the
|
|
@@ -1107,18 +1113,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1107
1113
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1108
1114
|
};
|
|
1109
1115
|
};
|
|
1110
|
-
var
|
|
1111
|
-
var isEditor = ((
|
|
1112
|
-
var isOffline = (
|
|
1116
|
+
var _237 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _237.canUpdateRecord, canInlineUpdate = _237.canInlineUpdate, canBatchUpdate = _237.canBatchUpdate, canDeleteRecord = _237.canDeleteRecord;
|
|
1117
|
+
var isEditor = ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) ? true : false;
|
|
1118
|
+
var isOffline = (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOffline;
|
|
1113
1119
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1114
1120
|
// the live network state — online saves go to the server even if bareOffline
|
|
1115
1121
|
// is true, offline saves go to IDB as normal.
|
|
1116
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1117
|
-
var showId = (
|
|
1122
|
+
var isOfflineNetworkListener = isOffline && ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareOfflineNetworkListener);
|
|
1123
|
+
var showId = (_39 = props.space) === null || _39 === void 0 ? void 0 : _39.showId;
|
|
1118
1124
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1119
|
-
var idField = ((
|
|
1120
|
-
var pipeline = (
|
|
1121
|
-
if ((
|
|
1125
|
+
var idField = ((_40 = props.space) === null || _40 === void 0 ? void 0 : _40.idField) || ((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.idField);
|
|
1126
|
+
var pipeline = (_42 = props === null || props === void 0 ? void 0 : props.space) === null || _42 === void 0 ? void 0 : _42.pipeline;
|
|
1127
|
+
if ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListPipeline) {
|
|
1122
1128
|
pipeline = pipeline
|
|
1123
1129
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1124
1130
|
}
|
|
@@ -1131,24 +1137,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1131
1137
|
* three records came back instead of five files, and each tile received the
|
|
1132
1138
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1133
1139
|
*/
|
|
1134
|
-
var fileViewColumnId = (
|
|
1140
|
+
var fileViewColumnId = (_47 = (_46 = ((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.extendedTabs) !== null && _45 !== void 0 ? _45 : []).find(function (eachTab) {
|
|
1135
1141
|
return eachTab.viewType === "file" &&
|
|
1136
1142
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1137
|
-
})) === null ||
|
|
1138
|
-
var hasNavigation = ((
|
|
1143
|
+
})) === null || _46 === void 0 ? void 0 : _46.fileSettings) === null || _47 === void 0 ? void 0 : _47.columnId;
|
|
1144
|
+
var hasNavigation = ((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.handleNavigate) ? true : false;
|
|
1139
1145
|
var formColumn = "grid-cols-12";
|
|
1140
|
-
var useMobileView = (
|
|
1146
|
+
var useMobileView = (_50 = (_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareUpdateMobileView) !== null && _50 !== void 0 ? _50 : false;
|
|
1141
1147
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1142
|
-
var isActivityLog = (((
|
|
1143
|
-
((
|
|
1144
|
-
(((
|
|
1145
|
-
((
|
|
1146
|
-
var customPaginationSize = ((
|
|
1148
|
+
var isActivityLog = (((_52 = (_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog) === null || _52 === void 0 ? void 0 : _52.enableComments) &&
|
|
1149
|
+
((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog.commentCollectionId)) ||
|
|
1150
|
+
(((_55 = (_54 = props.edit) === null || _54 === void 0 ? void 0 : _54.activityLog) === null || _55 === void 0 ? void 0 : _55.enableLogs) &&
|
|
1151
|
+
((_56 = props.edit) === null || _56 === void 0 ? void 0 : _56.activityLog.logsCollectionId));
|
|
1152
|
+
var customPaginationSize = ((_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.customPaginationCount)
|
|
1147
1153
|
? props.organise.customPaginationCount(size)
|
|
1148
1154
|
: undefined;
|
|
1149
1155
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1150
1156
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1151
|
-
dbModule: (
|
|
1157
|
+
dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
|
|
1152
1158
|
dbType: devSettings.server,
|
|
1153
1159
|
dbCollection: props.collectionId,
|
|
1154
1160
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1156,7 +1162,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1156
1162
|
dbUserToken: devSettings.dbUserToken,
|
|
1157
1163
|
});
|
|
1158
1164
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1159
|
-
dbModule: (
|
|
1165
|
+
dbModule: (_59 = props.lib) === null || _59 === void 0 ? void 0 : _59.axios,
|
|
1160
1166
|
dbType: devSettings.server,
|
|
1161
1167
|
dbCollection: props.collectionId,
|
|
1162
1168
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1164,12 +1170,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1164
1170
|
dbUserToken: devSettings.dbUserToken,
|
|
1165
1171
|
});
|
|
1166
1172
|
var moreButtonPopUp = [
|
|
1167
|
-
((
|
|
1173
|
+
((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.allEditable) &&
|
|
1168
1174
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1169
1175
|
// datasheet served through one can import; only the browser-direct
|
|
1170
1176
|
// Firebase client has no server to import through
|
|
1171
1177
|
!isFirebaseClient &&
|
|
1172
|
-
!((
|
|
1178
|
+
!((_62 = (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.exportSettings) === null || _62 === void 0 ? void 0 : _62.hideImportCSV)
|
|
1173
1179
|
? {
|
|
1174
1180
|
text: "Import Excel",
|
|
1175
1181
|
onClick: function () {
|
|
@@ -1178,7 +1184,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1178
1184
|
},
|
|
1179
1185
|
}
|
|
1180
1186
|
: null,
|
|
1181
|
-
!((
|
|
1187
|
+
!((_64 = (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.exportSettings) === null || _64 === void 0 ? void 0 : _64.hideExportCSV)
|
|
1182
1188
|
? {
|
|
1183
1189
|
text: "Export CSV",
|
|
1184
1190
|
onClick: function () {
|
|
@@ -1188,7 +1194,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1188
1194
|
},
|
|
1189
1195
|
}
|
|
1190
1196
|
: null,
|
|
1191
|
-
!((
|
|
1197
|
+
!((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideExportExcel)
|
|
1192
1198
|
? {
|
|
1193
1199
|
text: "Export Excel",
|
|
1194
1200
|
onClick: function () {
|
|
@@ -1198,7 +1204,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1198
1204
|
},
|
|
1199
1205
|
}
|
|
1200
1206
|
: null,
|
|
1201
|
-
!((
|
|
1207
|
+
!((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportPDF)
|
|
1202
1208
|
? {
|
|
1203
1209
|
text: "Export PDF",
|
|
1204
1210
|
onClick: function () {
|
|
@@ -1208,7 +1214,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1208
1214
|
},
|
|
1209
1215
|
}
|
|
1210
1216
|
: null,
|
|
1211
|
-
!((
|
|
1217
|
+
!((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportQR)
|
|
1212
1218
|
? {
|
|
1213
1219
|
text: "Export QR",
|
|
1214
1220
|
onClick: function () {
|
|
@@ -1218,7 +1224,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1218
1224
|
},
|
|
1219
1225
|
}
|
|
1220
1226
|
: null,
|
|
1221
|
-
!((
|
|
1227
|
+
!((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportQR)
|
|
1222
1228
|
? {
|
|
1223
1229
|
text: "Export QR(Data)",
|
|
1224
1230
|
onClick: function () {
|
|
@@ -1228,7 +1234,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1228
1234
|
},
|
|
1229
1235
|
}
|
|
1230
1236
|
: null,
|
|
1231
|
-
!((
|
|
1237
|
+
!((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportPrint)
|
|
1232
1238
|
? {
|
|
1233
1239
|
text: "Print",
|
|
1234
1240
|
onClick: function () {
|
|
@@ -1240,8 +1246,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1240
1246
|
: null,
|
|
1241
1247
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1242
1248
|
// nothing to find on any other page
|
|
1243
|
-
((
|
|
1244
|
-
!((
|
|
1249
|
+
((_75 = props.edit) === null || _75 === void 0 ? void 0 : _75.enableUpdateDraft) &&
|
|
1250
|
+
!((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportDraft)
|
|
1245
1251
|
? {
|
|
1246
1252
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1247
1253
|
onClick: function () {
|
|
@@ -1250,7 +1256,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1250
1256
|
}
|
|
1251
1257
|
: null,
|
|
1252
1258
|
].filter(Boolean);
|
|
1253
|
-
if ((
|
|
1259
|
+
if ((_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.moreSettings)
|
|
1254
1260
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1255
1261
|
//=====================================================================================
|
|
1256
1262
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1321,6 +1327,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1321
1327
|
}
|
|
1322
1328
|
setUserHiddenColumnIds([]);
|
|
1323
1329
|
};
|
|
1330
|
+
// INFO: hides every column but the first one on screen, since a table
|
|
1331
|
+
// without a column cannot draw
|
|
1332
|
+
var handleHideAllUserHiddenColumns = function () {
|
|
1333
|
+
var _a, _b;
|
|
1334
|
+
var viewColumns = getViewSettingsColumns();
|
|
1335
|
+
var keepColumn = (_a = viewColumns.find(function (eachColumn) { return !appendedSystemColumnIds.includes(eachColumn.id); })) !== null && _a !== void 0 ? _a : viewColumns[0];
|
|
1336
|
+
if (!keepColumn)
|
|
1337
|
+
return;
|
|
1338
|
+
if (appendedSystemColumnIds.length && !isSystemColumnsLocked)
|
|
1339
|
+
handleSetShownSystemColumns(appendedSystemColumnIds.includes(keepColumn.id) ? [keepColumn.id] : []);
|
|
1340
|
+
var hideIds = viewColumns
|
|
1341
|
+
.filter(function (eachColumn) {
|
|
1342
|
+
return eachColumn.id !== keepColumn.id &&
|
|
1343
|
+
!appendedSystemColumnIds.includes(eachColumn.id);
|
|
1344
|
+
})
|
|
1345
|
+
.map(function (eachColumn) { return eachColumn.id; });
|
|
1346
|
+
if ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.onChangeHide) {
|
|
1347
|
+
var handleHideAll = function (columns) {
|
|
1348
|
+
return columns.map(function (eachColumn) {
|
|
1349
|
+
return hideIds.includes(eachColumn.id)
|
|
1350
|
+
? __assign(__assign({}, eachColumn), { hide: true }) : eachColumn.id === keepColumn.id
|
|
1351
|
+
? __assign(__assign({}, eachColumn), { hide: false }) : eachColumn;
|
|
1352
|
+
});
|
|
1353
|
+
};
|
|
1354
|
+
setStructure(handleHideAll(structure));
|
|
1355
|
+
props.organise.onChangeHide(handleUpdateSchemaStructure(handleHideAll), {
|
|
1356
|
+
hideAll: true,
|
|
1357
|
+
keepColumnId: keepColumn.id,
|
|
1358
|
+
});
|
|
1359
|
+
return;
|
|
1360
|
+
}
|
|
1361
|
+
setUserHiddenColumnIds(hideIds);
|
|
1362
|
+
};
|
|
1324
1363
|
// INFO: reorder from the view settings panel — the same move the old header
|
|
1325
1364
|
// drag made, so consumers keep persisting through onChangeDrag
|
|
1326
1365
|
var handleReorderColumn = function (dragId, dropId) {
|
|
@@ -1554,9 +1593,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1554
1593
|
},
|
|
1555
1594
|
handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded,
|
|
1556
1595
|
handleReferenceSearch: handleFlexFilterReferenceSearch,
|
|
1596
|
+
isContainsSupported: isFlexOrSupported,
|
|
1557
1597
|
};
|
|
1558
1598
|
// INFO: flexRows defaults to the list's filters; an export passes its own
|
|
1559
|
-
var renderImpSearchFilterConditions = function (flexRows) {
|
|
1599
|
+
var renderImpSearchFilterConditions = function (flexRows, options) {
|
|
1560
1600
|
var _a;
|
|
1561
1601
|
if (flexRows === void 0) { flexRows = flexFiltersDebounced; }
|
|
1562
1602
|
var query = (0, listModule_1.renderSearchFilterConditions)(structure, devSettings, {
|
|
@@ -1566,6 +1606,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1566
1606
|
filterReference: filterReference,
|
|
1567
1607
|
filterDraft: filterDraft,
|
|
1568
1608
|
}, additionalQuery !== null && additionalQuery !== void 0 ? additionalQuery : [], (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListFilterQuery, selectedTab);
|
|
1609
|
+
// INFO: the list's search box is left out before the flex filters join, so
|
|
1610
|
+
// a "contains" filter — also a search — still applies
|
|
1611
|
+
if ((options === null || options === void 0 ? void 0 : options.withoutListSearch) && query)
|
|
1612
|
+
query = query.filter(function (eachQuery) { return eachQuery.type !== "search"; });
|
|
1569
1613
|
// INFO: Merge flex filter conditions into the query array (uses debounced state to avoid API calls on every keystroke)
|
|
1570
1614
|
if (flexRows.length > 0) {
|
|
1571
1615
|
// INFO: formula conditions never reach the server — the field is not
|
|
@@ -1652,14 +1696,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1652
1696
|
//=====================================================================================
|
|
1653
1697
|
//SECTION: Saved Views
|
|
1654
1698
|
//=====================================================================================
|
|
1655
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1699
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.persistKey, (_80 = devSettings.currentUser) === null || _80 === void 0 ? void 0 : _80.userEmail);
|
|
1656
1700
|
(0, react_1.useEffect)(function () {
|
|
1657
1701
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1658
1702
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1659
1703
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1660
1704
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1661
1705
|
// browser until the person updates the view for everyone or resets it
|
|
1662
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1706
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.allView) !== undefined;
|
|
1663
1707
|
var handleGetViewDraftKey = function (viewId) {
|
|
1664
1708
|
var _a, _b;
|
|
1665
1709
|
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);
|
|
@@ -1736,7 +1780,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1736
1780
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1737
1781
|
(0, react_1.useEffect)(function () {
|
|
1738
1782
|
lastSentSharedViewsRef.current = null;
|
|
1739
|
-
}, [(
|
|
1783
|
+
}, [(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews]);
|
|
1740
1784
|
var handleStoreSharedViews = function (update) {
|
|
1741
1785
|
var _a, _b, _c;
|
|
1742
1786
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1781,13 +1825,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1781
1825
|
/* eslint-disable */
|
|
1782
1826
|
}, [
|
|
1783
1827
|
isSavedViewsEnabled,
|
|
1784
|
-
(
|
|
1785
|
-
(
|
|
1786
|
-
(
|
|
1828
|
+
(_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.initialSavedViewId,
|
|
1829
|
+
(_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.defaultSavedViewId,
|
|
1830
|
+
(_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.sharedViews,
|
|
1787
1831
|
savedViews,
|
|
1788
1832
|
]);
|
|
1789
1833
|
/* eslint-enable */
|
|
1790
|
-
var defaultSavedViewIds = ((
|
|
1834
|
+
var defaultSavedViewIds = ((_87 = (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.defaultSavedViews) !== null && _87 !== void 0 ? _87 : [])
|
|
1791
1835
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1792
1836
|
.join("|");
|
|
1793
1837
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -2089,8 +2133,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2089
2133
|
pageLimit,
|
|
2090
2134
|
groupId,
|
|
2091
2135
|
columnWidths,
|
|
2092
|
-
(
|
|
2093
|
-
(
|
|
2136
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.allView,
|
|
2137
|
+
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.sharedViews,
|
|
2094
2138
|
savedViews,
|
|
2095
2139
|
]);
|
|
2096
2140
|
/* eslint-enable */
|
|
@@ -2130,7 +2174,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2130
2174
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
2131
2175
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
2132
2176
|
/* eslint-disable */
|
|
2133
|
-
}, [props.collectionId, (
|
|
2177
|
+
}, [props.collectionId, (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.persistKey]);
|
|
2134
2178
|
/* eslint-enable */
|
|
2135
2179
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2136
2180
|
(0, react_1.useEffect)(function () {
|
|
@@ -2165,7 +2209,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2165
2209
|
(0, react_1.useEffect)(function () {
|
|
2166
2210
|
handleOfflinePrefetch();
|
|
2167
2211
|
/* eslint-disable */
|
|
2168
|
-
}, [props.collectionId, (
|
|
2212
|
+
}, [props.collectionId, (_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.bareOffline]);
|
|
2169
2213
|
/* eslint-enable */
|
|
2170
2214
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2171
2215
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2185,7 +2229,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2185
2229
|
}, interval);
|
|
2186
2230
|
return function () { return clearInterval(timer); };
|
|
2187
2231
|
/* eslint-disable */
|
|
2188
|
-
}, [(
|
|
2232
|
+
}, [(_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.barePollingInterval, isLive, isNetworkOffline]);
|
|
2189
2233
|
/* eslint-enable */
|
|
2190
2234
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2191
2235
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2227,7 +2271,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2227
2271
|
};
|
|
2228
2272
|
/* eslint-disable */
|
|
2229
2273
|
}, [
|
|
2230
|
-
(
|
|
2274
|
+
(_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareSocketName,
|
|
2231
2275
|
props.collectionId,
|
|
2232
2276
|
props.devSettings.sseEndpoint,
|
|
2233
2277
|
props.devSettings.dbAPIToken,
|
|
@@ -2501,10 +2545,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2501
2545
|
props.collectionId,
|
|
2502
2546
|
props.model,
|
|
2503
2547
|
props.localURLEndpoint,
|
|
2504
|
-
(
|
|
2548
|
+
(_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.extendedTabs,
|
|
2505
2549
|
listViewId,
|
|
2506
|
-
(
|
|
2507
|
-
(
|
|
2550
|
+
(_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.additionalQuery,
|
|
2551
|
+
(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.groupBy,
|
|
2508
2552
|
resolvedType,
|
|
2509
2553
|
]);
|
|
2510
2554
|
/**
|
|
@@ -2656,7 +2700,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2656
2700
|
};
|
|
2657
2701
|
}, 100);
|
|
2658
2702
|
return function () { return clearTimeout(timeoutId); };
|
|
2659
|
-
}, [(
|
|
2703
|
+
}, [(_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2660
2704
|
(0, react_1.useEffect)(function () {
|
|
2661
2705
|
if (resolvedType !== "read")
|
|
2662
2706
|
return;
|
|
@@ -5771,7 +5815,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5771
5815
|
var columnTypeActions = {
|
|
5772
5816
|
canUpdate: canUpdateRecord,
|
|
5773
5817
|
dateWarnings: isDateWarnings,
|
|
5774
|
-
onButtonClick: (
|
|
5818
|
+
onButtonClick: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onButtonClick,
|
|
5775
5819
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5776
5820
|
var _a;
|
|
5777
5821
|
return __generator(this, function (_b) {
|
|
@@ -5788,7 +5832,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5788
5832
|
}
|
|
5789
5833
|
});
|
|
5790
5834
|
}); },
|
|
5791
|
-
onTimeTrackingAction: ((
|
|
5835
|
+
onTimeTrackingAction: ((_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.onTimeTrackingAction) && canUpdateRecord
|
|
5792
5836
|
? function (rowId, columnId, action) {
|
|
5793
5837
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5794
5838
|
}
|
|
@@ -7214,7 +7258,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7214
7258
|
case 0:
|
|
7215
7259
|
_2.trys.push([0, 5, , 6]);
|
|
7216
7260
|
setLoading(true);
|
|
7217
|
-
exportQueryList = (
|
|
7261
|
+
exportQueryList = (_a = renderImpSearchFilterConditions(exportFlexFilters, {
|
|
7262
|
+
withoutListSearch: true,
|
|
7263
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
7218
7264
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareCSVExportSettings) {
|
|
7219
7265
|
if (props.bareSettings.bareListFilterQuery)
|
|
7220
7266
|
exportQueryList.push.apply(exportQueryList, props.bareSettings.bareListFilterQuery);
|
|
@@ -7943,7 +7989,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7943
7989
|
react_1.default.createElement("div", { className: "flex flex-row items-center" },
|
|
7944
7990
|
react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Columns"),
|
|
7945
7991
|
react_1.default.createElement("div", { className: "grow" }),
|
|
7946
|
-
|
|
7992
|
+
visibleCount > 1 && (react_1.default.createElement(textButton_1.TextButton, { text: "Hide all", onClick: handleHideAllUserHiddenColumns })),
|
|
7993
|
+
hiddenCount > 0 && (react_1.default.createElement(textButton_1.TextButton, { text: "Show all", className: visibleCount > 1 ? "ml-3" : undefined, onClick: handleShowAllUserHiddenColumns }))),
|
|
7947
7994
|
react_1.default.createElement(textInput_1.TextInput, { id: "dtw-column-search", label: "", type: "text", containerClassName: "mt-2", value: columnSearch, placeholder: "Search columns", darkMode: darkMode, onChange: function (e) { return setColumnSearch(e.target.value); } }),
|
|
7948
7995
|
react_1.default.createElement(scrollShadow_1.ScrollShadow, { axis: "y", className: "mt-1 max-h-56 overflow-y-auto", darkMode: darkMode },
|
|
7949
7996
|
react_1.default.createElement("div", { className: "flex flex-col pr-3", onPointerMove: handleColumnDragMove, onPointerUp: function () { return setDraggingColumnId(null); } }, searchedColumns.length > 0 ? (searchedColumns.map(renderColumnRow)) : (react_1.default.createElement("p", { className: "py-3 text-sm text-gray-400" }, "No columns found")))),
|
|
@@ -8006,8 +8053,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8006
8053
|
: rows;
|
|
8007
8054
|
};
|
|
8008
8055
|
/* eslint-disable */
|
|
8009
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
8010
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
8056
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
|
|
8057
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_101 = props.bareSettings) === null || _101 === void 0 ? void 0 : _101.bareNewDTW]);
|
|
8011
8058
|
/* eslint-enable */
|
|
8012
8059
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
8013
8060
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -9254,7 +9301,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9254
9301
|
}
|
|
9255
9302
|
// INFO: Flex filter — desktop uses PopUp, mobile uses Modal
|
|
9256
9303
|
if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareFlexFilters) {
|
|
9257
|
-
var flexActions = __assign({ handleAddFilter: handleFlexFilterAdd, handleRemoveFilter: handleFlexFilterRemove, handleClearAllFilters: handleFlexFilterClearAll, handleColumnChange: handleFlexFilterColumnChange, handleOperatorChange: handleFlexFilterOperatorChange, handleValueChange: handleFlexFilterValueChange, handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded, handleReferenceSearch: handleFlexFilterReferenceSearch }, (isFlexOrSupported
|
|
9304
|
+
var flexActions = __assign({ handleAddFilter: handleFlexFilterAdd, handleRemoveFilter: handleFlexFilterRemove, handleClearAllFilters: handleFlexFilterClearAll, handleColumnChange: handleFlexFilterColumnChange, handleOperatorChange: handleFlexFilterOperatorChange, handleValueChange: handleFlexFilterValueChange, handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded, handleReferenceSearch: handleFlexFilterReferenceSearch, isContainsSupported: isFlexOrSupported }, (isFlexOrSupported
|
|
9258
9305
|
? {
|
|
9259
9306
|
handleAddOrFilter: handleFlexFilterAddOr,
|
|
9260
9307
|
canAddOrFilter: function (filterId) {
|
|
@@ -9981,9 +10028,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9981
10028
|
var _a;
|
|
9982
10029
|
return (__assign(__assign({}, eachSection), {
|
|
9983
10030
|
// INFO: a row added in the group since its read is counted at once
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
10031
|
+
// INFO: without per-group paging the loaded rows are one page of the
|
|
10032
|
+
// whole list, so the group's total comes from the grouped count
|
|
10033
|
+
count: isGroupPaging
|
|
10034
|
+
? ((_a = groupPageState[eachSection.id]) === null || _a === void 0 ? void 0 : _a.fetched)
|
|
10035
|
+
? Math.max(groupPageState[eachSection.id].size, eachSection.rowIds.length)
|
|
10036
|
+
: undefined
|
|
10037
|
+
: groupTotals[eachSection.id] !== undefined
|
|
10038
|
+
? Math.max(groupTotals[eachSection.id], eachSection.rowIds.length)
|
|
10039
|
+
: undefined }));
|
|
9987
10040
|
});
|
|
9988
10041
|
// INFO: a section whose own query came back empty has nothing to show
|
|
9989
10042
|
var shownSections = isGroupPaging
|
|
@@ -10020,7 +10073,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10020
10073
|
return __assign(__assign({}, eachSection), { colour: (_b = eachSection.colour) !== null && _b !== void 0 ? _b : (isSpecial
|
|
10021
10074
|
? undefined
|
|
10022
10075
|
: (0, defaultColours_1.handleGetDefaultColour)(optionIndex >= 0 ? optionIndex : index)), avatar: (column === null || column === void 0 ? void 0 : column.type) === "person" && !isSpecial
|
|
10023
|
-
? {
|
|
10076
|
+
? {
|
|
10077
|
+
label: (_c = member === null || member === void 0 ? void 0 : member.label) !== null && _c !== void 0 ? _c : eachSection.title,
|
|
10078
|
+
image: member === null || member === void 0 ? void 0 : member.image,
|
|
10079
|
+
}
|
|
10024
10080
|
: undefined, joinValues: column && join ? (_a = {}, _a[column.id] = join.value, _a) : undefined,
|
|
10025
10081
|
// INFO: drawn once the totals are in. The count is shown only when it
|
|
10026
10082
|
// is the group's real total — a group built from one page of the list
|
|
@@ -10053,52 +10109,78 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10053
10109
|
* dropped.
|
|
10054
10110
|
*/
|
|
10055
10111
|
var handleFetchGroupSummaries = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
10056
|
-
var column, requestId, sumIds, query, range, results, options_1, sums_1,
|
|
10057
|
-
var
|
|
10058
|
-
return __generator(this, function (
|
|
10059
|
-
switch (
|
|
10112
|
+
var column, requestId, sumIds, isCountNeeded, query, range, _a, results, countResult, options_1, totals_1, sums_1, _b;
|
|
10113
|
+
var _c, _d, _e, _f;
|
|
10114
|
+
return __generator(this, function (_g) {
|
|
10115
|
+
switch (_g.label) {
|
|
10060
10116
|
case 0:
|
|
10061
10117
|
column = handleGetGroupColumn();
|
|
10062
10118
|
requestId = ++groupSummaryRequestRef.current;
|
|
10063
10119
|
sumIds = handleGetGroupSumIds();
|
|
10120
|
+
isCountNeeded = !renderCheckGroupPaging();
|
|
10064
10121
|
if (!column ||
|
|
10065
10122
|
!isDatasheetDefaults ||
|
|
10066
|
-
!((
|
|
10123
|
+
!((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareNewDTW) ||
|
|
10067
10124
|
isFirebase ||
|
|
10068
10125
|
// INFO: a formula filter is applied here, not on the server, so the
|
|
10069
10126
|
// server's sums would include rows it hides; a union list cannot take
|
|
10070
10127
|
// an aggregate
|
|
10071
10128
|
isFormulaView ||
|
|
10072
|
-
!!((
|
|
10073
|
-
sumIds.length === 0) {
|
|
10129
|
+
!!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.unionCollections) === null || _e === void 0 ? void 0 : _e.length) ||
|
|
10130
|
+
(sumIds.length === 0 && !isCountNeeded)) {
|
|
10074
10131
|
setGroupSummaries(function (previous) {
|
|
10075
10132
|
return Object.keys(previous).length > 0 ? {} : previous;
|
|
10076
10133
|
});
|
|
10134
|
+
setGroupTotals(function (previous) {
|
|
10135
|
+
return Object.keys(previous).length > 0 ? {} : previous;
|
|
10136
|
+
});
|
|
10077
10137
|
return [2 /*return*/];
|
|
10078
10138
|
}
|
|
10079
|
-
query = (
|
|
10139
|
+
query = (_f = renderImpSearchFilterConditions()) !== null && _f !== void 0 ? _f : [];
|
|
10080
10140
|
range = [(0, dayjs_1.default)().add(1, "day").format("DD/MM/YYYY HH:mm:ss")];
|
|
10081
|
-
|
|
10141
|
+
_g.label = 1;
|
|
10082
10142
|
case 1:
|
|
10083
|
-
|
|
10084
|
-
return [4 /*yield*/, Promise.all(
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10143
|
+
_g.trys.push([1, 3, , 4]);
|
|
10144
|
+
return [4 /*yield*/, Promise.all([
|
|
10145
|
+
Promise.all(sumIds.map(function (eachId) {
|
|
10146
|
+
return readServerQuery.call({
|
|
10147
|
+
type: "list",
|
|
10148
|
+
query: query,
|
|
10149
|
+
aggregate: {
|
|
10150
|
+
type: "sum",
|
|
10151
|
+
queryId: eachId,
|
|
10152
|
+
groupId: column.id,
|
|
10153
|
+
range: range,
|
|
10154
|
+
timezone: dayjs_1.default.tz.guess(),
|
|
10155
|
+
},
|
|
10156
|
+
});
|
|
10157
|
+
})),
|
|
10158
|
+
isCountNeeded
|
|
10159
|
+
? readServerQuery.call({
|
|
10160
|
+
type: "list",
|
|
10161
|
+
query: query,
|
|
10162
|
+
aggregate: {
|
|
10163
|
+
type: "count",
|
|
10164
|
+
queryId: "_id",
|
|
10165
|
+
groupId: column.id,
|
|
10166
|
+
range: range,
|
|
10167
|
+
timezone: dayjs_1.default.tz.guess(),
|
|
10168
|
+
},
|
|
10169
|
+
})
|
|
10170
|
+
: undefined,
|
|
10171
|
+
])];
|
|
10097
10172
|
case 2:
|
|
10098
|
-
|
|
10173
|
+
_a = _g.sent(), results = _a[0], countResult = _a[1];
|
|
10099
10174
|
if (requestId !== groupSummaryRequestRef.current)
|
|
10100
10175
|
return [2 /*return*/];
|
|
10101
10176
|
options_1 = handleGetGroupColumnOptions();
|
|
10177
|
+
totals_1 = {};
|
|
10178
|
+
if (countResult)
|
|
10179
|
+
(0, chartResults_1.handleFlattenGroupedResult)(countResult === null || countResult === void 0 ? void 0 : countResult.data).forEach(function (eachGroup) {
|
|
10180
|
+
var _a, _b;
|
|
10181
|
+
var sectionId = (0, groupSections_1.handleGetGroupKey)(column, eachGroup.key, options_1, isFirebase);
|
|
10182
|
+
totals_1[sectionId] = ((_a = totals_1[sectionId]) !== null && _a !== void 0 ? _a : 0) + ((_b = eachGroup.value) !== null && _b !== void 0 ? _b : 0);
|
|
10183
|
+
});
|
|
10102
10184
|
sums_1 = {};
|
|
10103
10185
|
results.forEach(function (eachResult, index) {
|
|
10104
10186
|
(0, chartResults_1.handleFlattenGroupedResult)(eachResult === null || eachResult === void 0 ? void 0 : eachResult.data).forEach(function (eachGroup) {
|
|
@@ -10110,11 +10192,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10110
10192
|
});
|
|
10111
10193
|
});
|
|
10112
10194
|
setGroupSummaries(sums_1);
|
|
10195
|
+
setGroupTotals(totals_1);
|
|
10113
10196
|
return [3 /*break*/, 4];
|
|
10114
10197
|
case 3:
|
|
10115
|
-
|
|
10116
|
-
if (requestId === groupSummaryRequestRef.current)
|
|
10198
|
+
_b = _g.sent();
|
|
10199
|
+
if (requestId === groupSummaryRequestRef.current) {
|
|
10117
10200
|
setGroupSummaries({});
|
|
10201
|
+
setGroupTotals({});
|
|
10202
|
+
}
|
|
10118
10203
|
return [3 /*break*/, 4];
|
|
10119
10204
|
case 4: return [2 /*return*/];
|
|
10120
10205
|
}
|
|
@@ -10171,7 +10256,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10171
10256
|
// same prettifier so its rows carry the shape of every other row. Returns
|
|
10172
10257
|
// undefined when the list was re-read while the page was in flight.
|
|
10173
10258
|
var handleReadGroupPage = function (groupKey, cursor) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10174
|
-
var generation, groupAttributeDS, groupQuery, mainCond, responseData, rawRows, count, prettierRows;
|
|
10259
|
+
var generation, groupAttributeDS, groupQuery, mainCond, sectionQuery, responseData, rawRows, count, prettierRows;
|
|
10175
10260
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10176
10261
|
return __generator(this, function (_j) {
|
|
10177
10262
|
switch (_j.label) {
|
|
@@ -10182,7 +10267,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10182
10267
|
return [2 /*return*/, undefined];
|
|
10183
10268
|
groupQuery = (0, groupSections_1.handleGetGroupSectionQuery)(groupAttributeDS, groupKey, (_a = handleGetGroupColumnOptions()) !== null && _a !== void 0 ? _a : []);
|
|
10184
10269
|
mainCond = handleReadQueryHocCond();
|
|
10185
|
-
|
|
10270
|
+
sectionQuery = (0, groupSections_1.handleScopeSectionQuery)(groupQuery, (_b = mainCond.query) !== null && _b !== void 0 ? _b : []);
|
|
10271
|
+
// INFO: the list's own filters leave this section no rows
|
|
10272
|
+
if (!sectionQuery)
|
|
10273
|
+
return [2 /*return*/, { rawRows: [], prettierRows: [], count: 0 }];
|
|
10274
|
+
return [4 /*yield*/, readServerQuery.call(__assign(__assign({}, mainCond), { query: sectionQuery, cursor: cursor, limit: limit, stopLimit: undefined, skip: 0 }))];
|
|
10186
10275
|
case 1:
|
|
10187
10276
|
responseData = _j.sent();
|
|
10188
10277
|
if (generation !== groupPagingGenRef.current)
|
|
@@ -12211,14 +12300,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
12211
12300
|
};
|
|
12212
12301
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
12213
12302
|
renderNotification("root"),
|
|
12214
|
-
((
|
|
12303
|
+
((_103 = (_102 = props.renderSettings) === null || _102 === void 0 ? void 0 : _102.renderLoadingUI) === null || _103 === void 0 ? void 0 : _103.call(_102)) && loading ? ((_104 = props.renderSettings) === null || _104 === void 0 ? void 0 : _104.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkMode, darkModeBg: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
12215
12304
|
var _a, _b;
|
|
12216
12305
|
if (loading)
|
|
12217
12306
|
return;
|
|
12218
12307
|
handlePopUpModal(false);
|
|
12219
12308
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
12220
12309
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
12221
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12310
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkMode, darkModeBg: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
12222
12311
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
12223
12312
|
if (dataId) {
|
|
12224
12313
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -12234,19 +12323,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
12234
12323
|
}, onClose: function () {
|
|
12235
12324
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
12236
12325
|
} }),
|
|
12237
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12326
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
12238
12327
|
setReferenceDeleteTableData({});
|
|
12239
12328
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12240
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12329
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkMode, darkModeBg: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
12241
12330
|
setDeletePasscodeInput("");
|
|
12242
12331
|
setDeleteModal(!deleteModal);
|
|
12243
12332
|
setDeleteFeedId("");
|
|
12244
12333
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12245
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12334
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkMode, darkModeBg: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
12246
12335
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
12247
12336
|
setBatchUpdateModal(false);
|
|
12248
12337
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12249
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12338
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkMode, darkModeBg: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
12250
12339
|
var _a, _b;
|
|
12251
12340
|
if (props.space)
|
|
12252
12341
|
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 }));
|
|
@@ -12262,13 +12351,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
12262
12351
|
(0, react_dom_1.createPortal)(
|
|
12263
12352
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
12264
12353
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
12265
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
12354
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkMode, darkModeBg: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
12266
12355
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
12267
12356
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
12268
12357
|
// toolbar's collection-wide button clears it when it opens.
|
|
12269
12358
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
12270
12359
|
? props.title
|
|
12271
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
12360
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_119 = props.id) !== null && _119 !== void 0 ? _119 : "") : activityId, activityLog: (_120 = props.edit) === null || _120 === void 0 ? void 0 : _120.activityLog, model: structure }) })), document.body),
|
|
12272
12361
|
renderScrollSentinel()));
|
|
12273
12362
|
});
|
|
12274
12363
|
//# sourceMappingURL=index.js.map
|