@uxland/primary-shell 5.6.6 → 5.6.8
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 +20 -12
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +17 -12
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/api/plugin-busy-manager/plugin-busy-list/styles.css +7 -0
- package/src/api/plugin-busy-manager/plugin-busy-list/template.ts +8 -1
- package/src/api/plugin-busy-manager/plugin-busy-manager.test.ts +15 -4
- package/src/api/plugin-busy-manager/plugin-busy-manager.ts +4 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/utils.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/main-view/template.ts +2 -2
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts +5 -5
- package/src/locales.ts +1 -1
package/package.json
CHANGED
|
@@ -17,4 +17,11 @@
|
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
gap: 8px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.plugin-busy-item{
|
|
23
|
+
text-align: center;
|
|
24
|
+
border: var(--dss-border-width-sm) solid var(--color-neutral-100);
|
|
25
|
+
border-radius: var(--dss-radius-lg);
|
|
26
|
+
padding: var(--dss-spacing-md);
|
|
20
27
|
}
|
|
@@ -7,7 +7,14 @@ export const template = (props: PluginBusyList) => html`
|
|
|
7
7
|
<div class="container">
|
|
8
8
|
<div class="title">${translate("busyManager.title")}</div>
|
|
9
9
|
<div class="list">
|
|
10
|
-
${props.data?.busyTasks?.map(
|
|
10
|
+
${props.data?.busyTasks?.map(
|
|
11
|
+
(item: PluginBusyTask) => html`
|
|
12
|
+
<div class="plugin-busy-item">
|
|
13
|
+
<dss-typography tag="div" variant="body-3" fontweight="regular">
|
|
14
|
+
${item.taskDescription}
|
|
15
|
+
</dss-typography>
|
|
16
|
+
</div>`,
|
|
17
|
+
)}
|
|
11
18
|
</div>
|
|
12
19
|
</div>
|
|
13
20
|
`;
|
|
@@ -15,10 +15,21 @@ describe("PluginBusyManagerImpl", () => {
|
|
|
15
15
|
|
|
16
16
|
describe("addBusyPluginTask", () => {
|
|
17
17
|
it("should add a plugin busy task", () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const task = { taskId: "1", taskDescription: "Loading plugin" };
|
|
19
|
+
manager.addBusyPluginTask(task);
|
|
20
|
+
expect(manager.getBusyPluginTasks()).toContain(task);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("should not add a task if taskId already exists", () => {
|
|
24
|
+
const task1 = { taskId: "1", taskDescription: "First task" };
|
|
25
|
+
const task2 = { taskId: "1", taskDescription: "Duplicate task" }; // mismo taskId
|
|
26
|
+
manager.addBusyPluginTask(task1);
|
|
27
|
+
manager.addBusyPluginTask(task2);
|
|
28
|
+
const tasks = manager.getBusyPluginTasks();
|
|
29
|
+
|
|
30
|
+
expect(tasks.length).toBe(1);
|
|
31
|
+
expect(tasks[0]).toEqual(task1); // Asegura que no fue reemplazado ni duplicado
|
|
32
|
+
});
|
|
22
33
|
});
|
|
23
34
|
|
|
24
35
|
describe("removeBusyPluginTask", () => {
|
|
@@ -32,7 +32,10 @@ export class PluginBusyManagerImpl implements PluginBusyManager {
|
|
|
32
32
|
private busyQuickActionTasks: QuickActionBusyTask[] = [];
|
|
33
33
|
|
|
34
34
|
public addBusyPluginTask(busyTask: PluginBusyTask): void {
|
|
35
|
-
this.busyPluginTasks.
|
|
35
|
+
const exists = this.busyPluginTasks.some((task) => task.taskId === busyTask.taskId);
|
|
36
|
+
if (!exists) {
|
|
37
|
+
this.busyPluginTasks.push(busyTask);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
public addBusyQuickActionTask(busyTask: QuickActionBusyTask): void {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { translate } from "../../localization";
|
|
2
2
|
|
|
3
3
|
export const formatShowFilterTitle = (title: string) => {
|
|
4
|
-
const filterTitle = title.replace(/veure/gi, "")
|
|
4
|
+
const filterTitle = title.replace(/veure/gi, "")?.trim();
|
|
5
5
|
return filterTitle.charAt(0).toUpperCase() + filterTitle.slice(1);
|
|
6
6
|
};
|
|
7
7
|
|
package/src/internal-plugins/activity-history/activity-history-item/list/UI/main-view/template.ts
CHANGED
|
@@ -52,12 +52,12 @@ export const headerMaximizedTemplate = (props: ActivityHistoryMain) => html`
|
|
|
52
52
|
</dss-datepicker>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="header__maximized__right">
|
|
55
|
-
<div>
|
|
55
|
+
<!-- <div>
|
|
56
56
|
<dss-button variant="subtle" size="md" label="${translate("actions.moreOptions")}" icon="more_horiz" iconposition="left"></dss-button>
|
|
57
57
|
<dss-action-menu position="bottom-start">
|
|
58
58
|
<dss-action-menu-item @click=${() => props.api.broker.send(new ExportPdf())} lefticon="file_download" label=${translate("actions.exportPdf")}></dss-action-menu-item>
|
|
59
59
|
</dss-action-menu>
|
|
60
|
-
</div>
|
|
60
|
+
</div> -->
|
|
61
61
|
<dss-button label="${translate("actions.entryLegend")}" size="md" variant="secondary" icon="info"></dss-button>
|
|
62
62
|
<dss-button label="${translate("actions.cronogram")}" size="md" variant="primary" icon="view_timeline" @click=${props._raiseEcapCronogramEvent}></dss-button>
|
|
63
63
|
</div>
|
package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts
CHANGED
|
@@ -33,7 +33,7 @@ export const template = (props: ActivityHistoryTimeline) => {
|
|
|
33
33
|
.renderItem=${(itemGroup: IActivityHistoryGroup, index: number) => html`
|
|
34
34
|
<div class="visit zIndex${props.historyGroups.length - index}"
|
|
35
35
|
data-date=${ifDefined(itemGroup?.items[0]?.date || itemGroup?.subGroups[0]?.items[0]?.date)}>
|
|
36
|
-
${visitHeaderTemplate(props, itemGroup
|
|
36
|
+
${visitHeaderTemplate(props, itemGroup?.items[0] || itemGroup?.subGroups[0]?.items[0])}
|
|
37
37
|
<div class="visit__items">
|
|
38
38
|
${repeat(
|
|
39
39
|
mergeHistoryItemsAndSubgroups(itemGroup),
|
|
@@ -44,7 +44,7 @@ export const template = (props: ActivityHistoryTimeline) => {
|
|
|
44
44
|
return html`
|
|
45
45
|
<div
|
|
46
46
|
class="item"
|
|
47
|
-
?has-divider=${hasItemDivider(item, itemGroup
|
|
47
|
+
?has-divider=${hasItemDivider(item, itemGroup?.items as IActivityHistoryItemWithComponent[])}
|
|
48
48
|
>
|
|
49
49
|
${item.component}
|
|
50
50
|
</div>
|
|
@@ -53,14 +53,14 @@ export const template = (props: ActivityHistoryTimeline) => {
|
|
|
53
53
|
const subGroup = entry.subGroup;
|
|
54
54
|
return html`
|
|
55
55
|
<div class="diagnostics">
|
|
56
|
-
${diagnosticHeaderTemplate(subGroup
|
|
56
|
+
${diagnosticHeaderTemplate(subGroup?.items[0])}
|
|
57
57
|
<div class="diagnostics__items">
|
|
58
58
|
${repeat(
|
|
59
|
-
subGroup
|
|
59
|
+
subGroup?.items,
|
|
60
60
|
(item) => item.id,
|
|
61
61
|
(item: IActivityHistoryItemWithComponent) => html`
|
|
62
62
|
<div class="item"
|
|
63
|
-
?has-divider=${hasItemDivider(item, subGroup
|
|
63
|
+
?has-divider=${hasItemDivider(item, subGroup?.items as IActivityHistoryItemWithComponent[])}>
|
|
64
64
|
${item.component}
|
|
65
65
|
</div>
|
|
66
66
|
`,
|
package/src/locales.ts
CHANGED