@clement_lores/adminjs 7.8.17
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/.babelrc.json +26 -0
- package/.cspell.json +16 -0
- package/.dockerignore +2 -0
- package/.eslintrc.cjs +116 -0
- package/.gitattributes +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +66 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +48 -0
- package/.github/workflows/push.yml +167 -0
- package/.prettierrc +21 -0
- package/.releaserc +29 -0
- package/CODE_OF_CONDUCT.md +49 -0
- package/CONTRIBUTING.md +122 -0
- package/LICENSE.md +7 -0
- package/README.md +71 -0
- package/UPGRADE-6.0.md +63 -0
- package/bin/app.js +3 -0
- package/bin/globals.js +3 -0
- package/cli.js +3 -0
- package/commitlint.config.cjs +5 -0
- package/cy/commands/ab-get-property.js +45 -0
- package/cy/commands/ab-keep-logged-in.js +20 -0
- package/cy/commands/ab-login-api.js +20 -0
- package/cy/commands/ab-login.js +19 -0
- package/cy/cypress.doc.md +38 -0
- package/cy/index.d.ts +20 -0
- package/cy/index.js +9 -0
- package/cy/readme.md +621 -0
- package/index.d.ts +14 -0
- package/index.js +9 -0
- package/lib/adminjs-options.interface.js +1 -0
- package/lib/adminjs.js +253 -0
- package/lib/adminjs.spec.js +117 -0
- package/lib/babel.test.config.json +24 -0
- package/lib/backend/actions/action.interface.js +1 -0
- package/lib/backend/actions/bulk-delete/bulk-delete-action.js +63 -0
- package/lib/backend/actions/bulk-delete/bulk-delete-action.spec.js +64 -0
- package/lib/backend/actions/delete/delete-action.js +72 -0
- package/lib/backend/actions/delete/delete-action.spec.js +85 -0
- package/lib/backend/actions/edit/edit-action.js +74 -0
- package/lib/backend/actions/index.js +24 -0
- package/lib/backend/actions/list/list-action.js +94 -0
- package/lib/backend/actions/new/new-action.js +67 -0
- package/lib/backend/actions/search/search-action.js +72 -0
- package/lib/backend/actions/show/show-action.js +36 -0
- package/lib/backend/adapters/database/base-database.js +40 -0
- package/lib/backend/adapters/database/index.js +1 -0
- package/lib/backend/adapters/index.js +4 -0
- package/lib/backend/adapters/property/base-property.js +182 -0
- package/lib/backend/adapters/property/index.js +1 -0
- package/lib/backend/adapters/record/base-record.js +305 -0
- package/lib/backend/adapters/record/base-record.spec.js +279 -0
- package/lib/backend/adapters/record/index.js +2 -0
- package/lib/backend/adapters/record/params.type.js +1 -0
- package/lib/backend/adapters/resource/base-resource.js +255 -0
- package/lib/backend/adapters/resource/base-resource.spec.js +96 -0
- package/lib/backend/adapters/resource/index.js +2 -0
- package/lib/backend/adapters/resource/supported-databases.type.js +1 -0
- package/lib/backend/bundler/app.bundler.js +33 -0
- package/lib/backend/bundler/components.bundler.js +47 -0
- package/lib/backend/bundler/generate-user-component-entry.js +33 -0
- package/lib/backend/bundler/generate-user-component-entry.spec.js +36 -0
- package/lib/backend/bundler/globals.bundler.js +46 -0
- package/lib/backend/bundler/index.js +6 -0
- package/lib/backend/bundler/utils/asset-bundler.js +112 -0
- package/lib/backend/bundler/utils/constants.js +6 -0
- package/lib/backend/controllers/api-controller.js +259 -0
- package/lib/backend/controllers/api-controller.spec.js +111 -0
- package/lib/backend/controllers/app-controller.js +101 -0
- package/lib/backend/controllers/index.js +2 -0
- package/lib/backend/decorators/action/action-decorator.js +285 -0
- package/lib/backend/decorators/action/action-decorator.spec.js +194 -0
- package/lib/backend/decorators/action/index.js +1 -0
- package/lib/backend/decorators/index.js +3 -0
- package/lib/backend/decorators/property/index.js +2 -0
- package/lib/backend/decorators/property/property-decorator.js +301 -0
- package/lib/backend/decorators/property/property-decorator.spec.js +184 -0
- package/lib/backend/decorators/property/property-options.interface.js +0 -0
- package/lib/backend/decorators/property/utils/index.js +1 -0
- package/lib/backend/decorators/property/utils/override-from-options.js +6 -0
- package/lib/backend/decorators/property/utils/override-from-options.spec.js +23 -0
- package/lib/backend/decorators/resource/index.js +2 -0
- package/lib/backend/decorators/resource/resource-decorator.js +282 -0
- package/lib/backend/decorators/resource/resource-decorator.spec.js +245 -0
- package/lib/backend/decorators/resource/resource-options.interface.js +1 -0
- package/lib/backend/decorators/resource/utils/decorate-actions.js +42 -0
- package/lib/backend/decorators/resource/utils/decorate-properties.js +98 -0
- package/lib/backend/decorators/resource/utils/decorate-properties.spec.js +221 -0
- package/lib/backend/decorators/resource/utils/find-sub-property.js +22 -0
- package/lib/backend/decorators/resource/utils/flat-sub-properties.js +15 -0
- package/lib/backend/decorators/resource/utils/get-navigation.js +45 -0
- package/lib/backend/decorators/resource/utils/get-navigation.spec.js +68 -0
- package/lib/backend/decorators/resource/utils/get-property-by-key.js +23 -0
- package/lib/backend/decorators/resource/utils/index.js +6 -0
- package/lib/backend/index.js +6 -0
- package/lib/backend/services/action-error-handler/action-error-handler.js +72 -0
- package/lib/backend/services/action-error-handler/action-error-handler.spec.js +137 -0
- package/lib/backend/services/action-error-handler/index.js +1 -0
- package/lib/backend/services/index.js +2 -0
- package/lib/backend/services/sort-setter/index.js +1 -0
- package/lib/backend/services/sort-setter/sort-setter.js +34 -0
- package/lib/backend/services/sort-setter/sort-setter.spec.js +41 -0
- package/lib/backend/utils/auth/base-auth-provider.js +65 -0
- package/lib/backend/utils/auth/default-auth-provider.js +25 -0
- package/lib/backend/utils/auth/index.js +2 -0
- package/lib/backend/utils/build-feature/build-feature.js +105 -0
- package/lib/backend/utils/build-feature/build-feature.spec.js +83 -0
- package/lib/backend/utils/build-feature/index.js +1 -0
- package/lib/backend/utils/component-loader.js +83 -0
- package/lib/backend/utils/errors/app-error.js +45 -0
- package/lib/backend/utils/errors/configuration-error.js +26 -0
- package/lib/backend/utils/errors/forbidden-error.js +36 -0
- package/lib/backend/utils/errors/index.js +7 -0
- package/lib/backend/utils/errors/not-found-error.js +44 -0
- package/lib/backend/utils/errors/not-implemented-error.js +36 -0
- package/lib/backend/utils/errors/record-error.js +1 -0
- package/lib/backend/utils/errors/validation-error.js +39 -0
- package/lib/backend/utils/filter/filter.js +83 -0
- package/lib/backend/utils/filter/index.js +1 -0
- package/lib/backend/utils/index.js +13 -0
- package/lib/backend/utils/layout-element-parser/index.js +1 -0
- package/lib/backend/utils/layout-element-parser/layout-element-parser.js +84 -0
- package/lib/backend/utils/layout-element-parser/layout-element-parser.spec.js +82 -0
- package/lib/backend/utils/layout-element-parser/layout-element.doc.md +133 -0
- package/lib/backend/utils/options-parser/index.js +1 -0
- package/lib/backend/utils/options-parser/options-parser.js +92 -0
- package/lib/backend/utils/populator/index.js +2 -0
- package/lib/backend/utils/populator/populate-property.js +94 -0
- package/lib/backend/utils/populator/populate-property.spec.js +111 -0
- package/lib/backend/utils/populator/populator.doc.md +35 -0
- package/lib/backend/utils/populator/populator.js +20 -0
- package/lib/backend/utils/populator/populator.spec.js +10 -0
- package/lib/backend/utils/request-parser/index.js +1 -0
- package/lib/backend/utils/request-parser/request-parser.js +66 -0
- package/lib/backend/utils/request-parser/request-parser.spec.js +55 -0
- package/lib/backend/utils/resources-factory/index.js +1 -0
- package/lib/backend/utils/resources-factory/resources-factory.js +107 -0
- package/lib/backend/utils/resources-factory/resources-factory.spec.js +124 -0
- package/lib/backend/utils/router/index.js +1 -0
- package/lib/backend/utils/router/router.doc.md +94 -0
- package/lib/backend/utils/router/router.js +170 -0
- package/lib/backend/utils/router/router.spec.js +12 -0
- package/lib/backend/utils/uploaded-file.type.js +1 -0
- package/lib/backend/utils/view-helpers/index.js +1 -0
- package/lib/backend/utils/view-helpers/view-helpers.js +296 -0
- package/lib/backend/utils/view-helpers/view-helpers.spec.js +26 -0
- package/lib/constants.js +8 -0
- package/lib/core-scripts.interface.js +1 -0
- package/lib/current-admin.interface.js +1 -0
- package/lib/frontend/assets/fonts/icomoon.eot +0 -0
- package/lib/frontend/assets/fonts/icomoon.svg +34 -0
- package/lib/frontend/assets/fonts/icomoon.ttf +0 -0
- package/lib/frontend/assets/fonts/icomoon.woff +0 -0
- package/lib/frontend/assets/images/logo-mini.svg +8 -0
- package/lib/frontend/assets/images/logo.svg +12 -0
- package/lib/frontend/assets/styles/icomoon.css +115 -0
- package/lib/frontend/bundle-entry.js +71 -0
- package/lib/frontend/components/actions/action.props.js +1 -0
- package/lib/frontend/components/actions/bulk-delete.js +104 -0
- package/lib/frontend/components/actions/edit.js +86 -0
- package/lib/frontend/components/actions/index.js +19 -0
- package/lib/frontend/components/actions/list.js +83 -0
- package/lib/frontend/components/actions/new.js +133 -0
- package/lib/frontend/components/actions/show.js +43 -0
- package/lib/frontend/components/actions/utils/append-force-refresh.js +32 -0
- package/lib/frontend/components/actions/utils/append-force-refresh.spec.js +39 -0
- package/lib/frontend/components/actions/utils/index.js +1 -0
- package/lib/frontend/components/actions/utils/layout-element-renderer.js +57 -0
- package/lib/frontend/components/app/action-button/action-button.js +64 -0
- package/lib/frontend/components/app/action-button/index.js +1 -0
- package/lib/frontend/components/app/action-header/action-header-props.js +1 -0
- package/lib/frontend/components/app/action-header/action-header.js +146 -0
- package/lib/frontend/components/app/action-header/actions-to-button-group.js +52 -0
- package/lib/frontend/components/app/action-header/actions-to-button-group.spec.js +110 -0
- package/lib/frontend/components/app/action-header/index.js +2 -0
- package/lib/frontend/components/app/action-header/styled-back-button.js +38 -0
- package/lib/frontend/components/app/admin-modal.js +8 -0
- package/lib/frontend/components/app/app-loader.js +9 -0
- package/lib/frontend/components/app/auth-background-component.js +4 -0
- package/lib/frontend/components/app/base-action-component.js +90 -0
- package/lib/frontend/components/app/breadcrumbs.js +122 -0
- package/lib/frontend/components/app/default-dashboard.js +185 -0
- package/lib/frontend/components/app/drawer-portal.js +110 -0
- package/lib/frontend/components/app/error-boundary.js +45 -0
- package/lib/frontend/components/app/error-message.js +89 -0
- package/lib/frontend/components/app/filter-drawer.js +115 -0
- package/lib/frontend/components/app/footer.js +4 -0
- package/lib/frontend/components/app/index.js +21 -0
- package/lib/frontend/components/app/language-select/index.js +1 -0
- package/lib/frontend/components/app/language-select/language-select.js +37 -0
- package/lib/frontend/components/app/logged-in.js +32 -0
- package/lib/frontend/components/app/notice.js +92 -0
- package/lib/frontend/components/app/records-table/index.js +6 -0
- package/lib/frontend/components/app/records-table/no-records.js +33 -0
- package/lib/frontend/components/app/records-table/property-header.js +22 -0
- package/lib/frontend/components/app/records-table/property-header.spec.js +54 -0
- package/lib/frontend/components/app/records-table/record-in-list.js +130 -0
- package/lib/frontend/components/app/records-table/records-table-header.js +95 -0
- package/lib/frontend/components/app/records-table/records-table-header.spec.js +24 -0
- package/lib/frontend/components/app/records-table/records-table.js +80 -0
- package/lib/frontend/components/app/records-table/records-table.spec.js +109 -0
- package/lib/frontend/components/app/records-table/selected-records.js +64 -0
- package/lib/frontend/components/app/records-table/utils/display.js +1 -0
- package/lib/frontend/components/app/records-table/utils/get-bulk-actions-from-records.js +11 -0
- package/lib/frontend/components/app/records-table/utils/get-bulk-actions-from-records.spec.js +24 -0
- package/lib/frontend/components/app/sidebar/index.js +3 -0
- package/lib/frontend/components/app/sidebar/sidebar-branding.js +52 -0
- package/lib/frontend/components/app/sidebar/sidebar-footer.js +14 -0
- package/lib/frontend/components/app/sidebar/sidebar-pages.js +41 -0
- package/lib/frontend/components/app/sidebar/sidebar-resource-section.js +42 -0
- package/lib/frontend/components/app/sidebar/sidebar.js +67 -0
- package/lib/frontend/components/app/sort-link.js +33 -0
- package/lib/frontend/components/app/top-bar.js +55 -0
- package/lib/frontend/components/app/utils/discord-logo-svg.js +45 -0
- package/lib/frontend/components/app/utils/rocket-svg.js +322 -0
- package/lib/frontend/components/app/version.js +38 -0
- package/lib/frontend/components/application.js +105 -0
- package/lib/frontend/components/index.js +6 -0
- package/lib/frontend/components/login/index.js +125 -0
- package/lib/frontend/components/property-type/array/add-new-item-translation.js +25 -0
- package/lib/frontend/components/property-type/array/convert-to-sub-property.js +24 -0
- package/lib/frontend/components/property-type/array/edit.js +128 -0
- package/lib/frontend/components/property-type/array/edit.spec.js +92 -0
- package/lib/frontend/components/property-type/array/index.js +4 -0
- package/lib/frontend/components/property-type/array/list.js +16 -0
- package/lib/frontend/components/property-type/array/remove-sub-property.js +35 -0
- package/lib/frontend/components/property-type/array/remove-sub-property.spec.js +54 -0
- package/lib/frontend/components/property-type/array/show.js +28 -0
- package/lib/frontend/components/property-type/base-property-component.doc.md +135 -0
- package/lib/frontend/components/property-type/base-property-component.js +135 -0
- package/lib/frontend/components/property-type/base-property-props.js +1 -0
- package/lib/frontend/components/property-type/boolean/boolean-property-value.js +28 -0
- package/lib/frontend/components/property-type/boolean/edit.js +40 -0
- package/lib/frontend/components/property-type/boolean/filter.js +50 -0
- package/lib/frontend/components/property-type/boolean/index.js +5 -0
- package/lib/frontend/components/property-type/boolean/list.js +5 -0
- package/lib/frontend/components/property-type/boolean/map-value.js +6 -0
- package/lib/frontend/components/property-type/boolean/show.js +17 -0
- package/lib/frontend/components/property-type/clean-property-component.js +24 -0
- package/lib/frontend/components/property-type/currency/currency-input-wrapper.js +25 -0
- package/lib/frontend/components/property-type/currency/edit.js +30 -0
- package/lib/frontend/components/property-type/currency/filter.js +27 -0
- package/lib/frontend/components/property-type/currency/format-value.js +21 -0
- package/lib/frontend/components/property-type/currency/index.js +5 -0
- package/lib/frontend/components/property-type/currency/list.js +12 -0
- package/lib/frontend/components/property-type/currency/show.js +19 -0
- package/lib/frontend/components/property-type/datetime/edit.js +38 -0
- package/lib/frontend/components/property-type/datetime/filter.js +40 -0
- package/lib/frontend/components/property-type/datetime/index.js +5 -0
- package/lib/frontend/components/property-type/datetime/list.js +12 -0
- package/lib/frontend/components/property-type/datetime/map-value.js +12 -0
- package/lib/frontend/components/property-type/datetime/show.js +19 -0
- package/lib/frontend/components/property-type/datetime/strip-time-from-iso.js +7 -0
- package/lib/frontend/components/property-type/default-type/default-property-value.js +33 -0
- package/lib/frontend/components/property-type/default-type/edit.js +79 -0
- package/lib/frontend/components/property-type/default-type/filter.js +54 -0
- package/lib/frontend/components/property-type/default-type/index.js +5 -0
- package/lib/frontend/components/property-type/default-type/list.js +5 -0
- package/lib/frontend/components/property-type/default-type/show.js +17 -0
- package/lib/frontend/components/property-type/default-type/show.spec.js +47 -0
- package/lib/frontend/components/property-type/index.js +33 -0
- package/lib/frontend/components/property-type/key-value/edit.js +154 -0
- package/lib/frontend/components/property-type/key-value/index.js +3 -0
- package/lib/frontend/components/property-type/key-value/show.js +45 -0
- package/lib/frontend/components/property-type/mixed/convert-to-sub-property.js +8 -0
- package/lib/frontend/components/property-type/mixed/edit.js +30 -0
- package/lib/frontend/components/property-type/mixed/index.js +4 -0
- package/lib/frontend/components/property-type/mixed/list.js +39 -0
- package/lib/frontend/components/property-type/mixed/show.js +25 -0
- package/lib/frontend/components/property-type/password/edit.js +49 -0
- package/lib/frontend/components/property-type/password/index.js +3 -0
- package/lib/frontend/components/property-type/phone/edit.js +40 -0
- package/lib/frontend/components/property-type/phone/filter.js +29 -0
- package/lib/frontend/components/property-type/phone/index.js +5 -0
- package/lib/frontend/components/property-type/phone/list.js +5 -0
- package/lib/frontend/components/property-type/phone/show.js +17 -0
- package/lib/frontend/components/property-type/record-property-is-equal.js +15 -0
- package/lib/frontend/components/property-type/reference/edit.js +84 -0
- package/lib/frontend/components/property-type/reference/filter.js +44 -0
- package/lib/frontend/components/property-type/reference/index.js +5 -0
- package/lib/frontend/components/property-type/reference/list.js +5 -0
- package/lib/frontend/components/property-type/reference/reference-value.js +41 -0
- package/lib/frontend/components/property-type/reference/show.js +21 -0
- package/lib/frontend/components/property-type/richtext/edit.js +44 -0
- package/lib/frontend/components/property-type/richtext/index.js +4 -0
- package/lib/frontend/components/property-type/richtext/list.js +22 -0
- package/lib/frontend/components/property-type/richtext/show.js +28 -0
- package/lib/frontend/components/property-type/textarea/edit.js +41 -0
- package/lib/frontend/components/property-type/textarea/index.js +3 -0
- package/lib/frontend/components/property-type/textarea/show.js +23 -0
- package/lib/frontend/components/property-type/utils/index.js +2 -0
- package/lib/frontend/components/property-type/utils/property-description/index.js +1 -0
- package/lib/frontend/components/property-type/utils/property-description/property-description.js +30 -0
- package/lib/frontend/components/property-type/utils/property-label/index.js +1 -0
- package/lib/frontend/components/property-type/utils/property-label/property-label.js +27 -0
- package/lib/frontend/components/routes/bulk-action.js +125 -0
- package/lib/frontend/components/routes/dashboard.js +37 -0
- package/lib/frontend/components/routes/index.js +6 -0
- package/lib/frontend/components/routes/page.js +51 -0
- package/lib/frontend/components/routes/record-action.js +146 -0
- package/lib/frontend/components/routes/record-action.spec.js +56 -0
- package/lib/frontend/components/routes/resource-action.js +98 -0
- package/lib/frontend/components/routes/resource.js +98 -0
- package/lib/frontend/components/routes/utils/should-action-re-fetch-data.js +23 -0
- package/lib/frontend/components/routes/utils/wrapper.js +73 -0
- package/lib/frontend/components/spec/action-json.factory.js +17 -0
- package/lib/frontend/components/spec/factory.js +8 -0
- package/lib/frontend/components/spec/initialize-translations.js +5 -0
- package/lib/frontend/components/spec/page-json.factory.js +5 -0
- package/lib/frontend/components/spec/property-json.factory.js +25 -0
- package/lib/frontend/components/spec/record-json.factory.js +42 -0
- package/lib/frontend/components/spec/resource-json.factory.js +55 -0
- package/lib/frontend/components/spec/test-context-provider.js +26 -0
- package/lib/frontend/global-entry.js +29 -0
- package/lib/frontend/hoc/allow-override.js +34 -0
- package/lib/frontend/hoc/index.js +3 -0
- package/lib/frontend/hoc/with-no-ssr.js +27 -0
- package/lib/frontend/hoc/with-notice.js +39 -0
- package/lib/frontend/hooks/index.js +14 -0
- package/lib/frontend/hooks/use-action/index.js +3 -0
- package/lib/frontend/hooks/use-action/use-action-response-handler.js +24 -0
- package/lib/frontend/hooks/use-action/use-action.doc.md +19 -0
- package/lib/frontend/hooks/use-action/use-action.js +45 -0
- package/lib/frontend/hooks/use-action/use-action.types.js +1 -0
- package/lib/frontend/hooks/use-current-admin.js +41 -0
- package/lib/frontend/hooks/use-filter-drawer.js +31 -0
- package/lib/frontend/hooks/use-history-listen.js +32 -0
- package/lib/frontend/hooks/use-local-storage/index.js +2 -0
- package/lib/frontend/hooks/use-local-storage/use-local-storage-result.type.js +1 -0
- package/lib/frontend/hooks/use-local-storage/use-local-storage.doc.md +28 -0
- package/lib/frontend/hooks/use-local-storage/use-local-storage.js +48 -0
- package/lib/frontend/hooks/use-modal.doc.md +117 -0
- package/lib/frontend/hooks/use-modal.js +74 -0
- package/lib/frontend/hooks/use-navigation-resources.js +59 -0
- package/lib/frontend/hooks/use-notice.js +33 -0
- package/lib/frontend/hooks/use-query-params.js +82 -0
- package/lib/frontend/hooks/use-record/filter-record.js +22 -0
- package/lib/frontend/hooks/use-record/filter-record.spec.js +32 -0
- package/lib/frontend/hooks/use-record/index.js +6 -0
- package/lib/frontend/hooks/use-record/is-entire-record-given.js +8 -0
- package/lib/frontend/hooks/use-record/merge-record-response.js +26 -0
- package/lib/frontend/hooks/use-record/params-to-form-data.js +45 -0
- package/lib/frontend/hooks/use-record/params-to-form-data.spec.js +40 -0
- package/lib/frontend/hooks/use-record/update-record.js +48 -0
- package/lib/frontend/hooks/use-record/update-record.spec.js +108 -0
- package/lib/frontend/hooks/use-record/use-record.doc.md +104 -0
- package/lib/frontend/hooks/use-record/use-record.js +108 -0
- package/lib/frontend/hooks/use-record/use-record.type.js +1 -0
- package/lib/frontend/hooks/use-records/index.js +2 -0
- package/lib/frontend/hooks/use-records/use-records-result.type.js +1 -0
- package/lib/frontend/hooks/use-records/use-records.doc.md +76 -0
- package/lib/frontend/hooks/use-records/use-records.js +87 -0
- package/lib/frontend/hooks/use-resource/index.js +1 -0
- package/lib/frontend/hooks/use-resource/use-resource.doc.md +15 -0
- package/lib/frontend/hooks/use-resource/use-resource.js +15 -0
- package/lib/frontend/hooks/use-selected-records/index.js +2 -0
- package/lib/frontend/hooks/use-selected-records/use-selected-records-result.type.js +1 -0
- package/lib/frontend/hooks/use-selected-records/use-selected-records.doc.md +69 -0
- package/lib/frontend/hooks/use-selected-records/use-selected-records.js +40 -0
- package/lib/frontend/hooks/use-translation.js +54 -0
- package/lib/frontend/index.js +6 -0
- package/lib/frontend/interfaces/action/action-has-component.js +2 -0
- package/lib/frontend/interfaces/action/action-href.js +30 -0
- package/lib/frontend/interfaces/action/action-json.interface.js +1 -0
- package/lib/frontend/interfaces/action/build-action-api-call-trigger.js +19 -0
- package/lib/frontend/interfaces/action/build-action-click-handler.js +74 -0
- package/lib/frontend/interfaces/action/build-action-test-id.js +1 -0
- package/lib/frontend/interfaces/action/call-action-api.js +54 -0
- package/lib/frontend/interfaces/action/index.js +10 -0
- package/lib/frontend/interfaces/action/is-bulk-action.js +1 -0
- package/lib/frontend/interfaces/action/is-record-action.js +1 -0
- package/lib/frontend/interfaces/action/is-resource-action.js +1 -0
- package/lib/frontend/interfaces/index.js +7 -0
- package/lib/frontend/interfaces/modal.interface.js +1 -0
- package/lib/frontend/interfaces/noticeMessage.interface.js +1 -0
- package/lib/frontend/interfaces/page-json.interface.js +1 -0
- package/lib/frontend/interfaces/property-json/index.js +1 -0
- package/lib/frontend/interfaces/property-json/property-json.interface.js +1 -0
- package/lib/frontend/interfaces/record-json.interface.js +1 -0
- package/lib/frontend/interfaces/resource-json.interface.js +1 -0
- package/lib/frontend/layout-template.js +136 -0
- package/lib/frontend/layout-template.spec.js +63 -0
- package/lib/frontend/login-template.js +137 -0
- package/lib/frontend/login-template.spec.js +15 -0
- package/lib/frontend/store/actions/add-notice.js +9 -0
- package/lib/frontend/store/actions/drop-notice.js +7 -0
- package/lib/frontend/store/actions/filter-drawer.js +10 -0
- package/lib/frontend/store/actions/index.js +16 -0
- package/lib/frontend/store/actions/initialize-assets.js +5 -0
- package/lib/frontend/store/actions/initialize-branding.js +5 -0
- package/lib/frontend/store/actions/initialize-dashboard.js +5 -0
- package/lib/frontend/store/actions/initialize-locale.js +5 -0
- package/lib/frontend/store/actions/initialize-pages.js +5 -0
- package/lib/frontend/store/actions/initialize-paths.js +5 -0
- package/lib/frontend/store/actions/initialize-resources.js +5 -0
- package/lib/frontend/store/actions/initialize-theme.js +5 -0
- package/lib/frontend/store/actions/initialize-versions.js +5 -0
- package/lib/frontend/store/actions/modal.js +9 -0
- package/lib/frontend/store/actions/route-changed.js +10 -0
- package/lib/frontend/store/actions/set-current-admin.js +5 -0
- package/lib/frontend/store/actions/set-drawer-preroute.js +5 -0
- package/lib/frontend/store/actions/set-notice-progress.js +5 -0
- package/lib/frontend/store/index.js +5 -0
- package/lib/frontend/store/initialize-store.js +50 -0
- package/lib/frontend/store/reducers/assetsReducer.js +9 -0
- package/lib/frontend/store/reducers/brandingReducer.js +9 -0
- package/lib/frontend/store/reducers/dashboardReducer.js +9 -0
- package/lib/frontend/store/reducers/drawerReducer.js +18 -0
- package/lib/frontend/store/reducers/filterDrawerReducer.js +26 -0
- package/lib/frontend/store/reducers/index.js +15 -0
- package/lib/frontend/store/reducers/localesReducer.js +13 -0
- package/lib/frontend/store/reducers/modalReducer.js +22 -0
- package/lib/frontend/store/reducers/noticesReducer.js +24 -0
- package/lib/frontend/store/reducers/pagesReducer.js +9 -0
- package/lib/frontend/store/reducers/pathsReducer.js +10 -0
- package/lib/frontend/store/reducers/resourcesReducer.js +9 -0
- package/lib/frontend/store/reducers/routerReducer.js +26 -0
- package/lib/frontend/store/reducers/sessionReducer.js +9 -0
- package/lib/frontend/store/reducers/themeReducer.js +9 -0
- package/lib/frontend/store/reducers/versionsReducer.js +12 -0
- package/lib/frontend/store/store.js +22 -0
- package/lib/frontend/store/utils/pages-to-store.js +7 -0
- package/lib/frontend/utils/adminjs.i18n.js +52 -0
- package/lib/frontend/utils/api-client.js +271 -0
- package/lib/frontend/utils/data-css-name.js +4 -0
- package/lib/frontend/utils/index.js +3 -0
- package/lib/frontend/utils/overridable-component.js +1 -0
- package/lib/index.js +9 -0
- package/lib/locale/config.js +1 -0
- package/lib/locale/de/translation.json +122 -0
- package/lib/locale/default-config.js +24 -0
- package/lib/locale/en/translation.json +128 -0
- package/lib/locale/es/translation.json +127 -0
- package/lib/locale/index.js +22 -0
- package/lib/locale/it/translation.json +122 -0
- package/lib/locale/ja/translation.json +127 -0
- package/lib/locale/pl/translation.json +122 -0
- package/lib/locale/pt-BR/translation.json +120 -0
- package/lib/locale/ua/translation.json +125 -0
- package/lib/locale/zh-CN/translation.json +113 -0
- package/lib/utils/error-type.enum.js +12 -0
- package/lib/utils/file-resolver.js +38 -0
- package/lib/utils/flat/constants.js +2 -0
- package/lib/utils/flat/filter-out-params.doc.md +24 -0
- package/lib/utils/flat/filter-out-params.js +19 -0
- package/lib/utils/flat/filter-out-params.spec.js +46 -0
- package/lib/utils/flat/flat-module.js +35 -0
- package/lib/utils/flat/flat.doc.md +92 -0
- package/lib/utils/flat/flat.types.js +1 -0
- package/lib/utils/flat/get.doc.md +33 -0
- package/lib/utils/flat/get.js +58 -0
- package/lib/utils/flat/get.spec.js +91 -0
- package/lib/utils/flat/index.js +2 -0
- package/lib/utils/flat/merge.js +18 -0
- package/lib/utils/flat/merge.spec.js +79 -0
- package/lib/utils/flat/path-parts.type.js +1 -0
- package/lib/utils/flat/path-to-parts.doc.md +19 -0
- package/lib/utils/flat/path-to-parts.js +28 -0
- package/lib/utils/flat/property-key-regex.js +13 -0
- package/lib/utils/flat/remove-path.doc.md +56 -0
- package/lib/utils/flat/remove-path.js +39 -0
- package/lib/utils/flat/remove-path.spec.js +77 -0
- package/lib/utils/flat/select-params.doc.md +25 -0
- package/lib/utils/flat/select-params.js +27 -0
- package/lib/utils/flat/select-params.spec.js +48 -0
- package/lib/utils/flat/set.doc.md +31 -0
- package/lib/utils/flat/set.js +58 -0
- package/lib/utils/flat/set.spec.js +134 -0
- package/lib/utils/index.js +4 -0
- package/lib/utils/param-converter/constants.js +2 -0
- package/lib/utils/param-converter/convert-nested-param.js +26 -0
- package/lib/utils/param-converter/convert-nested-param.spec.js +61 -0
- package/lib/utils/param-converter/convert-param.js +16 -0
- package/lib/utils/param-converter/convert-param.spec.js +20 -0
- package/lib/utils/param-converter/index.js +1 -0
- package/lib/utils/param-converter/param-converter-module.js +10 -0
- package/lib/utils/param-converter/prepare-params.js +41 -0
- package/lib/utils/param-converter/validate-param.js +19 -0
- package/lib/utils/slash/index.js +7 -0
- package/lib/utils/theme-bundler.js +6 -0
- package/lib/utils/translate-functions.factory.js +70 -0
- package/package.json +180 -0
- package/project.inlang/project_id +1 -0
- package/project.inlang/settings.json +18 -0
- package/spec/backend/helpers/helper-stub.ts +48 -0
- package/spec/backend/helpers/resource-stub.ts +72 -0
- package/spec/backend/index.js +13 -0
- package/spec/fixtures/action.factory.js +19 -0
- package/spec/fixtures/example-component.js +7 -0
- package/spec/fixtures/property.factory.js +11 -0
- package/spec/fixtures/record.factory.js +12 -0
- package/spec/index.js +38 -0
- package/spec/lib.js +11 -0
- package/spec/setup.js +24 -0
- package/src/adminjs-options.interface.ts +488 -0
- package/src/adminjs.spec.ts +129 -0
- package/src/adminjs.ts +307 -0
- package/src/babel.test.config.json +24 -0
- package/src/backend/actions/action.interface.ts +654 -0
- package/src/backend/actions/bulk-delete/bulk-delete-action.spec.ts +90 -0
- package/src/backend/actions/bulk-delete/bulk-delete-action.ts +58 -0
- package/src/backend/actions/delete/delete-action.spec.ts +109 -0
- package/src/backend/actions/delete/delete-action.ts +74 -0
- package/src/backend/actions/edit/edit-action.ts +72 -0
- package/src/backend/actions/index.ts +27 -0
- package/src/backend/actions/list/list-action.ts +106 -0
- package/src/backend/actions/new/new-action.ts +68 -0
- package/src/backend/actions/search/search-action.ts +79 -0
- package/src/backend/actions/show/show-action.ts +40 -0
- package/src/backend/adapters/database/base-database.ts +42 -0
- package/src/backend/adapters/database/index.ts +1 -0
- package/src/backend/adapters/index.ts +4 -0
- package/src/backend/adapters/property/base-property.ts +207 -0
- package/src/backend/adapters/property/index.ts +2 -0
- package/src/backend/adapters/record/base-record.spec.ts +300 -0
- package/src/backend/adapters/record/base-record.ts +318 -0
- package/src/backend/adapters/record/index.ts +2 -0
- package/src/backend/adapters/record/params.type.ts +19 -0
- package/src/backend/adapters/resource/base-resource.spec.ts +116 -0
- package/src/backend/adapters/resource/base-resource.ts +266 -0
- package/src/backend/adapters/resource/index.ts +2 -0
- package/src/backend/adapters/resource/supported-databases.type.ts +10 -0
- package/src/backend/bundler/app.bundler.ts +47 -0
- package/src/backend/bundler/components.bundler.ts +64 -0
- package/src/backend/bundler/generate-user-component-entry.spec.js +51 -0
- package/src/backend/bundler/generate-user-component-entry.ts +43 -0
- package/src/backend/bundler/globals.bundler.ts +61 -0
- package/src/backend/bundler/index.ts +6 -0
- package/src/backend/bundler/utils/asset-bundler.ts +155 -0
- package/src/backend/bundler/utils/constants.ts +11 -0
- package/src/backend/controllers/api-controller.spec.js +112 -0
- package/src/backend/controllers/api-controller.ts +298 -0
- package/src/backend/controllers/app-controller.ts +81 -0
- package/src/backend/controllers/index.ts +2 -0
- package/src/backend/decorators/action/action-decorator.spec.ts +179 -0
- package/src/backend/decorators/action/action-decorator.ts +363 -0
- package/src/backend/decorators/action/index.ts +1 -0
- package/src/backend/decorators/index.ts +3 -0
- package/src/backend/decorators/property/index.ts +3 -0
- package/src/backend/decorators/property/property-decorator.spec.ts +213 -0
- package/src/backend/decorators/property/property-decorator.ts +319 -0
- package/src/backend/decorators/property/property-options.interface.ts +151 -0
- package/src/backend/decorators/property/utils/index.ts +1 -0
- package/src/backend/decorators/property/utils/override-from-options.spec.ts +28 -0
- package/src/backend/decorators/property/utils/override-from-options.ts +21 -0
- package/src/backend/decorators/resource/index.ts +2 -0
- package/src/backend/decorators/resource/resource-decorator.spec.ts +282 -0
- package/src/backend/decorators/resource/resource-decorator.ts +331 -0
- package/src/backend/decorators/resource/resource-options.interface.ts +139 -0
- package/src/backend/decorators/resource/utils/decorate-actions.ts +53 -0
- package/src/backend/decorators/resource/utils/decorate-properties.spec.ts +221 -0
- package/src/backend/decorators/resource/utils/decorate-properties.ts +118 -0
- package/src/backend/decorators/resource/utils/find-sub-property.ts +29 -0
- package/src/backend/decorators/resource/utils/flat-sub-properties.ts +23 -0
- package/src/backend/decorators/resource/utils/get-navigation.spec.ts +81 -0
- package/src/backend/decorators/resource/utils/get-navigation.ts +63 -0
- package/src/backend/decorators/resource/utils/get-property-by-key.ts +31 -0
- package/src/backend/decorators/resource/utils/index.ts +6 -0
- package/src/backend/index.ts +6 -0
- package/src/backend/services/action-error-handler/action-error-handler.spec.ts +145 -0
- package/src/backend/services/action-error-handler/action-error-handler.ts +88 -0
- package/src/backend/services/action-error-handler/index.ts +1 -0
- package/src/backend/services/index.ts +2 -0
- package/src/backend/services/sort-setter/index.ts +1 -0
- package/src/backend/services/sort-setter/sort-setter.spec.js +40 -0
- package/src/backend/services/sort-setter/sort-setter.ts +50 -0
- package/src/backend/utils/auth/base-auth-provider.ts +83 -0
- package/src/backend/utils/auth/default-auth-provider.ts +25 -0
- package/src/backend/utils/auth/index.ts +2 -0
- package/src/backend/utils/build-feature/build-feature.spec.ts +100 -0
- package/src/backend/utils/build-feature/build-feature.ts +140 -0
- package/src/backend/utils/build-feature/index.ts +1 -0
- package/src/backend/utils/component-loader.ts +174 -0
- package/src/backend/utils/errors/app-error.ts +54 -0
- package/src/backend/utils/errors/configuration-error.ts +30 -0
- package/src/backend/utils/errors/forbidden-error.ts +42 -0
- package/src/backend/utils/errors/index.ts +7 -0
- package/src/backend/utils/errors/not-found-error.ts +52 -0
- package/src/backend/utils/errors/not-implemented-error.ts +38 -0
- package/src/backend/utils/errors/record-error.ts +19 -0
- package/src/backend/utils/errors/validation-error.ts +47 -0
- package/src/backend/utils/filter/filter.ts +109 -0
- package/src/backend/utils/filter/index.ts +1 -0
- package/src/backend/utils/index.ts +13 -0
- package/src/backend/utils/layout-element-parser/index.ts +1 -0
- package/src/backend/utils/layout-element-parser/layout-element-parser.spec.ts +86 -0
- package/src/backend/utils/layout-element-parser/layout-element-parser.ts +157 -0
- package/src/backend/utils/layout-element-parser/layout-element.doc.md +133 -0
- package/src/backend/utils/options-parser/index.ts +1 -0
- package/src/backend/utils/options-parser/options-parser.ts +108 -0
- package/src/backend/utils/populator/index.ts +2 -0
- package/src/backend/utils/populator/populate-property.spec.ts +139 -0
- package/src/backend/utils/populator/populate-property.ts +114 -0
- package/src/backend/utils/populator/populator.doc.md +35 -0
- package/src/backend/utils/populator/populator.spec.ts +12 -0
- package/src/backend/utils/populator/populator.ts +29 -0
- package/src/backend/utils/request-parser/index.ts +1 -0
- package/src/backend/utils/request-parser/request-parser.spec.ts +48 -0
- package/src/backend/utils/request-parser/request-parser.ts +74 -0
- package/src/backend/utils/resources-factory/index.ts +1 -0
- package/src/backend/utils/resources-factory/resources-factory.spec.js +123 -0
- package/src/backend/utils/resources-factory/resources-factory.ts +130 -0
- package/src/backend/utils/router/index.ts +1 -0
- package/src/backend/utils/router/router.doc.md +94 -0
- package/src/backend/utils/router/router.spec.ts +16 -0
- package/src/backend/utils/router/router.ts +191 -0
- package/src/backend/utils/uploaded-file.type.ts +27 -0
- package/src/backend/utils/view-helpers/index.ts +1 -0
- package/src/backend/utils/view-helpers/view-helpers.spec.ts +22 -0
- package/src/backend/utils/view-helpers/view-helpers.ts +288 -0
- package/src/constants.ts +8 -0
- package/src/core-scripts.interface.ts +41 -0
- package/src/current-admin.interface.ts +42 -0
- package/src/frontend/assets/fonts/icomoon.eot +0 -0
- package/src/frontend/assets/fonts/icomoon.svg +34 -0
- package/src/frontend/assets/fonts/icomoon.ttf +0 -0
- package/src/frontend/assets/fonts/icomoon.woff +0 -0
- package/src/frontend/assets/images/logo-mini.svg +8 -0
- package/src/frontend/assets/images/logo.svg +12 -0
- package/src/frontend/assets/styles/icomoon.css +115 -0
- package/src/frontend/bundle-entry.jsx +81 -0
- package/src/frontend/components/actions/action.props.ts +33 -0
- package/src/frontend/components/actions/bulk-delete.tsx +114 -0
- package/src/frontend/components/actions/edit.tsx +97 -0
- package/src/frontend/components/actions/index.ts +21 -0
- package/src/frontend/components/actions/list.tsx +95 -0
- package/src/frontend/components/actions/new.tsx +136 -0
- package/src/frontend/components/actions/show.tsx +55 -0
- package/src/frontend/components/actions/utils/append-force-refresh.spec.ts +61 -0
- package/src/frontend/components/actions/utils/append-force-refresh.ts +42 -0
- package/src/frontend/components/actions/utils/index.ts +1 -0
- package/src/frontend/components/actions/utils/layout-element-renderer.tsx +75 -0
- package/src/frontend/components/app/action-button/action-button.tsx +98 -0
- package/src/frontend/components/app/action-button/index.ts +1 -0
- package/src/frontend/components/app/action-header/action-header-props.tsx +25 -0
- package/src/frontend/components/app/action-header/action-header.tsx +145 -0
- package/src/frontend/components/app/action-header/actions-to-button-group.spec.ts +136 -0
- package/src/frontend/components/app/action-header/actions-to-button-group.ts +59 -0
- package/src/frontend/components/app/action-header/index.ts +2 -0
- package/src/frontend/components/app/action-header/styled-back-button.tsx +48 -0
- package/src/frontend/components/app/admin-modal.tsx +13 -0
- package/src/frontend/components/app/app-loader.tsx +8 -0
- package/src/frontend/components/app/auth-background-component.tsx +13 -0
- package/src/frontend/components/app/base-action-component.tsx +99 -0
- package/src/frontend/components/app/breadcrumbs.tsx +117 -0
- package/src/frontend/components/app/default-dashboard.tsx +185 -0
- package/src/frontend/components/app/drawer-portal.tsx +132 -0
- package/src/frontend/components/app/error-boundary.tsx +45 -0
- package/src/frontend/components/app/error-message.tsx +97 -0
- package/src/frontend/components/app/filter-drawer.tsx +129 -0
- package/src/frontend/components/app/footer.tsx +13 -0
- package/src/frontend/components/app/index.ts +21 -0
- package/src/frontend/components/app/language-select/index.ts +1 -0
- package/src/frontend/components/app/language-select/language-select.tsx +58 -0
- package/src/frontend/components/app/logged-in.tsx +45 -0
- package/src/frontend/components/app/notice.tsx +121 -0
- package/src/frontend/components/app/records-table/index.ts +6 -0
- package/src/frontend/components/app/records-table/no-records.tsx +40 -0
- package/src/frontend/components/app/records-table/property-header.spec.tsx +74 -0
- package/src/frontend/components/app/records-table/property-header.tsx +50 -0
- package/src/frontend/components/app/records-table/record-in-list.tsx +153 -0
- package/src/frontend/components/app/records-table/records-table-header.spec.tsx +30 -0
- package/src/frontend/components/app/records-table/records-table-header.tsx +129 -0
- package/src/frontend/components/app/records-table/records-table.spec.tsx +116 -0
- package/src/frontend/components/app/records-table/records-table.tsx +124 -0
- package/src/frontend/components/app/records-table/selected-records.tsx +75 -0
- package/src/frontend/components/app/records-table/utils/display.tsx +6 -0
- package/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.spec.ts +32 -0
- package/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.ts +14 -0
- package/src/frontend/components/app/sidebar/index.ts +4 -0
- package/src/frontend/components/app/sidebar/sidebar-branding.tsx +63 -0
- package/src/frontend/components/app/sidebar/sidebar-footer.tsx +20 -0
- package/src/frontend/components/app/sidebar/sidebar-pages.tsx +54 -0
- package/src/frontend/components/app/sidebar/sidebar-resource-section.tsx +49 -0
- package/src/frontend/components/app/sidebar/sidebar.tsx +66 -0
- package/src/frontend/components/app/sort-link.tsx +44 -0
- package/src/frontend/components/app/top-bar.tsx +56 -0
- package/src/frontend/components/app/utils/discord-logo-svg.tsx +37 -0
- package/src/frontend/components/app/utils/rocket-svg.tsx +410 -0
- package/src/frontend/components/app/version.tsx +50 -0
- package/src/frontend/components/application.tsx +100 -0
- package/src/frontend/components/index.ts +6 -0
- package/src/frontend/components/login/index.tsx +137 -0
- package/src/frontend/components/property-type/array/add-new-item-translation.tsx +31 -0
- package/src/frontend/components/property-type/array/convert-to-sub-property.tsx +28 -0
- package/src/frontend/components/property-type/array/edit.spec.tsx +109 -0
- package/src/frontend/components/property-type/array/edit.tsx +153 -0
- package/src/frontend/components/property-type/array/index.ts +9 -0
- package/src/frontend/components/property-type/array/list.tsx +18 -0
- package/src/frontend/components/property-type/array/remove-sub-property.spec.ts +62 -0
- package/src/frontend/components/property-type/array/remove-sub-property.ts +43 -0
- package/src/frontend/components/property-type/array/show.tsx +38 -0
- package/src/frontend/components/property-type/base-property-component.doc.md +135 -0
- package/src/frontend/components/property-type/base-property-component.tsx +157 -0
- package/src/frontend/components/property-type/base-property-props.ts +171 -0
- package/src/frontend/components/property-type/boolean/boolean-property-value.tsx +29 -0
- package/src/frontend/components/property-type/boolean/edit.tsx +40 -0
- package/src/frontend/components/property-type/boolean/filter.tsx +45 -0
- package/src/frontend/components/property-type/boolean/index.ts +11 -0
- package/src/frontend/components/property-type/boolean/list.tsx +11 -0
- package/src/frontend/components/property-type/boolean/map-value.tsx +6 -0
- package/src/frontend/components/property-type/boolean/show.tsx +19 -0
- package/src/frontend/components/property-type/clean-property-component.tsx +20 -0
- package/src/frontend/components/property-type/currency/currency-input-wrapper.tsx +37 -0
- package/src/frontend/components/property-type/currency/edit.tsx +31 -0
- package/src/frontend/components/property-type/currency/filter.tsx +29 -0
- package/src/frontend/components/property-type/currency/format-value.ts +31 -0
- package/src/frontend/components/property-type/currency/index.ts +11 -0
- package/src/frontend/components/property-type/currency/list.tsx +14 -0
- package/src/frontend/components/property-type/currency/show.tsx +20 -0
- package/src/frontend/components/property-type/datetime/edit.tsx +46 -0
- package/src/frontend/components/property-type/datetime/filter.tsx +40 -0
- package/src/frontend/components/property-type/datetime/index.ts +11 -0
- package/src/frontend/components/property-type/datetime/list.tsx +16 -0
- package/src/frontend/components/property-type/datetime/map-value.ts +15 -0
- package/src/frontend/components/property-type/datetime/show.tsx +21 -0
- package/src/frontend/components/property-type/datetime/strip-time-from-iso.ts +9 -0
- package/src/frontend/components/property-type/default-type/default-property-value.tsx +36 -0
- package/src/frontend/components/property-type/default-type/edit.tsx +81 -0
- package/src/frontend/components/property-type/default-type/filter.tsx +60 -0
- package/src/frontend/components/property-type/default-type/index.ts +11 -0
- package/src/frontend/components/property-type/default-type/list.tsx +9 -0
- package/src/frontend/components/property-type/default-type/show.spec.tsx +54 -0
- package/src/frontend/components/property-type/default-type/show.tsx +19 -0
- package/src/frontend/components/property-type/index.tsx +55 -0
- package/src/frontend/components/property-type/key-value/edit.tsx +179 -0
- package/src/frontend/components/property-type/key-value/index.ts +7 -0
- package/src/frontend/components/property-type/key-value/show.tsx +60 -0
- package/src/frontend/components/property-type/mixed/convert-to-sub-property.ts +13 -0
- package/src/frontend/components/property-type/mixed/edit.tsx +39 -0
- package/src/frontend/components/property-type/mixed/index.ts +9 -0
- package/src/frontend/components/property-type/mixed/list.tsx +51 -0
- package/src/frontend/components/property-type/mixed/show.tsx +34 -0
- package/src/frontend/components/property-type/password/edit.tsx +54 -0
- package/src/frontend/components/property-type/password/index.ts +6 -0
- package/src/frontend/components/property-type/phone/edit.tsx +42 -0
- package/src/frontend/components/property-type/phone/filter.tsx +29 -0
- package/src/frontend/components/property-type/phone/index.ts +11 -0
- package/src/frontend/components/property-type/phone/list.tsx +9 -0
- package/src/frontend/components/property-type/phone/show.tsx +19 -0
- package/src/frontend/components/property-type/record-property-is-equal.ts +21 -0
- package/src/frontend/components/property-type/reference/edit.tsx +99 -0
- package/src/frontend/components/property-type/reference/filter.tsx +52 -0
- package/src/frontend/components/property-type/reference/index.ts +11 -0
- package/src/frontend/components/property-type/reference/list.tsx +11 -0
- package/src/frontend/components/property-type/reference/reference-value.tsx +43 -0
- package/src/frontend/components/property-type/reference/show.tsx +22 -0
- package/src/frontend/components/property-type/richtext/edit.tsx +39 -0
- package/src/frontend/components/property-type/richtext/index.ts +9 -0
- package/src/frontend/components/property-type/richtext/list.tsx +23 -0
- package/src/frontend/components/property-type/richtext/show.tsx +29 -0
- package/src/frontend/components/property-type/textarea/edit.tsx +43 -0
- package/src/frontend/components/property-type/textarea/index.ts +7 -0
- package/src/frontend/components/property-type/textarea/show.tsx +27 -0
- package/src/frontend/components/property-type/utils/index.ts +2 -0
- package/src/frontend/components/property-type/utils/property-description/index.ts +1 -0
- package/src/frontend/components/property-type/utils/property-description/property-description.tsx +38 -0
- package/src/frontend/components/property-type/utils/property-label/index.ts +1 -0
- package/src/frontend/components/property-type/utils/property-label/property-label.tsx +38 -0
- package/src/frontend/components/routes/bulk-action.tsx +157 -0
- package/src/frontend/components/routes/dashboard.tsx +59 -0
- package/src/frontend/components/routes/index.ts +6 -0
- package/src/frontend/components/routes/page.tsx +58 -0
- package/src/frontend/components/routes/record-action.spec.tsx +64 -0
- package/src/frontend/components/routes/record-action.tsx +167 -0
- package/src/frontend/components/routes/resource-action.tsx +102 -0
- package/src/frontend/components/routes/resource.tsx +106 -0
- package/src/frontend/components/routes/utils/should-action-re-fetch-data.ts +34 -0
- package/src/frontend/components/routes/utils/wrapper.tsx +57 -0
- package/src/frontend/components/spec/action-json.factory.ts +20 -0
- package/src/frontend/components/spec/factory.ts +10 -0
- package/src/frontend/components/spec/initialize-translations.ts +6 -0
- package/src/frontend/components/spec/page-json.factory.ts +8 -0
- package/src/frontend/components/spec/property-json.factory.ts +28 -0
- package/src/frontend/components/spec/record-json.factory.ts +43 -0
- package/src/frontend/components/spec/resource-json.factory.ts +50 -0
- package/src/frontend/components/spec/test-context-provider.tsx +33 -0
- package/src/frontend/global-entry.js +37 -0
- package/src/frontend/hoc/allow-override.tsx +45 -0
- package/src/frontend/hoc/index.ts +3 -0
- package/src/frontend/hoc/with-no-ssr.tsx +31 -0
- package/src/frontend/hoc/with-notice.ts +46 -0
- package/src/frontend/hooks/index.ts +14 -0
- package/src/frontend/hooks/use-action/index.ts +3 -0
- package/src/frontend/hooks/use-action/use-action-response-handler.ts +27 -0
- package/src/frontend/hooks/use-action/use-action.doc.md +19 -0
- package/src/frontend/hooks/use-action/use-action.ts +56 -0
- package/src/frontend/hooks/use-action/use-action.types.ts +39 -0
- package/src/frontend/hooks/use-current-admin.ts +57 -0
- package/src/frontend/hooks/use-filter-drawer.tsx +37 -0
- package/src/frontend/hooks/use-history-listen.ts +40 -0
- package/src/frontend/hooks/use-local-storage/index.ts +2 -0
- package/src/frontend/hooks/use-local-storage/use-local-storage-result.type.ts +18 -0
- package/src/frontend/hooks/use-local-storage/use-local-storage.doc.md +28 -0
- package/src/frontend/hooks/use-local-storage/use-local-storage.ts +53 -0
- package/src/frontend/hooks/use-modal.doc.md +117 -0
- package/src/frontend/hooks/use-modal.ts +71 -0
- package/src/frontend/hooks/use-navigation-resources.ts +75 -0
- package/src/frontend/hooks/use-notice.ts +37 -0
- package/src/frontend/hooks/use-query-params.ts +99 -0
- package/src/frontend/hooks/use-record/filter-record.spec.ts +39 -0
- package/src/frontend/hooks/use-record/filter-record.ts +25 -0
- package/src/frontend/hooks/use-record/index.ts +6 -0
- package/src/frontend/hooks/use-record/is-entire-record-given.ts +17 -0
- package/src/frontend/hooks/use-record/merge-record-response.ts +24 -0
- package/src/frontend/hooks/use-record/params-to-form-data.spec.ts +43 -0
- package/src/frontend/hooks/use-record/params-to-form-data.ts +54 -0
- package/src/frontend/hooks/use-record/update-record.spec.ts +142 -0
- package/src/frontend/hooks/use-record/update-record.ts +56 -0
- package/src/frontend/hooks/use-record/use-record.doc.md +104 -0
- package/src/frontend/hooks/use-record/use-record.tsx +138 -0
- package/src/frontend/hooks/use-record/use-record.type.ts +99 -0
- package/src/frontend/hooks/use-records/index.ts +2 -0
- package/src/frontend/hooks/use-records/use-records-result.type.ts +31 -0
- package/src/frontend/hooks/use-records/use-records.doc.md +76 -0
- package/src/frontend/hooks/use-records/use-records.ts +98 -0
- package/src/frontend/hooks/use-resource/index.ts +1 -0
- package/src/frontend/hooks/use-resource/use-resource.doc.md +15 -0
- package/src/frontend/hooks/use-resource/use-resource.ts +25 -0
- package/src/frontend/hooks/use-selected-records/index.ts +2 -0
- package/src/frontend/hooks/use-selected-records/use-selected-records-result.type.ts +18 -0
- package/src/frontend/hooks/use-selected-records/use-selected-records.doc.md +69 -0
- package/src/frontend/hooks/use-selected-records/use-selected-records.ts +56 -0
- package/src/frontend/hooks/use-translation.ts +68 -0
- package/src/frontend/index.ts +6 -0
- package/src/frontend/interfaces/action/action-has-component.ts +9 -0
- package/src/frontend/interfaces/action/action-href.ts +40 -0
- package/src/frontend/interfaces/action/action-json.interface.ts +92 -0
- package/src/frontend/interfaces/action/build-action-api-call-trigger.ts +31 -0
- package/src/frontend/interfaces/action/build-action-click-handler.ts +91 -0
- package/src/frontend/interfaces/action/build-action-test-id.ts +3 -0
- package/src/frontend/interfaces/action/call-action-api.ts +52 -0
- package/src/frontend/interfaces/action/index.ts +10 -0
- package/src/frontend/interfaces/action/is-bulk-action.ts +8 -0
- package/src/frontend/interfaces/action/is-record-action.ts +10 -0
- package/src/frontend/interfaces/action/is-resource-action.ts +8 -0
- package/src/frontend/interfaces/index.ts +7 -0
- package/src/frontend/interfaces/modal.interface.ts +24 -0
- package/src/frontend/interfaces/noticeMessage.interface.ts +16 -0
- package/src/frontend/interfaces/page-json.interface.ts +21 -0
- package/src/frontend/interfaces/property-json/index.ts +1 -0
- package/src/frontend/interfaces/property-json/property-json.interface.ts +165 -0
- package/src/frontend/interfaces/record-json.interface.ts +55 -0
- package/src/frontend/interfaces/resource-json.interface.ts +73 -0
- package/src/frontend/layout-template.spec.ts +78 -0
- package/src/frontend/layout-template.tsx +136 -0
- package/src/frontend/login-template.spec.ts +17 -0
- package/src/frontend/login-template.tsx +156 -0
- package/src/frontend/store/actions/add-notice.ts +18 -0
- package/src/frontend/store/actions/drop-notice.ts +13 -0
- package/src/frontend/store/actions/filter-drawer.ts +16 -0
- package/src/frontend/store/actions/index.ts +16 -0
- package/src/frontend/store/actions/initialize-assets.ts +13 -0
- package/src/frontend/store/actions/initialize-branding.ts +13 -0
- package/src/frontend/store/actions/initialize-dashboard.ts +13 -0
- package/src/frontend/store/actions/initialize-locale.ts +13 -0
- package/src/frontend/store/actions/initialize-pages.ts +13 -0
- package/src/frontend/store/actions/initialize-paths.ts +13 -0
- package/src/frontend/store/actions/initialize-resources.ts +13 -0
- package/src/frontend/store/actions/initialize-theme.ts +13 -0
- package/src/frontend/store/actions/initialize-versions.ts +13 -0
- package/src/frontend/store/actions/modal.ts +14 -0
- package/src/frontend/store/actions/route-changed.ts +21 -0
- package/src/frontend/store/actions/set-current-admin.ts +13 -0
- package/src/frontend/store/actions/set-drawer-preroute.ts +17 -0
- package/src/frontend/store/actions/set-notice-progress.ts +16 -0
- package/src/frontend/store/index.ts +5 -0
- package/src/frontend/store/initialize-store.ts +75 -0
- package/src/frontend/store/reducers/assetsReducer.ts +17 -0
- package/src/frontend/store/reducers/brandingReducer.ts +17 -0
- package/src/frontend/store/reducers/dashboardReducer.ts +20 -0
- package/src/frontend/store/reducers/drawerReducer.ts +23 -0
- package/src/frontend/store/reducers/filterDrawerReducer.ts +25 -0
- package/src/frontend/store/reducers/index.ts +15 -0
- package/src/frontend/store/reducers/localesReducer.ts +21 -0
- package/src/frontend/store/reducers/modalReducer.ts +26 -0
- package/src/frontend/store/reducers/noticesReducer.ts +34 -0
- package/src/frontend/store/reducers/pagesReducer.ts +19 -0
- package/src/frontend/store/reducers/pathsReducer.ts +24 -0
- package/src/frontend/store/reducers/resourcesReducer.ts +19 -0
- package/src/frontend/store/reducers/routerReducer.ts +30 -0
- package/src/frontend/store/reducers/sessionReducer.ts +19 -0
- package/src/frontend/store/reducers/themeReducer.ts +19 -0
- package/src/frontend/store/reducers/versionsReducer.ts +20 -0
- package/src/frontend/store/store.ts +76 -0
- package/src/frontend/store/utils/pages-to-store.ts +10 -0
- package/src/frontend/utils/adminjs.i18n.ts +61 -0
- package/src/frontend/utils/api-client.ts +273 -0
- package/src/frontend/utils/data-css-name.ts +6 -0
- package/src/frontend/utils/index.ts +3 -0
- package/src/frontend/utils/overridable-component.ts +89 -0
- package/src/index.ts +11 -0
- package/src/locale/config.ts +101 -0
- package/src/locale/de/translation.json +122 -0
- package/src/locale/default-config.ts +30 -0
- package/src/locale/en/translation.json +128 -0
- package/src/locale/es/translation.json +127 -0
- package/src/locale/index.ts +26 -0
- package/src/locale/it/translation.json +122 -0
- package/src/locale/ja/translation.json +127 -0
- package/src/locale/pl/translation.json +122 -0
- package/src/locale/pt-BR/translation.json +120 -0
- package/src/locale/ua/translation.json +125 -0
- package/src/locale/zh-CN/translation.json +113 -0
- package/src/utils/error-type.enum.ts +12 -0
- package/src/utils/file-resolver.ts +39 -0
- package/src/utils/flat/constants.ts +3 -0
- package/src/utils/flat/filter-out-params.doc.md +24 -0
- package/src/utils/flat/filter-out-params.spec.ts +53 -0
- package/src/utils/flat/filter-out-params.ts +31 -0
- package/src/utils/flat/flat-module.ts +51 -0
- package/src/utils/flat/flat.doc.md +92 -0
- package/src/utils/flat/flat.types.ts +46 -0
- package/src/utils/flat/get.doc.md +33 -0
- package/src/utils/flat/get.spec.ts +109 -0
- package/src/utils/flat/get.ts +70 -0
- package/src/utils/flat/index.ts +2 -0
- package/src/utils/flat/merge.spec.ts +75 -0
- package/src/utils/flat/merge.ts +24 -0
- package/src/utils/flat/path-parts.type.ts +1 -0
- package/src/utils/flat/path-to-parts.doc.md +19 -0
- package/src/utils/flat/path-to-parts.ts +40 -0
- package/src/utils/flat/property-key-regex.ts +16 -0
- package/src/utils/flat/remove-path.doc.md +56 -0
- package/src/utils/flat/remove-path.spec.ts +87 -0
- package/src/utils/flat/remove-path.ts +42 -0
- package/src/utils/flat/select-params.doc.md +25 -0
- package/src/utils/flat/select-params.spec.ts +56 -0
- package/src/utils/flat/select-params.ts +37 -0
- package/src/utils/flat/set.doc.md +31 -0
- package/src/utils/flat/set.spec.ts +173 -0
- package/src/utils/flat/set.ts +70 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/param-converter/constants.ts +3 -0
- package/src/utils/param-converter/convert-nested-param.spec.ts +75 -0
- package/src/utils/param-converter/convert-nested-param.ts +35 -0
- package/src/utils/param-converter/convert-param.spec.ts +25 -0
- package/src/utils/param-converter/convert-param.ts +21 -0
- package/src/utils/param-converter/index.ts +1 -0
- package/src/utils/param-converter/param-converter-module.ts +18 -0
- package/src/utils/param-converter/prepare-params.ts +46 -0
- package/src/utils/param-converter/validate-param.ts +35 -0
- package/src/utils/slash/index.ts +9 -0
- package/src/utils/theme-bundler.ts +9 -0
- package/src/utils/translate-functions.factory.ts +216 -0
- package/tsconfig.json +43 -0
- package/types/spec/backend/helpers/helper-stub.d.ts +21 -0
- package/types/spec/backend/helpers/resource-stub.d.ts +15 -0
- package/types/src/adminjs-options.interface.d.ts +453 -0
- package/types/src/adminjs.d.ts +125 -0
- package/types/src/adminjs.spec.d.ts +1 -0
- package/types/src/backend/actions/action.interface.d.ts +619 -0
- package/types/src/backend/actions/bulk-delete/bulk-delete-action.d.ts +11 -0
- package/types/src/backend/actions/bulk-delete/bulk-delete-action.spec.d.ts +1 -0
- package/types/src/backend/actions/delete/delete-action.d.ts +12 -0
- package/types/src/backend/actions/delete/delete-action.spec.d.ts +1 -0
- package/types/src/backend/actions/edit/edit-action.d.ts +14 -0
- package/types/src/backend/actions/index.d.ts +12 -0
- package/types/src/backend/actions/list/list-action.d.ts +33 -0
- package/types/src/backend/actions/new/new-action.d.ts +12 -0
- package/types/src/backend/actions/search/search-action.d.ts +25 -0
- package/types/src/backend/actions/show/show-action.d.ts +12 -0
- package/types/src/backend/adapters/database/base-database.d.ts +28 -0
- package/types/src/backend/adapters/database/index.d.ts +1 -0
- package/types/src/backend/adapters/index.d.ts +4 -0
- package/types/src/backend/adapters/property/base-property.d.ts +112 -0
- package/types/src/backend/adapters/property/index.d.ts +2 -0
- package/types/src/backend/adapters/record/base-record.d.ts +183 -0
- package/types/src/backend/adapters/record/base-record.spec.d.ts +1 -0
- package/types/src/backend/adapters/record/index.d.ts +2 -0
- package/types/src/backend/adapters/record/params.type.d.ts +10 -0
- package/types/src/backend/adapters/resource/base-resource.d.ts +204 -0
- package/types/src/backend/adapters/resource/base-resource.spec.d.ts +1 -0
- package/types/src/backend/adapters/resource/index.d.ts +2 -0
- package/types/src/backend/adapters/resource/supported-databases.type.d.ts +1 -0
- package/types/src/backend/bundler/app.bundler.d.ts +3 -0
- package/types/src/backend/bundler/components.bundler.d.ts +3 -0
- package/types/src/backend/bundler/generate-user-component-entry.d.ts +16 -0
- package/types/src/backend/bundler/globals.bundler.d.ts +3 -0
- package/types/src/backend/bundler/index.d.ts +6 -0
- package/types/src/backend/bundler/utils/asset-bundler.d.ts +32 -0
- package/types/src/backend/bundler/utils/constants.d.ts +4 -0
- package/types/src/backend/controllers/api-controller.d.ts +131 -0
- package/types/src/backend/controllers/app-controller.d.ts +16 -0
- package/types/src/backend/controllers/index.d.ts +2 -0
- package/types/src/backend/decorators/action/action-decorator.d.ts +130 -0
- package/types/src/backend/decorators/action/action-decorator.spec.d.ts +1 -0
- package/types/src/backend/decorators/action/index.d.ts +1 -0
- package/types/src/backend/decorators/index.d.ts +3 -0
- package/types/src/backend/decorators/property/index.d.ts +3 -0
- package/types/src/backend/decorators/property/property-decorator.d.ts +164 -0
- package/types/src/backend/decorators/property/property-decorator.spec.d.ts +1 -0
- package/types/src/backend/decorators/property/property-options.interface.d.ts +137 -0
- package/types/src/backend/decorators/property/utils/index.d.ts +1 -0
- package/types/src/backend/decorators/property/utils/override-from-options.d.ts +4 -0
- package/types/src/backend/decorators/property/utils/override-from-options.spec.d.ts +1 -0
- package/types/src/backend/decorators/resource/index.d.ts +2 -0
- package/types/src/backend/decorators/resource/resource-decorator.d.ts +149 -0
- package/types/src/backend/decorators/resource/resource-decorator.spec.d.ts +1 -0
- package/types/src/backend/decorators/resource/resource-options.interface.d.ts +134 -0
- package/types/src/backend/decorators/resource/utils/decorate-actions.d.ts +16 -0
- package/types/src/backend/decorators/resource/utils/decorate-properties.d.ts +15 -0
- package/types/src/backend/decorators/resource/utils/decorate-properties.spec.d.ts +1 -0
- package/types/src/backend/decorators/resource/utils/find-sub-property.d.ts +12 -0
- package/types/src/backend/decorators/resource/utils/flat-sub-properties.d.ts +14 -0
- package/types/src/backend/decorators/resource/utils/get-navigation.d.ts +10 -0
- package/types/src/backend/decorators/resource/utils/get-navigation.spec.d.ts +1 -0
- package/types/src/backend/decorators/resource/utils/get-property-by-key.d.ts +3 -0
- package/types/src/backend/decorators/resource/utils/index.d.ts +6 -0
- package/types/src/backend/index.d.ts +6 -0
- package/types/src/backend/services/action-error-handler/action-error-handler.d.ts +8 -0
- package/types/src/backend/services/action-error-handler/action-error-handler.spec.d.ts +1 -0
- package/types/src/backend/services/action-error-handler/index.d.ts +1 -0
- package/types/src/backend/services/index.d.ts +2 -0
- package/types/src/backend/services/sort-setter/index.d.ts +1 -0
- package/types/src/backend/services/sort-setter/sort-setter.d.ts +27 -0
- package/types/src/backend/utils/auth/base-auth-provider.d.ts +63 -0
- package/types/src/backend/utils/auth/default-auth-provider.d.ts +12 -0
- package/types/src/backend/utils/auth/index.d.ts +2 -0
- package/types/src/backend/utils/build-feature/build-feature.d.ts +40 -0
- package/types/src/backend/utils/build-feature/build-feature.spec.d.ts +1 -0
- package/types/src/backend/utils/build-feature/index.d.ts +1 -0
- package/types/src/backend/utils/component-loader.d.ts +15 -0
- package/types/src/backend/utils/errors/app-error.d.ts +35 -0
- package/types/src/backend/utils/errors/configuration-error.d.ts +14 -0
- package/types/src/backend/utils/errors/forbidden-error.d.ts +26 -0
- package/types/src/backend/utils/errors/index.d.ts +7 -0
- package/types/src/backend/utils/errors/not-found-error.d.ts +27 -0
- package/types/src/backend/utils/errors/not-implemented-error.d.ts +13 -0
- package/types/src/backend/utils/errors/record-error.d.ts +17 -0
- package/types/src/backend/utils/errors/validation-error.d.ts +34 -0
- package/types/src/backend/utils/filter/filter.d.ts +66 -0
- package/types/src/backend/utils/filter/index.d.ts +1 -0
- package/types/src/backend/utils/index.d.ts +13 -0
- package/types/src/backend/utils/layout-element-parser/index.d.ts +1 -0
- package/types/src/backend/utils/layout-element-parser/layout-element-parser.d.ts +82 -0
- package/types/src/backend/utils/layout-element-parser/layout-element-parser.spec.d.ts +1 -0
- package/types/src/backend/utils/options-parser/index.d.ts +1 -0
- package/types/src/backend/utils/options-parser/options-parser.d.ts +10 -0
- package/types/src/backend/utils/populator/index.d.ts +2 -0
- package/types/src/backend/utils/populator/populate-property.d.ts +13 -0
- package/types/src/backend/utils/populator/populate-property.spec.d.ts +1 -0
- package/types/src/backend/utils/populator/populator.d.ts +10 -0
- package/types/src/backend/utils/populator/populator.spec.d.ts +1 -0
- package/types/src/backend/utils/request-parser/index.d.ts +1 -0
- package/types/src/backend/utils/request-parser/request-parser.d.ts +14 -0
- package/types/src/backend/utils/request-parser/request-parser.spec.d.ts +1 -0
- package/types/src/backend/utils/resources-factory/index.d.ts +1 -0
- package/types/src/backend/utils/resources-factory/resources-factory.d.ts +57 -0
- package/types/src/backend/utils/router/index.d.ts +1 -0
- package/types/src/backend/utils/router/router.d.ts +24 -0
- package/types/src/backend/utils/router/router.spec.d.ts +1 -0
- package/types/src/backend/utils/uploaded-file.type.d.ts +25 -0
- package/types/src/backend/utils/view-helpers/index.d.ts +1 -0
- package/types/src/backend/utils/view-helpers/view-helpers.d.ts +184 -0
- package/types/src/backend/utils/view-helpers/view-helpers.spec.d.ts +1 -0
- package/types/src/constants.d.ts +7 -0
- package/types/src/core-scripts.interface.d.ts +41 -0
- package/types/src/current-admin.interface.d.ts +42 -0
- package/types/src/frontend/components/actions/action.props.d.ts +29 -0
- package/types/src/frontend/components/actions/bulk-delete.d.ts +15 -0
- package/types/src/frontend/components/actions/edit.d.ts +7 -0
- package/types/src/frontend/components/actions/index.d.ts +31 -0
- package/types/src/frontend/components/actions/list.d.ts +7 -0
- package/types/src/frontend/components/actions/new.d.ts +7 -0
- package/types/src/frontend/components/actions/show.d.ts +14 -0
- package/types/src/frontend/components/actions/utils/append-force-refresh.d.ts +13 -0
- package/types/src/frontend/components/actions/utils/append-force-refresh.spec.d.ts +1 -0
- package/types/src/frontend/components/actions/utils/index.d.ts +1 -0
- package/types/src/frontend/components/actions/utils/layout-element-renderer.d.ts +12 -0
- package/types/src/frontend/components/app/action-button/action-button.d.ts +40 -0
- package/types/src/frontend/components/app/action-button/index.d.ts +1 -0
- package/types/src/frontend/components/app/action-header/action-header-props.d.ts +24 -0
- package/types/src/frontend/components/app/action-header/action-header.d.ts +19 -0
- package/types/src/frontend/components/app/action-header/actions-to-button-group.d.ts +12 -0
- package/types/src/frontend/components/app/action-header/actions-to-button-group.spec.d.ts +1 -0
- package/types/src/frontend/components/app/action-header/index.d.ts +2 -0
- package/types/src/frontend/components/app/action-header/styled-back-button.d.ts +9 -0
- package/types/src/frontend/components/app/admin-modal.d.ts +3 -0
- package/types/src/frontend/components/app/app-loader.d.ts +2 -0
- package/types/src/frontend/components/app/auth-background-component.d.ts +6 -0
- package/types/src/frontend/components/app/base-action-component.d.ts +52 -0
- package/types/src/frontend/components/app/breadcrumbs.d.ts +30 -0
- package/types/src/frontend/components/app/default-dashboard.d.ts +4 -0
- package/types/src/frontend/components/app/drawer-portal.d.ts +35 -0
- package/types/src/frontend/components/app/error-boundary.d.ts +10 -0
- package/types/src/frontend/components/app/error-message.d.ts +36 -0
- package/types/src/frontend/components/app/filter-drawer.d.ts +10 -0
- package/types/src/frontend/components/app/footer.d.ts +6 -0
- package/types/src/frontend/components/app/index.d.ts +21 -0
- package/types/src/frontend/components/app/language-select/index.d.ts +1 -0
- package/types/src/frontend/components/app/language-select/language-select.d.ts +3 -0
- package/types/src/frontend/components/app/logged-in.d.ts +13 -0
- package/types/src/frontend/components/app/notice.d.ts +33 -0
- package/types/src/frontend/components/app/records-table/index.d.ts +6 -0
- package/types/src/frontend/components/app/records-table/no-records.d.ts +11 -0
- package/types/src/frontend/components/app/records-table/property-header.d.ts +23 -0
- package/types/src/frontend/components/app/records-table/property-header.spec.d.ts +2 -0
- package/types/src/frontend/components/app/records-table/record-in-list.d.ts +16 -0
- package/types/src/frontend/components/app/records-table/records-table-header.d.ts +81 -0
- package/types/src/frontend/components/app/records-table/records-table-header.spec.d.ts +2 -0
- package/types/src/frontend/components/app/records-table/records-table.d.ts +53 -0
- package/types/src/frontend/components/app/records-table/records-table.spec.d.ts +3 -0
- package/types/src/frontend/components/app/records-table/selected-records.d.ts +11 -0
- package/types/src/frontend/components/app/records-table/utils/display.d.ts +1 -0
- package/types/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.d.ts +3 -0
- package/types/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.spec.d.ts +2 -0
- package/types/src/frontend/components/app/sidebar/index.d.ts +3 -0
- package/types/src/frontend/components/app/sidebar/sidebar-branding.d.ts +12 -0
- package/types/src/frontend/components/app/sidebar/sidebar-footer.d.ts +7 -0
- package/types/src/frontend/components/app/sidebar/sidebar-pages.d.ts +11 -0
- package/types/src/frontend/components/app/sidebar/sidebar-resource-section.d.ts +29 -0
- package/types/src/frontend/components/app/sidebar/sidebar.d.ts +11 -0
- package/types/src/frontend/components/app/sort-link.d.ts +9 -0
- package/types/src/frontend/components/app/top-bar.d.ts +9 -0
- package/types/src/frontend/components/app/utils/discord-logo-svg.d.ts +4 -0
- package/types/src/frontend/components/app/utils/rocket-svg.d.ts +4 -0
- package/types/src/frontend/components/app/version.d.ts +10 -0
- package/types/src/frontend/components/application.d.ts +6 -0
- package/types/src/frontend/components/index.d.ts +6 -0
- package/types/src/frontend/components/login/index.d.ts +10 -0
- package/types/src/frontend/components/property-type/array/add-new-item-translation.d.ts +9 -0
- package/types/src/frontend/components/property-type/array/convert-to-sub-property.d.ts +14 -0
- package/types/src/frontend/components/property-type/array/edit.d.ts +6 -0
- package/types/src/frontend/components/property-type/array/edit.spec.d.ts +4 -0
- package/types/src/frontend/components/property-type/array/index.d.ts +4 -0
- package/types/src/frontend/components/property-type/array/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/array/remove-sub-property.d.ts +15 -0
- package/types/src/frontend/components/property-type/array/remove-sub-property.spec.d.ts +1 -0
- package/types/src/frontend/components/property-type/array/show.d.ts +11 -0
- package/types/src/frontend/components/property-type/base-property-component.d.ts +12 -0
- package/types/src/frontend/components/property-type/base-property-props.d.ts +160 -0
- package/types/src/frontend/components/property-type/boolean/boolean-property-value.d.ts +6 -0
- package/types/src/frontend/components/property-type/boolean/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/boolean/filter.d.ts +10 -0
- package/types/src/frontend/components/property-type/boolean/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/boolean/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/boolean/map-value.d.ts +2 -0
- package/types/src/frontend/components/property-type/boolean/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/clean-property-component.d.ts +12 -0
- package/types/src/frontend/components/property-type/currency/currency-input-wrapper.d.ts +12 -0
- package/types/src/frontend/components/property-type/currency/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/currency/filter.d.ts +9 -0
- package/types/src/frontend/components/property-type/currency/format-value.d.ts +2 -0
- package/types/src/frontend/components/property-type/currency/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/currency/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/currency/show.d.ts +9 -0
- package/types/src/frontend/components/property-type/datetime/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/datetime/filter.d.ts +10 -0
- package/types/src/frontend/components/property-type/datetime/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/datetime/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/datetime/map-value.d.ts +3 -0
- package/types/src/frontend/components/property-type/datetime/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/datetime/strip-time-from-iso.d.ts +1 -0
- package/types/src/frontend/components/property-type/default-type/default-property-value.d.ts +6 -0
- package/types/src/frontend/components/property-type/default-type/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/default-type/filter.d.ts +10 -0
- package/types/src/frontend/components/property-type/default-type/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/default-type/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/default-type/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/default-type/show.spec.d.ts +3 -0
- package/types/src/frontend/components/property-type/index.d.ts +16 -0
- package/types/src/frontend/components/property-type/key-value/edit.d.ts +15 -0
- package/types/src/frontend/components/property-type/key-value/index.d.ts +3 -0
- package/types/src/frontend/components/property-type/key-value/show.d.ts +8 -0
- package/types/src/frontend/components/property-type/mixed/convert-to-sub-property.d.ts +2 -0
- package/types/src/frontend/components/property-type/mixed/edit.d.ts +14 -0
- package/types/src/frontend/components/property-type/mixed/index.d.ts +4 -0
- package/types/src/frontend/components/property-type/mixed/list.d.ts +16 -0
- package/types/src/frontend/components/property-type/mixed/show.d.ts +9 -0
- package/types/src/frontend/components/property-type/password/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/password/index.d.ts +2 -0
- package/types/src/frontend/components/property-type/phone/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/phone/filter.d.ts +10 -0
- package/types/src/frontend/components/property-type/phone/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/phone/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/phone/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/record-property-is-equal.d.ts +8 -0
- package/types/src/frontend/components/property-type/reference/edit.d.ts +10 -0
- package/types/src/frontend/components/property-type/reference/filter.d.ts +10 -0
- package/types/src/frontend/components/property-type/reference/index.d.ts +5 -0
- package/types/src/frontend/components/property-type/reference/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/reference/reference-value.d.ts +7 -0
- package/types/src/frontend/components/property-type/reference/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/richtext/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/richtext/index.d.ts +4 -0
- package/types/src/frontend/components/property-type/richtext/list.d.ts +6 -0
- package/types/src/frontend/components/property-type/richtext/show.d.ts +9 -0
- package/types/src/frontend/components/property-type/textarea/edit.d.ts +9 -0
- package/types/src/frontend/components/property-type/textarea/index.d.ts +3 -0
- package/types/src/frontend/components/property-type/textarea/show.d.ts +6 -0
- package/types/src/frontend/components/property-type/utils/index.d.ts +2 -0
- package/types/src/frontend/components/property-type/utils/property-description/index.d.ts +1 -0
- package/types/src/frontend/components/property-type/utils/property-description/property-description.d.ts +9 -0
- package/types/src/frontend/components/property-type/utils/property-label/index.d.ts +1 -0
- package/types/src/frontend/components/property-type/utils/property-label/property-label.d.ts +12 -0
- package/types/src/frontend/components/routes/bulk-action.d.ts +5 -0
- package/types/src/frontend/components/routes/dashboard.d.ts +28 -0
- package/types/src/frontend/components/routes/index.d.ts +6 -0
- package/types/src/frontend/components/routes/page.d.ts +5 -0
- package/types/src/frontend/components/routes/record-action.d.ts +5 -0
- package/types/src/frontend/components/routes/record-action.spec.d.ts +1 -0
- package/types/src/frontend/components/routes/resource-action.d.ts +11 -0
- package/types/src/frontend/components/routes/resource.d.ts +11 -0
- package/types/src/frontend/components/routes/utils/should-action-re-fetch-data.d.ts +13 -0
- package/types/src/frontend/components/routes/utils/wrapper.d.ts +3 -0
- package/types/src/frontend/components/spec/action-json.factory.d.ts +1 -0
- package/types/src/frontend/components/spec/factory.d.ts +7 -0
- package/types/src/frontend/components/spec/initialize-translations.d.ts +1 -0
- package/types/src/frontend/components/spec/page-json.factory.d.ts +1 -0
- package/types/src/frontend/components/spec/property-json.factory.d.ts +1 -0
- package/types/src/frontend/components/spec/record-json.factory.d.ts +1 -0
- package/types/src/frontend/components/spec/resource-json.factory.d.ts +1 -0
- package/types/src/frontend/components/spec/test-context-provider.d.ts +7 -0
- package/types/src/frontend/hoc/allow-override.d.ts +17 -0
- package/types/src/frontend/hoc/index.d.ts +3 -0
- package/types/src/frontend/hoc/with-no-ssr.d.ts +10 -0
- package/types/src/frontend/hoc/with-notice.d.ts +38 -0
- package/types/src/frontend/hooks/index.d.ts +14 -0
- package/types/src/frontend/hooks/use-action/index.d.ts +3 -0
- package/types/src/frontend/hooks/use-action/use-action-response-handler.d.ts +3 -0
- package/types/src/frontend/hooks/use-action/use-action.d.ts +15 -0
- package/types/src/frontend/hooks/use-action/use-action.types.d.ts +30 -0
- package/types/src/frontend/hooks/use-current-admin.d.ts +39 -0
- package/types/src/frontend/hooks/use-filter-drawer.d.ts +7 -0
- package/types/src/frontend/hooks/use-history-listen.d.ts +2 -0
- package/types/src/frontend/hooks/use-local-storage/index.d.ts +2 -0
- package/types/src/frontend/hooks/use-local-storage/use-local-storage-result.type.d.ts +16 -0
- package/types/src/frontend/hooks/use-local-storage/use-local-storage.d.ts +15 -0
- package/types/src/frontend/hooks/use-modal.d.ts +2 -0
- package/types/src/frontend/hooks/use-navigation-resources.d.ts +4 -0
- package/types/src/frontend/hooks/use-notice.d.ts +29 -0
- package/types/src/frontend/hooks/use-query-params.d.ts +35 -0
- package/types/src/frontend/hooks/use-record/filter-record.d.ts +4 -0
- package/types/src/frontend/hooks/use-record/filter-record.spec.d.ts +1 -0
- package/types/src/frontend/hooks/use-record/index.d.ts +6 -0
- package/types/src/frontend/hooks/use-record/is-entire-record-given.d.ts +3 -0
- package/types/src/frontend/hooks/use-record/merge-record-response.d.ts +14 -0
- package/types/src/frontend/hooks/use-record/params-to-form-data.d.ts +17 -0
- package/types/src/frontend/hooks/use-record/params-to-form-data.spec.d.ts +1 -0
- package/types/src/frontend/hooks/use-record/update-record.d.ts +29 -0
- package/types/src/frontend/hooks/use-record/update-record.spec.d.ts +1 -0
- package/types/src/frontend/hooks/use-record/use-record.d.ts +15 -0
- package/types/src/frontend/hooks/use-record/use-record.type.d.ts +92 -0
- package/types/src/frontend/hooks/use-records/index.d.ts +2 -0
- package/types/src/frontend/hooks/use-records/use-records-result.type.d.ts +29 -0
- package/types/src/frontend/hooks/use-records/use-records.d.ts +14 -0
- package/types/src/frontend/hooks/use-resource/index.d.ts +1 -0
- package/types/src/frontend/hooks/use-resource/use-resource.d.ts +11 -0
- package/types/src/frontend/hooks/use-selected-records/index.d.ts +2 -0
- package/types/src/frontend/hooks/use-selected-records/use-selected-records-result.type.d.ts +17 -0
- package/types/src/frontend/hooks/use-selected-records/use-selected-records.d.ts +14 -0
- package/types/src/frontend/hooks/use-translation.d.ts +51 -0
- package/types/src/frontend/index.d.ts +6 -0
- package/types/src/frontend/interfaces/action/action-has-component.d.ts +3 -0
- package/types/src/frontend/interfaces/action/action-href.d.ts +3 -0
- package/types/src/frontend/interfaces/action/action-json.interface.d.ts +84 -0
- package/types/src/frontend/interfaces/action/build-action-api-call-trigger.d.ts +12 -0
- package/types/src/frontend/interfaces/action/build-action-click-handler.d.ts +16 -0
- package/types/src/frontend/interfaces/action/build-action-test-id.d.ts +2 -0
- package/types/src/frontend/interfaces/action/call-action-api.d.ts +5 -0
- package/types/src/frontend/interfaces/action/index.d.ts +10 -0
- package/types/src/frontend/interfaces/action/is-bulk-action.d.ts +4 -0
- package/types/src/frontend/interfaces/action/is-record-action.d.ts +4 -0
- package/types/src/frontend/interfaces/action/is-resource-action.d.ts +3 -0
- package/types/src/frontend/interfaces/index.d.ts +7 -0
- package/types/src/frontend/interfaces/modal.interface.d.ts +19 -0
- package/types/src/frontend/interfaces/noticeMessage.interface.d.ts +14 -0
- package/types/src/frontend/interfaces/page-json.interface.d.ts +19 -0
- package/types/src/frontend/interfaces/property-json/index.d.ts +1 -0
- package/types/src/frontend/interfaces/property-json/property-json.interface.d.ts +157 -0
- package/types/src/frontend/interfaces/record-json.interface.d.ts +51 -0
- package/types/src/frontend/interfaces/resource-json.interface.d.ts +71 -0
- package/types/src/frontend/layout-template.d.ts +14 -0
- package/types/src/frontend/layout-template.spec.d.ts +1 -0
- package/types/src/frontend/login-template.d.ts +8 -0
- package/types/src/frontend/login-template.spec.d.ts +1 -0
- package/types/src/frontend/store/actions/add-notice.d.ts +8 -0
- package/types/src/frontend/store/actions/drop-notice.d.ts +8 -0
- package/types/src/frontend/store/actions/filter-drawer.d.ts +11 -0
- package/types/src/frontend/store/actions/index.d.ts +16 -0
- package/types/src/frontend/store/actions/initialize-assets.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-branding.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-dashboard.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-locale.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-pages.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-paths.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-resources.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-theme.d.ts +7 -0
- package/types/src/frontend/store/actions/initialize-versions.d.ts +7 -0
- package/types/src/frontend/store/actions/modal.d.ts +5 -0
- package/types/src/frontend/store/actions/route-changed.d.ts +9 -0
- package/types/src/frontend/store/actions/set-current-admin.d.ts +7 -0
- package/types/src/frontend/store/actions/set-drawer-preroute.d.ts +11 -0
- package/types/src/frontend/store/actions/set-notice-progress.d.ts +10 -0
- package/types/src/frontend/store/index.d.ts +5 -0
- package/types/src/frontend/store/initialize-store.d.ts +6 -0
- package/types/src/frontend/store/reducers/assetsReducer.d.ts +5 -0
- package/types/src/frontend/store/reducers/brandingReducer.d.ts +5 -0
- package/types/src/frontend/store/reducers/dashboardReducer.d.ts +7 -0
- package/types/src/frontend/store/reducers/drawerReducer.d.ts +10 -0
- package/types/src/frontend/store/reducers/filterDrawerReducer.d.ts +7 -0
- package/types/src/frontend/store/reducers/index.d.ts +15 -0
- package/types/src/frontend/store/reducers/localesReducer.d.ts +6 -0
- package/types/src/frontend/store/reducers/modalReducer.d.ts +10 -0
- package/types/src/frontend/store/reducers/noticesReducer.d.ts +12 -0
- package/types/src/frontend/store/reducers/pagesReducer.d.ts +6 -0
- package/types/src/frontend/store/reducers/pathsReducer.d.ts +10 -0
- package/types/src/frontend/store/reducers/resourcesReducer.d.ts +6 -0
- package/types/src/frontend/store/reducers/routerReducer.d.ts +22 -0
- package/types/src/frontend/store/reducers/sessionReducer.d.ts +6 -0
- package/types/src/frontend/store/reducers/themeReducer.d.ts +8 -0
- package/types/src/frontend/store/reducers/versionsReducer.d.ts +5 -0
- package/types/src/frontend/store/store.d.ts +21 -0
- package/types/src/frontend/store/utils/pages-to-store.d.ts +3 -0
- package/types/src/frontend/utils/adminjs.i18n.d.ts +11 -0
- package/types/src/frontend/utils/api-client.d.ts +130 -0
- package/types/src/frontend/utils/data-css-name.d.ts +3 -0
- package/types/src/frontend/utils/index.d.ts +3 -0
- package/types/src/frontend/utils/overridable-component.d.ts +11 -0
- package/types/src/index.d.ts +9 -0
- package/types/src/locale/config.d.ts +87 -0
- package/types/src/locale/default-config.d.ts +5 -0
- package/types/src/locale/index.d.ts +4 -0
- package/types/src/utils/error-type.enum.d.ts +10 -0
- package/types/src/utils/file-resolver.d.ts +6 -0
- package/types/src/utils/flat/constants.d.ts +2 -0
- package/types/src/utils/flat/filter-out-params.d.ts +10 -0
- package/types/src/utils/flat/filter-out-params.spec.d.ts +1 -0
- package/types/src/utils/flat/flat-module.d.ts +28 -0
- package/types/src/utils/flat/flat.types.d.ts +36 -0
- package/types/src/utils/flat/get.d.ts +13 -0
- package/types/src/utils/flat/get.spec.d.ts +1 -0
- package/types/src/utils/flat/index.d.ts +2 -0
- package/types/src/utils/flat/merge.d.ts +11 -0
- package/types/src/utils/flat/merge.spec.d.ts +1 -0
- package/types/src/utils/flat/path-parts.type.d.ts +1 -0
- package/types/src/utils/flat/path-to-parts.d.ts +22 -0
- package/types/src/utils/flat/property-key-regex.d.ts +2 -0
- package/types/src/utils/flat/remove-path.d.ts +10 -0
- package/types/src/utils/flat/remove-path.spec.d.ts +1 -0
- package/types/src/utils/flat/select-params.d.ts +11 -0
- package/types/src/utils/flat/select-params.spec.d.ts +1 -0
- package/types/src/utils/flat/set.d.ts +11 -0
- package/types/src/utils/flat/set.spec.d.ts +1 -0
- package/types/src/utils/index.d.ts +4 -0
- package/types/src/utils/param-converter/constants.d.ts +2 -0
- package/types/src/utils/param-converter/convert-nested-param.d.ts +3 -0
- package/types/src/utils/param-converter/convert-nested-param.spec.d.ts +1 -0
- package/types/src/utils/param-converter/convert-param.d.ts +2 -0
- package/types/src/utils/param-converter/convert-param.spec.d.ts +1 -0
- package/types/src/utils/param-converter/index.d.ts +1 -0
- package/types/src/utils/param-converter/param-converter-module.d.ts +11 -0
- package/types/src/utils/param-converter/prepare-params.d.ts +3 -0
- package/types/src/utils/param-converter/validate-param.d.ts +8 -0
- package/types/src/utils/slash/index.d.ts +1 -0
- package/types/src/utils/theme-bundler.d.ts +2 -0
- package/types/src/utils/translate-functions.factory.d.ts +142 -0
- package/types/vendor-types/global.d.ts +15 -0
- package/vendor-types/chai/index.d.ts +14 -0
- package/vendor-types/global.ts +18 -0
- package/vendor-types/node/node.d.ts +10 -0
package/.babelrc.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
"@babel/preset-react",
|
|
4
|
+
["@babel/preset-env", {
|
|
5
|
+
"targets": {
|
|
6
|
+
"node": "18"
|
|
7
|
+
},
|
|
8
|
+
"loose": true,
|
|
9
|
+
"modules": false
|
|
10
|
+
}],
|
|
11
|
+
["@babel/preset-typescript"]
|
|
12
|
+
],
|
|
13
|
+
"plugins": [
|
|
14
|
+
"@babel/plugin-syntax-import-assertions"
|
|
15
|
+
],
|
|
16
|
+
"only": ["src/", "spec/"],
|
|
17
|
+
"ignore": [
|
|
18
|
+
"src/frontend/assets/scripts/app-bundle.development.js",
|
|
19
|
+
"src/frontend/assets/scripts/app-bundle.production.js",
|
|
20
|
+
"src/frontend/assets/scripts/global-bundle.development.js",
|
|
21
|
+
"src/frontend/assets/scripts/global-bundle.production.js"
|
|
22
|
+
],
|
|
23
|
+
"generatorOpts": {
|
|
24
|
+
"importAttributesKeyword": "with"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/.cspell.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1",
|
|
3
|
+
"language": "en",
|
|
4
|
+
"words": [
|
|
5
|
+
"crossorigin", "nullish", "envs", "prefetch", "expressjs", "icomoon", "populator",
|
|
6
|
+
"unflatten", "datetime", "richtext", "promisify", "hoverable", "dropdown", "flatpickr",
|
|
7
|
+
"codecov", "bulma", "unmount", "testid", "woff", "iife", "sourcemap", "Roboto",
|
|
8
|
+
"camelize", "datepicker", "camelcase", "fullwidth", "wysiwig", "Helvetica", "Neue",
|
|
9
|
+
"Arial", "nowrap", "textfield", "scrollable", "flexbox", "treal", "xxxl",
|
|
10
|
+
"adminjs", "Checkmark", "overridable", "Postgres", "Hana", "Wojtek", "Krysiak", "bigint",
|
|
11
|
+
"borderless", "metadetaksamosone", "esrever", "jsnext", "Никита"
|
|
12
|
+
],
|
|
13
|
+
"ignorePaths": [
|
|
14
|
+
"src/frontend/assets/**/*"
|
|
15
|
+
]
|
|
16
|
+
}
|
package/.dockerignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
plugins: ['@typescript-eslint', 'mocha'],
|
|
4
|
+
env: {
|
|
5
|
+
es6: true,
|
|
6
|
+
node: true,
|
|
7
|
+
mocha: true,
|
|
8
|
+
},
|
|
9
|
+
extends: ['airbnb', 'plugin:@typescript-eslint/recommended', 'plugin:mocha/recommended', 'plugin:import/typescript'],
|
|
10
|
+
parserOptions: {
|
|
11
|
+
ecmaVersion: 2020,
|
|
12
|
+
sourceType: 'module',
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
'react/jsx-filename-extension': 'off',
|
|
16
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
17
|
+
indent: ['error', 2],
|
|
18
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
19
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
20
|
+
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
21
|
+
'import/prefer-default-export': 'off',
|
|
22
|
+
'linebreak-style': ['error', 'unix'],
|
|
23
|
+
quotes: ['error', 'single'],
|
|
24
|
+
semi: ['error', 'never'],
|
|
25
|
+
'import/no-unresolved': 'off',
|
|
26
|
+
'func-names': 'off',
|
|
27
|
+
'no-underscore-dangle': 'off',
|
|
28
|
+
'guard-for-in': 'off',
|
|
29
|
+
'no-restricted-syntax': 'off',
|
|
30
|
+
'no-await-in-loop': 'off',
|
|
31
|
+
'object-curly-newline': 'off',
|
|
32
|
+
'import/extensions': [2, 'ignorePackages'],
|
|
33
|
+
'mocha/no-hooks-for-single-case': 'off',
|
|
34
|
+
'no-param-reassign': 'off',
|
|
35
|
+
'default-param-last': 'off',
|
|
36
|
+
'no-use-before-define': 'off',
|
|
37
|
+
'no-restricted-exports': 'off',
|
|
38
|
+
'react/require-default-props': 'off',
|
|
39
|
+
'react/jsx-props-no-spreading': 'off',
|
|
40
|
+
'react/function-component-definition': 'off',
|
|
41
|
+
'max-classes-per-file': 'off',
|
|
42
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
43
|
+
'import/no-import-module-exports': 'off',
|
|
44
|
+
},
|
|
45
|
+
ignorePatterns: [
|
|
46
|
+
'*/build/**/*',
|
|
47
|
+
'*.json',
|
|
48
|
+
'*.txt',
|
|
49
|
+
'*.md',
|
|
50
|
+
'*.lock',
|
|
51
|
+
'*.log',
|
|
52
|
+
'*.yaml',
|
|
53
|
+
'**/*/frontend/assets/**/*',
|
|
54
|
+
'*.d.ts',
|
|
55
|
+
'*.config.js',
|
|
56
|
+
],
|
|
57
|
+
overrides: [
|
|
58
|
+
{
|
|
59
|
+
files: ['*-test.js', '*.spec.js', '*-test.ts', '*.spec.ts', '*.spec.tsx', '*.factory.ts', '*.factory.js'],
|
|
60
|
+
rules: {
|
|
61
|
+
'no-unused-expressions': 'off',
|
|
62
|
+
'func-names': 'off',
|
|
63
|
+
'prefer-arrow-callback': 'off',
|
|
64
|
+
'import/no-extraneous-dependencies': 'off',
|
|
65
|
+
'mocha/no-mocha-arrows': 'off',
|
|
66
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
files: ['*.jsx', '*.js'],
|
|
71
|
+
rules: {
|
|
72
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
files: ['*.cjs'],
|
|
77
|
+
rules: {
|
|
78
|
+
'import/no-commonjs': 'off',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
files: ['*.tsx'],
|
|
83
|
+
rules: {
|
|
84
|
+
'react/prop-types': 'off',
|
|
85
|
+
'react/function-component-definition': 'off',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
files: ['**/*/cypress/integration/**/*.spec.js', './cy/**/*.js'],
|
|
90
|
+
rules: {
|
|
91
|
+
'mocha/no-mocha-arrows': 'off',
|
|
92
|
+
'spaced-comment': 'off',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
settings: {
|
|
97
|
+
'import/resolver': {
|
|
98
|
+
node: {
|
|
99
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
globals: {
|
|
104
|
+
expect: true,
|
|
105
|
+
factory: true,
|
|
106
|
+
sandbox: true,
|
|
107
|
+
server: true,
|
|
108
|
+
window: true,
|
|
109
|
+
AdminJS: true,
|
|
110
|
+
flatpickr: true,
|
|
111
|
+
FormData: true,
|
|
112
|
+
File: true,
|
|
113
|
+
cy: true,
|
|
114
|
+
Cypress: true,
|
|
115
|
+
},
|
|
116
|
+
}
|
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug report
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug", "triage"]
|
|
5
|
+
assignees:
|
|
6
|
+
- octocat
|
|
7
|
+
body:
|
|
8
|
+
- type: markdown
|
|
9
|
+
attributes:
|
|
10
|
+
value: |
|
|
11
|
+
Thanks for taking the time to fill out this bug report!
|
|
12
|
+
- type: input
|
|
13
|
+
id: contact
|
|
14
|
+
attributes:
|
|
15
|
+
label: Contact Details
|
|
16
|
+
description: How can we get in touch with you if we need more info?
|
|
17
|
+
placeholder: Please visit our Discord channel [Discord](https://adminjs.page.link/discord) or leave your email.
|
|
18
|
+
validations:
|
|
19
|
+
required: false
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: what-happened
|
|
22
|
+
attributes:
|
|
23
|
+
label: What happened?
|
|
24
|
+
description: Also tell us, what did you expect to happen?
|
|
25
|
+
placeholder: Tell us what you see!
|
|
26
|
+
value: "List what you are trying to do?"
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
- type: input
|
|
30
|
+
id: prevalence
|
|
31
|
+
attributes:
|
|
32
|
+
label: Bug prevalence
|
|
33
|
+
description: "How often do you or others encounter this bug?"
|
|
34
|
+
placeholder: "Example: Whenever I visit the personal account page (1-2 times a week)"
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: versions
|
|
39
|
+
attributes:
|
|
40
|
+
label: AdminJS dependencies version
|
|
41
|
+
description: "Provide to us a list of dependencies from package.json "
|
|
42
|
+
placeholder: "Copy exact versions of plugins that you are currently using"
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
- type: dropdown
|
|
46
|
+
id: browsers
|
|
47
|
+
attributes:
|
|
48
|
+
label: What browsers do you see the problem on?
|
|
49
|
+
multiple: true
|
|
50
|
+
options:
|
|
51
|
+
- Firefox
|
|
52
|
+
- Chrome
|
|
53
|
+
- Safari
|
|
54
|
+
- Microsoft Edge
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: logs
|
|
57
|
+
attributes:
|
|
58
|
+
label: Relevant log output
|
|
59
|
+
description: Please copy and paste any relevant log output or drag&drop screenshot of code. This will be automatically formatted into code, so no need for backticks.
|
|
60
|
+
render: bash
|
|
61
|
+
- type: textarea
|
|
62
|
+
id: code
|
|
63
|
+
attributes:
|
|
64
|
+
label: Relevant code that's giving you issues
|
|
65
|
+
description: Please copy and paste any relevant code or drag&drop screenshot of code. This will be automatically formatted into code, so no need for backticks.
|
|
66
|
+
render: TypeScript
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🛠️ Feature Request
|
|
3
|
+
description: Suggest an idea to help us improve AdminJS
|
|
4
|
+
title: "[Feature]: "
|
|
5
|
+
labels:
|
|
6
|
+
- "feature_request"
|
|
7
|
+
|
|
8
|
+
body:
|
|
9
|
+
- type: markdown
|
|
10
|
+
attributes:
|
|
11
|
+
value: |
|
|
12
|
+
**Thanks :heart: for taking the time to fill out this feature request report!**
|
|
13
|
+
We kindly ask that you search to see if an issue [already exists](https://github.com/SoftwareBrothers/adminjs#:~:text=OpenSource%20SoftwareBrothers%20community-,Join%20the%20community,-to%20get%20help) for your feature.
|
|
14
|
+
|
|
15
|
+
We are also happy to accept contributions from our users. For more details see [here](https://github.com/SoftwareBrothers/adminjs/blob/master/CONTRIBUTING.md).
|
|
16
|
+
|
|
17
|
+
- type: textarea
|
|
18
|
+
attributes:
|
|
19
|
+
label: Description
|
|
20
|
+
description: |
|
|
21
|
+
A clear and concise description of the feature you're interested in.
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
|
|
25
|
+
- type: textarea
|
|
26
|
+
attributes:
|
|
27
|
+
label: Suggested Solution
|
|
28
|
+
description: |
|
|
29
|
+
Describe the solution you'd like. A clear and concise description of what you want to happen.
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
|
|
33
|
+
- type: textarea
|
|
34
|
+
attributes:
|
|
35
|
+
label: Alternatives
|
|
36
|
+
description: |
|
|
37
|
+
Describe alternatives you've considered.
|
|
38
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
39
|
+
validations:
|
|
40
|
+
required: false
|
|
41
|
+
|
|
42
|
+
- type: textarea
|
|
43
|
+
attributes:
|
|
44
|
+
label: Additional Context
|
|
45
|
+
description: |
|
|
46
|
+
Add any other context about the problem here.
|
|
47
|
+
validations:
|
|
48
|
+
required: false
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
setup:
|
|
6
|
+
name: setup
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout
|
|
10
|
+
uses: actions/checkout@v3
|
|
11
|
+
- name: Setup
|
|
12
|
+
uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: '18'
|
|
15
|
+
cache: 'yarn'
|
|
16
|
+
- name: Install
|
|
17
|
+
run: yarn install --frozen-lockfile
|
|
18
|
+
|
|
19
|
+
build:
|
|
20
|
+
name: build
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
needs: setup
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v3
|
|
26
|
+
- name: Setup
|
|
27
|
+
uses: actions/setup-node@v3
|
|
28
|
+
with:
|
|
29
|
+
node-version: '18'
|
|
30
|
+
cache: 'yarn'
|
|
31
|
+
- name: Install
|
|
32
|
+
run: yarn install
|
|
33
|
+
- name: Assets cache
|
|
34
|
+
uses: actions/cache@v3
|
|
35
|
+
id: assets-cache
|
|
36
|
+
with:
|
|
37
|
+
path: src/frontend/assets/scripts
|
|
38
|
+
key: assets-${{ hashFiles('**/src/frontend/global-entry.js') }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/bin/bundle-globals.js') }}
|
|
39
|
+
restore-keys: |
|
|
40
|
+
assets-
|
|
41
|
+
- name: build
|
|
42
|
+
run: yarn build
|
|
43
|
+
- name: types
|
|
44
|
+
run: yarn types
|
|
45
|
+
- name: bundle globals production
|
|
46
|
+
if: steps.assets-cache.outputs.cache-hit != 'true'
|
|
47
|
+
run: NODE_ENV=production yarn bundle:globals
|
|
48
|
+
- name: bundle globals dev
|
|
49
|
+
if: steps.assets-cache.outputs.cache-hit != 'true'
|
|
50
|
+
run: NODE_ENV=dev yarn bundle:globals
|
|
51
|
+
- name: bundle production
|
|
52
|
+
run: NODE_ENV=production ONCE=true yarn bundle
|
|
53
|
+
- name: bundle dev
|
|
54
|
+
run: ONCE=true yarn bundle
|
|
55
|
+
- name: Upload Build
|
|
56
|
+
if: |
|
|
57
|
+
contains(github.ref, 'refs/heads/master')
|
|
58
|
+
|| contains(github.ref, 'refs/heads/beta-v7')
|
|
59
|
+
|| contains(github.ref, 'refs/heads/beta')
|
|
60
|
+
uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: lib
|
|
63
|
+
path: lib
|
|
64
|
+
- name: Upload Types
|
|
65
|
+
if: |
|
|
66
|
+
contains(github.ref, 'refs/heads/master')
|
|
67
|
+
|| contains(github.ref, 'refs/heads/beta-v7')
|
|
68
|
+
|| contains(github.ref, 'refs/heads/beta')
|
|
69
|
+
uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: types
|
|
72
|
+
path: types
|
|
73
|
+
- name: Upload Bundle
|
|
74
|
+
if: |
|
|
75
|
+
contains(github.ref, 'refs/heads/master')
|
|
76
|
+
|| contains(github.ref, 'refs/heads/beta-v7')
|
|
77
|
+
|| contains(github.ref, 'refs/heads/beta')
|
|
78
|
+
uses: actions/upload-artifact@v4
|
|
79
|
+
with:
|
|
80
|
+
name: bundle
|
|
81
|
+
path: lib/frontend/assets/scripts
|
|
82
|
+
|
|
83
|
+
test:
|
|
84
|
+
name: Test
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
needs: setup
|
|
87
|
+
steps:
|
|
88
|
+
- name: Checkout
|
|
89
|
+
uses: actions/checkout@v3
|
|
90
|
+
- name: Setup
|
|
91
|
+
uses: actions/setup-node@v3
|
|
92
|
+
with:
|
|
93
|
+
node-version: '18'
|
|
94
|
+
cache: 'yarn'
|
|
95
|
+
- name: Install
|
|
96
|
+
run: yarn install
|
|
97
|
+
- name: Lint
|
|
98
|
+
run: yarn lint
|
|
99
|
+
- name: spell
|
|
100
|
+
run: yarn cspell
|
|
101
|
+
- name: install codecov
|
|
102
|
+
run: yarn global add codecov
|
|
103
|
+
if: contains(github.ref, 'refs/heads/master')
|
|
104
|
+
- name: cover
|
|
105
|
+
if: contains(github.ref, 'refs/heads/master')
|
|
106
|
+
run: yarn codecov
|
|
107
|
+
env:
|
|
108
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
109
|
+
- name: test
|
|
110
|
+
if: "!contains(github.ref, 'refs/heads/master')"
|
|
111
|
+
run: yarn test
|
|
112
|
+
|
|
113
|
+
publish:
|
|
114
|
+
name: Publish
|
|
115
|
+
if: |
|
|
116
|
+
github.event_name == 'push'
|
|
117
|
+
&& (
|
|
118
|
+
contains(github.ref, 'refs/heads/master')
|
|
119
|
+
|| contains(github.ref, 'refs/heads/beta-v7')
|
|
120
|
+
|| contains(github.ref, 'refs/heads/beta')
|
|
121
|
+
)
|
|
122
|
+
needs:
|
|
123
|
+
- test
|
|
124
|
+
- build
|
|
125
|
+
services:
|
|
126
|
+
mongo:
|
|
127
|
+
image: mongo:3.4.23
|
|
128
|
+
ports:
|
|
129
|
+
- 27017:27017
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
steps:
|
|
132
|
+
- name: Checkout
|
|
133
|
+
uses: actions/checkout@v3
|
|
134
|
+
- name: Setup
|
|
135
|
+
uses: actions/setup-node@v3
|
|
136
|
+
with:
|
|
137
|
+
node-version: '18'
|
|
138
|
+
cache: 'yarn'
|
|
139
|
+
- name: Install
|
|
140
|
+
run: yarn install
|
|
141
|
+
- name: Download Build
|
|
142
|
+
uses: actions/download-artifact@v4
|
|
143
|
+
with:
|
|
144
|
+
name: lib
|
|
145
|
+
path: lib
|
|
146
|
+
- name: Download Types
|
|
147
|
+
uses: actions/download-artifact@v4
|
|
148
|
+
with:
|
|
149
|
+
name: types
|
|
150
|
+
path: types
|
|
151
|
+
- name: Download Bundle
|
|
152
|
+
uses: actions/download-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: bundle
|
|
155
|
+
path: bundle
|
|
156
|
+
- name: Check directories exists
|
|
157
|
+
uses: andstor/file-existence-action@v2
|
|
158
|
+
with:
|
|
159
|
+
files: "bundle/, lib/, types/"
|
|
160
|
+
fail: true
|
|
161
|
+
- name: Release
|
|
162
|
+
env:
|
|
163
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
164
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
165
|
+
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
|
|
166
|
+
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
|
|
167
|
+
run: yarn release
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 100,
|
|
3
|
+
"singleQuote": true,
|
|
4
|
+
"trailingComma": "all",
|
|
5
|
+
"semi": false,
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": ["*.ts", "*.tsx"],
|
|
9
|
+
"options": {
|
|
10
|
+
"parser": "typescript"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"files": "*.css",
|
|
15
|
+
"options": {
|
|
16
|
+
"singleQuote": false,
|
|
17
|
+
"tabWidth": 2
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
package/.releaserc
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": [
|
|
3
|
+
"+([0-9])?(.{+([0-9]),x}).x",
|
|
4
|
+
"master",
|
|
5
|
+
{
|
|
6
|
+
"name": "beta",
|
|
7
|
+
"prerelease": true
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "beta-v7",
|
|
11
|
+
"prerelease": true
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"plugins": [
|
|
15
|
+
["@semantic-release/commit-analyzer", {
|
|
16
|
+
"preset": "angular",
|
|
17
|
+
"releaseRules": [
|
|
18
|
+
{"type": "feat", "scope": "locale", "release": "patch"},
|
|
19
|
+
{"type": "feat", "scope": "small", "release": "patch"},
|
|
20
|
+
{"type": "chore", "scope": "deps", "release": "patch"},
|
|
21
|
+
{"scope": "no-release", "release": false}
|
|
22
|
+
]
|
|
23
|
+
}],
|
|
24
|
+
"@semantic-release/release-notes-generator",
|
|
25
|
+
"@semantic-release/npm",
|
|
26
|
+
"@semantic-release/github",
|
|
27
|
+
"@semantic-release/git"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to creating a positive environment include:
|
|
10
|
+
|
|
11
|
+
- Using welcoming and inclusive language
|
|
12
|
+
- Being respectful of differing viewpoints and experiences
|
|
13
|
+
- Gracefully accepting constructive criticism
|
|
14
|
+
- Attempting collaboration before conflict
|
|
15
|
+
- Focusing on what is best for the community
|
|
16
|
+
- Showing empathy towards other community members
|
|
17
|
+
|
|
18
|
+
Examples of unacceptable behavior by participants include:
|
|
19
|
+
|
|
20
|
+
- Violence, threats of violence, or inciting others to commit self-harm
|
|
21
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
22
|
+
- Trolling, intentionally spreading misinformation, insulting/derogatory comments, and personal or political attacks
|
|
23
|
+
- Public or private harassment
|
|
24
|
+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
25
|
+
- Abuse of the reporting process to intentionally harass or exclude others
|
|
26
|
+
- Advocating for, or encouraging, any of the above behavior
|
|
27
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
28
|
+
|
|
29
|
+
## Our Responsibilities
|
|
30
|
+
|
|
31
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
32
|
+
|
|
33
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
38
|
+
|
|
39
|
+
## Enforcement
|
|
40
|
+
|
|
41
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting us through adminjs@adminjs.co. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
42
|
+
|
|
43
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
44
|
+
|
|
45
|
+
If you are unsure whether an incident is a violation, or whether the space where the incident took place is covered by our Code of Conduct, **we encourage you to still report it**. We would prefer to have a few extra reports where we decide to take no action, than to leave an incident go unnoticed and unresolved that may result in an individual or group to feel like they can no longer participate in the community. Reports deemed as not a violation will also allow us to improve our Code of Conduct and processes surrounding it. If you witness a dangerous situation or someone in distress, we encourage you to report even if you are only an observer.
|
|
46
|
+
|
|
47
|
+
## Attribution
|
|
48
|
+
|
|
49
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# AdminJS Development
|
|
2
|
+
|
|
3
|
+
## Explanation of AdminJS libraries
|
|
4
|
+
There are three main terms we use to define AdminJS libraries, which are:
|
|
5
|
+
|
|
6
|
+
* Core - the main library, containing basically all the logic which you can find in `adminjs` repository
|
|
7
|
+
* Plugin - plugins are wrappers around popular frameworks which allow you to connect AdminJS to your Node.js server and build AdminJS-specific routes. For example `@adminjs/express`.
|
|
8
|
+
* Adapter - adapters are wrappers around supported ORMs and ODMs. They export classes which extend `BaseDatabase`, `BaseResource` and `BaseProperty` components. Their task is to translate AdminJS specific filters/queries to something understandable by your ORM/ODM of choice in order to communicate with the database. For example `@adminjs/typeorm`.
|
|
9
|
+
|
|
10
|
+
AdminJS also has got it's own design system library (`@clement_lores/admin-design-system`) and a set of premade `features` which you can import into your project (e. g. `@adminjs/passwords`).
|
|
11
|
+
|
|
12
|
+
## Contributing
|
|
13
|
+
|
|
14
|
+
### Development
|
|
15
|
+
If you want to contribute to the project, fork repositories you will be working on and after you're done with your changes, open a pull request.
|
|
16
|
+
|
|
17
|
+
AdminJS team uses [semantic-release](https://github.com/semantic-release/semantic-release) library to automatically create `releases` when a pull request is merged to `master` branch or `pre-releases` when a pull request is merged to `beta` branch. Additionally, based on your commit messages, the library automatically generates a changelog.
|
|
18
|
+
|
|
19
|
+
Because of this, there is a strict requirement on how you should name your `branches` and `commits`.
|
|
20
|
+
|
|
21
|
+
Branch names should be prefixed with `fix/`, `chore/`, `feat/` or `test/`.
|
|
22
|
+
|
|
23
|
+
Commit messages should start with `fix:`, `chore:`, `feat:`, `test:` with the following rules:
|
|
24
|
+
1. When a commit starting with `chore:` or `test:` is merged, it **will not** create a new release.
|
|
25
|
+
2. When a commit starting with `fix:` is merged, a release will be created which upgrades the patch version of the library (example: 6.0.0 -> 6.0.1).
|
|
26
|
+
3. When a commit starting with `feat:` is merged, a release will be created which upgrades the minor version of the library (example: 6.0.1 -> 6.1.0).
|
|
27
|
+
4. When a commit has `BREAKING CHANGE: xxxxx` inside of it's **description**, a release will be created which upgrades the major version of the library (example: 6.1.0 -> 7.0.0).
|
|
28
|
+
5. There are also additional rules defined in `.releaserc`:
|
|
29
|
+
- commits starting with `feat(locale):` and `feat(small):` will only upgrade the patch version despite being `feat` (feature) commits. This type of commit message should be used when you want to create a new translation (`feat(locale)`) or when you add a small feature that doesn't affect the library much (`feat(small)`).
|
|
30
|
+
- commits starting with `chore(deps):` will upgrade the patch version despite being `chore` commits. These are commits automatically created by [dependabot](https://github.com/dependabot) but you should also use this message type when you want to only upgrade a package manually.
|
|
31
|
+
6. When a pull request is merged which contains multiple commit messages, the higher version upgrades take precedence, for example a pull request with `feat:` and `fix:` messages will upgrade the `minor version` (because of `feat: ...` message) but both commit messages will appear in the changelog.
|
|
32
|
+
|
|
33
|
+
When you work on your bug fixes or new features, make sure they only concern the subject of your pull request. Ideally you would be using `git commit --amend` so that there's only one commit in your pull request.
|
|
34
|
+
If for some reason you want to make more than one change and you need to have multiple commit messages in a pull request, each commit message should only contain changes it refers to.
|
|
35
|
+
|
|
36
|
+
When a pull request contains a lot of commits without proper messages, we usually `squash` them when merging which can result in a poor release changelog.
|
|
37
|
+
|
|
38
|
+
### Issues
|
|
39
|
+
When creating an issue please try to describe your problem with as many details as possible. If your issue is a complex one and would require us to reproduce this to respond, a test repository or a code sample which would allow us to reproduce your problem would be ideal.
|
|
40
|
+
If possible, try to create issues by using our issues templates.
|
|
41
|
+
|
|
42
|
+
### Translations
|
|
43
|
+
|
|
44
|
+
You can contribute translations via the [fink localization editor](https://fink.inlang.com/github.com/SoftwareBrothers/adminjs).
|
|
45
|
+
|
|
46
|
+
[](https://fink.inlang.com/github.com/SoftwareBrothers/adminjs?ref=badge)
|
|
47
|
+
|
|
48
|
+
## Developing locally
|
|
49
|
+
|
|
50
|
+
### Basic example
|
|
51
|
+
To see your changes in your local environment you will, first of all, need a test application. You can clone our [example app](https://github.com/SoftwareBrothers/adminjs-example-app) or create your own.
|
|
52
|
+
|
|
53
|
+
Next, open terminal in your `adminjs` fork repository, install dependencies and run commands:
|
|
54
|
+
```bash
|
|
55
|
+
$ yarn dev
|
|
56
|
+
$ yarn bundle:globals # re-run it only after you install new dependencies
|
|
57
|
+
```
|
|
58
|
+
After this, run:
|
|
59
|
+
```bash
|
|
60
|
+
$ yarn link
|
|
61
|
+
```
|
|
62
|
+
to register `adminjs` under yarn's linked packages.
|
|
63
|
+
|
|
64
|
+
Now open terminal in your test application's project and link your local `adminjs` package:
|
|
65
|
+
```bash
|
|
66
|
+
$ yarn link "adminjs"
|
|
67
|
+
```
|
|
68
|
+
You should be able to see your local changes to `adminjs` package in your test application. However, you might have to restart your test application each time you make changes to `adminjs` local package.
|
|
69
|
+
|
|
70
|
+
### Advanced example
|
|
71
|
+
|
|
72
|
+
The case described above is the easiest one. Now let's assume you want to make changes to `@clement_lores/admin-design-system` package. This will require you to chain `yarn link` commands:
|
|
73
|
+
|
|
74
|
+
1. Fork and clone `adminjs-design-system` repository
|
|
75
|
+
2. Install dependencies of `adminjs-design-system` and run `yarn dev`
|
|
76
|
+
3. Register `@clement_lores/admin-design-system` under yarn's linked packages: `yarn link`
|
|
77
|
+
4. Since `@clement_lores/admin-design-system` is a dependency of `adminjs`, open `adminjs` project locally and run:
|
|
78
|
+
```bash
|
|
79
|
+
$ yarn link "@clement_lores/admin-design-system"
|
|
80
|
+
```
|
|
81
|
+
and rebuild it.
|
|
82
|
+
5. Run `yarn link` to register `adminjs` under yarn's linked packages (if you haven't done it before).
|
|
83
|
+
6. Link `adminjs` package in your test application:
|
|
84
|
+
```bash
|
|
85
|
+
$ yarn link "adminjs"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If you try to run your test application now, it should build fine, but you might see some errors when you try to open admin panel in your browser concerning multiple React instances.
|
|
89
|
+
This error occurs because when you install repository's dependencies locally, it will install all of them, meaning you will have `react` installed in your `adminjs-design-system` and `adminjs` folders but you may have only one React instance at a time. The easiest way to solve this would be to use a linked `react` package:
|
|
90
|
+
1. In your test application, run:
|
|
91
|
+
```bash
|
|
92
|
+
$ yarn add react@^18.1.0 react-dom@^18.1.0 styled-components@^5.3.5
|
|
93
|
+
```
|
|
94
|
+
We're also installing `react-dom` and `styled-components` because these two libraries also cause similar issues to `react`.
|
|
95
|
+
2. Navigate to installed `react`, `react-dom` and `styled-components` and register them under yarn linked packages:
|
|
96
|
+
```bash
|
|
97
|
+
$ cd node_modules/react && yarn link
|
|
98
|
+
$ cd ../../node_modules/react-dom && yarn link
|
|
99
|
+
$ cd ../../node_modules/react-i18next && yarn link
|
|
100
|
+
$ cd ../../node_modules/styled-components && yarn link
|
|
101
|
+
```
|
|
102
|
+
3. Now link those packages in your local `adminjs` and `adminjs-design-system` projects:
|
|
103
|
+
```bash
|
|
104
|
+
$ yarn link "react"
|
|
105
|
+
$ yarn link "react-dom"
|
|
106
|
+
$ yarn link "react-i18next"
|
|
107
|
+
$ yarn link "styled-components"
|
|
108
|
+
```
|
|
109
|
+
4. Your test application should now be working.
|
|
110
|
+
|
|
111
|
+
Having lots of registered packages can bring confusion, you can use the command below to find out which packages you have linked and where they are used:
|
|
112
|
+
```bash
|
|
113
|
+
$ ls -la ~/.config/yarn/link/
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`yarn link` documentation: https://classic.yarnpkg.com/en/docs/cli/link
|
|
117
|
+
|
|
118
|
+
### Alternative to yarn link
|
|
119
|
+
The alternative to `yarn link` is to clone our [adminjs-dev](https://github.com/SoftwareBrothers/adminjs-dev) repository. This repository has all AdminJS packages added as submodules in one [yarn workspace](https://classic.yarnpkg.com/lang/en/docs/workspaces/). The repository's README should be detailed enough to get you started.
|
|
120
|
+
|
|
121
|
+
Please note that using `yarn workspaces` also has it's issues that we haven't yet resolved. One of them is that all submodules dependencies are installed in the top level (in the root directory of `adminjs-dev`) and installing or updating any new dependency in for example `packages/adminjs` won't update it's `yarn.lock` file and you have to do it manually.
|
|
122
|
+
The upside is that you don't have to deal with `yarn link` dependency issues plus you're able to see your local changes in other submodules in the same workspace immediately.
|