survey-creator-angular 2.2.0 → 2.2.2

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.
@@ -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('survey-angular-ui'), require('survey-core'), require('survey-creator-core')) :
3
- typeof define === 'function' && define.amd ? define('survey-creator-angular', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'survey-angular-ui', 'survey-core', 'survey-creator-core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["survey-creator-angular"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.i1, global.surveyCore, global.surveyCreatorCore));
5
- })(this, (function (exports, i0, i2, i3, i1, surveyCore, surveyCreatorCore) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('survey-angular-ui'), require('survey-creator-core'), require('survey-core')) :
3
+ typeof define === 'function' && define.amd ? define('survey-creator-angular', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'survey-angular-ui', 'survey-creator-core', 'survey-core'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["survey-creator-angular"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.i1, global.surveyCreatorCore, global.surveyCore));
5
+ })(this, (function (exports, i0, i2, i3, i1, surveyCreatorCore, surveyCore) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -587,11 +587,21 @@
587
587
  return this.model;
588
588
  };
589
589
  TabbledMenuComponent.prototype.ngAfterViewInit = function () {
590
- this.responsivityManager = new surveyCore.ResponsivityManager(this.container.nativeElement, this.model);
590
+ var _a;
591
+ if ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement) {
592
+ this.model.initResponsivityManager(this.container.nativeElement);
593
+ }
594
+ };
595
+ TabbledMenuComponent.prototype.ngAfterViewChecked = function () {
596
+ var _a;
597
+ _super.prototype.ngAfterViewChecked.call(this);
598
+ if ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement) {
599
+ this.model.initResponsivityManager(this.container.nativeElement);
600
+ }
591
601
  };
592
602
  TabbledMenuComponent.prototype.ngOnDestroy = function () {
593
603
  _super.prototype.ngOnDestroy.call(this);
594
- this.responsivityManager.dispose();
604
+ this.model.resetResponsivityManager();
595
605
  };
596
606
  TabbledMenuComponent.prototype.trackItemBy = function (_, item) {
597
607
  return item.renderedId;
@@ -599,7 +609,7 @@
599
609
  return TabbledMenuComponent;
600
610
  }(i1.BaseAngular));
601
611
  TabbledMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TabbledMenuComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
602
- TabbledMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TabbledMenuComponent, selector: "svc-tabbed-menu", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <div class=\"svc-tabbed-menu\" #container role=\"tablist\">\n <ng-container *ngFor=\"let action of model.renderedActions; trackBy: trackItemBy\">\n <svc-tabbed-menu-item-wrapper [model]=\"action\"></svc-tabbed-menu-item-wrapper>\n </ng-container>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: TabbedMenuItemWrapperComponent, selector: "svc-tabbed-menu-item-wrapper", inputs: ["model"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
612
+ TabbledMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TabbledMenuComponent, selector: "svc-tabbed-menu", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <div class=\"svc-tabbed-menu\" #container role=\"tablist\" [style]=\"model.getRootStyle()\">\n <ng-container *ngFor=\"let action of model.renderedActions; trackBy: trackItemBy\">\n <svc-tabbed-menu-item-wrapper [model]=\"action\"></svc-tabbed-menu-item-wrapper>\n </ng-container>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: TabbedMenuItemWrapperComponent, selector: "svc-tabbed-menu-item-wrapper", inputs: ["model"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
603
613
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TabbledMenuComponent, decorators: [{
604
614
  type: i0.Component,
605
615
  args: [{
@@ -925,17 +935,24 @@
925
935
  configurable: true
926
936
  });
927
937
  AdaptiveToolboxComponent.prototype.ngAfterViewInit = function () {
928
- this.toolbox.setRootElement(this.container.nativeElement);
929
- this.responsivityManager =
930
- new surveyCore.VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
938
+ var _a;
939
+ this.toolbox.afterRender(this.container.nativeElement);
940
+ if ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement) {
941
+ this.toolbox.afterRender(this.container.nativeElement);
942
+ }
943
+ };
944
+ AdaptiveToolboxComponent.prototype.ngAfterViewChecked = function () {
945
+ var _a;
946
+ _super.prototype.ngAfterViewChecked.call(this);
947
+ if ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement) {
948
+ this.toolbox.afterRender(this.container.nativeElement);
949
+ }
931
950
  };
