-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work for #3390: implement creator component
- Loading branch information
Showing
7 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 55 additions & 4 deletions
59
packages/survey-creator-angular/src/creator.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,55 @@ | ||
<div> | ||
Creator ! | ||
<survey [model]="survey"></survey> | ||
</div> | ||
<ng-container *ngIf="!creator.isCreatorDisposed"> | ||
<div class="svc-creator" [class.svc-creator--mobile]="creator.isMobileView"> | ||
<div> | ||
<!-- ko component: { name: 'svc-svg-bundle'} --> | ||
<!-- /ko --> | ||
</div> | ||
<div class="svc-full-container svc-creator__area svc-flex-column" | ||
[class.svc-creator__area--with-banner]="!creator.haveCommercialLicense"> | ||
<div class="svc-flex-row svc-full-container" | ||
[class.svc-creator__side-bar--left]="creator.sidebarLocation == 'left'"> | ||
<div class="svc-flex-column svc-flex-row__element svc-flex-row__element--growing"> | ||
<div class="svc-top-bar"> | ||
<div class="svc-tabbed-menu-wrapper" [visible]="creator.showTabs"> | ||
<span>TODO TABBED MENU</span> | ||
<!-- ko component: { name: 'svc-tabbed-menu', params: { model: creator.tabbedMenu } } --> | ||
<!-- /ko --> | ||
</div> | ||
<div *ngIf="creator.showToolbar" class="svc-toolbar-wrapper" [visible]="creator.showToolbar"> | ||
<sv-action-bar [model]="creator.toolbar"></sv-action-bar> | ||
</div> | ||
</div> | ||
<div class="svc-creator__content-wrapper svc-flex-row" | ||
[class.svc-creator__content-wrapper--footer-toolbar]="creator.isMobileView"> | ||
<div class="svc-creator__content-holder svc-flex-column"> | ||
<ng-container *ngFor="let tab of creator.tabs"> | ||
<div class="svc-creator-tab" *ngIf="creator.viewType == tab.id && tab.visible" | ||
[attr.id]="'scrollableDiv-' + tab.id" [class.svc-creator__toolbox--right]="creator.toolboxLocation == 'right'"> | ||
<ng-template [component]="{ name: tab.componentContent, data: { model: tab.data.model } }"></ng-template> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div *ngIf="creator.isMobileView" class="svc-footer-bar"> | ||
<div class="svc-toolbar-wrapper" [visible]="creator.isMobileView"> | ||
<sv-action-bar [model: creator.footerToolbar]></sv-action-bar> | ||
</div> | ||
</div> | ||
</div> | ||
<div *ngIf="creator.sidebar" [class.sv-mobile-side-bar]="creator.isMobileView"> | ||
<span>TODO implement sidebar</span> | ||
<!-- <svc-side-bar params="model: creator.sidebar"> </svc-side-bar> --> | ||
</div> | ||
</div> | ||
<div class="svc-creator__banner" *ngIf="!creator.haveCommercialLicense"> | ||
<span class="svc-creator__non-commercial-text"> | ||
<a href="https://surveyjs.io/buy"> | ||
{{creator.licenseText}} | ||
</a> | ||
</span> | ||
</div> | ||
<!-- ko component: { name: 'svc-notifier', params: { creator: creator, notifier: creator.notifier } } --> | ||
<!-- /ko --> | ||
</div> | ||
</div> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/survey-creator-angular/src/tabs/designer.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ng-template #template> | ||
<div class="svc-tab-designer" [class]="model.getRootCss()" (click)="model.clickDesigner()"> | ||
TODO implement designer tab | ||
</div> | ||
</ng-template> |
22 changes: 22 additions & 0 deletions
22
packages/survey-creator-angular/src/tabs/designer.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component, Input } from "@angular/core"; | ||
import { AngularComponentFactory, BaseAngular } from "survey-angular-ui"; | ||
import { TabDesignerViewModel } from "survey-creator-core"; | ||
|
||
@Component({ | ||
selector: "svc-tab-designer", | ||
templateUrl: "./designer.component.html", | ||
styles: [":host { display: none; }"] | ||
}) | ||
export class DesignerTabComponent extends BaseAngular<TabDesignerViewModel> { | ||
@Input() model!: TabDesignerViewModel; | ||
public get survey() { | ||
return this.creator.survey; | ||
} | ||
public get creator() { | ||
return this.model.creator; | ||
} | ||
protected getModel(): TabDesignerViewModel { | ||
return this.model; | ||
} | ||
} | ||
AngularComponentFactory.Instance.registerComponent("svc-tab-designer", DesignerTabComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ ko.components.register("svc-tab-designer", { | |
}, | ||
template: template | ||
}); | ||
|