@gooddata/sdk-ui-pluggable-host 11.61.0-alpha.0 → 11.61.0-alpha.2

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,7 +7,7 @@ export interface ILegacyLocation {
7
7
  search: string;
8
8
  }
9
9
  /**
10
- * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
10
+ * Maps a legacy KD/AD/modeler/metrics/home-ui/reports URL (embedded or standalone) to its host equivalent,
11
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
  *
@@ -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;AA0FD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAiD3E;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;AA8FD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAsD3E;AAYD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtE"}
@@ -70,8 +70,11 @@ const LEGACY_HOME_PATHS = [
70
70
  "/ai-hub",
71
71
  "/getting-started",
72
72
  ];
73
+ // Publisher was served under the /reports route base. The backend report export and saved links still
74
+ // open that route.
75
+ const FORMER_PUBLISHER_ROUTE = /^((?:\/embedded)?\/workspace\/[^/]+)\/reports(\/.*)?$/;
73
76
  /**
74
- * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
77
+ * Maps a legacy KD/AD/modeler/metrics/home-ui/reports URL (embedded or standalone) to its host equivalent,
75
78
  * or `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
76
79
  * in the legacy apps; runs client-side because the workspace id is in the (server-invisible) hash.
77
80
  *
@@ -79,6 +82,10 @@ const LEGACY_HOME_PATHS = [
79
82
  */
80
83
  export function mapLegacyUrlToHost(location) {
81
84
  const { pathname, hash, search } = location;
85
+ const formerPublisher = FORMER_PUBLISHER_ROUTE.exec(pathname);
86
+ if (formerPublisher) {
87
+ return `${formerPublisher[1]}/publisher${formerPublisher[2] ?? ""}${search}${hash}`;
88
+ }
82
89
  // KD legacy hash: #/workspace|project|client/<ws>/<rest>. Lift <ws> to the path, keep <rest>.
83
90
  if (isUnder(pathname, "/dashboards")) {
84
91
  const match = /^#\/(?:workspace|project|client)\/([^/?]+)(.*)$/.exec(hash);
@@ -18,7 +18,7 @@ function throwIfAborted(signal) {
18
18
  * and the module should only care about the second part.
19
19
  * Here we are crossing the boundaries, and the host app is checking the full URL.
20
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.
21
+ * This is scheduled to happen with the gdc-publisher module.
22
22
  *
23
23
  * @internal - exported for testing
24
24
  */
@@ -191,7 +191,7 @@ export declare type LocalPluggableApplicationLoader = () => Promise<{
191
191
  }>;
192
192
 
193
193
  /**
194
- * Maps a legacy KD/AD/modeler/metrics/home-ui URL (embedded or standalone) to its host equivalent,
194
+ * Maps a legacy KD/AD/modeler/metrics/home-ui/reports URL (embedded or standalone) to its host equivalent,
195
195
  * or `null` when it is not a recognized legacy URL. Mirrors the standalone→host redirects that live
196
196
  * in the legacy apps; runs client-side because the workspace id is in the (server-invisible) hash.
197
197
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-pluggable-host",
3
- "version": "11.61.0-alpha.0",
3
+ "version": "11.61.0-alpha.2",
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.61.0-alpha.0",
33
- "@gooddata/sdk-backend-spi": "11.61.0-alpha.0",
34
- "@gooddata/sdk-embedding": "11.61.0-alpha.0",
35
- "@gooddata/sdk-backend-tiger": "11.61.0-alpha.0",
36
- "@gooddata/sdk-model": "11.61.0-alpha.0",
37
- "@gooddata/sdk-pluggable-application-model": "11.61.0-alpha.0",
38
- "@gooddata/sdk-ui": "11.61.0-alpha.0",
39
- "@gooddata/sdk-ui-application-header": "11.61.0-alpha.0",
40
- "@gooddata/sdk-ui-kit": "11.61.0-alpha.0",
41
- "@gooddata/sdk-ui-ext": "11.61.0-alpha.0",
42
- "@gooddata/sdk-ui-gen-ai": "11.61.0-alpha.0",
43
- "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.0",
44
- "@gooddata/sdk-ui-semantic-search": "11.61.0-alpha.0",
45
- "@gooddata/util": "11.61.0-alpha.0"
32
+ "@gooddata/sdk-backend-base": "11.61.0-alpha.2",
33
+ "@gooddata/sdk-backend-spi": "11.61.0-alpha.2",
34
+ "@gooddata/sdk-backend-tiger": "11.61.0-alpha.2",
35
+ "@gooddata/sdk-model": "11.61.0-alpha.2",
36
+ "@gooddata/sdk-embedding": "11.61.0-alpha.2",
37
+ "@gooddata/sdk-ui": "11.61.0-alpha.2",
38
+ "@gooddata/sdk-pluggable-application-model": "11.61.0-alpha.2",
39
+ "@gooddata/sdk-ui-application-header": "11.61.0-alpha.2",
40
+ "@gooddata/sdk-ui-ext": "11.61.0-alpha.2",
41
+ "@gooddata/sdk-ui-gen-ai": "11.61.0-alpha.2",
42
+ "@gooddata/sdk-ui-kit": "11.61.0-alpha.2",
43
+ "@gooddata/sdk-ui-semantic-search": "11.61.0-alpha.2",
44
+ "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.2",
45
+ "@gooddata/util": "11.61.0-alpha.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@microsoft/api-documenter": "7.30.16",
@@ -81,8 +81,8 @@
81
81
  "vite": "8.0.16",
82
82
  "vitest": "4.1.11",
83
83
  "vitest-dom": "0.1.1",
84
- "@gooddata/eslint-config": "11.61.0-alpha.0",
85
- "@gooddata/oxlint-config": "11.61.0-alpha.0"
84
+ "@gooddata/eslint-config": "11.61.0-alpha.2",
85
+ "@gooddata/oxlint-config": "11.61.0-alpha.2"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "react": ">=18.3.1",