@webiny/app-aco 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.f9f12f52a0
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/config/AcoConfig.d.ts +5 -5
- package/config/AcoConfig.js +0 -5
- package/config/AcoConfig.js.map +1 -1
- package/contexts/index.d.ts +1 -1
- package/contexts/index.js +1 -1
- package/contexts/index.js.map +1 -1
- package/package.json +18 -18
- package/types.d.ts +1 -1
- package/types.js +0 -1
- package/types.js.map +1 -1
package/config/AcoConfig.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export { FieldRendererConfig as AdvancedSearchFieldRendererConfig } from "./advanced-search/FieldRenderer";
|
|
3
|
-
export { ActionConfig as RecordActionConfig } from "./record/Action";
|
|
4
|
-
export { ActionConfig as FolderActionConfig } from "./folder/Action";
|
|
5
|
-
export { ColumnConfig as TableColumnConfig } from "./table/Column";
|
|
6
|
-
export { SortingConfig as TableSortingConfig } from "./table/Sorting";
|
|
2
|
+
export type { FieldRendererConfig as AdvancedSearchFieldRendererConfig } from "./advanced-search/FieldRenderer";
|
|
3
|
+
export type { ActionConfig as RecordActionConfig } from "./record/Action";
|
|
4
|
+
export type { ActionConfig as FolderActionConfig } from "./folder/Action";
|
|
5
|
+
export type { ColumnConfig as TableColumnConfig } from "./table/Column";
|
|
6
|
+
export type { SortingConfig as TableSortingConfig } from "./table/Sorting";
|
|
7
7
|
export declare const AcoConfig: (({ priority, children }: import("@webiny/react-properties").ConfigProps) => import("react").JSX.Element) & {
|
|
8
8
|
AdvancedSearch: {
|
|
9
9
|
FieldRenderer: (({ name, type, element }: import("./advanced-search/FieldRenderer").FieldRendererProps) => import("react").JSX.Element) & {
|
package/config/AcoConfig.js
CHANGED
|
@@ -4,11 +4,6 @@ import { AdvancedSearch } from "./advanced-search";
|
|
|
4
4
|
import { Record } from "./record";
|
|
5
5
|
import { Folder } from "./folder";
|
|
6
6
|
import { Table } from "./table";
|
|
7
|
-
export { FieldRendererConfig as AdvancedSearchFieldRendererConfig } from "./advanced-search/FieldRenderer";
|
|
8
|
-
export { ActionConfig as RecordActionConfig } from "./record/Action";
|
|
9
|
-
export { ActionConfig as FolderActionConfig } from "./folder/Action";
|
|
10
|
-
export { ColumnConfig as TableColumnConfig } from "./table/Column";
|
|
11
|
-
export { SortingConfig as TableSortingConfig } from "./table/Sorting";
|
|
12
7
|
const base = createConfigurableComponent("AcoConfig");
|
|
13
8
|
export const AcoConfig = Object.assign(base.Config, {
|
|
14
9
|
AdvancedSearch,
|
package/config/AcoConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","createConfigurableComponent","AdvancedSearch","Record","Folder","Table","
|
|
1
|
+
{"version":3,"names":["useMemo","createConfigurableComponent","AdvancedSearch","Record","Folder","Table","base","AcoConfig","Object","assign","Config","AcoWithConfig","WithConfig","useAcoConfig","config","useConfig","advancedSearch","folder","record","table","fieldRenderers","actions","columns","sorting"],"sources":["AcoConfig.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport type { AdvancedSearchConfig } from \"./advanced-search\";\nimport { AdvancedSearch } from \"./advanced-search\";\nimport type { RecordConfig } from \"./record\";\nimport { Record } from \"./record\";\nimport type { FolderConfig } from \"./folder\";\nimport { Folder } from \"./folder\";\nimport type { TableConfig } from \"~/config/table\";\nimport { Table } from \"~/config/table\";\n\nexport type { FieldRendererConfig as AdvancedSearchFieldRendererConfig } from \"./advanced-search/FieldRenderer\";\nexport type { ActionConfig as RecordActionConfig } from \"./record/Action\";\nexport type { ActionConfig as FolderActionConfig } from \"./folder/Action\";\nexport type { ColumnConfig as TableColumnConfig } from \"./table/Column\";\nexport type { SortingConfig as TableSortingConfig } from \"./table/Sorting\";\n\nconst base = createConfigurableComponent<AcoConfig>(\"AcoConfig\");\n\nexport const AcoConfig = Object.assign(base.Config, { AdvancedSearch, Folder, Record, Table });\nexport const AcoWithConfig = base.WithConfig;\n\ninterface AcoConfig {\n advancedSearch: AdvancedSearchConfig;\n record: RecordConfig;\n folder: FolderConfig;\n table: TableConfig;\n}\n\nexport function useAcoConfig() {\n const config = base.useConfig();\n\n const advancedSearch = config.advancedSearch || {};\n const folder = config.folder || {};\n const record = config.record || {};\n const table = config.table || {};\n\n return useMemo(\n () => ({\n advancedSearch: {\n ...advancedSearch,\n fieldRenderers: [...(advancedSearch.fieldRenderers || [])]\n },\n folder: {\n ...folder,\n actions: [...(folder.actions || [])]\n },\n record: {\n ...record,\n actions: [...(record.actions || [])]\n },\n table: {\n ...table,\n columns: [...(table.columns || [])],\n sorting: [...(table.sorting || [])]\n }\n }),\n [config]\n );\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,2BAA2B,QAAQ,0BAA0B;AAEtE,SAASC,cAAc;AAEvB,SAASC,MAAM;AAEf,SAASC,MAAM;AAEf,SAASC,KAAK;AAQd,MAAMC,IAAI,GAAGL,2BAA2B,CAAY,WAAW,CAAC;AAEhE,OAAO,MAAMM,SAAS,GAAGC,MAAM,CAACC,MAAM,CAACH,IAAI,CAACI,MAAM,EAAE;EAAER,cAAc;EAAEE,MAAM;EAAED,MAAM;EAAEE;AAAM,CAAC,CAAC;AAC9F,OAAO,MAAMM,aAAa,GAAGL,IAAI,CAACM,UAAU;AAS5C,OAAO,SAASC,YAAYA,CAAA,EAAG;EAC3B,MAAMC,MAAM,GAAGR,IAAI,CAACS,SAAS,CAAC,CAAC;EAE/B,MAAMC,cAAc,GAAGF,MAAM,CAACE,cAAc,IAAI,CAAC,CAAC;EAClD,MAAMC,MAAM,GAAGH,MAAM,CAACG,MAAM,IAAI,CAAC,CAAC;EAClC,MAAMC,MAAM,GAAGJ,MAAM,CAACI,MAAM,IAAI,CAAC,CAAC;EAClC,MAAMC,KAAK,GAAGL,MAAM,CAACK,KAAK,IAAI,CAAC,CAAC;EAEhC,OAAOnB,OAAO,CACV,OAAO;IACHgB,cAAc,EAAE;MACZ,GAAGA,cAAc;MACjBI,cAAc,EAAE,CAAC,IAAIJ,cAAc,CAACI,cAAc,IAAI,EAAE,CAAC;IAC7D,CAAC;IACDH,MAAM,EAAE;MACJ,GAAGA,MAAM;MACTI,OAAO,EAAE,CAAC,IAAIJ,MAAM,CAACI,OAAO,IAAI,EAAE,CAAC;IACvC,CAAC;IACDH,MAAM,EAAE;MACJ,GAAGA,MAAM;MACTG,OAAO,EAAE,CAAC,IAAIH,MAAM,CAACG,OAAO,IAAI,EAAE,CAAC;IACvC,CAAC;IACDF,KAAK,EAAE;MACH,GAAGA,KAAK;MACRG,OAAO,EAAE,CAAC,IAAIH,KAAK,CAACG,OAAO,IAAI,EAAE,CAAC,CAAC;MACnCC,OAAO,EAAE,CAAC,IAAIJ,KAAK,CAACI,OAAO,IAAI,EAAE,CAAC;IACtC;EACJ,CAAC,CAAC,EACF,CAACT,MAAM,CACX,CAAC;AACL","ignoreList":[]}
|
package/contexts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AcoAppProvider as AcoProvider, AcoAppProviderProps } from "./app";
|
|
1
|
+
export { AcoAppProvider as AcoProvider, type AcoAppProviderProps } from "./app";
|
|
2
2
|
export * from "./folder";
|
package/contexts/index.js
CHANGED
package/contexts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AcoAppProvider","AcoProvider"
|
|
1
|
+
{"version":3,"names":["AcoAppProvider","AcoProvider"],"sources":["index.tsx"],"sourcesContent":["export { AcoAppProvider as AcoProvider, type AcoAppProviderProps } from \"~/contexts/app\";\nexport * from \"./folder\";\n"],"mappings":"AAAA,SAASA,cAAc,IAAIC,WAAW;AACtC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-aco",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.f9f12f52a0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@apollo/react-hooks": "3.1.5",
|
|
15
|
-
"@webiny/admin-ui": "0.0.0-unstable.
|
|
16
|
-
"@webiny/app": "0.0.0-unstable.
|
|
17
|
-
"@webiny/app-admin": "0.0.0-unstable.
|
|
18
|
-
"@webiny/app-headless-cms-common": "0.0.0-unstable.
|
|
19
|
-
"@webiny/app-security": "0.0.0-unstable.
|
|
20
|
-
"@webiny/app-utils": "0.0.0-unstable.
|
|
21
|
-
"@webiny/app-wcp": "0.0.0-unstable.
|
|
22
|
-
"@webiny/form": "0.0.0-unstable.
|
|
23
|
-
"@webiny/icons": "0.0.0-unstable.
|
|
24
|
-
"@webiny/plugins": "0.0.0-unstable.
|
|
25
|
-
"@webiny/react-properties": "0.0.0-unstable.
|
|
26
|
-
"@webiny/react-router": "0.0.0-unstable.
|
|
27
|
-
"@webiny/shared-aco": "0.0.0-unstable.
|
|
28
|
-
"@webiny/utils": "0.0.0-unstable.
|
|
29
|
-
"@webiny/validation": "0.0.0-unstable.
|
|
15
|
+
"@webiny/admin-ui": "0.0.0-unstable.f9f12f52a0",
|
|
16
|
+
"@webiny/app": "0.0.0-unstable.f9f12f52a0",
|
|
17
|
+
"@webiny/app-admin": "0.0.0-unstable.f9f12f52a0",
|
|
18
|
+
"@webiny/app-headless-cms-common": "0.0.0-unstable.f9f12f52a0",
|
|
19
|
+
"@webiny/app-security": "0.0.0-unstable.f9f12f52a0",
|
|
20
|
+
"@webiny/app-utils": "0.0.0-unstable.f9f12f52a0",
|
|
21
|
+
"@webiny/app-wcp": "0.0.0-unstable.f9f12f52a0",
|
|
22
|
+
"@webiny/form": "0.0.0-unstable.f9f12f52a0",
|
|
23
|
+
"@webiny/icons": "0.0.0-unstable.f9f12f52a0",
|
|
24
|
+
"@webiny/plugins": "0.0.0-unstable.f9f12f52a0",
|
|
25
|
+
"@webiny/react-properties": "0.0.0-unstable.f9f12f52a0",
|
|
26
|
+
"@webiny/react-router": "0.0.0-unstable.f9f12f52a0",
|
|
27
|
+
"@webiny/shared-aco": "0.0.0-unstable.f9f12f52a0",
|
|
28
|
+
"@webiny/utils": "0.0.0-unstable.f9f12f52a0",
|
|
29
|
+
"@webiny/validation": "0.0.0-unstable.f9f12f52a0",
|
|
30
30
|
"dot-prop-immutable": "2.1.1",
|
|
31
31
|
"graphql": "15.9.0",
|
|
32
32
|
"graphql-tag": "2.12.6",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "18.2.79",
|
|
46
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
46
|
+
"@webiny/project-utils": "0.0.0-unstable.f9f12f52a0",
|
|
47
47
|
"apollo-client": "2.6.10",
|
|
48
48
|
"apollo-link": "1.2.14",
|
|
49
49
|
"rimraf": "6.0.1",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"build": "node ../cli/bin.js run build",
|
|
58
58
|
"watch": "node ../cli/bin.js run watch"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f9f12f52a0e2f8e4a2987aa71b4104f70f5d68c8"
|
|
61
61
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CmsIdentity, CmsModel, CmsModelField, CmsModelFieldSettings } from "@webiny/app-headless-cms-common/types";
|
|
2
2
|
import type { FolderPermission } from "@webiny/shared-aco/types";
|
|
3
|
-
export { CmsIdentity } from "@webiny/app-headless-cms-common/types";
|
|
3
|
+
export type { CmsIdentity } from "@webiny/app-headless-cms-common/types";
|
|
4
4
|
export * from "@webiny/shared-aco/flp/flp.types";
|
|
5
5
|
export * from "./graphql/records/types";
|
|
6
6
|
export * from "./table.types";
|
package/types.js
CHANGED
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["LoadingActionsEnum","init","list","listMore","get","create","update","delete","move"],"sources":["types.ts"],"sourcesContent":["import type {\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 type { 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":"AASA,cAAc,kCAAkC;AAChD;AACA;AAuDA,OAAO,MAAMA,kBAAkB,GAAG;EAC9BC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,WAAW;EACrBC,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACV,CAAC;;AA4GD;AACA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
|