adminizer 4.7.0-build.222 → 5.0.0-build.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +2 -1
- package/assets/add-a4odXvQk.js +1 -0
- package/assets/add-group-D-NleXth.js +1 -0
- package/assets/add-user-B4SVJT5P.js +1 -0
- package/assets/app-CtWuWD5N.css +1 -0
- package/assets/app-layout-eaSzcROf.js +1 -0
- package/assets/app.js +35 -39
- package/assets/catalog-ByUICd5z.js +6 -0
- package/assets/controls/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
- package/assets/controls/chunks/index-CjiZ2FIa.js +93 -0
- package/assets/controls/chunks/jsx-runtime-jIxVPx5o.js +31 -0
- package/assets/controls/chunks/use-appearance-CFLOwiSX.js +38 -0
- package/assets/controls/chunks/use-window-size-BXgBKW65.js +19 -0
- package/assets/controls/chunks/vanilla-picker-Dg97NL4h.js +529 -0
- package/assets/{RelationDialogStack-CnHFOYyR.css → controls/ckeditor.css} +1 -1
- package/assets/controls/ckeditor.es.js +83663 -0
- package/assets/controls/handsontable.css +1 -0
- package/assets/controls/handsontable.es.js +70550 -0
- package/assets/controls/jsoneditor.css +1 -0
- package/assets/controls/jsoneditor.es.js +42009 -0
- package/assets/controls/leaflet.css +1 -0
- package/assets/controls/leaflet.es.js +10299 -0
- package/assets/controls/monaco.es.js +618 -0
- package/assets/controls/toast-ui.css +1 -0
- package/assets/controls/toast-ui.es.js +41768 -0
- package/assets/dashboard-BYd8G2cW.js +3 -0
- package/assets/debounce-BMmXVQ06.js +1 -0
- package/assets/history-B8KIDy44.js +1 -0
- package/assets/init-user-8aUohVDq.js +1 -0
- package/assets/list-ChmtBGjG.js +4 -0
- package/assets/login-CO4laf6m.js +1 -0
- package/assets/manifest.json +60 -615
- package/assets/{media-manager-WcKe1EvD.js → media-manager-BDbpSSjH.js} +3 -3
- package/assets/module-D59aE9uv.js +1 -0
- package/assets/notification-DNoyfNmT.js +20 -0
- package/assets/register-DBYIMXGQ.js +1 -0
- package/assets/{ru-eW0WKkga.js → ru-rYKdQbWF.js} +1 -1
- package/assets/use-appearance-_EbbjHTh.js +1 -0
- package/assets/user-filters-list-BMFRwkYF.js +1 -0
- package/assets/welcome-37rNVUHt.js +1 -0
- package/controllers/add.d.ts +1 -1
- package/controllers/addGroup.js +3 -3
- package/controllers/addUser.js +3 -3
- package/controllers/catalog/Catalog.d.ts +1 -1
- package/controllers/catalog/Catalog.js +2 -1
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +2 -12
- package/controllers/catalog/FrontendCatalogAdapter.js +3 -16
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +2 -12
- package/controllers/catalog/FrontentCatalogAdapter.js +0 -16
- package/controllers/edit.js +6 -11
- package/controllers/editGroup.d.ts +1 -1
- package/controllers/editGroup.js +3 -3
- package/controllers/editUser.d.ts +1 -1
- package/controllers/editUser.js +3 -3
- package/controllers/feed.js +1 -1
- package/controllers/filter-fields/columns.js +1 -1
- package/controllers/filter-fields/getAllUserFilters.js +2 -2
- package/controllers/filter-fields/groups.js +2 -2
- package/controllers/filter-fields/savedFilters.js +1 -1
- package/controllers/history-actions/HistoryController.js +1 -1
- package/controllers/initUser.js +2 -2
- package/controllers/list.d.ts +1 -1
- package/controllers/login.d.ts +1 -1
- package/controllers/login.js +3 -3
- package/controllers/media-manager/ThumbController.js +2 -2
- package/controllers/media-manager/mediaManagerApi.js +13 -15
- package/controllers/register.d.ts +1 -1
- package/controllers/register.js +5 -5
- package/controllers/remove.d.ts +1 -1
- package/controllers/userApiKey.js +2 -2
- package/controllers/view.d.ts +1 -1
- package/controllers/view.js +5 -5
- package/controllers/widgets/Action.js +5 -2
- package/controllers/widgets/Info.js +1 -1
- package/controllers/widgets/filterInfo.js +1 -1
- package/files/favicon.png +0 -0
- package/helpers/accessRightsHelper.d.ts +6 -4
- package/helpers/accessRightsHelper.js +13 -0
- package/helpers/diffHelpers.js +1 -1
- package/helpers/fieldsHelper.d.ts +1 -1
- package/helpers/fieldsHelper.js +8 -4
- package/helpers/filterDatetimeHelper.d.ts +1 -1
- package/helpers/inertiaAddHelper.d.ts +6 -5
- package/helpers/inertiaAddHelper.js +45 -37
- package/helpers/inertiaAutHelper.js +5 -5
- package/helpers/inertiaGroupHelper.d.ts +4 -4
- package/helpers/inertiaMenuHelper.js +1 -1
- package/helpers/inertiaUserHelper.d.ts +3 -3
- package/helpers/inertiaUserHelper.js +1 -1
- package/helpers/menuHelper.d.ts +2 -2
- package/index.d.ts +18 -6
- package/index.js +18 -6
- package/interfaces/adminpanelConfig.d.ts +10 -33
- package/interfaces/global.d.ts +10 -15
- package/interfaces/listQueryBuilder.d.ts +1 -1
- package/lib/Adminizer.d.ts +25 -2
- package/lib/Adminizer.js +124 -50
- package/lib/DataAccessor.d.ts +9 -5
- package/lib/DataAccessor.js +89 -42
- package/lib/access-rights/AccessRightsHandler.d.ts +17 -0
- package/lib/access-rights/AccessRightsHandler.js +63 -0
- package/lib/ai-assistant/AbstractAiModelService.d.ts +5 -8
- package/lib/ai-assistant/AbstractAiModelService.js +3 -14
- package/lib/ai-assistant/AiAssistantHandler.d.ts +2 -2
- package/lib/app-manager/AdminizerApp.d.ts +228 -0
- package/lib/app-manager/AdminizerApp.js +17 -0
- package/lib/app-manager/AppManager.d.ts +18 -0
- package/lib/app-manager/AppManager.js +537 -0
- package/lib/app-manager/AssetHandler.d.ts +17 -0
- package/lib/app-manager/AssetHandler.js +67 -0
- package/lib/app-manager/ConfigLayerHandler.d.ts +18 -0
- package/lib/app-manager/ConfigLayerHandler.js +119 -0
- package/lib/app-manager/ControllerHandler.d.ts +25 -0
- package/lib/app-manager/ControllerHandler.js +140 -0
- package/lib/catalog/AbstractCatalog.d.ts +28 -19
- package/lib/catalog/AbstractCatalog.js +41 -10
- package/lib/catalog/CatalogHandler.d.ts +13 -0
- package/lib/catalog/CatalogHandler.js +48 -2
- package/lib/catalog/CatalogTemplateComponentHandler.d.ts +23 -0
- package/lib/catalog/CatalogTemplateComponentHandler.js +59 -0
- package/lib/controls/Control.d.ts +17 -0
- package/lib/controls/Control.js +1 -0
- package/lib/controls/ControlsHandler.d.ts +5 -6
- package/lib/controls/ControlsHandler.js +0 -13
- package/lib/controls/codeEditor/MonacoEditor.d.ts +3 -4
- package/lib/controls/codeEditor/MonacoEditor.js +13 -8
- package/lib/controls/geojsoneditor/GeoEditor.d.ts +3 -4
- package/lib/controls/geojsoneditor/GeoEditor.js +14 -9
- package/lib/controls/jsoneditor/JsonEditor.d.ts +5 -6
- package/lib/controls/jsoneditor/JsonEditor.js +14 -13
- package/lib/controls/markdown/ToastUiEditor.d.ts +5 -6
- package/lib/controls/markdown/ToastUiEditor.js +14 -13
- package/lib/controls/table/Handsontable.d.ts +5 -6
- package/lib/controls/table/Handsontable.js +14 -13
- package/lib/controls/wysiwyg/CKeditor.d.ts +5 -6
- package/lib/controls/wysiwyg/CKeditor.js +14 -13
- package/lib/filters/ConditionValidator.d.ts +1 -1
- package/lib/filters/FilterService.d.ts +18 -18
- package/lib/filters/FilterService.js +11 -11
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +14 -14
- package/lib/history-actions/AbstractHistoryAdapter.js +5 -6
- package/lib/history-actions/DefaultHistoryAdapter.d.ts +7 -7
- package/lib/history-actions/DefaultHistoryAdapter.js +2 -2
- package/lib/list-query-builder/ListQueryBuilder.d.ts +1 -1
- package/lib/media-manager/AbstractMediaManager.d.ts +14 -3
- package/lib/media-manager/AbstractMediaManager.js +16 -5
- package/lib/media-manager/MediaManagerHandler.d.ts +3 -0
- package/lib/media-manager/MediaManagerHandler.js +30 -5
- package/lib/media-manager/Thumb.js +7 -13
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +6 -4
- package/lib/media-manager/helpers/MediaManagerHelper.js +18 -18
- package/lib/model/AbstractModel.d.ts +9 -5
- package/lib/model/AbstractModel.js +9 -13
- package/lib/model/InternalModelAccessFactory.js +9 -10
- package/lib/model/ModelHandler.d.ts +45 -7
- package/lib/model/ModelHandler.js +168 -11
- package/lib/model/adapter/sequelize.d.ts +2 -4
- package/lib/model/adapter/sequelize.js +16 -193
- package/lib/model/adapter/typeorm.d.ts +2 -4
- package/lib/model/adapter/typeorm.js +2 -35
- package/lib/notifications/AbstractNotificationService.d.ts +9 -9
- package/lib/notifications/AbstractNotificationService.js +8 -8
- package/lib/notifications/GeneralNotificationService.js +1 -1
- package/lib/notifications/SystemNotificationService.js +1 -1
- package/lib/ui-i18n/uiTranslationKeys.d.ts +1 -1
- package/lib/ui-i18n/uiTranslationKeys.js +1 -0
- package/lib/widgets/abstractCustom.d.ts +7 -2
- package/lib/widgets/abstractCustom.js +6 -0
- package/lib/widgets/abstractInfo.d.ts +4 -1
- package/lib/widgets/abstractWidgetBase.d.ts +2 -0
- package/lib/widgets/abstractWidgetBase.js +2 -0
- package/lib/widgets/widgetHandler.d.ts +6 -2
- package/lib/widgets/widgetHandler.js +70 -19
- package/models/{FilterAP.d.ts → Filter.d.ts} +4 -70
- package/models/Filter.js +1 -0
- package/models/FilterColumn.d.ts +10 -0
- package/models/FilterColumn.js +1 -0
- package/models/Group.d.ts +8 -0
- package/models/Group.js +1 -0
- package/models/HistoryActions.d.ts +14 -0
- package/models/HistoryActions.js +1 -0
- package/models/MediaManagerAP.d.ts +2 -54
- package/models/MediaManagerAP.js +1 -51
- package/models/MediaManagerAssociationsAP.d.ts +1 -35
- package/models/MediaManagerAssociationsAP.js +1 -33
- package/models/MediaManagerMetaAP.d.ts +2 -30
- package/models/MediaManagerMetaAP.js +1 -27
- package/models/Notification.d.ts +13 -0
- package/models/Notification.js +1 -0
- package/models/User.d.ts +23 -0
- package/models/User.js +1 -0
- package/models/UserNotification.d.ts +7 -0
- package/models/UserNotification.js +1 -0
- package/package.json +25 -30
- package/services/FeedService.d.ts +5 -5
- package/services/FeedService.js +1 -1
- package/system/Router.js +2 -10
- package/system/bindAccessRights.js +1 -1
- package/system/bindAuthorization.js +2 -2
- package/system/bindControls.js +7 -6
- package/system/bindDashboardWidgets.js +3 -2
- package/system/bindDev.js +1 -1
- package/system/bindHistory.d.ts +1 -1
- package/system/bindHistory.js +1 -1
- package/system/bindInertia.js +0 -6
- package/system/bindMediaManager.js +4 -17
- package/system/bindNotifications.d.ts +1 -1
- package/system/bindNotifications.js +1 -1
- package/system/bindReqFunctions.d.ts +1 -0
- package/system/bindReqFunctions.js +20 -3
- package/system/buildInternalModelAccess.js +2 -15
- package/system/defaults.js +5 -10
- package/system/systemModelContracts.d.ts +22 -0
- package/system/systemModelContracts.js +155 -0
- package/system/validateSystemModels.d.ts +2 -0
- package/system/validateSystemModels.js +101 -0
- package/translations/ar.json +2 -1
- package/translations/cn.json +2 -1
- package/translations/de.json +2 -1
- package/translations/en.json +1 -0
- package/translations/es.json +2 -1
- package/translations/fr.json +2 -1
- package/translations/hi.json +2 -1
- package/translations/jp.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/pt.json +2 -1
- package/translations/ru.json +2 -1
- package/translations/ua.json +2 -1
- package/translations/uz.json +2 -1
- package/translations/vi.json +2 -1
- package/ui/components/VanillaJSONEditor.d.ts +1 -1
- package/ui/components/handsontable.d.ts +1 -1
- package/ui/components/ui/avatar.d.ts +3 -3
- package/ui/components/ui/badge.d.ts +1 -1
- package/ui/components/ui/breadcrumb.d.ts +7 -7
- package/ui/components/ui/button.d.ts +1 -1
- package/ui/components/ui/calendar.d.ts +1 -1
- package/ui/components/ui/card.d.ts +7 -7
- package/ui/components/ui/checkbox.d.ts +1 -1
- package/ui/components/ui/collapsible.d.ts +3 -3
- package/ui/components/ui/command.d.ts +9 -9
- package/ui/components/ui/context-menu.d.ts +15 -15
- package/ui/components/ui/dialog-stack.d.ts +10 -10
- package/ui/components/ui/dialog.d.ts +10 -10
- package/ui/components/ui/dropdown-menu.d.ts +15 -15
- package/ui/components/ui/input.d.ts +1 -1
- package/ui/components/ui/label.d.ts +1 -1
- package/ui/components/ui/menubar.d.ts +16 -16
- package/ui/components/ui/pagination.d.ts +7 -7
- package/ui/components/ui/popover.d.ts +4 -4
- package/ui/components/ui/select.d.ts +10 -10
- package/ui/components/ui/separator.d.ts +1 -1
- package/ui/components/ui/sheet.d.ts +8 -8
- package/ui/components/ui/sidebar.d.ts +23 -23
- package/ui/components/ui/skeleton.d.ts +1 -1
- package/ui/components/ui/slider.d.ts +1 -1
- package/ui/components/ui/sonner.d.ts +1 -1
- package/ui/components/ui/switch.d.ts +1 -1
- package/ui/components/ui/table.d.ts +8 -8
- package/ui/components/ui/tabs.d.ts +4 -4
- package/ui/components/ui/textarea.d.ts +1 -1
- package/ui/components/ui/tooltip.d.ts +4 -4
- package/assets/RelationDialogStack-DI2bZxQX.js +0 -20
- package/assets/add-DCQ7ZW4B.js +0 -1
- package/assets/add-group-DCVPryBo.js +0 -1
- package/assets/add-group-form-DKRXC2n-.js +0 -1
- package/assets/add-user-B7OOiYxv.js +0 -1
- package/assets/add-user-form-UXAToWQd.js +0 -1
- package/assets/app-AKbNCggP.css +0 -1
- package/assets/app-layout-6EwNBvnR.js +0 -1
- package/assets/app-shell-D8wtkECO.js +0 -1
- package/assets/app-sidebar-DfGjL-2K.js +0 -1
- package/assets/app-sidebar-header-BZbIBQjq.js +0 -1
- package/assets/breadcrumbs-CODaqVkB.js +0 -1
- package/assets/catalog-DVvFGa2X.js +0 -6
- package/assets/dashboard-BadoiH_a.js +0 -3
- package/assets/date-picker-DSOkNiNo.js +0 -1
- package/assets/del-modal-Cd4M7af8.js +0 -1
- package/assets/dynamic-controls-BsrJhPDY.js +0 -1
- package/assets/geo-json-CzR5JBXL.js +0 -1
- package/assets/handsontable-BI98OF5R.js +0 -336
- package/assets/history-D1iLA6rs.js +0 -1
- package/assets/home-DbWj-W_k.js +0 -2
- package/assets/icon-C2JNaLxH.js +0 -1
- package/assets/init-user-D2HSyXup.js +0 -1
- package/assets/input-error-CH2caTtO.js +0 -1
- package/assets/jsoneditor-DVNQmA6G.js +0 -3869
- package/assets/list-CVoljVUw.js +0 -4
- package/assets/login-DFSLEO17.js +0 -1
- package/assets/material-icon-Bx9pGQiQ.js +0 -1
- package/assets/module-DJsC37CM.js +0 -1
- package/assets/monaco-Bl4zdWCn.js +0 -11
- package/assets/nav-footer-BiSQkPt4.js +0 -1
- package/assets/nav-main-rTH0PfDw.js +0 -1
- package/assets/nav-user-Bj6cWs0a.js +0 -1
- package/assets/notification-DKrNfaAB.js +0 -20
- package/assets/pagination-render-AKJvTIRA.js +0 -1
- package/assets/register-BTP4uxsK.js +0 -1
- package/assets/theme-switcher-Dm8EOGzx.js +0 -1
- package/assets/toast-editor-DOg_gvSp.js +0 -668
- package/assets/user-filters-list-C9R9J6Om.js +0 -1
- package/assets/user-info-BgSbT02v.js +0 -1
- package/assets/user-menu-content-TQTXHIv6.js +0 -1
- package/assets/vanilla-picker-B3LgXoKV.js +0 -2
- package/assets/vendor-l0sNRNKZ.js +0 -1
- package/assets/welcome-BwDlAOGh.js +0 -1
- package/controllers/navigation/edit.d.ts +0 -1
- package/controllers/navigation/edit.js +0 -8
- package/lib/ai-assistant/DummyAiModelService.d.ts +0 -8
- package/lib/ai-assistant/DummyAiModelService.js +0 -14
- package/lib/ai-assistant/OpenAiModelService.d.ts +0 -24
- package/lib/ai-assistant/OpenAiModelService.js +0 -184
- package/lib/catalog/Navigation.d.ts +0 -49
- package/lib/catalog/Navigation.js +0 -492
- package/lib/controls/AbstractControls.d.ts +0 -30
- package/lib/controls/AbstractControls.js +0 -14
- package/lib/media-manager/DefaultMediaManager.d.ts +0 -20
- package/lib/media-manager/DefaultMediaManager.js +0 -127
- package/lib/media-manager/Items.d.ts +0 -50
- package/lib/media-manager/Items.js +0 -296
- package/models/FilterAP.js +0 -68
- package/models/FilterColumnAP.d.ts +0 -32
- package/models/FilterColumnAP.js +0 -21
- package/models/GroupAP.d.ts +0 -31
- package/models/GroupAP.js +0 -22
- package/models/HistoryActionsAP.d.ts +0 -56
- package/models/HistoryActionsAP.js +0 -42
- package/models/NavigationAP.d.ts +0 -22
- package/models/NavigationAP.js +0 -16
- package/models/NotificationAP.d.ts +0 -44
- package/models/NotificationAP.js +0 -30
- package/models/UserAP.d.ts +0 -81
- package/models/UserAP.js +0 -57
- package/models/UserNotificationAP.d.ts +0 -26
- package/models/UserNotificationAP.js +0 -18
- package/system/bindAiAssistant.d.ts +0 -2
- package/system/bindAiAssistant.js +0 -30
- package/system/bindModels.d.ts +0 -2
- package/system/bindModels.js +0 -48
- package/system/bindNavigation.d.ts +0 -2
- package/system/bindNavigation.js +0 -38
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export function buildInternalModelAccess(config, modelHandler) {
|
|
2
2
|
const accessMap = config.system?.internalModelAccess;
|
|
3
3
|
const dynamicAccessMap = {};
|
|
4
|
-
addInternalAccessModels(dynamicAccessMap, "navigation", getNavigationInternalModels(config));
|
|
5
4
|
addInternalAccessModels(dynamicAccessMap, "data-accessor", getDataAccessorInternalModels(config, modelHandler));
|
|
6
5
|
addInternalAccessModels(dynamicAccessMap, "history", getHistoryInternalModels(config, modelHandler));
|
|
7
6
|
if (!Object.keys(dynamicAccessMap).length) {
|
|
@@ -21,18 +20,6 @@ function addInternalAccessModels(accessMap, scope, models) {
|
|
|
21
20
|
}
|
|
22
21
|
accessMap[scope] = Array.from(new Set(models));
|
|
23
22
|
}
|
|
24
|
-
function getNavigationInternalModels(config) {
|
|
25
|
-
if (!config.navigation) {
|
|
26
|
-
return [];
|
|
27
|
-
}
|
|
28
|
-
const models = [
|
|
29
|
-
config.navigation.model ?? "NavigationAP",
|
|
30
|
-
...config.navigation.items
|
|
31
|
-
.map(item => item.model)
|
|
32
|
-
.filter((model) => Boolean(model))
|
|
33
|
-
];
|
|
34
|
-
return Array.from(new Set(models));
|
|
35
|
-
}
|
|
36
23
|
function getDataAccessorInternalModels(config, modelHandler) {
|
|
37
24
|
const models = [];
|
|
38
25
|
for (const [modelName, modelConfig] of Object.entries(config.models ?? {})) {
|
|
@@ -43,10 +30,10 @@ function getDataAccessorInternalModels(config, modelHandler) {
|
|
|
43
30
|
if (!userAccessRelation || typeof userAccessRelation !== "object" || Array.isArray(userAccessRelation)) {
|
|
44
31
|
continue;
|
|
45
32
|
}
|
|
46
|
-
const model = modelHandler.model.get(modelName);
|
|
33
|
+
const model = modelHandler.model.get(modelConfig.model ?? modelName);
|
|
47
34
|
const intermediateModelName = model?.attributes?.[userAccessRelation.field]?.model;
|
|
48
35
|
if (intermediateModelName) {
|
|
49
|
-
models.push(intermediateModelName);
|
|
36
|
+
models.push(modelHandler.resolveModelName(intermediateModelName));
|
|
50
37
|
}
|
|
51
38
|
}
|
|
52
39
|
return Array.from(new Set(models));
|
package/system/defaults.js
CHANGED
|
@@ -44,9 +44,9 @@ let adminpanelConfig = {
|
|
|
44
44
|
* List of admin pages
|
|
45
45
|
*/
|
|
46
46
|
models: {
|
|
47
|
-
|
|
47
|
+
User: {
|
|
48
48
|
title: "Users",
|
|
49
|
-
model: "
|
|
49
|
+
model: "User",
|
|
50
50
|
icon: "people",
|
|
51
51
|
navbar: {
|
|
52
52
|
section: "System"
|
|
@@ -89,9 +89,9 @@ let adminpanelConfig = {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
Group: {
|
|
93
93
|
title: "Groups",
|
|
94
|
-
model: "
|
|
94
|
+
model: "Group",
|
|
95
95
|
icon: "group_add",
|
|
96
96
|
navbar: {
|
|
97
97
|
section: "System"
|
|
@@ -156,18 +156,13 @@ let adminpanelConfig = {
|
|
|
156
156
|
enabled: false
|
|
157
157
|
},
|
|
158
158
|
aiAssistant: {
|
|
159
|
-
enabled: false
|
|
160
|
-
defaultModel: 'dummy',
|
|
161
|
-
models: ['dummy']
|
|
159
|
+
enabled: false
|
|
162
160
|
},
|
|
163
161
|
cors: {
|
|
164
162
|
enabled: false,
|
|
165
163
|
origin: 'http://localhost:8080',
|
|
166
164
|
path: 'api/*'
|
|
167
165
|
},
|
|
168
|
-
mediamanager: {
|
|
169
|
-
fileStoragePath: '.tmp/public',
|
|
170
|
-
},
|
|
171
166
|
filters: {
|
|
172
167
|
enabled: false
|
|
173
168
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AbstractModel, Attribute } from "../lib/model/AbstractModel";
|
|
2
|
+
export interface SystemModelAttributeContract {
|
|
3
|
+
type?: Attribute["type"];
|
|
4
|
+
required?: boolean;
|
|
5
|
+
columnName?: string;
|
|
6
|
+
relation?: {
|
|
7
|
+
kind: "one" | "many";
|
|
8
|
+
target: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface SystemModelContract {
|
|
12
|
+
name: string;
|
|
13
|
+
primaryKey: string;
|
|
14
|
+
attributes: Record<string, SystemModelAttributeContract>;
|
|
15
|
+
}
|
|
16
|
+
export declare const SYSTEM_MODEL_NAMES: readonly ["User", "Group", "Filter", "FilterColumn", "HistoryActions", "Notification", "UserNotification"];
|
|
17
|
+
export type SystemModelName = typeof SYSTEM_MODEL_NAMES[number];
|
|
18
|
+
export interface ValidateSystemModelContractOptions {
|
|
19
|
+
resolveRelationTarget?: (target: string) => string;
|
|
20
|
+
}
|
|
21
|
+
export declare const SYSTEM_MODEL_CONTRACTS: readonly SystemModelContract[];
|
|
22
|
+
export declare function validateSystemModelContract(model: AbstractModel<any>, contract: SystemModelContract, options?: ValidateSystemModelContractOptions): void;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export const SYSTEM_MODEL_NAMES = [
|
|
2
|
+
"User",
|
|
3
|
+
"Group",
|
|
4
|
+
"Filter",
|
|
5
|
+
"FilterColumn",
|
|
6
|
+
"HistoryActions",
|
|
7
|
+
"Notification",
|
|
8
|
+
"UserNotification",
|
|
9
|
+
];
|
|
10
|
+
export const SYSTEM_MODEL_CONTRACTS = [
|
|
11
|
+
{
|
|
12
|
+
name: "User",
|
|
13
|
+
primaryKey: "id",
|
|
14
|
+
attributes: {
|
|
15
|
+
id: { type: "number" },
|
|
16
|
+
login: { type: "string", required: true },
|
|
17
|
+
fullName: { type: "string", required: true },
|
|
18
|
+
email: { type: "string" },
|
|
19
|
+
avatar: { type: "string" },
|
|
20
|
+
passwordHashed: { type: "string" },
|
|
21
|
+
timezone: { type: "string" },
|
|
22
|
+
expires: { type: "string" },
|
|
23
|
+
locale: { type: "string" },
|
|
24
|
+
isDeleted: { type: "boolean" },
|
|
25
|
+
isActive: { type: "boolean" },
|
|
26
|
+
isAdministrator: { type: "boolean" },
|
|
27
|
+
groups: { relation: { kind: "many", target: "Group" } },
|
|
28
|
+
widgets: { type: "json" },
|
|
29
|
+
isConfirmed: { type: "boolean" },
|
|
30
|
+
apiKey: { type: "string", columnName: "userApiKey" },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "Group",
|
|
35
|
+
primaryKey: "id",
|
|
36
|
+
attributes: {
|
|
37
|
+
id: { type: "number" },
|
|
38
|
+
name: { type: "string", required: true },
|
|
39
|
+
description: { type: "string" },
|
|
40
|
+
tokens: { type: "json" },
|
|
41
|
+
users: { relation: { kind: "many", target: "User" } },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Filter",
|
|
46
|
+
primaryKey: "id",
|
|
47
|
+
attributes: {
|
|
48
|
+
id: { type: "string" },
|
|
49
|
+
name: { type: "string", required: true },
|
|
50
|
+
description: { type: "string" },
|
|
51
|
+
modelName: { type: "string", required: true },
|
|
52
|
+
conditions: { type: "json" },
|
|
53
|
+
sortField: { type: "string" },
|
|
54
|
+
sortDirection: { type: "string" },
|
|
55
|
+
visibility: { type: "string" },
|
|
56
|
+
ownerId: { type: "number" },
|
|
57
|
+
groupIds: { type: "json" },
|
|
58
|
+
apiEnabled: { type: "boolean" },
|
|
59
|
+
apiKey: { type: "string" },
|
|
60
|
+
icon: { type: "string" },
|
|
61
|
+
color: { type: "string" },
|
|
62
|
+
version: { type: "number" },
|
|
63
|
+
columns: { relation: { kind: "many", target: "FilterColumn" } },
|
|
64
|
+
createdAt: { type: "string" },
|
|
65
|
+
updatedAt: { type: "string" },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "FilterColumn",
|
|
70
|
+
primaryKey: "id",
|
|
71
|
+
attributes: {
|
|
72
|
+
id: { type: "number" },
|
|
73
|
+
filter: { relation: { kind: "one", target: "Filter" } },
|
|
74
|
+
fieldName: { type: "string", required: true },
|
|
75
|
+
order: { type: "number" },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "HistoryActions",
|
|
80
|
+
primaryKey: "id",
|
|
81
|
+
attributes: {
|
|
82
|
+
id: { type: "number" },
|
|
83
|
+
modelId: { type: "string", required: true },
|
|
84
|
+
modelName: { type: "string", required: true },
|
|
85
|
+
action: { type: "string" },
|
|
86
|
+
data: { type: "json" },
|
|
87
|
+
diff: { type: "json" },
|
|
88
|
+
user: { relation: { kind: "one", target: "User" } },
|
|
89
|
+
isCurrent: { type: "boolean" },
|
|
90
|
+
createdAt: { type: "string" },
|
|
91
|
+
updatedAt: { type: "string" },
|
|
92
|
+
preview: { type: "boolean" },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "Notification",
|
|
97
|
+
primaryKey: "id",
|
|
98
|
+
attributes: {
|
|
99
|
+
id: { type: "number" },
|
|
100
|
+
title: { type: "string" },
|
|
101
|
+
message: { type: "string" },
|
|
102
|
+
notificationClass: { type: "string" },
|
|
103
|
+
channel: { type: "string" },
|
|
104
|
+
metadata: { type: "json" },
|
|
105
|
+
createdAt: { type: "string" },
|
|
106
|
+
updatedAt: { type: "string" },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "UserNotification",
|
|
111
|
+
primaryKey: "id",
|
|
112
|
+
attributes: {
|
|
113
|
+
id: { type: "number" },
|
|
114
|
+
userId: { type: "number", required: true },
|
|
115
|
+
notificationId: { relation: { kind: "one", target: "Notification" } },
|
|
116
|
+
read: { type: "boolean" },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
export function validateSystemModelContract(model, contract, options = {}) {
|
|
121
|
+
const errors = [];
|
|
122
|
+
if (model.primaryKey.toLowerCase() !== contract.primaryKey.toLowerCase()) {
|
|
123
|
+
errors.push(`primary key must be "${contract.primaryKey}", received "${model.primaryKey}"`);
|
|
124
|
+
}
|
|
125
|
+
for (const [attributeName, expected] of Object.entries(contract.attributes)) {
|
|
126
|
+
const actual = model.attributes[attributeName];
|
|
127
|
+
if (!actual) {
|
|
128
|
+
errors.push(`attribute "${attributeName}" is missing`);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (expected.type && actual.type !== expected.type) {
|
|
132
|
+
errors.push(`attribute "${attributeName}" must have type "${expected.type}", received "${actual.type}"`);
|
|
133
|
+
}
|
|
134
|
+
if (expected.required === true && actual.required !== true) {
|
|
135
|
+
errors.push(`attribute "${attributeName}" must be required`);
|
|
136
|
+
}
|
|
137
|
+
if (expected.columnName && actual.columnName?.toLowerCase() !== expected.columnName.toLowerCase()) {
|
|
138
|
+
errors.push(`attribute "${attributeName}" must use column "${expected.columnName}", received "${actual.columnName}"`);
|
|
139
|
+
}
|
|
140
|
+
if (expected.relation) {
|
|
141
|
+
const expectedType = expected.relation.kind === "many" ? "association-many" : "association";
|
|
142
|
+
const actualTarget = actual.model ?? actual.collection;
|
|
143
|
+
const resolvedActualTarget = actualTarget ? options.resolveRelationTarget?.(actualTarget) ?? actualTarget : actualTarget;
|
|
144
|
+
if (actual.type !== expectedType) {
|
|
145
|
+
errors.push(`association "${attributeName}" must have kind "${expected.relation.kind}"`);
|
|
146
|
+
}
|
|
147
|
+
if (resolvedActualTarget?.toLowerCase() !== expected.relation.target.toLowerCase()) {
|
|
148
|
+
errors.push(`association "${attributeName}" must target "${expected.relation.target}", received "${actualTarget}"`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (errors.length) {
|
|
153
|
+
throw new Error(`System model "${contract.name}" does not satisfy the Adminizer contract:\n- ${errors.join("\n- ")}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Adminizer } from "../lib/Adminizer.js";
|
|
2
|
+
import { SYSTEM_MODEL_CONTRACTS, validateSystemModelContract } from "./systemModelContracts.js";
|
|
3
|
+
export function validateSystemModels(adminizer) {
|
|
4
|
+
let defaultOrmAdapter = adminizer.config.system?.defaultORM;
|
|
5
|
+
if (!defaultOrmAdapter && adminizer.ormAdapters.length === 1) {
|
|
6
|
+
defaultOrmAdapter = adminizer.ormAdapters[0].ormType;
|
|
7
|
+
}
|
|
8
|
+
if (!defaultOrmAdapter) {
|
|
9
|
+
throw new Error("Default ORM adapter was not provided");
|
|
10
|
+
}
|
|
11
|
+
const systemAdapter = getAdapter(adminizer, defaultOrmAdapter);
|
|
12
|
+
const bindings = buildSystemModelBindings(systemAdapter);
|
|
13
|
+
const systemModels = new Set();
|
|
14
|
+
for (const contract of SYSTEM_MODEL_CONTRACTS) {
|
|
15
|
+
const binding = bindings.get(contract.name.toLowerCase()) ?? {
|
|
16
|
+
model: contract.name,
|
|
17
|
+
};
|
|
18
|
+
systemModels.add(contract.name.toLowerCase());
|
|
19
|
+
systemModels.add(binding.model.toLowerCase());
|
|
20
|
+
const registeredModel = systemAdapter.getModel(binding.model);
|
|
21
|
+
if (!registeredModel) {
|
|
22
|
+
throw new Error(`System model "${contract.name}" was not provided by adapter "${systemAdapter.ormType}" as host model "${binding.model}". ` +
|
|
23
|
+
"Register all Adminizer system models in the host ORM before calling adminizer.init().");
|
|
24
|
+
}
|
|
25
|
+
const model = new systemAdapter.Model(contract.name, registeredModel);
|
|
26
|
+
validateSystemModelContract(model, contract, {
|
|
27
|
+
resolveRelationTarget: (target) => resolveSystemRelationTarget(target, bindings),
|
|
28
|
+
});
|
|
29
|
+
normalizeSystemModelRelations(model, bindings);
|
|
30
|
+
adminizer.modelHandler.add(contract.name, model, [binding.model]);
|
|
31
|
+
}
|
|
32
|
+
const modelsFromConfig = Object.entries(adminizer.config.models ?? {});
|
|
33
|
+
Adminizer.log.debug(`Bind models > Models from config: ${modelsFromConfig.map(([name]) => name)}`);
|
|
34
|
+
for (const [configName, modelConfig] of modelsFromConfig) {
|
|
35
|
+
const modelName = modelConfig && typeof modelConfig !== "boolean"
|
|
36
|
+
? modelConfig.model
|
|
37
|
+
: configName;
|
|
38
|
+
if (systemModels.has(modelName.toLowerCase())) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const adapterName = modelConfig && typeof modelConfig !== "boolean"
|
|
42
|
+
? modelConfig.adapter ?? defaultOrmAdapter
|
|
43
|
+
: defaultOrmAdapter;
|
|
44
|
+
const ormAdapter = getAdapter(adminizer, adapterName);
|
|
45
|
+
const registeredModel = ormAdapter.getModel(modelName);
|
|
46
|
+
if (!registeredModel) {
|
|
47
|
+
throw new Error(`Bind models > Model not found: ${modelName}`);
|
|
48
|
+
}
|
|
49
|
+
adminizer.modelHandler.add(modelName, new ormAdapter.Model(modelName, registeredModel));
|
|
50
|
+
}
|
|
51
|
+
Adminizer.log.info("Models loaded");
|
|
52
|
+
}
|
|
53
|
+
function getAdapter(adminizer, adapterName) {
|
|
54
|
+
const adapter = adminizer.getOrmAdapter(adapterName);
|
|
55
|
+
if (!adapter) {
|
|
56
|
+
throw new Error(`Adapter "${adapterName}" was not found`);
|
|
57
|
+
}
|
|
58
|
+
return adapter;
|
|
59
|
+
}
|
|
60
|
+
function buildSystemModelBindings(adapter) {
|
|
61
|
+
const result = new Map();
|
|
62
|
+
for (const contract of SYSTEM_MODEL_CONTRACTS) {
|
|
63
|
+
const binding = normalizeSystemModelBinding(adapter.systemModels[contract.name]) ?? {
|
|
64
|
+
model: contract.name,
|
|
65
|
+
};
|
|
66
|
+
result.set(contract.name.toLowerCase(), binding);
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
function normalizeSystemModelBinding(binding) {
|
|
71
|
+
if (!binding) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
if (typeof binding === "string") {
|
|
75
|
+
return {
|
|
76
|
+
model: binding,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return binding;
|
|
80
|
+
}
|
|
81
|
+
function resolveSystemRelationTarget(target, bindings) {
|
|
82
|
+
const normalizedTarget = target.toLowerCase();
|
|
83
|
+
for (const contract of SYSTEM_MODEL_CONTRACTS) {
|
|
84
|
+
const binding = bindings.get(contract.name.toLowerCase());
|
|
85
|
+
if (contract.name.toLowerCase() === normalizedTarget ||
|
|
86
|
+
binding?.model.toLowerCase() === normalizedTarget) {
|
|
87
|
+
return contract.name;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return target;
|
|
91
|
+
}
|
|
92
|
+
function normalizeSystemModelRelations(model, bindings) {
|
|
93
|
+
for (const attribute of Object.values(model.attributes)) {
|
|
94
|
+
if (attribute.model) {
|
|
95
|
+
attribute.model = resolveSystemRelationTarget(attribute.model, bindings);
|
|
96
|
+
}
|
|
97
|
+
if (attribute.collection) {
|
|
98
|
+
attribute.collection = resolveSystemRelationTarget(attribute.collection, bindings);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
package/translations/ar.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "ﻞﻤﻌﻟﺍ ﻦﻣ ءﺎﻬﺘﻧﻻﺍ",
|
|
3
|
+
"Action failed": "فشل تنفيذ الإجراء",
|
|
3
4
|
"Actions": "ﺕﺍءﺍﺮﺟﻹﺍ",
|
|
4
5
|
"All": "ﻊﻴﻤﺠﻟﺍ",
|
|
5
6
|
"Are you sure?": "؟ﺪﻛﺄﺘﻣ ﺖﻧﺃ ﻞﻫ",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "حجم الملف يتجاوز حد 5 ميغابايت",
|
|
179
180
|
"Remove file": "إزالة الملف",
|
|
180
181
|
"Max 5 MB per file": "بحد أقصى 5 ميغابايت لكل ملف"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/cn.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "动作完成了",
|
|
3
|
+
"Action failed": "操作失败",
|
|
3
4
|
"Actions": "动作",
|
|
4
5
|
"All": "全部",
|
|
5
6
|
"Are you sure?": "你确定吗?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "文件大小超过 5 MB 限制",
|
|
179
180
|
"Remove file": "删除文件",
|
|
180
181
|
"Max 5 MB per file": "每个文件最大 5 MB"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/de.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Aktion abgeschlossen",
|
|
3
|
+
"Action failed": "Aktion fehlgeschlagen",
|
|
3
4
|
"Actions": "Aktionen",
|
|
4
5
|
"All": "Alle",
|
|
5
6
|
"Are you sure?": "Bist du sicher?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "Dateigröße überschreitet das 5-MB-Limit",
|
|
179
180
|
"Remove file": "Datei entfernen",
|
|
180
181
|
"Max 5 MB per file": "Max. 5 MB pro Datei"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/en.json
CHANGED
package/translations/es.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Acción completada",
|
|
3
|
+
"Action failed": "La acción falló",
|
|
3
4
|
"Actions": "Comportamiento",
|
|
4
5
|
"All": "Todo",
|
|
5
6
|
"Are you sure?": "¿Está seguro?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "El tamaño del archivo supera el límite de 5 MB",
|
|
179
180
|
"Remove file": "Eliminar archivo",
|
|
180
181
|
"Max 5 MB per file": "Máx. 5 MB por archivo"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/fr.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Action terminée",
|
|
3
|
+
"Action failed": "Échec de l'action",
|
|
3
4
|
"Actions": "Actes",
|
|
4
5
|
"All": "Tous",
|
|
5
6
|
"Are you sure?": "Es-tu sûr?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "La taille du fichier dépasse la limite de 5 Mo",
|
|
179
180
|
"Remove file": "Supprimer le fichier",
|
|
180
181
|
"Max 5 MB per file": "Max. 5 Mo par fichier"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/hi.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "कार्रवाई पूरी हुई",
|
|
3
|
+
"Action failed": "कार्रवाई विफल रही",
|
|
3
4
|
"Actions": "कार्रवाई",
|
|
4
5
|
"All": "सभी",
|
|
5
6
|
"Are you sure?": "क्या आपको यकीन है?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "फ़ाइल का आकार 5 MB की सीमा से अधिक है",
|
|
179
180
|
"Remove file": "फ़ाइल हटाएं",
|
|
180
181
|
"Max 5 MB per file": "प्रति फ़ाइल अधिकतम 5 MB"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/jp.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "アクションが完了しました",
|
|
3
|
+
"Action failed": "アクションに失敗しました",
|
|
3
4
|
"Actions": "アクション",
|
|
4
5
|
"All": "全て",
|
|
5
6
|
"Are you sure?": "本気ですか?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "ファイルサイズが5MBの制限を超えています",
|
|
179
180
|
"Remove file": "ファイルを削除",
|
|
180
181
|
"Max 5 MB per file": "ファイルあたり最大5MB"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/ko.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "작업이 완료되었습니다",
|
|
3
|
+
"Action failed": "작업 실패",
|
|
3
4
|
"Actions": "행위",
|
|
4
5
|
"All": "모두",
|
|
5
6
|
"Are you sure?": "확실합니까?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "파일 크기가 5MB 제한을 초과합니다",
|
|
179
180
|
"Remove file": "파일 삭제",
|
|
180
181
|
"Max 5 MB per file": "파일당 최대 5MB"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/pt.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Ação concluída",
|
|
3
|
+
"Action failed": "A ação falhou",
|
|
3
4
|
"Actions": "Ações",
|
|
4
5
|
"All": "Todos",
|
|
5
6
|
"Are you sure?": "Tem certeza?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "O tamanho do arquivo excede o limite de 5 MB",
|
|
179
180
|
"Remove file": "Remover arquivo",
|
|
180
181
|
"Max 5 MB per file": "Máx. 5 MB por arquivo"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/ru.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Действие завершено",
|
|
3
|
+
"Action failed": "Не удалось выполнить действие",
|
|
3
4
|
"Actions": "Действия",
|
|
4
5
|
"All": "Все",
|
|
5
6
|
"Are you sure?": "Вы уверены?",
|
|
@@ -294,7 +295,7 @@
|
|
|
294
295
|
"GroupAP model not found": "Модель GroupAP не найдена",
|
|
295
296
|
"Failed to load groups": "Не удалось загрузить группы",
|
|
296
297
|
"Internal server error": "Внутренняя ошибка сервера",
|
|
297
|
-
"Filter visibility": "Видимость фильтра",
|
|
298
|
+
"Filter visibility": "Видимость фильтра",
|
|
298
299
|
"System": "Система",
|
|
299
300
|
"W x H": "Ш x В",
|
|
300
301
|
"Sizes": "Размеры",
|
package/translations/ua.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Дія завершена",
|
|
3
|
+
"Action failed": "Не вдалося виконати дію",
|
|
3
4
|
"Actions": "Дії",
|
|
4
5
|
"All": "все",
|
|
5
6
|
"Are you sure?": "Ви впевнені?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "Розмір файлу перевищує 5 МБ",
|
|
179
180
|
"Remove file": "Видалити файл",
|
|
180
181
|
"Max 5 MB per file": "Макс. 5 МБ на файл"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/uz.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Harakat tugadi",
|
|
3
|
+
"Action failed": "Amal bajarilmadi",
|
|
3
4
|
"Actions": "Harakatlar",
|
|
4
5
|
"All": "Hamma",
|
|
5
6
|
"Are you sure?": "Ishonasizmi?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "Fayl hajmi 5 MB chegarasidan oshib ketdi",
|
|
179
180
|
"Remove file": "Faylni o'chirish",
|
|
180
181
|
"Max 5 MB per file": "Har bir fayl uchun max 5 MB"
|
|
181
|
-
}
|
|
182
|
+
}
|
package/translations/vi.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Action completed": "Hành động hoàn thành",
|
|
3
|
+
"Action failed": "Thao tác thất bại",
|
|
3
4
|
"Actions": "Hành động",
|
|
4
5
|
"All": "Tất cả",
|
|
5
6
|
"Are you sure?": "Bạn có chắc không?",
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
"File size exceeds the 5 MB limit": "Kích thước tệp vượt quá giới hạn 5 MB",
|
|
179
180
|
"Remove file": "Xóa tệp",
|
|
180
181
|
"Max 5 MB per file": "Tối đa 5 MB mỗi tệp"
|
|
181
|
-
}
|
|
182
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JSONEditorPropsOptional } from 'vanilla-jsoneditor';
|
|
2
|
-
export default function VanillaJSONEditor(props: JSONEditorPropsOptional & Record<string, any>): import("react
|
|
2
|
+
export default function VanillaJSONEditor(props: JSONEditorPropsOptional & Record<string, any>): import("react").JSX.Element;
|
|
@@ -6,5 +6,5 @@ interface TableProps {
|
|
|
6
6
|
onChange: (data: any) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const HandsonTable: ({ config, data, onChange, disabled }: TableProps) => import("react
|
|
9
|
+
declare const HandsonTable: ({ config, data, onChange, disabled }: TableProps) => import("react").JSX.Element;
|
|
10
10
|
export default HandsonTable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
|
-
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>):
|
|
4
|
-
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>):
|
|
5
|
-
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>):
|
|
3
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
|
|
5
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
|
|
6
6
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -5,5 +5,5 @@ declare const badgeVariants: (props?: ({
|
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
8
|
-
}):
|
|
8
|
+
}): React.JSX.Element;
|
|
9
9
|
export { Badge, badgeVariants };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">):
|
|
3
|
-
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">):
|
|
4
|
-
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">):
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
5
5
|
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
|
|
6
6
|
asChild?: boolean;
|
|
7
|
-
}):
|
|
8
|
-
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">):
|
|
9
|
-
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">):
|
|
10
|
-
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">):
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
11
|
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -6,5 +6,5 @@ declare const buttonVariants: (props?: ({
|
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export { Button, buttonVariants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DayPicker } from "react-day-picker";
|
|
3
|
-
declare function Calendar({ className, classNames, showOutsideDays, ...props }: React.ComponentProps<typeof DayPicker>):
|
|
3
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: React.ComponentProps<typeof DayPicker>): React.JSX.Element;
|
|
4
4
|
export { Calendar };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Card({ className, ...props }: React.ComponentProps<"div">):
|
|
3
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
4
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
5
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">):
|
|
6
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<"div">):
|
|
7
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<"div">):
|
|
8
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
9
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|