@tridion-docs/extensions 2.1.0 → 2.1.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +3 -3
  4. package/dist/api/hooks/folderSelector.d.ts +2 -2
  5. package/dist/api/hooks/itemSelector.d.ts +1 -1
  6. package/dist/api/hooks/notification.d.ts +1 -1
  7. package/dist/api/hooks/repositoryFolderRefresh.d.ts +1 -1
  8. package/dist/api/hooks/repositoryObjectDetailsRefresh.d.ts +1 -1
  9. package/dist/api/hooks/repositoryObjectRefresh.d.ts +1 -1
  10. package/dist/api/hooks/searchResultObjectsRefresh.d.ts +2 -2
  11. package/dist/api/hooks/userProfile.d.ts +1 -1
  12. package/dist/api/typings/Content.d.ts +2 -2
  13. package/dist/api/typings/FrontendAddon.d.ts +1 -1
  14. package/dist/api/typings/FrontendAddons.d.ts +1 -1
  15. package/dist/api/typings/FrontendExtension.d.ts +1 -1
  16. package/dist/api/typings/Hierarchy.d.ts +4 -4
  17. package/dist/api/typings/ItemSelectorObjectType.d.ts +2 -2
  18. package/dist/api/typings/Notification.d.ts +1 -1
  19. package/dist/api/typings/Project.d.ts +1 -1
  20. package/dist/api/typings/TranslationJob.d.ts +1 -1
  21. package/dist/api/typings/UserInfo.d.ts +1 -1
  22. package/dist/apiStorage/useApiStorage.d.ts +1 -1
  23. package/dist/extensionPoints/action/actionExtensions.d.ts +1 -1
  24. package/dist/extensionPoints/action/actionExtensionsBuilder.d.ts +2 -2
  25. package/dist/extensionPoints/action/explorerAction.d.ts +1 -1
  26. package/dist/extensionPoints/extensionPoints.d.ts +2 -2
  27. package/dist/extensionPoints/header/headerExtensions.d.ts +1 -1
  28. package/dist/extensionPoints/header/headerExtensionsBuilder.d.ts +1 -1
  29. package/dist/extensionPoints/header/mainNavigationItem.d.ts +1 -1
  30. package/dist/extensionPoints/header/mainNavigationLink.d.ts +1 -1
  31. package/dist/extensionPoints/objectInsight/objectInsightExtensions.d.ts +1 -1
  32. package/dist/extensionPoints/objectInsight/objectInsightExtensionsBuilder.d.ts +2 -2
  33. package/dist/extensionPoints/objectInsight/objectInsightItem.d.ts +1 -1
  34. package/dist/module/createExtensionGlobals.js +2 -2
  35. package/dist/package.json.js +2 -2
  36. package/package.json +16 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tridion-docs/extensions
2
2
 
3
+ ## 2.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 2.1.0
4
16
 
5
17
  ### Minor Changes
package/LICENSE.md CHANGED
@@ -1,2 +1,2 @@
1
1
  License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
2
- Copyright © 2024 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
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 © 2024 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
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.0",
24
+ "@tridion-docs/extensions": "2.1.1",
25
25
  ...
26
26
  },
