Skip to content

Commit

Permalink
Merge pull request #102 from tonysamperi/v17
Browse files Browse the repository at this point in the history
v17.0.3
  • Loading branch information
tonysamperi authored Jan 27, 2024
2 parents 74a28dc + 136ba78 commit 15a225b
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 25 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#17.0.3
* Remove ripple

#17.0.2
* Fix time not preserved in picker when "appendToInput" is true (fixes [#93](https://github.com/tonysamperi/ngx-mat-timepicker/issues/93))

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mat-timepicker-repo",
"version": "17.0.2",
"version": "17.0.3",
"build": 0,
"license": "MIT",
"private": true,
Expand Down Expand Up @@ -43,12 +43,12 @@
},
"dependencies": {
"@angular/animations": "^17.0.0",
"@angular/cdk": "^17.0.0-next.7",
"@angular/cdk": "^17.0.4",
"@angular/common": "^17.0.0",
"@angular/compiler": "^17.0.0",
"@angular/core": "^17.0.0",
"@angular/forms": "^17.0.0",
"@angular/material": "^17.0.0",
"@angular/material": "^17.0.4",
"@angular/platform-browser": "^17.0.0",
"@angular/platform-browser-dynamic": "^17.0.0",
"@angular/ssr": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mat-timepicker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mat-timepicker",
"version": "17.0.2",
"version": "17.0.3",
"license": "MIT",
"description": "ngx-mat-timepicker is an Angular material 9+ extension to add time pickers!",
"homepage": "https://tonysamperi.github.io/ngx-mat-timepicker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ ngx-mat-timepicker-face {
[mat-mini-fab].mat-unthemed {
--mdc-fab-container-color: transparent;

--mat-fab-hover-state-layer-opacity: 0;
box-shadow: none;

.mat-mdc-button-persistent-ripple {
display: none;
}

&:disabled[disabled] {
--mdc-fab-container-color: transparent;
background-color: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,15 @@ export class NgxMatTimepickerFaceComponent implements AfterViewInit, OnChanges,
@ViewChild("clockHand", {static: true, read: ElementRef}) clockHand: ElementRef;

@Input() color: ThemePalette = "primary";

@Input() faceTime: NgxMatTimepickerClockFace[];

@Input() format: NgxMatTimepickerFormatType;

innerClockFaceSize = 85;
isClockFaceDisabled: boolean;

@Input() minutesGap: number;

@Input() selectedTime: NgxMatTimepickerClockFace;

@Output() timeChange = new EventEmitter<NgxMatTimepickerClockFace>();

@Output() timeSelected = new EventEmitter<number>();

timeUnit = NgxMatTimepickerUnits;

@Input() unit: NgxMatTimepickerUnits;

private _isStarted: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {Pipe, PipeTransform} from "@angular/core";
import {NgxMatTimepickerUtils} from "../utils/ngx-mat-timepicker.utils";

@Pipe({
name: "activeMinute",
standalone: true
})
export class NgxMatTimepickerActiveMinutePipe implements PipeTransform {

transform(minute: number, currentMinute: number, gap: number, isClockFaceDisabled: boolean): boolean {
transform(minute: number, currentMinute: number, gap: number | void, isClockFaceDisabled: boolean): boolean {
if (minute == null || isClockFaceDisabled) {
return false;
}
const defaultGap = 5;

return ((currentMinute === minute) && (minute % (gap || defaultGap) === 0));
return ((currentMinute === minute) && (minute % (gap || NgxMatTimepickerUtils.DEFAULT_MINUTES_GAP) === 0));
}

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {Pipe, PipeTransform} from "@angular/core";
import {NgxMatTimepickerUtils} from "../utils/ngx-mat-timepicker.utils";

@Pipe({
name: "minutesFormatter",
standalone: true
})
export class NgxMatTimepickerMinutesFormatterPipe implements PipeTransform {

transform(minute: number, gap = 5): number | string {
transform(minute: number, gap = NgxMatTimepickerUtils.DEFAULT_MINUTES_GAP): number | string {
if (!minute) {
return minute;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import {DateTime} from "ts-luxon";
// @dynamic
export class NgxMatTimepickerUtils {

static get DEFAULT_MINUTES_GAP(): number {
return 5;
}

static disableHours(hours: NgxMatTimepickerClockFace[], config: NgxMatTimepickerDisabledConfig): NgxMatTimepickerClockFace[] {
if (config.min || config.max) {

Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@
dependencies:
tslib "^2.3.0"

"@angular/cdk@^17.0.0-next.7":
version "17.0.0-next.7"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-17.0.0-next.7.tgz#5c21ac3d5870a6ac6263e5aaf55cb01e844fe305"
integrity sha512-nUsTpQJPVBmyQzLNvf28ZOLfsenwW0ubEVY0zjKFaY0OZZeevLQFomS4jOzKawsqEkIlK6OcDeFwY9mDjwDYsw==
"@angular/cdk@^17.0.4":
version "17.0.4"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-17.0.4.tgz#02ea9ae9b85d29b6eb1ac4c63a3fc175767b4d59"
integrity sha512-mh/EuIR0NPfpNqAXBSZWuJeBMXUvUDYdKhiFWZet5NLO1bDgFe1MGLBjtW4us95k4BZsMLbCKNxJgc+4JqwUvg==
dependencies:
tslib "^2.3.0"
optionalDependencies:
Expand Down Expand Up @@ -219,10 +219,10 @@
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-17.0.0.tgz#8cdcf6bbc2cdb2ce351f937e39481c91372433f3"
integrity sha512-53BU8lx2rgjmfsk4gEazgmzX2F/wcE3GEIg1gtZMpJQocGHk1wTO81FxZPTFPRP0dMrirJ6LMauvHlQOqQCDBA==

"@angular/material@^17.0.0":
version "17.0.0"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-17.0.0.tgz#7c2b67ed5c34c70c27f3f65a13441178d4682b9f"
integrity sha512-rd7H7NhkDPDiyLHADm2FHOJlmgaWV7ZYNYPe/4yTXlt++GTSLhKus+PTCZYVsKGlA3mxDhNnC1RY+fdjtx/G2A==
"@angular/material@^17.0.4":
version "17.0.4"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-17.0.4.tgz#d3d7b093ae09662f18b04a27cfccfab8f4182895"
integrity sha512-IKkys4EavE1TMHApPMbFLvJU4pP8S8XNfY2eS7/kFwW7eyTcz0zV/IKeBbxkpej19MaouozU+KWeRJtxHg6x8g==
dependencies:
"@material/animation" "15.0.0-canary.a246a4439.0"
"@material/auto-init" "15.0.0-canary.a246a4439.0"
Expand Down

0 comments on commit 15a225b

Please sign in to comment.