survey-angular-ui 2.2.6 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/survey-angular-ui.umd.js +37 -25
- package/bundles/survey-angular-ui.umd.js.map +1 -1
- package/components/header/header.component.d.ts +4 -0
- package/errors.component.d.ts +0 -2
- package/esm2015/components/header/header.component.js +19 -1
- package/esm2015/components/popup/popup.service.js +11 -3
- package/esm2015/errors.component.js +2 -14
- package/esm2015/questions/matrix.component.js +2 -2
- package/esm2015/questions/matrixcell.component.js +5 -2
- package/esm2015/survey-content.component.js +2 -1
- package/fesm2015/survey-angular-ui.js +35 -17
- package/fesm2015/survey-angular-ui.js.map +1 -1
- package/package.json +5 -2
- package/questions/matrixcell.component.d.ts +1 -0
|
@@ -1016,7 +1016,15 @@
|
|
|
1016
1016
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1017
1017
|
}
|
|
1018
1018
|
PopupService.prototype.createComponent = function (popupViewModel) {
|
|
1019
|
-
var portalHost
|
|
1019
|
+
var portalHost;
|
|
1020
|
+
if (Number.parseInt(i0.VERSION.major) > 18) {
|
|
1021
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1022
|
+
//@ts-ignore
|
|
1023
|
+
portalHost = new portal.DomPortalOutlet(popupViewModel.container, this.applicationRef, this.injector);
|
|
1024
|
+
}
|
|
1025
|
+
else {
|
|
1026
|
+
portalHost = new portal.DomPortalOutlet(popupViewModel.container, this.componentFactoryResolver, this.applicationRef, this.injector);
|
|
1027
|
+
}
|
|
1020
1028
|
var portal$1 = new portal.ComponentPortal(PopupBaseContainerComponent);
|
|
1021
1029
|
var componentRef = portalHost.attach(portal$1);
|
|
1022
1030
|
popupViewModel.setComponentElement(popupViewModel.container.children[0]);
|
|
@@ -1350,13 +1358,6 @@
|
|
|
1350
1358
|
var ErrorsComponent = /** @class */ (function () {
|
|
1351
1359
|
function ErrorsComponent() {
|
|
1352
1360
|
}
|
|
1353
|
-
Object.defineProperty(ErrorsComponent.prototype, "role", {
|
|
1354
|
-
get: function () {
|
|
1355
|
-
return "alert";
|
|
1356
|
-
},
|
|
1357
|
-
enumerable: false,
|
|
1358
|
-
configurable: true
|
|
1359
|
-
});
|
|
1360
1361
|
Object.defineProperty(ErrorsComponent.prototype, "id", {
|
|
1361
1362
|
get: function () {
|
|
1362
1363
|
return this.element.id + "_errors";
|
|
@@ -1364,13 +1365,6 @@
|
|
|
1364
1365
|
enumerable: false,
|
|
1365
1366
|
configurable: true
|
|
1366
1367
|
});
|
|
1367
|
-
Object.defineProperty(ErrorsComponent.prototype, "ariaLive", {
|
|
1368
|
-
get: function () {
|
|
1369
|
-
return "polite";
|
|
1370
|
-
},
|
|
1371
|
-
enumerable: false,
|
|
1372
|
-
configurable: true
|
|
1373
|
-
});
|
|
1374
1368
|
Object.defineProperty(ErrorsComponent.prototype, "class", {
|
|
1375
1369
|
get: function () {
|
|
1376
1370
|
return this.element.cssError;
|
|
@@ -1381,7 +1375,7 @@
|
|
|
1381
1375
|
return ErrorsComponent;
|
|
1382
1376
|
}());
|
|
1383
1377
|
ErrorsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ErrorsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1384
|
-
ErrorsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: { element: "element", location: "location" }, host: { properties: { "
|
|
1378
|
+
ErrorsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: { element: "element", location: "location" }, host: { properties: { "id": "this.id", "class": "this.class" } }, ngImport: i0__namespace, template: "<ng-container *ngFor=\"let error of element.errors;\">\n <ng-template [component]=\"{ name: element.survey.questionErrorComponent, data: { element: element, cssClasses: element.cssClasses, error: error } }\"></ng-template>\n</ng-container>\n", directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
1385
1379
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ErrorsComponent, decorators: [{
|
|
1386
1380
|
type: i0.Component,
|
|
1387
1381
|
args: [{
|
|
@@ -1392,15 +1386,9 @@
|
|
|
1392
1386
|
type: i0.Input
|
|
1393
1387
|
}], location: [{
|
|
1394
1388
|
type: i0.Input
|
|
1395
|
-
}], role: [{
|
|
1396
|
-
type: i0.HostBinding,
|
|
1397
|
-
args: ["attr.role"]
|
|
1398
1389
|
}], id: [{
|
|
1399
1390
|
type: i0.HostBinding,
|
|
1400
1391
|
args: ["id"]
|
|
1401
|
-
}], ariaLive: [{
|
|
1402
|
-
type: i0.HostBinding,
|
|
1403
|
-
args: ["attr.aria-live"]
|
|
1404
1392
|
}], class: [{
|
|
1405
1393
|
type: i0.HostBinding,
|
|
1406
1394
|
args: ["class"]
|
|
@@ -1708,6 +1696,7 @@
|
|
|
1708
1696
|
};
|
|
1709
1697
|
SurveyContentComponent.prototype.ngAfterViewChecked = function () {
|
|
1710
1698
|
if (!!this.model && this.isSurveyUpdated) {
|
|
1699
|
+
this.isSurveyUpdated = false;
|
|
1711
1700
|
this.model.afterRenderSurvey(this.rootEl.nativeElement);
|
|
1712
1701
|
this.model.startTimerFromUI();
|
|
1713
1702
|
}
|
|
@@ -4150,7 +4139,7 @@
|
|
|
4150
4139
|
_super.prototype.ngOnInit.call(this);
|
|
4151
4140
|
};
|
|
4152
4141
|
MatrixQuestionComponent.prototype.onCellChanged = function (row, column) {
|
|
4153
|
-
row.
|
|
4142
|
+
row.cellClick(column);
|
|
4154
4143
|
this.detectChanges();
|
|
4155
4144
|
};
|
|
4156
4145
|
MatrixQuestionComponent.prototype.trackRowByFn = function (i, row) {
|
|
@@ -4802,10 +4791,17 @@
|
|
|
4802
4791
|
MatrixCellComponent.prototype.onChange = function () {
|
|
4803
4792
|
this.cellChangedOwner.onCellChanged(this.row, this.column);
|
|
4804
4793
|
};
|
|
4794
|
+
Object.defineProperty(MatrixCellComponent.prototype, "itemSvgIcon", {
|
|
4795
|
+
get: function () {
|
|
4796
|
+
return this.question.getItemSvgIcon(this.row, this.column);
|
|
4797
|
+
},
|
|
4798
|
+
enumerable: false,
|
|
4799
|
+
configurable: true
|
|
4800
|
+
});
|
|
4805
4801
|
return MatrixCellComponent;
|
|
4806
4802
|
}(BaseAngular));
|
|
4807
4803
|
MatrixCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixCellComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4808
|
-
MatrixCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixCellComponent, selector: "sv-ng-matrix-cell, '[sv-ng-matrix-cell]'", inputs: { question: "question", column: "column", row: "row", columnIndex: "columnIndex", cellChangedOwner: "cellChangedOwner" }, usesInheritance: true, ngImport: i0__namespace, template: "<label (mousedown)=\"question.onMouseDown()\" [class]=\"question.getItemClass(row, column)\">\n <input\n type=\"
|
|
4804
|
+
MatrixCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixCellComponent, selector: "sv-ng-matrix-cell, '[sv-ng-matrix-cell]'", inputs: { question: "question", column: "column", row: "row", columnIndex: "columnIndex", cellChangedOwner: "cellChangedOwner" }, usesInheritance: true, ngImport: i0__namespace, template: "<label (mousedown)=\"question.onMouseDown()\" [class]=\"question.getItemClass(row, column)\">\n <input\n [type]=\"question.checkType\"\n [class]=\"question.cssItemValue\"\n [name]=\"row.fullName\"\n [value]=\"column.value\"\n [checked]=\"row.isChecked(column)\"\n [readonly]=\"row.isReadOnlyAttr\"\n [disabled]=\"row.isDisabledAttr\"\n [attr.id]=\"question.inputId + '_' + row.name + '_' + columnIndex\"\n (change)=\"onChange()\"\n [attr.aria-required]=\"question.a11y_input_ariaRequired\"\n [attr.aria-label]=\"question.getCellAriaLabel(row, column)\"\n [attr.aria-invalid]=\"question.a11y_input_ariaInvalid\"\n [attr.aria-errormessage]=\"question.a11y_input_ariaErrormessage\"\n />\n <span [class]=\"question.cssMaterialDecorator\">\n <svg *ngIf=\"itemSvgIcon\" [class]=\"question.cssItemDecorator\">\n <use [attr.xlink:href]=\"itemSvgIcon\"></use>\n </svg> \n </span>\n <span *ngIf=\"question.isMobile\" [class]=\"question.cssClasses.cellResponsiveTitle\" [model]=\"column.locText\" sv-ng-string></span>\n</label>\n<ng-content></ng-content>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4809
4805
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixCellComponent, decorators: [{
|
|
4810
4806
|
type: i0.Component,
|
|
4811
4807
|
args: [{
|
|
@@ -5401,12 +5397,28 @@
|
|
|
5401
5397
|
var HeaderComponent = /** @class */ (function (_super) {
|
|
5402
5398
|
__extends(HeaderComponent, _super);
|
|
5403
5399
|
function HeaderComponent() {
|
|
5404
|
-
|
|
5400
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
5401
|
+
_this.shouldProcessResponsiveness = false;
|
|
5402
|
+
return _this;
|
|
5405
5403
|
}
|
|
5406
5404
|
HeaderComponent.prototype.getModel = function () {
|
|
5407
5405
|
this.model.survey = this.survey;
|
|
5408
5406
|
return this.model;
|
|
5409
5407
|
};
|
|
5408
|
+
HeaderComponent.prototype.onModelChanged = function () {
|
|
5409
|
+
_super.prototype.onModelChanged.call(this);
|
|
5410
|
+
this.shouldProcessResponsiveness = true;
|
|
5411
|
+
};
|
|
5412
|
+
HeaderComponent.prototype.ngAfterViewInit = function () {
|
|
5413
|
+
this.shouldProcessResponsiveness = true;
|
|
5414
|
+
};
|
|
5415
|
+
HeaderComponent.prototype.ngAfterViewChecked = function () {
|
|
5416
|
+
_super.prototype.ngAfterViewChecked.call(this);
|
|
5417
|
+
if (this.shouldProcessResponsiveness) {
|
|
5418
|
+
this.model.processResponsiveness();
|
|
5419
|
+
this.shouldProcessResponsiveness = false;
|
|
5420
|
+
}
|
|
5421
|
+
};
|
|
5410
5422
|
return HeaderComponent;
|
|
5411
5423
|
}(BaseAngular));
|
|
5412
5424
|
HeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: HeaderComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|