@webiny/app-aco 5.43.0-beta.4 → 5.43.0

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 (52) hide show
  1. package/constants.d.ts +1 -1
  2. package/constants.js +11 -2
  3. package/constants.js.map +1 -1
  4. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js +15 -9
  5. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js.map +1 -1
  6. package/features/folders/Folder.d.ts +2 -0
  7. package/features/folders/Folder.js +2 -0
  8. package/features/folders/Folder.js.map +1 -1
  9. package/features/folders/createFolder/CreateFolderGqlGateway.d.ts +1 -1
  10. package/features/folders/createFolder/CreateFolderGqlGateway.js.map +1 -1
  11. package/features/folders/createFolder/FolderGqlDto.d.ts +1 -0
  12. package/features/folders/createFolder/FolderGqlDto.js.map +1 -1
  13. package/features/folders/getDescendantFolders/GetDescendantFoldersUseCase.d.ts +1 -1
  14. package/features/folders/getFolderHierarchy/FolderDto.d.ts +1 -0
  15. package/features/folders/getFolderHierarchy/FolderDto.js +1 -0
  16. package/features/folders/getFolderHierarchy/FolderDto.js.map +1 -1
  17. package/features/folders/getFolderHierarchy/FolderGqlDto.d.ts +1 -0
  18. package/features/folders/getFolderHierarchy/FolderGqlDto.js.map +1 -1
  19. package/features/folders/getFolderHierarchy/GetFolderHierarchyGqlGateway.js +1 -0
  20. package/features/folders/getFolderHierarchy/GetFolderHierarchyGqlGateway.js.map +1 -1
  21. package/features/folders/listFolders/FolderDto.d.ts +1 -0
  22. package/features/folders/listFolders/FolderDto.js +1 -0
  23. package/features/folders/listFolders/FolderDto.js.map +1 -1
  24. package/features/folders/listFolders/FolderGqlDto.d.ts +1 -0
  25. package/features/folders/listFolders/FolderGqlDto.js.map +1 -1
  26. package/features/folders/listFolders/ListFoldersCompressedGqlGateway.js +1 -0
  27. package/features/folders/listFolders/ListFoldersCompressedGqlGateway.js.map +1 -1
  28. package/features/folders/listFolders/ListFoldersGqlGateway.js +1 -0
  29. package/features/folders/listFolders/ListFoldersGqlGateway.js.map +1 -1
  30. package/features/folders/listFoldersByParentIds/FolderDto.d.ts +1 -0
  31. package/features/folders/listFoldersByParentIds/FolderDto.js +1 -0
  32. package/features/folders/listFoldersByParentIds/FolderDto.js.map +1 -1
  33. package/features/folders/listFoldersByParentIds/FolderGqlDto.d.ts +1 -0
  34. package/features/folders/listFoldersByParentIds/FolderGqlDto.js.map +1 -1
  35. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsGqlGateway.js +1 -0
  36. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsGqlGateway.js.map +1 -1
  37. package/features/folders/updateFolder/FolderGqlDto.d.ts +1 -0
  38. package/features/folders/updateFolder/FolderGqlDto.js.map +1 -1
  39. package/features/folders/updateFolder/UpdateFolder.js +5 -1
  40. package/features/folders/updateFolder/UpdateFolder.js.map +1 -1
  41. package/features/folders/updateFolder/UpdateFolder.test.js +308 -0
  42. package/features/folders/updateFolder/UpdateFolder.test.js.map +1 -1
  43. package/features/folders/updateFolder/UpdateFolderRepositoryWithPathChange.d.ts +11 -0
  44. package/features/folders/updateFolder/UpdateFolderRepositoryWithPathChange.js +107 -0
  45. package/features/folders/updateFolder/UpdateFolderRepositoryWithPathChange.js.map +1 -0
  46. package/features/folders/updateFolder/UpdateFolderRepositoryWithPermissionsChange.d.ts +12 -0
  47. package/features/folders/updateFolder/UpdateFolderRepositoryWithPermissionsChange.js +100 -0
  48. package/features/folders/updateFolder/UpdateFolderRepositoryWithPermissionsChange.js.map +1 -0
  49. package/package.json +17 -16
  50. package/types.d.ts +3 -6
  51. package/types.js +12 -0
  52. package/types.js.map +1 -1
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.UpdateFolderRepositoryWithPathChange = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
+ var _sharedAco = require("@webiny/shared-aco");
13
+ var _Folder = require("../Folder");
14
+ var UpdateFolderRepositoryWithPathChange = exports.UpdateFolderRepositoryWithPathChange = /*#__PURE__*/function () {
15
+ function UpdateFolderRepositoryWithPathChange(cache, decoretee) {
16
+ (0, _classCallCheck2.default)(this, UpdateFolderRepositoryWithPathChange);
17
+ this.cache = cache;
18
+ this.decoretee = decoretee;
19
+ }
20
+ return (0, _createClass2.default)(UpdateFolderRepositoryWithPathChange, [{
21
+ key: "execute",
22
+ value: async function execute(folder) {
23
+ var folderPath = folder.path;
24
+ var cachedFolderPath = this.cache.getItem(function (f) {
25
+ return f.id === folder.id;
26
+ })?.path;
27
+
28
+ // Update the folder
29
+ await this.decoretee.execute(folder);
30
+
31
+ // If the folder is not in the cache, we can't proceed to update its children paths.
32
+ if (!cachedFolderPath) {
33
+ return;
34
+ }
35
+
36
+ // If the folder path has not changed, we don't need to update anything.
37
+ if (cachedFolderPath === folderPath) {
38
+ return;
39
+ }
40
+
41
+ // Fetch the updated folder from the cache (with the new path)
42
+ var updatedFolder = this.cache.getItem(function (f) {
43
+ return f.id === folder.id;
44
+ });
45
+ if (!updatedFolder) {
46
+ return;
47
+ }
48
+
49
+ // List direct children of the updated folder
50
+ var directChildren = this.listDirectChildren(updatedFolder);
51
+ if (!directChildren.length) {
52
+ return;
53
+ }
54
+ this.updateChildrenPathsRecursively(directChildren, updatedFolder);
55
+ }
56
+ }, {
57
+ key: "updateChildrenPathsRecursively",
58
+ value: function updateChildrenPathsRecursively(children, parentFolder) {
59
+ var _this = this;
60
+ var _iterator = (0, _createForOfIteratorHelper2.default)(children),
61
+ _step;
62
+ try {
63
+ var _loop = function _loop() {
64
+ var child = _step.value;
65
+ var updatedChild;
66
+
67
+ // Update the child's path in the cache
68
+ _this.cache.updateItems(function (f) {
69
+ if (f.id === child.id) {
70
+ var newPath = _sharedAco.Path.create(f.slug, parentFolder.path); // Use the updated parent's path
71
+ var updated = _Folder.Folder.create((0, _objectSpread2.default)((0, _objectSpread2.default)({}, f), {}, {
72
+ path: newPath
73
+ }));
74
+ updatedChild = updated; // Store the updated child for recursion
75
+ return updated;
76
+ }
77
+ return f;
78
+ });
79
+
80
+ // Recurse for the child's children
81
+ if (updatedChild) {
82
+ var grandChildren = _this.listDirectChildren(updatedChild);
83
+ if (grandChildren.length) {
84
+ _this.updateChildrenPathsRecursively(grandChildren, updatedChild);
85
+ }
86
+ }
87
+ };
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ _loop();
90
+ }
91
+ } catch (err) {
92
+ _iterator.e(err);
93
+ } finally {
94
+ _iterator.f();
95
+ }
96
+ }
97
+ }, {
98
+ key: "listDirectChildren",
99
+ value: function listDirectChildren(folder) {
100
+ return this.cache.getItems().filter(function (f) {
101
+ return f.parentId === folder.id;
102
+ });
103
+ }
104
+ }]);
105
+ }();
106
+
107
+ //# sourceMappingURL=UpdateFolderRepositoryWithPathChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_sharedAco","require","_Folder","UpdateFolderRepositoryWithPathChange","exports","cache","decoretee","_classCallCheck2","default","_createClass2","key","value","execute","folder","folderPath","path","cachedFolderPath","getItem","f","id","updatedFolder","directChildren","listDirectChildren","length","updateChildrenPathsRecursively","children","parentFolder","_this","_iterator","_createForOfIteratorHelper2","_step","_loop","child","updatedChild","updateItems","newPath","Path","create","slug","updated","Folder","_objectSpread2","grandChildren","s","n","done","err","e","getItems","filter","parentId"],"sources":["UpdateFolderRepositoryWithPathChange.ts"],"sourcesContent":["import { Path } from \"@webiny/shared-aco\";\nimport { IUpdateFolderRepository } from \"./IUpdateFolderRepository\";\nimport { ListCache } from \"../cache\";\nimport { Folder } from \"../Folder\";\n\nexport class UpdateFolderRepositoryWithPathChange implements IUpdateFolderRepository {\n private cache: ListCache<Folder>;\n private decoretee: IUpdateFolderRepository;\n\n constructor(cache: ListCache<Folder>, decoretee: IUpdateFolderRepository) {\n this.cache = cache;\n this.decoretee = decoretee;\n }\n\n async execute(folder: Folder) {\n const folderPath = folder.path;\n const cachedFolderPath = this.cache.getItem(f => f.id === folder.id)?.path;\n\n // Update the folder\n await this.decoretee.execute(folder);\n\n // If the folder is not in the cache, we can't proceed to update its children paths.\n if (!cachedFolderPath) {\n return;\n }\n\n // If the folder path has not changed, we don't need to update anything.\n if (cachedFolderPath === folderPath) {\n return;\n }\n\n // Fetch the updated folder from the cache (with the new path)\n const updatedFolder = this.cache.getItem(f => f.id === folder.id);\n if (!updatedFolder) {\n return;\n }\n\n // List direct children of the updated folder\n const directChildren = this.listDirectChildren(updatedFolder);\n if (!directChildren.length) {\n return;\n }\n\n this.updateChildrenPathsRecursively(directChildren, updatedFolder);\n }\n\n private updateChildrenPathsRecursively(children: Folder[], parentFolder: Folder) {\n for (const child of children) {\n let updatedChild: Folder | undefined;\n\n // Update the child's path in the cache\n this.cache.updateItems(f => {\n if (f.id === child.id) {\n const newPath = Path.create(f.slug, parentFolder.path); // Use the updated parent's path\n const updated = Folder.create({\n ...f,\n path: newPath\n });\n\n updatedChild = updated; // Store the updated child for recursion\n return updated;\n }\n return f;\n });\n\n // Recurse for the child's children\n if (updatedChild) {\n const grandChildren = this.listDirectChildren(updatedChild);\n if (grandChildren.length) {\n this.updateChildrenPathsRecursively(grandChildren, updatedChild);\n }\n }\n }\n }\n\n private listDirectChildren(folder: Folder) {\n return this.cache.getItems().filter(f => f.parentId === folder.id);\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AAAmC,IAEtBE,oCAAoC,GAAAC,OAAA,CA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AAC;QAAA,OAAIA,CAAC,CAACgC,QAAQ,KAAKrC,MAAM,CAACM,EAAE;MAAA,EAAC;IACtE;EAAC;AAAA","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { IUpdateFolderRepository } from "./IUpdateFolderRepository";
2
+ import { ListCache } from "../cache";
3
+ import { Folder } from "../Folder";
4
+ export declare class UpdateFolderRepositoryWithPermissionsChange implements IUpdateFolderRepository {
5
+ private cache;
6
+ private decoretee;
7
+ constructor(cache: ListCache<Folder>, decoretee: IUpdateFolderRepository);
8
+ execute(folder: Folder): Promise<void>;
9
+ private updateChildrenPermissionsRecursively;
10
+ private updateFolderPermissions;
11
+ private listDirectChildren;
12
+ }
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.UpdateFolderRepositoryWithPermissionsChange = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+ var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
14
+ var _sharedAco = require("@webiny/shared-aco");
15
+ var _Folder = require("../Folder");
16
+ var UpdateFolderRepositoryWithPermissionsChange = exports.UpdateFolderRepositoryWithPermissionsChange = /*#__PURE__*/function () {
17
+ function UpdateFolderRepositoryWithPermissionsChange(cache, decoretee) {
18
+ (0, _classCallCheck2.default)(this, UpdateFolderRepositoryWithPermissionsChange);
19
+ this.cache = cache;
20
+ this.decoretee = decoretee;
21
+ }
22
+ return (0, _createClass2.default)(UpdateFolderRepositoryWithPermissionsChange, [{
23
+ key: "execute",
24
+ value: async function execute(folder) {
25
+ var folderPermissions = (0, _toConsumableArray2.default)(folder.permissions);
26
+ var cachedFolderPermissions = this.cache.getItem(function (f) {
27
+ return f.id === folder.id;
28
+ })?.permissions;
29
+
30
+ // Let's run the original use case and update the folder.
31
+ await this.decoretee.execute(folder);
32
+ if (!cachedFolderPermissions) {
33
+ // If the folder is not in the cache, we can't proceed to update its children permissions.
34
+ return;
35
+ }
36
+ if ((0, _isEqual.default)(cachedFolderPermissions, folderPermissions)) {
37
+ // If the permissions are the same, we don't need to update anything.
38
+ return;
39
+ }
40
+
41
+ // If the permissions have changed, we need to update the folder and its children.
42
+ // Starting with the folder itself, inheriting permissions from its parent folder.
43
+ var parentFolder = this.cache.getItem(function (f) {
44
+ return f.id === folder.parentId;
45
+ });
46
+ var updatedFolder = this.updateFolderPermissions(folder.id, parentFolder);
47
+
48
+ // Now we need to update the permissions of all permissions of the folder's children.
49
+ var directChildren = this.listDirectChildren(updatedFolder);
50
+ if (directChildren.length) {
51
+ this.updateChildrenPermissionsRecursively(directChildren, updatedFolder);
52
+ }
53
+ }
54
+ }, {
55
+ key: "updateChildrenPermissionsRecursively",
56
+ value: function updateChildrenPermissionsRecursively(children, parentFolder) {
57
+ var _iterator = (0, _createForOfIteratorHelper2.default)(children),
58
+ _step;
59
+ try {
60
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
61
+ var child = _step.value;
62
+ var updatedChild = this.updateFolderPermissions(child.id, parentFolder);
63
+ var grandChildren = this.listDirectChildren(updatedChild);
64
+ if (grandChildren.length) {
65
+ this.updateChildrenPermissionsRecursively(grandChildren, updatedChild);
66
+ }
67
+ }
68
+ } catch (err) {
69
+ _iterator.e(err);
70
+ } finally {
71
+ _iterator.f();
72
+ }
73
+ }
74
+ }, {
75
+ key: "updateFolderPermissions",
76
+ value: function updateFolderPermissions(folderId, parentFolder) {
77
+ var updatedFolder;
78
+ this.cache.updateItems(function (f) {
79
+ if (f.id === folderId) {
80
+ var permissions = _sharedAco.Permissions.create(f.permissions, parentFolder);
81
+ updatedFolder = _Folder.Folder.create((0, _objectSpread2.default)((0, _objectSpread2.default)({}, f), {}, {
82
+ permissions: permissions
83
+ }));
84
+ return updatedFolder;
85
+ }
86
+ return f;
87
+ });
88
+ return updatedFolder;
89
+ }
90
+ }, {
91
+ key: "listDirectChildren",
92
+ value: function listDirectChildren(folder) {
93
+ return this.cache.getItems().filter(function (f) {
94
+ return f.parentId === folder.id;
95
+ });
96
+ }
97
+ }]);
98
+ }();
99
+
100
+ //# sourceMappingURL=UpdateFolderRepositoryWithPermissionsChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_isEqual","_interopRequireDefault","require","_sharedAco","_Folder","UpdateFolderRepositoryWithPermissionsChange","exports","cache","decoretee","_classCallCheck2","default","_createClass2","key","value","execute","folder","folderPermissions","_toConsumableArray2","permissions","cachedFolderPermissions","getItem","f","id","isEqual","parentFolder","parentId","updatedFolder","updateFolderPermissions","directChildren","listDirectChildren","length","updateChildrenPermissionsRecursively","children","_iterator","_createForOfIteratorHelper2","_step","s","n","done","child","updatedChild","grandChildren","err","e","folderId","updateItems","Permissions","create","Folder","_objectSpread2","getItems","filter"],"sources":["UpdateFolderRepositoryWithPermissionsChange.ts"],"sourcesContent":["import isEqual from \"lodash/isEqual\";\nimport { Permissions } from \"@webiny/shared-aco\";\nimport { IUpdateFolderRepository } from \"./IUpdateFolderRepository\";\nimport { ListCache } from \"../cache\";\nimport { Folder } from \"../Folder\";\n\nexport class UpdateFolderRepositoryWithPermissionsChange implements IUpdateFolderRepository {\n private cache: ListCache<Folder>;\n private decoretee: IUpdateFolderRepository;\n\n constructor(cache: ListCache<Folder>, decoretee: IUpdateFolderRepository) {\n this.cache = cache;\n this.decoretee = decoretee;\n }\n\n async execute(folder: Folder) {\n const folderPermissions = [...folder.permissions];\n const cachedFolderPermissions = this.cache.getItem(f => f.id === folder.id)?.permissions;\n\n // Let's run the original use case and update the folder.\n await this.decoretee.execute(folder);\n\n if (!cachedFolderPermissions) {\n // If the folder is not in the cache, we can't proceed to update its children permissions.\n return;\n }\n\n if (isEqual(cachedFolderPermissions, folderPermissions)) {\n // If the permissions are the same, we don't need to update anything.\n return;\n }\n\n // If the permissions have changed, we need to update the folder and its children.\n // Starting with the folder itself, inheriting permissions from its parent folder.\n const parentFolder = this.cache.getItem(f => f.id === folder.parentId);\n const updatedFolder = this.updateFolderPermissions(folder.id, parentFolder);\n\n // Now we need to update the permissions of all permissions of the folder's children.\n const directChildren = this.listDirectChildren(updatedFolder);\n if (directChildren.length) {\n this.updateChildrenPermissionsRecursively(directChildren, updatedFolder);\n }\n }\n\n private updateChildrenPermissionsRecursively(children: Folder[], parentFolder: Folder) {\n for (const child of children) {\n const updatedChild = this.updateFolderPermissions(child.id, parentFolder);\n const grandChildren = this.listDirectChildren(updatedChild);\n if (grandChildren.length) {\n this.updateChildrenPermissionsRecursively(grandChildren, updatedChild);\n }\n }\n }\n\n private updateFolderPermissions(folderId: string, parentFolder: Folder | undefined): Folder {\n let updatedFolder: Folder | undefined;\n this.cache.updateItems(f => {\n if (f.id === folderId) {\n const permissions = Permissions.create(f.permissions, parentFolder);\n updatedFolder = Folder.create({ ...f, permissions });\n return updatedFolder;\n }\n return f;\n });\n\n return updatedFolder!;\n }\n\n private listDirectChildren(folder: Folder) {\n return this.cache.getItems().filter(f => f.parentId === folder.id);\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAF,OAAA;AAAmC,IAEtBG,2CAA2C,GAAAC,OAAA,CAAAD,2CAAA;EAIpD,SAAAA,4CAAYE,KAAwB,EAAEC,SAAkC,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAL,2CAAA;IACtE,IAAI,CAACE,KAAK,GAAGA,KAAK;IAClB,IAAI,CA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AAM,CAACO,EAAE;MAAA,EAAC;IACtE;EAAC;AAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-aco",
3
- "version": "5.43.0-beta.4",
3
+ "version": "5.43.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,19 +17,20 @@
17
17
  "@material-design-icons/svg": "0.14.13",
