beesoft-components 0.2.26-2 → 0.2.26-4
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 +25581 -25367
- package/build/index.js +25483 -25271
- package/build/index.min.js +17 -17
- package/build/index.min.js.gz +0 -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-time-selector.component.d.ts +3 -2
- package/build/types/src/components/form/date-time/date-time-types.d.ts +4 -0
- package/build/types/src/components/form/date-time/date-time.reducer.d.ts +3 -0
- package/build/types/src/components/form/input/formatted-input/parser/format-instance-collection.d.ts +13 -0
- package/build/types/src/components/form/input/formatted-input/parser/format-navigator.d.ts +2 -3
- package/build/types/src/components/form/input/formatted-input/parser/format-parser.d.ts +10 -4
- package/build/types/src/components/form/input/formatted-input/parser/format-renderer.d.ts +2 -1
- package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts +2 -1
- package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts +2 -3
- package/build/types/src/components/form/input/formatted-input/parser/key-processor.d.ts +2 -1
- package/build/types/src/components/form/input/formatted-input/parser/parser.interfaces.d.ts +1 -1
- package/build/types/src/index.d.ts +5 -2
- package/package.json +5 -3
package/build/index.min.js.gz
CHANGED
|
Binary file
|
|
@@ -15,6 +15,7 @@ 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
17
|
export declare function getDateFormatByLocale(locale: string): string;
|
|
18
|
+
export declare function uses24HourTimeByLocale(locale: string): boolean;
|
|
18
19
|
export declare function createDefaultColors(): DateTimeColors;
|
|
19
20
|
export declare function parseDate(dateValue: string, locale?: Locale): Date | undefined;
|
|
20
21
|
export declare function parseDateRange(dateRangeValue: string, locale?: Locale): Date[] | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TimeConstraints } from './date-time-types';
|
|
2
|
+
import { TimeConstraints, TimeFormatType } from './date-time-types';
|
|
3
3
|
import { DateTimeReducerAction } from './date-time.reducer';
|
|
4
4
|
export interface DateTimeTimeSelectorProps {
|
|
5
5
|
viewDate: Date;
|
|
6
6
|
showDateSelector: boolean;
|
|
7
7
|
locale: Locale;
|
|
8
|
+
timeFormat?: TimeFormatType;
|
|
8
9
|
timeConstraints?: TimeConstraints;
|
|
9
10
|
onChange?: (value?: Date | Array<Date>) => void;
|
|
10
11
|
dispatcher: React.Dispatch<DateTimeReducerAction>;
|
|
11
12
|
}
|
|
12
|
-
export default function DateTimeTimeSelector({ viewDate, showDateSelector, locale, timeConstraints, onChange, dispatcher, }: DateTimeTimeSelectorProps): JSX.Element;
|
|
13
|
+
export default function DateTimeTimeSelector({ viewDate, showDateSelector, locale, timeFormat, timeConstraints, onChange, dispatcher, }: DateTimeTimeSelectorProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormattedInputDefaultFormats } from '../input/formatted-input/formats/input-format.enums';
|
|
2
|
+
import { TimeFormatType } from './date-time-types';
|
|
2
3
|
export declare enum DateTimeActionType {
|
|
3
4
|
DaySelector = 0,
|
|
4
5
|
MonthSelector = 1,
|
|
@@ -21,6 +22,7 @@ export interface DateTimeState {
|
|
|
21
22
|
selectedStartDate?: Date;
|
|
22
23
|
selectedEndDate?: Date;
|
|
23
24
|
dateInitialized: boolean;
|
|
25
|
+
timeFormat: TimeFormatType;
|
|
24
26
|
inputFormat?: FormattedInputDefaultFormats;
|
|
25
27
|
}
|
|
26
28
|
export interface DateTimeReducerAction {
|
|
@@ -30,6 +32,7 @@ export interface DateTimeReducerAction {
|
|
|
30
32
|
selectedStartDate?: Date;
|
|
31
33
|
selectedEndDate?: Date;
|
|
32
34
|
initialDate?: Date | Array<Date>;
|
|
35
|
+
timeFormat?: TimeFormatType;
|
|
33
36
|
inputFormat?: FormattedInputDefaultFormats;
|
|
34
37
|
}
|
|
35
38
|
declare const reducer: (state: DateTimeState, action: DateTimeReducerAction) => DateTimeState;
|
package/build/types/src/components/form/input/formatted-input/parser/format-instance-collection.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InputFormat } from '../formats/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,6 +1,6 @@
|
|
|
1
1
|
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
2
|
export declare class FormatNavigator {
|
|
3
|
-
private
|
|
3
|
+
private readonly instanceCollection;
|
|
4
4
|
private readonly formatPartList;
|
|
5
5
|
private readonly inputSlotCollection;
|
|
6
6
|
private currentPartIndex;
|
|
@@ -9,8 +9,7 @@ export declare class FormatNavigator {
|
|
|
9
9
|
private inputSelection;
|
|
10
10
|
private inputRange?;
|
|
11
11
|
private textNode?;
|
|
12
|
-
|
|
13
|
-
static getInstance(format: InputFormat): FormatNavigator;
|
|
12
|
+
constructor(format: InputFormat, instanceId: string);
|
|
14
13
|
getCursorPosition(): number;
|
|
15
14
|
getCurrentPartIndex(): number;
|
|
16
15
|
setInputElement(element: HTMLElement): void;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
+
import { IDisposable } from '../../../../common-interfaces';
|
|
1
2
|
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
|
-
import {
|
|
3
|
-
export declare class FormatParser {
|
|
3
|
+
import { FormatChangeEvent } from './parser.interfaces';
|
|
4
|
+
export declare class FormatParser implements IDisposable {
|
|
4
5
|
private inputValue;
|
|
6
|
+
private readonly instanceId;
|
|
7
|
+
private readonly instanceCollection;
|
|
5
8
|
private readonly keyProcessor;
|
|
6
9
|
private readonly formatNavigator;
|
|
7
10
|
private readonly formatRenderer;
|
|
8
11
|
private readonly inputSlotCollection;
|
|
9
12
|
private readonly inputRuleProcessor;
|
|
10
13
|
private inputElementSet;
|
|
14
|
+
private isInputFocused;
|
|
11
15
|
private inputElement?;
|
|
12
|
-
private
|
|
16
|
+
private onFormatChange?;
|
|
13
17
|
constructor(format: InputFormat, inputValue?: string);
|
|
14
18
|
inputElementCreated(element: HTMLElement): void;
|
|
15
19
|
inputFocused(): void;
|
|
20
|
+
inputBlurred(): void;
|
|
16
21
|
inputValuePassed(inputValue: string): void;
|
|
17
|
-
|
|
22
|
+
registerFormatChangeEvent(onFormatChange: FormatChangeEvent): void;
|
|
18
23
|
keyDownHandler(event: KeyboardEvent): void;
|
|
24
|
+
dispose(): void;
|
|
19
25
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
2
|
export declare class FormatRenderer {
|
|
3
|
+
private readonly instanceCollection;
|
|
3
4
|
private readonly formatPartList;
|
|
4
5
|
private readonly inputSlotCollection;
|
|
5
6
|
private inputElement?;
|
|
6
|
-
constructor(format: InputFormat);
|
|
7
|
+
constructor(format: InputFormat, instanceId: string);
|
|
7
8
|
setInputElement(element: HTMLElement): void;
|
|
8
9
|
render(): void;
|
|
9
10
|
}
|
package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
2
|
export declare class InputRuleProcessor {
|
|
3
3
|
private format;
|
|
4
|
+
private readonly instanceCollection;
|
|
4
5
|
private readonly inputSlotCollection;
|
|
5
6
|
private readonly formatNavigator;
|
|
6
7
|
private readonly keyTypeChecker;
|
|
7
8
|
private readonly formatRenderer;
|
|
8
9
|
private readonly formatPartList;
|
|
9
|
-
constructor(format: InputFormat);
|
|
10
|
+
constructor(format: InputFormat, instanceId: string);
|
|
10
11
|
setInputElement(element: HTMLElement): void;
|
|
11
12
|
processKeyPress(event: KeyboardEvent): void;
|
|
12
13
|
processInputValue(value: string): void;
|
package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { InputFormat } from '../formats/input-format.interfaces';
|
|
2
2
|
import { FormatPartSlot } from './parser.interfaces';
|
|
3
3
|
export declare class InputSlotCollection {
|
|
4
|
-
private static instance;
|
|
5
4
|
private readonly inputSlots;
|
|
6
|
-
|
|
7
|
-
static getInstance(format: InputFormat): InputSlotCollection;
|
|
5
|
+
constructor(format: InputFormat);
|
|
8
6
|
clearAllSlots(): void;
|
|
9
7
|
getSlot(partIndex: number): FormatPartSlot | undefined;
|
|
10
8
|
getFirstSlot(): FormatPartSlot;
|
|
@@ -12,4 +10,5 @@ export declare class InputSlotCollection {
|
|
|
12
10
|
getPreviousSlot(currentPartIndex: number): FormatPartSlot | undefined;
|
|
13
11
|
getLastSlotWithData(): FormatPartSlot;
|
|
14
12
|
allSlotsCompleted(): boolean;
|
|
13
|
+
allSlotsEmpty(): boolean;
|
|
15
14
|
}
|
|
@@ -2,11 +2,12 @@ import { InputFormat } from '../formats/input-format.interfaces';
|
|
|
2
2
|
import { MovementKeyboardEvent } from './parser.interfaces';
|
|
3
3
|
export declare class KeyProcessor {
|
|
4
4
|
private format;
|
|
5
|
+
private readonly instanceCollection;
|
|
5
6
|
private readonly formatNavigator;
|
|
6
7
|
private readonly ruleProcessor;
|
|
7
8
|
private readonly keyTypeChecker;
|
|
8
9
|
private readonly formatRenderer;
|
|
9
|
-
constructor(format: InputFormat);
|
|
10
|
+
constructor(format: InputFormat, instanceId: string);
|
|
10
11
|
setInputElement(element: HTMLElement): void;
|
|
11
12
|
processMovementKey(event: MovementKeyboardEvent): void;
|
|
12
13
|
processKeyPress(event: KeyboardEvent): boolean;
|
|
@@ -21,4 +21,4 @@ export interface EditingKeyboardEvent extends Omit<KeyboardEvent, 'key'> {
|
|
|
21
21
|
export interface MovementKeyboardEvent extends Omit<KeyboardEvent, 'key'> {
|
|
22
22
|
key: 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End';
|
|
23
23
|
}
|
|
24
|
-
export type
|
|
24
|
+
export type FormatChangeEvent = (value?: string) => void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import ContentEditableInput from './components/form/input/content-editable-input/content-editable-input.component';
|
|
1
2
|
import DateTime from './components/form/date-time/date-time.component';
|
|
3
|
+
import FormattedInput from './components/form/input/formatted-input/formatted-input.component';
|
|
2
4
|
import OverlayPanel from './components/overlay/overlay-panel/overlay-panel.component';
|
|
5
|
+
import { DateSelectionType } from './components/form/date-time/date-time-types';
|
|
3
6
|
import { DateTimeInputTemplateProps } from './components/form/date-time/date-time.component';
|
|
4
7
|
import { DateTimeScrollerTemplateProps } from './components/form/date-time/date-time-scroller.component';
|
|
5
8
|
import { DateTimeCalendarTemplateProps } from './components/form/date-time/date-time-calendar.component';
|
|
6
9
|
import './index.css';
|
|
7
10
|
import '../src/components/font-awesome';
|
|
8
|
-
export { DateTime, OverlayPanel };
|
|
9
|
-
export type { DateTimeInputTemplateProps, DateTimeScrollerTemplateProps, DateTimeCalendarTemplateProps };
|
|
11
|
+
export { ContentEditableInput, DateTime, FormattedInput, OverlayPanel };
|
|
12
|
+
export type { DateSelectionType, DateTimeInputTemplateProps, DateTimeScrollerTemplateProps, DateTimeCalendarTemplateProps, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beesoft-components",
|
|
3
|
-
"version": "0.2.26-
|
|
3
|
+
"version": "0.2.26-4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Brandon Trabon",
|
|
6
6
|
"keywords": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"types"
|
|
18
18
|
],
|
|
19
19
|
"publishConfig": {
|
|
20
|
-
"registry": "https://registry.
|
|
20
|
+
"registry": "https://registry.npmjs.org/"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"main": "build/index.cjs.js",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"classnames": "^2.3.1",
|
|
32
32
|
"date-fns": "^2.29.3",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"react-transition-group": "^4.4.5"
|
|
34
|
+
"react-transition-group": "^4.4.5",
|
|
35
|
+
"uuid": "^9.0.0"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
37
38
|
"start": "start-storybook -p 6006 -s public",
|
|
@@ -89,6 +90,7 @@
|
|
|
89
90
|
"@types/react": "^18.0.31",
|
|
90
91
|
"@types/react-dom": "^18.0.11",
|
|
91
92
|
"@types/react-transition-group": "^4.4.5",
|
|
93
|
+
"@types/uuid": "^9.0.1",
|
|
92
94
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
|
93
95
|
"@typescript-eslint/parser": "^5.57.0",
|
|
94
96
|
"autoprefixer": "^10.4.14",
|