blixify-ui-web 1.3.52 → 1.3.53
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 +29 -7
- package/lib/components/data/dataTemplate/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 +114 -73
- package/lib/components/display/newTable/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;AA8Hf,OAAO,EAGL,iBAAiB,EAOlB,MAAM,kBAAkB,CAAC;AAmL1B,eAAO,MAAM,qBAAqB,OAAO,CAAC;AA6C1C,eAAO,MAAM,yBAAyB,UAAW,GAAG,YAYnD,CAAC;AAeF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAoCA,OAAO,KASN,MAAM,OAAO,CAAC;AA8Hf,OAAO,EAGL,iBAAiB,EAOlB,MAAM,kBAAkB,CAAC;AAmL1B,eAAO,MAAM,qBAAqB,OAAO,CAAC;AA6C1C,eAAO,MAAM,yBAAyB,UAAW,GAAG,YAYnD,CAAC;AAeF,eAAO,MAAM,YAAY,mFA8klBvB,CAAC"}
|
|
@@ -880,6 +880,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
880
880
|
// INFO: observer callbacks may already be queued when refresh is requested.
|
|
881
881
|
// Block them synchronously, before React commits the loading/row reset.
|
|
882
882
|
var scrollPaginationPendingRef = (0, react_1.useRef)(true);
|
|
883
|
+
// INFO: the scroll read of the next page is in flight. tableLoading stays
|
|
884
|
+
// false for it, or the rows would turn to skeletons, so the "loading more"
|
|
885
|
+
// cue is drawn from this instead
|
|
886
|
+
var _270 = (0, react_1.useState)(false), isScrollAppending = _270[0], setIsScrollAppending = _270[1];
|
|
883
887
|
// INFO: a ref, filled in the row click before navigating unmounts the list
|
|
884
888
|
var scrollCaptureRef = (0, react_1.useRef)({
|
|
885
889
|
scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
|
|
@@ -1268,7 +1272,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1268
1272
|
var isSchemaHideMode = ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.onChangeHide) ? true : false;
|
|
1269
1273
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1270
1274
|
// the persisted value and falls back to the consumer's limit
|
|
1271
|
-
var
|
|
1275
|
+
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
1276
|
var limit = pageLimit;
|
|
1273
1277
|
var isSavedViewsEnabled = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.savedViews) && resolvedType === "list";
|
|
1274
1278
|
// INFO: a calendar and a chart draw their own way, so columns, sort and
|
|
@@ -1477,7 +1481,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1477
1481
|
var handleGetSelectAllText = function () {
|
|
1478
1482
|
return "".concat(size.toLocaleString(), " records ").concat(handleCheckReaderFiltered() ? "matching your filters" : "in this list");
|
|
1479
1483
|
};
|
|
1480
|
-
var
|
|
1484
|
+
var _272 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _272.canUpdateRecord, canInlineUpdate = _272.canInlineUpdate, canBatchUpdate = _272.canBatchUpdate, canDeleteRecord = _272.canDeleteRecord;
|
|
1481
1485
|
var isEditor = ((_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.allEditable) ? true : false;
|
|
1482
1486
|
var isOffline = (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOffline;
|
|
1483
1487
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -4325,6 +4329,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
4325
4329
|
// INFO: appending must keep existing rows visible. tableLoading replaces
|
|
4326
4330
|
// them with skeletons; the synchronous ref alone guards queued callbacks.
|
|
4327
4331
|
scrollPaginationPendingRef.current = true;
|
|
4332
|
+
if (value === "next")
|
|
4333
|
+
setIsScrollAppending(true);
|
|
4328
4334
|
}
|
|
4329
4335
|
if (!isFirebase && !isScrollMode) {
|
|
4330
4336
|
setTableLoading(true);
|
|
@@ -4703,8 +4709,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
4703
4709
|
return [3 /*break*/, 8];
|
|
4704
4710
|
case 8:
|
|
4705
4711
|
// INFO: inline writes update rows too, but do not finish a pending list read.
|
|
4706
|
-
if (!type)
|
|
4712
|
+
if (!type) {
|
|
4707
4713
|
scrollPaginationPendingRef.current = false;
|
|
4714
|
+
setIsScrollAppending(false);
|
|
4715
|
+
}
|
|
4708
4716
|
// INFO: a first page read afresh holds the rows added since the last one
|
|
4709
4717
|
if (!type && !(requestCond === null || requestCond === void 0 ? void 0 : requestCond.cursor) && !(requestCond === null || requestCond === void 0 ? void 0 : requestCond.skip))
|
|
4710
4718
|
handleSetPendingInserts(0);
|
|
@@ -5473,6 +5481,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5473
5481
|
props.organise.handleNavigate("list", "");
|
|
5474
5482
|
}
|
|
5475
5483
|
else {
|
|
5484
|
+
// INFO: a failed scroll read is finished too, so the "Loading for
|
|
5485
|
+
// more..." cue goes. The pending ref stays set: with the sentinel still
|
|
5486
|
+
// in view, clearing it would retry a failing read over and over
|
|
5487
|
+
setIsScrollAppending(false);
|
|
5476
5488
|
if ((_c = (_b = err.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.err)
|
|
5477
5489
|
console.log("Data Retrieval Error - " + typeof err.response.data.err === "object"
|
|
5478
5490
|
? JSON.stringify(err.response.data.err)
|
|
@@ -11812,6 +11824,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11812
11824
|
return false;
|
|
11813
11825
|
};
|
|
11814
11826
|
var renderScrollSentinel = function () {
|
|
11827
|
+
var _a;
|
|
11815
11828
|
if (!renderCheckScrollMode())
|
|
11816
11829
|
return null;
|
|
11817
11830
|
// INFO: when every group pages itself, the single global bottom sentinel is
|
|
@@ -11825,10 +11838,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11825
11838
|
return null;
|
|
11826
11839
|
// INFO: only show the append spinner once we already have rows. On the
|
|
11827
11840
|
// 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
|
-
|
|
11841
|
+
// ours too would mean two spinners on screen at the same time. The new
|
|
11842
|
+
// table says "Loading for more..." under its own last row instead, so it gets
|
|
11843
|
+
// none from here either.
|
|
11844
|
+
var isTableDrawn = !!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW) &&
|
|
11845
|
+
(!selectedTab ||
|
|
11846
|
+
selectedTab.id === "general" ||
|
|
11847
|
+
selectedTab.viewType === "report");
|
|
11848
|
+
var showAppendSpinner = !isTableDrawn &&
|
|
11849
|
+
(tableLoading || isScrollAppending) &&
|
|
11850
|
+
tableData.length > 0;
|
|
11830
11851
|
return (react_1.default.createElement("div", { className: "w-full flex flex-col items-center py-4" },
|
|
11831
|
-
showAppendSpinner && react_1.default.createElement(
|
|
11852
|
+
showAppendSpinner && (react_1.default.createElement("div", { "data-testid": "scroll-append-spinner" },
|
|
11853
|
+
react_1.default.createElement(loading_1.Loading, null))),
|
|
11832
11854
|
react_1.default.createElement("div", { ref: scrollSentinelRef, className: "h-1 w-full" })));
|
|
11833
11855
|
};
|
|
11834
11856
|
var renderTabs = function () {
|
|
@@ -12848,7 +12870,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12848
12870
|
? function (groupKey, page) {
|
|
12849
12871
|
return handleFetchGroupPage(groupKey, page);
|
|
12850
12872
|
}
|
|
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) ||
|
|
12873
|
+
: 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
12874
|
isFormulaView ||
|
|
12853
12875
|
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
12876
|
!((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareHideTableExtraMultipleAction)
|