iglooform 2.5.22 → 2.5.23
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/es/filter/index.js +4 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/input/expiry-date.js +4 -0
- package/es/input/input-date.js +4 -0
- package/es/media/media.js +1 -1
- package/es/media/preview.js +1 -1
- package/es/upload-photo/media.js +1 -1
- package/es/upload-preview/media.js +1 -1
- package/lib/filter/index.js +4 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -9
- package/lib/input/expiry-date.js +4 -0
- package/lib/input/input-date.js +4 -0
- package/lib/media/media.js +3 -3
- package/lib/media/preview.js +5 -5
- package/lib/upload-photo/media.js +3 -3
- package/lib/upload-preview/media.js +3 -3
- package/package.json +1 -1
package/es/filter/index.js
CHANGED
|
@@ -273,6 +273,10 @@ function deleteSomeOne(optionsConfirmed, optionItem, cbFucs) {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
var getTextWidth = function getTextWidth(str) {
|
|
276
|
+
if (typeof document === 'undefined') {
|
|
277
|
+
return str.length * 12;
|
|
278
|
+
}
|
|
279
|
+
|
|
276
280
|
var ele = document.createElement('span');
|
|
277
281
|
ele.style.fontSize = '12px';
|
|
278
282
|
ele.style.opacity = '0';
|
package/es/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { default as DatePicker, IglooBuddhistDatePicker as BuddhistDatePicker, I
|
|
|
4
4
|
export { default as Input, PhoneNumber, Amount, Password, Email, InputNumber, TextArea, InputDate, CreditCard, ExpiryDate, InputId, } from './input';
|
|
5
5
|
export { default as Select, TimeSelect, AttachedSelect } from './select';
|
|
6
6
|
export { default as Radio, RadioGroup, RadioGroupWithOther } from './radio';
|
|
7
|
-
export { default as Example } from './example';
|
|
8
7
|
export { default as Upload } from './upload';
|
|
9
8
|
export { default as Checkbox, CheckboxGroup } from './checkbox';
|
|
10
9
|
export { default as Declaration } from './declaration';
|
package/es/index.js
CHANGED
|
@@ -4,7 +4,6 @@ export { default as DatePicker, IglooBuddhistDatePicker as BuddhistDatePicker, I
|
|
|
4
4
|
export { default as Input, PhoneNumber, Amount, Password, Email, InputNumber, TextArea, InputDate, CreditCard, ExpiryDate, InputId } from './input';
|
|
5
5
|
export { default as Select, TimeSelect, AttachedSelect } from './select';
|
|
6
6
|
export { default as Radio, RadioGroup, RadioGroupWithOther } from './radio';
|
|
7
|
-
export { default as Example } from './example';
|
|
8
7
|
export { default as Upload } from './upload';
|
|
9
8
|
export { default as Checkbox, CheckboxGroup } from './checkbox';
|
|
10
9
|
export { default as Declaration } from './declaration';
|
package/es/input/expiry-date.js
CHANGED
|
@@ -52,6 +52,10 @@ function dealFormat(str) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
var getTextWidth = function getTextWidth(str) {
|
|
55
|
+
if (typeof document === 'undefined') {
|
|
56
|
+
return str.length * 16;
|
|
57
|
+
}
|
|
58
|
+
|
|
55
59
|
var ele = document.createElement('span');
|
|
56
60
|
ele.style.fontSize = '16px';
|
|
57
61
|
ele.style.opacity = '0';
|
package/es/input/input-date.js
CHANGED
|
@@ -59,6 +59,10 @@ function dealFormat(str) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
var getTextWidth = function getTextWidth(str) {
|
|
62
|
+
if (typeof document === 'undefined') {
|
|
63
|
+
return str.length * 16;
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
var ele = document.createElement('span');
|
|
63
67
|
ele.style.fontSize = '16px';
|
|
64
68
|
ele.style.opacity = '0';
|
package/es/media/media.js
CHANGED
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useRef, useState, useContext } from 'react';
|
|
18
|
-
import { Document, Page } from 'react-pdf
|
|
18
|
+
import { Document, Page } from 'react-pdf';
|
|
19
19
|
import { LocaleContext } from '../locale';
|
|
20
20
|
|
|
21
21
|
var MediaItem = function MediaItem(_ref) {
|
package/es/media/preview.js
CHANGED
|
@@ -23,7 +23,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
23
|
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
25
|
import { useState, useRef, useContext, useReducer } from 'react';
|
|
26
|
-
import { Document, Page } from 'react-pdf
|
|
26
|
+
import { Document, Page } from 'react-pdf';
|
|
27
27
|
import classnames from 'classnames';
|
|
28
28
|
import { ArrowLeftOutlined, ArrowRightOutlined } from 'iglooicon';
|
|
29
29
|
import Modal from '../modal';
|
package/es/upload-photo/media.js
CHANGED
|
@@ -12,7 +12,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { useState, useContext } from 'react';
|
|
15
|
-
import { Document, Page } from 'react-pdf
|
|
15
|
+
import { Document, Page } from 'react-pdf';
|
|
16
16
|
import { LocaleContext } from '../locale';
|
|
17
17
|
|
|
18
18
|
var MediaItem = function MediaItem(_ref) {
|
|
@@ -18,7 +18,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { useState, useContext, useReducer, useRef } from 'react';
|
|
20
20
|
import Typography from '../typography';
|
|
21
|
-
import { Document, Page } from 'react-pdf
|
|
21
|
+
import { Document, Page } from 'react-pdf';
|
|
22
22
|
import { ErrorFilled } from 'iglooicon';
|
|
23
23
|
import LocaleContext from '../locale/locale-context';
|
|
24
24
|
import Modal from '../modal';
|
package/lib/filter/index.js
CHANGED
|
@@ -307,6 +307,10 @@ function deleteSomeOne(optionsConfirmed, optionItem, cbFucs) {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
var getTextWidth = function getTextWidth(str) {
|
|
310
|
+
if (typeof document === 'undefined') {
|
|
311
|
+
return str.length * 12;
|
|
312
|
+
}
|
|
313
|
+
|
|
310
314
|
var ele = document.createElement('span');
|
|
311
315
|
ele.style.fontSize = '12px';
|
|
312
316
|
ele.style.opacity = '0';
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { default as DatePicker, IglooBuddhistDatePicker as BuddhistDatePicker, I
|
|
|
4
4
|
export { default as Input, PhoneNumber, Amount, Password, Email, InputNumber, TextArea, InputDate, CreditCard, ExpiryDate, InputId, } from './input';
|
|
5
5
|
export { default as Select, TimeSelect, AttachedSelect } from './select';
|
|
6
6
|
export { default as Radio, RadioGroup, RadioGroupWithOther } from './radio';
|
|
7
|
-
export { default as Example } from './example';
|
|
8
7
|
export { default as Upload } from './upload';
|
|
9
8
|
export { default as Checkbox, CheckboxGroup } from './checkbox';
|
|
10
9
|
export { default as Declaration } from './declaration';
|
package/lib/index.js
CHANGED
|
@@ -33,7 +33,6 @@ var _exportNames = {
|
|
|
33
33
|
Radio: true,
|
|
34
34
|
RadioGroup: true,
|
|
35
35
|
RadioGroupWithOther: true,
|
|
36
|
-
Example: true,
|
|
37
36
|
Upload: true,
|
|
38
37
|
Checkbox: true,
|
|
39
38
|
CheckboxGroup: true,
|
|
@@ -221,12 +220,6 @@ Object.defineProperty(exports, "Email", {
|
|
|
221
220
|
return _input.Email;
|
|
222
221
|
}
|
|
223
222
|
});
|
|
224
|
-
Object.defineProperty(exports, "Example", {
|
|
225
|
-
enumerable: true,
|
|
226
|
-
get: function get() {
|
|
227
|
-
return _example.default;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
223
|
Object.defineProperty(exports, "ExpiryDate", {
|
|
231
224
|
enumerable: true,
|
|
232
225
|
get: function get() {
|
|
@@ -510,8 +503,6 @@ var _select = _interopRequireWildcard(require("./select"));
|
|
|
510
503
|
|
|
511
504
|
var _radio = _interopRequireWildcard(require("./radio"));
|
|
512
505
|
|
|
513
|
-
var _example = _interopRequireDefault(require("./example"));
|
|
514
|
-
|
|
515
506
|
var _upload = _interopRequireDefault(require("./upload"));
|
|
516
507
|
|
|
517
508
|
var _checkbox = _interopRequireWildcard(require("./checkbox"));
|
package/lib/input/expiry-date.js
CHANGED
|
@@ -68,6 +68,10 @@ function dealFormat(str) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
var getTextWidth = function getTextWidth(str) {
|
|
71
|
+
if (typeof document === 'undefined') {
|
|
72
|
+
return str.length * 16;
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
var ele = document.createElement('span');
|
|
72
76
|
ele.style.fontSize = '16px';
|
|
73
77
|
ele.style.opacity = '0';
|
package/lib/input/input-date.js
CHANGED
|
@@ -76,6 +76,10 @@ function dealFormat(str) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
var getTextWidth = function getTextWidth(str) {
|
|
79
|
+
if (typeof document === 'undefined') {
|
|
80
|
+
return str.length * 16;
|
|
81
|
+
}
|
|
82
|
+
|
|
79
83
|
var ele = document.createElement('span');
|
|
80
84
|
ele.style.fontSize = '16px';
|
|
81
85
|
ele.style.opacity = '0';
|
package/lib/media/media.js
CHANGED
|
@@ -13,7 +13,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _reactPdf = require("react-pdf");
|
|
17
17
|
|
|
18
18
|
var _locale = require("../locale");
|
|
19
19
|
|
|
@@ -79,7 +79,7 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
79
79
|
maxHeight: 80,
|
|
80
80
|
position: 'absolute'
|
|
81
81
|
},
|
|
82
|
-
children: (0, _jsxRuntime.jsx)(
|
|
82
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Document, {
|
|
83
83
|
ref: documentRef,
|
|
84
84
|
file: src,
|
|
85
85
|
onPassword: needPassword,
|
|
@@ -89,7 +89,7 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
89
89
|
},
|
|
90
90
|
children: errorText
|
|
91
91
|
}),
|
|
92
|
-
children: (0, _jsxRuntime.jsx)(
|
|
92
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Page, {
|
|
93
93
|
pageNumber: 1,
|
|
94
94
|
scale: 0.1
|
|
95
95
|
})
|
package/lib/media/preview.js
CHANGED
|
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
|
|
18
18
|
var _react = require("react");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _reactPdf = require("react-pdf");
|
|
21
21
|
|
|
22
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
23
|
|
|
@@ -184,7 +184,7 @@ var PdfViewer = function PdfViewer(_ref) {
|
|
|
184
184
|
position: 'absolute',
|
|
185
185
|
overflow: 'auto'
|
|
186
186
|
},
|
|
187
|
-
children: (0, _jsxRuntime.jsx)(
|
|
187
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Document, {
|
|
188
188
|
file: src,
|
|
189
189
|
onLoadSuccess: handlePageInit,
|
|
190
190
|
ref: documentRef,
|
|
@@ -192,7 +192,7 @@ var PdfViewer = function PdfViewer(_ref) {
|
|
|
192
192
|
children: Array.from({
|
|
193
193
|
length: pageSize
|
|
194
194
|
}).map(function (_, index) {
|
|
195
|
-
return (0, _jsxRuntime.jsx)(
|
|
195
|
+
return (0, _jsxRuntime.jsx)(_reactPdf.Page, {
|
|
196
196
|
pageNumber: index + 1,
|
|
197
197
|
scale: scale
|
|
198
198
|
}, index);
|
|
@@ -210,12 +210,12 @@ var PdfViewer = function PdfViewer(_ref) {
|
|
|
210
210
|
position: 'absolute',
|
|
211
211
|
overflow: 'auto'
|
|
212
212
|
},
|
|
213
|
-
children: (0, _jsxRuntime.jsx)(
|
|
213
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Document, {
|
|
214
214
|
file: src,
|
|
215
215
|
onLoadSuccess: handlePageInit,
|
|
216
216
|
ref: documentRef,
|
|
217
217
|
onPassword: onPassword,
|
|
218
|
-
children: (0, _jsxRuntime.jsx)(
|
|
218
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Page, {
|
|
219
219
|
pageNumber: page,
|
|
220
220
|
scale: scale
|
|
221
221
|
})
|
|
@@ -9,7 +9,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
9
9
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _reactPdf = require("react-pdf");
|
|
13
13
|
|
|
14
14
|
var _locale = require("../locale");
|
|
15
15
|
|
|
@@ -55,12 +55,12 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
55
55
|
className: className,
|
|
56
56
|
children: needPassword ? formatMessage({
|
|
57
57
|
id: 'Encrypted PDF'
|
|
58
|
-
}) : (0, _jsxRuntime.jsx)(
|
|
58
|
+
}) : (0, _jsxRuntime.jsx)(_reactPdf.Document, {
|
|
59
59
|
file: src,
|
|
60
60
|
onPassword: function onPassword() {
|
|
61
61
|
setNeedPassword(true);
|
|
62
62
|
},
|
|
63
|
-
children: (0, _jsxRuntime.jsx)(
|
|
63
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Page, {
|
|
64
64
|
pageNumber: 1,
|
|
65
65
|
height: 96
|
|
66
66
|
})
|
|
@@ -19,7 +19,7 @@ var _react = require("react");
|
|
|
19
19
|
|
|
20
20
|
var _typography = _interopRequireDefault(require("../typography"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _reactPdf = require("react-pdf");
|
|
23
23
|
|
|
24
24
|
var _iglooicon = require("iglooicon");
|
|
25
25
|
|
|
@@ -157,14 +157,14 @@ var PDF = function PDF(_ref) {
|
|
|
157
157
|
|
|
158
158
|
return (0, _jsxRuntime.jsx)("div", {
|
|
159
159
|
className: "igloo-upload-preview-pdf",
|
|
160
|
-
children: (0, _jsxRuntime.jsx)(
|
|
160
|
+
children: (0, _jsxRuntime.jsx)(_reactPdf.Document, {
|
|
161
161
|
file: src,
|
|
162
162
|
onLoadSuccess: handlePageInit,
|
|
163
163
|
onPassword: onPassword,
|
|
164
164
|
children: Array.from({
|
|
165
165
|
length: pageSize
|
|
166
166
|
}).map(function (_, index) {
|
|
167
|
-
return (0, _jsxRuntime.jsx)(
|
|
167
|
+
return (0, _jsxRuntime.jsx)(_reactPdf.Page, {
|
|
168
168
|
pageNumber: index + 1,
|
|
169
169
|
scale: md ? 1 : 0.5
|
|
170
170
|
}, index);
|