jclib-ui 1.0.160 → 1.0.162

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.
@@ -4222,7 +4222,7 @@ function createApiConfig(obj = initConfig) {
4222
4222
  result.auth = { ...initConfig.auth, ...obj.auth };
4223
4223
  return result;
4224
4224
  }
4225
- const Container$8 = styled.div`
4225
+ const Container$7 = styled.div`
4226
4226
  @media (max-width: 767px) {
4227
4227
  overflow-x: auto;
4228
4228
  }
@@ -4556,7 +4556,7 @@ function Table({
4556
4556
  }
4557
4557
  if (!dados || dados.length == 0)
4558
4558
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "alert alert-warning", children: msgSemDados });
4559
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$8, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableContainer, { alignTop, sizeBreak, hasBorder: border, children: [
4559
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$7, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableContainer, { alignTop, sizeBreak, hasBorder: border, children: [
4560
4560
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { colunas, incColActions }),
4561
4561
  /* @__PURE__ */ jsxRuntimeExports.jsx(
4562
4562
  TableBody,
@@ -4892,7 +4892,7 @@ function BoxColor({ corFonte, setCorFonte, corFundo, setCorFundo }) {
4892
4892
  )
4893
4893
  ] });
4894
4894
  }
4895
- const Container$7 = styled.div`
4895
+ const Container$6 = styled.div`
4896
4896
  margin: ${({ noMargin }) => noMargin ? "0" : "5px 0 8px"};
4897
4897
  border: 1px solid var(--bi-color-border);
4898
4898
  border-radius: ${(props) => props.open ? "0 0 var(--pn-border-radius) var(--pn-border-radius)" : "0"};
@@ -4981,7 +4981,7 @@ function BoxInfo({
4981
4981
  if (!isVisible) {
4982
4982
  return null;
4983
4983
  }
4984
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container$7, { open, noMargin, ...rest, children: [
4984
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container$6, { open, noMargin, ...rest, children: [
4985
4985
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bi-btn-area", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setOpen(!open), children: [
4986
4986
  title,
4987
4987
  " ",
@@ -5032,7 +5032,7 @@ const ButtonClose = ({ ...rest }) => {
5032
5032
  const ButtonBack = ({ ...rest }) => {
5033
5033
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonStyled, { type: "button", className: "back", ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: "fa-solid fa-arrow-left" }) });
5034
5034
  };
5035
- const Container$6 = styled.div`
5035
+ const Container$5 = styled.div`
5036
5036
  font-size: 1.4rem;
5037
5037
  line-height: 100%;
5038
5038
  color: #fff;
@@ -5094,7 +5094,7 @@ function ButtonTop({ smooth, center }) {
5094
5094
  };
5095
5095
  }, []);
5096
5096
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: visible && /* @__PURE__ */ jsxRuntimeExports.jsx(
5097
- Container$6,
5097
+ Container$5,
5098
5098
  {
5099
5099
  title: "Ir para o início da tela",
5100
5100
  visible: showBtnTop,
@@ -7671,7 +7671,7 @@ function LinkToMaps({
7671
7671
  function LinkToNewPage({ to: to2, children, ...rest }) {
7672
7672
  return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: to2 || children, target: "_blank", rel: "noreferrer", ...rest, children: children || to2 });
7673
7673
  }
7674
- const Container$5 = styled.div`
7674
+ const Container$4 = styled.div`
7675
7675
  .alert {
7676
7676
  font-weight: bold;
7677
7677
  margin-bottom: 0;
@@ -7697,7 +7697,7 @@ const Container$5 = styled.div`
7697
7697
  }
7698
7698
  `;
7699
7699
  function MessageNoConection() {
7700
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container$5, { children: [
7700
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container$4, { children: [
7701
7701
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "alert alert-danger", children: "Sem conexão com o servidor!" }),
7702
7702
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
7703
7703
  "Possíveis causas:",
@@ -18400,7 +18400,7 @@ function Loading({ visible, message = "Aguarde...", isbar = false }) {
18400
18400
  return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingBar, { visible });
18401
18401
  }
18402
18402
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "loading--container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "loading-body", children: [
18403
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "loading-spinner" }),
18403
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spinner-border text-info" }),
18404
18404
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: message })
18405
18405
  ] }) });
18406
18406
  }
@@ -19151,7 +19151,7 @@ function Input({
19151
19151
  return /* @__PURE__ */ jsxRuntimeExports.jsx("input", { className: "form-control", onClick: handleClick, ...props });
19152
19152
  }
19153
19153
  }
19154
- const Container$4 = styled.div`
19154
+ const Container$3 = styled.div`
19155
19155
  display: inline-block;
19156
19156
  `;
19157
19157
  const Label = styled.span`
@@ -19177,7 +19177,7 @@ const InputCheckBox = ({ disabled, children, name, checked, onChange }) => {
19177
19177
  onChange(event);
19178
19178
  }
19179
19179
  }
19180
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$4, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { disabled, onClick: handleClick, children: [
19180
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$3, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { disabled, onClick: handleClick, children: [
19181
19181
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
19182
19182
  checked && /* @__PURE__ */ jsxRuntimeExports.jsx(IconToggleOn, { color: disabled && "silver" }),
19183
19183
  !checked && /* @__PURE__ */ jsxRuntimeExports.jsx(IconToggleOff, { color: disabled && "silver" })
@@ -19481,7 +19481,7 @@ function TextHTML({ value }) {
19481
19481
  }
19482
19482
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { dangerouslySetInnerHTML: { __html: value } });
19483
19483
  }
19484
- const Container$3 = styled.div`
19484
+ const Container$2 = styled.div`
19485
19485
  --toggle-color-on: #4169ed;
19486
19486
  --toggle-color-off: #666;
19487
19487
  --toggle-color-inactive: #999;
@@ -19544,7 +19544,7 @@ function Toggle({
19544
19544
  });
19545
19545
  }
19546
19546
  }
