beesoft-components 0.3.0-1 → 0.3.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 (32) hide show
  1. package/build/index.cjs.js +449 -731
  2. package/build/index.js +449 -731
  3. package/build/index.min.js +6 -6
  4. package/build/index.min.js.gz +0 -0
  5. package/build/types/src/components/form/date-time/date-time-format-creator.d.ts +28 -0
  6. package/build/types/src/components/form/date-time/date-time-functions.d.ts +0 -2
  7. package/build/types/src/components/form/date-time/date-time.reducer.d.ts +1 -4
  8. package/build/types/src/components/form/date-time/hooks/get-date-time-format.hook.d.ts +4 -0
  9. package/build/types/src/components/form/input/formatted-input/formatted-input.component.d.ts +1 -3
  10. package/build/types/src/components/form/input/formatted-input/parser/format-instance-collection.d.ts +1 -1
  11. package/build/types/src/components/form/input/formatted-input/parser/format-navigator.d.ts +1 -1
  12. package/build/types/src/components/form/input/formatted-input/parser/format-parser.d.ts +1 -1
  13. package/build/types/src/components/form/input/formatted-input/parser/format-renderer.d.ts +1 -1
  14. package/build/types/src/components/form/input/formatted-input/parser/input-rule-processor.d.ts +1 -1
  15. package/build/types/src/components/form/input/formatted-input/parser/input-slot-collection.d.ts +1 -1
  16. package/build/types/src/components/form/input/formatted-input/parser/key-processor.d.ts +1 -1
  17. package/build/types/src/components/form/input/formatted-input/parser/parser.interfaces.d.ts +1 -1
  18. package/build/types/src/components/form/input/formatted-input/parser/part-entry-creator.d.ts +1 -1
  19. package/build/types/src/components/form/input/formatted-input/parser/part-entry-iterator.d.ts +1 -1
  20. package/build/types/src/components/overlay/overlay-panel/overlay-panel.component.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/build/types/src/components/form/input/formatted-input/formats/date/day-month-year/format.d.ts +0 -3
  23. package/build/types/src/components/form/input/formatted-input/formats/date/month-day-year/format.d.ts +0 -3
  24. package/build/types/src/components/form/input/formatted-input/formats/date/year-month-day/format.d.ts +0 -3
  25. package/build/types/src/components/form/input/formatted-input/formats/date-range/day-month-year/format.d.ts +0 -3
  26. package/build/types/src/components/form/input/formatted-input/formats/date-range/month-day-year/format.d.ts +0 -3
  27. package/build/types/src/components/form/input/formatted-input/formats/date-range/year-month-day/format.d.ts +0 -3
  28. package/build/types/src/components/form/input/formatted-input/formats/index.d.ts +0 -9
  29. package/build/types/src/components/form/input/formatted-input/formats/input-format.enums.d.ts +0 -11
  30. package/build/types/src/components/form/input/formatted-input/formats/time/12-hour/format.d.ts +0 -3
  31. package/build/types/src/components/form/input/formatted-input/formats/time/24-hour/format.d.ts +0 -3
  32. /package/build/types/src/components/form/input/formatted-input/{formats/input-format.interfaces.d.ts → input-format.interfaces.d.ts} +0 -0
Binary file
@@ -0,0 +1,28 @@
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
+ }
@@ -14,8 +14,6 @@ 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;
18
- export declare function uses24HourTimeByLocale(locale: string): boolean;
19
17
  export declare function createDefaultColors(): DateTimeColors;
20
18
  export declare function parseDate(dateValue: string, locale?: Locale): Date | undefined;
21
19
  export declare function parseDateRange(dateRangeValue: string, locale?: Locale): Date[] | undefined;
@@ -1,4 +1,3 @@
1
- import { FormattedInputDefaultFormats } from '../input/formatted-input/formats/input-format.enums';
2
1
  import { TimeFormatType } from './date-time-types';
