beesoft-components 0.3.2 → 0.3.4-0

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.
Files changed (59) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +23 -22
  3. package/dist/index.es.js +8490 -0
  4. package/dist/index.es.js.gz +0 -0
  5. package/dist/index.umd.js +51 -0
  6. package/dist/index.umd.js.gz +0 -0
  7. package/dist/style.css +1 -0
  8. package/dist/style.css.gz +0 -0
  9. package/package.json +78 -104
  10. package/types/index.d.ts +323 -0
  11. package/build/index.cjs.js +0 -32807
  12. package/build/index.js +0 -32802
  13. package/build/index.min.js +0 -37
  14. package/build/index.min.js.gz +0 -0
  15. package/build/types/src/components/common/beesoft-transition/beesoft-transition.component.d.ts +0 -22
  16. package/build/types/src/components/common/template-outlet/template-outlet.component.d.ts +0 -8
  17. package/build/types/src/components/common-event-handlers.d.ts +0 -4
  18. package/build/types/src/components/common-functions.d.ts +0 -16
  19. package/build/types/src/components/common-hooks.d.ts +0 -1
  20. package/build/types/src/components/common-interfaces.d.ts +0 -13
  21. package/build/types/src/components/dom-handler.d.ts +0 -30
  22. package/build/types/src/components/font-awesome.d.ts +0 -1
  23. package/build/types/src/components/form/date-time/date-time-calendar.component.d.ts +0 -34
  24. package/build/types/src/components/form/date-time/date-time-context.d.ts +0 -10
  25. package/build/types/src/components/form/date-time/date-time-day-selector.component.d.ts +0 -13
  26. package/build/types/src/components/form/date-time/date-time-format-creator.d.ts +0 -28
  27. package/build/types/src/components/form/date-time/date-time-functions.d.ts +0 -19
  28. package/build/types/src/components/form/date-time/date-time-month-selector.component.d.ts +0 -10
  29. package/build/types/src/components/form/date-time/date-time-range-selector.component.d.ts +0 -11
  30. package/build/types/src/components/form/date-time/date-time-scroller.component.d.ts +0 -19
  31. package/build/types/src/components/form/date-time/date-time-time-selector.component.d.ts +0 -13
  32. package/build/types/src/components/form/date-time/date-time-types.d.ts +0 -48
  33. package/build/types/src/components/form/date-time/date-time-year-selector.component.d.ts +0 -8
  34. package/build/types/src/components/form/date-time/date-time.component.d.ts +0 -36
  35. package/build/types/src/components/form/date-time/date-time.component.stories.d.ts +0 -43
  36. package/build/types/src/components/form/date-time/date-time.reducer.d.ts +0 -36
  37. package/build/types/src/components/form/date-time/hooks/get-date-time-format.hook.d.ts +0 -4
  38. package/build/types/src/components/form/form-control.interface.d.ts +0 -12
  39. package/build/types/src/components/form/input/content-editable-input/content-editable-input.component.d.ts +0 -25
  40. package/build/types/src/components/form/input/content-editable-input/content-editable-input.component.stories.d.ts +0 -6
  41. package/build/types/src/components/form/input/formatted-input/formatted-input.component.d.ts +0 -11
  42. package/build/types/src/components/form/input/formatted-input/formatted-input.component.stories.d.ts +0 -6
  43. package/build/types/src/components/form/input/formatted-input/input-format.interfaces.d.ts +0 -23
  44. package/build/types/src/components/form/input/formatted-input/parser/format-instance-collection.d.ts +0 -13
  45. package/build/types/src/components/form/input/formatted-input/parser/format-navigator.d.ts +0 -31
  46. package/build/types/src/components/form/input/formatted-input/parser/format-parser.d.ts +0 -27
  47. package/build/types/src/components/form/input/formatted-input/parser/format-renderer.d.ts +0 -10
  48. package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts +0 -20
  49. package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts +0 -14
  50. package/build/types/src/components/form/input/formatted-input/parser/input-slot-creator.d.ts +0 -4
  51. package/build/types/src/components/form/input/formatted-input/parser/key-processor.d.ts +0 -14
  52. package/build/types/src/components/form/input/formatted-input/parser/key-type-checker.d.ts +0 -11
  53. package/build/types/src/components/form/input/formatted-input/parser/parser.interfaces.d.ts +0 -24
  54. package/build/types/src/components/form/input/formatted-input/parser/part-entry-creator.d.ts +0 -5
  55. package/build/types/src/components/form/input/formatted-input/parser/part-entry-iterator.d.ts +0 -14
  56. package/build/types/src/components/overlay/overlay-panel/overlay-panel.component.d.ts +0 -23
  57. package/build/types/src/index.d.ts +0 -12
  58. package/build/types/src/interfaces/iterator.interface.d.ts +0 -7
  59. package/build/types/src/setupTests.d.ts +0 -1
