blixify-ui-web 1.3.52 → 1.3.54
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 +91 -46
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/timelineBars.d.ts +0 -2
- package/lib/components/data/dataTemplate/timelineBars.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/timelineBars.js +2 -8
- package/lib/components/data/dataTemplate/timelineBars.js.map +1 -1
- package/lib/components/data/formula/index.d.ts.map +1 -1
- package/lib/components/data/formula/index.js +23 -7
- package/lib/components/data/formula/index.js.map +1 -1
- package/lib/components/display/modal/index.d.ts.map +1 -1
- package/lib/components/display/modal/index.js +3 -1
- package/lib/components/display/modal/index.js.map +1 -1
- package/lib/components/display/newPagination/index.d.ts +5 -0
- package/lib/components/display/newPagination/index.d.ts.map +1 -1
- package/lib/components/display/newPagination/index.js +5 -3
- package/lib/components/display/newPagination/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +1 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +191 -94
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/newTable/rowRendering.d.ts +17 -0
- package/lib/components/display/newTable/rowRendering.d.ts.map +1 -1
- package/lib/components/display/newTable/rowRendering.js +16 -1
- package/lib/components/display/newTable/rowRendering.js.map +1 -1
- package/lib/components/display/newTimeline/index.d.ts +19 -0
- package/lib/components/display/newTimeline/index.d.ts.map +1 -0
- package/lib/components/display/newTimeline/index.js +139 -0
- package/lib/components/display/newTimeline/index.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +3 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/select/index.d.ts.map +1 -1
- package/lib/components/input/select/index.js +6 -4
- package/lib/components/input/select/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAoCA,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAoCA,OAAO,KASN,MAAM,OAAO,CAAC;AA+Hf,OAAO,EAGL,iBAAiB,EAOlB,MAAM,kBAAkB,CAAC;AAwL1B,eAAO,MAAM,qBAAqB,OAAO,CAAC;AA6C1C,eAAO,MAAM,yBAAyB,UAAW,GAAG,YAYnD,CAAC;AAeF,eAAO,MAAM,YAAY,mFAillBvB,CAAC"}
|
|
@@ -132,6 +132,7 @@ var newTable_1 = require("../../display/newTable");
|
|
|
132
132
|
var newList_1 = require("../../display/newList");
|
|
133
133
|
var listRowFields_1 = require("../../display/newList/listRowFields");
|
|
134
134
|
var newGrid_1 = require("../../display/newGrid");
|
|
135
|
+
var newTimeline_1 = require("../../display/newTimeline");
|
|
135
136
|
var newKanban_1 = require("../../display/newKanban");
|
|
136
137
|
var newCalendar_1 = require("../../display/newCalendar");
|
|
137
138
|
var address_1 = require("../../input/address");
|
|
@@ -213,6 +214,9 @@ var handleIsEmptyElement = function (element) {
|
|
|
213
214
|
// one request; kept short, since a row scrolled into view shows an empty
|
|
214
215
|
// bubble until its count arrives
|
|
215
216
|
var COMMENT_COUNT_BATCH_MS = 50;
|
|
217
|
+
// INFO: draws its content when mounted, so content handed to a closed pop-up
|
|
218
|
+
// is not built until the pop-up opens
|
|
219
|
+
var LazyContent = function (props) { return (react_1.default.createElement(react_1.default.Fragment, null, props.render())); };
|
|
216
220
|
// INFO: long enough for the views a closing comments panel saves to land
|
|
217
221
|
var CLOSED_ROW_RECOUNT_MS = 1500;
|
|
218
222
|
// INFO: how long an in-place refresh that keeps the group totals waits for its
|
|
@@ -880,6 +884,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
880
884
|
// INFO: observer callbacks may already be queued when refresh is requested.
|
|
881
885
|
// Block them synchronously, before React commits the loading/row reset.
|
|
882
886
|
var scrollPaginationPendingRef = (0, react_1.useRef)(true);
|
|
887
|
+
// INFO: the scroll read of the next page is in flight. tableLoading stays
|
|
888
|
+
// false for it, or the rows would turn to skeletons, so the "loading more"
|
|
889
|
+
// cue is drawn from this instead
|
|
890
|
+
var _270 = (0, react_1.useState)(false), isScrollAppending = _270[0], setIsScrollAppending = _270[1];
|
|
883
891
|
// INFO: a ref, filled in the row click before navigating unmounts the list
|
|
884
892
|
var scrollCaptureRef = (0, react_1.useRef)({
|
|
885
893
|
scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
|
|
@@ -1268,7 +1276,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1268
1276
|
var isSchemaHideMode = ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.onChangeHide) ? true : false;
|
|
1269
1277
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1270
1278
|
// the persisted value and falls back to the consumer's limit
|
|
1271
|
-
var
|
|
1279
|
+
var _271 = (0, react_1.useState)((_30 = (_29 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _29 !== void 0 ? _29 : props.limit) !== null && _30 !== void 0 ? _30 : 10), pageLimit = _271[0], setPageLimit = _271[1];
|
|
1272
1280
|
var limit = pageLimit;
|
|
1273
1281
|
var isSavedViewsEnabled = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.savedViews) && resolvedType === "list";
|
|
1274
1282
|
// INFO: a calendar and a chart draw their own way, so columns, sort and
|
|
@@ -1477,7 +1485,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1477
1485
|
var handleGetSelectAllText = function () {
|
|
1478
1486
|
return "".concat(size.toLocaleString(), " records ").concat(handleCheckReaderFiltered() ? "matching your filters" : "in this list");
|
|
1479
1487
|
};
|
|
1480
|
-
var
|
|
1488
|
+
var _272 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _272.canUpdateRecord, canInlineUpdate = _272.canInlineUpdate, canBatchUpdate = _272.canBatchUpdate, canDeleteRecord = _272.canDeleteRecord;
|
|
1481
1489
|
var isEditor = ((_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.allEditable) ? true : false;
|
|
1482
1490
|
var isOffline = (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOffline;
|
|
1483
1491
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -4325,6 +4333,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
4325
4333
|
// INFO: appending must keep existing rows visible. tableLoading replaces
|
|
4326
4334
|
// them with skeletons; the synchronous ref alone guards queued callbacks.
|
|
4327
4335
|
scrollPaginationPendingRef.current = true;
|
|
4336
|
+
if (value === "next")
|
|
4337
|
+
setIsScrollAppending(true);
|
|
4328
4338
|
}
|
|
4329
4339
|
if (!isFirebase && !isScrollMode) {
|
|
4330
4340
|
setTableLoading(true);
|
|
@@ -4703,8 +4713,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
4703
4713
|
return [3 /*break*/, 8];
|
|
4704
4714
|
case 8:
|
|
4705
4715
|
// INFO: inline writes update rows too, but do not finish a pending list read.
|
|
4706
|
-
if (!type)
|
|
4716
|
+
if (!type) {
|
|
4707
4717
|
scrollPaginationPendingRef.current = false;
|
|
4718
|
+
setIsScrollAppending(false);
|
|
4719
|
+
}
|
|
4708
4720
|
// INFO: a first page read afresh holds the rows added since the last one
|
|
4709
4721
|
if (!type && !(requestCond === null || requestCond === void 0 ? void 0 : requestCond.cursor) && !(requestCond === null || requestCond === void 0 ? void 0 : requestCond.skip))
|
|
4710
4722
|
handleSetPendingInserts(0);
|
|
@@ -5473,6 +5485,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5473
5485
|
props.organise.handleNavigate("list", "");
|
|
5474
5486
|
}
|
|
5475
5487
|
else {
|
|
5488
|
+
// INFO: a failed scroll read is finished too, so the "Loading for
|
|
5489
|
+
// more..." cue goes. The pending ref stays set: with the sentinel still
|
|
5490
|
+
// in view, clearing it would retry a failing read over and over
|
|
5491
|
+
setIsScrollAppending(false);
|
|
5476
5492
|
if ((_c = (_b = err.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.err)
|
|
5477
5493
|
console.log("Data Retrieval Error - " + typeof err.response.data.err === "object"
|
|
5478
5494
|
? JSON.stringify(err.response.data.err)
|
|
@@ -11224,7 +11240,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11224
11240
|
return null;
|
|
11225
11241
|
};
|
|
11226
11242
|
var renderListActionElements = function () {
|
|
11227
|
-
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
|
|
11243
|
+
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;
|
|
11228
11244
|
var actionElementList = [];
|
|
11229
11245
|
// INFO: sort, Slice Data and Model Overview all moved into the view
|
|
11230
11246
|
// settings panel and the flex filters, so the Space row keeps only
|
|
@@ -11274,9 +11290,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11274
11290
|
};
|
|
11275
11291
|
// INFO: Desktop — PopUp (hidden on mobile)
|
|
11276
11292
|
actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
|
|
11277
|
-
react_1.default.createElement(popUp_1.PopUp, { darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode, darkModeBg: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkModeBg, ctaComp: viewSettingsIcon(""),
|
|
11278
|
-
|
|
11279
|
-
|
|
11293
|
+
react_1.default.createElement(popUp_1.PopUp, { darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode, darkModeBg: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkModeBg, ctaComp: viewSettingsIcon(""),
|
|
11294
|
+
// INFO: built only while the panel is open — it lists
|
|
11295
|
+
// every column, so building it on each redraw of a wide
|
|
11296
|
+
// table cost as much as the table's own rows
|
|
11297
|
+
renderComp: react_1.default.createElement(LazyContent, { render: function () {
|
|
11298
|
+
var _a, _b, _c;
|
|
11299
|
+
return (react_1.default.createElement("div", { className: "w-[calc(100vw-2rem)] max-w-[320px] rounded-md p-4 shadow-lg ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode)
|
|
11300
|
+
? "".concat((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkModeBg) !== null && _c !== void 0 ? _c : "bg-gray-900", " text-white")
|
|
11301
|
+
: "bg-white") }, renderViewSettingsContent()));
|
|
11302
|
+
} }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Transition } })));
|
|
11280
11303
|
// INFO: Mobile — the popover cannot fit the panel and overflows the
|
|
11281
11304
|
// viewport, so a Modal takes over (same split as the flex filter)
|
|
11282
11305
|
actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
|
|
@@ -11284,11 +11307,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11284
11307
|
viewSettingsIcon("-mobile", function () {
|
|
11285
11308
|
return setViewSettingsModalOpen(true);
|
|
11286
11309
|
}),
|
|
11287
|
-
react_1.default.createElement(modal_1.Modal, { open: viewSettingsModalOpen, maxWidth: "lg", title: "View", darkMode: (
|
|
11310
|
+
react_1.default.createElement(modal_1.Modal, { open: viewSettingsModalOpen, maxWidth: "lg", title: "View", darkMode: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.darkMode, darkModeBg: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.darkModeBg, onClose: function () { return setViewSettingsModalOpen(false); }, renderContent: function () { return renderViewSettingsContent(); } })));
|
|
11288
11311
|
}
|
|
11289
11312
|
// INFO: Flex filter — desktop uses PopUp, mobile uses Modal
|
|
11290
|
-
if ((
|
|
11291
|
-
var
|
|
11313
|
+
if ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareFlexFilters) {
|
|
11314
|
+
var flexActions_1 = __assign({ handleAddFilter: handleFlexFilterAdd, handleRemoveFilter: handleFlexFilterRemove, handleClearAllFilters: handleFlexFilterClearAll, handleColumnChange: handleFlexFilterColumnChange, handleOperatorChange: handleFlexFilterOperatorChange, handleValueChange: handleFlexFilterValueChange, handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded, handleReferenceSearch: handleFlexFilterReferenceSearch, isContainsSupported: isFlexOrSupported }, (isFlexOrSupported
|
|
11292
11315
|
? {
|
|
11293
11316
|
handleAddOrFilter: handleFlexFilterAddOr,
|
|
11294
11317
|
canAddOrFilter: function (filterId) {
|
|
@@ -11297,17 +11320,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11297
11320
|
}
|
|
11298
11321
|
: {}));
|
|
11299
11322
|
// INFO: Search input will only render above flex filters if bareListFilterAsPopup is true
|
|
11300
|
-
var
|
|
11301
|
-
((
|
|
11302
|
-
!((
|
|
11323
|
+
var searchInput_1 = !isFirebase &&
|
|
11324
|
+
((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareListFilterAsPopup) &&
|
|
11325
|
+
!((_s = props.organise) === null || _s === void 0 ? void 0 : _s.hideSearch) &&
|
|
11303
11326
|
filterComponent_1 &&
|
|
11304
11327
|
Array.isArray(filterComponent_1) &&
|
|
11305
11328
|
filterComponent_1.length > 0
|
|
11306
11329
|
? filterComponent_1[filterComponent_1.length - 1]
|
|
11307
11330
|
: undefined;
|
|
11308
11331
|
var flexFilterLength_1 = activeFlexFilterCount_1;
|
|
11309
|
-
if (!((
|
|
11310
|
-
((
|
|
11332
|
+
if (!((_t = props.organise) === null || _t === void 0 ? void 0 : _t.hideSearch) &&
|
|
11333
|
+
((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareListFilterAsPopup) &&
|
|
11311
11334
|
(filterSearchParams === null || filterSearchParams === void 0 ? void 0 : filterSearchParams["search"]))
|
|
11312
11335
|
flexFilterLength_1 += 1;
|
|
11313
11336
|
var flexFilterIconBtn = function (mobile) {
|
|
@@ -11320,17 +11343,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11320
11343
|
};
|
|
11321
11344
|
// INFO: Desktop — PopUp (hidden on mobile)
|
|
11322
11345
|
actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
|
|
11323
|
-
react_1.default.createElement(popUp_1.PopUp, { darkMode: (
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11346
|
+
react_1.default.createElement(popUp_1.PopUp, { darkMode: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.darkMode, ctaComp: flexFilterIconBtn(), renderComp: react_1.default.createElement(LazyContent, { render: function () {
|
|
11347
|
+
var _a, _b, _c, _d;
|
|
11348
|
+
return (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions_1, (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListFilterQuery, searchInput_1, (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListFilterAddComponent, undefined, {
|
|
11349
|
+
darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode,
|
|
11350
|
+
darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg,
|
|
11351
|
+
});
|
|
11352
|
+
} }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_w = props === null || props === void 0 ? void 0 : props.lib) === null || _w === void 0 ? void 0 : _w.Transition } })));
|
|
11327
11353
|
// INFO: Mobile — IconButton that opens a Modal (hidden on desktop)
|
|
11328
11354
|
actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
|
|
11329
|
-
!((
|
|
11355
|
+
!((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListMobileFloatingSearch) &&
|
|
11330
11356
|
flexFilterIconBtn(true),
|
|
11331
|
-
(0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch,
|
|
11332
|
-
darkMode: (
|
|
11333
|
-
darkModeBg: (
|
|
11357
|
+
(0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions_1, function () { return setFlexFilterModalOpen(false); }, (_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListFilterQuery, searchInput_1, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterAddComponent, {
|
|
11358
|
+
darkMode: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkMode,
|
|
11359
|
+
darkModeBg: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkModeBg,
|
|
11334
11360
|
})));
|
|
11335
11361
|
}
|
|
11336
11362
|
// INFO: bareUpdateActionBottom positions the read/update action bar. The list's own
|
|
@@ -11339,14 +11365,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11339
11365
|
var actionBtns = renderActionButtons(resolvedType);
|
|
11340
11366
|
if (actionBtns)
|
|
11341
11367
|
actionElementList.push(actionBtns);
|
|
11342
|
-
if (schemaPresent || ((
|
|
11343
|
-
actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (
|
|
11368
|
+
if (schemaPresent || ((_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.showExport)) {
|
|
11369
|
+
actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
|
|
11344
11370
|
//TODO: Bug - Crash on Next Js
|
|
11345
11371
|
// <Menu.Item>
|
|
11346
11372
|
react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
|
|
11347
11373
|
// </Menu.Item>
|
|
11348
11374
|
); })), lib: {
|
|
11349
|
-
Transition: (
|
|
11375
|
+
Transition: (_5 = props === null || props === void 0 ? void 0 : props.lib) === null || _5 === void 0 ? void 0 : _5.Transition,
|
|
11350
11376
|
} }));
|
|
11351
11377
|
}
|
|
11352
11378
|
if (actionElementList.length > 0) {
|
|
@@ -11812,6 +11838,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11812
11838
|
return false;
|
|
11813
11839
|
};
|
|
11814
11840
|
var renderScrollSentinel = function () {
|
|
11841
|
+
var _a;
|
|
11815
11842
|
if (!renderCheckScrollMode())
|
|
11816
11843
|
return null;
|
|
11817
11844
|
// INFO: when every group pages itself, the single global bottom sentinel is
|
|
@@ -11825,10 +11852,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11825
11852
|
return null;
|
|
11826
11853
|
// INFO: only show the append spinner once we already have rows. On the
|
|
11827
11854
|
// first load the view's own empty-state spinner is enough — rendering
|
|
11828
|
-
// ours too would mean two spinners on screen at the same time.
|
|
11829
|
-
|
|
11855
|
+
// ours too would mean two spinners on screen at the same time. The new
|
|
11856
|
+
// table says "Loading for more..." under its own last row instead, so it gets
|
|
11857
|
+
// none from here either.
|
|
11858
|
+
var isTableDrawn = !!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW) &&
|
|
11859
|
+
(!selectedTab ||
|
|
11860
|
+
selectedTab.id === "general" ||
|
|
11861
|
+
selectedTab.viewType === "report");
|
|
11862
|
+
var showAppendSpinner = !isTableDrawn &&
|
|
11863
|
+
(tableLoading || isScrollAppending) &&
|
|
11864
|
+
tableData.length > 0;
|
|
11830
11865
|
return (react_1.default.createElement("div", { className: "w-full flex flex-col items-center py-4" },
|
|
11831
|
-
showAppendSpinner && react_1.default.createElement(
|
|
11866
|
+
showAppendSpinner && (react_1.default.createElement("div", { "data-testid": "scroll-append-spinner" },
|
|
11867
|
+
react_1.default.createElement(loading_1.Loading, null))),
|
|
11832
11868
|
react_1.default.createElement("div", { ref: scrollSentinelRef, className: "h-1 w-full" })));
|
|
11833
11869
|
};
|
|
11834
11870
|
var renderTabs = function () {
|
|
@@ -12848,7 +12884,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12848
12884
|
? function (groupKey, page) {
|
|
12849
12885
|
return handleFetchGroupPage(groupKey, page);
|
|
12850
12886
|
}
|
|
12851
|
-
: 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 ? handleGetSelectAllText() : "", disableSelectFullData: ((_g = (_f = props.organise) === null || _f === void 0 ? void 0 : _f.disableSelectFullData) === null || _g === void 0 ? void 0 : _g.table) ||
|
|
12887
|
+
: 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, loadingMore: isScrollAppending, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? handleGetSelectAllText() : "", disableSelectFullData: ((_g = (_f = props.organise) === null || _f === void 0 ? void 0 : _f.disableSelectFullData) === null || _g === void 0 ? void 0 : _g.table) ||
|
|
12852
12888
|
isFormulaView ||
|
|
12853
12889
|
isSelectAllUncountable, maxSelectedCount: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListMaxSelectedCount, mobileView: (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareListMobileView, mobileTooltip: (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareMobileTooltip, gridLines: (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListGridLines, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
12854
12890
|
!((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareHideTableExtraMultipleAction)
|
|
@@ -13652,6 +13688,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13652
13688
|
var renderEventAvailabilities = function () {
|
|
13653
13689
|
var eventAvailabilities = [];
|
|
13654
13690
|
if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.startDate) {
|
|
13691
|
+
// INFO: read once for the view rather than per row — each look-up
|
|
13692
|
+
// walks the whole schema
|
|
13693
|
+
var startDateFormat = handleFindColumnDateFormat(calendarSettings_1.startDate);
|
|
13694
|
+
var endDateFormat = calendarSettings_1.endDate
|
|
13695
|
+
? handleFindColumnDateFormat(calendarSettings_1.endDate)
|
|
13696
|
+
: undefined;
|
|
13655
13697
|
for (var _i = 0, spaceTableData_1 = spaceTableData; _i < spaceTableData_1.length; _i++) {
|
|
13656
13698
|
var eachData = spaceTableData_1[_i];
|
|
13657
13699
|
var rawStart = (0, timelineBars_1.handleReadDateText)(eachData[calendarSettings_1.startDate]);
|
|
@@ -13662,15 +13704,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13662
13704
|
// one row without a date must not hide every row after it
|
|
13663
13705
|
if (!rawStart)
|
|
13664
13706
|
continue;
|
|
13665
|
-
|
|
13707
|
+
var startDate = (0, dateFormat_1.handleParseListDate)(rawStart, startDateFormat);
|
|
13708
|
+
if (!startDate.isValid()) {
|
|
13666
13709
|
continue;
|
|
13667
13710
|
}
|
|
13668
13711
|
else {
|
|
13669
13712
|
var id = eachData.id;
|
|
13670
13713
|
var title = (0, readModule_1.handleCutPreviewText)(eachData[calendarSettings_1.title]);
|
|
13671
|
-
var startDate = (0, dateFormat_1.handleParseListDate)(rawStart, handleFindColumnDateFormat(calendarSettings_1.startDate));
|
|
13672
13714
|
var endDate = calendarSettings_1.endDate && rawEnd
|
|
13673
|
-
? (0, dateFormat_1.handleParseListDate)(rawEnd,
|
|
13715
|
+
? (0, dateFormat_1.handleParseListDate)(rawEnd, endDateFormat)
|
|
13674
13716
|
: startDate;
|
|
13675
13717
|
var eventAvailability = {
|
|
13676
13718
|
id: id,
|
|
@@ -13727,6 +13769,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13727
13769
|
};
|
|
13728
13770
|
// INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
|
|
13729
13771
|
if ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareNewDTW) {
|
|
13772
|
+
// INFO: each event's unformatted row by id, found in one pass — a
|
|
13773
|
+
// search of every row for every event froze a busy month. The first
|
|
13774
|
+
// row holding an id keeps it, as the search found
|
|
13775
|
+
var rawRowById_1 = new Map();
|
|
13776
|
+
tableData.forEach(function (eachRow) {
|
|
13777
|
+
[eachRow === null || eachRow === void 0 ? void 0 : eachRow[serverId], eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, eachRow === null || eachRow === void 0 ? void 0 : eachRow.id].forEach(function (eachId) {
|
|
13778
|
+
if (eachId === undefined)
|
|
13779
|
+
return;
|
|
13780
|
+
var key = String(eachId);
|
|
13781
|
+
if (!rawRowById_1.has(key))
|
|
13782
|
+
rawRowById_1.set(key, eachRow);
|
|
13783
|
+
});
|
|
13784
|
+
});
|
|
13730
13785
|
var mappedCalendarEvents = renderEventAvailabilities().map(function (ev) {
|
|
13731
13786
|
var _a, _b, _c, _d;
|
|
13732
13787
|
return ({
|
|
@@ -13743,13 +13798,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13743
13798
|
date: ev.date,
|
|
13744
13799
|
// INFO: the unformatted row, so a tap handler can tell which
|
|
13745
13800
|
// collection a union event came from
|
|
13746
|
-
meta: {
|
|
13747
|
-
rawData: tableData.find(function (eachRow) {
|
|
13748
|
-
return [eachRow === null || eachRow === void 0 ? void 0 : eachRow[serverId], eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, eachRow === null || eachRow === void 0 ? void 0 : eachRow.id].some(function (eachId) {
|
|
13749
|
-
return eachId !== undefined && String(eachId) === String(ev.id);
|
|
13750
|
-
});
|
|
13751
|
-
}),
|
|
13752
|
-
},
|
|
13801
|
+
meta: { rawData: rawRowById_1.get(String(ev.id)) },
|
|
13753
13802
|
});
|
|
13754
13803
|
});
|
|
13755
13804
|
// INFO: lets the app reshape the fetched events — e.g. expand one
|
|
@@ -13918,10 +13967,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13918
13967
|
return timelineGroupId_1 ? (0, timelineBars_1.handleOrderByGroup)(tasks) : tasks;
|
|
13919
13968
|
};
|
|
13920
13969
|
var timelineTasks = renderTimelineTasks();
|
|
13921
|
-
// INFO: parallel hex list for Apex distributed bars — one colour per
|
|
13922
|
-
// task, in the same order; undefined falls back to the chart default
|
|
13923
|
-
var timelinePrimary_1 = timelinePrimaryColour;
|
|
13924
|
-
var timelineColors = timelineTasks.map(function (eachTask) { var _a; return (_a = eachTask.color) !== null && _a !== void 0 ? _a : timelinePrimary_1; });
|
|
13925
13970
|
var timelineWindow_1 = (0, timelineBars_1.handleGetTimelineWindow)(timelineRange.unit, timelineRange.anchor);
|
|
13926
13971
|
var handleChangeTimelineRange_1 = function (next) {
|
|
13927
13972
|
setTimelineRange(next);
|
|
@@ -13956,11 +14001,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13956
14001
|
// INFO: a row per record at a readable height, scrolling past a
|
|
13957
14002
|
// screen rather than squeezing every bar into a fixed chart
|
|
13958
14003
|
react_1.default.createElement("div", { "data-testid": "dtw-timeline-scroll", className: "max-h-[70vh] overflow-y-auto" },
|
|
13959
|
-
react_1.default.createElement(
|
|
14004
|
+
react_1.default.createElement(newTimeline_1.NewTimeline, { tasks: timelineTasks, barColor: timelinePrimaryColour, rangeStart: handleCheckTimelineWindow(timelineSettings_1)
|
|
13960
14005
|
? timelineWindow_1.start
|
|
13961
14006
|
: undefined, rangeEnd: handleCheckTimelineWindow(timelineSettings_1)
|
|
13962
14007
|
? timelineWindow_1.end
|
|
13963
|
-
: undefined,
|
|
14008
|
+
: undefined, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, onClick: function (taskId) {
|
|
13964
14009
|
var _a, _b;
|
|
13965
14010
|
if (taskId)
|
|
13966
14011
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", taskId, "general");
|