@zauru-sdk/components 1.0.51 → 1.0.53

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 (181) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/Buttons/Button.d.ts +1 -1
  3. package/dist/Table/ZauruTable.d.ts +1 -1
  4. package/dist/Zendesk/Chat.d.ts +1 -1
  5. package/dist/cjs/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.js +9 -0
  6. package/dist/cjs/Alerts/StaticAlert.js +32 -0
  7. package/dist/cjs/Alerts/index.js +18 -0
  8. package/dist/cjs/BlockUI/BlockUI.js +12 -0
  9. package/dist/cjs/BlockUI/index.js +17 -0
  10. package/dist/cjs/Buttons/Button.js +47 -0
  11. package/dist/cjs/Buttons/index.js +17 -0
  12. package/dist/cjs/Card/Card.js +9 -0
  13. package/dist/cjs/Card/index.js +17 -0
  14. package/dist/cjs/Chat/ChatLayout.js +31 -0
  15. package/dist/cjs/Chat/ChatMessageHistory.js +57 -0
  16. package/dist/cjs/Chat/index.js +18 -0
  17. package/dist/cjs/ConnectionState/ConnectionState.js +25 -0
  18. package/dist/cjs/ConnectionState/index.js +17 -0
  19. package/dist/cjs/Containers/BodyContainer.js +9 -0
  20. package/dist/cjs/Containers/ButtonSectionContainer.js +9 -0
  21. package/dist/cjs/Containers/Container.js +10 -0
  22. package/dist/cjs/Containers/DoubleContainer.js +18 -0
  23. package/dist/cjs/Containers/MainContainer.js +9 -0
  24. package/dist/cjs/Containers/OutletContainer.js +9 -0
  25. package/dist/cjs/Containers/SubContainer.js +10 -0
  26. package/dist/cjs/Containers/index.js +23 -0
  27. package/dist/cjs/DynamicTable/BasicPrintDynamicTable.js +31 -0
  28. package/dist/cjs/DynamicTable/DynamicPrintTable.js +158 -0
  29. package/dist/cjs/DynamicTable/DynamicTable.js +219 -0
  30. package/dist/cjs/DynamicTable/GenericDynamicTable.js +200 -0
  31. package/dist/cjs/DynamicTable/index.js +20 -0
  32. package/dist/cjs/Footer/Footer.js +20 -0
  33. package/dist/cjs/Footer/index.js +17 -0
  34. package/dist/cjs/Form/Checkbox/index.js +39 -0
  35. package/dist/cjs/Form/Checklist/index.js +14 -0
  36. package/dist/cjs/Form/DatePicker/index.js +36 -0
  37. package/dist/cjs/Form/DynamicBaculoForm/index.js +144 -0
  38. package/dist/cjs/Form/FieldContainer/DoubleFieldContainer.js +18 -0
  39. package/dist/cjs/Form/FieldContainer/QuadrupleFieldContainer.js +18 -0
  40. package/dist/cjs/Form/FieldContainer/TripleFieldContainer.js +18 -0
  41. package/dist/cjs/Form/FieldContainer/index.js +19 -0
  42. package/dist/cjs/Form/FileUpload/index.js +59 -0
  43. package/dist/cjs/Form/FormButtons/index.js +9 -0
  44. package/dist/cjs/Form/FormLayout/index.js +11 -0
  45. package/dist/cjs/Form/SelectField/index.js +102 -0
  46. package/dist/cjs/Form/TextArea/index.js +41 -0
  47. package/dist/cjs/Form/TextField/index.js +75 -0
  48. package/dist/cjs/Form/TimePicker/index.js +36 -0
  49. package/dist/cjs/Form/YesNo/index.js +22 -0
  50. package/dist/cjs/Form/index.js +29 -0
  51. package/dist/cjs/Labels/InfoLabel/index.js +9 -0
  52. package/dist/cjs/Labels/index.js +17 -0
  53. package/dist/cjs/Layouts/homeLayout/index.js +14 -0
  54. package/dist/cjs/Layouts/index.js +17 -0
  55. package/dist/cjs/LineSeparator/LineSeparator.js +8 -0
  56. package/dist/cjs/LineSeparator/index.js +17 -0
  57. package/dist/cjs/Modal/Modal.js +36 -0
  58. package/dist/cjs/Modal/index.js +17 -0
  59. package/dist/cjs/NavBar/NavBar.js +36 -0
  60. package/dist/cjs/NavBar/NavBar.types.js +2 -0
  61. package/dist/cjs/NavBar/NavBar.utils.js +61 -0
  62. package/dist/cjs/NavBar/index.js +19 -0
  63. package/dist/cjs/ProgressBar/ProgressBar.js +9 -0
  64. package/dist/cjs/ProgressBar/ProgressCircle.js +26 -0
  65. package/dist/cjs/ProgressBar/index.js +18 -0
  66. package/dist/cjs/Skeletons/LoadingInputSkeleton.js +12 -0
  67. package/dist/cjs/Skeletons/index.js +17 -0
  68. package/dist/cjs/Tab/Tab.js +26 -0
  69. package/dist/cjs/Tab/index.js +17 -0
  70. package/dist/cjs/Table/ZauruTable.js +177 -0
  71. package/dist/cjs/Table/index.js +17 -0
  72. package/dist/cjs/TaskList/TaskList.js +40 -0
  73. package/dist/cjs/TaskList/index.js +17 -0
  74. package/dist/cjs/Titles/LabelArray.js +11 -0
  75. package/dist/cjs/Titles/TableColumnTitle.js +9 -0
  76. package/dist/cjs/Titles/TitleH1.js +9 -0
  77. package/dist/cjs/Titles/TitleH2.js +9 -0
  78. package/dist/cjs/Titles/TitleH3.js +9 -0
  79. package/dist/cjs/Titles/index.js +21 -0
  80. package/dist/cjs/Tooltip/Tooltip.js +18 -0
  81. package/dist/cjs/Tooltip/index.js +17 -0
  82. package/dist/cjs/WithTooltip/WithTooltip.js +9 -0
  83. package/dist/cjs/WithTooltip/index.js +17 -0
  84. package/dist/cjs/Wizards/StepWizard.js +18 -0
  85. package/dist/cjs/Wizards/index.js +17 -0
  86. package/dist/cjs/Zendesk/Chat.js +69 -0
  87. package/dist/cjs/Zendesk/index.js +18 -0
  88. package/dist/cjs/Zendesk/zendesk.config.js +31 -0
  89. package/dist/cjs/index.js +40 -0
  90. package/dist/cjs/tailwind.config.js +9 -0
  91. package/dist/{Table → esm/Table}/ZauruTable.js +3 -1
  92. package/package.json +12 -18
  93. package/src/Table/ZauruTable.tsx +4 -2
  94. package/tsconfig.cjs.json +8 -0
  95. package/tsconfig.esm.json +11 -0
  96. package/tsconfig.json +6 -15
  97. /package/dist/{Alerts → esm/Alerts}/ErrorBoundaryAlert/ErrorBoundaryAlert.js +0 -0
  98. /package/dist/{Alerts → esm/Alerts}/StaticAlert.js +0 -0
  99. /package/dist/{Alerts → esm/Alerts}/index.js +0 -0
  100. /package/dist/{BlockUI → esm/BlockUI}/BlockUI.js +0 -0
  101. /package/dist/{BlockUI → esm/BlockUI}/index.js +0 -0
  102. /package/dist/{Buttons → esm/Buttons}/Button.js +0 -0
  103. /package/dist/{Buttons → esm/Buttons}/index.js +0 -0
  104. /package/dist/{Card → esm/Card}/Card.js +0 -0
  105. /package/dist/{Card → esm/Card}/index.js +0 -0
  106. /package/dist/{Chat → esm/Chat}/ChatLayout.js +0 -0
  107. /package/dist/{Chat → esm/Chat}/ChatMessageHistory.js +0 -0
  108. /package/dist/{Chat → esm/Chat}/index.js +0 -0
  109. /package/dist/{ConnectionState → esm/ConnectionState}/ConnectionState.js +0 -0
  110. /package/dist/{ConnectionState → esm/ConnectionState}/index.js +0 -0
  111. /package/dist/{Containers → esm/Containers}/BodyContainer.js +0 -0
  112. /package/dist/{Containers → esm/Containers}/ButtonSectionContainer.js +0 -0
  113. /package/dist/{Containers → esm/Containers}/Container.js +0 -0
  114. /package/dist/{Containers → esm/Containers}/DoubleContainer.js +0 -0
  115. /package/dist/{Containers → esm/Containers}/MainContainer.js +0 -0
  116. /package/dist/{Containers → esm/Containers}/OutletContainer.js +0 -0
  117. /package/dist/{Containers → esm/Containers}/SubContainer.js +0 -0
  118. /package/dist/{Containers → esm/Containers}/index.js +0 -0
  119. /package/dist/{DynamicTable → esm/DynamicTable}/BasicPrintDynamicTable.js +0 -0
  120. /package/dist/{DynamicTable → esm/DynamicTable}/DynamicPrintTable.js +0 -0
  121. /package/dist/{DynamicTable → esm/DynamicTable}/DynamicTable.js +0 -0
  122. /package/dist/{DynamicTable → esm/DynamicTable}/GenericDynamicTable.js +0 -0
  123. /package/dist/{DynamicTable → esm/DynamicTable}/index.js +0 -0
  124. /package/dist/{Footer → esm/Footer}/Footer.js +0 -0
  125. /package/dist/{Footer → esm/Footer}/index.js +0 -0
  126. /package/dist/{Form → esm/Form}/Checkbox/index.js +0 -0
  127. /package/dist/{Form → esm/Form}/Checklist/index.js +0 -0
  128. /package/dist/{Form → esm/Form}/DatePicker/index.js +0 -0
  129. /package/dist/{Form → esm/Form}/DynamicBaculoForm/index.js +0 -0
  130. /package/dist/{Form → esm/Form}/FieldContainer/DoubleFieldContainer.js +0 -0
  131. /package/dist/{Form → esm/Form}/FieldContainer/QuadrupleFieldContainer.js +0 -0
  132. /package/dist/{Form → esm/Form}/FieldContainer/TripleFieldContainer.js +0 -0
  133. /package/dist/{Form → esm/Form}/FieldContainer/index.js +0 -0
  134. /package/dist/{Form → esm/Form}/FileUpload/index.js +0 -0
  135. /package/dist/{Form → esm/Form}/FormButtons/index.js +0 -0
  136. /package/dist/{Form → esm/Form}/FormLayout/index.js +0 -0
  137. /package/dist/{Form → esm/Form}/SelectField/index.js +0 -0
  138. /package/dist/{Form → esm/Form}/TextArea/index.js +0 -0
  139. /package/dist/{Form → esm/Form}/TextField/index.js +0 -0
  140. /package/dist/{Form → esm/Form}/TimePicker/index.js +0 -0
  141. /package/dist/{Form → esm/Form}/YesNo/index.js +0 -0
  142. /package/dist/{Form → esm/Form}/index.js +0 -0
  143. /package/dist/{Labels → esm/Labels}/InfoLabel/index.js +0 -0
  144. /package/dist/{Labels → esm/Labels}/index.js +0 -0
  145. /package/dist/{Layouts → esm/Layouts}/homeLayout/index.js +0 -0
  146. /package/dist/{Layouts → esm/Layouts}/index.js +0 -0
  147. /package/dist/{LineSeparator → esm/LineSeparator}/LineSeparator.js +0 -0
  148. /package/dist/{LineSeparator → esm/LineSeparator}/index.js +0 -0
  149. /package/dist/{Modal → esm/Modal}/Modal.js +0 -0
  150. /package/dist/{Modal → esm/Modal}/index.js +0 -0
  151. /package/dist/{NavBar → esm/NavBar}/NavBar.js +0 -0
  152. /package/dist/{NavBar → esm/NavBar}/NavBar.types.js +0 -0
  153. /package/dist/{NavBar → esm/NavBar}/NavBar.utils.js +0 -0
  154. /package/dist/{NavBar → esm/NavBar}/index.js +0 -0
  155. /package/dist/{ProgressBar → esm/ProgressBar}/ProgressBar.js +0 -0
  156. /package/dist/{ProgressBar → esm/ProgressBar}/ProgressCircle.js +0 -0
  157. /package/dist/{ProgressBar → esm/ProgressBar}/index.js +0 -0
  158. /package/dist/{Skeletons → esm/Skeletons}/LoadingInputSkeleton.js +0 -0
  159. /package/dist/{Skeletons → esm/Skeletons}/index.js +0 -0
  160. /package/dist/{Tab → esm/Tab}/Tab.js +0 -0
  161. /package/dist/{Tab → esm/Tab}/index.js +0 -0
  162. /package/dist/{Table → esm/Table}/index.js +0 -0
  163. /package/dist/{TaskList → esm/TaskList}/TaskList.js +0 -0
  164. /package/dist/{TaskList → esm/TaskList}/index.js +0 -0
  165. /package/dist/{Titles → esm/Titles}/LabelArray.js +0 -0
  166. /package/dist/{Titles → esm/Titles}/TableColumnTitle.js +0 -0
  167. /package/dist/{Titles → esm/Titles}/TitleH1.js +0 -0
  168. /package/dist/{Titles → esm/Titles}/TitleH2.js +0 -0
  169. /package/dist/{Titles → esm/Titles}/TitleH3.js +0 -0
  170. /package/dist/{Titles → esm/Titles}/index.js +0 -0
  171. /package/dist/{Tooltip → esm/Tooltip}/Tooltip.js +0 -0
  172. /package/dist/{Tooltip → esm/Tooltip}/index.js +0 -0
  173. /package/dist/{WithTooltip → esm/WithTooltip}/WithTooltip.js +0 -0
  174. /package/dist/{WithTooltip → esm/WithTooltip}/index.js +0 -0
  175. /package/dist/{Wizards → esm/Wizards}/StepWizard.js +0 -0
  176. /package/dist/{Wizards → esm/Wizards}/index.js +0 -0
  177. /package/dist/{Zendesk → esm/Zendesk}/Chat.js +0 -0
  178. /package/dist/{Zendesk → esm/Zendesk}/index.js +0 -0
  179. /package/dist/{Zendesk → esm/Zendesk}/zendesk.config.js +0 -0
  180. /package/dist/{index.js → esm/index.js} +0 -0
  181. /package/dist/{tailwind.config.js → esm/tailwind.config.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.53](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.52...v1.0.53) (2024-04-03)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.52](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.51...v1.0.52) (2024-04-03)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/components
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.0.51](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.50...v1.0.51) (2024-04-02)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/components
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ /// <reference types="react" resolution-mode="require"/>
2
2
  type Props = {
3
3
  type?: "reset" | "button" | "submit" | undefined;
4
4
  title?: string;
@@ -1,5 +1,5 @@
1
1
  import type { TableProps } from "react-data-table-component";
2
- import { ExpandableRowsComponent } from "react-data-table-component/dist/DataTable/types";
2
+ import { ExpandableRowsComponent } from "react-data-table-component/dist/DataTable/types.js";
3
3
  type Props = TableProps<any> & {
4
4
  columns: any;
5
5
  conditionalRowStyles?: any;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ /// <reference types="react" resolution-mode="require"/>
2
2
  export declare const logoutFromZendesk: () => void;
3
3
  export declare const ZendeskAPI: (...args: any[]) => void;
4
4
  interface ZendeskProps {
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorBoundaryAlert = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ErrorBoundaryAlert = (props) => {
6
+ const { title, description } = props;
7
+ return ((0, jsx_runtime_1.jsx)("div", { className: "rounded-full top-20 mx-auto p-3", children: (0, jsx_runtime_1.jsx)("div", { className: "p-4 text-red-900 bg-red-100 border border-red-200 rounded-md", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-0 flex-1 flex", children: [(0, jsx_runtime_1.jsx)("div", { className: "mr-3 pt-1", children: (0, jsx_runtime_1.jsx)("svg", { width: "26", height: "26", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M13.6086 3.247l8.1916 15.8c.0999.2.1998.5.1998.8 0 1-.7992 1.8-1.7982 1.8H3.7188c-.2997 0-.4995-.1-.7992-.2-.7992-.5-1.1988-1.5-.6993-2.4 5.3067-10.1184 8.0706-15.385 8.2915-15.8.3314-.6222.8681-.8886 1.4817-.897.6135-.008 1.273.2807 1.6151.897zM12 18.95c.718 0 1.3-.582 1.3-1.3 0-.718-.582-1.3-1.3-1.3-.718 0-1.3.582-1.3 1.3 0 .718.582 1.3 1.3 1.3zm-.8895-10.203v5.4c0 .5.4.9.9.9s.9-.4.9-.9v-5.3c0-.5-.4-.9-.9-.9s-.9.4-.9.8z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-md leading-6 font-medium", children: title?.toString() }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm", children: description?.toString() })] })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", className: "rounded-md focus:outline-none focus:ring-2 focus:ring-red-500", children: (0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.6555 6.3331a.9.9 0 0 1 .001 1.2728l-4.1032 4.1085a.4.4 0 0 0 0 .5653l4.1031 4.1088a.9002.9002 0 0 1 .0797 1.1807l-.0806.092a.9.9 0 0 1-1.2728-.0009l-4.1006-4.1068a.4.4 0 0 0-.5662 0l-4.099 4.1068a.9.9 0 1 1-1.2738-1.2718l4.1027-4.1089a.4.4 0 0 0 0-.5652L6.343 7.6059a.9002.9002 0 0 1-.0796-1.1807l.0806-.092a.9.9 0 0 1 1.2728.0009l4.099 4.1055a.4.4 0 0 0 .5662 0l4.1006-4.1055a.9.9 0 0 1 1.2728-.001z" }) }) }) })] }) }) }));
8
+ };
9
+ exports.ErrorBoundaryAlert = ErrorBoundaryAlert;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StaticAlert = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const getConfig = (type) => {
6
+ switch (type) {
7
+ case "info":
8
+ return {
9
+ containerClassName: "text-blue-900 bg-blue-100 border border-blue-200 rounded-md",
10
+ buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",
11
+ path: ((0, jsx_runtime_1.jsx)("path", { d: "M14.1667 17h-3.3334c-.5 0-.8333-.3146-.8333-.7865 0-.472.3333-.7865.8333-.7865H11.5c.0833 0 .1667-.0787.1667-.1573v-3.5394c0-.0786-.0834-.1573-.1667-.1573h-.6667c-.5 0-.8333-.3146-.8333-.7865S10.3333 10 10.8333 10h.8334c.9166 0 1.6666.7079 1.6666 1.573v3.7753c0 .0787.0834.1573.1667.1573h.6667c.5 0 .8333.3146.8333.7865 0 .472-.3333.7079-.8333.7079zM12.3 6c.6933 0 1.3.6067 1.3 1.3s-.52 1.3-1.3 1.3S11 7.9933 11 7.3 11.6067 6 12.3 6zM12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2" })),
12
+ };
13
+ case "success":
14
+ return {
15
+ containerClassName: "text-green-900 bg-green-100 border border-green-200 rounded-md",
16
+ buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",
17
+ path: ((0, jsx_runtime_1.jsx)("path", { d: "M8.445 12.6675A.9.9 0 0 0 7.1424 13.91l2.5726 2.7448c.3679.3856.9884.3689 1.335-.036l5.591-7.0366a.9.9 0 0 0-1.3674-1.1705l-4.6548 5.9132a.4.4 0 0 1-.607.0252l-1.567-1.6826zM1.9995 12c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z" })),
18
+ };
19
+ default:
20
+ return {
21
+ containerClassName: "text-blue-900 bg-blue-100 border border-blue-200 rounded-md",
22
+ buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",
23
+ path: ((0, jsx_runtime_1.jsx)("path", { d: "M14.1667 17h-3.3334c-.5 0-.8333-.3146-.8333-.7865 0-.472.3333-.7865.8333-.7865H11.5c.0833 0 .1667-.0787.1667-.1573v-3.5394c0-.0786-.0834-.1573-.1667-.1573h-.6667c-.5 0-.8333-.3146-.8333-.7865S10.3333 10 10.8333 10h.8334c.9166 0 1.6666.7079 1.6666 1.573v3.7753c0 .0787.0834.1573.1667.1573h.6667c.5 0 .8333.3146.8333.7865 0 .472-.3333.7079-.8333.7079zM12.3 6c.6933 0 1.3.6067 1.3 1.3s-.52 1.3-1.3 1.3S11 7.9933 11 7.3 11.6067 6 12.3 6zM12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2" })),
24
+ };
25
+ }
26
+ };
27
+ const StaticAlert = (props) => {
28
+ const { className, title, description, onClose, type = "info", loading = false, } = props;
29
+ const config = getConfig(type);
30
+ return ((0, jsx_runtime_1.jsx)("div", { className: `${className} ${config.containerClassName} ${loading ? " hidden" : ""}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-0 flex-1 flex", children: [(0, jsx_runtime_1.jsx)("div", { className: "mr-3 pt-1", children: (0, jsx_runtime_1.jsx)("svg", { width: "26", height: "26", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: config.path }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-md leading-6 font-medium", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm", children: description })] })] }), onClose && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", className: `${config.buttonClassName}`, onClick: onClose, children: (0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.6555 6.3331a.9.9 0 0 1 .001 1.2728l-4.1032 4.1085a.4.4 0 0 0 0 .5653l4.1031 4.1088a.9002.9002 0 0 1 .0797 1.1807l-.0806.092a.9.9 0 0 1-1.2728-.0009l-4.1006-4.1068a.4.4 0 0 0-.5662 0l-4.099 4.1068a.9.9 0 1 1-1.2738-1.2718l4.1027-4.1089a.4.4 0 0 0 0-.5652L6.343 7.6059a.9002.9002 0 0 1-.0796-1.1807l.0806-.092a.9.9 0 0 1 1.2728.0009l4.099 4.1055a.4.4 0 0 0 .5662 0l4.1006-4.1055a.9.9 0 0 1 1.2728-.001z" }) }) }) }))] }) }));
31
+ };
32
+ exports.StaticAlert = StaticAlert;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ErrorBoundaryAlert/ErrorBoundaryAlert.js"), exports);
18
+ __exportStar(require("./StaticAlert.js"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlockUI = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const BlockUI = (props) => {
6
+ const { children, active, loadingText } = props;
7
+ if (!active) {
8
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
9
+ }
10
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute bg-gray-100 bg-opacity-20 z-10 h-full w-full flex items-center justify-center", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-4", children: loadingText }), (0, jsx_runtime_1.jsxs)("svg", { className: "animate-spin h-5 w-5 text-gray-600", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })] }) }), children] }) }));
11
+ };
12
+ exports.BlockUI = BlockUI;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BlockUI.js"), exports);
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Button = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Button = (props) => {
6
+ const { type = "submit", loading = false, loadingText = "Guardando...", title = "Guardar", name = "save", onClickSave, selectedColor = "indigo", children, className = "", disabled = false, } = props;
7
+ const COLORS = {
8
+ green: {
9
+ bg900: "bg-green-900",
10
+ bg700: "bg-green-700",
11
+ bg600: "bg-green-600",
12
+ bg500: "bg-green-500",
13
+ ring600: "ring-green-600",
14
+ ring500: "ring-green-500",
15
+ },
16
+ indigo: {
17
+ bg900: "bg-indigo-900",
18
+ bg700: "bg-indigo-700",
19
+ bg600: "bg-indigo-600",
20
+ bg500: "bg-indigo-500",
21
+ ring600: "ring-indigo-600",
22
+ ring500: "ring-indigo-500",
23
+ },
24
+ red: {
25
+ bg900: "bg-red-900",
26
+ bg700: "bg-red-700",
27
+ bg600: "bg-red-600",
28
+ bg500: "bg-red-500",
29
+ ring600: "ring-red-600",
30
+ ring500: "ring-red-500",
31
+ },
32
+ yellow: {
33
+ bg900: "bg-yellow-900",
34
+ bg700: "bg-yellow-700",
35
+ bg600: "bg-yellow-600",
36
+ bg500: "bg-yellow-500",
37
+ ring600: "ring-yellow-600",
38
+ ring500: "ring-yellow-500",
39
+ },
40
+ };
41
+ const color = COLORS[selectedColor];
42
+ const inside = children ?? title;
43
+ return ((0, jsx_runtime_1.jsx)("button", { type: type, name: "action", disabled: loading || disabled, value: name, onClick: onClickSave, className: `ml-2 ${loading || disabled ? " bg-opacity-25 " : ""} ${loading
44
+ ? " cursor-progress"
45
+ : `${disabled ? "" : `hover:${color.bg700}`}`} inline-flex justify-center rounded-md border border-transparent ${color.bg600} py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:${color.ring500} focus:ring-offset-2 ${className}`, children: loading ? loadingText : inside }));
46
+ };
47
+ exports.Button = Button;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Button.js"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Card = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Card = (props) => {
6
+ const { children, title, className } = props;
7
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `p-4 space-y-3 shadow sm:overflow-hidden sm:rounded-md ${className}`, children: [title && ((0, jsx_runtime_1.jsx)("label", { className: "inline text-lg font-medium text-gray-700", children: `${title.toUpperCase()}` })), children] }));
8
+ };
9
+ exports.Card = Card;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Card.js"), exports);
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatLayout = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const index_js_1 = require("../Form/TextField/index.js");
7
+ const react_2 = require("@remix-run/react");
8
+ const LoadingInputSkeleton_js_1 = require("../Skeletons/LoadingInputSkeleton.js");
9
+ const icons_1 = require("@zauru-sdk/icons");
10
+ const ChatLayout = ({ children, sendingMessage = false, formConfig = undefined, }) => {
11
+ const refAttachment = (0, react_1.useRef)(null);
12
+ const [formValues, setFormValues] = (0, react_1.useState)({ image: null });
13
+ const handleAttachmentClick = () => {
14
+ if (refAttachment.current) {
15
+ refAttachment.current.click();
16
+ }
17
+ };
18
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col h-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex flex-col-reverse overflow-y-auto p-4 bg-gray-100 border border-gray-200 rounded-lg grow max-h-[65vh]", children: children }), (0, jsx_runtime_1.jsxs)(react_2.Form, { id: "formRef", encType: "multipart/form-data", method: "post", children: [formConfig ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(index_js_1.TextField, { hidden: true, name: "reference", defaultValue: formConfig.reference ?? "" }), (0, jsx_runtime_1.jsx)(index_js_1.TextField, { hidden: true, name: "form_id", defaultValue: formConfig.form_id }), (0, jsx_runtime_1.jsx)(index_js_1.TextField, { hidden: true, name: "document_id", defaultValue: formConfig.document_id }), (0, jsx_runtime_1.jsx)(index_js_1.TextField, { hidden: true, name: "document_type", defaultValue: formConfig.document_type }), (0, jsx_runtime_1.jsx)(index_js_1.TextField, { hidden: true, name: "id_number", defaultValue: formConfig?.id_number ?? "" })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})), (0, jsx_runtime_1.jsxs)("div", { className: "mt-4 flex", children: [sendingMessage ? ((0, jsx_runtime_1.jsx)(LoadingInputSkeleton_js_1.LoadingInputSkeleton, {})) : ((0, jsx_runtime_1.jsx)("input", { name: `message${formConfig?.messageFieldId
19
+ ? `_${formConfig?.messageFieldId}`
20
+ : ""}`, type: "text", placeholder: "Escribe un mensaje...", className: "form-input px-4 py-2 border border-gray-300 rounded-l-lg grow" })), (0, jsx_runtime_1.jsx)("button", { onClick: handleAttachmentClick, className: `${formValues?.image ? "bg-blue-500" : ""} hover:bg-blue-700 text-white font-bold py-2 px-4`, type: "button", children: (0, jsx_runtime_1.jsx)(icons_1.AttachmentIconSVG, {}) }), (0, jsx_runtime_1.jsx)("button", { className: "bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-r-lg", type: "submit", name: "action", value: "sendMessage", children: sendingMessage ? (0, jsx_runtime_1.jsx)(icons_1.SpinnerSvg, {}) : (0, jsx_runtime_1.jsx)(icons_1.SendMessageIcon, {}) })] }), (0, jsx_runtime_1.jsx)("input", { ref: refAttachment, hidden: true, name: `attachment${formConfig?.attachmentFieldId
21
+ ? `_${formConfig?.attachmentFieldId}`
22
+ : ""}`, type: "file", accept: ".jpg, .png, .jpeg, .png", onChange: (e) => {
23
+ if (e.target.value && e.target.value !== "") {
24
+ setFormValues({ ...formValues, image: e.target.value });
25
+ }
26
+ else {
27
+ setFormValues({ ...formValues, image: null });
28
+ }
29
+ } })] })] }));
30
+ };
31
+ exports.ChatLayout = ChatLayout;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatMessageHistory = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const icons_1 = require("@zauru-sdk/icons");
6
+ const react_1 = require("react");
7
+ const ChatMessageHistory = (props) => {
8
+ const { author, content, onLike, onUpdateComment, id, commentOwner = false, date, imageLink, } = props;
9
+ const initials = author ? author[0].toUpperCase() : "A";
10
+ const [isUpdating, setIsUpdating] = (0, react_1.useState)(false);
11
+ const [updatedContent, setUpdatedContent] = (0, react_1.useState)(content);
12
+ const textAreaRef = (0, react_1.useRef)(null);
13
+ const [shouldPulse, setShouldPulse] = (0, react_1.useState)(false);
14
+ (0, react_1.useEffect)(() => {
15
+ if (isUpdating && textAreaRef.current) {
16
+ textAreaRef.current.style.height = "auto";
17
+ textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`;
18
+ textAreaRef.current.focus();
19
+ }
20
+ }, [isUpdating]);
21
+ // Efecto secundario que se ejecuta cada vez que 'isUpdating' cambia
22
+ (0, react_1.useEffect)(() => {
23
+ // Activar la animación
24
+ setShouldPulse(true);
25
+ // Establecer un temporizador para eliminar la clase después de que la animación se haya completado
26
+ const timer = setTimeout(() => {
27
+ setShouldPulse(false);
28
+ }, 15000); // Tiempo total de la animación
29
+ // Limpiar el temporizador si el componente se desmonta o si 'isUpdating' cambia de nuevo antes de que la animación se complete
30
+ return () => clearTimeout(timer);
31
+ }, [isUpdating]);
32
+ const handleUpdate = (e) => {
33
+ if (e.target.value.length <= 254) {
34
+ setUpdatedContent(e.target.value);
35
+ }
36
+ };
37
+ const handleUpdateClick = () => {
38
+ if (isUpdating) {
39
+ if (textAreaRef.current) {
40
+ textAreaRef.current.blur();
41
+ }
42
+ //onUpdateComment && onUpdateComment(updatedContent, itsNew);
43
+ }
44
+ setIsUpdating(!isUpdating);
45
+ };
46
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "p-1 rounded-xl flex items-center space-x-4 relative", children: [commentOwner && ((0, jsx_runtime_1.jsx)("div", { className: "absolute top-2 right-2", children: (0, jsx_runtime_1.jsx)("button", { onClick: handleUpdateClick, className: `${shouldPulse ? "animate-custom-pulse" : ""}`, children: isUpdating ? (0, jsx_runtime_1.jsx)(icons_1.CheckIconSVG, {}) : (0, jsx_runtime_1.jsx)(icons_1.PencilSvg, {}) }) })), (0, jsx_runtime_1.jsx)("div", { className: `w-[0%] lg:w-[8%] h-16 bg-purple-300 rounded-full flex items-center justify-center overflow-hidden text-white text-xl font-bold`, children: initials }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-between h-full w-[92%]", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-row space-x-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xl font-medium text-black", children: author }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-medium text-gray-500", children: date && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [" - ", date] }) })] }), isUpdating ? ((0, jsx_runtime_1.jsx)("textarea", { ref: textAreaRef, className: "bg-gray-100 rounded p-2 w-full resize-none", value: updatedContent, onChange: handleUpdate, maxLength: 254, placeholder: "Deja tus buenos deseos..." })) : ((0, jsx_runtime_1.jsx)("p", { className: "text-gray-500", children: updatedContent }))] }), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-end items-center", children: (0, jsx_runtime_1.jsx)("button", { onClick: () => { }, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }) })] }), imageLink && ((0, jsx_runtime_1.jsx)("div", { className: `w-[25%] flex items-center justify-center overflow-hidden text-white text-xl font-bold`, children: (0, jsx_runtime_1.jsx)("div", { onClick: () => {
47
+ return window.open(imageLink, "_blank");
48
+ }, children: (0, jsx_runtime_1.jsx)("img", { src: imageLink, alt: "IMG_CHAT", className: `h-48 w-48 inline mr-1 pb-1`, style: {
49
+ stroke: "currentColor",
50
+ strokeWidth: 2,
51
+ strokeLinecap: "round",
52
+ strokeLinejoin: "round",
53
+ fill: "none",
54
+ backgroundColor: "transparent",
55
+ } }) }) }))] }));
56
+ };
57
+ exports.ChatMessageHistory = ChatMessageHistory;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ChatLayout.js"), exports);
18
+ __exportStar(require("./ChatMessageHistory.js"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectionState = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const hooks_1 = require("@zauru-sdk/hooks");
6
+ const ConnectionState = () => {
7
+ const isOnline = (0, hooks_1.useIsOnline)();
8
+ // Definir estilos
9
+ const styles = {
10
+ container: {
11
+ padding: "10px",
12
+ borderRadius: "5px",
13
+ backgroundColor: isOnline ? "#d4edda" : "#f8d7da",
14
+ color: isOnline ? "#155724" : "#721c24",
15
+ fontWeight: "bold",
16
+ },
17
+ text: {
18
+ fontSize: "16px",
19
+ margin: 0,
20
+ },
21
+ };
22
+ // Renderizar el estado de conexión
23
+ return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsx)("p", { style: styles.text, children: isOnline ? "ONLINE ✅🌐" : "OFFLINE ❌🌐" }) }));
24
+ };
25
+ exports.ConnectionState = ConnectionState;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ConnectionState.js"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BodyContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const BodyContainer = (props) => {
6
+ const { children } = props;
7
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("body", { className: "flex flex-col min-h-screen m-0", children: children }) }));
8
+ };
9
+ exports.BodyContainer = BodyContainer;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonSectionContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ButtonSectionContainer = (props) => {
6
+ const { children, className, whitBg = true } = props;
7
+ return ((0, jsx_runtime_1.jsx)("div", { className: `${whitBg ? "bg-gray-50" : ""} px-4 py-3 text-right sm:px-6 ${className}`, children: children }));
8
+ };
9
+ exports.ButtonSectionContainer = ButtonSectionContainer;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Container = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Container = (props) => {
6
+ const { title, description, children, className = "", rightContent } = props;
7
+ const titleInfo = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [title && ((0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && ((0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
8
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: `mx-2 ${className}`, children: [rightContent && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("div", { children: titleInfo }), (0, jsx_runtime_1.jsx)("div", { children: rightContent })] })), !rightContent && titleInfo, (0, jsx_runtime_1.jsx)("div", { className: "mt-5 space-y-5", children: children })] }) }));
9
+ };
10
+ exports.Container = Container;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DoubleContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const DoubleContainer = (props) => {
6
+ const { title, description, className = "", children } = props;
7
+ const getChildren = (index) => {
8
+ if (children && Array.isArray(children) && children[index]) {
9
+ return children[index];
10
+ }
11
+ if (children && index === 0) {
12
+ return children;
13
+ }
14
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
15
+ };
16
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: `mx-2 ${className}`, children: [title && ((0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && ((0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-md text-gray-600", children: description })), (0, jsx_runtime_1.jsxs)("div", { className: "grid xl:grid-cols-3 md:grid-cols-1 gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "xl:col-span-2 md:col-span-1 mt-5", children: getChildren(0) }), (0, jsx_runtime_1.jsx)("div", { className: "xl:col-span-1 md:col-span-1 mt-5", children: getChildren(1) })] })] }) }));
17
+ };
18
+ exports.DoubleContainer = DoubleContainer;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MainContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const MainContainer = (props) => {
6
+ const { children } = props;
7
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "md:p-10 p-0 mt-10 ml-2 mr-2 mb-10 md:mt-0 md:ml-0 md:mr-0 md:mb-0", children: children }) }));
8
+ };
9
+ exports.MainContainer = MainContainer;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OutletContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const OutletContainer = (props) => {
6
+ const { children } = props;
7
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "flex-1 overflow-x-auto", children: children }) }));
8
+ };
9
+ exports.OutletContainer = OutletContainer;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const SubContainer = (props) => {
6
+ const { title, description, children, className = "", rightContent } = props;
7
+ const titleInfo = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [title && ((0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold leading-8 text-gray-900", children: title })), description && ((0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
8
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `${className}`, children: [rightContent && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("div", { children: titleInfo }), (0, jsx_runtime_1.jsx)("div", { children: rightContent })] })), !rightContent && titleInfo, (0, jsx_runtime_1.jsx)("div", { className: "mt-5 space-y-3", children: children })] }));
9
+ };
10
+ exports.SubContainer = SubContainer;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BodyContainer.js"), exports);
18
+ __exportStar(require("./ButtonSectionContainer.js"), exports);
19
+ __exportStar(require("./Container.js"), exports);
20
+ __exportStar(require("./DoubleContainer.js"), exports);
21
+ __exportStar(require("./MainContainer.js"), exports);
22
+ __exportStar(require("./OutletContainer.js"), exports);
23
+ __exportStar(require("./SubContainer.js"), exports);
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BasicTableHTML = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const common_1 = require("@zauru-sdk/common");
6
+ //TABLA PARA LA IMPRESION:
7
+ const BasicTableHTML = (props) => {
8
+ const { data, footer, headers } = props;
9
+ return ((0, jsx_runtime_1.jsxs)("table", { style: { borderCollapse: "collapse", width: "100%" }, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsx)("tr", { children: headers?.map((titulo, index) => ((0, jsx_runtime_1.jsx)("th", { style: {
10
+ border: "1px solid black",
11
+ padding: "10px",
12
+ textAlign: "center",
13
+ whiteSpace: "normal",
14
+ }, children: titulo.label }, index))) }) }), (0, jsx_runtime_1.jsx)("tbody", { children: data?.map((fila, index) => ((0, jsx_runtime_1.jsx)("tr", { children: headers?.map((titulo, index) => ((0, jsx_runtime_1.jsx)("td", { style: {
15
+ border: "1px solid black",
16
+ padding: "1px",
17
+ textAlign: "center",
18
+ whiteSpace: "normal",
19
+ fontSize: (0, common_1.isNumeric)(fila[titulo.name])
20
+ ? "2em"
21
+ : "1em",
22
+ }, children: fila[titulo.name] }, index))) }, index))) }), (0, jsx_runtime_1.jsx)("tfoot", { children: (0, jsx_runtime_1.jsx)("tr", { children: headers?.map((titulo, index) => ((0, jsx_runtime_1.jsx)("td", { style: {
23
+ padding: "10px",
24
+ textAlign: "center",
25
+ whiteSpace: "normal",
26
+ fontSize: (0, common_1.isNumeric)(footer[titulo.name])
27
+ ? "2em"
28
+ : "1em",
29
+ }, children: footer[titulo.name] }, index))) }) })] }));
30
+ };
31
+ exports.BasicTableHTML = BasicTableHTML;