@xh/hoist 70.0.0-SNAPSHOT.1729537485287 → 70.0.0-SNAPSHOT.1729537714283
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/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## 70.0.0-SNAPSHOT - unreleased
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### ⚙️ Technical
|
|
6
6
|
|
|
7
|
-
*
|
|
8
|
-
* Fixed import of fontawesome. xmlFile icon is only available in > v6.5.0
|
|
7
|
+
* Deprecated `FileChooserModel.removeAllFiles()`, replaced with `clear()` for brevity/consistency.
|
|
9
8
|
|
|
10
9
|
## 69.0.0 - 2024-10-17
|
|
11
10
|
|
|
@@ -13,11 +13,11 @@ export declare class FileChooserModel extends HoistModel {
|
|
|
13
13
|
*/
|
|
14
14
|
addFiles(filesToAdd: File[]): void;
|
|
15
15
|
setSingleFile(file: File): void;
|
|
16
|
-
/**
|
|
17
|
-
* Remove a single file from the current selection.
|
|
18
|
-
*/
|
|
16
|
+
/** Remove a single file from the current selection. */
|
|
19
17
|
removeFileByName(name: string): void;
|
|
20
18
|
/** Clear the current selection. */
|
|
19
|
+
clear(): void;
|
|
20
|
+
/** @deprecated use clear() instead */
|
|
21
21
|
removeAllFiles(): void;
|
|
22
22
|
private createGridModel;
|
|
23
23
|
onDrop(accepted: any, rejected: any, enableMulti: any): void;
|
package/data/Field.ts
CHANGED
|
@@ -173,9 +173,6 @@ export type FieldType = (typeof FieldType)[keyof typeof FieldType];
|
|
|
173
173
|
* @returns fieldName transformed into user-facing / longer name for display.
|
|
174
174
|
*/
|
|
175
175
|
export function genDisplayName(fieldName: string): string {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// safely by avoiding using grouping in a regex, which is not supported in older versions
|
|
179
|
-
// of Safari Mobile (<16.4), which BlackBerry Access uses (16.0).
|
|
180
|
-
return ret.replace(/\bid\b/gi, 'ID');
|
|
176
|
+
// Handle common cases of "id" -> "ID" and "foo_id" -> "Foo ID" (vs "Foo Id")
|
|
177
|
+
return startCase(fieldName).replace(/(^| )Id\b/g, '$1ID');
|
|
181
178
|
}
|
|
@@ -10,6 +10,7 @@ import {actionCol, calcActionColWidth} from '@xh/hoist/desktop/cmp/grid';
|
|
|
10
10
|
import '@xh/hoist/desktop/register';
|
|
11
11
|
import {Icon} from '@xh/hoist/icon';
|
|
12
12
|
import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
13
|
+
import {apiDeprecated} from '@xh/hoist/utils/js';
|
|
13
14
|
import {isEmpty} from 'codemirror/src/util/misc';
|
|
14
15
|
import filesize from 'filesize';
|
|
15
16
|
import {find, uniqBy, without} from 'lodash';
|
|
@@ -51,9 +52,7 @@ export class FileChooserModel extends HoistModel {
|
|
|
51
52
|
this.files = [file];
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
/**
|
|
55
|
-
* Remove a single file from the current selection.
|
|
56
|
-
*/
|
|
55
|
+
/** Remove a single file from the current selection. */
|
|
57
56
|
@action
|
|
58
57
|
removeFileByName(name: string) {
|
|
59
58
|
const toRemove = find(this.files, {name});
|
|
@@ -62,10 +61,16 @@ export class FileChooserModel extends HoistModel {
|
|
|
62
61
|
|
|
63
62
|
/** Clear the current selection. */
|
|
64
63
|
@action
|
|
65
|
-
|
|
64
|
+
clear() {
|
|
66
65
|
this.files = [];
|
|
67
66
|
}
|
|
68
67
|
|
|
68
|
+
/** @deprecated use clear() instead */
|
|
69
|
+
removeAllFiles() {
|
|
70
|
+
apiDeprecated('FileChooserModel.removeAllFiles()', {msg: 'Use clear() instead'});
|
|
71
|
+
this.clear();
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
//------------------------
|
|
70
75
|
// Implementation
|
|
71
76
|
//------------------------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "70.0.0-SNAPSHOT.
|
|
3
|
+
"version": "70.0.0-SNAPSHOT.1729537714283",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@blueprintjs/core": "^5.10.5",
|
|
36
36
|
"@blueprintjs/datetime": "^5.3.7",
|
|
37
37
|
"@blueprintjs/datetime2": "^2.3.7",
|
|
38
|
-
"@fortawesome/fontawesome-pro": "^6.
|
|
39
|
-
"@fortawesome/fontawesome-svg-core": "^6.
|
|
40
|
-
"@fortawesome/pro-light-svg-icons": "^6.
|
|
41
|
-
"@fortawesome/pro-regular-svg-icons": "^6.
|
|
42
|
-
"@fortawesome/pro-solid-svg-icons": "^6.
|
|
43
|
-
"@fortawesome/pro-thin-svg-icons": "^6.
|
|
38
|
+
"@fortawesome/fontawesome-pro": "^6.2.1",
|
|
39
|
+
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
40
|
+
"@fortawesome/pro-light-svg-icons": "^6.2.1",
|
|
41
|
+
"@fortawesome/pro-regular-svg-icons": "^6.2.1",
|
|
42
|
+
"@fortawesome/pro-solid-svg-icons": "^6.2.1",
|
|
43
|
+
"@fortawesome/pro-thin-svg-icons": "^6.2.1",
|
|
44
44
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
45
45
|
"@onsenui/fastclick": "~1.1.1",
|
|
46
46
|
"@popperjs/core": "~2.11.0",
|