adminizer 4.4.0-build.170 → 4.4.0-build.172

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.
@@ -85,7 +85,7 @@ export default async function list(req, res) {
85
85
  props: {
86
86
  header: header,
87
87
  columns: columns,
88
- data: data,
88
+ data: data ?? [],
89
89
  }
90
90
  });
91
91
  }, dataAccessor);
@@ -103,8 +103,8 @@ export async function up(knex) {
103
103
  table.uuid("id").primary().notNullable();
104
104
  }
105
105
  table.string("mediaManagerId");
106
- table.json("model");
107
- table.json("modelId");
106
+ table.string("model");
107
+ table.integer("modelId");
108
108
  table.string("widgetName");
109
109
  table.integer("sortOrder");
110
110
  table.uuid("file").nullable().references("id").inTable("mediamanagerap");
@@ -64,8 +64,8 @@ export async function up({ context }) {
64
64
  await context.createTable("mediamanagerassociationsap", {
65
65
  id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, allowNull: false },
66
66
  mediaManagerId: { type: DataTypes.STRING },
67
- model: { type: DataTypes.JSON },
68
- modelId: { type: DataTypes.JSON },
67
+ model: { type: DataTypes.STRING },
68
+ modelId: { type: DataTypes.INTEGER },
69
69
  widgetName: { type: DataTypes.STRING },
70
70
  sortOrder: { type: DataTypes.INTEGER },
71
71
  fileId: { type: DataTypes.UUID, allowNull: true, references: { model: "mediamanagerap", key: "id" } },
@@ -12,10 +12,6 @@ declare const _default: {
12
12
  type: string;
13
13
  };
14
14
  modelId: {
15
- /**
16
- * type: "json"
17
- * is a generic type for any model id, type parsing should be done by specific model
18
- */
19
15
  type: string;
20
16
  };
21
17
  widgetName: {
@@ -40,8 +36,8 @@ export default _default;
40
36
  export interface MediaManagerAssociationsAP {
41
37
  id: string;
42
38
  mediaManagerId?: string;
43
- model?: Record<string, unknown>;
44
- modelId?: Record<string, unknown>;
39
+ model?: string;
40
+ modelId?: number;
45
41
  widgetName?: string;
46
42
  sortOrder?: number;
47
43
  file?: MediaManagerAP;
@@ -11,11 +11,7 @@ export default {
11
11
  type: "string"
12
12
  },
13
13
  modelId: {
14
- /**
15
- * type: "json"
16
- * is a generic type for any model id, type parsing should be done by specific model
17
- */
18
- type: "json"
14
+ type: "number"
19
15
  },
20
16
  widgetName: {
21
17
  type: "string"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.4.0-build.170",
4
+ "version": "4.4.0-build.172",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",