@bexis2/bexis2-core-ui 0.2.29 → 0.2.31

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 (97) hide show
  1. package/README.md +18 -2
  2. package/dist/TableView.svelte +1 -1
  3. package/dist/components/CodeEditor/CodeEditor.svelte +32 -8
  4. package/dist/components/CodeEditor/CodeEditor.svelte.d.ts +1 -0
  5. package/dist/components/{file → File}/FileIcon.svelte +45 -45
  6. package/{src/lib/components/file → dist/components/File}/FileInfo.svelte +13 -13
  7. package/dist/components/ListView.svelte +5 -5
  8. package/dist/components/Table/Table.svelte +17 -2
  9. package/dist/components/Table/TableFilter.svelte +13 -6
  10. package/dist/components/form/Checkbox.svelte +13 -13
  11. package/dist/components/form/CheckboxKvPList.svelte +16 -16
  12. package/dist/components/form/CheckboxList.svelte +10 -10
  13. package/dist/components/form/DateInput.svelte +14 -14
  14. package/dist/components/form/DropdownKvP.svelte +54 -54
  15. package/dist/components/form/MultiSelect.svelte +181 -181
  16. package/dist/components/form/NumberInput.svelte +15 -15
  17. package/dist/components/form/TextArea.svelte +14 -14
  18. package/dist/components/form/TextInput.svelte +15 -15
  19. package/dist/components/page/Alert.svelte +28 -28
  20. package/dist/components/page/BackToTop.svelte +30 -30
  21. package/dist/components/page/Docs.svelte +22 -22
  22. package/dist/components/page/ErrorMessage.svelte +8 -8
  23. package/dist/components/page/Footer.svelte +5 -5
  24. package/dist/components/page/Header.svelte +5 -5
  25. package/dist/components/page/HelpPopUp.svelte +30 -30
  26. package/dist/components/page/PageCaller.js +19 -19
  27. package/dist/components/page/Spinner.svelte +14 -14
  28. package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -19
  29. package/dist/components/page/menu/MenuDataCaller.js +10 -10
  30. package/dist/css/core.ui.postcss +17 -17
  31. package/dist/css/themes/theme-bexis2.css +96 -96
  32. package/dist/css/themes/theme-crimson.css +101 -101
  33. package/dist/css/themes/theme-gold-nouveau.css +140 -140
  34. package/dist/css/themes/theme-hamlindigo.css +112 -112
  35. package/dist/css/themes/theme-modern.css +127 -127
  36. package/dist/css/themes/theme-rocket.css +119 -119
  37. package/dist/css/themes/theme-sahara.css +128 -128
  38. package/dist/css/themes/theme-seafoam.css +122 -122
  39. package/dist/css/themes/theme-seasonal.css +115 -115
  40. package/dist/css/themes/theme-skeleton.css +118 -118
  41. package/dist/css/themes/theme-vintage.css +125 -125
  42. package/dist/index.d.ts +3 -3
  43. package/dist/index.js +3 -3
  44. package/dist/models/Models.d.ts +3 -3
  45. package/dist/services/BaseCaller.js +16 -16
  46. package/package.json +3 -1
  47. package/src/lib/TableView.svelte +1 -1
  48. package/src/lib/components/CodeEditor/CodeEditor.svelte +43 -9
  49. package/src/lib/components/{file → File}/FileIcon.svelte +45 -45
  50. package/{dist/components/file → src/lib/components/File}/FileInfo.svelte +13 -13
  51. package/src/lib/components/ListView.svelte +11 -11
  52. package/src/lib/components/Table/Table.svelte +19 -3
  53. package/src/lib/components/Table/TableFilter.svelte +15 -6
  54. package/src/lib/components/Table/filter.ts +141 -141
  55. package/src/lib/components/form/Checkbox.svelte +24 -24
  56. package/src/lib/components/form/CheckboxKvPList.svelte +29 -29
  57. package/src/lib/components/form/CheckboxList.svelte +21 -21
  58. package/src/lib/components/form/DateInput.svelte +27 -27
  59. package/src/lib/components/form/DropdownKvP.svelte +54 -54
  60. package/src/lib/components/form/MultiSelect.svelte +181 -181
  61. package/src/lib/components/form/NumberInput.svelte +30 -30
  62. package/src/lib/components/form/TextArea.svelte +28 -28
  63. package/src/lib/components/form/TextInput.svelte +28 -28
  64. package/src/lib/components/page/Alert.svelte +41 -41
  65. package/src/lib/components/page/BackToTop.svelte +30 -30
  66. package/src/lib/components/page/Docs.svelte +46 -46
  67. package/src/lib/components/page/ErrorMessage.svelte +10 -10
  68. package/src/lib/components/page/Footer.svelte +18 -18
  69. package/src/lib/components/page/Header.svelte +18 -18
  70. package/src/lib/components/page/HelpPopUp.svelte +72 -72
  71. package/src/lib/components/page/PageCaller.js +19 -19
  72. package/src/lib/components/page/Spinner.svelte +20 -20
  73. package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +39 -39
  74. package/src/lib/components/page/menu/MenuDataCaller.js +10 -10
  75. package/src/lib/css/core.ui.postcss +17 -17
  76. package/src/lib/css/themes/theme-bexis2.css +96 -96
  77. package/src/lib/css/themes/theme-crimson.css +101 -101
  78. package/src/lib/css/themes/theme-gold-nouveau.css +140 -140
  79. package/src/lib/css/themes/theme-hamlindigo.css +112 -112
  80. package/src/lib/css/themes/theme-modern.css +127 -127
  81. package/src/lib/css/themes/theme-rocket.css +119 -119
  82. package/src/lib/css/themes/theme-sahara.css +128 -128
  83. package/src/lib/css/themes/theme-seafoam.css +122 -122
  84. package/src/lib/css/themes/theme-seasonal.css +115 -115
  85. package/src/lib/css/themes/theme-skeleton.css +118 -118
  86. package/src/lib/css/themes/theme-vintage.css +125 -125
  87. package/src/lib/index.ts +3 -3
  88. package/src/lib/models/Models.ts +3 -3
  89. package/src/lib/models/Page.ts +40 -40
  90. package/src/lib/services/Api.ts +55 -55
  91. package/src/lib/services/BaseCaller.js +16 -16
  92. package/src/lib/stores/apiStores.ts +31 -31
  93. /package/dist/components/{file → File}/FileIcon.svelte.d.ts +0 -0
  94. /package/dist/components/{file → File}/FileInfo.svelte.d.ts +0 -0
  95. /package/dist/components/{file → File}/FileUploader.svelte +0 -0
  96. /package/dist/components/{file → File}/FileUploader.svelte.d.ts +0 -0
  97. /package/src/lib/components/{file → File}/FileUploader.svelte +0 -0
