@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.
Files changed (106) hide show
  1. package/README.md +1 -0
  2. package/dist/UI/components/clinical-monitoring/clinical-monitoring.d.ts +11 -0
  3. package/dist/UI/components/clinical-monitoring/template.d.ts +3 -0
  4. package/dist/UI/components/index.d.ts +1 -0
  5. package/dist/UI/components/primaria-breadcumbs/primaria-breadcumbs.d.ts +9 -0
  6. package/dist/UI/components/primaria-breadcumbs/template.d.ts +3 -0
  7. package/dist/UI/components/primaria-shell/primaria-shell.d.ts +14 -0
  8. package/dist/UI/components/primaria-shell/template.d.ts +3 -0
  9. package/dist/UI/components/title-view/template.d.ts +3 -0
  10. package/dist/UI/components/title-view/title-view.d.ts +9 -0
  11. package/dist/UI/index.d.ts +2 -0
  12. package/dist/UI/shared-components/dss-container/dss-container.d.ts +7 -0
  13. package/dist/UI/shared-components/index.d.ts +2 -0
  14. package/dist/UI/shared-components/primaria-content-switcher/primaria-content-switcher.d.ts +14 -0
  15. package/dist/UI/shared-components/primaria-interaction/components/dialog-component.d.ts +20 -0
  16. package/dist/UI/shared-components/primaria-interaction/components/notifier-component.d.ts +12 -0
  17. package/dist/UI/shared-components/primaria-interaction/confirm-mixin.d.ts +16 -0
  18. package/dist/UI/shared-components/primaria-interaction/confirm.d.ts +3 -0
  19. package/dist/UI/shared-components/primaria-interaction/index.d.ts +4 -0
  20. package/dist/UI/shared-components/primaria-interaction/notify.d.ts +4 -0
  21. package/dist/UI/shared-components/primaria-interaction/typings.d.ts +28 -0
  22. package/dist/UI/shared-components/primaria-menu-item/primaria-menu-item.d.ts +10 -0
  23. package/dist/UI/shared-components/primaria-menu-item/template.d.ts +3 -0
  24. package/dist/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.d.ts +57 -0
  25. package/dist/UI/shared-components/primaria-text-editor/template.d.ts +1 -0
  26. package/dist/UI/shared-components/primaria-text-editor/utils.d.ts +1 -0
  27. package/dist/api/api.d.ts +27 -0
  28. package/dist/api/broker/factory.d.ts +3 -0
  29. package/dist/api/broker/factory.test.d.ts +1 -0
  30. package/dist/api/broker/primaria-broker.d.ts +5 -0
  31. package/dist/api/global-state/global-state.d.ts +35 -0
  32. package/dist/api/global-state/global-state.test.d.ts +1 -0
  33. package/dist/api/interaction-manager/interaction.d.ts +8 -0
  34. package/dist/api/localization/localization.test.d.ts +1 -0
  35. package/dist/constants.d.ts +2 -0
  36. package/dist/index.d.ts +8 -0
  37. package/dist/index.js +26659 -224
  38. package/dist/index.js.map +1 -0
  39. package/dist/index.umd.cjs +8659 -0
  40. package/dist/index.umd.cjs.map +1 -0
  41. package/dist/initializer.d.ts +1 -0
  42. package/dist/locales.d.ts +15 -0
  43. package/dist/plugin.d.ts +6 -0
  44. package/dist/region-manager.d.ts +17 -0
  45. package/dist/regions.d.ts +14 -0
  46. package/package.json +31 -25
  47. package/src/UI/components/clinical-monitoring/clinical-monitoring.ts +28 -0
  48. package/src/UI/components/clinical-monitoring/styles.scss +29 -0
  49. package/src/UI/components/clinical-monitoring/template.ts +12 -0
  50. package/src/UI/components/index.ts +5 -0
  51. package/src/UI/components/primaria-breadcumbs/primaria-breadcumbs.ts +27 -0
  52. package/src/UI/components/primaria-breadcumbs/styles.scss +25 -0
  53. package/src/UI/components/primaria-breadcumbs/template.ts +15 -0
  54. package/src/UI/components/primaria-shell/primaria-shell.ts +37 -0
  55. package/src/UI/components/primaria-shell/styles.scss +68 -0
  56. package/src/UI/components/primaria-shell/template.ts +36 -0
  57. package/src/UI/components/title-view/styles.scss +5 -0
  58. package/src/UI/components/title-view/template.ts +6 -0
  59. package/src/UI/components/title-view/title-view.ts +23 -0
  60. package/src/UI/images/Gencat_Logotip.svg +70 -0
  61. package/src/UI/images/Salut_Logotip.svg +8 -0
  62. package/src/UI/index.ts +2 -0
  63. package/src/UI/shared-components/design-system.css +1 -0
  64. package/src/UI/shared-components/dss-container/dss-container.ts +32 -0
  65. package/src/UI/shared-components/dss-container/styles.scss +23 -0
  66. package/src/UI/shared-components/index.ts +5 -0
  67. package/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.ts +79 -0
  68. package/src/UI/shared-components/primaria-interaction/components/dialog-component-styles.scss +155 -0
  69. package/src/UI/shared-components/primaria-interaction/components/dialog-component.ts +120 -0
  70. package/src/UI/shared-components/primaria-interaction/components/notifier-component-styles.scss +128 -0
  71. package/src/UI/shared-components/primaria-interaction/components/notifier-component.ts +73 -0
  72. package/src/UI/shared-components/primaria-interaction/confirm-mixin.ts +39 -0
  73. package/src/UI/shared-components/primaria-interaction/confirm.ts +30 -0
  74. package/src/UI/shared-components/primaria-interaction/index.ts +4 -0
  75. package/src/UI/shared-components/primaria-interaction/notify.ts +153 -0
  76. package/src/UI/shared-components/primaria-interaction/typings.ts +32 -0
  77. package/src/UI/shared-components/primaria-menu-item/primaria-menu-item.ts +25 -0
  78. package/src/UI/shared-components/primaria-menu-item/styles.scss +10 -0
  79. package/src/UI/shared-components/primaria-menu-item/template.ts +8 -0
  80. package/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.ts +230 -0
  81. package/src/UI/shared-components/primaria-text-editor/styles.scss +972 -0
  82. package/src/UI/shared-components/primaria-text-editor/template.ts +8 -0
  83. package/src/UI/shared-components/primaria-text-editor/utils.ts +39 -0
  84. package/src/UI/styles/_flex-layout.scss +203 -0
  85. package/src/UI/styles/_normalize.scss +3 -0
  86. package/src/UI/styles/_variables.scss +40 -0
  87. package/src/UI/styles/styles.scss +3 -0
  88. package/src/api/api.ts +63 -0
  89. package/src/api/broker/factory.test.ts +124 -0
  90. package/src/api/broker/factory.ts +122 -0
  91. package/src/api/broker/primaria-broker.ts +11 -0
  92. package/src/api/global-state/global-state.test.ts +53 -0
  93. package/src/api/global-state/global-state.ts +49 -0
  94. package/src/api/interaction-manager/interaction.ts +21 -0
  95. package/src/api/localization/localization.test.ts +61 -0
  96. package/src/api/localization/localization.ts +54 -0
  97. package/src/constants.ts +2 -0
  98. package/src/index.ts +12 -0
  99. package/src/initializer.ts +37 -4
  100. package/src/locales.ts +24 -0
  101. package/src/plugin.ts +9 -0
  102. package/src/region-manager.ts +155 -0
  103. package/src/regions.ts +17 -6
  104. package/dist/index.mjs +0 -3209
  105. package/index.ts +0 -3
  106. 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,3 @@
