@datawheel/data-explorer 0.3.2 → 0.3.3
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/main.d.ts +1098 -0
- package/dist/main.js +798 -759
- package/dist/main.mjs +8514 -0
- package/package.json +5 -3
package/dist/main.js
CHANGED
|
@@ -1,21 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@mantine/core');
|
|
4
|
+
var hooks = require('@mantine/hooks');
|
|
5
|
+
var iconsReact = require('@tabler/icons-react');
|
|
6
|
+
var React19 = require('react');
|
|
7
|
+
var useTranslation$1 = require('@datawheel/use-translation');
|
|
8
|
+
var toolkit = require('@reduxjs/toolkit');
|
|
9
|
+
var reactRedux = require('react-redux');
|
|
10
|
+
var ISO6391 = require('iso-639-1');
|
|
11
|
+
var reactQuery = require('@tanstack/react-query');
|
|
12
|
+
var debounce = require('lodash.debounce');
|
|
13
|
+
var mantineReactTable = require('mantine-react-table');
|
|
14
|
+
var d3plusFormat = require('d3plus-format');
|
|
15
|
+
var yn = require('yn');
|
|
16
|
+
var matchSorter = require('match-sorter');
|
|
17
|
+
var tour = require('@reactour/tour');
|
|
18
|
+
var vizbuilder = require('@datawheel/vizbuilder');
|
|
19
|
+
var d3plusReact = require('d3plus-react');
|
|
20
|
+
|
|
21
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
|
|
23
|
+
function _interopNamespace(e) {
|
|
24
|
+
if (e && e.__esModule) return e;
|
|
25
|
+
var n = Object.create(null);
|
|
26
|
+
if (e) {
|
|
27
|
+
Object.keys(e).forEach(function (k) {
|
|
28
|
+
if (k !== 'default') {
|
|
29
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
30
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return e[k]; }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
n.default = e;
|
|
38
|
+
return Object.freeze(n);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var React19__namespace = /*#__PURE__*/_interopNamespace(React19);
|
|
42
|
+
var ISO6391__default = /*#__PURE__*/_interopDefault(ISO6391);
|
|
43
|
+
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
44
|
+
var yn__default = /*#__PURE__*/_interopDefault(yn);
|
|
19
45
|
|
|
20
46
|
var __create = Object.create;
|
|
21
47
|
var __defProp = Object.defineProperty;
|
|
@@ -50,16 +76,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
50
76
|
mod
|
|
51
77
|
));
|
|
52
78
|
|
|
53
|
-
// node_modules/tsup/assets/
|
|
54
|
-
var
|
|
55
|
-
"node_modules/tsup/assets/
|
|
79
|
+
// node_modules/tsup/assets/cjs_shims.js
|
|
80
|
+
var init_cjs_shims = __esm({
|
|
81
|
+
"node_modules/tsup/assets/cjs_shims.js"() {
|
|
56
82
|
}
|
|
57
83
|
});
|
|
58
84
|
|
|
59
85
|
// node_modules/file-saver/FileSaver.js
|
|
60
86
|
var require_FileSaver = __commonJS({
|
|
61
87
|
"node_modules/file-saver/FileSaver.js"(exports2, module2) {
|
|
62
|
-
|
|
88
|
+
init_cjs_shims();
|
|
63
89
|
var saveAs2 = saveAs2 || function(view) {
|
|
64
90
|
if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
|
|
65
91
|
return;
|
|
@@ -183,13 +209,13 @@ var require_FileSaver = __commonJS({
|
|
|
183
209
|
});
|
|
184
210
|
|
|
185
211
|
// src/main.ts
|
|
186
|
-
|
|
212
|
+
init_cjs_shims();
|
|
187
213
|
|
|
188
214
|
// src/components/DebugView.tsx
|
|
189
|
-
|
|
215
|
+
init_cjs_shims();
|
|
190
216
|
|
|
191
217
|
// src/hooks/translation.ts
|
|
192
|
-
|
|
218
|
+
init_cjs_shims();
|
|
193
219
|
var defaultTranslation = {
|
|
194
220
|
action_copy: "Copy",
|
|
195
221
|
action_copy_done: "Copied",
|
|
@@ -482,7 +508,7 @@ var defaultTranslation = {
|
|
|
482
508
|
}
|
|
483
509
|
}
|
|
484
510
|
};
|
|
485
|
-
var { useTranslation, TranslationConsumer, TranslationProvider } = translationFactory({
|
|
511
|
+
var { useTranslation, TranslationConsumer, TranslationProvider } = useTranslation$1.translationFactory({
|
|
486
512
|
defaultLocale: "en",
|
|
487
513
|
defaultTranslation
|
|
488
514
|
});
|
|
@@ -491,59 +517,59 @@ var { useTranslation, TranslationConsumer, TranslationProvider } = translationFa
|
|
|
491
517
|
function DebugView(props) {
|
|
492
518
|
const { url } = props.result;
|
|
493
519
|
const { translate: t } = useTranslation();
|
|
494
|
-
const { copy, copied } = useClipboard({ timeout: 1e3 });
|
|
495
|
-
const copyHandler = useCallback(() => copy(url), [url, copy]);
|
|
496
|
-
const openHandler = useCallback(() => window.open(url, "_blank"), [url]);
|
|
497
|
-
const headers = useMemo(() => {
|
|
520
|
+
const { copy, copied } = hooks.useClipboard({ timeout: 1e3 });
|
|
521
|
+
const copyHandler = React19.useCallback(() => copy(url), [url, copy]);
|
|
522
|
+
const openHandler = React19.useCallback(() => window.open(url, "_blank"), [url]);
|
|
523
|
+
const headers = React19.useMemo(() => {
|
|
498
524
|
const headers2 = Object.entries(props.result.headers || {});
|
|
499
525
|
if (headers2.length === 0) return null;
|
|
500
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Input.Wrapper, { label: t("debug_view.httpheaders") }, /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { component: "dl", sx: { fontFamily: "monospace", overflowWrap: "break-word" } }, headers2.map((entry) => /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, { key: entry[0] }, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "dt", fw: "bold", fz: "sm" }, entry[0]), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "dd", c: "#5c940d", fz: "sm" }, entry[1])))));
|
|
501
527
|
}, [props.result.headers, t]);
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
Input,
|
|
528
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { id: "query-results-debug-view" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { spacing: "md", px: "md", py: "sm" }, url && /* @__PURE__ */ React19__namespace.default.createElement(core.Input.Wrapper, { label: t("debug_view.url_logiclayer") }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { noWrap: true, spacing: "xs" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
529
|
+
core.Input,
|
|
504
530
|
{
|
|
505
|
-
icon: /* @__PURE__ */
|
|
531
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconWorld, null),
|
|
506
532
|
readOnly: true,
|
|
507
533
|
rightSectionWidth: "auto",
|
|
508
534
|
value: url,
|
|
509
535
|
w: "100%"
|
|
510
536
|
}
|
|
511
|
-
), /* @__PURE__ */
|
|
512
|
-
Button,
|
|
537
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Button.Group, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
538
|
+
core.Button,
|
|
513
539
|
{
|
|
514
|
-
leftIcon: /* @__PURE__ */
|
|
540
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconExternalLink, null),
|
|
515
541
|
onClick: openHandler,
|
|
516
542
|
variant: "default"
|
|
517
543
|
},
|
|
518
544
|
t("action_open")
|
|
519
|
-
), /* @__PURE__ */
|
|
520
|
-
Button,
|
|
545
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
546
|
+
core.Button,
|
|
521
547
|
{
|
|
522
|
-
leftIcon: /* @__PURE__ */
|
|
548
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconClipboard, null),
|
|
523
549
|
onClick: copyHandler,
|
|
524
550
|
variant: "default"
|
|
525
551
|
},
|
|
526
552
|
copied ? t("action_copy_done") : t("action_copy")
|
|
527
|
-
)))), /* @__PURE__ */
|
|
553
|
+
)))), /* @__PURE__ */ React19__namespace.default.createElement(core.SimpleGrid, { cols: 2 }, headers)));
|
|
528
554
|
}
|
|
529
555
|
|
|
530
556
|
// src/components/Explorer.tsx
|
|
531
|
-
|
|
557
|
+
init_cjs_shims();
|
|
532
558
|
|
|
533
559
|
// src/hooks/settings.tsx
|
|
534
|
-
|
|
560
|
+
init_cjs_shims();
|
|
535
561
|
|
|
536
562
|
// src/hooks/permalink.tsx
|
|
537
|
-
|
|
563
|
+
init_cjs_shims();
|
|
538
564
|
|
|
539
565
|
// src/api/tesseract/parse.ts
|
|
540
|
-
|
|
566
|
+
init_cjs_shims();
|
|
541
567
|
|
|
542
568
|
// src/utils/array.ts
|
|
543
|
-
|
|
569
|
+
init_cjs_shims();
|
|
544
570
|
|
|
545
571
|
// src/utils/string.js
|
|
546
|
-
|
|
572
|
+
init_cjs_shims();
|
|
547
573
|
function randomKey() {
|
|
548
574
|
return Math.random().toString(16).slice(2);
|
|
549
575
|
}
|
|
@@ -594,10 +620,10 @@ function getLast(array) {
|
|
|
594
620
|
}
|
|
595
621
|
|
|
596
622
|
// src/utils/structs.ts
|
|
597
|
-
|
|
623
|
+
init_cjs_shims();
|
|
598
624
|
|
|
599
625
|
// src/api/enum.ts
|
|
600
|
-
|
|
626
|
+
init_cjs_shims();
|
|
601
627
|
var Comparison = /* @__PURE__ */ ((Comparison2) => {
|
|
602
628
|
Comparison2["!="] = "neq";
|
|
603
629
|
Comparison2["<"] = "lt";
|
|
@@ -737,7 +763,7 @@ function buildProperty(props) {
|
|
|
737
763
|
}
|
|
738
764
|
|
|
739
765
|
// src/utils/transform.js
|
|
740
|
-
|
|
766
|
+
init_cjs_shims();
|
|
741
767
|
function identity(item) {
|
|
742
768
|
return `${item}`;
|
|
743
769
|
}
|
|
@@ -900,13 +926,13 @@ function filterParseCondition(value) {
|
|
|
900
926
|
}
|
|
901
927
|
|
|
902
928
|
// src/state/queries.ts
|
|
903
|
-
|
|
929
|
+
init_cjs_shims();
|
|
904
930
|
|
|
905
931
|
// src/utils/object.ts
|
|
906
|
-
|
|
932
|
+
init_cjs_shims();
|
|
907
933
|
|
|
908
934
|
// src/api/traverse.ts
|
|
909
|
-
|
|
935
|
+
init_cjs_shims();
|
|
910
936
|
function entityFinder(cube, name4) {
|
|
911
937
|
const nameWithoutID = name4.replace(/\sID$/, "");
|
|
912
938
|
const nameWithID = `${nameWithoutID} ID`;
|
|
@@ -1012,7 +1038,7 @@ function yieldMeasures(cube) {
|
|
|
1012
1038
|
}
|
|
1013
1039
|
|
|
1014
1040
|
// src/utils/validation.ts
|
|
1015
|
-
|
|
1041
|
+
init_cjs_shims();
|
|
1016
1042
|
function noop() {
|
|
1017
1043
|
}
|
|
1018
1044
|
function isOneOf(str, options) {
|
|
@@ -1139,7 +1165,7 @@ function getDomain(data, column) {
|
|
|
1139
1165
|
}
|
|
1140
1166
|
|
|
1141
1167
|
// src/state/server.ts
|
|
1142
|
-
|
|
1168
|
+
init_cjs_shims();
|
|
1143
1169
|
var name = "explorerServer";
|
|
1144
1170
|
var initialState = {
|
|
1145
1171
|
cubeMap: {},
|
|
@@ -1148,7 +1174,7 @@ var initialState = {
|
|
|
1148
1174
|
online: void 0,
|
|
1149
1175
|
url: ""
|
|
1150
1176
|
};
|
|
1151
|
-
var serverSlice = createSlice({
|
|
1177
|
+
var serverSlice = toolkit.createSlice({
|
|
1152
1178
|
name,
|
|
1153
1179
|
initialState,
|
|
1154
1180
|
reducers: {
|
|
@@ -1169,12 +1195,12 @@ var serverActions = {
|
|
|
1169
1195
|
function selectServerState(state) {
|
|
1170
1196
|
return state[name];
|
|
1171
1197
|
}
|
|
1172
|
-
var selectOlapCubeMap = createSelector(
|
|
1198
|
+
var selectOlapCubeMap = toolkit.createSelector(
|
|
1173
1199
|
selectServerState,
|
|
1174
1200
|
(server) => server.cubeMap
|
|
1175
1201
|
);
|
|
1176
|
-
createSelector(selectOlapCubeMap, getKeys);
|
|
1177
|
-
var selectOlapCubeItems = createSelector(selectOlapCubeMap, getValues);
|
|
1202
|
+
toolkit.createSelector(selectOlapCubeMap, getKeys);
|
|
1203
|
+
var selectOlapCubeItems = toolkit.createSelector(selectOlapCubeMap, getValues);
|
|
1178
1204
|
|
|
1179
1205
|
// src/state/queries.ts
|
|
1180
1206
|
var name2 = "explorerQueries";
|
|
@@ -1184,7 +1210,7 @@ var initialState2 = {
|
|
|
1184
1210
|
default: buildQuery({ key: "default" })
|
|
1185
1211
|
}
|
|
1186
1212
|
};
|
|
1187
|
-
var queriesSlice = createSlice({
|
|
1213
|
+
var queriesSlice = toolkit.createSlice({
|
|
1188
1214
|
name: name2,
|
|
1189
1215
|
initialState: initialState2,
|
|
1190
1216
|
reducers: {
|
|
@@ -1412,74 +1438,74 @@ function taintCurrentQuery(state) {
|
|
|
1412
1438
|
function selectQueriesState(state) {
|
|
1413
1439
|
return state[name2];
|
|
1414
1440
|
}
|
|
1415
|
-
var selectQueryItems = createSelector(
|
|
1441
|
+
var selectQueryItems = toolkit.createSelector(
|
|
1416
1442
|
selectQueriesState,
|
|
1417
1443
|
(queries) => sortByDate(Object.values(queries.itemMap), "created", false)
|
|
1418
1444
|
);
|
|
1419
|
-
var selectCurrentQueryItem = createSelector(
|
|
1445
|
+
var selectCurrentQueryItem = toolkit.createSelector(
|
|
1420
1446
|
selectQueriesState,
|
|
1421
1447
|
(queries) => queries.itemMap[queries.current]
|
|
1422
1448
|
);
|
|
1423
|
-
var selectCurrentQueryParams = createSelector(
|
|
1449
|
+
var selectCurrentQueryParams = toolkit.createSelector(
|
|
1424
1450
|
selectCurrentQueryItem,
|
|
1425
1451
|
(query) => query.params
|
|
1426
1452
|
);
|
|
1427
|
-
var selectCubeName = createSelector(selectCurrentQueryParams, (params) => params.cube);
|
|
1428
|
-
var selectLocale = createSelector(
|
|
1453
|
+
var selectCubeName = toolkit.createSelector(selectCurrentQueryParams, (params) => params.cube);
|
|
1454
|
+
var selectLocale = toolkit.createSelector(
|
|
1429
1455
|
[selectCurrentQueryParams, selectServerState],
|
|
1430
1456
|
(params, server) => {
|
|
1431
1457
|
const code = params.locale || server.localeOptions[0] || "";
|
|
1432
1458
|
return {
|
|
1433
1459
|
code,
|
|
1434
|
-
name:
|
|
1435
|
-
nativeName:
|
|
1460
|
+
name: ISO6391__default.default.getName(code),
|
|
1461
|
+
nativeName: ISO6391__default.default.getNativeName(code)
|
|
1436
1462
|
};
|
|
1437
1463
|
}
|
|
1438
1464
|
);
|
|
1439
|
-
var selectCutMap = createSelector(selectCurrentQueryParams, (params) => params.cuts);
|
|
1440
|
-
createSelector(selectCutMap, getKeys);
|
|
1441
|
-
var selectCutItems = createSelector(selectCutMap, getValues);
|
|
1442
|
-
var selectDrilldownMap = createSelector(
|
|
1465
|
+
var selectCutMap = toolkit.createSelector(selectCurrentQueryParams, (params) => params.cuts);
|
|
1466
|
+
toolkit.createSelector(selectCutMap, getKeys);
|
|
1467
|
+
var selectCutItems = toolkit.createSelector(selectCutMap, getValues);
|
|
1468
|
+
var selectDrilldownMap = toolkit.createSelector(
|
|
1443
1469
|
selectCurrentQueryParams,
|
|
1444
1470
|
(params) => params.drilldowns
|
|
1445
1471
|
);
|
|
1446
|
-
createSelector(selectDrilldownMap, getKeys);
|
|
1447
|
-
var selectDrilldownItems = createSelector(selectDrilldownMap, getValues);
|
|
1448
|
-
var selectFilterMap = createSelector(selectCurrentQueryParams, (params) => params.filters);
|
|
1449
|
-
createSelector(selectFilterMap, getKeys);
|
|
1450
|
-
var selectFilterItems = createSelector(selectFilterMap, getValues);
|
|
1451
|
-
var selectMeasureMap = createSelector(selectCurrentQueryParams, (params) => params.measures);
|
|
1452
|
-
createSelector(selectMeasureMap, getKeys);
|
|
1453
|
-
var selectMeasureItems = createSelector(selectMeasureMap, getValues);
|
|
1454
|
-
createSelector(selectCurrentQueryParams, (params) => params.booleans);
|
|
1455
|
-
var selectIsPreviewMode = createSelector(
|
|
1472
|
+
toolkit.createSelector(selectDrilldownMap, getKeys);
|
|
1473
|
+
var selectDrilldownItems = toolkit.createSelector(selectDrilldownMap, getValues);
|
|
1474
|
+
var selectFilterMap = toolkit.createSelector(selectCurrentQueryParams, (params) => params.filters);
|
|
1475
|
+
toolkit.createSelector(selectFilterMap, getKeys);
|
|
1476
|
+
var selectFilterItems = toolkit.createSelector(selectFilterMap, getValues);
|
|
1477
|
+
var selectMeasureMap = toolkit.createSelector(selectCurrentQueryParams, (params) => params.measures);
|
|
1478
|
+
toolkit.createSelector(selectMeasureMap, getKeys);
|
|
1479
|
+
var selectMeasureItems = toolkit.createSelector(selectMeasureMap, getValues);
|
|
1480
|
+
toolkit.createSelector(selectCurrentQueryParams, (params) => params.booleans);
|
|
1481
|
+
var selectIsPreviewMode = toolkit.createSelector(
|
|
1456
1482
|
selectCurrentQueryParams,
|
|
1457
1483
|
(params) => params.isPreview
|
|
1458
1484
|
);
|
|
1459
|
-
var selectPaginationParams = createSelector(selectCurrentQueryParams, (params) => ({
|
|
1485
|
+
var selectPaginationParams = toolkit.createSelector(selectCurrentQueryParams, (params) => ({
|
|
1460
1486
|
limit: params.pagiLimit || 0,
|
|
1461
1487
|
offset: params.pagiOffset || 0
|
|
1462
1488
|
}));
|
|
1463
|
-
var selectSortingParams = createSelector(selectCurrentQueryParams, (params) => ({
|
|
1489
|
+
var selectSortingParams = toolkit.createSelector(selectCurrentQueryParams, (params) => ({
|
|
1464
1490
|
sortKey: params.sortKey || "",
|
|
1465
1491
|
sortDir: params.sortDir
|
|
1466
1492
|
}));
|
|
1467
|
-
createSelector(
|
|
1493
|
+
toolkit.createSelector(
|
|
1468
1494
|
selectCurrentQueryParams,
|
|
1469
1495
|
(params) => isValidQueryVerbose(params)
|
|
1470
1496
|
);
|
|
1471
1497
|
|
|
1472
1498
|
// src/state/store.ts
|
|
1473
|
-
|
|
1499
|
+
init_cjs_shims();
|
|
1474
1500
|
|
|
1475
1501
|
// src/api/index.ts
|
|
1476
|
-
|
|
1502
|
+
init_cjs_shims();
|
|
1477
1503
|
|
|
1478
1504
|
// src/api/complexity/client.ts
|
|
1479
|
-
|
|
1505
|
+
init_cjs_shims();
|
|
1480
1506
|
|
|
1481
1507
|
// src/api/tools.ts
|
|
1482
|
-
|
|
1508
|
+
init_cjs_shims();
|
|
1483
1509
|
function toPlainObject(obj) {
|
|
1484
1510
|
return Object.fromEntries(
|
|
1485
1511
|
filterMap(Object.entries(obj), (entry) => {
|
|
@@ -1554,7 +1580,7 @@ var ComplexityModuleClient = class {
|
|
|
1554
1580
|
};
|
|
1555
1581
|
|
|
1556
1582
|
// src/api/tesseract/client.ts
|
|
1557
|
-
|
|
1583
|
+
init_cjs_shims();
|
|
1558
1584
|
var TesseractModuleClient = class {
|
|
1559
1585
|
constructor(baseURL, config) {
|
|
1560
1586
|
this.baseURL = baseURL ? baseURL.replace(/\/?$/, "/") : "";
|
|
@@ -1601,11 +1627,11 @@ var TesseractModuleClient = class {
|
|
|
1601
1627
|
};
|
|
1602
1628
|
|
|
1603
1629
|
// src/api/context.tsx
|
|
1604
|
-
|
|
1605
|
-
createContext(null);
|
|
1630
|
+
init_cjs_shims();
|
|
1631
|
+
React19.createContext(null);
|
|
1606
1632
|
|
|
1607
1633
|
// src/state/loading.ts
|
|
1608
|
-
|
|
1634
|
+
init_cjs_shims();
|
|
1609
1635
|
var LOADINGSTATUS = {
|
|
1610
1636
|
FETCHING: "FETCHING",
|
|
1611
1637
|
SUCCESS: "SUCCESS",
|
|
@@ -1618,7 +1644,7 @@ var initialState3 = {
|
|
|
1618
1644
|
status: LOADINGSTATUS.FETCHING,
|
|
1619
1645
|
trigger: null
|
|
1620
1646
|
};
|
|
1621
|
-
var loadingSlice = createSlice({
|
|
1647
|
+
var loadingSlice = toolkit.createSlice({
|
|
1622
1648
|
name: name3,
|
|
1623
1649
|
initialState: initialState3,
|
|
1624
1650
|
reducers: {
|
|
@@ -1670,7 +1696,7 @@ var reducerMap = {
|
|
|
1670
1696
|
[queriesSlice.name]: queriesSlice.reducer,
|
|
1671
1697
|
[serverSlice.name]: serverSlice.reducer
|
|
1672
1698
|
};
|
|
1673
|
-
var reducer = combineReducers(reducerMap);
|
|
1699
|
+
var reducer = toolkit.combineReducers(reducerMap);
|
|
1674
1700
|
function thunkExtraArg() {
|
|
1675
1701
|
return {
|
|
1676
1702
|
tesseract: new TesseractModuleClient(),
|
|
@@ -1678,7 +1704,7 @@ function thunkExtraArg() {
|
|
|
1678
1704
|
previewLimit: 50
|
|
1679
1705
|
};
|
|
1680
1706
|
}
|
|
1681
|
-
var storeFactory = () => configureStore({
|
|
1707
|
+
var storeFactory = () => toolkit.configureStore({
|
|
1682
1708
|
reducer: reducerMap,
|
|
1683
1709
|
middleware(getDefaultMiddleware) {
|
|
1684
1710
|
return getDefaultMiddleware({
|
|
@@ -1688,7 +1714,7 @@ var storeFactory = () => configureStore({
|
|
|
1688
1714
|
});
|
|
1689
1715
|
}
|
|
1690
1716
|
});
|
|
1691
|
-
var useSelector = useSelector
|
|
1717
|
+
var useSelector = reactRedux.useSelector;
|
|
1692
1718
|
|
|
1693
1719
|
// src/hooks/permalink.tsx
|
|
1694
1720
|
function serializePermalink(item) {
|
|
@@ -1710,19 +1736,19 @@ function parsePermalink(cube, value) {
|
|
|
1710
1736
|
function usePermalink(isEnabled, options) {
|
|
1711
1737
|
const cubeMap = useSelector(selectOlapCubeMap);
|
|
1712
1738
|
const queryItem = useSelector(selectCurrentQueryItem);
|
|
1713
|
-
const listener = useCallback(
|
|
1739
|
+
const listener = React19.useCallback(
|
|
1714
1740
|
(evt) => {
|
|
1715
1741
|
evt.state && options.onChange(evt.state);
|
|
1716
1742
|
},
|
|
1717
1743
|
[options.onChange]
|
|
1718
1744
|
);
|
|
1719
|
-
useEffect(() => {
|
|
1745
|
+
React19.useEffect(() => {
|
|
1720
1746
|
if (isEnabled) {
|
|
1721
1747
|
window.addEventListener("popstate", listener);
|
|
1722
1748
|
return () => window.removeEventListener("popstate", listener);
|
|
1723
1749
|
}
|
|
1724
1750
|
}, [isEnabled, listener]);
|
|
1725
|
-
useEffect(() => {
|
|
1751
|
+
React19.useEffect(() => {
|
|
1726
1752
|
const { isDirty, panel, params } = queryItem;
|
|
1727
1753
|
if (!isEnabled || isDirty || !cubeMap[params.cube]) return;
|
|
1728
1754
|
const currPermalink = window.location.search.slice(1);
|
|
@@ -1746,7 +1772,7 @@ function useUpdatePermaLink({
|
|
|
1746
1772
|
isLoading
|
|
1747
1773
|
}) {
|
|
1748
1774
|
const queryItem = useSelector(selectCurrentQueryItem);
|
|
1749
|
-
useEffect(() => {
|
|
1775
|
+
React19.useEffect(() => {
|
|
1750
1776
|
if (isFetched && cube && enabled && !isLoading) {
|
|
1751
1777
|
const currPermalink = window.location.search.slice(1);
|
|
1752
1778
|
const nextPermalink = serializePermalink(queryItem);
|
|
@@ -1770,11 +1796,11 @@ var defaultToolbarConfig = {
|
|
|
1770
1796
|
buttons: [],
|
|
1771
1797
|
showLabels: true
|
|
1772
1798
|
};
|
|
1773
|
-
var SettingsContext = createContext(void 0);
|
|
1799
|
+
var SettingsContext = React19.createContext(void 0);
|
|
1774
1800
|
var { Consumer: ContextConsumer, Provider: ContextProvider } = SettingsContext;
|
|
1775
1801
|
function SettingsProvider(props) {
|
|
1776
1802
|
usePermalink(props.withPermalink, { onChange: props.actions.resetAllParams });
|
|
1777
|
-
const value = useMemo(
|
|
1803
|
+
const value = React19.useMemo(
|
|
1778
1804
|
() => {
|
|
1779
1805
|
var _a;
|
|
1780
1806
|
return {
|
|
@@ -1790,10 +1816,10 @@ function SettingsProvider(props) {
|
|
|
1790
1816
|
},
|
|
1791
1817
|
[props.formatters, props.previewLimit, props.toolbarConfig]
|
|
1792
1818
|
);
|
|
1793
|
-
return /* @__PURE__ */
|
|
1819
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(ContextProvider, { value }, props.children);
|
|
1794
1820
|
}
|
|
1795
1821
|
function SettingsConsumer(props) {
|
|
1796
|
-
return /* @__PURE__ */
|
|
1822
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(ContextConsumer, null, React19.useCallback(
|
|
1797
1823
|
(context) => {
|
|
1798
1824
|
if (context === void 0) {
|
|
1799
1825
|
throw new Error("SettingsConsumer must be used within a SettingsProvider.");
|
|
@@ -1804,7 +1830,7 @@ function SettingsConsumer(props) {
|
|
|
1804
1830
|
));
|
|
1805
1831
|
}
|
|
1806
1832
|
function useSettings() {
|
|
1807
|
-
const context = useContext(SettingsContext);
|
|
1833
|
+
const context = React19.useContext(SettingsContext);
|
|
1808
1834
|
if (context === void 0) {
|
|
1809
1835
|
throw new Error("useSettings must be used within a SettingsProvider.");
|
|
1810
1836
|
}
|
|
@@ -1816,7 +1842,7 @@ function useActions() {
|
|
|
1816
1842
|
}
|
|
1817
1843
|
|
|
1818
1844
|
// src/state/index.ts
|
|
1819
|
-
|
|
1845
|
+
init_cjs_shims();
|
|
1820
1846
|
|
|
1821
1847
|
// src/state/thunks.ts
|
|
1822
1848
|
var thunks_exports = {};
|
|
@@ -1833,10 +1859,10 @@ __export(thunks_exports, {
|
|
|
1833
1859
|
willSetCube: () => willSetCube,
|
|
1834
1860
|
willSetupClient: () => willSetupClient
|
|
1835
1861
|
});
|
|
1836
|
-
|
|
1862
|
+
init_cjs_shims();
|
|
1837
1863
|
|
|
1838
1864
|
// src/state/utils.ts
|
|
1839
|
-
|
|
1865
|
+
init_cjs_shims();
|
|
1840
1866
|
function pickDefaultDrilldowns(dimensions) {
|
|
1841
1867
|
const levels = [];
|
|
1842
1868
|
const findDefaultHierarchy = (dim) => dim.hierarchies.find((h) => h.name === dim.default_hierarchy) || dim.hierarchies[0];
|
|
@@ -2136,20 +2162,20 @@ var actions = {
|
|
|
2136
2162
|
};
|
|
2137
2163
|
|
|
2138
2164
|
// src/components/ExplorerContent.tsx
|
|
2139
|
-
|
|
2165
|
+
init_cjs_shims();
|
|
2140
2166
|
|
|
2141
2167
|
// src/context/index.tsx
|
|
2142
|
-
|
|
2143
|
-
var queryClient = new QueryClient();
|
|
2168
|
+
init_cjs_shims();
|
|
2169
|
+
var queryClient = new reactQuery.QueryClient();
|
|
2144
2170
|
function AppProviders({ children }) {
|
|
2145
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ React19__namespace.createElement(reactQuery.QueryClientProvider, { client: queryClient }, children);
|
|
2146
2172
|
}
|
|
2147
2173
|
|
|
2148
2174
|
// src/hooks/setup.ts
|
|
2149
|
-
|
|
2175
|
+
init_cjs_shims();
|
|
2150
2176
|
function useSetup(serverURL, serverConfig, defaultLocale, defaultCube) {
|
|
2151
2177
|
const { actions: actions2, paginationConfig } = useSettings();
|
|
2152
|
-
useEffect(() => {
|
|
2178
|
+
React19.useEffect(() => {
|
|
2153
2179
|
actions2.resetServer();
|
|
2154
2180
|
actions2.resetAllParams({});
|
|
2155
2181
|
actions2.setLoadingState("FETCHING");
|
|
@@ -2216,8 +2242,8 @@ function useSetup(serverURL, serverConfig, defaultLocale, defaultCube) {
|
|
|
2216
2242
|
}
|
|
2217
2243
|
|
|
2218
2244
|
// src/components/AnimatedCube.tsx
|
|
2219
|
-
|
|
2220
|
-
var colorShift = keyframes({
|
|
2245
|
+
init_cjs_shims();
|
|
2246
|
+
var colorShift = core.keyframes({
|
|
2221
2247
|
"from, to": {
|
|
2222
2248
|
fill: "var(--anicube-color1, #5c7080)"
|
|
2223
2249
|
},
|
|
@@ -2228,7 +2254,7 @@ var colorShift = keyframes({
|
|
|
2228
2254
|
fill: "var(--anicube-color3, #8a9ba8)"
|
|
2229
2255
|
}
|
|
2230
2256
|
});
|
|
2231
|
-
var useStyles = createStyles((theme, { color, shade }) => {
|
|
2257
|
+
var useStyles = core.createStyles((theme, { color, shade }) => {
|
|
2232
2258
|
const vars = color ? {
|
|
2233
2259
|
"--anicube-color1": theme.colors[color][shade - 1],
|
|
2234
2260
|
"--anicube-color2": theme.colors[color][shade],
|
|
@@ -2263,9 +2289,9 @@ var defaultProps = {
|
|
|
2263
2289
|
shade: 5
|
|
2264
2290
|
};
|
|
2265
2291
|
function AnimatedCube(props) {
|
|
2266
|
-
const { color, shade } = useComponentDefaultProps(AnimatedCube.displayName, defaultProps, props);
|
|
2292
|
+
const { color, shade } = core.useComponentDefaultProps(AnimatedCube.displayName, defaultProps, props);
|
|
2267
2293
|
const { classes, cx } = useStyles({ color, shade });
|
|
2268
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2269
2295
|
"svg",
|
|
2270
2296
|
{
|
|
2271
2297
|
className: cx("dataex-Anicube-root", classes.root),
|
|
@@ -2273,34 +2299,34 @@ function AnimatedCube(props) {
|
|
|
2273
2299
|
viewBox: "0 0 256 256",
|
|
2274
2300
|
height: props.size || 256
|
|
2275
2301
|
},
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
/* @__PURE__ */
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
/* @__PURE__ */
|
|
2281
|
-
/* @__PURE__ */
|
|
2302
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "a"), d: "M128 128v128l111 -64v-128l-111 64z" }),
|
|
2303
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "b"), d: "M128 128l111 -64l-111 -64l-111 64l111 64z" }),
|
|
2304
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "c"), d: "M128 128l-111 -64v128l111 64v-128z" }),
|
|
2305
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "a"), d: "M128 128v-64l-55 32v64l55 -32z" }),
|
|
2306
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "b"), d: "M128 128l-55 32l55 32l55 -32l-55 -32z" }),
|
|
2307
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { className: cx("dataex-Anicube-side", classes.side, "c"), d: "M128 128l55 32v-64l-55 -32v64z" })
|
|
2282
2308
|
);
|
|
2283
2309
|
}
|
|
2284
2310
|
AnimatedCube.displayName = "DataExplorer/Anicube";
|
|
2285
2311
|
|
|
2286
2312
|
// src/components/ExplorerResults.tsx
|
|
2287
|
-
|
|
2313
|
+
init_cjs_shims();
|
|
2288
2314
|
|
|
2289
2315
|
// src/state/selectors.ts
|
|
2290
|
-
|
|
2291
|
-
var selectOlapCube = createSelector(
|
|
2316
|
+
init_cjs_shims();
|
|
2317
|
+
var selectOlapCube = toolkit.createSelector(
|
|
2292
2318
|
[selectOlapCubeMap, selectCubeName],
|
|
2293
2319
|
(cubeMap, cubeName) => cubeName in cubeMap ? cubeMap[cubeName] : void 0
|
|
2294
2320
|
);
|
|
2295
|
-
var selectOlapMeasureItems = createSelector(
|
|
2321
|
+
var selectOlapMeasureItems = toolkit.createSelector(
|
|
2296
2322
|
selectOlapCube,
|
|
2297
2323
|
(cube) => cube ? cube.measures : []
|
|
2298
2324
|
);
|
|
2299
|
-
var selectOlapMeasureMap = createSelector(
|
|
2325
|
+
var selectOlapMeasureMap = toolkit.createSelector(
|
|
2300
2326
|
selectOlapMeasureItems,
|
|
2301
2327
|
(measures) => Object.fromEntries(measures.map((item) => [item.name, item]))
|
|
2302
2328
|
);
|
|
2303
|
-
var selectOlapDimensionItems = createSelector(
|
|
2329
|
+
var selectOlapDimensionItems = toolkit.createSelector(
|
|
2304
2330
|
selectOlapCube,
|
|
2305
2331
|
(cube) => !cube ? [] : cube.dimensions.map((dim) => ({
|
|
2306
2332
|
item: {
|
|
@@ -2316,28 +2342,28 @@ var selectOlapDimensionItems = createSelector(
|
|
|
2316
2342
|
(a, b) => getOrderValue(a.item) - getOrderValue(b.item) || b.count - a.count || a.alpha.localeCompare(b.alpha)
|
|
2317
2343
|
).map((i) => i.item)
|
|
2318
2344
|
);
|
|
2319
|
-
createSelector(
|
|
2345
|
+
toolkit.createSelector(
|
|
2320
2346
|
selectOlapDimensionItems,
|
|
2321
2347
|
(dimensions) => Object.fromEntries(dimensions.map((item) => [item.name, item]))
|
|
2322
2348
|
);
|
|
2323
|
-
var selectLevelTriadMap = createSelector(
|
|
2349
|
+
var selectLevelTriadMap = toolkit.createSelector(
|
|
2324
2350
|
selectOlapCube,
|
|
2325
2351
|
(cube) => cube ? mapDimensionHierarchyLevels(cube) : {}
|
|
2326
2352
|
);
|
|
2327
|
-
createSelector(
|
|
2353
|
+
toolkit.createSelector(
|
|
2328
2354
|
selectOlapDimensionItems,
|
|
2329
2355
|
(dimensions) => dimensions.find((d) => d.type === "time" || d.name === "Year" || d.name === "Date")
|
|
2330
2356
|
);
|
|
2331
|
-
var selectSerializedParams = createSelector(
|
|
2357
|
+
var selectSerializedParams = toolkit.createSelector(
|
|
2332
2358
|
selectCurrentQueryItem,
|
|
2333
2359
|
(queryItem) => serializePermalink(queryItem)
|
|
2334
2360
|
);
|
|
2335
2361
|
|
|
2336
2362
|
// src/components/DrawerMenu.tsx
|
|
2337
|
-
|
|
2363
|
+
init_cjs_shims();
|
|
2338
2364
|
|
|
2339
2365
|
// src/utils/format.js
|
|
2340
|
-
|
|
2366
|
+
init_cjs_shims();
|
|
2341
2367
|
function abbreviateFullName(nameParts, joint = "/") {
|
|
2342
2368
|
if (!nameParts) {
|
|
2343
2369
|
return "";
|
|
@@ -2357,25 +2383,25 @@ function abbreviateFullName(nameParts, joint = "/") {
|
|
|
2357
2383
|
}
|
|
2358
2384
|
|
|
2359
2385
|
// src/components/TableView.tsx
|
|
2360
|
-
|
|
2386
|
+
init_cjs_shims();
|
|
2361
2387
|
|
|
2362
2388
|
// src/hooks/formatter.ts
|
|
2363
|
-
|
|
2389
|
+
init_cjs_shims();
|
|
2364
2390
|
var defaultFormatters = {
|
|
2365
2391
|
undefined: (n) => n,
|
|
2366
2392
|
identity: (n) => `${n}`,
|
|
2367
2393
|
Decimal: new Intl.NumberFormat(void 0, { useGrouping: false }).format,
|
|
2368
2394
|
Dollars: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format,
|
|
2369
|
-
Human: (n) => formatAbbreviate(n, "en-US"),
|
|
2395
|
+
Human: (n) => d3plusFormat.formatAbbreviate(n, "en-US"),
|
|
2370
2396
|
Milliards: new Intl.NumberFormat(void 0, { useGrouping: true }).format,
|
|
2371
2397
|
Million: new Intl.NumberFormat(void 0, { useGrouping: true }).format
|
|
2372
2398
|
};
|
|
2373
2399
|
var basicFormatterKeys = ["Decimal", "Milliards", "Human"];
|
|
2374
2400
|
function useFormatter() {
|
|
2375
2401
|
const { formatters } = useSettings();
|
|
2376
|
-
const [formatMap, setFormatMap] = useState({});
|
|
2377
|
-
const formatterMap = useRef(formatters);
|
|
2378
|
-
return useMemo(() => {
|
|
2402
|
+
const [formatMap, setFormatMap] = React19.useState({});
|
|
2403
|
+
const formatterMap = React19.useRef(formatters);
|
|
2404
|
+
return React19.useMemo(() => {
|
|
2379
2405
|
return {
|
|
2380
2406
|
currentFormats: formatMap,
|
|
2381
2407
|
getAvailableFormats(measure) {
|
|
@@ -2402,7 +2428,7 @@ function useFormatter() {
|
|
|
2402
2428
|
return formatter3;
|
|
2403
2429
|
}
|
|
2404
2430
|
try {
|
|
2405
|
-
formatter2 = format(key);
|
|
2431
|
+
formatter2 = d3plusFormat.format(key);
|
|
2406
2432
|
} catch (e) {
|
|
2407
2433
|
console.warn(`Formatter not configured: "${key}"`);
|
|
2408
2434
|
formatter2 = defaultFormatters.identity;
|
|
@@ -2424,7 +2450,7 @@ function useFormatter() {
|
|
|
2424
2450
|
}
|
|
2425
2451
|
|
|
2426
2452
|
// src/components/CustomActionIcon.tsx
|
|
2427
|
-
|
|
2453
|
+
init_cjs_shims();
|
|
2428
2454
|
var CustomActionIcon = ({
|
|
2429
2455
|
disabled,
|
|
2430
2456
|
showTooltip,
|
|
@@ -2432,10 +2458,10 @@ var CustomActionIcon = ({
|
|
|
2432
2458
|
children,
|
|
2433
2459
|
label
|
|
2434
2460
|
}) => {
|
|
2435
|
-
const [popoverOpened, setPopoverOpened] =
|
|
2436
|
-
const actionIcon = /* @__PURE__ */
|
|
2437
|
-
return showTooltip ? /* @__PURE__ */
|
|
2438
|
-
Popover,
|
|
2461
|
+
const [popoverOpened, setPopoverOpened] = React19__namespace.default.useState(false);
|
|
2462
|
+
const actionIcon = /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { disabled, size: 25, ml: 5, onClick }, children);
|
|
2463
|
+
return showTooltip ? /* @__PURE__ */ React19__namespace.default.createElement("div", { onMouseEnter: () => setPopoverOpened(true), onMouseLeave: () => setPopoverOpened(false) }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2464
|
+
core.Popover,
|
|
2439
2465
|
{
|
|
2440
2466
|
width: 200,
|
|
2441
2467
|
position: "left",
|
|
@@ -2454,26 +2480,26 @@ var CustomActionIcon = ({
|
|
|
2454
2480
|
}
|
|
2455
2481
|
})
|
|
2456
2482
|
},
|
|
2457
|
-
/* @__PURE__ */
|
|
2458
|
-
/* @__PURE__ */
|
|
2483
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Popover.Target, null, actionIcon),
|
|
2484
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Popover.Dropdown, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { size: "xs" }, label))
|
|
2459
2485
|
)) : actionIcon;
|
|
2460
2486
|
};
|
|
2461
2487
|
var CustomActionIcon_default = CustomActionIcon;
|
|
2462
2488
|
|
|
2463
2489
|
// src/components/TableFooter.tsx
|
|
2464
|
-
|
|
2490
|
+
init_cjs_shims();
|
|
2465
2491
|
|
|
2466
2492
|
// src/hooks/useAsync.tsx
|
|
2467
|
-
|
|
2493
|
+
init_cjs_shims();
|
|
2468
2494
|
function useSafeDispatch(dispatch) {
|
|
2469
|
-
const mounted =
|
|
2470
|
-
|
|
2495
|
+
const mounted = React19__namespace.useRef(false);
|
|
2496
|
+
React19__namespace.useLayoutEffect(() => {
|
|
2471
2497
|
mounted.current = true;
|
|
2472
2498
|
return () => {
|
|
2473
2499
|
mounted.current = false;
|
|
2474
2500
|
};
|
|
2475
2501
|
}, []);
|
|
2476
|
-
return
|
|
2502
|
+
return React19__namespace.useCallback(
|
|
2477
2503
|
(...args) => {
|
|
2478
2504
|
if (mounted.current) {
|
|
2479
2505
|
dispatch(...args);
|
|
@@ -2484,11 +2510,11 @@ function useSafeDispatch(dispatch) {
|
|
|
2484
2510
|
}
|
|
2485
2511
|
var defaultInitialState = { status: "idle", data: null, error: null };
|
|
2486
2512
|
function useAsync(initialState4) {
|
|
2487
|
-
const initialStateRef =
|
|
2513
|
+
const initialStateRef = React19__namespace.useRef({
|
|
2488
2514
|
...defaultInitialState,
|
|
2489
2515
|
...initialState4
|
|
2490
2516
|
});
|
|
2491
|
-
const [state, dispatch] =
|
|
2517
|
+
const [state, dispatch] = React19__namespace.useReducer(
|
|
2492
2518
|
(state2, action) => {
|
|
2493
2519
|
switch (action.type) {
|
|
2494
2520
|
case "idle":
|
|
@@ -2506,16 +2532,16 @@ function useAsync(initialState4) {
|
|
|
2506
2532
|
initialStateRef.current
|
|
2507
2533
|
);
|
|
2508
2534
|
const safeDispatch = useSafeDispatch(dispatch);
|
|
2509
|
-
const setData =
|
|
2535
|
+
const setData = React19__namespace.useCallback(
|
|
2510
2536
|
(data) => safeDispatch({ type: "resolved", data }),
|
|
2511
2537
|
[safeDispatch]
|
|
2512
2538
|
);
|
|
2513
|
-
const setError =
|
|
2539
|
+
const setError = React19__namespace.useCallback(
|
|
2514
2540
|
(error) => safeDispatch({ type: "rejected", error }),
|
|
2515
2541
|
[safeDispatch]
|
|
2516
2542
|
);
|
|
2517
|
-
const reset =
|
|
2518
|
-
const run =
|
|
2543
|
+
const reset = React19__namespace.useCallback(() => safeDispatch({ type: "idle" }), [safeDispatch]);
|
|
2544
|
+
const run = React19__namespace.useCallback(
|
|
2519
2545
|
(promise) => {
|
|
2520
2546
|
if (!promise || !promise.then) {
|
|
2521
2547
|
throw new Error(
|
|
@@ -2552,8 +2578,8 @@ function useAsync(initialState4) {
|
|
|
2552
2578
|
}
|
|
2553
2579
|
|
|
2554
2580
|
// src/components/Select.tsx
|
|
2555
|
-
|
|
2556
|
-
var SelectObject = forwardRef(function(props, ref) {
|
|
2581
|
+
init_cjs_shims();
|
|
2582
|
+
var SelectObject = React19.forwardRef(function(props, ref) {
|
|
2557
2583
|
var _a;
|
|
2558
2584
|
const {
|
|
2559
2585
|
getLabel,
|
|
@@ -2563,7 +2589,7 @@ var SelectObject = forwardRef(function(props, ref) {
|
|
|
2563
2589
|
selectedItem,
|
|
2564
2590
|
selectProps = {}
|
|
2565
2591
|
} = props;
|
|
2566
|
-
const [itemList, itemMap] = useMemo(() => {
|
|
2592
|
+
const [itemList, itemMap] = React19.useMemo(() => {
|
|
2567
2593
|
const valueAccessor = accesorFactory(getValue2);
|
|
2568
2594
|
const labelAccessor = getLabel ? accesorFactory(getLabel) : valueAccessor;
|
|
2569
2595
|
const list = items.map((item) => ({
|
|
@@ -2573,7 +2599,7 @@ var SelectObject = forwardRef(function(props, ref) {
|
|
|
2573
2599
|
}));
|
|
2574
2600
|
return [list, keyBy(list, (option) => option.value)];
|
|
2575
2601
|
}, [items, getLabel, getValue2]);
|
|
2576
|
-
const selected = useMemo(() => {
|
|
2602
|
+
const selected = React19.useMemo(() => {
|
|
2577
2603
|
if (selectedItem == null) return null;
|
|
2578
2604
|
if (typeof selectedItem === "string") return selectedItem;
|
|
2579
2605
|
const valueAccessor = accesorFactory(getValue2);
|
|
@@ -2585,8 +2611,8 @@ var SelectObject = forwardRef(function(props, ref) {
|
|
|
2585
2611
|
if (items.length === 0 || !selected) {
|
|
2586
2612
|
return null;
|
|
2587
2613
|
}
|
|
2588
|
-
return /* @__PURE__ */
|
|
2589
|
-
Select,
|
|
2614
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2615
|
+
core.Select,
|
|
2590
2616
|
{
|
|
2591
2617
|
ref,
|
|
2592
2618
|
data: itemList,
|
|
@@ -2607,11 +2633,11 @@ function inputFocusHandler(event) {
|
|
|
2607
2633
|
}
|
|
2608
2634
|
|
|
2609
2635
|
// src/components/CubeSource.tsx
|
|
2610
|
-
|
|
2636
|
+
init_cjs_shims();
|
|
2611
2637
|
function CubeAnnotation(props) {
|
|
2612
2638
|
const { annotation, item, locale, ...textProps } = props;
|
|
2613
2639
|
const content = getAnnotation(item, annotation, locale);
|
|
2614
|
-
return content ? /* @__PURE__ */
|
|
2640
|
+
return content ? /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "p", ...textProps }, content) : null;
|
|
2615
2641
|
}
|
|
2616
2642
|
function CubeSourceAnchor(props) {
|
|
2617
2643
|
const { item, locale, ...textProps } = props;
|
|
@@ -2619,12 +2645,12 @@ function CubeSourceAnchor(props) {
|
|
|
2619
2645
|
const srcName = getAnnotation(item, "source_name", locale);
|
|
2620
2646
|
const srcLink = getAnnotation(item, "source_link", locale);
|
|
2621
2647
|
if (!srcName) return null;
|
|
2622
|
-
return /* @__PURE__ */
|
|
2648
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "p", ...textProps }, `${t("params.label_source")}: `, srcLink ? /* @__PURE__ */ React19__namespace.default.createElement(core.Anchor, { href: srcLink }, srcName) : /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { span: true }, srcName));
|
|
2623
2649
|
}
|
|
2624
2650
|
function CubeSource() {
|
|
2625
|
-
const selectedItem = useSelector
|
|
2626
|
-
const { code: locale } = useSelector
|
|
2627
|
-
return selectedItem && /* @__PURE__ */
|
|
2651
|
+
const selectedItem = reactRedux.useSelector(selectOlapCube);
|
|
2652
|
+
const { code: locale } = reactRedux.useSelector(selectLocale);
|
|
2653
|
+
return selectedItem && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { sx: { "& p": { margin: 0 } } }, /* @__PURE__ */ React19__namespace.default.createElement(CubeAnnotation, { fz: "xs", fw: "bold", annotation: "table", item: selectedItem, locale }), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2628
2654
|
CubeAnnotation,
|
|
2629
2655
|
{
|
|
2630
2656
|
annotation: "description",
|
|
@@ -2632,7 +2658,7 @@ function CubeSource() {
|
|
|
2632
2658
|
item: selectedItem,
|
|
2633
2659
|
locale
|
|
2634
2660
|
}
|
|
2635
|
-
), /* @__PURE__ */
|
|
2661
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(CubeSourceAnchor, { item: selectedItem, locale, fz: "xs" }), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2636
2662
|
CubeAnnotation,
|
|
2637
2663
|
{
|
|
2638
2664
|
annotation: "source_description",
|
|
@@ -2645,13 +2671,13 @@ function CubeSource() {
|
|
|
2645
2671
|
}
|
|
2646
2672
|
|
|
2647
2673
|
// src/components/LocaleSelector.tsx
|
|
2648
|
-
|
|
2674
|
+
init_cjs_shims();
|
|
2649
2675
|
|
|
2650
2676
|
// src/components/SelectCubes.tsx
|
|
2651
|
-
|
|
2677
|
+
init_cjs_shims();
|
|
2652
2678
|
|
|
2653
2679
|
// src/utils/graph.js
|
|
2654
|
-
|
|
2680
|
+
init_cjs_shims();
|
|
2655
2681
|
var Graph = class {
|
|
2656
2682
|
constructor() {
|
|
2657
2683
|
this.nodes = /* @__PURE__ */ new Set([]);
|
|
@@ -2725,7 +2751,7 @@ var Graph = class {
|
|
|
2725
2751
|
const map = /* @__PURE__ */ new Map();
|
|
2726
2752
|
const matches = [];
|
|
2727
2753
|
if (filter !== "") {
|
|
2728
|
-
const results = matchSorter(this.items, filter, {
|
|
2754
|
+
const results = matchSorter.matchSorter(this.items, filter, {
|
|
2729
2755
|
keys: [
|
|
2730
2756
|
"name",
|
|
2731
2757
|
(item) => getAnnotation(item, "topic", locale) || "",
|
|
@@ -2788,17 +2814,17 @@ var Graph = class {
|
|
|
2788
2814
|
var graph_default = Graph;
|
|
2789
2815
|
|
|
2790
2816
|
// src/components/Results.tsx
|
|
2791
|
-
|
|
2817
|
+
init_cjs_shims();
|
|
2792
2818
|
|
|
2793
2819
|
// src/components/SideBar.tsx
|
|
2794
|
-
|
|
2820
|
+
init_cjs_shims();
|
|
2795
2821
|
|
|
2796
2822
|
// src/utils/create-context.ts
|
|
2797
|
-
|
|
2823
|
+
init_cjs_shims();
|
|
2798
2824
|
var createContext3 = (name4) => {
|
|
2799
|
-
const Context =
|
|
2825
|
+
const Context = React19__namespace.default.createContext(void 0);
|
|
2800
2826
|
const useContext3 = () => {
|
|
2801
|
-
const ctx =
|
|
2827
|
+
const ctx = React19__namespace.default.useContext(Context);
|
|
2802
2828
|
if (ctx === void 0) {
|
|
2803
2829
|
throw new Error(`useContext for must be inside a ${name4}Provider with a value`);
|
|
2804
2830
|
}
|
|
@@ -2808,9 +2834,9 @@ var createContext3 = (name4) => {
|
|
|
2808
2834
|
};
|
|
2809
2835
|
|
|
2810
2836
|
// src/components/icons/index.tsx
|
|
2811
|
-
|
|
2837
|
+
init_cjs_shims();
|
|
2812
2838
|
function DataSetSVG() {
|
|
2813
|
-
return /* @__PURE__ */
|
|
2839
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2814
2840
|
"svg",
|
|
2815
2841
|
{
|
|
2816
2842
|
width: "25",
|
|
@@ -2820,7 +2846,7 @@ function DataSetSVG() {
|
|
|
2820
2846
|
stroke: "currentColor",
|
|
2821
2847
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2822
2848
|
},
|
|
2823
|
-
/* @__PURE__ */
|
|
2849
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
2824
2850
|
"path",
|
|
2825
2851
|
{
|
|
2826
2852
|
d: "M3.33325 5C3.33325 5.66304 4.03563 6.29893 5.28587 6.76777C6.53612 7.23661 8.23181 7.5 9.99992 7.5C11.768 7.5 13.4637 7.23661 14.714 6.76777C15.9642 6.29893 16.6666 5.66304 16.6666 5C16.6666 4.33696 15.9642 3.70107 14.714 3.23223C13.4637 2.76339 11.768 2.5 9.99992 2.5C8.23181 2.5 6.53612 2.76339 5.28587 3.23223C4.03563 3.70107 3.33325 4.33696 3.33325 5Z",
|
|
@@ -2828,7 +2854,7 @@ function DataSetSVG() {
|
|
|
2828
2854
|
strokeLinejoin: "round"
|
|
2829
2855
|
}
|
|
2830
2856
|
),
|
|
2831
|
-
/* @__PURE__ */
|
|
2857
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
2832
2858
|
"path",
|
|
2833
2859
|
{
|
|
2834
2860
|
d: "M3.33325 5V10C3.33325 10.663 4.03563 11.2989 5.28587 11.7678C6.53612 12.2366 8.23181 12.5 9.99992 12.5C11.768 12.5 13.4637 12.2366 14.714 11.7678C15.9642 11.2989 16.6666 10.663 16.6666 10V5",
|
|
@@ -2836,7 +2862,7 @@ function DataSetSVG() {
|
|
|
2836
2862
|
strokeLinejoin: "round"
|
|
2837
2863
|
}
|
|
2838
2864
|
),
|
|
2839
|
-
/* @__PURE__ */
|
|
2865
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
2840
2866
|
"path",
|
|
2841
2867
|
{
|
|
2842
2868
|
d: "M3.33325 10V15C3.33325 15.663 4.03563 16.2989 5.28587 16.7678C6.53612 17.2366 8.23181 17.5 9.99992 17.5C11.768 17.5 13.4637 17.2366 14.714 16.7678C15.9642 16.2989 16.6666 15.663 16.6666 15V10",
|
|
@@ -2847,7 +2873,7 @@ function DataSetSVG() {
|
|
|
2847
2873
|
);
|
|
2848
2874
|
}
|
|
2849
2875
|
function StackSVG() {
|
|
2850
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2851
2877
|
"svg",
|
|
2852
2878
|
{
|
|
2853
2879
|
width: "15",
|
|
@@ -2856,12 +2882,12 @@ function StackSVG() {
|
|
|
2856
2882
|
fill: "currentColor",
|
|
2857
2883
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2858
2884
|
},
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
2885
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { d: "M14 3.38826C14 1.87066 10.7949 0.588257 7 0.588257C3.20513 0.588257 0 1.87066 0 3.38826V4.78826C0 6.30586 3.20513 7.58826 7 7.58826C10.7949 7.58826 14 6.30586 14 4.78826V3.38826ZM7 12.4883C3.20513 12.4883 0 11.2059 0 9.68826V11.7883C0 13.3059 3.20513 14.5883 7 14.5883C10.7949 14.5883 14 13.3059 14 11.7883V9.68826C14 11.2059 10.7949 12.4883 7 12.4883Z" }),
|
|
2886
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { d: "M14 6.18823C14 7.70583 10.7949 8.98823 7 8.98823C3.20513 8.98823 0 7.70583 0 6.18823V8.28823C0 9.80583 3.20513 11.0882 7 11.0882C10.7949 11.0882 14 9.80583 14 8.28823V6.18823Z" })
|
|
2861
2887
|
);
|
|
2862
2888
|
}
|
|
2863
2889
|
function BarsSVG() {
|
|
2864
|
-
return /* @__PURE__ */
|
|
2890
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2865
2891
|
"svg",
|
|
2866
2892
|
{
|
|
2867
2893
|
width: "15",
|
|
@@ -2870,11 +2896,11 @@ function BarsSVG() {
|
|
|
2870
2896
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2871
2897
|
fill: "currentColor"
|
|
2872
2898
|
},
|
|
2873
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ React19__namespace.default.createElement("path", { d: "M3.78947 9.6H0.631579V4.8H3.78947V9.6ZM7.57895 9.6H4.42105V2.4H7.57895V9.6ZM11.3684 9.6H8.21053V0H11.3684V9.6ZM12 12H0V10.8H12V12Z" })
|
|
2874
2900
|
);
|
|
2875
2901
|
}
|
|
2876
2902
|
function FullScreenSVG() {
|
|
2877
|
-
return /* @__PURE__ */
|
|
2903
|
+
return /* @__PURE__ */ React19__namespace.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5 }, /* @__PURE__ */ React19__namespace.default.createElement("g", { clipPath: "url(#clip0_905_15763)" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2878
2904
|
"path",
|
|
2879
2905
|
{
|
|
2880
2906
|
d: "M3.33325 6.66668V5.00001C3.33325 4.55798 3.50885 4.13406 3.82141 3.8215C4.13397 3.50894 4.55789 3.33334 4.99992 3.33334H6.66659",
|
|
@@ -2882,7 +2908,7 @@ function FullScreenSVG() {
|
|
|
2882
2908
|
strokeLinecap: "round",
|
|
2883
2909
|
strokeLinejoin: "round"
|
|
2884
2910
|
}
|
|
2885
|
-
), /* @__PURE__ */
|
|
2911
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2886
2912
|
"path",
|
|
2887
2913
|
{
|
|
2888
2914
|
d: "M3.33325 13.3333V15C3.33325 15.442 3.50885 15.866 3.82141 16.1785C4.13397 16.4911 4.55789 16.6667 4.99992 16.6667H6.66659",
|
|
@@ -2890,7 +2916,7 @@ function FullScreenSVG() {
|
|
|
2890
2916
|
strokeLinecap: "round",
|
|
2891
2917
|
strokeLinejoin: "round"
|
|
2892
2918
|
}
|
|
2893
|
-
), /* @__PURE__ */
|
|
2919
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2894
2920
|
"path",
|
|
2895
2921
|
{
|
|
2896
2922
|
d: "M13.3333 3.33334H14.9999C15.4419 3.33334 15.8659 3.50894 16.1784 3.8215C16.491 4.13406 16.6666 4.55798 16.6666 5.00001V6.66668",
|
|
@@ -2898,7 +2924,7 @@ function FullScreenSVG() {
|
|
|
2898
2924
|
strokeLinecap: "round",
|
|
2899
2925
|
strokeLinejoin: "round"
|
|
2900
2926
|
}
|
|
2901
|
-
), /* @__PURE__ */
|
|
2927
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2902
2928
|
"path",
|
|
2903
2929
|
{
|
|
2904
2930
|
d: "M13.3333 16.6667H14.9999C15.4419 16.6667 15.8659 16.4911 16.1784 16.1785C16.491 15.866 16.6666 15.442 16.6666 15V13.3333",
|
|
@@ -2906,14 +2932,14 @@ function FullScreenSVG() {
|
|
|
2906
2932
|
strokeLinecap: "round",
|
|
2907
2933
|
strokeLinejoin: "round"
|
|
2908
2934
|
}
|
|
2909
|
-
)), /* @__PURE__ */
|
|
2935
|
+
)), /* @__PURE__ */ React19__namespace.default.createElement("defs", null, /* @__PURE__ */ React19__namespace.default.createElement("clipPath", { id: "clip0_905_15763" }, /* @__PURE__ */ React19__namespace.default.createElement("rect", { width: "20", height: "20", fill: "white" }))));
|
|
2910
2936
|
}
|
|
2911
2937
|
|
|
2912
2938
|
// src/hooks/buildGraph.tsx
|
|
2913
|
-
|
|
2939
|
+
init_cjs_shims();
|
|
2914
2940
|
function useBuildGraph(locale) {
|
|
2915
2941
|
const items = useSelector(selectOlapCubeItems);
|
|
2916
|
-
const graph = useMemo(() => {
|
|
2942
|
+
const graph = React19.useMemo(() => {
|
|
2917
2943
|
const graph2 = new graph_default();
|
|
2918
2944
|
const filteredItems = items.map((item) => {
|
|
2919
2945
|
const { name: name4 } = item;
|
|
@@ -2921,7 +2947,7 @@ function useBuildGraph(locale) {
|
|
|
2921
2947
|
const subtopic = getAnnotation(item, "subtopic", locale);
|
|
2922
2948
|
getAnnotation(item, "table", locale);
|
|
2923
2949
|
const hide = getAnnotation(item, "hide_in_ui", locale);
|
|
2924
|
-
if (!
|
|
2950
|
+
if (!yn__default.default(hide)) {
|
|
2925
2951
|
graph2.addNode(topic);
|
|
2926
2952
|
graph2.addNode(subtopic);
|
|
2927
2953
|
graph2.addNode(name4);
|
|
@@ -2938,10 +2964,10 @@ function useBuildGraph(locale) {
|
|
|
2938
2964
|
}
|
|
2939
2965
|
|
|
2940
2966
|
// src/hooks/cubeSearch.tsx
|
|
2941
|
-
|
|
2967
|
+
init_cjs_shims();
|
|
2942
2968
|
function useCubeSearch(input, graph) {
|
|
2943
2969
|
const { code: locale } = useSelector(selectLocale);
|
|
2944
|
-
const results = useMemo(() => {
|
|
2970
|
+
const results = React19.useMemo(() => {
|
|
2945
2971
|
if (graph.items.length > 0) {
|
|
2946
2972
|
const { matches, map } = graph.filter(locale, input);
|
|
2947
2973
|
return {
|
|
@@ -2960,11 +2986,11 @@ function useCubeSearch(input, graph) {
|
|
|
2960
2986
|
// src/components/SideBar.tsx
|
|
2961
2987
|
var [useSideBar, Provider] = createContext3("SideBar");
|
|
2962
2988
|
function SideBarProvider(props) {
|
|
2963
|
-
const [input, setInput] = useDebouncedState("", 200);
|
|
2964
|
-
const [expanded, setExpanded] = useState(true);
|
|
2989
|
+
const [input, setInput] = hooks.useDebouncedState("", 200);
|
|
2990
|
+
const [expanded, setExpanded] = React19.useState(true);
|
|
2965
2991
|
const graph = useBuildGraph(props.locale);
|
|
2966
2992
|
const { results, map } = useCubeSearch(input, graph);
|
|
2967
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
2968
2994
|
Provider,
|
|
2969
2995
|
{
|
|
2970
2996
|
...props,
|
|
@@ -2987,15 +3013,15 @@ function SideBarControlBtn({ actionIconProps = {} }) {
|
|
|
2987
3013
|
color: t.colorScheme === "dark" ? t.white : t.colors.gray[7]
|
|
2988
3014
|
});
|
|
2989
3015
|
if (expanded) return null;
|
|
2990
|
-
return /* @__PURE__ */
|
|
2991
|
-
ActionIcon,
|
|
3016
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3017
|
+
core.ActionIcon,
|
|
2992
3018
|
{
|
|
2993
3019
|
onClick: () => setExpanded(!expanded),
|
|
2994
3020
|
variant: "subtle",
|
|
2995
3021
|
...actionIconProps,
|
|
2996
|
-
sx: [sx, ...packSx(actionIconProps.sx)]
|
|
3022
|
+
sx: [sx, ...core.packSx(actionIconProps.sx)]
|
|
2997
3023
|
},
|
|
2998
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ React19__namespace.default.createElement(DataSetSVG, null)
|
|
2999
3025
|
);
|
|
3000
3026
|
}
|
|
3001
3027
|
function SideBarControlBtnFixed() {
|
|
@@ -3008,15 +3034,15 @@ function SideBarControlBtnFixed() {
|
|
|
3008
3034
|
height: 50
|
|
3009
3035
|
})
|
|
3010
3036
|
};
|
|
3011
|
-
return /* @__PURE__ */
|
|
3037
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Affix, { position: { left: "1rem", bottom: 150 } }, /* @__PURE__ */ React19__namespace.default.createElement(SideBarControlBtn, { actionIconProps }));
|
|
3012
3038
|
}
|
|
3013
3039
|
function SideBar(props) {
|
|
3014
3040
|
const { expanded, setExpanded } = useSideBar();
|
|
3015
3041
|
const { translate: t } = useTranslation();
|
|
3016
|
-
const theme = useMantineTheme();
|
|
3017
|
-
const smallerThanMd = useMediaQuery(`(max-width: ${theme.breakpoints.md})`);
|
|
3018
|
-
return /* @__PURE__ */
|
|
3019
|
-
Box,
|
|
3042
|
+
const theme = core.useMantineTheme();
|
|
3043
|
+
const smallerThanMd = hooks.useMediaQuery(`(max-width: ${theme.breakpoints.md})`);
|
|
3044
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, smallerThanMd && /* @__PURE__ */ React19__namespace.default.createElement(SideBarControlBtnFixed, null), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3045
|
+
core.Box,
|
|
3020
3046
|
{
|
|
3021
3047
|
id: "dex-sidebar",
|
|
3022
3048
|
py: "md",
|
|
@@ -3041,8 +3067,8 @@ function SideBar(props) {
|
|
|
3041
3067
|
}
|
|
3042
3068
|
})
|
|
3043
3069
|
},
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
Group,
|
|
3070
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { h: "100%", direction: "column", justify: "flex-start" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { px: "sm", my: "sm" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { direction: "column", sx: { flex: 1 } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { align: "center", justify: "apart" }, /* @__PURE__ */ React19__namespace.default.createElement(SideBarControlBtn, null), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3071
|
+
core.Group,
|
|
3046
3072
|
{
|
|
3047
3073
|
position: "apart",
|
|
3048
3074
|
noWrap: true,
|
|
@@ -3053,9 +3079,9 @@ function SideBar(props) {
|
|
|
3053
3079
|
width: expanded ? 300 : 0
|
|
3054
3080
|
}
|
|
3055
3081
|
},
|
|
3056
|
-
/* @__PURE__ */
|
|
3057
|
-
)), /* @__PURE__ */
|
|
3058
|
-
Box,
|
|
3082
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Text, { sx: (t2) => ({ color: t2.colorScheme === "dark" ? t2.white : t2.black }), ml: "sm" }, t("params.label_dataset"))
|
|
3083
|
+
)), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3084
|
+
core.Box,
|
|
3059
3085
|
{
|
|
3060
3086
|
my: "md",
|
|
3061
3087
|
sx: {
|
|
@@ -3065,9 +3091,9 @@ function SideBar(props) {
|
|
|
3065
3091
|
width: expanded ? "100%" : 0
|
|
3066
3092
|
}
|
|
3067
3093
|
},
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
), /* @__PURE__ */
|
|
3070
|
-
ScrollArea,
|
|
3094
|
+
/* @__PURE__ */ React19__namespace.default.createElement(Auto, null)
|
|
3095
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { flexGrow: 1 } }))), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3096
|
+
core.ScrollArea,
|
|
3071
3097
|
{
|
|
3072
3098
|
id: "dex-select-cube-area",
|
|
3073
3099
|
sx: (theme2) => ({
|
|
@@ -3076,9 +3102,9 @@ function SideBar(props) {
|
|
|
3076
3102
|
borderTopStyle: expanded ? "solid" : "none"
|
|
3077
3103
|
})
|
|
3078
3104
|
},
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
), /* @__PURE__ */
|
|
3081
|
-
Group,
|
|
3105
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Box, { h: expanded ? "auto" : "0px" }, props.children)
|
|
3106
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3107
|
+
core.Group,
|
|
3082
3108
|
{
|
|
3083
3109
|
align: "center",
|
|
3084
3110
|
position: expanded ? "right" : "center",
|
|
@@ -3087,8 +3113,8 @@ function SideBar(props) {
|
|
|
3087
3113
|
sx: { alignSelf: "flex-end", marginTop: "auto" },
|
|
3088
3114
|
noWrap: true
|
|
3089
3115
|
},
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
ActionIcon,
|
|
3116
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
3117
|
+
core.ActionIcon,
|
|
3092
3118
|
{
|
|
3093
3119
|
onClick: () => setExpanded(!expanded),
|
|
3094
3120
|
variant: "subtle",
|
|
@@ -3096,7 +3122,7 @@ function SideBar(props) {
|
|
|
3096
3122
|
color: "primaryColor",
|
|
3097
3123
|
sx: (t2) => ({ alignSelf: "flex-end" })
|
|
3098
3124
|
},
|
|
3099
|
-
expanded ? /* @__PURE__ */
|
|
3125
|
+
expanded ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconChevronLeft, { size: "1.5rem" }) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconChevronRight, { size: "1.5rem" })
|
|
3100
3126
|
)
|
|
3101
3127
|
))
|
|
3102
3128
|
));
|
|
@@ -3104,8 +3130,8 @@ function SideBar(props) {
|
|
|
3104
3130
|
var SideBar_default = SideBar;
|
|
3105
3131
|
function SideBarItem({ children }) {
|
|
3106
3132
|
const { expanded } = useSideBar();
|
|
3107
|
-
return /* @__PURE__ */
|
|
3108
|
-
Box,
|
|
3133
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3134
|
+
core.Box,
|
|
3109
3135
|
{
|
|
3110
3136
|
sx: {
|
|
3111
3137
|
overflow: "hidden",
|
|
@@ -3120,10 +3146,10 @@ function SideBarItem({ children }) {
|
|
|
3120
3146
|
function Auto() {
|
|
3121
3147
|
const { translate: t } = useTranslation();
|
|
3122
3148
|
const { expanded, input, setInput } = useSideBar();
|
|
3123
|
-
return /* @__PURE__ */
|
|
3124
|
-
Input,
|
|
3149
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3150
|
+
core.Input,
|
|
3125
3151
|
{
|
|
3126
|
-
icon: /* @__PURE__ */
|
|
3152
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSearch, null),
|
|
3127
3153
|
id: "dex-search",
|
|
3128
3154
|
radius: "xl",
|
|
3129
3155
|
size: "md",
|
|
@@ -3140,8 +3166,8 @@ function Auto() {
|
|
|
3140
3166
|
whiteSpace: "nowrap"
|
|
3141
3167
|
}
|
|
3142
3168
|
},
|
|
3143
|
-
rightSection: /* @__PURE__ */
|
|
3144
|
-
CloseButton,
|
|
3169
|
+
rightSection: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3170
|
+
core.CloseButton,
|
|
3145
3171
|
{
|
|
3146
3172
|
"aria-label": "Clear input",
|
|
3147
3173
|
onClick: () => setInput(""),
|
|
@@ -3161,11 +3187,11 @@ function Results(props) {
|
|
|
3161
3187
|
if (map) {
|
|
3162
3188
|
for (let [key, items] of map) {
|
|
3163
3189
|
const [topic, subtopic] = key.split(" - ");
|
|
3164
|
-
const component = /* @__PURE__ */
|
|
3190
|
+
const component = /* @__PURE__ */ React19__namespace.default.createElement("div", { key }, /* @__PURE__ */ React19__namespace.default.createElement(core.Divider, { my: "xs", label: key }), items.map((item) => {
|
|
3165
3191
|
const cube = getCube2(graph.items, item, subtopic, locale);
|
|
3166
3192
|
const table = getAnnotation(cube, "table", locale);
|
|
3167
|
-
return /* @__PURE__ */
|
|
3168
|
-
Text,
|
|
3193
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3194
|
+
core.Text,
|
|
3169
3195
|
{
|
|
3170
3196
|
key: cube.name,
|
|
3171
3197
|
component: "a",
|
|
@@ -3183,9 +3209,9 @@ function Results(props) {
|
|
|
3183
3209
|
result.push(component);
|
|
3184
3210
|
}
|
|
3185
3211
|
}
|
|
3186
|
-
return /* @__PURE__ */
|
|
3212
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { px: "sm" }, result);
|
|
3187
3213
|
}
|
|
3188
|
-
var useStyles2 = createStyles((theme) => ({
|
|
3214
|
+
var useStyles2 = core.createStyles((theme) => ({
|
|
3189
3215
|
link: {
|
|
3190
3216
|
...theme.fn.focusStyles(),
|
|
3191
3217
|
WebkitTapHighlightColor: "transparent",
|
|
@@ -3194,7 +3220,7 @@ var useStyles2 = createStyles((theme) => ({
|
|
|
3194
3220
|
textDecoration: "none",
|
|
3195
3221
|
color: theme.colorScheme === "dark" ? theme.colors.dark[1] : theme.colors.gray[7],
|
|
3196
3222
|
padding: theme.spacing.xs,
|
|
3197
|
-
minHeight: rem(20),
|
|
3223
|
+
minHeight: core.rem(20),
|
|
3198
3224
|
fontSize: theme.fontSizes.sm,
|
|
3199
3225
|
whiteSpace: "wrap",
|
|
3200
3226
|
cursor: "pointer",
|
|
@@ -3219,24 +3245,24 @@ var EMPTY_RESPONSE = {
|
|
|
3219
3245
|
page: { offset: 0, limit: 0, total: 0 }
|
|
3220
3246
|
};
|
|
3221
3247
|
function SelectCube({ locale }) {
|
|
3222
|
-
const items = useSelector
|
|
3223
|
-
const selectedItem = useSelector
|
|
3248
|
+
const items = reactRedux.useSelector(selectOlapCubeItems);
|
|
3249
|
+
const selectedItem = reactRedux.useSelector(selectOlapCube);
|
|
3224
3250
|
if (items.length === 1) {
|
|
3225
3251
|
return null;
|
|
3226
3252
|
}
|
|
3227
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(SelectCubeInternal, { items, selectedItem, locale });
|
|
3228
3254
|
}
|
|
3229
3255
|
function SelectCubeInternal(props) {
|
|
3230
3256
|
const { measuresActive } = useSettings();
|
|
3231
3257
|
const { items, selectedItem, locale } = props;
|
|
3232
3258
|
const { updateMeasure, updateDrilldown, willFetchMembers: willFetchMembers2, updateCut } = useActions();
|
|
3233
|
-
const cutItems = useSelector
|
|
3234
|
-
const cube = useSelector
|
|
3235
|
-
const itemMap = useSelector
|
|
3236
|
-
const dimensions = useSelector
|
|
3237
|
-
const drilldowns = useSelector
|
|
3238
|
-
const ditems = useSelector
|
|
3239
|
-
const createCutHandler = useCallback((level) => {
|
|
3259
|
+
const cutItems = reactRedux.useSelector(selectCutItems);
|
|
3260
|
+
const cube = reactRedux.useSelector(selectCubeName);
|
|
3261
|
+
const itemMap = reactRedux.useSelector(selectMeasureMap);
|
|
3262
|
+
const dimensions = reactRedux.useSelector(selectOlapDimensionItems);
|
|
3263
|
+
const drilldowns = reactRedux.useSelector(selectDrilldownMap);
|
|
3264
|
+
const ditems = reactRedux.useSelector(selectDrilldownItems);
|
|
3265
|
+
const createCutHandler = React19.useCallback((level) => {
|
|
3240
3266
|
updateCut(buildCut({ ...level, active: false }));
|
|
3241
3267
|
}, []);
|
|
3242
3268
|
function createDrilldown(level, cuts) {
|
|
@@ -3256,7 +3282,7 @@ function SelectCubeInternal(props) {
|
|
|
3256
3282
|
return drilldown;
|
|
3257
3283
|
}
|
|
3258
3284
|
}
|
|
3259
|
-
useEffect(() => {
|
|
3285
|
+
React19.useEffect(() => {
|
|
3260
3286
|
const params = new URLSearchParams(location.search);
|
|
3261
3287
|
const cubeParam = params.get("cube");
|
|
3262
3288
|
if (selectedItem && cube && !cubeParam) {
|
|
@@ -3276,10 +3302,10 @@ function SelectCubeInternal(props) {
|
|
|
3276
3302
|
}
|
|
3277
3303
|
}
|
|
3278
3304
|
}, [selectedItem, cube, measuresActive]);
|
|
3279
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { id: "dex-select-cube", spacing: "xs", w: "100%" }, /* @__PURE__ */ React19__namespace.default.createElement(CubeTree, { items, locale, selectedItem }));
|
|
3280
3306
|
}
|
|
3281
3307
|
function AccordionControl(props) {
|
|
3282
|
-
return /* @__PURE__ */
|
|
3308
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Accordion.Control, { ...props }));
|
|
3283
3309
|
}
|
|
3284
3310
|
function getKeys2(items, k, locale, filter) {
|
|
3285
3311
|
let cubes = items;
|
|
@@ -3313,7 +3339,7 @@ function CubeTree({
|
|
|
3313
3339
|
const { translate: t } = useTranslation();
|
|
3314
3340
|
const { measuresActive } = useSettings();
|
|
3315
3341
|
const actions2 = useActions();
|
|
3316
|
-
const query = useSelector
|
|
3342
|
+
const query = reactRedux.useSelector(selectCurrentQueryParams);
|
|
3317
3343
|
const onSelectCube = (table, subtopic) => {
|
|
3318
3344
|
const cube = items.find(
|
|
3319
3345
|
(item) => item.name === table && getAnnotation(item, "subtopic", locale) === subtopic
|
|
@@ -3328,15 +3354,15 @@ function CubeTree({
|
|
|
3328
3354
|
});
|
|
3329
3355
|
}
|
|
3330
3356
|
};
|
|
3331
|
-
let topics = useMemo(
|
|
3357
|
+
let topics = React19.useMemo(
|
|
3332
3358
|
() => getKeys2(graph.items, "topic", locale),
|
|
3333
3359
|
[graph.items, locale]
|
|
3334
3360
|
);
|
|
3335
3361
|
topics = [topics[0], topics[1]];
|
|
3336
3362
|
if (input.length > 0 && map && !(map.size > 0)) {
|
|
3337
|
-
return /* @__PURE__ */
|
|
3363
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { ta: "center", fz: "xs", my: "sm", italic: true }, t("params.label_no_results"));
|
|
3338
3364
|
}
|
|
3339
|
-
return map && map.size > 0 ? /* @__PURE__ */
|
|
3365
|
+
return map && map.size > 0 ? /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3340
3366
|
Results_default,
|
|
3341
3367
|
{
|
|
3342
3368
|
onSelectCube,
|
|
@@ -3346,7 +3372,7 @@ function CubeTree({
|
|
|
3346
3372
|
graph,
|
|
3347
3373
|
locale
|
|
3348
3374
|
}
|
|
3349
|
-
) : graph.items.length > 0 && /* @__PURE__ */
|
|
3375
|
+
) : graph.items.length > 0 && /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3350
3376
|
RootAccordions,
|
|
3351
3377
|
{
|
|
3352
3378
|
items: topics,
|
|
@@ -3358,9 +3384,9 @@ function CubeTree({
|
|
|
3358
3384
|
);
|
|
3359
3385
|
}
|
|
3360
3386
|
function useAccordionValue(key, locale) {
|
|
3361
|
-
const selectedItem = useSelector
|
|
3362
|
-
const [value, setValue] = useState(null);
|
|
3363
|
-
useEffect(() => {
|
|
3387
|
+
const selectedItem = reactRedux.useSelector(selectOlapCube);
|
|
3388
|
+
const [value, setValue] = React19.useState(null);
|
|
3389
|
+
React19.useEffect(() => {
|
|
3364
3390
|
if (selectedItem) {
|
|
3365
3391
|
const value2 = getAnnotation(selectedItem, key, locale);
|
|
3366
3392
|
setValue(`${key}-${value2}`);
|
|
@@ -3370,8 +3396,8 @@ function useAccordionValue(key, locale) {
|
|
|
3370
3396
|
}
|
|
3371
3397
|
function RootAccordions({ items, graph, locale, selectedItem, onSelectCube }) {
|
|
3372
3398
|
const { value, setValue } = useAccordionValue("topic", locale);
|
|
3373
|
-
return /* @__PURE__ */
|
|
3374
|
-
Accordion,
|
|
3399
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3400
|
+
core.Accordion,
|
|
3375
3401
|
{
|
|
3376
3402
|
value,
|
|
3377
3403
|
onChange: setValue,
|
|
@@ -3401,7 +3427,7 @@ function RootAccordions({ items, graph, locale, selectedItem, onSelectCube }) {
|
|
|
3401
3427
|
})
|
|
3402
3428
|
},
|
|
3403
3429
|
items.map((item) => {
|
|
3404
|
-
return /* @__PURE__ */
|
|
3430
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Accordion.Item, { value: `topic-${item}`, key: `topic-${item}` }, /* @__PURE__ */ React19__namespace.default.createElement(AccordionControl, null, item), /* @__PURE__ */ React19__namespace.default.createElement(core.Accordion.Panel, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3405
3431
|
SubtopicAccordion,
|
|
3406
3432
|
{
|
|
3407
3433
|
graph,
|
|
@@ -3427,8 +3453,8 @@ function CubeButton({
|
|
|
3427
3453
|
const { classes } = useStyles2();
|
|
3428
3454
|
const table = graph.getName(item, locale);
|
|
3429
3455
|
const subtopic = parent != null ? parent : "";
|
|
3430
|
-
return /* @__PURE__ */
|
|
3431
|
-
Text,
|
|
3456
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3457
|
+
core.Text,
|
|
3432
3458
|
{
|
|
3433
3459
|
key: `table-${item}`,
|
|
3434
3460
|
fz: "xs",
|
|
@@ -3455,8 +3481,8 @@ function SubtopicAccordion({
|
|
|
3455
3481
|
locale
|
|
3456
3482
|
}) {
|
|
3457
3483
|
const { value, setValue } = useAccordionValue("subtopic", locale);
|
|
3458
|
-
return /* @__PURE__ */
|
|
3459
|
-
Accordion,
|
|
3484
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3485
|
+
core.Accordion,
|
|
3460
3486
|
{
|
|
3461
3487
|
value,
|
|
3462
3488
|
onChange: setValue,
|
|
@@ -3482,7 +3508,7 @@ function SubtopicAccordion({
|
|
|
3482
3508
|
},
|
|
3483
3509
|
[...items].map((item, index) => {
|
|
3484
3510
|
const filtered = [...graph.adjList[item]].filter((value2) => value2 !== parent);
|
|
3485
|
-
return /* @__PURE__ */
|
|
3511
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Accordion.Item, { value: `subtopic-${item}`, key: `subtopic-${item}-${index}` }, /* @__PURE__ */ React19__namespace.default.createElement(AccordionControl, null, item), /* @__PURE__ */ React19__namespace.default.createElement(core.Accordion.Panel, null, filtered.map((table, index2) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3486
3512
|
CubeButton,
|
|
3487
3513
|
{
|
|
3488
3514
|
key: index2,
|
|
@@ -3522,11 +3548,11 @@ var localeSelectorStyle = (theme) => ({
|
|
|
3522
3548
|
function LocaleSelector() {
|
|
3523
3549
|
const actions2 = useActions();
|
|
3524
3550
|
const { translate: t, locale } = useTranslation();
|
|
3525
|
-
const { code: currentCode } = useSelector
|
|
3526
|
-
const { localeOptions } = useSelector
|
|
3527
|
-
const theme = useMantineTheme();
|
|
3528
|
-
const options = useMemo(() => {
|
|
3529
|
-
const languages =
|
|
3551
|
+
const { code: currentCode } = reactRedux.useSelector(selectLocale);
|
|
3552
|
+
const { localeOptions } = reactRedux.useSelector(selectServerState);
|
|
3553
|
+
const theme = core.useMantineTheme();
|
|
3554
|
+
const options = React19.useMemo(() => {
|
|
3555
|
+
const languages = ISO6391__default.default.getLanguages(localeOptions);
|
|
3530
3556
|
return languages.map((lang) => ({
|
|
3531
3557
|
label: t("params.label_localeoption", {
|
|
3532
3558
|
code: lang.code,
|
|
@@ -3549,7 +3575,7 @@ function LocaleSelector() {
|
|
|
3549
3575
|
if (localeOptions.length < 2) {
|
|
3550
3576
|
return null;
|
|
3551
3577
|
}
|
|
3552
|
-
return /* @__PURE__ */
|
|
3578
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { id: "dex-select-locale" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Tooltip, { label: t("params.label_locale") }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3553
3579
|
SelectObject,
|
|
3554
3580
|
{
|
|
3555
3581
|
getLabel: "value",
|
|
@@ -3559,8 +3585,8 @@ function LocaleSelector() {
|
|
|
3559
3585
|
selectedItem: currentCode,
|
|
3560
3586
|
selectProps: {
|
|
3561
3587
|
styles: localeSelectorStyle,
|
|
3562
|
-
icon: /* @__PURE__ */
|
|
3563
|
-
IconLanguage,
|
|
3588
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3589
|
+
iconsReact.IconLanguage,
|
|
3564
3590
|
{
|
|
3565
3591
|
size: "0.8rem",
|
|
3566
3592
|
color: theme.colorScheme === "dark" ? theme.fn.lighten(theme.fn.primaryColor(), 0.8) : theme.fn.primaryColor()
|
|
@@ -3576,20 +3602,20 @@ var formatter = new Intl.NumberFormat("en-US", {
|
|
|
3576
3602
|
maximumFractionDigits: 0
|
|
3577
3603
|
});
|
|
3578
3604
|
function TableFooter(props) {
|
|
3579
|
-
const loading = useSelector
|
|
3605
|
+
const loading = reactRedux.useSelector(selectLoadingState);
|
|
3580
3606
|
const { paginationConfig } = useSettings();
|
|
3581
3607
|
const { result, table, data = [], isLoading, pagination, setPagination } = props;
|
|
3582
3608
|
const { translate: t } = useTranslation();
|
|
3583
3609
|
const { url } = result;
|
|
3584
|
-
const { copy, copied } = useClipboard({ timeout: 1e3 });
|
|
3585
|
-
const copyHandler = useCallback(() => copy(url), [url]);
|
|
3610
|
+
const { copy, copied } = hooks.useClipboard({ timeout: 1e3 });
|
|
3611
|
+
const copyHandler = React19.useCallback(() => copy(url), [url]);
|
|
3586
3612
|
const totalRowCount = table.options.rowCount;
|
|
3587
3613
|
const {
|
|
3588
3614
|
pagination: { pageSize }
|
|
3589
3615
|
} = table.getState();
|
|
3590
3616
|
const showPagination = totalRowCount && Boolean(totalRowCount > pageSize);
|
|
3591
|
-
return /* @__PURE__ */
|
|
3592
|
-
Flex,
|
|
3617
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { w: "100%", sx: { flex: "0 0 70px" } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3618
|
+
core.Flex,
|
|
3593
3619
|
{
|
|
3594
3620
|
p: "md",
|
|
3595
3621
|
justify: "space-between",
|
|
@@ -3597,8 +3623,8 @@ function TableFooter(props) {
|
|
|
3597
3623
|
direction: { base: "column-reverse", md: "row" },
|
|
3598
3624
|
gap: "sm"
|
|
3599
3625
|
},
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
!loading.loading && !isLoading && /* @__PURE__ */
|
|
3626
|
+
/* @__PURE__ */ React19__namespace.default.createElement(CubeSource, null),
|
|
3627
|
+
!loading.loading && !isLoading && /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { position: "right", spacing: "sm" }, /* @__PURE__ */ React19__namespace.default.createElement(LocaleSelector, null), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { maw: "7rem", miw: "fit" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3602
3628
|
SelectObject,
|
|
3603
3629
|
{
|
|
3604
3630
|
getValue: (item) => item.value,
|
|
@@ -3607,24 +3633,24 @@ function TableFooter(props) {
|
|
|
3607
3633
|
selectedItem: { value: pagination == null ? void 0 : pagination.pageSize },
|
|
3608
3634
|
onItemSelect: (item) => setPagination && setPagination({ pageIndex: 0, pageSize: item.value })
|
|
3609
3635
|
}
|
|
3610
|
-
)), totalRowCount && /* @__PURE__ */
|
|
3636
|
+
)), totalRowCount && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { c: "dimmed" }, t("results.count_rows_plural", { n: formatter.format(totalRowCount) })), showPagination && /* @__PURE__ */ React19__namespace.default.createElement(mantineReactTable.MRT_TablePagination, { table }), /* @__PURE__ */ React19__namespace.default.createElement(ApiAndCsvButtons, { copied, copyHandler, url, data }))
|
|
3611
3637
|
));
|
|
3612
3638
|
}
|
|
3613
3639
|
var ApiAndCsvButtons = (props) => {
|
|
3614
3640
|
const { copied, copyHandler, url, data } = props;
|
|
3615
3641
|
const { translate: t } = useTranslation();
|
|
3616
|
-
return /* @__PURE__ */
|
|
3617
|
-
Button,
|
|
3642
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { id: "query-results-debug-view" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { spacing: "xs" }, url && /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3643
|
+
core.Button,
|
|
3618
3644
|
{
|
|
3619
3645
|
id: "dex-api-btn",
|
|
3620
3646
|
variant: "subtle",
|
|
3621
|
-
leftIcon: /* @__PURE__ */
|
|
3647
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconCopy, { size: 20 }),
|
|
3622
3648
|
sx: { height: 30 },
|
|
3623
3649
|
onClick: copyHandler
|
|
3624
3650
|
},
|
|
3625
3651
|
copied ? t("action_copy_done") : t("action_copy"),
|
|
3626
3652
|
" API"
|
|
3627
|
-
), /* @__PURE__ */
|
|
3653
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(DownloadQuery, { data })));
|
|
3628
3654
|
};
|
|
3629
3655
|
var DownloadQuery = ({ data }) => {
|
|
3630
3656
|
const actions2 = useActions();
|
|
@@ -3632,11 +3658,11 @@ var DownloadQuery = ({ data }) => {
|
|
|
3632
3658
|
const formats = Object.values(Format);
|
|
3633
3659
|
const components = [];
|
|
3634
3660
|
components.push(
|
|
3635
|
-
/* @__PURE__ */
|
|
3661
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
3636
3662
|
ButtonDownload,
|
|
3637
3663
|
{
|
|
3638
3664
|
variant: "light",
|
|
3639
|
-
leftIcon: /* @__PURE__ */
|
|
3665
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconDownload, { size: 20 }),
|
|
3640
3666
|
sx: { height: 30 },
|
|
3641
3667
|
key: "download_csv",
|
|
3642
3668
|
provider: () => actions2.willDownloadQuery("csv")
|
|
@@ -3647,7 +3673,7 @@ var DownloadQuery = ({ data }) => {
|
|
|
3647
3673
|
if (components.length === 0 || data.length === 0) {
|
|
3648
3674
|
return null;
|
|
3649
3675
|
}
|
|
3650
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { id: "dex-btn-group-download" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { spacing: "xs" }, components, /* @__PURE__ */ React19__namespace.default.createElement(MenuOpts, { formats: formats.filter((f) => f !== "csv") })));
|
|
3651
3677
|
};
|
|
3652
3678
|
var mimeTypes = {
|
|
3653
3679
|
csv: "text/csv",
|
|
@@ -3659,7 +3685,7 @@ var mimeTypes = {
|
|
|
3659
3685
|
function useDownload(props) {
|
|
3660
3686
|
const { provider } = props;
|
|
3661
3687
|
const { run, data: file, error, isLoading } = useAsync();
|
|
3662
|
-
useEffect(() => {
|
|
3688
|
+
React19.useEffect(() => {
|
|
3663
3689
|
if (file) {
|
|
3664
3690
|
const blob = typeof file.content !== "string" ? file.content : new window.Blob([file.content], {
|
|
3665
3691
|
type: mimeTypes[file.extension] || "application/octet-stream"
|
|
@@ -3680,7 +3706,7 @@ function useDownload(props) {
|
|
|
3680
3706
|
anchor.click();
|
|
3681
3707
|
}
|
|
3682
3708
|
}, [file]);
|
|
3683
|
-
const onClick = useCallback(
|
|
3709
|
+
const onClick = React19.useCallback(
|
|
3684
3710
|
(evt) => {
|
|
3685
3711
|
evt.stopPropagation();
|
|
3686
3712
|
evt.preventDefault();
|
|
@@ -3693,13 +3719,13 @@ function useDownload(props) {
|
|
|
3693
3719
|
var ButtonDownload = (props) => {
|
|
3694
3720
|
const { provider, ...buttonProps } = props;
|
|
3695
3721
|
const { onClick, isLoading } = useDownload({ provider });
|
|
3696
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Button, { ...buttonProps, onClick, loading: isLoading }, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { fz: "sm" }, props.children));
|
|
3697
3723
|
};
|
|
3698
3724
|
var ItemDownload = (props) => {
|
|
3699
3725
|
const { provider, icon, setOpened, ...itemProps } = props;
|
|
3700
3726
|
const { onClick, isLoading } = useDownload({ provider });
|
|
3701
|
-
return /* @__PURE__ */
|
|
3702
|
-
Menu.Item,
|
|
3727
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3728
|
+
core.Menu.Item,
|
|
3703
3729
|
{
|
|
3704
3730
|
...itemProps,
|
|
3705
3731
|
icon: icon(isLoading),
|
|
@@ -3710,30 +3736,30 @@ var ItemDownload = (props) => {
|
|
|
3710
3736
|
});
|
|
3711
3737
|
}
|
|
3712
3738
|
},
|
|
3713
|
-
/* @__PURE__ */
|
|
3739
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Text, { fz: "sm" }, props.children)
|
|
3714
3740
|
);
|
|
3715
3741
|
};
|
|
3716
3742
|
function MenuOpts({ formats }) {
|
|
3717
3743
|
const actions2 = useActions();
|
|
3718
3744
|
const { translate: t } = useTranslation();
|
|
3719
|
-
const [opened, setOpened] = useState(false);
|
|
3720
|
-
const ref = useClickOutside(() => setOpened(false));
|
|
3721
|
-
const buttons = useMemo(
|
|
3722
|
-
() => formats.map((format2) => /* @__PURE__ */
|
|
3745
|
+
const [opened, setOpened] = React19.useState(false);
|
|
3746
|
+
const ref = hooks.useClickOutside(() => setOpened(false));
|
|
3747
|
+
const buttons = React19.useMemo(
|
|
3748
|
+
() => formats.map((format2) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3723
3749
|
ItemDownload,
|
|
3724
3750
|
{
|
|
3725
3751
|
component: "a",
|
|
3726
3752
|
key: format2,
|
|
3727
3753
|
provider: () => actions2.willDownloadQuery(format2),
|
|
3728
|
-
icon: (loading) => loading ? /* @__PURE__ */
|
|
3754
|
+
icon: (loading) => loading ? /* @__PURE__ */ React19__namespace.default.createElement(core.Loader, { size: 15 }) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconDownload, { size: 15 }),
|
|
3729
3755
|
setOpened
|
|
3730
3756
|
},
|
|
3731
|
-
/* @__PURE__ */
|
|
3757
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Text, { size: "xs" }, t(`formats.${format2}`))
|
|
3732
3758
|
)),
|
|
3733
3759
|
[formats, t]
|
|
3734
3760
|
);
|
|
3735
|
-
return /* @__PURE__ */
|
|
3736
|
-
ActionIcon,
|
|
3761
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Menu, { shadow: "md", width: 200, opened }, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Target, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
3762
|
+
core.ActionIcon,
|
|
3737
3763
|
{
|
|
3738
3764
|
onClick: () => setOpened((o) => !o),
|
|
3739
3765
|
variant: "filled",
|
|
@@ -3743,8 +3769,8 @@ function MenuOpts({ formats }) {
|
|
|
3743
3769
|
minWidth: 0
|
|
3744
3770
|
}
|
|
3745
3771
|
},
|
|
3746
|
-
/* @__PURE__ */
|
|
3747
|
-
)), /* @__PURE__ */
|
|
3772
|
+
/* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconDotsVertical, { size: "0.8rem" })
|
|
3773
|
+
)), /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Label, null, t("params.title_downloaddata")), /* @__PURE__ */ React19__namespace.default.createElement("div", { ref }, buttons)));
|
|
3748
3774
|
}
|
|
3749
3775
|
var TableFooter_default = TableFooter;
|
|
3750
3776
|
|
|
@@ -3788,9 +3814,9 @@ function showTrashIcon(columns, type) {
|
|
|
3788
3814
|
}
|
|
3789
3815
|
var getActionIcon = (entityType) => {
|
|
3790
3816
|
if (entityType === "measure") {
|
|
3791
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { size: "md", color: "red" }, /* @__PURE__ */ React19__namespace.default.createElement(BarsSVG, null));
|
|
3792
3818
|
} else if (entityType === "level") {
|
|
3793
|
-
return /* @__PURE__ */
|
|
3819
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { size: "md", color: "blue" }, /* @__PURE__ */ React19__namespace.default.createElement(StackSVG, null));
|
|
3794
3820
|
}
|
|
3795
3821
|
};
|
|
3796
3822
|
var getEntityText = (entityType) => {
|
|
@@ -3814,11 +3840,11 @@ function getMantineFilterMultiSelectProps(isId, isNumeric, range) {
|
|
|
3814
3840
|
function getSortIcon(value, entityType) {
|
|
3815
3841
|
switch (value) {
|
|
3816
3842
|
case "asc":
|
|
3817
|
-
return entityType === "measure" ? /* @__PURE__ */
|
|
3843
|
+
return entityType === "measure" ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSortAscendingNumbers, null) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSortAscendingLetters, null);
|
|
3818
3844
|
case "desc":
|
|
3819
|
-
return entityType === "measure" ? /* @__PURE__ */
|
|
3845
|
+
return entityType === "measure" ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSortDescendingNumbers, null) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSortDescendingLetters, null);
|
|
3820
3846
|
default:
|
|
3821
|
-
return /* @__PURE__ */
|
|
3847
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowsSort, null);
|
|
3822
3848
|
}
|
|
3823
3849
|
}
|
|
3824
3850
|
function getFiltersConditions(fn, value) {
|
|
@@ -3853,18 +3879,18 @@ function getFiltersConditions(fn, value) {
|
|
|
3853
3879
|
return (_a = comparisonMap.get(fn)) == null ? void 0 : _a(value);
|
|
3854
3880
|
}
|
|
3855
3881
|
function useTableData({ columns, pagination, cube }) {
|
|
3856
|
-
const { code: locale } = useSelector
|
|
3882
|
+
const { code: locale } = reactRedux.useSelector(selectLocale);
|
|
3857
3883
|
const permaKey = useKey();
|
|
3858
|
-
const loadingState = useSelector
|
|
3884
|
+
const loadingState = reactRedux.useSelector(selectLoadingState);
|
|
3859
3885
|
const actions2 = useActions();
|
|
3860
3886
|
const pageSize = pagination.pageSize;
|
|
3861
3887
|
const page = pagination.pageIndex;
|
|
3862
3888
|
const enabled = Boolean(columns.length);
|
|
3863
3889
|
const initialKey = permaKey ? [permaKey, page, pageSize] : permaKey;
|
|
3864
|
-
const [filterKeydebouced, setDebouncedTerm] = useState(initialKey);
|
|
3865
|
-
useEffect(() => {
|
|
3890
|
+
const [filterKeydebouced, setDebouncedTerm] = React19.useState(initialKey);
|
|
3891
|
+
React19.useEffect(() => {
|
|
3866
3892
|
if (!enabled && permaKey) return;
|
|
3867
|
-
const handler =
|
|
3893
|
+
const handler = debounce__default.default(
|
|
3868
3894
|
() => {
|
|
3869
3895
|
const term = [permaKey, page, pageSize];
|
|
3870
3896
|
setDebouncedTerm(term);
|
|
@@ -3874,7 +3900,7 @@ function useTableData({ columns, pagination, cube }) {
|
|
|
3874
3900
|
handler();
|
|
3875
3901
|
return () => handler.cancel();
|
|
3876
3902
|
}, [page, enabled, locale, pageSize, loadingState.loading, permaKey]);
|
|
3877
|
-
const query = useQuery({
|
|
3903
|
+
const query = reactQuery.useQuery({
|
|
3878
3904
|
queryKey: ["table", filterKeydebouced],
|
|
3879
3905
|
queryFn: () => actions2.willFetchQuery().then((result) => {
|
|
3880
3906
|
actions2.updateResult(result);
|
|
@@ -3883,7 +3909,7 @@ function useTableData({ columns, pagination, cube }) {
|
|
|
3883
3909
|
staleTime: 3e5,
|
|
3884
3910
|
enabled: enabled && !!filterKeydebouced
|
|
3885
3911
|
});
|
|
3886
|
-
const client = useQueryClient();
|
|
3912
|
+
const client = reactQuery.useQueryClient();
|
|
3887
3913
|
const cachedData = client.getQueryData(["table", filterKeydebouced]);
|
|
3888
3914
|
useUpdatePermaLink({
|
|
3889
3915
|
isFetched: Boolean(cachedData),
|
|
@@ -3900,14 +3926,14 @@ function usePrefetch({
|
|
|
3900
3926
|
pagination,
|
|
3901
3927
|
isFetching
|
|
3902
3928
|
}) {
|
|
3903
|
-
const queryClient2 = useQueryClient();
|
|
3929
|
+
const queryClient2 = reactQuery.useQueryClient();
|
|
3904
3930
|
const actions2 = useActions();
|
|
3905
3931
|
const page = pagination.pageIndex + 1;
|
|
3906
3932
|
const pageSize = pagination.pageSize;
|
|
3907
3933
|
const hasMore = page * pageSize <= totalRowCount;
|
|
3908
3934
|
const off = page * pageSize;
|
|
3909
3935
|
const paramKey = useKey({ pagiLimit: pageSize, pagiOffset: off });
|
|
3910
|
-
useEffect(() => {
|
|
3936
|
+
React19.useEffect(() => {
|
|
3911
3937
|
const key = [paramKey, page, pageSize];
|
|
3912
3938
|
if (!isPlaceholderData && hasMore && !isFetching) {
|
|
3913
3939
|
queryClient2.prefetchQuery({
|
|
@@ -3937,37 +3963,37 @@ function useTable({
|
|
|
3937
3963
|
columnSorting = columnSrt,
|
|
3938
3964
|
...mantineTableProps
|
|
3939
3965
|
}) {
|
|
3940
|
-
const filterItems = useSelector
|
|
3941
|
-
const filtersMap = useSelector
|
|
3942
|
-
const measuresOlap = useSelector
|
|
3943
|
-
const measuresMap = useSelector
|
|
3944
|
-
const drilldowns = useSelector
|
|
3945
|
-
const { code: locale } = useSelector
|
|
3946
|
-
const measures = useSelector
|
|
3966
|
+
const filterItems = reactRedux.useSelector(selectFilterItems);
|
|
3967
|
+
const filtersMap = reactRedux.useSelector(selectFilterMap);
|
|
3968
|
+
const measuresOlap = reactRedux.useSelector(selectOlapMeasureItems);
|
|
3969
|
+
const measuresMap = reactRedux.useSelector(selectMeasureMap);
|
|
3970
|
+
const drilldowns = reactRedux.useSelector(selectDrilldownItems);
|
|
3971
|
+
const { code: locale } = reactRedux.useSelector(selectLocale);
|
|
3972
|
+
const measures = reactRedux.useSelector(selectMeasureItems);
|
|
3947
3973
|
const actions2 = useActions();
|
|
3948
|
-
const { limit, offset } = useSelector
|
|
3949
|
-
const [pagination, setPagination] = useState({
|
|
3974
|
+
const { limit, offset } = reactRedux.useSelector(selectPaginationParams);
|
|
3975
|
+
const [pagination, setPagination] = React19.useState({
|
|
3950
3976
|
pageIndex: offset,
|
|
3951
3977
|
pageSize: limit
|
|
3952
3978
|
});
|
|
3953
|
-
const finalUniqueKeys = useMemo(
|
|
3979
|
+
const finalUniqueKeys = React19.useMemo(
|
|
3954
3980
|
() => [
|
|
3955
3981
|
...measures.map((m) => m.active ? m.name : null),
|
|
3956
3982
|
...drilldowns.map((d) => d.active ? d.level : null)
|
|
3957
3983
|
].filter((a) => a !== null),
|
|
3958
3984
|
[measures, drilldowns]
|
|
3959
3985
|
);
|
|
3960
|
-
const handlerCreateMeasure = useCallback((data2) => {
|
|
3986
|
+
const handlerCreateMeasure = React19.useCallback((data2) => {
|
|
3961
3987
|
const measure = buildMeasure(data2);
|
|
3962
3988
|
actions2.updateMeasure(measure);
|
|
3963
3989
|
return measure;
|
|
3964
3990
|
}, []);
|
|
3965
|
-
const handlerCreateFilter = useCallback((data2) => {
|
|
3991
|
+
const handlerCreateFilter = React19.useCallback((data2) => {
|
|
3966
3992
|
const filter = buildFilter(data2);
|
|
3967
3993
|
actions2.updateFilter(filter);
|
|
3968
3994
|
return filter;
|
|
3969
3995
|
}, []);
|
|
3970
|
-
useLayoutEffect(() => {
|
|
3996
|
+
React19.useLayoutEffect(() => {
|
|
3971
3997
|
filterMap(measuresOlap, (m) => {
|
|
3972
3998
|
const measure = measuresMap[m.name] || handlerCreateMeasure({ ...m, active: false });
|
|
3973
3999
|
const foundFilter = filtersMap[m.name] || filterItems.find((f) => f.measure === measure.name);
|
|
@@ -4002,7 +4028,7 @@ function useTable({
|
|
|
4002
4028
|
pagination,
|
|
4003
4029
|
isFetching: isFetching || isLoading
|
|
4004
4030
|
});
|
|
4005
|
-
useEffect(() => {
|
|
4031
|
+
React19.useEffect(() => {
|
|
4006
4032
|
actions2.updatePagination({
|
|
4007
4033
|
limit: pagination.pageSize,
|
|
4008
4034
|
offset: pagination.pageIndex * pagination.pageSize
|
|
@@ -4010,8 +4036,8 @@ function useTable({
|
|
|
4010
4036
|
}, [pagination]);
|
|
4011
4037
|
const { translate: t } = useTranslation();
|
|
4012
4038
|
const { getFormat, getFormatter } = useFormatter();
|
|
4013
|
-
const { sortKey, sortDir } = useSelector
|
|
4014
|
-
const columns = useMemo(() => {
|
|
4039
|
+
const { sortKey, sortDir } = reactRedux.useSelector(selectSortingParams);
|
|
4040
|
+
const columns = React19.useMemo(() => {
|
|
4015
4041
|
const indexColumn = {
|
|
4016
4042
|
id: "#",
|
|
4017
4043
|
header: "#",
|
|
@@ -4052,12 +4078,12 @@ function useTable({
|
|
|
4052
4078
|
},
|
|
4053
4079
|
Header: ({ column: column2 }) => {
|
|
4054
4080
|
const isSorted = isColumnSorted(entity.name, sortKey);
|
|
4055
|
-
return /* @__PURE__ */
|
|
4056
|
-
ActionIcon,
|
|
4081
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { mb: core.rem(5), key: "header" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { justify: "center", align: "center" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { gap: "xs", align: "center" }, getActionIcon(entityType), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { size: "sm" }, header), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4082
|
+
core.ActionIcon,
|
|
4057
4083
|
{
|
|
4058
4084
|
key: `sort-${header}`,
|
|
4059
4085
|
size: 22,
|
|
4060
|
-
ml: rem(5),
|
|
4086
|
+
ml: core.rem(5),
|
|
4061
4087
|
onClick: () => {
|
|
4062
4088
|
if (!isSorted) {
|
|
4063
4089
|
actions2.updateSorting({ key: entity.name, dir: "desc" });
|
|
@@ -4071,7 +4097,7 @@ function useTable({
|
|
|
4071
4097
|
}
|
|
4072
4098
|
},
|
|
4073
4099
|
getSortIcon(isSorted ? sortDir : false, entityType)
|
|
4074
|
-
))), /* @__PURE__ */
|
|
4100
|
+
))), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4075
4101
|
CustomActionIcon_default,
|
|
4076
4102
|
{
|
|
4077
4103
|
label: `At least one ${getEntityText(entityType)} is required.`,
|
|
@@ -4080,9 +4106,9 @@ function useTable({
|
|
|
4080
4106
|
onClick: () => removeColumn(actions2, entity, measures, drilldowns, entityType),
|
|
4081
4107
|
showTooltip: !showTrashIcon(finalKeys, entityType),
|
|
4082
4108
|
size: 25,
|
|
4083
|
-
ml: rem(5)
|
|
4109
|
+
ml: core.rem(5)
|
|
4084
4110
|
},
|
|
4085
|
-
/* @__PURE__ */
|
|
4111
|
+
/* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconTrash, null)
|
|
4086
4112
|
)));
|
|
4087
4113
|
},
|
|
4088
4114
|
formatter: formatter2,
|
|
@@ -4092,8 +4118,8 @@ function useTable({
|
|
|
4092
4118
|
accessorFn: (item) => item[columnKey],
|
|
4093
4119
|
Cell: isNumeric ? ({ cell }) => formatter2(cell.getValue()) : ({ cell, renderedCellValue, row }) => {
|
|
4094
4120
|
const cellId = row.original[`${cell.column.id} ID`];
|
|
4095
|
-
return /* @__PURE__ */
|
|
4096
|
-
Text,
|
|
4121
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { justify: "space-between", sx: { width: "100%", maxWidth: 400 }, gap: "sm" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4122
|
+
core.Text,
|
|
4097
4123
|
{
|
|
4098
4124
|
size: "sm",
|
|
4099
4125
|
sx: {
|
|
@@ -4103,13 +4129,13 @@ function useTable({
|
|
|
4103
4129
|
}
|
|
4104
4130
|
},
|
|
4105
4131
|
renderedCellValue
|
|
4106
|
-
), /* @__PURE__ */
|
|
4132
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, null, cellId && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { color: "dimmed" }, cellId)));
|
|
4107
4133
|
}
|
|
4108
4134
|
};
|
|
4109
4135
|
});
|
|
4110
4136
|
return columnsDef.length ? [indexColumn, ...columnsDef] : [];
|
|
4111
4137
|
}, [drilldowns, measures, finalKeys, offset, getFormatter, getFormat, locale]);
|
|
4112
|
-
const constTableProps = useMemo(
|
|
4138
|
+
const constTableProps = React19.useMemo(
|
|
4113
4139
|
() => ({
|
|
4114
4140
|
mantineToolbarAlertBannerProps: isError ? {
|
|
4115
4141
|
color: "red",
|
|
@@ -4168,12 +4194,12 @@ function useTable({
|
|
|
4168
4194
|
}
|
|
4169
4195
|
},
|
|
4170
4196
|
renderBottomToolbar() {
|
|
4171
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
4197
|
+
const [isOpen, setIsOpen] = React19.useState(false);
|
|
4172
4198
|
if (!isOpen) return null;
|
|
4173
|
-
return /* @__PURE__ */
|
|
4174
|
-
Alert,
|
|
4199
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4200
|
+
core.Alert,
|
|
4175
4201
|
{
|
|
4176
|
-
icon: /* @__PURE__ */
|
|
4202
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertCircle, { size: "1rem" }),
|
|
4177
4203
|
color: "yellow",
|
|
4178
4204
|
withCloseButton: true,
|
|
4179
4205
|
onClose: () => setIsOpen(false)
|
|
@@ -4186,7 +4212,7 @@ function useTable({
|
|
|
4186
4212
|
);
|
|
4187
4213
|
const isTransitionState = status !== "success" && !isError;
|
|
4188
4214
|
const isLoad = isLoading || data === void 0 || isTransitionState;
|
|
4189
|
-
const table = useMantineReactTable({
|
|
4215
|
+
const table = mantineReactTable.useMantineReactTable({
|
|
4190
4216
|
columns,
|
|
4191
4217
|
data: tableData,
|
|
4192
4218
|
onPaginationChange: setPagination,
|
|
@@ -4216,14 +4242,14 @@ function TableView({
|
|
|
4216
4242
|
setPagination
|
|
4217
4243
|
}) {
|
|
4218
4244
|
const isData = Boolean(table.getRowModel().rows.length);
|
|
4219
|
-
const loadingState = useSelector
|
|
4220
|
-
const viewport = useRef(null);
|
|
4221
|
-
useEffect(() => {
|
|
4245
|
+
const loadingState = reactRedux.useSelector(selectLoadingState);
|
|
4246
|
+
const viewport = React19.useRef(null);
|
|
4247
|
+
React19.useEffect(() => {
|
|
4222
4248
|
var _a;
|
|
4223
4249
|
(_a = viewport.current) == null ? void 0 : _a.scrollTo({ top: 0, behavior: "smooth" });
|
|
4224
4250
|
}, [pagination == null ? void 0 : pagination.pageIndex, pagination == null ? void 0 : pagination.pageSize]);
|
|
4225
|
-
return /* @__PURE__ */
|
|
4226
|
-
ScrollArea,
|
|
4251
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { height: "100%" } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { direction: "column", justify: "space-between", sx: { height: "100%", flex: "1 1 auto" } }, /* @__PURE__ */ React19__namespace.default.createElement(mantineReactTable.MRT_ProgressBar, { isTopToolbar: false, table }), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4252
|
+
core.ScrollArea,
|
|
4227
4253
|
{
|
|
4228
4254
|
id: "dex-table",
|
|
4229
4255
|
h: isData ? "100%" : "auto",
|
|
@@ -4234,9 +4260,9 @@ function TableView({
|
|
|
4234
4260
|
overflow: "scroll"
|
|
4235
4261
|
}
|
|
4236
4262
|
},
|
|
4237
|
-
/* @__PURE__ */
|
|
4238
|
-
/* @__PURE__ */
|
|
4239
|
-
Table,
|
|
4263
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.LoadingOverlay, { visible: isLoading || loadingState.loading }),
|
|
4264
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
4265
|
+
core.Table,
|
|
4240
4266
|
{
|
|
4241
4267
|
captionSide: "top",
|
|
4242
4268
|
fontSize: "md",
|
|
@@ -4247,8 +4273,8 @@ function TableView({
|
|
|
4247
4273
|
withBorder: true,
|
|
4248
4274
|
withColumnBorders: true
|
|
4249
4275
|
},
|
|
4250
|
-
/* @__PURE__ */
|
|
4251
|
-
Box,
|
|
4276
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
4277
|
+
core.Box,
|
|
4252
4278
|
{
|
|
4253
4279
|
component: "thead",
|
|
4254
4280
|
sx: {
|
|
@@ -4257,7 +4283,7 @@ function TableView({
|
|
|
4257
4283
|
zIndex: 10
|
|
4258
4284
|
}
|
|
4259
4285
|
},
|
|
4260
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
4286
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { component: "tr", key: headerGroup.id, sx: { fontWeight: "normal" } }, headerGroup.headers.map((header) => {
|
|
4261
4287
|
var _a;
|
|
4262
4288
|
const column = table.getColumn(header.id);
|
|
4263
4289
|
const isNumeric = column.columnDef.dataType === "number";
|
|
@@ -4282,15 +4308,15 @@ function TableView({
|
|
|
4282
4308
|
maxWidth: 10,
|
|
4283
4309
|
size: 10
|
|
4284
4310
|
});
|
|
4285
|
-
return /* @__PURE__ */
|
|
4286
|
-
Box,
|
|
4311
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4312
|
+
core.Box,
|
|
4287
4313
|
{
|
|
4288
4314
|
component: "th",
|
|
4289
4315
|
key: header.id,
|
|
4290
4316
|
sx: (theme) => isRowIndex ? index(theme) : base(theme)
|
|
4291
4317
|
},
|
|
4292
|
-
/* @__PURE__ */
|
|
4293
|
-
Box,
|
|
4318
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
4319
|
+
core.Box,
|
|
4294
4320
|
{
|
|
4295
4321
|
sx: {
|
|
4296
4322
|
display: "flex",
|
|
@@ -4299,17 +4325,17 @@ function TableView({
|
|
|
4299
4325
|
justifyContent: "space-between"
|
|
4300
4326
|
}
|
|
4301
4327
|
},
|
|
4302
|
-
header.isPlaceholder ? null : flexRender(
|
|
4328
|
+
header.isPlaceholder ? null : mantineReactTable.flexRender(
|
|
4303
4329
|
(_a = header.column.columnDef.Header) != null ? _a : header.column.columnDef.header,
|
|
4304
4330
|
header.getContext()
|
|
4305
4331
|
),
|
|
4306
|
-
!isRowIndex && /* @__PURE__ */
|
|
4332
|
+
!isRowIndex && /* @__PURE__ */ React19__namespace.default.createElement(ColumnFilterCell, { isNumeric, header, table })
|
|
4307
4333
|
)
|
|
4308
4334
|
);
|
|
4309
4335
|
})))
|
|
4310
4336
|
),
|
|
4311
|
-
isData && /* @__PURE__ */
|
|
4312
|
-
MRT_TableBodyCell,
|
|
4337
|
+
isData && /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { component: "tbody" }, table.getRowModel().rows.map((row) => /* @__PURE__ */ React19__namespace.default.createElement("tr", { key: row.id }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4338
|
+
mantineReactTable.MRT_TableBodyCell,
|
|
4313
4339
|
{
|
|
4314
4340
|
key: cell.id,
|
|
4315
4341
|
cell,
|
|
@@ -4319,8 +4345,8 @@ function TableView({
|
|
|
4319
4345
|
}
|
|
4320
4346
|
)))))
|
|
4321
4347
|
),
|
|
4322
|
-
!isData && !isError && !isLoading && /* @__PURE__ */
|
|
4323
|
-
), /* @__PURE__ */
|
|
4348
|
+
!isData && !isError && !isLoading && /* @__PURE__ */ React19__namespace.default.createElement(NoRecords, null)
|
|
4349
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(mantineReactTable.MRT_ToolbarAlertBanner, { stackAlertBanner: true, table }), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4324
4350
|
TableFooter_default,
|
|
4325
4351
|
{
|
|
4326
4352
|
table,
|
|
@@ -4339,38 +4365,38 @@ var ColumnFilterCell = ({
|
|
|
4339
4365
|
const filterVariant = header.column.columnDef.filterVariant;
|
|
4340
4366
|
const isMulti = filterVariant === "multi-select";
|
|
4341
4367
|
if (isMulti) {
|
|
4342
|
-
return /* @__PURE__ */
|
|
4368
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(MultiFilter, { header });
|
|
4343
4369
|
}
|
|
4344
4370
|
if (isNumeric) {
|
|
4345
|
-
return /* @__PURE__ */
|
|
4371
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(NumericFilter, { header });
|
|
4346
4372
|
}
|
|
4347
4373
|
};
|
|
4348
4374
|
function NumericFilter({ header }) {
|
|
4349
|
-
const filters = useSelector
|
|
4375
|
+
const filters = reactRedux.useSelector(selectFilterItems);
|
|
4350
4376
|
const { translate: t } = useTranslation();
|
|
4351
4377
|
const filter = filters.find((f) => f.measure === header.column.id);
|
|
4352
4378
|
if (filter) {
|
|
4353
4379
|
const filterFn = getFilterFn(filter);
|
|
4354
4380
|
const text = t(`comparison.${getFilterfnKey(filterFn)}`);
|
|
4355
4381
|
const isBetween = filterFn === "between";
|
|
4356
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { gap: "xs", style: { fontWeight: "normal" } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { flex: "1 1 auto" } }, isBetween ? /* @__PURE__ */ React19__namespace.default.createElement(MinMax, { filter, hideControls: true }) : /* @__PURE__ */ React19__namespace.default.createElement(NumberInputComponent, { text, filter })), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { alignSelf: "flex-end" } }, /* @__PURE__ */ React19__namespace.default.createElement(FilterFnsMenu, { filter })));
|
|
4357
4383
|
}
|
|
4358
4384
|
}
|
|
4359
4385
|
function MultiFilter({ header }) {
|
|
4360
4386
|
const { translate: t } = useTranslation();
|
|
4361
|
-
const cutItems = useSelector
|
|
4362
|
-
const drilldownItems = useSelector
|
|
4387
|
+
const cutItems = reactRedux.useSelector(selectCutItems);
|
|
4388
|
+
const drilldownItems = reactRedux.useSelector(selectDrilldownItems);
|
|
4363
4389
|
const label = header.column.id;
|
|
4364
4390
|
const drilldown = drilldownItems.find((d) => d.level === header.column.id);
|
|
4365
4391
|
const actions2 = useActions();
|
|
4366
4392
|
const cut = cutItems.find((cut2) => {
|
|
4367
4393
|
return cut2.level === (drilldown == null ? void 0 : drilldown.level);
|
|
4368
4394
|
});
|
|
4369
|
-
const updatecutHandler =
|
|
4395
|
+
const updatecutHandler = React19__namespace.default.useCallback((item, members) => {
|
|
4370
4396
|
actions2.updateCut({ ...item, members });
|
|
4371
4397
|
}, []);
|
|
4372
|
-
return drilldown && cut && /* @__PURE__ */
|
|
4373
|
-
MultiSelect,
|
|
4398
|
+
return drilldown && cut && /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { pt: "md", style: { fontWeight: "normal" } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4399
|
+
core.MultiSelect,
|
|
4374
4400
|
{
|
|
4375
4401
|
sx: { flex: "1 1 100%" },
|
|
4376
4402
|
searchable: true,
|
|
@@ -4391,7 +4417,7 @@ function MultiFilter({ header }) {
|
|
|
4391
4417
|
));
|
|
4392
4418
|
}
|
|
4393
4419
|
var NoRecords = () => {
|
|
4394
|
-
return /* @__PURE__ */
|
|
4420
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Center, { style: { height: "calc(100% - 210px)" } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { size: "xl", color: "gray", italic: true }, "No records to display."));
|
|
4395
4421
|
};
|
|
4396
4422
|
TableView.displayName = "TesseractExplorer:TableView";
|
|
4397
4423
|
|
|
@@ -4405,12 +4431,12 @@ var styles = (t) => ({
|
|
|
4405
4431
|
}
|
|
4406
4432
|
});
|
|
4407
4433
|
function AddColumnsDrawer() {
|
|
4408
|
-
const [opened, { open, close: close2 }] = useDisclosure(false);
|
|
4434
|
+
const [opened, { open, close: close2 }] = hooks.useDisclosure(false);
|
|
4409
4435
|
const { translate: t } = useTranslation();
|
|
4410
|
-
const theme = useMantineTheme();
|
|
4411
|
-
const smallerThanMd = useMediaQuery(`(max-width: ${theme.breakpoints.md})`);
|
|
4412
|
-
return /* @__PURE__ */
|
|
4413
|
-
Drawer,
|
|
4436
|
+
const theme = core.useMantineTheme();
|
|
4437
|
+
const smallerThanMd = hooks.useMediaQuery(`(max-width: ${theme.breakpoints.md})`);
|
|
4438
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4439
|
+
core.Drawer,
|
|
4414
4440
|
{
|
|
4415
4441
|
id: "dex-column-drawer",
|
|
4416
4442
|
opened,
|
|
@@ -4419,19 +4445,19 @@ function AddColumnsDrawer() {
|
|
|
4419
4445
|
closeButtonProps: {
|
|
4420
4446
|
id: "dex-column-drawer-close"
|
|
4421
4447
|
},
|
|
4422
|
-
title: /* @__PURE__ */
|
|
4448
|
+
title: /* @__PURE__ */ React19__namespace.default.createElement(core.Group, null, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconPlus, { size: "1.2rem" }), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { fw: 700 }, t("params.add_columns"))),
|
|
4423
4449
|
styles,
|
|
4424
4450
|
overlayProps: {
|
|
4425
4451
|
opacity: 0.1
|
|
4426
4452
|
}
|
|
4427
4453
|
},
|
|
4428
|
-
/* @__PURE__ */
|
|
4429
|
-
/* @__PURE__ */
|
|
4430
|
-
), /* @__PURE__ */
|
|
4431
|
-
Button,
|
|
4454
|
+
/* @__PURE__ */ React19__namespace.default.createElement(MeasuresOptions, null),
|
|
4455
|
+
/* @__PURE__ */ React19__namespace.default.createElement(DrillDownOptions, null)
|
|
4456
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { position: "center", sx: { flexWrap: "nowrap" } }, smallerThanMd ? /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { onClick: open, size: "md", variant: "filled", color: theme.primaryColor }, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconStack3, { size: "0.75rem" })) : /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4457
|
+
core.Button,
|
|
4432
4458
|
{
|
|
4433
4459
|
id: "dex-column-btn",
|
|
4434
|
-
leftIcon: /* @__PURE__ */
|
|
4460
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconPlus, { size: "1.2rem" }),
|
|
4435
4461
|
onClick: open,
|
|
4436
4462
|
m: "md",
|
|
4437
4463
|
size: "sm"
|
|
@@ -4440,12 +4466,12 @@ function AddColumnsDrawer() {
|
|
|
4440
4466
|
)));
|
|
4441
4467
|
}
|
|
4442
4468
|
function DrillDownOptions() {
|
|
4443
|
-
const locale = useSelector
|
|
4444
|
-
const selectedDimensions = useSelector
|
|
4445
|
-
const dimensions = useSelector
|
|
4469
|
+
const locale = reactRedux.useSelector(selectLocale);
|
|
4470
|
+
const selectedDimensions = reactRedux.useSelector(selectDrilldownItems);
|
|
4471
|
+
const dimensions = reactRedux.useSelector(selectOlapDimensionItems) || [];
|
|
4446
4472
|
const activeItems = selectedDimensions.filter((i) => i.active);
|
|
4447
|
-
const options = useMemo(
|
|
4448
|
-
() => dimensions.map((dimension) => /* @__PURE__ */
|
|
4473
|
+
const options = React19.useMemo(
|
|
4474
|
+
() => dimensions.map((dimension) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4449
4475
|
DimensionItem,
|
|
4450
4476
|
{
|
|
4451
4477
|
dimension,
|
|
@@ -4464,7 +4490,7 @@ function DimensionItem({
|
|
|
4464
4490
|
activeItems
|
|
4465
4491
|
}) {
|
|
4466
4492
|
const isChildSubMenu = dimension.hierarchies.length !== 1;
|
|
4467
|
-
const options = dimension.hierarchies.map((hie) => /* @__PURE__ */
|
|
4493
|
+
const options = dimension.hierarchies.map((hie) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4468
4494
|
HierarchyItem,
|
|
4469
4495
|
{
|
|
4470
4496
|
dimension,
|
|
@@ -4475,18 +4501,18 @@ function DimensionItem({
|
|
|
4475
4501
|
activeItems
|
|
4476
4502
|
}
|
|
4477
4503
|
));
|
|
4478
|
-
return /* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4479
4505
|
"div",
|
|
4480
4506
|
{
|
|
4481
4507
|
key: dimension.name,
|
|
4482
4508
|
className: "dex-dimension-control",
|
|
4483
4509
|
id: `dex-dimension-${dimension.name}`
|
|
4484
4510
|
},
|
|
4485
|
-
/* @__PURE__ */
|
|
4486
|
-
Divider,
|
|
4511
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
4512
|
+
core.Divider,
|
|
4487
4513
|
{
|
|
4488
4514
|
my: "md",
|
|
4489
|
-
label: /* @__PURE__ */
|
|
4515
|
+
label: /* @__PURE__ */ React19__namespace.default.createElement(core.Group, null, getIconForDimensionType(dimension.type), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { italic: true }, getCaption(dimension, locale)))
|
|
4490
4516
|
}
|
|
4491
4517
|
),
|
|
4492
4518
|
options
|
|
@@ -4500,7 +4526,7 @@ function HierarchyItem({
|
|
|
4500
4526
|
activeItems
|
|
4501
4527
|
}) {
|
|
4502
4528
|
const { translate: t } = useTranslation();
|
|
4503
|
-
useMemo(() => {
|
|
4529
|
+
React19.useMemo(() => {
|
|
4504
4530
|
const captions = [getCaption(dimension, locale), getCaption(hierarchy, locale)];
|
|
4505
4531
|
if (isSubMenu) {
|
|
4506
4532
|
return captions[1];
|
|
@@ -4512,7 +4538,7 @@ function HierarchyItem({
|
|
|
4512
4538
|
});
|
|
4513
4539
|
}, [locale, dimension, hierarchy, isSubMenu, t]);
|
|
4514
4540
|
const isChildSubMenu = hierarchy.levels.length !== 1;
|
|
4515
|
-
const options = hierarchy.levels.map((lvl, index) => /* @__PURE__ */
|
|
4541
|
+
const options = hierarchy.levels.map((lvl, index) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4516
4542
|
LevelItem,
|
|
4517
4543
|
{
|
|
4518
4544
|
dimension,
|
|
@@ -4539,14 +4565,14 @@ function LevelItem({
|
|
|
4539
4565
|
activeItems,
|
|
4540
4566
|
depth = 0
|
|
4541
4567
|
}) {
|
|
4542
|
-
const [activeFilter, setActiveFilter] = useState(false);
|
|
4543
|
-
const [activePropertiesFilter, setActiveProperties] = useState(false);
|
|
4568
|
+
const [activeFilter, setActiveFilter] = React19.useState(false);
|
|
4569
|
+
const [activePropertiesFilter, setActiveProperties] = React19.useState(false);
|
|
4544
4570
|
const { translate: t } = useTranslation();
|
|
4545
4571
|
const actions2 = useActions();
|
|
4546
|
-
const cutItems = useSelector
|
|
4547
|
-
let drilldowns = useSelector
|
|
4548
|
-
const ditems = useSelector
|
|
4549
|
-
const label = useMemo(() => {
|
|
4572
|
+
const cutItems = reactRedux.useSelector(selectCutItems);
|
|
4573
|
+
let drilldowns = reactRedux.useSelector(selectDrilldownMap);
|
|
4574
|
+
const ditems = reactRedux.useSelector(selectDrilldownItems);
|
|
4575
|
+
const label = React19.useMemo(() => {
|
|
4550
4576
|
const captions = [
|
|
4551
4577
|
getCaption(dimension, locale),
|
|
4552
4578
|
getCaption(hierarchy, locale),
|
|
@@ -4562,7 +4588,7 @@ function LevelItem({
|
|
|
4562
4588
|
level: captions[2]
|
|
4563
4589
|
});
|
|
4564
4590
|
}, [locale, dimension, hierarchy, level, isSubMenu, t]);
|
|
4565
|
-
const createCutHandler = useCallback((level2) => {
|
|
4591
|
+
const createCutHandler = React19.useCallback((level2) => {
|
|
4566
4592
|
const cutItem = buildCut({ ...level2, members: [], active: false });
|
|
4567
4593
|
actions2.updateCut(cutItem);
|
|
4568
4594
|
}, []);
|
|
@@ -4585,7 +4611,7 @@ function LevelItem({
|
|
|
4585
4611
|
const isOtherHierarchySelected = activeItems.some(
|
|
4586
4612
|
(activeItem) => activeItem.dimension === dimension.name && activeItem.hierarchy !== hierarchy.name
|
|
4587
4613
|
);
|
|
4588
|
-
useLayoutEffect(() => {
|
|
4614
|
+
React19.useLayoutEffect(() => {
|
|
4589
4615
|
if (!drilldowns[level.name] && !ditems.find((d) => d.level === level.name)) {
|
|
4590
4616
|
createDrilldown(level, cutItems);
|
|
4591
4617
|
}
|
|
@@ -4593,7 +4619,7 @@ function LevelItem({
|
|
|
4593
4619
|
const cut = cutItems.find((cut2) => {
|
|
4594
4620
|
return cut2.level === (currentDrilldown == null ? void 0 : currentDrilldown.level);
|
|
4595
4621
|
});
|
|
4596
|
-
const updatecutHandler =
|
|
4622
|
+
const updatecutHandler = React19__namespace.default.useCallback((item, members) => {
|
|
4597
4623
|
actions2.updateCut({ ...item, members });
|
|
4598
4624
|
}, []);
|
|
4599
4625
|
const checked = activeItems.map((i) => i.level).includes(level.name);
|
|
@@ -4602,8 +4628,8 @@ function LevelItem({
|
|
|
4602
4628
|
if (!currentDrilldown) return;
|
|
4603
4629
|
const paddingLeft = `${5 * depth + 5}px`;
|
|
4604
4630
|
const properities = currentDrilldown.properties.length ? currentDrilldown.properties : null;
|
|
4605
|
-
return currentDrilldown && /* @__PURE__ */
|
|
4606
|
-
Checkbox,
|
|
4631
|
+
return currentDrilldown && /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { className: "dex-level-control", mt: "sm", position: "apart", key: level.name, noWrap: true }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4632
|
+
core.Checkbox,
|
|
4607
4633
|
{
|
|
4608
4634
|
sx: { cursor: "pointer", paddingLeft },
|
|
4609
4635
|
onChange: () => {
|
|
@@ -4621,17 +4647,17 @@ function LevelItem({
|
|
|
4621
4647
|
size: "xs",
|
|
4622
4648
|
disabled: isDisabled || disableUncheck
|
|
4623
4649
|
}
|
|
4624
|
-
), /* @__PURE__ */
|
|
4625
|
-
ActionIcon,
|
|
4650
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { sx: { flexWrap: "nowrap" } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4651
|
+
core.ActionIcon,
|
|
4626
4652
|
{
|
|
4627
4653
|
className: "dex-level-filter",
|
|
4628
4654
|
size: "sm",
|
|
4629
4655
|
onClick: () => setActiveFilter((value) => !value),
|
|
4630
4656
|
disabled: isDisabled
|
|
4631
4657
|
},
|
|
4632
|
-
activeFilter ? /* @__PURE__ */
|
|
4633
|
-
), properities && /* @__PURE__ */
|
|
4634
|
-
MultiSelect,
|
|
4658
|
+
activeFilter ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconFilterOff, null) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconFilter, null)
|
|
4659
|
+
), properities && /* @__PURE__ */ React19__namespace.default.createElement(core.Tooltip, { label: t("params.add_metadata") }, /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { onClick: () => setActiveProperties((value) => !value) }, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAdjustments, null))), /* @__PURE__ */ React19__namespace.default.createElement(core.ThemeIcon, { size: "xs", color: "gray", variant: "light", bg: "transparent" }, /* @__PURE__ */ React19__namespace.default.createElement(StackSVG, null)))), activeFilter && /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { pt: "md" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4660
|
+
core.MultiSelect,
|
|
4635
4661
|
{
|
|
4636
4662
|
sx: { flex: "1 1 100%" },
|
|
4637
4663
|
searchable: true,
|
|
@@ -4654,14 +4680,14 @@ function LevelItem({
|
|
|
4654
4680
|
nothingFound: "Nothing found",
|
|
4655
4681
|
disabled: isDisabled
|
|
4656
4682
|
}
|
|
4657
|
-
)), activePropertiesFilter && /* @__PURE__ */
|
|
4683
|
+
)), activePropertiesFilter && /* @__PURE__ */ React19__namespace.default.createElement(PropertiesMultiSelect, { item: currentDrilldown }));
|
|
4658
4684
|
}
|
|
4659
4685
|
function PropertiesMultiSelect({ item }) {
|
|
4660
|
-
const levelTriadMap = useSelector
|
|
4661
|
-
const locale = useSelector
|
|
4686
|
+
const levelTriadMap = reactRedux.useSelector(selectLevelTriadMap);
|
|
4687
|
+
const locale = reactRedux.useSelector(selectLocale);
|
|
4662
4688
|
const actions2 = useActions();
|
|
4663
4689
|
const { translate: t } = useTranslation();
|
|
4664
|
-
const propertiesUpdateHandler2 = useCallback(
|
|
4690
|
+
const propertiesUpdateHandler2 = React19.useCallback(
|
|
4665
4691
|
(activeProps) => {
|
|
4666
4692
|
const properties = item.properties.map(
|
|
4667
4693
|
(prop) => buildProperty({
|
|
@@ -4677,7 +4703,7 @@ function PropertiesMultiSelect({ item }) {
|
|
|
4677
4703
|
item.properties,
|
|
4678
4704
|
(item2) => isActiveItem(item2) ? item2.key : null
|
|
4679
4705
|
);
|
|
4680
|
-
const label = useMemo(() => {
|
|
4706
|
+
const label = React19.useMemo(() => {
|
|
4681
4707
|
const triad = levelTriadMap[item.level] || [];
|
|
4682
4708
|
const triadCaptions = triad.map((item2) => getCaption(item2, locale.code)).reverse();
|
|
4683
4709
|
return t("params.tag_drilldowns", {
|
|
@@ -4688,8 +4714,8 @@ function PropertiesMultiSelect({ item }) {
|
|
|
4688
4714
|
propCount: activeProperties.length
|
|
4689
4715
|
});
|
|
4690
4716
|
}, [activeProperties.length, levelTriadMap, item, locale.code, t]);
|
|
4691
|
-
return /* @__PURE__ */
|
|
4692
|
-
MultiSelect,
|
|
4717
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { pt: "md" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4718
|
+
core.MultiSelect,
|
|
4693
4719
|
{
|
|
4694
4720
|
sx: { flex: "1 1 100%" },
|
|
4695
4721
|
searchable: true,
|
|
@@ -4744,8 +4770,8 @@ function NumberInputComponent({ text, filter }) {
|
|
|
4744
4770
|
const active = !isEmpty;
|
|
4745
4771
|
actions2.updateFilter(buildFilter({ ...filter2, active, ...conditions }));
|
|
4746
4772
|
}
|
|
4747
|
-
return /* @__PURE__ */
|
|
4748
|
-
NumberInput,
|
|
4773
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4774
|
+
core.NumberInput,
|
|
4749
4775
|
{
|
|
4750
4776
|
description: text,
|
|
4751
4777
|
placeholder: text,
|
|
@@ -4772,8 +4798,8 @@ var MinMax = ({ filter, hideControls, ...rest }) => {
|
|
|
4772
4798
|
}
|
|
4773
4799
|
const min = getFilterValue(filter.conditionOne);
|
|
4774
4800
|
const max = getFilterValue(filter.conditionTwo);
|
|
4775
|
-
return /* @__PURE__ */
|
|
4776
|
-
NumberInput,
|
|
4801
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { gap: "xs" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4802
|
+
core.NumberInput,
|
|
4777
4803
|
{
|
|
4778
4804
|
placeholder: "Min",
|
|
4779
4805
|
description: "Min",
|
|
@@ -4782,8 +4808,8 @@ var MinMax = ({ filter, hideControls, ...rest }) => {
|
|
|
4782
4808
|
hideControls,
|
|
4783
4809
|
...rest
|
|
4784
4810
|
}
|
|
4785
|
-
), /* @__PURE__ */
|
|
4786
|
-
NumberInput,
|
|
4811
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4812
|
+
core.NumberInput,
|
|
4787
4813
|
{
|
|
4788
4814
|
placeholder: "Max",
|
|
4789
4815
|
description: "Max",
|
|
@@ -4797,30 +4823,30 @@ var MinMax = ({ filter, hideControls, ...rest }) => {
|
|
|
4797
4823
|
function FilterFnsMenu({ filter }) {
|
|
4798
4824
|
const actions2 = useActions();
|
|
4799
4825
|
const { translate: t } = useTranslation();
|
|
4800
|
-
return /* @__PURE__ */
|
|
4801
|
-
Menu.Item,
|
|
4826
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu, { shadow: "md", width: 200 }, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Target, null, /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { size: "xs" }, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSettings, null))), /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Label, null, t("params.filter_mode")), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4827
|
+
core.Menu.Item,
|
|
4802
4828
|
{
|
|
4803
|
-
icon: /* @__PURE__ */
|
|
4829
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconMathGreater, { size: 14 }),
|
|
4804
4830
|
onClick: () => {
|
|
4805
4831
|
const conditions = getFiltersConditions("greaterThan", [0]) || {};
|
|
4806
4832
|
actions2.updateFilter(buildFilter({ ...filter, ...conditions, active: false }));
|
|
4807
4833
|
}
|
|
4808
4834
|
},
|
|
4809
4835
|
t("comparison.GT")
|
|
4810
|
-
), /* @__PURE__ */
|
|
4811
|
-
Menu.Item,
|
|
4836
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4837
|
+
core.Menu.Item,
|
|
4812
4838
|
{
|
|
4813
|
-
icon: /* @__PURE__ */
|
|
4839
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconMathLower, { size: 14 }),
|
|
4814
4840
|
onClick: () => {
|
|
4815
4841
|
const conditions = getFiltersConditions("lessThan", [0]) || {};
|
|
4816
4842
|
actions2.updateFilter(buildFilter({ ...filter, ...conditions, active: false }));
|
|
4817
4843
|
}
|
|
4818
4844
|
},
|
|
4819
4845
|
t("comparison.LT")
|
|
4820
|
-
), /* @__PURE__ */
|
|
4821
|
-
Menu.Item,
|
|
4846
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4847
|
+
core.Menu.Item,
|
|
4822
4848
|
{
|
|
4823
|
-
icon: /* @__PURE__ */
|
|
4849
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowsLeftRight, { size: 14 }),
|
|
4824
4850
|
onClick: () => {
|
|
4825
4851
|
const conditions = getFiltersConditions("between", [0, 0]) || {};
|
|
4826
4852
|
actions2.updateFilter(buildFilter({ ...filter, ...conditions, active: false }));
|
|
@@ -4830,23 +4856,23 @@ function FilterFnsMenu({ filter }) {
|
|
|
4830
4856
|
))));
|
|
4831
4857
|
}
|
|
4832
4858
|
function MeasuresOptions() {
|
|
4833
|
-
const itemMap = useSelector
|
|
4834
|
-
const filtersMap = useSelector
|
|
4835
|
-
const filtersItems = useSelector
|
|
4836
|
-
const measures = useSelector
|
|
4859
|
+
const itemMap = reactRedux.useSelector(selectMeasureMap);
|
|
4860
|
+
const filtersMap = reactRedux.useSelector(selectFilterMap);
|
|
4861
|
+
const filtersItems = reactRedux.useSelector(selectFilterItems);
|
|
4862
|
+
const measures = reactRedux.useSelector(selectOlapMeasureItems);
|
|
4837
4863
|
const actions2 = useActions();
|
|
4838
|
-
const handlerCreateMeasure = useCallback((data) => {
|
|
4864
|
+
const handlerCreateMeasure = React19.useCallback((data) => {
|
|
4839
4865
|
const measure = buildMeasure(data);
|
|
4840
4866
|
actions2.updateMeasure(measure);
|
|
4841
4867
|
return measure;
|
|
4842
4868
|
}, []);
|
|
4843
|
-
const handlerCreateFilter = useCallback((data) => {
|
|
4869
|
+
const handlerCreateFilter = React19.useCallback((data) => {
|
|
4844
4870
|
const filter = buildFilter(data);
|
|
4845
4871
|
actions2.updateFilter(filter);
|
|
4846
4872
|
return filter;
|
|
4847
4873
|
}, []);
|
|
4848
4874
|
const measureCaptions = Object.values(measures).map((m) => `${m.caption}`).join(",");
|
|
4849
|
-
const filteredItems = useMemo(() => {
|
|
4875
|
+
const filteredItems = React19.useMemo(() => {
|
|
4850
4876
|
return filterMap(measures, (m) => {
|
|
4851
4877
|
const measure = itemMap[m.name] || handlerCreateMeasure({ ...m, active: false });
|
|
4852
4878
|
const foundFilter = filtersMap[m.name] || filtersItems.find((f) => f.measure === measure.name);
|
|
@@ -4868,7 +4894,7 @@ function MeasuresOptions() {
|
|
|
4868
4894
|
]);
|
|
4869
4895
|
const activeItems = filteredItems.filter((f) => isActiveItem(f.measure));
|
|
4870
4896
|
const options = filteredItems.map(({ measure, filter }) => {
|
|
4871
|
-
return /* @__PURE__ */
|
|
4897
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(FilterItem2, { key: measure.key, measure, filter, activeItems });
|
|
4872
4898
|
});
|
|
4873
4899
|
return options;
|
|
4874
4900
|
}
|
|
@@ -4877,7 +4903,7 @@ function FilterItem2({
|
|
|
4877
4903
|
filter,
|
|
4878
4904
|
activeItems
|
|
4879
4905
|
}) {
|
|
4880
|
-
const [activeFilter, setActiveFilter] = useState(false);
|
|
4906
|
+
const [activeFilter, setActiveFilter] = React19.useState(false);
|
|
4881
4907
|
const { translate: t } = useTranslation();
|
|
4882
4908
|
const filterFn = getFilterFn(filter);
|
|
4883
4909
|
const text = t(`comparison.${getFilterfnKey(filterFn)}`);
|
|
@@ -4885,8 +4911,8 @@ function FilterItem2({
|
|
|
4885
4911
|
const checked = activeItems.map((active) => active.measure.name).includes(measure.name);
|
|
4886
4912
|
const actions2 = useActions();
|
|
4887
4913
|
const isLastSelected = activeItems.length === 1 && checked;
|
|
4888
|
-
return /* @__PURE__ */
|
|
4889
|
-
Checkbox,
|
|
4914
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { key: measure.name }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { mt: "sm", position: "apart" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4915
|
+
core.Checkbox,
|
|
4890
4916
|
{
|
|
4891
4917
|
sx: { cursor: "pointer" },
|
|
4892
4918
|
onChange: () => {
|
|
@@ -4900,22 +4926,22 @@ function FilterItem2({
|
|
|
4900
4926
|
size: "xs",
|
|
4901
4927
|
disabled: isLastSelected
|
|
4902
4928
|
}
|
|
4903
|
-
), /* @__PURE__ */
|
|
4929
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { sx: { flexWrap: "nowrap" } }, activeFilter && /* @__PURE__ */ React19__namespace.default.createElement(FilterFnsMenu, { filter }), /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, { size: "sm", onClick: () => setActiveFilter((value) => !value) }, activeFilter ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconFilterOff, null) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconFilter, null)), /* @__PURE__ */ React19__namespace.default.createElement(core.ThemeIcon, { size: "xs", color: "gray", variant: "light", bg: "transparent" }, /* @__PURE__ */ React19__namespace.default.createElement(BarsSVG, null)))), activeFilter && /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { pt: "md" }, isBetween ? /* @__PURE__ */ React19__namespace.default.createElement(MinMax, { filter }) : /* @__PURE__ */ React19__namespace.default.createElement(NumberInputComponent, { text, filter })));
|
|
4904
4930
|
}
|
|
4905
4931
|
var getIconForDimensionType = (dimensionType) => {
|
|
4906
4932
|
switch (dimensionType) {
|
|
4907
4933
|
case "geo" /* GEO */:
|
|
4908
|
-
return /* @__PURE__ */
|
|
4934
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconWorld, { size: 20 });
|
|
4909
4935
|
case "time" /* TIME */:
|
|
4910
|
-
return /* @__PURE__ */
|
|
4936
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconClock, { size: 20 });
|
|
4911
4937
|
default:
|
|
4912
|
-
return /* @__PURE__ */
|
|
4938
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconBox, { size: 20 });
|
|
4913
4939
|
}
|
|
4914
4940
|
};
|
|
4915
4941
|
var DrawerMenu_default = AddColumnsDrawer;
|
|
4916
4942
|
|
|
4917
4943
|
// src/components/ExplorerTabs.tsx
|
|
4918
|
-
|
|
4944
|
+
init_cjs_shims();
|
|
4919
4945
|
var tabsStyles = (t) => ({
|
|
4920
4946
|
root: {
|
|
4921
4947
|
alignSelf: "flex-end"
|
|
@@ -4938,8 +4964,8 @@ function ExplorerTabs({
|
|
|
4938
4964
|
value
|
|
4939
4965
|
}) {
|
|
4940
4966
|
const { translate: t } = useTranslation();
|
|
4941
|
-
return /* @__PURE__ */
|
|
4942
|
-
Tabs,
|
|
4967
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4968
|
+
core.Tabs,
|
|
4943
4969
|
{
|
|
4944
4970
|
color: "blue",
|
|
4945
4971
|
id: "query-results-tabs",
|
|
@@ -4947,37 +4973,37 @@ function ExplorerTabs({
|
|
|
4947
4973
|
value,
|
|
4948
4974
|
styles: tabsStyles
|
|
4949
4975
|
},
|
|
4950
|
-
/* @__PURE__ */
|
|
4976
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Tabs.List, null, panels.map((panel) => /* @__PURE__ */ React19__namespace.default.createElement(core.Tabs.Tab, { key: panel.key, id: panel.key, value: panel.key, h: 56 }, t(panel.label))))
|
|
4951
4977
|
);
|
|
4952
4978
|
}
|
|
4953
4979
|
|
|
4954
4980
|
// src/components/PreviewModeSwitch.jsx
|
|
4955
|
-
|
|
4981
|
+
init_cjs_shims();
|
|
4956
4982
|
var PreviewModeSwitch = (props) => {
|
|
4957
4983
|
const withTooltip = !!props.withTooltip;
|
|
4958
4984
|
const actions2 = useActions();
|
|
4959
4985
|
const { translate: t } = useTranslation();
|
|
4960
|
-
const isPreviewMode = useSelector
|
|
4961
|
-
const serialParams = useSelector
|
|
4986
|
+
const isPreviewMode = reactRedux.useSelector(selectIsPreviewMode);
|
|
4987
|
+
const serialParams = reactRedux.useSelector(selectSerializedParams);
|
|
4962
4988
|
const { previewLimit } = useSettings();
|
|
4963
|
-
useEffect(() => {
|
|
4989
|
+
React19.useEffect(() => {
|
|
4964
4990
|
isPreviewMode && actions2.willRequestQuery();
|
|
4965
4991
|
}, [isPreviewMode, serialParams]);
|
|
4966
|
-
const onClickLoadAllResults = useCallback(() => {
|
|
4992
|
+
const onClickLoadAllResults = React19.useCallback(() => {
|
|
4967
4993
|
actions2.updateIsPreview(!isPreviewMode);
|
|
4968
4994
|
}, [isPreviewMode]);
|
|
4969
|
-
const target = /* @__PURE__ */
|
|
4970
|
-
Switch,
|
|
4995
|
+
const target = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
4996
|
+
core.Switch,
|
|
4971
4997
|
{
|
|
4972
4998
|
checked: !isPreviewMode,
|
|
4973
4999
|
styles: { label: { display: "flex", alignContent: "center", gap: "0.25rem" } },
|
|
4974
|
-
label: /* @__PURE__ */
|
|
5000
|
+
label: /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, t("params.label_boolean_full_results"), withTooltip && /* @__PURE__ */ React19__namespace.default.createElement(core.ThemeIcon, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconInfoCircleFilled, null))),
|
|
4975
5001
|
onChange: onClickLoadAllResults
|
|
4976
5002
|
}
|
|
4977
5003
|
);
|
|
4978
5004
|
if (!withTooltip) return target;
|
|
4979
|
-
return /* @__PURE__ */
|
|
4980
|
-
Tooltip,
|
|
5005
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5006
|
+
core.Tooltip,
|
|
4981
5007
|
{
|
|
4982
5008
|
events: {
|
|
4983
5009
|
hover: true,
|
|
@@ -4989,12 +5015,12 @@ var PreviewModeSwitch = (props) => {
|
|
|
4989
5015
|
withArrow: true,
|
|
4990
5016
|
withinPortal: true
|
|
4991
5017
|
},
|
|
4992
|
-
/* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ React19__namespace.default.createElement("div", null, target)
|
|
4993
5019
|
);
|
|
4994
5020
|
};
|
|
4995
5021
|
|
|
4996
5022
|
// src/components/Toolbar.tsx
|
|
4997
|
-
|
|
5023
|
+
init_cjs_shims();
|
|
4998
5024
|
var toolbarSx = (t) => ({
|
|
4999
5025
|
background: t.colorScheme === "dark" ? t.black : t.white,
|
|
5000
5026
|
borderRadius: t.radius.xl,
|
|
@@ -5002,27 +5028,27 @@ var toolbarSx = (t) => ({
|
|
|
5002
5028
|
});
|
|
5003
5029
|
function ToolbarButton({ icon, label, onClick = () => void 0 }) {
|
|
5004
5030
|
const { toolbarConfig } = useSettings();
|
|
5005
|
-
return /* @__PURE__ */
|
|
5006
|
-
UnstyledButton,
|
|
5031
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5032
|
+
core.UnstyledButton,
|
|
5007
5033
|
{
|
|
5008
5034
|
onClick,
|
|
5009
5035
|
py: { base: "0.2rem", md: 0 },
|
|
5010
5036
|
sx: (t) => ({ "& svg path": { stroke: t.colorScheme === "dark" ? "white" : "black" } })
|
|
5011
5037
|
},
|
|
5012
|
-
/* @__PURE__ */
|
|
5038
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Group, { spacing: "xs", noWrap: true }, icon, (toolbarConfig == null ? void 0 : toolbarConfig.showLabels) && label && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { size: "sm" }, label))
|
|
5013
5039
|
);
|
|
5014
5040
|
}
|
|
5015
5041
|
function TourButton() {
|
|
5016
|
-
const { setIsOpen, setCurrentStep } = useTour();
|
|
5042
|
+
const { setIsOpen, setCurrentStep } = tour.useTour();
|
|
5017
5043
|
const { translate: t } = useTranslation();
|
|
5018
5044
|
const startTour = () => {
|
|
5019
5045
|
setCurrentStep(0);
|
|
5020
5046
|
setIsOpen(true);
|
|
5021
5047
|
};
|
|
5022
|
-
return /* @__PURE__ */
|
|
5048
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5023
5049
|
ToolbarButton,
|
|
5024
5050
|
{
|
|
5025
|
-
icon: /* @__PURE__ */
|
|
5051
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconHelpCircle, { strokeWidth: 1.5 }),
|
|
5026
5052
|
label: t("tour.controls.help"),
|
|
5027
5053
|
onClick: startTour
|
|
5028
5054
|
}
|
|
@@ -5033,11 +5059,11 @@ function Toolbar({
|
|
|
5033
5059
|
fullscreen
|
|
5034
5060
|
}) {
|
|
5035
5061
|
const { translate: t } = useTranslation();
|
|
5036
|
-
const theme = useMantineTheme();
|
|
5037
|
-
const smallerThanLg = useMediaQuery(`(max-width: ${theme.breakpoints.lg})`);
|
|
5062
|
+
const theme = core.useMantineTheme();
|
|
5063
|
+
const smallerThanLg = hooks.useMediaQuery(`(max-width: ${theme.breakpoints.lg})`);
|
|
5038
5064
|
const { toolbarConfig } = useSettings();
|
|
5039
|
-
const settings = /* @__PURE__ */
|
|
5040
|
-
Flex,
|
|
5065
|
+
const settings = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5066
|
+
core.Flex,
|
|
5041
5067
|
{
|
|
5042
5068
|
direction: { base: "column", lg: "row" },
|
|
5043
5069
|
justify: "flex-start",
|
|
@@ -5047,22 +5073,22 @@ function Toolbar({
|
|
|
5047
5073
|
wrap: "nowrap",
|
|
5048
5074
|
gap: "xs"
|
|
5049
5075
|
},
|
|
5050
|
-
toolbarConfig == null ? void 0 : toolbarConfig.buttons.map((b) => /* @__PURE__ */
|
|
5051
|
-
/* @__PURE__ */
|
|
5052
|
-
/* @__PURE__ */
|
|
5076
|
+
toolbarConfig == null ? void 0 : toolbarConfig.buttons.map((b) => /* @__PURE__ */ React19__namespace.default.createElement(ToolbarButton, { key: b.label, ...b })),
|
|
5077
|
+
/* @__PURE__ */ React19__namespace.default.createElement(TourButton, null),
|
|
5078
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5053
5079
|
ToolbarButton,
|
|
5054
5080
|
{
|
|
5055
|
-
icon: /* @__PURE__ */
|
|
5081
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(FullScreenSVG, null),
|
|
5056
5082
|
label: t("params.label_fullscreen"),
|
|
5057
5083
|
onClick: fullscreen.toggle
|
|
5058
5084
|
}
|
|
5059
5085
|
)
|
|
5060
5086
|
);
|
|
5061
|
-
return smallerThanLg ? /* @__PURE__ */
|
|
5087
|
+
return smallerThanLg ? /* @__PURE__ */ React19__namespace.default.createElement(core.Menu, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Target, null, /* @__PURE__ */ React19__namespace.default.createElement(core.ActionIcon, null, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconSettings, null))), /* @__PURE__ */ React19__namespace.default.createElement(core.Menu.Dropdown, null, settings)) : settings;
|
|
5062
5088
|
}
|
|
5063
5089
|
|
|
5064
5090
|
// src/components/ExplorerResults.tsx
|
|
5065
|
-
var useStyles3 = createStyles(() => ({
|
|
5091
|
+
var useStyles3 = core.createStyles(() => ({
|
|
5066
5092
|
container: {
|
|
5067
5093
|
minHeight: "40vh",
|
|
5068
5094
|
display: "flex",
|
|
@@ -5070,37 +5096,37 @@ var useStyles3 = createStyles(() => ({
|
|
|
5070
5096
|
}
|
|
5071
5097
|
}));
|
|
5072
5098
|
function ExplorerResults(props) {
|
|
5073
|
-
const cube = useSelector
|
|
5074
|
-
const serverStatus = useSelector
|
|
5075
|
-
const { params, result } = useSelector
|
|
5099
|
+
const cube = reactRedux.useSelector(selectOlapCube);
|
|
5100
|
+
const serverStatus = reactRedux.useSelector(selectServerState);
|
|
5101
|
+
const { params, result } = reactRedux.useSelector(selectCurrentQueryItem);
|
|
5076
5102
|
const { online: isServerOnline, url: serverUrl } = serverStatus;
|
|
5077
5103
|
const { error } = result;
|
|
5078
5104
|
const { translate: t } = useTranslation();
|
|
5079
5105
|
const { classes, cx } = useStyles3();
|
|
5080
5106
|
if (typeof window === "object" && window.navigator.onLine === false) {
|
|
5081
|
-
return /* @__PURE__ */
|
|
5107
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5082
5108
|
FailureResult,
|
|
5083
5109
|
{
|
|
5084
5110
|
className: cx(classes.container, props.className),
|
|
5085
|
-
icon: /* @__PURE__ */
|
|
5111
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconWorld, { color: "orange", size: "5rem" }),
|
|
5086
5112
|
title: t("results.error_disconnected_title")
|
|
5087
5113
|
}
|
|
5088
5114
|
);
|
|
5089
5115
|
}
|
|
5090
5116
|
if (isServerOnline === false) {
|
|
5091
|
-
return /* @__PURE__ */
|
|
5117
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5092
5118
|
FailureResult,
|
|
5093
5119
|
{
|
|
5094
5120
|
className: cx(classes.container, props.className),
|
|
5095
|
-
icon: /* @__PURE__ */
|
|
5121
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" }),
|
|
5096
5122
|
title: t("results.error_serveroffline_title"),
|
|
5097
|
-
description: /* @__PURE__ */
|
|
5123
|
+
description: /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { span: true }, t("results.error_serveroffline_detail"), /* @__PURE__ */ React19__namespace.default.createElement(core.Anchor, { href: serverUrl, target: "_blank", rel: "noopener noreferrer" }, serverUrl), ".")
|
|
5098
5124
|
}
|
|
5099
5125
|
);
|
|
5100
5126
|
}
|
|
5101
5127
|
if (isServerOnline == null || !cube) {
|
|
5102
|
-
return /* @__PURE__ */
|
|
5103
|
-
Paper,
|
|
5128
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5129
|
+
core.Paper,
|
|
5104
5130
|
{
|
|
5105
5131
|
className: cx(classes.container, props.className),
|
|
5106
5132
|
id: "query-results-transient",
|
|
@@ -5110,16 +5136,16 @@ function ExplorerResults(props) {
|
|
|
5110
5136
|
);
|
|
5111
5137
|
}
|
|
5112
5138
|
if (error) {
|
|
5113
|
-
return /* @__PURE__ */
|
|
5139
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5114
5140
|
FailureResult,
|
|
5115
5141
|
{
|
|
5116
5142
|
className: cx(classes.container, props.className),
|
|
5117
|
-
description: /* @__PURE__ */
|
|
5118
|
-
icon: /* @__PURE__ */
|
|
5143
|
+
description: /* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { align: "center", spacing: "xs" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, t("results.error_execquery_detail")), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, error)),
|
|
5144
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" })
|
|
5119
5145
|
}
|
|
5120
5146
|
);
|
|
5121
5147
|
}
|
|
5122
|
-
return /* @__PURE__ */
|
|
5148
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5123
5149
|
SuccessResult,
|
|
5124
5150
|
{
|
|
5125
5151
|
className: cx(classes.container, props.className),
|
|
@@ -5132,8 +5158,8 @@ function ExplorerResults(props) {
|
|
|
5132
5158
|
);
|
|
5133
5159
|
}
|
|
5134
5160
|
function FailureResult(props) {
|
|
5135
|
-
return /* @__PURE__ */
|
|
5136
|
-
Paper,
|
|
5161
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5162
|
+
core.Paper,
|
|
5137
5163
|
{
|
|
5138
5164
|
id: "query-results-failure",
|
|
5139
5165
|
className: props.className,
|
|
@@ -5141,31 +5167,31 @@ function FailureResult(props) {
|
|
|
5141
5167
|
withBorder: true,
|
|
5142
5168
|
sx: { justifyContent: "center" }
|
|
5143
5169
|
},
|
|
5144
|
-
/* @__PURE__ */
|
|
5170
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { align: "center", spacing: "xs" }, props.icon && props.icon, props.title && /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { order: 5 }, props.title), props.description && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, props.description), props.children && props.children, props.action && props.action)
|
|
5145
5171
|
);
|
|
5146
5172
|
}
|
|
5147
5173
|
function SuccessResult(props) {
|
|
5148
5174
|
const { cube, panels, params, result } = props;
|
|
5149
5175
|
const { translate: t } = useTranslation();
|
|
5150
5176
|
const { previewLimit, actions: actions2 } = useSettings();
|
|
5151
|
-
const queryItem = useSelector
|
|
5152
|
-
const isPreviewMode = useSelector
|
|
5177
|
+
const queryItem = reactRedux.useSelector(selectCurrentQueryItem);
|
|
5178
|
+
const isPreviewMode = reactRedux.useSelector(selectIsPreviewMode);
|
|
5153
5179
|
const { table, isError, isLoading, data, columns, pagination, setPagination } = useTable({
|
|
5154
5180
|
cube,
|
|
5155
5181
|
result
|
|
5156
5182
|
});
|
|
5157
|
-
const fullscreen = useFullscreen();
|
|
5158
|
-
const [CurrentComponent, panelKey, panelMeta] = useMemo(() => {
|
|
5183
|
+
const fullscreen = hooks.useFullscreen();
|
|
5184
|
+
const [CurrentComponent, panelKey, panelMeta] = React19.useMemo(() => {
|
|
5159
5185
|
const currentPanel = queryItem.panel || `${panels[0].key}-`;
|
|
5160
5186
|
const [panelKey2, ...panelMeta2] = currentPanel.split("-");
|
|
5161
5187
|
const panel = panels.find((item) => item.key === panelKey2) || panels[0];
|
|
5162
5188
|
return [panel.component, panel.key, panelMeta2.join("-")];
|
|
5163
5189
|
}, [panels, queryItem.panel]);
|
|
5164
|
-
const tabHandler = useCallback((newTab) => {
|
|
5190
|
+
const tabHandler = React19.useCallback((newTab) => {
|
|
5165
5191
|
actions2.switchPanel(newTab);
|
|
5166
5192
|
}, []);
|
|
5167
|
-
return /* @__PURE__ */
|
|
5168
|
-
Flex,
|
|
5193
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { gap: "xs", direction: "column", w: "100%", className: props.className }, /* @__PURE__ */ React19__namespace.default.createElement(core.Paper, { ref: fullscreen.ref, id: "query-results-success", h: "100%" }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5194
|
+
core.Flex,
|
|
5169
5195
|
{
|
|
5170
5196
|
sx: (t2) => ({
|
|
5171
5197
|
alignItems: "center",
|
|
@@ -5174,9 +5200,9 @@ function SuccessResult(props) {
|
|
|
5174
5200
|
}),
|
|
5175
5201
|
w: "100%"
|
|
5176
5202
|
},
|
|
5177
|
-
/* @__PURE__ */
|
|
5178
|
-
(!queryItem.panel || queryItem.panel === "table") && /* @__PURE__ */
|
|
5179
|
-
), isPreviewMode && /* @__PURE__ */
|
|
5203
|
+
/* @__PURE__ */ React19__namespace.default.createElement(ExplorerTabs, { panels, onChange: tabHandler, value: panelKey }),
|
|
5204
|
+
(!queryItem.panel || queryItem.panel === "table") && /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { sx: { display: "flex", flex: "0 1 auto", gap: "0.5rem" }, mr: "sm", noWrap: true }, /* @__PURE__ */ React19__namespace.default.createElement(Toolbar, { table, fullscreen }), /* @__PURE__ */ React19__namespace.default.createElement(DrawerMenu_default, null))
|
|
5205
|
+
), isPreviewMode && /* @__PURE__ */ React19__namespace.default.createElement(core.Alert, { id: "alert-load-all-results", color: "yellow", radius: 0, sx: { flex: "0 0 auto" } }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { fw: 700, span: true }, t("previewMode.title_preview"), ":", " "), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { span: true }, t("previewMode.description_preview", { limit: previewLimit }))), /* @__PURE__ */ React19__namespace.default.createElement(PreviewModeSwitch, null))), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { id: "query-results-content", sx: { flex: "1 1", height: "calc(100% - 60px)" } }, /* @__PURE__ */ React19__namespace.default.createElement(React19.Suspense, { fallback: props.children }, /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { h: "100%" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { sx: { flex: "1 1", overflowX: "scroll" } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5180
5206
|
CurrentComponent,
|
|
5181
5207
|
{
|
|
5182
5208
|
panelKey: `${panelKey}-${panelMeta}`,
|
|
@@ -5195,15 +5221,15 @@ function SuccessResult(props) {
|
|
|
5195
5221
|
}
|
|
5196
5222
|
|
|
5197
5223
|
// src/components/ParamsExplorer.tsx
|
|
5198
|
-
|
|
5224
|
+
init_cjs_shims();
|
|
5199
5225
|
function ParamsExplorer(props) {
|
|
5200
5226
|
const { locale } = props;
|
|
5201
|
-
return /* @__PURE__ */
|
|
5227
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(SelectCube, { locale });
|
|
5202
5228
|
}
|
|
5203
5229
|
var ParamsExplorer_default = ParamsExplorer;
|
|
5204
5230
|
|
|
5205
5231
|
// src/components/ExplorerContent.tsx
|
|
5206
|
-
var useStyles4 = createStyles((theme, params) => ({
|
|
5232
|
+
var useStyles4 = core.createStyles((theme, params) => ({
|
|
5207
5233
|
container: {
|
|
5208
5234
|
height: "100%",
|
|
5209
5235
|
[theme.fn.largerThan("md")]: {
|
|
@@ -5240,14 +5266,14 @@ function ExplorerContent(props) {
|
|
|
5240
5266
|
props.defaultCube
|
|
5241
5267
|
);
|
|
5242
5268
|
const { classes } = useStyles4({ height: props.height });
|
|
5243
|
-
useEffect(() => {
|
|
5269
|
+
React19.useEffect(() => {
|
|
5244
5270
|
if (props.locale) translation.setLocale(props.locale);
|
|
5245
5271
|
}, [props.locale, translation]);
|
|
5246
|
-
const splash = useMemo(() => {
|
|
5272
|
+
const splash = React19.useMemo(() => {
|
|
5247
5273
|
const SplashComponent = props.splash;
|
|
5248
|
-
return SplashComponent ? /* @__PURE__ */
|
|
5274
|
+
return SplashComponent ? /* @__PURE__ */ React19__namespace.default.createElement(SplashComponent, { translation }) : /* @__PURE__ */ React19__namespace.default.createElement(core.Center, { h: "100%", sx: { flex: 1 } }, /* @__PURE__ */ React19__namespace.default.createElement(AnimatedCube, null));
|
|
5249
5275
|
}, [props.splash, translation]);
|
|
5250
|
-
return /* @__PURE__ */
|
|
5276
|
+
return /* @__PURE__ */ React19__namespace.default.createElement("div", { className: classes.container }, /* @__PURE__ */ React19__namespace.default.createElement("div", { className: classes.root }, /* @__PURE__ */ React19__namespace.default.createElement(AppProviders, null, /* @__PURE__ */ React19__namespace.default.createElement(SideBarProvider, { locale: props.locale }, /* @__PURE__ */ React19__namespace.default.createElement(SideBar_default, null, /* @__PURE__ */ React19__namespace.default.createElement(SideBarItem, null, /* @__PURE__ */ React19__namespace.default.createElement(ParamsExplorer_default, { locale: props.locale })))), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5251
5277
|
ExplorerResults,
|
|
5252
5278
|
{
|
|
5253
5279
|
className: classes.flexCol,
|
|
@@ -5258,16 +5284,16 @@ function ExplorerContent(props) {
|
|
|
5258
5284
|
}
|
|
5259
5285
|
|
|
5260
5286
|
// src/components/PivotView.tsx
|
|
5261
|
-
|
|
5287
|
+
init_cjs_shims();
|
|
5262
5288
|
|
|
5263
5289
|
// src/hooks/pivot.ts
|
|
5264
|
-
|
|
5290
|
+
init_cjs_shims();
|
|
5265
5291
|
|
|
5266
5292
|
// src/utils/pivot.worker.js
|
|
5267
|
-
|
|
5293
|
+
init_cjs_shims();
|
|
5268
5294
|
|
|
5269
5295
|
// src/utils/workerify.ts
|
|
5270
|
-
|
|
5296
|
+
init_cjs_shims();
|
|
5271
5297
|
var SCRIPT_TYPE = "application/javascript";
|
|
5272
5298
|
var Worker = typeof window === "object" ? window.Worker : null;
|
|
5273
5299
|
if (Worker) {
|
|
@@ -5460,7 +5486,7 @@ var pivot_worker_default = shimWorker((self2) => {
|
|
|
5460
5486
|
function useFormatParams(measures, valueProperty) {
|
|
5461
5487
|
const { translate: t } = useTranslation();
|
|
5462
5488
|
const fmt = useFormatter();
|
|
5463
|
-
return useMemo(() => {
|
|
5489
|
+
return React19.useMemo(() => {
|
|
5464
5490
|
const formatterKey = fmt.getFormat(valueProperty);
|
|
5465
5491
|
const formatter2 = fmt.getFormatter(formatterKey);
|
|
5466
5492
|
return {
|
|
@@ -5475,9 +5501,9 @@ function useFormatParams(measures, valueProperty) {
|
|
|
5475
5501
|
}, [valueProperty, fmt, t]);
|
|
5476
5502
|
}
|
|
5477
5503
|
function usePivottedData(data, colProp, rowProp, valProp, initialState4 = null) {
|
|
5478
|
-
const [pivottedData, setPivottedData] = useState(initialState4);
|
|
5479
|
-
const [error, setError] = useState(null);
|
|
5480
|
-
useEffect(() => {
|
|
5504
|
+
const [pivottedData, setPivottedData] = React19.useState(initialState4);
|
|
5505
|
+
const [error, setError] = React19.useState(null);
|
|
5506
|
+
React19.useEffect(() => {
|
|
5481
5507
|
setPivottedData(initialState4);
|
|
5482
5508
|
setError(null);
|
|
5483
5509
|
serializeToArray(data, { colProp, rowProp, valProp }).then(setPivottedData, setError);
|
|
@@ -5508,7 +5534,7 @@ function serializeToArray(data, sides) {
|
|
|
5508
5534
|
}
|
|
5509
5535
|
|
|
5510
5536
|
// src/components/ButtonDownload.jsx
|
|
5511
|
-
|
|
5537
|
+
init_cjs_shims();
|
|
5512
5538
|
var mimeTypes2 = {
|
|
5513
5539
|
csv: "text/csv",
|
|
5514
5540
|
json: "application/json",
|
|
@@ -5518,7 +5544,7 @@ var mimeTypes2 = {
|
|
|
5518
5544
|
};
|
|
5519
5545
|
var ButtonDownload2 = (props) => {
|
|
5520
5546
|
const { provider, ...buttonProps } = props;
|
|
5521
|
-
const onClick = useCallback((evt) => {
|
|
5547
|
+
const onClick = React19.useCallback((evt) => {
|
|
5522
5548
|
evt.stopPropagation();
|
|
5523
5549
|
evt.preventDefault();
|
|
5524
5550
|
const anchor = document.createElement("a");
|
|
@@ -5540,22 +5566,22 @@ var ButtonDownload2 = (props) => {
|
|
|
5540
5566
|
console.error("Error downloading content:", error.message);
|
|
5541
5567
|
});
|
|
5542
5568
|
}, [provider]);
|
|
5543
|
-
return /* @__PURE__ */
|
|
5544
|
-
Button,
|
|
5569
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5570
|
+
core.Button,
|
|
5545
5571
|
{
|
|
5546
5572
|
...buttonProps,
|
|
5547
5573
|
fullWidth: true,
|
|
5548
5574
|
onClick,
|
|
5549
5575
|
variant: "default"
|
|
5550
5576
|
},
|
|
5551
|
-
/* @__PURE__ */
|
|
5577
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Text, { fz: "xs" }, props.children)
|
|
5552
5578
|
);
|
|
5553
5579
|
};
|
|
5554
5580
|
|
|
5555
5581
|
// src/components/NonIdealState.jsx
|
|
5556
|
-
|
|
5557
|
-
var NonIdealState = (props) => /* @__PURE__ */
|
|
5558
|
-
Center,
|
|
5582
|
+
init_cjs_shims();
|
|
5583
|
+
var NonIdealState = (props) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5584
|
+
core.Center,
|
|
5559
5585
|
{
|
|
5560
5586
|
h: "100%",
|
|
5561
5587
|
w: "100%",
|
|
@@ -5565,16 +5591,16 @@ var NonIdealState = (props) => /* @__PURE__ */ React19__default.createElement(
|
|
|
5565
5591
|
}
|
|
5566
5592
|
})
|
|
5567
5593
|
},
|
|
5568
|
-
/* @__PURE__ */
|
|
5594
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { align: "center", spacing: "xs" }, props.icon && props.icon, props.title && /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { order: 5 }, props.title), props.description && /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, props.description), props.children && props.children, props.action && props.action)
|
|
5569
5595
|
);
|
|
5570
5596
|
|
|
5571
5597
|
// src/components/PivotView.tsx
|
|
5572
|
-
var SelectOption = forwardRef(
|
|
5598
|
+
var SelectOption = React19.forwardRef(
|
|
5573
5599
|
(props, ref) => {
|
|
5574
|
-
return /* @__PURE__ */
|
|
5600
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(SelectObject, { ref, ...props });
|
|
5575
5601
|
}
|
|
5576
5602
|
);
|
|
5577
|
-
var useStyles5 = createStyles((theme) => ({
|
|
5603
|
+
var useStyles5 = core.createStyles((theme) => ({
|
|
5578
5604
|
container: {
|
|
5579
5605
|
[theme.fn.largerThan("md")]: {
|
|
5580
5606
|
height: "100%",
|
|
@@ -5598,9 +5624,9 @@ function PivotView(props) {
|
|
|
5598
5624
|
const { cube, params, result, ...mantineReactTableProps } = props;
|
|
5599
5625
|
const locale = params.locale;
|
|
5600
5626
|
const { translate: t } = useTranslation();
|
|
5601
|
-
const measureMap = useSelector
|
|
5627
|
+
const measureMap = reactRedux.useSelector(selectOlapMeasureMap);
|
|
5602
5628
|
const { classes, cx } = useStyles5();
|
|
5603
|
-
const measureOptions = useMemo(
|
|
5629
|
+
const measureOptions = React19.useMemo(
|
|
5604
5630
|
() => filterMap(Object.values(params.measures), (item) => {
|
|
5605
5631
|
const entity = measureMap[item.name];
|
|
5606
5632
|
return !isActiveItem(item) ? null : {
|
|
@@ -5611,7 +5637,7 @@ function PivotView(props) {
|
|
|
5611
5637
|
}),
|
|
5612
5638
|
[measureMap, params.measures, locale]
|
|
5613
5639
|
);
|
|
5614
|
-
const drilldownOptions = useMemo(() => {
|
|
5640
|
+
const drilldownOptions = React19.useMemo(() => {
|
|
5615
5641
|
const levelMap = mapDimensionHierarchyLevels(cube);
|
|
5616
5642
|
return Object.values(params.drilldowns).filter(isActiveItem).flatMap((item) => {
|
|
5617
5643
|
const [level, hierarchy, dimension] = levelMap[item.level];
|
|
@@ -5634,13 +5660,13 @@ function PivotView(props) {
|
|
|
5634
5660
|
);
|
|
5635
5661
|
});
|
|
5636
5662
|
}, [cube, params.drilldowns, locale]);
|
|
5637
|
-
const [colProp, setColumnProp] = useState(
|
|
5663
|
+
const [colProp, setColumnProp] = React19.useState(
|
|
5638
5664
|
() => drilldownOptions.find((item) => item.type === "time") || drilldownOptions[0]
|
|
5639
5665
|
);
|
|
5640
|
-
const [rowProp, setRowProp] = useState(
|
|
5666
|
+
const [rowProp, setRowProp] = React19.useState(
|
|
5641
5667
|
() => drilldownOptions.find((item) => item !== colProp) || drilldownOptions[0]
|
|
5642
5668
|
);
|
|
5643
|
-
const [valProp, setValueProp] = useState(() => measureOptions[0]);
|
|
5669
|
+
const [valProp, setValueProp] = React19.useState(() => measureOptions[0]);
|
|
5644
5670
|
const fileName = [params.cube, colProp.label, rowProp.label, valProp.value].join("_");
|
|
5645
5671
|
const [pivottedData, pivottingError] = usePivottedData(result.data, colProp.value, rowProp.value, valProp.value);
|
|
5646
5672
|
const {
|
|
@@ -5649,16 +5675,16 @@ function PivotView(props) {
|
|
|
5649
5675
|
formatterKeyOptions,
|
|
5650
5676
|
setFormat
|
|
5651
5677
|
} = useFormatParams(props.cube.measures, valProp.value);
|
|
5652
|
-
const warnings = useMemo(() => {
|
|
5678
|
+
const warnings = React19.useMemo(() => {
|
|
5653
5679
|
const warnings2 = [];
|
|
5654
5680
|
if (rowProp.type === "prop" || colProp.type === "prop") {
|
|
5655
5681
|
warnings2.push(
|
|
5656
|
-
/* @__PURE__ */
|
|
5657
|
-
Alert,
|
|
5682
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5683
|
+
core.Alert,
|
|
5658
5684
|
{
|
|
5659
5685
|
color: "yellow",
|
|
5660
5686
|
m: "sm",
|
|
5661
|
-
icon: /* @__PURE__ */
|
|
5687
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertCircle, { size: "2rem" }),
|
|
5662
5688
|
key: "propertypivot"
|
|
5663
5689
|
},
|
|
5664
5690
|
t("pivot_view.warning_propertypivot")
|
|
@@ -5668,21 +5694,21 @@ function PivotView(props) {
|
|
|
5668
5694
|
const drilldownCount = Object.values(params.drilldowns).filter(isActiveItem).length;
|
|
5669
5695
|
if (drilldownCount > 2) {
|
|
5670
5696
|
warnings2.push(
|
|
5671
|
-
valProp.type !== "Sum" /* SUM */ ? /* @__PURE__ */
|
|
5672
|
-
Alert,
|
|
5697
|
+
valProp.type !== "Sum" /* SUM */ ? /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5698
|
+
core.Alert,
|
|
5673
5699
|
{
|
|
5674
5700
|
color: "yellow",
|
|
5675
5701
|
m: "sm",
|
|
5676
|
-
icon: /* @__PURE__ */
|
|
5702
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertCircle, { size: "2rem" }),
|
|
5677
5703
|
key: "notsummeasure"
|
|
5678
5704
|
},
|
|
5679
5705
|
t("pivot_view.warning_notsummeasure")
|
|
5680
|
-
) : /* @__PURE__ */
|
|
5681
|
-
Alert,
|
|
5706
|
+
) : /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5707
|
+
core.Alert,
|
|
5682
5708
|
{
|
|
5683
5709
|
color: "yellow",
|
|
5684
5710
|
m: "sm",
|
|
5685
|
-
icon: /* @__PURE__ */
|
|
5711
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertCircle, { size: "2rem" }),
|
|
5686
5712
|
key: "sumdimensions"
|
|
5687
5713
|
},
|
|
5688
5714
|
t("pivot_view.warning_sumdimensions")
|
|
@@ -5691,9 +5717,9 @@ function PivotView(props) {
|
|
|
5691
5717
|
}
|
|
5692
5718
|
return warnings2;
|
|
5693
5719
|
}, [params.drilldowns, rowProp, colProp, valProp]);
|
|
5694
|
-
const downloadToolbar = useMemo(() => {
|
|
5720
|
+
const downloadToolbar = React19.useMemo(() => {
|
|
5695
5721
|
if (!pivottedData) return null;
|
|
5696
|
-
return /* @__PURE__ */
|
|
5722
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Input.Wrapper, { label: t("pivot_view.title_download") }, /* @__PURE__ */ React19__namespace.default.createElement(core.Button.Group, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5697
5723
|
ButtonDownload2,
|
|
5698
5724
|
{
|
|
5699
5725
|
provider: () => ({
|
|
@@ -5703,7 +5729,7 @@ function PivotView(props) {
|
|
|
5703
5729
|
})
|
|
5704
5730
|
},
|
|
5705
5731
|
"CSV"
|
|
5706
|
-
), /* @__PURE__ */
|
|
5732
|
+
), /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5707
5733
|
ButtonDownload2,
|
|
5708
5734
|
{
|
|
5709
5735
|
provider: () => ({
|
|
@@ -5716,51 +5742,51 @@ function PivotView(props) {
|
|
|
5716
5742
|
)));
|
|
5717
5743
|
}, [pivottedData, formatter2]);
|
|
5718
5744
|
if (drilldownOptions.length < 2) {
|
|
5719
|
-
return /* @__PURE__ */
|
|
5745
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5720
5746
|
NonIdealState,
|
|
5721
5747
|
{
|
|
5722
|
-
icon: /* @__PURE__ */
|
|
5748
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" }),
|
|
5723
5749
|
title: t("pivot_view.error_missingparams")
|
|
5724
5750
|
}
|
|
5725
5751
|
);
|
|
5726
5752
|
}
|
|
5727
5753
|
let preview;
|
|
5728
5754
|
if (!colProp || !rowProp || !valProp) {
|
|
5729
|
-
preview = /* @__PURE__ */
|
|
5755
|
+
preview = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5730
5756
|
NonIdealState,
|
|
5731
5757
|
{
|
|
5732
|
-
icon: /* @__PURE__ */
|
|
5758
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" }),
|
|
5733
5759
|
title: t("pivot_view.error_missingparams")
|
|
5734
5760
|
}
|
|
5735
5761
|
);
|
|
5736
5762
|
} else if (colProp === rowProp) {
|
|
5737
|
-
preview = /* @__PURE__ */
|
|
5763
|
+
preview = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5738
5764
|
NonIdealState,
|
|
5739
5765
|
{
|
|
5740
|
-
icon: /* @__PURE__ */
|
|
5766
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" }),
|
|
5741
5767
|
title: t("pivot_view.error_onedimension")
|
|
5742
5768
|
}
|
|
5743
5769
|
);
|
|
5744
5770
|
} else if (pivottingError != null) {
|
|
5745
|
-
preview = /* @__PURE__ */
|
|
5771
|
+
preview = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5746
5772
|
NonIdealState,
|
|
5747
5773
|
{
|
|
5748
|
-
icon: /* @__PURE__ */
|
|
5774
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconAlertTriangle, { color: "orange", size: "5rem" }),
|
|
5749
5775
|
title: t("pivot_view.error_internal"),
|
|
5750
5776
|
description: t("pivot_view.error_internal_detail", { error: pivottingError.message })
|
|
5751
5777
|
}
|
|
5752
5778
|
);
|
|
5753
5779
|
} else if (!pivottedData) {
|
|
5754
|
-
preview = /* @__PURE__ */
|
|
5780
|
+
preview = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5755
5781
|
NonIdealState,
|
|
5756
5782
|
{
|
|
5757
|
-
icon: /* @__PURE__ */
|
|
5783
|
+
icon: /* @__PURE__ */ React19__namespace.default.createElement(core.Loader, { size: "xl" }),
|
|
5758
5784
|
title: t("pivot_view.loading_title"),
|
|
5759
5785
|
description: t("pivot_view.loading_details")
|
|
5760
5786
|
}
|
|
5761
5787
|
);
|
|
5762
5788
|
} else {
|
|
5763
|
-
preview = /* @__PURE__ */
|
|
5789
|
+
preview = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5764
5790
|
MatrixTable,
|
|
5765
5791
|
{
|
|
5766
5792
|
key: `${fileName} ${formatterKey}`,
|
|
@@ -5771,14 +5797,14 @@ function PivotView(props) {
|
|
|
5771
5797
|
}
|
|
5772
5798
|
);
|
|
5773
5799
|
}
|
|
5774
|
-
return /* @__PURE__ */
|
|
5775
|
-
Box,
|
|
5800
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5801
|
+
core.Box,
|
|
5776
5802
|
{
|
|
5777
5803
|
id: "query-results-pivot-view",
|
|
5778
5804
|
className: cx(props.className, classes.container)
|
|
5779
5805
|
},
|
|
5780
|
-
/* @__PURE__ */
|
|
5781
|
-
SimpleGrid,
|
|
5806
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Box, { className: classes.colParams }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5807
|
+
core.SimpleGrid,
|
|
5782
5808
|
{
|
|
5783
5809
|
id: "query-results-pivot-view-params",
|
|
5784
5810
|
px: "md",
|
|
@@ -5790,7 +5816,7 @@ function PivotView(props) {
|
|
|
5790
5816
|
{ minWidth: "md", cols: 1 }
|
|
5791
5817
|
]
|
|
5792
5818
|
},
|
|
5793
|
-
/* @__PURE__ */
|
|
5819
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5794
5820
|
SelectOption,
|
|
5795
5821
|
{
|
|
5796
5822
|
getLabel: "label",
|
|
@@ -5801,7 +5827,7 @@ function PivotView(props) {
|
|
|
5801
5827
|
label: colProp.type === "prop" ? t("pivot_view.label_ddcolumnprop") : t("pivot_view.label_ddcolumn")
|
|
5802
5828
|
}
|
|
5803
5829
|
),
|
|
5804
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5805
5831
|
SelectOption,
|
|
5806
5832
|
{
|
|
5807
5833
|
getLabel: "label",
|
|
@@ -5812,7 +5838,7 @@ function PivotView(props) {
|
|
|
5812
5838
|
label: rowProp.type === "prop" ? t("pivot_view.label_ddrowprop") : t("pivot_view.label_ddrow")
|
|
5813
5839
|
}
|
|
5814
5840
|
),
|
|
5815
|
-
/* @__PURE__ */
|
|
5841
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5816
5842
|
SelectOption,
|
|
5817
5843
|
{
|
|
5818
5844
|
getLabel: "label",
|
|
@@ -5823,7 +5849,7 @@ function PivotView(props) {
|
|
|
5823
5849
|
selectedItem: valProp.value
|
|
5824
5850
|
}
|
|
5825
5851
|
),
|
|
5826
|
-
/* @__PURE__ */
|
|
5852
|
+
/* @__PURE__ */ React19__namespace.default.createElement(
|
|
5827
5853
|
SelectObject,
|
|
5828
5854
|
{
|
|
5829
5855
|
getLabel: "label",
|
|
@@ -5836,12 +5862,12 @@ function PivotView(props) {
|
|
|
5836
5862
|
),
|
|
5837
5863
|
downloadToolbar
|
|
5838
5864
|
), warnings.length > 0 ? warnings : null),
|
|
5839
|
-
/* @__PURE__ */
|
|
5865
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Box, { className: classes.colContent }, preview)
|
|
5840
5866
|
);
|
|
5841
5867
|
}
|
|
5842
5868
|
function MatrixTable(props) {
|
|
5843
5869
|
const { data, formatter: formatter2, headers, ...mantineReactTableProps } = props;
|
|
5844
|
-
const columns = useMemo(() => headers.map((header, colIndex) => ({
|
|
5870
|
+
const columns = React19.useMemo(() => headers.map((header, colIndex) => ({
|
|
5845
5871
|
accesorKey: header,
|
|
5846
5872
|
Cell: ({ row }) => colIndex > 0 && typeof row.original[colIndex] === "number" ? formatter2(row.original[colIndex]) : row.original[colIndex],
|
|
5847
5873
|
header,
|
|
@@ -5849,7 +5875,7 @@ function MatrixTable(props) {
|
|
|
5849
5875
|
align: colIndex > 0 ? "right" : "left"
|
|
5850
5876
|
}
|
|
5851
5877
|
})), [headers]);
|
|
5852
|
-
const tableProps = useMemo(() => ({
|
|
5878
|
+
const tableProps = React19.useMemo(() => ({
|
|
5853
5879
|
enableBottomToolbar: false,
|
|
5854
5880
|
enableColumnFilterModes: true,
|
|
5855
5881
|
enableColumnResizing: true,
|
|
@@ -5892,13 +5918,13 @@ function MatrixTable(props) {
|
|
|
5892
5918
|
}
|
|
5893
5919
|
}
|
|
5894
5920
|
}), []);
|
|
5895
|
-
const table = useMantineReactTable({
|
|
5921
|
+
const table = mantineReactTable.useMantineReactTable({
|
|
5896
5922
|
...tableProps,
|
|
5897
5923
|
...mantineReactTableProps,
|
|
5898
5924
|
columns,
|
|
5899
5925
|
data
|
|
5900
5926
|
});
|
|
5901
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(mantineReactTable.MantineReactTable, { table });
|
|
5902
5928
|
}
|
|
5903
5929
|
function stringifyMatrix(matrix, formatter2, format2) {
|
|
5904
5930
|
const joint = { csv: ",", tsv: " " }[format2];
|
|
@@ -5916,30 +5942,30 @@ function stringifyMatrix(matrix, formatter2, format2) {
|
|
|
5916
5942
|
}
|
|
5917
5943
|
|
|
5918
5944
|
// src/components/tour/ExplorerTour.tsx
|
|
5919
|
-
|
|
5945
|
+
init_cjs_shims();
|
|
5920
5946
|
|
|
5921
5947
|
// src/components/tour/useTourSteps.tsx
|
|
5922
|
-
|
|
5948
|
+
init_cjs_shims();
|
|
5923
5949
|
|
|
5924
5950
|
// src/components/tour/FirstStep.tsx
|
|
5925
|
-
|
|
5951
|
+
init_cjs_shims();
|
|
5926
5952
|
function FirstStep({ introImage }) {
|
|
5927
5953
|
const { translate: t } = useTranslation();
|
|
5928
|
-
return /* @__PURE__ */
|
|
5954
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Container, { className: "tour-item tour-welcome", px: 0 }, introImage && /* @__PURE__ */ React19__namespace.default.createElement("div", { className: "tour-img" }, introImage), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { className: "tour-text", px: "md" }, /* @__PURE__ */ React19__namespace.default.createElement("h3", null, t("tour.steps.welcome.title")), /* @__PURE__ */ React19__namespace.default.createElement("p", null, t("tour.steps.welcome.text1")), /* @__PURE__ */ React19__namespace.default.createElement("p", null, t("tour.steps.welcome.text2"))));
|
|
5929
5955
|
}
|
|
5930
5956
|
|
|
5931
5957
|
// src/components/tour/TourStep.tsx
|
|
5932
|
-
|
|
5958
|
+
init_cjs_shims();
|
|
5933
5959
|
function TourStep(props) {
|
|
5934
5960
|
const { title, texts } = props;
|
|
5935
5961
|
const paragraphs = Array.isArray(texts) ? texts : [texts];
|
|
5936
|
-
return /* @__PURE__ */
|
|
5962
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Container, { className: "tour-item tour-step", pt: "md" }, /* @__PURE__ */ React19__namespace.default.createElement("div", { className: "tour-text" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { order: 3 }, title), paragraphs.map((p, i) => /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "p", key: `p-${i + 1}` }, p))));
|
|
5937
5963
|
}
|
|
5938
5964
|
|
|
5939
5965
|
// src/components/tour/LastStep.tsx
|
|
5940
|
-
|
|
5966
|
+
init_cjs_shims();
|
|
5941
5967
|
function LastStep({ t }) {
|
|
5942
|
-
return /* @__PURE__ */
|
|
5968
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Container, { className: "tour-item tour-last", pt: "md" }, /* @__PURE__ */ React19__namespace.default.createElement("div", { className: "tour-text" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { order: 3 }, t("tour.steps.last.title")), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, { component: "p" }, t("tour.steps.last.text"))));
|
|
5943
5969
|
}
|
|
5944
5970
|
|
|
5945
5971
|
// src/components/tour/useTourSteps.tsx
|
|
@@ -5949,15 +5975,15 @@ var click = (selector) => () => {
|
|
|
5949
5975
|
};
|
|
5950
5976
|
var useTourSteps = (tourConfig) => {
|
|
5951
5977
|
const { translate: t } = useTranslation();
|
|
5952
|
-
const steps = useMemo(() => [
|
|
5978
|
+
const steps = React19.useMemo(() => [
|
|
5953
5979
|
{
|
|
5954
5980
|
selector: "document",
|
|
5955
|
-
content: /* @__PURE__ */
|
|
5981
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(FirstStep, { introImage: tourConfig.introImage }),
|
|
5956
5982
|
position: "center"
|
|
5957
5983
|
},
|
|
5958
5984
|
{
|
|
5959
5985
|
selector: "#dex-select-locale",
|
|
5960
|
-
content: /* @__PURE__ */
|
|
5986
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5961
5987
|
TourStep,
|
|
5962
5988
|
{
|
|
5963
5989
|
title: t("tour.steps.locale.title"),
|
|
@@ -5970,7 +5996,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
5970
5996
|
},
|
|
5971
5997
|
{
|
|
5972
5998
|
selector: "#dex-select-cube-area",
|
|
5973
|
-
content: /* @__PURE__ */
|
|
5999
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5974
6000
|
TourStep,
|
|
5975
6001
|
{
|
|
5976
6002
|
title: t("tour.steps.dataset.title"),
|
|
@@ -5983,7 +6009,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
5983
6009
|
},
|
|
5984
6010
|
{
|
|
5985
6011
|
selector: "#dex-search",
|
|
5986
|
-
content: /* @__PURE__ */
|
|
6012
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
5987
6013
|
TourStep,
|
|
5988
6014
|
{
|
|
5989
6015
|
title: t("tour.steps.search.title"),
|
|
@@ -5996,7 +6022,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
5996
6022
|
},
|
|
5997
6023
|
{
|
|
5998
6024
|
selector: "#dex-table",
|
|
5999
|
-
content: /* @__PURE__ */
|
|
6025
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6000
6026
|
TourStep,
|
|
6001
6027
|
{
|
|
6002
6028
|
title: t("tour.steps.table.title"),
|
|
@@ -6011,7 +6037,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
6011
6037
|
selector: "#dex-column-drawer-body",
|
|
6012
6038
|
actionBefore: click("#dex-column-btn"),
|
|
6013
6039
|
stepInteraction: true,
|
|
6014
|
-
content: /* @__PURE__ */
|
|
6040
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6015
6041
|
TourStep,
|
|
6016
6042
|
{
|
|
6017
6043
|
title: t("tour.steps.columns.title"),
|
|
@@ -6027,7 +6053,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
6027
6053
|
actionBefore: click(".dex-level-filter"),
|
|
6028
6054
|
actionAfter: click("#dex-column-drawer-close"),
|
|
6029
6055
|
stepInteraction: true,
|
|
6030
|
-
content: /* @__PURE__ */
|
|
6056
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6031
6057
|
TourStep,
|
|
6032
6058
|
{
|
|
6033
6059
|
title: t("tour.steps.filters.title"),
|
|
@@ -6040,7 +6066,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
6040
6066
|
},
|
|
6041
6067
|
{
|
|
6042
6068
|
selector: "#dex-btn-group-download",
|
|
6043
|
-
content: /* @__PURE__ */
|
|
6069
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6044
6070
|
TourStep,
|
|
6045
6071
|
{
|
|
6046
6072
|
title: t("tour.steps.download.title"),
|
|
@@ -6050,7 +6076,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
6050
6076
|
},
|
|
6051
6077
|
{
|
|
6052
6078
|
selector: "#dex-api-btn",
|
|
6053
|
-
content: /* @__PURE__ */
|
|
6079
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6054
6080
|
TourStep,
|
|
6055
6081
|
{
|
|
6056
6082
|
title: t("tour.steps.api.title"),
|
|
@@ -6061,7 +6087,7 @@ var useTourSteps = (tourConfig) => {
|
|
|
6061
6087
|
...tourConfig.extraSteps || [],
|
|
6062
6088
|
{
|
|
6063
6089
|
selector: "viewport",
|
|
6064
|
-
content: /* @__PURE__ */
|
|
6090
|
+
content: /* @__PURE__ */ React19__namespace.default.createElement(LastStep, { t }),
|
|
6065
6091
|
position: "center"
|
|
6066
6092
|
}
|
|
6067
6093
|
// ...
|
|
@@ -6072,15 +6098,15 @@ var useTourSteps = (tourConfig) => {
|
|
|
6072
6098
|
// src/components/tour/ExplorerTour.tsx
|
|
6073
6099
|
function PrevButton(props) {
|
|
6074
6100
|
const { translate: t } = useTranslation();
|
|
6075
|
-
const theme = useMantineTheme();
|
|
6101
|
+
const theme = core.useMantineTheme();
|
|
6076
6102
|
const isRtl = theme.dir === "rtl";
|
|
6077
6103
|
const handleClick = () => props.setCurrentStep(
|
|
6078
6104
|
(s) => s === 0 ? props.steps.length - 1 : s - 1
|
|
6079
6105
|
);
|
|
6080
|
-
return /* @__PURE__ */
|
|
6081
|
-
Button,
|
|
6106
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6107
|
+
core.Button,
|
|
6082
6108
|
{
|
|
6083
|
-
leftIcon: isRtl ? /* @__PURE__ */
|
|
6109
|
+
leftIcon: isRtl ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowRight, { size: "0.8rem" }) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowLeft, { size: "0.8rem" }),
|
|
6084
6110
|
onClick: handleClick,
|
|
6085
6111
|
radius: 0,
|
|
6086
6112
|
size: "lg",
|
|
@@ -6094,7 +6120,7 @@ function PrevButton(props) {
|
|
|
6094
6120
|
}
|
|
6095
6121
|
function NextButton(props) {
|
|
6096
6122
|
const { translate: t } = useTranslation();
|
|
6097
|
-
const theme = useMantineTheme();
|
|
6123
|
+
const theme = core.useMantineTheme();
|
|
6098
6124
|
const isRtl = theme.dir === "rtl";
|
|
6099
6125
|
const handleClick = () => {
|
|
6100
6126
|
if (props.currentStep === props.steps.length - 1) {
|
|
@@ -6110,15 +6136,15 @@ function NextButton(props) {
|
|
|
6110
6136
|
}
|
|
6111
6137
|
}
|
|
6112
6138
|
};
|
|
6113
|
-
return /* @__PURE__ */
|
|
6114
|
-
Button,
|
|
6139
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6140
|
+
core.Button,
|
|
6115
6141
|
{
|
|
6116
6142
|
variant: "filled",
|
|
6117
6143
|
w: "50%",
|
|
6118
6144
|
size: "lg",
|
|
6119
6145
|
sx: { flex: "0 0 50%" },
|
|
6120
6146
|
onClick: handleClick,
|
|
6121
|
-
rightIcon: isRtl ? /* @__PURE__ */
|
|
6147
|
+
rightIcon: isRtl ? /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowLeft, { size: "0.8rem" }) : /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconArrowRight, { size: "0.8rem" }),
|
|
6122
6148
|
radius: 0
|
|
6123
6149
|
},
|
|
6124
6150
|
t("tour.controls.next")
|
|
@@ -6169,7 +6195,7 @@ var keyboardHandler = (rtl) => (e, clickProps) => {
|
|
|
6169
6195
|
}
|
|
6170
6196
|
};
|
|
6171
6197
|
function ExplorerTour({ children, tourConfig }) {
|
|
6172
|
-
const theme = useMantineTheme();
|
|
6198
|
+
const theme = core.useMantineTheme();
|
|
6173
6199
|
const steps = useTourSteps(tourConfig);
|
|
6174
6200
|
const styles2 = {
|
|
6175
6201
|
popover: withBase({ padding: 0, borderRadius: theme.radius.md, overflow: "hidden" }),
|
|
@@ -6188,8 +6214,8 @@ function ExplorerTour({ children, tourConfig }) {
|
|
|
6188
6214
|
})
|
|
6189
6215
|
};
|
|
6190
6216
|
const rtl = theme.dir === "rtl";
|
|
6191
|
-
return /* @__PURE__ */
|
|
6192
|
-
TourProvider,
|
|
6217
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6218
|
+
tour.TourProvider,
|
|
6193
6219
|
{
|
|
6194
6220
|
steps,
|
|
6195
6221
|
position: "right",
|
|
@@ -6224,7 +6250,7 @@ function ExplorerComponent(props) {
|
|
|
6224
6250
|
tourConfig,
|
|
6225
6251
|
measuresActive
|
|
6226
6252
|
} = props;
|
|
6227
|
-
const panels = useMemo(
|
|
6253
|
+
const panels = React19.useMemo(
|
|
6228
6254
|
() => props.panels || [
|
|
6229
6255
|
{ key: "table", label: "table_view.tab_label", component: TableView },
|
|
6230
6256
|
{ key: "pivot", label: "pivot_view.tab_label", component: PivotView },
|
|
@@ -6232,12 +6258,12 @@ function ExplorerComponent(props) {
|
|
|
6232
6258
|
],
|
|
6233
6259
|
[props.panels]
|
|
6234
6260
|
);
|
|
6235
|
-
const store = withinReduxProvider ? useMemo(storeFactory, []) : useStore();
|
|
6236
|
-
const boundActions = useMemo(
|
|
6237
|
-
() => bindActionCreators(actions, store.dispatch),
|
|
6261
|
+
const store = withinReduxProvider ? React19.useMemo(storeFactory, []) : reactRedux.useStore();
|
|
6262
|
+
const boundActions = React19.useMemo(
|
|
6263
|
+
() => toolkit.bindActionCreators(actions, store.dispatch),
|
|
6238
6264
|
[]
|
|
6239
6265
|
);
|
|
6240
|
-
let content = /* @__PURE__ */
|
|
6266
|
+
let content = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6241
6267
|
SettingsProvider,
|
|
6242
6268
|
{
|
|
6243
6269
|
actions: boundActions,
|
|
@@ -6249,7 +6275,7 @@ function ExplorerComponent(props) {
|
|
|
6249
6275
|
measuresActive,
|
|
6250
6276
|
toolbarConfig: props.toolbarConfig
|
|
6251
6277
|
},
|
|
6252
|
-
/* @__PURE__ */
|
|
6278
|
+
/* @__PURE__ */ React19__namespace.default.createElement(TranslationProvider, { defaultLocale: locale, translations: props.translations }, /* @__PURE__ */ React19__namespace.default.createElement(ExplorerTour, { tourConfig: { ...defaultTourConfig, ...tourConfig } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6253
6279
|
ExplorerContent,
|
|
6254
6280
|
{
|
|
6255
6281
|
defaultCube: props.defaultCube,
|
|
@@ -6266,8 +6292,8 @@ function ExplorerComponent(props) {
|
|
|
6266
6292
|
)))
|
|
6267
6293
|
);
|
|
6268
6294
|
if (withinMantineProvider) {
|
|
6269
|
-
content = /* @__PURE__ */
|
|
6270
|
-
MantineProvider,
|
|
6295
|
+
content = /* @__PURE__ */ React19__namespace.default.createElement(
|
|
6296
|
+
core.MantineProvider,
|
|
6271
6297
|
{
|
|
6272
6298
|
withNormalizeCSS: true,
|
|
6273
6299
|
theme: {
|
|
@@ -6303,20 +6329,20 @@ function ExplorerComponent(props) {
|
|
|
6303
6329
|
);
|
|
6304
6330
|
}
|
|
6305
6331
|
if (withinReduxProvider) {
|
|
6306
|
-
content = /* @__PURE__ */
|
|
6332
|
+
content = /* @__PURE__ */ React19__namespace.default.createElement(reactRedux.Provider, { store }, content);
|
|
6307
6333
|
}
|
|
6308
6334
|
return content;
|
|
6309
6335
|
}
|
|
6310
6336
|
ExplorerComponent.displayName = "TesseractExplorer";
|
|
6311
6337
|
|
|
6312
6338
|
// src/vizbuilder/index.ts
|
|
6313
|
-
|
|
6339
|
+
init_cjs_shims();
|
|
6314
6340
|
|
|
6315
6341
|
// src/vizbuilder/components/VizbuilderView.tsx
|
|
6316
|
-
|
|
6342
|
+
init_cjs_shims();
|
|
6317
6343
|
|
|
6318
6344
|
// src/vizbuilder/tooling/columns.ts
|
|
6319
|
-
|
|
6345
|
+
init_cjs_shims();
|
|
6320
6346
|
function buildColumn(cube, name4, columns) {
|
|
6321
6347
|
const nameWithoutID = name4.replace(/\sID$/, "");
|
|
6322
6348
|
const nameWithID = `${nameWithoutID} ID`;
|
|
@@ -6371,10 +6397,10 @@ function getColumnEntity(column) {
|
|
|
6371
6397
|
}
|
|
6372
6398
|
|
|
6373
6399
|
// src/vizbuilder/components/Vizbuilder.tsx
|
|
6374
|
-
|
|
6400
|
+
init_cjs_shims();
|
|
6375
6401
|
|
|
6376
6402
|
// node_modules/clsx/dist/clsx.m.js
|
|
6377
|
-
|
|
6403
|
+
init_cjs_shims();
|
|
6378
6404
|
function r(e) {
|
|
6379
6405
|
var t, f, n = "";
|
|
6380
6406
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -6389,25 +6415,25 @@ function clsx() {
|
|
|
6389
6415
|
var clsx_m_default = clsx;
|
|
6390
6416
|
|
|
6391
6417
|
// src/vizbuilder/components/ChartCard.tsx
|
|
6392
|
-
|
|
6418
|
+
init_cjs_shims();
|
|
6393
6419
|
|
|
6394
6420
|
// node_modules/d3plus-export/es/index.js
|
|
6395
|
-
|
|
6421
|
+
init_cjs_shims();
|
|
6396
6422
|
|
|
6397
6423
|
// node_modules/d3plus-export/es/src/saveElement.js
|
|
6398
|
-
|
|
6424
|
+
init_cjs_shims();
|
|
6399
6425
|
|
|
6400
6426
|
// node_modules/html-to-image/es/index.js
|
|
6401
|
-
|
|
6427
|
+
init_cjs_shims();
|
|
6402
6428
|
|
|
6403
6429
|
// node_modules/html-to-image/es/clone-node.js
|
|
6404
|
-
|
|
6430
|
+
init_cjs_shims();
|
|
6405
6431
|
|
|
6406
6432
|
// node_modules/html-to-image/es/clone-pseudos.js
|
|
6407
|
-
|
|
6433
|
+
init_cjs_shims();
|
|
6408
6434
|
|
|
6409
6435
|
// node_modules/html-to-image/es/util.js
|
|
6410
|
-
|
|
6436
|
+
init_cjs_shims();
|
|
6411
6437
|
function resolveUrl(url, baseUrl) {
|
|
6412
6438
|
if (url.match(/^[a-z]+:\/\//i)) {
|
|
6413
6439
|
return url;
|
|
@@ -6599,7 +6625,7 @@ function clonePseudoElements(nativeNode, clonedNode) {
|
|
|
6599
6625
|
}
|
|
6600
6626
|
|
|
6601
6627
|
// node_modules/html-to-image/es/mimes.js
|
|
6602
|
-
|
|
6628
|
+
init_cjs_shims();
|
|
6603
6629
|
var WOFF = "application/font-woff";
|
|
6604
6630
|
var JPEG = "image/jpeg";
|
|
6605
6631
|
var mimes = {
|
|
@@ -6625,7 +6651,7 @@ function getMimeType(url) {
|
|
|
6625
6651
|
}
|
|
6626
6652
|
|
|
6627
6653
|
// node_modules/html-to-image/es/dataurl.js
|
|
6628
|
-
|
|
6654
|
+
init_cjs_shims();
|
|
6629
6655
|
function getContentFromDataUrl(dataURL) {
|
|
6630
6656
|
return dataURL.split(/,/)[1];
|
|
6631
6657
|
}
|
|
@@ -6858,10 +6884,10 @@ async function cloneNode(node, options, isRoot) {
|
|
|
6858
6884
|
}
|
|
6859
6885
|
|
|
6860
6886
|
// node_modules/html-to-image/es/embed-images.js
|
|
6861
|
-
|
|
6887
|
+
init_cjs_shims();
|
|
6862
6888
|
|
|
6863
6889
|
// node_modules/html-to-image/es/embed-resources.js
|
|
6864
|
-
|
|
6890
|
+
init_cjs_shims();
|
|
6865
6891
|
var URL_REGEX = /url\((['"]?)([^'"]+?)\1\)/g;
|
|
6866
6892
|
var URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g;
|
|
6867
6893
|
var FONT_SRC_REGEX = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
@@ -6973,7 +6999,7 @@ async function embedImages(clonedNode, options) {
|
|
|
6973
6999
|
}
|
|
6974
7000
|
|
|
6975
7001
|
// node_modules/html-to-image/es/apply-style.js
|
|
6976
|
-
|
|
7002
|
+
init_cjs_shims();
|
|
6977
7003
|
function applyStyle(node, options) {
|
|
6978
7004
|
const { style } = node;
|
|
6979
7005
|
if (options.backgroundColor) {
|
|
@@ -6995,7 +7021,7 @@ function applyStyle(node, options) {
|
|
|
6995
7021
|
}
|
|
6996
7022
|
|
|
6997
7023
|
// node_modules/html-to-image/es/embed-webfonts.js
|
|
6998
|
-
|
|
7024
|
+
init_cjs_shims();
|
|
6999
7025
|
var cssFetchCache = {};
|
|
7000
7026
|
async function fetchCSS(url) {
|
|
7001
7027
|
let cache2 = cssFetchCache[url];
|
|
@@ -7218,22 +7244,22 @@ function saveElement_default(elem) {
|
|
|
7218
7244
|
}
|
|
7219
7245
|
|
|
7220
7246
|
// src/vizbuilder/hooks/useD3plusConfig.ts
|
|
7221
|
-
|
|
7247
|
+
init_cjs_shims();
|
|
7222
7248
|
|
|
7223
7249
|
// node_modules/lodash-es/lodash.js
|
|
7224
|
-
|
|
7250
|
+
init_cjs_shims();
|
|
7225
7251
|
|
|
7226
7252
|
// node_modules/lodash-es/_baseGetTag.js
|
|
7227
|
-
|
|
7253
|
+
init_cjs_shims();
|
|
7228
7254
|
|
|
7229
7255
|
// node_modules/lodash-es/_Symbol.js
|
|
7230
|
-
|
|
7256
|
+
init_cjs_shims();
|
|
7231
7257
|
|
|
7232
7258
|
// node_modules/lodash-es/_root.js
|
|
7233
|
-
|
|
7259
|
+
init_cjs_shims();
|
|
7234
7260
|
|
|
7235
7261
|
// node_modules/lodash-es/_freeGlobal.js
|
|
7236
|
-
|
|
7262
|
+
init_cjs_shims();
|
|
7237
7263
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
7238
7264
|
var freeGlobal_default = freeGlobal;
|
|
7239
7265
|
|
|
@@ -7247,7 +7273,7 @@ var Symbol2 = root_default.Symbol;
|
|
|
7247
7273
|
var Symbol_default = Symbol2;
|
|
7248
7274
|
|
|
7249
7275
|
// node_modules/lodash-es/_getRawTag.js
|
|
7250
|
-
|
|
7276
|
+
init_cjs_shims();
|
|
7251
7277
|
var objectProto = Object.prototype;
|
|
7252
7278
|
var hasOwnProperty2 = objectProto.hasOwnProperty;
|
|
7253
7279
|
var nativeObjectToString = objectProto.toString;
|
|
@@ -7272,7 +7298,7 @@ function getRawTag(value) {
|
|
|
7272
7298
|
var getRawTag_default = getRawTag;
|
|
7273
7299
|
|
|
7274
7300
|
// node_modules/lodash-es/_objectToString.js
|
|
7275
|
-
|
|
7301
|
+
init_cjs_shims();
|
|
7276
7302
|
var objectProto2 = Object.prototype;
|
|
7277
7303
|
var nativeObjectToString2 = objectProto2.toString;
|
|
7278
7304
|
function objectToString(value) {
|
|
@@ -7293,19 +7319,19 @@ function baseGetTag(value) {
|
|
|
7293
7319
|
var baseGetTag_default = baseGetTag;
|
|
7294
7320
|
|
|
7295
7321
|
// node_modules/lodash-es/isObjectLike.js
|
|
7296
|
-
|
|
7322
|
+
init_cjs_shims();
|
|
7297
7323
|
function isObjectLike(value) {
|
|
7298
7324
|
return value != null && typeof value == "object";
|
|
7299
7325
|
}
|
|
7300
7326
|
var isObjectLike_default = isObjectLike;
|
|
7301
7327
|
|
|
7302
7328
|
// node_modules/lodash-es/isArray.js
|
|
7303
|
-
|
|
7329
|
+
init_cjs_shims();
|
|
7304
7330
|
var isArray = Array.isArray;
|
|
7305
7331
|
var isArray_default = isArray;
|
|
7306
7332
|
|
|
7307
7333
|
// node_modules/lodash-es/isObject.js
|
|
7308
|
-
|
|
7334
|
+
init_cjs_shims();
|
|
7309
7335
|
function isObject(value) {
|
|
7310
7336
|
var type = typeof value;
|
|
7311
7337
|
return value != null && (type == "object" || type == "function");
|
|
@@ -7313,20 +7339,20 @@ function isObject(value) {
|
|
|
7313
7339
|
var isObject_default = isObject;
|
|
7314
7340
|
|
|
7315
7341
|
// node_modules/lodash-es/identity.js
|
|
7316
|
-
|
|
7342
|
+
init_cjs_shims();
|
|
7317
7343
|
function identity2(value) {
|
|
7318
7344
|
return value;
|
|
7319
7345
|
}
|
|
7320
7346
|
var identity_default = identity2;
|
|
7321
7347
|
|
|
7322
7348
|
// node_modules/lodash-es/_getNative.js
|
|
7323
|
-
|
|
7349
|
+
init_cjs_shims();
|
|
7324
7350
|
|
|
7325
7351
|
// node_modules/lodash-es/_baseIsNative.js
|
|
7326
|
-
|
|
7352
|
+
init_cjs_shims();
|
|
7327
7353
|
|
|
7328
7354
|
// node_modules/lodash-es/isFunction.js
|
|
7329
|
-
|
|
7355
|
+
init_cjs_shims();
|
|
7330
7356
|
var asyncTag = "[object AsyncFunction]";
|
|
7331
7357
|
var funcTag = "[object Function]";
|
|
7332
7358
|
var genTag = "[object GeneratorFunction]";
|
|
@@ -7341,10 +7367,10 @@ function isFunction(value) {
|
|
|
7341
7367
|
var isFunction_default = isFunction;
|
|
7342
7368
|
|
|
7343
7369
|
// node_modules/lodash-es/_isMasked.js
|
|
7344
|
-
|
|
7370
|
+
init_cjs_shims();
|
|
7345
7371
|
|
|
7346
7372
|
// node_modules/lodash-es/_coreJsData.js
|
|
7347
|
-
|
|
7373
|
+
init_cjs_shims();
|
|
7348
7374
|
var coreJsData = root_default["__core-js_shared__"];
|
|
7349
7375
|
var coreJsData_default = coreJsData;
|
|
7350
7376
|
|
|
@@ -7359,7 +7385,7 @@ function isMasked(func) {
|
|
|
7359
7385
|
var isMasked_default = isMasked;
|
|
7360
7386
|
|
|
7361
7387
|
// node_modules/lodash-es/_toSource.js
|
|
7362
|
-
|
|
7388
|
+
init_cjs_shims();
|
|
7363
7389
|
var funcProto = Function.prototype;
|
|
7364
7390
|
var funcToString = funcProto.toString;
|
|
7365
7391
|
function toSource(func) {
|
|
@@ -7397,7 +7423,7 @@ function baseIsNative(value) {
|
|
|
7397
7423
|
var baseIsNative_default = baseIsNative;
|
|
7398
7424
|
|
|
7399
7425
|
// node_modules/lodash-es/_getValue.js
|
|
7400
|
-
|
|
7426
|
+
init_cjs_shims();
|
|
7401
7427
|
function getValue(object, key) {
|
|
7402
7428
|
return object == null ? void 0 : object[key];
|
|
7403
7429
|
}
|
|
@@ -7411,7 +7437,7 @@ function getNative(object, key) {
|
|
|
7411
7437
|
var getNative_default = getNative;
|
|
7412
7438
|
|
|
7413
7439
|
// node_modules/lodash-es/_apply.js
|
|
7414
|
-
|
|
7440
|
+
init_cjs_shims();
|
|
7415
7441
|
function apply(func, thisArg, args) {
|
|
7416
7442
|
switch (args.length) {
|
|
7417
7443
|
case 0:
|
|
@@ -7428,7 +7454,7 @@ function apply(func, thisArg, args) {
|
|
|
7428
7454
|
var apply_default = apply;
|
|
7429
7455
|
|
|
7430
7456
|
// node_modules/lodash-es/_shortOut.js
|
|
7431
|
-
|
|
7457
|
+
init_cjs_shims();
|
|
7432
7458
|
var HOT_COUNT = 800;
|
|
7433
7459
|
var HOT_SPAN = 16;
|
|
7434
7460
|
var nativeNow = Date.now;
|
|
@@ -7450,13 +7476,13 @@ function shortOut(func) {
|
|
|
7450
7476
|
var shortOut_default = shortOut;
|
|
7451
7477
|
|
|
7452
7478
|
// node_modules/lodash-es/_setToString.js
|
|
7453
|
-
|
|
7479
|
+
init_cjs_shims();
|
|
7454
7480
|
|
|
7455
7481
|
// node_modules/lodash-es/_baseSetToString.js
|
|
7456
|
-
|
|
7482
|
+
init_cjs_shims();
|
|
7457
7483
|
|
|
7458
7484
|
// node_modules/lodash-es/constant.js
|
|
7459
|
-
|
|
7485
|
+
init_cjs_shims();
|
|
7460
7486
|
function constant(value) {
|
|
7461
7487
|
return function() {
|
|
7462
7488
|
return value;
|
|
@@ -7465,7 +7491,7 @@ function constant(value) {
|
|
|
7465
7491
|
var constant_default = constant;
|
|
7466
7492
|
|
|
7467
7493
|
// node_modules/lodash-es/_defineProperty.js
|
|
7468
|
-
|
|
7494
|
+
init_cjs_shims();
|
|
7469
7495
|
var defineProperty = function() {
|
|
7470
7496
|
try {
|
|
7471
7497
|
var func = getNative_default(Object, "defineProperty");
|
|
@@ -7492,7 +7518,7 @@ var setToString = shortOut_default(baseSetToString_default);
|
|
|
7492
7518
|
var setToString_default = setToString;
|
|
7493
7519
|
|
|
7494
7520
|
// node_modules/lodash-es/_isIndex.js
|
|
7495
|
-
|
|
7521
|
+
init_cjs_shims();
|
|
7496
7522
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
7497
7523
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
7498
7524
|
function isIndex(value, length) {
|
|
@@ -7503,13 +7529,13 @@ function isIndex(value, length) {
|
|
|
7503
7529
|
var isIndex_default = isIndex;
|
|
7504
7530
|
|
|
7505
7531
|
// node_modules/lodash-es/assign.js
|
|
7506
|
-
|
|
7532
|
+
init_cjs_shims();
|
|
7507
7533
|
|
|
7508
7534
|
// node_modules/lodash-es/_assignValue.js
|
|
7509
|
-
|
|
7535
|
+
init_cjs_shims();
|
|
7510
7536
|
|
|
7511
7537
|
// node_modules/lodash-es/_baseAssignValue.js
|
|
7512
|
-
|
|
7538
|
+
init_cjs_shims();
|
|
7513
7539
|
function baseAssignValue(object, key, value) {
|
|
7514
7540
|
if (key == "__proto__" && defineProperty_default) {
|
|
7515
7541
|
defineProperty_default(object, key, {
|
|
@@ -7525,7 +7551,7 @@ function baseAssignValue(object, key, value) {
|
|
|
7525
7551
|
var baseAssignValue_default = baseAssignValue;
|
|
7526
7552
|
|
|
7527
7553
|
// node_modules/lodash-es/eq.js
|
|
7528
|
-
|
|
7554
|
+
init_cjs_shims();
|
|
7529
7555
|
function eq(value, other) {
|
|
7530
7556
|
return value === other || value !== value && other !== other;
|
|
7531
7557
|
}
|
|
@@ -7543,7 +7569,7 @@ function assignValue(object, key, value) {
|
|
|
7543
7569
|
var assignValue_default = assignValue;
|
|
7544
7570
|
|
|
7545
7571
|
// node_modules/lodash-es/_copyObject.js
|
|
7546
|
-
|
|
7572
|
+
init_cjs_shims();
|
|
7547
7573
|
function copyObject(source, props, object, customizer) {
|
|
7548
7574
|
var isNew = !object;
|
|
7549
7575
|
object || (object = {});
|
|
@@ -7565,13 +7591,13 @@ function copyObject(source, props, object, customizer) {
|
|
|
7565
7591
|
var copyObject_default = copyObject;
|
|
7566
7592
|
|
|
7567
7593
|
// node_modules/lodash-es/_createAssigner.js
|
|
7568
|
-
|
|
7594
|
+
init_cjs_shims();
|
|
7569
7595
|
|
|
7570
7596
|
// node_modules/lodash-es/_baseRest.js
|
|
7571
|
-
|
|
7597
|
+
init_cjs_shims();
|
|
7572
7598
|
|
|
7573
7599
|
// node_modules/lodash-es/_overRest.js
|
|
7574
|
-
|
|
7600
|
+
init_cjs_shims();
|
|
7575
7601
|
var nativeMax = Math.max;
|
|
7576
7602
|
function overRest(func, start, transform) {
|
|
7577
7603
|
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
@@ -7598,13 +7624,13 @@ function baseRest(func, start) {
|
|
|
7598
7624
|
var baseRest_default = baseRest;
|
|
7599
7625
|
|
|
7600
7626
|
// node_modules/lodash-es/_isIterateeCall.js
|
|
7601
|
-
|
|
7627
|
+
init_cjs_shims();
|
|
7602
7628
|
|
|
7603
7629
|
// node_modules/lodash-es/isArrayLike.js
|
|
7604
|
-
|
|
7630
|
+
init_cjs_shims();
|
|
7605
7631
|
|
|
7606
7632
|
// node_modules/lodash-es/isLength.js
|
|
7607
|
-
|
|
7633
|
+
init_cjs_shims();
|
|
7608
7634
|
var MAX_SAFE_INTEGER2 = 9007199254740991;
|
|
7609
7635
|
function isLength(value) {
|
|
7610
7636
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
|
|
@@ -7652,7 +7678,7 @@ function createAssigner(assigner) {
|
|
|
7652
7678
|
var createAssigner_default = createAssigner;
|
|
7653
7679
|
|
|
7654
7680
|
// node_modules/lodash-es/_isPrototype.js
|
|
7655
|
-
|
|
7681
|
+
init_cjs_shims();
|
|
7656
7682
|
var objectProto5 = Object.prototype;
|
|
7657
7683
|
function isPrototype(value) {
|
|
7658
7684
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto5;
|
|
@@ -7661,13 +7687,13 @@ function isPrototype(value) {
|
|
|
7661
7687
|
var isPrototype_default = isPrototype;
|
|
7662
7688
|
|
|
7663
7689
|
// node_modules/lodash-es/keys.js
|
|
7664
|
-
|
|
7690
|
+
init_cjs_shims();
|
|
7665
7691
|
|
|
7666
7692
|
// node_modules/lodash-es/_arrayLikeKeys.js
|
|
7667
|
-
|
|
7693
|
+
init_cjs_shims();
|
|
7668
7694
|
|
|
7669
7695
|
// node_modules/lodash-es/_baseTimes.js
|
|
7670
|
-
|
|
7696
|
+
init_cjs_shims();
|
|
7671
7697
|
function baseTimes(n, iteratee) {
|
|
7672
7698
|
var index = -1, result = Array(n);
|
|
7673
7699
|
while (++index < n) {
|
|
@@ -7678,10 +7704,10 @@ function baseTimes(n, iteratee) {
|
|
|
7678
7704
|
var baseTimes_default = baseTimes;
|
|
7679
7705
|
|
|
7680
7706
|
// node_modules/lodash-es/isArguments.js
|
|
7681
|
-
|
|
7707
|
+
init_cjs_shims();
|
|
7682
7708
|
|
|
7683
7709
|
// node_modules/lodash-es/_baseIsArguments.js
|
|
7684
|
-
|
|
7710
|
+
init_cjs_shims();
|
|
7685
7711
|
var argsTag = "[object Arguments]";
|
|
7686
7712
|
function baseIsArguments(value) {
|
|
7687
7713
|
return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
|
|
@@ -7700,10 +7726,10 @@ var isArguments = baseIsArguments_default(/* @__PURE__ */ function() {
|
|
|
7700
7726
|
var isArguments_default = isArguments;
|
|
7701
7727
|
|
|
7702
7728
|
// node_modules/lodash-es/isBuffer.js
|
|
7703
|
-
|
|
7729
|
+
init_cjs_shims();
|
|
7704
7730
|
|
|
7705
7731
|
// node_modules/lodash-es/stubFalse.js
|
|
7706
|
-
|
|
7732
|
+
init_cjs_shims();
|
|
7707
7733
|
function stubFalse() {
|
|
7708
7734
|
return false;
|
|
7709
7735
|
}
|
|
@@ -7719,10 +7745,10 @@ var isBuffer = nativeIsBuffer || stubFalse_default;
|
|
|
7719
7745
|
var isBuffer_default = isBuffer;
|
|
7720
7746
|
|
|
7721
7747
|
// node_modules/lodash-es/isTypedArray.js
|
|
7722
|
-
|
|
7748
|
+
init_cjs_shims();
|
|
7723
7749
|
|
|
7724
7750
|
// node_modules/lodash-es/_baseIsTypedArray.js
|
|
7725
|
-
|
|
7751
|
+
init_cjs_shims();
|
|
7726
7752
|
var argsTag2 = "[object Arguments]";
|
|
7727
7753
|
var arrayTag = "[object Array]";
|
|
7728
7754
|
var boolTag = "[object Boolean]";
|
|
@@ -7756,7 +7782,7 @@ function baseIsTypedArray(value) {
|
|
|
7756
7782
|
var baseIsTypedArray_default = baseIsTypedArray;
|
|
7757
7783
|
|
|
7758
7784
|
// node_modules/lodash-es/_baseUnary.js
|
|
7759
|
-
|
|
7785
|
+
init_cjs_shims();
|
|
7760
7786
|
function baseUnary(func) {
|
|
7761
7787
|
return function(value) {
|
|
7762
7788
|
return func(value);
|
|
@@ -7765,7 +7791,7 @@ function baseUnary(func) {
|
|
|
7765
7791
|
var baseUnary_default = baseUnary;
|
|
7766
7792
|
|
|
7767
7793
|
// node_modules/lodash-es/_nodeUtil.js
|
|
7768
|
-
|
|
7794
|
+
init_cjs_shims();
|
|
7769
7795
|
var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
7770
7796
|
var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
|
|
7771
7797
|
var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
|
|
@@ -7806,13 +7832,13 @@ function arrayLikeKeys(value, inherited) {
|
|
|
7806
7832
|
var arrayLikeKeys_default = arrayLikeKeys;
|
|
7807
7833
|
|
|
7808
7834
|
// node_modules/lodash-es/_baseKeys.js
|
|
7809
|
-
|
|
7835
|
+
init_cjs_shims();
|
|
7810
7836
|
|
|
7811
7837
|
// node_modules/lodash-es/_nativeKeys.js
|
|
7812
|
-
|
|
7838
|
+
init_cjs_shims();
|
|
7813
7839
|
|
|
7814
7840
|
// node_modules/lodash-es/_overArg.js
|
|
7815
|
-
|
|
7841
|
+
init_cjs_shims();
|
|
7816
7842
|
function overArg(func, transform) {
|
|
7817
7843
|
return function(arg) {
|
|
7818
7844
|
return func(transform(arg));
|
|
@@ -7865,27 +7891,27 @@ var assign_default = assign;
|
|
|
7865
7891
|
function useD3plusConfig(chart, params) {
|
|
7866
7892
|
const { fullMode, getMeasureConfig, showConfidenceInt, t } = params;
|
|
7867
7893
|
const { getFormatter } = useFormatter();
|
|
7868
|
-
return useMemo(() => {
|
|
7894
|
+
return React19.useMemo(() => {
|
|
7869
7895
|
if (!chart) return [null, { data: "", locale: "" }];
|
|
7870
7896
|
const params2 = { fullMode, getFormatter, getMeasureConfig, showConfidenceInt, t };
|
|
7871
7897
|
const { locale } = chart.datagroup;
|
|
7872
7898
|
if (chart.type === "barchart") {
|
|
7873
|
-
return [BarChart, buildBarchartConfig(chart, params2)];
|
|
7899
|
+
return [d3plusReact.BarChart, buildBarchartConfig(chart, params2)];
|
|
7874
7900
|
}
|
|
7875
7901
|
if (chart.type === "choropleth") {
|
|
7876
|
-
return [Geomap, buildChoroplethConfig(chart, params2)];
|
|
7902
|
+
return [d3plusReact.Geomap, buildChoroplethConfig(chart, params2)];
|
|
7877
7903
|
}
|
|
7878
7904
|
if (chart.type === "donut") {
|
|
7879
|
-
return [Donut, buildDonutConfig(chart, params2)];
|
|
7905
|
+
return [d3plusReact.Donut, buildDonutConfig(chart, params2)];
|
|
7880
7906
|
}
|
|
7881
7907
|
if (chart.type === "lineplot") {
|
|
7882
|
-
return [LinePlot, buildLineplotConfig(chart, params2)];
|
|
7908
|
+
return [d3plusReact.LinePlot, buildLineplotConfig(chart, params2)];
|
|
7883
7909
|
}
|
|
7884
7910
|
if (chart.type === "stackedarea") {
|
|
7885
|
-
return [StackedArea, buildStackedareaConfig(chart, params2)];
|
|
7911
|
+
return [d3plusReact.StackedArea, buildStackedareaConfig(chart, params2)];
|
|
7886
7912
|
}
|
|
7887
7913
|
if (chart.type === "treemap") {
|
|
7888
|
-
return [Treemap, buildTreemapConfig(chart, params2)];
|
|
7914
|
+
return [d3plusReact.Treemap, buildTreemapConfig(chart, params2)];
|
|
7889
7915
|
}
|
|
7890
7916
|
return [null, { data: "", locale }];
|
|
7891
7917
|
}, [chart, fullMode, getFormatter, getMeasureConfig, showConfidenceInt, t]);
|
|
@@ -8189,8 +8215,8 @@ function _buildTranslatedList(t, list) {
|
|
|
8189
8215
|
}
|
|
8190
8216
|
|
|
8191
8217
|
// src/vizbuilder/components/ErrorBoundary.tsx
|
|
8192
|
-
|
|
8193
|
-
var ErrorBoundary = class extends Component {
|
|
8218
|
+
init_cjs_shims();
|
|
8219
|
+
var ErrorBoundary = class extends React19.Component {
|
|
8194
8220
|
constructor() {
|
|
8195
8221
|
super(...arguments);
|
|
8196
8222
|
this.state = {
|
|
@@ -8207,10 +8233,10 @@ var ErrorBoundary = class extends Component {
|
|
|
8207
8233
|
if (!message) {
|
|
8208
8234
|
return this.props.children;
|
|
8209
8235
|
}
|
|
8210
|
-
return /* @__PURE__ */
|
|
8236
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(TranslationConsumer, null, ({ translate: t }) => {
|
|
8211
8237
|
const detailText = t("vizbuilder.error.detail");
|
|
8212
|
-
return /* @__PURE__ */
|
|
8213
|
-
Flex,
|
|
8238
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8239
|
+
core.Flex,
|
|
8214
8240
|
{
|
|
8215
8241
|
p: "xl",
|
|
8216
8242
|
align: "center",
|
|
@@ -8218,10 +8244,10 @@ var ErrorBoundary = class extends Component {
|
|
|
8218
8244
|
direction: "column",
|
|
8219
8245
|
className: "chart-card error"
|
|
8220
8246
|
},
|
|
8221
|
-
/* @__PURE__ */
|
|
8222
|
-
detailText.length ? /* @__PURE__ */
|
|
8223
|
-
/* @__PURE__ */
|
|
8224
|
-
/* @__PURE__ */
|
|
8247
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Title, { order: 3 }, t("vizbuilder.error.title")),
|
|
8248
|
+
detailText.length ? /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, detailText) : null,
|
|
8249
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, t("vizbuilder.error.message", { message })),
|
|
8250
|
+
/* @__PURE__ */ React19__namespace.default.createElement(core.Group, { spacing: "xs", my: "sm" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Button, { onClick: this.clearError, size: "xs", variant: "light" }, t("vizbuilder.action_retry")), /* @__PURE__ */ React19__namespace.default.createElement(IssueButton, { error: name4, message }))
|
|
8225
8251
|
);
|
|
8226
8252
|
});
|
|
8227
8253
|
}
|
|
@@ -8240,12 +8266,12 @@ function IssueButton(props) {
|
|
|
8240
8266
|
"**Detail of the issue:**\n"
|
|
8241
8267
|
].join("\n")
|
|
8242
8268
|
});
|
|
8243
|
-
return /* @__PURE__ */
|
|
8244
|
-
Button,
|
|
8269
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8270
|
+
core.Button,
|
|
8245
8271
|
{
|
|
8246
8272
|
component: "a",
|
|
8247
8273
|
href: `https://github.com/Datawheel/vizbuilder/issues/new?${issueParams}`,
|
|
8248
|
-
leftIcon: /* @__PURE__ */
|
|
8274
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconBrandGithub, { size: "1rem" }),
|
|
8249
8275
|
rel: "noopener noreferrer",
|
|
8250
8276
|
role: "button",
|
|
8251
8277
|
size: "xs",
|
|
@@ -8259,31 +8285,31 @@ function IssueButton(props) {
|
|
|
8259
8285
|
|
|
8260
8286
|
// src/vizbuilder/components/ChartCard.tsx
|
|
8261
8287
|
var iconByFormat = {
|
|
8262
|
-
jpg: IconPhotoDown,
|
|
8263
|
-
png: IconPhotoDown,
|
|
8264
|
-
svg: IconVectorTriangle
|
|
8288
|
+
jpg: iconsReact.IconPhotoDown,
|
|
8289
|
+
png: iconsReact.IconPhotoDown,
|
|
8290
|
+
svg: iconsReact.IconVectorTriangle
|
|
8265
8291
|
};
|
|
8266
8292
|
function ChartCard(props) {
|
|
8267
8293
|
const { chart, downloadFormats, isFullMode, onFocus, showConfidenceInt } = props;
|
|
8268
8294
|
const { translate } = useTranslation();
|
|
8269
|
-
const nodeRef = useRef(null);
|
|
8295
|
+
const nodeRef = React19.useRef(null);
|
|
8270
8296
|
const [ChartComponent, config] = useD3plusConfig(chart, {
|
|
8271
8297
|
fullMode: !!isFullMode,
|
|
8272
8298
|
showConfidenceInt: !!showConfidenceInt,
|
|
8273
8299
|
getMeasureConfig: props.measureConfig,
|
|
8274
8300
|
t: translate
|
|
8275
8301
|
});
|
|
8276
|
-
const downloadButtons = useMemo(() => {
|
|
8302
|
+
const downloadButtons = React19.useMemo(() => {
|
|
8277
8303
|
const filename = (typeof config.title === "function" ? config.title() : config.title || "").replace(/[^\w]/g, "_").replace(/[_]+/g, "_");
|
|
8278
8304
|
return asArray(downloadFormats).map((format2) => {
|
|
8279
8305
|
const formatLower = format2.toLowerCase();
|
|
8280
|
-
const Icon = iconByFormat[formatLower] || IconDownload;
|
|
8281
|
-
return /* @__PURE__ */
|
|
8282
|
-
Button,
|
|
8306
|
+
const Icon = iconByFormat[formatLower] || iconsReact.IconDownload;
|
|
8307
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8308
|
+
core.Button,
|
|
8283
8309
|
{
|
|
8284
8310
|
key: format2,
|
|
8285
8311
|
compact: true,
|
|
8286
|
-
leftIcon: /* @__PURE__ */
|
|
8312
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(Icon, { size: 16 }),
|
|
8287
8313
|
onClick: () => {
|
|
8288
8314
|
const { current: boxElement } = nodeRef;
|
|
8289
8315
|
const svgElement = boxElement == null ? void 0 : boxElement.querySelector("svg");
|
|
@@ -8302,13 +8328,13 @@ function ChartCard(props) {
|
|
|
8302
8328
|
);
|
|
8303
8329
|
});
|
|
8304
8330
|
}, [config, downloadFormats]);
|
|
8305
|
-
const focusButton = useMemo(() => {
|
|
8306
|
-
const Icon = isFullMode ? IconArrowsMinimize : IconArrowsMaximize;
|
|
8307
|
-
return /* @__PURE__ */
|
|
8308
|
-
Button,
|
|
8331
|
+
const focusButton = React19.useMemo(() => {
|
|
8332
|
+
const Icon = isFullMode ? iconsReact.IconArrowsMinimize : iconsReact.IconArrowsMaximize;
|
|
8333
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8334
|
+
core.Button,
|
|
8309
8335
|
{
|
|
8310
8336
|
compact: true,
|
|
8311
|
-
leftIcon: /* @__PURE__ */
|
|
8337
|
+
leftIcon: /* @__PURE__ */ React19__namespace.default.createElement(Icon, { size: 16 }),
|
|
8312
8338
|
onClick: onFocus,
|
|
8313
8339
|
size: "sm",
|
|
8314
8340
|
variant: isFullMode ? "filled" : "light"
|
|
@@ -8318,7 +8344,7 @@ function ChartCard(props) {
|
|
|
8318
8344
|
}, [isFullMode, translate, onFocus]);
|
|
8319
8345
|
const height = isFullMode ? "calc(100vh - 3rem)" : 300;
|
|
8320
8346
|
if (!ChartComponent) return null;
|
|
8321
|
-
return /* @__PURE__ */
|
|
8347
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Paper, { h: height, w: "100%", style: { overflow: "hidden" } }, /* @__PURE__ */ React19__namespace.default.createElement(ErrorBoundary, null, /* @__PURE__ */ React19__namespace.default.createElement(core.Stack, { spacing: 0, h: height, style: { position: "relative" }, w: "100%" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Group, { position: "right", p: "xs", spacing: "xs", align: "center" }, downloadButtons, onFocus && focusButton), /* @__PURE__ */ React19__namespace.default.createElement(core.Box, { style: { flex: "1 1 auto" }, ref: nodeRef, pb: "xs", px: "xs" }, /* @__PURE__ */ React19__namespace.default.createElement(ChartComponent, { config })))));
|
|
8322
8348
|
}
|
|
8323
8349
|
var getBackground = (node) => {
|
|
8324
8350
|
if (node.nodeType !== Node.ELEMENT_NODE) return "white";
|
|
@@ -8328,17 +8354,17 @@ var getBackground = (node) => {
|
|
|
8328
8354
|
};
|
|
8329
8355
|
|
|
8330
8356
|
// src/vizbuilder/components/NonIdealState.tsx
|
|
8331
|
-
|
|
8357
|
+
init_cjs_shims();
|
|
8332
8358
|
function NonIdealState2(props) {
|
|
8333
8359
|
const { status } = props;
|
|
8334
8360
|
const { translate: t } = useTranslation();
|
|
8335
|
-
const description = useMemo(() => {
|
|
8361
|
+
const description = React19.useMemo(() => {
|
|
8336
8362
|
if (status === "loading") {
|
|
8337
|
-
return /* @__PURE__ */
|
|
8363
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { justify: "center", align: "center", direction: "column" }, /* @__PURE__ */ React19__namespace.default.createElement(core.Loader, { size: "xl" }), /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { mt: "md", order: 4 }, t("vizbuilder.transient.title_loading")));
|
|
8338
8364
|
}
|
|
8339
|
-
return /* @__PURE__ */
|
|
8365
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Flex, { justify: "center", align: "center", direction: "column", w: "50%" }, /* @__PURE__ */ React19__namespace.default.createElement(iconsReact.IconCircleOff, { size: 92 }), /* @__PURE__ */ React19__namespace.default.createElement(core.Title, { mt: "md", mb: "md", order: 4 }, t("vizbuilder.transient.title_empty")), /* @__PURE__ */ React19__namespace.default.createElement(core.Text, null, t("vizbuilder.transient.description_empty")));
|
|
8340
8366
|
}, [status, t]);
|
|
8341
|
-
return /* @__PURE__ */
|
|
8367
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(core.Center, { h: "100%" }, description);
|
|
8342
8368
|
}
|
|
8343
8369
|
|
|
8344
8370
|
// src/vizbuilder/components/Vizbuilder.tsx
|
|
@@ -8355,17 +8381,17 @@ function Vizbuilder(props) {
|
|
|
8355
8381
|
topojsonConfig,
|
|
8356
8382
|
userConfig
|
|
8357
8383
|
} = props;
|
|
8358
|
-
const [currentChart, setCurrentChart] = useState("");
|
|
8359
|
-
const getMeasureConfig = useMemo(() => {
|
|
8384
|
+
const [currentChart, setCurrentChart] = React19.useState("");
|
|
8385
|
+
const getMeasureConfig = React19.useMemo(() => {
|
|
8360
8386
|
const config = measureConfig || {};
|
|
8361
8387
|
return typeof config === "function" ? config : (item) => config[item.name];
|
|
8362
8388
|
}, [measureConfig]);
|
|
8363
|
-
const getTopojsonConfig = useMemo(() => {
|
|
8389
|
+
const getTopojsonConfig = React19.useMemo(() => {
|
|
8364
8390
|
const config = topojsonConfig || {};
|
|
8365
8391
|
return typeof config === "function" ? config : (item) => config[item.name];
|
|
8366
8392
|
}, [topojsonConfig]);
|
|
8367
|
-
const charts = useMemo(() => {
|
|
8368
|
-
const charts2 = generateCharts(asArray(datasets), {
|
|
8393
|
+
const charts = React19.useMemo(() => {
|
|
8394
|
+
const charts2 = vizbuilder.generateCharts(asArray(datasets), {
|
|
8369
8395
|
chartLimits,
|
|
8370
8396
|
chartTypes,
|
|
8371
8397
|
datacap,
|
|
@@ -8373,20 +8399,20 @@ function Vizbuilder(props) {
|
|
|
8373
8399
|
});
|
|
8374
8400
|
return Object.fromEntries(charts2.map((chart) => [chart.key, chart]));
|
|
8375
8401
|
}, [chartLimits, chartTypes, datacap, datasets, getTopojsonConfig]);
|
|
8376
|
-
const content = useMemo(() => {
|
|
8402
|
+
const content = React19.useMemo(() => {
|
|
8377
8403
|
const Notice = nonIdealState || NonIdealState2;
|
|
8378
8404
|
const isLoading = asArray(datasets).some(
|
|
8379
8405
|
(dataset) => Object.keys(dataset.columns).length === 0
|
|
8380
8406
|
);
|
|
8381
8407
|
if (isLoading) {
|
|
8382
8408
|
console.debug("Loading datasets...", datasets);
|
|
8383
|
-
return /* @__PURE__ */
|
|
8409
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(Notice, { status: "loading" });
|
|
8384
8410
|
}
|
|
8385
8411
|
const chartList = Object.values(charts);
|
|
8386
|
-
if (chartList.length === 0) return /* @__PURE__ */
|
|
8412
|
+
if (chartList.length === 0) return /* @__PURE__ */ React19__namespace.default.createElement(Notice, { status: "empty" });
|
|
8387
8413
|
const isSingleChart = chartList.length === 1;
|
|
8388
|
-
return /* @__PURE__ */
|
|
8389
|
-
SimpleGrid,
|
|
8414
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(ErrorBoundary, null, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8415
|
+
core.SimpleGrid,
|
|
8390
8416
|
{
|
|
8391
8417
|
breakpoints: [
|
|
8392
8418
|
{ minWidth: "xs", cols: 1 },
|
|
@@ -8396,7 +8422,7 @@ function Vizbuilder(props) {
|
|
|
8396
8422
|
],
|
|
8397
8423
|
className: clsx_m_default({ unique: isSingleChart })
|
|
8398
8424
|
},
|
|
8399
|
-
chartList.map((chart) => /* @__PURE__ */
|
|
8425
|
+
chartList.map((chart) => /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8400
8426
|
ChartCard,
|
|
8401
8427
|
{
|
|
8402
8428
|
key: chart.key,
|
|
@@ -8418,10 +8444,10 @@ function Vizbuilder(props) {
|
|
|
8418
8444
|
showConfidenceInt,
|
|
8419
8445
|
userConfig
|
|
8420
8446
|
]);
|
|
8421
|
-
const focusContent = useMemo(() => {
|
|
8447
|
+
const focusContent = React19.useMemo(() => {
|
|
8422
8448
|
const chart = charts[currentChart];
|
|
8423
8449
|
if (!chart) return null;
|
|
8424
|
-
return /* @__PURE__ */
|
|
8450
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8425
8451
|
ChartCard,
|
|
8426
8452
|
{
|
|
8427
8453
|
key: `${chart.key}-focus`,
|
|
@@ -8442,11 +8468,11 @@ function Vizbuilder(props) {
|
|
|
8442
8468
|
showConfidenceInt,
|
|
8443
8469
|
userConfig
|
|
8444
8470
|
]);
|
|
8445
|
-
return /* @__PURE__ */
|
|
8446
|
-
Modal,
|
|
8471
|
+
return /* @__PURE__ */ React19__namespace.default.createElement("div", { style: { height: "100%" }, className: clsx_m_default("vb-wrapper", props.className) }, props.customHeader, content, props.customFooter, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8472
|
+
core.Modal,
|
|
8447
8473
|
{
|
|
8448
8474
|
centered: true,
|
|
8449
|
-
onClose: useCallback(() => setCurrentChart(""), []),
|
|
8475
|
+
onClose: React19.useCallback(() => setCurrentChart(""), []),
|
|
8450
8476
|
opened: currentChart !== "",
|
|
8451
8477
|
padding: 0,
|
|
8452
8478
|
size: "calc(100vw - 3rem)",
|
|
@@ -8475,7 +8501,7 @@ var CHART_LIMITS = {
|
|
|
8475
8501
|
var DOWNLOAD_FORMATS = ["SVG", "PNG"];
|
|
8476
8502
|
function VizbuilderView(props) {
|
|
8477
8503
|
const { cube, params, result } = props;
|
|
8478
|
-
const dataset = useMemo(() => {
|
|
8504
|
+
const dataset = React19.useMemo(() => {
|
|
8479
8505
|
const columns = Object.keys(result.types);
|
|
8480
8506
|
return {
|
|
8481
8507
|
columns: Object.fromEntries(
|
|
@@ -8485,7 +8511,7 @@ function VizbuilderView(props) {
|
|
|
8485
8511
|
locale: params.locale || "en"
|
|
8486
8512
|
};
|
|
8487
8513
|
}, [cube, result, params.locale]);
|
|
8488
|
-
return /* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ React19__namespace.default.createElement(
|
|
8489
8515
|
Vizbuilder,
|
|
8490
8516
|
{
|
|
8491
8517
|
datasets: dataset,
|
|
@@ -8511,4 +8537,17 @@ lodash-es/lodash.js:
|
|
|
8511
8537
|
*)
|
|
8512
8538
|
*/
|
|
8513
8539
|
|
|
8514
|
-
|
|
8540
|
+
exports.DebugView = DebugView;
|
|
8541
|
+
exports.Explorer = ExplorerComponent;
|
|
8542
|
+
exports.PivotView = PivotView;
|
|
8543
|
+
exports.SettingsConsumer = SettingsConsumer;
|
|
8544
|
+
exports.TableView = TableView;
|
|
8545
|
+
exports.ToolbarButton = ToolbarButton;
|
|
8546
|
+
exports.TourStep = TourStep;
|
|
8547
|
+
exports.TranslationConsumer = TranslationConsumer;
|
|
8548
|
+
exports.VizbuilderView = VizbuilderView;
|
|
8549
|
+
exports.explorerReducer = reducer;
|
|
8550
|
+
exports.explorerThunkExtraArg = thunkExtraArg;
|
|
8551
|
+
exports.translationDict = defaultTranslation;
|
|
8552
|
+
exports.useSettings = useSettings;
|
|
8553
|
+
exports.useTranslation = useTranslation;
|