@hortiview/shared-components 2.27.1 → 2.27.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/CHANGELOG.md +17 -0
- package/dist/assets/ModulePadding.css +1 -0
- package/dist/components/DeleteModal/DeleteModal.js +2 -2
- package/dist/components/EmptyView/EmptyView.js +2 -2
- package/dist/components/Filter/Filter.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +4 -4
- package/dist/components/ModulePadding/ModulePadding.js +12 -9
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/Select/Select.js +43 -26
- package/dist/{index.es-CVPUG1pf.js → index.es-B_BTuoBa.js} +1 -1
- package/dist/{index.es-DVgCBhVx.js → index.es-DLEY03HG.js} +1 -1
- package/dist/{isString-BNdV0Jpg.js → isString-C0tJxuT4.js} +2 -2
- package/dist/main.d.ts +1 -1
- package/dist/main.js +56 -55
- package/dist/react-tooltip.min-D7xPMD-P.js +1390 -0
- package/dist/services/UtilService.d.ts +5 -0
- package/dist/services/UtilService.js +15 -14
- package/package.json +1 -1
- package/dist/floating-ui.dom-CeD8zknG.js +0 -978
- package/dist/react-tooltip.min-Dkz5ltCC.js +0 -420
|
@@ -12,6 +12,11 @@ export declare const capitalizeFirstLetters: (text: string) => string;
|
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
14
|
export declare const trimLeadingAndTrailingSpaces: <T extends Record<string, unknown>>(obj: T) => T;
|
|
15
|
+
/**
|
|
16
|
+
* Flattens any nested object into a single searchable string.
|
|
17
|
+
* Useful for option objects where the searchable text can live at any depth.
|
|
18
|
+
*/
|
|
19
|
+
export declare const flattenObjectToString: (value: unknown) => string;
|
|
15
20
|
/**
|
|
16
21
|
* Receives a number and returns the value as a locale string.
|
|
17
22
|
* Note: Should only be used for displaying numbers, not for calculations
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
1
|
+
import { i as o } from "../isArray-olhCpv2e.js";
|
|
2
|
+
import { i as e, a as m } from "../isString-C0tJxuT4.js";
|
|
3
|
+
import { isValidElement as a } from "react";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "../isEmpty-l2xQKl4x.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "../react-tooltip.min-Dkz5ltCC.js";
|
|
6
|
+
import "../react-tooltip.min-D7xPMD-P.js";
|
|
8
7
|
import "../orderBy-Ce85KqD6.js";
|
|
9
8
|
import "../index-CuHybtft.js";
|
|
10
9
|
import "../components/SharedComponentsPermissionProvider/PermissionContext.js";
|
|
@@ -14,20 +13,22 @@ import "react-hook-form";
|
|
|
14
13
|
import "../get-CBFiuc3f.js";
|
|
15
14
|
import "../omit-BWQrFyQ-.js";
|
|
16
15
|
import { DATE_FORMAT as c } from "../types/Time.js";
|
|
16
|
+
import { AVAILABLE_LOCALES as g, LANGUAGE_CODES_MAPPER as p } from "../types/Languages.js";
|
|
17
17
|
import "../react.esm-DF7i80eN.js";
|
|
18
|
-
const P = (t) => t.split(" ").map((r) => r.charAt(0).toUpperCase() + r.slice(1).toLowerCase()).join(" "),
|
|
19
|
-
Object.entries(t).map(([r, i]) => [r,
|
|
20
|
-
),
|
|
18
|
+
const P = (t) => t.split(" ").map((r) => r.charAt(0).toUpperCase() + r.slice(1).toLowerCase()).join(" "), A = (t) => Object.fromEntries(
|
|
19
|
+
Object.entries(t).map(([r, i]) => [r, f(i)])
|
|
20
|
+
), n = (t) => t == null || a(t) ? "" : e(t) || typeof t == "number" || typeof t == "boolean" || typeof t == "bigint" ? String(t) : o(t) ? t.map(n).filter(Boolean).join(" ") : m(t) ? Object.values(t).map(n).filter(Boolean).join(" ") : "", f = (t) => o(t) ? t.map(f) : m(t) ? A(t) : e(t) ? t.trim() : t, U = (t, r, i = 2) => {
|
|
21
21
|
if (!r) return "0";
|
|
22
|
-
const
|
|
23
|
-
return r.toLocaleString(
|
|
24
|
-
},
|
|
25
|
-
|
|
22
|
+
const s = p[t];
|
|
23
|
+
return r.toLocaleString(s, { maximumFractionDigits: i });
|
|
24
|
+
}, G = (t, r = "en-US", i = c) => g.includes(r) ? new Intl.DateTimeFormat(
|
|
25
|
+
p[r],
|
|
26
26
|
i
|
|
27
27
|
).format(new Date(t)) : new Intl.DateTimeFormat(r, i).format(new Date(t));
|
|
28
28
|
export {
|
|
29
29
|
P as capitalizeFirstLetters,
|
|
30
|
-
|
|
30
|
+
n as flattenObjectToString,
|
|
31
|
+
G as getFormattedDateTime,
|
|
31
32
|
U as getNumberAsLocaleString,
|
|
32
|
-
|
|
33
|
+
A as trimLeadingAndTrailingSpaces
|
|
33
34
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "2.27.
|
|
4
|
+
"version": "2.27.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|