@ieeesa-npm/groups 0.15.2 → 0.15.3
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/esm2022/lib/assets/form-validations.mjs +35 -2
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +9 -6
- package/esm2022/lib/components/edit-user-roles/edit-user-roles.component.mjs +9 -6
- package/fesm2022/ieeesa-npm-groups.mjs +49 -10
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/assets/form-validations.d.ts +20 -0
- package/package.json +1 -1
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
/**
|
|
3
|
+
* Required validator for the multi-select-autocomplete "Representing Organization"
|
|
4
|
+
* control. The control's value is the array of selected chips (set by the
|
|
5
|
+
* component), so this treats a non-empty array — or a non-empty string — as
|
|
6
|
+
* valid. Keying off the selection (rather than the raw input text) prevents the
|
|
7
|
+
* required error from flashing when Material momentarily writes a transient
|
|
8
|
+
* empty value during option selection.
|
|
9
|
+
* @return {ValidatorFn}
|
|
10
|
+
*/
|
|
11
|
+
export declare function representingOrgRequiredValidator(): ValidatorFn;
|
|
12
|
+
/**
|
|
13
|
+
* Wraps a string-oriented validator (minLength/maxLength/pattern) so it is
|
|
14
|
+
* skipped when the control value is the selection array. Those built-in
|
|
15
|
+
* validators evaluate `.length` / string shape and would incorrectly fail
|
|
16
|
+
* against the chips array; they should only constrain free-text input.
|
|
17
|
+
* @param {ValidatorFn} validator the underlying string validator
|
|
18
|
+
* @return {ValidatorFn}
|
|
19
|
+
*/
|
|
20
|
+
export declare function skipWhenArray(validator: ValidatorFn): ValidatorFn;
|
|
1
21
|
export declare const GroupsValidationPatterns: {
|
|
2
22
|
groupName: RegExp;
|
|
3
23
|
shortName: RegExp;
|