@hortiview/shared-components 0.0.9023 → 0.0.9183

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.
@@ -1,22 +1,53 @@
1
- import { capitalizeFirstLetters as s } from "./UtilService.js";
2
- import { getBlockNumberByDto as i } from "./BlockService.js";
3
- import { d as r, t as o, g as e } from "../vi.JYQecGiw-BbUbJcT8.js";
4
- r("Services Test", () => {
5
- r("capitalizeFirstLetters", () => {
6
- o("should capitalize first letters of a lower case string", () => {
7
- const t = s("farm location");
8
- e(t).toBe("Farm Location");
9
- }), o("should turn other letters of an all caps string into lower case", () => {
10
- const t = s("FARM LOCATION");
11
- e(t).toBe("Farm Location");
1
+ import { getBlockNumberByDto as r } from "./BlockService.js";
2
+ import { capitalizeFirstLetters as i, trimLeadingAndTrailingSpaces as o } from "./UtilService.js";
3
+ import { d as n, t as e, g as s } from "../vi.JYQecGiw-BbUbJcT8.js";
4
+ n("Services Test", () => {
5
+ n("capitalizeFirstLetters", () => {
6
+ e("should capitalize first letters of a lower case string", () => {
7
+ const t = i("farm location");
8
+ s(t).toBe("Farm Location");
9
+ }), e("should turn other letters of an all caps string into lower case", () => {
10
+ const t = i("FARM LOCATION");
11
+ s(t).toBe("Farm Location");
12
12
  });
13
- }), r("getBlockNumberByDto", () => {
14
- o("should get zero", () => {
15
- const t = i({ position: void 0 }, 3);
16
- e(t).toBe(0);
17
- }), o("should get 3", () => {
18
- const t = i({ position: { row: 1, column: 3 } }, 3);
19
- e(t).toBe(3);
13
+ }), n("getBlockNumberByDto", () => {
14
+ e("should get zero", () => {
15
+ const t = r({ position: void 0 }, 3);
16
+ s(t).toBe(0);
17
+ }), e("should get 3", () => {
18
+ const t = r({ position: { row: 1, column: 3 } }, 3);
19
+ s(t).toBe(3);
20
+ });
21
+ }), n("Test trimLeadingAndTrailingSpaces", () => {
22
+ e("should remove leading spaces", () => {
23
+ s(o({ test: " test-1" })).toEqual({ test: "test-1" });
24
+ }), e("should remove trailing spaces", () => {
25
+ s(o({ test: "test-1 " })).toEqual({ test: "test-1" });
26
+ }), e("should not remove other spaces than the leading and trailing once", () => {
27
+ s(o({ test: " t e s t 1 " })).toEqual({ test: "t e s t 1" });
28
+ }), e("should remove leading and trailing spaces", () => {
29
+ s(o({ test1: " test-1 ", test2: "test-2 " })).toEqual({
30
+ test1: "test-1",
31
+ test2: "test-2"
32
+ });
33
+ }), e("should not change other values than strings", () => {
34
+ s(o({ test1: " test-1 ", test2: 123456 })).toEqual({
35
+ test1: "test-1",
36
+ test2: 123456
37
+ });
38
+ }), e("should remove spaces from strings in an nested object", () => {
39
+ s(o({ test1: " test-1 ", test2: { nestedObjectKey: "test-2 " } })).toEqual({
40
+ test1: "test-1",
41
+ test2: { nestedObjectKey: "test-2" }
42
+ });
43
+ }), e("should remove spaces from strings of an array", () => {
44
+ s(o({
45
+ test1: " test-1 ",
46
+ test2: { nestedObjectKey: ["test-2 ", " test-3 ", 2345] }
47
+ })).toEqual({
48
+ test1: "test-1",
49
+ test2: { nestedObjectKey: ["test-2", "test-3", 2345] }
50
+ });
20
51
  });
21
52
  });
22
53
  });
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": "0.0.9023",
4
+ "version": "0.0.9183",
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>",
@@ -1,91 +0,0 @@
1
- import { c as o, g as j } from "./_commonjsHelpers-CT_km90n.js";
2
- var $ = typeof o == "object" && o && o.Object === Object && o, p = $, S = p, T = typeof self == "object" && self && self.Object === Object && self, _ = S || T || Function("return this")(), c = _, O = c, d = O.Symbol, f = d, i = f, g = Object.prototype, m = g.hasOwnProperty, h = g.toString, e = i ? i.toStringTag : void 0;
3
- function P(r) {
4
- var t = m.call(r, e), a = r[e];
5
- try {
6
- r[e] = void 0;
7
- var l = !0;
8
- } catch {
9
- }
10
- var y = h.call(r);
11
- return l && (t ? r[e] = a : delete r[e]), y;
12
- }
13
- var F = P, k = Object.prototype, w = k.toString;
14
- function G(r) {
15
- return w.call(r);
16
- }
17
- var N = G, s = f, x = F, A = N, I = "[object Null]", M = "[object Undefined]", u = s ? s.toStringTag : void 0;
18
- function R(r) {
19
- return r == null ? r === void 0 ? M : I : u && u in Object(r) ? x(r) : A(r);
20
- }
21
- var C = R;
22
- function D(r) {
23
- var t = typeof r;
24
- return r != null && (t == "object" || t == "function");
25
- }
26
- var b = D, E = C, J = b, V = "[object AsyncFunction]", L = "[object Function]", H = "[object GeneratorFunction]", K = "[object Proxy]";
27
- function U(r) {
28
- if (!J(r))
29
- return !1;
30
- var t = E(r);
31
- return t == L || t == H || t == V || t == K;
32
- }
33
- var q = U, z = c, B = z["__core-js_shared__"], Q = B, n = Q, v = function() {
34
- var r = /[^.]+$/.exec(n && n.keys && n.keys.IE_PROTO || "");
35
- return r ? "Symbol(src)_1." + r : "";
36
- }();
37
- function W(r) {
38
- return !!v && v in r;
39
- }
40
- var X = W, Y = Function.prototype, Z = Y.toString;
41
- function rr(r) {
42
- if (r != null) {
43
- try {
44
- return Z.call(r);
45
- } catch {
46
- }
47
- try {
48
- return r + "";
49
- } catch {
50
- }
51
- }
52
- return "";
53
- }
54
- var tr = rr, er = q, ar = X, or = b, nr = tr, cr = /[\\^$.*+?()[\]{}|]/g, ir = /^\[object .+?Constructor\]$/, sr = Function.prototype, ur = Object.prototype, vr = sr.toString, fr = ur.hasOwnProperty, gr = RegExp(
55
- "^" + vr.call(fr).replace(cr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
56
- );
57
- function br(r) {
58
- if (!or(r) || ar(r))
59
- return !1;
60
- var t = er(r) ? gr : ir;
61
- return t.test(nr(r));
62
- }
63
- var lr = br;
64
- function yr(r, t) {
65
- return r?.[t];
66
- }
67
- var jr = yr, $r = lr, pr = jr;
68
- function Sr(r, t) {
69
- var a = pr(r, t);
70
- return $r(a) ? a : void 0;
71
- }
72
- var Tr = Sr, _r = Tr, Or = c, dr = _r(Or, "Map"), wr = dr;
73
- function mr(r) {
74
- return r != null && typeof r == "object";
75
- }
76
- var Gr = mr, hr = Array.isArray, Pr = hr;
77
- const Nr = /* @__PURE__ */ j(Pr);
78
- export {
79
- wr as _,
80
- Pr as a,
81
- c as b,
82
- f as c,
83
- Tr as d,
84
- C as e,
85
- tr as f,
86
- Gr as g,
87
- p as h,
88
- Nr as i,
89
- b as j,
90
- q as k
91
- };