3
2
  export declare enum DateTimeActionType {
4
3
  DaySelector = 0,
@@ -11,7 +10,7 @@ export declare enum DateTimeActionType {
11
10
  SetSelectedDateRange = 7,
12
11
  SetSelectedStartDate = 8,
13
12
  SetSelectedEndDate = 9,
14
- SetInputFormat = 10,
13
+ SetTimeFormat = 10,
15
14
  ClearDates = 11,
16
15
  InitializeDates = 12
17
16
  }
@@ -23,7 +22,6 @@ export interface DateTimeState {
23
22
  selectedEndDate?: Date;
24
23
  dateInitialized: boolean;
25
24
  timeFormat: TimeFormatType;
26
- inputFormat?: FormattedInputDefaultFormats;
27
25
  }
28
26
  export interface DateTimeReducerAction {
29
27
  type: DateTimeActionType;
@@ -33,7 +31,6 @@ export interface DateTimeReducerAction {
33
31
  selectedEndDate?: Date;
34
32
  initialDate?: Date | Array<Date>;
35
33
  timeFormat?: TimeFormatType;
36
- inputFormat?: FormattedInputDefaultFormats;
37
34
  }
38
35
  declare const reducer: (state: DateTimeState, action: DateTimeReducerAction) => DateTimeState;
39
36
  export default reducer;
@@ -0,0 +1,4 @@
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,10 +1,8 @@
1
1
  import React from 'react';
2
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';
3
+ import { InputFormat } from './input-format.interfaces';
5
4
  export interface FormattedInputProps extends Omit<ContentEditableInputProps, 'placeholder'> {
6
5
  format?: InputFormat;
7
- defaultFormat: FormattedInputDefaultFormats;
8
6
  }
9
7
  export interface FormattedInputRef {
10
8
  focus: () => void;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  import { FormatNavigator } from './format-navigator';
3
3
  import { InputSlotCollection } from './input-slot-collection';
4
4
  export declare class FormatInstanceCollection {
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  export declare class FormatNavigator {
3
3
  private readonly instanceCollection;
4
4
  private readonly formatPartList;
@@ -1,5 +1,5 @@
1
1
  import { IDisposable } from '../../../../common-interfaces';
2
- import { InputFormat } from '../formats/input-format.interfaces';
2
+ import { InputFormat } from '../input-format.interfaces';
3
3
  import { FormatChangeEvent } from './parser.interfaces';
4
4
  export declare class FormatParser implements IDisposable {
5
5
  private inputValue;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  export declare class FormatRenderer {
3
3
  private readonly instanceCollection;
4
4
  private readonly formatPartList;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  export declare class InputRuleProcessor {
3
3
  private format;
4
4
  private readonly instanceCollection;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  import { FormatPartSlot } from './parser.interfaces';
3
3
  export declare class InputSlotCollection {
4
4
  private readonly inputSlots;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  import { MovementKeyboardEvent } from './parser.interfaces';
3
3
  export declare class KeyProcessor {
4
4
  private format;
@@ -1,4 +1,4 @@
1
- import { FormatPart } from '../formats/input-format.interfaces';
1
+ import { FormatPart } from '../input-format.interfaces';
2
2
  export interface FormatPartEntry extends FormatPart {
3
3
  startPosition: number;
4
4
  endPosition: number;
@@ -1,4 +1,4 @@
1
- import { InputFormat } from '../formats/input-format.interfaces';
1
+ import { InputFormat } from '../input-format.interfaces';
2
2
  import { FormatPartEntry } from './parser.interfaces';
3
3
  export declare class PartEntryCreator {
4
4
  static create(format: InputFormat): FormatPartEntry[];
@@ -1,5 +1,5 @@
1
1
  import { IIterator } from '../../../../../interfaces/iterator.interface';
2
- import { InputFormat } from '../formats/input-format.interfaces';
2
+ import { InputFormat } from '../input-format.interfaces';
3
3
  import { FormatPartEntry } from './parser.interfaces';
4
4
  export declare class PartEntryIterator implements IIterator<FormatPartEntry> {
5
5
  private _currentIndex;
@@ -17,6 +17,7 @@ export interface OverlayPanelProps {
17
17
  hideTransitionOptions?: string;
18
18
  shown?: () => void;
19
19
  hidden?: () => void;
20
+ isClickedWithin?: () => void;
20
21
  children: ReactNode | Array<ReactNode>;
21
22
  }
22
- export default function OverlayPanel({ visible, target, targetPosition, elementAlignment, shouldTargetCloseOverlay, shouldMatchTargetWidth, shouldScrollCloseOverlay, shouldCheckZIndex, shouldRemainOnScreen, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, shown, hidden, markupCreated, children, }: OverlayPanelProps & MarkupEvents): JSX.Element;
23
+ export default function OverlayPanel({ visible, target, targetPosition, elementAlignment, shouldTargetCloseOverlay, shouldMatchTargetWidth, shouldScrollCloseOverlay, shouldCheckZIndex, shouldRemainOnScreen, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, shown, hidden, isClickedWithin, markupCreated, children, }: OverlayPanelProps & MarkupEvents): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beesoft-components",
3
- "version": "0.3.0-1",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "author": "Brandon Trabon",
6
6
  "keywords": [
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,9 +0,0 @@
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, };
@@ -1,11 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;
@@ -1,3 +0,0 @@
1
- import { InputFormat } from '../../input-format.interfaces';
2
- declare const format: InputFormat;
3
- export default format;