iglooform 3.0.5 → 3.0.6
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/back-top/index.d.ts +5 -0
- package/es/filter/index.js +3 -3
- package/es/input/expiry-date.js +5 -0
- package/es/input/input-date.js +5 -0
- package/es/locale/locale-provider.d.ts +11 -0
- package/es/login-page/index.d.ts +7 -0
- package/es/platform/platform-card/index.d.ts +12 -0
- package/es/platform/switch-platform/index.d.ts +12 -0
- package/es/tabs/index.d.ts +15 -0
- package/es/utils/form-utils.js +1 -0
- package/lib/back-top/index.d.ts +5 -0
- package/lib/filter/index.js +3 -3
- package/lib/input/expiry-date.js +5 -0
- package/lib/input/input-date.js +5 -0
- package/lib/locale/locale-provider.d.ts +11 -0
- package/lib/login-page/index.d.ts +7 -0
- package/lib/platform/platform-card/index.d.ts +12 -0
- package/lib/platform/switch-platform/index.d.ts +12 -0
- package/lib/tabs/index.d.ts +15 -0
- package/lib/utils/form-utils.js +1 -0
- 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.0.
|
|
33
|
+
pkg: {"name":"iglooform","version":"3.0.5","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 © 2024 | 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/filter/index.js
CHANGED
|
@@ -964,9 +964,9 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
964
964
|
}),
|
|
965
965
|
placement: 'bottomLeft',
|
|
966
966
|
overlayClassName: "igloo-form-filter-drop-down-container",
|
|
967
|
-
|
|
968
|
-
onOpenChange: function onOpenChange(visible) {
|
|
969
|
-
setDropVisible(visible);
|
|
967
|
+
open: dropVisible,
|
|
968
|
+
onOpenChange: function onOpenChange(visible, info) {
|
|
969
|
+
info.source !== 'menu' && setDropVisible(visible);
|
|
970
970
|
if (visible) {
|
|
971
971
|
typeof beforeOpenFilter === 'function' && beforeOpenFilter(_objectSpread({}, confirmed));
|
|
972
972
|
}
|
package/es/input/expiry-date.js
CHANGED
|
@@ -234,6 +234,11 @@ function checkTime(value, check) {
|
|
|
234
234
|
if (!value) {
|
|
235
235
|
return Promise.resolve();
|
|
236
236
|
}
|
|
237
|
+
if (value === 'error type') {
|
|
238
|
+
return Promise.reject(staticFormatMessage({
|
|
239
|
+
id: 'Please enter a valid date.'
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
237
242
|
var _ref = value || {},
|
|
238
243
|
year = _ref.year,
|
|
239
244
|
month = _ref.month;
|
package/es/input/input-date.js
CHANGED
|
@@ -239,6 +239,11 @@ function checkTime(value, format) {
|
|
|
239
239
|
if (!value) {
|
|
240
240
|
return Promise.resolve();
|
|
241
241
|
}
|
|
242
|
+
if (value === 'error type') {
|
|
243
|
+
return Promise.reject(staticFormatMessage({
|
|
244
|
+
id: 'Please enter a valid date.'
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
242
247
|
return moment(value, format, true).isValid() ? Promise.resolve() : Promise.reject(staticFormatMessage({
|
|
243
248
|
id: 'Please enter a valid date.'
|
|
244
249
|
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
interface Props {
|
|
4
|
+
platforms: (string | {
|
|
5
|
+
name: string;
|
|
6
|
+
key: string;
|
|
7
|
+
})[];
|
|
8
|
+
currentPlatform: string;
|
|
9
|
+
onChange: (platform: string) => any;
|
|
10
|
+
}
|
|
11
|
+
declare const SwitchPlatform: FC<Props>;
|
|
12
|
+
export default SwitchPlatform;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps } from 'antd';
|
|
3
|
+
import './style';
|
|
4
|
+
interface IglooTabsProps extends TabsProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const TabPane: React.FC<import("antd").TabPaneProps>;
|
|
7
|
+
/**
|
|
8
|
+
* Tab
|
|
9
|
+
* @param {*} 所有antd的tabs
|
|
10
|
+
*/
|
|
11
|
+
declare function Tabs(props: IglooTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Tabs {
|
|
13
|
+
var TabPane: React.FC<import("antd").TabPaneProps>;
|
|
14
|
+
}
|
|
15
|
+
export default Tabs;
|
package/es/utils/form-utils.js
CHANGED
|
@@ -268,6 +268,7 @@ export var calcFormItemProps = function calcFormItemProps(config, extraProps, fo
|
|
|
268
268
|
if (type === 'InputDate') {
|
|
269
269
|
rules.push({
|
|
270
270
|
validator: function validator(_, date) {
|
|
271
|
+
if (!date) return Promise.resolve();
|
|
271
272
|
var trimedDate = date.replaceAll(/\s/g, '');
|
|
272
273
|
var format = elementProps.format ? elementProps.format.replaceAll(/\s/g, '') : 'DD/MM/YYYY';
|
|
273
274
|
if (rangeStart && moment(trimedDate, format) < rangeStart) {
|
package/lib/filter/index.js
CHANGED
|
@@ -970,9 +970,9 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
970
970
|
}),
|
|
971
971
|
placement: 'bottomLeft',
|
|
972
972
|
overlayClassName: "igloo-form-filter-drop-down-container",
|
|
973
|
-
|
|
974
|
-
onOpenChange: function onOpenChange(visible) {
|
|
975
|
-
setDropVisible(visible);
|
|
973
|
+
open: dropVisible,
|
|
974
|
+
onOpenChange: function onOpenChange(visible, info) {
|
|
975
|
+
info.source !== 'menu' && setDropVisible(visible);
|
|
976
976
|
if (visible) {
|
|
977
977
|
typeof beforeOpenFilter === 'function' && beforeOpenFilter(_objectSpread({}, confirmed));
|
|
978
978
|
}
|
package/lib/input/expiry-date.js
CHANGED
|
@@ -239,6 +239,11 @@ function checkTime(value, check) {
|
|
|
239
239
|
if (!value) {
|
|
240
240
|
return Promise.resolve();
|
|
241
241
|
}
|
|
242
|
+
if (value === 'error type') {
|
|
243
|
+
return Promise.reject((0, _locale.staticFormatMessage)({
|
|
244
|
+
id: 'Please enter a valid date.'
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
242
247
|
var _ref = value || {},
|
|
243
248
|
year = _ref.year,
|
|
244
249
|
month = _ref.month;
|
package/lib/input/input-date.js
CHANGED
|
@@ -244,6 +244,11 @@ function checkTime(value, format) {
|
|
|
244
244
|
if (!value) {
|
|
245
245
|
return Promise.resolve();
|
|
246
246
|
}
|
|
247
|
+
if (value === 'error type') {
|
|
248
|
+
return Promise.reject((0, _locale.staticFormatMessage)({
|
|
249
|
+
id: 'Please enter a valid date.'
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
247
252
|
return (0, _dayjs.default)(value, format, true).isValid() ? Promise.resolve() : Promise.reject((0, _locale.staticFormatMessage)({
|
|
248
253
|
id: 'Please enter a valid date.'
|
|
249
254
|
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
interface Props {
|
|
4
|
+
platforms: (string | {
|
|
5
|
+
name: string;
|
|
6
|
+
key: string;
|
|
7
|
+
})[];
|
|
8
|
+
currentPlatform: string;
|
|
9
|
+
onChange: (platform: string) => any;
|
|
10
|
+
}
|
|
11
|
+
declare const SwitchPlatform: FC<Props>;
|
|
12
|
+
export default SwitchPlatform;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps } from 'antd';
|
|
3
|
+
import './style';
|
|
4
|
+
interface IglooTabsProps extends TabsProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const TabPane: React.FC<import("antd").TabPaneProps>;
|
|
7
|
+
/**
|
|
8
|
+
* Tab
|
|
9
|
+
* @param {*} 所有antd的tabs
|
|
10
|
+
*/
|
|
11
|
+
declare function Tabs(props: IglooTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Tabs {
|
|
13
|
+
var TabPane: React.FC<import("antd").TabPaneProps>;
|
|
14
|
+
}
|
|
15
|
+
export default Tabs;
|
package/lib/utils/form-utils.js
CHANGED
|
@@ -276,6 +276,7 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
|
|
|
276
276
|
if (type === 'InputDate') {
|
|
277
277
|
rules.push({
|
|
278
278
|
validator: function validator(_, date) {
|
|
279
|
+
if (!date) return Promise.resolve();
|
|
279
280
|
var trimedDate = date.replaceAll(/\s/g, '');
|
|
280
281
|
var format = elementProps.format ? elementProps.format.replaceAll(/\s/g, '') : 'DD/MM/YYYY';
|
|
281
282
|
if (rangeStart && (0, _dayjs.default)(trimedDate, format) < rangeStart) {
|