@servicetitan/form 21.5.0 → 21.6.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,8 @@ interface UploadError {
|
|
7
7
|
file: File;
|
8
8
|
message?: string;
|
9
9
|
}
|
10
|
-
|
10
|
+
declare type ExcludedFilePickerProps = 'onDelete' | 'onDownload' | 'onReplace' | 'onSelected' | 'value';
|
11
|
+
interface FileUploaderProps extends Omit<FilePickerProps, ExcludedFilePickerProps> {
|
11
12
|
config?: FileUploaderConfig;
|
12
13
|
value: FileDescriptor[];
|
13
14
|
folderName?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../src/file-uploader/file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAOhD,OAAO,EAAc,cAAc,EAAU,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGlG,OAAO,EAAE,kBAAkB,EAAqC,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AA4BD,
|
1
|
+
{"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../src/file-uploader/file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAOhD,OAAO,EAAc,cAAc,EAAU,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGlG,OAAO,EAAE,kBAAkB,EAAqC,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AA4BD,aAAK,uBAAuB,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC;AAEhG,UAAU,iBAAkB,SAAQ,IAAI,CAAC,eAAe,EAAE,uBAAuB,CAAC;IAC9E,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;CAC5C;AAED,qBACa,YAAa,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC1D,MAAM,CAAC,YAAY;;MAEjB;IAIM,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAExB,MAAM,EAAE,WAAW,EAAE,CAAM;IAEvC,QAAQ,EAAG,QAAQ,CAAC;gBAER,KAAK,EAAE,iBAAiB;IAMpC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM;IASrC,WAAW;IAKX,oBAAoB,SAAU,IAAI,YAAY,MAAM,UAgBlD;IAGF,mBAAmB,SAAU,IAAI,wCAiB/B;IAGF,iBAAiB,SAAU,IAAI,wCAU7B;IAEF,iBAAiB;IAejB,oBAAoB;IAIpB,cAAc,SAAU,cAAc,UAWpC;IAEF,cAAc,UAAW,QAAQ,UAc/B;IAEF,aAAa;cAAyC,cAAc;iBAAW,IAAI;eAgBjF;IAEF,YAAY,aAAc,cAAc,UAQtC;IAEF,iBAAiB,aAEf;IAEF,MAAM;CAwDT"}
|
@@ -7,6 +7,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
9
|
};
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
11
|
+
var t = {};
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
13
|
+
t[p] = s[p];
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
17
|
+
t[p[i]] = s[p[i]];
|
18
|
+
}
|
19
|
+
return t;
|
20
|
+
};
|
10
21
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
11
22
|
import { Component, Fragment } from 'react';
|
12
23
|
import { injectDependency, optional } from '@servicetitan/react-ioc';
|
@@ -177,7 +188,7 @@ let FileUploader = class FileUploader extends Component {
|
|
177
188
|
this.uploader.cancel();
|
178
189
|
}
|
179
190
|
render() {
|
180
|
-
const { value, onChange, hideReplace, hideDownload, limitReached,
|
191
|
+
const _a = this.props, { value, onChange, hideReplace, hideDownload, limitReached, multiple, config, folderName } = _a, rest = __rest(_a, ["value", "onChange", "hideReplace", "hideDownload", "limitReached", "multiple", "config", "folderName"]);
|
181
192
|
if (!onChange && !value.length) {
|
182
193
|
return null;
|
183
194
|
}
|
@@ -188,7 +199,7 @@ let FileUploader = class FileUploader extends Component {
|
|
188
199
|
onDelete: undefined,
|
189
200
|
limitReached: true,
|
190
201
|
};
|
191
|
-
return (_jsxs(Fragment, { children: [!!this.errors.length && (_jsx(UploadErrors, { errors: this.errors, onClose: this.handleErrorsClose, className: "m-b-2", multiple: multiple })), _jsx(Confirm, Object.assign({ onConfirm: this.handleDelete, title: "Are you sure you want to delete this file?" }, { children: onDelete => (_jsx(FilePicker, Object.assign({ value: value.length ? value : undefined, onReplace: !hideReplace ? this.handleReplace : undefined, onSelected: this.handleSelected, onDelete: onDelete, onDownload: !hideDownload ? this.handleDownload : undefined, limitReached: limitReached,
|
202
|
+
return (_jsxs(Fragment, { children: [!!this.errors.length && (_jsx(UploadErrors, { errors: this.errors, onClose: this.handleErrorsClose, className: "m-b-2", multiple: multiple })), _jsx(Confirm, Object.assign({ onConfirm: this.handleDelete, title: "Are you sure you want to delete this file?" }, { children: onDelete => (_jsx(FilePicker, Object.assign({ value: value.length ? value : undefined, onReplace: !hideReplace ? this.handleReplace : undefined, onSelected: this.handleSelected, onDelete: onDelete, onDownload: !hideDownload ? this.handleDownload : undefined, limitReached: limitReached, multiple: multiple }, rest, readonlyProps))) }))] }));
|
192
203
|
}
|
193
204
|
};
|
194
205
|
Object.defineProperty(FileUploader, "defaultProps", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-uploader.js","sourceRoot":"","sources":["../../src/file-uploader/file-uploader.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"file-uploader.js","sourceRoot":"","sources":["../../src/file-uploader/file-uploader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAM,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAkB,MAAM,EAAmB,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAsB,iCAAiC,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,SAAS,eAAe,CAAI,GAAQ,EAAE,KAAa,EAAE,WAAmB,EAAE,GAAG,KAAU;IACnF,OAAO,CAAC,GAAG,GAAG,C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KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EACvC,SAAS,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EACxD,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC3D,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,IACd,IAAI,EACJ,aAAa,EACnB,CACL,IACK,IACH,CACd,CAAC;IACN,CAAC;CACJ,CAAA;AA3NU;;;;WAAe;QAClB,UAAU,EAAE,MAAM;KACrB;GAAC;AAIF;IAFC,gBAAgB,CAAC,iCAAiC,CAAC;IACnD,QAAQ,EAAE;;4CACyB;AAExB;IAAX,UAAU;;4CAA4B;AAUvC;IADC,MAAM;;qCACQ,IAAI;;4CAMlB;AAGD;IADC,MAAM;;;;+CAGN;AAGD;IADC,MAAM;;0DAiBL;AAGF;IADC,MAAM;;yDAkBL;AAGF;IADC,MAAM;;uDAWL;AAlFO,YAAY;IADxB,QAAQ;;GACI,YAAY,CA4NxB;SA5NY,YAAY"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@servicetitan/form",
|
3
|
-
"version": "21.
|
3
|
+
"version": "21.6.0",
|
4
4
|
"description": "",
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/form",
|
6
6
|
"repository": {
|
@@ -16,12 +16,12 @@
|
|
16
16
|
"src"
|
17
17
|
],
|
18
18
|
"devDependencies": {
|
19
|
-
"@servicetitan/confirm": "^21.
|
20
|
-
"@servicetitan/culture": "^21.
|
21
|
-
"@servicetitan/data-query": "^21.
|
22
|
-
"@servicetitan/design-system": "~11.
|
23
|
-
"@servicetitan/react-ioc": "^21.
|
24
|
-
"@servicetitan/tokens": "~11.
|
19
|
+
"@servicetitan/confirm": "^21.6.0",
|
20
|
+
"@servicetitan/culture": "^21.6.0",
|
21
|
+
"@servicetitan/data-query": "^21.6.0",
|
22
|
+
"@servicetitan/design-system": "~11.6.0",
|
23
|
+
"@servicetitan/react-ioc": "^21.6.0",
|
24
|
+
"@servicetitan/tokens": "~11.6.0",
|
25
25
|
"@types/debounce": "~1.2.1",
|
26
26
|
"@types/react": "~17.0.38",
|
27
27
|
"@types/react-input-mask": "~2.0.5",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"accounting": "~0.4.1",
|
30
30
|
"formstate": "~2.0.0",
|
31
31
|
"mobx": "~6.5.0",
|
32
|
-
"mobx-react": "~7.
|
32
|
+
"mobx-react": "~7.4.0",
|
33
33
|
"moment": "~2.29.3",
|
34
34
|
"react": "~17.0.2",
|
35
35
|
"react-dom": "~17.0.2",
|
@@ -39,13 +39,13 @@
|
|
39
39
|
"@servicetitan/confirm": "^20.0.0",
|
40
40
|
"@servicetitan/culture": "^20.0.0",
|
41
41
|
"@servicetitan/data-query": "^20.0.0",
|
42
|
-
"@servicetitan/design-system": "~11.
|
42
|
+
"@servicetitan/design-system": "~11.6.0",
|
43
43
|
"@servicetitan/react-ioc": "^20.0.0",
|
44
|
-
"@servicetitan/tokens": "~11.
|
44
|
+
"@servicetitan/tokens": "~11.6.0",
|
45
45
|
"accounting": "~0.4.1",
|
46
46
|
"formstate": "~2.0.0",
|
47
47
|
"mobx": "~6.5.0",
|
48
|
-
"mobx-react": "~7.
|
48
|
+
"mobx-react": "~7.4.0",
|
49
49
|
"moment": "~2.29.3",
|
50
50
|
"react": "~17.0.2",
|
51
51
|
"react-dom": "~17.0.2",
|
@@ -66,5 +66,5 @@
|
|
66
66
|
"cli": {
|
67
67
|
"webpack": false
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "1b89db23f0e18078ee310e95a760b34826893258"
|
70
70
|
}
|
@@ -49,11 +49,9 @@ const UploadErrors: FC<UploadErrorsProps> = ({ errors, className, onClose, multi
|
|
49
49
|
);
|
50
50
|
};
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
'limitReached' | 'typesNote' | 'multiple' | 'accept' | 'layout' | 'align'
|
56
|
-
> {
|
52
|
+
type ExcludedFilePickerProps = 'onDelete' | 'onDownload' | 'onReplace' | 'onSelected' | 'value';
|
53
|
+
|
54
|
+
interface FileUploaderProps extends Omit<FilePickerProps, ExcludedFilePickerProps> {
|
57
55
|
config?: FileUploaderConfig;
|
58
56
|
value: FileDescriptor[];
|
59
57
|
folderName?: string;
|
@@ -234,11 +232,10 @@ export class FileUploader extends Component<FileUploaderProps> {
|
|
234
232
|
hideReplace,
|
235
233
|
hideDownload,
|
236
234
|
limitReached,
|
237
|
-
typesNote,
|
238
235
|
multiple,
|
239
|
-
|
240
|
-
|
241
|
-
|
236
|
+
config,
|
237
|
+
folderName,
|
238
|
+
...rest
|
242
239
|
} = this.props;
|
243
240
|
|
244
241
|
if (!onChange && !value.length) {
|
@@ -275,11 +272,8 @@ export class FileUploader extends Component<FileUploaderProps> {
|
|
275
272
|
onDelete={onDelete}
|
276
273
|
onDownload={!hideDownload ? this.handleDownload : undefined}
|
277
274
|
limitReached={limitReached}
|
278
|
-
typesNote={typesNote}
|
279
275
|
multiple={multiple}
|
280
|
-
|
281
|
-
layout={layout}
|
282
|
-
align={align}
|
276
|
+
{...rest}
|
283
277
|
{...readonlyProps}
|
284
278
|
/>
|
285
279
|
)}
|