@payloadcms/db-postgres 3.0.0-alpha.18 → 3.0.0-alpha.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.js +17 -32
- package/dist/create.js +6 -21
- package/dist/createGlobal.js +6 -21
- package/dist/createGlobalVersion.js +10 -25
- package/dist/createMigration.js +11 -26
- package/dist/createVersion.js +10 -25
- package/dist/deleteMany.js +8 -23
- package/dist/deleteOne.js +10 -25
- package/dist/deleteVersions.js +10 -25
- package/dist/destroy.js +2 -12
- package/dist/find/buildFindManyArgs.js +6 -14
- package/dist/find/chainMethods.js +2 -11
- package/dist/find/findMany.js +14 -29
- package/dist/find/traverseFields.js +8 -23
- package/dist/find.js +6 -21
- package/dist/findGlobal.js +6 -21
- package/dist/findGlobalVersions.js +8 -23
- package/dist/findOne.js +6 -21
- package/dist/findVersions.js +8 -23
- package/dist/index.js +72 -87
- package/dist/init.js +17 -32
- package/dist/migrate.js +15 -30
- package/dist/migrateDown.js +12 -22
- package/dist/migrateFresh.js +15 -28
- package/dist/migrateRefresh.js +18 -26
- package/dist/migrateReset.js +13 -21
- package/dist/migrateStatus.js +9 -19
- package/dist/queries/buildAndOrConditions.js +4 -14
- package/dist/queries/buildQuery.js +10 -20
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +4 -14
- package/dist/queries/createJSONQuery/formatJSONPathSegment.js +2 -12
- package/dist/queries/createJSONQuery/index.js +6 -16
- package/dist/queries/getTableColumnFromPath.js +38 -49
- package/dist/queries/operatorMap.js +17 -27
- package/dist/queries/parseParams.js +32 -42
- package/dist/queries/sanitizeQueryValue.js +8 -18
- package/dist/queryDrafts.js +10 -25
- package/dist/schema/build.js +49 -64
- package/dist/schema/createIndex.js +5 -15
- package/dist/schema/idToUUID.js +2 -12
- package/dist/schema/parentIDColumnMap.js +7 -17
- package/dist/schema/setColumnID.js +10 -20
- package/dist/schema/traverseFields.js +62 -77
- package/dist/schema/validateExistingBlockIsIdentical.js +9 -19
- package/dist/transactions/beginTransaction.js +4 -14
- package/dist/transactions/commitTransaction.js +2 -12
- package/dist/transactions/rollbackTransaction.js +2 -12
- package/dist/transform/read/hasManyNumber.js +2 -12
- package/dist/transform/read/hasManyText.js +2 -12
- package/dist/transform/read/index.js +12 -20
- package/dist/transform/read/relationship.js +2 -12
- package/dist/transform/read/traverseFields.js +15 -23
- package/dist/transform/write/array.js +6 -16
- package/dist/transform/write/blocks.js +6 -21
- package/dist/transform/write/index.js +4 -14
- package/dist/transform/write/numbers.js +2 -12
- package/dist/transform/write/relationships.js +4 -14
- package/dist/transform/write/selects.js +4 -14
- package/dist/transform/write/texts.js +2 -12
- package/dist/transform/write/traverseFields.js +30 -45
- package/dist/transform/write/types.js +2 -5
- package/dist/types.js +2 -5
- package/dist/update.js +11 -26
- package/dist/updateGlobal.js +6 -21
- package/dist/updateGlobalVersion.js +10 -25
- package/dist/updateVersion.js +10 -25
- package/dist/upsertRow/deleteExistingArrayRows.js +5 -15
- package/dist/upsertRow/deleteExistingRowsByPath.js +9 -19
- package/dist/upsertRow/index.js +24 -34
- package/dist/upsertRow/insertArrays.js +2 -12
- package/dist/upsertRow/types.js +2 -5
- package/dist/utilities/appendPrefixToKeys.js +2 -12
- package/dist/utilities/createBlocksMap.js +2 -12
- package/dist/utilities/createMigrationTable.js +4 -14
- package/dist/utilities/createRelationshipMap.js +2 -12
- package/dist/utilities/hasLocalesTable.js +5 -15
- package/dist/utilities/isArrayOfRows.js +2 -12
- package/dist/utilities/migrationTableExists.js +4 -14
- package/dist/utilities/parseError.js +6 -14
- package/package.json +5 -4
@@ -1,19 +1,9 @@
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
2
|
-
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformArray", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformArray;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const _isArrayOfRows = require("../../utilities/isArrayOfRows");
|
12
|
-
const _traverseFields = require("./traverseFields");
|
13
|
-
const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
1
|
+
/* eslint-disable no-param-reassign */ import { isArrayOfRows } from '../../utilities/isArrayOfRows';
|
2
|
+
import { traverseFields } from './traverseFields';
|
3
|
+
export const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
14
4
|
const newRows = [];
|
15
5
|
const hasUUID = adapter.tables[arrayTableName]._uuid;
|
16
|
-
if (
|
6
|
+
if (isArrayOfRows(data)) {
|
17
7
|
data.forEach((arrayRow, i)=>{
|
18
8
|
const newRow = {
|
19
9
|
arrays: {},
|
@@ -39,7 +29,7 @@ const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocks
|
|
39
29
|
if (field.localized) {
|
40
30
|
newRow.row._locale = locale;
|
41
31
|
}
|
42
|
-
|
32
|
+
traverseFields({
|
43
33
|
adapter,
|
44
34
|
arrays: newRow.arrays,
|
45
35
|
baseTableName,
|
@@ -65,4 +55,4 @@ const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocks
|
|
65
55
|
return newRows;
|
66
56
|
};
|
67
57
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvYXJyYXkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgQXJyYXlGaWVsZCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vLi4vdHlwZXMnXG5pbXBvcnQgdHlwZSB7IEFycmF5Um93VG9JbnNlcnQsIEJsb2NrUm93VG9JbnNlcnQsIFJl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UUQsT0FBT0MsTUFBTTtnQkFDckJwQjtnQkFDQUM7Z0JBQ0FDO2dCQUNBeUIsY0FBYztnQkFDZHhCLE1BQU1jO2dCQUNOVyxhQUFhO2dCQUNiQyxRQUFRekIsTUFBTXlCLE1BQU07Z0JBQ3BCUixTQUFTRixPQUFPRSxPQUFPO2dCQUN2QmY7Z0JBQ0FDO2dCQUNBdUIsaUJBQWlCL0I7Z0JBQ2pCUyxNQUFNLENBQUMsRUFBRUEsUUFBUSxHQUFHLEVBQUVKLE1BQU0yQixJQUFJLENBQUMsQ0FBQyxFQUFFYixFQUFFLENBQUMsQ0FBQztnQkFDeENUO2dCQUNBQztnQkFDQVksS0FBS0gsT0FBT0csR0FBRztnQkFDZlg7WUFDRjtZQUVBQyxRQUFRb0IsSUFBSSxDQUFDYjtRQUNmO0lBQ0Y7SUFFQSxPQUFPUDtBQUNULEVBQUMifQ==
|
@@ -1,26 +1,11 @@
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
2
|
-
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformBlocks", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformBlocks;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
|
12
|
-
const _traverseFields = require("./traverseFields");
|
13
|
-
function _interop_require_default(obj) {
|
14
|
-
return obj && obj.__esModule ? obj : {
|
15
|
-
default: obj
|
16
|
-
};
|
17
|
-
}
|
18
|
-
const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
1
|
+
/* eslint-disable no-param-reassign */ import toSnakeCase from 'to-snake-case';
|
2
|
+
import { traverseFields } from './traverseFields';
|
3
|
+
export const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
19
4
|
data.forEach((blockRow, i)=>{
|
20
5
|
if (typeof blockRow.blockType !== 'string') return;
|
21
6
|
const matchedBlock = field.blocks.find(({ slug })=>slug === blockRow.blockType);
|
22
7
|
if (!matchedBlock) return;
|
23
|
-
const blockType = (
|
8
|
+
const blockType = toSnakeCase(blockRow.blockType);
|
24
9
|
if (!blocks[blockType]) blocks[blockType] = [];
|
25
10
|
const newRow = {
|
26
11
|
arrays: {},
|
@@ -42,7 +27,7 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
|
|
42
27
|
newRow.row._uuid = blockRow.id;
|
43
28
|
delete blockRow.id;
|
44
29
|
}
|
45
|
-
|
30
|
+
traverseFields({
|
46
31
|
adapter,
|
47
32
|
arrays: newRow.arrays,
|
48
33
|
baseTableName,
|
@@ -66,4 +51,4 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
|
|
66
51
|
});
|
67
52
|
};
|
68
53
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvYmxvY2tzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEJsb2NrRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi8uLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCwgUmVsYXRpb25zaGlwVG9EZWxldGUgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB0cmF2ZXJzZUZpZWxkcyB9IGZyb20gJy4vdHJhdmVyc2VGaWVsZHMnXG5cbnR5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0M7UUFDdEMsNENBQTRDO1FBQzVDLDZDQUE2QztRQUM3QywrREFBK0Q7UUFDL0QsSUFBSUYsU0FBUztZQUNYVixPQUFPRyxHQUFHLENBQUNTLEtBQUssR0FBR2xCLFNBQVNtQixFQUFFO1lBQzlCLE9BQU9uQixTQUFTbUIsRUFBRTtRQUNwQjtRQUVBbkMsZUFBZTtZQUNiRTtZQUNBcUIsUUFBUUQsT0FBT0MsTUFBTTtZQUNyQnBCO1lBQ0FDO1lBQ0FDO1lBQ0ErQixjQUFjO1lBQ2Q5QixNQUFNVTtZQUNOcUIsYUFBYTtZQUNiQyxRQUFRbkIsYUFBYW1CLE1BQU07WUFDM0JkLFNBQVNGLE9BQU9FLE9BQU87WUFDdkJmO1lBQ0FDO1lBQ0E2QixpQkFBaUJSO1lBQ2pCcEIsTUFBTSxDQUFDLEVBQUVBLFFBQVEsR0FBRyxFQUFFSixNQUFNcUIsSUFBSSxDQUFDLENBQUMsRUFBRVgsRUFBRSxDQUFDLENBQUM7WUFDeENMO1lBQ0FDO1lBQ0FZLEtBQUtILE9BQU9HLEdBQUc7WUFDZlg7UUFDRjtRQUVBVixNQUFNLENBQUNjLFVBQVUsQ0FBQ3NCLElBQUksQ0FBQ2xCO0lBQ3pCO0FBQ0YsRUFBQyJ9
|
@@ -1,15 +1,5 @@
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
2
|
-
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformForWrite", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformForWrite;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const _traverseFields = require("./traverseFields");
|
12
|
-
const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
1
|
+
/* eslint-disable no-param-reassign */ import { traverseFields } from './traverseFields';
|
2
|
+
export const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
13
3
|
// Split out the incoming data into rows to insert / delete
|
14
4
|
const rowToInsert = {
|
15
5
|
arrays: {},
|
@@ -25,7 +15,7 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
25
15
|
};
|
26
16
|
// This function is responsible for building up the
|
27
17
|
// above rowToInsert
|
28
|
-
|
18
|
+
traverseFields({
|
29
19
|
adapter,
|
30
20
|
arrays: rowToInsert.arrays,
|
31
21
|
baseTableName: tableName,
|
@@ -48,4 +38,4 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
48
38
|
return rowToInsert;
|
49
39
|
};
|
50
40
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uLy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBSb3dUb0luc2VydCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IHRyYXZlcnNlRmllbGRzIH0gZnJvbSAnLi90cmF2ZXJzZUZpZWxkcydcblxudHlwZSBBcmdzID0ge1xuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcbiAgZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgZmllbGRzOiBGaWVsZFtdXG4gIHBhdGg/
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0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3hDQyx1QkFBdUJULFlBQVlTLHFCQUFxQjtRQUN4REMsS0FBS1YsWUFBWVUsR0FBRztRQUNwQkMsU0FBU1gsWUFBWVcsT0FBTztJQUM5QjtJQUVBLE9BQU9YO0FBQ1QsRUFBQyJ9
|
@@ -1,14 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformNumbers", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformNumbers;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const transformNumbers = ({ baseRow, data, numbers })=>{
|
1
|
+
export const transformNumbers = ({ baseRow, data, numbers })=>{
|
12
2
|
data.forEach((val, i)=>{
|
13
3
|
numbers.push({
|
14
4
|
...baseRow,
|
@@ -18,4 +8,4 @@ const transformNumbers = ({ baseRow, data, numbers })=>{
|
|
18
8
|
});
|
19
9
|
};
|
20
10
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvbnVtYmVycy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJ0eXBlIEFyZ3MgPSB7XG4gIGJhc2VSb3c6IFJlY29yZDxzdHJpbmcsIHVua25vd24+
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvbnVtYmVycy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJ0eXBlIEFyZ3MgPSB7XG4gIGJhc2VSb3c6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gIGRhdGE6IHVua25vd25bXVxuICBudW1iZXJzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbmV4cG9ydCBjb25zdCB0cmFuc2Zvcm1OdW1iZXJzID0gKHsgYmFzZVJvdywgZGF0YSwgbnVtYmVycyB9OiBBcmdzKSA9PiB7XG4gIGRhdGEuZm9yRWFjaCgodmFsLCBpKSA9PiB7XG4gICAgbnVtYmVycy5wdXNoKHtcbiAgICAgIC4uLmJhc2VSb3csXG4gICAgICBudW1iZXI6IHZhbCxcbiAgICAgIG9yZGVyOiBpICsgMSxcbiAgICB9KVxuICB9KVxufVxuIl0sIm5hbWVzIjpbInRyYW5zZm9ybU51bWJlcnMiLCJiYXNlUm93IiwiZGF0YSIsIm51bWJlcnMiLCJmb3JFYWNoIiwidmFsIiwiaSIsInB1c2giLCJudW1iZXIiLCJvcmRlciJdLCJtYXBwaW5ncyI6IkFBTUEsT0FBTyxNQUFNQSxtQkFBbUIsQ0FBQyxFQUFFQyxPQUFPLEVBQUVDLElBQUksRUFBRUMsT0FBTyxFQUFRO0lBQy9ERCxLQUFLRSxPQUFPLENBQUMsQ0FBQ0MsS0FBS0M7UUFDakJILFFBQVFJLElBQUksQ0FBQztZQUNYLEdBQUdOLE9BQU87WUFDVk8sUUFBUUg7WUFDUkksT0FBT0gsSUFBSTtRQUNiO0lBQ0Y7QUFDRixFQUFDIn0=
|
@@ -1,15 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformRelationship", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformRelationship;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const _types = require("payload/types");
|
12
|
-
const transformRelationship = ({ baseRow, data, field, relationships })=>{
|
1
|
+
import { valueIsValueWithRelation } from 'payload/types';
|
2
|
+
export const transformRelationship = ({ baseRow, data, field, relationships })=>{
|
13
3
|
const relations = Array.isArray(data) ? data : [
|
14
4
|
data
|
15
5
|
];
|
@@ -19,7 +9,7 @@ const transformRelationship = ({ baseRow, data, field, relationships })=>{
|
|
19
9
|
...baseRow
|
20
10
|
};
|
21
11
|
if ('hasMany' in field && field.hasMany) relationRow.order = i + 1;
|
22
|
-
if (Array.isArray(field.relationTo) &&
|
12
|
+
if (Array.isArray(field.relationTo) && valueIsValueWithRelation(relation)) {
|
23
13
|
relationRow[`${relation.relationTo}ID`] = relation.value;
|
24
14
|
relationships.push(relationRow);
|
25
15
|
} else {
|
@@ -30,4 +20,4 @@ const transformRelationship = ({ baseRow, data, field, relationships })=>{
|
|
30
20
|
});
|
31
21
|
};
|
32
22
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvcmVsYXRpb25zaGlwcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFJlbGF0aW9uc2hpcEZpZWxkLCBVcGxvYWRGaWVsZCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IHZhbHVlSXNWYWx1ZVdpdGhSZWxhdGlvbiB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbnR5cGUgQXJncyA9IHtcbiAgYmFzZVJvdzogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgZGF0YTogdW5rbm93blxuICBmaWVsZDogUmVsYXRpb25zaGlwRmllbGQgfCBVcGxvYWRGaWVsZFxuICByZWxhdGlvbnNoaXBzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbmV4cG9ydCBjb25zdCB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAgPSAoeyBiYXNlUm93LCBkYXRhLCBmaWVsZCwgcmVsYXRpb25zaGlwcyB9OiBBcmdzKSA9PiB7XG4gIGNvbnN0IHJlbGF0aW9ucyA9IEFycmF5LmlzQXJyYXkoZGF0YSkgPyBkYXRhIDogW2RhdGFdXG5cbiAgcmVsYXRpb25zLmZvckVhY2goKHJlbGF0aW9uLCBpKSA9PiB7X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BUTtJQUNqRixNQUFNQyxZQUFZQyxNQUFNQyxPQUFPLENBQUNMLFFBQVFBLE9BQU87UUFBQ0E7S0FBSztJQUVyREcsVUFBVUcsT0FBTyxDQUFDLENBQUNDLFVBQVVDO1FBQzNCLElBQUlELFVBQVU7WUFDWixNQUFNRSxjQUFjO2dCQUFFLEdBQUdWLE9BQU87WUFBQztZQUNqQyxJQUFJLGFBQWFFLFNBQVNBLE1BQU1TLE9BQU8sRUFBRUQsWUFBWUUsS0FBSyxHQUFHSCxJQUFJO1lBRWpFLElBQUlKLE1BQU1DLE9BQU8sQ0FBQ0osTUFBTVcsVUFBVSxLQUFLZix5QkFBeUJVLFdBQVc7Z0JBQ3pFRSxXQUFXLENBQUMsQ0FBQyxFQUFFRixTQUFTSyxVQUFVLENBQUMsRUFBRSxDQUFDLENBQUMsR0FBR0wsU0FBU00sS0FBSztnQkFDeERYLGNBQWNZLElBQUksQ0FBQ0w7WUFDckIsT0FBTztnQkFDTEEsV0FBVyxDQUFDLENBQUMsRUFBRVIsTUFBTVcsVUFBVSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUdMO2dCQUN2QyxJQUFJQSxVQUFVTCxjQUFjWSxJQUFJLENBQUNMO1lBQ25DO1FBQ0Y7SUFDRjtBQUNGLEVBQUMifQ==
|
@@ -1,17 +1,7 @@
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
2
|
-
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformSelects", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformSelects;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const _isArrayOfRows = require("../../utilities/isArrayOfRows");
|
12
|
-
const transformSelects = ({ id, data, locale })=>{
|
1
|
+
/* eslint-disable no-param-reassign */ import { isArrayOfRows } from '../../utilities/isArrayOfRows';
|
2
|
+
export const transformSelects = ({ id, data, locale })=>{
|
13
3
|
const newRows = [];
|
14
|
-
if (
|
4
|
+
if (isArrayOfRows(data)) {
|
15
5
|
data.forEach((value, i)=>{
|
16
6
|
const newRow = {
|
17
7
|
order: i + 1,
|
@@ -27,4 +17,4 @@ const transformSelects = ({ id, data, locale })=>{
|
|
27
17
|
return newRows;
|
28
18
|
};
|
29
19
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvc2VsZWN0cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHsgaXNBcnJheU9mUm93cyB9IGZyb20gJy4uLy4uL3V0aWxpdGllcy9pc0FycmF5T2ZSb3dzJ1xuXG50eXBlIEFyZ3MgPSB7XG4gIGRhdGE6IHVua25vd25cbiAgaWQ/OiB1bmtub3duXG4gIGxvY2FsZT86IHN0cmluZ1xufVxuXG5leHBvcnQgY29uc3QgdHJhbnNmb3JtU2VsZWN0cyA9ICh7IGlkLCBkYXRhLCBsb2NhbGUgfTogQXJncykgPT4ge1xuICBjb25zdCBuZXdSb3dzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdID0gW11cblxuICBpZiAoaXNBcnJheU9mUm93cyhkYXRhKSkge1xuICAgIGRhdGEuZm9yRWFjaCgodmFsdWUsIGkpID0+
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvc2VsZWN0cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHsgaXNBcnJheU9mUm93cyB9IGZyb20gJy4uLy4uL3V0aWxpdGllcy9pc0FycmF5T2ZSb3dzJ1xuXG50eXBlIEFyZ3MgPSB7XG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QztZQUNuQixNQUFNQyxTQUFrQztnQkFDdENDLE9BQU9GLElBQUk7Z0JBQ1hHLFFBQVFUO2dCQUNSSztZQUNGO1lBRUEsSUFBSUgsUUFBUTtnQkFDVkssT0FBT0wsTUFBTSxHQUFHQTtZQUNsQjtZQUVBQyxRQUFRTyxJQUFJLENBQUNIO1FBQ2Y7SUFDRjtJQUVBLE9BQU9KO0FBQ1QsRUFBQyJ9
|
@@ -1,14 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "transformTexts", {
|
6
|
-
enumerable: true,
|
7
|
-
get: function() {
|
8
|
-
return transformTexts;
|
9
|
-
}
|
10
|
-
});
|
11
|
-
const transformTexts = ({ baseRow, data, texts })=>{
|
1
|
+
export const transformTexts = ({ baseRow, data, texts })=>{
|
12
2
|
data.forEach((val, i)=>{
|
13
3
|
texts.push({
|
14
4
|
...baseRow,
|
@@ -18,4 +8,4 @@ const transformTexts = ({ baseRow, data, texts })=>{
|
|
18
8
|
});
|
19
9
|
};
|
20
10
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdGV4dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsidHlwZSBBcmdzID0ge1xuICBiYXNlUm93OiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICBkYXRhOiB1bmtub3duW11cbiAgdGV4dHM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdGV4dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsidHlwZSBBcmdzID0ge1xuICBiYXNlUm93OiBSZWNvcmQ8c3Rya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