Skip to content

Commit

Permalink
Fixed issue #27
Browse files Browse the repository at this point in the history
  • Loading branch information
grizzlymannn committed Sep 1, 2022
1 parent b304b82 commit f3e774f
Show file tree
Hide file tree
Showing 10 changed files with 2,402 additions and 2,356 deletions.
271 changes: 137 additions & 134 deletions app/src/timepicker/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,134 +1,137 @@
import './styles/main.scss';
import './styles/theme.scss';
import type { OptionTypes } from './utils/types';
declare type TypeFunction = () => void;
export default class TimepickerUI {
private _degreesHours;
private _degreesMinutes;
private _options;
private _eventsClickMobile;
private _eventsClickMobileHandler;
private _mutliEventsMove;
private _mutliEventsMoveHandler;
private _clickTouchEvents;
private _element;
private _isMobileView;
private _isTouchMouseMove;
private _disabledTime;
private _cloned;
private _inputEvents;
private _isModalRemove?;
constructor(element: HTMLElement, options?: OptionTypes);
private get modalTemplate();
private get modalElement();
private get clockFace();
private get input();
private get clockHand();
private get circle();
private get tipsWrapper();
private get tipsWrapperFor24h();
private get minutes();
private get hour();
private get AM();
private get PM();
private get minutesTips();
private get hourTips();
private get allValueTips();
private get openElementData();
private get openElement();
private get cancelButton();
private get okButton();
private get activeTypeMode();
private get keyboardClockIcon();
private get footer();
private get wrapper();
/**
* @description The create method that init timepicker
*/
create: () => void;
/**
* @description The open method opens immediately timepicker after init
* @param callback - The callback function triggered when timepicker is open by this method
*/
open: (callback?: (() => void) | undefined) => void;
/**
* @description Closure method closes the timepicker
* @param args - These parameters in this method are optional and order is any. You can set callback function first or boolean,
* or just boolean or just callback. If the boolean is set to true the input will be updating with the current value on picker.
* The callback function start immediately after close, if is invoke. The max parameters length is set to 2
*/
close: (...args: (boolean | TypeFunction)[]) => void;
/**
* @description The destroy method destroy actual instance of picker by cloning element.
* @param callback - The callback function is started after destroyed method. This parameter is optional.
*/
destroy: (callback?: TypeFunction | undefined) => void;
/**
* @description The update method which update timepicker with new options and can create a new instance.
* @param value - The first parameter is a object with key options which is timepicker options and it will be updated to current
* instance and is `required`. The `create` key is a boolean which if is set to true it starting the create() method after invoke update
* function and is optional. The `create` option is useful if you are using destroy and update methods together.
* @param callback - The `callback` function is started after update method. This parameter is optional.
*/
update: (value: {
options: OptionTypes;
create?: boolean;
}, callback?: TypeFunction | undefined) => void;
private _preventClockTypeByCurrentTime;
private _updateInputValueWithCurrentTimeOnStart;
private _checkDisabledValuesOnStart;
private _checkMobileOption;
private _getDisableTime;
private _removeCircleClockClasses24h;
private _setCircleClockClasses24h;
private _setErrorHandler;
private _removeErrorHandler;
private _setOnStartCSSClassesIfClockType24h;
private _setTheme;
private _setInputClassToInputElement;
private _setDataOpenToInputIfDosentExistInWrapper;
private _setClassTopOpenElement;
private _removeBackdrop;
private _setNormalizeClass;
private _setFlexEndToFooterIfNoKeyboardIcon;
private _eventsBundle;
private _handleOpenOnClick;
private _getInputValueOnOpenAndSet;
private _handleCancelButton;
private _handleOkButton;
private _setShowClassToBackdrop;
private _handleBackdropClick;
private _setBgColorToCirleWithHourTips;
private _setBgColorToCircleWithMinutesTips;
private _removeBgColorToCirleWithMinutesTips;
private _setTimepickerClassToElement;
private _setClassActiveToHourOnOpen;
private _setMinutesToClock;
private _setHoursToClock;
private _setTransformToCircleWithSwitchesHour;
private _setTransformToCircleWithSwitchesMinutes;
private _getDestructuringObj;
private _handleAmClick;
private _handlePmClick;
private _handleAnimationClock;
private _handleAnimationSwitchTipsMode;
private _handleClasses24h;
private _handleHourEvents;
private _handleMinutesEvents;
private _handleEventToMoveHand;
private _toggleClassActiveToValueTips;
private _handleMoveHand;
private _setModalTemplate;
private _setScrollbarOrNot;
private _setAnimationToOpen;
private _removeAnimationToClose;
private _handlerViewChange;
private _handleIconChangeView;
private _handlerClickHourMinutes;
private _handleClickOnHourMobile;
private _handleKeyPress;
private _handleEscClick;
private _focusTrapHandler;
private _handleOpenOnEnterFocus;
}
export {};
import './styles/main.scss';
import './styles/theme.scss';
import type { OptionTypes } from './utils/types';
declare type TypeFunction = () => void;
export default class TimepickerUI {
private _degreesHours;
private _degreesMinutes;
private _options;
private _eventsClickMobile;
private _eventsClickMobileHandler;
private _mutliEventsMove;
private _mutliEventsMoveHandler;
private _clickTouchEvents;
private _element;
private _isMobileView;
private _isTouchMouseMove;
private _disabledTime;
private _cloned;
private _inputEvents;
private _isModalRemove?;
constructor(element: HTMLElement, options?: OptionTypes);
private get modalTemplate();
private get modalElement();
private get clockFace();
private get input();
private get clockHand();
private get circle();
private get tipsWrapper();
private get tipsWrapperFor24h();
private get minutes();
private get hour();
private get AM();
private get PM();
private get minutesTips();
private get hourTips();
private get allValueTips();
private get openElementData();
private get openElement();
private get cancelButton();
private get okButton();
private get activeTypeMode();
private get keyboardClockIcon();
private get footer();
private get wrapper();
/**
* @description The create method that init timepicker
*/
create: () => void;
/**
* @description The open method opens immediately timepicker after init
* @param callback - The callback function triggered when timepicker is open by this method
*/
open: (callback?: () => void) => void;
/**
* @description Closure method closes the timepicker
* @param args - These parameters in this method are optional and order is any. You can set callback function first or boolean,
* or just boolean or just callback. If the boolean is set to true the input will be updating with the current value on picker.
* The callback function start immediately after close, if is invoke. The max parameters length is set to 2
*/
close: (...args: (boolean | TypeFunction)[]) => void;
/**
* @description The destroy method destroy actual instance of picker by cloning element.
* @param callback - The callback function is started after destroyed method. This parameter is optional.
*/
destroy: (callback?: TypeFunction) => void;
/**
* @description The update method which update timepicker with new options and can create a new instance.
* @param value - The first parameter is a object with key options which is timepicker options and it will be updated to current
* instance and is `required`. The `create` key is a boolean which if is set to true it starting the create() method after invoke update
* function and is optional. The `create` option is useful if you are using destroy and update methods together.
* @param callback - The `callback` function is started after update method. This parameter is optional.
*/
update: (
value: {
options: OptionTypes;
create?: boolean;
},
callback?: TypeFunction,
) => void;
private _preventClockTypeByCurrentTime;
private _updateInputValueWithCurrentTimeOnStart;
private _checkDisabledValuesOnStart;
private _checkMobileOption;
private _getDisableTime;
private _removeCircleClockClasses24h;
private _setCircleClockClasses24h;
private _setErrorHandler;
private _removeErrorHandler;
private _setOnStartCSSClassesIfClockType24h;
private _setTheme;
private _setInputClassToInputElement;
private _setDataOpenToInputIfDosentExistInWrapper;
private _setClassTopOpenElement;
private _removeBackdrop;
private _setNormalizeClass;
private _setFlexEndToFooterIfNoKeyboardIcon;
private _eventsBundle;
private _handleOpenOnClick;
private _getInputValueOnOpenAndSet;
private _handleCancelButton;
private _handleOkButton;
private _setShowClassToBackdrop;
private _handleBackdropClick;
private _setBgColorToCirleWithHourTips;
private _setBgColorToCircleWithMinutesTips;
private _removeBgColorToCirleWithMinutesTips;
private _setTimepickerClassToElement;
private _setClassActiveToHourOnOpen;
private _setMinutesToClock;
private _setHoursToClock;
private _setTransformToCircleWithSwitchesHour;
private _setTransformToCircleWithSwitchesMinutes;
private _getDestructuringObj;
private _handleAmClick;
private _handlePmClick;
private _handleAnimationClock;
private _handleAnimationSwitchTipsMode;
private _handleClasses24h;
private _handleHourEvents;
private _handleMinutesEvents;
private _handleEventToMoveHand;
private _toggleClassActiveToValueTips;
private _handleMoveHand;
private _setModalTemplate;
private _setScrollbarOrNot;
private _setAnimationToOpen;
private _removeAnimationToClose;
private _handlerViewChange;
private _handleIconChangeView;
private _handlerClickHourMinutes;
private _handleClickOnHourMobile;
private _handleKeyPress;
private _handleEscClick;
private _focusTrapHandler;
private _handleOpenOnEnterFocus;
}
export {};
Loading

0 comments on commit f3e774f

Please sign in to comment.