@webiny/app-file-manager 5.42.2 → 5.42.3-beta.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/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.d.ts +9 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.d.ts +7 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js +20 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.d.ts +12 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js +15 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.d.ts +1 -1
- package/package.json +20 -20
|
@@ -106,6 +106,14 @@ export declare const FileManagerViewConfig: (({ priority, children }: import("@w
|
|
|
106
106
|
converter: import("./configComponents/Browser/FiltersToWhere").FiltersToWhereConverter;
|
|
107
107
|
}) => import("react").JSX.Element;
|
|
108
108
|
FilterByTags: ({ remove }: import("./configComponents/Browser/FilterByTags").FilterByTagProps) => import("react").JSX.Element;
|
|
109
|
+
Folder: {
|
|
110
|
+
ExtensionField: {
|
|
111
|
+
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms-common").FieldElementProps>>) => (props: import("@webiny/app-aco").FieldDecoratorProps) => import("react").JSX.Element;
|
|
112
|
+
};
|
|
113
|
+
Action: ((props: import("@webiny/app-aco/config/folder/Action").ActionProps) => import("react").JSX.Element) & {
|
|
114
|
+
OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => import("react").JSX.Element;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
109
117
|
FolderAction: ((props: import("@webiny/app-aco/config/folder/Action").ActionProps) => import("react").JSX.Element) & {
|
|
110
118
|
OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => import("react").JSX.Element;
|
|
111
119
|
};
|
|
@@ -193,7 +201,7 @@ export declare const FileManagerViewConfig: (({ priority, children }: import("@w
|
|
|
193
201
|
}) => import("react").JSX.Element;
|
|
194
202
|
};
|
|
195
203
|
ExtensionField: {
|
|
196
|
-
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms").FieldElementProps>>) => (props: import("./configComponents/FileDetails/FieldDecorator").FieldDecoratorProps) => import("react").JSX.Element;
|
|
204
|
+
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms-common").FieldElementProps>>) => (props: import("./configComponents/FileDetails/FieldDecorator").FieldDecoratorProps) => import("react").JSX.Element;
|
|
197
205
|
};
|
|
198
206
|
};
|
|
199
207
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldElement } from "@webiny/app-headless-cms-common";
|
|
3
|
+
export type FieldProps = React.ComponentProps<typeof FieldElement>;
|
|
4
|
+
export type FolderFieldDecoratorProps = {
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const shouldDecorateFolderField: (decoratorProps: FolderFieldDecoratorProps, componentProps: FieldProps) => boolean;
|
package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shouldDecorateFolderField = void 0;
|
|
7
|
+
var _appAco = require("@webiny/app-aco");
|
|
8
|
+
var shouldDecorateFolderField = exports.shouldDecorateFolderField = function shouldDecorateFolderField(decoratorProps, componentProps) {
|
|
9
|
+
var id = decoratorProps.id;
|
|
10
|
+
var type = (0, _appAco.useFoldersType)();
|
|
11
|
+
if (type !== "FmFile") {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
if (id) {
|
|
15
|
+
return id === "*" ? true : id === componentProps.field.id;
|
|
16
|
+
}
|
|
17
|
+
return true;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=FolderFieldDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_appAco","require","shouldDecorateFolderField","exports","decoratorProps","componentProps","id","type","useFoldersType","field"],"sources":["FolderFieldDecorator.tsx"],"sourcesContent":["import React from \"react\";\nimport { FieldElement } from \"@webiny/app-headless-cms-common\";\nimport { useFoldersType } from \"@webiny/app-aco\";\n\nexport type FieldProps = React.ComponentProps<typeof FieldElement>;\n\nexport type FolderFieldDecoratorProps = {\n id?: string;\n};\n\nexport const shouldDecorateFolderField = (\n decoratorProps: FolderFieldDecoratorProps,\n componentProps: FieldProps\n) => {\n const { id } = decoratorProps;\n const type = useFoldersType();\n\n if (type !== \"FmFile\") {\n return false;\n }\n\n if (id) {\n return id === \"*\" ? true : id === componentProps.field.id;\n }\n\n return true;\n};\n"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAQO,IAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,SAA5BA,yBAAyBA,CAClCE,cAAyC,EACzCC,cAA0B,EACzB;EACD,IAAQC,EAAE,GAAKF,cAAc,CAArBE,EAAE;EACV,IAAMC,IAAI,GAAG,IAAAC,sBAAc,EAAC,CAAC;EAE7B,IAAID,IAAI,KAAK,QAAQ,EAAE;IACnB,OAAO,KAAK;EAChB;EAEA,IAAID,EAAE,EAAE;IACJ,OAAOA,EAAE,KAAK,GAAG,GAAG,IAAI,GAAGA,EAAE,KAAKD,cAAc,CAACI,KAAK,CAACH,EAAE;EAC7D;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
|
@@ -124,6 +124,18 @@ export declare const Browser: {
|
|
|
124
124
|
converter: FiltersToWhereConverter;
|
|
125
125
|
}) => import("react").JSX.Element;
|
|
126
126
|
FilterByTags: ({ remove }: import("./FilterByTags").FilterByTagProps) => import("react").JSX.Element;
|
|
127
|
+
Folder: {
|
|
128
|
+
ExtensionField: {
|
|
129
|
+
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms-common").FieldElementProps>>) => (props: import("@webiny/app-aco").FieldDecoratorProps) => import("react").JSX.Element;
|
|
130
|
+
};
|
|
131
|
+
Action: ((props: import("@webiny/app-aco/config/folder/Action").ActionProps) => import("react").JSX.Element) & {
|
|
132
|
+
OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => import("react").JSX.Element;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated
|
|
137
|
+
* Use `Browser.Folder.Action` instead
|
|
138
|
+
*/
|
|
127
139
|
FolderAction: ((props: import("@webiny/app-aco/config/folder/Action").ActionProps) => import("react").JSX.Element) & {
|
|
128
140
|
OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => import("react").JSX.Element;
|
|
129
141
|
};
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Browser = void 0;
|
|
7
|
+
var _appAco = require("@webiny/app-aco");
|
|
7
8
|
var _BulkAction = require("./BulkAction");
|
|
8
9
|
var _Filter = require("./Filter");
|
|
9
10
|
var _FiltersToWhere = require("./FiltersToWhere");
|
|
@@ -16,6 +17,7 @@ var _Action = require("./Grid/Action");
|
|
|
16
17
|
var _Thumbnail = require("./Grid/Thumbnail");
|
|
17
18
|
var _ActionButton = require("../../../../../components/Grid/ActionButton");
|
|
18
19
|
var _File = require("../../../../../components/Grid/File");
|
|
20
|
+
var _FolderFieldDecorator = require("./FolderFieldDecorator");
|
|
19
21
|
var Browser = exports.Browser = {
|
|
20
22
|
Grid: {
|
|
21
23
|
Item: Object.assign(_File.File, {
|
|
@@ -30,6 +32,19 @@ var Browser = exports.Browser = {
|
|
|
30
32
|
Filter: _Filter.Filter,
|
|
31
33
|
FiltersToWhere: _FiltersToWhere.FiltersToWhere,
|
|
32
34
|
FilterByTags: _FilterByTags.FilterByTags,
|
|
35
|
+
Folder: {
|
|
36
|
+
ExtensionField: {
|
|
37
|
+
createDecorator: (0, _appAco.createFolderFieldDecoratorFactory)({
|
|
38
|
+
scope: "fm",
|
|
39
|
+
shouldDecorate: _FolderFieldDecorator.shouldDecorateFolderField
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
Action: _FolderAction.FolderAction
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated
|
|
46
|
+
* Use `Browser.Folder.Action` instead
|
|
47
|
+
*/
|
|
33
48
|
FolderAction: _FolderAction.FolderAction,
|
|
34
49
|
FileAction: _FileAction.FileAction,
|
|
35
50
|
Table: _Table.Table
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_appAco","require","_BulkAction","_Filter","_FiltersToWhere","_FilterByTags","_FolderAction","_FileAction","_Table","_BulkEditField","_Action","_Thumbnail","_ActionButton","_File","_FolderFieldDecorator","Browser","exports","Grid","Item","Object","assign","File","Thumbnail","Action","IconButton","ActionButton","BulkAction","BulkEditField","Filter","FiltersToWhere","FilterByTags","Folder","ExtensionField","createDecorator","createFolderFieldDecoratorFactory","scope","shouldDecorate","shouldDecorateFolderField","FolderAction","FileAction","Table"],"sources":["index.ts"],"sourcesContent":["import { createFolderFieldDecoratorFactory } from \"@webiny/app-aco\";\nimport { BulkAction, BulkActionConfig } from \"./BulkAction\";\nimport { Filter, FilterConfig } from \"./Filter\";\nimport { FiltersToWhere, FiltersToWhereConverter } from \"./FiltersToWhere\";\nimport { FilterByTags } from \"./FilterByTags\";\nimport { FolderAction, FolderActionConfig } from \"./FolderAction\";\nimport { FileAction, FileActionConfig } from \"./FileAction\";\nimport { Table, TableConfig } from \"./Table\";\nimport { BulkEditField, BulkEditFieldConfig } from \"./BulkEditField\";\nimport { Action } from \"./Grid/Action\";\nimport { Thumbnail } from \"./Grid/Thumbnail\";\nimport { GridConfig } from \"./Grid\";\nimport { ActionButton } from \"~/components/Grid/ActionButton\";\nimport { File } from \"~/components/Grid/File\";\nimport { shouldDecorateFolderField } from \"./FolderFieldDecorator\";\n\nexport interface BrowserConfig {\n bulkActions: BulkActionConfig[];\n bulkEditFields: BulkEditFieldConfig[];\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n filterByTags: boolean;\n folderActions: FolderActionConfig[];\n fileActions: FileActionConfig[];\n table: TableConfig;\n grid: GridConfig;\n}\n\nexport const Browser = {\n Grid: {\n Item: Object.assign(File, {\n Thumbnail,\n Action: Object.assign(Action, { IconButton: ActionButton })\n })\n },\n BulkAction,\n BulkEditField,\n Filter,\n FiltersToWhere,\n FilterByTags,\n Folder: {\n ExtensionField: {\n createDecorator: createFolderFieldDecoratorFactory({\n scope: \"fm\",\n shouldDecorate: shouldDecorateFolderField\n })\n },\n Action: FolderAction\n },\n /**\n * @deprecated\n * Use `Browser.Folder.Action` instead\n */\n FolderAction,\n FileAction,\n Table\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AAEA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,KAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAb,OAAA;AAcO,IAAMc,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACnBE,IAAI,EAAE;IACFC,IAAI,EAAEC,MAAM,CAACC,MAAM,CAACC,UAAI,EAAE;MACtBC,SAAS,EAATA,oBAAS;MACTC,MAAM,EAAEJ,MAAM,CAACC,MAAM,CAACG,cAAM,EAAE;QAAEC,UAAU,EAAEC;MAAa,CAAC;IAC9D,CAAC;EACL,CAAC;EACDC,UAAU,EAAVA,sBAAU;EACVC,aAAa,EAAbA,4BAAa;EACbC,MAAM,EAANA,cAAM;EACNC,cAAc,EAAdA,8BAAc;EACdC,YAAY,EAAZA,0BAAY;EACZC,MAAM,EAAE;IACJC,cAAc,EAAE;MACZC,eAAe,EAAE,IAAAC,yCAAiC,EAAC;QAC/CC,KAAK,EAAE,IAAI;QACXC,cAAc,EAAEC;MACpB,CAAC;IACL,CAAC;IACDd,MAAM,EAAEe;EACZ,CAAC;EACD;AACJ;AACA;AACA;EACIA,YAAY,EAAZA,0BAAY;EACZC,UAAU,EAAVA,sBAAU;EACVC,KAAK,EAALA;AACJ,CAAC","ignoreList":[]}
|
|
@@ -82,6 +82,6 @@ export declare const FileDetails: {
|
|
|
82
82
|
}) => import("react").JSX.Element;
|
|
83
83
|
};
|
|
84
84
|
ExtensionField: {
|
|
85
|
-
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms").FieldElementProps>>) => (props: import("./FieldDecorator").FieldDecoratorProps) => import("react").JSX.Element;
|
|
85
|
+
createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("@webiny/react-composition").GenericComponent<import("@webiny/app-headless-cms-common").FieldElementProps>>) => (props: import("./FieldDecorator").FieldDecoratorProps) => import("react").JSX.Element;
|
|
86
86
|
};
|
|
87
87
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-file-manager",
|
|
3
|
-
"version": "5.42.
|
|
3
|
+
"version": "5.42.3-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
"@emotion/styled": "11.10.6",
|
|
17
17
|
"@material-design-icons/svg": "0.14.13",
|
|
18
18
|
"@types/react": "18.2.79",
|
|
19
|
-
"@webiny/app": "5.42.
|
|
20
|
-
"@webiny/app-aco": "5.42.
|
|
21
|
-
"@webiny/app-admin": "5.42.
|
|
22
|
-
"@webiny/app-headless-cms": "5.42.
|
|
23
|
-
"@webiny/app-headless-cms-common": "5.42.
|
|
24
|
-
"@webiny/app-i18n": "5.42.
|
|
25
|
-
"@webiny/app-security": "5.42.
|
|
26
|
-
"@webiny/app-tenancy": "5.42.
|
|
27
|
-
"@webiny/app-websockets": "5.42.
|
|
28
|
-
"@webiny/error": "5.42.
|
|
29
|
-
"@webiny/form": "5.42.
|
|
30
|
-
"@webiny/plugins": "5.42.
|
|
31
|
-
"@webiny/react-composition": "5.42.
|
|
32
|
-
"@webiny/react-properties": "5.42.
|
|
33
|
-
"@webiny/ui": "5.42.
|
|
34
|
-
"@webiny/utils": "5.42.
|
|
35
|
-
"@webiny/validation": "5.42.
|
|
19
|
+
"@webiny/app": "5.42.3-beta.1",
|
|
20
|
+
"@webiny/app-aco": "5.42.3-beta.1",
|
|
21
|
+
"@webiny/app-admin": "5.42.3-beta.1",
|
|
22
|
+
"@webiny/app-headless-cms": "5.42.3-beta.1",
|
|
23
|
+
"@webiny/app-headless-cms-common": "5.42.3-beta.1",
|
|
24
|
+
"@webiny/app-i18n": "5.42.3-beta.1",
|
|
25
|
+
"@webiny/app-security": "5.42.3-beta.1",
|
|
26
|
+
"@webiny/app-tenancy": "5.42.3-beta.1",
|
|
27
|
+
"@webiny/app-websockets": "5.42.3-beta.1",
|
|
28
|
+
"@webiny/error": "5.42.3-beta.1",
|
|
29
|
+
"@webiny/form": "5.42.3-beta.1",
|
|
30
|
+
"@webiny/plugins": "5.42.3-beta.1",
|
|
31
|
+
"@webiny/react-composition": "5.42.3-beta.1",
|
|
32
|
+
"@webiny/react-properties": "5.42.3-beta.1",
|
|
33
|
+
"@webiny/ui": "5.42.3-beta.1",
|
|
34
|
+
"@webiny/utils": "5.42.3-beta.1",
|
|
35
|
+
"@webiny/validation": "5.42.3-beta.1",
|
|
36
36
|
"apollo-cache": "1.3.5",
|
|
37
37
|
"apollo-client": "2.6.10",
|
|
38
38
|
"apollo-link": "1.2.14",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@svgr/webpack": "6.5.1",
|
|
63
|
-
"@webiny/project-utils": "5.42.
|
|
63
|
+
"@webiny/project-utils": "5.42.3-beta.1",
|
|
64
64
|
"rimraf": "6.0.1",
|
|
65
65
|
"ttypescript": "1.5.15",
|
|
66
66
|
"typescript": "4.9.5"
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"build": "node ../cli/bin.js run build",
|
|
74
74
|
"watch": "node ../cli/bin.js run watch"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "fdf4a5e06080e16be06ca5b538fd17ed70603706"
|
|
77
77
|
}
|