@gooddata/sdk-ui-metric-component 11.68.0-alpha.7 → 11.68.0-alpha.9
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/NOTICE +191 -148
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.d.ts.map +1 -1
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.js +2 -3
- package/esm/shared/metrics/useMetricListData.d.ts.map +1 -1
- package/esm/shared/metrics/useMetricListData.events.d.ts.map +1 -1
- package/esm/shared/metrics/useMetricListData.events.js +2 -3
- package/esm/shared/metrics/useMetricListData.js +2 -2
- package/esm/translations/translations.d.ts.map +1 -1
- package/esm/translations/translations.js +2 -3
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesSelect.d.ts","sourceRoot":"","sources":["../../../../../src/MetricComponent/Form/MaqlResult/components/AttributesSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AttributesSelect.d.ts","sourceRoot":"","sources":["../../../../../src/MetricComponent/Form/MaqlResult/components/AttributesSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAK1F,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAkC,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAqEvG,MAAM,MAAM,sBAAsB,GAAG;IACjC,MAAM,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,SAAS,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAWF,wBAAgB,gBAAgB,CAAC,EAC7B,GAAQ,EACR,UAAe,EACf,WAAgB,EAChB,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,GACT,EAAE,sBAAsB,GAAG,YAAY,CAgGvC"}
|
|
@@ -2,11 +2,10 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2022-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { debounce } from "lodash-es";
|
|
6
5
|
import { defineMessages, useIntl } from "react-intl";
|
|
7
6
|
import { LoadingComponent } from "@gooddata/sdk-ui";
|
|
8
7
|
import { Button, Dropdown, DropdownList } from "@gooddata/sdk-ui-kit";
|
|
9
|
-
import { _isEqual } from "@gooddata/util";
|
|
8
|
+
import { _debounce, _isEqual } from "@gooddata/util";
|
|
10
9
|
import { useProp } from "../../../../shared/hooks/useProp.js";
|
|
11
10
|
import { makeStyles } from "../../../../shared/theme/index.js";
|
|
12
11
|
import { AttributeDropdownListItem } from "./AttributesSelectItem.js";
|
|
@@ -105,7 +104,7 @@ export function AttributesSelect({ all = [], attributes = [], preselected = [],
|
|
|
105
104
|
function useSearch(attributes) {
|
|
106
105
|
const [search, setSearch] = useState("");
|
|
107
106
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
-
const onSearch = useCallback(
|
|
107
|
+
const onSearch = useCallback(_debounce((query) => {
|
|
109
108
|
setSearch(query);
|
|
110
109
|
}, 250), []);
|
|
111
110
|
const items = useMemo(() => search
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMetricListData.d.ts","sourceRoot":"","sources":["../../../src/shared/metrics/useMetricListData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMetricListData.d.ts","sourceRoot":"","sources":["../../../src/shared/metrics/useMetricListData.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAWlE,UAAU,aAAa;IACnB,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,YAEb,kBAAkB,eACd,MAAM,gBACL,CAAC,IAAI,EAAE,sBAAsB,EAAE,KAAK,IAAI,gCAEvD,mBAqBF,CAAC;AAEN;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,0BAE3B,yBAAyB,KAAQ,cAoCnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMetricListData.events.d.ts","sourceRoot":"","sources":["../../../src/shared/metrics/useMetricListData.events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMetricListData.events.d.ts","sourceRoot":"","sources":["../../../src/shared/metrics/useMetricListData.events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAG1D,MAAM,MAAM,oBAAoB,GAAG;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;CACnC,CAAC;AAmBF,iBAAS,wBAAwB,CAAC,IAAI,EAAE,sBAAsB,EAAE,GAAG,MAAM,GAAG,IAAI,CAO/E;AAED,eAAO,MAAM,MAAM;;CAElB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
import { _isEqual } from "@gooddata/util";
|
|
2
|
+
import { _groupBy, _isEqual } from "@gooddata/util";
|
|
4
3
|
import { EventCategories, Events } from "../eventing/events.js";
|
|
5
4
|
function getSameItemNumber(collection, iteratee) {
|
|
6
|
-
const groups =
|
|
5
|
+
const groups = _groupBy(collection, iteratee);
|
|
7
6
|
return Object.values(groups).filter((group) => group.length > 1).length;
|
|
8
7
|
}
|
|
9
8
|
function calculateWorkspaceMetricStats(data) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
import { debounce } from "lodash-es";
|
|
4
3
|
import { useBackendStrict, useCancelablePromise, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _debounce } from "@gooddata/util";
|
|
5
5
|
import { useEvents } from "../eventing/useEvents.js";
|
|
6
6
|
import { getFilteredItems } from "./functions/metricListData.js";
|
|
7
7
|
import { events } from "./useMetricListData.events.js";
|
|
@@ -32,7 +32,7 @@ export const useMetricListData = ({ loadPermissions = false, } = {}) => {
|
|
|
32
32
|
const [sort, setSort] = useState({ type: "title", direction: "asc" });
|
|
33
33
|
const [search, setSearch] = useState("");
|
|
34
34
|
const { workspaceMetricDataEvent } = useEvents(events);
|
|
35
|
-
const debouncedTrackWorkspace =
|
|
35
|
+
const debouncedTrackWorkspace = _debounce(workspaceMetricDataEvent, 500);
|
|
36
36
|
const workspaceId = useWorkspaceStrict();
|
|
37
37
|
const backend = useBackendStrict();
|
|
38
38
|
const { metricReloadRequest } = useReloadMetrics();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/translations/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/translations/translations.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,aAAa,EAGrB,MAAM,kBAAkB,CAAC;AAc1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAM1D,CAAC;AA2DF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAqC,CAAC;AAE7G;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAChD,MAAM,EAAE,MAAM,GACf,MAAM,CAER"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { memoize } from "lodash-es";
|
|
3
2
|
import { DEFAULT_MESSAGES as SDK_DEFAULT_MESSAGES, resolveMessages as resolveSdkMessages, } from "@gooddata/sdk-ui";
|
|
4
3
|
// The share dialog's `objectShare.*` ids live in sdk-ui-ext, not the sdk-ui layer.
|
|
5
4
|
import { DEFAULT_MESSAGES as EXT_DEFAULT_MESSAGES, resolveMessages as resolveExtMessages, } from "@gooddata/sdk-ui-ext/internal";
|
|
6
|
-
import { removeMetadata } from "@gooddata/util";
|
|
5
|
+
import { _memoize, removeMetadata } from "@gooddata/util";
|
|
7
6
|
import en_US from "./en-US.json" with { type: "json" };
|
|
8
7
|
// English (default) app messages, used as the fallback for locales that are missing keys.
|
|
9
8
|
// The composed sdk layer already falls back to English for its own keys.
|
|
@@ -80,7 +79,7 @@ const resolveMessagesInternal = async (locale) => {
|
|
|
80
79
|
*
|
|
81
80
|
* @internal
|
|
82
81
|
*/
|
|
83
|
-
export const resolveMessages =
|
|
82
|
+
export const resolveMessages = _memoize(resolveMessagesInternal);
|
|
84
83
|
/**
|
|
85
84
|
* Validates if a locale has translations available in the messages map.
|
|
86
85
|
* Falls back to DEFAULT_LANGUAGE if the locale is not found.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-metric-component",
|
|
3
|
-
"version": "11.68.0-alpha.
|
|
3
|
+
"version": "11.68.0-alpha.9",
|
|
4
4
|
"license": "LicenseRef-LICENSE",
|
|
5
5
|
"author": "GoodData Corporation",
|
|
6
6
|
"repository": {
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"vscode-languageserver-textdocument": "1.0.12",
|
|
39
39
|
"vscode-languageserver-types": "3.17.5",
|
|
40
40
|
"yup": "0.32.11",
|
|
41
|
-
"@gooddata/api-client-tiger": "11.68.0-alpha.
|
|
42
|
-
"@gooddata/sdk-backend-
|
|
43
|
-
"@gooddata/sdk-
|
|
44
|
-
"@gooddata/sdk-model": "11.68.0-alpha.
|
|
45
|
-
"@gooddata/sdk-
|
|
46
|
-
"@gooddata/sdk-ui": "11.68.0-alpha.
|
|
47
|
-
"@gooddata/sdk-ui-
|
|
48
|
-
"@gooddata/sdk-ui-
|
|
49
|
-
"@gooddata/sdk-ui-
|
|
50
|
-
"@gooddata/sdk-ui-
|
|
51
|
-
"@gooddata/util": "11.68.0-alpha.
|
|
41
|
+
"@gooddata/api-client-tiger": "11.68.0-alpha.9",
|
|
42
|
+
"@gooddata/sdk-backend-tiger": "11.68.0-alpha.9",
|
|
43
|
+
"@gooddata/sdk-backend-spi": "11.68.0-alpha.9",
|
|
44
|
+
"@gooddata/sdk-model": "11.68.0-alpha.9",
|
|
45
|
+
"@gooddata/sdk-maql-language-server": "11.68.0-alpha.9",
|
|
46
|
+
"@gooddata/sdk-ui": "11.68.0-alpha.9",
|
|
47
|
+
"@gooddata/sdk-ui-ext": "11.68.0-alpha.9",
|
|
48
|
+
"@gooddata/sdk-ui-charts": "11.68.0-alpha.9",
|
|
49
|
+
"@gooddata/sdk-ui-pivot": "11.68.0-alpha.9",
|
|
50
|
+
"@gooddata/sdk-ui-kit": "11.68.0-alpha.9",
|
|
51
|
+
"@gooddata/util": "11.68.0-alpha.9"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
"react-dom": "19.1.1",
|
|
82
82
|
"typescript": "7.0.2",
|
|
83
83
|
"vitest": "5.0.4",
|
|
84
|
-
"@gooddata/
|
|
85
|
-
"@gooddata/
|
|
86
|
-
"@gooddata/
|
|
87
|
-
"@gooddata/sdk-backend-base": "11.68.0-alpha.
|
|
88
|
-
"@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.
|
|
84
|
+
"@gooddata/eslint-config": "11.68.0-alpha.9",
|
|
85
|
+
"@gooddata/oxlint-config": "11.68.0-alpha.9",
|
|
86
|
+
"@gooddata/i18n-toolkit": "11.68.0-alpha.9",
|
|
87
|
+
"@gooddata/sdk-backend-base": "11.68.0-alpha.9",
|
|
88
|
+
"@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.9"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"react": "^18.0.0 || ^19.0.0",
|