identity-admin 1.18.0 → 1.20.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.
@@ -79,6 +79,9 @@ class ResourceGenerator {
79
79
  if (!resource.filterProperties) {
80
80
  modifiedResource.filterProperties = modifiedFilterProperties;
81
81
  }
82
+ if (!resource.quickFilterProperties) {
83
+ modifiedResource.quickFilterProperties = [];
84
+ }
82
85
  if (!resource.listProperties) {
83
86
  modifiedResource.listProperties = ResourceHelper_1.default.exchangeFirstFieldWithTitle(JSON.parse(JSON.stringify(modifiedListProperties)), title);
84
87
  }
@@ -98,6 +101,7 @@ class ResourceGenerator {
98
101
  modifiedResource.listProperties = ResourceHelper_1.default.prepareProperties(resource.listProperties ? resource.listProperties : modifiedResource.listProperties, modelName, modifiedResource.properties.model, resource);
99
102
  modifiedResource.showProperties = ResourceHelper_1.default.prepareProperties(resource.showProperties ? resource.showProperties : modifiedResource.showProperties, modelName, modifiedResource.properties.model, resource);
100
103
  modifiedResource.filterProperties = ResourceHelper_1.default.prepareFilterProperties(modifiedResource.filterProperties, modifiedResource.properties.model);
104
+ modifiedResource.quickFilterProperties = ResourceHelper_1.default.prepareFilterProperties(modifiedResource.quickFilterProperties, modifiedResource.properties.model);
101
105
  modifiedResource.properties.filters = ResourceHelper_1.default.getFilters(resource.properties.filters ? JSON.parse(JSON.stringify(resource.properties.filters)) : undefined);
102
106
  if (modifiedResource.properties.filters && modifiedResource.properties.filters.scopes && modifiedResource.properties.filters.scopes.isAccessible) {
103
107
  const options = ((_b = (_a = resource.properties.filters) === null || _a === void 0 ? void 0 : _a.scopes) === null || _b === void 0 ? void 0 : _b.auto) ? (_d = (_c = resource.properties.filters) === null || _c === void 0 ? void 0 : _c.scopes) === null || _d === void 0 ? void 0 : _d.auto.options : (_g = (_f = (_e = resource.properties.filters) === null || _e === void 0 ? void 0 : _e.scopes) === null || _f === void 0 ? void 0 : _f.manual) === null || _g === void 0 ? void 0 : _g.options;
@@ -0,0 +1,2 @@
1
+ import { Schema, SchemaOptions } from "mongoose";
2
+ export declare function getFileSchema(schemaOptions: SchemaOptions): Schema;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFileSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const helpers_1 = require("../../types/helpers");
6
+ function getFileSchema(schemaOptions) {
7
+ return new mongoose_1.Schema({
8
+ title: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ url: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ type: {
17
+ type: String,
18
+ required: true,
19
+ enum: Object.values(helpers_1.FileTypes),
20
+ },
21
+ }, schemaOptions);
22
+ }
23
+ exports.getFileSchema = getFileSchema;
@@ -0,0 +1,15 @@
1
+ import { Document, Model, Types } from 'mongoose';
2
+ import { FileTypes } from '../../types/helpers';
3
+ export interface IFileProps {
4
+ _id?: Types.ObjectId;
5
+ title: string;
6
+ url: string;
7
+ type: FileTypes;
8
+ }
9
+ export interface IFileDocument extends IFileProps, Document {
10
+ _id: Types.ObjectId;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }
14
+ export default interface IFileModel extends Model<IFileDocument> {
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { Document, Model, Types } from "mongoose";
2
+ export interface ILocationProps {
3
+ _id?: Types.ObjectId;
4
+ address?: string;
5
+ latitude?: number;
6
+ longitude?: number;
7
+ }
8
+ export interface ILocationDocument extends ILocationProps, Document {
9
+ _id: Types.ObjectId;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ }
13
+ export default interface ILocationModel extends Model<ILocationDocument> {
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { Schema, SchemaOptions } from "mongoose";
2
+ export declare function getLocationSchema(schemaOptions: SchemaOptions): Schema;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLocationSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ function getLocationSchema(schemaOptions) {
6
+ return new mongoose_1.Schema({
7
+ address: {
8
+ type: String,
9
+ required: false,
10
+ },
11
+ latitude: {
12
+ type: Number,
13
+ required: false,
14
+ },
15
+ longitude: {
16
+ type: Number,
17
+ required: false,
18
+ },
19
+ }, schemaOptions);
20
+ }
21
+ exports.getLocationSchema = getLocationSchema;
@@ -324,6 +324,11 @@ interface ExtraAction {
324
324
  * @default 'success'
325
325
  */
326
326
  severity?: Severity;
327
+ /**
328
+ * Specify if you need the dialog to be in full screen or not. Used only in case of custom component strategy
329
+ * @default 'false'
330
+ */
331
+ fullScreen?: boolean;
327
332
  /**
328
333
  * @returns boolean value.
329
334
  * This value Specifies to which records should this action appears.
@@ -469,5 +474,10 @@ export interface IResourceFile {
469
474
  * @default 'The whole fields'
470
475
  */
471
476
  filterProperties?: string[];
477
+ /**
478
+ * Array of properties that should be appeared in the quick filters.
479
+ * @default 'Empty array'
480
+ */
481
+ quickFilterProperties?: string[];
472
482
  }
473
483
  export {};
@@ -29,9 +29,12 @@ export declare enum FieldTypes {
29
29
  LOCALIZEDSTRING = "localizedString",
30
30
  PHONENUMBER = "phoneNumber",
31
31
  COLOR = "color",
32
- TIMEPICKER = "timePicker"
32
+ TIMEPICKER = "timePicker",
33
+ FILE = "File",
34
+ LOCATION = "LOCATION"
33
35
  }
34
36
  export declare enum FileTypes {
37
+ ALL = "ALL",
35
38
  IMAGE = "IMAGE",
36
39
  _3D = "3D",
37
40
  PDF = "PDF",
@@ -37,9 +37,12 @@ var FieldTypes;
37
37
  FieldTypes["PHONENUMBER"] = "phoneNumber";
38
38
  FieldTypes["COLOR"] = "color";
39
39
  FieldTypes["TIMEPICKER"] = "timePicker";
40
+ FieldTypes["FILE"] = "File";
41
+ FieldTypes["LOCATION"] = "LOCATION";
40
42
  })(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));
41
43
  var FileTypes;
42
44
  (function (FileTypes) {
45
+ FileTypes["ALL"] = "ALL";
43
46
  FileTypes["IMAGE"] = "IMAGE";
44
47
  FileTypes["_3D"] = "3D";
45
48
  FileTypes["PDF"] = "PDF";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "identity-admin",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "",
5
5
  "main": "lib/Dashboard.js",
6
6
  "types": "lib/Dashbord.d.ts",