rosie-ui 0.1.10 → 0.3.0

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 (130) hide show
  1. package/CHANGELOG.md +82 -61
  2. package/LICENSE +21 -21
  3. package/README.md +101 -108
  4. package/dist/css/rosie.css +6 -10
  5. package/dist/fa-brands-400.woff2 +0 -0
  6. package/dist/fa-regular-400.woff2 +0 -0
  7. package/dist/fa-solid-900.woff2 +0 -0
  8. package/dist/fa-v4compatibility.woff2 +0 -0
  9. package/dist/js/components/datepicker/date-picker.component.d.ts +9 -0
  10. package/dist/js/components/datepicker/date-picker.component.js +13 -0
  11. package/dist/js/components/datepicker/date-range-picker.component.d.ts +6 -0
  12. package/dist/js/components/datepicker/date-range-picker.component.js +9 -0
  13. package/dist/js/components/datepicker/index.d.ts +2 -0
  14. package/dist/js/components/datepicker/index.js +3 -0
  15. package/dist/js/components/dialog.component.d.ts +0 -1
  16. package/dist/js/components/dialog.component.js +1 -1
  17. package/dist/js/components/dropdown.component.d.ts +4 -4
  18. package/dist/js/components/dropdown.component.js +28 -12
  19. package/dist/js/components/grid/grid-cell.component.d.ts +1 -1
  20. package/dist/js/components/grid/grid-cell.component.js +1 -1
  21. package/dist/js/components/grid/grid-row.component.js +4 -13
  22. package/dist/js/components/grid/grid.component.js +7 -29
  23. package/dist/js/components/grid/index.js +1 -1
  24. package/dist/js/components/grid/types.d.ts +5 -7
  25. package/dist/js/components/grid/types.js +1 -1
  26. package/dist/js/components/index.d.ts +4 -3
  27. package/dist/js/components/index.js +5 -4
  28. package/dist/js/components/loading-indicator.component.d.ts +1 -0
  29. package/dist/js/components/loading-indicator.component.js +5 -0
  30. package/dist/js/components/paging-toolbar.component.d.ts +4 -3
  31. package/dist/js/components/paging-toolbar.component.js +5 -11
  32. package/dist/js/components/query-builder/criteria-field.component.d.ts +9 -0
  33. package/dist/js/components/query-builder/criteria-field.component.js +23 -0
  34. package/dist/js/components/query-builder/index.d.ts +2 -0
  35. package/dist/js/components/query-builder/index.js +3 -0
  36. package/dist/js/components/query-builder/query-operation.component.d.ts +9 -0
  37. package/dist/js/components/query-builder/query-operation.component.js +33 -0
  38. package/dist/js/components/query-builder/type.d.ts +42 -0
  39. package/dist/js/components/query-builder/type.js +18 -0
  40. package/dist/js/core/ajax.d.ts +17 -2
  41. package/dist/js/core/ajax.js +3 -3
  42. package/dist/js/core/data/index.d.ts +1 -0
  43. package/dist/js/core/data/index.js +2 -1
  44. package/dist/js/core/data/model.d.ts +4 -8
  45. package/dist/js/core/data/model.js +2 -10
  46. package/dist/js/core/data/proxy/client.js +65 -0
  47. package/dist/js/core/data/proxy/index.d.ts +2 -0
  48. package/dist/js/core/data/proxy/index.js +3 -0
  49. package/dist/js/core/data/{proxy.d.ts → proxy/server.d.ts} +1 -1
  50. package/dist/js/{data/proxy.js → core/data/proxy/server.js} +4 -4
  51. package/dist/js/core/data/store.d.ts +3 -3
  52. package/dist/js/core/data/store.js +1 -1
  53. package/dist/js/core/index.d.ts +13 -8
  54. package/dist/js/core/index.js +10 -4
  55. package/dist/js/core/lang/array.d.ts +5 -0
  56. package/dist/js/core/lang/array.js +9 -0
  57. package/dist/js/core/lang/date.d.ts +13 -0
  58. package/dist/js/core/lang/date.js +40 -0
  59. package/dist/js/core/lang/number.js +17 -0
  60. package/dist/js/{lang → core/lang}/string.d.ts +0 -2
  61. package/dist/js/core/lang/string.js +13 -0
  62. package/dist/js/core/mixins/constants.d.ts +1 -0
  63. package/dist/js/core/mixins/constants.js +14 -0
  64. package/dist/js/core/mixins/dom.d.ts +2 -0
  65. package/dist/js/core/mixins/dom.js +13 -0
  66. package/dist/js/core/mixins/index.d.ts +3 -0
  67. package/dist/js/core/mixins/index.js +4 -0
  68. package/dist/js/core/mixins/utilities.d.ts +10 -0
  69. package/dist/js/core/mixins/utilities.js +44 -0
  70. package/dist/js/core/observable.d.ts +6 -7
  71. package/dist/js/core/observable.js +18 -20
  72. package/dist/js/core/types.d.ts +0 -14
  73. package/dist/js/core/types.js +1 -1
  74. package/dist/js/index.d.ts +0 -6
  75. package/dist/js/index.js +1 -7
  76. package/dist/webfonts/fa-brands-400.woff2 +0 -0
  77. package/dist/webfonts/fa-regular-400.woff2 +0 -0
  78. package/dist/webfonts/fa-solid-900.woff2 +0 -0
  79. package/dist/webfonts/fa-v4compatibility.woff2 +0 -0
  80. package/package.json +50 -56
  81. package/scss/{rosie.scss → _base.scss} +3 -11
  82. package/scss/_functions.scss +16 -0
  83. package/scss/_mixin.scss +6 -6
  84. package/scss/_reset.scss +96 -95
  85. package/scss/_utilities.scss +32 -32
  86. package/scss/_variables.scss +103 -32
  87. package/scss/components/_date-picker.scss +18 -18
  88. package/scss/components/_grid.scss +37 -38
  89. package/scss/components/index.scss +2 -2
  90. package/scss/index.scss +9 -0
  91. package/dist/css/components/index.css +0 -1
  92. package/dist/js/components/custom-hook.d.ts +0 -2
  93. package/dist/js/components/custom-hook.js +0 -12
  94. package/dist/js/components/date-picker.component.d.ts +0 -26
  95. package/dist/js/components/date-picker.component.js +0 -92
  96. package/dist/js/components/form/index.d.ts +0 -1
  97. package/dist/js/components/form/index.js +0 -2
  98. package/dist/js/components/form/textfield.component.d.ts +0 -5
  99. package/dist/js/components/form/textfield.component.js +0 -40
  100. package/dist/js/core/cache.js +0 -65
  101. package/dist/js/core/data/proxy.js +0 -53
  102. package/dist/js/core/utils.d.ts +0 -14
  103. package/dist/js/core/utils.js +0 -79
  104. package/dist/js/data/index.d.ts +0 -3
  105. package/dist/js/data/index.js +0 -4
  106. package/dist/js/data/model.d.ts +0 -14
  107. package/dist/js/data/model.js +0 -49
  108. package/dist/js/data/proxy.d.ts +0 -8
  109. package/dist/js/data/store.d.ts +0 -10
  110. package/dist/js/data/store.js +0 -37
  111. package/dist/js/lang/array.d.ts +0 -16
  112. package/dist/js/lang/array.js +0 -51
  113. package/dist/js/lang/date.d.ts +0 -21
  114. package/dist/js/lang/date.js +0 -76
  115. package/dist/js/lang/number.js +0 -17
  116. package/dist/js/lang/string.js +0 -15
  117. package/dist/js/mixin/index.d.ts +0 -2
  118. package/dist/js/mixin/index.js +0 -3
  119. package/dist/js/mixin/observable.d.ts +0 -21
  120. package/dist/js/mixin/observable.js +0 -57
  121. package/dist/js/mixin/types.d.ts +0 -17
  122. package/dist/js/mixin/types.js +0 -2
  123. package/dist/js/utils.d.ts +0 -33
  124. package/dist/js/utils.js +0 -114
  125. package/dist/webfonts/fa-brands-400.ttf +0 -0
  126. package/dist/webfonts/fa-regular-400.ttf +0 -0
  127. package/dist/webfonts/fa-solid-900.ttf +0 -0
  128. package/dist/webfonts/fa-v4compatibility.ttf +0 -0
  129. /package/dist/js/core/{cache.d.ts → data/proxy/client.d.ts} +0 -0
  130. /package/dist/js/{lang → core/lang}/number.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,62 +1,83 @@
