diff --git a/src/js/actions.ts b/src/js/actions.ts
index 832a5aa68..fa185106d 100644
--- a/src/js/actions.ts
+++ b/src/js/actions.ts
@@ -264,6 +264,7 @@ export default class Actions {
this.optionsStore.viewDate,
this.dates.lastPickedIndex
);
+
if (!this.optionsStore.options.display.inline) {
this.display.hide();
}
diff --git a/src/js/datetime.ts b/src/js/datetime.ts
index 3b9e048dc..2c9717b8d 100644
--- a/src/js/datetime.ts
+++ b/src/js/datetime.ts
@@ -918,6 +918,7 @@ export class DateTime extends Date {
: this.localization.hourCycle;
const matches = {
+ y: this.year,
yy: formatter({ year: '2-digit' }),
yyyy: this.year,
M: formatter({ month: 'numeric' }),
diff --git a/src/js/jQuery-provider.js b/src/js/jQuery-provider.js
index 1bce54dbc..3ad7d8186 100644
--- a/src/js/jQuery-provider.js
+++ b/src/js/jQuery-provider.js
@@ -2,7 +2,7 @@
/*global $, tempusDominus */
/*!
- * Tempus Dominus v6.7.10 (https://getdatepicker.com/)
+ * Tempus Dominus v6.7.16 (https://getdatepicker.com/)
* Copyright 2013-2021 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
diff --git a/src/js/locales/ca.ts b/src/js/locales/ca.ts
new file mode 100644
index 000000000..a43ed2549
--- /dev/null
+++ b/src/js/locales/ca.ts
@@ -0,0 +1,45 @@
+const name = 'ca';
+
+const localization = {
+ today: 'Avui',
+ clear: 'Esborrar selecció',
+ close: 'Tancar selector',
+ selectMonth: 'Seleccionar mes',
+ previousMonth: 'Mes anterior',
+ nextMonth: 'Pròxim mes',
+ selectYear: 'Seleccionar any',
+ previousYear: 'Any anterior',
+ nextYear: 'Pròxim any',
+ selectDecade: 'Seleccionar dècada',
+ previousDecade: 'Dècada anterior',
+ nextDecade: 'Pròxima dècada',
+ previousCentury: 'Segle anterior',
+ nextCentury: 'Pròxim segle',
+ pickHour: 'Escollir hora',
+ incrementHour: 'Incrementar hora',
+ decrementHour: 'Decrementar hora',
+ pickMinute: 'Escollir minut',
+ incrementMinute: 'Incrementar minut',
+ decrementMinute: 'Decrementar minut',
+ pickSecond: 'Escollir segon',
+ incrementSecond: 'Incrementar segon',
+ decrementSecond: 'Decrementar segon',
+ toggleMeridiem: 'Canviar AM/PM',
+ selectTime: 'Seleccionar temps',
+ selectDate: 'Seleccionar data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ startOfTheWeek: 1,
+ locale: 'ca',
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd [de] MMMM [de] yyyy',
+ LLL: 'd [de] MMMM [de] yyyy H:mm',
+ LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/src/js/tempus-dominus.ts b/src/js/tempus-dominus.ts
index 00762b975..2f9034570 100644
--- a/src/js/tempus-dominus.ts
+++ b/src/js/tempus-dominus.ts
@@ -240,11 +240,11 @@ class TempusDominus {
if (this.optionsStore.options.allowInputToggle) {
this.optionsStore.input?.removeEventListener(
'click',
- this._toggleClickEvent
+ this._openClickEvent
);
this.optionsStore.input?.removeEventListener(
'focus',
- this._toggleClickEvent
+ this._openClickEvent
);
}
this._toggle?.removeEventListener('click', this._toggleClickEvent);
@@ -413,6 +413,18 @@ class TempusDominus {
}
this.optionsStore.options = newConfig;
+
+ if (
+ newConfig.restrictions.maxDate &&
+ this.viewDate.isAfter(newConfig.restrictions.maxDate)
+ )
+ this.viewDate = newConfig.restrictions.maxDate;
+
+ if (
+ newConfig.restrictions.minDate &&
+ this.viewDate.isBefore(newConfig.restrictions.minDate)
+ )
+ this.viewDate = newConfig.restrictions.minDate;
}
/**
@@ -443,8 +455,8 @@ class TempusDominus {
this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
if (this.optionsStore.options.allowInputToggle) {
- this.optionsStore.input.addEventListener('click', this._toggleClickEvent);
- this.optionsStore.input.addEventListener('focus', this._toggleClickEvent);
+ this.optionsStore.input.addEventListener('click', this._openClickEvent);
+ this.optionsStore.input.addEventListener('focus', this._openClickEvent);
}
if (this.optionsStore.input.value) {
@@ -506,7 +518,7 @@ class TempusDominus {
this._eventEmitters.action.emit({
e: {
currentTarget: this.display.widget.querySelector(
- `.${Namespace.css.switch}`
+ '[data-action="togglePicker"]'
),
},
action: ActionTypes.togglePicker,
@@ -559,11 +571,29 @@ class TempusDominus {
private _toggleClickEvent = () => {
if (
(this.optionsStore.element as HTMLInputElement)?.disabled ||
- this.optionsStore.input?.disabled
+ this.optionsStore.input?.disabled ||
+ //if we just have the input and allow input toggle is enabled, then don't cause a toggle
+ (this._toggle.nodeName === 'INPUT' &&
+ (this._toggle as HTMLInputElement)?.type === 'text' &&
+ this.optionsStore.options.allowInputToggle)
)
return;
this.toggle();
};
+
+ /**
+ * Event for when the toggle is clicked. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ private _openClickEvent = () => {
+ if (
+ (this.optionsStore.element as HTMLInputElement)?.disabled ||
+ this.optionsStore.input?.disabled
+ )
+ return;
+ if (!this.display.isVisible) this.show();
+ };
}
/**
@@ -613,7 +643,7 @@ const extend = function (plugin, option = undefined) {
return tempusDominus;
};
-const version = '6.7.10';
+const version = '6.7.16';
const tempusDominus = {
TempusDominus,
diff --git a/src/nuget/TempusDominus.nuspec b/src/nuget/TempusDominus.nuspec
index 58d295dc9..c96d9a0cf 100644
--- a/src/nuget/TempusDominus.nuspec
+++ b/src/nuget/TempusDominus.nuspec
@@ -2,7 +2,7 @@
TempusDominus
- 6.7.10
+ 6.7.16
Tempus Dominus
Eonasdan
Eonasdan
diff --git a/src/nuget/TempusDominus.scss.nuspec b/src/nuget/TempusDominus.scss.nuspec
index f0c5ea204..043b5db33 100644
--- a/src/nuget/TempusDominus.scss.nuspec
+++ b/src/nuget/TempusDominus.scss.nuspec
@@ -2,7 +2,7 @@
TempusDominus.scss
- 6.7.10
+ 6.7.16
Tempus Dominus
Eonasdan
Eonasdan
diff --git a/types/actions.d.ts b/types/actions.d.ts
deleted file mode 100644
index 8b9a820fb..000000000
--- a/types/actions.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import ActionTypes from './utilities/action-types';
-/**
- * Logic for various click actions
- */
-export default class Actions {
- private optionsStore;
- private validation;
- private dates;
- private display;
- private _eventEmitters;
- constructor();
- /**
- * Performs the selected `action`. See ActionTypes
- * @param e This is normally a click event
- * @param action If not provided, then look for a [data-action]
- */
- do(e: any, action?: ActionTypes): void;
- private handleShowClockContainers;
- private handleNextPrevious;
- /**
- * After setting the value it will either show the clock or hide the widget.
- * @param e
- */
- private hideOrClock;
- /**
- * Common function to manipulate {@link lastPicked} by `unit`.
- * @param lastPicked
- * @param unit
- * @param value Value to change by
- */
- private manipulateAndSet;
- private handleSelectCalendarMode;
- private handleToggle;
- private handleSelectDay;
- private handleMultiDate;
- private handleDateRange;
-}
diff --git a/types/dates.d.ts b/types/dates.d.ts
deleted file mode 100644
index 3eb112442..000000000
--- a/types/dates.d.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { DateTime, Unit } from './datetime';
-export default class Dates {
- private _dates;
- private optionsStore;
- private validation;
- private _eventEmitters;
- constructor();
- /**
- * Returns the array of selected dates
- */
- get picked(): DateTime[];
- /**
- * Returns the last picked value.
- */
- get lastPicked(): DateTime;
- /**
- * Returns the length of picked dates -1 or 0 if none are selected.
- */
- get lastPickedIndex(): number;
- /**
- * Formats a DateTime object to a string. Used when setting the input value.
- * @param date
- */
- formatInput(date: DateTime): string;
- /**
- * parse the value into a DateTime object.
- * this can be overwritten to supply your own parsing.
- */
- parseInput(value: any): DateTime;
- /**
- * Tries to convert the provided value to a DateTime object.
- * If value is null|undefined then clear the value of the provided index (or 0).
- * @param value Value to convert or null|undefined
- * @param index When using multidates this is the index in the array
- */
- setFromInput(value: any, index?: number): void;
- /**
- * Adds a new DateTime to selected dates array
- * @param date
- */
- add(date: DateTime): void;
- /**
- * Returns true if the `targetDate` is part of the selected dates array.
- * If `unit` is provided then a granularity to that unit will be used.
- * @param targetDate
- * @param unit
- */
- isPicked(targetDate: DateTime, unit?: Unit): boolean;
- /**
- * Returns the index at which `targetDate` is in the array.
- * This is used for updating or removing a date when multi-date is used
- * If `unit` is provided then a granularity to that unit will be used.
- * @param targetDate
- * @param unit
- */
- pickedIndex(targetDate: DateTime, unit?: Unit): number;
- /**
- * Clears all selected dates.
- */
- clear(): void;
- /**
- * Find the "book end" years given a `year` and a `factor`
- * @param factor e.g. 100 for decades
- * @param year e.g. 2021
- */
- static getStartEndYear(
- factor: number,
- year: number
- ): [number, number, number];
- updateInput(target?: DateTime): void;
- /**
- * Attempts to either clear or set the `target` date at `index`.
- * If the `target` is null then the date will be cleared.
- * If multi-date is being used then it will be removed from the array.
- * If `target` is valid and multi-date is used then if `index` is
- * provided the date at that index will be replaced, otherwise it is appended.
- * @param target
- * @param index
- */
- setValue(target?: DateTime, index?: number): void;
- private _setValueNull;
-}
diff --git a/types/datetime.d.ts b/types/datetime.d.ts
deleted file mode 100644
index 7dd118ea1..000000000
--- a/types/datetime.d.ts
+++ /dev/null
@@ -1,270 +0,0 @@
-import { FormatLocalization } from './utilities/options';
-export declare enum Unit {
- seconds = 'seconds',
- minutes = 'minutes',
- hours = 'hours',
- date = 'date',
- month = 'month',
- year = 'year',
-}
-export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {
- timeStyle?: 'short' | 'medium' | 'long';
- dateStyle?: 'short' | 'medium' | 'long' | 'full';
- numberingSystem?: string;
-}
-/**
- * Returns an Intl format object based on the provided object
- * @param unit
- */
-export declare const getFormatByUnit: (unit: Unit) => object;
-/**
- * Attempts to guess the hour cycle of the given local
- * @param locale
- */
-export declare const guessHourCycle: (
- locale: string
-) => Intl.LocaleHourCycleKey;
-/**
- * For the most part this object behaves exactly the same way
- * as the native Date object with a little extra spice.
- */
-export declare class DateTime extends Date {
- localization: FormatLocalization;
- /**
- * Chainable way to set the {@link locale}
- * @param value
- * @deprecated use setLocalization with a FormatLocalization object instead
- */
- setLocale(value: string): this;
- /**
- * Chainable way to set the {@link localization}
- * @param value
- */
- setLocalization(value: FormatLocalization): this;
- /**
- * Converts a plain JS date object to a DateTime object.
- * Doing this allows access to format, etc.
- * @param date
- * @param locale this parameter is deprecated. Use formatLocalization instead.
- * @param formatLocalization
- */
- static convert(
- date: Date,
- locale?: string,
- formatLocalization?: FormatLocalization
- ): DateTime;
- /**
- * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.
- */
- get clone(): DateTime;
- static isValid(d: any): boolean;
- /**
- * Sets the current date to the start of the {@link unit} provided
- * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')
- * would return April 1, 2021, 12:00:00.000 AM (midnight)
- * @param unit
- * @param startOfTheWeek Allows for the changing the start of the week.
- */
- startOf(unit: Unit | 'weekDay', startOfTheWeek?: number): this;
- /**
- * Sets the current date to the end of the {@link unit} provided
- * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')
- * would return April 30, 2021, 11:59:59.999 PM
- * @param unit
- * @param startOfTheWeek
- */
- endOf(unit: Unit | 'weekDay', startOfTheWeek?: number): this;
- /**
- * Change a {@link unit} value. Value can be positive or negative
- * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')
- * would return May 30, 2021, 11:45:32.984 AM
- * @param value A positive or negative number
- * @param unit
- */
- manipulate(value: number, unit: Unit): this;
- /**
- * Return true if {@link compare} is before this date
- * @param compare The Date/DateTime to compare
- * @param unit If provided, uses {@link startOf} for
- * comparison.
- */
- isBefore(compare: DateTime, unit?: Unit): boolean;
- /**
- * Return true if {@link compare} is after this date
- * @param compare The Date/DateTime to compare
- * @param unit If provided, uses {@link startOf} for
- * comparison.
- */
- isAfter(compare: DateTime, unit?: Unit): boolean;
- /**
- * Return true if {@link compare} is same this date
- * @param compare The Date/DateTime to compare
- * @param unit If provided, uses {@link startOf} for
- * comparison.
- */
- isSame(compare: DateTime, unit?: Unit): boolean;
- /**
- * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.
- * @param left
- * @param right
- * @param unit.
- * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.
- * If the inclusivity parameter is used, both indicators must be passed.
- */
- isBetween(
- left: DateTime,
- right: DateTime,
- unit?: Unit,
- inclusivity?: '()' | '[]' | '(]' | '[)'
- ): boolean;
- /**
- * Returns flattened object of the date. Does not include literals
- * @param locale
- * @param template
- */
- parts(
- locale?: string,
- template?: Record
- ): Record;
- /**
- * Shortcut to Date.getSeconds()
- */
- get seconds(): number;
- /**
- * Shortcut to Date.setSeconds()
- */
- set seconds(value: number);
- /**
- * Returns two digit hours
- */
- get secondsFormatted(): string;
- /**
- * Shortcut to Date.getMinutes()
- */
- get minutes(): number;
- /**
- * Shortcut to Date.setMinutes()
- */
- set minutes(value: number);
- /**
- * Returns two digit minutes
- */
- get minutesFormatted(): string;
- /**
- * Shortcut to Date.getHours()
- */
- get hours(): number;
- /**
- * Shortcut to Date.setHours()
- */
- set hours(value: number);
- /**
- * Returns two digit hour, e.g. 01...10
- * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
- */
- getHoursFormatted(hourCycle?: Intl.LocaleHourCycleKey): string;
- /**
- * Get the meridiem of the date. E.g. AM or PM.
- * If the {@link locale} provides a "dayPeriod" then this will be returned,
- * otherwise it will return AM or PM.
- * @param locale
- */
- meridiem(locale?: string): string;
- /**
- * Shortcut to Date.getDate()
- */
- get date(): number;
- /**
- * Shortcut to Date.setDate()
- */
- set date(value: number);
- /**
- * Return two digit date
- */
- get dateFormatted(): string;
- /**
- * Shortcut to Date.getDay()
- */
- get weekDay(): number;
- /**
- * Shortcut to Date.getMonth()
- */
- get month(): number;
- /**
- * Shortcut to Date.setMonth()
- */
- set month(value: number);
- /**
- * Return two digit, human expected month. E.g. January = 1, December = 12
- */
- get monthFormatted(): string;
- /**
- * Shortcut to Date.getFullYear()
- */
- get year(): number;
- /**
- * Shortcut to Date.setFullYear()
- */
- set year(value: number);
- /**
- * Gets the week of the year
- */
- get week(): number;
- /**
- * Returns the number of weeks in the year
- */
- weeksInWeekYear(): 53 | 52;
- /**
- * Returns true or false depending on if the year is a leap year or not.
- */
- get isLeapYear(): boolean;
- private computeOrdinal;
- private nonLeapLadder;
- private leapLadder;
- private dateTimeRegex;
- private formattingTokens;
- /**
- * Returns a list of month values based on the current locale
- */
- private getAllMonths;
- /**
- * Replaces an expanded token set (e.g. LT/LTS)
- */
- private replaceTokens;
- private match2;
- private match3;
- private match4;
- private match1to2;
- private matchSigned;
- private matchOffset;
- private matchWord;
- private parseTwoDigitYear;
- private offsetFromString;
- /**
- * z = -4, zz = -04, zzz = -0400
- * @param date
- * @param style
- * @private
- */
- private zoneInformation;
- private zoneExpressions;
- private addInput;
- private meridiemMatch;
- private expressions;
- private correctHours;
- private makeParser;
- /**
- * Attempts to create a DateTime from a string.
- * @param input date as string
- * @param localization provides the date template the string is in via the format property
- */
- static fromString(input: string, localization: FormatLocalization): DateTime;
- /**
- * Returns a string format.
- * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
- * for valid templates and locale objects
- * @param template An optional object. If provided, method will use Intl., otherwise the localizations format properties
- * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
- */
- format(template?: DateTimeFormatOptions | string, locale?: string): string;
-}
diff --git a/types/display/calendar/date-display.d.ts b/types/display/calendar/date-display.d.ts
deleted file mode 100644
index 1b6a2f169..000000000
--- a/types/display/calendar/date-display.d.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `date`
- */
-export default class DateDisplay {
- private optionsStore;
- private dates;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
- private _dateToDataValue;
- private _handleDateRange;
- private handleMouseEvents;
- private _updateCalendarView;
- /***
- * Generates a html row that contains the days of the week.
- * @private
- */
- private _daysOfTheWeek;
- private _handleCalendarWeeks;
-}
diff --git a/types/display/calendar/decade-display.d.ts b/types/display/calendar/decade-display.d.ts
deleted file mode 100644
index 75bbb2f3b..000000000
--- a/types/display/calendar/decade-display.d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `seconds`
- */
-export default class DecadeDisplay {
- private _startDecade;
- private _endDecade;
- private optionsStore;
- private dates;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLDivElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/calendar/month-display.d.ts b/types/display/calendar/month-display.d.ts
deleted file mode 100644
index cc633d79a..000000000
--- a/types/display/calendar/month-display.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `month`
- */
-export default class MonthDisplay {
- private optionsStore;
- private dates;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/calendar/year-display.d.ts b/types/display/calendar/year-display.d.ts
deleted file mode 100644
index b58b67f65..000000000
--- a/types/display/calendar/year-display.d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `year`
- */
-export default class YearDisplay {
- private _startYear;
- private _endYear;
- private optionsStore;
- private dates;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/collapse.d.ts b/types/display/collapse.d.ts
deleted file mode 100644
index 20d807f18..000000000
--- a/types/display/collapse.d.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Provides a collapse functionality to the view changes
- */
-export default class Collapse {
- /**
- * Flips the show/hide state of `target`
- * @param target html element to affect.
- */
- static toggle(target: HTMLElement): void;
- /**
- * Skips any animation or timeouts and immediately set the element to show.
- * @param target
- */
- static showImmediately(target: HTMLElement): void;
- /**
- * If `target` is not already showing, then show after the animation.
- * @param target
- */
- static show(target: HTMLElement): void;
- /**
- * Skips any animation or timeouts and immediately set the element to hide.
- * @param target
- */
- static hideImmediately(target: HTMLElement): void;
- /**
- * If `target` is not already hidden, then hide after the animation.
- * @param target HTML Element
- */
- static hide(target: HTMLElement): void;
- /**
- * Gets the transition duration from the `element` by getting css properties
- * `transition-duration` and `transition-delay`
- * @param element HTML Element
- */
- private static getTransitionDurationFromElement;
-}
diff --git a/types/display/index.d.ts b/types/display/index.d.ts
deleted file mode 100644
index 1933159d5..000000000
--- a/types/display/index.d.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-import DateDisplay from './calendar/date-display';
-import MonthDisplay from './calendar/month-display';
-import YearDisplay from './calendar/year-display';
-import DecadeDisplay from './calendar/decade-display';
-import TimeDisplay from './time/time-display';
-import HourDisplay from './time/hour-display';
-import MinuteDisplay from './time/minute-display';
-import SecondDisplay from './time/second-display';
-import { DateTime, Unit } from '../datetime';
-import { ViewUpdateValues } from '../utilities/event-emitter';
-/**
- * Main class for all things display related.
- */
-export default class Display {
- private _widget;
- private _popperInstance;
- private _isVisible;
- private optionsStore;
- private validation;
- private dates;
- dateDisplay: DateDisplay;
- monthDisplay: MonthDisplay;
- yearDisplay: YearDisplay;
- decadeDisplay: DecadeDisplay;
- timeDisplay: TimeDisplay;
- hourDisplay: HourDisplay;
- minuteDisplay: MinuteDisplay;
- secondDisplay: SecondDisplay;
- private _eventEmitters;
- constructor();
- /**
- * Returns the widget body or undefined
- * @private
- */
- get widget(): HTMLElement | undefined;
- get dateContainer(): HTMLElement | undefined;
- get timeContainer(): HTMLElement | undefined;
- /**
- * Returns this visible state of the picker (shown)
- */
- get isVisible(): boolean;
- /**
- * Updates the table for a particular unit. Used when an option as changed or
- * whenever the class list might need to be refreshed.
- * @param unit
- * @private
- */
- _update(unit: ViewUpdateValues): void;
- /**
- * Allows developers to add/remove classes from an element.
- * @param _unit
- * @param _date
- * @param _classes
- * @param _element
- */
- paint(
- _unit: Unit | 'decade',
- _date: DateTime,
- _classes: string[],
- _element: HTMLElement
- ): void;
- /**
- * Shows the picker and creates a Popper instance if needed.
- * Add document click event to hide when clicking outside the picker.
- * fires Events#show
- */
- show(): void;
- private _showSetupViewMode;
- private _showSetDefaultIfNeeded;
- createPopup(
- element: HTMLElement,
- widget: HTMLElement,
- options: any
- ): Promise;
- updatePopup(): void;
- /**
- * Changes the calendar view mode. E.g. month <-> year
- * @param direction -/+ number to move currentViewMode
- * @private
- */
- _showMode(direction?: number): void;
- /**
- * Changes the theme. E.g. light, dark or auto
- * @param theme the theme name
- * @private
- */
- _updateTheme(theme?: 'light' | 'dark' | 'auto'): void;
- _getThemeClass(): string;
- _updateCalendarHeader(): void;
- /**
- * Hides the picker if needed.
- * Remove document click event to hide when clicking outside the picker.
- * fires Events#hide
- */
- hide(): void;
- /**
- * Toggles the picker's open state. Fires a show/hide event depending.
- */
- toggle(): void;
- /**
- * Removes document and data-action click listener and reset the widget
- * @private
- */
- _dispose(): void;
- /**
- * Builds the widgets html template.
- * @private
- */
- private _buildWidget;
- private _buildWidgetSideBySide;
- /**
- * Returns true if the hours, minutes, or seconds component is turned on
- */
- get _hasTime(): boolean;
- /**
- * Returns true if the year, month, or date component is turned on
- */
- get _hasDate(): boolean;
- get _hasDateAndTime(): boolean;
- /**
- * Get the toolbar html based on options like buttons => today
- * @private
- */
- getToolbarElements(): HTMLElement[];
- /***
- * Builds the base header template with next and previous icons
- * @private
- */
- getHeadTemplate(): HTMLElement;
- /**
- * Builds an icon tag as either an ``
- * or with icons => type is `sprites` then a svg tag instead
- * @param iconClass
- * @private
- */
- _iconTag(iconClass: string): HTMLElement | SVGElement;
- /**
- * A document click event to hide the widget if click is outside
- * @private
- * @param e MouseEvent
- */
- private _documentClickEvent;
- /**
- * Click event for any action like selecting a date
- * @param e MouseEvent
- * @private
- */
- private _actionsClickEvent;
- /**
- * Causes the widget to get rebuilt on next show. If the picker is already open
- * then hide and reshow it.
- * @private
- */
- _rebuild(): void;
- refreshCurrentView(): void;
-}
-export type Paint = (
- unit: Unit | 'decade',
- innerDate: DateTime,
- classes: string[],
- element: HTMLElement
-) => void;
diff --git a/types/display/time/hour-display.d.ts b/types/display/time/hour-display.d.ts
deleted file mode 100644
index 7bf5039e3..000000000
--- a/types/display/time/hour-display.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `hours`
- */
-export default class HourDisplay {
- private optionsStore;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/time/minute-display.d.ts b/types/display/time/minute-display.d.ts
deleted file mode 100644
index f040241ee..000000000
--- a/types/display/time/minute-display.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `minutes`
- */
-export default class MinuteDisplay {
- private optionsStore;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/time/second-display.d.ts b/types/display/time/second-display.d.ts
deleted file mode 100644
index adf12a012..000000000
--- a/types/display/time/second-display.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Paint } from '../index';
-/**
- * Creates and updates the grid for `seconds`
- */
-export default class secondDisplay {
- private optionsStore;
- private validation;
- constructor();
- /**
- * Build the container html for the display
- * @private
- */
- getPicker(): HTMLElement;
- /**
- * Populates the grid and updates enabled states
- * @private
- */
- _update(widget: HTMLElement, paint: Paint): void;
-}
diff --git a/types/display/time/time-display.d.ts b/types/display/time/time-display.d.ts
deleted file mode 100644
index 5d545b56f..000000000
--- a/types/display/time/time-display.d.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Creates the clock display
- */
-export default class TimeDisplay {
- private _gridColumns;
- private optionsStore;
- private validation;
- private dates;
- constructor();
- /**
- * Build the container html for the clock display
- * @private
- */
- getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement;
- /**
- * Populates the various elements with in the clock display
- * like the current hour and if the manipulation icons are enabled.
- * @private
- */
- _update(widget: HTMLElement): void;
- /**
- * Creates the table for the clock display depending on what options are selected.
- * @private
- */
- private _grid;
-}
diff --git a/types/locales/ar-SA.d.ts b/types/locales/ar-SA.d.ts
deleted file mode 100644
index c75a5cf3e..000000000
--- a/types/locales/ar-SA.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'ar-SA';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => any;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/ar.d.ts b/types/locales/ar.d.ts
deleted file mode 100644
index d0436f8a1..000000000
--- a/types/locales/ar.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'ar';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => any;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/de.d.ts b/types/locales/de.d.ts
deleted file mode 100644
index 5773e96bb..000000000
--- a/types/locales/de.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'de';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LTS: string;
- LT: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/es.d.ts b/types/locales/es.d.ts
deleted file mode 100644
index 9d28bf2ba..000000000
--- a/types/locales/es.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'es';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- startOfTheWeek: number;
- locale: string;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/fi.d.ts b/types/locales/fi.d.ts
deleted file mode 100644
index acc2d4796..000000000
--- a/types/locales/fi.d.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-declare const name = 'fi';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- l: string;
- ll: string;
- lll: string;
- llll: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/fr.d.ts b/types/locales/fr.d.ts
deleted file mode 100644
index a1e2eeae1..000000000
--- a/types/locales/fr.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'fr';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/hy.d.ts b/types/locales/hy.d.ts
deleted file mode 100644
index ac8bf5967..000000000
--- a/types/locales/hy.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'hy';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => any;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/it.d.ts b/types/locales/it.d.ts
deleted file mode 100644
index 3fc8084b6..000000000
--- a/types/locales/it.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'it';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/nl.d.ts b/types/locales/nl.d.ts
deleted file mode 100644
index da95cb72f..000000000
--- a/types/locales/nl.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'nl';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/pl.d.ts b/types/locales/pl.d.ts
deleted file mode 100644
index e456643cb..000000000
--- a/types/locales/pl.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'pl';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/ro.d.ts b/types/locales/ro.d.ts
deleted file mode 100644
index 6bc840fd5..000000000
--- a/types/locales/ro.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'ro';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => any;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/ru.d.ts b/types/locales/ru.d.ts
deleted file mode 100644
index 6b36bf795..000000000
--- a/types/locales/ru.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'ru';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => any;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/sl.d.ts b/types/locales/sl.d.ts
deleted file mode 100644
index 88cc6b748..000000000
--- a/types/locales/sl.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'sl';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/locales/tr.d.ts b/types/locales/tr.d.ts
deleted file mode 100644
index 020a33dd1..000000000
--- a/types/locales/tr.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-declare const name = 'tr';
-declare const localization: {
- today: string;
- clear: string;
- close: string;
- selectMonth: string;
- previousMonth: string;
- nextMonth: string;
- selectYear: string;
- previousYear: string;
- nextYear: string;
- selectDecade: string;
- previousDecade: string;
- nextDecade: string;
- previousCentury: string;
- nextCentury: string;
- pickHour: string;
- incrementHour: string;
- decrementHour: string;
- pickMinute: string;
- incrementMinute: string;
- decrementMinute: string;
- pickSecond: string;
- incrementSecond: string;
- decrementSecond: string;
- toggleMeridiem: string;
- selectTime: string;
- selectDate: string;
- dayViewHeaderFormat: {
- month: string;
- year: string;
- };
- locale: string;
- startOfTheWeek: number;
- dateFormats: {
- LT: string;
- LTS: string;
- L: string;
- LL: string;
- LLL: string;
- LLLL: string;
- };
- ordinal: (n: any) => string;
- format: string;
-};
-export { localization, name };
diff --git a/types/plugins/bi-one.d.ts b/types/plugins/bi-one.d.ts
deleted file mode 100644
index e712db59e..000000000
--- a/types/plugins/bi-one.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-declare const biOneIcons: {
- type: string;
- time: string;
- date: string;
- up: string;
- down: string;
- previous: string;
- next: string;
- today: string;
- clear: string;
- close: string;
-};
-declare const load: (_: any, __: any, tdFactory: any) => void;
-export { biOneIcons, load };
diff --git a/types/plugins/customDateFormat.d.ts b/types/plugins/customDateFormat.d.ts
deleted file mode 100644
index 71bcbd724..000000000
--- a/types/plugins/customDateFormat.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const _default: () => void;
-export { _default as default };
diff --git a/types/plugins/fa-five.d.ts b/types/plugins/fa-five.d.ts
deleted file mode 100644
index 300b0548c..000000000
--- a/types/plugins/fa-five.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-declare const faFiveIcons: {
- type: string;
- time: string;
- date: string;
- up: string;
- down: string;
- previous: string;
- next: string;
- today: string;
- clear: string;
- close: string;
-};
-declare const load: (_: any, __: any, tdFactory: any) => void;
-export { faFiveIcons, load };
diff --git a/types/plugins/moment-parse.d.ts b/types/plugins/moment-parse.d.ts
deleted file mode 100644
index f7ea59507..000000000
--- a/types/plugins/moment-parse.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const _default: (option: any, tdClasses: any, tdFactory: any) => void;
-export { _default as default };
diff --git a/types/tempus-dominus.d.ts b/types/tempus-dominus.d.ts
deleted file mode 100644
index 42b4777b2..000000000
--- a/types/tempus-dominus.d.ts
+++ /dev/null
@@ -1,234 +0,0 @@
-import Display from './display/index';
-import Dates from './dates';
-import { DateTime, DateTimeFormatOptions, Unit } from './datetime';
-import Namespace from './utilities/namespace';
-import Options from './utilities/options';
-import DefaultOptions, {
- DefaultEnLocalization,
-} from './utilities/default-options';
-/**
- * A robust and powerful date/time picker component.
- */
-declare class TempusDominus {
- _subscribers: {
- [key: string]: ((event: any) => Record)[];
- };
- private _isDisabled;
- private _toggle;
- private _currentPromptTimeTimeout;
- private actions;
- private optionsStore;
- private _eventEmitters;
- display: Display;
- dates: Dates;
- constructor(element: HTMLElement, options?: Options);
- get viewDate(): DateTime;
- set viewDate(value: DateTime);
- /**
- * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.
- * @param options
- * @param reset
- * @public
- */
- updateOptions(options: any, reset?: boolean): void;
- /**
- * Toggles the picker open or closed. If the picker is disabled, nothing will happen.
- * @public
- */
- toggle(): void;
- /**
- * Shows the picker unless the picker is disabled.
- * @public
- */
- show(): void;
- /**
- * Hides the picker unless the picker is disabled.
- * @public
- */
- hide(): void;
- /**
- * Disables the picker and the target input field.
- * @public
- */
- disable(): void;
- /**
- * Enables the picker and the target input field.
- * @public
- */
- enable(): void;
- /**
- * Clears all the selected dates
- * @public
- */
- clear(): void;
- /**
- * Allows for a direct subscription to picker events, without having to use addEventListener on the element.
- * @param eventTypes See Namespace.Events
- * @param callbacks Function to call when event is triggered
- * @public
- */
- subscribe(
- eventTypes: string | string[],
- callbacks: (event: any) => void | ((event: any) => void)[]
- ):
- | {
- unsubscribe: () => void;
- }
- | {
- unsubscribe: () => void;
- }[];
- /**
- * Hides the picker and removes event listeners
- */
- dispose(): void;
- /**
- * Updates the options to use the provided language.
- * THe language file must be loaded first.
- * @param language
- */
- locale(language: string): void;
- /**
- * Triggers an event like ChangeEvent when the picker has updated the value
- * of a selected date.
- * @param event Accepts a BaseEvent object.
- * @private
- */
- private _triggerEvent;
- private _publish;
- /**
- * Fires a ViewUpdate event when, for example, the month view is changed.
- * @private
- */
- private _viewUpdate;
- private _unsubscribe;
- /**
- * Merges two Option objects together and validates options type
- * @param config new Options
- * @param mergeTo Options to merge into
- * @param includeDataset When true, the elements data-td attributes will be included in the
- * @private
- */
- private _initializeOptions;
- /**
- * Checks if an input field is being used, attempts to locate one and sets an
- * event listener if found.
- * @private
- */
- private _initializeInput;
- /**
- * Attempts to locate a toggle for the picker and sets an event listener
- * @private
- */
- private _initializeToggle;
- /**
- * If the option is enabled this will render the clock view after a date pick.
- * @param e change event
- * @private
- */
- private _handleAfterChangeEvent;
- /**
- * Event for when the input field changes. This is a class level method so there's
- * something for the remove listener function.
- * @private
- */
- private _inputChangeEvent;
- /**
- * Event for when the toggle is clicked. This is a class level method so there's
- * something for the remove listener function.
- * @private
- */
- private _toggleClickEvent;
-}
-/**
- * Called from a locale plugin.
- * @param l locale object for localization options
- */
-declare const loadLocale: (l: any) => void;
-/**
- * A sets the global localization options to the provided locale name.
- * `loadLocale` MUST be called first.
- * @param l
- */
-declare const locale: (l: string) => void;
-/**
- * Called from a plugin to extend or override picker defaults.
- * @param plugin
- * @param option
- */
-declare const extend: (
- plugin: any,
- option?: any
-) => {
- TempusDominus: typeof TempusDominus;
- extend: any;
- loadLocale: (l: any) => void;
- locale: (l: string) => void;
- Namespace: typeof Namespace;
- DefaultOptions: Options;
- DateTime: typeof DateTime;
- Unit: typeof Unit;
- version: string;
- DefaultEnLocalization: {
- clear?: string;
- close?: string;
- dayViewHeaderFormat?: DateTimeFormatOptions;
- decrementHour?: string;
- decrementMinute?: string;
- decrementSecond?: string;
- incrementHour?: string;
- incrementMinute?: string;
- incrementSecond?: string;
- nextCentury?: string;
- nextDecade?: string;
- nextMonth?: string;
- nextYear?: string;
- pickHour?: string;
- pickMinute?: string;
- pickSecond?: string;
- previousCentury?: string;
- previousDecade?: string;
- previousMonth?: string;
- previousYear?: string;
- selectDate?: string;
- selectDecade?: string;
- selectMonth?: string;
- selectTime?: string;
- selectYear?: string;
- startOfTheWeek?: number;
- today?: string;
- /**
- * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.
- * @param options
- * @param reset
- * @public
- */
- toggleMeridiem?: string;
- dateFormats?: {
- L?: string;
- LL?: string;
- LLL?: string;
- LLLL?: string;
- LT?: string;
- LTS?: string;
- };
- format?: string;
- hourCycle?: Intl.LocaleHourCycleKey;
- locale?: string;
- ordinal?: (n: number) => any;
- };
-};
-declare const version = '6.7.10';
-export {
- TempusDominus,
- extend,
- loadLocale,
- locale,
- Namespace,
- DefaultOptions,
- DateTime,
- Unit,
- version,
- DateTimeFormatOptions,
- Options,
- DefaultEnLocalization,
-};
diff --git a/types/utilities/action-types.d.ts b/types/utilities/action-types.d.ts
deleted file mode 100644
index 37ed9f4f1..000000000
--- a/types/utilities/action-types.d.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-declare enum ActionTypes {
- next = 'next',
- previous = 'previous',
- changeCalendarView = 'changeCalendarView',
- selectMonth = 'selectMonth',
- selectYear = 'selectYear',
- selectDecade = 'selectDecade',
- selectDay = 'selectDay',
- selectHour = 'selectHour',
- selectMinute = 'selectMinute',
- selectSecond = 'selectSecond',
- incrementHours = 'incrementHours',
- incrementMinutes = 'incrementMinutes',
- incrementSeconds = 'incrementSeconds',
- decrementHours = 'decrementHours',
- decrementMinutes = 'decrementMinutes',
- decrementSeconds = 'decrementSeconds',
- toggleMeridiem = 'toggleMeridiem',
- togglePicker = 'togglePicker',
- showClock = 'showClock',
- showHours = 'showHours',
- showMinutes = 'showMinutes',
- showSeconds = 'showSeconds',
- clear = 'clear',
- close = 'close',
- today = 'today',
-}
-export default ActionTypes;
diff --git a/types/utilities/calendar-modes.d.ts b/types/utilities/calendar-modes.d.ts
deleted file mode 100644
index d49bb5750..000000000
--- a/types/utilities/calendar-modes.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Unit } from '../datetime';
-import ViewMode from './view-mode';
-declare const CalendarModes: {
- name: keyof ViewMode;
- className: string;
- unit: Unit;
- step: number;
-}[];
-export default CalendarModes;
diff --git a/types/utilities/default-format-localization.d.ts b/types/utilities/default-format-localization.d.ts
deleted file mode 100644
index 1533516f8..000000000
--- a/types/utilities/default-format-localization.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-declare const _default: {
- dateFormats?: {
- L?: string;
- LL?: string;
- LLL?: string;
- LLLL?: string;
- LT?: string;
- LTS?: string;
- };
- format?: string;
- hourCycle?: Intl.LocaleHourCycleKey;
- locale?: string;
- ordinal?: (n: number) => any;
-};
-export default _default;
diff --git a/types/utilities/default-options.d.ts b/types/utilities/default-options.d.ts
deleted file mode 100644
index 74018c359..000000000
--- a/types/utilities/default-options.d.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import Options from './options';
-declare const DefaultOptions: Options;
-export default DefaultOptions;
-export declare const DefaultEnLocalization: {
- clear?: string;
- close?: string;
- dayViewHeaderFormat?: import('../datetime').DateTimeFormatOptions;
- decrementHour?: string;
- decrementMinute?: string;
- decrementSecond?: string;
- incrementHour?: string;
- incrementMinute?: string;
- incrementSecond?: string;
- nextCentury?: string;
- nextDecade?: string;
- nextMonth?: string;
- nextYear?: string;
- pickHour?: string;
- pickMinute?: string;
- pickSecond?: string;
- previousCentury?: string;
- previousDecade?: string;
- previousMonth?: string;
- previousYear?: string;
- selectDate?: string;
- selectDecade?: string;
- selectMonth?: string;
- selectTime?: string;
- selectYear?: string;
- startOfTheWeek?: number;
- today?: string;
- toggleMeridiem?: string;
- dateFormats?: {
- L?: string;
- LL?: string;
- LLL?: string;
- LLLL?: string;
- LT?: string;
- LTS?: string;
- };
- format?: string;
- hourCycle?: Intl.LocaleHourCycleKey;
- locale?: string;
- ordinal?: (n: number) => any;
-};
diff --git a/types/utilities/errors.d.ts b/types/utilities/errors.d.ts
deleted file mode 100644
index 9db12edcb..000000000
--- a/types/utilities/errors.d.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-export declare class TdError extends Error {
- code: number;
-}
-export declare class ErrorMessages {
- private base;
- /**
- * Throws an error indicating that a key in the options object is invalid.
- * @param optionName
- */
- unexpectedOption(optionName: string): void;
- /**
- * Throws an error indicating that one more keys in the options object is invalid.
- * @param optionName
- */
- unexpectedOptions(optionName: string[]): void;
- /**
- * Throws an error when an option is provide an unsupported value.
- * For example a value of 'cheese' for toolbarPlacement which only supports
- * 'top', 'bottom', 'default'.
- * @param optionName
- * @param badValue
- * @param validOptions
- */
- unexpectedOptionValue(
- optionName: string,
- badValue: string,
- validOptions: string[]
- ): void;
- /**
- * Throws an error when an option value is the wrong type.
- * For example a string value was provided to multipleDates which only
- * supports true or false.
- * @param optionName
- * @param badType
- * @param expectedType
- */
- typeMismatch(optionName: string, badType: string, expectedType: string): void;
- /**
- * Throws an error when an option value is outside of the expected range.
- * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.
- * @param optionName
- * @param lower
- * @param upper
- */
- numbersOutOfRange(optionName: string, lower: number, upper: number): void;
- /**
- * Throws an error when a value for a date options couldn't be parsed. Either
- * the option was an invalid string or an invalid Date object.
- * @param optionName
- * @param date
- * @param soft If true, logs a warning instead of an error.
- */
- failedToParseDate(optionName: string, date: any, soft?: boolean): void;
- /**
- * Throws when an element to attach to was not provided in the constructor.
- */
- mustProvideElement(): void;
- /**
- * Throws if providing an array for the events to subscribe method doesn't have
- * the same number of callbacks. E.g., subscribe([1,2], [1])
- */
- subscribeMismatch(): void;
- /**
- * Throws if the configuration has conflicting rules e.g. minDate is after maxDate
- */
- conflictingConfiguration(message?: string): void;
- /**
- * customDateFormat errors
- */
- customDateFormatError(message?: string): void;
- /**
- * Logs a warning if a date option value is provided as a string, instead of
- * a date/datetime object.
- */
- dateString(): void;
- deprecatedWarning(message: string, remediation?: string): void;
- throwError(message: any): void;
- /**
- * Used with an Error Event type if the user selects a date that
- * fails restriction validation.
- */
- failedToSetInvalidDate: string;
- /**
- * Used with an Error Event type when a user changes the value of the
- * input field directly, and does not provide a valid date.
- */
- failedToParseInput: string;
-}
diff --git a/types/utilities/event-emitter.d.ts b/types/utilities/event-emitter.d.ts
deleted file mode 100644
index c0f91ea33..000000000
--- a/types/utilities/event-emitter.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { DateTime, Unit } from '../datetime';
-import ActionTypes from './action-types';
-import { BaseEvent } from './event-types';
-export type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';
-declare class EventEmitter {
- private subscribers;
- subscribe(callback: (value: T) => void): any;
- unsubscribe(index: number): void;
- emit(value?: T): void;
- destroy(): void;
-}
-export declare class EventEmitters {
- triggerEvent: EventEmitter;
- viewUpdate: EventEmitter;
- updateDisplay: EventEmitter;
- action: EventEmitter<{
- e: any;
- action?: ActionTypes;
- }>;
- updateViewDate: EventEmitter;
- destroy(): void;
-}
-export {};
diff --git a/types/utilities/event-types.d.ts b/types/utilities/event-types.d.ts
deleted file mode 100644
index b8ff6197c..000000000
--- a/types/utilities/event-types.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { DateTime } from '../datetime';
-import ViewMode from './view-mode';
-interface BaseEvent {
- type: string;
- viewMode?: keyof ViewMode;
-}
-/**
- * Triggers when setValue fails because of validation rules etc.
- * @event FailEvent
- */
-interface FailEvent extends BaseEvent {
- reason: string;
- date: DateTime;
- oldDate: DateTime;
-}
-/**
- * Triggers when the picker is hidden.
- */
-interface HideEvent extends BaseEvent {
- date: DateTime;
-}
-/**
- * Triggers when a change is successful.
- */
-interface ChangeEvent extends BaseEvent {
- date: DateTime | undefined;
- oldDate: DateTime;
- isClear: boolean;
- isValid: boolean;
-}
-/**
- * Triggers when the view is changed for instance from month to year.
- */
-interface ViewUpdateEvent extends BaseEvent {
- viewDate: DateTime;
-}
-export { BaseEvent, FailEvent, HideEvent, ChangeEvent, ViewUpdateEvent };
diff --git a/types/utilities/namespace.d.ts b/types/utilities/namespace.d.ts
deleted file mode 100644
index e50c1b0aa..000000000
--- a/types/utilities/namespace.d.ts
+++ /dev/null
@@ -1,222 +0,0 @@
-import { ErrorMessages } from './errors';
-/**
- * Events
- */
-declare class Events {
- key: string;
- /**
- * Change event. Fired when the user selects a date.
- * See also EventTypes.ChangeEvent
- */
- change: string;
- /**
- * Emit when the view changes for example from month view to the year view.
- * See also EventTypes.ViewUpdateEvent
- */
- update: string;
- /**
- * Emits when a selected date or value from the input field fails to meet the provided validation rules.
- * See also EventTypes.FailEvent
- */
- error: string;
- /**
- * Show event
- * @event Events#show
- */
- show: string;
- /**
- * Hide event
- * @event Events#hide
- */
- hide: string;
- blur: string;
- focus: string;
- keyup: string;
- keydown: string;
-}
-declare class Css {
- /**
- * The outer element for the widget.
- */
- widget: string;
- /**
- * Hold the previous, next and switcher divs
- */
- calendarHeader: string;
- /**
- * The element for the action to change the calendar view. E.g. month -> year.
- */
- switch: string;
- /**
- * The elements for all the toolbar options
- */
- toolbar: string;
- /**
- * Disables the hover and rounding affect.
- */
- noHighlight: string;
- /**
- * Applied to the widget element when the side by side option is in use.
- */
- sideBySide: string;
- /**
- * The element for the action to change the calendar view, e.g. August -> July
- */
- previous: string;
- /**
- * The element for the action to change the calendar view, e.g. August -> September
- */
- next: string;
- /**
- * Applied to any action that would violate any restriction options. ALso applied
- * to an input field if the disabled function is called.
- */
- disabled: string;
- /**
- * Applied to any date that is less than requested view,
- * e.g. the last day of the previous month.
- */
- old: string;
- /**
- * Applied to any date that is greater than of requested view,
- * e.g. the last day of the previous month.
- */
- new: string;
- /**
- * Applied to any date that is currently selected.
- */
- active: string;
- /**
- * The outer element for the calendar view.
- */
- dateContainer: string;
- /**
- * The outer element for the decades view.
- */
- decadesContainer: string;
- /**
- * Applied to elements within the decade container, e.g. 2020, 2030
- */
- decade: string;
- /**
- * The outer element for the years view.
- */
- yearsContainer: string;
- /**
- * Applied to elements within the years container, e.g. 2021, 2021
- */
- year: string;
- /**
- * The outer element for the month view.
- */
- monthsContainer: string;
- /**
- * Applied to elements within the month container, e.g. January, February
- */
- month: string;
- /**
- * The outer element for the calendar view.
- */
- daysContainer: string;
- /**
- * Applied to elements within the day container, e.g. 1, 2..31
- */
- day: string;
- /**
- * If display.calendarWeeks is enabled, a column displaying the week of year
- * is shown. This class is applied to each cell in that column.
- */
- calendarWeeks: string;
- /**
- * Applied to the first row of the calendar view, e.g. Sunday, Monday
- */
- dayOfTheWeek: string;
- /**
- * Applied to the current date on the calendar view.
- */
- today: string;
- /**
- * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday
- */
- weekend: string;
- rangeIn: string;
- rangeStart: string;
- rangeEnd: string;
- /**
- * The outer element for all time related elements.
- */
- timeContainer: string;
- /**
- * Applied the separator columns between time elements, e.g. hour *:* minute *:* second
- */
- separator: string;
- /**
- * The outer element for the clock view.
- */
- clockContainer: string;
- /**
- * The outer element for the hours selection view.
- */
- hourContainer: string;
- /**
- * The outer element for the minutes selection view.
- */
- minuteContainer: string;
- /**
- * The outer element for the seconds selection view.
- */
- secondContainer: string;
- /**
- * Applied to each element in the hours selection view.
- */
- hour: string;
- /**
- * Applied to each element in the minutes selection view.
- */
- minute: string;
- /**
- * Applied to each element in the seconds selection view.
- */
- second: string;
- /**
- * Applied AM/PM toggle button.
- */
- toggleMeridiem: string;
- /**
- * Applied the element of the current view mode, e.g. calendar or clock.
- */
- show: string;
- /**
- * Applied to the currently showing view mode during a transition
- * between calendar and clock views
- */
- collapsing: string;
- /**
- * Applied to the currently hidden view mode.
- */
- collapse: string;
- /**
- * Applied to the widget when the option display.inline is enabled.
- */
- inline: string;
- /**
- * Applied to the widget when the option display.theme is light.
- */
- lightTheme: string;
- /**
- * Applied to the widget when the option display.theme is dark.
- */
- darkTheme: string;
- /**
- * Used for detecting if the system color preference is dark mode
- */
- isDarkPreferredQuery: string;
-}
-export default class Namespace {
- static NAME: string;
- static dataKey: string;
- static events: Events;
- static css: Css;
- static errorMessages: ErrorMessages;
-}
-export {};
diff --git a/types/utilities/optionConverter.d.ts b/types/utilities/optionConverter.d.ts
deleted file mode 100644
index a8350c9e5..000000000
--- a/types/utilities/optionConverter.d.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { DateTime } from '../datetime';
-import Options, { FormatLocalization } from './options';
-export declare class OptionConverter {
- private static ignoreProperties;
- static deepCopy(input: any): Options;
- private static isValue;
- /**
- * Finds value out of an object based on a string, period delimited, path
- * @param paths
- * @param obj
- */
- static objectPath(paths: string, obj: any): any;
- /**
- * The spread operator caused sub keys to be missing after merging.
- * This is to fix that issue by using spread on the child objects first.
- * Also handles complex options like disabledDates
- * @param provided An option from new providedOptions
- * @param copyTo Destination object. This was added to prevent reference copies
- * @param localization
- * @param path
- */
- static spread(
- provided: any,
- copyTo: any,
- localization: FormatLocalization,
- path?: string
- ): void;
- static processKey(
- key: string,
- value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
- providedType: string,
- defaultType: string,
- path: string,
- localization: FormatLocalization
- ): any;
- static _mergeOptions(providedOptions: Options, mergeTo: Options): Options;
- static _dataToOptions(element: any, options: Options): Options;
- private static normalizeObject;
- /**
- * Attempts to prove `d` is a DateTime or Date or can be converted into one.
- * @param d If a string will attempt creating a date from it.
- * @param localization object containing locale and format settings. Only used with the custom formats
- * @private
- */
- static _dateTypeCheck(
- d: any, //eslint-disable-line @typescript-eslint/no-explicit-any
- localization: FormatLocalization
- ): DateTime | null;
- /**
- * Type checks that `value` is an array of Date or DateTime
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param value Option value
- * @param providedType Used to provide text to error messages
- * @param localization
- */
- static _typeCheckDateArray(
- optionName: string,
- value: any,
- providedType: string,
- localization: FormatLocalization
- ): void;
- /**
- * Type checks that `value` is an array of numbers
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param value Option value
- * @param providedType Used to provide text to error messages
- */
- static _typeCheckNumberArray(
- optionName: string,
- value: any,
- providedType: string
- ): void;
- /**
- * Attempts to convert `d` to a DateTime object
- * @param d value to convert
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param localization object containing locale and format settings. Only used with the custom formats
- */
- static dateConversion(
- d: any, //eslint-disable-line @typescript-eslint/no-explicit-any
- optionName: string,
- localization: FormatLocalization
- ): DateTime;
- private static _flattenDefaults;
- private static getFlattenDefaultOptions;
- /**
- * Some options conflict like min/max date. Verify that these kinds of options
- * are set correctly.
- * @param config
- */
- static _validateConflicts(config: Options): void;
-}
diff --git a/types/utilities/optionProcessor.d.ts b/types/utilities/optionProcessor.d.ts
deleted file mode 100644
index 06d598411..000000000
--- a/types/utilities/optionProcessor.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { FormatLocalization } from './options';
-interface OptionProcessorFunctionArguments {
- key: string;
- value: any;
- providedType: string;
- defaultType: string;
- path: string;
- localization: FormatLocalization;
-}
-export declare function processKey(
- this: void,
- args: OptionProcessorFunctionArguments
-): any;
-export {};
diff --git a/types/utilities/options.d.ts b/types/utilities/options.d.ts
deleted file mode 100644
index e3e7e551d..000000000
--- a/types/utilities/options.d.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-import { DateTime, DateTimeFormatOptions } from '../datetime';
-import ViewMode from './view-mode';
-export default interface Options {
- allowInputToggle?: boolean;
- container?: HTMLElement;
- dateRange?: boolean;
- debug?: boolean;
- defaultDate?: DateTime;
- display?: {
- toolbarPlacement?: 'top' | 'bottom';
- components?: {
- calendar?: boolean;
- date?: boolean;
- month?: boolean;
- year?: boolean;
- decades?: boolean;
- clock?: boolean;
- hours?: boolean;
- minutes?: boolean;
- seconds?: boolean;
- useTwentyfourHour?: boolean;
- };
- buttons?: {
- today?: boolean;
- close?: boolean;
- clear?: boolean;
- };
- calendarWeeks?: boolean;
- icons?: {
- clear?: string;
- close?: string;
- date?: string;
- down?: string;
- next?: string;
- previous?: string;
- time?: string;
- today?: string;
- type?: 'icons' | 'sprites';
- up?: string;
- };
- viewMode?: keyof ViewMode;
- sideBySide?: boolean;
- inline?: boolean;
- keepOpen?: boolean;
- theme?: 'light' | 'dark' | 'auto';
- placement?: 'top' | 'bottom';
- };
- keepInvalid?: boolean;
- localization?: Localization;
- meta?: Record;
- multipleDates?: boolean;
- multipleDatesSeparator?: string;
- promptTimeOnDateChange?: boolean;
- promptTimeOnDateChangeTransitionDelay?: number;
- restrictions?: {
- minDate?: DateTime;
- maxDate?: DateTime;
- enabledDates?: DateTime[];
- disabledDates?: DateTime[];
- enabledHours?: number[];
- disabledHours?: number[];
- disabledTimeIntervals?: {
- from: DateTime;
- to: DateTime;
- }[];
- daysOfWeekDisabled?: number[];
- };
- stepping?: number;
- useCurrent?: boolean;
- viewDate?: DateTime;
-}
-export interface FormatLocalization {
- dateFormats?: {
- L?: string;
- LL?: string;
- LLL?: string;
- LLLL?: string;
- LT?: string;
- LTS?: string;
- };
- format?: string;
- hourCycle?: Intl.LocaleHourCycleKey;
- locale?: string;
- ordinal?: (n: number) => any;
-}
-export interface Localization extends FormatLocalization {
- clear?: string;
- close?: string;
- dayViewHeaderFormat?: DateTimeFormatOptions;
- decrementHour?: string;
- decrementMinute?: string;
- decrementSecond?: string;
- incrementHour?: string;
- incrementMinute?: string;
- incrementSecond?: string;
- nextCentury?: string;
- nextDecade?: string;
- nextMonth?: string;
- nextYear?: string;
- pickHour?: string;
- pickMinute?: string;
- pickSecond?: string;
- previousCentury?: string;
- previousDecade?: string;
- previousMonth?: string;
- previousYear?: string;
- selectDate?: string;
- selectDecade?: string;
- selectMonth?: string;
- selectTime?: string;
- selectYear?: string;
- startOfTheWeek?: number;
- today?: string;
- toggleMeridiem?: string;
-}
diff --git a/types/utilities/optionsStore.d.ts b/types/utilities/optionsStore.d.ts
deleted file mode 100644
index f8e5a5e15..000000000
--- a/types/utilities/optionsStore.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { DateTime } from '../datetime';
-import ViewMode from './view-mode';
-import Options from './options';
-export declare class OptionsStore {
- options: Options;
- element: HTMLElement;
- input: HTMLInputElement;
- unset: boolean;
- private _currentCalendarViewMode;
- get currentCalendarViewMode(): number;
- set currentCalendarViewMode(value: number);
- _viewDate: DateTime;
- get viewDate(): DateTime;
- set viewDate(v: DateTime);
- /**
- * When switching back to the calendar from the clock,
- * this sets currentView to the correct calendar view.
- */
- refreshCurrentView(): void;
- minimumCalendarViewMode: number;
- currentView: keyof ViewMode;
- get isTwelveHour(): boolean;
-}
diff --git a/types/utilities/service-locator.d.ts b/types/utilities/service-locator.d.ts
deleted file mode 100644
index a954bf9cb..000000000
--- a/types/utilities/service-locator.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export declare type Constructable = new (...args: any[]) => T;
-declare class ServiceLocator {
- private cache;
- locate(identifier: Constructable): T;
-}
-export declare const setupServiceLocator: () => void;
-export declare let serviceLocator: ServiceLocator;
-export {};
diff --git a/types/utilities/typeChecker.d.ts b/types/utilities/typeChecker.d.ts
deleted file mode 100644
index 4496794e7..000000000
--- a/types/utilities/typeChecker.d.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { DateTime } from '../datetime';
-import { FormatLocalization } from './options';
-/**
- * Attempts to prove `d` is a DateTime or Date or can be converted into one.
- * @param d If a string will attempt creating a date from it.
- * @param localization object containing locale and format settings. Only used with the custom formats
- * @private
- */
-export declare function tryConvertToDateTime(
- this: void,
- d: DateTime | Date | string,
- localization: FormatLocalization
-): DateTime | null;
-/**
- * Attempts to convert `d` to a DateTime object
- * @param d value to convert
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param localization object containing locale and format settings. Only used with the custom formats
- */
-export declare function convertToDateTime(
- this: void,
- d: DateTime | Date | string,
- optionName: string,
- localization: FormatLocalization
-): DateTime;
-/**
- * Type checks that `value` is an array of Date or DateTime
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param value Option value
- * @param providedType Used to provide text to error messages
- * @param localization
- */
-export declare function typeCheckDateArray(
- this: void,
- optionName: string,
- value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
- providedType: string,
- localization?: FormatLocalization
-): void;
-/**
- * Type checks that `value` is an array of numbers
- * @param optionName Provides text to error messages e.g. disabledDates
- * @param value Option value
- * @param providedType Used to provide text to error messages
- */
-export declare function typeCheckNumberArray(
- this: void,
- optionName: string,
- value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
- providedType: string
-): void;
diff --git a/types/utilities/view-mode.d.ts b/types/utilities/view-mode.d.ts
deleted file mode 100644
index ae0b3cc81..000000000
--- a/types/utilities/view-mode.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-type ViewMode = {
- clock: any;
- calendar: any;
- months: any;
- years: any;
- decades: any;
-};
-export default ViewMode;
diff --git a/types/validation.d.ts b/types/validation.d.ts
deleted file mode 100644
index 559ef4212..000000000
--- a/types/validation.d.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { DateTime, Unit } from './datetime';
-/**
- * Main class for date validation rules based on the options provided.
- */
-export default class Validation {
- private optionsStore;
- constructor();
- /**
- * Checks to see if the target date is valid based on the rules provided in the options.
- * Granularity can be provided to check portions of the date instead of the whole.
- * @param targetDate
- * @param granularity
- */
- isValid(targetDate: DateTime, granularity?: Unit): boolean;
- private _enabledDisabledDatesIsValid;
- /**
- * Checks to see if the disabledDates option is in use and returns true (meaning invalid)
- * if the `testDate` is with in the array. Granularity is by date.
- * @param testDate
- * @private
- */
- private _isInDisabledDates;
- /**
- * Checks to see if the enabledDates option is in use and returns true (meaning valid)
- * if the `testDate` is with in the array. Granularity is by date.
- * @param testDate
- * @private
- */
- private _isInEnabledDates;
- private _minMaxIsValid;
- private _enabledDisabledHoursIsValid;
- /**
- * Checks to see if the disabledHours option is in use and returns true (meaning invalid)
- * if the `testDate` is with in the array. Granularity is by hours.
- * @param testDate
- * @private
- */
- private _isInDisabledHours;
- /**
- * Checks to see if the enabledHours option is in use and returns true (meaning valid)
- * if the `testDate` is with in the array. Granularity is by hours.
- * @param testDate
- * @private
- */
- private _isInEnabledHours;
- dateRangeIsValid(dates: DateTime[], index: number, target: DateTime): boolean;
-}