blixify-ui-web 1.2.208 → 1.2.209
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/dataStateModel.d.ts +1 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +241 -221
- 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/display/drawer/index.d.ts +1 -0
- package/lib/components/display/drawer/index.d.ts.map +1 -1
- package/lib/components/display/drawer/index.js +3 -1
- package/lib/components/display/drawer/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +29 -5
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -240,18 +240,18 @@ var handleCheckEmptyCardValue = function (value) {
|
|
|
240
240
|
exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
|
|
241
241
|
exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
242
242
|
// INFO: props.type is what the caller asked for; resolvedType is what THIS
|
|
243
|
-
// instance renders. They differ
|
|
244
|
-
//
|
|
245
|
-
// nested instance draws the record in a panel over it. That is what preserves
|
|
243
|
+
// instance renders. They differ when the caller asked for a read with readDrawer
|
|
244
|
+
// on, or a create or edit with bareFormDrawer on: this instance keeps rendering
|
|
245
|
+
// the LIST while a nested instance draws the record in a panel over it. That is what preserves
|
|
246
246
|
// scroll position, page index and filters across opening a record.
|
|
247
247
|
//
|
|
248
248
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
249
249
|
// most in effect dependency arrays — following props.type there would leave
|
|
250
250
|
// the list never refetching while the panel is open, which fails silently.
|
|
251
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112;
|
|
251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113;
|
|
252
252
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
253
253
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
254
|
-
var
|
|
254
|
+
var _114 = (0, react_1.useState)(false), drawerPageView = _114[0], setDrawerPageView = _114[1];
|
|
255
255
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
256
256
|
// live props. Without this, navigating back to the list would re-render the
|
|
257
257
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -260,19 +260,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
260
260
|
props.type === "read" &&
|
|
261
261
|
!!props.id &&
|
|
262
262
|
props.id !== "new";
|
|
263
|
-
|
|
263
|
+
var isDrawerForm = !!((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareFormDrawer) &&
|
|
264
|
+
props.type === "update" &&
|
|
265
|
+
!!props.id;
|
|
266
|
+
var isDrawerRecord = isDrawerRead || isDrawerForm;
|
|
267
|
+
// INFO: while the escape is active the record takes the page normally and the
|
|
264
268
|
// panel stays closed behind it.
|
|
265
|
-
var isDrawerHost =
|
|
269
|
+
var isDrawerHost = isDrawerRecord && !drawerPageView;
|
|
266
270
|
var resolvedType = isDrawerHost ? "list" : props.type;
|
|
267
|
-
if (
|
|
271
|
+
if (isDrawerRecord)
|
|
268
272
|
drawerReadIdRef.current = props.id;
|
|
269
|
-
// INFO: leaving the record
|
|
270
|
-
//
|
|
271
|
-
//
|
|
273
|
+
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
274
|
+
// list peeks in the panel again rather than inheriting a full page the user
|
|
275
|
+
// asked for once. Saving a form on the full page lands on its read view, which
|
|
276
|
+
// stays a page.
|
|
272
277
|
(0, react_1.useEffect)(function () {
|
|
273
|
-
if (drawerPageView &&
|
|
278
|
+
if (drawerPageView && !isDrawerRecord)
|
|
274
279
|
setDrawerPageView(false);
|
|
275
|
-
}, [props.type, props.id, drawerPageView]);
|
|
280
|
+
}, [props.type, props.id, drawerPageView, isDrawerRecord]);
|
|
276
281
|
// INFO: the list keeps rendering while the panel is open, so it never refetches
|
|
277
282
|
// after a record is saved or deleted there. It reloads the current page when
|
|
278
283
|
// the panel closes — in place, so the page, cursor and filters stay as they were.
|
|
@@ -343,14 +348,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
343
348
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
344
349
|
};
|
|
345
350
|
};
|
|
346
|
-
var
|
|
351
|
+
var _115 = intialiseDefaultFilterValues(), initialFilterSearch = _115.initialFilterSearch, initialFilterSearchParams = _115.initialFilterSearchParams, initialFilterSelection = _115.initialFilterSelection, initialFilterReference = _115.initialFilterReference, initialFilterReferenceDate = _115.initialFilterReferenceDate;
|
|
347
352
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
348
|
-
var
|
|
349
|
-
mode: (
|
|
353
|
+
var _116 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
354
|
+
mode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistViewState,
|
|
350
355
|
collectionId: props.collectionId,
|
|
351
|
-
persistKey: (
|
|
356
|
+
persistKey: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.persistKey,
|
|
352
357
|
type: resolvedType,
|
|
353
|
-
}), rawPersistedState =
|
|
358
|
+
}), rawPersistedState = _116.persistedState, isPersistEnabled = _116.isEnabled, handleSaveView = _116.handleSaveView, handleRegisterViewSnapshot = _116.handleRegisterViewSnapshot;
|
|
354
359
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
355
360
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
356
361
|
var _a, _b, _c;
|
|
@@ -361,11 +366,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
361
366
|
}, [
|
|
362
367
|
rawPersistedState,
|
|
363
368
|
props.model,
|
|
364
|
-
(
|
|
365
|
-
(
|
|
369
|
+
(_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterReferences,
|
|
370
|
+
(_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareFlexFilterListObjects,
|
|
366
371
|
]);
|
|
367
|
-
var
|
|
368
|
-
var
|
|
372
|
+
var _117 = (0, react_1.useState)(false), loading = _117[0], setLoading = _117[1];
|
|
373
|
+
var _118 = (0, react_1.useState)(), notification = _118[0], setNotification = _118[1];
|
|
369
374
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
370
375
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
371
376
|
(0, react_1.useEffect)(function () {
|
|
@@ -375,74 +380,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
375
380
|
return function () { return clearTimeout(timer); };
|
|
376
381
|
}, [notification]);
|
|
377
382
|
//INFO : Used by List
|
|
378
|
-
var
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
383
|
+
var _119 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearch), filterSearch = _119[0], setFilterSearch = _119[1];
|
|
384
|
+
var _120 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _h !== void 0 ? _h : initialFilterSearchParams), filterSearchParams = _120[0], setFilterSearchParams = _120[1];
|
|
385
|
+
var _121 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _j !== void 0 ? _j : initialFilterSelection), filterSelection = _121[0], setFilterSelection = _121[1];
|
|
386
|
+
var _122 = (0, react_1.useState)((_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _k !== void 0 ? _k : initialFilterReference), filterReference = _122[0], setFilterReference = _122[1];
|
|
387
|
+
var _123 = (0, react_1.useState)({}), filterReferenceSearch = _123[0], setFilterReferenceSearch = _123[1];
|
|
388
|
+
var _124 = (0, react_1.useState)({}), filterReferenceList = _124[0], setFilterReferenceList = _124[1];
|
|
389
|
+
var _125 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
385
390
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
386
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
387
|
-
var
|
|
388
|
-
var
|
|
389
|
-
var
|
|
390
|
-
var
|
|
391
|
-
var
|
|
391
|
+
: initialFilterReferenceDate), filterReferenceDate = _125[0], setFilterReferenceDate = _125[1];
|
|
392
|
+
var _126 = (0, react_1.useState)(true), tableLoading = _126[0], setTableLoading = _126[1];
|
|
393
|
+
var _127 = (0, react_1.useState)(""), cursor = _127[0], setCursor = _127[1];
|
|
394
|
+
var _128 = (0, react_1.useState)(""), lastCursor = _128[0], setLastCursor = _128[1];
|
|
395
|
+
var _129 = (0, react_1.useState)([]), tableData = _129[0], setTableData = _129[1];
|
|
396
|
+
var _130 = (0, react_1.useState)([]), spaceTableData = _130[0], setSpaceTableData = _130[1];
|
|
392
397
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
393
398
|
// the state it closed over can predate an earlier save on the same row
|
|
394
399
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
395
400
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
396
401
|
tableDataRef.current = tableData;
|
|
397
402
|
spaceTableDataRef.current = spaceTableData;
|
|
398
|
-
var
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
var _131 = (0, react_1.useState)(0), size = _131[0], setSize = _131[1];
|
|
404
|
+
var _132 = (0, react_1.useState)((_o = (_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _l !== void 0 ? _l : (_m = props.organise) === null || _m === void 0 ? void 0 : _m.pageIndex) !== null && _o !== void 0 ? _o : 0), pageIndex = _132[0], setPageIndex = _132[1];
|
|
405
|
+
// INFO: every change of page, including the return to the first page when a
|
|
406
|
+
// filter or search changes, which onChangePagination does not always report
|
|
407
|
+
(0, react_1.useEffect)(function () {
|
|
408
|
+
var _a, _b;
|
|
409
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
410
|
+
}, [pageIndex]);
|
|
411
|
+
var _133 = (0, react_1.useState)([]), selectedIds = _133[0], setSelectedIds = _133[1];
|
|
412
|
+
var _134 = (0, react_1.useState)(false), selectAll = _134[0], setSelectAll = _134[1];
|
|
413
|
+
var _135 = (0, react_1.useState)(""), deletePasscode = _135[0], setDeletePasscode = _135[1];
|
|
414
|
+
var _136 = (0, react_1.useState)(""), deletePasscodeInput = _136[0], setDeletePasscodeInput = _136[1];
|
|
415
|
+
var _137 = (0, react_1.useState)(""), deleteFeedId = _137[0], setDeleteFeedId = _137[1];
|
|
405
416
|
//INFO : Used by List Organise
|
|
406
417
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
407
418
|
// persistViewState is enabled and a persisted sort exists
|
|
408
|
-
var
|
|
409
|
-
var
|
|
410
|
-
var
|
|
411
|
-
var
|
|
419
|
+
var _138 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _p !== void 0 ? _p : undefined), persistedSort = _138[0], setPersistedSort = _138[1];
|
|
420
|
+
var _139 = (0, react_1.useState)(false), filterDraft = _139[0], setFilterDraft = _139[1];
|
|
421
|
+
var _140 = (0, react_1.useState)(false), addTabModal = _140[0], setAddTabModal = _140[1];
|
|
422
|
+
var _141 = (0, react_1.useState)(-1), editTabIndex = _141[0], setEditTabIndex = _141[1];
|
|
412
423
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
413
424
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
414
|
-
var
|
|
425
|
+
var _142 = (0, react_1.useState)(function () {
|
|
415
426
|
var _a, _b;
|
|
416
427
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
|
|
417
|
-
}), selectedTab =
|
|
418
|
-
var
|
|
428
|
+
}), selectedTab = _142[0], setSelectedTab = _142[1];
|
|
429
|
+
var _143 = (0, react_1.useState)("dayGridMonth"), calendarView = _143[0], setCalendarView = _143[1];
|
|
419
430
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
420
431
|
// (calendarView above drives the matching range query)
|
|
421
|
-
var
|
|
422
|
-
var
|
|
432
|
+
var _144 = (0, react_1.useState)("month"), newCalendarViewMode = _144[0], setNewCalendarViewMode = _144[1];
|
|
433
|
+
var _145 = (0, react_1.useState)(new Date()), calendarTabMonth = _145[0], setCalendarTabMonth = _145[1];
|
|
423
434
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
424
435
|
// whenever its settings change, and that must not undo the user's switch
|
|
425
436
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
437
|
+
var _146 = (0, react_1.useState)(true), kanbanDroppable = _146[0], setKanbanDroppable = _146[1];
|
|
438
|
+
var _147 = (0, react_1.useState)([]), kanbanOptions = _147[0], setKanbanOptions = _147[1];
|
|
439
|
+
var _148 = (0, react_1.useState)(false), batchUpdateModal = _148[0], setBatchUpdateModal = _148[1];
|
|
440
|
+
var _149 = (0, react_1.useState)({
|
|
430
441
|
columnId: "",
|
|
431
442
|
columnData: {},
|
|
432
|
-
}), batchUpdateData =
|
|
443
|
+
}), batchUpdateData = _149[0], setBatchUpdateData = _149[1];
|
|
433
444
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
434
445
|
// join the structure hidden; the ones a user shows are kept per view
|
|
435
|
-
var isSystemColumnsEnabled = !!((
|
|
436
|
-
var isSystemColumnsLocked = !!((
|
|
446
|
+
var isSystemColumnsEnabled = !!((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareSystemColumns);
|
|
447
|
+
var isSystemColumnsLocked = !!((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareSystemColumnsLocked);
|
|
437
448
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
438
449
|
? 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; }); })
|
|
439
450
|
: [];
|
|
440
|
-
var
|
|
451
|
+
var _150 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _s !== void 0 ? _s : []), shownSystemColumnIds = _150[0], setShownSystemColumnIds = _150[1];
|
|
441
452
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
442
453
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
443
454
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
444
455
|
};
|
|
445
|
-
var
|
|
456
|
+
var _151 = (0, react_1.useState)(function () {
|
|
446
457
|
var _a;
|
|
447
458
|
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 : []);
|
|
448
459
|
if (!persistedState)
|
|
@@ -469,8 +480,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
469
480
|
});
|
|
470
481
|
}
|
|
471
482
|
return model;
|
|
472
|
-
}), structure =
|
|
473
|
-
var
|
|
483
|
+
}), structure = _151[0], setStructure = _151[1];
|
|
484
|
+
var _152 = (0, react_1.useState)(((_t = props === null || props === void 0 ? void 0 : props.organise) === null || _t === void 0 ? void 0 : _t.additionalQuery) || []), additionalQuery = _152[0], setAdditionalQuery = _152[1];
|
|
474
485
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
475
486
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
476
487
|
var defaultFlexFilterRow = [
|
|
@@ -481,9 +492,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
481
492
|
value: undefined,
|
|
482
493
|
},
|
|
483
494
|
];
|
|
484
|
-
var
|
|
495
|
+
var _153 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
485
496
|
? persistedState.flexFilters
|
|
486
|
-
: defaultFlexFilterRow), flexFilters =
|
|
497
|
+
: defaultFlexFilterRow), flexFilters = _153[0], setFlexFilters = _153[1];
|
|
487
498
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
488
499
|
// clear methods so chained calls in one tick aren't stale.
|
|
489
500
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -496,81 +507,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
496
507
|
}, [flexFilters]);
|
|
497
508
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
498
509
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
499
|
-
var
|
|
510
|
+
var _154 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
500
511
|
? persistedState.flexFilters
|
|
501
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
512
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _154[0], setFlexFiltersDebounced = _154[1];
|
|
502
513
|
// INFO: the filter rows of the export being set up — started from the
|
|
503
514
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
504
|
-
var
|
|
505
|
-
var
|
|
506
|
-
var
|
|
507
|
-
var
|
|
508
|
-
var
|
|
515
|
+
var _155 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _155[0], setExportFlexFilters = _155[1];
|
|
516
|
+
var _156 = (0, react_1.useState)({}), flexFilterReferenceOptions = _156[0], setFlexFilterReferenceOptions = _156[1];
|
|
517
|
+
var _157 = (0, react_1.useState)({}), flexFilterReferenceSearch = _157[0], setFlexFilterReferenceSearch = _157[1];
|
|
518
|
+
var _158 = (0, react_1.useState)(false), flexFilterModalOpen = _158[0], setFlexFilterModalOpen = _158[1];
|
|
519
|
+
var _159 = (0, react_1.useState)(false), viewSettingsModalOpen = _159[0], setViewSettingsModalOpen = _159[1];
|
|
509
520
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
510
521
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
511
522
|
// structure to props.model whenever props change, which would wipe the
|
|
512
523
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
513
524
|
// structure — writing user hides there would blur the two concepts.
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
525
|
+
var _160 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _u !== void 0 ? _u : []), userHiddenColumnIds = _160[0], setUserHiddenColumnIds = _160[1];
|
|
526
|
+
var _161 = (0, react_1.useState)(""), columnSearch = _161[0], setColumnSearch = _161[1];
|
|
527
|
+
var _162 = (0, react_1.useState)([]), savedViews = _162[0], setSavedViews = _162[1];
|
|
528
|
+
var _163 = (0, react_1.useState)(null), activeSavedViewId = _163[0], setActiveSavedViewId = _163[1];
|
|
518
529
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
519
|
-
var
|
|
530
|
+
var _164 = (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 = _164[0], setColumnWidths = _164[1];
|
|
520
531
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
521
532
|
// so the defaults drawn before it never overwrite a person's own
|
|
522
|
-
var
|
|
533
|
+
var _165 = (0, react_1.useState)(false), isViewDraftReady = _165[0], setIsViewDraftReady = _165[1];
|
|
523
534
|
// INFO: null while the name box is closed
|
|
524
|
-
var
|
|
525
|
-
var
|
|
526
|
-
var
|
|
535
|
+
var _166 = (0, react_1.useState)(null), savedViewName = _166[0], setSavedViewName = _166[1];
|
|
536
|
+
var _167 = (0, react_1.useState)(null), deletingSavedViewId = _167[0], setDeletingSavedViewId = _167[1];
|
|
537
|
+
var _168 = (0, react_1.useState)(null), draggingColumnId = _168[0], setDraggingColumnId = _168[1];
|
|
527
538
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
528
539
|
//INFO : Used by Auth
|
|
529
|
-
var
|
|
540
|
+
var _169 = (0, react_1.useState)({
|
|
530
541
|
email: "",
|
|
531
542
|
google: "",
|
|
532
543
|
phone: "",
|
|
533
544
|
disabled: false,
|
|
534
545
|
create: false,
|
|
535
|
-
}), authMethods =
|
|
536
|
-
var
|
|
546
|
+
}), authMethods = _169[0], setAuthMethods = _169[1];
|
|
547
|
+
var _170 = (0, react_1.useState)(""), selectedAuthMethod = _170[0], setSelectedAuthMethod = _170[1];
|
|
537
548
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
538
549
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
539
|
-
var
|
|
550
|
+
var _171 = (0, react_1.useState)(false), authLoading = _171[0], setAuthLoading = _171[1];
|
|
540
551
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
541
552
|
// the state has rendered, and the state disables the confirm button
|
|
542
553
|
var deletingRef = (0, react_1.useRef)(false);
|
|
543
|
-
var
|
|
554
|
+
var _172 = (0, react_1.useState)(false), deleting = _172[0], setDeleting = _172[1];
|
|
544
555
|
// INFO: Used by Activity Log
|
|
545
|
-
var
|
|
546
|
-
var
|
|
556
|
+
var _173 = (0, react_1.useState)(false), activityModal = _173[0], setActivityModal = _173[1];
|
|
557
|
+
var _174 = (0, react_1.useState)(""), activityId = _174[0], setActivityId = _174[1];
|
|
547
558
|
//INFO : Used by Export
|
|
548
|
-
var
|
|
549
|
-
var
|
|
550
|
-
var
|
|
551
|
-
var
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
557
|
-
var
|
|
558
|
-
var
|
|
559
|
-
var
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
559
|
+
var _175 = (0, react_1.useState)(null), csvFile = _175[0], setCSVFile = _175[1];
|
|
560
|
+
var _176 = (0, react_1.useState)([]), csvFileData = _176[0], setCSVFileData = _176[1];
|
|
561
|
+
var _177 = (0, react_1.useState)(0), stepCSVIndex = _177[0], setStepCSVIndex = _177[1];
|
|
562
|
+
var _178 = (0, react_1.useState)({}), listCSVMapAttribute = _178[0], setListCSVMapAttribute = _178[1];
|
|
563
|
+
var _179 = (0, react_1.useState)({}), listCSVObjAttribute = _179[0], setListCSVObjAttribute = _179[1];
|
|
564
|
+
var _180 = (0, react_1.useState)([]), csvAPIAttribute = _180[0], setCSVAPIAttribute = _180[1];
|
|
565
|
+
var _181 = (0, react_1.useState)(((_v = props.devSettings.currentUser) === null || _v === void 0 ? void 0 : _v.userEmail) || ""), exportCSVEmail = _181[0], setExportCSVEmail = _181[1];
|
|
566
|
+
var _182 = (0, react_1.useState)(((_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.exportSettings) === null || _x === void 0 ? void 0 : _x.defaultExportPDFName) || ""), exportPDFTitle = _182[0], setExportPDFTitle = _182[1];
|
|
567
|
+
var _183 = (0, react_1.useState)(false), exportPDFLoading = _183[0], setExportPDFLoading = _183[1];
|
|
568
|
+
var _184 = (0, react_1.useState)(false), exportReadPDFLoading = _184[0], setExportReadPDFLoading = _184[1];
|
|
569
|
+
var _185 = (0, react_1.useState)((_0 = (_z = (_y = props.organise) === null || _y === void 0 ? void 0 : _y.exportSettings) === null || _z === void 0 ? void 0 : _z.sumColumnId) !== null && _0 !== void 0 ? _0 : []), exportSumAttributeIds = _185[0], setExportSumAttributeIds = _185[1];
|
|
570
|
+
var _186 = (0, react_1.useState)((_3 = (_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.hideSubItems) !== null && _3 !== void 0 ? _3 : false), hideSubItems = _186[0], setHideSubItems = _186[1];
|
|
571
|
+
var _187 = (0, react_1.useState)([]), importTableData = _187[0], setImportTableData = _187[1];
|
|
572
|
+
var _188 = (0, react_1.useState)([]), queryList = _188[0], setQueryList = _188[1];
|
|
573
|
+
var _189 = (0, react_1.useState)(undefined), allQueryList = _189[0], setAllQueryList = _189[1];
|
|
563
574
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
564
575
|
// ungrouped, so it opens ungrouped
|
|
565
|
-
var
|
|
576
|
+
var _190 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
566
577
|
? persistedState.groupBy || undefined
|
|
567
|
-
: (
|
|
578
|
+
: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.groupBy), groupId = _190[0], setGroupId = _190[1];
|
|
568
579
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
569
580
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
570
581
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
571
582
|
// next page as the user scrolls inside that band, independent of every other
|
|
572
583
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
573
|
-
var
|
|
584
|
+
var _191 = (0, react_1.useState)({}), groupPageState = _191[0], setGroupPageState = _191[1];
|
|
574
585
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
575
586
|
// in one tick do not re-fetch an already in-flight page.
|
|
576
587
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -579,59 +590,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
579
590
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
580
591
|
// arrival instead of appending rows that belong to the old list
|
|
581
592
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
582
|
-
var
|
|
583
|
-
var
|
|
593
|
+
var _192 = (0, react_1.useState)(""), readTabSection = _192[0], setReadTabSection = _192[1];
|
|
594
|
+
var _193 = (0, react_1.useState)(false), readFloatingNav = _193[0], setReadFloatingNav = _193[1];
|
|
584
595
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
585
596
|
//INFO : Used by Read
|
|
586
597
|
//INFO : Used by Update
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
598
|
+
var _194 = (0, react_1.useState)(false), modalVisible = _194[0], setModalVisible = _194[1];
|
|
599
|
+
var _195 = (0, react_1.useState)(false), deleteModal = _195[0], setDeleteModal = _195[1];
|
|
600
|
+
var _196 = (0, react_1.useState)(false), excelModal = _196[0], setExcelModal = _196[1];
|
|
601
|
+
var _197 = (0, react_1.useState)(false), exportExcel = _197[0], setExportExcel = _197[1];
|
|
602
|
+
var _198 = (0, react_1.useState)(""), exportType = _198[0], setExportType = _198[1];
|
|
603
|
+
var _199 = (0, react_1.useState)(false), exportQR = _199[0], setExportQR = _199[1];
|
|
604
|
+
var _200 = (0, react_1.useState)(function () {
|
|
594
605
|
var _a, _b;
|
|
595
606
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
596
607
|
return firstTabId;
|
|
597
|
-
}), activeTab =
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var
|
|
608
|
+
}), activeTab = _200[0], setActiveTab = _200[1];
|
|
609
|
+
var _201 = (0, react_1.useState)(false), signatureSigning = _201[0], setSignatureSigning = _201[1];
|
|
610
|
+
var _202 = (0, react_1.useState)({}), selectedData = _202[0], setSelectedData = _202[1];
|
|
611
|
+
var _203 = (0, react_1.useState)(""), selectedObjectStructureId = _203[0], setSelectedObjectStructureId = _203[1];
|
|
612
|
+
var _204 = (0, react_1.useState)(""), selectedObjectId = _204[0], setSelectedObjectId = _204[1];
|
|
613
|
+
var _205 = (0, react_1.useState)(""), selectedListAddressId = _205[0], setSelectedListAddressId = _205[1];
|
|
614
|
+
var _206 = (0, react_1.useState)(-1), selectedListAddressIndex = _206[0], setSelectedListAddressIndex = _206[1];
|
|
615
|
+
var _207 = (0, react_1.useState)({
|
|
605
616
|
lat: 0,
|
|
606
617
|
lng: 0,
|
|
607
618
|
name: "",
|
|
608
|
-
}), selectedListAddress =
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
618
|
-
var
|
|
619
|
+
}), selectedListAddress = _207[0], setSelectedListAddress = _207[1];
|
|
620
|
+
var _208 = (0, react_1.useState)({}), selectedObjectData = _208[0], setSelectedObjectData = _208[1];
|
|
621
|
+
var _209 = (0, react_1.useState)(null), objectCellEdit = _209[0], setObjectCellEdit = _209[1];
|
|
622
|
+
var _210 = (0, react_1.useState)(false), referenceLoading = _210[0], setReferenceLoading = _210[1];
|
|
623
|
+
var _211 = (0, react_1.useState)({}), referencesOptions = _211[0], setReferencesOptions = _211[1];
|
|
624
|
+
var _212 = (0, react_1.useState)({}), referencesDetails = _212[0], setReferencesDetails = _212[1];
|
|
625
|
+
var _213 = (0, react_1.useState)({}), listReferencesOptions = _213[0], setListReferencesOptions = _213[1];
|
|
626
|
+
var _214 = (0, react_1.useState)({}), referenceDeleteTableData = _214[0], setReferenceDeleteTableData = _214[1];
|
|
627
|
+
var _215 = (0, react_1.useState)([]), relatedSections = _215[0], setRelatedSections = _215[1];
|
|
628
|
+
var _216 = (0, react_1.useState)(0), referenceDeleteIndex = _216[0], setReferenceDeleteIndex = _216[1];
|
|
629
|
+
var _217 = (0, react_1.useState)({
|
|
619
630
|
id: "",
|
|
620
631
|
name: "",
|
|
621
632
|
type: "string",
|
|
622
|
-
}), referenceCreationModal =
|
|
623
|
-
var
|
|
624
|
-
var
|
|
633
|
+
}), referenceCreationModal = _217[0], setReferenceCreationModal = _217[1];
|
|
634
|
+
var _218 = (0, react_1.useState)({}), referenceModelSchema = _218[0], setReferenceSchema = _218[1];
|
|
635
|
+
var _219 = (0, react_1.useState)([]), kanbanChecked = _219[0], setKanbanChecked = _219[1];
|
|
625
636
|
//INFO : Offline
|
|
626
|
-
var
|
|
627
|
-
var
|
|
637
|
+
var _220 = (0, react_1.useState)(0), offlineDataLength = _220[0], setOfflineDataLength = _220[1];
|
|
638
|
+
var _221 = (0, react_1.useState)(false), offlineModal = _221[0], setOfflineModal = _221[1];
|
|
628
639
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
629
|
-
var
|
|
630
|
-
var
|
|
640
|
+
var _222 = (0, react_1.useState)(false), isLive = _222[0], setIsLive = _222[1];
|
|
641
|
+
var _223 = (0, react_1.useState)(false), isLiveOffline = _223[0], setIsLiveOffline = _223[1];
|
|
631
642
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
632
643
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
633
644
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
634
|
-
var
|
|
645
|
+
var _224 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _224[0], setIsNetworkOffline = _224[1];
|
|
635
646
|
var previousType = (0, react_1.useRef)(null);
|
|
636
647
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
637
648
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -748,16 +759,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
748
759
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
749
760
|
* shared link or a back button.
|
|
750
761
|
*/
|
|
751
|
-
var defaultTabName = (
|
|
762
|
+
var defaultTabName = (_7 = (_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.extendedTabs) === null || _6 === void 0 ? void 0 : _6.find(function (eachTab) { return eachTab.defaultTab; })) === null || _7 === void 0 ? void 0 : _7.name;
|
|
752
763
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
753
764
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
754
765
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
755
|
-
var viewType = (
|
|
766
|
+
var viewType = (_9 = (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.viewId) !== null && _9 !== void 0 ? _9 : (resolvedType === "list" && defaultTabName
|
|
756
767
|
? (0, utils_1.lowercaseTextToId)(defaultTabName)
|
|
757
768
|
: "general");
|
|
758
769
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
759
770
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
760
|
-
var dbModule = isFirebaseClient ? (
|
|
771
|
+
var dbModule = isFirebaseClient ? (_10 = props.lib) === null || _10 === void 0 ? void 0 : _10.firebase : (_11 = props.lib) === null || _11 === void 0 ? void 0 : _11.axios;
|
|
761
772
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
762
773
|
var selectedRelated = resolvedType === "read"
|
|
763
774
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -839,32 +850,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
839
850
|
}, [
|
|
840
851
|
resolvedType,
|
|
841
852
|
props.id,
|
|
842
|
-
(
|
|
853
|
+
(_12 = props.space) === null || _12 === void 0 ? void 0 : _12._id,
|
|
843
854
|
props.devSettings.schemaEndpoint,
|
|
844
|
-
(
|
|
855
|
+
(_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.showRelatedTab,
|
|
845
856
|
]);
|
|
846
857
|
/* eslint-enable */
|
|
847
858
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
848
859
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
849
|
-
var isViewSettingsEnabled = ((
|
|
860
|
+
var isViewSettingsEnabled = ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareViewSettings) || ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareNewDTW)
|
|
850
861
|
? true
|
|
851
862
|
: false;
|
|
852
863
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
853
864
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
854
865
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
855
|
-
var isSchemaHideMode = ((
|
|
866
|
+
var isSchemaHideMode = ((_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.onChangeHide) ? true : false;
|
|
856
867
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
857
868
|
// the persisted value and falls back to the consumer's limit
|
|
858
|
-
var
|
|
869
|
+
var _225 = (0, react_1.useState)((_18 = (_17 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _17 !== void 0 ? _17 : props.limit) !== null && _18 !== void 0 ? _18 : 10), pageLimit = _225[0], setPageLimit = _225[1];
|
|
859
870
|
var limit = pageLimit;
|
|
860
|
-
var isSavedViewsEnabled = !!((
|
|
871
|
+
var isSavedViewsEnabled = !!((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.savedViews) && resolvedType === "list";
|
|
861
872
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
862
873
|
// every view is the team's and nothing is kept locally
|
|
863
|
-
var isAppViews = ((
|
|
864
|
-
!!((
|
|
874
|
+
var isAppViews = ((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.sharedViews) !== undefined ||
|
|
875
|
+
!!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.onChangeSharedViews);
|
|
865
876
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
866
877
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
867
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
878
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.sort);
|
|
868
879
|
var handleSortColumn = function (value) {
|
|
869
880
|
var _a, _b, _c, _d;
|
|
870
881
|
if (isInternalSort)
|
|
@@ -894,7 +905,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
894
905
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
895
906
|
// can hand over the whole set — there formula columns are not offered for
|
|
896
907
|
// sorting or filtering, rather than ordering one page
|
|
897
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
908
|
+
var isFormulaViewSupported = !isFirebase && !((_24 = (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.unionCollections) === null || _24 === void 0 ? void 0 : _24.length);
|
|
898
909
|
var formulaSort = isFormulaViewSupported &&
|
|
899
910
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
900
911
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -903,10 +914,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
903
914
|
// INFO: a referenced record is joined by MongoWrapper's lookup and a list
|
|
904
915
|
// row is matched by its Mongo path — neither Firebase nor a union read runs
|
|
905
916
|
// them
|
|
906
|
-
var flexFilterExtras = !isFirebase && !((
|
|
917
|
+
var flexFilterExtras = !isFirebase && !((_26 = (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.unionCollections) === null || _26 === void 0 ? void 0 : _26.length)
|
|
907
918
|
? {
|
|
908
|
-
references: (
|
|
909
|
-
listObjects: (
|
|
919
|
+
references: (_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilterReferences,
|
|
920
|
+
listObjects: (_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareFlexFilterListObjects,
|
|
910
921
|
}
|
|
911
922
|
: undefined;
|
|
912
923
|
var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
|
|
@@ -967,18 +978,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
967
978
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
968
979
|
};
|
|
969
980
|
};
|
|
970
|
-
var
|
|
971
|
-
var isEditor = ((
|
|
972
|
-
var isOffline = (
|
|
981
|
+
var _226 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _226.canUpdateRecord, canInlineUpdate = _226.canInlineUpdate, canBatchUpdate = _226.canBatchUpdate, canDeleteRecord = _226.canDeleteRecord;
|
|
982
|
+
var isEditor = ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.allEditable) ? true : false;
|
|
983
|
+
var isOffline = (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareOffline;
|
|
973
984
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
974
985
|
// the live network state — online saves go to the server even if bareOffline
|
|
975
986
|
// is true, offline saves go to IDB as normal.
|
|
976
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
977
|
-
var showId = (
|
|
987
|
+
var isOfflineNetworkListener = isOffline && ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareOfflineNetworkListener);
|
|
988
|
+
var showId = (_32 = props.space) === null || _32 === void 0 ? void 0 : _32.showId;
|
|
978
989
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
979
|
-
var idField = ((
|
|
980
|
-
var pipeline = (
|
|
981
|
-
if ((
|
|
990
|
+
var idField = ((_33 = props.space) === null || _33 === void 0 ? void 0 : _33.idField) || ((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.idField);
|
|
991
|
+
var pipeline = (_35 = props === null || props === void 0 ? void 0 : props.space) === null || _35 === void 0 ? void 0 : _35.pipeline;
|
|
992
|
+
if ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareListPipeline) {
|
|
982
993
|
pipeline = pipeline
|
|
983
994
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
984
995
|
}
|
|
@@ -991,24 +1002,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
991
1002
|
* three records came back instead of five files, and each tile received the
|
|
992
1003
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
993
1004
|
*/
|
|
994
|
-
var fileViewColumnId = (
|
|
1005
|
+
var fileViewColumnId = (_40 = (_39 = ((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.extendedTabs) !== null && _38 !== void 0 ? _38 : []).find(function (eachTab) {
|
|
995
1006
|
return eachTab.viewType === "file" &&
|
|
996
1007
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
997
|
-
})) === null ||
|
|
998
|
-
var hasNavigation = ((
|
|
1008
|
+
})) === null || _39 === void 0 ? void 0 : _39.fileSettings) === null || _40 === void 0 ? void 0 : _40.columnId;
|
|
1009
|
+
var hasNavigation = ((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.handleNavigate) ? true : false;
|
|
999
1010
|
var formColumn = "grid-cols-12";
|
|
1000
|
-
var useMobileView = (
|
|
1011
|
+
var useMobileView = (_43 = (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareUpdateMobileView) !== null && _43 !== void 0 ? _43 : false;
|
|
1001
1012
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1002
|
-
var isActivityLog = (((
|
|
1003
|
-
((
|
|
1004
|
-
(((
|
|
1005
|
-
((
|
|
1006
|
-
var customPaginationSize = ((
|
|
1013
|
+
var isActivityLog = (((_45 = (_44 = props.edit) === null || _44 === void 0 ? void 0 : _44.activityLog) === null || _45 === void 0 ? void 0 : _45.enableComments) &&
|
|
1014
|
+
((_46 = props.edit) === null || _46 === void 0 ? void 0 : _46.activityLog.commentCollectionId)) ||
|
|
1015
|
+
(((_48 = (_47 = props.edit) === null || _47 === void 0 ? void 0 : _47.activityLog) === null || _48 === void 0 ? void 0 : _48.enableLogs) &&
|
|
1016
|
+
((_49 = props.edit) === null || _49 === void 0 ? void 0 : _49.activityLog.logsCollectionId));
|
|
1017
|
+
var customPaginationSize = ((_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.customPaginationCount)
|
|
1007
1018
|
? props.organise.customPaginationCount(size)
|
|
1008
1019
|
: undefined;
|
|
1009
1020
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1010
1021
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1011
|
-
dbModule: (
|
|
1022
|
+
dbModule: (_51 = props.lib) === null || _51 === void 0 ? void 0 : _51.axios,
|
|
1012
1023
|
dbType: devSettings.server,
|
|
1013
1024
|
dbCollection: props.collectionId,
|
|
1014
1025
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1016,7 +1027,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1016
1027
|
dbUserToken: devSettings.dbUserToken,
|
|
1017
1028
|
});
|
|
1018
1029
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1019
|
-
dbModule: (
|
|
1030
|
+
dbModule: (_52 = props.lib) === null || _52 === void 0 ? void 0 : _52.axios,
|
|
1020
1031
|
dbType: devSettings.server,
|
|
1021
1032
|
dbCollection: props.collectionId,
|
|
1022
1033
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1024,12 +1035,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1024
1035
|
dbUserToken: devSettings.dbUserToken,
|
|
1025
1036
|
});
|
|
1026
1037
|
var moreButtonPopUp = [
|
|
1027
|
-
((
|
|
1038
|
+
((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.allEditable) &&
|
|
1028
1039
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1029
1040
|
// datasheet served through one can import; only the browser-direct
|
|
1030
1041
|
// Firebase client has no server to import through
|
|
1031
1042
|
!isFirebaseClient &&
|
|
1032
|
-
!((
|
|
1043
|
+
!((_55 = (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.exportSettings) === null || _55 === void 0 ? void 0 : _55.hideImportCSV)
|
|
1033
1044
|
? {
|
|
1034
1045
|
text: "Import Excel",
|
|
1035
1046
|
onClick: function () {
|
|
@@ -1038,7 +1049,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1038
1049
|
},
|
|
1039
1050
|
}
|
|
1040
1051
|
: null,
|
|
1041
|
-
!((
|
|
1052
|
+
!((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideExportCSV)
|
|
1042
1053
|
? {
|
|
1043
1054
|
text: "Export CSV",
|
|
1044
1055
|
onClick: function () {
|
|
@@ -1048,7 +1059,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1048
1059
|
},
|
|
1049
1060
|
}
|
|
1050
1061
|
: null,
|
|
1051
|
-
!((
|
|
1062
|
+
!((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideExportExcel)
|
|
1052
1063
|
? {
|
|
1053
1064
|
text: "Export Excel",
|
|
1054
1065
|
onClick: function () {
|
|
@@ -1058,7 +1069,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1058
1069
|
},
|
|
1059
1070
|
}
|
|
1060
1071
|
: null,
|
|
1061
|
-
!((
|
|
1072
|
+
!((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportPDF)
|
|
1062
1073
|
? {
|
|
1063
1074
|
text: "Export PDF",
|
|
1064
1075
|
onClick: function () {
|
|
@@ -1068,7 +1079,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1068
1079
|
},
|
|
1069
1080
|
}
|
|
1070
1081
|
: null,
|
|
1071
|
-
!((
|
|
1082
|
+
!((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportQR)
|
|
1072
1083
|
? {
|
|
1073
1084
|
text: "Export QR",
|
|
1074
1085
|
onClick: function () {
|
|
@@ -1078,7 +1089,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1078
1089
|
},
|
|
1079
1090
|
}
|
|
1080
1091
|
: null,
|
|
1081
|
-
!((
|
|
1092
|
+
!((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportQR)
|
|
1082
1093
|
? {
|
|
1083
1094
|
text: "Export QR(Data)",
|
|
1084
1095
|
onClick: function () {
|
|
@@ -1088,7 +1099,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1088
1099
|
},
|
|
1089
1100
|
}
|
|
1090
1101
|
: null,
|
|
1091
|
-
!((
|
|
1102
|
+
!((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportPrint)
|
|
1092
1103
|
? {
|
|
1093
1104
|
text: "Print",
|
|
1094
1105
|
onClick: function () {
|
|
@@ -1098,7 +1109,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1098
1109
|
},
|
|
1099
1110
|
}
|
|
1100
1111
|
: null,
|
|
1101
|
-
!((
|
|
1112
|
+
!((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportDraft)
|
|
1102
1113
|
? {
|
|
1103
1114
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1104
1115
|
onClick: function () {
|
|
@@ -1107,7 +1118,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1107
1118
|
}
|
|
1108
1119
|
: null,
|
|
1109
1120
|
].filter(Boolean);
|
|
1110
|
-
if ((
|
|
1121
|
+
if ((_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.moreSettings)
|
|
1111
1122
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1112
1123
|
//=====================================================================================
|
|
1113
1124
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1501,14 +1512,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1501
1512
|
//=====================================================================================
|
|
1502
1513
|
//SECTION: Saved Views
|
|
1503
1514
|
//=====================================================================================
|
|
1504
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1515
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.persistKey, (_72 = devSettings.currentUser) === null || _72 === void 0 ? void 0 : _72.userEmail);
|
|
1505
1516
|
(0, react_1.useEffect)(function () {
|
|
1506
1517
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1507
1518
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1508
1519
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1509
1520
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1510
1521
|
// browser until the person updates the view for everyone or resets it
|
|
1511
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1522
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.allView) !== undefined;
|
|
1512
1523
|
var handleGetViewDraftKey = function (viewId) {
|
|
1513
1524
|
var _a, _b;
|
|
1514
1525
|
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);
|
|
@@ -1585,7 +1596,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1585
1596
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1586
1597
|
(0, react_1.useEffect)(function () {
|
|
1587
1598
|
lastSentSharedViewsRef.current = null;
|
|
1588
|
-
}, [(
|
|
1599
|
+
}, [(_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.sharedViews]);
|
|
1589
1600
|
var handleStoreSharedViews = function (update) {
|
|
1590
1601
|
var _a, _b, _c;
|
|
1591
1602
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1630,13 +1641,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1630
1641
|
/* eslint-disable */
|
|
1631
1642
|
}, [
|
|
1632
1643
|
isSavedViewsEnabled,
|
|
1633
|
-
(
|
|
1634
|
-
(
|
|
1635
|
-
(
|
|
1644
|
+
(_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.initialSavedViewId,
|
|
1645
|
+
(_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.defaultSavedViewId,
|
|
1646
|
+
(_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.sharedViews,
|
|
1636
1647
|
savedViews,
|
|
1637
1648
|
]);
|
|
1638
1649
|
/* eslint-enable */
|
|
1639
|
-
var defaultSavedViewIds = ((
|
|
1650
|
+
var defaultSavedViewIds = ((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.defaultSavedViews) !== null && _79 !== void 0 ? _79 : [])
|
|
1640
1651
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1641
1652
|
.join("|");
|
|
1642
1653
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1938,8 +1949,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1938
1949
|
pageLimit,
|
|
1939
1950
|
groupId,
|
|
1940
1951
|
columnWidths,
|
|
1941
|
-
(
|
|
1942
|
-
(
|
|
1952
|
+
(_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.allView,
|
|
1953
|
+
(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.sharedViews,
|
|
1943
1954
|
savedViews,
|
|
1944
1955
|
]);
|
|
1945
1956
|
/* eslint-enable */
|
|
@@ -1979,7 +1990,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1979
1990
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1980
1991
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1981
1992
|
/* eslint-disable */
|
|
1982
|
-
}, [props.collectionId, (
|
|
1993
|
+
}, [props.collectionId, (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.persistKey]);
|
|
1983
1994
|
/* eslint-enable */
|
|
1984
1995
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1985
1996
|
(0, react_1.useEffect)(function () {
|
|
@@ -2014,7 +2025,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2014
2025
|
(0, react_1.useEffect)(function () {
|
|
2015
2026
|
handleOfflinePrefetch();
|
|
2016
2027
|
/* eslint-disable */
|
|
2017
|
-
}, [props.collectionId, (
|
|
2028
|
+
}, [props.collectionId, (_83 = props.bareSettings) === null || _83 === void 0 ? void 0 : _83.bareOffline]);
|
|
2018
2029
|
/* eslint-enable */
|
|
2019
2030
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2020
2031
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2034,7 +2045,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2034
2045
|
}, interval);
|
|
2035
2046
|
return function () { return clearInterval(timer); };
|
|
2036
2047
|
/* eslint-disable */
|
|
2037
|
-
}, [(
|
|
2048
|
+
}, [(_84 = props.bareSettings) === null || _84 === void 0 ? void 0 : _84.barePollingInterval, isLive, isNetworkOffline]);
|
|
2038
2049
|
/* eslint-enable */
|
|
2039
2050
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2040
2051
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2076,7 +2087,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2076
2087
|
};
|
|
2077
2088
|
/* eslint-disable */
|
|
2078
2089
|
}, [
|
|
2079
|
-
(
|
|
2090
|
+
(_85 = props.bareSettings) === null || _85 === void 0 ? void 0 : _85.bareSocketName,
|
|
2080
2091
|
props.collectionId,
|
|
2081
2092
|
props.devSettings.sseEndpoint,
|
|
2082
2093
|
props.devSettings.dbAPIToken,
|
|
@@ -2350,10 +2361,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2350
2361
|
props.collectionId,
|
|
2351
2362
|
props.model,
|
|
2352
2363
|
props.localURLEndpoint,
|
|
2353
|
-
(
|
|
2354
|
-
(
|
|
2355
|
-
(
|
|
2356
|
-
(
|
|
2364
|
+
(_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.extendedTabs,
|
|
2365
|
+
(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.viewId,
|
|
2366
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.additionalQuery,
|
|
2367
|
+
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.groupBy,
|
|
2357
2368
|
resolvedType,
|
|
2358
2369
|
]);
|
|
2359
2370
|
/**
|
|
@@ -2505,7 +2516,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2505
2516
|
};
|
|
2506
2517
|
}, 100);
|
|
2507
2518
|
return function () { return clearTimeout(timeoutId); };
|
|
2508
|
-
}, [(
|
|
2519
|
+
}, [(_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2509
2520
|
(0, react_1.useEffect)(function () {
|
|
2510
2521
|
if (resolvedType !== "read")
|
|
2511
2522
|
return;
|
|
@@ -5618,7 +5629,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5618
5629
|
// update an inline cell edit makes, gated on the same update right
|
|
5619
5630
|
var columnTypeActions = {
|
|
5620
5631
|
canUpdate: canUpdateRecord,
|
|
5621
|
-
onButtonClick: (
|
|
5632
|
+
onButtonClick: (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.onButtonClick,
|
|
5622
5633
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5623
5634
|
var _a;
|
|
5624
5635
|
return __generator(this, function (_b) {
|
|
@@ -5635,7 +5646,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5635
5646
|
}
|
|
5636
5647
|
});
|
|
5637
5648
|
}); },
|
|
5638
|
-
onTimeTrackingAction: ((
|
|
5649
|
+
onTimeTrackingAction: ((_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.onTimeTrackingAction) && canUpdateRecord
|
|
5639
5650
|
? function (rowId, columnId, action) {
|
|
5640
5651
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5641
5652
|
}
|
|
@@ -7849,8 +7860,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7849
7860
|
: rows;
|
|
7850
7861
|
};
|
|
7851
7862
|
/* eslint-disable */
|
|
7852
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7853
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
7863
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareNewDTW]);
|
|
7864
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_94 = props.bareSettings) === null || _94 === void 0 ? void 0 : _94.bareNewDTW]);
|
|
7854
7865
|
/* eslint-enable */
|
|
7855
7866
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7856
7867
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -8567,22 +8578,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8567
8578
|
// configures the table once and the panel inherits it.
|
|
8568
8579
|
var renderReadDrawer = function () {
|
|
8569
8580
|
var _a, _b, _c, _d;
|
|
8570
|
-
if (!
|
|
8581
|
+
if (!isDrawerRecord)
|
|
8571
8582
|
return null;
|
|
8572
8583
|
var _e = (_b = (_a = props.viewSettings) === null || _a === void 0 ? void 0 : _a.readDrawer) !== null && _b !== void 0 ? _b : {}, anchor = _e.anchor, maxWidth = _e.maxWidth, maxHeight = _e.maxHeight, desc = _e.desc, disableExpand = _e.disableExpand, title = _e.title;
|
|
8573
|
-
return (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg, testId: "dt-read-drawer", open: isDrawerHost, onClose: function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", ""); }, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl",
|
|
8584
|
+
return (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg, testId: isDrawerForm ? "dt-form-drawer" : "dt-read-drawer", open: isDrawerHost, onClose: function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", ""); }, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl",
|
|
8585
|
+
// INFO: a phone keyboard takes half the screen, which leaves a form in a
|
|
8586
|
+
// three-quarter sheet almost no room for the field being typed in
|
|
8587
|
+
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : (isDrawerForm ? "100" : "75"),
|
|
8588
|
+
// INFO: nothing typed into a form has been saved yet, so only its close
|
|
8589
|
+
// button leaves it — not a stray tap outside or a stray Escape
|
|
8590
|
+
disableDismiss: isDrawerForm, title: title !== null && title !== void 0 ? title : (typeof props.title === "string" && props.title
|
|
8574
8591
|
? props.title
|
|
8575
|
-
: "Details"), desc: desc, expandable: !disableExpand, onExpand: function () { return setDrawerPageView(true); }, content: react_1.default.createElement(exports.DataTemplate, __assign({}, props, { id: drawerReadIdRef.current, type: "read",
|
|
8592
|
+
: "Details"), desc: desc, expandable: !disableExpand, onExpand: function () { return setDrawerPageView(true); }, content: react_1.default.createElement(exports.DataTemplate, __assign({}, props, { id: drawerReadIdRef.current, type: isDrawerForm ? "update" : "read",
|
|
8576
8593
|
// INFO: strips the flag so the nested instance renders the record
|
|
8577
8594
|
// rather than hosting another drawer
|
|
8578
8595
|
viewSettings: undefined,
|
|
8579
8596
|
// INFO: the panel header already names the record, and a
|
|
8580
8597
|
// list/detail breadcrumb is meaningless while the list is still on
|
|
8581
8598
|
// screen behind it
|
|
8582
|
-
title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign({
|
|
8599
|
+
title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign(__assign({
|
|
8583
8600
|
// INFO: DetailList's stacked rows waste a panel this narrow —
|
|
8584
8601
|
// compact puts label and value on one row. Overridable.
|
|
8585
|
-
bareCompactMode:
|
|
8602
|
+
bareCompactMode: !isDrawerForm }, props.bareSettings), {
|
|
8603
|
+
// INFO: the nested instance draws the form rather than hosting
|
|
8604
|
+
// another panel
|
|
8605
|
+
bareFormDrawer: false }), (isDrawerHost
|
|
8586
8606
|
? {}
|
|
8587
8607
|
: {
|
|
8588
8608
|
barePollingInterval: undefined,
|
|
@@ -11831,14 +11851,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11831
11851
|
};
|
|
11832
11852
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11833
11853
|
renderNotification("root"),
|
|
11834
|
-
((
|
|
11854
|
+
((_96 = (_95 = props.renderSettings) === null || _95 === void 0 ? void 0 : _95.renderLoadingUI) === null || _96 === void 0 ? void 0 : _96.call(_95)) && loading ? ((_97 = props.renderSettings) === null || _97 === void 0 ? void 0 : _97.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.darkMode, darkModeBg: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11835
11855
|
var _a, _b;
|
|
11836
11856
|
if (loading)
|
|
11837
11857
|
return;
|
|
11838
11858
|
handlePopUpModal(false);
|
|
11839
11859
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11840
11860
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11841
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11861
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkMode, darkModeBg: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11842
11862
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11843
11863
|
if (dataId) {
|
|
11844
11864
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11854,19 +11874,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11854
11874
|
}, onClose: function () {
|
|
11855
11875
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11856
11876
|
} }),
|
|
11857
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11877
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11858
11878
|
setReferenceDeleteTableData({});
|
|
11859
11879
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11860
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11880
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11861
11881
|
setDeletePasscodeInput("");
|
|
11862
11882
|
setDeleteModal(!deleteModal);
|
|
11863
11883
|
setDeleteFeedId("");
|
|
11864
11884
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11865
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11885
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11866
11886
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11867
11887
|
setBatchUpdateModal(false);
|
|
11868
11888
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11869
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11889
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11870
11890
|
var _a, _b;
|
|
11871
11891
|
if (props.space)
|
|
11872
11892
|
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 }));
|
|
@@ -11881,13 +11901,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11881
11901
|
(0, react_dom_1.createPortal)(
|
|
11882
11902
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11883
11903
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11884
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11904
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11885
11905
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11886
11906
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11887
11907
|
// toolbar's collection-wide button clears it when it opens.
|
|
11888
11908
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
11889
11909
|
? props.title
|
|
11890
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11910
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_112 = props.id) !== null && _112 !== void 0 ? _112 : "") : activityId, activityLog: (_113 = props.edit) === null || _113 === void 0 ? void 0 : _113.activityLog, model: structure }) })), document.body),
|
|
11891
11911
|
renderScrollSentinel()));
|
|
11892
11912
|
});
|
|
11893
11913
|
//# sourceMappingURL=index.js.map
|