node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
'use strict';
const isBaseQueryError = (error)=>{
return error.name !== undefined;
};
exports.isBaseQueryError = isBaseQueryError;
//# sourceMappingURL=baseQuery.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"baseQuery.js","sources":["../../../admin/src/utils/baseQuery.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { type ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ntype BaseQueryError = ApiError | UnknownApiError | SerializedError;\n\nconst isBaseQueryError = (error: BaseQueryError): error is ApiError | UnknownApiError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError };\n"],"names":["isBaseQueryError","error","name","undefined"],"mappings":";;AAKA,MAAMA,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}

View File

@@ -0,0 +1,6 @@
const isBaseQueryError = (error)=>{
return error.name !== undefined;
};
export { isBaseQueryError };
//# sourceMappingURL=baseQuery.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"baseQuery.mjs","sources":["../../../admin/src/utils/baseQuery.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { type ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ntype BaseQueryError = ApiError | UnknownApiError | SerializedError;\n\nconst isBaseQueryError = (error: BaseQueryError): error is ApiError | UnknownApiError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError };\n"],"names":["isBaseQueryError","error","name","undefined"],"mappings":"AAKA,MAAMA,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}

View File

@@ -0,0 +1,70 @@
'use strict';
const cleanData = (data, schema, components)=>{
const cleanedData = removeFields(data, [
'createdAt',
'createdBy',
'updatedAt',
'updatedBy',
'id',
'documentId',
'publishedAt',
'strapi_stage',
'strapi_assignee',
'locale',
'status'
]);
const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(cleanedData, schema, components, [
'relation',
'password'
]);
return cleanedDataWithoutPasswordAndRelation;
};
const removeFields = (data, fields)=>{
return Object.keys(data).reduce((acc, current)=>{
if (fields.includes(current)) {
return acc;
}
acc[current] = data[current];
return acc;
}, {});
};
const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
return Object.keys(data).reduce((acc, current)=>{
const attribute = schema.attributes[current] ?? {
type: undefined
};
if (fields.includes(attribute.type)) {
return acc;
}
if (attribute.type === 'dynamiczone') {
acc[current] = data[current].map((componentValue, index)=>{
const { id: _, ...rest } = recursiveRemoveFieldTypes(componentValue, components[componentValue.__component], components, fields);
return {
...rest,
__temp_key__: index + 1
};
});
} else if (attribute.type === 'component') {
const { repeatable, component } = attribute;
if (repeatable) {
acc[current] = (data[current] ?? []).map((compoData, index)=>{
const { id: _, ...rest } = recursiveRemoveFieldTypes(compoData, components[component], components, fields);
return {
...rest,
__temp_key__: index + 1
};
});
} else {
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current] ?? {}, components[component], components, fields);
acc[current] = rest;
}
} else {
acc[current] = data[current];
}
return acc;
}, {});
};
exports.cleanData = cleanData;
//# sourceMappingURL=clean.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
const cleanData = (data, schema, components)=>{
const cleanedData = removeFields(data, [
'createdAt',
'createdBy',
'updatedAt',
'updatedBy',
'id',
'documentId',
'publishedAt',
'strapi_stage',
'strapi_assignee',
'locale',
'status'
]);
const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(cleanedData, schema, components, [
'relation',
'password'
]);
return cleanedDataWithoutPasswordAndRelation;
};
const removeFields = (data, fields)=>{
return Object.keys(data).reduce((acc, current)=>{
if (fields.includes(current)) {
return acc;
}
acc[current] = data[current];
return acc;
}, {});
};
const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
return Object.keys(data).reduce((acc, current)=>{
const attribute = schema.attributes[current] ?? {
type: undefined
};
if (fields.includes(attribute.type)) {
return acc;
}
if (attribute.type === 'dynamiczone') {
acc[current] = data[current].map((componentValue, index)=>{
const { id: _, ...rest } = recursiveRemoveFieldTypes(componentValue, components[componentValue.__component], components, fields);
return {
...rest,
__temp_key__: index + 1
};
});
} else if (attribute.type === 'component') {
const { repeatable, component } = attribute;
if (repeatable) {
acc[current] = (data[current] ?? []).map((compoData, index)=>{
const { id: _, ...rest } = recursiveRemoveFieldTypes(compoData, components[component], components, fields);
return {
...rest,
__temp_key__: index + 1
};
});
} else {
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current] ?? {}, components[component], components, fields);
acc[current] = rest;
}
} else {
acc[current] = data[current];
}
return acc;
}, {});
};
export { cleanData };
//# sourceMappingURL=clean.mjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,29 @@
'use strict';
const LOCALIZED_FIELDS = [
'biginteger',
'boolean',
'component',
'date',
'datetime',
'decimal',
'dynamiczone',
'email',
'enumeration',
'float',
'integer',
'json',
'media',
'number',
'password',
'richtext',
'blocks',
'string',
'text',
'time'
];
const doesPluginOptionsHaveI18nLocalized = (opts)=>typeof opts === 'object' && opts !== null && 'i18n' in opts && typeof opts.i18n === 'object' && opts.i18n !== null && 'localized' in opts.i18n && typeof opts.i18n.localized === 'boolean';
exports.LOCALIZED_FIELDS = LOCALIZED_FIELDS;
exports.doesPluginOptionsHaveI18nLocalized = doesPluginOptionsHaveI18nLocalized;
//# sourceMappingURL=fields.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fields.js","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["const LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } =>\n typeof opts === 'object' &&\n opts !== null &&\n 'i18n' in opts &&\n typeof opts.i18n === 'object' &&\n opts.i18n !== null &&\n 'localized' in opts.i18n &&\n typeof opts.i18n.localized === 'boolean';\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","i18n","localized"],"mappings":";;AAAA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAEA,GAAA,OAAOA,IAAS,KAAA,QAAA,IAChBA,IAAS,KAAA,IAAA,IACT,MAAUA,IAAAA,IAAAA,IACV,OAAOA,IAAAA,CAAKC,IAAI,KAAK,QACrBD,IAAAA,IAAAA,CAAKC,IAAI,KAAK,IACd,IAAA,WAAA,IAAeD,IAAKC,CAAAA,IAAI,IACxB,OAAOD,IAAKC,CAAAA,IAAI,CAACC,SAAS,KAAK;;;;;"}

