iglooform 3.0.2 → 3.0.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.
Files changed (98) hide show
  1. package/.dumi/tmp/core/defineApp.ts +1 -1
  2. package/.dumi/tmp/core/helmet.ts +1 -1
  3. package/.dumi/tmp/core/history.ts +1 -1
  4. package/.dumi/tmp/core/historyIntelli.ts +1 -1
  5. package/.dumi/tmp/core/plugin.ts +2 -2
  6. package/.dumi/tmp/core/polyfill.ts +197 -197
  7. package/.dumi/tmp/core/route.tsx +33 -33
  8. package/.dumi/tmp/dumi/exports.ts +1 -1
  9. package/.dumi/tmp/dumi/locales/runtime.tsx +2 -2
  10. package/.dumi/tmp/dumi/meta/index.ts +33 -33
  11. package/.dumi/tmp/dumi/meta/runtime.ts +1 -1
  12. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +2 -2
  13. package/.dumi/tmp/dumi/theme/builtins/API.ts +1 -1
  14. package/.dumi/tmp/dumi/theme/builtins/Badge.ts +1 -1
  15. package/.dumi/tmp/dumi/theme/builtins/Container.ts +1 -1
  16. package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +1 -1
  17. package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +1 -1
  18. package/.dumi/tmp/dumi/theme/builtins/Table.ts +1 -1
  19. package/.dumi/tmp/dumi/theme/builtins/Tree.ts +1 -1
  20. package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +1 -1
  21. package/.dumi/tmp/dumi/theme/loading.tsx +1 -1
  22. package/.dumi/tmp/dumi/theme/slots/ColorSwitch.ts +1 -1
  23. package/.dumi/tmp/dumi/theme/slots/Content.ts +1 -1
  24. package/.dumi/tmp/dumi/theme/slots/ContentFooter.ts +1 -1
  25. package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +1 -1
  26. package/.dumi/tmp/dumi/theme/slots/Features.ts +1 -1
  27. package/.dumi/tmp/dumi/theme/slots/Footer.ts +1 -1
  28. package/.dumi/tmp/dumi/theme/slots/Header.ts +1 -1
  29. package/.dumi/tmp/dumi/theme/slots/HeaderExtra.ts +1 -1
  30. package/.dumi/tmp/dumi/theme/slots/Hero.ts +1 -1
  31. package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +1 -1
  32. package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +1 -1
  33. package/.dumi/tmp/dumi/theme/slots/Logo.ts +1 -1
  34. package/.dumi/tmp/dumi/theme/slots/Navbar.ts +1 -1
  35. package/.dumi/tmp/dumi/theme/slots/NavbarExtra.ts +1 -1
  36. package/.dumi/tmp/dumi/theme/slots/NotFound.ts +1 -1
  37. package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +1 -1
  38. package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +1 -1
  39. package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +1 -1
  40. package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +2 -2
  41. package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +1 -1
  42. package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +1 -1
  43. package/.dumi/tmp/dumi/theme/slots/SocialIcon.ts +1 -1
  44. package/.dumi/tmp/dumi/theme/slots/Toc.ts +1 -1
  45. package/.dumi/tmp/exports.ts +5 -5
  46. package/.dumi/tmp/testBrowser.tsx +3 -3
  47. package/.dumi/tmp/umi.ts +4 -4
  48. package/es/admin-amount/style/index.d.ts +0 -0
  49. package/es/babel-plugin-import-option.d.ts +7 -0
  50. package/es/back-top/index.d.ts +5 -0
  51. package/es/input/style/amount/index.d.ts +2 -0
  52. package/es/input/style/index.d.ts +2 -0
  53. package/es/input/style/input-date/index.d.ts +2 -0
  54. package/es/input/style/otp/index.d.ts +2 -0
  55. package/es/input/style/phone-number/index.d.ts +2 -0
  56. package/es/input/style/text-area/index.d.ts +2 -0
  57. package/es/locale/en-US/messages.json +2 -1
  58. package/es/locale/id-ID/messages.json +2 -1
  59. package/es/locale/locale-provider.d.ts +11 -0
  60. package/es/locale/th-TH/messages.json +2 -1
  61. package/es/locale/vi-VN/messages.json +2 -1
  62. package/es/locale/zh-CN/messages.json +2 -1
  63. package/es/locale/zh-TW/messages.json +2 -1
  64. package/es/login-page/index.d.ts +7 -0
  65. package/es/message/style/index.d.ts +1 -0
  66. package/es/ocr/micro-blink/style/index.d.ts +1 -0
  67. package/es/platform/platform-card/index.d.ts +12 -0
  68. package/es/platform/switch-platform/index.d.ts +12 -0
  69. package/es/tabs/index.d.ts +15 -0
  70. package/es/upload/index.js +43 -20
  71. package/es/upload-photo/index.js +20 -4
  72. package/es/utils/useAsyncEffect.d.ts +3 -0
  73. package/lib/admin-amount/style/index.d.ts +0 -0
  74. package/lib/babel-plugin-import-option.d.ts +7 -0
  75. package/lib/back-top/index.d.ts +5 -0
  76. package/lib/input/style/amount/index.d.ts +2 -0
  77. package/lib/input/style/index.d.ts +2 -0
  78. package/lib/input/style/input-date/index.d.ts +2 -0
  79. package/lib/input/style/otp/index.d.ts +2 -0
  80. package/lib/input/style/phone-number/index.d.ts +2 -0
  81. package/lib/input/style/text-area/index.d.ts +2 -0
  82. package/lib/locale/en-US/messages.json +2 -1
  83. package/lib/locale/id-ID/messages.json +2 -1
  84. package/lib/locale/locale-provider.d.ts +11 -0
  85. package/lib/locale/th-TH/messages.json +2 -1
  86. package/lib/locale/vi-VN/messages.json +2 -1
  87. package/lib/locale/zh-CN/messages.json +2 -1
  88. package/lib/locale/zh-TW/messages.json +2 -1
  89. package/lib/login-page/index.d.ts +7 -0
  90. package/lib/message/style/index.d.ts +1 -0
  91. package/lib/ocr/micro-blink/style/index.d.ts +1 -0
  92. package/lib/platform/platform-card/index.d.ts +12 -0
  93. package/lib/platform/switch-platform/index.d.ts +12 -0
  94. package/lib/tabs/index.d.ts +15 -0
  95. package/lib/upload/index.js +42 -20
  96. package/lib/upload-photo/index.js +19 -4
  97. package/lib/utils/useAsyncEffect.d.ts +3 -0
  98. package/package.json +1 -1
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "Encrypted PDF",
28
28
  "Enter the password to open this PDF file.": "Enter the password to open this PDF file.",