1
+ import { ClinicalMonitoring } from './clinical-monitoring';
2
+
3
+ export declare const template: (props: ClinicalMonitoring) => import('lit').TemplateResult<1>;
@@ -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,3 @@
1
+ import { PrimariaBreadcumbs } from './primaria-breadcumbs';
2
+
3
+ export declare const template: (props: PrimariaBreadcumbs) => import('lit').TemplateResult<1>;
@@ -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,3 @@
1
+ import { PrimariaShell } from './primaria-shell';
2
+
3
+ export declare const template: (props: PrimariaShell) => import('lit').TemplateResult<1>;
@@ -0,0 +1,3 @@
1
+ import { TitleView } from './title-view';
2
+
3
+ export declare const template: (props: TitleView) => import('lit').TemplateResult<1>;
@@ -0,0 +1,9 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ export declare class TitleView extends LitElement {
4
+ private titleText;
5
+ constructor(titleText: string);
6
+ render(): import('lit').TemplateResult<1>;
7
+ static styles: import('lit').CSSResult;
8
+ title: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './shared-components';
@@ -0,0 +1,7 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ export declare class DssContainer extends LitElement {
4
+ render(): import('lit').TemplateResult<1>;
5
+ firstUpdated(): void;
6
+ static styles: import('lit').CSSResult;
7
+ }
@@ -0,0 +1,2 @@
1
+
2
+ export * from './primaria-interaction';
@@ -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,3 @@
1
+ import { ConfirmOptions, CustomConfirmOptions } from './typings';
2
+
3
+ export declare const doConfirm: (options: (ConfirmOptions & CustomConfirmOptions) | any) => Promise<any>;
@@ -0,0 +1,4 @@
1
+ export * from './confirm';
2
+ export * from './notify';
3
+ export * from './confirm-mixin';
4
+ export * from './typings';
@@ -0,0 +1,4 @@
1
+ import { NotifyOptions } from './typings';
2
+
3
+ export declare function generateId(): string;
4
+ export declare const notify: (options: NotifyOptions) => void;
@@ -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,3 @@
1
+ import { PrimariaMenuItem } from './primaria-menu-item';
2
+
3
+ export declare const template: (props: PrimariaMenuItem) => import('lit').TemplateResult<1>;
@@ -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,3 @@
1
+ import { PrimariaBroker } from './primaria-broker';
2
+
3
+ export declare const createBroker: () => PrimariaBroker;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { HarmonixBroker } from '@uxland/harmonix';
2
+
3
+ export interface PrimariaBroker extends HarmonixBroker {
4
+ }
5
+ export type { HarmonixBroker, IEvent, IEventClass, IRequest, IRequestClass, } from '@uxland/harmonix';
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ export declare const primariaShellId = "primaria-shell";
2
+ export declare const clinicalMonitoringId = "clinical-monitoring";
@@ -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';