932
951
  AdaptiveToolboxComponent.prototype.getModel = function () {
933
952
  return this.toolbox;
934
953
  };
935
954
  AdaptiveToolboxComponent.prototype.ngOnDestroy = function () {
936
- var _a;
937
- (_a = this.responsivityManager) === null || _a === void 0 ? void 0 : _a.dispose();
938
- this.toolbox.setRootElement(undefined);
955
+ this.toolbox.beforeDestroy();
939
956
  _super.prototype.ngOnDestroy.call(this);
940
957
  };
941
958
  AdaptiveToolboxComponent.prototype.trackItemBy = function (_, item) {
@@ -944,7 +961,7 @@
944
961
  return AdaptiveToolboxComponent;
945
962
  }(i1.BaseAngular));
946
963
  AdaptiveToolboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AdaptiveToolboxComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
947
- AdaptiveToolboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AdaptiveToolboxComponent, selector: "svc-toolbox", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <div [class]=\"toolbox.classNames\" #container>\n <div (focusout)=\"toolbox.focusOut($event)\" class=\"svc-toolbox__panel\">\n <div *ngIf=\"toolbox.showSearch\" class=\"svc-toolbox__search-container\">\n <ng-container *ngIf=\"toolbox.isCompactRendered\">\n <svc-toolbox-tool [creator]=\"creator\" [item]=\"searchItem\" [parentModel]=\"toolbox\"\n [isCompact]=\"toolbox.isCompactRendered\"></svc-toolbox-tool>\n </ng-container>\n <svc-search [model]=\"toolbox.searchManager\"></svc-search>\n <div class=\"svc-toolbox__category-separator svc-toolbox__category-separator--search\"></div>\n </div>\n <div *ngIf=\"toolbox.showPlaceholder\" class=\"svc-toolbox__placeholder\">{{toolbox.toolboxNoResultsFound}}</div>\n <sv-scroll>\n <ng-container *ngIf=\"!toolbox.showInSingleCategory\">\n <svc-toolbox-category *ngFor=\"let category of toolbox.categories\" [category]=\"category\"\n [toolbox]=\"toolbox\"></svc-toolbox-category>\n </ng-container>\n <ng-container *ngIf=\"toolbox.showInSingleCategory\">\n <div class=\"svc-toolbox__category\">\n <ng-container *ngFor=\"let item of toolbox.renderedActions; trackBy: trackItemBy\">\n <svc-toolbox-tool [creator]=\"creator\" [item]=\"item\" [parentModel]=\"toolbox\"\n [isCompact]=\"toolbox.isCompactRendered\"></svc-toolbox-tool>\n </ng-container>\n </div>\n </ng-container>\n </sv-scroll>\n </div>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: ToolboxToolComponent, selector: "svc-toolbox-tool", inputs: ["creator", "item", "parentModel", "isCompact"] }, { type: SearchComponent, selector: "svc-search", inputs: ["model"] }, { type: i1__namespace.ScrollComponent, selector: "sv-scroll", inputs: ["disabled", "onInnerHeightChanged"] }, { type: ToolboxCategoryComponent, selector: "svc-toolbox-category ", inputs: ["category", "toolbox"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
964
+ AdaptiveToolboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AdaptiveToolboxComponent, selector: "svc-toolbox", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <div [class]=\"toolbox.classNames\" #container [style]=\"toolbox.getRootStyle()\">\n <div (focusout)=\"toolbox.focusOut($event)\" class=\"svc-toolbox__panel\">\n <div *ngIf=\"toolbox.showSearch\" class=\"svc-toolbox__search-container\">\n <ng-container *ngIf=\"toolbox.isCompactRendered\">\n <svc-toolbox-tool [creator]=\"creator\" [item]=\"searchItem\" [parentModel]=\"toolbox\"\n [isCompact]=\"toolbox.isCompactRendered\"></svc-toolbox-tool>\n </ng-container>\n <svc-search [model]=\"toolbox.searchManager\"></svc-search>\n <div class=\"svc-toolbox__category-separator svc-toolbox__category-separator--search\"></div>\n </div>\n <div *ngIf=\"toolbox.showPlaceholder\" class=\"svc-toolbox__placeholder\">{{toolbox.toolboxNoResultsFound}}</div>\n <sv-scroll>\n <ng-container *ngIf=\"!toolbox.showInSingleCategory\">\n <svc-toolbox-category *ngFor=\"let category of toolbox.categories\" [category]=\"category\"\n [toolbox]=\"toolbox\"></svc-toolbox-category>\n </ng-container>\n <ng-container *ngIf=\"toolbox.showInSingleCategory\">\n <div class=\"svc-toolbox__category\">\n <ng-container *ngFor=\"let item of toolbox.renderedActions; trackBy: trackItemBy\">\n <svc-toolbox-tool [creator]=\"creator\" [item]=\"item\" [parentModel]=\"toolbox\"\n [isCompact]=\"toolbox.isCompactRendered\"></svc-toolbox-tool>\n </ng-container>\n </div>\n </ng-container>\n </sv-scroll>\n </div>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: ToolboxToolComponent, selector: "svc-toolbox-tool", inputs: ["creator", "item", "parentModel", "isCompact"] }, { type: SearchComponent, selector: "svc-search", inputs: ["model"] }, { type: i1__namespace.ScrollComponent, selector: "sv-scroll", inputs: ["disabled", "onInnerHeightChanged"] }, { type: ToolboxCategoryComponent, selector: "svc-toolbox-category ", inputs: ["category", "toolbox"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
948
965
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AdaptiveToolboxComponent, decorators: [{
949
966
  type: i0.Component,
950
967
  args: [{
@@ -2800,7 +2817,7 @@
2800
2817
  return StringEditorComponent;
2801
2818
  }(CreatorModelComponent));
2802
2819
  StringEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StringEditorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
2803
- StringEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StringEditorComponent, selector: "svc-string-edtior", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <span [class]=\"className\">\n <span class=\"svc-string-editor__content\">\n <div class=\"svc-string-editor__border svc-string-editor__border--hover\"></div>\n <div class=\"svc-string-editor__border svc-string-editor__border--focus\"></div>\n <span class=\"svc-string-editor__input\">\n <span role=\"textbox\" *ngIf=\"!locString.hasHtml\" class=\"sv-string-editor\" spellcheck=\"false\"\n (focus)=\"onFocus($event)\" (paste)=\"onPaste($event)\" (blur)=\"onBlur($event)\" (input)=\"baseModel.onInput($event)\" (keydown)=\"baseModel.onKeyDown($event)\" (keyup)=\"baseModel.onKeyUp($event)\" (compositionstart)=\"baseModel.onCompositionStart($event)\" (compositionend)=\"baseModel.onCompositionEnd($event)\" (mouseup)=\"baseModel.onMouseUp($event)\" (click)=\"edit($event)\" [textContent]=\"locString.renderedHtml\" [attr.aria-placeholder]=\"placeholder\" [attr.aria-label]=\"ariaLabel\" [attr.contenteditable]=\"contentEditable\" #container></span>\n <span role=\"textbox\" *ngIf=\"locString.hasHtml\" class=\"sv-string-editor sv-string-editor--html\" spellcheck=\"false\"\n (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\" (keydown)=\"baseModel.onKeyDown($event)\" (keyup)=\"baseModel.onKeyUp($event)\" (compositionstart)=\"baseModel.onCompositionStart($event)\" (compositionend)=\"baseModel.onCompositionEnd($event)\" (mouseup)=\"baseModel.onMouseUp($event)\"\n (click)=\"edit($event)\" [attr.aria-placeholder]=\"placeholder\" [attr.aria-label]=\"ariaLabel\" [attr.contenteditable]=\"contentEditable\" [innerHtml]=\"locString.renderedHtml | safeHtml\" #container></span>\n <sv-ng-character-counter *ngIf=\"showCharacterCounter\" [counter]=\"characterCounter\" [remainingCharacterCounter]=\"getCharacterCounterClass\"></sv-ng-character-counter>\n </span>\n </span>\n <span *ngIf=\"errorText\" class=\"svc-string-editor__error\">{{errorText}}</span>\n </span>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: i1__namespace.CharacterCounterComponent, selector: "sv-ng-character-counter", inputs: ["counter", "remainingCharacterCounter"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeHtml": i1__namespace.SafeHtmlPipe } });
2820
+ StringEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StringEditorComponent, selector: "svc-string-edtior", inputs: { model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n <span [class]=\"className\">\n <span class=\"svc-string-editor__content\">\n <div class=\"svc-string-editor__border svc-string-editor__border--hover\"></div>\n <div class=\"svc-string-editor__border svc-string-editor__border--focus\"></div>\n <span class=\"svc-string-editor__input\">\n <span role=\"textbox\" *ngIf=\"!locString.hasHtml\" class=\"sv-string-editor\" spellcheck=\"false\"\n (focus)=\"onFocus($event)\" (paste)=\"onPaste($event)\" (blur)=\"onBlur($event)\" (input)=\"baseModel.onInput($event)\" (keydown)=\"baseModel.onKeyDown($event)\" (keyup)=\"baseModel.onKeyUp($event)\" (compositionstart)=\"baseModel.onCompositionStart($event)\" (compositionend)=\"baseModel.onCompositionEnd($event)\" (mouseup)=\"baseModel.onMouseUp($event)\" (click)=\"edit($event)\" [textContent]=\"locString.renderedHtml\" [attr.aria-placeholder]=\"placeholder\" [attr.aria-label]=\"ariaLabel\" [attr.contenteditable]=\"contentEditable\" [attr.tabIndex]=\"baseModel.tabIndex\" #container></span>\n <span role=\"textbox\" *ngIf=\"locString.hasHtml\" class=\"sv-string-editor sv-string-editor--html\" spellcheck=\"false\"\n (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\" (keydown)=\"baseModel.onKeyDown($event)\" (keyup)=\"baseModel.onKeyUp($event)\" (compositionstart)=\"baseModel.onCompositionStart($event)\" (compositionend)=\"baseModel.onCompositionEnd($event)\" (mouseup)=\"baseModel.onMouseUp($event)\"\n (click)=\"edit($event)\" [attr.aria-placeholder]=\"placeholder\" [attr.aria-label]=\"ariaLabel\" [attr.contenteditable]=\"contentEditable\" [attr.tabIndex]=\"baseModel.tabIndex\" [innerHtml]=\"locString.renderedHtml | safeHtml\" #container></span>\n <sv-ng-character-counter *ngIf=\"showCharacterCounter\" [counter]=\"characterCounter\" [remainingCharacterCounter]=\"getCharacterCounterClass\"></sv-ng-character-counter>\n </span>\n </span>\n <span *ngIf=\"errorText\" class=\"svc-string-editor__error\">{{errorText}}</span>\n </span>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: i1__namespace.CharacterCounterComponent, selector: "sv-ng-character-counter", inputs: ["counter", "remainingCharacterCounter"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeHtml": i1__namespace.SafeHtmlPipe } });
2804
2821
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StringEditorComponent, decorators: [{
2805
2822
  type: i0.Component,
2806
2823
  args: [{