@webiny/api-headless-cms 6.4.4-beta.1 → 6.4.4-beta.10
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/features/modelBuilder/fields/DynamicZoneFieldType.js +8 -3
- package/features/modelBuilder/fields/DynamicZoneFieldType.js.map +1 -1
- package/graphql/schema/cms/helpers/transformWhereToNested.js +39 -17
- package/graphql/schema/cms/helpers/transformWhereToNested.js.map +1 -1
- package/package.json +28 -28
- package/types/fields/dynamicZoneField.d.ts +2 -2
|
@@ -14,12 +14,17 @@ class DynamicZoneFieldBuilder extends DataFieldBuilder {
|
|
|
14
14
|
template(id, config) {
|
|
15
15
|
const fieldBuilders = config.fields(this.registry);
|
|
16
16
|
const fields = [];
|
|
17
|
+
const layoutReplacements = new Map();
|
|
17
18
|
for (const [key, fieldBuilder] of Object.entries(fieldBuilders)){
|
|
18
19
|
fieldBuilder.fieldId(key);
|
|
19
20
|
const result = fieldBuilder.build();
|
|
20
|
-
if ("
|
|
21
|
-
|
|
21
|
+
if ("layout" === result.type) {
|
|
22
|
+
layoutReplacements.set(key, result.layoutCell);
|
|
23
|
+
if (result.fields) fields.push(...result.fields);
|
|
24
|
+
} else fields.push(result.field);
|
|
22
25
|
}
|
|
26
|
+
const rawLayout = config.layout || [];
|
|
27
|
+
const layout = rawLayout.map((row)=>row.map((cell)=>layoutReplacements.get(cell) ?? cell));
|
|
23
28
|
this.templates.push({
|
|
24
29
|
id,
|
|
25
30
|
name: config.name,
|
|
@@ -27,7 +32,7 @@ class DynamicZoneFieldBuilder extends DataFieldBuilder {
|
|
|
27
32
|
icon: config.icon,
|
|
28
33
|
description: config.description || "",
|
|
29
34
|
fields,
|
|
30
|
-
layout
|
|
35
|
+
layout,
|
|
31
36
|
validation: []
|
|
32
37
|
});
|
|
33
38
|
return this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/modelBuilder/fields/DynamicZoneFieldType.js","sources":["../../../../src/features/modelBuilder/fields/DynamicZoneFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"./abstractions.js\";\nimport { type FieldBuildResult } from \"./BaseFieldBuilder.js\";\nimport { DataFieldBuilder, type BaseFieldBuilder } from \"./FieldBuilder.js\";\nimport { type IFieldBuilderRegistry } from \"../abstractions.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"features/modelBuilder/fields/DynamicZoneFieldType.js","sources":["../../../../src/features/modelBuilder/fields/DynamicZoneFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"./abstractions.js\";\nimport { type FieldBuildResult } from \"./BaseFieldBuilder.js\";\nimport { DataFieldBuilder, type BaseFieldBuilder } from \"./FieldBuilder.js\";\nimport { type IFieldBuilderRegistry } from \"../abstractions.js\";\nimport type {\n CmsIcon,\n CmsModelField,\n CmsModelFieldValidation,\n CmsModelLayoutCell\n} from \"~/types/index.js\";\n\ninterface IDynamicZoneTemplate {\n id: string;\n name: string;\n gqlTypeName: string;\n icon: CmsIcon | undefined;\n description: string;\n fields: any[];\n layout: CmsModelLayoutCell[][];\n validation: CmsModelFieldValidation[];\n}\n\nexport interface IDynamicZoneFieldBuilder extends DataFieldBuilder<\"dynamicZone\"> {\n required(message?: string): this;\n template(\n id: string,\n config: {\n name: string;\n gqlTypeName: string;\n icon?: CmsIcon;\n description?: string;\n fields: (registry: IFieldBuilderRegistry) => Record<string, BaseFieldBuilder<any>>;\n layout?: string[][];\n }\n ): this;\n}\n\ninterface IDynamicZoneFieldBuilderTemplateConfig {\n name: string;\n gqlTypeName: string;\n icon?: CmsIcon;\n description?: string;\n fields: (registry: IFieldBuilderRegistry) => Record<string, BaseFieldBuilder<any>>;\n layout?: string[][];\n}\n\nclass DynamicZoneFieldBuilder\n extends DataFieldBuilder<\"dynamicZone\">\n implements IDynamicZoneFieldBuilder\n{\n private readonly templates: IDynamicZoneTemplate[] = [];\n\n public constructor(private registry: IFieldBuilderRegistry) {\n super(\"dynamicZone\");\n }\n\n public required(message?: string): this {\n return this.validation({\n name: \"required\",\n message: message || \"Field is required\",\n settings: {}\n });\n }\n\n public template(id: string, config: IDynamicZoneFieldBuilderTemplateConfig): this {\n const fieldBuilders = config.fields(this.registry);\n const fields: CmsModelField[] = [];\n const layoutReplacements = new Map<string, CmsModelLayoutCell>();\n\n for (const [key, fieldBuilder] of Object.entries(fieldBuilders)) {\n fieldBuilder.fieldId(key);\n const result: FieldBuildResult = (fieldBuilder as any).build();\n if (result.type === \"layout\") {\n layoutReplacements.set(key, result.layoutCell);\n if (result.fields) {\n fields.push(...result.fields);\n }\n } else {\n fields.push(result.field);\n }\n }\n\n const rawLayout: string[][] = config.layout || [];\n const layout = rawLayout.map(row => row.map(cell => layoutReplacements.get(cell) ?? cell));\n\n this.templates.push({\n id,\n name: config.name,\n gqlTypeName: config.gqlTypeName,\n icon: config.icon,\n description: config.description || \"\",\n fields,\n layout,\n validation: []\n });\n\n return this;\n }\n\n public override build() {\n // Set templates in settings before building\n this.config.settings = this.config.settings || {};\n this.config.settings.templates = this.templates;\n this.config.listValidation = [{ name: \"dynamicZone\", message: \"\" }];\n return super.build();\n }\n}\n\nclass DynamicZoneFieldTypeFactory implements IFieldTypeFactory {\n public readonly type = \"dynamicZone\";\n\n public create(registry: IFieldBuilderRegistry): IDynamicZoneFieldBuilder {\n return new DynamicZoneFieldBuilder(registry);\n }\n}\n\nexport const DynamicZoneFieldType = FieldType.createImplementation({\n implementation: DynamicZoneFieldTypeFactory,\n dependencies: []\n});\n\n// Module augmentation for TypeScript autocomplete\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n dynamicZone(): IDynamicZoneFieldBuilder;\n }\n}\n"],"names":["DynamicZoneFieldBuilder","DataFieldBuilder","registry","message","id","config","fieldBuilders","fields","layoutReplacements","Map","key","fieldBuilder","Object","result","rawLayout","layout","row","cell","DynamicZoneFieldTypeFactory","DynamicZoneFieldType","FieldType"],"mappings":";;AA8CA,MAAMA,gCACMC;IAKR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AAC,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;QAC/C,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG;YAAC;gBAAE,MAAM;gBAAe,SAAS;YAAG;SAAE;QACnE,OAAO,KAAK,CAAC;IACjB;AACJ;AAEA,MAAMG;IAGK,OAAOhB,QAA+B,EAA4B;QACrE,OAAO,IAAIF,wBAAwBE;IACvC;;aAJgB,IAAI,GAAG;;AAK3B;AAEO,MAAMiB,uBAAuBC,UAAU,oBAAoB,CAAC;IAC/D,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,26 +1,48 @@
|
|
|
1
|
+
const FORBIDDEN_KEYS = new Set([
|
|
2
|
+
"__proto__",
|
|
3
|
+
"prototype",
|
|
4
|
+
"constructor"
|
|
5
|
+
]);
|
|
1
6
|
const transformWhereToNested = (where)=>{
|
|
2
7
|
if (!where) return;
|
|
3
|
-
|
|
4
|
-
for (const [key, value] of Object.entries(where)){
|
|
8
|
+
return Object.entries(where).reduce((result, [key, value])=>{
|
|
5
9
|
if ("AND" === key || "OR" === key) {
|
|
6
|
-
if (Array.isArray(value))
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
if (!Array.isArray(value)) return {
|
|
11
|
+
...result,
|
|
12
|
+
[key]: value
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
...result,
|
|
16
|
+
[key]: value.map((item)=>transformWhereToNested(item))
|
|
17
|
+
};
|
|
9
18
|
}
|
|
10
19
|
const dotIndex = key.indexOf(".");
|
|
11
|
-
if (-1 === dotIndex)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const expanded = transformWhereToNested({
|
|
18
|
-
[tail]: value
|
|
19
|
-
});
|
|
20
|
-
Object.assign(nested, expanded);
|
|
20
|
+
if (-1 === dotIndex) {
|
|
21
|
+
if (FORBIDDEN_KEYS.has(key)) throw new Error(`Invalid where key: "${key}".`);
|
|
22
|
+
return {
|
|
23
|
+
...result,
|
|
24
|
+
[key]: value
|
|
25
|
+
};
|
|
21
26
|
}
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
const head = key.slice(0, dotIndex);
|
|
28
|
+
const tail = key.slice(dotIndex + 1);
|
|
29
|
+
if (FORBIDDEN_KEYS.has(head)) throw new Error(`Invalid where key: "${head}".`);
|
|
30
|
+
if (Object.hasOwn(result, head)) return {
|
|
31
|
+
...result,
|
|
32
|
+
[head]: {
|
|
33
|
+
...result[head],
|
|
34
|
+
...transformWhereToNested({
|
|
35
|
+
[tail]: value
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
...result,
|
|
41
|
+
[head]: transformWhereToNested({
|
|
42
|
+
[tail]: value
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}, {});
|
|
24
46
|
};
|
|
25
47
|
export { transformWhereToNested };
|
|
26
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/helpers/transformWhereToNested.js","sources":["../../../../../src/graphql/schema/cms/helpers/transformWhereToNested.ts"],"sourcesContent":["/**\n * Transforms a flat where object with dot-notation keys into a nested object.\n * Keys without dots are passed through unchanged.\n * Handles logical operators (AND, OR) recursively.\n *\n * @param where - Where clause object potentially containing dot-notation keys\n * @returns Nested where object compatible with the GraphQL ListWhereInput type\n *\n * @example\n * transformWhereToNested({ \"values.name\": \"Keyboard\", id: \"abc\" })\n * // Returns: { values: { name: \"Keyboard\" }, id: \"abc\" }\n *\n * @example\n * transformWhereToNested({ \"values.price_gt\": 100, \"values.name_contains\": \"board\" })\n * // Returns: { values: { price_gt: 100, name_contains: \"board\" } }\n */\nexport const transformWhereToNested = (\n where?: Record<string, unknown>\n): Record<string, unknown> | undefined => {\n if (!where) {\n return undefined;\n }\n\n
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/helpers/transformWhereToNested.js","sources":["../../../../../src/graphql/schema/cms/helpers/transformWhereToNested.ts"],"sourcesContent":["const FORBIDDEN_KEYS = new Set([\"__proto__\", \"prototype\", \"constructor\"]);\n\n/**\n * Transforms a flat where object with dot-notation keys into a nested object.\n * Keys without dots are passed through unchanged.\n * Handles logical operators (AND, OR) recursively.\n *\n * @param where - Where clause object potentially containing dot-notation keys\n * @returns Nested where object compatible with the GraphQL ListWhereInput type\n *\n * @example\n * transformWhereToNested({ \"values.name\": \"Keyboard\", id: \"abc\" })\n * // Returns: { values: { name: \"Keyboard\" }, id: \"abc\" }\n *\n * @example\n * transformWhereToNested({ \"values.price_gt\": 100, \"values.name_contains\": \"board\" })\n * // Returns: { values: { price_gt: 100, name_contains: \"board\" } }\n */\nexport const transformWhereToNested = (\n where?: Record<string, unknown>\n): Record<string, unknown> | undefined => {\n if (!where) {\n return undefined;\n }\n\n return Object.entries(where).reduce<Record<string, unknown>>((result, [key, value]) => {\n if (key === \"AND\" || key === \"OR\") {\n if (!Array.isArray(value)) {\n return {\n ...result,\n [key]: value\n };\n }\n return {\n ...result,\n [key]: value.map(item => transformWhereToNested(item))\n };\n }\n\n const dotIndex = key.indexOf(\".\");\n\n if (dotIndex === -1) {\n if (FORBIDDEN_KEYS.has(key)) {\n throw new Error(`Invalid where key: \"${key}\".`);\n }\n return {\n ...result,\n [key]: value\n };\n }\n\n const head = key.slice(0, dotIndex);\n const tail = key.slice(dotIndex + 1);\n\n if (FORBIDDEN_KEYS.has(head)) {\n throw new Error(`Invalid where key: \"${head}\".`);\n }\n\n if (Object.hasOwn(result, head)) {\n return {\n ...result,\n [head]: {\n ...(result[head] as Record<string, unknown>),\n ...transformWhereToNested({ [tail]: value })\n }\n };\n }\n\n return {\n ...result,\n [head]: transformWhereToNested({ [tail]: value })\n };\n }, {});\n};\n"],"names":["FORBIDDEN_KEYS","Set","transformWhereToNested","where","Object","result","key","value","Array","item","dotIndex","Error","head","tail"],"mappings":"AAAA,MAAMA,iBAAiB,IAAIC,IAAI;IAAC;IAAa;IAAa;CAAc;AA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-cms",
|
|
3
|
-
"version": "6.4.4-beta.
|
|
3
|
+
"version": "6.4.4-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
],
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@babel/code-frame": "
|
|
26
|
-
"@graphql-tools/merge": "9.
|
|
27
|
-
"@graphql-tools/schema": "10.0.
|
|
28
|
-
"@webiny/api": "6.4.4-beta.
|
|
29
|
-
"@webiny/api-core": "6.4.4-beta.
|
|
30
|
-
"@webiny/di": "1.0.
|
|
31
|
-
"@webiny/error": "6.4.4-beta.
|
|
32
|
-
"@webiny/feature": "6.4.4-beta.
|
|
33
|
-
"@webiny/handler": "6.4.4-beta.
|
|
34
|
-
"@webiny/handler-aws": "6.4.4-beta.
|
|
35
|
-
"@webiny/handler-db": "6.4.4-beta.
|
|
36
|
-
"@webiny/handler-graphql": "6.4.4-beta.
|
|
37
|
-
"@webiny/plugins": "6.4.4-beta.
|
|
38
|
-
"@webiny/project": "6.4.4-beta.
|
|
39
|
-
"@webiny/utils": "6.4.4-beta.
|
|
40
|
-
"@webiny/validation": "6.4.4-beta.
|
|
25
|
+
"@babel/code-frame": "8.0.0",
|
|
26
|
+
"@graphql-tools/merge": "9.2.0",
|
|
27
|
+
"@graphql-tools/schema": "10.0.36",
|
|
28
|
+
"@webiny/api": "6.4.4-beta.10",
|
|
29
|
+
"@webiny/api-core": "6.4.4-beta.10",
|
|
30
|
+
"@webiny/di": "1.0.2",
|
|
31
|
+
"@webiny/error": "6.4.4-beta.10",
|
|
32
|
+
"@webiny/feature": "6.4.4-beta.10",
|
|
33
|
+
"@webiny/handler": "6.4.4-beta.10",
|
|
34
|
+
"@webiny/handler-aws": "6.4.4-beta.10",
|
|
35
|
+
"@webiny/handler-db": "6.4.4-beta.10",
|
|
36
|
+
"@webiny/handler-graphql": "6.4.4-beta.10",
|
|
37
|
+
"@webiny/plugins": "6.4.4-beta.10",
|
|
38
|
+
"@webiny/project": "6.4.4-beta.10",
|
|
39
|
+
"@webiny/utils": "6.4.4-beta.10",
|
|
40
|
+
"@webiny/validation": "6.4.4-beta.10",
|
|
41
41
|
"dot-prop-immutable": "2.1.1",
|
|
42
42
|
"graphql": "16.14.2",
|
|
43
|
-
"graphql-tag": "2.12.
|
|
43
|
+
"graphql-tag": "2.12.7",
|
|
44
44
|
"lodash": "4.18.1",
|
|
45
|
-
"p-map": "7.0.
|
|
45
|
+
"p-map": "7.0.5",
|
|
46
46
|
"p-reduce": "3.0.0",
|
|
47
47
|
"pluralize": "8.0.0",
|
|
48
48
|
"slugify": "1.6.9",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/babel__code-frame": "7.27.0",
|
|
53
53
|
"@types/pluralize": "0.0.33",
|
|
54
|
-
"@webiny/aws-sdk": "6.4.4-beta.
|
|
55
|
-
"@webiny/build-tools": "6.4.4-beta.
|
|
56
|
-
"@webiny/db-dynamodb": "6.4.4-beta.
|
|
57
|
-
"@webiny/handler-db": "6.4.4-beta.
|
|
58
|
-
"@webiny/project-utils": "6.4.4-beta.
|
|
59
|
-
"@webiny/sdk": "6.4.4-beta.
|
|
60
|
-
"@webiny/wcp": "6.4.4-beta.
|
|
54
|
+
"@webiny/aws-sdk": "6.4.4-beta.10",
|
|
55
|
+
"@webiny/build-tools": "6.4.4-beta.10",
|
|
56
|
+
"@webiny/db-dynamodb": "6.4.4-beta.10",
|
|
57
|
+
"@webiny/handler-db": "6.4.4-beta.10",
|
|
58
|
+
"@webiny/project-utils": "6.4.4-beta.10",
|
|
59
|
+
"@webiny/sdk": "6.4.4-beta.10",
|
|
60
|
+
"@webiny/wcp": "6.4.4-beta.10",
|
|
61
61
|
"apollo-graphql": "0.9.7",
|
|
62
62
|
"graphql": "16.14.2",
|
|
63
|
-
"oxfmt": "0.
|
|
63
|
+
"oxfmt": "0.58.0",
|
|
64
64
|
"rimraf": "6.1.3",
|
|
65
65
|
"typescript": "6.0.3",
|
|
66
|
-
"vitest": "4.1.
|
|
66
|
+
"vitest": "4.1.10",
|
|
67
67
|
"write-json-file": "7.0.0"
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CmsModelField, CmsModelFieldValidation } from "../modelField.js";
|
|
2
|
-
import type { CmsIcon } from "../../types/index.js";
|
|
2
|
+
import type { CmsIcon, CmsModelLayoutCell } from "../../types/index.js";
|
|
3
3
|
export interface CmsDynamicZoneTemplate {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
@@ -7,7 +7,7 @@ export interface CmsDynamicZoneTemplate {
|
|
|
7
7
|
description: string;
|
|
8
8
|
icon?: CmsIcon;
|
|
9
9
|
fields: CmsModelField[];
|
|
10
|
-
layout:
|
|
10
|
+
layout: CmsModelLayoutCell[][];
|
|
11
11
|
validation: CmsModelFieldValidation[];
|
|
12
12
|
tags?: string[];
|
|
13
13
|
}
|