survey-angular-ui 1.9.101 → 1.9.102

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.
@@ -4004,12 +4004,13 @@
4004
4004
  var MatrixCellComponent = /** @class */ (function (_super) {
4005
4005
  __extends(MatrixCellComponent, _super);
4006
4006
  function MatrixCellComponent() {
4007
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
4008
- _this.isVisible = false;
4009
- return _this;
4007
+ return _super !== null && _super.apply(this, arguments) || this;
4010
4008
  }
4011
4009
  MatrixCellComponent.prototype.getModel = function () {
4012
- return this.cell.question;
4010
+ if (this.cell.hasQuestion) {
4011
+ return this.cell.question;
4012
+ }
4013
+ return null;
4013
4014
  };
4014
4015
  Object.defineProperty(MatrixCellComponent.prototype, "row", {
4015
4016
  get: function () {
@@ -4018,6 +4019,16 @@
4018
4019
  enumerable: false,
4019
4020
  configurable: true
4020
4021
  });
4022
+ MatrixCellComponent.prototype.ngDoCheck = function () {
4023
+ var _this = this;
4024
+ var _a;
4025
+ _super.prototype.ngDoCheck.call(this);
4026
+ if (this.cell.isErrorsCell && ((_a = this.cell) === null || _a === void 0 ? void 0 : _a.question)) {
4027
+ this.cell.question.registerFunctionOnPropertyValueChanged("errors", function () {
4028
+ _this.update();
4029
+ }, "__ngSubscription");
4030
+ }
4031
+ };
4021
4032
  Object.defineProperty(MatrixCellComponent.prototype, "panelComponentName", {
4022
4033
  get: function () {
4023
4034
  var panel = this.cell.panel;
@@ -4073,10 +4084,17 @@
4073
4084
  };
4074
4085
  this.question.survey.matrixAfterCellRender(this.question, options);
4075
4086
  };
4087
+ MatrixCellComponent.prototype.ngOnDestroy = function () {
4088
+ var _a;
4089
+ _super.prototype.ngOnDestroy.call(this);
4090
+ if (this.cell.isErrorsCell && ((_a = this.cell) === null || _a === void 0 ? void 0 : _a.question)) {
4091
+ this.cell.question.unRegisterFunctionOnPropertyValueChanged("errors", "__ngSubscription");
4092
+ }
4093
+ };
4076
4094
  return MatrixCellComponent;
4077
4095
  }(BaseAngular));
4078
4096
  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 });