View File

@@ -0,0 +1,26 @@
const LOCALIZED_FIELDS = [
'biginteger',
'boolean',
'component',
'date',
'datetime',
'decimal',
'dynamiczone',
'email',
'enumeration',
'float',
'integer',
'json',
'media',
'number',
'password',
'richtext',
'blocks',
'string',
'text',
'time'
];
const doesPluginOptionsHaveI18nLocalized = (opts)=>typeof opts === 'object' && opts !== null && 'i18n' in opts && typeof opts.i18n === 'object' && opts.i18n !== null && 'localized' in opts.i18n && typeof opts.i18n.localized === 'boolean';
export { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };
//# sourceMappingURL=fields.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fields.mjs","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["const LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } =>\n typeof opts === 'object' &&\n opts !== null &&\n 'i18n' in opts &&\n typeof opts.i18n === 'object' &&\n opts.i18n !== null &&\n 'localized' in opts.i18n &&\n typeof opts.i18n.localized === 'boolean';\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","i18n","localized"],"mappings":"AAAA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAEA,GAAA,OAAOA,IAAS,KAAA,QAAA,IAChBA,IAAS,KAAA,IAAA,IACT,MAAUA,IAAAA,IAAAA,IACV,OAAOA,IAAAA,CAAKC,IAAI,KAAK,QACrBD,IAAAA,IAAAA,CAAKC,IAAI,KAAK,IACd,IAAA,WAAA,IAAeD,IAAKC,CAAAA,IAAI,IACxB,OAAOD,IAAKC,CAAAA,IAAI,CAACC,SAAS,KAAK;;;;"}