1
- # Rosie UI
2
-
3
- ## Next
4
-
5
- ## 0.1.10
6
- > 2024-05-30
7
- - Correct type in `groupBy` extension method
8
-
9
- ## 0.1.8
10
- > 2024-05-28
11
-
12
- - New Features
13
- - Add `useSubject` custom hook
14
- - Improvements
15
- - #10 Should configure css class: rosie-grid-bordered rosie-grid-striped rosie-grid-hover
16
- - #18 `Subject` enhancement
17
- - #14 `DataModel` enhancement
18
- - #16 `Grid` enhancement
19
- - Add array extension method: `groupBy`, `sumBy`, `toDictionary`
20
-
21
- ## 0.1.6
22
- > 2024-04-29
23
-
24
- - New Features
25
- - #6 Add `DataModel`, `DataStore` object
26
- - Improvements
27
- - #9 Supports to select row by checkbox
28
- - Restructure `ts`
29
- - Refine `scss`
30
- - Bug Fixes
31
- - #13 `GridCell` not update value when `DataModel` change
32
-
33
- ## 0.1.3
34
- > 2024-01-13
35
-
36
- - New Features
37
- - #2 Add Observable object
38
- - Add `TextField` component
39
- - Improvements
40
- - Change to use `axios` for AJAX instead of `fetch`
41
-
42
- ## 0.0.4
43
- > 2023-11-12
44
-
45
- - #1 TypeError: Failed to execute 'text' on 'Response': body stream already read
46
-
47
- ## 0.0.3
48
- > 2023-10-30
49
-
50
- - Should declare `react`, `react-dom` in `peerDependencies`
51
- - Separate `components`
52
- - Correct build command
53
-
54
- ## 0.0.2
55
- > 2023-10-27
56
-
57
- - Restructure codebase, separate script and style
58
-
59
- ## 0.0.1
60
- > 2023-10-17
61
-
1
+ # Changelog
2
+
3
+ ## Next
4
+
5
+ ## 0.3.0
6
+ > 2026-02-12
7
+
8
+ - New Features
9
+ - Add new components:
10
+ - `PagingToolbar`
11
+ - `DatePicker`, `DateRangePicker`
12
+ - `Dropdown`, `InputDropdown`
13
+ - `QueryOperation`
14
+ - Load data to `Grid` via `store` property
15
+ - Bug Fixes
16
+ - Correct `rosie-grid` css
17
+ - Breaking Changes
18
+ - Upgrade to React 19.2.4
19
+
20
+ ## 0.2.0
21
+ > 2025-08-28
22
+
23
+ - Breaking Changes
24
+ - Upgrade to React 19.1
25
+
26
+ ## 0.1.9
27
+ > 2024-05-30
28
+ - Correct type in `groupBy` extension method
29
+
30
+ ## 0.1.8
31
+ > 2024-05-28
32
+
33
+ - New Features
34
+ - Add `useSubject` custom hook
35
+ - Improvements
36
+ - #10 Should configure css class: rosie-grid-bordered rosie-grid-striped rosie-grid-hover
37
+ - #18 `Subject` enhancement
38
+ - #14 `DataModel` enhancement
39
+ - #16 `Grid` enhancement
40
+ - Add array extension method: `groupBy`, `sumBy`, `toDictionary`
41
+
42
+ ## 0.1.6
43
+ > 2024-04-29
44
+
45
+ - New Features
46
+ - #6 Add `DataModel`, `DataStore` object
47
+ - Improvements
48
+ - #9 Supports to select row by checkbox
49
+ - Restructure `ts`
50
+ - Refine `scss`
51
+ - Bug Fixes
52
+ - #13 `GridCell` not update value when `DataModel` change
53
+
54
+ ## 0.1.3
55
+ > 2024-01-13
56
+
57
+ - New Features
58
+ - #2 Add Observable object
59
+ - Add `TextField` component
60
+ - Improvements
61
+ - Change to use `axios` for AJAX instead of `fetch`
62
+
63
+ ## 0.0.4
64
+ > 2023-11-12
65
+
66
+ - #1 TypeError: Failed to execute 'text' on 'Response': body stream already read
67
+
68
+ ## 0.0.3
69
+ > 2023-10-30
70
+
71
+ - Should declare `react`, `react-dom` in `peerDependencies`
72
+ - Separate `components`
73
+ - Correct build command
74
+
75
+ ## 0.0.2
76
+ > 2023-10-27
77
+
78
+ - Restructure codebase, separate script and style
79
+
80
+ ## 0.0.1
81
+ > 2023-10-17
82
+
62
83
  - Initial project
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Huy Trong Nguyen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Huy Trong Nguyen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,109 +1,102 @@
1
- # Rosie UI
2
-
3
- Rosie UI is a JavaScript library that build on top of [React 18.2](https://react.dev/) and [Bootstrap 5.3](https://getbootstrap.com), helping you build data-intensive, cross-platform web apps for desktops, tablets, and smartphones.
4
-
5
- ## Getting Started
6
-
7
- ### File Structure
8
-
9
- ```
10
- your-project/
11
- ├── node_modules/
12
- │ ├── rosie-ui
13
- │ │ ├── dist
14
- │ │ │ ├── css
15
- │ │ │ ├── js
16
- │ │ │ ├── webfonts
17
- ├── scss
18
- ├── src/
19
- ├── app
20
- │ │ ├── components
21
- │ │ ├── _app.component.scss
22
- │ │ ├── app.component.tsx
23
- │ ├── app.html
24
- │ ├── app.scss
25
- ├── app.tsx
26
- ├── package.json
27
- ├── tsconfig.json
28
- ```
29
-
30
- #### `app.html`
31
-
32
- ```html
33
- <!doctype html>
34
- <html lang="en">
35
- <head>
36
- <!-- Required meta tags -->
37
- <meta charset="utf-8" />
38
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
39
-
40
- <title>Hello, world!</title>
41
-
42
- <link rel="stylesheet" href="app.scss" />
43
- </head>
44
- <body>
45
- <div id="react-root"></div>
46
- <script src="app.tsx"></script>
47
- </body>
48
- </html>
49
- ```
50
-
51
- #### `app.scss`
52
-
53
- ```scss
54
- @import '../../node_modules/rosie-ui/dist/css/rosie.css';
55
-
56
- @import 'components/app.component';
57
- ```
58
-
59
- #### `app.tsx`
60
-
61
- ```tsx
62
- import { createRoot } from 'react-dom/client';
63
-
64
- import { AppComponent } from './components/app.component';
65
-
66
- createRoot(document.getElementById('react-root') as HTMLElement).render(<AppComponent />);
67
- ```
68
-
69
- ## Customize
70
-
71
- ```scss
72
- // app.scss
73
- // Option 1: Include all of Rosie UI
74
-
75
- @import '../../node_modules/rosie-ui/dist/css/rosie.css';
76
-
77
- // Then add additional custom code here
78
- ```
79
-
80
- ```scss
81
- // app.scss
82
- // Option 2: Include parts of Rosie UI
83
-
84
- // 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
85
- @import '../../../node_modules/bootstrap/scss/functions';
86
-
87
- // 2. Include any default variable overrides here
88
- // @import '../../../node_modules/rosie-ui/scss/variables';
89
-
90
- // 3. Include remainder of required Bootstrap stylesheets
91
-
92
- @import '../../../node_modules/bootstrap/scss/bootstrap';
93
-
94
- // 5. Include remainder of required parts
95
- @import '../../../node_modules/rosie-ui/scss/mixin';
96
- @import '../../../node_modules/rosie-ui/scss/reset';
97
- @import '../../../node_modules/rosie-ui/scss/utilities';
98
-
99
- $fa-font-path: '../../../node_modules/@fortawesome/fontawesome-free/webfonts';
100
-
101
- @import '../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome';
102
- @import '../../../node_modules/@fortawesome/fontawesome-free/scss/solid';
103
-
104
- // Then add additional custom code here
105
- ```
106
-
107
- ## License
108
-
1
+ # Rosie UI
2
+
3
+ Rosie UI is a JavaScript library that build on top of [React 19.1](https://react.dev/) and [Bootstrap 5.3](https://getbootstrap.com), helping you build data-intensive, cross-platform web apps for desktops, tablets, and smartphones.
4
+
5
+ ## Getting Started
6
+
7
+ - Create a project folder and set up npm
8
+ - Install `esbuild`, `sass`
9
+ - Install `rosie-ui`, `react`, `react-dom`
10
+ - Install additional dependencies
11
+
12
+ ### Project Structure
13
+
14
+ ```
15
+ your-project/
16
+ ├── node_modules/
17
+ │ ├── bootstrap
18
+ │ │ └── dist
19
+ │ └── js
20
+ │ │ └── bootstrap.bundle.min.js
21
+ └── rosie-ui
22
+ ├── dist
23
+ │ ├── css
24
+ │ ├── js
25
+ └── webfonts
26
+ │ └── scss
27
+ │ └── _variables.scss
28
+ ├── dist/
29
+ │ ├── app.css
30
+ │ ├── app.js
31
+ │ └── index.html
32
+ ├── src/
33
+ │ ├── app
34
+ │ │ ├── views
35
+ │ │ │ ├── _app.view.scss
36
+ │ │ │ └── app.view.tsx
37
+ │ │ ├── app.scss
38
+ │ │ └── app.tsx
39
+ ├── package.json
40
+ └── tsconfig.json
41
+ ```
42
+
43
+ #### `index.html`
44
+
45
+ ```html
46
+ <!doctype html>
47
+ <html lang="en">
48
+ <head>
49
+ <!-- Required meta tags -->
50
+ <meta charset="utf-8" />
51
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
52
+ <title>Hello, world!</title>
53
+ <link rel="stylesheet" href="app.css" />
54
+ </head>
55
+ <body>
56
+ <div id="react-root"></div>
57
+ <script src="app.js"></script>
58
+ </body>
59
+ </html>
60
+ ```
61
+
62
+ #### `app.scss`
63
+
64
+ ```scss
65
+ @forward '../../node_modules/rosie-ui/dist/css/rosie.css';
66
+
67
+ @forward 'views/app.view';
68
+ ```
69
+
70
+ #### `app.tsx`
71
+
72
+ While the Bootstrap CSS can be used with any framework, the Bootstrap JavaScript is not fully compatible with JavaScript frameworks like React, Vue, and Angular which assume full knowledge of the DOM. Both Bootstrap and the framework may attempt to mutate the same DOM element, resulting in bugs like dropdowns that are stuck in the “open” position.
73
+
74
+ ```tsx
75
+ import 'bootstrap/dist/js/bootstrap.bundle.min';
76
+
77
+ import { createRoot } from 'react-dom/client';
78
+
79
+ import { AppView } from './views/app.view';
80
+
81
+ createRoot(document.getElementById('react-root') as HTMLElement).render(<AppView />);
82
+ ```
83
+
84
+ #### `scripts` in `package.json`
85
+
86
+ ```json
87
+ {
88
+ // ...
89
+ "scripts": {
90
+ "start": "esbuild src/app/app.tsx --bundle --outfile=dist/app.js --loader:.tsx=tsx --format=iife --watch",
91
+ "build": "npm run build-css && npm run build-js",
92
+ "build-css": "sass src/app/app.scss disc/app.css --style=compressed --no-source-map",
93
+ "build-js": "esbuild src/app/app.tsx --bundle --outfile=dist/app.js --loader:.tsx=tsx --format=iife",
94
+ "test": "echo \"Error: no test specified\" && exit 1"
95
+ },
96
+ // ...
97
+ }
98
+ ```
99
+
100
+ ## License
101
+
109
102
  `Rosie UI` is released under the MIT license.