blixify-ui-web 1.2.218 → 1.2.220
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/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +213 -207
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +2 -1
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +19 -0
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +121 -5
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/readQuery/index.d.ts +19 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -1
- package/lib/components/data/readQuery/index.js +84 -13
- package/lib/components/data/readQuery/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -249,10 +249,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
249
249
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
250
250
|
// most in effect dependency arrays — following props.type there would leave
|
|
251
251
|
// the list never refetching while the panel is open, which fails silently.
|
|
252
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115;
|
|
252
|
+
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;
|
|
253
253
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
254
254
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
255
|
-
var
|
|
255
|
+
var _118 = (0, react_1.useState)(false), drawerPageView = _118[0], setDrawerPageView = _118[1];
|
|
256
256
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
257
257
|
// live props. Without this, navigating back to the list would re-render the
|
|
258
258
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -308,7 +308,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
308
308
|
drawerFormEditedRef.current = false;
|
|
309
309
|
}
|
|
310
310
|
drawerOpenRef.current = isDrawerHost;
|
|
311
|
-
var
|
|
311
|
+
var _119 = (0, react_1.useState)(false), drawerDiscardModal = _119[0], setDrawerDiscardModal = _119[1];
|
|
312
312
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
313
313
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
314
314
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -387,29 +387,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
387
387
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
|
-
var
|
|
390
|
+
var _120 = intialiseDefaultFilterValues(), initialFilterSearch = _120.initialFilterSearch, initialFilterSearchParams = _120.initialFilterSearchParams, initialFilterSelection = _120.initialFilterSelection, initialFilterReference = _120.initialFilterReference, initialFilterReferenceDate = _120.initialFilterReferenceDate;
|
|
391
391
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
392
|
-
var
|
|
392
|
+
var _121 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
393
393
|
mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
|
|
394
394
|
collectionId: props.collectionId,
|
|
395
395
|
persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
|
|
396
396
|
type: resolvedType,
|
|
397
|
-
}), rawPersistedState =
|
|
397
|
+
}), rawPersistedState = _121.persistedState, isPersistEnabled = _121.isEnabled, handleSaveView = _121.handleSaveView, handleRegisterViewSnapshot = _121.handleRegisterViewSnapshot;
|
|
398
398
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
399
399
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
400
|
-
var _a, _b, _c;
|
|
400
|
+
var _a, _b, _c, _d;
|
|
401
401
|
return (0, viewStatePersistence_1.handlePruneStaleColumns)(rawPersistedState, props.model, (0, flexFilter_1.handleBuildFlexFilterStructure)((_a = props.model) !== null && _a !== void 0 ? _a : [], {
|
|
402
402
|
references: (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareFlexFilterReferences,
|
|
403
403
|
listObjects: (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareFlexFilterListObjects,
|
|
404
|
+
related: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilterRelated,
|
|
404
405
|
}));
|
|
405
406
|
}, [
|
|
406
407
|
rawPersistedState,
|
|
407
408
|
props.model,
|
|
408
409
|
(_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareFlexFilterReferences,
|
|
409
410
|
(_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
|
|
411
|
+
(_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
|
|
410
412
|
]);
|
|
411
|
-
var
|
|
412
|
-
var
|
|
413
|
+
var _122 = (0, react_1.useState)(false), loading = _122[0], setLoading = _122[1];
|
|
414
|
+
var _123 = (0, react_1.useState)(), notification = _123[0], setNotification = _123[1];
|
|
413
415
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
414
416
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
415
417
|
(0, react_1.useEffect)(function () {
|
|
@@ -419,80 +421,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
419
421
|
return function () { return clearTimeout(timer); };
|
|
420
422
|
}, [notification]);
|
|
421
423
|
//INFO : Used by List
|
|
422
|
-
var
|
|
423
|
-
var
|
|
424
|
-
var
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
424
|
+
var _124 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _124[0], setFilterSearch = _124[1];
|
|
425
|
+
var _125 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _125[0], setFilterSearchParams = _125[1];
|
|
426
|
+
var _126 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _126[0], setFilterSelection = _126[1];
|
|
427
|
+
var _127 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _127[0], setFilterReference = _127[1];
|
|
428
|
+
var _128 = (0, react_1.useState)({}), filterReferenceSearch = _128[0], setFilterReferenceSearch = _128[1];
|
|
429
|
+
var _129 = (0, react_1.useState)({}), filterReferenceList = _129[0], setFilterReferenceList = _129[1];
|
|
430
|
+
var _130 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
429
431
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
430
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
431
|
-
var
|
|
432
|
-
var
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
432
|
+
: initialFilterReferenceDate), filterReferenceDate = _130[0], setFilterReferenceDate = _130[1];
|
|
433
|
+
var _131 = (0, react_1.useState)(true), tableLoading = _131[0], setTableLoading = _131[1];
|
|
434
|
+
var _132 = (0, react_1.useState)(""), cursor = _132[0], setCursor = _132[1];
|
|
435
|
+
var _133 = (0, react_1.useState)(""), lastCursor = _133[0], setLastCursor = _133[1];
|
|
436
|
+
var _134 = (0, react_1.useState)([]), tableData = _134[0], setTableData = _134[1];
|
|
437
|
+
var _135 = (0, react_1.useState)([]), spaceTableData = _135[0], setSpaceTableData = _135[1];
|
|
436
438
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
437
439
|
// the state it closed over can predate an earlier save on the same row
|
|
438
440
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
439
441
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
440
442
|
tableDataRef.current = tableData;
|
|
441
443
|
spaceTableDataRef.current = spaceTableData;
|
|
442
|
-
var
|
|
443
|
-
var
|
|
444
|
+
var _136 = (0, react_1.useState)(0), size = _136[0], setSize = _136[1];
|
|
445
|
+
var _137 = (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 = _137[0], setPageIndex = _137[1];
|
|
444
446
|
// INFO: every change of page, including the return to the first page when a
|
|
445
447
|
// filter or search changes, which onChangePagination does not always report
|
|
446
448
|
(0, react_1.useEffect)(function () {
|
|
447
449
|
var _a, _b;
|
|
448
450
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
449
451
|
}, [pageIndex]);
|
|
450
|
-
var
|
|
451
|
-
var
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
452
|
+
var _138 = (0, react_1.useState)([]), selectedIds = _138[0], setSelectedIds = _138[1];
|
|
453
|
+
var _139 = (0, react_1.useState)(false), selectAll = _139[0], setSelectAll = _139[1];
|
|
454
|
+
var _140 = (0, react_1.useState)(""), deletePasscode = _140[0], setDeletePasscode = _140[1];
|
|
455
|
+
var _141 = (0, react_1.useState)(""), deletePasscodeInput = _141[0], setDeletePasscodeInput = _141[1];
|
|
456
|
+
var _142 = (0, react_1.useState)(""), deleteFeedId = _142[0], setDeleteFeedId = _142[1];
|
|
455
457
|
//INFO : Used by List Organise
|
|
456
458
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
457
459
|
// persistViewState is enabled and a persisted sort exists
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
var
|
|
460
|
+
var _143 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _143[0], setPersistedSort = _143[1];
|
|
461
|
+
var _144 = (0, react_1.useState)(false), filterDraft = _144[0], setFilterDraft = _144[1];
|
|
462
|
+
var _145 = (0, react_1.useState)(false), addTabModal = _145[0], setAddTabModal = _145[1];
|
|
463
|
+
var _146 = (0, react_1.useState)(-1), editTabIndex = _146[0], setEditTabIndex = _146[1];
|
|
462
464
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
463
465
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
464
|
-
var
|
|
466
|
+
var _147 = (0, react_1.useState)(function () {
|
|
465
467
|
var _a;
|
|
466
468
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
467
|
-
}), selectedTab =
|
|
468
|
-
var
|
|
469
|
+
}), selectedTab = _147[0], setSelectedTab = _147[1];
|
|
470
|
+
var _148 = (0, react_1.useState)("dayGridMonth"), calendarView = _148[0], setCalendarView = _148[1];
|
|
469
471
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
470
472
|
// (calendarView above drives the matching range query)
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
+
var _149 = (0, react_1.useState)("month"), newCalendarViewMode = _149[0], setNewCalendarViewMode = _149[1];
|
|
474
|
+
var _150 = (0, react_1.useState)(new Date()), calendarTabMonth = _150[0], setCalendarTabMonth = _150[1];
|
|
473
475
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
474
476
|
// whenever its settings change, and that must not undo the user's switch
|
|
475
477
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
476
|
-
var
|
|
477
|
-
var
|
|
478
|
-
var
|
|
479
|
-
var
|
|
478
|
+
var _151 = (0, react_1.useState)(true), kanbanDroppable = _151[0], setKanbanDroppable = _151[1];
|
|
479
|
+
var _152 = (0, react_1.useState)([]), kanbanOptions = _152[0], setKanbanOptions = _152[1];
|
|
480
|
+
var _153 = (0, react_1.useState)(false), batchUpdateModal = _153[0], setBatchUpdateModal = _153[1];
|
|
481
|
+
var _154 = (0, react_1.useState)({
|
|
480
482
|
columnId: "",
|
|
481
483
|
columnData: {},
|
|
482
|
-
}), batchUpdateData =
|
|
484
|
+
}), batchUpdateData = _154[0], setBatchUpdateData = _154[1];
|
|
483
485
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
484
486
|
// join the structure hidden; the ones a user shows are kept per view
|
|
485
|
-
var isSystemColumnsEnabled = !!((
|
|
486
|
-
var isSystemColumnsLocked = !!((
|
|
487
|
+
var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
|
|
488
|
+
var isSystemColumnsLocked = !!((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareSystemColumnsLocked);
|
|
487
489
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
488
490
|
? 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; }); })
|
|
489
491
|
: [];
|
|
490
|
-
var
|
|
492
|
+
var _155 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _155[0], setShownSystemColumnIds = _155[1];
|
|
491
493
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
492
494
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
493
495
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
494
496
|
};
|
|
495
|
-
var
|
|
497
|
+
var _156 = (0, react_1.useState)(function () {
|
|
496
498
|
var _a;
|
|
497
499
|
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 : []);
|
|
498
500
|
if (!persistedState)
|
|
@@ -519,8 +521,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
519
521
|
});
|
|
520
522
|
}
|
|
521
523
|
return model;
|
|
522
|
-
}), structure =
|
|
523
|
-
var
|
|
524
|
+
}), structure = _156[0], setStructure = _156[1];
|
|
525
|
+
var _157 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _157[0], setAdditionalQuery = _157[1];
|
|
524
526
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
525
527
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
526
528
|
var defaultFlexFilterRow = [
|
|
@@ -531,9 +533,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
531
533
|
value: undefined,
|
|
532
534
|
},
|
|
533
535
|
];
|
|
534
|
-
var
|
|
536
|
+
var _158 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
535
537
|
? persistedState.flexFilters
|
|
536
|
-
: defaultFlexFilterRow), flexFilters =
|
|
538
|
+
: defaultFlexFilterRow), flexFilters = _158[0], setFlexFilters = _158[1];
|
|
537
539
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
538
540
|
// clear methods so chained calls in one tick aren't stale.
|
|
539
541
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -546,81 +548,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
546
548
|
}, [flexFilters]);
|
|
547
549
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
548
550
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
549
|
-
var
|
|
551
|
+
var _159 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
550
552
|
? persistedState.flexFilters
|
|
551
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
553
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _159[0], setFlexFiltersDebounced = _159[1];
|
|
552
554
|
// INFO: the filter rows of the export being set up — started from the
|
|
553
555
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
557
|
-
var
|
|
558
|
-
var
|
|
556
|
+
var _160 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _160[0], setExportFlexFilters = _160[1];
|
|
557
|
+
var _161 = (0, react_1.useState)({}), flexFilterReferenceOptions = _161[0], setFlexFilterReferenceOptions = _161[1];
|
|
558
|
+
var _162 = (0, react_1.useState)({}), flexFilterReferenceSearch = _162[0], setFlexFilterReferenceSearch = _162[1];
|
|
559
|
+
var _163 = (0, react_1.useState)(false), flexFilterModalOpen = _163[0], setFlexFilterModalOpen = _163[1];
|
|
560
|
+
var _164 = (0, react_1.useState)(false), viewSettingsModalOpen = _164[0], setViewSettingsModalOpen = _164[1];
|
|
559
561
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
560
562
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
561
563
|
// structure to props.model whenever props change, which would wipe the
|
|
562
564
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
563
565
|
// structure — writing user hides there would blur the two concepts.
|
|
564
|
-
var
|
|
565
|
-
var
|
|
566
|
-
var
|
|
567
|
-
var
|
|
566
|
+
var _165 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _z !== void 0 ? _z : []), userHiddenColumnIds = _165[0], setUserHiddenColumnIds = _165[1];
|
|
567
|
+
var _166 = (0, react_1.useState)(""), columnSearch = _166[0], setColumnSearch = _166[1];
|
|
568
|
+
var _167 = (0, react_1.useState)([]), savedViews = _167[0], setSavedViews = _167[1];
|
|
569
|
+
var _168 = (0, react_1.useState)(null), activeSavedViewId = _168[0], setActiveSavedViewId = _168[1];
|
|
568
570
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
569
|
-
var
|
|
571
|
+
var _169 = (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 = _169[0], setColumnWidths = _169[1];
|
|
570
572
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
571
573
|
// so the defaults drawn before it never overwrite a person's own
|
|
572
|
-
var
|
|
574
|
+
var _170 = (0, react_1.useState)(false), isViewDraftReady = _170[0], setIsViewDraftReady = _170[1];
|
|
573
575
|
// INFO: null while the name box is closed
|
|
574
|
-
var
|
|
575
|
-
var
|
|
576
|
-
var
|
|
576
|
+
var _171 = (0, react_1.useState)(null), savedViewName = _171[0], setSavedViewName = _171[1];
|
|
577
|
+
var _172 = (0, react_1.useState)(null), deletingSavedViewId = _172[0], setDeletingSavedViewId = _172[1];
|
|
578
|
+
var _173 = (0, react_1.useState)(null), draggingColumnId = _173[0], setDraggingColumnId = _173[1];
|
|
577
579
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
578
580
|
//INFO : Used by Auth
|
|
579
|
-
var
|
|
581
|
+
var _174 = (0, react_1.useState)({
|
|
580
582
|
email: "",
|
|
581
583
|
google: "",
|
|
582
584
|
phone: "",
|
|
583
585
|
disabled: false,
|
|
584
586
|
create: false,
|
|
585
|
-
}), authMethods =
|
|
586
|
-
var
|
|
587
|
+
}), authMethods = _174[0], setAuthMethods = _174[1];
|
|
588
|
+
var _175 = (0, react_1.useState)(""), selectedAuthMethod = _175[0], setSelectedAuthMethod = _175[1];
|
|
587
589
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
588
590
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
589
|
-
var
|
|
591
|
+
var _176 = (0, react_1.useState)(false), authLoading = _176[0], setAuthLoading = _176[1];
|
|
590
592
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
591
593
|
// the state has rendered, and the state disables the confirm button
|
|
592
594
|
var deletingRef = (0, react_1.useRef)(false);
|
|
593
|
-
var
|
|
595
|
+
var _177 = (0, react_1.useState)(false), deleting = _177[0], setDeleting = _177[1];
|
|
594
596
|
// INFO: Used by Activity Log
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
+
var _178 = (0, react_1.useState)(false), activityModal = _178[0], setActivityModal = _178[1];
|
|
598
|
+
var _179 = (0, react_1.useState)(""), activityId = _179[0], setActivityId = _179[1];
|
|
597
599
|
//INFO : Used by Export
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var
|
|
605
|
-
var
|
|
606
|
-
var
|
|
607
|
-
var
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
600
|
+
var _180 = (0, react_1.useState)(null), csvFile = _180[0], setCSVFile = _180[1];
|
|
601
|
+
var _181 = (0, react_1.useState)([]), csvFileData = _181[0], setCSVFileData = _181[1];
|
|
602
|
+
var _182 = (0, react_1.useState)(0), stepCSVIndex = _182[0], setStepCSVIndex = _182[1];
|
|
603
|
+
var _183 = (0, react_1.useState)({}), listCSVMapAttribute = _183[0], setListCSVMapAttribute = _183[1];
|
|
604
|
+
var _184 = (0, react_1.useState)({}), listCSVObjAttribute = _184[0], setListCSVObjAttribute = _184[1];
|
|
605
|
+
var _185 = (0, react_1.useState)([]), csvAPIAttribute = _185[0], setCSVAPIAttribute = _185[1];
|
|
606
|
+
var _186 = (0, react_1.useState)(((_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) || ""), exportCSVEmail = _186[0], setExportCSVEmail = _186[1];
|
|
607
|
+
var _187 = (0, react_1.useState)(((_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.defaultExportPDFName) || ""), exportPDFTitle = _187[0], setExportPDFTitle = _187[1];
|
|
608
|
+
var _188 = (0, react_1.useState)(false), exportPDFLoading = _188[0], setExportPDFLoading = _188[1];
|
|
609
|
+
var _189 = (0, react_1.useState)(false), exportReadPDFLoading = _189[0], setExportReadPDFLoading = _189[1];
|
|
610
|
+
var _190 = (0, react_1.useState)((_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.exportSettings) === null || _4 === void 0 ? void 0 : _4.sumColumnId) !== null && _5 !== void 0 ? _5 : []), exportSumAttributeIds = _190[0], setExportSumAttributeIds = _190[1];
|
|
611
|
+
var _191 = (0, react_1.useState)((_8 = (_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.exportSettings) === null || _7 === void 0 ? void 0 : _7.hideSubItems) !== null && _8 !== void 0 ? _8 : false), hideSubItems = _191[0], setHideSubItems = _191[1];
|
|
612
|
+
var _192 = (0, react_1.useState)([]), importTableData = _192[0], setImportTableData = _192[1];
|
|
613
|
+
var _193 = (0, react_1.useState)([]), queryList = _193[0], setQueryList = _193[1];
|
|
614
|
+
var _194 = (0, react_1.useState)(undefined), allQueryList = _194[0], setAllQueryList = _194[1];
|
|
613
615
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
614
616
|
// ungrouped, so it opens ungrouped
|
|
615
|
-
var
|
|
617
|
+
var _195 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
616
618
|
? persistedState.groupBy || undefined
|
|
617
|
-
: (
|
|
619
|
+
: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _195[0], setGroupId = _195[1];
|
|
618
620
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
619
621
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
620
622
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
621
623
|
// next page as the user scrolls inside that band, independent of every other
|
|
622
624
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
623
|
-
var
|
|
625
|
+
var _196 = (0, react_1.useState)({}), groupPageState = _196[0], setGroupPageState = _196[1];
|
|
624
626
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
625
627
|
// in one tick do not re-fetch an already in-flight page.
|
|
626
628
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -629,59 +631,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
629
631
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
630
632
|
// arrival instead of appending rows that belong to the old list
|
|
631
633
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
632
|
-
var
|
|
633
|
-
var
|
|
634
|
+
var _197 = (0, react_1.useState)(""), readTabSection = _197[0], setReadTabSection = _197[1];
|
|
635
|
+
var _198 = (0, react_1.useState)(false), readFloatingNav = _198[0], setReadFloatingNav = _198[1];
|
|
634
636
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
635
637
|
//INFO : Used by Read
|
|
636
638
|
//INFO : Used by Update
|
|
637
|
-
var
|
|
638
|
-
var
|
|
639
|
-
var
|
|
640
|
-
var
|
|
641
|
-
var
|
|
642
|
-
var
|
|
643
|
-
var
|
|
639
|
+
var _199 = (0, react_1.useState)(false), modalVisible = _199[0], setModalVisible = _199[1];
|
|
640
|
+
var _200 = (0, react_1.useState)(false), deleteModal = _200[0], setDeleteModal = _200[1];
|
|
641
|
+
var _201 = (0, react_1.useState)(false), excelModal = _201[0], setExcelModal = _201[1];
|
|
642
|
+
var _202 = (0, react_1.useState)(false), exportExcel = _202[0], setExportExcel = _202[1];
|
|
643
|
+
var _203 = (0, react_1.useState)(""), exportType = _203[0], setExportType = _203[1];
|
|
644
|
+
var _204 = (0, react_1.useState)(false), exportQR = _204[0], setExportQR = _204[1];
|
|
645
|
+
var _205 = (0, react_1.useState)(function () {
|
|
644
646
|
var _a, _b;
|
|
645
647
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
646
648
|
return firstTabId;
|
|
647
|
-
}), activeTab =
|
|
648
|
-
var
|
|
649
|
-
var
|
|
650
|
-
var
|
|
651
|
-
var
|
|
652
|
-
var
|
|
653
|
-
var
|
|
654
|
-
var
|
|
649
|
+
}), activeTab = _205[0], setActiveTab = _205[1];
|
|
650
|
+
var _206 = (0, react_1.useState)(false), signatureSigning = _206[0], setSignatureSigning = _206[1];
|
|
651
|
+
var _207 = (0, react_1.useState)({}), selectedData = _207[0], setSelectedData = _207[1];
|
|
652
|
+
var _208 = (0, react_1.useState)(""), selectedObjectStructureId = _208[0], setSelectedObjectStructureId = _208[1];
|
|
653
|
+
var _209 = (0, react_1.useState)(""), selectedObjectId = _209[0], setSelectedObjectId = _209[1];
|
|
654
|
+
var _210 = (0, react_1.useState)(""), selectedListAddressId = _210[0], setSelectedListAddressId = _210[1];
|
|
655
|
+
var _211 = (0, react_1.useState)(-1), selectedListAddressIndex = _211[0], setSelectedListAddressIndex = _211[1];
|
|
656
|
+
var _212 = (0, react_1.useState)({
|
|
655
657
|
lat: 0,
|
|
656
658
|
lng: 0,
|
|
657
659
|
name: "",
|
|
658
|
-
}), selectedListAddress =
|
|
659
|
-
var
|
|
660
|
-
var
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
666
|
-
var
|
|
667
|
-
var
|
|
668
|
-
var
|
|
660
|
+
}), selectedListAddress = _212[0], setSelectedListAddress = _212[1];
|
|
661
|
+
var _213 = (0, react_1.useState)({}), selectedObjectData = _213[0], setSelectedObjectData = _213[1];
|
|
662
|
+
var _214 = (0, react_1.useState)(null), objectCellEdit = _214[0], setObjectCellEdit = _214[1];
|
|
663
|
+
var _215 = (0, react_1.useState)(false), referenceLoading = _215[0], setReferenceLoading = _215[1];
|
|
664
|
+
var _216 = (0, react_1.useState)({}), referencesOptions = _216[0], setReferencesOptions = _216[1];
|
|
665
|
+
var _217 = (0, react_1.useState)({}), referencesDetails = _217[0], setReferencesDetails = _217[1];
|
|
666
|
+
var _218 = (0, react_1.useState)({}), listReferencesOptions = _218[0], setListReferencesOptions = _218[1];
|
|
667
|
+
var _219 = (0, react_1.useState)({}), referenceDeleteTableData = _219[0], setReferenceDeleteTableData = _219[1];
|
|
668
|
+
var _220 = (0, react_1.useState)([]), relatedSections = _220[0], setRelatedSections = _220[1];
|
|
669
|
+
var _221 = (0, react_1.useState)(0), referenceDeleteIndex = _221[0], setReferenceDeleteIndex = _221[1];
|
|
670
|
+
var _222 = (0, react_1.useState)({
|
|
669
671
|
id: "",
|
|
670
672
|
name: "",
|
|
671
673
|
type: "string",
|
|
672
|
-
}), referenceCreationModal =
|
|
673
|
-
var
|
|
674
|
-
var
|
|
674
|
+
}), referenceCreationModal = _222[0], setReferenceCreationModal = _222[1];
|
|
675
|
+
var _223 = (0, react_1.useState)({}), referenceModelSchema = _223[0], setReferenceSchema = _223[1];
|
|
676
|
+
var _224 = (0, react_1.useState)([]), kanbanChecked = _224[0], setKanbanChecked = _224[1];
|
|
675
677
|
//INFO : Offline
|
|
676
|
-
var
|
|
677
|
-
var
|
|
678
|
+
var _225 = (0, react_1.useState)(0), offlineDataLength = _225[0], setOfflineDataLength = _225[1];
|
|
679
|
+
var _226 = (0, react_1.useState)(false), offlineModal = _226[0], setOfflineModal = _226[1];
|
|
678
680
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
679
|
-
var
|
|
680
|
-
var
|
|
681
|
+
var _227 = (0, react_1.useState)(false), isLive = _227[0], setIsLive = _227[1];
|
|
682
|
+
var _228 = (0, react_1.useState)(false), isLiveOffline = _228[0], setIsLiveOffline = _228[1];
|
|
681
683
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
682
684
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
683
685
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
684
|
-
var
|
|
686
|
+
var _229 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _229[0], setIsNetworkOffline = _229[1];
|
|
685
687
|
var previousType = (0, react_1.useRef)(null);
|
|
686
688
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
687
689
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -798,7 +800,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
798
800
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
799
801
|
* shared link or a back button.
|
|
800
802
|
*/
|
|
801
|
-
var defaultTabName = (
|
|
803
|
+
var defaultTabName = (_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.extendedTabs) === null || _11 === void 0 ? void 0 : _11.find(function (eachTab) { return eachTab.defaultTab; })) === null || _12 === void 0 ? void 0 : _12.name;
|
|
802
804
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
803
805
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
804
806
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
@@ -807,7 +809,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
807
809
|
: "general");
|
|
808
810
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
809
811
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
810
|
-
var dbModule = isFirebaseClient ? (
|
|
812
|
+
var dbModule = isFirebaseClient ? (_13 = props.lib) === null || _13 === void 0 ? void 0 : _13.firebase : (_14 = props.lib) === null || _14 === void 0 ? void 0 : _14.axios;
|
|
811
813
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
812
814
|
var selectedRelated = resolvedType === "read"
|
|
813
815
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -889,32 +891,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
889
891
|
}, [
|
|
890
892
|
resolvedType,
|
|
891
893
|
props.id,
|
|
892
|
-
(
|
|
894
|
+
(_15 = props.space) === null || _15 === void 0 ? void 0 : _15._id,
|
|
893
895
|
props.devSettings.schemaEndpoint,
|
|
894
|
-
(
|
|
896
|
+
(_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.showRelatedTab,
|
|
895
897
|
]);
|
|
896
898
|
/* eslint-enable */
|
|
897
899
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
898
900
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
899
|
-
var isViewSettingsEnabled = ((
|
|
901
|
+
var isViewSettingsEnabled = ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareViewSettings) || ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareNewDTW)
|
|
900
902
|
? true
|
|
901
903
|
: false;
|
|
902
904
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
903
905
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
904
906
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
905
|
-
var isSchemaHideMode = ((
|
|
907
|
+
var isSchemaHideMode = ((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.onChangeHide) ? true : false;
|
|
906
908
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
907
909
|
// the persisted value and falls back to the consumer's limit
|
|
908
|
-
var
|
|
910
|
+
var _230 = (0, react_1.useState)((_21 = (_20 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _20 !== void 0 ? _20 : props.limit) !== null && _21 !== void 0 ? _21 : 10), pageLimit = _230[0], setPageLimit = _230[1];
|
|
909
911
|
var limit = pageLimit;
|
|
910
|
-
var isSavedViewsEnabled = !!((
|
|
912
|
+
var isSavedViewsEnabled = !!((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.savedViews) && resolvedType === "list";
|
|
911
913
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
912
914
|
// every view is the team's and nothing is kept locally
|
|
913
|
-
var isAppViews = ((
|
|
914
|
-
!!((
|
|
915
|
+
var isAppViews = ((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.sharedViews) !== undefined ||
|
|
916
|
+
!!((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.onChangeSharedViews);
|
|
915
917
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
916
918
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
917
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
919
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.sort);
|
|
918
920
|
var handleSortColumn = function (value) {
|
|
919
921
|
var _a, _b, _c, _d;
|
|
920
922
|
if (isInternalSort)
|
|
@@ -944,19 +946,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
944
946
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
945
947
|
// can hand over the whole set — there formula columns are not offered for
|
|
946
948
|
// sorting or filtering, rather than ordering one page
|
|
947
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
949
|
+
var isFormulaViewSupported = !isFirebase && !((_27 = (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.unionCollections) === null || _27 === void 0 ? void 0 : _27.length);
|
|
948
950
|
var formulaSort = isFormulaViewSupported &&
|
|
949
951
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
950
952
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
951
953
|
? activeSortId
|
|
952
954
|
: undefined;
|
|
953
|
-
// INFO: a referenced record
|
|
954
|
-
// row is matched by its Mongo path — neither Firebase nor
|
|
955
|
-
// them
|
|
956
|
-
var flexFilterExtras = !isFirebase && !((
|
|
955
|
+
// INFO: a referenced record and related rows are joined by MongoWrapper's
|
|
956
|
+
// lookups and a list row is matched by its Mongo path — neither Firebase nor
|
|
957
|
+
// a union read runs them
|
|
958
|
+
var flexFilterExtras = !isFirebase && !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.unionCollections) === null || _29 === void 0 ? void 0 : _29.length)
|
|
957
959
|
? {
|
|
958
|
-
references: (
|
|
959
|
-
listObjects: (
|
|
960
|
+
references: (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareFlexFilterReferences,
|
|
961
|
+
listObjects: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareFlexFilterListObjects,
|
|
962
|
+
related: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterRelated,
|
|
960
963
|
}
|
|
961
964
|
: undefined;
|
|
962
965
|
var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
|
|
@@ -1017,18 +1020,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1017
1020
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1018
1021
|
};
|
|
1019
1022
|
};
|
|
1020
|
-
var
|
|
1021
|
-
var isEditor = ((
|
|
1022
|
-
var isOffline = (
|
|
1023
|
+
var _231 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _231.canUpdateRecord, canInlineUpdate = _231.canInlineUpdate, canBatchUpdate = _231.canBatchUpdate, canDeleteRecord = _231.canDeleteRecord;
|
|
1024
|
+
var isEditor = ((_33 = props.edit) === null || _33 === void 0 ? void 0 : _33.allEditable) ? true : false;
|
|
1025
|
+
var isOffline = (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareOffline;
|
|
1023
1026
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1024
1027
|
// the live network state — online saves go to the server even if bareOffline
|
|
1025
1028
|
// is true, offline saves go to IDB as normal.
|
|
1026
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1027
|
-
var showId = (
|
|
1029
|
+
var isOfflineNetworkListener = isOffline && ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareOfflineNetworkListener);
|
|
1030
|
+
var showId = (_36 = props.space) === null || _36 === void 0 ? void 0 : _36.showId;
|
|
1028
1031
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1029
|
-
var idField = ((
|
|
1030
|
-
var pipeline = (
|
|
1031
|
-
if ((
|
|
1032
|
+
var idField = ((_37 = props.space) === null || _37 === void 0 ? void 0 : _37.idField) || ((_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.idField);
|
|
1033
|
+
var pipeline = (_39 = props === null || props === void 0 ? void 0 : props.space) === null || _39 === void 0 ? void 0 : _39.pipeline;
|
|
1034
|
+
if ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareListPipeline) {
|
|
1032
1035
|
pipeline = pipeline
|
|
1033
1036
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1034
1037
|
}
|
|
@@ -1041,24 +1044,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1041
1044
|
* three records came back instead of five files, and each tile received the
|
|
1042
1045
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1043
1046
|
*/
|
|
1044
|
-
var fileViewColumnId = (
|
|
1047
|
+
var fileViewColumnId = (_44 = (_43 = ((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.extendedTabs) !== null && _42 !== void 0 ? _42 : []).find(function (eachTab) {
|
|
1045
1048
|
return eachTab.viewType === "file" &&
|
|
1046
1049
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1047
|
-
})) === null ||
|
|
1048
|
-
var hasNavigation = ((
|
|
1050
|
+
})) === null || _43 === void 0 ? void 0 : _43.fileSettings) === null || _44 === void 0 ? void 0 : _44.columnId;
|
|
1051
|
+
var hasNavigation = ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.handleNavigate) ? true : false;
|
|
1049
1052
|
var formColumn = "grid-cols-12";
|
|
1050
|
-
var useMobileView = (
|
|
1053
|
+
var useMobileView = (_47 = (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareUpdateMobileView) !== null && _47 !== void 0 ? _47 : false;
|
|
1051
1054
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1052
|
-
var isActivityLog = (((
|
|
1053
|
-
((
|
|
1054
|
-
(((
|
|
1055
|
-
((
|
|
1056
|
-
var customPaginationSize = ((
|
|
1055
|
+
var isActivityLog = (((_49 = (_48 = props.edit) === null || _48 === void 0 ? void 0 : _48.activityLog) === null || _49 === void 0 ? void 0 : _49.enableComments) &&
|
|
1056
|
+
((_50 = props.edit) === null || _50 === void 0 ? void 0 : _50.activityLog.commentCollectionId)) ||
|
|
1057
|
+
(((_52 = (_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog) === null || _52 === void 0 ? void 0 : _52.enableLogs) &&
|
|
1058
|
+
((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog.logsCollectionId));
|
|
1059
|
+
var customPaginationSize = ((_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.customPaginationCount)
|
|
1057
1060
|
? props.organise.customPaginationCount(size)
|
|
1058
1061
|
: undefined;
|
|
1059
1062
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1060
1063
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1061
|
-
dbModule: (
|
|
1064
|
+
dbModule: (_55 = props.lib) === null || _55 === void 0 ? void 0 : _55.axios,
|
|
1062
1065
|
dbType: devSettings.server,
|
|
1063
1066
|
dbCollection: props.collectionId,
|
|
1064
1067
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1066,7 +1069,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1066
1069
|
dbUserToken: devSettings.dbUserToken,
|
|
1067
1070
|
});
|
|
1068
1071
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1069
|
-
dbModule: (
|
|
1072
|
+
dbModule: (_56 = props.lib) === null || _56 === void 0 ? void 0 : _56.axios,
|
|
1070
1073
|
dbType: devSettings.server,
|
|
1071
1074
|
dbCollection: props.collectionId,
|
|
1072
1075
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1074,12 +1077,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1074
1077
|
dbUserToken: devSettings.dbUserToken,
|
|
1075
1078
|
});
|
|
1076
1079
|
var moreButtonPopUp = [
|
|
1077
|
-
((
|
|
1080
|
+
((_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.allEditable) &&
|
|
1078
1081
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1079
1082
|
// datasheet served through one can import; only the browser-direct
|
|
1080
1083
|
// Firebase client has no server to import through
|
|
1081
1084
|
!isFirebaseClient &&
|
|
1082
|
-
!((
|
|
1085
|
+
!((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideImportCSV)
|
|
1083
1086
|
? {
|
|
1084
1087
|
text: "Import Excel",
|
|
1085
1088
|
onClick: function () {
|
|
@@ -1088,7 +1091,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1088
1091
|
},
|
|
1089
1092
|
}
|
|
1090
1093
|
: null,
|
|
1091
|
-
!((
|
|
1094
|
+
!((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportCSV)
|
|
1092
1095
|
? {
|
|
1093
1096
|
text: "Export CSV",
|
|
1094
1097
|
onClick: function () {
|
|
@@ -1098,7 +1101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1098
1101
|
},
|
|
1099
1102
|
}
|
|
1100
1103
|
: null,
|
|
1101
|
-
!((
|
|
1104
|
+
!((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportExcel)
|
|
1102
1105
|
? {
|
|
1103
1106
|
text: "Export Excel",
|
|
1104
1107
|
onClick: function () {
|
|
@@ -1108,7 +1111,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1108
1111
|
},
|
|
1109
1112
|
}
|
|
1110
1113
|
: null,
|
|
1111
|
-
!((
|
|
1114
|
+
!((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportPDF)
|
|
1112
1115
|
? {
|
|
1113
1116
|
text: "Export PDF",
|
|
1114
1117
|
onClick: function () {
|
|
@@ -1118,7 +1121,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1118
1121
|
},
|
|
1119
1122
|
}
|
|
1120
1123
|
: null,
|
|
1121
|
-
!((
|
|
1124
|
+
!((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportQR)
|
|
1122
1125
|
? {
|
|
1123
1126
|
text: "Export QR",
|
|
1124
1127
|
onClick: function () {
|
|
@@ -1128,7 +1131,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1128
1131
|
},
|
|
1129
1132
|
}
|
|
1130
1133
|
: null,
|
|
1131
|
-
!((
|
|
1134
|
+
!((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportQR)
|
|
1132
1135
|
? {
|
|
1133
1136
|
text: "Export QR(Data)",
|
|
1134
1137
|
onClick: function () {
|
|
@@ -1138,7 +1141,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1138
1141
|
},
|
|
1139
1142
|
}
|
|
1140
1143
|
: null,
|
|
1141
|
-
!((
|
|
1144
|
+
!((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportPrint)
|
|
1142
1145
|
? {
|
|
1143
1146
|
text: "Print",
|
|
1144
1147
|
onClick: function () {
|
|
@@ -1150,8 +1153,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1150
1153
|
: null,
|
|
1151
1154
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1152
1155
|
// nothing to find on any other page
|
|
1153
|
-
((
|
|
1154
|
-
!((
|
|
1156
|
+
((_72 = props.edit) === null || _72 === void 0 ? void 0 : _72.enableUpdateDraft) &&
|
|
1157
|
+
!((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportDraft)
|
|
1155
1158
|
? {
|
|
1156
1159
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1157
1160
|
onClick: function () {
|
|
@@ -1160,7 +1163,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1160
1163
|
}
|
|
1161
1164
|
: null,
|
|
1162
1165
|
].filter(Boolean);
|
|
1163
|
-
if ((
|
|
1166
|
+
if ((_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.moreSettings)
|
|
1164
1167
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1165
1168
|
//=====================================================================================
|
|
1166
1169
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1554,14 +1557,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1554
1557
|
//=====================================================================================
|
|
1555
1558
|
//SECTION: Saved Views
|
|
1556
1559
|
//=====================================================================================
|
|
1557
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1560
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.persistKey, (_77 = devSettings.currentUser) === null || _77 === void 0 ? void 0 : _77.userEmail);
|
|
1558
1561
|
(0, react_1.useEffect)(function () {
|
|
1559
1562
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1560
1563
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1561
1564
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1562
1565
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1563
1566
|
// browser until the person updates the view for everyone or resets it
|
|
1564
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1567
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.allView) !== undefined;
|
|
1565
1568
|
var handleGetViewDraftKey = function (viewId) {
|
|
1566
1569
|
var _a, _b;
|
|
1567
1570
|
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);
|
|
@@ -1638,7 +1641,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1638
1641
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1639
1642
|
(0, react_1.useEffect)(function () {
|
|
1640
1643
|
lastSentSharedViewsRef.current = null;
|
|
1641
|
-
}, [(
|
|
1644
|
+
}, [(_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.sharedViews]);
|
|
1642
1645
|
var handleStoreSharedViews = function (update) {
|
|
1643
1646
|
var _a, _b, _c;
|
|
1644
1647
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1683,13 +1686,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1683
1686
|
/* eslint-disable */
|
|
1684
1687
|
}, [
|
|
1685
1688
|
isSavedViewsEnabled,
|
|
1686
|
-
(
|
|
1687
|
-
(
|
|
1688
|
-
(
|
|
1689
|
+
(_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.initialSavedViewId,
|
|
1690
|
+
(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.defaultSavedViewId,
|
|
1691
|
+
(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews,
|
|
1689
1692
|
savedViews,
|
|
1690
1693
|
]);
|
|
1691
1694
|
/* eslint-enable */
|
|
1692
|
-
var defaultSavedViewIds = ((
|
|
1695
|
+
var defaultSavedViewIds = ((_84 = (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.defaultSavedViews) !== null && _84 !== void 0 ? _84 : [])
|
|
1693
1696
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1694
1697
|
.join("|");
|
|
1695
1698
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1991,8 +1994,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1991
1994
|
pageLimit,
|
|
1992
1995
|
groupId,
|
|
1993
1996
|
columnWidths,
|
|
1994
|
-
(
|
|
1995
|
-
(
|
|
1997
|
+
(_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.allView,
|
|
1998
|
+
(_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.sharedViews,
|
|
1996
1999
|
savedViews,
|
|
1997
2000
|
]);
|
|
1998
2001
|
/* eslint-enable */
|
|
@@ -2032,7 +2035,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2032
2035
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
2033
2036
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
2034
2037
|
/* eslint-disable */
|
|
2035
|
-
}, [props.collectionId, (
|
|
2038
|
+
}, [props.collectionId, (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.persistKey]);
|
|
2036
2039
|
/* eslint-enable */
|
|
2037
2040
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2038
2041
|
(0, react_1.useEffect)(function () {
|
|
@@ -2067,7 +2070,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2067
2070
|
(0, react_1.useEffect)(function () {
|
|
2068
2071
|
handleOfflinePrefetch();
|
|
2069
2072
|
/* eslint-disable */
|
|
2070
|
-
}, [props.collectionId, (
|
|
2073
|
+
}, [props.collectionId, (_88 = props.bareSettings) === null || _88 === void 0 ? void 0 : _88.bareOffline]);
|
|
2071
2074
|
/* eslint-enable */
|
|
2072
2075
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2073
2076
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2087,7 +2090,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2087
2090
|
}, interval);
|
|
2088
2091
|
return function () { return clearInterval(timer); };
|
|
2089
2092
|
/* eslint-disable */
|
|
2090
|
-
}, [(
|
|
2093
|
+
}, [(_89 = props.bareSettings) === null || _89 === void 0 ? void 0 : _89.barePollingInterval, isLive, isNetworkOffline]);
|
|
2091
2094
|
/* eslint-enable */
|
|
2092
2095
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2093
2096
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2129,7 +2132,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2129
2132
|
};
|
|
2130
2133
|
/* eslint-disable */
|
|
2131
2134
|
}, [
|
|
2132
|
-
(
|
|
2135
|
+
(_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.bareSocketName,
|
|
2133
2136
|
props.collectionId,
|
|
2134
2137
|
props.devSettings.sseEndpoint,
|
|
2135
2138
|
props.devSettings.dbAPIToken,
|
|
@@ -2403,10 +2406,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2403
2406
|
props.collectionId,
|
|
2404
2407
|
props.model,
|
|
2405
2408
|
props.localURLEndpoint,
|
|
2406
|
-
(
|
|
2409
|
+
(_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.extendedTabs,
|
|
2407
2410
|
listViewId,
|
|
2408
|
-
(
|
|
2409
|
-
(
|
|
2411
|
+
(_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.additionalQuery,
|
|
2412
|
+
(_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.groupBy,
|
|
2410
2413
|
resolvedType,
|
|
2411
2414
|
]);
|
|
2412
2415
|
/**
|
|
@@ -2558,7 +2561,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2558
2561
|
};
|
|
2559
2562
|
}, 100);
|
|
2560
2563
|
return function () { return clearTimeout(timeoutId); };
|
|
2561
|
-
}, [(
|
|
2564
|
+
}, [(_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2562
2565
|
(0, react_1.useEffect)(function () {
|
|
2563
2566
|
if (resolvedType !== "read")
|
|
2564
2567
|
return;
|
|
@@ -5634,7 +5637,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5634
5637
|
// update an inline cell edit makes, gated on the same update right
|
|
5635
5638
|
var columnTypeActions = {
|
|
5636
5639
|
canUpdate: canUpdateRecord,
|
|
5637
|
-
onButtonClick: (
|
|
5640
|
+
onButtonClick: (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.onButtonClick,
|
|
5638
5641
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5639
5642
|
var _a;
|
|
5640
5643
|
return __generator(this, function (_b) {
|
|
@@ -5651,7 +5654,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5651
5654
|
}
|
|
5652
5655
|
});
|
|
5653
5656
|
}); },
|
|
5654
|
-
onTimeTrackingAction: ((
|
|
5657
|
+
onTimeTrackingAction: ((_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.onTimeTrackingAction) && canUpdateRecord
|
|
5655
5658
|
? function (rowId, columnId, action) {
|
|
5656
5659
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5657
5660
|
}
|
|
@@ -7865,8 +7868,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7865
7868
|
: rows;
|
|
7866
7869
|
};
|
|
7867
7870
|
/* eslint-disable */
|
|
7868
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7869
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
7871
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.bareNewDTW]);
|
|
7872
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_98 = props.bareSettings) === null || _98 === void 0 ? void 0 : _98.bareNewDTW]);
|
|
7870
7873
|
/* eslint-enable */
|
|
7871
7874
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7872
7875
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -8980,9 +8983,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8980
8983
|
var actionComponent = renderActionButtons(resolvedType);
|
|
8981
8984
|
// INFO: active flex filter count for the icon badge + floating search.
|
|
8982
8985
|
// Counts query output so the badge matches what's actually filtered.
|
|
8986
|
+
// INFO: one per filter row that filters — several rows on one related
|
|
8987
|
+
// datasheet send one condition, and a list count can send two
|
|
8983
8988
|
var activeFlexFilterCount_1 = ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
|
|
8984
|
-
? (
|
|
8985
|
-
.
|
|
8989
|
+
? flexFilters.filter(function (eachFilter) {
|
|
8990
|
+
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
|
|
8991
|
+
}).length
|
|
8986
8992
|
: 0;
|
|
8987
8993
|
// INFO: without the floating bar these buttons would have nowhere to
|
|
8988
8994
|
// go, so a hidden search keeps the normal header
|
|
@@ -11910,14 +11916,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11910
11916
|
};
|
|
11911
11917
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11912
11918
|
renderNotification("root"),
|
|
11913
|
-
((
|
|
11919
|
+
((_100 = (_99 = props.renderSettings) === null || _99 === void 0 ? void 0 : _99.renderLoadingUI) === null || _100 === void 0 ? void 0 : _100.call(_99)) && loading ? ((_101 = props.renderSettings) === null || _101 === void 0 ? void 0 : _101.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11914
11920
|
var _a, _b;
|
|
11915
11921
|
if (loading)
|
|
11916
11922
|
return;
|
|
11917
11923
|
handlePopUpModal(false);
|
|
11918
11924
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11919
11925
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11920
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11926
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11921
11927
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11922
11928
|
if (dataId) {
|
|
11923
11929
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11933,19 +11939,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11933
11939
|
}, onClose: function () {
|
|
11934
11940
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11935
11941
|
} }),
|
|
11936
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11942
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11937
11943
|
setReferenceDeleteTableData({});
|
|
11938
11944
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11939
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11945
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11940
11946
|
setDeletePasscodeInput("");
|
|
11941
11947
|
setDeleteModal(!deleteModal);
|
|
11942
11948
|
setDeleteFeedId("");
|
|
11943
11949
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11944
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11950
|
+
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, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11945
11951
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11946
11952
|
setBatchUpdateModal(false);
|
|
11947
11953
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11948
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11954
|
+
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, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11949
11955
|
var _a, _b;
|
|
11950
11956
|
if (props.space)
|
|
11951
11957
|
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 }));
|
|
@@ -11961,13 +11967,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11961
11967
|
(0, react_dom_1.createPortal)(
|
|
11962
11968
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11963
11969
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11964
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11970
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkMode, darkModeBg: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11965
11971
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11966
11972
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11967
11973
|
// toolbar's collection-wide button clears it when it opens.
|
|
11968
11974
|
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"
|
|
11969
11975
|
? props.title
|
|
11970
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11976
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_116 = props.id) !== null && _116 !== void 0 ? _116 : "") : activityId, activityLog: (_117 = props.edit) === null || _117 === void 0 ? void 0 : _117.activityLog, model: structure }) })), document.body),
|
|
11971
11977
|
renderScrollSentinel()));
|
|
11972
11978
|
});
|
|
11973
11979
|
//# sourceMappingURL=index.js.map
|