letalkui 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,6 @@ jobs:
11
11
  steps:
12
12
  - name: Checkout
13
13
  uses: actions/checkout@v3
14
- with:
15
- fetch-depth: 0
16
14
 
17
15
  - name: Setup Node.js
18
16
  uses: actions/setup-node@v3
@@ -23,13 +21,6 @@ jobs:
23
21
  - name: Install dependencies
24
22
  run: npm i -f
25
23
 
26
- - name: Bump version
27
- run: |
28
- git config --global user.name "github-actions[bot]"
29
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
30
- npm version patch -m "chore(release): %s"
31
- git push origin master --follow-tags
32
-
33
24
  - name: Release
34
25
  run: npm publish
35
26
  env:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "letalkui",
3
3
  "private": false,
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -36,8 +36,17 @@ export const JsonEditor: React.FC<JsonEditorProps> = (props) => {
36
36
  const [jsonData, setJsonData] = useState<string>(stringifyValue)
37
37
  const [loadingSaveJson, setLoadingSaveJson] = useState<boolean>(false)
38
38
 
39
- const currentError: boolean = validation[INPUT_NAME] ?? error
40
- const currentHelperText: string = validation[INPUT_NAME] ?? helperText
39
+ const currentError: boolean = Boolean(validation[INPUT_NAME]) ?? error
40
+
41
+ const currentHelperText = (): string => {
42
+ if (INPUT_NAME in validation) {
43
+ if (helperText) return helperText
44
+
45
+ return "Ocorreu um erro inesperado. Por favor, tente novamente mais tarde."
46
+ }
47
+
48
+ return "Ocorreu um erro inesperado. Por favor, tente novamente mais tarde."
49
+ }
41
50
 
42
51
  const handleChange = (newValue: string) => {
43
52
  clearValidation(INPUT_NAME)
@@ -70,7 +79,7 @@ export const JsonEditor: React.FC<JsonEditorProps> = (props) => {
70
79
  value={value}
71
80
  onChange={handleChange}
72
81
  currentError={currentError}
73
- currentHelperText={currentHelperText}
82
+ currentHelperText={currentHelperText()}
74
83
  />
75
84
 
76
85
  <JsonForm.ActionsButtons>
package/src/index.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from "@/components/Button"
2
+ export * from "@/components/JsonEditor"
3
+ export * from "@/components/JsonView"