openxiangda 1.0.249 → 1.0.251
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/package.json +2 -1
- package/packages/sdk/dist/runtime/index.cjs +29 -5
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +1 -1
- package/packages/sdk/dist/runtime/index.d.ts +1 -1
- package/packages/sdk/dist/runtime/index.mjs +29 -5
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +29 -5
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +4 -1
- package/packages/sdk/dist/runtime/react.d.ts +4 -1
- package/packages/sdk/dist/runtime/react.mjs +29 -5
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/packages/sdk/source/admin-list/AdminList.tsx +28 -2
|
@@ -34115,6 +34115,11 @@ var isRecord = (value) => typeof value === "object" && value !== null && !Array.
|
|
|
34115
34115
|
var isSearchRuleLike = (value) => isRecord(value) && typeof value.key === "string" && (value.componentName === void 0 || typeof value.componentName === "string");
|
|
34116
34116
|
var isBlobLike = (value) => typeof Blob !== "undefined" && value instanceof Blob;
|
|
34117
34117
|
var nowMs = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
34118
|
+
var dynamicReadSequence = 0;
|
|
34119
|
+
var nextDynamicReadNonce = () => {
|
|
34120
|
+
dynamicReadSequence = (dynamicReadSequence + 1) % Number.MAX_SAFE_INTEGER;
|
|
34121
|
+
return `${Date.now().toString(36)}-${dynamicReadSequence.toString(36)}`;
|
|
34122
|
+
};
|
|
34118
34123
|
var normalizeMethod = (value) => {
|
|
34119
34124
|
const method = String(value || "get").toLowerCase();
|
|
34120
34125
|
if (method === "get" || method === "post" || method === "put" || method === "delete" || method === "patch") {
|
|
@@ -34720,7 +34725,8 @@ var createPageSdk = (context) => {
|
|
|
34720
34725
|
method: normalizeMethod(options.method),
|
|
34721
34726
|
query: serializeQuery(options.query),
|
|
34722
34727
|
body: options.body,
|
|
34723
|
-
headers: options.headers
|
|
34728
|
+
headers: options.headers,
|
|
34729
|
+
...options.cache ? { cache: options.cache } : {}
|
|
34724
34730
|
};
|
|
34725
34731
|
const traceEnabled = isRequestTracingEnabled(context, options);
|
|
34726
34732
|
const traceLabel = options.traceLabel || `${payload.method.toUpperCase()} ${payload.path}`;
|
|
@@ -35018,6 +35024,8 @@ var createPageSdk = (context) => {
|
|
|
35018
35024
|
"/v1/form/advancedSearch.json"
|
|
35019
35025
|
),
|
|
35020
35026
|
method: "get",
|
|
35027
|
+
cache: "no-store",
|
|
35028
|
+
dedupe: false,
|
|
35021
35029
|
query: {
|
|
35022
35030
|
formUuid: params.formUuid,
|
|
35023
35031
|
filters: serializeSearchExpression(params.filters),
|
|
@@ -35026,7 +35034,8 @@ var createPageSdk = (context) => {
|
|
|
35026
35034
|
currentPage: params.currentPage,
|
|
35027
35035
|
pageSize: params.pageSize,
|
|
35028
35036
|
order: normalizeAdvancedOrder(params.order),
|
|
35029
|
-
instanceStatus: params.instanceStatus
|
|
35037
|
+
instanceStatus: params.instanceStatus,
|
|
35038
|
+
_oxCacheBust: nextDynamicReadNonce()
|
|
35030
35039
|
}
|
|
35031
35040
|
}),
|
|
35032
35041
|
advancedExport: (params) => download({
|
|
@@ -37794,7 +37803,8 @@ var createBrowserPageBridge = (options = {}) => {
|
|
|
37794
37803
|
method: normalizeMethod2(payload.method),
|
|
37795
37804
|
headers,
|
|
37796
37805
|
body,
|
|
37797
|
-
credentials: "include"
|
|
37806
|
+
credentials: "include",
|
|
37807
|
+
cache: payload.cache
|
|
37798
37808
|
}, {
|
|
37799
37809
|
enabled: shouldRetryTransportRequest(payload)
|
|
37800
37810
|
});
|
|
@@ -43579,6 +43589,19 @@ var queryFingerprint = (query, sourceKey) => JSON.stringify({
|
|
|
43579
43589
|
fixedFilters: query.fixedFilters,
|
|
43580
43590
|
sorts: query.sorts
|
|
43581
43591
|
});
|
|
43592
|
+
var positiveInteger = (value, fallback) => {
|
|
43593
|
+
const numberValue = Number(value);
|
|
43594
|
+
return Number.isFinite(numberValue) && numberValue > 0 ? Math.floor(numberValue) : fallback;
|
|
43595
|
+
};
|
|
43596
|
+
var reconcileResultTotal = (result, query, rows) => {
|
|
43597
|
+
const reportedTotal = Number(result.total);
|
|
43598
|
+
const normalizedReportedTotal = Number.isFinite(reportedTotal) ? Math.max(0, reportedTotal) : 0;
|
|
43599
|
+
if (!rows.length) return normalizedReportedTotal;
|
|
43600
|
+
const currentPage = positiveInteger(result.currentPage, query.currentPage);
|
|
43601
|
+
const pageSize = positiveInteger(result.pageSize, query.pageSize);
|
|
43602
|
+
const visibleRowsLowerBound = (currentPage - 1) * pageSize + rows.length;
|
|
43603
|
+
return Math.max(normalizedReportedTotal, visibleRowsLowerBound);
|
|
43604
|
+
};
|
|
43582
43605
|
var getRowKey = (rowKey, row) => {
|
|
43583
43606
|
if (typeof rowKey === "function") return rowKey(row);
|
|
43584
43607
|
return row[rowKey];
|
|
@@ -43895,8 +43918,9 @@ function AdminList(props) {
|
|
|
43895
43918
|
try {
|
|
43896
43919
|
const result = await requestedDataSource.query(query);
|
|
43897
43920
|
if (!isCurrentRequest()) return;
|
|
43898
|
-
|
|
43899
|
-
|
|
43921
|
+
const resultRows = Array.isArray(result.rows) ? result.rows : [];
|
|
43922
|
+
setRows(resultRows);
|
|
43923
|
+
setTotal(reconcileResultTotal(result, query, resultRows));
|
|
43900
43924
|
setAllowedColumnKeys(result.allowedColumnKeys);
|
|
43901
43925
|
setHiddenFieldsCount(Math.max(0, Number(result.hiddenFieldsCount || 0)));
|
|
43902
43926
|
} catch (requestError) {
|