Binary file
@@ -1,22 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { TransitionStatus } from 'react-transition-group/Transition';
3
- export interface BeeSoftChildrenTransitionProps {
4
- state: TransitionStatus;
5
- defaultStyle: React.CSSProperties;
6
- transitionStyles: Record<string, React.CSSProperties>;
7
- }
8
- export interface BeeSoftTransitionProps {
9
- start: boolean;
10
- timeout?: number;
11
- defaultStyle?: React.CSSProperties;
12
- transitionStyles?: Record<string, React.CSSProperties>;
13
- showTransitionOptions?: string;
14
- hideTransitionOptions?: string;
15
- unmountOnExit?: boolean;
16
- onEntering?: (node: HTMLElement, isAppearing: boolean) => void;
17
- onEntered?: (node: HTMLElement, isAppearing: boolean) => void;
18
- onExit?: (node: HTMLElement) => void;
19
- onExited?: (node: HTMLElement) => void;
20
- children: (childProps: BeeSoftChildrenTransitionProps) => ReactNode | Array<ReactNode>;
21
- }
22
- export default function BeeSoftTransition({ start, timeout, defaultStyle, transitionStyles, showTransitionOptions, hideTransitionOptions, unmountOnExit, onEntering, onEntered, onExit, onExited, children, }: BeeSoftTransitionProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export type TemplateFunction<TF> = (props: TF, children?: React.ReactNode | React.ReactNodeArray) => JSX.Element;
3
- export interface TemplateOutletProps<TP> {
4
- props: TP;
5
- template: TemplateFunction<TP>;
6
- children?: React.ReactNode | React.ReactNodeArray;
7
- }
8
- export default function TemplateOutlet<T>({ template, props, children }: TemplateOutletProps<T>): JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function bindDocumentClickListener(element: HTMLElement, callback: (isClickedWithin: boolean) => void, otherElements?: Array<HTMLElement>): (event: MouseEvent) => void;
2
- export declare function unbindDocumentClickListener(clickListener: (event: MouseEvent) => void): void;
3
- export declare function bindDocumentEventListener<E extends keyof DocumentEventMap>(event: E, listener: (evt: Event) => void): (evt: Event) => void;
4
- export declare function unbindDocumentEventListener<E extends keyof DocumentEventMap>(event: E, listener: (evt: Event) => void): void;
@@ -1,16 +0,0 @@
1
- import { IToString } from './common-interfaces';
2
- export declare function getElementByClassNameRecursive(element: Element, className: string): Element;
3
- export declare function getBrowserLanguage(): string;
4
- export declare function padNumber(value: number, padCount: number, padCharacter: string): string;
5
- export declare function generateNumberArray<T>(startingNumber: number, endingNumber: number, convertFunction?: (value: number) => T): T[];
6
- export declare function isEventOutsideTarget(event: Event, target: HTMLElement): boolean;
7
- export declare function isEventWithinTarget(event: Event, target: HTMLElement): boolean;
8
- export declare function isElementWithinTarget(element: HTMLElement, target: HTMLElement): boolean;
9
- export declare function elementHasAllStyles(element: HTMLElement, styles: Record<string, string | number>): boolean;
10
- export declare function elementHasAnyStyle(element: HTMLElement, styles: Record<string, string | number>): boolean;
11
- export declare function getElementByCssStylesRecursive(element: HTMLElement, styles: Record<string, string | number>, matchAllStyles?: boolean): any;
12
- export declare function getAllElementStyleValuesRecursive(element: HTMLElement, style: string, action: (styleValue: string) => boolean, currentValues?: Array<string>): Array<string>;
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;
@@ -1 +0,0 @@
1
- export declare function useKeyDown(keyCode: string | Array<string>): boolean;
@@ -1,13 +0,0 @@
1
- export interface MarkupEvents {
2
- markupCreated?: (element: Element) => void;
3
- }
4
- export interface WindowSize {
5
- width: number;
6
- height: number;
7
- }
8
- export interface IToString {
9
- toString(): string;
10
- }
11
- export interface IDisposable {
12
- dispose: () => void;
13
- }
@@ -1,30 +0,0 @@
1
- import { WindowSize } from './common-interfaces';
2
- export declare enum DomTargetPosition {
3
- TopLeft = 0,
4
- TopRight = 1,
5
- BottomLeft = 2,
6
- BottomRight = 3
7
- }
8
- export declare enum DomElementAlignment {
9
- TopLeft = 0,
10
- TopRight = 1,
11
- BottomLeft = 2,
12
- BottomRight = 3
13
- }
14
- export interface DomOffScreenLocation {
15
- left: boolean;
16
- top: boolean;
17
- right: boolean;
18
- bottom: boolean;
19
- }
20
- export interface DomElementPosition {
21
- top: number;
22
- left: number;
23
- }
24
- export declare class DomHandler {
25
- static positionToTarget(target: HTMLElement, position?: DomTargetPosition): DomElementPosition;
26
- static positionElementToTarget(element: HTMLElement, target: HTMLElement, elementAlignment?: DomElementAlignment, targetPosition?: DomTargetPosition): DomElementPosition;
27
- static positionElementToTargetOnScreen(element: HTMLElement, target: HTMLElement, elementAlignment?: DomElementAlignment, targetPosition?: DomTargetPosition): DomElementPosition;
28
- static determineOffScreenLocation(rectangle: DOMRect): DomOffScreenLocation | undefined;
29
- static getScreenDimensions(): WindowSize;
30
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { TemplateFunction } from '../../common/template-outlet/template-outlet.component';
3
- import { DayType } from './date-time-functions';
4
- import { CalendarSelectionMode } from './date-time-types';
5
- import { DateTimeReducerAction } from './date-time.reducer';
6
- export interface DateTimeCalendarProps {
7
- viewDate: Date;
8
- selectedDate?: Date;
9
- selectedStartDate?: Date;
10
- selectedEndDate?: Date;
11
- selectionMode?: CalendarSelectionMode;
12
- locale?: Locale;
13
- onDateSelected?: (date: Date, options?: Record<string, any>) => void;
14
- selectableDate?: (currentDate: Date) => boolean;
15
- isValidDate?: (selectedDate: Date) => boolean;
16
- dispatcher?: React.Dispatch<DateTimeReducerAction>;
17
- }
18
- export interface DateTimeCalendarTemplateProps {
19
- viewDate: Date;
20
- selectedDate?: Date;
21
- selectedStartDate?: Date;
22
- selectedEndDate?: Date;
23
- selectionMode?: CalendarSelectionMode;
24
- locale?: Locale;
25
- weekDays?: Array<string>;
26
- monthMatrix?: Array<Array<DayType>>;
27
- selectableDate?: (currentDate: Date) => boolean;
28
- isValidDate?: (selectedDate: Date) => boolean;
29
- onDateClicked: (date: Date) => void;
30
- isSelectedDate: (currentDate: Date) => boolean;
31
- isInSelectedDateRange: (currentDate: Date) => boolean;
32
- }
33
- export type DateTimeCalendarTemplate = TemplateFunction<DateTimeCalendarTemplateProps>;
34
- export default function DateTimeCalendar({ viewDate, selectedDate, selectedStartDate, selectedEndDate, selectionMode, locale, onDateSelected, selectableDate, isValidDate, dispatcher, }: DateTimeCalendarProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { DateTimeCalendarTemplate } from './date-time-calendar.component';
3
- import { DateTimeScrollerTemplate } from './date-time-scroller.component';
4
- import { DateTimeColors } from './date-time-types';
5
- export interface DateTimeContextProps {
6
- calendarTemplate?: DateTimeCalendarTemplate;
7
- dateScrollerTemplate?: DateTimeScrollerTemplate;
8
- colors: DateTimeColors;
9
- }
10
- export declare const DateTimeContext: import("react").Context<DateTimeContextProps>;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { DateTimeReducerAction } from './date-time.reducer';
3
- export interface DateTimeDaySelectorProps {
4
- selectedDate?: Date;
5
- viewDate: Date;
6
- locale: Locale;
7
- showTimeSelector: boolean;
8
- selectableDate?: (currentDate: Date) => boolean;
9
- isValidDate?: (selectedDate: Date) => boolean;
10
- onChange?: (value?: Date | Array<Date>) => void;
11
- dispatcher: React.Dispatch<DateTimeReducerAction>;
12
- }
13
- export default function DateTimeDaySelector({ selectedDate, viewDate, locale, showTimeSelector, selectableDate, isValidDate, onChange, dispatcher, }: DateTimeDaySelectorProps): JSX.Element;
@@ -1,28 +0,0 @@
1
- import { InputFormat } from '../input/formatted-input/input-format.interfaces';
2
- import { DateSelectionType } from './date-time-types';
3
- export declare class DateTimeFormatCreator {
4
- private dateSelection;
5
- private readonly dateFormat;
6
- private readonly timeFormat;
7
- private readonly use24HourTime;
8
- private monthPart?;
9
- private dayPart?;
10
- private yearPart?;
11
- private twelveHourPart?;
12
- private twentyFourHourPart?;
13
- private minutePart?;
14
- private meridianPart?;
15
- get is24HourTime(): boolean;
16
- constructor(dateSelection: DateSelectionType, localeCode: string);
17
- createInputFormat(): InputFormat;
18
- private createDateFormat;
19
- private createTimeFormat;
20
- private createDateRangeFormat;
21
- private createDateTimeFormat;
22
- private createMonthDayYearFormatParts;
23
- private createDayMonthYearFormatParts;
24
- private createYearMonthDayFormatParts;
25
- private createTwelveHourFormatParts;
26
- private createTwentyFourHourFormatParts;
27
- private createDateParts;
28
- }
@@ -1,19 +0,0 @@
1
- import { Locale } from 'date-fns';
2
- import { DateTimeColors } from './date-time-types';
3
- export type DayType = {
4
- dayValue: Date | null;
5
- isCurrent: boolean;
6
- };
7
- export declare function getMonthMatrix(matrixDate: Date, locale: Locale, loadOtherMonths?: boolean): DayType[][];
8
- export declare function getTranslatedDays(locale: Locale): string[];
9
- export declare function getTranslatedMonthMatrix(locale: Locale): {
10
- monthNumber: number;
11
- monthName: string;
12
- }[][];
13
- export declare function getTranslatedYearMatrix(matrixDate: Date, locale: Locale): string[][];
14
- export declare function getDefaultTime(locale: Locale): string;
15
- export declare function isDateBetween(checkDate: Date, startComparisonDate: Date, endComparisonDate: Date): boolean;
16
- export declare function loadLocale(localeToLoad: string): Promise<Locale>;
17
- export declare function createDefaultColors(): DateTimeColors;
18
- export declare function parseDate(dateValue: string, locale?: Locale): Date | undefined;
19
- export declare function parseDateRange(dateRangeValue: string, locale?: Locale): Date[] | undefined;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { DateSelectionType } from './date-time-types';
3
- import { DateTimeReducerAction } from './date-time.reducer';
4
- export interface DateTimeMonthSelectorProps {
5
- viewDate: Date;
6
- locale: Locale;
7
- dateSelection?: DateSelectionType;
8
- dispatcher: React.Dispatch<DateTimeReducerAction>;
9
- }
10
- export default function DateTimeMonthSelector({ viewDate, locale, dateSelection, dispatcher, }: DateTimeMonthSelectorProps): JSX.Element;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { DateTimeReducerAction } from './date-time.reducer';
3
- export interface DateTimeRangeSelectorProps {
4
- viewDate: Date;
5
- selectedStartDate?: Date;
6
- selectedEndDate?: Date;
7
- locale: Locale;
8
- onChange?: (value?: Date | Array<Date>) => void;
9
- dispatcher: React.Dispatch<DateTimeReducerAction>;
10
- }
11
- export default function DateTimeRangeSelector({ viewDate, selectedStartDate, selectedEndDate, locale, onChange, dispatcher, }: DateTimeRangeSelectorProps): JSX.Element;
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { TemplateFunction } from '../../common/template-outlet/template-outlet.component';
3
- import { DateScrollerType } from './date-time-types';
4
- export interface DateTimeScrollerProps {
5
- title: string;
6
- scrollerType: DateScrollerType;
7
- onTitleClicked?: () => void;
8
- onMovePrevious: () => void;
9
- onMoveNext: () => void;
10
- }
11
- export interface DateTimeScrollerTemplateProps {
12
- title: string;
13
- scrollerType: DateScrollerType;
14
- onTitleClicked?: () => void;
15
- onMovePrevious: () => void;
16
- onMoveNext: () => void;
17
- }
18
- export type DateTimeScrollerTemplate = TemplateFunction<DateTimeScrollerTemplateProps>;
19
- export default function DateTimeScroller({ title, scrollerType, onTitleClicked, onMovePrevious, onMoveNext, }: DateTimeScrollerProps): JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { TimeConstraints, TimeFormatType } from './date-time-types';
3
- import { DateTimeReducerAction } from './date-time.reducer';
4
- export interface DateTimeTimeSelectorProps {
5
- viewDate: Date;
6
- showDateSelector: boolean;
7
- locale: Locale;
8
- timeFormat?: TimeFormatType;
9
- timeConstraints?: TimeConstraints;
10
- onChange?: (value?: Date | Array<Date>) => void;
11
- dispatcher: React.Dispatch<DateTimeReducerAction>;
12
- }
13
- export default function DateTimeTimeSelector({ viewDate, showDateSelector, locale, timeFormat, timeConstraints, onChange, dispatcher, }: DateTimeTimeSelectorProps): JSX.Element;
@@ -1,48 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export interface IncrementConstraint {
3
- min: number;
4
- max: number;
5
- step: number;
6
- }
7
- export interface TimeConstraints {
8
- hours?: IncrementConstraint;
9
- minutes?: IncrementConstraint;
10
- seconds?: IncrementConstraint;
11
- }
12
- export interface DateTimeColors {
13
- inputBgColor?: string | CSSProperties;
14
- inputBorderColor?: string | CSSProperties;
15
- readOnlyInputBgColor?: string | CSSProperties;
16
- selectedDateColor?: string | CSSProperties;
17
- todayDateColor?: string | CSSProperties;
18
- }
19
- export declare enum DateSelectionType {
20
- DateTime = 0,
21
- DateOnly = 1,
22
- TimeOnly = 2,
23
- DateRange = 3
24
- }
25
- export declare enum DateScrollerType {
26
- Day = 0,
27
- Month = 1,
28
- Year = 2,
29
- Range = 3
30
- }
31
- export declare enum DateFormatType {
32
- Short = 0,
33
- Medium = 1,
34
- Long = 2
35
- }
36
- export declare enum TimeFormatType {
37
- TwelveHour = 0,
38
- TwentyFourHour = 1
39
- }
40
- export declare enum CalendarSelectionMode {
41
- Normal = 0,
42
- Range = 1
43
- }
44
- export declare enum CalendarIconPosition {
45
- Right = 0,
46
- Left = 1,
47
- None = 2
48
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { DateTimeReducerAction } from './date-time.reducer';
3
- export interface DateTimeYearSelectorProps {
4
- viewDate: Date;
5
- locale: Locale;
6
- dispatcher: React.Dispatch<DateTimeReducerAction>;
7
- }
8
- export default function DateTimeYearSelector({ viewDate, locale, dispatcher }: DateTimeYearSelectorProps): JSX.Element;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { TemplateFunction } from '../../common/template-outlet/template-outlet.component';
3
- import { FormInputControl } from '../form-control.interface';
4
- import { DateTimeCalendarTemplate } from './date-time-calendar.component';
5
- import { DateTimeScrollerTemplate } from './date-time-scroller.component';
6
- import { CalendarIconPosition, DateFormatType, DateSelectionType, DateTimeColors, TimeConstraints } from './date-time-types';
7
- export interface DateTimeProps extends FormInputControl<string | Date | Array<Date>, Date | Array<Date>> {
8
- useDefaultDateValue?: boolean;
9
- useFormattedInput?: boolean;
10
- allowClear?: boolean;
11
- locale?: string;
12
- dateSelection?: DateSelectionType;
13
- dateFormat?: DateFormatType;
14
- timeConstraints?: TimeConstraints;
15
- icon?: JSX.Element;
16
- iconPosition?: CalendarIconPosition;
17
- inputElement?: HTMLElement;
18
- colors?: DateTimeColors;
19
- selectableDate?: (currentDate: Date) => boolean;
20
- isValidDate?: (selectedDate: Date) => boolean;
21
- calendarTemplate?: DateTimeCalendarTemplate;
22
- dateScrollerTemplate?: DateTimeScrollerTemplate;
23
- inputTemplate?: DateTimeInputTemplate;
24
- }
25
- export interface DateTimeInputTemplateProps {
26
- label?: string;
27
- readOnly: boolean;
28
- allowClear: boolean;
29
- getValue: () => string;
30
- onFocus: (event: FocusEvent) => void;
31
- onInput: (event: React.FormEvent) => void;
32
- iconPosition: CalendarIconPosition;
33
- iconElement?: JSX.Element;
34
- }
35
- export type DateTimeInputTemplate = TemplateFunction<DateTimeInputTemplateProps>;
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,43 +0,0 @@
1
- import { Meta, Story } from '@storybook/react';
2
- import { DateTimeProps } from './date-time.component';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Default: Story<DateTimeProps>;
6
- export declare const FormattedDateInput: Story<DateTimeProps>;
7
- export declare const MultipleFormattedDateInputs: Story<DateTimeProps>;
8
- export declare const FormattedDateTimeInput: Story<DateTimeProps>;
9
- export declare const FormattedDateTime24HourInput: Story<DateTimeProps>;
10
- export declare const FormattedDateRangeInput: Story<DateTimeProps>;
11
- export declare const FormattedTimeInput: Story<DateTimeProps>;
12
- export declare const Formatted24TimeInput: Story<DateTimeProps>;
13
- export declare const AllowClear: Story<DateTimeProps>;
14
- export declare const SetDateValue: Story<DateTimeProps>;
15
- export declare const CurrentDateTime: Story<DateTimeProps>;
16
- export declare const IconOnLeft: Story<DateTimeProps>;
17
- export declare const NoIcon: Story<DateTimeProps>;
18
- export declare const ChangeIcon: Story<DateTimeProps>;
19
- export declare const InputTemplate: Story<DateTimeProps>;
20
- export declare const DarkMode: Story<DateTimeProps>;
21
- export declare const IsoDateTime: Story<DateTimeProps>;
22
- export declare const DateOnly: Story<DateTimeProps>;
23
- export declare const TimeOnly: Story<DateTimeProps>;
24
- export declare const TimeOnly24Hour: Story<DateTimeProps>;
25
- export declare const DateRange: Story<DateTimeProps>;
26
- export declare const DateRangeSetValue: Story<DateTimeProps>;
27
- export declare const DateRangeDefaultValue: Story<DateTimeProps>;
28
- export declare const DateRangeOnChange: Story<DateTimeProps>;
29
- export declare const CssClassNameChange: Story<DateTimeProps>;
30
- export declare const MinuteConstraint: Story<DateTimeProps>;
31
- export declare const ScrollDateTime: Story<DateTimeProps>;
32
- export declare const BodyScrollDateTime: Story<DateTimeProps>;
33
- export declare const DelaySetValue: Story<DateTimeProps>;
34
- export declare const SetValueUndefined: Story<DateTimeProps>;
35
- export declare const SelectableDate: Story<DateTimeProps>;
36
- export declare const IsValidSelectedDate: Story<DateTimeProps>;
37
- export declare const ShortDate: Story<DateTimeProps>;
38
- export declare const MediumDate: Story<DateTimeProps>;
39
- export declare const LongDate: Story<DateTimeProps>;
40
- export declare const ReadOnlyDate: Story<DateTimeProps>;
41
- export declare const ModifiedColors: Story<DateTimeProps>;
42
- export declare const OffScreenRight: Story<DateTimeProps>;
43
- export declare const OffScreenRightBottom: Story<DateTimeProps>;
@@ -1,36 +0,0 @@
1
- import { TimeFormatType } from './date-time-types';
2
- export declare enum DateTimeActionType {
3
- DaySelector = 0,
4
- MonthSelector = 1,
5
- YearSelector = 2,
6
- TimeSelector = 3,
7
- DateRangeSelector = 4,
8
- SetViewDate = 5,
9
- SetSelectedDate = 6,
10
- SetSelectedDateRange = 7,
11
- SetSelectedStartDate = 8,
12
- SetSelectedEndDate = 9,
13
- SetTimeFormat = 10,
14
- ClearDates = 11,
15
- InitializeDates = 12
16
- }
17
- export interface DateTimeState {
18
- currentSelector: DateTimeActionType;
19
- currentViewDate: Date;
20
- selectedDate?: Date;
21
- selectedStartDate?: Date;
22
- selectedEndDate?: Date;
23
- dateInitialized: boolean;
24
- timeFormat: TimeFormatType;
25
- }
26
- export interface DateTimeReducerAction {
27
- type: DateTimeActionType;
28
- viewDate?: Date;
29
- selectedDate?: Date;
30
- selectedStartDate?: Date;
31
- selectedEndDate?: Date;
32
- initialDate?: Date | Array<Date>;
33
- timeFormat?: TimeFormatType;
34
- }
35
- declare const reducer: (state: DateTimeState, action: DateTimeReducerAction) => DateTimeState;
36
- export default reducer;
@@ -1,4 +0,0 @@
1
- import { InputFormat } from '../../input/formatted-input/input-format.interfaces';
2
- import { DateSelectionType } from '../date-time-types';
3
- declare const useGetDateTimeFormat: (dateSelection: DateSelectionType, localeCode?: string) => [InputFormat | undefined, boolean | undefined];
4
- export default useGetDateTimeFormat;
@@ -1,12 +0,0 @@
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 +0,0 @@
1
- import React from 'react';
2
- import { FormInputControl } from '../../form-control.interface';
3
- export interface ContentEditableInputProps extends FormInputControl<string> {
4
- debounceTime?: number;
5
- fillContainer?: boolean;
6
- leftElement?: JSX.Element;
7
- rightElement?: JSX.Element;
8
- leftElementClassName?: string;
9
- rightElementClassName?: string;
10
- isSingleLine?: boolean;
11
- allowSingleLineScroll?: boolean;
12
- onInnerTextChange?: (value: string) => void;
13
- onInnerHTMLChange?: (value: string) => void;
14
- onElementCreate?: (element: HTMLElement) => void;
15
- onLeftElementClick?: (event: React.MouseEvent) => void;
16
- onRightElementClick?: (event: React.MouseEvent) => void;
17
- }
18
- export interface ContentEditableInputRef {
19
- inputElement?: HTMLElement;
20
- setInnerText: (innerText: string) => void;
21
- setInnerHTML: (innerHTML: string) => void;
22
- focus: () => void;
23
- }
24
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ContentEditableInputProps & React.RefAttributes<ContentEditableInputRef>>>;
25
- export default _default;
@@ -1,6 +0,0 @@
1
- import { Meta, Story } from '@storybook/react';
2
- import { ContentEditableInputProps } from './content-editable-input.component';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Placeholder: Story<ContentEditableInputProps>;
6
- export declare const CheckValueTitle: Story<ContentEditableInputProps>;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ContentEditableInputProps } from '../content-editable-input/content-editable-input.component';
3
- import { InputFormat } from './input-format.interfaces';
4
- export interface FormattedInputProps extends Omit<ContentEditableInputProps, 'placeholder'> {
5
- format?: InputFormat;
6
- }
7
- export interface FormattedInputRef {
8
- focus: () => void;
9
- }
10
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<FormattedInputProps & React.RefAttributes<FormattedInputRef>>>;
11
- export default _default;
@@ -1,6 +0,0 @@
1
- import { Meta, Story } from '@storybook/react';
2
- import { FormattedInputProps } from './formatted-input.component';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const SimpleFormat: Story<FormattedInputProps>;
6
- export declare const PassedValue: Story<FormattedInputProps>;
@@ -1,23 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
1
- import { InputFormat } from '../input-format.interfaces';
2
- import { FormatNavigator } from './format-navigator';
3
- import { InputSlotCollection } from './input-slot-collection';
4
- export declare class FormatInstanceCollection {
5
- private static instance;
6
- private readonly navigatorInstances;
7
- private readonly inputSlotInstances;
8
- private constructor();
9
- static getInstance(): FormatInstanceCollection;
10
- getNavigatorInstance(instanceKey: string, format: InputFormat): FormatNavigator;
11
- getInputSlotInstance(instanceKey: string, format: InputFormat): InputSlotCollection;
12
- removeInstances(instanceKey: string): void;
13
- }
@@ -1,31 +0,0 @@
1
- import { InputFormat } from '../input-format.interfaces';
2
- export declare class FormatNavigator {
3
- private readonly instanceCollection;
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
- constructor(format: InputFormat, instanceId: string);
13
- getCursorPosition(): number;
14
- getCurrentPartIndex(): number;
15
- setInputElement(element: HTMLElement): void;
16
- setCursorToCurrentPosition(): void;
17
- setCursorPosition(position: number): void;
18
- setCursorSelection(start: number, end?: number): void;
19
- findCursorPosition(): 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
- }
@@ -1,27 +0,0 @@
1
- import { IDisposable } from '../../../../common-interfaces';
2
- import { InputFormat } from '../input-format.interfaces';
3
- import { FormatChangeEvent } from './parser.interfaces';
4
- export declare class FormatParser implements IDisposable {
5
- private inputValue;
6
- private readonly instanceId;
7
- private readonly instanceCollection;
8
- private readonly keyProcessor;
9
- private readonly formatNavigator;
10
- private readonly formatRenderer;
11
- private readonly inputSlotCollection;
12
- private readonly inputRuleProcessor;
13
- private previousOutputValue?;
14
- private inputElementSet;
15
- private isInputFocused;
16
- private inputElement?;
17
- private onFormatChange?;
18
- constructor(format: InputFormat, inputValue?: string);
19
- inputElementCreated(element: HTMLElement): void;
20
- inputFocused(): void;
21
- inputBlurred(): void;
22
- inputValuePassed(inputValue: string): void;
23
- registerFormatChangeEvent(onFormatChange: FormatChangeEvent): void;
24
- mouseUpHandler(): void;
25
- keyDownHandler(event: KeyboardEvent): void;
26
- dispose(): void;
27
- }
@@ -1,10 +0,0 @@
1
- import { InputFormat } from '../input-format.interfaces';
2
- export declare class FormatRenderer {
3
- private readonly instanceCollection;
4
- private readonly formatPartList;
5
- private readonly inputSlotCollection;
6
- private inputElement?;
7
- constructor(format: InputFormat, instanceId: string);
8
- setInputElement(element: HTMLElement): void;
9
- render(): void;
10
- }