@strapi/content-manager 5.38.0 → 5.38.1
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/history/components/VersionContent.js +48 -16
- package/dist/admin/history/components/VersionContent.js.map +1 -1
- package/dist/admin/history/components/VersionContent.mjs +48 -16
- package/dist/admin/history/components/VersionContent.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js +51 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs +52 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.js +6 -2
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.mjs +6 -2
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.mjs +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +148 -111
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +152 -115
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/InputRenderer.js +15 -5
- package/dist/admin/pages/EditView/components/InputRenderer.js.map +1 -1
- package/dist/admin/pages/EditView/components/InputRenderer.mjs +15 -5
- package/dist/admin/pages/EditView/components/InputRenderer.mjs.map +1 -1
- package/dist/admin/pages/ListView/components/Filters.js +54 -1
- package/dist/admin/pages/ListView/components/Filters.js.map +1 -1
- package/dist/admin/pages/ListView/components/Filters.mjs +54 -1
- package/dist/admin/pages/ListView/components/Filters.mjs.map +1 -1
- package/dist/admin/src/exports.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.d.ts +1 -0
- package/dist/admin/src/utils/conditionalFields.d.ts +12 -0
- package/dist/admin/translations/en.json.js +5 -0
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +5 -0
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/admin/translations/es.json.js +136 -2
- package/dist/admin/translations/es.json.js.map +1 -1
- package/dist/admin/translations/es.json.mjs +136 -2
- package/dist/admin/translations/es.json.mjs.map +1 -1
- package/dist/admin/utils/conditionalFields.js +76 -0
- package/dist/admin/utils/conditionalFields.js.map +1 -0
- package/dist/admin/utils/conditionalFields.mjs +69 -0
- package/dist/admin/utils/conditionalFields.mjs.map +1 -0
- package/dist/server/controllers/collection-types.js +157 -4
- package/dist/server/controllers/collection-types.js.map +1 -1
- package/dist/server/controllers/collection-types.mjs +159 -6
- package/dist/server/controllers/collection-types.mjs.map +1 -1
- package/dist/server/controllers/single-types.js +19 -4
- package/dist/server/controllers/single-types.js.map +1 -1
- package/dist/server/controllers/single-types.mjs +19 -4
- package/dist/server/controllers/single-types.mjs.map +1 -1
- package/dist/server/preview/services/preview.js +2 -1
- package/dist/server/preview/services/preview.js.map +1 -1
- package/dist/server/preview/services/preview.mjs +2 -1
- package/dist/server/preview/services/preview.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/single-types.d.ts.map +1 -1
- package/dist/server/src/preview/services/preview.d.ts.map +1 -1
- package/package.json +13 -8
|
@@ -192,11 +192,145 @@ var es = {
|
|
|
192
192
|
"utils.data-loaded": "{number, plural, =1 {La entrada se ha cargado correctamente} other {Las entradas se han cargado correctamente}}",
|
|
193
193
|
"popUpWarning.warning.publish-question": "¿Aún quieres publicarlo?",
|
|
194
194
|
"popUpwarning.warning.has-draft-relations.button-confirm": "Si, publicar",
|
|
195
|
+
"actions.clone.error": "Ha ocurrido un error al tratar de clonar el document.",
|
|
196
|
+
"actions.clone.label": "Duplicar",
|
|
197
|
+
"actions.delete.dialog.body": "¿Estás seguro de que quieres eliminar este documento? Esta acción es irreversible.",
|
|
198
|
+
"actions.delete.error": "Ha ocurrido un error al tratar de eliminar el documento.",
|
|
199
|
+
"actions.delete.label": "Eliminar entrada{isLocalized, select, true { (all locales)} other {}}",
|
|
200
|
+
"actions.discard.label": "Descartar cambios",
|
|
201
|
+
"actions.discard.dialog.body": "¿Estás seguro de descartar los cambios? Esta acción es irreversible.",
|
|
202
|
+
"actions.edit.error": "Ha ocurrido un error al tratar de editar el documento.",
|
|
203
|
+
"actions.edit.label": "Editar",
|
|
204
|
+
"actions.unpublish.error": "Ha ocurrido un error al tratar de despublicar el documento.",
|
|
205
|
+
"actions.unpublish.dialog.body": "¿Estás seguro de que quieres despublicar esto?",
|
|
206
|
+
"actions.unpublish.dialog.option.keep-draft": "Despublicar y mantener último borrador",
|
|
207
|
+
"actions.unpublish.dialog.option.replace-draft": "Despublicar y reemplazar ultimo borrador",
|
|
208
|
+
"actions-drawer.open": "Abrir más acciones",
|
|
209
|
+
"actions-drawer.close": "Cerrar más acciones",
|
|
210
|
+
"ListViewTable.relation-loading": "Las relaciones están cargando",
|
|
211
|
+
"ListViewTable.relation-more": "Esta relación contiene más entidades de las que se muestran",
|
|
212
|
+
"apiError.This attribute must be unique": "{field} tiene que ser único",
|
|
213
|
+
"components.DynamicZone.extra-components": "Hay {number, plural, =0 {# componentes extra} one {un # componente extra} other {# componentes extra}}",
|
|
214
|
+
"components.Filters.usersSelect.label": "Buscar y filtrar por un usuario",
|
|
215
|
+
"components.RelationInput.icon-button-aria-label": "Arrastrar",
|
|
216
|
+
"bulk-publish.already-published": "Ya publicado",
|
|
217
|
+
"bulk-unpublish.already-unpublished": "Ya despublicado",
|
|
218
|
+
"bulk-publish.modified": "Listo para publicar cambios",
|
|
219
|
+
"containers.edit.tabs.label": "Estado del documento",
|
|
220
|
+
"containers.edit.tabs.draft": "borrador",
|
|
221
|
+
"containers.edit.tabs.published": "publicado",
|
|
222
|
+
"containers.edit.panels.default.title": "Entrada",
|
|
223
|
+
"containers.edit.panels.default.more-actions": "Más acciones de documento",
|
|
224
|
+
"containers.edit.title.new": "Crear una entrada",
|
|
225
|
+
"containers.edit.header.more-actions": "Más acciones",
|
|
226
|
+
"containers.edit.information.last-published.label": "Publicado",
|
|
227
|
+
"containers.edit.information.last-published.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
228
|
+
"containers.edit.information.last-draft.label": "Updated",
|
|
229
|
+
"containers.edit.information.last-draft.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
230
|
+
"containers.edit.information.document.label": "Created",
|
|
231
|
+
"containers.edit.information.document.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
232
|
+
"containers.list.table.row-actions": "Acciones de fila",
|
|
233
|
+
"containers.list.selectedEntriesModal.title": "Publicar entradas",
|
|
234
|
+
"containers.list.selectedEntriesModal.selectedCount.publish": "<b>{publishedCount}</b> {publishedCount, plural, =0 {entradas} one {entrada} other {entradas}} ya publicadas. <b>{draftCount}</b> {draftCount, plural, =0 {entradas} one {entrada} other {entradas}} listas para publicar. <b>{withErrorsCount}</b> {withErrorsCount, plural, =0 {entradas} one {entrada} other {entradas}} esperando a una acción.",
|
|
235
|
+
"containers.list.selectedEntriesModal.selectedCount.unpublish": "<b>{draftCount}</b> {draftCount, plural, =0 {entradas} one {entrada} other {entradas}} ya publicadas. <b>{publishedCount}</b> {publishedCount, plural, =0 {entradas} one {entrada} other {entradas}} listas para despublicar.",
|
|
236
|
+
"containers.list.autoCloneModal.header": "Duplicar",
|
|
237
|
+
"containers.list.autoCloneModal.title": "Esta entrada no puede ser directamente duplicada.",
|
|
238
|
+
"containers.list.autoCloneModal.description": "Se creará una nueva entrada con el mismo contenido, pero tendrás que cambiar los siguientes campos para guardarlo.",
|
|
239
|
+
"containers.list.autoCloneModal.create": "Crear",
|
|
240
|
+
"containers.list.autoCloneModal.error.unique": "No se permiten valores idénticos en un campo único.",
|
|
241
|
+
"containers.list.autoCloneModal.error.relation": "Duplicar la relación podría eliminarla de la entrada original.",
|
|
242
|
+
"containers.list-settings.modal-form.label": "Editar {fieldName}",
|
|
243
|
+
"containers.list-settings.modal-form.error": "Se ha producido un error al intentar abrir el formulario.",
|
|
244
|
+
"containers.edit-settings.modal-form.error": "Se ha producido un error al intentar abrir el formulario.",
|
|
245
|
+
"containers.edit-settings.modal-form.label": "Etiqueta",
|
|
246
|
+
"containers.edit-settings.modal-form.description": "Descripción",
|
|
247
|
+
"containers.edit-settings.modal-form.placeholder": "Placeholder",
|
|
248
|
+
"containers.edit-settings.modal-form.mainField": "Título de entrada",
|
|
249
|
+
"containers.edit-settings.modal-form.mainField.hint": "Establece el campo mostrado tanto en la vista de edición como en la de lista",
|
|
250
|
+
"containers.edit-settings.modal-form.editable": "Campo editable",
|
|
251
|
+
"containers.edit-settings.modal-form.size": "Tamaño",
|
|
252
|
+
"containers.SettingPage.add.relational-field": "Inserta otro campo relacionado",
|
|
253
|
+
"containers.SettingPage.relations": "Campos relacionados",
|
|
254
|
+
"dnd.cancel-item": "{item}, descartado. Pedido anulado.",
|
|
255
|
+
"dnd.drop-item": "{item}, descartado. Posición final en la lista: {position}.",
|
|
256
|
+
"dnd.grab-item": "{item}, agarrado. Posición actual en la lista: {position}. Pulsa las flechas arriba y abajo para cambiar de posición, la barra espaciadora para soltar, Escape para cancelar.",
|
|
257
|
+
"dnd.instructions": "Pulsa barra espaciadora para agarrar y reordenar",
|
|
258
|
+
"dnd.reorder": "{item}, movido. Nueva posición en la lista: {position}.",
|
|
259
|
+
"error.records.fetch-draft-relatons": "Se ha producido un error al obtener el borrador de relaciones de este documento.",
|
|
260
|
+
"form.Input.hint.character.unit": "{maxValue, plural, one { carácter} other { carácteres}}",
|
|
261
|
+
"form.Input.hint.minMaxDivider": " / ",
|
|
262
|
+
"form.Input.hint.text": "{min, select, undefined {} other {min. {min}}}{divider}{max, select, undefined {} other {max. {max}}}{unit}{br}{description}",
|
|
263
|
+
"popUpWarning.bodyMessage.contentType.delete": "¿Estás seguro de que quieres eliminar el tipo de Contenido?",
|
|
264
|
+
"popUpWarning.bodyMessage.contentType.delete.all": "¿Estás seguro de que quieres eliminar estas entradas?",
|
|
265
|
+
"popUpWarning.bodyMessage.contentType.publish.all": "¿Estás seguro de que quieres publicar estas entradas?",
|
|
266
|
+
"popUpWarning.bodyMessage.contentType.unpublish.all": "¿Estas seguro de que quieres despublicar estas entradas?",
|
|
267
|
+
"popUpWarning.warning.has-draft-relations.title": "Confirmación",
|
|
268
|
+
"popUpWarning.warning.has-draft-relations.message": "Esta entrada está relacionada a {count, plural, one {# entrada borrador} other {# entradas borrador}}. Su publicación podría dejar enlaces rotos en tu aplicación.",
|
|
269
|
+
"popUpwarning.warning.bulk-has-draft-relations.message": "<b>{count} {count, plural, one { relación } other { relaciones } } de {entities} { entities, plural, one { entrada } other { entradas } } {count, plural, one { no está } other { no están } }</b> publicadas aún y pueden causar comportamientos no esperados. ",
|
|
270
|
+
"popUpWarning.warning.unpublish": "Si no publicas este contenido, se convertirá automáticamente en un borrador.",
|
|
271
|
+
"popUpWarning.warning.unpublish-question": "¿Seguro que no quieres publicarlo?",
|
|
272
|
+
"popUpWarning.warning.updateAllSettings": "Esto modificará todos tus ajustes",
|
|
273
|
+
"preview.panel.title": "Previsualización",
|
|
274
|
+
"preview.panel.button": "Abrir previsualización",
|
|
275
|
+
"preview.panel.button-disabled-tooltip": "Por favor guarda para abrir la vista previa",
|
|
276
|
+
"preview.page-title": "Previsualizar {contentType}",
|
|
277
|
+
"preview.header.close": "Cerrar previsualización",
|
|
278
|
+
"preview.copy.label": "Copiar enlace de previsualización",
|
|
279
|
+
"preview.copy.success": "Enlace de previsualización copiado",
|
|
280
|
+
"preview.tabs.label": "Estado de previsualización",
|
|
281
|
+
"relation.add": "Añadir relación",
|
|
282
|
+
"relation.disconnect": "Eliminar",
|
|
283
|
+
"relation.error-adding-relation": "Se ha producido un error al intentar añadir la relación.",
|
|
284
|
+
"relation.isLoading": "Cargando relaciones",
|
|
285
|
+
"relation.loadMore": "Cargar más",
|
|
286
|
+
"relation.notAvailable": "No hay relaciones disponibles",
|
|
287
|
+
"relation.publicationState.draft": "Borrador",
|
|
288
|
+
"relation.publicationState.published": "Publicado",
|
|
289
|
+
"reviewWorkflows.stage.label": "Fase de revisión",
|
|
290
|
+
"select.currently.selected": "{count} actualmente seleccionado",
|
|
291
|
+
"success.record.clone": "Documento clonado",
|
|
292
|
+
"success.record.discard": "Cambios descartados",
|
|
293
|
+
"success.record.publishing": "Publicando...",
|
|
294
|
+
"success.records.delete": "Correctamente eliminado.",
|
|
295
|
+
"success.records.unpublish": "Correctamente despublicado.",
|
|
296
|
+
"success.records.publish": "Correctamente publicado.",
|
|
297
|
+
"listView.validation.errors.title": "Acción requerida",
|
|
298
|
+
"listView.validation.errors.message": "Asegúrate de que todos los campos son válidos antes de publicarlos (campos obligatorio, límite mínimo/máximo de caracteres, etc.)",
|
|
299
|
+
"history.document-action": "Historial de contenido",
|
|
300
|
+
"history.page-title": "Historial de {contentType}",
|
|
301
|
+
"history.sidebar.title": "Versiones",
|
|
302
|
+
"history.sidebar.version-card.aria-label": "Tarjeta de versión",
|
|
303
|
+
"history.sidebar.versionDescription": "{distanceToNow}{isAnonymous, select, true {} other { de {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}",
|
|
304
|
+
"history.sidebar.show-newer": "Mostrar versiones más recientes",
|
|
305
|
+
"history.sidebar.show-older": "Mostrar versiones más antiguas",
|
|
306
|
+
"history.version.subtitle": "{hasLocale, select, true {{subtitle}, en {locale}} other {{subtitle}}}",
|
|
307
|
+
"history.content.new-field.title": "Nuevo campo",
|
|
308
|
+
"history.content.new-field.message": "Este campo no existía cuando se guardó esta versión. Si restauras esta versión, estará vacío.",
|
|
309
|
+
"history.content.unknown-fields.title": "Campos desconocidos",
|
|
310
|
+
"history.content.unknown-fields.message": "Estos campos han sido eliminados o renombrados en el Constructor de Tipos de Contenido. <b>Estos campos no se restaurarán.</b>",
|
|
311
|
+
"history.content.missing-assets.title": "{number, plural, =1 {Archivo Perdido} other {{number} archivos perdidos}}",
|
|
312
|
+
"history.content.missing-assets.message": "{number, plural, =1 {Ha sido} other {Han sido}} eliminados en la librería de medios y no se pueden restaurar",
|
|
313
|
+
"history.content.missing-relations.title": "{number, plural, =1 {Relación perdida} other {{number} relaciones perdidas}}",
|
|
314
|
+
"history.content.missing-relations.message": "{number, plural, =1 {Ha sido} other {Han sido}} eliminadas y no se pueden restaurar.",
|
|
315
|
+
"history.content.no-relations": "Sin relaciones.",
|
|
316
|
+
"history.content.localized": "Este valor es específico de esta configuración regional. Si restaura esta versión, el contenido no se reemplazará para otras configuraciones regionales.",
|
|
317
|
+
"history.content.not-localized": "Este valor es común a todas las configuraciones regionales. Si restablece esta versión, el contenido se sustituirá para todas las configuraciones regionales.",
|
|
318
|
+
"history.restore.confirm.button": "Restablecer",
|
|
319
|
+
"history.restore.confirm.title": "¿Estás seguro de que quieres restaurar esta versión?",
|
|
320
|
+
"history.restore.confirm.message": "{isDraft, select, true {El contenido restaurado anulará tu borrador.} other {El contenido restaurado no se publicará, anulará el borrador y se guardará como cambios pendientes. Podrás publicar los cambios en cualquier momento.}}",
|
|
321
|
+
"history.restore.success.title": "Versión restablecida.",
|
|
322
|
+
"history.restore.success.message": "Se ha restaurado una versión anterior del contenido.",
|
|
323
|
+
"history.restore.error.message": "No se ha podido restaurar la versión.",
|
|
324
|
+
"validation.error": "Hay errores de validación en tu documento. Por favor, corrígelos antes de guardar.",
|
|
325
|
+
"bulk-publish.edit": "Editar",
|
|
195
326
|
"widget.chart-entries.title": "Entradas",
|
|
196
327
|
"widget.chart-entries.count.label": "{count, plural, =0 {Entradas} one {Entrada} other {Entradas}}",
|
|
197
328
|
"widget.chart-entries.tooltip": "{count} {label}",
|
|
198
|
-
"
|
|
199
|
-
"
|
|
329
|
+
"widget.last-edited.title": "Últimas entradas editadas",
|
|
330
|
+
"widget.last-edited.single-type": "Tipo único",
|
|
331
|
+
"widget.last-edited.no-data": "No hay entradas editadas",
|
|
332
|
+
"widget.last-published.title": "Últimas entradas publicadas",
|
|
333
|
+
"widget.last-published.no-data": "No hay entradas publicadas"
|
|
200
334
|
};
|
|
201
335
|
|
|
202
336
|
exports.default = es;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -188,11 +188,145 @@ var es = {
|
|
|
188
188
|
"utils.data-loaded": "{number, plural, =1 {La entrada se ha cargado correctamente} other {Las entradas se han cargado correctamente}}",
|
|
189
189
|
"popUpWarning.warning.publish-question": "¿Aún quieres publicarlo?",
|
|
190
190
|
"popUpwarning.warning.has-draft-relations.button-confirm": "Si, publicar",
|
|
191
|
+
"actions.clone.error": "Ha ocurrido un error al tratar de clonar el document.",
|
|
192
|
+
"actions.clone.label": "Duplicar",
|
|
193
|
+
"actions.delete.dialog.body": "¿Estás seguro de que quieres eliminar este documento? Esta acción es irreversible.",
|
|
194
|
+
"actions.delete.error": "Ha ocurrido un error al tratar de eliminar el documento.",
|
|
195
|
+
"actions.delete.label": "Eliminar entrada{isLocalized, select, true { (all locales)} other {}}",
|
|
196
|
+
"actions.discard.label": "Descartar cambios",
|
|
197
|
+
"actions.discard.dialog.body": "¿Estás seguro de descartar los cambios? Esta acción es irreversible.",
|
|
198
|
+
"actions.edit.error": "Ha ocurrido un error al tratar de editar el documento.",
|
|
199
|
+
"actions.edit.label": "Editar",
|
|
200
|
+
"actions.unpublish.error": "Ha ocurrido un error al tratar de despublicar el documento.",
|
|
201
|
+
"actions.unpublish.dialog.body": "¿Estás seguro de que quieres despublicar esto?",
|
|
202
|
+
"actions.unpublish.dialog.option.keep-draft": "Despublicar y mantener último borrador",
|
|
203
|
+
"actions.unpublish.dialog.option.replace-draft": "Despublicar y reemplazar ultimo borrador",
|
|
204
|
+
"actions-drawer.open": "Abrir más acciones",
|
|
205
|
+
"actions-drawer.close": "Cerrar más acciones",
|
|
206
|
+
"ListViewTable.relation-loading": "Las relaciones están cargando",
|
|
207
|
+
"ListViewTable.relation-more": "Esta relación contiene más entidades de las que se muestran",
|
|
208
|
+
"apiError.This attribute must be unique": "{field} tiene que ser único",
|
|
209
|
+
"components.DynamicZone.extra-components": "Hay {number, plural, =0 {# componentes extra} one {un # componente extra} other {# componentes extra}}",
|
|
210
|
+
"components.Filters.usersSelect.label": "Buscar y filtrar por un usuario",
|
|
211
|
+
"components.RelationInput.icon-button-aria-label": "Arrastrar",
|
|
212
|
+
"bulk-publish.already-published": "Ya publicado",
|
|
213
|
+
"bulk-unpublish.already-unpublished": "Ya despublicado",
|
|
214
|
+
"bulk-publish.modified": "Listo para publicar cambios",
|
|
215
|
+
"containers.edit.tabs.label": "Estado del documento",
|
|
216
|
+
"containers.edit.tabs.draft": "borrador",
|
|
217
|
+
"containers.edit.tabs.published": "publicado",
|
|
218
|
+
"containers.edit.panels.default.title": "Entrada",
|
|
219
|
+
"containers.edit.panels.default.more-actions": "Más acciones de documento",
|
|
220
|
+
"containers.edit.title.new": "Crear una entrada",
|
|
221
|
+
"containers.edit.header.more-actions": "Más acciones",
|
|
222
|
+
"containers.edit.information.last-published.label": "Publicado",
|
|
223
|
+
"containers.edit.information.last-published.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
224
|
+
"containers.edit.information.last-draft.label": "Updated",
|
|
225
|
+
"containers.edit.information.last-draft.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
226
|
+
"containers.edit.information.document.label": "Created",
|
|
227
|
+
"containers.edit.information.document.value": "{time}{isAnonymous, select, true {} other { por {author}}}",
|
|
228
|
+
"containers.list.table.row-actions": "Acciones de fila",
|
|
229
|
+
"containers.list.selectedEntriesModal.title": "Publicar entradas",
|
|
230
|
+
"containers.list.selectedEntriesModal.selectedCount.publish": "<b>{publishedCount}</b> {publishedCount, plural, =0 {entradas} one {entrada} other {entradas}} ya publicadas. <b>{draftCount}</b> {draftCount, plural, =0 {entradas} one {entrada} other {entradas}} listas para publicar. <b>{withErrorsCount}</b> {withErrorsCount, plural, =0 {entradas} one {entrada} other {entradas}} esperando a una acción.",
|
|
231
|
+
"containers.list.selectedEntriesModal.selectedCount.unpublish": "<b>{draftCount}</b> {draftCount, plural, =0 {entradas} one {entrada} other {entradas}} ya publicadas. <b>{publishedCount}</b> {publishedCount, plural, =0 {entradas} one {entrada} other {entradas}} listas para despublicar.",
|
|
232
|
+
"containers.list.autoCloneModal.header": "Duplicar",
|
|
233
|
+
"containers.list.autoCloneModal.title": "Esta entrada no puede ser directamente duplicada.",
|
|
234
|
+
"containers.list.autoCloneModal.description": "Se creará una nueva entrada con el mismo contenido, pero tendrás que cambiar los siguientes campos para guardarlo.",
|
|
235
|
+
"containers.list.autoCloneModal.create": "Crear",
|
|
236
|
+
"containers.list.autoCloneModal.error.unique": "No se permiten valores idénticos en un campo único.",
|
|
237
|
+
"containers.list.autoCloneModal.error.relation": "Duplicar la relación podría eliminarla de la entrada original.",
|
|
238
|
+
"containers.list-settings.modal-form.label": "Editar {fieldName}",
|
|
239
|
+
"containers.list-settings.modal-form.error": "Se ha producido un error al intentar abrir el formulario.",
|
|
240
|
+
"containers.edit-settings.modal-form.error": "Se ha producido un error al intentar abrir el formulario.",
|
|
241
|
+
"containers.edit-settings.modal-form.label": "Etiqueta",
|
|
242
|
+
"containers.edit-settings.modal-form.description": "Descripción",
|
|
243
|
+
"containers.edit-settings.modal-form.placeholder": "Placeholder",
|
|
244
|
+
"containers.edit-settings.modal-form.mainField": "Título de entrada",
|
|
245
|
+
"containers.edit-settings.modal-form.mainField.hint": "Establece el campo mostrado tanto en la vista de edición como en la de lista",
|
|
246
|
+
"containers.edit-settings.modal-form.editable": "Campo editable",
|
|
247
|
+
"containers.edit-settings.modal-form.size": "Tamaño",
|
|
248
|
+
"containers.SettingPage.add.relational-field": "Inserta otro campo relacionado",
|
|
249
|
+
"containers.SettingPage.relations": "Campos relacionados",
|
|
250
|
+
"dnd.cancel-item": "{item}, descartado. Pedido anulado.",
|
|
251
|
+
"dnd.drop-item": "{item}, descartado. Posición final en la lista: {position}.",
|
|
252
|
+
"dnd.grab-item": "{item}, agarrado. Posición actual en la lista: {position}. Pulsa las flechas arriba y abajo para cambiar de posición, la barra espaciadora para soltar, Escape para cancelar.",
|
|
253
|
+
"dnd.instructions": "Pulsa barra espaciadora para agarrar y reordenar",
|
|
254
|
+
"dnd.reorder": "{item}, movido. Nueva posición en la lista: {position}.",
|
|
255
|
+
"error.records.fetch-draft-relatons": "Se ha producido un error al obtener el borrador de relaciones de este documento.",
|
|
256
|
+
"form.Input.hint.character.unit": "{maxValue, plural, one { carácter} other { carácteres}}",
|
|
257
|
+
"form.Input.hint.minMaxDivider": " / ",
|
|
258
|
+
"form.Input.hint.text": "{min, select, undefined {} other {min. {min}}}{divider}{max, select, undefined {} other {max. {max}}}{unit}{br}{description}",
|
|
259
|
+
"popUpWarning.bodyMessage.contentType.delete": "¿Estás seguro de que quieres eliminar el tipo de Contenido?",
|
|
260
|
+
"popUpWarning.bodyMessage.contentType.delete.all": "¿Estás seguro de que quieres eliminar estas entradas?",
|
|
261
|
+
"popUpWarning.bodyMessage.contentType.publish.all": "¿Estás seguro de que quieres publicar estas entradas?",
|
|
262
|
+
"popUpWarning.bodyMessage.contentType.unpublish.all": "¿Estas seguro de que quieres despublicar estas entradas?",
|
|
263
|
+
"popUpWarning.warning.has-draft-relations.title": "Confirmación",
|
|
264
|
+
"popUpWarning.warning.has-draft-relations.message": "Esta entrada está relacionada a {count, plural, one {# entrada borrador} other {# entradas borrador}}. Su publicación podría dejar enlaces rotos en tu aplicación.",
|
|
265
|
+
"popUpwarning.warning.bulk-has-draft-relations.message": "<b>{count} {count, plural, one { relación } other { relaciones } } de {entities} { entities, plural, one { entrada } other { entradas } } {count, plural, one { no está } other { no están } }</b> publicadas aún y pueden causar comportamientos no esperados. ",
|
|
266
|
+
"popUpWarning.warning.unpublish": "Si no publicas este contenido, se convertirá automáticamente en un borrador.",
|
|
267
|
+
"popUpWarning.warning.unpublish-question": "¿Seguro que no quieres publicarlo?",
|
|
268
|
+
"popUpWarning.warning.updateAllSettings": "Esto modificará todos tus ajustes",
|
|
269
|
+
"preview.panel.title": "Previsualización",
|
|
270
|
+
"preview.panel.button": "Abrir previsualización",
|
|
271
|
+
"preview.panel.button-disabled-tooltip": "Por favor guarda para abrir la vista previa",
|
|
272
|
+
"preview.page-title": "Previsualizar {contentType}",
|
|
273
|
+
"preview.header.close": "Cerrar previsualización",
|
|
274
|
+
"preview.copy.label": "Copiar enlace de previsualización",
|
|
275
|
+
"preview.copy.success": "Enlace de previsualización copiado",
|
|
276
|
+
"preview.tabs.label": "Estado de previsualización",
|
|
277
|
+
"relation.add": "Añadir relación",
|
|
278
|
+
"relation.disconnect": "Eliminar",
|
|
279
|
+
"relation.error-adding-relation": "Se ha producido un error al intentar añadir la relación.",
|
|
280
|
+
"relation.isLoading": "Cargando relaciones",
|
|
281
|
+
"relation.loadMore": "Cargar más",
|
|
282
|
+
"relation.notAvailable": "No hay relaciones disponibles",
|
|
283
|
+
"relation.publicationState.draft": "Borrador",
|
|
284
|
+
"relation.publicationState.published": "Publicado",
|
|
285
|
+
"reviewWorkflows.stage.label": "Fase de revisión",
|
|
286
|
+
"select.currently.selected": "{count} actualmente seleccionado",
|
|
287
|
+
"success.record.clone": "Documento clonado",
|
|
288
|
+
"success.record.discard": "Cambios descartados",
|
|
289
|
+
"success.record.publishing": "Publicando...",
|
|
290
|
+
"success.records.delete": "Correctamente eliminado.",
|
|
291
|
+
"success.records.unpublish": "Correctamente despublicado.",
|
|
292
|
+
"success.records.publish": "Correctamente publicado.",
|
|
293
|
+
"listView.validation.errors.title": "Acción requerida",
|
|
294
|
+
"listView.validation.errors.message": "Asegúrate de que todos los campos son válidos antes de publicarlos (campos obligatorio, límite mínimo/máximo de caracteres, etc.)",
|
|
295
|
+
"history.document-action": "Historial de contenido",
|
|
296
|
+
"history.page-title": "Historial de {contentType}",
|
|
297
|
+
"history.sidebar.title": "Versiones",
|
|
298
|
+
"history.sidebar.version-card.aria-label": "Tarjeta de versión",
|
|
299
|
+
"history.sidebar.versionDescription": "{distanceToNow}{isAnonymous, select, true {} other { de {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}",
|
|
300
|
+
"history.sidebar.show-newer": "Mostrar versiones más recientes",
|
|
301
|
+
"history.sidebar.show-older": "Mostrar versiones más antiguas",
|
|
302
|
+
"history.version.subtitle": "{hasLocale, select, true {{subtitle}, en {locale}} other {{subtitle}}}",
|
|
303
|
+
"history.content.new-field.title": "Nuevo campo",
|
|
304
|
+
"history.content.new-field.message": "Este campo no existía cuando se guardó esta versión. Si restauras esta versión, estará vacío.",
|
|
305
|
+
"history.content.unknown-fields.title": "Campos desconocidos",
|
|
306
|
+
"history.content.unknown-fields.message": "Estos campos han sido eliminados o renombrados en el Constructor de Tipos de Contenido. <b>Estos campos no se restaurarán.</b>",
|
|
307
|
+
"history.content.missing-assets.title": "{number, plural, =1 {Archivo Perdido} other {{number} archivos perdidos}}",
|
|
308
|
+
"history.content.missing-assets.message": "{number, plural, =1 {Ha sido} other {Han sido}} eliminados en la librería de medios y no se pueden restaurar",
|
|
309
|
+
"history.content.missing-relations.title": "{number, plural, =1 {Relación perdida} other {{number} relaciones perdidas}}",
|
|
310
|
+
"history.content.missing-relations.message": "{number, plural, =1 {Ha sido} other {Han sido}} eliminadas y no se pueden restaurar.",
|
|
311
|
+
"history.content.no-relations": "Sin relaciones.",
|
|
312
|
+
"history.content.localized": "Este valor es específico de esta configuración regional. Si restaura esta versión, el contenido no se reemplazará para otras configuraciones regionales.",
|
|
313
|
+
"history.content.not-localized": "Este valor es común a todas las configuraciones regionales. Si restablece esta versión, el contenido se sustituirá para todas las configuraciones regionales.",
|
|
314
|
+
"history.restore.confirm.button": "Restablecer",
|
|
315
|
+
"history.restore.confirm.title": "¿Estás seguro de que quieres restaurar esta versión?",
|
|
316
|
+
"history.restore.confirm.message": "{isDraft, select, true {El contenido restaurado anulará tu borrador.} other {El contenido restaurado no se publicará, anulará el borrador y se guardará como cambios pendientes. Podrás publicar los cambios en cualquier momento.}}",
|
|
317
|
+
"history.restore.success.title": "Versión restablecida.",
|
|
318
|
+
"history.restore.success.message": "Se ha restaurado una versión anterior del contenido.",
|
|
319
|
+
"history.restore.error.message": "No se ha podido restaurar la versión.",
|
|
320
|
+
"validation.error": "Hay errores de validación en tu documento. Por favor, corrígelos antes de guardar.",
|
|
321
|
+
"bulk-publish.edit": "Editar",
|
|
191
322
|
"widget.chart-entries.title": "Entradas",
|
|
192
323
|
"widget.chart-entries.count.label": "{count, plural, =0 {Entradas} one {Entrada} other {Entradas}}",
|
|
193
324
|
"widget.chart-entries.tooltip": "{count} {label}",
|
|
194
|
-
"
|
|
195
|
-
"
|
|
325
|
+
"widget.last-edited.title": "Últimas entradas editadas",
|
|
326
|
+
"widget.last-edited.single-type": "Tipo único",
|
|
327
|
+
"widget.last-edited.no-data": "No hay entradas editadas",
|
|
328
|
+
"widget.last-published.title": "Últimas entradas publicadas",
|
|
329
|
+
"widget.last-published.no-data": "No hay entradas publicadas"
|
|
196
330
|
};
|
|
197
331
|
|
|
198
332
|
export { es as default, groups, models, pageNotFound };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var objects = require('./objects.js');
|
|
4
|
+
|
|
5
|
+
const CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';
|
|
6
|
+
const CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';
|
|
7
|
+
const serializeConditionDependency = (value)=>{
|
|
8
|
+
try {
|
|
9
|
+
return `${typeof value}:${JSON.stringify(value)}`;
|
|
10
|
+
} catch {
|
|
11
|
+
return `${typeof value}:${String(value)}`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* `null` means "fallback to broad subscription" because we couldn't safely infer
|
|
16
|
+
* dependency paths from the condition.
|
|
17
|
+
*/ const getVarDependencyPath = (operand)=>{
|
|
18
|
+
if (typeof operand === 'string') {
|
|
19
|
+
return operand.length > 0 ? operand : null;
|
|
20
|
+
}
|
|
21
|
+
if (Array.isArray(operand)) {
|
|
22
|
+
const [path] = operand;
|
|
23
|
+
if (typeof path === 'string') {
|
|
24
|
+
return path.length > 0 ? path : null;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
const getConditionDependencyPaths = (condition)=>{
|
|
31
|
+
const dependencies = new Set();
|
|
32
|
+
const collectDependencies = (value)=>{
|
|
33
|
+
if (Array.isArray(value)) {
|
|
34
|
+
return value.every(collectDependencies);
|
|
35
|
+
}
|
|
36
|
+
if (value === null || typeof value !== 'object') {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return Object.entries(value).every(([key, operand])=>{
|
|
40
|
+
if (key === 'var') {
|
|
41
|
+
const dependencyPath = getVarDependencyPath(operand);
|
|
42
|
+
if (dependencyPath === null) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (dependencyPath) {
|
|
46
|
+
dependencies.add(dependencyPath);
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
return collectDependencies(operand);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return collectDependencies(condition) ? [
|
|
54
|
+
...dependencies
|
|
55
|
+
].sort() : null;
|
|
56
|
+
};
|
|
57
|
+
const getConditionDependencySubscriptionValue = (values, conditionDependencyPaths)=>{
|
|
58
|
+
if (conditionDependencyPaths === null) {
|
|
59
|
+
return values;
|
|
60
|
+
}
|
|
61
|
+
if (conditionDependencyPaths.length === 0) {
|
|
62
|
+
return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;
|
|
63
|
+
}
|
|
64
|
+
if (conditionDependencyPaths.length === 1) {
|
|
65
|
+
return serializeConditionDependency(objects.getIn(values, conditionDependencyPaths[0]));
|
|
66
|
+
}
|
|
67
|
+
return conditionDependencyPaths.map((path)=>serializeConditionDependency(objects.getIn(values, path))).join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR;
|
|
71
|
+
exports.CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;
|
|
72
|
+
exports.getConditionDependencyPaths = getConditionDependencyPaths;
|
|
73
|
+
exports.getConditionDependencySubscriptionValue = getConditionDependencySubscriptionValue;
|
|
74
|
+
exports.getVarDependencyPath = getVarDependencyPath;
|
|
75
|
+
exports.serializeConditionDependency = serializeConditionDependency;
|
|
76
|
+
//# sourceMappingURL=conditionalFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionalFields.js","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getCondit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AA;AACV;;;;;;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { getIn } from './objects.mjs';
|
|
2
|
+
|
|
3
|
+
const CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';
|
|
4
|
+
const CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';
|
|
5
|
+
const serializeConditionDependency = (value)=>{
|
|
6
|
+
try {
|
|
7
|
+
return `${typeof value}:${JSON.stringify(value)}`;
|
|
8
|
+
} catch {
|
|
9
|
+
return `${typeof value}:${String(value)}`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* `null` means "fallback to broad subscription" because we couldn't safely infer
|
|
14
|
+
* dependency paths from the condition.
|
|
15
|
+
*/ const getVarDependencyPath = (operand)=>{
|
|
16
|
+
if (typeof operand === 'string') {
|
|
17
|
+
return operand.length > 0 ? operand : null;
|
|
18
|
+
}
|
|
19
|
+
if (Array.isArray(operand)) {
|
|
20
|
+
const [path] = operand;
|
|
21
|
+
if (typeof path === 'string') {
|
|
22
|
+
return path.length > 0 ? path : null;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
const getConditionDependencyPaths = (condition)=>{
|
|
29
|
+
const dependencies = new Set();
|
|
30
|
+
const collectDependencies = (value)=>{
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
return value.every(collectDependencies);
|
|
33
|
+
}
|
|
34
|
+
if (value === null || typeof value !== 'object') {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return Object.entries(value).every(([key, operand])=>{
|
|
38
|
+
if (key === 'var') {
|
|
39
|
+
const dependencyPath = getVarDependencyPath(operand);
|
|
40
|
+
if (dependencyPath === null) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (dependencyPath) {
|
|
44
|
+
dependencies.add(dependencyPath);
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
return collectDependencies(operand);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return collectDependencies(condition) ? [
|
|
52
|
+
...dependencies
|
|
53
|
+
].sort() : null;
|
|
54
|
+
};
|
|
55
|
+
const getConditionDependencySubscriptionValue = (values, conditionDependencyPaths)=>{
|
|
56
|
+
if (conditionDependencyPaths === null) {
|
|
57
|
+
return values;
|
|
58
|
+
}
|
|
59
|
+
if (conditionDependencyPaths.length === 0) {
|
|
60
|
+
return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;
|
|
61
|
+
}
|
|
62
|
+
if (conditionDependencyPaths.length === 1) {
|
|
63
|
+
return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));
|
|
64
|
+
}
|
|
65
|
+
return conditionDependencyPaths.map((path)=>serializeConditionDependency(getIn(values, path))).join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR, CONDITIONAL_FIELD_STATIC_SUBSCRIPTION, getConditionDependencyPaths, getConditionDependencySubscriptionValue, getVarDependencyPath, serializeConditionDependency };
|
|
69
|
+
//# sourceMappingURL=conditionalFields.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionalFields.mjs","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getConditionDependencySubscriptionValue","values","conditionDependencyPaths","getIn","map","join"],"mappings":";;AAIA,MAAMA,qCAAAA,GAAwC;AAC9C,MAAMC,qCAAAA,GAAwC;AAE9C,MAAMC,+BAA+B,CAACC,KAAAA,GAAAA;IACpC,IAAI;QACF,OAAO,CAAA,EAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEC,IAAAA,CAAKC,SAAS,CAACF,KAAAA,CAAAA,CAAAA,CAAQ;AACnD,IAAA,CAAA,CAAE,OAAM;AACN,QAAA,OAAO,GAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEG,OAAOH,KAAAA,CAAAA,CAAAA,CAAQ;AAC3C,IAAA;AACF;AAEA;;;IAIA,MAAMI,uBAAuB,CAACC,OAAAA,GAAAA;IAC5B,IAAI,OAAOA,YAAY,QAAA,EAAU;AAC/B,QAAA,OAAOA,OAAAA,CAAQC,MAAM,GAAG,CAAA,GAAID,OAAAA,GAAU,IAAA;AACxC,IAAA;IAEA,IAAIE,KAAAA,CAAMC,OAAO,CAACH,OAAAA,CAAAA,EAAU;QAC1B,MAAM,CAACI,KAAK,GAAGJ,OAAAA;QAEf,IAAI,OAAOI,SAAS,QAAA,EAAU;AAC5B,YAAA,OAAOA,IAAAA,CAAKH,MAAM,GAAG,CAAA,GAAIG,IAAAA,GAAO,IAAA;AAClC,QAAA;QAEA,OAAO,IAAA;AACT,IAAA;IAEA,OAAO,IAAA;AACT;AAEA,MAAMC,8BAA8B,CAACC,SAAAA,GAAAA;AACnC,IAAA,MAAMC,eAAe,IAAIC,GAAAA,EAAAA;AAEzB,IAAA,MAAMC,sBAAsB,CAACd,KAAAA,GAAAA;QAC3B,IAAIO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,EAAQ;YACxB,OAAOA,KAAAA,CAAMe,KAAK,CAACD,mBAAAA,CAAAA;AACrB,QAAA;AAEA,QAAA,IAAId,KAAAA,KAAU,IAAA,IAAQ,OAAOA,KAAAA,KAAU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