@uxland/primary-shell 5.6.0 → 5.6.2
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.js +71 -59
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +19 -19
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/features/utils.d.ts +1 -2
- package/package.json +1 -1
- package/src/UI/components/primaria-shell/styles.css +1 -5
- package/src/UI/shared-components/primaria-text-editor/styles.css +0 -3
- package/src/features/utils.ts +3 -3
- package/src/features/visit/get-visit-id/handler.ts +0 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/template.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/template.ts +4 -4
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-value/reducer.ts +6 -0
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/main-view/template.ts +1 -1
|
@@ -2,7 +2,6 @@ import { Container, interfaces } from 'inversify';
|
|
|
2
2
|
import { IRequestClass } from '..';
|
|
3
3
|
import { PrimariaApi } from '../api/api';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
export declare const registerRequest: (api: PrimariaApi, container: Container) => (command: IRequestClass<any>, handler: Newable<any>) => {
|
|
5
|
+
export declare const registerRequest: (api: PrimariaApi, container: Container) => (command: IRequestClass<any>, handler: interfaces.Newable<any>) => {
|
|
7
6
|
dispose: () => void;
|
|
8
7
|
};
|
package/package.json
CHANGED
|
@@ -57,16 +57,13 @@
|
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-direction: column;
|
|
59
59
|
gap: 4px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/*Temporary scrollbar*/
|
|
63
|
-
#menu-region-container {
|
|
64
60
|
overflow-y: auto;
|
|
65
61
|
margin-right: -14px;
|
|
66
62
|
padding-right: 14px;
|
|
67
63
|
scrollbar-color: var(--color-primary-200) var(--color-primary-700);
|
|
68
64
|
scrollbar-width: thin;
|
|
69
65
|
}
|
|
66
|
+
|
|
70
67
|
#menu-region-container::-webkit-scrollbar {
|
|
71
68
|
width: 6px;
|
|
72
69
|
}
|
|
@@ -77,7 +74,6 @@
|
|
|
77
74
|
background-color: var(--color-primary-400);
|
|
78
75
|
border-radius: 4px;
|
|
79
76
|
}
|
|
80
|
-
/**/
|
|
81
77
|
|
|
82
78
|
.bottom-content {
|
|
83
79
|
display: flex;
|
package/src/features/utils.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Container, injectable
|
|
1
|
+
import { Container, injectable } from "inversify";
|
|
2
|
+
import type { interfaces } from "inversify";
|
|
2
3
|
import { IRequest, IRequestClass } from "..";
|
|
3
4
|
import { PrimariaApi } from "../api/api";
|
|
4
|
-
import Newable = interfaces.Newable;
|
|
5
5
|
|
|
6
6
|
//TODO aixo ho fan ja les Broker extensions de plugins/core. Veure si s'ha de canviar
|
|
7
7
|
export const registerRequest =
|
|
8
8
|
(api: PrimariaApi, container: Container) =>
|
|
9
|
-
(command: IRequestClass<any>, handler: Newable<any>) => {
|
|
9
|
+
(command: IRequestClass<any>, handler: interfaces.Newable<any>) => {
|
|
10
10
|
container.bind(handler).to(handler).inTransientScope();
|
|
11
11
|
injectable()(handler);
|
|
12
12
|
const disposable = api.broker.registerRequest(command, (cmd: IRequest<any>) => {
|
|
@@ -10,7 +10,6 @@ export class GetVisitIdHandler {
|
|
|
10
10
|
async handle(message: GetVisitId): Promise<string | undefined> {
|
|
11
11
|
try {
|
|
12
12
|
const visitIdData = await this.getVisitId();
|
|
13
|
-
console.log("Visit ID obtenido: ", visitIdData);
|
|
14
13
|
return visitIdData;
|
|
15
14
|
} catch (error) {
|
|
16
15
|
this.api.notificationService.error(error.message);
|
|
@@ -20,7 +19,6 @@ export class GetVisitIdHandler {
|
|
|
20
19
|
|
|
21
20
|
private getVisitId(): Promise<string | undefined> {
|
|
22
21
|
const urlParams = new URLSearchParams(window.location.search);
|
|
23
|
-
console.log("Paràmetres de la URL: ", window.location.search);
|
|
24
22
|
const visitId = urlParams.get("visit_id");
|
|
25
23
|
return Promise.resolve(visitId || undefined);
|
|
26
24
|
}
|
|
@@ -160,7 +160,7 @@ export const template = (props: ActiveFiltersBadges) => {
|
|
|
160
160
|
filterOption = { title: deletedFiltersOption, id: deletedFiltersOption };
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
const chip2 = renderChip(id, filter, normalizeDeletedFilterBooleanValue(value), props);
|
|
163
|
+
//const chip2 = renderChip(id, filter, normalizeDeletedFilterBooleanValue(value), props);
|
|
164
164
|
|
|
165
165
|
const chip = renderChip(id, filter, filterOption, props);
|
|
166
166
|
|
|
@@ -14,19 +14,19 @@ const filterTemplates = {
|
|
|
14
14
|
[ActivityHistoryFilterType.Switch]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
15
15
|
<dss-input-switch size="sm" .checked=${isSelected} @onChangeValue=${handleChange} >
|
|
16
16
|
<input slot="input" id="switch-${id}" aria-label=${title} type="checkbox" ?disabled=${!isEnabled}>
|
|
17
|
-
<label slot="label" for="switch-${id}">${title}</label>
|
|
17
|
+
<label slot="label" for="switch-${id}">${title || id}</label>
|
|
18
18
|
</dss-input-switch>`,
|
|
19
19
|
|
|
20
20
|
[ActivityHistoryFilterType.Checkbox]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
21
21
|
<dss-checkbox variant="default" .checked=${isSelected} @onChange=${(e) => handleChange(e)}>
|
|
22
22
|
<input slot="input" id="checkboxStory-${id}" type="checkbox" ?disabled=${!isEnabled}>
|
|
23
|
-
<label slot="label" for="checkboxStory-${id}">${title}</label>
|
|
23
|
+
<label slot="label" for="checkboxStory-${id}">${title || id}</label>
|
|
24
24
|
</dss-checkbox>`,
|
|
25
25
|
|
|
26
26
|
[ActivityHistoryFilterType.Dropdown]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
27
27
|
<dss-input-dropdown type="default" .checked=${isSelected} @onChange=${(e) => handleChange(e)}>
|
|
28
28
|
<input slot="input" id="dropdownStory-${id}" type="text" ?disabled=${!isEnabled}>
|
|
29
|
-
<label slot="label" for="dropdownStory-${id}">${title}</label>
|
|
29
|
+
<label slot="label" for="dropdownStory-${id}">${title || id}</label>
|
|
30
30
|
</dss-input-dropdown>`,
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -108,7 +108,7 @@ const customFilterTemplate = (
|
|
|
108
108
|
group: IActivityHistoryCustomFilterGroup,
|
|
109
109
|
) => {
|
|
110
110
|
if (filter.type === ActivityHistoryFilterType.Dropdown) {
|
|
111
|
-
const elements = filter?.options.map(option => ({ value: option.id, label: option.title }));
|
|
111
|
+
const elements = filter?.options.map(option => ({ value: option.id, label: option.title || option.id }));
|
|
112
112
|
return html`
|
|
113
113
|
<dss-input-dropdown
|
|
114
114
|
inputsize="md"
|
|
@@ -30,6 +30,12 @@ const setMultipleOptionsFilterValue = (
|
|
|
30
30
|
const { optionId, enabled } = payload;
|
|
31
31
|
//Si el option ya estaba habilitado, no cambiamos nada
|
|
32
32
|
if (filter.enabledValues?.some((id) => id === optionId) && enabled) return filter;
|
|
33
|
+
//Si no hay option id, devolvemos enabledValues vació, para evitar meter un undefined
|
|
34
|
+
if(optionId === undefined || optionId === null)
|
|
35
|
+
return {
|
|
36
|
+
...filter,
|
|
37
|
+
enabledValues: [],
|
|
38
|
+
};
|
|
33
39
|
return {
|
|
34
40
|
...filter,
|
|
35
41
|
enabledValues: enabled
|
package/src/internal-plugins/activity-history/activity-history-item/list/UI/main-view/template.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const template = (props: ActivityHistoryMain) =>
|
|
|
24
24
|
<dss-icon-button size="md" variant="primary" icon="more_vert" label=${translate("actions.menuButton")}></dss-icon-button>
|
|
25
25
|
<dss-action-menu position="bottom-start">
|
|
26
26
|
<dss-action-menu-item lefticon="view_timeline" label=${translate("actions.cronogram")} @click=${props._raiseEcapCronogramEvent}></dss-action-menu-item>
|
|
27
|
-
<dss-action-menu-item lefticon="file_download" label=${translate("actions.exportPdf")} @click=${() => props.api.broker.send(new ExportPdf())}></dss-action-menu-item>
|
|
27
|
+
<!-- <dss-action-menu-item lefticon="file_download" label=${translate("actions.exportPdf")} @click=${() => props.api.broker.send(new ExportPdf())}></dss-action-menu-item> -->
|
|
28
28
|
<dss-action-menu-item lefticon="info" label=${translate("actions.entryLegend")}></dss-action-menu-item>
|
|
29
29
|
</dss-action-menu>
|
|
30
30
|
</div>
|