@zauru-sdk/components 1.0.52 → 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 (261) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.d.ts +6 -0
  3. package/dist/Alerts/StaticAlert.d.ts +11 -0
  4. package/dist/Alerts/index.d.ts +2 -0
  5. package/dist/BlockUI/BlockUI.d.ts +8 -0
  6. package/dist/BlockUI/index.d.ts +1 -0
  7. package/dist/Buttons/Button.d.ts +15 -0
  8. package/dist/Buttons/index.d.ts +1 -0
  9. package/dist/Card/Card.d.ts +8 -0
  10. package/dist/Card/index.d.ts +1 -0
  11. package/dist/Chat/ChatLayout.d.ts +17 -0
  12. package/dist/Chat/ChatMessageHistory.d.ts +12 -0
  13. package/dist/Chat/index.d.ts +2 -0
  14. package/dist/ConnectionState/ConnectionState.d.ts +1 -0
  15. package/dist/ConnectionState/index.d.ts +1 -0
  16. package/dist/Containers/BodyContainer.d.ts +6 -0
  17. package/dist/Containers/ButtonSectionContainer.d.ts +8 -0
  18. package/dist/Containers/Container.d.ts +10 -0
  19. package/dist/Containers/DoubleContainer.d.ts +9 -0
  20. package/dist/Containers/MainContainer.d.ts +6 -0
  21. package/dist/Containers/OutletContainer.d.ts +6 -0
  22. package/dist/Containers/SubContainer.d.ts +10 -0
  23. package/dist/Containers/index.d.ts +7 -0
  24. package/dist/DynamicTable/BasicPrintDynamicTable.d.ts +10 -0
  25. package/dist/DynamicTable/DynamicPrintTable.d.ts +23 -0
  26. package/dist/DynamicTable/DynamicTable.d.ts +24 -0
  27. package/dist/DynamicTable/GenericDynamicTable.d.ts +21 -0
  28. package/dist/DynamicTable/index.d.ts +4 -0
  29. package/dist/Footer/Footer.d.ts +7 -0
  30. package/dist/Footer/index.d.ts +1 -0
  31. package/dist/Form/Checkbox/index.d.ts +17 -0
  32. package/dist/Form/Checklist/index.d.ts +14 -0
  33. package/dist/Form/DatePicker/index.d.ts +18 -0
  34. package/dist/Form/DynamicBaculoForm/index.d.ts +18 -0
  35. package/dist/Form/FieldContainer/DoubleFieldContainer.d.ts +8 -0
  36. package/dist/Form/FieldContainer/QuadrupleFieldContainer.d.ts +7 -0
  37. package/dist/Form/FieldContainer/TripleFieldContainer.d.ts +7 -0
  38. package/dist/Form/FieldContainer/index.d.ts +3 -0
  39. package/dist/Form/FileUpload/index.d.ts +21 -0
  40. package/dist/Form/FormButtons/index.d.ts +16 -0
  41. package/dist/Form/FormLayout/index.d.ts +11 -0
  42. package/dist/Form/SelectField/index.d.ts +27 -0
  43. package/dist/Form/TextArea/index.d.ts +23 -0
  44. package/dist/Form/TextField/index.d.ts +25 -0
  45. package/dist/Form/TimePicker/index.d.ts +16 -0
  46. package/dist/Form/YesNo/index.d.ts +12 -0
  47. package/dist/Form/index.d.ts +13 -0
  48. package/dist/Labels/InfoLabel/index.d.ts +7 -0
  49. package/dist/Labels/index.d.ts +1 -0
  50. package/dist/Layouts/homeLayout/index.d.ts +6 -0
  51. package/dist/Layouts/index.d.ts +1 -0
  52. package/dist/LineSeparator/LineSeparator.d.ts +1 -0
  53. package/dist/LineSeparator/index.d.ts +1 -0
  54. package/dist/Modal/Modal.d.ts +10 -0
  55. package/dist/Modal/index.d.ts +1 -0
  56. package/dist/NavBar/NavBar.d.ts +2 -0
  57. package/dist/NavBar/NavBar.types.d.ts +50 -0
  58. package/dist/NavBar/NavBar.utils.d.ts +58 -0
  59. package/dist/NavBar/index.d.ts +3 -0
  60. package/dist/ProgressBar/ProgressBar.d.ts +6 -0
  61. package/dist/ProgressBar/ProgressCircle.d.ts +6 -0
  62. package/dist/ProgressBar/index.d.ts +2 -0
  63. package/dist/Skeletons/LoadingInputSkeleton.d.ts +1 -0
  64. package/dist/Skeletons/index.d.ts +1 -0
  65. package/dist/Tab/Tab.d.ts +9 -0
  66. package/dist/Tab/index.d.ts +1 -0
  67. package/dist/Table/ZauruTable.d.ts +25 -0
  68. package/dist/Table/index.d.ts +1 -0
  69. package/dist/TaskList/TaskList.d.ts +14 -0
  70. package/dist/TaskList/index.d.ts +1 -0
  71. package/dist/Titles/LabelArray.d.ts +4 -0
  72. package/dist/Titles/TableColumnTitle.d.ts +4 -0
  73. package/dist/Titles/TitleH1.d.ts +1 -0
  74. package/dist/Titles/TitleH2.d.ts +1 -0
  75. package/dist/Titles/TitleH3.d.ts +1 -0
  76. package/dist/Titles/index.d.ts +5 -0
  77. package/dist/Tooltip/Tooltip.d.ts +7 -0
  78. package/dist/Tooltip/index.d.ts +1 -0
  79. package/dist/WithTooltip/WithTooltip.d.ts +7 -0
  80. package/dist/WithTooltip/index.d.ts +1 -0
  81. package/dist/Wizards/StepWizard.d.ts +14 -0
  82. package/dist/Wizards/index.d.ts +1 -0
  83. package/dist/Zendesk/Chat.d.ts +14 -0
  84. package/dist/Zendesk/index.d.ts +2 -0
  85. package/dist/Zendesk/zendesk.config.d.ts +9 -0
  86. package/dist/cjs/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.js +9 -0
  87. package/dist/cjs/Alerts/StaticAlert.js +32 -0
  88. package/dist/cjs/Alerts/index.js +18 -0
  89. package/dist/cjs/BlockUI/BlockUI.js +12 -0
  90. package/dist/cjs/BlockUI/index.js +17 -0
  91. package/dist/cjs/Buttons/Button.js +47 -0
  92. package/dist/cjs/Buttons/index.js +17 -0
  93. package/dist/cjs/Card/Card.js +9 -0
  94. package/dist/cjs/Card/index.js +17 -0
  95. package/dist/cjs/Chat/ChatLayout.js +31 -0
  96. package/dist/cjs/Chat/ChatMessageHistory.js +57 -0
  97. package/dist/cjs/Chat/index.js +18 -0
  98. package/dist/cjs/ConnectionState/ConnectionState.js +25 -0
  99. package/dist/cjs/ConnectionState/index.js +17 -0
  100. package/dist/cjs/Containers/BodyContainer.js +9 -0
  101. package/dist/cjs/Containers/ButtonSectionContainer.js +9 -0
  102. package/dist/cjs/Containers/Container.js +10 -0
  103. package/dist/cjs/Containers/DoubleContainer.js +18 -0
  104. package/dist/cjs/Containers/MainContainer.js +9 -0
  105. package/dist/cjs/Containers/OutletContainer.js +9 -0
  106. package/dist/cjs/Containers/SubContainer.js +10 -0
  107. package/dist/cjs/Containers/index.js +23 -0
  108. package/dist/cjs/DynamicTable/BasicPrintDynamicTable.js +31 -0
  109. package/dist/cjs/DynamicTable/DynamicPrintTable.js +158 -0
  110. package/dist/cjs/DynamicTable/DynamicTable.js +219 -0
  111. package/dist/cjs/DynamicTable/GenericDynamicTable.js +200 -0
  112. package/dist/cjs/DynamicTable/index.js +20 -0
  113. package/dist/cjs/Footer/Footer.js +20 -0
  114. package/dist/cjs/Footer/index.js +17 -0
  115. package/dist/cjs/Form/Checkbox/index.js +39 -0
  116. package/dist/cjs/Form/Checklist/index.js +14 -0
  117. package/dist/cjs/Form/DatePicker/index.js +36 -0
  118. package/dist/cjs/Form/DynamicBaculoForm/index.js +144 -0
  119. package/dist/cjs/Form/FieldContainer/DoubleFieldContainer.js +18 -0
  120. package/dist/cjs/Form/FieldContainer/QuadrupleFieldContainer.js +18 -0
  121. package/dist/cjs/Form/FieldContainer/TripleFieldContainer.js +18 -0
  122. package/dist/cjs/Form/FieldContainer/index.js +19 -0
  123. package/dist/cjs/Form/FileUpload/index.js +59 -0
  124. package/dist/cjs/Form/FormButtons/index.js +9 -0
  125. package/dist/cjs/Form/FormLayout/index.js +11 -0
  126. package/dist/cjs/Form/SelectField/index.js +102 -0
  127. package/dist/cjs/Form/TextArea/index.js +41 -0
  128. package/dist/cjs/Form/TextField/index.js +75 -0
  129. package/dist/cjs/Form/TimePicker/index.js +36 -0
  130. package/dist/cjs/Form/YesNo/index.js +22 -0
  131. package/dist/cjs/Form/index.js +29 -0
  132. package/dist/cjs/Labels/InfoLabel/index.js +9 -0
  133. package/dist/cjs/Labels/index.js +17 -0
  134. package/dist/cjs/Layouts/homeLayout/index.js +14 -0
  135. package/dist/cjs/Layouts/index.js +17 -0
  136. package/dist/cjs/LineSeparator/LineSeparator.js +8 -0
  137. package/dist/cjs/LineSeparator/index.js +17 -0
  138. package/dist/cjs/Modal/Modal.js +36 -0
  139. package/dist/cjs/Modal/index.js +17 -0
  140. package/dist/cjs/NavBar/NavBar.js +36 -0
  141. package/dist/cjs/NavBar/NavBar.types.js +2 -0
  142. package/dist/cjs/NavBar/NavBar.utils.js +61 -0
  143. package/dist/cjs/NavBar/index.js +19 -0
  144. package/dist/cjs/ProgressBar/ProgressBar.js +9 -0
  145. package/dist/cjs/ProgressBar/ProgressCircle.js +26 -0
  146. package/dist/cjs/ProgressBar/index.js +18 -0
  147. package/dist/cjs/Skeletons/LoadingInputSkeleton.js +12 -0
  148. package/dist/cjs/Skeletons/index.js +17 -0
  149. package/dist/cjs/Tab/Tab.js +26 -0
  150. package/dist/cjs/Tab/index.js +17 -0
  151. package/dist/cjs/Table/ZauruTable.js +177 -0
  152. package/dist/cjs/Table/index.js +17 -0
  153. package/dist/cjs/TaskList/TaskList.js +40 -0
  154. package/dist/cjs/TaskList/index.js +17 -0
  155. package/dist/cjs/Titles/LabelArray.js +11 -0
  156. package/dist/cjs/Titles/TableColumnTitle.js +9 -0
  157. package/dist/cjs/Titles/TitleH1.js +9 -0
  158. package/dist/cjs/Titles/TitleH2.js +9 -0
  159. package/dist/cjs/Titles/TitleH3.js +9 -0
  160. package/dist/cjs/Titles/index.js +21 -0
  161. package/dist/cjs/Tooltip/Tooltip.js +18 -0
  162. package/dist/cjs/Tooltip/index.js +17 -0
  163. package/dist/cjs/WithTooltip/WithTooltip.js +9 -0
  164. package/dist/cjs/WithTooltip/index.js +17 -0
  165. package/dist/cjs/Wizards/StepWizard.js +18 -0
  166. package/dist/cjs/Wizards/index.js +17 -0
  167. package/dist/cjs/Zendesk/Chat.js +69 -0
  168. package/dist/cjs/Zendesk/index.js +18 -0
  169. package/dist/cjs/Zendesk/zendesk.config.js +31 -0
  170. package/dist/cjs/index.js +40 -0
  171. package/dist/cjs/tailwind.config.js +9 -0
  172. package/dist/esm/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.js +5 -0
  173. package/dist/esm/Alerts/StaticAlert.js +28 -0
  174. package/dist/esm/Alerts/index.js +2 -0
  175. package/dist/esm/BlockUI/BlockUI.js +8 -0
  176. package/dist/esm/BlockUI/index.js +1 -0
  177. package/dist/esm/Buttons/Button.js +43 -0
  178. package/dist/esm/Buttons/index.js +1 -0
  179. package/dist/esm/Card/Card.js +5 -0
  180. package/dist/esm/Card/index.js +1 -0
  181. package/dist/esm/Chat/ChatLayout.js +27 -0
  182. package/dist/esm/Chat/ChatMessageHistory.js +53 -0
  183. package/dist/esm/Chat/index.js +2 -0
  184. package/dist/esm/ConnectionState/ConnectionState.js +21 -0
  185. package/dist/esm/ConnectionState/index.js +1 -0
  186. package/dist/esm/Containers/BodyContainer.js +5 -0
  187. package/dist/esm/Containers/ButtonSectionContainer.js +5 -0
  188. package/dist/esm/Containers/Container.js +6 -0
  189. package/dist/esm/Containers/DoubleContainer.js +14 -0
  190. package/dist/esm/Containers/MainContainer.js +5 -0
  191. package/dist/esm/Containers/OutletContainer.js +5 -0
  192. package/dist/esm/Containers/SubContainer.js +6 -0
  193. package/dist/esm/Containers/index.js +7 -0
  194. package/dist/esm/DynamicTable/BasicPrintDynamicTable.js +27 -0
  195. package/dist/esm/DynamicTable/DynamicPrintTable.js +131 -0
  196. package/dist/esm/DynamicTable/DynamicTable.js +192 -0
  197. package/dist/esm/DynamicTable/GenericDynamicTable.js +196 -0
  198. package/dist/esm/DynamicTable/index.js +4 -0
  199. package/dist/esm/Footer/Footer.js +16 -0
  200. package/dist/esm/Footer/index.js +1 -0
  201. package/dist/esm/Form/Checkbox/index.js +34 -0
  202. package/dist/esm/Form/Checklist/index.js +10 -0
  203. package/dist/esm/Form/DatePicker/index.js +31 -0
  204. package/dist/esm/Form/DynamicBaculoForm/index.js +140 -0
  205. package/dist/esm/Form/FieldContainer/DoubleFieldContainer.js +14 -0
  206. package/dist/esm/Form/FieldContainer/QuadrupleFieldContainer.js +14 -0
  207. package/dist/esm/Form/FieldContainer/TripleFieldContainer.js +14 -0
  208. package/dist/esm/Form/FieldContainer/index.js +3 -0
  209. package/dist/esm/Form/FileUpload/index.js +54 -0
  210. package/dist/esm/Form/FormButtons/index.js +5 -0
  211. package/dist/esm/Form/FormLayout/index.js +7 -0
  212. package/dist/esm/Form/SelectField/index.js +74 -0
  213. package/dist/esm/Form/TextArea/index.js +36 -0
  214. package/dist/esm/Form/TextField/index.js +70 -0
  215. package/dist/esm/Form/TimePicker/index.js +31 -0
  216. package/dist/esm/Form/YesNo/index.js +18 -0
  217. package/dist/esm/Form/index.js +13 -0
  218. package/dist/esm/Labels/InfoLabel/index.js +5 -0
  219. package/dist/esm/Labels/index.js +1 -0
  220. package/dist/esm/Layouts/homeLayout/index.js +10 -0
  221. package/dist/esm/Layouts/index.js +1 -0
  222. package/dist/esm/LineSeparator/LineSeparator.js +4 -0
  223. package/dist/esm/LineSeparator/index.js +1 -0
  224. package/dist/esm/Modal/Modal.js +32 -0
  225. package/dist/esm/Modal/index.js +1 -0
  226. package/dist/esm/NavBar/NavBar.js +32 -0
  227. package/dist/esm/NavBar/NavBar.types.js +1 -0
  228. package/dist/esm/NavBar/NavBar.utils.js +58 -0
  229. package/dist/esm/NavBar/index.js +3 -0
  230. package/dist/esm/ProgressBar/ProgressBar.js +5 -0
  231. package/dist/esm/ProgressBar/ProgressCircle.js +22 -0
  232. package/dist/esm/ProgressBar/index.js +2 -0
  233. package/dist/esm/Skeletons/LoadingInputSkeleton.js +8 -0
  234. package/dist/esm/Skeletons/index.js +1 -0
  235. package/dist/esm/Tab/Tab.js +19 -0
  236. package/dist/esm/Tab/index.js +1 -0
  237. package/dist/esm/Table/ZauruTable.js +150 -0
  238. package/dist/esm/Table/index.js +1 -0
  239. package/dist/esm/TaskList/TaskList.js +35 -0
  240. package/dist/esm/TaskList/index.js +1 -0
  241. package/dist/esm/Titles/LabelArray.js +7 -0
  242. package/dist/esm/Titles/TableColumnTitle.js +5 -0
  243. package/dist/esm/Titles/TitleH1.js +5 -0
  244. package/dist/esm/Titles/TitleH2.js +5 -0
  245. package/dist/esm/Titles/TitleH3.js +5 -0
  246. package/dist/esm/Titles/index.js +5 -0
  247. package/dist/esm/Tooltip/Tooltip.js +14 -0
  248. package/dist/esm/Tooltip/index.js +1 -0
  249. package/dist/esm/WithTooltip/WithTooltip.js +5 -0
  250. package/dist/esm/WithTooltip/index.js +1 -0
  251. package/dist/esm/Wizards/StepWizard.js +14 -0
  252. package/dist/esm/Wizards/index.js +1 -0
  253. package/dist/esm/Zendesk/Chat.js +63 -0
  254. package/dist/esm/Zendesk/index.js +2 -0
  255. package/dist/esm/Zendesk/zendesk.config.js +24 -0
  256. package/dist/esm/index.js +24 -0
  257. package/dist/esm/tailwind.config.js +8 -0
  258. package/dist/index.d.ts +24 -0
  259. package/dist/tailwind.config.d.ts +1 -0
  260. package/package.json +4 -3
  261. package/src/Table/ZauruTable.tsx +4 -2
