jclib-ui 1.0.29 → 1.0.30

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.
@@ -11,6 +11,7 @@ export type GlobalApiConfig = {
11
11
  ident?: string;
12
12
  loginRoute?: string;
13
13
  isProductionMode: boolean;
14
+ showReportTypesButton: boolean;
14
15
  getToken: () => string;
15
16
  setToken: (token: string) => void;
16
17
  afterRequest: (res: AxiosResponse) => void;
@@ -4339,6 +4339,7 @@ const initConfig = {
4339
4339
  loginRoute: "/",
4340
4340
  ident: "",
4341
4341
  isProductionMode: true,
4342
+ showReportTypesButton: false,
4342
4343
  getToken: () => "",
4343
4344
  setToken: (token) => console.error(MESSAGE_ERROR, token),
4344
4345
  afterRequest: (_res) => {
@@ -21529,6 +21530,7 @@ function ScrollContainer({ children, hasMaxWidth = true }) {
21529
21530
  function PrintButtons({ onClose, showTypes = true }) {
21530
21531
  const { reportType, setReportType } = useLibContext();
21531
21532
  const arrTypes = ["PDF", "Excel", "Word", "Texto"];
21533
+ const { globalApiConfig } = useLibContext();
21532
21534
  const items = createDropdownItems([
21533
21535
  {
21534
21536
  title: "PDF",
@@ -21563,22 +21565,13 @@ function PrintButtons({ onClose, showTypes = true }) {
21563
21565
  setReportType(0);
21564
21566
  }
21565
21567
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "print-btn--container", children: [
21566
- showTypes && /* @__PURE__ */ jsxRuntimeExports.jsxs(
21567
- DropDownButton,
21568
- {
21569
- items,
21570
- id: "jclib-ui-print-btn",
21571
- title: "Formato do relatório",
21572
- direction: "down",
21573
- children: [
21574
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "d-inline-block d-sm-none me-2", children: [
21575
- "Formato do relatório:",
21576
- " "
21577
- ] }),
21578
- arrTypes[reportType]
21579
- ]
21580
- }
21581
- ),
21568
+ showTypes && globalApiConfig.showReportTypesButton && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropDownButton, { items, title: "Formato do relatório", direction: "down", children: [
21569
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "d-inline-block d-sm-none me-2", children: [
21570
+ "Formato do relatório:",
21571
+ " "
21572
+ ] }),
21573
+ arrTypes[reportType]
21574
+ ] }),
21582
21575
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "print-btn--buttons", children: [
21583
21576
  /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "btn btn-primary", type: "submit", children: [
21584
21577
  /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: "fas fa-print" }),