@@ -1,125 +1,125 @@
1
- /* https://fonts.google.com/specimen/Abril+Fatface?query=Abril+Fatface&noto.query=Abril */
2
- @import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap');
3
- /* https://fonts.google.com/noto/specimen/Noto+Sans?query=sans */
4
- @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100;0,200;0,300;0,400;1,100;1,200;1,300&display=swap');
5
-
6
- :root {
7
- /* =~= Theme Styles =~= */
8
- --theme-font-family-base: 'Noto Sans', sans-serif;
9
- --theme-font-family-heading: 'Abril Fatface', cursive;
10
- --theme-font-color-base: var(--color-primary-900);
11
- --theme-font-color-dark: var(--color-primary-100);
12
- --theme-rounded-base: 2px;
13
- --theme-rounded-container: 4px;
14
- --theme-border-base: 1px;
15
- /* =~= Theme On-X Colors =~= */
16
- --on-primary: 0 0 0;
17
- --on-secondary: 0 0 0;
18
- --on-tertiary: 0 0 0;
19
- --on-success: 0 0 0;
20
- --on-warning: 0 0 0;
21
- --on-error: 0 0 0;
22
- --on-surface: 255 255 255;
23
- /* =~= Theme Colors =~= */
24
- /* primary | #ea861a */
25
- --color-primary-50: 252 237 221; /* ⬅ #fceddd */
26
- --color-primary-100: 251 231 209; /* ⬅ #fbe7d1 */
27
- --color-primary-200: 250 225 198; /* ⬅ #fae1c6 */
28
- --color-primary-300: 247 207 163; /* ⬅ #f7cfa3 */
29
- --color-primary-400: 240 170 95; /* ⬅ #f0aa5f */
30
- --color-primary-500: 234 134 26; /* ⬅ #ea861a */
31
- --color-primary-600: 211 121 23; /* ⬅ #d37917 */
32
- --color-primary-700: 176 101 20; /* ⬅ #b06514 */
33
- --color-primary-800: 140 80 16; /* ⬅ #8c5010 */
34
- --color-primary-900: 115 66 13; /* ⬅ #73420d */
35
- /* secondary | #97cea5 */
36
- --color-secondary-50: 239 248 242; /* ⬅ #eff8f2 */
37
- --color-secondary-100: 234 245 237; /* ⬅ #eaf5ed */
38
- --color-secondary-200: 229 243 233; /* ⬅ #e5f3e9 */
39
- --color-secondary-300: 213 235 219; /* ⬅ #d5ebdb */
40
- --color-secondary-400: 182 221 192; /* ⬅ #b6ddc0 */
41
- --color-secondary-500: 151 206 165; /* ⬅ #97cea5 */
42
- --color-secondary-600: 136 185 149; /* ⬅ #88b995 */
43
- --color-secondary-700: 113 155 124; /* ⬅ #719b7c */
44
- --color-secondary-800: 91 124 99; /* ⬅ #5b7c63 */
45
- --color-secondary-900: 74 101 81; /* ⬅ #4a6551 */
46
- /* tertiary | #06b6d4 */
47
- --color-tertiary-50: 218 244 249; /* ⬅ #daf4f9 */
48
- --color-tertiary-100: 205 240 246; /* ⬅ #cdf0f6 */
49
- --color-tertiary-200: 193 237 244; /* ⬅ #c1edf4 */
50
- --color-tertiary-300: 155 226 238; /* ⬅ #9be2ee */
51
- --color-tertiary-400: 81 204 225; /* ⬅ #51cce1 */
52
- --color-tertiary-500: 6 182 212; /* ⬅ #06b6d4 */
53
- --color-tertiary-600: 5 164 191; /* ⬅ #05a4bf */
54
- --color-tertiary-700: 5 137 159; /* ⬅ #05899f */
55
- --color-tertiary-800: 4 109 127; /* ⬅ #046d7f */
56
- --color-tertiary-900: 3 89 104; /* ⬅ #035968 */
57
- /* success | #84cb5d */
58
- --color-success-50: 237 247 231; /* ⬅ #edf7e7 */
59
- --color-success-100: 230 245 223; /* ⬅ #e6f5df */
60
- --color-success-200: 224 242 215; /* ⬅ #e0f2d7 */
61
- --color-success-300: 206 234 190; /* ⬅ #ceeabe */
62
- --color-success-400: 169 219 142; /* ⬅ #a9db8e */
63
- --color-success-500: 132 203 93; /* ⬅ #84cb5d */
64
- --color-success-600: 119 183 84; /* ⬅ #77b754 */
65
- --color-success-700: 99 152 70; /* ⬅ #639846 */
66
- --color-success-800: 79 122 56; /* ⬅ #4f7a38 */
67
- --color-success-900: 65 99 46; /* ⬅ #41632e */
68
- /* warning | #f2ac23 */
69
- --color-warning-50: 253 243 222; /* ⬅ #fdf3de */
70
- --color-warning-100: 252 238 211; /* ⬅ #fceed3 */
71
- --color-warning-200: 252 234 200; /* ⬅ #fceac8 */
72
- --color-warning-300: 250 222 167; /* ⬅ #fadea7 */
73
- --color-warning-400: 246 197 101; /* ⬅ #f6c565 */
74
- --color-warning-500: 242 172 35; /* ⬅ #f2ac23 */
75
- --color-warning-600: 218 155 32; /* ⬅ #da9b20 */
76
- --color-warning-700: 182 129 26; /* ⬅ #b6811a */
77
- --color-warning-800: 145 103 21; /* ⬅ #916715 */
78
- --color-warning-900: 119 84 17; /* ⬅ #775411 */
79
- /* error | #d57e78 */
80
- --color-error-50: 249 236 235; /* ⬅ #f9eceb */
81
- --color-error-100: 247 229 228; /* ⬅ #f7e5e4 */
82
- --color-error-200: 245 223 221; /* ⬅ #f5dfdd */
83
- --color-error-300: 238 203 201; /* ⬅ #eecbc9 */
84
- --color-error-400: 226 165 161; /* ⬅ #e2a5a1 */
85
- --color-error-500: 213 126 120; /* ⬅ #d57e78 */
86
- --color-error-600: 192 113 108; /* ⬅ #c0716c */
87
- --color-error-700: 160 95 90; /* ⬅ #a05f5a */
88
- --color-error-800: 128 76 72; /* ⬅ #804c48 */
89
- --color-error-900: 104 62 59; /* ⬅ #683e3b */
90
- /* surface | #3f3731 */
91
- --color-surface-50: 226 225 224; /* ⬅ #e2e1e0 */
92
- --color-surface-100: 217 215 214; /* ⬅ #d9d7d6 */
93
- --color-surface-200: 207 205 204; /* ⬅ #cfcdcc */
94
- --color-surface-300: 178 175 173; /* ⬅ #b2afad */
95
- --color-surface-400: 121 115 111; /* ⬅ #79736f */
96
- --color-surface-500: 63 55 49; /* ⬅ #3f3731 */
97
- --color-surface-600: 57 50 44; /* ⬅ #39322c */
98
- --color-surface-700: 47 41 37; /* ⬅ #2f2925 */
99
- --color-surface-800: 38 33 29; /* ⬅ #26211d */
100
- --color-surface-900: 31 27 24; /* ⬅ #1f1b18 */
101
- }
102
-
103
- [data-theme='vintage'] h1,
104
- [data-theme='vintage'] h2,
105
- [data-theme='vintage'] h3,
106
- [data-theme='vintage'] h4,
107
- [data-theme='vintage'] h5,
108
- [data-theme='vintage'] h6 {
109
- letter-spacing: 1px;
110
- }
111
-
112
- /* Applied to body with `<body data-theme="vintage">` */
113
- /* Created with: https://csshero.org/mesher/ */
114
- [data-theme='vintage'] {
115
- /* prettier-ignore */
116
- background-image:
117
- radial-gradient(at 100% 0%, hsla(135,34%,70%,0.20) 0px, transparent 50%),
118
- radial-gradient(at 85% 100%, hsla(31,83%,50%,0.20) 0px, transparent 50%);
119
- }
120
- .dark [data-theme='vintage'] {
121
- /* prettier-ignore */
122
- background-image:
123
- radial-gradient(at 100% 0%, hsla(135,34%,70%,0.14) 0px, transparent 50%),
124
- radial-gradient(at 85% 100%, hsla(31,83%,50%,0.14) 0px, transparent 50%);
125
- }
1
+ /* https://fonts.google.com/specimen/Abril+Fatface?query=Abril+Fatface&noto.query=Abril */
2
+ @import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap');
3
+ /* https://fonts.google.com/noto/specimen/Noto+Sans?query=sans */
4
+ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100;0,200;0,300;0,400;1,100;1,200;1,300&display=swap');
5
+
6
+ :root {
7
+ /* =~= Theme Styles =~= */
8
+ --theme-font-family-base: 'Noto Sans', sans-serif;
9
+ --theme-font-family-heading: 'Abril Fatface', cursive;
10
+ --theme-font-color-base: var(--color-primary-900);
11
+ --theme-font-color-dark: var(--color-primary-100);
12
+ --theme-rounded-base: 2px;
13
+ --theme-rounded-container: 4px;
14
+ --theme-border-base: 1px;
15
+ /* =~= Theme On-X Colors =~= */
16
+ --on-primary: 0 0 0;
17
+ --on-secondary: 0 0 0;
18
+ --on-tertiary: 0 0 0;
19
+ --on-success: 0 0 0;
20
+ --on-warning: 0 0 0;
21
+ --on-error: 0 0 0;
22
+ --on-surface: 255 255 255;
23
+ /* =~= Theme Colors =~= */
24
+ /* primary | #ea861a */
25
+ --color-primary-50: 252 237 221; /* ⬅ #fceddd */
26
+ --color-primary-100: 251 231 209; /* ⬅ #fbe7d1 */
27
+ --color-primary-200: 250 225 198; /* ⬅ #fae1c6 */
28
+ --color-primary-300: 247 207 163; /* ⬅ #f7cfa3 */
29
+ --color-primary-400: 240 170 95; /* ⬅ #f0aa5f */
30
+ --color-primary-500: 234 134 26; /* ⬅ #ea861a */
31
+ --color-primary-600: 211 121 23; /* ⬅ #d37917 */
32
+ --color-primary-700: 176 101 20; /* ⬅ #b06514 */
33
+ --color-primary-800: 140 80 16; /* ⬅ #8c5010 */
34
+ --color-primary-900: 115 66 13; /* ⬅ #73420d */
35
+ /* secondary | #97cea5 */
36
+ --color-secondary-50: 239 248 242; /* ⬅ #eff8f2 */
37
+ --color-secondary-100: 234 245 237; /* ⬅ #eaf5ed */
38
+ --color-secondary-200: 229 243 233; /* ⬅ #e5f3e9 */
39
+ --color-secondary-300: 213 235 219; /* ⬅ #d5ebdb */
40
+ --color-secondary-400: 182 221 192; /* ⬅ #b6ddc0 */
41
+ --color-secondary-500: 151 206 165; /* ⬅ #97cea5 */
42
+ --color-secondary-600: 136 185 149; /* ⬅ #88b995 */
43
+ --color-secondary-700: 113 155 124; /* ⬅ #719b7c */
44
+ --color-secondary-800: 91 124 99; /* ⬅ #5b7c63 */
45
+ --color-secondary-900: 74 101 81; /* ⬅ #4a6551 */
46
+ /* tertiary | #06b6d4 */
47
+ --color-tertiary-50: 218 244 249; /* ⬅ #daf4f9 */
48
+ --color-tertiary-100: 205 240 246; /* ⬅ #cdf0f6 */
49
+ --color-tertiary-200: 193 237 244; /* ⬅ #c1edf4 */
50
+ --color-tertiary-300: 155 226 238; /* ⬅ #9be2ee */
51
+ --color-tertiary-400: 81 204 225; /* ⬅ #51cce1 */
52
+ --color-tertiary-500: 6 182 212; /* ⬅ #06b6d4 */
53
+ --color-tertiary-600: 5 164 191; /* ⬅ #05a4bf */
54
+ --color-tertiary-700: 5 137 159; /* ⬅ #05899f */
55
+ --color-tertiary-800: 4 109 127; /* ⬅ #046d7f */
56
+ --color-tertiary-900: 3 89 104; /* ⬅ #035968 */
57
+ /* success | #84cb5d */
58
+ --color-success-50: 237 247 231; /* ⬅ #edf7e7 */
59
+ --color-success-100: 230 245 223; /* ⬅ #e6f5df */
60
+ --color-success-200: 224 242 215; /* ⬅ #e0f2d7 */
61
+ --color-success-300: 206 234 190; /* ⬅ #ceeabe */
62
+ --color-success-400: 169 219 142; /* ⬅ #a9db8e */
63
+ --color-success-500: 132 203 93; /* ⬅ #84cb5d */
64
+ --color-success-600: 119 183 84; /* ⬅ #77b754 */
65
+ --color-success-700: 99 152 70; /* ⬅ #639846 */
66
+ --color-success-800: 79 122 56; /* ⬅ #4f7a38 */
67
+ --color-success-900: 65 99 46; /* ⬅ #41632e */
68
+ /* warning | #f2ac23 */
69
+ --color-warning-50: 253 243 222; /* ⬅ #fdf3de */
70
+ --color-warning-100: 252 238 211; /* ⬅ #fceed3 */
71
+ --color-warning-200: 252 234 200; /* ⬅ #fceac8 */
72
+ --color-warning-300: 250 222 167; /* ⬅ #fadea7 */
73
+ --color-warning-400: 246 197 101; /* ⬅ #f6c565 */
74
+ --color-warning-500: 242 172 35; /* ⬅ #f2ac23 */
75
+ --color-warning-600: 218 155 32; /* ⬅ #da9b20 */
76
+ --color-warning-700: 182 129 26; /* ⬅ #b6811a */
77
+ --color-warning-800: 145 103 21; /* ⬅ #916715 */
78
+ --color-warning-900: 119 84 17; /* ⬅ #775411 */
79
+ /* error | #d57e78 */
80
+ --color-error-50: 249 236 235; /* ⬅ #f9eceb */
81
+ --color-error-100: 247 229 228; /* ⬅ #f7e5e4 */
82
+ --color-error-200: 245 223 221; /* ⬅ #f5dfdd */
83
+ --color-error-300: 238 203 201; /* ⬅ #eecbc9 */
84
+ --color-error-400: 226 165 161; /* ⬅ #e2a5a1 */
85
+ --color-error-500: 213 126 120; /* ⬅ #d57e78 */
86
+ --color-error-600: 192 113 108; /* ⬅ #c0716c */
87
+ --color-error-700: 160 95 90; /* ⬅ #a05f5a */
88
+ --color-error-800: 128 76 72; /* ⬅ #804c48 */
89
+ --color-error-900: 104 62 59; /* ⬅ #683e3b */
90
+ /* surface | #3f3731 */
91
+ --color-surface-50: 226 225 224; /* ⬅ #e2e1e0 */
92
+ --color-surface-100: 217 215 214; /* ⬅ #d9d7d6 */
93
+ --color-surface-200: 207 205 204; /* ⬅ #cfcdcc */
94
+ --color-surface-300: 178 175 173; /* ⬅ #b2afad */
95
+ --color-surface-400: 121 115 111; /* ⬅ #79736f */
96
+ --color-surface-500: 63 55 49; /* ⬅ #3f3731 */
97
+ --color-surface-600: 57 50 44; /* ⬅ #39322c */
98
+ --color-surface-700: 47 41 37; /* ⬅ #2f2925 */
99
+ --color-surface-800: 38 33 29; /* ⬅ #26211d */
100
+ --color-surface-900: 31 27 24; /* ⬅ #1f1b18 */
101
+ }
102
+
103
+ [data-theme='vintage'] h1,
104
+ [data-theme='vintage'] h2,
105
+ [data-theme='vintage'] h3,
106
+ [data-theme='vintage'] h4,
107
+ [data-theme='vintage'] h5,
108
+ [data-theme='vintage'] h6 {
109
+ letter-spacing: 1px;
110
+ }
111
+
112
+ /* Applied to body with `<body data-theme="vintage">` */
113
+ /* Created with: https://csshero.org/mesher/ */
114
+ [data-theme='vintage'] {
115
+ /* prettier-ignore */
116
+ background-image:
117
+ radial-gradient(at 100% 0%, hsla(135,34%,70%,0.20) 0px, transparent 50%),
118
+ radial-gradient(at 85% 100%, hsla(31,83%,50%,0.20) 0px, transparent 50%);
119
+ }
120
+ .dark [data-theme='vintage'] {
121
+ /* prettier-ignore */
122
+ background-image:
123
+ radial-gradient(at 100% 0%, hsla(135,34%,70%,0.14) 0px, transparent 50%),
124
+ radial-gradient(at 85% 100%, hsla(31,83%,50%,0.14) 0px, transparent 50%);
125
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import FileIcon from './components/file/FileIcon.svelte';
2
- import FileInfo from './components/file/FileInfo.svelte';
3
- import FileUploader from './components/file/FileUploader.svelte';
1
+ import FileIcon from './components/File/FileIcon.svelte';
2
+ import FileInfo from './components/File/FileInfo.svelte';
3
+ import FileUploader from './components/File/FileUploader.svelte';
4
4
  import Spinner from './components/page/Spinner.svelte';
5
5
  import Page from './components/page/Page.svelte';
6
6
  import Alert from './components/page/Alert.svelte';
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // Reexport your entry components here
2
2
  // import ListView from './components/ListView.svelte';
3
3
  // import TableView from './TableView.svelte';
4
- import FileIcon from './components/file/FileIcon.svelte';
5
- import FileInfo from './components/file/FileInfo.svelte';
6
- import FileUploader from './components/file/FileUploader.svelte';
4
+ import FileIcon from './components/File/FileIcon.svelte';
5
+ import FileInfo from './components/File/FileInfo.svelte';
6
+ import FileUploader from './components/File/FileUploader.svelte';
7
7
  //page
8
8
  import Spinner from './components/page/Spinner.svelte';
9
9
  import Page from './components/page/Page.svelte';
@@ -61,9 +61,9 @@ export interface fileObjType {
61
61
  webkitRelativePath: string;
62
62
  }
63
63
  export interface ColumnInstructions {
64
- toStringFn?: (value: any) => string;
65
- toSortableValueFn?: (value: any) => string | number;
66
- toFilterableValueFn?: (value: any) => string | number | Date;
64
+ toStringFn?: (any: any) => string;
65
+ toSortableValueFn?: (any: any) => string | number;
66
+ toFilterableValueFn?: (any: any) => string | number | Date;
67
67
  renderComponent?: typeof SvelteComponent;
68
68
  }
69
69
  export interface Column {
@@ -1,16 +1,16 @@
1
- // Implementations for all the calls for the pokemon endpoints.
2
- //import Api from "./Api";
3
- import { host } from '../stores/apiStores';
4
-
5
- // go to a internal action
6
- export const goTo = async (url, intern = true) => {
7
- if (intern == true) {
8
- // go to inside bexis2
9
- if (window != null && host != null && url != null) {
10
- window.open(host + url, '_self')?.focus();
11
- }
12
- } // go to a external page
13
- else {
14
- window.open(url, '_blank')?.focus();
15
- }
16
- };
1
+ // Implementations for all the calls for the pokemon endpoints.
2
+ //import Api from "./Api";
3
+ import { host } from '../stores/apiStores';
4
+
5
+ // go to a internal action
6
+ export const goTo = async (url, intern = true) => {
7
+ if (intern == true) {
8
+ // go to inside bexis2
9
+ if (window != null && host != null && url != null) {
10
+ window.open(host + url, '_self')?.focus();
11
+ }
12
+ } // go to a external page
13
+ else {
14
+ window.open(url, '_blank')?.focus();
15
+ }
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.2.29",
3
+ "version": "0.2.31",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -60,6 +60,7 @@
60
60
  "@codemirror/lang-html": "^6.4.5",
61
61
  "@codemirror/lang-javascript": "^6.1.9",
62
62
  "@codemirror/lang-json": "^6.0.1",
63
+ "@codemirror/lint": "^6.4.2",
63
64
  "@codemirror/theme-one-dark": "^6.1.2",
64
65
  "@floating-ui/dom": "^1.2.7",
65
66
  "@fortawesome/fontawesome-free": "^6.2.1",
@@ -70,6 +71,7 @@
70
71
  "codemirror": "^6.0.1",
71
72
  "delay": "^6.0.0",
72
73
  "dotenv": "^16.3.1",
74
+ "eslint4b-prebuilt": "^6.7.2",
73
75
  "highlight.js": "^11.8.0",
74
76
  "highlightjs-svelte": "^1.0.6",
75
77
  "svelte": "^3.54.0",
@@ -1 +1 @@
1
- <h1>table</h1>
1
+ <h1>table</h1>
@@ -3,16 +3,19 @@
3
3
 
4
4
  import CodeMirror from 'svelte-codemirror-editor';
5
5
  import Fa from 'svelte-fa/src/fa.svelte';
6
+ import Linter from 'eslint4b-prebuilt';
6
7
  import { html } from '@codemirror/lang-html';
7
- import { javascript } from '@codemirror/lang-javascript';
8
- import { json } from '@codemirror/lang-json';
8
+ import { javascript, esLint } from '@codemirror/lang-javascript';
9
+ import { lintGutter, linter } from '@codemirror/lint';
10
+ import { json, jsonParseLinter } from '@codemirror/lang-json';
9
11
  import { oneDark } from '@codemirror/theme-one-dark';
10
12
  import { Modal, modalStore } from '@skeletonlabs/skeleton';
11
13
  import { faMoon, faSave, faSun } from '@fortawesome/free-regular-svg-icons';
12
14
  import { faArrowRotateLeft, faXmark } from '@fortawesome/free-solid-svg-icons';
13
15
  import type { ThemeSpec } from 'svelte-codemirror-editor';
14
16
  import type { ModalSettings } from '@skeletonlabs/skeleton';
15
-
17
+ import type { Extension } from '@codemirror/state';
18
+
16
19
  export let id: string;
17
20
  export let title = '';
18
21
  export let initialValue = '';
@@ -21,6 +24,7 @@
21
24
  export let dark = true;
22
25
  export let toggle = true;
23
26
  export let actions = true;
27
+ export let isValid = false;
24
28
  export let styles: ThemeSpec = {
25
29
  '&': {
26
30
  borderRadius: '0.5rem',
@@ -39,14 +43,43 @@
39
43
  body: 'Unsaved changes will be lost. Are you sure you want to continue?',
40
44
  response: (r: boolean) => (r ? (value = initialValue) : null)
41
45
  };
42
- </script>
43
46
 
44
- <div class="items-center justify-center">
47
+ const extensions: Extension[] =
48
+ language === 'js'
49
+ ? [linter(esLint(new Linter())), lintGutter()]
50
+ : language === 'json'
51
+ ? [linter(jsonParseLinter()), lintGutter()]
52
+ : [];
53
+
54
+ const isValidJSON = (str: string) => {
55
+ try {
56
+ JSON.parse(str);
57
+ } catch (e) {
58
+ return false;
59
+ }
60
+ return true;
61
+ };
45
62
 
46
- <h1 class="h1 font-semibold text-primary-500 mb-3" id="{id}-title">{title}</h1>
63
+ const isValidJS = (str: string) => {
64
+ try {
65
+ new Function(str);
66
+ } catch (e) {
67
+ return false;
68
+ }
69
+ return true;
70
+ };
71
+
72
+ $: isValid =
73
+ language === 'json' ? isValidJSON(value) : language === 'js' ? isValidJS(value) : true;
74
+ </script>
75
+
76
+ <div class="grid items-stretch justify-stretch gap-1">
77
+ <label class="label" for="{id}-editor" id="{id}-title">
78
+ <span>{title}</span>
79
+ </label>
47
80
  <slot id="{id}-description" />
48
- <div class="grid gap-1 w-full h-full mt-5">
49
- <div class="rounded-lg shadow-lg w-full" id="{id}-editor">
81
+ <div class="grid gap-1 w-full h-full">
82
+ <div class="rounded-lg shadow-lg w-full overflow-auto" id="{id}-editor">
50
83
  <CodeMirror
51
84
  bind:value
52
85
  lang={language === 'html'
@@ -57,11 +90,11 @@
57
90
  theme={dark ? oneDark : null}
58
91
  class="flex w-full"
59
92
  {styles}
93
+ {extensions}
60
94
  />
61
95
  </div>
62
96
  </div>
63
97
 
64
-
65
98
  <div class="flex justify-between gap-2 items-center mt-3" id="{id}-footer">
66
99
  <div class="flex gap-2">
67
100
  <button
@@ -96,6 +129,7 @@
96
129
  <button
97
130
  class="btn variant-filled-primary"
98
131
  id="{id}-save"
132
+ disabled={!isValid}
99
133
  on:click|preventDefault={() => dispatch('save')}><Fa icon={faSave} /></button
100
134
  >
101
135
  </div>
@@ -1,45 +1,45 @@
1
- <script>
2
- import Fa from 'svelte-fa';
3
- import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
4
- import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
5
- import { faFileWord } from '@fortawesome/free-regular-svg-icons';
6
- import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
7
- import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
8
- import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
9
- import { faFileImage } from '@fortawesome/free-regular-svg-icons';
10
- import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
11
-
12
- export let type = '';
13
- </script>
14
-
15
- {#if type.includes('excel') || type.includes('spreadsheetml')}
16
- <Fa icon={faFileExcel} />
17
- {/if}
18
-
19
- {#if type.includes('text')}
20
- <Fa icon={faFileAlt} />
21
- {/if}
22
-
23
- {#if type.includes('image')}
24
- <Fa icon={faFileImage} />
25
- {/if}
26
-
27
- {#if type.includes('audio')}
28
- <Fa icon={faFileAudio} />
29
- {/if}
30
-
31
- {#if type.includes('video')}
32
- <Fa icon={faFileVideo} />
33
- {/if}
34
-
35
- {#if type.includes('word')}
36
- <Fa icon={faFileWord} />
37
- {/if}
38
-
39
- {#if type.includes('pdf')}
40
- <Fa icon={faFilePdf} />
41
- {/if}
42
-
43
- {#if type.includes('zip')}
44
- <Fa icon={faFileArchive} />
45
- {/if}
1
+ <script>
2
+ import Fa from 'svelte-fa';
3
+ import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
4
+ import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
5
+ import { faFileWord } from '@fortawesome/free-regular-svg-icons';
6
+ import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
7
+ import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
8
+ import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
9
+ import { faFileImage } from '@fortawesome/free-regular-svg-icons';
10
+ import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
11
+
12
+ export let type = '';
13
+ </script>
14
+
15
+ {#if type.includes('excel') || type.includes('spreadsheetml')}
16
+ <Fa icon={faFileExcel} />
17
+ {/if}
18
+
19
+ {#if type.includes('text')}
20
+ <Fa icon={faFileAlt} />
21
+ {/if}
22
+
23
+ {#if type.includes('image')}
24
+ <Fa icon={faFileImage} />
25
+ {/if}
26
+
27
+ {#if type.includes('audio')}
28
+ <Fa icon={faFileAudio} />
29
+ {/if}
30
+
31
+ {#if type.includes('video')}
32
+ <Fa icon={faFileVideo} />
33
+ {/if}
34
+
35
+ {#if type.includes('word')}
36
+ <Fa icon={faFileWord} />
37
+ {/if}
38
+
39
+ {#if type.includes('pdf')}
40
+ <Fa icon={faFilePdf} />
41
+ {/if}
42
+
43
+ {#if type.includes('zip')}
44
+ <Fa icon={faFileArchive} />
45
+ {/if}
@@ -1,13 +1,13 @@
1
- <script>
2
- import FileIcon from './FileIcon.svelte';
3
-
4
- export let name = '';
5
- export let type = '';
6
- // export let description;
7
- export let size = '';
8
- </script>
9
-
10
- <div style="font-size:{size}">
11
- <FileIcon {type} />
12
- {name}
13
- </div>
1
+ <script>
2
+ import FileIcon from './FileIcon.svelte';
3
+
4
+ export let name = '';
5
+ export let type = '';
6
+ // export let description;
7
+ export let size = '';
8
+ </script>
9
+
10
+ <div style="font-size:{size}">
11
+ <FileIcon {type} />
12
+ {name}
13
+ </div>
@@ -1,11 +1,11 @@
1
- <script lang="ts">
2
- type x = {
3
- name: string;
4
- };
5
-
6
- let result: x = { name: 'david' };
7
- </script>
8
-
9
- <h1>MyList</h1>
10
- {result.name}
11
- <b>from bexis-lib</b>
1
+ <script lang="ts">
2
+ type x = {
3
+ name: string;
4
+ };
5
+
6
+ let result: x = { name: 'david' };
7
+ </script>
8
+
9
+ <h1>MyList</h1>
10
+ {result.name}
11
+ <b>from bexis-lib</b>
@@ -47,8 +47,17 @@
47
47
  expand: addExpandedRows()
48
48
  });
49
49
 
50
- const accessors: AccessorType[] =
51
- $data.length > 0 ? (Object.keys($data[0]) as AccessorType[]) : [];
50
+ const allCols: { [key: string]: any } = {};
51
+
52
+ $data.forEach((item) => {
53
+ Object.keys(item).forEach((key) => {
54
+ if (!allCols[key]) {
55
+ allCols[key] = {};
56
+ }
57
+ });
58
+ });
59
+
60
+ const accessors: AccessorType[] = Object.keys(allCols) as AccessorType[];
52
61
 
53
62
  const tableColumns = [
54
63
  ...accessors
@@ -123,6 +132,9 @@
123
132
  return table.column({
124
133
  header: key,
125
134
  accessor: accessor,
135
+ cell: ({ value }) => {
136
+ return (value === undefined) ? "" : value;
137
+ },
126
138
  plugins: {
127
139
  sort: {
128
140
  invert: true
@@ -249,7 +261,11 @@
249
261
  <tr {...rowAttrs} id="{tableId}-row-{row.id}">
250
262
  {#each row.cells as cell (cell?.id)}
251
263
  <Subscribe attrs={cell.attrs()} let:attrs>
252
- <td {...attrs} class="!p-2 w-max focus:resize" id="{tableId}-{cell.id}-{row.id}">
264
+ <td
265
+ {...attrs}
266
+ class="!p-2 w-max focus:resize"
267
+ id="{tableId}-{cell.id}-{row.id}"
268
+ >
253
269
  <div
254
270
  class="flex items-center h-max overflow-x-auto resize-none hover:resize"
255
271
  class:max-w-md={!fitToScreen}