@eqproject/eqp-dynamic-module 0.0.1
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 +24 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.js +3117 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +17 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -0
- package/eqproject-eqp-dynamic-module.d.ts +5 -0
- package/eqproject-eqp-dynamic-module.metadata.json +1 -0
- package/esm2015/eqproject-eqp-dynamic-module.js +6 -0
- package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +65 -0
- package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +534 -0
- package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +486 -0
- package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +127 -0
- package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +181 -0
- package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +56 -0
- package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +71 -0
- package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +54 -0
- package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +118 -0
- package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +63 -0
- package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +51 -0
- package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +51 -0
- package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +126 -0
- package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +210 -0
- package/esm2015/lib/eqp-dynamic-module.module.js +67 -0
- package/esm2015/lib/interfaces/iBaseFieldComponent.interface.js +1 -0
- package/esm2015/lib/interfaces/iRootObject.interface.js +1 -0
- package/esm2015/lib/models/baseField.model.js +36 -0
- package/esm2015/lib/models/baseObj.model.js +9 -0
- package/esm2015/lib/models/context.model.js +8 -0
- package/esm2015/lib/models/entity.model.js +7 -0
- package/esm2015/lib/models/fields/attachmentField.model.js +22 -0
- package/esm2015/lib/models/fields/booleanField.model.js +12 -0
- package/esm2015/lib/models/fields/dateField.model.js +11 -0
- package/esm2015/lib/models/fields/imageField.model.js +4 -0
- package/esm2015/lib/models/fields/listValueField.model.js +12 -0
- package/esm2015/lib/models/fields/lookupField.model.js +5 -0
- package/esm2015/lib/models/fields/numericField.model.js +5 -0
- package/esm2015/lib/models/fields/testareaField.model.js +4 -0
- package/esm2015/lib/models/fields/textField.model.js +5 -0
- package/esm2015/lib/models/form.model.js +24 -0
- package/esm2015/lib/models/record.model.js +3 -0
- package/esm2015/lib/modules/material.module.js +108 -0
- package/esm2015/lib/services/custom-form-validators.service.js +19 -0
- package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +104 -0
- package/esm2015/lib/services/utilityHelper.services.js +220 -0
- package/esm2015/public-api.js +37 -0
- package/esm5/eqproject-eqp-dynamic-module.js +6 -0
- package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +66 -0
- package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +546 -0
- package/esm5/lib/components/private/add-form-field/add-form-field.component.js +497 -0
- package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +128 -0
- package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +184 -0
- package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +57 -0
- package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +72 -0
- package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +55 -0
- package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +121 -0
- package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +64 -0
- package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +52 -0
- package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +52 -0
- package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +129 -0
- package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +216 -0
- package/esm5/lib/eqp-dynamic-module.module.js +70 -0
- package/esm5/lib/interfaces/iBaseFieldComponent.interface.js +1 -0
- package/esm5/lib/interfaces/iRootObject.interface.js +1 -0
- package/esm5/lib/models/baseField.model.js +43 -0
- package/esm5/lib/models/baseObj.model.js +13 -0
- package/esm5/lib/models/context.model.js +14 -0
- package/esm5/lib/models/entity.model.js +14 -0
- package/esm5/lib/models/fields/attachmentField.model.js +29 -0
- package/esm5/lib/models/fields/booleanField.model.js +19 -0
- package/esm5/lib/models/fields/dateField.model.js +18 -0
- package/esm5/lib/models/fields/imageField.model.js +11 -0
- package/esm5/lib/models/fields/listValueField.model.js +19 -0
- package/esm5/lib/models/fields/lookupField.model.js +12 -0
- package/esm5/lib/models/fields/numericField.model.js +12 -0
- package/esm5/lib/models/fields/testareaField.model.js +11 -0
- package/esm5/lib/models/fields/textField.model.js +12 -0
- package/esm5/lib/models/form.model.js +39 -0
- package/esm5/lib/models/record.model.js +7 -0
- package/esm5/lib/modules/material.module.js +111 -0
- package/esm5/lib/services/custom-form-validators.service.js +23 -0
- package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +113 -0
- package/esm5/lib/services/utilityHelper.services.js +225 -0
- package/esm5/public-api.js +37 -0
- package/fesm2015/eqproject-eqp-dynamic-module.js +2757 -0
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -0
- package/fesm5/eqproject-eqp-dynamic-module.js +2902 -0
- package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -0
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +21 -0
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +186 -0
- package/lib/components/private/add-form-field/add-form-field.component.d.ts +160 -0
- package/lib/components/private/dynamic-module-field/dynamic-module-field.component.d.ts +55 -0
- package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +84 -0
- package/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.d.ts +21 -0
- package/lib/components/private/field-templates/date-field-template/date-field-template.component.d.ts +27 -0
- package/lib/components/private/field-templates/image-field-template/image-field-template.component.d.ts +16 -0
- package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +59 -0
- package/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.d.ts +26 -0
- package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +20 -0
- package/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.d.ts +20 -0
- package/lib/components/private/form-records/add-form-record/add-form-record.component.d.ts +50 -0
- package/lib/components/private/form-records/list-form-record/list-form-record.component.d.ts +59 -0
- package/lib/eqp-dynamic-module.module.d.ts +2 -0
- package/lib/interfaces/iBaseFieldComponent.interface.d.ts +8 -0
- package/lib/interfaces/iRootObject.interface.d.ts +10 -0
- package/lib/models/baseField.model.d.ts +56 -0
- package/lib/models/baseObj.model.d.ts +9 -0
- package/lib/models/context.model.d.ts +9 -0
- package/lib/models/entity.model.d.ts +10 -0
- package/lib/models/fields/attachmentField.model.d.ts +17 -0
- package/lib/models/fields/booleanField.model.d.ts +11 -0
- package/lib/models/fields/dateField.model.d.ts +12 -0
- package/lib/models/fields/imageField.model.d.ts +10 -0
- package/lib/models/fields/listValueField.model.d.ts +21 -0
- package/lib/models/fields/lookupField.model.d.ts +10 -0
- package/lib/models/fields/numericField.model.d.ts +9 -0
- package/lib/models/fields/testareaField.model.d.ts +7 -0
- package/lib/models/fields/textField.model.d.ts +7 -0
- package/lib/models/form.model.d.ts +45 -0
- package/lib/models/record.model.d.ts +5 -0
- package/lib/modules/material.module.d.ts +2 -0
- package/lib/services/custom-form-validators.service.d.ts +5 -0
- package/lib/services/eqp-dynamic-module-dialog.service.d.ts +28 -0
- package/lib/services/utilityHelper.services.d.ts +48 -0
- package/package.json +39 -0
- package/public-api.d.ts +35 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { Context } from '../../../models/context.model';
|
|
4
|
+
import { Form, FormTypeEnum } from '../../../models/form.model';
|
|
5
|
+
import { UtilityHelperService } from '../../../services/utilityHelper.services';
|
|
6
|
+
var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
7
|
+
function EqpDynamicModuleComponent() {
|
|
8
|
+
this.context = new Context();
|
|
9
|
+
this.form = new Form();
|
|
10
|
+
this.showButtons = true;
|
|
11
|
+
this.viewMode = FormTypeEnum.LIST;
|
|
12
|
+
this.FormTypeEnum = FormTypeEnum;
|
|
13
|
+
}
|
|
14
|
+
EqpDynamicModuleComponent.prototype.ngOnInit = function () {
|
|
15
|
+
UtilityHelperService.SetContext(this.context);
|
|
16
|
+
};
|
|
17
|
+
EqpDynamicModuleComponent.prototype.onAddViewEditRecord = function (event) {
|
|
18
|
+
if (event != null) {
|
|
19
|
+
this.selectedRecord = JSON.parse(JSON.stringify(event.record));
|
|
20
|
+
this.onlyView = event.onlyView;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.selectedRecord = null;
|
|
24
|
+
this.onlyView = false;
|
|
25
|
+
}
|
|
26
|
+
this.viewMode = FormTypeEnum.SCALAR;
|
|
27
|
+
};
|
|
28
|
+
EqpDynamicModuleComponent.prototype.onSaveForm = function (event) {
|
|
29
|
+
//TODO: Salvare il record!
|
|
30
|
+
if (event != null) {
|
|
31
|
+
if (event.ID && this.values.find(function (v) { return v.ID == event.ID; })) {
|
|
32
|
+
this.values[this.values.findIndex(function (v) { return v.ID == event.ID; })] = event;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.values.push(event);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
this.viewMode = FormTypeEnum.LIST;
|
|
39
|
+
console.log(event);
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
Input()
|
|
43
|
+
], EqpDynamicModuleComponent.prototype, "context", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Input()
|
|
46
|
+
], EqpDynamicModuleComponent.prototype, "form", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
Input()
|
|
49
|
+
], EqpDynamicModuleComponent.prototype, "values", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
Input()
|
|
52
|
+
], EqpDynamicModuleComponent.prototype, "showButtons", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Input()
|
|
55
|
+
], EqpDynamicModuleComponent.prototype, "viewMode", void 0);
|
|
56
|
+
EqpDynamicModuleComponent = __decorate([
|
|
57
|
+
Component({
|
|
58
|
+
selector: 'eqp-dynamic-module',
|
|
59
|
+
template: "<add-form-record *ngIf=\"viewMode == FormTypeEnum.SCALAR\" [form]=\"form\" [record]=\"selectedRecord\"\r\n [showButtons]=\"showButtons\" [onlyView]=\"onlyView\" (saveRecordEvent)=\"onSaveForm($event)\">\r\n</add-form-record>\r\n\r\n<list-form-record *ngIf=\"viewMode == FormTypeEnum.LIST\" [form]=\"form\" [values]=\"values\"\r\n (onAddViewEditRecord)=\"onAddViewEditRecord($event)\">\r\n</list-form-record>",
|
|
60
|
+
styles: ["::ng-deep mat-form-field{width:100%}"]
|
|
61
|
+
})
|
|
62
|
+
], EqpDynamicModuleComponent);
|
|
63
|
+
return EqpDynamicModuleComponent;
|
|
64
|
+
}());
|
|
65
|
+
export { EqpDynamicModuleComponent };
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXFwLWR5bmFtaWMtbW9kdWxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BlcXByb2plY3QvZXFwLWR5bmFtaWMtbW9kdW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