@webiny/app 5.35.2 → 5.36.0-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.
Files changed (3) hide show
  1. package/package.json +10 -10
  2. package/types.d.ts +16 -6
  3. package/types.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app",
3
- "version": "5.35.2",
3
+ "version": "5.36.0-beta.1",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,12 +19,12 @@
19
19
  "@emotion/styled": "11.10.6",
20
20
  "@types/react": "17.0.39",
21
21
  "@types/web": "0.0.61",
22
- "@webiny/i18n": "^5.35.2",
23
- "@webiny/i18n-react": "^5.35.2",
24
- "@webiny/plugins": "^5.35.2",
25
- "@webiny/react-composition": "^5.35.2",
26
- "@webiny/react-router": "^5.35.2",
27
- "@webiny/ui": "^5.35.2",
22
+ "@webiny/i18n": "5.36.0-beta.1",
23
+ "@webiny/i18n-react": "5.36.0-beta.1",
24
+ "@webiny/plugins": "5.36.0-beta.1",
25
+ "@webiny/react-composition": "5.36.0-beta.1",
26
+ "@webiny/react-router": "5.36.0-beta.1",
27
+ "@webiny/ui": "5.36.0-beta.1",
28
28
  "apollo-cache": "1.3.5",
29
29
  "apollo-cache-inmemory": "1.6.6",
30
30
  "apollo-client": "2.6.10",
@@ -52,8 +52,8 @@
52
52
  "@babel/preset-typescript": "7.18.6",
53
53
  "@types/lodash.debounce": "4.0.7",
54
54
  "@types/warning": "3.0.0",
55
- "@webiny/cli": "^5.35.2",
56
- "@webiny/project-utils": "^5.35.2",
55
+ "@webiny/cli": "5.36.0-beta.1",
56
+ "@webiny/project-utils": "5.36.0-beta.1",
57
57
  "babel-plugin-lodash": "3.3.4",
58
58
  "rimraf": "3.0.2",
59
59
  "typescript": "4.7.4"
@@ -74,5 +74,5 @@
74
74
  ]
75
75
  }
76
76
  },
77
- "gitHead": "d3f7b134892b6c5ea794e9e7dd4811b27cdf6eb1"
77
+ "gitHead": "db7103cc3e74c3c71c2b88e50ef0fd19ae7c3fd2"
78
78
  }
package/types.d.ts CHANGED
@@ -11,27 +11,37 @@ export interface FileItem {
11
11
  size: number;
12
12
  type: string;
13
13
  tags: string[];
14
+ aliases: string[];
14
15
  createdOn: string;
15
16
  createdBy: {
16
17
  id: string;
18
+ displayName: string;
17
19
  };
18
20
  [key: string]: any;
19
21
  }
20
22
  export declare type UploadOptions = {
21
23
  apolloClient: ApolloClient<object>;
22
- onProgress?: (progress: number) => void;
24
+ onProgress?: (params: {
25
+ sent: number;
26
+ total: number;
27
+ percentage: number;
28
+ }) => void;
23
29
  };
24
30
  export declare type UiStatePlugin = Plugin & {
25
31
  type: "ui-state";
26
32
  render(): React.ReactElement;
27
33
  };
34
+ export interface UploadedFile {
35
+ id: string;
36
+ name: string;
37
+ type: string;
38
+ size: number;
39
+ key: string;
40
+ }
28
41
  export declare type FileUploaderPlugin = Plugin & {
29
42
  type: "file-uploader";
30
- upload(file: File, options: UploadOptions): Promise<any>;
31
- };
32
- export declare type AppFileManagerStoragePlugin = Plugin & {
33
- type: "app-file-manager-storage";
34
- upload(file: File, options: UploadOptions): Promise<any>;
43
+ name: "file-uploader";
44
+ upload(file: File, options: UploadOptions): Promise<UploadedFile>;
35
45
  };
36
46
  export { Plugin };
