@oliasoft-open-source/react-ui-library 6.1.0-beta-5 → 6.1.0-beta-6

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.
@@ -40,6 +40,7 @@ interface IAuditLogProps {
40
40
  rowsPerPage: number;
41
41
  filterToggles?: FilterToggle[];
42
42
  sectionNames: ISectionName[];
43
+ defaultSectionName?: string;
43
44
  transformDiffsConfig?: TransformDiffsConfig;
44
45
  onSelectPage: (page: number) => void;
45
46
  onChangeRowsPerPage: (n: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/audit-log.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAmB,YAAY,EAAkB,MAAM,SAAS,CAAC;AAExE,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;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AC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,UAAU,cAAc;IACtB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,IAAI,EAAE,GAAG,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,GAAG,EAAE,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;CAChD;AA2CD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAsJ7C,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { ISectionName } from './utils';
2
2
  import { TTransformedDiff } from './audit-log';
3
- export declare const ChangesOverview: ({ sectionNames, userName, diffs, }: {
3
+ export declare const ChangesOverview: ({ sectionNames, userName, diffs, defaultSectionName, }: {
4
4
  sectionNames: ISectionName[];
5
5
  userName: string;
6
6
  diffs: TTransformedDiff[];
7
+ defaultSectionName?: string;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
8
9
  //# sourceMappingURL=changes-overview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changes-overview.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/changes-overview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA8E/C,eAAO,MAAM,eAAe,GAAI,oCAI7B;IACD,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B,4CAgCA,CAAC"}
1
+ {"version":3,"file":"changes-overview.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/changes-overview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA8E/C,eAAO,MAAM,eAAe,GAAI,wDAK7B;IACD,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,4CAgCA,CAAC"}
@@ -12,11 +12,12 @@ export declare const viewTypes: Readonly<{
12
12
  value: string;
13
13
  };
14
14
  }>;
15
- export declare const ComparisonViewModal: ({ auditLog, auditLogs, data, isOpen, transformDiffsConfig, sectionNames, onClose, }: {
15
+ export declare const ComparisonViewModal: ({ auditLog, auditLogs, data, isOpen, transformDiffsConfig, sectionNames, defaultSectionName, onClose, }: {
16
16
  auditLog: AuditLogItem;
17
17
  auditLogs: AuditLogItem[];
18
18
  data: any;
19
19
  sectionNames: ISectionName[];
20
+ defaultSectionName?: string;
20
21
  isOpen: boolean;
21
22
  transformDiffsConfig?: TransformDiffsConfig;
22
23
  onClose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"comparison-view-modal.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/comparison-view-modal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,EAA+B,YAAY,EAAc,MAAM,QAAQ,CAAC;AAE/E,OAAO,EAAkB,YAAY,EAAkB,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,qFAQjC;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,mDA0DA,CAAC"}
1
+ {"version":3,"file":"comparison-view-modal.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/comparison-view-modal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,EAA+B,YAAY,EAAc,MAAM,QAAQ,CAAC;AAE/E,OAAO,EAAkB,YAAY,EAAkB,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,yGASjC;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,mDA2DA,CAAC"}
@@ -16,7 +16,7 @@ export interface ISectionName {
16
16
  sectionKey: string;
17
17
  sectionLabel: string;
18
18
  }
19
- export declare const getSectionName: (sectionNames: ISectionName[], sectionPath: string[]) => string;
19
+ export declare const getSectionName: (sectionNames: ISectionName[], sectionPath: string[], defaultSectionName?: string) => string;
20
20
  export declare const toText: (v: any) => string;
21
21
  export declare const defaultMessage: (deltaFormat: any[]) => DefaultMessage;
22
22
  export type JsonDelta = any;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAUrB,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA6DF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GACzB,cAAc,YAAY,EAAE,EAC5B,aAAa,MAAM,EAAE,KACpB,MAUF,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,GAAG,GAAG,WAuB5B,CAAC;AAE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I,GAAG,GAAG,WAuB5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,aAAa,GAAG,EAAE,KAAG,cAqBnD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC;AAoB5B,eAAO,MAAM,eAAe,GAAI,KAAK,YAAY,uBAA8B,CAAC;AAEhF,eAAO,MAAM,cAAc,GACzB,UAAU,YAAY,EACtB,WAAW,YAAY,EAAE,EACzB,MAAM,GAAG,KACR;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAwDpD,CAAC;AA8BF,eAAO,MAAM,cAAc,GACzB,OAAO,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,EACrC,SAAQ,oBAAyB,uBASlC,CAAC"}
package/dist/index.js CHANGED
@@ -8791,13 +8791,13 @@ var Cf = (e = {}) => Sf({
8791
8791
  minLength: 120
8792
8792
  },
8793
8793
  cloneDiffValues: !0
8794
- }), wf = ["user", "unittemplate"], Tf = Cf(), Ef = (e, t) => {
8795
- let n = Object.fromEntries((e || []).map((e) => [e.sectionKey, e.sectionLabel]));
8794
+ }), wf = ["user", "unittemplate"], Tf = Cf(), Ef = (e, t, n) => {
8795
+ let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
8796
8796
  for (let e = t.length - 1; e >= 0; e--) {
8797
- let r = n[t[e]];
8798
- if (r) return r;
8797
+ let n = r[t[e]];
8798
+ if (n) return n;
8799
8799
  }
8800
- return "";
8800
+ return n || "";
8801
8801
  }, Df = (e) => {
8802
8802
  let t = (e) => Fn(e) ? qn(e) : String(e);
8803
8803
  return Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : e.map(t).join(", ") : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : t(e);
@@ -8913,19 +8913,19 @@ var Cf = (e = {}) => Sf({
8913
8913
  case "deleted": return `${e} deleted ${o}${c}.`;
8914
8914
  default: return `${e} changed ${n}${c}.`;
8915
8915
  }
8916
- }, zf = ({ sectionNames: e, userName: t, diffs: n }) => /* @__PURE__ */ z(_c, { table: {
8916
+ }, zf = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ z(_c, { table: {
8917
8917
  headers: [{ cells: [{ value: "Changes" }] }],
8918
8918
  rows: n.map((n) => {
8919
- let { deltaFormat: r, path: i } = n, a = Ef(e, i);
8920
- console.log(e, i, a);
8921
- let { type: o, before: s, after: c } = Of(r);
8919
+ let { deltaFormat: i, path: a } = n, o = Ef(e, a, r);
8920
+ console.log(e, a, o);
8921
+ let { type: s, before: c, after: l } = Of(i);
8922
8922
  return { cells: [{ value: Rf({
8923
8923
  userName: t,
8924
- type: o,
8925
- property: Lf(i),
8926
- before: s,
8927
- after: c,
8928
- sectionName: a
8924
+ type: s,
8925
+ property: Lf(a),
8926
+ before: c,
8927
+ after: l,
8928
+ sectionName: o
8929
8929
  }) }] };
8930
8930
  })
8931
8931
  } }), Bf = Object.freeze({
@@ -8937,13 +8937,13 @@ var Cf = (e = {}) => Sf({
8937
8937
  label: "Compare",
8938
8938
  value: "compare"
8939
8939
  }
8940
- }), Vf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, onClose: o }) => {
8941
- let s = [Bf.summary, Bf.compare].map(({ label: e, value: t }) => ({
8940
+ }), Vf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
8941
+ let c = [Bf.summary, Bf.compare].map(({ label: e, value: t }) => ({
8942
8942
  label: e,
8943
8943
  value: t
8944
- })), [c, l] = m(s[0]), { diffs: u = void 0 } = e || {};
8945
- if (!u) return null;
8946
- let { oldJson: d, newJson: f, error: p } = Mf(e, t, n);
8944
+ })), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
8945
+ if (!d) return null;
8946
+ let { oldJson: f, newJson: p, error: h } = Mf(e, t, n);
8947
8947
  return /* @__PURE__ */ z(Ka, {
8948
8948
  visible: r,
8949
8949
  centered: !0,
@@ -8952,25 +8952,26 @@ var Cf = (e = {}) => Sf({
8952
8952
  heading: "Comparison view",
8953
8953
  content: /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Du, {
8954
8954
  name: "ViewTab",
8955
- onChange: (e) => l(s.find((t) => t.value === e.target.value)),
8956
- options: s,
8957
- value: c
8958
- }), c.value === "summary" ? /* @__PURE__ */ z(zf, {
8955
+ onChange: (e) => u(c.find((t) => t.value === e.target.value)),
8956
+ options: c,
8957
+ value: l
8958
+ }), l.value === "summary" ? /* @__PURE__ */ z(zf, {
8959
8959
  userName: e.userName,
8960
8960
  sectionNames: a,
8961
- diffs: Pf(u, i)
8962
- }) : p ? /* @__PURE__ */ z("div", {
8961
+ diffs: Pf(d, i),
8962
+ defaultSectionName: o
8963
+ }) : h ? /* @__PURE__ */ z("div", {
8963
8964
  style: { padding: 16 },
8964
- children: p
8965
+ children: h
8965
8966
  }) : /* @__PURE__ */ z(kd, {
8966
- oldJson: d,
8967
- newJson: f
8967
+ oldJson: f,
8968
+ newJson: p
8968
8969
  })] }),
8969
8970
  footer: /* @__PURE__ */ z(K, {
8970
8971
  label: "Cancel",
8971
- onClick: o
8972
+ onClick: s
8972
8973
  }),
8973
- onClose: o,
8974
+ onClose: s,
8974
8975
  width: "90vw",
8975
8976
  height: "90vh"
8976
8977
  } })
@@ -8999,29 +9000,29 @@ var Cf = (e = {}) => Sf({
8999
9000
  case "Updated": return `Updated by ${r} (${c})`;
9000
9001
  default: return `Change by ${r}`;
9001
9002
  }
9002
- }, Wf = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, filterToggles: s = [], transformDiffsConfig: c, onChangeRowsPerPage: l, onSelectPage: u, onClickSnapshot: d, snapshotLoading: f, getActions: p, isLogDisabled: h }) => {
9003
- let [g, _] = m(!1), [v, y] = m(null), b = (e) => {
9003
+ }, Wf = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: h, isLogDisabled: g }) => {
9004
+ let [_, v] = m(!1), [y, b] = m(null), x = (e) => {
9004
9005
  if (e.snapshot) {
9005
- d == null || d(e.snapshot, e);
9006
+ f == null || f(e.snapshot, e);
9006
9007
  return;
9007
9008
  }
9008
- y(e), _(!0);
9009
- }, x = [{ cells: [
9009
+ b(e), v(!0);
9010
+ }, S = [{ cells: [
9010
9011
  { value: "Change" },
9011
9012
  { value: "Modified by" },
9012
9013
  { value: "Using" },
9013
9014
  { value: "Operation" },
9014
9015
  { value: "Date" }
9015
- ] }], S = e.map((e) => {
9016
+ ] }], C = e.map((e) => {
9016
9017
  var t;
9017
- let n = (t = h == null ? void 0 : h(e)) == null ? !!(e.snapshot && f || !e.diffs) : t;
9018
+ let n = (t = g == null ? void 0 : g(e)) == null ? !!(e.snapshot && p || !e.diffs) : t;
9018
9019
  return {
9019
9020
  cells: [
9020
9021
  {
9021
- value: e.snapshot ? `Snapshot: ${e.snapshot}` : Uf(e, c),
9022
+ value: e.snapshot ? `Snapshot: ${e.snapshot}` : Uf(e, l),
9022
9023
  type: "Link",
9023
9024
  disabled: n,
9024
- onClick: n ? void 0 : () => b(e),
9025
+ onClick: n ? void 0 : () => x(e),
9025
9026
  breakWord: !0
9026
9027
  },
9027
9028
  {
@@ -9044,14 +9045,14 @@ var Cf = (e = {}) => Sf({
9044
9045
  type: "Static"
9045
9046
  }
9046
9047
  ],
9047
- actions: p == null ? void 0 : p(e)
9048
+ actions: h == null ? void 0 : h(e)
9048
9049
  };
9049
9050
  });
9050
9051
  return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(ia, {
9051
9052
  heading: /* @__PURE__ */ B(jl, {
9052
9053
  gap: !0,
9053
9054
  wrap: !0,
9054
- children: [/* @__PURE__ */ z(ya, { children: "Changes" }), s.map((e) => {
9055
+ children: [/* @__PURE__ */ z(ya, { children: "Changes" }), c.map((e) => {
9055
9056
  var t;
9056
9057
  return /* @__PURE__ */ z(ll, {
9057
9058
  small: (t = e.small) == null ? !0 : t,
@@ -9068,9 +9069,9 @@ var Cf = (e = {}) => Sf({
9068
9069
  theme: Ar.WHITE,
9069
9070
  children: /* @__PURE__ */ z(gi, { dark: !0 })
9070
9071
  }) : /* @__PURE__ */ z(_c, { table: {
9071
- headers: x,
9072
+ headers: S,
9072
9073
  testId: "auditlog-table",
9073
- rows: S,
9074
+ rows: C,
9074
9075
  fixedWidth: "100%",
9075
9076
  bordered: !1,
9076
9077
  actionsRight: !0,
@@ -9079,23 +9080,24 @@ var Cf = (e = {}) => Sf({
9079
9080
  selectedPage: i,
9080
9081
  rowsPerPage: {
9081
9082
  onChange: (e) => {
9082
- l(Number(e.target.value));
9083
+ u(Number(e.target.value));
9083
9084
  },
9084
9085
  options: Hf,
9085
9086
  value: a
9086
9087
  },
9087
- onSelectPage: (e) => u(e),
9088
+ onSelectPage: (e) => d(e),
9088
9089
  small: !0
9089
9090
  } }
9090
9091
  } })
9091
- }), g && v && v.diffs && /* @__PURE__ */ z(Vf, {
9092
+ }), _ && y && y.diffs && /* @__PURE__ */ z(Vf, {
9092
9093
  sectionNames: o,
9093
- isOpen: g,
9094
- onClose: () => _(!1),
9094
+ isOpen: _,
9095
+ onClose: () => v(!1),
9095
9096
  auditLogs: e,
9096
- auditLog: v,
9097
+ auditLog: y,
9098
+ defaultSectionName: s,
9097
9099
  data: t,
9098
- transformDiffsConfig: c
9100
+ transformDiffsConfig: l
9099
9101
  })] });
9100
9102
  }, Gf = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
9101
9103
  let i = window.location.href, a = p(i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "6.1.0-beta-5",
3
+ "version": "6.1.0-beta-6",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {