blixify-ui-web 1.2.207 → 1.2.208
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 +216 -203
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -248,10 +248,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
248
248
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
249
249
|
// most in effect dependency arrays — following props.type there would leave
|
|
250
250
|
// the list never refetching while the panel is open, which fails silently.
|
|
251
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111;
|
|
251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112;
|
|
252
252
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
253
253
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
254
|
-
var
|
|
254
|
+
var _113 = (0, react_1.useState)(false), drawerPageView = _113[0], setDrawerPageView = _113[1];
|
|
255
255
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
256
256
|
// live props. Without this, navigating back to the list would re-render the
|
|
257
257
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -343,14 +343,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
343
343
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
344
344
|
};
|
|
345
345
|
};
|
|
346
|
-
var
|
|
346
|
+
var _114 = intialiseDefaultFilterValues(), initialFilterSearch = _114.initialFilterSearch, initialFilterSearchParams = _114.initialFilterSearchParams, initialFilterSelection = _114.initialFilterSelection, initialFilterReference = _114.initialFilterReference, initialFilterReferenceDate = _114.initialFilterReferenceDate;
|
|
347
347
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
348
|
-
var
|
|
348
|
+
var _115 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
349
349
|
mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
|
|
350
350
|
collectionId: props.collectionId,
|
|
351
351
|
persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
|
|
352
352
|
type: resolvedType,
|
|
353
|
-
}), rawPersistedState =
|
|
353
|
+
}), rawPersistedState = _115.persistedState, isPersistEnabled = _115.isEnabled, handleSaveView = _115.handleSaveView, handleRegisterViewSnapshot = _115.handleRegisterViewSnapshot;
|
|
354
354
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
355
355
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
356
356
|
var _a, _b, _c;
|
|
@@ -364,8 +364,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
364
364
|
(_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilterReferences,
|
|
365
365
|
(_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterListObjects,
|
|
366
366
|
]);
|
|
367
|
-
var
|
|
368
|
-
var
|
|
367
|
+
var _116 = (0, react_1.useState)(false), loading = _116[0], setLoading = _116[1];
|
|
368
|
+
var _117 = (0, react_1.useState)(), notification = _117[0], setNotification = _117[1];
|
|
369
369
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
370
370
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
371
371
|
(0, react_1.useEffect)(function () {
|
|
@@ -375,73 +375,74 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
375
375
|
return function () { return clearTimeout(timer); };
|
|
376
376
|
}, [notification]);
|
|
377
377
|
//INFO : Used by List
|
|
378
|
-
var
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
378
|
+
var _118 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _f !== void 0 ? _f : initialFilterSearch), filterSearch = _118[0], setFilterSearch = _118[1];
|
|
379
|
+
var _119 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearchParams), filterSearchParams = _119[0], setFilterSearchParams = _119[1];
|
|
380
|
+
var _120 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _h !== void 0 ? _h : initialFilterSelection), filterSelection = _120[0], setFilterSelection = _120[1];
|
|
381
|
+
var _121 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _j !== void 0 ? _j : initialFilterReference), filterReference = _121[0], setFilterReference = _121[1];
|
|
382
|
+
var _122 = (0, react_1.useState)({}), filterReferenceSearch = _122[0], setFilterReferenceSearch = _122[1];
|
|
383
|
+
var _123 = (0, react_1.useState)({}), filterReferenceList = _123[0], setFilterReferenceList = _123[1];
|
|
384
|
+
var _124 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
385
385
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
386
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
387
|
-
var
|
|
388
|
-
var
|
|
389
|
-
var
|
|
390
|
-
var
|
|
391
|
-
var
|
|
386
|
+
: initialFilterReferenceDate), filterReferenceDate = _124[0], setFilterReferenceDate = _124[1];
|
|
387
|
+
var _125 = (0, react_1.useState)(true), tableLoading = _125[0], setTableLoading = _125[1];
|
|
388
|
+
var _126 = (0, react_1.useState)(""), cursor = _126[0], setCursor = _126[1];
|
|
389
|
+
var _127 = (0, react_1.useState)(""), lastCursor = _127[0], setLastCursor = _127[1];
|
|
390
|
+
var _128 = (0, react_1.useState)([]), tableData = _128[0], setTableData = _128[1];
|
|
391
|
+
var _129 = (0, react_1.useState)([]), spaceTableData = _129[0], setSpaceTableData = _129[1];
|
|
392
392
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
393
393
|
// the state it closed over can predate an earlier save on the same row
|
|
394
394
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
395
395
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
396
396
|
tableDataRef.current = tableData;
|
|
397
397
|
spaceTableDataRef.current = spaceTableData;
|
|
398
|
-
var
|
|
399
|
-
var
|
|
400
|
-
var
|
|
401
|
-
var
|
|
402
|
-
var
|
|
403
|
-
var
|
|
404
|
-
var
|
|
398
|
+
var _130 = (0, react_1.useState)(0), size = _130[0], setSize = _130[1];
|
|
399
|
+
var _131 = (0, react_1.useState)((_m = (_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _k !== void 0 ? _k : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.pageIndex) !== null && _m !== void 0 ? _m : 0), pageIndex = _131[0], setPageIndex = _131[1];
|
|
400
|
+
var _132 = (0, react_1.useState)([]), selectedIds = _132[0], setSelectedIds = _132[1];
|
|
401
|
+
var _133 = (0, react_1.useState)(false), selectAll = _133[0], setSelectAll = _133[1];
|
|
402
|
+
var _134 = (0, react_1.useState)(""), deletePasscode = _134[0], setDeletePasscode = _134[1];
|
|
403
|
+
var _135 = (0, react_1.useState)(""), deletePasscodeInput = _135[0], setDeletePasscodeInput = _135[1];
|
|
404
|
+
var _136 = (0, react_1.useState)(""), deleteFeedId = _136[0], setDeleteFeedId = _136[1];
|
|
405
405
|
//INFO : Used by List Organise
|
|
406
406
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
407
407
|
// persistViewState is enabled and a persisted sort exists
|
|
408
|
-
var
|
|
409
|
-
var
|
|
410
|
-
var
|
|
411
|
-
var
|
|
408
|
+
var _137 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _o !== void 0 ? _o : undefined), persistedSort = _137[0], setPersistedSort = _137[1];
|
|
409
|
+
var _138 = (0, react_1.useState)(false), filterDraft = _138[0], setFilterDraft = _138[1];
|
|
410
|
+
var _139 = (0, react_1.useState)(false), addTabModal = _139[0], setAddTabModal = _139[1];
|
|
411
|
+
var _140 = (0, react_1.useState)(-1), editTabIndex = _140[0], setEditTabIndex = _140[1];
|
|
412
412
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
413
413
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
414
|
-
var
|
|
414
|
+
var _141 = (0, react_1.useState)(function () {
|
|
415
415
|
var _a, _b;
|
|
416
416
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
|
|
417
|
-
}), selectedTab =
|
|
418
|
-
var
|
|
417
|
+
}), selectedTab = _141[0], setSelectedTab = _141[1];
|
|
418
|
+
var _142 = (0, react_1.useState)("dayGridMonth"), calendarView = _142[0], setCalendarView = _142[1];
|
|
419
419
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
420
420
|
// (calendarView above drives the matching range query)
|
|
421
|
-
var
|
|
422
|
-
var
|
|
421
|
+
var _143 = (0, react_1.useState)("month"), newCalendarViewMode = _143[0], setNewCalendarViewMode = _143[1];
|
|
422
|
+
var _144 = (0, react_1.useState)(new Date()), calendarTabMonth = _144[0], setCalendarTabMonth = _144[1];
|
|
423
423
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
424
424
|
// whenever its settings change, and that must not undo the user's switch
|
|
425
425
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
426
|
+
var _145 = (0, react_1.useState)(true), kanbanDroppable = _145[0], setKanbanDroppable = _145[1];
|
|
427
|
+
var _146 = (0, react_1.useState)([]), kanbanOptions = _146[0], setKanbanOptions = _146[1];
|
|
428
|
+
var _147 = (0, react_1.useState)(false), batchUpdateModal = _147[0], setBatchUpdateModal = _147[1];
|
|
429
|
+
var _148 = (0, react_1.useState)({
|
|
430
430
|
columnId: "",
|
|
431
431
|
columnData: {},
|
|
432
|
-
}), batchUpdateData =
|
|
432
|
+
}), batchUpdateData = _148[0], setBatchUpdateData = _148[1];
|
|
433
433
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
434
434
|
// join the structure hidden; the ones a user shows are kept per view
|
|
435
435
|
var isSystemColumnsEnabled = !!((_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareSystemColumns);
|
|
436
|
+
var isSystemColumnsLocked = !!((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareSystemColumnsLocked);
|
|
436
437
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
437
438
|
? 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; }); })
|
|
438
439
|
: [];
|
|
439
|
-
var
|
|
440
|
+
var _149 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _r !== void 0 ? _r : []), shownSystemColumnIds = _149[0], setShownSystemColumnIds = _149[1];
|
|
440
441
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
441
442
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
442
443
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
443
444
|
};
|
|
444
|
-
var
|
|
445
|
+
var _150 = (0, react_1.useState)(function () {
|
|
445
446
|
var _a;
|
|
446
447
|
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 : []);
|
|
447
448
|
if (!persistedState)
|
|
@@ -468,8 +469,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
468
469
|
});
|
|
469
470
|
}
|
|
470
471
|
return model;
|
|
471
|
-
}), structure =
|
|
472
|
-
var
|
|
472
|
+
}), structure = _150[0], setStructure = _150[1];
|
|
473
|
+
var _151 = (0, react_1.useState)(((_s = props === null || props === void 0 ? void 0 : props.organise) === null || _s === void 0 ? void 0 : _s.additionalQuery) || []), additionalQuery = _151[0], setAdditionalQuery = _151[1];
|
|
473
474
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
474
475
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
475
476
|
var defaultFlexFilterRow = [
|
|
@@ -480,9 +481,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
480
481
|
value: undefined,
|
|
481
482
|
},
|
|
482
483
|
];
|
|
483
|
-
var
|
|
484
|
+
var _152 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
484
485
|
? persistedState.flexFilters
|
|
485
|
-
: defaultFlexFilterRow), flexFilters =
|
|
486
|
+
: defaultFlexFilterRow), flexFilters = _152[0], setFlexFilters = _152[1];
|
|
486
487
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
487
488
|
// clear methods so chained calls in one tick aren't stale.
|
|
488
489
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -495,81 +496,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
495
496
|
}, [flexFilters]);
|
|
496
497
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
497
498
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
498
|
-
var
|
|
499
|
+
var _153 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
499
500
|
? persistedState.flexFilters
|
|
500
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
501
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _153[0], setFlexFiltersDebounced = _153[1];
|
|
501
502
|
// INFO: the filter rows of the export being set up — started from the
|
|
502
503
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
503
|
-
var
|
|
504
|
-
var
|
|
505
|
-
var
|
|
506
|
-
var
|
|
507
|
-
var
|
|
504
|
+
var _154 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _154[0], setExportFlexFilters = _154[1];
|
|
505
|
+
var _155 = (0, react_1.useState)({}), flexFilterReferenceOptions = _155[0], setFlexFilterReferenceOptions = _155[1];
|
|
506
|
+
var _156 = (0, react_1.useState)({}), flexFilterReferenceSearch = _156[0], setFlexFilterReferenceSearch = _156[1];
|
|
507
|
+
var _157 = (0, react_1.useState)(false), flexFilterModalOpen = _157[0], setFlexFilterModalOpen = _157[1];
|
|
508
|
+
var _158 = (0, react_1.useState)(false), viewSettingsModalOpen = _158[0], setViewSettingsModalOpen = _158[1];
|
|
508
509
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
509
510
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
510
511
|
// structure to props.model whenever props change, which would wipe the
|
|
511
512
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
512
513
|
// structure — writing user hides there would blur the two concepts.
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
514
|
+
var _159 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _t !== void 0 ? _t : []), userHiddenColumnIds = _159[0], setUserHiddenColumnIds = _159[1];
|
|
515
|
+
var _160 = (0, react_1.useState)(""), columnSearch = _160[0], setColumnSearch = _160[1];
|
|
516
|
+
var _161 = (0, react_1.useState)([]), savedViews = _161[0], setSavedViews = _161[1];
|
|
517
|
+
var _162 = (0, react_1.useState)(null), activeSavedViewId = _162[0], setActiveSavedViewId = _162[1];
|
|
517
518
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
518
|
-
var
|
|
519
|
+
var _163 = (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 = _163[0], setColumnWidths = _163[1];
|
|
519
520
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
520
521
|
// so the defaults drawn before it never overwrite a person's own
|
|
521
|
-
var
|
|
522
|
+
var _164 = (0, react_1.useState)(false), isViewDraftReady = _164[0], setIsViewDraftReady = _164[1];
|
|
522
523
|
// INFO: null while the name box is closed
|
|
523
|
-
var
|
|
524
|
-
var
|
|
525
|
-
var
|
|
524
|
+
var _165 = (0, react_1.useState)(null), savedViewName = _165[0], setSavedViewName = _165[1];
|
|
525
|
+
var _166 = (0, react_1.useState)(null), deletingSavedViewId = _166[0], setDeletingSavedViewId = _166[1];
|
|
526
|
+
var _167 = (0, react_1.useState)(null), draggingColumnId = _167[0], setDraggingColumnId = _167[1];
|
|
526
527
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
527
528
|
//INFO : Used by Auth
|
|
528
|
-
var
|
|
529
|
+
var _168 = (0, react_1.useState)({
|
|
529
530
|
email: "",
|
|
530
531
|
google: "",
|
|
531
532
|
phone: "",
|
|
532
533
|
disabled: false,
|
|
533
534
|
create: false,
|
|
534
|
-
}), authMethods =
|
|
535
|
-
var
|
|
535
|
+
}), authMethods = _168[0], setAuthMethods = _168[1];
|
|
536
|
+
var _169 = (0, react_1.useState)(""), selectedAuthMethod = _169[0], setSelectedAuthMethod = _169[1];
|
|
536
537
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
537
538
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
538
|
-
var
|
|
539
|
+
var _170 = (0, react_1.useState)(false), authLoading = _170[0], setAuthLoading = _170[1];
|
|
539
540
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
540
541
|
// the state has rendered, and the state disables the confirm button
|
|
541
542
|
var deletingRef = (0, react_1.useRef)(false);
|
|
542
|
-
var
|
|
543
|
+
var _171 = (0, react_1.useState)(false), deleting = _171[0], setDeleting = _171[1];
|
|
543
544
|
// INFO: Used by Activity Log
|
|
544
|
-
var
|
|
545
|
-
var
|
|
545
|
+
var _172 = (0, react_1.useState)(false), activityModal = _172[0], setActivityModal = _172[1];
|
|
546
|
+
var _173 = (0, react_1.useState)(""), activityId = _173[0], setActivityId = _173[1];
|
|
546
547
|
//INFO : Used by Export
|
|
547
|
-
var
|
|
548
|
-
var
|
|
549
|
-
var
|
|
550
|
-
var
|
|
551
|
-
var
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
557
|
-
var
|
|
558
|
-
var
|
|
559
|
-
var
|
|
560
|
-
var
|
|
561
|
-
var
|
|
548
|
+
var _174 = (0, react_1.useState)(null), csvFile = _174[0], setCSVFile = _174[1];
|
|
549
|
+
var _175 = (0, react_1.useState)([]), csvFileData = _175[0], setCSVFileData = _175[1];
|
|
550
|
+
var _176 = (0, react_1.useState)(0), stepCSVIndex = _176[0], setStepCSVIndex = _176[1];
|
|
551
|
+
var _177 = (0, react_1.useState)({}), listCSVMapAttribute = _177[0], setListCSVMapAttribute = _177[1];
|
|
552
|
+
var _178 = (0, react_1.useState)({}), listCSVObjAttribute = _178[0], setListCSVObjAttribute = _178[1];
|
|
553
|
+
var _179 = (0, react_1.useState)([]), csvAPIAttribute = _179[0], setCSVAPIAttribute = _179[1];
|
|
554
|
+
var _180 = (0, react_1.useState)(((_u = props.devSettings.currentUser) === null || _u === void 0 ? void 0 : _u.userEmail) || ""), exportCSVEmail = _180[0], setExportCSVEmail = _180[1];
|
|
555
|
+
var _181 = (0, react_1.useState)(((_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.defaultExportPDFName) || ""), exportPDFTitle = _181[0], setExportPDFTitle = _181[1];
|
|
556
|
+
var _182 = (0, react_1.useState)(false), exportPDFLoading = _182[0], setExportPDFLoading = _182[1];
|
|
557
|
+
var _183 = (0, react_1.useState)(false), exportReadPDFLoading = _183[0], setExportReadPDFLoading = _183[1];
|
|
558
|
+
var _184 = (0, react_1.useState)((_z = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.exportSettings) === null || _y === void 0 ? void 0 : _y.sumColumnId) !== null && _z !== void 0 ? _z : []), exportSumAttributeIds = _184[0], setExportSumAttributeIds = _184[1];
|
|
559
|
+
var _185 = (0, react_1.useState)((_2 = (_1 = (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.exportSettings) === null || _1 === void 0 ? void 0 : _1.hideSubItems) !== null && _2 !== void 0 ? _2 : false), hideSubItems = _185[0], setHideSubItems = _185[1];
|
|
560
|
+
var _186 = (0, react_1.useState)([]), importTableData = _186[0], setImportTableData = _186[1];
|
|
561
|
+
var _187 = (0, react_1.useState)([]), queryList = _187[0], setQueryList = _187[1];
|
|
562
|
+
var _188 = (0, react_1.useState)(undefined), allQueryList = _188[0], setAllQueryList = _188[1];
|
|
562
563
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
563
564
|
// ungrouped, so it opens ungrouped
|
|
564
|
-
var
|
|
565
|
+
var _189 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
565
566
|
? persistedState.groupBy || undefined
|
|
566
|
-
: (
|
|
567
|
+
: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.groupBy), groupId = _189[0], setGroupId = _189[1];
|
|
567
568
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
568
569
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
569
570
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
570
571
|
// next page as the user scrolls inside that band, independent of every other
|
|
571
572
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
572
|
-
var
|
|
573
|
+
var _190 = (0, react_1.useState)({}), groupPageState = _190[0], setGroupPageState = _190[1];
|
|
573
574
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
574
575
|
// in one tick do not re-fetch an already in-flight page.
|
|
575
576
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -578,59 +579,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
578
579
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
579
580
|
// arrival instead of appending rows that belong to the old list
|
|
580
581
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
581
|
-
var
|
|
582
|
-
var
|
|
582
|
+
var _191 = (0, react_1.useState)(""), readTabSection = _191[0], setReadTabSection = _191[1];
|
|
583
|
+
var _192 = (0, react_1.useState)(false), readFloatingNav = _192[0], setReadFloatingNav = _192[1];
|
|
583
584
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
584
585
|
//INFO : Used by Read
|
|
585
586
|
//INFO : Used by Update
|
|
586
|
-
var
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
587
|
+
var _193 = (0, react_1.useState)(false), modalVisible = _193[0], setModalVisible = _193[1];
|
|
588
|
+
var _194 = (0, react_1.useState)(false), deleteModal = _194[0], setDeleteModal = _194[1];
|
|
589
|
+
var _195 = (0, react_1.useState)(false), excelModal = _195[0], setExcelModal = _195[1];
|
|
590
|
+
var _196 = (0, react_1.useState)(false), exportExcel = _196[0], setExportExcel = _196[1];
|
|
591
|
+
var _197 = (0, react_1.useState)(""), exportType = _197[0], setExportType = _197[1];
|
|
592
|
+
var _198 = (0, react_1.useState)(false), exportQR = _198[0], setExportQR = _198[1];
|
|
593
|
+
var _199 = (0, react_1.useState)(function () {
|
|
593
594
|
var _a, _b;
|
|
594
595
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
595
596
|
return firstTabId;
|
|
596
|
-
}), activeTab =
|
|
597
|
-
var
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
597
|
+
}), activeTab = _199[0], setActiveTab = _199[1];
|
|
598
|
+
var _200 = (0, react_1.useState)(false), signatureSigning = _200[0], setSignatureSigning = _200[1];
|
|
599
|
+
var _201 = (0, react_1.useState)({}), selectedData = _201[0], setSelectedData = _201[1];
|
|
600
|
+
var _202 = (0, react_1.useState)(""), selectedObjectStructureId = _202[0], setSelectedObjectStructureId = _202[1];
|
|
601
|
+
var _203 = (0, react_1.useState)(""), selectedObjectId = _203[0], setSelectedObjectId = _203[1];
|
|
602
|
+
var _204 = (0, react_1.useState)(""), selectedListAddressId = _204[0], setSelectedListAddressId = _204[1];
|
|
603
|
+
var _205 = (0, react_1.useState)(-1), selectedListAddressIndex = _205[0], setSelectedListAddressIndex = _205[1];
|
|
604
|
+
var _206 = (0, react_1.useState)({
|
|
604
605
|
lat: 0,
|
|
605
606
|
lng: 0,
|
|
606
607
|
name: "",
|
|
607
|
-
}), selectedListAddress =
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
608
|
+
}), selectedListAddress = _206[0], setSelectedListAddress = _206[1];
|
|
609
|
+
var _207 = (0, react_1.useState)({}), selectedObjectData = _207[0], setSelectedObjectData = _207[1];
|
|
610
|
+
var _208 = (0, react_1.useState)(null), objectCellEdit = _208[0], setObjectCellEdit = _208[1];
|
|
611
|
+
var _209 = (0, react_1.useState)(false), referenceLoading = _209[0], setReferenceLoading = _209[1];
|
|
612
|
+
var _210 = (0, react_1.useState)({}), referencesOptions = _210[0], setReferencesOptions = _210[1];
|
|
613
|
+
var _211 = (0, react_1.useState)({}), referencesDetails = _211[0], setReferencesDetails = _211[1];
|
|
614
|
+
var _212 = (0, react_1.useState)({}), listReferencesOptions = _212[0], setListReferencesOptions = _212[1];
|
|
615
|
+
var _213 = (0, react_1.useState)({}), referenceDeleteTableData = _213[0], setReferenceDeleteTableData = _213[1];
|
|
616
|
+
var _214 = (0, react_1.useState)([]), relatedSections = _214[0], setRelatedSections = _214[1];
|
|
617
|
+
var _215 = (0, react_1.useState)(0), referenceDeleteIndex = _215[0], setReferenceDeleteIndex = _215[1];
|
|
618
|
+
var _216 = (0, react_1.useState)({
|
|
618
619
|
id: "",
|
|
619
620
|
name: "",
|
|
620
621
|
type: "string",
|
|
621
|
-
}), referenceCreationModal =
|
|
622
|
-
var
|
|
623
|
-
var
|
|
622
|
+
}), referenceCreationModal = _216[0], setReferenceCreationModal = _216[1];
|
|
623
|
+
var _217 = (0, react_1.useState)({}), referenceModelSchema = _217[0], setReferenceSchema = _217[1];
|
|
624
|
+
var _218 = (0, react_1.useState)([]), kanbanChecked = _218[0], setKanbanChecked = _218[1];
|
|
624
625
|
//INFO : Offline
|
|
625
|
-
var
|
|
626
|
-
var
|
|
626
|
+
var _219 = (0, react_1.useState)(0), offlineDataLength = _219[0], setOfflineDataLength = _219[1];
|
|
627
|
+
var _220 = (0, react_1.useState)(false), offlineModal = _220[0], setOfflineModal = _220[1];
|
|
627
628
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
628
|
-
var
|
|
629
|
-
var
|
|
629
|
+
var _221 = (0, react_1.useState)(false), isLive = _221[0], setIsLive = _221[1];
|
|
630
|
+
var _222 = (0, react_1.useState)(false), isLiveOffline = _222[0], setIsLiveOffline = _222[1];
|
|
630
631
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
631
632
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
632
633
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
633
|
-
var
|
|
634
|
+
var _223 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _223[0], setIsNetworkOffline = _223[1];
|
|
634
635
|
var previousType = (0, react_1.useRef)(null);
|
|
635
636
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
636
637
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -747,16 +748,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
747
748
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
748
749
|
* shared link or a back button.
|
|
749
750
|
*/
|
|
750
|
-
var defaultTabName = (
|
|
751
|
+
var defaultTabName = (_6 = (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.extendedTabs) === null || _5 === void 0 ? void 0 : _5.find(function (eachTab) { return eachTab.defaultTab; })) === null || _6 === void 0 ? void 0 : _6.name;
|
|
751
752
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
752
753
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
753
754
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
754
|
-
var viewType = (
|
|
755
|
+
var viewType = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.viewId) !== null && _8 !== void 0 ? _8 : (resolvedType === "list" && defaultTabName
|
|
755
756
|
? (0, utils_1.lowercaseTextToId)(defaultTabName)
|
|
756
757
|
: "general");
|
|
757
758
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
758
759
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
759
|
-
var dbModule = isFirebaseClient ? (
|
|
760
|
+
var dbModule = isFirebaseClient ? (_9 = props.lib) === null || _9 === void 0 ? void 0 : _9.firebase : (_10 = props.lib) === null || _10 === void 0 ? void 0 : _10.axios;
|
|
760
761
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
761
762
|
var selectedRelated = resolvedType === "read"
|
|
762
763
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -838,32 +839,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
838
839
|
}, [
|
|
839
840
|
resolvedType,
|
|
840
841
|
props.id,
|
|
841
|
-
(
|
|
842
|
+
(_11 = props.space) === null || _11 === void 0 ? void 0 : _11._id,
|
|
842
843
|
props.devSettings.schemaEndpoint,
|
|
843
|
-
(
|
|
844
|
+
(_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.showRelatedTab,
|
|
844
845
|
]);
|
|
845
846
|
/* eslint-enable */
|
|
846
847
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
847
848
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
848
|
-
var isViewSettingsEnabled = ((
|
|
849
|
+
var isViewSettingsEnabled = ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareViewSettings) || ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareNewDTW)
|
|
849
850
|
? true
|
|
850
851
|
: false;
|
|
851
852
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
852
853
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
853
854
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
854
|
-
var isSchemaHideMode = ((
|
|
855
|
+
var isSchemaHideMode = ((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.onChangeHide) ? true : false;
|
|
855
856
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
856
857
|
// the persisted value and falls back to the consumer's limit
|
|
857
|
-
var
|
|
858
|
+
var _224 = (0, react_1.useState)((_17 = (_16 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _16 !== void 0 ? _16 : props.limit) !== null && _17 !== void 0 ? _17 : 10), pageLimit = _224[0], setPageLimit = _224[1];
|
|
858
859
|
var limit = pageLimit;
|
|
859
|
-
var isSavedViewsEnabled = !!((
|
|
860
|
+
var isSavedViewsEnabled = !!((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.savedViews) && resolvedType === "list";
|
|
860
861
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
861
862
|
// every view is the team's and nothing is kept locally
|
|
862
|
-
var isAppViews = ((
|
|
863
|
-
!!((
|
|
863
|
+
var isAppViews = ((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.sharedViews) !== undefined ||
|
|
864
|
+
!!((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.onChangeSharedViews);
|
|
864
865
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
865
866
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
866
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
867
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.sort);
|
|
867
868
|
var handleSortColumn = function (value) {
|
|
868
869
|
var _a, _b, _c, _d;
|
|
869
870
|
if (isInternalSort)
|
|
@@ -893,7 +894,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
893
894
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
894
895
|
// can hand over the whole set — there formula columns are not offered for
|
|
895
896
|
// sorting or filtering, rather than ordering one page
|
|
896
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
897
|
+
var isFormulaViewSupported = !isFirebase && !((_23 = (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.unionCollections) === null || _23 === void 0 ? void 0 : _23.length);
|
|
897
898
|
var formulaSort = isFormulaViewSupported &&
|
|
898
899
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
899
900
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -902,10 +903,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
902
903
|
// INFO: a referenced record is joined by MongoWrapper's lookup and a list
|
|
903
904
|
// row is matched by its Mongo path — neither Firebase nor a union read runs
|
|
904
905
|
// them
|
|
905
|
-
var flexFilterExtras = !isFirebase && !((
|
|
906
|
+
var flexFilterExtras = !isFirebase && !((_25 = (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.unionCollections) === null || _25 === void 0 ? void 0 : _25.length)
|
|
906
907
|
? {
|
|
907
|
-
references: (
|
|
908
|
-
listObjects: (
|
|
908
|
+
references: (_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareFlexFilterReferences,
|
|
909
|
+
listObjects: (_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilterListObjects,
|
|
909
910
|
}
|
|
910
911
|
: undefined;
|
|
911
912
|
var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
|
|
@@ -917,6 +918,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
917
918
|
var flexFilterStructure = (0, flexFilter_1.handleBuildFlexFilterStructure)(isFormulaViewSupported
|
|
918
919
|
? structure
|
|
919
920
|
: structure.filter(function (eachModel) { return eachModel.type !== "formula"; }), flexFilterExtras);
|
|
921
|
+
// INFO: what the filter panel offers. A condition already set, as in a saved
|
|
922
|
+
// view, keeps its column so it still reads and can be removed.
|
|
923
|
+
var flexFilterPanelStructure = isSystemColumnsLocked
|
|
924
|
+
? flexFilterStructure.filter(function (eachColumn) {
|
|
925
|
+
return !appendedSystemColumnIds.includes(eachColumn.id) ||
|
|
926
|
+
flexFilters.some(function (eachFilter) { return eachFilter.columnId === eachColumn.id; });
|
|
927
|
+
})
|
|
928
|
+
: flexFilterStructure;
|
|
920
929
|
// INFO: an export's filters run on the export server, which cannot work out
|
|
921
930
|
// a formula, so its rows leave formula columns out — a formula filter on
|
|
922
931
|
// the list still narrows the export, by the ids of the rows it kept
|
|
@@ -958,18 +967,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
958
967
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
959
968
|
};
|
|
960
969
|
};
|
|
961
|
-
var
|
|
962
|
-
var isEditor = ((
|
|
963
|
-
var isOffline = (
|
|
970
|
+
var _225 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _225.canUpdateRecord, canInlineUpdate = _225.canInlineUpdate, canBatchUpdate = _225.canBatchUpdate, canDeleteRecord = _225.canDeleteRecord;
|
|
971
|
+
var isEditor = ((_28 = props.edit) === null || _28 === void 0 ? void 0 : _28.allEditable) ? true : false;
|
|
972
|
+
var isOffline = (_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareOffline;
|
|
964
973
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
965
974
|
// the live network state — online saves go to the server even if bareOffline
|
|
966
975
|
// is true, offline saves go to IDB as normal.
|
|
967
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
968
|
-
var showId = (
|
|
976
|
+
var isOfflineNetworkListener = isOffline && ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareOfflineNetworkListener);
|
|
977
|
+
var showId = (_31 = props.space) === null || _31 === void 0 ? void 0 : _31.showId;
|
|
969
978
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
970
|
-
var idField = ((
|
|
971
|
-
var pipeline = (
|
|
972
|
-
if ((
|
|
979
|
+
var idField = ((_32 = props.space) === null || _32 === void 0 ? void 0 : _32.idField) || ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.idField);
|
|
980
|
+
var pipeline = (_34 = props === null || props === void 0 ? void 0 : props.space) === null || _34 === void 0 ? void 0 : _34.pipeline;
|
|
981
|
+
if ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareListPipeline) {
|
|
973
982
|
pipeline = pipeline
|
|
974
983
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
975
984
|
}
|
|
@@ -982,24 +991,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
982
991
|
* three records came back instead of five files, and each tile received the
|
|
983
992
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
984
993
|
*/
|
|
985
|
-
var fileViewColumnId = (
|
|
994
|
+
var fileViewColumnId = (_39 = (_38 = ((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.extendedTabs) !== null && _37 !== void 0 ? _37 : []).find(function (eachTab) {
|
|
986
995
|
return eachTab.viewType === "file" &&
|
|
987
996
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
988
|
-
})) === null ||
|
|
989
|
-
var hasNavigation = ((
|
|
997
|
+
})) === null || _38 === void 0 ? void 0 : _38.fileSettings) === null || _39 === void 0 ? void 0 : _39.columnId;
|
|
998
|
+
var hasNavigation = ((_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.handleNavigate) ? true : false;
|
|
990
999
|
var formColumn = "grid-cols-12";
|
|
991
|
-
var useMobileView = (
|
|
1000
|
+
var useMobileView = (_42 = (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareUpdateMobileView) !== null && _42 !== void 0 ? _42 : false;
|
|
992
1001
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
993
|
-
var isActivityLog = (((
|
|
994
|
-
((
|
|
995
|
-
(((
|
|
996
|
-
((
|
|
997
|
-
var customPaginationSize = ((
|
|
1002
|
+
var isActivityLog = (((_44 = (_43 = props.edit) === null || _43 === void 0 ? void 0 : _43.activityLog) === null || _44 === void 0 ? void 0 : _44.enableComments) &&
|
|
1003
|
+
((_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.activityLog.commentCollectionId)) ||
|
|
1004
|
+
(((_47 = (_46 = props.edit) === null || _46 === void 0 ? void 0 : _46.activityLog) === null || _47 === void 0 ? void 0 : _47.enableLogs) &&
|
|
1005
|
+
((_48 = props.edit) === null || _48 === void 0 ? void 0 : _48.activityLog.logsCollectionId));
|
|
1006
|
+
var customPaginationSize = ((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.customPaginationCount)
|
|
998
1007
|
? props.organise.customPaginationCount(size)
|
|
999
1008
|
: undefined;
|
|
1000
1009
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1001
1010
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1002
|
-
dbModule: (
|
|
1011
|
+
dbModule: (_50 = props.lib) === null || _50 === void 0 ? void 0 : _50.axios,
|
|
1003
1012
|
dbType: devSettings.server,
|
|
1004
1013
|
dbCollection: props.collectionId,
|
|
1005
1014
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1007,7 +1016,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1007
1016
|
dbUserToken: devSettings.dbUserToken,
|
|
1008
1017
|
});
|
|
1009
1018
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1010
|
-
dbModule: (
|
|
1019
|
+
dbModule: (_51 = props.lib) === null || _51 === void 0 ? void 0 : _51.axios,
|
|
1011
1020
|
dbType: devSettings.server,
|
|
1012
1021
|
dbCollection: props.collectionId,
|
|
1013
1022
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1015,12 +1024,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1015
1024
|
dbUserToken: devSettings.dbUserToken,
|
|
1016
1025
|
});
|
|
1017
1026
|
var moreButtonPopUp = [
|
|
1018
|
-
((
|
|
1027
|
+
((_52 = props.edit) === null || _52 === void 0 ? void 0 : _52.allEditable) &&
|
|
1019
1028
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1020
1029
|
// datasheet served through one can import; only the browser-direct
|
|
1021
1030
|
// Firebase client has no server to import through
|
|
1022
1031
|
!isFirebaseClient &&
|
|
1023
|
-
!((
|
|
1032
|
+
!((_54 = (_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.exportSettings) === null || _54 === void 0 ? void 0 : _54.hideImportCSV)
|
|
1024
1033
|
? {
|
|
1025
1034
|
text: "Import Excel",
|
|
1026
1035
|
onClick: function () {
|
|
@@ -1029,7 +1038,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1029
1038
|
},
|
|
1030
1039
|
}
|
|
1031
1040
|
: null,
|
|
1032
|
-
!((
|
|
1041
|
+
!((_56 = (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.exportSettings) === null || _56 === void 0 ? void 0 : _56.hideExportCSV)
|
|
1033
1042
|
? {
|
|
1034
1043
|
text: "Export CSV",
|
|
1035
1044
|
onClick: function () {
|
|
@@ -1039,7 +1048,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1039
1048
|
},
|
|
1040
1049
|
}
|
|
1041
1050
|
: null,
|
|
1042
|
-
!((
|
|
1051
|
+
!((_58 = (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.exportSettings) === null || _58 === void 0 ? void 0 : _58.hideExportExcel)
|
|
1043
1052
|
? {
|
|
1044
1053
|
text: "Export Excel",
|
|
1045
1054
|
onClick: function () {
|
|
@@ -1049,7 +1058,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1049
1058
|
},
|
|
1050
1059
|
}
|
|
1051
1060
|
: null,
|
|
1052
|
-
!((
|
|
1061
|
+
!((_60 = (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.exportSettings) === null || _60 === void 0 ? void 0 : _60.hideExportPDF)
|
|
1053
1062
|
? {
|
|
1054
1063
|
text: "Export PDF",
|
|
1055
1064
|
onClick: function () {
|
|
@@ -1059,7 +1068,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1059
1068
|
},
|
|
1060
1069
|
}
|
|
1061
1070
|
: null,
|
|
1062
|
-
!((
|
|
1071
|
+
!((_62 = (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.exportSettings) === null || _62 === void 0 ? void 0 : _62.hideExportQR)
|
|
1063
1072
|
? {
|
|
1064
1073
|
text: "Export QR",
|
|
1065
1074
|
onClick: function () {
|
|
@@ -1069,7 +1078,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1069
1078
|
},
|
|
1070
1079
|
}
|
|
1071
1080
|
: null,
|
|
1072
|
-
!((
|
|
1081
|
+
!((_64 = (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.exportSettings) === null || _64 === void 0 ? void 0 : _64.hideExportQR)
|
|
1073
1082
|
? {
|
|
1074
1083
|
text: "Export QR(Data)",
|
|
1075
1084
|
onClick: function () {
|
|
@@ -1079,7 +1088,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1079
1088
|
},
|
|
1080
1089
|
}
|
|
1081
1090
|
: null,
|
|
1082
|
-
!((
|
|
1091
|
+
!((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideExportPrint)
|
|
1083
1092
|
? {
|
|
1084
1093
|
text: "Print",
|
|
1085
1094
|
onClick: function () {
|
|
@@ -1089,7 +1098,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1089
1098
|
},
|
|
1090
1099
|
}
|
|
1091
1100
|
: null,
|
|
1092
|
-
!((
|
|
1101
|
+
!((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportDraft)
|
|
1093
1102
|
? {
|
|
1094
1103
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1095
1104
|
onClick: function () {
|
|
@@ -1098,7 +1107,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1098
1107
|
}
|
|
1099
1108
|
: null,
|
|
1100
1109
|
].filter(Boolean);
|
|
1101
|
-
if ((
|
|
1110
|
+
if ((_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.moreSettings)
|
|
1102
1111
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1103
1112
|
//=====================================================================================
|
|
1104
1113
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1155,7 +1164,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1155
1164
|
};
|
|
1156
1165
|
var handleShowAllUserHiddenColumns = function () {
|
|
1157
1166
|
var _a;
|
|
1158
|
-
if (appendedSystemColumnIds.length)
|
|
1167
|
+
if (appendedSystemColumnIds.length && !isSystemColumnsLocked)
|
|
1159
1168
|
handleSetShownSystemColumns(appendedSystemColumnIds);
|
|
1160
1169
|
if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeHide) {
|
|
1161
1170
|
var handleShowAll = function (columns) {
|
|
@@ -1492,14 +1501,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1492
1501
|
//=====================================================================================
|
|
1493
1502
|
//SECTION: Saved Views
|
|
1494
1503
|
//=====================================================================================
|
|
1495
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1504
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.persistKey, (_71 = devSettings.currentUser) === null || _71 === void 0 ? void 0 : _71.userEmail);
|
|
1496
1505
|
(0, react_1.useEffect)(function () {
|
|
1497
1506
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1498
1507
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1499
1508
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1500
1509
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1501
1510
|
// browser until the person updates the view for everyone or resets it
|
|
1502
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1511
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.allView) !== undefined;
|
|
1503
1512
|
var handleGetViewDraftKey = function (viewId) {
|
|
1504
1513
|
var _a, _b;
|
|
1505
1514
|
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);
|
|
@@ -1576,7 +1585,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1576
1585
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1577
1586
|
(0, react_1.useEffect)(function () {
|
|
1578
1587
|
lastSentSharedViewsRef.current = null;
|
|
1579
|
-
}, [(
|
|
1588
|
+
}, [(_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.sharedViews]);
|
|
1580
1589
|
var handleStoreSharedViews = function (update) {
|
|
1581
1590
|
var _a, _b, _c;
|
|
1582
1591
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1621,13 +1630,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1621
1630
|
/* eslint-disable */
|
|
1622
1631
|
}, [
|
|
1623
1632
|
isSavedViewsEnabled,
|
|
1624
|
-
(
|
|
1625
|
-
(
|
|
1626
|
-
(
|
|
1633
|
+
(_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.initialSavedViewId,
|
|
1634
|
+
(_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.defaultSavedViewId,
|
|
1635
|
+
(_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.sharedViews,
|
|
1627
1636
|
savedViews,
|
|
1628
1637
|
]);
|
|
1629
1638
|
/* eslint-enable */
|
|
1630
|
-
var defaultSavedViewIds = ((
|
|
1639
|
+
var defaultSavedViewIds = ((_78 = (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.defaultSavedViews) !== null && _78 !== void 0 ? _78 : [])
|
|
1631
1640
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1632
1641
|
.join("|");
|
|
1633
1642
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1929,8 +1938,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1929
1938
|
pageLimit,
|
|
1930
1939
|
groupId,
|
|
1931
1940
|
columnWidths,
|
|
1932
|
-
(
|
|
1933
|
-
(
|
|
1941
|
+
(_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.allView,
|
|
1942
|
+
(_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.sharedViews,
|
|
1934
1943
|
savedViews,
|
|
1935
1944
|
]);
|
|
1936
1945
|
/* eslint-enable */
|
|
@@ -1970,7 +1979,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1970
1979
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1971
1980
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1972
1981
|
/* eslint-disable */
|
|
1973
|
-
}, [props.collectionId, (
|
|
1982
|
+
}, [props.collectionId, (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.persistKey]);
|
|
1974
1983
|
/* eslint-enable */
|
|
1975
1984
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1976
1985
|
(0, react_1.useEffect)(function () {
|
|
@@ -2005,7 +2014,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2005
2014
|
(0, react_1.useEffect)(function () {
|
|
2006
2015
|
handleOfflinePrefetch();
|
|
2007
2016
|
/* eslint-disable */
|
|
2008
|
-
}, [props.collectionId, (
|
|
2017
|
+
}, [props.collectionId, (_82 = props.bareSettings) === null || _82 === void 0 ? void 0 : _82.bareOffline]);
|
|
2009
2018
|
/* eslint-enable */
|
|
2010
2019
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2011
2020
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2025,7 +2034,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2025
2034
|
}, interval);
|
|
2026
2035
|
return function () { return clearInterval(timer); };
|
|
2027
2036
|
/* eslint-disable */
|
|
2028
|
-
}, [(
|
|
2037
|
+
}, [(_83 = props.bareSettings) === null || _83 === void 0 ? void 0 : _83.barePollingInterval, isLive, isNetworkOffline]);
|
|
2029
2038
|
/* eslint-enable */
|
|
2030
2039
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2031
2040
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2067,7 +2076,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2067
2076
|
};
|
|
2068
2077
|
/* eslint-disable */
|
|
2069
2078
|
}, [
|
|
2070
|
-
(
|
|
2079
|
+
(_84 = props.bareSettings) === null || _84 === void 0 ? void 0 : _84.bareSocketName,
|
|
2071
2080
|
props.collectionId,
|
|
2072
2081
|
props.devSettings.sseEndpoint,
|
|
2073
2082
|
props.devSettings.dbAPIToken,
|
|
@@ -2341,10 +2350,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2341
2350
|
props.collectionId,
|
|
2342
2351
|
props.model,
|
|
2343
2352
|
props.localURLEndpoint,
|
|
2344
|
-
(
|
|
2345
|
-
(
|
|
2346
|
-
(
|
|
2347
|
-
(
|
|
2353
|
+
(_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.extendedTabs,
|
|
2354
|
+
(_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.viewId,
|
|
2355
|
+
(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.additionalQuery,
|
|
2356
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.groupBy,
|
|
2348
2357
|
resolvedType,
|
|
2349
2358
|
]);
|
|
2350
2359
|
/**
|
|
@@ -2496,7 +2505,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2496
2505
|
};
|
|
2497
2506
|
}, 100);
|
|
2498
2507
|
return function () { return clearTimeout(timeoutId); };
|
|
2499
|
-
}, [(
|
|
2508
|
+
}, [(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2500
2509
|
(0, react_1.useEffect)(function () {
|
|
2501
2510
|
if (resolvedType !== "read")
|
|
2502
2511
|
return;
|
|
@@ -5609,7 +5618,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5609
5618
|
// update an inline cell edit makes, gated on the same update right
|
|
5610
5619
|
var columnTypeActions = {
|
|
5611
5620
|
canUpdate: canUpdateRecord,
|
|
5612
|
-
onButtonClick: (
|
|
5621
|
+
onButtonClick: (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.onButtonClick,
|
|
5613
5622
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5614
5623
|
var _a;
|
|
5615
5624
|
return __generator(this, function (_b) {
|
|
@@ -5626,7 +5635,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5626
5635
|
}
|
|
5627
5636
|
});
|
|
5628
5637
|
}); },
|
|
5629
|
-
onTimeTrackingAction: ((
|
|
5638
|
+
onTimeTrackingAction: ((_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.onTimeTrackingAction) && canUpdateRecord
|
|
5630
5639
|
? function (rowId, columnId, action) {
|
|
5631
5640
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5632
5641
|
}
|
|
@@ -7667,6 +7676,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7667
7676
|
if (eachAttribute.id === "_id" ||
|
|
7668
7677
|
eachAttribute.id === "id" ||
|
|
7669
7678
|
eachAttribute.id === "baseDraft" ||
|
|
7679
|
+
(isSystemColumnsLocked &&
|
|
7680
|
+
appendedSystemColumnIds.includes(eachAttribute.id)) ||
|
|
7670
7681
|
// INFO: a system column starts hidden yet is always offered
|
|
7671
7682
|
(!includeSchemaHidden &&
|
|
7672
7683
|
eachAttribute.hide &&
|
|
@@ -7766,7 +7777,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7766
7777
|
: "cursor-pointer hover:text-primary-600"), onClick: function () {
|
|
7767
7778
|
handleToggleUserHiddenColumn(eachColumn.id);
|
|
7768
7779
|
} },
|
|
7769
|
-
react_1.default.createElement("span", { className: "pr-3 truncate grow ".concat(labelColor) }, eachColumn.
|
|
7780
|
+
react_1.default.createElement("span", { className: "pr-3 truncate grow ".concat(labelColor) }, appendedSystemColumnIds.includes(eachColumn.id)
|
|
7781
|
+
? "".concat(eachColumn.name, " (System)")
|
|
7782
|
+
: eachColumn.name),
|
|
7770
7783
|
isHidden ? (react_1.default.createElement(outline_1.EyeSlashIcon, { className: "w-4 h-4 text-gray-400 shrink-0" })) : (react_1.default.createElement(outline_1.EyeIcon, { className: "w-4 h-4 text-primary-600 shrink-0" })))));
|
|
7771
7784
|
};
|
|
7772
7785
|
return (react_1.default.createElement("div", { "data-testid": "dtw-view-settings", className: "flex flex-col" },
|
|
@@ -7836,8 +7849,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7836
7849
|
: rows;
|
|
7837
7850
|
};
|
|
7838
7851
|
/* eslint-disable */
|
|
7839
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7840
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
7852
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.bareNewDTW]);
|
|
7853
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareNewDTW]);
|
|
7841
7854
|
/* eslint-enable */
|
|
7842
7855
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7843
7856
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -9067,7 +9080,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9067
9080
|
};
|
|
9068
9081
|
// INFO: Desktop — PopUp (hidden on mobile)
|
|
9069
9082
|
actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
|
|
9070
|
-
react_1.default.createElement(popUp_1.PopUp, { darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters,
|
|
9083
|
+
react_1.default.createElement(popUp_1.PopUp, { darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterQuery, searchInput, (_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareListFilterAddComponent, undefined, {
|
|
9071
9084
|
darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode,
|
|
9072
9085
|
darkModeBg: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkModeBg,
|
|
9073
9086
|
}), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_3 = props === null || props === void 0 ? void 0 : props.lib) === null || _3 === void 0 ? void 0 : _3.Transition } })));
|
|
@@ -9075,7 +9088,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9075
9088
|
actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
|
|
9076
9089
|
!((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileFloatingSearch) &&
|
|
9077
9090
|
flexFilterIconBtn(true),
|
|
9078
|
-
(0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters,
|
|
9091
|
+
(0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_5 = props.bareSettings) === null || _5 === void 0 ? void 0 : _5.bareListFilterQuery, searchInput, (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareListFilterAddComponent, {
|
|
9079
9092
|
darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode,
|
|
9080
9093
|
darkModeBg: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkModeBg,
|
|
9081
9094
|
})));
|
|
@@ -11818,14 +11831,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11818
11831
|
};
|
|
11819
11832
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11820
11833
|
renderNotification("root"),
|
|
11821
|
-
((
|
|
11834
|
+
((_95 = (_94 = props.renderSettings) === null || _94 === void 0 ? void 0 : _94.renderLoadingUI) === null || _95 === void 0 ? void 0 : _95.call(_94)) && loading ? ((_96 = props.renderSettings) === null || _96 === void 0 ? void 0 : _96.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.darkMode, darkModeBg: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11822
11835
|
var _a, _b;
|
|
11823
11836
|
if (loading)
|
|
11824
11837
|
return;
|
|
11825
11838
|
handlePopUpModal(false);
|
|
11826
11839
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11827
11840
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11828
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11841
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkMode, darkModeBg: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11829
11842
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11830
11843
|
if (dataId) {
|
|
11831
11844
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11841,19 +11854,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11841
11854
|
}, onClose: function () {
|
|
11842
11855
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11843
11856
|
} }),
|
|
11844
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11857
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkMode, darkModeBg: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11845
11858
|
setReferenceDeleteTableData({});
|
|
11846
11859
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11847
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11860
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkMode, darkModeBg: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11848
11861
|
setDeletePasscodeInput("");
|
|
11849
11862
|
setDeleteModal(!deleteModal);
|
|
11850
11863
|
setDeleteFeedId("");
|
|
11851
11864
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11852
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11865
|
+
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, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11853
11866
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11854
11867
|
setBatchUpdateModal(false);
|
|
11855
11868
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11856
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11869
|
+
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, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11857
11870
|
var _a, _b;
|
|
11858
11871
|
if (props.space)
|
|
11859
11872
|
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 }));
|
|
@@ -11868,13 +11881,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11868
11881
|
(0, react_dom_1.createPortal)(
|
|
11869
11882
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11870
11883
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11871
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11884
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11872
11885
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11873
11886
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11874
11887
|
// toolbar's collection-wide button clears it when it opens.
|
|
11875
11888
|
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"
|
|
11876
11889
|
? props.title
|
|
11877
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11890
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_111 = props.id) !== null && _111 !== void 0 ? _111 : "") : activityId, activityLog: (_112 = props.edit) === null || _112 === void 0 ? void 0 : _112.activityLog, model: structure }) })), document.body),
|
|
11878
11891
|
renderScrollSentinel()));
|
|
11879
11892
|
});
|
|
11880
11893
|
//# sourceMappingURL=index.js.map
|