@jobber/components 9.16.7 → 9.16.8
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/dist/Countdown/index.cjs +0 -2
- package/dist/Countdown/index.mjs +0 -2
- package/dist/Countdown-cjs.js +1204 -23
- package/dist/Countdown-es.js +1182 -1
- package/dist/InputAvatar/index.cjs +1 -2
- package/dist/InputAvatar/index.mjs +1 -2
- package/dist/InputFile/InputFile.messages.d.ts +16 -0
- package/dist/InputFile/index.cjs +3 -2
- package/dist/InputFile/index.mjs +3 -2
- package/dist/InputFile-cjs.js +1199 -1397
- package/dist/InputFile-es.js +1201 -1399
- package/dist/docs/InputFile/InputFile.md +17 -2
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -1
- package/dist/tslib.es6-cjs.js +0 -54
- package/dist/tslib.es6-es.js +1 -53
- package/package.json +3 -3
- package/dist/index-cjs.js +0 -1189
- package/dist/index-es.js +0 -1186
|
@@ -105,8 +105,11 @@ example demonstrates the behaviour of uploading more than `maxFiles`.
|
|
|
105
105
|
/>
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
InputFile applies the remaining file limit after file-type and custom
|
|
109
|
+
validation. If the number of valid files exceeds the remaining capacity, none of
|
|
110
|
+
those valid files upload. Files rejected by validation do not count toward the
|
|
111
|
+
limit. Single-file mode similarly rejects all valid files if more than one is
|
|
112
|
+
dropped.
|
|
110
113
|
|
|
111
114
|
### description
|
|
112
115
|
|
|
@@ -129,6 +132,12 @@ The `allowedTypes` prop determines the types of files that can be uploaded.
|
|
|
129
132
|
`allowedTypes` accepts `images`, `basicImages` or an array of customized file
|
|
130
133
|
types. If the `allowedTypes` prop is not provided, all types will be accepted.
|
|
131
134
|
|
|
135
|
+
Invalid entries, such as the unsupported shortcut `"svg"`, produce a
|
|
136
|
+
react-dropzone console warning and are ignored. If no valid entries remain (for
|
|
137
|
+
example, `allowedTypes={["svg"]}`), there is no file-type restriction. In a
|
|
138
|
+
mixed list such as `["PNG", "svg"]`, the valid PNG restriction still applies.
|
|
139
|
+
For SVG files, use `"image/svg+xml"` or `".svg"` instead.
|
|
140
|
+
|
|
132
141
|
Using the `FileTypes` enum, you can customize the types of files that are
|
|
133
142
|
allowed to be uploaded.
|
|
134
143
|
|
|
@@ -350,6 +359,12 @@ function CustomUploadContent() {
|
|
|
350
359
|
</InputFile>
|
|
351
360
|
```
|
|
352
361
|
|
|
362
|
+
## Pasting files
|
|
363
|
+
|
|
364
|
+
With focus inside InputFile, paste a file or screenshot from the clipboard to
|
|
365
|
+
upload it. Pasted files follow the same file-type, custom validation, and
|
|
366
|
+
file-count rules as selected or dropped files.
|
|
367
|
+
|
|
353
368
|
## Developer notes
|
|
354
369
|
|
|
355
370
|
* Always provide clear feedback during the upload process
|
package/dist/index.cjs
CHANGED
|
@@ -149,7 +149,6 @@ require('./FilterPickerAction-cjs.js');
|
|
|
149
149
|
require('./FilterPickerTrigger-cjs.js');
|
|
150
150
|
require('./noop-cjs.js');
|
|
151
151
|
require('./FilterPickerActivator-cjs.js');
|
|
152
|
-
require('./index-cjs.js');
|
|
153
152
|
require('./DataList.module-cjs.js');
|
|
154
153
|
require('./DataListTotalCount-cjs.js');
|
|
155
154
|
require('./DataListLoadingState-cjs.js');
|
package/dist/index.mjs
CHANGED
|
@@ -147,7 +147,6 @@ import './FilterPickerAction-es.js';
|
|
|
147
147
|
import './FilterPickerTrigger-es.js';
|
|
148
148
|
import './noop-es.js';
|
|
149
149
|
import './FilterPickerActivator-es.js';
|
|
150
|
-
import './index-es.js';
|
|
151
150
|
import './DataList.module-es.js';
|
|
152
151
|
import './DataListTotalCount-es.js';
|
|
153
152
|
import './DataListLoadingState-es.js';
|
package/dist/tslib.es6-cjs.js
CHANGED
|
@@ -39,64 +39,10 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function __generator(thisArg, body) {
|
|
43
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
44
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
45
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
|
-
function step(op) {
|
|
47
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
49
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
|
-
switch (op[0]) {
|
|
52
|
-
case 0: case 1: t = op; break;
|
|
53
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
54
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
55
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
56
|
-
default:
|
|
57
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
58
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
59
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
60
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
61
|
-
if (t[2]) _.ops.pop();
|
|
62
|
-
_.trys.pop(); continue;
|
|
63
|
-
}
|
|
64
|
-
op = body.call(thisArg, _);
|
|
65
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
66
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __read(o, n) {
|
|
71
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
72
|
-
if (!m) return o;
|
|
73
|
-
var i = m.call(o), r, ar = [], e;
|
|
74
|
-
try {
|
|
75
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
76
|
-
}
|
|
77
|
-
catch (error) { e = { error: error }; }
|
|
78
|
-
finally {
|
|
79
|
-
try {
|
|
80
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
81
|
-
}
|
|
82
|
-
finally { if (e) throw e.error; }
|
|
83
|
-
}
|
|
84
|
-
return ar;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** @deprecated */
|
|
88
|
-
function __spread() {
|
|
89
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
90
|
-
ar = ar.concat(__read(arguments[i]));
|
|
91
|
-
return ar;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
42
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
95
43
|
var e = new Error(message);
|
|
96
44
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
97
45
|
};
|
|
98
46
|
|
|
99
47
|
exports.__awaiter = __awaiter;
|
|
100
|
-
exports.__generator = __generator;
|
|
101
48
|
exports.__rest = __rest;
|
|
102
|
-
exports.__spread = __spread;
|
package/dist/tslib.es6-es.js
CHANGED
|
@@ -37,61 +37,9 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function __generator(thisArg, body) {
|
|
41
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
42
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
43
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
44
|
-
function step(op) {
|
|
45
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
46
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
47
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
48
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
49
|
-
switch (op[0]) {
|
|
50
|
-
case 0: case 1: t = op; break;
|
|
51
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
52
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
53
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
54
|
-
default:
|
|
55
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
56
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
57
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
58
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
59
|
-
if (t[2]) _.ops.pop();
|
|
60
|
-
_.trys.pop(); continue;
|
|
61
|
-
}
|
|
62
|
-
op = body.call(thisArg, _);
|
|
63
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
64
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function __read(o, n) {
|
|
69
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
70
|
-
if (!m) return o;
|
|
71
|
-
var i = m.call(o), r, ar = [], e;
|
|
72
|
-
try {
|
|
73
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
74
|
-
}
|
|
75
|
-
catch (error) { e = { error: error }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
79
|
-
}
|
|
80
|
-
finally { if (e) throw e.error; }
|
|
81
|
-
}
|
|
82
|
-
return ar;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** @deprecated */
|
|
86
|
-
function __spread() {
|
|
87
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
88
|
-
ar = ar.concat(__read(arguments[i]));
|
|
89
|
-
return ar;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
40
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
93
41
|
var e = new Error(message);
|
|
94
42
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
95
43
|
};
|
|
96
44
|
|
|
97
|
-
export { __rest as _, __awaiter as a
|
|
45
|
+
export { __rest as _, __awaiter as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "9.16.
|
|
3
|
+
"version": "9.16.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
"lodash": "^4.18.1",
|
|
493
493
|
"react-countdown": "^2.3.2",
|
|
494
494
|
"react-datepicker": "^8.7.0",
|
|
495
|
-
"react-dropzone": "^
|
|
495
|
+
"react-dropzone": "^20.1.2",
|
|
496
496
|
"react-markdown": "^10.1.0",
|
|
497
497
|
"react-router-dom": "^5.3.4",
|
|
498
498
|
"ts-xor": "^1.0.8",
|
|
@@ -553,5 +553,5 @@
|
|
|
553
553
|
"> 1%",
|
|
554
554
|
"IE 10"
|
|
555
555
|
],
|
|
556
|
-
"gitHead": "
|
|
556
|
+
"gitHead": "48f346d90f5015b50ff0c96d798cce474ae9490e"
|
|
557
557
|
}
|