Skip to content

Commit 7b0d86a

Browse files
merge
2 parents f2e8947 + c14956b commit 7b0d86a

2,948 files changed

Lines changed: 22545 additions & 6534 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/demos/Demos/Autocomplete/Overview/Angular/app/app.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
44
import { HttpClient, HttpClientModule, HttpParams } from '@angular/common/http';
55
import { lastValueFrom } from 'rxjs';
66
import { DxAutocompleteModule, DxTemplateModule } from 'devextreme-angular';
7-
import CustomStore from 'devextreme/data/custom_store';
8-
import ODataStore from 'devextreme/data/odata/store';
7+
import { CustomStore, ODataStore } from 'devextreme-angular/common/data';
98
import { Service } from './app.service';
109

1110
if (!/localhost/.test(document.location.host)) {

apps/demos/Demos/Autocomplete/Overview/React/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useCallback, useState } from 'react';
2-
import ODataStore from 'devextreme/data/odata/store';
2+
import { ODataStore, CustomStore } from 'devextreme-react/common/data';
33
import { Autocomplete, type AutocompleteTypes } from 'devextreme-react/autocomplete';
4-
import CustomStore from 'devextreme/data/custom_store';
54
import 'whatwg-fetch';
65
import { names, surnames, positions } from './data.ts';
76

apps/demos/Demos/Autocomplete/Overview/ReactJs/App.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useCallback, useState } from 'react';
2-
import ODataStore from 'devextreme/data/odata/store';
2+
import { ODataStore, CustomStore } from 'devextreme-react/common/data';
33
import { Autocomplete } from 'devextreme-react/autocomplete';
4-
import CustomStore from 'devextreme/data/custom_store';
54
import 'whatwg-fetch';
65
import { names, surnames, positions } from './data.js';
76

apps/demos/Demos/Autocomplete/Overview/Vue/App.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@
9696
</template>
9797
<script setup lang="ts">
9898
import { ref } from 'vue';
99-
import ODataStore from 'devextreme/data/odata/store';
99+
import { ODataStore, CustomStore, type LoadOptions } from 'devextreme-vue/common/data';
100100
import { DxAutocomplete } from 'devextreme-vue/autocomplete';
101-
import { type LoadOptions } from 'devextreme-vue/common/data';
102-
import CustomStore from 'devextreme/data/custom_store';
103101
import 'whatwg-fetch';
104102
import { names, surnames, positions } from './data.ts';
105103

apps/demos/Demos/Autocomplete/Overview/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $(() => {
9494
});
9595

