@onecx/integration-interface 8.0.0-rc.4 → 8.0.0-rc.6
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/README.md +13 -7
- package/migrations/index.js +3 -6
- package/migrations/index.js.map +1 -1
- package/migrations/v5/warn-for-events-publisher-navigated.js +5 -8
- package/migrations/v5/warn-for-events-publisher-navigated.js.map +1 -1
- package/migrations/v5/warn-for-events-topic-navigated.js +8 -11
- package/migrations/v5/warn-for-events-topic-navigated.js.map +1 -1
- package/migrations/v6/migrate-onecx-to-v6.js +3 -6
- package/migrations/v6/migrate-onecx-to-v6.js.map +1 -1
- package/package.json +6 -3
- package/src/index.d.ts +9 -0
- package/src/index.js +53 -47
- package/src/index.js.map +1 -1
- package/src/lib/declarations.d.ts +5 -0
- package/src/lib/declarations.js +2 -0
- package/src/lib/declarations.js.map +1 -0
- package/src/lib/models/shell-capability.model.d.ts +11 -0
- package/src/lib/models/shell-capability.model.js +8 -0
- package/src/lib/models/shell-capability.model.js.map +1 -0
- package/src/lib/services/dynamic-translation.service.d.ts +87 -0
- package/src/lib/services/dynamic-translation.service.js +275 -0
- package/src/lib/services/dynamic-translation.service.js.map +1 -0
- package/src/lib/services/icon.service.d.ts +15 -0
- package/src/lib/services/icon.service.js +50 -0
- package/src/lib/services/icon.service.js.map +1 -0
- package/src/lib/services/image-repository.service.js +5 -9
- package/src/lib/services/image-repository.service.js.map +1 -1
- package/src/lib/topics/configuration/v1/configuration.topic.js +2 -6
- package/src/lib/topics/configuration/v1/configuration.topic.js.map +1 -1
- package/src/lib/topics/current-location/v1/current-location.model.js +0 -2
- package/src/lib/topics/current-location/v1/current-location.topic.js +2 -6
- package/src/lib/topics/current-location/v1/current-location.topic.js.map +1 -1
- package/src/lib/topics/current-mfe/v1/current-mfe.topic.js +2 -6
- package/src/lib/topics/current-mfe/v1/current-mfe.topic.js.map +1 -1
- package/src/lib/topics/current-mfe/v1/mfe-info.model.js +0 -2
- package/src/lib/topics/current-page/v1/current-page.topic.js +8 -12
- package/src/lib/topics/current-page/v1/current-page.topic.js.map +1 -1
- package/src/lib/topics/current-page/v1/page-info.model.js +0 -2
- package/src/lib/topics/current-theme/v1/current-theme.topic.js +2 -6
- package/src/lib/topics/current-theme/v1/current-theme.topic.js.map +1 -1
- package/src/lib/topics/current-theme/v1/theme-override.model.d.ts +8 -0
- package/src/lib/topics/current-theme/v1/theme-override.model.js +6 -0
- package/src/lib/topics/current-theme/v1/theme-override.model.js.map +1 -0
- package/src/lib/topics/current-theme/v1/theme.model.d.ts +2 -0
- package/src/lib/topics/current-theme/v1/theme.model.js +0 -2
- package/src/lib/topics/current-workspace/v1/current-workspace.topic.js +2 -6
- package/src/lib/topics/current-workspace/v1/current-workspace.topic.js.map +1 -1
- package/src/lib/topics/current-workspace/v1/endpoint.model.js +0 -2
- package/src/lib/topics/current-workspace/v1/mfe-portal-registration.model.js +0 -2
- package/src/lib/topics/current-workspace/v1/route.model.js +0 -2
- package/src/lib/topics/current-workspace/v1/workspace.model.js +0 -2
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.model.d.ts +15 -0
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.model.js +6 -0
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.model.js.map +1 -0
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.topic.d.ts +6 -0
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.topic.js +7 -0
- package/src/lib/topics/dynamic-translations/v1/dynamic-translations.topic.js.map +1 -0
- package/src/lib/topics/events/v1/event-type.js +2 -5
- package/src/lib/topics/events/v1/event-type.js.map +1 -1
- package/src/lib/topics/events/v1/events-topic.js +2 -6
- package/src/lib/topics/events/v1/events-topic.js.map +1 -1
- package/src/lib/topics/events/v1/navigated-event-payload.js +0 -2
- package/src/lib/topics/events/v1/navigated-event-type.js +0 -2
- package/src/lib/topics/events/v1/topic-event-type.js +0 -2
- package/src/lib/topics/global-error/v1/global-error.topic.js +2 -6
- package/src/lib/topics/global-error/v1/global-error.topic.js.map +1 -1
- package/src/lib/topics/global-loading/v1/global-loading.topic.js +2 -6
- package/src/lib/topics/global-loading/v1/global-loading.topic.js.map +1 -1
- package/src/lib/topics/icons/v1/icon.model.d.ts +15 -0
- package/src/lib/topics/icons/v1/icon.model.js +1 -0
- package/src/lib/topics/icons/v1/icon.model.js.map +1 -0
- package/src/lib/topics/icons/v1/icon.topic.d.ts +5 -0
- package/src/lib/topics/icons/v1/icon.topic.js +7 -0
- package/src/lib/topics/icons/v1/icon.topic.js.map +1 -0
- package/src/lib/topics/image-repository/image-repository.model.js +0 -2
- package/src/lib/topics/image-repository/image-repository.topic.js +2 -6
- package/src/lib/topics/image-repository/image-repository.topic.js.map +1 -1
- package/src/lib/topics/is-authenticated/v1/isAuthenticated.topic.js +2 -6
- package/src/lib/topics/is-authenticated/v1/isAuthenticated.topic.js.map +1 -1
- package/src/lib/topics/message/v1/message.model.js +0 -2
- package/src/lib/topics/message/v1/message.topic.js +2 -6
- package/src/lib/topics/message/v1/message.topic.js.map +1 -1
- package/src/lib/topics/parameters/v1/parameters.topic.js +2 -6
- package/src/lib/topics/parameters/v1/parameters.topic.js.map +1 -1
- package/src/lib/topics/permissions/v1/permissions.topic.js +2 -6
- package/src/lib/topics/permissions/v1/permissions.topic.js.map +1 -1
- package/src/lib/topics/permissions-rpc/v1/permissions-rpc.model.js +0 -2
- package/src/lib/topics/permissions-rpc/v1/permissions-rpc.topic.js +2 -6
- package/src/lib/topics/permissions-rpc/v1/permissions-rpc.topic.js.map +1 -1
- package/src/lib/topics/remote-components/v1/remote-component.model.js +2 -5
- package/src/lib/topics/remote-components/v1/remote-component.model.js.map +1 -1
- package/src/lib/topics/remote-components/v1/remote-components-info.model.js +0 -2
- package/src/lib/topics/remote-components/v1/remote-components.topic.js +2 -6
- package/src/lib/topics/remote-components/v1/remote-components.topic.js.map +1 -1
- package/src/lib/topics/remote-components/v1/slot.model.js +0 -2
- package/src/lib/topics/resized-events/v1/resized-event-type.js +2 -5
- package/src/lib/topics/resized-events/v1/resized-event-type.js.map +1 -1
- package/src/lib/topics/resized-events/v1/resized-events.topic.js +9 -13
- package/src/lib/topics/resized-events/v1/resized-events.topic.js.map +1 -1
- package/src/lib/topics/resized-events/v1/resized-update-requested-type.js +0 -2
- package/src/lib/topics/resized-events/v1/slot-groups-resized-type.js +0 -2
- package/src/lib/topics/resized-events/v1/slots-resized-type.js +0 -2
- package/src/lib/topics/resized-events/v1/topic-resized-event-type.js +0 -2
- package/src/lib/topics/user-profile/v1/user-profile.model.js +2 -5
- package/src/lib/topics/user-profile/v1/user-profile.model.js.map +1 -1
- package/src/lib/topics/user-profile/v1/user-profile.topic.js +2 -6
- package/src/lib/topics/user-profile/v1/user-profile.topic.js.map +1 -1
- package/src/lib/utils/logger.utils.js +2 -5
- package/src/lib/utils/logger.utils.js.map +1 -1
- package/src/lib/utils/shell-capability.utils.d.ts +2 -0
- package/src/lib/utils/shell-capability.utils.js +4 -0
- package/src/lib/utils/shell-capability.utils.js.map +1 -0
- package/src/version.d.ts +2 -0
- package/src/version.js +3 -0
- package/src/version.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
# integration-interface
|
|
1
|
+
# @onecx/integration-interface
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@onecx/integration-interface` contains framework-agnostic interfaces and type definitions for OneCX platform integration.
|
|
4
|
+
More information about the library can be found [here](https://onecx.github.io/docs/documentation/current/onecx-portal-ui-libs/libraries/integration-interface.html)
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Installation
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
```bash
|
|
9
|
+
npm install @onecx/integration-interface
|
|
10
|
+
```
|
|
8
11
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
## Additional Commands
|
|
13
|
+
- `npx nx run integration-interface:build` - Builds the library and outputs the result to the `dist` folder.
|
|
14
|
+
- `npx nx run integration-interface:build-migrations` - Builds the migration files for the library.
|
|
15
|
+
- `npx nx run integration-interface:test` - Runs the unit tests for the library.
|
|
16
|
+
- `npx nx run integration-interface:lint` - Lints the library's codebase.
|
|
17
|
+
- `npx nx run integration-interface:release` - Releases a new version of the library to npm, following semantic versioning guidelines.
|
package/migrations/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./v6/migrate-onecx-to-v6"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./v5/warn-for-events-topic-navigated"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./v5/warn-for-events-publisher-navigated"), exports);
|
|
1
|
+
export * from './v6/migrate-onecx-to-v6';
|
|
2
|
+
export * from './v5/warn-for-events-topic-navigated';
|
|
3
|
+
export * from './v5/warn-for-events-publisher-navigated';
|
|
7
4
|
//# sourceMappingURL=index.js.map
|
package/migrations/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/migrations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/migrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = warnForEventsPublisherNavigated;
|
|
4
|
-
const nx_migration_utils_1 = require("@onecx/nx-migration-utils");
|
|
1
|
+
import { detectMethodCallsInFiles, printWarnings } from '@onecx/nx-migration-utils';
|
|
5
2
|
function argsMatchExpectedPayload(callExpression) {
|
|
6
3
|
return callExpression.arguments.some((arg) => {
|
|
7
4
|
const argText = arg.getText();
|
|
8
5
|
return /type:\s*['"]navigated['"]/.test(argText);
|
|
9
6
|
});
|
|
10
7
|
}
|
|
11
|
-
async function warnForEventsPublisherNavigated(tree) {
|
|
8
|
+
export default async function warnForEventsPublisherNavigated(tree) {
|
|
12
9
|
const warningForPotentialMatches = '⚠️ EventsPublisher usages were detected. Please double-check if EventsPublisher is used for publishing navigation events and switch to CurrentLocationPublisher if so.';
|
|
13
10
|
const warningForExactMatches = '⚠️ You are using EventsPublisher to publish navigation events. Please switch to using CurrentLocationPublisher.';
|
|
14
|
-
const potentialMatches =
|
|
11
|
+
const potentialMatches = detectMethodCallsInFiles(tree, './src', 'publish', 'EventsPublisher');
|
|
15
12
|
const exactMatches = new Map();
|
|
16
13
|
const remainingPotentialMatches = new Map();
|
|
17
14
|
potentialMatches.forEach((calls, file) => {
|
|
@@ -24,10 +21,10 @@ async function warnForEventsPublisherNavigated(tree) {
|
|
|
24
21
|
}
|
|
25
22
|
});
|
|
26
23
|
if (exactMatches.size > 0) {
|
|
27
|
-
|
|
24
|
+
printWarnings(warningForExactMatches, Array.from(exactMatches.keys()));
|
|
28
25
|
}
|
|
29
26
|
if (remainingPotentialMatches.size > 0) {
|
|
30
|
-
|
|
27
|
+
printWarnings(warningForPotentialMatches, Array.from(remainingPotentialMatches.keys()));
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
//# sourceMappingURL=warn-for-events-publisher-navigated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warn-for-events-publisher-navigated.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v5/warn-for-events-publisher-navigated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warn-for-events-publisher-navigated.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v5/warn-for-events-publisher-navigated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAGnF,SAAS,wBAAwB,CAAC,cAA8B;IAC9D,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAA;QAC7B,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,+BAA+B,CAAC,IAAU;IACtE,MAAM,0BAA0B,GAC9B,wKAAwK,CAAA;IAE1K,MAAM,sBAAsB,GAC1B,iHAAiH,CAAA;IAEnH,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAA;IAE9F,MAAM,YAAY,GAAG,IAAI,GAAG,EAA4B,CAAA;IACxD,MAAM,yBAAyB,GAAG,IAAI,GAAG,EAA4B,CAAA;IAErE,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACvC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAA;QAC5E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;QACvC,CAAC;aAAM,CAAC;YACN,yBAAyB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;IACD,IAAI,yBAAyB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACvC,aAAa,CAAC,0BAA0B,EAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACzF,CAAC;AACH,CAAC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.default = warnForEventsTopicNavigated;
|
|
4
|
-
const nx_migration_utils_1 = require("@onecx/nx-migration-utils");
|
|
5
|
-
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
1
|
+
import { detectMethodCallsInFiles, printWarnings } from '@onecx/nx-migration-utils';
|
|
2
|
+
import { ast, query } from '@phenomnomnominal/tsquery';
|
|
6
3
|
function argsContainFilterForTypeNavigated(callExpression) {
|
|
7
|
-
const callExpressionAst =
|
|
4
|
+
const callExpressionAst = ast(callExpression.getText());
|
|
8
5
|
const filterCallsSelector = `CallExpression:has(Identifier[name="filter"]):has(ArrowFunction:has(BinaryExpression:has(PropertyAccessExpression:has(Identifier):has(Identifier[name="type"])):has(StringLiteral[value="navigated"])))`;
|
|
9
|
-
const filterCalls =
|
|
6
|
+
const filterCalls = query(callExpressionAst, filterCallsSelector);
|
|
10
7
|
return filterCalls.length > 0;
|
|
11
8
|
}
|
|
12
|
-
async function warnForEventsTopicNavigated(tree) {
|
|
9
|
+
export default async function warnForEventsTopicNavigated(tree) {
|
|
13
10
|
const warningForPotentialMatches = '⚠️ EventsTopic usages were detected. Please double-check if EventsTopic is used for subscribing to navigation events and switch to CurrentLocationTopic/appStateService.currentLocation$ if so.';
|
|
14
11
|
const warningForExactMatches = '⚠️ You are using EventsTopic to listen for navigation events. Please switch to using CurrentLocationTopic/appStateService.currentLocation$.';
|
|
15
|
-
const potentialMatches =
|
|
12
|
+
const potentialMatches = detectMethodCallsInFiles(tree, './src', 'pipe', 'EventsTopic');
|
|
16
13
|
const exactMatches = new Map();
|
|
17
14
|
const remainingPotentialMatches = new Map();
|
|
18
15
|
potentialMatches.forEach((calls, file) => {
|
|
@@ -25,10 +22,10 @@ async function warnForEventsTopicNavigated(tree) {
|
|
|
25
22
|
}
|
|
26
23
|
});
|
|
27
24
|
if (exactMatches.size > 0) {
|
|
28
|
-
|
|
25
|
+
printWarnings(warningForExactMatches, Array.from(exactMatches.keys()));
|
|
29
26
|
}
|
|
30
27
|
if (remainingPotentialMatches.size > 0) {
|
|
31
|
-
|
|
28
|
+
printWarnings(warningForPotentialMatches, Array.from(remainingPotentialMatches.keys()));
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
//# sourceMappingURL=warn-for-events-topic-navigated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warn-for-events-topic-navigated.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v5/warn-for-events-topic-navigated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warn-for-events-topic-navigated.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v5/warn-for-events-topic-navigated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEnF,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAEtD,SAAS,iCAAiC,CAAC,cAA8B;IACvE,MAAM,iBAAiB,GAAG,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAA;IACvD,MAAM,mBAAmB,GAAG,yMAAyM,CAAA;IACrO,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAA;IACjE,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,CAAA;AAC/B,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,2BAA2B,CAAC,IAAU;IAClE,MAAM,0BAA0B,GAC9B,iMAAiM,CAAA;IAEnM,MAAM,sBAAsB,GAC1B,6IAA6I,CAAA;IAE/I,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAAA;IAEvF,MAAM,YAAY,GAAG,IAAI,GAAG,EAA4B,CAAA;IACxD,MAAM,yBAAyB,GAAG,IAAI,GAAG,EAA4B,CAAA;IAErE,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACvC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAAA;QACrF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;QACvC,CAAC;aAAM,CAAC;YACN,yBAAyB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;IACD,IAAI,yBAAyB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACvC,aAAa,CAAC,0BAA0B,EAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACzF,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const nx_migration_utils_1 = require("@onecx/nx-migration-utils");
|
|
5
|
-
async function migrateOnecxToV6(tree) {
|
|
6
|
-
await (0, nx_migration_utils_1.commonMigrateOnecxToV6)(tree);
|
|
1
|
+
import { commonMigrateOnecxToV6 } from '@onecx/nx-migration-utils';
|
|
2
|
+
export default async function migrateOnecxToV6(tree) {
|
|
3
|
+
await commonMigrateOnecxToV6(tree);
|
|
7
4
|
}
|
|
8
5
|
//# sourceMappingURL=migrate-onecx-to-v6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-onecx-to-v6.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v6/migrate-onecx-to-v6.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate-onecx-to-v6.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/migrations/v6/migrate-onecx-to-v6.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAElE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAU;IACvD,MAAM,sBAAsB,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/integration-interface",
|
|
3
|
-
"version": "8.0.0-rc.
|
|
3
|
+
"version": "8.0.0-rc.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,12 +10,15 @@
|
|
|
10
10
|
"tslib": "^2.6.3",
|
|
11
11
|
"rxjs": "^7.8.1",
|
|
12
12
|
"@nx/devkit": "^22.0.2",
|
|
13
|
-
"@onecx/accelerator": "^8.0.0-rc.
|
|
14
|
-
"@onecx/nx-migration-utils": "^8.0.0-rc.
|
|
13
|
+
"@onecx/accelerator": "^8.0.0-rc.6",
|
|
14
|
+
"@onecx/nx-migration-utils": "^8.0.0-rc.6",
|
|
15
15
|
"@phenomnomnominal/tsquery": "^6",
|
|
16
16
|
"typescript": "^5.5.4"
|
|
17
17
|
},
|
|
18
18
|
"type": "commonjs",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"semver": "^7.7.3"
|
|
21
|
+
},
|
|
19
22
|
"main": "./src/index.js",
|
|
20
23
|
"typings": "./src/index.d.ts",
|
|
21
24
|
"publishConfig": {
|
package/src/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './lib/topics/global-error/v1/global-error.topic';
|
|
|
6
6
|
export * from './lib/topics/global-loading/v1/global-loading.topic';
|
|
7
7
|
export * from './lib/topics/current-theme/v1/current-theme.topic';
|
|
8
8
|
export * from './lib/topics/current-theme/v1/theme.model';
|
|
9
|
+
export * from './lib/topics/current-theme/v1/theme-override.model';
|
|
9
10
|
export * from './lib/topics/user-profile/v1/user-profile.model';
|
|
10
11
|
export * from './lib/topics/user-profile/v1/user-profile.topic';
|
|
11
12
|
export * from './lib/topics/configuration/v1/configuration.topic';
|
|
@@ -42,3 +43,11 @@ export * from './lib/topics/resized-events/v1/resized-events.topic';
|
|
|
42
43
|
export * from './lib/topics/image-repository/image-repository.model';
|
|
43
44
|
export * from './lib/topics/image-repository/image-repository.topic';
|
|
44
45
|
export * from './lib/services/image-repository.service';
|
|
46
|
+
export * from './lib/topics/icons/v1/icon.model';
|
|
47
|
+
export * from './lib/topics/icons/v1/icon.topic';
|
|
48
|
+
export * from './lib/services/icon.service';
|
|
49
|
+
export * from './lib/topics/dynamic-translations/v1/dynamic-translations.model';
|
|
50
|
+
export * from './lib/topics/dynamic-translations/v1/dynamic-translations.topic';
|
|
51
|
+
export * from './lib/services/dynamic-translation.service';
|
|
52
|
+
export * from './lib/models/shell-capability.model';
|
|
53
|
+
export * from './lib/utils/shell-capability.utils';
|
package/src/index.js
CHANGED
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
export * from './lib/topics/current-mfe/v1/current-mfe.topic';
|
|
2
|
+
export * from './lib/topics/current-mfe/v1/mfe-info.model';
|
|
3
|
+
export * from './lib/topics/current-page/v1/current-page.topic';
|
|
4
|
+
export * from './lib/topics/current-page/v1/page-info.model';
|
|
5
|
+
export * from './lib/topics/global-error/v1/global-error.topic';
|
|
6
|
+
export * from './lib/topics/global-loading/v1/global-loading.topic';
|
|
7
|
+
export * from './lib/topics/current-theme/v1/current-theme.topic';
|
|
8
|
+
export * from './lib/topics/current-theme/v1/theme.model';
|
|
9
|
+
export * from './lib/topics/current-theme/v1/theme-override.model';
|
|
10
|
+
export * from './lib/topics/user-profile/v1/user-profile.model';
|
|
11
|
+
export * from './lib/topics/user-profile/v1/user-profile.topic';
|
|
12
|
+
export * from './lib/topics/configuration/v1/configuration.topic';
|
|
13
|
+
export * from './lib/topics/current-workspace/v1/current-workspace.topic';
|
|
14
|
+
export * from './lib/topics/current-workspace/v1/mfe-portal-registration.model';
|
|
15
|
+
export * from './lib/topics/current-workspace/v1/workspace.model';
|
|
16
|
+
export * from './lib/topics/current-workspace/v1/route.model';
|
|
17
|
+
export * from './lib/topics/current-workspace/v1/endpoint.model';
|
|
18
|
+
export * from './lib/topics/is-authenticated/v1/isAuthenticated.topic';
|
|
19
|
+
export * from './lib/topics/message/v1/message.model';
|
|
20
|
+
export * from './lib/topics/message/v1/message.topic';
|
|
21
|
+
export * from './lib/topics/remote-components/v1/remote-component.model';
|
|
22
|
+
export * from './lib/topics/remote-components/v1/remote-components-info.model';
|
|
23
|
+
export * from './lib/topics/remote-components/v1/slot.model';
|
|
24
|
+
export * from './lib/topics/remote-components/v1/remote-components.topic';
|
|
25
|
+
export * from './lib/topics/permissions/v1/permissions.topic';
|
|
26
|
+
export * from './lib/topics/permissions-rpc/v1/permissions-rpc.topic';
|
|
27
|
+
export * from './lib/topics/permissions-rpc/v1/permissions-rpc.model';
|
|
28
|
+
export * from './lib/topics/events/v1/events-topic';
|
|
29
|
+
export * from './lib/topics/events/v1/topic-event-type';
|
|
30
|
+
export * from './lib/topics/events/v1/event-type';
|
|
31
|
+
export * from './lib/topics/events/v1/navigated-event-type';
|
|
32
|
+
export * from './lib/topics/events/v1/navigated-event-payload';
|
|
33
|
+
export * from './lib/topics/resized-events/v1/resized-event-type';
|
|
34
|
+
export * from './lib/topics/resized-events/v1/resized-events.topic';
|
|
35
|
+
export * from './lib/topics/resized-events/v1/resized-update-requested-type';
|
|
36
|
+
export * from './lib/topics/resized-events/v1/slot-groups-resized-type';
|
|
37
|
+
export * from './lib/topics/resized-events/v1/slots-resized-type';
|
|
38
|
+
export * from './lib/topics/resized-events/v1/topic-resized-event-type';
|
|
39
|
+
export * from './lib/topics/current-location/v1/current-location.model';
|
|
40
|
+
export * from './lib/topics/current-location/v1/current-location.topic';
|
|
41
|
+
export * from './lib/topics/parameters/v1/parameters.topic';
|
|
42
|
+
export * from './lib/topics/resized-events/v1/resized-events.topic';
|
|
43
|
+
export * from './lib/topics/image-repository/image-repository.model';
|
|
44
|
+
export * from './lib/topics/image-repository/image-repository.topic';
|
|
45
|
+
export * from './lib/services/image-repository.service';
|
|
46
|
+
export * from './lib/topics/icons/v1/icon.model';
|
|
47
|
+
export * from './lib/topics/icons/v1/icon.topic';
|
|
48
|
+
export * from './lib/services/icon.service';
|
|
49
|
+
export * from './lib/topics/dynamic-translations/v1/dynamic-translations.model';
|
|
50
|
+
export * from './lib/topics/dynamic-translations/v1/dynamic-translations.topic';
|
|
51
|
+
export * from './lib/services/dynamic-translation.service';
|
|
52
|
+
export * from './lib/models/shell-capability.model';
|
|
53
|
+
export * from './lib/utils/shell-capability.utils';
|
|
48
54
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAA;AAC7D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,8CAA8C,CAAA;AAE5D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,qDAAqD,CAAA;AAEnE,cAAc,mDAAmD,CAAA;AACjE,cAAc,2CAA2C,CAAA;AACzD,cAAc,oDAAoD,CAAA;AAElE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,mDAAmD,CAAA;AAEjE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iEAAiE,CAAA;AAC/E,cAAc,mDAAmD,CAAA;AACjE,cAAc,+CAA+C,CAAA;AAC7D,cAAc,kDAAkD,CAAA;AAEhE,cAAc,wDAAwD,CAAA;AAEtE,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AAErD,cAAc,0DAA0D,CAAA;AACxE,cAAc,gEAAgE,CAAA;AAC9E,cAAc,8CAA8C,CAAA;AAC5D,cAAc,2DAA2D,CAAA;AAEzE,cAAc,+CAA+C,CAAA;AAE7D,cAAc,uDAAuD,CAAA;AACrE,cAAc,uDAAuD,CAAA;AAErE,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,gDAAgD,CAAA;AAE9D,cAAc,mDAAmD,CAAA;AACjE,cAAc,qDAAqD,CAAA;AACnE,cAAc,8DAA8D,CAAA;AAC5E,cAAc,yDAAyD,CAAA;AACvE,cAAc,mDAAmD,CAAA;AACjE,cAAc,yDAAyD,CAAA;AAEvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AAEvE,cAAc,6CAA6C,CAAA;AAE3D,cAAc,qDAAqD,CAAA;AAEnE,cAAc,sDAAsD,CAAA;AACpE,cAAc,sDAAsD,CAAA;AACpE,cAAc,yCAAyC,CAAA;AAGvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iEAAiE,CAAA;AAC/E,cAAc,iEAAiE,CAAA;AAE/E,cAAc,4CAA4C,CAAA;AAE1D,cAAc,qCAAqC,CAAA;AACnD,cAAc,oCAAoC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../../../../libs/integration-interface/src/lib/declarations.ts"],"names":[],"mappings":"AAMA,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum ShellCapability {
|
|
2
|
+
CURRENT_LOCATION_TOPIC = "currentLocationTopic",
|
|
3
|
+
PARAMETERS_TOPIC = "parametersTopic",
|
|
4
|
+
ACTIVENESS_AWARE_MENUS = "activenessAwareMenus",
|
|
5
|
+
DYNAMIC_TRANSLATIONS_TOPIC = "dynamicTranslationsTopic"
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
'onecx-shell-capabilities'?: ShellCapability[];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var ShellCapability;
|
|
2
|
+
(function (ShellCapability) {
|
|
3
|
+
ShellCapability["CURRENT_LOCATION_TOPIC"] = "currentLocationTopic";
|
|
4
|
+
ShellCapability["PARAMETERS_TOPIC"] = "parametersTopic";
|
|
5
|
+
ShellCapability["ACTIVENESS_AWARE_MENUS"] = "activenessAwareMenus";
|
|
6
|
+
ShellCapability["DYNAMIC_TRANSLATIONS_TOPIC"] = "dynamicTranslationsTopic";
|
|
7
|
+
})(ShellCapability || (ShellCapability = {}));
|
|
8
|
+
//# sourceMappingURL=shell-capability.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-capability.model.js","sourceRoot":"","sources":["../../../../../../libs/integration-interface/src/lib/models/shell-capability.model.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,kEAA+C,CAAA;IAC/C,uDAAoC,CAAA;IACpC,kEAA+C,CAAA;IAC/C,0EAAuD,CAAA;AACzD,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DynamicTranslationsTopic } from '../topics/dynamic-translations/v1/dynamic-translations.topic';
|
|
3
|
+
/**
|
|
4
|
+
* Cache key used for translation contexts without an explicit version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const UNVERSIONED_KEY = "undefined";
|
|
7
|
+
/**
|
|
8
|
+
* Describes a translation namespace that should be resolved for a locale.
|
|
9
|
+
*/
|
|
10
|
+
export interface TranslationContext {
|
|
11
|
+
/** Translation namespace (for example `common` or `app`). */
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional concrete semantic version.
|
|
15
|
+
*
|
|
16
|
+
* Example: `1.2.3`.
|
|
17
|
+
*/
|
|
18
|
+
version?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Global cache shape for dynamic translations.
|
|
22
|
+
*
|
|
23
|
+
* Keys are organized as locale -> context name -> version.
|
|
24
|
+
*/
|
|
25
|
+
export interface DynamicTranslationsCache {
|
|
26
|
+
[locale: string]: {
|
|
27
|
+
[contextName: string]: {
|
|
28
|
+
[version: string]: Record<string, unknown> | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the shared dynamic translations cache stored on `globalThis`.
|
|
34
|
+
*
|
|
35
|
+
* @returns Mutable cache object used by dynamic translation resolution.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getDynamicTranslationsCache(): DynamicTranslationsCache;
|
|
38
|
+
/**
|
|
39
|
+
* Resolves dynamic translations from a shared cache and topic-based shell communication.
|
|
40
|
+
*
|
|
41
|
+
* The service returns cached values immediately when possible and requests missing
|
|
42
|
+
* translations via `dynamicTranslationsTopic$` when needed.
|
|
43
|
+
*/
|
|
44
|
+
export declare class DynamicTranslationService {
|
|
45
|
+
private readonly logger;
|
|
46
|
+
private _dynamicTranslationsTopic$;
|
|
47
|
+
/**
|
|
48
|
+
* Topic used to request and receive dynamic translations.
|
|
49
|
+
*/
|
|
50
|
+
get dynamicTranslationsTopic$(): DynamicTranslationsTopic;
|
|
51
|
+
set dynamicTranslationsTopic$(source: DynamicTranslationsTopic);
|
|
52
|
+
/**
|
|
53
|
+
* Returns translations for the given locale and contexts.
|
|
54
|
+
*
|
|
55
|
+
* The method first attempts to resolve from cache, requests missing entries,
|
|
56
|
+
* and waits for a `RECEIVED` message when data is still pending.
|
|
57
|
+
*
|
|
58
|
+
* @param locale Target locale (for example `en`, `de`).
|
|
59
|
+
* @param contexts Translation contexts to resolve.
|
|
60
|
+
* @returns An observable emitting a context-keyed translation map.
|
|
61
|
+
*/
|
|
62
|
+
getTranslations(locale: string, contexts: TranslationContext[]): Observable<Record<string, Record<string, unknown>>>;
|
|
63
|
+
private createEmptyRecords;
|
|
64
|
+
private categorizeContexts;
|
|
65
|
+
private findMatchingVersion;
|
|
66
|
+
private getContextCache;
|
|
67
|
+
private getFirstAvailableVersion;
|
|
68
|
+
private findBestMatchingVersion;
|
|
69
|
+
private findSemanticVersionMatch;
|
|
70
|
+
private satisfiesVersion;
|
|
71
|
+
private checkForNullTranslations;
|
|
72
|
+
private markContextsAsRequested;
|
|
73
|
+
private isSafeContext;
|
|
74
|
+
private isSafeCacheKey;
|
|
75
|
+
private requestTranslations;
|
|
76
|
+
private hasIncompleteContexts;
|
|
77
|
+
private waitForTranslations;
|
|
78
|
+
private collectTranslations;
|
|
79
|
+
private shouldSkipContext;
|
|
80
|
+
private isContextIncomplete;
|
|
81
|
+
private addContextTranslations;
|
|
82
|
+
private getContextKey;
|
|
83
|
+
/**
|
|
84
|
+
* Releases topic resources held by this service instance.
|
|
85
|
+
*/
|
|
86
|
+
destroy(): void;
|
|
87
|
+
}
|