@tridion-sites/extensions 0.5.2 → 0.5.4
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 +22 -0
- package/dist/index.d.ts +450 -168
- package/dist/index.js +104 -33
- package/package.json +5 -12
package/dist/index.js
CHANGED
|
@@ -293,20 +293,17 @@ class ActionsConfigurationExtensionsBuilder {
|
|
|
293
293
|
}
|
|
294
294
|
});
|
|
295
295
|
/**
|
|
296
|
-
* Removes action from the group(s).
|
|
296
|
+
* Removes action from the group(s).
|
|
297
297
|
*
|
|
298
298
|
* @param actionId - id of the action to be removed
|
|
299
|
-
* @param groupId - id of the group in which the removal will occur
|
|
300
299
|
*/
|
|
301
300
|
Object.defineProperty(this, "removeAction", {
|
|
302
301
|
enumerable: true,
|
|
303
302
|
configurable: true,
|
|
304
303
|
writable: true,
|
|
305
|
-
value: (actionId
|
|
304
|
+
value: (actionId) => {
|
|
306
305
|
this._groupListBuilder.customize(configuration => {
|
|
307
306
|
configuration.forEach(group => {
|
|
308
|
-
if (groupId && group.id !== groupId)
|
|
309
|
-
return;
|
|
310
307
|
removeItem({
|
|
311
308
|
getItemId: item => item,
|
|
312
309
|
itemId: actionId,
|
|
@@ -317,21 +314,18 @@ class ActionsConfigurationExtensionsBuilder {
|
|
|
317
314
|
}
|
|
318
315
|
});
|
|
319
316
|
/**
|
|
320
|
-
* Replaces an action with a new action id in the group(s).
|
|
317
|
+
* Replaces an action with a new action id in the group(s).
|
|
321
318
|
*
|
|
322
319
|
* @param actionId - id of the action to be replaced
|
|
323
320
|
* @param newActionId - id of the new action
|
|
324
|
-
* @param groupId - id of the group in which the replacement will occur
|
|
325
321
|
*/
|
|
326
322
|
Object.defineProperty(this, "replaceAction", {
|
|
327
323
|
enumerable: true,
|
|
328
324
|
configurable: true,
|
|
329
325
|
writable: true,
|
|
330
|
-
value: (actionId, newActionId
|
|
326
|
+
value: (actionId, newActionId) => {
|
|
331
327
|
this._groupListBuilder.customize(configuration => {
|
|
332
328
|
configuration.forEach(group => {
|
|
333
|
-
if (groupId && group.id !== groupId)
|
|
334
|
-
return;
|
|
335
329
|
replaceItem({
|
|
336
330
|
getItemId: item => item,
|
|
337
331
|
itemId: actionId,
|
|
@@ -342,6 +336,34 @@ class ActionsConfigurationExtensionsBuilder {
|
|
|
342
336
|
});
|
|
343
337
|
}
|
|
344
338
|
});
|
|
339
|
+
/**
|
|
340
|
+
* Moves an action withing other actions in the same (or other) group(s).
|
|
341
|
+
*
|
|
342
|
+
* @param actionId - id of the action to be moved
|
|
343
|
+
* @param beforeActionId - id of the action before which the moved action will be inserted
|
|
344
|
+
*/
|
|
345
|
+
Object.defineProperty(this, "moveAction", {
|
|
346
|
+
enumerable: true,
|
|
347
|
+
configurable: true,
|
|
348
|
+
writable: true,
|
|
349
|
+
value: (actionId, beforeActionId) => {
|
|
350
|
+
this._groupListBuilder.customize(configuration => {
|
|
351
|
+
configuration.forEach(group => {
|
|
352
|
+
removeItem({
|
|
353
|
+
getItemId: item => item,
|
|
354
|
+
itemId: actionId,
|
|
355
|
+
list: group.actionIds,
|
|
356
|
+
});
|
|
357
|
+
addItem({
|
|
358
|
+
list: group.actionIds,
|
|
359
|
+
getItemId: item => item,
|
|
360
|
+
newItem: actionId,
|
|
361
|
+
beforeItemId: beforeActionId,
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
});
|
|
345
367
|
Object.defineProperty(this, "build", {
|
|
346
368
|
enumerable: true,
|
|
347
369
|
configurable: true,
|
|
@@ -918,6 +940,20 @@ const extensionApiBridge = {
|
|
|
918
940
|
get: () => implementationStorage,
|
|
919
941
|
};
|
|
920
942
|
|
|
943
|
+
/**
|
|
944
|
+
* @public
|
|
945
|
+
*/
|
|
946
|
+
const useActivitiesExplorer = () => {
|
|
947
|
+
const useActivitiesExplorer = extensionApiBridge.get().activitiesExplorer.hooks.useActivitiesExplorer;
|
|
948
|
+
return useActivitiesExplorer();
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* @public
|
|
952
|
+
*/
|
|
953
|
+
const useOptionalActivitiesExplorer = () => {
|
|
954
|
+
const useOptionalActivitiesExplorer = extensionApiBridge.get().activitiesExplorer.hooks.useOptionalActivitiesExplorer;
|
|
955
|
+
return useOptionalActivitiesExplorer();
|
|
956
|
+
};
|
|
921
957
|
/**
|
|
922
958
|
* @public
|
|
923
959
|
*/
|
|
@@ -925,6 +961,13 @@ const useActivitiesExplorerTable = () => {
|
|
|
925
961
|
const useActivitiesExplorerTable = extensionApiBridge.get().activitiesExplorer.hooks.useActivitiesExplorerTable;
|
|
926
962
|
return useActivitiesExplorerTable();
|
|
927
963
|
};
|
|
964
|
+
/**
|
|
965
|
+
* @public
|
|
966
|
+
*/
|
|
967
|
+
const useOptionalActivitiesExplorerTable = () => {
|
|
968
|
+
const useOptionalActivitiesExplorerTable = extensionApiBridge.get().activitiesExplorer.hooks.useOptionalActivitiesExplorerTable;
|
|
969
|
+
return useOptionalActivitiesExplorerTable();
|
|
970
|
+
};
|
|
928
971
|
|
|
929
972
|
/**
|
|
930
973
|
* @public
|
|
@@ -933,6 +976,13 @@ const useContentExplorer = () => {
|
|
|
933
976
|
const useContentExplorer = extensionApiBridge.get().contentExplorer.hooks.useContentExplorer;
|
|
934
977
|
return useContentExplorer();
|
|
935
978
|
};
|
|
979
|
+
/**
|
|
980
|
+
* @public
|
|
981
|
+
*/
|
|
982
|
+
const useOptionalContentExplorer = () => {
|
|
983
|
+
const useOptionalContentExplorer = extensionApiBridge.get().contentExplorer.hooks.useOptionalContentExplorer;
|
|
984
|
+
return useOptionalContentExplorer();
|
|
985
|
+
};
|
|
936
986
|
/**
|
|
937
987
|
* @public
|
|
938
988
|
*/
|
|
@@ -940,6 +990,13 @@ const useContentExplorerTable = () => {
|
|
|
940
990
|
const useContentExplorerTable = extensionApiBridge.get().contentExplorer.hooks.useContentExplorerTable;
|
|
941
991
|
return useContentExplorerTable();
|
|
942
992
|
};
|
|
993
|
+
/**
|
|
994
|
+
* @public
|
|
995
|
+
*/
|
|
996
|
+
const useOptionalContentExplorerTable = () => {
|
|
997
|
+
const useOptionalContentExplorerTable = extensionApiBridge.get().contentExplorer.hooks.useOptionalContentExplorerTable;
|
|
998
|
+
return useOptionalContentExplorerTable();
|
|
999
|
+
};
|
|
943
1000
|
/**
|
|
944
1001
|
* @public
|
|
945
1002
|
*/
|
|
@@ -947,6 +1004,13 @@ const useContentExplorerTree = () => {
|
|
|
947
1004
|
const useContentExplorerTree = extensionApiBridge.get().contentExplorer.hooks.useContentExplorerTree;
|
|
948
1005
|
return useContentExplorerTree();
|
|
949
1006
|
};
|
|
1007
|
+
/**
|
|
1008
|
+
* @public
|
|
1009
|
+
*/
|
|
1010
|
+
const useOptionalContentExplorerTree = () => {
|
|
1011
|
+
const useOptionalContentExplorerTree = extensionApiBridge.get().contentExplorer.hooks.useOptionalContentExplorerTree;
|
|
1012
|
+
return useOptionalContentExplorerTree();
|
|
1013
|
+
};
|
|
950
1014
|
|
|
951
1015
|
/**
|
|
952
1016
|
* @public
|
|
@@ -999,51 +1063,58 @@ const useEditor = () => {
|
|
|
999
1063
|
/**
|
|
1000
1064
|
* @public
|
|
1001
1065
|
*/
|
|
1002
|
-
const
|
|
1003
|
-
const
|
|
1004
|
-
return
|
|
1066
|
+
const useOptionalEditor = () => {
|
|
1067
|
+
const useOptionalEditor = extensionApiBridge.get().editors.hooks.useOptionalEditor;
|
|
1068
|
+
return useOptionalEditor();
|
|
1069
|
+
};
|
|
1070
|
+
/**
|
|
1071
|
+
* @public
|
|
1072
|
+
*/
|
|
1073
|
+
const useOptionalBundleEditor = () => {
|
|
1074
|
+
const useOptionalBundleEditor = extensionApiBridge.get().editors.bundleEditor.hooks.useOptionalBundleEditor;
|
|
1075
|
+
return useOptionalBundleEditor();
|
|
1005
1076
|
};
|
|
1006
1077
|
/**
|
|
1007
1078
|
* @public
|
|
1008
1079
|
*/
|
|
1009
|
-
const
|
|
1010
|
-
const
|
|
1011
|
-
return
|
|
1080
|
+
const useOptionalComponentEditor = () => {
|
|
1081
|
+
const useOptionalComponentEditor = extensionApiBridge.get().editors.componentEditor.hooks.useOptionalComponentEditor;
|
|
1082
|
+
return useOptionalComponentEditor();
|
|
1012
1083
|
};
|
|
1013
1084
|
/**
|
|
1014
1085
|
* @public
|
|
1015
1086
|
*/
|
|
1016
|
-
const
|
|
1017
|
-
const
|
|
1018
|
-
return
|
|
1087
|
+
const useOptionalCategoryEditor = () => {
|
|
1088
|
+
const useOptionalCategoryEditor = extensionApiBridge.get().editors.categoryEditor.hooks.useOptionalCategoryEditor;
|
|
1089
|
+
return useOptionalCategoryEditor();
|
|
1019
1090
|
};
|
|
1020
1091
|
/**
|
|
1021
1092
|
* @public
|
|
1022
1093
|
*/
|
|
1023
|
-
const
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
1094
|
+
const useOptionalFolderEditor = () => {
|
|
1095
|
+
const useOptionalFolderEditor = extensionApiBridge.get().editors.folderEditor.hooks.useOptionalFolderEditor;
|
|
1096
|
+
return useOptionalFolderEditor();
|
|
1026
1097
|
};
|
|
1027
1098
|
/**
|
|
1028
1099
|
* @public
|
|
1029
1100
|
*/
|
|
1030
|
-
const
|
|
1031
|
-
const
|
|
1032
|
-
return
|
|
1101
|
+
const useOptionalKeywordEditor = () => {
|
|
1102
|
+
const useOptionalKeywordEditor = extensionApiBridge.get().editors.keywordEditor.hooks.useOptionalKeywordEditor;
|
|
1103
|
+
return useOptionalKeywordEditor();
|
|
1033
1104
|
};
|
|
1034
1105
|
/**
|
|
1035
1106
|
* @public
|
|
1036
1107
|
*/
|
|
1037
|
-
const
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1108
|
+
const useOptionalPageEditor = () => {
|
|
1109
|
+
const useOptionalPageEditor = extensionApiBridge.get().editors.pageEditor.hooks.useOptionalPageEditor;
|
|
1110
|
+
return useOptionalPageEditor();
|
|
1040
1111
|
};
|
|
1041
1112
|
/**
|
|
1042
1113
|
* @public
|
|
1043
1114
|
*/
|
|
1044
|
-
const
|
|
1045
|
-
const
|
|
1046
|
-
return
|
|
1115
|
+
const useOptionalStructureGroupEditor = () => {
|
|
1116
|
+
const useOptionalStructureGroupEditor = extensionApiBridge.get().editors.structureGroupEditor.hooks.useOptionalStructureGroupEditor;
|
|
1117
|
+
return useOptionalStructureGroupEditor();
|
|
1047
1118
|
};
|
|
1048
1119
|
|
|
1049
1120
|
/**
|
|
@@ -1658,7 +1729,7 @@ const createExtensionGlobals = () => {
|
|
|
1658
1729
|
};
|
|
1659
1730
|
};
|
|
1660
1731
|
|
|
1661
|
-
const version = "0.5.
|
|
1732
|
+
const version = "0.5.4";
|
|
1662
1733
|
const peerDependencies = {
|
|
1663
1734
|
"@tridion-sites/models": "workspace:*",
|
|
1664
1735
|
"@tridion-sites/open-api-client": "workspace:*",
|
|
@@ -1677,4 +1748,4 @@ const frameworkInfo = {
|
|
|
1677
1748
|
peerDependencies,
|
|
1678
1749
|
};
|
|
1679
1750
|
|
|
1680
|
-
export { ActionsConfigurationExtensionsBuilder, ActivitiesExplorerExtensionsBuilder, ActivitiesExplorerTableExtensionsBuilder, Block, Button, Center, ContentEditorExtensionsBuilder, ContentExplorerExtensionsBuilder, ContentExplorerTableExtensionsBuilder, ContentExplorerTreeExtensionsBuilder, ExtensionBuilder, Flex, HeaderExtensionsBuilder, Icon, Link, NavigationExtensionsBuilder, RichTextFieldExtensionsBuilder, Stack, Text, TextLink, TranslationExtensionsBuilder, activitiesExplorerActionGroupId, activitiesExplorerActionGroupIds, activitiesExplorerActionId, activitiesExplorerActionIds, contentExplorerActionGroupId, contentExplorerActionGroupIds, contentExplorerActionId, contentExplorerActionIds, contentExplorerPanelIds, createExtensionGlobals, extensionApiBridge, frameworkInfo, getBorderRadius, getColorPalette, getOpacityLevel, getSpacing, getTransitionDuration, getZIndex, isFavoritesNodeId, isItemNode, isItemNodeOfType, isItemsInProgressNode, isItemsInProgressNodeId, isPublicationsNode, isPublicationsNodeId, isRootNode, isRootNodeId, isSystemNode, navigationItemId, navigationItemIds, useActivitiesExplorerTable, useActivityInstancesQuery, useAddToBundleMutation, useAssignActivitiesMutation, useAssignActivityMutation, useAutoClassifyItemMutation, useAutoClassifyItemsMutation,
|
|
1751
|
+
export { ActionsConfigurationExtensionsBuilder, ActivitiesExplorerExtensionsBuilder, ActivitiesExplorerTableExtensionsBuilder, Block, Button, Center, ContentEditorExtensionsBuilder, ContentExplorerExtensionsBuilder, ContentExplorerTableExtensionsBuilder, ContentExplorerTreeExtensionsBuilder, ExtensionBuilder, Flex, HeaderExtensionsBuilder, Icon, Link, NavigationExtensionsBuilder, RichTextFieldExtensionsBuilder, Stack, Text, TextLink, TranslationExtensionsBuilder, activitiesExplorerActionGroupId, activitiesExplorerActionGroupIds, activitiesExplorerActionId, activitiesExplorerActionIds, contentExplorerActionGroupId, contentExplorerActionGroupIds, contentExplorerActionId, contentExplorerActionIds, contentExplorerPanelIds, createExtensionGlobals, extensionApiBridge, frameworkInfo, getBorderRadius, getColorPalette, getOpacityLevel, getSpacing, getTransitionDuration, getZIndex, isFavoritesNodeId, isItemNode, isItemNodeOfType, isItemsInProgressNode, isItemsInProgressNodeId, isPublicationsNode, isPublicationsNodeId, isRootNode, isRootNodeId, isSystemNode, navigationItemId, navigationItemIds, useActivitiesExplorer, useActivitiesExplorerTable, useActivityInstancesQuery, useAddToBundleMutation, useAssignActivitiesMutation, useAssignActivityMutation, useAutoClassifyItemMutation, useAutoClassifyItemsMutation, useChangeUserLanguageMutation, useChangeUserLocaleMutation, useConfirmation, useContentExplorer, useContentExplorerTable, useContentExplorerTree, useCopyItemMutation, useCopyItemsMutation, useCreateTranslationJobMutation, useDefaultTranslationJobQuery, useDeleteItemMutation, useDeleteItemsMutation, useEditor, useFavoritesQuery, useFinishActivitiesMutation, useFinishActivityMutation, useFinishEditingItemMutation, useFinishEditingItemsMutation, useItemBlueprintHierarchyQuery, useItemChildrenQuery, useItemClassifiedItemsQuery, useItemDefaultDataQuery, useItemHistoryQuery, useItemPublishUrlsQuery, useItemPublishedPagesQuery, useItemPublishedToQuery, useItemQuery, useItemTranslationInfoQuery, useItemUsedByQuery, useItemUsesQuery, useItemsInProgressQuery, useItemsQuery, useItemsToPublishQuery, useItemsToUnpublishQuery, useLocalizeItemMutation, useLocalizeItemsMutation, useMoveItemMutation, useMoveItemsMutation, useNotifications, useOptionalActivitiesExplorer, useOptionalActivitiesExplorerTable, useOptionalBundleEditor, useOptionalCategoryEditor, useOptionalComponentEditor, useOptionalContentExplorer, useOptionalContentExplorerTable, useOptionalContentExplorerTree, useOptionalEditor, useOptionalFolderEditor, useOptionalKeywordEditor, useOptionalPageEditor, useOptionalStructureGroupEditor, usePublicationBlueprintHierarchyQuery, usePublicationsQuery, usePublishItemsMutation, usePublishableTargetTypesQuery, useRemoveFromBundleMutation, useRestartActivitiesMutation, useRestartActivityMutation, useRevertItemMutation, useRevertItemsMutation, useRollbackItemMutation, useSearchInContainerQuery, useStartActivitiesMutation, useStartActivityMutation, useStartWorkflowMutation, useSystemSearchQuery, useUnlocalizeItemMutation, useUnlocalizeItemsMutation, useUnpublishItemsMutation, useUpdateItemMutation, useUploadMultimediaMutation, useUserGroupsQuery, useUserProfile, useUserProfileQuery, useUsersQuery };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tridion-sites/extensions",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Tridion Sites Extensions API",
|
|
5
5
|
"author": "RWS",
|
|
6
6
|
"homepage": "https://www.rws.com",
|
|
@@ -10,13 +10,6 @@
|
|
|
10
10
|
"typings": "dist/index.d.ts",
|
|
11
11
|
"declaration": true,
|
|
12
12
|
"declarationMap": true,
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://stash.sdl.com/scm/tdx/tridion-sites.git"
|
|
16
|
-
},
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://jira.sdl.com/projects/DXUI/issues/"
|
|
19
|
-
},
|
|
20
13
|
"files": [
|
|
21
14
|
"dist/**/*"
|
|
22
15
|
],
|
|
@@ -29,8 +22,8 @@
|
|
|
29
22
|
"prepublish": "yarn build"
|
|
30
23
|
},
|
|
31
24
|
"peerDependencies": {
|
|
32
|
-
"@tridion-sites/models": "0.1.
|
|
33
|
-
"@tridion-sites/open-api-client": "1.0.
|
|
25
|
+
"@tridion-sites/models": "0.1.4",
|
|
26
|
+
"@tridion-sites/open-api-client": "1.0.6",
|
|
34
27
|
"react": "18.2.0",
|
|
35
28
|
"react-dom": "18.2.0",
|
|
36
29
|
"react-is": "18.2.0",
|
|
@@ -42,8 +35,8 @@
|
|
|
42
35
|
"@rollup/plugin-json": "6.0.0",
|
|
43
36
|
"@rollup/plugin-node-resolve": "15.0.1",
|
|
44
37
|
"@rollup/plugin-typescript": "11.0.0",
|
|
45
|
-
"@tridion-sites/models": "0.1.
|
|
46
|
-
"@tridion-sites/open-api-client": "1.0.
|
|
38
|
+
"@tridion-sites/models": "0.1.4",
|
|
39
|
+
"@tridion-sites/open-api-client": "1.0.6",
|
|
47
40
|
"@tridion/graphene": "1.33.0",
|
|
48
41
|
"@types/react": "18.0.31",
|
|
49
42
|
"react": "18.2.0",
|