@gooddata/sdk-ui-filters 11.56.0-alpha.7 → 11.56.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"loadAttributeByDisplayForm.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadAttribute/loadAttributeByDisplayForm.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,wBAAwB,EAE7B,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAoB7E;;GAEG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,mCAAmC,EAC5C,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,wBAAwB,CAAC,CAuBnC"}
1
+ {"version":3,"file":"loadAttributeByDisplayForm.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadAttribute/loadAttributeByDisplayForm.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,mCAAmC,EAC5C,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,wBAAwB,CAAC,CAuBnC"}
@@ -1,21 +1,6 @@
1
1
  // (C) 2022-2026 GoodData Corporation
2
- import { isComputedAttributeRef, } from "@gooddata/sdk-model";
2
+ import { computedAttributeAsAttributeMetadataObject, isComputedAttributeRef, } from "@gooddata/sdk-model";
3
3
  import { convertError } from "@gooddata/sdk-ui";
4
- /**
5
- * Adapts a computed attribute to the attribute-like surface this handler works with.
6
- *
7
- * Only the `type` discriminator is rewritten - the ref, the fabricated display form and the rest of
8
- * the metadata are kept verbatim. The result therefore CLAIMS to be a plain attribute while its
9
- * `ref.type` still says `computedAttribute`; `ref` is the honest signal, not `type`. The rewrite
10
- * lives here, in the one consumer that wants the fiction, so the backend's
11
- * `getAttributeByDisplayForm` contract stays truthful for everyone else.
12
- */
13
- function asAttributeMetadataObject(computedAttribute) {
14
- return {
15
- ...computedAttribute,
16
- type: "attribute",
17
- };
18
- }
19
4
  /**
20
5
  * @internal
21
6
  */
@@ -27,7 +12,7 @@ export async function loadAttributeByDisplayForm(context, displayFormRef) {
27
12
  return workspace
28
13
  .computedAttributes()
29
14
  .getComputedAttribute(displayFormRef)
30
- .then(asAttributeMetadataObject)
15
+ .then(computedAttributeAsAttributeMetadataObject)
31
16
  .catch((err) => {
32
17
  // Convert from AnalyticalBackendError to GoodDataSdkError
33
18
  throw convertError(err);
@@ -1 +1 @@
1
- {"version":3,"file":"loadLimitingAttributeFiltersAttributes.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadInitialElementsPage/loadLimitingAttributeFiltersAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,KAAK,wBAAwB,EAAgB,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AACH,wBAAsB,sCAAsC,CACxD,OAAO,EAAE,mCAAmC,EAC5C,wBAAwB,EAAE,6BAA6B,EAAE,GAC1D,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAgBrC"}
1
+ {"version":3,"file":"loadLimitingAttributeFiltersAttributes.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadInitialElementsPage/loadLimitingAttributeFiltersAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,KAAK,wBAAwB,EAAgB,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AACH,wBAAsB,sCAAsC,CACxD,OAAO,EAAE,mCAAmC,EAC5C,wBAAwB,EAAE,6BAA6B,EAAE,GAC1D,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAWrC"}
@@ -1,16 +1,13 @@
1
1
  // (C) 2022-2026 GoodData Corporation
2
2
  import { filterObjRef } from "@gooddata/sdk-model";
3
- import { convertError } from "@gooddata/sdk-ui";
3
+ import { loadAttributeByDisplayForm } from "../loadAttribute/loadAttributeByDisplayForm.js";
4
4
  /**
5
5
  * @internal
6
6
  */
7
7
  export async function loadLimitingAttributeFiltersAttributes(context, limitingAttributeFilters) {
8
8
  const displayFormRefs = limitingAttributeFilters.map((limitingAttributeFilter) => filterObjRef(limitingAttributeFilter.attributeFilter));
9
- return Promise.all(displayFormRefs.map((displayFormRef) => context.backend
10
- .workspace(context.workspace)
11
- .attributes()
12
- .getAttributeByDisplayForm(displayFormRef))).catch((err) => {
13
- // Convert from AnalyticalBackendError to GoodDataSdkError
14
- throw convertError(err);
15
- });
9
+ // loadAttributeByDisplayForm resolves a computed-attribute-typed display form through the
10
+ // computedAttributes service (a computed attribute has no real label to look up) and converts
11
+ // backend errors to GoodDataSdkError
12
+ return Promise.all(displayFormRefs.map((displayFormRef) => loadAttributeByDisplayForm(context, displayFormRef)));
16
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-filters",
3
- "version": "11.56.0-alpha.7",
3
+ "version": "11.56.0",
4
4
  "description": "GoodData.UI SDK - Filter Components",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -47,11 +47,11 @@
47
47
  "ts-invariant": "0.10.3",
48
48
  "tslib": "2.8.1",
49
49
  "uuid": "11.1.1",
50
- "@gooddata/sdk-backend-spi": "11.56.0-alpha.7",
51
- "@gooddata/sdk-model": "11.56.0-alpha.7",
52
- "@gooddata/sdk-ui": "11.56.0-alpha.7",
53
- "@gooddata/util": "11.56.0-alpha.7",
54
- "@gooddata/sdk-ui-kit": "11.56.0-alpha.7"
50
+ "@gooddata/sdk-backend-spi": "11.56.0",
51
+ "@gooddata/sdk-model": "11.56.0",
52
+ "@gooddata/sdk-ui": "11.56.0",
53
+ "@gooddata/sdk-ui-kit": "11.56.0",
54
+ "@gooddata/util": "11.56.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@microsoft/api-documenter": "7.30.10",
@@ -89,12 +89,12 @@
89
89
  "typescript": "7.0.2",
90
90
  "vitest": "4.1.8",
91
91
  "vitest-dom": "0.1.1",
92
- "@gooddata/eslint-config": "11.56.0-alpha.7",
93
- "@gooddata/oxlint-config": "11.56.0-alpha.7",
94
- "@gooddata/reference-workspace": "11.56.0-alpha.7",
95
- "@gooddata/sdk-backend-mockingbird": "11.56.0-alpha.7",
96
- "@gooddata/sdk-ui-theme-provider": "11.56.0-alpha.7",
97
- "@gooddata/stylelint-config": "11.56.0-alpha.7"
92
+ "@gooddata/eslint-config": "11.56.0",
93
+ "@gooddata/oxlint-config": "11.56.0",
94
+ "@gooddata/reference-workspace": "11.56.0",
95
+ "@gooddata/sdk-ui-theme-provider": "11.56.0",
96
+ "@gooddata/sdk-backend-mockingbird": "11.56.0",
97
+ "@gooddata/stylelint-config": "11.56.0"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "react": "^18.0.0 || ^19.0.0",