@xh/hoist 76.0.0-SNAPSHOT.1757966316621 → 76.0.0-SNAPSHOT.1758132590722
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/build/types/core/XH.d.ts +1 -1
- package/core/XH.ts +1 -1
- package/data/validation/constraints.ts +6 -5
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/build/types/core/XH.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { RouterModel } from '@xh/hoist/appcontainer/RouterModel';
|
|
|
2
2
|
import { HoistAuthModel } from '@xh/hoist/core/HoistAuthModel';
|
|
3
3
|
import { Store } from '@xh/hoist/data';
|
|
4
4
|
import { AlertBannerService, AutoRefreshService, ChangelogService, ConfigService, EnvironmentService, FetchOptions, FetchService, GridAutosizeService, GridExportService, IdentityService, IdleService, InspectorService, JsonBlobService, LocalStorageService, PrefService, SessionStorageService, TrackService, WebSocketService, ClientHealthService } from '@xh/hoist/svc';
|
|
5
|
-
import { LogLevel } from '@xh/hoist/utils/js';
|
|
5
|
+
import { LogLevel } from '@xh/hoist/utils/js/LogUtils';
|
|
6
6
|
import { Router, State } from 'router5';
|
|
7
7
|
import { CancelFn } from 'router5/types/types/base';
|
|
8
8
|
import { SetOptional } from 'type-fest';
|
package/core/XH.ts
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
WebSocketService,
|
|
32
32
|
ClientHealthService
|
|
33
33
|
} from '@xh/hoist/svc';
|
|
34
|
-
import {getLogLevel, setLogLevel, LogLevel} from '@xh/hoist/utils/js';
|
|
34
|
+
import {getLogLevel, setLogLevel, LogLevel} from '@xh/hoist/utils/js/LogUtils';
|
|
35
35
|
import {camelCase, flatten, isString, uniqueId} from 'lodash';
|
|
36
36
|
import {Router, State} from 'router5';
|
|
37
37
|
import {CancelFn} from 'router5/types/types/base';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import {LocalDate} from '@xh/hoist/utils/datetime';
|
|
8
|
+
import {pluralize} from '@xh/hoist/utils/js';
|
|
8
9
|
import {isArray, isEmpty, isFinite, isNil, isString, uniq} from 'lodash';
|
|
9
10
|
import moment from 'moment';
|
|
10
11
|
import {Constraint} from './Rule';
|
|
@@ -43,21 +44,21 @@ export const validEmail: Constraint<string> = ({value, displayName}) => {
|
|
|
43
44
|
*/
|
|
44
45
|
export function validEmails(c?: ValidEmailsOptions): Constraint<string> {
|
|
45
46
|
return ({value, displayName}) => {
|
|
46
|
-
if (isNil(value)) return null;
|
|
47
|
+
if (isNil(value) && !c?.minCount) return null;
|
|
47
48
|
|
|
48
|
-
const emails = value
|
|
49
|
+
const emails = (value ?? '')
|
|
49
50
|
.split(';')
|
|
50
51
|
.map(it => it.trim())
|
|
51
52
|
.filter(Boolean);
|
|
52
53
|
|
|
53
54
|
if (uniq(emails).length !== emails.length) {
|
|
54
|
-
return `${displayName} must not contain duplicate
|
|
55
|
+
return `${displayName} must not contain duplicate emails.`;
|
|
55
56
|
}
|
|
56
57
|
if (emails.length < c?.minCount) {
|
|
57
|
-
return `${displayName} must contain at least ${c.minCount} email
|
|
58
|
+
return `${displayName} must contain at least ${c.minCount} ${pluralize('email', c.minCount)}.`;
|
|
58
59
|
}
|
|
59
60
|
if (!isNil(c?.maxCount) && emails.length > c.maxCount) {
|
|
60
|
-
return `${displayName} must contain no more than ${c.maxCount} email
|
|
61
|
+
return `${displayName} must contain no more than ${c.maxCount} ${pluralize('email', c.maxCount)}.`;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
const isValid = emails.every(it => emailRegEx.test(it));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "76.0.0-SNAPSHOT.
|
|
3
|
+
"version": "76.0.0-SNAPSHOT.1758132590722",
|
|
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",
|