d2coreui 23.0.35 → 23.0.36
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/components/date/dateRangeInput.js +41 -6
- package/components/date/dateRangeInput.js.map +1 -1
- package/components/grid/dataGrid.d.ts +0 -1
- package/components/grid/dataGrid.js +4 -7
- package/components/grid/dataGrid.js.map +1 -1
- package/components/style/withCss.d.ts +2 -1
- package/components/style/withCss.js +6 -2
- package/components/style/withCss.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,13 +20,19 @@ import i18n from "d2core/i18n/i18n";
|
|
|
20
20
|
import DateRangeInputAdvancedPanel, { TimeShiftDirection } from "./dateRangeInputAdvancedPanel";
|
|
21
21
|
import WithCss from "../style/withCss";
|
|
22
22
|
import { createStyles } from "antd-style";
|
|
23
|
-
const useStyles = createStyles(({ token, css }) => {
|
|
23
|
+
const useStyles = createStyles(({ token, css }, props) => {
|
|
24
|
+
const { size = 'middle' } = props;
|
|
25
|
+
const heightMap = {
|
|
26
|
+
small: token.controlHeightSM,
|
|
27
|
+
middle: token.controlHeight,
|
|
28
|
+
large: token.controlHeightLG,
|
|
29
|
+
};
|
|
24
30
|
return {
|
|
25
31
|
baseLayout: css `
|
|
26
32
|
display: inline-block;
|
|
27
33
|
position: relative;
|
|
28
34
|
width: 100%;
|
|
29
|
-
height: ${
|
|
35
|
+
height: ${heightMap[size]}px;
|
|
30
36
|
padding: 0;
|
|
31
37
|
color: ${token.colorText};
|
|
32
38
|
font-size: ${token.fontSize}px;
|
|
@@ -35,9 +41,38 @@ const useStyles = createStyles(({ token, css }) => {
|
|
|
35
41
|
border: 1px solid ${token.colorBorder};
|
|
36
42
|
border-radius: ${token.borderRadius}px;
|
|
37
43
|
transition: all ${token.motionDurationMid};
|
|
44
|
+
|
|
45
|
+
.ant-space-compact & {
|
|
46
|
+
border-radius: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ant-space-compact > *:not(:first-child) & {
|
|
50
|
+
width: calc(100% + 1px);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ant-space-compact > *:first-child & {
|
|
54
|
+
border-start-start-radius: ${token.borderRadius}px;
|
|
55
|
+
border-end-start-radius: ${token.borderRadius}px;
|
|
56
|
+
border-inline-end-width: 1px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ant-space-compact > *:last-child & {
|
|
60
|
+
border-start-end-radius: ${token.borderRadius}px;
|
|
61
|
+
border-end-end-radius: ${token.borderRadius}px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ant-space-compact > *:first-child:last-child & {
|
|
65
|
+
border-radius: ${token.borderRadius}px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus-within {
|
|
69
|
+
border-color: ${token.colorPrimaryHover};
|
|
70
|
+
z-index: 3;
|
|
71
|
+
}
|
|
38
72
|
|
|
39
73
|
&:hover {
|
|
40
74
|
border-color: ${token.colorPrimaryHover};
|
|
75
|
+
z-index: 3;
|
|
41
76
|
}
|
|
42
77
|
|
|
43
78
|
&.disabled {
|
|
@@ -269,15 +304,15 @@ export default class DateRangeInput extends React.Component {
|
|
|
269
304
|
_b.call(_a))));
|
|
270
305
|
}
|
|
271
306
|
renderInput() {
|
|
272
|
-
const _a = this.props, { className, fromValue, toValue, onChange, style, allowClear, renderAsCalendar, hidePopup, align, disabled, defaultMode, onModeChange, confirmButtonsRenderer, onPopupVisibleChange } = _a, props = __rest(_a, ["className", "fromValue", "toValue", "onChange", "style", "allowClear", "renderAsCalendar", "hidePopup", "align", "disabled", "defaultMode", "onModeChange", "confirmButtonsRenderer", "onPopupVisibleChange"]);
|
|
307
|
+
const _a = this.props, { className, fromValue, toValue, onChange, style, allowClear, renderAsCalendar, hidePopup, align, disabled, defaultMode, onModeChange, confirmButtonsRenderer, onPopupVisibleChange, size } = _a, props = __rest(_a, ["className", "fromValue", "toValue", "onChange", "style", "allowClear", "renderAsCalendar", "hidePopup", "align", "disabled", "defaultMode", "onModeChange", "confirmButtonsRenderer", "onPopupVisibleChange", "size"]);
|
|
273
308
|
return (React.createElement("div", { style: Object.assign(Object.assign({}, style), { padding: 0, position: "relative" }), className: className, onFocus: this.props.onFocus, onBlur: this.props.onBlur },
|
|
274
|
-
React.createElement(WithCss, { useStyles: useStyles }, (context) => React.createElement("div", { style: { display: "flex", justifyContent: "space-between", paddingRight: 8 }, className: context.styles.baseLayout + (disabled || this.state.popupVisible ? " disabled" : "") },
|
|
275
|
-
React.createElement(DateTimeInput, Object.assign({ value: fromValue }, props, { disabled: disabled, inputDisabled: this.state.popupVisible, allowClear: allowClear, bordered: false, hidePopup: true, style: { width: "auto" }, inputStyle: { paddingRight: 2 }, onChange: (value) => {
|
|
309
|
+
React.createElement(WithCss, { useStyles: useStyles, props: { size } }, (context) => React.createElement("div", { style: { display: "flex", justifyContent: "space-between", paddingRight: 8 }, className: context.styles.baseLayout + (disabled || this.state.popupVisible ? " disabled" : "") },
|
|
310
|
+
React.createElement(DateTimeInput, Object.assign({ value: fromValue }, props, { disabled: disabled, inputDisabled: this.state.popupVisible, allowClear: allowClear, bordered: false, hidePopup: true, size: size, style: { width: "auto" }, inputStyle: { paddingRight: 2 }, onChange: (value) => {
|
|
276
311
|
var _a, _b;
|
|
277
312
|
(_b = (_a = this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value, this.props.toValue);
|
|
278
313
|
} })),
|
|
279
314
|
React.createElement("span", { style: { alignSelf: "center" } }, "\u27F7"),
|
|
280
|
-
React.createElement(DateTimeInput, Object.assign({ value: toValue }, props, { disabled: disabled, inputDisabled: this.state.popupVisible, allowClear: allowClear, bordered: false, hidePopup: true, style: { width: "auto" }, inputStyle: { paddingLeft: 2 }, onChange: (value) => {
|
|
315
|
+
React.createElement(DateTimeInput, Object.assign({ value: toValue }, props, { disabled: disabled, inputDisabled: this.state.popupVisible, allowClear: allowClear, bordered: false, hidePopup: true, size: size, style: { width: "auto" }, inputStyle: { paddingLeft: 2 }, onChange: (value) => {
|
|
281
316
|
var _a, _b;
|
|
282
317
|
(_b = (_a = this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, this.props.fromValue, value);
|
|
283
318
|
} })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangeInput.js","sourceRoot":"","sources":["../../../../components/date/dateRangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAc,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,2BAA2B,EAAE,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAE9F,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAExC,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,EAAC,KAAK,EAAE,GAAG,EAAC,EAAE,EAAE;IAC5C,OAAO;QACH,UAAU,EAAE,GAAG,CAAA;;;;sBAID,KAAK,CAAC,aAAa;;qBAEpB,KAAK,CAAC,SAAS;yBACX,KAAK,CAAC,QAAQ;2BACZ,KAAK,CAAC,UAAU;gCACX,KAAK,CAAC,gBAAgB;gCACtB,KAAK,CAAC,WAAW;6BACpB,KAAK,CAAC,YAAY;8BACjB,KAAK,CAAC,iBAAiB;;;gCAGrB,KAAK,CAAC,iBAAiB;;;;yBAI9B,KAAK,CAAC,iBAAiB;oCACZ,KAAK,CAAC,wBAAwB;gCAClC,KAAK,CAAC,WAAW;;;;oC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EACnD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,iBAAiB,EAAE,EAAC,KAAK,EAAE,aAAa,EAAC,EACzC,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE;;oBACtB,IAAI,OAAO,EAAE,CAAC;wBACV,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,OAAO,kDAAI,CAAC;oBAC3B,CAAC;yBAAM,CAAC;wBACJ,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,MAAM,kDAAI,CAAC;oBAC1B,CAAC;oBACD,IAAI,CAAC,QAAQ,CAAC,EAAC,YAAY,EAAE,OAAO,EAAC,CAAC,CAAC;gBAC3C,CAAC,EACD,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAC7B,IAAI,CAAC,WAAW,EAAE,CACb,CACb,CAAC;QACN,CAAC;IACL,CAAC;CACJ","sourcesContent":["import React, {HTMLAttributes} from \"react\";\r\nimport dayjs, {Dayjs} from \"dayjs\";\r\nimport {CalendarOutlined} from \"@ant-design/icons\";\r\nimport {Divider, Switch, Tag, Tooltip} from \"antd\";\r\nimport DateTimeInput from \"./dateTimeInput\";\r\nimport memoizeOne from \"memoize-one\";\r\nimport {TooltipPlacement} from \"antd/es/tooltip\";\r\nimport KeyboardUtils from \"../keyboard/keyboardUtils\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport DateRangeInputAdvancedPanel, {TimeShiftDirection} from \"./dateRangeInputAdvancedPanel\";\r\nimport {SizeType} from \"antd/lib/config-provider/SizeContext\";\r\nimport WithCss from \"../style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\n\r\nconst useStyles = createStyles(({token, css}) => {\r\n return {\r\n baseLayout: css`\r\n display: inline-block;\r\n position: relative;\r\n width: 100%;\r\n height: ${token.controlHeight}px;\r\n padding: 0;\r\n color: ${token.colorText};\r\n font-size: ${token.fontSize}px;\r\n line-height: ${token.lineHeight};\r\n background-color: ${token.colorBgContainer};\r\n border: 1px solid ${token.colorBorder};\r\n border-radius: ${token.borderRadius}px;\r\n transition: all ${token.motionDurationMid};\r\n\r\n &:hover {\r\n border-color: ${token.colorPrimaryHover};\r\n }\r\n\r\n &.disabled {\r\n color: ${token.colorTextDisabled};\r\n background-color: ${token.colorBgContainerDisabled};\r\n border-color: ${token.colorBorder};\r\n cursor: not-allowed;\r\n\r\n &:hover {\r\n border-color: ${token.colorBorder};\r\n }\r\n }\r\n `\r\n }\r\n})\r\n\r\nexport enum DateRangeInputMode {\r\n SIMPLE,\r\n ADVANCED,\r\n}\r\n\r\nexport interface DateRangeInputProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\r\n mask: string\r\n fromValue: Dayjs | null\r\n toValue: Dayjs | null\r\n onChange?: (fromValue: Dayjs | null, toValue: Dayjs | null) => void\r\n onInvalidValue?: (input: string) => void\r\n disabled?: boolean\r\n minDateTime?: Dayjs\r\n maxDateTime?: Dayjs\r\n // allows to set no (null) date by datepicker\r\n allowClear?: boolean\r\n ranges?: { [rangeName: string]: () => [Dayjs, Dayjs] }\r\n size?: SizeType;\r\n compact?: boolean\r\n\r\n hidePopup?: boolean\r\n renderAsCalendar?: boolean\r\n placement?: TooltipPlacement\r\n align?: {\r\n points?: [string, string];\r\n offset?: [number, number];\r\n targetOffset?: [number, number];\r\n overflow?: {\r\n adjustX?: boolean;\r\n adjustY?: boolean;\r\n };\r\n useCssRight?: boolean;\r\n useCssBottom?: boolean;\r\n useCssTransform?: boolean;\r\n }\r\n\r\n defaultMode?: DateRangeInputMode\r\n\r\n onModeChange?(mode: DateRangeInputMode): void\r\n\r\n onFocus?(): void\r\n\r\n onBlur?(): void\r\n\r\n confirmButtonsRenderer?(): React.ReactNode\r\n\r\n onPopupVisibleChange?(visible: boolean): void\r\n}\r\n\r\ninterface DateRangeInputState {\r\n valid: boolean\r\n selectionStartDate: Dayjs | null\r\n popupKeyIndex: number\r\n popupVisible: boolean\r\n\r\n mode?: DateRangeInputMode\r\n}\r\n\r\nexport default class DateRangeInput extends React.Component<DateRangeInputProps, DateRangeInputState> {\r\n constructor(props: Readonly<DateRangeInputProps>) {\r\n super(props);\r\n this.state = {\r\n valid: !!props.fromValue && props.fromValue.isValid() && !!props.toValue && props.toValue.isValid(),\r\n selectionStartDate: null,\r\n popupKeyIndex: 0,\r\n popupVisible: false,\r\n\r\n mode: props.compact ? undefined : props.defaultMode ?? DateRangeInputMode.SIMPLE,\r\n };\r\n this.getDefaultSelectedDateForFromPanel = memoizeOne(this.getDefaultSelectedDateForFromPanel.bind(this));\r\n }\r\n\r\n componentDidUpdate(_prevProps: Readonly<DateRangeInputProps>, prevState: Readonly<DateRangeInputState>) {\r\n if (prevState.popupVisible !== this.state.popupVisible && this.props.onPopupVisibleChange) {\r\n this.props.onPopupVisibleChange(this.state.popupVisible);\r\n }\r\n }\r\n\r\n getDefaultSelectedDateForFromPanel(fromDate: Dayjs | null, toDate: Dayjs | null): Dayjs {\r\n if (!!fromDate && !!toDate && fromDate.isSame(toDate, \"date\")) {\r\n return fromDate.clone().subtract(1, \"month\");\r\n } else {\r\n return fromDate ?? dayjs().startOf(\"day\").subtract(1, \"month\");\r\n }\r\n }\r\n\r\n private getFromValue(date: Dayjs) {\r\n return (this.props.fromValue?.clone() ?? dayjs().startOf(\"day\")).year(date.year()).month(date.month()).date(date.date());\r\n }\r\n\r\n private getToValue(date: Dayjs) {\r\n return (this.props.toValue?.clone() ?? dayjs().endOf(\"day\")).year(date.year()).month(date.month()).date(date.date());\r\n }\r\n\r\n closePopup() {\r\n // close tooltip\r\n this.setState({popupKeyIndex: this.state.popupKeyIndex + 1, popupVisible: false});\r\n this.props.onPopupVisibleChange?.(false);\r\n }\r\n\r\n private onChange(fromValue: Dayjs | null, toValue: Dayjs | null) {\r\n if (this.props.minDateTime && fromValue?.isBefore(this.props.minDateTime)) {\r\n fromValue = this.props.minDateTime;\r\n }\r\n if (this.props.maxDateTime && toValue?.isAfter(this.props.maxDateTime)) {\r\n toValue = this.props.maxDateTime;\r\n }\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n\r\n private renderSimplePart() {\r\n const {\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n defaultMode,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n ...props\r\n } = this.props;\r\n const markedDateInterval: [Dayjs, Dayjs] | undefined = this.props.fromValue && this.props.toValue ? [this.props.fromValue, this.props.toValue] : undefined;\r\n\r\n return (\r\n <div>\r\n <div style={{display: \"flex\"}}>\r\n <DateTimeInput value={fromValue} {...props}\r\n allowClear={allowClear}\r\n renderAsCalendar\r\n style={{width: \"100%\"}}\r\n onChange={(date) => {\r\n if (date) {\r\n const fromValue = this.getFromValue(date);\r\n const toValue = this.getToValue(date);\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n }}\r\n defaultSelectedDate={this.getDefaultSelectedDateForFromPanel(fromValue, toValue)}\r\n markedDateInterval={markedDateInterval}\r\n onDateItemMouseDown={(date) => {\r\n this.setState({selectionStartDate: date});\r\n const dateFrom = this.getFromValue(date);\r\n const dateTo = this.getToValue(date);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }}\r\n onDateItemMouseOver={(date) => {\r\n if (KeyboardUtils.isMouseDown() && !!this.state.selectionStartDate) {\r\n let dateFrom: Dayjs;\r\n let dateTo: Dayjs;\r\n if (this.state.selectionStartDate.isBefore(date)) {\r\n dateFrom = this.state.selectionStartDate;\r\n dateTo = date;\r\n } else {\r\n dateFrom = date;\r\n dateTo = this.state.selectionStartDate;\r\n }\r\n dateFrom = this.getFromValue(dateFrom);\r\n dateTo = this.getToValue(dateTo);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }\r\n }}\r\n onDateItemMouseUp={(_date) => {\r\n this.setState({selectionStartDate: null});\r\n }}\r\n ignoreKeyStrokes\r\n />\r\n <Divider type=\"vertical\" style={{height: \"auto\"}}/>\r\n <DateTimeInput value={toValue} {...props}\r\n renderAsCalendar\r\n allowClear={allowClear}\r\n style={{width: \"100%\"}}\r\n onChange={(date) => {\r\n if (date) {\r\n const fromValue = this.getFromValue(date);\r\n const toValue = this.getToValue(date);\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n }}\r\n markedDateInterval={markedDateInterval}\r\n onDateItemMouseDown={(date) => {\r\n this.setState({selectionStartDate: date});\r\n const dateFrom = this.getFromValue(date);\r\n const dateTo = this.getToValue(date);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }}\r\n onDateItemMouseOver={(date) => {\r\n if (KeyboardUtils.isMouseDown() && !!this.state.selectionStartDate) {\r\n let dateFrom: Dayjs;\r\n let dateTo: Dayjs;\r\n if (this.state.selectionStartDate.isBefore(date)) {\r\n dateFrom = this.state.selectionStartDate;\r\n dateTo = date;\r\n } else {\r\n dateFrom = date;\r\n dateTo = this.state.selectionStartDate;\r\n }\r\n dateFrom = this.getFromValue(dateFrom);\r\n dateTo = this.getToValue(dateTo);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }\r\n }}\r\n onDateItemMouseUp={(_date) => {\r\n this.setState({selectionStartDate: null});\r\n }}\r\n ignoreKeyStrokes\r\n />\r\n </div>\r\n <div style={{borderTop: \"1px solid #ddd\", paddingTop: 6}}>\r\n {\r\n this.props.ranges && Object.keys(this.props.ranges).map((rangeName, index) => {\r\n return (<Tag style={{userSelect: \"none\", cursor: \"pointer\"}} color=\"blue\"\r\n key={`range-${index}`}\r\n onClick={() => {\r\n const rangeFunction = this.props.ranges?.[rangeName];\r\n if (rangeFunction) {\r\n const range = rangeFunction();\r\n this.props.onChange?.(range[0], range[1]);\r\n }\r\n }}>\r\n {rangeName}</Tag>);\r\n })\r\n }\r\n </div>\r\n </div>\r\n )\r\n }\r\n\r\n private renderAdvancedPart() {\r\n const {\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n defaultMode,\r\n compact,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n ...props\r\n } = this.props;\r\n return (\r\n <div>\r\n <div style={{display: \"flex\", gap: 8}}>\r\n <DateTimeInput\r\n {...props}\r\n style={{flexGrow: 1}}\r\n value={fromValue}\r\n onChange={(value) => {\r\n this.props.onChange?.(value, this.props.toValue);\r\n }}\r\n />\r\n {!compact &&\r\n <span style={{margin: 4, color: \"rgba(0, 0, 0, 0.65)\", textAlign: \"center\"}}>{\"\\u27F7\"}</span>\r\n }\r\n <DateTimeInput\r\n {...props}\r\n style={{flexGrow: 1}}\r\n value={toValue}\r\n onChange={(value) => {\r\n this.props.onChange?.(this.props.fromValue, value);\r\n }}\r\n />\r\n </div>\r\n <DateRangeInputAdvancedPanel\r\n compact={compact}\r\n onBeginIntervalChange={unit => {\r\n let from: Dayjs;\r\n if (unit === \"15minutes\") {\r\n const roundedMinutes = Math.floor(dayjs().minute() / 15) * 15;\r\n from = dayjs().startOf(\"hour\").minute(roundedMinutes);\r\n } else {\r\n from = dayjs().startOf(unit);\r\n }\r\n this.onChange(from, this.props.toValue);\r\n }}\r\n onIntervalDurationChange={unitOfTime => {\r\n if (this.props.fromValue) {\r\n let to: Dayjs = this.props.fromValue.clone().add(1, unitOfTime).subtract(1, \"millisecond\")\r\n this.onChange(this.props.fromValue, to);\r\n }\r\n }}\r\n onTimeShift={(shiftBegin, shiftEnd, unitOfTime, type) => {\r\n let fromValue = this.props.fromValue ?? null;\r\n let toValue = this.props.toValue ?? null;\r\n\r\n if (shiftBegin && fromValue) {\r\n if (type === TimeShiftDirection.INCREMENT) {\r\n fromValue = fromValue.add(1, unitOfTime);\r\n } else if (type === TimeShiftDirection.DECREMENT) {\r\n fromValue = fromValue.subtract(1, unitOfTime);\r\n }\r\n }\r\n\r\n if (shiftEnd && toValue) {\r\n if (type === TimeShiftDirection.INCREMENT) {\r\n toValue = toValue.add(1, unitOfTime);\r\n } else if (type === TimeShiftDirection.DECREMENT) {\r\n toValue = toValue.subtract(1, unitOfTime);\r\n }\r\n }\r\n\r\n this.onChange(fromValue, toValue);\r\n }}\r\n onEndIntervalChange={unit => {\r\n let to: Dayjs;\r\n if (unit === \"15minutes\") {\r\n const roundedMinutes = Math.floor(dayjs().minute() / 15) * 15;\r\n to = dayjs().startOf(\"hour\").minute(roundedMinutes).subtract(1, \"millisecond\");\r\n } else {\r\n to = dayjs().startOf(unit).subtract(1, \"millisecond\");\r\n }\r\n this.onChange(this.props.fromValue, to);\r\n }}\r\n />\r\n </div>\r\n )\r\n }\r\n\r\n renderPopup(): React.ReactElement {\r\n return (\r\n <div onFocus={this.props.onFocus} onBlur={this.props.onBlur}>\r\n {this.props.compact && this.renderAdvancedPart()}\r\n {this.state.mode === DateRangeInputMode.SIMPLE && this.renderSimplePart()}\r\n {this.state.mode === DateRangeInputMode.ADVANCED && this.renderAdvancedPart()}\r\n <div style={{height: 28, display: \"flex\", justifyContent: \"space-between\", alignItems: \"flex-end\"}}>\r\n <div>\r\n {!this.props.compact &&\r\n <Switch\r\n checked={this.state.mode === DateRangeInputMode.ADVANCED}\r\n onChange={checked => {\r\n const mode = checked ? DateRangeInputMode.ADVANCED : DateRangeInputMode.SIMPLE;\r\n this.setState({mode: mode});\r\n this.props.onModeChange?.(mode);\r\n }}\r\n checkedChildren={i18n(\"Advanced Mode\")}\r\n unCheckedChildren={i18n(\"Simple Mode\")}\r\n />\r\n }\r\n </div>\r\n {this.props.confirmButtonsRenderer?.()}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n renderInput() {\r\n const {\r\n className,\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n disabled,\r\n defaultMode,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n ...props\r\n } = this.props;\r\n\r\n return (\r\n <div style={{...style, padding: 0, position: \"relative\"}} className={className}\r\n onFocus={this.props.onFocus}\r\n onBlur={this.props.onBlur}>\r\n <WithCss useStyles={useStyles}>\r\n {(context) =>\r\n <div style={{display: \"flex\", justifyContent: \"space-between\", paddingRight: 8}}\r\n className={context.styles.baseLayout + (disabled || this.state.popupVisible ? \" disabled\" : \"\")}>\r\n <DateTimeInput value={fromValue} {...props}\r\n disabled={disabled}\r\n inputDisabled={this.state.popupVisible}\r\n allowClear={allowClear}\r\n bordered={false}\r\n hidePopup={true}\r\n style={{width: \"auto\"}}\r\n inputStyle={{paddingRight: 2}}\r\n onChange={(value) => {\r\n this.props.onChange?.(value, this.props.toValue);\r\n }}\r\n />\r\n <span style={{alignSelf: \"center\"}}>{\"\\u27F7\"}</span>\r\n <DateTimeInput value={toValue} {...props}\r\n disabled={disabled}\r\n inputDisabled={this.state.popupVisible}\r\n allowClear={allowClear}\r\n bordered={false}\r\n hidePopup={true}\r\n style={{width: \"auto\"}}\r\n inputStyle={{paddingLeft: 2}}\r\n onChange={(value) => {\r\n this.props.onChange?.(this.props.fromValue, value);\r\n }}\r\n />\r\n {!hidePopup && !renderAsCalendar &&\r\n <CalendarOutlined\r\n style={{cursor: (disabled || this.state.popupVisible) ? \"not-allowed\" : \"pointer\"}}\r\n onClick={(event) => {\r\n if (!disabled && document.createEvent) {\r\n if (this.state.popupVisible) {\r\n this.closePopup();\r\n } else {\r\n var ev = document.createEvent('HTMLEvents');\r\n ev.initEvent('contextmenu', true, false);\r\n event.target.dispatchEvent(ev);\r\n this.props.onFocus?.();\r\n }\r\n }\r\n }}\r\n />\r\n }\r\n </div>\r\n }\r\n </WithCss>\r\n </div>\r\n );\r\n }\r\n\r\n render(): any {\r\n if (this.props.renderAsCalendar) {\r\n return this.renderPopup();\r\n } else if (this.props.hidePopup) {\r\n return this.renderInput();\r\n } else {\r\n return (\r\n <Tooltip color={\"white\"}\r\n key={\"date-range-popup-\" + this.state.popupKeyIndex}\r\n trigger={this.props.disabled ? [] : [\"contextMenu\"]}\r\n align={this.props.align}\r\n placement={this.props.placement}\r\n overlayInnerStyle={{width: \"fit-content\"}}\r\n onOpenChange={(visible) => {\r\n if (visible) {\r\n this.props.onFocus?.();\r\n } else {\r\n this.props.onBlur?.();\r\n }\r\n this.setState({popupVisible: visible});\r\n }}\r\n title={this.renderPopup()}>\r\n {this.renderInput()}\r\n </Tooltip>\r\n );\r\n }\r\n }\r\n}"]}
|
|
1
|
+
{"version":3,"file":"dateRangeInput.js","sourceRoot":"","sources":["../../../../components/date/dateRangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAc,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,2BAA2B,EAAE,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAE9F,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAExC,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,EAAC,KAAK,EAAE,GAAG,EAAC,EAAE,KAAuB,EAAE,EAAE;IACrE,MAAM,EAAC,IAAI,GAAG,QAAQ,EAAC,GAAG,KAAK,CAAC;IAEhC,MAAM,SAAS,GAA0C;QACrD,KAAK,EAAE,KAAK,CAAC,eAAe;QAC5B,MAAM,EAAE,KAAK,CAAC,aAAa;QAC3B,KAAK,EAAE,KAAK,CAAC,eAAe;KAC/B,CAAC;IAEF,OAAO;QACH,UAAU,EAAE,GAAG,CAAA;;;;sBAID,S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\r\nimport dayjs, {Dayjs} from \"dayjs\";\r\nimport {CalendarOutlined} from \"@ant-design/icons\";\r\nimport {Divider, Switch, Tag, Tooltip} from \"antd\";\r\nimport DateTimeInput from \"./dateTimeInput\";\r\nimport memoizeOne from \"memoize-one\";\r\nimport {TooltipPlacement} from \"antd/es/tooltip\";\r\nimport KeyboardUtils from \"../keyboard/keyboardUtils\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport DateRangeInputAdvancedPanel, {TimeShiftDirection} from \"./dateRangeInputAdvancedPanel\";\r\nimport {SizeType} from \"antd/lib/config-provider/SizeContext\";\r\nimport WithCss from \"../style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\n\r\nconst useStyles = createStyles(({token, css}, props: {size: SizeType}) => {\r\n const {size = 'middle'} = props;\r\n\r\n const heightMap: Record<NonNullable<SizeType>, number> = {\r\n small: token.controlHeightSM,\r\n middle: token.controlHeight,\r\n large: token.controlHeightLG,\r\n };\r\n\r\n return {\r\n baseLayout: css`\r\n display: inline-block;\r\n position: relative;\r\n width: 100%;\r\n height: ${heightMap[size]}px;\r\n padding: 0;\r\n color: ${token.colorText};\r\n font-size: ${token.fontSize}px;\r\n line-height: ${token.lineHeight};\r\n background-color: ${token.colorBgContainer};\r\n border: 1px solid ${token.colorBorder};\r\n border-radius: ${token.borderRadius}px;\r\n transition: all ${token.motionDurationMid};\r\n \r\n .ant-space-compact & {\r\n border-radius: 0;\r\n }\r\n\r\n .ant-space-compact > *:not(:first-child) & {\r\n width: calc(100% + 1px);\r\n }\r\n\r\n .ant-space-compact > *:first-child & {\r\n border-start-start-radius: ${token.borderRadius}px;\r\n border-end-start-radius: ${token.borderRadius}px;\r\n border-inline-end-width: 1px;\r\n }\r\n\r\n .ant-space-compact > *:last-child & {\r\n border-start-end-radius: ${token.borderRadius}px;\r\n border-end-end-radius: ${token.borderRadius}px;\r\n }\r\n\r\n .ant-space-compact > *:first-child:last-child & {\r\n border-radius: ${token.borderRadius}px;\r\n }\r\n \r\n &:focus-within {\r\n border-color: ${token.colorPrimaryHover};\r\n z-index: 3;\r\n }\r\n\r\n &:hover {\r\n border-color: ${token.colorPrimaryHover};\r\n z-index: 3;\r\n }\r\n\r\n &.disabled {\r\n color: ${token.colorTextDisabled};\r\n background-color: ${token.colorBgContainerDisabled};\r\n border-color: ${token.colorBorder};\r\n cursor: not-allowed;\r\n\r\n &:hover {\r\n border-color: ${token.colorBorder};\r\n }\r\n }\r\n `\r\n }\r\n})\r\n\r\nexport enum DateRangeInputMode {\r\n SIMPLE,\r\n ADVANCED,\r\n}\r\n\r\nexport interface DateRangeInputProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\r\n mask: string\r\n fromValue: Dayjs | null\r\n toValue: Dayjs | null\r\n onChange?: (fromValue: Dayjs | null, toValue: Dayjs | null) => void\r\n onInvalidValue?: (input: string) => void\r\n disabled?: boolean\r\n minDateTime?: Dayjs\r\n maxDateTime?: Dayjs\r\n // allows to set no (null) date by datepicker\r\n allowClear?: boolean\r\n ranges?: { [rangeName: string]: () => [Dayjs, Dayjs] }\r\n size?: SizeType;\r\n compact?: boolean\r\n\r\n hidePopup?: boolean\r\n renderAsCalendar?: boolean\r\n placement?: TooltipPlacement\r\n align?: {\r\n points?: [string, string];\r\n offset?: [number, number];\r\n targetOffset?: [number, number];\r\n overflow?: {\r\n adjustX?: boolean;\r\n adjustY?: boolean;\r\n };\r\n useCssRight?: boolean;\r\n useCssBottom?: boolean;\r\n useCssTransform?: boolean;\r\n }\r\n\r\n defaultMode?: DateRangeInputMode\r\n\r\n onModeChange?(mode: DateRangeInputMode): void\r\n\r\n onFocus?(): void\r\n\r\n onBlur?(): void\r\n\r\n confirmButtonsRenderer?(): React.ReactNode\r\n\r\n onPopupVisibleChange?(visible: boolean): void\r\n}\r\n\r\ninterface DateRangeInputState {\r\n valid: boolean\r\n selectionStartDate: Dayjs | null\r\n popupKeyIndex: number\r\n popupVisible: boolean\r\n\r\n mode?: DateRangeInputMode\r\n}\r\n\r\nexport default class DateRangeInput extends React.Component<DateRangeInputProps, DateRangeInputState> {\r\n constructor(props: Readonly<DateRangeInputProps>) {\r\n super(props);\r\n this.state = {\r\n valid: !!props.fromValue && props.fromValue.isValid() && !!props.toValue && props.toValue.isValid(),\r\n selectionStartDate: null,\r\n popupKeyIndex: 0,\r\n popupVisible: false,\r\n\r\n mode: props.compact ? undefined : props.defaultMode ?? DateRangeInputMode.SIMPLE,\r\n };\r\n this.getDefaultSelectedDateForFromPanel = memoizeOne(this.getDefaultSelectedDateForFromPanel.bind(this));\r\n }\r\n\r\n componentDidUpdate(_prevProps: Readonly<DateRangeInputProps>, prevState: Readonly<DateRangeInputState>) {\r\n if (prevState.popupVisible !== this.state.popupVisible && this.props.onPopupVisibleChange) {\r\n this.props.onPopupVisibleChange(this.state.popupVisible);\r\n }\r\n }\r\n\r\n getDefaultSelectedDateForFromPanel(fromDate: Dayjs | null, toDate: Dayjs | null): Dayjs {\r\n if (!!fromDate && !!toDate && fromDate.isSame(toDate, \"date\")) {\r\n return fromDate.clone().subtract(1, \"month\");\r\n } else {\r\n return fromDate ?? dayjs().startOf(\"day\").subtract(1, \"month\");\r\n }\r\n }\r\n\r\n private getFromValue(date: Dayjs) {\r\n return (this.props.fromValue?.clone() ?? dayjs().startOf(\"day\")).year(date.year()).month(date.month()).date(date.date());\r\n }\r\n\r\n private getToValue(date: Dayjs) {\r\n return (this.props.toValue?.clone() ?? dayjs().endOf(\"day\")).year(date.year()).month(date.month()).date(date.date());\r\n }\r\n\r\n closePopup() {\r\n // close tooltip\r\n this.setState({popupKeyIndex: this.state.popupKeyIndex + 1, popupVisible: false});\r\n this.props.onPopupVisibleChange?.(false);\r\n }\r\n\r\n private onChange(fromValue: Dayjs | null, toValue: Dayjs | null) {\r\n if (this.props.minDateTime && fromValue?.isBefore(this.props.minDateTime)) {\r\n fromValue = this.props.minDateTime;\r\n }\r\n if (this.props.maxDateTime && toValue?.isAfter(this.props.maxDateTime)) {\r\n toValue = this.props.maxDateTime;\r\n }\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n\r\n private renderSimplePart() {\r\n const {\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n defaultMode,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n ...props\r\n } = this.props;\r\n const markedDateInterval: [Dayjs, Dayjs] | undefined = this.props.fromValue && this.props.toValue ? [this.props.fromValue, this.props.toValue] : undefined;\r\n\r\n return (\r\n <div>\r\n <div style={{display: \"flex\"}}>\r\n <DateTimeInput value={fromValue} {...props}\r\n allowClear={allowClear}\r\n renderAsCalendar\r\n style={{width: \"100%\"}}\r\n onChange={(date) => {\r\n if (date) {\r\n const fromValue = this.getFromValue(date);\r\n const toValue = this.getToValue(date);\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n }}\r\n defaultSelectedDate={this.getDefaultSelectedDateForFromPanel(fromValue, toValue)}\r\n markedDateInterval={markedDateInterval}\r\n onDateItemMouseDown={(date) => {\r\n this.setState({selectionStartDate: date});\r\n const dateFrom = this.getFromValue(date);\r\n const dateTo = this.getToValue(date);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }}\r\n onDateItemMouseOver={(date) => {\r\n if (KeyboardUtils.isMouseDown() && !!this.state.selectionStartDate) {\r\n let dateFrom: Dayjs;\r\n let dateTo: Dayjs;\r\n if (this.state.selectionStartDate.isBefore(date)) {\r\n dateFrom = this.state.selectionStartDate;\r\n dateTo = date;\r\n } else {\r\n dateFrom = date;\r\n dateTo = this.state.selectionStartDate;\r\n }\r\n dateFrom = this.getFromValue(dateFrom);\r\n dateTo = this.getToValue(dateTo);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }\r\n }}\r\n onDateItemMouseUp={(_date) => {\r\n this.setState({selectionStartDate: null});\r\n }}\r\n ignoreKeyStrokes\r\n />\r\n <Divider type=\"vertical\" style={{height: \"auto\"}}/>\r\n <DateTimeInput value={toValue} {...props}\r\n renderAsCalendar\r\n allowClear={allowClear}\r\n style={{width: \"100%\"}}\r\n onChange={(date) => {\r\n if (date) {\r\n const fromValue = this.getFromValue(date);\r\n const toValue = this.getToValue(date);\r\n this.props.onChange?.(fromValue, toValue);\r\n }\r\n }}\r\n markedDateInterval={markedDateInterval}\r\n onDateItemMouseDown={(date) => {\r\n this.setState({selectionStartDate: date});\r\n const dateFrom = this.getFromValue(date);\r\n const dateTo = this.getToValue(date);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }}\r\n onDateItemMouseOver={(date) => {\r\n if (KeyboardUtils.isMouseDown() && !!this.state.selectionStartDate) {\r\n let dateFrom: Dayjs;\r\n let dateTo: Dayjs;\r\n if (this.state.selectionStartDate.isBefore(date)) {\r\n dateFrom = this.state.selectionStartDate;\r\n dateTo = date;\r\n } else {\r\n dateFrom = date;\r\n dateTo = this.state.selectionStartDate;\r\n }\r\n dateFrom = this.getFromValue(dateFrom);\r\n dateTo = this.getToValue(dateTo);\r\n this.props.onChange?.(dateFrom, dateTo);\r\n }\r\n }}\r\n onDateItemMouseUp={(_date) => {\r\n this.setState({selectionStartDate: null});\r\n }}\r\n ignoreKeyStrokes\r\n />\r\n </div>\r\n <div style={{borderTop: \"1px solid #ddd\", paddingTop: 6}}>\r\n {\r\n this.props.ranges && Object.keys(this.props.ranges).map((rangeName, index) => {\r\n return (<Tag style={{userSelect: \"none\", cursor: \"pointer\"}} color=\"blue\"\r\n key={`range-${index}`}\r\n onClick={() => {\r\n const rangeFunction = this.props.ranges?.[rangeName];\r\n if (rangeFunction) {\r\n const range = rangeFunction();\r\n this.props.onChange?.(range[0], range[1]);\r\n }\r\n }}>\r\n {rangeName}</Tag>);\r\n })\r\n }\r\n </div>\r\n </div>\r\n )\r\n }\r\n\r\n private renderAdvancedPart() {\r\n const {\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n defaultMode,\r\n compact,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n ...props\r\n } = this.props;\r\n return (\r\n <div>\r\n <div style={{display: \"flex\", gap: 8}}>\r\n <DateTimeInput\r\n {...props}\r\n style={{flexGrow: 1}}\r\n value={fromValue}\r\n onChange={(value) => {\r\n this.props.onChange?.(value, this.props.toValue);\r\n }}\r\n />\r\n {!compact &&\r\n <span style={{margin: 4, color: \"rgba(0, 0, 0, 0.65)\", textAlign: \"center\"}}>{\"\\u27F7\"}</span>\r\n }\r\n <DateTimeInput\r\n {...props}\r\n style={{flexGrow: 1}}\r\n value={toValue}\r\n onChange={(value) => {\r\n this.props.onChange?.(this.props.fromValue, value);\r\n }}\r\n />\r\n </div>\r\n <DateRangeInputAdvancedPanel\r\n compact={compact}\r\n onBeginIntervalChange={unit => {\r\n let from: Dayjs;\r\n if (unit === \"15minutes\") {\r\n const roundedMinutes = Math.floor(dayjs().minute() / 15) * 15;\r\n from = dayjs().startOf(\"hour\").minute(roundedMinutes);\r\n } else {\r\n from = dayjs().startOf(unit);\r\n }\r\n this.onChange(from, this.props.toValue);\r\n }}\r\n onIntervalDurationChange={unitOfTime => {\r\n if (this.props.fromValue) {\r\n let to: Dayjs = this.props.fromValue.clone().add(1, unitOfTime).subtract(1, \"millisecond\")\r\n this.onChange(this.props.fromValue, to);\r\n }\r\n }}\r\n onTimeShift={(shiftBegin, shiftEnd, unitOfTime, type) => {\r\n let fromValue = this.props.fromValue ?? null;\r\n let toValue = this.props.toValue ?? null;\r\n\r\n if (shiftBegin && fromValue) {\r\n if (type === TimeShiftDirection.INCREMENT) {\r\n fromValue = fromValue.add(1, unitOfTime);\r\n } else if (type === TimeShiftDirection.DECREMENT) {\r\n fromValue = fromValue.subtract(1, unitOfTime);\r\n }\r\n }\r\n\r\n if (shiftEnd && toValue) {\r\n if (type === TimeShiftDirection.INCREMENT) {\r\n toValue = toValue.add(1, unitOfTime);\r\n } else if (type === TimeShiftDirection.DECREMENT) {\r\n toValue = toValue.subtract(1, unitOfTime);\r\n }\r\n }\r\n\r\n this.onChange(fromValue, toValue);\r\n }}\r\n onEndIntervalChange={unit => {\r\n let to: Dayjs;\r\n if (unit === \"15minutes\") {\r\n const roundedMinutes = Math.floor(dayjs().minute() / 15) * 15;\r\n to = dayjs().startOf(\"hour\").minute(roundedMinutes).subtract(1, \"millisecond\");\r\n } else {\r\n to = dayjs().startOf(unit).subtract(1, \"millisecond\");\r\n }\r\n this.onChange(this.props.fromValue, to);\r\n }}\r\n />\r\n </div>\r\n )\r\n }\r\n\r\n renderPopup(): React.ReactElement {\r\n return (\r\n <div onFocus={this.props.onFocus} onBlur={this.props.onBlur}>\r\n {this.props.compact && this.renderAdvancedPart()}\r\n {this.state.mode === DateRangeInputMode.SIMPLE && this.renderSimplePart()}\r\n {this.state.mode === DateRangeInputMode.ADVANCED && this.renderAdvancedPart()}\r\n <div style={{height: 28, display: \"flex\", justifyContent: \"space-between\", alignItems: \"flex-end\"}}>\r\n <div>\r\n {!this.props.compact &&\r\n <Switch\r\n checked={this.state.mode === DateRangeInputMode.ADVANCED}\r\n onChange={checked => {\r\n const mode = checked ? DateRangeInputMode.ADVANCED : DateRangeInputMode.SIMPLE;\r\n this.setState({mode: mode});\r\n this.props.onModeChange?.(mode);\r\n }}\r\n checkedChildren={i18n(\"Advanced Mode\")}\r\n unCheckedChildren={i18n(\"Simple Mode\")}\r\n />\r\n }\r\n </div>\r\n {this.props.confirmButtonsRenderer?.()}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n renderInput() {\r\n const {\r\n className,\r\n fromValue,\r\n toValue,\r\n onChange,\r\n style,\r\n allowClear,\r\n renderAsCalendar,\r\n hidePopup,\r\n align,\r\n disabled,\r\n defaultMode,\r\n onModeChange,\r\n confirmButtonsRenderer,\r\n onPopupVisibleChange,\r\n size,\r\n ...props\r\n } = this.props;\r\n\r\n return (\r\n <div style={{...style, padding: 0, position: \"relative\"}} className={className}\r\n onFocus={this.props.onFocus}\r\n onBlur={this.props.onBlur}>\r\n <WithCss useStyles={useStyles} props={{size}}>\r\n {(context) =>\r\n <div style={{display: \"flex\", justifyContent: \"space-between\", paddingRight: 8}}\r\n className={context.styles.baseLayout + (disabled || this.state.popupVisible ? \" disabled\" : \"\")}>\r\n <DateTimeInput value={fromValue} {...props}\r\n disabled={disabled}\r\n inputDisabled={this.state.popupVisible}\r\n allowClear={allowClear}\r\n bordered={false}\r\n hidePopup={true}\r\n size={size}\r\n style={{width: \"auto\"}}\r\n inputStyle={{paddingRight: 2}}\r\n onChange={(value) => {\r\n this.props.onChange?.(value, this.props.toValue);\r\n }}\r\n />\r\n <span style={{alignSelf: \"center\"}}>{\"\\u27F7\"}</span>\r\n <DateTimeInput value={toValue} {...props}\r\n disabled={disabled}\r\n inputDisabled={this.state.popupVisible}\r\n allowClear={allowClear}\r\n bordered={false}\r\n hidePopup={true}\r\n size={size}\r\n style={{width: \"auto\"}}\r\n inputStyle={{paddingLeft: 2}}\r\n onChange={(value) => {\r\n this.props.onChange?.(this.props.fromValue, value);\r\n }}\r\n />\r\n {!hidePopup && !renderAsCalendar &&\r\n <CalendarOutlined\r\n style={{cursor: (disabled || this.state.popupVisible) ? \"not-allowed\" : \"pointer\"}}\r\n onClick={(event) => {\r\n if (!disabled && document.createEvent) {\r\n if (this.state.popupVisible) {\r\n this.closePopup();\r\n } else {\r\n var ev = document.createEvent('HTMLEvents');\r\n ev.initEvent('contextmenu', true, false);\r\n event.target.dispatchEvent(ev);\r\n this.props.onFocus?.();\r\n }\r\n }\r\n }}\r\n />\r\n }\r\n </div>\r\n }\r\n </WithCss>\r\n </div>\r\n );\r\n }\r\n\r\n render(): any {\r\n if (this.props.renderAsCalendar) {\r\n return this.renderPopup();\r\n } else if (this.props.hidePopup) {\r\n return this.renderInput();\r\n } else {\r\n return (\r\n <Tooltip color={\"white\"}\r\n key={\"date-range-popup-\" + this.state.popupKeyIndex}\r\n trigger={this.props.disabled ? [] : [\"contextMenu\"]}\r\n align={this.props.align}\r\n placement={this.props.placement}\r\n overlayInnerStyle={{width: \"fit-content\"}}\r\n onOpenChange={(visible) => {\r\n if (visible) {\r\n this.props.onFocus?.();\r\n } else {\r\n this.props.onBlur?.();\r\n }\r\n this.setState({popupVisible: visible});\r\n }}\r\n title={this.renderPopup()}>\r\n {this.renderInput()}\r\n </Tooltip>\r\n );\r\n }\r\n }\r\n}"]}
|
|
@@ -164,7 +164,6 @@ export default class DataGrid extends React.Component<DataGridProps, DataGridSta
|
|
|
164
164
|
lastNavigationEvent?: NavigationEventEnum;
|
|
165
165
|
lastPaginationEvent?: PaginationChangedEvent | null;
|
|
166
166
|
table_context: any;
|
|
167
|
-
private wrappingDiv;
|
|
168
167
|
private readonly getTheme;
|
|
169
168
|
constructor(props: Readonly<DataGridProps>);
|
|
170
169
|
private static getCellValue;
|
|
@@ -109,7 +109,6 @@ class DataGrid extends React.Component {
|
|
|
109
109
|
super(props);
|
|
110
110
|
this.firstLoadDone = false;
|
|
111
111
|
this.lastPaginationEvent = null;
|
|
112
|
-
this.wrappingDiv = null;
|
|
113
112
|
this.state = {
|
|
114
113
|
pageIndex: 0,
|
|
115
114
|
pageSize: null,
|
|
@@ -1364,7 +1363,7 @@ class DataGrid extends React.Component {
|
|
|
1364
1363
|
return noRecordsOverlay;
|
|
1365
1364
|
}
|
|
1366
1365
|
}
|
|
1367
|
-
return (React.createElement(Empty, { description: i18n("No records found."),
|
|
1366
|
+
return (React.createElement(Empty, { description: i18n("No records found."), styles: { image: { height: "8vh" } } },
|
|
1368
1367
|
React.createElement(Button, { type: "primary", onClick: () => {
|
|
1369
1368
|
if (this.props.search && this.props.search.onSearch) {
|
|
1370
1369
|
this.props.search.onSearch();
|
|
@@ -1697,7 +1696,7 @@ class DataGrid extends React.Component {
|
|
|
1697
1696
|
}
|
|
1698
1697
|
const headerFilterRowHeight = calculateRowHeight(this.state.fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2);
|
|
1699
1698
|
return (React.createElement(React.Fragment, null,
|
|
1700
|
-
React.createElement(Card, { size: "small",
|
|
1699
|
+
React.createElement(Card, { size: "small", variant: "borderless", style: { height: "100%" }, styles: { body: bodyStyle } },
|
|
1701
1700
|
React.createElement("div", { style: { display: "flex" } }, this.renderNavigationPanel()),
|
|
1702
1701
|
React.createElement("div", { style: tPanelStyle },
|
|
1703
1702
|
React.createElement(Dropdown, { trigger: ["contextMenu"], getPopupContainer: () => {
|
|
@@ -1723,16 +1722,14 @@ class DataGrid extends React.Component {
|
|
|
1723
1722
|
} },
|
|
1724
1723
|
React.createElement(WithCss, { useStyles: useStyles }, (styles) => {
|
|
1725
1724
|
var _a, _b;
|
|
1726
|
-
return React.createElement("div", { className: "ag-theme-balham " + styles.styles.baseLayout, style: { width: "100%", height: "100%" },
|
|
1727
|
-
this.wrappingDiv = wrapingDiv;
|
|
1728
|
-
} },
|
|
1725
|
+
return React.createElement("div", { className: "ag-theme-balham " + styles.styles.baseLayout, style: { width: "100%", height: "100%" } },
|
|
1729
1726
|
React.createElement(ConfigProvider.ConfigContext.Consumer, null, (context) => {
|
|
1730
1727
|
var _a;
|
|
1731
1728
|
const defaultTheme = theme !== null && theme !== void 0 ? theme : this.getTheme((_a = context.theme) === null || _a === void 0 ? void 0 : _a.algorithm, styles.theme);
|
|
1732
1729
|
return (React.createElement(AgGridReact, Object.assign({ key: key, debug: debugMode, ref: gridRef, theme: defaultTheme, paginationPageSize: paginationPageSize, maxConcurrentDatasourceRequests: this.props.rowModelType === "infinite" ? 1 : undefined, onGridReady: this.onGridReady, onPaginationChanged: this.onPaginationChanged, onFilterModified: this.onFilterModified, onFilterChanged: this.onFilterChanged, onSortChanged: this.onSortChanged, defaultColDef: this.getDefaultColDefinition(defaultColDef), columnDefs: adaptedColumnDefs, rowData: !rowDataManualMode ? rowData : undefined }, passedProperties, { onCellFocused: this.onCellFocused, cellSelection: rowSelection === "multiple" || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === "multiRow", rowSelection: rowSelection, suppressPaginationPanel: true, getRowId: getRowId, maintainColumnOrder: true, components: customComponents, columnTypes: this.columnTypes, onColumnVisible: this.onColumnsChanged, onColumnPinned: this.onColumnsChanged, onColumnResized: this.onColumnsChanged, onColumnMoved: this.onColumnsChanged, onCellMouseOver: this.onCellMouseOver, onCellMouseDown: this.onCellMouseDown, navigateToNextCell: this.navigateToNextCell, onViewportChanged: this.onViewportChanged, onCellContextMenu: this.onCellContextMenu, loadingOverlayComponent: 'loadingOverlay', noRowsOverlayComponent: 'noRecordsOverlay', onRowDataUpdated: this.onRowDataUpdated, context: this.table_context, rowHeight: this.state.rowHeight, getRowStyle: this._getRowStyle, getRowHeight: this._getRowHeight, headerHeight: headerHeight !== undefined ? headerHeight : headerFilterRowHeight, floatingFiltersHeight: headerFilterRowHeight, suppressLoadingOverlay: this.props.loadingOverlayRenderer ? true : this.props.suppressLoadingOverlay, quickFilterParser: this.wildcardQuickFilter.quickFilterParser, quickFilterMatcher: this.wildcardQuickFilter.quickFilterMatcher })));
|
|
1733
1730
|
}),
|
|
1734
1731
|
this.state.loading && this.props.loadingOverlayRenderer &&
|
|
1735
|
-
React.createElement("div", { className: "ag-overlay", "aria-hidden": "true"
|
|
1732
|
+
React.createElement("div", { className: "ag-overlay", "aria-hidden": "true" },
|
|
1736
1733
|
React.createElement("div", { className: "ag-overlay-panel" },
|
|
1737
1734
|
React.createElement("div", { className: "ag-overlay-wrapper ag-layout-normal ag-overlay-loading-wrapper" },
|
|
1738
1735
|
React.createElement("div", { className: "ag-react-container" }, (_b = (_a = this.props).loadingOverlayRenderer) === null || _b === void 0 ? void 0 : _b.call(_a))))));
|