@capillarytech/blaze-ui 5.1.17 → 5.1.19
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/.DS_Store +0 -0
- package/CapCollapsibleNavbar/index.js +8 -2
- package/CapCollapsibleNavbar/index.js.map +1 -1
- package/CapCondition/index.js +8 -2
- package/CapCondition/index.js.map +1 -1
- package/CapDatePicker/index.js +8 -2
- package/CapDatePicker/index.js.map +1 -1
- package/CapDateTimePicker/README.md +136 -0
- package/CapDateTimePicker/index.d.ts +13 -0
- package/CapDateTimePicker/index.d.ts.map +1 -0
- package/CapDateTimePicker/index.js +112 -99
- package/CapDateTimePicker/index.js.map +1 -1
- package/CapDateTimePicker/messages.d.ts +17 -0
- package/CapDateTimePicker/messages.d.ts.map +1 -0
- package/CapDateTimePicker/types.d.ts +89 -0
- package/CapDateTimePicker/types.d.ts.map +1 -0
- package/CapDateTimeRangePicker/index.js +8 -2
- package/CapDateTimeRangePicker/index.js.map +1 -1
- package/CapEventCalendar/index.js +8 -2
- package/CapEventCalendar/index.js.map +1 -1
- package/CapLanguageProvider/index.js +8 -2
- package/CapLanguageProvider/index.js.map +1 -1
- package/CapNotificationDropdown/index.js +8 -2
- package/CapNotificationDropdown/index.js.map +1 -1
- package/CapReorderComponent/README.md +179 -0
- package/CapReorderComponent/Status.md +41 -0
- package/CapReorderComponent/index.d.ts +11 -0
- package/CapReorderComponent/index.d.ts.map +1 -0
- package/CapReorderComponent/index.js +48 -46
- package/CapReorderComponent/index.js.map +1 -1
- package/CapReorderComponent/types.d.ts +16 -0
- package/CapReorderComponent/types.d.ts.map +1 -0
- package/CapTimePicker/index.js +8 -2
- package/CapTimePicker/index.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js +2223 -50
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/utils/dayjs.d.ts +2 -0
- package/utils/dayjs.d.ts.map +1 -1
- package/utils/getCapThemeConfig.d.ts.map +1 -1
- package/utils/index.js +2 -0
- package/utils/index.js.map +1 -1
- package/.npmrc +0 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const scope = "app.commonUtils.capUiLibrary.capDateTimePicker";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
selectDateTimePlaceHolder: {
|
|
4
|
+
id: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
};
|
|
7
|
+
selectLabel: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
};
|
|
11
|
+
todayLabel: {
|
|
12
|
+
id: string;
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapDateTimePicker/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,mDAAmD,CAAC;;;;;;;;;;;;;;;AAEtE,wBAaG"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { DatePickerProps } from 'antd-v5';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { Moment } from 'moment';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { WrappedComponentProps } from 'react-intl';
|
|
6
|
+
export interface CapDateTimePickerProps extends Omit<DatePickerProps<Dayjs>, 'value' | 'onChange' | 'cellRender' | 'popupClassName' | 'popupStyle' | 'getPopupContainer' | 'popupOpen' | 'onPopupOpenChange'> {
|
|
7
|
+
/**
|
|
8
|
+
* Selected datetime value (Dayjs, Moment, or ISO string)
|
|
9
|
+
*/
|
|
10
|
+
value?: Dayjs | Moment | string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Callback when datetime changes
|
|
13
|
+
* @param value - Dayjs or Moment object (matches input type) or null
|
|
14
|
+
* @param dateString - Formatted date string
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (value: Dayjs | Moment | null, dateString: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Custom cell renderer for calendar cells (v6 API)
|
|
19
|
+
*/
|
|
20
|
+
cellRender?: DatePickerProps<Dayjs>['cellRender'];
|
|
21
|
+
/**
|
|
22
|
+
* Timezone string (e.g., 'Asia/Kolkata')
|
|
23
|
+
* @default 'Asia/Kolkata'
|
|
24
|
+
*/
|
|
25
|
+
timezone?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Custom class name for the popup/dropdown (v6 API)
|
|
28
|
+
*/
|
|
29
|
+
popupClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom style for the popup/dropdown (v6 API)
|
|
32
|
+
*/
|
|
33
|
+
popupStyle?: React.CSSProperties;
|
|
34
|
+
/**
|
|
35
|
+
* Container for the popup (v6 API)
|
|
36
|
+
*/
|
|
37
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the popup is open (v6 API)
|
|
40
|
+
*/
|
|
41
|
+
popupOpen?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Callback when popup open state changes (v6 API)
|
|
44
|
+
*/
|
|
45
|
+
onPopupOpenChange?: (open: boolean) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Custom cell renderer for calendar cells
|
|
48
|
+
* @deprecated Use `cellRender` instead. Will be removed in next major version.
|
|
49
|
+
*/
|
|
50
|
+
dateRender?: (currentDate: Dayjs, today: Dayjs) => React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Custom class name for the popup/dropdown
|
|
53
|
+
* @deprecated Use `popupClassName` instead. Will be removed in next major version.
|
|
54
|
+
*/
|
|
55
|
+
dropdownClassName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Custom style for the popup/dropdown
|
|
58
|
+
* @deprecated Use `popupStyle` instead. Will be removed in next major version.
|
|
59
|
+
*/
|
|
60
|
+
dropdownStyle?: React.CSSProperties;
|
|
61
|
+
/**
|
|
62
|
+
* Container for the calendar dropdown
|
|
63
|
+
* @deprecated Use `getPopupContainer` instead. Will be removed in next major version.
|
|
64
|
+
*/
|
|
65
|
+
getCalendarContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the dropdown is open
|
|
68
|
+
* @deprecated Use `popupOpen` instead. Will be removed in next major version.
|
|
69
|
+
*/
|
|
70
|
+
open?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Callback when dropdown open state changes
|
|
73
|
+
* @deprecated Use `onPopupOpenChange` instead. Will be removed in next major version.
|
|
74
|
+
*/
|
|
75
|
+
onOpenChange?: (open: boolean) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to show today button
|
|
78
|
+
* @deprecated This prop is deprecated. Today button behavior is now handled internally by Ant Design.
|
|
79
|
+
*/
|
|
80
|
+
showToday?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Render extra footer in calendar panel
|
|
83
|
+
* @deprecated This prop is discouraged. Consider using custom panel components instead.
|
|
84
|
+
*/
|
|
85
|
+
renderExtraFooter?: () => React.ReactNode;
|
|
86
|
+
}
|
|
87
|
+
/** Internal-only: adds react-intl's injected `intl` prop to the public props */
|
|
88
|
+
export type InternalProps = CapDateTimePickerProps & WrappedComponentProps;
|
|
89
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapDateTimePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,WAAW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AC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC3C;AAED,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,qBAAqB,CAAC"}
|
|
@@ -3826,7 +3826,7 @@ var _default = exports["default"] = SvgFile;
|
|
|
3826
3826
|
|
|
3827
3827
|
|
|
3828
3828
|
exports.__esModule = true;
|
|
3829
|
-
exports.TIME_UNITS = exports.FORMAT_TOKENS = void 0;
|
|
3829
|
+
exports.TIME_UNITS = exports.FORMAT_TOKENS = exports.DEFAULT_TIMEZONE = void 0;
|
|
3830
3830
|
exports.dayjsToMoment = dayjsToMoment;
|
|
3831
3831
|
exports["default"] = void 0;
|
|
3832
3832
|
exports.hasMomentTimezoneSupport = hasMomentTimezoneSupport;
|
|
@@ -4022,6 +4022,8 @@ const FORMAT_TOKENS = exports.FORMAT_TOKENS = {
|
|
|
4022
4022
|
MONTH_FULL: 'MMMM',
|
|
4023
4023
|
YEAR: 'YYYY',
|
|
4024
4024
|
YEAR_SHORT: 'YY',
|
|
4025
|
+
// Cap UI datetime picker format (DD-MM-YYYY | HH:mm)
|
|
4026
|
+
DATE_TIME: 'DD-MM-YYYY | HH:mm',
|
|
4025
4027
|
// Localized formats
|
|
4026
4028
|
DATE_LOCALIZED_SHORT: 'l',
|
|
4027
4029
|
DATETIME_LOCALIZED_SHORT: 'll',
|
|
@@ -4032,6 +4034,7 @@ const FORMAT_TOKENS = exports.FORMAT_TOKENS = {
|
|
|
4032
4034
|
DATETIME_LOCALIZED_LONG_TIME: 'LLL',
|
|
4033
4035
|
DATETIME_LOCALIZED_LONG_TIME_WEEKDAY: 'LLLL'
|
|
4034
4036
|
};
|
|
4037
|
+
const DEFAULT_TIMEZONE = exports.DEFAULT_TIMEZONE = 'Asia/Kolkata';
|
|
4035
4038
|
function logDevError(message, error) {
|
|
4036
4039
|
if (false) // removed by dead control flow
|
|
4037
4040
|
{}
|
|
@@ -4112,7 +4115,10 @@ function momentToDayjs(value) {
|
|
|
4112
4115
|
const tz = value.tz();
|
|
4113
4116
|
if (tz) {
|
|
4114
4117
|
// Has a named timezone - preserve it
|
|
4115
|
-
|
|
4118
|
+
// dayjs.utc(date) is required here: dayjs(date) anchors to the system local timezone,
|
|
4119
|
+
// causing .tz() to only re-label without converting hours. dayjs.utc(date) creates a
|
|
4120
|
+
// UTC-mode dayjs, which .tz() correctly converts to the target timezone for display.
|
|
4121
|
+
dayjsObj = _dayjs.default.utc(date).tz(tz);
|
|
4116
4122
|
|
|
4117
4123
|
// WORKAROUND: dayjs-timezone-iana-plugin doesn't persist timezone name in standard way
|
|
4118
4124
|
// Store it manually in $x for round-trip conversion fidelity
|