@apipass/schemas 0.2.5 → 0.2.7-alpha.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/bundles/apipass-schemas.umd.js +529 -274
- package/bundles/apipass-schemas.umd.js.map +1 -1
- package/bundles/apipass-schemas.umd.min.js +2 -2
- package/bundles/apipass-schemas.umd.min.js.map +1 -1
- package/esm2015/public-api.js +2 -2
- package/esm2015/schema-custom-attributes/schema-custom-attributes.js +56 -41
- package/esm2015/schema-fields.service.js +18 -10
- package/esm2015/schema-form/schema-array/array-session/array-session.js +39 -37
- package/esm2015/schema-form/schema-array/schema-array.js +70 -31
- package/esm2015/schema-form/schema-form.js +51 -9
- package/esm2015/schema-form/schema-input/field-render/field-render.js +21 -19
- package/esm2015/schema-form/schema-input/input-render/input-render.js +18 -11
- package/esm2015/schema-form/schema-input/schema-input.js +27 -14
- package/esm2015/schema-form/schema-object/schema-object.js +54 -14
- package/esm2015/schema-form-render.js +54 -14
- package/esm2015/schema-form-render.module.js +9 -11
- package/esm2015/schema-validation-field.js +1 -1
- package/esm2015/type-script-compile/type-script-compile.base.js +112 -0
- package/fesm2015/apipass-schemas.js +516 -267
- package/fesm2015/apipass-schemas.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/schema-custom-attributes/schema-custom-attributes.d.ts +7 -1
- package/schema-fields.service.d.ts +7 -4
- package/schema-form/schema-array/array-session/array-session.d.ts +4 -2
- package/schema-form/schema-array/schema-array.d.ts +15 -1
- package/schema-form/schema-form.d.ts +15 -1
- package/schema-form/schema-input/field-render/field-render.d.ts +2 -1
- package/schema-form/schema-input/input-render/input-render.d.ts +5 -1
- package/schema-form/schema-input/schema-input.d.ts +6 -1
- package/schema-form/schema-object/schema-object.d.ts +15 -1
- package/schema-form-render.d.ts +15 -1
- package/schema-form-render.module.d.ts +2 -3
- package/schema-validation-field.d.ts +7 -1
- package/type-script-compile/type-script-compile.base.d.ts +17 -0
- package/esm2015/type-script-compile.js +0 -77
- package/type-script-compile.d.ts +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.
|
|
5
|
-
}(this, (function (exports, i0, i1, i3,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-drag-drop'), require('@angular/material/tooltip'), require('@apipass/inputs'), require('@angular/cdk/bidi'), require('@angular/cdk/scrolling')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-drag-drop', '@angular/material/tooltip', '@apipass/inputs', '@angular/cdk/bidi', '@angular/cdk/scrolling'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.i2, global.ng.material.tooltip, global.i7, global.ng.cdk.bidi, global.ng.cdk.scrolling));
|
|
5
|
+
}(this, (function (exports, i0, i1, i3, i2, i4, i7, i5, i6) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
var _c0 = function () { return { standalone: true }; };
|
|
357
|
-
function
|
|
357
|
+
function ArraySessionComponent_div_4_div_4_Template(rf, ctx) {
|
|
358
358
|
if (rf & 1) {
|
|
359
359
|
var _r8_1 = i0.ɵɵgetCurrentView();
|
|
360
360
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
i0.ɵɵtext(3, "Loop");
|
|
364
364
|
i0.ɵɵelementEnd();
|
|
365
365
|
i0.ɵɵelementStart(4, "input", 14);
|
|
366
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
366
|
+
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.loop = $event; })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_4_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; var ctx_r9 = i0.ɵɵnextContext(); return item_r2.loop = ctx_r9.onDrop($event, item_r2.loop); });
|
|
367
367
|
i0.ɵɵelementEnd();
|
|
368
368
|
i0.ɵɵelementEnd();
|
|
369
369
|
i0.ɵɵelementStart(5, "div", 15);
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
i0.ɵɵtext(7, "Alias");
|
|
372
372
|
i0.ɵɵelementEnd();
|
|
373
373
|
i0.ɵɵelementStart(8, "input", 14);
|
|
374
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
374
|
+
i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.alias = $event; })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_8_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; var ctx_r13 = i0.ɵɵnextContext(); return item_r2.alias = ctx_r13.onDrop($event, item_r2.alias); });
|
|
375
375
|
i0.ɵɵelementEnd();
|
|
376
376
|
i0.ɵɵelementEnd();
|
|
377
377
|
i0.ɵɵelementEnd();
|
|
@@ -384,26 +384,25 @@
|
|
|
384
384
|
i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function ArraySessionComponent_div_4_ng_container_5_Template(rf, ctx) {
|
|
388
388
|
if (rf & 1) {
|
|
389
389
|
i0.ɵɵelementContainer(0);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
var _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
|
|
393
393
|
var _c2 = function (a0) { return { $implicit: a0 }; };
|
|
394
|
-
function
|
|
394
|
+
function ArraySessionComponent_div_4_Template(rf, ctx) {
|
|
395
395
|
if (rf & 1) {
|
|
396
396
|
var _r17_1 = i0.ɵɵgetCurrentView();
|
|
397
397
|
i0.ɵɵelementStart(0, "div", 7);
|
|
398
398
|
i0.ɵɵelementStart(1, "div", 8);
|
|
399
399
|
i0.ɵɵtext(2);
|
|
400
|
-
i0.ɵɵ
|
|
401
|
-
i0.ɵɵ
|
|
402
|
-
i0.ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { i0.ɵɵrestoreView(_r17_1); var item_r2 = ctx.$implicit; var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.remove(item_r2); });
|
|
400
|
+
i0.ɵɵelementStart(3, "i", 9);
|
|
401
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_div_4_Template_i_click_3_listener() { i0.ɵɵrestoreView(_r17_1); var item_r2 = ctx.$implicit; var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.remove(item_r2); });
|
|
403
402
|
i0.ɵɵelementEnd();
|
|
404
403
|
i0.ɵɵelementEnd();
|
|
405
|
-
i0.ɵɵtemplate(
|
|
406
|
-
i0.ɵɵtemplate(
|
|
404
|
+
i0.ɵɵtemplate(4, ArraySessionComponent_div_4_div_4_Template, 9, 6, "div", 10);
|
|
405
|
+
i0.ɵɵtemplate(5, ArraySessionComponent_div_4_ng_container_5_Template, 1, 0, "ng-container", 11);
|
|
407
406
|
i0.ɵɵelementEnd();
|
|
408
407
|
}
|
|
409
408
|
if (rf & 2) {
|
|
@@ -411,25 +410,25 @@
|
|
|
411
410
|
var index_r3 = ctx.index;
|
|
412
411
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
413
412
|
i0.ɵɵadvance(2);
|
|
414
|
-
i0.ɵɵtextInterpolate2("",
|
|
415
|
-
i0.ɵɵadvance(
|
|
413
|
+
i0.ɵɵtextInterpolate2("", ctx_r0.removeLabel, " ", index_r3 + 1, " ");
|
|
414
|
+
i0.ɵɵadvance(2);
|
|
416
415
|
i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
|
|
417
416
|
i0.ɵɵadvance(1);
|
|
418
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(
|
|
417
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(9, _c2, i0.ɵɵpureFunction3(5, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
|
|
419
418
|
}
|
|
420
419
|
}
|
|
421
|
-
function
|
|
420
|
+
function ArraySessionComponent_button_9_Template(rf, ctx) {
|
|
422
421
|
if (rf & 1) {
|
|
423
422
|
var _r19_1 = i0.ɵɵgetCurrentView();
|
|
424
423
|
i0.ɵɵelementStart(0, "button", 16);
|
|
425
|
-
i0.ɵɵlistener("click", function
|
|
424
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19_1); var ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.addLoop(); });
|
|
426
425
|
i0.ɵɵtext(1);
|
|
427
|
-
i0.ɵɵpipe(2, "translate");
|
|
428
426
|
i0.ɵɵelementEnd();
|
|
429
427
|
}
|
|
430
428
|
if (rf & 2) {
|
|
429
|
+
var ctx_r1 = i0.ɵɵnextContext();
|
|
431
430
|
i0.ɵɵadvance(1);
|
|
432
|
-
i0.ɵɵtextInterpolate(
|
|
431
|
+
i0.ɵɵtextInterpolate(ctx_r1.addLoopLabel);
|
|
433
432
|
}
|
|
434
433
|
}
|
|
435
434
|
var ArraySessionComponent = /** @class */ (function (_super) {
|
|
@@ -437,8 +436,10 @@
|
|
|
437
436
|
function ArraySessionComponent() {
|
|
438
437
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
439
438
|
_this.label = '';
|
|
439
|
+
_this.removeLabel = 'Remove';
|
|
440
|
+
_this.addItemLabel = 'Add Item';
|
|
441
|
+
_this.addLoopLabel = 'Add Loop';
|
|
440
442
|
_this.showAddLoop = true;
|
|
441
|
-
_this.removeLabel = '';
|
|
442
443
|
_this.onAdd = new i0.EventEmitter();
|
|
443
444
|
_this.onAddLoop = new i0.EventEmitter();
|
|
444
445
|
return _this;
|
|
@@ -469,39 +470,37 @@
|
|
|
469
470
|
var _t;
|
|
470
471
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
|
|
471
472
|
}
|
|
472
|
-
}, inputs: { label: "label",
|
|
473
|
+
}, inputs: { label: "label", removeLabel: "removeLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", showAddLoop: "showAddLoop" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 5, 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", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "col-md-4"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", "ml-2", 3, "click"]], template: function ArraySessionComponent_Template(rf, ctx) {
|
|
473
474
|
if (rf & 1) {
|
|
474
475
|
i0.ɵɵelementStart(0, "div", 0);
|
|
475
476
|
i0.ɵɵelementStart(1, "div", 1);
|
|
476
477
|
i0.ɵɵelementStart(2, "label", 2);
|
|
477
478
|
i0.ɵɵtext(3);
|
|
478
|
-
i0.ɵɵpipe(4, "translate");
|
|
479
479
|
i0.ɵɵelementEnd();
|
|
480
|
-
i0.ɵɵtemplate(
|
|
480
|
+
i0.ɵɵtemplate(4, ArraySessionComponent_div_4_Template, 6, 11, "div", 3);
|
|
481
481
|
i0.ɵɵelementEnd();
|
|
482
482
|
i0.ɵɵelementEnd();
|
|
483
|
-
i0.ɵɵelementStart(
|
|
484
|
-
i0.ɵɵelementStart(
|
|
485
|
-
i0.ɵɵelementStart(
|
|
486
|
-
i0.ɵɵlistener("click", function
|
|
487
|
-
i0.ɵɵtext(
|
|
488
|
-
i0.ɵɵpipe(10, "translate");
|
|
483
|
+
i0.ɵɵelementStart(5, "div", 4);
|
|
484
|
+
i0.ɵɵelementStart(6, "div", 1);
|
|
485
|
+
i0.ɵɵelementStart(7, "button", 5);
|
|
486
|
+
i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_7_listener() { return ctx.add(); });
|
|
487
|
+
i0.ɵɵtext(8);
|
|
489
488
|
i0.ɵɵelementEnd();
|
|
490
|
-
i0.ɵɵtemplate(
|
|
489
|
+
i0.ɵɵtemplate(9, ArraySessionComponent_button_9_Template, 2, 1, "button", 6);
|
|
491
490
|
i0.ɵɵelementEnd();
|
|
492
491
|
i0.ɵɵelementEnd();
|
|
493
492
|
}
|
|
494
493
|
if (rf & 2) {
|
|
495
494
|
i0.ɵɵadvance(3);
|
|
496
|
-
i0.ɵɵtextInterpolate(
|
|
497
|
-
i0.ɵɵadvance(
|
|
495
|
+
i0.ɵɵtextInterpolate(ctx.label);
|
|
496
|
+
i0.ɵɵadvance(1);
|
|
498
497
|
i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
|
|
499
498
|
i0.ɵɵadvance(4);
|
|
500
|
-
i0.ɵɵtextInterpolate(
|
|
501
|
-
i0.ɵɵadvance(
|
|
499
|
+
i0.ɵɵtextInterpolate(ctx.addItemLabel);
|
|
500
|
+
i0.ɵɵadvance(1);
|
|
502
501
|
i0.ɵɵproperty("ngIf", ctx.showAddLoop);
|
|
503
502
|
}
|
|
504
|
-
}, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel],
|
|
503
|
+
}, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], 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}"] });
|
|
505
504
|
var ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
|
|
506
505
|
/*@__PURE__*/ (function () {
|
|
507
506
|
i0.ɵsetClassMetadata(ArraySessionComponent, [{
|
|
@@ -513,10 +512,14 @@
|
|
|
513
512
|
}]
|
|
514
513
|
}], null, { label: [{
|
|
515
514
|
type: i0.Input
|
|
516
|
-
}], showAddLoop: [{
|
|
517
|
-
type: i0.Input
|
|
518
515
|
}], removeLabel: [{
|
|
519
516
|
type: i0.Input
|
|
517
|
+
}], addItemLabel: [{
|
|
518
|
+
type: i0.Input
|
|
519
|
+
}], addLoopLabel: [{
|
|
520
|
+
type: i0.Input
|
|
521
|
+
}], showAddLoop: [{
|
|
522
|
+
type: i0.Input
|
|
520
523
|
}], onAdd: [{
|
|
521
524
|
type: i0.Output
|
|
522
525
|
}], onAddLoop: [{
|
|
@@ -534,10 +537,10 @@
|
|
|
534
537
|
i0.ɵɵelementStart(1, "schema-input", 2);
|
|
535
538
|
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_input_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.model = $event; });
|
|
536
539
|
i0.ɵɵelementEnd();
|
|
537
|
-
i0.ɵɵelementStart(2, "schema-object",
|
|
540
|
+
i0.ɵɵelementStart(2, "schema-object", 3);
|
|
538
541
|
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_object_modelChange_2_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.model = $event; });
|
|
539
542
|
i0.ɵɵelementEnd();
|
|
540
|
-
i0.ɵɵelementStart(3, "schema-array",
|
|
543
|
+
i0.ɵɵelementStart(3, "schema-array", 3);
|
|
541
544
|
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_array_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.model = $event; });
|
|
542
545
|
i0.ɵɵelementEnd();
|
|
543
546
|
i0.ɵɵelementEnd();
|
|
@@ -547,17 +550,31 @@
|
|
|
547
550
|
var i_r2 = ctx.index;
|
|
548
551
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
549
552
|
i0.ɵɵadvance(1);
|
|
550
|
-
i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
553
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
551
554
|
i0.ɵɵadvance(1);
|
|
552
|
-
i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
555
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
553
556
|
i0.ɵɵadvance(1);
|
|
554
|
-
i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
557
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
560
|
var SchemaFormComponent = /** @class */ (function (_super) {
|
|
558
561
|
__extends(SchemaFormComponent, _super);
|
|
559
562
|
function SchemaFormComponent() {
|
|
560
563
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
564
|
+
_this.requiredLabel = '(required)';
|
|
565
|
+
_this.addItemLabel = 'Add Item';
|
|
566
|
+
_this.addLoopLabel = 'Add Loop';
|
|
567
|
+
_this.additionalAttributesLabel = 'Additional Fields';
|
|
568
|
+
_this.customAttributeRemoveLabel = 'Remove';
|
|
569
|
+
_this.newCustomFieldNameLabel = 'Name';
|
|
570
|
+
_this.newCustomFieldValueLabel = 'Value';
|
|
571
|
+
_this.newCustomFieldAddLabel = 'Add';
|
|
572
|
+
_this.newCustomFieldSaveLabel = 'Save';
|
|
573
|
+
_this.newCustomFieldCancelLabel = 'Cancel';
|
|
574
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
575
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
576
|
+
_this.selectClearLabel = 'Clear';
|
|
577
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
561
578
|
_this.schemas = [];
|
|
562
579
|
_this.customProperties = false;
|
|
563
580
|
_this.editing = false;
|
|
@@ -576,9 +593,9 @@
|
|
|
576
593
|
return SchemaFormComponent;
|
|
577
594
|
}(BaseSchemaComponent));
|
|
578
595
|
SchemaFormComponent.ɵfac = function SchemaFormComponent_Factory(t) { return ɵSchemaFormComponent_BaseFactory(t || SchemaFormComponent); };
|
|
579
|
-
SchemaFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) {
|
|
596
|
+
SchemaFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) {
|
|
580
597
|
if (rf & 1) {
|
|
581
|
-
i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4,
|
|
598
|
+
i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 48, "div", 0);
|
|
582
599
|
}
|
|
583
600
|
if (rf & 2) {
|
|
584
601
|
i0.ɵɵproperty("ngForOf", ctx.schemas);
|
|
@@ -593,7 +610,35 @@
|
|
|
593
610
|
templateUrl: 'schema-form.html',
|
|
594
611
|
styleUrls: ['./schema-form.scss']
|
|
595
612
|
}]
|
|
596
|
-
}], null, {
|
|
613
|
+
}], null, { requiredLabel: [{
|
|
614
|
+
type: i0.Input
|
|
615
|
+
}], addItemLabel: [{
|
|
616
|
+
type: i0.Input
|
|
617
|
+
}], addLoopLabel: [{
|
|
618
|
+
type: i0.Input
|
|
619
|
+
}], additionalAttributesLabel: [{
|
|
620
|
+
type: i0.Input
|
|
621
|
+
}], customAttributeRemoveLabel: [{
|
|
622
|
+
type: i0.Input
|
|
623
|
+
}], newCustomFieldNameLabel: [{
|
|
624
|
+
type: i0.Input
|
|
625
|
+
}], newCustomFieldValueLabel: [{
|
|
626
|
+
type: i0.Input
|
|
627
|
+
}], newCustomFieldAddLabel: [{
|
|
628
|
+
type: i0.Input
|
|
629
|
+
}], newCustomFieldSaveLabel: [{
|
|
630
|
+
type: i0.Input
|
|
631
|
+
}], newCustomFieldCancelLabel: [{
|
|
632
|
+
type: i0.Input
|
|
633
|
+
}], selectPlaceHolderLabel: [{
|
|
634
|
+
type: i0.Input
|
|
635
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
636
|
+
type: i0.Input
|
|
637
|
+
}], selectClearLabel: [{
|
|
638
|
+
type: i0.Input
|
|
639
|
+
}], selectNotFoundLabel: [{
|
|
640
|
+
type: i0.Input
|
|
641
|
+
}], idPrefix: [{
|
|
597
642
|
type: i0.Input
|
|
598
643
|
}], schemas: [{
|
|
599
644
|
type: i0.Input
|
|
@@ -618,22 +663,22 @@
|
|
|
618
663
|
i0.ɵɵelementStart(4, "span", 9);
|
|
619
664
|
i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_div_0_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r8_1); var i_r6 = ctx.index; var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.removeCustomAttribute(i_r6); });
|
|
620
665
|
i0.ɵɵelement(5, "i", 10);
|
|
621
|
-
i0.ɵɵpipe(6, "translate");
|
|
622
666
|
i0.ɵɵelementEnd();
|
|
623
|
-
i0.ɵɵelementStart(
|
|
624
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
667
|
+
i0.ɵɵelementStart(6, "input", 11);
|
|
668
|
+
i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDropAttr($event, attribute_r5); });
|
|
625
669
|
i0.ɵɵelementEnd();
|
|
626
670
|
i0.ɵɵelementEnd();
|
|
627
671
|
i0.ɵɵelementEnd();
|
|
628
672
|
}
|
|
629
673
|
if (rf & 2) {
|
|
630
674
|
var attribute_r5 = ctx.$implicit;
|
|
675
|
+
var ctx_r0 = i0.ɵɵnextContext();
|
|
631
676
|
i0.ɵɵadvance(3);
|
|
632
677
|
i0.ɵɵtextInterpolate(attribute_r5.label);
|
|
633
678
|
i0.ɵɵadvance(2);
|
|
634
|
-
i0.ɵɵproperty("matTooltip",
|
|
635
|
-
i0.ɵɵadvance(
|
|
636
|
-
i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(
|
|
679
|
+
i0.ɵɵproperty("matTooltip", ctx_r0.customAttributeRemoveLabel);
|
|
680
|
+
i0.ɵɵadvance(1);
|
|
681
|
+
i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0$1));
|
|
637
682
|
}
|
|
638
683
|
}
|
|
639
684
|
function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) {
|
|
@@ -644,27 +689,25 @@
|
|
|
644
689
|
i0.ɵɵelementStart(2, "div", 7);
|
|
645
690
|
i0.ɵɵelementStart(3, "label", 8);
|
|
646
691
|
i0.ɵɵtext(4);
|
|
647
|
-
i0.ɵɵ
|
|
648
|
-
i0.ɵɵ
|
|
649
|
-
i0.ɵɵtext(7, "*");
|
|
692
|
+
i0.ɵɵelementStart(5, "strong");
|
|
693
|
+
i0.ɵɵtext(6, "*");
|
|
650
694
|
i0.ɵɵelementEnd();
|
|
651
695
|
i0.ɵɵelementEnd();
|
|
652
|
-
i0.ɵɵelementStart(
|
|
653
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
696
|
+
i0.ɵɵelementStart(7, "input", 14);
|
|
697
|
+
i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; });
|
|
654
698
|
i0.ɵɵelementEnd();
|
|
655
699
|
i0.ɵɵelementEnd();
|
|
656
700
|
i0.ɵɵelementEnd();
|
|
657
|
-
i0.ɵɵelementStart(
|
|
658
|
-
i0.ɵɵelementStart(
|
|
659
|
-
i0.ɵɵelementStart(
|
|
660
|
-
i0.ɵɵtext(
|
|
661
|
-
i0.ɵɵ
|
|
662
|
-
i0.ɵɵ
|
|
663
|
-
i0.ɵɵtext(15, "*");
|
|
701
|
+
i0.ɵɵelementStart(8, "div", 13);
|
|
702
|
+
i0.ɵɵelementStart(9, "div", 7);
|
|
703
|
+
i0.ɵɵelementStart(10, "label", 8);
|
|
704
|
+
i0.ɵɵtext(11);
|
|
705
|
+
i0.ɵɵelementStart(12, "strong");
|
|
706
|
+
i0.ɵɵtext(13, "*");
|
|
664
707
|
i0.ɵɵelementEnd();
|
|
665
708
|
i0.ɵɵelementEnd();
|
|
666
|
-
i0.ɵɵelementStart(
|
|
667
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
709
|
+
i0.ɵɵelementStart(14, "input", 11);
|
|
710
|
+
i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onDropAttr($event, ctx_r14.newCustomField); });
|
|
668
711
|
i0.ɵɵelementEnd();
|
|
669
712
|
i0.ɵɵelementEnd();
|
|
670
713
|
i0.ɵɵelementEnd();
|
|
@@ -673,13 +716,13 @@
|
|
|
673
716
|
if (rf & 2) {
|
|
674
717
|
var ctx_r1 = i0.ɵɵnextContext();
|
|
675
718
|
i0.ɵɵadvance(4);
|
|
676
|
-
i0.ɵɵtextInterpolate(
|
|
677
|
-
i0.ɵɵadvance(
|
|
678
|
-
i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(
|
|
679
|
-
i0.ɵɵadvance(4);
|
|
680
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 8, "STEP.VALUE"));
|
|
719
|
+
i0.ɵɵtextInterpolate(ctx_r1.newCustomFieldNameLabel);
|
|
720
|
+
i0.ɵɵadvance(3);
|
|
721
|
+
i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$1));
|
|
681
722
|
i0.ɵɵadvance(4);
|
|
682
|
-
i0.ɵɵ
|
|
723
|
+
i0.ɵɵtextInterpolate(ctx_r1.newCustomFieldValueLabel);
|
|
724
|
+
i0.ɵɵadvance(3);
|
|
725
|
+
i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", i0.ɵɵpureFunction0(7, _c0$1));
|
|
683
726
|
}
|
|
684
727
|
}
|
|
685
728
|
function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) {
|
|
@@ -688,12 +731,12 @@
|
|
|
688
731
|
i0.ɵɵelementStart(0, "button", 15);
|
|
689
732
|
i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.newCustomField = {}; });
|
|
690
733
|
i0.ɵɵtext(1);
|
|
691
|
-
i0.ɵɵpipe(2, "translate");
|
|
692
734
|
i0.ɵɵelementEnd();
|
|
693
735
|
}
|
|
694
736
|
if (rf & 2) {
|
|
737
|
+
var ctx_r2 = i0.ɵɵnextContext();
|
|
695
738
|
i0.ɵɵadvance(1);
|
|
696
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
739
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.newCustomFieldAddLabel, " ");
|
|
697
740
|
}
|
|
698
741
|
}
|
|
699
742
|
function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) {
|
|
@@ -702,12 +745,12 @@
|
|
|
702
745
|
i0.ɵɵelementStart(0, "button", 16);
|
|
703
746
|
i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.newCustomField = null; });
|
|
704
747
|
i0.ɵɵtext(1);
|
|
705
|
-
i0.ɵɵpipe(2, "translate");
|
|
706
748
|
i0.ɵɵelementEnd();
|
|
707
749
|
}
|
|
708
750
|
if (rf & 2) {
|
|
751
|
+
var ctx_r3 = i0.ɵɵnextContext();
|
|
709
752
|
i0.ɵɵadvance(1);
|
|
710
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
753
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r3.newCustomFieldCancelLabel, " ");
|
|
711
754
|
}
|
|
712
755
|
}
|
|
713
756
|
function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) {
|
|
@@ -716,18 +759,24 @@
|
|
|
716
759
|
i0.ɵɵelementStart(0, "button", 15);
|
|
717
760
|
i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.saveNewAttribute(ctx_r19.newCustomField); });
|
|
718
761
|
i0.ɵɵtext(1);
|
|
719
|
-
i0.ɵɵpipe(2, "translate");
|
|
720
762
|
i0.ɵɵelementEnd();
|
|
721
763
|
}
|
|
722
764
|
if (rf & 2) {
|
|
765
|
+
var ctx_r4 = i0.ɵɵnextContext();
|
|
723
766
|
i0.ɵɵadvance(1);
|
|
724
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
767
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r4.newCustomFieldSaveLabel, " ");
|
|
725
768
|
}
|
|
726
769
|
}
|
|
727
770
|
var SchemaCustomAttributesComponent = /** @class */ (function (_super) {
|
|
728
771
|
__extends(SchemaCustomAttributesComponent, _super);
|
|
729
772
|
function SchemaCustomAttributesComponent() {
|
|
730
773
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
774
|
+
_this.customAttributeRemoveLabel = 'Remove';
|
|
775
|
+
_this.newCustomFieldNameLabel = 'Name';
|
|
776
|
+
_this.newCustomFieldValueLabel = 'Value';
|
|
777
|
+
_this.newCustomFieldAddLabel = 'Add';
|
|
778
|
+
_this.newCustomFieldSaveLabel = 'Save';
|
|
779
|
+
_this.newCustomFieldCancelLabel = 'Cancel';
|
|
731
780
|
_this.onSaveAttribute = new i0.EventEmitter();
|
|
732
781
|
_this.onDropOnAttribute = new i0.EventEmitter();
|
|
733
782
|
return _this;
|
|
@@ -756,15 +805,15 @@
|
|
|
756
805
|
return SchemaCustomAttributesComponent;
|
|
757
806
|
}(BaseSchemaComponent));
|
|
758
807
|
SchemaCustomAttributesComponent.ɵfac = function SchemaCustomAttributesComponent_Factory(t) { return ɵSchemaCustomAttributesComponent_BaseFactory(t || SchemaCustomAttributesComponent); };
|
|
759
|
-
SchemaCustomAttributesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction" }, outputs: { onSaveAttribute: "onSaveAttribute", onDropOnAttribute: "onDropOnAttribute" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 5, consts: [["class", "row custom-attributes", 4, "ngFor", "ngForOf"], ["class", "struct-custom-field", 4, "ngIf"], [1, "row", "actions-buttons"], [1, "col-md-12", "pull-right"], ["class", "btn btn-outline-primary float-left", 3, "click", 4, "ngIf"], ["class", "btn btn-outline-danger float-left ml-2", 3, "click", 4, "ngIf"], [1, "row", "custom-attributes"], [1, "col-md-12"], [1, "info-label"], [1, "customAttributeDeleteIcon", 3, "click"], [1, "far", "fa-trash-alt", 3, "matTooltip"], ["dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "struct-custom-field"], [1, "row"], [1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) {
|
|
808
|
+
SchemaCustomAttributesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel" }, outputs: { onSaveAttribute: "onSaveAttribute", onDropOnAttribute: "onDropOnAttribute" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 5, consts: [["class", "row custom-attributes", 4, "ngFor", "ngForOf"], ["class", "struct-custom-field", 4, "ngIf"], [1, "row", "actions-buttons"], [1, "col-md-12", "pull-right"], ["class", "btn btn-outline-primary float-left", 3, "click", 4, "ngIf"], ["class", "btn btn-outline-danger float-left ml-2", 3, "click", 4, "ngIf"], [1, "row", "custom-attributes"], [1, "col-md-12"], [1, "info-label"], [1, "customAttributeDeleteIcon", 3, "click"], [1, "far", "fa-trash-alt", 3, "matTooltip"], ["dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "struct-custom-field"], [1, "row"], [1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) {
|
|
760
809
|
if (rf & 1) {
|
|
761
|
-
i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template,
|
|
762
|
-
i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template,
|
|
810
|
+
i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 7, 5, "div", 0);
|
|
811
|
+
i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 15, 8, "div", 1);
|
|
763
812
|
i0.ɵɵelementStart(2, "div", 2);
|
|
764
813
|
i0.ɵɵelementStart(3, "div", 3);
|
|
765
|
-
i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template,
|
|
766
|
-
i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template,
|
|
767
|
-
i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template,
|
|
814
|
+
i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 2, 1, "button", 4);
|
|
815
|
+
i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 2, 1, "button", 5);
|
|
816
|
+
i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 2, 1, "button", 4);
|
|
768
817
|
i0.ɵɵelementEnd();
|
|
769
818
|
i0.ɵɵelementEnd();
|
|
770
819
|
}
|
|
@@ -779,7 +828,7 @@
|
|
|
779
828
|
i0.ɵɵadvance(1);
|
|
780
829
|
i0.ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
|
|
781
830
|
}
|
|
782
|
-
}, directives: [i1.NgForOf, i1.NgIf, i4.MatTooltip, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel],
|
|
831
|
+
}, directives: [i1.NgForOf, i1.NgIf, i4.MatTooltip, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], styles: [".customAttributeDeleteIcon[_ngcontent-%COMP%]{color:red;cursor:pointer;font-size:16px;position:absolute;right:15px;top:4px}.customAttributeDeleteIcon[_ngcontent-%COMP%]:hover{color:#777}.struct-custom-field[_ngcontent-%COMP%]{background-color:#ececec;margin-top:16px;padding:8px 16px 16px}"] });
|
|
783
832
|
var ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaCustomAttributesComponent);
|
|
784
833
|
/*@__PURE__*/ (function () {
|
|
785
834
|
i0.ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
|
|
@@ -791,6 +840,18 @@
|
|
|
791
840
|
}]
|
|
792
841
|
}], null, { onDropFunction: [{
|
|
793
842
|
type: i0.Input
|
|
843
|
+
}], customAttributeRemoveLabel: [{
|
|
844
|
+
type: i0.Input
|
|
845
|
+
}], newCustomFieldNameLabel: [{
|
|
846
|
+
type: i0.Input
|
|
847
|
+
}], newCustomFieldValueLabel: [{
|
|
848
|
+
type: i0.Input
|
|
849
|
+
}], newCustomFieldAddLabel: [{
|
|
850
|
+
type: i0.Input
|
|
851
|
+
}], newCustomFieldSaveLabel: [{
|
|
852
|
+
type: i0.Input
|
|
853
|
+
}], newCustomFieldCancelLabel: [{
|
|
854
|
+
type: i0.Input
|
|
794
855
|
}], onSaveAttribute: [{
|
|
795
856
|
type: i0.Output
|
|
796
857
|
}], onDropOnAttribute: [{
|
|
@@ -808,7 +869,7 @@
|
|
|
808
869
|
if (rf & 2) {
|
|
809
870
|
var item_r3 = i0.ɵɵnextContext().$implicit;
|
|
810
871
|
var ctx_r4 = i0.ɵɵnextContext(2);
|
|
811
|
-
i0.ɵɵproperty("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
|
|
872
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r4.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r4.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r4.selectClearLabel)("selectNotFoundLabel", ctx_r4.selectNotFoundLabel)("requiredLabel", ctx_r4.requiredLabel)("addItemLabel", ctx_r4.addItemLabel)("addLoopLabel", ctx_r4.addLoopLabel)("additionalAttributesLabel", ctx_r4.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r4.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r4.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r4.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r4.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r4.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r4.newCustomFieldCancelLabel)("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
|
|
812
873
|
}
|
|
813
874
|
}
|
|
814
875
|
function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) {
|
|
@@ -821,7 +882,7 @@
|
|
|
821
882
|
if (rf & 2) {
|
|
822
883
|
var item_r3 = i0.ɵɵnextContext().$implicit;
|
|
823
884
|
var ctx_r5 = i0.ɵɵnextContext(2);
|
|
824
|
-
i0.ɵɵproperty("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
|
|
885
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r5.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r5.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r5.selectClearLabel)("selectNotFoundLabel", ctx_r5.selectNotFoundLabel)("requiredLabel", ctx_r5.requiredLabel)("addItemLabel", ctx_r5.addItemLabel)("addLoopLabel", ctx_r5.addLoopLabel)("additionalAttributesLabel", ctx_r5.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r5.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r5.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r5.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r5.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r5.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r5.newCustomFieldCancelLabel)("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
|
|
825
886
|
}
|
|
826
887
|
}
|
|
827
888
|
function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) {
|
|
@@ -831,10 +892,9 @@
|
|
|
831
892
|
i0.ɵɵelementStart(1, "div", 6);
|
|
832
893
|
i0.ɵɵelementStart(2, "label", 7);
|
|
833
894
|
i0.ɵɵtext(3);
|
|
834
|
-
i0.ɵɵpipe(4, "translate");
|
|
835
895
|
i0.ɵɵelementEnd();
|
|
836
|
-
i0.ɵɵelementStart(
|
|
837
|
-
i0.ɵɵlistener("modelChange", function
|
|
896
|
+
i0.ɵɵelementStart(4, "schema-custom-attributes", 8);
|
|
897
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r16_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event; });
|
|
838
898
|
i0.ɵɵelementEnd();
|
|
839
899
|
i0.ɵɵelementEnd();
|
|
840
900
|
i0.ɵɵelementEnd();
|
|
@@ -843,16 +903,16 @@
|
|
|
843
903
|
var item_r3 = i0.ɵɵnextContext().$implicit;
|
|
844
904
|
var ctx_r6 = i0.ɵɵnextContext(2);
|
|
845
905
|
i0.ɵɵadvance(3);
|
|
846
|
-
i0.ɵɵtextInterpolate(
|
|
847
|
-
i0.ɵɵadvance(
|
|
848
|
-
i0.ɵɵproperty("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
|
|
906
|
+
i0.ɵɵtextInterpolate(ctx_r6.additionalAttributesLabel);
|
|
907
|
+
i0.ɵɵadvance(1);
|
|
908
|
+
i0.ɵɵproperty("customAttributeRemoveLabel", ctx_r6.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r6.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r6.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r6.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r6.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r6.newCustomFieldCancelLabel)("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
|
|
849
909
|
}
|
|
850
910
|
}
|
|
851
911
|
function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) {
|
|
852
912
|
if (rf & 1) {
|
|
853
|
-
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1,
|
|
854
|
-
i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1,
|
|
855
|
-
i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template,
|
|
913
|
+
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 18, "schema-form", 2);
|
|
914
|
+
i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 18, "schema-form", 2);
|
|
915
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 5, 9, "div", 3);
|
|
856
916
|
}
|
|
857
917
|
if (rf & 2) {
|
|
858
918
|
var item_r3 = ctx.$implicit;
|
|
@@ -877,15 +937,15 @@
|
|
|
877
937
|
if (rf & 2) {
|
|
878
938
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
879
939
|
i0.ɵɵadvance(1);
|
|
880
|
-
i0.ɵɵproperty("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
|
|
940
|
+
i0.ɵɵproperty("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
|
|
881
941
|
}
|
|
882
942
|
}
|
|
883
943
|
var _c0$2 = function () { return { standalone: true }; };
|
|
884
|
-
function
|
|
944
|
+
function SchemaArrayComponent_div_1_ng_template_2_input_2_Template(rf, ctx) {
|
|
885
945
|
if (rf & 1) {
|
|
886
946
|
var _r30_1 = i0.ɵɵgetCurrentView();
|
|
887
947
|
i0.ɵɵelementStart(0, "input", 12);
|
|
888
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
948
|
+
i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; return item_r24.items[item_r24.index].mappingAttributes = $event; })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r31 = i0.ɵɵnextContext(2); return item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes); });
|
|
889
949
|
i0.ɵɵelementEnd();
|
|
890
950
|
}
|
|
891
951
|
if (rf & 2) {
|
|
@@ -894,11 +954,11 @@
|
|
|
894
954
|
i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$2))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
|
|
895
955
|
}
|
|
896
956
|
}
|
|
897
|
-
function
|
|
957
|
+
function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template(rf, ctx) {
|
|
898
958
|
if (rf & 1) {
|
|
899
959
|
var _r36_1 = i0.ɵɵgetCurrentView();
|
|
900
960
|
i0.ɵɵelementStart(0, "input", 12);
|
|
901
|
-
i0.ɵɵlistener("ngModelChange", function
|
|
961
|
+
i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; return (item_r24.items[item_r24.index] = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r37 = i0.ɵɵnextContext(2); return (item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index])); });
|
|
902
962
|
i0.ɵɵelementEnd();
|
|
903
963
|
}
|
|
904
964
|
if (rf & 2) {
|
|
@@ -911,19 +971,18 @@
|
|
|
911
971
|
if (rf & 1) {
|
|
912
972
|
i0.ɵɵelementStart(0, "label", 9);
|
|
913
973
|
i0.ɵɵtext(1);
|
|
914
|
-
i0.ɵɵpipe(2, "translate");
|
|
915
974
|
i0.ɵɵelementEnd();
|
|
916
|
-
i0.ɵɵtemplate(
|
|
917
|
-
i0.ɵɵtemplate(
|
|
975
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_input_2_Template, 1, 4, "input", 10);
|
|
976
|
+
i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
|
|
918
977
|
}
|
|
919
978
|
if (rf & 2) {
|
|
920
979
|
var item_r24 = ctx.$implicit;
|
|
921
|
-
var _r26 = i0.ɵɵreference(
|
|
980
|
+
var _r26 = i0.ɵɵreference(4);
|
|
922
981
|
var ctx_r23 = i0.ɵɵnextContext(2);
|
|
923
982
|
i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
|
|
924
983
|
i0.ɵɵadvance(1);
|
|
925
|
-
i0.ɵɵtextInterpolate(
|
|
926
|
-
i0.ɵɵadvance(
|
|
984
|
+
i0.ɵɵtextInterpolate(ctx_r23.schema.title);
|
|
985
|
+
i0.ɵɵadvance(1);
|
|
927
986
|
i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
|
|
928
987
|
}
|
|
929
988
|
}
|
|
@@ -933,20 +992,34 @@
|
|
|
933
992
|
i0.ɵɵelementStart(0, "div");
|
|
934
993
|
i0.ɵɵelementStart(1, "array-session", 1);
|
|
935
994
|
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r41_1); var ctx_r40 = i0.ɵɵnextContext(); return (ctx_r40.model[ctx_r40.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.addArrayItem(ctx_r42.schema.id, ""); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.addArrayLoop(ctx_r43.schema.id, ""); });
|
|
936
|
-
i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template,
|
|
995
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 5, 4, "ng-template");
|
|
937
996
|
i0.ɵɵelementEnd();
|
|
938
997
|
i0.ɵɵelementEnd();
|
|
939
998
|
}
|
|
940
999
|
if (rf & 2) {
|
|
941
1000
|
var ctx_r1 = i0.ɵɵnextContext();
|
|
942
1001
|
i0.ɵɵadvance(1);
|
|
943
|
-
i0.ɵɵproperty("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
|
|
1002
|
+
i0.ɵɵproperty("addItemLabel", ctx_r1.addItemLabel)("addLoopLabel", ctx_r1.addLoopLabel)("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
|
|
944
1003
|
}
|
|
945
1004
|
}
|
|
946
1005
|
var SchemaArrayComponent = /** @class */ (function (_super) {
|
|
947
1006
|
__extends(SchemaArrayComponent, _super);
|
|
948
1007
|
function SchemaArrayComponent() {
|
|
949
1008
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1009
|
+
_this.requiredLabel = '(required)';
|
|
1010
|
+
_this.addItemLabel = 'Add Item';
|
|
1011
|
+
_this.addLoopLabel = 'Add Loop';
|
|
1012
|
+
_this.additionalAttributesLabel = 'Additional Fields';
|
|
1013
|
+
_this.customAttributeRemoveLabel = 'Remove';
|
|
1014
|
+
_this.newCustomFieldNameLabel = 'Name';
|
|
1015
|
+
_this.newCustomFieldValueLabel = 'Value';
|
|
1016
|
+
_this.newCustomFieldAddLabel = 'Add';
|
|
1017
|
+
_this.newCustomFieldSaveLabel = 'Save';
|
|
1018
|
+
_this.newCustomFieldCancelLabel = 'Cancel';
|
|
1019
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
1020
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
1021
|
+
_this.selectClearLabel = 'Clear';
|
|
1022
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
950
1023
|
_this.editing = false;
|
|
951
1024
|
return _this;
|
|
952
1025
|
}
|
|
@@ -987,17 +1060,17 @@
|
|
|
987
1060
|
return SchemaArrayComponent;
|
|
988
1061
|
}(BaseSchemaComponent));
|
|
989
1062
|
SchemaArrayComponent.ɵfac = function SchemaArrayComponent_Factory(t) { return ɵSchemaArrayComponent_BaseFactory(t || SchemaArrayComponent); };
|
|
990
|
-
SchemaArrayComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) {
|
|
1063
|
+
SchemaArrayComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "addItemLabel", "addLoopLabel", "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) {
|
|
991
1064
|
if (rf & 1) {
|
|
992
|
-
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3,
|
|
993
|
-
i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3,
|
|
1065
|
+
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 6, "div", 0);
|
|
1066
|
+
i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 6, "div", 0);
|
|
994
1067
|
}
|
|
995
1068
|
if (rf & 2) {
|
|
996
1069
|
i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
|
|
997
1070
|
i0.ɵɵadvance(1);
|
|
998
1071
|
i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
|
|
999
1072
|
}
|
|
1000
|
-
}, directives: [i1.NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel],
|
|
1073
|
+
}, directives: [i1.NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], styles: [""] });
|
|
1001
1074
|
var ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaArrayComponent);
|
|
1002
1075
|
/*@__PURE__*/ (function () {
|
|
1003
1076
|
i0.ɵsetClassMetadata(SchemaArrayComponent, [{
|
|
@@ -1007,7 +1080,35 @@
|
|
|
1007
1080
|
templateUrl: 'schema-array.html',
|
|
1008
1081
|
styleUrls: ['./schema-array.scss']
|
|
1009
1082
|
}]
|
|
1010
|
-
}], null, {
|
|
1083
|
+
}], null, { requiredLabel: [{
|
|
1084
|
+
type: i0.Input
|
|
1085
|
+
}], addItemLabel: [{
|
|
1086
|
+
type: i0.Input
|
|
1087
|
+
}], addLoopLabel: [{
|
|
1088
|
+
type: i0.Input
|
|
1089
|
+
}], additionalAttributesLabel: [{
|
|
1090
|
+
type: i0.Input
|
|
1091
|
+
}], customAttributeRemoveLabel: [{
|
|
1092
|
+
type: i0.Input
|
|
1093
|
+
}], newCustomFieldNameLabel: [{
|
|
1094
|
+
type: i0.Input
|
|
1095
|
+
}], newCustomFieldValueLabel: [{
|
|
1096
|
+
type: i0.Input
|
|
1097
|
+
}], newCustomFieldAddLabel: [{
|
|
1098
|
+
type: i0.Input
|
|
1099
|
+
}], newCustomFieldSaveLabel: [{
|
|
1100
|
+
type: i0.Input
|
|
1101
|
+
}], newCustomFieldCancelLabel: [{
|
|
1102
|
+
type: i0.Input
|
|
1103
|
+
}], selectPlaceHolderLabel: [{
|
|
1104
|
+
type: i0.Input
|
|
1105
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1106
|
+
type: i0.Input
|
|
1107
|
+
}], selectClearLabel: [{
|
|
1108
|
+
type: i0.Input
|
|
1109
|
+
}], selectNotFoundLabel: [{
|
|
1110
|
+
type: i0.Input
|
|
1111
|
+
}], idPrefix: [{
|
|
1011
1112
|
type: i0.Input
|
|
1012
1113
|
}], schema: [{
|
|
1013
1114
|
type: i0.Input
|
|
@@ -1019,63 +1120,64 @@
|
|
|
1019
1120
|
})();
|
|
1020
1121
|
|
|
1021
1122
|
var _c0$3 = function (a0) { return { "has-error": a0 }; };
|
|
1022
|
-
function
|
|
1123
|
+
function FieldRenderComponent_small_3_Template(rf, ctx) {
|
|
1023
1124
|
if (rf & 1) {
|
|
1024
1125
|
i0.ɵɵelementStart(0, "small", 0);
|
|
1025
|
-
i0.ɵɵtext(1
|
|
1126
|
+
i0.ɵɵtext(1);
|
|
1026
1127
|
i0.ɵɵelementEnd();
|
|
1027
1128
|
}
|
|
1028
1129
|
if (rf & 2) {
|
|
1029
1130
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
1030
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
1131
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
|
|
1132
|
+
i0.ɵɵadvance(1);
|
|
1133
|
+
i0.ɵɵtextInterpolate(ctx_r0.requiredLabel);
|
|
1031
1134
|
}
|
|
1032
1135
|
}
|
|
1033
|
-
function
|
|
1136
|
+
function FieldRenderComponent_span_4_Template(rf, ctx) {
|
|
1034
1137
|
if (rf & 1) {
|
|
1035
1138
|
i0.ɵɵelementStart(0, "span", 4);
|
|
1036
|
-
i0.ɵɵ
|
|
1037
|
-
i0.ɵɵelement(2, "i", 5);
|
|
1139
|
+
i0.ɵɵelement(1, "i", 5);
|
|
1038
1140
|
i0.ɵɵelementEnd();
|
|
1039
1141
|
}
|
|
1040
1142
|
if (rf & 2) {
|
|
1041
1143
|
var ctx_r1 = i0.ɵɵnextContext();
|
|
1042
|
-
i0.ɵɵpropertyInterpolate("matTooltip",
|
|
1144
|
+
i0.ɵɵpropertyInterpolate("matTooltip", ctx_r1.tooltip);
|
|
1043
1145
|
}
|
|
1044
1146
|
}
|
|
1045
1147
|
var _c1$1 = ["*"];
|
|
1046
1148
|
var FieldRenderComponent = /** @class */ (function () {
|
|
1047
1149
|
function FieldRenderComponent() {
|
|
1150
|
+
this.requiredLabel = '(required)';
|
|
1048
1151
|
this.label = '';
|
|
1049
1152
|
this.required = true;
|
|
1050
1153
|
}
|
|
1051
1154
|
return FieldRenderComponent;
|
|
1052
1155
|
}());
|
|
1053
1156
|
FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
|
|
1054
|
-
FieldRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, decls:
|
|
1157
|
+
FieldRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { requiredLabel: "requiredLabel", label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, decls: 6, vars: 7, consts: [[3, "ngClass"], [1, "info-label", "bold", 3, "htmlFor"], [3, "ngClass", 4, "ngIf"], ["class", "info-icon", 3, "matTooltip", 4, "ngIf"], [1, "info-icon", 3, "matTooltip"], [1, "far", "fa-question-circle"]], template: function FieldRenderComponent_Template(rf, ctx) {
|
|
1055
1158
|
if (rf & 1) {
|
|
1056
1159
|
i0.ɵɵprojectionDef();
|
|
1057
1160
|
i0.ɵɵelementStart(0, "div", 0);
|
|
1058
1161
|
i0.ɵɵelementStart(1, "label", 1);
|
|
1059
1162
|
i0.ɵɵtext(2);
|
|
1060
|
-
i0.ɵɵ
|
|
1061
|
-
i0.ɵɵtemplate(4,
|
|
1062
|
-
i0.ɵɵtemplate(5, FieldRenderComponent_span_5_Template, 3, 3, "span", 3);
|
|
1163
|
+
i0.ɵɵtemplate(3, FieldRenderComponent_small_3_Template, 2, 4, "small", 2);
|
|
1164
|
+
i0.ɵɵtemplate(4, FieldRenderComponent_span_4_Template, 2, 1, "span", 3);
|
|
1063
1165
|
i0.ɵɵelementEnd();
|
|
1064
|
-
i0.ɵɵprojection(
|
|
1166
|
+
i0.ɵɵprojection(5);
|
|
1065
1167
|
i0.ɵɵelementEnd();
|
|
1066
1168
|
}
|
|
1067
1169
|
if (rf & 2) {
|
|
1068
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
1170
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
|
|
1069
1171
|
i0.ɵɵadvance(1);
|
|
1070
1172
|
i0.ɵɵproperty("htmlFor", ctx.inputId);
|
|
1071
1173
|
i0.ɵɵadvance(1);
|
|
1072
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
1073
|
-
i0.ɵɵadvance(
|
|
1174
|
+
i0.ɵɵtextInterpolate1(" ", ctx.label, " ");
|
|
1175
|
+
i0.ɵɵadvance(1);
|
|
1074
1176
|
i0.ɵɵproperty("ngIf", ctx.required);
|
|
1075
1177
|
i0.ɵɵadvance(1);
|
|
1076
1178
|
i0.ɵɵproperty("ngIf", ctx.tooltip);
|
|
1077
1179
|
}
|
|
1078
|
-
}, directives: [i1.NgClass, i1.NgIf, i4.MatTooltip],
|
|
1180
|
+
}, directives: [i1.NgClass, i1.NgIf, i4.MatTooltip], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;float:right;font-size:13px;margin-left:4px}"] });
|
|
1079
1181
|
/*@__PURE__*/ (function () {
|
|
1080
1182
|
i0.ɵsetClassMetadata(FieldRenderComponent, [{
|
|
1081
1183
|
type: i0.Component,
|
|
@@ -1084,7 +1186,9 @@
|
|
|
1084
1186
|
templateUrl: 'field-render.html',
|
|
1085
1187
|
styleUrls: ['field-render.scss']
|
|
1086
1188
|
}]
|
|
1087
|
-
}], null, {
|
|
1189
|
+
}], null, { requiredLabel: [{
|
|
1190
|
+
type: i0.Input
|
|
1191
|
+
}], label: [{
|
|
1088
1192
|
type: i0.Input
|
|
1089
1193
|
}], inputId: [{
|
|
1090
1194
|
type: i0.Input
|
|
@@ -1224,15 +1328,11 @@
|
|
|
1224
1328
|
var _r9_1 = i0.ɵɵgetCurrentView();
|
|
1225
1329
|
i0.ɵɵelementStart(0, "select-box", 5);
|
|
1226
1330
|
i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.value = $event; })("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onChange($event.key); });
|
|
1227
|
-
i0.ɵɵpipe(1, "translate");
|
|
1228
|
-
i0.ɵɵpipe(2, "translate");
|
|
1229
|
-
i0.ɵɵpipe(3, "translate");
|
|
1230
|
-
i0.ɵɵpipe(4, "translate");
|
|
1231
1331
|
i0.ɵɵelementEnd();
|
|
1232
1332
|
}
|
|
1233
1333
|
if (rf & 2) {
|
|
1234
1334
|
var ctx_r1 = i0.ɵɵnextContext();
|
|
1235
|
-
i0.ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(
|
|
1335
|
+
i0.ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(12, _c0$6))("placeholder", ctx_r1.schema.description || ctx_r1.selectPlaceHolderLabel)("searchPlaceHolder", ctx_r1.selectSearchPlaceHolderLabel)("clearText", ctx_r1.selectClearLabel)("notFoundText", ctx_r1.selectNotFoundLabel)("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r1.schema.options);
|
|
1236
1336
|
}
|
|
1237
1337
|
}
|
|
1238
1338
|
function InputRenderComponent_number_input_3_Template(rf, ctx) {
|
|
@@ -1263,6 +1363,10 @@
|
|
|
1263
1363
|
__extends(InputRenderComponent, _super);
|
|
1264
1364
|
function InputRenderComponent() {
|
|
1265
1365
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1366
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
1367
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
1368
|
+
_this.selectClearLabel = 'Clear';
|
|
1369
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
1266
1370
|
_this.schema = {};
|
|
1267
1371
|
_this.editing = false;
|
|
1268
1372
|
_this.onDropEvent = new i0.EventEmitter();
|
|
@@ -1302,11 +1406,11 @@
|
|
|
1302
1406
|
return InputRenderComponent;
|
|
1303
1407
|
}(BaseSchemaComponent));
|
|
1304
1408
|
InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
|
|
1305
|
-
InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
|
|
1409
|
+
InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
|
|
1306
1410
|
if (rf & 1) {
|
|
1307
1411
|
i0.ɵɵelementStart(0, "div", 0);
|
|
1308
1412
|
i0.ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
|
|
1309
|
-
i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template,
|
|
1413
|
+
i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 1, 13, "select-box", 2);
|
|
1310
1414
|
i0.ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
|
|
1311
1415
|
i0.ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
|
|
1312
1416
|
i0.ɵɵelementEnd();
|
|
@@ -1321,7 +1425,7 @@
|
|
|
1321
1425
|
i0.ɵɵadvance(1);
|
|
1322
1426
|
i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
|
|
1323
1427
|
}
|
|
1324
|
-
}, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator,
|
|
1428
|
+
}, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i7.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], styles: [""] });
|
|
1325
1429
|
var ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(InputRenderComponent);
|
|
1326
1430
|
/*@__PURE__*/ (function () {
|
|
1327
1431
|
i0.ɵsetClassMetadata(InputRenderComponent, [{
|
|
@@ -1331,7 +1435,15 @@
|
|
|
1331
1435
|
templateUrl: 'input-render.html',
|
|
1332
1436
|
styleUrls: ['./input-render.scss']
|
|
1333
1437
|
}]
|
|
1334
|
-
}], null, {
|
|
1438
|
+
}], null, { selectPlaceHolderLabel: [{
|
|
1439
|
+
type: i0.Input
|
|
1440
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1441
|
+
type: i0.Input
|
|
1442
|
+
}], selectClearLabel: [{
|
|
1443
|
+
type: i0.Input
|
|
1444
|
+
}], selectNotFoundLabel: [{
|
|
1445
|
+
type: i0.Input
|
|
1446
|
+
}], schema: [{
|
|
1335
1447
|
type: i0.Input
|
|
1336
1448
|
}], modelPropertiesPath: [{
|
|
1337
1449
|
type: i0.Input
|
|
@@ -1360,21 +1472,20 @@
|
|
|
1360
1472
|
if (rf & 2) {
|
|
1361
1473
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
1362
1474
|
i0.ɵɵadvance(2);
|
|
1363
|
-
i0.ɵɵproperty("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
|
|
1475
|
+
i0.ɵɵproperty("requiredLabel", ctx_r0.requiredLabel)("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
|
|
1364
1476
|
i0.ɵɵadvance(1);
|
|
1365
|
-
i0.ɵɵproperty("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
|
|
1477
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
|
|
1366
1478
|
}
|
|
1367
1479
|
}
|
|
1368
1480
|
function SchemaInputComponent_div_1_span_4_Template(rf, ctx) {
|
|
1369
1481
|
if (rf & 1) {
|
|
1370
1482
|
i0.ɵɵelementStart(0, "span", 7);
|
|
1371
|
-
i0.ɵɵ
|
|
1372
|
-
i0.ɵɵtext(2, "?");
|
|
1483
|
+
i0.ɵɵtext(1, "?");
|
|
1373
1484
|
i0.ɵɵelementEnd();
|
|
1374
1485
|
}
|
|
1375
1486
|
if (rf & 2) {
|
|
1376
1487
|
var ctx_r4 = i0.ɵɵnextContext(2);
|
|
1377
|
-
i0.ɵɵpropertyInterpolate("matTooltip",
|
|
1488
|
+
i0.ɵɵpropertyInterpolate("matTooltip", ctx_r4.schema.help);
|
|
1378
1489
|
}
|
|
1379
1490
|
}
|
|
1380
1491
|
function SchemaInputComponent_div_1_Template(rf, ctx) {
|
|
@@ -1384,7 +1495,7 @@
|
|
|
1384
1495
|
i0.ɵɵelementStart(1, "div", 2);
|
|
1385
1496
|
i0.ɵɵelementStart(2, "label", 5);
|
|
1386
1497
|
i0.ɵɵtext(3);
|
|
1387
|
-
i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template,
|
|
1498
|
+
i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 2, 1, "span", 6);
|
|
1388
1499
|
i0.ɵɵelementEnd();
|
|
1389
1500
|
i0.ɵɵelementStart(5, "input-render", 4);
|
|
1390
1501
|
i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_1_Template_input_render_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(); return (ctx_r5.model[ctx_r5.schema.id] = $event); });
|
|
@@ -1401,13 +1512,18 @@
|
|
|
1401
1512
|
i0.ɵɵadvance(1);
|
|
1402
1513
|
i0.ɵɵproperty("ngIf", ctx_r1.schema.help);
|
|
1403
1514
|
i0.ɵɵadvance(1);
|
|
1404
|
-
i0.ɵɵproperty("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
|
|
1515
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r1.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r1.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r1.selectClearLabel)("selectNotFoundLabel", ctx_r1.selectNotFoundLabel)("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
|
|
1405
1516
|
}
|
|
1406
1517
|
}
|
|
1407
1518
|
var SchemaInputComponent = /** @class */ (function (_super) {
|
|
1408
1519
|
__extends(SchemaInputComponent, _super);
|
|
1409
1520
|
function SchemaInputComponent() {
|
|
1410
1521
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1522
|
+
_this.requiredLabel = '(required)';
|
|
1523
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
1524
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
1525
|
+
_this.selectClearLabel = 'Clear';
|
|
1526
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
1411
1527
|
_this.editing = false;
|
|
1412
1528
|
return _this;
|
|
1413
1529
|
}
|
|
@@ -1420,17 +1536,17 @@
|
|
|
1420
1536
|
return SchemaInputComponent;
|
|
1421
1537
|
}(BaseSchemaComponent));
|
|
1422
1538
|
SchemaInputComponent.ɵfac = function SchemaInputComponent_Factory(t) { return ɵSchemaInputComponent_BaseFactory(t || SchemaInputComponent); };
|
|
1423
|
-
SchemaInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "row schema-input", 4, "ngIf"], [1, "row", "schema-input"], [1, "col-md-12"], [3, "label", "tooltip", "inputId"], [3, "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) {
|
|
1539
|
+
SchemaInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { requiredLabel: "requiredLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "row schema-input", 4, "ngIf"], [1, "row", "schema-input"], [1, "col-md-12"], [3, "requiredLabel", "label", "tooltip", "inputId"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) {
|
|
1424
1540
|
if (rf & 1) {
|
|
1425
|
-
i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4,
|
|
1426
|
-
i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6,
|
|
1541
|
+
i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 13, "div", 0);
|
|
1542
|
+
i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 12, "div", 0);
|
|
1427
1543
|
}
|
|
1428
1544
|
if (rf & 2) {
|
|
1429
1545
|
i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
|
|
1430
1546
|
i0.ɵɵadvance(1);
|
|
1431
1547
|
i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
|
|
1432
1548
|
}
|
|
1433
|
-
}, directives: [i1.NgIf, FieldRenderComponent, InputRenderComponent, i4.MatTooltip],
|
|
1549
|
+
}, directives: [i1.NgIf, FieldRenderComponent, InputRenderComponent, i4.MatTooltip], styles: [""] });
|
|
1434
1550
|
var ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaInputComponent);
|
|
1435
1551
|
/*@__PURE__*/ (function () {
|
|
1436
1552
|
i0.ɵsetClassMetadata(SchemaInputComponent, [{
|
|
@@ -1440,7 +1556,17 @@
|
|
|
1440
1556
|
templateUrl: 'schema-input.html',
|
|
1441
1557
|
styleUrls: ['./schema-input.scss']
|
|
1442
1558
|
}]
|
|
1443
|
-
}], null, {
|
|
1559
|
+
}], null, { requiredLabel: [{
|
|
1560
|
+
type: i0.Input
|
|
1561
|
+
}], selectPlaceHolderLabel: [{
|
|
1562
|
+
type: i0.Input
|
|
1563
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1564
|
+
type: i0.Input
|
|
1565
|
+
}], selectClearLabel: [{
|
|
1566
|
+
type: i0.Input
|
|
1567
|
+
}], selectNotFoundLabel: [{
|
|
1568
|
+
type: i0.Input
|
|
1569
|
+
}], idPrefix: [{
|
|
1444
1570
|
type: i0.Input
|
|
1445
1571
|
}], schema: [{
|
|
1446
1572
|
type: i0.Input
|
|
@@ -1458,10 +1584,9 @@
|
|
|
1458
1584
|
i0.ɵɵelementStart(1, "div", 6);
|
|
1459
1585
|
i0.ɵɵelementStart(2, "label", 7);
|
|
1460
1586
|
i0.ɵɵtext(3);
|
|
1461
|
-
i0.ɵɵpipe(4, "translate");
|
|
1462
1587
|
i0.ɵɵelementEnd();
|
|
1463
|
-
i0.ɵɵelementStart(
|
|
1464
|
-
i0.ɵɵlistener("modelChange", function
|
|
1588
|
+
i0.ɵɵelementStart(4, "schema-custom-attributes", 8);
|
|
1589
|
+
i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_div_4_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(2); return ctx_r2.model[ctx_r2.schema.id].customAttributes = $event; });
|
|
1465
1590
|
i0.ɵɵelementEnd();
|
|
1466
1591
|
i0.ɵɵelementEnd();
|
|
1467
1592
|
i0.ɵɵelementEnd();
|
|
@@ -1469,9 +1594,9 @@
|
|
|
1469
1594
|
if (rf & 2) {
|
|
1470
1595
|
var ctx_r1 = i0.ɵɵnextContext(2);
|
|
1471
1596
|
i0.ɵɵadvance(3);
|
|
1472
|
-
i0.ɵɵtextInterpolate(
|
|
1473
|
-
i0.ɵɵadvance(
|
|
1474
|
-
i0.ɵɵproperty("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
|
|
1597
|
+
i0.ɵɵtextInterpolate(ctx_r1.additionalAttributesLabel);
|
|
1598
|
+
i0.ɵɵadvance(1);
|
|
1599
|
+
i0.ɵɵproperty("customAttributeRemoveLabel", ctx_r1.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r1.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r1.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r1.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r1.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r1.newCustomFieldCancelLabel)("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
|
|
1475
1600
|
}
|
|
1476
1601
|
}
|
|
1477
1602
|
function SchemaObjectComponent_div_0_Template(rf, ctx) {
|
|
@@ -1484,7 +1609,7 @@
|
|
|
1484
1609
|
i0.ɵɵelementStart(3, "schema-form", 3);
|
|
1485
1610
|
i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_Template_schema_form_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return (ctx_r4.model[ctx_r4.schema.id] = $event); });
|
|
1486
1611
|
i0.ɵɵelementEnd();
|
|
1487
|
-
i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template,
|
|
1612
|
+
i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 5, 9, "div", 4);
|
|
1488
1613
|
i0.ɵɵelementEnd();
|
|
1489
1614
|
}
|
|
1490
1615
|
if (rf & 2) {
|
|
@@ -1492,7 +1617,7 @@
|
|
|
1492
1617
|
i0.ɵɵadvance(2);
|
|
1493
1618
|
i0.ɵɵtextInterpolate(ctx_r0.schema.title);
|
|
1494
1619
|
i0.ɵɵadvance(1);
|
|
1495
|
-
i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
|
|
1620
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
|
|
1496
1621
|
i0.ɵɵadvance(1);
|
|
1497
1622
|
i0.ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
|
|
1498
1623
|
}
|
|
@@ -1501,6 +1626,20 @@
|
|
|
1501
1626
|
__extends(SchemaObjectComponent, _super);
|
|
1502
1627
|
function SchemaObjectComponent() {
|
|
1503
1628
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1629
|
+
_this.requiredLabel = '(required)';
|
|
1630
|
+
_this.addItemLabel = 'Add Item';
|
|
1631
|
+
_this.addLoopLabel = 'Add Loop';
|
|
1632
|
+
_this.additionalAttributesLabel = 'Additional Fields';
|
|
1633
|
+
_this.customAttributeRemoveLabel = 'Remove';
|
|
1634
|
+
_this.newCustomFieldNameLabel = 'Name';
|
|
1635
|
+
_this.newCustomFieldValueLabel = 'Value';
|
|
1636
|
+
_this.newCustomFieldAddLabel = 'Add';
|
|
1637
|
+
_this.newCustomFieldSaveLabel = 'Save';
|
|
1638
|
+
_this.newCustomFieldCancelLabel = 'Cancel';
|
|
1639
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
1640
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
1641
|
+
_this.selectClearLabel = 'Clear';
|
|
1642
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
1504
1643
|
_this.editing = false;
|
|
1505
1644
|
_this.onDropEvent = new i0.EventEmitter();
|
|
1506
1645
|
_this.loaded = false;
|
|
@@ -1519,14 +1658,14 @@
|
|
|
1519
1658
|
return SchemaObjectComponent;
|
|
1520
1659
|
}(BaseSchemaComponent));
|
|
1521
1660
|
SchemaObjectComponent.ɵfac = function SchemaObjectComponent_Factory(t) { return ɵSchemaObjectComponent_BaseFactory(t || SchemaObjectComponent); };
|
|
1522
|
-
SchemaObjectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], inputs: { idPrefix: "idPrefix", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing", index: "index" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-object-container", 4, "ngIf"], [1, "schema-object-container"], [1, "schema-object-title"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) {
|
|
1661
|
+
SchemaObjectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing", index: "index" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-object-container", 4, "ngIf"], [1, "schema-object-container"], [1, "schema-object-title"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) {
|
|
1523
1662
|
if (rf & 1) {
|
|
1524
|
-
i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5,
|
|
1663
|
+
i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 20, "div", 0);
|
|
1525
1664
|
}
|
|
1526
1665
|
if (rf & 2) {
|
|
1527
1666
|
i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
|
|
1528
1667
|
}
|
|
1529
|
-
}, directives: [i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent],
|
|
1668
|
+
}, directives: [i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], styles: [".schema-object-container[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:5px;margin-bottom:10px;margin-top:10px;padding:10px}.schema-object-container[_ngcontent-%COMP%] .schema-object-title[_ngcontent-%COMP%]{background:#eee;border-bottom:1px solid #ddd;font-weight:700;margin-left:-10px;margin-top:-10px;padding:10px;width:calc(100% + 20px)}"] });
|
|
1530
1669
|
var ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaObjectComponent);
|
|
1531
1670
|
/*@__PURE__*/ (function () {
|
|
1532
1671
|
i0.ɵsetClassMetadata(SchemaObjectComponent, [{
|
|
@@ -1536,7 +1675,35 @@
|
|
|
1536
1675
|
templateUrl: 'schema-object.html',
|
|
1537
1676
|
styleUrls: ['./schema-object.scss']
|
|
1538
1677
|
}]
|
|
1539
|
-
}], null, {
|
|
1678
|
+
}], null, { requiredLabel: [{
|
|
1679
|
+
type: i0.Input
|
|
1680
|
+
}], addItemLabel: [{
|
|
1681
|
+
type: i0.Input
|
|
1682
|
+
}], addLoopLabel: [{
|
|
1683
|
+
type: i0.Input
|
|
1684
|
+
}], additionalAttributesLabel: [{
|
|
1685
|
+
type: i0.Input
|
|
1686
|
+
}], customAttributeRemoveLabel: [{
|
|
1687
|
+
type: i0.Input
|
|
1688
|
+
}], newCustomFieldNameLabel: [{
|
|
1689
|
+
type: i0.Input
|
|
1690
|
+
}], newCustomFieldValueLabel: [{
|
|
1691
|
+
type: i0.Input
|
|
1692
|
+
}], newCustomFieldAddLabel: [{
|
|
1693
|
+
type: i0.Input
|
|
1694
|
+
}], newCustomFieldSaveLabel: [{
|
|
1695
|
+
type: i0.Input
|
|
1696
|
+
}], newCustomFieldCancelLabel: [{
|
|
1697
|
+
type: i0.Input
|
|
1698
|
+
}], selectPlaceHolderLabel: [{
|
|
1699
|
+
type: i0.Input
|
|
1700
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1701
|
+
type: i0.Input
|
|
1702
|
+
}], selectClearLabel: [{
|
|
1703
|
+
type: i0.Input
|
|
1704
|
+
}], selectNotFoundLabel: [{
|
|
1705
|
+
type: i0.Input
|
|
1706
|
+
}], idPrefix: [{
|
|
1540
1707
|
type: i0.Input
|
|
1541
1708
|
}], modelPropertiesPath: [{
|
|
1542
1709
|
type: i0.Input
|
|
@@ -1568,8 +1735,7 @@
|
|
|
1568
1735
|
}());
|
|
1569
1736
|
|
|
1570
1737
|
var SchemaFieldsService = /** @class */ (function () {
|
|
1571
|
-
function SchemaFieldsService(
|
|
1572
|
-
this.translate = translate;
|
|
1738
|
+
function SchemaFieldsService() {
|
|
1573
1739
|
}
|
|
1574
1740
|
SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model) {
|
|
1575
1741
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1643,7 +1809,10 @@
|
|
|
1643
1809
|
for (_a = __values(structValidation.emptyFields), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
1644
1810
|
field = _b.value;
|
|
1645
1811
|
fieldName = field.title || field.id;
|
|
1646
|
-
errors.push(
|
|
1812
|
+
errors.push({
|
|
1813
|
+
type: 'emptyFields',
|
|
1814
|
+
fieldName: fieldName
|
|
1815
|
+
});
|
|
1647
1816
|
}
|
|
1648
1817
|
}
|
|
1649
1818
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -1657,7 +1826,11 @@
|
|
|
1657
1826
|
for (_c = __values(structValidation.invalidMinLengthFields), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1658
1827
|
field = _d.value;
|
|
1659
1828
|
fieldName = field.title || field.id;
|
|
1660
|
-
errors.push(
|
|
1829
|
+
errors.push({
|
|
1830
|
+
type: 'invalidMinLengthFields',
|
|
1831
|
+
fieldName: fieldName,
|
|
1832
|
+
minLength: field.minLength
|
|
1833
|
+
});
|
|
1661
1834
|
}
|
|
1662
1835
|
}
|
|
1663
1836
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
@@ -1671,7 +1844,11 @@
|
|
|
1671
1844
|
for (_e = __values(structValidation.invalidMaxLengthFields), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1672
1845
|
field = _f.value;
|
|
1673
1846
|
fieldName = field.title || field.id;
|
|
1674
|
-
errors.push(
|
|
1847
|
+
errors.push({
|
|
1848
|
+
type: 'invalidMaxLengthFields',
|
|
1849
|
+
fieldName: fieldName,
|
|
1850
|
+
maxLength: field.maxLength
|
|
1851
|
+
});
|
|
1675
1852
|
}
|
|
1676
1853
|
}
|
|
1677
1854
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
@@ -1687,12 +1864,12 @@
|
|
|
1687
1864
|
};
|
|
1688
1865
|
return SchemaFieldsService;
|
|
1689
1866
|
}());
|
|
1690
|
-
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(
|
|
1867
|
+
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(); };
|
|
1691
1868
|
SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
|
|
1692
1869
|
/*@__PURE__*/ (function () {
|
|
1693
1870
|
i0.ɵsetClassMetadata(SchemaFieldsService, [{
|
|
1694
1871
|
type: i0.Injectable
|
|
1695
|
-
}], function () { return [
|
|
1872
|
+
}], function () { return []; }, null);
|
|
1696
1873
|
})();
|
|
1697
1874
|
|
|
1698
1875
|
function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) {
|
|
@@ -1702,10 +1879,9 @@
|
|
|
1702
1879
|
i0.ɵɵelementStart(1, "div", 7);
|
|
1703
1880
|
i0.ɵɵelementStart(2, "label", 8);
|
|
1704
1881
|
i0.ɵɵtext(3);
|
|
1705
|
-
i0.ɵɵpipe(4, "translate");
|
|
1706
1882
|
i0.ɵɵelementEnd();
|
|
1707
|
-
i0.ɵɵelementStart(
|
|
1708
|
-
i0.ɵɵlistener("modelChange", function
|
|
1883
|
+
i0.ɵɵelementStart(4, "schema-custom-attributes", 9);
|
|
1884
|
+
i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_div_2_div_1_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(3); return ctx_r5.model.customAttributes = $event; });
|
|
1709
1885
|
i0.ɵɵelementEnd();
|
|
1710
1886
|
i0.ɵɵelementEnd();
|
|
1711
1887
|
i0.ɵɵelementEnd();
|
|
@@ -1713,15 +1889,15 @@
|
|
|
1713
1889
|
if (rf & 2) {
|
|
1714
1890
|
var ctx_r4 = i0.ɵɵnextContext(3);
|
|
1715
1891
|
i0.ɵɵadvance(3);
|
|
1716
|
-
i0.ɵɵtextInterpolate(
|
|
1717
|
-
i0.ɵɵadvance(
|
|
1718
|
-
i0.ɵɵproperty("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
|
|
1892
|
+
i0.ɵɵtextInterpolate(ctx_r4.additionalAttributesLabel);
|
|
1893
|
+
i0.ɵɵadvance(1);
|
|
1894
|
+
i0.ɵɵproperty("customAttributeRemoveLabel", ctx_r4.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r4.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r4.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r4.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r4.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r4.newCustomFieldCancelLabel)("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
|
|
1719
1895
|
}
|
|
1720
1896
|
}
|
|
1721
1897
|
function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) {
|
|
1722
1898
|
if (rf & 1) {
|
|
1723
1899
|
i0.ɵɵelementStart(0, "div", 4);
|
|
1724
|
-
i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template,
|
|
1900
|
+
i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 5, 9, "div", 5);
|
|
1725
1901
|
i0.ɵɵelementEnd();
|
|
1726
1902
|
}
|
|
1727
1903
|
if (rf & 2) {
|
|
@@ -1743,7 +1919,7 @@
|
|
|
1743
1919
|
if (rf & 2) {
|
|
1744
1920
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
1745
1921
|
i0.ɵɵadvance(1);
|
|
1746
|
-
i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
|
|
1922
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
|
|
1747
1923
|
i0.ɵɵadvance(1);
|
|
1748
1924
|
i0.ɵɵproperty("ngForOf", ctx_r0.schemas);
|
|
1749
1925
|
}
|
|
@@ -1752,6 +1928,20 @@
|
|
|
1752
1928
|
__extends(SchemaFormRenderComponent, _super);
|
|
1753
1929
|
function SchemaFormRenderComponent() {
|
|
1754
1930
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1931
|
+
_this.requiredLabel = '(required)';
|
|
1932
|
+
_this.addItemLabel = 'Add Item';
|
|
1933
|
+
_this.addLoopLabel = 'Add Loop';
|
|
1934
|
+
_this.additionalAttributesLabel = 'Additional Fields';
|
|
1935
|
+
_this.customAttributeRemoveLabel = 'Remove';
|
|
1936
|
+
_this.newCustomFieldNameLabel = 'Name';
|
|
1937
|
+
_this.newCustomFieldValueLabel = 'Value';
|
|
1938
|
+
_this.newCustomFieldAddLabel = 'Add';
|
|
1939
|
+
_this.newCustomFieldSaveLabel = 'Save';
|
|
1940
|
+
_this.newCustomFieldCancelLabel = 'Cancel';
|
|
1941
|
+
_this.selectPlaceHolderLabel = 'Select Item';
|
|
1942
|
+
_this.selectSearchPlaceHolderLabel = 'Search';
|
|
1943
|
+
_this.selectClearLabel = 'Clear';
|
|
1944
|
+
_this.selectNotFoundLabel = 'No Items Found';
|
|
1755
1945
|
_this.schemas = [];
|
|
1756
1946
|
_this.customProperties = false;
|
|
1757
1947
|
_this.editing = false;
|
|
@@ -1770,14 +1960,14 @@
|
|
|
1770
1960
|
return SchemaFormRenderComponent;
|
|
1771
1961
|
}(BaseSchemaComponent));
|
|
1772
1962
|
SchemaFormRenderComponent.ɵfac = function SchemaFormRenderComponent_Factory(t) { return ɵSchemaFormRenderComponent_BaseFactory(t || SchemaFormRenderComponent); };
|
|
1773
|
-
SchemaFormRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], inputs: { idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema", 4, "ngIf"], [1, "schema"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) {
|
|
1963
|
+
SchemaFormRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema", 4, "ngIf"], [1, "schema"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) {
|
|
1774
1964
|
if (rf & 1) {
|
|
1775
|
-
i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3,
|
|
1965
|
+
i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 19, "div", 0);
|
|
1776
1966
|
}
|
|
1777
1967
|
if (rf & 2) {
|
|
1778
1968
|
i0.ɵɵproperty("ngIf", ctx.loaded);
|
|
1779
1969
|
}
|
|
1780
|
-
}, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent],
|
|
1970
|
+
}, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
|
|
1781
1971
|
var ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent);
|
|
1782
1972
|
/*@__PURE__*/ (function () {
|
|
1783
1973
|
i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
|
|
@@ -1787,7 +1977,35 @@
|
|
|
1787
1977
|
templateUrl: 'schema-form-render.html',
|
|
1788
1978
|
styleUrls: ['./schema-form-render.scss']
|
|
1789
1979
|
}]
|
|
1790
|
-
}], null, {
|
|
1980
|
+
}], null, { requiredLabel: [{
|
|
1981
|
+
type: i0.Input
|
|
1982
|
+
}], addItemLabel: [{
|
|
1983
|
+
type: i0.Input
|
|
1984
|
+
}], addLoopLabel: [{
|
|
1985
|
+
type: i0.Input
|
|
1986
|
+
}], additionalAttributesLabel: [{
|
|
1987
|
+
type: i0.Input
|
|
1988
|
+
}], customAttributeRemoveLabel: [{
|
|
1989
|
+
type: i0.Input
|
|
1990
|
+
}], newCustomFieldNameLabel: [{
|
|
1991
|
+
type: i0.Input
|
|
1992
|
+
}], newCustomFieldValueLabel: [{
|
|
1993
|
+
type: i0.Input
|
|
1994
|
+
}], newCustomFieldAddLabel: [{
|
|
1995
|
+
type: i0.Input
|
|
1996
|
+
}], newCustomFieldSaveLabel: [{
|
|
1997
|
+
type: i0.Input
|
|
1998
|
+
}], newCustomFieldCancelLabel: [{
|
|
1999
|
+
type: i0.Input
|
|
2000
|
+
}], selectPlaceHolderLabel: [{
|
|
2001
|
+
type: i0.Input
|
|
2002
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
2003
|
+
type: i0.Input
|
|
2004
|
+
}], selectClearLabel: [{
|
|
2005
|
+
type: i0.Input
|
|
2006
|
+
}], selectNotFoundLabel: [{
|
|
2007
|
+
type: i0.Input
|
|
2008
|
+
}], idPrefix: [{
|
|
1791
2009
|
type: i0.Input
|
|
1792
2010
|
}], schemas: [{
|
|
1793
2011
|
type: i0.Input
|
|
@@ -1800,6 +2018,121 @@
|
|
|
1800
2018
|
}] });
|
|
1801
2019
|
})();
|
|
1802
2020
|
|
|
2021
|
+
var TypeScriptCompileBase = /** @class */ (function () {
|
|
2022
|
+
function TypeScriptCompileBase() {
|
|
2023
|
+
}
|
|
2024
|
+
TypeScriptCompileBase.prototype.getTranslate = function (text) {
|
|
2025
|
+
return text;
|
|
2026
|
+
};
|
|
2027
|
+
TypeScriptCompileBase.prototype.addItemToFormProperties = function (formProperties, item, key) {
|
|
2028
|
+
this.translateProperties(item);
|
|
2029
|
+
if (item.minLength && item.minLength > 0) {
|
|
2030
|
+
formProperties[key] = new i3.FormControl([null, [i3.Validators.required]]);
|
|
2031
|
+
}
|
|
2032
|
+
else {
|
|
2033
|
+
formProperties[key] = new i3.FormControl([null]);
|
|
2034
|
+
}
|
|
2035
|
+
};
|
|
2036
|
+
TypeScriptCompileBase.prototype.compileProperties = function (input) {
|
|
2037
|
+
var compiledProperties = [];
|
|
2038
|
+
var formProperties = {};
|
|
2039
|
+
var inputData = {};
|
|
2040
|
+
var inputToCompile = JSON.parse(JSON.stringify(input));
|
|
2041
|
+
this.translateProperties(inputToCompile);
|
|
2042
|
+
if (inputToCompile.properties) {
|
|
2043
|
+
if (inputToCompile.type === 'array') {
|
|
2044
|
+
inputData = [];
|
|
2045
|
+
}
|
|
2046
|
+
if (inputToCompile.type === 'object') {
|
|
2047
|
+
inputData = {};
|
|
2048
|
+
}
|
|
2049
|
+
inputToCompile.id = 'inputData';
|
|
2050
|
+
this.proccessProperties(inputToCompile, formProperties, 'inputData');
|
|
2051
|
+
this.translateProperties(inputToCompile);
|
|
2052
|
+
compiledProperties.push(inputToCompile);
|
|
2053
|
+
}
|
|
2054
|
+
else if (inputToCompile.type === 'array') {
|
|
2055
|
+
inputToCompile.id = 'inputData';
|
|
2056
|
+
inputData = [];
|
|
2057
|
+
this.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
|
|
2058
|
+
compiledProperties.push(inputToCompile);
|
|
2059
|
+
}
|
|
2060
|
+
else if (!inputToCompile.type) {
|
|
2061
|
+
for (var index = 0; index < Object.keys(inputToCompile).length; index++) {
|
|
2062
|
+
var key = Object.keys(inputToCompile)[index];
|
|
2063
|
+
var item = inputToCompile[key];
|
|
2064
|
+
item.id = key;
|
|
2065
|
+
if (item.type === 'array') {
|
|
2066
|
+
inputData[item.id] = [];
|
|
2067
|
+
}
|
|
2068
|
+
if (item.type === 'object') {
|
|
2069
|
+
inputData[item.id] = {};
|
|
2070
|
+
}
|
|
2071
|
+
this.proccessProperties(item, formProperties, key);
|
|
2072
|
+
this.translateProperties(item);
|
|
2073
|
+
compiledProperties.push(item);
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
compiledProperties.sort(function (a, b) { return a.propertyOrder - b.propertyOrder; });
|
|
2077
|
+
return { compiledProperties: compiledProperties, formProperties: formProperties, inputData: inputData };
|
|
2078
|
+
};
|
|
2079
|
+
TypeScriptCompileBase.prototype.translateProperties = function (input) {
|
|
2080
|
+
var _this = this;
|
|
2081
|
+
if (input === null || input === void 0 ? void 0 : input.title) {
|
|
2082
|
+
input.title = this.getTranslate(input.title);
|
|
2083
|
+
}
|
|
2084
|
+
if (input === null || input === void 0 ? void 0 : input.description) {
|
|
2085
|
+
input.description = this.getTranslate(input.description);
|
|
2086
|
+
}
|
|
2087
|
+
if ((input === null || input === void 0 ? void 0 : input.options) instanceof Array) {
|
|
2088
|
+
input === null || input === void 0 ? void 0 : input.options.forEach(function (option) { return option.value = _this.getTranslate(option.value); });
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
TypeScriptCompileBase.prototype.proccessProperties = function (item, formProperties, key) {
|
|
2092
|
+
this.translateProperties(item);
|
|
2093
|
+
if (this.hasProperties(item)) {
|
|
2094
|
+
var arFieldsChild = [];
|
|
2095
|
+
for (var indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
|
|
2096
|
+
var keyChild = Object.keys(item.properties)[indexChild];
|
|
2097
|
+
var itemChild = item.properties[keyChild];
|
|
2098
|
+
itemChild.id = keyChild;
|
|
2099
|
+
if (this.hasProperties(itemChild)) {
|
|
2100
|
+
this.proccessProperties(itemChild, formProperties, keyChild);
|
|
2101
|
+
arFieldsChild.push(itemChild);
|
|
2102
|
+
}
|
|
2103
|
+
else {
|
|
2104
|
+
this.addItemToFormProperties(formProperties, itemChild, keyChild);
|
|
2105
|
+
arFieldsChild.push(itemChild);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
item.properties = arFieldsChild;
|
|
2109
|
+
}
|
|
2110
|
+
else {
|
|
2111
|
+
this.addItemToFormProperties(formProperties, item, key);
|
|
2112
|
+
}
|
|
2113
|
+
};
|
|
2114
|
+
TypeScriptCompileBase.prototype.hasProperties = function (item) {
|
|
2115
|
+
return item.type === 'object' || (item.type === 'array' && item.properties);
|
|
2116
|
+
};
|
|
2117
|
+
return TypeScriptCompileBase;
|
|
2118
|
+
}());
|
|
2119
|
+
TypeScriptCompileBase.ɵfac = function TypeScriptCompileBase_Factory(t) { return new (t || TypeScriptCompileBase)(); };
|
|
2120
|
+
TypeScriptCompileBase.ɵprov = i0.ɵɵdefineInjectable({ token: TypeScriptCompileBase, factory: TypeScriptCompileBase.ɵfac, providedIn: 'root' });
|
|
2121
|
+
/*@__PURE__*/ (function () {
|
|
2122
|
+
i0.ɵsetClassMetadata(TypeScriptCompileBase, [{
|
|
2123
|
+
type: i0.Injectable,
|
|
2124
|
+
args: [{ providedIn: 'root' }]
|
|
2125
|
+
}], null, null);
|
|
2126
|
+
})();
|
|
2127
|
+
function APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY(parentIntl) {
|
|
2128
|
+
return parentIntl || new TypeScriptCompileBase();
|
|
2129
|
+
}
|
|
2130
|
+
var APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER = {
|
|
2131
|
+
provide: TypeScriptCompileBase,
|
|
2132
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), TypeScriptCompileBase]],
|
|
2133
|
+
useFactory: APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY,
|
|
2134
|
+
};
|
|
2135
|
+
|
|
1803
2136
|
var SchemaFormRenderModule = /** @class */ (function () {
|
|
1804
2137
|
function SchemaFormRenderModule() {
|
|
1805
2138
|
}
|
|
@@ -1807,14 +2140,14 @@
|
|
|
1807
2140
|
}());
|
|
1808
2141
|
SchemaFormRenderModule.ɵmod = i0.ɵɵdefineNgModule({ type: SchemaFormRenderModule });
|
|
1809
2142
|
SchemaFormRenderModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SchemaFormRenderModule_Factory(t) { return new (t || SchemaFormRenderModule)(); }, providers: [
|
|
1810
|
-
SchemaFieldsService
|
|
2143
|
+
SchemaFieldsService,
|
|
2144
|
+
APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER
|
|
1811
2145
|
], imports: [[
|
|
1812
2146
|
i1.CommonModule,
|
|
1813
2147
|
i2.DndModule,
|
|
1814
2148
|
i3.FormsModule,
|
|
1815
2149
|
i4.MatTooltipModule,
|
|
1816
|
-
i7.
|
|
1817
|
-
i8.InputsModule
|
|
2150
|
+
i7.InputsModule
|
|
1818
2151
|
]] });
|
|
1819
2152
|
(function () {
|
|
1820
2153
|
(typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
|
|
@@ -1831,8 +2164,7 @@
|
|
|
1831
2164
|
i2.DndModule,
|
|
1832
2165
|
i3.FormsModule,
|
|
1833
2166
|
i4.MatTooltipModule,
|
|
1834
|
-
i7.
|
|
1835
|
-
i8.InputsModule], exports: [ArraySessionComponent,
|
|
2167
|
+
i7.InputsModule], exports: [ArraySessionComponent,
|
|
1836
2168
|
SchemaArrayComponent,
|
|
1837
2169
|
FieldRenderComponent,
|
|
1838
2170
|
InputRenderComponent,
|
|
@@ -1853,8 +2185,7 @@
|
|
|
1853
2185
|
i2.DndModule,
|
|
1854
2186
|
i3.FormsModule,
|
|
1855
2187
|
i4.MatTooltipModule,
|
|
1856
|
-
i7.
|
|
1857
|
-
i8.InputsModule
|
|
2188
|
+
i7.InputsModule
|
|
1858
2189
|
],
|
|
1859
2190
|
declarations: [
|
|
1860
2191
|
ArraySessionComponent,
|
|
@@ -1883,12 +2214,13 @@
|
|
|
1883
2214
|
SchemaCustomAttributesComponent
|
|
1884
2215
|
],
|
|
1885
2216
|
providers: [
|
|
1886
|
-
SchemaFieldsService
|
|
2217
|
+
SchemaFieldsService,
|
|
2218
|
+
APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER
|
|
1887
2219
|
]
|
|
1888
2220
|
}]
|
|
1889
2221
|
}], null, null);
|
|
1890
2222
|
})();
|
|
1891
|
-
i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.
|
|
2223
|
+
i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.SelectBoxComponent, i7.SelectEnumComponent, i7.InputTextComponent, i7.InputPasswordComponent, i7.InputAvatarComponent, i7.InputFileComponent, i7.CustomSelectComponent, i7.FieldComponent, ArraySessionComponent,
|
|
1892
2224
|
SchemaArrayComponent,
|
|
1893
2225
|
FieldRenderComponent,
|
|
1894
2226
|
InputRenderComponent,
|
|
@@ -1898,91 +2230,14 @@
|
|
|
1898
2230
|
SchemaObjectComponent,
|
|
1899
2231
|
SchemaFormRenderComponent,
|
|
1900
2232
|
SchemaFormComponent,
|
|
1901
|
-
SchemaCustomAttributesComponent], [i1.AsyncPipe, i1.UpperCasePipe, i1.LowerCasePipe, i1.JsonPipe, i1.SlicePipe, i1.DecimalPipe, i1.PercentPipe, i1.TitleCasePipe, i1.CurrencyPipe, i1.DatePipe, i1.I18nPluralPipe, i1.I18nSelectPipe, i1.KeyValuePipe
|
|
1902
|
-
|
|
1903
|
-
var TypeScriptCompile = /** @class */ (function () {
|
|
1904
|
-
function TypeScriptCompile() {
|
|
1905
|
-
}
|
|
1906
|
-
TypeScriptCompile.addItemToFormProperties = function (formProperties, item, key) {
|
|
1907
|
-
if (item.minLength && item.minLength > 0) {
|
|
1908
|
-
formProperties[key] = new i3.FormControl([null, [i3.Validators.required]]);
|
|
1909
|
-
}
|
|
1910
|
-
else {
|
|
1911
|
-
formProperties[key] = new i3.FormControl([null]);
|
|
1912
|
-
}
|
|
1913
|
-
};
|
|
1914
|
-
TypeScriptCompile.compileProperties = function (input) {
|
|
1915
|
-
var compiledProperties = [];
|
|
1916
|
-
var formProperties = {};
|
|
1917
|
-
var inputData = {};
|
|
1918
|
-
var inputToCompile = JSON.parse(JSON.stringify(input));
|
|
1919
|
-
if (inputToCompile.properties) {
|
|
1920
|
-
if (inputToCompile.type === 'array') {
|
|
1921
|
-
inputData = [];
|
|
1922
|
-
}
|
|
1923
|
-
if (inputToCompile.type === 'object') {
|
|
1924
|
-
inputData = {};
|
|
1925
|
-
}
|
|
1926
|
-
inputToCompile.id = 'inputData';
|
|
1927
|
-
this.proccessProperties(inputToCompile, formProperties, 'inputData');
|
|
1928
|
-
compiledProperties.push(inputToCompile);
|
|
1929
|
-
}
|
|
1930
|
-
else if (inputToCompile.type === 'array') {
|
|
1931
|
-
inputToCompile.id = 'inputData';
|
|
1932
|
-
inputData = [];
|
|
1933
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
|
|
1934
|
-
compiledProperties.push(inputToCompile);
|
|
1935
|
-
}
|
|
1936
|
-
else if (!inputToCompile.type) {
|
|
1937
|
-
for (var index = 0; index < Object.keys(inputToCompile).length; index++) {
|
|
1938
|
-
var key = Object.keys(inputToCompile)[index];
|
|
1939
|
-
var item = inputToCompile[key];
|
|
1940
|
-
item.id = key;
|
|
1941
|
-
if (item.type === 'array') {
|
|
1942
|
-
inputData[item.id] = [];
|
|
1943
|
-
}
|
|
1944
|
-
if (item.type === 'object') {
|
|
1945
|
-
inputData[item.id] = {};
|
|
1946
|
-
}
|
|
1947
|
-
this.proccessProperties(item, formProperties, key);
|
|
1948
|
-
compiledProperties.push(item);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
compiledProperties.sort(function (a, b) { return a.propertyOrder - b.propertyOrder; });
|
|
1952
|
-
return { compiledProperties: compiledProperties, formProperties: formProperties, inputData: inputData };
|
|
1953
|
-
};
|
|
1954
|
-
TypeScriptCompile.proccessProperties = function (item, formProperties, key) {
|
|
1955
|
-
if (this.hasProperties(item)) {
|
|
1956
|
-
var arFieldsChild = [];
|
|
1957
|
-
for (var indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
|
|
1958
|
-
var keyChild = Object.keys(item.properties)[indexChild];
|
|
1959
|
-
var itemChild = item.properties[keyChild];
|
|
1960
|
-
itemChild.id = keyChild;
|
|
1961
|
-
if (this.hasProperties(itemChild)) {
|
|
1962
|
-
this.proccessProperties(itemChild, formProperties, keyChild);
|
|
1963
|
-
arFieldsChild.push(itemChild);
|
|
1964
|
-
}
|
|
1965
|
-
else {
|
|
1966
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, itemChild, keyChild);
|
|
1967
|
-
arFieldsChild.push(itemChild);
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
item.properties = arFieldsChild;
|
|
1971
|
-
}
|
|
1972
|
-
else {
|
|
1973
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, item, key);
|
|
1974
|
-
}
|
|
1975
|
-
};
|
|
1976
|
-
TypeScriptCompile.hasProperties = function (item) {
|
|
1977
|
-
return item.type === 'object' || (item.type === 'array' && item.properties);
|
|
1978
|
-
};
|
|
1979
|
-
return TypeScriptCompile;
|
|
1980
|
-
}());
|
|
2233
|
+
SchemaCustomAttributesComponent], [i1.AsyncPipe, i1.UpperCasePipe, i1.LowerCasePipe, i1.JsonPipe, i1.SlicePipe, i1.DecimalPipe, i1.PercentPipe, i1.TitleCasePipe, i1.CurrencyPipe, i1.DatePipe, i1.I18nPluralPipe, i1.I18nSelectPipe, i1.KeyValuePipe]);
|
|
1981
2234
|
|
|
1982
2235
|
/**
|
|
1983
2236
|
* Generated bundle index. Do not edit.
|
|
1984
2237
|
*/
|
|
1985
2238
|
|
|
2239
|
+
exports.APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY = APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY;
|
|
2240
|
+
exports.APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER = APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER;
|
|
1986
2241
|
exports.ArraySessionComponent = ArraySessionComponent;
|
|
1987
2242
|
exports.BaseSchemaComponent = BaseSchemaComponent;
|
|
1988
2243
|
exports.BooleanInputComponent = BooleanInputComponent;
|
|
@@ -1998,7 +2253,7 @@
|
|
|
1998
2253
|
exports.SchemaInputComponent = SchemaInputComponent;
|
|
1999
2254
|
exports.SchemaObjectComponent = SchemaObjectComponent;
|
|
2000
2255
|
exports.SchemaValidationField = SchemaValidationField;
|
|
2001
|
-
exports.
|
|
2256
|
+
exports.TypeScriptCompileBase = TypeScriptCompileBase;
|
|
2002
2257
|
|
|
2003
2258
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2004
2259
|
|