@smartsoft001/models 1.1.91 → 2.23.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.
- package/README.md +6 -2
- package/index.cjs +294 -0
- package/package.json +12 -16
- package/src/index.js +0 -8
- package/src/index.js.map +0 -1
- package/src/lib/decorators/field/field.decorator.js +0 -49
- package/src/lib/decorators/field/field.decorator.js.map +0 -1
- package/src/lib/decorators/index.js +0 -6
- package/src/lib/decorators/index.js.map +0 -1
- package/src/lib/decorators/model/model.decorator.js +0 -23
- package/src/lib/decorators/model/model.decorator.js.map +0 -1
- package/src/lib/interfaces.js +0 -39
- package/src/lib/interfaces.js.map +0 -1
- package/src/lib/symbols.js +0 -6
- package/src/lib/symbols.js.map +0 -1
- package/src/lib/utils.js +0 -85
- package/src/lib/utils.js.map +0 -1
- package/test-setup.d.ts +0 -0
- package/test-setup.js +0 -1
- package/test-setup.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# models
|
|
2
2
|
|
|
3
3
|
This library was generated with [Nx](https://nx.dev).
|
|
4
4
|
|
|
5
|
+
## Building
|
|
6
|
+
|
|
7
|
+
Run `nx build models` to build the library.
|
|
8
|
+
|
|
5
9
|
## Running unit tests
|
|
6
10
|
|
|
7
|
-
Run `nx test
|
|
11
|
+
Run `nx test models` to execute the unit tests via [Jest](https://jestjs.io).
|
package/index.cjs
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/shared/models/src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
Field: () => Field,
|
|
34
|
+
FieldDecorator: () => FieldDecorator,
|
|
35
|
+
FieldType: () => FieldType,
|
|
36
|
+
FieldTypeDef: () => FieldTypeDef,
|
|
37
|
+
Model: () => Model,
|
|
38
|
+
ModelDecorator: () => ModelDecorator,
|
|
39
|
+
SYMBOL_FIELD: () => SYMBOL_FIELD,
|
|
40
|
+
SYMBOL_MODEL: () => SYMBOL_MODEL,
|
|
41
|
+
castModel: () => castModel,
|
|
42
|
+
getInvalidFields: () => getInvalidFields,
|
|
43
|
+
getModelFieldKeys: () => getModelFieldKeys,
|
|
44
|
+
getModelFieldOptions: () => getModelFieldOptions,
|
|
45
|
+
getModelFieldsWithOptions: () => getModelFieldsWithOptions,
|
|
46
|
+
getModelOptions: () => getModelOptions,
|
|
47
|
+
isModel: () => isModel
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(src_exports);
|
|
50
|
+
|
|
51
|
+
// packages/shared/models/src/lib/symbols.ts
|
|
52
|
+
var SYMBOL_MODEL = Symbol.for("smartsoft:model");
|
|
53
|
+
var SYMBOL_FIELD = Symbol.for("smartsoft:field");
|
|
54
|
+
|
|
55
|
+
// packages/shared/models/src/lib/interfaces.ts
|
|
56
|
+
var FieldTypeDef = /* @__PURE__ */ ((FieldTypeDef2) => {
|
|
57
|
+
FieldTypeDef2["address"] = "address";
|
|
58
|
+
FieldTypeDef2["currency"] = "currency";
|
|
59
|
+
FieldTypeDef2["date"] = "date";
|
|
60
|
+
FieldTypeDef2["dateTime"] = "dateTime";
|
|
61
|
+
FieldTypeDef2["dateWithEdit"] = "dateWithEdit";
|
|
62
|
+
FieldTypeDef2["email"] = "email";
|
|
63
|
+
FieldTypeDef2["enum"] = "enum";
|
|
64
|
+
FieldTypeDef2["file"] = "file";
|
|
65
|
+
FieldTypeDef2["flag"] = "flag";
|
|
66
|
+
FieldTypeDef2["int"] = "int";
|
|
67
|
+
FieldTypeDef2["nip"] = "nip";
|
|
68
|
+
FieldTypeDef2["object"] = "object";
|
|
69
|
+
FieldTypeDef2["array"] = "array";
|
|
70
|
+
FieldTypeDef2["password"] = "password";
|
|
71
|
+
FieldTypeDef2["radio"] = "radio";
|
|
72
|
+
FieldTypeDef2["text"] = "text";
|
|
73
|
+
FieldTypeDef2["strings"] = "strings";
|
|
74
|
+
FieldTypeDef2["ints"] = "ints";
|
|
75
|
+
FieldTypeDef2["longText"] = "longText";
|
|
76
|
+
FieldTypeDef2["color"] = "color";
|
|
77
|
+
FieldTypeDef2["logo"] = "logo";
|
|
78
|
+
FieldTypeDef2["check"] = "check";
|
|
79
|
+
FieldTypeDef2["phoneNumber"] = "phoneNumber";
|
|
80
|
+
FieldTypeDef2["phoneNumberPl"] = "phoneNumberPl";
|
|
81
|
+
FieldTypeDef2["pesel"] = "pesel";
|
|
82
|
+
FieldTypeDef2["pdf"] = "pdf";
|
|
83
|
+
FieldTypeDef2["video"] = "video";
|
|
84
|
+
FieldTypeDef2["attachment"] = "attachment";
|
|
85
|
+
FieldTypeDef2["dateRange"] = "dateRange";
|
|
86
|
+
FieldTypeDef2["image"] = "image";
|
|
87
|
+
FieldTypeDef2["float"] = "float";
|
|
88
|
+
return FieldTypeDef2;
|
|
89
|
+
})(FieldTypeDef || {});
|
|
90
|
+
var FieldType = FieldTypeDef;
|
|
91
|
+
|
|
92
|
+
// packages/shared/models/src/lib/decorators/model/model.decorator.ts
|
|
93
|
+
var import_reflect_metadata = require("reflect-metadata");
|
|
94
|
+
var Model = ModelDecorator;
|
|
95
|
+
function ModelDecorator(options) {
|
|
96
|
+
return function(target) {
|
|
97
|
+
options = options ? { ...options } : {};
|
|
98
|
+
Reflect.defineMetadata(SYMBOL_MODEL, options, target);
|
|
99
|
+
target.prototype.toJSON = function() {
|
|
100
|
+
const result = { ...this };
|
|
101
|
+
if (this.constructor["__properties"]) {
|
|
102
|
+
Object.keys(this.constructor["__properties"]).forEach((protoKey) => {
|
|
103
|
+
result[protoKey] = this["_" + protoKey];
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// packages/shared/models/src/lib/decorators/field/field.decorator.ts
|
|
112
|
+
var import_reflect_metadata2 = require("reflect-metadata");
|
|
113
|
+
|
|
114
|
+
// packages/shared/utils/src/lib/services/password/password.service.ts
|
|
115
|
+
var md5_ = __toESM(require("md5"));
|
|
116
|
+
|
|
117
|
+
// packages/shared/utils/src/lib/services/object/object.service.ts
|
|
118
|
+
var import_flatted = require("flatted");
|
|
119
|
+
var ObjectService = class {
|
|
120
|
+
/***
|
|
121
|
+
* Create object with data
|
|
122
|
+
* @param data {object} - data to set
|
|
123
|
+
* @param type {type} - new type
|
|
124
|
+
* @return - new type object
|
|
125
|
+
*/
|
|
126
|
+
static createByType(data, type) {
|
|
127
|
+
if (!data)
|
|
128
|
+
return data;
|
|
129
|
+
try {
|
|
130
|
+
if (data instanceof type)
|
|
131
|
+
return data;
|
|
132
|
+
} catch (e) {
|
|
133
|
+
console.warn(e);
|
|
134
|
+
}
|
|
135
|
+
const result = new type();
|
|
136
|
+
Object.keys(data).forEach((key) => {
|
|
137
|
+
result[key] = data[key];
|
|
138
|
+
});
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
/***
|
|
142
|
+
* Remove object type from data
|
|
143
|
+
* @param obj {object} - object
|
|
144
|
+
* @return - object without type
|
|
145
|
+
*/
|
|
146
|
+
static removeTypes(obj) {
|
|
147
|
+
if (!obj)
|
|
148
|
+
return obj;
|
|
149
|
+
const result = {};
|
|
150
|
+
Object.keys(obj).forEach((key) => {
|
|
151
|
+
if (obj[key] && obj[key].constructor && !(obj[key] instanceof Date)) {
|
|
152
|
+
let stringValue = "";
|
|
153
|
+
try {
|
|
154
|
+
stringValue = JSON.stringify(obj[key]);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
console.warn("can't stringify without circular package");
|
|
157
|
+
stringValue = (0, import_flatted.stringify)(obj[key]);
|
|
158
|
+
}
|
|
159
|
+
result[key] = JSON.parse(stringValue);
|
|
160
|
+
} else {
|
|
161
|
+
result[key] = obj[key];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// packages/shared/utils/src/lib/services/guid/guid.service.ts
|
|
169
|
+
var import_guid_typescript = require("guid-typescript");
|
|
170
|
+
|
|
171
|
+
// packages/shared/utils/src/lib/services/array/array.service.ts
|
|
172
|
+
var _ = __toESM(require("lodash"));
|
|
173
|
+
|
|
174
|
+
// packages/shared/models/src/lib/decorators/field/field.decorator.ts
|
|
175
|
+
var Field = FieldDecorator;
|
|
176
|
+
function FieldDecorator(options) {
|
|
177
|
+
return (target, key) => {
|
|
178
|
+
options = options ? { ...options } : {};
|
|
179
|
+
if (!target.constructor["__fields"]) {
|
|
180
|
+
target.constructor["__fields"] = {};
|
|
181
|
+
}
|
|
182
|
+
target.constructor["__fields"][key] = true;
|
|
183
|
+
if (!options.type && key === "password") {
|
|
184
|
+
options.type = FieldType.password;
|
|
185
|
+
} else if (!options.type) {
|
|
186
|
+
options.type = FieldType.text;
|
|
187
|
+
}
|
|
188
|
+
if (options.classType) {
|
|
189
|
+
target["_" + key] = target[key];
|
|
190
|
+
delete target[key];
|
|
191
|
+
Object.defineProperty(target, key, {
|
|
192
|
+
get: function() {
|
|
193
|
+
if (!this["_" + key] && options?.type === FieldType.array) {
|
|
194
|
+
this["_" + key] = [];
|
|
195
|
+
}
|
|
196
|
+
return this["_" + key];
|
|
197
|
+
},
|
|
198
|
+
set: function(v) {
|
|
199
|
+
this["_" + key] = options?.type === FieldType.array && v ? v.map((i) => ObjectService.createByType(i, options?.classType)) : ObjectService.createByType(v, options?.classType);
|
|
200
|
+
},
|
|
201
|
+
enumerable: true,
|
|
202
|
+
configurable: true
|
|
203
|
+
});
|
|
204
|
+
if (!target.constructor["__properties"]) {
|
|
205
|
+
target.constructor["__properties"] = {};
|
|
206
|
+
}
|
|
207
|
+
target.constructor["__properties"][key] = true;
|
|
208
|
+
}
|
|
209
|
+
Reflect.defineMetadata(SYMBOL_FIELD, options, target, key);
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// packages/shared/models/src/lib/utils.ts
|
|
214
|
+
function getModelFieldKeys(type) {
|
|
215
|
+
if (!type["__fields"])
|
|
216
|
+
return [];
|
|
217
|
+
return Object.keys(type["__fields"]);
|
|
218
|
+
}
|
|
219
|
+
function getModelFieldOptions(instance, fieldKey) {
|
|
220
|
+
return Reflect.getMetadata(SYMBOL_FIELD, instance, fieldKey);
|
|
221
|
+
}
|
|
222
|
+
function getModelFieldsWithOptions(instance) {
|
|
223
|
+
const keys = getModelFieldKeys(instance.constructor);
|
|
224
|
+
return keys.map((item) => {
|
|
225
|
+
return {
|
|
226
|
+
key: item,
|
|
227
|
+
options: getModelFieldOptions(instance, item)
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function getModelOptions(type) {
|
|
232
|
+
return Reflect.getMetadata(SYMBOL_MODEL, type);
|
|
233
|
+
}
|
|
234
|
+
function isModel(instance) {
|
|
235
|
+
if (!instance || !instance.constructor)
|
|
236
|
+
return false;
|
|
237
|
+
return Reflect.hasMetadata(SYMBOL_MODEL, instance.constructor);
|
|
238
|
+
}
|
|
239
|
+
function getInvalidFields(instance, mode, permissions) {
|
|
240
|
+
const result = [];
|
|
241
|
+
getModelFieldsWithOptions(instance).forEach(({ key, options }) => {
|
|
242
|
+
let required = options.required;
|
|
243
|
+
if ((mode === "create" || mode === "update") && options[mode] && options[mode]?.constructor) {
|
|
244
|
+
required = options[mode].required;
|
|
245
|
+
if (required && permissions && options[mode].permissions) {
|
|
246
|
+
required = options[mode]?.permissions?.some(
|
|
247
|
+
(op) => permissions.some((p) => p === op)
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (required && (instance[key] === null || instance[key] === void 0 || instance[key] === ""))
|
|
252
|
+
result.push(key);
|
|
253
|
+
});
|
|
254
|
+
return result;
|
|
255
|
+
}
|
|
256
|
+
function castModel(instance, mode, permissions) {
|
|
257
|
+
if (!isModel(instance))
|
|
258
|
+
return;
|
|
259
|
+
const fieldsWithOptions = getModelFieldsWithOptions(instance);
|
|
260
|
+
Object.keys(instance).filter((key) => key !== "id").forEach((key) => {
|
|
261
|
+
const fieldWidthOptions = fieldsWithOptions.find((f) => f.key === key);
|
|
262
|
+
if (!fieldWidthOptions) {
|
|
263
|
+
delete instance[key];
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if ((mode === "create" || mode === "update") && (!fieldWidthOptions.options[mode] || permissions && fieldWidthOptions.options[mode].permissions && !fieldWidthOptions.options[mode]?.permissions?.some(
|
|
267
|
+
(op) => permissions.some((p) => op === p)
|
|
268
|
+
))) {
|
|
269
|
+
delete instance[key];
|
|
270
|
+
return;
|
|
271
|
+
} else if (mode !== "create" && mode !== "update" && (!fieldWidthOptions.options.customs || !fieldWidthOptions.options.customs.some((c) => c.mode === mode))) {
|
|
272
|
+
delete instance[key];
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
278
|
+
0 && (module.exports = {
|
|
279
|
+
Field,
|
|
280
|
+
FieldDecorator,
|
|
281
|
+
FieldType,
|
|
282
|
+
FieldTypeDef,
|
|
283
|
+
Model,
|
|
284
|
+
ModelDecorator,
|
|
285
|
+
SYMBOL_FIELD,
|
|
286
|
+
SYMBOL_MODEL,
|
|
287
|
+
castModel,
|
|
288
|
+
getInvalidFields,
|
|
289
|
+
getModelFieldKeys,
|
|
290
|
+
getModelFieldOptions,
|
|
291
|
+
getModelFieldsWithOptions,
|
|
292
|
+
getModelOptions,
|
|
293
|
+
isModel
|
|
294
|
+
});
|
package/package.json
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/models",
|
|
3
|
-
"
|
|
3
|
+
"type": "commonjs",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"@smartsoft001/utils": "1.1.91",
|
|
16
|
-
"util": "0.12.5",
|
|
17
|
-
"tslib": "2.5.3"
|
|
5
|
+
"@smartsoft001/utils": "^2.23.0",
|
|
6
|
+
"flatted": "3.2.9",
|
|
7
|
+
"guid-typescript": "^1.0.9",
|
|
8
|
+
"lodash": "4.17.21",
|
|
9
|
+
"md5": "^2.3.0",
|
|
10
|
+
"reflect-metadata": "^0.2.1",
|
|
11
|
+
"rxjs": "^7.8.1",
|
|
12
|
+
"tslib": "^2.3.0"
|
|
18
13
|
},
|
|
14
|
+
"version": "2.23.0",
|
|
19
15
|
"main": "./src/index.js",
|
|
20
|
-
"
|
|
21
|
-
}
|
|
16
|
+
"typings": "./src/index.d.ts"
|
|
17
|
+
}
|
package/src/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/symbols"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lib/interfaces"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/decorators"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./lib/utils"), exports);
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/shared/models/src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,2DAAiC;AACjC,2DAAiC;AAEjC,sDAA4B"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldDecorator = exports.Field = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const utils_1 = require("@smartsoft001/utils");
|
|
6
|
-
const symbols = require("../../symbols");
|
|
7
|
-
const interfaces_1 = require("../../interfaces");
|
|
8
|
-
exports.Field = FieldDecorator;
|
|
9
|
-
function FieldDecorator(options) {
|
|
10
|
-
return (target, key) => {
|
|
11
|
-
options = options ? Object.assign({}, options) : {};
|
|
12
|
-
if (!target.constructor['__fields']) {
|
|
13
|
-
target.constructor['__fields'] = {};
|
|
14
|
-
}
|
|
15
|
-
target.constructor['__fields'][key] = true;
|
|
16
|
-
if (!options.type && key === 'password') {
|
|
17
|
-
options.type = interfaces_1.FieldType.password;
|
|
18
|
-
}
|
|
19
|
-
else if (!options.type) {
|
|
20
|
-
options.type = interfaces_1.FieldType.text;
|
|
21
|
-
}
|
|
22
|
-
if (options.classType) {
|
|
23
|
-
target['_' + key] = target[key];
|
|
24
|
-
delete target[key];
|
|
25
|
-
Object.defineProperty(target, key, {
|
|
26
|
-
get: function () {
|
|
27
|
-
if (!this['_' + key] && options.type === interfaces_1.FieldType.array) {
|
|
28
|
-
this['_' + key] = [];
|
|
29
|
-
}
|
|
30
|
-
return this['_' + key];
|
|
31
|
-
},
|
|
32
|
-
set: function (v) {
|
|
33
|
-
this['_' + key] = options.type === interfaces_1.FieldType.array && v ?
|
|
34
|
-
v.map(i => utils_1.ObjectService.createByType(i, options.classType))
|
|
35
|
-
: utils_1.ObjectService.createByType(v, options.classType);
|
|
36
|
-
},
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true
|
|
39
|
-
});
|
|
40
|
-
if (!target.constructor['__properties']) {
|
|
41
|
-
target.constructor['__properties'] = {};
|
|
42
|
-
}
|
|
43
|
-
target.constructor['__properties'][key] = true;
|
|
44
|
-
}
|
|
45
|
-
Reflect.defineMetadata(symbols.SYMBOL_FIELD, options, target, key);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
exports.FieldDecorator = FieldDecorator;
|
|
49
|
-
//# sourceMappingURL=field.decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.decorator.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/models/src/lib/decorators/field/field.decorator.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAE1B,+CAAkD;AAElD,yCAAyC;AACzC,iDAA0D;AAE7C,QAAA,KAAK,GAAG,cAAc,CAAC;AACpC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AC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,qBAAa,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;wBAC5D,CAAC,CAAC,qBAAa,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;gBAC3D,CAAC;gBACD,UAAU,EAAE,IAAI;gBAChB,YAAY,EAAE,IAAI;aACrB,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE;gBACrC,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC;aAC3C;YAED,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;SAClD;QAED,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IACvE,CAAC,CAAA;AACL,CAAC;AA9CD,wCA8CC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./model/model.decorator"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./field/field.decorator"), exports);
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/models/src/lib/decorators/index.ts"],"names":[],"mappings":";;;AAAA,kEAAwC;AACxC,kEAAwC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelDecorator = exports.Model = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const symbols = require("../../symbols");
|
|
6
|
-
exports.Model = ModelDecorator;
|
|
7
|
-
function ModelDecorator(options) {
|
|
8
|
-
return function (target) {
|
|
9
|
-
options = options ? Object.assign({}, options) : {};
|
|
10
|
-
Reflect.defineMetadata(symbols.SYMBOL_MODEL, options, target);
|
|
11
|
-
target.prototype.toJSON = function () {
|
|
12
|
-
const result = Object.assign({}, this);
|
|
13
|
-
if (this.constructor['__properties']) {
|
|
14
|
-
Object.keys(this.constructor['__properties']).forEach(protoKey => {
|
|
15
|
-
result[protoKey] = this['_' + protoKey];
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return result;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.ModelDecorator = ModelDecorator;
|
|
23
|
-
//# sourceMappingURL=model.decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.decorator.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/models/src/lib/decorators/model/model.decorator.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAE1B,yCAAyC;AAG5B,QAAA,KAAK,GAAG,cAAc,CAAC;AACpC,SAAgB,cAAc,CAAC,OAAuB;IACpD,OAAO,UAAY,MAAW;QAC5B,OAAO,GAAG,OAAO,CAAC,CAAC,mBAAM,OAAO,EAAG,CAAC,CAAC,EAAE,CAAC;QAExC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE9D,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG;YACxB,MAAM,MAAM,qBAAQ,IAAI,CAAE,CAAC;YAE3B,IAAI,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE;gBACpC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAC/D,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;aACJ;YAED,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAA;AACH,CAAC;AAlBD,wCAkBC"}
|
package/src/lib/interfaces.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldType = exports.FieldTypeDef = void 0;
|
|
4
|
-
var FieldTypeDef;
|
|
5
|
-
(function (FieldTypeDef) {
|
|
6
|
-
FieldTypeDef["address"] = "address";
|
|
7
|
-
FieldTypeDef["currency"] = "currency";
|
|
8
|
-
FieldTypeDef["date"] = "date";
|
|
9
|
-
FieldTypeDef["dateTime"] = "dateTime";
|
|
10
|
-
FieldTypeDef["dateWithEdit"] = "dateWithEdit";
|
|
11
|
-
FieldTypeDef["email"] = "email";
|
|
12
|
-
FieldTypeDef["enum"] = "enum";
|
|
13
|
-
FieldTypeDef["file"] = "file";
|
|
14
|
-
FieldTypeDef["flag"] = "flag";
|
|
15
|
-
FieldTypeDef["int"] = "int";
|
|
16
|
-
FieldTypeDef["nip"] = "nip";
|
|
17
|
-
FieldTypeDef["object"] = "object";
|
|
18
|
-
FieldTypeDef["array"] = "array";
|
|
19
|
-
FieldTypeDef["password"] = "password";
|
|
20
|
-
FieldTypeDef["radio"] = "radio";
|
|
21
|
-
FieldTypeDef["text"] = "text";
|
|
22
|
-
FieldTypeDef["strings"] = "strings";
|
|
23
|
-
FieldTypeDef["ints"] = "ints";
|
|
24
|
-
FieldTypeDef["longText"] = "longText";
|
|
25
|
-
FieldTypeDef["color"] = "color";
|
|
26
|
-
FieldTypeDef["logo"] = "logo";
|
|
27
|
-
FieldTypeDef["check"] = "check";
|
|
28
|
-
FieldTypeDef["phoneNumber"] = "phoneNumber";
|
|
29
|
-
FieldTypeDef["phoneNumberPl"] = "phoneNumberPl";
|
|
30
|
-
FieldTypeDef["pesel"] = "pesel";
|
|
31
|
-
FieldTypeDef["pdf"] = "pdf";
|
|
32
|
-
FieldTypeDef["video"] = "video";
|
|
33
|
-
FieldTypeDef["attachment"] = "attachment";
|
|
34
|
-
FieldTypeDef["dateRange"] = "dateRange";
|
|
35
|
-
FieldTypeDef["image"] = "image";
|
|
36
|
-
FieldTypeDef["float"] = "float";
|
|
37
|
-
})(FieldTypeDef || (exports.FieldTypeDef = FieldTypeDef = {}));
|
|
38
|
-
exports.FieldType = FieldTypeDef;
|
|
39
|
-
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../../libs/shared/models/src/lib/interfaces.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAgCX;AAhCD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,2CAA2B,CAAA;IAC3B,+CAA+B,CAAA;IAC/B,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,+BAAe,CAAA;IACf,+BAAe,CAAA;AACnB,CAAC,EAhCW,YAAY,4BAAZ,YAAY,QAgCvB;AACY,QAAA,SAAS,GAAwB,YAAY,CAAC"}
|
package/src/lib/symbols.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SYMBOL_FIELD = exports.SYMBOL_MODEL = void 0;
|
|
4
|
-
exports.SYMBOL_MODEL = Symbol.for('smartsoft:model');
|
|
5
|
-
exports.SYMBOL_FIELD = Symbol.for('smartsoft:field');
|
|
6
|
-
//# sourceMappingURL=symbols.js.map
|
package/src/lib/symbols.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["../../../../../../libs/shared/models/src/lib/symbols.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC7C,QAAA,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC"}
|
package/src/lib/utils.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.castModel = exports.getInvalidFields = exports.isModel = exports.getModelOptions = exports.getModelFieldsWithOptions = exports.getModelFieldOptions = exports.getModelFieldKeys = void 0;
|
|
4
|
-
const symbols_1 = require("./symbols");
|
|
5
|
-
function getModelFieldKeys(type) {
|
|
6
|
-
if (!type["__fields"])
|
|
7
|
-
return [];
|
|
8
|
-
return Object.keys(type["__fields"]);
|
|
9
|
-
}
|
|
10
|
-
exports.getModelFieldKeys = getModelFieldKeys;
|
|
11
|
-
function getModelFieldOptions(instance, fieldKey) {
|
|
12
|
-
return Reflect.getMetadata(symbols_1.SYMBOL_FIELD, instance, fieldKey);
|
|
13
|
-
}
|
|
14
|
-
exports.getModelFieldOptions = getModelFieldOptions;
|
|
15
|
-
function getModelFieldsWithOptions(instance) {
|
|
16
|
-
const keys = getModelFieldKeys(instance.constructor);
|
|
17
|
-
return keys.map((item) => {
|
|
18
|
-
return {
|
|
19
|
-
key: item,
|
|
20
|
-
options: getModelFieldOptions(instance, item),
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.getModelFieldsWithOptions = getModelFieldsWithOptions;
|
|
25
|
-
function getModelOptions(type) {
|
|
26
|
-
return Reflect.getMetadata(symbols_1.SYMBOL_MODEL, type);
|
|
27
|
-
}
|
|
28
|
-
exports.getModelOptions = getModelOptions;
|
|
29
|
-
function isModel(instance) {
|
|
30
|
-
if (!instance || !instance.constructor)
|
|
31
|
-
return false;
|
|
32
|
-
return Reflect.hasMetadata(symbols_1.SYMBOL_MODEL, instance.constructor);
|
|
33
|
-
}
|
|
34
|
-
exports.isModel = isModel;
|
|
35
|
-
function getInvalidFields(instance, mode, permissions) {
|
|
36
|
-
const result = [];
|
|
37
|
-
getModelFieldsWithOptions(instance).forEach(({ key, options }) => {
|
|
38
|
-
let required = options.required;
|
|
39
|
-
if ((mode === "create" || mode === "update") &&
|
|
40
|
-
options[mode] &&
|
|
41
|
-
options[mode].constructor) {
|
|
42
|
-
required = options[mode].required;
|
|
43
|
-
if (required &&
|
|
44
|
-
permissions &&
|
|
45
|
-
options[mode].permissions) {
|
|
46
|
-
required = options[mode].permissions.some((op) => permissions.some((p) => p === op));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (required && (instance[key] === null || instance[key] === undefined || instance[key] === ''))
|
|
50
|
-
result.push(key);
|
|
51
|
-
});
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
exports.getInvalidFields = getInvalidFields;
|
|
55
|
-
function castModel(instance, mode, permissions) {
|
|
56
|
-
if (!isModel(instance))
|
|
57
|
-
return;
|
|
58
|
-
const fieldsWithOptions = getModelFieldsWithOptions(instance);
|
|
59
|
-
Object.keys(instance)
|
|
60
|
-
.filter((key) => key !== "id")
|
|
61
|
-
.forEach((key) => {
|
|
62
|
-
const fieldWidthOptions = fieldsWithOptions.find((f) => f.key === key);
|
|
63
|
-
if (!fieldWidthOptions) {
|
|
64
|
-
delete instance[key];
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if ((mode === "create" || mode === "update") &&
|
|
68
|
-
(!fieldWidthOptions.options[mode] ||
|
|
69
|
-
(permissions &&
|
|
70
|
-
fieldWidthOptions.options[mode].permissions &&
|
|
71
|
-
!fieldWidthOptions.options[mode].permissions.some((op) => permissions.some((p) => op === p))))) {
|
|
72
|
-
delete instance[key];
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
else if (mode !== "create" &&
|
|
76
|
-
mode !== "update" &&
|
|
77
|
-
(!fieldWidthOptions.options.customs ||
|
|
78
|
-
!fieldWidthOptions.options.customs.some((c) => c.mode === mode))) {
|
|
79
|
-
delete instance[key];
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
exports.castModel = castModel;
|
|
85
|
-
//# sourceMappingURL=utils.js.map
|
package/src/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../libs/shared/models/src/lib/utils.ts"],"names":[],"mappings":";;;AACA,uCAAuD;AAEvD,SAAgB,iBAAiB,CAAI,IAAO;IAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AACvC,CAAC;AAHD,8CAGC;AAED,SAAgB,oBAAoB,CAClC,QAAW,EACX,QAAgB;IAEhB,OAAO,OAAO,CAAC,WAAW,CAAC,sBAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC/D,CAAC;AALD,oDAKC;AAED,SAAgB,yBAAyB,CACvC,QAAW;IAEX,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAErD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACvB,OAAO;YACL,GAAG,EAAE,IA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AAQ,CAAC,GAAG,CAAC,CAAC;YACrB,OAAO;SACR;aAAM,IACL,IAAI,KAAK,QAAQ;YACjB,IAAI,KAAK,QAAQ;YACjB,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,OAAO;gBACjC,CAAC,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,EAClE;YACA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;YACrB,OAAO;SACR;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AA1CD,8BA0CC"}
|
package/test-setup.d.ts
DELETED
|
File without changes
|
package/test-setup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=test-setup.js.map
|
package/test-setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../../../../libs/shared/models/test-setup.ts"],"names":[],"mappings":""}
|