29
29
  "Error Report": "Error Report",
30
- "Error during the initialization of the SDK! {error}": "Error during the initialization of the SDK! {error}",
31
30
  "Failed to load PDF file.": "Failed to load PDF file.",
31
+ "File Uploading": "File Uploading",
32
32
  "Filter": "Filter",
33
33
  "I agree to the Igloo": "I agree to the Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.",
52
52
  "Optional": "Optional",
53
53
  "Other Reason": "Other Reason",
54
+ "Photo Uploading": "Photo Uploading",
54
55
  "Please enter a valid date.": "Please enter a valid date.",
55
56
  "Please enter a valid time.": "Please enter a valid time.",
56
57
  "Please input a date after {date}": "Please input a date after {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF terenkripsi",
28
28
  "Enter the password to open this PDF file.": "Masukkan kata sandi untuk membuka file PDF ini.",
29
29
  "Error Report": "Laporan Kesalahan",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "Gagal memuat file PDF.",
31
+ "File Uploading": "Mengunggah Berkas",
32
32
  "Filter": "Saring",
33
33
  "I agree to the Igloo": "Saya setuju dengan Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Saya menyatakan bahwa pernyataan yang saya jelaskan di atas adalah benar. Selanjutnya saya nyatakan bahwa kerugian yang terjadi merupakan ketidaksengajaan, dan terjadi tanpa perencanaan atau hasil musyawarah dengan pihak lain.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Jika Anda puas dengan apa yang telah disampaikan, dan Anda telah memeriksa deklarasi tersebut, silakan lanjutkan dan ajukan klaim Anda.",
