@zauru-sdk/components 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.22](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.21...v1.0.22) (2024-03-22)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.21](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.20...v1.0.21) (2024-03-22)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/components
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.0.20](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.19...v1.0.20) (2024-03-22)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/components
@@ -13,5 +13,5 @@ interface ChatLayoutProps {
13
13
  messageFieldId: number;
14
14
  };
15
15
  }
16
- declare const ChatLayout: React.FC<ChatLayoutProps>;
17
- export default ChatLayout;
16
+ export declare const ChatLayout: React.FC<ChatLayoutProps>;
17
+ export {};
@@ -4,7 +4,7 @@ import { TextField } from "../Form";
4
4
  import { Form } from "@remix-run/react";
5
5
  import { LoadingInputSkeleton } from "./../index";
6
6
  import { AttachmentIconSVG, SendMessageIcon, SpinnerSvg, } from "@zauru-sdk/icons";
7
- const ChatLayout = ({ children, sendingMessage = false, formConfig = undefined, }) => {
7
+ export const ChatLayout = ({ children, sendingMessage = false, formConfig = undefined, }) => {
8
8
  const refAttachment = useRef(null);
9
9
  const [formValues, setFormValues] = useState({ image: null });
10
10
  const handleAttachmentClick = () => {
@@ -25,4 +25,3 @@ const ChatLayout = ({ children, sendingMessage = false, formConfig = undefined,
25
25
  }
26
26
  } })] })] }));
27
27
  };