18
18
  "@material-symbols/svg-400": "0.4.3",
19
19
  "@minoru/react-dnd-treeview": "3.2.1",
20
- "@webiny/app": "5.43.0-beta.4",
21
- "@webiny/app-admin": "5.43.0-beta.4",
22
- "@webiny/app-headless-cms-common": "5.43.0-beta.4",
23
- "@webiny/app-security": "5.43.0-beta.4",
24
- "@webiny/app-utils": "5.43.0-beta.4",
25
- "@webiny/app-wcp": "5.43.0-beta.4",
26
- "@webiny/form": "5.43.0-beta.4",
27
- "@webiny/plugins": "5.43.0-beta.4",
28
- "@webiny/react-properties": "5.43.0-beta.4",
29
- "@webiny/react-router": "5.43.0-beta.4",
30
- "@webiny/ui": "5.43.0-beta.4",
31
- "@webiny/utils": "5.43.0-beta.4",
32
- "@webiny/validation": "5.43.0-beta.4",
20
+ "@webiny/app": "5.43.0",
21
+ "@webiny/app-admin": "5.43.0",
22
+ "@webiny/app-headless-cms-common": "5.43.0",
23
+ "@webiny/app-security": "5.43.0",
24
+ "@webiny/app-utils": "5.43.0",
25
+ "@webiny/app-wcp": "5.43.0",
26
+ "@webiny/form": "5.43.0",
27
+ "@webiny/plugins": "5.43.0",
28
+ "@webiny/react-properties": "5.43.0",
29
+ "@webiny/react-router": "5.43.0",
30
+ "@webiny/shared-aco": "5.43.0",
31
+ "@webiny/ui": "5.43.0",
32
+ "@webiny/utils": "5.43.0",
33
+ "@webiny/validation": "5.43.0",
33
34
  "dot-prop-immutable": "2.1.1",