52
52
  "Optional": "Pilihan",
53
53
  "Other Reason": "Alasan lain",
54
+ "Photo Uploading": "Mengunggah Foto",
54
55
  "Please enter a valid date.": "Silakan tulis tanggal valid",
55
56
  "Please enter a valid time.": "Harap masukkan waktu yang valid",
56
57
  "Please input a date after {date}": "Harap masukkan tanggal setelah {date}",
@@ -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;
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF ที่เข้ารหัส",
28
28
  "Enter the password to open this PDF file.": "ป้อนรหัสผ่านเพื่อเปิดไฟล์ PDF นี้",
29
29
  "Error Report": "รายงานข้อผิดพลาด",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "ไม่สามารถโหลดไฟล์ PDF",
31
+ "File Uploading": "การอัพโหลดไฟล์",
32
32
  "Filter": "กรอง",
33
33
  "I agree to the Igloo": "ฉันเห็นด้วยกับกระท่อมน้ำแข็ง",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "ข้าพเจ้ายืนยันว่าข้อความที่ข้าพเจ้าได้อธิบายข้างต้นนั้นเป็นความจริง และยืนยันว่าความเสียหายที่เกิดขึ้นนั้นเกิดจากอุบัติเหตุ ปราศจากการวางแผน หรือ การเห็นพ้องร่วมกันกับฝ่ายอื่น",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "หากตรวจสอบแล้วและต้องการยืนยันข้อมูลข้างต้น กรุณากดดำเนินการต่อและยืนยันการเคลมของคุณ",
52
52
  "Optional": "ไม่จำเป็น",
53
53
  "Other Reason": "เหตุผลอื่น",
54
+ "Photo Uploading": "การอัพโหลดรูปภาพ",
54
55
  "Please enter a valid date.": "กรุณากรอกวันที่ถูกต้อง",
55
56
  "Please enter a valid time.": "กรุณากรอกเวลาที่ถูกต้อง",
56
57
  "Please input a date after {date}": "กรุณาใส่วันที่หลัง {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF được mã hóa",
28
28
  "Enter the password to open this PDF file.": "Nhập mật khẩu để mở tệp PDF này.",
29
29
  "Error Report": "Báo cáo lỗi",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "Không tải được tệp PDF.",
31
+ "File Uploading": "Tải lên tệp",
32
32
  "Filter": "Lọc",
33
33
  "I agree to the Igloo": "Tôi đồng ý với Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Tôi tuyên bố rằng những điều tôi đã mô tả ở trên là đúng sự thật. Tôi tuyên bố thêm rằng tổn thất xảy ra là do ngẫu nhiên, không có kế hoạch hoặc sự đồng thuận với các bên khác.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Vui lòng xác nhận và gửi yêu cầu bồi thường.",
52
52
  "Optional": "Không bắt buộc",
53
53
  "Other Reason": "Lý do khác",
54
+ "Photo Uploading": "Tải ảnh lên",
54
55
  "Please enter a valid date.": "Vui lòng nhập đúng ngày:",
55
56
  "Please enter a valid time.": "Vui lòng nhập thời gian hợp lệ.",
56
57
  "Please input a date after {date}": "Vui lòng nhập ngày sau {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "加密的PDF文件",
28
28
  "Enter the password to open this PDF file.": "输入密码后预览该文件",
29
29
  "Error Report": "错误报告",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "PDF文件加载失败",
31
+ "File Uploading": "文件上传中",
32
32
  "Filter": "过滤条件",
33
33
  "I agree to the Igloo": "我同意Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "我承诺上述信息均真实有效,并且物品遗失纯属意外。",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "如您对上述填写内容满意,在勾选以下申明后,请继续提交您的理赔申请。",
52
52
  "Optional": "可选",
53
53
  "Other Reason": "其他原因",
