@quillsql/react 2.12.19 → 2.12.21
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/cjs/Chart.d.ts +2 -1
- package/dist/cjs/Chart.d.ts.map +1 -1
- package/dist/cjs/Chart.js +117 -105
- package/dist/cjs/ChartBuilder.d.ts +4 -2
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +28 -13
- package/dist/cjs/ChartEditor.d.ts +1 -1
- package/dist/cjs/ChartEditor.d.ts.map +1 -1
- package/dist/cjs/ChartEditor.js +20 -12
- package/dist/cjs/Context.d.ts +0 -9
- package/dist/cjs/Context.d.ts.map +1 -1
- package/dist/cjs/Context.js +15 -43
- package/dist/cjs/Dashboard.d.ts +16 -3
- package/dist/cjs/Dashboard.d.ts.map +1 -1
- package/dist/cjs/Dashboard.js +64 -65
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/Table.d.ts.map +1 -1
- package/dist/cjs/Table.js +11 -4
- package/dist/cjs/components/Chart/BarChart.d.ts +2 -1
- package/dist/cjs/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/BarChart.js +2 -2
- package/dist/cjs/components/Chart/ChartTooltip.d.ts +1 -0
- package/dist/cjs/components/Chart/ChartTooltip.d.ts.map +1 -1
- package/dist/cjs/components/Chart/ChartTooltip.js +3 -4
- package/dist/cjs/components/Chart/LineChart.d.ts +2 -1
- package/dist/cjs/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/LineChart.js +2 -2
- package/dist/cjs/components/Dashboard/ChartComponent.d.ts +1 -1
- package/dist/cjs/components/Dashboard/ChartComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/ChartComponent.js +10 -4
- package/dist/cjs/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DashboardFilter.js +3 -18
- package/dist/cjs/components/Dashboard/DataLoader.d.ts +6 -4
- package/dist/cjs/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DataLoader.js +48 -32
- package/dist/cjs/components/Dashboard/MetricComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/MetricComponent.js +27 -43
- package/dist/cjs/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/TableComponent.js +28 -52
- package/dist/cjs/hooks/useDashboard.d.ts.map +1 -1
- package/dist/cjs/hooks/useDashboard.js +3 -2
- package/dist/cjs/hooks/useQuill.d.ts +7 -0
- package/dist/cjs/hooks/useQuill.d.ts.map +1 -1
- package/dist/cjs/hooks/useQuill.js +43 -4
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/internals/ReportBuilder/PivotList.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts +8 -3
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.js +32 -12
- package/dist/cjs/utils/aggregate.d.ts.map +1 -1
- package/dist/cjs/utils/aggregate.js +0 -4
- package/dist/cjs/utils/dashboard.d.ts +2 -2
- package/dist/cjs/utils/dashboard.d.ts.map +1 -1
- package/dist/cjs/utils/dashboard.js +16 -11
- package/dist/cjs/utils/dates.d.ts.map +1 -1
- package/dist/cjs/utils/dates.js +7 -4
- package/dist/esm/Chart.d.ts +2 -1
- package/dist/esm/Chart.d.ts.map +1 -1
- package/dist/esm/Chart.js +116 -105
- package/dist/esm/ChartBuilder.d.ts +4 -2
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +29 -14
- package/dist/esm/ChartEditor.d.ts +1 -1
- package/dist/esm/ChartEditor.d.ts.map +1 -1
- package/dist/esm/ChartEditor.js +21 -13
- package/dist/esm/Context.d.ts +0 -9
- package/dist/esm/Context.d.ts.map +1 -1
- package/dist/esm/Context.js +14 -40
- package/dist/esm/Dashboard.d.ts +16 -3
- package/dist/esm/Dashboard.d.ts.map +1 -1
- package/dist/esm/Dashboard.js +66 -67
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/Table.d.ts.map +1 -1
- package/dist/esm/Table.js +12 -5
- package/dist/esm/components/Chart/BarChart.d.ts +2 -1
- package/dist/esm/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/BarChart.js +2 -2
- package/dist/esm/components/Chart/ChartTooltip.d.ts +1 -0
- package/dist/esm/components/Chart/ChartTooltip.d.ts.map +1 -1
- package/dist/esm/components/Chart/ChartTooltip.js +3 -4
- package/dist/esm/components/Chart/LineChart.d.ts +2 -1
- package/dist/esm/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/LineChart.js +2 -2
- package/dist/esm/components/Dashboard/ChartComponent.d.ts +1 -1
- package/dist/esm/components/Dashboard/ChartComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/ChartComponent.js +7 -4
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DashboardFilter.js +3 -18
- package/dist/esm/components/Dashboard/DataLoader.d.ts +6 -4
- package/dist/esm/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DataLoader.js +49 -33
- package/dist/esm/components/Dashboard/MetricComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/MetricComponent.js +28 -44
- package/dist/esm/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/TableComponent.js +29 -53
- package/dist/esm/hooks/useDashboard.d.ts.map +1 -1
- package/dist/esm/hooks/useDashboard.js +3 -2
- package/dist/esm/hooks/useQuill.d.ts +7 -0
- package/dist/esm/hooks/useQuill.d.ts.map +1 -1
- package/dist/esm/hooks/useQuill.js +41 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/internals/ReportBuilder/PivotList.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotList.js +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +8 -3
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.js +32 -12
- package/dist/esm/utils/aggregate.d.ts.map +1 -1
- package/dist/esm/utils/aggregate.js +0 -4
- package/dist/esm/utils/dashboard.d.ts +2 -2
- package/dist/esm/utils/dashboard.d.ts.map +1 -1
- package/dist/esm/utils/dashboard.js +16 -11
- package/dist/esm/utils/dates.d.ts.map +1 -1
- package/dist/esm/utils/dates.js +7 -4
- package/package.json +1 -1
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { COMPARISON_OPTIONS } from '../../DateRangePicker/dateRangePickerUtils';
|
|
4
|
-
import { useComparisonRange, useDateFilter } from '../../Context';
|
|
5
4
|
import { QuillMultiSelectComponent } from '../QuillMultiSelect';
|
|
6
5
|
import { QuillSelectComponent } from '../QuillSelect';
|
|
7
6
|
export function DashboardFilter({ filter, onChangeFilter, SelectComponent = QuillSelectComponent, MultiSelectComponent = QuillMultiSelectComponent, DateRangePickerComponent, theme, }) {
|
|
8
|
-
const { comparisonRange, setComparisonRange } = useComparisonRange();
|
|
9
|
-
const { setDateFilter } = useDateFilter();
|
|
10
7
|
const [filterValue, setFilterValue] = useState(null);
|
|
11
8
|
useEffect(() => {
|
|
12
9
|
if (filter.filterType === 'string') {
|
|
@@ -17,18 +14,6 @@ export function DashboardFilter({ filter, onChangeFilter, SelectComponent = Quil
|
|
|
17
14
|
setFilterValue(filter.selectedValue);
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
if (filter.filterType === 'date_range') {
|
|
21
|
-
setDateFilter(filter.preset.label);
|
|
22
|
-
if (filter?.comparisonRange?.value) {
|
|
23
|
-
const newComparisonRange = COMPARISON_OPTIONS.find((option) => {
|
|
24
|
-
return option.value === filter.comparisonRange.value;
|
|
25
|
-
});
|
|
26
|
-
setComparisonRange(newComparisonRange);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
setComparisonRange(null);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
17
|
}, [filter]);
|
|
33
18
|
if (filter.filterType === 'string') {
|
|
34
19
|
if (!filter.options) {
|
|
@@ -38,7 +23,7 @@ export function DashboardFilter({ filter, onChangeFilter, SelectComponent = Quil
|
|
|
38
23
|
return (_jsx(MultiSelectComponent, { label: filter.label, value: filterValue, onChange: (e) => {
|
|
39
24
|
if (e.target.value === '') {
|
|
40
25
|
setFilterValue(null);
|
|
41
|
-
onChangeFilter(filter,
|
|
26
|
+
onChangeFilter(filter, '[]');
|
|
42
27
|
return;
|
|
43
28
|
}
|
|
44
29
|
const jsonValue = JSON.parse(e.target.value);
|
|
@@ -72,7 +57,7 @@ export function DashboardFilter({ filter, onChangeFilter, SelectComponent = Quil
|
|
|
72
57
|
onChangeFilter(filter, { preset: e.target.value });
|
|
73
58
|
}, presetOptions: filter.options.map((option) => {
|
|
74
59
|
return { label: option.label, value: option.label };
|
|
75
|
-
}), selectWidth: 200 }),
|
|
60
|
+
}), selectWidth: 200 }), filter.comparison && (_jsxs("div", { style: {
|
|
76
61
|
display: 'flex',
|
|
77
62
|
flexDirection: 'row',
|
|
78
63
|
alignItems: 'center',
|
|
@@ -88,7 +73,7 @@ export function DashboardFilter({ filter, onChangeFilter, SelectComponent = Quil
|
|
|
88
73
|
whiteSpace: 'nowrap',
|
|
89
74
|
minWidth: 80,
|
|
90
75
|
justifyContent: 'center',
|
|
91
|
-
}, children: "compared to" }), _jsx(SelectComponent, { value: comparisonRange.value, onChange: (e) => {
|
|
76
|
+
}, children: "compared to" }), _jsx(SelectComponent, { value: filter.comparisonRange.value, onChange: (e) => {
|
|
92
77
|
onChangeFilter(filter, null, COMPARISON_OPTIONS.find((option) => option.value === e.target.value));
|
|
93
78
|
}, options: COMPARISON_OPTIONS.map((compareOption) => ({
|
|
94
79
|
value: compareOption.value,
|
|
@@ -12,10 +12,12 @@ export type DataLoaderChildProps = {
|
|
|
12
12
|
field: string;
|
|
13
13
|
direction: string;
|
|
14
14
|
}) => void;
|
|
15
|
+
data?: any;
|
|
15
16
|
};
|
|
16
|
-
export default function DataLoader({ id, children, }: {
|
|
17
|
+
export default function DataLoader({ id, children, filters, }: {
|
|
17
18
|
id: string;
|
|
18
|
-
|
|
19
|
+
filters?: any;
|
|
20
|
+
children: ({ isLoading, error, onPageChange, onSortChange, data, }: DataLoaderChildProps) => JSX.Element;
|
|
19
21
|
}): JSX.Element;
|
|
20
22
|
type ColorMapType = {
|
|
21
23
|
[key: string]: {
|
|
@@ -33,13 +35,13 @@ export type ChartDataLoaderChildProps = {
|
|
|
33
35
|
data?: any;
|
|
34
36
|
dateBucket?: string;
|
|
35
37
|
};
|
|
36
|
-
export declare const ChartDataLoader: ({ id, children, hideDateRangeFilter, dateBucket,
|
|
38
|
+
export declare const ChartDataLoader: ({ id, children, hideDateRangeFilter, dateBucket, additionalProcessing, filters, }: {
|
|
37
39
|
id: string;
|
|
38
40
|
hideDateRangeFilter?: boolean | undefined;
|
|
39
41
|
dateBucket?: string | undefined;
|
|
40
42
|
mapColorsToFields?: ((_report: QuillReport, _theme: QuillTheme) => ColorMapType) | undefined;
|
|
41
|
-
limit?: number | undefined;
|
|
42
43
|
additionalProcessing?: any;
|
|
44
|
+
filters?: any;
|
|
43
45
|
children: ({ isLoading, error, data, dateBucket, }: ChartDataLoaderChildProps) => JSX.Element;
|
|
44
46
|
}) => JSX.Element;
|
|
45
47
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/DataLoader.tsx"],"names":[],"mappings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AAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,eAAe;QAQtB,MAAM;;;mCAIC,WAAW,UACZ,UAAU,KACf,YAAY;2BACM,GAAG;cAChB,GAAG;wDAMV,yBAAyB,KAAK,WAAW;MAC1C,WAuGH,CAAC"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useContext, useEffect, useState } from 'react';
|
|
3
3
|
import { didFiltersChange } from '../../Chart';
|
|
4
|
-
import { ClientContext, CustomFieldContext, DashboardContext,
|
|
4
|
+
import { ClientContext, CustomFieldContext, DashboardContext, } from '../../Context';
|
|
5
5
|
import { useTheme } from '../../hooks';
|
|
6
6
|
import { getData } from '../../utils/dataFetcher';
|
|
7
7
|
import { mergeComparisonRange } from '../../utils/merge';
|
|
8
8
|
import { processFilterErrorList } from '../../utils/errorProcessing';
|
|
9
|
-
|
|
9
|
+
import { cleanDashboardItem } from '../../utils/dashboard';
|
|
10
|
+
export default function DataLoader({ id, children, filters, }) {
|
|
10
11
|
const [client, _] = useContext(ClientContext);
|
|
11
12
|
const { dispatch, dashboard } = useContext(DashboardContext);
|
|
12
|
-
const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
13
|
+
// const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
13
14
|
const [customFields] = useContext(CustomFieldContext);
|
|
14
15
|
const [isLoading, setIsLoading] = useState(true);
|
|
15
16
|
const [isPaginationLoading, setIsPaginationLoading] = useState(true);
|
|
16
17
|
const [error, setError] = useState(undefined);
|
|
17
18
|
const [previousPage, setPreviousPage] = useState(0);
|
|
19
|
+
const [report, setReport] = useState(dashboard[id]);
|
|
18
20
|
const [additionalProcessing, setAdditionProcessing] = useState({
|
|
19
21
|
page: 0,
|
|
20
22
|
});
|
|
@@ -32,11 +34,14 @@ export default function DataLoader({ id, children, }) {
|
|
|
32
34
|
setPreviousPage(0);
|
|
33
35
|
};
|
|
34
36
|
const getChartOptions = async (processing) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
if (!didFiltersChange(dashboard[id], filters) &&
|
|
38
|
+
!isLoading &&
|
|
39
|
+
!dashboard[id].triggerReload) {
|
|
37
40
|
setIsLoading(false);
|
|
41
|
+
setReport(dashboard[id]);
|
|
38
42
|
return;
|
|
39
43
|
}
|
|
44
|
+
setIsLoading(true);
|
|
40
45
|
try {
|
|
41
46
|
let updatedProcessing = { ...additionalProcessing, ...processing };
|
|
42
47
|
if (processing && processing.sort) {
|
|
@@ -46,8 +51,8 @@ export default function DataLoader({ id, children, }) {
|
|
|
46
51
|
updatedProcessing.page.currentPage = 0;
|
|
47
52
|
}
|
|
48
53
|
// Remove extra fields on each filter so we don't confuse the backend.
|
|
49
|
-
const minimalFilters = Object.values(
|
|
50
|
-
? Object.values(
|
|
54
|
+
const minimalFilters = Object.values(filters).length
|
|
55
|
+
? Object.values(filters).map((filter) => {
|
|
51
56
|
const newFilter = { ...filter };
|
|
52
57
|
if (newFilter.filterType === 'date_range') {
|
|
53
58
|
delete newFilter['field'];
|
|
@@ -80,15 +85,14 @@ export default function DataLoader({ id, children, }) {
|
|
|
80
85
|
if (resp.compareRows) {
|
|
81
86
|
mergeComparisonRange(resp);
|
|
82
87
|
}
|
|
88
|
+
const dashboardItem = { ...resp, filtersApplied: filters };
|
|
89
|
+
const cleanedReport = cleanDashboardItem(dashboardItem, filters);
|
|
83
90
|
dispatch({
|
|
84
91
|
type: 'UPDATE_DASHBOARD_ITEM',
|
|
85
92
|
id: id,
|
|
86
|
-
data: {
|
|
87
|
-
...resp,
|
|
88
|
-
filtersApplied: dashboardFilters,
|
|
89
|
-
id: resp._id,
|
|
90
|
-
},
|
|
93
|
+
data: { ...cleanedReport, triggerReload: false },
|
|
91
94
|
});
|
|
95
|
+
setReport(cleanedReport);
|
|
92
96
|
}
|
|
93
97
|
else {
|
|
94
98
|
setError(resp?.errorMessage);
|
|
@@ -105,32 +109,33 @@ export default function DataLoader({ id, children, }) {
|
|
|
105
109
|
};
|
|
106
110
|
useEffect(() => {
|
|
107
111
|
getChartOptions();
|
|
108
|
-
}, [
|
|
109
|
-
return _jsx(_Fragment, { children: children({
|
|
112
|
+
}, [filters, id, dashboard[id]]);
|
|
113
|
+
return (_jsx(_Fragment, { children: children({
|
|
114
|
+
isLoading,
|
|
115
|
+
error,
|
|
116
|
+
onPageChange,
|
|
117
|
+
onSortChange,
|
|
118
|
+
data: report ?? undefined,
|
|
119
|
+
}) }));
|
|
110
120
|
}
|
|
111
121
|
// The same data-loader pattern as above, but with special logic for charts
|
|
112
122
|
// At some point these may be able to get merged into one function.
|
|
113
|
-
export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dateBucket,
|
|
123
|
+
export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dateBucket, additionalProcessing, filters, }) => {
|
|
114
124
|
const { dispatch, dashboard } = useContext(DashboardContext);
|
|
115
|
-
const
|
|
116
|
-
const [initialLoad, setInitialLoad] = useState(true);
|
|
125
|
+
// const [initialLoad, setInitialLoad] = useState(true);
|
|
117
126
|
const [loading, setLoading] = useState(false);
|
|
118
127
|
const [error, setError] = useState(undefined);
|
|
119
128
|
const [isComparison, setIsComparison] = useState(false);
|
|
129
|
+
const [report, setReport] = useState(dashboard[id]);
|
|
120
130
|
const [client, _] = useContext(ClientContext);
|
|
121
131
|
const [customFields] = useContext(CustomFieldContext);
|
|
122
132
|
const theme = useTheme();
|
|
123
133
|
const getChartOptions = async () => {
|
|
124
|
-
setLoading(true);
|
|
125
|
-
if (!didFiltersChange(dashboard[id], dashboardFilters)) {
|
|
126
|
-
setLoading(false);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
134
|
try {
|
|
130
135
|
// Remove extra fields on each filter so we don't confuse the backend.
|
|
131
136
|
const allowDateRange = !hideDateRangeFilter;
|
|
132
|
-
const minimalFilters = Object.values(
|
|
133
|
-
? Object.values(
|
|
137
|
+
const minimalFilters = Object.values(filters).length
|
|
138
|
+
? Object.values(filters)
|
|
134
139
|
.filter((f) => allowDateRange || f.filterType !== 'date_range')
|
|
135
140
|
.map((filter) => {
|
|
136
141
|
const newFilter = { ...filter };
|
|
@@ -142,6 +147,14 @@ export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dat
|
|
|
142
147
|
return newFilter;
|
|
143
148
|
})
|
|
144
149
|
: [];
|
|
150
|
+
if (!didFiltersChange(dashboard[id], filters) &&
|
|
151
|
+
!loading &&
|
|
152
|
+
!dashboard[id].triggerReload) {
|
|
153
|
+
setLoading(false);
|
|
154
|
+
setReport(dashboard[id]);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
setLoading(true);
|
|
145
158
|
const hostedBody = {
|
|
146
159
|
metadata: {
|
|
147
160
|
dashboardItemId: id,
|
|
@@ -149,15 +162,14 @@ export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dat
|
|
|
149
162
|
clientId: client.publicKey,
|
|
150
163
|
task: 'item',
|
|
151
164
|
databaseType: client.databaseType,
|
|
152
|
-
filters:
|
|
165
|
+
filters: filters,
|
|
153
166
|
customFields,
|
|
154
|
-
runQueryConfig: limit ? { limitBy: limit } : undefined,
|
|
155
167
|
additionalProcessing,
|
|
156
168
|
},
|
|
157
169
|
};
|
|
158
170
|
const cloudBody = {
|
|
159
171
|
id: id,
|
|
160
|
-
filters:
|
|
172
|
+
filters: filters,
|
|
161
173
|
};
|
|
162
174
|
setError(undefined);
|
|
163
175
|
const resp = await getData(client, 'itempost', 'omit', hostedBody, cloudBody);
|
|
@@ -167,11 +179,13 @@ export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dat
|
|
|
167
179
|
if (resp.compareRows) {
|
|
168
180
|
mergeComparisonRange(resp);
|
|
169
181
|
}
|
|
170
|
-
const dashboardItem = { ...resp, filtersApplied:
|
|
182
|
+
const dashboardItem = { ...resp, filtersApplied: filters };
|
|
183
|
+
const cleanedReport = cleanDashboardItem(dashboardItem, filters);
|
|
184
|
+
setReport(cleanedReport);
|
|
171
185
|
dispatch({
|
|
172
186
|
type: 'UPDATE_DASHBOARD_ITEM',
|
|
173
187
|
id: id,
|
|
174
|
-
data:
|
|
188
|
+
data: { ...cleanedReport, triggerReload: false },
|
|
175
189
|
});
|
|
176
190
|
}
|
|
177
191
|
else {
|
|
@@ -185,12 +199,14 @@ export const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, dat
|
|
|
185
199
|
}
|
|
186
200
|
};
|
|
187
201
|
useEffect(() => {
|
|
188
|
-
|
|
202
|
+
if (loading) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
189
205
|
getChartOptions();
|
|
190
|
-
}, [
|
|
206
|
+
}, [filters, id, dashboard[id]]);
|
|
191
207
|
return children({
|
|
192
|
-
isLoading: loading
|
|
193
|
-
data:
|
|
208
|
+
isLoading: loading,
|
|
209
|
+
data: report ?? undefined,
|
|
194
210
|
error,
|
|
195
211
|
dateBucket,
|
|
196
212
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/MetricComponent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AASnD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,MAAM,EACN,OAAO,EACP,KAAK,EACL,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"MetricComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/MetricComponent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AASnD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,MAAM,EACN,OAAO,EACP,KAAK,EACL,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAwPhC"}
|
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
3
|
import { COMPARISON_OPTIONS } from '../../DateRangePicker/dateRangePickerUtils';
|
|
4
4
|
import { valueFormatter } from '../../utils/valueFormatter';
|
|
5
5
|
import ChartError from '../Chart/ChartError';
|
|
6
6
|
import ChartSkeleton from '../Chart/ChartSkeleton';
|
|
7
|
-
import { generatePivotTable } from '../../internals/ReportBuilder/PivotModal';
|
|
8
|
-
import { DashboardFiltersContext } from '../../Context';
|
|
9
7
|
import { useTheme } from '../../hooks';
|
|
8
|
+
import { usePivot } from '../../hooks/useQuill';
|
|
10
9
|
export default function QuillMetricComponent({ report, onClick, error, isLoading, }) {
|
|
11
10
|
const theme = useTheme();
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
? { start: dateFilter.startDate, end: dateFilter.endDate }
|
|
23
|
-
: undefined, Boolean(dateFilter?.comparisonRange?.startDate), -1, dateFilter?.comparisonRange?.startDate &&
|
|
24
|
-
dateFilter?.comparisonRange?.endDate
|
|
25
|
-
? {
|
|
26
|
-
start: dateFilter.comparisonRange.startDate,
|
|
27
|
-
end: dateFilter.comparisonRange.endDate,
|
|
28
|
-
}
|
|
29
|
-
: undefined)
|
|
30
|
-
: null;
|
|
31
|
-
}, [config?.pivot]);
|
|
32
|
-
const primaryMetricLabel = data?.filtersApplied?.date_range?.preset?.label;
|
|
33
|
-
const comparisonKey = data?.filtersApplied?.date_range?.comparisonRange?.value;
|
|
11
|
+
const dateFilter = report?.filtersApplied?.find((filter) => filter.filterType == 'date_range');
|
|
12
|
+
const [rows, setRows] = useState(report?.rows ?? []);
|
|
13
|
+
const pivotData = usePivot(report.id);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (pivotData.data) {
|
|
16
|
+
setRows(pivotData.data.rows);
|
|
17
|
+
}
|
|
18
|
+
}, [pivotData]);
|
|
19
|
+
const primaryMetricLabel = report?.filtersApplied?.date_range?.preset?.label;
|
|
20
|
+
const comparisonKey = report?.filtersApplied?.date_range?.comparisonRange?.value;
|
|
34
21
|
const comparisonLabel = COMPARISON_OPTIONS.find((opt) => opt.value === comparisonKey)?.text;
|
|
35
|
-
const rows = pivotTable?.rows ?? data.rows ?? [];
|
|
36
|
-
const isComparison = rows.length > 0 &&
|
|
37
|
-
Object.keys(rows[0]).includes(`comparison_${data.xAxisField}`);
|
|
38
22
|
return (_jsx("div", { onClick: () => onClick && onClick(report), style: {
|
|
39
23
|
cursor: 'pointer',
|
|
40
24
|
boxSizing: 'content-box',
|
|
@@ -72,7 +56,7 @@ export default function QuillMetricComponent({ report, onClick, error, isLoading
|
|
|
72
56
|
display: 'block',
|
|
73
57
|
maxWidth: '100%',
|
|
74
58
|
overflow: 'hidden',
|
|
75
|
-
}, children: report?.name }), onClick ? (_jsx("div", { style: {
|
|
59
|
+
}, children: report?.name }), onClick && report?.name ? (_jsx("div", { style: {
|
|
76
60
|
fontFamily: theme.fontFamily,
|
|
77
61
|
color: theme.primaryTextColor,
|
|
78
62
|
boxSizing: 'content-box',
|
|
@@ -85,7 +69,7 @@ export default function QuillMetricComponent({ report, onClick, error, isLoading
|
|
|
85
69
|
}, children: 'view report →' })) : null] }), isLoading ? (_jsx(ChartSkeleton, { containerStyle: {
|
|
86
70
|
maxHeight: '78px',
|
|
87
71
|
height: '100%',
|
|
88
|
-
} })) : error ? (_jsx(ChartError, {})) : rows?.length === 0 || rows[0][
|
|
72
|
+
} })) : error ? (_jsx(ChartError, {})) : rows?.length === 0 || rows[0][report.xAxisField] === null ? (_jsx("div", { style: {
|
|
89
73
|
display: 'flex',
|
|
90
74
|
flex: '1 0 auto',
|
|
91
75
|
height: '100%',
|
|
@@ -124,17 +108,17 @@ export default function QuillMetricComponent({ report, onClick, error, isLoading
|
|
|
124
108
|
marginRight: 'auto',
|
|
125
109
|
}, children: [_jsx("span", { children: rows.length > 0 &&
|
|
126
110
|
valueFormatter({
|
|
127
|
-
value: rows[0][
|
|
128
|
-
field:
|
|
111
|
+
value: rows[0][report.xAxisField] ?? 0,
|
|
112
|
+
field: report.xAxisField,
|
|
129
113
|
fields: [
|
|
130
114
|
{
|
|
131
|
-
field:
|
|
132
|
-
format:
|
|
133
|
-
label:
|
|
134
|
-
_id:
|
|
115
|
+
field: report.xAxisField,
|
|
116
|
+
format: report.xAxisFormat,
|
|
117
|
+
label: report.xAxisLabel,
|
|
118
|
+
_id: report.id || 'dummy',
|
|
135
119
|
},
|
|
136
120
|
],
|
|
137
|
-
}) }),
|
|
121
|
+
}) }), dateFilter?.comparison && (_jsx("span", { style: {
|
|
138
122
|
fontSize: 13,
|
|
139
123
|
fontWeight: '500',
|
|
140
124
|
fontFamily: theme?.fontFamily,
|
|
@@ -142,7 +126,7 @@ export default function QuillMetricComponent({ report, onClick, error, isLoading
|
|
|
142
126
|
marginLeft: 2,
|
|
143
127
|
}, children: primaryMetricLabel
|
|
144
128
|
? `in ${primaryMetricLabel.toLowerCase()}`
|
|
145
|
-
: 'this period' }))] }),
|
|
129
|
+
: 'this period' }))] }), dateFilter?.comparison && (_jsxs("div", { style: {
|
|
146
130
|
display: 'flex',
|
|
147
131
|
gap: 4,
|
|
148
132
|
alignItems: 'baseline',
|
|
@@ -155,14 +139,14 @@ export default function QuillMetricComponent({ report, onClick, error, isLoading
|
|
|
155
139
|
color: theme?.secondaryTextColor,
|
|
156
140
|
}, children: rows.length > 0 &&
|
|
157
141
|
valueFormatter({
|
|
158
|
-
value: rows[0][`comparison_${
|
|
159
|
-
field:
|
|
142
|
+
value: rows[0][`comparison_${report.xAxisField}`] ?? 0,
|
|
143
|
+
field: report.xAxisField,
|
|
160
144
|
fields: [
|
|
161
145
|
{
|
|
162
|
-
field:
|
|
163
|
-
format:
|
|
164
|
-
label:
|
|
165
|
-
_id:
|
|
146
|
+
field: report.xAxisField,
|
|
147
|
+
format: report.xAxisFormat,
|
|
148
|
+
label: report.xAxisLabel,
|
|
149
|
+
_id: report.id || 'dummy',
|
|
166
150
|
},
|
|
167
151
|
],
|
|
168
152
|
}) }), _jsx("span", { style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,YAAY,EACZ,YAAY,GACb,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAoJhC"}
|
|
@@ -1,62 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
3
|
import QuillTable from '../QuillTable';
|
|
4
|
-
import { generatePivotTable } from '../../internals/ReportBuilder/PivotModal';
|
|
5
|
-
import { DashboardFiltersContext } from '../../Context';
|
|
6
4
|
import { quillFormat } from '../../utils/valueFormatter';
|
|
7
5
|
import ChartSkeleton from '../Chart/ChartSkeleton';
|
|
8
6
|
import ChartError from '../Chart/ChartError';
|
|
9
7
|
import { useTheme } from '../../hooks';
|
|
10
8
|
import { useExport } from '../../hooks/useExport';
|
|
9
|
+
import { usePivot } from '../../hooks/useQuill';
|
|
11
10
|
export default function QuillTableComponent({ report, onClick, isLoading, error, onPageChange, onSortChange, }) {
|
|
12
11
|
const theme = useTheme();
|
|
13
|
-
const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
14
12
|
const [initialLoad, setInitialLoad] = useState(true);
|
|
15
13
|
const { downloadCSV } = useExport(report?.id);
|
|
14
|
+
const pivotData = usePivot(report.id);
|
|
15
|
+
const [rows, setRows] = useState(report?.rows ?? []);
|
|
16
|
+
const [columns, setColumns] = useState(report?.columns ?? report?.yAxisFields ?? []);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!report.rows || !report.columns) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (report.pivot !== null && pivotData.data) {
|
|
22
|
+
setRows(pivotData.data.rows);
|
|
23
|
+
setColumns(pivotData.data.columns);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
setRows(report?.rows ?? []);
|
|
27
|
+
setColumns(report?.columns ?? report?.yAxisFields ?? []);
|
|
28
|
+
}
|
|
29
|
+
}, [pivotData, report]);
|
|
16
30
|
useEffect(() => {
|
|
17
31
|
if (!isLoading) {
|
|
18
32
|
setInitialLoad(false);
|
|
19
33
|
}
|
|
20
34
|
}, [isLoading]);
|
|
21
|
-
const config = report;
|
|
22
|
-
const data = report;
|
|
23
|
-
const dateFilter = Object.values(dashboardFilters).find((filter) => filter.filterType == 'date_range');
|
|
24
|
-
const pivotTable = useMemo(() => {
|
|
25
|
-
const pivot = config?.pivot;
|
|
26
|
-
const data = config;
|
|
27
|
-
return pivot && data?.rows
|
|
28
|
-
? generatePivotTable(pivot, JSON.parse(JSON.stringify(data.rows)), // deep copy
|
|
29
|
-
dateFilter
|
|
30
|
-
? { start: dateFilter.startDate, end: dateFilter.endDate }
|
|
31
|
-
: undefined, Boolean(dateFilter?.comparisonRange?.startDate), -1, dateFilter?.comparisonRange?.startDate &&
|
|
32
|
-
dateFilter?.comparisonRange?.endDate
|
|
33
|
-
? {
|
|
34
|
-
start: dateFilter.comparisonRange.startDate,
|
|
35
|
-
end: dateFilter.comparisonRange.endDate,
|
|
36
|
-
}
|
|
37
|
-
: undefined)
|
|
38
|
-
: null;
|
|
39
|
-
}, [config?.pivot]);
|
|
40
|
-
const columns = pivotTable?.columns ?? data.columns ?? data.yAxisFields;
|
|
41
|
-
const rows = pivotTable?.rows ?? data.rows ?? [];
|
|
42
|
-
// FOR PIVOTS - ADD THE RIGHT FIELD TYPE FOR THE VALUE COLUMNS
|
|
43
|
-
const valueFieldType = config?.pivot?.valueFieldType || undefined;
|
|
44
|
-
// Walk through data.columns and pick off the labels from yAxisFields
|
|
45
|
-
columns.forEach((col, index) => {
|
|
46
|
-
// ADD THE RIGHT FIELD TYPE FOR THE VALUE COLUMNS
|
|
47
|
-
if ((valueFieldType ||
|
|
48
|
-
['min', 'max'].includes(config?.pivot?.aggregationType || '')) &&
|
|
49
|
-
index !== 0) {
|
|
50
|
-
col.format = valueFieldType || 'two_decimal_places';
|
|
51
|
-
}
|
|
52
|
-
if (!data.yAxisFields)
|
|
53
|
-
return;
|
|
54
|
-
const matchingCol = data.yAxisFields.find((c) => c.field === col.field);
|
|
55
|
-
if (!col.label && matchingCol) {
|
|
56
|
-
col.label = matchingCol.label;
|
|
57
|
-
col.format = matchingCol.format;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
35
|
const formattedRows = rows.map((row) => {
|
|
61
36
|
return columns.reduce((formattedRow, column) => {
|
|
62
37
|
// Apply the format function to each field in the row
|
|
@@ -69,14 +44,15 @@ export default function QuillTableComponent({ report, onClick, isLoading, error,
|
|
|
69
44
|
}, {});
|
|
70
45
|
});
|
|
71
46
|
let numberOfRows = undefined;
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
47
|
+
if (report &&
|
|
48
|
+
report.compareRows &&
|
|
49
|
+
report.compareRows[0] &&
|
|
50
|
+
(report.compareRows[0].count || report.compareRows[0].COUNT)) {
|
|
51
|
+
if (report.compareRows[0].COUNT) {
|
|
52
|
+
numberOfRows = parseInt(report.compareRows[0].COUNT);
|
|
77
53
|
}
|
|
78
|
-
else if (
|
|
79
|
-
numberOfRows = parseInt(
|
|
54
|
+
else if (report.compareRows[0].count) {
|
|
55
|
+
numberOfRows = parseInt(report.compareRows[0].count);
|
|
80
56
|
}
|
|
81
57
|
}
|
|
82
58
|
return (_jsxs("div", { style: { cursor: 'pointer' }, onClick: () => onClick && onClick(report), children: [_jsxs("div", { style: {
|
|
@@ -98,7 +74,7 @@ export default function QuillTableComponent({ report, onClick, isLoading, error,
|
|
|
98
74
|
display: 'block',
|
|
99
75
|
maxWidth: '100%',
|
|
100
76
|
overflow: 'hidden',
|
|
101
|
-
}, children: report?.name }), onClick ? (_jsx("div", { style: {
|
|
77
|
+
}, children: report?.name }), onClick && report?.name ? (_jsx("div", { style: {
|
|
102
78
|
fontFamily: theme.fontFamily,
|
|
103
79
|
color: theme.primaryTextColor,
|
|
104
80
|
boxSizing: 'content-box',
|
|
@@ -114,7 +90,7 @@ export default function QuillTableComponent({ report, onClick, isLoading, error,
|
|
|
114
90
|
} })) : error ? (_jsx(ChartError, { containerStyle: {
|
|
115
91
|
width: '100%',
|
|
116
92
|
height: '400px',
|
|
117
|
-
} })) : (_jsx(QuillTable, { isLoading: isLoading, rows: formattedRows ?? [], numberOfRows: numberOfRows, columns: columns
|
|
93
|
+
} })) : (_jsx(QuillTable, { isLoading: isLoading, rows: formattedRows ?? [], numberOfRows: numberOfRows, columns: columns, rowsPerPage: 10, containerStyle: {
|
|
118
94
|
width: '100%',
|
|
119
95
|
height: '400px',
|
|
120
96
|
}, downloadCSV: () => {
|
|
@@ -123,5 +99,5 @@ export default function QuillTableComponent({ report, onClick, isLoading, error,
|
|
|
123
99
|
onPageChange && onPageChange(page);
|
|
124
100
|
}, onSortChange: (sort) => {
|
|
125
101
|
onSortChange && onSortChange(sort);
|
|
126
|
-
}, currentPage:
|
|
102
|
+
}, currentPage: report?.page, sort: report?.sort }))] }, report?.name));
|
|
127
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDashboard.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,kBAAmB,MAAM;;;;qCASF,MAAM;
|
|
1
|
+
{"version":3,"file":"useDashboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDashboard.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,kBAAmB,MAAM;;;;qCASF,MAAM;CAkDrD,CAAC"}
|
|
@@ -13,9 +13,9 @@ export const useDashboard = (dashboardName) => {
|
|
|
13
13
|
getDashboards(overrideDashboardName ?? dashboardName);
|
|
14
14
|
};
|
|
15
15
|
async function getDashboards(dashboardName) {
|
|
16
|
+
setIsLoading(true);
|
|
16
17
|
if (dashboardName === null || dashboardName === undefined)
|
|
17
18
|
return;
|
|
18
|
-
setIsLoading(true);
|
|
19
19
|
const { databaseType, publicKey, customerId } = client;
|
|
20
20
|
try {
|
|
21
21
|
const searchParams = new URLSearchParams({
|
|
@@ -34,14 +34,15 @@ export const useDashboard = (dashboardName) => {
|
|
|
34
34
|
};
|
|
35
35
|
const resp = await getData(client, `dashconfig?${searchParams}`, 'omit', hostedBody, null, 'GET');
|
|
36
36
|
setData(resp);
|
|
37
|
+
setIsLoading(false);
|
|
37
38
|
setError(null);
|
|
38
39
|
}
|
|
39
40
|
catch (error) {
|
|
40
41
|
setError(null);
|
|
42
|
+
setIsLoading(false);
|
|
41
43
|
setError(error);
|
|
42
44
|
console.error('Error fetching data:', error);
|
|
43
45
|
}
|
|
44
|
-
setIsLoading(false);
|
|
45
46
|
}
|
|
46
47
|
useEffect(() => {
|
|
47
48
|
getDashboards(dashboardName);
|
|
@@ -43,5 +43,12 @@ export declare const useQuill: (reportId?: string) => {
|
|
|
43
43
|
loading: boolean;
|
|
44
44
|
error: string | null;
|
|
45
45
|
};
|
|
46
|
+
export declare const usePivot: (reportId?: string) => {
|
|
47
|
+
data: {
|
|
48
|
+
rows: any[];
|
|
49
|
+
columns: Column[];
|
|
50
|
+
} | undefined;
|
|
51
|
+
error: string | undefined;
|
|
52
|
+
};
|
|
46
53
|
export {};
|
|
47
54
|
//# sourceMappingURL=useQuill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuill.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQuill.ts"],"names":[],"mappings":"AAWA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,U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