payload 1.14.0 → 1.15.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.
- package/dist/admin/components/elements/ReactSelect/index.js +3 -3
- package/dist/admin/components/elements/ReactSelect/index.js.map +1 -1
- package/dist/admin/components/elements/ReactSelect/types.d.ts +3 -0
- package/dist/admin/components/elements/WhereBuilder/field-types.js +10 -2
- package/dist/admin/components/elements/WhereBuilder/field-types.js.map +1 -1
- package/dist/admin/components/forms/field-types/Checkbox/Input.js +1 -1
- package/dist/admin/components/forms/field-types/Checkbox/Input.js.map +1 -1
- package/dist/admin/components/forms/field-types/Checkbox/index.js +1 -1
- package/dist/admin/components/forms/field-types/Checkbox/index.js.map +1 -1
- package/dist/admin/components/forms/field-types/Checkbox/index.scss +37 -14
- package/dist/admin/components/forms/field-types/Number/index.js +9 -2
- package/dist/admin/components/forms/field-types/Number/index.js.map +1 -1
- package/dist/config/sanitize.d.ts +1 -1
- package/dist/config/sanitize.js +25 -25
- package/dist/config/sanitize.js.map +1 -1
- package/dist/graphql/schema/buildWhereInputType.d.ts +14 -0
- package/dist/graphql/schema/buildWhereInputType.js +14 -7
- package/dist/graphql/schema/buildWhereInputType.js.map +1 -1
- package/dist/graphql/schema/operators.d.ts +1 -0
- package/dist/graphql/schema/operators.js +1 -0
- package/dist/graphql/schema/operators.js.map +1 -1
- package/dist/graphql/schema/withOperators.d.ts +12 -0
- package/dist/graphql/schema/withOperators.js +193 -78
- package/dist/graphql/schema/withOperators.js.map +1 -1
- package/dist/mongoose/buildQuery.js +1 -1
- package/dist/mongoose/buildQuery.js.map +1 -1
- package/dist/mongoose/operatorMap.d.ts +2 -0
- package/dist/mongoose/operatorMap.js +2 -0
- package/dist/mongoose/operatorMap.js.map +1 -1
- package/dist/mongoose/sanitizeQueryValue.js +6 -1
- package/dist/mongoose/sanitizeQueryValue.js.map +1 -1
- package/dist/translations/ar.json +2 -0
- package/dist/translations/az.json +2 -0
- package/dist/translations/bg.json +2 -0
- package/dist/translations/cs.json +2 -0
- package/dist/translations/de.json +2 -0
- package/dist/translations/en.json +2 -0
- package/dist/translations/es.json +2 -0
- package/dist/translations/fa.json +2 -0
- package/dist/translations/fr.json +2 -0
- package/dist/translations/hr.json +2 -0
- package/dist/translations/hu.json +2 -0
- package/dist/translations/index.d.ts +52 -0
- package/dist/translations/it.json +2 -0
- package/dist/translations/ja.json +2 -0
- package/dist/translations/my.json +2 -0
- package/dist/translations/nb.json +2 -0
- package/dist/translations/nl.json +2 -0
- package/dist/translations/pl.json +2 -0
- package/dist/translations/pt.json +2 -0
- package/dist/translations/ro.json +2 -0
- package/dist/translations/ru.json +2 -0
- package/dist/translations/sv.json +2 -0
- package/dist/translations/th.json +2 -0
- package/dist/translations/tr.json +2 -0
- package/dist/translations/ua.json +2 -0
- package/dist/translations/vi.json +2 -0
- package/dist/translations/zh.json +2 -0
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/constants.js +2 -0
- package/dist/types/constants.js.map +1 -1
- package/dist/utilities/checkDuplicateCollections.d.ts +2 -2
- package/dist/utilities/checkDuplicateCollections.js.map +1 -1
- package/dist/utilities/flattenWhereConstraints.js +15 -9
- package/dist/utilities/flattenWhereConstraints.js.map +1 -1
- package/package.json +1 -1
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"newPassword": "รหัสผ่านใหม่",
|
|
205
205
|
"noFiltersSet": "ไม่มีการกรอง",
|
|
206
206
|
"noLabel": "<ไม่มี {{label}}>",
|
|
207
|
+
"noOptions": "ไม่มีตัวเลือก",
|
|
207
208
|
"noResults": "ไม่พบ {{label}} เนื่องจากยังไม่มี {{label}} หรือไม่มี {{label}} ใดตรงกับการกรองด้านบน",
|
|
208
209
|
"noValue": "ไม่มีค่า",
|
|
209
210
|
"none": "ไม่มี",
|
|
@@ -286,6 +287,7 @@
|
|
|
286
287
|
"invalidSelection": "ค่าที่เลือกไม่ถูกต้อง",
|
|
287
288
|
"invalidSelections": "ค่าที่เลือกไม่ถูกต้องดังนี้:",
|
|
288
289
|
"lessThanMin": "{{value}} น้อยกว่าค่าต่ำสุดที่อนุญาตของ {{label}} ซึ่งคือ {{min}}.",
|
|
290
|
+
"limitReached": "ถึงขีดจำกัดแล้ว, สามารถเพิ่มไอเทมได้เพียง {{max}} ไอเทมเท่านั้น",
|
|
289
291
|
"longerThanMin": "ค่าต้องมีความยาวมากกว่า {{minLength}} ตัวอักษร",
|
|
290
292
|
"notValidDate": "วันที่ \"{{value}}\" ไม่ถูกต้อง",
|
|
291
293
|
"required": "จำเป็นต้องระบุค่า",
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"newPassword": "Yeni parola",
|
|
205
205
|
"noFiltersSet": "Tanımlı filtre yok",
|
|
206
206
|
"noLabel": "<{{label}} yok>",
|
|
207
|
+
"noOptions": "Seçenek yok",
|
|
207
208
|
"noResults": "{{label}} bulunamadı. Henüz bir {{label}} eklenmemiş olabilir veya seçtiğiniz filtrelerle eşleşen bir sonuç bulunamamış olabilir.",
|
|
208
209
|
"noValue": "Değer yok",
|
|
209
210
|
"none": "Hiç",
|
|
@@ -286,6 +287,7 @@
|
|
|
286
287
|
"invalidSelection": "Bu alanda geçersiz bir seçim mevcut.",
|
|
287
288
|
"invalidSelections": "'Bu alan şu geçersiz seçimlere sahip:'",
|
|
288
289
|
"lessThanMin": "{{value}} izin verilen minimum {{label}} değerinden daha küçük.",
|
|
290
|
+
"limitReached": "Sınır aşıldı, yalnızca {{max}} öğe eklenebilir.",
|
|
289
291
|
"longerThanMin": "Bu değer minimum {{minLength}} karakterden uzun olmalıdır.",
|
|
290
292
|
"notValidDate": "\"{{value}}\" geçerli bir tarih değil.",
|
|
291
293
|
"required": "Bu alan gereklidir.",
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"newPassword": "Новий пароль",
|
|
205
205
|
"noFiltersSet": "Відсусті фільтри",
|
|
206
206
|
"noLabel": "<без {{label}}>",
|
|
207
|
+
"noOptions": "Немає варіантів",
|
|
207
208
|
"noResults": "Жодного {{label}} не знайдено. Або {{label}} ще не існує, або жодна з них не відповідає фільтрам, які ви задали више.",
|
|
208
209
|
"noValue": "Немає значення",
|
|
209
210
|
"none": "Ніхто",
|
|
@@ -286,6 +287,7 @@
|
|
|
286
287
|
"invalidSelection": "Це поле має некоректний вибір.",
|
|
287
288
|
"invalidSelections": "Це поле має наступні невірні варіанти вибору:",
|
|
288
289
|
"lessThanMin": "{{value}} менше, ніж дозволено мінімуму {{label}} в {{min}}.",
|
|
290
|
+
"limitReached": "Досягнуто межі, можна додати лише {{max}} елементів.",
|
|
289
291
|
"longerThanMin": "Це значення має бути більше, ніж мінімальна довжина {{minLength}} characters.",
|
|
290
292
|
"notValidDate": "\"{{value}}\" - некоректна дата.",
|
|
291
293
|
"required": "Це поле є обов'язковим.",
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"newPassword": "Mật khảu mới",
|
|
205
205
|
"noFiltersSet": "Không có bộ lọc nào được áp dụng",
|
|
206
206
|
"noLabel": "<Không có {{label}}>",
|
|
207
|
+
"noOptions": "Không có lựa chọn",
|
|
207
208
|
"noResults": "Danh sách rỗng: {{label}}. Có thể {{label}} chưa tồn tại hoặc không có dữ kiện trùng với bộ lọc hiện tại.",
|
|
208
209
|
"noValue": "Không có giá trị",
|
|
209
210
|
"none": "Không có",
|
|
@@ -286,6 +287,7 @@
|
|
|
286
287
|
"invalidSelection": "Lựa chọn ở field này không hợp lệ.",
|
|
287
288
|
"invalidSelections": "'Field này có những lựa chọn không hợp lệ sau:'",
|
|
288
289
|
"lessThanMin": "{{value}} nhỏ hơn giá trị tối thiểu cho phép của {{label}} là {{min}}.",
|
|
290
|
+
"limitReached": "Đã đạt giới hạn, chỉ có thể thêm {{max}} mục.",
|
|
289
291
|
"longerThanMin": "Giá trị này cần có độ dài tối thiểu {{minLength}} ký tự.",
|
|
290
292
|
"notValidDate": "\"{{value}}\" không phải là một ngày (date) hợp lệ.",
|
|
291
293
|
"required": "Field này cần được diền.",
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
"newPassword": "新密码",
|
|
205
205
|
"noFiltersSet": "没有设置过滤器",
|
|
206
206
|
"noLabel": "<没有{{label}}>",
|
|
207
|
+
"noOptions": "没有选项",
|
|
207
208
|
"noResults": "没有找到{{label}}。{{label}}并不存在或没有符合您上面所指定的过滤器。",
|
|
208
209
|
"noValue": "没有值",
|
|
209
210
|
"none": "无",
|
|
@@ -286,6 +287,7 @@
|
|
|
286
287
|
"invalidSelection": "这个字段有一个无效的选择。",
|
|
287
288
|
"invalidSelections": "这个字段有以下无效的选择:",
|
|
288
289
|
"lessThanMin": "{{value}}小于允许的最小{{label}},该最小值为{{min}}。",
|
|
290
|
+
"limitReached": "已达限制,只能添加{{max}}个项目。",
|
|
289
291
|
"longerThanMin": "该值必须大于{{minLength}}字符的最小长度",
|
|
290
292
|
"notValidDate": "\"{{value}}\"不是一个有效的日期。",
|
|
291
293
|
"required": "该字段为必填项目。",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const validOperators: readonly ["equals", "contains", "not_equals", "in", "all", "not_in", "exists", "greater_than", "greater_than_equal", "less_than", "less_than_equal", "like", "near"];
|
|
1
|
+
export declare const validOperators: readonly ["equals", "contains", "not_equals", "in", "all", "not_in", "exists", "greater_than", "greater_than_equal", "less_than", "less_than_equal", "like", "within", "intersects", "near"];
|
package/dist/types/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,IAAI;IACJ,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,oBAAoB;IACpB,WAAW;IACX,iBAAiB;IACjB,MAAM;IACN,MAAM;CACE,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,IAAI;IACJ,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,oBAAoB;IACpB,WAAW;IACX,iBAAiB;IACjB,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,MAAM;CACE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const checkDuplicateCollections: (collections:
|
|
1
|
+
import { SanitizedCollectionConfig } from '../collections/config/types';
|
|
2
|
+
declare const checkDuplicateCollections: (collections: SanitizedCollectionConfig[]) => void;
|
|
3
3
|
export default checkDuplicateCollections;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkDuplicateCollections.js","sourceRoot":"","sources":["../../src/utilities/checkDuplicateCollections.ts"],"names":[],"mappings":";;AAAA,sCAAgD;AAGhD,MAAM,aAAa,GAAG,CAAC,GAAa,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAElG,MAAM,yBAAyB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"checkDuplicateCollections.js","sourceRoot":"","sources":["../../src/utilities/checkDuplicateCollections.ts"],"names":[],"mappings":";;AAAA,sCAAgD;AAGhD,MAAM,aAAa,GAAG,CAAC,GAAa,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAElG,MAAM,yBAAyB,GAAG,CAAC,WAAwC,EAAQ,EAAE;IACnF,MAAM,cAAc,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,MAAM,IAAI,4BAAmB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KACvD;AACH,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
// Take a where query and flatten it to all top-level operators
|
|
4
|
-
const flattenWhereConstraints = (query) =>
|
|
5
|
-
|
|
4
|
+
const flattenWhereConstraints = (query) => {
|
|
5
|
+
return Object.entries(query).reduce((flattenedConstraints, [key, val]) => {
|
|
6
|
+
if ((key === 'and' || key === 'or') && Array.isArray(val)) {
|
|
7
|
+
// Instead of using map, use reduce to accumulate results into a single array
|
|
8
|
+
const flattenedNested = val.reduce((acc, subVal) => {
|
|
9
|
+
return [...acc, ...flattenWhereConstraints(subVal)];
|
|
10
|
+
}, []);
|
|
11
|
+
return [
|
|
12
|
+
...flattenedConstraints,
|
|
13
|
+
...flattenedNested,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
6
16
|
return [
|
|
7
17
|
...flattenedConstraints,
|
|
8
|
-
|
|
18
|
+
val,
|
|
9
19
|
];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
...flattenedConstraints,
|
|
13
|
-
val,
|
|
14
|
-
];
|
|
15
|
-
}, []);
|
|
20
|
+
}, []);
|
|
21
|
+
};
|
|
16
22
|
exports.default = flattenWhereConstraints;
|
|
17
23
|
//# sourceMappingURL=flattenWhereConstraints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flattenWhereConstraints.js","sourceRoot":"","sources":["../../src/utilities/flattenWhereConstraints.ts"],"names":[],"mappings":";;AAEA,+DAA+D;AAC/D,MAAM,uBAAuB,GAAG,CAAC,KAAY,EAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"flattenWhereConstraints.js","sourceRoot":"","sources":["../../src/utilities/flattenWhereConstraints.ts"],"names":[],"mappings":";;AAEA,+DAA+D;AAC/D,MAAM,uBAAuB,GAAG,CAAC,KAAY,EAAgB,EAAE;IAC7D,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,oBAAoB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE;QACvE,IAAI,CAAC,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACzD,6EAA6E;YAC7E,MAAM,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;gBACjD,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC;YACtD,CAAC,EAAE,EAAE,CAAC,CAAC;YAEP,OAAO;gBACL,GAAG,oBAAoB;gBACvB,GAAG,eAAe;aACnB,CAAC;SACH;QAED,OAAO;YACL,GAAG,oBAAoB;YACvB,GAAG;SACJ,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC;AAEF,kBAAe,uBAAuB,CAAC"}
|