@linagora/linid-im-front-corelib 0.0.75 → 0.0.77

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.
@@ -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. `input` is the
41
- * bare value expression only — it never carries the `name=` query parameter prefix produced
42
- * by {@link LinidFilter.toString}.
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` 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`.
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, 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, 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,5 +1,5 @@
1
1
  /**
2
- * Separator used between OR'd value expressions in a filter's string representation.
2
+ * Separator used between value expressions combined with OR in a filter's string representation.
3
3
  */
4
4
  export declare const LINID_FILTER_OR_SEPARATOR = "|";
5
5
  /**
@@ -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, 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, 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
  */
@@ -160,6 +160,7 @@ declare const Q_TREE_PROPS: readonly ["tickStrategy", "noSelectionUnset", "defau
160
160
  * List of QSplitterProps keys for type-safe UI design retrieval.
161
161
  */
162
162
  declare const Q_SPLITTER_PROPS: readonly ["horizontal", "limits", "modelValue", "reverse", "unit", "disable", "beforeClass", "afterClass", "separatorClass", "separatorStyle", "dark"];
163
+ declare const Q_SEPARATOR_PROPS: readonly ["spaced", "inset", "vertical", "dark", "size", "color"];
163
164
  /**
164
165
  * Maps Quasar component names to their respective props keys for UI design retrieval.
165
166
  */
@@ -300,12 +301,16 @@ export type LinidQTreeProps = Pick<QTreeProps, (typeof Q_TREE_PROPS)[number]>;
300
301
  * Subset of QSplitter props supported in UI design configuration.
301
302
  */
302
303
  export type LinidQSplitterProps = Pick<QSplitterProps, (typeof Q_SPLITTER_PROPS)[number]>;
304
+ /**
305
+ * Subset of QSeparator props supported in UI design configuration.
306
+ */
307
+ export type LinidQSeparatorProps = Pick<QSeparatorProps, (typeof Q_SEPARATOR_PROPS)[number]>;
303
308
  /**
304
309
  * Union type of all supported Quasar component props subsets.
305
310
  */
306
- 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 | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
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;
307
312
  /**
308
313
  * Valid Quasar component names for type-safe UI design retrieval.
309
314
  */
310
- 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-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree' | 'q-splitter';
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';
311
316
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.75",
3
+ "version": "0.0.77",
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": [