adminizer 4.2.0-build.58 → 4.2.0-build.59

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.
@@ -105,7 +105,9 @@ export default function inertiaAddHelper(req, entity, fields, record, view = fal
105
105
  options = getControlsOptions(fieldConfig, req, fieldType, 'leaflet');
106
106
  }
107
107
  if (type === 'mediamanager') {
108
- let mediaManager = MediaManagerHandler.get('default');
108
+ const mConfig = field.config;
109
+ const mOptions = mConfig?.options;
110
+ const mediaManager = MediaManagerHandler.get(mOptions.id || 'default');
109
111
  if (!mediaManager) {
110
112
  options = {};
111
113
  }
@@ -327,7 +327,7 @@ export interface TuiEditorFieldConfig extends BaseFieldConfig {
327
327
  options: TuiEditorOptions;
328
328
  }
329
329
  export interface MediaManagerOptionsField {
330
- id: string;
330
+ id: 'default' | string;
331
331
  group: string;
332
332
  config?: Record<string, any>;
333
333
  }
@@ -13,7 +13,6 @@ export class MediaManagerHandler {
13
13
  instance = this.managers[0];
14
14
  }
15
15
  if (!instance) {
16
- Adminizer.log.debug(`MediaManager list ${JSON.stringify(this.managers, null, 2)}`);
17
16
  Adminizer.log.debug(`MediaManager with id ${id} not found`);
18
17
  }
19
18
  Adminizer.log.debug(`ins`, instance);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.2.0-build.58",
4
+ "version": "4.2.0-build.59",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",