@quillsql/react 2.16.84 → 2.16.85
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/dist/index.cjs +21 -15
- package/dist/index.js +21 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20020,6 +20020,7 @@ function cloneResult(result) {
|
|
|
20020
20020
|
}
|
|
20021
20021
|
async function getOrFetchSharedRequest({
|
|
20022
20022
|
key,
|
|
20023
|
+
reportId,
|
|
20023
20024
|
signal,
|
|
20024
20025
|
fetcher
|
|
20025
20026
|
}) {
|
|
@@ -20028,6 +20029,7 @@ async function getOrFetchSharedRequest({
|
|
|
20028
20029
|
if (!entry) {
|
|
20029
20030
|
const controller = new AbortController();
|
|
20030
20031
|
entry = {
|
|
20032
|
+
reportId,
|
|
20031
20033
|
controller,
|
|
20032
20034
|
subscribers: 0,
|
|
20033
20035
|
settled: false,
|
|
@@ -20086,6 +20088,15 @@ async function getOrFetchSharedRequest({
|
|
|
20086
20088
|
);
|
|
20087
20089
|
});
|
|
20088
20090
|
}
|
|
20091
|
+
function evictSharedReportRequests(reportId) {
|
|
20092
|
+
for (const [key, entry] of entries) {
|
|
20093
|
+
if (entry.reportId !== reportId) continue;
|
|
20094
|
+
clearTimeout(entry.abortTimer);
|
|
20095
|
+
clearTimeout(entry.expiryTimer);
|
|
20096
|
+
if (!entry.settled) entry.controller.abort();
|
|
20097
|
+
entries.delete(key);
|
|
20098
|
+
}
|
|
20099
|
+
}
|
|
20089
20100
|
var ORPHAN_GRACE_MS, COMPLETED_TTL_MS, entries;
|
|
20090
20101
|
var init_reportRequestPool = __esm({
|
|
20091
20102
|
"src/utils/reportRequestPool.ts"() {
|
|
@@ -20718,6 +20729,7 @@ var init_dataFetcher = __esm({
|
|
|
20718
20729
|
const token = await getToken();
|
|
20719
20730
|
return getOrFetchSharedRequest({
|
|
20720
20731
|
key: createSharedRequestKey({ client, task, metadata, token }),
|
|
20732
|
+
reportId: metadata?.reportId === void 0 ? void 0 : String(metadata.reportId),
|
|
20721
20733
|
signal: abortSignal,
|
|
20722
20734
|
fetcher: (signal) => execute(signal, token)
|
|
20723
20735
|
});
|
|
@@ -27892,21 +27904,11 @@ var ContextProvider = ({
|
|
|
27892
27904
|
Object.values(
|
|
27893
27905
|
resp.sections ?? {}
|
|
27894
27906
|
).flat().forEach((report) => {
|
|
27895
|
-
|
|
27896
|
-
|
|
27897
|
-
|
|
27898
|
-
|
|
27899
|
-
|
|
27900
|
-
id: report.id,
|
|
27901
|
-
data: merged
|
|
27902
|
-
});
|
|
27903
|
-
} else {
|
|
27904
|
-
reportsDispatch({
|
|
27905
|
-
type: "ADD_REPORT",
|
|
27906
|
-
id: report.id,
|
|
27907
|
-
data: report
|
|
27908
|
-
});
|
|
27909
|
-
}
|
|
27907
|
+
reportsDispatch({
|
|
27908
|
+
type: "UPDATE_REPORT",
|
|
27909
|
+
id: report.id,
|
|
27910
|
+
data: report
|
|
27911
|
+
});
|
|
27910
27912
|
});
|
|
27911
27913
|
dashboardConfigDispatch({
|
|
27912
27914
|
type: "UPDATE_DASHBOARD",
|
|
@@ -62180,6 +62182,9 @@ function resolveReportFromCacheCab({
|
|
|
62180
62182
|
};
|
|
62181
62183
|
}
|
|
62182
62184
|
|
|
62185
|
+
// src/hooks/useForm.tsx
|
|
62186
|
+
init_reportRequestPool();
|
|
62187
|
+
|
|
62183
62188
|
// src/hooks/useForm.queries.ts
|
|
62184
62189
|
var QUERY_KEY_UNDEFINED = "__undefined__";
|
|
62185
62190
|
var QUERY_KEY_FUNCTION = "__function__";
|
|
@@ -71168,6 +71173,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71168
71173
|
).trim();
|
|
71169
71174
|
if (savedReportId && resp && resp.name !== "error" && !resp.error) {
|
|
71170
71175
|
await cacheCab.evictReport(savedReportId, tenants);
|
|
71176
|
+
evictSharedReportRequests(savedReportId);
|
|
71171
71177
|
await queryClient.invalidateQueries({
|
|
71172
71178
|
queryKey: ["quill", "dashboard-report", savedReportId],
|
|
71173
71179
|
refetchType: "none"
|
package/dist/index.js
CHANGED
|
@@ -20066,6 +20066,7 @@ function cloneResult(result) {
|
|
|
20066
20066
|
}
|
|
20067
20067
|
async function getOrFetchSharedRequest({
|
|
20068
20068
|
key,
|
|
20069
|
+
reportId,
|
|
20069
20070
|
signal,
|
|
20070
20071
|
fetcher
|
|
20071
20072
|
}) {
|
|
@@ -20074,6 +20075,7 @@ async function getOrFetchSharedRequest({
|
|
|
20074
20075
|
if (!entry) {
|
|
20075
20076
|
const controller = new AbortController();
|
|
20076
20077
|
entry = {
|
|
20078
|
+
reportId,
|
|
20077
20079
|
controller,
|
|
20078
20080
|
subscribers: 0,
|
|
20079
20081
|
settled: false,
|
|
@@ -20132,6 +20134,15 @@ async function getOrFetchSharedRequest({
|
|
|
20132
20134
|
);
|
|
20133
20135
|
});
|
|
20134
20136
|
}
|
|
20137
|
+
function evictSharedReportRequests(reportId) {
|
|
20138
|
+
for (const [key, entry] of entries) {
|
|
20139
|
+
if (entry.reportId !== reportId) continue;
|
|
20140
|
+
clearTimeout(entry.abortTimer);
|
|
20141
|
+
clearTimeout(entry.expiryTimer);
|
|
20142
|
+
if (!entry.settled) entry.controller.abort();
|
|
20143
|
+
entries.delete(key);
|
|
20144
|
+
}
|
|
20145
|
+
}
|
|
20135
20146
|
var ORPHAN_GRACE_MS, COMPLETED_TTL_MS, entries;
|
|
20136
20147
|
var init_reportRequestPool = __esm({
|
|
20137
20148
|
"src/utils/reportRequestPool.ts"() {
|
|
@@ -20764,6 +20775,7 @@ var init_dataFetcher = __esm({
|
|
|
20764
20775
|
const token = await getToken();
|
|
20765
20776
|
return getOrFetchSharedRequest({
|
|
20766
20777
|
key: createSharedRequestKey({ client, task, metadata, token }),
|
|
20778
|
+
reportId: metadata?.reportId === void 0 ? void 0 : String(metadata.reportId),
|
|
20767
20779
|
signal: abortSignal,
|
|
20768
20780
|
fetcher: (signal) => execute(signal, token)
|
|
20769
20781
|
});
|
|
@@ -27898,21 +27910,11 @@ var ContextProvider = ({
|
|
|
27898
27910
|
Object.values(
|
|
27899
27911
|
resp.sections ?? {}
|
|
27900
27912
|
).flat().forEach((report) => {
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
id: report.id,
|
|
27907
|
-
data: merged
|
|
27908
|
-
});
|
|
27909
|
-
} else {
|
|
27910
|
-
reportsDispatch({
|
|
27911
|
-
type: "ADD_REPORT",
|
|
27912
|
-
id: report.id,
|
|
27913
|
-
data: report
|
|
27914
|
-
});
|
|
27915
|
-
}
|
|
27913
|
+
reportsDispatch({
|
|
27914
|
+
type: "UPDATE_REPORT",
|
|
27915
|
+
id: report.id,
|
|
27916
|
+
data: report
|
|
27917
|
+
});
|
|
27916
27918
|
});
|
|
27917
27919
|
dashboardConfigDispatch({
|
|
27918
27920
|
type: "UPDATE_DASHBOARD",
|
|
@@ -62388,6 +62390,9 @@ function resolveReportFromCacheCab({
|
|
|
62388
62390
|
};
|
|
62389
62391
|
}
|
|
62390
62392
|
|
|
62393
|
+
// src/hooks/useForm.tsx
|
|
62394
|
+
init_reportRequestPool();
|
|
62395
|
+
|
|
62391
62396
|
// src/hooks/useForm.queries.ts
|
|
62392
62397
|
var QUERY_KEY_UNDEFINED = "__undefined__";
|
|
62393
62398
|
var QUERY_KEY_FUNCTION = "__function__";
|
|
@@ -71376,6 +71381,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71376
71381
|
).trim();
|
|
71377
71382
|
if (savedReportId && resp && resp.name !== "error" && !resp.error) {
|
|
71378
71383
|
await cacheCab.evictReport(savedReportId, tenants);
|
|
71384
|
+
evictSharedReportRequests(savedReportId);
|
|
71379
71385
|
await queryClient.invalidateQueries({
|
|
71380
71386
|
queryKey: ["quill", "dashboard-report", savedReportId],
|
|
71381
71387
|
refetchType: "none"
|