@zauru-sdk/components 2.0.185 → 2.0.186

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,14 @@
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
+ ## [2.0.186](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.0.185...v2.0.186) (2025-03-07)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.0.185](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.0.184...v2.0.185) (2025-03-07)
7
15
 
8
16
  **Note:** Version bump only for package @zauru-sdk/components
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TextField } from "../TextField/index.js";
3
3
  import { TripleFieldContainer } from "../FieldContainer/index.js";
4
4
  import { DoubleFieldContainer } from "../FieldContainer/index.js";
@@ -56,8 +56,12 @@ export function DynamicBaculoForm(props) {
56
56
  }) ?? [];
57
57
  return (_jsx(SubContainer, { title: field.name, children: _jsx(GenericDynamicTable, { name: "fixed_columns_table", columns: columns }) }, field.id));
58
58
  }
59
- case "zauru_data":
60
- return (_jsx(TextField, { title: `${field.required ? "*" : ""}${field.name}`, hint: field.hint, defaultValue: defaultValue?.value ?? field.default_value, disabled: true }, field.id));
59
+ case "zauru_data": {
60
+ if (field.required) {
61
+ return (_jsx(TextField, { title: `${field.required ? "*" : ""}${field.name}`, hint: field.hint, defaultValue: defaultValue?.value ?? field.default_value, disabled: true }, field.id));
62
+ }
63
+ return _jsx(_Fragment, {});
64
+ }
61
65
  case "hour":
62
66
  return (_jsx(FormTimePicker, { title: `${field.required ? "*" : ""}${field.name}`, name: `${namesStr}${field.form_id}_${field.id}`, hint: field.hint, disabled: readOnly, defaultValue: defaultValue?.value }, field.id));
63
67
  case "date":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "2.0.185",
3
+ "version": "2.0.186",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -33,11 +33,11 @@
33
33
  "@hookform/resolvers": "^3.9.0",
34
34
  "@reduxjs/toolkit": "^2.2.1",
35
35
  "@remix-run/react": "^2.8.1",
36
- "@zauru-sdk/common": "^2.0.177",
37
- "@zauru-sdk/hooks": "^2.0.180",
36
+ "@zauru-sdk/common": "^2.0.186",
37
+ "@zauru-sdk/hooks": "^2.0.186",
38
38
  "@zauru-sdk/icons": "^2.0.99",
39
- "@zauru-sdk/types": "^2.0.177",
40
- "@zauru-sdk/utils": "^2.0.185",
39
+ "@zauru-sdk/types": "^2.0.186",
40
+ "@zauru-sdk/utils": "^2.0.186",
41
41
  "framer-motion": "^11.7.0",
42
42
  "jsonwebtoken": "^9.0.2",
43
43
  "react": "^18.2.0",
@@ -49,5 +49,5 @@
49
49
  "styled-components": "^5.3.5",
50
50
  "zod": "^3.23.8"
51
51
  },
52
- "gitHead": "0089d558e05e0992d82d19cc9345bb37500862e0"
52
+ "gitHead": "ac66c630f3321403498b88e85be6bd8ad7655493"
53
53
  }
@@ -98,16 +98,20 @@ export function DynamicBaculoForm(props: Props) {
98
98
  </SubContainer>
99
99
  );
100
100
  }
101
- case "zauru_data":
102
- return (
103
- <TextField
104
- key={field.id}
105
- title={`${field.required ? "*" : ""}${field.name}`}
106
- hint={field.hint}
107
- defaultValue={defaultValue?.value ?? field.default_value}
108
- disabled={true}
109
- />
110
- );
101
+ case "zauru_data": {
102
+ if (field.required) {
103
+ return (
104
+ <TextField
105
+ key={field.id}
106
+ title={`${field.required ? "*" : ""}${field.name}`}
107
+ hint={field.hint}
108
+ defaultValue={defaultValue?.value ?? field.default_value}
109
+ disabled={true}
110
+ />
111
+ );
112
+ }
113
+ return <></>;
114
+ }
111
115
  case "hour":
112
116
  return (
113
117
  <FormTimePicker