Skip to content

demo fixes #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 67 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
93d66a3
fix: GanttChart methods demo
Svetoslavb04 Feb 10, 2023
2d14456
feat: GanttChart Methods demo up pacakge
Svetoslavb04 Feb 10, 2023
be6a8df
fix: GanttChart Sorting demo
Svetoslavb04 Feb 10, 2023
b00420b
fix: GanttChart Task Connections demo
Svetoslavb04 Feb 10, 2023
6807b94
feat: GanttChart Task Connections demo up package
Svetoslavb04 Feb 10, 2023
73d2fc9
fix: GanttChart Resource Timeline View demo
Svetoslavb04 Feb 10, 2023
9a4df4f
fix: GanttChart Resource View demo
Svetoslavb04 Feb 10, 2023
fcbc744
fix: Kanban Custom Data Fields demo
Svetoslavb04 Feb 10, 2023
d95de00
feat: Kanban Custom Task Styling up package
Svetoslavb04 Feb 16, 2023
17dbf70
feat: Kanban Custom Styling up package
Svetoslavb04 Feb 16, 2023
74448cd
feat: Kanban Custom Task Edit Window up package
Svetoslavb04 Feb 16, 2023
933bbd6
Merge branch 'HTMLElements:master' into origin/fix-demos
SvetoslavjQWidgets Feb 16, 2023
8062545
fix: Kanban Custom Styling demo
Svetoslavb04 Feb 16, 2023
b7b5151
feat: fix Kanban Custom Styling demo
Svetoslavb04 Feb 16, 2023
68c7ab9
feat: fix Kanban Custom Styling demo
Svetoslavb04 Feb 16, 2023
3638bee
fix: Kanban Custom Styling
Svetoslavb04 Feb 16, 2023
b2a44e0
fix: Kanban Custom Task Edit Window
Svetoslavb04 Feb 16, 2023
c3fa7fd
fix: Kanban Custom Window Editors
Svetoslavb04 Feb 16, 2023
eaa33fe
fix: Kanban Custom Column Width
Svetoslavb04 Feb 16, 2023
5c5b7bf
fix: Kanban Column Width
Svetoslavb04 Feb 16, 2023
d90037d
fix
Svetoslavb04 Feb 16, 2023
c3b2d7a
fix
Svetoslavb04 Feb 16, 2023
7b83797
fix: Kanban Many Tasks demo
Svetoslavb04 Feb 16, 2023
9f9f8d3
fix: Kanban Subtasks demo
Svetoslavb04 Feb 16, 2023
1a56184
fix: Kanban Task Template
Svetoslavb04 Feb 16, 2023
eb39daa
fix: Kanban User Privileges demo
Svetoslavb04 Feb 16, 2023
4f19d44
fix: Kanban Custom Task Window Editors
Svetoslavb04 Feb 16, 2023
4136080
refactor: clear undefined props
Svetoslavb04 Feb 17, 2023
a96d997
fix: Kanban Server Side CRUD demo
Svetoslavb04 Feb 17, 2023
5e439ed
fix: PivotTable Empty Cells Settings demo
Svetoslavb04 Feb 17, 2023
329f783
fix: PivotTable Cells Settings Demo
Svetoslavb04 Feb 17, 2023
04af5de
fix: PivotTable Server Side CRUD demo
Svetoslavb04 Feb 17, 2023
64d9edb
fix: CardView Settings demo
Svetoslavb04 Feb 17, 2023
5dbf161
fix: CardView Settings demo
Svetoslavb04 Feb 17, 2023
f272466
fix: CardView Settings demo
Svetoslavb04 Feb 17, 2023
f258d6d
fix: DockingLayout Overview
Svetoslavb04 Feb 17, 2023
885e2df
fix: DockingLayout Insert Before After Item demo
Svetoslavb04 Feb 17, 2023
88e9f11
fix: DockingLayout State demo
Svetoslavb04 Feb 17, 2023
85d1c00
fix
Svetoslavb04 Feb 17, 2023
fc97374
fix: DockingLayout State demo
Svetoslavb04 Feb 20, 2023
a4e0a54
fix: Framework Reactive Forms with Input demo
Svetoslavb04 Feb 20, 2023
d260f11
fix: Framework Reactive Forms with Input
Svetoslavb04 Feb 20, 2023
2c8584b
fix: Framework Form Validation demo
Svetoslavb04 Feb 20, 2023
e270e98
fix: Framework Form Validation with NumericTextBox demo
Svetoslavb04 Feb 20, 2023
c4f84df
fix: Framework Dynamic Forms demo
Svetoslavb04 Feb 20, 2023
cbfc934
fix: Fix Framework Angular Service with Toast demo
Svetoslavb04 Feb 20, 2023
3a2d760
fix: Framework Angular Component in Grid Column
Svetoslavb04 Feb 20, 2023
159cdf8
fix: Framework Angular HTTP CRUD with Grid demo
Svetoslavb04 Feb 20, 2023
d16f8de
fix: Framework Grid Layout System demo
Svetoslavb04 Feb 20, 2023
55404db
fix: Framework Spacing demo
Svetoslavb04 Feb 20, 2023
7c39ea2
fix: Framework Stack Layout Gaps demo
Svetoslavb04 Feb 22, 2023
d6a717f
fix: Framework Stack Layout Overview demo
Svetoslavb04 Feb 22, 2023
398aef2
Update app.component.ts
Svetoslavb04 Feb 22, 2023
ad11ef0
fix: Stack Layout Stretch demo
Svetoslavb04 Feb 22, 2023
8615557
Update app.component.ts
Svetoslavb04 Feb 22, 2023
9f23e5b
fix: Stack Layout Uneven Stretch demo
Svetoslavb04 Feb 22, 2023
de0d87f
Update app.module.ts
Svetoslavb04 Feb 22, 2023
f77cc5e
fix: Chart Waterfall series demo
Svetoslavb04 Feb 23, 2023
2b36119
fix: Chart Waterfall Multiple Series
Svetoslavb04 Feb 23, 2023
c9ad671
fix: Chart Polar Series Bands demo
Svetoslavb04 Feb 23, 2023
cdc27d0
fix: Chart Scatter demo
Svetoslavb04 Feb 23, 2023
60f2a71
fix: Chart Color Schemes demo
Svetoslavb04 Feb 24, 2023
3649f99
fix: Styling and Appearance Chart Background Image demo
Svetoslavb04 Feb 24, 2023
32d4e12
fix: Chart Custom Styling demo
Svetoslavb04 Feb 24, 2023
aeb627b
fix: Chart Methods demo
Svetoslavb04 Feb 24, 2023
e618ab1
fix: Color Panel Overview
Svetoslavb04 Feb 24, 2023
36bd749
Merge branch 'master' into origin/fix-demos
bmarkov Feb 27, 2023
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
34 changes: 15 additions & 19 deletions demos/cardview/settings/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
<div class="options" style="position: absolute; right: 10px;">
<smart-check-box #collapsible id="collapsible" [checked]="true"
>Collapsible cards</smart-check-box
>
<smart-check-box #icons id="icons" [checked]="true">Icons</smart-check-box>
<smart-check-box id="collapsible" [checked]="true" (onChange)="handleCollapsibleChange($event)">Collapsible
cards</smart-check-box>
<smart-check-box id="icons" [checked]="true" (onChange)="handleIconsChange()">Icons</smart-check-box>
<div>
<p>Cell orientation:</p>
<smart-radio-button #horizontal id="horizontal" [checked]="true"
>horizontal</smart-radio-button
>
<smart-radio-button #vertical id="vertical">vertical</smart-radio-button>
<smart-radio-button id="horizontal" [checked]="true"
(onChange)="handleCellsOrientationChange('horizontal')">horizontal</smart-radio-button>
<smart-radio-button id="vertical"
(onChange)="handleCellsOrientationChange('vertical')">vertical</smart-radio-button>
</div>
<div>
<p>Cover mode:</p>
<smart-radio-button #crop id="crop" [checked]="true"
>crop</smart-radio-button
>
<smart-radio-button #fit id="fit">fit</smart-radio-button>
<smart-radio-button id="crop" [checked]="true"
(onChange)="handleImageCoverModeChange('crop')">crop</smart-radio-button>
<smart-radio-button id="fit" (onChange)="handleImageCoverModeChange('fit')">fit</smart-radio-button>
</div>
<p>Title:</p>
<smart-drop-down-list
#titleField
id="titleField"
data-source='["First name", "Last name", "Pet name"]'
selected-indexes="[0]"
></smart-drop-down-list>
<smart-drop-down-list #titleFieldComponent id="titleField" data-source='["First name", "Last name", "Pet name"]'
selected-indexes="[0]"></smart-drop-down-list>
</div>
<smart-card-view #cardview id="cardView"></smart-card-view>
<smart-card-view #cardview id="cardView" [dataSource]="dataSource" [columns]="columns"
[cellOrientation]="cellOrientation" [collapsible]="collapsible" [coverField]="coverField"
[titleField]="titleField"></smart-card-view>
259 changes: 120 additions & 139 deletions demos/cardview/settings/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,139 @@
import { Component, ViewChild, OnInit, AfterViewInit } from "@angular/core";
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from "@angular/core";
import {
CardViewComponent,
Smart
} from "@smart-webcomponents-angular/cardview";
import { CheckBoxComponent } from "@smart-webcomponents-angular/checkbox";
import { DropDownListComponent } from "@smart-webcomponents-angular/dropdownlist";
import { RadioButtonComponent } from "@smart-webcomponents-angular/radiobutton";

