@tridion-docs/extensions 2.1.0 → 2.1.1
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/CHANGELOG.md +6 -0
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/dist/api/hooks/folderSelector.d.ts +2 -2
- package/dist/api/hooks/itemSelector.d.ts +1 -1
- package/dist/api/hooks/notification.d.ts +1 -1
- package/dist/api/hooks/repositoryFolderRefresh.d.ts +1 -1
- package/dist/api/hooks/repositoryObjectDetailsRefresh.d.ts +1 -1
- package/dist/api/hooks/repositoryObjectRefresh.d.ts +1 -1
- package/dist/api/hooks/searchResultObjectsRefresh.d.ts +2 -2
- package/dist/api/hooks/userProfile.d.ts +1 -1
- package/dist/api/typings/Content.d.ts +2 -2
- package/dist/api/typings/Hierarchy.d.ts +4 -4
- package/dist/api/typings/ItemSelectorObjectType.d.ts +2 -2
- package/dist/api/typings/Notification.d.ts +1 -1
- package/dist/api/typings/Project.d.ts +1 -1
- package/dist/api/typings/TranslationJob.d.ts +1 -1
- package/dist/api/typings/UserInfo.d.ts +1 -1
- package/dist/apiStorage/useApiStorage.d.ts +1 -1
- package/dist/extensionPoints/action/actionExtensions.d.ts +1 -1
- package/dist/extensionPoints/action/actionExtensionsBuilder.d.ts +2 -2
- package/dist/extensionPoints/action/explorerAction.d.ts +1 -1
- package/dist/extensionPoints/extensionPoints.d.ts +2 -2
- package/dist/extensionPoints/header/headerExtensions.d.ts +1 -1
- package/dist/extensionPoints/header/headerExtensionsBuilder.d.ts +1 -1
- package/dist/extensionPoints/header/mainNavigationItem.d.ts +1 -1
- package/dist/extensionPoints/header/mainNavigationLink.d.ts +1 -1
- package/dist/extensionPoints/objectInsight/objectInsightExtensions.d.ts +1 -1
- package/dist/extensionPoints/objectInsight/objectInsightExtensionsBuilder.d.ts +2 -2
- package/dist/extensionPoints/objectInsight/objectInsightItem.d.ts +1 -1
- package/dist/module/createExtensionGlobals.js +2 -2
- package/dist/package.json.js +2 -2
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
package/LICENSE.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
|
|
2
|
-
Copyright ©
|
|
2
|
+
Copyright © 2026 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This project contains the helper function, components and hooks for working wit
|
|
|
5
5
|
# License
|
|
6
6
|
License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
|
|
7
7
|
|
|
8
|
-
Copyright ©
|
|
8
|
+
Copyright © 2026 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
|
|
9
9
|
|
|
10
10
|
# Compatibility
|
|
11
11
|
|
|
@@ -21,12 +21,12 @@ You need to update versions of these two packages `@tridion-docs/extensions` and
|
|
|
21
21
|
```
|
|
22
22
|
"dependencies": {
|
|
23
23
|
...
|
|
24
|
-
"@tridion-docs/extensions": "2.1.
|
|
24
|
+
"@tridion-docs/extensions": "2.1.1",
|
|
25
25
|
...
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
...
|
|
29
|
-
"@tridion-docs/extensions-cli": "2.1.
|
|
29
|
+
"@tridion-docs/extensions-cli": "2.1.1",
|
|
30
30
|
...
|
|
31
31
|
}
|
|
32
32
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Content, Folder, ReadonlyHierarchy } from "../typings";
|
|
2
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import type { Content, Folder, ReadonlyHierarchy } from "../typings";
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
3
|
export interface FolderSelectorHookResult {
|
|
4
4
|
/**
|
|
5
5
|
* @memberof FolderSelectorHookResult
|
|
@@ -5,7 +5,7 @@ export interface RepositoryObjectDetailsRefreshHookResult {
|
|
|
5
5
|
* @memberof RepositoryObjectDetailsRefreshHookResult
|
|
6
6
|
* @returns {Promise<Content | null>}
|
|
7
7
|
*/
|
|
8
|
-
execute: () => Promise<
|
|
8
|
+
execute: () => Promise<undefined | null>;
|
|
9
9
|
}
|
|
10
10
|
export type RepositoryObjectDetailsRefreshHook = () => RepositoryObjectDetailsRefreshHookResult;
|
|
11
11
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentObject, Publication } from "..";
|
|
1
|
+
import type { DocumentObject, Publication } from "..";
|
|
2
2
|
export interface SearchResultObjectsRefreshHookResult {
|
|
3
3
|
/**
|
|
4
4
|
* Function to trigger search results object refresh
|
|
@@ -6,7 +6,7 @@ export interface SearchResultObjectsRefreshHookResult {
|
|
|
6
6
|
* @memberof SearchResultObjectsRefreshHookResult
|
|
7
7
|
* @return {Promise<void | null>}
|
|
8
8
|
*/
|
|
9
|
-
execute: () => Promise<
|
|
9
|
+
execute: () => Promise<undefined | null>;
|
|
10
10
|
}
|
|
11
11
|
export interface SearchResultObjectsRefreshProps {
|
|
12
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFolder, DocumentObjectType, FolderType } from "..";
|
|
2
|
-
import { BaseObject } from './BaseObject';
|
|
1
|
+
import type { BaseFolder, DocumentObjectType, FolderType } from "..";
|
|
2
|
+
import type { BaseObject } from './BaseObject';
|
|
3
3
|
export interface DocumentObject extends BaseObject {
|
|
4
4
|
/**
|
|
5
5
|
* The document object type.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentState } from "../hooks";
|
|
1
|
+
import type { ContentState } from "../hooks";
|
|
2
2
|
export interface ReadonlyHierarchyNode {
|
|
3
3
|
id: string;
|
|
4
4
|
childrenIds: ReadonlyArray<string>;
|
|
@@ -19,11 +19,11 @@ export interface ReadonlyHierarchy {
|
|
|
19
19
|
iterateBreadthFirst(callback: (node: ReadonlyHierarchyNode) => {
|
|
20
20
|
skipChildren?: boolean;
|
|
21
21
|
stopIteration?: boolean;
|
|
22
|
-
} |
|
|
22
|
+
} | undefined, startingNodeId?: string): void;
|
|
23
23
|
iterateDepthFirst(callback: (node: ReadonlyHierarchyNode) => {
|
|
24
24
|
skipChildren?: boolean;
|
|
25
25
|
stopIteration?: boolean;
|
|
26
|
-
} |
|
|
27
|
-
iterateParents(callback: (node: ReadonlyHierarchyNode) => boolean |
|
|
26
|
+
} | undefined, startingNodeId?: string): void;
|
|
27
|
+
iterateParents(callback: (node: ReadonlyHierarchyNode) => boolean | undefined, startingNodeId: string): void;
|
|
28
28
|
getPathToNode(nodeId: string): ReadonlyArray<ReadonlyHierarchyNode>;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Enumeration holding the selectable types for item selector.
|
|
3
3
|
*/
|
|
4
|
-
import { DocumentObjectType } from './DocumentObjectType';
|
|
5
|
-
import { PublicationObjectType } from './PublicationObjectType';
|
|
4
|
+
import type { DocumentObjectType } from './DocumentObjectType';
|
|
5
|
+
import type { PublicationObjectType } from './PublicationObjectType';
|
|
6
6
|
export type ItemSelectorObjectType = DocumentObjectType | PublicationObjectType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionExtensions } from './actionExtensions';
|
|
2
|
-
import { ExplorerActionExtension } from './explorerAction';
|
|
1
|
+
import type { ActionExtensions } from './actionExtensions';
|
|
2
|
+
import type { ExplorerActionExtension } from './explorerAction';
|
|
3
3
|
export declare class ActionExtensionsBuilder {
|
|
4
4
|
private _explorerActionExtensions;
|
|
5
5
|
addExplorerAction: <T>(item: ExplorerActionExtension<T>) => this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Content, Folder, ViewType, UserInfo } from "../../api";
|
|
1
|
+
import type { Content, Folder, ViewType, UserInfo } from "../../api";
|
|
2
2
|
export type ExplorerActionExtension<T> = () => ExplorerActionExtensionConfiguration<T>;
|
|
3
3
|
export interface ExplorerActionExtensionConfiguration<T = Content> {
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionExtensions } from './action';
|
|
1
|
+
import type { ActionExtensions } from './action';
|
|
2
2
|
import type { HeaderExtensions } from './header';
|
|
3
|
-
import { ObjectInsightExtensions } from './objectInsight';
|
|
3
|
+
import type { ObjectInsightExtensions } from './objectInsight';
|
|
4
4
|
import type { TranslationExtensions } from './translations';
|
|
5
5
|
export interface ExtensionPoints {
|
|
6
6
|
translations: TranslationExtensions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MainNavigationItemExtension } from './mainNavigationItem';
|
|
2
|
-
import { MainNavigationLinkExtension } from './mainNavigationLink';
|
|
2
|
+
import type { MainNavigationLinkExtension } from './mainNavigationLink';
|
|
3
3
|
export interface HeaderExtensions {
|
|
4
4
|
mainNavigationItems: ReadonlyArray<MainNavigationItemExtension>;
|
|
5
5
|
mainNavigationLinks: ReadonlyArray<MainNavigationLinkExtension>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HeaderExtensions } from './headerExtensions';
|
|
2
2
|
import type { MainNavigationItemExtension } from './mainNavigationItem';
|
|
3
|
-
import { MainNavigationLinkExtension } from './mainNavigationLink';
|
|
3
|
+
import type { MainNavigationLinkExtension } from './mainNavigationLink';
|
|
4
4
|
export declare class HeaderExtensionsBuilder {
|
|
5
5
|
private _mainNavigationItemExtensions;
|
|
6
6
|
private _mainNavigationLinkExtensions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Position, UserInfo } from "../../api";
|
|
1
|
+
import type { Position, UserInfo } from "../../api";
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
export type MainNavigationItemExtension = () => MainNavigationItemExtensionConfiguration;
|
|
4
4
|
export interface MainNavigationItemExtensionConfiguration {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserInfo } from "../../api";
|
|
1
|
+
import type { UserInfo } from "../../api";
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
export type MainNavigationLinkExtension = () => MainNavigationLinkExtensionConfiguration;
|
|
4
4
|
export interface MainNavigationLinkExtensionsPopupConfiguration {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ObjectInsightExtensions } from './objectInsightExtensions';
|
|
2
|
-
import { ObjectInsightItemExtension } from './objectInsightItem';
|
|
1
|
+
import type { ObjectInsightExtensions } from './objectInsightExtensions';
|
|
2
|
+
import type { ObjectInsightItemExtension } from './objectInsightItem';
|
|
3
3
|
export declare class ObjectInsightExtensionsBuilder {
|
|
4
4
|
private _objectInsightItemExtensions;
|
|
5
5
|
addObjectInsightItem: <T>(item: ObjectInsightItemExtension<T>) => this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Content, Folder, UserInfo, ViewType } from "../../api";
|
|
1
|
+
import type { Content, Folder, UserInfo, ViewType } from "../../api";
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
export type ObjectInsightItemExtension<T> = () => ObjectInsightItemExtensionConfiguration<T>;
|
|
4
4
|
export interface ObjectInsightItemExtensionConfiguration<T = Content> {
|
|
@@ -8,8 +8,8 @@ const createExtensionGlobals = () => {
|
|
|
8
8
|
};
|
|
9
9
|
return {
|
|
10
10
|
initialize,
|
|
11
|
-
t: (key, options) => extensionGlobals === null || extensionGlobals === void 0 ? void 0 : extensionGlobals.t(key, options),
|
|
12
|
-
configuration: () => extensionGlobals === null || extensionGlobals === void 0 ? void 0 : extensionGlobals.configuration(),
|
|
11
|
+
t: (key, options) => { var _a; return (_a = extensionGlobals === null || extensionGlobals === void 0 ? void 0 : extensionGlobals.t(key, options)) !== null && _a !== void 0 ? _a : ''; },
|
|
12
|
+
configuration: () => { var _a; return (_a = extensionGlobals === null || extensionGlobals === void 0 ? void 0 : extensionGlobals.configuration()) !== null && _a !== void 0 ? _a : {}; },
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
|
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tridion-docs/extensions",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Tridion Docs Extensions API",
|
|
5
5
|
"author": "RWS Group for and on behalf of its affiliates and subsidiaries",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -22,33 +22,33 @@
|
|
|
22
22
|
"release": "rollup -c",
|
|
23
23
|
"start": "rollup -c -w",
|
|
24
24
|
"start:remote": "yarn run start",
|
|
25
|
-
"lint": "
|
|
26
|
-
"lint:fix": "
|
|
25
|
+
"lint": "biome lint .",
|
|
26
|
+
"lint:fix": "biome lint . --write && biome format . --write",
|
|
27
27
|
"prepublish": "yarn build"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "18.3.1",
|
|
31
31
|
"react-dom": "18.3.1",
|
|
32
32
|
"react-is": "18.3.1",
|
|
33
|
-
"styled-components": "6.1.
|
|
33
|
+
"styled-components": "6.1.19"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@rollup/plugin-commonjs": "
|
|
36
|
+
"@rollup/plugin-commonjs": "29.0.0",
|
|
37
37
|
"@rollup/plugin-json": "6.1.0",
|
|
38
|
-
"@rollup/plugin-node-resolve": "16.0.
|
|
39
|
-
"@rollup/plugin-typescript": "12.
|
|
40
|
-
"@types/react": "18.3.
|
|
41
|
-
"@types/react-dom": "18.3.
|
|
38
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
39
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
40
|
+
"@types/react": "18.3.28",
|
|
41
|
+
"@types/react-dom": "18.3.7",
|
|
42
42
|
"@types/react-is": "18.3.1",
|
|
43
43
|
"react": "18.3.1",
|
|
44
44
|
"react-dom": "18.3.1",
|
|
45
45
|
"react-is": "18.3.1",
|
|
46
|
-
"rimraf": "6.
|
|
47
|
-
"rollup": "4.
|
|
48
|
-
"rollup-plugin-delete": "
|
|
49
|
-
"rollup-plugin-node-externals": "8.
|
|
50
|
-
"styled-components": "6.
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"typescript-transform-paths": "3.5.
|
|
46
|
+
"rimraf": "6.1.3",
|
|
47
|
+
"rollup": "4.57.1",
|
|
48
|
+
"rollup-plugin-delete": "3.0.2",
|
|
49
|
+
"rollup-plugin-node-externals": "8.1.2",
|
|
50
|
+
"styled-components": "6.3.11",
|
|
51
|
+
"typescript": "5.9.3",
|
|
52
|
+
"typescript-transform-paths": "3.5.6"
|
|
53
53
|
}
|
|
54
54
|
}
|