Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d003914
Add data source
May 27, 2025
662b222
Fix DataSource
May 27, 2025
4171b9f
Add images
May 28, 2025
6e5617f
Fix data
May 28, 2025
5b70134
jQuery Demo
May 29, 2025
791c21d
Fix data source and style
May 29, 2025
89509e7
Fix data source
May 29, 2025
35d900a
Fix data source
May 29, 2025
7cd1c32
Add Angular demo
May 29, 2025
6343199
Add React demo
May 30, 2025
96ef371
Add React.js demo
May 30, 2025
08bdc64
jQuery demo refactoring
May 30, 2025
0cebefa
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
May 31, 2025
53ec2c5
Add Vue demo
Jun 1, 2025
6e61884
Extract VehicleCard
Jun 1, 2025
96f754a
React refactoring
Jun 1, 2025
4349d36
React.js refactoring
Jun 1, 2025
11ed1c4
Angular refactoring
Jun 1, 2025
ea6d875
Fix linter
Jun 2, 2025
81b4333
Add fluent etalon
Jun 2, 2025
30d4f05
Add etalons
Jun 2, 2025
8a942f1
LF and EOF fix
Jun 2, 2025
994ac25
Delete etalons
Jun 2, 2025
63fd242
Fake commit
Jun 2, 2025
c9be3e7
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
Jun 2, 2025
c1c02ed
Revert "Fake commit"
Jun 2, 2025
7d8ca76
Fix comments
Jun 3, 2025
b3e472a
Use groupInterval
Jun 3, 2025
67d0f47
Horsepower fix
Jun 3, 2025
584d641
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
Jun 3, 2025
a77956d
Using nested properties
Jun 3, 2025
259d7be
Fix css
Jun 3, 2025
8223730
Prettier
Jun 3, 2025
29d6673
Refactoring
Jun 3, 2025
3bcd657
Refactoring
Jun 3, 2025
ffdb827
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
Jun 4, 2025
3d81576
Angular: Get formatted Price field
Jun 4, 2025
6412835
jQuery: Get formatted Price field
Jun 4, 2025
5aceecf
React: Get formatted Price field
Jun 4, 2025
cd1878a
Vue: Get formatted Price field
Jun 4, 2025
9214651
Fix Vue demo
Jun 4, 2025
9158ab7
Fix prettier Angular
Jun 4, 2025
96d8dd8
Update etalons
Jun 4, 2025
ee4be91
Moving getFormattedPrice outside the App
Jun 4, 2025
381f5c1
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
Jun 6, 2025
72f7406
Formatting
Jun 6, 2025
8a77465
fix(CardView demos): resolve formatting issues
wdevfx Jun 9, 2025
c926010
Merge branch '25_1' of github.com:DevExpress/DevExtreme into CardView…
Jun 10, 2025
3b21ade
Merge branch 'CardView_Card_template_demo_25_1' of github.com:Raushen…
Jun 10, 2025
773b3ed
Fix type
Jun 10, 2025
341ce68
Template refactoring
Jun 10, 2025
8e61b43
Refactoring
Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
<dx-card-view id="cardView" [dataSource]="customers" keyExpr="ID">
<dxi-card-view-column
*ngFor="let column of columns"
[dataField]="column"
></dxi-card-view-column>
<dx-card-view
[dataSource]="vehicles"
cardsPerRow="auto"
[cardMinWidth]="260"
cardTemplate="vehicleCardTemplate"
>
<dxo-card-view-header-filter [visible]="true"></dxo-card-view-header-filter>
<dxo-card-view-search-panel [visible]="true"></dxo-card-view-search-panel>
<dxo-card-view-paging [pageSize]="12"></dxo-card-view-paging>

<dxi-card-view-column dataField="TrademarkName"></dxi-card-view-column>
<dxi-card-view-column dataField="Name"></dxi-card-view-column>
<dxi-card-view-column dataField="Price" format="currency">
<dxo-card-view-column-header-filter
[groupInterval]="20000"
></dxo-card-view-column-header-filter>
</dxi-card-view-column>
<dxi-card-view-column dataField="CategoryName"></dxi-card-view-column>
<dxi-card-view-column dataField="Modification"></dxi-card-view-column>
<dxi-card-view-column dataField="BodyStyleName"></dxi-card-view-column>
<dxi-card-view-column dataField="Horsepower"></dxi-card-view-column>

<div *dxTemplate="let model of 'vehicleCardTemplate'">
<ng-container *ngIf="model.card?.data as data">
<vehicle-card
[id]="data.ID"
[model]="data.TrademarkName + ' ' + data.Name"
[price]="getFormattedPrice(model.card)"
[categoryName]="data.CategoryName"
[modification]="data.Modification"
[bodyStyleName]="data.BodyStyleName"
[horsepower]="data.Horsepower"
(showInfo)="showInfo(data)"
></vehicle-card>
</ng-container>
</div>
</dx-card-view>

<dx-popup
[width]="350"
[height]="240"
[(visible)]="popupVisible"
[dragEnabled]="false"
[hideOnOutsideClick]="true"
title="Image Info"
>
<dxo-position at="center" my="center" collision="fit"></dxo-position>
<div *dxTemplate="let _ of 'content'">
<license-info
*ngIf="currentVehicle"
[vehicle]="currentVehicle"
></license-info>
</div>
</dx-popup>
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { NgModule, Component, enableProdMode } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { DxCardViewModule } from 'devextreme-angular';
import { Customer, Service } from './app.service';
import {
DxButtonModule,
DxCardViewModule,
DxPopupModule,
DxTemplateModule,
} from 'devextreme-angular';
import { CardInfo } from 'devextreme-angular/ui/card-view';
import { Service, Vehicle } from './app.service';
import { VehicleCard } from './vehicle-card/vehicle-card.component';
import { LicenseInfo } from './license-info/license-info.component';

if (!/localhost/.test(document.location.host)) {
enableProdMode();
Expand All @@ -20,21 +28,39 @@ if (window && window.config?.packageConfigPaths) {
providers: [Service],
})
export class AppComponent {
customers: Customer[];
vehicles: Vehicle[];

columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax'];
popupVisible = false;
currentVehicle: Vehicle | null = null;

constructor(service: Service) {
this.customers = service.getCustomers();
this.vehicles = service.getVehicles();
}

showInfo(vehicle: Vehicle) {
this.currentVehicle = vehicle;
this.popupVisible = true;
}

hideInfo() {
this.popupVisible = false;
Comment thread
Raushen marked this conversation as resolved.
}
Comment thread
wdevfx marked this conversation as resolved.

getFormattedPrice(card: CardInfo): string {
const priceText = card.fields.find(f => f?.column?.dataField === 'Price');
return priceText?.text ?? '';
}
}

@NgModule({
imports: [
BrowserModule,
DxTemplateModule,
DxCardViewModule,
DxPopupModule,
DxButtonModule,
],
declarations: [AppComponent],
declarations: [AppComponent, VehicleCard, LicenseInfo],
bootstrap: [AppComponent],
})
export class AppModule { }
Expand Down
Loading
Loading