survey-creator-angular 2.3.4 → 2.3.6
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/angular-ui.module.d.ts +5 -4
- package/bundles/survey-creator-angular.umd.js +177 -125
- package/bundles/survey-creator-angular.umd.js.map +1 -1
- package/esm2015/angular-ui.module.js +4 -3
- package/esm2015/page-wrapper.component.js +53 -0
- package/esm2015/tabs/designer/designer-pages.component.js +3 -3
- package/esm2015/tabs/designer/designer-survey.component.js +6 -5
- package/esm2015/tabs/designer/designer.component.js +3 -3
- package/fesm2015/survey-creator-angular.js +153 -105
- package/fesm2015/survey-creator-angular.js.map +1 -1
- package/package.json +4 -4
- package/page-wrapper.component.d.ts +21 -0
|
@@ -6,7 +6,7 @@ import * as i3 from '@angular/forms';
|
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1 from 'survey-angular-ui';
|
|
8
8
|
import { BaseAngular, AngularComponentFactory, SurveyContentComponent, EmbeddedViewContentComponent, ButtonGroupQuestionComponent, QuestionAngular, SurveyModule } from 'survey-angular-ui';
|
|
9
|
-
import {
|
|
9
|
+
import { PageNavigatorViewModel, editorLocalization, SurveyResultsModel, PageAdorner, QuestionAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, ToolboxToolViewModel, StringEditorViewModelBase, editableStringRendererName, initLogicOperator, MatrixCellWrapperViewModel, RowViewModel, QuestionRatingAdornerViewModel, LogoImageViewModel } from 'survey-creator-core';
|
|
10
10
|
import { getActionDropdownButtonTarget, DropdownListModel, RendererFactory } from 'survey-core';
|
|
11
11
|
|
|
12
12
|
class TabbedMenuItemWrapperComponent extends BaseAngular {
|
|
@@ -212,124 +212,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
212
212
|
}] } });
|
|
213
213
|
AngularComponentFactory.Instance.registerComponent("svc-surface-placeholder", SurfacePlaceholderComponent);
|
|
214
214
|
|
|
215
|
-
class
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
this.
|
|
219
|
-
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
ngOnInit() {
|
|
223
|
-
this.createModel();
|
|
224
|
-
this.createHash();
|
|
225
|
-
super.ngOnInit();
|
|
215
|
+
class PageWrapperComponent extends EmbeddedViewContentComponent {
|
|
216
|
+
constructor(viewContainerRef, changeDetectorRef) {
|
|
217
|
+
super(viewContainerRef);
|
|
218
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
219
|
+
this.id = `PageWrapperCallback_${++PageWrapperComponent.ID}`;
|
|
226
220
|
}
|
|
227
|
-
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
|
|
221
|
+
setupCallback(page) {
|
|
222
|
+
if (!page)
|
|
223
|
+
return;
|
|
224
|
+
page.registerFunctionOnPropertyValueChanged("name", () => {
|
|
225
|
+
this.embeddedView ? this.embeddedView.detectChanges() : this.changeDetectorRef.detectChanges();
|
|
226
|
+
}, this.id);
|
|
231
227
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
this.hash[key] = this[key];
|
|
237
|
-
res = true;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
return res;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
CreatorModelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreatorModelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
-
CreatorModelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreatorModelComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreatorModelComponent, decorators: [{
|
|
246
|
-
type: Component,
|
|
247
|
-
args: [{
|
|
248
|
-
template: ""
|
|
249
|
-
}]
|
|
250
|
-
}] });
|
|
251
|
-
|
|
252
|
-
class PageElementContentComponent extends EmbeddedViewContentComponent {
|
|
253
|
-
ngAfterViewInit() {
|
|
254
|
-
var _a;
|
|
255
|
-
(_a = this.embeddedView) === null || _a === void 0 ? void 0 : _a.detach();
|
|
228
|
+
clearCallback(page) {
|
|
229
|
+
if (!page)
|
|
230
|
+
return;
|
|
231
|
+
page.unRegisterFunctionOnPropertyValueChanged("name");
|
|
256
232
|
}
|
|
257
233
|
ngOnChanges(changes) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
PageElementContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageElementContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
-
PageElementContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PageElementContentComponent, selector: "svc-page-element-content", inputs: { model: "model", survey: "survey" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #template><page [model]=\"model\" [survey]=\"survey\"></page></ng-template>", isInline: true, styles: [":host { display: none }"], components: [{ type: i1.PageComponent, selector: "page, sv-ng-page", inputs: ["model", "survey"] }] });
|
|
264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageElementContentComponent, decorators: [{
|
|
265
|
-
type: Component,
|
|
266
|
-
args: [{
|
|
267
|
-
selector: "svc-page-element-content",
|
|
268
|
-
template: "<ng-template #template><page [model]=\"model\" [survey]=\"survey\"></page></ng-template>",
|
|
269
|
-
styles: [":host { display: none }"]
|
|
270
|
-
}]
|
|
271
|
-
}], propDecorators: { model: [{
|
|
272
|
-
type: Input
|
|
273
|
-
}], survey: [{
|
|
274
|
-
type: Input
|
|
275
|
-
}] } });
|
|
276
|
-
|
|
277
|
-
class PageDesignerComponent extends CreatorModelComponent {
|
|
278
|
-
createModel() {
|
|
279
|
-
if (this.adorner) {
|
|
280
|
-
this.adorner.dispose();
|
|
281
|
-
}
|
|
282
|
-
if (this.model) {
|
|
283
|
-
this.adorner = new PageAdorner(this.creator, this.model);
|
|
284
|
-
this.adorner.isGhost = this.isGhost;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
ngDoCheck() {
|
|
288
|
-
super.ngDoCheck();
|
|
289
|
-
if (this.adorner) {
|
|
290
|
-
this.adorner.isGhost = this.isGhost;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
getModel() {
|
|
294
|
-
return this.adorner;
|
|
295
|
-
}
|
|
296
|
-
getPropertiesToTrack() {
|
|
297
|
-
return ["creator", "model"];
|
|
298
|
-
}
|
|
299
|
-
ngAfterViewChecked() {
|
|
300
|
-
var _a;
|
|
301
|
-
super.ngAfterViewChecked();
|
|
302
|
-
if (this.adorner && ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
|
|
303
|
-
this.adorner.setRootElement(this.container.nativeElement);
|
|
234
|
+
if (changes.page && changes.page.currentValue !== changes.page.previousValue) {
|
|
235
|
+
this.clearCallback(changes.page.previousValue);
|
|
236
|
+
this.setupCallback(changes.page.currentValue);
|
|
304
237
|
}
|
|
305
238
|
}
|
|
306
239
|
ngOnDestroy() {
|
|
307
|
-
|
|
308
|
-
this.adorner.dispose();
|
|
240
|
+
this.clearCallback(this.page);
|
|
309
241
|
}
|
|
310
242
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
i0.ɵɵ
|
|
243
|
+
PageWrapperComponent.ID = 0;
|
|
244
|
+
PageWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageWrapperComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
245
|
+
PageWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PageWrapperComponent, selector: "svc-page-wrapper", inputs: { page: "page", isGhost: "isGhost", creator: "creator", className: "className" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #template>\n <div\n [class]=\"className\"\n [attr.data-sv-drop-target-page]=\"page?.name\"\n [attr.data-sv-drop-target-survey-element]=\"isGhost ? 'newGhostPage' : page?.name\"\n >\n <ng-container *ngIf=\"!!page\">\n <ng-template [component]=\"{ name: 'svc-page', data: { model: page, creator, survey: creator.survey, isGhost }}\"></ng-template>\n </ng-container>\n </div>\n</ng-template>", styles: [":host { display: none; }"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageWrapperComponent, decorators: [{
|
|
314
247
|
type: Component,
|
|
315
248
|
args: [{
|
|
316
|
-
selector: "svc-page",
|
|
317
|
-
templateUrl: "./page.component.html",
|
|
249
|
+
selector: "svc-page-wrapper",
|
|
250
|
+
templateUrl: "./page-wrapper.component.html",
|
|
318
251
|
styles: [":host { display: none; }"]
|
|
319
252
|
}]
|
|
320
|
-
}], propDecorators: {
|
|
253
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { page: [{
|
|
321
254
|
type: Input
|
|
322
|
-
}],
|
|
255
|
+
}], isGhost: [{
|
|
323
256
|
type: Input
|
|
324
257
|
}], creator: [{
|
|
325
258
|
type: Input
|
|
326
|
-
}],
|
|
259
|
+
}], className: [{
|
|
327
260
|
type: Input
|
|
328
|
-
}], container: [{
|
|
329
|
-
type: ViewChild,
|
|
330
|
-
args: ["container", { read: ElementRef }]
|
|
331
261
|
}] } });
|
|
332
|
-
AngularComponentFactory.Instance.registerComponent("svc-page", PageDesignerComponent);
|
|
333
262
|
|
|
334
263
|
class DesignerPagesComponent extends BaseAngular {
|
|
335
264
|
getModel() {
|
|
@@ -343,7 +272,7 @@ class DesignerPagesComponent extends BaseAngular {
|
|
|
343
272
|
}
|
|
344
273
|
}
|
|
345
274
|
DesignerPagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerPagesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
346
|
-
DesignerPagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerPagesComponent, selector: "svc-designer-pages", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n
|
|
275
|
+
DesignerPagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerPagesComponent, selector: "svc-designer-pages", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <svc-page-wrapper [page]=\"model.pagesController.page2Display\" [creator]=\"creator\" [isGhost]=\"model.pagesController.page2Display == model.newPage\" [className]=\"'svc-page'\"></svc-page-wrapper>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: PageWrapperComponent, selector: "svc-page-wrapper", inputs: ["page", "isGhost", "creator", "className"] }] });
|
|
347
276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerPagesComponent, decorators: [{
|
|
348
277
|
type: Component,
|
|
349
278
|
args: [{
|
|
@@ -355,6 +284,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
355
284
|
type: Input
|
|
356
285
|
}] } });
|
|
357
286
|
|
|
287
|
+
class CreatorModelComponent extends BaseAngular {
|
|
288
|
+
createHash() {
|
|
289
|
+
this.hash = {};
|
|
290
|
+
this.getPropertiesToTrack().forEach((prop) => {
|
|
291
|
+
this.hash[prop] = this[prop];
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
ngOnInit() {
|
|
295
|
+
this.createModel();
|
|
296
|
+
this.createHash();
|
|
297
|
+
super.ngOnInit();
|
|
298
|
+
}
|
|
299
|
+
ngDoCheck() {
|
|
300
|
+
if (this.needUpdateModel())
|
|
301
|
+
this.createModel();
|
|
302
|
+
super.ngDoCheck();
|
|
303
|
+
}
|
|
304
|
+
needUpdateModel() {
|
|
305
|
+
let res = false;
|
|
306
|
+
Object.keys(this.hash).forEach(key => {
|
|
307
|
+
if (this.hash[key] != this[key]) {
|
|
308
|
+
this.hash[key] = this[key];
|
|
309
|
+
res = true;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
return res;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
CreatorModelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreatorModelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
316
|
+
CreatorModelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreatorModelComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreatorModelComponent, decorators: [{
|
|
318
|
+
type: Component,
|
|
319
|
+
args: [{
|
|
320
|
+
template: ""
|
|
321
|
+
}]
|
|
322
|
+
}] });
|
|
323
|
+
|
|
358
324
|
class PageNavigatorItemComponent extends BaseAngular {
|
|
359
325
|
getModel() {
|
|
360
326
|
return this.model;
|
|
@@ -437,7 +403,7 @@ class DesignerSurveyComponent extends BaseAngular {
|
|
|
437
403
|
}
|
|
438
404
|
}
|
|
439
405
|
DesignerSurveyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerSurveyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
440
|
-
DesignerSurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerSurveyComponent, selector: "svc-designer-survey", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"model.designerCss\" [style.maxWidth]=\"survey.renderedWidth\" [style]=\"model.surfaceCssVariables\">\n <div *ngIf=\"creator.allowEditSurveyTitle\" class=\"svc-designer-header\">\n <div *ngIf=\"survey.renderedHasHeader\" [class]=\"survey.css.header\" [survey]=\"survey\" sv-ng-survey-header></div>\n </div>\n\n <ng-container *ngIf=\"creator.pageEditMode !== 'bypage'\">\n <ng-container *ngFor=\"let page of model.pages; trackBy: trackPageBy \">\n <
|
|
406
|
+
DesignerSurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerSurveyComponent, selector: "svc-designer-survey", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div [class]=\"model.designerCss\" [style.maxWidth]=\"survey.renderedWidth\" [style]=\"model.surfaceCssVariables\">\n <div *ngIf=\"creator.allowEditSurveyTitle\" class=\"svc-designer-header\">\n <div *ngIf=\"survey.renderedHasHeader\" [class]=\"survey.css.header\" [survey]=\"survey\" sv-ng-survey-header></div>\n </div>\n\n <ng-container *ngIf=\"creator.pageEditMode !== 'bypage'\">\n <ng-container *ngFor=\"let page of model.pages; trackBy: trackPageBy \">\n <svc-page-wrapper [page]=\"page\" [creator]=\"creator\" [isGhost]=\"model.newPage == page\" [className]=\"'svc-page'\"></svc-page-wrapper>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"model.pagesController.page2Display && creator.pageEditMode === 'bypage'\">\n <svc-designer-pages [model]=\"model\"></svc-designer-pages>\n </ng-container>\n\n </div>\n\n <div *ngIf=\"model.showSurfaceTools\" class=\"svc-tab-designer__tools\">\n <div *ngIf=\"creator.showPageNavigator\" class=\"svc-tab-designer__page-navigator\">\n <svc-page-navigator [pagesController]=\"model.pagesController\" [pageEditMode]=\"creator.pageEditMode\">\n </svc-page-navigator>\n </div>\n <div *ngIf=\"model.showSurfaceToolbar\" class=\"svc-tab-designer__toolbar\">\n <sv-action-bar [model]=\"model.surfaceToolbar\"></sv-action-bar>\n </div>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: i1.SurveyHeaderComponent, selector: "'[sv-ng-survey-header]'", inputs: ["survey"] }, { type: PageWrapperComponent, selector: "svc-page-wrapper", inputs: ["page", "isGhost", "creator", "className"] }, { type: DesignerPagesComponent, selector: "svc-designer-pages", inputs: ["model"] }, { type: PageNavigatorComponent, selector: "svc-page-navigator", inputs: ["pagesController", "pageEditMode"] }, { type: i1.ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
441
407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerSurveyComponent, decorators: [{
|
|
442
408
|
type: Component,
|
|
443
409
|
args: [{
|
|
@@ -461,7 +427,7 @@ class DesignerTabComponent extends BaseAngular {
|
|
|
461
427
|
}
|
|
462
428
|
}
|
|
463
429
|
DesignerTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerTabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
-
DesignerTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerTabComponent, selector: "svc-tab-designer", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div class=\"svc-flex-column\">\n <ng-container *ngIf=\"model.isToolboxVisible\">\n <ng-template [component]=\"{name: 'svc-toolbox', data: { model: creator }}\"></ng-template>\n </ng-container>\n </div>\n <div class=\"svc-tab-designer\" [class]=\"model.getRootCss()\" (click)=\"model.clickDesigner()\">\n <sv-scroll>\n <div class=\"svc-tab-designer_content\">\n <ng-container *ngIf=\"model.showPlaceholder\">\n <div *ngIf=\"creator.showHeaderInEmptySurvey && creator.allowEditSurveyTitle\" class=\"svc-designer-header\">\n <div *ngIf=\"survey.renderedHasHeader\" [class]=\"survey.css.header\" [survey]=\"survey\" sv-ng-survey-header>\n </div>\n </div>\n <div class=\"svc-designer__placeholder-container\" [attr.data-sv-drop-target-survey-element]=\"'newGhostPage'\">\n <svc-surface-placeholder [name]=\"'designer'\" [placeholderTitleText]=\"model.placeholderTitleText\"\n [placeholderDescriptionText]=\"model.placeholderDescriptionText\">\n </svc-surface-placeholder>\n <
|
|
430
|
+
DesignerTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DesignerTabComponent, selector: "svc-tab-designer", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <div class=\"svc-flex-column\">\n <ng-container *ngIf=\"model.isToolboxVisible\">\n <ng-template [component]=\"{name: 'svc-toolbox', data: { model: creator }}\"></ng-template>\n </ng-container>\n </div>\n <div class=\"svc-tab-designer\" [class]=\"model.getRootCss()\" (click)=\"model.clickDesigner()\">\n <sv-scroll>\n <div class=\"svc-tab-designer_content\">\n <ng-container *ngIf=\"model.showPlaceholder\">\n <div *ngIf=\"creator.showHeaderInEmptySurvey && creator.allowEditSurveyTitle\" class=\"svc-designer-header\">\n <div *ngIf=\"survey.renderedHasHeader\" [class]=\"survey.css.header\" [survey]=\"survey\" sv-ng-survey-header>\n </div>\n </div>\n <div class=\"svc-designer__placeholder-container\" [attr.data-sv-drop-target-survey-element]=\"'newGhostPage'\">\n <svc-surface-placeholder [name]=\"'designer'\" [placeholderTitleText]=\"model.placeholderTitleText\"\n [placeholderDescriptionText]=\"model.placeholderDescriptionText\">\n </svc-surface-placeholder>\n <svc-page-wrapper [page]=\"model.newPage\" [creator]=\"creator\" [isGhost]=\"true\" [className]=\"'svc-designer-placeholder-page'\"></svc-page-wrapper>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!model.showPlaceholder\">\n <svc-designer-survey [model]=\"model\"></svc-designer-survey>\n </ng-container>\n </div>\n </sv-scroll>\n </div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: i1.ScrollComponent, selector: "sv-scroll", inputs: ["disabled", "onInnerHeightChanged"] }, { type: i1.SurveyHeaderComponent, selector: "'[sv-ng-survey-header]'", inputs: ["survey"] }, { type: SurfacePlaceholderComponent, selector: "svc-surface-placeholder", inputs: ["name", "placeholderTitleText", "placeholderDescriptionText"] }, { type: PageWrapperComponent, selector: "svc-page-wrapper", inputs: ["page", "isGhost", "creator", "className"] }, { type: DesignerSurveyComponent, selector: "svc-designer-survey", inputs: ["model"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.DynamicComponentDirective, selector: "[component]", inputs: ["component"] }] });
|
|
465
431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DesignerTabComponent, decorators: [{
|
|
466
432
|
type: Component,
|
|
467
433
|
args: [{
|
|
@@ -1079,6 +1045,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1079
1045
|
}] } });
|
|
1080
1046
|
AngularComponentFactory.Instance.registerComponent("svc-tab-theme", ThemeTabComponent);
|
|
1081
1047
|
|
|
1048
|
+
class PageElementContentComponent extends EmbeddedViewContentComponent {
|
|
1049
|
+
ngAfterViewInit() {
|
|
1050
|
+
var _a;
|
|
1051
|
+
(_a = this.embeddedView) === null || _a === void 0 ? void 0 : _a.detach();
|
|
1052
|
+
}
|
|
1053
|
+
ngOnChanges(changes) {
|
|
1054
|
+
var _a;
|
|
1055
|
+
(_a = this.embeddedView) === null || _a === void 0 ? void 0 : _a.detectChanges();
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
PageElementContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageElementContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1059
|
+
PageElementContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PageElementContentComponent, selector: "svc-page-element-content", inputs: { model: "model", survey: "survey" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #template><page [model]=\"model\" [survey]=\"survey\"></page></ng-template>", isInline: true, styles: [":host { display: none }"], components: [{ type: i1.PageComponent, selector: "page, sv-ng-page", inputs: ["model", "survey"] }] });
|
|
1060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageElementContentComponent, decorators: [{
|
|
1061
|
+
type: Component,
|
|
1062
|
+
args: [{
|
|
1063
|
+
selector: "svc-page-element-content",
|
|
1064
|
+
template: "<ng-template #template><page [model]=\"model\" [survey]=\"survey\"></page></ng-template>",
|
|
1065
|
+
styles: [":host { display: none }"]
|
|
1066
|
+
}]
|
|
1067
|
+
}], propDecorators: { model: [{
|
|
1068
|
+
type: Input
|
|
1069
|
+
}], survey: [{
|
|
1070
|
+
type: Input
|
|
1071
|
+
}] } });
|
|
1072
|
+
|
|
1073
|
+
class PageDesignerComponent extends CreatorModelComponent {
|
|
1074
|
+
createModel() {
|
|
1075
|
+
if (this.adorner) {
|
|
1076
|
+
this.adorner.dispose();
|
|
1077
|
+
}
|
|
1078
|
+
if (this.model) {
|
|
1079
|
+
this.adorner = new PageAdorner(this.creator, this.model);
|
|
1080
|
+
this.adorner.isGhost = this.isGhost;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
ngDoCheck() {
|
|
1084
|
+
super.ngDoCheck();
|
|
1085
|
+
if (this.adorner) {
|
|
1086
|
+
this.adorner.isGhost = this.isGhost;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
getModel() {
|
|
1090
|
+
return this.adorner;
|
|
1091
|
+
}
|
|
1092
|
+
getPropertiesToTrack() {
|
|
1093
|
+
return ["creator", "model"];
|
|
1094
|
+
}
|
|
1095
|
+
ngAfterViewChecked() {
|
|
1096
|
+
var _a;
|
|
1097
|
+
super.ngAfterViewChecked();
|
|
1098
|
+
if (this.adorner && ((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
|
|
1099
|
+
this.adorner.setRootElement(this.container.nativeElement);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
ngOnDestroy() {
|
|
1103
|
+
super.ngOnDestroy();
|
|
1104
|
+
this.adorner.dispose();
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
PageDesignerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1108
|
+
PageDesignerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PageDesignerComponent, selector: "svc-page", inputs: { model: "model", survey: "survey", creator: "creator", isGhost: "isGhost" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n<div *ngIf=\"model && adorner\" class=\"svc-page__content\" [class]=\"adorner.css\" [key2click]\n (click)=\"adorner.select(adorner, $event)\" (dblclick)=\"adorner.dblclick($event)\"\n (mouseover)=\"adorner.hover($event, $event.currentTarget)\" (mouseleave)=\"adorner.hover($event, $event.target)\"\n [id]=\"adorner.page.id\" [attr.data-sv-drop-target-survey-page]=\"adorner.dropTargetName\" #container>\n <div class=\"svc-question__drop-indicator svc-question__drop-indicator--top\"></div>\n <div class=\"svc-question__drop-indicator svc-question__drop-indicator--bottom\"></div>\n <svc-page-element-content\n *ngIf=\"adorner.needRenderContent\" \n [model]=\"adorner.page\" \n [survey]=\"survey\">\n </svc-page-element-content>\n <div *ngIf=\"!adorner.needRenderContent\" class=\"svc-page__loading-content\">\n <sv-ng-loading-indicator></sv-ng-loading-indicator>\n </div>\n <div *ngIf=\"adorner.showPlaceholder\" class=\"svc-page__placeholder_frame\">\n <div class=\"svc-panel__placeholder_frame\">\n <div class=\"svc-panel__placeholder\">{{adorner.placeholderText}}</div>\n </div>\n </div>\n <div *ngIf=\"adorner.allowDragging && !adorner.isGhost\" class=\"svc-question__drag-area\"\n (pointerdown)=\"adorner.onPointerDown($event)\">\n <svg class=\"svc-question__drag-element\" [iconName]=\"'icon-drag-area-indicator_24x16'\" [size]=\"'auto'\"\n sv-ng-svg-icon></svg>\n <div class=\"svc-page__content-actions\">\n <sv-action-bar [model]=\"adorner.actionContainer\" #container></sv-action-bar>\n <sv-action-bar *ngIf=\"adorner.topActionContainer.hasActions\" [model]=\"adorner.topActionContainer\"></sv-action-bar>\n </div>\n </div>\n <div *ngIf=\"!adorner.allowDragging || adorner.isGhost\" class=\"svc-page__content-actions\">\n <sv-action-bar [model]=\"adorner.actionContainer\"></sv-action-bar>\n <sv-action-bar *ngIf=\"adorner.topActionContainer.hasActions\" [model]=\"adorner.topActionContainer\"></sv-action-bar>\n </div>\n <sv-action-bar [model]=\"adorner.footerActionsBar\"></sv-action-bar>\n</div>\n</ng-template>", styles: [":host { display: none; }"], components: [{ type: PageElementContentComponent, selector: "svc-page-element-content", inputs: ["model", "survey"] }, { type: i1.LoadingIndicatorComponent, selector: "sv-ng-loading-indicator" }, { type: i1.SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }, { type: i1.ActionBarComponent, selector: "sv-action-bar, sv-ng-action-bar", inputs: ["model", "handleClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }] });
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PageDesignerComponent, decorators: [{
|
|
1110
|
+
type: Component,
|
|
1111
|
+
args: [{
|
|
1112
|
+
selector: "svc-page",
|
|
1113
|
+
templateUrl: "./page.component.html",
|
|
1114
|
+
styles: [":host { display: none; }"]
|
|
1115
|
+
}]
|
|
1116
|
+
}], propDecorators: { model: [{
|
|
1117
|
+
type: Input
|
|
1118
|
+
}], survey: [{
|
|
1119
|
+
type: Input
|
|
1120
|
+
}], creator: [{
|
|
1121
|
+
type: Input
|
|
1122
|
+
}], isGhost: [{
|
|
1123
|
+
type: Input
|
|
1124
|
+
}], container: [{
|
|
1125
|
+
type: ViewChild,
|
|
1126
|
+
args: ["container", { read: ElementRef }]
|
|
1127
|
+
}] } });
|
|
1128
|
+
AngularComponentFactory.Instance.registerComponent("svc-page", PageDesignerComponent);
|
|
1129
|
+
|
|
1082
1130
|
class AddQuestionButtonComponent extends CreatorModelComponent {
|
|
1083
1131
|
constructor() {
|
|
1084
1132
|
super(...arguments);
|
|
@@ -2321,7 +2369,7 @@ SurveyCreatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
2321
2369
|
QuestionDropdownDesignerComponent, QuestionDropdownAdornerDesignerComponent, QuestionImageDesignerComponent, QuestionImageAdornerDesignerComponent,
|
|
2322
2370
|
ItemValueDesignerComponent, ImageItemValueDesignerComponent, LogicOperatorComponent, MatrixCellComponent, QuestionEditorComponent, CellQuestionDropdownComponent, CreatorRowComponent, DesignerPagesComponent, DesignerSurveyComponent, CellQuestionComponent, QuestionWidgetDesignerComponent, CreatorLogoImageComponent,
|
|
2323
2371
|
QuestionRatingAdornerDesignerComponent, QuestionRatingDesignerComponent, QuestionSpinEditorComponent, ColorItemComponent, QuestionColorComponent, QuestionFileEditorComponent, AddQuestionButtonComponent, QuestionBannerComponent, JsonErrorItemComponent, QuestionTextWithResetComponent,
|
|
2324
|
-
BooleanSwitchComponent, TranslateFromAction, AddQuestionTypeSelectorComponent, QuestionElementContentComponent, PageElementContentComponent], imports: [CommonModule, FormsModule, SurveyModule], exports: [CreatorComponent, DesignerTabComponent, PageDesignerComponent, QuestionDesignerComponent, PanelDesignerComponent, TabbledMenuComponent, TabbedMenuItemComponent, TabbedMenuItemWrapperComponent, SidebarComponent, SidebarPageComponent, SidebarDefaultHeaderComponent, SidebarPropertyGridHeaderComponent, PropertyGridPlaceholderComponent, SidebarHeaderComponent, TabControlComponent, TabsComponent, TabButtonComponent, ObjectSelectorComponent, PropertyGridComponent, SearchComponent, TextareaJsonEditorComponent, AceJsonEditorComponent, LogicTabComponent, LogicAddButtonComponent, ActionButtonComponent, QuestionPgErrorComponent, SurfacePlaceholderComponent, SwitcherComponent, LinkValueQuestionComponent, EmbeddedSurveyQuestionComponent, TranslationTabComponent, TranslationSkeletonComponent, SimulatorComponent, TestTabComponent, TestAgainActionComponent, SurveyResultsComponent, SurveyResultsTableRowComponent, ThemeTabComponent,
|
|
2372
|
+
BooleanSwitchComponent, TranslateFromAction, AddQuestionTypeSelectorComponent, QuestionElementContentComponent, PageElementContentComponent, PageWrapperComponent], imports: [CommonModule, FormsModule, SurveyModule], exports: [CreatorComponent, DesignerTabComponent, PageDesignerComponent, QuestionDesignerComponent, PanelDesignerComponent, TabbledMenuComponent, TabbedMenuItemComponent, TabbedMenuItemWrapperComponent, SidebarComponent, SidebarPageComponent, SidebarDefaultHeaderComponent, SidebarPropertyGridHeaderComponent, PropertyGridPlaceholderComponent, SidebarHeaderComponent, TabControlComponent, TabsComponent, TabButtonComponent, ObjectSelectorComponent, PropertyGridComponent, SearchComponent, TextareaJsonEditorComponent, AceJsonEditorComponent, LogicTabComponent, LogicAddButtonComponent, ActionButtonComponent, QuestionPgErrorComponent, SurfacePlaceholderComponent, SwitcherComponent, LinkValueQuestionComponent, EmbeddedSurveyQuestionComponent, TranslationTabComponent, TranslationSkeletonComponent, SimulatorComponent, TestTabComponent, TestAgainActionComponent, SurveyResultsComponent, SurveyResultsTableRowComponent, ThemeTabComponent,
|
|
2325
2373
|
AdaptiveToolboxComponent, ToolboxToolComponent, ToolboxItemComponent, ToolboxItemGroupComponent, ToolboxListComponent, ToolboxCategoryComponent, StringEditorComponent, PageNavigatorComponent, PageNavigatorItemComponent,
|
|
2326
2374
|
QuestionDropdownDesignerComponent, QuestionDropdownAdornerDesignerComponent, QuestionImageDesignerComponent, QuestionImageAdornerDesignerComponent,
|
|
2327
2375
|
ItemValueDesignerComponent, ImageItemValueDesignerComponent, LogicOperatorComponent, MatrixCellComponent, QuestionEditorComponent, CellQuestionDropdownComponent, CreatorRowComponent, DesignerPagesComponent, DesignerSurveyComponent, CellQuestionComponent, QuestionWidgetDesignerComponent, CreatorLogoImageComponent,
|
|
@@ -2338,7 +2386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
2338
2386
|
QuestionDropdownDesignerComponent, QuestionDropdownAdornerDesignerComponent, QuestionImageDesignerComponent, QuestionImageAdornerDesignerComponent,
|
|
2339
2387
|
ItemValueDesignerComponent, ImageItemValueDesignerComponent, LogicOperatorComponent, MatrixCellComponent, QuestionEditorComponent, CellQuestionDropdownComponent, CreatorRowComponent, DesignerPagesComponent, DesignerSurveyComponent, CellQuestionComponent, QuestionWidgetDesignerComponent, CreatorLogoImageComponent,
|
|
2340
2388
|
QuestionRatingAdornerDesignerComponent, QuestionRatingDesignerComponent, QuestionSpinEditorComponent, ColorItemComponent, QuestionColorComponent, QuestionFileEditorComponent, AddQuestionButtonComponent, QuestionBannerComponent, JsonErrorItemComponent, QuestionTextWithResetComponent,
|
|
2341
|
-
BooleanSwitchComponent, TranslateFromAction, AddQuestionTypeSelectorComponent, QuestionElementContentComponent, PageElementContentComponent],
|
|
2389
|
+
BooleanSwitchComponent, TranslateFromAction, AddQuestionTypeSelectorComponent, QuestionElementContentComponent, PageElementContentComponent, PageWrapperComponent],
|
|
2342
2390
|
imports: [
|
|
2343
2391
|
CommonModule, FormsModule, SurveyModule
|
|
2344
2392
|
],
|