@atlaskit/datetime-picker 17.7.0 → 17.8.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.
- package/CHANGELOG.md +7 -0
- package/date-picker/package.json +17 -0
- package/date-time-picker/package.json +17 -0
- package/dist/cjs/components/date-picker.js +4 -4
- package/dist/cjs/components/date-time-picker-class.js +7 -9
- package/dist/cjs/components/date-time-picker-fc.js +5 -8
- package/dist/cjs/components/time-picker.js +11 -8
- package/dist/cjs/entry-points/date-picker.js +13 -0
- package/dist/cjs/entry-points/date-time-picker.js +13 -0
- package/dist/cjs/entry-points/time-picker.js +13 -0
- package/dist/cjs/entry-points/types.js +1 -0
- package/dist/cjs/internal/default-date-format.js +7 -0
- package/dist/cjs/internal/default-times.js +7 -0
- package/dist/cjs/internal/empty-component.js +12 -0
- package/dist/cjs/internal/format-date-time-zone-into-iso.js +15 -0
- package/dist/cjs/internal/format-date.js +2 -2
- package/dist/cjs/internal/get-parsed-iso.js +3 -3
- package/dist/cjs/internal/get-placeholder.js +2 -2
- package/dist/cjs/internal/pad-two.js +9 -0
- package/dist/cjs/internal/parse-date.js +2 -2
- package/dist/cjs/internal/placeholder-date-time.js +9 -0
- package/dist/es2019/components/date-picker.js +2 -2
- package/dist/es2019/components/date-time-picker-class.js +4 -6
- package/dist/es2019/components/date-time-picker-fc.js +2 -5
- package/dist/es2019/components/time-picker.js +5 -2
- package/dist/es2019/entry-points/date-picker.js +1 -0
- package/dist/es2019/entry-points/date-time-picker.js +1 -0
- package/dist/es2019/entry-points/time-picker.js +1 -0
- package/dist/es2019/entry-points/types.js +0 -0
- package/dist/es2019/internal/default-date-format.js +1 -0
- package/dist/es2019/internal/default-times.js +1 -0
- package/dist/es2019/internal/empty-component.js +4 -0
- package/dist/es2019/internal/format-date-time-zone-into-iso.js +9 -0
- package/dist/es2019/internal/format-date.js +1 -1
- package/dist/es2019/internal/get-parsed-iso.js +1 -1
- package/dist/es2019/internal/get-placeholder.js +1 -1
- package/dist/es2019/internal/pad-two.js +3 -0
- package/dist/es2019/internal/parse-date.js +1 -1
- package/dist/es2019/internal/placeholder-date-time.js +3 -0
- package/dist/esm/components/date-picker.js +2 -2
- package/dist/esm/components/date-time-picker-class.js +4 -6
- package/dist/esm/components/date-time-picker-fc.js +2 -5
- package/dist/esm/components/time-picker.js +5 -2
- package/dist/esm/entry-points/date-picker.js +1 -0
- package/dist/esm/entry-points/date-time-picker.js +1 -0
- package/dist/esm/entry-points/time-picker.js +1 -0
- package/dist/esm/entry-points/types.js +0 -0
- package/dist/esm/internal/default-date-format.js +1 -0
- package/dist/esm/internal/default-times.js +1 -0
- package/dist/esm/internal/empty-component.js +6 -0
- package/dist/esm/internal/format-date-time-zone-into-iso.js +9 -0
- package/dist/esm/internal/format-date.js +1 -1
- package/dist/esm/internal/get-parsed-iso.js +1 -1
- package/dist/esm/internal/get-placeholder.js +1 -1
- package/dist/esm/internal/pad-two.js +3 -0
- package/dist/esm/internal/parse-date.js +1 -1
- package/dist/esm/internal/placeholder-date-time.js +3 -0
- package/dist/types/components/date-time-picker-class.d.ts +0 -2
- package/dist/types/components/date-time-picker-fc.d.ts +0 -2
- package/dist/types/entry-points/date-picker.d.ts +2 -0
- package/dist/types/entry-points/date-time-picker.d.ts +1 -0
- package/dist/types/entry-points/time-picker.d.ts +1 -0
- package/dist/types/entry-points/types.d.ts +1 -0
- package/dist/types/internal/default-date-format.d.ts +1 -0
- package/dist/types/internal/default-times.d.ts +1 -0
- package/dist/types/internal/empty-component.d.ts +4 -0
- package/dist/types/internal/format-date-time-zone-into-iso.d.ts +4 -0
- package/dist/types/internal/pad-two.d.ts +1 -0
- package/dist/types/internal/placeholder-date-time.d.ts +1 -0
- package/dist/types-ts4.5/components/date-time-picker-class.d.ts +0 -2
- package/dist/types-ts4.5/components/date-time-picker-fc.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/date-picker.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/date-time-picker.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/time-picker.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/types.d.ts +1 -0
- package/dist/types-ts4.5/internal/default-date-format.d.ts +1 -0
- package/dist/types-ts4.5/internal/default-times.d.ts +1 -0
- package/dist/types-ts4.5/internal/empty-component.d.ts +4 -0
- package/dist/types-ts4.5/internal/format-date-time-zone-into-iso.d.ts +4 -0
- package/dist/types-ts4.5/internal/pad-two.d.ts +1 -0
- package/dist/types-ts4.5/internal/placeholder-date-time.d.ts +1 -0
- package/package.json +6 -6
- package/time-picker/package.json +17 -0
- package/types/package.json +5 -5
- package/dist/cjs/internal/index.js +0 -31
- package/dist/es2019/internal/index.js +0 -20
- package/dist/esm/internal/index.js +0 -22
- package/dist/types/internal/index.d.ts +0 -10
- package/dist/types-ts4.5/internal/index.d.ts +0 -10
- package/offerings.json +0 -98
|
@@ -23,7 +23,7 @@ import CalendarIcon from '@atlaskit/icon/core/calendar';
|
|
|
23
23
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
24
24
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
25
25
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
26
|
-
import { EmptyComponent } from '../internal';
|
|
26
|
+
import { EmptyComponent } from '../internal/empty-component';
|
|
27
27
|
import { formatDate } from '../internal/format-date';
|
|
28
28
|
import { getParsedISO } from '../internal/get-parsed-iso';
|
|
29
29
|
import { getPlaceholder } from '../internal/get-placeholder';
|
|
@@ -35,7 +35,7 @@ import { Menu } from '../internal/menu';
|
|
|
35
35
|
import { parseDate } from '../internal/parse-date';
|
|
36
36
|
import { makeSingleValue } from '../internal/single-value';
|
|
37
37
|
var packageName = "@atlaskit/datetime-picker";
|
|
38
|
-
var packageVersion = "
|
|
38
|
+
var packageVersion = "17.7.0";
|
|
39
39
|
var styles = {
|
|
40
40
|
pickerContainerStyle: "_kqswh2mm",
|
|
41
41
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -19,13 +19,13 @@ import { format, isValid, parseISO } from 'date-fns';
|
|
|
19
19
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
20
20
|
import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
|
|
21
21
|
import { mergeStyles } from '@atlaskit/select';
|
|
22
|
-
import { formatDateTimeZoneIntoIso } from '../internal';
|
|
23
22
|
import { DateTimePickerContainer } from '../internal/date-time-picker-container';
|
|
23
|
+
import { formatDateTimeZoneIntoIso } from '../internal/format-date-time-zone-into-iso';
|
|
24
24
|
import { convertTokens } from '../internal/parse-tokens';
|
|
25
25
|
import DatePicker from './date-picker';
|
|
26
26
|
import TimePicker from './time-picker';
|
|
27
27
|
var packageName = "@atlaskit/datetime-picker";
|
|
28
|
-
var packageVersion = "
|
|
28
|
+
var packageVersion = "17.7.0";
|
|
29
29
|
var compiledStyles = {
|
|
30
30
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
31
31
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -58,8 +58,6 @@ var dateTimePickerDefaultProps = {
|
|
|
58
58
|
// Not including a default prop for value as it will
|
|
59
59
|
// Make the component a controlled component
|
|
60
60
|
};
|
|
61
|
-
export var datePickerDefaultAriaLabel = 'Date';
|
|
62
|
-
export var timePickerDefaultAriaLabel = 'Time';
|
|
63
61
|
|
|
64
62
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
65
63
|
var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
@@ -266,13 +264,13 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
266
264
|
var timeValue = parsedValues === null || parsedValues === void 0 ? void 0 : parsedValues.timeValue;
|
|
267
265
|
var datePickerSelectProps = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectProps;
|
|
268
266
|
var datePickerAriaDescribedBy = datePickerProps['aria-describedby'] || ariaDescribedBy;
|
|
269
|
-
var datePickerLabel = datePickerProps.label ||
|
|
267
|
+
var datePickerLabel = datePickerProps.label || 'Date';
|
|
270
268
|
var mergedDatePickerSelectProps = _objectSpread(_objectSpread({}, datePickerSelectProps), {}, {
|
|
271
269
|
styles: mergeStyles(styles, datePickerSelectProps === null || datePickerSelectProps === void 0 ? void 0 : datePickerSelectProps.styles)
|
|
272
270
|
});
|
|
273
271
|
var timePickerSelectProps = timePickerProps === null || timePickerProps === void 0 ? void 0 : timePickerProps.selectProps;
|
|
274
272
|
var timePickerAriaDescribedBy = timePickerProps['aria-describedby'] || ariaDescribedBy;
|
|
275
|
-
var timePickerLabel = timePickerProps.label ||
|
|
273
|
+
var timePickerLabel = timePickerProps.label || 'Time';
|
|
276
274
|
var mergedTimePickerSelectProps = _objectSpread(_objectSpread({}, timePickerSelectProps), {}, {
|
|
277
275
|
styles: mergeStyles(styles, timePickerSelectProps === null || timePickerSelectProps === void 0 ? void 0 : timePickerSelectProps.styles)
|
|
278
276
|
});
|
|
@@ -21,13 +21,13 @@ import { IconButton } from '@atlaskit/button/new';
|
|
|
21
21
|
import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
|
|
22
22
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
23
23
|
import { mergeStyles } from '@atlaskit/select';
|
|
24
|
-
import { formatDateTimeZoneIntoIso } from '../internal';
|
|
25
24
|
import { DateTimePickerContainer } from '../internal/date-time-picker-container';
|
|
25
|
+
import { formatDateTimeZoneIntoIso } from '../internal/format-date-time-zone-into-iso';
|
|
26
26
|
import { convertTokens } from '../internal/parse-tokens';
|
|
27
27
|
import DatePicker from './date-picker';
|
|
28
28
|
import TimePicker from './time-picker';
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "
|
|
30
|
+
var packageVersion = "17.7.0";
|
|
31
31
|
var analyticsAttributes = {
|
|
32
32
|
componentName: 'dateTimePicker',
|
|
33
33
|
packageName: packageName,
|
|
@@ -67,9 +67,6 @@ var styles = {
|
|
|
67
67
|
* that the previous useState approach missed.
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
|
-
export var datePickerDefaultAriaLabel = 'Date';
|
|
71
|
-
export var timePickerDefaultAriaLabel = 'Time';
|
|
72
|
-
|
|
73
70
|
/**
|
|
74
71
|
* __Date time picker__
|
|
75
72
|
*
|
|
@@ -13,13 +13,16 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
|
13
13
|
import __noop from '@atlaskit/ds-lib/noop';
|
|
14
14
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
15
15
|
import Select, { CreatableSelect, mergeStyles } from '@atlaskit/select';
|
|
16
|
-
import {
|
|
16
|
+
import { defaultTimes } from '../internal/default-times';
|
|
17
|
+
import { EmptyComponent } from '../internal/empty-component';
|
|
17
18
|
import { FixedLayerMenu } from '../internal/fixed-layer-menu';
|
|
18
19
|
import parseTime from '../internal/parse-time';
|
|
19
20
|
import { convertTokens } from '../internal/parse-tokens';
|
|
21
|
+
import { placeholderDatetime } from '../internal/placeholder-date-time';
|
|
20
22
|
import { makeSingleValue } from '../internal/single-value';
|
|
21
23
|
var packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "17.7.0";
|
|
25
|
+
var defaultTimeFormat = 'h:mma';
|
|
23
26
|
var menuStyles = {
|
|
24
27
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
25
28
|
position: 'static',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/date-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/date-time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/time-picker';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultDateFormat = 'YYYY/MM/DD';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultTimes = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date, time, and zone into a ISO string.
|
|
3
|
+
*/
|
|
4
|
+
export function formatDateTimeZoneIntoIso(date, time, zone) {
|
|
5
|
+
// 12:00 => 12:00, 1:00 => 01:00
|
|
6
|
+
var needsLeadingZero = /^\d:/;
|
|
7
|
+
var sanitizedTime = needsLeadingZero.test(time) ? "0".concat(time) : time;
|
|
8
|
+
return "".concat(date, "T").concat(sanitizedTime).concat(zone);
|
|
9
|
+
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
20
20
|
import { format, parseISO } from 'date-fns';
|
|
21
|
+
import { defaultDateFormat } from './default-date-format';
|
|
21
22
|
import { convertTokens } from './parse-tokens';
|
|
22
|
-
import { defaultDateFormat } from './index';
|
|
23
23
|
export var formatDate = function formatDate(value, di) {
|
|
24
24
|
var formatDisplayLabel = di.formatDisplayLabel,
|
|
25
25
|
dateFormat = di.dateFormat,
|
|
@@ -19,7 +19,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
19
19
|
|
|
20
20
|
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
21
21
|
import { lastDayOfMonth } from 'date-fns';
|
|
22
|
-
import { padToTwo } from './
|
|
22
|
+
import { padToTwo } from './pad-two';
|
|
23
23
|
export var getParsedISO = function getParsedISO(di) {
|
|
24
24
|
var iso = di.iso;
|
|
25
25
|
var _iso$split = iso.split('-'),
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
20
20
|
|
|
21
|
-
import { placeholderDatetime } from './
|
|
21
|
+
import { placeholderDatetime } from './placeholder-date-time';
|
|
22
22
|
export var getPlaceholder = function getPlaceholder(di) {
|
|
23
23
|
var placeholder = di.placeholder,
|
|
24
24
|
l10n = di.l10n;
|
|
@@ -11,8 +11,6 @@ interface State {
|
|
|
11
11
|
value: string;
|
|
12
12
|
zoneValue: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const datePickerDefaultAriaLabel = "Date";
|
|
15
|
-
export declare const timePickerDefaultAriaLabel = "Time";
|
|
16
14
|
declare class DateTimePickerComponent extends React.Component<DateTimePickerBaseProps, State> {
|
|
17
15
|
static defaultProps: DateTimePickerBaseProps;
|
|
18
16
|
state: State;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/date-time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Appearance, DatePickerBaseProps, DateTimePickerBaseProps, DateTimePickerSelectProps, Spacing, TimePickerBaseProps, } from '../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultDateFormat = "YYYY/MM/DD";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultTimes: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function padToTwo(number: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const placeholderDatetime: Date;
|
|
@@ -11,8 +11,6 @@ interface State {
|
|
|
11
11
|
value: string;
|
|
12
12
|
zoneValue: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const datePickerDefaultAriaLabel = "Date";
|
|
15
|
-
export declare const timePickerDefaultAriaLabel = "Time";
|
|
16
14
|
declare class DateTimePickerComponent extends React.Component<DateTimePickerBaseProps, State> {
|
|
17
15
|
static defaultProps: DateTimePickerBaseProps;
|
|
18
16
|
state: State;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/date-time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Appearance, DatePickerBaseProps, DateTimePickerBaseProps, DateTimePickerSelectProps, Spacing, TimePickerBaseProps, } from '../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultDateFormat = "YYYY/MM/DD";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultTimes: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function padToTwo(number: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const placeholderDatetime: Date;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.8.0",
|
|
4
4
|
"description": "A date time picker allows the user to select an associated date and time.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/calendar": "^17.2.0",
|
|
45
45
|
"@atlaskit/css": "^0.19.0",
|
|
46
46
|
"@atlaskit/ds-lib": "^7.0.0",
|
|
47
|
-
"@atlaskit/icon": "^34.
|
|
47
|
+
"@atlaskit/icon": "^34.3.0",
|
|
48
48
|
"@atlaskit/layering": "^3.7.0",
|
|
49
49
|
"@atlaskit/locale": "^4.1.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"@af/accessibility-testing": "workspace:^",
|
|
64
64
|
"@af/integration-testing": "workspace:^",
|
|
65
65
|
"@af/visual-regression": "workspace:^",
|
|
66
|
-
"@atlaskit/code": "^17.
|
|
66
|
+
"@atlaskit/code": "^17.5.0",
|
|
67
67
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
68
68
|
"@atlaskit/docs": "^11.8.0",
|
|
69
69
|
"@atlaskit/form": "^15.5.0",
|
|
70
70
|
"@atlaskit/heading": "^5.4.0",
|
|
71
71
|
"@atlaskit/link": "^3.4.0",
|
|
72
|
-
"@atlaskit/modal-dialog": "^14.
|
|
73
|
-
"@atlaskit/popup": "^4.
|
|
74
|
-
"@atlaskit/range": "^10.
|
|
72
|
+
"@atlaskit/modal-dialog": "^14.18.0",
|
|
73
|
+
"@atlaskit/popup": "^4.17.0",
|
|
74
|
+
"@atlaskit/range": "^10.1.0",
|
|
75
75
|
"@atlaskit/section-message": "^8.12.0",
|
|
76
76
|
"@atlaskit/textfield": "^8.3.0",
|
|
77
77
|
"@atlaskit/toggle": "^15.6.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/datetime-picker/time-picker",
|
|
3
|
+
"main": "../dist/cjs/entry-points/time-picker.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/time-picker.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/time-picker.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/time-picker.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/time-picker.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/types/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker/types",
|
|
3
|
-
"main": "../dist/cjs/types.js",
|
|
4
|
-
"module": "../dist/esm/types.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/types.js",
|
|
3
|
+
"main": "../dist/cjs/entry-points/types.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/types.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/types.d.ts",
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts",
|
|
10
10
|
"typesVersions": {
|
|
11
11
|
">=4.5 <5.9": {
|
|
12
12
|
"*": [
|
|
13
|
-
"../dist/types-ts4.5/types.d.ts"
|
|
13
|
+
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaultTimes = exports.defaultTimeFormat = exports.defaultDateFormat = exports.EmptyComponent = void 0;
|
|
7
|
-
exports.formatDateTimeZoneIntoIso = formatDateTimeZoneIntoIso;
|
|
8
|
-
exports.padToTwo = padToTwo;
|
|
9
|
-
exports.placeholderDatetime = void 0;
|
|
10
|
-
/**
|
|
11
|
-
* This component is used to hide portions of Select component.
|
|
12
|
-
*/
|
|
13
|
-
var EmptyComponent = exports.EmptyComponent = function EmptyComponent() {
|
|
14
|
-
return null;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// This date was chosen to clearly show date and time formats (day > 12)
|
|
18
|
-
// e.g. 18/02/1993 vs. 2/18/1993 and 1:00 PM vs 13:00
|
|
19
|
-
var placeholderDatetime = exports.placeholderDatetime = new Date(1993, 1, 18, 13);
|
|
20
|
-
var defaultTimes = exports.defaultTimes = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00'];
|
|
21
|
-
var defaultTimeFormat = exports.defaultTimeFormat = 'h:mma';
|
|
22
|
-
var defaultDateFormat = exports.defaultDateFormat = 'YYYY/MM/DD';
|
|
23
|
-
function padToTwo(number) {
|
|
24
|
-
return number <= 99 ? "0".concat(number).slice(-2) : "".concat(number);
|
|
25
|
-
}
|
|
26
|
-
function formatDateTimeZoneIntoIso(date, time, zone) {
|
|
27
|
-
// 12:00 => 12:00, 1:00 => 01:00
|
|
28
|
-
var needsLeadingZero = /^\d:/;
|
|
29
|
-
var sanitizedTime = needsLeadingZero.test(time) ? "0".concat(time) : time;
|
|
30
|
-
return "".concat(date, "T").concat(sanitizedTime).concat(zone);
|
|
31
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This component is used to hide portions of Select component.
|
|
3
|
-
*/
|
|
4
|
-
export const EmptyComponent = () => null;
|
|
5
|
-
|
|
6
|
-
// This date was chosen to clearly show date and time formats (day > 12)
|
|
7
|
-
// e.g. 18/02/1993 vs. 2/18/1993 and 1:00 PM vs 13:00
|
|
8
|
-
export const placeholderDatetime = new Date(1993, 1, 18, 13);
|
|
9
|
-
export const defaultTimes = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00'];
|
|
10
|
-
export const defaultTimeFormat = 'h:mma';
|
|
11
|
-
export const defaultDateFormat = 'YYYY/MM/DD';
|
|
12
|
-
export function padToTwo(number) {
|
|
13
|
-
return number <= 99 ? `0${number}`.slice(-2) : `${number}`;
|
|
14
|
-
}
|
|
15
|
-
export function formatDateTimeZoneIntoIso(date, time, zone) {
|
|
16
|
-
// 12:00 => 12:00, 1:00 => 01:00
|
|
17
|
-
const needsLeadingZero = /^\d:/;
|
|
18
|
-
const sanitizedTime = needsLeadingZero.test(time) ? `0${time}` : time;
|
|
19
|
-
return `${date}T${sanitizedTime}${zone}`;
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This component is used to hide portions of Select component.
|
|
3
|
-
*/
|
|
4
|
-
export var EmptyComponent = function EmptyComponent() {
|
|
5
|
-
return null;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
// This date was chosen to clearly show date and time formats (day > 12)
|
|
9
|
-
// e.g. 18/02/1993 vs. 2/18/1993 and 1:00 PM vs 13:00
|
|
10
|
-
export var placeholderDatetime = new Date(1993, 1, 18, 13);
|
|
11
|
-
export var defaultTimes = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00'];
|
|
12
|
-
export var defaultTimeFormat = 'h:mma';
|
|
13
|
-
export var defaultDateFormat = 'YYYY/MM/DD';
|
|
14
|
-
export function padToTwo(number) {
|
|
15
|
-
return number <= 99 ? "0".concat(number).slice(-2) : "".concat(number);
|
|
16
|
-
}
|
|
17
|
-
export function formatDateTimeZoneIntoIso(date, time, zone) {
|
|
18
|
-
// 12:00 => 12:00, 1:00 => 01:00
|
|
19
|
-
var needsLeadingZero = /^\d:/;
|
|
20
|
-
var sanitizedTime = needsLeadingZero.test(time) ? "0".concat(time) : time;
|
|
21
|
-
return "".concat(date, "T").concat(sanitizedTime).concat(zone);
|
|
22
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This component is used to hide portions of Select component.
|
|
3
|
-
*/
|
|
4
|
-
export declare const EmptyComponent: () => null;
|
|
5
|
-
export declare const placeholderDatetime: Date;
|
|
6
|
-
export declare const defaultTimes: string[];
|
|
7
|
-
export declare const defaultTimeFormat = "h:mma";
|
|
8
|
-
export declare const defaultDateFormat = "YYYY/MM/DD";
|
|
9
|
-
export declare function padToTwo(number: number): string;
|
|
10
|
-
export declare function formatDateTimeZoneIntoIso(date: string, time: string, zone: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This component is used to hide portions of Select component.
|
|
3
|
-
*/
|
|
4
|
-
export declare const EmptyComponent: () => null;
|
|
5
|
-
export declare const placeholderDatetime: Date;
|
|
6
|
-
export declare const defaultTimes: string[];
|
|
7
|
-
export declare const defaultTimeFormat = "h:mma";
|
|
8
|
-
export declare const defaultDateFormat = "YYYY/MM/DD";
|
|
9
|
-
export declare function padToTwo(number: number): string;
|
|
10
|
-
export declare function formatDateTimeZoneIntoIso(date: string, time: string, zone: string): string;
|