@uxland/primary-shell 1.1.0 → 2.0.1-rc.0
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 +1 -0
- package/dist/UI/components/clinical-monitoring/clinical-monitoring.d.ts +11 -0
- package/dist/UI/components/clinical-monitoring/template.d.ts +3 -0
- package/dist/UI/components/index.d.ts +1 -0
- package/dist/UI/components/primaria-breadcumbs/primaria-breadcumbs.d.ts +9 -0
- package/dist/UI/components/primaria-breadcumbs/template.d.ts +3 -0
- package/dist/UI/components/primaria-shell/primaria-shell.d.ts +14 -0
- package/dist/UI/components/primaria-shell/template.d.ts +3 -0
- package/dist/UI/components/title-view/template.d.ts +3 -0
- package/dist/UI/components/title-view/title-view.d.ts +9 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/shared-components/dss-container/dss-container.d.ts +7 -0
- package/dist/UI/shared-components/index.d.ts +2 -0
- package/dist/UI/shared-components/primaria-content-switcher/primaria-content-switcher.d.ts +14 -0
- package/dist/UI/shared-components/primaria-interaction/components/dialog-component.d.ts +20 -0
- package/dist/UI/shared-components/primaria-interaction/components/notifier-component.d.ts +12 -0
- package/dist/UI/shared-components/primaria-interaction/confirm-mixin.d.ts +16 -0
- package/dist/UI/shared-components/primaria-interaction/confirm.d.ts +3 -0
- package/dist/UI/shared-components/primaria-interaction/index.d.ts +4 -0
- package/dist/UI/shared-components/primaria-interaction/notify.d.ts +4 -0
- package/dist/UI/shared-components/primaria-interaction/typings.d.ts +28 -0
- package/dist/UI/shared-components/primaria-menu-item/primaria-menu-item.d.ts +10 -0
- package/dist/UI/shared-components/primaria-menu-item/template.d.ts +3 -0
- package/dist/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.d.ts +57 -0
- package/dist/UI/shared-components/primaria-text-editor/template.d.ts +1 -0
- package/dist/UI/shared-components/primaria-text-editor/utils.d.ts +1 -0
- package/dist/api/api.d.ts +27 -0
- package/dist/api/broker/factory.d.ts +3 -0
- package/dist/api/broker/factory.test.d.ts +1 -0
- package/dist/api/broker/primaria-broker.d.ts +5 -0
- package/dist/api/global-state/global-state.d.ts +35 -0
- package/dist/api/global-state/global-state.test.d.ts +1 -0
- package/dist/api/interaction-manager/interaction.d.ts +8 -0
- package/dist/api/localization/localization.test.d.ts +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +26659 -224
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +8659 -0
- package/dist/index.umd.cjs.map +1 -0
- package/dist/initializer.d.ts +1 -0
- package/dist/locales.d.ts +15 -0
- package/dist/plugin.d.ts +6 -0
- package/dist/region-manager.d.ts +17 -0
- package/dist/regions.d.ts +14 -0
- package/package.json +31 -25
- package/src/UI/components/clinical-monitoring/clinical-monitoring.ts +28 -0
- package/src/UI/components/clinical-monitoring/styles.scss +29 -0
- package/src/UI/components/clinical-monitoring/template.ts +12 -0
- package/src/UI/components/index.ts +5 -0
- package/src/UI/components/primaria-breadcumbs/primaria-breadcumbs.ts +27 -0
- package/src/UI/components/primaria-breadcumbs/styles.scss +25 -0
- package/src/UI/components/primaria-breadcumbs/template.ts +15 -0
- package/src/UI/components/primaria-shell/primaria-shell.ts +37 -0
- package/src/UI/components/primaria-shell/styles.scss +68 -0
- package/src/UI/components/primaria-shell/template.ts +36 -0
- package/src/UI/components/title-view/styles.scss +5 -0
- package/src/UI/components/title-view/template.ts +6 -0
- package/src/UI/components/title-view/title-view.ts +23 -0
- package/src/UI/images/Gencat_Logotip.svg +70 -0
- package/src/UI/images/Salut_Logotip.svg +8 -0
- package/src/UI/index.ts +2 -0
- package/src/UI/shared-components/design-system.css +1 -0
- package/src/UI/shared-components/dss-container/dss-container.ts +32 -0
- package/src/UI/shared-components/dss-container/styles.scss +23 -0
- package/src/UI/shared-components/index.ts +5 -0
- package/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.ts +79 -0
- package/src/UI/shared-components/primaria-interaction/components/dialog-component-styles.scss +155 -0
- package/src/UI/shared-components/primaria-interaction/components/dialog-component.ts +120 -0
- package/src/UI/shared-components/primaria-interaction/components/notifier-component-styles.scss +128 -0
- package/src/UI/shared-components/primaria-interaction/components/notifier-component.ts +73 -0
- package/src/UI/shared-components/primaria-interaction/confirm-mixin.ts +39 -0
- package/src/UI/shared-components/primaria-interaction/confirm.ts +30 -0
- package/src/UI/shared-components/primaria-interaction/index.ts +4 -0
- package/src/UI/shared-components/primaria-interaction/notify.ts +153 -0
- package/src/UI/shared-components/primaria-interaction/typings.ts +32 -0
- package/src/UI/shared-components/primaria-menu-item/primaria-menu-item.ts +25 -0
- package/src/UI/shared-components/primaria-menu-item/styles.scss +10 -0
- package/src/UI/shared-components/primaria-menu-item/template.ts +8 -0
- package/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.ts +230 -0
- package/src/UI/shared-components/primaria-text-editor/styles.scss +972 -0
- package/src/UI/shared-components/primaria-text-editor/template.ts +8 -0
- package/src/UI/shared-components/primaria-text-editor/utils.ts +39 -0
- package/src/UI/styles/_flex-layout.scss +203 -0
- package/src/UI/styles/_normalize.scss +3 -0
- package/src/UI/styles/_variables.scss +40 -0
- package/src/UI/styles/styles.scss +3 -0
- package/src/api/api.ts +63 -0
- package/src/api/broker/factory.test.ts +124 -0
- package/src/api/broker/factory.ts +122 -0
- package/src/api/broker/primaria-broker.ts +11 -0
- package/src/api/global-state/global-state.test.ts +53 -0
- package/src/api/global-state/global-state.ts +49 -0
- package/src/api/interaction-manager/interaction.ts +21 -0
- package/src/api/localization/localization.test.ts +61 -0
- package/src/api/localization/localization.ts +54 -0
- package/src/constants.ts +2 -0
- package/src/index.ts +12 -0
- package/src/initializer.ts +37 -4
- package/src/locales.ts +24 -0
- package/src/plugin.ts +9 -0
- package/src/region-manager.ts +155 -0
- package/src/regions.ts +17 -6
- package/dist/index.mjs +0 -3209
- package/index.ts +0 -3
- package/src/primary-shell.ts +0 -78
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Full Harmonix and Primaria Shell Documentation here: https://doc.clickup.com/9012015559/d/h/8cjgwe7-2192/bc9e680ac3c7b52
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRegion } from '@uxland/regions';
|
|
2
|
+
|
|
3
|
+
declare const ClinicalMonitoring_base: any;
|
|
4
|
+
export declare class ClinicalMonitoring extends ClinicalMonitoring_base {
|
|
5
|
+
render(): import('lit').TemplateResult<1>;
|
|
6
|
+
static styles: import('lit').CSSResult;
|
|
7
|
+
sidebarRegion: IRegion | undefined;
|
|
8
|
+
headerRegion: IRegion | undefined;
|
|
9
|
+
contentRegion: IRegion | undefined;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare class PrimariaBreadcumbs extends LitElement {
|
|
4
|
+
render(): import('lit').TemplateResult<1>;
|
|
5
|
+
static styles: import('lit').CSSResult;
|
|
6
|
+
breadcumbs: any[];
|
|
7
|
+
callbackFn: () => void;
|
|
8
|
+
_breadcumbClick(breadcumb: any): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IRegion } from '@uxland/regions';
|
|
2
|
+
|
|
3
|
+
declare const PrimariaShell_base: any;
|
|
4
|
+
export declare class PrimariaShell extends PrimariaShell_base {
|
|
5
|
+
render(): import('lit').TemplateResult<1>;
|
|
6
|
+
static styles: import('lit').CSSResult;
|
|
7
|
+
headerRegion: IRegion | undefined;
|
|
8
|
+
headerActionsRegion: IRegion | undefined;
|
|
9
|
+
menuRegion: IRegion | undefined;
|
|
10
|
+
mainRegion: IRegion | undefined;
|
|
11
|
+
quickActionsRegion: IRegion | undefined;
|
|
12
|
+
floatingRegion: IRegion | undefined;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare class PrimariaContentSwitcher extends LitElement {
|
|
4
|
+
render(): import('lit').TemplateResult<1>;
|
|
5
|
+
static styles: import('lit').CSSResult;
|
|
6
|
+
selected: any;
|
|
7
|
+
attrForSelected: string;
|
|
8
|
+
animation: string;
|
|
9
|
+
updated(props: any): any;
|
|
10
|
+
get items(): HTMLCollection;
|
|
11
|
+
selectIndex(): number;
|
|
12
|
+
select(): void;
|
|
13
|
+
doAnimation(item: any): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { IConfirmMixin } from '../confirm-mixin';
|
|
3
|
+
import { ConfirmOptions, CustomConfirmOptions } from '../typings';
|
|
4
|
+
|
|
5
|
+
export declare class DialogComponent extends LitElement {
|
|
6
|
+
render(): import('lit').TemplateResult<1>;
|
|
7
|
+
static get styles(): import('lit').CSSResult;
|
|
8
|
+
options: ConfirmOptions & CustomConfirmOptions;
|
|
9
|
+
modal: any;
|
|
10
|
+
_cancel(e: any): void;
|
|
11
|
+
_accept(e: any): void;
|
|
12
|
+
componentCloseRequest(e: CustomEvent): void;
|
|
13
|
+
close(result: boolean): Promise<void>;
|
|
14
|
+
getCustomComponent(): IConfirmMixin | any;
|
|
15
|
+
acceptButton: HTMLElement;
|
|
16
|
+
actionsContainer: HTMLElement;
|
|
17
|
+
header: HTMLElement;
|
|
18
|
+
content: HTMLElement;
|
|
19
|
+
show(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { NotifyOptions } from '../typings';
|
|
3
|
+
|
|
4
|
+
export declare class NotifierComponent extends LitElement {
|
|
5
|
+
render(): import('lit').TemplateResult<1>;
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
options: NotifyOptions;
|
|
8
|
+
snackbar: HTMLElement;
|
|
9
|
+
show(): void;
|
|
10
|
+
clearAndUpdateOrder(order: string): void;
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { Constructor } from './typings';
|
|
3
|
+
|
|
4
|
+
export interface IConfirmMixin {
|
|
5
|
+
model: any;
|
|
6
|
+
close(result: boolean): void;
|
|
7
|
+
canAccept(): Promise<boolean> | boolean;
|
|
8
|
+
accept(): Promise<void> | void;
|
|
9
|
+
}
|
|
10
|
+
export declare class ConfirmMixinBase {
|
|
11
|
+
model: any;
|
|
12
|
+
close(result: boolean): void;
|
|
13
|
+
canAccept(): Promise<boolean> | boolean;
|
|
14
|
+
accept(): Promise<void> | void;
|
|
15
|
+
}
|
|
16
|
+
export declare function confirmMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<ConfirmMixinBase> & T;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare type Constructor<T = Record<string, unknown>> = new (...args: any[]) => T;
|
|
4
|
+
export interface ConfirmOptions {
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
type: ConfirmType;
|
|
8
|
+
acceptLabel: string;
|
|
9
|
+
cancelLabel: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CustomConfirmOptions<T = any> {
|
|
12
|
+
title: string;
|
|
13
|
+
componentConstructor: Constructor<LitElement | any>;
|
|
14
|
+
type: ConfirmType;
|
|
15
|
+
acceptLabel?: string;
|
|
16
|
+
cancelLabel?: string;
|
|
17
|
+
model?: T;
|
|
18
|
+
}
|
|
19
|
+
export type ConfirmType = "danger" | "warning" | "info" | "success";
|
|
20
|
+
export interface NotifyOptions {
|
|
21
|
+
message?: string;
|
|
22
|
+
type?: NotifyType;
|
|
23
|
+
position?: NotifyPosition;
|
|
24
|
+
order?: string;
|
|
25
|
+
}
|
|
26
|
+
export type NotifyOrder = "first" | "second" | "third" | "fourth" | "fifth";
|
|
27
|
+
export type NotifyPosition = "bottom" | "center" | "top";
|
|
28
|
+
export type NotifyType = "danger" | "warning" | "info" | "success" | "error";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare class PrimariaMenuItem extends LitElement {
|
|
4
|
+
constructor(icon: string, label: string, callbackFn: () => void);
|
|
5
|
+
render(): import('lit').TemplateResult<1>;
|
|
6
|
+
static styles: import('lit').CSSResult;
|
|
7
|
+
icon: string;
|
|
8
|
+
label: string;
|
|
9
|
+
callbackFn: () => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { default as Quill } from 'uxl-quill/dist/quill';
|
|
3
|
+
|
|
4
|
+
export declare class PrimariaRichTextEditor extends LitElement {
|
|
5
|
+
render(): import('lit').TemplateResult<1>;
|
|
6
|
+
static styles: import('lit').CSSResult;
|
|
7
|
+
firstUpdated(): void;
|
|
8
|
+
quill: Quill | null;
|
|
9
|
+
options: string;
|
|
10
|
+
range: {
|
|
11
|
+
index: number;
|
|
12
|
+
length: number;
|
|
13
|
+
};
|
|
14
|
+
availableOptions: string[];
|
|
15
|
+
availableFormats: string[];
|
|
16
|
+
formats: string;
|
|
17
|
+
_getOptions(): {
|
|
18
|
+
modules: {
|
|
19
|
+
toolbar: {
|
|
20
|
+
container: never[];
|
|
21
|
+
handlers: {
|
|
22
|
+
redo(): void;
|
|
23
|
+
undo(): void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
history: {
|
|
27
|
+
delay: number;
|
|
28
|
+
maxStack: number;
|
|
29
|
+
userOnly: boolean;
|
|
30
|
+
};
|
|
31
|
+
keyboard: {
|
|
32
|
+
bindings: {
|
|
33
|
+
indent: {
|
|
34
|
+
key: string;
|
|
35
|
+
format: string[];
|
|
36
|
+
handler(range: any, context: any): boolean;
|
|
37
|
+
};
|
|
38
|
+
"list autofill": {
|
|
39
|
+
key: string;
|
|
40
|
+
shiftKey: null;
|
|
41
|
+
collapsed: boolean;
|
|
42
|
+
format: {
|
|
43
|
+
"code-block": boolean;
|
|
44
|
+
blockquote: boolean;
|
|
45
|
+
table: boolean;
|
|
46
|
+
};
|
|
47
|
+
prefix: RegExp;
|
|
48
|
+
handler(range: any, context: any): boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
theme: string;
|
|
54
|
+
formats: string[];
|
|
55
|
+
};
|
|
56
|
+
getCursorPosition(): any;
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const template: (props: any) => import('lit').TemplateResult<1>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fixSpellCheckerIssue: (Quill: any) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApiFactory, HarmonixApi } from '@uxland/harmonix';
|
|
2
|
+
import { PrimariaRegionManager } from '../region-manager';
|
|
3
|
+
import { PrimariaInteractionManager } from './interaction-manager/interaction';
|
|
4
|
+
import { PrimariaGlobalStateManager } from './global-state/global-state';
|
|
5
|
+
import { PrimariaBroker } from './broker/primaria-broker';
|
|
6
|
+
|
|
7
|
+
interface PrimariaHttpClient {
|
|
8
|
+
get(url: string): Promise<any>;
|
|
9
|
+
post(url: string, data: any): Promise<any>;
|
|
10
|
+
}
|
|
11
|
+
export interface PrimariaApi extends HarmonixApi {
|
|
12
|
+
httpClient: PrimariaHttpClient;
|
|
13
|
+
interactionManager: PrimariaInteractionManager;
|
|
14
|
+
broker: PrimariaBroker;
|
|
15
|
+
regionManager: PrimariaRegionManager;
|
|
16
|
+
globalStateManager: PrimariaGlobalStateManager;
|
|
17
|
+
}
|
|
18
|
+
export declare const PrimariaRegionHost: any;
|
|
19
|
+
/**
|
|
20
|
+
* Factory function that creates a Primaria API instance.
|
|
21
|
+
*
|
|
22
|
+
* @param {PluginInfo} pluginInfo - Information about the plugin
|
|
23
|
+
* @return {PrimariaApi} The created Primaria API instance
|
|
24
|
+
*/
|
|
25
|
+
export declare const primariaApiFactory: ApiFactory<PrimariaApi>;
|
|
26
|
+
export declare const shellApi: PrimariaApi;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
|
+
|
|
3
|
+
export declare abstract class PrimariaGlobalStateManager {
|
|
4
|
+
abstract setData(key: string, value: any): void;
|
|
5
|
+
abstract getData(key: string): any;
|
|
6
|
+
abstract clearData(): void;
|
|
7
|
+
}
|
|
8
|
+
declare class PrimariaGlobalStateManagerImpl implements PrimariaGlobalStateManager {
|
|
9
|
+
broker: PrimariaBroker;
|
|
10
|
+
private state;
|
|
11
|
+
constructor(broker: PrimariaBroker);
|
|
12
|
+
/**
|
|
13
|
+
* Sets the value of a key in the state object and publishes an event with the event bus.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} key - The key to set the value for.
|
|
16
|
+
* @param {any} value - The value to set for the key.
|
|
17
|
+
* @return {void} This function does not return anything.
|
|
18
|
+
*/
|
|
19
|
+
setData(key: string, value: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves the value associated with the specified key from the state object.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} key - The key to retrieve the value for.
|
|
24
|
+
* @return {any} The value associated with the specified key, or undefined if the key does not exist in the state object.
|
|
25
|
+
*/
|
|
26
|
+
getData(key: string): any;
|
|
27
|
+
/**
|
|
28
|
+
* Clears all data stored in the state object.
|
|
29
|
+
*
|
|
30
|
+
* @return {void} This function does not return anything.
|
|
31
|
+
*/
|
|
32
|
+
clearData(): void;
|
|
33
|
+
}
|
|
34
|
+
export declare const createGlobalStateManager: (broker: PrimariaBroker) => PrimariaGlobalStateManagerImpl;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfirmOptions, CustomConfirmOptions, NotifyOptions } from '../../UI/shared-components/primaria-interaction';
|
|
2
|
+
|
|
3
|
+
export interface PrimariaInteractionManager {
|
|
4
|
+
notify(options: NotifyOptions): Promise<any>;
|
|
5
|
+
doConfirm(options: ConfirmOptions): Promise<boolean>;
|
|
6
|
+
doCustomConfirm(options: CustomConfirmOptions): Promise<boolean>;
|
|
7
|
+
}
|
|
8
|
+
export declare const createInteractionManager: () => PrimariaInteractionManager;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './initializer';
|
|
2
|
+
export * from './regions';
|
|
3
|
+
export * from './plugin';
|
|
4
|
+
export * from './api/api';
|
|
5
|
+
export * from './api/broker/primaria-broker';
|
|
6
|
+
export { PrimariaMenuItem } from './UI/shared-components/primaria-menu-item/primaria-menu-item';
|
|
7
|
+
export { confirmMixin } from './UI/shared-components/primaria-interaction';
|
|
8
|
+
export type { IConfirmMixin, CustomConfirmOptions, } from './UI/shared-components/primaria-interaction';
|