survey-angular-ui 1.9.43 → 1.9.44
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 +214 -214
- package/angular-ui.d.ts +27 -0
- package/angular-ui.module.d.ts +92 -0
- package/base-angular.d.ts +25 -0
- package/comment.component.d.ts +8 -0
- package/component-factory.d.ts +9 -0
- package/components/action-bar/action-bar-item-dropdown.component.d.ts +12 -0
- package/components/action-bar/action-bar-item.component.d.ts +8 -0
- package/components/action-bar/action-bar.component.d.ts +16 -0
- package/components/action-bar/action.component.d.ts +11 -0
- package/components/brand-info/brand-info.component.d.ts +5 -0
- package/components/dropdown/dropdown.component.d.ts +16 -0
- package/components/element-header/element-header.component.d.ts +9 -0
- package/components/element-title/dynamic-head.component.d.ts +10 -0
- package/components/element-title/element-title.component.d.ts +7 -0
- package/components/list/list-item.component.d.ts +16 -0
- package/components/list/list.component.d.ts +11 -0
- package/components/matrix-actions/detail-button/detail-button.component.d.ts +11 -0
- package/components/matrix-actions/drag-drop-icon/drag-drop-icon.d.ts +10 -0
- package/components/matrix-actions/remove-button/remove-button.component.d.ts +10 -0
- package/components/paneldynamic-actions/paneldynamic-add-btn.component.d.ts +14 -0
- package/components/paneldynamic-actions/paneldynamic-next-btn.component.d.ts +7 -0
- package/components/paneldynamic-actions/paneldynamic-prev-btn.component.d.ts +7 -0
- package/components/paneldynamic-actions/paneldynamic-progress-text.component.d.ts +6 -0
- package/components/popup/popup-container.component.d.ts +16 -0
- package/components/popup/popup.component.d.ts +17 -0
- package/components/popup/popup.service.d.ts +13 -0
- package/components/progress/buttons/progress.component.d.ts +24 -0
- package/components/progress/default/progress.component.d.ts +9 -0
- package/components/renderAs/boolean-checkbox/boolean-checkbox.component.d.ts +6 -0
- package/components/renderAs/boolean-radio/boolean-radio-item.component.d.ts +10 -0
- package/components/renderAs/boolean-radio/boolean-radio.component.d.ts +7 -0
- package/components/renderAs/dropdown-select/dropdown-option-item.component.d.ts +8 -0
- package/components/renderAs/dropdown-select/dropdown-select.component.d.ts +10 -0
- package/components/renderAs/rating-dropdown/rating-dropdown.component.d.ts +6 -0
- package/components/skeleton.component.d.ts +6 -0
- package/components/survey-actions/survey-nav-btn.component.d.ts +10 -0
- package/components/survey-header/survey-header.component.d.ts +11 -0
- package/components/svg-icon/svg-icon.component.d.ts +20 -0
- package/components/tagbox/tagbox-item.component.d.ts +11 -0
- package/components/tagbox/tagbox.component.d.ts +16 -0
- package/element.component.d.ts +9 -0
- package/embedded-view-content.component.d.ts +11 -0
- package/errors.component.d.ts +19 -0
- package/esm2020/angular-ui.mjs +28 -0
- package/esm2020/angular-ui.module.mjs +138 -0
- package/esm2020/base-angular.mjs +101 -0
- package/esm2020/comment.component.mjs +16 -0
- package/esm2020/component-factory.mjs +26 -0
- package/esm2020/components/action-bar/action-bar-item-dropdown.component.mjs +32 -0
- package/esm2020/components/action-bar/action-bar-item.component.mjs +22 -0
- package/esm2020/components/action-bar/action-bar.component.mjs +43 -0
- package/esm2020/components/action-bar/action.component.mjs +27 -0
- package/esm2020/components/brand-info/brand-info.component.mjs +13 -0
- package/esm2020/components/dropdown/dropdown.component.mjs +39 -0
- package/esm2020/components/element-header/element-header.component.mjs +30 -0
- package/esm2020/components/element-title/dynamic-head.component.mjs +20 -0
- package/esm2020/components/element-title/element-title.component.mjs +18 -0
- package/esm2020/components/list/list-item.component.mjs +44 -0
- package/esm2020/components/list/list.component.mjs +32 -0
- package/esm2020/components/matrix-actions/detail-button/detail-button.component.mjs +25 -0
- package/esm2020/components/matrix-actions/drag-drop-icon/drag-drop-icon.mjs +24 -0
- package/esm2020/components/matrix-actions/remove-button/remove-button.component.mjs +25 -0
- package/esm2020/components/paneldynamic-actions/paneldynamic-add-btn.component.mjs +35 -0
- package/esm2020/components/paneldynamic-actions/paneldynamic-next-btn.component.mjs +18 -0
- package/esm2020/components/paneldynamic-actions/paneldynamic-prev-btn.component.mjs +18 -0
- package/esm2020/components/paneldynamic-actions/paneldynamic-progress-text.component.mjs +14 -0
- package/esm2020/components/popup/popup-container.component.mjs +48 -0
- package/esm2020/components/popup/popup.component.mjs +37 -0
- package/esm2020/components/popup/popup.service.mjs +26 -0
- package/esm2020/components/progress/buttons/progress.component.mjs +67 -0
- package/esm2020/components/progress/default/progress.component.mjs +27 -0
- package/esm2020/components/renderAs/boolean-checkbox/boolean-checkbox.component.mjs +20 -0
- package/esm2020/components/renderAs/boolean-radio/boolean-radio-item.component.mjs +22 -0
- package/esm2020/components/renderAs/boolean-radio/boolean-radio.component.mjs +18 -0
- package/esm2020/components/renderAs/dropdown-select/dropdown-option-item.component.mjs +23 -0
- package/esm2020/components/renderAs/dropdown-select/dropdown-select.component.mjs +38 -0
- package/esm2020/components/renderAs/rating-dropdown/rating-dropdown.component.mjs +18 -0
- package/esm2020/components/skeleton.component.mjs +15 -0
- package/esm2020/components/survey-actions/survey-nav-btn.component.mjs +22 -0
- package/esm2020/components/survey-header/survey-header.component.mjs +23 -0
- package/esm2020/components/svg-icon/svg-icon.component.mjs +68 -0
- package/esm2020/components/tagbox/tagbox-item.component.mjs +27 -0
- package/esm2020/components/tagbox/tagbox.component.mjs +40 -0
- package/esm2020/element.component.mjs +18 -0
- package/esm2020/embedded-view-content.component.mjs +24 -0
- package/esm2020/errors.component.mjs +58 -0
- package/esm2020/page.component.mjs +34 -0
- package/esm2020/panel.component.mjs +37 -0
- package/esm2020/question.component.mjs +41 -0
- package/esm2020/question.mjs +33 -0
- package/esm2020/questions/boolean.component.mjs +20 -0
- package/esm2020/questions/checkbox-item.component.mjs +36 -0
- package/esm2020/questions/checkbox.component.mjs +17 -0
- package/esm2020/questions/comment.component.mjs +18 -0
- package/esm2020/questions/composite.component.mjs +21 -0
- package/esm2020/questions/custom.component.mjs +27 -0
- package/esm2020/questions/customwidget.component.mjs +51 -0
- package/esm2020/questions/dropdown.component.mjs +17 -0
- package/esm2020/questions/expression.component.mjs +17 -0
- package/esm2020/questions/file.component.mjs +25 -0
- package/esm2020/questions/html.component.mjs +25 -0
- package/esm2020/questions/image.component.mjs +16 -0
- package/esm2020/questions/imagepicker-item.component.mjs +45 -0
- package/esm2020/questions/imagepicker.component.mjs +16 -0
- package/esm2020/questions/matrix.component.mjs +35 -0
- package/esm2020/questions/matrixcell.component.mjs +60 -0
- package/esm2020/questions/matrixdropdown.component.mjs +16 -0
- package/esm2020/questions/matrixdynamic.component.mjs +17 -0
- package/esm2020/questions/matrixrequiredheader.component.mjs +24 -0
- package/esm2020/questions/matrixtable.component.mjs +29 -0
- package/esm2020/questions/multipletext.component.mjs +25 -0
- package/esm2020/questions/multipletextitem.component.mjs +23 -0
- package/esm2020/questions/paneldynamic.component.mjs +55 -0
- package/esm2020/questions/radiogroup-item.component.mjs +18 -0
- package/esm2020/questions/radiogroup.component.mjs +22 -0
- package/esm2020/questions/ranking-item.component.mjs +22 -0
- package/esm2020/questions/ranking.component.mjs +22 -0
- package/esm2020/questions/rating.component.mjs +23 -0
- package/esm2020/questions/selectbase-item.mjs +32 -0
- package/esm2020/questions/selectbase.component.mjs +24 -0
- package/esm2020/questions/signature.component.mjs +17 -0
- package/esm2020/questions/tagbox.component.mjs +17 -0
- package/esm2020/questions/text.component.mjs +26 -0
- package/esm2020/row.component.mjs +22 -0
- package/esm2020/string-editor.component.mjs +26 -0
- package/esm2020/string-viewer.component.mjs +32 -0
- package/esm2020/survey-angular-ui.mjs +5 -0
- package/esm2020/survey-string.component.mjs +17 -0
- package/esm2020/survey.component.mjs +50 -0
- package/esm2020/utils/dynamic.directive.mjs +44 -0
- package/esm2020/utils/ng-key2click.directive.mjs +69 -0
- package/esm2020/utils/ng-show.directive.mjs +27 -0
- package/esm2020/utils/safe-html.pipe.mjs +18 -0
- package/esm2020/utils/safe-url.pipe.mjs +33 -0
- package/fesm2015/survey-angular-ui.mjs +2201 -0
- package/fesm2015/survey-angular-ui.mjs.map +1 -0
- package/fesm2020/survey-angular-ui.mjs +2181 -0
- package/fesm2020/survey-angular-ui.mjs.map +1 -0
- package/package.json +1 -11
- package/page.component.d.ts +14 -0
- package/panel.component.d.ts +13 -0
- package/question.component.d.ts +13 -0
- package/question.d.ts +13 -0
- package/questions/boolean.component.d.ts +8 -0
- package/questions/checkbox-item.component.d.ts +11 -0
- package/questions/checkbox.component.d.ts +7 -0
- package/questions/comment.component.d.ts +8 -0
- package/questions/composite.component.d.ts +8 -0
- package/questions/custom.component.d.ts +10 -0
- package/questions/customwidget.component.d.ts +18 -0
- package/questions/dropdown.component.d.ts +7 -0
- package/questions/expression.component.d.ts +7 -0
- package/questions/file.component.d.ts +8 -0
- package/questions/html.component.d.ts +9 -0
- package/questions/image.component.d.ts +7 -0
- package/questions/imagepicker-item.component.d.ts +14 -0
- package/questions/imagepicker.component.d.ts +7 -0
- package/questions/matrix.component.d.ts +11 -0
- package/questions/matrixcell.component.d.ts +20 -0
- package/questions/matrixdropdown.component.d.ts +7 -0
- package/questions/matrixdynamic.component.d.ts +7 -0
- package/questions/matrixrequiredheader.component.d.ts +10 -0
- package/questions/matrixtable.component.d.ts +12 -0
- package/questions/multipletext.component.d.ts +9 -0
- package/questions/multipletextitem.component.d.ts +10 -0
- package/questions/paneldynamic.component.d.ts +12 -0
- package/questions/radiogroup-item.component.d.ts +8 -0
- package/questions/radiogroup.component.d.ts +8 -0
- package/questions/ranking-item.component.d.ts +11 -0
- package/questions/ranking.component.d.ts +8 -0
- package/questions/rating.component.d.ts +9 -0
- package/questions/selectbase-item.d.ts +12 -0
- package/questions/selectbase.component.d.ts +10 -0
- package/questions/signature.component.d.ts +7 -0
- package/questions/tagbox.component.d.ts +7 -0
- package/questions/text.component.d.ts +9 -0
- package/row.component.d.ts +10 -0
- package/string-editor.component.d.ts +9 -0
- package/string-viewer.component.d.ts +13 -0
- package/survey-angular-ui.d.ts +5 -5
- package/survey-string.component.d.ts +7 -0
- package/survey.component.d.ts +16 -0
- package/utils/dynamic.directive.d.ts +19 -0
- package/utils/ng-key2click.directive.d.ts +21 -0
- package/utils/ng-show.directive.d.ts +12 -0
- package/utils/safe-html.pipe.d.ts +10 -0
- package/utils/safe-url.pipe.d.ts +17 -0
|
@@ -0,0 +1,2181 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef, Component, ViewChild, Input, Directive, ViewContainerRef, Pipe, ElementRef, HostBinding, HostListener, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import * as Survey from 'survey-core';
|
|
4
|
+
import { SvgRegistry, TooltipManager, LocalizableString, PopupBaseViewModel, DropdownListModel, RendererFactory, doKey2ClickDown, doKey2ClickUp, doKey2ClickBlur, ActionDropdownViewModel, SurveyProgressModel, SurveyProgressButtonsModel } from 'survey-core';
|
|
5
|
+
import * as i3 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i1 from '@angular/platform-browser';
|
|
8
|
+
import * as i2 from '@angular/forms';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import { DomPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
11
|
+
|
|
12
|
+
class EmbeddedViewContentComponent {
|
|
13
|
+
constructor(viewContainerRef) {
|
|
14
|
+
this.viewContainerRef = viewContainerRef;
|
|
15
|
+
}
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
if (!!this.templateRef) {
|
|
18
|
+
this.embeddedView = this.viewContainerRef?.createEmbeddedView(this.templateRef);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
EmbeddedViewContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EmbeddedViewContentComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
EmbeddedViewContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: EmbeddedViewContentComponent, selector: "ng-component", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "", isInline: true });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EmbeddedViewContentComponent, decorators: [{
|
|
25
|
+
type: Component,
|
|
26
|
+
args: [{
|
|
27
|
+
template: "",
|
|
28
|
+
}]
|
|
29
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateRef: [{
|
|
30
|
+
type: ViewChild,
|
|
31
|
+
args: ["template", { read: TemplateRef, static: true }]
|
|
32
|
+
}] } });
|
|
33
|
+
|
|
34
|
+
class BaseAngular extends EmbeddedViewContentComponent {
|
|
35
|
+
constructor(changeDetectorRef, viewContainerRef) {
|
|
36
|
+
super(viewContainerRef);
|
|
37
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
38
|
+
this.isModelSubsribed = false;
|
|
39
|
+
}
|
|
40
|
+
ngDoCheck() {
|
|
41
|
+
if (this.previousModel !== this.getModel()) {
|
|
42
|
+
this.unMakeBaseElementAngular(this.previousModel);
|
|
43
|
+
this.previousModel = this.getModel();
|
|
44
|
+
this.makeBaseElementAngular(this.getModel());
|
|
45
|
+
this.onModelChanged();
|
|
46
|
+
}
|
|
47
|
+
this.beforeUpdate();
|
|
48
|
+
}
|
|
49
|
+
onModelChanged() { }
|
|
50
|
+
setIsRendering(val) {
|
|
51
|
+
const model = this.getModel();
|
|
52
|
+
if (!!model) {
|
|
53
|
+
model.isRendering = val;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
getIsRendering() {
|
|
57
|
+
const model = this.getModel();
|
|
58
|
+
return !!model && !!model.isRendering;
|
|
59
|
+
}
|
|
60
|
+
ngOnDestroy() {
|
|
61
|
+
this.unMakeBaseElementAngular(this.getModel());
|
|
62
|
+
}
|
|
63
|
+
makeBaseElementAngular(stateElement) {
|
|
64
|
+
if (!!stateElement && !stateElement.__ngImplemented) {
|
|
65
|
+
this.isModelSubsribed = true;
|
|
66
|
+
stateElement.__ngImplemented = true;
|
|
67
|
+
stateElement.iteratePropertiesHash((hash, key) => {
|
|
68
|
+
var val = hash[key];
|
|
69
|
+
if (Array.isArray(val)) {
|
|
70
|
+
var val = val;
|
|
71
|
+
val["onArrayChanged"] = (arrayChanges) => {
|
|
72
|
+
this.update();
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
stateElement.setPropertyValueCoreHandler = (hash, key, val) => {
|
|
77
|
+
if (hash[key] !== val) {
|
|
78
|
+
hash[key] = val;
|
|
79
|
+
this.update();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
unMakeBaseElementAngular(stateElement) {
|
|
85
|
+
if (!!stateElement && this.isModelSubsribed) {
|
|
86
|
+
this.isModelSubsribed = false;
|
|
87
|
+
stateElement.__ngImplemented = false;
|
|
88
|
+
stateElement.setPropertyValueCoreHandler = undefined;
|
|
89
|
+
stateElement.iteratePropertiesHash((hash, key) => {
|
|
90
|
+
var val = hash[key];
|
|
91
|
+
if (Array.isArray(val)) {
|
|
92
|
+
var val = val;
|
|
93
|
+
val["onArrayChanged"] = () => { };
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
update() {
|
|
99
|
+
if (this.getIsRendering())
|
|
100
|
+
return;
|
|
101
|
+
this.beforeUpdate();
|
|
102
|
+
this.detectChanges();
|
|
103
|
+
this.afterUpdate();
|
|
104
|
+
}
|
|
105
|
+
detectChanges() {
|
|
106
|
+
if (!!this.embeddedView) {
|
|
107
|
+
this.embeddedView.detectChanges();
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.changeDetectorRef.detectChanges();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
beforeUpdate() {
|
|
114
|
+
this.setIsRendering(true);
|
|
115
|
+
}
|
|
116
|
+
afterUpdate() {
|
|
117
|
+
this.setIsRendering(false);
|
|
118
|
+
}
|
|
119
|
+
ngAfterViewChecked() {
|
|
120
|
+
this.afterUpdate();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
BaseAngular.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BaseAngular, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
+
BaseAngular.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BaseAngular, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BaseAngular, decorators: [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{
|
|
128
|
+
template: ""
|
|
129
|
+
}]
|
|
130
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; } });
|
|
131
|
+
|
|
132
|
+
class DynamicHeadComponent extends EmbeddedViewContentComponent {
|
|
133
|
+
get ariaLabel() {
|
|
134
|
+
return this.element.getType() !== "radiogroup" ? this.element.locTitle.renderedHtml : null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
DynamicHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DynamicHeadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
DynamicHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DynamicHeadComponent, selector: "sv-ng-dynamic-head", inputs: { tagName: "tagName", element: "element" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <ng-container [ngSwitch]=\"tagName\">\n <h1 *ngSwitchCase=\"'h1'\" [class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h1>\n <h2 *ngSwitchCase=\"'h2'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h2>\n <h3 *ngSwitchCase=\"'h3'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h3>\n <h4 *ngSwitchCase=\"'h4'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h4>\n <h5 *ngSwitchCase=\"'h5'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h5>\n <h6 *ngSwitchCase=\"'h6'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h6>\n </ng-container>\n <ng-template #titleContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>", styles: [":host{display:none}\n"], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DynamicHeadComponent, decorators: [{
|
|
140
|
+
type: Component,
|
|
141
|
+
args: [{ selector: "sv-ng-dynamic-head", template: "<ng-template #template>\n <ng-container [ngSwitch]=\"tagName\">\n <h1 *ngSwitchCase=\"'h1'\" [class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h1>\n <h2 *ngSwitchCase=\"'h2'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h2>\n <h3 *ngSwitchCase=\"'h3'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h3>\n <h4 *ngSwitchCase=\"'h4'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h4>\n <h5 *ngSwitchCase=\"'h5'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h5>\n <h6 *ngSwitchCase=\"'h6'\"[class]=\"element.cssTitle\" [id]=\"element.ariaTitleId\" [attr.tabindex]=\"element.titleTabIndex\" [attr.aria-expanded]=\"element.titleAriaExpanded\" [attr.aria-label]=\"ariaLabel\"><ng-container *ngTemplateOutlet=\"titleContent\"></ng-container></h6>\n </ng-container>\n <ng-template #titleContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
142
|
+
}], propDecorators: { tagName: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], element: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}] } });
|
|
147
|
+
|
|
148
|
+
class AngularComponentFactory {
|
|
149
|
+
constructor() {
|
|
150
|
+
this.creatorHash = {};
|
|
151
|
+
}
|
|
152
|
+
registerComponent(typeName, componentType) {
|
|
153
|
+
this.creatorHash[typeName] = componentType;
|
|
154
|
+
}
|
|
155
|
+
getAllTypes() {
|
|
156
|
+
var result = new Array();
|
|
157
|
+
for (var key in this.creatorHash) {
|
|
158
|
+
result.push(key);
|
|
159
|
+
}
|
|
160
|
+
return result.sort();
|
|
161
|
+
}
|
|
162
|
+
isComponentRegistered(elementType) {
|
|
163
|
+
return !!this.creatorHash[elementType];
|
|
164
|
+
}
|
|
165
|
+
create(containerRef, elementType, params) {
|
|
166
|
+
var componentType = this.creatorHash[elementType];
|
|
167
|
+
if (!componentType)
|
|
168
|
+
return null;
|
|
169
|
+
return containerRef.createComponent(componentType);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
AngularComponentFactory.Instance = new AngularComponentFactory();
|
|
173
|
+
|
|
174
|
+
class DynamicComponentDirective {
|
|
175
|
+
constructor(containerRef) {
|
|
176
|
+
this.containerRef = containerRef;
|
|
177
|
+
}
|
|
178
|
+
ngOnChanges(changes) {
|
|
179
|
+
const componentChanges = changes["component"];
|
|
180
|
+
if (componentChanges.currentValue.name !== componentChanges.previousValue?.name) {
|
|
181
|
+
this.createComponent();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.updateComponentData();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
createComponent() {
|
|
188
|
+
this.containerRef.clear();
|
|
189
|
+
if (AngularComponentFactory.Instance.isComponentRegistered(this.component.name)) {
|
|
190
|
+
this.componentInstance = AngularComponentFactory.Instance.create(this.containerRef, this.component.name).instance;
|
|
191
|
+
}
|
|
192
|
+
else if (this.component.default) {
|
|
193
|
+
this.componentInstance = AngularComponentFactory.Instance.create(this.containerRef, this.component.default).instance;
|
|
194
|
+
}
|
|
195
|
+
this.updateComponentData();
|
|
196
|
+
}
|
|
197
|
+
updateComponentData() {
|
|
198
|
+
const data = this.component.data;
|
|
199
|
+
Object.keys(data).forEach((key) => {
|
|
200
|
+
this.componentInstance[key] = data[key];
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
DynamicComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DynamicComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
205
|
+
DynamicComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: DynamicComponentDirective, selector: "[component]", inputs: { component: "component" }, usesOnChanges: true, ngImport: i0 });
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DynamicComponentDirective, decorators: [{
|
|
207
|
+
type: Directive,
|
|
208
|
+
args: [{
|
|
209
|
+
selector: "[component]"
|
|
210
|
+
}]
|
|
211
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { component: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}] } });
|
|
214
|
+
|
|
215
|
+
class ActionComponent extends BaseAngular {
|
|
216
|
+
getModel() {
|
|
217
|
+
return this.model;
|
|
218
|
+
}
|
|
219
|
+
getComponentName() {
|
|
220
|
+
return this.model.component || "sv-action-bar-item";
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
ActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
224
|
+
ActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ActionComponent, selector: "sv-ng-action", inputs: { model: "model" }, viewQueries: [{ propertyName: "actionContent", first: true, predicate: ["actionContent"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: "\n<ng-template #template>\n <div [class]=\"model.getActionRootCss()\" [id]=\"model.id\">\n <div class=\"sv-action__content\">\n <ng-container *ngIf=\"model.needSeparator\">\n <div class=\"sv-action-bar-separator\"></div>\n </ng-container>\n <ng-template [component]=\"{ name: getComponentName(), data: { model }, default: 'sv-action-bar-item'}\"></ng-template>\n </div>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionComponent, decorators: [{
|
|
226
|
+
type: Component,
|
|
227
|
+
args: [{ selector: "sv-ng-action", styles: [":host { display: none; }"], template: "\n<ng-template #template>\n <div [class]=\"model.getActionRootCss()\" [id]=\"model.id\">\n <div class=\"sv-action__content\">\n <ng-container *ngIf=\"model.needSeparator\">\n <div class=\"sv-action-bar-separator\"></div>\n </ng-container>\n <ng-template [component]=\"{ name: getComponentName(), data: { model }, default: 'sv-action-bar-item'}\"></ng-template>\n </div>\n </div>\n</ng-template>" }]
|
|
228
|
+
}], propDecorators: { model: [{
|
|
229
|
+
type: Input
|
|
230
|
+
}], actionContent: [{
|
|
231
|
+
type: ViewChild,
|
|
232
|
+
args: ["actionContent", { read: ViewContainerRef, static: true }]
|
|
233
|
+
}] } });
|
|
234
|
+
AngularComponentFactory.Instance.registerComponent("sv-action", ActionComponent);
|
|
235
|
+
|
|
236
|
+
class ActionBarComponent extends BaseAngular {
|
|
237
|
+
getModel() {
|
|
238
|
+
return this.model;
|
|
239
|
+
}
|
|
240
|
+
get allowOnClick() {
|
|
241
|
+
return this.handleClick !== undefined ? this.handleClick : true;
|
|
242
|
+
}
|
|
243
|
+
onClick(event) {
|
|
244
|
+
if (this.allowOnClick) {
|
|
245
|
+
event.stopPropagation();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
ngAfterViewInit() {
|
|
249
|
+
if (!!this.model.hasActions) {
|
|
250
|
+
this.model.initResponsivityManager(this.container.nativeElement);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
ngOnDestroy() {
|
|
254
|
+
super.ngOnDestroy();
|
|
255
|
+
this.model.resetResponsivityManager();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
ActionBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
259
|
+
ActionBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: { model: "model", handleClick: "handleClick" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div *ngIf=\"model.hasActions\" [class]=\"model.getRootCss()\" (click)=\"onClick($event)\" #container>\n <ng-container *ngFor=\"let action of model.renderedActions\">\n <sv-ng-action [model]=\"action\"></sv-ng-action>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: ActionComponent, selector: "sv-ng-action", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarComponent, decorators: [{
|
|
261
|
+
type: Component,
|
|
262
|
+
args: [{ selector: "sv-action-bar, sv-ng-action-bar", styles: [":host { display: none }"], template: "<ng-template #template>\n <div *ngIf=\"model.hasActions\" [class]=\"model.getRootCss()\" (click)=\"onClick($event)\" #container>\n <ng-container *ngFor=\"let action of model.renderedActions\">\n <sv-ng-action [model]=\"action\"></sv-ng-action>\n </ng-container>\n </div>\n</ng-template>" }]
|
|
263
|
+
}], propDecorators: { model: [{
|
|
264
|
+
type: Input
|
|
265
|
+
}], handleClick: [{
|
|
266
|
+
type: Input
|
|
267
|
+
}], container: [{
|
|
268
|
+
type: ViewChild,
|
|
269
|
+
args: ["container"]
|
|
270
|
+
}] } });
|
|
271
|
+
AngularComponentFactory.Instance.registerComponent("sv-action-bar", ActionBarComponent);
|
|
272
|
+
|
|
273
|
+
class SurveyStringComponent {
|
|
274
|
+
}
|
|
275
|
+
SurveyStringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyStringComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
+
SurveyStringComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: { model: "model" }, ngImport: i0, template: "<ng-template [component]='{ name: model.renderAs, data: { model: model.renderAsData } }'></ng-template>", isInline: true, directives: [{ type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyStringComponent, decorators: [{
|
|
278
|
+
type: Component,
|
|
279
|
+
args: [{
|
|
280
|
+
selector: "sv-ng-string, '[sv-ng-string]'",
|
|
281
|
+
template: "<ng-template [component]='{ name: model.renderAs, data: { model: model.renderAsData } }'></ng-template>"
|
|
282
|
+
}]
|
|
283
|
+
}], propDecorators: { model: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}] } });
|
|
286
|
+
|
|
287
|
+
class ElementTitleComponent extends EmbeddedViewContentComponent {
|
|
288
|
+
}
|
|
289
|
+
ElementTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementTitleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
+
ElementTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ElementTitleComponent, selector: "sv-ng-element-title", inputs: { element: "element" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <sv-ng-dynamic-head [tagName]=\"element.titleTagName\" [element]=\"element\" *ngIf=\"element.hasTitle\">\n <ng-container *ngIf=\"!element.hasTitleActions\">\n <ng-container *ngTemplateOutlet=\"elementTitleContent\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"element.hasTitleActions\">\n <div class=\"sv-title-actions\">\n <span class=\"sv-title-actions__title\">\n <ng-container *ngTemplateOutlet=\"elementTitleContent\"></ng-container>\n </span>\n <sv-ng-action-bar [model]=\"element.getTitleToolbar()\"></sv-ng-action-bar>\n </div>\n </ng-container>\n </sv-ng-dynamic-head>\n <ng-template #elementTitleContent>\n <sv-ng-string *ngIf=\"!element.isTitleOwner\" [model]=\"element.locTitle\"></sv-ng-string>\n <ng-container *ngIf=\"element.isTitleOwner\">\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextOnStart\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span>\n <span\n *ngIf=\"element.isTitleOwner && element.no\"\n style=\"position: static\"\n [class]=\"element.cssClasses.number\"\n [attr.aria-hidden]=\"true\"\n >{{ element.no }}</span>\n <span *ngIf=\"element.isTitleOwner && element.no\"> </span>\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextBeforeTitle\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span>\n <span *ngIf=\"element.isTitleOwner && element.isRequireTextBeforeTitle\"> </span>\n <sv-ng-string *ngIf=\"element.isTitleOwner\" [model]=\"element.locTitle\"></sv-ng-string>\n <span *ngIf=\"element.isTitleOwner && element.isRequireTextAfterTitle\"> </span>\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextAfterTitle\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span> \n </ng-container>\n </ng-template>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: DynamicHeadComponent, selector: "sv-ng-dynamic-head", inputs: ["tagName", "element"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementTitleComponent, decorators: [{
|
|
292
|
+
type: Component,
|
|
293
|
+
args: [{ selector: "sv-ng-element-title", template: "<ng-template #template>\n <sv-ng-dynamic-head [tagName]=\"element.titleTagName\" [element]=\"element\" *ngIf=\"element.hasTitle\">\n <ng-container *ngIf=\"!element.hasTitleActions\">\n <ng-container *ngTemplateOutlet=\"elementTitleContent\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"element.hasTitleActions\">\n <div class=\"sv-title-actions\">\n <span class=\"sv-title-actions__title\">\n <ng-container *ngTemplateOutlet=\"elementTitleContent\"></ng-container>\n </span>\n <sv-ng-action-bar [model]=\"element.getTitleToolbar()\"></sv-ng-action-bar>\n </div>\n </ng-container>\n </sv-ng-dynamic-head>\n <ng-template #elementTitleContent>\n <sv-ng-string *ngIf=\"!element.isTitleOwner\" [model]=\"element.locTitle\"></sv-ng-string>\n <ng-container *ngIf=\"element.isTitleOwner\">\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextOnStart\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span>\n <span\n *ngIf=\"element.isTitleOwner && element.no\"\n style=\"position: static\"\n [class]=\"element.cssClasses.number\"\n [attr.aria-hidden]=\"true\"\n >{{ element.no }}</span>\n <span *ngIf=\"element.isTitleOwner && element.no\"> </span>\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextBeforeTitle\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span>\n <span *ngIf=\"element.isTitleOwner && element.isRequireTextBeforeTitle\"> </span>\n <sv-ng-string *ngIf=\"element.isTitleOwner\" [model]=\"element.locTitle\"></sv-ng-string>\n <span *ngIf=\"element.isTitleOwner && element.isRequireTextAfterTitle\"> </span>\n <span\n *ngIf=\"element.isTitleOwner && element.isRequireTextAfterTitle\"\n [class]=\"element.cssClasses.requiredText\"\n [attr.aria-hidden]=\"true\"\n >{{ element.requiredText }}</span> \n </ng-container>\n </ng-template>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
294
|
+
}], propDecorators: { element: [{
|
|
295
|
+
type: Input
|
|
296
|
+
}] } });
|
|
297
|
+
|
|
298
|
+
//temp: disables angular sanitizer, which breaks a links
|
|
299
|
+
class SafeUrlPipe {
|
|
300
|
+
constructor(domSanitizer) {
|
|
301
|
+
this.domSanitizer = domSanitizer;
|
|
302
|
+
}
|
|
303
|
+
transform(url) {
|
|
304
|
+
return this.domSanitizer.bypassSecurityTrustUrl(url);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
SafeUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
308
|
+
SafeUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeUrlPipe, name: "safeUrl" });
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeUrlPipe, decorators: [{
|
|
310
|
+
type: Pipe,
|
|
311
|
+
args: [{ name: "safeUrl" }]
|
|
312
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
313
|
+
class SafeResourceUrlPipe {
|
|
314
|
+
constructor(domSanitizer) {
|
|
315
|
+
this.domSanitizer = domSanitizer;
|
|
316
|
+
}
|
|
317
|
+
transform(url) {
|
|
318
|
+
return this.domSanitizer.bypassSecurityTrustResourceUrl(url);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
SafeResourceUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeResourceUrlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
322
|
+
SafeResourceUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeResourceUrlPipe, name: "safeResourceUrl" });
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeResourceUrlPipe, decorators: [{
|
|
324
|
+
type: Pipe,
|
|
325
|
+
args: [{ name: "safeResourceUrl" }]
|
|
326
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
327
|
+
|
|
328
|
+
class SurveyHeaderComponent {
|
|
329
|
+
constructor(viewContainerRef) {
|
|
330
|
+
this.viewContainerRef = viewContainerRef;
|
|
331
|
+
}
|
|
332
|
+
ngAfterViewInit() {
|
|
333
|
+
this.survey.afterRenderHeader(this.viewContainerRef.element.nativeElement);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
SurveyHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyHeaderComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
337
|
+
SurveyHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SurveyHeaderComponent, selector: "'[sv-ng-survey-header]'", inputs: { survey: "survey" }, ngImport: i0, template: "<div *ngIf=\"survey.isLogoBefore\" [class]=\"survey.logoClassNames\">\n <img\n [class]=\"survey.css.logoImage\"\n [attr.src]=\"survey.locLogo.renderedHtml | safeUrl\"\n [attr.width]=\"survey.logoWidth ? survey.logoWidth : undefined\"\n [attr.height]=\"survey.logoHeight ? survey.logoHeight : undefined\"\n [attr.alt]=\"survey.locTitle.renderedHtml\"\n [style.objectFit]=\"survey.logoFit\"\n />\n </div>\n\n <div\n *ngIf=\"survey.renderedHasTitle\"\n [class]=\"survey.css.headerText\"\n [style.maxWidth]=\"survey.titleMaxWidth\"\n >\n <sv-ng-element-title [element]=\"survey\"></sv-ng-element-title>\n <h5 *ngIf=\"survey.renderedHasDescription\" [class]=\"survey.css.description\" [model]=\"survey.locDescription\" sv-ng-string></h5>\n </div>\n\n <div *ngIf=\"survey.isLogoAfter\" [class]=\"survey.logoClassNames\">\n <img\n [class]=\"survey.css.logoImage\"\n [attr.src]=\"survey.locLogo.renderedHtml | safeUrl\"\n [attr.width]=\"survey.logoWidth ? survey.logoWidth : undefined\"\n [attr.height]=\"survey.logoHeight ? survey.logoHeight : undefined\"\n [alt]=\"survey.locTitle.renderedHtml\"\n [style.objectFit]=\"survey.logoFit\"\n />\n </div>\n<div [class]=\"survey.css.headerClose\"></div>", components: [{ type: ElementTitleComponent, selector: "sv-ng-element-title", inputs: ["element"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeUrl": SafeUrlPipe } });
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyHeaderComponent, decorators: [{
|
|
339
|
+
type: Component,
|
|
340
|
+
args: [{ selector: "'[sv-ng-survey-header]'", template: "<div *ngIf=\"survey.isLogoBefore\" [class]=\"survey.logoClassNames\">\n <img\n [class]=\"survey.css.logoImage\"\n [attr.src]=\"survey.locLogo.renderedHtml | safeUrl\"\n [attr.width]=\"survey.logoWidth ? survey.logoWidth : undefined\"\n [attr.height]=\"survey.logoHeight ? survey.logoHeight : undefined\"\n [attr.alt]=\"survey.locTitle.renderedHtml\"\n [style.objectFit]=\"survey.logoFit\"\n />\n </div>\n\n <div\n *ngIf=\"survey.renderedHasTitle\"\n [class]=\"survey.css.headerText\"\n [style.maxWidth]=\"survey.titleMaxWidth\"\n >\n <sv-ng-element-title [element]=\"survey\"></sv-ng-element-title>\n <h5 *ngIf=\"survey.renderedHasDescription\" [class]=\"survey.css.description\" [model]=\"survey.locDescription\" sv-ng-string></h5>\n </div>\n\n <div *ngIf=\"survey.isLogoAfter\" [class]=\"survey.logoClassNames\">\n <img\n [class]=\"survey.css.logoImage\"\n [attr.src]=\"survey.locLogo.renderedHtml | safeUrl\"\n [attr.width]=\"survey.logoWidth ? survey.logoWidth : undefined\"\n [attr.height]=\"survey.logoHeight ? survey.logoHeight : undefined\"\n [alt]=\"survey.locTitle.renderedHtml\"\n [style.objectFit]=\"survey.logoFit\"\n />\n </div>\n<div [class]=\"survey.css.headerClose\"></div>" }]
|
|
341
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { survey: [{
|
|
342
|
+
type: Input
|
|
343
|
+
}] } });
|
|
344
|
+
|
|
345
|
+
class ElementComponent extends BaseAngular {
|
|
346
|
+
getModel() {
|
|
347
|
+
return this.model;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
ElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
351
|
+
ElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ElementComponent, selector: "sv-ng-element", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"model.cssClasses.questionWrapper\" [style]=\"model.rootStyle\">\n <ng-template [component]=\"{ name: model.isPanel ? 'panel': 'question', data: { model } }\"></ng-template>\n </div>\n</ng-template>", directives: [{ type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementComponent, decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{ selector: "sv-ng-element", template: "<ng-template #template>\n <div [class]=\"model.cssClasses.questionWrapper\" [style]=\"model.rootStyle\">\n <ng-template [component]=\"{ name: model.isPanel ? 'panel': 'question', data: { model } }\"></ng-template>\n </div>\n</ng-template>" }]
|
|
355
|
+
}], propDecorators: { model: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}] } });
|
|
358
|
+
|
|
359
|
+
class RowComponent extends BaseAngular {
|
|
360
|
+
getModel() {
|
|
361
|
+
return this.row;
|
|
362
|
+
}
|
|
363
|
+
trackElementBy(index, element) {
|
|
364
|
+
return element.name + index;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
RowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
368
|
+
RowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RowComponent, selector: "sv-ng-row", inputs: { row: "row" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"row.getRowCss()\" *ngIf=\"row.visible\">\n <ng-container *ngFor=\"let element of row.visibleElements; trackBy: trackElementBy\">\n <sv-ng-element [model]=\"$any(element)\"></sv-ng-element>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: ElementComponent, selector: "sv-ng-element", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RowComponent, decorators: [{
|
|
370
|
+
type: Component,
|
|
371
|
+
args: [{ selector: "sv-ng-row", template: "<ng-template #template>\n <div [class]=\"row.getRowCss()\" *ngIf=\"row.visible\">\n <ng-container *ngFor=\"let element of row.visibleElements; trackBy: trackElementBy\">\n <sv-ng-element [model]=\"$any(element)\"></sv-ng-element>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
372
|
+
}], propDecorators: { row: [{
|
|
373
|
+
type: Input
|
|
374
|
+
}] } });
|
|
375
|
+
|
|
376
|
+
class PageComponent extends BaseAngular {
|
|
377
|
+
getModel() {
|
|
378
|
+
return this.model;
|
|
379
|
+
}
|
|
380
|
+
ngOnChanges(changes) {
|
|
381
|
+
if (changes["model"].previousValue !== undefined) {
|
|
382
|
+
this.model.survey.afterRenderPage(this.pageContainerRef?.nativeElement);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
ngAfterViewInit() {
|
|
386
|
+
this.model.survey?.afterRenderPage(this.pageContainerRef?.nativeElement);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
390
|
+
PageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PageComponent, selector: "page", inputs: { model: "model", survey: "survey" }, viewQueries: [{ propertyName: "pageContainerRef", first: true, predicate: ["pageContainer"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!!this.survey && !!this.model && this.model.isVisible && !!this.model.survey\">\n <div [class]=\"model.cssRoot\" #pageContainer>\n <sv-ng-element-title [element]=\"model\"></sv-ng-element-title>\n <div *ngIf=\"model._showDescription\" [class]=\"model.cssClasses.page.description\">\n <sv-ng-string [model]=\"model.locDescription\"></sv-ng-string>\n </div>\n <ng-container *ngFor=\"let row of model.rows\">\n <sv-ng-row [row]=\"row\" style=\"display: contents;\"></sv-ng-row>\n </ng-container>\n </div>\n</ng-container>", styles: [""], components: [{ type: ElementTitleComponent, selector: "sv-ng-element-title", inputs: ["element"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: RowComponent, selector: "sv-ng-row", inputs: ["row"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PageComponent, decorators: [{
|
|
392
|
+
type: Component,
|
|
393
|
+
args: [{ selector: "page", template: "<ng-container *ngIf=\"!!this.survey && !!this.model && this.model.isVisible && !!this.model.survey\">\n <div [class]=\"model.cssRoot\" #pageContainer>\n <sv-ng-element-title [element]=\"model\"></sv-ng-element-title>\n <div *ngIf=\"model._showDescription\" [class]=\"model.cssClasses.page.description\">\n <sv-ng-string [model]=\"model.locDescription\"></sv-ng-string>\n </div>\n <ng-container *ngFor=\"let row of model.rows\">\n <sv-ng-row [row]=\"row\" style=\"display: contents;\"></sv-ng-row>\n </ng-container>\n </div>\n</ng-container>", styles: [""] }]
|
|
394
|
+
}], propDecorators: { model: [{
|
|
395
|
+
type: Input
|
|
396
|
+
}], survey: [{
|
|
397
|
+
type: Input
|
|
398
|
+
}], pageContainerRef: [{
|
|
399
|
+
type: ViewChild,
|
|
400
|
+
args: ["pageContainer", { static: false, read: ElementRef }]
|
|
401
|
+
}] } });
|
|
402
|
+
|
|
403
|
+
class BrandInfoComponent {
|
|
404
|
+
}
|
|
405
|
+
BrandInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BrandInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
406
|
+
BrandInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BrandInfoComponent, selector: "sv-brand-info", ngImport: i0, template: "<div class=\"sv-brand-info\">\n <a class=\"sv-brand-info__logo\" href=\"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page\"><img src=\"https://surveyjs.io/Content/Images/poweredby.svg\"/></a>\n <div class=\"sv-brand-info__text\">Try and see how easy it is to <a href=\"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey\">create a survey</a></div>\n <div class=\"sv-brand-info__terms\"><a href=\"https://surveyjs.io/TermsOfUse\">Terms of Use & Privacy Statement</a></div>\n</div>" });
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BrandInfoComponent, decorators: [{
|
|
408
|
+
type: Component,
|
|
409
|
+
args: [{ selector: "sv-brand-info", template: "<div class=\"sv-brand-info\">\n <a class=\"sv-brand-info__logo\" href=\"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page\"><img src=\"https://surveyjs.io/Content/Images/poweredby.svg\"/></a>\n <div class=\"sv-brand-info__text\">Try and see how easy it is to <a href=\"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey\">create a survey</a></div>\n <div class=\"sv-brand-info__terms\"><a href=\"https://surveyjs.io/TermsOfUse\">Terms of Use & Privacy Statement</a></div>\n</div>" }]
|
|
410
|
+
}] });
|
|
411
|
+
AngularComponentFactory.Instance.registerComponent("sv-brand-info", BrandInfoComponent);
|
|
412
|
+
|
|
413
|
+
class SurveyComponent extends BaseAngular {
|
|
414
|
+
constructor(changeDetectorRef) {
|
|
415
|
+
super(changeDetectorRef);
|
|
416
|
+
changeDetectorRef.detach();
|
|
417
|
+
}
|
|
418
|
+
getModel() {
|
|
419
|
+
return this.model;
|
|
420
|
+
}
|
|
421
|
+
onModelChanged() {
|
|
422
|
+
this.changeDetectorRef.detectChanges();
|
|
423
|
+
this.model.renderCallback = () => {
|
|
424
|
+
this.changeDetectorRef.detectChanges();
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
ngOnInit() {
|
|
428
|
+
if (this.model["needRenderIcons"]) {
|
|
429
|
+
SvgRegistry.renderIcons();
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
ngOnDestroy() {
|
|
433
|
+
super.ngOnDestroy();
|
|
434
|
+
this.model.renderCallback = undefined;
|
|
435
|
+
}
|
|
436
|
+
ngAfterViewInit() {
|
|
437
|
+
this.model.afterRenderSurvey(this.rootEl.nativeElement);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
SurveyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
441
|
+
SurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SurveyComponent, selector: "survey", inputs: { model: "model" }, viewQueries: [{ propertyName: "rootEl", first: true, predicate: ["surveyContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #surveyContainer *ngIf=\"!!model\" [class]=\"model.getRootCss()\" >\n <form onsubmit=\"return false;\">\n <div class=\"sv_custom_header\" [hidden]=\"model.hasLogo\"></div>\n <div [class]=\"model.css.container\">\n <div *ngIf=\"model.renderedHasHeader\" [class]=\"model.css.header\" [survey]=\"model\" sv-ng-survey-header></div>\n <div *ngIf=\"model.isShowingPage\" [class]=\"model.bodyCss\">\n <!-- ko if: isTimerPanelShowingOnTop && !isShowStartingPage -->\n <!-- ko template: { name: 'survey-timerpanel' } -->\n <!-- /ko -->\n <!-- /ko -->\n <ng-container *ngIf=\"model.isShowProgressBarOnTop && !model.isShowStartingPage\">\n <ng-template [component]='{ name: \"sv-progress-\" + this.model.progressBarType, data: { model } }'></ng-template>\n </ng-container>\n <sv-action-bar *ngIf=\"model.isNavigationButtonsShowingOnTop\" [model]=\"model.navigationBar\"></sv-action-bar>\n <!-- ko if: activePage -->\n <ng-container *ngIf=\"model.activePage\">\n <div [id]=\"model.activePage.id\">\n <page [model]=\"model.activePage\" [survey]=\"model\"></page>\n </div>\n </ng-container>\n <!-- ko if: activePage.rows.length == 0 && $data.emptyPageTemplate -->\n <!-- ko template: { name: emptyPageTemplate, data: $data.emptyPageTemplateData || $data } -->\n <!-- /ko -->\n <!-- /ko -->\n <!-- /ko -->\n <!-- ko if: isTimerPanelShowingOnBottom && !isShowStartingPage -->\n <!-- ko template: { name: 'survey-timerpanel' } -->\n <!-- /ko -->\n <!-- /ko -->\n <ng-container *ngIf=\"model.isShowProgressBarOnBottom && !model.isShowStartingPage\">\n <ng-template [component]='{ name: \"sv-progress-\" + this.model.progressBarType, data: { model } }'></ng-template>\n </ng-container>\n <sv-action-bar *ngIf=\"model.isNavigationButtonsShowingOnBottom\" [model]=\"model.navigationBar\"></sv-action-bar>\n </div>\n <div *ngIf=\"model.state === 'completed' && model.showCompletedPage\" [class]=\"model.completedCss\"\n [innerHtml]=\"model.processedCompletedHtml\"></div>\n <div [hidden]=\"model.completedState === ''\" [class]=\"model.css.saveData.root\">\n <div [class]=\"model.completedStateCss\">\n <span>{{model.completedStateText}}</span>\n <input type=\"button\" [hidden]=\"model.completedState != 'error'\"\n [value]=\"model.getLocString('saveAgainButton')\" (click)=\"model.doComplete()\"\n [class]=\"model.css.saveData.saveAgainButton\">\n </div>\n </div>\n <div *ngIf=\"model.state === 'completedbefore'\" [class]=\"model.css.body\"\n [innerHtml]=\"model.processedCompletedBeforeHtml\"></div>\n <div *ngIf=\"model.state === 'loading'\" [class]=\"model.css.body\" [innerHtml]=\"model.processedLoadingHtml\"></div>\n <div *ngIf=\"model.state === 'empty'\" [class]=\"model.css.bodyEmpty\">{{model.emptySurveyText}}</div>\n </div>\n </form>\n <sv-brand-info *ngIf=\"model.showBrandInfo\"></sv-brand-info>\n</div>\n", styles: [""], components: [{ type: SurveyHeaderComponent, selector: "'[sv-ng-survey-header]'", inputs: ["survey"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: PageComponent, selector: "page", inputs: ["model", "survey"] }, { type: BrandInfoComponent, selector: "sv-brand-info" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyComponent, decorators: [{
|
|
443
|
+
type: Component,
|
|
444
|
+
args: [{ selector: "survey", template: "<div #surveyContainer *ngIf=\"!!model\" [class]=\"model.getRootCss()\" >\n <form onsubmit=\"return false;\">\n <div class=\"sv_custom_header\" [hidden]=\"model.hasLogo\"></div>\n <div [class]=\"model.css.container\">\n <div *ngIf=\"model.renderedHasHeader\" [class]=\"model.css.header\" [survey]=\"model\" sv-ng-survey-header></div>\n <div *ngIf=\"model.isShowingPage\" [class]=\"model.bodyCss\">\n <!-- ko if: isTimerPanelShowingOnTop && !isShowStartingPage -->\n <!-- ko template: { name: 'survey-timerpanel' } -->\n <!-- /ko -->\n <!-- /ko -->\n <ng-container *ngIf=\"model.isShowProgressBarOnTop && !model.isShowStartingPage\">\n <ng-template [component]='{ name: \"sv-progress-\" + this.model.progressBarType, data: { model } }'></ng-template>\n </ng-container>\n <sv-action-bar *ngIf=\"model.isNavigationButtonsShowingOnTop\" [model]=\"model.navigationBar\"></sv-action-bar>\n <!-- ko if: activePage -->\n <ng-container *ngIf=\"model.activePage\">\n <div [id]=\"model.activePage.id\">\n <page [model]=\"model.activePage\" [survey]=\"model\"></page>\n </div>\n </ng-container>\n <!-- ko if: activePage.rows.length == 0 && $data.emptyPageTemplate -->\n <!-- ko template: { name: emptyPageTemplate, data: $data.emptyPageTemplateData || $data } -->\n <!-- /ko -->\n <!-- /ko -->\n <!-- /ko -->\n <!-- ko if: isTimerPanelShowingOnBottom && !isShowStartingPage -->\n <!-- ko template: { name: 'survey-timerpanel' } -->\n <!-- /ko -->\n <!-- /ko -->\n <ng-container *ngIf=\"model.isShowProgressBarOnBottom && !model.isShowStartingPage\">\n <ng-template [component]='{ name: \"sv-progress-\" + this.model.progressBarType, data: { model } }'></ng-template>\n </ng-container>\n <sv-action-bar *ngIf=\"model.isNavigationButtonsShowingOnBottom\" [model]=\"model.navigationBar\"></sv-action-bar>\n </div>\n <div *ngIf=\"model.state === 'completed' && model.showCompletedPage\" [class]=\"model.completedCss\"\n [innerHtml]=\"model.processedCompletedHtml\"></div>\n <div [hidden]=\"model.completedState === ''\" [class]=\"model.css.saveData.root\">\n <div [class]=\"model.completedStateCss\">\n <span>{{model.completedStateText}}</span>\n <input type=\"button\" [hidden]=\"model.completedState != 'error'\"\n [value]=\"model.getLocString('saveAgainButton')\" (click)=\"model.doComplete()\"\n [class]=\"model.css.saveData.saveAgainButton\">\n </div>\n </div>\n <div *ngIf=\"model.state === 'completedbefore'\" [class]=\"model.css.body\"\n [innerHtml]=\"model.processedCompletedBeforeHtml\"></div>\n <div *ngIf=\"model.state === 'loading'\" [class]=\"model.css.body\" [innerHtml]=\"model.processedLoadingHtml\"></div>\n <div *ngIf=\"model.state === 'empty'\" [class]=\"model.css.bodyEmpty\">{{model.emptySurveyText}}</div>\n </div>\n </form>\n <sv-brand-info *ngIf=\"model.showBrandInfo\"></sv-brand-info>\n</div>\n", styles: [""] }]
|
|
445
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { model: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], rootEl: [{
|
|
448
|
+
type: ViewChild,
|
|
449
|
+
args: ["surveyContainer", { static: false }]
|
|
450
|
+
}] } });
|
|
451
|
+
|
|
452
|
+
class ErrorsComponent {
|
|
453
|
+
constructor(viewContainerRef) {
|
|
454
|
+
this.viewContainerRef = viewContainerRef;
|
|
455
|
+
}
|
|
456
|
+
ngOnInit() {
|
|
457
|
+
if (this.location == "tooltip") {
|
|
458
|
+
this.tooltipManager = new TooltipManager(this.viewContainerRef.element.nativeElement);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
ngOnDestroy() {
|
|
462
|
+
if (!!this.tooltipManager) {
|
|
463
|
+
this.tooltipManager.dispose();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
get role() {
|
|
467
|
+
return "alert";
|
|
468
|
+
}
|
|
469
|
+
get id() {
|
|
470
|
+
return this.element.id + "_errors";
|
|
471
|
+
}
|
|
472
|
+
get ariaLive() {
|
|
473
|
+
return "polite";
|
|
474
|
+
}
|
|
475
|
+
get class() {
|
|
476
|
+
return this.element.cssError;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
ErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ErrorsComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
480
|
+
ErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: { element: "element", location: "location" }, host: { properties: { "attr.role": "this.role", "id": "this.id", "attr.aria-live": "this.ariaLive", "class": "this.class" } }, viewQueries: [{ propertyName: "errorsContainerRef", first: true, predicate: ["errorsContainer"], descendants: true, static: true }], ngImport: i0, template: "<div *ngFor=\"let error of element.errors;\">\n <span\n [class]=\"element.cssClasses ? element.cssClasses.error.icon : 'panel-error-icon'\"\n aria-hidden=\"true\"\n ></span>\n <span [class]=\"element.cssClasses ? element.cssClasses.error.item : 'panel-error-item'\" [model]=\"error.locText\" sv-ng-string>\n </span>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ErrorsComponent, decorators: [{
|
|
482
|
+
type: Component,
|
|
483
|
+
args: [{ selector: "'[sv-ng-errors]'", template: "<div *ngFor=\"let error of element.errors;\">\n <span\n [class]=\"element.cssClasses ? element.cssClasses.error.icon : 'panel-error-icon'\"\n aria-hidden=\"true\"\n ></span>\n <span [class]=\"element.cssClasses ? element.cssClasses.error.item : 'panel-error-item'\" [model]=\"error.locText\" sv-ng-string>\n </span>\n</div>" }]
|
|
484
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { element: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}], location: [{
|
|
487
|
+
type: Input
|
|
488
|
+
}], errorsContainerRef: [{
|
|
489
|
+
type: ViewChild,
|
|
490
|
+
args: ["errorsContainer", { static: true }]
|
|
491
|
+
}], role: [{
|
|
492
|
+
type: HostBinding,
|
|
493
|
+
args: ["attr.role"]
|
|
494
|
+
}], id: [{
|
|
495
|
+
type: HostBinding,
|
|
496
|
+
args: ["id"]
|
|
497
|
+
}], ariaLive: [{
|
|
498
|
+
type: HostBinding,
|
|
499
|
+
args: ["attr.aria-live"]
|
|
500
|
+
}], class: [{
|
|
501
|
+
type: HostBinding,
|
|
502
|
+
args: ["class"]
|
|
503
|
+
}] } });
|
|
504
|
+
|
|
505
|
+
class ElementHeaderComponent {
|
|
506
|
+
constructor() {
|
|
507
|
+
}
|
|
508
|
+
get rootClass() {
|
|
509
|
+
return this.element.cssHeader;
|
|
510
|
+
}
|
|
511
|
+
click() {
|
|
512
|
+
this.element.clickTitleFunction();
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
ElementHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
516
|
+
ElementHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ElementHeaderComponent, selector: "'[sv-ng-element-header]'", inputs: { element: "element" }, host: { listeners: { "click": "click()" }, properties: { "class": "this.rootClass" } }, ngImport: i0, template: "<sv-ng-element-title [element]=\"element\"></sv-ng-element-title>\n<div *ngIf=\"element.hasDescriptionUnderTitle\" [class]=\"element.cssDescription\" [model]=\"element.locDescription\" sv-ng-string></div>", components: [{ type: ElementTitleComponent, selector: "sv-ng-element-title", inputs: ["element"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ElementHeaderComponent, decorators: [{
|
|
518
|
+
type: Component,
|
|
519
|
+
args: [{ selector: "'[sv-ng-element-header]'", template: "<sv-ng-element-title [element]=\"element\"></sv-ng-element-title>\n<div *ngIf=\"element.hasDescriptionUnderTitle\" [class]=\"element.cssDescription\" [model]=\"element.locDescription\" sv-ng-string></div>" }]
|
|
520
|
+
}], ctorParameters: function () { return []; }, propDecorators: { element: [{
|
|
521
|
+
type: Input
|
|
522
|
+
}], rootClass: [{
|
|
523
|
+
type: HostBinding,
|
|
524
|
+
args: ["class"]
|
|
525
|
+
}], click: [{
|
|
526
|
+
type: HostListener,
|
|
527
|
+
args: ["click"]
|
|
528
|
+
}] } });
|
|
529
|
+
|
|
530
|
+
class SurveyCommentComponent {
|
|
531
|
+
constructor() {
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
SurveyCommentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyCommentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
535
|
+
SurveyCommentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: { question: "question" }, ngImport: i0, template: "<textarea *ngIf=\"!question.isReadOnlyRenderDiv()\" [attr.max-length]=\"question.getOthersMaxLength()\" [attr.aria-required]=\"question.ariaRequired\" [attr.aria-label]=\"question.ariaLabel\" [attr.placeholder]=\"question.commentOrOtherPlaceHolder\" \n [value]=\"question.comment\"\n [style.resize]=\"question.resizeStyle\"\n [disabled]=\"question.isInputReadOnly\"\n (change)=\"question.onCommentChange($event)\"\n (input)=\"question.onCommentInput($event)\"\n [class]=\"question.cssClasses.other\">\n</textarea>\n<div *ngIf=\"question.isReadOnlyRenderDiv()\">{{ question.comment }}</div>\n", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyCommentComponent, decorators: [{
|
|
537
|
+
type: Component,
|
|
538
|
+
args: [{ selector: "sv-ng-comment, '[sv-ng-comment]'", template: "<textarea *ngIf=\"!question.isReadOnlyRenderDiv()\" [attr.max-length]=\"question.getOthersMaxLength()\" [attr.aria-required]=\"question.ariaRequired\" [attr.aria-label]=\"question.ariaLabel\" [attr.placeholder]=\"question.commentOrOtherPlaceHolder\" \n [value]=\"question.comment\"\n [style.resize]=\"question.resizeStyle\"\n [disabled]=\"question.isInputReadOnly\"\n (change)=\"question.onCommentChange($event)\"\n (input)=\"question.onCommentInput($event)\"\n [class]=\"question.cssClasses.other\">\n</textarea>\n<div *ngIf=\"question.isReadOnlyRenderDiv()\">{{ question.comment }}</div>\n" }]
|
|
539
|
+
}], ctorParameters: function () { return []; }, propDecorators: { question: [{
|
|
540
|
+
type: Input
|
|
541
|
+
}] } });
|
|
542
|
+
|
|
543
|
+
class VisibleDirective {
|
|
544
|
+
constructor(el) {
|
|
545
|
+
this.el = el;
|
|
546
|
+
}
|
|
547
|
+
ngOnChanges(changes) {
|
|
548
|
+
changes["visible"].currentValue ? this.show() : this.hide();
|
|
549
|
+
}
|
|
550
|
+
hide() {
|
|
551
|
+
this.el.nativeElement.style.display = "none";
|
|
552
|
+
}
|
|
553
|
+
show() {
|
|
554
|
+
this.el.nativeElement.style.display = "";
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
VisibleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: VisibleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
558
|
+
VisibleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: VisibleDirective, selector: "[visible]", inputs: { visible: "visible" }, usesOnChanges: true, ngImport: i0 });
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: VisibleDirective, decorators: [{
|
|
560
|
+
type: Directive,
|
|
561
|
+
args: [{
|
|
562
|
+
selector: "[visible]"
|
|
563
|
+
}]
|
|
564
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { visible: [{
|
|
565
|
+
type: Input
|
|
566
|
+
}] } });
|
|
567
|
+
|
|
568
|
+
class QuestionComponent extends EmbeddedViewContentComponent {
|
|
569
|
+
getModel() {
|
|
570
|
+
return this.model;
|
|
571
|
+
}
|
|
572
|
+
ngAfterViewInit() {
|
|
573
|
+
if (!!this.rootEl?.nativeElement) {
|
|
574
|
+
this.model.afterRender(this.rootEl?.nativeElement);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
getComponentName() {
|
|
578
|
+
if (this.model.customWidget)
|
|
579
|
+
return "survey-customwidget";
|
|
580
|
+
if (this.model.isDefaultRendering()) {
|
|
581
|
+
return this.model.getTemplate() + "-question";
|
|
582
|
+
}
|
|
583
|
+
return this.model.getComponentName();
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
QuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
587
|
+
QuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: QuestionComponent, selector: "sv-ng-question", inputs: { model: "model" }, viewQueries: [{ propertyName: "rootEl", first: true, predicate: ["elementContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div #elementContainer [class]=\"model.getRootCss()\" [style]=\"{ paddingLeft: model.paddingLeft, paddingRight: model.paddingRight }\" [id]=\"model.id\" [attr.data-name]=\"model.name\" [attr.role]=\"model.ariaRole\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-labelledby]=\"model.hasTitle ? model.ariaTitleId : null\">\n <div *ngIf=\"model.showErrorsAboveQuestion && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <div [element]=\"model\" *ngIf=\"model.hasTitleOnLeftTop\" sv-ng-element-header></div>\n <div [class]=\"model.cssContent\" role=\"presentation\" [visible]=\"!model.isCollapsed\">\n <div *ngIf=\"model.showErrorOnTop && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <ng-template [component]=\"{ name: getComponentName(), data: { model }, default: 'skeleton-question' }\" ></ng-template>\n <div *ngIf=\"model.hasComment\" [class]=\"model.cssClasses.formGroup\">\n <div>{{ model.commentText }}</div>\n <div [question]=\"model\" sv-ng-comment></div>\n </div>\n <div *ngIf=\"model.showErrorOnBottom && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <div *ngIf=\"model.isErrorsModeTooltip && model.hasVisibleErrors\" [element]=\"model\" [location]=\"'tooltip'\" sv-ng-errors></div>\n </div>\n <div [element]=\"model\" *ngIf=\"model.hasTitleOnBottom\" sv-ng-element-header></div>\n <div *ngIf=\"model.showErrorsBelowQuestion && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n </div>\n</ng-template>", components: [{ type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: ["element", "location"] }, { type: ElementHeaderComponent, selector: "'[sv-ng-element-header]'", inputs: ["element"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionComponent, decorators: [{
|
|
589
|
+
type: Component,
|
|
590
|
+
args: [{ selector: "sv-ng-question", template: "<ng-template #template>\n <div #elementContainer [class]=\"model.getRootCss()\" [style]=\"{ paddingLeft: model.paddingLeft, paddingRight: model.paddingRight }\" [id]=\"model.id\" [attr.data-name]=\"model.name\" [attr.role]=\"model.ariaRole\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-labelledby]=\"model.hasTitle ? model.ariaTitleId : null\">\n <div *ngIf=\"model.showErrorsAboveQuestion && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <div [element]=\"model\" *ngIf=\"model.hasTitleOnLeftTop\" sv-ng-element-header></div>\n <div [class]=\"model.cssContent\" role=\"presentation\" [visible]=\"!model.isCollapsed\">\n <div *ngIf=\"model.showErrorOnTop && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <ng-template [component]=\"{ name: getComponentName(), data: { model }, default: 'skeleton-question' }\" ></ng-template>\n <div *ngIf=\"model.hasComment\" [class]=\"model.cssClasses.formGroup\">\n <div>{{ model.commentText }}</div>\n <div [question]=\"model\" sv-ng-comment></div>\n </div>\n <div *ngIf=\"model.showErrorOnBottom && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n <div *ngIf=\"model.isErrorsModeTooltip && model.hasVisibleErrors\" [element]=\"model\" [location]=\"'tooltip'\" sv-ng-errors></div>\n </div>\n <div [element]=\"model\" *ngIf=\"model.hasTitleOnBottom\" sv-ng-element-header></div>\n <div *ngIf=\"model.showErrorsBelowQuestion && model.hasVisibleErrors\" [element]=\"model\" sv-ng-errors></div>\n </div>\n</ng-template>" }]
|
|
591
|
+
}], propDecorators: { model: [{
|
|
592
|
+
type: Input
|
|
593
|
+
}], rootEl: [{
|
|
594
|
+
type: ViewChild,
|
|
595
|
+
args: ["elementContainer"]
|
|
596
|
+
}] } });
|
|
597
|
+
AngularComponentFactory.Instance.registerComponent("question", QuestionComponent);
|
|
598
|
+
|
|
599
|
+
class StringViewerComponent {
|
|
600
|
+
constructor(changeDetectorRef) {
|
|
601
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
602
|
+
}
|
|
603
|
+
ngOnChanges(changes) {
|
|
604
|
+
const currentValue = changes["model"].currentValue;
|
|
605
|
+
const previousValue = changes["model"].previousValue;
|
|
606
|
+
currentValue.onChanged = () => { this.changeDetectorRef.detectChanges(); };
|
|
607
|
+
!!previousValue && this.clearOnChanged(previousValue);
|
|
608
|
+
}
|
|
609
|
+
clearOnChanged(model) {
|
|
610
|
+
model.onChanged = () => { };
|
|
611
|
+
}
|
|
612
|
+
ngOnDestroy() {
|
|
613
|
+
!!this.model && this.clearOnChanged(this.model);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
StringViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StringViewerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
617
|
+
StringViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: StringViewerComponent, selector: "sv-ng-string-viewer, string-viewer, '[sv-ng-string-viewer]'", inputs: { model: "model" }, usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"!model.hasHtml\" class=\"sv-string-viewer\">{{model.renderedHtml}}</span>\n<span *ngIf=\"model.hasHtml\" class=\"sv-string-viewer\" [innerHtml]=\"model.renderedHtml\"></span>", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StringViewerComponent, decorators: [{
|
|
619
|
+
type: Component,
|
|
620
|
+
args: [{ selector: "sv-ng-string-viewer, string-viewer, '[sv-ng-string-viewer]'", template: "<span *ngIf=\"!model.hasHtml\" class=\"sv-string-viewer\">{{model.renderedHtml}}</span>\n<span *ngIf=\"model.hasHtml\" class=\"sv-string-viewer\" [innerHtml]=\"model.renderedHtml\"></span>", styles: [""] }]
|
|
621
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { model: [{
|
|
622
|
+
type: Input
|
|
623
|
+
}] } });
|
|
624
|
+
AngularComponentFactory.Instance.registerComponent(LocalizableString.defaultRenderer, StringViewerComponent);
|
|
625
|
+
|
|
626
|
+
class PopupContainerComponent extends BaseAngular {
|
|
627
|
+
constructor(changeDetectorRef) {
|
|
628
|
+
super(changeDetectorRef);
|
|
629
|
+
this.prevIsVisible = false;
|
|
630
|
+
this.isShow = false;
|
|
631
|
+
this.changeDetectorRef.detach();
|
|
632
|
+
}
|
|
633
|
+
getModel() {
|
|
634
|
+
return this.model;
|
|
635
|
+
}
|
|
636
|
+
onModelChanged() {
|
|
637
|
+
this.changeDetectorRef.detectChanges();
|
|
638
|
+
}
|
|
639
|
+
beforeUpdate() {
|
|
640
|
+
super.beforeUpdate();
|
|
641
|
+
if (!this.prevIsVisible && this.model.isVisible) {
|
|
642
|
+
this.isShow = false;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
afterUpdate() {
|
|
646
|
+
if (!this.prevIsVisible && this.model.isVisible) {
|
|
647
|
+
setTimeout(() => {
|
|
648
|
+
this.model.updateOnShowing();
|
|
649
|
+
this.isShow = true;
|
|
650
|
+
this.changeDetectorRef.detectChanges();
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
if (this.prevIsVisible !== this.model.isVisible) {
|
|
654
|
+
this.prevIsVisible = this.model.isVisible;
|
|
655
|
+
}
|
|
656
|
+
super.afterUpdate();
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
PopupContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupContainerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
660
|
+
PopupContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PopupContainerComponent, selector: "sv-ng-popup-container, '[sv-ng-popup-container]'", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<div class=\"sv-popup\" tabindex=\"-1\" [class]=\"model.styleClass\" [style.visibility]=\"isShow ? 'visible' : 'hidden'\" [visible]=\"model.isVisible\" (click)=\"model.clickOutside()\" (keydown)=\"model.onKeyDown($event)\">\n <div class=\"sv-popup__container\" [style]=\"{ left: model.left, top: model.top, height: model.height, minWidth: model.minWidth, width: model.width }\">\n <div class=\"sv-popup__shadow\">\n <span *ngIf=\"model.showPointer\" class=\"sv-popup__pointer\" [style]=\"{ left: model.pointerTarget.left, top: model.pointerTarget.top }\"></span>\n <div class=\"sv-popup__body-content\">\n <div *ngIf=\"model.title\" class=\"sv-popup__body-header\">{{ model.title }}</div>\n <div class=\"sv-popup__scrolling-content\">\n <div class=\"sv-popup__content\">\n <ng-template [component]=\"{ name: model.contentComponentName, data: model.contentComponentData }\"></ng-template>\n </div>\n </div>\n <div *ngIf=\"model.showFooter\" class=\"sv-popup__body-footer\">\n <button type=\"button\" (click)=\"model.cancel()\"\n class=\"sv-popup__body-footer-item sv-popup__button sv-popup__button--cancel\">{{ model.cancelButtonText }}</button>\n <button type=\"button\" *ngIf=\"model.isModal\" (click)=\"model.apply()\" \n class=\"sv-popup__body-footer-item sv-popup__button sv-popup__button--apply\">{{ model.applyButtonText }}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", directives: [{ type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupContainerComponent, decorators: [{
|
|
662
|
+
type: Component,
|
|
663
|
+
args: [{ selector: "sv-ng-popup-container, '[sv-ng-popup-container]'", template: "<div class=\"sv-popup\" tabindex=\"-1\" [class]=\"model.styleClass\" [style.visibility]=\"isShow ? 'visible' : 'hidden'\" [visible]=\"model.isVisible\" (click)=\"model.clickOutside()\" (keydown)=\"model.onKeyDown($event)\">\n <div class=\"sv-popup__container\" [style]=\"{ left: model.left, top: model.top, height: model.height, minWidth: model.minWidth, width: model.width }\">\n <div class=\"sv-popup__shadow\">\n <span *ngIf=\"model.showPointer\" class=\"sv-popup__pointer\" [style]=\"{ left: model.pointerTarget.left, top: model.pointerTarget.top }\"></span>\n <div class=\"sv-popup__body-content\">\n <div *ngIf=\"model.title\" class=\"sv-popup__body-header\">{{ model.title }}</div>\n <div class=\"sv-popup__scrolling-content\">\n <div class=\"sv-popup__content\">\n <ng-template [component]=\"{ name: model.contentComponentName, data: model.contentComponentData }\"></ng-template>\n </div>\n </div>\n <div *ngIf=\"model.showFooter\" class=\"sv-popup__body-footer\">\n <button type=\"button\" (click)=\"model.cancel()\"\n class=\"sv-popup__body-footer-item sv-popup__button sv-popup__button--cancel\">{{ model.cancelButtonText }}</button>\n <button type=\"button\" *ngIf=\"model.isModal\" (click)=\"model.apply()\" \n class=\"sv-popup__body-footer-item sv-popup__button sv-popup__button--apply\">{{ model.applyButtonText }}</button>\n </div>\n </div>\n </div>\n </div>\n</div>" }]
|
|
664
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { model: [{
|
|
665
|
+
type: Input
|
|
666
|
+
}] } });
|
|
667
|
+
|
|
668
|
+
class PopupService {
|
|
669
|
+
constructor(injector, applicationRef, componentFactoryResolver) {
|
|
670
|
+
this.injector = injector;
|
|
671
|
+
this.applicationRef = applicationRef;
|
|
672
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
673
|
+
}
|
|
674
|
+
createComponent(popupViewModel) {
|
|
675
|
+
const portalHost = new DomPortalOutlet(popupViewModel.container, this.componentFactoryResolver, this.applicationRef, this.injector);
|
|
676
|
+
const portal = new ComponentPortal(PopupContainerComponent);
|
|
677
|
+
const componentRef = portalHost.attach(portal);
|
|
678
|
+
popupViewModel.container = popupViewModel.container.children[0];
|
|
679
|
+
componentRef.instance.model = popupViewModel;
|
|
680
|
+
componentRef.changeDetectorRef.detectChanges();
|
|
681
|
+
return portalHost;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
PopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupService, deps: [{ token: i0.Injector }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
685
|
+
PopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupService });
|
|
686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupService, decorators: [{
|
|
687
|
+
type: Injectable
|
|
688
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }]; } });
|
|
689
|
+
|
|
690
|
+
class PopupComponent extends BaseAngular {
|
|
691
|
+
constructor(viewContainerRef, changeDetectorRef, popupService) {
|
|
692
|
+
super(changeDetectorRef, viewContainerRef);
|
|
693
|
+
this.popupService = popupService;
|
|
694
|
+
}
|
|
695
|
+
getModel() {
|
|
696
|
+
return this.popupModel;
|
|
697
|
+
}
|
|
698
|
+
ngOnInit() {
|
|
699
|
+
this.model = new PopupBaseViewModel(this.popupModel, this.viewContainerRef?.element.nativeElement.parentElement);
|
|
700
|
+
this.model.initializePopupContainer();
|
|
701
|
+
this.portalHost = this.popupService.createComponent(this.model);
|
|
702
|
+
}
|
|
703
|
+
ngOnDestroy() {
|
|
704
|
+
super.ngOnDestroy();
|
|
705
|
+
this.portalHost.detach();
|
|
706
|
+
this.model.container.remove();
|
|
707
|
+
this.model.unmountPopupContainer();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
PopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: PopupService }], target: i0.ɵɵFactoryTarget.Component });
|
|
711
|
+
PopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PopupComponent, selector: "sv-ng-popup, '[sv-ng-popup]'", inputs: { popupModel: "popupModel" }, usesInheritance: true, ngImport: i0, template: "<div></div>", isInline: true });
|
|
712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PopupComponent, decorators: [{
|
|
713
|
+
type: Component,
|
|
714
|
+
args: [{
|
|
715
|
+
selector: "sv-ng-popup, '[sv-ng-popup]'",
|
|
716
|
+
template: "<div></div>"
|
|
717
|
+
}]
|
|
718
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: PopupService }]; }, propDecorators: { popupModel: [{
|
|
719
|
+
type: Input
|
|
720
|
+
}] } });
|
|
721
|
+
|
|
722
|
+
class QuestionSkeletonComponent {
|
|
723
|
+
}
|
|
724
|
+
QuestionSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
725
|
+
QuestionSkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: QuestionSkeletonComponent, selector: "question-skeleton", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"sv-skeleton--not-implemented\">\n <div>{{ model.getType() + \" question type renderer is not implemented yet.\" }}</div>\n <div>{{ model.value }}</div>\n</div>\n", styles: [".sv-skeleton--not-implemented{width:100%;min-width:300px;min-height:40px;border:1px solid red;text-align:center}\n"] });
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionSkeletonComponent, decorators: [{
|
|
727
|
+
type: Component,
|
|
728
|
+
args: [{ selector: "question-skeleton", template: "<div class=\"sv-skeleton--not-implemented\">\n <div>{{ model.getType() + \" question type renderer is not implemented yet.\" }}</div>\n <div>{{ model.value }}</div>\n</div>\n", styles: [".sv-skeleton--not-implemented{width:100%;min-width:300px;min-height:40px;border:1px solid red;text-align:center}\n"] }]
|
|
729
|
+
}], propDecorators: { model: [{
|
|
730
|
+
type: Input
|
|
731
|
+
}] } });
|
|
732
|
+
AngularComponentFactory.Instance.registerComponent("skeleton-question", QuestionSkeletonComponent);
|
|
733
|
+
|
|
734
|
+
class SvgIconComponent {
|
|
735
|
+
constructor(viewContaierRef) {
|
|
736
|
+
this.viewContaierRef = viewContaierRef;
|
|
737
|
+
}
|
|
738
|
+
createSvg() {
|
|
739
|
+
if (!!this.iconName) {
|
|
740
|
+
Survey.createSvg(this.size, this.width, this.height, this.iconName, this.viewContaierRef.element.nativeElement);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
get rootClass() {
|
|
744
|
+
let className = "sv-svg-icon";
|
|
745
|
+
if (!this.css && !!this.partCss) {
|
|
746
|
+
className += " " + this.partCss;
|
|
747
|
+
}
|
|
748
|
+
else if (!!this.css) {
|
|
749
|
+
className = this.css;
|
|
750
|
+
}
|
|
751
|
+
return className;
|
|
752
|
+
}
|
|
753
|
+
get rootRole() {
|
|
754
|
+
return "img";
|
|
755
|
+
}
|
|
756
|
+
get ariaLabel() {
|
|
757
|
+
return this.title;
|
|
758
|
+
}
|
|
759
|
+
ngOnChanges() {
|
|
760
|
+
const el = this.viewContaierRef.element.nativeElement;
|
|
761
|
+
el.innerHTML = "";
|
|
762
|
+
el.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "use"));
|
|
763
|
+
this.createSvg();
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
SvgIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SvgIconComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
767
|
+
SvgIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: { size: "size", width: "width", height: "height", iconName: "iconName", partCss: "partCss", css: "css", title: "title" }, host: { properties: { "class": "this.rootClass", "[attr.role]": "this.rootRole", "[attr.aria-label]": "this.ariaLabel" } }, usesOnChanges: true, ngImport: i0, template: "", isInline: true });
|
|
768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SvgIconComponent, decorators: [{
|
|
769
|
+
type: Component,
|
|
770
|
+
args: [{
|
|
771
|
+
selector: "'[sv-ng-svg-icon]'",
|
|
772
|
+
template: ""
|
|
773
|
+
}]
|
|
774
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { size: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}], width: [{
|
|
777
|
+
type: Input
|
|
778
|
+
}], height: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], iconName: [{
|
|
781
|
+
type: Input
|
|
782
|
+
}], partCss: [{
|
|
783
|
+
type: Input
|
|
784
|
+
}], css: [{
|
|
785
|
+
type: Input
|
|
786
|
+
}], title: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], rootClass: [{
|
|
789
|
+
type: HostBinding,
|
|
790
|
+
args: ["class"]
|
|
791
|
+
}], rootRole: [{
|
|
792
|
+
type: HostBinding,
|
|
793
|
+
args: ["[attr.role]"]
|
|
794
|
+
}], ariaLabel: [{
|
|
795
|
+
type: HostBinding,
|
|
796
|
+
args: ["[attr.aria-label]"]
|
|
797
|
+
}] } });
|
|
798
|
+
|
|
799
|
+
class DropdownComponent {
|
|
800
|
+
get popupModel() {
|
|
801
|
+
return this.dropdownListModel.popupModel;
|
|
802
|
+
}
|
|
803
|
+
ngOnInit() {
|
|
804
|
+
this.dropdownListModel = this.model.dropdownListModel || new DropdownListModel(this.model);
|
|
805
|
+
}
|
|
806
|
+
ngOnDestroy() {
|
|
807
|
+
this.dropdownListModel?.dispose();
|
|
808
|
+
}
|
|
809
|
+
click(event) {
|
|
810
|
+
this.dropdownListModel?.onClick(event);
|
|
811
|
+
}
|
|
812
|
+
clear(event) {
|
|
813
|
+
this.dropdownListModel?.onClear(event);
|
|
814
|
+
}
|
|
815
|
+
keyup(event) {
|
|
816
|
+
this.dropdownListModel?.onKeyUp(event);
|
|
817
|
+
}
|
|
818
|
+
blur(event) {
|
|
819
|
+
this.dropdownListModel?.onBlur(event);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownComponent, selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [tabindex]=\"model.isInputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keyup)=\"keyup($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\">{{ model.readOnlyText }}</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\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n</div>", components: [{ 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
825
|
+
type: Component,
|
|
826
|
+
args: [{ selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [tabindex]=\"model.isInputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keyup)=\"keyup($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\">{{ model.readOnlyText }}</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\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n</div>" }]
|
|
827
|
+
}], propDecorators: { model: [{
|
|
828
|
+
type: Input
|
|
829
|
+
}] } });
|
|
830
|
+
|
|
831
|
+
class TagboxItemComponent extends BaseAngular {
|
|
832
|
+
removeItem(event) {
|
|
833
|
+
this.question.dropdownListModel.deselectItem(this.item.value);
|
|
834
|
+
event.stopPropagation();
|
|
835
|
+
}
|
|
836
|
+
getModel() {
|
|
837
|
+
return this.item;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
TagboxItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
841
|
+
TagboxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TagboxItemComponent, selector: "sv-ng-tagbox-item, '[sv-ng-tagbox-item]'", inputs: { item: "item", question: "question" }, usesInheritance: true, ngImport: i0, template: "<li class=\"sv-tagbox__item\">\n <div class=\"sv-tagbox__item-text\" [model]=\"item.locText\" sv-ng-string></div> \n <div [class]=\"question.cssClasses.cleanItemButton\" (click)=\"removeItem($event)\">\n <svg [iconName]=\"question.cssClasses.cleanItemButtonIconId\" [partCss]=\"question.cssClasses.cleanItemButtonSvg\" [size]=\"16\" sv-ng-svg-icon></svg>\n </div>\n</li>", 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"] }] });
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxItemComponent, decorators: [{
|
|
843
|
+
type: Component,
|
|
844
|
+
args: [{ selector: "sv-ng-tagbox-item, '[sv-ng-tagbox-item]'", template: "<li class=\"sv-tagbox__item\">\n <div class=\"sv-tagbox__item-text\" [model]=\"item.locText\" sv-ng-string></div> \n <div [class]=\"question.cssClasses.cleanItemButton\" (click)=\"removeItem($event)\">\n <svg [iconName]=\"question.cssClasses.cleanItemButtonIconId\" [partCss]=\"question.cssClasses.cleanItemButtonSvg\" [size]=\"16\" sv-ng-svg-icon></svg>\n </div>\n</li>" }]
|
|
845
|
+
}], propDecorators: { item: [{
|
|
846
|
+
type: Input
|
|
847
|
+
}], question: [{
|
|
848
|
+
type: Input
|
|
849
|
+
}] } });
|
|
850
|
+
AngularComponentFactory.Instance.registerComponent("sv-tagbox-item", TagboxItemComponent);
|
|
851
|
+
|
|
852
|
+
class TagboxComponent {
|
|
853
|
+
get popupModel() {
|
|
854
|
+
return this.dropdownListModel.popupModel;
|
|
855
|
+
}
|
|
856
|
+
ngOnInit() {
|
|
857
|
+
this.dropdownListModel = this.model.dropdownListModel || new DropdownListModel(this.model);
|
|
858
|
+
}
|
|
859
|
+
ngOnDestroy() {
|
|
860
|
+
this.dropdownListModel?.dispose();
|
|
861
|
+
}
|
|
862
|
+
click(event) {
|
|
863
|
+
this.dropdownListModel?.onClick(event);
|
|
864
|
+
}
|
|
865
|
+
clear(event) {
|
|
866
|
+
this.dropdownListModel?.onClear(event);
|
|
867
|
+
}
|
|
868
|
+
keyup(event) {
|
|
869
|
+
this.dropdownListModel?.onKeyUp(event);
|
|
870
|
+
}
|
|
871
|
+
blur(event) {
|
|
872
|
+
this.dropdownListModel?.onBlur(event);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
TagboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
876
|
+
TagboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TagboxComponent, selector: "sv-ng-tagbox, '[sv-ng-tagbox]'", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [tabindex]=\"model.isInputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keyup)=\"keyup($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 *ngIf=\"model.isEmpty()\" [class]=\"model.cssClasses.controlValue\">{{ model.placeholder }}</div>\n <ul *ngIf=\"!model.isEmpty()\" [class]=\"model.cssClasses.controlValue\">\n <sv-ng-tagbox-item *ngFor=\"let item of model.selectedItems\" [item]=\"item\" [question]=\"model\"></sv-ng-tagbox-item>\n </ul>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\" [class]=\"model.cssClasses.cleanButton\"\n (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\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n</div>", components: [{ type: TagboxItemComponent, selector: "sv-ng-tagbox-item, '[sv-ng-tagbox-item]'", inputs: ["item", "question"] }, { 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxComponent, decorators: [{
|
|
878
|
+
type: Component,
|
|
879
|
+
args: [{ selector: "sv-ng-tagbox, '[sv-ng-tagbox]'", template: "<div [class]=\"model.cssClasses.selectWrapper\">\n <div *ngIf=\"!model.isReadOnly\" [tabindex]=\"model.isInputReadOnly ? null : 0\" [class]=\"model.getControlClass()\"\n [attr.disabled]=\"model.isInputReadOnly ? true : null\" (click)=\"click($event)\" (blur)=\"blur($event)\"\n (keyup)=\"keyup($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 *ngIf=\"model.isEmpty()\" [class]=\"model.cssClasses.controlValue\">{{ model.placeholder }}</div>\n <ul *ngIf=\"!model.isEmpty()\" [class]=\"model.cssClasses.controlValue\">\n <sv-ng-tagbox-item *ngFor=\"let item of model.selectedItems\" [item]=\"item\" [question]=\"model\"></sv-ng-tagbox-item>\n </ul>\n <div *ngIf=\"(model.allowClear && model.cssClasses.cleanButtonIconId)\" [class]=\"model.cssClasses.cleanButton\"\n (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\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n <sv-ng-popup *ngIf=\"!model.isReadOnly\" [popupModel]=\"popupModel\"></sv-ng-popup>\n <div disabled *ngIf=\"model.isReadOnly\" [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n</div>" }]
|
|
880
|
+
}], propDecorators: { model: [{
|
|
881
|
+
type: Input
|
|
882
|
+
}] } });
|
|
883
|
+
|
|
884
|
+
class QuestionAngular extends BaseAngular {
|
|
885
|
+
getModel() {
|
|
886
|
+
return this.model;
|
|
887
|
+
}
|
|
888
|
+
ngAfterViewInit() {
|
|
889
|
+
if (!!this.model) {
|
|
890
|
+
this.model.afterRenderQuestionElement(this.elementContentRef?.nativeElement);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
ngOnDestroy() {
|
|
894
|
+
if (!!this.model) {
|
|
895
|
+
this.model.beforeDestroyQuestionElement(this.elementContentRef?.nativeElement);
|
|
896
|
+
}
|
|
897
|
+
super.ngOnDestroy();
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
QuestionAngular.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionAngular, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
+
QuestionAngular.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: QuestionAngular, selector: "ng-component", inputs: { model: "model" }, viewQueries: [{ propertyName: "elementContentRef", first: true, predicate: ["contentElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: QuestionAngular, decorators: [{
|
|
903
|
+
type: Component,
|
|
904
|
+
args: [{
|
|
905
|
+
template: ""
|
|
906
|
+
}]
|
|
907
|
+
}], propDecorators: { model: [{
|
|
908
|
+
type: Input
|
|
909
|
+
}], elementContentRef: [{
|
|
910
|
+
type: ViewChild,
|
|
911
|
+
args: ["contentElement"]
|
|
912
|
+
}] } });
|
|
913
|
+
|
|
914
|
+
class TextQuestionComponent extends QuestionAngular {
|
|
915
|
+
keyup(event) {
|
|
916
|
+
if (this.model.isInputTextUpdate) {
|
|
917
|
+
this.model.value = event.target.value;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
onChange(event) {
|
|
921
|
+
if (!this.model.isInputTextUpdate) {
|
|
922
|
+
this.model.value = event.target.value;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
TextQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
927
|
+
TextQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TextQuestionComponent, selector: "sv-ng-text-question", usesInheritance: true, ngImport: i0, template: " <input *ngIf=\"!model.dataListId && !model.isReadOnlyRenderDiv()\" [style]=\"model.inputStyle\" [class]=\"model.getControlClass()\"\n (change)=\"onChange($event)\" [attr.value]=\"model.value\" [disabled]=\"model.isInputReadOnly\" name=\"user\" [type]=\"model.inputType\" [id]=\"model.inputId\" [attr.placeholder]=\"model.renderedPlaceholder || ''\"\n (keyup)=\"keyup($event)\" [attr.size] = \"model.renderedInputSize\" [attr.max-length]= \"model.getMaxLength()\" [attr.min]=\"model.renderedMin\"\n [attr.max]=\"model.renderedMax\" [attr.step]=\"model.renderedStep\" [attr.max]=\"model.renderedMax\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.autocomplete]=\"model.autoComplete\"\n [attr.ar] #contentElement/>\n <div *ngIf=\"model.dataListId && !model.isReadOnlyRenderDiv()\" #contentElement>\n <input\n [style]=\"model.inputStyle\" [class]=\"model.getControlClass()\"\n (change)=\"onChange($event)\" [attr.value]=\"model.value\"\n [disabled]=\"model.isInputReadOnly\" [type]=\"model.inputType\" [id]=\"model.inputId\" [attr.placeholder]=\"model.renderedPlaceholder || ''\"\n (keyup)=\"keyup($event)\" [attr.size] = \"model.renderedInputSize\" [attr.max-length]= \"model.getMaxLength()\" [attr.min]=\"model.renderedMin\"\n [attr.max]=\"model.renderedMax\" [attr.step]=\"model.renderedStep\" [attr.max]=\"model.renderedMax\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.autocomplete]=\"model.autoComplete\"\n />\n <datalist [id]=\"model.dataListId\">\n <option *ngFor=\"let dataListItem of model.dataList\" [value]=\"dataListItem\"></option>\n </datalist>\n </div>\n <div *ngIf=\"model.isReadOnlyRenderDiv()\" #contentElement>{{ model.value }}</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
|
|
928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextQuestionComponent, decorators: [{
|
|
929
|
+
type: Component,
|
|
930
|
+
args: [{ selector: "sv-ng-text-question", template: " <input *ngIf=\"!model.dataListId && !model.isReadOnlyRenderDiv()\" [style]=\"model.inputStyle\" [class]=\"model.getControlClass()\"\n (change)=\"onChange($event)\" [attr.value]=\"model.value\" [disabled]=\"model.isInputReadOnly\" name=\"user\" [type]=\"model.inputType\" [id]=\"model.inputId\" [attr.placeholder]=\"model.renderedPlaceholder || ''\"\n (keyup)=\"keyup($event)\" [attr.size] = \"model.renderedInputSize\" [attr.max-length]= \"model.getMaxLength()\" [attr.min]=\"model.renderedMin\"\n [attr.max]=\"model.renderedMax\" [attr.step]=\"model.renderedStep\" [attr.max]=\"model.renderedMax\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.autocomplete]=\"model.autoComplete\"\n [attr.ar] #contentElement/>\n <div *ngIf=\"model.dataListId && !model.isReadOnlyRenderDiv()\" #contentElement>\n <input\n [style]=\"model.inputStyle\" [class]=\"model.getControlClass()\"\n (change)=\"onChange($event)\" [attr.value]=\"model.value\"\n [disabled]=\"model.isInputReadOnly\" [type]=\"model.inputType\" [id]=\"model.inputId\" [attr.placeholder]=\"model.renderedPlaceholder || ''\"\n (keyup)=\"keyup($event)\" [attr.size] = \"model.renderedInputSize\" [attr.max-length]= \"model.getMaxLength()\" [attr.min]=\"model.renderedMin\"\n [attr.max]=\"model.renderedMax\" [attr.step]=\"model.renderedStep\" [attr.max]=\"model.renderedMax\" [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [attr.autocomplete]=\"model.autoComplete\"\n />\n <datalist [id]=\"model.dataListId\">\n <option *ngFor=\"let dataListItem of model.dataList\" [value]=\"dataListItem\"></option>\n </datalist>\n </div>\n <div *ngIf=\"model.isReadOnlyRenderDiv()\" #contentElement>{{ model.value }}</div>\n", styles: [""] }]
|
|
931
|
+
}] });
|
|
932
|
+
AngularComponentFactory.Instance.registerComponent("text-question", TextQuestionComponent);
|
|
933
|
+
|
|
934
|
+
class SafeHtmlPipe {
|
|
935
|
+
constructor(domSanitizer) {
|
|
936
|
+
this.domSanitizer = domSanitizer;
|
|
937
|
+
}
|
|
938
|
+
transform(url) {
|
|
939
|
+
return this.domSanitizer.bypassSecurityTrustHtml(url);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
943
|
+
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
945
|
+
type: Pipe,
|
|
946
|
+
args: [{ name: "safeHtml" }]
|
|
947
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
948
|
+
|
|
949
|
+
class HtmlQuestionComponent extends QuestionAngular {
|
|
950
|
+
onModelChanged() {
|
|
951
|
+
super.onModelChanged();
|
|
952
|
+
this.model.locHtml.onChanged = () => {
|
|
953
|
+
this.detectChanges();
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
ngOnDestroy() {
|
|
957
|
+
this.model.locHtml.onChanged = () => { };
|
|
958
|
+
super.ngOnDestroy();
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
HtmlQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: HtmlQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
962
|
+
HtmlQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: HtmlQuestionComponent, selector: "sv-ng-html-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.renderCssRoot\" [innerHTML]=\"model.locHtml.renderedHtml | safeHtml\" #contentElement></div>", pipes: { "safeHtml": SafeHtmlPipe } });
|
|
963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: HtmlQuestionComponent, decorators: [{
|
|
964
|
+
type: Component,
|
|
965
|
+
args: [{ selector: "sv-ng-html-question", template: "<div [class]=\"model.renderCssRoot\" [innerHTML]=\"model.locHtml.renderedHtml | safeHtml\" #contentElement></div>", styles: [] }]
|
|
966
|
+
}] });
|
|
967
|
+
AngularComponentFactory.Instance.registerComponent("html-question", HtmlQuestionComponent);
|
|
968
|
+
|
|
969
|
+
class CheckboxItemComponent {
|
|
970
|
+
constructor() {
|
|
971
|
+
}
|
|
972
|
+
onChange(event) {
|
|
973
|
+
var newValue = [].concat(this.question.renderedValue || []);
|
|
974
|
+
var index = newValue.indexOf(this.model.value);
|
|
975
|
+
if (event.target.checked) {
|
|
976
|
+
if (index < 0) {
|
|
977
|
+
newValue.push(this.model.value);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
if (index > -1) {
|
|
982
|
+
newValue.splice(index, 1);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
this.question.renderedValue = newValue;
|
|
986
|
+
}
|
|
987
|
+
onSelectAllChange(event) {
|
|
988
|
+
this.question.toggleSelectAll();
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
CheckboxItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CheckboxItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
992
|
+
CheckboxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CheckboxItemComponent, selector: "sv-ng-checkbox-item, '[sv-ng-checkbox-item]'", inputs: { question: "question", model: "model" }, ngImport: i0, template: "<input *ngIf=\"model == question.selectAllItem\" type=\"checkbox\" [name]=\"question.name\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [checked]=\"question.isAllSelected\" [value]=\"''\" (change)=\"onSelectAllChange($event)\"/>\n<input *ngIf=\"model != question.selectAllItem\" type=\"checkbox\" [name]=\"question.name\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [checked]=\"question.isItemSelected(model)\" [value]=\"model.value\" (change)=\"onChange($event)\"/>\n<ng-content></ng-content>", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CheckboxItemComponent, decorators: [{
|
|
994
|
+
type: Component,
|
|
995
|
+
args: [{ selector: "sv-ng-checkbox-item, '[sv-ng-checkbox-item]'", template: "<input *ngIf=\"model == question.selectAllItem\" type=\"checkbox\" [name]=\"question.name\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [checked]=\"question.isAllSelected\" [value]=\"''\" (change)=\"onSelectAllChange($event)\"/>\n<input *ngIf=\"model != question.selectAllItem\" type=\"checkbox\" [name]=\"question.name\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [checked]=\"question.isItemSelected(model)\" [value]=\"model.value\" (change)=\"onChange($event)\"/>\n<ng-content></ng-content>", styles: [""] }]
|
|
996
|
+
}], ctorParameters: function () { return []; }, propDecorators: { question: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], model: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}] } });
|
|
1001
|
+
|
|
1002
|
+
class RadiogroupItemComponent {
|
|
1003
|
+
constructor() {
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
RadiogroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RadiogroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1007
|
+
RadiogroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RadiogroupItemComponent, selector: "sv-ng-radiogroup-item, '[sv-ng-radiogroup-item]'", inputs: { question: "question", model: "model" }, ngImport: i0, template: "<input type=\"radio\" [name]=\"question.questionName\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [(ngModel)]=\"question.renderedValue\" [attr.value]=\"model.value\" [value]=\"model.value\"\n/>\n<ng-content></ng-content>", styles: [""], directives: [{ type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RadiogroupItemComponent, decorators: [{
|
|
1009
|
+
type: Component,
|
|
1010
|
+
args: [{ selector: "sv-ng-radiogroup-item, '[sv-ng-radiogroup-item]'", template: "<input type=\"radio\" [name]=\"question.questionName\" [id]=\"question.getItemId(model)\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [class]=\"question.cssClasses.itemControl\"\n [disabled]=\"!question.getItemEnabled(model)\" [(ngModel)]=\"question.renderedValue\" [attr.value]=\"model.value\" [value]=\"model.value\"\n/>\n<ng-content></ng-content>", styles: [""] }]
|
|
1011
|
+
}], ctorParameters: function () { return []; }, propDecorators: { question: [{
|
|
1012
|
+
type: Input
|
|
1013
|
+
}], model: [{
|
|
1014
|
+
type: Input
|
|
1015
|
+
}] } });
|
|
1016
|
+
|
|
1017
|
+
class SelectBaseItemComponent extends BaseAngular {
|
|
1018
|
+
constructor() {
|
|
1019
|
+
super(...arguments);
|
|
1020
|
+
this.showLabel = true;
|
|
1021
|
+
}
|
|
1022
|
+
getModel() {
|
|
1023
|
+
return this.model;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
SelectBaseItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectBaseItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1027
|
+
SelectBaseItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: { question: "question", model: "model", inputType: "inputType", showLabel: "showLabel" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div role=\"presentation\" [class]=\"question.getItemClass(model)\">\n <ng-container [ngSwitch]=\"inputType\">\n <label *ngSwitchCase=\"'checkbox'\" [class]=\"question.getLabelClass(model)\" [attr.aria-label]=\"question.getAriaItemLabel(model)\" [model]=\"model\" [question]=\"question\" sv-ng-checkbox-item>\n <ng-container *ngTemplateOutlet=\"itemDecorator\"></ng-container>\n </label>\n <label *ngSwitchCase=\"'radio'\" [class]=\"question.getLabelClass(model)\" [attr.aria-label]=\"question.getAriaItemLabel(model)\" [model]=\"model\" [question]=\"question\" sv-ng-radiogroup-item>\n <ng-container *ngTemplateOutlet=\"itemDecorator\"></ng-container>\n </label>\n </ng-container>\n <ng-template #itemDecorator>\n <span *ngIf=\"question.cssClasses.materialDecorator\" [class]=\"question.cssClasses.materialDecorator\">\n <svg *ngIf=\"question.itemSvgIcon\" [class]=\"question.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"question.itemSvgIcon\"></use>\n </svg>\n </span>\n <span [class]=\"question.getControlLabelClass(model)\" [visible]=\"!model.hideCaption\">\n <sv-ng-string [model]=\"model.locText\"></sv-ng-string>\n </span> \n </ng-template>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: CheckboxItemComponent, selector: "sv-ng-checkbox-item, '[sv-ng-checkbox-item]'", inputs: ["question", "model"] }, { type: RadiogroupItemComponent, selector: "sv-ng-radiogroup-item, '[sv-ng-radiogroup-item]'", inputs: ["question", "model"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
1028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectBaseItemComponent, decorators: [{
|
|
1029
|
+
type: Component,
|
|
1030
|
+
args: [{ selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", styles: [":host { display: none; }"], template: "<ng-template #template>\n <div role=\"presentation\" [class]=\"question.getItemClass(model)\">\n <ng-container [ngSwitch]=\"inputType\">\n <label *ngSwitchCase=\"'checkbox'\" [class]=\"question.getLabelClass(model)\" [attr.aria-label]=\"question.getAriaItemLabel(model)\" [model]=\"model\" [question]=\"question\" sv-ng-checkbox-item>\n <ng-container *ngTemplateOutlet=\"itemDecorator\"></ng-container>\n </label>\n <label *ngSwitchCase=\"'radio'\" [class]=\"question.getLabelClass(model)\" [attr.aria-label]=\"question.getAriaItemLabel(model)\" [model]=\"model\" [question]=\"question\" sv-ng-radiogroup-item>\n <ng-container *ngTemplateOutlet=\"itemDecorator\"></ng-container>\n </label>\n </ng-container>\n <ng-template #itemDecorator>\n <span *ngIf=\"question.cssClasses.materialDecorator\" [class]=\"question.cssClasses.materialDecorator\">\n <svg *ngIf=\"question.itemSvgIcon\" [class]=\"question.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"question.itemSvgIcon\"></use>\n </svg>\n </span>\n <span [class]=\"question.getControlLabelClass(model)\" [visible]=\"!model.hideCaption\">\n <sv-ng-string [model]=\"model.locText\"></sv-ng-string>\n </span> \n </ng-template>\n </div>\n</ng-template>" }]
|
|
1031
|
+
}], propDecorators: { question: [{
|
|
1032
|
+
type: Input
|
|
1033
|
+
}], model: [{
|
|
1034
|
+
type: Input
|
|
1035
|
+
}], inputType: [{
|
|
1036
|
+
type: Input
|
|
1037
|
+
}], showLabel: [{
|
|
1038
|
+
type: Input
|
|
1039
|
+
}] } });
|
|
1040
|
+
|
|
1041
|
+
class SelectBaseComponent extends QuestionAngular {
|
|
1042
|
+
constructor() {
|
|
1043
|
+
super(...arguments);
|
|
1044
|
+
this.inputType = "checkbox";
|
|
1045
|
+
this.showLegend = true;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
SelectBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1049
|
+
SelectBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SelectBaseComponent, selector: "['sv-ng-selectbase']", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>", components: [{ type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: ["question", "model", "inputType", "showLabel"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SelectBaseComponent, decorators: [{
|
|
1051
|
+
type: Component,
|
|
1052
|
+
args: [{ selector: "['sv-ng-selectbase']", template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>" }]
|
|
1053
|
+
}], propDecorators: { model: [{
|
|
1054
|
+
type: Input
|
|
1055
|
+
}] } });
|
|
1056
|
+
AngularComponentFactory.Instance.registerComponent("selectbase", SelectBaseComponent);
|
|
1057
|
+
|
|
1058
|
+
class RadiogroupComponent extends SelectBaseComponent {
|
|
1059
|
+
ngOnInit() {
|
|
1060
|
+
this.inputType = "radio";
|
|
1061
|
+
this.showLegend = false;
|
|
1062
|
+
super.ngOnInit();
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
RadiogroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RadiogroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1066
|
+
RadiogroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RadiogroupComponent, selector: "sv-ng-radiogroup-question", usesInheritance: true, ngImport: i0, template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>", components: [{ type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: ["question", "model", "inputType", "showLabel"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RadiogroupComponent, decorators: [{
|
|
1068
|
+
type: Component,
|
|
1069
|
+
args: [{ selector: "sv-ng-radiogroup-question", template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>" }]
|
|
1070
|
+
}] });
|
|
1071
|
+
AngularComponentFactory.Instance.registerComponent("radiogroup-question", RadiogroupComponent);
|
|
1072
|
+
|
|
1073
|
+
class CheckboxComponent extends SelectBaseComponent {
|
|
1074
|
+
}
|
|
1075
|
+
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1076
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CheckboxComponent, selector: "sv-ng-checkbox-question", usesInheritance: true, ngImport: i0, template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>", components: [{ type: SelectBaseItemComponent, selector: "['sv-ng-selectbase-item'], sv-ng-selebase-item", inputs: ["question", "model", "inputType", "showLabel"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1078
|
+
type: Component,
|
|
1079
|
+
args: [{ selector: "sv-ng-checkbox-question", template: "<fieldset [class]=\"model.getSelectBaseRootCss()\" role=\"presentation\" #contentElement>\n <legend *ngIf=\"showLegend\" role=\"presentation\" class=\"sv-hidden\"></legend>\n <ng-container *ngIf=\"model.hasHeadItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.headItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <ng-container *ngIf=\"!model.hasColumns && !model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.visibleChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div [class]=\"model.cssClasses.rootRow\" *ngIf=\"!model.hasColumns && model.blockedRow\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.dataChoices\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </div>\n <ng-container *ngIf=\"model.hasColumns\">\n <div [class]=\"model.cssClasses.rootMultiColumn\">\n <div [class]=\"model.getColumnClass()\" *ngFor=\"let column of model.columns\" role=\"presentation\">\n <sv-ng-selectbase-item *ngFor=\"let item of column\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item> \n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"model.hasFootItems\">\n <sv-ng-selectbase-item *ngFor=\"let item of model.footItems\" [question]=\"model\" [model]=\"item\" [inputType]=\"inputType\"></sv-ng-selectbase-item>\n </ng-container>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n <div *ngIf=\"model.showClearButtonInContent\">\n <input\n type=\"button\"\n (click)=\"model.clearValue()\"\n [value]=\"model.clearButtonCaption\"\n [class]=\"model.cssClasses.clearButton\"\n />\n </div>\n</fieldset>" }]
|
|
1080
|
+
}] });
|
|
1081
|
+
AngularComponentFactory.Instance.registerComponent("checkbox-question", CheckboxComponent);
|
|
1082
|
+
|
|
1083
|
+
class DropdownQuestionComponent extends QuestionAngular {
|
|
1084
|
+
}
|
|
1085
|
+
DropdownQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1086
|
+
DropdownQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownQuestionComponent, selector: "sv-ng-dropdown-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.renderCssRoot\" #contentElement>\n <sv-ng-dropdown [model]=\"model\"></sv-ng-dropdown>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n</div>", components: [{ type: DropdownComponent, selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", inputs: ["model"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownQuestionComponent, decorators: [{
|
|
1088
|
+
type: Component,
|
|
1089
|
+
args: [{ selector: "sv-ng-dropdown-question", template: "<div [class]=\"model.renderCssRoot\" #contentElement>\n <sv-ng-dropdown [model]=\"model\"></sv-ng-dropdown>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n</div>" }]
|
|
1090
|
+
}] });
|
|
1091
|
+
AngularComponentFactory.Instance.registerComponent("dropdown-question", DropdownQuestionComponent);
|
|
1092
|
+
|
|
1093
|
+
class DropdownOptionItemComponent extends BaseAngular {
|
|
1094
|
+
getModel() {
|
|
1095
|
+
return this.item;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
DropdownOptionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownOptionItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1099
|
+
DropdownOptionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownOptionItemComponent, selector: "sv-ng-dropdown-option-item, '[sv-ng-dropdown-option-item]'", inputs: { item: "item" }, usesInheritance: true, ngImport: i0, template: '<ng-template #template><option [value]="item.value" [disabled]="!item.isEnabled">{{ item.text }}</option><ng-template>', isInline: true, directives: [{ type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
|
|
1100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownOptionItemComponent, decorators: [{
|
|
1101
|
+
type: Component,
|
|
1102
|
+
args: [{
|
|
1103
|
+
selector: "sv-ng-dropdown-option-item, '[sv-ng-dropdown-option-item]'",
|
|
1104
|
+
template: '<ng-template #template><option [value]="item.value" [disabled]="!item.isEnabled">{{ item.text }}</option><ng-template>',
|
|
1105
|
+
}]
|
|
1106
|
+
}], propDecorators: { item: [{
|
|
1107
|
+
type: Input
|
|
1108
|
+
}] } });
|
|
1109
|
+
AngularComponentFactory.Instance.registerComponent("sv-dropdown-option-item", DropdownOptionItemComponent);
|
|
1110
|
+
|
|
1111
|
+
class DropdownSelectComponent {
|
|
1112
|
+
get editableValue() {
|
|
1113
|
+
return this.model.renderedValue || "";
|
|
1114
|
+
}
|
|
1115
|
+
set editableValue(newValue) {
|
|
1116
|
+
if (newValue === "") {
|
|
1117
|
+
this.model.renderedValue = undefined;
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
this.model.renderedValue = newValue;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
click(event) {
|
|
1124
|
+
this.model.onClick(event);
|
|
1125
|
+
}
|
|
1126
|
+
keyup(event) {
|
|
1127
|
+
this.model.onKeyUp(event);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
DropdownSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1131
|
+
DropdownSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DropdownSelectComponent, selector: "sv-ng-dropdown-select-question", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.renderCssRoot\">\n <div [class]=\"model.cssClasses.selectWrapper\">\n <select *ngIf=\"!model.isReadOnly\" [attr.id]=\"model.inputId\" [(ngModel)]=\"editableValue\"\n [disabled]=\"model.isInputReadOnly\" (click)=\"click($event)\" (keyup)=\"keyup($event)\"\n [class]=\"model.getControlClass()\" [attr.autocomplete]=\"model.autoComplete\" [required]=\"model.isRequired\"\n [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\">\n <option *ngIf=\"model.allowClear\" value=\"\">{{ model.placeholder }}</option>\n <ng-template *ngFor=\"let item of model.visibleChoices\" [component]=\"{ name: 'sv-dropdown-option-item', data: { item } }\"></ng-template>\n </select>\n <div *ngIf=\"model.isReadOnly\" disabled [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n </div>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\"\n [style.display]=\"model.isFlowLayout ? 'inline': '' \" [question]=\"model\" sv-ng-comment></div>\n</div>", components: [{ type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
1132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DropdownSelectComponent, decorators: [{
|
|
1133
|
+
type: Component,
|
|
1134
|
+
args: [{ selector: "sv-ng-dropdown-select-question", template: "<div [class]=\"model.renderCssRoot\">\n <div [class]=\"model.cssClasses.selectWrapper\">\n <select *ngIf=\"!model.isReadOnly\" [attr.id]=\"model.inputId\" [(ngModel)]=\"editableValue\"\n [disabled]=\"model.isInputReadOnly\" (click)=\"click($event)\" (keyup)=\"keyup($event)\"\n [class]=\"model.getControlClass()\" [attr.autocomplete]=\"model.autoComplete\" [required]=\"model.isRequired\"\n [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\">\n <option *ngIf=\"model.allowClear\" value=\"\">{{ model.placeholder }}</option>\n <ng-template *ngFor=\"let item of model.visibleChoices\" [component]=\"{ name: 'sv-dropdown-option-item', data: { item } }\"></ng-template>\n </select>\n <div *ngIf=\"model.isReadOnly\" disabled [class]=\"model.getControlClass()\" [attr.id]=\"model.inputId\">{{ model.readOnlyText }}</div>\n </div>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\"\n [style.display]=\"model.isFlowLayout ? 'inline': '' \" [question]=\"model\" sv-ng-comment></div>\n</div>" }]
|
|
1135
|
+
}], propDecorators: { model: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}] } });
|
|
1138
|
+
AngularComponentFactory.Instance.registerComponent("dropdown-select-question", DropdownSelectComponent);
|
|
1139
|
+
RendererFactory.Instance.registerRenderer("dropdown", "select", "dropdown-select-question");
|
|
1140
|
+
|
|
1141
|
+
class TagboxQuestionComponent extends QuestionAngular {
|
|
1142
|
+
}
|
|
1143
|
+
TagboxQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1144
|
+
TagboxQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TagboxQuestionComponent, selector: "sv-ng-tagbox-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.renderCssRoot\" #contentElement>\n <sv-ng-tagbox [model]=\"model\"></sv-ng-tagbox>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n</div>", components: [{ type: TagboxComponent, selector: "sv-ng-tagbox, '[sv-ng-tagbox]'", inputs: ["model"] }, { type: SurveyCommentComponent, selector: "sv-ng-comment, '[sv-ng-comment]'", inputs: ["question"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TagboxQuestionComponent, decorators: [{
|
|
1146
|
+
type: Component,
|
|
1147
|
+
args: [{ selector: "sv-ng-tagbox-question", template: "<div [class]=\"model.renderCssRoot\" #contentElement>\n <sv-ng-tagbox [model]=\"model\"></sv-ng-tagbox>\n <div *ngIf=\"model.hasOther && model.isOtherSelected\" class=\"form-group\" [question]=\"model\" sv-ng-comment></div>\n</div>" }]
|
|
1148
|
+
}] });
|
|
1149
|
+
AngularComponentFactory.Instance.registerComponent("tagbox-question", TagboxQuestionComponent);
|
|
1150
|
+
|
|
1151
|
+
class RatingQuestionComponent extends QuestionAngular {
|
|
1152
|
+
trackByFn(index) {
|
|
1153
|
+
return index;
|
|
1154
|
+
}
|
|
1155
|
+
onClick(event) {
|
|
1156
|
+
event.stopPropagation();
|
|
1157
|
+
this.model.setValueFromClick(event.target.value);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
RatingQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RatingQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1161
|
+
RatingQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RatingQuestionComponent, selector: "sv-ng-rating-question", usesInheritance: true, ngImport: i0, template: " <div [class]=\"model.ratingRootCss\" #contentElement>\n <fieldset role=\"radiogroup\">\n <legend role=\"presentation\" class=\"sv-hidden\"></legend>\n <span *ngIf=\"model.hasMinLabel\" [class]=\"model.cssClasses.minText\" [model]=\"model.locMinRateDescription\" sv-ng-string>\n </span>\n <label *ngFor=\"let item of model.renderedRateItems; index as index; trackBy: trackByFn\" [class]=\"model.getItemClass(item.itemValue)\" >\n <input type=\"radio\"\n class=\"sv-visuallyhidden\"\n [attr.name]=\"model.name\" [attr.id]=\"model.getInputId(index)\" [value]=\"item.value\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [disabled]=\"model.isInputReadOnly\" [checked]=\"model.value === item.value\" (click)=\"onClick($event)\"\n />\n <span [class]=\"model.cssClasses.itemText\" [model]=\"item.locText\" sv-ng-string></span>\n </label>\n <span *ngIf=\"model.hasMaxLabel\" [class]=\"model.cssClasses.maxText\" [model]=\"model.locMaxRateDescription\" sv-ng-string></span>\n </fieldset>\n </div>\n", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RatingQuestionComponent, decorators: [{
|
|
1163
|
+
type: Component,
|
|
1164
|
+
args: [{ selector: "sv-ng-rating-question", template: " <div [class]=\"model.ratingRootCss\" #contentElement>\n <fieldset role=\"radiogroup\">\n <legend role=\"presentation\" class=\"sv-hidden\"></legend>\n <span *ngIf=\"model.hasMinLabel\" [class]=\"model.cssClasses.minText\" [model]=\"model.locMinRateDescription\" sv-ng-string>\n </span>\n <label *ngFor=\"let item of model.renderedRateItems; index as index; trackBy: trackByFn\" [class]=\"model.getItemClass(item.itemValue)\" >\n <input type=\"radio\"\n class=\"sv-visuallyhidden\"\n [attr.name]=\"model.name\" [attr.id]=\"model.getInputId(index)\" [value]=\"item.value\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [disabled]=\"model.isInputReadOnly\" [checked]=\"model.value === item.value\" (click)=\"onClick($event)\"\n />\n <span [class]=\"model.cssClasses.itemText\" [model]=\"item.locText\" sv-ng-string></span>\n </label>\n <span *ngIf=\"model.hasMaxLabel\" [class]=\"model.cssClasses.maxText\" [model]=\"model.locMaxRateDescription\" sv-ng-string></span>\n </fieldset>\n </div>\n" }]
|
|
1165
|
+
}] });
|
|
1166
|
+
AngularComponentFactory.Instance.registerComponent("rating-question", RatingQuestionComponent);
|
|
1167
|
+
|
|
1168
|
+
class BooleanQuestionComponent extends QuestionAngular {
|
|
1169
|
+
onChange(event) {
|
|
1170
|
+
this.model.checkedValue = event.target.value;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
BooleanQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1174
|
+
BooleanQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BooleanQuestionComponent, selector: "sv-ng-boolean-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.cssClasses.root\" (keydown)=\"model.onKeyDownCore($event)\" #contentElement>\n <label [class]=\"model.getItemCss()\">\n <input\n type=\"checkbox\"\n [attr.name]=\"model.name\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [class]=\"model.cssClasses.control\" [disabled]=\"model.isInputReadOnly\" [indeterminate]=\"model.isIndeterminate\" [value]=\"model.checkedValue\" [(ngModel)]=\"model.checkedValue\" />\n <span [class]=\"model.getLabelCss(false)\" (click)=\"model.onLabelClick($event, false)\" [model]=\"model.locLabelFalse\" sv-ng-string></span>\n <div [class]=\"model.cssClasses.switch\" (click)=\"model.onSwitchClickModel($event)\">\n <span [class]=\"model.cssClasses.slider\">\n <span *ngIf=\"model.cssClasses.sliderText && model.isDeterminated\" [class]=\"model.cssClasses.sliderText\" [model]=\"model.getCheckedLabel()\" sv-ng-string></span>\n </span>\n </div>\n <span [class]=\"model.getLabelCss(true)\" (click)=\"model.onLabelClick($event, true)\" [model]=\"model.locLabelTrue\" sv-ng-string></span>\n </label>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanQuestionComponent, decorators: [{
|
|
1176
|
+
type: Component,
|
|
1177
|
+
args: [{ selector: "sv-ng-boolean-question", template: "<div [class]=\"model.cssClasses.root\" (keydown)=\"model.onKeyDownCore($event)\" #contentElement>\n <label [class]=\"model.getItemCss()\">\n <input\n type=\"checkbox\"\n [attr.name]=\"model.name\" [attr.id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\" [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [class]=\"model.cssClasses.control\" [disabled]=\"model.isInputReadOnly\" [indeterminate]=\"model.isIndeterminate\" [value]=\"model.checkedValue\" [(ngModel)]=\"model.checkedValue\" />\n <span [class]=\"model.getLabelCss(false)\" (click)=\"model.onLabelClick($event, false)\" [model]=\"model.locLabelFalse\" sv-ng-string></span>\n <div [class]=\"model.cssClasses.switch\" (click)=\"model.onSwitchClickModel($event)\">\n <span [class]=\"model.cssClasses.slider\">\n <span *ngIf=\"model.cssClasses.sliderText && model.isDeterminated\" [class]=\"model.cssClasses.sliderText\" [model]=\"model.getCheckedLabel()\" sv-ng-string></span>\n </span>\n </div>\n <span [class]=\"model.getLabelCss(true)\" (click)=\"model.onLabelClick($event, true)\" [model]=\"model.locLabelTrue\" sv-ng-string></span>\n </label>\n</div>" }]
|
|
1178
|
+
}] });
|
|
1179
|
+
AngularComponentFactory.Instance.registerComponent("boolean-question", BooleanQuestionComponent);
|
|
1180
|
+
|
|
1181
|
+
class ImagePickerItemComponent extends BaseAngular {
|
|
1182
|
+
getModel() {
|
|
1183
|
+
return this.model;
|
|
1184
|
+
}
|
|
1185
|
+
onChange(event) {
|
|
1186
|
+
if (this.question.multiSelect) {
|
|
1187
|
+
if (event.target.checked) {
|
|
1188
|
+
this.question.value = this.question.value.concat(event.target.value);
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
var currValue = this.question.value;
|
|
1192
|
+
currValue.splice(this.question.value.indexOf(event.target.value), 1);
|
|
1193
|
+
this.question.value = currValue;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
else {
|
|
1197
|
+
this.question.value = event.target.value;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
ngAfterViewInit() {
|
|
1201
|
+
this.model.locImageLink.onChanged = () => {
|
|
1202
|
+
this.detectChanges();
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
ngOnDestroy() {
|
|
1206
|
+
super.ngOnDestroy();
|
|
1207
|
+
this.model.locImageLink.onChanged = () => { };
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
ImagePickerItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImagePickerItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1211
|
+
ImagePickerItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ImagePickerItemComponent, selector: "sv-ng-imagepicker-item", inputs: { question: "question", model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"question.getItemClass(model)\">\n <label [class]=\"question.cssClasses.label\">\n <input [type]=\"question.inputType\" [attr.name]=\"question.questionName\" [attr.value]=\"model.value\" [id]=\"question.getItemId(model)\" [attr.aria-required]=\"question.ariaRequired\" [attr.aria-label]=\"question.ariaLabel\" [attr.aria-invalid]=\"question.ariaInvalid\" [attr.aria-describedby]=\"question.ariaDescribedBy\"\n (change)=\"onChange($event)\" [checked]=\"question.isItemSelected(model)\" [disabled]=\"!question.getItemEnabled(model)\" [class]=\"question.cssClasses.itemControl\"\n />\n <div [class]=\"question.cssClasses.itemDecorator\">\n <div [class]=\"question.cssClasses.imageContainer\">\n <img *ngIf=\"model.locImageLink.renderedHtml && question.contentMode === 'image'\" [class]=\"question.cssClasses.image\" [attr.src]=\"model.locImageLink.renderedHtml\" [attr.width]=\"question.renderedImageWidth\" [attr.height]=\"question.renderedImageHeight\" [attr.alt]=\"model.locText.renderedHtml\" [style.objectFit]=\"question.imageFit\" (load)=\"question.onContentLoaded(model, $event)\"/>\n <video *ngIf=\"model.locImageLink.renderedHtml && question.contentMode === 'video'\" controls [class]=\"question.cssClasses.image\" [attr.src]=\"model.locImageLink.renderedHtml\" [attr.width]=\"question.renderedImageWidth\" [attr.height]=\"question.renderedImageHeight\" [style.objectFit]=\"question.imageFit\" (loadedmetadata)=\"question.onContentLoaded(model, $event)\"></video>\n <div *ngIf=\"!model.locImageLink.renderedHtml\" [class]=\"question.cssClasses.itemNoImage\" [style.width]=\"question.renderedImageWidth\" [style.height]=\"question.renderedImageHeight\" [style.objectFit]=\"question.imageFit\">\n <svg [class]=\"question.cssClasses.itemNoImageSvgIcon\" *ngIf=\"question.cssClasses.itemNoImageSvgIcon\">\n <use [attr.xlink:href]=\"question.cssClasses.itemNoImageSvgIconId\"></use>\n </svg>\n </div>\n </div>\n <span *ngIf=\"question.showLabel\" [class]=\"question.cssClasses.itemText\" [model]=\"model.locText\" sv-ng-string></span>\n </div>\n </label>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImagePickerItemComponent, decorators: [{
|
|
1213
|
+
type: Component,
|
|
1214
|
+
args: [{ selector: "sv-ng-imagepicker-item", styles: [":host { display: none; }"], template: "<ng-template #template>\n <div [class]=\"question.getItemClass(model)\">\n <label [class]=\"question.cssClasses.label\">\n <input [type]=\"question.inputType\" [attr.name]=\"question.questionName\" [attr.value]=\"model.value\" [id]=\"question.getItemId(model)\" [attr.aria-required]=\"question.ariaRequired\" [attr.aria-label]=\"question.ariaLabel\" [attr.aria-invalid]=\"question.ariaInvalid\" [attr.aria-describedby]=\"question.ariaDescribedBy\"\n (change)=\"onChange($event)\" [checked]=\"question.isItemSelected(model)\" [disabled]=\"!question.getItemEnabled(model)\" [class]=\"question.cssClasses.itemControl\"\n />\n <div [class]=\"question.cssClasses.itemDecorator\">\n <div [class]=\"question.cssClasses.imageContainer\">\n <img *ngIf=\"model.locImageLink.renderedHtml && question.contentMode === 'image'\" [class]=\"question.cssClasses.image\" [attr.src]=\"model.locImageLink.renderedHtml\" [attr.width]=\"question.renderedImageWidth\" [attr.height]=\"question.renderedImageHeight\" [attr.alt]=\"model.locText.renderedHtml\" [style.objectFit]=\"question.imageFit\" (load)=\"question.onContentLoaded(model, $event)\"/>\n <video *ngIf=\"model.locImageLink.renderedHtml && question.contentMode === 'video'\" controls [class]=\"question.cssClasses.image\" [attr.src]=\"model.locImageLink.renderedHtml\" [attr.width]=\"question.renderedImageWidth\" [attr.height]=\"question.renderedImageHeight\" [style.objectFit]=\"question.imageFit\" (loadedmetadata)=\"question.onContentLoaded(model, $event)\"></video>\n <div *ngIf=\"!model.locImageLink.renderedHtml\" [class]=\"question.cssClasses.itemNoImage\" [style.width]=\"question.renderedImageWidth\" [style.height]=\"question.renderedImageHeight\" [style.objectFit]=\"question.imageFit\">\n <svg [class]=\"question.cssClasses.itemNoImageSvgIcon\" *ngIf=\"question.cssClasses.itemNoImageSvgIcon\">\n <use [attr.xlink:href]=\"question.cssClasses.itemNoImageSvgIconId\"></use>\n </svg>\n </div>\n </div>\n <span *ngIf=\"question.showLabel\" [class]=\"question.cssClasses.itemText\" [model]=\"model.locText\" sv-ng-string></span>\n </div>\n </label>\n </div>\n</ng-template>" }]
|
|
1215
|
+
}], propDecorators: { question: [{
|
|
1216
|
+
type: Input
|
|
1217
|
+
}], model: [{
|
|
1218
|
+
type: Input
|
|
1219
|
+
}] } });
|
|
1220
|
+
|
|
1221
|
+
class ImagePickerQuestionComponent extends QuestionAngular {
|
|
1222
|
+
}
|
|
1223
|
+
ImagePickerQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImagePickerQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1224
|
+
ImagePickerQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ImagePickerQuestionComponent, selector: "sv-ng-imagepicker-question", usesInheritance: true, ngImport: i0, template: " <fieldset [class]=\"model.getSelectBaseRootCss()\" #contentElement>\n <legend [attr.aria-label]=\"model.locTitle.renderedHtml\" role=\"radio\"></legend>\n <ng-container *ngIf=\"!model.hasColumns\">\n <sv-ng-imagepicker-item *ngFor=\"let item of model.visibleChoices\" [model]=\"$any(item)\" [question]=\"model\"></sv-ng-imagepicker-item>\n </ng-container>\n <ng-container *ngIf=\"model.hasColumns\">\n <div *ngFor=\"let column of model.columns\" [class]=\"model.getColumnClass()\" role=\"presentation\">\n <sv-ng-imagepicker-item *ngFor=\"let item of column\" [model]=\"item\" [question]=\"model\"></sv-ng-imagepicker-item>\n </div>\n </ng-container>\n </fieldset>", components: [{ type: ImagePickerItemComponent, selector: "sv-ng-imagepicker-item", inputs: ["question", "model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImagePickerQuestionComponent, decorators: [{
|
|
1226
|
+
type: Component,
|
|
1227
|
+
args: [{ selector: "sv-ng-imagepicker-question", template: " <fieldset [class]=\"model.getSelectBaseRootCss()\" #contentElement>\n <legend [attr.aria-label]=\"model.locTitle.renderedHtml\" role=\"radio\"></legend>\n <ng-container *ngIf=\"!model.hasColumns\">\n <sv-ng-imagepicker-item *ngFor=\"let item of model.visibleChoices\" [model]=\"$any(item)\" [question]=\"model\"></sv-ng-imagepicker-item>\n </ng-container>\n <ng-container *ngIf=\"model.hasColumns\">\n <div *ngFor=\"let column of model.columns\" [class]=\"model.getColumnClass()\" role=\"presentation\">\n <sv-ng-imagepicker-item *ngFor=\"let item of column\" [model]=\"item\" [question]=\"model\"></sv-ng-imagepicker-item>\n </div>\n </ng-container>\n </fieldset>" }]
|
|
1228
|
+
}] });
|
|
1229
|
+
AngularComponentFactory.Instance.registerComponent("imagepicker-question", ImagePickerQuestionComponent);
|
|
1230
|
+
|
|
1231
|
+
class Key2ClickDirective {
|
|
1232
|
+
constructor(el) {
|
|
1233
|
+
this.el = el;
|
|
1234
|
+
this.isSubscribed = false;
|
|
1235
|
+
this.options = Key2ClickDirective.defaultOptions;
|
|
1236
|
+
this.subscribeEventListeners();
|
|
1237
|
+
}
|
|
1238
|
+
onkeydown(evt) {
|
|
1239
|
+
doKey2ClickDown(evt, this.options);
|
|
1240
|
+
}
|
|
1241
|
+
onkeyup(evt) {
|
|
1242
|
+
evt.preventDefault();
|
|
1243
|
+
evt.stopPropagation();
|
|
1244
|
+
doKey2ClickUp(evt, this.options);
|
|
1245
|
+
return false;
|
|
1246
|
+
}
|
|
1247
|
+
blur(evt) {
|
|
1248
|
+
doKey2ClickBlur(evt);
|
|
1249
|
+
}
|
|
1250
|
+
get element() {
|
|
1251
|
+
return this.el.nativeElement;
|
|
1252
|
+
}
|
|
1253
|
+
subscribeEventListeners() {
|
|
1254
|
+
if (this.isSubscribed)
|
|
1255
|
+
return;
|
|
1256
|
+
this.element.tabIndex = 0;
|
|
1257
|
+
this.element.addEventListener("keyup", this.onkeyup);
|
|
1258
|
+
this.element.addEventListener("keydown", this.onkeydown);
|
|
1259
|
+
this.element.addEventListener("blur", this.blur);
|
|
1260
|
+
this.isSubscribed = true;
|
|
1261
|
+
}
|
|
1262
|
+
unsubscribeEventListeners() {
|
|
1263
|
+
if (!this.isSubscribed)
|
|
1264
|
+
return;
|
|
1265
|
+
this.element.tabIndex = -1;
|
|
1266
|
+
this.element.removeEventListener("keyup", this.onkeyup);
|
|
1267
|
+
this.element.removeEventListener("keydown", this.onkeydown);
|
|
1268
|
+
this.element.removeEventListener("blur", this.blur);
|
|
1269
|
+
this.isSubscribed = false;
|
|
1270
|
+
}
|
|
1271
|
+
ngOnChanges(changes) {
|
|
1272
|
+
const curValue = changes["key2click"].currentValue;
|
|
1273
|
+
if (curValue.disableTabStop) {
|
|
1274
|
+
this.unsubscribeEventListeners();
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
this.subscribeEventListeners();
|
|
1278
|
+
}
|
|
1279
|
+
this.options = Object.assign({}, Key2ClickDirective.defaultOptions, curValue);
|
|
1280
|
+
}
|
|
1281
|
+
ngOnDestroy() {
|
|
1282
|
+
this.unsubscribeEventListeners();
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
Key2ClickDirective.defaultOptions = { processEsc: true, disableTabStop: false };
|
|
1286
|
+
Key2ClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: Key2ClickDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1287
|
+
Key2ClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: Key2ClickDirective, selector: "[key2click]", inputs: { key2click: "key2click" }, usesOnChanges: true, ngImport: i0 });
|
|
1288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: Key2ClickDirective, decorators: [{
|
|
1289
|
+
type: Directive,
|
|
1290
|
+
args: [{
|
|
1291
|
+
selector: "[key2click]"
|
|
1292
|
+
}]
|
|
1293
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { key2click: [{
|
|
1294
|
+
type: Input
|
|
1295
|
+
}] } });
|
|
1296
|
+
|
|
1297
|
+
class ActionBarItemComponent extends BaseAngular {
|
|
1298
|
+
getModel() {
|
|
1299
|
+
return this.model;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
ActionBarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1303
|
+
ActionBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ActionBarItemComponent, selector: "sv-action-bar-item", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.action()\" [key2click]=\"{ processEsc: false }\" [class]=\"model.getActionBarItemCss()\" [attr.title]=\"model.tooltip || model.title\" [disabled]=\"model.disabled\" \n data-bind=\"key2click: { processEsc: false }\">\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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarItemComponent, decorators: [{
|
|
1305
|
+
type: Component,
|
|
1306
|
+
args: [{ selector: "sv-action-bar-item", template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.action()\" [key2click]=\"{ processEsc: false }\" [class]=\"model.getActionBarItemCss()\" [attr.title]=\"model.tooltip || model.title\" [disabled]=\"model.disabled\" \n data-bind=\"key2click: { processEsc: false }\">\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"] }]
|
|
1307
|
+
}], propDecorators: { model: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}] } });
|
|
1310
|
+
AngularComponentFactory.Instance.registerComponent("sv-action-bar-item", ActionBarItemComponent);
|
|
1311
|
+
|
|
1312
|
+
class ActionBarItemDropdownComponent extends BaseAngular {
|
|
1313
|
+
getModel() {
|
|
1314
|
+
return this.model;
|
|
1315
|
+
}
|
|
1316
|
+
ngOnInit() {
|
|
1317
|
+
super.ngOnInit();
|
|
1318
|
+
this.viewModel = new ActionDropdownViewModel(this.model);
|
|
1319
|
+
}
|
|
1320
|
+
ngOnDestroy() {
|
|
1321
|
+
this.viewModel.dispose();
|
|
1322
|
+
super.ngOnDestroy();
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
ActionBarItemDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarItemDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1326
|
+
ActionBarItemDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ActionBarItemDropdownComponent, selector: "sv-action-bar-item-dropdown", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.action()\" [key2click]=\"{ processEsc: false }\" [class]=\"model.getActionBarItemCss()\" [title]=\"model.tooltip || model.title\" [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 <sv-ng-popup [popupModel]=\"model.popupModel\"></sv-ng-popup>\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"] }, { type: PopupComponent, selector: "sv-ng-popup, '[sv-ng-popup]'", inputs: ["popupModel"] }], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ActionBarItemDropdownComponent, decorators: [{
|
|
1328
|
+
type: Component,
|
|
1329
|
+
args: [{ selector: "sv-action-bar-item-dropdown", template: "<ng-template #template>\n <button type=\"button\" (click)=\"model.action()\" [key2click]=\"{ processEsc: false }\" [class]=\"model.getActionBarItemCss()\" [title]=\"model.tooltip || model.title\" [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 <sv-ng-popup [popupModel]=\"model.popupModel\"></sv-ng-popup>\n </button>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
1330
|
+
}], propDecorators: { model: [{
|
|
1331
|
+
type: Input
|
|
1332
|
+
}] } });
|
|
1333
|
+
AngularComponentFactory.Instance.registerComponent("sv-action-bar-item-dropdown", ActionBarItemDropdownComponent);
|
|
1334
|
+
|
|
1335
|
+
class ListItemComponent extends BaseAngular {
|
|
1336
|
+
get ariaSelected() {
|
|
1337
|
+
return this.listModel.isItemSelected(this.model) || "";
|
|
1338
|
+
}
|
|
1339
|
+
get class() {
|
|
1340
|
+
return this.listModel.getItemClass(this.model);
|
|
1341
|
+
}
|
|
1342
|
+
get paddingLeft() {
|
|
1343
|
+
return this.listModel.getItemIndent(this.model);
|
|
1344
|
+
}
|
|
1345
|
+
click(event) {
|
|
1346
|
+
this.listModel.onItemClick(this.model);
|
|
1347
|
+
event.stopPropagation();
|
|
1348
|
+
}
|
|
1349
|
+
pointerdown(event) {
|
|
1350
|
+
this.listModel.onPointerDown(event, this.model);
|
|
1351
|
+
}
|
|
1352
|
+
getModel() {
|
|
1353
|
+
return this.model;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
ListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ListItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1357
|
+
ListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ListItemComponent, selector: "sv-ng-list-item, '[sv-ng-list-item]'", inputs: { element: "element", model: "model", listModel: "listModel" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <li role=\"option\" [key2click] [visible]=\"listModel.isItemVisible(model)\" [class]=\"class\" [style.paddingLeft]=\"paddingLeft\" [attr.aria-selected]=\"ariaSelected\" (click)=\"click($event)\" (pointerdown)=\"pointerdown($event)\">\n <ng-container *ngIf=\"!model.component\">\n <svg *ngIf=\"model.iconName\" class=\"sv-list__item-icon\" [iconName]=\"model.iconName\" [size]=\"24\"\n sv-ng-svg-icon></svg>\n <span>{{ model.title }}</span>\n </ng-container>\n <ng-container *ngIf=\"model.component\">\n <ng-template [component]=\"{ name: model.component, data: { model: model } }\"></ng-template>\n </ng-container>\n </li>\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: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
1358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ListItemComponent, decorators: [{
|
|
1359
|
+
type: Component,
|
|
1360
|
+
args: [{ selector: "sv-ng-list-item, '[sv-ng-list-item]'", template: "<ng-template #template>\n <li role=\"option\" [key2click] [visible]=\"listModel.isItemVisible(model)\" [class]=\"class\" [style.paddingLeft]=\"paddingLeft\" [attr.aria-selected]=\"ariaSelected\" (click)=\"click($event)\" (pointerdown)=\"pointerdown($event)\">\n <ng-container *ngIf=\"!model.component\">\n <svg *ngIf=\"model.iconName\" class=\"sv-list__item-icon\" [iconName]=\"model.iconName\" [size]=\"24\"\n sv-ng-svg-icon></svg>\n <span>{{ model.title }}</span>\n </ng-container>\n <ng-container *ngIf=\"model.component\">\n <ng-template [component]=\"{ name: model.component, data: { model: model } }\"></ng-template>\n </ng-container>\n </li>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
1361
|
+
}], propDecorators: { element: [{
|
|
1362
|
+
type: Input
|
|
1363
|
+
}], model: [{
|
|
1364
|
+
type: Input
|
|
1365
|
+
}], listModel: [{
|
|
1366
|
+
type: Input
|
|
1367
|
+
}] } });
|
|
1368
|
+
AngularComponentFactory.Instance.registerComponent("sv-list-item", ListItemComponent);
|
|
1369
|
+
|
|
1370
|
+
class ListComponent extends BaseAngular {
|
|
1371
|
+
getModel() {
|
|
1372
|
+
return this.model;
|
|
1373
|
+
}
|
|
1374
|
+
onGoToItems(event) {
|
|
1375
|
+
this.model.goToItems(event);
|
|
1376
|
+
}
|
|
1377
|
+
onMouseDown(event) {
|
|
1378
|
+
event.preventDefault();
|
|
1379
|
+
}
|
|
1380
|
+
onKeyDown(event) {
|
|
1381
|
+
this.model.onKeyDown(event);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1385
|
+
ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ListComponent, selector: "sv-ng-list, '[sv-ng-list]'", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div class=\"sv-list__container\">\n <div *ngIf=\"model.needFilter\" class=\"sv-list__filter\">\n <div class=\"sv-list__filter-icon\">\n <svg class=\"sv-list__item-icon\" [iconName]=\"'icon-search'\" [size]=\"24\" sv-ng-svg-icon></svg>\n </div>\n <input type=\"text\" class=\"sv-list__input\" [(ngModel)]=\"model.filteredText\"\n [attr.aria-label]=\"model.filteredTextPlaceholder || ''\"\n [attr.placeholder]=\"model.filteredTextPlaceholder || ''\"\n (keyup)=\"onGoToItems($event)\" />\n </div>\n <ul class=\"sv-list\" role=\"listbox\" (mousedown)=\"onMouseDown($event)\" (keydown)=\"onKeyDown($event)\">\n <sv-ng-list-item *ngFor=\"let item of model.renderedActions\" [listModel]=\"model\" [model]=\"item\"></sv-ng-list-item>\n <!--ko foreach: model.renderedActions -->\n <!-- ko component: { name: 'sv-list-item', params: { item: $data, model: $parent.model } } -->\n <!-- /ko -->\n <!-- /ko -->\n </ul>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }, { type: ListItemComponent, selector: "sv-ng-list-item, '[sv-ng-list-item]'", inputs: ["element", "model", "listModel"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ListComponent, decorators: [{
|
|
1387
|
+
type: Component,
|
|
1388
|
+
args: [{ selector: "sv-ng-list, '[sv-ng-list]'", template: "<ng-template #template>\n <div class=\"sv-list__container\">\n <div *ngIf=\"model.needFilter\" class=\"sv-list__filter\">\n <div class=\"sv-list__filter-icon\">\n <svg class=\"sv-list__item-icon\" [iconName]=\"'icon-search'\" [size]=\"24\" sv-ng-svg-icon></svg>\n </div>\n <input type=\"text\" class=\"sv-list__input\" [(ngModel)]=\"model.filteredText\"\n [attr.aria-label]=\"model.filteredTextPlaceholder || ''\"\n [attr.placeholder]=\"model.filteredTextPlaceholder || ''\"\n (keyup)=\"onGoToItems($event)\" />\n </div>\n <ul class=\"sv-list\" role=\"listbox\" (mousedown)=\"onMouseDown($event)\" (keydown)=\"onKeyDown($event)\">\n <sv-ng-list-item *ngFor=\"let item of model.renderedActions\" [listModel]=\"model\" [model]=\"item\"></sv-ng-list-item>\n <!--ko foreach: model.renderedActions -->\n <!-- ko component: { name: 'sv-list-item', params: { item: $data, model: $parent.model } } -->\n <!-- /ko -->\n <!-- /ko -->\n </ul>\n </div>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
1389
|
+
}], propDecorators: { model: [{
|
|
1390
|
+
type: Input
|
|
1391
|
+
}] } });
|
|
1392
|
+
AngularComponentFactory.Instance.registerComponent("sv-list", ListComponent);
|
|
1393
|
+
|
|
1394
|
+
class RatingDropdownComponent {
|
|
1395
|
+
}
|
|
1396
|
+
RatingDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RatingDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1397
|
+
RatingDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RatingDropdownComponent, selector: "sv-ng-rating-dropdown-question", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.cssClasses.rootDropdown\">\n <sv-ng-dropdown [model]=\"model\"></sv-ng-dropdown>\n</div>", components: [{ type: DropdownComponent, selector: "sv-ng-dropdown, '[sv-ng-dropdown]'", inputs: ["model"] }] });
|
|
1398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RatingDropdownComponent, decorators: [{
|
|
1399
|
+
type: Component,
|
|
1400
|
+
args: [{ selector: "sv-ng-rating-dropdown-question", template: "<div [class]=\"model.cssClasses.rootDropdown\">\n <sv-ng-dropdown [model]=\"model\"></sv-ng-dropdown>\n</div>" }]
|
|
1401
|
+
}], propDecorators: { model: [{
|
|
1402
|
+
type: Input
|
|
1403
|
+
}] } });
|
|
1404
|
+
AngularComponentFactory.Instance.registerComponent("rating-dropdown-question", RatingDropdownComponent);
|
|
1405
|
+
RendererFactory.Instance.registerRenderer("rating", "dropdown", "rating-dropdown-question");
|
|
1406
|
+
|
|
1407
|
+
class BooleanCheckboxComponent {
|
|
1408
|
+
}
|
|
1409
|
+
BooleanCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1410
|
+
BooleanCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BooleanCheckboxComponent, selector: "sv-ng-boolean-checkbox-question", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.cssClasses.root\">\n <label [class]=\"model.getItemCss()\">\n <input\n type=\"checkbox\"\n [value]=\"model.checkedValue\" [class]=\"model.cssClasses.controlCheckbox\" \n [attr.name]=\"model.name\" [id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [(ngModel)]=\"model.checkedValue\" [value]=\"model.checkedValue\"\n [disabled]=\"model.isInputReadOnly\" [indeterminate]=\"model.isIndeterminate\"\n />\n <span [class]=\"model.cssClasses.materialDecorator\">\n <svg *ngIf=\"!!model.svgIcon\" [class]=\"model.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"model.svgIcon\"></use>\n </svg>\n <span class=\"check\"></span>\n </span>\n <span *ngIf=\"model.titleLocation === 'hidden'\" [class]=\"model.cssClasses.label\" [model]=\"model.locDisplayLabel\" sv-ng-string></span>\n </label>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanCheckboxComponent, decorators: [{
|
|
1412
|
+
type: Component,
|
|
1413
|
+
args: [{ selector: "sv-ng-boolean-checkbox-question", template: "<div [class]=\"model.cssClasses.root\">\n <label [class]=\"model.getItemCss()\">\n <input\n type=\"checkbox\"\n [value]=\"model.checkedValue\" [class]=\"model.cssClasses.controlCheckbox\" \n [attr.name]=\"model.name\" [id]=\"model.inputId\" [attr.aria-required]=\"model.ariaRequired\" [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\" [attr.aria-describedby]=\"model.ariaDescribedBy\" [(ngModel)]=\"model.checkedValue\" [value]=\"model.checkedValue\"\n [disabled]=\"model.isInputReadOnly\" [indeterminate]=\"model.isIndeterminate\"\n />\n <span [class]=\"model.cssClasses.materialDecorator\">\n <svg *ngIf=\"!!model.svgIcon\" [class]=\"model.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"model.svgIcon\"></use>\n </svg>\n <span class=\"check\"></span>\n </span>\n <span *ngIf=\"model.titleLocation === 'hidden'\" [class]=\"model.cssClasses.label\" [model]=\"model.locDisplayLabel\" sv-ng-string></span>\n </label>\n</div>" }]
|
|
1414
|
+
}], propDecorators: { model: [{
|
|
1415
|
+
type: Input
|
|
1416
|
+
}] } });
|
|
1417
|
+
AngularComponentFactory.Instance.registerComponent("boolean-checkbox-question", BooleanCheckboxComponent);
|
|
1418
|
+
RendererFactory.Instance.registerRenderer("boolean", "checkbox", "boolean-checkbox-question");
|
|
1419
|
+
|
|
1420
|
+
class BooleanRadioItemComponent {
|
|
1421
|
+
constructor() {
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
BooleanRadioItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanRadioItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1425
|
+
BooleanRadioItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BooleanRadioItemComponent, selector: "sv-ng-boolean-radio-item", inputs: { question: "question", value: "value", locText: "locText" }, ngImport: i0, template: "<div role=\"presentation\" [class]=\"question.getRadioItemClass(question.cssClasses, value)\">\n <label [class]=\"question.cssClasses.radioLabel\">\n <input\n type=\"radio\"\n [attr.name]=\"question.name\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [value]=\"value\" [(ngModel)]=\"question.value\"\n [disabled]=\"question.isInputReadOnly\" [class]=\"question.cssClasses.itemControl || ''\"\n />\n <span *ngIf=\"question.cssClasses.materialRadioDecorator\" [class]=\"question.cssClasses.materialRadioDecorator\"></span>\n <span [class]=\"question.cssClasses.radioControlLabel\" [model]=\"locText\" sv-ng-string>\n </span>\n </label>\n</div>\n", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanRadioItemComponent, decorators: [{
|
|
1427
|
+
type: Component,
|
|
1428
|
+
args: [{ selector: "sv-ng-boolean-radio-item", template: "<div role=\"presentation\" [class]=\"question.getRadioItemClass(question.cssClasses, value)\">\n <label [class]=\"question.cssClasses.radioLabel\">\n <input\n type=\"radio\"\n [attr.name]=\"question.name\" [attr.aria-describedby]=\"question.ariaDescribedBy\" [value]=\"value\" [(ngModel)]=\"question.value\"\n [disabled]=\"question.isInputReadOnly\" [class]=\"question.cssClasses.itemControl || ''\"\n />\n <span *ngIf=\"question.cssClasses.materialRadioDecorator\" [class]=\"question.cssClasses.materialRadioDecorator\"></span>\n <span [class]=\"question.cssClasses.radioControlLabel\" [model]=\"locText\" sv-ng-string>\n </span>\n </label>\n</div>\n" }]
|
|
1429
|
+
}], ctorParameters: function () { return []; }, propDecorators: { question: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], value: [{
|
|
1432
|
+
type: Input
|
|
1433
|
+
}], locText: [{
|
|
1434
|
+
type: Input
|
|
1435
|
+
}] } });
|
|
1436
|
+
|
|
1437
|
+
class BooleanRadioComponent {
|
|
1438
|
+
}
|
|
1439
|
+
BooleanRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1440
|
+
BooleanRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: BooleanRadioComponent, selector: "sv-ng-boolean-radio-question", inputs: { model: "model" }, ngImport: i0, template: "<div [class]=\"model.cssClasses.rootRadio\">\n <fieldset role=\"presentation\" [class]=\"model.cssClasses.radioFieldset\">\n <sv-ng-boolean-radio-item [value]=\"false\" [locText]=\"model.locLabelFalse\" [question]=\"model\" ></sv-ng-boolean-radio-item>\n <sv-ng-boolean-radio-item [value]=\"true\" [locText]=\"model.locLabelTrue\" [question]=\"model\" ></sv-ng-boolean-radio-item>\n </fieldset>\n</div>\n", components: [{ type: BooleanRadioItemComponent, selector: "sv-ng-boolean-radio-item", inputs: ["question", "value", "locText"] }] });
|
|
1441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: BooleanRadioComponent, decorators: [{
|
|
1442
|
+
type: Component,
|
|
1443
|
+
args: [{ selector: "sv-ng-boolean-radio-question", template: "<div [class]=\"model.cssClasses.rootRadio\">\n <fieldset role=\"presentation\" [class]=\"model.cssClasses.radioFieldset\">\n <sv-ng-boolean-radio-item [value]=\"false\" [locText]=\"model.locLabelFalse\" [question]=\"model\" ></sv-ng-boolean-radio-item>\n <sv-ng-boolean-radio-item [value]=\"true\" [locText]=\"model.locLabelTrue\" [question]=\"model\" ></sv-ng-boolean-radio-item>\n </fieldset>\n</div>\n" }]
|
|
1444
|
+
}], propDecorators: { model: [{
|
|
1445
|
+
type: Input
|
|
1446
|
+
}] } });
|
|
1447
|
+
AngularComponentFactory.Instance.registerComponent("boolean-radio-question", BooleanRadioComponent);
|
|
1448
|
+
RendererFactory.Instance.registerRenderer("boolean", "radio", "boolean-radio-question");
|
|
1449
|
+
|
|
1450
|
+
class ProgressDefaultComponent extends EmbeddedViewContentComponent {
|
|
1451
|
+
getProgressTextInBarCss(css) {
|
|
1452
|
+
return SurveyProgressModel.getProgressTextInBarCss(css);
|
|
1453
|
+
}
|
|
1454
|
+
getProgressTextUnderBarCss(css) {
|
|
1455
|
+
return SurveyProgressModel.getProgressTextUnderBarCss(css);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
ProgressDefaultComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressDefaultComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1459
|
+
ProgressDefaultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ProgressDefaultComponent, selector: "sv-ng-progress-default", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"model.css.progress\">\n <div [class]=\"model.css.progressBar\" [style.width]=\"model.progressValue + '%'\"\n role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span [class]=\"getProgressTextInBarCss(model.css)\">\n {{ model.progressText }}\n </span>\n </div>\n <span [class]=\"getProgressTextUnderBarCss(model.css)\"> {{ model.progressText }} </span>\n </div>\n</ng-template>" });
|
|
1460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressDefaultComponent, decorators: [{
|
|
1461
|
+
type: Component,
|
|
1462
|
+
args: [{ selector: "sv-ng-progress-default", template: "<ng-template #template>\n <div [class]=\"model.css.progress\">\n <div [class]=\"model.css.progressBar\" [style.width]=\"model.progressValue + '%'\"\n role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span [class]=\"getProgressTextInBarCss(model.css)\">\n {{ model.progressText }}\n </span>\n </div>\n <span [class]=\"getProgressTextUnderBarCss(model.css)\"> {{ model.progressText }} </span>\n </div>\n</ng-template>" }]
|
|
1463
|
+
}], propDecorators: { model: [{
|
|
1464
|
+
type: Input
|
|
1465
|
+
}] } });
|
|
1466
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-progress", ProgressDefaultComponent);
|
|
1467
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-pages", ProgressDefaultComponent);
|
|
1468
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-questions", ProgressDefaultComponent);
|
|
1469
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-correctQuestions", ProgressDefaultComponent);
|
|
1470
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-requiredQuestions", ProgressDefaultComponent);
|
|
1471
|
+
|
|
1472
|
+
class ProgressButtonsComponent {
|
|
1473
|
+
constructor(changeDetectorRef) {
|
|
1474
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
1475
|
+
this.hasScroller = false;
|
|
1476
|
+
this.updateScroller = undefined;
|
|
1477
|
+
}
|
|
1478
|
+
createProgressButtonsModel() {
|
|
1479
|
+
this.progressButtonsModel = new SurveyProgressButtonsModel(this.model);
|
|
1480
|
+
}
|
|
1481
|
+
ngOnInit() {
|
|
1482
|
+
this.createProgressButtonsModel();
|
|
1483
|
+
}
|
|
1484
|
+
ngOnChanges(changes) {
|
|
1485
|
+
this.createProgressButtonsModel();
|
|
1486
|
+
}
|
|
1487
|
+
isListElementClickable(index) {
|
|
1488
|
+
return this.progressButtonsModel.isListElementClickable(index);
|
|
1489
|
+
}
|
|
1490
|
+
getListElementCss(index) {
|
|
1491
|
+
return this.progressButtonsModel.getListElementCss(index);
|
|
1492
|
+
}
|
|
1493
|
+
clickListElement(index) {
|
|
1494
|
+
this.progressButtonsModel.clickListElement(index);
|
|
1495
|
+
}
|
|
1496
|
+
getScrollButtonCss(isLeftScroll) {
|
|
1497
|
+
return this.progressButtonsModel.getScrollButtonCss(this.hasScroller, isLeftScroll);
|
|
1498
|
+
}
|
|
1499
|
+
clickScrollButton(isLeftScroll) {
|
|
1500
|
+
if (this.progressButtonsListContainer) {
|
|
1501
|
+
this.progressButtonsListContainer.nativeElement.scrollLeft += (isLeftScroll ? -1 : 1) * 70;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
ngAfterViewInit() {
|
|
1505
|
+
this.progressButtonsModel = new SurveyProgressButtonsModel(this.model);
|
|
1506
|
+
this.updateScroller = setInterval(() => {
|
|
1507
|
+
if (!!this.progressButtonsListContainer?.nativeElement) {
|
|
1508
|
+
const listContainerElement = this.progressButtonsListContainer.nativeElement;
|
|
1509
|
+
this.hasScroller = listContainerElement.scrollWidth > listContainerElement.offsetWidth;
|
|
1510
|
+
this.changeDetectorRef.detectChanges();
|
|
1511
|
+
}
|
|
1512
|
+
}, 100);
|
|
1513
|
+
}
|
|
1514
|
+
ngOnDestroy() {
|
|
1515
|
+
if (typeof this.updateScroller !== "undefined") {
|
|
1516
|
+
clearInterval(this.updateScroller);
|
|
1517
|
+
this.updateScroller = undefined;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
ProgressButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressButtonsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1522
|
+
ProgressButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ProgressButtonsComponent, selector: "sv-ng-progress-buttons", inputs: { model: "model" }, viewQueries: [{ propertyName: "progressButtonsListContainer", first: true, predicate: ["progressButtonsListContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [class]=\"model.css.progressButtonsContainerCenter\">\n <div [class]=\"model.css.progressButtonsContainer\">\n <div\n [class]=\"getScrollButtonCss(true)\"\n (click)=\"clickScrollButton(true)\"\n role=\"button\"\n ></div>\n <div\n [class]=\"model.css.progressButtonsListContainer\" #progressButtonsListContainer>\n <ul [class]=\"model.css.progressButtonsList\">\n <li\n *ngFor=\"let page of model.visiblePages; index as index\"\n [class]=\"getListElementCss(index)\"\n (click)=\"isListElementClickable(index) ? clickListElement(index) : null\">\n <div\n [class]=\"model.css.progressButtonsPageTitle\"\n [title]=\"page.locNavigationTitle.renderedHtml || page.name\"\n >\n {{ page.locNavigationTitle.renderedHtml || page.name }}\n </div>\n <div\n [class]=\"model.css.progressButtonsPageDescription\"\n [title]=\"page.locNavigationDescription.renderedHtml\"\n >\n {{ page.locNavigationDescription.renderedHtml }}\n </div>\n </li>\n </ul>\n </div>\n <div\n [class]=\"getScrollButtonCss(false)\"\n (click)=\"clickScrollButton(false)\"\n role=\"button\"\n ></div>\n </div>\n</div>", directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressButtonsComponent, decorators: [{
|
|
1524
|
+
type: Component,
|
|
1525
|
+
args: [{ selector: "sv-ng-progress-buttons", template: "<div [class]=\"model.css.progressButtonsContainerCenter\">\n <div [class]=\"model.css.progressButtonsContainer\">\n <div\n [class]=\"getScrollButtonCss(true)\"\n (click)=\"clickScrollButton(true)\"\n role=\"button\"\n ></div>\n <div\n [class]=\"model.css.progressButtonsListContainer\" #progressButtonsListContainer>\n <ul [class]=\"model.css.progressButtonsList\">\n <li\n *ngFor=\"let page of model.visiblePages; index as index\"\n [class]=\"getListElementCss(index)\"\n (click)=\"isListElementClickable(index) ? clickListElement(index) : null\">\n <div\n [class]=\"model.css.progressButtonsPageTitle\"\n [title]=\"page.locNavigationTitle.renderedHtml || page.name\"\n >\n {{ page.locNavigationTitle.renderedHtml || page.name }}\n </div>\n <div\n [class]=\"model.css.progressButtonsPageDescription\"\n [title]=\"page.locNavigationDescription.renderedHtml\"\n >\n {{ page.locNavigationDescription.renderedHtml }}\n </div>\n </li>\n </ul>\n </div>\n <div\n [class]=\"getScrollButtonCss(false)\"\n (click)=\"clickScrollButton(false)\"\n role=\"button\"\n ></div>\n </div>\n</div>" }]
|
|
1526
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { model: [{
|
|
1527
|
+
type: Input
|
|
1528
|
+
}], progressButtonsListContainer: [{
|
|
1529
|
+
type: ViewChild,
|
|
1530
|
+
args: ["progressButtonsListContainer"]
|
|
1531
|
+
}] } });
|
|
1532
|
+
AngularComponentFactory.Instance.registerComponent("sv-progress-buttons", ProgressButtonsComponent);
|
|
1533
|
+
|
|
1534
|
+
class PanelComponent extends BaseAngular {
|
|
1535
|
+
constructor() {
|
|
1536
|
+
super(...arguments);
|
|
1537
|
+
this.trackRowBy = (_, row) => {
|
|
1538
|
+
return row.id;
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
getModel() {
|
|
1542
|
+
return this.model;
|
|
1543
|
+
}
|
|
1544
|
+
ngAfterViewInit() {
|
|
1545
|
+
if (!!this.panelContainerRef?.nativeElement) {
|
|
1546
|
+
this.model.survey?.afterRenderPanel(this.model, this.panelContainerRef.nativeElement);
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
PanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1551
|
+
PanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelComponent, selector: "sv-ng-panel, '[sv-ng-panel]'", inputs: { model: "model" }, viewQueries: [{ propertyName: "panelContainerRef", first: true, predicate: ["panelContainer"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div *ngIf=\"model.isVisible\" [attr.id]=\"model.id\" [class]=\"model.getContainerCss()\" (focusin)=\"model.focusIn()\" #panelContainer>\n <div *ngIf=\"model.hasDescription || model.hasTitle\" [element]=\"model\" sv-ng-element-header></div>\n <!-- ko template: { name: 'survey-question-errors', data: $data } -->\n <!-- /ko -->\n <div *ngIf=\"!model.isCollapsed\" [style.paddingLeft]=\"model.innerPaddingLeft\" [class]=\"model.cssClasses.panel.content\" [attr.id]=\"model.contentId\">\n <ng-container *ngFor=\"let row of model.rows; trackBy: trackRowBy\">\n <sv-ng-row [row]=\"row\" style=\"display: contents;\"></sv-ng-row>\n </ng-container>\n <sv-ng-action-bar [model]=\"model.getFooterToolbar()\"></sv-ng-action-bar>\n </div>\n </div>\n</ng-template>", components: [{ type: ElementHeaderComponent, selector: "'[sv-ng-element-header]'", inputs: ["element"] }, { type: RowComponent, selector: "sv-ng-row", inputs: ["row"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelComponent, decorators: [{
|
|
1553
|
+
type: Component,
|
|
1554
|
+
args: [{ selector: "sv-ng-panel, '[sv-ng-panel]'", template: "<ng-template #template>\n <div *ngIf=\"model.isVisible\" [attr.id]=\"model.id\" [class]=\"model.getContainerCss()\" (focusin)=\"model.focusIn()\" #panelContainer>\n <div *ngIf=\"model.hasDescription || model.hasTitle\" [element]=\"model\" sv-ng-element-header></div>\n <!-- ko template: { name: 'survey-question-errors', data: $data } -->\n <!-- /ko -->\n <div *ngIf=\"!model.isCollapsed\" [style.paddingLeft]=\"model.innerPaddingLeft\" [class]=\"model.cssClasses.panel.content\" [attr.id]=\"model.contentId\">\n <ng-container *ngFor=\"let row of model.rows; trackBy: trackRowBy\">\n <sv-ng-row [row]=\"row\" style=\"display: contents;\"></sv-ng-row>\n </ng-container>\n <sv-ng-action-bar [model]=\"model.getFooterToolbar()\"></sv-ng-action-bar>\n </div>\n </div>\n</ng-template>" }]
|
|
1555
|
+
}], propDecorators: { model: [{
|
|
1556
|
+
type: Input
|
|
1557
|
+
}], panelContainerRef: [{
|
|
1558
|
+
type: ViewChild,
|
|
1559
|
+
args: ["panelContainer", { static: false, read: ElementRef }]
|
|
1560
|
+
}] } });
|
|
1561
|
+
AngularComponentFactory.Instance.registerComponent("panel", PanelComponent);
|
|
1562
|
+
|
|
1563
|
+
class SurveyNavigationButton {
|
|
1564
|
+
getModel() {
|
|
1565
|
+
return this.model;
|
|
1566
|
+
}
|
|
1567
|
+
buttonMouseDown() {
|
|
1568
|
+
return this.model.data && this.model.data.mouseDown();
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
SurveyNavigationButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyNavigationButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1572
|
+
SurveyNavigationButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SurveyNavigationButton, selector: "sv-ng-nav-btn", inputs: { model: "model" }, ngImport: i0, template: "<input *ngIf=\"model.visible\" type=\"button\" [value]=\"model.title\" [class]=\"model.innerCss\" (mousedown)=\"buttonMouseDown()\" (click)=\"model.action()\"/>", styles: [":host{display:contents}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyNavigationButton, decorators: [{
|
|
1574
|
+
type: Component,
|
|
1575
|
+
args: [{ selector: "sv-ng-nav-btn", styles: [":host { display: contents; }"], template: "<input *ngIf=\"model.visible\" type=\"button\" [value]=\"model.title\" [class]=\"model.innerCss\" (mousedown)=\"buttonMouseDown()\" (click)=\"model.action()\"/>" }]
|
|
1576
|
+
}], propDecorators: { model: [{
|
|
1577
|
+
type: Input
|
|
1578
|
+
}] } });
|
|
1579
|
+
AngularComponentFactory.Instance.registerComponent("sv-nav-btn", SurveyNavigationButton);
|
|
1580
|
+
|
|
1581
|
+
class MatrixQuestionComponent extends QuestionAngular {
|
|
1582
|
+
ngOnInit() {
|
|
1583
|
+
this.model.visibleRowsChangedCallback = () => {
|
|
1584
|
+
this.detectChanges();
|
|
1585
|
+
};
|
|
1586
|
+
super.ngOnInit();
|
|
1587
|
+
}
|
|
1588
|
+
onChange(row, column) {
|
|
1589
|
+
if (this.model.isInputReadOnly)
|
|
1590
|
+
return;
|
|
1591
|
+
row.value = column.value;
|
|
1592
|
+
this.detectChanges();
|
|
1593
|
+
}
|
|
1594
|
+
trackRowByFn(i, row) {
|
|
1595
|
+
return "column-" + row.name + "-" + i;
|
|
1596
|
+
}
|
|
1597
|
+
trackColumnByFn(i, column) {
|
|
1598
|
+
return "column-" + column.value + "-" + i;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
MatrixQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1602
|
+
MatrixQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixQuestionComponent, selector: "sv-ng-matrix-question", usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"model.cssClasses.tableWrapper\" #contentElement>\n <fieldset>\n <legend [attr.aria-label]=\"model.locTitle.renderedHtml\"></legend>\n <table [class]=\"model.getTableCss()\">\n <thead *ngIf=\"model.showHeader\">\n <tr>\n <td [visible]=\"model.hasRows\"></td>\n <th\n *ngFor=\"let column of model.visibleColumns\" [class]=\"model.cssClasses.headerCell\" \n [model]=\"column.locText\" sv-ng-string>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of model.visibleRows; trackBy: trackRowByFn \" [class]=\"row.rowClasses || undefined\">\n <td [class]=\"model.cssClasses.rowTextCell\" *ngIf=\"model.hasRows\" [model]=\"row.locText\" sv-ng-string></td>\n <ng-container *ngIf=\"model.hasCellText\">\n <td *ngFor=\"let column of model.visibleColumns\"\n [class]=\"model.getItemClass(row, column)\"\n (click)=\"onChange(row, column)\" [model]=\"model.getCellDisplayLocText(row.name, column)\" sv-ng-string>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!model.hasCellText\">\n <td\n *ngFor=\"let column of model.visibleColumns; index as columnIndex; trackBy: trackColumnByFn\"\n [attr.data-responsive-title]=\"column.locText.renderedHtml\"\n [class]=\"model.cssClasses.cell\">\n <label [class]=\"model.getItemClass(row, column)\">\n <input\n type=\"radio\"\n [class]=\"model.cssClasses.itemValue\"\n [name]=\"row.fullName\"\n [value]=\"column.value\"\n [checked]=\"row.value === column.value\"\n [disabled]=\"model.isInputReadOnly\"\n [attr.id]=\"model.inputId + '_' + row.name + '_' + columnIndex\"\n (change)=\"onChange(row, column)\"\n [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"column.locText.renderedHtml\"\n [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\"\n />\n <span [class]=\"model.cssClasses.materialDecorator\">\n <svg *ngIf=\"model.itemSvgIcon\" [class]=\"model.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"model.itemSvgIcon\"></use>\n </svg> \n </span>\n <span [visible]=\"model.isMobile\" [class]=\"model.cssClasses.cellResponsiveTitle\" [model]=\"column.locText\" sv-ng-string></span>\n </label>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixQuestionComponent, decorators: [{
|
|
1604
|
+
type: Component,
|
|
1605
|
+
args: [{ selector: "sv-ng-matrix-question", template: "<ng-template #template>\n <div [class]=\"model.cssClasses.tableWrapper\" #contentElement>\n <fieldset>\n <legend [attr.aria-label]=\"model.locTitle.renderedHtml\"></legend>\n <table [class]=\"model.getTableCss()\">\n <thead *ngIf=\"model.showHeader\">\n <tr>\n <td [visible]=\"model.hasRows\"></td>\n <th\n *ngFor=\"let column of model.visibleColumns\" [class]=\"model.cssClasses.headerCell\" \n [model]=\"column.locText\" sv-ng-string>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of model.visibleRows; trackBy: trackRowByFn \" [class]=\"row.rowClasses || undefined\">\n <td [class]=\"model.cssClasses.rowTextCell\" *ngIf=\"model.hasRows\" [model]=\"row.locText\" sv-ng-string></td>\n <ng-container *ngIf=\"model.hasCellText\">\n <td *ngFor=\"let column of model.visibleColumns\"\n [class]=\"model.getItemClass(row, column)\"\n (click)=\"onChange(row, column)\" [model]=\"model.getCellDisplayLocText(row.name, column)\" sv-ng-string>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!model.hasCellText\">\n <td\n *ngFor=\"let column of model.visibleColumns; index as columnIndex; trackBy: trackColumnByFn\"\n [attr.data-responsive-title]=\"column.locText.renderedHtml\"\n [class]=\"model.cssClasses.cell\">\n <label [class]=\"model.getItemClass(row, column)\">\n <input\n type=\"radio\"\n [class]=\"model.cssClasses.itemValue\"\n [name]=\"row.fullName\"\n [value]=\"column.value\"\n [checked]=\"row.value === column.value\"\n [disabled]=\"model.isInputReadOnly\"\n [attr.id]=\"model.inputId + '_' + row.name + '_' + columnIndex\"\n (change)=\"onChange(row, column)\"\n [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"column.locText.renderedHtml\"\n [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\"\n />\n <span [class]=\"model.cssClasses.materialDecorator\">\n <svg *ngIf=\"model.itemSvgIcon\" [class]=\"model.cssClasses.itemDecorator\">\n <use [attr.xlink:href]=\"model.itemSvgIcon\"></use>\n </svg> \n </span>\n <span [visible]=\"model.isMobile\" [class]=\"model.cssClasses.cellResponsiveTitle\" [model]=\"column.locText\" sv-ng-string></span>\n </label>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{display:none}\n"] }]
|
|
1606
|
+
}] });
|
|
1607
|
+
AngularComponentFactory.Instance.registerComponent("matrix-question", MatrixQuestionComponent);
|
|
1608
|
+
|
|
1609
|
+
class FileQuestionComponent extends QuestionAngular {
|
|
1610
|
+
constructor() {
|
|
1611
|
+
super(...arguments);
|
|
1612
|
+
this.trackFilesFn = (index) => {
|
|
1613
|
+
return this.model.inputId + "_" + index;
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
FileQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FileQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1618
|
+
FileQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FileQuestionComponent, selector: "sv-ng-file-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.fileRootCss\" #contentElement>\n <input\n [class]=\"model.cssClasses.fileInput\"\n *ngIf=\"!model.isReadOnly\"\n type=\"file\"\n [attr.id]=\"model.inputId\"\n (change)=\"model.doChange($event)\"\n [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [attr.multiple]=\"model.multipleRendered\"\n [attr.title]=\"model.inputTitle\"\n [attr.accept]=\"model.acceptedTypes\"\n />\n <input\n *ngIf=\"model.isReadOnly\"\n type=\"file\"\n disabled\n [class]=\"model.getReadOnlyFileCss()\"\n [attr.multiple]=\"model.multipleRendered\"\n [attr.placeholder]=\"model.title\"\n style=\"color: transparent\"\n />\n <div\n [class]=\"model.getFileDecoratorCss()\"\n (drop)=\"model.onDrop($event)\"\n (dragover)=\"model.onDragOver($event)\"\n (dragleave)=\"model.onDragLeave($event)\"\n >\n <span [class]=\"model.cssClasses.dragAreaPlaceholder\">{{ model.dragAreaPlaceholder }}</span>\n <div [class]=\"model.cssClasses.wrapper\">\n <label\n role=\"button\"\n [class]=\"model.getChooseFileCss()\"\n [attr.for]=\"model.inputId\"\n [attr.aria-label]=\"model.chooseButtonCaption\"\n >\n <span>{{ model.chooseButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.chooseFileIconId\" [title]=\"model.chooseButtonCaption\" [iconName]=\"model.cssClasses.chooseFileIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </label>\n <span\n [class]=\"model.cssClasses.noFileChosen\"\n *ngIf=\"model.isEmpty()\"\n >{{ model.noFileChosenCaption }}</span\n >\n </div>\n </div>\n <button\n type=\"button\"\n *ngIf=\"model.showRemoveButton\"\n [class]=\"model.cssClasses.removeButton\"\n (click)=\"model.doClean($event)\"\n >\n <span>{{ model.cleanButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.removeButtonIconId\" [iconName]=\"model.cssClasses.removeButtonIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n <div [class]=\"model.cssClasses.fileList || undefined\" *ngIf=\"!model.isEmpty()\">\n <span\n *ngFor=\"let val of model.previewValue; index as index; trackBy: trackFilesFn\"\n [visible]=\"val && model.isPreviewVisible(index)\"\n [class]=\"model.cssClasses.preview\"\n >\n <div *ngIf=\"val.name && model.cssClasses.fileSign\" [class]=\"model.cssClasses.fileSign\">\n <a\n (click)=\"model.doDownloadFile($event, val)\"\n [attr.href]=\"val.content | safeUrl\"\n [attr.title]=\"val.name\"\n [attr.download]=\"val.name\"\n [attr.width]=\"model.imageWidth\"\n >{{ val.name }}</a\n >\n </div>\n <div [class]=\"model.cssClasses.imageWrapper\">\n <img\n *ngIf=\"model.canPreviewImage(val)\"\n [attr.src]=\"val.content | safeUrl\"\n [attr.height]=\"model.imageHeight\"\n [attr.width]=\"model.imageWidth\"\n alt=\"File preview\"\n />\n <svg *ngIf=\"model.defaultImage(val)\" \n [iconName]=\"model.cssClasses.defaultImageIconId\" [partCss]=\"model.cssClasses.defaultImage\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n <div *ngIf=\"val.name && !model.isReadOnly\" [class]=\"model.cssClasses.removeFileButton\" (click)=\"model.doRemoveFile(val)\">\n <span\n [class]=\"model.cssClasses.removeFile\"\n >{{ model.removeFileCaption }}</span\n >\n <svg *ngIf=\"model.cssClasses.removeFileSvgIconId\" [title]=\"model.removeFileCaption\" [partCss]=\"model.cssClasses.removeFileSvg\" [iconName]=\"model.cssClasses.removeFileSvgIconId\" [size]=\"'auto'\" sv-ng-svg-icon ></svg>\n </div>\n </div>\n <div *ngIf=\"val.name && model.cssClasses.fileSignBottom\" [class]=\"model.cssClasses.fileSignBottom\">\n <a\n (click)=\"model.doDownloadFile($event, val)\"\n [attr.href]=\"val.content | safeUrl\"\n [attr.title]=\"val.name\"\n [attr.download]=\"val.name\"\n [attr.width]=\"model.imageWidth\"\n >{{ val.name }}</a\n >\n </div>\n </span>\n </div>\n <button\n type=\"button\"\n *ngIf=\"model.showRemoveButtonBottom\"\n [class]=\"model.showRemoveButtonBottom\"\n (click)=\"model.doClean($event)\"\n >\n <span>{{ model.cleanButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.removeButtonIconId\" [iconName]=\"model.cssClasses.removeButtonIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n <sv-action-bar *ngIf=\"model.mobileFileNavigatorVisible\" [model]=\"model.mobileFileNavigator\"></sv-action-bar>\n</div>", components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }], pipes: { "safeUrl": SafeUrlPipe } });
|
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FileQuestionComponent, decorators: [{
|
|
1620
|
+
type: Component,
|
|
1621
|
+
args: [{ selector: "sv-ng-file-question", template: "<div [class]=\"model.fileRootCss\" #contentElement>\n <input\n [class]=\"model.cssClasses.fileInput\"\n *ngIf=\"!model.isReadOnly\"\n type=\"file\"\n [attr.id]=\"model.inputId\"\n (change)=\"model.doChange($event)\"\n [attr.aria-required]=\"model.ariaRequired\"\n [attr.aria-label]=\"model.ariaLabel\"\n [attr.aria-invalid]=\"model.ariaInvalid\"\n [attr.aria-describedby]=\"model.ariaDescribedBy\"\n [attr.multiple]=\"model.multipleRendered\"\n [attr.title]=\"model.inputTitle\"\n [attr.accept]=\"model.acceptedTypes\"\n />\n <input\n *ngIf=\"model.isReadOnly\"\n type=\"file\"\n disabled\n [class]=\"model.getReadOnlyFileCss()\"\n [attr.multiple]=\"model.multipleRendered\"\n [attr.placeholder]=\"model.title\"\n style=\"color: transparent\"\n />\n <div\n [class]=\"model.getFileDecoratorCss()\"\n (drop)=\"model.onDrop($event)\"\n (dragover)=\"model.onDragOver($event)\"\n (dragleave)=\"model.onDragLeave($event)\"\n >\n <span [class]=\"model.cssClasses.dragAreaPlaceholder\">{{ model.dragAreaPlaceholder }}</span>\n <div [class]=\"model.cssClasses.wrapper\">\n <label\n role=\"button\"\n [class]=\"model.getChooseFileCss()\"\n [attr.for]=\"model.inputId\"\n [attr.aria-label]=\"model.chooseButtonCaption\"\n >\n <span>{{ model.chooseButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.chooseFileIconId\" [title]=\"model.chooseButtonCaption\" [iconName]=\"model.cssClasses.chooseFileIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </label>\n <span\n [class]=\"model.cssClasses.noFileChosen\"\n *ngIf=\"model.isEmpty()\"\n >{{ model.noFileChosenCaption }}</span\n >\n </div>\n </div>\n <button\n type=\"button\"\n *ngIf=\"model.showRemoveButton\"\n [class]=\"model.cssClasses.removeButton\"\n (click)=\"model.doClean($event)\"\n >\n <span>{{ model.cleanButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.removeButtonIconId\" [iconName]=\"model.cssClasses.removeButtonIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n <div [class]=\"model.cssClasses.fileList || undefined\" *ngIf=\"!model.isEmpty()\">\n <span\n *ngFor=\"let val of model.previewValue; index as index; trackBy: trackFilesFn\"\n [visible]=\"val && model.isPreviewVisible(index)\"\n [class]=\"model.cssClasses.preview\"\n >\n <div *ngIf=\"val.name && model.cssClasses.fileSign\" [class]=\"model.cssClasses.fileSign\">\n <a\n (click)=\"model.doDownloadFile($event, val)\"\n [attr.href]=\"val.content | safeUrl\"\n [attr.title]=\"val.name\"\n [attr.download]=\"val.name\"\n [attr.width]=\"model.imageWidth\"\n >{{ val.name }}</a\n >\n </div>\n <div [class]=\"model.cssClasses.imageWrapper\">\n <img\n *ngIf=\"model.canPreviewImage(val)\"\n [attr.src]=\"val.content | safeUrl\"\n [attr.height]=\"model.imageHeight\"\n [attr.width]=\"model.imageWidth\"\n alt=\"File preview\"\n />\n <svg *ngIf=\"model.defaultImage(val)\" \n [iconName]=\"model.cssClasses.defaultImageIconId\" [partCss]=\"model.cssClasses.defaultImage\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n <div *ngIf=\"val.name && !model.isReadOnly\" [class]=\"model.cssClasses.removeFileButton\" (click)=\"model.doRemoveFile(val)\">\n <span\n [class]=\"model.cssClasses.removeFile\"\n >{{ model.removeFileCaption }}</span\n >\n <svg *ngIf=\"model.cssClasses.removeFileSvgIconId\" [title]=\"model.removeFileCaption\" [partCss]=\"model.cssClasses.removeFileSvg\" [iconName]=\"model.cssClasses.removeFileSvgIconId\" [size]=\"'auto'\" sv-ng-svg-icon ></svg>\n </div>\n </div>\n <div *ngIf=\"val.name && model.cssClasses.fileSignBottom\" [class]=\"model.cssClasses.fileSignBottom\">\n <a\n (click)=\"model.doDownloadFile($event, val)\"\n [attr.href]=\"val.content | safeUrl\"\n [attr.title]=\"val.name\"\n [attr.download]=\"val.name\"\n [attr.width]=\"model.imageWidth\"\n >{{ val.name }}</a\n >\n </div>\n </span>\n </div>\n <button\n type=\"button\"\n *ngIf=\"model.showRemoveButtonBottom\"\n [class]=\"model.showRemoveButtonBottom\"\n (click)=\"model.doClean($event)\"\n >\n <span>{{ model.cleanButtonCaption }}</span>\n <svg *ngIf=\"model.cssClasses.removeButtonIconId\" [iconName]=\"model.cssClasses.removeButtonIconId\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n <sv-action-bar *ngIf=\"model.mobileFileNavigatorVisible\" [model]=\"model.mobileFileNavigator\"></sv-action-bar>\n</div>", styles: [] }]
|
|
1622
|
+
}] });
|
|
1623
|
+
AngularComponentFactory.Instance.registerComponent("file-question", FileQuestionComponent);
|
|
1624
|
+
|
|
1625
|
+
class CommentQuestionComponent extends QuestionAngular {
|
|
1626
|
+
onChange(event) {
|
|
1627
|
+
this.model.value = event.target.value;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
CommentQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CommentQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1631
|
+
CommentQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CommentQuestionComponent, selector: "sv-ng-question-comment", usesInheritance: true, ngImport: i0, template: "<textarea\n*ngIf=\"!model.isReadOnlyRenderDiv()\"\n[readonly]=\"model.isInputReadOnly\"\n[attr.disabled]=\"model.renderedInputDisabled\"\n[id]=\"model.inputId\"\n[attr.maxlength]=\"model.getMaxLength()\"\n[attr.cols]=\"model.cols\"\n[attr.rows]=\"model.rows\"\n[attr.placeholder]=\"model.renderedPlaceholder\"\n[class]=\"model.className\"\n[value]=\"model.value || null\"\n(input)=\"model.onInput($event)\"\n(keydown)=\"model.onKeyDown($event)\"\n(change)=\"onChange($event)\"\n[attr.aria-required]=\"model.ariaRequired\"\n[attr.aria-label]=\"model.ariaLabel\"\n[attr.aria-invalid]=\"model.ariaInvalid\"\n[attr.aria-describedby]=\"model.ariaDescribedBy\"\n[style.resize]=\"model.resizeStyle\"\n#contentElement></textarea>\n<div *ngIf=\"model.isReadOnlyRenderDiv()\" #contentElement>{{ model.value }}</div>", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CommentQuestionComponent, decorators: [{
|
|
1633
|
+
type: Component,
|
|
1634
|
+
args: [{ selector: "sv-ng-question-comment", template: "<textarea\n*ngIf=\"!model.isReadOnlyRenderDiv()\"\n[readonly]=\"model.isInputReadOnly\"\n[attr.disabled]=\"model.renderedInputDisabled\"\n[id]=\"model.inputId\"\n[attr.maxlength]=\"model.getMaxLength()\"\n[attr.cols]=\"model.cols\"\n[attr.rows]=\"model.rows\"\n[attr.placeholder]=\"model.renderedPlaceholder\"\n[class]=\"model.className\"\n[value]=\"model.value || null\"\n(input)=\"model.onInput($event)\"\n(keydown)=\"model.onKeyDown($event)\"\n(change)=\"onChange($event)\"\n[attr.aria-required]=\"model.ariaRequired\"\n[attr.aria-label]=\"model.ariaLabel\"\n[attr.aria-invalid]=\"model.ariaInvalid\"\n[attr.aria-describedby]=\"model.ariaDescribedBy\"\n[style.resize]=\"model.resizeStyle\"\n#contentElement></textarea>\n<div *ngIf=\"model.isReadOnlyRenderDiv()\" #contentElement>{{ model.value }}</div>" }]
|
|
1635
|
+
}] });
|
|
1636
|
+
AngularComponentFactory.Instance.registerComponent("comment-question", CommentQuestionComponent);
|
|
1637
|
+
|
|
1638
|
+
class SignaturePadQuestionComponent extends QuestionAngular {
|
|
1639
|
+
}
|
|
1640
|
+
SignaturePadQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SignaturePadQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1641
|
+
SignaturePadQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: SignaturePadQuestionComponent, selector: "sv-ng-signature-component", usesInheritance: true, ngImport: i0, template: "<div\n[class]=\"model.cssClasses.root\"\n[style.height]=\"model.signatureHeight + 'px'\" [style.width]=\"model.signatureWidth + 'px'\" #contentElement>\n<div [class]=\"model.cssClasses.placeholder\" [visible]=\"model.needShowPlaceholder()\">\n {{ model.placeHolderText }}\n</div>\n<div>\n <canvas tabindex=\"0\"></canvas>\n</div>\n<div [class]=\"model.cssClasses.controls\" [visible]=\"model.canShowClearButton\">\n <button\n type=\"button\"\n [class]=\"model.cssClasses.clearButton\"\n [title]=\"model.clearButtonCaption\"\n (click)=\"model.clearValue()\"\n >\n <span *ngIf=\"!model.cssClasses.clearButtonIconId\">\u2716</span>\n <svg\n *ngIf=\"model.cssClasses.clearButtonIconId\"\n [iconName]=\"model.cssClasses.clearButtonIconId\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n</div>\n</div>", components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }], directives: [{ type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SignaturePadQuestionComponent, decorators: [{
|
|
1643
|
+
type: Component,
|
|
1644
|
+
args: [{ selector: "sv-ng-signature-component", template: "<div\n[class]=\"model.cssClasses.root\"\n[style.height]=\"model.signatureHeight + 'px'\" [style.width]=\"model.signatureWidth + 'px'\" #contentElement>\n<div [class]=\"model.cssClasses.placeholder\" [visible]=\"model.needShowPlaceholder()\">\n {{ model.placeHolderText }}\n</div>\n<div>\n <canvas tabindex=\"0\"></canvas>\n</div>\n<div [class]=\"model.cssClasses.controls\" [visible]=\"model.canShowClearButton\">\n <button\n type=\"button\"\n [class]=\"model.cssClasses.clearButton\"\n [title]=\"model.clearButtonCaption\"\n (click)=\"model.clearValue()\"\n >\n <span *ngIf=\"!model.cssClasses.clearButtonIconId\">\u2716</span>\n <svg\n *ngIf=\"model.cssClasses.clearButtonIconId\"\n [iconName]=\"model.cssClasses.clearButtonIconId\"\n [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </button>\n</div>\n</div>" }]
|
|
1645
|
+
}] });
|
|
1646
|
+
AngularComponentFactory.Instance.registerComponent("signaturepad-question", SignaturePadQuestionComponent);
|
|
1647
|
+
|
|
1648
|
+
class MultipleTextItemComponent extends BaseAngular {
|
|
1649
|
+
getModel() {
|
|
1650
|
+
return this.model.editor;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
MultipleTextItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MultipleTextItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1654
|
+
MultipleTextItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MultipleTextItemComponent, selector: "'[sv-ng-multipletext-item]'", inputs: { question: "question", model: "model" }, usesInheritance: true, ngImport: i0, template: "<label [class]=\"question.getItemLabelCss(model)\">\n <span [class]=\"question.getItemTitleCss()\">\n <span *ngIf=\" model.editor.isRequireTextBeforeTitle || model.editor.isRequireTextOnStart\"\n [class]=\"question.cssClasses.requiredText\">{{ model.editor.requiredText }}</span>\n <sv-ng-string [model]=\"model.locTitle\"></sv-ng-string>\n <span\n *ngIf=\"model.editor.isRequireTextAfterTitle\"\n [class]=\"question.cssClasses.requiredText\"\n >{{ model.editor.requiredText }}</span\n >\n </span>\n <div [class]=\"question.getItemCss()\">\n <div *ngIf=\"model.editor.showErrorOnTop && model.editor.hasVisibleErrors\" [element]=\"model.editor\" sv-ng-errors></div>\n <sv-ng-text-question [model]=\"model.editor\"></sv-ng-text-question>\n <div *ngIf=\"model.editor.showErrorOnBottom && model.editor.hasVisibleErrors\" [element]=\"model.editor\" sv-ng-errors></div>\n </div>\n <div *ngIf=\"model.editor.isErrorsModeTooltip && model.editor.hasVisibleErrors\" [element]=\"model.editor\" [location]=\"'tooltip'\" sv-ng-errors></div>\n</label>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: ErrorsComponent, selector: "'[sv-ng-errors]'", inputs: ["element", "location"] }, { type: TextQuestionComponent, selector: "sv-ng-text-question" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MultipleTextItemComponent, decorators: [{
|
|
1656
|
+
type: Component,
|
|
1657
|
+
args: [{ selector: "'[sv-ng-multipletext-item]'", template: "<label [class]=\"question.getItemLabelCss(model)\">\n <span [class]=\"question.getItemTitleCss()\">\n <span *ngIf=\" model.editor.isRequireTextBeforeTitle || model.editor.isRequireTextOnStart\"\n [class]=\"question.cssClasses.requiredText\">{{ model.editor.requiredText }}</span>\n <sv-ng-string [model]=\"model.locTitle\"></sv-ng-string>\n <span\n *ngIf=\"model.editor.isRequireTextAfterTitle\"\n [class]=\"question.cssClasses.requiredText\"\n >{{ model.editor.requiredText }}</span\n >\n </span>\n <div [class]=\"question.getItemCss()\">\n <div *ngIf=\"model.editor.showErrorOnTop && model.editor.hasVisibleErrors\" [element]=\"model.editor\" sv-ng-errors></div>\n <sv-ng-text-question [model]=\"model.editor\"></sv-ng-text-question>\n <div *ngIf=\"model.editor.showErrorOnBottom && model.editor.hasVisibleErrors\" [element]=\"model.editor\" sv-ng-errors></div>\n </div>\n <div *ngIf=\"model.editor.isErrorsModeTooltip && model.editor.hasVisibleErrors\" [element]=\"model.editor\" [location]=\"'tooltip'\" sv-ng-errors></div>\n</label>" }]
|
|
1658
|
+
}], propDecorators: { question: [{
|
|
1659
|
+
type: Input
|
|
1660
|
+
}], model: [{
|
|
1661
|
+
type: Input
|
|
1662
|
+
}] } });
|
|
1663
|
+
|
|
1664
|
+
class MultipleTextComponent extends QuestionAngular {
|
|
1665
|
+
constructor() {
|
|
1666
|
+
super(...arguments);
|
|
1667
|
+
this.trackRowBy = (index) => {
|
|
1668
|
+
return this.model.inputId + "rowkey" + index;
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
trackItemBy(_, item) {
|
|
1672
|
+
return "item" + item.editor.id;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
MultipleTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MultipleTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1676
|
+
MultipleTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MultipleTextComponent, selector: "sv-ng-multipletext-question", usesInheritance: true, ngImport: i0, template: "<table [class]=\"model.cssClasses.root\" #contentElement>\n <tbody>\n <tr\n *ngFor=\"let row of model.getRows(); index as rowIndex; trackBy: trackRowBy\"\n [class]=\"model.cssClasses.row\"\n >\n <ng-container *ngFor=\"let item of row; trackBy: trackItemBy\" >\n <td [class]=\"model.cssClasses.cell\" [question]=\"model\" [model]=\"item\" sv-ng-multipletext-item></td>\n </ng-container>\n </tr>\n </tbody>\n</table>\n", components: [{ type: MultipleTextItemComponent, selector: "'[sv-ng-multipletext-item]'", inputs: ["question", "model"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MultipleTextComponent, decorators: [{
|
|
1678
|
+
type: Component,
|
|
1679
|
+
args: [{ selector: "sv-ng-multipletext-question", template: "<table [class]=\"model.cssClasses.root\" #contentElement>\n <tbody>\n <tr\n *ngFor=\"let row of model.getRows(); index as rowIndex; trackBy: trackRowBy\"\n [class]=\"model.cssClasses.row\"\n >\n <ng-container *ngFor=\"let item of row; trackBy: trackItemBy\" >\n <td [class]=\"model.cssClasses.cell\" [question]=\"model\" [model]=\"item\" sv-ng-multipletext-item></td>\n </ng-container>\n </tr>\n </tbody>\n</table>\n" }]
|
|
1680
|
+
}] });
|
|
1681
|
+
AngularComponentFactory.Instance.registerComponent("multipletext-question", MultipleTextComponent);
|
|
1682
|
+
|
|
1683
|
+
class RankingItemComponent extends BaseAngular {
|
|
1684
|
+
getModel() {
|
|
1685
|
+
return this.model;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
RankingItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RankingItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1689
|
+
RankingItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RankingItemComponent, selector: "sv-ng-ranking-item", inputs: { question: "question", model: "model", index: "index" }, usesInheritance: true, ngImport: i0, template: "\n\n\n<div tabindex=\"0\" [attr.data-sv-drop-target-ranking-item]=\"index\" \n [class]=\"question.getItemClass(model)\"\n (keydown)=\"question.handleKeydown($event, model)\"\n (pointerdown)=\"question.handlePointerDown($event, model, $any($event.currentTarget))\">\n <div tabindex=\"-1\" style=\"outline: none;\">\n <div [class]=\"question.cssClasses.itemGhostNode\"></div>\n <div [class]=\"question.cssClasses.itemContent\">\n <div [class]=\"question.cssClasses.itemIconContainer\">\n <svg\n width=\"10\"\n height=\"16\"\n viewBox=\"0 0 10 16\"\n [class]=\"question.getIconHoverCss()\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z\" />\n </svg>\n <svg\n width=\"10\"\n height=\"24\"\n viewBox=\"0 0 10 24\"\n [class]=\"question.getIconFocusCss()\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\" />\n <path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\" />\n </svg>\n </div>\n\n <div [class]=\"question.cssClasses.itemIndex\">{{ question.getNumberByIndex(index) }}</div>\n <div [class]=\"question.cssClasses.controlLabel\">\n <sv-ng-string [model]=\"model.locText\"></sv-ng-string>\n </div>\n </div>\n </div>\n</div>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }] });
|
|
1690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RankingItemComponent, decorators: [{
|
|
1691
|
+
type: Component,
|
|
1692
|
+
args: [{ selector: "sv-ng-ranking-item", template: "\n\n\n<div tabindex=\"0\" [attr.data-sv-drop-target-ranking-item]=\"index\" \n [class]=\"question.getItemClass(model)\"\n (keydown)=\"question.handleKeydown($event, model)\"\n (pointerdown)=\"question.handlePointerDown($event, model, $any($event.currentTarget))\">\n <div tabindex=\"-1\" style=\"outline: none;\">\n <div [class]=\"question.cssClasses.itemGhostNode\"></div>\n <div [class]=\"question.cssClasses.itemContent\">\n <div [class]=\"question.cssClasses.itemIconContainer\">\n <svg\n width=\"10\"\n height=\"16\"\n viewBox=\"0 0 10 16\"\n [class]=\"question.getIconHoverCss()\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z\" />\n </svg>\n <svg\n width=\"10\"\n height=\"24\"\n viewBox=\"0 0 10 24\"\n [class]=\"question.getIconFocusCss()\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\" />\n <path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\" />\n </svg>\n </div>\n\n <div [class]=\"question.cssClasses.itemIndex\">{{ question.getNumberByIndex(index) }}</div>\n <div [class]=\"question.cssClasses.controlLabel\">\n <sv-ng-string [model]=\"model.locText\"></sv-ng-string>\n </div>\n </div>\n </div>\n</div>" }]
|
|
1693
|
+
}], propDecorators: { question: [{
|
|
1694
|
+
type: Input
|
|
1695
|
+
}], model: [{
|
|
1696
|
+
type: Input
|
|
1697
|
+
}], index: [{
|
|
1698
|
+
type: Input
|
|
1699
|
+
}] } });
|
|
1700
|
+
|
|
1701
|
+
class RankingQuestionComponent extends QuestionAngular {
|
|
1702
|
+
constructor() {
|
|
1703
|
+
super(...arguments);
|
|
1704
|
+
this.trackItemBy = (index, item) => {
|
|
1705
|
+
return item.value + "-" + index + "-item";
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
RankingQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RankingQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1710
|
+
RankingQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: RankingQuestionComponent, selector: "sv-ng-ranking-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.rootClass\" #contentElement>\n <sv-ng-ranking-item\n *ngFor=\"let item of model.rankingChoices; index as index; trackBy: trackItemBy\"\n [index]=\"index\"\n [question]=\"model\"\n [model]=\"item\"\n ></sv-ng-ranking-item>\n</div>", components: [{ type: RankingItemComponent, selector: "sv-ng-ranking-item", inputs: ["question", "model", "index"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: RankingQuestionComponent, decorators: [{
|
|
1712
|
+
type: Component,
|
|
1713
|
+
args: [{ selector: "sv-ng-ranking-question", template: "<div [class]=\"model.rootClass\" #contentElement>\n <sv-ng-ranking-item\n *ngFor=\"let item of model.rankingChoices; index as index; trackBy: trackItemBy\"\n [index]=\"index\"\n [question]=\"model\"\n [model]=\"item\"\n ></sv-ng-ranking-item>\n</div>" }]
|
|
1714
|
+
}] });
|
|
1715
|
+
AngularComponentFactory.Instance.registerComponent("ranking-question", RankingQuestionComponent);
|
|
1716
|
+
|
|
1717
|
+
class StringEditorComponent {
|
|
1718
|
+
constructor() {
|
|
1719
|
+
this.onInput = (event) => {
|
|
1720
|
+
this.model.text = event.target.innerText;
|
|
1721
|
+
};
|
|
1722
|
+
this.onClick = (event) => {
|
|
1723
|
+
event.preventDefault();
|
|
1724
|
+
event.stopPropagation();
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
StringEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StringEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1729
|
+
StringEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: StringEditorComponent, selector: "sv-ng-string-editor", inputs: { model: "model" }, ngImport: i0, template: "<span style=\"position: static\">\n <span\n class=\"sv-string-editor\"\n contenteditable=\"true\"\n style=\"position: static\"\n *ngIf=\"model.hasHtml\"\n [innerHtml]=\"model.renderedHtml\"\n (blur)=\"onInput($event)\"\n (click)=\"onClick($event)\"\n ></span>\n <span\n class=\"sv-string-editor\"\n contenteditable=\"true\"\n style=\"position: static\"\n *ngIf=\"!model.hasHtml\"\n (blur)=\"onInput($event)\"\n (click)=\"onClick($event)\"\n >{{ model.renderedHtml }}</span\n >\n</span>", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StringEditorComponent, decorators: [{
|
|
1731
|
+
type: Component,
|
|
1732
|
+
args: [{ selector: "sv-ng-string-editor", template: "<span style=\"position: static\">\n <span\n class=\"sv-string-editor\"\n contenteditable=\"true\"\n style=\"position: static\"\n *ngIf=\"model.hasHtml\"\n [innerHtml]=\"model.renderedHtml\"\n (blur)=\"onInput($event)\"\n (click)=\"onClick($event)\"\n ></span>\n <span\n class=\"sv-string-editor\"\n contenteditable=\"true\"\n style=\"position: static\"\n *ngIf=\"!model.hasHtml\"\n (blur)=\"onInput($event)\"\n (click)=\"onClick($event)\"\n >{{ model.renderedHtml }}</span\n >\n</span>" }]
|
|
1733
|
+
}], propDecorators: { model: [{
|
|
1734
|
+
type: Input
|
|
1735
|
+
}] } });
|
|
1736
|
+
AngularComponentFactory.Instance.registerComponent(LocalizableString.editableRenderer, StringEditorComponent);
|
|
1737
|
+
|
|
1738
|
+
class PaneldynamicAction {
|
|
1739
|
+
get question() {
|
|
1740
|
+
return (this.model && this.model.data.question) || this.data.question;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
PaneldynamicAction.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PaneldynamicAction, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1744
|
+
PaneldynamicAction.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PaneldynamicAction, selector: "ng-component", inputs: { data: "data", model: "model" }, ngImport: i0, template: "", isInline: true });
|
|
1745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PaneldynamicAction, decorators: [{
|
|
1746
|
+
type: Component,
|
|
1747
|
+
args: [{
|
|
1748
|
+
selector: "",
|
|
1749
|
+
template: ""
|
|
1750
|
+
}]
|
|
1751
|
+
}], propDecorators: { data: [{
|
|
1752
|
+
type: Input
|
|
1753
|
+
}], model: [{
|
|
1754
|
+
type: Input
|
|
1755
|
+
}] } });
|
|
1756
|
+
class PanelDynamicAddBtn extends PaneldynamicAction {
|
|
1757
|
+
addPanelClick() {
|
|
1758
|
+
this.question.addPanelUI();
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
PanelDynamicAddBtn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicAddBtn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1762
|
+
PanelDynamicAddBtn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelDynamicAddBtn, selector: "sv-ng-paneldynamic-add-btn", usesInheritance: true, ngImport: i0, template: "<button type=\"button\" *ngIf=\"question.canAddPanel\" [class]=\"question.getAddButtonCss()\" (click)=\"addPanelClick()\">\n<span [class]=\"question.cssClasses.buttonAddText\">{{question.panelAddText}}</span>\n</button>", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicAddBtn, decorators: [{
|
|
1764
|
+
type: Component,
|
|
1765
|
+
args: [{ selector: "sv-ng-paneldynamic-add-btn", template: "<button type=\"button\" *ngIf=\"question.canAddPanel\" [class]=\"question.getAddButtonCss()\" (click)=\"addPanelClick()\">\n<span [class]=\"question.cssClasses.buttonAddText\">{{question.panelAddText}}</span>\n</button>" }]
|
|
1766
|
+
}] });
|
|
1767
|
+
AngularComponentFactory.Instance.registerComponent("sv-paneldynamic-add-btn", PanelDynamicAddBtn);
|
|
1768
|
+
|
|
1769
|
+
class PanelDynamicNextBtn extends PaneldynamicAction {
|
|
1770
|
+
nextPanelClick() {
|
|
1771
|
+
this.question.goToNextPanel();
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
PanelDynamicNextBtn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicNextBtn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1775
|
+
PanelDynamicNextBtn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelDynamicNextBtn, selector: "sv-ng-paneldynamic-next-btn", usesInheritance: true, ngImport: i0, template: "<div [attr.title]=\"question.panelNextText\" (click)=\"nextPanelClick()\" [class]=\"question.getNextButtonCss()\">\n <svg [iconName]=\"question.cssClasses.progressBtnIcon\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n</div>", components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }] });
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicNextBtn, decorators: [{
|
|
1777
|
+
type: Component,
|
|
1778
|
+
args: [{ selector: "sv-ng-paneldynamic-next-btn", template: "<div [attr.title]=\"question.panelNextText\" (click)=\"nextPanelClick()\" [class]=\"question.getNextButtonCss()\">\n <svg [iconName]=\"question.cssClasses.progressBtnIcon\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n</div>" }]
|
|
1779
|
+
}] });
|
|
1780
|
+
AngularComponentFactory.Instance.registerComponent("sv-paneldynamic-next-btn", PanelDynamicNextBtn);
|
|
1781
|
+
|
|
1782
|
+
class PanelDynamicPrevBtn extends PaneldynamicAction {
|
|
1783
|
+
prevPanelClick() {
|
|
1784
|
+
this.question.goToPrevPanel();
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
PanelDynamicPrevBtn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicPrevBtn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1788
|
+
PanelDynamicPrevBtn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelDynamicPrevBtn, selector: "sv-ng-paneldynamic-prev-btn", usesInheritance: true, ngImport: i0, template: "<div [attr.title]=\"question.panelPrevText\" (click)=\"prevPanelClick()\" [class]=\"question.getPrevButtonCss()\">\n <svg [iconName]=\"question.cssClasses.progressBtnIcon\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n</div>\n", components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }] });
|
|
1789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicPrevBtn, decorators: [{
|
|
1790
|
+
type: Component,
|
|
1791
|
+
args: [{ selector: "sv-ng-paneldynamic-prev-btn", template: "<div [attr.title]=\"question.panelPrevText\" (click)=\"prevPanelClick()\" [class]=\"question.getPrevButtonCss()\">\n <svg [iconName]=\"question.cssClasses.progressBtnIcon\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n</div>\n" }]
|
|
1792
|
+
}] });
|
|
1793
|
+
AngularComponentFactory.Instance.registerComponent("sv-paneldynamic-prev-btn", PanelDynamicPrevBtn);
|
|
1794
|
+
|
|
1795
|
+
class PanelDynamicProgressText extends PaneldynamicAction {
|
|
1796
|
+
}
|
|
1797
|
+
PanelDynamicProgressText.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicProgressText, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1798
|
+
PanelDynamicProgressText.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelDynamicProgressText, selector: "sv-ng-paneldynamic-progress-text", usesInheritance: true, ngImport: i0, template: "<div [class]=\"question.cssClasses.progressText\">{{ question.progressText }}</div>\n" });
|
|
1799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicProgressText, decorators: [{
|
|
1800
|
+
type: Component,
|
|
1801
|
+
args: [{ selector: "sv-ng-paneldynamic-progress-text", template: "<div [class]=\"question.cssClasses.progressText\">{{ question.progressText }}</div>\n" }]
|
|
1802
|
+
}] });
|
|
1803
|
+
AngularComponentFactory.Instance.registerComponent("sv-paneldynamic-progress-text", PanelDynamicProgressText);
|
|
1804
|
+
|
|
1805
|
+
class PanelDynamicQuestionComponent extends QuestionAngular {
|
|
1806
|
+
get renderedPanels() {
|
|
1807
|
+
if (this.model.isRenderModeList)
|
|
1808
|
+
return this.model.panels;
|
|
1809
|
+
const panels = [];
|
|
1810
|
+
if (this.model.currentPanel) {
|
|
1811
|
+
panels.push(this.model.currentPanel);
|
|
1812
|
+
}
|
|
1813
|
+
return panels;
|
|
1814
|
+
}
|
|
1815
|
+
onModelChanged() {
|
|
1816
|
+
super.onModelChanged();
|
|
1817
|
+
this.model.panelCountChangedCallback = () => {
|
|
1818
|
+
this.detectChanges();
|
|
1819
|
+
};
|
|
1820
|
+
this.model.currentIndexChangedCallback = () => {
|
|
1821
|
+
this.detectChanges();
|
|
1822
|
+
};
|
|
1823
|
+
this.model.renderModeChangedCallback = () => {
|
|
1824
|
+
this.detectChanges();
|
|
1825
|
+
};
|
|
1826
|
+
}
|
|
1827
|
+
get progressCssClass() {
|
|
1828
|
+
return this.model.isProgressTopShowing
|
|
1829
|
+
? this.model.cssClasses.progressTop
|
|
1830
|
+
: this.model.cssClasses.progressBottom;
|
|
1831
|
+
}
|
|
1832
|
+
ngOnDestroy() {
|
|
1833
|
+
this.model.panelCountChangedCallback = () => { };
|
|
1834
|
+
this.model.currentIndexChangedCallback = () => { };
|
|
1835
|
+
this.model.renderModeChangedCallback = () => { };
|
|
1836
|
+
super.ngOnDestroy();
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
PanelDynamicQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1840
|
+
PanelDynamicQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: PanelDynamicQuestionComponent, selector: "sv-ng-paneldynamic-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.cssClasses.root\" #contentElement>\n <div *ngIf=\"model.getShowNoEntriesPlaceholder()\" [class]=\"model.cssClasses.noEntriesPlaceholder\">\n <span [model]=\"model.locNoEntriesText\" sv-ng-string></span>\n <sv-ng-paneldynamic-add-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n </div>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"!model.showLegacyNavigation && model.isProgressTopShowing && model.isRangeShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <ng-container [ngTemplateOutlet]=\"progress\" *ngIf=\"model.showLegacyNavigation && model.isProgressTopShowing\"></ng-container>\n <!-- add track by [key]=\"panel.id\" -->\n <ng-container *ngFor=\"let panel of renderedPanels; index as index\"> \n <div [class]=\"model.getPanelWrapperCss()\">\n <sv-ng-panel [model]=\"panel\"></sv-ng-panel>\n <ng-container *ngTemplateOutlet=\"removeBtn; context: { panel }\"></ng-container>\n </div>\n <!-- add track by [key]=\"'separator' + panel.id\" -->\n <hr [class]=\"model.cssClasses.separator\" *ngIf=\"model.isRenderModeList && index < model.panelCount - 1\"/>\n </ng-container>\n <ng-container [ngTemplateOutlet]=\"progress\" *ngIf=\"model.showLegacyNavigation && model.isProgressBottomShowing\"></ng-container>\n <sv-ng-paneldynamic-add-btn *ngIf=\"model.showLegacyNavigation && model.isRenderModeList\" [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n <ng-container [ngTemplateOutlet]=\"progressV2\" *ngIf=\"model.panelCount !== 0 && !model.showLegacyNavigation\"></ng-container>\n</div>\n\n<ng-template #progressV2>\n <div [class]=\"model.cssClasses.footer\" *ngIf=\"!!model.cssClasses.footer\">\n <hr [class]=\"model.cssClasses.separator\"/>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"model.isRangeShowing && model.isProgressBottomShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <div [class]=\"model.cssClasses.footerButtonsContainer\">\n <sv-ng-action-bar [model]=\"model.footerToolbar\"></sv-ng-action-bar>\n </div>\n </div>\n</ng-template>\n<ng-template #progress>\n <div [class]=\"this.progressCssClass\">\n <div style=\"clear: both\" [class]=\"this.progressCssClass\">\n <div [class]=\"model.cssClasses.progressContainer\">\n <sv-ng-paneldynamic-prev-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-prev-btn>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"model.isRangeShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <sv-ng-paneldynamic-next-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-next-btn>\n </div>\n <sv-ng-paneldynamic-add-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n <sv-ng-paneldynamic-progress-text [data]=\"{ question: model }\"></sv-ng-paneldynamic-progress-text>\n </div>\n </div>\n</ng-template>\n\n<ng-template #removeBtn let-panel=\"panel\">\n <button type=\"button\"\n [visible]=\"model.canRemovePanel && panel.state != 'collapsed'\" (click)=\"model.removePanelUI(panel)\" [class]=\"model.getPanelRemoveButtonCss()\">\n <span [class]=\"model.cssClasses.buttonRemoveText\">{{model.panelRemoveText}}</span>\n <span [class]=\"model.cssClasses.iconRemove\"></span>\n </button>\n</ng-template>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: PanelDynamicAddBtn, selector: "sv-ng-paneldynamic-add-btn" }, { type: PanelComponent, selector: "sv-ng-panel, '[sv-ng-panel]'", inputs: ["model"] }, { type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: PanelDynamicPrevBtn, selector: "sv-ng-paneldynamic-prev-btn" }, { type: PanelDynamicNextBtn, selector: "sv-ng-paneldynamic-next-btn" }, { type: PanelDynamicProgressText, selector: "sv-ng-paneldynamic-progress-text" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }] });
|
|
1841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: PanelDynamicQuestionComponent, decorators: [{
|
|
1842
|
+
type: Component,
|
|
1843
|
+
args: [{ selector: "sv-ng-paneldynamic-question", template: "<div [class]=\"model.cssClasses.root\" #contentElement>\n <div *ngIf=\"model.getShowNoEntriesPlaceholder()\" [class]=\"model.cssClasses.noEntriesPlaceholder\">\n <span [model]=\"model.locNoEntriesText\" sv-ng-string></span>\n <sv-ng-paneldynamic-add-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n </div>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"!model.showLegacyNavigation && model.isProgressTopShowing && model.isRangeShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <ng-container [ngTemplateOutlet]=\"progress\" *ngIf=\"model.showLegacyNavigation && model.isProgressTopShowing\"></ng-container>\n <!-- add track by [key]=\"panel.id\" -->\n <ng-container *ngFor=\"let panel of renderedPanels; index as index\"> \n <div [class]=\"model.getPanelWrapperCss()\">\n <sv-ng-panel [model]=\"panel\"></sv-ng-panel>\n <ng-container *ngTemplateOutlet=\"removeBtn; context: { panel }\"></ng-container>\n </div>\n <!-- add track by [key]=\"'separator' + panel.id\" -->\n <hr [class]=\"model.cssClasses.separator\" *ngIf=\"model.isRenderModeList && index < model.panelCount - 1\"/>\n </ng-container>\n <ng-container [ngTemplateOutlet]=\"progress\" *ngIf=\"model.showLegacyNavigation && model.isProgressBottomShowing\"></ng-container>\n <sv-ng-paneldynamic-add-btn *ngIf=\"model.showLegacyNavigation && model.isRenderModeList\" [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n <ng-container [ngTemplateOutlet]=\"progressV2\" *ngIf=\"model.panelCount !== 0 && !model.showLegacyNavigation\"></ng-container>\n</div>\n\n<ng-template #progressV2>\n <div [class]=\"model.cssClasses.footer\" *ngIf=\"!!model.cssClasses.footer\">\n <hr [class]=\"model.cssClasses.separator\"/>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"model.isRangeShowing && model.isProgressBottomShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <div [class]=\"model.cssClasses.footerButtonsContainer\">\n <sv-ng-action-bar [model]=\"model.footerToolbar\"></sv-ng-action-bar>\n </div>\n </div>\n</ng-template>\n<ng-template #progress>\n <div [class]=\"this.progressCssClass\">\n <div style=\"clear: both\" [class]=\"this.progressCssClass\">\n <div [class]=\"model.cssClasses.progressContainer\">\n <sv-ng-paneldynamic-prev-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-prev-btn>\n <div [class]=\"model.cssClasses.progress\" *ngIf=\"model.isRangeShowing\">\n <div\n [class]=\"model.cssClasses.progressBar\"\n [style]=\"{ width: model.progress }\"\n role=\"progressbar\"\n ></div>\n </div>\n <sv-ng-paneldynamic-next-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-next-btn>\n </div>\n <sv-ng-paneldynamic-add-btn [data]=\"{ question: model }\"></sv-ng-paneldynamic-add-btn>\n <sv-ng-paneldynamic-progress-text [data]=\"{ question: model }\"></sv-ng-paneldynamic-progress-text>\n </div>\n </div>\n</ng-template>\n\n<ng-template #removeBtn let-panel=\"panel\">\n <button type=\"button\"\n [visible]=\"model.canRemovePanel && panel.state != 'collapsed'\" (click)=\"model.removePanelUI(panel)\" [class]=\"model.getPanelRemoveButtonCss()\">\n <span [class]=\"model.cssClasses.buttonRemoveText\">{{model.panelRemoveText}}</span>\n <span [class]=\"model.cssClasses.iconRemove\"></span>\n </button>\n</ng-template>" }]
|
|
1844
|
+
}] });
|
|
1845
|
+
AngularComponentFactory.Instance.registerComponent("paneldynamic-question", PanelDynamicQuestionComponent);
|
|
1846
|
+
|
|
1847
|
+
class CustomWidgetComponent {
|
|
1848
|
+
get hasDefaultRender() {
|
|
1849
|
+
return this.model.customWidget.isDefaultRender || this.hasAngularComponent;
|
|
1850
|
+
}
|
|
1851
|
+
get hasHtml() {
|
|
1852
|
+
return this.model.customWidget.htmlTemplate ? true : false;
|
|
1853
|
+
}
|
|
1854
|
+
get customHtml() {
|
|
1855
|
+
return this.model.customWidget.htmlTemplate;
|
|
1856
|
+
}
|
|
1857
|
+
get hasAngularComponent() {
|
|
1858
|
+
return AngularComponentFactory.Instance.isComponentRegistered(this.model.customWidget.name);
|
|
1859
|
+
}
|
|
1860
|
+
get componentName() {
|
|
1861
|
+
if (this.hasAngularComponent)
|
|
1862
|
+
return this.model.customWidget.name;
|
|
1863
|
+
return this.model.getTemplate() + "-question";
|
|
1864
|
+
}
|
|
1865
|
+
ngAfterViewInit() {
|
|
1866
|
+
this.model.customWidget.afterRender(this.model, this.container.nativeElement);
|
|
1867
|
+
}
|
|
1868
|
+
ngOnChanges(simpleChanges) {
|
|
1869
|
+
if (simpleChanges["model"].previousValue !== undefined && simpleChanges["model"].currentValue !== undefined) {
|
|
1870
|
+
this.model.customWidget.afterRender(this.model, this.container.nativeElement);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
ngOnDestroy() {
|
|
1874
|
+
this.model.customWidget.willUnmount(this.model, this.container.nativeElement);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
CustomWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CustomWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1878
|
+
CustomWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CustomWidgetComponent, selector: "sv-ng-custom-widget", inputs: { css: "css", model: "model" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["content"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #content>\n <div *ngIf=\"hasHtml\" [innerHTML]=\"customHtml | safeHtml\"></div>\n <ng-container *ngIf=\"hasDefaultRender\">\n <ng-template [component]=\"{ name: componentName, data: { model: model, css: css } }\"></ng-template> \n </ng-container>\n</div>", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }], pipes: { "safeHtml": SafeHtmlPipe } });
|
|
1879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CustomWidgetComponent, decorators: [{
|
|
1880
|
+
type: Component,
|
|
1881
|
+
args: [{ selector: "sv-ng-custom-widget", template: "<div #content>\n <div *ngIf=\"hasHtml\" [innerHTML]=\"customHtml | safeHtml\"></div>\n <ng-container *ngIf=\"hasDefaultRender\">\n <ng-template [component]=\"{ name: componentName, data: { model: model, css: css } }\"></ng-template> \n </ng-container>\n</div>" }]
|
|
1882
|
+
}], propDecorators: { css: [{
|
|
1883
|
+
type: Input
|
|
1884
|
+
}], model: [{
|
|
1885
|
+
type: Input
|
|
1886
|
+
}], container: [{
|
|
1887
|
+
type: ViewChild,
|
|
1888
|
+
args: ["content"]
|
|
1889
|
+
}] } });
|
|
1890
|
+
AngularComponentFactory.Instance.registerComponent("survey-customwidget", CustomWidgetComponent);
|
|
1891
|
+
|
|
1892
|
+
class MatrixCellComponent extends BaseAngular {
|
|
1893
|
+
constructor() {
|
|
1894
|
+
super(...arguments);
|
|
1895
|
+
this.isVisible = false;
|
|
1896
|
+
}
|
|
1897
|
+
getModel() {
|
|
1898
|
+
return this.cell.question;
|
|
1899
|
+
}
|
|
1900
|
+
getComponentName(element) {
|
|
1901
|
+
if (element.customWidget) {
|
|
1902
|
+
return "survey-customwidget";
|
|
1903
|
+
}
|
|
1904
|
+
return element.getType() + "-question";
|
|
1905
|
+
}
|
|
1906
|
+
getHeaders() {
|
|
1907
|
+
return this.cell.headers;
|
|
1908
|
+
}
|
|
1909
|
+
getCellStyle() {
|
|
1910
|
+
if (!!this.cell.width || !!this.cell.minWidth)
|
|
1911
|
+
return { width: this.cell.width, minWidth: this.cell.minWidth };
|
|
1912
|
+
return null;
|
|
1913
|
+
}
|
|
1914
|
+
ngAfterViewInit() {
|
|
1915
|
+
if (!this.cell.hasQuestion || !this.question || !this.question.survey)
|
|
1916
|
+
return;
|
|
1917
|
+
var options = {
|
|
1918
|
+
cell: this.cell.cell,
|
|
1919
|
+
cellQuestion: this.cell.question,
|
|
1920
|
+
htmlElement: this.cellContainer.nativeElement,
|
|
1921
|
+
row: this.cell.row,
|
|
1922
|
+
column: this.cell.cell.column,
|
|
1923
|
+
};
|
|
1924
|
+
this.question.survey.matrixAfterCellRender(this.question, options);
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
MatrixCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1928
|
+
MatrixCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", 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, 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-action-bar *ngIf=\"cell.isActionsCell\" [model]=\"cell.item.getData()\" [handleClick]=\"false\"></sv-action-bar>\n <sv-ng-panel *ngIf=\"cell.hasPanel\" [model]=\"cell.panel\"></sv-ng-panel>\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-template *ngIf=\"!cell.isChoice && cell.question.isDefaultRendering()\" [component]=\"{ name: getComponentName(cell.question), data: { model: cell.question } }\"></ng-template>\n <ng-template *ngIf=\"!cell.isChoice && !cell.question.isDefaultRendering()\" [component]=\"{ name: cell.question.getComponentName(), data: { model: cell.question } }\">\n </ng-template>\n <sv-ng-selebase-item\n *ngIf=\"cell.isChoice\"\n [showLabel]=\"false\"\n [inputType]=\"cell.isCheckbox ? 'checkbox': 'radio'\"\n [question]=\"cell.question\"\n [model]=\"cell.item\"\n ></sv-ng-selebase-item>\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 <sv-ng-string *ngIf=\"cell.hasTitle\" [model]=\"cell.locTitle\"></sv-ng-string>\n <span *ngIf=\"!!cell.requiredText\" [class]=\"question.cssClasses.cellRequiredText\">{{ cell.requiredText }}</span>\n</td>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }, { type: PanelComponent, selector: "sv-ng-panel, '[sv-ng-panel]'", inputs: ["model"] }, { 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: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: VisibleDirective, selector: "[visible]", inputs: ["visible"] }, { type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
1929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixCellComponent, decorators: [{
|
|
1930
|
+
type: Component,
|
|
1931
|
+
args: [{ selector: "sv-ng-matrix-cell", styles: [":host { display: none; }"], 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-action-bar *ngIf=\"cell.isActionsCell\" [model]=\"cell.item.getData()\" [handleClick]=\"false\"></sv-action-bar>\n <sv-ng-panel *ngIf=\"cell.hasPanel\" [model]=\"cell.panel\"></sv-ng-panel>\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-template *ngIf=\"!cell.isChoice && cell.question.isDefaultRendering()\" [component]=\"{ name: getComponentName(cell.question), data: { model: cell.question } }\"></ng-template>\n <ng-template *ngIf=\"!cell.isChoice && !cell.question.isDefaultRendering()\" [component]=\"{ name: cell.question.getComponentName(), data: { model: cell.question } }\">\n </ng-template>\n <sv-ng-selebase-item\n *ngIf=\"cell.isChoice\"\n [showLabel]=\"false\"\n [inputType]=\"cell.isCheckbox ? 'checkbox': 'radio'\"\n [question]=\"cell.question\"\n [model]=\"cell.item\"\n ></sv-ng-selebase-item>\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 <sv-ng-string *ngIf=\"cell.hasTitle\" [model]=\"cell.locTitle\"></sv-ng-string>\n <span *ngIf=\"!!cell.requiredText\" [class]=\"question.cssClasses.cellRequiredText\">{{ cell.requiredText }}</span>\n</td>\n</ng-template>" }]
|
|
1932
|
+
}], propDecorators: { question: [{
|
|
1933
|
+
type: Input
|
|
1934
|
+
}], cell: [{
|
|
1935
|
+
type: Input
|
|
1936
|
+
}], cellContainer: [{
|
|
1937
|
+
type: ViewChild,
|
|
1938
|
+
args: ["cellContainer"]
|
|
1939
|
+
}] } });
|
|
1940
|
+
|
|
1941
|
+
class MatrixRequiredHeader extends BaseAngular {
|
|
1942
|
+
getModel() {
|
|
1943
|
+
return this.column;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
MatrixRequiredHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixRequiredHeader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1947
|
+
MatrixRequiredHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixRequiredHeader, selector: "sv-ng-matrixheaderrequired", inputs: { column: "column", question: "question" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template><span *ngIf='column.isRenderedRequired' [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-template>", isInline: true, styles: [":host{display:none}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixRequiredHeader, decorators: [{
|
|
1949
|
+
type: Component,
|
|
1950
|
+
args: [{
|
|
1951
|
+
selector: "sv-ng-matrixheaderrequired",
|
|
1952
|
+
styles: [":host { display: none; }"],
|
|
1953
|
+
template: "<ng-template #template><span *ngIf='column.isRenderedRequired' [class]='question.cssClasses.cellRequiredText'>{{ column.requiredText }}</span></ng-template>"
|
|
1954
|
+
}]
|
|
1955
|
+
}], propDecorators: { column: [{
|
|
1956
|
+
type: Input
|
|
1957
|
+
}], question: [{
|
|
1958
|
+
type: Input
|
|
1959
|
+
}] } });
|
|
1960
|
+
|
|
1961
|
+
class MatrixTableComponent extends BaseAngular {
|
|
1962
|
+
getModel() {
|
|
1963
|
+
return this.table;
|
|
1964
|
+
}
|
|
1965
|
+
trackCellBy(_, cell) {
|
|
1966
|
+
return cell.id;
|
|
1967
|
+
}
|
|
1968
|
+
trackRowBy(index, row) {
|
|
1969
|
+
return row.id;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
MatrixTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1973
|
+
MatrixTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixTableComponent, selector: "sv-ng-matrix-table", inputs: { question: "question", table: "table" }, usesInheritance: true, ngImport: i0, template: "<table [class]=\"question.getTableCss()\">\n <thead *ngIf=\"table.showHeader\">\n <tr>\n <th\n [class]=\"cell.className\"\n *ngFor=\"let cell of table.headerRow.cells; trackBy: trackCellBy\"\n [style]=\"{ minWidth: cell.minWidth, width: cell.width }\"\n >\n <sv-ng-string *ngIf=\"cell.hasTitle\" [model]=\"cell.locTitle\"></sv-ng-string>\n <sv-ng-matrixheaderrequired *ngIf=\"!!cell.column\" [column]=\"cell.column\" [question]=\"question\"></sv-ng-matrixheaderrequired>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of table.rows; trackBy: trackRowBy\" [class]=\"row.className\">\n <sv-ng-matrix-cell\n [cell]=\"cell\"\n [question]=\"question\"\n *ngFor=\"let cell of row.cells; trackBy: trackCellBy\"\n ></sv-ng-matrix-cell>\n </tr>\n </tbody>\n <tfoot *ngIf=\"table.showFooter\">\n <tr>\n <sv-ng-matrix-cell [cell]=\"cell\" [question]=\"question\" *ngFor=\"let cell of table.footerRow.cells; trackBy: trackCellBy\">\n </sv-ng-matrix-cell>\n </tr>\n </tfoot>\n</table>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: MatrixRequiredHeader, selector: "sv-ng-matrixheaderrequired", inputs: ["column", "question"] }, { type: MatrixCellComponent, selector: "sv-ng-matrix-cell", inputs: ["question", "cell"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixTableComponent, decorators: [{
|
|
1975
|
+
type: Component,
|
|
1976
|
+
args: [{ selector: "sv-ng-matrix-table", template: "<table [class]=\"question.getTableCss()\">\n <thead *ngIf=\"table.showHeader\">\n <tr>\n <th\n [class]=\"cell.className\"\n *ngFor=\"let cell of table.headerRow.cells; trackBy: trackCellBy\"\n [style]=\"{ minWidth: cell.minWidth, width: cell.width }\"\n >\n <sv-ng-string *ngIf=\"cell.hasTitle\" [model]=\"cell.locTitle\"></sv-ng-string>\n <sv-ng-matrixheaderrequired *ngIf=\"!!cell.column\" [column]=\"cell.column\" [question]=\"question\"></sv-ng-matrixheaderrequired>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of table.rows; trackBy: trackRowBy\" [class]=\"row.className\">\n <sv-ng-matrix-cell\n [cell]=\"cell\"\n [question]=\"question\"\n *ngFor=\"let cell of row.cells; trackBy: trackCellBy\"\n ></sv-ng-matrix-cell>\n </tr>\n </tbody>\n <tfoot *ngIf=\"table.showFooter\">\n <tr>\n <sv-ng-matrix-cell [cell]=\"cell\" [question]=\"question\" *ngFor=\"let cell of table.footerRow.cells; trackBy: trackCellBy\">\n </sv-ng-matrix-cell>\n </tr>\n </tfoot>\n</table>" }]
|
|
1977
|
+
}], propDecorators: { question: [{
|
|
1978
|
+
type: Input
|
|
1979
|
+
}], table: [{
|
|
1980
|
+
type: Input
|
|
1981
|
+
}] } });
|
|
1982
|
+
|
|
1983
|
+
class MatrixDropdownComponent extends QuestionAngular {
|
|
1984
|
+
}
|
|
1985
|
+
MatrixDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1986
|
+
MatrixDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixDropdownComponent, selector: "sv-ng-matrixdropdown-question", usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [style]=\"{ overflowX: model.showHorizontalScroll ? 'scroll' : '' }\" #contentElement>\n <sv-ng-matrix-table *ngIf=\"model.renderedTable?.showTable\" [question]=\"model\" [table]=\"model.renderedTable\"></sv-ng-matrix-table>\n </div>\n</ng-template>", components: [{ type: MatrixTableComponent, selector: "sv-ng-matrix-table", inputs: ["question", "table"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDropdownComponent, decorators: [{
|
|
1988
|
+
type: Component,
|
|
1989
|
+
args: [{ selector: "sv-ng-matrixdropdown-question", template: "<ng-template #template>\n <div [style]=\"{ overflowX: model.showHorizontalScroll ? 'scroll' : '' }\" #contentElement>\n <sv-ng-matrix-table *ngIf=\"model.renderedTable?.showTable\" [question]=\"model\" [table]=\"model.renderedTable\"></sv-ng-matrix-table>\n </div>\n</ng-template>" }]
|
|
1990
|
+
}] });
|
|
1991
|
+
AngularComponentFactory.Instance.registerComponent("matrixdropdown-question", MatrixDropdownComponent);
|
|
1992
|
+
|
|
1993
|
+
class MatrixDynamicComponent extends QuestionAngular {
|
|
1994
|
+
}
|
|
1995
|
+
MatrixDynamicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1996
|
+
MatrixDynamicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixDynamicComponent, selector: "sv-ng-matrixdynamic-question", usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [style]=\"{ overflowX: model.showHorizontalScroll ? 'scroll' : '' }\" #contentElement>\n <div *ngIf=\"model.renderedTable.showAddRowOnTop\" [class]=\"model.cssClasses.footer\">\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n <sv-ng-matrix-table *ngIf=\"model.renderedTable?.showTable\" [question]=\"model\" [table]=\"model.renderedTable\"></sv-ng-matrix-table>\n <div *ngIf=\"!model.renderedTable.showTable\" [class]=\"model.cssClasses.emptyRowsSection\">\n <div [class]=\"model.cssClasses.emptyRowsText\" [model]=\"model.locEmptyRowsText\" sv-ng-string></div>\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n <div *ngIf=\"model.renderedTable.showAddRowOnBottom\" [class]=\"model.cssClasses.footer\">\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n </div>\n <ng-template #addRowButton>\n <button type=\"button\" [class]=\"model.getAddRowButtonCss(true)\" (click)=\"model.addRowUI()\">\n <sv-ng-string [model]=\"model.locAddRowText\" ></sv-ng-string>\n <span [class]=\"model.cssClasses.iconAdd\"></span>\n </button>\n </ng-template>\n</ng-template>", components: [{ type: MatrixTableComponent, selector: "sv-ng-matrix-table", inputs: ["question", "table"] }, { type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
1997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicComponent, decorators: [{
|
|
1998
|
+
type: Component,
|
|
1999
|
+
args: [{ selector: "sv-ng-matrixdynamic-question", template: "<ng-template #template>\n <div [style]=\"{ overflowX: model.showHorizontalScroll ? 'scroll' : '' }\" #contentElement>\n <div *ngIf=\"model.renderedTable.showAddRowOnTop\" [class]=\"model.cssClasses.footer\">\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n <sv-ng-matrix-table *ngIf=\"model.renderedTable?.showTable\" [question]=\"model\" [table]=\"model.renderedTable\"></sv-ng-matrix-table>\n <div *ngIf=\"!model.renderedTable.showTable\" [class]=\"model.cssClasses.emptyRowsSection\">\n <div [class]=\"model.cssClasses.emptyRowsText\" [model]=\"model.locEmptyRowsText\" sv-ng-string></div>\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n <div *ngIf=\"model.renderedTable.showAddRowOnBottom\" [class]=\"model.cssClasses.footer\">\n <ng-container *ngTemplateOutlet=\"addRowButton\"></ng-container>\n </div>\n </div>\n <ng-template #addRowButton>\n <button type=\"button\" [class]=\"model.getAddRowButtonCss(true)\" (click)=\"model.addRowUI()\">\n <sv-ng-string [model]=\"model.locAddRowText\" ></sv-ng-string>\n <span [class]=\"model.cssClasses.iconAdd\"></span>\n </button>\n </ng-template>\n</ng-template>" }]
|
|
2000
|
+
}] });
|
|
2001
|
+
AngularComponentFactory.Instance.registerComponent("matrixdynamic-question", MatrixDynamicComponent);
|
|
2002
|
+
|
|
2003
|
+
class MatrixDynamicRemoveButtonComponent {
|
|
2004
|
+
get question() {
|
|
2005
|
+
return this.model.data.question;
|
|
2006
|
+
}
|
|
2007
|
+
get row() {
|
|
2008
|
+
return this.model.data.row;
|
|
2009
|
+
}
|
|
2010
|
+
getModel() {
|
|
2011
|
+
return this.model;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
MatrixDynamicRemoveButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicRemoveButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2015
|
+
MatrixDynamicRemoveButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixDynamicRemoveButtonComponent, selector: "sv-ng-matrix-remove-btn", inputs: { model: "model" }, ngImport: i0, template: "<button type=\"button\" [class]=\"question.getRemoveRowButtonCss()\" [disabled]=\"question.isInputReadOnly\" (click)=\"question.removeRowUI(row)\">\n <sv-ng-string [model]=\"question.locRemoveRowText\" ></sv-ng-string>\n <span [class]=\"question.cssClasses.iconRemove\"></span>\n</button>", components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }] });
|
|
2016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicRemoveButtonComponent, decorators: [{
|
|
2017
|
+
type: Component,
|
|
2018
|
+
args: [{ selector: "sv-ng-matrix-remove-btn", template: "<button type=\"button\" [class]=\"question.getRemoveRowButtonCss()\" [disabled]=\"question.isInputReadOnly\" (click)=\"question.removeRowUI(row)\">\n <sv-ng-string [model]=\"question.locRemoveRowText\" ></sv-ng-string>\n <span [class]=\"question.cssClasses.iconRemove\"></span>\n</button>" }]
|
|
2019
|
+
}], propDecorators: { model: [{
|
|
2020
|
+
type: Input
|
|
2021
|
+
}] } });
|
|
2022
|
+
AngularComponentFactory.Instance.registerComponent("sv-matrix-remove-button", MatrixDynamicRemoveButtonComponent);
|
|
2023
|
+
|
|
2024
|
+
class MatrixDynamicDragDropIconComponent {
|
|
2025
|
+
get question() {
|
|
2026
|
+
return this.model.data.question;
|
|
2027
|
+
}
|
|
2028
|
+
getModel() {
|
|
2029
|
+
return this.model;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
MatrixDynamicDragDropIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicDragDropIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2033
|
+
MatrixDynamicDragDropIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixDynamicDragDropIconComponent, selector: "sv-ng-drag-drop-icon", inputs: { model: "model" }, ngImport: i0, template: "<span [class]='question.cssClasses.iconDrag'></span>", isInline: true });
|
|
2034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDynamicDragDropIconComponent, decorators: [{
|
|
2035
|
+
type: Component,
|
|
2036
|
+
args: [{
|
|
2037
|
+
template: "<span [class]='question.cssClasses.iconDrag'></span>",
|
|
2038
|
+
selector: "sv-ng-drag-drop-icon"
|
|
2039
|
+
}]
|
|
2040
|
+
}], propDecorators: { model: [{
|
|
2041
|
+
type: Input
|
|
2042
|
+
}] } });
|
|
2043
|
+
AngularComponentFactory.Instance.registerComponent("sv-matrix-drag-drop-icon", MatrixDynamicDragDropIconComponent);
|
|
2044
|
+
|
|
2045
|
+
class MatrixDetailButtonComponent {
|
|
2046
|
+
get question() {
|
|
2047
|
+
return this.model.data.question;
|
|
2048
|
+
}
|
|
2049
|
+
get row() {
|
|
2050
|
+
return this.model.data.row;
|
|
2051
|
+
}
|
|
2052
|
+
getModel() {
|
|
2053
|
+
return this.model;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
MatrixDetailButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDetailButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2057
|
+
MatrixDetailButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: MatrixDetailButtonComponent, selector: "sv-ng-matrix-detail-btn", inputs: { model: "model" }, ngImport: i0, template: "<button type=\"button\" [class]=\"question.getDetailPanelButtonCss(row)\" (click)=\"row.showHideDetailPanelClick()\"\n [attr.aria-expanded]=\"question.getIsDetailPanelShowing(row) ? 'true' : 'false'\"\n [attr.aria-controls]=\"question.getIsDetailPanelShowing(row) ? row.detailPanelId : null\">\n <svg [class]=\"this.question.getDetailPanelIconCss(this.row)\" \n [iconName]=\"this.question.getDetailPanelIconId(this.row)\" [size]=\"'auto'\" sv-ng-svg-icon>\n </svg>\n</button>", components: [{ type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }] });
|
|
2058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: MatrixDetailButtonComponent, decorators: [{
|
|
2059
|
+
type: Component,
|
|
2060
|
+
args: [{ selector: "sv-ng-matrix-detail-btn", template: "<button type=\"button\" [class]=\"question.getDetailPanelButtonCss(row)\" (click)=\"row.showHideDetailPanelClick()\"\n [attr.aria-expanded]=\"question.getIsDetailPanelShowing(row) ? 'true' : 'false'\"\n [attr.aria-controls]=\"question.getIsDetailPanelShowing(row) ? row.detailPanelId : null\">\n <svg [class]=\"this.question.getDetailPanelIconCss(this.row)\" \n [iconName]=\"this.question.getDetailPanelIconId(this.row)\" [size]=\"'auto'\" sv-ng-svg-icon>\n </svg>\n</button>" }]
|
|
2061
|
+
}], propDecorators: { model: [{
|
|
2062
|
+
type: Input
|
|
2063
|
+
}] } });
|
|
2064
|
+
AngularComponentFactory.Instance.registerComponent("sv-matrix-detail-button", MatrixDetailButtonComponent);
|
|
2065
|
+
|
|
2066
|
+
class ExpressionComponent extends QuestionAngular {
|
|
2067
|
+
}
|
|
2068
|
+
ExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ExpressionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2069
|
+
ExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ExpressionComponent, selector: "sv-ng-expression", usesInheritance: true, ngImport: i0, template: "<div [class]='model.cssClasses.root' #contentElement>{{ model.formatedValue }}</div>", isInline: true });
|
|
2070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ExpressionComponent, decorators: [{
|
|
2071
|
+
type: Component,
|
|
2072
|
+
args: [{
|
|
2073
|
+
selector: "sv-ng-expression",
|
|
2074
|
+
template: "<div [class]='model.cssClasses.root' #contentElement>{{ model.formatedValue }}</div>"
|
|
2075
|
+
}]
|
|
2076
|
+
}] });
|
|
2077
|
+
AngularComponentFactory.Instance.registerComponent("expression-question", ExpressionComponent);
|
|
2078
|
+
|
|
2079
|
+
class ImageQuestionComponent extends QuestionAngular {
|
|
2080
|
+
}
|
|
2081
|
+
ImageQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImageQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2082
|
+
ImageQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ImageQuestionComponent, selector: "sv-ng-image-question", usesInheritance: true, ngImport: i0, template: "<div [class]=\"model.cssClasses.root\" #contentElement>\n <img\n *ngIf=\"model.renderedMode === 'image'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink\"\n [attr.alt]=\"model.text || model.title\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n /><video\n controls\n *ngIf=\"model.renderedMode === 'video'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n ></video>\n <iframe\n *ngIf=\"model.renderedMode === 'youtube'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink | safeResourceUrl\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n ></iframe>\n</div>", directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeResourceUrl": SafeResourceUrlPipe } });
|
|
2083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ImageQuestionComponent, decorators: [{
|
|
2084
|
+
type: Component,
|
|
2085
|
+
args: [{ selector: "sv-ng-image-question", template: "<div [class]=\"model.cssClasses.root\" #contentElement>\n <img\n *ngIf=\"model.renderedMode === 'image'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink\"\n [attr.alt]=\"model.text || model.title\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n /><video\n controls\n *ngIf=\"model.renderedMode === 'video'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n ></video>\n <iframe\n *ngIf=\"model.renderedMode === 'youtube'\"\n [class]=\"model.getImageCss()\"\n [attr.src]=\"model.imageLink | safeResourceUrl\"\n [attr.width]=\"model.renderedWidth\"\n [attr.height]=\"model.renderedHeight\"\n [style]=\"{ objectFit: model.imageFit }\"\n ></iframe>\n</div>" }]
|
|
2086
|
+
}] });
|
|
2087
|
+
AngularComponentFactory.Instance.registerComponent("image-question", ImageQuestionComponent);
|
|
2088
|
+
|
|
2089
|
+
class CustomQuestionComponent extends QuestionAngular {
|
|
2090
|
+
get contentQuestion() {
|
|
2091
|
+
return this.model.contentQuestion;
|
|
2092
|
+
}
|
|
2093
|
+
getComponentName(element) {
|
|
2094
|
+
if (element.customWidget) {
|
|
2095
|
+
return "survey-customwidget";
|
|
2096
|
+
}
|
|
2097
|
+
return element.getTemplate() + "-question";
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
CustomQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CustomQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2101
|
+
CustomQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CustomQuestionComponent, selector: "sv-ng-custom-question", usesInheritance: true, ngImport: i0, template: "<ng-template [component]='{ name: getComponentName(contentQuestion), data: { model: contentQuestion } }'></ng-template>", isInline: true, directives: [{ type: DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
2102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CustomQuestionComponent, decorators: [{
|
|
2103
|
+
type: Component,
|
|
2104
|
+
args: [{
|
|
2105
|
+
selector: "sv-ng-custom-question",
|
|
2106
|
+
template: "<ng-template [component]='{ name: getComponentName(contentQuestion), data: { model: contentQuestion } }'></ng-template>"
|
|
2107
|
+
}]
|
|
2108
|
+
}] });
|
|
2109
|
+
AngularComponentFactory.Instance.registerComponent("custom-question", CustomQuestionComponent);
|
|
2110
|
+
|
|
2111
|
+
class CompositeQuestionComponent extends QuestionAngular {
|
|
2112
|
+
get contentPanel() {
|
|
2113
|
+
return this.model.contentPanel;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
CompositeQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CompositeQuestionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2117
|
+
CompositeQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CompositeQuestionComponent, selector: "sv-ng-composite-question", usesInheritance: true, ngImport: i0, template: "<sv-ng-panel [model]='contentPanel'></sv-ng-panel>", isInline: true, components: [{ type: PanelComponent, selector: "sv-ng-panel, '[sv-ng-panel]'", inputs: ["model"] }] });
|
|
2118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CompositeQuestionComponent, decorators: [{
|
|
2119
|
+
type: Component,
|
|
2120
|
+
args: [{
|
|
2121
|
+
selector: "sv-ng-composite-question",
|
|
2122
|
+
template: "<sv-ng-panel [model]='contentPanel'></sv-ng-panel>"
|
|
2123
|
+
}]
|
|
2124
|
+
}] });
|
|
2125
|
+
AngularComponentFactory.Instance.registerComponent("composite-question", CompositeQuestionComponent);
|
|
2126
|
+
|
|
2127
|
+
class SurveyAngularModule {
|
|
2128
|
+
}
|
|
2129
|
+
SurveyAngularModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2130
|
+
SurveyAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyAngularModule, declarations: [VisibleDirective, Key2ClickDirective, PanelDynamicAddBtn, PanelDynamicNextBtn, PanelDynamicPrevBtn, PanelDynamicProgressText, ElementComponent,
|
|
2131
|
+
SurveyComponent, PageComponent, PanelComponent, QuestionComponent, StringViewerComponent, SurveyStringComponent, StringEditorComponent,
|
|
2132
|
+
QuestionSkeletonComponent, TextQuestionComponent, RadiogroupComponent, RadiogroupItemComponent, CheckboxComponent, CheckboxItemComponent,
|
|
2133
|
+
DropdownComponent, DropdownQuestionComponent, DropdownSelectComponent, DropdownOptionItemComponent,
|
|
2134
|
+
PopupComponent, PopupContainerComponent,
|
|
2135
|
+
ListComponent, ListItemComponent,
|
|
2136
|
+
TagboxComponent, TagboxQuestionComponent, TagboxItemComponent,
|
|
2137
|
+
ActionBarComponent, ActionComponent, ActionBarItemComponent, ActionBarItemDropdownComponent, HtmlQuestionComponent,
|
|
2138
|
+
SelectBaseItemComponent, SelectBaseComponent, SurveyCommentComponent, ElementHeaderComponent, ElementTitleComponent, DynamicHeadComponent, RowComponent,
|
|
2139
|
+
RatingQuestionComponent, RatingDropdownComponent, BooleanQuestionComponent, BooleanCheckboxComponent, BooleanRadioComponent, BooleanRadioItemComponent, ImagePickerItemComponent, ImagePickerQuestionComponent, ImageQuestionComponent,
|
|
2140
|
+
SurveyHeaderComponent, ProgressDefaultComponent, ProgressButtonsComponent, SurveyNavigationButton, MatrixQuestionComponent, SvgIconComponent, FileQuestionComponent, SafeUrlPipe, SafeHtmlPipe, CommentQuestionComponent, SignaturePadQuestionComponent, ErrorsComponent,
|
|
2141
|
+
MultipleTextComponent, MultipleTextItemComponent, DynamicComponentDirective, RankingQuestionComponent, RankingItemComponent, PanelDynamicQuestionComponent, EmbeddedViewContentComponent, CustomWidgetComponent, MatrixCellComponent, MatrixTableComponent, MatrixDropdownComponent,
|
|
2142
|
+
MatrixDynamicComponent, MatrixDetailButtonComponent, MatrixDynamicRemoveButtonComponent, MatrixDynamicDragDropIconComponent, MatrixRequiredHeader, ExpressionComponent, SafeResourceUrlPipe, BrandInfoComponent,
|
|
2143
|
+
CustomQuestionComponent, CompositeQuestionComponent], imports: [CommonModule, FormsModule], exports: [SurveyComponent, SvgIconComponent] });
|
|
2144
|
+
SurveyAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyAngularModule, providers: [PopupService], imports: [[
|
|
2145
|
+
CommonModule, FormsModule
|
|
2146
|
+
]] });
|
|
2147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SurveyAngularModule, decorators: [{
|
|
2148
|
+
type: NgModule,
|
|
2149
|
+
args: [{
|
|
2150
|
+
declarations: [
|
|
2151
|
+
VisibleDirective, Key2ClickDirective, PanelDynamicAddBtn, PanelDynamicNextBtn, PanelDynamicPrevBtn, PanelDynamicProgressText, ElementComponent,
|
|
2152
|
+
SurveyComponent, PageComponent, PanelComponent, QuestionComponent, StringViewerComponent, SurveyStringComponent, StringEditorComponent,
|
|
2153
|
+
QuestionSkeletonComponent, TextQuestionComponent, RadiogroupComponent, RadiogroupItemComponent, CheckboxComponent, CheckboxItemComponent,
|
|
2154
|
+
DropdownComponent, DropdownQuestionComponent, DropdownSelectComponent, DropdownOptionItemComponent,
|
|
2155
|
+
PopupComponent, PopupContainerComponent,
|
|
2156
|
+
ListComponent, ListItemComponent,
|
|
2157
|
+
TagboxComponent, TagboxQuestionComponent, TagboxItemComponent,
|
|
2158
|
+
ActionBarComponent, ActionComponent, ActionBarItemComponent, ActionBarItemDropdownComponent, HtmlQuestionComponent,
|
|
2159
|
+
SelectBaseItemComponent, SelectBaseComponent, SurveyCommentComponent, ElementHeaderComponent, ElementTitleComponent, DynamicHeadComponent, RowComponent,
|
|
2160
|
+
RatingQuestionComponent, RatingDropdownComponent, BooleanQuestionComponent, BooleanCheckboxComponent, BooleanRadioComponent, BooleanRadioItemComponent, ImagePickerItemComponent, ImagePickerQuestionComponent, ImageQuestionComponent,
|
|
2161
|
+
SurveyHeaderComponent, ProgressDefaultComponent, ProgressButtonsComponent, SurveyNavigationButton, MatrixQuestionComponent, SvgIconComponent, FileQuestionComponent, SafeUrlPipe, SafeHtmlPipe, CommentQuestionComponent, SignaturePadQuestionComponent, ErrorsComponent,
|
|
2162
|
+
MultipleTextComponent, MultipleTextItemComponent, DynamicComponentDirective, RankingQuestionComponent, RankingItemComponent, PanelDynamicQuestionComponent, EmbeddedViewContentComponent, CustomWidgetComponent, MatrixCellComponent, MatrixTableComponent, MatrixDropdownComponent,
|
|
2163
|
+
MatrixDynamicComponent, MatrixDetailButtonComponent, MatrixDynamicRemoveButtonComponent, MatrixDynamicDragDropIconComponent, MatrixRequiredHeader, ExpressionComponent, SafeResourceUrlPipe, BrandInfoComponent,
|
|
2164
|
+
CustomQuestionComponent, CompositeQuestionComponent
|
|
2165
|
+
],
|
|
2166
|
+
imports: [
|
|
2167
|
+
CommonModule, FormsModule
|
|
2168
|
+
],
|
|
2169
|
+
exports: [
|
|
2170
|
+
SurveyComponent, SvgIconComponent
|
|
2171
|
+
],
|
|
2172
|
+
providers: [PopupService],
|
|
2173
|
+
}]
|
|
2174
|
+
}] });
|
|
2175
|
+
|
|
2176
|
+
/**
|
|
2177
|
+
* Generated bundle index. Do not edit.
|
|
2178
|
+
*/
|
|
2179
|
+
|
|
2180
|
+
export { ActionBarComponent, ActionBarItemComponent, ActionBarItemDropdownComponent, ActionComponent, AngularComponentFactory, CheckboxComponent, CheckboxItemComponent, DropdownComponent, DropdownQuestionComponent, HtmlQuestionComponent, ListComponent, ListItemComponent, PageComponent, PopupComponent, PopupContainerComponent, PopupService, QuestionComponent, QuestionSkeletonComponent, RadiogroupComponent, RadiogroupItemComponent, StringViewerComponent, SurveyAngularModule, SurveyComponent, SvgIconComponent, TagboxComponent, TagboxItemComponent, TextQuestionComponent };
|
|
2181
|
+
//# sourceMappingURL=survey-angular-ui.mjs.map
|