View File

@@ -0,0 +1,8 @@
'use strict';
var pluginId = require('../pluginId.js');
const getTranslation = (id)=>`${pluginId.pluginId}.${id}`;
exports.getTranslation = getTranslation;
//# sourceMappingURL=getTranslation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getTranslation.js","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;;;AAEMA,MAAAA,cAAAA,GAAiB,CAACC,EAAe,GAAA,CAAC,EAAEC,iBAAS,CAAA,CAAC,EAAED,EAAAA,CAAG;;;;"}

View File

@@ -0,0 +1,6 @@
import { pluginId } from '../pluginId.mjs';
const getTranslation = (id)=>`${pluginId}.${id}`;
export { getTranslation };
//# sourceMappingURL=getTranslation.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getTranslation.mjs","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;AAEMA,MAAAA,cAAAA,GAAiB,CAACC,EAAe,GAAA,CAAC,EAAEC,QAAS,CAAA,CAAC,EAAED,EAAAA,CAAG;;;;"}

View File

@@ -0,0 +1,11 @@
'use strict';
const prefixPluginTranslations = (trad, pluginId)=>{
return Object.keys(trad).reduce((acc, current)=>{
acc[`${pluginId}.${current}`] = trad[current];
return acc;
}, {});
};
exports.prefixPluginTranslations = prefixPluginTranslations;
//# sourceMappingURL=prefixPluginTranslations.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACpCD,QAAAA,GAAG,CAAC,CAAC,EAAEJ,QAAAA,CAAS,CAAC,EAAEK,OAAQ,CAAA,CAAC,CAAC,GAAGN,IAAI,CAACM,OAAQ,CAAA;QAC7C,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN;;;;"}

View File

@@ -0,0 +1,9 @@
const prefixPluginTranslations = (trad, pluginId)=>{
return Object.keys(trad).reduce((acc, current)=>{
acc[`${pluginId}.${current}`] = trad[current];
return acc;
}, {});
};
export { prefixPluginTranslations };
//# sourceMappingURL=prefixPluginTranslations.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACpCD,QAAAA,GAAG,CAAC,CAAC,EAAEJ,QAAAA,CAAS,CAAC,EAAEK,OAAQ,CAAA,CAAC,CAAC,GAAGN,IAAI,CAACM,OAAQ,CAAA;QAC7C,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN;;;;"}

View File

