@linagora/linid-im-front-corelib 0.0.58 → 0.0.60
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/core-lib.es.js +3018 -2717
- package/dist/core-lib.umd.js +15 -15
- package/dist/package.json +2 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useFieldValidation.d.ts +2 -0
- package/dist/types/src/composables/useQuasarFieldValidation.d.ts +5 -4
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/types/fieldValidation.d.ts +1 -1
- package/dist/types/src/types/linidTree.d.ts +19 -0
- package/package.json +2 -1
|
@@ -14,4 +14,6 @@ export declare function useFieldValidation(i18nScope: string): {
|
|
|
14
14
|
max: (value: number, maxValue: number) => true | string;
|
|
15
15
|
pattern: (value: string, pattern: string) => true | string;
|
|
16
16
|
unique: (value: unknown, items: unknown[]) => true | string;
|
|
17
|
+
validDate: (value: unknown, format?: string) => true | string;
|
|
18
|
+
dateNotInPast: (value: unknown, format?: string) => true | string;
|
|
17
19
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Composable for field validation compatible with Quasar framework.
|
|
3
|
-
* @param
|
|
4
|
-
* @param fieldName The name of the field to validate.
|
|
3
|
+
* @param i18nScope The i18n scope for translation keys used in validation messages.
|
|
5
4
|
* @returns An object containing validation methods formatted for Quasar.
|
|
6
5
|
*/
|
|
7
|
-
export declare function useQuasarFieldValidation(
|
|
8
|
-
validateFromApi: (value: string) => Promise<
|
|
6
|
+
export declare function useQuasarFieldValidation(i18nScope: string): {
|
|
7
|
+
validateFromApi: (instanceId: string, fieldName: string) => (value: string) => Promise<true | string>;
|
|
9
8
|
required: (value: unknown) => true | string;
|
|
10
9
|
email: (value: unknown) => true | string;
|
|
11
10
|
min: (minValue: number) => (value: string | number) => string | true;
|
|
@@ -14,4 +13,6 @@ export declare function useQuasarFieldValidation(instanceId: string, fieldName:
|
|
|
14
13
|
maxLength: (maxValue: number) => (value: string) => string | true;
|
|
15
14
|
pattern: (patternValue: string) => (value: string) => string | true;
|
|
16
15
|
unique: (items: unknown[]) => (value: unknown) => string | true;
|
|
16
|
+
validDate: (format?: string) => (value: unknown) => string | true;
|
|
17
|
+
dateNotInPast: (format?: string) => (value: unknown) => string | true;
|
|
17
18
|
};
|
|
@@ -38,4 +38,4 @@ export type { ValidatorName } from './types/fieldValidation';
|
|
|
38
38
|
export type { LinidApiErrorResponseBody } from './types/linidApi';
|
|
39
39
|
export type { DialogEvent } from './types/dialogType';
|
|
40
40
|
export type { LinidUser } from './types/linidUser';
|
|
41
|
-
export type { TreeNode } from './types/linidTree';
|
|
41
|
+
export type { TreeNode, TreeNodeType } from './types/linidTree';
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* These validators read their parameters from the `inputSettings` property
|
|
4
4
|
* of `LinidAttributeConfiguration`.
|
|
5
5
|
*/
|
|
6
|
-
export type ValidatorName = 'min' | 'max' | 'minLength' | 'maxLength' | 'pattern' | 'unique';
|
|
6
|
+
export type ValidatorName = 'dateNotInPast' | 'min' | 'max' | 'minLength' | 'maxLength' | 'pattern' | 'unique' | 'validDate';
|
|
@@ -18,4 +18,23 @@ export type TreeNode = {
|
|
|
18
18
|
* Child nodes nested under this node.
|
|
19
19
|
*/
|
|
20
20
|
nodes: TreeNode[];
|
|
21
|
+
/**
|
|
22
|
+
* Additional actions specific to this node instance, merged with the
|
|
23
|
+
* default actions defined by the matching `TreeNodeType`.
|
|
24
|
+
*/
|
|
25
|
+
extraActions?: string[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Describes a node-type definition: an identifier and the default
|
|
29
|
+
* actions available to every node of this type.
|
|
30
|
+
*/
|
|
31
|
+
export type TreeNodeType = {
|
|
32
|
+
/**
|
|
33
|
+
* The type of the node.
|
|
34
|
+
*/
|
|
35
|
+
type: string;
|
|
36
|
+
/**
|
|
37
|
+
* Default actions associated with this node type.
|
|
38
|
+
*/
|
|
39
|
+
actions?: string[];
|
|
21
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linagora/linid-im-front-corelib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.60",
|
|
4
4
|
"description": "Core library of the LinID Identity Manager project. Provides shared types, services, components, and utilities for front-end and plugin, enabling consistent integration across the LinID ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@module-federation/enhanced": "2.1.0",
|
|
46
46
|
"axios": "1.13.6",
|
|
47
|
+
"dayjs": "1.11.20",
|
|
47
48
|
"pinia": "3.0.4",
|
|
48
49
|
"quasar": "2.18.6",
|
|
49
50
|
"rxjs": "7.8.2",
|