survey-angular-ui 1.9.71 → 1.9.74
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/README.md +3 -0
- package/base-angular.d.ts +1 -0
- package/components/dropdown/dropdown.component.d.ts +0 -1
- package/components/popup/popup-container.component.d.ts +1 -0
- package/esm2020/angular-ui.mjs +1 -1
- package/esm2020/angular-ui.module.mjs +1 -1
- package/esm2020/base-angular.mjs +11 -3
- package/esm2020/comment-other.component.mjs +1 -1
- package/esm2020/comment.component.mjs +1 -1
- package/esm2020/component-factory.mjs +1 -1
- package/esm2020/components/action-bar/action-bar-item-dropdown.component.mjs +1 -1
- package/esm2020/components/action-bar/action-bar-item.component.mjs +1 -1
- package/esm2020/components/action-bar/action-bar.component.mjs +1 -1
- package/esm2020/components/action-bar/action.component.mjs +1 -1
- package/esm2020/components/brand-info/brand-info.component.mjs +1 -1
- package/esm2020/components/dropdown/dropdown.component.mjs +12 -10
- package/esm2020/components/element-header/element-header.component.mjs +1 -1
- package/esm2020/components/element-title/dynamic-head.component.mjs +1 -1
- package/esm2020/components/element-title/element-title.component.mjs +1 -1
- package/esm2020/components/element-title/title-actions.component.mjs +1 -1
- package/esm2020/components/list/list-item.component.mjs +1 -1
- package/esm2020/components/list/list.component.mjs +1 -1
- package/esm2020/components/matrix-actions/detail-button/detail-button.component.mjs +1 -1
- package/esm2020/components/matrix-actions/drag-drop-icon/drag-drop-icon.mjs +1 -1
- package/esm2020/components/matrix-actions/remove-button/remove-button.component.mjs +1 -1
- package/esm2020/components/notifier/notifier.component.mjs +1 -1
- package/esm2020/components/paneldynamic-actions/paneldynamic-add-btn.component.mjs +1 -1
- package/esm2020/components/paneldynamic-actions/paneldynamic-next-btn.component.mjs +1 -1
- package/esm2020/components/paneldynamic-actions/paneldynamic-prev-btn.component.mjs +1 -1
- package/esm2020/components/paneldynamic-actions/paneldynamic-progress-text.component.mjs +1 -1
- package/esm2020/components/paneldynamic-actions/paneldynamic-remove-btn.component.mjs +1 -1
- package/esm2020/components/popup/modal-container.component.mjs +1 -1
- package/esm2020/components/popup/popup-container.component.mjs +4 -1
- package/esm2020/components/popup/popup-pointer.component.mjs +1 -1
- package/esm2020/components/popup/popup.component.mjs +1 -1
- package/esm2020/components/popup/popup.service.mjs +1 -1
- package/esm2020/components/progress/buttons/progress.component.mjs +1 -1
- package/esm2020/components/progress/default/progress.component.mjs +1 -1
- package/esm2020/components/renderAs/boolean-checkbox/boolean-checkbox.component.mjs +1 -1
- package/esm2020/components/renderAs/boolean-radio/boolean-radio-item.component.mjs +1 -1
- package/esm2020/components/renderAs/boolean-radio/boolean-radio.component.mjs +1 -1
- package/esm2020/components/renderAs/dropdown-select/dropdown-option-item.component.mjs +1 -1
- package/esm2020/components/renderAs/dropdown-select/dropdown-select.component.mjs +1 -1
- package/esm2020/components/renderAs/rating-dropdown/rating-dropdown.component.mjs +1 -1
- package/esm2020/components/skeleton/skeleton.component.mjs +1 -1
- package/esm2020/components/skeleton.component.mjs +1 -1
- package/esm2020/components/survey-actions/survey-nav-btn.component.mjs +1 -1
- package/esm2020/components/survey-header/logo-image.component.mjs +1 -1
- package/esm2020/components/survey-header/survey-header.component.mjs +1 -1
- package/esm2020/components/svg-icon/svg-icon.component.mjs +1 -1
- package/esm2020/components/tagbox/tagbox-filter.component.mjs +3 -3
- package/esm2020/components/tagbox/tagbox-item.component.mjs +1 -1
- package/esm2020/components/tagbox/tagbox.component.mjs +1 -1
- package/esm2020/components/timer-panel/timer-panel.component.mjs +1 -1
- package/esm2020/element.component.mjs +1 -1
- package/esm2020/embedded-view-content.component.mjs +1 -1
- package/esm2020/errors.component.mjs +1 -1
- package/esm2020/page.component.mjs +1 -1
- package/esm2020/panel.component.mjs +1 -1
- package/esm2020/popup.survey.component.mjs +4 -1
- package/esm2020/question.component.mjs +1 -1
- package/esm2020/question.mjs +1 -1
- package/esm2020/questions/boolean.component.mjs +1 -1
- package/esm2020/questions/button-group/button-group-item.component.mjs +1 -1
- package/esm2020/questions/button-group/button-group.component.mjs +1 -1
- package/esm2020/questions/checkbox-item.component.mjs +2 -14
- package/esm2020/questions/checkbox.component.mjs +1 -1
- package/esm2020/questions/comment.component.mjs +1 -1
- package/esm2020/questions/composite.component.mjs +1 -1
- package/esm2020/questions/custom.component.mjs +1 -1
- package/esm2020/questions/customwidget.component.mjs +1 -1
- package/esm2020/questions/dropdown.component.mjs +1 -1
- package/esm2020/questions/expression.component.mjs +1 -1
- package/esm2020/questions/file.component.mjs +1 -1
- package/esm2020/questions/html.component.mjs +1 -1
- package/esm2020/questions/image.component.mjs +1 -1
- package/esm2020/questions/imagepicker-item.component.mjs +1 -1
- package/esm2020/questions/imagepicker.component.mjs +1 -1
- package/esm2020/questions/matrix-row.component.mjs +1 -1
- package/esm2020/questions/matrix.component.mjs +1 -1
- package/esm2020/questions/matrixcell.component.mjs +1 -1
- package/esm2020/questions/matrixdropdown.component.mjs +1 -1
- package/esm2020/questions/matrixdynamic.component.mjs +1 -1
- package/esm2020/questions/matrixrequiredheader.component.mjs +1 -1
- package/esm2020/questions/matrixtable.component.mjs +1 -1
- package/esm2020/questions/multipletext.component.mjs +1 -1
- package/esm2020/questions/multipletextitem.component.mjs +1 -1
- package/esm2020/questions/paneldynamic.component.mjs +1 -1
- package/esm2020/questions/radiogroup-item.component.mjs +1 -1
- package/esm2020/questions/radiogroup.component.mjs +1 -1
- package/esm2020/questions/ranking-item.component.mjs +1 -1
- package/esm2020/questions/ranking.component.mjs +1 -1
- package/esm2020/questions/rating.component.mjs +1 -1
- package/esm2020/questions/selectbase-item.mjs +1 -1
- package/esm2020/questions/selectbase.component.mjs +5 -2
- package/esm2020/questions/signature.component.mjs +1 -1
- package/esm2020/questions/tagbox.component.mjs +1 -1
- package/esm2020/questions/text.component.mjs +1 -1
- package/esm2020/row.component.mjs +1 -1
- package/esm2020/string-editor.component.mjs +1 -1
- package/esm2020/string-viewer.component.mjs +1 -1
- package/esm2020/survey-angular-ui.mjs +1 -1
- package/esm2020/survey-content.component.mjs +1 -1
- package/esm2020/survey-string.component.mjs +1 -1
- package/esm2020/survey.component.mjs +4 -1
- package/esm2020/template-renderer.component.mjs +1 -1
- package/esm2020/utils/dynamic.directive.mjs +1 -1
- package/esm2020/utils/ng-key2click.directive.mjs +1 -1
- package/esm2020/utils/ng-show.directive.mjs +1 -1
- package/esm2020/utils/safe-html.pipe.mjs +1 -1
- package/esm2020/utils/safe-url.pipe.mjs +1 -1
- package/fesm2015/survey-angular-ui.mjs +38 -27
- package/fesm2015/survey-angular-ui.mjs.map +1 -1
- package/fesm2020/survey-angular-ui.mjs +37 -27
- package/fesm2020/survey-angular-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/popup.survey.component.d.ts +1 -0
- package/survey.component.d.ts +1 -0
|
@@ -112,6 +112,7 @@ class BaseAngular extends EmbeddedViewContentComponent {
|
|
|
112
112
|
(window["__zone_symbol__queueMicrotask"]
|
|
113
113
|
? window["__zone_symbol__queueMicrotask"] : queueMicrotask)(() => {
|
|
114
114
|
if (!this.isDestroyed) {
|
|
115
|
+
this.setIsRendering(true);
|
|
115
116
|
this.detectChanges();
|
|
116
117
|
}
|
|
117
118
|
this.afterUpdate();
|
|
@@ -127,12 +128,19 @@ class BaseAngular extends EmbeddedViewContentComponent {
|
|
|
127
128
|
detectChanges() {
|
|
128
129
|
this.getChangeDetectorRef().detectChanges();
|
|
129
130
|
}
|
|
131
|
+
getShouldReattachChangeDetector() {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
130
134
|
beforeUpdate() {
|
|
131
|
-
this.
|
|
135
|
+
if (this.getShouldReattachChangeDetector()) {
|
|
136
|
+
this.getChangeDetectorRef().detach();
|
|
137
|
+
}
|
|
132
138
|
this.setIsRendering(true);
|
|
133
139
|
}
|
|
134
140
|
afterUpdate() {
|
|
135
|
-
this.
|
|
141
|
+
if (this.getShouldReattachChangeDetector()) {
|
|
142
|
+
this.getChangeDetectorRef().reattach();
|
|
143
|
+
}
|
|
136
144
|
this.setIsRendering(false);
|
|
137
145
|
}
|
|
138
146
|
ngAfterViewChecked() {
|
|
@@ -327,6 +335,9 @@ class PopupBaseContainerComponent extends BaseAngular {
|
|
|
327
335
|
return;
|
|
328
336
|
popupModalModel.apply();
|
|
329
337
|
}
|
|
338
|
+
getShouldReattachChangeDetector() {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
330
341
|
onModelChanged() {
|
|
331
342
|
this.changeDetectorRef.detectChanges();
|
|
332
343
|
}
|
|
@@ -799,6 +810,9 @@ class SurveyComponent extends BaseAngular {
|
|
|
799
810
|
getModel() {
|
|
800
811
|
return this.model;
|
|
801
812
|
}
|
|
813
|
+
getShouldReattachChangeDetector() {
|
|
814
|
+
return false;
|
|
815
|
+
}
|
|
802
816
|
onModelChanged() {
|
|
803
817
|
this.changeDetectorRef.detectChanges();
|
|
804
818
|
}
|
|
@@ -823,6 +837,9 @@ class PopupSurveyComponent extends BaseAngular {
|
|
|
823
837
|
getModel() {
|
|
824
838
|
return this.popup;
|
|
825
839
|
}
|
|
840
|
+
getShouldReattachChangeDetector() {
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
826
843
|
ngOnChanges(changes) {
|
|
827
844
|
if (changes["model"]?.currentValue !== changes["model"]?.previousValue) {
|
|
828
845
|
this.popup = new PopupSurveyModel(null, this.model);
|
|
@@ -1093,30 +1110,32 @@ AngularComponentFactory.Instance.registerComponent("skeleton-question", Question
|
|
|
1093
1110
|
|
|
1094
1111
|
class DropdownComponent extends BaseAngular {
|
|
1095
1112
|
get dropdownModel() {
|
|
1096
|
-
return this.dropdownListModel;
|
|
1113
|
+
return this.model?.dropdownListModel;
|
|
1097
1114
|
}
|
|
1098
1115
|
getModel() {
|
|
1099
1116
|
return this.model;
|
|
1100
1117
|
}
|
|
1101
1118
|
ngOnInit() {
|
|
1102
1119
|
super.ngOnInit();
|
|
1103
|
-
|
|
1120
|
+
if (!this.model.dropdownListModel) {
|
|
1121
|
+
this.model.dropdownListModel = new DropdownListModel(this.model);
|
|
1122
|
+
}
|
|
1104
1123
|
}
|
|
1105
1124
|
ngOnDestroy() {
|
|
1106
1125
|
super.ngOnDestroy();
|
|
1107
|
-
this.
|
|
1126
|
+
this.dropdownModel?.dispose();
|
|
1108
1127
|
}
|
|
1109
1128
|
click(event) {
|
|
1110
|
-
this.
|
|
1129
|
+
this.dropdownModel?.onClick(event);
|
|
1111
1130
|
}
|
|
1112
1131
|
clear(event) {
|
|
1113
|
-
this.
|
|
1132
|
+
this.dropdownModel?.onClear(event);
|
|
1114
1133
|
}
|
|
1115
1134
|
keyhandler(event) {
|
|
1116
|
-
this.
|
|
1135
|
+
this.dropdownModel?.keyHandler(event);
|
|
1117
1136
|
}
|
|
1118
1137
|
blur(event) {
|
|
1119
|
-
this.
|
|
1138
|
+
this.dropdownModel?.onBlur(event);
|
|
1120
1139
|
this.updateInputDomElement();
|
|
1121
1140
|
}
|
|
1122
1141
|
inputChange(event) {
|
|
@@ -1133,10 +1152,10 @@ class DropdownComponent extends BaseAngular {
|
|
|
1133
1152
|
}
|
|
1134
1153
|
}
|
|
1135
1154
|
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1136
|
-
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownComponent, selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", inputs: { model: "model" }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keydown)=\"keyhandler($event)\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.role]=\"model.ariaRole\">\n <div [class]=\"model.cssClasses.controlValue\">\n <ng-container *ngIf=\"model.showInputFieldComponent\">\n <ng-template [component]=\"{ name: model.inputFieldComponentName, data: { model: dropdownModel.getSelectedAction(), question: model } }\"></ng-template>\n </ng-container>\n <sv-ng-string *ngIf=\"model.showSelectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <input #inputElement type=\"text\" autocomplete=\"off\" [(ngModel)]=\"dropdownModel.filterString\" [class]=\"model.cssClasses.filterStringInput\"\n [attr.role]=\"dropdownModel.filterStringEnabled ? model.ariaRole : null\"\n [attr.id]=\"model.getInputId()\"\n [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : -1\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\"\n [attr.aria-label]=\"model.placeholder\"\n [attr.placeholder]=\"model.readOnlyText\" [attr.readonly]=\"!dropdownModel.searchEnabled ? true : null\" \n (change)=\"inputChange($event)\" (blur)=\"blur($event)\" />\n </div>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\"\n [class]=\"model.cssClasses.cleanButton\" (click)=\"clear($event)\" [visible]=\"!model.isEmpty()\">\n <!-- ko component: { name: 'sv-svg-icon', params: { css: model.cssClasses.cleanButtonSvg, iconName: model.cssClasses.cleanButtonIconId, size: 'auto' } } -->\n <!-- /ko -->\n <svg [iconName]=\"model.cssClasses.cleanButtonIconId\" [partCss]=\"model.cssClasses.cleanButtonSvg\" [title]=\"model.clearCaption\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"dropdownModel.popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">\n <sv-ng-string *ngIf=\"model.selectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <div>{{ model.readOnlyText }}</div>\n </div>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }, { type: PopupComponent, selector: "sv-ng-popup, '[sv-ng-popup]'", inputs: ["popupModel"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
1155
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownComponent, selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", inputs: { model: "model" }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keydown)=\"keyhandler($event)\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.role]=\"model.ariaRole\">\n <div [class]=\"model.cssClasses.controlValue\">\n <ng-container *ngIf=\"model.showInputFieldComponent\">\n <ng-template [component]=\"{ name: model.inputFieldComponentName, data: { model: dropdownModel.getSelectedAction(), question: model } }\"></ng-template>\n </ng-container>\n <sv-ng-string *ngIf=\"model.showSelectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <input #inputElement type=\"text\" autocomplete=\"off\" [(ngModel)]=\"dropdownModel.filterString\" [class]=\"model.cssClasses.filterStringInput\"\n [attr.role]=\"dropdownModel.filterStringEnabled ? model.ariaRole : null\"\n [attr.id]=\"model.getInputId()\"\n [attr.inputmode]=\"dropdownModel.inputMode\"\n [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : -1\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\"\n [attr.aria-label]=\"model.placeholder\"\n [attr.placeholder]=\"model.readOnlyText\" [attr.readonly]=\"!dropdownModel.searchEnabled ? true : null\" \n (change)=\"inputChange($event)\" (blur)=\"blur($event)\" />\n </div>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\"\n [class]=\"model.cssClasses.cleanButton\" (click)=\"clear($event)\" [visible]=\"!model.isEmpty()\">\n <!-- ko component: { name: 'sv-svg-icon', params: { css: model.cssClasses.cleanButtonSvg, iconName: model.cssClasses.cleanButtonIconId, size: 'auto' } } -->\n <!-- /ko -->\n <svg [iconName]=\"model.cssClasses.cleanButtonIconId\" [partCss]=\"model.cssClasses.cleanButtonSvg\" [title]=\"model.clearCaption\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"dropdownModel.popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">\n <sv-ng-string *ngIf=\"model.selectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <div>{{ model.readOnlyText }}</div>\n </div>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }, { type: PopupComponent, selector: "sv-ng-popup, '[sv-ng-popup]'", inputs: ["popupModel"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
1137
1156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1138
1157
|
type: Component,
|
|
1139
|
-
args: [{ selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keydown)=\"keyhandler($event)\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.role]=\"model.ariaRole\">\n <div [class]=\"model.cssClasses.controlValue\">\n <ng-container *ngIf=\"model.showInputFieldComponent\">\n <ng-template [component]=\"{ name: model.inputFieldComponentName, data: { model: dropdownModel.getSelectedAction(), question: model } }\"></ng-template>\n </ng-container>\n <sv-ng-string *ngIf=\"model.showSelectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <input #inputElement type=\"text\" autocomplete=\"off\" [(ngModel)]=\"dropdownModel.filterString\" [class]=\"model.cssClasses.filterStringInput\"\n [attr.role]=\"dropdownModel.filterStringEnabled ? model.ariaRole : null\"\n [attr.id]=\"model.getInputId()\"\n [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : -1\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\"\n [attr.aria-label]=\"model.placeholder\"\n [attr.placeholder]=\"model.readOnlyText\" [attr.readonly]=\"!dropdownModel.searchEnabled ? true : null\" \n (change)=\"inputChange($event)\" (blur)=\"blur($event)\" />\n </div>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\"\n [class]=\"model.cssClasses.cleanButton\" (click)=\"clear($event)\" [visible]=\"!model.isEmpty()\">\n <!-- ko component: { name: 'sv-svg-icon', params: { css: model.cssClasses.cleanButtonSvg, iconName: model.cssClasses.cleanButtonIconId, size: 'auto' } } -->\n <!-- /ko -->\n <svg [iconName]=\"model.cssClasses.cleanButtonIconId\" [partCss]=\"model.cssClasses.cleanButtonSvg\" [title]=\"model.clearCaption\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"dropdownModel.popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">\n <sv-ng-string *ngIf=\"model.selectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <div>{{ model.readOnlyText }}</div>\n </div>\n</div>" }]
|
|
1158
|
+
args: [{ selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keydown)=\"keyhandler($event)\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.role]=\"model.ariaRole\">\n <div [class]=\"model.cssClasses.controlValue\">\n <ng-container *ngIf=\"model.showInputFieldComponent\">\n <ng-template [component]=\"{ name: model.inputFieldComponentName, data: { model: dropdownModel.getSelectedAction(), question: model } }\"></ng-template>\n </ng-container>\n <sv-ng-string *ngIf=\"model.showSelectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <input #inputElement type=\"text\" autocomplete=\"off\" [(ngModel)]=\"dropdownModel.filterString\" [class]=\"model.cssClasses.filterStringInput\"\n [attr.role]=\"dropdownModel.filterStringEnabled ? model.ariaRole : null\"\n [attr.id]=\"model.getInputId()\"\n [attr.inputmode]=\"dropdownModel.inputMode\"\n [attr.tabindex]=\"dropdownModel.inputReadOnly ? null : -1\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\"\n [attr.aria-label]=\"model.placeholder\"\n [attr.placeholder]=\"model.readOnlyText\" [attr.readonly]=\"!dropdownModel.searchEnabled ? true : null\" \n (change)=\"inputChange($event)\" (blur)=\"blur($event)\" />\n </div>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\"\n [class]=\"model.cssClasses.cleanButton\" (click)=\"clear($event)\" [visible]=\"!model.isEmpty()\">\n <!-- ko component: { name: 'sv-svg-icon', params: { css: model.cssClasses.cleanButtonSvg, iconName: model.cssClasses.cleanButtonIconId, size: 'auto' } } -->\n <!-- /ko -->\n <svg [iconName]=\"model.cssClasses.cleanButtonIconId\" [partCss]=\"model.cssClasses.cleanButtonSvg\" [title]=\"model.clearCaption\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"dropdownModel.popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">\n <sv-ng-string *ngIf=\"model.selectedItemLocText\" [model]=\"model.selectedItemLocText\"></sv-ng-string>\n <div>{{ model.readOnlyText }}</div>\n </div>\n</div>" }]
|
|
1140
1159
|
}], propDecorators: { model: [{
|
|
1141
1160
|
type: Input
|
|
1142
1161
|
}], inputElementRef: [{
|
|
@@ -1150,10 +1169,10 @@ class TagboxFilterComponent extends BaseAngular {
|
|
|
1150
1169
|
}
|
|
1151
1170
|
}
|
|
1152
1171
|
TagboxFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1153
|
-
TagboxFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TagboxFilterComponent, selector: "sv-tagbox-filter", inputs: { model: "model", question: "question" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <input\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"model.filterString\"\n [attr.id]=\"question.getInputId()\"\n [class]=\"question.cssClasses.filterStringInput\"\n [attr.role]=\"model.filterStringEnabled ? question.ariaRole : null\"\n [attr.readonly]=\"!model.searchEnabled ? true : null\"\n [attr.disabled]=\"question.isInputReadOnly ? true : null\"\n [attr.size]=\"!model.filterString ? 1 : null\"\n [attr.aria-label]=\"question.placeholder\"\n [attr.placeholder]=\"model.filterStringPlaceholder\"\n (keydown)=\"model.inputKeyHandler($event)\"\n (blur)=\"model.onBlur($event)\"\n />\n</ng-template>\n", styles: [":host{display:none}\n"], directives: [{ type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1172
|
+
TagboxFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TagboxFilterComponent, selector: "sv-tagbox-filter", inputs: { model: "model", question: "question" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <input\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"model.filterString\"\n [attr.id]=\"question.getInputId()\"\n [class]=\"question.cssClasses.filterStringInput\"\n [attr.inputmode]=\"model.inputMode\"\n [attr.role]=\"model.filterStringEnabled ? question.ariaRole : null\"\n [attr.readonly]=\"!model.searchEnabled ? true : null\"\n [attr.disabled]=\"question.isInputReadOnly ? true : null\"\n [attr.size]=\"!model.filterString ? 1 : null\"\n [attr.aria-label]=\"question.placeholder\"\n [attr.placeholder]=\"model.filterStringPlaceholder\"\n (keydown)=\"model.inputKeyHandler($event)\"\n (blur)=\"model.onBlur($event)\"\n />\n</ng-template>\n", styles: [":host{display:none}\n"], directives: [{ type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1154
1173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxFilterComponent, decorators: [{
|
|
1155
1174
|
type: Component,
|
|
1156
|
-
args: [{ selector: "sv-tagbox-filter", template: "<ng-template #template>\n <input\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"model.filterString\"\n [attr.id]=\"question.getInputId()\"\n [class]=\"question.cssClasses.filterStringInput\"\n [attr.role]=\"model.filterStringEnabled ? question.ariaRole : null\"\n [attr.readonly]=\"!model.searchEnabled ? true : null\"\n [attr.disabled]=\"question.isInputReadOnly ? true : null\"\n [attr.size]=\"!model.filterString ? 1 : null\"\n [attr.aria-label]=\"question.placeholder\"\n [attr.placeholder]=\"model.filterStringPlaceholder\"\n (keydown)=\"model.inputKeyHandler($event)\"\n (blur)=\"model.onBlur($event)\"\n />\n</ng-template>\n", styles: [":host{display:none}\n"] }]
|
|
1175
|
+
args: [{ selector: "sv-tagbox-filter", template: "<ng-template #template>\n <input\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"model.filterString\"\n [attr.id]=\"question.getInputId()\"\n [class]=\"question.cssClasses.filterStringInput\"\n [attr.inputmode]=\"model.inputMode\"\n [attr.role]=\"model.filterStringEnabled ? question.ariaRole : null\"\n [attr.readonly]=\"!model.searchEnabled ? true : null\"\n [attr.disabled]=\"question.isInputReadOnly ? true : null\"\n [attr.size]=\"!model.filterString ? 1 : null\"\n [attr.aria-label]=\"question.placeholder\"\n [attr.placeholder]=\"model.filterStringPlaceholder\"\n (keydown)=\"model.inputKeyHandler($event)\"\n (blur)=\"model.onBlur($event)\"\n />\n</ng-template>\n", styles: [":host{display:none}\n"] }]
|
|
1157
1176
|
}], propDecorators: { model: [{
|
|
1158
1177
|
type: Input
|
|
1159
1178
|
}], question: [{
|
|
@@ -1433,8 +1452,11 @@ class SelectBaseComponent extends QuestionAngular {
|
|
|
1433
1452
|
return this.model.getItemValueWrapperComponentName(item) || this.getDefaultComponentName();
|
|
1434
1453
|
}
|
|
1435
1454
|
getItemValueComponentData(item) {
|
|
1455
|
+
const itemComponentProperty = this.model.getPropertyByName("itemComponent");
|
|
1456
|
+
const isDefaultItemComponent = itemComponentProperty.isDefaultValue(this.model.itemComponent);
|
|
1457
|
+
const itemComponentName = isDefaultItemComponent ? this.getDefaultComponentName() : this.model.itemComponent;
|
|
1436
1458
|
return {
|
|
1437
|
-
componentName:
|
|
1459
|
+
componentName: itemComponentName,
|
|
1438
1460
|
componentData: {
|
|
1439
1461
|
question: this.model,
|
|
1440
1462
|
model: item,
|
|
@@ -1498,19 +1520,7 @@ class CheckboxItemComponent {
|
|
|
1498
1520
|
constructor() {
|
|
1499
1521
|
}
|
|
1500
1522
|
onChange(event) {
|
|
1501
|
-
|
|
1502
|
-
var index = newValue.indexOf(this.model.value);
|
|
1503
|
-
if (event.target.checked) {
|
|
1504
|
-
if (index < 0) {
|
|
1505
|
-
newValue.push(this.model.value);
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
else {
|
|
1509
|
-
if (index > -1) {
|
|
1510
|
-
newValue.splice(index, 1);
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
this.question.renderedValue = newValue;
|
|
1523
|
+
this.question.clickItemHandler(this.model, event.target.checked);
|
|
1514
1524
|
}
|
|
1515
1525
|
onSelectAllChange(event) {
|
|
1516
1526
|
this.question.toggleSelectAll();
|