survey-angular-ui 2.5.7 → 2.5.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/survey-angular-ui.umd.js +38 -17
- package/bundles/survey-angular-ui.umd.js.map +1 -1
- package/components/popup/modal-container.component.d.ts +4 -4
- package/esm2015/components/popup/modal-container.component.js +18 -18
- package/esm2015/components/progress/buttons/progress.component.js +2 -2
- package/fesm2015/survey-angular-ui.js +19 -19
- package/fesm2015/survey-angular-ui.js.map +1 -1
- package/package.json +2 -2
|
@@ -1023,32 +1023,53 @@
|
|
|
1023
1023
|
function ModalComponent(popupService) {
|
|
1024
1024
|
this.popupService = popupService;
|
|
1025
1025
|
this.functionDefined = false;
|
|
1026
|
+
this.hosts = {};
|
|
1027
|
+
this.modalManager = this.createModalManager();
|
|
1026
1028
|
}
|
|
1027
|
-
ModalComponent.prototype.
|
|
1029
|
+
ModalComponent.prototype.createModalManager = function () {
|
|
1028
1030
|
var _this = this;
|
|
1029
|
-
var
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
var modalManager = new Survey.PopupModalManager();
|
|
1032
|
+
modalManager.onModalsChangedCallback = function (_, addedModals, removedModals) {
|
|
1033
|
+
var e_1, _a, e_2, _b;
|
|
1034
|
+
try {
|
|
1035
|
+
for (var addedModals_1 = __values(addedModals), addedModals_1_1 = addedModals_1.next(); !addedModals_1_1.done; addedModals_1_1 = addedModals_1.next()) {
|
|
1036
|
+
var modal = addedModals_1_1.value;
|
|
1037
|
+
_this.hosts[modal.uniqueId] = _this.popupService.createComponent(modal);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1041
|
+
finally {
|
|
1042
|
+
try {
|
|
1043
|
+
if (addedModals_1_1 && !addedModals_1_1.done && (_a = addedModals_1.return)) _a.call(addedModals_1);
|
|
1044
|
+
}
|
|
1045
|
+
finally { if (e_1) throw e_1.error; }
|
|
1046
|
+
}
|
|
1047
|
+
try {
|
|
1048
|
+
for (var removedModals_1 = __values(removedModals), removedModals_1_1 = removedModals_1.next(); !removedModals_1_1.done; removedModals_1_1 = removedModals_1.next()) {
|
|
1049
|
+
var modal = removedModals_1_1.value;
|
|
1050
|
+
if (_this.hosts[modal.uniqueId]) {
|
|
1051
|
+
_this.hosts[modal.uniqueId].detach();
|
|
1052
|
+
delete _this.hosts[modal.uniqueId];
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1057
|
+
finally {
|
|
1058
|
+
try {
|
|
1059
|
+
if (removedModals_1_1 && !removedModals_1_1.done && (_b = removedModals_1.return)) _b.call(removedModals_1);
|
|
1060
|
+
}
|
|
1061
|
+
finally { if (e_2) throw e_2.error; }
|
|
1034
1062
|
}
|
|
1035
1063
|
};
|
|
1036
|
-
|
|
1037
|
-
this.portalHost = this.popupService.createComponent(this.model);
|
|
1038
|
-
this.model.model.isVisible = true;
|
|
1039
|
-
return this.model;
|
|
1064
|
+
return modalManager;
|
|
1040
1065
|
};
|
|
1041
1066
|
ModalComponent.prototype.ngOnInit = function () {
|
|
1042
1067
|
var _this = this;
|
|
1043
1068
|
this.functionDefined = true;
|
|
1044
|
-
Survey.settings.showDialog = function (dialogOptions, rootElement) {
|
|
1045
|
-
return _this.showDialog(dialogOptions, rootElement);
|
|
1046
|
-
};
|
|
1069
|
+
Survey.settings.showDialog = function (dialogOptions, rootElement) { return _this.modalManager.addDialog(dialogOptions, rootElement); };
|
|
1047
1070
|
};
|
|
1048
1071
|
ModalComponent.prototype.ngOnDestroy = function () {
|
|
1049
|
-
|
|
1050
|
-
(_a = this.portalHost) === null || _a === void 0 ? void 0 : _a.detach();
|
|
1051
|
-
(_b = this.model) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
1072
|
+
this.modalManager.clear();
|
|
1052
1073
|
if (this.functionDefined) {
|
|
1053
1074
|
Survey.settings.showDialog = undefined;
|
|
1054
1075
|
}
|
|
@@ -4018,7 +4039,7 @@
|
|
|
4018
4039
|
return ProgressButtonsComponent;
|
|
4019
4040
|
}());
|
|
4020
4041
|
ProgressButtonsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProgressButtonsComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4021
|
-
ProgressButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ProgressButtonsComponent, selector: "sv-ng-progress-buttons", inputs: { model: "model", survey: "survey", container: "container" }, viewQueries: [{ propertyName: "progressButtonsListContainer", first: true, predicate: ["progressButtonsListContainer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div [class]=\"model.getRootCss(container)\" [style.maxWidth]=\"model.progressWidth\" \nrole=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [attr.aria-label]=\"model.progressBarAriaLabel\"\n>\n <div *ngIf=\"canShowHeader\" [class]=\"survey.css.progressButtonsHeader\">\n <div [class]=\"survey.css.progressButtonsPageTitle\" [title]=\"model.headerText\">{{ model.headerText }}</div>\n </div>\n <div [class]=\"survey.css.progressButtonsContainer\">\n <div\n [class]=\"model.getScrollButtonCss(hasScroller, true)\"\n (click)=\"clickScrollButton(true)\"\n role=\"button\"\n ></div>\n <div\n [class]=\"survey.css.progressButtonsListContainer\" #progressButtonsListContainer>\n <ul [class]=\"survey.css.progressButtonsList\">\n <li\n *ngFor=\"let page of survey.visiblePages; index as index\"\n [class]=\"model.getListElementCss(index)\"\n (click)=\"model.isListElementClickable(index) ? model.clickListElement(page) : null\"\n [attr.data-page-number]=\"model.getItemNumber(page)\">\n <div [class]=\"survey.css.progressButtonsConnector\"></div>\n <div *ngIf=\"canShowItemTitles\"\n [class]=\"survey.css.progressButtonsPageTitle\"\n [title]=\"page.renderedNavigationTitle\"\n >\n <sv-ng-string [model]=\"page.locNavigationTitle\"></sv-ng-string>\n </div>\n <div *ngIf=\"canShowItemTitles\"\n [class]=\"survey.css.progressButtonsPageDescription\"\n [title]=\"page.navigationDescription\"\n >\n {{ page.navigationDescription }}\n </div>\n <div [class]=\"survey.css.progressButtonsButton\"><div [class]=\"survey.css.progressButtonsButtonBackground\"></div><div [class]=\"survey.css.progressButtonsButtonContent\"></div><span>{{model.getItemNumber(page)}}</span></div>\n </li>\n </ul>\n </div>\n <div\n [class]=\"model.getScrollButtonCss(hasScroller, false)\"\n (click)=\"clickScrollButton(false)\"\n role=\"button\"\n ></div>\n </div>\n <div *ngIf=\"canShowFooter\" [class]=\"survey.css.progressButtonsFooter\">\n <div [class]=\"survey.css.progressButtonsPageTitle\" [title]=\"model.footerText\">{{ model.footerText }}</div>\n </div>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4042
|
+
ProgressButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ProgressButtonsComponent, selector: "sv-ng-progress-buttons", inputs: { model: "model", survey: "survey", container: "container" }, viewQueries: [{ propertyName: "progressButtonsListContainer", first: true, predicate: ["progressButtonsListContainer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div [class]=\"model.getRootCss(container)\" [style.maxWidth]=\"model.progressWidth\" [style.--sd-progress-buttons-pages-count]=\"survey.visiblePages.length\"\nrole=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [attr.aria-label]=\"model.progressBarAriaLabel\"\n>\n <div *ngIf=\"canShowHeader\" [class]=\"survey.css.progressButtonsHeader\">\n <div [class]=\"survey.css.progressButtonsPageTitle\" [title]=\"model.headerText\">{{ model.headerText }}</div>\n </div>\n <div [class]=\"survey.css.progressButtonsContainer\">\n <div\n [class]=\"model.getScrollButtonCss(hasScroller, true)\"\n (click)=\"clickScrollButton(true)\"\n role=\"button\"\n ></div>\n <div\n [class]=\"survey.css.progressButtonsListContainer\" #progressButtonsListContainer>\n <ul [class]=\"survey.css.progressButtonsList\">\n <li\n *ngFor=\"let page of survey.visiblePages; index as index\"\n [class]=\"model.getListElementCss(index)\"\n (click)=\"model.isListElementClickable(index) ? model.clickListElement(page) : null\"\n [attr.data-page-number]=\"model.getItemNumber(page)\">\n <div [class]=\"survey.css.progressButtonsConnector\"></div>\n <div *ngIf=\"canShowItemTitles\"\n [class]=\"survey.css.progressButtonsPageTitle\"\n [title]=\"page.renderedNavigationTitle\"\n >\n <sv-ng-string [model]=\"page.locNavigationTitle\"></sv-ng-string>\n </div>\n <div *ngIf=\"canShowItemTitles\"\n [class]=\"survey.css.progressButtonsPageDescription\"\n [title]=\"page.navigationDescription\"\n >\n {{ page.navigationDescription }}\n </div>\n <div [class]=\"survey.css.progressButtonsButton\"><div [class]=\"survey.css.progressButtonsButtonBackground\"></div><div [class]=\"survey.css.progressButtonsButtonContent\"></div><span>{{model.getItemNumber(page)}}</span></div>\n </li>\n </ul>\n </div>\n <div\n [class]=\"model.getScrollButtonCss(hasScroller, false)\"\n (click)=\"clickScrollButton(false)\"\n role=\"button\"\n ></div>\n </div>\n <div *ngIf=\"canShowFooter\" [class]=\"survey.css.progressButtonsFooter\">\n <div [class]=\"survey.css.progressButtonsPageTitle\" [title]=\"model.footerText\">{{ model.footerText }}</div>\n </div>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4022
4043
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProgressButtonsComponent, decorators: [{
|
|
4023
4044
|
type: i0.Component,
|
|
4024
4045
|
args: [{
|