27
27
  "devDependencies": {
28
28
  ...
29
- "@tridion-docs/extensions-cli": "2.1.0",
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
@@ -1,4 +1,4 @@
1
- import { ItemSelectorObjectType } from "../typings/ItemSelectorObjectType";
1
+ import type { ItemSelectorObjectType } from "../typings/ItemSelectorObjectType";
2
2
  export interface ItemSelectorHookResult {
3
3
  /**
4
4
  *
@@ -1,4 +1,4 @@
1
- import { MessageSeverity, NotificationProps } from "..";
1
+ import type { MessageSeverity, NotificationProps } from "..";
2
2
  export interface NotificationHookResult {
3
3
  /**
4
4
  * Function that will show notification on the page
@@ -1,4 +1,4 @@
1
- import { Content } from "..";
1
+ import type { Content } from "..";
2
2
  export interface RepositoryFolderRefreshHookResult {
3
3
  /**
4
4
  * Function to trigger refresh of folder
@@ -5,7 +5,7 @@ export interface RepositoryObjectDetailsRefreshHookResult {
5
5
  * @memberof RepositoryObjectDetailsRefreshHookResult
6
6
  * @returns {Promise<Content | null>}
7
7
  */
8
- execute: () => Promise<void | null>;
8
+ execute: () => Promise<undefined | null>;
9
9
  }
10
10
  export type RepositoryObjectDetailsRefreshHook = () => RepositoryObjectDetailsRefreshHookResult;
11
11
  /**
@@ -1,4 +1,4 @@
1
- import { Content } from "..";
1
+ import type { Content } from "..";
2
2
  export interface RepositoryObjectRefreshHookResult {
3
3
  /**
4
4
  * Function to trigger item refresh
@@ -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<void | null>;
9
+ execute: () => Promise<undefined | null>;
10
10
  }
11
11
  export interface SearchResultObjectsRefreshProps {
12
12
  /**
@@ -1,4 +1,4 @@
1
- import { UserInfo } from "../typings/UserInfo";
1
+ import type { UserInfo } from "../typings/UserInfo";
2
2
  export interface UserProfileHookResult {
3
3
  /**
4
4
  * Function to get current logged on user information
@@ -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,6 +1,6 @@
1
1
  import type { FrontendExtension } from './FrontendExtension';
2
2
  /**
3
- * Model as returned by the /api/extensions call
3
+ * Model describing a frontend addon
4
4
  */
5
5
  export type FrontendAddon<Id extends string = string, Configuration extends object = any> = {
6
6
  readonly $type: string;
@@ -1,5 +1,5 @@
1
1
  import type { FrontendAddon } from './FrontendAddon';
2
2
  /**
3
- * Model as returned by the /api/extensions call
3
+ * * Model describing a frontend addon
4
4
  */
5
5
  export type FrontendAddons = FrontendAddon[];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Model as returned by the /api/extensions call
2
+ * Model describing a frontend addon
3
3
  */
4
4
  export type FrontendExtension = {
5
5
  readonly $type: string;
@@ -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
- } | void, startingNodeId?: string): void;
22
+ } | undefined, startingNodeId?: string): void;
23
23
  iterateDepthFirst(callback: (node: ReadonlyHierarchyNode) => {
24
24
  skipChildren?: boolean;
25
25
  stopIteration?: boolean;
26
- } | void, startingNodeId?: string): void;
27
- iterateParents(callback: (node: ReadonlyHierarchyNode) => boolean | void, startingNodeId: string): void;
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,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  export interface NotificationProps {
3
3
  /**
4
4
  * The title of notification box
@@ -1,4 +1,4 @@
1
- import { BaseObject } from './BaseObject';
1
+ import type { BaseObject } from './BaseObject';
2
2
  export interface Project extends BaseObject {
3
3
  /** The element name of the project. */
4
4
  projectId?: string;
@@ -1,3 +1,3 @@
1
- import { BaseObject } from './BaseObject';
1
+ import type { BaseObject } from './BaseObject';
2
2
  export interface TranslationJob extends BaseObject {
3
3
  }
@@ -1,4 +1,4 @@
1
- import { LovValue } from './LovValue';
1
+ import type { LovValue } from './LovValue';
2
2
  export interface UserInfo {
3
3
  /**
4
4
  * User name
@@ -1,4 +1,4 @@
1
- import { ExtensionApiComponents, ExtensionApiHooks } from './extensionApi';
1
+ import type { ExtensionApiComponents, ExtensionApiHooks } from './extensionApi';
2
2
  /**
3
3
  * Hook to get available extension components
4
4
  *
@@ -1,4 +1,4 @@
1
- import { ExplorerActionExtension } from './explorerAction';
1
+ import type { ExplorerActionExtension } from './explorerAction';
2
2
  export interface ActionExtensions {
3
3
  explorerActions: ReadonlyArray<ExplorerActionExtension<any>>;
4
4
  }
@@ -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,4 +1,4 @@
1
- import { ObjectInsightItemExtension } from './objectInsightItem';
1
+ import type { ObjectInsightItemExtension } from './objectInsightItem';
2
2
  export interface ObjectInsightExtensions {
3
3
  objectInsightItems: ReadonlyArray<ObjectInsightItemExtension<any>>;
4
4
  }
@@ -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
 
@@ -1,9 +1,9 @@
1
- const version = "2.1.0";
1
+ const version = "2.1.2";
2
2
  const peerDependencies = {
3
3
  react: "18.3.1",
4
4
  "react-dom": "18.3.1",
5
5
  "react-is": "18.3.1",
6
- "styled-components": "6.1.15"
6
+ "styled-components": "6.1.19"
7
7
  };
8
8
 
9
9
  export { peerDependencies, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tridion-docs/extensions",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
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": "eslint .",
26
- "lint:fix": "eslint . --fix && prettier --write \"src/**/*\"",
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.15"
33
+ "styled-components": "6.1.19"
34
34
  },
35
35
  "devDependencies": {
36
- "@rollup/plugin-commonjs": "28.0.2",
36
+ "@rollup/plugin-commonjs": "29.0.0",
37
37
  "@rollup/plugin-json": "6.1.0",
38
- "@rollup/plugin-node-resolve": "16.0.0",
39
- "@rollup/plugin-typescript": "12.1.2",
40
- "@types/react": "18.3.18",
41
- "@types/react-dom": "18.3.5",
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.0.1",
47
- "rollup": "4.34.8",
48
- "rollup-plugin-delete": "2.1.0",
49
- "rollup-plugin-node-externals": "8.0.0",
50
- "styled-components": "6.1.15",
51
- "typescript": "5.7.3",
52
- "typescript-transform-paths": "3.5.3"
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
  }