54
+ "Photo Uploading": "图片上传中",
54
55
  "Please enter a valid date.": "请输入一个有效的日期。",
55
56
  "Please enter a valid time.": "请输入一个有效的时间。",
56
57
  "Please input a date after {date}": "请输入一个{date}之后的日期",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "",
28
28
  "Enter the password to open this PDF file.": "",
29
29
  "Error Report": "錯誤報告",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "",
31
+ "File Uploading": "",
32
32
  "Filter": "篩選",
33
33
  "I agree to the Igloo": "",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "我聲明我上面描述的陳述是真的。我進一步宣布發生損失是偶然的,沒有規劃或與其他方的共識。",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "一旦您對上述內容感到滿意,您已檢查聲明,請繼續並提交您的索賠。",
52
52
  "Optional": "可選項",
53
53
  "Other Reason": "其他原因",
54
+ "Photo Uploading": "",
54
55
  "Please enter a valid date.": "請輸入有效的日期。",
55
56
  "Please enter a valid time.": "請輸入有效的時間。",
56
57
  "Please input a date after {date}": "",
@@ -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 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -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;
@@ -36,6 +36,7 @@ import { LocaleContext } from "../locale";
36
36
  import Preview from "../upload-preview/media";
37
37
  import { classifyType } from "../utils/tools";
38
38
  import FormContext from "../form-context";
39
+ import { staticFormatMessage } from "../locale";
39
40
  import { jsx as _jsx } from "react/jsx-runtime";
40
41
  import { Fragment as _Fragment } from "react/jsx-runtime";
41
42
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -46,10 +47,14 @@ var IglooUpload = function IglooUpload(props) {
46
47
  var dataUrlRef = useRef([]);
47
48
  var _useContext = useContext(FormContext),
48
49
  uploadApi = _useContext.uploadApi;
50
+ var _useContext2 = useContext(LocaleContext),
51
+ formatMessage = _useContext2.formatMessage;
52
+ var staticMessage = formatMessage({
53
+ id: 'File Uploading'
54
+ });
49
55
  invariant(typeof props.handleUpload === 'function' || uploadApi, '"handleUpload" should be a function. Or uploadApi should be set at Form/FreeForm');
50
56
  invariant(!uploadApi || props.bizKey, '"bizKey" should be set if Upload is used with uploadApi');
51
- var _props$value = props.value,
52
- value = _props$value === void 0 ? [] : _props$value,
57
+ var value = props.value,
53
58
  limit = props.limit,
54
59
  limitErrorMessage = props.limitErrorMessage,
55
60
  descriptions = props.descriptions,
@@ -93,17 +98,7 @@ var IglooUpload = function IglooUpload(props) {
93
98
  containerRef = props.containerRef,
94
99
  placeholder = props.placeholder,
95
100
  rest = _objectWithoutProperties(props, _excluded);
96
- var _useState = useState(value.map(function (url, index) {
97
- return {
98
- url: url,
99
- dataUrl: url,
100
- status: 'success',
101
- type: '',
102
- name: "File".concat(index + 1),
103
- size: 0,
104
- uid: index
105
- };
106
- })),
101
+ var _useState = useState([]),
107
102
  _useState2 = _slicedToArray(_useState, 2),
108
103
  files = _useState2[0],
109
104
  setFiles = _useState2[1];
@@ -128,8 +123,24 @@ var IglooUpload = function IglooUpload(props) {
128
123
  return;
129
124
  }
130
125
  });
