@apipass/schemas 0.2.1-alpha.3 → 0.2.1-test.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/apipass-schemas.d.ts +5 -5
- package/assets/css/buttons.scss +112 -112
- package/assets/css/colors.scss +34 -34
- package/assets/css/fonts.scss +24 -24
- package/assets/css/inputs.scss +197 -197
- package/assets/css/pt_sans.scss +143 -143
- package/assets/css/spacing.scss +28 -28
- package/assets/css/texts.scss +18 -18
- package/base-schema.component.d.ts +11 -11
- package/bundles/apipass-schemas.umd.js +1926 -1921
- package/bundles/apipass-schemas.umd.js.map +1 -1
- package/bundles/apipass-schemas.umd.min.js +1 -1
- package/bundles/apipass-schemas.umd.min.js.map +1 -1
- package/esm2015/apipass-schemas.js +4 -4
- package/esm2015/base-schema.component.js +30 -30
- package/esm2015/public-api.js +17 -17
- package/esm2015/schema-custom-attributes/schema-custom-attributes.js +177 -177
- package/esm2015/schema-fields.service.js +77 -77
- package/esm2015/schema-form/schema-array/array-session/array-session.js +158 -158
- package/esm2015/schema-form/schema-array/schema-array.js +196 -195
- package/esm2015/schema-form/schema-form.js +73 -72
- package/esm2015/schema-form/schema-input/field-render/field-render.js +72 -72
- package/esm2015/schema-form/schema-input/input-render/boolean-input/boolean-input.component.js +45 -45
- package/esm2015/schema-form/schema-input/input-render/input-render.js +124 -124
- package/esm2015/schema-form/schema-input/input-render/number-input/number-input.component.js +43 -43
- package/esm2015/schema-form/schema-input/schema-input.js +99 -98
- package/esm2015/schema-form/schema-object/schema-object.js +95 -94
- package/esm2015/schema-form-render.js +97 -96
- package/esm2015/schema-form-render.module.js +121 -121
- package/esm2015/schema-validation-field.js +15 -15
- package/esm2015/struct.utils.js +9 -9
- package/esm2015/type-script-compile.js +77 -77
- package/fesm2015/apipass-schemas.js +1363 -1358
- package/fesm2015/apipass-schemas.js.map +1 -1
- package/package.json +1 -2
- package/public-api.d.ts +16 -16
- package/schema-custom-attributes/schema-custom-attributes.d.ts +15 -15
- package/schema-fields.service.d.ts +12 -12
- package/schema-form/schema-array/array-session/array-session.d.ts +17 -17
- package/schema-form/schema-array/schema-array.d.ts +18 -18
- package/schema-form/schema-form.d.ts +17 -17
- package/schema-form/schema-input/field-render/field-render.d.ts +15 -15
- package/schema-form/schema-input/input-render/boolean-input/boolean-input.component.d.ts +13 -13
- package/schema-form/schema-input/input-render/input-render.d.ts +19 -19
- package/schema-form/schema-input/input-render/number-input/number-input.component.d.ts +13 -13
- package/schema-form/schema-input/schema-input.d.ts +14 -14
- package/schema-form/schema-object/schema-object.d.ts +20 -20
- package/schema-form-render.d.ts +17 -17
- package/schema-form-render.module.d.ts +22 -22
- package/schema-validation-field.d.ts +17 -17
- package/struct.utils.d.ts +1 -1
- package/type-script-compile.d.ts +10 -10
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { SchemaValidationField } from './schema-validation-field';
|
|
4
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@ngx-translate/core";
|
|
7
|
-
export class SchemaFieldsService {
|
|
8
|
-
constructor(translate) {
|
|
9
|
-
this.translate = translate;
|
|
10
|
-
}
|
|
11
|
-
validateSchemaFields(propertiesRendered, model) {
|
|
12
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
if (!propertiesRendered) {
|
|
14
|
-
return new SchemaValidationField([], [], []);
|
|
15
|
-
}
|
|
16
|
-
const emptyFields = [];
|
|
17
|
-
const invalidMinLengthFields = [];
|
|
18
|
-
const invalidMaxLengthFields = [];
|
|
19
|
-
this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
|
|
20
|
-
const structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
|
|
21
|
-
structValidationField.validationErrorsLabel = yield this.getErrorsStringArray(structValidationField);
|
|
22
|
-
return structValidationField;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
|
|
26
|
-
for (const property of propertiesRendered) {
|
|
27
|
-
if ((property.type === 'object' || property.type === 'array') && property.properties) {
|
|
28
|
-
this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
|
|
29
|
-
}
|
|
30
|
-
else if (property.type === 'array' && !property.properties) {
|
|
31
|
-
const newProperty = Object.assign({}, property);
|
|
32
|
-
newProperty.type = 'string';
|
|
33
|
-
this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const validateModel = recursive ? model : model[property.id];
|
|
37
|
-
if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
|
|
38
|
-
&& (validateModel === undefined || validateModel === '' || validateModel === null)) {
|
|
39
|
-
emptyFields.push(property);
|
|
40
|
-
}
|
|
41
|
-
else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
|
|
42
|
-
invalidMinLengthFields.push(property);
|
|
43
|
-
}
|
|
44
|
-
else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
|
|
45
|
-
invalidMaxLengthFields.push(property);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
getErrorsStringArray(structValidation) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
if (!structValidation.isInvalidSchemaFields()) {
|
|
53
|
-
return [];
|
|
54
|
-
}
|
|
55
|
-
const errors = [];
|
|
56
|
-
for (const field of structValidation.emptyFields) {
|
|
57
|
-
const fieldName = field.title || field.id;
|
|
58
|
-
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.REQUIRED_FIELD_ERROR', { fieldName }));
|
|
59
|
-
}
|
|
60
|
-
for (const field of structValidation.invalidMinLengthFields) {
|
|
61
|
-
const fieldName = field.title || field.id;
|
|
62
|
-
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MINLENGTH_FIELD_ERROR', { fieldName, minLength: field.minLength }));
|
|
63
|
-
}
|
|
64
|
-
for (const field of structValidation.invalidMaxLengthFields) {
|
|
65
|
-
const fieldName = field.title || field.id;
|
|
66
|
-
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MAXLENGTH_FIELD_ERROR', { fieldName, maxLength: field.maxLength }));
|
|
67
|
-
}
|
|
68
|
-
return errors;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(i0.ɵɵinject(i1.TranslateService)); };
|
|
73
|
-
SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
|
|
74
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SchemaFieldsService, [{
|
|
75
|
-
type: Injectable
|
|
76
|
-
}], function () { return [{ type: i1.TranslateService }]; }, null); })();
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { SchemaValidationField } from './schema-validation-field';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@ngx-translate/core";
|
|
7
|
+
export class SchemaFieldsService {
|
|
8
|
+
constructor(translate) {
|
|
9
|
+
this.translate = translate;
|
|
10
|
+
}
|
|
11
|
+
validateSchemaFields(propertiesRendered, model) {
|
|
12
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
if (!propertiesRendered) {
|
|
14
|
+
return new SchemaValidationField([], [], []);
|
|
15
|
+
}
|
|
16
|
+
const emptyFields = [];
|
|
17
|
+
const invalidMinLengthFields = [];
|
|
18
|
+
const invalidMaxLengthFields = [];
|
|
19
|
+
this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
|
|
20
|
+
const structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
|
|
21
|
+
structValidationField.validationErrorsLabel = yield this.getErrorsStringArray(structValidationField);
|
|
22
|
+
return structValidationField;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
|
|
26
|
+
for (const property of propertiesRendered) {
|
|
27
|
+
if ((property.type === 'object' || property.type === 'array') && property.properties) {
|
|
28
|
+
this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
|
|
29
|
+
}
|
|
30
|
+
else if (property.type === 'array' && !property.properties) {
|
|
31
|
+
const newProperty = Object.assign({}, property);
|
|
32
|
+
newProperty.type = 'string';
|
|
33
|
+
this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const validateModel = recursive ? model : model[property.id];
|
|
37
|
+
if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
|
|
38
|
+
&& (validateModel === undefined || validateModel === '' || validateModel === null)) {
|
|
39
|
+
emptyFields.push(property);
|
|
40
|
+
}
|
|
41
|
+
else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
|
|
42
|
+
invalidMinLengthFields.push(property);
|
|
43
|
+
}
|
|
44
|
+
else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
|
|
45
|
+
invalidMaxLengthFields.push(property);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
getErrorsStringArray(structValidation) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
if (!structValidation.isInvalidSchemaFields()) {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
const errors = [];
|
|
56
|
+
for (const field of structValidation.emptyFields) {
|
|
57
|
+
const fieldName = field.title || field.id;
|
|
58
|
+
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.REQUIRED_FIELD_ERROR', { fieldName }));
|
|
59
|
+
}
|
|
60
|
+
for (const field of structValidation.invalidMinLengthFields) {
|
|
61
|
+
const fieldName = field.title || field.id;
|
|
62
|
+
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MINLENGTH_FIELD_ERROR', { fieldName, minLength: field.minLength }));
|
|
63
|
+
}
|
|
64
|
+
for (const field of structValidation.invalidMaxLengthFields) {
|
|
65
|
+
const fieldName = field.title || field.id;
|
|
66
|
+
errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MAXLENGTH_FIELD_ERROR', { fieldName, maxLength: field.maxLength }));
|
|
67
|
+
}
|
|
68
|
+
return errors;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(i0.ɵɵinject(i1.TranslateService)); };
|
|
73
|
+
SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
|
|
74
|
+
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SchemaFieldsService, [{
|
|
75
|
+
type: Injectable
|
|
76
|
+
}], function () { return [{ type: i1.TranslateService }]; }, null); })();
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLWZpZWxkcy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvc2NoZW1hcy9zcmMvc2NoZW1hLWZpZWxkcy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxxQkFBcUIsRUFBQyxNQUFNLDJCQUEyQixDQUFDO0FBQ2hFLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLHFCQUFxQixDQUFDOzs7QUFHckQsTUFBTSxPQUFPLG1CQUFtQjtJQUU5QixZQUFvQixTQUEyQjtRQUEzQixjQUFTLEdBQVQsU0FBUyxDQUFrQjtJQUMvQyxDQUFDO0lBRVksb0JBQW9CLENBQUMsa0JBQThCLEVBQUUsS0FBVTs7WUFFMUUsSUFBSSxDQUFDLGtCQUFrQixFQUFFO2dCQUN2QixPQUFPLElBQUkscUJBQXFCLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQzthQUM5QztZQUVELE1BQU0sV0FBVyxHQUFVLEVBQUUsQ0FBQztZQUM5QixNQUFNLHNCQUFzQixHQUFVLEVBQUUsQ0FBQztZQUN6QyxNQUFNLHNCQUFzQixHQUFVLEVBQUUsQ0FBQztZQUN6QyxJQUFJLENBQUMsaUJBQWlCLENBQUMsa0JBQWtCLEVBQUUsS0FBSy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ter, Input, Output, TemplateRef } from '@angular/core';
|
|
2
|
-
import { BaseSchemaComponent } from '../../../base-schema.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/forms";
|
|
6
|
-
import * as i3 from "@ngx-translate/core";
|
|
7
|
-
const _c0 = function () { return { standalone: true }; };
|
|
8
|
-
function ArraySessionComponent_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
10
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
11
|
-
i0.ɵɵelementStart(1, "div", 12);
|
|
12
|
-
i0.ɵɵelementStart(2, "label", 13);
|
|
13
|
-
i0.ɵɵtext(3, "Loop");
|
|
14
|
-
i0.ɵɵelementEnd();
|
|
15
|
-
i0.ɵɵelementStart(4, "input", 14);
|
|
16
|
-
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.loop = $event; });
|
|
17
|
-
i0.ɵɵelementEnd();
|
|
18
|
-
i0.ɵɵelementEnd();
|
|
19
|
-
i0.ɵɵelementStart(5, "div", 15);
|
|
20
|
-
i0.ɵɵelementStart(6, "label", 13);
|
|
21
|
-
i0.ɵɵtext(7, "Alias");
|
|
22
|
-
i0.ɵɵelementEnd();
|
|
23
|
-
i0.ɵɵelementStart(8, "input", 14);
|
|
24
|
-
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.alias = $event; });
|
|
25
|
-
i0.ɵɵelementEnd();
|
|
26
|
-
i0.ɵɵelementEnd();
|
|
27
|
-
i0.ɵɵelementEnd();
|
|
28
|
-
} if (rf & 2) {
|
|
29
|
-
const item_r2 = i0.ɵɵnextContext().$implicit;
|
|
30
|
-
i0.ɵɵadvance(4);
|
|
31
|
-
i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0));
|
|
32
|
-
i0.ɵɵadvance(4);
|
|
33
|
-
i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
|
|
34
|
-
} }
|
|
35
|
-
function ArraySessionComponent_div_5_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
-
i0.ɵɵelementContainer(0);
|
|
37
|
-
} }
|
|
38
|
-
const _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
|
|
39
|
-
const _c2 = function (a0) { return { $implicit: a0 }; };
|
|
40
|
-
function ArraySessionComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
-
const _r13 = i0.ɵɵgetCurrentView();
|
|
42
|
-
i0.ɵɵelementStart(0, "div", 7);
|
|
43
|
-
i0.ɵɵelementStart(1, "div", 8);
|
|
44
|
-
i0.ɵɵtext(2);
|
|
45
|
-
i0.ɵɵpipe(3, "translate");
|
|
46
|
-
i0.ɵɵelementStart(4, "i", 9);
|
|
47
|
-
i0.ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { i0.ɵɵrestoreView(_r13); const item_r2 = ctx.$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.remove(item_r2); });
|
|
48
|
-
i0.ɵɵelementEnd();
|
|
49
|
-
i0.ɵɵelementEnd();
|
|
50
|
-
i0.ɵɵtemplate(5, ArraySessionComponent_div_5_div_5_Template, 9, 6, "div", 10);
|
|
51
|
-
i0.ɵɵtemplate(6, ArraySessionComponent_div_5_ng_container_6_Template, 1, 0, "ng-container", 11);
|
|
52
|
-
i0.ɵɵelementEnd();
|
|
53
|
-
} if (rf & 2) {
|
|
54
|
-
const item_r2 = ctx.$implicit;
|
|
55
|
-
const index_r3 = ctx.index;
|
|
56
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
57
|
-
i0.ɵɵadvance(2);
|
|
58
|
-
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(3, 5, ctx_r0.removeLabel), " ", index_r3 + 1, " ");
|
|
59
|
-
i0.ɵɵadvance(3);
|
|
60
|
-
i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
|
|
61
|
-
i0.ɵɵadvance(1);
|
|
62
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(11, _c2, i0.ɵɵpureFunction3(7, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
|
|
63
|
-
} }
|
|
64
|
-
function ArraySessionComponent_button_11_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
-
const _r15 = i0.ɵɵgetCurrentView();
|
|
66
|
-
i0.ɵɵelementStart(0, "button", 16);
|
|
67
|
-
i0.ɵɵlistener("click", function ArraySessionComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.addLoop(); });
|
|
68
|
-
i0.ɵɵtext(1);
|
|
69
|
-
i0.ɵɵpipe(2, "translate");
|
|
70
|
-
i0.ɵɵelementEnd();
|
|
71
|
-
} if (rf & 2) {
|
|
72
|
-
i0.ɵɵadvance(1);
|
|
73
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "ADD_LOOP"));
|
|
74
|
-
} }
|
|
75
|
-
export class ArraySessionComponent extends BaseSchemaComponent {
|
|
76
|
-
constructor() {
|
|
77
|
-
super(...arguments);
|
|
78
|
-
this.label = '';
|
|
79
|
-
this.showAddLoop = true;
|
|
80
|
-
this.removeLabel = '';
|
|
81
|
-
this.onAdd = new EventEmitter();
|
|
82
|
-
this.onAddLoop = new EventEmitter();
|
|
83
|
-
}
|
|
84
|
-
add() {
|
|
85
|
-
this.onAdd.next();
|
|
86
|
-
}
|
|
87
|
-
addLoop() {
|
|
88
|
-
this.onAddLoop.next();
|
|
89
|
-
}
|
|
90
|
-
remove(item) {
|
|
91
|
-
const values = this.model;
|
|
92
|
-
const index = values.indexOf(item);
|
|
93
|
-
values.splice(index, 1);
|
|
94
|
-
this.model = values;
|
|
95
|
-
}
|
|
96
|
-
trackByIndex(index, obj) {
|
|
97
|
-
return index;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
ArraySessionComponent.ɵfac = function ArraySessionComponent_Factory(t) { return ɵArraySessionComponent_BaseFactory(t || ArraySessionComponent); };
|
|
101
|
-
ArraySessionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
102
|
-
i0.ɵɵcontentQuery(dirIndex, TemplateRef, true, TemplateRef);
|
|
103
|
-
} if (rf & 2) {
|
|
104
|
-
var _t;
|
|
105
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
|
|
106
|
-
} }, inputs: { label: "label", showAddLoop: "showAddLoop", removeLabel: "removeLabel" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 9, consts: [[1, "row"], [1, "col-md-12"], [1, "info-label", "bold"], ["class", "subsection-element", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "row", "add-buttons"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", 3, "click"], ["class", "btn btn-outline-primary float-left btn-personal-edit ml-2", 3, "click", 4, "ngIf"], [1, "subsection-element"], [1, "subsection-item-title"], [1, "far", "fa-trash-alt", 3, "click"], ["class", "row", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "col-md-8"], [1, "info-label"], ["type", "text", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "col-md-4"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", "ml-2", 3, "click"]], template: function ArraySessionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
108
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
109
|
-
i0.ɵɵelementStart(2, "label", 2);
|
|
110
|
-
i0.ɵɵtext(3);
|
|
111
|
-
i0.ɵɵpipe(4, "translate");
|
|
112
|
-
i0.ɵɵelementEnd();
|
|
113
|
-
i0.ɵɵtemplate(5, ArraySessionComponent_div_5_Template, 7, 13, "div", 3);
|
|
114
|
-
i0.ɵɵelementEnd();
|
|
115
|
-
i0.ɵɵelementEnd();
|
|
116
|
-
i0.ɵɵelementStart(6, "div", 4);
|
|
117
|
-
i0.ɵɵelementStart(7, "div", 1);
|
|
118
|
-
i0.ɵɵelementStart(8, "button", 5);
|
|
119
|
-
i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_8_listener() { return ctx.add(); });
|
|
120
|
-
i0.ɵɵtext(9);
|
|
121
|
-
i0.ɵɵpipe(10, "translate");
|
|
122
|
-
i0.ɵɵelementEnd();
|
|
123
|
-
i0.ɵɵtemplate(11, ArraySessionComponent_button_11_Template, 3, 3, "button", 6);
|
|
124
|
-
i0.ɵɵelementEnd();
|
|
125
|
-
i0.ɵɵelementEnd();
|
|
126
|
-
} if (rf & 2) {
|
|
127
|
-
i0.ɵɵadvance(3);
|
|
128
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, ctx.label));
|
|
129
|
-
i0.ɵɵadvance(2);
|
|
130
|
-
i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
|
|
131
|
-
i0.ɵɵadvance(4);
|
|
132
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 7, "ADD_ITEM"));
|
|
133
|
-
i0.ɵɵadvance(2);
|
|
134
|
-
i0.ɵɵproperty("ngIf", ctx.showAddLoop);
|
|
135
|
-
} }, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel], pipes: [i3.TranslatePipe], styles: [".subsection-element[_ngcontent-%COMP%]{background:#fff;border:1px solid #ccc;border-radius:5px;margin-top:10px;padding:5px 15px 15px}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{align-items:center;background:#eee;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;display:flex;font-weight:700;justify-content:space-between;margin-bottom:5px;margin-left:-15px;margin-top:-5px;padding:7px 10px 7px 14px;width:calc(100% + 30px)}.subsection-item-title[_ngcontent-%COMP%] .fa-trash-alt[_ngcontent-%COMP%]{color:red;cursor:pointer}.subsection-item-title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.add-buttons[_ngcontent-%COMP%]{margin-top:5px}"] });
|
|
136
|
-
const ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
|
|
137
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ArraySessionComponent, [{
|
|
138
|
-
type: Component,
|
|
139
|
-
args: [{
|
|
140
|
-
selector: 'array-session',
|
|
141
|
-
templateUrl: 'array-session.html',
|
|
142
|
-
styleUrls: ['array-session.scss']
|
|
143
|
-
}]
|
|
144
|
-
}], null, { label: [{
|
|
145
|
-
type: Input
|
|
146
|
-
}], showAddLoop: [{
|
|
147
|
-
type: Input
|
|
148
|
-
}], removeLabel: [{
|
|
149
|
-
type: Input
|
|
150
|
-
}], onAdd: [{
|
|
151
|
-
type: Output
|
|
152
|
-
}], onAddLoop: [{
|
|
153
|
-
type: Output
|
|
154
|
-
}], subsectionItem: [{
|
|
155
|
-
type: ContentChild,
|
|
156
|
-
args: [TemplateRef, { read: TemplateRef }]
|
|
157
|
-
}] }); })();
|
|
158
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ContentChild, EventEmitter, Input, Output, TemplateRef } from '@angular/core';
|
|
2
|
+
import { BaseSchemaComponent } from '../../../base-schema.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
import * as i3 from "@ngx-translate/core";
|
|
7
|
+
const _c0 = function () { return { standalone: true }; };
|
|
8
|
+
function ArraySessionComponent_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
10
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
11
|
+
i0.ɵɵelementStart(1, "div", 12);
|
|
12
|
+
i0.ɵɵelementStart(2, "label", 13);
|
|
13
|
+
i0.ɵɵtext(3, "Loop");
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
i0.ɵɵelementStart(4, "input", 14);
|
|
16
|
+
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.loop = $event; });
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
i0.ɵɵelementEnd();
|
|
19
|
+
i0.ɵɵelementStart(5, "div", 15);
|
|
20
|
+
i0.ɵɵelementStart(6, "label", 13);
|
|
21
|
+
i0.ɵɵtext(7, "Alias");
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
i0.ɵɵelementStart(8, "input", 14);
|
|
24
|
+
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.alias = $event; });
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
i0.ɵɵelementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const item_r2 = i0.ɵɵnextContext().$implicit;
|
|
30
|
+
i0.ɵɵadvance(4);
|
|
31
|
+
i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0));
|
|
32
|
+
i0.ɵɵadvance(4);
|
|
33
|
+
i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
|
|
34
|
+
} }
|
|
35
|
+
function ArraySessionComponent_div_5_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelementContainer(0);
|
|
37
|
+
} }
|
|
38
|
+
const _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
|
|
39
|
+
const _c2 = function (a0) { return { $implicit: a0 }; };
|
|
40
|
+
function ArraySessionComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
42
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
43
|
+
i0.ɵɵelementStart(1, "div", 8);
|
|
44
|
+
i0.ɵɵtext(2);
|
|
45
|
+
i0.ɵɵpipe(3, "translate");
|
|
46
|
+
i0.ɵɵelementStart(4, "i", 9);
|
|
47
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { i0.ɵɵrestoreView(_r13); const item_r2 = ctx.$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.remove(item_r2); });
|
|
48
|
+
i0.ɵɵelementEnd();
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵtemplate(5, ArraySessionComponent_div_5_div_5_Template, 9, 6, "div", 10);
|
|
51
|
+
i0.ɵɵtemplate(6, ArraySessionComponent_div_5_ng_container_6_Template, 1, 0, "ng-container", 11);
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
} if (rf & 2) {
|
|
54
|
+
const item_r2 = ctx.$implicit;
|
|
55
|
+
const index_r3 = ctx.index;
|
|
56
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
57
|
+
i0.ɵɵadvance(2);
|
|
58
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(3, 5, ctx_r0.removeLabel), " ", index_r3 + 1, " ");
|
|
59
|
+
i0.ɵɵadvance(3);
|
|
60
|
+
i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
|
|
61
|
+
i0.ɵɵadvance(1);
|
|
62
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(11, _c2, i0.ɵɵpureFunction3(7, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
|
|
63
|
+
} }
|
|
64
|
+
function ArraySessionComponent_button_11_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
66
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
67
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.addLoop(); });
|
|
68
|
+
i0.ɵɵtext(1);
|
|
69
|
+
i0.ɵɵpipe(2, "translate");
|
|
70
|
+
i0.ɵɵelementEnd();
|
|
71
|
+
} if (rf & 2) {
|
|
72
|
+
i0.ɵɵadvance(1);
|
|
73
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "ADD_LOOP"));
|
|
74
|
+
} }
|
|
75
|
+
export class ArraySessionComponent extends BaseSchemaComponent {
|
|
76
|
+
constructor() {
|
|
77
|
+
super(...arguments);
|
|
78
|
+
this.label = '';
|
|
79
|
+
this.showAddLoop = true;
|
|
80
|
+
this.removeLabel = '';
|
|
81
|
+
this.onAdd = new EventEmitter();
|
|
82
|
+
this.onAddLoop = new EventEmitter();
|
|
83
|
+
}
|
|
84
|
+
add() {
|
|
85
|
+
this.onAdd.next();
|
|
86
|
+
}
|
|
87
|
+
addLoop() {
|
|
88
|
+
this.onAddLoop.next();
|
|
89
|
+
}
|
|
90
|
+
remove(item) {
|
|
91
|
+
const values = this.model;
|
|
92
|
+
const index = values.indexOf(item);
|
|
93
|
+
values.splice(index, 1);
|
|
94
|
+
this.model = values;
|
|
95
|
+
}
|
|
96
|
+
trackByIndex(index, obj) {
|
|
97
|
+
return index;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
ArraySessionComponent.ɵfac = function ArraySessionComponent_Factory(t) { return ɵArraySessionComponent_BaseFactory(t || ArraySessionComponent); };
|
|
101
|
+
ArraySessionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
102
|
+
i0.ɵɵcontentQuery(dirIndex, TemplateRef, true, TemplateRef);
|
|
103
|
+
} if (rf & 2) {
|
|
104
|
+
var _t;
|
|
105
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
|
|
106
|
+
} }, inputs: { label: "label", showAddLoop: "showAddLoop", removeLabel: "removeLabel" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 9, consts: [[1, "row"], [1, "col-md-12"], [1, "info-label", "bold"], ["class", "subsection-element", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "row", "add-buttons"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", 3, "click"], ["class", "btn btn-outline-primary float-left btn-personal-edit ml-2", 3, "click", 4, "ngIf"], [1, "subsection-element"], [1, "subsection-item-title"], [1, "far", "fa-trash-alt", 3, "click"], ["class", "row", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "col-md-8"], [1, "info-label"], ["type", "text", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "col-md-4"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", "ml-2", 3, "click"]], template: function ArraySessionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
108
|
+
i0.ɵɵelementStart(1, "div", 1);
|
|
109
|
+
i0.ɵɵelementStart(2, "label", 2);
|
|
110
|
+
i0.ɵɵtext(3);
|
|
111
|
+
i0.ɵɵpipe(4, "translate");
|
|
112
|
+
i0.ɵɵelementEnd();
|
|
113
|
+
i0.ɵɵtemplate(5, ArraySessionComponent_div_5_Template, 7, 13, "div", 3);
|
|
114
|
+
i0.ɵɵelementEnd();
|
|
115
|
+
i0.ɵɵelementEnd();
|
|
116
|
+
i0.ɵɵelementStart(6, "div", 4);
|
|
117
|
+
i0.ɵɵelementStart(7, "div", 1);
|
|
118
|
+
i0.ɵɵelementStart(8, "button", 5);
|
|
119
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_8_listener() { return ctx.add(); });
|
|
120
|
+
i0.ɵɵtext(9);
|
|
121
|
+
i0.ɵɵpipe(10, "translate");
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
i0.ɵɵtemplate(11, ArraySessionComponent_button_11_Template, 3, 3, "button", 6);
|
|
124
|
+
i0.ɵɵelementEnd();
|
|
125
|
+
i0.ɵɵelementEnd();
|
|
126
|
+
} if (rf & 2) {
|
|
127
|
+
i0.ɵɵadvance(3);
|
|
128
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, ctx.label));
|
|
129
|
+
i0.ɵɵadvance(2);
|
|
130
|
+
i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
|
|
131
|
+
i0.ɵɵadvance(4);
|
|
132
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 7, "ADD_ITEM"));
|
|
133
|
+
i0.ɵɵadvance(2);
|
|
134
|
+
i0.ɵɵproperty("ngIf", ctx.showAddLoop);
|
|
135
|
+
} }, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel], pipes: [i3.TranslatePipe], styles: [".subsection-element[_ngcontent-%COMP%]{background:#fff;border:1px solid #ccc;border-radius:5px;margin-top:10px;padding:5px 15px 15px}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{align-items:center;background:#eee;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;display:flex;font-weight:700;justify-content:space-between;margin-bottom:5px;margin-left:-15px;margin-top:-5px;padding:7px 10px 7px 14px;width:calc(100% + 30px)}.subsection-item-title[_ngcontent-%COMP%] .fa-trash-alt[_ngcontent-%COMP%]{color:red;cursor:pointer}.subsection-item-title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.add-buttons[_ngcontent-%COMP%]{margin-top:5px}"] });
|
|
136
|
+
const ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
|
|
137
|
+
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ArraySessionComponent, [{
|
|
138
|
+
type: Component,
|
|
139
|
+
args: [{
|
|
140
|
+
selector: 'array-session',
|
|
141
|
+
templateUrl: 'array-session.html',
|
|
142
|
+
styleUrls: ['array-session.scss']
|
|
143
|
+
}]
|
|
144
|
+
}], null, { label: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], showAddLoop: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], removeLabel: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], onAdd: [{
|
|
151
|
+
type: Output
|
|
152
|
+
}], onAddLoop: [{
|
|
153
|
+
type: Output
|
|
154
|
+
}], subsectionItem: [{
|
|
155
|
+
type: ContentChild,
|
|
156
|
+
args: [TemplateRef, { read: TemplateRef }]
|
|
157
|
+
}] }); })();
|
|
158
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXktc2Vzc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3NjaGVtYS1mb3JtL3NjaGVtYS1hcnJheS9hcnJheS1zZXNzaW9uL2FycmF5LXNlc3Npb24udHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zY2hlbWFzL3NyYy9zY2hlbWEtZm9ybS9zY2hlbWEtYXJyYXkvYXJyYXktc2Vzc2lvbi9hcnJheS1zZXNzaW9uLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsV0FBVyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ2hHLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLGdDQUFnQyxDQUFDOzs7Ozs7OztJQ003RCw4QkFDRTtJQUFBLCtCQUNFO0lBQUEsaUNBQTBCO0lBQUEsb0JBQUk7SUFBQSxpQkFBUTtJQUN0QyxpQ0FDRjtJQUQwQyxpT0FBdUI7SUFBL0QsaUJBQ0Y7SUFBQSxpQkFBTTtJQUNOLCtCQUNFO0lBQUEsaUNBQTBCO0lBQUEscUJBQUs7SUFBQSxpQkFBUTtJQUN2QyxpQ0FDRjtJQUQwQyxrT0FBd0I7SUFBaEUsaUJBQ0Y7SUFBQSxpQkFBTTtJQUNSLGlCQUFNOzs7SUFOc0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