@nivaro/react 0.3.43 → 0.3.45
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +38 -5
- package/dist/shared/components/CollectionBrowserView.js +1390 -1358
- package/dist/shared/components/DataTable.js +356 -334
- package/dist/shared/components/ProfileView.js +16 -21
- package/dist/shared/components/command-center/CommandCenterView.js +90 -355
- package/dist/shared/components/command-center/Header.js +70 -0
- package/dist/shared/components/command-center/PeekPanel.js +6 -0
- package/dist/shared/components/command-center/api.js +26 -0
- package/dist/shared/components/command-center/panels/AttentionPanel.js +6 -0
- package/dist/shared/components/command-center/panels/FeedPanel.js +33 -0
- package/dist/shared/components/command-center/panels/FlowPanel.js +61 -0
- package/dist/shared/components/command-center/panels/ForecastPanel.js +6 -0
- package/dist/shared/components/command-center/panels/MapPanel.js +74 -0
- package/dist/shared/components/command-center/panels/PartnersPanel.js +6 -0
- package/dist/shared/components/command-center/panels/PeoplePanel.js +47 -0
- package/dist/shared/components/command-center/panels/RegionPicker.js +6 -0
- package/dist/shared/components/command-center/panels/SystemPanel.js +53 -0
- package/dist/shared/components/command-center/panels/ThroughputPanel.js +6 -0
- package/dist/shared/components/command-center/panels/TimeBar.js +10 -0
- package/dist/shared/components/command-center/panels/TrafficPanel.js +11 -0
- package/dist/shared/components/command-center/panels/WorkloadPanel.js +6 -0
- package/dist/shared/components/command-center/panels/registry.js +28 -0
- package/dist/shared/components/command-center/state.js +12 -0
- package/dist/shared/components/command-center/theme.js +66 -0
- package/dist/shared/components/imports/ImportConsole.js +48 -47
- package/dist/shared/components/notifications/TestMyRules.js +39 -38
- package/dist/shared/components/profile/TeamsConnect.js +2 -2
- package/dist/shared/components/queue/QueueQuickFilters.js +81 -63
- package/dist/shared/components/queue/QueueWorklist.js +598 -586
- package/dist/shared/lib/quick-filter-cascade.js +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { get as f } from "./commands.js";
|
|
2
|
+
function s(i, l, o) {
|
|
3
|
+
const t = [];
|
|
4
|
+
for (const e of o) {
|
|
5
|
+
if (e.values.length === 0 || e.collection === i) continue;
|
|
6
|
+
const c = l.find(
|
|
7
|
+
(n) => n.many_collection === i && n.one_collection === e.collection && !n.junction_field && !!n.many_field
|
|
8
|
+
);
|
|
9
|
+
if (!c) continue;
|
|
10
|
+
const a = l.find(
|
|
11
|
+
(n) => n.many_collection === e.collection && n.one_collection === i && !n.junction_field
|
|
12
|
+
);
|
|
13
|
+
a && a.one_field && !c.one_field || t.push({
|
|
14
|
+
[c.many_field]: e.field === "id" ? { _in: e.values } : { [e.field]: { _in: e.values } }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return t.length === 0 ? null : t.length === 1 ? t[0] : { _and: t };
|
|
18
|
+
}
|
|
19
|
+
function d(i, l, o) {
|
|
20
|
+
return l.fetchQuery({
|
|
21
|
+
queryKey: ["cascade-relations", o],
|
|
22
|
+
queryFn: () => i.request(f(`/data-model/relations/for/${o}`)).then((t) => t.data ?? []).catch(() => []),
|
|
23
|
+
staleTime: 10 * 6e4
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
s as cascadeFilter,
|
|
28
|
+
d as fetchCascadeRelations
|
|
29
|
+
};
|