Skip to content

Commit

Permalink
relase: New release 2.0.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
priyank-p committed May 24, 2021
1 parent 8291550 commit 425295b
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 5 deletions.
21 changes: 21 additions & 0 deletions dist/date-util.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export interface MonthTracker {
years: Object;
current?: Date;
}
export declare const monthTracker: MonthTracker;
export declare const months: string[];
export declare const days: string[];
export declare function scrapeMonth(date: Date): {
date: Date;
month: undefined;
};
export declare function scrapePreviousMonth(): {
date: Date;
month: undefined;
};
export declare function scrapeNextMonth(): {
date: Date;
month: undefined;
};
export declare function getDisplayDate(_date: any): string;
export declare function formatTimeFromInputElement(input: string): string;
57 changes: 57 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
declare type SimplePickerEvent = 'submit' | 'close';
interface SimplePickerOpts {
zIndex?: number;
compactMode?: boolean;
disableTimeSection?: boolean;
selectedDate?: Date;
}
declare type HandlerFunction = (...args: unknown[]) => void;
interface EventHandlers {
[key: string]: HandlerFunction[];
}
declare class SimplePicker {
selectedDate: Date;
$simplePicker: HTMLElement;
readableDate: string;
_eventHandlers: EventHandlers;
_validOnListeners: readonly ["submit", "close"];
private opts;
private $;
private $$;
private $simplepicker;
private $simplepickerWrapper;
private $trs;
private $tds;
private $headerMonthAndYear;
private $monthAndYear;
private $date;
private $day;
private $time;
private $timeInput;
private $timeSectionIcon;
private $cancel;
private $ok;
private $displayDateElements;
constructor(arg1?: HTMLElement | string | SimplePickerOpts, arg2?: SimplePickerOpts);
initElMethod(el: any): void;
init(el: HTMLElement, opts: SimplePickerOpts): void;
reset(newDate?: Date): void;
compactMode(): void;
disableTimeSection(): void;
enableTimeSection(): void;
injectTemplate(el: HTMLElement): void;
clearRows(): void;
updateDateComponents(date: Date): void;
render(data: any): void;
updateSelectedDate(el?: HTMLElement): void;
selectDateElement(el: HTMLElement): void;
findElementWithDate(date: any, returnLastIfNotFound?: boolean): any;
handleIconButtonClick(el: HTMLElement): void;
initListeners(): void;
callEvent(event: SimplePickerEvent, dispatcher: (a: HandlerFunction) => void): void;
open(): void;
close(): void;
on(event: SimplePickerEvent, handler: HandlerFunction): void;
toogleDisplayFade(): void;
}
export = SimplePicker;
2 changes: 1 addition & 1 deletion dist/simplepicker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/simplepicker.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/simplepicker.node.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/simplepicker.node.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/template.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const htmlTemplate: string;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplepicker",
"version": "2.0.3",
"version": "2.0.4",
"description": "Simple date picker written in vanilla js.",
"main": "./dist/simplepicker.node.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit 425295b

Please sign in to comment.