Skip to content

Commit e1ae337

Browse files
WIP. remake Diagram with popup demo for using standalone
1 parent 1bcf845 commit e1ae337

2 files changed

Lines changed: 52 additions & 23 deletions

File tree

apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
customShapeToolboxTemplate="customShapeToolboxTemplate"
66
(onRequestLayoutUpdate)="requestLayoutUpdateHandler($event)"
77
>
8-
<dxi-custom-shape
8+
<dxi-diagram-custom-shape
99
type="employee"
1010
baseType="rectangle"
1111
category="employee"
@@ -19,7 +19,7 @@
1919
[maxHeight]="2"
2020
[allowEditText]="false"
2121
>
22-
</dxi-custom-shape>
22+
</dxi-diagram-custom-shape>
2323
<svg *dxTemplate="let item of 'customShapeTemplate'" class="template">
2424
<text class="template-name" x="50%" y="20%">
2525
{{ item.dataItem ? item.dataItem.Full_Name : "Employee's Name" }}
@@ -48,32 +48,32 @@
4848
<text x="50%" y="40%">New</text>
4949
<text x="50%" y="70%">Employee</text>
5050
</svg>
51-
<dxo-nodes
51+
<dxo-diagram-nodes
5252
[dataSource]="dataSource"
5353
keyExpr="ID"
5454
[typeExpr]="itemTypeExpr"
5555
[customDataExpr]="itemCustomDataExpr"
5656
parentKeyExpr="Head_ID"
5757
>
58-
<dxo-auto-layout type="tree"></dxo-auto-layout>
59-
</dxo-nodes>
60-
<dxo-context-toolbox [width]="100" [shapeIconsPerRow]="1">
61-
</dxo-context-toolbox>
62-
<dxo-toolbox [showSearch]="false" [shapeIconsPerRow]="1">
63-
<dxi-group
58+
<dxo-diagram-auto-layout type="tree"></dxo-diagram-auto-layout>
59+
</dxo-diagram-nodes>
60+
<dxo-diagram-context-toolbox [width]="100" [shapeIconsPerRow]="1">
61+
</dxo-diagram-context-toolbox>
62+
<dxo-diagram-toolbox [showSearch]="false" [shapeIconsPerRow]="1">
63+
<dxi-diagram-toolbox-group
6464
category="employee"
6565
title="Employee"
6666
[expanded]="true"
67-
></dxi-group>
68-
</dxo-toolbox>
69-
<dxo-properties-panel>
70-
<dxi-tab>
71-
<dxi-group
67+
></dxi-diagram-toolbox-group>
68+
</dxo-diagram-toolbox>
69+
<dxo-diagram-properties-panel>
70+
<dxi-diagram-tab>
71+
<dxi-diagram-tab-group
7272
title="Page Properties"
7373
[commands]="['pageSize', 'pageOrientation', 'pageColor']"
74-
></dxi-group>
75-
</dxi-tab>
76-
</dxo-properties-panel>
74+
></dxi-diagram-tab-group>
75+
</dxi-diagram-tab>
76+
</dxo-diagram-properties-panel>
7777
</dx-diagram>
7878

7979
<dx-popup

apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,26 @@ import { BrowserModule } from '@angular/platform-browser';
55
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
66

77
import {
8-
DxPopupModule, DxTemplateModule, DxDiagramModule, DxDiagramComponent, DxTextBoxModule, DxButtonModule,
8+
DxPopupComponent,
9+
DxTemplateDirective,
10+
DxIntegrationModule,
11+
DxTextBoxComponent,
12+
DxButtonComponent,
913
} from 'devextreme-angular';
14+
15+
import {
16+
DxDiagramComponent,
17+
DxiDiagramCustomShapeComponent,
18+
DxoDiagramNodesComponent,
19+
DxoDiagramAutoLayoutComponent,
20+
DxoDiagramContextToolboxComponent,
21+
DxoDiagramToolboxComponent,
22+
DxoDiagramPropertiesPanelComponent,
23+
DxiDiagramTabComponent,
24+
DxiDiagramToolboxGroupComponent,
25+
DxiDiagramTabGroupComponent,
26+
} from 'devextreme-angular/ui/diagram';
27+
1028
import { ArrayStore } from 'devextreme-angular/common/data';
1129
import { Service, Employee } from './app.service';
1230

@@ -121,12 +139,23 @@ export class AppComponent {
121139

122140
@NgModule({
123141
imports: [
142+
DxPopupComponent,
124143
BrowserModule,
125-
DxDiagramModule,
126-
DxPopupModule,
127-
DxTextBoxModule,
128-
DxButtonModule,
129-
DxTemplateModule,
144+
DxDiagramComponent,
145+
DxiDiagramCustomShapeComponent,
146+
DxoDiagramNodesComponent,
147+
DxoDiagramAutoLayoutComponent,
148+
DxoDiagramContextToolboxComponent,
149+
DxoDiagramToolboxComponent,
150+
DxoDiagramPropertiesPanelComponent,
151+
DxiDiagramTabComponent,
152+
DxiDiagramTabGroupComponent,
153+
DxiDiagramToolboxGroupComponent,
154+
DxPopupComponent,
155+
DxTemplateDirective,
156+
DxIntegrationModule,
157+
DxTextBoxComponent,
158+
DxButtonComponent,
130159
],
131160
declarations: [AppComponent],
132161
bootstrap: [AppComponent],

0 commit comments

Comments
 (0)