Skip to content
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

igxTimePicker - editable masked input + dropdown new mode #3394

Merged
merged 64 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ea08d70
feat(time-picker): initial implementation of removing dialog #2337
SAndreeva Nov 22, 2018
b47ffb4
feat(time picker): spin on edit functionality #2337
SAndreeva Nov 26, 2018
3052a9e
feat(time picker): editable input implementation #2337
SAndreeva Nov 27, 2018
5e42d13
feat(time-picker): dropdown/dialog display rework #2337
SAndreeva Nov 29, 2018
30616be
feat(time-picker): sync dropdwwon navigation and input display #2337
SAndreeva Nov 29, 2018
47f8cdb
feat(time picker): emit events when necessary #2337
SAndreeva Nov 30, 2018
c5d7de5
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Nov 30, 2018
016d67f
feat(time picker): code restructuring and demo rework #2337
SAndreeva Nov 30, 2018
6f1b644
feat(time picker): fix broken sample #2337
SAndreeva Nov 30, 2018
8c89287
feat(time picker): fix test failures and styles #2337
SAndreeva Dec 1, 2018
bb714d0
feat(time-picker): minor fixes and improvements #2337
SAndreeva Dec 3, 2018
a0de0fb
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 3, 2018
55bea0d
feat(time-picker): more fixes and improvements #2337
SAndreeva Dec 3, 2018
a0dfabf
feat(time-picker): cover corner cases with invalid value #2337
SAndreeva Dec 4, 2018
d84f42a
refactor(theme): adjust time picker theme
simeonoff Dec 4, 2018
aa2e5bb
feat(time picker): hide/show overlay via hidden attribute #2337
SAndreeva Dec 4, 2018
2136dd7
test(timePicker): Adding TimePicker DropDown initial Tests. #2337
Dec 4, 2018
5092f49
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 4, 2018
a234e30
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 4, 2018
f504f9e
test(timePicker): Adding TimePicker DropDown Tests. #2337
Dec 6, 2018
01febfd
feat(time-picker): mask directive placeholder #2337
SAndreeva Dec 6, 2018
1786dd2
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 6, 2018
2bcde70
test(timePicker): Fixing falling Vertical test. #2337
Dec 7, 2018
aa3438d
feat(time picker): some code refactoring #2337
SAndreeva Dec 7, 2018
f0a2a53
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 8, 2018
9548392
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 8, 2018
b6b6056
feat(time picker): code refactoring and bug fixing #2337
SAndreeva Dec 10, 2018
e879926
test(timePicker): Finalizing TimePicker DropDown Tests. #2337
Dec 10, 2018
8e81e24
Merge remote-tracking branch 'remotes/origin/master' into SAndreeva/t…
SAndreeva Dec 11, 2018
7777e78
feat(time picker): tests refactoring and bug fixing #2337
SAndreeva Dec 11, 2018
5c0f9dd
feat(time picker): code styling #2337
SAndreeva Dec 11, 2018
d098c19
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 11, 2018
8f3fb6d
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 11, 2018
655f70b
feat(time picker): update README.md and CHANGELOG.md #2337
SAndreeva Dec 11, 2018
65c3a9d
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 11, 2018
5f1ce3c
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 11, 2018
d07477f
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 12, 2018
a17c569
feat(time picker): minor fixes/improvements #2337
SAndreeva Dec 12, 2018
a1135be
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 12, 2018
8e04305
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 12, 2018
480e04d
feat(time picker): some more little refinements #2337
SAndreeva Dec 12, 2018
59a7a5a
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 13, 2018
cebc408
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 13, 2018
093761c
chore(*): mask demo enhancement #2337
SAndreeva Dec 13, 2018
9b47ec8
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 17, 2018
e6d3a9a
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 17, 2018
0888cdb
Merge branch 'master' into SAndreeva/time-picker-poc-m
SAndreeva Dec 18, 2018
7de7f87
chore(*): address review comments #2337
SAndreeva Dec 18, 2018
0d32e30
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 18, 2018
b769f3f
chore(*): more refinements #2337
SAndreeva Dec 18, 2018
26d2a1d
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Dec 20, 2018
e10984c
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Dec 20, 2018
1272499
feat(time picker): address comments form review #2337
SAndreeva Dec 20, 2018
c1ec899
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Dec 20, 2018
7975d86
feat(time picker): expose enum again in common #2337
SAndreeva Dec 21, 2018
7beeb41
feat(time picker): cover some more corner cases #2337
SAndreeva Dec 22, 2018
5e0f92e
feat(time picker): some more minor bug fixes #2337
SAndreeva Dec 26, 2018
b1042df
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Jan 4, 2019
b407771
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Jan 4, 2019
8d54f58
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Jan 4, 2019
43a2497
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
SAndreeva Jan 7, 2019
8aa1e30
feat(time picker): fix undesired input event firing in IE #2337
SAndreeva Jan 7, 2019
c218def
Merge branch 'SAndreeva/time-picker-poc-m' of https://github.com/Igni…
SAndreeva Jan 7, 2019
1d6c897
Merge branch '7.1.x' into SAndreeva/time-picker-poc-m
zdrawku Jan 7, 2019
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes for each version of this project will be documented in this file.


