blixify-ui-web 1.3.44 → 1.3.47
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/activityModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/activityModal.js +6 -13
- package/lib/components/data/dataTemplate/activityModal.js.map +1 -1
- package/lib/components/data/dataTemplate/commentMarkdown.d.ts +14 -0
- package/lib/components/data/dataTemplate/commentMarkdown.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/commentMarkdown.js +181 -0
- package/lib/components/data/dataTemplate/commentMarkdown.js.map +1 -0
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +421 -366
- 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/readViewIds.d.ts +2 -0
- package/lib/components/data/dataTemplate/readViewIds.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/readViewIds.js +8 -0
- package/lib/components/data/dataTemplate/readViewIds.js.map +1 -0
- package/lib/components/data/dataTemplate/relatedRecords.d.ts +3 -1
- package/lib/components/data/dataTemplate/relatedRecords.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/relatedRecords.js +20 -2
- package/lib/components/data/dataTemplate/relatedRecords.js.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts +1 -0
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +5 -0
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/display/newGrid/index.d.ts +1 -0
- package/lib/components/display/newGrid/index.d.ts.map +1 -1
- package/lib/components/display/newGrid/index.js +1 -1
- package/lib/components/display/newGrid/index.js.map +1 -1
- package/lib/components/display/newKanban/index.d.ts +1 -0
- package/lib/components/display/newKanban/index.d.ts.map +1 -1
- package/lib/components/display/newKanban/index.js +1 -1
- package/lib/components/display/newKanban/index.js.map +1 -1
- package/lib/components/display/newList/index.d.ts +1 -0
- package/lib/components/display/newList/index.d.ts.map +1 -1
- package/lib/components/display/newList/index.js +2 -2
- package/lib/components/display/newList/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +4 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +3 -3
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/recordActions/index.d.ts +2 -0
- package/lib/components/display/recordActions/index.d.ts.map +1 -1
- package/lib/components/display/recordActions/index.js +6 -4
- package/lib/components/display/recordActions/index.js.map +1 -1
- package/lib/components/input/markdown/index.d.ts +5 -0
- package/lib/components/input/markdown/index.d.ts.map +1 -1
- package/lib/components/input/markdown/index.js +39 -1
- package/lib/components/input/markdown/index.js.map +1 -1
- package/lib/tail.css +2 -2
- package/package.json +1 -1
|
@@ -177,6 +177,7 @@ var settingsModal_1 = require("./settingsModal");
|
|
|
177
177
|
var chartView_1 = require("./chartView");
|
|
178
178
|
var referenceScan_1 = require("./referenceScan");
|
|
179
179
|
var relatedRecords_1 = require("./relatedRecords");
|
|
180
|
+
var readViewIds_1 = require("./readViewIds");
|
|
180
181
|
var flexFilter_1 = require("../flexFilter");
|
|
181
182
|
var timelineBars_1 = require("./timelineBars");
|
|
182
183
|
var viewStatePersistence_1 = require("./viewStatePersistence");
|
|
@@ -279,7 +280,7 @@ var DELETE_BLOCKED_ROWS = 50;
|
|
|
279
280
|
var BATCH_UPDATE_QUERY_TYPES = ["=", "!=", ">", "<", "in", "!in"];
|
|
280
281
|
var DELETE_ID_CHUNK = 1000;
|
|
281
282
|
exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
282
|
-
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, _128, _129, _130, _131, _132, _133;
|
|
283
|
+
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, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137;
|
|
283
284
|
// INFO: every view draws a lookup as its source column's type, read-only, so
|
|
284
285
|
// no type branch below meets "lookup"; rawProps.model keeps the lookups as
|
|
285
286
|
// stored for the columns handed back to the host
|
|
@@ -298,7 +299,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
298
299
|
// the list never refetching while the panel is open, which fails silently.
|
|
299
300
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
300
301
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
301
|
-
var
|
|
302
|
+
var _138 = (0, react_1.useState)(false), drawerPageView = _138[0], setDrawerPageView = _138[1];
|
|
302
303
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
303
304
|
// live props. Without this, navigating back to the list would re-render the
|
|
304
305
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -323,17 +324,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
323
324
|
// INFO: the view in the url belongs to the record while its panel is open. A
|
|
324
325
|
// list following it through the record's tabs cleared its rows and page and
|
|
325
326
|
// read them again behind the panel, so it keeps the view it was opened on.
|
|
326
|
-
// INFO: a related tab is a view of one record, never of the list
|
|
327
|
-
// that keeps the last view it was handed when the
|
|
328
|
-
// the list on that tab, where it draws nothing, so
|
|
329
|
-
// view it was last on until the host names a list view
|
|
330
|
-
|
|
331
|
-
var
|
|
327
|
+
// INFO: a related tab is a view of one record, never of the list, and so is
|
|
328
|
+
// the activity tab. A host that keeps the last view it was handed when the
|
|
329
|
+
// panel closes would leave the list on that tab, where it draws nothing, so
|
|
330
|
+
// the list stays on the view it was last on until the host names a list view
|
|
331
|
+
// again.
|
|
332
|
+
var isRelatedViewId = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) === null || _f === void 0 ? void 0 : _f.startsWith(RELATED_VIEW_PREFIX)) ||
|
|
333
|
+
((_g = props.organise) === null || _g === void 0 ? void 0 : _g.viewId) === readViewIds_1.ACTIVITY_VIEW_ID;
|
|
334
|
+
var hostedListViewIdRef = (0, react_1.useRef)(isRelatedViewId ? undefined : (_h = props.organise) === null || _h === void 0 ? void 0 : _h.viewId);
|
|
332
335
|
if (!isDrawerHost && !isRelatedViewId)
|
|
333
|
-
hostedListViewIdRef.current = (
|
|
336
|
+
hostedListViewIdRef.current = (_j = props.organise) === null || _j === void 0 ? void 0 : _j.viewId;
|
|
334
337
|
var listViewId = isDrawerHost || (resolvedType === "list" && isRelatedViewId)
|
|
335
338
|
? hostedListViewIdRef.current
|
|
336
|
-
: (
|
|
339
|
+
: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.viewId;
|
|
337
340
|
// INFO: the route has already gone back to the list while the panel slides out,
|
|
338
341
|
// so it keeps drawing what it was opened as until it is gone
|
|
339
342
|
var drawerFormRef = (0, react_1.useRef)(false);
|
|
@@ -356,7 +359,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
356
359
|
drawerFormEditedRef.current = false;
|
|
357
360
|
}
|
|
358
361
|
drawerOpenRef.current = isDrawerHost;
|
|
359
|
-
var
|
|
362
|
+
var _139 = (0, react_1.useState)(false), drawerDiscardModal = _139[0], setDrawerDiscardModal = _139[1];
|
|
360
363
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
361
364
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
362
365
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -441,7 +444,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
441
444
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
442
445
|
};
|
|
443
446
|
};
|
|
444
|
-
var
|
|
447
|
+
var _140 = intialiseDefaultFilterValues(), initialFilterSearch = _140.initialFilterSearch, initialFilterSearchParams = _140.initialFilterSearchParams, initialFilterSelection = _140.initialFilterSelection, initialFilterReference = _140.initialFilterReference, initialFilterReferenceDate = _140.initialFilterReferenceDate;
|
|
445
448
|
// INFO: organise.initialSearch fills the Quick find box, which sends its
|
|
446
449
|
// value under "search". Without that box (hideSearch, Firebase, or a
|
|
447
450
|
// "search" query taking its place) there is nothing to fill
|
|
@@ -457,11 +460,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
457
460
|
// keyword: All's columns and sort, no stored filters, and nothing this
|
|
458
461
|
// person kept in the browser (view drafts, persistViewState) is read or
|
|
459
462
|
// written — until they pick a view, which is their own choice again
|
|
460
|
-
var
|
|
463
|
+
var _141 = (0, react_1.useState)(function () {
|
|
461
464
|
var _a, _b, _c;
|
|
462
465
|
return handleCanInitialSearch((_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) ||
|
|
463
466
|
!!((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.linkFlexFilters) === null || _c === void 0 ? void 0 : _c.length);
|
|
464
|
-
}), isLinkOpen =
|
|
467
|
+
}), isLinkOpen = _141[0], setIsLinkOpen = _141[1];
|
|
465
468
|
var handleSeedInitialSearch = function (params) {
|
|
466
469
|
var _a;
|
|
467
470
|
return isLinkOpen &&
|
|
@@ -470,12 +473,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
470
473
|
? __assign(__assign({}, params), { search: props.organise.initialSearch }) : params;
|
|
471
474
|
};
|
|
472
475
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
473
|
-
var
|
|
474
|
-
mode: isLinkOpen ? undefined : (
|
|
476
|
+
var _142 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
477
|
+
mode: isLinkOpen ? undefined : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistViewState,
|
|
475
478
|
collectionId: props.collectionId,
|
|
476
|
-
persistKey: (
|
|
479
|
+
persistKey: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.persistKey,
|
|
477
480
|
type: resolvedType,
|
|
478
|
-
}), rawPersistedState =
|
|
481
|
+
}), rawPersistedState = _142.persistedState, isPersistEnabled = _142.isEnabled, handleSaveView = _142.handleSaveView, handleRegisterViewSnapshot = _142.handleRegisterViewSnapshot;
|
|
479
482
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
480
483
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
481
484
|
var _a, _b, _c, _d;
|
|
@@ -487,12 +490,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
487
490
|
}, [
|
|
488
491
|
rawPersistedState,
|
|
489
492
|
props.model,
|
|
490
|
-
(
|
|
491
|
-
(
|
|
492
|
-
(
|
|
493
|
+
(_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterReferences,
|
|
494
|
+
(_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterListObjects,
|
|
495
|
+
(_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareFlexFilterRelated,
|
|
493
496
|
]);
|
|
494
|
-
var
|
|
495
|
-
var
|
|
497
|
+
var _143 = (0, react_1.useState)(false), loading = _143[0], setLoading = _143[1];
|
|
498
|
+
var _144 = (0, react_1.useState)(), notification = _144[0], setNotification = _144[1];
|
|
496
499
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
497
500
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
498
501
|
(0, react_1.useEffect)(function () {
|
|
@@ -502,96 +505,96 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
502
505
|
return function () { return clearTimeout(timer); };
|
|
503
506
|
}, [notification]);
|
|
504
507
|
//INFO : Used by List
|
|
505
|
-
var
|
|
508
|
+
var _145 = (0, react_1.useState)(function () {
|
|
506
509
|
var _a;
|
|
507
510
|
return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearch);
|
|
508
|
-
}), filterSearch =
|
|
509
|
-
var
|
|
511
|
+
}), filterSearch = _145[0], setFilterSearch = _145[1];
|
|
512
|
+
var _146 = (0, react_1.useState)(function () {
|
|
510
513
|
var _a;
|
|
511
514
|
return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearchParams);
|
|
512
|
-
}), filterSearchParams =
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
515
|
+
}), filterSearchParams = _146[0], setFilterSearchParams = _146[1];
|
|
516
|
+
var _147 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _r !== void 0 ? _r : initialFilterSelection), filterSelection = _147[0], setFilterSelection = _147[1];
|
|
517
|
+
var _148 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _s !== void 0 ? _s : initialFilterReference), filterReference = _148[0], setFilterReference = _148[1];
|
|
518
|
+
var _149 = (0, react_1.useState)({}), filterReferenceSearch = _149[0], setFilterReferenceSearch = _149[1];
|
|
519
|
+
var _150 = (0, react_1.useState)({}), filterReferenceList = _150[0], setFilterReferenceList = _150[1];
|
|
520
|
+
var _151 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
518
521
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
519
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
520
|
-
var
|
|
521
|
-
var
|
|
522
|
-
var
|
|
523
|
-
var
|
|
524
|
-
var
|
|
522
|
+
: initialFilterReferenceDate), filterReferenceDate = _151[0], setFilterReferenceDate = _151[1];
|
|
523
|
+
var _152 = (0, react_1.useState)(true), tableLoading = _152[0], setTableLoading = _152[1];
|
|
524
|
+
var _153 = (0, react_1.useState)(""), cursor = _153[0], setCursor = _153[1];
|
|
525
|
+
var _154 = (0, react_1.useState)(""), lastCursor = _154[0], setLastCursor = _154[1];
|
|
526
|
+
var _155 = (0, react_1.useState)([]), tableData = _155[0], setTableData = _155[1];
|
|
527
|
+
var _156 = (0, react_1.useState)([]), spaceTableData = _156[0], setSpaceTableData = _156[1];
|
|
525
528
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
526
529
|
// the state it closed over can predate an earlier save on the same row
|
|
527
530
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
528
531
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
529
532
|
tableDataRef.current = tableData;
|
|
530
533
|
spaceTableDataRef.current = spaceTableData;
|
|
531
|
-
var
|
|
532
|
-
var
|
|
534
|
+
var _157 = (0, react_1.useState)(0), size = _157[0], setSize = _157[1];
|
|
535
|
+
var _158 = (0, react_1.useState)((_v = (_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _t !== void 0 ? _t : (_u = props.organise) === null || _u === void 0 ? void 0 : _u.pageIndex) !== null && _v !== void 0 ? _v : 0), pageIndex = _158[0], setPageIndex = _158[1];
|
|
533
536
|
// INFO: every change of page, including the return to the first page when a
|
|
534
537
|
// filter or search changes, which onChangePagination does not always report
|
|
535
538
|
(0, react_1.useEffect)(function () {
|
|
536
539
|
var _a, _b;
|
|
537
540
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
538
541
|
}, [pageIndex]);
|
|
539
|
-
var
|
|
540
|
-
var
|
|
541
|
-
var
|
|
542
|
-
var
|
|
542
|
+
var _159 = (0, react_1.useState)([]), selectedIds = _159[0], setSelectedIds = _159[1];
|
|
543
|
+
var _160 = (0, react_1.useState)(false), selectAll = _160[0], setSelectAll = _160[1];
|
|
544
|
+
var _161 = (0, react_1.useState)(""), deletePasscode = _161[0], setDeletePasscode = _161[1];
|
|
545
|
+
var _162 = (0, react_1.useState)(""), deletePasscodeInput = _162[0], setDeletePasscodeInput = _162[1];
|
|
543
546
|
// INFO: the up-front Delete anyway — skips the link check for the whole
|
|
544
547
|
// delete, for people trusted with it (canDeleteAnyway)
|
|
545
|
-
var
|
|
546
|
-
var
|
|
548
|
+
var _163 = (0, react_1.useState)(false), isSkipLinkCheck = _163[0], setIsSkipLinkCheck = _163[1];
|
|
549
|
+
var _164 = (0, react_1.useState)(""), deleteFeedId = _164[0], setDeleteFeedId = _164[1];
|
|
547
550
|
//INFO : Used by List Organise
|
|
548
551
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
549
552
|
// persistViewState is enabled and a persisted sort exists
|
|
550
|
-
var
|
|
551
|
-
var
|
|
552
|
-
var
|
|
553
|
-
var
|
|
553
|
+
var _165 = (0, react_1.useState)((_w = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _w !== void 0 ? _w : undefined), persistedSort = _165[0], setPersistedSort = _165[1];
|
|
554
|
+
var _166 = (0, react_1.useState)(false), filterDraft = _166[0], setFilterDraft = _166[1];
|
|
555
|
+
var _167 = (0, react_1.useState)(false), addTabModal = _167[0], setAddTabModal = _167[1];
|
|
556
|
+
var _168 = (0, react_1.useState)(-1), editTabIndex = _168[0], setEditTabIndex = _168[1];
|
|
554
557
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
555
558
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
556
|
-
var
|
|
559
|
+
var _169 = (0, react_1.useState)(function () {
|
|
557
560
|
var _a;
|
|
558
561
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
559
|
-
}), selectedTab =
|
|
560
|
-
var
|
|
562
|
+
}), selectedTab = _169[0], setSelectedTab = _169[1];
|
|
563
|
+
var _170 = (0, react_1.useState)("dayGridMonth"), calendarView = _170[0], setCalendarView = _170[1];
|
|
561
564
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
562
565
|
// (calendarView above drives the matching range query)
|
|
563
|
-
var
|
|
564
|
-
var
|
|
566
|
+
var _171 = (0, react_1.useState)("month"), newCalendarViewMode = _171[0], setNewCalendarViewMode = _171[1];
|
|
567
|
+
var _172 = (0, react_1.useState)(new Date()), calendarTabMonth = _172[0], setCalendarTabMonth = _172[1];
|
|
565
568
|
// INFO: read once per theme — it asks the browser to resolve a style
|
|
566
569
|
var timelinePrimaryColour = (0, react_1.useMemo)(function () { return (0, timelineBars_1.handleReadPrimaryColour)(); },
|
|
567
570
|
/* eslint-disable-next-line */
|
|
568
|
-
[(
|
|
571
|
+
[(_x = props.organise) === null || _x === void 0 ? void 0 : _x.darkMode]);
|
|
569
572
|
// INFO: the period a timeline shows — it reads only the records whose bars
|
|
570
573
|
// overlap it, so a large datasheet loads one month or quarter at a time
|
|
571
|
-
var
|
|
574
|
+
var _173 = (0, react_1.useState)({ unit: "month", anchor: new Date() }), timelineRange = _173[0], setTimelineRange = _173[1];
|
|
572
575
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
573
576
|
// whenever its settings change, and that must not undo the user's switch
|
|
574
577
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
575
|
-
var
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
var
|
|
578
|
+
var _174 = (0, react_1.useState)(true), kanbanDroppable = _174[0], setKanbanDroppable = _174[1];
|
|
579
|
+
var _175 = (0, react_1.useState)([]), kanbanOptions = _175[0], setKanbanOptions = _175[1];
|
|
580
|
+
var _176 = (0, react_1.useState)(false), batchUpdateModal = _176[0], setBatchUpdateModal = _176[1];
|
|
581
|
+
var _177 = (0, react_1.useState)({
|
|
579
582
|
columnId: "",
|
|
580
583
|
columnData: {},
|
|
581
|
-
}), batchUpdateData =
|
|
584
|
+
}), batchUpdateData = _177[0], setBatchUpdateData = _177[1];
|
|
582
585
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
583
586
|
// join the structure hidden; the ones a user shows are kept per view
|
|
584
|
-
var isSystemColumnsEnabled = !!((
|
|
585
|
-
var isSystemColumnsLocked = !!((
|
|
587
|
+
var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
|
|
588
|
+
var isSystemColumnsLocked = !!((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareSystemColumnsLocked);
|
|
586
589
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
587
590
|
? 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; }); })
|
|
588
591
|
: [];
|
|
589
|
-
var
|
|
592
|
+
var _178 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _178[0], setShownSystemColumnIds = _178[1];
|
|
590
593
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
591
594
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
592
595
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
593
596
|
};
|
|
594
|
-
var
|
|
597
|
+
var _179 = (0, react_1.useState)(function () {
|
|
595
598
|
var _a;
|
|
596
599
|
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 : []);
|
|
597
600
|
if (!persistedState)
|
|
@@ -618,8 +621,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
618
621
|
});
|
|
619
622
|
}
|
|
620
623
|
return model;
|
|
621
|
-
}), structure =
|
|
622
|
-
var
|
|
624
|
+
}), structure = _179[0], setStructure = _179[1];
|
|
625
|
+
var _180 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _180[0], setAdditionalQuery = _180[1];
|
|
623
626
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
624
627
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
625
628
|
var defaultFlexFilterRow = [
|
|
@@ -631,15 +634,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
631
634
|
},
|
|
632
635
|
];
|
|
633
636
|
// INFO: rows the host opens the list with come before a saved view's
|
|
634
|
-
var initialFlexFilterRows = ((
|
|
637
|
+
var initialFlexFilterRows = ((_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.linkFlexFilters) === null || _3 === void 0 ? void 0 : _3.length)
|
|
635
638
|
? props.organise.linkFlexFilters
|
|
636
|
-
: ((
|
|
639
|
+
: ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.initialFlexFilters) &&
|
|
637
640
|
props.organise.initialFlexFilters.length > 0
|
|
638
641
|
? props.organise.initialFlexFilters
|
|
639
642
|
: (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
640
643
|
? persistedState.flexFilters
|
|
641
644
|
: defaultFlexFilterRow;
|
|
642
|
-
var
|
|
645
|
+
var _181 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _181[0], setFlexFilters = _181[1];
|
|
643
646
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
644
647
|
// clear methods so chained calls in one tick aren't stale.
|
|
645
648
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -652,101 +655,101 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
652
655
|
}, [flexFilters]);
|
|
653
656
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
654
657
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
655
|
-
var
|
|
658
|
+
var _182 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _182[0], setFlexFiltersDebounced = _182[1];
|
|
656
659
|
// INFO: the filter rows of the export being set up — started from the
|
|
657
660
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
658
|
-
var
|
|
659
|
-
var
|
|
660
|
-
var
|
|
661
|
-
var
|
|
662
|
-
var
|
|
661
|
+
var _183 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _183[0], setExportFlexFilters = _183[1];
|
|
662
|
+
var _184 = (0, react_1.useState)({}), flexFilterReferenceOptions = _184[0], setFlexFilterReferenceOptions = _184[1];
|
|
663
|
+
var _185 = (0, react_1.useState)({}), flexFilterReferenceSearch = _185[0], setFlexFilterReferenceSearch = _185[1];
|
|
664
|
+
var _186 = (0, react_1.useState)(false), flexFilterModalOpen = _186[0], setFlexFilterModalOpen = _186[1];
|
|
665
|
+
var _187 = (0, react_1.useState)(false), viewSettingsModalOpen = _187[0], setViewSettingsModalOpen = _187[1];
|
|
663
666
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
664
667
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
665
668
|
// structure to props.model whenever props change, which would wipe the
|
|
666
669
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
667
670
|
// structure — writing user hides there would blur the two concepts.
|
|
668
|
-
var
|
|
669
|
-
var
|
|
670
|
-
var
|
|
671
|
-
var
|
|
671
|
+
var _188 = (0, react_1.useState)((_5 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _5 !== void 0 ? _5 : []), userHiddenColumnIds = _188[0], setUserHiddenColumnIds = _188[1];
|
|
672
|
+
var _189 = (0, react_1.useState)(""), columnSearch = _189[0], setColumnSearch = _189[1];
|
|
673
|
+
var _190 = (0, react_1.useState)([]), savedViews = _190[0], setSavedViews = _190[1];
|
|
674
|
+
var _191 = (0, react_1.useState)(null), activeSavedViewId = _191[0], setActiveSavedViewId = _191[1];
|
|
672
675
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
673
|
-
var
|
|
676
|
+
var _192 = (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 = _192[0], setColumnWidths = _192[1];
|
|
674
677
|
// INFO: the kanban lane widths of the view on screen, by lane id ("300px")
|
|
675
|
-
var
|
|
678
|
+
var _193 = (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.laneWidths) !== null && _c !== void 0 ? _c : {}; }), laneWidths = _193[0], setLaneWidths = _193[1];
|
|
676
679
|
// INFO: the read drawer's dragged width ("520px"), kept in the view with the
|
|
677
680
|
// column widths. A restored persistViewState wins over All's, as a saved
|
|
678
681
|
// view or draft applied at opening replaces both
|
|
679
|
-
var
|
|
682
|
+
var _194 = (0, react_1.useState)(function () {
|
|
680
683
|
var _a, _b, _c;
|
|
681
684
|
return (_a = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.drawerWidth : undefined)) !== null && _a !== void 0 ? _a : (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.allView) === null || _c === void 0 ? void 0 : _c.drawerWidth;
|
|
682
|
-
}), drawerWidth =
|
|
685
|
+
}), drawerWidth = _194[0], setDrawerWidth = _194[1];
|
|
683
686
|
// INFO: the columns the view on screen freezes at the left edge
|
|
684
|
-
var
|
|
687
|
+
var _195 = (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 = _195[0], setPinnedColumnIds = _195[1];
|
|
685
688
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
686
689
|
// so the defaults drawn before it never overwrite a person's own
|
|
687
|
-
var
|
|
690
|
+
var _196 = (0, react_1.useState)(false), isViewDraftReady = _196[0], setIsViewDraftReady = _196[1];
|
|
688
691
|
// INFO: null while the name box is closed
|
|
689
|
-
var
|
|
690
|
-
var
|
|
692
|
+
var _197 = (0, react_1.useState)(null), savedViewName = _197[0], setSavedViewName = _197[1];
|
|
693
|
+
var _198 = (0, react_1.useState)(null), deletingSavedViewId = _198[0], setDeletingSavedViewId = _198[1];
|
|
691
694
|
// INFO: the view chip being dragged, to drop it in another place
|
|
692
|
-
var
|
|
695
|
+
var _199 = (0, react_1.useState)(null), draggingSavedViewId = _199[0], setDraggingSavedViewId = _199[1];
|
|
693
696
|
// INFO: the tab strip in the order a drag has reached, saved once on drop
|
|
694
|
-
var
|
|
695
|
-
var
|
|
696
|
-
var
|
|
697
|
-
var
|
|
697
|
+
var _200 = (0, react_1.useState)(null), draggedTabs = _200[0], setDraggedTabs = _200[1];
|
|
698
|
+
var _201 = (0, react_1.useState)(null), renamingSavedView = _201[0], setRenamingSavedView = _201[1];
|
|
699
|
+
var _202 = (0, react_1.useState)(false), isSavedViewsExpanded = _202[0], setIsSavedViewsExpanded = _202[1];
|
|
700
|
+
var _203 = (0, react_1.useState)(null), draggingColumnId = _203[0], setDraggingColumnId = _203[1];
|
|
698
701
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
699
702
|
//INFO : Used by Auth
|
|
700
|
-
var
|
|
703
|
+
var _204 = (0, react_1.useState)({
|
|
701
704
|
email: "",
|
|
702
705
|
google: "",
|
|
703
706
|
phone: "",
|
|
704
707
|
disabled: false,
|
|
705
708
|
create: false,
|
|
706
|
-
}), authMethods =
|
|
707
|
-
var
|
|
709
|
+
}), authMethods = _204[0], setAuthMethods = _204[1];
|
|
710
|
+
var _205 = (0, react_1.useState)(""), selectedAuthMethod = _205[0], setSelectedAuthMethod = _205[1];
|
|
708
711
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
709
712
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
710
|
-
var
|
|
713
|
+
var _206 = (0, react_1.useState)(false), authLoading = _206[0], setAuthLoading = _206[1];
|
|
711
714
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
712
715
|
// the state has rendered, and the state disables the confirm button
|
|
713
716
|
var deletingRef = (0, react_1.useRef)(false);
|
|
714
|
-
var
|
|
717
|
+
var _207 = (0, react_1.useState)(false), deleting = _207[0], setDeleting = _207[1];
|
|
715
718
|
// INFO: Used by Activity Log
|
|
716
|
-
var
|
|
717
|
-
var
|
|
719
|
+
var _208 = (0, react_1.useState)(false), activityModal = _208[0], setActivityModal = _208[1];
|
|
720
|
+
var _209 = (0, react_1.useState)(""), activityId = _209[0], setActivityId = _209[1];
|
|
718
721
|
//INFO : Used by Export
|
|
719
|
-
var
|
|
720
|
-
var
|
|
721
|
-
var
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
var
|
|
725
|
-
var
|
|
726
|
-
var
|
|
727
|
-
var
|
|
728
|
-
var
|
|
729
|
-
var
|
|
730
|
-
var
|
|
731
|
-
var
|
|
732
|
-
var
|
|
733
|
-
var
|
|
722
|
+
var _210 = (0, react_1.useState)(null), csvFile = _210[0], setCSVFile = _210[1];
|
|
723
|
+
var _211 = (0, react_1.useState)([]), csvFileData = _211[0], setCSVFileData = _211[1];
|
|
724
|
+
var _212 = (0, react_1.useState)(0), stepCSVIndex = _212[0], setStepCSVIndex = _212[1];
|
|
725
|
+
var _213 = (0, react_1.useState)({}), listCSVMapAttribute = _213[0], setListCSVMapAttribute = _213[1];
|
|
726
|
+
var _214 = (0, react_1.useState)({}), listCSVObjAttribute = _214[0], setListCSVObjAttribute = _214[1];
|
|
727
|
+
var _215 = (0, react_1.useState)([]), csvAPIAttribute = _215[0], setCSVAPIAttribute = _215[1];
|
|
728
|
+
var _216 = (0, react_1.useState)(((_6 = props.devSettings.currentUser) === null || _6 === void 0 ? void 0 : _6.userEmail) || ""), exportCSVEmail = _216[0], setExportCSVEmail = _216[1];
|
|
729
|
+
var _217 = (0, react_1.useState)(((_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.defaultExportPDFName) || ""), exportPDFTitle = _217[0], setExportPDFTitle = _217[1];
|
|
730
|
+
var _218 = (0, react_1.useState)(false), exportPDFLoading = _218[0], setExportPDFLoading = _218[1];
|
|
731
|
+
var _219 = (0, react_1.useState)(false), exportReadPDFLoading = _219[0], setExportReadPDFLoading = _219[1];
|
|
732
|
+
var _220 = (0, react_1.useState)((_11 = (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.exportSettings) === null || _10 === void 0 ? void 0 : _10.sumColumnId) !== null && _11 !== void 0 ? _11 : []), exportSumAttributeIds = _220[0], setExportSumAttributeIds = _220[1];
|
|
733
|
+
var _221 = (0, react_1.useState)((_14 = (_13 = (_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.exportSettings) === null || _13 === void 0 ? void 0 : _13.hideSubItems) !== null && _14 !== void 0 ? _14 : false), hideSubItems = _221[0], setHideSubItems = _221[1];
|
|
734
|
+
var _222 = (0, react_1.useState)([]), importTableData = _222[0], setImportTableData = _222[1];
|
|
735
|
+
var _223 = (0, react_1.useState)([]), queryList = _223[0], setQueryList = _223[1];
|
|
736
|
+
var _224 = (0, react_1.useState)(undefined), allQueryList = _224[0], setAllQueryList = _224[1];
|
|
734
737
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
735
738
|
// ungrouped, so it opens ungrouped
|
|
736
|
-
var
|
|
739
|
+
var _225 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
737
740
|
? persistedState.groupBy || undefined
|
|
738
|
-
: (
|
|
741
|
+
: (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.groupBy), groupId = _225[0], setGroupId = _225[1];
|
|
739
742
|
// INFO: groups by their record count, or in the column's own order
|
|
740
|
-
var
|
|
743
|
+
var _226 = (0, react_1.useState)((_16 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupOrder) !== null && _16 !== void 0 ? _16 : ""), groupOrder = _226[0], setGroupOrder = _226[1];
|
|
741
744
|
// INFO: each group's total per number column, keyed by section id
|
|
742
|
-
var
|
|
745
|
+
var _227 = (0, react_1.useState)({}), groupSummaries = _227[0], setGroupSummaries = _227[1];
|
|
743
746
|
// INFO: each group's row count over every row the filters match; null until
|
|
744
747
|
// read. A band paged alone shows it until its own first page lands, and a
|
|
745
748
|
// band it counts empty is left out instead of waiting to be read
|
|
746
|
-
var
|
|
749
|
+
var _228 = (0, react_1.useState)(null), groupTotals = _228[0], setGroupTotals = _228[1];
|
|
747
750
|
// INFO: the last read of groupTotals failed, so bands fall back to the rows
|
|
748
751
|
// loaded instead of waiting on a total that is not coming
|
|
749
|
-
var
|
|
752
|
+
var _229 = (0, react_1.useState)(false), groupTotalsFailed = _229[0], setGroupTotalsFailed = _229[1];
|
|
750
753
|
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
751
754
|
// INFO: the grouped count waiting to go out, so a filter change can stop it
|
|
752
755
|
// before it sends the filters it was scheduled with
|
|
@@ -757,20 +760,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
757
760
|
// later refresh, and "keep" lapses, so a refresh that brings no new rows
|
|
758
761
|
// never holds back a later change's count
|
|
759
762
|
var groupSummaryRefreshRef = (0, react_1.useRef)(null);
|
|
760
|
-
var
|
|
761
|
-
var
|
|
763
|
+
var _230 = (0, react_1.useState)({}), commentCounts = _230[0], setCommentCounts = _230[1];
|
|
764
|
+
var _231 = (0, react_1.useState)({}), commentUnread = _231[0], setCommentUnread = _231[1];
|
|
762
765
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
763
766
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
764
767
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
765
768
|
// next page as the user scrolls inside that band, independent of every other
|
|
766
769
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
767
|
-
var
|
|
770
|
+
var _232 = (0, react_1.useState)({}), groupPageState = _232[0], setGroupPageState = _232[1];
|
|
768
771
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
769
772
|
// in one tick do not re-fetch an already in-flight page.
|
|
770
773
|
// INFO: every band of the table, or section of the list or grid tab, is
|
|
771
774
|
// collapsed, so no row is on screen and the scroll sentinel under the view
|
|
772
775
|
// would read page after page; it waits until one is opened again
|
|
773
|
-
var
|
|
776
|
+
var _233 = (0, react_1.useState)(false), isAllGroupsCollapsed = _233[0], setIsAllGroupsCollapsed = _233[1];
|
|
774
777
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
775
778
|
groupPageStateRef.current = groupPageState;
|
|
776
779
|
// INFO: rows added since the list was read, reported through
|
|
@@ -786,52 +789,52 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
786
789
|
var groupLoadingKeyRef = (0, react_1.useRef)(null);
|
|
787
790
|
var groupLoadQueueRef = (0, react_1.useRef)([]);
|
|
788
791
|
var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
|
|
789
|
-
var
|
|
790
|
-
var
|
|
792
|
+
var _234 = (0, react_1.useState)(""), readTabSection = _234[0], setReadTabSection = _234[1];
|
|
793
|
+
var _235 = (0, react_1.useState)(false), readFloatingNav = _235[0], setReadFloatingNav = _235[1];
|
|
791
794
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
792
795
|
//INFO : Used by Read
|
|
793
796
|
//INFO : Used by Update
|
|
794
|
-
var
|
|
795
|
-
var
|
|
796
|
-
var
|
|
797
|
-
var
|
|
798
|
-
var
|
|
799
|
-
var
|
|
800
|
-
var
|
|
797
|
+
var _236 = (0, react_1.useState)(false), modalVisible = _236[0], setModalVisible = _236[1];
|
|
798
|
+
var _237 = (0, react_1.useState)(false), deleteModal = _237[0], setDeleteModal = _237[1];
|
|
799
|
+
var _238 = (0, react_1.useState)(false), excelModal = _238[0], setExcelModal = _238[1];
|
|
800
|
+
var _239 = (0, react_1.useState)(false), exportExcel = _239[0], setExportExcel = _239[1];
|
|
801
|
+
var _240 = (0, react_1.useState)(""), exportType = _240[0], setExportType = _240[1];
|
|
802
|
+
var _241 = (0, react_1.useState)(false), exportQR = _241[0], setExportQR = _241[1];
|
|
803
|
+
var _242 = (0, react_1.useState)(function () {
|
|
801
804
|
var _a, _b;
|
|
802
805
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
803
806
|
return firstTabId;
|
|
804
|
-
}), activeTab =
|
|
805
|
-
var
|
|
806
|
-
var
|
|
807
|
-
var
|
|
808
|
-
var
|
|
809
|
-
var
|
|
810
|
-
var
|
|
811
|
-
var
|
|
807
|
+
}), activeTab = _242[0], setActiveTab = _242[1];
|
|
808
|
+
var _243 = (0, react_1.useState)(false), signatureSigning = _243[0], setSignatureSigning = _243[1];
|
|
809
|
+
var _244 = (0, react_1.useState)({}), selectedData = _244[0], setSelectedData = _244[1];
|
|
810
|
+
var _245 = (0, react_1.useState)(""), selectedObjectStructureId = _245[0], setSelectedObjectStructureId = _245[1];
|
|
811
|
+
var _246 = (0, react_1.useState)(""), selectedObjectId = _246[0], setSelectedObjectId = _246[1];
|
|
812
|
+
var _247 = (0, react_1.useState)(""), selectedListAddressId = _247[0], setSelectedListAddressId = _247[1];
|
|
813
|
+
var _248 = (0, react_1.useState)(-1), selectedListAddressIndex = _248[0], setSelectedListAddressIndex = _248[1];
|
|
814
|
+
var _249 = (0, react_1.useState)({
|
|
812
815
|
lat: 0,
|
|
813
816
|
lng: 0,
|
|
814
817
|
name: "",
|
|
815
|
-
}), selectedListAddress =
|
|
816
|
-
var
|
|
817
|
-
var
|
|
818
|
-
var
|
|
819
|
-
var
|
|
820
|
-
var
|
|
821
|
-
var
|
|
818
|
+
}), selectedListAddress = _249[0], setSelectedListAddress = _249[1];
|
|
819
|
+
var _250 = (0, react_1.useState)({}), selectedObjectData = _250[0], setSelectedObjectData = _250[1];
|
|
820
|
+
var _251 = (0, react_1.useState)(null), objectCellEdit = _251[0], setObjectCellEdit = _251[1];
|
|
821
|
+
var _252 = (0, react_1.useState)(false), referenceLoading = _252[0], setReferenceLoading = _252[1];
|
|
822
|
+
var _253 = (0, react_1.useState)({}), referencesOptions = _253[0], setReferencesOptions = _253[1];
|
|
823
|
+
var _254 = (0, react_1.useState)({}), referencesDetails = _254[0], setReferencesDetails = _254[1];
|
|
824
|
+
var _255 = (0, react_1.useState)({}), listReferencesOptions = _255[0], setListReferencesOptions = _255[1];
|
|
822
825
|
// INFO: the referenced records themselves, for a table cell that picks from
|
|
823
826
|
// a list on one (referenceSelection)
|
|
824
|
-
var
|
|
827
|
+
var _256 = (0, react_1.useState)({}), listReferencesDetails = _256[0], setListReferencesDetails = _256[1];
|
|
825
828
|
// INFO: each record that could not be deleted, by the datasheet still
|
|
826
829
|
// linking to it
|
|
827
|
-
var
|
|
830
|
+
var _257 = (0, react_1.useState)([]), referenceDeleteTableData = _257[0], setReferenceDeleteTableData = _257[1];
|
|
828
831
|
// INFO: the records a delete left because they are still linked — what
|
|
829
832
|
// "Delete anyway" deletes
|
|
830
833
|
var blockedDeleteIdsRef = (0, react_1.useRef)([]);
|
|
831
834
|
// INFO: "Delete anyway" is for a list's delete; a single record's delete
|
|
832
835
|
// has its own steps around it
|
|
833
836
|
var isBlockedFromListRef = (0, react_1.useRef)(false);
|
|
834
|
-
var
|
|
837
|
+
var _258 = (0, react_1.useState)(false), isDeleteAnywayConfirm = _258[0], setIsDeleteAnywayConfirm = _258[1];
|
|
835
838
|
// INFO: a batched delete stops when the list goes away mid-run
|
|
836
839
|
var isMountedRef = (0, react_1.useRef)(true);
|
|
837
840
|
(0, react_1.useEffect)(function () {
|
|
@@ -851,25 +854,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
851
854
|
}, [deleteModal]);
|
|
852
855
|
// INFO: how far a batched delete has got, shown while it runs
|
|
853
856
|
// INFO: deleted is only known where a pass checks links before deleting
|
|
854
|
-
var
|
|
855
|
-
var
|
|
856
|
-
var
|
|
857
|
+
var _259 = (0, react_1.useState)(null), deleteProgress = _259[0], setDeleteProgress = _259[1];
|
|
858
|
+
var _260 = (0, react_1.useState)([]), relatedSections = _260[0], setRelatedSections = _260[1];
|
|
859
|
+
var _261 = (0, react_1.useState)({
|
|
857
860
|
id: "",
|
|
858
861
|
name: "",
|
|
859
862
|
type: "string",
|
|
860
|
-
}), referenceCreationModal =
|
|
861
|
-
var
|
|
862
|
-
var
|
|
863
|
+
}), referenceCreationModal = _261[0], setReferenceCreationModal = _261[1];
|
|
864
|
+
var _262 = (0, react_1.useState)({}), referenceModelSchema = _262[0], setReferenceSchema = _262[1];
|
|
865
|
+
var _263 = (0, react_1.useState)([]), kanbanChecked = _263[0], setKanbanChecked = _263[1];
|
|
863
866
|
//INFO : Offline
|
|
864
|
-
var
|
|
865
|
-
var
|
|
867
|
+
var _264 = (0, react_1.useState)(0), offlineDataLength = _264[0], setOfflineDataLength = _264[1];
|
|
868
|
+
var _265 = (0, react_1.useState)(false), offlineModal = _265[0], setOfflineModal = _265[1];
|
|
866
869
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
867
|
-
var
|
|
868
|
-
var
|
|
870
|
+
var _266 = (0, react_1.useState)(false), isLive = _266[0], setIsLive = _266[1];
|
|
871
|
+
var _267 = (0, react_1.useState)(false), isLiveOffline = _267[0], setIsLiveOffline = _267[1];
|
|
869
872
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
870
873
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
871
874
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
872
|
-
var
|
|
875
|
+
var _268 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _268[0], setIsNetworkOffline = _268[1];
|
|
873
876
|
var previousType = (0, react_1.useRef)(null);
|
|
874
877
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
875
878
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -1019,7 +1022,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1019
1022
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
1020
1023
|
* shared link or a back button.
|
|
1021
1024
|
*/
|
|
1022
|
-
var defaultTabName = (
|
|
1025
|
+
var defaultTabName = (_19 = (_18 = (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.extendedTabs) === null || _18 === void 0 ? void 0 : _18.find(function (eachTab) { return eachTab.defaultTab; })) === null || _19 === void 0 ? void 0 : _19.name;
|
|
1023
1026
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
1024
1027
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
1025
1028
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
@@ -1031,14 +1034,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1031
1034
|
// INFO: Firestore reads and the monday wrapper join every condition with AND
|
|
1032
1035
|
// (monday flattens all ORs into one), so a flex OR group is offered on Mongo only
|
|
1033
1036
|
var isFlexOrSupported = !isFirebase && devSettings.server !== "mondayServer";
|
|
1034
|
-
var isDateWarnings = !!((
|
|
1035
|
-
var isDatasheetDefaults = !!((
|
|
1037
|
+
var isDateWarnings = !!((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.dateWarnings);
|
|
1038
|
+
var isDatasheetDefaults = !!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.datasheetDefaults);
|
|
1036
1039
|
// INFO: the columns as the views draw them — with datasheet defaults every
|
|
1037
1040
|
// list option without a colour takes the palette colour of its position
|
|
1038
1041
|
var displayStructure = isDatasheetDefaults
|
|
1039
1042
|
? (0, defaultColours_1.handleApplyDefaultColours)(structure)
|
|
1040
1043
|
: structure;
|
|
1041
|
-
var dbModule = isFirebaseClient ? (
|
|
1044
|
+
var dbModule = isFirebaseClient ? (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.firebase : (_23 = props.lib) === null || _23 === void 0 ? void 0 : _23.axios;
|
|
1042
1045
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
1043
1046
|
var selectedRelated = resolvedType === "read"
|
|
1044
1047
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -1156,6 +1159,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1156
1159
|
recountTimersRef.current.push(timer);
|
|
1157
1160
|
};
|
|
1158
1161
|
(0, react_1.useEffect)(function () { return function () { return recountTimersRef.current.forEach(function (each) { return clearTimeout(each); }); }; }, []);
|
|
1162
|
+
// INFO: a comment written elsewhere (another member, another tab, the MCP)
|
|
1163
|
+
// asks again for just those rows; a row not loaded is skipped, since it is
|
|
1164
|
+
// counted when it loads
|
|
1165
|
+
var handleRecountComments = function (recordIds) {
|
|
1166
|
+
var loadedIds = new Set((tableData !== null && tableData !== void 0 ? tableData : []).map(function (eachRow) { var _a, _b; return String((_b = (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id) !== null && _b !== void 0 ? _b : ""); }));
|
|
1167
|
+
handleFetchCommentCounts(Array.from(new Set(recordIds)).filter(function (eachId) { return !!eachId && loadedIds.has(eachId); }));
|
|
1168
|
+
};
|
|
1159
1169
|
var lastActivityIdRef = (0, react_1.useRef)("");
|
|
1160
1170
|
(0, react_1.useEffect)(function () {
|
|
1161
1171
|
if (activityModal) {
|
|
@@ -1242,38 +1252,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1242
1252
|
}, [
|
|
1243
1253
|
resolvedType,
|
|
1244
1254
|
props.id,
|
|
1245
|
-
(
|
|
1255
|
+
(_24 = props.space) === null || _24 === void 0 ? void 0 : _24._id,
|
|
1246
1256
|
props.devSettings.schemaEndpoint,
|
|
1247
|
-
(
|
|
1257
|
+
(_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.showRelatedTab,
|
|
1248
1258
|
]);
|
|
1249
1259
|
/* eslint-enable */
|
|
1250
1260
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
1251
1261
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
1252
|
-
var isViewSettingsEnabled = ((
|
|
1262
|
+
var isViewSettingsEnabled = ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareViewSettings) || ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareNewDTW)
|
|
1253
1263
|
? true
|
|
1254
1264
|
: false;
|
|
1255
1265
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
1256
1266
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
1257
1267
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
1258
|
-
var isSchemaHideMode = ((
|
|
1268
|
+
var isSchemaHideMode = ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.onChangeHide) ? true : false;
|
|
1259
1269
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1260
1270
|
// the persisted value and falls back to the consumer's limit
|
|
1261
|
-
var
|
|
1271
|
+
var _269 = (0, react_1.useState)((_30 = (_29 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _29 !== void 0 ? _29 : props.limit) !== null && _30 !== void 0 ? _30 : 10), pageLimit = _269[0], setPageLimit = _269[1];
|
|
1262
1272
|
var limit = pageLimit;
|
|
1263
|
-
var isSavedViewsEnabled = !!((
|
|
1273
|
+
var isSavedViewsEnabled = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.savedViews) && resolvedType === "list";
|
|
1264
1274
|
// INFO: a calendar and a chart draw their own way, so columns, sort and
|
|
1265
1275
|
// group have nothing to change there
|
|
1266
1276
|
var isViewSettingsHiddenForTab = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "calendar" || (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "chart";
|
|
1267
1277
|
// INFO: Group shapes a table, list or grid into sections, a map into routes
|
|
1268
1278
|
// and a timeline into colours
|
|
1269
|
-
var isGroupPickerShown = !!((
|
|
1279
|
+
var isGroupPickerShown = !!((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.showGroupByFeature) && !isViewSettingsHiddenForTab;
|
|
1270
1280
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
1271
1281
|
// every view is the team's and nothing is kept locally
|
|
1272
|
-
var isAppViews = ((
|
|
1273
|
-
!!((
|
|
1282
|
+
var isAppViews = ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.sharedViews) !== undefined ||
|
|
1283
|
+
!!((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.onChangeSharedViews);
|
|
1274
1284
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
1275
1285
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
1276
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
1286
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.sort);
|
|
1277
1287
|
var handleSortColumn = function (value) {
|
|
1278
1288
|
var _a, _b, _c, _d;
|
|
1279
1289
|
if (isInternalSort)
|
|
@@ -1303,7 +1313,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1303
1313
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
1304
1314
|
// can hand over the whole set — there formula columns are not offered for
|
|
1305
1315
|
// sorting or filtering, rather than ordering one page
|
|
1306
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
1316
|
+
var isFormulaViewSupported = !isFirebase && !((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.unionCollections) === null || _37 === void 0 ? void 0 : _37.length);
|
|
1307
1317
|
var formulaSort = isFormulaViewSupported &&
|
|
1308
1318
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
1309
1319
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -1314,12 +1324,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1314
1324
|
// a union read runs them
|
|
1315
1325
|
// INFO: a people filter's "me" needs only who is signed in, which any
|
|
1316
1326
|
// backend can match
|
|
1317
|
-
var currentUserId = (
|
|
1318
|
-
var flexFilterExtras = !isFirebase && !((
|
|
1327
|
+
var currentUserId = (_38 = props.devSettings.currentUser) === null || _38 === void 0 ? void 0 : _38.userId;
|
|
1328
|
+
var flexFilterExtras = !isFirebase && !((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.unionCollections) === null || _40 === void 0 ? void 0 : _40.length)
|
|
1319
1329
|
? {
|
|
1320
|
-
references: (
|
|
1321
|
-
listObjects: (
|
|
1322
|
-
related: (
|
|
1330
|
+
references: (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareFlexFilterReferences,
|
|
1331
|
+
listObjects: (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareFlexFilterListObjects,
|
|
1332
|
+
related: (_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareFlexFilterRelated,
|
|
1323
1333
|
currentUserId: currentUserId,
|
|
1324
1334
|
}
|
|
1325
1335
|
: isFirebase
|
|
@@ -1462,18 +1472,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1462
1472
|
var handleGetSelectAllText = function () {
|
|
1463
1473
|
return "".concat(size.toLocaleString(), " records ").concat(handleCheckReaderFiltered() ? "matching your filters" : "in this list");
|
|
1464
1474
|
};
|
|
1465
|
-
var
|
|
1466
|
-
var isEditor = ((
|
|
1467
|
-
var isOffline = (
|
|
1475
|
+
var _270 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _270.canUpdateRecord, canInlineUpdate = _270.canInlineUpdate, canBatchUpdate = _270.canBatchUpdate, canDeleteRecord = _270.canDeleteRecord;
|
|
1476
|
+
var isEditor = ((_44 = props.edit) === null || _44 === void 0 ? void 0 : _44.allEditable) ? true : false;
|
|
1477
|
+
var isOffline = (_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareOffline;
|
|
1468
1478
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1469
1479
|
// the live network state — online saves go to the server even if bareOffline
|
|
1470
1480
|
// is true, offline saves go to IDB as normal.
|
|
1471
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1472
|
-
var showId = (
|
|
1481
|
+
var isOfflineNetworkListener = isOffline && ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOfflineNetworkListener);
|
|
1482
|
+
var showId = (_47 = props.space) === null || _47 === void 0 ? void 0 : _47.showId;
|
|
1473
1483
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1474
|
-
var idField = ((
|
|
1475
|
-
var pipeline = (
|
|
1476
|
-
if ((
|
|
1484
|
+
var idField = ((_48 = props.space) === null || _48 === void 0 ? void 0 : _48.idField) || ((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.idField);
|
|
1485
|
+
var pipeline = (_50 = props === null || props === void 0 ? void 0 : props.space) === null || _50 === void 0 ? void 0 : _50.pipeline;
|
|
1486
|
+
if ((_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareListPipeline) {
|
|
1477
1487
|
pipeline = pipeline
|
|
1478
1488
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1479
1489
|
}
|
|
@@ -1486,64 +1496,57 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1486
1496
|
* three records came back instead of five files, and each tile received the
|
|
1487
1497
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1488
1498
|
*/
|
|
1489
|
-
var fileViewColumnId = (
|
|
1499
|
+
var fileViewColumnId = (_55 = (_54 = ((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.extendedTabs) !== null && _53 !== void 0 ? _53 : []).find(function (eachTab) {
|
|
1490
1500
|
return eachTab.viewType === "file" &&
|
|
1491
1501
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1492
|
-
})) === null ||
|
|
1502
|
+
})) === null || _54 === void 0 ? void 0 : _54.fileSettings) === null || _55 === void 0 ? void 0 : _55.columnId;
|
|
1493
1503
|
// INFO: select-all promises "all N records", so it is offered only where N
|
|
1494
1504
|
// is the total a delete reads — not on Firebase (N is the rows loaded so
|
|
1495
1505
|
// far), a union of datasheets (N counts the others too), a file view (N
|
|
1496
1506
|
// counts files, not records) or offline
|
|
1497
1507
|
var isSelectAllUncountable = isFirebase ||
|
|
1498
|
-
!!((
|
|
1508
|
+
!!((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.unionCollections) === null || _57 === void 0 ? void 0 : _57.length) ||
|
|
1499
1509
|
!!fileViewColumnId ||
|
|
1500
|
-
!!((
|
|
1501
|
-
var hasNavigation = ((
|
|
1510
|
+
!!((_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareOffline);
|
|
1511
|
+
var hasNavigation = ((_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.handleNavigate) ? true : false;
|
|
1502
1512
|
var formColumn = "grid-cols-12";
|
|
1503
|
-
var useMobileView = (
|
|
1513
|
+
var useMobileView = (_61 = (_60 = props.bareSettings) === null || _60 === void 0 ? void 0 : _60.bareUpdateMobileView) !== null && _61 !== void 0 ? _61 : false;
|
|
1504
1514
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1505
|
-
var isActivityLog = (((
|
|
1506
|
-
((
|
|
1507
|
-
(((
|
|
1508
|
-
((
|
|
1509
|
-
// INFO: a record
|
|
1510
|
-
//
|
|
1511
|
-
//
|
|
1512
|
-
//
|
|
1513
|
-
// drawer
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
//
|
|
1523
|
-
//
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
// list is still on screen — a host may open the row a render after the click
|
|
1527
|
-
var lastInlineTypeRef = (0, react_1.useRef)(resolvedType);
|
|
1515
|
+
var isActivityLog = (((_63 = (_62 = props.edit) === null || _62 === void 0 ? void 0 : _62.activityLog) === null || _63 === void 0 ? void 0 : _63.enableComments) &&
|
|
1516
|
+
((_64 = props.edit) === null || _64 === void 0 ? void 0 : _64.activityLog.commentCollectionId)) ||
|
|
1517
|
+
(((_66 = (_65 = props.edit) === null || _65 === void 0 ? void 0 : _65.activityLog) === null || _66 === void 0 ? void 0 : _66.enableLogs) &&
|
|
1518
|
+
((_67 = props.edit) === null || _67 === void 0 ? void 0 : _67.activityLog.logsCollectionId));
|
|
1519
|
+
// INFO: where a record opens in a drawer — the read drawer, or in place
|
|
1520
|
+
// inside one (a related tab's row, or the record the read drawer nests,
|
|
1521
|
+
// both marked bareInlineActivity) — its comments and logs are the read
|
|
1522
|
+
// view's Activity tab, so the record, its Update button and its activity
|
|
1523
|
+
// share that one drawer. Elsewhere the read view is a page and stays as it
|
|
1524
|
+
// was: no Activity tab, and a Log button opening the activity drawer.
|
|
1525
|
+
var hasReadDrawer = !!((_68 = props.viewSettings) === null || _68 === void 0 ? void 0 : _68.readDrawer) ||
|
|
1526
|
+
!!((_69 = props.bareSettings) === null || _69 === void 0 ? void 0 : _69.bareInlineActivity);
|
|
1527
|
+
var hasActivityTab = !!isActivityLog && hasReadDrawer;
|
|
1528
|
+
var isActivityTab = hasActivityTab &&
|
|
1529
|
+
props.type === "read" &&
|
|
1530
|
+
((_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.viewId) === readViewIds_1.ACTIVITY_VIEW_ID;
|
|
1531
|
+
// INFO: the record whose activity tab was shown; going back to the list asks
|
|
1532
|
+
// its comment count again, as the activity drawer does when it closes. Keyed
|
|
1533
|
+
// on props.type, not resolvedType — a list hosting the read drawer stays a
|
|
1534
|
+
// list while the record is open in it.
|
|
1535
|
+
var activityTabIdRef = (0, react_1.useRef)("");
|
|
1528
1536
|
(0, react_1.useEffect)(function () {
|
|
1529
|
-
|
|
1530
|
-
lastInlineTypeRef.current = resolvedType;
|
|
1531
|
-
if (!isInlineActivity)
|
|
1537
|
+
if (!hasActivityTab)
|
|
1532
1538
|
return;
|
|
1533
|
-
if (
|
|
1534
|
-
if (
|
|
1535
|
-
|
|
1539
|
+
if (props.type === "read") {
|
|
1540
|
+
if (isActivityTab && props.id)
|
|
1541
|
+
activityTabIdRef.current = props.id;
|
|
1536
1542
|
return;
|
|
1537
1543
|
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
setInlineActivityOnly(false);
|
|
1541
|
-
var shownId = inlineActivityIdRef.current;
|
|
1542
|
-
inlineActivityIdRef.current = "";
|
|
1544
|
+
var shownId = activityTabIdRef.current;
|
|
1545
|
+
activityTabIdRef.current = "";
|
|
1543
1546
|
if (shownId)
|
|
1544
1547
|
handleRecountClosedRow(shownId);
|
|
1545
1548
|
/* eslint-disable */
|
|
1546
|
-
}, [
|
|
1549
|
+
}, [props.type, props.id, isActivityTab]);
|
|
1547
1550
|
/* eslint-enable */
|
|
1548
1551
|
var renderActivityPanel = function (dataId) {
|
|
1549
1552
|
var _a, _b, _c, _d;
|
|
@@ -1556,12 +1559,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1556
1559
|
// column
|
|
1557
1560
|
recordTitleColumn: (_d = ((_c = (_b = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _b !== void 0 ? _b : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _c !== void 0 ? _c : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _d === void 0 ? void 0 : _d.id, model: structure }));
|
|
1558
1561
|
};
|
|
1559
|
-
var customPaginationSize = ((
|
|
1562
|
+
var customPaginationSize = ((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.customPaginationCount)
|
|
1560
1563
|
? props.organise.customPaginationCount(size)
|
|
1561
1564
|
: undefined;
|
|
1562
1565
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1563
1566
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1564
|
-
dbModule: (
|
|
1567
|
+
dbModule: (_72 = props.lib) === null || _72 === void 0 ? void 0 : _72.axios,
|
|
1565
1568
|
dbType: devSettings.server,
|
|
1566
1569
|
dbCollection: props.collectionId,
|
|
1567
1570
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1569,7 +1572,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1569
1572
|
dbUserToken: devSettings.dbUserToken,
|
|
1570
1573
|
});
|
|
1571
1574
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1572
|
-
dbModule: (
|
|
1575
|
+
dbModule: (_73 = props.lib) === null || _73 === void 0 ? void 0 : _73.axios,
|
|
1573
1576
|
dbType: devSettings.server,
|
|
1574
1577
|
dbCollection: props.collectionId,
|
|
1575
1578
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1577,12 +1580,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1577
1580
|
dbUserToken: devSettings.dbUserToken,
|
|
1578
1581
|
});
|
|
1579
1582
|
var moreButtonPopUp = [
|
|
1580
|
-
((
|
|
1583
|
+
((_74 = props.edit) === null || _74 === void 0 ? void 0 : _74.allEditable) &&
|
|
1581
1584
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1582
1585
|
// datasheet served through one can import; only the browser-direct
|
|
1583
1586
|
// Firebase client has no server to import through
|
|
1584
1587
|
!isFirebaseClient &&
|
|
1585
|
-
!((
|
|
1588
|
+
!((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideImportCSV)
|
|
1586
1589
|
? {
|
|
1587
1590
|
text: "Import Excel",
|
|
1588
1591
|
onClick: function () {
|
|
@@ -1591,7 +1594,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1591
1594
|
},
|
|
1592
1595
|
}
|
|
1593
1596
|
: null,
|
|
1594
|
-
!((
|
|
1597
|
+
!((_78 = (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.exportSettings) === null || _78 === void 0 ? void 0 : _78.hideExportCSV)
|
|
1595
1598
|
? {
|
|
1596
1599
|
text: "Export CSV",
|
|
1597
1600
|
onClick: function () {
|
|
@@ -1601,7 +1604,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1601
1604
|
},
|
|
1602
1605
|
}
|
|
1603
1606
|
: null,
|
|
1604
|
-
!((
|
|
1607
|
+
!((_80 = (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.exportSettings) === null || _80 === void 0 ? void 0 : _80.hideExportExcel)
|
|
1605
1608
|
? {
|
|
1606
1609
|
text: "Export Excel",
|
|
1607
1610
|
onClick: function () {
|
|
@@ -1611,7 +1614,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1611
1614
|
},
|
|
1612
1615
|
}
|
|
1613
1616
|
: null,
|
|
1614
|
-
!((
|
|
1617
|
+
!((_82 = (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.exportSettings) === null || _82 === void 0 ? void 0 : _82.hideExportPDF)
|
|
1615
1618
|
? {
|
|
1616
1619
|
text: "Export PDF",
|
|
1617
1620
|
onClick: function () {
|
|
@@ -1621,7 +1624,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1621
1624
|
},
|
|
1622
1625
|
}
|
|
1623
1626
|
: null,
|
|
1624
|
-
!((
|
|
1627
|
+
!((_84 = (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.exportSettings) === null || _84 === void 0 ? void 0 : _84.hideExportQR)
|
|
1625
1628
|
? {
|
|
1626
1629
|
text: "Export QR",
|
|
1627
1630
|
onClick: function () {
|
|
@@ -1631,7 +1634,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1631
1634
|
},
|
|
1632
1635
|
}
|
|
1633
1636
|
: null,
|
|
1634
|
-
!((
|
|
1637
|
+
!((_86 = (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.exportSettings) === null || _86 === void 0 ? void 0 : _86.hideExportQR)
|
|
1635
1638
|
? {
|
|
1636
1639
|
text: "Export QR(Data)",
|
|
1637
1640
|
onClick: function () {
|
|
@@ -1641,7 +1644,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1641
1644
|
},
|
|
1642
1645
|
}
|
|
1643
1646
|
: null,
|
|
1644
|
-
!((
|
|
1647
|
+
!((_88 = (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.exportSettings) === null || _88 === void 0 ? void 0 : _88.hideExportPrint)
|
|
1645
1648
|
? {
|
|
1646
1649
|
text: "Print",
|
|
1647
1650
|
onClick: function () {
|
|
@@ -1653,8 +1656,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1653
1656
|
: null,
|
|
1654
1657
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1655
1658
|
// nothing to find on any other page
|
|
1656
|
-
((
|
|
1657
|
-
!((
|
|
1659
|
+
((_89 = props.edit) === null || _89 === void 0 ? void 0 : _89.enableUpdateDraft) &&
|
|
1660
|
+
!((_91 = (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.exportSettings) === null || _91 === void 0 ? void 0 : _91.hideExportDraft)
|
|
1658
1661
|
? {
|
|
1659
1662
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1660
1663
|
onClick: function () {
|
|
@@ -1663,7 +1666,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1663
1666
|
}
|
|
1664
1667
|
: null,
|
|
1665
1668
|
].filter(Boolean);
|
|
1666
|
-
if ((
|
|
1669
|
+
if ((_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.moreSettings)
|
|
1667
1670
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1668
1671
|
//=====================================================================================
|
|
1669
1672
|
//SECTION: User Column Visibility Handlers
|
|
@@ -2046,6 +2049,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2046
2049
|
handleRefreshRows: handleRefreshRows,
|
|
2047
2050
|
handleCatchUpRows: handleCatchUpRows,
|
|
2048
2051
|
handleRefreshLoadedRows: handleRefreshLoadedRows,
|
|
2052
|
+
handleRecountComments: handleRecountComments,
|
|
2049
2053
|
handleFormSubmit: handleFormSubmit,
|
|
2050
2054
|
handleFormCheck: handleFormCheck,
|
|
2051
2055
|
handleApplyFlexFilters: handleApplyFlexFilters,
|
|
@@ -2102,14 +2106,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2102
2106
|
//=====================================================================================
|
|
2103
2107
|
//SECTION: Saved Views
|
|
2104
2108
|
//=====================================================================================
|
|
2105
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
2109
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.persistKey, (_94 = devSettings.currentUser) === null || _94 === void 0 ? void 0 : _94.userEmail);
|
|
2106
2110
|
(0, react_1.useEffect)(function () {
|
|
2107
2111
|
if (isSavedViewsEnabled && !isAppViews)
|
|
2108
2112
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
2109
2113
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
2110
2114
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
2111
2115
|
// browser until the person updates the view for everyone or resets it
|
|
2112
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
2116
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.allView) !== undefined;
|
|
2113
2117
|
var handleGetViewDraftKey = function (viewId) {
|
|
2114
2118
|
var _a, _b;
|
|
2115
2119
|
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);
|
|
@@ -2238,7 +2242,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2238
2242
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
2239
2243
|
(0, react_1.useEffect)(function () {
|
|
2240
2244
|
lastSentSharedViewsRef.current = null;
|
|
2241
|
-
}, [(
|
|
2245
|
+
}, [(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.sharedViews]);
|
|
2242
2246
|
var handleStoreSharedViews = function (update) {
|
|
2243
2247
|
var _a, _b, _c;
|
|
2244
2248
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -2255,7 +2259,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2255
2259
|
var openingViewSettledRef = (0, react_1.useRef)(false);
|
|
2256
2260
|
// INFO: keyed on the ids, so a list handed in again on every render does
|
|
2257
2261
|
// not re-run the opening
|
|
2258
|
-
var starredViewIdsKey = ((
|
|
2262
|
+
var starredViewIdsKey = ((_98 = (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.defaultSavedViewIds) !== null && _98 !== void 0 ? _98 : []).join("|");
|
|
2259
2263
|
(0, react_1.useEffect)(function () {
|
|
2260
2264
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2261
2265
|
if (!isSavedViewsEnabled || openingViewSettledRef.current)
|
|
@@ -2299,13 +2303,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2299
2303
|
/* eslint-disable */
|
|
2300
2304
|
}, [
|
|
2301
2305
|
isSavedViewsEnabled,
|
|
2302
|
-
(
|
|
2306
|
+
(_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.initialSavedViewId,
|
|
2303
2307
|
starredViewIdsKey,
|
|
2304
|
-
(
|
|
2308
|
+
(_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.sharedViews,
|
|
2305
2309
|
savedViews,
|
|
2306
2310
|
]);
|
|
2307
2311
|
/* eslint-enable */
|
|
2308
|
-
var appDefaultViewIds = ((
|
|
2312
|
+
var appDefaultViewIds = ((_102 = (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.defaultSavedViews) !== null && _102 !== void 0 ? _102 : [])
|
|
2309
2313
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
2310
2314
|
.join("|");
|
|
2311
2315
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -2734,8 +2738,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2734
2738
|
laneWidths,
|
|
2735
2739
|
drawerWidth,
|
|
2736
2740
|
pinnedColumnIds,
|
|
2737
|
-
(
|
|
2738
|
-
(
|
|
2741
|
+
(_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.allView,
|
|
2742
|
+
(_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.sharedViews,
|
|
2739
2743
|
savedViews,
|
|
2740
2744
|
]);
|
|
2741
2745
|
/* eslint-enable */
|
|
@@ -2779,7 +2783,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2779
2783
|
if (scrollRestoredRef.current)
|
|
2780
2784
|
scrollCatchUpRef.current = null;
|
|
2781
2785
|
/* eslint-disable */
|
|
2782
|
-
}, [props.collectionId, (
|
|
2786
|
+
}, [props.collectionId, (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.persistKey]);
|
|
2783
2787
|
/* eslint-enable */
|
|
2784
2788
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2785
2789
|
(0, react_1.useEffect)(function () {
|
|
@@ -2814,7 +2818,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2814
2818
|
(0, react_1.useEffect)(function () {
|
|
2815
2819
|
handleOfflinePrefetch();
|
|
2816
2820
|
/* eslint-disable */
|
|
2817
|
-
}, [props.collectionId, (
|
|
2821
|
+
}, [props.collectionId, (_106 = props.bareSettings) === null || _106 === void 0 ? void 0 : _106.bareOffline]);
|
|
2818
2822
|
/* eslint-enable */
|
|
2819
2823
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2820
2824
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2834,7 +2838,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2834
2838
|
}, interval);
|
|
2835
2839
|
return function () { return clearInterval(timer); };
|
|
2836
2840
|
/* eslint-disable */
|
|
2837
|
-
}, [(
|
|
2841
|
+
}, [(_107 = props.bareSettings) === null || _107 === void 0 ? void 0 : _107.barePollingInterval, isLive, isNetworkOffline]);
|
|
2838
2842
|
/* eslint-enable */
|
|
2839
2843
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2840
2844
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2876,7 +2880,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2876
2880
|
};
|
|
2877
2881
|
/* eslint-disable */
|
|
2878
2882
|
}, [
|
|
2879
|
-
(
|
|
2883
|
+
(_108 = props.bareSettings) === null || _108 === void 0 ? void 0 : _108.bareSocketName,
|
|
2880
2884
|
props.collectionId,
|
|
2881
2885
|
props.devSettings.sseEndpoint,
|
|
2882
2886
|
props.devSettings.dbAPIToken,
|
|
@@ -3153,10 +3157,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3153
3157
|
props.collectionId,
|
|
3154
3158
|
props.model,
|
|
3155
3159
|
props.localURLEndpoint,
|
|
3156
|
-
(
|
|
3160
|
+
(_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.extendedTabs,
|
|
3157
3161
|
listViewId,
|
|
3158
|
-
(
|
|
3159
|
-
(
|
|
3162
|
+
(_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.additionalQuery,
|
|
3163
|
+
(_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.groupBy,
|
|
3160
3164
|
resolvedType,
|
|
3161
3165
|
]);
|
|
3162
3166
|
/**
|
|
@@ -3308,7 +3312,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3308
3312
|
};
|
|
3309
3313
|
}, 100);
|
|
3310
3314
|
return function () { return clearTimeout(timeoutId); };
|
|
3311
|
-
}, [(
|
|
3315
|
+
}, [(_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
3312
3316
|
(0, react_1.useEffect)(function () {
|
|
3313
3317
|
if (resolvedType !== "read")
|
|
3314
3318
|
return;
|
|
@@ -5394,7 +5398,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5394
5398
|
// the link view ends and the list opens as it normally would. A change
|
|
5395
5399
|
// while a record is open (opening one drops the link from the URL) waits
|
|
5396
5400
|
// until the list shows again
|
|
5397
|
-
var lastInitialSearchRef = (0, react_1.useRef)((
|
|
5401
|
+
var lastInitialSearchRef = (0, react_1.useRef)((_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.initialSearch);
|
|
5398
5402
|
// INFO: persistViewState reads its stored state only once the link view
|
|
5399
5403
|
// has ended, a render later
|
|
5400
5404
|
var isNormalOpenPendingRef = (0, react_1.useRef)(false);
|
|
@@ -5421,7 +5425,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5421
5425
|
setIsLinkOpen(true);
|
|
5422
5426
|
handleApplySavedView(null, true, value);
|
|
5423
5427
|
/* eslint-disable */
|
|
5424
|
-
}, [(
|
|
5428
|
+
}, [(_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.initialSearch, resolvedType]);
|
|
5425
5429
|
(0, react_1.useEffect)(function () {
|
|
5426
5430
|
if (!isNormalOpenPendingRef.current || isLinkOpen)
|
|
5427
5431
|
return;
|
|
@@ -7665,7 +7669,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
7665
7669
|
var columnTypeActions = {
|
|
7666
7670
|
canUpdate: canUpdateRecord,
|
|
7667
7671
|
dateWarnings: isDateWarnings,
|
|
7668
|
-
onButtonClick: (
|
|
7672
|
+
onButtonClick: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.onButtonClick,
|
|
7669
7673
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7670
7674
|
var _a;
|
|
7671
7675
|
return __generator(this, function (_b) {
|
|
@@ -7682,7 +7686,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
7682
7686
|
}
|
|
7683
7687
|
});
|
|
7684
7688
|
}); },
|
|
7685
|
-
onTimeTrackingAction: ((
|
|
7689
|
+
onTimeTrackingAction: ((_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.onTimeTrackingAction) && canUpdateRecord
|
|
7686
7690
|
? function (rowId, columnId, action) {
|
|
7687
7691
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
7688
7692
|
}
|
|
@@ -9947,14 +9951,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9947
9951
|
: rows;
|
|
9948
9952
|
};
|
|
9949
9953
|
/* eslint-disable */
|
|
9950
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
9951
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
9954
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_117 = props.bareSettings) === null || _117 === void 0 ? void 0 : _117.bareNewDTW]);
|
|
9955
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_118 = props.bareSettings) === null || _118 === void 0 ? void 0 : _118.bareNewDTW]);
|
|
9952
9956
|
/* eslint-enable */
|
|
9953
|
-
// INFO:
|
|
9954
|
-
//
|
|
9955
|
-
//
|
|
9956
|
-
//
|
|
9957
|
-
//
|
|
9957
|
+
// INFO: a row's buttons beside its title, decided by where its record opens.
|
|
9958
|
+
// - With the read drawer, the record, its Update button and its Activity tab
|
|
9959
|
+
// share that one drawer, so a row with activity carries only the comment
|
|
9960
|
+
// bubble, opening the drawer on its Activity tab.
|
|
9961
|
+
// - Without it, the read view is a page (the built-in one or the host's own
|
|
9962
|
+
// path through handleNavigate), so the bubble opens the activity drawer
|
|
9963
|
+
// over the table for a quick look, and the pencil goes to the read view.
|
|
9964
|
+
// The pencil opens the READ view, not the edit form — the read view holds
|
|
9965
|
+
// Update for whoever may update — so it is shown to anyone who can see the
|
|
9966
|
+
// record. A table needs it even though a read-only cell opens the record,
|
|
9967
|
+
// since an editable title cell turns into an input when clicked. Cards open
|
|
9968
|
+
// their record from the card and carry the bubble alone.
|
|
9958
9969
|
var handleOpenRecordEdit = function (id) {
|
|
9959
9970
|
var _a, _b;
|
|
9960
9971
|
handleCaptureListScroll(id);
|
|
@@ -9965,10 +9976,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9965
9976
|
handleCaptureListScroll(id);
|
|
9966
9977
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
9967
9978
|
};
|
|
9968
|
-
// INFO: with the activity shown in place, a row's comment button opens that
|
|
9969
|
-
// row's comments and logs where the list was, rather than stacking a second
|
|
9970
|
-
// drawer
|
|
9971
9979
|
var handleOpenRecordActivity = function (id) {
|
|
9980
|
+
var _a, _b;
|
|
9972
9981
|
// INFO: the panel records each comment as seen while it is on screen, and
|
|
9973
9982
|
// the count asked when it closes may run before those views are saved, so
|
|
9974
9983
|
// the bubble greys as it opens
|
|
@@ -9976,21 +9985,37 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9976
9985
|
var _a;
|
|
9977
9986
|
return previous[id] ? __assign(__assign({}, previous), (_a = {}, _a[id] = false, _a)) : previous;
|
|
9978
9987
|
});
|
|
9979
|
-
if (
|
|
9980
|
-
|
|
9981
|
-
|
|
9988
|
+
if (hasNavigation && hasReadDrawer) {
|
|
9989
|
+
handleCaptureListScroll(id);
|
|
9990
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, readViewIds_1.ACTIVITY_VIEW_ID);
|
|
9982
9991
|
return;
|
|
9983
9992
|
}
|
|
9993
|
+
// INFO: without the read drawer the table stays on screen beside the log
|
|
9984
9994
|
setActivityId(id);
|
|
9985
9995
|
setActivityModal(true);
|
|
9986
9996
|
};
|
|
9997
|
+
// INFO: the activity drawer is mounted only where something opens it: the
|
|
9998
|
+
// Log button on a read page, the row bubble when it does not open the
|
|
9999
|
+
// record, or the collection-wide clock on a list. A related tab's list and
|
|
10000
|
+
// the record the read drawer nests have none of these, so they mount none
|
|
10001
|
+
var canOpenActivityDrawer = !!isActivityLog &&
|
|
10002
|
+
(!hasActivityTab ||
|
|
10003
|
+
!hasNavigation ||
|
|
10004
|
+
(resolvedType === "list" &&
|
|
10005
|
+
!((_119 = props.bareSettings) === null || _119 === void 0 ? void 0 : _119.bareHideCollectionActivity)));
|
|
10006
|
+
// INFO: in a drawer the bubble opens the record with its details as well
|
|
10007
|
+
var recordActivityLabel = hasNavigation && hasReadDrawer ? "Open activity and details" : undefined;
|
|
10008
|
+
// INFO: kept for the map's info window, which has no read view to defer to
|
|
9987
10009
|
var recordEditAction = canUpdateRecord ? handleOpenRecordEdit : undefined;
|
|
9988
|
-
// INFO: the chevron only navigates through handleNavigate, so a host that
|
|
9989
|
-
// routes by url gets none rather than a button that does nothing
|
|
9990
|
-
var recordOpenAction = hasNavigation ? handleOpenRecordRead : undefined;
|
|
9991
10010
|
var recordActivityAction = isActivityLog
|
|
9992
10011
|
? handleOpenRecordActivity
|
|
9993
10012
|
: undefined;
|
|
10013
|
+
// INFO: the pencil only navigates through handleNavigate, so a host that
|
|
10014
|
+
// routes by url gets none rather than a button that does nothing. With the
|
|
10015
|
+
// read drawer and activity, the bubble opens the record instead.
|
|
10016
|
+
var recordReadAction = hasNavigation && !(hasReadDrawer && recordActivityAction)
|
|
10017
|
+
? handleOpenRecordRead
|
|
10018
|
+
: undefined;
|
|
9994
10019
|
// INFO: isNewTable — the new table opens a record from its title, edits in
|
|
9995
10020
|
// the cell and carries the comment bubble beside the title, so its rows
|
|
9996
10021
|
// drop the pencil and bubble column and keep only the host's own actions
|
|
@@ -10489,9 +10514,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10489
10514
|
var showUpdate = !bareActionComponent && canUpdateRecord;
|
|
10490
10515
|
var showExport = !!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF);
|
|
10491
10516
|
var showDelete = canDeleteRecord && props.id !== "new";
|
|
10492
|
-
// INFO:
|
|
10493
|
-
// related row with nothing else to act on
|
|
10494
|
-
|
|
10517
|
+
// INFO: in a drawer the record's comments and logs are its Activity tab,
|
|
10518
|
+
// so there is no Log button and a related row with nothing else to act on
|
|
10519
|
+
// draws no bar at all. On a page the Log button opens the activity drawer
|
|
10520
|
+
var showLog = !!isActivityLog && !hasActivityTab;
|
|
10495
10521
|
if (!hasCustomActions &&
|
|
10496
10522
|
!showUpdate &&
|
|
10497
10523
|
!showExport &&
|
|
@@ -10776,7 +10802,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10776
10802
|
bareCompactMode: !isForm }, props.bareSettings), {
|
|
10777
10803
|
// INFO: the nested instance draws the form rather than hosting
|
|
10778
10804
|
// another panel
|
|
10779
|
-
bareFormDrawer: false
|
|
10805
|
+
bareFormDrawer: false,
|
|
10806
|
+
// INFO: marks the record as opened in a drawer, so it carries
|
|
10807
|
+
// its Activity tab instead of a Log button opening a second one
|
|
10808
|
+
bareInlineActivity: true }), (isDrawerHost
|
|
10780
10809
|
? {}
|
|
10781
10810
|
: {
|
|
10782
10811
|
barePollingInterval: undefined,
|
|
@@ -10790,7 +10819,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10790
10819
|
handleNavigateFromDrawer("list", "");
|
|
10791
10820
|
} }))); } })); };
|
|
10792
10821
|
var renderContent = function () {
|
|
10793
|
-
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;
|
|
10822
|
+
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;
|
|
10794
10823
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
10795
10824
|
var tabs = renderTabs();
|
|
10796
10825
|
var pages = [
|
|
@@ -10830,25 +10859,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10830
10859
|
props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_h = props.organise) === null || _h === void 0 ? void 0 : _h.darkMode) ? "text-white" : "") }, props.title)),
|
|
10831
10860
|
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
|
|
10832
10861
|
renderActionButtons(resolvedType))),
|
|
10833
|
-
(
|
|
10834
|
-
(
|
|
10835
|
-
|
|
10836
|
-
|
|
10862
|
+
!((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideReadTabs) &&
|
|
10863
|
+
(schemaPresent ||
|
|
10864
|
+
((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadListTabs) ||
|
|
10865
|
+
relatedSections.length > 0 ||
|
|
10866
|
+
hasActivityTab) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode })),
|
|
10867
|
+
((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) === "top" &&
|
|
10837
10868
|
renderBareReadComp(),
|
|
10838
|
-
((
|
|
10869
|
+
((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateActionTop) &&
|
|
10839
10870
|
!selectedRelated &&
|
|
10840
|
-
!
|
|
10871
|
+
!isActivityTab &&
|
|
10841
10872
|
renderReadBar(),
|
|
10842
10873
|
(anyAuthMethod ||
|
|
10843
|
-
(authLoading && ((
|
|
10874
|
+
(authLoading && ((_p = props.space) === null || _p === void 0 ? void 0 : _p.authDatabase))) && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, authLoading ? (react_1.default.createElement("div", { className: "flex justify-center py-1", "data-testid": "dtw-auth-loading" },
|
|
10844
10875
|
react_1.default.createElement(loading_1.Loading, { sizeClassName: "h-6 w-6" }))) : (renderAuthContent()))),
|
|
10845
|
-
|
|
10846
|
-
selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (
|
|
10847
|
-
((
|
|
10876
|
+
isActivityTab ? (react_1.default.createElement("div", { "data-testid": "dt-activity-tab", className: "mt-4" }, renderActivityPanel((_q = props.id) !== null && _q !== void 0 ? _q : ""))) : (react_1.default.createElement("div", { ref: exportReadPDFRef },
|
|
10877
|
+
selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (_r = props.id) !== null && _r !== void 0 ? _r : "", renderList: renderRelatedList, hasActivity: !!isActivityLog, darkMode: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkMode })) : (!((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType)))),
|
|
10878
|
+
((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareReadComponentPos) !== "top" &&
|
|
10848
10879
|
renderBareReadComp())),
|
|
10849
|
-
!((
|
|
10880
|
+
!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareUpdateActionTop) &&
|
|
10850
10881
|
!selectedRelated &&
|
|
10851
|
-
!
|
|
10882
|
+
!isActivityTab &&
|
|
10852
10883
|
renderReadBar()))));
|
|
10853
10884
|
case "update":
|
|
10854
10885
|
if (props.id !== "new") {
|
|
@@ -10859,12 +10890,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10859
10890
|
});
|
|
10860
10891
|
}
|
|
10861
10892
|
pages.push({
|
|
10862
|
-
name: (
|
|
10893
|
+
name: (_y = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.breadcrumbAttributeId) !== null && _x !== void 0 ? _x : serverId]) !== null && _y !== void 0 ? _y : (props.id ? props.id : "new"),
|
|
10863
10894
|
href: "#",
|
|
10864
10895
|
current: true,
|
|
10865
10896
|
});
|
|
10866
10897
|
var filterModel_1 = [];
|
|
10867
|
-
var disabledOnEnter_1 = (
|
|
10898
|
+
var disabledOnEnter_1 = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.disabledOnEnter) !== null && _0 !== void 0 ? _0 : false;
|
|
10868
10899
|
structure.map(function (eachModel) {
|
|
10869
10900
|
var _a;
|
|
10870
10901
|
var present = false;
|
|
@@ -10977,12 +11008,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10977
11008
|
}
|
|
10978
11009
|
}
|
|
10979
11010
|
};
|
|
10980
|
-
var hasTabAlign_1 = ((
|
|
10981
|
-
var leftTabAlign = ((
|
|
10982
|
-
((
|
|
10983
|
-
var topTabAlign = ((
|
|
10984
|
-
var stepperTabAlign = ((
|
|
10985
|
-
((
|
|
11011
|
+
var hasTabAlign_1 = ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.tabAlign) || ((_2 = props.space) === null || _2 === void 0 ? void 0 : _2.tabAlign);
|
|
11012
|
+
var leftTabAlign = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.tabAlign) === "left" ||
|
|
11013
|
+
((_4 = props.space) === null || _4 === void 0 ? void 0 : _4.tabAlign) === "left";
|
|
11014
|
+
var topTabAlign = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "top" || ((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.tabAlign) === "top";
|
|
11015
|
+
var stepperTabAlign = ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.tabAlign) === "stepper" ||
|
|
11016
|
+
((_8 = props.space) === null || _8 === void 0 ? void 0 : _8.tabAlign) === "stepper";
|
|
10986
11017
|
var uniqueTabIds_2 = Array.from(new Set(filterModel_1
|
|
10987
11018
|
.map(function (item) { return item.tabId; })
|
|
10988
11019
|
.filter(function (id) { return id !== undefined; })));
|
|
@@ -10991,7 +11022,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
10991
11022
|
if (shouldIncludeOthers) {
|
|
10992
11023
|
uniqueTabIds_2.push("");
|
|
10993
11024
|
}
|
|
10994
|
-
var customTabComponent_1 = (
|
|
11025
|
+
var customTabComponent_1 = (_11 = (_10 = (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateTabComponent) === null || _10 === void 0 ? void 0 : _10.call(_9, uniqueTabIds_2)) !== null && _11 !== void 0 ? _11 : [];
|
|
10995
11026
|
var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
|
|
10996
11027
|
var _a, _b;
|
|
10997
11028
|
var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
|
|
@@ -11027,7 +11058,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11027
11058
|
props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
|
|
11028
11059
|
dbModule: dbModule,
|
|
11029
11060
|
dbType: devSettings.server,
|
|
11030
|
-
dbCollection: (
|
|
11061
|
+
dbCollection: (_13 = (_12 = props === null || props === void 0 ? void 0 : props.space) === null || _12 === void 0 ? void 0 : _12.pipelineDefaultSpaceId) !== null && _13 !== void 0 ? _13 : props.collectionId,
|
|
11031
11062
|
dbEndpoint: devSettings.dbEndpoint,
|
|
11032
11063
|
dbAPIToken: devSettings.dbAPIToken,
|
|
11033
11064
|
dbUserToken: devSettings.dbUserToken,
|
|
@@ -11035,11 +11066,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11035
11066
|
type: "get",
|
|
11036
11067
|
id: props.id,
|
|
11037
11068
|
pipeline: pipeline,
|
|
11038
|
-
}, offline: ((
|
|
11069
|
+
}, offline: ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
|
|
11039
11070
|
renderBreadcrumb(pages),
|
|
11040
11071
|
react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
|
|
11041
11072
|
(props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
|
|
11042
|
-
props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((
|
|
11073
|
+
props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.darkMode) ? "text-white" : "") }, props.title)),
|
|
11043
11074
|
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
|
|
11044
11075
|
(!isBottom || hasTabAlign_1 || resolvedType === "update") &&
|
|
11045
11076
|
renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)),
|
|
@@ -11058,10 +11089,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11058
11089
|
var tabId = uniqueTabIds_2[stepIndex];
|
|
11059
11090
|
handleUpdateTabId(tabId);
|
|
11060
11091
|
} })),
|
|
11061
|
-
((
|
|
11062
|
-
((
|
|
11063
|
-
((
|
|
11064
|
-
((
|
|
11092
|
+
((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponentAbove) &&
|
|
11093
|
+
((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent) &&
|
|
11094
|
+
((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent(selectedData, handleResolveRawData())),
|
|
11095
|
+
((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateActionTop) &&
|
|
11065
11096
|
renderStepBar(uniqueTabIds_2),
|
|
11066
11097
|
react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
|
|
11067
11098
|
uniqueTabIds_2.map(function (tabId) {
|
|
@@ -11083,8 +11114,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11083
11114
|
((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.tabDescriptions) === null || _c === void 0 ? void 0 : _c[tabId]) && (react_1.default.createElement("p", { className: "text-sm mt-0.5 ".concat(((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "text-gray-400" : "text-gray-500") }, props.organise.tabDescriptions[tabId])))),
|
|
11084
11115
|
renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
|
|
11085
11116
|
}),
|
|
11086
|
-
!((
|
|
11087
|
-
((
|
|
11117
|
+
!((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponentAbove) &&
|
|
11118
|
+
((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponent) && (
|
|
11088
11119
|
// INFO: the form is a grid-cols-12. A child with no column span is one
|
|
11089
11120
|
// column, and a grid item cannot shrink below its longest word, so on a
|
|
11090
11121
|
// phone it wraps one word per line. `contents` takes this wrapper out of
|
|
@@ -11094,20 +11125,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11094
11125
|
react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
|
|
11095
11126
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
|
|
11096
11127
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
|
|
11097
|
-
!((
|
|
11128
|
+
!((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateActionTop) &&
|
|
11098
11129
|
renderStepBar(uniqueTabIds_2),
|
|
11099
11130
|
isBottom &&
|
|
11100
11131
|
resolvedType !== "update" &&
|
|
11101
11132
|
renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
|
|
11102
|
-
((
|
|
11103
|
-
((
|
|
11104
|
-
((
|
|
11105
|
-
((
|
|
11133
|
+
((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateComponentAbove) &&
|
|
11134
|
+
((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateComponent) &&
|
|
11135
|
+
((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponent(selectedData, handleResolveRawData())),
|
|
11136
|
+
((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateActionTop) &&
|
|
11106
11137
|
renderStepBar(uniqueTabIds_2),
|
|
11107
11138
|
react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
|
|
11108
11139
|
renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
|
|
11109
|
-
!((
|
|
11110
|
-
((
|
|
11140
|
+
!((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareUpdateComponentAbove) &&
|
|
11141
|
+
((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareUpdateComponent) && (
|
|
11111
11142
|
// INFO: the form is a grid-cols-12. A child with no column span is one
|
|
11112
11143
|
// column, and a grid item cannot shrink below its longest word, so on a
|
|
11113
11144
|
// phone it wraps one word per line. `contents` takes this wrapper out of
|
|
@@ -11117,7 +11148,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11117
11148
|
react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
|
|
11118
11149
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
|
|
11119
11150
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
|
|
11120
|
-
!((
|
|
11151
|
+
!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareUpdateActionTop) &&
|
|
11121
11152
|
renderStepBar(uniqueTabIds_2)))));
|
|
11122
11153
|
case "list":
|
|
11123
11154
|
case "union":
|
|
@@ -11128,27 +11159,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11128
11159
|
// Counts query output so the badge matches what's actually filtered.
|
|
11129
11160
|
// INFO: one per filter row that filters — several rows on one related
|
|
11130
11161
|
// datasheet send one condition, and a list count can send two
|
|
11131
|
-
var activeFlexFilterCount_1 = ((
|
|
11162
|
+
var activeFlexFilterCount_1 = ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareFlexFilters)
|
|
11132
11163
|
? flexFilters.filter(function (eachFilter) {
|
|
11133
11164
|
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
|
|
11134
11165
|
}).length
|
|
11135
11166
|
: 0;
|
|
11136
11167
|
// INFO: without the floating bar these buttons would have nowhere to
|
|
11137
11168
|
// go, so a hidden search keeps the normal header
|
|
11138
|
-
var isMobileToolbar_1 = !!((
|
|
11139
|
-
!!((
|
|
11140
|
-
!((
|
|
11169
|
+
var isMobileToolbar_1 = !!((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListMobileToolbar) &&
|
|
11170
|
+
!!((_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareListMobileFloatingSearch) &&
|
|
11171
|
+
!((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.hideSearch);
|
|
11141
11172
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
11142
11173
|
dbModule: dbModule,
|
|
11143
11174
|
dbType: devSettings.server,
|
|
11144
|
-
dbCollection: (
|
|
11175
|
+
dbCollection: (_35 = (_34 = props === null || props === void 0 ? void 0 : props.space) === null || _34 === void 0 ? void 0 : _34.pipelineDefaultSpaceId) !== null && _35 !== void 0 ? _35 : props.collectionId,
|
|
11145
11176
|
dbEndpoint: devSettings.dbEndpoint,
|
|
11146
11177
|
dbAPIToken: devSettings.dbAPIToken,
|
|
11147
11178
|
dbUserToken: devSettings.dbUserToken,
|
|
11148
|
-
}, cond: handleReadQueryHocCond(), offline: ((
|
|
11179
|
+
}, cond: handleReadQueryHocCond(), offline: ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
|
|
11149
11180
|
handleGetListData(data, "", "", cond);
|
|
11150
11181
|
}, onError: handleGetItemError }));
|
|
11151
|
-
if ((
|
|
11182
|
+
if ((_37 = props.renderSettings) === null || _37 === void 0 ? void 0 : _37.renderListUI) {
|
|
11152
11183
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
11153
11184
|
listReadQueryHOC,
|
|
11154
11185
|
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
@@ -11362,47 +11393,47 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11362
11393
|
listReadQueryHOC,
|
|
11363
11394
|
react_1.default.createElement("div", { className: "flex py-2 ".concat(isMobileToolbar_1
|
|
11364
11395
|
? "w-full flex-row items-center md:items-end"
|
|
11365
|
-
: ((
|
|
11396
|
+
: ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareCompactMode)
|
|
11366
11397
|
? // INFO: the grow spacer is hidden on phones (search lives in
|
|
11367
11398
|
// the floating bar), so the row itself pushes the actions right
|
|
11368
11399
|
"w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
|
|
11369
11400
|
: "flex-col md:items-end md:flex-row") },
|
|
11370
11401
|
(props.title || props.description) && (react_1.default.createElement("div", { className: "flex min-w-0 flex-col" },
|
|
11371
11402
|
props.title && (react_1.default.createElement("div", { className: "flex min-w-0 items-center gap-2" },
|
|
11372
|
-
react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((
|
|
11373
|
-
((
|
|
11403
|
+
react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.darkMode) ? "text-white" : "") }, props.title),
|
|
11404
|
+
((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareSocketName) &&
|
|
11374
11405
|
isLive &&
|
|
11375
11406
|
!isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700" },
|
|
11376
11407
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
|
|
11377
11408
|
"LIVE")),
|
|
11378
|
-
((
|
|
11409
|
+
((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
|
|
11379
11410
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
|
|
11380
11411
|
"OFFLINE")))),
|
|
11381
11412
|
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500 ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "") }, props.description)))),
|
|
11382
|
-
react_1.default.createElement("div", { className: ((
|
|
11413
|
+
react_1.default.createElement("div", { className: ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareCompactMode)
|
|
11383
11414
|
? "hidden sm:block grow"
|
|
11384
11415
|
: "grow" }),
|
|
11385
11416
|
react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end ".concat(isMobileToolbar_1 ? "shrink-0" : "") },
|
|
11386
11417
|
renderListFilterElements(),
|
|
11387
11418
|
renderListActionElements())),
|
|
11388
11419
|
renderListNewRowFilterElements(),
|
|
11389
|
-
(schemaPresent || ((
|
|
11420
|
+
(schemaPresent || ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: draggedTabs !== null && draggedTabs !== void 0 ? draggedTabs : tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, draggable: isEditor && !!((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.onChangeTabs), handleChangeTabs: handleDragTabs, handleDropEnd: handleDropTabs, darkMode: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode })),
|
|
11390
11421
|
renderScopedTabContent(tabs, resolvedType, viewType),
|
|
11391
|
-
((
|
|
11392
|
-
((
|
|
11422
|
+
((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
|
|
11423
|
+
((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListMobileFloatingSearch) &&
|
|
11393
11424
|
(0, listModule_1.renderFloatingMobileSearch)({
|
|
11394
11425
|
filterSearch: filterSearch,
|
|
11395
11426
|
handleNameSearch: handleNameSearch,
|
|
11396
11427
|
onFilterClick: function () { return setFlexFilterModalOpen(true); },
|
|
11397
|
-
hideSearch: (
|
|
11398
|
-
darkMode: (
|
|
11399
|
-
floatingOffset: (
|
|
11400
|
-
hideFilter: !((
|
|
11401
|
-
activeFilterCount: ((
|
|
11428
|
+
hideSearch: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.hideSearch,
|
|
11429
|
+
darkMode: (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.darkMode,
|
|
11430
|
+
floatingOffset: (_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareListFloatingActionOffset,
|
|
11431
|
+
hideFilter: !((_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareFlexFilters),
|
|
11432
|
+
activeFilterCount: ((_52 = props.bareSettings) === null || _52 === void 0 ? void 0 : _52.bareFlexFilters)
|
|
11402
11433
|
? activeFlexFilterCount_1
|
|
11403
11434
|
: undefined,
|
|
11404
11435
|
// INFO: Hides when items are selected so NewTable's multi-action bar takes over.
|
|
11405
|
-
hidden: selectAll || ((
|
|
11436
|
+
hidden: selectAll || ((_53 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _53 !== void 0 ? _53 : 0) > 0,
|
|
11406
11437
|
onRefreshClick: isMobileToolbar_1 && schemaPresent
|
|
11407
11438
|
? function () { return handleRefresh(); }
|
|
11408
11439
|
: undefined,
|
|
@@ -11807,7 +11838,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11807
11838
|
var tabs = [
|
|
11808
11839
|
{
|
|
11809
11840
|
id: "general",
|
|
11810
|
-
|
|
11841
|
+
// INFO: beside the Activity tab it is the record's Details
|
|
11842
|
+
name: resolvedType === "list"
|
|
11843
|
+
? "Table View"
|
|
11844
|
+
: hasActivityTab
|
|
11845
|
+
? "Details"
|
|
11846
|
+
: "Card View",
|
|
11811
11847
|
fixed: true,
|
|
11812
11848
|
href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(resolvedType, "&collection=").concat(props.collectionId, "&view=general"),
|
|
11813
11849
|
},
|
|
@@ -11898,6 +11934,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11898
11934
|
href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=read&collection=").concat(props.collectionId, "&view=").concat(eachSection.id),
|
|
11899
11935
|
});
|
|
11900
11936
|
});
|
|
11937
|
+
// INFO: the record's comments and logs, in place of the Log button's
|
|
11938
|
+
// second drawer, where the record opens in a drawer. First, before
|
|
11939
|
+
// Details; without them Details is the first tab. Fixed like Details so neither
|
|
11940
|
+
// can be dragged out of that order
|
|
11941
|
+
if (resolvedType === "read" && hasActivityTab)
|
|
11942
|
+
tabs.unshift({
|
|
11943
|
+
id: readViewIds_1.ACTIVITY_VIEW_ID,
|
|
11944
|
+
name: "Activity",
|
|
11945
|
+
fixed: true,
|
|
11946
|
+
href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=read&collection=").concat(props.collectionId, "&view=").concat(readViewIds_1.ACTIVITY_VIEW_ID),
|
|
11947
|
+
});
|
|
11901
11948
|
if (isEditor)
|
|
11902
11949
|
if (!((_d = props.organise) === null || _d === void 0 ? void 0 : _d.hideNewTabs) && !((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareReadListTabs))
|
|
11903
11950
|
tabs.push({
|
|
@@ -12057,7 +12104,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12057
12104
|
// at this record and read-only. Without a schema endpoint it carries no tabs
|
|
12058
12105
|
// of its own, and a picked row opens in place instead of navigating away, so
|
|
12059
12106
|
// this record's tabs stay put.
|
|
12060
|
-
var renderRelatedList = function (source, query, openId, onOpen) {
|
|
12107
|
+
var renderRelatedList = function (source, query, openId, onOpen, openViewId) {
|
|
12061
12108
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12062
12109
|
return (react_1.default.createElement(exports.DataTemplate, { title: "", description: "", type: openId ? "read" : "list", id: openId, collectionId: source.collectionId, model: source.schema, localURLEndpoint: props.localURLEndpoint, devSettings: __assign(__assign({}, props.devSettings), { schemaEndpoint: "" }), lib: props.lib,
|
|
12063
12110
|
// INFO: comments and logs only — the edit, delete and inline-edit
|
|
@@ -12069,8 +12116,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12069
12116
|
darkMode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode,
|
|
12070
12117
|
darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg,
|
|
12071
12118
|
breadcrumbType: "hidden",
|
|
12072
|
-
|
|
12073
|
-
|
|
12119
|
+
// INFO: the opened row keeps its tab, so its bubble lands on its
|
|
12120
|
+
// Activity tab and its tabs switch in place inside this one
|
|
12121
|
+
viewId: openId ? openViewId : undefined,
|
|
12122
|
+
handleNavigate: function (type, selectedId, viewId) {
|
|
12123
|
+
return type === "read" && selectedId
|
|
12124
|
+
? onOpen(selectedId, viewId)
|
|
12125
|
+
: onOpen("");
|
|
12074
12126
|
},
|
|
12075
12127
|
// INFO: asked with the related collection's id, so a host counts the
|
|
12076
12128
|
// comments on these rows rather than on its own sheet's
|
|
@@ -12087,9 +12139,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12087
12139
|
// list and its related tabs read as one
|
|
12088
12140
|
bareListGridLines: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridLines,
|
|
12089
12141
|
bareHideCollectionActivity: true,
|
|
12090
|
-
// INFO: a row's comment button opens
|
|
12091
|
-
//
|
|
12142
|
+
// INFO: a row's comment button opens the row in place on its Activity
|
|
12143
|
+
// tab, not a second drawer over the read drawer
|
|
12092
12144
|
bareInlineActivity: true,
|
|
12145
|
+
// INFO: the opened row's Activity | Details switch sits beside Back,
|
|
12146
|
+
// so its own tab bar would be a second row of tabs under this one
|
|
12147
|
+
bareHideReadTabs: true,
|
|
12093
12148
|
} }));
|
|
12094
12149
|
};
|
|
12095
12150
|
var renderAddMathColumn = function (id, onClose) {
|
|
@@ -12764,7 +12819,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12764
12819
|
else {
|
|
12765
12820
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
12766
12821
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
|
|
12767
|
-
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction, onRowEdit:
|
|
12822
|
+
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction, rowActivityLabel: recordActivityLabel, onRowEdit: recordReadAction, rowEditLabel: "Open details", commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, commentUnread: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts) ? commentUnread : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
|
|
12768
12823
|
? handleMoveRowToGroup
|
|
12769
12824
|
: undefined,
|
|
12770
12825
|
// INFO: per-group paging — scroll appends inside a band, page
|
|
@@ -13404,7 +13459,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13404
13459
|
// INFO: each section pages itself, so the list-wide pager would
|
|
13405
13460
|
// only page the read that seeded them
|
|
13406
13461
|
hidePagination: ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.hidePagination) ||
|
|
13407
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip,
|
|
13462
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip, onRowActivity: recordActivityAction, rowActivityLabel: recordActivityLabel })));
|
|
13408
13463
|
}
|
|
13409
13464
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13410
13465
|
react_1.default.createElement(list_1.List, { darkModeBg: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: ((_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.disableSelectFullData) === null || _7 === void 0 ? void 0 : _7.list) ||
|
|
@@ -13538,7 +13593,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13538
13593
|
// INFO: each section pages itself, so the list-wide pager would
|
|
13539
13594
|
// only page the read that seeded them
|
|
13540
13595
|
hidePagination: ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.hidePagination) ||
|
|
13541
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize,
|
|
13596
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, onCardActivity: recordActivityAction, cardActivityLabel: recordActivityLabel })));
|
|
13542
13597
|
}
|
|
13543
13598
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13544
13599
|
react_1.default.createElement(grid_1.Grid, { darkMode: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.darkMode, darkModeBg: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
|
|
@@ -14189,7 +14244,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14189
14244
|
var _a, _b;
|
|
14190
14245
|
handleCaptureListScroll(id);
|
|
14191
14246
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
14192
|
-
},
|
|
14247
|
+
}, onCardActivity: recordActivityAction, cardActivityLabel: recordActivityLabel, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg })));
|
|
14193
14248
|
}
|
|
14194
14249
|
return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
14195
14250
|
? "Data has exceeded limit, please apply filters"
|
|
@@ -14752,14 +14807,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14752
14807
|
};
|
|
14753
14808
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
14754
14809
|
renderNotification("root"),
|
|
14755
|
-
((
|
|
14810
|
+
((_121 = (_120 = props.renderSettings) === null || _120 === void 0 ? void 0 : _120.renderLoadingUI) === null || _121 === void 0 ? void 0 : _121.call(_120)) && loading ? ((_122 = props.renderSettings) === null || _122 === void 0 ? void 0 : _122.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_123 = props.organise) === null || _123 === void 0 ? void 0 : _123.darkMode, darkModeBg: (_124 = props.organise) === null || _124 === void 0 ? void 0 : _124.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
14756
14811
|
var _a, _b;
|
|
14757
14812
|
if (loading)
|
|
14758
14813
|
return;
|
|
14759
14814
|
handlePopUpModal(false);
|
|
14760
14815
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
14761
14816
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
14762
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14817
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_125 = props.organise) === null || _125 === void 0 ? void 0 : _125.darkMode, darkModeBg: (_126 = props.organise) === null || _126 === void 0 ? void 0 : _126.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
14763
14818
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
14764
14819
|
if (dataId) {
|
|
14765
14820
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -14775,19 +14830,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14775
14830
|
}, onClose: function () {
|
|
14776
14831
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
14777
14832
|
} }),
|
|
14778
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14833
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_127 = props.organise) === null || _127 === void 0 ? void 0 : _127.darkMode, darkModeBg: (_128 = props.organise) === null || _128 === void 0 ? void 0 : _128.darkModeBg, maxWidth: "2xl", open: referenceDeleteTableData.length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
14779
14834
|
setReferenceDeleteTableData([]);
|
|
14780
14835
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14781
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14836
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_129 = props.organise) === null || _129 === void 0 ? void 0 : _129.darkMode, darkModeBg: (_130 = props.organise) === null || _130 === void 0 ? void 0 : _130.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
14782
14837
|
setDeletePasscodeInput("");
|
|
14783
14838
|
setDeleteModal(!deleteModal);
|
|
14784
14839
|
setDeleteFeedId("");
|
|
14785
14840
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14786
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14841
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_131 = props.organise) === null || _131 === void 0 ? void 0 : _131.darkMode, darkModeBg: (_132 = props.organise) === null || _132 === void 0 ? void 0 : _132.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
14787
14842
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
14788
14843
|
setBatchUpdateModal(false);
|
|
14789
14844
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14790
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14845
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_133 = props.organise) === null || _133 === void 0 ? void 0 : _133.darkMode, darkModeBg: (_134 = props.organise) === null || _134 === void 0 ? void 0 : _134.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
14791
14846
|
var _a, _b;
|
|
14792
14847
|
if (props.space)
|
|
14793
14848
|
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 }));
|
|
@@ -14798,7 +14853,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14798
14853
|
renderContent(),
|
|
14799
14854
|
renderReadDrawer(),
|
|
14800
14855
|
canHostDrawer && renderDrawerDiscardModal(),
|
|
14801
|
-
|
|
14856
|
+
canOpenActivityDrawer && (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_135 = props.organise) === null || _135 === void 0 ? void 0 : _135.darkMode, darkModeBg: (_136 = props.organise) === null || _136 === void 0 ? void 0 : _136.darkModeBg, testId: "dt-activity-drawer",
|
|
14802
14857
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
14803
14858
|
zIndex: "z-50", open: activityModal,
|
|
14804
14859
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
@@ -14807,7 +14862,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14807
14862
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75",
|
|
14808
14863
|
// INFO: dragged like the read drawer; the width sticks across
|
|
14809
14864
|
// opens while the list stays mounted
|
|
14810
|
-
resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((
|
|
14865
|
+
resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_137 = props.id) !== null && _137 !== void 0 ? _137 : "") : activityId) })),
|
|
14811
14866
|
renderScrollSentinel()));
|
|
14812
14867
|
});
|
|
14813
14868
|
//# sourceMappingURL=index.js.map
|