34
35
  "graphql": "15.9.0",
35
36
  "graphql-tag": "2.12.6",
@@ -47,7 +48,7 @@
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/react": "18.2.79",
50
- "@webiny/project-utils": "5.43.0-beta.4",
51
+ "@webiny/project-utils": "5.43.0",
51
52
  "apollo-client": "2.6.10",
52
53
  "apollo-link": "1.2.14",
53
54
  "rimraf": "6.0.1",
@@ -61,5 +62,5 @@
61
62
  "build": "node ../cli/bin.js run build",
62
63
  "watch": "node ../cli/bin.js run watch"
63
64
  },
64
- "gitHead": "e603e8424527889681407f3ebfcdf6fa4dfc3089"
65
+ "gitHead": "4033580d3aaaa66cf5e0006af6926203c89919f2"
65
66
  }
package/types.d.ts CHANGED
@@ -1,13 +1,9 @@
1
1
  import { CmsIdentity, CmsModel, CmsModelField, CmsModelFieldSettings } from "@webiny/app-headless-cms-common/types";
2
+ import type { FolderPermission } from "@webiny/shared-aco/types";
2
3
  export { CmsIdentity } from "@webiny/app-headless-cms-common/types";
4
+ export * from "@webiny/shared-aco/flp/flp.types";
3
5
  export * from "./graphql/records/types";