28
- export default ChatLayout;
@@ -1,2 +1 @@
1
- declare const ConnectionState: () => import("react/jsx-runtime").JSX.Element;
2
- export default ConnectionState;
1
+ export declare const ConnectionState: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useIsOnline } from "@zauru-sdk/hooks";
3
- const ConnectionState = () => {
3
+ export const ConnectionState = () => {
4
4
  const isOnline = useIsOnline();
5
5
  // Definir estilos
6
6
  const styles = {
@@ -19,4 +19,3 @@ const ConnectionState = () => {
19
19
  // Renderizar el estado de conexión
20
20
  return (_jsx("div", { style: styles.container, children: _jsx("p", { style: styles.text, children: isOnline ? "ONLINE ✅🌐" : "OFFLINE ❌🌐" }) }));
21
21
  };
22
- export default ConnectionState;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import { LoadingInputSkeleton } from "./../index";
4
- import ConnectionState from "src/ConnectionState/ConnectionState";
4
+ import { ConnectionState } from "./../ConnectionState";
5
5
  const COLORS = {
6
6
  purple: "bg-purple-500",
7
7
  pink: "bg-pink-500",
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TextField, TextFieldWithoutValidation } from "../TextField";
3
3
  import { TripleFieldContainer } from "../FieldContainer/TripleFieldContainer";
4
4
  import { DoubleFieldContainer } from "../FieldContainer/DoubleFieldContainer";
5
- import YesNo from "../YesNo";
5
+ import { YesNo } from "../YesNo";
6
6
  import { TextArea } from "../TextArea";
7
7
  import { SelectField } from "../SelectField";
8
8
  import { FileUploadField } from "../FileUpload";
9
9
  import { FormDatePicker } from "../DatePicker";
10
10
  import { FormTimePicker } from "../TimePicker";
11
11
  import { LineSeparator, StaticAlert, SubContainer } from "./../../index";
12
- import { GenericDynamicTable } from "src/DynamicTable/GenericDynamicTable";
12
+ import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable";
13
13
  import { getDepSelectOptions, getMunSelectOptions } from "@zauru-sdk/common";
14
14
  export function DynamicBaculoForm(props) {
15
15
  const { form, options = { showDescription: false, showTitle: false }, formName = "", namesStr = "", defaultValues = [], showingRules = [], readOnly = false, } = props;
@@ -8,5 +8,5 @@ type Props = {
8
8
  onChange?: (value: boolean) => void;
9
9
  disabled?: boolean;
10
10
  };
11
- declare const YesNo: (props: Props) => import("react/jsx-runtime").JSX.Element;
12
- export default YesNo;
11
+ export declare const YesNo: (props: Props) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useAppSelector } from "@zauru-sdk/redux";
3
3
  import { useState } from "react";
4
- const YesNo = (props) => {
4
+ export const YesNo = (props) => {
5
5
  const { id, name, title, defaultValue = false, helpText, onChange, disabled, } = props;
6
6
  const { formValidations } = useAppSelector((state) => state.formValidation);
7
7
  const error = formValidations[props.formName ?? "-1"]?.[props.name ?? "-1"];
@@ -16,4 +16,3 @@ const YesNo = (props) => {
16
16
  };
17
17
  return (_jsxs(_Fragment, { children: [_jsxs("label", { className: `relative inline-flex items-center cursor-pointer ${disabled ? "opacity-50" : ""}`, children: [_jsx("input", { type: "checkbox", id: id ?? name, name: name, checked: value, value: value.toString(), className: "sr-only peer", onChange: handleOnChange, disabled: disabled }), value.toString() === "false" && (_jsx("input", { type: "hidden", name: name, value: "false" })), _jsx("div", { className: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" }), _jsx("span", { className: "ml-3 text-sm font-medium text-gray-900", children: title })] }), error && (_jsxs("p", { className: `mt-2 text-sm text-${color}-600 dark:text-${color}-500`, children: [_jsx("span", { className: "font-medium", children: "Oops!" }), " ", error] })), !error && helpText && (_jsx("p", { className: `mt-2 italic text-sm text-${color}-500 dark:text-${color}-400`, children: helpText }))] }));
18
18
  };
19
- export default YesNo;
@@ -10,5 +10,5 @@ interface ZendeskProps {
10
10
  };
11
11
  [key: string]: any;
12
12
  }
13
- declare const Zendesk: React.FC<ZendeskProps>;
14
- export default Zendesk;
13
+ export declare const Zendesk: React.FC<ZendeskProps>;
14
+ export {};
@@ -23,7 +23,7 @@ export const ZendeskAPI = (...args) => {
23
23
  console.warn("Zendesk is not initialized yet");
24
24
  }
25
25
  };
26
- const Zendesk = (props) => {
26
+ export const Zendesk = (props) => {
27
27
  const { defer, configuration, token, ...other } = props;
28
28
  useEffect(() => {
29
29
  const insertScript = () => {
@@ -61,4 +61,3 @@ const Zendesk = (props) => {
61
61
  }, [props, defer, other, configuration, token]);
62
62
  return null;
63
63
  };
64
- export default Zendesk;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,6 @@
25
25
  "eslint-plugin-jsx-a11y": "^6.7.1",
26
26
  "eslint-plugin-react": "^7.33.2",
27
27
  "eslint-plugin-react-hooks": "^4.6.0",
28
- "react-data-table-component": "^7.4.7",
29
28
  "tailwindcss": "^3.4.1",
30
29
  "typescript": "^5.1.6"
31
30
  },
@@ -33,13 +32,14 @@
33
32
  "@reduxjs/toolkit": "^2.2.1",
34
33
  "@remix-run/react": "^2.8.1",
35
34
  "@zauru-sdk/common": "^1.0.13",
36
- "@zauru-sdk/hooks": "^1.0.20",
35
+ "@zauru-sdk/hooks": "^1.0.21",
37
36
  "@zauru-sdk/icons": "^1.0.19",
38
37
  "@zauru-sdk/types": "^1.0.13",
39
38
  "@zauru-sdk/utils": "^1.0.20",
40
39
  "framer-motion": "^11.0.8",
41
40
  "jsonwebtoken": "^9.0.2",
42
41
  "react": "^18.2.0",
42
+ "react-data-table-component": "^7.4.7",
43
43
  "react-dom": "^18.2.0",
44
44
  "react-is": "^18.2.0",
45
45
  "react-select": "^5.8.0",
@@ -48,5 +48,5 @@
48
48
  "engines": {
49
49
  "node": ">=18.0.0"
50
50
  },
51
- "gitHead": "84391740f5024f39c8795e006bdb676d6808ed56"
51
+ "gitHead": "0a861e59f00b43930a6a568c047426824ae92fe2"
52
52
  }
@@ -23,7 +23,7 @@ interface ChatLayoutProps {
23
23
  };
24
24
  }
25
25
 
26
- const ChatLayout: React.FC<ChatLayoutProps> = ({
26
+ export const ChatLayout: React.FC<ChatLayoutProps> = ({
27
27
  children,
28
28
  sendingMessage = false,
29
29
  formConfig = undefined,
@@ -129,5 +129,3 @@ const ChatLayout: React.FC<ChatLayoutProps> = ({
129
129
  </div>
130
130
  );
131
131
  };
132
-
133
- export default ChatLayout;
@@ -1,6 +1,6 @@
1
1
  import { useIsOnline } from "@zauru-sdk/hooks";
2
2
 
3
- const ConnectionState = () => {
3
+ export const ConnectionState = () => {
4
4
  const isOnline = useIsOnline();
5
5
 
6
6
  // Definir estilos
@@ -25,5 +25,3 @@ const ConnectionState = () => {
25
25
  </div>
26
26
  );
27
27
  };
28
-
29
- export default ConnectionState;
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import { LoadingInputSkeleton } from "./../index";
3
- import ConnectionState from "src/ConnectionState/ConnectionState";
3
+ import { ConnectionState } from "./../ConnectionState";
4
4
 
5
5
  type FooterProps = {
6
6
  href: string;
@@ -1,7 +1,7 @@
1
1
  import { TextField, TextFieldWithoutValidation } from "../TextField";
2
2
  import { TripleFieldContainer } from "../FieldContainer/TripleFieldContainer";
3
3
  import { DoubleFieldContainer } from "../FieldContainer/DoubleFieldContainer";
4
- import YesNo from "../YesNo";
4
+ import { YesNo } from "../YesNo";
5
5
  import { TextArea } from "../TextArea";
6
6
  import { SelectField } from "../SelectField";
7
7
  import { FileUploadField } from "../FileUpload";
@@ -15,7 +15,7 @@ import {
15
15
  SelectFieldOption,
16
16
  } from "@zauru-sdk/types";
17
17
  import { LineSeparator, StaticAlert, SubContainer } from "./../../index";
18
- import { GenericDynamicTable } from "src/DynamicTable/GenericDynamicTable";
18
+ import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable";
19
19
  import { getDepSelectOptions, getMunSelectOptions } from "@zauru-sdk/common";
20
20
 
21
21
  type Props = {
@@ -12,7 +12,7 @@ type Props = {
12
12
  disabled?: boolean;
13
13
  };
14
14
 
15
- const YesNo = (props: Props) => {
15
+ export const YesNo = (props: Props) => {
16
16
  const {
17
17
  id,
18
18
  name,
@@ -75,5 +75,3 @@ const YesNo = (props: Props) => {
75
75
  </>
76
76
  );
77
77
  };
78
-
79
- export default YesNo;
@@ -37,7 +37,7 @@ interface ZendeskProps {
37
37
  [key: string]: any; // Para propiedades adicionales que se pasen y se asignen a window.zESettings
38
38
  }
39
39
 
40
- const Zendesk: React.FC<ZendeskProps> = (props: ZendeskProps) => {
40
+ export const Zendesk: React.FC<ZendeskProps> = (props: ZendeskProps) => {
41
41
  const { defer, configuration, token, ...other } = props;
42
42
 
43
43
  useEffect(() => {
@@ -81,5 +81,3 @@ const Zendesk: React.FC<ZendeskProps> = (props: ZendeskProps) => {
81
81
 
82
82
  return null;
83
83
  };
84
-
85
- export default Zendesk;