adminizer 4.7.0-build.224 → 5.0.0-build.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +2 -1
- package/assets/add-De0wyF0A.js +1 -0
- package/assets/add-group-CMWybgIR.js +1 -0
- package/assets/add-user-BxP23daH.js +1 -0
- package/assets/app-CtWuWD5N.css +1 -0
- package/assets/app-layout-GYMU2HO1.js +1 -0
- package/assets/app.js +45 -50
- package/assets/catalog-tImW1BnS.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/controls/ckeditor.es.js +83683 -0
- package/assets/controls/handsontable.css +1 -0
- package/assets/controls/handsontable.es.js +70585 -0
- package/assets/controls/jsoneditor.css +1 -0
- package/assets/controls/jsoneditor.es.js +42082 -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 +41797 -0
- package/assets/dashboard-CQ4atH3N.js +3 -0
- package/assets/debounce-BMmXVQ06.js +1 -0
- package/assets/history-BileQPEi.js +1 -0
- package/assets/init-user-8aUohVDq.js +1 -0
- package/assets/list-Pz_5mfSq.js +4 -0
- package/assets/login-CO4laf6m.js +1 -0
- package/assets/manifest.json +66 -602
- package/assets/media-manager-BDbpSSjH.js +6 -0
- package/assets/media-manager-BZPjl98I.css +1 -0
- package/assets/module-CQiOdgZN.js +1 -0
- package/assets/notification-BIyv1smE.js +20 -0
- package/assets/register-DBYIMXGQ.js +1 -0
- package/assets/ru-rYKdQbWF.js +1 -0
- package/assets/use-appearance-_EbbjHTh.js +1 -0
- package/assets/user-filters-list-Aq8CvCeh.js +1 -0
- package/assets/welcome-DxhWYzUL.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/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 +19 -6
- package/index.js +19 -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 +5 -2
- package/lib/widgets/abstractCustom.js +4 -0
- package/lib/widgets/widgetHandler.d.ts +5 -2
- package/lib/widgets/widgetHandler.js +60 -14
- 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/assets/RelationDialogStack-DhThUMep.js +0 -20
- package/assets/add-group-L8lMigab.js +0 -1
- package/assets/add-group-form-o7F6t6qW.js +0 -1
- package/assets/add-user-BE4-TNJw.js +0 -1
- package/assets/add-user-form-BP_8TjxN.js +0 -1
- package/assets/add-w398ZkhF.js +0 -1
- package/assets/app-C7J5ccrI.css +0 -1
- package/assets/app-layout-Bg455MIY.js +0 -1
- package/assets/app-shell-BT2kF0We.js +0 -1
- package/assets/app-sidebar-CZfPUXck.js +0 -1
- package/assets/app-sidebar-header-UVcKhNm6.js +0 -1
- package/assets/breadcrumbs-CrqIBT84.js +0 -1
- package/assets/catalog-btkCCwiv.js +0 -6
- package/assets/dashboard-Bvasc1cr.js +0 -3
- package/assets/date-picker-kxQWOxHk.js +0 -1
- package/assets/del-modal-C39LR5aQ.js +0 -1
- package/assets/dynamic-controls-DyPP5sTC.js +0 -1
- package/assets/geo-json-CGNQFl6J.js +0 -1
- package/assets/handsontable-Dv59QFH5.js +0 -336
- package/assets/history-DwKR8MPu.js +0 -1
- package/assets/home-BrtAkCRj.js +0 -2
- package/assets/icon-DpUVVHmK.js +0 -1
- package/assets/init-user-8PiKR1zX.js +0 -1
- package/assets/input-error-Cbt-Y3Fj.js +0 -1
- package/assets/jsoneditor-CiPXPMho.js +0 -3869
- package/assets/list-DGsL_qii.js +0 -4
- package/assets/login-Br_FcBU_.js +0 -1
- package/assets/material-icon-DOkM71fv.js +0 -1
- package/assets/module-EgfgIEhF.js +0 -1
- package/assets/monaco-ompgKQ3_.js +0 -11
- package/assets/nav-footer-DzLwfBAE.js +0 -1
- package/assets/nav-main-CSEbjYgs.js +0 -1
- package/assets/nav-user-DJ0hfhfH.js +0 -1
- package/assets/notification-B19ZLro7.js +0 -20
- package/assets/pagination-render-8GvJxq55.js +0 -1
- package/assets/register-CZzIeT2G.js +0 -1
- package/assets/ru-1NdRIQNV.js +0 -1
- package/assets/theme-switcher-CBbEj1u-.js +0 -1
- package/assets/toast-editor-DwVqd1rz.js +0 -668
- package/assets/user-filters-list-7Im79QyS.js +0 -1
- package/assets/user-info-YiU17Mmy.js +0 -1
- package/assets/user-menu-content-gdpNF5-8.js +0 -1
- package/assets/vanilla-picker-B3LgXoKV.js +0 -2
- package/assets/vendor-l0sNRNKZ.js +0 -1
- package/assets/welcome-nT0eFWHb.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
- /package/assets/{RelationDialogStack-B00Ot5qS.css → controls/ckeditor.css} +0 -0
|
@@ -54,13 +54,13 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
54
54
|
this._bindAccessRight();
|
|
55
55
|
}
|
|
56
56
|
notificationModel() {
|
|
57
|
-
return this.adminizer.modelHandler.internal("notifications").get("
|
|
57
|
+
return this.adminizer.modelHandler.internal("notifications").get("Notification");
|
|
58
58
|
}
|
|
59
59
|
userNotificationModel() {
|
|
60
|
-
return this.adminizer.modelHandler.internal("notifications").get("
|
|
60
|
+
return this.adminizer.modelHandler.internal("notifications").get("UserNotification");
|
|
61
61
|
}
|
|
62
62
|
userModel() {
|
|
63
|
-
return this.adminizer.modelHandler.internal("notifications").get("
|
|
63
|
+
return this.adminizer.modelHandler.internal("notifications").get("User");
|
|
64
64
|
}
|
|
65
65
|
_bindAccessRight() {
|
|
66
66
|
setTimeout(() => {
|
|
@@ -78,7 +78,7 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
78
78
|
* The client is then added to the user's Map with the provided send function.
|
|
79
79
|
* @param {string} clientId - The unique identifier of the client to be registered.
|
|
80
80
|
* @param {(event: INotificationEvent) => void} sendFn - The function used to send notifications to the client.
|
|
81
|
-
* @param {
|
|
81
|
+
* @param {User} user - The user associated with the client.
|
|
82
82
|
*/
|
|
83
83
|
addClient(clientId, sendFn, user) {
|
|
84
84
|
const userId = user.id;
|
|
@@ -177,7 +177,7 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Creates a new user notification record in the '
|
|
180
|
+
* Creates a new user notification record in the 'UserNotification' model.
|
|
181
181
|
* This method is used to associate a notification with a specific user and mark it as unread.
|
|
182
182
|
* @param {string} notificationId - The unique identifier of the notification.
|
|
183
183
|
* @param {number} [userId] - The ID of the user to associate the notification with. Optional.
|
|
@@ -198,7 +198,7 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
|
-
* Retrieves a user notification record from the '
|
|
201
|
+
* Retrieves a user notification record from the 'UserNotification' model.
|
|
202
202
|
* The record is fetched based on the provided notification ID and user ID.
|
|
203
203
|
* @param {string} notificationId - The unique identifier of the notification.
|
|
204
204
|
* @param {number} userId - The ID of the user associated with the notification.
|
|
@@ -260,7 +260,7 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Prepares notification data by enriching it with user-specific read status and icon information.
|
|
263
|
-
* @param {
|
|
263
|
+
* @param {NotificationModel[]} notificationsDB - An array of raw notification records from the database.
|
|
264
264
|
* @param {number} userId - The ID of the user for whom the read status is determined.
|
|
265
265
|
* @returns {Promise<INotification[]>} A promise that resolves with an array of enriched notification objects.
|
|
266
266
|
*/
|
|
@@ -268,7 +268,7 @@ export class AbstractNotificationService extends EventEmitter {
|
|
|
268
268
|
let notifications = [];
|
|
269
269
|
for (const notification of notificationsDB) {
|
|
270
270
|
let readStatus = false;
|
|
271
|
-
// Getting read status from
|
|
271
|
+
// Getting read status from UserNotification
|
|
272
272
|
const userNotification = await this.getUserNotification(notification.id, userId);
|
|
273
273
|
readStatus = userNotification ? userNotification.read : false;
|
|
274
274
|
notifications.push({
|
|
@@ -24,7 +24,7 @@ export class SystemNotificationService extends AbstractNotificationService {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
|
-
Adminizer.log.error('Error creating
|
|
27
|
+
Adminizer.log.error('Error creating UserNotification:', error);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
const event = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const COMMON_UI_TRANSLATION_KEYS: readonly ["Delete", "Diff", "Preview", "Add", "Search", "Yes", "No", "On", "Off", "Hide", "Show", "No notifications found", "No notifications", "No widgets found", "Changes not found", "Old", "New", "Added", "Removed", "Updated", "changed type", "Error: Invalid field data", "Error: Fields data is invalid", "No fields to display", "Error: Some fields are missing required properties (name, type, label)", "Edit", "create", "Clean", "Are you sure?", "Select Item type", "Select Ids", "Open in a new window", "Visible", "Performing an action...", "Action completed", "Save", "First", "Last", "Previous", "Next", "Send feedback", "Feedback", "Title", "Description", "Attach files", "Send", "Sending...", "Feedback sent successfully", "Title is required", "File size exceeds the 5 MB limit", "Remove file", "Max 5 MB per file", "View All", "Make read", "Make all read", "Message", "Date", "Watch", "Current", "There is no history"];
|
|
1
|
+
export declare const COMMON_UI_TRANSLATION_KEYS: readonly ["Delete", "Diff", "Preview", "Add", "Search", "Yes", "No", "On", "Off", "Hide", "Show", "No notifications found", "No notifications", "No widgets found", "Changes not found", "Old", "New", "Added", "Removed", "Updated", "changed type", "Error: Invalid field data", "Error: Fields data is invalid", "No fields to display", "Error: Some fields are missing required properties (name, type, label)", "Edit", "create", "Clean", "Are you sure?", "Select Item type", "Select Ids", "Open in a new window", "Visible", "Performing an action...", "Action completed", "Action failed", "Save", "First", "Last", "Previous", "Next", "Send feedback", "Feedback", "Title", "Description", "Attach files", "Send", "Sending...", "Feedback sent successfully", "Title is required", "File size exceeds the 5 MB limit", "Remove file", "Max 5 MB per file", "View All", "Make read", "Make all read", "Message", "Date", "Watch", "Current", "There is no history"];
|
|
2
2
|
export declare const FILTER_UI_TRANSLATION_KEYS: readonly ["Filters", "Saved filters", "Active filter", "Add filter", "Reset filter", "Reset", "Equal", "Not equal", "Contains", "Not contains", "Starts with", "Ends with", "Is empty", "Is not empty", "Greater than", "Greater or equal", "Less than", "Less or equal", "Between", "After", "After or equal", "Before", "Before or equal", "In list", "Not in list", "Is null", "Is not null", "Yes", "No", "From", "To", "From...", "To...", "Date...", "Today", "Month", "Month range", "Year", "Year range", "Value...", "Select...", "selected", "Search...", "No results", "Error", "Model not found", "Error applying filter", "Enter filter name", "Temporary filter", "Error: model not found", "Error loading columns", "Network error", "Columns settings", "Available columns", "Visible columns", "Add all", "Hide all", "No available columns", "Move columns here", "Save changes", "Apply", "Save", "Back", "Cancel", "conditions", "modified", "Private filter", "For groups", "Public filter", "Only for you", "For selected groups", "For all users", "Visible only to you", "Visible only to your group", "API access (feed)", "Hide", "Show", "Regenerate", "copied to clipboard", "Failed to copy", "Loading filters...", "No saved filters", "Save current filter for quick access", "Someone else's private filter (owner:", "unknown)", "Owner", "Apply filter", "Delete filter", "No permission to delete filter", "Edit filter", "New filter", "Filter conditions", "Add condition", "Select field", "No conditions. Add a condition above.", "Name", "Description", "Icon", "Color", "Filter parameters", "Change filter conditions and parameters", "Configure filter conditions", "Specify name and parameters for saving", "Someone else's private filter", "You cannot change someone else's filter visibility", "Private", "Public", "Visibility", "Export", "Exporting...", "Export is only available with an active filter", "Export to", "completed", "Export error", "Data in JSON format", "Text format CSV", "Excel file", "Conditions", "Access for groups", "Selected groups", "Groups list", "Columns", "Saving...", "Error saving filter", "Column configuration", "Select and arrange columns to display in the table", "Loading columns...", "Use buttons", "to move and", "to change order", "Add", "Edit", "Save filter", "and", "Custom filtering", "Select a saved filter or create a new one", "Select a filter or create a new one", "Filter visibility", "Unknown", "JSON URL", "XML URL", "API key is not created", "The key is not created. Create it or contact an administrator.", "OK"];
|
|
3
3
|
export declare const HISTORY_UI_TRANSLATION_KEYS: readonly ["Models", "All", "Users", "Date", "Pick a date", "Search", "Reset", "Model", "Name", "Event", "User", "Diff", "The end of the list has been reached", "There are no records to display"];
|
|
4
4
|
export declare const HISTORY_TABLE_UI_TRANSLATION_KEYS: readonly ["Event", "Date", "User", "Watch", "Current", "There is no history", "Diff"];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MaterialIcon } from "../../interfaces/MaaterialIcons";
|
|
2
|
+
import type { AppAsset } from "../app-manager/AdminizerApp";
|
|
2
3
|
export declare abstract class CustomBase {
|
|
3
4
|
/** Widget unique id */
|
|
4
5
|
abstract readonly id: string;
|
|
@@ -6,11 +7,13 @@ export declare abstract class CustomBase {
|
|
|
6
7
|
readonly accessRightsToken?: string;
|
|
7
8
|
/** Widget Name */
|
|
8
9
|
abstract readonly name: string;
|
|
9
|
-
/** JS module
|
|
10
|
-
|
|
10
|
+
/** JS module URL fallback for legacy custom widgets without asset metadata */
|
|
11
|
+
readonly jsPath?: {
|
|
11
12
|
dev: string;
|
|
12
13
|
production: string;
|
|
13
14
|
};
|
|
15
|
+
/** JS module asset served by Adminizer asset handler */
|
|
16
|
+
readonly asset?: AppAsset;
|
|
14
17
|
/** For group access rights by department */
|
|
15
18
|
abstract readonly department: string;
|
|
16
19
|
/** Widget background css color */
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export class CustomBase {
|
|
2
2
|
/** Optional pre-existing access token used instead of widget-specific token */
|
|
3
3
|
accessRightsToken;
|
|
4
|
+
/** JS module URL fallback for legacy custom widgets without asset metadata */
|
|
5
|
+
jsPath;
|
|
6
|
+
/** JS module asset served by Adminizer asset handler */
|
|
7
|
+
asset;
|
|
4
8
|
/** Widget background css color */
|
|
5
9
|
backgroundCSS;
|
|
6
10
|
widgetType = 'custom';
|
|
@@ -5,7 +5,7 @@ import { LinkBase } from "./abstractLink";
|
|
|
5
5
|
import { CustomBase } from "./abstractCustom";
|
|
6
6
|
import { AdminpanelIcon } from "../../interfaces/adminpanelConfig";
|
|
7
7
|
import { Adminizer } from "../Adminizer";
|
|
8
|
-
import {
|
|
8
|
+
import { User } from "../../models/User";
|
|
9
9
|
import { I18n } from "../I18n";
|
|
10
10
|
export type WidgetType = (SwitchBase | InfoBase | ActionBase | LinkBase | CustomBase);
|
|
11
11
|
export interface WidgetConfig {
|
|
@@ -46,17 +46,20 @@ export interface WidgetsLayouts {
|
|
|
46
46
|
}
|
|
47
47
|
export declare class WidgetHandler {
|
|
48
48
|
private widgets;
|
|
49
|
+
private widgetAssetIds;
|
|
49
50
|
adminizer: Adminizer;
|
|
50
51
|
constructor(adminizer: Adminizer);
|
|
51
52
|
private resolveAccessRightsToken;
|
|
52
53
|
add(widget: WidgetType): void;
|
|
53
54
|
getById(id: string): WidgetType | undefined;
|
|
54
55
|
removeById(id: string): void;
|
|
56
|
+
private registerCustomWidgetAsset;
|
|
57
|
+
private resolveCustomWidgetScriptUrl;
|
|
55
58
|
private resolveDashboardUser;
|
|
56
59
|
private resolveModelTitle;
|
|
57
60
|
private buildFilterDescription;
|
|
58
61
|
private getBuiltInFilterWidgets;
|
|
59
|
-
getAll(user:
|
|
62
|
+
getAll(user: User | undefined, i18n: I18n): Promise<WidgetConfig[]>;
|
|
60
63
|
private translateWidgetConfig;
|
|
61
64
|
getWidgetsDB(id: number, auth: boolean, i18n: I18n): Promise<{
|
|
62
65
|
widgets: WidgetConfig[];
|
|
@@ -2,6 +2,7 @@ import * as process from "node:process";
|
|
|
2
2
|
import { FilterService } from "../filters/FilterService.js";
|
|
3
3
|
export class WidgetHandler {
|
|
4
4
|
widgets = [];
|
|
5
|
+
widgetAssetIds = new Map();
|
|
5
6
|
adminizer;
|
|
6
7
|
constructor(adminizer) {
|
|
7
8
|
this.adminizer = adminizer;
|
|
@@ -10,13 +11,28 @@ export class WidgetHandler {
|
|
|
10
11
|
return widget.accessRightsToken?.toLowerCase() ?? `widget-${widget.id}`;
|
|
11
12
|
}
|
|
12
13
|
add(widget) {
|
|
14
|
+
let assetId;
|
|
15
|
+
try {
|
|
16
|
+
assetId = this.registerCustomWidgetAsset(widget);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
13
21
|
if (!widget.accessRightsToken) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
try {
|
|
23
|
+
this.adminizer.accessRightsHelper.registerToken({
|
|
24
|
+
id: `widget-${widget.id}`,
|
|
25
|
+
name: widget.name,
|
|
26
|
+
description: widget.description,
|
|
27
|
+
department: widget.department
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (assetId) {
|
|
32
|
+
this.adminizer.assetHandler.unregister(assetId);
|
|
33
|
+
}
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
20
36
|
}
|
|
21
37
|
this.widgets.push(widget);
|
|
22
38
|
}
|
|
@@ -32,10 +48,35 @@ export class WidgetHandler {
|
|
|
32
48
|
if (this.widgets.length) {
|
|
33
49
|
const index = this.widgets.findIndex(widget => widget.id === id);
|
|
34
50
|
if (index !== -1) {
|
|
51
|
+
const assetId = this.widgetAssetIds.get(id);
|
|
52
|
+
if (assetId) {
|
|
53
|
+
this.adminizer.assetHandler.unregister(assetId);
|
|
54
|
+
this.widgetAssetIds.delete(id);
|
|
55
|
+
}
|
|
35
56
|
this.widgets.splice(index, 1);
|
|
36
57
|
}
|
|
37
58
|
}
|
|
38
59
|
}
|
|
60
|
+
registerCustomWidgetAsset(widget) {
|
|
61
|
+
if (widget.widgetType !== "custom" || !widget.asset) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const appName = `legacy-widget-${widget.id}`;
|
|
65
|
+
const scriptUrl = this.adminizer.assetHandler.register(appName, widget.asset);
|
|
66
|
+
widget.scriptUrl = scriptUrl;
|
|
67
|
+
const assetId = `${appName}:${widget.asset.id}`;
|
|
68
|
+
this.widgetAssetIds.set(widget.id, assetId);
|
|
69
|
+
return assetId;
|
|
70
|
+
}
|
|
71
|
+
resolveCustomWidgetScriptUrl(widget) {
|
|
72
|
+
if (widget.scriptUrl) {
|
|
73
|
+
return widget.scriptUrl;
|
|
74
|
+
}
|
|
75
|
+
if (widget.jsPath) {
|
|
76
|
+
return process.env.ADMINIZER_ENV === 'dev' ? widget.jsPath.dev : widget.jsPath.production;
|
|
77
|
+
}
|
|
78
|
+
throw new Error(`Custom widget "${widget.id}" must provide either asset or jsPath`);
|
|
79
|
+
}
|
|
39
80
|
async resolveDashboardUser(user) {
|
|
40
81
|
if (user) {
|
|
41
82
|
return user;
|
|
@@ -43,7 +84,7 @@ export class WidgetHandler {
|
|
|
43
84
|
const adminLogin = this.adminizer.config.administrator?.login ?? "admin";
|
|
44
85
|
const fallbackUser = await this.adminizer.modelHandler
|
|
45
86
|
.internal("widgets")
|
|
46
|
-
.get("
|
|
87
|
+
.get("User")
|
|
47
88
|
.findOne({ where: { login: adminLogin } });
|
|
48
89
|
return fallbackUser ?? null;
|
|
49
90
|
}
|
|
@@ -131,7 +172,8 @@ export class WidgetHandler {
|
|
|
131
172
|
icon: widget.icon,
|
|
132
173
|
name: i18n.__(widget.name),
|
|
133
174
|
backgroundCSS: widget.backgroundCSS ?? null,
|
|
134
|
-
size: widget.size ?? null
|
|
175
|
+
size: widget.size ?? null,
|
|
176
|
+
group: widget.group
|
|
135
177
|
});
|
|
136
178
|
}
|
|
137
179
|
}
|
|
@@ -147,7 +189,8 @@ export class WidgetHandler {
|
|
|
147
189
|
backgroundCSS: widget.backgroundCSS ?? null,
|
|
148
190
|
size: widget.size ?? null,
|
|
149
191
|
link: widget.link,
|
|
150
|
-
linkType: widget.linkType
|
|
192
|
+
linkType: widget.linkType,
|
|
193
|
+
group: widget.group
|
|
151
194
|
});
|
|
152
195
|
}
|
|
153
196
|
}
|
|
@@ -161,7 +204,8 @@ export class WidgetHandler {
|
|
|
161
204
|
icon: widget.icon,
|
|
162
205
|
name: i18n.__(widget.name),
|
|
163
206
|
backgroundCSS: widget.backgroundCSS ?? null,
|
|
164
|
-
size: widget.size ?? null
|
|
207
|
+
size: widget.size ?? null,
|
|
208
|
+
group: widget.group
|
|
165
209
|
});
|
|
166
210
|
}
|
|
167
211
|
}
|
|
@@ -177,7 +221,8 @@ export class WidgetHandler {
|
|
|
177
221
|
description: i18n.__(link.description),
|
|
178
222
|
link: link.link,
|
|
179
223
|
icon: link.icon,
|
|
180
|
-
backgroundCSS: link.backgroundCSS
|
|
224
|
+
backgroundCSS: link.backgroundCSS,
|
|
225
|
+
group: widget.group
|
|
181
226
|
});
|
|
182
227
|
links_id_key++;
|
|
183
228
|
}
|
|
@@ -194,7 +239,8 @@ export class WidgetHandler {
|
|
|
194
239
|
name: i18n.__(widget.name),
|
|
195
240
|
backgroundCSS: widget.backgroundCSS ?? null,
|
|
196
241
|
size: widget.size ?? null,
|
|
197
|
-
scriptUrl:
|
|
242
|
+
scriptUrl: this.resolveCustomWidgetScriptUrl(widget),
|
|
243
|
+
group: widget.group
|
|
198
244
|
});
|
|
199
245
|
}
|
|
200
246
|
}
|
|
@@ -219,7 +265,7 @@ export class WidgetHandler {
|
|
|
219
265
|
widgets: [],
|
|
220
266
|
layout: { lg: [], md: [], sm: [], xs: [], xxs: [] }
|
|
221
267
|
};
|
|
222
|
-
const userModel = this.adminizer.modelHandler.internal("widgets").get("
|
|
268
|
+
const userModel = this.adminizer.modelHandler.internal("widgets").get("User");
|
|
223
269
|
if (!auth) {
|
|
224
270
|
user = await userModel.findOne({ where: { login: this.adminizer.config.administrator?.login ?? 'admin' } });
|
|
225
271
|
}
|
|
@@ -241,7 +287,7 @@ export class WidgetHandler {
|
|
|
241
287
|
return result;
|
|
242
288
|
}
|
|
243
289
|
async setWidgetsDB(id, body, auth) {
|
|
244
|
-
const userModel = this.adminizer.modelHandler.internal("widgets").get("
|
|
290
|
+
const userModel = this.adminizer.modelHandler.internal("widgets").get("User");
|
|
245
291
|
if (!auth) {
|
|
246
292
|
let updatedUser = await userModel.updateOne({ where: { login: this.adminizer.config.administrator?.login ?? 'admin' } }, { widgets: body });
|
|
247
293
|
return updatedUser.id;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FilterColumn } from "./FilterColumn";
|
|
2
2
|
/**
|
|
3
3
|
* Filter operators for query conditions
|
|
4
4
|
*/
|
|
@@ -26,75 +26,9 @@ export interface FilterCondition {
|
|
|
26
26
|
*/
|
|
27
27
|
export type FilterVisibility = 'private' | 'public' | 'groups' | 'system';
|
|
28
28
|
/**
|
|
29
|
-
* Filter
|
|
29
|
+
* Filter interface for TypeScript
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
id: {
|
|
33
|
-
type: string;
|
|
34
|
-
primaryKey: boolean;
|
|
35
|
-
};
|
|
36
|
-
name: {
|
|
37
|
-
type: string;
|
|
38
|
-
required: boolean;
|
|
39
|
-
};
|
|
40
|
-
description: {
|
|
41
|
-
type: string;
|
|
42
|
-
};
|
|
43
|
-
modelName: {
|
|
44
|
-
type: string;
|
|
45
|
-
required: boolean;
|
|
46
|
-
};
|
|
47
|
-
conditions: {
|
|
48
|
-
type: string;
|
|
49
|
-
};
|
|
50
|
-
sortField: {
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
|
-
sortDirection: {
|
|
54
|
-
type: string;
|
|
55
|
-
};
|
|
56
|
-
visibility: {
|
|
57
|
-
type: string;
|
|
58
|
-
};
|
|
59
|
-
ownerId: {
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
groupIds: {
|
|
63
|
-
type: string;
|
|
64
|
-
};
|
|
65
|
-
apiEnabled: {
|
|
66
|
-
type: string;
|
|
67
|
-
};
|
|
68
|
-
apiKey: {
|
|
69
|
-
type: string;
|
|
70
|
-
};
|
|
71
|
-
icon: {
|
|
72
|
-
type: string;
|
|
73
|
-
};
|
|
74
|
-
color: {
|
|
75
|
-
type: string;
|
|
76
|
-
};
|
|
77
|
-
version: {
|
|
78
|
-
type: string;
|
|
79
|
-
};
|
|
80
|
-
columns: {
|
|
81
|
-
collection: string;
|
|
82
|
-
via: string;
|
|
83
|
-
};
|
|
84
|
-
createdAt: {
|
|
85
|
-
type: string;
|
|
86
|
-
autoCreatedAt: boolean;
|
|
87
|
-
};
|
|
88
|
-
updatedAt: {
|
|
89
|
-
type: string;
|
|
90
|
-
autoUpdatedAt: boolean;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
export default _default;
|
|
94
|
-
/**
|
|
95
|
-
* FilterAP interface for TypeScript
|
|
96
|
-
*/
|
|
97
|
-
export interface FilterAP {
|
|
31
|
+
export interface Filter {
|
|
98
32
|
id?: string;
|
|
99
33
|
name: string;
|
|
100
34
|
description?: string;
|
|
@@ -112,5 +46,5 @@ export interface FilterAP {
|
|
|
112
46
|
version: number;
|
|
113
47
|
createdAt?: Date;
|
|
114
48
|
updatedAt?: Date;
|
|
115
|
-
columns?:
|
|
49
|
+
columns?: FilterColumn[];
|
|
116
50
|
}
|
package/models/Filter.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/models/Group.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { User } from "./User";
|
|
2
|
+
export interface HistoryActions {
|
|
3
|
+
id?: number;
|
|
4
|
+
modelId: number | string;
|
|
5
|
+
modelName: string;
|
|
6
|
+
action: string;
|
|
7
|
+
data: any;
|
|
8
|
+
diff: any;
|
|
9
|
+
user: User;
|
|
10
|
+
isCurrent: boolean;
|
|
11
|
+
createdAt?: number;
|
|
12
|
+
updatedAt?: number;
|
|
13
|
+
preview: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,57 +1,5 @@
|
|
|
1
|
-
import { MediaManagerAssociationsAP } from "./MediaManagerAssociationsAP";
|
|
2
|
-
import { MediaManagerMetaAP } from "./MediaManagerMetaAP";
|
|
3
|
-
declare const _default: {
|
|
4
|
-
id: {
|
|
5
|
-
type: string;
|
|
6
|
-
autoIncrement: boolean;
|
|
7
|
-
primaryKey: boolean;
|
|
8
|
-
};
|
|
9
|
-
parent: {
|
|
10
|
-
model: string;
|
|
11
|
-
};
|
|
12
|
-
variants: {
|
|
13
|
-
collection: string;
|
|
14
|
-
via: string;
|
|
15
|
-
};
|
|
16
|
-
mimeType: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
path: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
size: {
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
group: {
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
tag: {
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
31
|
-
url: {
|
|
32
|
-
type: string;
|
|
33
|
-
};
|
|
34
|
-
filename: {
|
|
35
|
-
type: string;
|
|
36
|
-
};
|
|
37
|
-
meta: {
|
|
38
|
-
collection: string;
|
|
39
|
-
via: string;
|
|
40
|
-
};
|
|
41
|
-
modelAssociation: {
|
|
42
|
-
collection: string;
|
|
43
|
-
via: string;
|
|
44
|
-
};
|
|
45
|
-
createdAt: {
|
|
46
|
-
type: string;
|
|
47
|
-
autoCreatedAt: boolean;
|
|
48
|
-
};
|
|
49
|
-
updatedAt: {
|
|
50
|
-
type: string;
|
|
51
|
-
autoUpdatedAt: boolean;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export default _default;
|
|
1
|
+
import type { MediaManagerAssociationsAP } from "./MediaManagerAssociationsAP";
|
|
2
|
+
import type { MediaManagerMetaAP } from "./MediaManagerMetaAP";
|
|
55
3
|
export interface MediaManagerAP {
|
|
56
4
|
id: string;
|
|
57
5
|
parent?: MediaManagerAP;
|
package/models/MediaManagerAP.js
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
id: {
|
|
3
|
-
type: "number",
|
|
4
|
-
autoIncrement: true,
|
|
5
|
-
primaryKey: true
|
|
6
|
-
},
|
|
7
|
-
parent: {
|
|
8
|
-
model: "MediaManagerAP"
|
|
9
|
-
},
|
|
10
|
-
variants: {
|
|
11
|
-
collection: "MediaManagerAP",
|
|
12
|
-
via: "parent"
|
|
13
|
-
},
|
|
14
|
-
mimeType: {
|
|
15
|
-
type: "string"
|
|
16
|
-
},
|
|
17
|
-
path: {
|
|
18
|
-
type: "string"
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
type: "number"
|
|
22
|
-
},
|
|
23
|
-
group: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
tag: {
|
|
27
|
-
type: "string"
|
|
28
|
-
},
|
|
29
|
-
url: {
|
|
30
|
-
type: "string"
|
|
31
|
-
},
|
|
32
|
-
filename: {
|
|
33
|
-
type: "string"
|
|
34
|
-
},
|
|
35
|
-
meta: {
|
|
36
|
-
collection: "MediaManagerMetaAP",
|
|
37
|
-
via: "parent"
|
|
38
|
-
},
|
|
39
|
-
modelAssociation: {
|
|
40
|
-
collection: "MediaManagerAssociationsAP",
|
|
41
|
-
via: "file"
|
|
42
|
-
},
|
|
43
|
-
createdAt: {
|
|
44
|
-
type: 'datetime',
|
|
45
|
-
autoCreatedAt: true
|
|
46
|
-
},
|
|
47
|
-
updatedAt: {
|
|
48
|
-
type: 'datetime',
|
|
49
|
-
autoUpdatedAt: true
|
|
50
|
-
}
|
|
51
|
-
};
|
|
1
|
+
export {};
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
import { MediaManagerAP } from "./MediaManagerAP";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
id: {
|
|
4
|
-
type: string;
|
|
5
|
-
autoIncrement: boolean;
|
|
6
|
-
primaryKey: boolean;
|
|
7
|
-
};
|
|
8
|
-
mediaManagerId: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
model: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
modelId: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
widgetName: {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
sortOrder: {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
file: {
|
|
24
|
-
model: string;
|
|
25
|
-
};
|
|
26
|
-
createdAt: {
|
|
27
|
-
type: string;
|
|
28
|
-
autoCreatedAt: boolean;
|
|
29
|
-
};
|
|
30
|
-
updatedAt: {
|
|
31
|
-
type: string;
|
|
32
|
-
autoUpdatedAt: boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export default _default;
|
|
1
|
+
import type { MediaManagerAP } from "./MediaManagerAP";
|
|
36
2
|
export interface MediaManagerAssociationsAP {
|
|
37
3
|
id: string;
|
|
38
4
|
mediaManagerId?: string;
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
id: {
|
|
3
|
-
type: "number",
|
|
4
|
-
autoIncrement: true,
|
|
5
|
-
primaryKey: true
|
|
6
|
-
},
|
|
7
|
-
mediaManagerId: {
|
|
8
|
-
type: "string"
|
|
9
|
-
},
|
|
10
|
-
model: {
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
modelId: {
|
|
14
|
-
type: "string" // ✅ Changed: support for strings and numbers via casting to string
|
|
15
|
-
},
|
|
16
|
-
widgetName: {
|
|
17
|
-
type: "string"
|
|
18
|
-
},
|
|
19
|
-
sortOrder: {
|
|
20
|
-
type: "number"
|
|
21
|
-
},
|
|
22
|
-
file: {
|
|
23
|
-
model: "MediaManagerAP"
|
|
24
|
-
},
|
|
25
|
-
createdAt: {
|
|
26
|
-
type: 'datetime',
|
|
27
|
-
autoCreatedAt: true
|
|
28
|
-
},
|
|
29
|
-
updatedAt: {
|
|
30
|
-
type: 'datetime',
|
|
31
|
-
autoUpdatedAt: true
|
|
32
|
-
}
|
|
33
|
-
};
|
|
1
|
+
export {};
|