@gooddata/sdk-ui-pluggable-host 11.56.0-alpha.5 → 11.56.0-alpha.7

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.
@@ -7,8 +7,8 @@ export interface ILegacyLocation {
7
7
  search: string;
8
8
  }
9
9
  /**
10
- * Maps a legacy KD/AD/modeler/metrics URL (embedded or standalone) to its host equivalent, or
11
- * `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
10
+ * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
11
+ * or `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
12
12
  * in the legacy apps; runs client-side because the workspace id is in the (server-invisible) hash.
13
13
  *
14
14
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"legacyRedirect.d.ts","sourceRoot":"","sources":["../../src/loader/legacyRedirect.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAoBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CA2C3E;AAYD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtE"}
1
+ {"version":3,"file":"legacyRedirect.d.ts","sourceRoot":"","sources":["../../src/loader/legacyRedirect.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAuCD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAqD3E;AAYD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtE"}
@@ -9,9 +9,26 @@ function toHashHostUrl(embedded, app, workspaceId, remainder, search) {
9
9
  const hash = remainder ? `#${remainder}` : "";
10
10
  return `${prefix}/workspace/${workspaceId}/${app}/${search}${hash}`;
11
11
  }
12
+ // Where the standalone home-ui pages live inside the host: the gdc-home-ui module is mounted
13
+ // on the organization scope under this route base, and keeps the legacy path shape below it.
14
+ const HOME_UI_ROUTE_BASE = "/organization/settings";
15
+ // Top-level paths the standalone home-ui served from the root. `/workspaces/{id}/catalog` is
16
+ // deliberately NOT special-cased onto the catalog application: the module's own route already
17
+ // checks that the catalog is enabled for the workspace before handing off, and rewriting straight
18
+ // to `/workspace/{id}/catalog` would reach the host with no such check and render "app not found".
19
+ const LEGACY_HOME_PATHS = [
20
+ "/workspaces",
21
+ "/data-sources",
22
+ "/users-and-groups",
23
+ "/settings",
24
+ "/configuration",
25
+ "/automations",
26
+ "/ai-hub",
27
+ "/getting-started",
28
+ ];
12
29
  /**
13
- * Maps a legacy KD/AD/modeler/metrics URL (embedded or standalone) to its host equivalent, or
14
- * `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
30
+ * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
31
+ * or `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
15
32
  * in the legacy apps; runs client-side because the workspace id is in the (server-invisible) hash.
16
33
  *
17
34
  * @alpha
@@ -47,6 +64,14 @@ export function mapLegacyUrlToHost(location) {
47
64
  const editMode = /displayEditMode/.test(hash + search) ? "?displayEditMode" : "";
48
65
  return `/workspace/${match[1]}/modeler${editMode}`;
49
66
  }
67
+ // `/settings#ai[...]` is a supported AI Hub deeplink, but the module's `/settings` route
68
+ // redirects to `/configuration` without the hash, so the deeplink must be resolved here.
69
+ if (isUnder(pathname, "/settings") && (hash === "#ai" || hash.startsWith("#ai/"))) {
70
+ return `${HOME_UI_ROUTE_BASE}/ai-hub${search}${hash}`;
71
+ }
72
+ if (LEGACY_HOME_PATHS.some((prefix) => isUnder(pathname, prefix))) {
73
+ return `${HOME_UI_ROUTE_BASE}${pathname}${search}${hash}`;
74
+ }
50
75
  return null;
51
76
  }
52
77
  // The host route base of each legacy standalone app, keyed by the path it was served under.
@@ -15,5 +15,15 @@ export interface ILoadPlatformContextOptions {
15
15
  auth?: IAuthCredentials;
16
16
  callbacks?: ILoadPlatformContextCallbacks;
17
17
  }
18
+ /**
19
+ * This approach is not correct - the host app should only care about the first part of the URL,
20
+ * and the module should only care about the second part.
21
+ * Here we are crossing the boundaries, and the host app is checking the full URL.
22
+ * The proper fix requires larger changes not only here, but in gdc-nas as well.
23
+ * This is scheduled to happen with the gdc-reports module.
24
+ *
25
+ * @internal - exported for testing
26
+ */
27
+ export declare function detectExportMode(): boolean;
18
28
  export declare function loadPlatformContext(options?: ILoadPlatformContextOptions): Promise<IBackendPlatformContext>;
