@tridion-docs/extensions 2.0.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 +13 -0
- package/LICENSE.md +1 -1
- package/README.md +139 -16
- 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 +3 -0
- package/dist/api/typings/UserInfo.d.ts +1 -1
- package/dist/api/typings/ViewType.d.ts +3 -2
- package/dist/api/typings/ViewType.js +2 -1
- package/dist/api/typings/index.d.ts +1 -0
- 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 +11 -2
- 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/frameworkInfo.js +1 -1
- package/dist/module/createExtensionGlobals.js +2 -2
- package/dist/package.json.js +5 -5
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @tridion-docs/extensions
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Added possibility to specify long label for action buttons.
|
|
14
|
+
- Added support for Translation Jobs, now extensions can be added to that view as well.
|
|
15
|
+
|
|
3
16
|
## 2.0.0
|
|
4
17
|
|
|
5
18
|
### Major Changes
|
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,11 +5,11 @@ 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
|
|
|
12
|
-
This version of the package is compatible with Tridion Docs 15.
|
|
12
|
+
This version of the package is compatible with Tridion Docs 15.2
|
|
13
13
|
|
|
14
14
|
# Upgrade instruction
|
|
15
15
|
|
|
@@ -21,26 +21,15 @@ 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.
|
|
24
|
+
"@tridion-docs/extensions": "2.1.1",
|
|
25
25
|
...
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
...
|
|
29
|
-
"@tridion-docs/extensions-cli": "2.
|
|
29
|
+
"@tridion-docs/extensions-cli": "2.1.1",
|
|
30
30
|
...
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
|
-
## Enums
|
|
34
|
-
|
|
35
|
-
`BaseFolder`, `DocumentObjectType`, `FolderType`, `PublicationObjectType` enums keys were changed from UPPERCASE to PascalCase.
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
// before
|
|
39
|
-
BaseFolder.EDITOR_TEMPLATE
|
|
40
|
-
|
|
41
|
-
// after
|
|
42
|
-
BaseFolder.EditorTemplate
|
|
43
|
-
```
|
|
44
33
|
|
|
45
34
|
# Documentation
|
|
46
35
|
|
|
@@ -124,7 +113,7 @@ export const CustomPage = () => {
|
|
|
124
113
|
|
|
125
114
|
The extension library provides hooks to assist with extension development.
|
|
126
115
|
|
|
127
|
-
##
|
|
116
|
+
## `useItemSelector`
|
|
128
117
|
|
|
129
118
|
The `useItemSelector` allows you to show dialog with a structured folder tree on the left side and the content of the folder on the right side. This dialog supposes to help you to select one of the multiple objects based on your configuration.
|
|
130
119
|
|
|
@@ -704,3 +693,137 @@ const getExtensionsBaseUrl = () => {
|
|
|
704
693
|
const baseUrl = getExtensionsBaseUrl();
|
|
705
694
|
const client = new Client(baseUrl);
|
|
706
695
|
```
|
|
696
|
+
|
|
697
|
+
# FAQ
|
|
698
|
+
**I want to use [useItemSelector](#useitemselector) inside [Antd Modal](https://ant.design/components/modal) component but I can't see popups and filters in item selector.**
|
|
699
|
+
|
|
700
|
+
This is a known issue caused by mixing two different UI frameworks. To resolve this issue, there are two approaches:
|
|
701
|
+
|
|
702
|
+
*Preferable way*
|
|
703
|
+
|
|
704
|
+
Reset the zIndex property for the Antd Modal and specify a custom container that positions it correctly relative to the ItemSelector.
|
|
705
|
+
|
|
706
|
+
```js
|
|
707
|
+
const popupContainer = useMemo(() => {
|
|
708
|
+
const container = document.createElement('div');
|
|
709
|
+
document.body.append(container);
|
|
710
|
+
return container;
|
|
711
|
+
}, []);
|
|
712
|
+
|
|
713
|
+
<Modal
|
|
714
|
+
zIndex={0}
|
|
715
|
+
getContainer={popupContainer}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
*Complete page example*
|
|
719
|
+
|
|
720
|
+
```js
|
|
721
|
+
import { Content, DocumentObjectType, useItemSelector } from '@tridion-docs/extensions';
|
|
722
|
+
import { useMemo, useState } from 'react';
|
|
723
|
+
import { Button, Modal } from 'antd';
|
|
724
|
+
|
|
725
|
+
export const CustomPage = () => {
|
|
726
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
727
|
+
|
|
728
|
+
const showModal = () => setIsModalOpen(true);
|
|
729
|
+
const handleOk = () => setIsModalOpen(false);
|
|
730
|
+
const handleCancel = () => setIsModalOpen(false);
|
|
731
|
+
|
|
732
|
+
const itemSelectorProps = {
|
|
733
|
+
objectTypesToSelect: [DocumentObjectType.Library],
|
|
734
|
+
isMultiSelect: false,
|
|
735
|
+
onOk: (selectedItems: Content[]) => console.log(selectedItems),
|
|
736
|
+
okLabel: 'ok',
|
|
737
|
+
cancelLabel: 'cancel',
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
const { execute: showItemSelector } = useItemSelector(itemSelectorProps);
|
|
741
|
+
|
|
742
|
+
const popupContainer = useMemo(() => {
|
|
743
|
+
const container = document.createElement('div');
|
|
744
|
+
document.body.append(container);
|
|
745
|
+
return container;
|
|
746
|
+
}, []);
|
|
747
|
+
|
|
748
|
+
return (
|
|
749
|
+
<>
|
|
750
|
+
<Button type="primary" onClick={showModal}>Open Modal </Button>
|
|
751
|
+
<Modal
|
|
752
|
+
title="Basic Modal"
|
|
753
|
+
open={isModalOpen}
|
|
754
|
+
onOk={handleOk}
|
|
755
|
+
onCancel={handleCancel}
|
|
756
|
+
zIndex={0}
|
|
757
|
+
getContainer={popupContainer}
|
|
758
|
+
>
|
|
759
|
+
<Button onClick={showItemSelector}>show</Button>
|
|
760
|
+
</Modal>
|
|
761
|
+
</>
|
|
762
|
+
);
|
|
763
|
+
};
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
*Alternative way*
|
|
767
|
+
|
|
768
|
+
If you prefer a simpler fix, you can use CSS to globally adjust the z-index for popups. However, this may cause issues with other components and is less reliable across different library versions.
|
|
769
|
+
|
|
770
|
+
```js
|
|
771
|
+
import { Content, DocumentObjectType, useItemSelector } from '@tridion-docs/extensions';
|
|
772
|
+
import { useState } from 'react';
|
|
773
|
+
|
|
774
|
+
import { Button, Modal } from 'antd';
|
|
775
|
+
|
|
776
|
+
import './CustomPage.module.css';
|
|
777
|
+
|
|
778
|
+
export const CustomPage = () => {
|
|
779
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
780
|
+
|
|
781
|
+
const showModal = () => setIsModalOpen(true);
|
|
782
|
+
const handleOk = () => setIsModalOpen(false);
|
|
783
|
+
const handleCancel = () => setIsModalOpen(false);
|
|
784
|
+
|
|
785
|
+
const itemSelectorProps = {
|
|
786
|
+
objectTypesToSelect: [DocumentObjectType.Library],
|
|
787
|
+
isMultiSelect: false,
|
|
788
|
+
onOk: (selectedItems: Content[]) => console.log(selectedItems),
|
|
789
|
+
okLabel: 'ok',
|
|
790
|
+
cancelLabel: 'cancel',
|
|
791
|
+
modalZindex: 1002
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
const { execute: showItemSelector } = useItemSelector(itemSelectorProps);
|
|
795
|
+
|
|
796
|
+
return (
|
|
797
|
+
<>
|
|
798
|
+
<Button type="primary" onClick={showModal}>Open Modal </Button>
|
|
799
|
+
<Modal
|
|
800
|
+
title="Basic Modal"
|
|
801
|
+
open={isModalOpen}
|
|
802
|
+
onOk={handleOk}
|
|
803
|
+
onCancel={handleCancel}
|
|
804
|
+
>
|
|
805
|
+
<Button onClick={showItemSelector}>show</Button>
|
|
806
|
+
</Modal>
|
|
807
|
+
</>
|
|
808
|
+
);
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
```css
|
|
815
|
+
/* CustomPage.module.css */
|
|
816
|
+
|
|
817
|
+
div[data-test~='popup'] {
|
|
818
|
+
z-index: 9999;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
body > div > div[class*='ant-select-dropdown'] {
|
|
822
|
+
z-index: 10000;
|
|
823
|
+
}
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
*Note:* This solution applies globally, affecting all popups on the page. It is not guaranteed to work consistently across future releases, as the CSS selector may change.
|
|
829
|
+
|
|
@@ -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
1
|
/**
|
|
2
|
-
* Indicates in which part of the UI object insight panel is visible
|
|
2
|
+
* Indicates in which part of the UI object insight panel or action button is visible
|
|
3
3
|
*
|
|
4
4
|
* @export
|
|
5
5
|
* @enum {number}
|
|
@@ -10,5 +10,6 @@ export declare enum ViewType {
|
|
|
10
10
|
search = "Search",
|
|
11
11
|
inbox = "Inbox",
|
|
12
12
|
project = "Project",
|
|
13
|
-
projectAssignee = "ProjectAssignee"
|
|
13
|
+
projectAssignee = "ProjectAssignee",
|
|
14
|
+
translationJobs = "TranslationJobs"
|
|
14
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Indicates in which part of the UI object insight panel is visible
|
|
2
|
+
* Indicates in which part of the UI object insight panel or action button is visible
|
|
3
3
|
*
|
|
4
4
|
* @export
|
|
5
5
|
* @enum {number}
|
|
@@ -12,6 +12,7 @@ var ViewType;
|
|
|
12
12
|
ViewType["inbox"] = "Inbox";
|
|
13
13
|
ViewType["project"] = "Project";
|
|
14
14
|
ViewType["projectAssignee"] = "ProjectAssignee";
|
|
15
|
+
ViewType["translationJobs"] = "TranslationJobs";
|
|
15
16
|
})(ViewType || (ViewType = {}));
|
|
16
17
|
|
|
17
18
|
export { ViewType };
|
|
@@ -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,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Content, Folder, ViewType, UserInfo } from "../../api";
|
|
1
|
+
import type { Content, Folder, ViewType, UserInfo } from "../../api";
|
|
3
2
|
export type ExplorerActionExtension<T> = () => ExplorerActionExtensionConfiguration<T>;
|
|
4
3
|
export interface ExplorerActionExtensionConfiguration<T = Content> {
|
|
5
4
|
/**
|
|
@@ -16,10 +15,20 @@ export interface ExplorerActionExtensionConfiguration<T = Content> {
|
|
|
16
15
|
readonly tooltip: string;
|
|
17
16
|
/**
|
|
18
17
|
* Action button label
|
|
18
|
+
* used to show the label when the button is under a group button
|
|
19
|
+
* and in other places if a long label is not set
|
|
19
20
|
*
|
|
20
21
|
* @type {string}
|
|
21
22
|
*/
|
|
22
23
|
readonly label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Action button long label,
|
|
26
|
+
* used to show the label when the button is outside of a group
|
|
27
|
+
* or under a more button
|
|
28
|
+
*
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
readonly longLabel?: string;
|
|
23
32
|
/**
|
|
24
33
|
* Action button icon (SVG)
|
|
25
34
|
*
|
|
@@ -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> {
|
package/dist/frameworkInfo.js
CHANGED
|
@@ -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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const version = "2.
|
|
1
|
+
const version = "2.1.1";
|
|
2
2
|
const peerDependencies = {
|
|
3
|
-
react: "
|
|
4
|
-
"react-dom": "
|
|
5
|
-
"react-is": "
|
|
6
|
-
"styled-components": "
|
|
3
|
+
react: "18.3.1",
|
|
4
|
+
"react-dom": "18.3.1",
|
|
5
|
+
"react-is": "18.3.1",
|
|
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.
|
|
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
|
-
"react": "
|
|
31
|
-
"react-dom": "
|
|
32
|
-
"react-is": "
|
|
33
|
-
"styled-components": "
|
|
30
|
+
"react": "18.3.1",
|
|
31
|
+
"react-dom": "18.3.1",
|
|
32
|
+
"react-is": "18.3.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": "
|
|
39
|
-
"@rollup/plugin-typescript": "
|
|
40
|
-
"@types/react": "18.
|
|
41
|
-
"@types/react-dom": "18.
|
|
42
|
-
"@types/react-is": "18.
|
|
43
|
-
"react": "18.
|
|
44
|
-
"react-dom": "18.
|
|
45
|
-
"react-is": "18.
|
|
46
|
-
"rimraf": "
|
|
47
|
-
"rollup": "4.
|
|
48
|
-
"rollup-plugin-delete": "
|
|
49
|
-
"rollup-plugin-node-externals": "
|
|
50
|
-
"styled-components": "6.
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"typescript-transform-paths": "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
|
+
"@types/react-is": "18.3.1",
|
|
43
|
+
"react": "18.3.1",
|
|
44
|
+
"react-dom": "18.3.1",
|
|
45
|
+
"react-is": "18.3.1",
|
|
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
|
}
|