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.
@@ -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.4","license":"MIT"},
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 © 2023 | 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"}]}},
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}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './style';
3
+ import { BackTopProps } from 'antd';
4
+ declare const BackToTop: FC<BackTopProps>;
5
+ export default BackToTop;
@@ -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
- visible: dropVisible,
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
  }
@@ -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;
@@ -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,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export declare const locales: {
3
+ [key: string]: {
4
+ [id: string]: string;
5
+ };
6
+ };
7
+ declare const LocaleProvider: FC<{
8
+ currentLang: string;
9
+ children?: ReactNode;
10
+ }>;
11
+ export default LocaleProvider;
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import './style';
3
+ interface Props {
4
+ showAppStore?: boolean;
5
+ }
6
+ declare const LoginPage: FC<PropsWithChildren<Props>>;
7
+ export default LoginPage;
@@ -0,0 +1,12 @@
1
+ import { FC, CSSProperties } from 'react';
2
+ import './style';
3
+ declare const PlatformCard: FC<{
4
+ platform: string | {
5
+ name: string;
6
+ key: string;
7
+ };
8
+ onClick: any;
9
+ className?: any;
10
+ style?: CSSProperties;
11
+ }>;
12
+ export default PlatformCard;
@@ -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;
@@ -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) {
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './style';
3
+ import { BackTopProps } from 'antd';
4
+ declare const BackToTop: FC<BackTopProps>;
5
+ export default BackToTop;
@@ -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
- visible: dropVisible,
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
  }
@@ -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;
@@ -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,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export declare const locales: {
3
+ [key: string]: {
4
+ [id: string]: string;
5
+ };
6
+ };
7
+ declare const LocaleProvider: FC<{
8
+ currentLang: string;
9
+ children?: ReactNode;
10
+ }>;
11
+ export default LocaleProvider;
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import './style';
3
+ interface Props {
4
+ showAppStore?: boolean;
5
+ }
6
+ declare const LoginPage: FC<PropsWithChildren<Props>>;
7
+ export default LoginPage;
@@ -0,0 +1,12 @@
1
+ import { FC, CSSProperties } from 'react';
2
+ import './style';
3
+ declare const PlatformCard: FC<{
4
+ platform: string | {
5
+ name: string;
6
+ key: string;
7
+ };
8
+ onClick: any;
9
+ className?: any;
10
+ style?: CSSProperties;
11
+ }>;
12
+ export default PlatformCard;
@@ -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;
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",