@linagora/linid-im-front-corelib 0.0.60 → 0.0.62
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 +575 -578
- package/dist/core-lib.umd.js +11 -11
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useQuasarRules.d.ts +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/types/dropdownButton.d.ts +44 -0
- package/dist/types/src/types/fieldValidation.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import type { ValidationRule } from 'quasar/dist/types/api/validation.js';
|
|
|
2
2
|
import type { LinidAttributeConfiguration, ValidatorName } from '..';
|
|
3
3
|
/**
|
|
4
4
|
* Generates Quasar validation rules based on configuration.
|
|
5
|
-
* @param instanceId The unique identifier of the module instance.
|
|
5
|
+
* @param instanceId - The unique identifier of the module instance.
|
|
6
6
|
* @param attributeConfig - The configuration of the attribute being validated.
|
|
7
7
|
* @param validatorsNames - Array of validator names to include.
|
|
8
8
|
* @returns An array of validation functions compatible with Quasar.
|
|
@@ -39,3 +39,4 @@ export type { LinidApiErrorResponseBody } from './types/linidApi';
|
|
|
39
39
|
export type { DialogEvent } from './types/dialogType';
|
|
40
40
|
export type { LinidUser } from './types/linidUser';
|
|
41
41
|
export type { TreeNode, TreeNodeType } from './types/linidTree';
|
|
42
|
+
export type { DropdownClickPayload, MenuItem } from './types/dropdownButton';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape of a single entry passed to the federated DropdownButton component.
|
|
3
|
+
*
|
|
4
|
+
* `TKey` lets consumers narrow the accepted keys to a finite union (typically
|
|
5
|
+
* derived from a `const`-tuple via `typeof X[number]`) so both the entry key
|
|
6
|
+
* and any nested children share the same identifier domain.
|
|
7
|
+
* @template TKey Identifier domain accepted for the entry and its children. Defaults to `string` to keep open-ended menus.
|
|
8
|
+
*/
|
|
9
|
+
export interface MenuItem<TKey extends string = string> {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the menu item, used as an i18n key and as the base
|
|
12
|
+
* of the emitted action key.
|
|
13
|
+
*/
|
|
14
|
+
key: TKey;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the menu item triggers a click event when activated.
|
|
17
|
+
*/
|
|
18
|
+
clickable: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Optional list of child keys rendered as a sub-menu. Each child key is
|
|
21
|
+
* combined with the parent `key` (e.g. `"<key>.<child>"`) when the user
|
|
22
|
+
* activates a child entry.
|
|
23
|
+
*/
|
|
24
|
+
children?: TKey[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Payload emitted by the federated DropdownButton when the user activates an
|
|
28
|
+
* entry.
|
|
29
|
+
*
|
|
30
|
+
* For a root entry, `key` equals the entry's own key (e.g. `"edit"`). For a
|
|
31
|
+
* child entry, `key` is the dot-separated composite of the parent key and the
|
|
32
|
+
* child key (e.g. `"export.csv"`).
|
|
33
|
+
*
|
|
34
|
+
* `TKey` lets consumers strongly type the keys they expect to receive; when
|
|
35
|
+
* left to the default `string`, the payload accepts any key emitted by the
|
|
36
|
+
* dropdown.
|
|
37
|
+
* @template TKey Domain of keys (root or `parent.child`) the listener expects to receive.
|
|
38
|
+
*/
|
|
39
|
+
export interface DropdownClickPayload<TKey extends string = string> {
|
|
40
|
+
/**
|
|
41
|
+
* Dotted action key emitted by the dropdown.
|
|
42
|
+
*/
|
|
43
|
+
key: TKey;
|
|
44
|
+
}
|
|
@@ -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 = 'dateNotInPast' | 'min' | 'max' | 'minLength' | 'maxLength' | 'pattern' | 'unique' | 'validDate';
|
|
6
|
+
export type ValidatorName = 'email' | '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.
|
|
3
|
+
"version": "0.0.62",
|
|
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": [
|