beca-ui 0.1.27 → 0.1.28

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/beca-ui.js CHANGED
@@ -142460,14 +142460,14 @@ const ReactPaginate = /* @__PURE__ */ getDefaultExportFromCjs(reactPaginateExpor
142460
142460
  );
142461
142461
  const Z = useCallback(
142462
142462
  (T, S) => {
142463
- const R = document.querySelector(".react-pdf__Document");
142464
- if (R) {
142465
- const L = R.getBoundingClientRect();
142466
- console.log(m, a.isMultiple, Number(T.id)), h({
142463
+ const { isMultiple: R = !0 } = T, L = document.querySelector(".react-pdf__Document");
142464
+ if (L) {
142465
+ const I = L.getBoundingClientRect();
142466
+ h({
142467
142467
  ...m,
142468
- [a.isMultiple ? (/* @__PURE__ */ new Date()).getMilliseconds() : Number(T.id)]: {
142469
- left: S.x - L.x - 10,
142470
- top: S.y - L.y - 16,
142468
+ [R ? (/* @__PURE__ */ new Date()).getMilliseconds() : Number(T.id)]: {
142469
+ left: S.x - I.x - 10,
142470
+ top: S.y - I.y - 16,
142471
142471
  title: T.title,
142472
142472
  image: T.image,
142473
142473
  page: b
@@ -143070,15 +143070,14 @@ const PdfDragBox = memo(function a(s) {
143070
143070
  pdf: u,
143071
143071
  onSubmit: m,
143072
143072
  submitButton: h,
143073
- loading: p,
143074
- isMultiple: f = !0
143075
- } = s, b = useRef(null), y = () => {
143076
- var v;
143077
- return ((v = b == null ? void 0 : b.current) == null ? void 0 : v.getData()) ?? [];
143078
- }, Z = () => {
143073
+ loading: p
143074
+ } = s, f = useRef(null), b = () => {
143075
+ var M;
143076
+ return ((M = f == null ? void 0 : f.current) == null ? void 0 : M.getData()) ?? [];
143077
+ }, y = () => {
143079
143078
  if (m) {
143080
- const M = y();
143081
- m(M);
143079
+ const Z = b();
143080
+ m(Z);
143082
143081
  }
143083
143082
  };
143084
143083
  return /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, children: u ? /* @__PURE__ */ jsxs("div", { style: { overflow: "hidden", clear: "both", margin: "-.5rem" }, children: [
@@ -143098,28 +143097,29 @@ const PdfDragBox = memo(function a(s) {
143098
143097
  )
143099
143098
  }
143100
143099
  ),
143101
- d.map((M) => /* @__PURE__ */ jsx(
143100
+ d.map((Z) => /* @__PURE__ */ jsx(
143102
143101
  SourceBox,
143103
143102
  {
143104
143103
  color: Colors.BLUE,
143105
143104
  item: {
143106
- id: M.id,
143107
- image: M.image
143105
+ id: Z.id,
143106
+ image: Z.image,
143107
+ isMultiple: Z.isMultiple
143108
143108
  },
143109
143109
  children: /* @__PURE__ */ jsxs("div", { style: { fontSize: 12, textAlign: "center" }, children: [
143110
- /* @__PURE__ */ jsx("b", { children: M.title }),
143111
- /* @__PURE__ */ jsx("div", { children: M.text })
143110
+ /* @__PURE__ */ jsx("b", { children: Z.title }),
143111
+ /* @__PURE__ */ jsx("div", { children: Z.text })
143112
143112
  ] })
143113
143113
  },
143114
- M.id
143114
+ Z.id
143115
143115
  ))
143116
143116
  ] }),
143117
- /* @__PURE__ */ jsx("div", { className: "pdf-drag-section", children: /* @__PURE__ */ jsx(StatefulTargetBox, { ref: b, pdf: u, isMultiple: f }) }),
143117
+ /* @__PURE__ */ jsx("div", { className: "pdf-drag-section", children: /* @__PURE__ */ jsx(StatefulTargetBox, { ref: f, pdf: u }) }),
143118
143118
  /* @__PURE__ */ jsxs(
143119
143119
  "button",
143120
143120
  {
143121
143121
  className: "pdf-drag-submit-btn",
143122
- onClick: Z,
143122
+ onClick: y,
143123
143123
  style: h == null ? void 0 : h.style,
143124
143124
  disabled: p,
143125
143125
  children: [
@@ -5,6 +5,7 @@ export interface BoxItem {
5
5
  image?: string;
6
6
  title?: string;
7
7
  text?: string;
8
+ isMultiple?: boolean;
8
9
  }
9
10
  declare const PdfDragBox: React.NamedExoticComponent<PdfDragBoxProps>;
10
11
  export default PdfDragBox;
@@ -11,6 +11,5 @@ export interface PdfDragBoxProps {
11
11
  style?: React.CSSProperties;
12
12
  };
13
13
  loading?: boolean;
14
- isMultiple?: boolean;
15
14
  }
16
15
  export type { BoxItem, ContainerBoxItem };
@@ -3,6 +3,7 @@ export interface SourceBoxItem {
3
3
  id: React.Key;
4
4
  title?: string;
5
5
  image?: string;
6
+ isMultiple?: boolean;
6
7
  }
7
8
  export interface SourceBoxProps {
8
9
  color: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beca-ui",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Becawork UI",
5
5
  "license": "MIT",
6
6
  "author": {