strapi-plugin-navigation 2.2.11 → 2.2.13
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/README.md +1 -1
- package/admin/src/components/AdditionalFieldInput/types.d.ts +3 -3
- package/admin/src/components/ConfirmationDialog/index.d.ts +10 -10
- package/admin/src/components/EmptyView/index.js +2 -0
- package/admin/src/components/Item/index.d.ts +15 -15
- package/admin/src/components/NavigationItemList/index.d.ts +11 -11
- package/admin/src/index.d.ts +5 -7
- package/admin/src/index.js +9 -17
- package/admin/src/pages/DataManagerProvider/index.d.ts +1 -1
- package/admin/src/pages/DataManagerProvider/index.js +18 -4
- package/admin/src/pages/DataManagerProvider/reducer.d.ts +15 -15
- package/admin/src/pages/SettingsPage/types.d.ts +8 -8
- package/admin/src/pages/SettingsPage/utils/functions.d.ts +0 -2
- package/admin/src/pages/View/components/NavigationHeader/index.js +2 -0
- package/admin/src/pages/View/components/NavigationItemForm/types.d.ts +8 -8
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.d.ts +9 -9
- package/admin/src/pages/View/components/NavigationItemPopup/index.d.ts +11 -11
- package/admin/src/pages/View/components/NavigationManager/Footer/index.d.ts +1 -1
- package/admin/src/pages/View/components/NavigationManager/types.d.ts +3 -3
- package/admin/src/pages/View/index.d.ts +1 -1
- package/admin/src/pages/View/index.js +3 -0
- package/admin/src/permissions.d.ts +3 -3
- package/admin/src/translations/ca.json +197 -0
- package/admin/src/translations/en.json +2 -1
- package/admin/src/translations/fr.json +2 -1
- package/admin/src/translations/index.d.ts +2 -0
- package/admin/src/translations/index.js +2 -0
- package/admin/src/utils/functions.d.ts +2 -2
- package/package.json +4 -4
- package/server/config/setupStrategy.js +11 -0
- package/server/i18n/graphQLEnhancers.d.ts +1 -1
- package/server/i18n/types.d.ts +11 -11
- package/server/i18n/utils.d.ts +2 -2
- package/server/services/admin.js +1 -1
- package/server/services/common.js +16 -9
- package/server/utils/functions.d.ts +2 -1
- package/server/utils/functions.js +16 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/config.d.ts +8 -8
- package/types/contentTypes.d.ts +20 -20
- package/types/controllers.d.ts +2 -2
- package/types/graphQL.d.ts +1 -1
- package/types/i18n.d.ts +2 -2
- package/types/services.d.ts +2 -2
- package/types/utils.d.ts +21 -21
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components.confirmation.dialog.button.cancel": "Cancel·lar",
|
|
3
|
+
"components.confirmation.dialog.button.confirm": "Confirmeu",
|
|
4
|
+
"components.confirmation.dialog.description": "Vols continuar?",
|
|
5
|
+
"components.confirmation.dialog.header": "Confirmació",
|
|
6
|
+
"components.navigationItem.action.newItem": "Afegeix un element fill",
|
|
7
|
+
"components.navigationItem.badge.draft": "Esborrany",
|
|
8
|
+
"components.navigationItem.badge.published": "Publicat",
|
|
9
|
+
"components.navigationItem.badge.removed": "Eliminat",
|
|
10
|
+
"empty": "El teu menú està buit",
|
|
11
|
+
"empty.cta": "Crea el primer element",
|
|
12
|
+
"header.action.collapseAll": "Col·lapsar tot",
|
|
13
|
+
"header.action.expandAll": "Amplia-ho tot",
|
|
14
|
+
"header.action.manage": "Gestionar",
|
|
15
|
+
"header.action.newItem": "Element nou",
|
|
16
|
+
"header.description": "Definiu la vostra navegació del lloc web",
|
|
17
|
+
"header.title": "Navegació",
|
|
18
|
+
"notification.error": "S'ha produït un error en processar la sol·licitud.",
|
|
19
|
+
"notification.error.customField.type": "Tipus de camp personalitzat no compatible",
|
|
20
|
+
"notification.error.item.relation": "Les relacions proporcionades en alguns elements són incorrectes",
|
|
21
|
+
"notification.error.item.slug": "No es pot crear la clau (slug) vàlida de l'encaminador de la IU des de \"{ query }\". \"{ result }\" rebut",
|
|
22
|
+
"notification.navigation.error": "Camí duplicat: { path } al pare: { parentTitle } per a { errorTitles } elements",
|
|
23
|
+
"notification.navigation.item.relation": "La relació d'entitat no existeix!",
|
|
24
|
+
"notification.navigation.item.relation.status.draft": "esborrany",
|
|
25
|
+
"notification.navigation.item.relation.status.published": "publicat",
|
|
26
|
+
"notification.navigation.submit": "S'han desat els canvis de navegació",
|
|
27
|
+
"pages.main.header.localization.select.placeholder": "Seleccioneu la configuració regional",
|
|
28
|
+
"pages.main.search.placeholder": "Escriviu per començar a cercar...",
|
|
29
|
+
"pages.settings.actions.disableI18n.confirmation.confirm": "entenc",
|
|
30
|
+
"pages.settings.actions.disableI18n.confirmation.description.line1": "Esteu desactivant la internacionalització per a la navegació. Les navegacions per a configuracions regionals diferents de les predeterminades no estan disponibles per a la visualització i modificacions mitjançant aquesta extensió.",
|
|
31
|
+
"pages.settings.actions.disableI18n.confirmation.description.line2": "Podeu optar per eliminar les navegacions per a altres configuracions regionals.",
|
|
32
|
+
"pages.settings.actions.disableI18n.confirmation.description.line3": "Recordeu! L'eliminació és irreversible",
|
|
33
|
+
"pages.settings.actions.disableI18n.confirmation.header": "Desactivació de la internacionalització",
|
|
34
|
+
"pages.settings.actions.disableI18n.prune.label": "Navegacions obsoletes",
|
|
35
|
+
"pages.settings.actions.disableI18n.prune.off": "Mantenir",
|
|
36
|
+
"pages.settings.actions.disableI18n.prune.on": "Eliminar",
|
|
37
|
+
"pages.settings.actions.restart": "Reinicieu Strapi",
|
|
38
|
+
"pages.settings.actions.restart.alert.cancel": "Cancel·lar",
|
|
39
|
+
"pages.settings.actions.restart.alert.close": "Descartar",
|
|
40
|
+
"pages.settings.actions.restart.alert.description": "Heu fet un canvi de configuració que requereix que la vostra aplicació Strapi es reiniciï perquè tingui efecte. Fes-ho manualment o utilitzant el botó següent.",
|
|
41
|
+
"pages.settings.actions.restart.alert.reason.GRAPH_QL": "S'aplicaran els canvis de GraphQL.",
|
|
42
|
+
"pages.settings.actions.restart.alert.reason.I18N": "S'aplicaran els canvis d'internacionalització (i18n).",
|
|
43
|
+
"pages.settings.actions.restart.alert.reason.I18N_NAVIGATIONS_PRUNE": "Les navegacions locals obsoletes s'eliminaran.",
|
|
44
|
+
"pages.settings.actions.restart.alert.title": "Strapi requereix reinici",
|
|
45
|
+
"pages.settings.actions.restore": "Restaura la configuració",
|
|
46
|
+
"pages.settings.actions.restore.confirmation.confirm": "Restaurar",
|
|
47
|
+
"pages.settings.actions.restore.confirmation.description": "La configuració de l'extensió es restaurarà des del fitxer plugins.js.",
|
|
48
|
+
"pages.settings.actions.restore.confirmation.header": "Vols continuar?",
|
|
49
|
+
"pages.settings.actions.restore.description": "La restauració de la configuració de l'extensió farà que es substitueixi per la configuració desada dins del fitxer \"plugins.js\".",
|
|
50
|
+
"pages.settings.actions.submit": "Desa la configuració",
|
|
51
|
+
"pages.settings.additional.title": "Configuracions addicionals",
|
|
52
|
+
"pages.settings.customFields.title": "Configuració de camps personalitzats",
|
|
53
|
+
"pages.settings.form.allowedLevels.hint": "Nivell màxim per al qual podeu marcar l'element com a \"Menú adjunt\"",
|
|
54
|
+
"pages.settings.form.allowedLevels.label": "Nivells permesos",
|
|
55
|
+
"pages.settings.form.allowedLevels.placeholder": "per exemple. 2",
|
|
56
|
+
"pages.settings.form.audience.hint": "Activa el camp de públic",
|
|
57
|
+
"pages.settings.form.audience.label": "Públic",
|
|
58
|
+
"pages.settings.form.contentTypes.hint": "Si no se selecciona cap, tampoc no s'habilitarà cap dels tipus de contingut",
|
|
59
|
+
"pages.settings.form.contentTypes.label": "Habilita la navegació per",
|
|
60
|
+
"pages.settings.form.contentTypes.placeholder": "per exemple. Pàgines, publicacions",
|
|
61
|
+
"pages.settings.form.contentTypesSettings.initializationWarning.content": "- El tipus de contingut encara no s'ha inicialitzat. Inicialitzeu-lo primer per poder utilitzar-lo en un editor visual.",
|
|
62
|
+
"pages.settings.form.contentTypesSettings.initializationWarning.title": "Avís",
|
|
63
|
+
"pages.settings.form.contentTypesSettings.label": "Tipus de contingut",
|
|
64
|
+
"pages.settings.form.contentTypesSettings.tooltip": "Configuració personalitzada per tipus de contingut",
|
|
65
|
+
"pages.settings.form.customFields.popup.header.edit": "Edita el camp personalitzat",
|
|
66
|
+
"pages.settings.form.customFields.popup.header.new": "Afegeix un camp personalitzat nou",
|
|
67
|
+
"pages.settings.form.customFields.popup.label.description": "Aquesta etiqueta es mostrarà al formulari d'elements de navegació",
|
|
68
|
+
"pages.settings.form.customFields.popup.label.label": "Etiqueta de camp personalitzada",
|
|
69
|
+
"pages.settings.form.customFields.popup.label.placeholder": "Exemple d'etiqueta",
|
|
70
|
+
"pages.settings.form.customFields.popup.multi.label": "Activa l'entrada d'opcions múltiples",
|
|
71
|
+
"pages.settings.form.customFields.popup.name.description": "El nom del camp personalitzat ha de ser únic",
|
|
72
|
+
"pages.settings.form.customFields.popup.name.label": "Nom del camp personalitzat",
|
|
73
|
+
"pages.settings.form.customFields.popup.name.placeholder": "nom_exemple",
|
|
74
|
+
"pages.settings.form.customFields.popup.options.description": "Activar aquest camp no canviarà els elements de navegació que ja estan sortint",
|
|
75
|
+
"pages.settings.form.customFields.popup.options.label": "Opcions per seleccionar l'entrada",
|
|
76
|
+
"pages.settings.form.customFields.popup.required.description": "Activar aquest camp no canviarà els elements de navegació que ja estan sortint",
|
|
77
|
+
"pages.settings.form.customFields.popup.required.label": "Camp obligatori",
|
|
78
|
+
"pages.settings.form.customFields.popup.type.label": "Tipus de camp personalitzat",
|
|
79
|
+
"pages.settings.form.customFields.table.confirmation.confirm": "Continua",
|
|
80
|
+
"pages.settings.form.customFields.table.confirmation.error": "S'ha produït un error en eliminar el camp personalitzat",
|
|
81
|
+
"pages.settings.form.customFields.table.confirmation.header": "S'està eliminant el camp personalitzat",
|
|
82
|
+
"pages.settings.form.customFields.table.confirmation.message": "Aquesta acció farà que s'eliminin tots els valors dels camps personalitzats dels elements de navegació.",
|
|
83
|
+
"pages.settings.form.customFields.table.disable": "Desactiva el camp personalitzat",
|
|
84
|
+
"pages.settings.form.customFields.table.edit": "Edita el camp personalitzat",
|
|
85
|
+
"pages.settings.form.customFields.table.enable": "Activa el camp personalitzat",
|
|
86
|
+
"pages.settings.form.customFields.table.footer": "Crea un camp personalitzat nou",
|
|
87
|
+
"pages.settings.form.customFields.table.header.label": "Etiqueta",
|
|
88
|
+
"pages.settings.form.customFields.table.header.name": "Nom",
|
|
89
|
+
"pages.settings.form.customFields.table.header.required": "Obligatori",
|
|
90
|
+
"pages.settings.form.customFields.table.header.type": "Tipus",
|
|
91
|
+
"pages.settings.form.customFields.table.notRequired": "no obligatori",
|
|
92
|
+
"pages.settings.form.customFields.table.remove": "Elimina el camp personalitzat",
|
|
93
|
+
"pages.settings.form.customFields.table.required": "obligatori",
|
|
94
|
+
"pages.settings.form.i18n.hint": "Habilitar la internacionalització",
|
|
95
|
+
"pages.settings.form.i18n.hint.missingDefaultLocale": "Falta la configuració regional predeterminada!",
|
|
96
|
+
"pages.settings.form.i18n.label": "i18n",
|
|
97
|
+
"pages.settings.form.nameField.empty": "Aquest tipus de contingut no té cap atribut de text",
|
|
98
|
+
"pages.settings.form.nameField.hint": "Si es deixa el camp de nom buit, prendrà els següents camps ordenats: \"títol\", \"assumpte\" i \"nom\"",
|
|
99
|
+
"pages.settings.form.nameField.label": "Camps de nom",
|
|
100
|
+
"pages.settings.form.nameField.placeholder": "Seleccioneu almenys un o deixeu-lo buit per aplicar els valors predeterminats",
|
|
101
|
+
"pages.settings.form.pathDefaultFields.empty": "Aquest tipus de contingut no té cap atribut adequat",
|
|
102
|
+
"pages.settings.form.pathDefaultFields.hint": "El valor de l'atribut seleccionat serà un valor predeterminat per al camí intern",
|
|
103
|
+
"pages.settings.form.pathDefaultFields.label": "Camps predeterminats del camí",
|
|
104
|
+
"pages.settings.form.pathDefaultFields.placeholder": "Seleccioneu-ne com a mínim un o deixeu-lo buit per desactivar l'emplenat del camp del camí amb el valor dels atributs",
|
|
105
|
+
"pages.settings.form.populate.empty": "Aquest tipus de contingut no té cap camp de relació",
|
|
106
|
+
"pages.settings.form.populate.hint": "Els camps de relació seleccionats s'emplenaran dins de les respostes de l'API",
|
|
107
|
+
"pages.settings.form.populate.label": "Camps a omplir",
|
|
108
|
+
"pages.settings.form.populate.placeholder": "Seleccioneu-ne com a mínim un o deixeu-lo buit per desactivar l'ompliment dels camps de relació",
|
|
109
|
+
"pages.settings.general.title": "Configuració general",
|
|
110
|
+
"pages.settings.header.description": "Configura el connector de navegació",
|
|
111
|
+
"pages.settings.header.title": "Navegació",
|
|
112
|
+
"pages.settings.nameField.title": "Configuració dels tipus de contingut",
|
|
113
|
+
"pages.settings.notification.fetch.error": "No s'ha pogut obtenir la configuració. S'està tornant a provar...",
|
|
114
|
+
"pages.settings.notification.restart.error": "No s'ha pogut reiniciar l'aplicació. Intenta fer-ho manualment.",
|
|
115
|
+
"pages.settings.notification.restart.success": "L'aplicació s'ha reiniciat correctament",
|
|
116
|
+
"pages.settings.notification.restore.error": "La restauració de la configuració ha fallat",
|
|
117
|
+
"pages.settings.notification.restore.success": "La configuració s'ha restaurat correctament",
|
|
118
|
+
"pages.settings.notification.submit.error": "L'actualització de la configuració ha fallat",
|
|
119
|
+
"pages.settings.notification.submit.success": "La configuració s'ha actualitzat correctament",
|
|
120
|
+
"pages.settings.restoring.title": "Restauració",
|
|
121
|
+
"pages.settings.section.subtitle": "Configuració",
|
|
122
|
+
"pages.settings.section.title": "Extensió de navegació",
|
|
123
|
+
"pages.view.actions.i18nCopyItems.confirmation.confirm": "Còpia",
|
|
124
|
+
"pages.view.actions.i18nCopyItems.confirmation.content": "Voleu copiar els elements de navegació?",
|
|
125
|
+
"pages.view.actions.i18nCopyItems.confirmation.header": "Confirmació",
|
|
126
|
+
"plugin.name": "Navegació",
|
|
127
|
+
"popup.item.form.audience.empty": "No hi ha més públic",
|
|
128
|
+
"popup.item.form.audience.label": "Públic",
|
|
129
|
+
"popup.item.form.audience.placeholder": "Selecciona el públic...",
|
|
130
|
+
"popup.item.form.button.cancel": "Cancel·lar",
|
|
131
|
+
"popup.item.form.button.create": "Crea un element",
|
|
132
|
+
"popup.item.form.button.remove": "Eliminar",
|
|
133
|
+
"popup.item.form.button.restore": "Restaura l'element",
|
|
134
|
+
"popup.item.form.button.save": "Desa",
|
|
135
|
+
"popup.item.form.button.update": "Actualitza l'element",
|
|
136
|
+
"popup.item.form.externalPath.label": "URL externa",
|
|
137
|
+
"popup.item.form.externalPath.placeholder": "Enllaç a la pàgina externa",
|
|
138
|
+
"popup.item.form.externalPath.validation.type": "Aquest valor no és una URL adequada.",
|
|
139
|
+
"popup.item.form.i18n.locale.button": "Còpia",
|
|
140
|
+
"popup.item.form.i18n.locale.error.generic": "No es pot copiar l'element",
|
|
141
|
+
"popup.item.form.i18n.locale.error.unavailable": "La versió local no està disponible",
|
|
142
|
+
"popup.item.form.i18n.locale.label": "Copia els detalls de",
|
|
143
|
+
"popup.item.form.i18n.locale.placeholder": "local",
|
|
144
|
+
"popup.item.form.menuAttached.label": "Adjuntar al menú",
|
|
145
|
+
"popup.item.form.path.label": "URL",
|
|
146
|
+
"popup.item.form.path.placeholder": "La part d'URL única identifica aquest element",
|
|
147
|
+
"popup.item.form.path.preview": "Vista prèvia:",
|
|
148
|
+
"popup.item.form.related.empty": "No hi ha més entitats de \"{ contentTypeName }\" per seleccionar",
|
|
149
|
+
"popup.item.form.related.label": "Entitat",
|
|
150
|
+
"popup.item.form.relatedSection.label": "Relació amb",
|
|
151
|
+
"popup.item.form.relatedType.empty": "No hi ha tipus de contingut per seleccionar",
|
|
152
|
+
"popup.item.form.relatedType.label": "Tipus de contingut",
|
|
153
|
+
"popup.item.form.relatedType.placeholder": "Selecciona el tipus de contingut...",
|
|
154
|
+
"popup.item.form.title.label": "Títol",
|
|
155
|
+
"popup.item.form.title.placeholder": "Introduïu el títol de l'element o deixeu-lo en blanc per extreure'l de l'entitat relacionada",
|
|
156
|
+
"popup.item.form.type.external.description": "Camí de sortida: {valor}",
|
|
157
|
+
"popup.item.form.type.external.label": "Pàgina externa",
|
|
158
|
+
"popup.item.form.type.internal.label": "Contingut intern",
|
|
159
|
+
"popup.item.form.type.label": "Tipus d'element de navegació",
|
|
160
|
+
"popup.item.form.type.wrapper.label": "Contenidor",
|
|
161
|
+
"popup.item.form.uiRouterKey.label": "Clau de l'encaminador de la interfície d'usuari",
|
|
162
|
+
"popup.item.form.uiRouterKey.placeholder": "Si està buit, generat automàticament per \"Títol\"",
|
|
163
|
+
"popup.item.header.edit": "Edita l'element de navegació",
|
|
164
|
+
"popup.item.header.new": "Nou element de navegació",
|
|
165
|
+
"popup.navigation.form.name.label": "Nom",
|
|
166
|
+
"popup.navigation.form.name.placeholder": "Nom del menú",
|
|
167
|
+
"popup.navigation.form.validation.name.alreadyUsed": "El nom ja s'utilitza",
|
|
168
|
+
"popup.navigation.form.validation.name.required": "El nom és obligatori",
|
|
169
|
+
"popup.navigation.form.validation.name.tooShort": "El nom és massa curt",
|
|
170
|
+
"popup.navigation.form.validation.visible.required": "Es requereix visibilitat",
|
|
171
|
+
"popup.navigation.form.visible.label": "Visibilitat",
|
|
172
|
+
"popup.navigation.manage.button.cancel": "Cancel·lar",
|
|
173
|
+
"popup.navigation.manage.button.create": "Crear",
|
|
174
|
+
"popup.navigation.manage.button.delete": "Suprimeix",
|
|
175
|
+
"popup.navigation.manage.button.edit": "Edita",
|
|
176
|
+
"popup.navigation.manage.button.goBack": "Torna",
|
|
177
|
+
"popup.navigation.manage.button.save": "Desa",
|
|
178
|
+
"popup.navigation.manage.delete.header": "S'eliminaran els menús següents:",
|
|
179
|
+
"popup.navigation.manage.error.message": "Ha passat un error :(",
|
|
180
|
+
"popup.navigation.manage.header.CREATE": "Nou menú",
|
|
181
|
+
"popup.navigation.manage.header.DELETE": "S'està suprimint",
|
|
182
|
+
"popup.navigation.manage.header.EDIT": "S'està editant \"{name}\"",
|
|
183
|
+
"popup.navigation.manage.header.ERROR": "Error",
|
|
184
|
+
"popup.navigation.manage.header.LIST": "Tots els menús",
|
|
185
|
+
"popup.navigation.manage.navigation.hidden": "amagat",
|
|
186
|
+
"popup.navigation.manage.navigation.visible": "visible",
|
|
187
|
+
"popup.navigation.manage.table.hasSelected": "{count} entrades seleccionades",
|
|
188
|
+
"popup.navigation.manage.table.id": "Id",
|
|
189
|
+
"popup.navigation.manage.table.locale": "Versions locals",
|
|
190
|
+
"popup.navigation.manage.table.name": "Nom",
|
|
191
|
+
"popup.navigation.manage.table.visibility": "Visibilitat",
|
|
192
|
+
"submit.cta.cancel": "Cancel·lar",
|
|
193
|
+
"submit.cta.save": "Desa",
|
|
194
|
+
"view.i18n.fill.cta": "o copia de",
|
|
195
|
+
"view.i18n.fill.cta.button": "còpia",
|
|
196
|
+
"view.i18n.fill.option": "{locale} local"
|
|
197
|
+
}
|
|
@@ -77,13 +77,14 @@
|
|
|
77
77
|
"popup.navigation.manage.navigation.visible": "visible",
|
|
78
78
|
"popup.navigation.manage.navigation.hidden": "hidden",
|
|
79
79
|
"notification.navigation.submit": "Navigation changes has been saved",
|
|
80
|
-
"notification.navigation.error": "Duplicate path: { path } in parent: { parentTitle } for { errorTitles } items",
|
|
80
|
+
"notification.navigation.error": "Duplicate path: \"{ path }\" in parent: \"{ parentTitle }\" for { errorTitles } items",
|
|
81
81
|
"notification.navigation.item.relation": "Entity relation does not exist!",
|
|
82
82
|
"notification.navigation.item.relation.status.draft": "draft",
|
|
83
83
|
"notification.navigation.item.relation.status.published": "published",
|
|
84
84
|
"notification.error": "Error while processing request.",
|
|
85
85
|
"notification.error.customField.type": "Unsupported type of custom field",
|
|
86
86
|
"notification.error.item.relation": "Relations provided in some items are incorrect",
|
|
87
|
+
"notification.error.item.slug": "Unable to create valid UI Router Key(slug) from \"{ query }\". \"{ result }\" received",
|
|
87
88
|
"page.auth.noAccess": "No access",
|
|
88
89
|
"page.auth.not.allowed": "Oops! It seems like You do not have access to this page...",
|
|
89
90
|
"pages.main.search.placeholder": "Type to start searching...",
|
|
@@ -41,5 +41,6 @@
|
|
|
41
41
|
"components.navigationItem.action.newItem": "Nouvel élément imbriqué",
|
|
42
42
|
"components.navigationItem.badge.removed": "Supprimé",
|
|
43
43
|
"components.navigationItem.badge.draft": "Brouillon",
|
|
44
|
-
"components.navigationItem.badge.published": "Publié"
|
|
44
|
+
"components.navigationItem.badge.published": "Publié",
|
|
45
|
+
"notification.error.item.slug": "Impossible de créer une clé de routeur d'interface utilisateur valide (slug) à partir de \"{ query }\". \"{ result }\" reçu"
|
|
45
46
|
}
|
|
@@ -7,9 +7,11 @@ exports.getTrad = exports.getTradId = void 0;
|
|
|
7
7
|
const pluginId_1 = __importDefault(require("../pluginId"));
|
|
8
8
|
const en_json_1 = __importDefault(require("./en.json"));
|
|
9
9
|
const fr_json_1 = __importDefault(require("./fr.json"));
|
|
10
|
+
const ca_json_1 = __importDefault(require("./ca.json"));
|
|
10
11
|
const trads = {
|
|
11
12
|
en: en_json_1.default,
|
|
12
13
|
fr: fr_json_1.default,
|
|
14
|
+
ca: ca_json_1.default,
|
|
13
15
|
};
|
|
14
16
|
const getTradId = (msg) => `${pluginId_1.default}.${msg}`;
|
|
15
17
|
exports.getTradId = getTradId;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NavigationItemAdditionalField, NavigationItemAdditionalFieldValues, ToBeFixed } from '../../../types';
|
|
2
|
-
|
|
2
|
+
type MessageInput = {
|
|
3
3
|
id: string;
|
|
4
4
|
defaultMessage?: string;
|
|
5
5
|
props?: Record<string, ToBeFixed>;
|
|
6
6
|
} | string;
|
|
7
|
-
|
|
7
|
+
type PrepareNewValueForRecord = (uid: string, current: Record<string, string[] | undefined>, value: string[]) => Record<string, string[] | undefined>;
|
|
8
8
|
export declare const getMessage: (input: MessageInput, defaultMessage?: string, inPluginScope?: boolean) => string;
|
|
9
9
|
export declare const getDefaultCustomFields: (args: {
|
|
10
10
|
additionalFields: NavigationItemAdditionalField[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strapi-plugin-navigation",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.13",
|
|
4
4
|
"description": "Strapi - Navigation plugin",
|
|
5
5
|
"strapi": {
|
|
6
6
|
"name": "navigation",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"scripts": {},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@sindresorhus/slugify": "1.1.0",
|
|
18
|
-
"@strapi/utils": "^4.
|
|
19
|
-
"lodash": "^4.17.
|
|
18
|
+
"@strapi/utils": "^4.13.6",
|
|
19
|
+
"lodash": "^4.17.21",
|
|
20
20
|
"pluralize": "^8.0.0",
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-dom": "^18.2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"engines": {
|
|
55
|
-
"node": ">=
|
|
55
|
+
"node": ">=16.0.0 <=20.x.x",
|
|
56
56
|
"npm": ">=7.x.x"
|
|
57
57
|
},
|
|
58
58
|
"nodemonConfig": {
|
|
@@ -26,6 +26,7 @@ const configSetupStrategy = async ({ strapi }) => {
|
|
|
26
26
|
pathDefaultFields: getWithFallback("pathDefaultFields"),
|
|
27
27
|
cascadeMenuAttached: getWithFallback("cascadeMenuAttached"),
|
|
28
28
|
};
|
|
29
|
+
handleDeletedContentTypes(config, { strapi });
|
|
29
30
|
(0, utils_1.validateAdditionalFields)(config.additionalFields);
|
|
30
31
|
await pluginStore.set({
|
|
31
32
|
key: "config",
|
|
@@ -39,4 +40,14 @@ const getWithFallbackFactory = (config, fallback) => (key) => {
|
|
|
39
40
|
(0, types_1.assertNotEmpty)(value, new Error(`[Navigation] Config "${key}" is undefined`));
|
|
40
41
|
return value;
|
|
41
42
|
};
|
|
43
|
+
const handleDeletedContentTypes = (config, { strapi }) => {
|
|
44
|
+
const notAvailableContentTypes = config.contentTypes.filter((contentType) => !strapi.contentTypes[contentType]);
|
|
45
|
+
if (notAvailableContentTypes.length === 0) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const notAvailableContentTypesGraphQL = notAvailableContentTypes.map(utils_1.resolveGlobalLikeId);
|
|
49
|
+
config.contentTypes = config.contentTypes.filter((contentType) => !notAvailableContentTypes.includes(contentType));
|
|
50
|
+
config.contentTypesNameFields = Object.fromEntries(Object.entries(config.contentTypesNameFields).filter(([contentType]) => !notAvailableContentTypes.includes(contentType)));
|
|
51
|
+
config.gql.navigationItemRelated = config.gql.navigationItemRelated.filter((contentType) => !notAvailableContentTypesGraphQL.includes(contentType));
|
|
52
|
+
};
|
|
42
53
|
//# sourceMappingURL=setupStrategy.js.map
|
package/server/i18n/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { IStrapi, OnlyStrings, StringMap, WhereClause } from "strapi-typed";
|
|
2
2
|
import { ICommonService, Navigation, NavigationItemInput, NestedStructure, NotVoid } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type AddI18NConfigFieldsInput<T> = {
|
|
4
4
|
previousConfig: T;
|
|
5
5
|
strapi: IStrapi;
|
|
6
6
|
viaSettingsPage?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type HandleLocaleParamInput = {
|
|
9
9
|
locale?: string;
|
|
10
10
|
strapi: IStrapi;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type I18nAwareEntityReadHandlerInput<T> = {
|
|
13
13
|
entity: T | undefined | null;
|
|
14
14
|
entityUid: string;
|
|
15
15
|
whereClause: WhereClause<OnlyStrings<keyof T>>;
|
|
@@ -17,13 +17,13 @@ export declare type I18nAwareEntityReadHandlerInput<T> = {
|
|
|
17
17
|
strapi: IStrapi;
|
|
18
18
|
populate?: string[];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type I18NConfigFields = {
|
|
21
21
|
i18nEnabled: boolean;
|
|
22
22
|
isI18NPluginEnabled: boolean | undefined;
|
|
23
23
|
pruneObsoleteI18nNavigations: boolean;
|
|
24
24
|
defaultLocale?: string | null;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type AddI18nWhereClause<T> = {
|
|
27
27
|
previousWhere: T;
|
|
28
28
|
strapi: IStrapi;
|
|
29
29
|
query: StringMap<string> & {
|
|
@@ -31,26 +31,26 @@ export declare type AddI18nWhereClause<T> = {
|
|
|
31
31
|
};
|
|
32
32
|
modelUid: string;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type I18nNavigationContentsCopyInput = {
|
|
35
35
|
target: Navigation;
|
|
36
36
|
source: Navigation;
|
|
37
37
|
service: ICommonService;
|
|
38
38
|
strapi: IStrapi;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type I18nNavigationItemReadInput = {
|
|
41
41
|
path: string;
|
|
42
42
|
source: Navigation;
|
|
43
43
|
strapi: IStrapi;
|
|
44
44
|
target: Navigation;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
46
|
+
export type SourceNavigationItem = NestedStructure<NotVoid<Navigation["items"]>[0]>;
|
|
47
|
+
export type ResultNavigationItem = NestedStructure<NavigationItemInput>;
|
|
48
|
+
export type FillCopyContext = {
|
|
49
49
|
master: Navigation;
|
|
50
50
|
strapi: IStrapi;
|
|
51
51
|
localeCode: string;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type MinimalEntityWithI18n = {
|
|
54
54
|
id: number;
|
|
55
55
|
localizations?: Array<{
|
|
56
56
|
id: number;
|
package/server/i18n/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IStrapi } from "strapi-typed";
|
|
2
|
-
|
|
2
|
+
type GetI18nStatusInput = {
|
|
3
3
|
strapi: IStrapi;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type I18NStatus = {
|
|
6
6
|
hasI18NPlugin: boolean;
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
defaultLocale?: string | null;
|
package/server/services/admin.js
CHANGED
|
@@ -150,7 +150,7 @@ const adminService = ({ strapi }) => ({
|
|
|
150
150
|
})));
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
const result = commonService
|
|
153
|
+
const result = await commonService
|
|
154
154
|
.analyzeBranch(payload.items, existingEntity)
|
|
155
155
|
.then((auditLogsOperations) => Promise.all([
|
|
156
156
|
auditLog ? (0, utils_2.prepareAuditLog)((auditLogsOperations || []).flat(Number.MAX_SAFE_INTEGER)) : [],
|
|
@@ -213,14 +213,21 @@ const commonService = ({ strapi }) => ({
|
|
|
213
213
|
}), {});
|
|
214
214
|
const data = new Map((await Promise.all(Object.entries(groupedItems)
|
|
215
215
|
.map(async ([model, related]) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
let relationData = [];
|
|
217
|
+
try {
|
|
218
|
+
relationData = await strapi
|
|
219
|
+
.query(model)
|
|
220
|
+
.findMany({
|
|
221
|
+
where: {
|
|
222
|
+
id: { $in: (0, lodash_1.map)(related, 'related_id') },
|
|
223
|
+
},
|
|
224
|
+
populate: (0, lodash_1.isNil)(populate) ? config.contentTypesPopulate[model] || [] : (0, utils_2.parsePopulateQuery)(populate)
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
catch (e) {
|
|
228
|
+
console.log("Related content type was removed. See details below.");
|
|
229
|
+
console.error(e);
|
|
230
|
+
}
|
|
224
231
|
return relationData
|
|
225
232
|
.flatMap(_ => Object.assign(_, {
|
|
226
233
|
__contentType: model,
|
|
@@ -303,7 +310,7 @@ const commonService = ({ strapi }) => ({
|
|
|
303
310
|
currentItem = item;
|
|
304
311
|
}
|
|
305
312
|
return !(0, lodash_1.isEmpty)(items)
|
|
306
|
-
? commonService.analyzeBranch(items, masterEntity, currentItem, operations)
|
|
313
|
+
? await commonService.analyzeBranch(items, masterEntity, currentItem, operations)
|
|
307
314
|
: operations;
|
|
308
315
|
}));
|
|
309
316
|
},
|
|
@@ -60,7 +60,7 @@ export declare const getTemplateComponentFromTemplate: (strapi: IStrapi, templat
|
|
|
60
60
|
export declare const prepareAuditLog: (actions: NavigationActions[]) => string;
|
|
61
61
|
export declare const sendAuditLog: (auditLogInstance: AuditLogContext, event: string, data: AuditLogParams) => void;
|
|
62
62
|
export declare const composeItemTitle: (item: NavigationItemEntity<ContentTypeEntity[] | ContentTypeEntity>, fields?: PluginConfigNameFields, contentTypes?: StrapiContentType<ToBeFixed>[]) => string | undefined;
|
|
63
|
-
export declare const extractItemRelationTitle: (relatedItem: ContentTypeEntity, fields?: PluginConfigNameFields, contentTypes?: StrapiContentType<ToBeFixed>[]) =>
|
|
63
|
+
export declare const extractItemRelationTitle: (relatedItem: ContentTypeEntity, fields?: PluginConfigNameFields, contentTypes?: StrapiContentType<ToBeFixed>[]) => {};
|
|
64
64
|
export declare const filterOutUnpublished: (item: NavigationItemEntity<ContentTypeEntity | ContentTypeEntity[]>) => unknown;
|
|
65
65
|
export declare const checkDuplicatePath: (parentItem: ToBeFixed | null, checkData: NavigationItem[]) => Promise<void>;
|
|
66
66
|
export declare const singularize: (value?: string) => string;
|
|
@@ -137,4 +137,5 @@ export declare const getPluginModels: () => Record<'masterModel' | 'itemModel' |
|
|
|
137
137
|
export declare const validateAdditionalFields: (additionalFields: NavigationItemAdditionalField[]) => void;
|
|
138
138
|
export declare const parsePopulateQuery: (populate: PopulateQueryParam) => PopulateClause;
|
|
139
139
|
export declare const purgeSensitiveData: (data?: any) => {} | undefined;
|
|
140
|
+
export declare const resolveGlobalLikeId: (uid?: string) => string;
|
|
140
141
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.purgeSensitiveData = exports.parsePopulateQuery = exports.validateAdditionalFields = exports.getPluginModels = exports.compareArraysOfNumbers = exports.intercalate = exports.isContentTypeEligible = exports.filterByPath = exports.buildNestedPaths = exports.buildNestedStructure = exports.singularize = exports.checkDuplicatePath = exports.filterOutUnpublished = exports.extractItemRelationTitle = exports.composeItemTitle = exports.sendAuditLog = exports.prepareAuditLog = exports.getTemplateComponentFromTemplate = exports.templateNameFactory = exports.parseParams = exports.getCustomFields = exports.errorHandler = exports.getPluginService = void 0;
|
|
3
|
+
exports.resolveGlobalLikeId = exports.purgeSensitiveData = exports.parsePopulateQuery = exports.validateAdditionalFields = exports.getPluginModels = exports.compareArraysOfNumbers = exports.intercalate = exports.isContentTypeEligible = exports.filterByPath = exports.buildNestedPaths = exports.buildNestedStructure = exports.singularize = exports.checkDuplicatePath = exports.filterOutUnpublished = exports.extractItemRelationTitle = exports.composeItemTitle = exports.sendAuditLog = exports.prepareAuditLog = exports.getTemplateComponentFromTemplate = exports.templateNameFactory = exports.parseParams = exports.getCustomFields = exports.errorHandler = exports.getPluginService = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const types_1 = require("../../types");
|
|
6
6
|
const NavigationError_1 = require("../../utils/NavigationError");
|
|
7
7
|
const constant_1 = require("./constant");
|
|
8
|
+
const UID_REGEX = /^(?<type>[a-z0-9-]+)\:{2}(?<api>[a-z0-9-]+)\.{1}(?<contentType>[a-z0-9-]+)$/i;
|
|
8
9
|
const getPluginService = (name) => strapi.plugin("navigation").service(name);
|
|
9
10
|
exports.getPluginService = getPluginService;
|
|
10
11
|
const errorHandler = (ctx) => (error) => {
|
|
@@ -275,4 +276,18 @@ const purgeSensitiveData = (data = {}) => {
|
|
|
275
276
|
}), {});
|
|
276
277
|
};
|
|
277
278
|
exports.purgeSensitiveData = purgeSensitiveData;
|
|
279
|
+
const resolveGlobalLikeId = (uid = '') => {
|
|
280
|
+
const parse = (str) => str.split('-')
|
|
281
|
+
.map(_ => (0, lodash_1.capitalize)(_))
|
|
282
|
+
.join('');
|
|
283
|
+
const [type, scope, contentTypeName] = splitTypeUid(uid);
|
|
284
|
+
if (type === 'api') {
|
|
285
|
+
return parse(contentTypeName);
|
|
286
|
+
}
|
|
287
|
+
return `${parse(scope)}${parse(contentTypeName)}`;
|
|
288
|
+
};
|
|
289
|
+
exports.resolveGlobalLikeId = resolveGlobalLikeId;
|
|
290
|
+
const splitTypeUid = (uid = '') => {
|
|
291
|
+
return uid.split(UID_REGEX).filter((s) => s && s.length > 0);
|
|
292
|
+
};
|
|
278
293
|
//# sourceMappingURL=functions.js.map
|