@uxland/primary-shell 5.6.3 → 5.6.4
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 +82 -44
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +5 -5
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/activity-history-filters.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/handler.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/reducer.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/request.d.ts +9 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/slice.d.ts +2 -0
- package/package.json +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/activity-history-filters.ts +11 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/template.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/bootstrapper.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/handler.ts +13 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/reducer.ts +21 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-all-values/request.ts +9 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/set-custom-filter-value/reducer.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/slice.ts +2 -0
|
@@ -19,6 +19,7 @@ export declare class ActivityHistoryFilters extends LitElement {
|
|
|
19
19
|
_onChangeCommonFilterValue(filterId: string, value: boolean): void;
|
|
20
20
|
_onChangeCustomFilterGroupValue(filterGroupId: string, value: boolean): void;
|
|
21
21
|
_onChangeCustomFilterValue(filterGroupId: string, filterId: string, optionId: string, value: boolean): void;
|
|
22
|
+
_onChangeCustomFilterAllValues(filterGroupId: string, filterId: string, values: string[]): void;
|
|
22
23
|
_handleDiagnosticFilterChange(e: CustomEvent): void;
|
|
23
24
|
_handleUpFilterChange(e: CustomEvent): void;
|
|
24
25
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setCustomFilterAllValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<import('./request').SetCustomFilterAllValuesPayload, "activity-history-filters/setCustomFilterAllValues">;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoreBaseHandler } from '../../../../infrastructure/base-handlers';
|
|
2
|
+
import { SetCustomFilterAllValues } from './request';
|
|
3
|
+
|
|
4
|
+
export declare class SetCustomFilterAllValuesHandler extends StoreBaseHandler {
|
|
5
|
+
handle(request: SetCustomFilterAllValues): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SetCustomFilterAllValuesPayload {
|
|
2
|
+
filterGroupId: string;
|
|
3
|
+
filterId: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare class SetCustomFilterAllValues {
|
|
7
|
+
payload: SetCustomFilterAllValuesPayload;
|
|
8
|
+
constructor(payload: SetCustomFilterAllValuesPayload);
|
|
9
|
+
}
|
|
@@ -9,6 +9,7 @@ import { setDiagnosticFilterValuesReducer } from './diagnostic-filters/set/reduc
|
|
|
9
9
|
import { addUpFiltersReducer } from './up-filters/add/reducer';
|
|
10
10
|
import { setUpFilterValuesReducer } from './up-filters/set/reducer';
|
|
11
11
|
import { resetFiltersReducer } from './reset/reducer';
|
|
12
|
+
import { setCustomFilterAllValuesReducer } from './custom-filters/set-custom-filter-all-values/reducer';
|
|
12
13
|
|
|
13
14
|
export declare const activityHistoryFiltersSlice: import('@reduxjs/toolkit').Slice<{
|
|
14
15
|
searchString: string;
|
|
@@ -19,6 +20,7 @@ export declare const activityHistoryFiltersSlice: import('@reduxjs/toolkit').Sli
|
|
|
19
20
|
addCustomFilters: typeof addCustomFiltersReducer;
|
|
20
21
|
setCustomFilterGroupValue: typeof setCustomFilterGroupValueReducer;
|
|
21
22
|
setCustomFilterValue: typeof setCustomFilterValueReducer;
|
|
23
|
+
setCustomFilterAllValues: typeof setCustomFilterAllValuesReducer;
|
|
22
24
|
addDiagnosticFilters: typeof addDiagnosticFiltersReducer;
|
|
23
25
|
setDiagnosticFilterValues: typeof setDiagnosticFilterValuesReducer;
|
|
24
26
|
addUpFilters: typeof addUpFiltersReducer;
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ import { diagnosticFilterEnabledValuesSelector, diagnosticFilterSelector } from
|
|
|
21
21
|
import { SetDiagnosticFiltersCommand } from "../../diagnostic-filters/set/request";
|
|
22
22
|
import { upFilterEnabledValuesSelector, upFilterSelector } from "../../up-filters/selectors";
|
|
23
23
|
import { SetUpFiltersCommand } from "../../up-filters/set/request";
|
|
24
|
+
import { SetCustomFilterAllValues } from "../../custom-filters/set-custom-filter-all-values/request";
|
|
24
25
|
|
|
25
26
|
//@ts-ignore
|
|
26
27
|
@customElement("activity-history-filters")
|
|
@@ -89,6 +90,16 @@ export class ActivityHistoryFilters extends LitElement {
|
|
|
89
90
|
);
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
_onChangeCustomFilterAllValues(filterGroupId: string, filterId: string, values: string[]) {
|
|
94
|
+
this.api.broker.send(
|
|
95
|
+
new SetCustomFilterAllValues({
|
|
96
|
+
filterGroupId,
|
|
97
|
+
filterId,
|
|
98
|
+
values: values,
|
|
99
|
+
}),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
92
103
|
_handleDiagnosticFilterChange(e: CustomEvent) {
|
|
93
104
|
const selectedValues = e.detail.selectedValue;
|
|
94
105
|
this.api.broker.send(new SetDiagnosticFiltersCommand(selectedValues));
|
|
@@ -118,7 +118,7 @@ const customFilterTemplate = (
|
|
|
118
118
|
type="default"
|
|
119
119
|
.elements=${elements}
|
|
120
120
|
@onInputDropdownChange=${(e) =>
|
|
121
|
-
props.
|
|
121
|
+
props._onChangeCustomFilterAllValues(group.id, filter.id, e.detail.selectedValue)
|
|
122
122
|
}
|
|
123
123
|
.selectedValue=${filter.enabledValues}
|
|
124
124
|
selectorStyle="max-height: 450px"
|
|
@@ -15,12 +15,14 @@ import { bootstrapSetDiagnosticFilter, teardownSetDiagnosticFilter } from "./dia
|
|
|
15
15
|
import { bootstrapAddUpFilter, teardownAddUpFilter } from "./up-filters/add/bootstrapper";
|
|
16
16
|
import { bootstrapSetUpFilter, teardownSetUpFilter } from "./up-filters/set/bootstrapper";
|
|
17
17
|
import { bootstrapResetFilters, teardownResetFilters } from "./reset/bootstrapper";
|
|
18
|
+
import { bootstrapSetCustomFilterAllValues, teardownSetCustomFilterAllValues } from "./custom-filters/set-custom-filter-all-values/bootstrapper";
|
|
18
19
|
|
|
19
20
|
export const bootstrapFilters = (broker: BrokerExtensions) => {
|
|
20
21
|
bootstrapSetCommonFilter(broker);
|
|
21
22
|
bootstrapAddCustomFilter(broker);
|
|
22
23
|
bootstrapSetCustomFilterGroup(broker);
|
|
23
24
|
bootstrapSetCustomFilterValue(broker);
|
|
25
|
+
bootstrapSetCustomFilterAllValues(broker);
|
|
24
26
|
bootstrapAddDiagnosticFilter(broker);
|
|
25
27
|
bootstrapSetDiagnosticFilter(broker);
|
|
26
28
|
bootstrapAddUpFilter(broker);
|
|
@@ -33,6 +35,7 @@ export const teardownFilters = () => {
|
|
|
33
35
|
teardownAddCustomFilter();
|
|
34
36
|
teardownSetCustomFilterGroup();
|
|
35
37
|
teardownSetCustomFilterValue();
|
|
38
|
+
teardownSetCustomFilterAllValues();
|
|
36
39
|
teardownAddDiagnosticFilter();
|
|
37
40
|
teardownSetDiagnosticFilter();
|
|
38
41
|
teardownAddUpFilter();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
|
+
import { BrokerDisposableHandler } from "../../../../../../api/broker/primaria-broker";
|
|
3
|
+
import { SetCustomFilterAllValues } from "./request";
|
|
4
|
+
import { SetCustomFilterAllValuesHandler } from "./handler";
|
|
5
|
+
|
|
6
|
+
let request: BrokerDisposableHandler;
|
|
7
|
+
|
|
8
|
+
export const bootstrapSetCustomFilterAllValues = (broker: BrokerExtensions) => {
|
|
9
|
+
request = broker.registerRequest(SetCustomFilterAllValues, SetCustomFilterAllValuesHandler);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const teardownSetCustomFilterAllValues = () => {
|
|
13
|
+
request?.dispose();
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoreBaseHandler } from "../../../../infrastructure/base-handlers";
|
|
2
|
+
import { setCustomFilterAllValues } from "./actions";
|
|
3
|
+
import { SetCustomFilterAllValues } from "./request";
|
|
4
|
+
|
|
5
|
+
export class SetCustomFilterAllValuesHandler extends StoreBaseHandler {
|
|
6
|
+
async handle(request: SetCustomFilterAllValues) {
|
|
7
|
+
try {
|
|
8
|
+
this.store.dispatch(setCustomFilterAllValues(request.payload));
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.log(e.message);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { SetCustomFilterAllValuesPayload } from "./request";
|
|
3
|
+
|
|
4
|
+
export function setCustomFilterAllValuesReducer(
|
|
5
|
+
state,
|
|
6
|
+
action: PayloadAction<SetCustomFilterAllValuesPayload>,
|
|
7
|
+
) {
|
|
8
|
+
state.filters = state.filters.map((f) => {
|
|
9
|
+
if (f.id === action.payload.filterGroupId) {
|
|
10
|
+
return {
|
|
11
|
+
...f,
|
|
12
|
+
filters: f.filters.map((ff) =>
|
|
13
|
+
ff.id === action.payload.filterId
|
|
14
|
+
? { ...ff, enabledValues: action.payload.values }
|
|
15
|
+
: ff,
|
|
16
|
+
),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return f;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
2
|
import { SetCustomFilterValuePayload } from "./request";
|
|
3
|
-
import { IActivityHistoryCustomFilter
|
|
3
|
+
import { IActivityHistoryCustomFilter } from "../../model";
|
|
4
4
|
|
|
5
5
|
export function setCustomFilterValueReducer(
|
|
6
6
|
state,
|
|
@@ -11,6 +11,7 @@ import { setDiagnosticFilterValuesReducer } from "./diagnostic-filters/set/reduc
|
|
|
11
11
|
import { addUpFiltersReducer } from "./up-filters/add/reducer";
|
|
12
12
|
import { setUpFilterValuesReducer } from "./up-filters/set/reducer";
|
|
13
13
|
import { resetFiltersReducer } from "./reset/reducer";
|
|
14
|
+
import { setCustomFilterAllValuesReducer } from "./custom-filters/set-custom-filter-all-values/reducer";
|
|
14
15
|
|
|
15
16
|
export const activityHistoryFiltersSlice = createSlice({
|
|
16
17
|
name: "activity-history-filters",
|
|
@@ -24,6 +25,7 @@ export const activityHistoryFiltersSlice = createSlice({
|
|
|
24
25
|
addCustomFilters: addCustomFiltersReducer,
|
|
25
26
|
setCustomFilterGroupValue: setCustomFilterGroupValueReducer,
|
|
26
27
|
setCustomFilterValue: setCustomFilterValueReducer,
|
|
28
|
+
setCustomFilterAllValues: setCustomFilterAllValuesReducer,
|
|
27
29
|
addDiagnosticFilters: addDiagnosticFiltersReducer,
|
|
28
30
|
setDiagnosticFilterValues: setDiagnosticFilterValuesReducer,
|
|
29
31
|
addUpFilters: addUpFiltersReducer,
|