4079
- MatrixCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixCellComponent, selector: "sv-ng-matrix-cell", inputs: { question: "question", cell: "cell" }, viewQueries: [{ propertyName: "cellContainer", first: true, predicate: ["cellContainer"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <td [class]=\"cell.className\" [attr.data-responsive-title]=\"getHeaders()\" [title]=\"cell.getTitle()\" [style]=\"getCellStyle()\" [attr.colspan]=\"cell.colSpans\" #cellContainer>\n <sv-ng-matrix-drag-drop-icon *ngIf=\"cell.isDragHandlerCell\" [model]=\"$any({ data: { row: row, question: question } })\"></sv-ng-matrix-drag-drop-icon>\n <sv-action-bar *ngIf=\"cell.isActionsCell\" [model]=\"cell.item.getData()\" [handleClick]=\"false\"></sv-action-bar>\n <ng-container *ngIf=\"cell.hasPanel\">\n <ng-template [component]=\"{ name: panelComponentName, data: panelComponentData }\"></ng-template>\n </ng-container>\n <div *ngIf=\"cell.hasQuestion\" [class]=\"question.cssClasses.cellQuestionWrapper\" [visible]=\"cell.question.isVisible\">\n <div *ngIf=\"cell.showErrorOnTop && cell.question.hasVisibleErrors\" [element]=\"cell.question\" [location]=\"'top'\" sv-ng-errors></div>\n <ng-container *ngIf=\"!cell.isChoice && cell.question.isDefaultRendering()\">\n <ng-template [component]=\"{ name: question.getCellWrapperComponentName(cell.cell), data: { componentData: question.getCellWrapperComponentData(cell.cell)} }\">\n <ng-template [component]=\"{ name: getComponentName(cell.question), data: { model: cell.question } }\"></ng-template>\n </ng-template>\n </ng-container>\n <ng-template *ngIf=\"!cell.isChoice && !cell.question.isDefaultRendering()\" [component]=\"{ name: cell.question.getComponentName(), data: { model: cell.question } }\">\n </ng-template>\n <ng-container *ngIf=\"cell.isItemChoice\">\n <ng-template [component]=\"{ name: question.getCellWrapperComponentName(cell.cell), data: { componentData: question.getCellWrapperComponentData(cell.cell)} }\">\n <sv-ng-selebase-item\n [showLabel]=\"false\"\n [inputType]=\"cell.isCheckbox ? 'checkbox': 'radio'\"\n [question]=\"cell.question\"\n [model]=\"cell.item\"\n ></sv-ng-selebase-item>\n </ng-template>\n </ng-container>\n <div *ngIf=\"cell.isOtherChoice\" [class]=\"cell.question.getCommentAreaCss(true)\" [question]=\"cell.question\" sv-ng-comment-other></div>\n <div *ngIf=\"cell.showErrorOnBottom && cell.question.hasVisibleErrors\" [element]=\"cell.question\" [location]=\"'top'\" sv-ng-errors></div>\n <div *ngIf=\"cell.question.isErrorsModeTooltip && cell.question.hasVisibleErrors\" [element]=\"cell.question\" [location]=\"'tooltip'\" sv-ng-errors></div>\n </div>\n <ng-container *ngIf=\"cell.hasTitle\">\n <ng-template [component]=\"{ name: question.getCellWrapperComponentName($any(cell)), data: { componentData: question.getCellWrapperComponentData($any(cell))} }\">\n <sv-ng-string [model]=\"cell.locTitle\"></sv-ng-string>\n <span *ngIf=\"!!cell.requiredText\" [class]=\"question.cssClasses.cellRequiredText\">{{ cell.requiredText }}</span> \n </ng-template>\n </ng-container>\n</td>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: MatrixDynamicDragDropIconComponent, selector: "sv-ng-matrix-drag-drop-icon", inputs: ["model"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: ["element", "location"] }, { type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: ["question", "model", "inputType", "showLabel"] }, { type: SurveyCommentOtherComponent, selector: "sv-ng-comment-other, '[sv-ng-comment-other]'", inputs: ["question"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
4097
+ MatrixCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixCellComponent, selector: "sv-ng-matrix-cell", inputs: { question: "question", cell: "cell" }, viewQueries: [{ propertyName: "cellContainer", first: true, predicate: ["cellContainer"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <td [class]=\"cell.className\" [attr.data-responsive-title]=\"getHeaders()\" [title]=\"cell.getTitle()\"\n [style]=\"getCellStyle()\" [attr.colspan]=\"cell.colSpans\" #cellContainer>\n <sv-ng-matrix-drag-drop-icon *ngIf=\"cell.isDragHandlerCell\"\n [model]=\"$any({ data: { row: row, question: question } })\"></sv-ng-matrix-drag-drop-icon>\n <sv-action-bar *ngIf=\"cell.isActionsCell\" [model]=\"cell.item.getData()\" [handleClick]=\"false\"></sv-action-bar>\n <ng-container *ngIf=\"cell.hasPanel\">\n <ng-template [component]=\"{ name: panelComponentName, data: panelComponentData }\"></ng-template>\n </ng-container>\n <div *ngIf=\"cell.isErrorsCell && cell.question?.hasVisibleErrors\" [element]=\"cell.question\" sv-ng-errors></div>\n <div *ngIf=\"cell.hasQuestion\" [class]=\"question.cssClasses.cellQuestionWrapper\"\n [visible]=\"cell.question.isVisible\">\n <ng-container *ngIf=\"!cell.isChoice && cell.question.isDefaultRendering()\">\n <ng-template\n [component]=\"{ name: question.getCellWrapperComponentName(cell.cell), data: { componentData: question.getCellWrapperComponentData(cell.cell)} }\">\n <ng-template\n [component]=\"{ name: getComponentName(cell.question), data: { model: cell.question } }\"></ng-template>\n </ng-template>\n </ng-container>\n <ng-template *ngIf=\"!cell.isChoice && !cell.question.isDefaultRendering()\"\n [component]=\"{ name: cell.question.getComponentName(), data: { model: cell.question } }\">\n </ng-template>\n <ng-container *ngIf=\"cell.isItemChoice\">\n <ng-template\n [component]=\"{ name: question.getCellWrapperComponentName(cell.cell), data: { componentData: question.getCellWrapperComponentData(cell.cell)} }\">\n <sv-ng-selebase-item [showLabel]=\"false\" [inputType]=\"cell.isCheckbox ? 'checkbox': 'radio'\"\n [question]=\"cell.question\" [model]=\"cell.item\"></sv-ng-selebase-item>\n </ng-template>\n </ng-container>\n <div *ngIf=\"cell.isOtherChoice\" [class]=\"cell.question.getCommentAreaCss(true)\" [question]=\"cell.question\"\n sv-ng-comment-other></div>\n </div>\n <ng-container *ngIf=\"cell.hasTitle\">\n <ng-template\n [component]=\"{ name: question.getCellWrapperComponentName($any(cell)), data: { componentData: question.getCellWrapperComponentData($any(cell))} }\">\n <sv-ng-string [model]=\"cell.locTitle\"></sv-ng-string>\n <span *ngIf=\"!!cell.requiredText\" [class]=\"question.cssClasses.cellRequiredText\">{{ cell.requiredText }}</span>\n </ng-template>\n </ng-container>\n </td>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: MatrixDynamicDragDropIconComponent, selector: "sv-ng-matrix-drag-drop-icon", inputs: ["model"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: ["element", "location"] }, { type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: ["question", "model", "inputType", "showLabel"] }, { type: SurveyCommentOtherComponent, selector: "sv-ng-comment-other, '[sv-ng-comment-other]'", inputs: ["question"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
4080
4098
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixCellComponent, decorators: [{
4081
4099
  type: i0.Component,
4082
4100
  args: [{
@@ -4104,13 +4122,13 @@
4104
4122
  return MatrixRequiredHeader;
4105
4123
  }(BaseAngular));
4106
4124
  MatrixRequiredHeader.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixRequiredHeader, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
4107
- MatrixRequiredHeader.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixRequiredHeader, selector: "sv-ng-matrixheaderrequired", inputs: { column: "column", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template><span *ngIf='column.isRenderedRequired' [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-template>", isInline: true, styles: [":host { display: none; }"], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4125
+ MatrixRequiredHeader.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixRequiredHeader, selector: "sv-ng-matrixheaderrequired", inputs: { column: "column", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template><ng-container *ngIf='column.isRenderedRequired'><span>&nbsp;</span><span [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-container></ng-template>", isInline: true, styles: [":host { display: none; }"], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4108
4126
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixRequiredHeader, decorators: [{
4109
4127
  type: i0.Component,
4110
4128
  args: [{
4111
4129
  selector: "sv-ng-matrixheaderrequired",
4112
4130
  styles: [":host { display: none; }"],
4113
- template: "<ng-template #template><span *ngIf='column.isRenderedRequired' [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-template>"
4131
+ template: "<ng-template #template><ng-container *ngIf='column.isRenderedRequired'><span>&nbsp;</span><span [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-container></ng-template>"
4114
4132
  }]
4115
4133
  }], propDecorators: { column: [{
4116
4134
  type: i0.Input
@@ -4139,7 +4157,7 @@
4139
4157
  return MatrixRowComponent;
4140
4158
  }(BaseAngular));
4141
4159
  MatrixRowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixRowComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
4142
- MatrixRowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixRowComponent, selector: "sv-ng-matrix-row", inputs: { model: "model", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <tr [class]=\"model.className\" (pointerdown)=\"question.onPointerDown($event, row)\" [attr.data-sv-drop-target-matrix-row]=\"row && row.id\">\n <sv-ng-matrix-cell\n [cell]=\"cell\"\n [question]=\"question\"\n *ngFor=\"let cell of model.cells; trackBy: trackCellBy\"\n ></sv-ng-matrix-cell>\n </tr>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: MatrixCellComponent, selector: "sv-ng-matrix-cell", inputs: ["question", "cell"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4160
+ MatrixRowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatrixRowComponent, selector: "sv-ng-matrix-row", inputs: { model: "model", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <tr *ngIf=\"model.visible\" [class]=\"model.className\" (pointerdown)=\"question.onPointerDown($event, row)\"\n [attr.data-sv-drop-target-matrix-row]=\"row && row.id\">\n <sv-ng-matrix-cell [cell]=\"cell\" [question]=\"question\"\n *ngFor=\"let cell of model.cells; trackBy: trackCellBy\"></sv-ng-matrix-cell>\n </tr>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: MatrixCellComponent, selector: "sv-ng-matrix-cell", inputs: ["question", "cell"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4143
4161
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatrixRowComponent, decorators: [{
4144
4162
  type: i0.Component,
4145
4163
  args: [{