@@ -0,0 +1,50 @@
1
+ export type NavBarItemsSchema = {
2
+ name: string;
3
+ link: string;
4
+ loggedIn: boolean;
5
+ icon?: any;
6
+ color?: "green";
7
+ childrens?: Exclude<NavBarItemsSchema, "loggedIn">[];
8
+ };
9
+ export type NavBarProps = {
10
+ title: string;
11
+ loggedIn: boolean;
12
+ items: Array<NavBarItemsSchema>;
13
+ selectedColor: "pink" | "purple" | "slate" | "green" | "yellow" | "red" | "sky";
14
+ LinkComponent?: any;
15
+ };
16
+ export type NavBarStateProps = {
17
+ NavBarOpen: boolean;
18
+ setNavBarOpen?: any;
19
+ };
20
+ export type ColorInterface = {
21
+ bg900: string;
22
+ bg700: string;
23
+ bg600: string;
24
+ bg500: string;
25
+ ring600: string;
26
+ ring500: string;
27
+ };
28
+ export type NavItemProps = {
29
+ name: string;
30
+ link: string;
31
+ icon?: any;
32
+ color: ColorInterface;
33
+ specialColor?: ColorInterface;
34
+ childrens?: Exclude<NavItemProps, "index" | "color">[];
35
+ };
36
+ export type EntityNameType = {
37
+ entityName: string;
38
+ };
39
+ export type EntityProps = {
40
+ name?: string;
41
+ color: ColorInterface;
42
+ options: any[];
43
+ };
44
+ export type DropDownLinkButtonType = {
45
+ text: string;
46
+ path: string;
47
+ icon?: any;
48
+ buttonHover?: string;
49
+ LinkComponent?: any;
50
+ };
@@ -0,0 +1,58 @@
1
+ export declare const COLORS: {
2
+ sky: {
3
+ bg900: string;
4
+ bg700: string;
5
+ bg600: string;
6
+ bg500: string;
7
+ ring600: string;
8
+ ring500: string;
9
+ };
10
+ purple: {
11
+ bg900: string;
12
+ bg700: string;
13
+ bg600: string;
14
+ bg500: string;
15
+ ring600: string;
16
+ ring500: string;
17
+ };
18
+ pink: {
19
+ bg900: string;
20
+ bg700: string;
21
+ bg600: string;
22
+ bg500: string;
23
+ ring600: string;
24
+ ring500: string;
25
+ };
26
+ slate: {
27
+ bg900: string;
28
+ bg700: string;
29
+ bg600: string;
30
+ bg500: string;
31
+ ring600: string;
32
+ ring500: string;
33
+ };
34
+ green: {
35
+ bg900: string;
36
+ bg700: string;
37
+ bg600: string;
38
+ bg500: string;
39
+ ring600: string;
40
+ ring500: string;
41
+ };
42
+ yellow: {
43
+ bg900: string;
44
+ bg700: string;
45
+ bg600: string;
46
+ bg500: string;
47
+ ring600: string;
48
+ ring500: string;
49
+ };
50
+ red: {
51
+ bg900: string;
52
+ bg700: string;
53
+ bg600: string;
54
+ bg500: string;
55
+ ring600: string;
56
+ ring500: string;
57
+ };
58
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./NavBar.js";
2
+ export * from "./NavBar.types.js";
3
+ export * from "./NavBar.utils.js";
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ title?: string;
3
+ percent?: string;
4
+ };
5
+ export declare const ProgressBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const ProgressCircle: ({ total, completed, description, title, }: {
2
+ total: number;
3
+ completed: number;
4
+ description: string;
5
+ title?: string | undefined;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./ProgressBar.js";
2
+ export * from "./ProgressCircle.js";
@@ -0,0 +1 @@
1
+ export declare const LoadingInputSkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./LoadingInputSkeleton.js";
@@ -0,0 +1,9 @@
1
+ export type TabItem = {
2
+ title: string;
3
+ link: string;
4
+ };
5
+ type Props = {
6
+ items: Array<TabItem>;
7
+ };
8
+ export declare const Tabs: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Tab.js";
@@ -0,0 +1,25 @@
1
+ import type { TableProps } from "react-data-table-component";
2
+ import { ExpandableRowsComponent } from "react-data-table-component/dist/DataTable/types.js";
3
+ type Props = TableProps<any> & {
4
+ columns: any;
5
+ conditionalRowStyles?: any;
6
+ data: any[];
7
+ loading?: boolean;
8
+ pagination?: {
9
+ totalRows: number;
10
+ rowsPerPageOptions: number[];
11
+ };
12
+ whitOutPagination?: boolean;
13
+ offlineSearch?: string[];
14
+ search?: {
15
+ placeholderSearch?: string;
16
+ };
17
+ expandable?: {
18
+ expandableRowExpanded?: (row: any) => boolean;
19
+ expandableRowsComponent?: ExpandableRowsComponent<any>;
20
+ };
21
+ theme?: "solarized" | "subTable";
22
+ className?: string;
23
+ };
24
+ export declare const ZauruTable: (props: Props) => import("react/jsx-runtime").JSX.Element;
25
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./ZauruTable.js";
@@ -0,0 +1,14 @@
1
+ export type TaskType = {
2
+ title: string;
3
+ description?: string;
4
+ status: "waiting" | "processing" | "done" | "error";
5
+ };
6
+ type TaskProps = {
7
+ task: TaskType;
8
+ };
9
+ export declare const Task: ({ task }: TaskProps) => import("react/jsx-runtime").JSX.Element;
10
+ type TaskModalProps = {
11
+ tasks: TaskType[];
12
+ };
13
+ export declare const TaskList: ({ tasks }: TaskModalProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./TaskList.js";
@@ -0,0 +1,4 @@
1
+ import { SelectFieldOption } from "@zauru-sdk/types";
2
+ export declare const LabelArray: ({ info }: {
3
+ info: SelectFieldOption[];
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type tableColumnTitleProps = {
2
+ textContent: String;
3
+ };
4
+ export declare const TableColumnTitle: ({ textContent }: tableColumnTitleProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TitleH1: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TitleH2: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TitleH3: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export * from "./LabelArray.js";
2
+ export * from "./TableColumnTitle.js";
3
+ export * from "./TitleH1.js";
4
+ export * from "./TitleH2.js";
5
+ export * from "./TitleH3.js";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ text: string;
5
+ };
6
+ export declare const Tooltip: ({ children, text }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Tooltip.js";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ text: string;
5
+ };
6
+ export declare const WithTooltip: (props: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./WithTooltip.js";
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from "react";
2
+ import React from "react";
3
+ export type StepWizard = {
4
+ index: number;
5
+ stepName: string;
6
+ component: ReactNode;
7
+ };
8
+ interface StepWizardProps {
9
+ steps: StepWizard[];
10
+ showStepName?: boolean;
11
+ loading?: boolean;
12
+ }
13
+ export declare const StepWizardComponent: React.FC<StepWizardProps>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./StepWizard.js";
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" resolution-mode="require"/>
2
+ export declare const logoutFromZendesk: () => void;
3
+ export declare const ZendeskAPI: (...args: any[]) => void;
4
+ interface ZendeskProps {
5
+ defer?: boolean;
6
+ onLoaded?: () => void;
7
+ token: string;
8
+ configuration: {
9
+ zendeskChatKey: string;
10
+ };
11
+ [key: string]: any;
12
+ }
13
+ export declare const Zendesk: React.FC<ZendeskProps>;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./Chat.js";
2
+ export * from "./zendesk.config.js";
@@ -0,0 +1,9 @@
1
+ export declare function zendeskJwt(current_user: {
2
+ selected_entity_id: number;
3
+ id: number;
4
+ email: string;
5
+ name: string;
6
+ }, configuration: {
7
+ zendeskJWTSecret: string;
8
+ zendeskJWTKey: string;
9
+ }): string;
@@ -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);