blixify-ui-web 1.2.185 → 1.2.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +224 -200
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +3 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +2 -0
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js +9 -3
- package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +34 -2
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +158 -7
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +4 -26
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -215,10 +215,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
215
215
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
216
216
|
// most in effect dependency arrays — following props.type there would leave
|
|
217
217
|
// the list never refetching while the panel is open, which fails silently.
|
|
218
|
-
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;
|
|
218
|
+
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;
|
|
219
219
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
220
220
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
221
|
-
var
|
|
221
|
+
var _103 = (0, react_1.useState)(false), drawerPageView = _103[0], setDrawerPageView = _103[1];
|
|
222
222
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
223
223
|
// live props. Without this, navigating back to the list would re-render the
|
|
224
224
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -310,18 +310,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
310
310
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
-
var
|
|
313
|
+
var _104 = intialiseDefaultFilterValues(), initialFilterSearch = _104.initialFilterSearch, initialFilterSearchParams = _104.initialFilterSearchParams, initialFilterSelection = _104.initialFilterSelection, initialFilterReference = _104.initialFilterReference, initialFilterReferenceDate = _104.initialFilterReferenceDate;
|
|
314
314
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
315
|
-
var
|
|
315
|
+
var _105 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
316
316
|
mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
|
|
317
317
|
collectionId: props.collectionId,
|
|
318
318
|
persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
|
|
319
319
|
type: resolvedType,
|
|
320
|
-
}), rawPersistedState =
|
|
320
|
+
}), rawPersistedState = _105.persistedState, isPersistEnabled = _105.isEnabled, handleSaveView = _105.handleSaveView, handleRegisterViewSnapshot = _105.handleRegisterViewSnapshot;
|
|
321
321
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
322
|
-
var persistedState = (0, react_1.useMemo)(function () {
|
|
323
|
-
|
|
324
|
-
|
|
322
|
+
var persistedState = (0, react_1.useMemo)(function () {
|
|
323
|
+
var _a, _b, _c;
|
|
324
|
+
return (0, viewStatePersistence_1.handlePruneStaleColumns)(rawPersistedState, props.model, (0, flexFilter_1.handleBuildFlexFilterStructure)((_a = props.model) !== null && _a !== void 0 ? _a : [], {
|
|
325
|
+
references: (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareFlexFilterReferences,
|
|
326
|
+
listObjects: (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareFlexFilterListObjects,
|
|
327
|
+
}));
|
|
328
|
+
}, [
|
|
329
|
+
rawPersistedState,
|
|
330
|
+
props.model,
|
|
331
|
+
(_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilterReferences,
|
|
332
|
+
(_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterListObjects,
|
|
333
|
+
]);
|
|
334
|
+
var _106 = (0, react_1.useState)(false), loading = _106[0], setLoading = _106[1];
|
|
335
|
+
var _107 = (0, react_1.useState)(), notification = _107[0], setNotification = _107[1];
|
|
325
336
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
326
337
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
327
338
|
(0, react_1.useEffect)(function () {
|
|
@@ -331,62 +342,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
331
342
|
return function () { return clearTimeout(timer); };
|
|
332
343
|
}, [notification]);
|
|
333
344
|
//INFO : Used by List
|
|
334
|
-
var
|
|
335
|
-
var
|
|
336
|
-
var
|
|
337
|
-
var
|
|
338
|
-
var
|
|
339
|
-
var
|
|
340
|
-
var
|
|
345
|
+
var _108 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _f !== void 0 ? _f : initialFilterSearch), filterSearch = _108[0], setFilterSearch = _108[1];
|
|
346
|
+
var _109 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearchParams), filterSearchParams = _109[0], setFilterSearchParams = _109[1];
|
|
347
|
+
var _110 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _h !== void 0 ? _h : initialFilterSelection), filterSelection = _110[0], setFilterSelection = _110[1];
|
|
348
|
+
var _111 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _j !== void 0 ? _j : initialFilterReference), filterReference = _111[0], setFilterReference = _111[1];
|
|
349
|
+
var _112 = (0, react_1.useState)({}), filterReferenceSearch = _112[0], setFilterReferenceSearch = _112[1];
|
|
350
|
+
var _113 = (0, react_1.useState)({}), filterReferenceList = _113[0], setFilterReferenceList = _113[1];
|
|
351
|
+
var _114 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
341
352
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
342
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
343
|
-
var
|
|
344
|
-
var
|
|
345
|
-
var
|
|
346
|
-
var
|
|
347
|
-
var
|
|
353
|
+
: initialFilterReferenceDate), filterReferenceDate = _114[0], setFilterReferenceDate = _114[1];
|
|
354
|
+
var _115 = (0, react_1.useState)(true), tableLoading = _115[0], setTableLoading = _115[1];
|
|
355
|
+
var _116 = (0, react_1.useState)(""), cursor = _116[0], setCursor = _116[1];
|
|
356
|
+
var _117 = (0, react_1.useState)(""), lastCursor = _117[0], setLastCursor = _117[1];
|
|
357
|
+
var _118 = (0, react_1.useState)([]), tableData = _118[0], setTableData = _118[1];
|
|
358
|
+
var _119 = (0, react_1.useState)([]), spaceTableData = _119[0], setSpaceTableData = _119[1];
|
|
348
359
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
349
360
|
// the state it closed over can predate an earlier save on the same row
|
|
350
361
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
351
362
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
352
363
|
tableDataRef.current = tableData;
|
|
353
364
|
spaceTableDataRef.current = spaceTableData;
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var
|
|
357
|
-
var
|
|
358
|
-
var
|
|
359
|
-
var
|
|
360
|
-
var
|
|
365
|
+
var _120 = (0, react_1.useState)(0), size = _120[0], setSize = _120[1];
|
|
366
|
+
var _121 = (0, react_1.useState)((_m = (_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _k !== void 0 ? _k : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.pageIndex) !== null && _m !== void 0 ? _m : 0), pageIndex = _121[0], setPageIndex = _121[1];
|
|
367
|
+
var _122 = (0, react_1.useState)([]), selectedIds = _122[0], setSelectedIds = _122[1];
|
|
368
|
+
var _123 = (0, react_1.useState)(false), selectAll = _123[0], setSelectAll = _123[1];
|
|
369
|
+
var _124 = (0, react_1.useState)(""), deletePasscode = _124[0], setDeletePasscode = _124[1];
|
|
370
|
+
var _125 = (0, react_1.useState)(""), deletePasscodeInput = _125[0], setDeletePasscodeInput = _125[1];
|
|
371
|
+
var _126 = (0, react_1.useState)(""), deleteFeedId = _126[0], setDeleteFeedId = _126[1];
|
|
361
372
|
//INFO : Used by List Organise
|
|
362
373
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
363
374
|
// persistViewState is enabled and a persisted sort exists
|
|
364
|
-
var
|
|
365
|
-
var
|
|
366
|
-
var
|
|
367
|
-
var
|
|
375
|
+
var _127 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _o !== void 0 ? _o : undefined), persistedSort = _127[0], setPersistedSort = _127[1];
|
|
376
|
+
var _128 = (0, react_1.useState)(false), filterDraft = _128[0], setFilterDraft = _128[1];
|
|
377
|
+
var _129 = (0, react_1.useState)(false), addTabModal = _129[0], setAddTabModal = _129[1];
|
|
378
|
+
var _130 = (0, react_1.useState)(-1), editTabIndex = _130[0], setEditTabIndex = _130[1];
|
|
368
379
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
369
380
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
370
|
-
var
|
|
381
|
+
var _131 = (0, react_1.useState)(function () {
|
|
371
382
|
var _a, _b;
|
|
372
383
|
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);
|
|
373
|
-
}), selectedTab =
|
|
374
|
-
var
|
|
384
|
+
}), selectedTab = _131[0], setSelectedTab = _131[1];
|
|
385
|
+
var _132 = (0, react_1.useState)("dayGridMonth"), calendarView = _132[0], setCalendarView = _132[1];
|
|
375
386
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
376
387
|
// (calendarView above drives the matching range query)
|
|
377
|
-
var
|
|
378
|
-
var
|
|
388
|
+
var _133 = (0, react_1.useState)("month"), newCalendarViewMode = _133[0], setNewCalendarViewMode = _133[1];
|
|
389
|
+
var _134 = (0, react_1.useState)(new Date()), calendarTabMonth = _134[0], setCalendarTabMonth = _134[1];
|
|
379
390
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
380
391
|
// whenever its settings change, and that must not undo the user's switch
|
|
381
392
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var
|
|
393
|
+
var _135 = (0, react_1.useState)(true), kanbanDroppable = _135[0], setKanbanDroppable = _135[1];
|
|
394
|
+
var _136 = (0, react_1.useState)([]), kanbanOptions = _136[0], setKanbanOptions = _136[1];
|
|
395
|
+
var _137 = (0, react_1.useState)(false), batchUpdateModal = _137[0], setBatchUpdateModal = _137[1];
|
|
396
|
+
var _138 = (0, react_1.useState)({
|
|
386
397
|
columnId: "",
|
|
387
398
|
columnData: {},
|
|
388
|
-
}), batchUpdateData =
|
|
389
|
-
var
|
|
399
|
+
}), batchUpdateData = _138[0], setBatchUpdateData = _138[1];
|
|
400
|
+
var _139 = (0, react_1.useState)(function () {
|
|
390
401
|
var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
|
|
391
402
|
if (!persistedState)
|
|
392
403
|
return baseModel;
|
|
@@ -412,8 +423,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
412
423
|
});
|
|
413
424
|
}
|
|
414
425
|
return model;
|
|
415
|
-
}), structure =
|
|
416
|
-
var
|
|
426
|
+
}), structure = _139[0], setStructure = _139[1];
|
|
427
|
+
var _140 = (0, react_1.useState)(((_p = props === null || props === void 0 ? void 0 : props.organise) === null || _p === void 0 ? void 0 : _p.additionalQuery) || []), additionalQuery = _140[0], setAdditionalQuery = _140[1];
|
|
417
428
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
418
429
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
419
430
|
var defaultFlexFilterRow = [
|
|
@@ -424,9 +435,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
424
435
|
value: undefined,
|
|
425
436
|
},
|
|
426
437
|
];
|
|
427
|
-
var
|
|
438
|
+
var _141 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
428
439
|
? persistedState.flexFilters
|
|
429
|
-
: defaultFlexFilterRow), flexFilters =
|
|
440
|
+
: defaultFlexFilterRow), flexFilters = _141[0], setFlexFilters = _141[1];
|
|
430
441
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
431
442
|
// clear methods so chained calls in one tick aren't stale.
|
|
432
443
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -439,76 +450,76 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
439
450
|
}, [flexFilters]);
|
|
440
451
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
441
452
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
442
|
-
var
|
|
453
|
+
var _142 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
443
454
|
? persistedState.flexFilters
|
|
444
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
455
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _142[0], setFlexFiltersDebounced = _142[1];
|
|
445
456
|
// INFO: the filter rows of the export being set up — started from the
|
|
446
457
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
447
|
-
var
|
|
448
|
-
var
|
|
449
|
-
var
|
|
450
|
-
var
|
|
451
|
-
var
|
|
458
|
+
var _143 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _143[0], setExportFlexFilters = _143[1];
|
|
459
|
+
var _144 = (0, react_1.useState)({}), flexFilterReferenceOptions = _144[0], setFlexFilterReferenceOptions = _144[1];
|
|
460
|
+
var _145 = (0, react_1.useState)({}), flexFilterReferenceSearch = _145[0], setFlexFilterReferenceSearch = _145[1];
|
|
461
|
+
var _146 = (0, react_1.useState)(false), flexFilterModalOpen = _146[0], setFlexFilterModalOpen = _146[1];
|
|
462
|
+
var _147 = (0, react_1.useState)(false), viewSettingsModalOpen = _147[0], setViewSettingsModalOpen = _147[1];
|
|
452
463
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
453
464
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
454
465
|
// structure to props.model whenever props change, which would wipe the
|
|
455
466
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
456
467
|
// structure — writing user hides there would blur the two concepts.
|
|
457
|
-
var
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
var
|
|
468
|
+
var _148 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _q !== void 0 ? _q : []), userHiddenColumnIds = _148[0], setUserHiddenColumnIds = _148[1];
|
|
469
|
+
var _149 = (0, react_1.useState)(""), columnSearch = _149[0], setColumnSearch = _149[1];
|
|
470
|
+
var _150 = (0, react_1.useState)([]), savedViews = _150[0], setSavedViews = _150[1];
|
|
471
|
+
var _151 = (0, react_1.useState)(null), activeSavedViewId = _151[0], setActiveSavedViewId = _151[1];
|
|
461
472
|
// INFO: null while the name box is closed
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var
|
|
473
|
+
var _152 = (0, react_1.useState)(null), savedViewName = _152[0], setSavedViewName = _152[1];
|
|
474
|
+
var _153 = (0, react_1.useState)(null), deletingSavedViewId = _153[0], setDeletingSavedViewId = _153[1];
|
|
475
|
+
var _154 = (0, react_1.useState)(null), draggingColumnId = _154[0], setDraggingColumnId = _154[1];
|
|
465
476
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
466
477
|
//INFO : Used by Auth
|
|
467
|
-
var
|
|
478
|
+
var _155 = (0, react_1.useState)({
|
|
468
479
|
email: "",
|
|
469
480
|
google: "",
|
|
470
481
|
phone: "",
|
|
471
482
|
disabled: false,
|
|
472
483
|
create: false,
|
|
473
|
-
}), authMethods =
|
|
474
|
-
var
|
|
484
|
+
}), authMethods = _155[0], setAuthMethods = _155[1];
|
|
485
|
+
var _156 = (0, react_1.useState)(""), selectedAuthMethod = _156[0], setSelectedAuthMethod = _156[1];
|
|
475
486
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
476
487
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
477
|
-
var
|
|
488
|
+
var _157 = (0, react_1.useState)(false), authLoading = _157[0], setAuthLoading = _157[1];
|
|
478
489
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
479
490
|
// the state has rendered, and the state disables the confirm button
|
|
480
491
|
var deletingRef = (0, react_1.useRef)(false);
|
|
481
|
-
var
|
|
492
|
+
var _158 = (0, react_1.useState)(false), deleting = _158[0], setDeleting = _158[1];
|
|
482
493
|
// INFO: Used by Activity Log
|
|
483
|
-
var
|
|
484
|
-
var
|
|
494
|
+
var _159 = (0, react_1.useState)(false), activityModal = _159[0], setActivityModal = _159[1];
|
|
495
|
+
var _160 = (0, react_1.useState)(""), activityId = _160[0], setActivityId = _160[1];
|
|
485
496
|
//INFO : Used by Export
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
var
|
|
489
|
-
var
|
|
490
|
-
var
|
|
491
|
-
var
|
|
492
|
-
var
|
|
493
|
-
var
|
|
494
|
-
var
|
|
495
|
-
var
|
|
496
|
-
var
|
|
497
|
-
var
|
|
498
|
-
var
|
|
499
|
-
var
|
|
500
|
-
var
|
|
497
|
+
var _161 = (0, react_1.useState)(null), csvFile = _161[0], setCSVFile = _161[1];
|
|
498
|
+
var _162 = (0, react_1.useState)([]), csvFileData = _162[0], setCSVFileData = _162[1];
|
|
499
|
+
var _163 = (0, react_1.useState)(0), stepCSVIndex = _163[0], setStepCSVIndex = _163[1];
|
|
500
|
+
var _164 = (0, react_1.useState)({}), listCSVMapAttribute = _164[0], setListCSVMapAttribute = _164[1];
|
|
501
|
+
var _165 = (0, react_1.useState)({}), listCSVObjAttribute = _165[0], setListCSVObjAttribute = _165[1];
|
|
502
|
+
var _166 = (0, react_1.useState)([]), csvAPIAttribute = _166[0], setCSVAPIAttribute = _166[1];
|
|
503
|
+
var _167 = (0, react_1.useState)(((_r = props.devSettings.currentUser) === null || _r === void 0 ? void 0 : _r.userEmail) || ""), exportCSVEmail = _167[0], setExportCSVEmail = _167[1];
|
|
504
|
+
var _168 = (0, react_1.useState)(((_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.defaultExportPDFName) || ""), exportPDFTitle = _168[0], setExportPDFTitle = _168[1];
|
|
505
|
+
var _169 = (0, react_1.useState)(false), exportPDFLoading = _169[0], setExportPDFLoading = _169[1];
|
|
506
|
+
var _170 = (0, react_1.useState)(false), exportReadPDFLoading = _170[0], setExportReadPDFLoading = _170[1];
|
|
507
|
+
var _171 = (0, react_1.useState)((_w = (_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.exportSettings) === null || _v === void 0 ? void 0 : _v.sumColumnId) !== null && _w !== void 0 ? _w : []), exportSumAttributeIds = _171[0], setExportSumAttributeIds = _171[1];
|
|
508
|
+
var _172 = (0, react_1.useState)((_z = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.exportSettings) === null || _y === void 0 ? void 0 : _y.hideSubItems) !== null && _z !== void 0 ? _z : false), hideSubItems = _172[0], setHideSubItems = _172[1];
|
|
509
|
+
var _173 = (0, react_1.useState)([]), importTableData = _173[0], setImportTableData = _173[1];
|
|
510
|
+
var _174 = (0, react_1.useState)([]), queryList = _174[0], setQueryList = _174[1];
|
|
511
|
+
var _175 = (0, react_1.useState)(undefined), allQueryList = _175[0], setAllQueryList = _175[1];
|
|
501
512
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
502
513
|
// ungrouped, so it opens ungrouped
|
|
503
|
-
var
|
|
514
|
+
var _176 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
504
515
|
? persistedState.groupBy || undefined
|
|
505
|
-
: (
|
|
516
|
+
: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.groupBy), groupId = _176[0], setGroupId = _176[1];
|
|
506
517
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
507
518
|
// handleBuildNewTableGroups() produces (a list option or "Unknown/No Value").
|
|
508
519
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
509
520
|
// next page as the user scrolls inside that band, independent of every other
|
|
510
521
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
511
|
-
var
|
|
522
|
+
var _177 = (0, react_1.useState)({}), groupPageState = _177[0], setGroupPageState = _177[1];
|
|
512
523
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
513
524
|
// in one tick do not re-fetch an already in-flight page.
|
|
514
525
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -517,59 +528,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
517
528
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
518
529
|
// arrival instead of appending rows that belong to the old list
|
|
519
530
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
520
|
-
var
|
|
521
|
-
var
|
|
531
|
+
var _178 = (0, react_1.useState)(""), readTabSection = _178[0], setReadTabSection = _178[1];
|
|
532
|
+
var _179 = (0, react_1.useState)(false), readFloatingNav = _179[0], setReadFloatingNav = _179[1];
|
|
522
533
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
523
534
|
//INFO : Used by Read
|
|
524
535
|
//INFO : Used by Update
|
|
525
|
-
var
|
|
526
|
-
var
|
|
527
|
-
var
|
|
528
|
-
var
|
|
529
|
-
var
|
|
530
|
-
var
|
|
531
|
-
var
|
|
536
|
+
var _180 = (0, react_1.useState)(false), modalVisible = _180[0], setModalVisible = _180[1];
|
|
537
|
+
var _181 = (0, react_1.useState)(false), deleteModal = _181[0], setDeleteModal = _181[1];
|
|
538
|
+
var _182 = (0, react_1.useState)(false), excelModal = _182[0], setExcelModal = _182[1];
|
|
539
|
+
var _183 = (0, react_1.useState)(false), exportExcel = _183[0], setExportExcel = _183[1];
|
|
540
|
+
var _184 = (0, react_1.useState)(""), exportType = _184[0], setExportType = _184[1];
|
|
541
|
+
var _185 = (0, react_1.useState)(false), exportQR = _185[0], setExportQR = _185[1];
|
|
542
|
+
var _186 = (0, react_1.useState)(function () {
|
|
532
543
|
var _a, _b;
|
|
533
544
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
534
545
|
return firstTabId;
|
|
535
|
-
}), activeTab =
|
|
536
|
-
var
|
|
537
|
-
var
|
|
538
|
-
var
|
|
539
|
-
var
|
|
540
|
-
var
|
|
541
|
-
var
|
|
542
|
-
var
|
|
546
|
+
}), activeTab = _186[0], setActiveTab = _186[1];
|
|
547
|
+
var _187 = (0, react_1.useState)(false), signatureSigning = _187[0], setSignatureSigning = _187[1];
|
|
548
|
+
var _188 = (0, react_1.useState)({}), selectedData = _188[0], setSelectedData = _188[1];
|
|
549
|
+
var _189 = (0, react_1.useState)(""), selectedObjectStructureId = _189[0], setSelectedObjectStructureId = _189[1];
|
|
550
|
+
var _190 = (0, react_1.useState)(""), selectedObjectId = _190[0], setSelectedObjectId = _190[1];
|
|
551
|
+
var _191 = (0, react_1.useState)(""), selectedListAddressId = _191[0], setSelectedListAddressId = _191[1];
|
|
552
|
+
var _192 = (0, react_1.useState)(-1), selectedListAddressIndex = _192[0], setSelectedListAddressIndex = _192[1];
|
|
553
|
+
var _193 = (0, react_1.useState)({
|
|
543
554
|
lat: 0,
|
|
544
555
|
lng: 0,
|
|
545
556
|
name: "",
|
|
546
|
-
}), selectedListAddress =
|
|
547
|
-
var
|
|
548
|
-
var
|
|
549
|
-
var
|
|
550
|
-
var
|
|
551
|
-
var
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
557
|
+
}), selectedListAddress = _193[0], setSelectedListAddress = _193[1];
|
|
558
|
+
var _194 = (0, react_1.useState)({}), selectedObjectData = _194[0], setSelectedObjectData = _194[1];
|
|
559
|
+
var _195 = (0, react_1.useState)(null), objectCellEdit = _195[0], setObjectCellEdit = _195[1];
|
|
560
|
+
var _196 = (0, react_1.useState)(false), referenceLoading = _196[0], setReferenceLoading = _196[1];
|
|
561
|
+
var _197 = (0, react_1.useState)({}), referencesOptions = _197[0], setReferencesOptions = _197[1];
|
|
562
|
+
var _198 = (0, react_1.useState)({}), referencesDetails = _198[0], setReferencesDetails = _198[1];
|
|
563
|
+
var _199 = (0, react_1.useState)({}), listReferencesOptions = _199[0], setListReferencesOptions = _199[1];
|
|
564
|
+
var _200 = (0, react_1.useState)({}), referenceDeleteTableData = _200[0], setReferenceDeleteTableData = _200[1];
|
|
565
|
+
var _201 = (0, react_1.useState)([]), relatedSections = _201[0], setRelatedSections = _201[1];
|
|
566
|
+
var _202 = (0, react_1.useState)(0), referenceDeleteIndex = _202[0], setReferenceDeleteIndex = _202[1];
|
|
567
|
+
var _203 = (0, react_1.useState)({
|
|
557
568
|
id: "",
|
|
558
569
|
name: "",
|
|
559
570
|
type: "string",
|
|
560
|
-
}), referenceCreationModal =
|
|
561
|
-
var
|
|
562
|
-
var
|
|
571
|
+
}), referenceCreationModal = _203[0], setReferenceCreationModal = _203[1];
|
|
572
|
+
var _204 = (0, react_1.useState)({}), referenceModelSchema = _204[0], setReferenceSchema = _204[1];
|
|
573
|
+
var _205 = (0, react_1.useState)([]), kanbanChecked = _205[0], setKanbanChecked = _205[1];
|
|
563
574
|
//INFO : Offline
|
|
564
|
-
var
|
|
565
|
-
var
|
|
575
|
+
var _206 = (0, react_1.useState)(0), offlineDataLength = _206[0], setOfflineDataLength = _206[1];
|
|
576
|
+
var _207 = (0, react_1.useState)(false), offlineModal = _207[0], setOfflineModal = _207[1];
|
|
566
577
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
567
|
-
var
|
|
568
|
-
var
|
|
578
|
+
var _208 = (0, react_1.useState)(false), isLive = _208[0], setIsLive = _208[1];
|
|
579
|
+
var _209 = (0, react_1.useState)(false), isLiveOffline = _209[0], setIsLiveOffline = _209[1];
|
|
569
580
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
570
581
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
571
582
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
572
|
-
var
|
|
583
|
+
var _210 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _210[0], setIsNetworkOffline = _210[1];
|
|
573
584
|
var previousType = (0, react_1.useRef)(null);
|
|
574
585
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
575
586
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -686,16 +697,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
686
697
|
* viewId still wins when present: it is a deliberate destination, from a
|
|
687
698
|
* shared link or a back button.
|
|
688
699
|
*/
|
|
689
|
-
var defaultTabName = (
|
|
700
|
+
var defaultTabName = (_3 = (_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.extendedTabs) === null || _2 === void 0 ? void 0 : _2.find(function (eachTab) { return eachTab.defaultTab; })) === null || _3 === void 0 ? void 0 : _3.name;
|
|
690
701
|
// INFO: the pinned tab is a LIST destination. Falling back to it while a
|
|
691
702
|
// record is open resolved the read view to a list tab, which renderTabContent
|
|
692
703
|
// refuses — so General Details rendered nothing. Only a list falls back.
|
|
693
|
-
var viewType = (
|
|
704
|
+
var viewType = (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.viewId) !== null && _5 !== void 0 ? _5 : (resolvedType === "list" && defaultTabName
|
|
694
705
|
? (0, utils_1.lowercaseTextToId)(defaultTabName)
|
|
695
706
|
: "general");
|
|
696
707
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
697
708
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
698
|
-
var dbModule = isFirebaseClient ? (
|
|
709
|
+
var dbModule = isFirebaseClient ? (_6 = props.lib) === null || _6 === void 0 ? void 0 : _6.firebase : (_7 = props.lib) === null || _7 === void 0 ? void 0 : _7.axios;
|
|
699
710
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
700
711
|
var selectedRelated = resolvedType === "read"
|
|
701
712
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -773,32 +784,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
773
784
|
}, [
|
|
774
785
|
resolvedType,
|
|
775
786
|
props.id,
|
|
776
|
-
(
|
|
787
|
+
(_8 = props.space) === null || _8 === void 0 ? void 0 : _8._id,
|
|
777
788
|
props.devSettings.schemaEndpoint,
|
|
778
|
-
(
|
|
789
|
+
(_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.showRelatedTab,
|
|
779
790
|
]);
|
|
780
791
|
/* eslint-enable */
|
|
781
792
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
782
793
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
783
|
-
var isViewSettingsEnabled = ((
|
|
794
|
+
var isViewSettingsEnabled = ((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareViewSettings) || ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareNewDTW)
|
|
784
795
|
? true
|
|
785
796
|
: false;
|
|
786
797
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
787
798
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
788
799
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
789
|
-
var isSchemaHideMode = ((
|
|
800
|
+
var isSchemaHideMode = ((_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.onChangeHide) ? true : false;
|
|
790
801
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
791
802
|
// the persisted value and falls back to the consumer's limit
|
|
792
|
-
var
|
|
803
|
+
var _211 = (0, react_1.useState)((_14 = (_13 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _13 !== void 0 ? _13 : props.limit) !== null && _14 !== void 0 ? _14 : 10), pageLimit = _211[0], setPageLimit = _211[1];
|
|
793
804
|
var limit = pageLimit;
|
|
794
|
-
var isSavedViewsEnabled = !!((
|
|
805
|
+
var isSavedViewsEnabled = !!((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.savedViews) && resolvedType === "list";
|
|
795
806
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
796
807
|
// every view is the team's and nothing is kept locally
|
|
797
|
-
var isAppViews = ((
|
|
798
|
-
!!((
|
|
808
|
+
var isAppViews = ((_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.sharedViews) !== undefined ||
|
|
809
|
+
!!((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.onChangeSharedViews);
|
|
799
810
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
800
811
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
801
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
812
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.sort);
|
|
802
813
|
var handleSortColumn = function (value) {
|
|
803
814
|
var _a, _b, _c, _d;
|
|
804
815
|
if (isInternalSort)
|
|
@@ -828,25 +839,34 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
828
839
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
829
840
|
// can hand over the whole set — there formula columns are not offered for
|
|
830
841
|
// sorting or filtering, rather than ordering one page
|
|
831
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
842
|
+
var isFormulaViewSupported = !isFirebase && !((_20 = (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.unionCollections) === null || _20 === void 0 ? void 0 : _20.length);
|
|
832
843
|
var formulaSort = isFormulaViewSupported &&
|
|
833
844
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
834
845
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
835
846
|
? activeSortId
|
|
836
847
|
: undefined;
|
|
848
|
+
// INFO: a referenced record is joined by MongoWrapper's lookup and a list
|
|
849
|
+
// row is matched by its Mongo path — neither Firebase nor a union read runs
|
|
850
|
+
// them
|
|
851
|
+
var flexFilterExtras = !isFirebase && !((_22 = (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.unionCollections) === null || _22 === void 0 ? void 0 : _22.length)
|
|
852
|
+
? {
|
|
853
|
+
references: (_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareFlexFilterReferences,
|
|
854
|
+
listObjects: (_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareFlexFilterListObjects,
|
|
855
|
+
}
|
|
856
|
+
: undefined;
|
|
837
857
|
var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
|
|
838
858
|
? (0, listModule_1.renderFlexFilterConditions)(flexFiltersDebounced, structure).filter(function (eachQuery) { var _a; return formulaColumnIds.includes((_a = eachQuery.queryId) !== null && _a !== void 0 ? _a : ""); })
|
|
839
859
|
: [];
|
|
840
860
|
var isFormulaView = !!formulaSort || formulaFlexQueries.length > 0;
|
|
841
861
|
// INFO: the columns the flex filters offer — formulas only where they can
|
|
842
862
|
// be filtered on
|
|
843
|
-
var flexFilterStructure = isFormulaViewSupported
|
|
863
|
+
var flexFilterStructure = (0, flexFilter_1.handleBuildFlexFilterStructure)(isFormulaViewSupported
|
|
844
864
|
? structure
|
|
845
|
-
: structure.filter(function (eachModel) { return eachModel.type !== "formula"; });
|
|
865
|
+
: structure.filter(function (eachModel) { return eachModel.type !== "formula"; }), flexFilterExtras);
|
|
846
866
|
// INFO: an export's filters run on the export server, which cannot work out
|
|
847
867
|
// a formula, so its rows leave formula columns out — a formula filter on
|
|
848
868
|
// the list still narrows the export, by the ids of the rows it kept
|
|
849
|
-
var exportFilterStructure = structure.filter(function (eachModel) { return eachModel.type !== "formula"; });
|
|
869
|
+
var exportFilterStructure = (0, flexFilter_1.handleBuildFlexFilterStructure)(structure.filter(function (eachModel) { return eachModel.type !== "formula"; }), flexFilterExtras);
|
|
850
870
|
// INFO: every matching row of a formula view, unsorted — pages are cut
|
|
851
871
|
// from it locally, so paging does not read the collection again
|
|
852
872
|
// INFO: the formula sort and filter the row cap was last announced for
|
|
@@ -884,18 +904,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
884
904
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
885
905
|
};
|
|
886
906
|
};
|
|
887
|
-
var
|
|
888
|
-
var isEditor = ((
|
|
889
|
-
var isOffline = (
|
|
907
|
+
var _212 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _212.canUpdateRecord, canInlineUpdate = _212.canInlineUpdate, canBatchUpdate = _212.canBatchUpdate, canDeleteRecord = _212.canDeleteRecord;
|
|
908
|
+
var isEditor = ((_25 = props.edit) === null || _25 === void 0 ? void 0 : _25.allEditable) ? true : false;
|
|
909
|
+
var isOffline = (_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareOffline;
|
|
890
910
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
891
911
|
// the live network state — online saves go to the server even if bareOffline
|
|
892
912
|
// is true, offline saves go to IDB as normal.
|
|
893
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
894
|
-
var showId = (
|
|
913
|
+
var isOfflineNetworkListener = isOffline && ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareOfflineNetworkListener);
|
|
914
|
+
var showId = (_28 = props.space) === null || _28 === void 0 ? void 0 : _28.showId;
|
|
895
915
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
896
|
-
var idField = ((
|
|
897
|
-
var pipeline = (
|
|
898
|
-
if ((
|
|
916
|
+
var idField = ((_29 = props.space) === null || _29 === void 0 ? void 0 : _29.idField) || ((_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.idField);
|
|
917
|
+
var pipeline = (_31 = props === null || props === void 0 ? void 0 : props.space) === null || _31 === void 0 ? void 0 : _31.pipeline;
|
|
918
|
+
if ((_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareListPipeline) {
|
|
899
919
|
pipeline = pipeline
|
|
900
920
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
901
921
|
}
|
|
@@ -908,24 +928,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
908
928
|
* three records came back instead of five files, and each tile received the
|
|
909
929
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
910
930
|
*/
|
|
911
|
-
var fileViewColumnId = (
|
|
931
|
+
var fileViewColumnId = (_36 = (_35 = ((_34 = (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.extendedTabs) !== null && _34 !== void 0 ? _34 : []).find(function (eachTab) {
|
|
912
932
|
return eachTab.viewType === "file" &&
|
|
913
933
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
914
|
-
})) === null ||
|
|
915
|
-
var hasNavigation = ((
|
|
934
|
+
})) === null || _35 === void 0 ? void 0 : _35.fileSettings) === null || _36 === void 0 ? void 0 : _36.columnId;
|
|
935
|
+
var hasNavigation = ((_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.handleNavigate) ? true : false;
|
|
916
936
|
var formColumn = "grid-cols-12";
|
|
917
|
-
var useMobileView = (
|
|
937
|
+
var useMobileView = (_39 = (_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareUpdateMobileView) !== null && _39 !== void 0 ? _39 : false;
|
|
918
938
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
919
|
-
var isActivityLog = (((
|
|
920
|
-
((
|
|
921
|
-
(((
|
|
922
|
-
((
|
|
923
|
-
var customPaginationSize = ((
|
|
939
|
+
var isActivityLog = (((_41 = (_40 = props.edit) === null || _40 === void 0 ? void 0 : _40.activityLog) === null || _41 === void 0 ? void 0 : _41.enableComments) &&
|
|
940
|
+
((_42 = props.edit) === null || _42 === void 0 ? void 0 : _42.activityLog.commentCollectionId)) ||
|
|
941
|
+
(((_44 = (_43 = props.edit) === null || _43 === void 0 ? void 0 : _43.activityLog) === null || _44 === void 0 ? void 0 : _44.enableLogs) &&
|
|
942
|
+
((_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.activityLog.logsCollectionId));
|
|
943
|
+
var customPaginationSize = ((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.customPaginationCount)
|
|
924
944
|
? props.organise.customPaginationCount(size)
|
|
925
945
|
: undefined;
|
|
926
946
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
927
947
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
928
|
-
dbModule: (
|
|
948
|
+
dbModule: (_47 = props.lib) === null || _47 === void 0 ? void 0 : _47.axios,
|
|
929
949
|
dbType: devSettings.server,
|
|
930
950
|
dbCollection: props.collectionId,
|
|
931
951
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -933,7 +953,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
933
953
|
dbUserToken: devSettings.dbUserToken,
|
|
934
954
|
});
|
|
935
955
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
936
|
-
dbModule: (
|
|
956
|
+
dbModule: (_48 = props.lib) === null || _48 === void 0 ? void 0 : _48.axios,
|
|
937
957
|
dbType: devSettings.server,
|
|
938
958
|
dbCollection: props.collectionId,
|
|
939
959
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -941,12 +961,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
941
961
|
dbUserToken: devSettings.dbUserToken,
|
|
942
962
|
});
|
|
943
963
|
var moreButtonPopUp = [
|
|
944
|
-
((
|
|
964
|
+
((_49 = props.edit) === null || _49 === void 0 ? void 0 : _49.allEditable) &&
|
|
945
965
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
946
966
|
// datasheet served through one can import; only the browser-direct
|
|
947
967
|
// Firebase client has no server to import through
|
|
948
968
|
!isFirebaseClient &&
|
|
949
|
-
!((
|
|
969
|
+
!((_51 = (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.exportSettings) === null || _51 === void 0 ? void 0 : _51.hideImportCSV)
|
|
950
970
|
? {
|
|
951
971
|
text: "Import Excel",
|
|
952
972
|
onClick: function () {
|
|
@@ -955,7 +975,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
955
975
|
},
|
|
956
976
|
}
|
|
957
977
|
: null,
|
|
958
|
-
!((
|
|
978
|
+
!((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.exportSettings) === null || _53 === void 0 ? void 0 : _53.hideExportCSV)
|
|
959
979
|
? {
|
|
960
980
|
text: "Export CSV",
|
|
961
981
|
onClick: function () {
|
|
@@ -965,7 +985,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
965
985
|
},
|
|
966
986
|
}
|
|
967
987
|
: null,
|
|
968
|
-
!((
|
|
988
|
+
!((_55 = (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.exportSettings) === null || _55 === void 0 ? void 0 : _55.hideExportExcel)
|
|
969
989
|
? {
|
|
970
990
|
text: "Export Excel",
|
|
971
991
|
onClick: function () {
|
|
@@ -975,7 +995,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
975
995
|
},
|
|
976
996
|
}
|
|
977
997
|
: null,
|
|
978
|
-
!((
|
|
998
|
+
!((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideExportPDF)
|
|
979
999
|
? {
|
|
980
1000
|
text: "Export PDF",
|
|
981
1001
|
onClick: function () {
|
|
@@ -985,7 +1005,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
985
1005
|
},
|
|
986
1006
|
}
|
|
987
1007
|
: null,
|
|
988
|
-
!((
|
|
1008
|
+
!((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideExportQR)
|
|
989
1009
|
? {
|
|
990
1010
|
text: "Export QR",
|
|
991
1011
|
onClick: function () {
|
|
@@ -995,7 +1015,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
995
1015
|
},
|
|
996
1016
|
}
|
|
997
1017
|
: null,
|
|
998
|
-
!((
|
|
1018
|
+
!((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportQR)
|
|
999
1019
|
? {
|
|
1000
1020
|
text: "Export QR(Data)",
|
|
1001
1021
|
onClick: function () {
|
|
@@ -1005,7 +1025,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1005
1025
|
},
|
|
1006
1026
|
}
|
|
1007
1027
|
: null,
|
|
1008
|
-
!((
|
|
1028
|
+
!((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportPrint)
|
|
1009
1029
|
? {
|
|
1010
1030
|
text: "Print",
|
|
1011
1031
|
onClick: function () {
|
|
@@ -1015,7 +1035,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1015
1035
|
},
|
|
1016
1036
|
}
|
|
1017
1037
|
: null,
|
|
1018
|
-
!((
|
|
1038
|
+
!((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportDraft)
|
|
1019
1039
|
? {
|
|
1020
1040
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1021
1041
|
onClick: function () {
|
|
@@ -1024,7 +1044,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1024
1044
|
}
|
|
1025
1045
|
: null,
|
|
1026
1046
|
].filter(Boolean);
|
|
1027
|
-
if ((
|
|
1047
|
+
if ((_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.moreSettings)
|
|
1028
1048
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1029
1049
|
//=====================================================================================
|
|
1030
1050
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1204,8 +1224,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1204
1224
|
if (f.id !== filterId)
|
|
1205
1225
|
return f;
|
|
1206
1226
|
// INFO: Reset operator and value when column changes since available operators differ per type
|
|
1207
|
-
var ds =
|
|
1208
|
-
var operators = ds ? flexFilter_1.
|
|
1227
|
+
var ds = flexFilterStructure.find(function (s) { return s.id === columnId; });
|
|
1228
|
+
var operators = ds ? (0, flexFilter_1.handleGetFlexFilterOperators)(ds) : undefined;
|
|
1209
1229
|
var defaultOperator = operators && operators.length > 0 ? operators[0] : "=";
|
|
1210
1230
|
return __assign(__assign({}, f), { columnId: columnId, operator: defaultOperator, value: undefined });
|
|
1211
1231
|
});
|
|
@@ -1275,11 +1295,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1275
1295
|
handleColumnChange: function (filterId, columnId) {
|
|
1276
1296
|
return setExportFlexFilters(function (previous) {
|
|
1277
1297
|
return previous.map(function (each) {
|
|
1278
|
-
var _a
|
|
1298
|
+
var _a;
|
|
1279
1299
|
if (each.id !== filterId)
|
|
1280
1300
|
return each;
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1301
|
+
var column = exportFilterStructure.find(function (eachModel) { return eachModel.id === columnId; });
|
|
1302
|
+
var operators = column
|
|
1303
|
+
? (0, flexFilter_1.handleGetFlexFilterOperators)(column)
|
|
1304
|
+
: undefined;
|
|
1305
|
+
return __assign(__assign({}, each), { columnId: columnId, operator: (_a = operators === null || operators === void 0 ? void 0 : operators[0]) !== null && _a !== void 0 ? _a : "=", value: undefined });
|
|
1283
1306
|
});
|
|
1284
1307
|
});
|
|
1285
1308
|
},
|
|
@@ -1315,7 +1338,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1315
1338
|
if (flexRows.length > 0) {
|
|
1316
1339
|
// INFO: formula conditions never reach the server — the field is not
|
|
1317
1340
|
// stored — and are applied to the rows by handleApplyFormulaView
|
|
1318
|
-
var flexQuery = (0, listModule_1.renderFlexFilterConditions)(flexRows, structure).filter(function (eachQuery) { var _a; return !formulaColumnIds.includes((_a = eachQuery.queryId) !== null && _a !== void 0 ? _a : ""); });
|
|
1341
|
+
var flexQuery = (0, listModule_1.renderFlexFilterConditions)(flexRows, structure, flexFilterExtras).filter(function (eachQuery) { var _a; return !formulaColumnIds.includes((_a = eachQuery.queryId) !== null && _a !== void 0 ? _a : ""); });
|
|
1319
1342
|
if (flexQuery.length > 0) {
|
|
1320
1343
|
if (query) {
|
|
1321
1344
|
query = __spreadArray(__spreadArray([], query, true), flexQuery, true);
|
|
@@ -1375,10 +1398,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1375
1398
|
var handleBuildViewSnapshot = function () {
|
|
1376
1399
|
var _a;
|
|
1377
1400
|
return (__assign({ filterSearchParams: filterSearchParams, filterSelection: filterSelection, filterReference: filterReference, filterReferenceDate: (0, viewStatePersistence_1.serializeDateFilterState)(filterReferenceDate), flexFilters: flexFiltersDebounced.some(function (eachFilter) {
|
|
1378
|
-
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure);
|
|
1401
|
+
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
|
|
1379
1402
|
})
|
|
1380
1403
|
? flexFiltersDebounced.filter(function (eachFilter) {
|
|
1381
|
-
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure);
|
|
1404
|
+
return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
|
|
1382
1405
|
})
|
|
1383
1406
|
: undefined, sort: persistedSort !== null && persistedSort !== void 0 ? persistedSort : (_a = props.organise) === null || _a === void 0 ? void 0 : _a.sort, pageLimit: pageLimit,
|
|
1384
1407
|
// INFO: scroll mode reloads from page 0; the anchor restores the position
|
|
@@ -1390,7 +1413,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1390
1413
|
//=====================================================================================
|
|
1391
1414
|
//SECTION: Saved Views
|
|
1392
1415
|
//=====================================================================================
|
|
1393
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1416
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.persistKey, (_68 = devSettings.currentUser) === null || _68 === void 0 ? void 0 : _68.userEmail);
|
|
1394
1417
|
(0, react_1.useEffect)(function () {
|
|
1395
1418
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1396
1419
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
@@ -1445,7 +1468,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1445
1468
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1446
1469
|
(0, react_1.useEffect)(function () {
|
|
1447
1470
|
lastSentSharedViewsRef.current = null;
|
|
1448
|
-
}, [(
|
|
1471
|
+
}, [(_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.sharedViews]);
|
|
1449
1472
|
var handleStoreSharedViews = function (update) {
|
|
1450
1473
|
var _a, _b, _c;
|
|
1451
1474
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1481,13 +1504,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1481
1504
|
/* eslint-disable */
|
|
1482
1505
|
}, [
|
|
1483
1506
|
isSavedViewsEnabled,
|
|
1484
|
-
(
|
|
1485
|
-
(
|
|
1486
|
-
(
|
|
1507
|
+
(_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.initialSavedViewId,
|
|
1508
|
+
(_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.defaultSavedViewId,
|
|
1509
|
+
(_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.sharedViews,
|
|
1487
1510
|
savedViews,
|
|
1488
1511
|
]);
|
|
1489
1512
|
/* eslint-enable */
|
|
1490
|
-
var defaultSavedViewIds = ((
|
|
1513
|
+
var defaultSavedViewIds = ((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.defaultSavedViews) !== null && _74 !== void 0 ? _74 : [])
|
|
1491
1514
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1492
1515
|
.join("|");
|
|
1493
1516
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1505,7 +1528,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1505
1528
|
var model = (_a = props.model) !== null && _a !== void 0 ? _a : [];
|
|
1506
1529
|
return ((_f = (0, viewStatePersistence_1.handlePruneStaleColumns)(__assign({ filterSearchParams: initialFilterSearchParams, filterSelection: initialFilterSelection, filterReference: initialFilterReference, filterReferenceDate: (0, viewStatePersistence_1.serializeDateFilterState)(initialFilterReferenceDate), sort: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.sort, pageLimit: (_c = props.limit) !== null && _c !== void 0 ? _c : 10, userHiddenColumnIds: [], hiddenColumnIds: model
|
|
1507
1530
|
.filter(function (eachColumn) { return eachColumn.hide; })
|
|
1508
|
-
.map(function (eachColumn) { return eachColumn.id; }), columnOrder: model.map(function (eachColumn) { return eachColumn.id; }), groupBy: (_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.groupBy) !== null && _e !== void 0 ? _e : "" }, (state !== null && state !== void 0 ? state : {})), model)) !== null && _f !== void 0 ? _f : {});
|
|
1531
|
+
.map(function (eachColumn) { return eachColumn.id; }), columnOrder: model.map(function (eachColumn) { return eachColumn.id; }), groupBy: (_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.groupBy) !== null && _e !== void 0 ? _e : "" }, (state !== null && state !== void 0 ? state : {})), model, (0, flexFilter_1.handleBuildFlexFilterStructure)(model, flexFilterExtras))) !== null && _f !== void 0 ? _f : {});
|
|
1509
1532
|
};
|
|
1510
1533
|
var handleApplyViewColumns = function (columns, state) {
|
|
1511
1534
|
var _a;
|
|
@@ -1752,7 +1775,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1752
1775
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1753
1776
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1754
1777
|
/* eslint-disable */
|
|
1755
|
-
}, [props.collectionId, (
|
|
1778
|
+
}, [props.collectionId, (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.persistKey]);
|
|
1756
1779
|
/* eslint-enable */
|
|
1757
1780
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1758
1781
|
(0, react_1.useEffect)(function () {
|
|
@@ -1787,7 +1810,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1787
1810
|
(0, react_1.useEffect)(function () {
|
|
1788
1811
|
handleOfflinePrefetch();
|
|
1789
1812
|
/* eslint-disable */
|
|
1790
|
-
}, [props.collectionId, (
|
|
1813
|
+
}, [props.collectionId, (_76 = props.bareSettings) === null || _76 === void 0 ? void 0 : _76.bareOffline]);
|
|
1791
1814
|
/* eslint-enable */
|
|
1792
1815
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
1793
1816
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -1807,7 +1830,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1807
1830
|
}, interval);
|
|
1808
1831
|
return function () { return clearInterval(timer); };
|
|
1809
1832
|
/* eslint-disable */
|
|
1810
|
-
}, [(
|
|
1833
|
+
}, [(_77 = props.bareSettings) === null || _77 === void 0 ? void 0 : _77.barePollingInterval, isLive, isNetworkOffline]);
|
|
1811
1834
|
/* eslint-enable */
|
|
1812
1835
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
1813
1836
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -1849,7 +1872,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1849
1872
|
};
|
|
1850
1873
|
/* eslint-disable */
|
|
1851
1874
|
}, [
|
|
1852
|
-
(
|
|
1875
|
+
(_78 = props.bareSettings) === null || _78 === void 0 ? void 0 : _78.bareSocketName,
|
|
1853
1876
|
props.collectionId,
|
|
1854
1877
|
props.devSettings.sseEndpoint,
|
|
1855
1878
|
props.devSettings.dbAPIToken,
|
|
@@ -2109,10 +2132,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2109
2132
|
props.collectionId,
|
|
2110
2133
|
props.model,
|
|
2111
2134
|
props.localURLEndpoint,
|
|
2112
|
-
(
|
|
2113
|
-
(
|
|
2114
|
-
(
|
|
2115
|
-
(
|
|
2135
|
+
(_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.extendedTabs,
|
|
2136
|
+
(_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.viewId,
|
|
2137
|
+
(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.additionalQuery,
|
|
2138
|
+
(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.groupBy,
|
|
2116
2139
|
resolvedType,
|
|
2117
2140
|
]);
|
|
2118
2141
|
/**
|
|
@@ -2264,7 +2287,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2264
2287
|
};
|
|
2265
2288
|
}, 100);
|
|
2266
2289
|
return function () { return clearTimeout(timeoutId); };
|
|
2267
|
-
}, [(
|
|
2290
|
+
}, [(_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2268
2291
|
(0, react_1.useEffect)(function () {
|
|
2269
2292
|
if (resolvedType !== "read")
|
|
2270
2293
|
return;
|
|
@@ -8457,7 +8480,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8457
8480
|
// INFO: active flex filter count for the icon badge + floating search.
|
|
8458
8481
|
// Counts query output so the badge matches what's actually filtered.
|
|
8459
8482
|
var activeFlexFilterCount_1 = ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
|
|
8460
|
-
? (0, listModule_1.renderFlexFilterConditions)(flexFilters, structure)
|
|
8483
|
+
? (0, listModule_1.renderFlexFilterConditions)(flexFilters, structure, flexFilterExtras)
|
|
8484
|
+
.length
|
|
8461
8485
|
: 0;
|
|
8462
8486
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
8463
8487
|
dbModule: dbModule,
|
|
@@ -11392,14 +11416,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11392
11416
|
};
|
|
11393
11417
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
11394
11418
|
renderNotification("root"),
|
|
11395
|
-
((
|
|
11419
|
+
((_85 = (_84 = props.renderSettings) === null || _84 === void 0 ? void 0 : _84.renderLoadingUI) === null || _85 === void 0 ? void 0 : _85.call(_84)) && loading ? ((_86 = props.renderSettings) === null || _86 === void 0 ? void 0 : _86.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.darkMode, darkModeBg: (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11396
11420
|
var _a, _b;
|
|
11397
11421
|
if (loading)
|
|
11398
11422
|
return;
|
|
11399
11423
|
handlePopUpModal(false);
|
|
11400
11424
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11401
11425
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11402
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11426
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.darkMode, darkModeBg: (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11403
11427
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11404
11428
|
if (dataId) {
|
|
11405
11429
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11415,19 +11439,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11415
11439
|
}, onClose: function () {
|
|
11416
11440
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11417
11441
|
} }),
|
|
11418
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11442
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.darkMode, darkModeBg: (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11419
11443
|
setReferenceDeleteTableData({});
|
|
11420
11444
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11421
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11445
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.darkMode, darkModeBg: (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11422
11446
|
setDeletePasscodeInput("");
|
|
11423
11447
|
setDeleteModal(!deleteModal);
|
|
11424
11448
|
setDeleteFeedId("");
|
|
11425
11449
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11426
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11450
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.darkMode, darkModeBg: (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11427
11451
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11428
11452
|
setBatchUpdateModal(false);
|
|
11429
11453
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11430
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
11454
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.darkMode, darkModeBg: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11431
11455
|
var _a, _b;
|
|
11432
11456
|
if (props.space)
|
|
11433
11457
|
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 }));
|
|
@@ -11442,13 +11466,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11442
11466
|
(0, react_dom_1.createPortal)(
|
|
11443
11467
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11444
11468
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11445
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
11469
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkMode, darkModeBg: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11446
11470
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11447
11471
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11448
11472
|
// toolbar's collection-wide button clears it when it opens.
|
|
11449
11473
|
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"
|
|
11450
11474
|
? props.title
|
|
11451
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
11475
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_101 = props.id) !== null && _101 !== void 0 ? _101 : "") : activityId, activityLog: (_102 = props.edit) === null || _102 === void 0 ? void 0 : _102.activityLog, model: structure }) })), document.body),
|
|
11452
11476
|
renderScrollSentinel()));
|
|
11453
11477
|
});
|
|
11454
11478
|
//# sourceMappingURL=index.js.map
|