@@ -0,0 +1,68 @@
'use strict';
var omit = require('lodash/omit');
var fields = require('./fields.js');
/* -------------------------------------------------------------------------------------------------
* mutateCTBContentTypeSchema
* -----------------------------------------------------------------------------------------------*/ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
// Don't perform mutations components
if (!fields.doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {
return nextSchema;
}
const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;
const isPrevSchemaLocalized = fields.doesPluginOptionsHaveI18nLocalized(prevSchema?.schema?.pluginOptions) ? prevSchema?.schema?.pluginOptions.i18n.localized : false;
// No need to perform modification on the schema, if the i18n feature was not changed
// at the ct level
if (isNextSchemaLocalized && isPrevSchemaLocalized) {
return nextSchema;
}
if (isNextSchemaLocalized) {
const attributes = addLocalisationToFields(nextSchema.attributes);
return {
...nextSchema,
attributes
};
}
// Remove the i18n object from the pluginOptions
if (!isNextSchemaLocalized) {
const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');
const attributes = disableAttributesLocalisation(nextSchema.attributes);
return {
...nextSchema,
pluginOptions,
attributes
};
}
return nextSchema;
};
/* -------------------------------------------------------------------------------------------------
* addLocalisationToFields
* -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
const currentAttribute = attributes[current];
if (fields.LOCALIZED_FIELDS.includes(currentAttribute.type)) {
const i18n = {
localized: true
};
const pluginOptions = currentAttribute.pluginOptions ? {
...currentAttribute.pluginOptions,
i18n
} : {
i18n
};
acc[current] = {
...currentAttribute,
pluginOptions
};
return acc;
}
acc[current] = currentAttribute;
return acc;
}, {});
const disableAttributesLocalisation = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
acc[current] = omit(attributes[current], 'pluginOptions.i18n');
return acc;
}, {});
exports.mutateCTBContentTypeSchema = mutateCTBContentTypeSchema;
//# sourceMappingURL=schemas.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
import omit from 'lodash/omit';
import { doesPluginOptionsHaveI18nLocalized, LOCALIZED_FIELDS } from './fields.mjs';
/* -------------------------------------------------------------------------------------------------
* mutateCTBContentTypeSchema
* -----------------------------------------------------------------------------------------------*/ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
// Don't perform mutations components
if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {
return nextSchema;
}
const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;
const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(prevSchema?.schema?.pluginOptions) ? prevSchema?.schema?.pluginOptions.i18n.localized : false;
// No need to perform modification on the schema, if the i18n feature was not changed
// at the ct level
if (isNextSchemaLocalized && isPrevSchemaLocalized) {
return nextSchema;
}
if (isNextSchemaLocalized) {
const attributes = addLocalisationToFields(nextSchema.attributes);
return {
...nextSchema,
attributes
};
}
// Remove the i18n object from the pluginOptions
if (!isNextSchemaLocalized) {
const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');
const attributes = disableAttributesLocalisation(nextSchema.attributes);
return {
...nextSchema,
pluginOptions,
attributes
};
}
return nextSchema;
};
/* -------------------------------------------------------------------------------------------------
* addLocalisationToFields
* -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
const currentAttribute = attributes[current];
if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {
const i18n = {
localized: true
};
const pluginOptions = currentAttribute.pluginOptions ? {
...currentAttribute.pluginOptions,
i18n
} : {
i18n
};
acc[current] = {
...currentAttribute,
pluginOptions
};
return acc;
}
acc[current] = currentAttribute;
return acc;
}, {});
const disableAttributesLocalisation = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
acc[current] = omit(attributes[current], 'pluginOptions.i18n');
return acc;
}, {});
export { mutateCTBContentTypeSchema };
//# sourceMappingURL=schemas.mjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
'use strict';
const capitalize = (str)=>str.charAt(0).toUpperCase() + str.slice(1);
exports.capitalize = capitalize;
//# sourceMappingURL=strings.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"strings.js","sources":["../../../admin/src/utils/strings.ts"],"sourcesContent":["const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);\n\nexport { capitalize };\n"],"names":["capitalize","str","charAt","toUpperCase","slice"],"mappings":";;AAAMA,MAAAA,UAAAA,GAAa,CAACC,GAAAA,GAAgBA,GAAIC,CAAAA,MAAM,CAAC,CAAA,CAAA,CAAGC,WAAW,EAAA,GAAKF,GAAIG,CAAAA,KAAK,CAAC,CAAA;;;;"}

View File

@@ -0,0 +1,4 @@
const capitalize = (str)=>str.charAt(0).toUpperCase() + str.slice(1);
export { capitalize };
//# sourceMappingURL=strings.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"strings.mjs","sources":["../../../admin/src/utils/strings.ts"],"sourcesContent":["const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);\n\nexport { capitalize };\n"],"names":["capitalize","str","charAt","toUpperCase","slice"],"mappings":"AAAMA,MAAAA,UAAAA,GAAa,CAACC,GAAAA,GAAgBA,GAAIC,CAAAA,MAAM,CAAC,CAAA,CAAA,CAAGC,WAAW,EAAA,GAAKF,GAAIG,CAAAA,KAAK,CAAC,CAAA;;;;"}