4
6
  export * from "./table.types";
5
- export type FolderAccessLevel = "owner" | "viewer" | "editor" | "public" | "no-access";
6
- export interface FolderPermission {
7
- target: `admin:${string}` | `team:${string}`;
8
- level: FolderAccessLevel;
9
- inheritedFrom?: string;
10
- }
11
7
  export interface FolderLevelPermissionsTarget<TMeta = Record<string, any>> {
12
8
  id: string;
13
9
  target: string;
@@ -26,6 +22,7 @@ export interface FolderItem {
26
22
  canManageContent: boolean;
27
23
  type: string;
28
24
  parentId: string | null;
25
+ path: string;
29
26
  createdBy: CmsIdentity;
30
27
  createdOn: string;
31
28
  savedBy: CmsIdentity;
package/types.js CHANGED
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "CmsIdentity", {
15
15
  });
16
16
  exports.LoadingActionsEnum = void 0;
17
17
  var _types = require("@webiny/app-headless-cms-common/types");
18
+ var _flp = require("@webiny/shared-aco/flp/flp.types");
19
+ Object.keys(_flp).forEach(function (key) {
20
+ if (key === "default" || key === "__esModule") return;
21
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
22
+ if (key in exports && exports[key] === _flp[key]) return;
23
+ Object.defineProperty(exports, key, {
24
+ enumerable: true,
25
+ get: function get() {
26
+ return _flp[key];
27
+ }
28
+ });
29
+ });
18
30
  var _types2 = require("./graphql/records/types");
19
31
  Object.keys(_types2).forEach(function (key) {
20
32
  if (key === "default" || key === "__esModule") return;
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","_types2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_table","LoadingActionsEnum","init","list","listMore","create","update","delete","move"],"sources":["types.ts"],"sourcesContent":["import {\n CmsIdentity,\n CmsModel,\n CmsModelField,\n CmsModelFieldSettings\n} from \"@webiny/app-headless-cms-common/types\";\n\nexport { CmsIdentity } from \"@webiny/app-headless-cms-common/types\";\nexport * from \"~/graphql/records/types\";\nexport * from \"~/table.types\";\nexport type FolderAccessLevel = \"owner\" | \"viewer\" | \"editor\" | \"public\" | \"no-access\";\n\nexport interface FolderPermission {\n target: `admin:${string}` | `team:${string}`;\n level: FolderAccessLevel;\n inheritedFrom?: string;\n}\n\nexport interface FolderLevelPermissionsTarget<TMeta = Record<string, any>> {\n id: string;\n target: string;\n name: string;\n type: string;\n meta: TMeta;\n}\n\nexport interface FolderItem {\n id: string;\n title: string;\n slug: string;\n permissions: FolderPermission[];\n hasNonInheritedPermissions: boolean;\n canManagePermissions: boolean;\n canManageStructure: boolean;\n canManageContent: boolean;\n type: string;\n parentId: string | null;\n createdBy: CmsIdentity;\n createdOn: string;\n savedBy: CmsIdentity;\n savedOn: string;\n modifiedBy: CmsIdentity | null;\n modifiedOn: string | null;\n extensions: Record<string, any>;\n}\n\nexport type GenericSearchData = {\n [key: string]: any;\n};\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface TagItem {\n tag: string;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions =\n | \"INIT\"\n | \"LIST\"\n | \"LIST_MORE\"\n | \"GET\"\n | \"CREATE\"\n | \"UPDATE\"\n | \"DELETE\"\n | \"MOVE\";\n\nexport const LoadingActionsEnum = {\n init: \"INIT\",\n list: \"LIST\",\n listMore: \"LIST_MORE\",\n get: \"GET\",\n create: \"CREATE\",\n update: \"UPDATE\",\n delete: \"DELETE\",\n move: \"MOVE\"\n};\n\nexport interface AcoError {\n code: string;\n message: string;\n data?: Record<string, any> | null;\n}\n\nexport type ListSearchRecordsSortItem = `${string}_ASC` | `${string}_DESC`;\nexport type ListSearchRecordsSort = ListSearchRecordsSortItem[];\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n limit: number;\n sort?: Record<string, any>;\n after?: string | null;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderItem,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<\n FolderItem,\n | \"id\"\n | \"createdOn\"\n | \"createdBy\"\n | \"savedOn\"\n | \"savedBy\"\n | \"modifiedOn\"\n | \"modifiedBy\"\n | \"hasNonInheritedPermissions\"\n | \"canManageContent\"\n | \"canManagePermissions\"\n | \"canManageStructure\"\n >;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface DndFolderItemData {\n isFocused?: boolean;\n}\n\n/**\n * This type will be removed when all apps migrate to the CMS.\n * @deprecated\n */\nexport type AcoAppMode = \"aco\" | \"cms\";\n\n/**\n * Apps.\n */\nexport interface AcoModel extends CmsModel {\n fields: AcoModelField[];\n}\n\nexport interface AcoModelFieldSettingsAco {\n enabled?: boolean;\n header?: boolean;\n}\n\nexport interface AcoModelFieldSettings {\n aco?: AcoModelFieldSettingsAco;\n}\n\nexport interface AcoModelField extends CmsModelField {\n settings?: CmsModelFieldSettings & AcoModelFieldSettings;\n}\n\nexport interface AcoApp {\n id: string;\n model: AcoModel;\n getFields: () => AcoModelField[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AA6DO,IAAMU,kBAAkB,GAAAL,OAAA,CAAAK,kBAAA,GAAG;EAC9BC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,WAAW;EACrBL,GAAG,EAAE,KAAK;EACVM,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACV,CAAC;;AA4GD;AACA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["_types","require","_flp","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types2","_table","LoadingActionsEnum","init","list","listMore","create","update","delete","move"],"sources":["types.ts"],"sourcesContent":["import {\n CmsIdentity,\n CmsModel,\n CmsModelField,\n CmsModelFieldSettings\n} from \"@webiny/app-headless-cms-common/types\";\nimport type { FolderPermission } from \"@webiny/shared-aco/types\";\n\nexport { CmsIdentity } from \"@webiny/app-headless-cms-common/types\";\nexport * from \"@webiny/shared-aco/flp/flp.types\";\nexport * from \"~/graphql/records/types\";\nexport * from \"~/table.types\";\n\nexport interface FolderLevelPermissionsTarget<TMeta = Record<string, any>> {\n id: string;\n target: string;\n name: string;\n type: string;\n meta: TMeta;\n}\n\nexport interface FolderItem {\n id: string;\n title: string;\n slug: string;\n permissions: FolderPermission[];\n hasNonInheritedPermissions: boolean;\n canManagePermissions: boolean;\n canManageStructure: boolean;\n canManageContent: boolean;\n type: string;\n parentId: string | null;\n path: string;\n createdBy: CmsIdentity;\n createdOn: string;\n savedBy: CmsIdentity;\n savedOn: string;\n modifiedBy: CmsIdentity | null;\n modifiedOn: string | null;\n extensions: Record<string, any>;\n}\n\nexport type GenericSearchData = {\n [key: string]: any;\n};\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface TagItem {\n tag: string;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions =\n | \"INIT\"\n | \"LIST\"\n | \"LIST_MORE\"\n | \"GET\"\n | \"CREATE\"\n | \"UPDATE\"\n | \"DELETE\"\n | \"MOVE\";\n\nexport const LoadingActionsEnum = {\n init: \"INIT\",\n list: \"LIST\",\n listMore: \"LIST_MORE\",\n get: \"GET\",\n create: \"CREATE\",\n update: \"UPDATE\",\n delete: \"DELETE\",\n move: \"MOVE\"\n};\n\nexport interface AcoError {\n code: string;\n message: string;\n data?: Record<string, any> | null;\n}\n\nexport type ListSearchRecordsSortItem = `${string}_ASC` | `${string}_DESC`;\nexport type ListSearchRecordsSort = ListSearchRecordsSortItem[];\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n limit: number;\n sort?: Record<string, any>;\n after?: string | null;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderItem,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<\n FolderItem,\n | \"id\"\n | \"createdOn\"\n | \"createdBy\"\n | \"savedOn\"\n | \"savedBy\"\n | \"modifiedOn\"\n | \"modifiedBy\"\n | \"hasNonInheritedPermissions\"\n | \"canManageContent\"\n | \"canManagePermissions\"\n | \"canManageStructure\"\n >;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface DndFolderItemData {\n isFocused?: boolean;\n}\n\n/**\n * This type will be removed when all apps migrate to the CMS.\n * @deprecated\n */\nexport type AcoAppMode = \"aco\" | \"cms\";\n\n/**\n * Apps.\n */\nexport interface AcoModel extends CmsModel {\n fields: AcoModelField[];\n}\n\nexport interface AcoModelFieldSettingsAco {\n enabled?: boolean;\n header?: boolean;\n}\n\nexport interface AcoModelFieldSettings {\n aco?: AcoModelFieldSettingsAco;\n}\n\nexport interface AcoModelField extends CmsModelField {\n settings?: CmsModelFieldSettings & AcoModelFieldSettings;\n}\n\nexport interface AcoApp {\n id: string;\n model: AcoModel;\n getFields: () => AcoModelField[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAQA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,IAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,IAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,IAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,OAAA,GAAAd,OAAA;AAAAE,MAAA,C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