@uxland/primary-shell 3.2.6 → 3.3.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/dist/index.d.ts +1 -0
- package/dist/index.js +101 -58
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +23 -25
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/components/dialog-component.d.ts +3 -4
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/confirm-mixin.d.ts +4 -9
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/confirm.d.ts +2 -2
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/index.d.ts +1 -0
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/open-dialog.d.ts +3 -0
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/shared.d.ts +3 -0
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/typings.d.ts +11 -2
- package/dist/primary/shell/src/UI/shared-components/{primaria-menu-with-submenu/primaria-menu-with-submenu.d.ts → primaria-nav-menu/primaria-nav-menu.d.ts} +1 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-nav-menu/template.d.ts +3 -0
- package/dist/primary/shell/src/api/api.d.ts +2 -0
- package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.d.ts +16 -0
- package/dist/primary/shell/src/api/ecap-event-manager/typings.d.ts +5 -0
- package/dist/primary/shell/src/api/interaction-manager/interaction.d.ts +5 -4
- package/dist/primary/shell/src/index.d.ts +3 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/components/activity-history/activity-history.d.ts +1 -1
- package/package.json +1 -1
- package/src/UI/components/poc-events-ecap/poc-events-ecap.ts +4 -10
- package/src/UI/shared-components/primaria-interaction/components/dialog-component-styles.css +5 -2
- package/src/UI/shared-components/primaria-interaction/components/dialog-component.ts +47 -37
- package/src/UI/shared-components/primaria-interaction/confirm-mixin.ts +9 -13
- package/src/UI/shared-components/primaria-interaction/confirm.ts +5 -26
- package/src/UI/shared-components/primaria-interaction/index.ts +1 -0
- package/src/UI/shared-components/primaria-interaction/open-dialog.ts +8 -0
- package/src/UI/shared-components/primaria-interaction/shared.ts +29 -0
- package/src/UI/shared-components/primaria-interaction/typings.ts +13 -2
- package/src/UI/shared-components/{primaria-menu-with-submenu/primaria-menu-with-submenu.ts → primaria-nav-menu/primaria-nav-menu.ts} +2 -2
- package/src/UI/shared-components/{primaria-menu-with-submenu → primaria-nav-menu}/styles.css +1 -1
- package/src/UI/shared-components/{primaria-menu-with-submenu → primaria-nav-menu}/template.ts +3 -3
- package/src/api/api.ts +4 -0
- package/src/api/ecap-event-manager/ecap-event-manager.ts +34 -0
- package/src/api/ecap-event-manager/typings.ts +5 -0
- package/src/api/interaction-manager/interaction.ts +11 -6
- package/src/api/region-manager/region-manager.ts +8 -0
- package/src/index.ts +6 -4
- package/src/internal-plugins/activity-history/components/activity-history/activity-history.ts +17 -5
- package/src/internal-plugins/activity-history/components/activity-history/template.ts +2 -3
- package/src/internal-plugins/activity-history/features/export-to-pdf/handler.ts +1 -2
- package/dist/primary/shell/src/UI/shared-components/primaria-menu-with-submenu/template.d.ts +0 -3
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfirmOptions,
|
|
3
|
+
ConfirmResult,
|
|
3
4
|
CustomConfirmOptions,
|
|
5
|
+
DialogOptions,
|
|
4
6
|
NotifyOptions,
|
|
5
|
-
|
|
7
|
+
confirm,
|
|
6
8
|
notify,
|
|
9
|
+
openDialog,
|
|
7
10
|
} from "../../UI/shared-components/primaria-interaction";
|
|
8
11
|
|
|
9
12
|
export interface PrimariaInteractionManager {
|
|
10
|
-
notify(options: NotifyOptions):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
notify(options: NotifyOptions): void;
|
|
14
|
+
confirm(options: ConfirmOptions): Promise<ConfirmResult>;
|
|
15
|
+
customConfirm(options: CustomConfirmOptions): Promise<ConfirmResult>;
|
|
16
|
+
openDialog(options: DialogOptions): void;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export const createInteractionManager: () => PrimariaInteractionManager = () => {
|
|
16
20
|
return {
|
|
17
21
|
notify: (options: NotifyOptions) => notify(options),
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
confirm: (options: ConfirmOptions) => confirm(options),
|
|
23
|
+
customConfirm: (options: CustomConfirmOptions) => confirm(options),
|
|
24
|
+
openDialog: (options: DialogOptions) => openDialog(options),
|
|
20
25
|
} as PrimariaInteractionManager;
|
|
21
26
|
};
|
|
@@ -102,6 +102,14 @@ class RegionManagerProxy implements PrimariaRegionManager {
|
|
|
102
102
|
);
|
|
103
103
|
return Promise.resolve();
|
|
104
104
|
}
|
|
105
|
+
registerNavigationMenu(view: HarmonixViewDefinition): Promise<void> {
|
|
106
|
+
this.regionManager.registerViewWithRegion(
|
|
107
|
+
shellRegions.navigationMenu,
|
|
108
|
+
`${this.pluginInfo.pluginId}::${view.id}`,
|
|
109
|
+
view,
|
|
110
|
+
);
|
|
111
|
+
return Promise.resolve();
|
|
112
|
+
}
|
|
105
113
|
registerMainView(view: HarmonixViewDefinition): Promise<void> {
|
|
106
114
|
this.regionManager.registerViewWithRegion(
|
|
107
115
|
shellRegions.main,
|
package/src/index.ts
CHANGED
|
@@ -7,9 +7,11 @@ export * from "./api/broker/primaria-broker";
|
|
|
7
7
|
import "./UI/index";
|
|
8
8
|
export { PrimariaMenuItem } from "./UI/shared-components/primaria-menu-item/primaria-menu-item";
|
|
9
9
|
export { confirmMixin } from "./UI/shared-components/primaria-interaction";
|
|
10
|
-
export type {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export type { CustomConfirmOptions } from "./UI/shared-components/primaria-interaction";
|
|
11
|
+
export {
|
|
12
|
+
EcapEventManager,
|
|
13
|
+
createEcapEventManager,
|
|
14
|
+
} from "./api/ecap-event-manager/ecap-event-manager";
|
|
15
|
+
export type { IEcapEvent } from "./api/ecap-event-manager/typings";
|
|
14
16
|
export * from "./internal-plugins";
|
|
15
17
|
export * from "@uxland/harmonix-adapters";
|
package/src/internal-plugins/activity-history/components/activity-history/activity-history.ts
CHANGED
|
@@ -31,6 +31,10 @@ export class ActivityHistory extends PrimariaRegionHost(LitElement) {
|
|
|
31
31
|
this.api.broker.subscribe(shellEvents.openClinicalMonitoringRequested, () => {
|
|
32
32
|
this.maximized = false;
|
|
33
33
|
});
|
|
34
|
+
const searchBar = this.shadowRoot?.querySelector("dss-search-bar");
|
|
35
|
+
if (searchBar) {
|
|
36
|
+
searchBar.addEventListener("onSearchChange", this._handleSearchChange);
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
firstUpdated(_changedProperties) {
|
|
@@ -38,9 +42,9 @@ export class ActivityHistory extends PrimariaRegionHost(LitElement) {
|
|
|
38
42
|
this.shadowRoot.querySelector("dss-datepicker")?.addEventListener("onValueChange", (e) => {
|
|
39
43
|
this._handleSelectDate(e.detail);
|
|
40
44
|
});
|
|
41
|
-
this.shadowRoot.querySelector("dss-search-bar")?.addEventListener("onSearchChange", (e) => {
|
|
42
|
-
|
|
43
|
-
});
|
|
45
|
+
// this.shadowRoot.querySelector("dss-search-bar")?.addEventListener("onSearchChange", (e) => {
|
|
46
|
+
// this._handleSearchChange(e.detail);
|
|
47
|
+
// });
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
@property({ type: Boolean })
|
|
@@ -80,8 +84,16 @@ export class ActivityHistory extends PrimariaRegionHost(LitElement) {
|
|
|
80
84
|
this.maximized = false;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
_handleSearchChange(event) {
|
|
88
|
+
const selectedItems = event.detail || [];
|
|
89
|
+
const searchQuery = selectedItems.length > 0 ? selectedItems.join(" ") : "";
|
|
90
|
+
console.log(searchQuery);
|
|
91
|
+
|
|
92
|
+
if (searchQuery.length > 2) {
|
|
93
|
+
this.api.broker.send(new SearchActivityHistoryItems(searchQuery));
|
|
94
|
+
} else {
|
|
95
|
+
console.log("query too short");
|
|
96
|
+
}
|
|
85
97
|
}
|
|
86
98
|
|
|
87
99
|
_handleSelectDate(date: string) {
|
|
@@ -12,11 +12,10 @@ export const template = (props: ActivityHistory) =>
|
|
|
12
12
|
: html`<div class="header">
|
|
13
13
|
<div class="header__left">
|
|
14
14
|
<div class="title">${translate("activityHistory")}</div>
|
|
15
|
-
<
|
|
16
|
-
<!-- <dss-search-bar icon="search" inputsize="md" threshold="3" recentsearchestext="" emptydropdowntext="Sense resultats per">
|
|
15
|
+
<dss-search-bar @onSearchChange=${props._handleSearchChange} icon="search" inputsize="md" threshold="2" recentsearchestext="" emptydropdowntext="">
|
|
17
16
|
<label slot="label" for="searchbar1" aria-hidden="false"></label>
|
|
18
17
|
<input slot="input" id="searchbar1" type="text">
|
|
19
|
-
</dss-search-bar>
|
|
18
|
+
</dss-search-bar>
|
|
20
19
|
<dss-datepicker inputsize="md" class="date-picker">
|
|
21
20
|
<label slot="label" for="myDatepicker">${translate("goToDate")}</label>
|
|
22
21
|
<input slot="input" id="myDatepicker" type="text" class="dss-input">
|
|
@@ -7,11 +7,10 @@ export class ExportToPdfHandler {
|
|
|
7
7
|
constructor(@inject(TYPES.primaryApi) private api: PrimariaApi) {}
|
|
8
8
|
async handle() {
|
|
9
9
|
try {
|
|
10
|
-
this.api.interactionManager.
|
|
10
|
+
this.api.interactionManager.customConfirm({
|
|
11
11
|
title: "Exportar a PDF",
|
|
12
12
|
componentConstructor: ExportPdfModal,
|
|
13
13
|
type: "info",
|
|
14
|
-
modal: true,
|
|
15
14
|
cancelLabel: "Cancel·lar",
|
|
16
15
|
acceptLabel: "Exportar",
|
|
17
16
|
});
|