bitz-react-admin-ui 2.9.0 → 2.10.0

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.
Files changed (48) hide show
  1. package/dist/_virtual/lodash.mjs +4 -0
  2. package/dist/components/BitzTable/Store/utils/index.d.ts +3 -1
  3. package/dist/components/BitzTable/Store/utils/index.mjs +26 -38
  4. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +35 -35
  5. package/dist/components/BitzTable/Table/index.mjs +454 -494
  6. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +144 -142
  7. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +55 -49
  8. package/dist/components/BitzTable/ToolBar/index.d.ts +3 -0
  9. package/dist/node_modules/lodash/lodash.mjs +3680 -0
  10. package/dist/node_modules/lodash-es/_SetCache.mjs +13 -0
  11. package/dist/node_modules/lodash-es/_arrayIncludes.mjs +8 -0
  12. package/dist/node_modules/lodash-es/_arrayIncludesWith.mjs +9 -0
  13. package/dist/node_modules/lodash-es/_arraySome.mjs +9 -0
  14. package/dist/node_modules/lodash-es/_baseFindIndex.mjs +9 -0
  15. package/dist/node_modules/lodash-es/_baseForOwn.mjs +8 -0
  16. package/dist/node_modules/lodash-es/_baseHasIn.mjs +6 -0
  17. package/dist/node_modules/lodash-es/_baseIndexOf.mjs +9 -0
  18. package/dist/node_modules/lodash-es/_baseIsEqual.mjs +8 -0
  19. package/dist/node_modules/lodash-es/_baseIsEqualDeep.mjs +32 -0
  20. package/dist/node_modules/lodash-es/_baseIsMatch.mjs +31 -0
  21. package/dist/node_modules/lodash-es/_baseIsNaN.mjs +6 -0
  22. package/dist/node_modules/lodash-es/_baseIteratee.mjs +11 -0
  23. package/dist/node_modules/lodash-es/_baseMatches.mjs +12 -0
  24. package/dist/node_modules/lodash-es/_baseMatchesProperty.mjs +17 -0
  25. package/dist/node_modules/lodash-es/_baseProperty.mjs +8 -0
  26. package/dist/node_modules/lodash-es/_basePropertyDeep.mjs +9 -0
  27. package/dist/node_modules/lodash-es/_baseUniq.mjs +34 -0
  28. package/dist/node_modules/lodash-es/_cacheHas.mjs +6 -0
  29. package/dist/node_modules/lodash-es/_createSet.mjs +10 -0
  30. package/dist/node_modules/lodash-es/_equalArrays.mjs +40 -0
  31. package/dist/node_modules/lodash-es/_equalByTag.mjs +45 -0
  32. package/dist/node_modules/lodash-es/_equalObjects.mjs +36 -0
  33. package/dist/node_modules/lodash-es/_getMatchData.mjs +12 -0
  34. package/dist/node_modules/lodash-es/_hasPath.mjs +19 -0
  35. package/dist/node_modules/lodash-es/_isStrictComparable.mjs +7 -0
  36. package/dist/node_modules/lodash-es/_mapToArray.mjs +9 -0
  37. package/dist/node_modules/lodash-es/_matchesStrictComparable.mjs +8 -0
  38. package/dist/node_modules/lodash-es/_setCacheAdd.mjs +7 -0
  39. package/dist/node_modules/lodash-es/_setCacheHas.mjs +6 -0
  40. package/dist/node_modules/lodash-es/_setToArray.mjs +9 -0
  41. package/dist/node_modules/lodash-es/_strictIndexOf.mjs +9 -0
  42. package/dist/node_modules/lodash-es/hasIn.mjs +8 -0
  43. package/dist/node_modules/lodash-es/mapValues.mjs +12 -0
  44. package/dist/node_modules/lodash-es/noop.mjs +5 -0
  45. package/dist/node_modules/lodash-es/property.mjs +10 -0
  46. package/dist/node_modules/lodash-es/uniq.mjs +7 -0
  47. package/dist/style.css +1 -1
  48. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ var o = { exports: {} };
2
+ export {
3
+ o as __module
4
+ };
@@ -10,5 +10,7 @@ export declare const loopFilter: (columns: any[], columnsMap: any) => any[];
10
10
  export declare const genColumnKey: (column: any, defaultKey?: any) => any;
11
11
  export declare const flattenColumns: (columns: any) => any[];
12
12
  export declare const columnSort: (columnsMap: Record<string, ColumnsConfigProps>) => (a: any, b: any) => number;
13
- export declare function updateNestedObject(obj: any, prop: any, val: any): {};
13
+ export declare function updateNestedObject(obj: any, prop: any, val: any): {
14
+ [x: string]: any;
15
+ };
14
16
  export declare const removePropertiesWithoutMutation: (obj: any, without: any) => {};