37
47
  export interface ImageProps {
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { ApolloClient } from \"apollo-client\";\nimport { CSSProperties } from \"react\";\n\nexport interface FileItem {\n id: string;\n name: string;\n key: string;\n src: string;\n size: number;\n type: string;\n tags: string[];\n createdOn: string;\n createdBy: {\n id: string;\n };\n [key: string]: any;\n}\n\nexport type UploadOptions = {\n apolloClient: ApolloClient<object>;\n onProgress?: (progress: number) => void;\n};\n\nexport type UiStatePlugin = Plugin & {\n type: \"ui-state\";\n render(): React.ReactElement;\n};\n\nexport type FileUploaderPlugin = Plugin & {\n type: \"file-uploader\";\n // TODO: @adrian define type for the returned object\n upload(file: File, options: UploadOptions): Promise<any>;\n};\n\nexport type AppFileManagerStoragePlugin = Plugin & {\n type: \"app-file-manager-storage\";\n // TODO: @adrian define type for the returned object\n upload(file: File, options: UploadOptions): Promise<any>;\n};\n\nexport { Plugin };\n\nexport interface ImageProps {\n src: string;\n preset?: string;\n transform?: {\n [key: string]: any;\n };\n // \"auto\" is a special keyword - if present, plugins insert their own srcSet.\n srcSet?: { [key: string]: any } | \"auto\";\n className?: string;\n title?: string;\n alt?: string;\n style?: CSSProperties;\n width?: string | number;\n height?: string | number;\n}\n\n/**\n * \"getImageSrc\" has to be defined as a separate property, so its functionality can be reused outside of\n * the Image component. This is ideal in cases where manual creation of image src is needed.\n */\nexport type ImageComponentPlugin = Plugin & {\n type: \"image-component\";\n render: (props: ImageProps) => React.ReactElement;\n getImageSrc: (props?: Record<string, any>) => string;\n presets: { [key: string]: any };\n};\n\n/**\n * Enables registering new routes.\n * @see https://docs.webiny.com/docs/webiny-apps/admin/development/plugins-reference/app#route\n */\nexport type RoutePlugin = Plugin & {\n type: \"route\";\n route: React.ReactElement;\n};\n"],"mappings":";;;;;;;;;;;AACA"}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { ApolloClient } from \"apollo-client\";\nimport { CSSProperties } from \"react\";\n\nexport interface FileItem {\n id: string;\n name: string;\n key: string;\n src: string;\n size: number;\n type: string;\n tags: string[];\n aliases: string[];\n createdOn: string;\n createdBy: {\n id: string;\n displayName: string;\n };\n [key: string]: any;\n}\n\nexport type UploadOptions = {\n apolloClient: ApolloClient<object>;\n onProgress?: (params: { sent: number; total: number; percentage: number }) => void;\n};\n\nexport type UiStatePlugin = Plugin & {\n type: \"ui-state\";\n render(): React.ReactElement;\n};\n\nexport interface UploadedFile {\n id: string;\n name: string;\n type: string;\n size: number;\n key: string;\n}\n\nexport type FileUploaderPlugin = Plugin & {\n type: \"file-uploader\";\n name: \"file-uploader\";\n upload(file: File, options: UploadOptions): Promise<UploadedFile>;\n};\n\nexport { Plugin };\n\nexport interface ImageProps {\n src: string;\n preset?: string;\n transform?: {\n [key: string]: any;\n };\n // \"auto\" is a special keyword - if present, plugins insert their own srcSet.\n srcSet?: { [key: string]: any } | \"auto\";\n className?: string;\n title?: string;\n alt?: string;\n style?: CSSProperties;\n width?: string | number;\n height?: string | number;\n}\n\n/**\n * \"getImageSrc\" has to be defined as a separate property, so its functionality can be reused outside of\n * the Image component. This is ideal in cases where manual creation of image src is needed.\n */\nexport type ImageComponentPlugin = Plugin & {\n type: \"image-component\";\n render: (props: ImageProps) => React.ReactElement;\n getImageSrc: (props?: Record<string, any>) => string;\n presets: { [key: string]: any };\n};\n\n/**\n * Enables registering new routes.\n * @see https://docs.webiny.com/docs/webiny-apps/admin/development/plugins-reference/app#route\n */\nexport type RoutePlugin = Plugin & {\n type: \"route\";\n route: React.ReactElement;\n};\n"],"mappings":";;;;;;;;;;;AACA"}