survey-angular-ui 1.11.12 → 1.11.14

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.
@@ -42,7 +42,7 @@
42
42
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
43
  PERFORMANCE OF THIS SOFTWARE.
44
44
  ***************************************************************************** */
45
- /* global Reflect, Promise, SuppressedError, Symbol */
45
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
46
46
  var extendStatics = function (d, b) {
47
47
  extendStatics = Object.setPrototypeOf ||
48
48
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -178,8 +178,8 @@
178
178
  }
179
179
  function __generator(thisArg, body) {
180
180
  var _ = { label: 0, sent: function () { if (t[0] & 1)
181
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
182
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
181
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
182
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
183
183
  function verb(n) { return function (v) { return step([n, v]); }; }
184
184
  function step(op) {
185
185
  if (f)
@@ -334,7 +334,7 @@
334
334
  if (!Symbol.asyncIterator)
335
335
  throw new TypeError("Symbol.asyncIterator is not defined.");
336
336
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
337
- return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
337
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
338
338
  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
339
339
  function verb(n, f) { if (g[n]) {
340
340
  i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); };
@@ -458,18 +458,26 @@
458
458
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
459
459
  env.hasError = true;
460
460
  }
461
+ var r, s = 0;
461
462
  function next() {
462
- while (env.stack.length) {
463
- var rec = env.stack.pop();
463
+ while (r = env.stack.pop()) {
464
464
  try {
465
- var result = rec.dispose && rec.dispose.call(rec.value);
466
- if (rec.async)
467
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
465
+ if (!r.async && s === 1)
466
+ return s = 0, env.stack.push(r), Promise.resolve().then(next);
467
+ if (r.dispose) {
468
+ var result = r.dispose.call(r.value);
469
+ if (r.async)
470
+ return s |= 2, Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
471
+ }
472
+ else
473
+ s |= 1;
468
474
  }
469
475
  catch (e) {
470
476
  fail(e);
471
477
  }
472
478
  }
479
+ if (s === 1)
480
+ return env.hasError ? Promise.reject(env.error) : Promise.resolve();
473
481
  if (env.hasError)
474
482
  throw env.error;
475
483
  }
@@ -2942,7 +2950,7 @@
2942
2950
  return ActionBarItemComponent;
2943
2951
  }(BaseAngular));
2944
2952
  ActionBarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActionBarItemComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
2945
- ActionBarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ActionBarItemComponent, selector: "sv-action-bar-item", inputs: { model: "model" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.doAction($event)\" (mousedown)=\"model.doMouseDown()\" (focus)=\"model.doFocus($event)\" [key2click]=\"{ processEsc: false, disableTabStop: model.disableTabStop }\" [class]=\"model.getActionBarItemCss()\" [attr.title]=\"model.tooltip || model.title\" [attr.aria-checked]=\"model.ariaChecked\" [attr.aria-expanded]=\"model.ariaExpanded\" [attr.role]=\"model.ariaRole\" [disabled]=\"model.disabled\">\n <svg *ngIf=\"model.iconName\" [iconName]=\"model.iconName\" [size]=\"model.iconSize\" [title]=\"model.tooltip || model.title\" [class]=\"model.cssClasses.itemIcon\" sv-ng-svg-icon></svg>\n <span *ngIf=\"model.hasTitle\" [class]=\"model.getActionBarItemTitleCss()\">{{ model.title }}</span>\n </button>\n<ng-template>", styles: [":host{display:none}\n"], components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2953
+ ActionBarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ActionBarItemComponent, selector: "sv-action-bar-item", inputs: { model: "model" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.doAction($event)\" (mousedown)=\"model.doMouseDown($event)\" (focus)=\"model.doFocus($event)\" [key2click]=\"{ processEsc: false, disableTabStop: model.disableTabStop }\" [class]=\"model.getActionBarItemCss()\" [attr.title]=\"model.tooltip || model.title\" [attr.aria-checked]=\"model.ariaChecked\" [attr.aria-expanded]=\"model.ariaExpanded\" [attr.role]=\"model.ariaRole\" [disabled]=\"model.disabled\">\n <svg *ngIf=\"model.iconName\" [iconName]=\"model.iconName\" [size]=\"model.iconSize\" [title]=\"model.tooltip || model.title\" [class]=\"model.cssClasses.itemIcon\" sv-ng-svg-icon></svg>\n <span *ngIf=\"model.hasTitle\" [class]=\"model.getActionBarItemTitleCss()\">{{ model.title }}</span>\n </button>\n<ng-template>", styles: [":host{display:none}\n"], components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2946
2954
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActionBarItemComponent, decorators: [{
2947
2955
  type: i0.Component,
2948
2956
  args: [{
@@ -3125,6 +3133,13 @@
3125
3133
  ListItemComponent.prototype.pointerdown = function (event) {
3126
3134
  this.listModel.onPointerDown(event, this.model);
3127
3135
  };
3136
+ Object.defineProperty(ListItemComponent.prototype, "itemComponent", {
3137
+ get: function () {
3138
+ return this.model.component || this.listModel.itemComponent;
3139
+ },
3140
+ enumerable: false,
3141
+ configurable: true
3142
+ });
3128
3143
  ListItemComponent.prototype.getModel = function () {
3129
3144
  return this.model;
3130
3145
  };
@@ -3134,7 +3149,7 @@
3134
3149
  return ListItemComponent;
3135
3150
  }(BaseAngular));
3136
3151
  ListItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ListItemComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
3137
- ListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ListItemComponent, selector: "sv-ng-list-item, '[sv-ng-list-item]'", inputs: { element: "element", model: "model", listModel: "listModel" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <li role=\"option\" [key2click]=\"{ processEsc: false, disableTabStop: model.disableTabStop }\" [visible]=\"listModel.isItemVisible(model)\" [class]=\"class\" [attr.id]=\"elementId\" [attr.aria-selected]=\"ariaSelected ? 'true' : 'false'\" (click)=\"click($event)\" (pointerdown)=\"pointerdown($event)\">\n <ng-container *ngIf=\"model.needSeparator\">\n <div [class]=\"listModel.cssClasses.itemSeparator\"></div>\n </ng-container>\n <div [class]=\"listModel.cssClasses.itemBody\" [style.paddingInlineStart]=\"paddingLeft\" [attr.title]=\"model.locTitle.calculatedText\"\n (mouseover)=\"listModel.onItemHover(model)\"\n (mouseleave)=\"listModel.onItemLeave(model)\">\n <ng-template [component]=\"{ name: model.component || 'sv-list-item-content', data: { model: model, listModel: listModel } }\"></ng-template>\n </div>\n </li>\n</ng-template>", styles: [":host{display:none}\n"], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
3152
+ ListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ListItemComponent, selector: "sv-ng-list-item, '[sv-ng-list-item]'", inputs: { element: "element", model: "model", listModel: "listModel" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <li role=\"option\" [key2click]=\"{ processEsc: false, disableTabStop: model.disableTabStop }\" [visible]=\"listModel.isItemVisible(model)\" [class]=\"class\" [attr.id]=\"elementId\" [attr.aria-selected]=\"ariaSelected ? 'true' : 'false'\" (click)=\"click($event)\" (pointerdown)=\"pointerdown($event)\">\n <ng-container *ngIf=\"model.needSeparator\">\n <div [class]=\"listModel.cssClasses.itemSeparator\"></div>\n </ng-container>\n <div [class]=\"listModel.cssClasses.itemBody\" [style.paddingInlineStart]=\"paddingLeft\" [attr.title]=\"model.locTitle.calculatedText\"\n (mouseover)=\"listModel.onItemHover(model)\"\n (mouseleave)=\"listModel.onItemLeave(model)\">\n <ng-template [component]=\"{ name: itemComponent, data: { model: model, listModel: listModel } }\"></ng-template>\n </div>\n </li>\n</ng-template>", styles: [":host{display:none}\n"], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
3138
3153
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ListItemComponent, decorators: [{
3139
3154
  type: i0.Component,
3140
3155
  args: [{
@@ -4436,7 +4451,7 @@
4436
4451
  var _a;
4437
4452
  _super.prototype.ngDoCheck.call(this);
4438
4453
  if (this.cell.isErrorsCell && ((_a = this.cell) === null || _a === void 0 ? void 0 : _a.question)) {
4439
- this.cell.question.registerFunctionOnPropertyValueChanged("errors", function () {
4454
+ this.cell.question.registerFunctionOnPropertiesValueChanged(["errors", "visible"], function () {
4440
4455
  _this.update();
4441
4456
  }, "__ngSubscription");
4442
4457
  }
@@ -4489,30 +4504,33 @@
4489
4504
  configurable: true
4490
4505
  });
4491
4506
  MatrixDropdownCellComponent.prototype.ngAfterViewInit = function () {
4507
+ var _a;
4492
4508
  if (!this.cell.hasQuestion || !this.question || !this.question.survey)
4493
4509
  return;
4494
- var el = this.cellContainer.nativeElement;
4495
- var cellQ = this.cell.question;
4496
- var options = {
4497
- cell: this.cell.cell,
4498
- cellQuestion: cellQ,
4499
- htmlElement: el,
4500
- row: this.cell.row,
4501
- column: this.cell.cell.column,
4502
- };
4503
- this.question.survey.matrixAfterCellRender(this.question, options);
4504
- cellQ.afterRenderCore(el);
4510
+ var el = (_a = this.cellContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
4511
+ if (el) {
4512
+ var cellQ = this.cell.question;
4513
+ var options = {
4514
+ cell: this.cell.cell,
4515
+ cellQuestion: cellQ,
4516
+ htmlElement: el,
4517
+ row: this.cell.row,
4518
+ column: this.cell.cell.column,
4519
+ };
4520
+ this.question.survey.matrixAfterCellRender(this.question, options);
4521
+ cellQ.afterRenderCore(el);
4522
+ }
4505
4523
  };
4506
4524
  MatrixDropdownCellComponent.prototype.ngOnDestroy = function () {
4507
4525
  var _a;
4508
4526
  _super.prototype.ngOnDestroy.call(this);
4509
4527
  if (this.cell.isErrorsCell && ((_a = this.cell) === null || _a === void 0 ? void 0 : _a.question)) {
4510
- this.cell.question.unRegisterFunctionOnPropertyValueChanged("errors", "__ngSubscription");
4528
+ this.cell.question.unRegisterFunctionOnPropertiesValueChanged(["errors", "visible"], "__ngSubscription");
4511
4529
  }
4512
4530
  };
4513
4531
  Object.defineProperty(MatrixDropdownCellComponent.prototype, "canRender", {
4514
4532
  get: function () {
4515
- return this.question && this.question.survey;
4533
+ return this.question && this.question.survey && this.cell.isVisible;
4516
4534
  },
4517
4535
  enumerable: false,
4518
4536
  configurable: true