19
29
  //# sourceMappingURL=loadPlatformContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loadPlatformContext.d.ts","sourceRoot":"","sources":["../../src/platformContext/loadPlatformContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMlF,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,qBAAa,4BAA6B,SAAQ,KAAK;IACnD,cAGC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,2BAA2B;IACxC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,6BAA6B,CAAC;CAC7C;AAgBD,wBAAsB,mBAAmB,CACrC,OAAO,GAAE,2BAAgC,GAC1C,OAAO,CAAC,uBAAuB,CAAC,CA4ClC"}
1
+ {"version":3,"file":"loadPlatformContext.d.ts","sourceRoot":"","sources":["../../src/platformContext/loadPlatformContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMlF,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,qBAAa,4BAA6B,SAAQ,KAAK;IACnD,cAGC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,2BAA2B;IACxC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,6BAA6B,CAAC;CAC7C;AAQD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAgB1C;AAED,wBAAsB,mBAAmB,CACrC,OAAO,GAAE,2BAAgC,GAC1C,OAAO,CAAC,uBAAuB,CAAC,CA4ClC"}
@@ -13,12 +13,31 @@ function throwIfAborted(signal) {
13
13
  throw new DOMException("Aborted", "AbortError");
14
14
  }
15
15
  }
16
- function detectExportMode() {
16
+ /**
17
+ * This approach is not correct - the host app should only care about the first part of the URL,
18
+ * and the module should only care about the second part.
19
+ * Here we are crossing the boundaries, and the host app is checking the full URL.
20
+ * The proper fix requires larger changes not only here, but in gdc-nas as well.
21
+ * This is scheduled to happen with the gdc-reports module.
22
+ *
23
+ * @internal - exported for testing
24
+ */
25
+ export function detectExportMode() {
17
26
  if (typeof window === "undefined") {
18
27
  return false;
19
28
  }
20
29
  const hash = window.location.hash;
21
- return /[?&]displaymode=export(&|$)/i.test(hash) || /[?&]mode=export(&|$)/i.test(hash);
30
+ const query = hash.indexOf("?");
31
+ if (query === -1) {
32
+ return false;
33
+ }
34
+ for (const [key, value] of new URLSearchParams(hash.slice(query + 1))) {
35
+ const name = key.toLowerCase();
36
+ if ((name === "mode" || name === "displaymode") && value.toLowerCase() === "export") {
37
+ return true;
38
+ }
39
+ }
40
+ return false;
22
41
  }
23
42
  export async function loadPlatformContext(options = {}) {
24
43
  const start = now();
@@ -39,7 +39,7 @@ interface IResolveApplicationsOptions {
39
39
  * 4. Apply overrides from the remote registry to the merged list
40
40
  * 5. Filter out disabled applications (isEnabled: false)
41
41
  * 6. Filter by application scope - keep only apps whose applicationScope matches scope; if scope is undefined, no apps pass through
42
- * 7. Filter by requirements - check requiredSettings, requiredWorkspacePermissions, requiredOrganizationPermissions, and requiredEntitlements
42
+ * 7. Filter by requirements - check requiredSettings, requiredWorkspacePermissions, requiredOrganizationPermissions, and requiredEntitlements (embedded and export modes force the shell application flags on)
43
43
  * 8. Sort by menuOrder (ascending)
44
44
  *
45
45
  * @param options - Resolution options; see {@link IResolveApplicationsOptions}
@@ -1 +1 @@
1
- {"version":3,"file":"pluggableApplicationsRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/pluggableApplicationsRegistry.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,gBAAgB,EAKrB,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EAE3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACxB,MAAM,2CAA2C,CAAC;AAMnD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kCAAkC,GAAG,IAAI,CAE5F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,mCAAmC,GAAG,SAAS,CAaxG;AAyND,UAAU,2BAA2B;IACjC;;OAEG;IACH,SAAS,EAAE,gCAAgC,EAAE,CAAC;IAC9C;;OAEG;IACH,cAAc,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,cAAc,EACd,GAAG,EACH,KAAK,GACR,EAAE,2BAA2B,GAAG,gCAAgC,EAAE,CAelE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gCAAgC,EAAE,CAWlG"}
1
+ {"version":3,"file":"pluggableApplicationsRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/pluggableApplicationsRegistry.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,gBAAgB,EAKrB,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EAE3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACxB,MAAM,2CAA2C,CAAC;AAMnD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kCAAkC,GAAG,IAAI,CAE5F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,mCAAmC,GAAG,SAAS,CAaxG;AA0ND,UAAU,2BAA2B;IACjC;;OAEG;IACH,SAAS,EAAE,gCAAgC,EAAE,CAAC;IAC9C;;OAEG;IACH,cAAc,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,cAAc,EACd,GAAG,EACH,KAAK,GACR,EAAE,2BAA2B,GAAG,gCAAgC,EAAE,CAelE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gCAAgC,EAAE,CAWlG"}
@@ -120,10 +120,11 @@ function toPluggableApplicationOrganizationPermissions(permissions) {
120
120
  hasBaseUiAccess: permissions.hasBaseUiAccess ?? false,
121
121
  };
122
122
  }
123
- // Embedded mode forces the shell flags on so each remote becomes eligible and its legacy-external
124
- // twin (which requires the flag false) drops out exactly one survives. Non-embedded is untouched.
123
+ // Forces the two shell flags on. A flag source that cannot be reached resolves them false, which
124
+ // leaves only the legacy external twin eligible; route matching skips external apps, so an embedded
125
+ // or export URL would then match nothing.
125
126
  function settingsForRequirements(ctx) {
126
- if (ctx.embeddingMode !== "iframe") {
127
+ if (ctx.embeddingMode !== "iframe" && ctx.isExportMode !== true) {
127
128
  return ctx.settings;
128
129
  }
129
130
  return {
@@ -167,8 +168,8 @@ function filterByScope(apps, scope) {
167
168
  return apps.filter((app) => app.applicationScope === scope);
168
169
  }
169
170
  /**
170
- * Returns true when the platform context indicates that access to the standard (local) apps is not
171
- * restricted. Otherwise, the user must have BASE_UI_ACCESS organization permission.
171
+ * Drops the standard (local) applications when `restrictBaseUi` is set and the user lacks the
172
+ * BASE_UI_ACCESS organization permission.
172
173
  *
173
174
  * BASE_UI_ACCESS is a platform-wide organization permission that gates visibility of all
174
175
  * standard (local) applications. Remote applications are not subject to this check because
@@ -190,7 +191,7 @@ function filterLocalByBaseUiAccess(localApps, ctx) {
190
191
  * 4. Apply overrides from the remote registry to the merged list
191
192
  * 5. Filter out disabled applications (isEnabled: false)
192
193
  * 6. Filter by application scope - keep only apps whose applicationScope matches scope; if scope is undefined, no apps pass through
193
- * 7. Filter by requirements - check requiredSettings, requiredWorkspacePermissions, requiredOrganizationPermissions, and requiredEntitlements
194
+ * 7. Filter by requirements - check requiredSettings, requiredWorkspacePermissions, requiredOrganizationPermissions, and requiredEntitlements (embedded and export modes force the shell application flags on)
194
195
  * 8. Sort by menuOrder (ascending)
195
196
  *
196
197
  * @param options - Resolution options; see {@link IResolveApplicationsOptions}
@@ -144,8 +144,8 @@ export declare type LocalPluggableApplicationLoader = () => Promise<{
144
144
  }>;
145
145
 
146
146
  /**
147
- * Maps a legacy KD/AD/modeler/metrics URL (embedded or standalone) to its host equivalent, or
148
- * `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
147
+ * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
148
+ * or `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
149
149
  * in the legacy apps; runs client-side because the workspace id is in the (server-invisible) hash.
150
150
  *
151
151
  * @alpha
@@ -30,7 +30,7 @@
30
30
  "messages.genAi.visualisation.saved.success": "完了!ビジュアライゼーションを保存しました。",
31
31
  "messages.genAi.visualisation.saved.error": "ビジュアライゼーションを保存する際に問題が発生しました。",
32
32
  "messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
33
- "messages.genAi.visualisation.link.copied": "視覚化リンクがクリップボードにコピーされました。",
33
+ "messages.genAi.visualisation.link.copied": "ビジュアライゼーションリンクがクリップボードにコピーされました。",
34
34
  "messages.showMore": "もっと表示",
35
35
  "messages.showLess": "表示を減らす",
36
36
  "gen-ai.ask-assistant.search": "新しいビジュアライゼーションを構築する:{question}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-pluggable-host",
3
- "version": "11.56.0-alpha.5",
3
+ "version": "11.56.0-alpha.7",
4
4
  "description": "GoodData SDK runtime for hosting pluggable applications — registry, loader, routing, platform context, default UI chrome",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -29,20 +29,20 @@
29
29
  "dependencies": {
30
30
  "@module-federation/runtime": "2.6.0",
31
31
  "lodash-es": "^4.17.23",
32
- "@gooddata/sdk-backend-base": "11.56.0-alpha.5",
33
- "@gooddata/sdk-backend-tiger": "11.56.0-alpha.5",
34
- "@gooddata/sdk-backend-spi": "11.56.0-alpha.5",
35
- "@gooddata/sdk-embedding": "11.56.0-alpha.5",
36
- "@gooddata/sdk-model": "11.56.0-alpha.5",
37
- "@gooddata/sdk-pluggable-application-model": "11.56.0-alpha.5",
38
- "@gooddata/sdk-ui-application-header": "11.56.0-alpha.5",
39
- "@gooddata/sdk-ui": "11.56.0-alpha.5",
40
- "@gooddata/sdk-ui-ext": "11.56.0-alpha.5",
41
- "@gooddata/sdk-ui-gen-ai": "11.56.0-alpha.5",
42
- "@gooddata/sdk-ui-kit": "11.56.0-alpha.5",
43
- "@gooddata/sdk-ui-semantic-search": "11.56.0-alpha.5",
44
- "@gooddata/sdk-ui-theme-provider": "11.56.0-alpha.5",
45
- "@gooddata/util": "11.56.0-alpha.5"
32
+ "@gooddata/sdk-backend-base": "11.56.0-alpha.7",
33
+ "@gooddata/sdk-backend-spi": "11.56.0-alpha.7",
34
+ "@gooddata/sdk-backend-tiger": "11.56.0-alpha.7",
35
+ "@gooddata/sdk-embedding": "11.56.0-alpha.7",
36
+ "@gooddata/sdk-model": "11.56.0-alpha.7",
37
+ "@gooddata/sdk-pluggable-application-model": "11.56.0-alpha.7",
38
+ "@gooddata/sdk-ui": "11.56.0-alpha.7",
39
+ "@gooddata/sdk-ui-application-header": "11.56.0-alpha.7",
40
+ "@gooddata/sdk-ui-gen-ai": "11.56.0-alpha.7",
41
+ "@gooddata/sdk-ui-ext": "11.56.0-alpha.7",
42
+ "@gooddata/sdk-ui-kit": "11.56.0-alpha.7",
43
+ "@gooddata/sdk-ui-semantic-search": "11.56.0-alpha.7",
44
+ "@gooddata/sdk-ui-theme-provider": "11.56.0-alpha.7",
45
+ "@gooddata/util": "11.56.0-alpha.7"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@microsoft/api-documenter": "7.30.10",
@@ -55,7 +55,6 @@
55
55
  "@types/react-dom": "19.1.7",
56
56
  "@typescript-eslint/eslint-plugin": "8.58.0",
57
57
  "@typescript-eslint/parser": "8.58.0",
58
- "@typescript/native-preview": "7.0.0-dev.20260707.2",
59
58
  "@vitest/coverage-v8": "4.1.8",
60
59
  "eslint": "^9.39.2",
61
60
  "eslint-plugin-headers": "1.3.3",
@@ -76,14 +75,14 @@
76
75
  "react-intl": "10.1.25",
77
76
  "react-router": "7.18.1",
78
77
  "rolldown": "1.0.3",
79
- "sass": "1.80.0",
78
+ "sass": "1.100.0",
80
79
  "tslib": "2.8.1",
81
- "typescript": "6.0.3",
80
+ "typescript": "7.0.2",
82
81
  "vite": "8.0.16",
83
82
  "vitest": "4.1.8",
84
83
  "vitest-dom": "0.1.1",
85
- "@gooddata/eslint-config": "11.56.0-alpha.5",
86
- "@gooddata/oxlint-config": "11.56.0-alpha.5"
84
+ "@gooddata/eslint-config": "11.56.0-alpha.7",
85
+ "@gooddata/oxlint-config": "11.56.0-alpha.7"
87
86
  },
88
87
  "peerDependencies": {
89
88
  "react": ">=18.3.1",
@@ -97,8 +96,8 @@
97
96
  "_phase:validate": "npm run validate",
98
97
  "api-extractor": "mkdir -p api && [ -z \"${CI}\" ] && (api-extractor run -l) || (api-extractor run)",
99
98
  "build": "npm-run-all -p build-check build-ts && npm run copy-assets && npm run api-extractor",
100
- "build-check": "tsgo",
101
- "build-ts": "tsgo -p ./tsconfig.build.json",
99
+ "build-check": "tsc",
100
+ "build-ts": "tsc -p ./tsconfig.build.json",
102
101
  "clean": "../../common/scripts/clean-command-state.sh && rm -rf esm *.log",
103
102
  "copy-assets": "bash scripts/copy-assets.sh",
104
103
  "format-check": "oxfmt --check .",