beesoft-components 0.2.25 → 0.2.26-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs.js +1443 -45
- package/build/index.js +1444 -46
- package/build/index.min.js +6 -6
- package/build/index.min.js.gz +0 -0
- package/build/types/src/components/common-functions.d.ts +4 -0
- package/build/types/src/components/common-interfaces.d.ts +6 -0
- package/build/types/src/components/form/date-time/date-time-functions.d.ts +1 -0
- package/build/types/src/components/form/date-time/date-time.component.d.ts +5 -8
- package/build/types/src/components/form/date-time/date-time.reducer.d.ts +6 -2
- package/build/types/src/components/form/form-control.interface.d.ts +12 -0
- package/build/types/src/components/form/{content-editable-input → input/content-editable-input}/content-editable-input.component.d.ts +8 -8
- package/build/types/src/components/form/input/formatted-input/formats/date/day-month-year/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/date/month-day-year/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/date/year-month-day/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/date-range/day-month-year/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/date-range/month-day-year/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/date-range/year-month-day/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/index.d.ts +9 -0
- package/build/types/src/components/form/input/formatted-input/formats/input-format.enums.d.ts +11 -0
- package/build/types/src/components/form/input/formatted-input/formats/input-format.interfaces.d.ts +23 -0
- package/build/types/src/components/form/input/formatted-input/formats/time/12-hour/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formats/time/24-hour/format.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/formatted-input.component.d.ts +13 -0
- package/build/types/src/components/form/input/formatted-input/parser/format-navigator.d.ts +31 -0
- package/build/types/src/components/form/input/formatted-input/parser/format-parser.d.ts +19 -0
- package/build/types/src/components/form/input/formatted-input/parser/format-renderer.d.ts +9 -0
- package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts +19 -0
- package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts +15 -0
- package/build/types/src/components/form/input/formatted-input/parser/input-slot-creator.d.ts +4 -0
- package/build/types/src/components/form/input/formatted-input/parser/key-processor.d.ts +13 -0
- package/build/types/src/components/form/input/formatted-input/parser/key-type-checker.d.ts +11 -0
- package/build/types/src/components/form/input/formatted-input/parser/parser.interfaces.d.ts +24 -0
- package/build/types/src/components/form/input/formatted-input/parser/part-entry-creator.d.ts +5 -0
- package/build/types/src/components/form/input/formatted-input/parser/part-entry-iterator.d.ts +14 -0
- package/build/types/src/index.d.ts +4 -0
- package/build/types/src/interfaces/iterator.interface.d.ts +7 -0
- package/package.json +5 -2
package/build/index.min.js.gz
CHANGED
|
Binary file
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IToString } from './common-interfaces';
|
|
1
2
|
export declare function getElementByClassNameRecursive(element: Element, className: string): Element;
|
|
2
3
|
export declare function getBrowserLanguage(): string;
|
|
3
4
|
export declare function padNumber(value: number, padCount: number, padCharacter: string): string;
|
|
@@ -10,3 +11,6 @@ export declare function elementHasAnyStyle(element: HTMLElement, styles: Record<
|
|
|
10
11
|
export declare function getElementByCssStylesRecursive(element: HTMLElement, styles: Record<string, string | number>, matchAllStyles?: boolean): any;
|
|
11
12
|
export declare function getAllElementStyleValuesRecursive(element: HTMLElement, style: string, action: (styleValue: string) => boolean, currentValues?: Array<string>): Array<string>;
|
|
12
13
|
export declare function getAllElementStyleValues(style: string, action: (styleValue: string) => boolean): string[];
|
|
14
|
+
export declare function isObject(object: unknown): object is Record<string, never>;
|
|
15
|
+
export declare function isPrimitive(item: unknown): item is string | number | Date | boolean | bigint;
|
|
16
|
+
export declare function containsToString(object: unknown): object is IToString;
|
|
@@ -14,6 +14,7 @@ export declare function getTranslatedYearMatrix(matrixDate: Date, locale: Locale
|
|
|
14
14
|
export declare function getDefaultTime(locale: Locale): string;
|
|
15
15
|
export declare function isDateBetween(checkDate: Date, startComparisonDate: Date, endComparisonDate: Date): boolean;
|
|
16
16
|
export declare function loadLocale(localeToLoad: string): Promise<Locale>;
|
|
17
|
+
export declare function getDateFormatByLocale(locale: string): string;
|
|
17
18
|
export declare function createDefaultColors(): DateTimeColors;
|
|
18
19
|
export declare function parseDate(dateValue: string, locale?: Locale): Date | undefined;
|
|
19
20
|
export declare function parseDateRange(dateRangeValue: string, locale?: Locale): Date[] | undefined;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TemplateFunction } from '../../common/template-outlet/template-outlet.component';
|
|
3
|
+
import { FormInputControl } from '../form-control.interface';
|
|
3
4
|
import { DateTimeCalendarTemplate } from './date-time-calendar.component';
|
|
4
5
|
import { DateTimeScrollerTemplate } from './date-time-scroller.component';
|
|
5
6
|
import { CalendarIconPosition, DateFormatType, DateSelectionType, DateTimeColors, TimeConstraints } from './date-time-types';
|
|
6
|
-
export interface DateTimeProps {
|
|
7
|
-
value?: string | Date | Array<Date>;
|
|
8
|
-
readOnly?: boolean;
|
|
9
|
-
label?: string;
|
|
7
|
+
export interface DateTimeProps extends FormInputControl<string | Date | Array<Date>, Date | Array<Date>> {
|
|
10
8
|
useDefaultDateValue?: boolean;
|
|
9
|
+
useFormattedInput?: boolean;
|
|
11
10
|
allowClear?: boolean;
|
|
12
11
|
locale?: string;
|
|
13
|
-
className?: string;
|
|
14
12
|
dateSelection?: DateSelectionType;
|
|
15
13
|
dateFormat?: DateFormatType;
|
|
16
14
|
timeConstraints?: TimeConstraints;
|
|
@@ -20,7 +18,6 @@ export interface DateTimeProps {
|
|
|
20
18
|
colors?: DateTimeColors;
|
|
21
19
|
selectableDate?: (currentDate: Date) => boolean;
|
|
22
20
|
isValidDate?: (selectedDate: Date) => boolean;
|
|
23
|
-
onChange?: (value?: Date | Array<Date>) => void;
|
|
24
21
|
calendarTemplate?: DateTimeCalendarTemplate;
|
|
25
22
|
dateScrollerTemplate?: DateTimeScrollerTemplate;
|
|
26
23
|
inputTemplate?: DateTimeInputTemplate;
|
|
@@ -30,10 +27,10 @@ export interface DateTimeInputTemplateProps {
|
|
|
30
27
|
readOnly: boolean;
|
|
31
28
|
allowClear: boolean;
|
|
32
29
|
getValue: () => string;
|
|
33
|
-
onFocus: (event:
|
|
30
|
+
onFocus: (event: FocusEvent) => void;
|
|
34
31
|
onInput: (event: React.FormEvent) => void;
|
|
35
32
|
iconPosition: CalendarIconPosition;
|
|
36
33
|
iconElement?: JSX.Element;
|
|
37
34
|
}
|
|
38
35
|
export type DateTimeInputTemplate = TemplateFunction<DateTimeInputTemplateProps>;
|
|
39
|
-
export default function DateTime({ value, readOnly, label, useDefaultDateValue, allowClear, locale, className, dateSelection, dateFormat, timeConstraints, icon, iconPosition, inputElement, colors, selectableDate, isValidDate, onChange, calendarTemplate, dateScrollerTemplate, inputTemplate, }: DateTimeProps): JSX.Element;
|
|
36
|
+
export default function DateTime({ value, readOnly, label, useDefaultDateValue, useFormattedInput, allowClear, locale, className, dateSelection, dateFormat, timeConstraints, icon, iconPosition, inputElement, colors, selectableDate, isValidDate, onChange, calendarTemplate, dateScrollerTemplate, inputTemplate, }: DateTimeProps): JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormattedInputDefaultFormats } from '../input/formatted-input/formats/input-format.enums';
|
|
1
2
|
export declare enum DateTimeActionType {
|
|
2
3
|
DaySelector = 0,
|
|
3
4
|
MonthSelector = 1,
|
|
@@ -9,8 +10,9 @@ export declare enum DateTimeActionType {
|
|
|
9
10
|
SetSelectedDateRange = 7,
|
|
10
11
|
SetSelectedStartDate = 8,
|
|
11
12
|
SetSelectedEndDate = 9,
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
SetInputFormat = 10,
|
|
14
|
+
ClearDates = 11,
|
|
15
|
+
InitializeDates = 12
|
|
14
16
|
}
|
|
15
17
|
export interface DateTimeState {
|
|
16
18
|
currentSelector: DateTimeActionType;
|
|
@@ -19,6 +21,7 @@ export interface DateTimeState {
|
|
|
19
21
|
selectedStartDate?: Date;
|
|
20
22
|
selectedEndDate?: Date;
|
|
21
23
|
dateInitialized: boolean;
|
|
24
|
+
inputFormat?: FormattedInputDefaultFormats;
|
|
22
25
|
}
|
|
23
26
|
export interface DateTimeReducerAction {
|
|
24
27
|
type: DateTimeActionType;
|
|
@@ -27,6 +30,7 @@ export interface DateTimeReducerAction {
|
|
|
27
30
|
selectedStartDate?: Date;
|
|
28
31
|
selectedEndDate?: Date;
|
|
29
32
|
initialDate?: Date | Array<Date>;
|
|
33
|
+
inputFormat?: FormattedInputDefaultFormats;
|
|
30
34
|
}
|
|
31
35
|
declare const reducer: (state: DateTimeState, action: DateTimeReducerAction) => DateTimeState;
|
|
32
36
|
export default reducer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormInputControl<V = unknown, C = undefined> {
|
|
3
|
+
label?: string;
|
|
4
|
+
value?: V;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
onFocus?: (event: FocusEvent) => void;
|
|
8
|
+
onBlur?: (event: FocusEvent) => void;
|
|
9
|
+
onInput?: (event: React.FormEvent) => void;
|
|
10
|
+
onChange?: (value?: C extends undefined ? V : C) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
readOnly?: boolean;
|
|
2
|
+
import { FormInputControl } from '../../form-control.interface';
|
|
3
|
+
export interface ContentEditableInputProps extends FormInputControl<string> {
|
|
5
4
|
debounceTime?: number;
|
|
6
5
|
fillContainer?: boolean;
|
|
7
6
|
leftElement?: JSX.Element;
|
|
8
7
|
rightElement?: JSX.Element;
|
|
9
|
-
className?: string;
|
|
10
8
|
leftElementClassName?: string;
|
|
11
9
|
rightElementClassName?: string;
|
|
12
10
|
isSingleLine?: boolean;
|
|
13
11
|
allowSingleLineScroll?: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onInput?: (event: React.FormEvent) => void;
|
|
12
|
+
onInnerTextChange?: (value: string) => void;
|
|
13
|
+
onInnerHTMLChange?: (value: string) => void;
|
|
17
14
|
onElementCreate?: (element: HTMLElement) => void;
|
|
18
15
|
onLeftElementClick?: (event: React.MouseEvent) => void;
|
|
19
16
|
onRightElementClick?: (event: React.MouseEvent) => void;
|
|
20
17
|
}
|
|
21
18
|
export interface ContentEditableInputRef {
|
|
19
|
+
inputElement?: HTMLElement;
|
|
20
|
+
setInnerText: (innerText: string) => void;
|
|
21
|
+
setInnerHTML: (innerHTML: string) => void;
|
|
22
22
|
focus: () => void;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: React.ForwardRefExoticComponent<ContentEditableInputProps & React.RefAttributes<ContentEditableInputRef
|
|
24
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ContentEditableInputProps & React.RefAttributes<ContentEditableInputRef>>>;
|
|
25
25
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import DayMonthYearFormat from './date/day-month-year/format';
|
|
2
|
+
import MonthDayYearFormat from './date/month-day-year/format';
|
|
3
|
+
import YearMonthDayFormat from './date/year-month-day/format';
|
|
4
|
+
import DayMonthYearRangeFormat from './date-range/day-month-year/format';
|
|
5
|
+
import MonthDayYearRangeFormat from './date-range/month-day-year/format';
|
|
6
|
+
import YearMonthDayRangeFormat from './date-range/year-month-day/format';
|
|
7
|
+
import TwelveHourFormat from './time/12-hour/format';
|
|
8
|
+
import TwentyFourHourFormat from './time/24-hour/format';
|
|
9
|
+
export { DayMonthYearFormat, MonthDayYearFormat, YearMonthDayFormat, DayMonthYearRangeFormat, MonthDayYearRangeFormat, YearMonthDayRangeFormat, TwelveHourFormat, TwentyFourHourFormat, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum FormattedInputDefaultFormats {
|
|
2
|
+
DateDayMonthYear = 0,
|
|
3
|
+
DateMonthDayYear = 1,
|
|
4
|
+
DateYearMonthDay = 2,
|
|
5
|
+
DateRangeDayMonthYear = 3,
|
|
6
|
+
DateRangeMonthDayYear = 4,
|
|
7
|
+
DateRangeYearMonthDay = 5,
|
|
8
|
+
Time12Hour = 6,
|
|
9
|
+
Time24Hour = 7,
|
|
10
|
+
Custom = 8
|
|
11
|
+
}
|
package/build/types/src/components/form/input/formatted-input/formats/input-format.interfaces.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum FormatValueType {
|
|
2
|
+
Text = 0,
|
|
3
|
+
Numeric = 1
|
|
4
|
+
}
|
|
5
|
+
export interface FormatPart {
|
|
6
|
+
characterCount: number;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
inputText?: string;
|
|
9
|
+
isSeparator: boolean;
|
|
10
|
+
allCharactersRequired?: boolean;
|
|
11
|
+
possibleValues?: Array<string>;
|
|
12
|
+
valueType?: FormatValueType;
|
|
13
|
+
minimumValue?: number;
|
|
14
|
+
maximumValue?: number;
|
|
15
|
+
exceedingMaximumValueCausesError?: boolean;
|
|
16
|
+
exceedingMaximumValueCausesTab?: boolean;
|
|
17
|
+
padWithZeros?: boolean;
|
|
18
|
+
addInOutputValue?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface InputFormat {
|
|
21
|
+
deleteShiftsFormatPart?: boolean;
|
|
22
|
+
formatParts: Array<FormatPart>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContentEditableInputProps } from '../content-editable-input/content-editable-input.component';
|
|
3
|
+
import { FormattedInputDefaultFormats } from './formats/input-format.enums';
|
|
4
|
+
import { InputFormat } from './formats/input-format.interfaces';
|
|
5
|
+
export interface FormattedInputProps extends Omit<ContentEditableInputProps, 'placeholder'> {
|
|
6
|
+
format?: InputFormat;
|
|
7
|
+
defaultFormat: FormattedInputDefaultFormats;
|
|
8
|
+
}
|
|
9
|
+
export interface FormattedInputRef {
|
|
10
|
+
focus: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<FormattedInputProps & React.RefAttributes<FormattedInputRef>>>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
export declare class FormatNavigator {
|
|
3
|
+
private static _instance;
|
|
4
|
+
private readonly formatPartList;
|
|
5
|
+
private readonly inputSlotCollection;
|
|
6
|
+
private currentPartIndex;
|
|
7
|
+
private currentCursorPosition;
|
|
8
|
+
private inputElement?;
|
|
9
|
+
private inputSelection;
|
|
10
|
+
private inputRange?;
|
|
11
|
+
private textNode?;
|
|
12
|
+
private constructor();
|
|
13
|
+
static getInstance(format: InputFormat): FormatNavigator;
|
|
14
|
+
getCursorPosition(): number;
|
|
15
|
+
getCurrentPartIndex(): number;
|
|
16
|
+
setInputElement(element: HTMLElement): void;
|
|
17
|
+
setCursorToCurrentPosition(): void;
|
|
18
|
+
setCursorPosition(position: number): void;
|
|
19
|
+
setCursorSelection(start: number, end?: number): void;
|
|
20
|
+
isAtLastPart(): boolean;
|
|
21
|
+
moveHome(): void;
|
|
22
|
+
moveEnd(): void;
|
|
23
|
+
moveCursorLeft(): void;
|
|
24
|
+
moveCursorRight(): void;
|
|
25
|
+
moveToNextInputPart(): void;
|
|
26
|
+
moveToPreviousInputPart(): void;
|
|
27
|
+
private findNextEditablePart;
|
|
28
|
+
private findPreviousEditablePart;
|
|
29
|
+
private setPartIndexByCursorPosition;
|
|
30
|
+
private createInputRangeSelection;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
import { FormatCompleteEvent } from './parser.interfaces';
|
|
3
|
+
export declare class FormatParser {
|
|
4
|
+
private inputValue;
|
|
5
|
+
private readonly keyProcessor;
|
|
6
|
+
private readonly formatNavigator;
|
|
7
|
+
private readonly formatRenderer;
|
|
8
|
+
private readonly inputSlotCollection;
|
|
9
|
+
private readonly inputRuleProcessor;
|
|
10
|
+
private inputElementSet;
|
|
11
|
+
private inputElement?;
|
|
12
|
+
private onFormatComplete?;
|
|
13
|
+
constructor(format: InputFormat, inputValue?: string);
|
|
14
|
+
inputElementCreated(element: HTMLElement): void;
|
|
15
|
+
inputFocused(): void;
|
|
16
|
+
inputValuePassed(inputValue: string): void;
|
|
17
|
+
registerFormatCompleteEvent(onFormatComplete: FormatCompleteEvent): void;
|
|
18
|
+
keyDownHandler(event: KeyboardEvent): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
export declare class FormatRenderer {
|
|
3
|
+
private readonly formatPartList;
|
|
4
|
+
private readonly inputSlotCollection;
|
|
5
|
+
private inputElement?;
|
|
6
|
+
constructor(format: InputFormat);
|
|
7
|
+
setInputElement(element: HTMLElement): void;
|
|
8
|
+
render(): void;
|
|
9
|
+
}
|
package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
export declare class InputRuleProcessor {
|
|
3
|
+
private format;
|
|
4
|
+
private readonly inputSlotCollection;
|
|
5
|
+
private readonly formatNavigator;
|
|
6
|
+
private readonly keyTypeChecker;
|
|
7
|
+
private readonly formatRenderer;
|
|
8
|
+
private readonly formatPartList;
|
|
9
|
+
constructor(format: InputFormat);
|
|
10
|
+
setInputElement(element: HTMLElement): void;
|
|
11
|
+
processKeyPress(event: KeyboardEvent): void;
|
|
12
|
+
processInputValue(value: string): void;
|
|
13
|
+
private processEditRules;
|
|
14
|
+
private shiftFormatParts;
|
|
15
|
+
private processInputRules;
|
|
16
|
+
private addToInputSlot;
|
|
17
|
+
private createNewValue;
|
|
18
|
+
private processSlotRules;
|
|
19
|
+
}
|
package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
import { FormatPartSlot } from './parser.interfaces';
|
|
3
|
+
export declare class InputSlotCollection {
|
|
4
|
+
private static instance;
|
|
5
|
+
private readonly inputSlots;
|
|
6
|
+
private constructor();
|
|
7
|
+
static getInstance(format: InputFormat): InputSlotCollection;
|
|
8
|
+
clearAllSlots(): void;
|
|
9
|
+
getSlot(partIndex: number): FormatPartSlot | undefined;
|
|
10
|
+
getFirstSlot(): FormatPartSlot;
|
|
11
|
+
getNextSlot(currentPartIndex: number): FormatPartSlot | undefined;
|
|
12
|
+
getPreviousSlot(currentPartIndex: number): FormatPartSlot | undefined;
|
|
13
|
+
getLastSlotWithData(): FormatPartSlot;
|
|
14
|
+
allSlotsCompleted(): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
+
import { MovementKeyboardEvent } from './parser.interfaces';
|
|
3
|
+
export declare class KeyProcessor {
|
|
4
|
+
private format;
|
|
5
|
+
private readonly formatNavigator;
|
|
6
|
+
private readonly ruleProcessor;
|
|
7
|
+
private readonly keyTypeChecker;
|
|
8
|
+
private readonly formatRenderer;
|
|
9
|
+
constructor(format: InputFormat);
|
|
10
|
+
setInputElement(element: HTMLElement): void;
|
|
11
|
+
processMovementKey(event: MovementKeyboardEvent): void;
|
|
12
|
+
processKeyPress(event: KeyboardEvent): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EditingKeyboardEvent, MovementKeyboardEvent } from './parser.interfaces';
|
|
2
|
+
export declare class KeyTypeChecker {
|
|
3
|
+
private numberKeys;
|
|
4
|
+
private movementKeys;
|
|
5
|
+
private editingKeys;
|
|
6
|
+
private ignoreKeys;
|
|
7
|
+
isNumberKey(key: string): boolean;
|
|
8
|
+
isMovementKey(event: KeyboardEvent): event is MovementKeyboardEvent;
|
|
9
|
+
isEditingKey(event: KeyboardEvent): event is EditingKeyboardEvent;
|
|
10
|
+
isIgnoreKey(event: KeyboardEvent): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FormatPart } from '../formats/input-format.interfaces';
|
|
2
|
+
export interface FormatPartEntry extends FormatPart {
|
|
3
|
+
startPosition: number;
|
|
4
|
+
endPosition: number;
|
|
5
|
+
}
|
|
6
|
+
export interface FormatPartSlot extends FormatPartEntry {
|
|
7
|
+
partIndex: number;
|
|
8
|
+
partText: string;
|
|
9
|
+
isComplete: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface KeyPressValidationResult {
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
isMovement: boolean;
|
|
14
|
+
key: string;
|
|
15
|
+
isShiftKey: boolean;
|
|
16
|
+
newCursorLocation: number;
|
|
17
|
+
}
|
|
18
|
+
export interface EditingKeyboardEvent extends Omit<KeyboardEvent, 'key'> {
|
|
19
|
+
key: 'Backspace' | 'Delete';
|
|
20
|
+
}
|
|
21
|
+
export interface MovementKeyboardEvent extends Omit<KeyboardEvent, 'key'> {
|
|
22
|
+
key: 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End';
|
|
23
|
+
}
|
|
24
|
+
export type FormatCompleteEvent = (value: string) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IIterator } from '../../../../../interfaces/iterator.interface';
|
|
2
|
+
import { InputFormat } from '../formats/input-format.interfaces';
|
|
3
|
+
import { FormatPartEntry } from './parser.interfaces';
|
|
4
|
+
export declare class PartEntryIterator implements IIterator<FormatPartEntry> {
|
|
5
|
+
private _currentIndex;
|
|
6
|
+
private index;
|
|
7
|
+
private readonly formatParts;
|
|
8
|
+
get currentIndex(): number;
|
|
9
|
+
constructor(format: InputFormat);
|
|
10
|
+
hasNext(): boolean;
|
|
11
|
+
next(): FormatPartEntry | undefined;
|
|
12
|
+
peek(): FormatPartEntry | undefined;
|
|
13
|
+
reset(): void;
|
|
14
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import DateTime from './components/form/date-time/date-time.component';
|
|
2
2
|
import OverlayPanel from './components/overlay/overlay-panel/overlay-panel.component';
|
|
3
|
+
import { DateTimeInputTemplateProps } from './components/form/date-time/date-time.component';
|
|
4
|
+
import { DateTimeScrollerTemplateProps } from './components/form/date-time/date-time-scroller.component';
|
|
5
|
+
import { DateTimeCalendarTemplateProps } from './components/form/date-time/date-time-calendar.component';
|
|
3
6
|
import './index.css';
|
|
4
7
|
import '../src/components/font-awesome';
|
|
5
8
|
export { DateTime, OverlayPanel };
|
|
9
|
+
export type { DateTimeInputTemplateProps, DateTimeScrollerTemplateProps, DateTimeCalendarTemplateProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beesoft-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26-1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Brandon Trabon",
|
|
6
6
|
"keywords": [
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
"build",
|
|
17
17
|
"types"
|
|
18
18
|
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"registry": "https://registry.yarnpkg.com/"
|
|
21
|
+
},
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"main": "build/index.cjs.js",
|
|
21
24
|
"module": "build/index.min.js",
|
|
22
|
-
"types": "types/src/index.d.ts",
|
|
25
|
+
"types": "build/types/src/index.d.ts",
|
|
23
26
|
"dependencies": {
|
|
24
27
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
25
28
|
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|