@rosoftlab/core 1.0.0-alpha-0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/README.md +27 -0
  2. package/esm2022/lib/base-components/base-form-edit.component.mjs +239 -0
  3. package/esm2022/lib/base-components/field-error-display/field-error-display.component.mjs +15 -0
  4. package/esm2022/lib/base-components/index.mjs +4 -0
  5. package/esm2022/lib/base-components/page-not-found/page-not-found.component.mjs +15 -0
  6. package/esm2022/lib/base-components/under-construction/under-construction.component.mjs +12 -0
  7. package/esm2022/lib/configurations.mjs +8 -0
  8. package/esm2022/lib/constants/symbols.mjs +3 -0
  9. package/esm2022/lib/converters/date/date.converter.mjs +20 -0
  10. package/esm2022/lib/core.mjs +8 -0
  11. package/esm2022/lib/decorators/attribute.decorator.mjs +87 -0
  12. package/esm2022/lib/decorators/base-datastore-config.decorator.mjs +7 -0
  13. package/esm2022/lib/decorators/base-model-config.decorator.mjs +10 -0
  14. package/esm2022/lib/decorators/custom.type.decorator.mjs +11 -0
  15. package/esm2022/lib/directives/translated-content.directive.mjs +97 -0
  16. package/esm2022/lib/directives/translated-element.directive.mjs +20 -0
  17. package/esm2022/lib/grid-layout-format.enum.mjs +15 -0
  18. package/esm2022/lib/index.mjs +26 -0
  19. package/esm2022/lib/interceptors/cache.interceptor.mjs +52 -0
  20. package/esm2022/lib/interceptors/index.mjs +2 -0
  21. package/esm2022/lib/interfaces/attribute-decorator-options.interface.mjs +2 -0
  22. package/esm2022/lib/interfaces/datastore-config.interface.mjs +2 -0
  23. package/esm2022/lib/interfaces/model-config.interface.mjs +2 -0
  24. package/esm2022/lib/interfaces/overrides.interface.mjs +2 -0
  25. package/esm2022/lib/interfaces/property-converter.interface.mjs +2 -0
  26. package/esm2022/lib/models/base-meta.model.mjs +7 -0
  27. package/esm2022/lib/models/base-query-data.mjs +13 -0
  28. package/esm2022/lib/models/base.model.mjs +158 -0
  29. package/esm2022/lib/models/error-response.model.mjs +9 -0
  30. package/esm2022/lib/models/rule.mjs +6 -0
  31. package/esm2022/lib/pipes/Nl2brPipe.pipe.mjs +21 -0
  32. package/esm2022/lib/pipes/input-error.pipe.mjs +38 -0
  33. package/esm2022/lib/providers.mjs +12 -0
  34. package/esm2022/lib/resolvers/dynamically-class-resolver.mjs +22 -0
  35. package/esm2022/lib/resolvers/dynamically-service-resolver.mjs +22 -0
  36. package/esm2022/lib/resolvers/index.mjs +3 -0
  37. package/esm2022/lib/rsl-base-module.mjs +64 -0
  38. package/esm2022/lib/services/base-datastore.service.mjs +342 -0
  39. package/esm2022/lib/services/base.service.mjs +99 -0
  40. package/esm2022/lib/services/cache.service.mjs +35 -0
  41. package/esm2022/lib/services/datastore.service.mjs +26 -0
  42. package/esm2022/lib/services/dialog.service.mjs +150 -0
  43. package/esm2022/lib/services/index.mjs +6 -0
  44. package/esm2022/lib/services/translate-loader.service.mjs +34 -0
  45. package/esm2022/lib/utils.mjs +27 -0
  46. package/esm2022/lib/validators/pattern-validator.mjs +15 -0
  47. package/esm2022/public-api.mjs +5 -0
  48. package/esm2022/rosoftlab-core.mjs +5 -0
  49. package/fesm2022/rosoftlab-core.mjs +1637 -0
  50. package/fesm2022/rosoftlab-core.mjs.map +1 -0
  51. package/index.d.ts +5 -0
  52. package/lib/base-components/base-form-edit.component.d.ts +56 -0
  53. package/lib/base-components/field-error-display/field-error-display.component.d.ts +7 -0
  54. package/lib/base-components/index.d.ts +3 -0
  55. package/lib/base-components/page-not-found/page-not-found.component.d.ts +8 -0
  56. package/lib/base-components/under-construction/under-construction.component.d.ts +6 -0
  57. package/lib/configurations.d.ts +6 -0
  58. package/lib/constants/symbols.d.ts +1 -0
  59. package/lib/converters/date/date.converter.d.ts +5 -0
  60. package/lib/core.d.ts +7 -0
  61. package/lib/decorators/attribute.decorator.d.ts +3 -0
  62. package/lib/decorators/base-datastore-config.decorator.d.ts +1 -0
  63. package/lib/decorators/base-model-config.decorator.d.ts +1 -0
  64. package/lib/decorators/custom.type.decorator.d.ts +1 -0
  65. package/lib/directives/translated-content.directive.d.ts +21 -0
  66. package/lib/directives/translated-element.directive.d.ts +10 -0
  67. package/lib/grid-layout-format.enum.d.ts +12 -0
  68. package/lib/index.d.ts +25 -0
  69. package/lib/interceptors/cache.interceptor.d.ts +13 -0
  70. package/lib/interceptors/index.d.ts +1 -0
  71. package/lib/interfaces/attribute-decorator-options.interface.d.ts +8 -0
  72. package/lib/interfaces/datastore-config.interface.d.ts +8 -0
  73. package/lib/interfaces/model-config.interface.d.ts +10 -0
  74. package/lib/interfaces/overrides.interface.d.ts +5 -0
  75. package/lib/interfaces/property-converter.interface.d.ts +4 -0
  76. package/lib/models/base-meta.model.d.ts +5 -0
  77. package/lib/models/base-query-data.d.ts +7 -0
  78. package/lib/models/base.model.d.ts +31 -0
  79. package/lib/models/error-response.model.d.ts +17 -0
  80. package/lib/models/rule.d.ts +5 -0
  81. package/lib/pipes/Nl2brPipe.pipe.d.ts +7 -0
  82. package/lib/pipes/input-error.pipe.d.ts +10 -0
  83. package/lib/providers.d.ts +2 -0
  84. package/lib/resolvers/dynamically-class-resolver.d.ts +3 -0
  85. package/lib/resolvers/dynamically-service-resolver.d.ts +3 -0
  86. package/lib/resolvers/index.d.ts +2 -0
  87. package/lib/rsl-base-module.d.ts +13 -0
  88. package/lib/services/base-datastore.service.d.ts +47 -0
  89. package/lib/services/base.service.d.ts +27 -0
  90. package/lib/services/cache.service.d.ts +11 -0
  91. package/lib/services/datastore.service.d.ts +12 -0
  92. package/lib/services/dialog.service.d.ts +21 -0
  93. package/lib/services/index.d.ts +5 -0
  94. package/lib/services/translate-loader.service.d.ts +14 -0
  95. package/lib/utils.d.ts +2 -0
  96. package/lib/validators/pattern-validator.d.ts +4 -0
  97. package/package.json +36 -0
  98. package/public-api.d.ts +1 -0
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # RslWorkspace
2
+
3
+ This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.3.
4
+
5
+ ## Development server
6
+
7
+ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8
+
9
+ ## Code scaffolding
10
+
11
+ Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12
+
13
+ ## Build
14
+
15
+ Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16
+
17
+ ## Running unit tests
18
+
19
+ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20
+
21
+ ## Running end-to-end tests
22
+
23
+ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24
+
25
+ ## Further help
26
+
27
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,239 @@
1
+ import { Location } from '@angular/common';
2
+ import { Component } from '@angular/core';
3
+ import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
4
+ import { ActivatedRoute, Router } from '@angular/router';
5
+ import { TranslateService } from '@ngx-translate/core';
6
+ import { Observable } from 'rxjs';
7
+ import { BaseService } from '../services/base.service';
8
+ import { DialogService } from '../services/dialog.service';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@angular/forms";
11
+ import * as i2 from "@angular/router";
12
+ import * as i3 from "../services/base.service";
13
+ import * as i4 from "../services/dialog.service";
14
+ import * as i5 from "@ngx-translate/core";
15
+ import * as i6 from "@angular/common";
16
+ export class BaseFormEditComponent {
17
+ constructor(fb, router, route, modelService, dialogService, translate, location) {
18
+ this.fb = fb;
19
+ this.router = router;
20
+ this.route = route;
21
+ this.modelService = modelService;
22
+ this.dialogService = dialogService;
23
+ this.translate = translate;
24
+ this.location = location;
25
+ this.isLoading = true;
26
+ this.changeUrlRoute = true;
27
+ this.generateForm(this.modelService.newModel());
28
+ }
29
+ afterSave(model) {
30
+ return new Observable((observer) => {
31
+ observer.next(model);
32
+ observer.complete();
33
+ });
34
+ }
35
+ beforeSave(model) {
36
+ return new Observable((observer) => {
37
+ observer.next(model);
38
+ observer.complete();
39
+ });
40
+ }
41
+ ngOnInit() {
42
+ this.initForm();
43
+ }
44
+ initForm(customInclude = '', newModelId = null, model = null) {
45
+ if (model === null) {
46
+ this.modelId = this.route.snapshot.paramMap.get('id') ?? newModelId;
47
+ this.isEdit = false;
48
+ if (this.modelId) {
49
+ this.modelService.get(this.modelId, customInclude).subscribe((value) => {
50
+ this.isEdit = true;
51
+ this.generateForm(value);
52
+ });
53
+ }
54
+ else {
55
+ if (this.changeUrlRoute) {
56
+ const addUrl = this.router.createUrlTree([]).toString();
57
+ this.editRoute = this.router.createUrlTree([addUrl.replace('add', 'edit')]).toString();
58
+ }
59
+ // }
60
+ this.generateForm(this.modelService.newModel());
61
+ }
62
+ }
63
+ else {
64
+ this.modelId = model.id;
65
+ this.isEdit = true;
66
+ this.generateForm(model);
67
+ }
68
+ }
69
+ generateForm(model) {
70
+ this.isLoading = false;
71
+ this.modelId = model.id;
72
+ this.model = model;
73
+ this.baseForm = this.modelService.toFormGroup(this.fb, model);
74
+ this.afterFormGenerated();
75
+ }
76
+ afterFormGenerated() {
77
+ }
78
+ getFromGroup(formGroup = null) {
79
+ if (!formGroup)
80
+ return this.baseForm;
81
+ if (formGroup instanceof UntypedFormGroup)
82
+ return formGroup;
83
+ return this.baseForm.controls[formGroup];
84
+ }
85
+ validateAllFormFields(formGroup = null) {
86
+ const fg = this.getFromGroup(formGroup);
87
+ Object.keys(fg.controls).forEach(field => {
88
+ // console.log(field);
89
+ const control = fg.get(field);
90
+ if (control instanceof UntypedFormControl) {
91
+ control.markAsTouched({ onlySelf: true });
92
+ }
93
+ else if (control instanceof UntypedFormGroup) {
94
+ this.validateAllFormFields(control);
95
+ }
96
+ });
97
+ }
98
+ isFieldValid(field, formGroup = null) {
99
+ const fg = this.getFromGroup(formGroup);
100
+ const filedControl = fg.get(field);
101
+ return !filedControl.valid && filedControl.touched;
102
+ }
103
+ isFieldValidFromArray(arrayIndex, field, arrayName = 'formArray') {
104
+ const fieldControl = this.baseForm.get(arrayName).get([arrayIndex]).get(field);
105
+ return !fieldControl.valid && fieldControl.touched;
106
+ }
107
+ displayFieldCss(field) {
108
+ return {
109
+ 'has-error': this.isFieldValid(field),
110
+ 'has-feedback': this.isFieldValid(field)
111
+ };
112
+ }
113
+ onCancel() {
114
+ this.router.navigate([this.cancelRoute]);
115
+ }
116
+ onSave() {
117
+ this.saveModel(this.baseForm);
118
+ }
119
+ saveModel(formGroup = null) {
120
+ const fg = this.getFromGroup(formGroup);
121
+ const that = this;
122
+ if (fg) {
123
+ if (fg.valid) {
124
+ this.beforeSave(this.model).subscribe(_ => {
125
+ this.modelService.save(this.baseForm, this.modelId, this.model).subscribe((newModel) => {
126
+ this.model = newModel;
127
+ this.modelId = newModel.id;
128
+ if (this.editRoute) {
129
+ this.isEdit = true;
130
+ if (this.changeUrlRoute) {
131
+ const url = this.router.createUrlTree([this.editRoute, this.modelId]).toString();
132
+ this.location.replaceState(url);
133
+ }
134
+ }
135
+ this.afterSave(newModel).subscribe((val) => {
136
+ this.dialogService.showSaveMessage('Your changes were saved successfully.').subscribe(d => {
137
+ fg.markAsPristine();
138
+ });
139
+ });
140
+ }, err => {
141
+ this.serverErrors(err);
142
+ });
143
+ });
144
+ }
145
+ else {
146
+ this.validateAllFormFields(formGroup);
147
+ }
148
+ }
149
+ }
150
+ serverErrors(err) {
151
+ if (err.error) {
152
+ if (err.error.errors) {
153
+ const validationErrors = err.error.errors;
154
+ if (Array.isArray(validationErrors)) {
155
+ validationErrors.forEach(prop => {
156
+ const formControl = this.baseForm.get(prop);
157
+ if (formControl) {
158
+ // activate the error message
159
+ formControl.setErrors({
160
+ serverError: validationErrors[prop].join('\n')
161
+ });
162
+ }
163
+ });
164
+ }
165
+ else {
166
+ const keys = Object.keys(validationErrors);
167
+ keys.forEach(prop => {
168
+ const formControl = this.baseForm.get(prop);
169
+ if (formControl) {
170
+ // activate the error message
171
+ formControl.setErrors({
172
+ serverError: validationErrors[prop].join('\n')
173
+ });
174
+ }
175
+ });
176
+ }
177
+ }
178
+ }
179
+ }
180
+ canDeactivate() {
181
+ // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged
182
+ if (!this.baseForm.dirty) {
183
+ return true;
184
+ }
185
+ // Otherwise ask the user with the dialog service and return its
186
+ // observable which resolves to true or false when the user decides
187
+ return this.dialogService.confirm('Discard changes ?', null, 'Discard');
188
+ }
189
+ getFiledName(filedTranslationKey) {
190
+ return { field: this.translate.instant(filedTranslationKey) };
191
+ }
192
+ getCustomErrorMessage(error, fieldLabel) {
193
+ return '';
194
+ }
195
+ getErrorMessageFromArray(arrayIndex, field, filedTranslationKey, arrayName = 'formArray') {
196
+ const fieldControl = this.baseForm.get(arrayName).get([arrayIndex]).get(field);
197
+ return this.getErrorMessageForField(fieldControl, filedTranslationKey);
198
+ }
199
+ getErrorMessage(field, filedTranslationKey, formGroup = null) {
200
+ const fg = this.getFromGroup(formGroup);
201
+ return this.getErrorMessageForField(fg.get(field), filedTranslationKey);
202
+ }
203
+ getErrorMessageForField(fieldControl, filedTranslationKey) {
204
+ const error = fieldControl.errors;
205
+ const fieldLabel = this.translate.instant(filedTranslationKey);
206
+ let rvalue = '';
207
+ if (error !== null) {
208
+ if (error['required'] === true) {
209
+ rvalue = this.translate.instant('General.Field.Required', { field: fieldLabel });
210
+ }
211
+ if (error['minlength']) {
212
+ rvalue = this.translate.instant('General.Field.MinLength', { field: fieldLabel, requiredLength: error.minlength.requiredLength });
213
+ }
214
+ if (error['email'] === true) {
215
+ rvalue = this.translate.instant('General.Field.InvalidEmail');
216
+ }
217
+ if (error['url'] === true) {
218
+ rvalue = this.translate.instant('General.Field.InvalidUrl');
219
+ }
220
+ if (error['serverError']) {
221
+ rvalue = error['serverError'];
222
+ }
223
+ if (rvalue === '') {
224
+ rvalue = this.getCustomErrorMessage(error, fieldLabel);
225
+ }
226
+ }
227
+ return rvalue;
228
+ }
229
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: BaseFormEditComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3.BaseService }, { token: i4.DialogService }, { token: i5.TranslateService }, { token: i6.Location }], target: i0.ɵɵFactoryTarget.Component }); }
230
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: BaseFormEditComponent, selector: "app-base.form.edit", ngImport: i0, template: '', isInline: true }); }
231
+ }
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: BaseFormEditComponent, decorators: [{
233
+ type: Component,
234
+ args: [{
235
+ selector: 'app-base.form.edit',
236
+ template: ''
237
+ }]
238
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3.BaseService }, { type: i4.DialogService }, { type: i5.TranslateService }, { type: i6.Location }]; } });
239
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1mb3JtLWVkaXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9iYXNlLWNvbXBvbmVudHMvYmFzZS1mb3JtLWVkaXQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMzQyxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxrQkFBa0IsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzFGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxF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tcclxuICAgICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbi5yZXBsYWNlU3RhdGUodXJsKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgdGhpcy5hZnRlclNhdmUobmV3TW9kZWwpLnN1YnNjcmliZSgodmFsOiBUKSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRpYWxvZ1NlcnZpY2Uuc2hvd1NhdmVNZXNzYWdlKCdZb3VyIGNoYW5nZXMgd2VyZSBzYXZlZCBzdWNjZXNzZnVsbHkuJykuc3Vic2NyaWJlKGQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICBmZy5tYXJrQXNQcmlzdGluZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVyciA9PiB7XHJcbiAgICAgICAgICAgICAgdGhpcy5zZXJ2ZXJFcnJvcnMoZXJyKVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICB0aGlzLnZhbGlkYXRlQWxsRm9ybUZpZWxkcyhmb3JtR3JvdXApO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG4gIHNlcnZlckVycm9ycyhlcnI6IGFueSkge1xyXG4gICAgaWYgKGVyci5lcnJvcikge1xyXG4gICAgICBpZiAoZXJyLmVycm9yLmVycm9ycykge1xyXG4gICAgICAgIGNvbnN0IHZhbGlkYXRpb25FcnJvcnMgPSBlcnIuZXJyb3IuZXJyb3JzO1xyXG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbGlkYXRpb25FcnJvcnMpKSB7XHJcbiAgICAgICAgICB2YWxpZGF0aW9uRXJyb3JzLmZvckVhY2gocHJvcCA9PiB7XHJcbiAgICAgICAgICAgIGNvbnN0IGZvcm1Db250cm9sID0gdGhpcy5iYXNlRm9ybS5nZXQocHJvcCk7XHJcbiAgICAgICAgICAgIGlmIChmb3JtQ29udHJvbCkge1xyXG4gICAgICAgICAgICAgIC8vIGFjdGl2YXRlIHRoZSBlcnJvciBtZXNzYWdlXHJcbiAgICAgICAgICAgICAgZm9ybUNvbnRyb2wuc2V0RXJyb3JzKHtcclxuICAgICAgICAgICAgICAgIHNlcnZlckVycm9yOiB2YWxpZGF0aW9uRXJyb3JzW3Byb3BdLmpvaW4oJ1xcbicpXHJcbiAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXModmFsaWRhdGlvbkVycm9ycyk7XHJcbiAgICAgICAgICBrZXlzLmZvckVhY2gocHJvcCA9PiB7XHJcbiAgICAgICAgICAgIGNvbnN0IGZvcm1Db250cm9sID0gdGhpcy5iYXNlRm9ybS5nZXQocHJvcCk7XHJcbiAgICAgICAgICAgIGlmIChmb3JtQ29udHJvbCkge1xyXG4gICAgICAgICAgICAgIC8vIGFjdGl2YXRlIHRoZSBlcnJvciBtZXNzYWdlXHJcbiAgICAgICAgICAgICAgZm9ybUNvbnRyb2wuc2V0RXJyb3JzKHtcclxuICAgICAgICAgICAgICAgIHNlcnZlckVycm9yOiB2YWxpZGF0aW9uRXJyb3JzW3Byb3BdLmpvaW4oJ1xcbicpXHJcbiAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuICBjYW5EZWFjdGl2YXRlKCk6IE9ic2VydmFibGU8Ym9vbGVhbj4gfCBib29sZWFuIHtcclxuICAgIC8vIEFsbG93IHN5bmNocm9ub3VzIG5hdmlnYXRpb24gKGB0cnVlYCkgaWYgbm8gY3Jpc2lzIG9yIHRoZSBjcmlzaXM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5ndGg6IGVycm9yLm1pbmxlbmd0aC5yZXF1aXJlZExlbmd0aCB9KTtcclxuICAgICAgfVxyXG4gICAgICBpZiAoZXJyb3JbJ2VtYWlsJ10gPT09IHRydWUpIHtcclxuICAgICAgICBydmFsdWUgPSB0aGlzLnRyYW5zbGF0ZS5pbnN0YW50KCdHZW5lcmFsLkZpZWxkLkludmFsaWRFbWFpbCcpO1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChlcnJvclsndXJsJ10gPT09IHRydWUpIHtcclxuICAgICAgICBydmFsdWUgPSB0aGlzLnRyYW5zbGF0ZS5pbnN0YW50KCdHZW5lcmFsLkZpZWxkLkludmFsaWRVcmwnKTtcclxuICAgICAgfVxyXG4gICAgICBpZiAoZXJyb3JbJ3NlcnZlckVycm9yJ10pIHtcclxuICAgICAgICBydmFsdWUgPSBlcnJvclsnc2VydmVyRXJyb3InXTtcclxuICAgICAgfVxyXG4gICAgICBpZiAocnZhbHVlID09PSAnJykge1xyXG4gICAgICAgIHJ2YWx1ZSA9IHRoaXMuZ2V0Q3VzdG9tRXJyb3JNZXNzYWdlKGVycm9yLCBmaWVsZExhYmVsKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHJ2YWx1ZTtcclxuICB9XHJcbn1cclxuIl19
@@ -0,0 +1,15 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class FieldErrorDisplayComponent {
4
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FieldErrorDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: FieldErrorDisplayComponent, selector: "rsl-field-error-display", inputs: { errorMsg: "errorMsg", displayError: "displayError" }, ngImport: i0, template: "<div *ngIf=\"displayError\" >\n <!-- <span class=\"glyphicon glyphicon-remove form-control-feedback fix-error-icon\"></span> -->\n <span class=\"sr-only\">(error)</span>\n <div class=\"error-msg\">\n {{ errorMsg }}\n </div>\n</div>\n", styles: [".error-msg{color:red}.fix-error-icon{top:27px}\n"] }); }
6
+ }
7
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FieldErrorDisplayComponent, decorators: [{
8
+ type: Component,
9
+ args: [{ selector: 'rsl-field-error-display', template: "<div *ngIf=\"displayError\" >\n <!-- <span class=\"glyphicon glyphicon-remove form-control-feedback fix-error-icon\"></span> -->\n <span class=\"sr-only\">(error)</span>\n <div class=\"error-msg\">\n {{ errorMsg }}\n </div>\n</div>\n", styles: [".error-msg{color:red}.fix-error-icon{top:27px}\n"] }]
10
+ }], propDecorators: { errorMsg: [{
11
+ type: Input
12
+ }], displayError: [{
13
+ type: Input
14
+ }] } });
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQtZXJyb3ItZGlzcGxheS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yb3NvZnRsYWIvY29yZS9zcmMvbGliL2Jhc2UtY29tcG9uZW50cy9maWVsZC1lcnJvci1kaXNwbGF5L2ZpZWxkLWVycm9yLWRpc3BsYXkuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9iYXNlLWNvbXBvbmVudHMvZmllbGQtZXJyb3ItZGlzcGxheS9maWVsZC1lcnJvci1kaXNwbGF5LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQU9qRCxNQUFNLE9BQU8sMEJBQTBCOzhHQUExQiwwQkFBMEI7a0dBQTFCLDBCQUEwQiwrSENQdkMsa1BBT0E7OzJGREFhLDBCQUEwQjtrQkFMdEMsU0FBUzsrQkFDRSx5QkFBeUI7OEJBTTFCLFFBQVE7c0JBQWhCLEtBQUs7Z0JBQ0csWUFBWTtzQkFBcEIsS0FBSyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgSW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAncnNsLWZpZWxkLWVycm9yLWRpc3BsYXknLFxuICB0ZW1wbGF0ZVVybDogJy4vZmllbGQtZXJyb3ItZGlzcGxheS5jb21wb25lbnQuaHRtbCcsXG4gIHN0eWxlVXJsczogWycuL2ZpZWxkLWVycm9yLWRpc3BsYXkuY29tcG9uZW50LnNjc3MnXVxufSlcbmV4cG9ydCBjbGFzcyBGaWVsZEVycm9yRGlzcGxheUNvbXBvbmVudCB7XG5cbiAgQElucHV0KCkgZXJyb3JNc2c6IHN0cmluZztcbiAgQElucHV0KCkgZGlzcGxheUVycm9yOiBib29sZWFuO1xuXG59XG4iLCI8ZGl2ICpuZ0lmPVwiZGlzcGxheUVycm9yXCIgPlxuICA8IS0tIDxzcGFuIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1yZW1vdmUgZm9ybS1jb250cm9sLWZlZWRiYWNrIGZpeC1lcnJvci1pY29uXCI+PC9zcGFuPiAtLT5cbiAgPHNwYW4gY2xhc3M9XCJzci1vbmx5XCI+KGVycm9yKTwvc3Bhbj5cbiAgPGRpdiBjbGFzcz1cImVycm9yLW1zZ1wiPlxuICAgIHt7IGVycm9yTXNnIH19XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
@@ -0,0 +1,4 @@
1
+ export * from './field-error-display/field-error-display.component';
2
+ export * from './page-not-found/page-not-found.component';
3
+ export * from './under-construction/under-construction.component';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yb3NvZnRsYWIvY29yZS9zcmMvbGliL2Jhc2UtY29tcG9uZW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFEQUFxRCxDQUFDO0FBQ3BFLGNBQWMsMkNBQTJDLENBQUM7QUFDMUQsY0FBYyxtREFBbUQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZmllbGQtZXJyb3ItZGlzcGxheS9maWVsZC1lcnJvci1kaXNwbGF5LmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vcGFnZS1ub3QtZm91bmQvcGFnZS1ub3QtZm91bmQuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi91bmRlci1jb25zdHJ1Y3Rpb24vdW5kZXItY29uc3RydWN0aW9uLmNvbXBvbmVudCc7XHJcblxyXG4iXX0=
@@ -0,0 +1,15 @@
1
+ import { Component } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class PageNotFoundComponent {
4
+ constructor() {
5
+ }
6
+ ngOnInit() {
7
+ }
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PageNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PageNotFoundComponent, selector: "rsl-page-not-found", ngImport: i0, template: "<div class=\"forms-view-container\">\n <div class=\"under-construction-view-container\">\n Page not found\n </div>\n</div>", styles: [".under-construction-view-container{height:calc(100vh - 250px);margin:60px 0 0;padding:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:1.8em;line-height:1.3em;font-weight:300;color:#58585b;text-align:center}\n"] }); }
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PageNotFoundComponent, decorators: [{
12
+ type: Component,
13
+ args: [{ selector: 'rsl-page-not-found', template: "<div class=\"forms-view-container\">\n <div class=\"under-construction-view-container\">\n Page not found\n </div>\n</div>", styles: [".under-construction-view-container{height:calc(100vh - 250px);margin:60px 0 0;padding:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:1.8em;line-height:1.3em;font-weight:300;color:#58585b;text-align:center}\n"] }]
14
+ }], ctorParameters: function () { return []; } });
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZS1ub3QtZm91bmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9iYXNlLWNvbXBvbmVudHMvcGFnZS1ub3QtZm91bmQvcGFnZS1ub3QtZm91bmQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9iYXNlLWNvbXBvbmVudHMvcGFnZS1ub3QtZm91bmQvcGFnZS1ub3QtZm91bmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxNQUFNLGVBQWUsQ0FBQzs7QUFPbEQsTUFBTSxPQUFPLHFCQUFxQjtJQUVoQztJQUNBLENBQUM7SUFFRCxRQUFRO0lBQ1IsQ0FBQzs4R0FOVSxxQkFBcUI7a0dBQXJCLHFCQUFxQiwwRENQbEMsaUlBSU07OzJGREdPLHFCQUFxQjtrQkFMakMsU0FBUzsrQkFDRSxvQkFBb0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIE9uSW5pdCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdyc2wtcGFnZS1ub3QtZm91bmQnLFxuICB0ZW1wbGF0ZVVybDogJy4vcGFnZS1ub3QtZm91bmQuY29tcG9uZW50Lmh0bWwnLFxuICBzdHlsZVVybHM6IFsnLi9wYWdlLW5vdC1mb3VuZC5jb21wb25lbnQuc2NzcyddXG59KVxuZXhwb3J0IGNsYXNzIFBhZ2VOb3RGb3VuZENvbXBvbmVudCBpbXBsZW1lbnRzIE9uSW5pdCB7XG5cbiAgY29uc3RydWN0b3IoKSB7IFxuICB9XG5cbiAgbmdPbkluaXQoKSB7XG4gIH1cblxufVxuIiwiPGRpdiBjbGFzcz1cImZvcm1zLXZpZXctY29udGFpbmVyXCI+XG4gIDxkaXYgY2xhc3M9XCJ1bmRlci1jb25zdHJ1Y3Rpb24tdmlldy1jb250YWluZXJcIj5cbiAgICBQYWdlIG5vdCBmb3VuZFxuICA8L2Rpdj5cbjwvZGl2PiJdfQ==
@@ -0,0 +1,12 @@
1
+ import { Component } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class UnderConstructionComponent {
4
+ constructor() { }
5
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: UnderConstructionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: UnderConstructionComponent, selector: "rsl-under-construction", ngImport: i0, template: "<div class=\"forms-view-container\">\n <div class=\"under-construction-view-container\">\n Page under construction\n </div>\n</div>", styles: [".under-construction-view-container{height:calc(100vh - 250px);margin:60px 0 0;padding:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:1.8em;line-height:1.3em;font-weight:300;color:#58585b;text-align:center}\n"] }); }
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: UnderConstructionComponent, decorators: [{
9
+ type: Component,
10
+ args: [{ selector: 'rsl-under-construction', template: "<div class=\"forms-view-container\">\n <div class=\"under-construction-view-container\">\n Page under construction\n </div>\n</div>", styles: [".under-construction-view-container{height:calc(100vh - 250px);margin:60px 0 0;padding:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:1.8em;line-height:1.3em;font-weight:300;color:#58585b;text-align:center}\n"] }]
11
+ }], ctorParameters: function () { return []; } });
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5kZXItY29uc3RydWN0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jvc29mdGxhYi9jb3JlL3NyYy9saWIvYmFzZS1jb21wb25lbnRzL3VuZGVyLWNvbnN0cnVjdGlvbi91bmRlci1jb25zdHJ1Y3Rpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9iYXNlLWNvbXBvbmVudHMvdW5kZXItY29uc3RydWN0aW9uL3VuZGVyLWNvbnN0cnVjdGlvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQU8xQyxNQUFNLE9BQU8sMEJBQTBCO0lBRXJDLGdCQUFnQixDQUFDOzhHQUZOLDBCQUEwQjtrR0FBMUIsMEJBQTBCLDhEQ1B2QywwSUFJTTs7MkZER08sMEJBQTBCO2tCQUx0QyxTQUFTOytCQUNFLHdCQUF3QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdyc2wtdW5kZXItY29uc3RydWN0aW9uJyxcbiAgdGVtcGxhdGVVcmw6ICcuL3VuZGVyLWNvbnN0cnVjdGlvbi5jb21wb25lbnQuaHRtbCcsXG4gIHN0eWxlVXJsczogWycuL3VuZGVyLWNvbnN0cnVjdGlvbi5jb21wb25lbnQuc2NzcyddXG59KVxuZXhwb3J0IGNsYXNzIFVuZGVyQ29uc3RydWN0aW9uQ29tcG9uZW50IHtcblxuICBjb25zdHJ1Y3RvcigpIHsgfVxufVxuIiwiPGRpdiBjbGFzcz1cImZvcm1zLXZpZXctY29udGFpbmVyXCI+XG4gIDxkaXYgY2xhc3M9XCJ1bmRlci1jb25zdHJ1Y3Rpb24tdmlldy1jb250YWluZXJcIj5cbiAgICBQYWdlIHVuZGVyIGNvbnN0cnVjdGlvblxuICA8L2Rpdj5cbjwvZGl2PiJdfQ==
@@ -0,0 +1,8 @@
1
+ export class Configurations {
2
+ constructor() {
3
+ this.baseUrl = '';
4
+ this.authUrl = '';
5
+ this.apiVersion = 'api/v1';
6
+ }
7
+ }
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yb3NvZnRsYWIvY29yZS9zcmMvbGliL2NvbmZpZ3VyYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxjQUFjO0lBS3pCO1FBQ0UsSUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7UUFDbEIsSUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7UUFDbEIsSUFBSSxDQUFDLFVBQVUsR0FBRyxRQUFRLENBQUM7SUFDN0IsQ0FBQztDQUVGIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIENvbmZpZ3VyYXRpb25zIHtcclxuICBwdWJsaWMgYmFzZVVybDogc3RyaW5nO1xyXG4gIHB1YmxpYyBhdXRoVXJsOiBzdHJpbmc7XHJcbiAgcHVibGljIGFwaVZlcnNpb246IHN0cmluZztcclxuXHJcbiAgY29uc3RydWN0b3IoKSB7XHJcbiAgICB0aGlzLmJhc2VVcmwgPSAnJztcclxuICAgIHRoaXMuYXV0aFVybCA9ICcnO1xyXG4gICAgdGhpcy5hcGlWZXJzaW9uID0gJ2FwaS92MSc7XHJcbiAgfVxyXG5cclxufSJdfQ==
@@ -0,0 +1,3 @@
1
+ // tslint:disable-next-line:variable-name
2
+ export const AttributeMetadata = Symbol('AttributeMetadata');
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9scy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jvc29mdGxhYi9jb3JlL3NyYy9saWIvY29uc3RhbnRzL3N5bWJvbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEseUNBQXlDO0FBQ3pDLE1BQU0sQ0FBQyxNQUFNLGlCQUFpQixHQUFRLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnZhcmlhYmxlLW5hbWVcbmV4cG9ydCBjb25zdCBBdHRyaWJ1dGVNZXRhZGF0YTogYW55ID0gU3ltYm9sKCdBdHRyaWJ1dGVNZXRhZGF0YScpO1xuIl19
@@ -0,0 +1,20 @@
1
+ import { parseISO } from 'date-fns';
2
+ export class DateConverter {
3
+ mask(value) {
4
+ if (value instanceof Date && !isNaN(value.getTime())) {
5
+ return value;
6
+ }
7
+ const d = parseISO(value);
8
+ if (d instanceof Date && !isNaN(d.getTime())) {
9
+ return d;
10
+ }
11
+ else {
12
+ return value;
13
+ }
14
+ }
15
+ unmask(value) {
16
+ // const result = format(value, 'YYYY-MM-DDTHH:mm:ssZ');
17
+ return value;
18
+ }
19
+ }
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5jb252ZXJ0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yb3NvZnRsYWIvY29yZS9zcmMvbGliL2NvbnZlcnRlcnMvZGF0ZS9kYXRlLmNvbnZlcnRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBR3BDLE1BQU0sT0FBTyxhQUFhO0lBQ3hCLElBQUksQ0FBQyxLQUFVO1FBQ2IsSUFBSSxLQUFLLFlBQVksSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxPQUFPLEVBQUUsQ0FBQyxFQUFFO1lBQ3BELE9BQU8sS0FBSyxDQUFDO1NBQ2Q7UUFDRCxNQUFNLENBQUMsR0FBRyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDMUIsSUFBSSxDQUFDLFlBQVksSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxFQUFFO1lBQzVDLE9BQU8sQ0FBQyxDQUFBO1NBQ1Q7YUFBTTtZQUNMLE9BQU8sS0FBSyxDQUFDO1NBQ2Q7SUFDSCxDQUFDO0lBQ0QsTUFBTSxDQUFDLEtBQVU7UUFDZix3REFBd0Q7UUFDeEQsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBwYXJzZUlTTyB9IGZyb20gJ2RhdGUtZm5zJztcclxuaW1wb3J0IHsgUHJvcGVydHlDb252ZXJ0ZXIgfSBmcm9tICcuLi8uLi9pbnRlcmZhY2VzL3Byb3BlcnR5LWNvbnZlcnRlci5pbnRlcmZhY2UnO1xyXG5cclxuZXhwb3J0IGNsYXNzIERhdGVDb252ZXJ0ZXIgaW1wbGVtZW50cyBQcm9wZXJ0eUNvbnZlcnRlciB7XHJcbiAgbWFzayh2YWx1ZTogYW55KSB7XHJcbiAgICBpZiAodmFsdWUgaW5zdGFuY2VvZiBEYXRlICYmICFpc05hTih2YWx1ZS5nZXRUaW1lKCkpKSB7XHJcbiAgICAgIHJldHVybiB2YWx1ZTtcclxuICAgIH1cclxuICAgIGNvbnN0IGQgPSBwYXJzZUlTTyh2YWx1ZSk7XHJcbiAgICBpZiAoZCBpbnN0YW5jZW9mIERhdGUgJiYgIWlzTmFOKGQuZ2V0VGltZSgpKSkge1xyXG4gICAgICByZXR1cm4gZFxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgcmV0dXJuIHZhbHVlO1xyXG4gICAgfVxyXG4gIH1cclxuICB1bm1hc2sodmFsdWU6IGFueSkge1xyXG4gICAgLy8gY29uc3QgcmVzdWx0ID0gZm9ybWF0KHZhbHVlLCAnWVlZWS1NTS1ERFRISDptbTpzc1onKTtcclxuICAgIHJldHVybiB2YWx1ZTtcclxuICB9XHJcbn1cclxuIl19
@@ -0,0 +1,8 @@
1
+ export { FieldErrorDisplayComponent, PageNotFoundComponent, UnderConstructionComponent } from './base-components';
2
+ export { BaseFormEditComponent } from './base-components/base-form-edit.component';
3
+ export * from './grid-layout-format.enum';
4
+ export * from './index';
5
+ export * from './providers';
6
+ export * from './rsl-base-module';
7
+ export * from './utils';
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jvc29mdGxhYi9jb3JlL3NyYy9saWIvY29yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUscUJBQXFCLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNsSCxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQztBQUNuRixjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsU0FBUyxDQUFDO0FBQ3hCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBGaWVsZEVycm9yRGlzcGxheUNvbXBvbmVudCwgUGFnZU5vdEZvdW5kQ29tcG9uZW50LCBVbmRlckNvbnN0cnVjdGlvbkNvbXBvbmVudCB9IGZyb20gJy4vYmFzZS1jb21wb25lbnRzJztcclxuZXhwb3J0IHsgQmFzZUZvcm1FZGl0Q29tcG9uZW50IH0gZnJvbSAnLi9iYXNlLWNvbXBvbmVudHMvYmFzZS1mb3JtLWVkaXQuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9ncmlkLWxheW91dC1mb3JtYXQuZW51bSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xyXG5leHBvcnQgKiBmcm9tICcuL3Byb3ZpZGVycyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vcnNsLWJhc2UtbW9kdWxlJztcclxuZXhwb3J0ICogZnJvbSAnLi91dGlscyc7XHJcblxyXG4iXX0=
@@ -0,0 +1,87 @@
1
+ import 'reflect-metadata';
2
+ // import * as Reflect from 'reflect-metadata';
3
+ import { AttributeMetadata } from '../constants/symbols';
4
+ import { DateConverter } from '../converters/date/date.converter';
5
+ export function Attribute(options = {}) {
6
+ return (target, propertyName) => {
7
+ const converter = (dataType, value, forSerialisation = false) => {
8
+ let attrConverter;
9
+ if (dataType) {
10
+ if (options.converter) {
11
+ attrConverter = options.converter;
12
+ }
13
+ else if (dataType === Date) {
14
+ attrConverter = new DateConverter();
15
+ }
16
+ else {
17
+ const datatype = new dataType();
18
+ if (datatype.mask && datatype.unmask) {
19
+ attrConverter = datatype;
20
+ }
21
+ }
22
+ if (attrConverter) {
23
+ if (!forSerialisation) {
24
+ return attrConverter.mask(value);
25
+ }
26
+ return attrConverter.unmask(value);
27
+ }
28
+ }
29
+ return value;
30
+ };
31
+ const saveAnnotations = () => {
32
+ const metadata = Reflect.getMetadata('Attribute', target) || {};
33
+ metadata[propertyName] = {
34
+ marked: true
35
+ };
36
+ Reflect.defineMetadata('Attribute', metadata, target);
37
+ const mappingMetadata = Reflect.getMetadata('AttributeMapping', target) || {};
38
+ const serializedPropertyName = options.serializedName !== undefined ? options.serializedName : propertyName;
39
+ mappingMetadata[serializedPropertyName] = propertyName;
40
+ Reflect.defineMetadata('AttributeMapping', mappingMetadata, target);
41
+ const requiredMetadata = Reflect.getMetadata('AttributeRequired', target) || {};
42
+ requiredMetadata[serializedPropertyName] = options.required !== undefined ? options.required : false;
43
+ Reflect.defineMetadata('AttributeRequired', requiredMetadata, target);
44
+ const defaultMetadata = Reflect.getMetadata('AttributedefaultValue', target) || {};
45
+ defaultMetadata[serializedPropertyName] = options.defaultValue !== undefined ? options.defaultValue : null;
46
+ Reflect.defineMetadata('AttributedefaultValue', defaultMetadata, target);
47
+ const formSubGroupMetadata = Reflect.getMetadata('AttributeformSubGroup', target) || {};
48
+ formSubGroupMetadata[serializedPropertyName] = options.formSubGroup !== undefined ? options.formSubGroup : null;
49
+ Reflect.defineMetadata('AttributeformSubGroup', formSubGroupMetadata, target);
50
+ };
51
+ const setMetadata = (hasDirtyAttributes, instance, oldValue, newValue, isNew) => {
52
+ const targetType = Reflect.getMetadata('design:type', target, propertyName);
53
+ if (!instance[AttributeMetadata]) {
54
+ instance[AttributeMetadata] = {};
55
+ }
56
+ const propertyHasDirtyAttributes = typeof oldValue === 'undefined' && !isNew ? false : hasDirtyAttributes;
57
+ instance[AttributeMetadata][propertyName] = {
58
+ newValue,
59
+ oldValue,
60
+ serializedName: options.serializedName,
61
+ hasDirtyAttributes: propertyHasDirtyAttributes,
62
+ serialisationValue: converter(targetType, newValue, true)
63
+ };
64
+ };
65
+ const getter = function () {
66
+ return this['_' + propertyName];
67
+ };
68
+ const setter = function (newVal) {
69
+ const targetType = Reflect.getMetadata('design:type', target, propertyName);
70
+ const convertedValue = converter(targetType, newVal);
71
+ if (convertedValue !== this['_' + propertyName]) {
72
+ setMetadata(true, this, this['_' + propertyName], newVal, !this.id);
73
+ this['_' + propertyName] = convertedValue;
74
+ }
75
+ };
76
+ if (delete target[propertyName]) {
77
+ saveAnnotations();
78
+ Object.defineProperty(target, propertyName, {
79
+ get: getter,
80
+ set: setter,
81
+ enumerable: true,
82
+ configurable: true
83
+ });
84
+ }
85
+ };
86
+ }
87
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0cmlidXRlLmRlY29yYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jvc29mdGxhYi9jb3JlL3NyYy9saWIvZGVjb3JhdG9ycy9hdHRyaWJ1dGUuZGVjb3JhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sa0JBQWtCLENBQUM7QUFDMUIsK0NBQStDO0FBQy9DLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUdsRSxNQUFNLFVBQVUsU0FBUyxDQUFDLFVBQXFDLEVBQUU7SUFDL0QsT0FBTyxDQUFD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cywgdGhpc1snXycgKyAocHJvcGVydHlOYW1lIGFzIHN0cmluZyldLCBuZXdWYWwsICF0aGlzLmlkKTtcclxuICAgICAgICB0aGlzWydfJyArIChwcm9wZXJ0eU5hbWUgYXMgc3RyaW5nKV0gPSBjb252ZXJ0ZWRWYWx1ZTtcclxuICAgICAgfVxyXG4gICAgfTtcclxuXHJcbiAgICBpZiAoZGVsZXRlIHRhcmdldFtwcm9wZXJ0eU5hbWVdKSB7XHJcbiAgICAgIHNhdmVBbm5vdGF0aW9ucygpO1xyXG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBwcm9wZXJ0eU5hbWUsIHtcclxuICAgICAgICBnZXQ6IGdldHRlcixcclxuICAgICAgICBzZXQ6IHNldHRlcixcclxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxyXG4gICAgICB9KTtcclxuICAgIH1cclxuICB9O1xyXG59XHJcbiJdfQ==
@@ -0,0 +1,7 @@
1
+ export function BaseDatastoreConfig(config = {}) {
2
+ // tslint:disable-next-line:only-arrow-functions
3
+ return (target) => {
4
+ Reflect.defineMetadata('BaseDatastoreConfig', config, target);
5
+ };
6
+ }
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1kYXRhc3RvcmUtY29uZmlnLmRlY29yYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jvc29mdGxhYi9jb3JlL3NyYy9saWIvZGVjb3JhdG9ycy9iYXNlLWRhdGFzdG9yZS1jb25maWcuZGVjb3JhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sVUFBVSxtQkFBbUIsQ0FBQyxTQUFjLEVBQUU7SUFDbEQsZ0RBQWdEO0lBQ2hELE9BQU8sQ0FBQyxNQUFXLEVBQUUsRUFBRTtRQUNyQixPQUFPLENBQUMsY0FBYyxDQUFDLHFCQUFxQixFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQztJQUNoRSxDQUFDLENBQUM7QUFDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIEJhc2VEYXRhc3RvcmVDb25maWcoY29uZmlnOiBhbnkgPSB7fSkge1xyXG4gIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpvbmx5LWFycm93LWZ1bmN0aW9uc1xyXG4gIHJldHVybiAodGFyZ2V0OiBhbnkpID0+IHtcclxuICAgIFJlZmxlY3QuZGVmaW5lTWV0YWRhdGEoJ0Jhc2VEYXRhc3RvcmVDb25maWcnLCBjb25maWcsIHRhcmdldCk7XHJcbiAgfTtcclxufVxyXG4iXX0=
@@ -0,0 +1,10 @@
1
+ import { BaseMetaModel } from '../models/base-meta.model';
2
+ export function BaseModelConfig(config = {}) {
3
+ return (target) => {
4
+ if (typeof config['meta'] === 'undefined' || config['meta'] == null) {
5
+ config['meta'] = BaseMetaModel;
6
+ }
7
+ Reflect.defineMetadata('BaseModelConfig', config, target);
8
+ };
9
+ }
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1tb2RlbC1jb25maWcuZGVjb3JhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcm9zb2Z0bGFiL2NvcmUvc3JjL2xpYi9kZWNvcmF0b3JzL2Jhc2UtbW9kZWwtY29uZmlnLmRlY29yYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFMUQsTUFBTSxVQUFVLGVBQWUsQ0FBQyxTQUFjLEVBQUU7SUFDOUMsT0FBTyxDQUFDLE1BQVcsRUFBRSxFQUFFO1FBQ3JCLElBQUksT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLEtBQUssV0FBVyxJQUFJLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxJQUFJLEVBQUU7WUFDbkUsTUFBTSxDQUFDLE1BQU0sQ0FBQyxHQUFHLGFBQWEsQ0FBQztTQUNoQztRQUVELE9BQU8sQ0FBQyxjQUFjLENBQUMsaUJBQWlCLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQzVELENBQUMsQ0FBQztBQUNKLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBCYXNlTWV0YU1vZGVsIH0gZnJvbSAnLi4vbW9kZWxzL2Jhc2UtbWV0YS5tb2RlbCc7XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gQmFzZU1vZGVsQ29uZmlnKGNvbmZpZzogYW55ID0ge30pIHtcclxuICByZXR1cm4gKHRhcmdldDogYW55KSA9PiB7XHJcbiAgICBpZiAodHlwZW9mIGNvbmZpZ1snbWV0YSddID09PSAndW5kZWZpbmVkJyB8fCBjb25maWdbJ21ldGEnXSA9PSBudWxsKSB7XHJcbiAgICAgIGNvbmZpZ1snbWV0YSddID0gQmFzZU1ldGFNb2RlbDtcclxuICAgIH1cclxuXHJcbiAgICBSZWZsZWN0LmRlZmluZU1ldGFkYXRhKCdCYXNlTW9kZWxDb25maWcnLCBjb25maWcsIHRhcmdldCk7XHJcbiAgfTtcclxufVxyXG4iXX0=
@@ -0,0 +1,11 @@
1
+ export function CustomType(config = {}) {
2
+ return (target, propertyName) => {
3
+ const annotations = Reflect.getMetadata('CustomType', target) || [];
4
+ annotations.push({
5
+ propertyName,
6
+ relationship: config.key || propertyName
7
+ });
8
+ Reflect.defineMetadata('CustomType', annotations, target);
9
+ };
10
+ }
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3Vz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