Skip to content

Commit 3a9e830

Browse files
committed
chore: update dialogs and add prettierr config
1 parent d6ddce1 commit 3a9e830

File tree

7 files changed

+73
-97
lines changed

7 files changed

+73
-97
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 120,
4+
"tabWidth": 4
5+
}

examples-standalone/kendoangular-landing-page/src/app/components/dialogs/dialogs.component.css

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,14 @@
2525
font-size: 20px;
2626
}
2727

28-
.window-content {
29-
padding: 15px;
30-
}
31-
32-
.window-header {
33-
display: flex;
34-
align-items: center;
35-
margin-bottom: 20px;
36-
padding-bottom: 15px;
37-
border-bottom: 1px solid #eee;
28+
kendo-window {
29+
--kendo-window-titlebar-bg: #3f51b5;
30+
--kendo-window-titlebar-text: white;
31+
margin-top: 0;
3832
}
3933

40-
.window-header .k-icon {
41-
font-size: 24px;
42-
margin-right: 10px;
43-
color: #ff6358;
34+
.window-content {
35+
padding: 15px;
4436
}
4537

4638
.success-message,
@@ -57,11 +49,6 @@
5749
border-left-color: #2196f3;
5850
}
5951

60-
kendo-window {
61-
--kendo-window-titlebar-bg: #3f51b5;
62-
--kendo-window-titlebar-text: white;
63-
}
64-
6552
.k-form-field {
6653
margin-bottom: 15px;
6754
}
@@ -75,12 +62,14 @@ fieldset {
7562

7663
legend {
7764
padding: 0 10px;
78-
font-weight: 500;
65+
font-size: 14px;
66+
font-weight: bold;
67+
margin-bottom: 5px;
7968
color: #455a64;
8069
}
8170

8271
.k-actions {
83-
margin-top: 20px;
72+
margin-top: 15px;
8473
}
8574

8675
@media (max-width: 768px) {

examples-standalone/kendoangular-landing-page/src/app/components/dialogs/dialogs.component.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,13 @@ <h4>Kendo Angular Dialog</h4>
3232
title="Complete Your Profile"
3333
[minWidth]="320"
3434
[width]="500"
35-
[height]="590"
36-
[top]="160"
35+
[height]="430"
36+
[top]="80"
3737
[resizable]="true"
3838
[draggable]="true"
3939
(close)="closeWindow()"
4040
>
4141
<div class="window-content">
42-
<div class="window-header">
43-
<span class="k-icon k-i-user"></span>
44-
<p>Please fill in your profile information to continue</p>
45-
</div>
46-
4742
<form class="k-form">
4843
<fieldset>
4944
<legend>Personal Information</legend>
@@ -69,10 +64,6 @@ <h4>Kendo Angular Dialog</h4>
6964
<label>Date of Birth</label>
7065
<kendo-datepicker placeholder="Select your birth date"></kendo-datepicker>
7166
</div>
72-
<div class="k-form-field">
73-
<label>Bio</label>
74-
<kendo-textarea placeholder="Tell us about yourself" [rows]="3"></kendo-textarea>
75-
</div>
7667
</fieldset>
7768

7869
<div class="k-actions k-actions-end">

examples-standalone/kendoangular-landing-page/src/app/components/dialogs/dialogs.component.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import { Component } from "@angular/core";
2-
import { FormsModule } from "@angular/forms";
3-
import { KENDO_BUTTONS } from "@progress/kendo-angular-buttons";
4-
import { KENDO_DATEINPUTS } from "@progress/kendo-angular-dateinputs";
5-
import { KENDO_DIALOGS } from "@progress/kendo-angular-dialog";
6-
import { KENDO_INPUTS } from "@progress/kendo-angular-inputs";
1+
import { Component } from '@angular/core';
2+
import { FormsModule } from '@angular/forms';
3+
import { KENDO_BUTTONS } from '@progress/kendo-angular-buttons';
4+
import { KENDO_DATEINPUTS } from '@progress/kendo-angular-dateinputs';
5+
import { KENDO_DIALOGS } from '@progress/kendo-angular-dialog';
6+
import { KENDO_INPUTS } from '@progress/kendo-angular-inputs';
77

88
@Component({
9-
selector: "app-dialogs",
9+
selector: 'app-dialogs',
1010
imports: [KENDO_DIALOGS, KENDO_BUTTONS, KENDO_INPUTS, KENDO_DATEINPUTS, FormsModule],
11-
templateUrl: "./dialogs.component.html",
12-
styleUrl: "./dialogs.component.css",
11+
templateUrl: './dialogs.component.html',
12+
styleUrl: './dialogs.component.css',
1313
})
1414
export class DialogsComponent {
1515
public windowOpened = true;
1616
public formSubmitted = false;
17-
public firstName = "";
18-
public lastName = "";
17+
public firstName = '';
18+
public lastName = '';
1919
public dialogOpened = false;
20-
public confirmationResult = "";
20+
public confirmationResult = '';
2121

2222
public openWindow(): void {
2323
this.windowOpened = true;
@@ -47,8 +47,8 @@ export class DialogsComponent {
4747

4848
public reset(): void {
4949
this.formSubmitted = false;
50-
this.confirmationResult = "";
51-
this.firstName = "";
52-
this.lastName = "";
50+
this.confirmationResult = '';
51+
this.firstName = '';
52+
this.lastName = '';
5353
}
5454
}

examples-standalone/kendoangular-landing-page/src/app/components/scheduler/scheduler.component.ts

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,73 @@
1-
import { ChangeDetectorRef, Component, Inject, LOCALE_ID } from "@angular/core";
2-
import { FormBuilder, FormGroup, ReactiveFormsModule } from "@angular/forms";
3-
import { KENDO_DROPDOWNLIST } from "@progress/kendo-angular-dropdowns";
4-
import { CldrIntlService, IntlService } from "@progress/kendo-angular-intl";
5-
import { MessageService } from "@progress/kendo-angular-l10n";
6-
import { CreateFormGroupArgs, KENDO_SCHEDULER } from "@progress/kendo-angular-scheduler";
7-
import { KENDO_TOOLBAR } from "@progress/kendo-angular-toolbar";
8-
import { customModelFields, displayDate, sampleDataWithCustomSchema } from "../../data/scheduler-data";
9-
import { SchedulerMessageService } from "../../services/scheduler-message.service";
1+
import { Component, Inject, LOCALE_ID } from '@angular/core';
2+
import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';
3+
import { KENDO_DROPDOWNLIST } from '@progress/kendo-angular-dropdowns';
4+
import { CldrIntlService, IntlService } from '@progress/kendo-angular-intl';
5+
import { MessageService } from '@progress/kendo-angular-l10n';
6+
import { CreateFormGroupArgs, KENDO_SCHEDULER } from '@progress/kendo-angular-scheduler';
7+
import { KENDO_TOOLBAR } from '@progress/kendo-angular-toolbar';
8+
import { customModelFields, displayDate, sampleDataWithCustomSchema } from '../../data/scheduler-data';
9+
import { SchedulerMessageService } from '../../services/scheduler-message.service';
1010

11-
import "@progress/kendo-angular-intl/locales/en/all";
12-
import "@progress/kendo-angular-intl/locales/es/all";
11+
import '@progress/kendo-angular-intl/locales/en/all';
12+
import '@progress/kendo-angular-intl/locales/es/all';
1313

1414
interface LanguageOption {
1515
text: string;
1616
value: string;
1717
}
1818
@Component({
19-
selector: "app-scheduler",
19+
selector: 'app-scheduler',
2020
imports: [KENDO_SCHEDULER, KENDO_TOOLBAR, KENDO_DROPDOWNLIST, ReactiveFormsModule],
2121
providers: [
2222
{ provide: MessageService, useClass: SchedulerMessageService },
23-
{ provide: LOCALE_ID, useValue: "en" },
23+
{ provide: LOCALE_ID, useValue: 'en' },
2424
],
25-
templateUrl: "./scheduler.component.html",
26-
styleUrls: ["./scheduler.component.css"],
25+
templateUrl: './scheduler.component.html',
26+
styleUrls: ['./scheduler.component.css'],
2727
})
2828
export class SchedulerComponent {
2929
public selectedDate: Date = displayDate;
3030
public events: any[] = sampleDataWithCustomSchema;
31-
public currentView: string = "day";
31+
public currentView: string = 'day';
3232
public modelFields = customModelFields;
33-
public orientation: "horizontal" | "vertical" = "horizontal";
33+
public orientation: 'horizontal' | 'vertical' = 'horizontal';
3434
public formGroup!: FormGroup;
35-
public group: any = { resources: ["Rooms", "Persons"] };
35+
public group: any = { resources: ['Rooms', 'Persons'] };
3636

3737
public resources = [
3838
{
39-
name: "Rooms",
39+
name: 'Rooms',
4040
data: [
41-
{ text: "Meeting Room 101", value: 1, color: "#5392E4" },
42-
{ text: "Meeting Room 201", value: 2, color: "#FF7272" },
41+
{ text: 'Meeting Room 101', value: 1, color: '#5392E4' },
42+
{ text: 'Meeting Room 201', value: 2, color: '#FF7272' },
4343
],
44-
field: "RoomID",
45-
valueField: "value",
46-
textField: "text",
47-
colorField: "color",
44+
field: 'RoomID',
45+
valueField: 'value',
46+
textField: 'text',
47+
colorField: 'color',
4848
},
4949
{
50-
name: "Persons",
50+
name: 'Persons',
5151
data: [
52-
{ text: "Peter", value: 1, color: "#5392E4" },
53-
{ text: "Alex", value: 2, color: "#54677B" },
52+
{ text: 'Peter', value: 1, color: '#5392E4' },
53+
{ text: 'Alex', value: 2, color: '#54677B' },
5454
],
55-
field: "PersonIDs",
56-
valueField: "value",
57-
textField: "text",
58-
colorField: "color",
55+
field: 'PersonIDs',
56+
valueField: 'value',
57+
textField: 'text',
58+
colorField: 'color',
5959
},
6060
];
6161
public languages: LanguageOption[] = [
62-
{ text: "English", value: "en" },
63-
{ text: "Spanish", value: "es" },
62+
{ text: 'English', value: 'en' },
63+
{ text: 'Spanish', value: 'es' },
6464
];
65-
public selectedLanguage: any = { text: "English", value: "en-US" };
65+
public selectedLanguage: any = { text: 'English', value: 'en-US' };
6666
constructor(
6767
private formBuilder: FormBuilder,
6868
private messages: MessageService,
6969
@Inject(LOCALE_ID) public localeId: string,
70-
public intlService: IntlService,
71-
private cdr: ChangeDetectorRef
70+
public intlService: IntlService
7271
) {
7372
this.createFormGroup = this.createFormGroup.bind(this);
7473
}
@@ -121,12 +120,12 @@ export class SchedulerComponent {
121120
}
122121
}
123122

124-
public handleOrientationChange(orientation: "horizontal" | "vertical"): void {
123+
public handleOrientationChange(orientation: 'horizontal' | 'vertical'): void {
125124
this.orientation = orientation;
126125
}
127126
public changeLanguage(language: LanguageOption): void {
128127
const svc = <SchedulerMessageService>this.messages;
129-
svc.language = svc.language === "es" ? "en" : "es";
128+
svc.language = svc.language === 'es' ? 'en' : 'es';
130129
(this.intlService as CldrIntlService).localeId = language.value;
131130
}
132131
}

examples-standalone/kendoangular-landing-page/src/app/services/locale.service.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)