@@ -1,62 +1,50 @@
1
- const h = (e, r) => ((t, n) => t.map((d) => {
2
- const o = u(d, d.index), s = n[o];
3
- return s && s.show === !1 ? !1 : {
1
+ import { l as y } from "../../../../node_modules/lodash/lodash.mjs";
2
+ const I = (e, r) => ((t, i) => t.map((d) => {
3
+ const f = h(d, d.index), o = i[f];
4
+ return o && o.show === !1 ? !1 : {
4
5
  ...d,
5
- ...s
6
+ ...o
6
7
  // ...item?.isOperationCol && {
7
8
  // width: finish ? config?.width ?? item?.width : item?.width
8
9
  // },
9
10
  };
10
- }))(e, r).filter(Boolean), u = (e, r) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${r}`, k = (e) => {
11
+ }))(e, r).filter(Boolean), h = (e, r) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${r}`, k = (e) => {
11
12
  const r = [];
12
- function i(t) {
13
- t.children ? t.children.forEach(i) : t.dataIndex && !t.exportHidden && r.push({
13
+ function n(t) {
14
+ t.children ? t.children.forEach(n) : t.dataIndex && !t.exportHidden && r.push({
14
15
  field: t.dataIndex,
15
16
  title: t.title,
16
17
  show: !0
17
18
  });
18
19
  }
19
- return e.forEach(i), r;
20
- }, p = (e) => (r, i) => {
21
- var f, l, x, y;
22
- const { fixed: t, index: n } = r, { fixed: d, index: o } = i;
20
+ return e.forEach(n), r;
21
+ }, g = (e) => (r, n) => {
22
+ var s, l, x, u;
23
+ const { fixed: t, index: i } = r, { fixed: d, index: f } = n;
23
24
  if (t === "left" && d !== "left" || d === "right" && t !== "right")
24
25
  return -2;
25
26
  if (d === "left" && t !== "left" || t === "right" && d !== "right")
26
27
  return 2;
27
- const s = r.key || `${n}`, a = i.key || `${o}`;
28
- return (f = e[s]) != null && f.order || (l = e[a]) != null && l.order ? (((x = e[s]) == null ? void 0 : x.order) || 0) - (((y = e[a]) == null ? void 0 : y.order) || 0) : (r.index || 0) - (i.index || 0);
28
+ const o = r.key || `${i}`, a = n.key || `${f}`;
29
+ return (s = e[o]) != null && s.order || (l = e[a]) != null && l.order ? (((x = e[o]) == null ? void 0 : x.order) || 0) - (((u = e[a]) == null ? void 0 : u.order) || 0) : (r.index || 0) - (n.index || 0);
29
30
  };
30
- function I(e, r, i) {
31
- const t = {};
32
- let n = "";
33
- const d = (o, s, a) => {
34
- for (const f in o)
35
- if (o.hasOwnProperty(f) && (typeof o[f] == "object" && o[f] !== null && (n = f, t[f] = { ...o[f] }, d(o[f], s, a)), f === s)) {
36
- const l = t[n];
37
- t[n] = {
38
- ...l,
39
- [s]: a
40
- // [prop]: current.disabled || current.fixed ? true : val,
41
- }, n = "";
42
- }
43
- };
44
- return d(e, r, i), t;
31
+ function K(e, r, n) {
32
+ return y.mapValues(e, (t) => ({ ...t, [r]: n }));
45
33
  }
46
- const c = (e, r) => {
47
- let i = {};
34
+ const p = (e, r) => {
35
+ let n = {};
48
36
  for (let t in e)
49
37
  if (e.hasOwnProperty(t)) {
50
- let n = e[t];
51
- typeof n == "object" && n !== null && (n = c(n, r)), r.includes(t) || (i[t] = n);
38
+ let i = e[t];
39
+ typeof i == "object" && i !== null && (i = p(i, r)), r.includes(t) || (n[t] = i);
52
40
  }
53
- return i;
41
+ return n;
54
42
  };
55
43
  export {
56
- p as columnSort,
44
+ g as columnSort,
57
45
  k as flattenColumns,
58
- u as genColumnKey,
59
- h as loopFilter,
60
- c as removePropertiesWithoutMutation,
61
- I as updateNestedObject
46
+ h as genColumnKey,
47
+ I as loopFilter,
48
+ p as removePropertiesWithoutMutation,
49
+ K as updateNestedObject
62
50
  };
@@ -1,66 +1,66 @@
1
1
  import { j as a } from "../../../node_modules/react/jsx-runtime.mjs";
2
- import { Resizable as v } from "../../../node_modules/react-resizable/index.mjs";
3
- import { useState as E, useMemo as b, useRef as i } from "react";
4
- import L from "../../../node_modules/classnames/index.mjs";
2
+ import { Resizable as X } from "../../../node_modules/react-resizable/index.mjs";
3
+ import { useState as v, useMemo as b, useRef as o } from "react";
4
+ import E from "../../../node_modules/classnames/index.mjs";
5
5
  const d = 56, C = (p) => {
6
- const { hasScrollBar: g, scrollbarSize: y, onResize: x, width: n, datagridref: S, stretchref: u, ...j } = p, [D, m] = E(!1), R = b(() => {
7
- var t, z;
8
- const e = { ...j };
9
- return ((t = e.className) == null ? void 0 : t.includes("ant-table-cell-fix-right")) && !g && ((z = e.style) != null && z.right) && (e.style = { ...e.style ?? {} }, e.style.right = Number(e.style.right ?? 0) - (y || 0)), e;
10
- }, [p]), c = i(0), f = i(0), r = i(0), l = i(0), o = i(!1), h = b(() => c.current - n + d, [c.current, n]);
6
+ const { hasScrollBar: x, scrollbarSize: L, onResize: g, width: n, datagridref: S, stretchref: u, ...y } = p, [j, m] = v(!1), R = b(() => {
7
+ var e, z;
8
+ const t = { ...y };
9
+ return ((e = t.className) == null ? void 0 : e.includes("ant-table-cell-fix-right")) && !x && ((z = t.style) != null && z.right), t;
10
+ }, [p]), c = o(0), f = o(0), r = o(0), i = o(0), l = o(!1), h = b(() => c.current - n + d, [c.current, n]);
11
11
  if (!n)
12
12
  return /* @__PURE__ */ a.jsx("th", { ...R });
13
- const N = (e) => {
14
- if (r.current = e.clientX - f.current, n + r.current - c.current <= d || r.current < h) {
15
- o.current = !0;
13
+ const D = (t) => {
14
+ if (r.current = t.clientX - f.current, n + r.current - c.current <= d || r.current < h) {
15
+ l.current = !0;
16
16
  return;
17
17
  }
18
- r.current >= h && o.current && (r.current = h, o.current = !1);
19
- const t = u.current;
20
- l.current = r.current, t.style.left = `${l.current}px`;
21
- }, w = (e) => {
18
+ r.current >= h && l.current && (r.current = h, l.current = !1);
19
+ const e = u.current;
20
+ i.current = r.current, e.style.left = `${i.current}px`;
21
+ }, w = (t) => {
22
22
  m(!0);
23
23
  const s = u.current;
24
24
  s.style.opacity = 1, s.style.pointerEvents = "auto", f.current = S.current.getBoundingClientRect().left;
25
- const t = e.clientX - f.current;
26
- l.current = t, s.style.left = `${t}px`, c.current = t, r.current = t;
27
- }, P = (e, s) => {
28
- o.current = !1, m(!1);
29
- const t = u.current;
30
- t.style.opacity = 0, t.style.pointerEvents = "none", setTimeout(() => {
31
- t.style.left = "0px";
32
- }, 200), x(
33
- e,
25
+ const e = t.clientX - f.current;
26
+ i.current = e, s.style.left = `${e}px`, c.current = e, r.current = e;
27
+ }, N = (t, s) => {
28
+ l.current = !1, m(!1);
29
+ const e = u.current;
30
+ e.style.opacity = 0, e.style.pointerEvents = "none", setTimeout(() => {
31
+ e.style.left = "0px";
32
+ }, 200), g(
33
+ t,
34
34
  {
35
35
  ...s,
36
36
  minWidth: d,
37
37
  size: {
38
38
  ...s.size,
39
- width: n + l.current - c.current
39
+ width: n + i.current - c.current
40
40
  }
41
41
  }
42
- ), l.current = 0, c.current = 0, r.current = 0;
43
- }, X = /* @__PURE__ */ a.jsx(
42
+ ), i.current = 0, c.current = 0, r.current = 0;
43
+ }, P = /* @__PURE__ */ a.jsx(
44
44
  "span",
45
45
  {
46
46
  className: "bitzResizableHandle",
47
- onClick: (e) => {
48
- e.stopPropagation(), e.preventDefault();
47
+ onClick: (t) => {
48
+ t.stopPropagation(), t.preventDefault();
49
49
  }
50
50
  }
51
51
  );
52
52
  return /* @__PURE__ */ a.jsx(
53
- v,
53
+ X,
54
54
  {
55
55
  width: n,
56
56
  height: 0,
57
- handle: X,
58
- className: L("bitzResizable", {
59
- disabledUserSelect: D
57
+ handle: P,
58
+ className: E("bitzResizable", {
59
+ disabledUserSelect: j
60
60
  }),
61
- onResize: N,
61
+ onResize: D,
62
62
  onResizeStart: w,
63
- onResizeStop: P,
63
+ onResizeStop: N,
64
64
  draggableOpts: { enableUserSelectHack: !1 },
65
65
  children: /* @__PURE__ */ a.jsx("th", { ...R })
66
66
  }