@uxland/primary-shell 5.4.2 → 5.4.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/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +3 -3
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/utils.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/localization.d.ts +1 -0
- package/package.json +3 -3
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/template.ts +2 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/utils.ts +8 -2
- package/src/internal-plugins/activity-history/localization.ts +4 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxland/primary-shell",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"description": "Primaria Shell",
|
|
5
5
|
"author": "UXLand <dev@uxland.es>",
|
|
6
6
|
"homepage": "https://github.com/uxland/harmonix/tree/app#readme",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/uxland/harmonix/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@uxland/harmonix": "^1.
|
|
29
|
-
"@uxland/harmonix-adapters": "^1.0
|
|
28
|
+
"@uxland/harmonix": "^1.1.1",
|
|
29
|
+
"@uxland/harmonix-adapters": "^1.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@primaria/plugins-core": "^1.0.14",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { html, nothing } from "lit";
|
|
2
2
|
import { ActiveFiltersBadges } from "./active-filters-badges";
|
|
3
3
|
import { translate } from "../../../../localization";
|
|
4
|
-
import { formatShowFilterTitle, normalizeDeletedFilterBooleanValue } from "../../utils";
|
|
4
|
+
import { formatShowFilterTitle, normalizeDeletedFilterBooleanValue, normalizeEmptyFilterValue } from "../../utils";
|
|
5
5
|
|
|
6
6
|
const MAX_VISIBLE_CHIPS = 5;
|
|
7
7
|
|
|
8
8
|
const renderChip = (id, filter, value, props) => html`
|
|
9
9
|
<dss-chip
|
|
10
|
-
label=${value}
|
|
10
|
+
label=${normalizeEmptyFilterValue(value, filter.title)}
|
|
11
11
|
size="sm"
|
|
12
12
|
hasdelete
|
|
13
13
|
selected
|
|
@@ -5,5 +5,11 @@ export const formatShowFilterTitle = (title: string) => {
|
|
|
5
5
|
return filterTitle.charAt(0).toUpperCase() + filterTitle.slice(1);
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
export const normalizeDeletedFilterBooleanValue = (value) =>
|
|
9
|
-
|
|
8
|
+
export const normalizeDeletedFilterBooleanValue = (value) => (value === true ? translate("filters.deleted") : value);
|
|
9
|
+
|
|
10
|
+
export const normalizeEmptyFilterValue = (value, filterTitle) => (value === "" ? formatEmptyFilterValue(filterTitle) : value);
|
|
11
|
+
|
|
12
|
+
const formatEmptyFilterValue = (filterTitle) => {
|
|
13
|
+
const chipLabel = `${translate("chipHeader.without")} ${filterTitle.toLowerCase()}`;
|
|
14
|
+
return chipLabel;
|
|
15
|
+
};
|
|
@@ -2,15 +2,11 @@ import { PrimariaApi } from "../../api/api";
|
|
|
2
2
|
|
|
3
3
|
type LocaleKeys<T> = T extends object
|
|
4
4
|
? {
|
|
5
|
-
[K in keyof T]:
|
|
6
|
-
| `${K & string}`
|
|
7
|
-
| (T[K] extends object ? `${K & string}.${LocaleKeys<T[K]>}` : never);
|
|
5
|
+
[K in keyof T]: `${K & string}` | (T[K] extends object ? `${K & string}.${LocaleKeys<T[K]>}` : never);
|
|
8
6
|
}[keyof T]
|
|
9
7
|
: never;
|
|
10
8
|
|
|
11
|
-
export type ActivityHistoryLocales = LocaleKeys<
|
|
12
|
-
(typeof locales)[typeof defaultLang]["activity-history"]
|
|
13
|
-
>;
|
|
9
|
+
export type ActivityHistoryLocales = LocaleKeys<(typeof locales)[typeof defaultLang]["activity-history"]>;
|
|
14
10
|
|
|
15
11
|
const defaultLang = "ca";
|
|
16
12
|
|
|
@@ -85,12 +81,13 @@ export const locales = {
|
|
|
85
81
|
},
|
|
86
82
|
chipHeader: {
|
|
87
83
|
selection: "Selecció:",
|
|
84
|
+
without: "Sense",
|
|
88
85
|
},
|
|
89
86
|
error: {
|
|
90
87
|
general: {
|
|
91
88
|
title: "Hi ha hagut un problema durant la càrrega de contingut. Actualitza la pàgina o torna-ho a provar més tard.",
|
|
92
89
|
refresh: "Actualitzar pàgina",
|
|
93
|
-
noInfo: "No hi ha informació disponible.",
|
|
90
|
+
noInfo: "No hi ha informació disponible.",
|
|
94
91
|
},
|
|
95
92
|
partial: {
|
|
96
93
|
title: "Hi ha hagut un problema i no s'ha pogut carregar les notes de tipus",
|