@strapi/admin 4.10.0-beta.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/content-manager/components/RepeatableComponent/components/Component.js +8 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +3 -1
- package/admin/src/content-manager/pages/EditSettingsView/reducer.js +8 -2
- package/admin/src/content-manager/pages/EditViewLayoutManager/reducer.js +4 -4
- package/admin/src/content-manager/sharedReducers/crudReducer/actions.js +0 -6
- package/admin/src/content-manager/sharedReducers/crudReducer/constants.js +0 -1
- package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +0 -5
- package/admin/src/hooks/useFetchPermissionsLayout/index.js +24 -15
- package/admin/src/hooks/useFetchRole/index.js +37 -30
- package/admin/src/hooks/useModels/index.js +22 -12
- package/admin/src/hooks/useSettingsForm/index.js +14 -6
- package/admin/src/pages/App/index.js +19 -24
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/PendingLogoDialog.js +1 -3
- package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js +6 -12
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +6 -10
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/index.js +18 -33
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +41 -41
- package/admin/src/translations/en.json +1 -1
- package/admin/src/translations/fr.json +89 -1
- package/build/{Admin-authenticatedApp.52c88751.chunk.js → Admin-authenticatedApp.b036fe95.chunk.js} +2 -2
- package/build/{Admin_settingsPage.257b3477.chunk.js → Admin_settingsPage.4604a16c.chunk.js} +1 -1
- package/build/admin-app.014adc27.chunk.js +110 -0
- package/build/admin-edit-roles-page.8a4063f7.chunk.js +280 -0
- package/build/content-manager.84f81966.chunk.js +1130 -0
- package/build/{content-type-builder-translation-de-json.0979cccb.chunk.js → content-type-builder-translation-de-json.393a76c0.chunk.js} +1 -1
- package/build/{content-type-builder-translation-dk-json.e05583e9.chunk.js → content-type-builder-translation-dk-json.fbd39bb7.chunk.js} +1 -1
- package/build/{content-type-builder-translation-en-json.510e88ca.chunk.js → content-type-builder-translation-en-json.446b611d.chunk.js} +1 -1
- package/build/{content-type-builder-translation-es-json.fe4daad8.chunk.js → content-type-builder-translation-es-json.9288474b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-fr-json.b1eb52f6.chunk.js → content-type-builder-translation-fr-json.d35e269c.chunk.js} +1 -1
- package/build/{content-type-builder-translation-id-json.ee3b36bb.chunk.js → content-type-builder-translation-id-json.f0513929.chunk.js} +1 -1
- package/build/{content-type-builder-translation-it-json.13b3c26a.chunk.js → content-type-builder-translation-it-json.aaf16753.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ko-json.8a274be5.chunk.js → content-type-builder-translation-ko-json.8fe21a7f.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ms-json.2d29c1e0.chunk.js → content-type-builder-translation-ms-json.3b5d2d3e.chunk.js} +1 -1
- package/build/{content-type-builder-translation-nl-json.40bbc562.chunk.js → content-type-builder-translation-nl-json.225ef5d3.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pl-json.24a34349.chunk.js → content-type-builder-translation-pl-json.92f36be2.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-BR-json.97f71a9d.chunk.js → content-type-builder-translation-pt-BR-json.3bd10f89.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ru-json.54d11230.chunk.js → content-type-builder-translation-ru-json.9bfe47ce.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sk-json.626c9493.chunk.js → content-type-builder-translation-sk-json.d03cc18a.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sv-json.59f5e1e5.chunk.js → content-type-builder-translation-sv-json.d23dcd32.chunk.js} +1 -1
- package/build/{content-type-builder-translation-th-json.6fe3ed55.chunk.js → content-type-builder-translation-th-json.7ad256e2.chunk.js} +1 -1
- package/build/{content-type-builder-translation-tr-json.cea4d226.chunk.js → content-type-builder-translation-tr-json.926f6191.chunk.js} +1 -1
- package/build/{content-type-builder-translation-uk-json.c4524247.chunk.js → content-type-builder-translation-uk-json.7bf19546.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-json.faedd610.chunk.js → content-type-builder-translation-zh-json.ad24dbeb.chunk.js} +1 -1
- package/build/content-type-builder.68af11d2.chunk.js +126 -0
- package/build/en-json.c7fc79af.chunk.js +1 -0
- package/build/fr-json.5947cf63.chunk.js +1 -0
- package/build/i18n-settings-page.d95b32df.chunk.js +60 -0
- package/build/index.html +1 -1
- package/build/{main.120be100.js → main.841e0dcb.js} +194 -194
- package/build/{review-workflows-settings.9092ed72.chunk.js → review-workflows-settings.f7890c40.chunk.js} +1 -1
- package/build/{runtime~main.112b3101.js → runtime~main.965f8af8.js} +2 -2
- package/build/users-roles-settings-page.20656f92.chunk.js +30 -0
- package/build/webhook-edit-page.a3b62049.chunk.js +75 -0
- package/build/webhook-list-page.ca38eeef.chunk.js +71 -0
- package/ee/admin/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn.js +3 -1
- package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +7 -4
- package/ee/admin/hooks/useAuthProviders/index.js +28 -29
- package/ee/admin/pages/AuthResponse/index.js +7 -3
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ReviewWorkflows.js +1 -1
- package/ee/server/controllers/authentication/middlewares.js +2 -1
- package/ee/server/services/index.js +1 -0
- package/ee/server/services/review-workflows/metrics.js +24 -0
- package/ee/server/services/review-workflows/review-workflows.js +25 -11
- package/ee/server/services/review-workflows/stages.js +28 -10
- package/ee/server/utils/persisted-tables.js +7 -5
- package/package.json +10 -10
- package/server/strategies/api-token.js +8 -1
- package/build/admin-app.dfaeea5d.chunk.js +0 -110
- package/build/admin-edit-roles-page.4f1858e9.chunk.js +0 -280
- package/build/content-manager.def692c2.chunk.js +0 -1130
- package/build/content-type-builder.5e1f4afc.chunk.js +0 -126
- package/build/en-json.08303b37.chunk.js +0 -1
- package/build/fr-json.f66c3211.chunk.js +0 -1
- package/build/i18n-settings-page.7d80aae0.chunk.js +0 -60
- package/build/users-roles-settings-page.2f85dcec.chunk.js +0 -30
- package/build/webhook-edit-page.213f0075.chunk.js +0 -75
- package/build/webhook-list-page.5beb2a5c.chunk.js +0 -71
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[4302],{63338:function(t){t.exports=JSON.parse('{"attribute.boolean":"\u5E03\u6797\u503C","attribute.boolean.description":"\u597D\u6216\u4E0D\u597D\u30011 \u6216 0\u3001\u662F\u6216\u5426","attribute.component":"\u5143\u4EF6","attribute.component.description":"\u7D44\u5408\u6B04\u4F4D\u503C\u4EE5\u4FBF\u91CD\u8907\u4F7F\u7528","attribute.customField":"\u81EA\u8A02\u6B04\u4F4D","attribute.date":"\u65E5\u671F","attribute.date.description":"\u6642\u9593\u9078\u64C7\u5668\uFF0C\u53EF\u9078\u64C7\u65E5\u671F\u53CA\u6642\u9593","attribute.datetime":"\u65E5\u671F\u548C\u6642\u9593","attribute.dynamiczone":"\u52D5\u614B\u914D\u7F6E","attribute.dynamiczone.description":"\u52D5\u614B\u9078\u64C7\u5143\u4EF6\u53CA\u7DE8\u8F2F\u5176\u5167\u5BB9","attribute.email":"\u96FB\u5B50\u90F5\u4EF6\u5730\u5740","attribute.email.description":"\u9A57\u8B49\u683C\u5F0F\u904E\u7684\u96FB\u5B50\u90F5\u4EF6\u6B04\u4F4D","attribute.enumeration":"\u5217\u8209","attribute.enumeration.description":"\u5217\u8209\u8A2D\u5B9A\u503C\u4E26\u53EF\u64C7\u4E00\u70BA\u503C","attribute.json":"JSON","attribute.json.description":"JSON \u8CC7\u6599\u683C\u5F0F","attribute.media":"\u5A92\u9AD4","attribute.media.description":"\u5716\u7247\u3001\u5F71\u7247\u7B49\u6A94\u6848","attribute.null":" ","attribute.number":"\u6578\u5B57","attribute.number.description":"\u6578\u5B57 (\u6B63\u6574\u6578\u3001\u6D6E\u9EDE\u6578\u3001\u5C0F\u6578)","attribute.password":"\u5BC6\u78BC","attribute.password.description":"\u52A0\u5BC6\u904E\u7684\u5BC6\u78BC\u6B04\u4F4D","attribute.relation":"\u95DC\u806F","attribute.relation.description":"\u6307\u5411\u5176\u4ED6\u96C6\u5408\u985E\u578B","attribute.richtext":"\u591A\u6587\u672C\u683C\u5F0F","attribute.richtext.description":"\u591A\u6587\u672C\u683C\u5F0F\u7DE8\u8F2F\u5668","attribute.text":"\u6587\u5B57","attribute.text.description":"\u77ED\u7684\u6A19\u984C\u6216\u9577\u7684\u63CF\u8FF0\u6587\u5B57","attribute.time":"\u6642\u9593","attribute.timestamp":"\u6642\u9593\u6233\u8A18","attribute.uid":"UID","attribute.uid.description":"\u552F\u4E00\u8B58\u5225\u78BC","button.attributes.add.another":"\u65B0\u589E\u6B04\u4F4D","button.component.add":"\u65B0\u589E\u5143\u4EF6","button.component.create":"\u5EFA\u7ACB\u65B0\u5143\u4EF6","button.model.create":"\u5EFA\u7ACB\u65B0\u7684\u96C6\u5408\u985E\u578B","button.single-types.create":"\u5EFA\u7ACB\u65B0\u7684\u55AE\u4E00\u985E\u578B","component.repeatable":"(\u53EF\u91CD\u8907\u7684)","components.SelectComponents.displayed-value":" \u5DF2\u9078\u64C7 {number, plural, =0 {# components} \u4E00\u500B {# component} \u5176\u4ED6 {# components}}","components.componentSelect.no-component-available":"\u4F60\u5DF2\u7D93\u52A0\u5165\u4E86\u6240\u6709\u53EF\u4EE5\u52A0\u5165\u7684\u5143\u4EF6","components.componentSelect.no-component-available.with-search":"\u641C\u5C0B\u4E0D\u5230\u7B26\u5408\u7684\u5143\u4EF6","components.componentSelect.value-component":"{number} \u500B\u5143\u4EF6\u88AB\u9078\u53D6 (\u8F38\u5165\u641C\u5C0B\u5143\u4EF6)","components.componentSelect.value-components":"{number} \u500B\u5143\u4EF6\u88AB\u9078\u53D6","configurations":"\u914D\u7F6E\u8A2D\u5B9A","contentType.apiId-plural.description":"\u8907\u6578 API ID","contentType.apiId-plural.label":"API ID (\u8907\u6578)","contentType.apiId-singular.description":"UID \u7528\u65BC\u7522\u751F API \u8DEF\u5F91\u548C\u8CC7\u6599\u5EAB\u8CC7\u6599\u8868/\u96C6\u5408\u7684 UID","contentType.apiId-singular.label":"API ID (\u55AE\u6578)","contentType.collectionName.description":"\u4F7F\u7528\u65BC\u7576\u5167\u5BB9\u96C6\u5408\u540D\u7A31\u8207\u8CC7\u6599\u96C6\u5408\u540D\u7A31\u4E0D\u540C\u6642","contentType.collectionName.label":"\u96C6\u5408\u540D\u7A31","contentType.displayName.label":"\u986F\u793A\u540D\u7A31","contentType.draftAndPublish.description":"\u5728\u767C\u4F48\u9805\u76EE\u524D\uFF0C\u64B0\u5BEB\u8349\u7A3F\u7248\u672C","contentType.draftAndPublish.label":"\u8349\u7A3F/\u767C\u4F48\u7CFB\u7D71","contentType.kind.change.warning":"\u4F60\u8B8A\u66F4\u4E86\u5167\u5BB9\u985E\u578B\uFF1AAPI \u5C07\u6703\u88AB\u91CD\u7F6E (\u8DEF\u7531\u5668\u3001\u63A7\u5236\u5668\u3001\u548C\u670D\u52D9\u5C07\u6703\u88AB\u8986\u5BEB)\u3002","error.attributeName.reserved-name":"\u9019\u500B\u6B04\u4F4D\u540D\u7A31\u4E0D\u53EF\u4EE5\u5728\u6B64\u5167\u5BB9\u985E\u578B\u5167\u88AB\u4F7F\u7528\uFF0C\u6709\u53EF\u80FD\u6703\u7834\u58DE\u5176\u4ED6\u529F\u80FD","error.contentType.pluralName-used":"\u6B64\u6578\u503C\u4E0D\u80FD\u8207\u55AE\u6578\u76F8\u540C","error.contentType.singularName-used":"\u6B64\u6578\u503C\u4E0D\u80FD\u8207\u8907\u6578\u76F8\u540C","error.contentTypeName.reserved-name":"\u9019\u500B\u5167\u5BB9\u985E\u578B\u540D\u7A31\u4E0D\u53EF\u4EE5\u5728\u6B64\u5C08\u6848\u5167\u88AB\u4F7F\u7528\uFF0C\u6709\u53EF\u80FD\u6703\u7834\u58DE\u5176\u4ED6\u529F\u80FD","error.validation.enum-duplicate":"\u4E0D\u5141\u53D6\u91CD\u8907\u7684\u503C","error.validation.enum-empty-string":"\u4E0D\u5141\u8A31\u7A7A\u5B57\u4E32","error.validation.enum-regex":"\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u6578\u503C\u7121\u6548\u3002\u6578\u503C\u5728\u9996\u500B\u6578\u5B57\u524D\u61C9\u5148\u6709\u82F1\u6587\u5B57\u6BCD\u3002","error.validation.minSupMax":"Can\'t be superior","error.validation.positive":"\u5FC5\u9808\u70BA\u6B63\u6578","error.validation.regex":"\u4E0D\u5408\u6CD5\u7684\u6B63\u898F\u5F0F","error.validation.relation.targetAttribute-taken":"\u8A72\u6B04\u4F4D\u540D\u7A31\u5DF2\u88AB\u4F7F\u7528","form.attribute.component.option.add":"\u65B0\u589E\u5143\u4EF6","form.attribute.component.option.create":"\u5EFA\u7ACB\u65B0\u5143\u4EF6","form.attribute.component.option.create.description":"\u4E00\u500B\u53EF\u4EE5\u8DE8\u5143\u4EF6\u53CA\u985E\u578B\u5F15\u7528\u7684\u5143\u4EF6, \u53EF\u4EE5\u5728\u4EFB\u4F55\u5730\u65B9\u88AB\u5F15\u7528","form.attribute.component.option.repeatable":"\u53EF\u91CD\u8907\u7684\u5143\u4EF6","form.attribute.component.option.repeatable.description":"\u9069\u7528\u65BC\u9663\u5217\uFF0C\u6E05\u55AE\uFF0C\u6A19\u7C64\u985E\u578B\u5143\u4EF6","form.attribute.component.option.reuse-existing":"\u4F7F\u7528\u4E00\u500B\u5DF2\u5EFA\u7ACB\u7684\u5143\u4EF6","form.attribute.component.option.reuse-existing.description":"\u53EF\u8907\u7528\u5143\u4EF6\u5DF2\u5EFA\u7ACB\uFF0C\u53EF\u4EE5\u5354\u52A9\u4F60\u5728\u4E0D\u540C\u7684\u5167\u5BB9\u578B\u5225\u9593\u4FDD\u6301\u8CC7\u6599\u4E00\u81F4\u6027","form.attribute.component.option.single":"\u55AE\u4E00\u5143\u4EF6","form.attribute.component.option.single.description":"\u9069\u7528\u65BC\u7D44\u5408\u578B\u6B04\u4F4D\u7FA4\uFF0C\u5982\uFF1A\u5B8C\u6574\u5730\u5740,\u57FA\u672C\u5B8C\u6574\u8CC7\u8A0A ......\u7B49","form.attribute.item.customColumnName":"\u81EA\u8A02\u6B04\u4F4D\u540D\u7A31","form.attribute.item.customColumnName.description":"\u5C07\u8CC7\u6599\u5EAB\u6B04\u4F4D\u540D\u7A31\u4EE5\u66F4\u6613\u61C2\u7684\u683C\u5F0F\u91CD\u65B0\u547D\u540D\uFF0C\u5C0D API \u56DE\u61C9\u5F88\u6709\u7528\u3002","form.attribute.item.date.type.date":"date (\u4F8B\u5982\uFF1A01/01/{currentYear})","form.attribute.item.date.type.datetime":"datetime (\u4F8B\u5982\uFF1A01/01/{currentYear} 00:00 AM)","form.attribute.item.date.type.time":"time (\u4F8B\u5982\uFF1A00:00 AM)","form.attribute.item.defineRelation.fieldName":"\u6B04\u4F4D\u540D\u7A31","form.attribute.item.enumeration.graphql":"GraphQL \u540D\u7A31\u8986\u5BEB","form.attribute.item.enumeration.graphql.description":"\u53EF\u4EE5\u8B93\u60A8\u8986\u5BEB GraphQL \u7684\u9810\u8A2D\u540D\u7A31","form.attribute.item.enumeration.placeholder":"\u4F8B:\\n\u65E9\u4E0A\\n\u4E2D\u5348\\n\u665A\u4E0A","form.attribute.item.enumeration.rules":"\u503C (\u683C\u5F0F\u70BA\u4E00\u884C\u4E00\u500B\u503C)","form.attribute.item.maximum":"\u6700\u5927\u6578\u503C","form.attribute.item.maximumLength":"\u6700\u5927\u9577\u5EA6","form.attribute.item.minimum":"\u6700\u5C0F\u6578\u503C","form.attribute.item.minimumLength":"\u6700\u5C0F\u9577\u5EA6","form.attribute.item.number.type":"\u6578\u5B57\u683C\u5F0F","form.attribute.item.number.type.biginteger":"\u5927\u6574\u6578 (\u4F8B\u5982\uFF1A123456789)","form.attribute.item.number.type.decimal":"\u6D6E\u9EDE\u6578 (decimal) (\u4F8B: 2.22)","form.attribute.item.number.type.float":"\u6D6E\u9EDE\u6578 (float) (\u4F8B: 3.33333333)","form.attribute.item.number.type.integer":"\u6574\u6578 (\u4F8B: 10)","form.attribute.item.privateField":"\u96B1\u5BC6\u6B04\u4F4D","form.attribute.item.privateField.description":"\u8A72\u6B04\u4F4D\u4E0D\u6703\u88AB\u986F\u793A\u5728 API \u7684\u56DE\u50B3\u8CC7\u6599\u4E2D","form.attribute.item.requiredField":"\u5FC5\u586B\u6B04\u4F4D","form.attribute.item.requiredField.description":"\u5982\u679C\u9019\u500B\u6B04\u4F4D\u7559\u7A7A\uFF0C\u60A8\u5C07\u4E0D\u80FD\u5EFA\u7ACB\u9805\u76EE\u3002","form.attribute.item.text.regex":"\u6B63\u898F\u5F0F","form.attribute.item.text.regex.description":"\u6587\u672C\u6B63\u898F\u8868\u9054\u5F0F","form.attribute.item.uniqueField":"\u552F\u4E00\u6B04\u4F4D","form.attribute.item.uniqueField.description":"\u5982\u679C\u5DF2\u5B58\u5728\u7684\u9805\u76EE\u6709\u4E00\u6A21\u4E00\u6A23\u7684\u5167\u5BB9\uFF0C\u60A8\u5C07\u4E0D\u80FD\u5EFA\u7ACB\u9805\u76EE\u3002","form.attribute.media.allowed-types":"\u9078\u64C7\u5408\u6CD5\u7684\u591A\u5A92\u9AD4\u985E\u578B","form.attribute.media.allowed-types.option-files":"\u6A94\u6848","form.attribute.media.allowed-types.option-images":"\u5716\u7247","form.attribute.media.allowed-types.option-videos":"\u5F71\u7247","form.attribute.media.option.multiple":"\u8907\u6578\u591A\u5A92\u9AD4","form.attribute.media.option.multiple.description":"\u9069\u7528\u65BC\u8F2A\u64A5\u6A21\u7D44\u6216\u591A\u6A94\u6848\u4E0B\u8F09","form.attribute.media.option.single":"\u55AE\u4E00\u591A\u5A92\u9AD4","form.attribute.media.option.single.description":"\u9069\u7528\u65BC\u5927\u982D\u8CBC\u6216\u80CC\u666F\u5716","form.attribute.settings.default":"\u9810\u8A2D\u503C","form.attribute.text.option.long-text":"\u9577\u6587\u5B57","form.attribute.text.option.long-text.description":"\u9069\u7528\u65BC\u63CF\u8FF0\u53CA\u81EA\u50B3\u5167\u5BB9\uFF0C\u4F46\u7121\u6CD5\u88AB\u7CBE\u6E96\u641C\u5C0B","form.attribute.text.option.short-text":"\u77ED\u6587\u5B57","form.attribute.text.option.short-text.description":"\u9069\u7528\u65BC\u6A19\u984C,\u540D\u7A31,\u9023\u7D50\u4E14\u53EF\u4EE5\u88AB\u7CBE\u6E96\u641C\u5C0B","form.button.add-components-to-dynamiczone":"\u65B0\u589E\u5143\u4EF6\u81F3\u52D5\u614B\u914D\u7F6E","form.button.add-field":"\u65B0\u589E\u6B04\u4F4D","form.button.add-first-field-to-created-component":"\u65B0\u589E\u5143\u4EF6\u7684\u7B2C\u4E00\u500B\u6B04\u4F4D","form.button.add.field.to.collectionType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u96C6\u5408\u985E\u578B","form.button.add.field.to.component":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u5143\u4EF6","form.button.add.field.to.contentType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u5167\u5BB9\u985E\u578B","form.button.add.field.to.singleType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u55AE\u4E00\u985E\u578B","form.button.cancel":"\u53D6\u6D88","form.button.collection-type.description":"\u9069\u7528\u65BC\u8907\u6578\u5BE6\u4F8B\uFF0C\u5982\u8B70\u984C\u6587\u7AE0\u3001\u7522\u54C1\u3001\u8CBC\u6587......\u7B49","form.button.collection-type.name":"\u96C6\u5408\u578B\u5225","form.button.configure-component":"\u914D\u7F6E\u5143\u4EF6","form.button.configure-view":"\u914D\u7F6E\u756B\u9762","form.button.select-component":"\u9078\u64C7\u4E00\u500B\u5143\u4EF6","form.button.single-type.description":"\u9069\u7528\u65BC\u55AE\u4E00\u5BE6\u4F8B\uFF0C\u5982\u9996\u9801\u3001\u95DC\u65BC ...... \u7B49","form.button.single-type.name":"\u55AE\u4E00\u578B\u5225","from":"\u5F9E","listView.headerLayout.description":"\u5EFA\u7ACB\u60A8\u7684\u5167\u5BB9\u7684\u8CC7\u6599\u7D50\u69CB","menu.section.components.name":"\u5143\u4EF6","menu.section.models.name":"\u96C6\u5408\u578B\u5225","menu.section.single-types.name":"\u55AE\u4E00\u578B\u5225","modalForm.attribute.form.base.name.description":"\u6B04\u4F4D\u540D\u7A31\u4E0D\u5141\u8A31\u7A7A\u767D","modalForm.attribute.form.base.name.placeholder":"\u4F8B\u5982\uFF1ASlug\u3001SEO \u7DB2\u5740\u3001Canonical \u7DB2\u5740","modalForm.attribute.target-field":"\u95DC\u806F\u76EE\u6A19\u6B04\u4F4D","modalForm.attributes.select-component":"\u9078\u64C7\u4E00\u500B\u5143\u4EF6","modalForm.attributes.select-components":"\u9078\u64C7\u591A\u500B\u5143\u4EF6","modalForm.collectionType.header-create":"\u5EFA\u7ACB\u96C6\u5408\u578B\u5225","modalForm.component.header-create":"\u5EFA\u7ACB\u5143\u4EF6","modalForm.components.create-component.category.label":"\u9078\u64C7\u6216\u65B0\u589E\u4E00\u500B\u5206\u985E","modalForm.components.icon.label":"\u5716\u793A","modalForm.empty.button":"\u65B0\u589E\u81EA\u8A02\u6B04\u4F4D","modalForm.empty.heading":"\u9019\u88E1\u76EE\u524D\u4EC0\u9EBC\u90FD\u6C92\u6709\u3002","modalForm.empty.sub-heading":"\u900F\u904E\u64F4\u5145\u529F\u80FD\u627E\u5230\u60A8\u60F3\u641C\u5C0B\u7684\u9805\u76EE\u3002","modalForm.editCategory.base.name.description":"\u5206\u985E\u540D\u7A31\u4E0D\u5141\u8A31\u7A7A\u767D","modalForm.header-edit":"\u7DE8\u8F2F {name}","modalForm.header.categories":"\u8907\u6578\u5206\u985E","modalForm.singleType.header-create":"\u5EFA\u7ACB\u55AE\u4E00\u578B\u5225","modalForm.sub-header.addComponentToDynamicZone":"\u5728\u52D5\u614B\u914D\u7F6E\u5340\u65B0\u589E\u4E00\u500B\u5143\u4EF6","modalForm.sub-header.attribute.create":"\u65B0\u589E {type} \u6B04\u4F4D","modalForm.sub-header.attribute.create.step":"\u65B0\u589E\u5143\u4EF6 ({step}/2)","modalForm.sub-header.attribute.edit":"\u7DE8\u8F2F {name}","modalForm.sub-header.chooseAttribute.collectionType":"\u9078\u64C7\u96C6\u5408\u578B\u5225\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.sub-header.chooseAttribute.component":"\u9078\u64C7\u5143\u4EF6\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.sub-header.chooseAttribute.singleType":"\u9078\u64C7\u55AE\u4E00\u578B\u5225\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.custom-fields.advanced.settings.extended":"\u64F4\u5145\u8A2D\u5B9A","modalForm.tabs.custom":"\u81EA\u8A02","modalForm.tabs.custom.howToLink":"\u5982\u4F55\u65B0\u589E\u81EA\u8A02\u6B04\u4F4D","modalForm.tabs.default":"\u9810\u8A2D","modalForm.tabs.label":"\u9810\u8A2D\u548C\u81EA\u8A02\u985E\u578B\u5206\u9801","modelPage.attribute.relation-polymorphic":"\u95DC\u806F (\u591A\u5C0D\u591A\u591A\u578B)","modelPage.attribute.relationWith":"\u95DC\u806F\u5230","notification.error.dynamiczone-min.validation":"\u81F3\u5C11\u8981\u6709\u4E00\u500B\u4F4D\u65BC\u52D5\u614B\u5340\u57DF\u4E2D\u7684\u5143\u4EF6\u624D\u80FD\u5132\u5B58\u5167\u5BB9\u578B\u5225","notification.info.autoreaload-disable":"\u555F\u7528\u9019\u500B\u64F4\u5145\u6A21\u7D44\u9700\u8981\u91CD\u65B0\u555F\u52D5\uFF0C\u4F7F\u7528 `strapi develop` \u6307\u4EE4\u91CD\u65B0\u555F\u52D5","notification.info.creating.notSaved":"\u5728\u5EFA\u7ACB\u65B0\u7684\u96C6\u5408\u578B\u5225\u6216\u5143\u4EF6\u524D\u8ACB\u8A18\u5F97\u5132\u5B58","plugin.description.long":"\u70BA\u60A8\u7684 API \u5B9A\u7FA9\u8CC7\u6599\u7D50\u69CB\uFF0C\u4F7F\u60A8\u8F15\u9B06\u65B0\u589E\u6B04\u4F4D\u548C\u95DC\u806F\u7D50\u69CB\uFF0C\u60A8\u6240\u505A\u7684\u4FEE\u6539\u6703\u81EA\u52D5\u66F4\u65B0\u5C08\u6848\u3002","plugin.description.short":"\u70BA\u60A8\u7684 API \u5B9A\u7FA9\u8CC7\u6599\u7D50\u69CB","plugin.name":"\u5167\u5BB9\u578B\u5225\u5EFA\u7ACB\u8005","popUpForm.navContainer.advanced":"\u9032\u968E\u8A2D\u5B9A","popUpForm.navContainer.base":"\u57FA\u672C\u8A2D\u5B9A","popUpWarning.bodyMessage.cancel-modifications":"\u4F60\u78BA\u5B9A\u8981\u53D6\u6D88\u4F60\u7684\u4FEE\u6539\u55CE\uFF1F","popUpWarning.bodyMessage.cancel-modifications.with-components":"\u4F60\u78BA\u5B9A\u8981\u53D6\u6D88\u4F60\u7684\u4FEE\u6539\u55CE\uFF1F\u90E8\u4EFD\u5143\u4EF6\u5DF2\u88AB\u65B0\u589E\u6216\u4FEE\u6539...","popUpWarning.bodyMessage.category.delete":"\u4F60\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u5206\u985E\u55CE\uFF1F\u6240\u6709\u6B64\u5206\u985E\u5167\u7684\u5143\u4EF6\u90FD\u6703\u88AB\u522A\u9664.","popUpWarning.bodyMessage.component.delete":"\u4F60\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u5143\u4EF6\u55CE\uFF1F","popUpWarning.bodyMessage.contentType.delete":"\u60A8\u78BA\u5B9A\u8981\u522A\u9664\u9019\u500B\u8CC7\u6599\u7D50\u69CB\u55CE\uFF1F","popUpWarning.draft-publish.button.confirm":"\u662F\u7684\uFF0C\u8ACB\u505C\u7528","popUpWarning.draft-publish.message":"\u5982\u679C\u60A8\u505C\u7528\u4E86\u8349\u7A3F/\u767C\u4F48\u7CFB\u7D71\uFF0C\u60A8\u7684\u8349\u7A3F\u5C07\u88AB\u522A\u9664\u3002","popUpWarning.draft-publish.second-message":"\u60A8\u78BA\u5B9A\u8981\u505C\u7528\u55CE\uFF1F","prompt.unsaved":"\u4F60\u78BA\u5B9A\u8981\u96E2\u958B\u55CE\uFF1F\u6240\u6709\u4F60\u7684\u4FEE\u6539\u90FD\u6703\u5931\u6548\u3002","relation.attributeName.placeholder":"\u4F8B\u5982\uFF1A\u4F5C\u8005\u3001\u985E\u5225\u3001\u6A19\u7C64...","relation.manyToMany":"\u6709\u800C\u4E14\u5C6C\u65BC\u8A31\u591A","relation.manyToOne":"\u6709\u8A31\u591A","relation.manyWay":"\u6709\u8A31\u591A","relation.oneToMany":"\u5C6C\u65BC\u8A31\u591A","relation.oneToOne":"\u4E00\u5C0D\u4E00\u5230","relation.oneWay":"\u6709\u4E00\u500B","table.button.no-fields":"\u65B0\u589E\u6B04\u4F4D","table.content.create-first-content-type":"\u5EFA\u7ACB\u60A8\u7684\u9996\u500B\u96C6\u5408\u578B\u5225","table.content.no-fields.collection-type":"\u5411\u6B64\u96C6\u5408\u578B\u5225\u65B0\u589E\u9996\u500B\u6B04\u4F4D","table.content.no-fields.component":"\u5411\u6B64\u5143\u4EF6\u65B0\u589E\u9996\u500B\u6B04\u4F4D"}')}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[4302],{63338:function(t){t.exports=JSON.parse('{"attribute.boolean":"\u5E03\u6797\u503C","attribute.boolean.description":"\u597D\u6216\u4E0D\u597D\u30011 \u6216 0\u3001\u662F\u6216\u5426","attribute.component":"\u5143\u4EF6","attribute.component.description":"\u7D44\u5408\u6B04\u4F4D\u503C\u4EE5\u4FBF\u91CD\u8907\u4F7F\u7528","attribute.customField":"\u81EA\u8A02\u6B04\u4F4D","attribute.date":"\u65E5\u671F","attribute.date.description":"\u6642\u9593\u9078\u64C7\u5668\uFF0C\u53EF\u9078\u64C7\u65E5\u671F\u53CA\u6642\u9593","attribute.datetime":"\u65E5\u671F\u548C\u6642\u9593","attribute.dynamiczone":"\u52D5\u614B\u914D\u7F6E","attribute.dynamiczone.description":"\u52D5\u614B\u9078\u64C7\u5143\u4EF6\u53CA\u7DE8\u8F2F\u5176\u5167\u5BB9","attribute.email":"\u96FB\u5B50\u90F5\u4EF6\u5730\u5740","attribute.email.description":"\u9A57\u8B49\u683C\u5F0F\u904E\u7684\u96FB\u5B50\u90F5\u4EF6\u6B04\u4F4D","attribute.enumeration":"\u5217\u8209","attribute.enumeration.description":"\u5217\u8209\u8A2D\u5B9A\u503C\u4E26\u53EF\u64C7\u4E00\u70BA\u503C","attribute.json":"JSON","attribute.json.description":"JSON \u8CC7\u6599\u683C\u5F0F","attribute.media":"\u5A92\u9AD4","attribute.media.description":"\u5716\u7247\u3001\u5F71\u7247\u7B49\u6A94\u6848","attribute.null":" ","attribute.number":"\u6578\u5B57","attribute.number.description":"\u6578\u5B57 (\u6B63\u6574\u6578\u3001\u6D6E\u9EDE\u6578\u3001\u5C0F\u6578)","attribute.password":"\u5BC6\u78BC","attribute.password.description":"\u52A0\u5BC6\u904E\u7684\u5BC6\u78BC\u6B04\u4F4D","attribute.relation":"\u95DC\u806F","attribute.relation.description":"\u6307\u5411\u5176\u4ED6\u96C6\u5408\u985E\u578B","attribute.richtext":"\u591A\u6587\u672C\u683C\u5F0F","attribute.richtext.description":"\u591A\u6587\u672C\u683C\u5F0F\u7DE8\u8F2F\u5668","attribute.text":"\u6587\u5B57","attribute.text.description":"\u77ED\u7684\u6A19\u984C\u6216\u9577\u7684\u63CF\u8FF0\u6587\u5B57","attribute.time":"\u6642\u9593","attribute.timestamp":"\u6642\u9593\u6233\u8A18","attribute.uid":"UID","attribute.uid.description":"\u552F\u4E00\u8B58\u5225\u78BC","button.attributes.add.another":"\u65B0\u589E\u6B04\u4F4D","button.component.add":"\u65B0\u589E\u5143\u4EF6","button.component.create":"\u5EFA\u7ACB\u65B0\u5143\u4EF6","button.model.create":"\u5EFA\u7ACB\u65B0\u7684\u96C6\u5408\u985E\u578B","button.single-types.create":"\u5EFA\u7ACB\u65B0\u7684\u55AE\u4E00\u985E\u578B","component.repeatable":"(\u53EF\u91CD\u8907\u7684)","components.SelectComponents.displayed-value":" \u5DF2\u9078\u64C7 {number, plural, =0 {# components} \u4E00\u500B {# component} \u5176\u4ED6 {# components}}","components.componentSelect.no-component-available":"\u4F60\u5DF2\u7D93\u52A0\u5165\u4E86\u6240\u6709\u53EF\u4EE5\u52A0\u5165\u7684\u5143\u4EF6","components.componentSelect.no-component-available.with-search":"\u641C\u5C0B\u4E0D\u5230\u7B26\u5408\u7684\u5143\u4EF6","components.componentSelect.value-component":"{number} \u500B\u5143\u4EF6\u88AB\u9078\u53D6 (\u8F38\u5165\u641C\u5C0B\u5143\u4EF6)","components.componentSelect.value-components":"{number} \u500B\u5143\u4EF6\u88AB\u9078\u53D6","configurations":"\u914D\u7F6E\u8A2D\u5B9A","contentType.apiId-plural.description":"\u8907\u6578 API ID","contentType.apiId-plural.label":"API ID (\u8907\u6578)","contentType.apiId-singular.description":"UID \u7528\u65BC\u7522\u751F API \u8DEF\u5F91\u548C\u8CC7\u6599\u5EAB\u8CC7\u6599\u8868/\u96C6\u5408\u7684 UID","contentType.apiId-singular.label":"API ID (\u55AE\u6578)","contentType.collectionName.description":"\u4F7F\u7528\u65BC\u7576\u5167\u5BB9\u96C6\u5408\u540D\u7A31\u8207\u8CC7\u6599\u96C6\u5408\u540D\u7A31\u4E0D\u540C\u6642","contentType.collectionName.label":"\u96C6\u5408\u540D\u7A31","contentType.displayName.label":"\u986F\u793A\u540D\u7A31","contentType.draftAndPublish.description":"\u5728\u767C\u4F48\u9805\u76EE\u524D\uFF0C\u64B0\u5BEB\u8349\u7A3F\u7248\u672C","contentType.draftAndPublish.label":"\u8349\u7A3F/\u767C\u4F48\u7CFB\u7D71","contentType.kind.change.warning":"\u4F60\u8B8A\u66F4\u4E86\u5167\u5BB9\u985E\u578B\uFF1AAPI \u5C07\u6703\u88AB\u91CD\u7F6E (\u8DEF\u7531\u5668\u3001\u63A7\u5236\u5668\u3001\u548C\u670D\u52D9\u5C07\u6703\u88AB\u8986\u5BEB)\u3002","error.attributeName.reserved-name":"\u9019\u500B\u6B04\u4F4D\u540D\u7A31\u4E0D\u53EF\u4EE5\u5728\u6B64\u5167\u5BB9\u985E\u578B\u5167\u88AB\u4F7F\u7528\uFF0C\u6709\u53EF\u80FD\u6703\u7834\u58DE\u5176\u4ED6\u529F\u80FD","error.contentType.pluralName-used":"\u6B64\u6578\u503C\u4E0D\u80FD\u8207\u55AE\u6578\u76F8\u540C","error.contentType.singularName-used":"\u6B64\u6578\u503C\u4E0D\u80FD\u8207\u8907\u6578\u76F8\u540C","error.contentTypeName.reserved-name":"\u9019\u500B\u5167\u5BB9\u985E\u578B\u540D\u7A31\u4E0D\u53EF\u4EE5\u5728\u6B64\u5C08\u6848\u5167\u88AB\u4F7F\u7528\uFF0C\u6709\u53EF\u80FD\u6703\u7834\u58DE\u5176\u4ED6\u529F\u80FD","error.validation.enum-duplicate":"\u4E0D\u5141\u53D6\u91CD\u8907\u7684\u503C","error.validation.enum-empty-string":"\u4E0D\u5141\u8A31\u7A7A\u5B57\u4E32","error.validation.enum-regex":"\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u6578\u503C\u7121\u6548\u3002\u6578\u503C\u5728\u9996\u500B\u6578\u5B57\u524D\u61C9\u5148\u6709\u82F1\u6587\u5B57\u6BCD\u3002","error.validation.minSupMax":"Can\'t be superior","error.validation.positive":"\u5FC5\u9808\u70BA\u6B63\u6578","error.validation.regex":"\u4E0D\u5408\u6CD5\u7684\u6B63\u898F\u5F0F","error.validation.relation.targetAttribute-taken":"\u8A72\u6B04\u4F4D\u540D\u7A31\u5DF2\u88AB\u4F7F\u7528","form.attribute.component.option.add":"\u65B0\u589E\u5143\u4EF6","form.attribute.component.option.create":"\u5EFA\u7ACB\u65B0\u5143\u4EF6","form.attribute.component.option.create.description":"\u4E00\u500B\u53EF\u4EE5\u8DE8\u5143\u4EF6\u53CA\u985E\u578B\u5F15\u7528\u7684\u5143\u4EF6, \u53EF\u4EE5\u5728\u4EFB\u4F55\u5730\u65B9\u88AB\u5F15\u7528","form.attribute.component.option.repeatable":"\u53EF\u91CD\u8907\u7684\u5143\u4EF6","form.attribute.component.option.repeatable.description":"\u9069\u7528\u65BC\u9663\u5217\uFF0C\u6E05\u55AE\uFF0C\u6A19\u7C64\u985E\u578B\u5143\u4EF6","form.attribute.component.option.reuse-existing":"\u4F7F\u7528\u4E00\u500B\u5DF2\u5EFA\u7ACB\u7684\u5143\u4EF6","form.attribute.component.option.reuse-existing.description":"\u53EF\u8907\u7528\u5143\u4EF6\u5DF2\u5EFA\u7ACB\uFF0C\u53EF\u4EE5\u5354\u52A9\u4F60\u5728\u4E0D\u540C\u7684\u5167\u5BB9\u578B\u5225\u9593\u4FDD\u6301\u8CC7\u6599\u4E00\u81F4\u6027","form.attribute.component.option.single":"\u55AE\u4E00\u5143\u4EF6","form.attribute.component.option.single.description":"\u9069\u7528\u65BC\u7D44\u5408\u578B\u6B04\u4F4D\u7FA4\uFF0C\u5982\uFF1A\u5B8C\u6574\u5730\u5740,\u57FA\u672C\u5B8C\u6574\u8CC7\u8A0A ......\u7B49","form.attribute.item.customColumnName":"\u81EA\u8A02\u6B04\u4F4D\u540D\u7A31","form.attribute.item.customColumnName.description":"\u5C07\u8CC7\u6599\u5EAB\u6B04\u4F4D\u540D\u7A31\u4EE5\u66F4\u6613\u61C2\u7684\u683C\u5F0F\u91CD\u65B0\u547D\u540D\uFF0C\u5C0D API \u56DE\u61C9\u5F88\u6709\u7528\u3002","form.attribute.item.date.type.date":"date (\u4F8B\u5982\uFF1A01/01/{currentYear})","form.attribute.item.date.type.datetime":"datetime (\u4F8B\u5982\uFF1A01/01/{currentYear} 00:00 AM)","form.attribute.item.date.type.time":"time (\u4F8B\u5982\uFF1A00:00 AM)","form.attribute.item.defineRelation.fieldName":"\u6B04\u4F4D\u540D\u7A31","form.attribute.item.enumeration.graphql":"GraphQL \u540D\u7A31\u8986\u5BEB","form.attribute.item.enumeration.graphql.description":"\u53EF\u4EE5\u8B93\u60A8\u8986\u5BEB GraphQL \u7684\u9810\u8A2D\u540D\u7A31","form.attribute.item.enumeration.placeholder":"\u4F8B:\\n\u65E9\u4E0A\\n\u4E2D\u5348\\n\u665A\u4E0A","form.attribute.item.enumeration.rules":"\u503C (\u683C\u5F0F\u70BA\u4E00\u884C\u4E00\u500B\u503C)","form.attribute.item.maximum":"\u6700\u5927\u6578\u503C","form.attribute.item.maximumLength":"\u6700\u5927\u9577\u5EA6","form.attribute.item.minimum":"\u6700\u5C0F\u6578\u503C","form.attribute.item.minimumLength":"\u6700\u5C0F\u9577\u5EA6","form.attribute.item.number.type":"\u6578\u5B57\u683C\u5F0F","form.attribute.item.number.type.biginteger":"\u5927\u6574\u6578 (\u4F8B\u5982\uFF1A123456789)","form.attribute.item.number.type.decimal":"\u6D6E\u9EDE\u6578 (decimal) (\u4F8B: 2.22)","form.attribute.item.number.type.float":"\u6D6E\u9EDE\u6578 (float) (\u4F8B: 3.33333333)","form.attribute.item.number.type.integer":"\u6574\u6578 (\u4F8B: 10)","form.attribute.item.privateField":"\u96B1\u5BC6\u6B04\u4F4D","form.attribute.item.privateField.description":"\u8A72\u6B04\u4F4D\u4E0D\u6703\u88AB\u986F\u793A\u5728 API \u7684\u56DE\u50B3\u8CC7\u6599\u4E2D","form.attribute.item.requiredField":"\u5FC5\u586B\u6B04\u4F4D","form.attribute.item.requiredField.description":"\u5982\u679C\u9019\u500B\u6B04\u4F4D\u7559\u7A7A\uFF0C\u60A8\u5C07\u4E0D\u80FD\u5EFA\u7ACB\u9805\u76EE\u3002","form.attribute.item.text.regex":"\u6B63\u898F\u5F0F","form.attribute.item.text.regex.description":"\u6587\u672C\u6B63\u898F\u8868\u9054\u5F0F","form.attribute.item.uniqueField":"\u552F\u4E00\u6B04\u4F4D","form.attribute.item.uniqueField.description":"\u5982\u679C\u5DF2\u5B58\u5728\u7684\u9805\u76EE\u6709\u4E00\u6A21\u4E00\u6A23\u7684\u5167\u5BB9\uFF0C\u60A8\u5C07\u4E0D\u80FD\u5EFA\u7ACB\u9805\u76EE\u3002","form.attribute.media.allowed-types":"\u9078\u64C7\u5408\u6CD5\u7684\u591A\u5A92\u9AD4\u985E\u578B","form.attribute.media.allowed-types.option-files":"\u6A94\u6848","form.attribute.media.allowed-types.option-images":"\u5716\u7247","form.attribute.media.allowed-types.option-videos":"\u5F71\u7247","form.attribute.media.option.multiple":"\u8907\u6578\u591A\u5A92\u9AD4","form.attribute.media.option.multiple.description":"\u9069\u7528\u65BC\u8F2A\u64A5\u6A21\u7D44\u6216\u591A\u6A94\u6848\u4E0B\u8F09","form.attribute.media.option.single":"\u55AE\u4E00\u591A\u5A92\u9AD4","form.attribute.media.option.single.description":"\u9069\u7528\u65BC\u5927\u982D\u8CBC\u6216\u80CC\u666F\u5716","form.attribute.settings.default":"\u9810\u8A2D\u503C","form.attribute.text.option.long-text":"\u9577\u6587\u5B57","form.attribute.text.option.long-text.description":"\u9069\u7528\u65BC\u63CF\u8FF0\u53CA\u81EA\u50B3\u5167\u5BB9\uFF0C\u4F46\u7121\u6CD5\u88AB\u7CBE\u6E96\u641C\u5C0B","form.attribute.text.option.short-text":"\u77ED\u6587\u5B57","form.attribute.text.option.short-text.description":"\u9069\u7528\u65BC\u6A19\u984C,\u540D\u7A31,\u9023\u7D50\u4E14\u53EF\u4EE5\u88AB\u7CBE\u6E96\u641C\u5C0B","form.button.add-components-to-dynamiczone":"\u65B0\u589E\u5143\u4EF6\u81F3\u52D5\u614B\u914D\u7F6E","form.button.add-field":"\u65B0\u589E\u6B04\u4F4D","form.button.add-first-field-to-created-component":"\u65B0\u589E\u5143\u4EF6\u7684\u7B2C\u4E00\u500B\u6B04\u4F4D","form.button.add.field.to.collectionType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u96C6\u5408\u985E\u578B","form.button.add.field.to.component":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u5143\u4EF6","form.button.add.field.to.contentType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u5167\u5BB9\u985E\u578B","form.button.add.field.to.singleType":"\u65B0\u589E\u5176\u4ED6\u6B04\u4F4D\u65BC\u6B64\u55AE\u4E00\u985E\u578B","form.button.cancel":"\u53D6\u6D88","form.button.collection-type.description":"\u9069\u7528\u65BC\u8907\u6578\u5BE6\u4F8B\uFF0C\u5982\u8B70\u984C\u6587\u7AE0\u3001\u7522\u54C1\u3001\u8CBC\u6587......\u7B49","form.button.collection-type.name":"\u96C6\u5408\u578B\u5225","form.button.configure-component":"\u914D\u7F6E\u5143\u4EF6","form.button.configure-view":"\u914D\u7F6E\u756B\u9762","form.button.select-component":"\u9078\u64C7\u4E00\u500B\u5143\u4EF6","form.button.single-type.description":"\u9069\u7528\u65BC\u55AE\u4E00\u5BE6\u4F8B\uFF0C\u5982\u9996\u9801\u3001\u95DC\u65BC ...... \u7B49","form.button.single-type.name":"\u55AE\u4E00\u578B\u5225","from":"\u5F9E","listView.headerLayout.description":"\u5EFA\u7ACB\u60A8\u7684\u5167\u5BB9\u7684\u8CC7\u6599\u7D50\u69CB","menu.section.components.name":"\u5143\u4EF6","menu.section.models.name":"\u96C6\u5408\u578B\u5225","menu.section.single-types.name":"\u55AE\u4E00\u578B\u5225","modalForm.attribute.form.base.name.description":"\u6B04\u4F4D\u540D\u7A31\u4E0D\u5141\u8A31\u7A7A\u767D","modalForm.attribute.form.base.name.placeholder":"\u4F8B\u5982\uFF1Aslug\u3001seo\u7DB2\u5740\u3001canonical\u7DB2\u5740","modalForm.attribute.target-field":"\u95DC\u806F\u76EE\u6A19\u6B04\u4F4D","modalForm.attributes.select-component":"\u9078\u64C7\u4E00\u500B\u5143\u4EF6","modalForm.attributes.select-components":"\u9078\u64C7\u591A\u500B\u5143\u4EF6","modalForm.collectionType.header-create":"\u5EFA\u7ACB\u96C6\u5408\u578B\u5225","modalForm.component.header-create":"\u5EFA\u7ACB\u5143\u4EF6","modalForm.components.create-component.category.label":"\u9078\u64C7\u6216\u65B0\u589E\u4E00\u500B\u5206\u985E","modalForm.components.icon.label":"\u5716\u793A","modalForm.empty.button":"\u65B0\u589E\u81EA\u8A02\u6B04\u4F4D","modalForm.empty.heading":"\u9019\u88E1\u76EE\u524D\u4EC0\u9EBC\u90FD\u6C92\u6709\u3002","modalForm.empty.sub-heading":"\u900F\u904E\u64F4\u5145\u529F\u80FD\u627E\u5230\u60A8\u60F3\u641C\u5C0B\u7684\u9805\u76EE\u3002","modalForm.editCategory.base.name.description":"\u5206\u985E\u540D\u7A31\u4E0D\u5141\u8A31\u7A7A\u767D","modalForm.header-edit":"\u7DE8\u8F2F {name}","modalForm.header.categories":"\u8907\u6578\u5206\u985E","modalForm.singleType.header-create":"\u5EFA\u7ACB\u55AE\u4E00\u578B\u5225","modalForm.sub-header.addComponentToDynamicZone":"\u5728\u52D5\u614B\u914D\u7F6E\u5340\u65B0\u589E\u4E00\u500B\u5143\u4EF6","modalForm.sub-header.attribute.create":"\u65B0\u589E {type} \u6B04\u4F4D","modalForm.sub-header.attribute.create.step":"\u65B0\u589E\u5143\u4EF6 ({step}/2)","modalForm.sub-header.attribute.edit":"\u7DE8\u8F2F {name}","modalForm.sub-header.chooseAttribute.collectionType":"\u9078\u64C7\u96C6\u5408\u578B\u5225\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.sub-header.chooseAttribute.component":"\u9078\u64C7\u5143\u4EF6\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.sub-header.chooseAttribute.singleType":"\u9078\u64C7\u55AE\u4E00\u578B\u5225\u7684\u4E00\u500B\u6B04\u4F4D","modalForm.custom-fields.advanced.settings.extended":"\u64F4\u5145\u8A2D\u5B9A","modalForm.tabs.custom":"\u81EA\u8A02","modalForm.tabs.custom.howToLink":"\u5982\u4F55\u65B0\u589E\u81EA\u8A02\u6B04\u4F4D","modalForm.tabs.default":"\u9810\u8A2D","modalForm.tabs.label":"\u9810\u8A2D\u548C\u81EA\u8A02\u985E\u578B\u5206\u9801","modelPage.attribute.relation-polymorphic":"\u95DC\u806F (\u591A\u5C0D\u591A\u591A\u578B)","modelPage.attribute.relationWith":"\u95DC\u806F\u5230","notification.error.dynamiczone-min.validation":"\u81F3\u5C11\u8981\u6709\u4E00\u500B\u4F4D\u65BC\u52D5\u614B\u5340\u57DF\u4E2D\u7684\u5143\u4EF6\u624D\u80FD\u5132\u5B58\u5167\u5BB9\u578B\u5225","notification.info.autoreaload-disable":"\u555F\u7528\u9019\u500B\u64F4\u5145\u6A21\u7D44\u9700\u8981\u91CD\u65B0\u555F\u52D5\uFF0C\u4F7F\u7528 `strapi develop` \u6307\u4EE4\u91CD\u65B0\u555F\u52D5","notification.info.creating.notSaved":"\u5728\u5EFA\u7ACB\u65B0\u7684\u96C6\u5408\u578B\u5225\u6216\u5143\u4EF6\u524D\u8ACB\u8A18\u5F97\u5132\u5B58","plugin.description.long":"\u70BA\u60A8\u7684 API \u5B9A\u7FA9\u8CC7\u6599\u7D50\u69CB\uFF0C\u4F7F\u60A8\u8F15\u9B06\u65B0\u589E\u6B04\u4F4D\u548C\u95DC\u806F\u7D50\u69CB\uFF0C\u60A8\u6240\u505A\u7684\u4FEE\u6539\u6703\u81EA\u52D5\u66F4\u65B0\u5C08\u6848\u3002","plugin.description.short":"\u70BA\u60A8\u7684 API \u5B9A\u7FA9\u8CC7\u6599\u7D50\u69CB","plugin.name":"\u5167\u5BB9\u578B\u5225\u5EFA\u7ACB\u8005","popUpForm.navContainer.advanced":"\u9032\u968E\u8A2D\u5B9A","popUpForm.navContainer.base":"\u57FA\u672C\u8A2D\u5B9A","popUpWarning.bodyMessage.cancel-modifications":"\u4F60\u78BA\u5B9A\u8981\u53D6\u6D88\u4F60\u7684\u4FEE\u6539\u55CE\uFF1F","popUpWarning.bodyMessage.cancel-modifications.with-components":"\u4F60\u78BA\u5B9A\u8981\u53D6\u6D88\u4F60\u7684\u4FEE\u6539\u55CE\uFF1F\u90E8\u4EFD\u5143\u4EF6\u5DF2\u88AB\u65B0\u589E\u6216\u4FEE\u6539...","popUpWarning.bodyMessage.category.delete":"\u4F60\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u5206\u985E\u55CE\uFF1F\u6240\u6709\u6B64\u5206\u985E\u5167\u7684\u5143\u4EF6\u90FD\u6703\u88AB\u522A\u9664.","popUpWarning.bodyMessage.component.delete":"\u4F60\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u5143\u4EF6\u55CE\uFF1F","popUpWarning.bodyMessage.contentType.delete":"\u60A8\u78BA\u5B9A\u8981\u522A\u9664\u9019\u500B\u8CC7\u6599\u7D50\u69CB\u55CE\uFF1F","popUpWarning.draft-publish.button.confirm":"\u662F\u7684\uFF0C\u8ACB\u505C\u7528","popUpWarning.draft-publish.message":"\u5982\u679C\u60A8\u505C\u7528\u4E86\u8349\u7A3F/\u767C\u4F48\u7CFB\u7D71\uFF0C\u60A8\u7684\u8349\u7A3F\u5C07\u88AB\u522A\u9664\u3002","popUpWarning.draft-publish.second-message":"\u60A8\u78BA\u5B9A\u8981\u505C\u7528\u55CE\uFF1F","prompt.unsaved":"\u4F60\u78BA\u5B9A\u8981\u96E2\u958B\u55CE\uFF1F\u6240\u6709\u4F60\u7684\u4FEE\u6539\u90FD\u6703\u5931\u6548\u3002","relation.attributeName.placeholder":"\u4F8B\u5982\uFF1A\u4F5C\u8005\u3001\u985E\u5225\u3001\u6A19\u7C64...","relation.manyToMany":"\u6709\u800C\u4E14\u5C6C\u65BC\u8A31\u591A","relation.manyToOne":"\u6709\u8A31\u591A","relation.manyWay":"\u6709\u8A31\u591A","relation.oneToMany":"\u5C6C\u65BC\u8A31\u591A","relation.oneToOne":"\u4E00\u5C0D\u4E00\u5230","relation.oneWay":"\u6709\u4E00\u500B","table.button.no-fields":"\u65B0\u589E\u6B04\u4F4D","table.content.create-first-content-type":"\u5EFA\u7ACB\u60A8\u7684\u9996\u500B\u96C6\u5408\u578B\u5225","table.content.no-fields.collection-type":"\u5411\u6B64\u96C6\u5408\u578B\u5225\u65B0\u589E\u9996\u500B\u6B04\u4F4D","table.content.no-fields.component":"\u5411\u6B64\u5143\u4EF6\u65B0\u589E\u9996\u500B\u6B04\u4F4D"}')}}]);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8880],{25747:function(Ne,oe,l){var a=l(32735),B=l(8471),he=l(60216),P=l.n(he),C=l(72850),Se=l(32031),it=l(73779),w=l(35071),rt=l(1176),t=l(88675),lt=l(15431),T=l(22348),He=l(7184),We=l(43475),Ye=l(872),Qe=l(89135),ut=l(82512),dt=l(61642),ve=l(58656),Xe=l(83218),ct=l(17757),Te=l(43383);const u={biginteger:Se.Z,boolean:it.Z,collectionType:w.Z,component:rt.Z,contentType:w.Z,date:t.Z,datetime:t.Z,decimal:Se.Z,dynamiczone:lt.Z,email:T.Z,enum:He.Z,enumeration:He.Z,file:We.Z,files:We.Z,float:Se.Z,integer:Se.Z,json:Ye.Z,JSON:Ye.Z,media:We.Z,number:Se.Z,password:Qe.Z,relation:ut.Z,richtext:dt.Z,singleType:ve.Z,string:Xe.Z,text:Xe.Z,time:t.Z,timestamp:t.Z,uid:ct.Z},Re=(0,B.ZP)(C.x)`
|
|
2
|
+
svg {
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
`,Be=({type:Je,customField:_e,...je})=>{const mt=(0,Te.mZ)();let we=u[Je];if(_e){const{icon:ze}=mt.get(_e);ze&&(we=ze)}return u[Je]?a.createElement(Re,{height:(0,Te.Q1)(24),width:(0,Te.Q1)(32),shrink:0,...je,"aria-hidden":!0},a.createElement(C.x,{as:we})):null};Be.defaultProps={customField:null},Be.propTypes={type:P().string.isRequired,customField:P().string},oe.Z=Be},74753:function(Ne,oe,l){var a=l(32735);const B=(0,a.createContext)();oe.Z=B},51216:function(Ne,oe,l){var a=l(32735);const B=(0,a.createContext)();oe.Z=B},198:function(Ne,oe,l){var a=l(32735),B=l(74753);const he=()=>(0,a.useContext)(B.Z);oe.Z=he},32237:function(Ne,oe,l){var a=l(32735),B=l(51216);const he=()=>(0,a.useContext)(B.Z);oe.Z=he},33184:function(Ne,oe,l){l.r(oe),l.d(oe,{default:function(){return mo}});var a=l(32735),B=l(53038),he=l(74758),P=l(67879),C=l(43383),Se=l(96709),it=l(3633),w=l(25158),rt=l(60216),t=l.n(rt),lt=l(33795),T=l.n(lt),He=l(81346),We=l.n(He),Ye=l(3040),Qe=l.n(Ye),ut=l(61868),dt=l.n(ut),ve=l(15062),Xe=l(6680),ct=l(74753),Te=l(32237),u=l(92318),Re=l(37087),Be=l(23973),Je=l.n(Be),_e=l(59578),je=l.n(_e),mt=l(85025),we=l(31600),ze=l(91215),$=l(87933),Oe=l(39291),pt=l(9026),j=l(72850),Le=l(3653),ia=l(11406),Y=l(41415),ra=l(89793),gt=l.n(ra),Ze=l(198),cn=l(47328),la=l(23940),Ce=l.n(la);const ua=[{label:"All",children:[{label:"images (JPEG, PNG, GIF, SVG, TIFF, ICO, DVU)",value:"images"},{label:"videos (MPEG, MP4, Quicktime, WMV, AVI, FLV)",value:"videos"},{label:"audios (MP3, WAV, OGG)",value:"audios"},{label:"files (CSV, ZIP, PDF, Excel, JSON, ...)",value:"files"}]}],ft=({intlLabel:e,name:n,onChange:s,value:i})=>{const{formatMessage:o}=(0,P.Z)(),r=i===null||i.length===0?o({id:"global.none",defaultMessage:"None"}):[...i].sort().map(c=>Ce()(c)).join(", "),d=e.id?o({id:e.id,defaultMessage:e.defaultMessage}):n;return a.createElement(cn.Q,{id:"select1",label:d,customizeContent:()=>r,onChange:c=>{c.length>0?s({target:{name:n,value:c,type:"allowed-types-select"}}):s({target:{name:n,value:null,type:"allowed-types-select"}})},options:ua,value:i||[]})};ft.defaultProps={value:null},ft.propTypes={intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().oneOfType([t().object,t().array])};var da=ft,X=l(49372),mn=e=>e.kind==="collectionType"&&(e.restrictRelationsTo===null||Array.isArray(e.restrictRelationsTo)&&e.restrictRelationsTo.length>0),yt=l(861),bt=l(15335),et=l(5803),tt=l(25747),Ie=l(8471),pn=(0,Ie.ZP)(j.x)`
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
border: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
10
|
+
text-align: left;
|
|
11
|
+
&:hover {
|
|
12
|
+
background: ${({theme:e})=>e.colors.primary100};
|
|
13
|
+
border: 1px solid ${({theme:e})=>e.colors.primary200};
|
|
14
|
+
}
|
|
15
|
+
`;const ht=({type:e})=>{const{formatMessage:n}=(0,P.Z)(),{onClickSelectField:s}=(0,Te.Z)(),i=()=>{s({attributeType:e,step:e==="component"?"1":null})};return a.createElement(pn,{padding:4,as:"button",hasRadius:!0,type:"button",onClick:i},a.createElement($.k,null,a.createElement(tt.Z,{type:e}),a.createElement(j.x,{paddingLeft:4},a.createElement($.k,null,a.createElement(X.Z,{fontWeight:"bold"},n({id:(0,u.Z)(`attribute.${e}`),defaultMessage:e}))),a.createElement($.k,null,a.createElement(X.Z,{variant:"pi",textColor:"neutral600"},n({id:(0,u.Z)(`attribute.${e}.description`),defaultMessage:"A type for modeling data"}))))))};ht.defaultProps={type:"text"},ht.propTypes={type:t().string};var ca=ht,gn=e=>{const n=e%2===1;return{paddingLeft:n?2:0,paddingRight:n?0:2}};const fn=({attributes:e})=>a.createElement(yt.k,{tagName:"button"},a.createElement($.k,{direction:"column",alignItems:"stretch",gap:8},e.map((n,s)=>a.createElement(bt.r,{key:s,gap:0},n.map((i,o)=>{const{paddingLeft:r,paddingRight:d}=gn(o);return a.createElement(et.P,{key:i,col:6,style:{height:"100%"}},a.createElement(j.x,{paddingLeft:r,paddingRight:d,paddingBottom:1,style:{height:"100%"}},a.createElement(ca,{type:i})))})))));fn.propTypes={attributes:t().array.isRequired};var ma=fn,pa=l(50428),ga=l(33348),fa=l.n(ga),yn=l(99140),ya=l(25148),ba=l(54725),Fe=l(19406);const ha=(0,Ie.ZP)(j.x)`
|
|
16
|
+
background: ${({theme:e})=>`linear-gradient(180deg, rgba(234, 234, 239, 0) 0%, ${e.colors.neutral150} 100%)`};
|
|
17
|
+
opacity: 0.33;
|
|
18
|
+
`,va=()=>a.createElement($.k,{wrap:"wrap",gap:4},[...Array(4)].map((e,n)=>a.createElement(ha,{key:`empty-card-${n}`,height:"138px",width:"375px",hasRadius:!0})));var Ta=()=>{const{formatMessage:e}=(0,P.Z)();return a.createElement(j.x,{position:"relative"},a.createElement(va,null),a.createElement(j.x,{position:"absolute",top:6,width:"100%"},a.createElement($.k,{alignItems:"center",justifyContent:"center",direction:"column"},a.createElement(yn.J,{as:ba.Z,color:"",width:"160px",height:"88px"}),a.createElement(j.x,{paddingTop:6,paddingBottom:4},a.createElement(j.x,{textAlign:"center"},a.createElement(X.Z,{variant:"delta",as:"p",textColor:"neutral600"},e({id:(0,u.Z)("modalForm.empty.heading"),defaultMessage:"Nothing in here yet."})),a.createElement(j.x,{paddingTop:4},a.createElement(X.Z,{variant:"delta",as:"p",textColor:"neutral600"},e({id:(0,u.Z)("modalForm.empty.sub-heading"),defaultMessage:"Find what you are looking for through a wide range of extensions."}))))),a.createElement(ya.Q,{to:`/marketplace?${fa().stringify({categories:["Custom fields"]})}`,variant:"secondary",startIcon:a.createElement(Fe.Z,null)},e({id:(0,u.Z)("modalForm.empty.button"),defaultMessage:"Add custom fields"})))))};const bn=({customFieldUid:e,customField:n})=>{const{type:s,intlLabel:i,intlDescription:o}=n,{formatMessage:r}=(0,P.Z)(),{onClickSelectCustomField:d}=(0,Te.Z)(),c=()=>{d({attributeType:s,customFieldUid:e})};return a.createElement(pn,{padding:4,as:"button",hasRadius:!0,type:"button",onClick:c},a.createElement($.k,null,a.createElement(tt.Z,{type:s,customField:e}),a.createElement(j.x,{paddingLeft:4},a.createElement($.k,null,a.createElement(X.Z,{fontWeight:"bold"},r(i))),a.createElement($.k,null,a.createElement(X.Z,{variant:"pi",textColor:"neutral600"},r(o))))))};bn.propTypes={customFieldUid:t().string.isRequired,customField:t().shape({type:t().string.isRequired,icon:t().func,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}).isRequired,intlDescription:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}).isRequired}).isRequired};var Ca=bn,Ma=()=>{const{formatMessage:e}=(0,P.Z)(),n=(0,C.mZ)(),s=Object.entries(n.getAll());if(!s.length)return a.createElement(Ta,null);const i=s.sort((o,r)=>o[1].name>r[1].name?1:-1);return a.createElement(yt.k,{tagName:"button"},a.createElement($.k,{direction:"column",alignItems:"stretch",gap:3},a.createElement(bt.r,{gap:0},i.map(([o,r],d)=>{const{paddingLeft:c,paddingRight:m}=gn(d);return a.createElement(et.P,{key:o,col:6,style:{height:"100%"}},a.createElement(j.x,{paddingLeft:c,paddingRight:m,paddingBottom:1,style:{height:"100%"}},a.createElement(Ca,{key:o,customFieldUid:o,customField:r})))})),a.createElement(pa.r,{href:"https://docs.strapi.io/developer-docs/latest/development/custom-fields.html",isExternal:!0},e({id:(0,u.Z)("modalForm.tabs.custom.howToLink"),defaultMessage:"How to add custom fields"}))))};const hn=({attributes:e,forTarget:n,kind:s})=>{const{formatMessage:i}=(0,P.Z)(),o=(0,u.Z)("modalForm.tabs.default"),r=(0,u.Z)("modalForm.tabs.custom"),d=n.includes("component")?"component":s,c=(0,u.Z)(`modalForm.sub-header.chooseAttribute.${d}`);return a.createElement(we.f,{padding:6},a.createElement(ze.v,{label:i({id:(0,u.Z)("modalForm.tabs.label"),defaultMessage:"Default and Custom types tabs"}),id:"attribute-type-tabs",variant:"simple"},a.createElement($.k,{justifyContent:"space-between"},a.createElement(X.Z,{variant:"beta",as:"h2"},i({id:c,defaultMessage:"Select a field"})),a.createElement(Oe.m,null,a.createElement(Oe.O,null,i({id:o,defaultMessage:"Default"})),a.createElement(Oe.O,null,i({id:r,defaultMessage:"Custom"})))),a.createElement(j.x,{paddingBottom:6},a.createElement(pt.i,null)),a.createElement(Le.n,null,a.createElement(Le.x,null,a.createElement(ma,{attributes:e})),a.createElement(Le.x,null,a.createElement(Ma,null)))))};hn.propTypes={attributes:t().array.isRequired,forTarget:t().string.isRequired,kind:t().string.isRequired};var Ea=hn,vt=l(8284);const Tt=({description:e,disabled:n,intlLabel:s,isCreating:i,name:o,onChange:r,value:d})=>{const{formatMessage:c}=(0,P.Z)(),[m,g]=(0,a.useState)(!1),f=s.id?c({id:s.id,defaultMessage:s.defaultMessage},{...s.values}):o,p=e?c({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",v=()=>g(F=>!F),h=()=>{r({target:{name:o,value:!1}}),v()},S=({target:{checked:F}})=>{if(!F&&!i){v();return}r({target:{name:o,value:F}})};return a.createElement(a.Fragment,null,a.createElement(vt.X,{checked:d,disabled:n,hint:p,name:o,onChange:S},f),a.createElement(C.QH,{isOpen:m,onToggleDialog:v,onConfirm:h,bodyText:{id:(0,u.Z)("popUpWarning.draft-publish.message"),defaultMessage:"If you disable the draft & publish, your drafts will be deleted."},leftButtonText:{id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"},rightButtonText:{id:(0,u.Z)("popUpWarning.draft-publish.button.confirm"),defaultMessage:"Yes, disable"}}))};Tt.defaultProps={description:null,disabled:!1,value:!1},Tt.propTypes={description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),disabled:t().bool,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,isCreating:t().bool.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().bool};var Ra=Tt;const Ct=({description:e,disabled:n,intlLabel:s,isCreating:i,name:o,onChange:r,value:d})=>{const{trackUsage:c}=(0,C.rS)(),{formatMessage:m}=(0,P.Z)(),[g,f]=(0,a.useState)(!1),p=s.id?m({id:s.id,defaultMessage:s.defaultMessage},{...s.values}):o,v=e?m({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",h=()=>f(L=>!L),S=()=>{r({target:{name:o,value:!1}}),c("willDisableWorkflow"),h()},F=({target:{checked:L}})=>{if(!L&&!i){h();return}L&&c("willEnableWorkflow"),r({target:{name:o,value:L}})};return a.createElement(a.Fragment,null,a.createElement(vt.X,{checked:d,disabled:n,hint:v,name:o,onChange:F},p),a.createElement(C.QH,{isOpen:g,onToggleDialog:h,onConfirm:S,bodyText:{id:(0,u.Z)("popUpWarning.review-workflows.message"),defaultMessage:"If you disable the review workflows feature, all stage-related information will be removed for this content-type. Are you sure you want to disable it?"},leftButtonText:{id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"},rightButtonText:{id:(0,u.Z)("popUpWarning.review-workflows.button.confirm"),defaultMessage:"Yes, disable"}}))};Ct.defaultProps={description:null,disabled:!1,value:!1},Ct.propTypes={description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),disabled:t().bool,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,isCreating:t().bool.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().bool};var Za=Ct,vn=l(55225),Mt=l(11299);const Et=({actionType:e,attributeName:n,attributeType:s,categoryName:i,contentTypeKind:o,dynamicZoneTarget:r,forTarget:d,modalType:c,targetUid:m,customFieldUid:g})=>{const{formatMessage:f}=(0,P.Z)(),{modifiedData:p}=(0,Ze.Z)();let v,h=[];const S=p?.[d]?.[m]||p?.[d]||null;let F=S?.schema.displayName;if(c==="contentType"&&(v=o),["component","editCategory"].includes(c)&&(v="component"),["component","contentType"].includes(c)){let M=(0,u.Z)(`modalForm.component.header-${e}`);return c==="contentType"&&(M=(0,u.Z)(`modalForm.${o}.header-create`)),e==="edit"&&(M=(0,u.Z)("modalForm.header-edit")),a.createElement(vn.x,null,a.createElement($.k,null,a.createElement(j.x,null,a.createElement(tt.Z,{type:v})),a.createElement(j.x,{paddingLeft:3},a.createElement(X.Z,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"title"},f({id:M},{name:F})))))}h=[{label:F,info:{category:S?.category||null,name:S?.schema.displayName}}],c==="chooseAttribute"&&(v=["component","components"].includes(d)?"component":S.schema.kind),c==="addComponentToDynamicZone"&&(v="dynamiczone",h.push({label:r})),(c==="attribute"||c==="customField")&&(v=s,h.push({label:n})),c==="editCategory"&&(h=[{label:f({id:(0,u.Z)("modalForm.header.categories"),defaultMessage:"Categories"})},{label:i}]);const E=h.map(({label:M})=>M).join(",");return a.createElement(vn.x,null,a.createElement($.k,{gap:3},a.createElement(tt.Z,{type:v,customField:g}),a.createElement(Mt.O,{label:E},h.map((M,A)=>{const U=Ce()(M.label);if(!U)return null;const z=`${M.label}.${A}`;if(M.info?.category){const J=`${U} (${Ce()(M.info.category)} - ${Ce()(M.info.name)})`;return a.createElement(Mt.$,{key:z},J)}return a.createElement(Mt.$,{key:z},U)}))))};Et.defaultProps={actionType:null,attributeName:null,attributeType:null,categoryName:null,dynamicZoneTarget:null,forTarget:null,contentTypeKind:null,targetUid:null,customFieldUid:null},Et.propTypes={actionType:t().string,attributeName:t().string,attributeType:t().string,categoryName:t().string,contentTypeKind:t().string,dynamicZoneTarget:t().string,forTarget:t().oneOf(["contentType","component","components"]),modalType:t().string.isRequired,targetUid:t().string,customFieldUid:t().string};var Aa=Et;const Rt=({categoryName:e,deleteCategory:n,deleteComponent:s,deleteContentType:i,isAttributeModal:o,isCustomFieldModal:r,isComponentAttribute:d,isComponentToDzModal:c,isContentTypeModal:m,isCreatingComponent:g,isCreatingComponentAttribute:f,isCreatingComponentInDz:p,isCreatingComponentWhileAddingAField:v,isCreatingContentType:h,isCreatingDz:S,isComponentModal:F,isDzAttribute:L,isEditingAttribute:E,isEditingCategory:M,isInFirstComponentStep:A,onSubmitAddComponentAttribute:U,onSubmitAddComponentToDz:z,onSubmitCreateContentType:J,onSubmitCreateComponent:ne,onSubmitCreateDz:I,onSubmitEditAttribute:ge,onSubmitEditCategory:G,onSubmitEditComponent:V,onSubmitEditContentType:ye,onSubmitEditCustomFieldAttribute:K,onSubmitEditDz:Pe,onClickFinish:te})=>{const{formatMessage:W}=(0,P.Z)();return c?p?a.createElement(Y.z,{variant:"secondary",type:"submit",onClick:R=>{R.preventDefault(),z(R,!0)},startIcon:a.createElement(Fe.Z,null)},W({id:(0,u.Z)("form.button.add-first-field-to-created-component"),defaultMessage:"Add first field to the component"})):a.createElement(Y.z,{variant:"default",type:"submit",onClick:R=>{R.preventDefault(),z(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"})):o&&L&&!S?a.createElement(Y.z,{variant:"default",type:"submit",onClick:R=>{R.preventDefault(),te(),Pe(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"})):o&&L&&S?a.createElement(a.Fragment,null,a.createElement(Y.z,{variant:"secondary",type:"submit",onClick:R=>{R.preventDefault(),I(R,!0)},startIcon:a.createElement(Fe.Z,null)},W({id:(0,u.Z)("form.button.add-components-to-dynamiczone"),defaultMessage:"Add components to the zone"}))):o&&d?A?a.createElement(Y.z,{variant:"secondary",type:"submit",onClick:R=>{R.preventDefault(),U(R,!0)}},W(f?{id:(0,u.Z)("form.button.configure-component"),defaultMessage:"Configure the component"}:{id:(0,u.Z)("form.button.select-component"),defaultMessage:"Configure the component"})):a.createElement(a.Fragment,null,a.createElement(Y.z,{variant:"secondary",type:"submit",onClick:R=>{R.preventDefault(),U(R,!0)},startIcon:a.createElement(Fe.Z,null)},W(v?{id:(0,u.Z)("form.button.add-first-field-to-created-component"),defaultMessage:"Add first field to the component"}:{id:(0,u.Z)("form.button.add-field"),defaultMessage:"Add another field"})),a.createElement(Y.z,{variant:"default",type:"button",onClick:R=>{R.preventDefault(),te(),U(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"}))):o&&!d&&!L?a.createElement(a.Fragment,null,a.createElement(Y.z,{type:E?"button":"submit",variant:"secondary",onClick:R=>{R.preventDefault(),ge(R,!0)},startIcon:a.createElement(Fe.Z,null)},W({id:(0,u.Z)("form.button.add-field"),defaultMessage:"Add another field"})),a.createElement(Y.z,{type:E?"submit":"button",variant:"default",onClick:R=>{R.preventDefault(),te(),ge(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"}))):m?a.createElement(a.Fragment,null,!h&&a.createElement(a.Fragment,null,a.createElement(Y.z,{type:"button",variant:"danger",onClick:R=>{R.preventDefault(),i()}},W({id:"global.delete",defaultMessage:"Delete"})),a.createElement(Y.z,{type:"submit",variant:"default",onClick:R=>{R.preventDefault(),ye(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"}))),h&&a.createElement(Y.z,{type:"submit",variant:"secondary",onClick:R=>{R.preventDefault(),J(R,!0)}},W({id:"global.continue",defaultMessage:"Continue"}))):F?a.createElement(a.Fragment,null,!g&&a.createElement(a.Fragment,null,a.createElement(Y.z,{type:"button",variant:"danger",onClick:R=>{R.preventDefault(),s()}},W({id:"global.delete",defaultMessage:"Delete"})),a.createElement(Y.z,{type:"submit",variant:"default",onClick:R=>{R.preventDefault(),V(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"}))),g&&a.createElement(Y.z,{type:"submit",variant:"secondary",onClick:R=>{R.preventDefault(),ne(R,!0)}},W({id:"global.continue",defaultMessage:"Continue"}))):M?a.createElement(a.Fragment,null,a.createElement(Y.z,{type:"button",variant:"danger",onClick:R=>{R.preventDefault(),n(e)}},W({id:"global.delete",defaultMessage:"Delete"})),a.createElement(Y.z,{type:"submit",variant:"default",onClick:R=>{R.preventDefault(),G(R)}},W({id:"global.finish",defaultMessage:"finish"}))):r?a.createElement(a.Fragment,null,a.createElement(Y.z,{type:E?"button":"submit",variant:"secondary",onClick:R=>{R.preventDefault(),K(R,!0)},startIcon:a.createElement(Fe.Z,null)},W({id:(0,u.Z)("form.button.add-field"),defaultMessage:"Add another field"})),a.createElement(Y.z,{type:E?"submit":"button",variant:"default",onClick:R=>{R.preventDefault(),te(),K(R,!1)}},W({id:"global.finish",defaultMessage:"Finish"}))):null};Rt.defaultProps={categoryName:null,onClickFinish(){}},Rt.propTypes={categoryName:t().string,deleteCategory:t().func.isRequired,deleteComponent:t().func.isRequired,deleteContentType:t().func.isRequired,isAttributeModal:t().bool.isRequired,isCustomFieldModal:t().bool.isRequired,isComponentAttribute:t().bool.isRequired,isComponentModal:t().bool.isRequired,isComponentToDzModal:t().bool.isRequired,isContentTypeModal:t().bool.isRequired,isCreatingComponent:t().bool.isRequired,isCreatingComponentAttribute:t().bool.isRequired,isCreatingComponentInDz:t().bool.isRequired,isCreatingComponentWhileAddingAField:t().bool.isRequired,isCreatingContentType:t().bool.isRequired,isCreatingDz:t().bool.isRequired,isDzAttribute:t().bool.isRequired,isEditingAttribute:t().bool.isRequired,isEditingCategory:t().bool.isRequired,isInFirstComponentStep:t().bool.isRequired,onSubmitAddComponentAttribute:t().func.isRequired,onSubmitAddComponentToDz:t().func.isRequired,onSubmitCreateContentType:t().func.isRequired,onSubmitCreateComponent:t().func.isRequired,onSubmitCreateDz:t().func.isRequired,onSubmitEditAttribute:t().func.isRequired,onSubmitEditCategory:t().func.isRequired,onSubmitEditComponent:t().func.isRequired,onSubmitEditContentType:t().func.isRequired,onSubmitEditCustomFieldAttribute:t().func.isRequired,onSubmitEditDz:t().func.isRequired,onClickFinish:t().func};var xa=Rt,Sa=({modalType:e,forTarget:n,kind:s,actionType:i,step:o})=>{switch(e){case"chooseAttribute":return(0,u.Z)(`modalForm.sub-header.chooseAttribute.${n.includes("component")?"component":s||"collectionType"}`);case"attribute":return(0,u.Z)(`modalForm.sub-header.attribute.${i}${o!=="null"&&o!==null&&i!=="edit"?".step":""}`);case"customField":return(0,u.Z)(`modalForm.sub-header.attribute.${i}`);case"addComponentToDynamicZone":return(0,u.Z)("modalForm.sub-header.addComponentToDynamicZone");default:return(0,u.Z)("configurations")}};const Zt=({actionType:e,modalType:n,forTarget:s,kind:i,step:o,attributeType:r,attributeName:d,customField:c})=>{const{formatMessage:m}=(0,P.Z)(),g=n==="customField"?c.intlLabel:{id:(0,u.Z)(`attribute.${r}`)};return a.createElement($.k,{direction:"column",alignItems:"flex-start",paddingBottom:2,gap:1},a.createElement(X.Z,{as:"h2",variant:"beta"},m({id:Sa({actionType:e,forTarget:s,kind:i,step:o,modalType:n}),defaultMessage:"Add new field"},{type:Ce()(m(g)),name:Ce()(d),step:o})),a.createElement(X.Z,{variant:"pi",textColor:"neutral600"},m({id:(0,u.Z)(`attribute.${r}.description`),defaultMessage:"A type for modeling data"})))};Zt.defaultProps={actionType:null,modalType:null,forTarget:null,kind:null,step:null,attributeType:null,attributeName:null,customField:null},Zt.propTypes={actionType:t().string,modalType:t().string,forTarget:t().string,kind:t().string,step:t().string,attributeType:t().string,attributeName:t().string,customField:t().object};var Fa=Zt,nt=l(80084),at=l(84967);const At=({intlLabel:e,name:n,options:s,onChange:i,value:o})=>{const{formatMessage:r}=(0,P.Z)(),d=e.id?r({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):n,c=m=>{let g="";m==="true"&&(g=!0),m==="false"&&(g=!1),i({target:{name:n,value:g,type:"select-default-boolean"}})};return a.createElement(nt.P,{label:d,id:n,name:n,onChange:c,value:(o===null?"":o).toString()},s.map(({metadatas:{intlLabel:m,disabled:g,hidden:f},key:p,value:v})=>a.createElement(at.W,{key:p,value:v,disabled:g,hidden:f},m.defaultMessage)))};At.defaultProps={value:null},At.propTypes={intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,name:t().string.isRequired,onChange:t().func.isRequired,options:t().arrayOf(t().shape({metadatas:t().shape({intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}).isRequired,disabled:t().bool,hidden:t().bool}).isRequired,key:t().oneOfType([t().string,t().number]).isRequired,value:t().oneOfType([t().string,t().number]).isRequired}).isRequired).isRequired,value:t().any};var Na=At,Oa=l(30350);const La=(0,Ie.ZP)($.k)`
|
|
19
|
+
position: relative;
|
|
20
|
+
align-items: stretch;
|
|
21
|
+
|
|
22
|
+
label {
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
max-width: 50%;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
user-select: none;
|
|
27
|
+
flex: 1;
|
|
28
|
+
${(0,Oa.k3)()}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
input {
|
|
32
|
+
position: absolute;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.option {
|
|
37
|
+
height: 100%;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
border: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
40
|
+
will-change: transform, opacity;
|
|
41
|
+
background: ${({theme:e})=>e.colors.neutral0};
|
|
42
|
+
|
|
43
|
+
.checkmark {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: block;
|
|
46
|
+
will-change: transform;
|
|
47
|
+
background: ${({theme:e})=>e.colors.neutral0};
|
|
48
|
+
width: ${({theme:e})=>e.spaces[5]};
|
|
49
|
+
height: ${({theme:e})=>e.spaces[5]};
|
|
50
|
+
border: solid 1px ${({theme:e})=>e.colors.neutral300};
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
|
|
53
|
+
&:before,
|
|
54
|
+
&:after {
|
|
55
|
+
content: '';
|
|
56
|
+
display: block;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
width: ${({theme:e})=>e.spaces[3]};
|
|
59
|
+
height: ${({theme:e})=>e.spaces[3]};
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 3px;
|
|
62
|
+
left: 3px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:after {
|
|
66
|
+
transform: scale(0);
|
|
67
|
+
transition: inherit;
|
|
68
|
+
will-change: transform;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.container input:checked ~ div {
|
|
74
|
+
background: ${({theme:e})=>e.colors.primary100};
|
|
75
|
+
${X.Z} {
|
|
76
|
+
color: ${({theme:e})=>e.colors.primary600};
|
|
77
|
+
}
|
|
78
|
+
border: 1px solid ${({theme:e})=>e.colors.primary200};
|
|
79
|
+
.checkmark {
|
|
80
|
+
border: solid 1px ${({theme:e})=>e.colors.primary600};
|
|
81
|
+
&::after {
|
|
82
|
+
background: ${({theme:e})=>e.colors.primary600};
|
|
83
|
+
transform: scale(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,xt=({intlLabel:e,name:n,onChange:s,radios:i,value:o})=>{const{formatMessage:r}=(0,P.Z)();return a.createElement($.k,{direction:"column",alignItems:"stretch",gap:2},a.createElement(X.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral800",htmlFor:n,as:"label"},r(e)),a.createElement(La,{gap:4,alignItems:"stretch"},i.map(d=>a.createElement("label",{htmlFor:d.value.toString(),key:d.value,className:"container"},a.createElement("input",{id:d.value.toString(),name:n,className:"option-input",checked:d.value===o,value:d.value,key:d.value,onChange:s,type:"radio"}),a.createElement(j.x,{className:"option",padding:4},a.createElement($.k,null,a.createElement(j.x,{paddingRight:4},a.createElement("span",{className:"checkmark"})),a.createElement($.k,{direction:"column",alignItems:"stretch",gap:2},a.createElement(X.Z,{fontWeight:"bold"},r(d.title)),a.createElement(X.Z,{variant:"pi",textColor:"neutral600"},r(d.description)))))))))};xt.defaultProps={radios:[]},xt.propTypes={intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,name:t().string.isRequired,onChange:t().func.isRequired,radios:t().arrayOf(t().shape({title:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}),description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}),value:t().any.isRequired})),value:t().oneOfType([t().string,t().bool]).isRequired};var St=xt;const Tn=({onChange:e,name:n,...s})=>{const i=o=>{const r=o.target.value!=="false";e({target:{name:n,value:r,type:"boolean-radio-group"}})};return a.createElement(St,{...s,name:n,onChange:i})};Tn.propTypes={name:t().string.isRequired,onChange:t().func.isRequired};var Ia=Tn,Ft=l(10369),Da=l(9900);const Nt=({error:e,intlLabel:n,modifiedData:s,name:i,onChange:o,value:r})=>{const{formatMessage:d}=(0,P.Z)(),[c,m]=(0,a.useState)(!!r||r===0),g=n.id?d({id:n.id,defaultMessage:n.defaultMessage},{...n.values}):i,f=s.type==="biginteger"?"text":"number",p=!s.type,v=e?d({id:e,defaultMessage:e}):"";return a.createElement($.k,{direction:"column",alignItems:"stretch",gap:2},a.createElement(vt.X,{id:i,name:i,onValueChange:h=>{o({target:{name:i,value:h?f==="text"?"0":0:null}}),m(L=>!L)},value:c},g),c&&a.createElement(j.x,{paddingLeft:6,style:{maxWidth:"200px"}},f==="text"?a.createElement(Ft.o,{"aria-label":g,disabled:p,error:v,id:i,name:i,onChange:o,value:r===null?"":r}):a.createElement(Da.Y,{"aria-label":g,disabled:p,error:v,id:i,name:i,onValueChange:h=>{o({target:{name:i,value:h,type:f}})},value:r||0})))};Nt.defaultProps={error:null,value:null},Nt.propTypes={error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,modifiedData:t().object.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().oneOfType([t().string,t().object,t().bool,t().number])};var qa=Nt;const Cn=({onChange:e,...n})=>{const s=(0,C.lm)(),i=o=>{s({type:"info",message:{id:(0,u.Z)("contentType.kind.change.warning"),defaultMessage:"You just changed the kind of a content type: API will be reset (routes, controllers, and services will be overwritten)."}}),e(o)};return a.createElement(St,{...n,onChange:i})};Cn.propTypes={onChange:t().func.isRequired};var Pa=Cn,Ot=l(49561),Mn=l(34853),Q=l(91559);const Lt=({oneThatIsCreatingARelationWithAnother:e,target:n})=>{const{contentTypes:s,sortedContentTypesList:i}=(0,Ze.Z)(),o=(0,ve.I0)(),r=i.filter(mn),d=T()(s,[n,"plugin"],null),c=T()(s,[n,"schema","displayName"],"error");return a.createElement(Mn.O,{id:"label",label:`${c}
|
|
88
|
+
${d?`(from: ${d})`:""}`},r.map(({uid:m,title:g,restrictRelationsTo:f,plugin:p})=>{const v=()=>{const h=p?`${p}_${g}`:g;o({type:Q.aG,target:{value:m,oneThatIsCreatingARelationWithAnother:e,selectedContentTypeFriendlyName:h,targetContentTypeAllowedRelations:f}})};return a.createElement(Mn.s,{key:m,onClick:v},g,"\xA0",p&&a.createElement(a.Fragment,null,"(from: ",p,")"))}))};Lt.defaultProps={target:null},Lt.propTypes={oneThatIsCreatingARelationWithAnother:t().string.isRequired,target:t().string};var ka=Lt;const It=({disabled:e,error:n,header:s,isMain:i,name:o,onChange:r,oneThatIsCreatingARelationWithAnother:d,target:c,value:m})=>a.createElement(j.x,{background:"neutral100",hasRadius:!0,borderColor:"neutral200"},a.createElement($.k,{paddingTop:i?4:1,paddingBottom:i?3:1,justifyContent:"center"},i?a.createElement(X.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral800"},s):a.createElement(ka,{target:c,oneThatIsCreatingARelationWithAnother:d})),a.createElement(pt.i,{background:"neutral200"}),a.createElement(j.x,{padding:4},a.createElement(C.jm,{disabled:e,error:n?.id||null,intlLabel:{id:(0,u.Z)("form.attribute.item.defineRelation.fieldName"),defaultMessage:"Field name"},name:o,onChange:r,type:"text",value:m})));It.defaultProps={disabled:!1,error:null,header:null,isMain:!1,onChange(){},oneThatIsCreatingARelationWithAnother:null,target:null,value:""},It.propTypes={disabled:t().bool,error:t().object,header:t().string,isMain:t().bool,name:t().string.isRequired,onChange:t().func,oneThatIsCreatingARelationWithAnother:t().string,target:t().string,value:t().string};var En=It,$a=l(51382),Rn=l.n($a),Ua=l(24443),Dt=l.n(Ua),Wa=l(25449),Ba=l(10168),ja=l(7733),wa=l(79634),za=l(26253),Va=l(32548);const Ka=(0,Ie.ZP)(j.x)`
|
|
89
|
+
position: relative;
|
|
90
|
+
width: 100%;
|
|
91
|
+
&::before {
|
|
92
|
+
content: '';
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: calc(50% - 0px);
|
|
95
|
+
height: 2px;
|
|
96
|
+
width: 100%;
|
|
97
|
+
background-color: ${({theme:e})=>e.colors.primary600};
|
|
98
|
+
z-index: 0;
|
|
99
|
+
}
|
|
100
|
+
`,Ga=(0,Ie.ZP)(j.x)`
|
|
101
|
+
background: ${({theme:e,isSelected:n})=>e.colors[n?"primary100":"neutral0"]};
|
|
102
|
+
border: 1px solid
|
|
103
|
+
${({theme:e,isSelected:n})=>e.colors[n?"primary700":"neutral200"]};
|
|
104
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
105
|
+
z-index: 1;
|
|
106
|
+
svg {
|
|
107
|
+
width: 1.5rem;
|
|
108
|
+
height: 100%;
|
|
109
|
+
path {
|
|
110
|
+
fill: ${({theme:e,isSelected:n})=>e.colors[n?"primary700":"neutral500"]};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
&:disabled {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
}
|
|
116
|
+
`,Ha=(0,Ie.ZP)($.k)`
|
|
117
|
+
position: absolute;
|
|
118
|
+
bottom: 0;
|
|
119
|
+
left: 0;
|
|
120
|
+
right: 0;
|
|
121
|
+
`,Ya={oneWay:Wa.Z,oneToOne:Ba.Z,oneToMany:ja.Z,manyToOne:wa.Z,manyToMany:za.Z,manyWay:Va.Z},qt=({naturePickerType:e,oneThatIsCreatingARelationWithAnother:n,relationType:s,target:i})=>{const o=(0,ve.I0)(),{formatMessage:r}=(0,P.Z)(),{contentTypes:d,modifiedData:c}=(0,Ze.Z)(),m=["oneWay","oneToOne","oneToMany","manyToOne","manyToMany","manyWay"],g=["oneWay","manyWay"],p=(e==="contentType"?T()(c,[e,"schema","kind"],""):e)==="collectionType"?m:g,v=s==="manyToOne",h=T()(d,[i,"schema","displayName"],"unknown"),S=v?h:n,F=v?n:h,L=Dt()(S,s==="manyToMany"?2:1),E=T()(d,[i,"schema","restrictRelationsTo"],null),M=Dt()(F,["manyToMany","oneToMany","manyToOne","manyWay"].includes(s)?2:1);return s?a.createElement($.k,{style:{flex:1}},a.createElement(Ka,null,a.createElement($.k,{paddingLeft:9,paddingRight:9,paddingTop:1,justifyContent:"center"},a.createElement(yt.k,{tagName:"button"},a.createElement($.k,{gap:3},p.map(A=>{const U=Ya[A],z=E===null||E.includes(A);return a.createElement(Ga,{as:"button",isSelected:s===A,disabled:!z,key:A,onClick:()=>{z&&o({type:Q.QQ,target:{oneThatIsCreatingARelationWithAnother:n,targetContentType:i,value:A}})},padding:2,type:"button"},a.createElement(U,{key:A}))}))))),a.createElement(Ha,{justifyContent:"center"},a.createElement(X.Z,null,Rn()(L,{length:24}),"\xA0"),a.createElement(X.Z,{textColor:"primary600"},r({id:(0,u.Z)(`relation.${s}`)}),"\xA0"),a.createElement(X.Z,null,Rn()(M,{length:24})))):null};qt.defaultProps={relationType:null,target:null},qt.propTypes={naturePickerType:t().string.isRequired,oneThatIsCreatingARelationWithAnother:t().string.isRequired,relationType:t().string,target:t().string};var Qa=qt;const Zn=({formErrors:e,mainBoxHeader:n,modifiedData:s,naturePickerType:i,onChange:o})=>{const r=(0,Ot.Z)(s.relation,s.targetAttribute);return a.createElement($.k,{style:{position:"relative"}},a.createElement(En,{isMain:!0,header:n,error:e?.name||null,name:"name",onChange:o,value:s?.name||""}),a.createElement(Qa,{naturePickerType:i,oneThatIsCreatingARelationWithAnother:n,relationType:r,target:s.target}),a.createElement(En,{disabled:["oneWay","manyWay"].includes(r),error:e?.targetAttribute||null,name:"targetAttribute",onChange:o,oneThatIsCreatingARelationWithAnother:n,target:s.target,value:s?.targetAttribute||""}))};Zn.propTypes={formErrors:t().object.isRequired,mainBoxHeader:t().string.isRequired,modifiedData:t().object.isRequired,naturePickerType:t().string.isRequired,onChange:t().func.isRequired};var Xa=Zn,An=l(45251);const Pt=({description:e,error:n,intlLabel:s,modifiedData:i,name:o,onChange:r,value:d})=>{const{formatMessage:c}=(0,P.Z)(),m=(0,a.useRef)(r),g=i?.displayName||"";(0,a.useEffect)(()=>{if(g){const h=(0,An.Z)(g);try{const S=Dt()(h,2);m.current({target:{name:o,value:S}})}catch{m.current({target:{name:o,value:h}})}}else m.current({target:{name:o,value:""}})},[g,o]);const f=n?c({id:n,defaultMessage:n}):"",p=e?c({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",v=c(s);return a.createElement(Ft.o,{error:f,label:v,id:o,hint:p,name:o,onChange:r,value:d||""})};Pt.defaultProps={description:null,error:null,value:null},Pt.propTypes={description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,modifiedData:t().object.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().string};var Ja=Pt,_a=l(42623),es=l(90333);const kt=({error:e,intlLabel:n,name:s,onChange:i,value:o})=>{const{formatMessage:r}=(0,P.Z)(),{allComponentsCategories:d}=(0,Ze.Z)(),[c,m]=(0,a.useState)(d),g=e?r({id:e,defaultMessage:e}):"",f=r(n),p=h=>{i({target:{name:s,value:h,type:"select-category"}})},v=h=>{m(S=>[...S,h]),p(h)};return a.createElement(_a.X,{error:g,id:s,label:f,name:s,onChange:p,onCreateOption:v,value:o},c.map(h=>a.createElement(es.O,{key:h,value:h},h)))};kt.defaultProps={error:null,value:null},kt.propTypes={error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().string};var ts=kt;const $t=({error:e,intlLabel:n,isAddingAComponentToAnotherComponent:s,isCreating:i,isCreatingComponentWhileAddingAField:o,componentToCreate:r,name:d,onChange:c,targetUid:m,forTarget:g,value:f})=>{const{formatMessage:p}=(0,P.Z)(),v=e?p({id:e,defaultMessage:e}):"",h=p(n),{componentsGroupedByCategory:S,componentsThatHaveOtherComponentInTheirAttributes:F}=(0,Ze.Z)(),L=["component","components"].includes(g);let E=Object.entries(S).reduce((M,A)=>{const[U,z]=A,J=z.map(ne=>({uid:ne.uid,label:ne.schema.displayName,categoryName:U}));return[...M,...J]},[]);return s&&(E=E.filter(M=>!F.includes(M.uid))),L&&(E=E.filter(M=>M.uid!==m)),o&&(E=[{uid:f,label:r.displayName,categoryName:r.category}]),a.createElement(nt.P,{disabled:o||!i,error:v,label:h,id:d,name:d,onChange:M=>{c({target:{name:d,value:M,type:"select-category"}})},value:f||""},E.map(M=>a.createElement(at.W,{key:M.uid,value:M.uid},`${M.categoryName} - ${M.label}`)))};$t.defaultProps={componentToCreate:null,error:null},$t.propTypes={componentToCreate:t().object,forTarget:t().string.isRequired,error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,isAddingAComponentToAnotherComponent:t().bool.isRequired,isCreating:t().bool.isRequired,isCreatingComponentWhileAddingAField:t().bool.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,targetUid:t().string.isRequired,value:t().string.isRequired};var ns=$t,Ut=(e,n)=>e.find(({name:s})=>s===n);const xn=({dynamicZoneTarget:e,intlLabel:n,name:s,onChange:i,value:o})=>{const{formatMessage:r}=(0,P.Z)(),{componentsGroupedByCategory:d,modifiedData:c}=(0,Ze.Z)(),g=(Ut(c.contentType.schema.attributes,e)||{}).components||[],f=Object.keys(d).reduce((h,S)=>{const F=d[S].filter(({uid:L})=>!g.includes(L));return F.length>0&&(h[S]=F),h},{}),p=Object.entries(f).reduce((h,S)=>{const[F,L]=S,E={label:F,children:L.map(({uid:M,schema:{displayName:A}})=>({label:A,value:M}))};return h.push(E),h},[]),v=r({id:(0,u.Z)("components.SelectComponents.displayed-value"),defaultMessage:"{number, plural, =0 {# components} one {# component} other {# components}} selected"},{number:o.length});return a.createElement(cn.Q,{id:"select1",label:r(n),customizeContent:()=>v,name:s,onChange:h=>{i({target:{name:s,value:h,type:"select-components"}})},options:p,value:o||[]})};xn.propTypes={intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,dynamicZoneTarget:t().string.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().array.isRequired};var as=xn;const Wt=({intlLabel:e,error:n,modifiedData:s,name:i,onChange:o,options:r,value:d})=>{const{formatMessage:c}=(0,P.Z)(),m=c(e),g=n?c({id:n,defaultMessage:n}):"",f=p=>{o({target:{name:i,value:p,type:"select"}}),d&&s.default!==void 0&&s.default!==null&&o({target:{name:"default",value:null}})};return a.createElement(nt.P,{error:g,label:m,id:i,name:i,onChange:f,value:d||""},r.map(({metadatas:{intlLabel:p,disabled:v,hidden:h},key:S,value:F})=>a.createElement(at.W,{key:S,value:F,disabled:v,hidden:h},c({id:p.id,defaultMessage:p.defaultMessage},p.values))))};Wt.defaultProps={error:void 0,value:""},Wt.propTypes={error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,modifiedData:t().object.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,options:t().arrayOf(t().shape({metadatas:t().shape({intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}).isRequired,disabled:t().bool,hidden:t().bool}).isRequired,key:t().oneOfType([t().string,t().number]).isRequired,value:t().oneOfType([t().string,t().number]).isRequired}).isRequired).isRequired,value:t().string};var ss=Wt;const Bt=({intlLabel:e,error:n,modifiedData:s,name:i,onChange:o,options:r,value:d})=>{const{formatMessage:c}=(0,P.Z)(),m=c(e),g=n?c({id:n,defaultMessage:n}):"",f=p=>{o({target:{name:i,value:p,type:"select"}}),d&&(p==="biginteger"&&d!=="biginteger"&&(s.default!==void 0&&s.default!==null&&o({target:{name:"default",value:null}}),s.max!==void 0&&s.max!==null&&o({target:{name:"max",value:null}}),s.min!==void 0&&s.min!==null&&o({target:{name:"min",value:null}})),["decimal","float","integer"].includes(p)&&d==="biginteger"&&(s.default!==void 0&&s.default!==null&&o({target:{name:"default",value:null}}),s.max!==void 0&&s.max!==null&&o({target:{name:"max",value:null}}),s.min!==void 0&&s.min!==null&&o({target:{name:"min",value:null}})))};return a.createElement(nt.P,{error:g,label:m,id:i,name:i,onChange:f,value:d||""},r.map(({metadatas:{intlLabel:p,disabled:v,hidden:h},key:S,value:F})=>a.createElement(at.W,{key:S,value:F,disabled:v,hidden:h},c(p))))};Bt.defaultProps={error:void 0,value:""},Bt.propTypes={error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,modifiedData:t().object.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,options:t().arrayOf(t().shape({metadatas:t().shape({intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired}).isRequired,disabled:t().bool,hidden:t().bool}).isRequired,key:t().oneOfType([t().string,t().number]).isRequired,value:t().oneOfType([t().string,t().number]).isRequired}).isRequired).isRequired,value:t().string};var os=Bt;const jt=({description:e,error:n,intlLabel:s,modifiedData:i,name:o,onChange:r,value:d})=>{const{formatMessage:c}=(0,P.Z)(),m=(0,a.useRef)(r),g=i?.displayName||"";(0,a.useEffect)(()=>{g?m.current({target:{name:o,value:(0,An.Z)(g)}}):m.current({target:{name:o,value:""}})},[g,o]);const f=n?c({id:n,defaultMessage:n}):"",p=e?c({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",v=c(s);return a.createElement(Ft.o,{error:f,label:v,id:o,hint:p,name:o,onChange:r,value:d||""})};jt.defaultProps={description:null,error:null,value:null},jt.propTypes={description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,modifiedData:t().object.isRequired,name:t().string.isRequired,onChange:t().func.isRequired,value:t().string};var is=jt;const Sn=({form:e,formErrors:n,genericInputProps:s,modifiedData:i,onChange:o})=>{const{formatMessage:r}=(0,P.Z)();return e.map((d,c)=>d.items.length===0?null:a.createElement(j.x,{key:c},d.sectionTitle&&a.createElement(j.x,{paddingBottom:4},a.createElement(X.Z,{variant:"delta",as:"h3"},r(d.sectionTitle))),a.createElement(bt.r,{gap:4},d.items.map((m,g)=>{const f=`${c}.${g}`,p=T()(i,m.name,""),v=Object.keys(n).find(S=>S===m.name),h=v?n[v].id:T()(n,[...m.name.split(".").filter(S=>S!=="componentToCreate"),"id"],null);return m.type==="pushRight"?a.createElement(et.P,{col:m.size||6,key:m.name||f},a.createElement("div",null)):a.createElement(et.P,{col:m.size||6,key:m.name||f},a.createElement(C.jm,{...m,...s,error:h,onChange:o,value:p}))}))))};Sn.propTypes={form:t().arrayOf(t().object).isRequired,formErrors:t().object.isRequired,genericInputProps:t().object.isRequired,modifiedData:t().object.isRequired,onChange:t().func.isRequired};var Fn=Sn,rs=l(10508);const wt=({description:e,disabled:n,error:s,intlLabel:i,labelAction:o,name:r,onChange:d,placeholder:c,value:m})=>{const{formatMessage:g}=(0,P.Z)(),f=s?g({id:s,defaultMessage:s}):"",p=e?g({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",v=g(i),h=c?g({id:c.id,defaultMessage:c.defaultMessage},{...c.values}):"",S=Array.isArray(m)?m.join(`
|
|
122
|
+
`):"",F=L=>{const E=L.target.value.split(`
|
|
123
|
+
`);d({target:{name:r,value:E}})};return a.createElement(rs.g,{disabled:n,error:f,label:v,labelAction:o,id:r,hint:p,name:r,onChange:F,placeholder:h,value:S},S)};wt.defaultProps={description:null,disabled:!1,error:"",labelAction:void 0,placeholder:null,value:""},wt.propTypes={description:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),disabled:t().bool,error:t().string,intlLabel:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}).isRequired,labelAction:t().element,name:t().string.isRequired,onChange:t().func.isRequired,placeholder:t().shape({id:t().string.isRequired,defaultMessage:t().string.isRequired,values:t().object}),value:t().oneOfType([t().array,t().string])};var ls=wt,us=(e,n)=>{const s=T()(e,["contentType","schema","kind"],"");return s==="singleType"||s===n.kind?!0:T()(e,["contentType","schema","attributes"],[]).filter(({relation:r,type:d,targetAttribute:c})=>{const m=(0,Ot.Z)(r,c);return d==="relation"&&!["oneWay","manyWay"].includes(m)}).length===0},ds=(e="",n,s)=>{const i=["text","email","richtext","password","number","enumeration","date","media","boolean","json","relation"],o=e==="contentType",r=s.includes(n),d=!o&&!r;return o?[[...i,"uid"],["component","dynamiczone"]]:d?[i,["component"]]:[i]},Nn=e=>e.reduce((n,s)=>{const i=s.items.reduce((o,r)=>(r.name&&o.push(r.name),o),[]);return[...n,...i]},[]),b=l(24346),De=l(2158),cs={base:{sections:[{sectionTitle:null,items:[{autoFocus:!0,name:"name",type:"text",intlLabel:{id:"global.name",defaultMessage:"Name"},description:{id:(0,u.Z)("modalForm.editCategory.base.name.description"),defaultMessage:"No space is allowed for the name of the category"}}]}]}},On=/^[A-Za-z][-_0-9A-Za-z]*$/,ms=e=>{const n={name:b.Z_().matches(On,C.I0.regex).test({name:"nameNotAllowed",message:C.I0.unique,test(s){return s?!e.includes(s?.toLowerCase()):!1}}).required(C.I0.required)};return b.Ry(n)},ps=(e,n,s)=>{const i={displayName:b.Z_().test({name:"nameAlreadyUsed",message:C.I0.unique,test(o){if(!o)return!1;const r=(0,De.N)(o,s);return!e.includes(r)}}).test({name:"nameNotAllowed",message:(0,u.Z)("error.contentTypeName.reserved-name"),test(o){return o?!n.includes(o?.trim()?.toLowerCase()):!1}}).required(C.I0.required),category:b.Z_().matches(On,C.I0.regex).required(C.I0.required),icon:b.Z_()};return b.Ry(i)},zt={intlLabel:{id:"global.type",defaultMessage:"Type"},name:"createComponent",type:"boolean-radio-group",size:12,radios:[{title:{id:(0,u.Z)("form.attribute.component.option.create"),defaultMessage:"Create a new component"},description:{id:(0,u.Z)("form.attribute.component.option.create.description"),defaultMessage:"A component is shared across types and components, it will be available and accessible everywhere."},value:!0},{title:{id:(0,u.Z)("form.attribute.component.option.reuse-existing"),defaultMessage:"Use an existing component"},description:{id:(0,u.Z)("form.attribute.component.option.reuse-existing.description"),defaultMessage:"Reuse a component already created to keep your data consistent across content-types."},value:!1}]},qe={base(e=""){return[{sectionTitle:null,items:[{name:`${e}displayName`,type:"text",intlLabel:{id:(0,u.Z)("contentType.displayName.label"),defaultMessage:"Display Name"}},{name:`${e}category`,type:"select-category",intlLabel:{id:(0,u.Z)("modalForm.components.create-component.category.label"),defaultMessage:"Select a category or enter a name to create a new one"}}]}]},advanced(){return[]}},Z={default:{name:"default",type:"text",intlLabel:{id:(0,u.Z)("form.attribute.settings.default"),defaultMessage:"Default value"}},max:{name:"max",type:"checkbox-with-number-field",intlLabel:{id:(0,u.Z)("form.attribute.item.maximum"),defaultMessage:"Maximum value"}},maxLength:{name:"maxLength",type:"checkbox-with-number-field",intlLabel:{id:(0,u.Z)("form.attribute.item.maximumLength"),defaultMessage:"Maximum length"}},min:{name:"min",type:"checkbox-with-number-field",intlLabel:{id:(0,u.Z)("form.attribute.item.minimum"),defaultMessage:"Minimum value"}},minLength:{name:"minLength",type:"checkbox-with-number-field",intlLabel:{id:(0,u.Z)("form.attribute.item.minimumLength"),defaultMessage:"Minimum length"}},private:{name:"private",type:"checkbox",intlLabel:{id:(0,u.Z)("form.attribute.item.privateField"),defaultMessage:"Private field"},description:{id:(0,u.Z)("form.attribute.item.privateField.description"),defaultMessage:"This field will not show up in the API response"}},regex:{intlLabel:{id:(0,u.Z)("form.attribute.item.text.regex"),defaultMessage:"RegExp pattern"},name:"regex",type:"text",description:{id:(0,u.Z)("form.attribute.item.text.regex.description"),defaultMessage:"The text of the regular expression"}},required:{name:"required",type:"checkbox",intlLabel:{id:(0,u.Z)("form.attribute.item.requiredField"),defaultMessage:"Required field"},description:{id:(0,u.Z)("form.attribute.item.requiredField.description"),defaultMessage:"You won't be able to create an entry if this field is empty"}},unique:{name:"unique",type:"checkbox",intlLabel:{id:(0,u.Z)("form.attribute.item.uniqueField"),defaultMessage:"Unique field"},description:{id:(0,u.Z)("form.attribute.item.uniqueField.description"),defaultMessage:"You won't be able to create an entry if there is an existing entry with identical content"}}},gs={boolean(){return{sections:[{sectionTitle:null,items:[{autoFocus:!0,type:"select-default-boolean",intlLabel:{id:(0,u.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},name:"default",options:[{value:"true",key:"true",metadatas:{intlLabel:{id:"true",defaultMessage:"true"}}},{value:"",key:"null",metadatas:{intlLabel:{id:"null",defaultMessage:"null"}}},{value:"false",key:"false",metadatas:{intlLabel:{id:"false",defaultMessage:"false"}}}]}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private]}]}},component({repeatable:e},n){return n==="1"?{sections:qe.advanced("componentToCreate")}:e?{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private,Z.max,Z.min]}]}:{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private]}]}},date({type:e}){return{sections:[{sectionTitle:null,items:[{...Z.default,type:e||"date",value:null,withDefaultValue:!1,disabled:!e,autoFocus:!1}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.unique,Z.private]}]}},dynamiczone(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.max,Z.min]}]}},email(){return{sections:[{sectionTitle:null,items:[{...Z.default,type:"email"}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.unique,Z.maxLength,Z.minLength,Z.private]}]}},enumeration(e){return{sections:[{sectionTitle:null,items:[{name:"default",type:"select",intlLabel:{id:(0,u.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},validations:{},options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"}}},...(e.enum||[]).filter((n,s)=>e.enum.indexOf(n)===s&&n).map(n=>({key:n,value:n,metadatas:{intlLabel:{id:`${n}.no-override`,defaultMessage:n}}}))]},{intlLabel:{id:(0,u.Z)("form.attribute.item.enumeration.graphql"),defaultMessage:"Name override for GraphQL"},name:"enumName",type:"text",validations:{},description:{id:(0,u.Z)("form.attribute.item.enumeration.graphql.description"),defaultMessage:"Allows you to override the default generated name for GraphQL"}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private]}]}},json(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private]}]}},media(){return{sections:[{sectionTitle:null,items:[{intlLabel:{id:(0,u.Z)("form.attribute.media.allowed-types"),defaultMessage:"Select allowed types of media"},name:"allowedTypes",type:"allowed-types-select",size:7,value:"",validations:{}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.private]}]}},number(e){const n=e.type==="decimal"||e.type==="float"?"any":1;return{sections:[{sectionTitle:null,items:[{autoFocus:!0,name:"default",type:e.type==="biginteger"?"text":"number",step:n,intlLabel:{id:(0,u.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},validations:{}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.unique,Z.max,Z.min,Z.private]}]}},password(){return{sections:[{sectionTitle:null,items:[Z.default]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.maxLength,Z.minLength,Z.private]}]}},relation(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.private]}]}},richtext(){return{sections:[{sectionTitle:null,items:[Z.default]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.maxLength,Z.minLength,Z.private]}]}},text(){return{sections:[{sectionTitle:null,items:[Z.default,Z.regex]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.unique,Z.maxLength,Z.minLength,Z.private]}]}},uid(e){return{sections:[{sectionTitle:null,items:[{...Z.default,disabled:Boolean(e.targetField),type:"text"}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[Z.required,Z.maxLength,Z.minLength,Z.private]}]}}};const fe={name:"name",type:"text",intlLabel:{id:"global.name",defaultMessage:"Name"},description:{id:(0,u.Z)("modalForm.attribute.form.base.name.description"),defaultMessage:"No space is allowed for the name of the attribute"}};var fs={component(e,n){if(n==="1"){const s=e.createComponent===!0?qe.base("componentToCreate."):[];return{sections:[{sectionTitle:null,items:[zt]},...s]}}return{sections:[{sectionTitle:null,items:[fe,{name:"component",type:"select-component",intlLabel:{id:(0,u.Z)("modalForm.attributes.select-component"),defaultMessage:"Select a component"},isMultiple:!1}]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"repeatable",type:"boolean-radio-group",size:12,radios:[{title:{id:(0,u.Z)("form.attribute.component.option.repeatable"),defaultMessage:"Repeatable component"},description:{id:(0,u.Z)("form.attribute.component.option.repeatable.description"),defaultMessage:"Best for multiple instances (array) of ingredients, meta tags, etc.."},value:!0},{title:{id:(0,u.Z)("form.attribute.component.option.single"),defaultMessage:"Single component"},description:{id:(0,u.Z)("form.attribute.component.option.single.description"),defaultMessage:"Best for grouping fields like full address, main information, etc..."},value:!1}]}]}]}},date(){return{sections:[{sectionTitle:null,items:[fe,{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",type:"select-date",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"},hidden:!0}},{key:"date",value:"date",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.date.type.date"),defaultMessage:"date (ex: 01/01/{currentYear})",values:{currentYear:new Date().getFullYear()}}}},{key:"datetime",value:"datetime",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.date.type.datetime"),defaultMessage:"datetime (ex: 01/01/{currentYear} 00:00 AM)",values:{currentYear:new Date().getFullYear()}}}},{key:"time",value:"time",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.date.type.time"),defaultMessage:"time (ex: 00:00 AM)"}}}]}]}]}},enumeration(){return{sections:[{sectionTitle:null,items:[fe]},{sectionTitle:null,items:[{name:"enum",type:"textarea-enum",size:6,intlLabel:{id:(0,u.Z)("form.attribute.item.enumeration.rules"),defaultMessage:"Values (one line per value)"},placeholder:{id:(0,u.Z)("form.attribute.item.enumeration.placeholder"),defaultMessage:`Ex:
|
|
124
|
+
morning
|
|
125
|
+
noon
|
|
126
|
+
evening`},validations:{required:!0}}]}]}},media(){return{sections:[{sectionTitle:null,items:[fe]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"multiple",size:12,type:"boolean-radio-group",radios:[{title:{id:(0,u.Z)("form.attribute.media.option.multiple"),defaultMessage:"Multiple media"},description:{id:(0,u.Z)("form.attribute.media.option.multiple.description"),defaultMessage:"Best for sliders, carousels or multiple files download"},value:!0},{title:{id:(0,u.Z)("form.attribute.media.option.single"),defaultMessage:"Single media"},description:{id:(0,u.Z)("form.attribute.media.option.single.description"),defaultMessage:"Best for avatar, profile picture or cover"},value:!1}]}]}]}},number(){return{sections:[{sectionTitle:null,items:[fe,{intlLabel:{id:(0,u.Z)("form.attribute.item.number.type"),defaultMessage:"Number format"},name:"type",type:"select-number",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"},hidden:!0}},{key:"integer",value:"integer",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.number.type.integer"),defaultMessage:"integer (ex: 10)"}}},{key:"biginteger",value:"biginteger",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.number.type.biginteger"),defaultMessage:"biginteger (ex: 123456789)"}}},{key:"decimal",value:"decimal",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.number.type.decimal"),defaultMessage:"decimal (ex: 2.22)"}}},{key:"float",value:"float",metadatas:{intlLabel:{id:(0,u.Z)("form.attribute.item.number.type.float"),defaultMessage:"decimal (ex: 3.3333333)"}}}]}]}]}},relation(){return{sections:[{sectionTitle:null,items:[{intlLabel:{id:"FIXME",defaultMessage:"FIXME"},name:"relation",size:12,type:"relation"}]}]}},string(){return{sections:[{sectionTitle:null,items:[fe]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",size:12,type:"radio-group",radios:[{title:{id:(0,u.Z)("form.attribute.text.option.short-text"),defaultMessage:"Sort text"},description:{id:(0,u.Z)("form.attribute.text.option.short-text.description"),defaultMessage:"Best for titles, names, links (URL). It also enables exact search on the field."},value:"string"},{title:{id:(0,u.Z)("form.attribute.text.option.long-text"),defaultMessage:"Long text"},description:{id:(0,u.Z)("form.attribute.text.option.long-text.description"),defaultMessage:"Best for descriptions, biography. Exact search is disabled."},value:"text"}]}]}]}},text(){return{sections:[{sectionTitle:null,items:[fe]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",size:12,type:"radio-group",radios:[{title:{id:(0,u.Z)("form.attribute.text.option.short-text"),defaultMessage:"Sort text"},description:{id:(0,u.Z)("form.attribute.text.option.short-text.description"),defaultMessage:"Best for titles, names, links (URL). It also enables exact search on the field."},value:"string"},{title:{id:(0,u.Z)("form.attribute.text.option.long-text"),defaultMessage:"Long text"},description:{id:(0,u.Z)("form.attribute.text.option.long-text.description"),defaultMessage:"Best for descriptions, biography. Exact search is disabled."},value:"text"}]}]}]}},uid(e,n,s){const i=s.filter(({type:o})=>["string","text"].includes(o)).map(({name:o})=>({key:o,value:o,metadatas:{intlLabel:{id:`${o}.no-override`,defaultMessage:o}}}));return{sections:[{sectionTitle:null,items:[{...fe,placeholder:{id:(0,u.Z)("modalForm.attribute.form.base.name.placeholder"),defaultMessage:"e.g. slug, seoUrl, canonicalUrl"}},{intlLabel:{id:(0,u.Z)("modalForm.attribute.target-field"),defaultMessage:"Attached field"},name:"targetField",type:"select",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"global.none",defaultMessage:"None"}}},...i]}]}]}}},Ln={advanced:gs,base:fs},ys={sections:[{sectionTitle:null,items:[fe]}]},bs=l(91815),hs=l.n(bs),vs=l(40791),Ts=l.n(vs),Vt=e=>Ts()(e,{decamelize:!1,lowercase:!1,separator:"_"}),Cs=l(78746),Kt=l.n(Cs);const In=/^[A-Za-z][_0-9A-Za-z]*$/,Dn=e=>({name:"attributeNameAlreadyUsed",message:C.I0.unique,test(n){return n?!e.includes(n):!1}}),Jo=(e,n,s)=>{const i=e?.schema?.attributes??{};return Object.keys(i).filter(o=>n?o!==s:!0)},Gt=e=>({name:"forbiddenAttributeName",message:(0,u.Z)("error.attributeName.reserved-name"),test(n){return n?!e.includes(n):!1}}),y={default:()=>b.Z_().nullable(),max:()=>b.Rx().integer().nullable(),min:()=>b.Rx().integer().when("max",(e,n)=>e?n.max(e,(0,u.Z)("error.validation.minSupMax")):n).nullable(),maxLength:()=>b.Rx().integer().positive((0,u.Z)("error.validation.positive")).nullable(),minLength:()=>b.Rx().integer().min(0).when("maxLength",(e,n)=>e?n.max(e,(0,u.Z)("error.validation.minSupMax")):n).nullable(),name(e,n){return b.Z_().test(Dn(e)).test(Gt(n)).matches(In,C.I0.regex).required(C.I0.required)},required:()=>b.O7(),type:()=>b.Z_().required(C.I0.required),unique:()=>b.O7().nullable()},Ht=(e,n)=>({name:y.name(e,n),type:y.type(),default:y.default(),unique:y.unique(),required:y.required(),maxLength:y.maxLength(),minLength:y.minLength(),regex:b.Z_().test({name:"isValidRegExpPattern",message:(0,u.Z)("error.validation.regex"),test(i){return new RegExp(i)!==null}}).nullable()}),Yt={name:"isMinSuperiorThanMax",message:(0,u.Z)("error.validation.minSupMax"),test(e){if(!e)return!0;const{max:n}=this.parent;return!n||Number.isNaN(Kt()(e))?!0:Kt()(n)>=Kt()(e)}};var Qt={date(e,n){const s={name:y.name(e,n),type:y.type()};return b.Ry(s)},datetime(e,n){const s={name:y.name(e,n),type:y.type()};return b.Ry(s)},time(e,n){const s={name:y.name(e,n),type:y.type()};return b.Ry(s)},default(e,n){const s={name:y.name(e,n),type:y.type()};return b.Ry(s)},biginteger(e,n){const s={name:y.name(e,n),type:y.type(),default:b.Z_().nullable().matches(/^-?\d*$/),unique:y.unique(),required:y.required(),max:b.Z_().nullable().matches(/^-?\d*$/,C.I0.regex),min:b.Z_().nullable().test(Yt).matches(/^-?\d*$/,C.I0.regex)};return b.Ry(s)},boolean(e,n){const s={name:y.name(e,n),default:b.O7().nullable(),required:y.required(),unique:y.unique()};return b.Ry(s)},component(e,n){const s={name:y.name(e,n),type:y.type(),required:y.required(),max:y.max(),min:y.min(),component:b.Z_().required(C.I0.required)};return b.Ry(s)},decimal(e,n){const s={name:y.name(e,n),type:y.type(),default:b.Rx(),required:y.required(),max:b.Rx(),min:b.Rx().test(Yt)};return b.Ry(s)},dynamiczone(e,n){const s={name:y.name(e,n),type:y.type(),required:y.required(),max:y.max(),min:y.min()};return b.Ry(s)},email(e,n){const s={name:y.name(e,n),type:y.type(),default:b.Z_().email().nullable(),unique:y.unique(),required:y.required(),maxLength:y.maxLength(),minLength:y.minLength()};return b.Ry(s)},enumeration(e,n){const s=/^[_A-Za-z][_0-9A-Za-z]*$/,i={name:b.Z_().test(Dn(e)).test(Gt(n)).matches(s,C.I0.regex).required(C.I0.required),type:y.type(),default:y.default(),unique:y.unique(),required:y.required(),enum:b.IX().of(b.Z_()).min(1,C.I0.min).test({name:"areEnumValuesUnique",message:(0,u.Z)("error.validation.enum-duplicate"),test(o){return!hs()(o.map(Vt).filter((d,c,m)=>m.indexOf(d)!==c)).length}}).test({name:"doesNotHaveEmptyValues",message:(0,u.Z)("error.validation.enum-empty-string"),test:o=>!o.map(Vt).some(r=>r==="")}).test({name:"doesMatchRegex",message:(0,u.Z)("error.validation.enum-regex"),test:o=>o.map(Vt).every(r=>s.test(r))}),enumName:b.Z_().nullable()};return b.Ry(i)},float(e,n){const s={name:y.name(e,n),type:y.type(),required:y.required(),default:b.Rx(),max:b.Rx(),min:b.Rx().test(Yt)};return b.Ry(s)},integer(e,n){const s={name:y.name(e,n),type:y.type(),default:b.Rx().integer(),unique:y.unique(),required:y.required(),max:y.max(),min:y.min()};return b.Ry(s)},json(e,n){const s={name:y.name(e,n),type:y.type(),required:y.required(),unique:y.unique()};return b.Ry(s)},media(e,n){const s={name:y.name(e,n),type:y.type(),multiple:b.O7(),required:y.required(),allowedTypes:b.IX().of(b.Z_().oneOf(["images","videos","files","audios"])).min(1).nullable()};return b.Ry(s)},password(e,n){const s={name:y.name(e,n),type:y.type(),default:y.default(),unique:y.unique(),required:y.required(),maxLength:y.maxLength(),minLength:y.minLength()};return b.Ry(s)},relation(e,n,s,{initialData:i,modifiedData:o}){const r={name:y.name(e,n),target:b.Z_().required(C.I0.required),relation:b.Z_().required(),type:b.Z_().required(),targetAttribute:b.Vo(()=>{const d=(0,Ot.Z)(o.relation,o.targetAttribute);if(d==="oneWay"||d==="manyWay")return b.Z_().nullable();let c=b.Z_().test(Gt(n)),g=[...s.map(({name:f})=>f),o.name].filter(f=>f!==i.targetAttribute);return c.matches(In,C.I0.regex).test({name:"forbiddenTargetAttributeName",message:(0,u.Z)("error.validation.relation.targetAttribute-taken"),test(f){return f?!g.includes(f):!1}}).required(C.I0.required)})};return b.Ry(r)},richtext(e,n){const s={name:y.name(e,n),type:y.type(),default:y.default(),unique:y.unique(),required:y.required(),maxLength:y.maxLength(),minLength:y.minLength()};return b.Ry(s)},string(e,n){const s=Ht(e,n);return b.Ry(s)},text(e,n){const s=Ht(e,n);return b.Ry(s)},uid(e,n){const s=Ht(e,n);return b.Ry(s)}};const qn={name:"displayName",type:"text",intlLabel:{id:(0,u.Z)("contentType.displayName.label"),defaultMessage:"Display name"}};var Xt={advanced:{default(){const e=[{intlLabel:{id:(0,u.Z)("contentType.draftAndPublish.label"),defaultMessage:"Draft & publish"},description:{id:(0,u.Z)("contentType.draftAndPublish.description"),defaultMessage:"Allows writing a draft version of an entry, before it is published"},name:"draftAndPublish",type:"toggle-draft-publish",validations:{}}];return window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)&&e.push({intlLabel:{id:(0,u.Z)("contentType.reviewWorkflows.label"),defaultMessage:"Review Workflows"},description:{id:(0,u.Z)("contentType.reviewWorkflows.description"),defaultMessage:"Allows having content in different review stages"},name:"reviewWorkflows",type:"toggle-review-workflows",validations:{}}),{sections:[{items:e}]}}},base:{create(){return{sections:[{sectionTitle:null,items:[qn,{description:{id:(0,u.Z)("contentType.apiId-singular.description"),defaultMessage:"Used to generate the API routes and databases tables/collections"},intlLabel:{id:(0,u.Z)("contentType.apiId-singular.label"),defaultMessage:"API ID (Singular)"},name:"singularName",type:"text-singular"},{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{description:{id:(0,u.Z)("contentType.apiId-plural.description"),defaultMessage:"Pluralized API ID"},intlLabel:{id:(0,u.Z)("contentType.apiId-plural.label"),defaultMessage:"API ID (Plural)"},name:"pluralName",type:"text-plural"}]}]}},edit(){return{sections:[{sectionTitle:null,items:[qn,{disabled:!0,description:{id:(0,u.Z)("contentType.apiId-singular.description"),defaultMessage:"Used to generate the API routes and databases tables/collections"},intlLabel:{id:(0,u.Z)("contentType.apiId-singular.label"),defaultMessage:"API ID (Singular)"},name:"singularName",type:"text"},{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{disabled:!0,description:{id:(0,u.Z)("contentType.apiId-plural.description"),defaultMessage:"Pluralized API ID"},intlLabel:{id:(0,u.Z)("contentType.apiId-plural.label"),defaultMessage:"API ID (Plural)"},name:"pluralName",type:"text"},{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"kind",type:"content-type-radio-group",size:12,radios:[{title:{id:(0,u.Z)("form.button.collection-type.name"),defaultMessage:"Collection Type"},description:{id:(0,u.Z)("form.button.collection-type.description"),defaultMessage:"Best for multiple instances like articles, products, comments, etc."},value:"collectionType"},{title:{id:(0,u.Z)("form.button.single-type.name"),defaultMessage:"Single Type"},description:{id:(0,u.Z)("form.button.single-type.description"),defaultMessage:"Best for single instance like about us, homepage, etc."},value:"singleType"}]}]}]}}}},Ms=({usedContentTypeNames:e=[],reservedModels:n=[],singularNames:s=[],pluralNames:i=[]})=>{const o={displayName:b.Z_().test({name:"nameAlreadyUsed",message:C.I0.unique,test(r){if(!r)return!1;const d=(0,De.E)(r);return!e.includes(d)}}).test({name:"nameNotAllowed",message:(0,u.Z)("error.contentTypeName.reserved-name"),test(r){return r?!n.includes(r?.trim()?.toLowerCase()):!1}}).required(C.I0.required),pluralName:b.Z_().test({name:"pluralNameAlreadyUsed",message:C.I0.unique,test(r){return r?!i.includes(r):!1}}).test({name:"pluralAndSingularAreUnique",message:(0,u.Z)("error.contentType.pluralName-used"),test(r,d){return r?d.parent.singularName!==r:!1}}).test({name:"pluralNameNotAllowed",message:(0,u.Z)("error.contentTypeName.reserved-name"),test(r){return r?!n.includes(r?.trim()?.toLowerCase()):!1}}).required(C.I0.required),singularName:b.Z_().test({name:"singularNameAlreadyUsed",message:C.I0.unique,test(r){return r?!s.includes(r):!1}}).test({name:"pluralAndSingularAreUnique",message:(0,u.Z)("error.contentType.singularName-used"),test(r,d){return r?d.parent.pluralName!==r:!1}}).test({name:"singularNameNotAllowed",message:(0,u.Z)("error.contentTypeName.reserved-name"),test(r){return r?!n.includes(r?.trim()?.toLowerCase()):!1}}).required(C.I0.required),draftAndPublish:b.O7(),kind:b.Z_().oneOf(["singleType","collectionType"]),reviewWorkflows:b.O7()};return b.Ry(o)},Jt={advanced:{default(){return{sections:qe.advanced("componentToCreate.")}}},base:{createComponent(){return{sections:[{sectionTitle:null,items:[zt]},...qe.base("componentToCreate.")]}},default(){return{sections:[{sectionTitle:null,items:[zt]},{sectionTitle:null,items:[{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{name:"components",type:"select-components",intlLabel:{id:(0,u.Z)("modalForm.attributes.select-components"),defaultMessage:"Select the components"},isMultiple:!0}]}]}}}},Pn=(e,n)=>{e.forEach(s=>{if(!("sectionTitle"in s)){n[0].items.push(s);return}n.push(s)})},kn=(e,n)=>e.filter(({name:s})=>s!==n.initialData.name).map(({name:s})=>s),Ae={customField:{schema({schemaAttributes:e,attributeType:n,customFieldValidator:s,reservedNames:i,schemaData:o,ctbFormsAPI:r}){const d=kn(e,o),c=Qt[n](d,i.attributes);return r.makeCustomFieldValidator(c,s,d,i.attributes,o)},form:{base({customField:e}){const n=[{sectionTitle:null,items:[fe]}];return e.options?.base&&Pn(e.options.base,n),{sections:n}},advanced({customField:e,data:n,step:s,extensions:i,...o}){const r=[{sectionTitle:null,items:[]}],d=i.getAdvancedForm(["attribute",e.type],{data:n,type:e.type,step:s,...o});if(e.options?.advanced&&Pn(e.options.advanced,r),d){const c={sectionTitle:{id:(0,u.Z)("modalForm.custom-fields.advanced.settings.extended"),defaultMessage:"Extended settings"},items:d};r.push(c)}return{sections:r}}}},attribute:{schema(e,n,s,i,o,r){const d=T()(e,["schema","attributes"],[]),c=kn(d,o);try{let m=Qt[n](c,s.attributes,i,o);return r.makeValidator(["attribute",n],m,c,s.attributes,i,o)}catch(m){return console.error("Error yup build schema",m),Qt.default(c,s.attributes)}},form:{advanced({data:e,type:n,step:s,extensions:i,...o}){try{const r=Ln.advanced[n](e,s).sections,d=i.getAdvancedForm(["attribute",n],{data:e,type:n,step:s,...o});return{sections:r.reduce((m,g)=>(g.sectionTitle===null?m.push(g):m.push({...g,items:[...g.items,...d]}),m),[])}}catch(r){return console.error(r),{sections:[]}}},base({data:e,type:n,step:s,attributes:i}){try{return Ln.base[n](e,s,i)}catch{return ys}}}},contentType:{schema(e,n,s,i,o,r){const d=Object.values(r).map(v=>v.schema.singularName),c=Object.values(r).map(v=>T()(v,["schema","pluralName"],"")),m=n?e.filter(v=>v!==s):e,g=n?d.filter(v=>T()(r,[s,"schema","singularName"],"")!==v):d,f=n?c.filter(v=>T()(r,[s,"schema","pluralName"],"")!==v):c,p=Ms({usedContentTypeNames:m,reservedModels:i.models,singularNames:g,pluralNames:f});return o.makeValidator(["contentType"],p,m,i.models,g,f)},form:{base({actionType:e}){return e==="create"?Xt.base.create():Xt.base.edit()},advanced({extensions:e}){const n=Xt.advanced.default().sections.map(i=>i.items).flat(),s=e.getAdvancedForm(["contentType"]);return{sections:[{items:[...n,...s]}]}}}},component:{schema(e,n,s,i=!1,o=null){const r=i?e.filter(d=>d!==o):e;return ps(r,s.models,n)},form:{advanced(){return{sections:qe.advanced()}},base(){return{sections:qe.base()}}}},addComponentToDynamicZone:{form:{advanced(){return Jt.advanced.default()},base({data:e}){return T()(e,"createComponent",!1)?Jt.base.createComponent():Jt.base.default()}}},editCategory:{schema(e,n){const s=e.filter(i=>i!==n.name).map(i=>je()(i));return ms(s)},form:{advanced:()=>({sections:[]}),base(){return cs.base}}}},$n=l(98178),Es=l(25061);const Rs=()=>e=>e[`${w.Z}_formModal`]||Es.E;var Zs=()=>(0,$n.P1)(Rs(),e=>e),As=()=>{const{onCloseModal:e,onNavigateToChooseAttributeModal:n,onNavigateToAddCompoToDZModal:s,onNavigateToCreateComponentStep2:i,actionType:o,attributeName:r,attributeType:d,customFieldUid:c,categoryName:m,dynamicZoneTarget:g,forTarget:f,modalType:p,isOpen:v,kind:h,step:S,targetUid:F}=(0,Te.Z)(),L=(0,C.mZ)().get(c),E=(0,a.useRef)(),M=(0,a.useMemo)(Zs,[]),A=(0,ve.I0)(),U=(0,C.lm)(),z=(0,ve.v9)(q=>M(q),ve.wU),{push:J}=(0,B.k6)(),{trackUsage:ne}=(0,C.rS)(),{formatMessage:I}=(0,P.Z)(),{getPlugin:ge}=(0,C.j1)(),V=ge(w.Z).apis.forms,ye=V.components.inputs,{addAttribute:K,addCustomFieldAttribute:Pe,addCreatedComponentToDynamicZone:te,allComponentsCategories:W,changeDynamicZoneComponents:R,contentTypes:ke,components:Ke,createSchema:$e,deleteCategory:en,deleteData:ot,editCategory:tn,editCustomFieldAttribute:nn,submitData:an,modifiedData:ae,nestedComponents:sn,setModifiedData:on,sortedContentTypesList:rn,updateSchema:ln,reservedNames:Me}=(0,Ze.Z)(),{componentToCreate:Ge,formErrors:Ee,initialData:ie,isCreatingComponentWhileAddingAField:xe,modifiedData:O}=z,x=f==="contentType"||f==="component"?[f]:[f,F];(0,a.useEffect)(()=>{if(v){const q=rn.filter(mn);p==="editCategory"&&on(),o==="edit"&&p==="attribute"&&f==="contentType"&&ne("willEditFieldOfContentType");const ue=[...x,"schema","attributes"],me=Ut(T()(ae,ue,[]),g)||null;if(p==="editCategory"&&o==="edit"&&A({type:Q._H,modalType:p,actionType:o,data:{name:m}}),p==="contentType"&&o==="create"&&A({type:Q._H,modalType:p,actionType:o,data:{draftAndPublish:!0,reviewWorkflows:!1},pluginOptions:{}}),p==="contentType"&&o==="edit"){const{displayName:k,draftAndPublish:_,kind:pe,pluginOptions:se,pluralName:xo,reviewWorkflows:So,singularName:Fo}=T()(ae,[...x,"schema"],{displayName:null,pluginOptions:{},singularName:null,pluralName:null});A({type:Q._H,actionType:o,modalType:p,data:{displayName:k,draftAndPublish:_,kind:pe,pluginOptions:se,pluralName:xo,reviewWorkflows:So??!1,singularName:Fo}})}if(p==="component"&&o==="edit"){const k=T()(ae,x,{});A({type:Q._H,actionType:o,modalType:p,data:{displayName:k.schema.displayName,category:k.category}})}if(p==="addComponentToDynamicZone"&&o==="edit"){const k={...me,components:[],name:g,createComponent:!1,componentToCreate:{type:"component"}};A({type:Q.VZ,attributeToEdit:k})}if(d){const _={...Ut(T()(ae,ue,[]),r),name:r};d==="component"&&o==="edit"&&(_.repeatable||Qe()(_,"repeatable",!1)),A(p==="customField"?{type:Q.OY,customField:L,isEditing:o==="edit",modifiedDataToSetForEditing:_,forTarget:f}:{type:Q.S0,attributeType:d,nameToSetForRelation:T()(q,["0","title"],"error"),targetUid:T()(q,["0","uid"],"error"),isEditing:o==="edit",modifiedDataToSetForEditing:_,step:S,forTarget:f})}}else A({type:Q.c2})},[o,r,d,m,g,f,v,p]);const N=p==="contentType",D=p==="component",H=p==="attribute",re=p==="customField",le=d==="component"&&H,de=o==="create",be=T()(O,"createComponent",!1)||xe,Ue=S==="1",Jn=p==="editCategory",_n=p==="chooseAttribute",un=(0,De.E)(O.displayName||""),dn=T()(ae,[...x,"schema","attributes"],null),po=async()=>{let q;const ue=be&&S==="1"?T()(O,"componentToCreate",{}):O;if(N)q=Ae.contentType.schema(Object.keys(ke),o==="edit",T()(ae,[...x,"uid"],null),Me,V,ke);else if(D)q=Ae.component.schema(Object.keys(Ke),O.category||"",Me,o==="edit",T()(ae,[...x,"uid"],null),V);else if(re)q=Ae.customField.schema({schemaAttributes:T()(ae,[...x,"schema","attributes"],[]),attributeType:L.type,reservedNames:Me,schemaData:{modifiedData:O,initialData:ie},ctbFormsAPI:V,customFieldValidator:L.options?.validator});else if(le&&be&&Ue)q=Ae.component.schema(Object.keys(Ke),T()(O,"componentToCreate.category",""),Me,V);else if(H&&!Ue){const me=d==="relation"?"relation":O.type;let k=[];if(me==="relation"){const _=T()(O,["target"],null);k=T()(ke,[_,"schema","attributes"],[]).filter(({name:se})=>o!=="edit"?!0:se!==ie.targetAttribute)}q=Ae.attribute.schema(T()(ae,x,{}),me,Me,k,{modifiedData:O,initialData:ie},V)}else if(Jn)q=Ae.editCategory.schema(W,ie,V);else if(Ue&&be)q=Ae.component.schema(Object.keys(Ke),T()(O,"componentToCreate.category",""),Me,V);else return;await q.validate(ue,{abortEarly:!1})},ea=(0,a.useCallback)(({target:{name:q,value:ue,type:me,...k}})=>{const _=["enumName","max","min","maxLength","minLength","regex","default"];let pe;_.includes(q)&&ue===""?pe=null:pe=ue;const se=Object.assign({},Ee);q==="max"&&delete se.min,q==="maxLength"&&delete se.minLength,delete se[q],A({type:Q.Ey,errors:se}),A({type:Q.P0,keys:q.split("."),value:pe,...k})},[A,Ee]),ce=async(q,ue=de)=>{q.preventDefault();try{await po(),yo(ue);const me=f==="components"?F:un;if(N)if(de)$e({...O,kind:h},p,un),J({pathname:`/plugins/${w.Z}/content-types/${un}`}),n({forTarget:f,targetUid:me});else{us(ae,O)?(e(),an(O)):U({type:"warning",message:{id:"notification.contentType.relations.conflict"}});return}else if(p==="component")if(de){const k=(0,De.N)(O.displayName,O.category),{category:_,...pe}=O;$e(pe,"component",k,_),J({pathname:`/plugins/${w.Z}/component-categories/${_}/${k}`}),n({forTarget:f,targetUid:k})}else{ln(O,p,F),e();return}else if(Jn){if(je()(ie.name)===je()(O.name)){e();return}tn(ie.name,O);return}else if(re){const k={attributeToSet:{...O,customField:c},forTarget:f,targetUid:F,initialAttribute:ie};o==="edit"?nn(k):Pe(k),ue?n({forTarget:f,targetUid:me}):e();return}else if(H&&!be){if(d==="dynamiczone"){K(O,f,F,o==="edit",ie),de?(A({type:Q.I}),E.current._handlers.setSelectedTabIndex(0),s({dynamicZoneTarget:O.name})):e();return}if(!le){K(O,f,F,o==="edit",ie),ue?n({forTarget:f,targetUid:me}):e();return}if(Ue){i(),A({type:Q.yC,forTarget:f});return}K(O,f,F,o==="edit",ie,!0),ue?n({forTarget:f,targetUid:F}):e()}else if(H&&be){if(Ue){ne("willCreateComponentFromAttributesModal"),A({type:Q.oF,forTarget:f}),i();return}const{category:k,type:_,...pe}=Ge,se=(0,De.N)(Ge.displayName,k);$e(pe,_,se,k,be),K(O,f,F,!1),A({type:Q.c2}),ue?n({forTarget:"components",targetUid:se}):e();return}else{if(Ue)if(be){const{category:k,type:_,...pe}=O.componentToCreate,se=(0,De.N)(O.componentToCreate.displayName,k);$e(pe,_,se,k,be),te(g,[se]),n({forTarget:"components",targetUid:se})}else R(g,O.components),e();else console.error("This case is not handled");return}A({type:Q.c2})}catch(me){const k=(0,C.CJ)(me);console.log({err:me,errors:k}),A({type:Q.Ey,errors:k})}},go=()=>{window.confirm(I({id:"window.confirm.close-modal.file",defaultMessage:"Are you sure? Your changes will be lost."}))&&(e(),A({type:Q.c2}))},ta=()=>{gt()(O,ie)?(e(),A({type:Q.c2})):go()},fo=q=>{if(q==="advanced"){if(N){ne("didSelectContentTypeSettings");return}f==="contentType"&&ne("didSelectContentTypeFieldSettings")}},yo=q=>{p==="attribute"&&f==="contentType"&&d!=="dynamiczone"&&q&&ne("willAddMoreFieldToContentType")},bo=()=>!!(p==="editCategory"||p==="component"||Je()(O,"createComponent")),ho=ds(f,F,sn);if(!v||!p)return null;const na=T()(Ae,[p,"form"],{advanced:()=>({sections:[]}),base:()=>({sections:[]})}),vo=f==="components"||f==="component",aa={customInputs:{"allowed-types-select":da,"boolean-radio-group":Ia,"checkbox-with-number-field":qa,"content-type-radio-group":Pa,"radio-group":St,relation:Xa,"select-category":ts,"select-component":ns,"select-components":as,"select-default-boolean":Na,"select-number":os,"select-date":ss,"toggle-draft-publish":Ra,"toggle-review-workflows":Za,"text-plural":Ja,"text-singular":is,"textarea-enum":ls,...ye},componentToCreate:Ge,dynamicZoneTarget:g,formErrors:Ee,isAddingAComponentToAnotherComponent:vo,isCreatingComponentWhileAddingAField:xe,mainBoxHeader:T()(ae,[...x,"schema","displayName"],""),modifiedData:O,naturePickerType:f,isCreating:de,targetUid:F,forTarget:f},sa=na.advanced({data:O,type:d,step:S,actionType:o,attributes:dn,extensions:V,forTarget:f,contentTypeSchema:ae.contentType||{},customField:L}).sections,oa=na.base({data:O,type:d,step:S,actionType:o,attributes:dn,extensions:V,forTarget:f,contentTypeSchema:ae.contentType||{},customField:L}).sections,To=Nn(oa),Co=Nn(sa),Mo=Object.keys(Ee).some(q=>To.includes(q)),Eo=Object.keys(Ee).some(q=>Co.includes(q)),Ro=T()(ke,[F,"schema","kind"]),Zo=()=>o==="edit"&&dn.every(({name:q})=>q!==O?.name),Ao=()=>{Zo()&&ne("didEditFieldNameOnContentType")};return a.createElement(mt.P,{onClose:ta,labelledBy:"title"},a.createElement(Aa,{actionType:o,attributeName:r,categoryName:m,contentTypeKind:h,dynamicZoneTarget:g,modalType:p,forTarget:f,targetUid:F,attributeType:d,customFieldUid:c}),_n&&a.createElement(Ea,{attributes:ho,forTarget:f,kind:Ro||"collectionType"}),!_n&&a.createElement("form",{onSubmit:ce},a.createElement(we.f,null,a.createElement(ze.v,{label:"todo",id:"tabs",variant:"simple",ref:E,onTabChange:q=>{q===1&&fo("advanced")}},a.createElement($.k,{justifyContent:"space-between"},a.createElement(Fa,{actionType:o,forTarget:f,kind:h,step:S,modalType:p,attributeType:d,attributeName:r,customField:L}),a.createElement(Oe.m,null,a.createElement(Oe.O,{hasError:Mo},I({id:(0,u.Z)("popUpForm.navContainer.base"),defaultMessage:"Basic settings"})),a.createElement(Oe.O,{hasError:Eo,disabled:bo()},I({id:(0,u.Z)("popUpForm.navContainer.advanced"),defaultMessage:"Advanced settings"})))),a.createElement(pt.i,null),a.createElement(j.x,{paddingTop:6},a.createElement(Le.n,null,a.createElement(Le.x,null,a.createElement($.k,{direction:"column",alignItems:"stretch",gap:6},a.createElement(Fn,{form:oa,formErrors:Ee,genericInputProps:aa,modifiedData:O,onChange:ea}))),a.createElement(Le.x,null,a.createElement($.k,{direction:"column",alignItems:"stretch",gap:6},a.createElement(Fn,{form:sa,formErrors:Ee,genericInputProps:aa,modifiedData:O,onChange:ea}))))))),a.createElement(ia.m,{endActions:a.createElement(xa,{deleteCategory:en,deleteContentType:ot,deleteComponent:ot,categoryName:ie.name,isAttributeModal:p==="attribute",isCustomFieldModal:p==="customField",isComponentToDzModal:p==="addComponentToDynamicZone",isComponentAttribute:d==="component",isComponentModal:p==="component",isContentTypeModal:p==="contentType",isCreatingComponent:o==="create",isCreatingDz:o==="create",isCreatingComponentAttribute:O.createComponent||!1,isCreatingComponentInDz:O.createComponent||!1,isCreatingComponentWhileAddingAField:xe,isCreatingContentType:o==="create",isEditingAttribute:o==="edit",isDzAttribute:d==="dynamiczone",isEditingCategory:p==="editCategory",isInFirstComponentStep:S==="1",onSubmitAddComponentAttribute:ce,onSubmitAddComponentToDz:ce,onSubmitCreateComponent:ce,onSubmitCreateContentType:ce,onSubmitCreateDz:ce,onSubmitEditAttribute:ce,onSubmitEditCategory:ce,onSubmitEditComponent:ce,onSubmitEditContentType:ce,onSubmitEditCustomFieldAttribute:ce,onSubmitEditDz:ce,onClickFinish:Ao}),startActions:a.createElement(Y.z,{variant:"tertiary",onClick:ta},I({id:"app.components.Button.cancel",defaultMessage:"Cancel"}))})))},Un=e=>e.reduce((n,s)=>(n[s.uid]=s,n),{}),xs=(e,n,s,i)=>{const o=n.reduce((c,m)=>{const g=T()(s,m,{});return c[m]=g,c},{});return{[i?"contentType":"component"]:e,components:o}},Ss=(e,n)=>{const s=Object.keys(e).map(i=>T()(e,[i,...n],""));return(0,Re.Z)(s)},Fs=l(13339);const Ns=e=>{const n=Object.keys(e).reduce((s,i)=>{const o=e?.[i]?.schema?.attributes??[],r=Os(o);return[...s,...r]},[]);return(0,Re.Z)(n)},Os=e=>e.reduce((n,s)=>{const{type:i,component:o}=s;return i==="component"&&n.push(o),n},[]);var Wn=Ns;const Ls=e=>{const n=Object.keys(e).reduce((s,i)=>{const o=T()(e,[i],{}),r=o.uid;return Is(o)&&s.push(r),s},[]);return(0,Re.Z)(n)},Is=e=>T()(e,["schema","attributes"],[]).some(s=>{const{type:i}=s;return i==="component"});var Ds=l(9086),Bn=l.n(Ds),qs=l(98978),Ps=l.n(qs),ks=l(39935),$s=l.n(ks);const Us=(e,n)=>{const s=Object.keys(e).filter(i=>{const o=T()(e,i,{}),r=T()(n,i,{}),d=T()(o,["isTemporary"],!1),c=!gt()(o,r);return d||c});return(0,Re.Z)(s)},Ws=(e,n)=>{const s=wn(T()(e,"schema.attributes",[]),n),i=T()(e,"isTemporary",!1)?{tmpUID:e.uid}:{uid:e.uid};return Object.assign({},i,{category:e.category},Bn()(e.schema,"attributes"),{attributes:s})},jn=(e,n=!1)=>{const s=T()(e,"uid",null),i=wn(T()(e,"schema.attributes",[]),s),o=n?{category:T()(e,"category","")}:{},r=Object.assign(o,Bn()(e.schema,"attributes"),{attributes:i});return delete r.uid,delete r.isTemporary,delete r.visible,delete r.restrictRelationsTo,r},wn=(e,n)=>e.reduce((s,{name:i,...o})=>{const r=o,d=r.target===n,c=r.type==="relation",m=T()(r,"targetAttribute",null);if(!d)if(c){const g=Object.assign({},r,{targetAttribute:zn(m)});s[i]=st(g)}else s[i]=st(r);if(d){const g=r.target,f=Object.assign({},r,{target:g,targetAttribute:zn(m)});s[i]=st(f)}if(r.customField){const g={...r,type:"customField"};s[i]=st(g)}return s},{}),zn=e=>e==="-"?null:e,st=e=>Object.keys(e).reduce((n,s)=>(e[s]!==null&&s!=="plugin"&&(n[s]=e[s]),n),{}),Bs=(e,n,s,i=!1)=>Us(e,n).map(d=>{const c=T()(e,d,{});return Ws(c,s,i)}),js=e=>Ps()(Object.keys(e).map(n=>({visible:e[n].schema.visible,name:n,title:e[n].schema.displayName,plugin:e[n].plugin||null,uid:n,to:`/plugins/${w.Z}/content-types/${n}`,kind:e[n].schema.kind,restrictRelationsTo:e[n].schema.restrictRelationsTo})).filter(n=>n!==null),n=>$s()(n.title)),Vn="did-not-kill-server",ws="server is down";function Ve(e,n){return new Promise(s=>{fetch(`${strapi.backendURL}/_health`,{method:"HEAD",mode:"no-cors",headers:{"Content-Type":"application/json","Keep-Alive":!1}}).then(i=>{if(i.status>=400)throw new Error(ws);if(!n)throw new Error(Vn);s(e)}).catch(i=>{setTimeout(()=>Ve(e,i.message!==Vn).then(s),100)})})}var zs=e=>Object.values(e.attributes).filter(({type:s})=>s==="dynamiczone").every(({components:s})=>Array.isArray(s)&&s.length>0),ee=l(31947),Vs=l(54370);const Ks=()=>e=>e[`${w.Z}_dataManagerProvider`]||Vs.E;var Gs=()=>(0,$n.P1)(Ks(),e=>e);const Hs=e=>Object.keys(e).reduce((n,s)=>{const i=e[s].schema;return n[s]={...e[s],schema:{...i,attributes:Ys(i.attributes)}},n},{}),Ys=e=>Object.keys(e).reduce((n,s)=>(n.push({...e[s],name:s}),n),[]);var Kn=Hs;const _t=({children:e,components:n,contentTypes:s,isLoading:i,isLoadingForDataToBeSet:o,initialData:r,modifiedData:d,reservedNames:c})=>{const m=(0,ve.I0)(),g=(0,C.lm)(),{lockAppWithAutoreload:f,unlockAppWithAutoreload:p}=(0,C.Vu)(),{setCurrentStep:v}=(0,C.c1)(),{getPlugin:h}=(0,C.j1)(),{apis:S}=h(w.Z),{autoReload:F}=(0,C.QI)(),{formatMessage:L}=(0,P.Z)(),{trackUsage:E}=(0,C.rS)(),{refetchPermissions:M}=(0,C.vn)(),{pathname:A}=(0,B.TH)(),{onCloseModal:U}=(0,Te.Z)(),z=(0,B.$B)(`/plugins/${w.Z}/content-types/:uid`),J=(0,B.$B)(`/plugins/${w.Z}/component-categories/:categoryUid/:componentUid`),ne=(0,C.kY)(),{put:I,post:ge,del:G}=ne,V=(0,a.useRef)();V.current=L;const ye=F,K=z!==null,Pe=K?"contentType":"component",te=K?T()(z,"params.uid",null):T()(J,"params.componentUid",null),W=(0,a.useRef)(),R=K?"content-types":"components";W.current=async()=>{try{const[{data:{data:x}},{data:{data:N}},{data:D}]=await Promise.all(["components","content-types","reserved-names"].map(be=>ne.get(`/${w.Z}/${be}`))),H=Un(x),re=Kn(H),le=Un(N),de=Kn(le);m({type:ee.Id,components:re,contentTypes:de,reservedNames:D})}catch(x){console.error({err:x}),g({type:"warning",message:{id:"notification.error"}})}},(0,a.useEffect)(()=>(W.current(),()=>{m({type:ee.Zl})}),[]),(0,a.useEffect)(()=>{!i&&te&&Me()},[i,A,te]),(0,a.useEffect)(()=>{F||g({type:"info",message:{id:(0,u.Z)("notification.info.autoreaload-disable")}})},[F,g]);const ke=(x,N,D,H=!1,re,le=!1)=>{const de=H?ee.JO:ee.gz;m({type:de,attributeToSet:x,forTarget:N,targetUid:D,initialAttribute:re,shouldAddComponentToData:le})},Ke=({attributeToSet:x,forTarget:N,targetUid:D,initialAttribute:H})=>{m({type:ee.Ir,attributeToSet:x,forTarget:N,targetUid:D,initialAttribute:H})},$e=({attributeToSet:x,forTarget:N,targetUid:D,initialAttribute:H})=>{m({type:ee.Ly,attributeToSet:x,forTarget:N,targetUid:D,initialAttribute:H})},en=(x,N)=>{m({type:ee.Uu,dynamicZoneTarget:x,componentsToAdd:N})},ot=(x,N,D,H,re=!1)=>{const le=N==="contentType"?ee.Sh:ee.VR;m({type:le,data:x,componentCategory:H,schemaType:N,uid:D,shouldAddComponentToData:re})},tn=(x,N)=>{m({type:ee.o_,dynamicZoneTarget:x,newComponents:N})},nn=(x,N,D="")=>{const H=x==="components"?ee.lw:ee.ai;x==="contentType"&&E("willDeleteFieldOfContentType"),m({type:H,mainDataKey:x,attributeToRemoveName:N,componentUid:D})},an=async x=>{try{const N=`/${w.Z}/component-categories/${x}`,D=window.confirm(L({id:(0,u.Z)("popUpWarning.bodyMessage.category.delete")}));U(),D&&(f(),await G(N),await Ve(!0),await p(),await xe())}catch(N){console.error({err:N}),g({type:"warning",message:{id:"notification.error"}})}finally{p()}},ae=async()=>{try{const x=`/${w.Z}/${R}/${te}`,N=T()(d,[Pe,"isTemporary"],!1),D=window.confirm(L({id:(0,u.Z)(`popUpWarning.bodyMessage.${K?"contentType":"component"}.delete`)}));if(U(),D){if(N){m({type:ee.Ap});return}f(),await G(x),await Ve(!0),await p(),await xe()}}catch(x){console.error({err:x}),g({type:"warning",message:{id:"notification.error"}})}finally{p()}},sn=async(x,N)=>{try{const D=`/${w.Z}/component-categories/${x}`;U(),f(),await I(D,N),await Ve(!0),await p(),await xe()}catch(D){console.error({err:D}),g({type:"warning",message:{id:"notification.error"}})}finally{p()}},on=()=>{const x=Object.assign({},n,d.components);if(!K){const D=T()(d,"component",{});Qe()(x,T()(D,["uid"],""),D)}const N=Ls(x);return(0,Re.Z)(N)},rn=()=>{const x=Wn(n),N=Wn(d.components||{});return(0,Re.Z)([...N,...x])},ln=(x,N)=>{m({type:ee.NG,dzName:x,componentToRemoveIndex:N})},Me=()=>{const x=K?s:n,N=T()(x,te,{schema:{attributes:[]}}),D=(0,Fs.Z)(N.schema.attributes,n),H=xs(N,D,n,K),re=T()(N,"isTemporary",!1)&&dt()(T()(N,"schema.attributes",[]))===0;m({type:ee.xx,schemaToSet:H,hasJustCreatedSchema:re})},Ge=(0,a.useMemo)(()=>{const x=K?s:n;return te==="create-content-type"?!1:!Object.keys(x).includes(te)&&!i},[n,s,te,K,i]),Ee=(0,a.useMemo)(()=>{const x=Object.keys(s).filter(N=>T()(s,[N,"schema","visible"],!0)).sort();return T()(x,"0","create-content-type")},[s]);if(Ge)return a.createElement(B.l_,{to:`/plugins/${w.Z}/content-types/${Ee}`});const ie=async x=>{try{const N=T()(d,[Pe,"isTemporary"],!1),D={components:Bs(d.components,n,te,N)};if(K){const le=S.forms.mutateContentTypeSchema({...jn(d.contentType),...x},r.contentType);if(!zs(le)){g({type:"warning",message:{id:(0,u.Z)("notification.error.dynamiczone-min.validation"),defaultMessage:"At least one component is required in a dynamic zone to be able to save a content type"}});return}D.contentType=le,E("willSaveContentType")}else D.component=jn(d.component,!0),E("willSaveComponent");f();const H=`/${w.Z}/${R}`,re=N?H:`${H}/${te}`;if(N?await ge(re,D):await I(re,D),await Ve(!0),await p(),N&&(r.contentType?.schema.kind==="collectionType"||r.contentType?.schema.kind==="singleType")&&v("contentTypeBuilder.success"),K){E("didSaveContentType");const le=T()(D,["contentType","schema","name"],""),de=T()(r,["contentType","schema","name"],"");!N&&le!==de&&E("didEditNameOfContentType")}else E("didSaveComponent");await xe()}catch(N){K||E("didNotSaveComponent"),console.error({err:N.response}),g({type:"warning",message:{id:"notification.error"}})}finally{p()}},xe=async()=>{await M()},O=(x,N,D)=>{m({type:ee.bi,data:x,schemaType:N,uid:D})};return a.createElement(ct.Z.Provider,{value:{addAttribute:ke,addCustomFieldAttribute:Ke,addCreatedComponentToDynamicZone:en,allComponentsCategories:Ss(n,["category"]),changeDynamicZoneComponents:tn,components:n,componentsGroupedByCategory:We()(n,"category"),componentsThatHaveOtherComponentInTheirAttributes:on(),contentTypes:s,createSchema:ot,deleteCategory:an,deleteData:ae,editCategory:sn,editCustomFieldAttribute:$e,isInDevelopmentMode:ye,initialData:r,isInContentTypeView:K,modifiedData:d,nestedComponents:rn(),removeAttribute:nn,removeComponentFromDynamicZone:ln,reservedNames:c,setModifiedData:Me,sortedContentTypesList:js(s),submitData:ie,updateSchema:O}},o?a.createElement(C.dO,null):a.createElement(a.Fragment,null,e,ye&&a.createElement(As,null)))};_t.defaultProps={components:{}},_t.propTypes={children:t().node.isRequired,components:t().object,contentTypes:t().object.isRequired,isLoading:t().bool.isRequired,isLoadingForDataToBeSet:t().bool.isRequired,initialData:t().object.isRequired,modifiedData:t().object.isRequired,reservedNames:t().object.isRequired};const Qs=Gs(),Xs=(0,ve.$j)(Qs,null);var Js=(0,Xe.compose)(Xs)((0,a.memo)(_t)),_s=l(51216);const Gn={actionType:null,attributeName:null,attributeType:null,categoryName:null,dynamicZoneTarget:null,forTarget:null,modalType:null,isOpen:!1,kind:null,step:null,targetUid:null,customFieldUid:null},Hn=({children:e})=>{const[n,s]=(0,a.useState)(Gn),{trackUsage:i}=(0,C.rS)(),o=({attributeType:E,customFieldUid:M})=>{s(A=>({...A,actionType:"create",modalType:"customField",attributeType:E,customFieldUid:M}))},r=({attributeType:E,step:M})=>{n.forTarget==="contentType"&&i("didSelectContentTypeFieldType",{type:E}),s(A=>({...A,actionType:"create",modalType:"attribute",step:M,attributeType:E}))},d=({dynamicZoneTarget:E,targetUid:M})=>{s(A=>({...A,dynamicZoneTarget:E,targetUid:M,modalType:"addComponentToDynamicZone",forTarget:"contentType",step:"1",actionType:"edit",isOpen:!0}))},c=({forTarget:E,targetUid:M})=>{s(A=>({...A,actionType:"create",forTarget:E,targetUid:M,modalType:"chooseAttribute",isOpen:!0}))},m=E=>{s(M=>({...M,...E,isOpen:!0}))},g=E=>{s(M=>({...M,categoryName:E,actionType:"edit",modalType:"editCategory",isOpen:!0}))},f=({forTarget:E,targetUid:M,attributeName:A,attributeType:U,customFieldUid:z})=>{s(J=>({...J,modalType:"customField",customFieldUid:z,actionType:"edit",forTarget:E,targetUid:M,attributeName:A,attributeType:U,isOpen:!0}))},p=({forTarget:E,targetUid:M,attributeName:A,attributeType:U,step:z})=>{s(J=>({...J,modalType:"attribute",actionType:"edit",forTarget:E,targetUid:M,attributeName:A,attributeType:U,step:z,isOpen:!0}))},v=({modalType:E,forTarget:M,targetUid:A,kind:U})=>{s(z=>({...z,modalType:E,actionType:"edit",forTarget:M,targetUid:A,kind:U,isOpen:!0}))},h=()=>{s(Gn)},S=({forTarget:E,targetUid:M})=>{s(A=>({...A,forTarget:E,targetUid:M,modalType:"chooseAttribute"}))},F=()=>{s(E=>({...E,attributeType:"component",modalType:"attribute",step:"2"}))},L=({dynamicZoneTarget:E})=>{s(M=>({...M,dynamicZoneTarget:E,modalType:"addComponentToDynamicZone",actionType:"create",step:"1",attributeType:null,attributeName:null}))};return a.createElement(_s.Z.Provider,{value:{...n,onClickSelectField:r,onClickSelectCustomField:o,onCloseModal:h,onNavigateToChooseAttributeModal:S,onNavigateToAddCompoToDZModal:L,onOpenModalAddComponentsToDZ:d,onNavigateToCreateComponentStep2:F,onOpenModalAddField:c,onOpenModalCreateSchema:m,onOpenModalEditCategory:g,onOpenModalEditField:p,onOpenModalEditCustomField:f,onOpenModalEditSchema:v,setFormModalNavigationState:s}},e)};Hn.propTypes={children:t().node.isRequired};var eo=Hn;const to=(0,a.lazy)(()=>l.e(5905).then(l.bind(l,69073)));var no=()=>{const{url:e}=(0,B.$B)(),{categoryUid:n}=(0,B.UO)();return a.createElement(a.Suspense,{fallback:a.createElement(C.dO,null)},a.createElement(B.rs,null,a.createElement(B.AW,{path:`${e}/:componentUid`},a.createElement(to,{categoryId:n}))))},Yn=l(14911),ao=l(7563),so=l(90700),oo=l(78090),io=l(77013),ro=l(79318),lo=l(28832),Qn=l(66618),uo=()=>{const{components:e,componentsGroupedByCategory:n,contentTypes:s,isInDevelopmentMode:i,sortedContentTypesList:o,modifiedData:r,initialData:d}=(0,Ze.Z)(),c=(0,C.lm)(),{trackUsage:m}=(0,C.rS)(),[g,f]=(0,a.useState)(""),{onOpenModalCreateSchema:p,onOpenModalEditCategory:v}=(0,Te.Z)(),{locale:h}=(0,P.Z)(),{startsWith:S}=(0,C.L0)(h,{sensitivity:"base"}),F=(0,C.Xe)(h,{sensitivity:"base"}),L=!Object.keys(s).some(I=>s[I].isTemporary===!0)&&!Object.keys(e).some(I=>e[I].isTemporary===!0)&>()(r,d),E=()=>{L?(m("willCreateContentType"),p({modalType:"contentType",kind:"collectionType",actionType:"create",forTarget:"contentType"})):U()},M=()=>{L?(m("willCreateSingleType"),p({modalType:"contentType",kind:"singleType",actionType:"create",forTarget:"contentType"})):U()},A=()=>{L?(m("willCreateComponent"),p({modalType:"component",kind:null,actionType:"create",forTarget:"component"})):U()},U=()=>{c({type:"info",message:{id:(0,u.Z)("notification.info.creating.notSaved"),defaultMessage:"Please save your work before creating a new collection type or component"}})},z=Object.entries(n).map(([I,ge])=>({name:I,title:I,isEditable:i,onClickEdit(G,V){G.stopPropagation(),L?v(V.name):U()},links:ge.map(G=>({name:G.uid,to:`/plugins/${w.Z}/component-categories/${I}/${G.uid}`,title:G.schema.displayName})).sort((G,V)=>F.compare(G.title,V.title))})).sort((I,ge)=>F.compare(I.title,ge.title)),J=o.filter(I=>I.visible);return{menu:[{name:"models",title:{id:`${(0,u.Z)("menu.section.models.name")}`,defaultMessage:"Collection Types"},customLink:i&&{id:`${(0,u.Z)("button.model.create")}`,defaultMessage:"Create new collection type",onClick:E},links:J.filter(I=>I.kind==="collectionType")},{name:"singleTypes",title:{id:`${(0,u.Z)("menu.section.single-types.name")}`,defaultMessage:"Single Types"},customLink:i&&{id:`${(0,u.Z)("button.single-types.create")}`,defaultMessage:"Create new single type",onClick:M},links:J.filter(I=>I.kind==="singleType")},{name:"components",title:{id:`${(0,u.Z)("menu.section.components.name")}`,defaultMessage:"Components"},customLink:i&&{id:`${(0,u.Z)("button.component.create")}`,defaultMessage:"Create a new component",onClick:A},links:z}].map(I=>I.links.some(G=>Array.isArray(G.links))?{...I,links:I.links.map(G=>{const V=G.links.filter(ye=>S(ye.title,g));return V.length===0?null:{...G,links:V.sort((ye,K)=>F.compare(ye.title,K.title))}}).filter(Boolean)}:{...I,links:I.links.filter(G=>S(G.title,g)).sort((G,V)=>F.compare(G.title,V.title))}),searchValue:g,onSearchChange:f}},co=()=>{const{menu:e,searchValue:n,onSearchChange:s}=uo(),{formatMessage:i}=(0,P.Z)();return a.createElement(so.m,{ariaLabel:i({id:`${(0,u.Z)("plugin.name")}`,defaultMessage:"Content-Types Builder"})},a.createElement(oo.p,{searchable:!0,value:n,onClear:()=>s(""),onChange:o=>s(o.target.value),label:i({id:`${(0,u.Z)("plugin.name")}`,defaultMessage:"Content-Types Builder"}),searchLabel:i({id:"global.search",defaultMessage:"Search"})}),a.createElement(io.Z,null,e.map(o=>a.createElement(a.Fragment,{key:o.name},a.createElement(ro.D,{label:i({id:o.title.id,defaultMessage:o.title.defaultMessage}),collapsable:!0,badgeLabel:o.links.length.toString()},o.links.map(r=>r.links?a.createElement(lo.z,{key:r.name,label:Ce()(r.title)},r.links.map(d=>a.createElement(Qn.E,{as:Yn.OL,to:d.to,active:d.active,key:d.name,isSubSectionChild:!0},Ce()(i({id:d.name,defaultMessage:d.title}))))):a.createElement(Qn.E,{as:Yn.OL,to:r.to,active:r.active,key:r.name},Ce()(i({id:r.name,defaultMessage:r.title}))))),o.customLink&&a.createElement(j.x,{paddingLeft:7},a.createElement(ao.A,{onClick:o.customLink.onClick,startIcon:a.createElement(yn.J,{as:Fe.Z,width:(0,C.Q1)(8),height:(0,C.Q1)(8)}),marginTop:2},i({id:o.customLink.id,defaultMessage:o.customLink.defaultMessage})))))))};const Xn=(0,a.lazy)(()=>l.e(5905).then(l.bind(l,69073)));var mo=()=>{const{formatMessage:e}=(0,P.Z)(),n=e({id:`${w.Z}.plugin.name`,defaultMessage:"Content Types Builder"}),{startSection:s}=(0,C.c1)(),i=(0,a.useRef)(s);return(0,a.useEffect)(()=>{i.current&&i.current("contentTypeBuilder")},[]),a.createElement(C.O4,{permissions:it.Z.main},a.createElement(he.q,{title:n}),a.createElement(eo,null,a.createElement(Js,null,a.createElement(Se.A,{sideNav:a.createElement(co,null)},a.createElement(a.Suspense,{fallback:a.createElement(C.dO,null)},a.createElement(B.rs,null,a.createElement(B.AW,{path:`/plugins/${w.Z}/content-types/create-content-type`,component:Xn}),a.createElement(B.AW,{path:`/plugins/${w.Z}/content-types/:uid`,component:Xn}),a.createElement(B.AW,{path:`/plugins/${w.Z}/component-categories/:categoryUid`,component:no})))))))}},92318:function(Ne,oe,l){var a=l(25158);const B=he=>`${a.Z}.${he}`;oe.Z=B}}]);
|