131
- var _useContext2 = useContext(LocaleContext),
132
- formatMessage = _useContext2.formatMessage;
126
+
127
+ // 有初始值的处理 (不是初始化)
128
+ useEffect(function () {
129
+ if (Array.isArray(value) && value.length && files.length === 0) {
130
+ var _files = (value || []).map(function (url, index) {
131
+ return {
132
+ url: url,
133
+ dataUrl: url,
134
+ status: 'success',
135
+ type: '',
136
+ name: "File".concat(index + 1),
137
+ size: 0,
138
+ uid: index
139
+ };
140
+ });
141
+ setFiles(_files);
142
+ }
143
+ }, [value]);
133
144
  useEffect(function () {
134
145
  return function () {
135
146
  dataUrlRef.current.forEach(function (dataUrl) {
@@ -138,8 +149,17 @@ var IglooUpload = function IglooUpload(props) {
138
149
  };
139
150
  }, []);
140
151
  useEffect(function () {
141
- if (!(value !== null && value !== void 0 && value.length) && !files.length) return;
152
+ if (!value && !files.length) return;
142
153
  if (files.length) {
154
+ var hasProcessing = files.find(function (f) {
155
+ return f.status === 'progress';
156
+ });
157
+ if (hasProcessing) {
158
+ onChange && onChange({
159
+ status: 'processing'
160
+ });
161
+ return;
162
+ }
143
163
  var urls = files.map(function (f) {
144
164
  var status = f.status,
145
165
  name = f.name,
@@ -150,13 +170,11 @@ var IglooUpload = function IglooUpload(props) {
150
170
  errorMsg: errorMsg
151
171
  };
152
172
  }
153
- if (f.url || f.dataUrl) {
154
- return f.url || f.dataUrl;
155
- }
173
+ return f.url;
156
174
  });
157
175
  onChange && onChange(urls);
158
176
  } else {
159
- onChange && onChange([]);
177
+ onChange && onChange(undefined);
160
178
  }
161
179
  }, [files]);
162
180
  invariant(limit === undefined || limit > 0, "\"limit\" should be a pasitive number.");
@@ -530,6 +548,11 @@ var FileList = function FileList(_ref6) {
530
548
  return /*#__PURE__*/ReactDOM.createPortal(children, containerRef.current);
531
549
  };
532
550
  function checkFileList(value) {
551
+ if ((value === null || value === void 0 ? void 0 : value.status) === 'processing') {
552
+ return Promise.reject(staticFormatMessage({
553
+ id: 'File Uploading'
554
+ }));
555
+ }
533
556
  if (!value) {
534
557
  return Promise.resolve();
535
558
  }
@@ -33,6 +33,7 @@ import Preview from "../upload-preview/media";
33
33
  import { classifyType } from "../utils/tools";
34
34
  import MediaItem from "./media";
35
35
  import FormContext from "../form-context";
36
+ import { staticFormatMessage } from "../locale";
36
37
  import { jsx as _jsx } from "react/jsx-runtime";
37
38
  import { jsxs as _jsxs } from "react/jsx-runtime";
38
39
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -150,6 +151,9 @@ var UploadPhoto = function UploadPhoto(props) {
150
151
  setMasks = _useState6[1];
151
152
  var _useBreakpoint = useBreakpoint(),
152
153
  md = _useBreakpoint.md;
154
+ var staticMessage = formatMessage({
155
+ id: 'Photo Uploading'
156
+ });
153
157
  var mapFilesFromValue = function mapFilesFromValue(urls) {
154
158
  var _files = [];
155
159
  Promise.all(urls.map( /*#__PURE__*/function () {
@@ -194,6 +198,15 @@ var UploadPhoto = function UploadPhoto(props) {
194
198
  useEffect(function () {
195
199
  if (!value && !files.length) return;
196
200
  if (files.length) {
201
+ var hasProcessing = files.find(function (f) {
202
+ return f.status === 'progress';
203
+ });
204
+ if (hasProcessing) {
205
+ onChange && onChange({
206
+ status: 'processing'
207
+ });
208
+ return;
209
+ }
197
210
  var urls = files.map(function (f) {
198
211
  var status = f.status,
199
212
  name = f.name,
@@ -204,13 +217,11 @@ var UploadPhoto = function UploadPhoto(props) {
204
217
  errorMsg: errorMsg
205
218
  };
206
219
  }
207
- if (f.url || f.dataUrl) {
208
- return f.url || f.dataUrl;
209
- }
220
+ return f.url;
210
221
  });
211
222
  onChange && onChange(urls);
212
223
  } else {
213
- onChange && onChange([]);
224
+ onChange && onChange(undefined);
214
225
  }
215
226
  }, [files]);
216
227
  var uploadId = useMemo(function () {
@@ -682,6 +693,11 @@ var UploadPhoto = function UploadPhoto(props) {
682
693
  });
683
694
  };
684
695
  function checkFileList(value) {
696
+ if ((value === null || value === void 0 ? void 0 : value.status) === 'processing') {
697
+ return Promise.reject(staticFormatMessage({
698
+ id: 'Photo Uploading'
699
+ }));
700
+ }
685
701
  if (!value) {
686
702
  return Promise.resolve();
687
703
  }
@@ -0,0 +1,3 @@
1
+ import type { DependencyList } from 'react';
2
+ declare function useAsyncEffect(effect: () => AsyncGenerator<void, void, void> | Promise<void>, deps?: DependencyList): void;
3
+ export default useAsyncEffect;
File without changes
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ libraryName: string;
3
+ libraryDirectory: string;
4
+ style: boolean;
5
+ customName: (name: string) => string;
6
+ };
7
+ export default _default;
@@ -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;
@@ -0,0 +1,2 @@
1
+ import '../index';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import './default-input.less';
2
+ import './common.less';
@@ -0,0 +1,2 @@
1
+ import '../index';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../index';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../index';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../index';
2
+ import './index.less';
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "Encrypted PDF",
28
28
  "Enter the password to open this PDF file.": "Enter the password to open this PDF file.",
29
29
  "Error Report": "Error Report",
30
- "Error during the initialization of the SDK! {error}": "Error during the initialization of the SDK! {error}",
31
30
  "Failed to load PDF file.": "Failed to load PDF file.",
31
+ "File Uploading": "File Uploading",
32
32
  "Filter": "Filter",
33
33
  "I agree to the Igloo": "I agree to the Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.",
52
52
  "Optional": "Optional",
53
53
  "Other Reason": "Other Reason",
54
+ "Photo Uploading": "Photo Uploading",
54
55
  "Please enter a valid date.": "Please enter a valid date.",
55
56
  "Please enter a valid time.": "Please enter a valid time.",
56
57
  "Please input a date after {date}": "Please input a date after {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF terenkripsi",
28
28
  "Enter the password to open this PDF file.": "Masukkan kata sandi untuk membuka file PDF ini.",
29
29
  "Error Report": "Laporan Kesalahan",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "Gagal memuat file PDF.",
31
+ "File Uploading": "Mengunggah Berkas",
32
32
  "Filter": "Saring",
33
33
  "I agree to the Igloo": "Saya setuju dengan Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Saya menyatakan bahwa pernyataan yang saya jelaskan di atas adalah benar. Selanjutnya saya nyatakan bahwa kerugian yang terjadi merupakan ketidaksengajaan, dan terjadi tanpa perencanaan atau hasil musyawarah dengan pihak lain.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Jika Anda puas dengan apa yang telah disampaikan, dan Anda telah memeriksa deklarasi tersebut, silakan lanjutkan dan ajukan klaim Anda.",
52
52
  "Optional": "Pilihan",
53
53
  "Other Reason": "Alasan lain",
54
+ "Photo Uploading": "Mengunggah Foto",
54
55
  "Please enter a valid date.": "Silakan tulis tanggal valid",
55
56
  "Please enter a valid time.": "Harap masukkan waktu yang valid",
56
57
  "Please input a date after {date}": "Harap masukkan tanggal setelah {date}",
@@ -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;
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF ที่เข้ารหัส",
28
28
  "Enter the password to open this PDF file.": "ป้อนรหัสผ่านเพื่อเปิดไฟล์ PDF นี้",
29
29
  "Error Report": "รายงานข้อผิดพลาด",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "ไม่สามารถโหลดไฟล์ PDF",
31
+ "File Uploading": "การอัพโหลดไฟล์",
32
32
  "Filter": "กรอง",
33
33
  "I agree to the Igloo": "ฉันเห็นด้วยกับกระท่อมน้ำแข็ง",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "ข้าพเจ้ายืนยันว่าข้อความที่ข้าพเจ้าได้อธิบายข้างต้นนั้นเป็นความจริง และยืนยันว่าความเสียหายที่เกิดขึ้นนั้นเกิดจากอุบัติเหตุ ปราศจากการวางแผน หรือ การเห็นพ้องร่วมกันกับฝ่ายอื่น",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "หากตรวจสอบแล้วและต้องการยืนยันข้อมูลข้างต้น กรุณากดดำเนินการต่อและยืนยันการเคลมของคุณ",
52
52
  "Optional": "ไม่จำเป็น",
53
53
  "Other Reason": "เหตุผลอื่น",
54
+ "Photo Uploading": "การอัพโหลดรูปภาพ",
54
55
  "Please enter a valid date.": "กรุณากรอกวันที่ถูกต้อง",
55
56
  "Please enter a valid time.": "กรุณากรอกเวลาที่ถูกต้อง",
56
57
  "Please input a date after {date}": "กรุณาใส่วันที่หลัง {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "PDF được mã hóa",
28
28
  "Enter the password to open this PDF file.": "Nhập mật khẩu để mở tệp PDF này.",
29
29
  "Error Report": "Báo cáo lỗi",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "Không tải được tệp PDF.",
31
+ "File Uploading": "Tải lên tệp",
32
32
  "Filter": "Lọc",
33
33
  "I agree to the Igloo": "Tôi đồng ý với Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Tôi tuyên bố rằng những điều tôi đã mô tả ở trên là đúng sự thật. Tôi tuyên bố thêm rằng tổn thất xảy ra là do ngẫu nhiên, không có kế hoạch hoặc sự đồng thuận với các bên khác.",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Vui lòng xác nhận và gửi yêu cầu bồi thường.",
52
52
  "Optional": "Không bắt buộc",
53
53
  "Other Reason": "Lý do khác",
54
+ "Photo Uploading": "Tải ảnh lên",
54
55
  "Please enter a valid date.": "Vui lòng nhập đúng ngày:",
55
56
  "Please enter a valid time.": "Vui lòng nhập thời gian hợp lệ.",
56
57
  "Please input a date after {date}": "Vui lòng nhập ngày sau {date}",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "加密的PDF文件",
28
28
  "Enter the password to open this PDF file.": "输入密码后预览该文件",
29
29
  "Error Report": "错误报告",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "PDF文件加载失败",
31
+ "File Uploading": "文件上传中",
32
32
  "Filter": "过滤条件",
33
33
  "I agree to the Igloo": "我同意Igloo",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "我承诺上述信息均真实有效,并且物品遗失纯属意外。",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "如您对上述填写内容满意,在勾选以下申明后,请继续提交您的理赔申请。",
52
52
  "Optional": "可选",
53
53
  "Other Reason": "其他原因",
54
+ "Photo Uploading": "图片上传中",
54
55
  "Please enter a valid date.": "请输入一个有效的日期。",
55
56
  "Please enter a valid time.": "请输入一个有效的时间。",
56
57
  "Please input a date after {date}": "请输入一个{date}之后的日期",
@@ -27,8 +27,8 @@
27
27
  "Encrypted PDF": "",
28
28
  "Enter the password to open this PDF file.": "",
29
29
  "Error Report": "錯誤報告",
30
- "Error during the initialization of the SDK! {error}": "",
31
30
  "Failed to load PDF file.": "",
31
+ "File Uploading": "",
32
32
  "Filter": "篩選",
33
33
  "I agree to the Igloo": "",
34
34
  "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "我聲明我上面描述的陳述是真的。我進一步宣布發生損失是偶然的,沒有規劃或與其他方的共識。",
@@ -51,6 +51,7 @@
51
51
  "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "一旦您對上述內容感到滿意,您已檢查聲明,請繼續並提交您的索賠。",
52
52
  "Optional": "可選項",
53
53
  "Other Reason": "其他原因",
54
+ "Photo Uploading": "",
54
55
  "Please enter a valid date.": "請輸入有效的日期。",
55
56
  "Please enter a valid time.": "請輸入有效的時間。",
56
57
  "Please input a date after {date}": "",
@@ -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 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -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;