@linagora/linid-im-front-corelib 0.0.58 → 0.0.59

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.
@@ -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 instanceId The unique identifier of the module instance.
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(instanceId: string, fieldName: string): {
8
- validateFromApi: (value: string) => Promise<string | true>;
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
  };
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
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",