## 7.1.2
### Features
- `IgxTimePickerComponent`: in addition to the current dialog interaction mode, now the user can select or edit a time value, using an editable masked input with a dropdown.

## 7.1.1
### Bug Fixes

Expand All @@ -14,6 +19,7 @@ All notable changes for each version of this project will be documented in this
### Other
* update typedoc-plugin-localization version to 1.4.1 ([#3440](https://github.com/IgniteUI/igniteui-angular/issues/3440))


## 7.1.0
### Features
- **New component** `IgxBannerComponent`:
Expand All @@ -40,6 +46,7 @@ All notable changes for each version of this project will be documented in this
- `IgxOverlayService`:
- `ElasticPositioningStrategy` added. This strategy positions the element as in **Connected** positioning strategy and resize the element to fit in the view port in case the element is partially getting out of view.


## 7.0.5

### Bug Fixes
Expand All @@ -60,6 +67,7 @@ All notable changes for each version of this project will be documented in this
* update typedoc-plugin-localization version to 1.4.1 ([#3440](https://github.com/IgniteUI/igniteui-angular/issues/3440))
* Move all keyboard navigation tests in a separate file ([#2975](https://github.com/IgniteUI/igniteui-angular/issues/2975))


## 7.0.4
### Bug fixes
- Fix(igx-grid): revert row editing styles ([#2672](https://github.com/IgniteUI/igniteui-angular/issues/2672))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,90 +1,71 @@
@include b(igx-time-picker) {
@extend %time-picker-display !optional;

@include e(header) {
@extend %igx-time-picker__header !optional;
@extend %time-picker__header !optional;
}

@include e(header-ampm) {
@extend %igx-time-picker__header-ampm !optional;
@extend %time-picker__header-ampm !optional;
}

@include e(header-hour){
@extend %igx-time-picker__header-hour !optional;
@extend %time-picker__header-hour !optional;
}

@include e(main) {
@extend %time-picker__main !optional;
}

// COLUMN
@include e(column) {
@extend %igx-time-picker__column !optional;
@extend %time-picker__column !optional;
}

@include e(item) {
@extend %igx-time-picker__item !optional;
@extend %time-picker__item !optional;
}

@include e(item, $mod: selected) {
@extend %igx-time-picker__item--selected !optional;
@extend %time-picker__item--selected !optional;
}

@include e(item, $m: active) {
@extend %igx-time-picker__item--active !optional;
@extend %time-picker__item--active !optional;
}

// HOUR
@include e(hourList) {
@extend %igx-time-picker__hourList !optional;
@extend %time-picker__hourList !optional;
}


// MINUTE
@include e(minuteList) {
@extend %igx-time-picker__minuteList !optional;
@extend %time-picker__minuteList !optional;
}

// AM PM
@include e(ampmList) {
@extend %igx-time-picker__ampmList !optional;
@extend %time-picker__ampmList !optional;
}

@include e(body) {
@extend %igx-time-picker__body !optional;
@extend %time-picker__body !optional;
}

.igx-dialog__window {
@extend %time-picker-display !optional;
@include e(buttons) {
@extend %time-picker__buttons !optional;
}

@include m(vertical) {
.igx-dialog__window {
@extend %time-picker-display--vertical !optional;
}

.igx-time-picker__wrapper {
@extend %igx-time-picker__wrapper !optional;
}

.igx-time-picker__header {
@extend %igx-time-picker__header--vertical !optional;

&::after {
@extend %igx-time-picker__header--vertical-after !optional;
}
}

.igx-time-picker__body {
@extend %igx-time-picker__body--vertical !optional;
}
}

.igx-dialog__window,
.igx-dialog__window-content {
@extend %time-picker-content !optional;
@include m(dropdown) {
@extend %time-picker--dropdown !optional;
}

.igx-dialog__window-title {
@extend %time-picker-dialog-title !optional;
}
@include m(vertical) {
@extend %time-picker-display--vertical !optional;

.igx-dialog__window-actions {
@extend %time-picker-dialog-actions !optional;
@include e(header) {
@extend %time-picker__header--vertical !optional;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,35 @@

$vertical-header-width: rem(168px);

%igx-time-picker__body {
%time-picker-display {
display: flex;
padding: 10px 0;
justify-content: center;
background: --var($theme, 'background-color');
flex-flow: column nowrap;
max-width: 340px;
min-width: 320px;
border-radius: rem(4px);
box-shadow: igx-elevation($elevations, 24);
overflow: hidden;
}

%igx-time-picker__body--vertical {
flex: 1 1 auto;
%time-picker-display--vertical {
flex-flow: row nowrap;
min-width: 540px;
}

%time-picker-display {
max-width: 340px;
min-width: 320px;
padding: 0;
%time-picker__main {
background: --var($theme, 'background-color');
flex: 1 1 auto;
}

%time-picker-display--vertical {
width: 540px;
%time-picker--dropdown {
min-width: 200px;
box-shadow: igx-elevation($elevations, 3);
}

// Take effect only in vertical mode
%igx-time-picker__wrapper {
%time-picker__body {
display: flex;
flex-wrap: nowrap;
padding: 10px 0;
justify-content: center;
}

%time-picker-content {
Expand All @@ -134,21 +138,21 @@
margin: 0;
}

%igx-time-picker__hourList {
%time-picker__hourList {
text-align: right;
}

%igx-time-picker__minuteList {
%time-picker__minuteList {
text-align: center;
}

%igx-time-picker__ampmList {
%time-picker__ampmList {
display: flex;
flex-direction: column;
padding-top: 48px;
}

%igx-time-picker__column {
%time-picker__column {
max-width: 64px;
height: 325px;
padding: 0;
Expand All @@ -166,7 +170,7 @@
}
}

%igx-time-picker__item {
%time-picker__item {
width: 54px;
padding: 5px 10px;
border-radius: 15px;
Expand All @@ -185,48 +189,44 @@
}
}

%igx-time-picker__item--selected {
%time-picker__item--selected {
font-size: rem(24px);
color: --var($theme, 'selected-text-color');
}

%igx-time-picker__item--active {
%time-picker__item--active {
background: --var($theme, 'active-item-background');
}

%igx-time-picker__header {
%time-picker__header {
background: --var($theme, 'header-background');
padding: rem(24px) rem(16px);
}

%igx-time-picker__header-ampm {
%time-picker__header-ampm {
color: --var($theme, 'header-time-period-color');
}

%igx-time-picker__header--vertical {
%time-picker__header--vertical {
width: $vertical-header-width;
position: relative;
}

%igx-time-picker__header--vertical-after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 100%;
height: 100%;
background: --var($theme, 'header-background');
}

%igx-time-picker__header-hour {
color: --var($theme, 'header-hour-text-color');
%time-picker__header-hour {
display: flex;
color: --var($theme, 'header-hour-text-color');
}

%igx-time-picker__header-ampm,
%igx-time-picker__header-hour {
%time-picker__header-ampm,
%time-picker__header-hour {
margin: 0;
}

%time-picker__buttons {
display: flex;
justify-content: flex-end;
height: rem(52px);
padding: rem(8px);
}
}

/// Adds typography styles for the igx-calendar component.
Expand All @@ -246,15 +246,15 @@
$content: map-get($categories, 'content');

@include igx-scope('.igx-typography') {
%igx-time-picker__header-ampm {
%time-picker__header-ampm {
@include igx-type-style($type-scale, $time-period);
}

%igx-time-picker__header-hour {
%time-picker__header-hour {
@include igx-type-style($type-scale, $header-hour);
}

%igx-time-picker__column {
%time-picker__column {
@include igx-type-style($type-scale, $content);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, ViewChild, OnInit, ElementRef, Pipe, PipeTransform } from '@angular/core';
import { Component, Input, ViewChild, ElementRef, Pipe, PipeTransform } from '@angular/core';
import {
async,
fakeAsync,
Expand Down Expand Up @@ -68,6 +68,7 @@ describe('igxMask', () => {

input.nativeElement.dispatchEvent(new Event('focus'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('555 55');

Expand All @@ -81,6 +82,7 @@ describe('igxMask', () => {

input.nativeElement.dispatchEvent(new Event('focus'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('+359-884 19 08 54');
}));
Expand Down Expand Up @@ -296,23 +298,22 @@ describe('igxMask', () => {
it('Apply display and input pipes on blur and focus.', fakeAsync(() => {
const fixture = TestBed.createComponent(PipesMaskComponent);
fixture.detectChanges();
tick();
fixture.detectChanges();

const input = fixture.componentInstance.input;

input.nativeElement.focus();
input.nativeElement.dispatchEvent(new Event('focus'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('SSS');

input.nativeElement.dispatchEvent(new Event('blur'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('sss');

input.nativeElement.dispatchEvent(new Event('focus'));
tick();

expect(input.nativeElement.value).toEqual('SSS');
}));

it('Apply placehodler when value is not defined.', fakeAsync(() => {
Expand All @@ -325,13 +326,13 @@ describe('igxMask', () => {
expect(input.nativeElement.placeholder).toEqual('hello');

input.nativeElement.dispatchEvent(new Event('focus'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('(__) (__)');
expect(input.nativeElement.placeholder).toEqual('hello');

input.nativeElement.dispatchEvent(new Event('blur'));
tick();
fixture.detectChanges();

expect(input.nativeElement.value).toEqual('');
expect(input.nativeElement.placeholder).toEqual('hello');
Expand Down
Loading