blixify-ui-web 1.2.264 → 1.2.265
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 +220 -201
- 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/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js +6 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +12 -6
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +176 -14
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/flexFilter/model.d.ts +1 -0
- package/lib/components/data/flexFilter/model.d.ts.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -235,7 +235,7 @@ var handleCheckEmptyCardValue = function (value) {
|
|
|
235
235
|
};
|
|
236
236
|
exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
|
|
237
237
|
exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
238
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126;
|
|
238
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127;
|
|
239
239
|
// INFO: every view draws a lookup as its source column's type, read-only, so
|
|
240
240
|
// no type branch below meets "lookup"; rawProps.model keeps the lookups as
|
|
241
241
|
// stored for the columns handed back to the host
|
|
@@ -254,7 +254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
254
254
|
// the list never refetching while the panel is open, which fails silently.
|
|
255
255
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
256
256
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
257
|
-
var
|
|
257
|
+
var _128 = (0, react_1.useState)(false), drawerPageView = _128[0], setDrawerPageView = _128[1];
|
|
258
258
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
259
259
|
// live props. Without this, navigating back to the list would re-render the
|
|
260
260
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -309,7 +309,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
309
309
|
drawerFormEditedRef.current = false;
|
|
310
310
|
}
|
|
311
311
|
drawerOpenRef.current = isDrawerHost;
|
|
312
|
-
var
|
|
312
|
+
var _129 = (0, react_1.useState)(false), drawerDiscardModal = _129[0], setDrawerDiscardModal = _129[1];
|
|
313
313
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
314
314
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
315
315
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -388,14 +388,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
388
388
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
|
-
var
|
|
391
|
+
var _130 = intialiseDefaultFilterValues(), initialFilterSearch = _130.initialFilterSearch, initialFilterSearchParams = _130.initialFilterSearchParams, initialFilterSelection = _130.initialFilterSelection, initialFilterReference = _130.initialFilterReference, initialFilterReferenceDate = _130.initialFilterReferenceDate;
|
|
392
392
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
393
|
-
var
|
|
393
|
+
var _131 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
394
394
|
mode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.persistViewState,
|
|
395
395
|
collectionId: props.collectionId,
|
|
396
396
|
persistKey: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistKey,
|
|
397
397
|
type: resolvedType,
|
|
398
|
-
}), rawPersistedState =
|
|
398
|
+
}), rawPersistedState = _131.persistedState, isPersistEnabled = _131.isEnabled, handleSaveView = _131.handleSaveView, handleRegisterViewSnapshot = _131.handleRegisterViewSnapshot;
|
|
399
399
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
400
400
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
401
401
|
var _a, _b, _c, _d;
|
|
@@ -411,8 +411,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
411
411
|
(_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterListObjects,
|
|
412
412
|
(_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterRelated,
|
|
413
413
|
]);
|
|
414
|
-
var
|
|
415
|
-
var
|
|
414
|
+
var _132 = (0, react_1.useState)(false), loading = _132[0], setLoading = _132[1];
|
|
415
|
+
var _133 = (0, react_1.useState)(), notification = _133[0], setNotification = _133[1];
|
|
416
416
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
417
417
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
418
418
|
(0, react_1.useEffect)(function () {
|
|
@@ -422,67 +422,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
422
422
|
return function () { return clearTimeout(timer); };
|
|
423
423
|
}, [notification]);
|
|
424
424
|
//INFO : Used by List
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
var
|
|
425
|
+
var _134 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _q !== void 0 ? _q : initialFilterSearch), filterSearch = _134[0], setFilterSearch = _134[1];
|
|
426
|
+
var _135 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _r !== void 0 ? _r : initialFilterSearchParams), filterSearchParams = _135[0], setFilterSearchParams = _135[1];
|
|
427
|
+
var _136 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _s !== void 0 ? _s : initialFilterSelection), filterSelection = _136[0], setFilterSelection = _136[1];
|
|
428
|
+
var _137 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _t !== void 0 ? _t : initialFilterReference), filterReference = _137[0], setFilterReference = _137[1];
|
|
429
|
+
var _138 = (0, react_1.useState)({}), filterReferenceSearch = _138[0], setFilterReferenceSearch = _138[1];
|
|
430
|
+
var _139 = (0, react_1.useState)({}), filterReferenceList = _139[0], setFilterReferenceList = _139[1];
|
|
431
|
+
var _140 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
432
432
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
433
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
438
|
-
var
|
|
433
|
+
: initialFilterReferenceDate), filterReferenceDate = _140[0], setFilterReferenceDate = _140[1];
|
|
434
|
+
var _141 = (0, react_1.useState)(true), tableLoading = _141[0], setTableLoading = _141[1];
|
|
435
|
+
var _142 = (0, react_1.useState)(""), cursor = _142[0], setCursor = _142[1];
|
|
436
|
+
var _143 = (0, react_1.useState)(""), lastCursor = _143[0], setLastCursor = _143[1];
|
|
437
|
+
var _144 = (0, react_1.useState)([]), tableData = _144[0], setTableData = _144[1];
|
|
438
|
+
var _145 = (0, react_1.useState)([]), spaceTableData = _145[0], setSpaceTableData = _145[1];
|
|
439
439
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
440
440
|
// the state it closed over can predate an earlier save on the same row
|
|
441
441
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
442
442
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
443
443
|
tableDataRef.current = tableData;
|
|
444
444
|
spaceTableDataRef.current = spaceTableData;
|
|
445
|
-
var
|
|
446
|
-
var
|
|
445
|
+
var _146 = (0, react_1.useState)(0), size = _146[0], setSize = _146[1];
|
|
446
|
+
var _147 = (0, react_1.useState)((_w = (_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _u !== void 0 ? _u : (_v = props.organise) === null || _v === void 0 ? void 0 : _v.pageIndex) !== null && _w !== void 0 ? _w : 0), pageIndex = _147[0], setPageIndex = _147[1];
|
|
447
447
|
// INFO: every change of page, including the return to the first page when a
|
|
448
448
|
// filter or search changes, which onChangePagination does not always report
|
|
449
449
|
(0, react_1.useEffect)(function () {
|
|
450
450
|
var _a, _b;
|
|
451
451
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
452
452
|
}, [pageIndex]);
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var
|
|
457
|
-
var
|
|
453
|
+
var _148 = (0, react_1.useState)([]), selectedIds = _148[0], setSelectedIds = _148[1];
|
|
454
|
+
var _149 = (0, react_1.useState)(false), selectAll = _149[0], setSelectAll = _149[1];
|
|
455
|
+
var _150 = (0, react_1.useState)(""), deletePasscode = _150[0], setDeletePasscode = _150[1];
|
|
456
|
+
var _151 = (0, react_1.useState)(""), deletePasscodeInput = _151[0], setDeletePasscodeInput = _151[1];
|
|
457
|
+
var _152 = (0, react_1.useState)(""), deleteFeedId = _152[0], setDeleteFeedId = _152[1];
|
|
458
458
|
//INFO : Used by List Organise
|
|
459
459
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
460
460
|
// persistViewState is enabled and a persisted sort exists
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var
|
|
461
|
+
var _153 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _x !== void 0 ? _x : undefined), persistedSort = _153[0], setPersistedSort = _153[1];
|
|
462
|
+
var _154 = (0, react_1.useState)(false), filterDraft = _154[0], setFilterDraft = _154[1];
|
|
463
|
+
var _155 = (0, react_1.useState)(false), addTabModal = _155[0], setAddTabModal = _155[1];
|
|
464
|
+
var _156 = (0, react_1.useState)(-1), editTabIndex = _156[0], setEditTabIndex = _156[1];
|
|
465
465
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
466
466
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
467
|
-
var
|
|
467
|
+
var _157 = (0, react_1.useState)(function () {
|
|
468
468
|
var _a;
|
|
469
469
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
470
|
-
}), selectedTab =
|
|
471
|
-
var
|
|
470
|
+
}), selectedTab = _157[0], setSelectedTab = _157[1];
|
|
471
|
+
var _158 = (0, react_1.useState)("dayGridMonth"), calendarView = _158[0], setCalendarView = _158[1];
|
|
472
472
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
473
473
|
// (calendarView above drives the matching range query)
|
|
474
|
-
var
|
|
475
|
-
var
|
|
474
|
+
var _159 = (0, react_1.useState)("month"), newCalendarViewMode = _159[0], setNewCalendarViewMode = _159[1];
|
|
475
|
+
var _160 = (0, react_1.useState)(new Date()), calendarTabMonth = _160[0], setCalendarTabMonth = _160[1];
|
|
476
476
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
477
477
|
// whenever its settings change, and that must not undo the user's switch
|
|
478
478
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
479
|
-
var
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
var
|
|
479
|
+
var _161 = (0, react_1.useState)(true), kanbanDroppable = _161[0], setKanbanDroppable = _161[1];
|
|
480
|
+
var _162 = (0, react_1.useState)([]), kanbanOptions = _162[0], setKanbanOptions = _162[1];
|
|
481
|
+
var _163 = (0, react_1.useState)(false), batchUpdateModal = _163[0], setBatchUpdateModal = _163[1];
|
|
482
|
+
var _164 = (0, react_1.useState)({
|
|
483
483
|
columnId: "",
|
|
484
484
|
columnData: {},
|
|
485
|
-
}), batchUpdateData =
|
|
485
|
+
}), batchUpdateData = _164[0], setBatchUpdateData = _164[1];
|
|
486
486
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
487
487
|
// join the structure hidden; the ones a user shows are kept per view
|
|
488
488
|
var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
|
|
@@ -490,12 +490,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
490
490
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
491
491
|
? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
|
|
492
492
|
: [];
|
|
493
|
-
var
|
|
493
|
+
var _165 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _165[0], setShownSystemColumnIds = _165[1];
|
|
494
494
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
495
495
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
496
496
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
497
497
|
};
|
|
498
|
-
var
|
|
498
|
+
var _166 = (0, react_1.useState)(function () {
|
|
499
499
|
var _a;
|
|
500
500
|
var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
|
|
501
501
|
if (!persistedState)
|
|
@@ -522,8 +522,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
return model;
|
|
525
|
-
}), structure =
|
|
526
|
-
var
|
|
525
|
+
}), structure = _166[0], setStructure = _166[1];
|
|
526
|
+
var _167 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _167[0], setAdditionalQuery = _167[1];
|
|
527
527
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
528
528
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
529
529
|
var defaultFlexFilterRow = [
|
|
@@ -541,7 +541,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
541
541
|
: (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
542
542
|
? persistedState.flexFilters
|
|
543
543
|
: defaultFlexFilterRow;
|
|
544
|
-
var
|
|
544
|
+
var _168 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _168[0], setFlexFilters = _168[1];
|
|
545
545
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
546
546
|
// clear methods so chained calls in one tick aren't stale.
|
|
547
547
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -554,91 +554,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
554
554
|
}, [flexFilters]);
|
|
555
555
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
556
556
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
557
|
-
var
|
|
557
|
+
var _169 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _169[0], setFlexFiltersDebounced = _169[1];
|
|
558
558
|
// INFO: the filter rows of the export being set up — started from the
|
|
559
559
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var
|
|
560
|
+
var _170 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _170[0], setExportFlexFilters = _170[1];
|
|
561
|
+
var _171 = (0, react_1.useState)({}), flexFilterReferenceOptions = _171[0], setFlexFilterReferenceOptions = _171[1];
|
|
562
|
+
var _172 = (0, react_1.useState)({}), flexFilterReferenceSearch = _172[0], setFlexFilterReferenceSearch = _172[1];
|
|
563
|
+
var _173 = (0, react_1.useState)(false), flexFilterModalOpen = _173[0], setFlexFilterModalOpen = _173[1];
|
|
564
|
+
var _174 = (0, react_1.useState)(false), viewSettingsModalOpen = _174[0], setViewSettingsModalOpen = _174[1];
|
|
565
565
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
566
566
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
567
567
|
// structure to props.model whenever props change, which would wipe the
|
|
568
568
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
569
569
|
// structure — writing user hides there would blur the two concepts.
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
var
|
|
570
|
+
var _175 = (0, react_1.useState)((_3 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _3 !== void 0 ? _3 : []), userHiddenColumnIds = _175[0], setUserHiddenColumnIds = _175[1];
|
|
571
|
+
var _176 = (0, react_1.useState)(""), columnSearch = _176[0], setColumnSearch = _176[1];
|
|
572
|
+
var _177 = (0, react_1.useState)([]), savedViews = _177[0], setSavedViews = _177[1];
|
|
573
|
+
var _178 = (0, react_1.useState)(null), activeSavedViewId = _178[0], setActiveSavedViewId = _178[1];
|
|
574
574
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
575
|
-
var
|
|
575
|
+
var _179 = (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 = _179[0], setColumnWidths = _179[1];
|
|
576
576
|
// INFO: the columns the view on screen freezes at the left edge
|
|
577
|
-
var
|
|
577
|
+
var _180 = (0, react_1.useState)(function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.pinnedColumnIds; }), pinnedColumnIds = _180[0], setPinnedColumnIds = _180[1];
|
|
578
578
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
579
579
|
// so the defaults drawn before it never overwrite a person's own
|
|
580
|
-
var
|
|
580
|
+
var _181 = (0, react_1.useState)(false), isViewDraftReady = _181[0], setIsViewDraftReady = _181[1];
|
|
581
581
|
// INFO: null while the name box is closed
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
var
|
|
582
|
+
var _182 = (0, react_1.useState)(null), savedViewName = _182[0], setSavedViewName = _182[1];
|
|
583
|
+
var _183 = (0, react_1.useState)(null), deletingSavedViewId = _183[0], setDeletingSavedViewId = _183[1];
|
|
584
|
+
var _184 = (0, react_1.useState)(null), renamingSavedView = _184[0], setRenamingSavedView = _184[1];
|
|
585
|
+
var _185 = (0, react_1.useState)(false), isSavedViewsExpanded = _185[0], setIsSavedViewsExpanded = _185[1];
|
|
586
|
+
var _186 = (0, react_1.useState)(null), draggingColumnId = _186[0], setDraggingColumnId = _186[1];
|
|
587
587
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
588
588
|
//INFO : Used by Auth
|
|
589
|
-
var
|
|
589
|
+
var _187 = (0, react_1.useState)({
|
|
590
590
|
email: "",
|
|
591
591
|
google: "",
|
|
592
592
|
phone: "",
|
|
593
593
|
disabled: false,
|
|
594
594
|
create: false,
|
|
595
|
-
}), authMethods =
|
|
596
|
-
var
|
|
595
|
+
}), authMethods = _187[0], setAuthMethods = _187[1];
|
|
596
|
+
var _188 = (0, react_1.useState)(""), selectedAuthMethod = _188[0], setSelectedAuthMethod = _188[1];
|
|
597
597
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
598
598
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
599
|
-
var
|
|
599
|
+
var _189 = (0, react_1.useState)(false), authLoading = _189[0], setAuthLoading = _189[1];
|
|
600
600
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
601
601
|
// the state has rendered, and the state disables the confirm button
|
|
602
602
|
var deletingRef = (0, react_1.useRef)(false);
|
|
603
|
-
var
|
|
603
|
+
var _190 = (0, react_1.useState)(false), deleting = _190[0], setDeleting = _190[1];
|
|
604
604
|
// INFO: Used by Activity Log
|
|
605
|
-
var
|
|
606
|
-
var
|
|
605
|
+
var _191 = (0, react_1.useState)(false), activityModal = _191[0], setActivityModal = _191[1];
|
|
606
|
+
var _192 = (0, react_1.useState)(""), activityId = _192[0], setActivityId = _192[1];
|
|
607
607
|
//INFO : Used by Export
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
var
|
|
608
|
+
var _193 = (0, react_1.useState)(null), csvFile = _193[0], setCSVFile = _193[1];
|
|
609
|
+
var _194 = (0, react_1.useState)([]), csvFileData = _194[0], setCSVFileData = _194[1];
|
|
610
|
+
var _195 = (0, react_1.useState)(0), stepCSVIndex = _195[0], setStepCSVIndex = _195[1];
|
|
611
|
+
var _196 = (0, react_1.useState)({}), listCSVMapAttribute = _196[0], setListCSVMapAttribute = _196[1];
|
|
612
|
+
var _197 = (0, react_1.useState)({}), listCSVObjAttribute = _197[0], setListCSVObjAttribute = _197[1];
|
|
613
|
+
var _198 = (0, react_1.useState)([]), csvAPIAttribute = _198[0], setCSVAPIAttribute = _198[1];
|
|
614
|
+
var _199 = (0, react_1.useState)(((_4 = props.devSettings.currentUser) === null || _4 === void 0 ? void 0 : _4.userEmail) || ""), exportCSVEmail = _199[0], setExportCSVEmail = _199[1];
|
|
615
|
+
var _200 = (0, react_1.useState)(((_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.defaultExportPDFName) || ""), exportPDFTitle = _200[0], setExportPDFTitle = _200[1];
|
|
616
|
+
var _201 = (0, react_1.useState)(false), exportPDFLoading = _201[0], setExportPDFLoading = _201[1];
|
|
617
|
+
var _202 = (0, react_1.useState)(false), exportReadPDFLoading = _202[0], setExportReadPDFLoading = _202[1];
|
|
618
|
+
var _203 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.sumColumnId) !== null && _9 !== void 0 ? _9 : []), exportSumAttributeIds = _203[0], setExportSumAttributeIds = _203[1];
|
|
619
|
+
var _204 = (0, react_1.useState)((_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.exportSettings) === null || _11 === void 0 ? void 0 : _11.hideSubItems) !== null && _12 !== void 0 ? _12 : false), hideSubItems = _204[0], setHideSubItems = _204[1];
|
|
620
|
+
var _205 = (0, react_1.useState)([]), importTableData = _205[0], setImportTableData = _205[1];
|
|
621
|
+
var _206 = (0, react_1.useState)([]), queryList = _206[0], setQueryList = _206[1];
|
|
622
|
+
var _207 = (0, react_1.useState)(undefined), allQueryList = _207[0], setAllQueryList = _207[1];
|
|
623
623
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
624
624
|
// ungrouped, so it opens ungrouped
|
|
625
|
-
var
|
|
625
|
+
var _208 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
626
626
|
? persistedState.groupBy || undefined
|
|
627
|
-
: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId =
|
|
627
|
+
: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId = _208[0], setGroupId = _208[1];
|
|
628
628
|
// INFO: each group's total per number column, keyed by section id
|
|
629
|
-
var
|
|
629
|
+
var _209 = (0, react_1.useState)({}), groupSummaries = _209[0], setGroupSummaries = _209[1];
|
|
630
630
|
// INFO: each group's row count over every row the filters match; null until
|
|
631
631
|
// read. A band paged alone shows it until its own first page lands, and a
|
|
632
632
|
// band it counts empty is left out instead of waiting to be read
|
|
633
|
-
var
|
|
633
|
+
var _210 = (0, react_1.useState)(null), groupTotals = _210[0], setGroupTotals = _210[1];
|
|
634
634
|
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
635
|
-
var
|
|
635
|
+
var _211 = (0, react_1.useState)({}), commentCounts = _211[0], setCommentCounts = _211[1];
|
|
636
636
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
637
637
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
638
638
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
639
639
|
// next page as the user scrolls inside that band, independent of every other
|
|
640
640
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
641
|
-
var
|
|
641
|
+
var _212 = (0, react_1.useState)({}), groupPageState = _212[0], setGroupPageState = _212[1];
|
|
642
642
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
643
643
|
// in one tick do not re-fetch an already in-flight page.
|
|
644
644
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -653,62 +653,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
653
653
|
var groupLoadingKeyRef = (0, react_1.useRef)(null);
|
|
654
654
|
var groupLoadQueueRef = (0, react_1.useRef)([]);
|
|
655
655
|
var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
|
|
656
|
-
var
|
|
657
|
-
var
|
|
656
|
+
var _213 = (0, react_1.useState)(""), readTabSection = _213[0], setReadTabSection = _213[1];
|
|
657
|
+
var _214 = (0, react_1.useState)(false), readFloatingNav = _214[0], setReadFloatingNav = _214[1];
|
|
658
658
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
659
659
|
//INFO : Used by Read
|
|
660
660
|
//INFO : Used by Update
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
666
|
-
var
|
|
667
|
-
var
|
|
661
|
+
var _215 = (0, react_1.useState)(false), modalVisible = _215[0], setModalVisible = _215[1];
|
|
662
|
+
var _216 = (0, react_1.useState)(false), deleteModal = _216[0], setDeleteModal = _216[1];
|
|
663
|
+
var _217 = (0, react_1.useState)(false), excelModal = _217[0], setExcelModal = _217[1];
|
|
664
|
+
var _218 = (0, react_1.useState)(false), exportExcel = _218[0], setExportExcel = _218[1];
|
|
665
|
+
var _219 = (0, react_1.useState)(""), exportType = _219[0], setExportType = _219[1];
|
|
666
|
+
var _220 = (0, react_1.useState)(false), exportQR = _220[0], setExportQR = _220[1];
|
|
667
|
+
var _221 = (0, react_1.useState)(function () {
|
|
668
668
|
var _a, _b;
|
|
669
669
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
670
670
|
return firstTabId;
|
|
671
|
-
}), activeTab =
|
|
672
|
-
var
|
|
673
|
-
var
|
|
674
|
-
var
|
|
675
|
-
var
|
|
676
|
-
var
|
|
677
|
-
var
|
|
678
|
-
var
|
|
671
|
+
}), activeTab = _221[0], setActiveTab = _221[1];
|
|
672
|
+
var _222 = (0, react_1.useState)(false), signatureSigning = _222[0], setSignatureSigning = _222[1];
|
|
673
|
+
var _223 = (0, react_1.useState)({}), selectedData = _223[0], setSelectedData = _223[1];
|
|
674
|
+
var _224 = (0, react_1.useState)(""), selectedObjectStructureId = _224[0], setSelectedObjectStructureId = _224[1];
|
|
675
|
+
var _225 = (0, react_1.useState)(""), selectedObjectId = _225[0], setSelectedObjectId = _225[1];
|
|
676
|
+
var _226 = (0, react_1.useState)(""), selectedListAddressId = _226[0], setSelectedListAddressId = _226[1];
|
|
677
|
+
var _227 = (0, react_1.useState)(-1), selectedListAddressIndex = _227[0], setSelectedListAddressIndex = _227[1];
|
|
678
|
+
var _228 = (0, react_1.useState)({
|
|
679
679
|
lat: 0,
|
|
680
680
|
lng: 0,
|
|
681
681
|
name: "",
|
|
682
|
-
}), selectedListAddress =
|
|
683
|
-
var
|
|
684
|
-
var
|
|
685
|
-
var
|
|
686
|
-
var
|
|
687
|
-
var
|
|
688
|
-
var
|
|
682
|
+
}), selectedListAddress = _228[0], setSelectedListAddress = _228[1];
|
|
683
|
+
var _229 = (0, react_1.useState)({}), selectedObjectData = _229[0], setSelectedObjectData = _229[1];
|
|
684
|
+
var _230 = (0, react_1.useState)(null), objectCellEdit = _230[0], setObjectCellEdit = _230[1];
|
|
685
|
+
var _231 = (0, react_1.useState)(false), referenceLoading = _231[0], setReferenceLoading = _231[1];
|
|
686
|
+
var _232 = (0, react_1.useState)({}), referencesOptions = _232[0], setReferencesOptions = _232[1];
|
|
687
|
+
var _233 = (0, react_1.useState)({}), referencesDetails = _233[0], setReferencesDetails = _233[1];
|
|
688
|
+
var _234 = (0, react_1.useState)({}), listReferencesOptions = _234[0], setListReferencesOptions = _234[1];
|
|
689
689
|
// INFO: the referenced records themselves, for a table cell that picks from
|
|
690
690
|
// a list on one (referenceSelection)
|
|
691
|
-
var
|
|
692
|
-
var
|
|
693
|
-
var
|
|
694
|
-
var
|
|
695
|
-
var
|
|
691
|
+
var _235 = (0, react_1.useState)({}), listReferencesDetails = _235[0], setListReferencesDetails = _235[1];
|
|
692
|
+
var _236 = (0, react_1.useState)({}), referenceDeleteTableData = _236[0], setReferenceDeleteTableData = _236[1];
|
|
693
|
+
var _237 = (0, react_1.useState)([]), relatedSections = _237[0], setRelatedSections = _237[1];
|
|
694
|
+
var _238 = (0, react_1.useState)(0), referenceDeleteIndex = _238[0], setReferenceDeleteIndex = _238[1];
|
|
695
|
+
var _239 = (0, react_1.useState)({
|
|
696
696
|
id: "",
|
|
697
697
|
name: "",
|
|
698
698
|
type: "string",
|
|
699
|
-
}), referenceCreationModal =
|
|
700
|
-
var
|
|
701
|
-
var
|
|
699
|
+
}), referenceCreationModal = _239[0], setReferenceCreationModal = _239[1];
|
|
700
|
+
var _240 = (0, react_1.useState)({}), referenceModelSchema = _240[0], setReferenceSchema = _240[1];
|
|
701
|
+
var _241 = (0, react_1.useState)([]), kanbanChecked = _241[0], setKanbanChecked = _241[1];
|
|
702
702
|
//INFO : Offline
|
|
703
|
-
var
|
|
704
|
-
var
|
|
703
|
+
var _242 = (0, react_1.useState)(0), offlineDataLength = _242[0], setOfflineDataLength = _242[1];
|
|
704
|
+
var _243 = (0, react_1.useState)(false), offlineModal = _243[0], setOfflineModal = _243[1];
|
|
705
705
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
706
|
-
var
|
|
707
|
-
var
|
|
706
|
+
var _244 = (0, react_1.useState)(false), isLive = _244[0], setIsLive = _244[1];
|
|
707
|
+
var _245 = (0, react_1.useState)(false), isLiveOffline = _245[0], setIsLiveOffline = _245[1];
|
|
708
708
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
709
709
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
710
710
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
711
|
-
var
|
|
711
|
+
var _246 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _246[0], setIsNetworkOffline = _246[1];
|
|
712
712
|
var previousType = (0, react_1.useRef)(null);
|
|
713
713
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
714
714
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -1036,7 +1036,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1036
1036
|
var isSchemaHideMode = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.onChangeHide) ? true : false;
|
|
1037
1037
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1038
1038
|
// the persisted value and falls back to the consumer's limit
|
|
1039
|
-
var
|
|
1039
|
+
var _247 = (0, react_1.useState)((_27 = (_26 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _26 !== void 0 ? _26 : props.limit) !== null && _27 !== void 0 ? _27 : 10), pageLimit = _247[0], setPageLimit = _247[1];
|
|
1040
1040
|
var limit = pageLimit;
|
|
1041
1041
|
var isSavedViewsEnabled = !!((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.savedViews) && resolvedType === "list";
|
|
1042
1042
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
@@ -1084,13 +1084,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1084
1084
|
// INFO: a referenced record and related rows are joined by MongoWrapper's
|
|
1085
1085
|
// lookups and a list row is matched by its Mongo path — neither Firebase nor
|
|
1086
1086
|
// a union read runs them
|
|
1087
|
-
|
|
1087
|
+
// INFO: a people filter's "me" needs only who is signed in, which any
|
|
1088
|
+
// backend can match
|
|
1089
|
+
var currentUserId = (_34 = props.devSettings.currentUser) === null || _34 === void 0 ? void 0 : _34.userId;
|
|
1090
|
+
var flexFilterExtras = !isFirebase && !((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.unionCollections) === null || _36 === void 0 ? void 0 : _36.length)
|
|
1088
1091
|
? {
|
|
1089
|
-
references: (
|
|
1090
|
-
listObjects: (
|
|
1091
|
-
related: (
|
|
1092
|
+
references: (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareFlexFilterReferences,
|
|
1093
|
+
listObjects: (_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareFlexFilterListObjects,
|
|
1094
|
+
related: (_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareFlexFilterRelated,
|
|
1095
|
+
currentUserId: currentUserId,
|
|
1092
1096
|
}
|
|
1093
|
-
:
|
|
1097
|
+
: currentUserId
|
|
1098
|
+
? { currentUserId: currentUserId }
|
|
1099
|
+
: undefined;
|
|
1094
1100
|
// INFO: a formula filter is matched in the browser and the rest on the
|
|
1095
1101
|
// server, so a group is split between them: a group of formula filters
|
|
1096
1102
|
// only still matches any of them here, while a formula filter grouped with
|
|
@@ -1177,18 +1183,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1177
1183
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1178
1184
|
};
|
|
1179
1185
|
};
|
|
1180
|
-
var
|
|
1181
|
-
var isEditor = ((
|
|
1182
|
-
var isOffline = (
|
|
1186
|
+
var _248 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _248.canUpdateRecord, canInlineUpdate = _248.canInlineUpdate, canBatchUpdate = _248.canBatchUpdate, canDeleteRecord = _248.canDeleteRecord;
|
|
1187
|
+
var isEditor = ((_40 = props.edit) === null || _40 === void 0 ? void 0 : _40.allEditable) ? true : false;
|
|
1188
|
+
var isOffline = (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareOffline;
|
|
1183
1189
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1184
1190
|
// the live network state — online saves go to the server even if bareOffline
|
|
1185
1191
|
// is true, offline saves go to IDB as normal.
|
|
1186
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1187
|
-
var showId = (
|
|
1192
|
+
var isOfflineNetworkListener = isOffline && ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareOfflineNetworkListener);
|
|
1193
|
+
var showId = (_43 = props.space) === null || _43 === void 0 ? void 0 : _43.showId;
|
|
1188
1194
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1189
|
-
var idField = ((
|
|
1190
|
-
var pipeline = (
|
|
1191
|
-
if ((
|
|
1195
|
+
var idField = ((_44 = props.space) === null || _44 === void 0 ? void 0 : _44.idField) || ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.idField);
|
|
1196
|
+
var pipeline = (_46 = props === null || props === void 0 ? void 0 : props.space) === null || _46 === void 0 ? void 0 : _46.pipeline;
|
|
1197
|
+
if ((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListPipeline) {
|
|
1192
1198
|
pipeline = pipeline
|
|
1193
1199
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1194
1200
|
}
|
|
@@ -1201,24 +1207,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1201
1207
|
* three records came back instead of five files, and each tile received the
|
|
1202
1208
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1203
1209
|
*/
|
|
1204
|
-
var fileViewColumnId = (
|
|
1210
|
+
var fileViewColumnId = (_51 = (_50 = ((_49 = (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.extendedTabs) !== null && _49 !== void 0 ? _49 : []).find(function (eachTab) {
|
|
1205
1211
|
return eachTab.viewType === "file" &&
|
|
1206
1212
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1207
|
-
})) === null ||
|
|
1208
|
-
var hasNavigation = ((
|
|
1213
|
+
})) === null || _50 === void 0 ? void 0 : _50.fileSettings) === null || _51 === void 0 ? void 0 : _51.columnId;
|
|
1214
|
+
var hasNavigation = ((_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.handleNavigate) ? true : false;
|
|
1209
1215
|
var formColumn = "grid-cols-12";
|
|
1210
|
-
var useMobileView = (
|
|
1216
|
+
var useMobileView = (_54 = (_53 = props.bareSettings) === null || _53 === void 0 ? void 0 : _53.bareUpdateMobileView) !== null && _54 !== void 0 ? _54 : false;
|
|
1211
1217
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1212
|
-
var isActivityLog = (((
|
|
1213
|
-
((
|
|
1214
|
-
(((
|
|
1215
|
-
((
|
|
1216
|
-
var customPaginationSize = ((
|
|
1218
|
+
var isActivityLog = (((_56 = (_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.activityLog) === null || _56 === void 0 ? void 0 : _56.enableComments) &&
|
|
1219
|
+
((_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.activityLog.commentCollectionId)) ||
|
|
1220
|
+
(((_59 = (_58 = props.edit) === null || _58 === void 0 ? void 0 : _58.activityLog) === null || _59 === void 0 ? void 0 : _59.enableLogs) &&
|
|
1221
|
+
((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.activityLog.logsCollectionId));
|
|
1222
|
+
var customPaginationSize = ((_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.customPaginationCount)
|
|
1217
1223
|
? props.organise.customPaginationCount(size)
|
|
1218
1224
|
: undefined;
|
|
1219
1225
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1220
1226
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1221
|
-
dbModule: (
|
|
1227
|
+
dbModule: (_62 = props.lib) === null || _62 === void 0 ? void 0 : _62.axios,
|
|
1222
1228
|
dbType: devSettings.server,
|
|
1223
1229
|
dbCollection: props.collectionId,
|
|
1224
1230
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1226,7 +1232,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1226
1232
|
dbUserToken: devSettings.dbUserToken,
|
|
1227
1233
|
});
|
|
1228
1234
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1229
|
-
dbModule: (
|
|
1235
|
+
dbModule: (_63 = props.lib) === null || _63 === void 0 ? void 0 : _63.axios,
|
|
1230
1236
|
dbType: devSettings.server,
|
|
1231
1237
|
dbCollection: props.collectionId,
|
|
1232
1238
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1234,12 +1240,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1234
1240
|
dbUserToken: devSettings.dbUserToken,
|
|
1235
1241
|
});
|
|
1236
1242
|
var moreButtonPopUp = [
|
|
1237
|
-
((
|
|
1243
|
+
((_64 = props.edit) === null || _64 === void 0 ? void 0 : _64.allEditable) &&
|
|
1238
1244
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1239
1245
|
// datasheet served through one can import; only the browser-direct
|
|
1240
1246
|
// Firebase client has no server to import through
|
|
1241
1247
|
!isFirebaseClient &&
|
|
1242
|
-
!((
|
|
1248
|
+
!((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideImportCSV)
|
|
1243
1249
|
? {
|
|
1244
1250
|
text: "Import Excel",
|
|
1245
1251
|
onClick: function () {
|
|
@@ -1248,7 +1254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1248
1254
|
},
|
|
1249
1255
|
}
|
|
1250
1256
|
: null,
|
|
1251
|
-
!((
|
|
1257
|
+
!((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportCSV)
|
|
1252
1258
|
? {
|
|
1253
1259
|
text: "Export CSV",
|
|
1254
1260
|
onClick: function () {
|
|
@@ -1258,7 +1264,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1258
1264
|
},
|
|
1259
1265
|
}
|
|
1260
1266
|
: null,
|
|
1261
|
-
!((
|
|
1267
|
+
!((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportExcel)
|
|
1262
1268
|
? {
|
|
1263
1269
|
text: "Export Excel",
|
|
1264
1270
|
onClick: function () {
|
|
@@ -1268,7 +1274,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1268
1274
|
},
|
|
1269
1275
|
}
|
|
1270
1276
|
: null,
|
|
1271
|
-
!((
|
|
1277
|
+
!((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportPDF)
|
|
1272
1278
|
? {
|
|
1273
1279
|
text: "Export PDF",
|
|
1274
1280
|
onClick: function () {
|
|
@@ -1278,7 +1284,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1278
1284
|
},
|
|
1279
1285
|
}
|
|
1280
1286
|
: null,
|
|
1281
|
-
!((
|
|
1287
|
+
!((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportQR)
|
|
1282
1288
|
? {
|
|
1283
1289
|
text: "Export QR",
|
|
1284
1290
|
onClick: function () {
|
|
@@ -1288,7 +1294,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1288
1294
|
},
|
|
1289
1295
|
}
|
|
1290
1296
|
: null,
|
|
1291
|
-
!((
|
|
1297
|
+
!((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideExportQR)
|
|
1292
1298
|
? {
|
|
1293
1299
|
text: "Export QR(Data)",
|
|
1294
1300
|
onClick: function () {
|
|
@@ -1298,7 +1304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1298
1304
|
},
|
|
1299
1305
|
}
|
|
1300
1306
|
: null,
|
|
1301
|
-
!((
|
|
1307
|
+
!((_78 = (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.exportSettings) === null || _78 === void 0 ? void 0 : _78.hideExportPrint)
|
|
1302
1308
|
? {
|
|
1303
1309
|
text: "Print",
|
|
1304
1310
|
onClick: function () {
|
|
@@ -1310,8 +1316,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1310
1316
|
: null,
|
|
1311
1317
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1312
1318
|
// nothing to find on any other page
|
|
1313
|
-
((
|
|
1314
|
-
!((
|
|
1319
|
+
((_79 = props.edit) === null || _79 === void 0 ? void 0 : _79.enableUpdateDraft) &&
|
|
1320
|
+
!((_81 = (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.exportSettings) === null || _81 === void 0 ? void 0 : _81.hideExportDraft)
|
|
1315
1321
|
? {
|
|
1316
1322
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1317
1323
|
onClick: function () {
|
|
@@ -1320,7 +1326,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1320
1326
|
}
|
|
1321
1327
|
: null,
|
|
1322
1328
|
].filter(Boolean);
|
|
1323
|
-
if ((
|
|
1329
|
+
if ((_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.moreSettings)
|
|
1324
1330
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1325
1331
|
//=====================================================================================
|
|
1326
1332
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1688,6 +1694,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1688
1694
|
}
|
|
1689
1695
|
}
|
|
1690
1696
|
}
|
|
1697
|
+
// INFO: a sort on a linked record's field needs that record joined in,
|
|
1698
|
+
// which a condition every row passes carries to the server
|
|
1699
|
+
var linkedSort = (0, flexFilter_1.handleResolveReferenceSort)(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId, structure, flexFilterExtras);
|
|
1700
|
+
if (linkedSort)
|
|
1701
|
+
query = __spreadArray(__spreadArray([], (query !== null && query !== void 0 ? query : []), true), [linkedSort.lookup], false);
|
|
1691
1702
|
// INFO: a search shares the server's single $or with flex OR groups, so it
|
|
1692
1703
|
// is folded into their blocks; Firestore has no OR to fold into
|
|
1693
1704
|
return query && !isFirebase ? (0, flexFilter_1.handleMergeOrQueries)(query) : query;
|
|
@@ -1760,14 +1771,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1760
1771
|
//=====================================================================================
|
|
1761
1772
|
//SECTION: Saved Views
|
|
1762
1773
|
//=====================================================================================
|
|
1763
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1774
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.persistKey, (_84 = devSettings.currentUser) === null || _84 === void 0 ? void 0 : _84.userEmail);
|
|
1764
1775
|
(0, react_1.useEffect)(function () {
|
|
1765
1776
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1766
1777
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1767
1778
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1768
1779
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1769
1780
|
// browser until the person updates the view for everyone or resets it
|
|
1770
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1781
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.allView) !== undefined;
|
|
1771
1782
|
var handleGetViewDraftKey = function (viewId) {
|
|
1772
1783
|
var _a, _b;
|
|
1773
1784
|
return (0, viewStatePersistence_1.buildViewDraftKey)(props.collectionId, viewId !== null && viewId !== void 0 ? viewId : "all", (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistKey, (_b = devSettings.currentUser) === null || _b === void 0 ? void 0 : _b.userEmail);
|
|
@@ -1851,7 +1862,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1851
1862
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1852
1863
|
(0, react_1.useEffect)(function () {
|
|
1853
1864
|
lastSentSharedViewsRef.current = null;
|
|
1854
|
-
}, [(
|
|
1865
|
+
}, [(_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.sharedViews]);
|
|
1855
1866
|
var handleStoreSharedViews = function (update) {
|
|
1856
1867
|
var _a, _b, _c;
|
|
1857
1868
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1896,13 +1907,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1896
1907
|
/* eslint-disable */
|
|
1897
1908
|
}, [
|
|
1898
1909
|
isSavedViewsEnabled,
|
|
1899
|
-
(
|
|
1900
|
-
(
|
|
1901
|
-
(
|
|
1910
|
+
(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.initialSavedViewId,
|
|
1911
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.defaultSavedViewId,
|
|
1912
|
+
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.sharedViews,
|
|
1902
1913
|
savedViews,
|
|
1903
1914
|
]);
|
|
1904
1915
|
/* eslint-enable */
|
|
1905
|
-
var defaultSavedViewIds = ((
|
|
1916
|
+
var defaultSavedViewIds = ((_91 = (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.defaultSavedViews) !== null && _91 !== void 0 ? _91 : [])
|
|
1906
1917
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1907
1918
|
.join("|");
|
|
1908
1919
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -2232,8 +2243,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2232
2243
|
groupId,
|
|
2233
2244
|
columnWidths,
|
|
2234
2245
|
pinnedColumnIds,
|
|
2235
|
-
(
|
|
2236
|
-
(
|
|
2246
|
+
(_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.allView,
|
|
2247
|
+
(_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.sharedViews,
|
|
2237
2248
|
savedViews,
|
|
2238
2249
|
]);
|
|
2239
2250
|
/* eslint-enable */
|
|
@@ -2273,7 +2284,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2273
2284
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
2274
2285
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
2275
2286
|
/* eslint-disable */
|
|
2276
|
-
}, [props.collectionId, (
|
|
2287
|
+
}, [props.collectionId, (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.persistKey]);
|
|
2277
2288
|
/* eslint-enable */
|
|
2278
2289
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2279
2290
|
(0, react_1.useEffect)(function () {
|
|
@@ -2308,7 +2319,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2308
2319
|
(0, react_1.useEffect)(function () {
|
|
2309
2320
|
handleOfflinePrefetch();
|
|
2310
2321
|
/* eslint-disable */
|
|
2311
|
-
}, [props.collectionId, (
|
|
2322
|
+
}, [props.collectionId, (_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.bareOffline]);
|
|
2312
2323
|
/* eslint-enable */
|
|
2313
2324
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2314
2325
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2328,7 +2339,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2328
2339
|
}, interval);
|
|
2329
2340
|
return function () { return clearInterval(timer); };
|
|
2330
2341
|
/* eslint-disable */
|
|
2331
|
-
}, [(
|
|
2342
|
+
}, [(_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.barePollingInterval, isLive, isNetworkOffline]);
|
|
2332
2343
|
/* eslint-enable */
|
|
2333
2344
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2334
2345
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2370,7 +2381,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2370
2381
|
};
|
|
2371
2382
|
/* eslint-disable */
|
|
2372
2383
|
}, [
|
|
2373
|
-
(
|
|
2384
|
+
(_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.bareSocketName,
|
|
2374
2385
|
props.collectionId,
|
|
2375
2386
|
props.devSettings.sseEndpoint,
|
|
2376
2387
|
props.devSettings.dbAPIToken,
|
|
@@ -2644,10 +2655,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2644
2655
|
props.collectionId,
|
|
2645
2656
|
props.model,
|
|
2646
2657
|
props.localURLEndpoint,
|
|
2647
|
-
(
|
|
2658
|
+
(_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.extendedTabs,
|
|
2648
2659
|
listViewId,
|
|
2649
|
-
(
|
|
2650
|
-
(
|
|
2660
|
+
(_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.additionalQuery,
|
|
2661
|
+
(_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.groupBy,
|
|
2651
2662
|
resolvedType,
|
|
2652
2663
|
]);
|
|
2653
2664
|
/**
|
|
@@ -2799,7 +2810,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2799
2810
|
};
|
|
2800
2811
|
}, 100);
|
|
2801
2812
|
return function () { return clearTimeout(timeoutId); };
|
|
2802
|
-
}, [(
|
|
2813
|
+
}, [(_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2803
2814
|
(0, react_1.useEffect)(function () {
|
|
2804
2815
|
if (resolvedType !== "read")
|
|
2805
2816
|
return;
|
|
@@ -3283,9 +3294,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3283
3294
|
var sort = (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) && formulaColumnIds.includes(activeSortId.sortId)
|
|
3284
3295
|
? undefined
|
|
3285
3296
|
: activeSortId || undefined;
|
|
3297
|
+
// INFO: a linked record's field sorts on the joined record, whose lookup
|
|
3298
|
+
// renderImpSearchFilterConditions adds to the query
|
|
3299
|
+
var linkedSort = (0, flexFilter_1.handleResolveReferenceSort)(sort === null || sort === void 0 ? void 0 : sort.sortId, structure, flexFilterExtras);
|
|
3300
|
+
if (sort && linkedSort)
|
|
3301
|
+
sort = __assign(__assign({}, sort), { sortId: linkedSort.sortId });
|
|
3286
3302
|
// INFO: a date range sorts on its start, a timer on its total and the
|
|
3287
3303
|
// Record ID column on the record's own id
|
|
3288
|
-
if (sort === null || sort === void 0 ? void 0 : sort.sortId) {
|
|
3304
|
+
else if (sort === null || sort === void 0 ? void 0 : sort.sortId) {
|
|
3289
3305
|
var sortColumn = structure.find(function (each) { return each.id === (sort === null || sort === void 0 ? void 0 : sort.sortId); });
|
|
3290
3306
|
if ((sortColumn === null || sortColumn === void 0 ? void 0 : sortColumn.type) === "dateRange")
|
|
3291
3307
|
sort = __assign(__assign({}, sort), { sortId: (0, dateRange_1.handleGetDateRangeQueryId)(sortColumn.id) });
|
|
@@ -5945,7 +5961,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5945
5961
|
var columnTypeActions = {
|
|
5946
5962
|
canUpdate: canUpdateRecord,
|
|
5947
5963
|
dateWarnings: isDateWarnings,
|
|
5948
|
-
onButtonClick: (
|
|
5964
|
+
onButtonClick: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.onButtonClick,
|
|
5949
5965
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5950
5966
|
var _a;
|
|
5951
5967
|
return __generator(this, function (_b) {
|
|
@@ -5962,7 +5978,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5962
5978
|
}
|
|
5963
5979
|
});
|
|
5964
5980
|
}); },
|
|
5965
|
-
onTimeTrackingAction: ((
|
|
5981
|
+
onTimeTrackingAction: ((_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.onTimeTrackingAction) && canUpdateRecord
|
|
5966
5982
|
? function (rowId, columnId, action) {
|
|
5967
5983
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5968
5984
|
}
|
|
@@ -8149,14 +8165,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8149
8165
|
react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Sort"),
|
|
8150
8166
|
react_1.default.createElement("div", { className: "mt-1 flex flex-row items-center gap-x-2" },
|
|
8151
8167
|
react_1.default.createElement("div", { className: "grow min-w-0" },
|
|
8152
|
-
react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-column", portalDropdown: true, label: "", containerClassName: "min-w-0", value: (_b = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _b !== void 0 ? _b : "", placeholder: "Column", darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, options: viewColumns
|
|
8153
|
-
.filter(function (eachColumn) {
|
|
8168
|
+
react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-column", portalDropdown: true, label: "", containerClassName: "min-w-0", value: (_b = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _b !== void 0 ? _b : "", placeholder: "Column", darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, options: __spreadArray(__spreadArray([], viewColumns.filter(function (eachColumn) {
|
|
8154
8169
|
return (isFormulaViewSupported ||
|
|
8155
8170
|
eachColumn.type !== "formula") &&
|
|
8156
8171
|
(0, lookup_1.handleIsQueryableColumn)(eachColumn) &&
|
|
8157
8172
|
!utils_1.NON_SORT_COLUMN_DATA_TYPES.includes(eachColumn.type);
|
|
8158
|
-
})
|
|
8159
|
-
.
|
|
8173
|
+
}), true), ((flexFilterExtras === null || flexFilterExtras === void 0 ? void 0 : flexFilterExtras.references)
|
|
8174
|
+
? flexFilterStructure.filter(function (eachColumn) {
|
|
8175
|
+
return eachColumn.id.includes(">") &&
|
|
8176
|
+
!utils_1.NON_SORT_COLUMN_DATA_TYPES.includes(eachColumn.type);
|
|
8177
|
+
})
|
|
8178
|
+
: []), true).map(function (eachColumn) {
|
|
8160
8179
|
var _a;
|
|
8161
8180
|
return ({
|
|
8162
8181
|
key: eachColumn.id,
|
|
@@ -8205,8 +8224,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
8205
8224
|
: rows;
|
|
8206
8225
|
};
|
|
8207
8226
|
/* eslint-disable */
|
|
8208
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
8209
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
8227
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_104 = props.bareSettings) === null || _104 === void 0 ? void 0 : _104.bareNewDTW]);
|
|
8228
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_105 = props.bareSettings) === null || _105 === void 0 ? void 0 : _105.bareNewDTW]);
|
|
8210
8229
|
/* eslint-enable */
|
|
8211
8230
|
// INFO: beside a record's title, the pencil opens its edit form for whoever
|
|
8212
8231
|
// may update, and the bubble opens comments and logs for anyone who can see
|
|
@@ -12611,14 +12630,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12611
12630
|
};
|
|
12612
12631
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
12613
12632
|
renderNotification("root"),
|
|
12614
|
-
((
|
|
12633
|
+
((_107 = (_106 = props.renderSettings) === null || _106 === void 0 ? void 0 : _106.renderLoadingUI) === null || _107 === void 0 ? void 0 : _107.call(_106)) && loading ? ((_108 = props.renderSettings) === null || _108 === void 0 ? void 0 : _108.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
12615
12634
|
var _a, _b;
|
|
12616
12635
|
if (loading)
|
|
12617
12636
|
return;
|
|
12618
12637
|
handlePopUpModal(false);
|
|
12619
12638
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
12620
12639
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
12621
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12640
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkMode, darkModeBg: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
12622
12641
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
12623
12642
|
if (dataId) {
|
|
12624
12643
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -12634,19 +12653,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12634
12653
|
}, onClose: function () {
|
|
12635
12654
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
12636
12655
|
} }),
|
|
12637
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12656
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkMode, darkModeBg: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
12638
12657
|
setReferenceDeleteTableData({});
|
|
12639
12658
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12640
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12659
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkMode, darkModeBg: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
12641
12660
|
setDeletePasscodeInput("");
|
|
12642
12661
|
setDeleteModal(!deleteModal);
|
|
12643
12662
|
setDeleteFeedId("");
|
|
12644
12663
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12645
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12664
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkMode, darkModeBg: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
12646
12665
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
12647
12666
|
setBatchUpdateModal(false);
|
|
12648
12667
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
12649
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12668
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_119 = props.organise) === null || _119 === void 0 ? void 0 : _119.darkMode, darkModeBg: (_120 = props.organise) === null || _120 === void 0 ? void 0 : _120.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
12650
12669
|
var _a, _b;
|
|
12651
12670
|
if (props.space)
|
|
12652
12671
|
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 }));
|
|
@@ -12662,18 +12681,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12662
12681
|
(0, react_dom_1.createPortal)(
|
|
12663
12682
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
12664
12683
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
12665
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
12684
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkMode, darkModeBg: (_122 = props.organise) === null || _122 === void 0 ? void 0 : _122.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
12666
12685
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
12667
12686
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
12668
12687
|
// toolbar's collection-wide button clears it when it opens.
|
|
12669
12688
|
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"
|
|
12670
12689
|
? props.title
|
|
12671
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
12690
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_123 = props.id) !== null && _123 !== void 0 ? _123 : "") : activityId, activityLog: (_124 = props.edit) === null || _124 === void 0 ? void 0 : _124.activityLog,
|
|
12672
12691
|
// INFO: names the record in the drawer's heading; without it
|
|
12673
12692
|
// the lookup reads a "title" field most datasheets lack and
|
|
12674
12693
|
// the heading shows the record's id. A title or name column
|
|
12675
12694
|
// comes first, then the first text column
|
|
12676
|
-
recordTitleColumn: (
|
|
12695
|
+
recordTitleColumn: (_127 = ((_126 = (_125 = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _125 !== void 0 ? _125 : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _126 !== void 0 ? _126 : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _127 === void 0 ? void 0 : _127.id, model: structure }) })), document.body),
|
|
12677
12696
|
renderScrollSentinel()));
|
|
12678
12697
|
});
|
|
12679
12698
|
//# sourceMappingURL=index.js.map
|