@linagora/linid-im-front-corelib 0.0.63 → 0.0.66
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 +23360 -3490
- package/dist/core-lib.umd.js +135 -15
- package/dist/package.json +6 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useDayjs.d.ts +10 -0
- package/dist/types/src/composables/useFieldValidation.d.ts +4 -1
- package/dist/types/src/composables/useNunjucks.d.ts +15 -0
- package/dist/types/src/composables/useQuasarDate.d.ts +10 -0
- package/dist/types/src/composables/useQuasarFieldValidation.d.ts +4 -1
- package/dist/types/src/composables/useTree.d.ts +1 -1
- package/dist/types/src/index.d.ts +7 -3
- package/dist/types/src/services/dayjsService.d.ts +13 -0
- package/dist/types/src/types/fieldValidation.d.ts +1 -1
- package/dist/types/src/types/linidConfiguration.d.ts +1 -1
- package/dist/types/src/types/linidTree.d.ts +4 -4
- package/dist/types/src/types/uiDesign.d.ts +10 -2
- package/package.json +6 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD";
|
|
2
|
+
/**
|
|
3
|
+
* Composable exposing dayjs utility functions.
|
|
4
|
+
* @returns An object containing dayjs helper methods.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useDayjs(): {
|
|
7
|
+
maxDate: (dates: unknown[], format?: string) => import("dayjs").Dayjs | null;
|
|
8
|
+
minDate: (dates: unknown[], format?: string) => import("dayjs").Dayjs | null;
|
|
9
|
+
toDayjs: (value: unknown, format?: string) => import("dayjs").Dayjs;
|
|
10
|
+
};
|
|
@@ -15,5 +15,8 @@ export declare function useFieldValidation(i18nScope: string): {
|
|
|
15
15
|
pattern: (value: string, pattern: string) => true | string;
|
|
16
16
|
unique: (value: unknown, items: unknown[]) => true | string;
|
|
17
17
|
validDate: (value: unknown, format?: string) => true | string;
|
|
18
|
-
|
|
18
|
+
afterDate: (value: unknown, compareTo: unknown, format?: string) => true | string;
|
|
19
|
+
beforeDate: (value: unknown, compareTo: unknown, format?: string) => true | string;
|
|
20
|
+
fromDate: (value: unknown, compareTo: unknown, format?: string) => true | string;
|
|
21
|
+
upToDate: (value: unknown, compareTo: unknown, format?: string) => true | string;
|
|
19
22
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable exposing utility functions for working with Nunjucks templates.
|
|
3
|
+
* It provides a method to recursively render all string properties of an object as Nunjucks templates using a shared Nunjucks environment.
|
|
4
|
+
* The Nunjucks environment must be initialized and set in the `nunjucksService` before using this composable.
|
|
5
|
+
*
|
|
6
|
+
* **Security note:** XSS safety of the rendered output depends entirely on the Nunjucks environment
|
|
7
|
+
* provided by the caller. If the output is injected into the DOM as raw HTML (e.g. Via `v-html`),
|
|
8
|
+
* ensure the environment is configured with `autoescape: true`. Template strings (`value`) must be
|
|
9
|
+
* developer-controlled; passing user-supplied strings as templates is not supported and may introduce
|
|
10
|
+
* template injection risks.
|
|
11
|
+
* @returns An object containing utility methods for rendering Nunjucks templates within objects.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useNunjucks(): {
|
|
14
|
+
render: <T>(value: T, context: Record<string, unknown>) => T;
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const QDATE_DEFAULT_MASK = "YYYY/MM/DD";
|
|
2
|
+
/**
|
|
3
|
+
* Composable for date handling compatible with Quasar framework.
|
|
4
|
+
* Provides utility functions to convert date strings between arbitrary formats and the Quasar date component format.
|
|
5
|
+
* @returns An object containing date utility methods for Quasar.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useQuasarDate(): {
|
|
8
|
+
toQDateFormat: (date: string, format?: string) => string;
|
|
9
|
+
formatQDate: (date: unknown, format?: string) => string;
|
|
10
|
+
};
|
|
@@ -14,5 +14,8 @@ export declare function useQuasarFieldValidation(i18nScope: string): {
|
|
|
14
14
|
pattern: (patternValue: string) => (value: string) => string | true;
|
|
15
15
|
unique: (items: unknown[]) => (value: unknown) => string | true;
|
|
16
16
|
validDate: (format?: string) => (value: unknown) => string | true;
|
|
17
|
-
|
|
17
|
+
afterDate: (compareTo: string, format?: string) => (value: unknown) => string | true;
|
|
18
|
+
beforeDate: (compareTo: string, format?: string) => (value: unknown) => string | true;
|
|
19
|
+
fromDate: (compareTo: string, format?: string) => (value: unknown) => string | true;
|
|
20
|
+
upToDate: (compareTo: string, format?: string) => (value: unknown) => string | true;
|
|
18
21
|
};
|
|
@@ -12,5 +12,5 @@ import type { TreeNode } from '../types/linidTree';
|
|
|
12
12
|
* @returns An object exposing tree conversion helpers.
|
|
13
13
|
*/
|
|
14
14
|
export declare function useTree(): {
|
|
15
|
-
toQTreeNodes: (nodes: TreeNode[]) => QTreeNode[];
|
|
15
|
+
toQTreeNodes: <T>(nodes: TreeNode<T>[]) => QTreeNode[];
|
|
16
16
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export { default as LinidZoneRenderer } from './components/LinidZoneRenderer.vue';
|
|
2
|
+
export { DEFAULT_DATE_FORMAT, useDayjs } from './composables/useDayjs';
|
|
2
3
|
export { useDialog } from './composables/useDialog';
|
|
3
4
|
export { useFieldValidation } from './composables/useFieldValidation';
|
|
4
5
|
export { useNotify } from './composables/useNotify';
|
|
6
|
+
export { useNunjucks } from './composables/useNunjucks';
|
|
5
7
|
export { usePagination } from './composables/usePagination';
|
|
8
|
+
export { QDATE_DEFAULT_MASK, useQuasarDate } from './composables/useQuasarDate';
|
|
6
9
|
export { useQuasarFieldValidation } from './composables/useQuasarFieldValidation';
|
|
7
10
|
export { useQuasarRules } from './composables/useQuasarRules';
|
|
8
11
|
export { useScopedI18n } from './composables/useScopedI18n';
|
|
9
|
-
export { useUiDesign } from './composables/useUiDesign';
|
|
10
12
|
export { useTree } from './composables/useTree';
|
|
13
|
+
export { useUiDesign } from './composables/useUiDesign';
|
|
11
14
|
export { useLinidConfigurationStore } from './stores/linidConfigurationStore';
|
|
12
15
|
export { useLinidUiStore } from './stores/linidUiStore';
|
|
13
|
-
export { useLinidZoneStore } from './stores/linidZoneStore';
|
|
14
16
|
export { useLinidUserStore } from './stores/linidUserStore';
|
|
17
|
+
export { useLinidZoneStore } from './stores/linidZoneStore';
|
|
18
|
+
export { getDayjsInstance, setDayjsInstance } from './services/dayjsService';
|
|
15
19
|
export { getModuleFederation, loadAsyncComponent, setModuleFederation, } from './services/federationService';
|
|
16
20
|
export { getHttpClient, setHttpClient } from './services/httpClientService';
|
|
17
21
|
export { getI18nInstance, setI18nInstance } from './services/i18nService';
|
|
@@ -29,7 +33,7 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
|
|
|
29
33
|
export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
|
|
30
34
|
export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
|
|
31
35
|
export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
|
|
32
|
-
export type { 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, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
36
|
+
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
33
37
|
export type { NavigationMenuItem } from './types/linidUi';
|
|
34
38
|
export { ModuleLifecyclePhase } from './types/moduleLifecycle';
|
|
35
39
|
export { BasicRemoteModule } from './lifecycle/skeleton';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type dayjs from 'dayjs';
|
|
2
|
+
/**
|
|
3
|
+
* Initializes the shared Dayjs instance.
|
|
4
|
+
* Should be called once by the host application during boot.
|
|
5
|
+
* @param instance - The Dayjs instance to use as the shared instance.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setDayjsInstance(instance: typeof dayjs): void;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the shared Dayjs instance.
|
|
10
|
+
* Must be called after initialization via `setDayjsInstance()`.
|
|
11
|
+
* @returns The shared Dayjs instance.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getDayjsInstance(): typeof dayjs;
|
|
@@ -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 = 'email' | '
|
|
6
|
+
export type ValidatorName = 'email' | 'min' | 'max' | 'minLength' | 'maxLength' | 'pattern' | 'unique';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Supported UI input types for attribute rendering.
|
|
3
3
|
* Each type corresponds to a specific form component.
|
|
4
4
|
*/
|
|
5
|
-
export type AttributeInputType = 'Text' | 'Number' | 'Boolean' | 'Date' | 'List' | 'DynamicList';
|
|
5
|
+
export type AttributeInputType = 'Text' | 'Number' | 'Boolean' | 'Date' | 'List' | 'DynamicList' | 'Textarea';
|
|
6
6
|
/**
|
|
7
7
|
* Describes a single attribute of an entity.
|
|
8
8
|
* Corresponds to `AttributeDescription` from the backend API.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a node in the tree structure.
|
|
3
3
|
*/
|
|
4
|
-
export type TreeNode = {
|
|
4
|
+
export type TreeNode<T> = {
|
|
5
5
|
/**
|
|
6
6
|
* The type of the node.
|
|
7
7
|
*/
|
|
@@ -11,13 +11,13 @@ export type TreeNode = {
|
|
|
11
11
|
*/
|
|
12
12
|
key: string;
|
|
13
13
|
/**
|
|
14
|
-
* The value associated with the node
|
|
14
|
+
* The value associated with the node.
|
|
15
15
|
*/
|
|
16
|
-
value:
|
|
16
|
+
value: T;
|
|
17
17
|
/**
|
|
18
18
|
* Child nodes nested under this node.
|
|
19
19
|
*/
|
|
20
|
-
nodes: TreeNode[];
|
|
20
|
+
nodes: TreeNode<T>[];
|
|
21
21
|
/**
|
|
22
22
|
* Additional actions specific to this node instance, merged with the
|
|
23
23
|
* default actions defined by the matching `TreeNodeType`.
|
|
@@ -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, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSpinnerProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, QTreeProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
1
|
+
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, 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
|
*/
|
|
@@ -140,6 +140,10 @@ declare const Q_MENU_PROPS: readonly ["contextMenu", "touchPosition", "persisten
|
|
|
140
140
|
* List of QTreeProps keys for type-safe UI design retrieval.
|
|
141
141
|
*/
|
|
142
142
|
declare const Q_TREE_PROPS: readonly ["tickStrategy", "noSelectionUnset", "defaultExpandAll", "accordion", "noTransition", "noConnectors", "color", "controlColor", "textColor", "selectedColor", "dense", "dark", "duration"];
|
|
143
|
+
/**
|
|
144
|
+
* List of QSplitterProps keys for type-safe UI design retrieval.
|
|
145
|
+
*/
|
|
146
|
+
declare const Q_SPLITTER_PROPS: readonly ["horizontal", "limits", "modelValue", "reverse", "unit", "disable", "beforeClass", "afterClass", "separatorClass", "separatorStyle", "dark"];
|
|
143
147
|
/**
|
|
144
148
|
* Maps Quasar component names to their respective props keys for UI design retrieval.
|
|
145
149
|
*/
|
|
@@ -260,6 +264,10 @@ export type LinidQMenuProps = Pick<QMenuProps, (typeof Q_MENU_PROPS)[number]>;
|
|
|
260
264
|
* Subset of QTreeProps props supported in UI design configuration.
|
|
261
265
|
*/
|
|
262
266
|
export type LinidQTreeProps = Pick<QTreeProps, (typeof Q_TREE_PROPS)[number]>;
|
|
267
|
+
/**
|
|
268
|
+
* Subset of QSplitter props supported in UI design configuration.
|
|
269
|
+
*/
|
|
270
|
+
export type LinidQSplitterProps = Pick<QSplitterProps, (typeof Q_SPLITTER_PROPS)[number]>;
|
|
263
271
|
/**
|
|
264
272
|
* Union type of all supported Quasar component props subsets.
|
|
265
273
|
*/
|
|
@@ -267,5 +275,5 @@ export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQ
|
|
|
267
275
|
/**
|
|
268
276
|
* Valid Quasar component names for type-safe UI design retrieval.
|
|
269
277
|
*/
|
|
270
|
-
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-list' | 'q-menu' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
|
|
278
|
+
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-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';
|
|
271
279
|
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.66",
|
|
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": [
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"name": "Christophe Chevalier",
|
|
35
35
|
"email": "cchevalier@linagora.com",
|
|
36
36
|
"url": "https://github.com/christophechevalier"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Adrien Céré",
|
|
40
|
+
"email": "acere@linagora.com",
|
|
41
|
+
"url": "https://github.com/Hamilcar31"
|
|
37
42
|
}
|
|
38
43
|
],
|
|
39
44
|
"license": "AGPL-3.0-only",
|