9696
function updateEmployeeInfo() {
97-
let result = $.trim(`${firstName || ''} ${lastName || ''}`);
97+
let result = `${firstName || ''} ${lastName || ''}`.trim();
9898

9999
result += (result && position) ? (`, ${position}`) : position || '';
100100
result += (result && state) ? (`, ${state}`) : state || '';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<dx-card-view id="cardView" [dataSource]="customers" keyExpr="ID">
2+
<dxi-card-view-column
3+
*ngFor="let column of columns"
4+
[dataField]="column"
5+
></dxi-card-view-column>
6+
</dx-card-view>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { NgModule, Component, enableProdMode } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4+
import { DxCardViewModule } from 'devextreme-angular';
5+
import { Customer, Service } from './app.service';
6+
7+
if (!/localhost/.test(document.location.host)) {
8+
enableProdMode();
9+
}
10+
11+
let modulePrefix = '';
12+
// @ts-ignore
13+
if (window && window.config?.packageConfigPaths) {
14+
modulePrefix = '/app';
15+
}
16+
17+
@Component({
18+
selector: 'demo-app',
19+
templateUrl: `.${modulePrefix}/app.component.html`,
20+
providers: [Service],
21+
})
22+
export class AppComponent {
23+
customers: Customer[];
24+
25+
columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax'];
26+
27+
constructor(service: Service) {
28+
this.customers = service.getCustomers();
29+
}
30+
}
31+
32+
@NgModule({
33+
imports: [
34+
BrowserModule,
35+
DxCardViewModule,
36+
],
37+
declarations: [AppComponent],
38+
bootstrap: [AppComponent],
39+
})
40+
export class AppModule { }
41+
42+
platformBrowserDynamic().bootstrapModule(AppModule);
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
import { Injectable } from '@angular/core';
2+
3+
export interface Customer {
4+
ID: number;
5+
CompanyName: string;
6+
Address: string;
7+
City: string;
8+
State: string;
9+
Zipcode: number;
10+
Phone: string;
11+
Fax: string;
12+
}
13+
14+
const customers: Customer[] = [{
15+
ID: 1,
16+
CompanyName: 'Super Mart of the West',
17+
Address: '702 SW 8th Street',
18+
City: 'Bentonville',
19+
State: 'Arkansas',
20+
Zipcode: 72716,
21+
Phone: '(800) 555-2797',
22+
Fax: '(800) 555-2171',
23+
}, {
24+
ID: 2,
25+
CompanyName: 'Electronics Depot',
26+
Address: '2455 Paces Ferry Road NW',
27+
City: 'Atlanta',
28+
State: 'Georgia',
29+
Zipcode: 30339,
30+
Phone: '(800) 595-3232',
31+
Fax: '(800) 595-3231',
32+
}, {
33+
ID: 3,
34+
CompanyName: 'K&S Music',
35+
Address: '1000 Nicllet Mall',
36+
City: 'Minneapolis',
37+
State: 'Minnesota',
38+
Zipcode: 55403,
39+
Phone: '(612) 304-6073',
40+
Fax: '(612) 304-6074',
41+
}, {
42+
ID: 4,
43+
CompanyName: "Tom's Club",
44+
Address: '999 Lake Drive',
45+
City: 'Issaquah',
46+
State: 'Washington',
47+
Zipcode: 98027,
48+
Phone: '(800) 955-2292',
49+
Fax: '(800) 955-2293',
50+
}, {
51+
ID: 5,
52+
CompanyName: 'E-Mart',
53+
Address: '3333 Beverly Rd',
54+
City: 'Hoffman Estates',
55+
State: 'Illinois',
56+
Zipcode: 60179,
57+
Phone: '(847) 286-2500',
58+
Fax: '(847) 286-2501',
59+
}, {
60+
ID: 6,
61+
CompanyName: 'Walters',
62+
Address: '200 Wilmot Rd',
63+
City: 'Deerfield',
64+
State: 'Illinois',
65+
Zipcode: 60015,
66+
Phone: '(847) 940-2500',
67+
Fax: '(847) 940-2501',
68+
}, {
69+
ID: 7,
70+
CompanyName: 'StereoShack',
71+
Address: '400 Commerce S',
72+
City: 'Fort Worth',
73+
State: 'Texas',
74+
Zipcode: 76102,
75+
Phone: '(817) 820-0741',
76+
Fax: '(817) 820-0742',
77+
}, {
78+
ID: 8,
79+
CompanyName: 'Circuit Town',
80+
Address: '2200 Kensington Court',
81+
City: 'Oak Brook',
82+
State: 'Illinois',
83+
Zipcode: 60523,
84+
Phone: '(800) 955-2929',
85+
Fax: '(800) 955-9392',
86+
}, {
87+
ID: 9,
88+
CompanyName: 'Premier Buy',
89+
Address: '7601 Penn Avenue South',
90+
City: 'Richfield',
91+
State: 'Minnesota',
92+
Zipcode: 55423,
93+
Phone: '(612) 291-1000',
94+
Fax: '(612) 291-2001',
95+
}, {
96+
ID: 10,
97+
CompanyName: 'ElectrixMax',
98+
Address: '263 Shuman Blvd',
99+
City: 'Naperville',
100+
State: 'Illinois',
101+
Zipcode: 60563,
102+
Phone: '(630) 438-7800',
103+
Fax: '(630) 438-7801',
104+
}, {
105+
ID: 11,
106+
CompanyName: 'Video Emporium',
107+
Address: '1201 Elm Street',
108+
City: 'Dallas',
109+
State: 'Texas',
110+
Zipcode: 75270,
111+
Phone: '(214) 854-3000',
112+
Fax: '(214) 854-3001',
113+
}, {
114+
ID: 12,
115+
CompanyName: 'Screen Shop',
116+
Address: '1000 Lowes Blvd',
117+
City: 'Mooresville',
118+
State: 'North Carolina',
119+
Zipcode: 28117,
120+
Phone: '(800) 445-6937',
121+
Fax: '(800) 445-6938',
122+
}];
123+
124+
@Injectable()
125+
export class Service {
126+
getCustomers() {
127+
return customers;
128+
}
129+
}

apps/demos/Demos/Charts/APIDisplayATooltip/Angular/index.html renamed to apps/demos/Demos/CardView/CardTemplate/Angular/index.html

File renamed without changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import CardView, { Column } from 'devextreme-react/card-view';
3+
import { customers } from './data.ts';
4+
5+
const columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax'];
6+
7+
const App = () => (
8+
<CardView
9+
dataSource={customers}
10+
keyExpr="ID"
11+
>
12+
{ columns.map((column, index) => <Column dataField={column} key={index} />) }
13+
</CardView>
14+
);
15+
16+
export default App;

0 commit comments

Comments
 (0)