@hortiview/default-components 0.0.11202 → 0.0.11919

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 (32) hide show
  1. package/README.md +55 -50
  2. package/dist/HealthCheckFailed-D-HxxKaW.js +1839 -0
  3. package/dist/InternationalizationWrapper-f8wtvSQv.js +41 -0
  4. package/dist/LoadingSpinner-cKWdZk2k.js +514 -0
  5. package/dist/assets/DefaultFormNumber.css +1 -0
  6. package/dist/assets/HealthCheckFailed.css +1 -0
  7. package/dist/assets/LoadingSpinner.css +1 -0
  8. package/dist/assets/index.css +1 -0
  9. package/dist/assets/useTranslation.css +1 -0
  10. package/dist/component-DsB0poTj-DaqoXt8b.js +530 -0
  11. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +3603 -0
  12. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +11 -0
  13. package/dist/components/HealthChecks/DataBaseHealthCheck.js +19 -0
  14. package/dist/components/HealthChecks/DefaultHealthCheck.js +19 -0
  15. package/dist/components/HealthChecks/IotServiceHealthCheck.js +19 -0
  16. package/dist/components/HealthChecks/PlatformHealthCheck.js +19 -0
  17. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +18 -0
  18. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +8 -0
  19. package/dist/i18n-BfBMXJfT.js +1739 -0
  20. package/dist/i18n.js +7 -0
  21. package/dist/index.es-D-CKRzIB-DytY6U2C.js +1029 -0
  22. package/dist/locales/en-US.js +11 -0
  23. package/dist/locales/es-MX.js +11 -0
  24. package/dist/locales/tr-TR.js +11 -0
  25. package/dist/main.js +16 -4
  26. package/dist/useTranslation-DCJK5-ax.js +4070 -0
  27. package/package.json +31 -8
  28. package/dist/assets/App.css +0 -1
  29. package/dist/assets/Button.css +0 -1
  30. package/dist/components/App/App.test.js +0 -32948
  31. package/dist/components/Button/Button.js +0 -11
  32. package/dist/components/Label/Label.js +0 -7
package/README.md CHANGED
@@ -1,50 +1,55 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
-
14
- - Configure the top-level `parserOptions` property like this:
15
-
16
- ```js
17
- export default tseslint.config({
18
- languageOptions: {
19
- // other options...
20
- parserOptions: {
21
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
- tsconfigRootDir: import.meta.dirname,
23
- },
24
- },
25
- })
26
- ```
27
-
28
- - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
- - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
-
32
- ```js
33
- // eslint.config.js
34
- import react from 'eslint-plugin-react'
35
-
36
- export default tseslint.config({
37
- // Set the react version
38
- settings: { react: { version: '18.3' } },
39
- plugins: {
40
- // Add the react plugin
41
- react,
42
- },
43
- rules: {
44
- // other rules...
45
- // Enable its recommended rules
46
- ...react.configs.recommended.rules,
47
- ...react.configs['jsx-runtime'].rules,
48
- },
49
- })
50
- ```
1
+ # Hortiview Default Components
2
+
3
+ This is a component library that provides default components that posess default translations for the basic languages used in the HortiView Platform.
4
+
5
+ Supported languages are currently: English, spanish and turkish.
6
+
7
+ ## Install
8
+
9
+ `npm i @hortiview/default-components`
10
+
11
+ `yarn add @hortiview/default-components`
12
+
13
+ ## Remarks
14
+
15
+ This library provides form components using [react-hook-form](https://react-hook-form.com/get-started). When you want to use these components please install `react-hook-form` before using them.
16
+
17
+ ## Available Components
18
+
19
+ 1. [DefaultFormNumber](#defaultformnumber)
20
+ 1. [DefaultLoadingSpinner](#defaultloadingspinner)
21
+ 1. [HealthCheckComponents](#healthcheckcomponents)
22
+ 1. [DataBaseHealthCheck](#databasehealthcheck)
23
+ 1. [DefaultHealthCheck](#defaulthealthcheck)
24
+ 1. [IotServiceHealthCheck](#iotservicehealthcheck)
25
+ 1. [PlatformHealthCheck](#platformhealthcheck)
26
+ 1. [ImpatienceLoadingSpinner](#impatienceloadingspinner)
27
+
28
+ ## Available Components
29
+
30
+ ### DefaultFormNumber
31
+
32
+ Number input field that formats the users input depending on the input language. The component automatically sets the language specific thousand separators and only allows the language specific decimal separator.
33
+
34
+ ### DefaultLoadingSpinner
35
+
36
+ Renders a loading spinner. The loading spinner can be customized in size and color. It can also be centered.
37
+
38
+ ### HealthCheckComponents
39
+
40
+ A screen that shows a health check failed message. It can be used if the check for database health, iot health or HV platform health fails. Please use the default components provided here to ensure a consistent user experience for the HV platform.
41
+
42
+ If a custom text and type should be displayed please use the shared component `<HealthCheckFailed />` and provide a custom `title` and `subtitle`.
43
+
44
+ #### DataBaseHealthCheck
45
+
46
+ #### DefaultHealthCheck
47
+
48
+ #### IotServiceHealthCheck
49
+
50
+ #### PlatformHealthCheck
51
+
52
+ ### ImpatienceLoadingSpinner
53
+
54
+ This Loading spinner will automatically change to a specific text, after a certain waiting time, the time is adjustable.
55
+ The default waiting time are 10 seconds.