@linagora/linid-im-front-corelib 0.0.70 → 0.0.72
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/README.md +4 -0
- package/dist/core-lib.es.js +3664 -3543
- package/dist/core-lib.umd.js +16 -16
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/filters/linidFilter.d.ts +60 -0
- package/dist/types/src/filters/linidFilterValue.d.ts +38 -0
- package/dist/types/src/index.d.ts +5 -1
- package/dist/types/src/types/linidFilter.d.ts +20 -0
- package/dist/types/src/types/uiDesign.d.ts +11 -3
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type LinidFilterType } from '../types/linidFilter';
|
|
2
|
+
import { LinidFilterValue } from './linidFilterValue';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a filter that can be applied to a list of entities.
|
|
5
|
+
* The generic parameter `T` allows consumers to define their own options structure
|
|
6
|
+
* for maximum flexibility.
|
|
7
|
+
* @template T - The type of options, defaults to Record<string, unknown>.
|
|
8
|
+
*/
|
|
9
|
+
export declare class LinidFilter<T = Record<string, unknown>> {
|
|
10
|
+
/**
|
|
11
|
+
* Auto generated unique identifier of the filter.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Identifier of the filter.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the filter category and expected behavior.
|
|
20
|
+
*/
|
|
21
|
+
type: LinidFilterType;
|
|
22
|
+
/**
|
|
23
|
+
* Configuration object of the filter, defined by the consumer.
|
|
24
|
+
*/
|
|
25
|
+
options: T;
|
|
26
|
+
/**
|
|
27
|
+
* List of applied filter values.
|
|
28
|
+
*/
|
|
29
|
+
values: LinidFilterValue[];
|
|
30
|
+
/**
|
|
31
|
+
* Create a new filter.
|
|
32
|
+
* @param name - Identifier of the filter.
|
|
33
|
+
* @param type - Defines the filter category and expected behavior.
|
|
34
|
+
* @param options - Configuration object of the filter, defined by the consumer.
|
|
35
|
+
* @param values - List of applied filter values.
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string, type: LinidFilterType, options: T, values: LinidFilterValue[]);
|
|
38
|
+
/**
|
|
39
|
+
* Parses a value expression (e.g. `paris|not_lk_lyon`, as produced by
|
|
40
|
+
* {@link LinidFilterValue.toString}) into a new {@link LinidFilter} instance. `input` is the
|
|
41
|
+
* bare value expression only — it never carries the `name=` query parameter prefix produced
|
|
42
|
+
* by {@link LinidFilter.toString}.
|
|
43
|
+
*
|
|
44
|
+
* `type` and `options` are not derivable from `input`, so the returned filter gets a
|
|
45
|
+
* placeholder `'text'` `type` and empty `options`; `id` is auto generated by the constructor,
|
|
46
|
+
* as for any `LinidFilter` instance. Callers that already track a `LinidFilter` definition
|
|
47
|
+
* should only use the parsed `values`.
|
|
48
|
+
* @param name - Identifier of the filter.
|
|
49
|
+
* @param input - The value expression, with values separated by `|`.
|
|
50
|
+
* @returns The parsed filter instance.
|
|
51
|
+
* @template T - The type of options, defaults to Record<string, unknown>.
|
|
52
|
+
*/
|
|
53
|
+
static fromString<T = Record<string, unknown>>(name: string, input: string): LinidFilter<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Reconstructs the filter as an HTTP query parameter pair (`name=value`), ready to use with
|
|
56
|
+
* APIs powered by `spring-query-filter`.
|
|
57
|
+
* @returns The query parameter string representation of the filter, e.g. `city=paris|not_lk_lyon`.
|
|
58
|
+
*/
|
|
59
|
+
toString(): string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type LinidFilterOperator } from '../types/linidFilter';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a single applied value of a `LinidFilter`, converted to a string expression
|
|
4
|
+
* combining an optional negation, a comparison operator and a raw value
|
|
5
|
+
* (e.g. `not_lk_paris`, `gt_18`, `paris`).
|
|
6
|
+
*/
|
|
7
|
+
export declare class LinidFilterValue {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the comparison must be negated.
|
|
10
|
+
*/
|
|
11
|
+
isNegation: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The comparison operator applied to the value.
|
|
14
|
+
*/
|
|
15
|
+
operator: LinidFilterOperator;
|
|
16
|
+
/**
|
|
17
|
+
* The raw filter value, with the negation marker and operator prefix stripped.
|
|
18
|
+
*/
|
|
19
|
+
value: string;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new filter value.
|
|
22
|
+
* @param isNegation - Whether the comparison must be negated.
|
|
23
|
+
* @param operator - The comparison operator applied to the value.
|
|
24
|
+
* @param value - The raw filter value.
|
|
25
|
+
*/
|
|
26
|
+
constructor(isNegation: boolean, operator: LinidFilterOperator, value: string);
|
|
27
|
+
/**
|
|
28
|
+
* Parses a filter value expression (e.g. `not_lk_paris`) into a {@link LinidFilterValue}.
|
|
29
|
+
* @param input - The filter value expression to parse.
|
|
30
|
+
* @returns The parsed filter value.
|
|
31
|
+
*/
|
|
32
|
+
static fromString(input: string): LinidFilterValue;
|
|
33
|
+
/**
|
|
34
|
+
* Reconstructs the filter value expression from its negation, operator and value.
|
|
35
|
+
* @returns The filter value expression (e.g. `not_lk_paris`).
|
|
36
|
+
*/
|
|
37
|
+
toString(): string;
|
|
38
|
+
}
|
|
@@ -27,13 +27,16 @@ export { deepEqual, deepEqualUnordered, fromDot, isObject, merge, renameKeys, }
|
|
|
27
27
|
export { getPiniaStore, setPiniaStore } from './services/piniaStoreService';
|
|
28
28
|
export { getUiDesign, setUiDesign } from './services/uiDesignService';
|
|
29
29
|
export { uiEventSubject } from './services/uiEventService';
|
|
30
|
+
export { LinidFilter } from './filters/linidFilter';
|
|
31
|
+
export { LinidFilterValue } from './filters/linidFilterValue';
|
|
32
|
+
export { LINID_FILTER_NEGATION_PREFIX, LINID_FILTER_OR_SEPARATOR, } from './types/linidFilter';
|
|
30
33
|
export type { LinidZoneEntry } from './types/linidZone';
|
|
31
34
|
export type { LinidRoute, LinidRoutes } from './types/linidRoute';
|
|
32
35
|
export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilter, } from './types/page';
|
|
33
36
|
export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
|
|
34
37
|
export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
|
|
35
38
|
export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
|
|
36
|
-
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
39
|
+
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQCheckboxProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
37
40
|
export type { NavigationMenuItem } from './types/linidUi';
|
|
38
41
|
export { ModuleLifecyclePhase } from './types/moduleLifecycle';
|
|
39
42
|
export { BasicRemoteModule } from './lifecycle/skeleton';
|
|
@@ -44,3 +47,4 @@ export type { DialogEvent } from './types/dialogType';
|
|
|
44
47
|
export type { LinidUser } from './types/linidUser';
|
|
45
48
|
export type { TreeNode, TreeNodeType } from './types/linidTree';
|
|
46
49
|
export type { DropdownClickPayload, MenuItem } from './types/dropdownButton';
|
|
50
|
+
export type { LinidFilterOperator, LinidFilterType } from './types/linidFilter';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Separator used between OR'd value expressions in a filter's string representation.
|
|
3
|
+
*/
|
|
4
|
+
export declare const LINID_FILTER_OR_SEPARATOR = "|";
|
|
5
|
+
/**
|
|
6
|
+
* Prefix used to mark a filter value as negated.
|
|
7
|
+
*/
|
|
8
|
+
export declare const LINID_FILTER_NEGATION_PREFIX = "not_";
|
|
9
|
+
/**
|
|
10
|
+
* Supported filter categories. Defines the filter behavior and the UI input used to edit it.
|
|
11
|
+
*/
|
|
12
|
+
export type LinidFilterType = 'date' | 'text' | 'number' | 'list' | 'tree';
|
|
13
|
+
/**
|
|
14
|
+
* Supported comparison operators for a filter value.
|
|
15
|
+
* - `lk_` matches a "like / contains" comparison.
|
|
16
|
+
* - `` (empty string) matches a strict equality comparison.
|
|
17
|
+
* - `gt_` matches a "greater than" comparison.
|
|
18
|
+
* - `lt_` matches a "lower than" comparison.
|
|
19
|
+
*/
|
|
20
|
+
export type LinidFilterOperator = 'lk_' | '' | 'gt_' | 'lt_';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSpinnerProps, QSplitterProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, QTreeProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
1
|
+
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QCheckboxProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSpinnerProps, QSplitterProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, QTreeProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a single primitive value in the UI configuration.
|
|
4
4
|
*/
|
|
@@ -76,6 +76,10 @@ declare const Q_ICON_PROPS: readonly ["left", "right", "name", "size", "color"];
|
|
|
76
76
|
* List of QToggleProps keys for type-safe UI design retrieval.
|
|
77
77
|
*/
|
|
78
78
|
declare const Q_TOGGLE_PROPS: readonly ["toggleOrder", "toggleIndeterminate", "keepColor", "icon", "checkedIcon", "uncheckedIcon", "indeterminateIcon", "leftLabel", "size", "color", "dark", "dense", "iconColor"];
|
|
79
|
+
/**
|
|
80
|
+
* List of QToggleProps keys for type-safe UI design retrieval.
|
|
81
|
+
*/
|
|
82
|
+
declare const Q_CHECKBOX_PROPS: readonly ["toggleOrder", "toggleIndeterminate", "keepColor", "checkedIcon", "uncheckedIcon", "indeterminateIcon", "size", "color", "dark", "dense"];
|
|
79
83
|
/**
|
|
80
84
|
* List of QInputProps keys for type-safe UI design retrieval.
|
|
81
85
|
*/
|
|
@@ -196,6 +200,10 @@ export type LinidQCardProps = Pick<QCardProps, (typeof Q_CARD_PROPS)[number]>;
|
|
|
196
200
|
* Subset of QCardActions props supported in UI design configuration.
|
|
197
201
|
*/
|
|
198
202
|
export type LinidQCardActionsProps = Pick<QCardActionsProps, (typeof Q_CARD_ACTIONS_PROPS)[number]>;
|
|
203
|
+
/**
|
|
204
|
+
* Subset of QCheckboxProps props supported in UI design configuration.
|
|
205
|
+
*/
|
|
206
|
+
export type LinidQCheckboxProps = Pick<QCheckboxProps, (typeof Q_CHECKBOX_PROPS)[number]>;
|
|
199
207
|
/**
|
|
200
208
|
* Subset of QIcon props supported in UI design configuration.
|
|
201
209
|
*/
|
|
@@ -279,9 +287,9 @@ export type LinidQSplitterProps = Pick<QSplitterProps, (typeof Q_SPLITTER_PROPS)
|
|
|
279
287
|
/**
|
|
280
288
|
* Union type of all supported Quasar component props subsets.
|
|
281
289
|
*/
|
|
282
|
-
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQDateProps | LinidQDialogProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSpinnerProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
290
|
+
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQCheckboxProps | LinidQDateProps | LinidQDialogProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
283
291
|
/**
|
|
284
292
|
* Valid Quasar component names for type-safe UI design retrieval.
|
|
285
293
|
*/
|
|
286
|
-
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-banner' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-date' | 'q-dialog' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree' | 'q-splitter';
|
|
294
|
+
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-banner' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-checkbox' | 'q-date' | 'q-dialog' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree' | 'q-splitter';
|
|
287
295
|
export {};
|
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.72",
|
|
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": [
|