19547
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$3, { checked, disabled, className, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
19547
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$2, { checked, disabled, className, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
19548
19548
  "label",
19549
19549
  {
19550
19550
  style: {
@@ -19567,97 +19567,11 @@ function Toggle({
19567
19567
  }
19568
19568
  ) });
19569
19569
  }
19570
- const Container$2 = styled.div`
19571
- --margin-up: 15px;
19572
- --margin-down: -120px;
19573
-
19574
- @keyframes update-box-up {
19575
- 0% {
19576
- opacity: 0;
19577
- bottom: var(--margin-down);
19578
- }
19579
- 100% {
19580
- opacity: 1;
19581
- bottom: var(--margin-up);
19582
- }
19583
- }
19584
-
19585
- @keyframes update-box-down {
19586
- 0% {
19587
- opacity: 1;
19588
- bottom: var(--margin-up);
19589
- }
19590
- 100% {
19591
- opacity: 0;
19592
- bottom: var(--margin-down);
19593
- display: none;
19594
- }
19595
- }
19596
-
19597
- .update-box {
19598
- position: fixed;
19599
- right: 20px;
19600
- bottom: var(--margin-up);
19601
-
19602
- display: none;
19603
- align-items: center;
19604
- gap: 8px;
19605
-
19606
- background-color: #fffbd6;
19607
- color: #333;
19608
- padding: 15px 20px;
19609
- border: 1px solid var(--bs-warning);
19610
- border-radius: 4px;
19611
- box-shadow: var(--sombra-login);
19612
-
19613
- font-family: 'Segoe UI', Geneva, Verdana, sans-serif;
19614
- font-size: 0.9rem;
19615
- width: auto;
19616
- white-space: nowrap;
19617
- user-select: none;
19618
- cursor: pointer;
19619
-
19620
- z-index: 9999991;
19621
-
19622
- i {
19623
- color: var(--bs-warning);
19624
- font-size: 1.3rem;
19625
- }
19626
-
19627
- .update-line {
19628
- position: absolute;
19629
- min-height: 85%;
19630
- border-left: 3px solid var(--bs-warning);
19631
- left: 4px;
19632
- }
19633
- }
19634
-
19635
- .update-show {
19636
- display: flex;
19637
- animation: update-box-up 500ms both;
19638
- }
19639
-
19640
- @media (max-width: 575px) {
19641
- :root {
19642
- --margin-up: 5px;
19643
- }
19644
-
19645
- .update-box {
19646
- max-width: 95vw;
19647
- width: 95vw;
19648
- white-space: unset;
19649
- right: initial;
19650
- left: 50%;
19651
- transform: translateX(-50%);
19652
- border-radius: 0;
19653
- }
19654
- }
19655
- `;
19656
19570
  function CheckUpdates() {
19657
19571
  const showRef = useRef();
19658
19572
  function checkUpdate() {
19659
19573
  if ("serviceWorker" in navigator && window.location.origin.startsWith("http")) {
19660
- console.log("Procurando atualizações...");
19574
+ console.info("Procurando atualizações...");
19661
19575
  navigator.serviceWorker.getRegistration().then((registration) => {
19662
19576
  if (!registration) {
19663
19577
  console.info("Sem Service Worker!");
@@ -19668,16 +19582,18 @@ function CheckUpdates() {
19668
19582
  setShow(true);
19669
19583
  const installingWorker = registration.installing;
19670
19584
  installingWorker.addEventListener("statechange", () => {
19671
- if (installingWorker.state === "installed") {
19672
- if (navigator.serviceWorker.controller) {
19673
- setTimeout(() => window.location.reload(true), 1e3);
19674
- }
19585
+ if (installingWorker.state == "installed") {
19586
+ setTimeout(() => window.location.reload(true), 1e3);
19587
+ console.info("Nova versão instalada");
19675
19588
  }
19676
- if (installingWorker.state === "activated") {
19589
+ if (installingWorker.state == "activated") {
19677
19590
  setShow(false);
19591
+ console.info("Nova versão ativada");
19678
19592
  }
19679
19593
  });
19680
19594
  });
19595
+ console.info("SW execute update!");
19596
+ registration.update();
19681
19597
  }).catch((error) => {
19682
19598
  console.error("=> Service Worker não encontrado:", error);
19683
19599
  });
@@ -19702,17 +19618,9 @@ function CheckUpdates() {
19702
19618
  useLayoutEffect(() => {
19703
19619
  checkUpdate();
19704
19620
  }, []);
19705
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$2, { onClick: handleClick, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: showRef, className: "update-box", children: [
19621
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "update-check-box", onClick: handleClick, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: showRef, className: "update-box", children: [
19706
19622
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "update-line" }),
19707
- /* @__PURE__ */ jsxRuntimeExports.jsx(
19708
- "div",
19709
- {
19710
- className: "spinner-border text-warning",
19711
- role: "status",
19712
- style: { width: "22px", height: "22px" },
19713
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "visually-hidden", children: "Loading..." })
19714
- }
19715
- ),
19623
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spinner-border text-warning w-22", role: "status", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "visually-hidden", children: "Carregando..." }) }),
19716
19624
  "Nova versão disponível, atualizando..."
19717
19625
  ] }) });
19718
19626
  }