@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
styleUrls: ["./app.component.css"],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements AfterViewInit, OnInit {
@ViewChild("cardview", { read: CardViewComponent, static: false })
cardview: CardViewComponent;
@ViewChild("collapsible", { read: CheckBoxComponent, static: false })
collapsible: CheckBoxComponent;
@ViewChild("icons", { read: CheckBoxComponent, static: false })
icons: CheckBoxComponent;
@ViewChild("titleField", { read: DropDownListComponent, static: false })
titleField: DropDownListComponent;
@ViewChild("horizontal", { read: RadioButtonComponent, static: false })
horizontal: RadioButtonComponent;
@ViewChild("vertical", { read: RadioButtonComponent, static: false })
vertical: RadioButtonComponent;
@ViewChild("crop", { read: RadioButtonComponent, static: false })
crop: RadioButtonComponent;
@ViewChild("fit", { read: RadioButtonComponent, static: false })
fit: RadioButtonComponent;
cardview!: CardViewComponent;
@ViewChild("titleFieldComponent", { read: DropDownListComponent, static: false })
titleFieldComponent!: DropDownListComponent;

photoFormatFunction(settings) {
dataSource = new Smart.DataAdapter({
dataSource: this.sampleData,
dataFields: [
"firstName: string",
"lastName: string",
"birthday: date",
"petName: string",
"productName: string",
"price: number",
"quantity: number",
"timeOfPurchase: date",
"travelPhotos: string",
"contactPhotos: string"
]
});

columns = [
{ label: "First Name", dataField: "firstName", icon: "firstName" },
{ label: "Last Name", dataField: "lastName", icon: "lastName" },
{
label: "Birthday",
dataField: "birthday",
icon: "birthday",
formatSettings: { formatString: "d" }
},
{ label: "Pet Name", dataField: "petName", icon: "petName" },
{ label: "Product Name", dataField: "productName", icon: "productName" },
{
label: "Price",
dataField: "price",
icon: "price",
formatSettings: { formatString: "c2" }
},
{
label: "Quantity",
dataField: "quantity",
icon: "quantity",
formatFunction: function (settings: any) {
const value = settings.value;
let className;
if (value < 20) {
className = "red";
} else if (value < 35) {
className = "yellow";
} else {
className = "green";
}
settings.template = `<div class="${className}">${value}</div>`;
}
},
{
label: "Time of Purchase",
dataField: "timeOfPurchase",
icon: "timeOfPurchase",
formatSettings: { formatString: "hh:mm tt" }
},
{
label: "Travel photos",
dataField: "travelPhotos",
icon: "photo",
formatFunction: this.photoFormatFunction,
image: true
},
{
label: "Contact photos",
dataField: "contactPhotos",
icon: "photo",
formatFunction: this.photoFormatFunction,
image: true
}
];

cellOrientation = "horizontal";
collapsible = true;
coverField = "travelPhotos";
titleField = "firstName";

photoFormatFunction(settings: any) {
const photoList = settings.value.split(",");
let htmlResult = "";
photoList.forEach(photoUrl => {
photoList.forEach((photoUrl: string) => {
htmlResult += `<img class="thumb" src="${photoUrl}" />`;
});
settings.template = htmlResult;
}

handleCollapsibleChange(event: CustomEvent) {
this.cardview.collapsible = event.detail.value;
}

handleIconsChange() {
this.cardview.nativeElement.classList.toggle("disabled-icons");
}

handleCellsOrientationChange(orientation: string) {
this.cardview.cellOrientation = orientation;
}

handleImageCoverModeChange(mode: string) {
this.cardview.coverMode = mode;
}

handleTitleChange(event: CustomEvent) {

switch (event.detail.index) {
case 0:
this.cardview.titleField = "firstName";
break;
case 1:
this.cardview.titleField = "lastName";
break;
case 2:
this.cardview.titleField = "petName";
break;
}
}

ngOnInit(): void {
// onInit code.
}
Expand Down Expand Up @@ -165,8 +260,7 @@ export class AppComponent implements AfterViewInit, OnInit {
`https://htmlelements.com/demos/images/travel/${Math.floor(Math.random() * 36) + 1}.jpg`
);
row.contactPhotos.push(
`https://htmlelements.com/demos/images/phonebook/${
contactImages[Math.floor(Math.random() * contactImages.length)]
`https://htmlelements.com/demos/images/phonebook/${contactImages[Math.floor(Math.random() * contactImages.length)]
}`
);
}
Expand All @@ -177,123 +271,10 @@ export class AppComponent implements AfterViewInit, OnInit {

return sampleData;
}

init(): void {
// init code.
const that = this;

that.cardview.dataSource = new Smart.DataAdapter({
dataSource: that.sampleData,
dataFields: [
"firstName: string",
"lastName: string",
"birthday: date",
"petName: string",
"productName: string",
"price: number",
"quantity: number",
"timeOfPurchase: date",
"travelPhotos: string",
"contactPhotos: string"
]
});

that.cardview.columns = [
{ label: "First Name", dataField: "firstName", icon: "firstName" },
{ label: "Last Name", dataField: "lastName", icon: "lastName" },
{
label: "Birthday",
dataField: "birthday",
icon: "birthday",
formatSettings: { formatString: "d" }
},
{ label: "Pet Name", dataField: "petName", icon: "petName" },
{ label: "Product Name", dataField: "productName", icon: "productName" },
{
label: "Price",
dataField: "price",
icon: "price",
formatSettings: { formatString: "c2" }
},
{
label: "Quantity",
dataField: "quantity",
icon: "quantity",
formatFunction: function(settings) {
const value = settings.value;
let className;
if (value < 20) {
className = "red";
} else if (value < 35) {
className = "yellow";
} else {
className = "green";
}
settings.template = `<div class="${className}">${value}</div>`;
}
},
{
label: "Time of Purchase",
dataField: "timeOfPurchase",
icon: "timeOfPurchase",
formatSettings: { formatString: "hh:mm tt" }
},
{
label: "Travel photos",
dataField: "travelPhotos",
icon: "photo",
formatFunction: that.photoFormatFunction,
image: true
},
{
label: "Contact photos",
dataField: "contactPhotos",
icon: "photo",
formatFunction: that.photoFormatFunction,
image: true
}
];

that.cardview.cellOrientation = "horizontal";
that.cardview.collapsible = true;
that.cardview.coverField = "travelPhotos";
that.cardview.titleField = "firstName";

that.collapsible.addEventListener("change", function(event: CustomEvent) {
that.cardview.collapsible = event.detail.value;
});

that.icons.addEventListener("change", function() {
that.cardview.nativeElement.classList.toggle("disabled-icons");
});

that.horizontal.addEventListener("change", function() {
that.cardview.cellOrientation = "horizontal";
});

that.vertical.addEventListener("change", function() {
that.cardview.cellOrientation = "vertical";
});

that.crop.addEventListener("change", function() {
that.cardview.coverMode = "crop";
});

that.fit.addEventListener("change", function() {
that.cardview.coverMode = "fit";
});

that.titleField.addEventListener("change", function() {
switch (this.selectedIndexes[0]) {
case 0:
that.cardview.titleField = "firstName";
break;
case 1:
that.cardview.titleField = "lastName";
break;
case 2:
that.cardview.titleField = "petName";
break;
}
});
this.titleFieldComponent.addEventListener('change', this.handleTitleChange.bind(this) as EventListenerOrEventListenerObject)
}
}
}
2 changes: 1 addition & 1 deletion demos/chart/background-image/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class AppComponent implements AfterViewInit, OnInit {
{ Year: 2010, Population: 7.422e6 },
{ Year: 2017, Population: 7.102e6 }
];
backgroundImage = 'https://htmlelements.com/demos/images/bulgaria.png';
backgroundImage = 'https://www.htmlelements.com/demos/chart/background-image/bulgaria.png';
caption = 'Top Ten Largest Cities in Bulgaria';
description = '(source: www.nsi.bg)';
showLegend = false;
Expand Down
2 changes: 1 addition & 1 deletion demos/chart/color-schemes/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div>
<smart-chart #chart2 id="chart2" [caption]="caption" [description]="descriptionPie"
[borderLineWidth]="borderLineWidthPie" [showLegend]="showLegend" [showBorderLine]="showBorderLinePie"
[legendPosition]="legendPositionPie" [padding]="paddingPie" [titlePadding]="titlePaddingPie"
[padding]="paddingPie" [titlePadding]="titlePaddingPie"
[dataSource]="dataSourcePie" [colorScheme]="colorSchemePie" [seriesGroups]="seriesGroupsPie"></smart-chart>
</div>
<br />
Expand Down
2 changes: 1 addition & 1 deletion demos/chart/custom-styling/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[caption]="caption" [description]="description" [showLegend]="showLegend" [padding]="padding"
[titlePadding]="titlePadding" [dataSource]="dataSource" [xAxis]="xAxis" [valueAxis]="valueAxis"
[seriesGroups]="seriesGroups"></smart-chart>
<img src="./../../../src/images/wind.png" />
<img src="https://www.htmlelements.com/demos/images/wind.png" />
Loading