blixify-ui-web 1.2.209 → 1.2.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +1 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +271 -290
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/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/groupSection/index.d.ts.map +1 -1
- package/lib/components/display/groupSection/index.js +8 -3
- package/lib/components/display/groupSection/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +8 -3
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/navigation/leftNav/index.d.ts +1 -0
- package/lib/components/navigation/leftNav/index.d.ts.map +1 -1
- package/lib/components/navigation/leftNav/index.js +4 -4
- package/lib/components/navigation/leftNav/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
|
@@ -248,10 +248,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
248
248
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
249
249
|
// most in effect dependency arrays — following props.type there would leave
|
|
250
250
|
// the list never refetching while the panel is open, which fails silently.
|
|
251
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113;
|
|
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.
|
|
@@ -348,14 +348,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
348
348
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
349
349
|
};
|
|
350
350
|
};
|
|
351
|
-
var
|
|
351
|
+
var _116 = intialiseDefaultFilterValues(), initialFilterSearch = _116.initialFilterSearch, initialFilterSearchParams = _116.initialFilterSearchParams, initialFilterSelection = _116.initialFilterSelection, initialFilterReference = _116.initialFilterReference, initialFilterReferenceDate = _116.initialFilterReferenceDate;
|
|
352
352
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
353
|
-
var
|
|
353
|
+
var _117 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
354
354
|
mode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistViewState,
|
|
355
355
|
collectionId: props.collectionId,
|
|
356
356
|
persistKey: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.persistKey,
|
|
357
357
|
type: resolvedType,
|
|
358
|
-
}), rawPersistedState =
|
|
358
|
+
}), rawPersistedState = _117.persistedState, isPersistEnabled = _117.isEnabled, handleSaveView = _117.handleSaveView, handleRegisterViewSnapshot = _117.handleRegisterViewSnapshot;
|
|
359
359
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
360
360
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
361
361
|
var _a, _b, _c;
|
|
@@ -369,8 +369,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
369
369
|
(_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterReferences,
|
|
370
370
|
(_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareFlexFilterListObjects,
|
|
371
371
|
]);
|
|
372
|
-
var
|
|
373
|
-
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];
|
|
374
374
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
375
375
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
376
376
|
(0, react_1.useEffect)(function () {
|
|
@@ -380,67 +380,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
380
380
|
return function () { return clearTimeout(timer); };
|
|
381
381
|
}, [notification]);
|
|
382
382
|
//INFO : Used by List
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var
|
|
386
|
-
var
|
|
387
|
-
var
|
|
388
|
-
var
|
|
389
|
-
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)
|
|
390
390
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
391
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
392
|
-
var
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
396
|
-
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];
|
|
397
397
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
398
398
|
// the state it closed over can predate an earlier save on the same row
|
|
399
399
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
400
400
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
401
401
|
tableDataRef.current = tableData;
|
|
402
402
|
spaceTableDataRef.current = spaceTableData;
|
|
403
|
-
var
|
|
404
|
-
var
|
|
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
405
|
// INFO: every change of page, including the return to the first page when a
|
|
406
406
|
// filter or search changes, which onChangePagination does not always report
|
|
407
407
|
(0, react_1.useEffect)(function () {
|
|
408
408
|
var _a, _b;
|
|
409
409
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
410
410
|
}, [pageIndex]);
|
|
411
|
-
var
|
|
412
|
-
var
|
|
413
|
-
var
|
|
414
|
-
var
|
|
415
|
-
var
|
|
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];
|
|
416
416
|
//INFO : Used by List Organise
|
|
417
417
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
418
418
|
// persistViewState is enabled and a persisted sort exists
|
|
419
|
-
var
|
|
420
|
-
var
|
|
421
|
-
var
|
|
422
|
-
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];
|
|
423
423
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
424
424
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
425
|
-
var
|
|
425
|
+
var _143 = (0, react_1.useState)(function () {
|
|
426
426
|
var _a, _b;
|
|
427
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);
|
|
428
|
-
}), selectedTab =
|
|
429
|
-
var
|
|
428
|
+
}), selectedTab = _143[0], setSelectedTab = _143[1];
|
|
429
|
+
var _144 = (0, react_1.useState)("dayGridMonth"), calendarView = _144[0], setCalendarView = _144[1];
|
|
430
430
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
431
431
|
// (calendarView above drives the matching range query)
|
|
432
|
-
var
|
|
433
|
-
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];
|
|
434
434
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
435
435
|
// whenever its settings change, and that must not undo the user's switch
|
|
436
436
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
437
|
-
var
|
|
438
|
-
var
|
|
439
|
-
var
|
|
440
|
-
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)({
|
|
441
441
|
columnId: "",
|
|
442
442
|
columnData: {},
|
|
443
|
-
}), batchUpdateData =
|
|
443
|
+
}), batchUpdateData = _150[0], setBatchUpdateData = _150[1];
|
|
444
444
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
445
445
|
// join the structure hidden; the ones a user shows are kept per view
|
|
446
446
|
var isSystemColumnsEnabled = !!((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareSystemColumns);
|
|
@@ -448,12 +448,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
448
448
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
449
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; }); })
|
|
450
450
|
: [];
|
|
451
|
-
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];
|
|
452
452
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
453
453
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
454
454
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
455
455
|
};
|
|
456
|
-
var
|
|
456
|
+
var _152 = (0, react_1.useState)(function () {
|
|
457
457
|
var _a;
|
|
458
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 : []);
|
|
459
459
|
if (!persistedState)
|
|
@@ -480,8 +480,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
return model;
|
|
483
|
-
}), structure =
|
|
484
|
-
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];
|
|
485
485
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
486
486
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
487
487
|
var defaultFlexFilterRow = [
|
|
@@ -492,9 +492,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
492
492
|
value: undefined,
|
|
493
493
|
},
|
|
494
494
|
];
|
|
495
|
-
var
|
|
495
|
+
var _154 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
496
496
|
? persistedState.flexFilters
|
|
497
|
-
: defaultFlexFilterRow), flexFilters =
|
|
497
|
+
: defaultFlexFilterRow), flexFilters = _154[0], setFlexFilters = _154[1];
|
|
498
498
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
499
499
|
// clear methods so chained calls in one tick aren't stale.
|
|
500
500
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -507,81 +507,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
507
507
|
}, [flexFilters]);
|
|
508
508
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
509
509
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
510
|
-
var
|
|
510
|
+
var _155 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
511
511
|
? persistedState.flexFilters
|
|
512
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
512
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _155[0], setFlexFiltersDebounced = _155[1];
|
|
513
513
|
// INFO: the filter rows of the export being set up — started from the
|
|
514
514
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
518
|
-
var
|
|
519
|
-
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];
|
|
520
520
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
521
521
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
522
522
|
// structure to props.model whenever props change, which would wipe the
|
|
523
523
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
524
524
|
// structure — writing user hides there would blur the two concepts.
|
|
525
|
-
var
|
|
526
|
-
var
|
|
527
|
-
var
|
|
528
|
-
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];
|
|
529
529
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
530
|
-
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];
|
|
531
531
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
532
532
|
// so the defaults drawn before it never overwrite a person's own
|
|
533
|
-
var
|
|
533
|
+
var _166 = (0, react_1.useState)(false), isViewDraftReady = _166[0], setIsViewDraftReady = _166[1];
|
|
534
534
|
// INFO: null while the name box is closed
|
|
535
|
-
var
|
|
536
|
-
var
|
|
537
|
-
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];
|
|
538
538
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
539
539
|
//INFO : Used by Auth
|
|
540
|
-
var
|
|
540
|
+
var _170 = (0, react_1.useState)({
|
|
541
541
|
email: "",
|
|
542
542
|
google: "",
|
|
543
543
|
phone: "",
|
|
544
544
|
disabled: false,
|
|
545
545
|
create: false,
|
|
546
|
-
}), authMethods =
|
|
547
|
-
var
|
|
546
|
+
}), authMethods = _170[0], setAuthMethods = _170[1];
|
|
547
|
+
var _171 = (0, react_1.useState)(""), selectedAuthMethod = _171[0], setSelectedAuthMethod = _171[1];
|
|
548
548
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
549
549
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
550
|
-
var
|
|
550
|
+
var _172 = (0, react_1.useState)(false), authLoading = _172[0], setAuthLoading = _172[1];
|
|
551
551
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
552
552
|
// the state has rendered, and the state disables the confirm button
|
|
553
553
|
var deletingRef = (0, react_1.useRef)(false);
|
|
554
|
-
var
|
|
554
|
+
var _173 = (0, react_1.useState)(false), deleting = _173[0], setDeleting = _173[1];
|
|
555
555
|
// INFO: Used by Activity Log
|
|
556
|
-
var
|
|
557
|
-
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];
|
|
558
558
|
//INFO : Used by Export
|
|
559
|
-
var
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var
|
|
565
|
-
var
|
|
566
|
-
var
|
|
567
|
-
var
|
|
568
|
-
var
|
|
569
|
-
var
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
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];
|
|
574
574
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
575
575
|
// ungrouped, so it opens ungrouped
|
|
576
|
-
var
|
|
576
|
+
var _191 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
577
577
|
? persistedState.groupBy || undefined
|
|
578
|
-
: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.groupBy), groupId =
|
|
578
|
+
: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.groupBy), groupId = _191[0], setGroupId = _191[1];
|
|
579
579
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
580
580
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
581
581
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
582
582
|
// next page as the user scrolls inside that band, independent of every other
|
|
583
583
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
584
|
-
var
|
|
584
|
+
var _192 = (0, react_1.useState)({}), groupPageState = _192[0], setGroupPageState = _192[1];
|
|
585
585
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
586
586
|
// in one tick do not re-fetch an already in-flight page.
|
|
587
587
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -590,59 +590,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
590
590
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
591
591
|
// arrival instead of appending rows that belong to the old list
|
|
592
592
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
593
|
-
var
|
|
594
|
-
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];
|
|
595
595
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
596
596
|
//INFO : Used by Read
|
|
597
597
|
//INFO : Used by Update
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
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 () {
|
|
605
605
|
var _a, _b;
|
|
606
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 : "";
|
|
607
607
|
return firstTabId;
|
|
608
|
-
}), activeTab =
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
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)({
|
|
616
616
|
lat: 0,
|
|
617
617
|
lng: 0,
|
|
618
618
|
name: "",
|
|
619
|
-
}), selectedListAddress =
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
var
|
|
623
|
-
var
|
|
624
|
-
var
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var
|
|
628
|
-
var
|
|
629
|
-
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)({
|
|
630
630
|
id: "",
|
|
631
631
|
name: "",
|
|
632
632
|
type: "string",
|
|
633
|
-
}), referenceCreationModal =
|
|
634
|
-
var
|
|
635
|
-
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];
|
|
636
636
|
//INFO : Offline
|
|
637
|
-
var
|
|
638
|
-
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];
|
|
639
639
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
640
|
-
var
|
|
641
|
-
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];
|
|
642
642
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
643
643
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
644
644
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
645
|
-
var
|
|
645
|
+
var _225 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _225[0], setIsNetworkOffline = _225[1];
|
|
646
646
|
var previousType = (0, react_1.useRef)(null);
|
|
647
647
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
648
648
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -866,7 +866,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
866
866
|
var isSchemaHideMode = ((_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.onChangeHide) ? true : false;
|
|
867
867
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
868
868
|
// the persisted value and falls back to the consumer's limit
|
|
869
|
-
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];
|
|
870
870
|
var limit = pageLimit;
|
|
871
871
|
var isSavedViewsEnabled = !!((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.savedViews) && resolvedType === "list";
|
|
872
872
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
@@ -978,7 +978,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
978
978
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
979
979
|
};
|
|
980
980
|
};
|
|
981
|
-
var
|
|
981
|
+
var _227 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _227.canUpdateRecord, canInlineUpdate = _227.canInlineUpdate, canBatchUpdate = _227.canBatchUpdate, canDeleteRecord = _227.canDeleteRecord;
|
|
982
982
|
var isEditor = ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.allEditable) ? true : false;
|
|
983
983
|
var isOffline = (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareOffline;
|
|
984
984
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -1109,7 +1109,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1109
1109
|
},
|
|
1110
1110
|
}
|
|
1111
1111
|
: null,
|
|
1112
|
-
|
|
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)
|
|
1113
1116
|
? {
|
|
1114
1117
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1115
1118
|
onClick: function () {
|
|
@@ -1118,7 +1121,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1118
1121
|
}
|
|
1119
1122
|
: null,
|
|
1120
1123
|
].filter(Boolean);
|
|
1121
|
-
if ((
|
|
1124
|
+
if ((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.moreSettings)
|
|
1122
1125
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1123
1126
|
//=====================================================================================
|
|
1124
1127
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1512,14 +1515,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1512
1515
|
//=====================================================================================
|
|
1513
1516
|
//SECTION: Saved Views
|
|
1514
1517
|
//=====================================================================================
|
|
1515
|
-
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);
|
|
1516
1519
|
(0, react_1.useEffect)(function () {
|
|
1517
1520
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1518
1521
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1519
1522
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1520
1523
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1521
1524
|
// browser until the person updates the view for everyone or resets it
|
|
1522
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1525
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.allView) !== undefined;
|
|
1523
1526
|
var handleGetViewDraftKey = function (viewId) {
|
|
1524
1527
|
var _a, _b;
|
|
1525
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);
|
|
@@ -1596,7 +1599,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1596
1599
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1597
1600
|
(0, react_1.useEffect)(function () {
|
|
1598
1601
|
lastSentSharedViewsRef.current = null;
|
|
1599
|
-
}, [(
|
|
1602
|
+
}, [(_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.sharedViews]);
|
|
1600
1603
|
var handleStoreSharedViews = function (update) {
|
|
1601
1604
|
var _a, _b, _c;
|
|
1602
1605
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1641,13 +1644,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1641
1644
|
/* eslint-disable */
|
|
1642
1645
|
}, [
|
|
1643
1646
|
isSavedViewsEnabled,
|
|
1644
|
-
(
|
|
1645
|
-
(
|
|
1646
|
-
(
|
|
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,
|
|
1647
1650
|
savedViews,
|
|
1648
1651
|
]);
|
|
1649
1652
|
/* eslint-enable */
|
|
1650
|
-
var defaultSavedViewIds = ((
|
|
1653
|
+
var defaultSavedViewIds = ((_80 = (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.defaultSavedViews) !== null && _80 !== void 0 ? _80 : [])
|
|
1651
1654
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1652
1655
|
.join("|");
|
|
1653
1656
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1949,8 +1952,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1949
1952
|
pageLimit,
|
|
1950
1953
|
groupId,
|
|
1951
1954
|
columnWidths,
|
|
1952
|
-
(
|
|
1953
|
-
(
|
|
1955
|
+
(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.allView,
|
|
1956
|
+
(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews,
|
|
1954
1957
|
savedViews,
|
|
1955
1958
|
]);
|
|
1956
1959
|
/* eslint-enable */
|
|
@@ -1990,7 +1993,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1990
1993
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1991
1994
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1992
1995
|
/* eslint-disable */
|
|
1993
|
-
}, [props.collectionId, (
|
|
1996
|
+
}, [props.collectionId, (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.persistKey]);
|
|
1994
1997
|
/* eslint-enable */
|
|
1995
1998
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1996
1999
|
(0, react_1.useEffect)(function () {
|
|
@@ -2025,7 +2028,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2025
2028
|
(0, react_1.useEffect)(function () {
|
|
2026
2029
|
handleOfflinePrefetch();
|
|
2027
2030
|
/* eslint-disable */
|
|
2028
|
-
}, [props.collectionId, (
|
|
2031
|
+
}, [props.collectionId, (_84 = props.bareSettings) === null || _84 === void 0 ? void 0 : _84.bareOffline]);
|
|
2029
2032
|
/* eslint-enable */
|
|
2030
2033
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2031
2034
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2045,7 +2048,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2045
2048
|
}, interval);
|
|
2046
2049
|
return function () { return clearInterval(timer); };
|
|
2047
2050
|
/* eslint-disable */
|
|
2048
|
-
}, [(
|
|
2051
|
+
}, [(_85 = props.bareSettings) === null || _85 === void 0 ? void 0 : _85.barePollingInterval, isLive, isNetworkOffline]);
|
|
2049
2052
|
/* eslint-enable */
|
|
2050
2053
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2051
2054
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2087,7 +2090,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2087
2090
|
};
|
|
2088
2091
|
/* eslint-disable */
|
|
2089
2092
|
}, [
|
|
2090
|
-
(
|
|
2093
|
+
(_86 = props.bareSettings) === null || _86 === void 0 ? void 0 : _86.bareSocketName,
|
|
2091
2094
|
props.collectionId,
|
|
2092
2095
|
props.devSettings.sseEndpoint,
|
|
2093
2096
|
props.devSettings.dbAPIToken,
|
|
@@ -2361,10 +2364,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2361
2364
|
props.collectionId,
|
|
2362
2365
|
props.model,
|
|
2363
2366
|
props.localURLEndpoint,
|
|
2364
|
-
(
|
|
2365
|
-
(
|
|
2366
|
-
(
|
|
2367
|
-
(
|
|
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,
|
|
2368
2371
|
resolvedType,
|
|
2369
2372
|
]);
|
|
2370
2373
|
/**
|
|
@@ -2516,7 +2519,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2516
2519
|
};
|
|
2517
2520
|
}, 100);
|
|
2518
2521
|
return function () { return clearTimeout(timeoutId); };
|
|
2519
|
-
}, [(
|
|
2522
|
+
}, [(_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2520
2523
|
(0, react_1.useEffect)(function () {
|
|
2521
2524
|
if (resolvedType !== "read")
|
|
2522
2525
|
return;
|
|
@@ -5315,45 +5318,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5315
5318
|
}
|
|
5316
5319
|
});
|
|
5317
5320
|
}); };
|
|
5318
|
-
var handleBatchDraftData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5319
|
-
var res, err_16;
|
|
5320
|
-
return __generator(this, function (_a) {
|
|
5321
|
-
switch (_a.label) {
|
|
5322
|
-
case 0:
|
|
5323
|
-
if (!canBatchUpdate)
|
|
5324
|
-
return [2 /*return*/];
|
|
5325
|
-
_a.label = 1;
|
|
5326
|
-
case 1:
|
|
5327
|
-
_a.trys.push([1, 3, , 4]);
|
|
5328
|
-
setLoading(true);
|
|
5329
|
-
return [4 /*yield*/, writeServerQuery.call("batchUpdate", {
|
|
5330
|
-
query: [
|
|
5331
|
-
{
|
|
5332
|
-
queryId: serverId,
|
|
5333
|
-
type: "in",
|
|
5334
|
-
value: selectedIds,
|
|
5335
|
-
},
|
|
5336
|
-
],
|
|
5337
|
-
data: {
|
|
5338
|
-
baseDraft: true,
|
|
5339
|
-
},
|
|
5340
|
-
})];
|
|
5341
|
-
case 2:
|
|
5342
|
-
res = _a.sent();
|
|
5343
|
-
if (res)
|
|
5344
|
-
handleRefresh(false, true);
|
|
5345
|
-
return [3 /*break*/, 4];
|
|
5346
|
-
case 3:
|
|
5347
|
-
err_16 = _a.sent();
|
|
5348
|
-
return [3 /*break*/, 4];
|
|
5349
|
-
case 4:
|
|
5350
|
-
setLoading(false);
|
|
5351
|
-
return [2 /*return*/];
|
|
5352
|
-
}
|
|
5353
|
-
});
|
|
5354
|
-
}); };
|
|
5355
5321
|
var handleBatchUpdateData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5356
|
-
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;
|
|
5357
5323
|
return __generator(this, function (_a) {
|
|
5358
5324
|
switch (_a.label) {
|
|
5359
5325
|
case 0:
|
|
@@ -5442,12 +5408,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5442
5408
|
_a.label = 7;
|
|
5443
5409
|
case 7: return [3 /*break*/, 10];
|
|
5444
5410
|
case 8:
|
|
5445
|
-
|
|
5446
|
-
if (
|
|
5411
|
+
err_16 = _a.sent();
|
|
5412
|
+
if (err_16.response) {
|
|
5447
5413
|
setNotification({
|
|
5448
5414
|
type: false,
|
|
5449
5415
|
title: "Error",
|
|
5450
|
-
msg: handleGetWriteErrorMessage(
|
|
5416
|
+
msg: handleGetWriteErrorMessage(err_16.response),
|
|
5451
5417
|
});
|
|
5452
5418
|
}
|
|
5453
5419
|
return [3 /*break*/, 10];
|
|
@@ -5461,7 +5427,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5461
5427
|
});
|
|
5462
5428
|
}); };
|
|
5463
5429
|
var handleUploadOfflineData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
5464
|
-
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;
|
|
5465
5431
|
var _a, _b, _c, _d, _e, _f;
|
|
5466
5432
|
return __generator(this, function (_g) {
|
|
5467
5433
|
switch (_g.label) {
|
|
@@ -5497,7 +5463,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5497
5463
|
updateDataRes = _g.sent();
|
|
5498
5464
|
updateDataList = (_b = updateDataRes === null || updateDataRes === void 0 ? void 0 : updateDataRes.data) !== null && _b !== void 0 ? _b : [];
|
|
5499
5465
|
_loop_1 = function (i) {
|
|
5500
|
-
var eachOfflineData, offlineDataId, storedBaseline, serverDoc, isUpdate, preComplete, res,
|
|
5466
|
+
var eachOfflineData, offlineDataId, storedBaseline, serverDoc, isUpdate, preComplete, res, err_18;
|
|
5501
5467
|
var _h;
|
|
5502
5468
|
return __generator(this, function (_j) {
|
|
5503
5469
|
switch (_j.label) {
|
|
@@ -5558,7 +5524,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5558
5524
|
_j.sent();
|
|
5559
5525
|
return [3 /*break*/, 8];
|
|
5560
5526
|
case 7:
|
|
5561
|
-
|
|
5527
|
+
err_18 = _j.sent();
|
|
5562
5528
|
return [3 /*break*/, 8];
|
|
5563
5529
|
case 8: return [2 /*return*/];
|
|
5564
5530
|
}
|
|
@@ -5577,7 +5543,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5577
5543
|
return [3 /*break*/, 4];
|
|
5578
5544
|
case 7: return [3 /*break*/, 9];
|
|
5579
5545
|
case 8:
|
|
5580
|
-
|
|
5546
|
+
err_17 = _g.sent();
|
|
5581
5547
|
return [3 /*break*/, 9];
|
|
5582
5548
|
case 9:
|
|
5583
5549
|
success = dataUploadedId.length === offlineData.length;
|
|
@@ -5629,7 +5595,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5629
5595
|
// update an inline cell edit makes, gated on the same update right
|
|
5630
5596
|
var columnTypeActions = {
|
|
5631
5597
|
canUpdate: canUpdateRecord,
|
|
5632
|
-
onButtonClick: (
|
|
5598
|
+
onButtonClick: (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.onButtonClick,
|
|
5633
5599
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5634
5600
|
var _a;
|
|
5635
5601
|
return __generator(this, function (_b) {
|
|
@@ -5646,7 +5612,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5646
5612
|
}
|
|
5647
5613
|
});
|
|
5648
5614
|
}); },
|
|
5649
|
-
onTimeTrackingAction: ((
|
|
5615
|
+
onTimeTrackingAction: ((_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.onTimeTrackingAction) && canUpdateRecord
|
|
5650
5616
|
? function (rowId, columnId, action) {
|
|
5651
5617
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5652
5618
|
}
|
|
@@ -5675,7 +5641,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5675
5641
|
});
|
|
5676
5642
|
}); };
|
|
5677
5643
|
var handleSubmitData = function (type, rowId, columnId, data, offlineId, isOfflineUpdate, isDraft) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5678
|
-
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;
|
|
5679
5645
|
var _b, _c, _d, _e;
|
|
5680
5646
|
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
5681
5647
|
return __generator(this, function (_z) {
|
|
@@ -5797,7 +5763,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5797
5763
|
res = true;
|
|
5798
5764
|
return [3 /*break*/, 9];
|
|
5799
5765
|
case 8:
|
|
5800
|
-
|
|
5766
|
+
err_19 = _z.sent();
|
|
5801
5767
|
return [3 /*break*/, 9];
|
|
5802
5768
|
case 9: return [3 /*break*/, 16];
|
|
5803
5769
|
case 10:
|
|
@@ -5964,7 +5930,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5964
5930
|
res = true;
|
|
5965
5931
|
return [3 /*break*/, 22];
|
|
5966
5932
|
case 21:
|
|
5967
|
-
|
|
5933
|
+
err_20 = _z.sent();
|
|
5968
5934
|
return [3 /*break*/, 22];
|
|
5969
5935
|
case 22: return [3 /*break*/, 25];
|
|
5970
5936
|
case 23:
|
|
@@ -6114,8 +6080,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6114
6080
|
dataId = res ? id : "";
|
|
6115
6081
|
return [2 /*return*/, dataId];
|
|
6116
6082
|
case 39:
|
|
6117
|
-
|
|
6118
|
-
console.log("error",
|
|
6083
|
+
err_21 = _z.sent();
|
|
6084
|
+
console.log("error", err_21);
|
|
6119
6085
|
// INFO: clear in-flight guard on failure so the next save retries as a create
|
|
6120
6086
|
if (isCreatingRef.current) {
|
|
6121
6087
|
isCreatingRef.current = false;
|
|
@@ -6126,7 +6092,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6126
6092
|
id &&
|
|
6127
6093
|
!offlineId &&
|
|
6128
6094
|
!isOfflineUpdate &&
|
|
6129
|
-
!
|
|
6095
|
+
!err_21.response)) return [3 /*break*/, 44];
|
|
6130
6096
|
_z.label = 40;
|
|
6131
6097
|
case 40:
|
|
6132
6098
|
_z.trys.push([40, 43, , 44]);
|
|
@@ -6185,11 +6151,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6185
6151
|
_a = _z.sent();
|
|
6186
6152
|
return [3 /*break*/, 44];
|
|
6187
6153
|
case 44:
|
|
6188
|
-
if (
|
|
6154
|
+
if (err_21.response) {
|
|
6189
6155
|
setNotification({
|
|
6190
6156
|
type: false,
|
|
6191
6157
|
title: "Error",
|
|
6192
|
-
msg: handleGetWriteErrorMessage(
|
|
6158
|
+
msg: handleGetWriteErrorMessage(err_21.response),
|
|
6193
6159
|
});
|
|
6194
6160
|
}
|
|
6195
6161
|
return [3 /*break*/, 45];
|
|
@@ -6236,7 +6202,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6236
6202
|
});
|
|
6237
6203
|
}); };
|
|
6238
6204
|
var handleSubmit = function (isDraft) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6239
|
-
var preComplete, res, updatedMarkdownData_1, uploadedData_2, uploadTypes_1,
|
|
6205
|
+
var preComplete, res, updatedMarkdownData_1, uploadedData_2, uploadTypes_1, err_22;
|
|
6240
6206
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6241
6207
|
return __generator(this, function (_m) {
|
|
6242
6208
|
switch (_m.label) {
|
|
@@ -6369,7 +6335,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6369
6335
|
isSubmittingRef.current = false;
|
|
6370
6336
|
return [3 /*break*/, 9];
|
|
6371
6337
|
case 8:
|
|
6372
|
-
|
|
6338
|
+
err_22 = _m.sent();
|
|
6373
6339
|
setModalVisible(false);
|
|
6374
6340
|
setLoading(false);
|
|
6375
6341
|
isSubmittingRef.current = false;
|
|
@@ -6379,7 +6345,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6379
6345
|
});
|
|
6380
6346
|
}); };
|
|
6381
6347
|
var handleUpdateKanbanChecked = function (id, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6382
|
-
var
|
|
6348
|
+
var err_23;
|
|
6383
6349
|
var _a;
|
|
6384
6350
|
return __generator(this, function (_b) {
|
|
6385
6351
|
switch (_b.label) {
|
|
@@ -6397,7 +6363,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6397
6363
|
_b.sent();
|
|
6398
6364
|
return [3 /*break*/, 4];
|
|
6399
6365
|
case 3:
|
|
6400
|
-
|
|
6366
|
+
err_23 = _b.sent();
|
|
6401
6367
|
return [3 /*break*/, 4];
|
|
6402
6368
|
case 4: return [2 /*return*/];
|
|
6403
6369
|
}
|
|
@@ -6760,7 +6726,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6760
6726
|
handleUpdateChangeData(clonedData);
|
|
6761
6727
|
};
|
|
6762
6728
|
var handleOnChangeSelect = function (id, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6763
|
-
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;
|
|
6764
6730
|
return __generator(this, function (_b) {
|
|
6765
6731
|
switch (_b.label) {
|
|
6766
6732
|
case 0:
|
|
@@ -6823,7 +6789,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6823
6789
|
return [3 /*break*/, 3];
|
|
6824
6790
|
case 6: return [3 /*break*/, 8];
|
|
6825
6791
|
case 7:
|
|
6826
|
-
|
|
6792
|
+
err_24 = _b.sent();
|
|
6827
6793
|
return [3 /*break*/, 8];
|
|
6828
6794
|
case 8:
|
|
6829
6795
|
clonedData[id] = value;
|
|
@@ -6901,7 +6867,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6901
6867
|
}
|
|
6902
6868
|
};
|
|
6903
6869
|
var handleStepCSV = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
6904
|
-
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;
|
|
6905
6871
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
6906
6872
|
return __generator(this, function (_p) {
|
|
6907
6873
|
switch (_p.label) {
|
|
@@ -7048,12 +7014,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7048
7014
|
_p.label = 5;
|
|
7049
7015
|
case 5: return [3 /*break*/, 7];
|
|
7050
7016
|
case 6:
|
|
7051
|
-
|
|
7017
|
+
err_25 = _p.sent();
|
|
7052
7018
|
setLoading(false);
|
|
7053
7019
|
setNotification({
|
|
7054
7020
|
type: false,
|
|
7055
7021
|
title: "Import Error",
|
|
7056
|
-
msg:
|
|
7022
|
+
msg: err_25.message,
|
|
7057
7023
|
});
|
|
7058
7024
|
return [3 /*break*/, 7];
|
|
7059
7025
|
case 7: return [2 /*return*/];
|
|
@@ -7061,7 +7027,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7061
7027
|
});
|
|
7062
7028
|
}); };
|
|
7063
7029
|
var handleExportCSVData = function (downloadLinkOnly, printOnly) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7064
|
-
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;
|
|
7065
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;
|
|
7066
7032
|
return __generator(this, function (_2) {
|
|
7067
7033
|
switch (_2.label) {
|
|
@@ -7144,7 +7110,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7144
7110
|
setExportCSVEmail((_1 = (_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) !== null && _1 !== void 0 ? _1 : "");
|
|
7145
7111
|
return [3 /*break*/, 6];
|
|
7146
7112
|
case 5:
|
|
7147
|
-
|
|
7113
|
+
err_26 = _2.sent();
|
|
7148
7114
|
setNotification({
|
|
7149
7115
|
type: true,
|
|
7150
7116
|
title: "Export Failed",
|
|
@@ -7200,7 +7166,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7200
7166
|
});
|
|
7201
7167
|
}); };
|
|
7202
7168
|
var handleExportReadPDF = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7203
|
-
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;
|
|
7204
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;
|
|
7205
7171
|
return __generator(this, function (_4) {
|
|
7206
7172
|
switch (_4.label) {
|
|
@@ -7371,8 +7337,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7371
7337
|
headerHeight = imageHeight_1 + 2;
|
|
7372
7338
|
return [3 /*break*/, 13];
|
|
7373
7339
|
case 12:
|
|
7374
|
-
|
|
7375
|
-
console.error("Failed to load PDF header image:",
|
|
7340
|
+
err_27 = _4.sent();
|
|
7341
|
+
console.error("Failed to load PDF header image:", err_27);
|
|
7376
7342
|
console.error("Image source:", headerConfig_1.image.src);
|
|
7377
7343
|
return [3 /*break*/, 13];
|
|
7378
7344
|
case 13:
|
|
@@ -7513,8 +7479,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7513
7479
|
}
|
|
7514
7480
|
return [3 /*break*/, 17];
|
|
7515
7481
|
case 15:
|
|
7516
|
-
|
|
7517
|
-
console.error("PDF export error:",
|
|
7482
|
+
err_28 = _4.sent();
|
|
7483
|
+
console.error("PDF export error:", err_28);
|
|
7518
7484
|
setNotification({
|
|
7519
7485
|
type: false,
|
|
7520
7486
|
title: "Error",
|
|
@@ -7860,8 +7826,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7860
7826
|
: rows;
|
|
7861
7827
|
};
|
|
7862
7828
|
/* eslint-disable */
|
|
7863
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7864
|
-
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]);
|
|
7865
7831
|
/* eslint-enable */
|
|
7866
7832
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7867
7833
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -8610,7 +8576,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8610
8576
|
})) })) }));
|
|
8611
8577
|
};
|
|
8612
8578
|
var renderContent = function () {
|
|
8613
|
-
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;
|
|
8614
8580
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
8615
8581
|
var tabs = renderTabs();
|
|
8616
8582
|
var pages = [
|
|
@@ -8947,17 +8913,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8947
8913
|
? (0, listModule_1.renderFlexFilterConditions)(flexFilters, structure, flexFilterExtras)
|
|
8948
8914
|
.length
|
|
8949
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);
|
|
8950
8921
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
8951
8922
|
dbModule: dbModule,
|
|
8952
8923
|
dbType: devSettings.server,
|
|
8953
|
-
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,
|
|
8954
8925
|
dbEndpoint: devSettings.dbEndpoint,
|
|
8955
8926
|
dbAPIToken: devSettings.dbAPIToken,
|
|
8956
8927
|
dbUserToken: devSettings.dbUserToken,
|
|
8957
|
-
}, cond: handleReadQueryHocCond(), offline: ((
|
|
8928
|
+
}, cond: handleReadQueryHocCond(), offline: ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
|
|
8958
8929
|
handleGetListData(data, "", "", cond);
|
|
8959
8930
|
}, onError: handleGetItemError }));
|
|
8960
|
-
if ((
|
|
8931
|
+
if ((_34 = props.renderSettings) === null || _34 === void 0 ? void 0 : _34.renderListUI) {
|
|
8961
8932
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8962
8933
|
listReadQueryHOC,
|
|
8963
8934
|
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
@@ -9010,10 +8981,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9010
8981
|
// settings panel and the flex filters, so the Space row keeps only
|
|
9011
8982
|
// refresh here
|
|
9012
8983
|
if (schemaPresent) {
|
|
9013
|
-
actionElementList.push(react_1.default.createElement(
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
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" })));
|
|
9017
8989
|
}
|
|
9018
8990
|
if ((((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListFilterAsPopup) ||
|
|
9019
8991
|
((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareCompactMode)) &&
|
|
@@ -9059,9 +9031,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9059
9031
|
// INFO: Mobile — the popover cannot fit the panel and overflows the
|
|
9060
9032
|
// viewport, so a Modal takes over (same split as the flex filter)
|
|
9061
9033
|
actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9034
|
+
!isMobileToolbar_1 &&
|
|
9035
|
+
viewSettingsIcon("-mobile", function () {
|
|
9036
|
+
return setViewSettingsModalOpen(true);
|
|
9037
|
+
}),
|
|
9065
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(); } })));
|
|
9066
9039
|
}
|
|
9067
9040
|
// INFO: Flex filter — desktop uses PopUp, mobile uses Modal
|
|
@@ -9130,7 +9103,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9130
9103
|
} }));
|
|
9131
9104
|
}
|
|
9132
9105
|
if (actionElementList.length > 0) {
|
|
9133
|
-
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));
|
|
9134
9107
|
}
|
|
9135
9108
|
else
|
|
9136
9109
|
return null;
|
|
@@ -9169,47 +9142,58 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9169
9142
|
};
|
|
9170
9143
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
9171
9144
|
listReadQueryHOC,
|
|
9172
|
-
react_1.default.createElement("div", { className: "flex py-2 ".concat(
|
|
9173
|
-
?
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
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) &&
|
|
9181
9156
|
isLive &&
|
|
9182
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" },
|
|
9183
9158
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
|
|
9184
9159
|
"LIVE")),
|
|
9185
|
-
((
|
|
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" },
|
|
9186
9161
|
react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
|
|
9187
9162
|
"OFFLINE")))),
|
|
9188
|
-
props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
|
|
9189
|
-
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)
|
|
9190
9165
|
? "hidden sm:block grow"
|
|
9191
9166
|
: "grow" }),
|
|
9192
|
-
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" : "") },
|
|
9193
9168
|
renderListFilterElements(),
|
|
9194
9169
|
renderListActionElements())),
|
|
9195
9170
|
renderListNewRowFilterElements(),
|
|
9196
|
-
(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 })),
|
|
9197
9172
|
renderScopedTabContent(tabs, resolvedType, viewType),
|
|
9198
|
-
((
|
|
9199
|
-
((
|
|
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) &&
|
|
9200
9175
|
(0, listModule_1.renderFloatingMobileSearch)({
|
|
9201
9176
|
filterSearch: filterSearch,
|
|
9202
9177
|
handleNameSearch: handleNameSearch,
|
|
9203
9178
|
onFilterClick: function () { return setFlexFilterModalOpen(true); },
|
|
9204
|
-
hideSearch: (
|
|
9205
|
-
darkMode: (
|
|
9206
|
-
floatingOffset: (
|
|
9207
|
-
hideFilter: !((
|
|
9208
|
-
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)
|
|
9209
9184
|
? activeFlexFilterCount_1
|
|
9210
9185
|
: undefined,
|
|
9211
9186
|
// INFO: Hides when items are selected so NewTable's multi-action bar takes over.
|
|
9212
|
-
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,
|
|
9213
9197
|
})));
|
|
9214
9198
|
default:
|
|
9215
9199
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
@@ -9859,25 +9843,40 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9859
9843
|
// tableData / spaceTableData, so handleBuildNewTableGroups() keeps building
|
|
9860
9844
|
// bands from one source; each group advances its own cursor
|
|
9861
9845
|
var handleFetchGroupNextPage = function (groupKey) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9862
|
-
var current, cursor, generation, page_1, existingIds_1, appendRaw_1, appendPretty_1, nextCursor,
|
|
9863
|
-
var _a, _b, _c, _d;
|
|
9864
|
-
return __generator(this, function (
|
|
9865
|
-
switch (
|
|
9846
|
+
var current, groupSize, cursor, generation, page_1, existingIds_1, appendRaw_1, appendPretty_1, nextCursor, err_29;
|
|
9847
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9848
|
+
return __generator(this, function (_h) {
|
|
9849
|
+
switch (_h.label) {
|
|
9866
9850
|
case 0:
|
|
9867
9851
|
if (!renderCheckGroupPaging() || !renderCheckScrollMode())
|
|
9868
9852
|
return [2 /*return*/];
|
|
9869
9853
|
current = groupPageStateRef.current[groupKey];
|
|
9870
9854
|
if ((current === null || current === void 0 ? void 0 : current.loadingMore) || (current === null || current === void 0 ? void 0 : current.exhausted))
|
|
9871
9855
|
return [2 /*return*/];
|
|
9872
|
-
|
|
9856
|
+
// INFO: the main read already holds every row of the list, so this group has
|
|
9857
|
+
// nothing further to read
|
|
9858
|
+
if (!(current === null || current === void 0 ? void 0 : current.fetched) &&
|
|
9859
|
+
!tableLoading &&
|
|
9860
|
+
size > 0 &&
|
|
9861
|
+
tableDataRef.current.length >= size) {
|
|
9862
|
+
groupSize = (_c = (_b = ((_a = handleBuildNewTableGroups()) !== null && _a !== void 0 ? _a : []).find(function (eachGroup) { return eachGroup.id === groupKey; })) === null || _b === void 0 ? void 0 : _b.rowIds.length) !== null && _c !== void 0 ? _c : 0;
|
|
9863
|
+
handleSetGroupPageState(groupKey, {
|
|
9864
|
+
cursor: groupSize,
|
|
9865
|
+
size: groupSize,
|
|
9866
|
+
fetched: true,
|
|
9867
|
+
exhausted: true,
|
|
9868
|
+
});
|
|
9869
|
+
return [2 /*return*/];
|
|
9870
|
+
}
|
|
9871
|
+
cursor = (_g = (_d = current === null || current === void 0 ? void 0 : current.cursor) !== null && _d !== void 0 ? _d : (_f = ((_e = handleBuildNewTableGroups()) !== null && _e !== void 0 ? _e : []).find(function (eachGroup) { return eachGroup.id === groupKey; })) === null || _f === void 0 ? void 0 : _f.rowIds.length) !== null && _g !== void 0 ? _g : 0;
|
|
9873
9872
|
generation = groupPagingGenRef.current;
|
|
9874
9873
|
handleSetGroupPageState(groupKey, { cursor: cursor, loadingMore: true });
|
|
9875
|
-
|
|
9874
|
+
_h.label = 1;
|
|
9876
9875
|
case 1:
|
|
9877
|
-
|
|
9876
|
+
_h.trys.push([1, 3, , 4]);
|
|
9878
9877
|
return [4 /*yield*/, handleReadGroupPage(groupKey, cursor)];
|
|
9879
9878
|
case 2:
|
|
9880
|
-
page_1 =
|
|
9879
|
+
page_1 = _h.sent();
|
|
9881
9880
|
if (!page_1)
|
|
9882
9881
|
return [2 /*return*/];
|
|
9883
9882
|
existingIds_1 = new Set(tableDataRef.current.map(function (eachRow) { var _a; return (_a = eachRow.id) !== null && _a !== void 0 ? _a : eachRow._id; }));
|
|
@@ -9901,7 +9900,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9901
9900
|
});
|
|
9902
9901
|
return [3 /*break*/, 4];
|
|
9903
9902
|
case 3:
|
|
9904
|
-
|
|
9903
|
+
err_29 = _h.sent();
|
|
9905
9904
|
if (generation !== groupPagingGenRef.current)
|
|
9906
9905
|
return [2 /*return*/];
|
|
9907
9906
|
// INFO: clear the in-flight flag so a failed page can be retried on the
|
|
@@ -9915,7 +9914,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9915
9914
|
// INFO: page mode — swaps ONE group's rows for its page `page`; every other
|
|
9916
9915
|
// group keeps the page it is on
|
|
9917
9916
|
var handleFetchGroupPage = function (groupKey, page) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9918
|
-
var generation, result, keptRaw_1, keptPretty_1, loaded,
|
|
9917
|
+
var generation, result, keptRaw_1, keptPretty_1, loaded, err_30;
|
|
9919
9918
|
return __generator(this, function (_a) {
|
|
9920
9919
|
switch (_a.label) {
|
|
9921
9920
|
case 0:
|
|
@@ -9951,7 +9950,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9951
9950
|
});
|
|
9952
9951
|
return [3 /*break*/, 4];
|
|
9953
9952
|
case 3:
|
|
9954
|
-
|
|
9953
|
+
err_30 = _a.sent();
|
|
9955
9954
|
if (generation !== groupPagingGenRef.current)
|
|
9956
9955
|
return [2 /*return*/];
|
|
9957
9956
|
handleSetGroupPageState(groupKey, { loadingMore: false });
|
|
@@ -10031,9 +10030,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10031
10030
|
selectedIds.length > 0 &&
|
|
10032
10031
|
canBatchUpdate &&
|
|
10033
10032
|
!((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10034
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10035
|
-
handleBatchDraftData();
|
|
10036
|
-
} }),
|
|
10037
10033
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10038
10034
|
handleCloneSelectedData();
|
|
10039
10035
|
} }))),
|
|
@@ -10133,12 +10129,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10133
10129
|
: 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 &&
|
|
10134
10130
|
!((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideTableExtraMultipleAction)
|
|
10135
10131
|
? [
|
|
10136
|
-
{
|
|
10137
|
-
id: "draft",
|
|
10138
|
-
btnText: "Change to Draft",
|
|
10139
|
-
onClick: function () { return handleBatchDraftData(); },
|
|
10140
|
-
hide: selectedIds.length === 0,
|
|
10141
|
-
},
|
|
10142
10132
|
{
|
|
10143
10133
|
id: "clone",
|
|
10144
10134
|
btnText: "Clone Items",
|
|
@@ -10280,9 +10270,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10280
10270
|
selectedIds.length > 0 &&
|
|
10281
10271
|
canBatchUpdate &&
|
|
10282
10272
|
!((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10283
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10284
|
-
handleBatchDraftData();
|
|
10285
|
-
} }),
|
|
10286
10273
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10287
10274
|
handleCloneSelectedData();
|
|
10288
10275
|
} }))),
|
|
@@ -10661,9 +10648,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10661
10648
|
if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareNewDTW) {
|
|
10662
10649
|
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" },
|
|
10663
10650
|
selectedIds.length > 0 && canBatchUpdate && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10664
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10665
|
-
handleBatchDraftData();
|
|
10666
|
-
} }),
|
|
10667
10651
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10668
10652
|
handleCloneSelectedData();
|
|
10669
10653
|
} }))),
|
|
@@ -10688,9 +10672,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10688
10672
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10689
10673
|
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" },
|
|
10690
10674
|
selectedIds.length > 0 && canBatchUpdate && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10691
|
-
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
10692
|
-
handleBatchDraftData();
|
|
10693
|
-
} }),
|
|
10694
10675
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10695
10676
|
handleCloneSelectedData();
|
|
10696
10677
|
} }))),
|
|
@@ -11851,14 +11832,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11851
11832
|
};
|
|
11852
11833
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11853
11834
|
renderNotification("root"),
|
|
11854
|
-
((
|
|
11835
|
+
((_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 () {
|
|
11855
11836
|
var _a, _b;
|
|
11856
11837
|
if (loading)
|
|
11857
11838
|
return;
|
|
11858
11839
|
handlePopUpModal(false);
|
|
11859
11840
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11860
11841
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11861
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11842
|
+
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 () {
|
|
11862
11843
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11863
11844
|
if (dataId) {
|
|
11864
11845
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11874,19 +11855,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11874
11855
|
}, onClose: function () {
|
|
11875
11856
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11876
11857
|
} }),
|
|
11877
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11858
|
+
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 () {
|
|
11878
11859
|
setReferenceDeleteTableData({});
|
|
11879
11860
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11880
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11861
|
+
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 () {
|
|
11881
11862
|
setDeletePasscodeInput("");
|
|
11882
11863
|
setDeleteModal(!deleteModal);
|
|
11883
11864
|
setDeleteFeedId("");
|
|
11884
11865
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11885
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11866
|
+
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 () {
|
|
11886
11867
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11887
11868
|
setBatchUpdateModal(false);
|
|
11888
11869
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11889
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11870
|
+
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 () {
|
|
11890
11871
|
var _a, _b;
|
|
11891
11872
|
if (props.space)
|
|
11892
11873
|
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 }));
|
|
@@ -11901,13 +11882,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11901
11882
|
(0, react_dom_1.createPortal)(
|
|
11902
11883
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11903
11884
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11904
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11885
|
+
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,
|
|
11905
11886
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11906
11887
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11907
11888
|
// toolbar's collection-wide button clears it when it opens.
|
|
11908
11889
|
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"
|
|
11909
11890
|
? props.title
|
|
11910
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11891
|
+
: "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),
|
|
11911
11892
|
renderScrollSentinel()));
|
|
11912
11893
|
});
|
|
11913
11894
|
//# sourceMappingURL=index.js.map
|