blixify-ui-web 1.2.208 → 1.2.210
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 +2 -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 +332 -346
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +2 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts +3 -0
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +7 -3
- package/lib/components/data/listModule.js.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/components/navigation/tabs/index.d.ts +3 -0
- package/lib/components/navigation/tabs/index.d.ts.map +1 -1
- package/lib/components/navigation/tabs/index.js +27 -1
- package/lib/components/navigation/tabs/index.js.map +1 -1
- package/lib/tail.css +2 -2
- 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, _114;
|
|
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 _115 = (0, react_1.useState)(false), drawerPageView = _115[0], setDrawerPageView = _115[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 _116 = intialiseDefaultFilterValues(), initialFilterSearch = _116.initialFilterSearch, initialFilterSearchParams = _116.initialFilterSearchParams, initialFilterSelection = _116.initialFilterSelection, initialFilterReference = _116.initialFilterReference, initialFilterReferenceDate = _116.initialFilterReferenceDate;
|
|
347
352
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
348
|
-
var
|
|
349
|
-
mode: (
|
|
353
|
+
var _117 = (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 = _117.persistedState, isPersistEnabled = _117.isEnabled, handleSaveView = _117.handleSaveView, handleRegisterViewSnapshot = _117.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 _118 = (0, react_1.useState)(false), loading = _118[0], setLoading = _118[1];
|
|
373
|
+
var _119 = (0, react_1.useState)(), notification = _119[0], setNotification = _119[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 _120 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearch), filterSearch = _120[0], setFilterSearch = _120[1];
|
|
384
|
+
var _121 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _h !== void 0 ? _h : initialFilterSearchParams), filterSearchParams = _121[0], setFilterSearchParams = _121[1];
|
|
385
|
+
var _122 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _j !== void 0 ? _j : initialFilterSelection), filterSelection = _122[0], setFilterSelection = _122[1];
|
|
386
|
+
var _123 = (0, react_1.useState)((_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _k !== void 0 ? _k : initialFilterReference), filterReference = _123[0], setFilterReference = _123[1];
|
|
387
|
+
var _124 = (0, react_1.useState)({}), filterReferenceSearch = _124[0], setFilterReferenceSearch = _124[1];
|
|
388
|
+
var _125 = (0, react_1.useState)({}), filterReferenceList = _125[0], setFilterReferenceList = _125[1];
|
|
389
|
+
var _126 = (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 = _126[0], setFilterReferenceDate = _126[1];
|
|
392
|
+
var _127 = (0, react_1.useState)(true), tableLoading = _127[0], setTableLoading = _127[1];
|
|
393
|
+
var _128 = (0, react_1.useState)(""), cursor = _128[0], setCursor = _128[1];
|
|
394
|
+
var _129 = (0, react_1.useState)(""), lastCursor = _129[0], setLastCursor = _129[1];
|
|
395
|
+
var _130 = (0, react_1.useState)([]), tableData = _130[0], setTableData = _130[1];
|
|
396
|
+
var _131 = (0, react_1.useState)([]), spaceTableData = _131[0], setSpaceTableData = _131[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 _132 = (0, react_1.useState)(0), size = _132[0], setSize = _132[1];
|
|
404
|
+
var _133 = (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 = _133[0], setPageIndex = _133[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 _134 = (0, react_1.useState)([]), selectedIds = _134[0], setSelectedIds = _134[1];
|
|
412
|
+
var _135 = (0, react_1.useState)(false), selectAll = _135[0], setSelectAll = _135[1];
|
|
413
|
+
var _136 = (0, react_1.useState)(""), deletePasscode = _136[0], setDeletePasscode = _136[1];
|
|
414
|
+
var _137 = (0, react_1.useState)(""), deletePasscodeInput = _137[0], setDeletePasscodeInput = _137[1];
|
|
415
|
+
var _138 = (0, react_1.useState)(""), deleteFeedId = _138[0], setDeleteFeedId = _138[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 _139 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _p !== void 0 ? _p : undefined), persistedSort = _139[0], setPersistedSort = _139[1];
|
|
420
|
+
var _140 = (0, react_1.useState)(false), filterDraft = _140[0], setFilterDraft = _140[1];
|
|
421
|
+
var _141 = (0, react_1.useState)(false), addTabModal = _141[0], setAddTabModal = _141[1];
|
|
422
|
+
var _142 = (0, react_1.useState)(-1), editTabIndex = _142[0], setEditTabIndex = _142[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 _143 = (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 = _143[0], setSelectedTab = _143[1];
|
|
429
|
+
var _144 = (0, react_1.useState)("dayGridMonth"), calendarView = _144[0], setCalendarView = _144[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 _145 = (0, react_1.useState)("month"), newCalendarViewMode = _145[0], setNewCalendarViewMode = _145[1];
|
|
433
|
+
var _146 = (0, react_1.useState)(new Date()), calendarTabMonth = _146[0], setCalendarTabMonth = _146[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 _147 = (0, react_1.useState)(true), kanbanDroppable = _147[0], setKanbanDroppable = _147[1];
|
|
438
|
+
var _148 = (0, react_1.useState)([]), kanbanOptions = _148[0], setKanbanOptions = _148[1];
|
|
439
|
+
var _149 = (0, react_1.useState)(false), batchUpdateModal = _149[0], setBatchUpdateModal = _149[1];
|
|
440
|
+
var _150 = (0, react_1.useState)({
|
|
430
441
|
columnId: "",
|
|
431
442
|
columnData: {},
|
|
432
|
-
}), batchUpdateData =
|
|
443
|
+
}), batchUpdateData = _150[0], setBatchUpdateData = _150[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 _151 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _s !== void 0 ? _s : []), shownSystemColumnIds = _151[0], setShownSystemColumnIds = _151[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 _152 = (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 = _152[0], setStructure = _152[1];
|
|
484
|
+
var _153 = (0, react_1.useState)(((_t = props === null || props === void 0 ? void 0 : props.organise) === null || _t === void 0 ? void 0 : _t.additionalQuery) || []), additionalQuery = _153[0], setAdditionalQuery = _153[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 _154 = (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 = _154[0], setFlexFilters = _154[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 _155 = (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 = _155[0], setFlexFiltersDebounced = _155[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 _156 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _156[0], setExportFlexFilters = _156[1];
|
|
516
|
+
var _157 = (0, react_1.useState)({}), flexFilterReferenceOptions = _157[0], setFlexFilterReferenceOptions = _157[1];
|
|
517
|
+
var _158 = (0, react_1.useState)({}), flexFilterReferenceSearch = _158[0], setFlexFilterReferenceSearch = _158[1];
|
|
518
|
+
var _159 = (0, react_1.useState)(false), flexFilterModalOpen = _159[0], setFlexFilterModalOpen = _159[1];
|
|
519
|
+
var _160 = (0, react_1.useState)(false), viewSettingsModalOpen = _160[0], setViewSettingsModalOpen = _160[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 _161 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _u !== void 0 ? _u : []), userHiddenColumnIds = _161[0], setUserHiddenColumnIds = _161[1];
|
|
526
|
+
var _162 = (0, react_1.useState)(""), columnSearch = _162[0], setColumnSearch = _162[1];
|
|
527
|
+
var _163 = (0, react_1.useState)([]), savedViews = _163[0], setSavedViews = _163[1];
|
|
528
|
+
var _164 = (0, react_1.useState)(null), activeSavedViewId = _164[0], setActiveSavedViewId = _164[1];
|
|
518
529
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
519
|
-
var
|
|
530
|
+
var _165 = (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 = _165[0], setColumnWidths = _165[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 _166 = (0, react_1.useState)(false), isViewDraftReady = _166[0], setIsViewDraftReady = _166[1];
|
|
523
534
|
// INFO: null while the name box is closed
|
|
524
|
-
var
|
|
525
|
-
var
|
|
526
|
-
var
|
|
535
|
+
var _167 = (0, react_1.useState)(null), savedViewName = _167[0], setSavedViewName = _167[1];
|
|
536
|
+
var _168 = (0, react_1.useState)(null), deletingSavedViewId = _168[0], setDeletingSavedViewId = _168[1];
|
|
537
|
+
var _169 = (0, react_1.useState)(null), draggingColumnId = _169[0], setDraggingColumnId = _169[1];
|
|
527
538
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
528
539
|
//INFO : Used by Auth
|
|
529
|
-
var
|
|
540
|
+
var _170 = (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 = _170[0], setAuthMethods = _170[1];
|
|
547
|
+
var _171 = (0, react_1.useState)(""), selectedAuthMethod = _171[0], setSelectedAuthMethod = _171[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 _172 = (0, react_1.useState)(false), authLoading = _172[0], setAuthLoading = _172[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 _173 = (0, react_1.useState)(false), deleting = _173[0], setDeleting = _173[1];
|
|
544
555
|
// INFO: Used by Activity Log
|
|
545
|
-
var
|
|
546
|
-
var
|
|
556
|
+
var _174 = (0, react_1.useState)(false), activityModal = _174[0], setActivityModal = _174[1];
|
|
557
|
+
var _175 = (0, react_1.useState)(""), activityId = _175[0], setActivityId = _175[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 _176 = (0, react_1.useState)(null), csvFile = _176[0], setCSVFile = _176[1];
|
|
560
|
+
var _177 = (0, react_1.useState)([]), csvFileData = _177[0], setCSVFileData = _177[1];
|
|
561
|
+
var _178 = (0, react_1.useState)(0), stepCSVIndex = _178[0], setStepCSVIndex = _178[1];
|
|
562
|
+
var _179 = (0, react_1.useState)({}), listCSVMapAttribute = _179[0], setListCSVMapAttribute = _179[1];
|
|
563
|
+
var _180 = (0, react_1.useState)({}), listCSVObjAttribute = _180[0], setListCSVObjAttribute = _180[1];
|
|
564
|
+
var _181 = (0, react_1.useState)([]), csvAPIAttribute = _181[0], setCSVAPIAttribute = _181[1];
|
|
565
|
+
var _182 = (0, react_1.useState)(((_v = props.devSettings.currentUser) === null || _v === void 0 ? void 0 : _v.userEmail) || ""), exportCSVEmail = _182[0], setExportCSVEmail = _182[1];
|
|
566
|
+
var _183 = (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 = _183[0], setExportPDFTitle = _183[1];
|
|
567
|
+
var _184 = (0, react_1.useState)(false), exportPDFLoading = _184[0], setExportPDFLoading = _184[1];
|
|
568
|
+
var _185 = (0, react_1.useState)(false), exportReadPDFLoading = _185[0], setExportReadPDFLoading = _185[1];
|
|
569
|
+
var _186 = (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 = _186[0], setExportSumAttributeIds = _186[1];
|
|
570
|
+
var _187 = (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 = _187[0], setHideSubItems = _187[1];
|
|
571
|
+
var _188 = (0, react_1.useState)([]), importTableData = _188[0], setImportTableData = _188[1];
|
|
572
|
+
var _189 = (0, react_1.useState)([]), queryList = _189[0], setQueryList = _189[1];
|
|
573
|
+
var _190 = (0, react_1.useState)(undefined), allQueryList = _190[0], setAllQueryList = _190[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 _191 = (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 = _191[0], setGroupId = _191[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 _192 = (0, react_1.useState)({}), groupPageState = _192[0], setGroupPageState = _192[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 _193 = (0, react_1.useState)(""), readTabSection = _193[0], setReadTabSection = _193[1];
|
|
594
|
+
var _194 = (0, react_1.useState)(false), readFloatingNav = _194[0], setReadFloatingNav = _194[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 _195 = (0, react_1.useState)(false), modalVisible = _195[0], setModalVisible = _195[1];
|
|
599
|
+
var _196 = (0, react_1.useState)(false), deleteModal = _196[0], setDeleteModal = _196[1];
|
|
600
|
+
var _197 = (0, react_1.useState)(false), excelModal = _197[0], setExcelModal = _197[1];
|
|
601
|
+
var _198 = (0, react_1.useState)(false), exportExcel = _198[0], setExportExcel = _198[1];
|
|
602
|
+
var _199 = (0, react_1.useState)(""), exportType = _199[0], setExportType = _199[1];
|
|
603
|
+
var _200 = (0, react_1.useState)(false), exportQR = _200[0], setExportQR = _200[1];
|
|
604
|
+
var _201 = (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 = _201[0], setActiveTab = _201[1];
|
|
609
|
+
var _202 = (0, react_1.useState)(false), signatureSigning = _202[0], setSignatureSigning = _202[1];
|
|
610
|
+
var _203 = (0, react_1.useState)({}), selectedData = _203[0], setSelectedData = _203[1];
|
|
611
|
+
var _204 = (0, react_1.useState)(""), selectedObjectStructureId = _204[0], setSelectedObjectStructureId = _204[1];
|
|
612
|
+
var _205 = (0, react_1.useState)(""), selectedObjectId = _205[0], setSelectedObjectId = _205[1];
|
|
613
|
+
var _206 = (0, react_1.useState)(""), selectedListAddressId = _206[0], setSelectedListAddressId = _206[1];
|
|
614
|
+
var _207 = (0, react_1.useState)(-1), selectedListAddressIndex = _207[0], setSelectedListAddressIndex = _207[1];
|
|
615
|
+
var _208 = (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 = _208[0], setSelectedListAddress = _208[1];
|
|
620
|
+
var _209 = (0, react_1.useState)({}), selectedObjectData = _209[0], setSelectedObjectData = _209[1];
|
|
621
|
+
var _210 = (0, react_1.useState)(null), objectCellEdit = _210[0], setObjectCellEdit = _210[1];
|
|
622
|
+
var _211 = (0, react_1.useState)(false), referenceLoading = _211[0], setReferenceLoading = _211[1];
|
|
623
|
+
var _212 = (0, react_1.useState)({}), referencesOptions = _212[0], setReferencesOptions = _212[1];
|
|
624
|
+
var _213 = (0, react_1.useState)({}), referencesDetails = _213[0], setReferencesDetails = _213[1];
|
|
625
|
+
var _214 = (0, react_1.useState)({}), listReferencesOptions = _214[0], setListReferencesOptions = _214[1];
|
|
626
|
+
var _215 = (0, react_1.useState)({}), referenceDeleteTableData = _215[0], setReferenceDeleteTableData = _215[1];
|
|
627
|
+
var _216 = (0, react_1.useState)([]), relatedSections = _216[0], setRelatedSections = _216[1];
|
|
628
|
+
var _217 = (0, react_1.useState)(0), referenceDeleteIndex = _217[0], setReferenceDeleteIndex = _217[1];
|
|
629
|
+
var _218 = (0, react_1.useState)({
|
|
619
630
|
id: "",
|
|
620
631
|
name: "",
|
|
621
632
|
type: "string",
|
|
622
|
-
}), referenceCreationModal =
|
|
623
|
-
var
|
|
624
|
-
var
|
|
633
|
+
}), referenceCreationModal = _218[0], setReferenceCreationModal = _218[1];
|
|
634
|
+
var _219 = (0, react_1.useState)({}), referenceModelSchema = _219[0], setReferenceSchema = _219[1];
|
|
635
|
+
var _220 = (0, react_1.useState)([]), kanbanChecked = _220[0], setKanbanChecked = _220[1];
|
|
625
636
|
//INFO : Offline
|
|
626
|
-
var
|
|
627
|
-
var
|
|
637
|
+
var _221 = (0, react_1.useState)(0), offlineDataLength = _221[0], setOfflineDataLength = _221[1];
|
|
638
|
+
var _222 = (0, react_1.useState)(false), offlineModal = _222[0], setOfflineModal = _222[1];
|
|
628
639
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
629
|
-
var
|
|
630
|
-
var
|
|
640
|
+
var _223 = (0, react_1.useState)(false), isLive = _223[0], setIsLive = _223[1];
|
|
641
|
+
var _224 = (0, react_1.useState)(false), isLiveOffline = _224[0], setIsLiveOffline = _224[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 _225 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _225[0], setIsNetworkOffline = _225[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 _226 = (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 = _226[0], setPageLimit = _226[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 _227 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _227.canUpdateRecord, canInlineUpdate = _227.canInlineUpdate, canBatchUpdate = _227.canBatchUpdate, canDeleteRecord = _227.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,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1098
1109
|
},
|
|
1099
1110
|
}
|
|
1100
1111
|
: null,
|
|
1101
|
-
|
|
1112
|
+
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1113
|
+
// nothing to find on any other page
|
|
1114
|
+
((_68 = props.edit) === null || _68 === void 0 ? void 0 : _68.enableUpdateDraft) &&
|
|
1115
|
+
!((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportDraft)
|
|
1102
1116
|
? {
|
|
1103
1117
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1104
1118
|
onClick: function () {
|
|
@@ -1107,7 +1121,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1107
1121
|
}
|
|
1108
1122
|
: null,
|
|
1109
1123
|
].filter(Boolean);
|
|
1110
|
-
if ((
|
|
1124
|
+
if ((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.moreSettings)
|
|
1111
1125
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1112
1126
|
//=====================================================================================
|
|
1113
1127
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1501,14 +1515,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1501
1515
|
//=====================================================================================
|
|
1502
1516
|
//SECTION: Saved Views
|
|
1503
1517
|
//=====================================================================================
|
|
1504
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1518
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.persistKey, (_73 = devSettings.currentUser) === null || _73 === void 0 ? void 0 : _73.userEmail);
|
|
1505
1519
|
(0, react_1.useEffect)(function () {
|
|
1506
1520
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1507
1521
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1508
1522
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1509
1523
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1510
1524
|
// browser until the person updates the view for everyone or resets it
|
|
1511
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1525
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.allView) !== undefined;
|
|
1512
1526
|
var handleGetViewDraftKey = function (viewId) {
|
|
1513
1527
|
var _a, _b;
|
|
1514
1528
|
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 +1599,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1585
1599
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1586
1600
|
(0, react_1.useEffect)(function () {
|
|
1587
1601
|
lastSentSharedViewsRef.current = null;
|
|
1588
|
-
}, [(
|
|
1602
|
+
}, [(_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.sharedViews]);
|
|
1589
1603
|
var handleStoreSharedViews = function (update) {
|
|
1590
1604
|
var _a, _b, _c;
|
|
1591
1605
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1630,13 +1644,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1630
1644
|
/* eslint-disable */
|
|
1631
1645
|
}, [
|
|
1632
1646
|
isSavedViewsEnabled,
|
|
1633
|
-
(
|
|
1634
|
-
(
|
|
1635
|
-
(
|
|
1647
|
+
(_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.initialSavedViewId,
|
|
1648
|
+
(_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.defaultSavedViewId,
|
|
1649
|
+
(_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.sharedViews,
|
|
1636
1650
|
savedViews,
|
|
1637
1651
|
]);
|
|
1638
1652
|
/* eslint-enable */
|
|
1639
|
-
var defaultSavedViewIds = ((
|
|
1653
|
+
var defaultSavedViewIds = ((_80 = (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.defaultSavedViews) !== null && _80 !== void 0 ? _80 : [])
|
|
1640
1654
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1641
1655
|
.join("|");
|
|
1642
1656
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1938,8 +1952,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1938
1952
|
pageLimit,
|
|
1939
1953
|
groupId,
|
|
1940
1954
|
columnWidths,
|
|
1941
|
-
(
|
|
1942
|
-
(
|
|
1955
|
+
(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.allView,
|
|
1956
|
+
(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews,
|
|
1943
1957
|
savedViews,
|
|
1944
1958
|
]);
|
|
1945
1959
|
/* eslint-enable */
|
|
@@ -1979,7 +1993,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1979
1993
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1980
1994
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1981
1995
|
/* eslint-disable */
|
|
1982
|
-
}, [props.collectionId, (
|
|
1996
|
+
}, [props.collectionId, (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.persistKey]);
|
|
1983
1997
|
/* eslint-enable */
|
|
1984
1998
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1985
1999
|
(0, react_1.useEffect)(function () {
|
|
@@ -2014,7 +2028,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2014
2028
|
(0, react_1.useEffect)(function () {
|
|
2015
2029
|
handleOfflinePrefetch();
|
|
2016
2030
|
/* eslint-disable */
|
|
2017
|
-
}, [props.collectionId, (
|
|
2031
|
+
}, [props.collectionId, (_84 = props.bareSettings) === null || _84 === void 0 ? void 0 : _84.bareOffline]);
|
|
2018
2032
|
/* eslint-enable */
|
|
2019
2033
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2020
2034
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2034,7 +2048,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2034
2048
|
}, interval);
|
|
2035
2049
|
return function () { return clearInterval(timer); };
|
|
2036
2050
|
/* eslint-disable */
|
|
2037
|
-
}, [(
|
|
2051
|
+
}, [(_85 = props.bareSettings) === null || _85 === void 0 ? void 0 : _85.barePollingInterval, isLive, isNetworkOffline]);
|
|
2038
2052
|
/* eslint-enable */
|
|
2039
2053
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2040
2054
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2076,7 +2090,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2076
2090
|
};
|
|
2077
2091
|
/* eslint-disable */
|
|
2078
2092
|
}, [
|
|
2079
|
-
(
|
|
2093
|
+
(_86 = props.bareSettings) === null || _86 === void 0 ? void 0 : _86.bareSocketName,
|
|
2080
2094
|
props.collectionId,
|
|
2081
2095
|
props.devSettings.sseEndpoint,
|
|
2082
2096
|
props.devSettings.dbAPIToken,
|
|
@@ -2350,10 +2364,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2350
2364
|
props.collectionId,
|
|
2351
2365
|
props.model,
|
|
2352
2366
|
props.localURLEndpoint,
|
|
2353
|
-
(
|
|
2354
|
-
(
|
|
2355
|
-
(
|
|
2356
|
-
(
|
|
2367
|
+
(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.extendedTabs,
|
|
2368
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.viewId,
|
|
2369
|
+
(_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.additionalQuery,
|
|
2370
|
+
(_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.groupBy,
|
|
2357
2371
|
resolvedType,
|
|
2358
2372
|
]);
|
|
2359
2373
|
/**
|
|
@@ -2505,7 +2519,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2505
2519
|
};
|
|
2506
2520
|
}, 100);
|
|
2507
2521
|
return function () { return clearTimeout(timeoutId); };
|
|
2508
|
-
}, [(
|
|
2522
|
+
}, [(_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2509
2523
|
(0, react_1.useEffect)(function () {
|
|
2510
2524
|
if (resolvedType !== "read")
|
|
2511
2525
|
return;
|
|
@@ -5304,45 +5318,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5304
5318
|
}
|
|
5305
5319
|
});
|
|
5306
5320
|
}); };
|
|
5307
|
-
var handleBatchDraftData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5308
|
-
var res, err_16;
|
|
5309
|
-
return __generator(this, function (_a) {
|
|
5310
|
-
switch (_a.label) {
|
|
5311
|
-
case 0:
|
|
5312
|
-
if (!canBatchUpdate)
|
|
5313
|
-
return [2 /*return*/];
|
|
5314
|
-
_a.label = 1;
|
|
5315
|
-
case 1:
|
|
5316
|
-
_a.trys.push([1, 3, , 4]);
|
|
5317
|
-
setLoading(true);
|
|
5318
|
-
return [4 /*yield*/, writeServerQuery.call("batchUpdate", {
|
|
5319
|
-
query: [
|
|
5320
|
-
{
|
|
5321
|
-
queryId: serverId,
|
|
5322
|
-
type: "in",
|
|
5323
|
-
value: selectedIds,
|
|
5324
|
-
},
|
|
5325
|
-
],
|
|
5326
|
-
data: {
|
|
5327
|
-
baseDraft: true,
|
|
5328
|
-
},
|
|
5329
|
-
})];
|
|
5330
|
-
case 2:
|
|
5331
|
-
res = _a.sent();
|
|
5332
|
-
if (res)
|
|
5333
|
-
handleRefresh(false, true);
|
|
5334
|
-
return [3 /*break*/, 4];
|
|
5335
|
-
case 3:
|
|
5336
|
-
err_16 = _a.sent();
|
|
5337
|
-
return [3 /*break*/, 4];
|
|
5338
|
-
case 4:
|
|
5339
|
-
setLoading(false);
|
|
5340
|
-
return [2 /*return*/];
|
|
5341
|
-
}
|
|
5342
|
-
});
|
|
5343
|
-
}); };
|
|
5344
5321
|
var handleBatchUpdateData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5345
|
-
var model_1, columnId_1, dataToSubmit_1, isFile, res, updateQuery, selectAllQuery, batchUpdateConfig, res,
|
|
5322
|
+
var model_1, columnId_1, dataToSubmit_1, isFile, res, updateQuery, selectAllQuery, batchUpdateConfig, res, err_16;
|
|
5346
5323
|
return __generator(this, function (_a) {
|
|
5347
5324
|
switch (_a.label) {
|
|
5348
5325
|
case 0:
|
|
@@ -5431,12 +5408,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5431
5408
|
_a.label = 7;
|
|
5432
5409
|
case 7: return [3 /*break*/, 10];
|
|
5433
5410
|
case 8:
|
|
5434
|
-
|
|
5435
|
-
if (
|
|
5411
|
+
err_16 = _a.sent();
|
|
5412
|
+
if (err_16.response) {
|
|
5436
5413
|
setNotification({
|
|
5437
5414
|
type: false,
|
|
5438
5415
|
title: "Error",
|
|
5439
|
-
msg: handleGetWriteErrorMessage(
|
|
5416
|
+
msg: handleGetWriteErrorMessage(err_16.response),
|
|
5440
5417
|
});
|
|
5441
5418
|
}
|
|
5442
5419
|
return [3 /*break*/, 10];
|
|
@@ -5450,7 +5427,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5450
5427
|
});
|
|
5451
5428
|
}); };
|
|
5452
5429
|
var handleUploadOfflineData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5453
|
-
var dataUploadedId, offlineDataResp, offlineData, offlineDataIds, updateDataRes, updateDataList, _loop_1, i,
|
|
5430
|
+
var dataUploadedId, offlineDataResp, offlineData, offlineDataIds, updateDataRes, updateDataList, _loop_1, i, err_17, success, fullDataResp, fullData, updatedData;
|
|
5454
5431
|
var _a, _b, _c, _d, _e, _f;
|
|
5455
5432
|
return __generator(this, function (_g) {
|
|
5456
5433
|
switch (_g.label) {
|
|
@@ -5486,7 +5463,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5486
5463
|
updateDataRes = _g.sent();
|
|
5487
5464
|
updateDataList = (_b = updateDataRes === null || updateDataRes === void 0 ? void 0 : updateDataRes.data) !== null && _b !== void 0 ? _b : [];
|
|
5488
5465
|
_loop_1 = function (i) {
|
|
5489
|
-
var eachOfflineData, offlineDataId, storedBaseline, serverDoc, isUpdate, preComplete, res,
|
|
5466
|
+
var eachOfflineData, offlineDataId, storedBaseline, serverDoc, isUpdate, preComplete, res, err_18;
|
|
5490
5467
|
var _h;
|
|
5491
5468
|
return __generator(this, function (_j) {
|
|
5492
5469
|
switch (_j.label) {
|
|
@@ -5547,7 +5524,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5547
5524
|
_j.sent();
|
|
5548
5525
|
return [3 /*break*/, 8];
|
|
5549
5526
|
case 7:
|
|
5550
|
-
|
|
5527
|
+
err_18 = _j.sent();
|
|
5551
5528
|
return [3 /*break*/, 8];
|
|
5552
5529
|
case 8: return [2 /*return*/];
|
|
5553
5530
|
}
|
|
@@ -5566,7 +5543,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5566
5543
|
return [3 /*break*/, 4];
|
|
5567
5544
|
case 7: return [3 /*break*/, 9];
|
|
5568
5545
|
case 8:
|
|
5569
|
-
|
|
5546
|
+
err_17 = _g.sent();
|
|
5570
5547
|
return [3 /*break*/, 9];
|
|
5571
5548
|
case 9:
|
|
5572
5549
|
success = dataUploadedId.length === offlineData.length;
|
|
@@ -5618,7 +5595,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5618
5595
|
// update an inline cell edit makes, gated on the same update right
|
|
5619
5596
|
var columnTypeActions = {
|
|
5620
5597
|
canUpdate: canUpdateRecord,
|
|
5621
|
-
onButtonClick: (
|
|
5598
|
+
onButtonClick: (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.onButtonClick,
|
|
5622
5599
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5623
5600
|
var _a;
|
|
5624
5601
|
return __generator(this, function (_b) {
|
|
@@ -5635,7 +5612,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5635
5612
|
}
|
|
5636
5613
|
});
|
|
5637
5614
|
}); },
|
|
5638
|
-
onTimeTrackingAction: ((
|
|
5615
|
+
onTimeTrackingAction: ((_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.onTimeTrackingAction) && canUpdateRecord
|
|
5639
5616
|
? function (rowId, columnId, action) {
|
|
5640
5617
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5641
5618
|
}
|
|
@@ -5664,7 +5641,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5664
5641
|
});
|
|
5665
5642
|
}); };
|
|
5666
5643
|
var handleSubmitData = function (type, rowId, columnId, data, offlineId, isOfflineUpdate, isDraft) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5667
|
-
var selectedId, id, createSelectedData_1, uniqueDataStructure, uniqueColumnId, res, offlineDataResp, offlineData, clonedForOffline, tempData, selectedIndex_3,
|
|
5644
|
+
var selectedId, id, createSelectedData_1, uniqueDataStructure, uniqueColumnId, res, offlineDataResp, offlineData, clonedForOffline, tempData, selectedIndex_3, err_19, isUniqueIdFieldCreate, isExistingDoc, newRecordData_1, changedAttributeIds, baseDraftValue, hasBaseDraftChange, offlineDataResp, clonedForOffline, tempData, selectedIndex_4, offlineData, err_20, dataToSubmit_2, changedAttributeIds, baseDraftValue, hasBaseDraftChange, operationType, currentRow, wentToServer, dataId, err_21, offlineDataResp, offlineData, clonedForOffline, tempData, selectedIndex_5, _a;
|
|
5668
5645
|
var _b, _c, _d, _e;
|
|
5669
5646
|
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
5670
5647
|
return __generator(this, function (_z) {
|
|
@@ -5786,7 +5763,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5786
5763
|
res = true;
|
|
5787
5764
|
return [3 /*break*/, 9];
|
|
5788
5765
|
case 8:
|
|
5789
|
-
|
|
5766
|
+
err_19 = _z.sent();
|
|
5790
5767
|
return [3 /*break*/, 9];
|
|
5791
5768
|
case 9: return [3 /*break*/, 16];
|
|
5792
5769
|
case 10:
|
|
@@ -5953,7 +5930,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5953
5930
|
res = true;
|
|
5954
5931
|
return [3 /*break*/, 22];
|
|
5955
5932
|
case 21:
|
|
5956
|
-
|
|
5933
|
+
err_20 = _z.sent();
|
|
5957
5934
|
return [3 /*break*/, 22];
|
|
5958
5935
|
case 22: return [3 /*break*/, 25];
|
|
5959
5936
|
case 23:
|
|
@@ -6103,8 +6080,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6103
6080
|
dataId = res ? id : "";
|
|
6104
6081
|
return [2 /*return*/, dataId];
|
|
6105
6082
|
case 39:
|
|
6106
|
-
|
|
6107
|
-
console.log("error",
|
|
6083
|
+
err_21 = _z.sent();
|
|
6084
|
+
console.log("error", err_21);
|
|
6108
6085
|
// INFO: clear in-flight guard on failure so the next save retries as a create
|
|
6109
6086
|
if (isCreatingRef.current) {
|
|
6110
6087
|
isCreatingRef.current = false;
|
|
@@ -6115,7 +6092,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6115
6092
|
id &&
|
|
6116
6093
|
!offlineId &&
|
|
6117
6094
|
!isOfflineUpdate &&
|
|
6118
|
-
!
|
|
6095
|
+
!err_21.response)) return [3 /*break*/, 44];
|
|
6119
6096
|
_z.label = 40;
|
|
6120
6097
|
case 40:
|
|
6121
6098
|
_z.trys.push([40, 43, , 44]);
|
|
@@ -6174,11 +6151,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6174
6151
|
_a = _z.sent();
|
|
6175
6152
|
return [3 /*break*/, 44];
|
|
6176
6153
|
case 44:
|
|
6177
|
-
if (
|
|
6154
|
+
if (err_21.response) {
|
|
6178
6155
|
setNotification({
|
|
6179
6156
|
type: false,
|
|
6180
6157
|
title: "Error",
|
|
6181
|
-
msg: handleGetWriteErrorMessage(
|
|
6158
|
+
msg: handleGetWriteErrorMessage(err_21.response),
|
|
6182
6159
|
});
|
|
6183
6160
|
}
|
|
6184
6161
|
return [3 /*break*/, 45];
|
|
@@ -6225,7 +6202,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6225
6202
|
});
|
|
6226
6203
|
}); };
|
|
6227
6204
|
var handleSubmit = function (isDraft) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6228
|
-
var preComplete, res, updatedMarkdownData_1, uploadedData_2, uploadTypes_1,
|
|
6205
|
+
var preComplete, res, updatedMarkdownData_1, uploadedData_2, uploadTypes_1, err_22;
|
|
6229
6206
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6230
6207
|
return __generator(this, function (_m) {
|
|
6231
6208
|
switch (_m.label) {
|
|
@@ -6358,7 +6335,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6358
6335
|
isSubmittingRef.current = false;
|
|
6359
6336
|
return [3 /*break*/, 9];
|
|
6360
6337
|
case 8:
|
|
6361
|
-
|
|
6338
|
+
err_22 = _m.sent();
|
|
6362
6339
|
setModalVisible(false);
|
|
6363
6340
|
setLoading(false);
|
|
6364
6341
|
isSubmittingRef.current = false;
|
|
@@ -6368,7 +6345,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6368
6345
|
});
|
|
6369
6346
|
}); };
|
|
6370
6347
|
var handleUpdateKanbanChecked = function (id, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6371
|
-
var
|
|
6348
|
+
var err_23;
|
|
6372
6349
|
var _a;
|
|
6373
6350
|
return __generator(this, function (_b) {
|
|
6374
6351
|
switch (_b.label) {
|
|
@@ -6386,7 +6363,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6386
6363
|
_b.sent();
|
|
6387
6364
|
return [3 /*break*/, 4];
|
|
6388
6365
|
case 3:
|
|
6389
|
-
|
|
6366
|
+
err_23 = _b.sent();
|
|
6390
6367
|
return [3 /*break*/, 4];
|
|
6391
6368
|
case 4: return [2 /*return*/];
|
|
6392
6369
|
}
|
|
@@ -6749,7 +6726,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6749
6726
|
handleUpdateChangeData(clonedData);
|
|
6750
6727
|
};
|
|
6751
6728
|
var handleOnChangeSelect = function (id, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6752
|
-
var _a, data, model, clonedData, refetchReference, currentSchema, allowedWatchedColumnTypes_1, watchedColumns, _i, watchedColumns_1, eachWatched, dependency, referenceRQ, valueRes,
|
|
6729
|
+
var _a, data, model, clonedData, refetchReference, currentSchema, allowedWatchedColumnTypes_1, watchedColumns, _i, watchedColumns_1, eachWatched, dependency, referenceRQ, valueRes, err_24;
|
|
6753
6730
|
return __generator(this, function (_b) {
|
|
6754
6731
|
switch (_b.label) {
|
|
6755
6732
|
case 0:
|
|
@@ -6812,7 +6789,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6812
6789
|
return [3 /*break*/, 3];
|
|
6813
6790
|
case 6: return [3 /*break*/, 8];
|
|
6814
6791
|
case 7:
|
|
6815
|
-
|
|
6792
|
+
err_24 = _b.sent();
|
|
6816
6793
|
return [3 /*break*/, 8];
|
|
6817
6794
|
case 8:
|
|
6818
6795
|
clonedData[id] = value;
|
|
@@ -6890,7 +6867,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6890
6867
|
}
|
|
6891
6868
|
};
|
|
6892
6869
|
var handleStepCSV = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
6893
|
-
var csvList_1, _loop_2, _i, _a, _b, eachKey, eachValue, valid_1, errorValue_1, excelFormData, updateFields, response, open_1,
|
|
6870
|
+
var csvList_1, _loop_2, _i, _a, _b, eachKey, eachValue, valid_1, errorValue_1, excelFormData, updateFields, response, open_1, err_25;
|
|
6894
6871
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
6895
6872
|
return __generator(this, function (_p) {
|
|
6896
6873
|
switch (_p.label) {
|
|
@@ -7037,12 +7014,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7037
7014
|
_p.label = 5;
|
|
7038
7015
|
case 5: return [3 /*break*/, 7];
|
|
7039
7016
|
case 6:
|
|
7040
|
-
|
|
7017
|
+
err_25 = _p.sent();
|
|
7041
7018
|
setLoading(false);
|
|
7042
7019
|
setNotification({
|
|
7043
7020
|
type: false,
|
|
7044
7021
|
title: "Import Error",
|
|
7045
|
-
msg:
|
|
7022
|
+
msg: err_25.message,
|
|
7046
7023
|
});
|
|
7047
7024
|
return [3 /*break*/, 7];
|
|
7048
7025
|
case 7: return [2 /*return*/];
|
|
@@ -7050,7 +7027,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7050
7027
|
});
|
|
7051
7028
|
}); };
|
|
7052
7029
|
var handleExportCSVData = function (downloadLinkOnly, printOnly) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7053
|
-
var exportQueryList, formulaRows, kept, baseUrl, apiEndpoint, reqData, res, dataList, csvDownloadLink, notificaitonMsg,
|
|
7030
|
+
var exportQueryList, formulaRows, kept, baseUrl, apiEndpoint, reqData, res, dataList, csvDownloadLink, notificaitonMsg, err_26;
|
|
7054
7031
|
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;
|
|
7055
7032
|
return __generator(this, function (_2) {
|
|
7056
7033
|
switch (_2.label) {
|
|
@@ -7133,7 +7110,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7133
7110
|
setExportCSVEmail((_1 = (_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) !== null && _1 !== void 0 ? _1 : "");
|
|
7134
7111
|
return [3 /*break*/, 6];
|
|
7135
7112
|
case 5:
|
|
7136
|
-
|
|
7113
|
+
err_26 = _2.sent();
|
|
7137
7114
|
setNotification({
|
|
7138
7115
|
type: true,
|
|
7139
7116
|
title: "Export Failed",
|
|
@@ -7189,7 +7166,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7189
7166
|
});
|
|
7190
7167
|
}); };
|
|
7191
7168
|
var handleExportReadPDF = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7192
|
-
var elementToExport, dimensionsConfig, headerConfig_1, isMobile, scale, html2canvasOptions, originalStyles, captureWidth, captureHeight, canvas, pageWidth, pageHeight, orientation_1, pdf, pixelsToMm, elementWidthMm, elementHeightMm, pageSize, margin, headerHeight, imageDataURL, imageWidth_1, imageHeight_1, hasImage, hasText, img_1,
|
|
7169
|
+
var elementToExport, dimensionsConfig, headerConfig_1, isMobile, scale, html2canvasOptions, originalStyles, captureWidth, captureHeight, canvas, pageWidth, pageHeight, orientation_1, pdf, pixelsToMm, elementWidthMm, elementHeightMm, pageSize, margin, headerHeight, imageDataURL, imageWidth_1, imageHeight_1, hasImage, hasText, img_1, err_27, textHeight, usableWidth, imgHeight, usableHeight, currentY, imgX, imgY, imgW, imgH, finalX, textY, textX, heightLeft, page, currentY, imgX, imgY, imgW, imgH, finalX, textY, textX, sourceY, sourceHeight, pageCanvas, ctx, pageData, pdfBlob, err_28;
|
|
7193
7170
|
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;
|
|
7194
7171
|
return __generator(this, function (_4) {
|
|
7195
7172
|
switch (_4.label) {
|
|
@@ -7360,8 +7337,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7360
7337
|
headerHeight = imageHeight_1 + 2;
|
|
7361
7338
|
return [3 /*break*/, 13];
|
|
7362
7339
|
case 12:
|
|
7363
|
-
|
|
7364
|
-
console.error("Failed to load PDF header image:",
|
|
7340
|
+
err_27 = _4.sent();
|
|
7341
|
+
console.error("Failed to load PDF header image:", err_27);
|
|
7365
7342
|
console.error("Image source:", headerConfig_1.image.src);
|
|
7366
7343
|
return [3 /*break*/, 13];
|
|
7367
7344
|
case 13:
|
|
@@ -7502,8 +7479,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7502
7479
|
}
|
|
7503
7480
|
return [3 /*break*/, 17];
|
|
7504
7481
|
case 15:
|
|
7505
|
-
|
|
7506
|
-
console.error("PDF export error:",
|
|
7482
|
+
err_28 = _4.sent();
|
|
7483
|
+
console.error("PDF export error:", err_28);
|
|
7507
7484
|
setNotification({
|
|
7508
7485
|
type: false,
|
|
7509
7486
|
title: "Error",
|
|
@@ -7849,8 +7826,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7849
7826
|
: rows;
|
|
7850
7827
|
};
|
|
7851
7828
|
/* 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, (
|
|
7829
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_94 = props.bareSettings) === null || _94 === void 0 ? void 0 : _94.bareNewDTW]);
|
|
7830
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.bareNewDTW]);
|
|
7854
7831
|
/* eslint-enable */
|
|
7855
7832
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7856
7833
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -8567,22 +8544,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8567
8544
|
// configures the table once and the panel inherits it.
|
|
8568
8545
|
var renderReadDrawer = function () {
|
|
8569
8546
|
var _a, _b, _c, _d;
|
|
8570
|
-
if (!
|
|
8547
|
+
if (!isDrawerRecord)
|
|
8571
8548
|
return null;
|
|
8572
8549
|
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",
|
|
8550
|
+
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",
|
|
8551
|
+
// INFO: a phone keyboard takes half the screen, which leaves a form in a
|
|
8552
|
+
// three-quarter sheet almost no room for the field being typed in
|
|
8553
|
+
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : (isDrawerForm ? "100" : "75"),
|
|
8554
|
+
// INFO: nothing typed into a form has been saved yet, so only its close
|
|
8555
|
+
// button leaves it — not a stray tap outside or a stray Escape
|
|
8556
|
+
disableDismiss: isDrawerForm, title: title !== null && title !== void 0 ? title : (typeof props.title === "string" && props.title
|
|
8574
8557
|
? 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",
|
|
8558
|
+
: "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
8559
|
// INFO: strips the flag so the nested instance renders the record
|
|
8577
8560
|
// rather than hosting another drawer
|
|
8578
8561
|
viewSettings: undefined,
|
|
8579
8562
|
// INFO: the panel header already names the record, and a
|
|
8580
8563
|
// list/detail breadcrumb is meaningless while the list is still on
|
|
8581
8564
|
// screen behind it
|
|
8582
|
-
title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign({
|
|
8565
|
+
title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign(__assign({
|
|
8583
8566
|
// INFO: DetailList's stacked rows waste a panel this narrow —
|
|
8584
8567
|
// compact puts label and value on one row. Overridable.
|
|
8585
|
-
bareCompactMode:
|
|
8568
|
+
bareCompactMode: !isDrawerForm }, props.bareSettings), {
|
|
8569
|
+
// INFO: the nested instance draws the form rather than hosting
|
|
8570
|
+
// another panel
|
|
8571
|
+
bareFormDrawer: false }), (isDrawerHost
|
|
8586
8572
|
? {}
|
|
8587
8573
|
: {
|
|
8588
8574
|
barePollingInterval: undefined,
|
|
@@ -8590,7 +8576,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8590
8576
|
})) })) }));
|
|
8591
8577
|
};
|
|
8592
8578
|
var renderContent = function () {
|
|
8593
|
-
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;
|
|
8579
|
+
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;
|
|
8594
8580
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
8595
8581
|
var tabs = renderTabs();
|
|
8596
8582
|
var pages = [
|
|
@@ -8927,17 +8913,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8927
8913
|
? (0, listModule_1.renderFlexFilterConditions)(flexFilters, structure, flexFilterExtras)
|
|
8928
8914
|
.length
|
|
8929
8915
|
: 0;
|
|
8916
|
+
// INFO: without the floating bar these buttons would have nowhere to
|
|
8917
|
+
// go, so a hidden search keeps the normal header
|
|
8918
|
+
var isMobileToolbar_1 = !!((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareListMobileToolbar) &&
|
|
8919
|
+
!!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileFloatingSearch) &&
|
|
8920
|
+
!((_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.hideSearch);
|
|
8930
8921
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
8931
8922
|
dbModule: dbModule,
|
|
8932
8923
|
dbType: devSettings.server,
|
|
8933
|
-
dbCollection: (
|
|
8924
|
+
dbCollection: (_32 = (_31 = props === null || props === void 0 ? void 0 : props.space) === null || _31 === void 0 ? void 0 : _31.pipelineDefaultSpaceId) !== null && _32 !== void 0 ? _32 : props.collectionId,
|
|
8934
8925
|
dbEndpoint: devSettings.dbEndpoint,
|
|
8935
8926
|
dbAPIToken: devSettings.dbAPIToken,
|
|
8936
8927
|
dbUserToken: devSettings.dbUserToken,
|
|
8937
|
-
}, cond: handleReadQueryHocCond(), offline: ((
|
|
8928
|
+
}, cond: handleReadQueryHocCond(), offline: ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
|
|
8938
8929
|
handleGetListData(data, "", "", cond);
|
|
8939
8930
|
}, onError: handleGetItemError }));
|
|
8940
|
-
if ((
|
|
8931
|
+
if ((_34 = props.renderSettings) === null || _34 === void 0 ? void 0 : _34.renderListUI) {
|
|
8941
8932
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8942
8933
|
listReadQueryHOC,
|
|
8943
8934
|
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
@@ -8990,10 +8981,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8990
8981
|
// settings panel and the flex filters, so the Space row keeps only
|
|
8991
8982
|
// refresh here
|
|
8992
8983
|
if (schemaPresent) {
|
|
8993
|
-
actionElementList.push(react_1.default.createElement(
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8984
|
+
actionElementList.push(react_1.default.createElement("div", { className: isMobileToolbar_1 ? "hidden md:block" : "" },
|
|
8985
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
8986
|
+
// INFO - When Refresh Don't Clear Filter
|
|
8987
|
+
handleRefresh();
|
|
8988
|
+
}, bgColor: ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/10" : "bg-white" })));
|
|
8997
8989
|
}
|
|
8998
8990
|
if ((((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListFilterAsPopup) ||
|
|
8999
8991
|
((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareCompactMode)) &&
|
|
@@ -9039,9 +9031,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9039
9031
|
// INFO: Mobile — the popover cannot fit the panel and overflows the
|
|
9040
9032
|
// viewport, so a Modal takes over (same split as the flex filter)
|
|
9041
9033
|
actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9034
|
+
!isMobileToolbar_1 &&
|
|
9035
|
+
viewSettingsIcon("-mobile", function () {
|
|
9036
|
+
return setViewSettingsModalOpen(true);
|
|
9037
|
+
}),
|
|
9045
9038
|
react_1.default.createElement(modal_1.Modal, { open: viewSettingsModalOpen, maxWidth: "lg", title: "View", darkMode: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.darkMode, darkModeBg: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkModeBg, onClose: function () { return setViewSettingsModalOpen(false); }, renderContent: function () { return renderViewSettingsContent(); } })));
|
|
9046
9039
|
}
|
|
9047
9040
|
// INFO: Flex filter — desktop uses PopUp, mobile uses Modal
|
|
@@ -9110,7 +9103,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9110
9103
|
} }));
|
|
9111
9104
|
}
|
|
9112
9105
|
if (actionElementList.length > 0) {
|
|
9113
|
-
return (react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center
|
|
9106
|
+
return (react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center justify-end space-x-2 px-2 md:my-0 ".concat(isMobileToolbar_1 ? "" : "my-6") }, actionElementList));
|
|
9114
9107
|
}
|
|
9115
9108
|
else
|
|
9116
9109
|
return null;
|
|
@@ -9149,47 +9142,58 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9149
9142
|
};
|
|
9150
9143
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
9151
9144
|
listReadQueryHOC,
|
|
9152
|
-
react_1.default.createElement("div", { className: "flex py-2 ".concat(
|
|
9153
|
-
?
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9145
|
+
react_1.default.createElement("div", { className: "flex py-2 ".concat(isMobileToolbar_1
|
|
9146
|
+
? "w-full flex-row items-center md:items-end"
|
|
9147
|
+
: ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareCompactMode)
|
|
9148
|
+
? // INFO: the grow spacer is hidden on phones (search lives in
|
|
9149
|
+
// the floating bar), so the row itself pushes the actions right
|
|
9150
|
+
"w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
|
|
9151
|
+
: "flex-col md:items-end md:flex-row") },
|
|
9152
|
+
(props.title || props.description) && (react_1.default.createElement("div", { className: "flex min-w-0 flex-col" },
|
|
9153
|
+
props.title && (react_1.default.createElement("div", { className: "flex min-w-0 items-center gap-2" },
|
|
9154
|
+
react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode) ? "text-white" : "") }, props.title),
|
|
9155
|
+
((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareSocketName) &&
|
|
9161
9156
|
isLive &&
|
|
9162
9157
|
!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" },
|
|
9163
9158
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
|
|
9164
9159
|
"LIVE")),
|
|
9165
|
-
((
|
|
9160
|
+
((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.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" },
|
|
9166
9161
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
|
|
9167
9162
|
"OFFLINE")))),
|
|
9168
|
-
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
|
|
9169
|
-
react_1.default.createElement("div", { className: ((
|
|
9163
|
+
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500 ".concat(isMobileToolbar_1 ? "hidden md:inline" : "") }, props.description)))),
|
|
9164
|
+
react_1.default.createElement("div", { className: ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareCompactMode)
|
|
9170
9165
|
? "hidden sm:block grow"
|
|
9171
9166
|
: "grow" }),
|
|
9172
|
-
react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end" },
|
|
9167
|
+
react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end ".concat(isMobileToolbar_1 ? "shrink-0" : "") },
|
|
9173
9168
|
renderListFilterElements(),
|
|
9174
9169
|
renderListActionElements())),
|
|
9175
9170
|
renderListNewRowFilterElements(),
|
|
9176
|
-
(schemaPresent || ((
|
|
9171
|
+
(schemaPresent || ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode })),
|
|
9177
9172
|
renderScopedTabContent(tabs, resolvedType, viewType),
|
|
9178
|
-
((
|
|
9179
|
-
((
|
|
9173
|
+
((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
|
|
9174
|
+
((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListMobileFloatingSearch) &&
|
|
9180
9175
|
(0, listModule_1.renderFloatingMobileSearch)({
|
|
9181
9176
|
filterSearch: filterSearch,
|
|
9182
9177
|
handleNameSearch: handleNameSearch,
|
|
9183
9178
|
onFilterClick: function () { return setFlexFilterModalOpen(true); },
|
|
9184
|
-
hideSearch: (
|
|
9185
|
-
darkMode: (
|
|
9186
|
-
floatingOffset: (
|
|
9187
|
-
hideFilter: !((
|
|
9188
|
-
activeFilterCount: ((
|
|
9179
|
+
hideSearch: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.hideSearch,
|
|
9180
|
+
darkMode: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode,
|
|
9181
|
+
floatingOffset: (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareListFloatingActionOffset,
|
|
9182
|
+
hideFilter: !((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareFlexFilters),
|
|
9183
|
+
activeFilterCount: ((_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareFlexFilters)
|
|
9189
9184
|
? activeFlexFilterCount_1
|
|
9190
9185
|
: undefined,
|
|
9191
9186
|
// INFO: Hides when items are selected so NewTable's multi-action bar takes over.
|
|
9192
|
-
hidden: selectAll || ((
|
|
9187
|
+
hidden: selectAll || ((_49 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _49 !== void 0 ? _49 : 0) > 0,
|
|
9188
|
+
onRefreshClick: isMobileToolbar_1 && schemaPresent
|
|
9189
|
+
? function () { return handleRefresh(); }
|
|
9190
|
+
: undefined,
|
|
9191
|
+
onViewSettingsClick: isMobileToolbar_1 &&
|
|
9192
|
+
isViewSettingsEnabled &&
|
|
9193
|
+
(selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) !== "calendar"
|
|
9194
|
+
? function () { return setViewSettingsModalOpen(true); }
|
|
9195
|
+
: undefined,
|
|
9196
|
+
viewSettingsCount: getViewSettingsColumns().filter(getIsColumnHidden).length,
|
|
9193
9197
|
})));
|
|
9194
9198
|
default:
|
|
9195
9199
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
@@ -9839,7 +9843,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9839
9843
|
// tableData / spaceTableData, so handleBuildNewTableGroups() keeps building
|
|
9840
9844
|
// bands from one source; each group advances its own cursor
|
|
9841
9845
|
var handleFetchGroupNextPage = function (groupKey) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9842
|
-
var current, cursor, generation, page_1, existingIds_1, appendRaw_1, appendPretty_1, nextCursor,
|
|
9846
|
+
var current, cursor, generation, page_1, existingIds_1, appendRaw_1, appendPretty_1, nextCursor, err_29;
|
|
9843
9847
|
var _a, _b, _c, _d;
|
|
9844
9848
|
return __generator(this, function (_e) {
|
|
9845
9849
|
switch (_e.label) {
|
|
@@ -9881,7 +9885,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9881
9885
|
});
|
|
9882
9886
|
return [3 /*break*/, 4];
|
|
9883
9887
|
case 3:
|
|
9884
|
-
|
|
9888
|
+
err_29 = _e.sent();
|
|
9885
9889
|
if (generation !== groupPagingGenRef.current)
|
|
9886
9890
|
return [2 /*return*/];
|
|
9887
9891
|
// INFO: clear the in-flight flag so a failed page can be retried on the
|
|
@@ -9895,7 +9899,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9895
9899
|
// INFO: page mode — swaps ONE group's rows for its page `page`; every other
|
|
9896
9900
|
// group keeps the page it is on
|
|
9897
9901
|
var handleFetchGroupPage = function (groupKey, page) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9898
|
-
var generation, result, keptRaw_1, keptPretty_1, loaded,
|
|
9902
|
+
var generation, result, keptRaw_1, keptPretty_1, loaded, err_30;
|
|
9899
9903
|
return __generator(this, function (_a) {
|
|
9900
9904
|
switch (_a.label) {
|
|
9901
9905
|
case 0:
|
|
@@ -9931,7 +9935,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9931
9935
|
});
|
|
9932
9936
|
return [3 /*break*/, 4];
|
|
9933
9937
|
case 3:
|
|
9934
|
-
|
|
9938
|
+
err_30 = _a.sent();
|
|
9935
9939
|
if (generation !== groupPagingGenRef.current)
|
|
9936
9940
|
return [2 /*return*/];
|
|
9937
9941
|
handleSetGroupPageState(groupKey, { loadingMore: false });
|
|
@@ -10011,9 +10015,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10011
10015
|
selectedIds.length > 0 &&
|
|
10012
10016
|
canBatchUpdate &&
|
|
10013
10017
|
!((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10014
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10015
|
-
handleBatchDraftData();
|
|
10016
|
-
} }),
|
|
10017
10018
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10018
10019
|
handleCloneSelectedData();
|
|
10019
10020
|
} }))),
|
|
@@ -10113,12 +10114,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10113
10114
|
: undefined, groupLoadingStatus: renderCheckGroupPaging() ? groupPageState : undefined, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: ((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.disableSelectFullData) === null || _e === void 0 ? void 0 : _e.table) || isFormulaView, maxSelectedCount: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMaxSelectedCount, mobileView: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMobileView, mobileTooltip: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
10114
10115
|
!((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideTableExtraMultipleAction)
|
|
10115
10116
|
? [
|
|
10116
|
-
{
|
|
10117
|
-
id: "draft",
|
|
10118
|
-
btnText: "Change to Draft",
|
|
10119
|
-
onClick: function () { return handleBatchDraftData(); },
|
|
10120
|
-
hide: selectedIds.length === 0,
|
|
10121
|
-
},
|
|
10122
10117
|
{
|
|
10123
10118
|
id: "clone",
|
|
10124
10119
|
btnText: "Clone Items",
|
|
@@ -10260,9 +10255,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10260
10255
|
selectedIds.length > 0 &&
|
|
10261
10256
|
canBatchUpdate &&
|
|
10262
10257
|
!((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10263
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10264
|
-
handleBatchDraftData();
|
|
10265
|
-
} }),
|
|
10266
10258
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10267
10259
|
handleCloneSelectedData();
|
|
10268
10260
|
} }))),
|
|
@@ -10641,9 +10633,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10641
10633
|
if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareNewDTW) {
|
|
10642
10634
|
return (react_1.default.createElement(newList_1.NewList, __assign({ darkModeBg: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.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: ((_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.disableSelectFullData) === null || _w === void 0 ? void 0 : _w.list) || isFormulaView, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
10643
10635
|
selectedIds.length > 0 && canBatchUpdate && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10644
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10645
|
-
handleBatchDraftData();
|
|
10646
|
-
} }),
|
|
10647
10636
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10648
10637
|
handleCloneSelectedData();
|
|
10649
10638
|
} }))),
|
|
@@ -10668,9 +10657,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10668
10657
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10669
10658
|
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) || isFormulaView, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
10670
10659
|
selectedIds.length > 0 && canBatchUpdate && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10671
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10672
|
-
handleBatchDraftData();
|
|
10673
|
-
} }),
|
|
10674
10660
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10675
10661
|
handleCloneSelectedData();
|
|
10676
10662
|
} }))),
|
|
@@ -11831,14 +11817,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11831
11817
|
};
|
|
11832
11818
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11833
11819
|
renderNotification("root"),
|
|
11834
|
-
((
|
|
11820
|
+
((_97 = (_96 = props.renderSettings) === null || _96 === void 0 ? void 0 : _96.renderLoadingUI) === null || _97 === void 0 ? void 0 : _97.call(_96)) && loading ? ((_98 = props.renderSettings) === null || _98 === void 0 ? void 0 : _98.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkMode, darkModeBg: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11835
11821
|
var _a, _b;
|
|
11836
11822
|
if (loading)
|
|
11837
11823
|
return;
|
|
11838
11824
|
handlePopUpModal(false);
|
|
11839
11825
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11840
11826
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11841
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11827
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkMode, darkModeBg: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11842
11828
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11843
11829
|
if (dataId) {
|
|
11844
11830
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11854,19 +11840,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11854
11840
|
}, onClose: function () {
|
|
11855
11841
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11856
11842
|
} }),
|
|
11857
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11843
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkMode, darkModeBg: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11858
11844
|
setReferenceDeleteTableData({});
|
|
11859
11845
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11860
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11846
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkMode, darkModeBg: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11861
11847
|
setDeletePasscodeInput("");
|
|
11862
11848
|
setDeleteModal(!deleteModal);
|
|
11863
11849
|
setDeleteFeedId("");
|
|
11864
11850
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11865
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11851
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkMode, darkModeBg: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11866
11852
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11867
11853
|
setBatchUpdateModal(false);
|
|
11868
11854
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11869
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11855
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11870
11856
|
var _a, _b;
|
|
11871
11857
|
if (props.space)
|
|
11872
11858
|
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 +11867,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11881
11867
|
(0, react_dom_1.createPortal)(
|
|
11882
11868
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11883
11869
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11884
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11870
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkMode, darkModeBg: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11885
11871
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11886
11872
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11887
11873
|
// toolbar's collection-wide button clears it when it opens.
|
|
11888
11874
|
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
11875
|
? props.title
|
|
11890
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11876
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_113 = props.id) !== null && _113 !== void 0 ? _113 : "") : activityId, activityLog: (_114 = props.edit) === null || _114 === void 0 ? void 0 : _114.activityLog, model: structure }) })), document.body),
|
|
11891
11877
|
renderScrollSentinel()));
|
|
11892
11878
|
});
|
|
11893
11879
|
//# sourceMappingURL=index.js.map
|