iglooform 3.7.2 → 3.7.3
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/.dumi/tmp/dumi/theme/ContextWrapper.tsx +2 -2
- package/es/checkbox/index.js +4 -1
- package/es/date-picker/index.d.ts +13 -0
- package/es/date-picker/index.js +7 -2
- package/es/filter/index.js +2 -1
- package/es/form/element/index.d.ts +12 -0
- package/es/form/element/index.js +1 -1
- package/lib/checkbox/index.js +4 -1
- package/lib/date-picker/index.d.ts +13 -0
- package/lib/date-picker/index.js +6 -1
- package/lib/filter/index.js +2 -1
- package/lib/form/element/index.d.ts +12 -0
- package/lib/form/element/index.js +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ export default function DumiContextWrapper() {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<SiteContext.Provider value={{
|
|
33
|
-
pkg: {"name":"iglooform","version":"3.7.
|
|
33
|
+
pkg: {"name":"iglooform","version":"3.7.2","license":"MIT"},
|
|
34
34
|
historyType: "browser",
|
|
35
35
|
entryExports,
|
|
36
36
|
demos,
|
|
@@ -39,7 +39,7 @@ export default function DumiContextWrapper() {
|
|
|
39
39
|
loading,
|
|
40
40
|
setLoading,
|
|
41
41
|
hostname: undefined,
|
|
42
|
-
themeConfig: {"footer":"Copyright ©
|
|
42
|
+
themeConfig: {"footer":"Copyright © 2026 | Powered by <a href=\"https://d.umijs.org\" target=\"_blank\" rel=\"noreferrer\">dumi</a>","prefersColor":{"default":"light","switch":true},"nprogress":true,"lastUpdated":true,"mode":"site","title":"iglooform","logo":"/logo.png","name":"iglooform","nav":{"mode":"append","value":[{"title":"2.x","link":"https://iglooform.dev.axinan.com"}]}},
|
|
43
43
|
_2_level_nav_available: false,
|
|
44
44
|
}}>
|
|
45
45
|
{outlet}
|
package/es/checkbox/index.js
CHANGED
|
@@ -56,7 +56,10 @@ IglooCheckbox.formItemPropsHandler = function (config) {
|
|
|
56
56
|
getValueFromEvent: function getValueFromEvent(e) {
|
|
57
57
|
return e.target.checked;
|
|
58
58
|
},
|
|
59
|
-
valuePropName: 'checked'
|
|
59
|
+
valuePropName: 'checked',
|
|
60
|
+
previewFormater: function previewFormater(value) {
|
|
61
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
62
|
+
}
|
|
60
63
|
};
|
|
61
64
|
};
|
|
62
65
|
export default IglooCheckbox;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DatePickerProps, RangePickerProps, MonthPickerProps, WeekPickerProps } from 'antd/es/date-picker';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import { Dayjs } from 'dayjs';
|
|
4
|
+
import './style';
|
|
5
|
+
export { default as IglooBuddhistDatePicker } from './buddhist';
|
|
6
|
+
type Props = Omit<DatePickerProps, 'value'> & IglooComponentProps & {
|
|
7
|
+
value?: Dayjs | null | 0;
|
|
8
|
+
};
|
|
9
|
+
declare const IglooDatePicker: FC<Props>;
|
|
10
|
+
export default IglooDatePicker;
|
|
11
|
+
export declare const IglooRangePicker: FC<RangePickerProps & IglooComponentProps>;
|
|
12
|
+
export declare const IglooWeekPicker: FC<WeekPickerProps & IglooComponentProps>;
|
|
13
|
+
export declare const IglooMonthPicker: FC<MonthPickerProps & IglooComponentProps>;
|
package/es/date-picker/index.js
CHANGED
|
@@ -16,7 +16,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
import { useState } from 'react';
|
|
19
|
+
import { useMemo, useState } from 'react';
|
|
20
20
|
import { DatePicker } from 'antd';
|
|
21
21
|
import omit from 'omit.js';
|
|
22
22
|
import moment from 'dayjs';
|
|
@@ -83,6 +83,7 @@ IglooDatePicker.formItemPropsHandler = function (_ref2) {
|
|
|
83
83
|
};
|
|
84
84
|
export default IglooDatePicker;
|
|
85
85
|
export var IglooRangePicker = function IglooRangePicker(_ref3) {
|
|
86
|
+
var _value$0$valueOf, _value$, _value$$valueOf, _value$1$valueOf, _value$2, _value$2$valueOf;
|
|
86
87
|
var value = _ref3.value,
|
|
87
88
|
format = _ref3.format,
|
|
88
89
|
_ref3$suffixIcon = _ref3.suffixIcon,
|
|
@@ -98,8 +99,12 @@ export var IglooRangePicker = function IglooRangePicker(_ref3) {
|
|
|
98
99
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
99
100
|
focusStaus = _useState4[0],
|
|
100
101
|
setFocus = _useState4[1];
|
|
102
|
+
var memoizedValue = useMemo(function () {
|
|
103
|
+
if (!value) return value;
|
|
104
|
+
return [moment(value[0]), moment(value[1])];
|
|
105
|
+
}, [(_value$0$valueOf = value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : (_value$$valueOf = _value$.valueOf) === null || _value$$valueOf === void 0 ? void 0 : _value$$valueOf.call(_value$)) !== null && _value$0$valueOf !== void 0 ? _value$0$valueOf : value === null || value === void 0 ? void 0 : value[0], (_value$1$valueOf = value === null || value === void 0 ? void 0 : (_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : (_value$2$valueOf = _value$2.valueOf) === null || _value$2$valueOf === void 0 ? void 0 : _value$2$valueOf.call(_value$2)) !== null && _value$1$valueOf !== void 0 ? _value$1$valueOf : value === null || value === void 0 ? void 0 : value[1]]);
|
|
101
106
|
return /*#__PURE__*/_jsx(RangePicker, _objectSpread(_objectSpread({}, omit(props, formMethods)), {}, {
|
|
102
|
-
value:
|
|
107
|
+
value: memoizedValue,
|
|
103
108
|
format: format || dateFormater,
|
|
104
109
|
inputReadOnly: true,
|
|
105
110
|
suffixIcon: suffixIcon,
|
package/es/filter/index.js
CHANGED
|
@@ -966,10 +966,11 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
966
966
|
overlayClassName: "igloo-form-filter-drop-down-container",
|
|
967
967
|
open: dropVisible,
|
|
968
968
|
onOpenChange: function onOpenChange(visible, info) {
|
|
969
|
-
info.source !== 'menu' && setDropVisible(visible);
|
|
970
969
|
if (visible) {
|
|
971
970
|
typeof beforeOpenFilter === 'function' && beforeOpenFilter(_objectSpread({}, confirmed));
|
|
972
971
|
}
|
|
972
|
+
if ((info === null || info === void 0 ? void 0 : info.source) === 'menu') return;
|
|
973
|
+
setDropVisible(visible);
|
|
973
974
|
setTimeout(function () {
|
|
974
975
|
if (dropVisible) {
|
|
975
976
|
setTimeRangeType(confirmedTimeRange);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
interface ElementProps {
|
|
5
|
+
config: FormItemConfig;
|
|
6
|
+
parentName?: FormItemName;
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
setShowStepButton?: (showButton: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Element: FC<ElementProps>;
|
|
12
|
+
export default Element;
|
package/es/form/element/index.js
CHANGED
package/lib/checkbox/index.js
CHANGED
|
@@ -61,7 +61,10 @@ IglooCheckbox.formItemPropsHandler = function (config) {
|
|
|
61
61
|
getValueFromEvent: function getValueFromEvent(e) {
|
|
62
62
|
return e.target.checked;
|
|
63
63
|
},
|
|
64
|
-
valuePropName: 'checked'
|
|
64
|
+
valuePropName: 'checked',
|
|
65
|
+
previewFormater: function previewFormater(value) {
|
|
66
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
67
|
+
}
|
|
65
68
|
};
|
|
66
69
|
};
|
|
67
70
|
var _default = IglooCheckbox;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DatePickerProps, RangePickerProps, MonthPickerProps, WeekPickerProps } from 'antd/es/date-picker';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import { Dayjs } from 'dayjs';
|
|
4
|
+
import './style';
|
|
5
|
+
export { default as IglooBuddhistDatePicker } from './buddhist';
|
|
6
|
+
type Props = Omit<DatePickerProps, 'value'> & IglooComponentProps & {
|
|
7
|
+
value?: Dayjs | null | 0;
|
|
8
|
+
};
|
|
9
|
+
declare const IglooDatePicker: FC<Props>;
|
|
10
|
+
export default IglooDatePicker;
|
|
11
|
+
export declare const IglooRangePicker: FC<RangePickerProps & IglooComponentProps>;
|
|
12
|
+
export declare const IglooWeekPicker: FC<WeekPickerProps & IglooComponentProps>;
|
|
13
|
+
export declare const IglooMonthPicker: FC<MonthPickerProps & IglooComponentProps>;
|
package/lib/date-picker/index.js
CHANGED
|
@@ -97,6 +97,7 @@ IglooDatePicker.formItemPropsHandler = function (_ref2) {
|
|
|
97
97
|
var _default = IglooDatePicker;
|
|
98
98
|
exports.default = _default;
|
|
99
99
|
var IglooRangePicker = function IglooRangePicker(_ref3) {
|
|
100
|
+
var _value$0$valueOf, _value$, _value$$valueOf, _value$1$valueOf, _value$2, _value$2$valueOf;
|
|
100
101
|
var value = _ref3.value,
|
|
101
102
|
format = _ref3.format,
|
|
102
103
|
_ref3$suffixIcon = _ref3.suffixIcon,
|
|
@@ -112,8 +113,12 @@ var IglooRangePicker = function IglooRangePicker(_ref3) {
|
|
|
112
113
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
113
114
|
focusStaus = _useState4[0],
|
|
114
115
|
setFocus = _useState4[1];
|
|
116
|
+
var memoizedValue = (0, _react.useMemo)(function () {
|
|
117
|
+
if (!value) return value;
|
|
118
|
+
return [(0, _dayjs.default)(value[0]), (0, _dayjs.default)(value[1])];
|
|
119
|
+
}, [(_value$0$valueOf = value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : (_value$$valueOf = _value$.valueOf) === null || _value$$valueOf === void 0 ? void 0 : _value$$valueOf.call(_value$)) !== null && _value$0$valueOf !== void 0 ? _value$0$valueOf : value === null || value === void 0 ? void 0 : value[0], (_value$1$valueOf = value === null || value === void 0 ? void 0 : (_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : (_value$2$valueOf = _value$2.valueOf) === null || _value$2$valueOf === void 0 ? void 0 : _value$2$valueOf.call(_value$2)) !== null && _value$1$valueOf !== void 0 ? _value$1$valueOf : value === null || value === void 0 ? void 0 : value[1]]);
|
|
115
120
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RangePicker, _objectSpread(_objectSpread({}, (0, _omit.default)(props, _formMethods.default)), {}, {
|
|
116
|
-
value:
|
|
121
|
+
value: memoizedValue,
|
|
117
122
|
format: format || dateFormater,
|
|
118
123
|
inputReadOnly: true,
|
|
119
124
|
suffixIcon: suffixIcon,
|
package/lib/filter/index.js
CHANGED
|
@@ -972,10 +972,11 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
972
972
|
overlayClassName: "igloo-form-filter-drop-down-container",
|
|
973
973
|
open: dropVisible,
|
|
974
974
|
onOpenChange: function onOpenChange(visible, info) {
|
|
975
|
-
info.source !== 'menu' && setDropVisible(visible);
|
|
976
975
|
if (visible) {
|
|
977
976
|
typeof beforeOpenFilter === 'function' && beforeOpenFilter(_objectSpread({}, confirmed));
|
|
978
977
|
}
|
|
978
|
+
if ((info === null || info === void 0 ? void 0 : info.source) === 'menu') return;
|
|
979
|
+
setDropVisible(visible);
|
|
979
980
|
setTimeout(function () {
|
|
980
981
|
if (dropVisible) {
|
|
981
982
|
setTimeRangeType(confirmedTimeRange);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
interface ElementProps {
|
|
5
|
+
config: FormItemConfig;
|
|
6
|
+
parentName?: FormItemName;
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
setShowStepButton?: (showButton: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Element: FC<ElementProps>;
|
|
12
|
+
export default Element;
|