@uxland/primary-shell 5.6.1 → 5.6.3
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/flow-D-0MTYCm.js.map +1 -1
- package/dist/index.js +22085 -21662
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1872 -1880
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/infrastructure/ioc/container.d.ts +7 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/reset/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/reset/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/reset/handler.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/reset/reducer.d.ts +3 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/reset/request.d.ts +2 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/slice.d.ts +2 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/infrastructure/ioc/container.d.ts +8 -0
- package/package.json +1 -1
- 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/active-filters-badges.ts +11 -16
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/template.ts +12 -12
- package/src/internal-plugins/activity-history/activity-history-item/filter/bootstrapper.ts +3 -6
- package/src/internal-plugins/activity-history/activity-history-item/filter/reset/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/reset/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/reset/handler.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/reset/reducer.ts +28 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/reset/request.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/slice.ts +2 -4
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/main-view/template.ts +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/actions.d.ts +0 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/bootstrapper.d.ts +0 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/handler.d.ts +0 -5
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/reducer.d.ts +0 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/request.d.ts +0 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/actions.d.ts +0 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/bootstrapper.d.ts +0 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/handler.d.ts +0 -5
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/reducer.d.ts +0 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/request.d.ts +0 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/activity-history-timeline.d.ts +0 -19
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/actions.ts +0 -3
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/bootstrapper.ts +0 -14
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/handler.ts +0 -12
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/reducer.ts +0 -11
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/request.ts +0 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/actions.ts +0 -3
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/bootstrapper.ts +0 -14
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/handler.ts +0 -8
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/reducer.ts +0 -11
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/request.ts +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Container } from 'inversify';
|
|
2
|
+
|
|
3
|
+
declare const container: Container;
|
|
4
|
+
declare const lazyInject: (serviceIdentifier: string | symbol | import("inversify").interfaces.Newable<any> | import("inversify").interfaces.Abstract<any>) => (proto: any, key: string) => void;
|
|
5
|
+
export { container, lazyInject };
|
|
6
|
+
export declare const registerDep: (dep: any) => void;
|
|
7
|
+
export declare const unregisterDep: (dep: any) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resetFilters: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"activity-history-filters/resetFilters">;
|
|
@@ -6,10 +6,9 @@ import { setCustomFilterValueReducer } from './custom-filters/set-custom-filter-
|
|
|
6
6
|
import { IActivityHistoryFilter } from './model';
|
|
7
7
|
import { addDiagnosticFiltersReducer } from './diagnostic-filters/add/reducer';
|
|
8
8
|
import { setDiagnosticFilterValuesReducer } from './diagnostic-filters/set/reducer';
|
|
9
|
-
import { resetCommonFilterValuesReducer } from './common-filters/reset-common-filter/reducer';
|
|
10
|
-
import { resetCustomFilterValuesReducer } from './custom-filters/reset-custom-filter/reducer';
|
|
11
9
|
import { addUpFiltersReducer } from './up-filters/add/reducer';
|
|
12
10
|
import { setUpFilterValuesReducer } from './up-filters/set/reducer';
|
|
11
|
+
import { resetFiltersReducer } from './reset/reducer';
|
|
13
12
|
|
|
14
13
|
export declare const activityHistoryFiltersSlice: import('@reduxjs/toolkit').Slice<{
|
|
15
14
|
searchString: string;
|
|
@@ -17,15 +16,14 @@ export declare const activityHistoryFiltersSlice: import('@reduxjs/toolkit').Sli
|
|
|
17
16
|
}, {
|
|
18
17
|
setSearchString: typeof setSearchStringReducer;
|
|
19
18
|
setCommonFilterValue: typeof setCommonFilterValueReducer;
|
|
20
|
-
resetCommonFilterValues: typeof resetCommonFilterValuesReducer;
|
|
21
19
|
addCustomFilters: typeof addCustomFiltersReducer;
|
|
22
20
|
setCustomFilterGroupValue: typeof setCustomFilterGroupValueReducer;
|
|
23
21
|
setCustomFilterValue: typeof setCustomFilterValueReducer;
|
|
24
|
-
resetCustomFilterValues: typeof resetCustomFilterValuesReducer;
|
|
25
22
|
addDiagnosticFilters: typeof addDiagnosticFiltersReducer;
|
|
26
23
|
setDiagnosticFilterValues: typeof setDiagnosticFilterValuesReducer;
|
|
27
24
|
addUpFilters: typeof addUpFiltersReducer;
|
|
28
25
|
setUpFilterValues: typeof setUpFilterValuesReducer;
|
|
26
|
+
resetFilters: typeof resetFiltersReducer;
|
|
29
27
|
}, "activity-history-filters", "activity-history-filters", import('@reduxjs/toolkit').SliceSelectors<{
|
|
30
28
|
searchString: string;
|
|
31
29
|
filters: IActivityHistoryFilter[];
|
package/dist/primary/shell/src/internal-plugins/activity-history/infrastructure/ioc/container.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Container } from 'inversify';
|
|
2
|
+
import { PrimariaApi } from '../../../../api/api';
|
|
3
|
+
|
|
4
|
+
declare const container: Container;
|
|
5
|
+
declare const lazyInject: (serviceIdentifier: string | symbol | import("inversify").interfaces.Newable<any> | import("inversify").interfaces.Abstract<any>) => (proto: any, key: string) => void;
|
|
6
|
+
export { container, lazyInject };
|
|
7
|
+
export declare const bindDeps: (api: PrimariaApi) => void;
|
|
8
|
+
export declare const unbindDeps: () => void;
|
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { LitElement, css, html, unsafeCSS } from "lit";
|
|
2
2
|
import { customElement } from "lit/decorators.js";
|
|
3
|
-
import { connectedProperty } from "../../../../infrastructure/state/connected-property";
|
|
4
|
-
import { lazyInject } from "../../../../infrastructure/ioc/container";
|
|
5
3
|
import { PrimariaApi } from "../../../../../../api/api";
|
|
4
|
+
import { lazyInject } from "../../../../infrastructure/ioc/container";
|
|
6
5
|
import { TYPES } from "../../../../infrastructure/ioc/types";
|
|
7
|
-
import {
|
|
6
|
+
import { connectedProperty } from "../../../../infrastructure/state/connected-property";
|
|
8
7
|
import styles from "./styles.css?inline";
|
|
8
|
+
import { template } from "./template";
|
|
9
9
|
|
|
10
|
+
import { customFilterGroupsWithOptionsSelector } from "../../../selectors";
|
|
11
|
+
import { activityHistoryEnabledCommonFiltersSelector } from "../../common-filters/selectors";
|
|
12
|
+
import { SetCommonFilter } from "../../common-filters/set-common-filter/request";
|
|
10
13
|
import { SetCustomFilterValue } from "../../custom-filters/set-custom-filter-value/request";
|
|
14
|
+
import { diagnosticFilterSelector } from "../../diagnostic-filters/selectors";
|
|
15
|
+
import { SetDiagnosticFiltersCommand } from "../../diagnostic-filters/set/request";
|
|
11
16
|
import {
|
|
12
|
-
IActivityHistoryCustomFilter,
|
|
13
17
|
IActivityHistoryCustomFilterGroup,
|
|
14
18
|
IActivityHistoryDiagnosticsFilter,
|
|
15
19
|
IActivityHistoryFilter,
|
|
16
|
-
IActivityHistoryUpFilter
|
|
20
|
+
IActivityHistoryUpFilter
|
|
17
21
|
} from "../../model";
|
|
18
|
-
import {
|
|
19
|
-
import { SetCommonFilter } from "../../common-filters/set-common-filter/request";
|
|
20
|
-
import { diagnosticFilterSelector } from "../../diagnostic-filters/selectors";
|
|
21
|
-
import { SetDiagnosticFiltersCommand } from "../../diagnostic-filters/set/request";
|
|
22
|
-
import { ResetCommonFilter } from "../../common-filters/reset-common-filter/request";
|
|
23
|
-
import { ResetCustomFilter } from "../../custom-filters/reset-custom-filter/request";
|
|
22
|
+
import { ResetFiltersCommand } from "../../reset/request";
|
|
24
23
|
import { upFilterSelector } from "../../up-filters/selectors";
|
|
25
24
|
import { SetUpFiltersCommand } from "../../up-filters/set/request";
|
|
26
|
-
import { customFilterGroupsWithOptionsSelector } from "../../../selectors";
|
|
27
25
|
|
|
28
26
|
//@ts-ignore
|
|
29
27
|
@customElement("active-filters-badges")
|
|
@@ -79,9 +77,6 @@ export class ActiveFiltersBadges extends LitElement {
|
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
resetFilters() {
|
|
82
|
-
this.api.broker.send(new
|
|
83
|
-
this.api.broker.send(new SetUpFiltersCommand([]));
|
|
84
|
-
this.api.broker.send(new ResetCommonFilter());
|
|
85
|
-
this.api.broker.send(new ResetCustomFilter());
|
|
80
|
+
this.api.broker.send(new ResetFiltersCommand())
|
|
86
81
|
}
|
|
87
82
|
}
|
|
@@ -12,22 +12,22 @@ import { translate } from "../../../../localization";
|
|
|
12
12
|
|
|
13
13
|
const filterTemplates = {
|
|
14
14
|
[ActivityHistoryFilterType.Switch]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
15
|
-
<dss-input-switch size="sm"
|
|
16
|
-
<input slot="input" id="switch-${id}" aria-label=${title} type="checkbox"
|
|
17
|
-
<label slot="label" for="switch-${id}">${title}</label>
|
|
15
|
+
<dss-input-switch size="sm" @onChangeValue=${handleChange} .checked=${isSelected}>
|
|
16
|
+
<input slot="input" id="switch-${id}" aria-label=${title} type="checkbox" ?disabled=${!isEnabled}>
|
|
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
|
-
<dss-checkbox variant="default"
|
|
22
|
-
<input slot="input" id="checkboxStory-${id}" type="checkbox" ?disabled=${!isEnabled}>
|
|
23
|
-
<label slot="label" for="checkboxStory-${id}">${title}</label>
|
|
21
|
+
<dss-checkbox variant="default" @onChange=${(e) => handleChange(e)}>
|
|
22
|
+
<input slot="input" id="checkboxStory-${id}" type="checkbox" .checked=${isSelected} ?disabled=${!isEnabled}>
|
|
23
|
+
<label slot="label" for="checkboxStory-${id}">${title || id}</label>
|
|
24
24
|
</dss-checkbox>`,
|
|
25
25
|
|
|
26
|
-
[ActivityHistoryFilterType.Dropdown]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
27
|
-
<dss-input-dropdown type="default"
|
|
28
|
-
<input slot="input" id="dropdownStory-${id}" type="text" ?disabled=${!isEnabled}>
|
|
29
|
-
<label slot="label" for="dropdownStory-${id}">${title}</label>
|
|
30
|
-
</dss-input-dropdown>`,
|
|
26
|
+
/* [ActivityHistoryFilterType.Dropdown]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
27
|
+
<dss-input-dropdown type="default" @onChange=${(e) => handleChange(e)}>
|
|
28
|
+
<input slot="input" id="dropdownStory-${id}" type="text" .checked=${isSelected} ?disabled=${!isEnabled}>
|
|
29
|
+
<label slot="label" for="dropdownStory-${id}">${title || id}</label>
|
|
30
|
+
</dss-input-dropdown>`, */
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const getFilterTemplate = (
|
|
@@ -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"
|
|
@@ -12,10 +12,9 @@ import {
|
|
|
12
12
|
} from "./custom-filters/set-custom-filter-value/bootstrapper";
|
|
13
13
|
import { bootstrapAddDiagnosticFilter, teardownAddDiagnosticFilter } from "./diagnostic-filters/add/bootstrapper";
|
|
14
14
|
import { bootstrapSetDiagnosticFilter, teardownSetDiagnosticFilter } from "./diagnostic-filters/set/bootstrapper";
|
|
15
|
-
import { bootstrapResetCommonFilter, teardownResetCommonFilter } from "./common-filters/reset-common-filter/bootstrapper";
|
|
16
|
-
import { bootstrapResetCustomFilter, teardownResetCustomFilter } from "./custom-filters/reset-custom-filter/bootstrapper";
|
|
17
15
|
import { bootstrapAddUpFilter, teardownAddUpFilter } from "./up-filters/add/bootstrapper";
|
|
18
16
|
import { bootstrapSetUpFilter, teardownSetUpFilter } from "./up-filters/set/bootstrapper";
|
|
17
|
+
import { bootstrapResetFilters, teardownResetFilters } from "./reset/bootstrapper";
|
|
19
18
|
|
|
20
19
|
export const bootstrapFilters = (broker: BrokerExtensions) => {
|
|
21
20
|
bootstrapSetCommonFilter(broker);
|
|
@@ -24,10 +23,9 @@ export const bootstrapFilters = (broker: BrokerExtensions) => {
|
|
|
24
23
|
bootstrapSetCustomFilterValue(broker);
|
|
25
24
|
bootstrapAddDiagnosticFilter(broker);
|
|
26
25
|
bootstrapSetDiagnosticFilter(broker);
|
|
27
|
-
bootstrapResetCommonFilter(broker);
|
|
28
|
-
bootstrapResetCustomFilter(broker);
|
|
29
26
|
bootstrapAddUpFilter(broker);
|
|
30
27
|
bootstrapSetUpFilter(broker);
|
|
28
|
+
bootstrapResetFilters(broker);
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
export const teardownFilters = () => {
|
|
@@ -37,8 +35,7 @@ export const teardownFilters = () => {
|
|
|
37
35
|
teardownSetCustomFilterValue();
|
|
38
36
|
teardownAddDiagnosticFilter();
|
|
39
37
|
teardownSetDiagnosticFilter();
|
|
40
|
-
teardownResetCommonFilter();
|
|
41
|
-
teardownResetCustomFilter();
|
|
42
38
|
teardownAddUpFilter();
|
|
43
39
|
teardownSetUpFilter();
|
|
40
|
+
teardownResetFilters();
|
|
44
41
|
};
|
package/src/internal-plugins/activity-history/activity-history-item/filter/reset/bootstrapper.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
|
+
import { ResetFiltersCommand } from "./request";
|
|
3
|
+
import { ResetFiltersHandler } from "./handler";
|
|
4
|
+
import { BrokerDisposableHandler } from "@uxland/primary-shell";
|
|
5
|
+
|
|
6
|
+
let request: BrokerDisposableHandler;
|
|
7
|
+
|
|
8
|
+
export const bootstrapResetFilters = (broker: BrokerExtensions) => {
|
|
9
|
+
request = broker.registerRequest(ResetFiltersCommand, ResetFiltersHandler);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const teardownResetFilters = () => {
|
|
13
|
+
request?.dispose();
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import { StoreBaseHandler } from "../../../infrastructure/base-handlers";
|
|
3
|
+
import { resetFilters } from "./actions";
|
|
4
|
+
import { ResetFiltersCommand } from "./request";
|
|
5
|
+
|
|
6
|
+
export class ResetFiltersHandler extends StoreBaseHandler {
|
|
7
|
+
async handle(request: ResetFiltersCommand) {
|
|
8
|
+
try {
|
|
9
|
+
this.store.dispatch(resetFilters());
|
|
10
|
+
} catch (e) {
|
|
11
|
+
console.log(e.message);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { commonFilters } from "../common-filters/common-filters";
|
|
3
|
+
|
|
4
|
+
export function resetFiltersReducer(state, action: PayloadAction<void>) {
|
|
5
|
+
state.filters = state.filters.map((f) => {
|
|
6
|
+
if (f.id !== "common" && f.id !== "history-diagnostics" && f.id !== "history-up") {
|
|
7
|
+
return {
|
|
8
|
+
...f,
|
|
9
|
+
filters: f.filters.map((ff) => {
|
|
10
|
+
if(ff.singleOption)
|
|
11
|
+
return {...ff, enabled: false}
|
|
12
|
+
return {...ff, enabled: true, enabledValues: []}
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if(f.id === "history-diagnostics" || f.id === "history-up") {
|
|
18
|
+
return {
|
|
19
|
+
...f,
|
|
20
|
+
enabledValues: [],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if(f.id === "common") {
|
|
24
|
+
return commonFilters[0]
|
|
25
|
+
}
|
|
26
|
+
return f;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class ResetFiltersCommand {}
|
|
@@ -8,10 +8,9 @@ import { setCustomFilterValueReducer } from "./custom-filters/set-custom-filter-
|
|
|
8
8
|
import { IActivityHistoryFilter } from "./model";
|
|
9
9
|
import { addDiagnosticFiltersReducer } from "./diagnostic-filters/add/reducer";
|
|
10
10
|
import { setDiagnosticFilterValuesReducer } from "./diagnostic-filters/set/reducer";
|
|
11
|
-
import { resetCommonFilterValuesReducer } from "./common-filters/reset-common-filter/reducer";
|
|
12
|
-
import { resetCustomFilterValuesReducer } from "./custom-filters/reset-custom-filter/reducer";
|
|
13
11
|
import { addUpFiltersReducer } from "./up-filters/add/reducer";
|
|
14
12
|
import { setUpFilterValuesReducer } from "./up-filters/set/reducer";
|
|
13
|
+
import { resetFiltersReducer } from "./reset/reducer";
|
|
15
14
|
|
|
16
15
|
export const activityHistoryFiltersSlice = createSlice({
|
|
17
16
|
name: "activity-history-filters",
|
|
@@ -22,14 +21,13 @@ export const activityHistoryFiltersSlice = createSlice({
|
|
|
22
21
|
reducers: {
|
|
23
22
|
setSearchString: setSearchStringReducer,
|
|
24
23
|
setCommonFilterValue: setCommonFilterValueReducer,
|
|
25
|
-
resetCommonFilterValues: resetCommonFilterValuesReducer,
|
|
26
24
|
addCustomFilters: addCustomFiltersReducer,
|
|
27
25
|
setCustomFilterGroupValue: setCustomFilterGroupValueReducer,
|
|
28
26
|
setCustomFilterValue: setCustomFilterValueReducer,
|
|
29
|
-
resetCustomFilterValues: resetCustomFilterValuesReducer,
|
|
30
27
|
addDiagnosticFilters: addDiagnosticFiltersReducer,
|
|
31
28
|
setDiagnosticFilterValues: setDiagnosticFilterValuesReducer,
|
|
32
29
|
addUpFilters: addUpFiltersReducer,
|
|
33
30
|
setUpFilterValues: setUpFilterValuesReducer,
|
|
31
|
+
resetFilters: resetFiltersReducer
|
|
34
32
|
},
|
|
35
33
|
});
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const resetCommonFilterValues: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"activity-history-filters/resetCommonFilterValues">;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resetCommonFilterValuesReducer(state: any): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const resetCustomFilterValues: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"activity-history-filters/resetCustomFilterValues">;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resetCustomFilterValuesReducer(state: any): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { IActivityHistoryGroup } from '../../../domain/model';
|
|
3
|
-
|
|
4
|
-
export declare class ActivityHistoryTimeline extends LitElement {
|
|
5
|
-
render(): import('lit').TemplateResult<1>;
|
|
6
|
-
static styles: import('lit').CSSResult;
|
|
7
|
-
historyGroups: IActivityHistoryGroup[];
|
|
8
|
-
isCollectionInitialState: boolean;
|
|
9
|
-
isSomeCollectionLoadedAndOtherLoading: boolean;
|
|
10
|
-
searchString: string;
|
|
11
|
-
private _virtualizer;
|
|
12
|
-
_hasUpdatedOnce: boolean;
|
|
13
|
-
firstUpdated(_changeProps: PropertyValues): void;
|
|
14
|
-
updated(changedProperties: any): Promise<void>;
|
|
15
|
-
prepareComponents(historyGroups: any): Promise<void>;
|
|
16
|
-
highlightMatch(text: string, searchString: string): string;
|
|
17
|
-
highlighted(text?: string): import('lit/directive.js').DirectiveResult<typeof import('lit/directives/unsafe-html.js').UnsafeHTMLDirective> | null;
|
|
18
|
-
_scrollIntoDate(selectedDate: number): void;
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
|
-
import { BrokerDisposableHandler } from "../../../../../../api/broker/primaria-broker";
|
|
3
|
-
import { ResetCommonFilter } from "./request";
|
|
4
|
-
import { ResetCommonFilterHandler } from "./handler";
|
|
5
|
-
|
|
6
|
-
let request: BrokerDisposableHandler;
|
|
7
|
-
|
|
8
|
-
export const bootstrapResetCommonFilter = (broker: BrokerExtensions) => {
|
|
9
|
-
request = broker.registerRequest(ResetCommonFilter, ResetCommonFilterHandler);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const teardownResetCommonFilter = () => {
|
|
13
|
-
request?.dispose();
|
|
14
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoreBaseHandler } from "../../../../infrastructure/base-handlers";
|
|
2
|
-
import { resetCommonFilterValues } from "./actions";
|
|
3
|
-
|
|
4
|
-
export class ResetCommonFilterHandler extends StoreBaseHandler {
|
|
5
|
-
async handle() {
|
|
6
|
-
try {
|
|
7
|
-
this.store.dispatch(resetCommonFilterValues());
|
|
8
|
-
} catch (e) {
|
|
9
|
-
console.log(e.message);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export class ResetCommonFilter {}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
|
-
import { BrokerDisposableHandler } from "../../../../../../api/broker/primaria-broker";
|
|
3
|
-
import { ResetCustomFilter } from "./request";
|
|
4
|
-
import { ResetCustomFilterHandler } from "./handler";
|
|
5
|
-
|
|
6
|
-
let request: BrokerDisposableHandler;
|
|
7
|
-
|
|
8
|
-
export const bootstrapResetCustomFilter = (broker: BrokerExtensions) => {
|
|
9
|
-
request = broker.registerRequest(ResetCustomFilter, ResetCustomFilterHandler);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const teardownResetCustomFilter = () => {
|
|
13
|
-
request?.dispose();
|
|
14
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { StoreBaseHandler } from "../../../../infrastructure/base-handlers";
|
|
2
|
-
import { resetCustomFilterValues } from "./actions";
|
|
3
|
-
|
|
4
|
-
export class ResetCustomFilterHandler extends StoreBaseHandler {
|
|
5
|
-
async handle() {
|
|
6
|
-
await this.store.dispatch(resetCustomFilterValues());
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export function resetCustomFilterValuesReducer(state) {
|
|
2
|
-
state.filters = state.filters.map((f) => {
|
|
3
|
-
if (f.id !== "common" && f.id !== "history-diagnostics" && f.id !== "history-up") {
|
|
4
|
-
return {
|
|
5
|
-
...f,
|
|
6
|
-
filters: f.filters.map((ff) => ({ ...ff, enabled: false, enabledValues: [] })),
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
return f;
|
|
10
|
-
});
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export class ResetCustomFilter {}
|