@mtna/web-form-angular 1.0.6-SNAPSHOT.7 → 1.0.6-SNAPSHOT.9
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/mtna-web-form-angular.umd.js +21 -47
- package/bundles/mtna-web-form-angular.umd.js.map +1 -1
- package/esm2015/lib/components/form-item-impl/repeatable-item-container/repeatable-item-container.component.js +2 -3
- package/esm2015/lib/components/form-item-impl/repeatable-item-container/repeatable-item-container.module.js +1 -5
- package/esm2015/lib/components/form-item-injector/form-item-injector.component.js +22 -3
- package/esm2015/lib/pipes/index.js +1 -2
- package/fesm2015/mtna-web-form-angular.js +22 -40
- package/fesm2015/mtna-web-form-angular.js.map +1 -1
- package/lib/components/form-item-impl/repeatable-item-container/repeatable-item-container.module.d.ts +2 -3
- package/lib/components/form-item-injector/form-item-injector.component.d.ts +4 -0
- package/lib/pipes/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2015/lib/pipes/coerce-form-item.pipe.js +0 -36
- package/lib/pipes/coerce-form-item.pipe.d.ts +0 -14
|
@@ -4440,6 +4440,9 @@
|
|
|
4440
4440
|
},
|
|
4441
4441
|
set: function (value) {
|
|
4442
4442
|
this._item = value;
|
|
4443
|
+
if (this.wfItemComponent) {
|
|
4444
|
+
this.reset();
|
|
4445
|
+
}
|
|
4443
4446
|
},
|
|
4444
4447
|
enumerable: false,
|
|
4445
4448
|
configurable: true
|
|
@@ -4474,6 +4477,20 @@
|
|
|
4474
4477
|
enumerable: false,
|
|
4475
4478
|
configurable: true
|
|
4476
4479
|
});
|
|
4480
|
+
MtnaWfItemInjector.prototype.reset = function () {
|
|
4481
|
+
var _a, _b, _c;
|
|
4482
|
+
if (coreTs.isPresent(this.focusedSectionSubscription)) {
|
|
4483
|
+
(_a = this.focusedSectionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
4484
|
+
this.focusedSectionSubscription = undefined;
|
|
4485
|
+
}
|
|
4486
|
+
if (coreTs.isPresent(this.toggleFormItemsSubscription)) {
|
|
4487
|
+
(_b = this.toggleFormItemsSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
4488
|
+
this.toggleFormItemsSubscription = undefined;
|
|
4489
|
+
}
|
|
4490
|
+
(_c = this.componentRef) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
4491
|
+
this.wfItemComponent = undefined;
|
|
4492
|
+
this.ngOnInit();
|
|
4493
|
+
};
|
|
4477
4494
|
MtnaWfItemInjector.prototype.ngOnInit = function () {
|
|
4478
4495
|
if (this.item) {
|
|
4479
4496
|
_super.prototype.ngOnInit.call(this);
|
|
@@ -4481,6 +4498,7 @@
|
|
|
4481
4498
|
};
|
|
4482
4499
|
MtnaWfItemInjector.prototype.configureComponent = function (componentRef) {
|
|
4483
4500
|
var _this = this;
|
|
4501
|
+
this.componentRef = componentRef;
|
|
4484
4502
|
this.wfItemComponent = componentRef.instance;
|
|
4485
4503
|
this.wfItemComponent.header = this.header;
|
|
4486
4504
|
this._indicatorStatus.subscribe(function (status) {
|
|
@@ -4499,7 +4517,7 @@
|
|
|
4499
4517
|
if (this.wfItemComponent instanceof MtnaWfBaseParentValueItem) {
|
|
4500
4518
|
this.wfItemComponent.parentIds = this.parentIds;
|
|
4501
4519
|
// added output to remove ui service from base components
|
|
4502
|
-
this.wfItemComponent.toggleFormItems.subscribe(function (data) {
|
|
4520
|
+
this.toggleFormItemsSubscription = this.wfItemComponent.toggleFormItems.subscribe(function (data) {
|
|
4503
4521
|
_this.toggleFormItems.emit(data);
|
|
4504
4522
|
});
|
|
4505
4523
|
if (this.wfItemComponent instanceof MtnaWfBaseSingleSelectionParentValueItem) {
|
|
@@ -4512,7 +4530,7 @@
|
|
|
4512
4530
|
this.wfItemComponent.parentIds = this.parentIds;
|
|
4513
4531
|
if (this.wfItemComponent instanceof MtnaWfBaseSectionItem) {
|
|
4514
4532
|
this.wfItemComponent.step = this.step;
|
|
4515
|
-
this.wfItemComponent.focused.subscribe(function (step) {
|
|
4533
|
+
this.focusedSectionSubscription = this.wfItemComponent.focused.subscribe(function (step) {
|
|
4516
4534
|
_this.focusedSection.emit(step);
|
|
4517
4535
|
});
|
|
4518
4536
|
}
|
|
@@ -5089,45 +5107,6 @@
|
|
|
5089
5107
|
}]
|
|
5090
5108
|
}] });
|
|
5091
5109
|
|
|
5092
|
-
var MtnaWfCoerceFormItemPipe = /** @class */ (function () {
|
|
5093
|
-
function MtnaWfCoerceFormItemPipe() {
|
|
5094
|
-
}
|
|
5095
|
-
MtnaWfCoerceFormItemPipe.prototype.transform = function (item) {
|
|
5096
|
-
var formItem = undefined;
|
|
5097
|
-
if (this.instanceOfFormItem(item)) {
|
|
5098
|
-
formItem = item;
|
|
5099
|
-
}
|
|
5100
|
-
return formItem;
|
|
5101
|
-
};
|
|
5102
|
-
MtnaWfCoerceFormItemPipe.prototype.instanceOfFormItem = function (something) {
|
|
5103
|
-
return coreTs.isType(something, 'instanceId', 'itemId', 'name', 'required', 'templateId');
|
|
5104
|
-
};
|
|
5105
|
-
return MtnaWfCoerceFormItemPipe;
|
|
5106
|
-
}());
|
|
5107
|
-
MtnaWfCoerceFormItemPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
5108
|
-
MtnaWfCoerceFormItemPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipe, name: "coerceFormItem" });
|
|
5109
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipe, decorators: [{
|
|
5110
|
-
type: i0.Pipe,
|
|
5111
|
-
args: [{
|
|
5112
|
-
name: 'coerceFormItem',
|
|
5113
|
-
}]
|
|
5114
|
-
}] });
|
|
5115
|
-
var MtnaWfCoerceFormItemPipeModule = /** @class */ (function () {
|
|
5116
|
-
function MtnaWfCoerceFormItemPipeModule() {
|
|
5117
|
-
}
|
|
5118
|
-
return MtnaWfCoerceFormItemPipeModule;
|
|
5119
|
-
}());
|
|
5120
|
-
MtnaWfCoerceFormItemPipeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5121
|
-
MtnaWfCoerceFormItemPipeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipeModule, declarations: [MtnaWfCoerceFormItemPipe], exports: [MtnaWfCoerceFormItemPipe] });
|
|
5122
|
-
MtnaWfCoerceFormItemPipeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipeModule });
|
|
5123
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfCoerceFormItemPipeModule, decorators: [{
|
|
5124
|
-
type: i0.NgModule,
|
|
5125
|
-
args: [{
|
|
5126
|
-
declarations: [MtnaWfCoerceFormItemPipe],
|
|
5127
|
-
exports: [MtnaWfCoerceFormItemPipe],
|
|
5128
|
-
}]
|
|
5129
|
-
}] });
|
|
5130
|
-
|
|
5131
5110
|
var CoerceFormStepGroupPipe = /** @class */ (function () {
|
|
5132
5111
|
function CoerceFormStepGroupPipe() {
|
|
5133
5112
|
}
|
|
@@ -8808,7 +8787,7 @@
|
|
|
8808
8787
|
return MtnaWfRepeatableItemContainerComponent;
|
|
8809
8788
|
}(MtnaWfBaseParentValueItem));
|
|
8810
8789
|
MtnaWfRepeatableItemContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfRepeatableItemContainerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: MtnaWfManagerService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8811
|
-
MtnaWfRepeatableItemContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfRepeatableItemContainerComponent, selector: "mtna-wf-repeatable-item-container", usesInheritance: true, ngImport: i0__namespace, template: "<mtna-wf-item-header\n *ngIf=\"!!item.questionText || !!item.descriptiveText\"\n [descriptiveText]=\"item.descriptiveText\"\n [disabled]=\"control?.disabled || false\"\n [questionText]=\"item.questionText\"\n [required]=\"item.required\"\n></mtna-wf-item-header>\n<section [mtnaHighlight]=\"indicatorStatus === 'ACTIVE' && !item.questionText && !item.descriptiveText\">\n <mat-card *ngIf=\"item.items.length > 0\">\n <mtna-wf-repeatable-item\n @repeatItemExpandCollapse\n *ngFor=\"let subitem of item.items; let first = first; trackBy: 'instanceId' | mtnaTrackByProperty\"\n >\n <
|
|
8790
|
+
MtnaWfRepeatableItemContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfRepeatableItemContainerComponent, selector: "mtna-wf-repeatable-item-container", usesInheritance: true, ngImport: i0__namespace, template: "<mtna-wf-item-header\n *ngIf=\"!!item.questionText || !!item.descriptiveText\"\n [descriptiveText]=\"item.descriptiveText\"\n [disabled]=\"control?.disabled || false\"\n [questionText]=\"item.questionText\"\n [required]=\"item.required\"\n></mtna-wf-item-header>\n<section [mtnaHighlight]=\"indicatorStatus === 'ACTIVE' && !item.questionText && !item.descriptiveText\">\n <mat-card *ngIf=\"item.items.length > 0\">\n <mtna-wf-repeatable-item\n @repeatItemExpandCollapse\n *ngFor=\"let subitem of item.items; let first = first; trackBy: 'instanceId' | mtnaTrackByProperty\"\n >\n <button\n *ngIf=\"!readonly && item.items.length > item.minOccurrences\"\n mat-icon-button\n class=\"item-remove-button\"\n color=\"warn\"\n (click)=\"removeItem(subitem)\"\n matTooltip=\"Remove Item\"\n i18n-matTooltip\n >\n <mat-icon>remove_circle</mat-icon>\n </button>\n <mtna-wf-item\n [isCompact]=\"isCompact\"\n [item]=\"subitem\"\n [control]=\"!!control && !!control.controls ? control.controls[subitem.instanceId] : undefined\"\n [readonly]=\"readonly\"\n [parentIds]=\"parentIds\"\n ></mtna-wf-item>\n </mtna-wf-repeatable-item>\n </mat-card>\n</section>\n<button *ngIf=\"!readonly\" mat-raised-button (click)=\"addItem()\" class=\"new-item-button\" color=\"primary\">\n {{ item.additionalText || _addText | uppercase }}\n</button>\n", styles: ["mtna-wf-repeatable-item-container{display:block}mtna-wf-repeatable-item-container>section>mtna-wf-repeatable-item{position:relative;padding:16px;display:inline-block;margin:8px;max-width:100%}mtna-wf-repeatable-item-container>section>mtna-wf-repeatable-item .item-remove-button{position:absolute;top:-22px;left:-22px}mtna-wf-repeatable-item-container>section>mtna-wf-repeatable-item>mtna-wf-item:first-child{margin-top:0}mtna-wf-repeatable-item-container .new-item-button{margin-left:.75em}mtna-wf-repeatable-item-container>section{padding-left:.75em}mtna-wf-repeatable-item-container>section,mtna-wf-repeatable-item-container .new-item-button{margin-top:16px}\n"], components: [{ type: MtnaWfItemHeaderComponent, selector: "mtna-wf-item-header", inputs: ["descriptiveText", "disabled", "hideRequiredMarker", "invalid", "questionText", "required"] }, { type: i1__namespace$4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: MtnaWfRepeatableItemComponent, selector: "mtna-wf-repeatable-item" }, { type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3__namespace$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: MtnaWfFormItemComponent, selector: "mtna-wf-item", inputs: ["color", "control", "header", "isCompact", "inList", "item", "parentIds", "readonly", "step"], outputs: ["focusedSection"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "mtnaTrackByProperty": i1__namespace$1.MtnaTrackByPropertyPipe, "uppercase": i3__namespace.UpperCasePipe }, animations: [
|
|
8812
8791
|
animations.trigger('repeatItemExpandCollapse', [
|
|
8813
8792
|
animations.state('in', animations.style({ height: '*', margin: '*', opacity: 1 })),
|
|
8814
8793
|
animations.state('void', animations.style({ height: 0, margin: 0, opacity: 0, visibility: 'hidden' })),
|
|
@@ -8851,7 +8830,6 @@
|
|
|
8851
8830
|
i3$4.MatIconModule,
|
|
8852
8831
|
i10.MatTooltipModule,
|
|
8853
8832
|
i1$2.MtnaTrackByPropertyPipeModule,
|
|
8854
|
-
MtnaWfCoerceFormItemPipeModule,
|
|
8855
8833
|
i1$7.MatCardModule], exports: [MtnaWfRepeatableItemContainerComponent] });
|
|
8856
8834
|
MtnaWfRepeatableItemContainerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfRepeatableItemContainerModule, imports: [[
|
|
8857
8835
|
i3$1.CommonModule,
|
|
@@ -8863,7 +8841,6 @@
|
|
|
8863
8841
|
i3$4.MatIconModule,
|
|
8864
8842
|
i10.MatTooltipModule,
|
|
8865
8843
|
i1$2.MtnaTrackByPropertyPipeModule,
|
|
8866
|
-
MtnaWfCoerceFormItemPipeModule,
|
|
8867
8844
|
i1$7.MatCardModule,
|
|
8868
8845
|
]] });
|
|
8869
8846
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MtnaWfRepeatableItemContainerModule, decorators: [{
|
|
@@ -8879,7 +8856,6 @@
|
|
|
8879
8856
|
i3$4.MatIconModule,
|
|
8880
8857
|
i10.MatTooltipModule,
|
|
8881
8858
|
i1$2.MtnaTrackByPropertyPipeModule,
|
|
8882
|
-
MtnaWfCoerceFormItemPipeModule,
|
|
8883
8859
|
i1$7.MatCardModule,
|
|
8884
8860
|
],
|
|
8885
8861
|
declarations: [MtnaWfRepeatableItemContainerComponent],
|
|
@@ -12534,8 +12510,6 @@
|
|
|
12534
12510
|
exports.MtnaWfCoerceFormControlPipeModule = MtnaWfCoerceFormControlPipeModule;
|
|
12535
12511
|
exports.MtnaWfCoerceFormGroupPipe = MtnaWfCoerceFormGroupPipe;
|
|
12536
12512
|
exports.MtnaWfCoerceFormGroupPipeModule = MtnaWfCoerceFormGroupPipeModule;
|
|
12537
|
-
exports.MtnaWfCoerceFormItemPipe = MtnaWfCoerceFormItemPipe;
|
|
12538
|
-
exports.MtnaWfCoerceFormItemPipeModule = MtnaWfCoerceFormItemPipeModule;
|
|
12539
12513
|
exports.MtnaWfDateComponent = MtnaWfDateComponent;
|
|
12540
12514
|
exports.MtnaWfDateItemTemplateComponent = MtnaWfDateItemTemplateComponent;
|
|
12541
12515
|
exports.MtnaWfDateItemTemplateModule = MtnaWfDateItemTemplateModule;
|