adminizer 4.4.0-build.155 → 4.4.0-build.157

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.
@@ -2,7 +2,7 @@ import { Entity, PropsField } from "../interfaces/types";
2
2
  import { Actions } from "./inertiaActionsHelper";
3
3
  import { Fields, Field } from "./fieldsHelper";
4
4
  import { AbstractControls, ControlType } from "../lib/controls/AbstractControls";
5
- export type PropsFieldType = 'text' | 'number' | 'range' | 'week' | 'month' | 'email' | 'color' | 'time' | 'date' | 'datetime-local' | 'password' | 'select' | 'select-many' | 'association-many' | 'association' | 'textarea' | 'mediamanager' | 'checkbox' | ControlType;
5
+ export type PropsFieldType = 'text' | 'number' | 'range' | 'week' | 'month' | 'email' | 'color' | 'time' | 'date' | 'datetime-local' | 'password' | 'select' | 'select-many' | 'association-many' | 'association' | 'textarea' | 'mediamanager' | 'single-file' | 'checkbox' | ControlType;
6
6
  interface FieldProps extends Record<string | number | symbol, unknown> {
7
7
  edit: boolean;
8
8
  view: boolean;
@@ -103,7 +103,7 @@ export default function inertiaAddHelper(req, entity, fields, record, view = fal
103
103
  fieldType = 'geoJson';
104
104
  options = getControlsOptions(fieldConfig, req, fieldType, 'leaflet');
105
105
  }
106
- if (type === 'mediamanager') {
106
+ if (type === 'mediamanager' || type === 'single-file') {
107
107
  const mConfig = field.config;
108
108
  const mOptions = mConfig?.options;
109
109
  const mediaManager = req.adminizer.mediaManagerHandler.get(mOptions.id || 'default');
@@ -111,7 +111,7 @@ export default function inertiaAddHelper(req, entity, fields, record, view = fal
111
111
  options = {};
112
112
  }
113
113
  else {
114
- fieldType = 'mediamanager';
114
+ fieldType = type;
115
115
  options = field.config.options;
116
116
  }
117
117
  }
package/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from "./lib/catalog/AbstractCatalog";
11
11
  export * from "./lib/catalog/Navigation";
12
12
  export * from "./lib/catalog/CatalogHandler";
13
13
  export * from "./lib/media-manager/MediaManagerHandler";
14
+ export * from "./controllers/media-manager/mediaManagerAdapter";
14
15
  export * from "./interfaces/adminpanelConfig";
15
16
  export * from "./interfaces/types";
16
17
  export * from "./interfaces/MaaterialIcons";
package/index.js CHANGED
@@ -11,6 +11,7 @@ export * from "./lib/catalog/AbstractCatalog.js";
11
11
  export * from "./lib/catalog/Navigation.js";
12
12
  export * from "./lib/catalog/CatalogHandler.js";
13
13
  export * from "./lib/media-manager/MediaManagerHandler.js";
14
+ export * from "./controllers/media-manager/mediaManagerAdapter.js";
14
15
  export * from "./interfaces/adminpanelConfig.js";
15
16
  export * from "./interfaces/types.js";
16
17
  export * from "./interfaces/MaaterialIcons.js";
@@ -8,7 +8,7 @@ import { UserAP } from "models/UserAP";
8
8
  */
9
9
  export type ControllerFunction = (req: ReqType, res: ResType) => Promise<any>;
10
10
  export type AdminpanelIcon = MaterialIcon;
11
- export type FieldsTypes = "string" | "password" | "date" | "datetime" | "time" | "integer" | "number" | "float" | "color" | "email" | "month" | "week" | "range" | "boolean" | "binary" | "text" | "longtext" | "mediumtext" | "ckeditor" | "wysiwyg" | "texteditor" | "word" | 'tui' | 'tuieditor' | 'toast-ui' | "jsoneditor" | "json" | "array" | "object" | "ace" | "code" | "html" | "xml" | "aceeditor" | "menu" | "schedule" | "worktime" | "association" | "association-many" | "select" | "select-many" | "table" | "geojson" | "mediamanager" |
11
+ export type FieldsTypes = "string" | "password" | "date" | "datetime" | "time" | "integer" | "number" | "float" | "color" | "email" | "month" | "week" | "range" | "boolean" | "binary" | "text" | "longtext" | "mediumtext" | "ckeditor" | "wysiwyg" | "texteditor" | "word" | 'tui' | 'tuieditor' | 'toast-ui' | "jsoneditor" | "json" | "array" | "object" | "ace" | "code" | "html" | "xml" | "aceeditor" | "menu" | "schedule" | "worktime" | "association" | "association-many" | "select" | "select-many" | "table" | "geojson" | "mediamanager" | "single-file" |
12
12
  /**
13
13
  * it will be needed only for polygon data
14
14
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.4.0-build.155",
4
+ "version": "4.4.0-build.157",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
@@ -64,7 +64,7 @@
64
64
  "User groups": "Группы пользователя",
65
65
  "User settings": "Настроики пользователя",
66
66
  "Values in \"password\" and \"repeatPassword\" fields should be the same": "Значения в полях \"password\" и \"repeatPassword\" должны быть одинаковыми.",
67
- "View": "Просмотреть",
67
+ "View": "Посмотреть",
68
68
  "Welcome": "Здравствуйте",
69
69
  "Yes": "Да",
70
70
  "You don't have any widgets selected yet. You can add them by clicking on the plus sign at the top right.": "У вас пока нет выбранных виджетов. Вы можете добавить их, нажав на значок плюса в правом верхнем углу.",