@linagora/linid-im-front-corelib 0.0.76 → 0.0.78
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 +2 -2
- package/dist/core-lib.es.js +3518 -3444
- package/dist/core-lib.umd.js +20 -20
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/filters/linidFilter.d.ts +8 -7
- package/dist/types/src/filters/linidFilterSet.d.ts +50 -0
- package/dist/types/src/filters/linidFilterValue.d.ts +5 -0
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/types/linidFilter.d.ts +1 -1
- package/dist/types/src/types/uiDesign.d.ts +8 -3
- package/package.json +1 -1
|
@@ -37,14 +37,15 @@ export declare class LinidFilter<T = Record<string, unknown>> {
|
|
|
37
37
|
constructor(name: string, type: LinidFilterType, options: T, values: LinidFilterValue[]);
|
|
38
38
|
/**
|
|
39
39
|
* Parses a value expression (e.g. `paris|not_lk_lyon`, as produced by
|
|
40
|
-
* {@link LinidFilterValue.toString}) into a new {@link LinidFilter} instance
|
|
41
|
-
* bare value expression only
|
|
42
|
-
*
|
|
40
|
+
* {@link LinidFilterValue.toString}) into a new {@link LinidFilter} instance — `input` is the
|
|
41
|
+
* bare value expression only, never the `name=` query parameter prefix produced by
|
|
42
|
+
* {@link LinidFilter.toString}.
|
|
43
43
|
*
|
|
44
|
-
* `type
|
|
45
|
-
*
|
|
46
|
-
* as for any
|
|
47
|
-
*
|
|
44
|
+
* `type`/`options` aren't derivable from `input`, so the result gets a placeholder `'text'`
|
|
45
|
+
* `type` and empty `options` (callers tracking a `LinidFilter` definition should only use the
|
|
46
|
+
* parsed `values`); `id` is auto generated as for any instance. A non-string `input` at runtime
|
|
47
|
+
* (this class is exported across Module Federation boundaries, where TypeScript cannot enforce
|
|
48
|
+
* the contract) is treated like an empty string: an empty `values` array, rather than throwing.
|
|
48
49
|
* @param name - Identifier of the filter.
|
|
49
50
|
* @param input - The value expression, with values separated by `|`.
|
|
50
51
|
* @returns The parsed filter instance.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LinidFilter } from './linidFilter';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a saved filter set (favorite search), combining a user-defined label with the list
|
|
4
|
+
* of `LinidFilter` it is made of. It converts to and parses from a `&`-separated list of
|
|
5
|
+
* `name=value` query parameter pairs — the same URL filter representation produced by
|
|
6
|
+
* `LinidFilter.toString` — so it can be stored as-is in user preferences and reused directly as
|
|
7
|
+
* a query string against APIs powered by
|
|
8
|
+
* [`spring-query-filter`](https://github.com/Zorin95670/spring-query-filter).
|
|
9
|
+
*/
|
|
10
|
+
export declare class LinidFilterSet {
|
|
11
|
+
/**
|
|
12
|
+
* User-friendly name of the favorite search (e.g. "My Active Projects").
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Collection of filters composing the favorite search.
|
|
17
|
+
*/
|
|
18
|
+
filters: LinidFilter[];
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new filter set.
|
|
21
|
+
* @param label - User-friendly name of the favorite search.
|
|
22
|
+
* @param filters - Collection of filters composing the favorite search.
|
|
23
|
+
*/
|
|
24
|
+
constructor(label: string, filters: LinidFilter[]);
|
|
25
|
+
/**
|
|
26
|
+
* Parses a string representation of a filter set, as produced by {@link LinidFilterSet.toString},
|
|
27
|
+
* into a new {@link LinidFilterSet} instance.
|
|
28
|
+
*
|
|
29
|
+
* Each `&`-separated segment containing the `=` separator is parsed as a `name=value` pair via
|
|
30
|
+
* {@link LinidFilter.fromString} (which in turn uses `LinidFilterValue.fromString`); segments
|
|
31
|
+
* without `=` are silently dropped instead of producing a filter with a guessed name. Since
|
|
32
|
+
* `type`/`options` aren't derivable from the string, parsed filters get placeholder values —
|
|
33
|
+
* match them back to known definitions by `name`.
|
|
34
|
+
*
|
|
35
|
+
* `value` tolerates `null`/`undefined`/any non-string at runtime (e.g. `localStorage.getItem(...)`,
|
|
36
|
+
* or across a Module Federation boundary): like an empty string, it produces an empty `filters`
|
|
37
|
+
* array instead of throwing.
|
|
38
|
+
* @param label - User-friendly name of the favorite search.
|
|
39
|
+
* @param value - The `&`-separated string of `name=value` pairs, as produced by `toString()`.
|
|
40
|
+
* @returns The parsed filter set.
|
|
41
|
+
*/
|
|
42
|
+
static fromString(label: string, value: string | null | undefined): LinidFilterSet;
|
|
43
|
+
/**
|
|
44
|
+
* Reconstructs the filter set as a `&`-separated string of `name=value` pairs, one per filter,
|
|
45
|
+
* ready to use with APIs powered by `spring-query-filter` or to store in user preferences.
|
|
46
|
+
* @returns The string representation of the filter set, e.g.
|
|
47
|
+
* `status=active|pending&createdAt=gt_2026-01-01`.
|
|
48
|
+
*/
|
|
49
|
+
toString(): string;
|
|
50
|
+
}
|
|
@@ -26,6 +26,11 @@ export declare class LinidFilterValue {
|
|
|
26
26
|
constructor(isNegation: boolean, operator: LinidFilterOperator, value: string);
|
|
27
27
|
/**
|
|
28
28
|
* Parses a filter value expression (e.g. `not_lk_paris`) into a {@link LinidFilterValue}.
|
|
29
|
+
*
|
|
30
|
+
* If `input` is not actually a string at runtime (this class is exported across Module
|
|
31
|
+
* Federation boundaries, where TypeScript cannot enforce the contract), the negation marker and
|
|
32
|
+
* operator prefix can't be looked up, so this returns the same neutral result as for an empty
|
|
33
|
+
* string: no negation, no operator, empty value.
|
|
29
34
|
* @param input - The filter value expression to parse.
|
|
30
35
|
* @returns The parsed filter value.
|
|
31
36
|
*/
|
|
@@ -29,6 +29,7 @@ export { getPiniaStore, setPiniaStore } from './services/piniaStoreService';
|
|
|
29
29
|
export { getUiDesign, setUiDesign } from './services/uiDesignService';
|
|
30
30
|
export { uiEventSubject } from './services/uiEventService';
|
|
31
31
|
export { LinidFilter } from './filters/linidFilter';
|
|
32
|
+
export { LinidFilterSet } from './filters/linidFilterSet';
|
|
32
33
|
export { LinidFilterValue } from './filters/linidFilterValue';
|
|
33
34
|
export { LINID_FILTER_NEGATION_PREFIX, LINID_FILTER_OR_SEPARATOR, } from './types/linidFilter';
|
|
34
35
|
export type { LinidZoneEntry } from './types/linidZone';
|
|
@@ -37,7 +38,7 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
|
|
|
37
38
|
export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
|
|
38
39
|
export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
|
|
39
40
|
export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
|
|
40
|
-
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQCheckboxProps, LinidQDateProps, LinidQDialogProps, LinidQFieldProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQChipProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSeparatorProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
41
|
+
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQCheckboxProps, LinidQDateProps, LinidQDialogProps, LinidQFieldProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQChipProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQOptionGroupProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSeparatorProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
41
42
|
export type { NavigationMenuItem } from './types/linidUi';
|
|
42
43
|
export { ModuleLifecyclePhase } from './types/moduleLifecycle';
|
|
43
44
|
export { BasicRemoteModule } from './lifecycle/skeleton';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QCheckboxProps, QChipProps, QDateProps, QDialogProps, QFieldProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSeparatorProps, 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, QChipProps, QDateProps, QDialogProps, QFieldProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QOptionGroup, QRouteTabProps, QSelectProps, QSeparatorProps, 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
|
*/
|
|
@@ -161,6 +161,7 @@ declare const Q_TREE_PROPS: readonly ["tickStrategy", "noSelectionUnset", "defau
|
|
|
161
161
|
*/
|
|
162
162
|
declare const Q_SPLITTER_PROPS: readonly ["horizontal", "limits", "modelValue", "reverse", "unit", "disable", "beforeClass", "afterClass", "separatorClass", "separatorStyle", "dark"];
|
|
163
163
|
declare const Q_SEPARATOR_PROPS: readonly ["spaced", "inset", "vertical", "dark", "size", "color"];
|
|
164
|
+
declare const Q_OPTION_GROUP_PROPS: readonly ["keepColor", "type", "leftLabel", "inline", "size", "color", "dark", "dense"];
|
|
164
165
|
/**
|
|
165
166
|
* Maps Quasar component names to their respective props keys for UI design retrieval.
|
|
166
167
|
*/
|
|
@@ -305,12 +306,16 @@ export type LinidQSplitterProps = Pick<QSplitterProps, (typeof Q_SPLITTER_PROPS)
|
|
|
305
306
|
* Subset of QSeparator props supported in UI design configuration.
|
|
306
307
|
*/
|
|
307
308
|
export type LinidQSeparatorProps = Pick<QSeparatorProps, (typeof Q_SEPARATOR_PROPS)[number]>;
|
|
309
|
+
/**
|
|
310
|
+
* Subset of QOptionGroup props supported in UI design configuration.
|
|
311
|
+
*/
|
|
312
|
+
export type LinidQOptionGroupProps = Pick<QOptionGroup, (typeof Q_OPTION_GROUP_PROPS)[number]>;
|
|
308
313
|
/**
|
|
309
314
|
* Union type of all supported Quasar component props subsets.
|
|
310
315
|
*/
|
|
311
|
-
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQCheckboxProps | LinidQDateProps | LinidQDialogProps | LinidQFieldProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQChipProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSeparatorProps | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
316
|
+
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQCheckboxProps | LinidQDateProps | LinidQDialogProps | LinidQFieldProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQChipProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQOptionGroupProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSeparatorProps | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
312
317
|
/**
|
|
313
318
|
* Valid Quasar component names for type-safe UI design retrieval.
|
|
314
319
|
*/
|
|
315
|
-
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-field' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-chip' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-route-tab' | 'q-select' | 'q-separator' | 'q-spinner' | 'q-splitter' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
|
|
320
|
+
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-field' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-chip' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-option-group' | 'q-route-tab' | 'q-select' | 'q-separator' | 'q-spinner' | 'q-splitter' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
|
|
316
321
|
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.78",
|
|
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": [
|