@bexis2/bexis2-core-ui 0.0.22 → 0.0.25
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/README.md +14 -33
- package/dist/TableView.svelte +1 -1
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +167 -0
- package/dist/components/Table/Table.svelte.d.ts +17 -0
- package/dist/components/Table/TableFilter.svelte +168 -0
- package/dist/components/Table/TableFilter.svelte.d.ts +21 -0
- package/dist/components/Table/TablePagination.svelte +60 -0
- package/dist/components/Table/TablePagination.svelte.d.ts +17 -0
- package/dist/components/Table/filter.d.ts +4 -0
- package/dist/components/Table/filter.js +83 -0
- package/dist/components/file/FileIcon.svelte +45 -0
- package/dist/components/file/FileInfo.svelte +13 -0
- package/dist/components/{File → file}/FileUploader.svelte +35 -38
- package/dist/components/form/Checkbox.svelte +21 -0
- package/dist/components/form/Checkbox.svelte.d.ts +24 -0
- package/dist/components/form/CheckboxKvPList.svelte +18 -0
- package/dist/components/form/CheckboxKvPList.svelte.d.ts +20 -0
- package/dist/components/form/CheckboxList.svelte +18 -0
- package/dist/components/form/CheckboxList.svelte.d.ts +20 -0
- package/dist/components/form/DateInput.svelte +21 -0
- package/dist/components/form/DateInput.svelte.d.ts +24 -0
- package/dist/components/form/DropdownKvP.svelte +44 -0
- package/dist/components/form/DropdownKvP.svelte.d.ts +43 -0
- package/dist/components/form/InputContainer.svelte +21 -0
- package/dist/components/form/InputContainer.svelte.d.ts +20 -0
- package/dist/components/form/MultiSelect.svelte +89 -0
- package/dist/components/form/MultiSelect.svelte.d.ts +41 -0
- package/dist/components/form/NumberInput.svelte +21 -0
- package/dist/components/form/NumberInput.svelte.d.ts +24 -0
- package/dist/components/form/TextArea.svelte +20 -0
- package/dist/components/form/TextArea.svelte.d.ts +24 -0
- package/dist/components/form/TextInput.svelte +21 -0
- package/dist/components/form/TextInput.svelte.d.ts +24 -0
- package/dist/components/spinner/Spinner.svelte +9 -0
- package/dist/css/core.ui.css +5 -2
- package/dist/css/themes/theme-bexis2.css +96 -98
- package/dist/css/themes/theme-crimson.css +3 -2
- package/dist/css/themes/theme-hamlindigo.css +3 -2
- package/dist/css/themes/theme-seafoam.css +3 -2
- package/dist/index.d.ts +16 -5
- package/dist/index.js +20 -5
- package/dist/models/Models.d.ts +28 -0
- package/dist/services/Api.js +12 -11
- package/dist/stores/apistore.js +13 -13
- package/package.json +101 -85
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/ListView.svelte +11 -13
- package/src/lib/components/Table/Table.svelte +184 -0
- package/src/lib/components/Table/TableFilter.svelte +176 -0
- package/src/lib/components/Table/TablePagination.svelte +61 -0
- package/src/lib/components/Table/filter.ts +94 -0
- package/src/lib/components/file/FileIcon.svelte +45 -0
- package/src/lib/components/file/FileInfo.svelte +13 -0
- package/src/lib/components/file/FileUploader.svelte +184 -0
- package/src/lib/components/form/Checkbox.svelte +24 -0
- package/src/lib/components/form/CheckboxKvPList.svelte +21 -0
- package/src/lib/components/form/CheckboxList.svelte +21 -0
- package/src/lib/components/form/DateInput.svelte +24 -0
- package/src/lib/components/form/DropdownKvP.svelte +44 -0
- package/src/lib/components/form/InputContainer.svelte +22 -0
- package/src/lib/components/form/MultiSelect.svelte +89 -0
- package/src/lib/components/form/NumberInput.svelte +24 -0
- package/src/lib/components/form/TextArea.svelte +23 -0
- package/src/lib/components/form/TextInput.svelte +24 -0
- package/src/lib/components/spinner/Spinner.svelte +9 -0
- package/src/lib/css/core.ui.css +5 -2
- package/src/lib/css/themes/theme-bexis2.css +96 -98
- package/src/lib/css/themes/theme-crimson.css +3 -2
- package/src/lib/css/themes/theme-hamlindigo.css +3 -2
- package/src/lib/css/themes/theme-seafoam.css +3 -2
- package/src/lib/index.ts +40 -11
- package/src/lib/models/Models.ts +70 -39
- package/src/lib/services/Api.ts +55 -58
- package/src/lib/stores/apistore.ts +28 -32
- package/dist/components/File/FileIcon.svelte +0 -49
- package/dist/components/File/FileInfo.svelte +0 -14
- package/dist/components/Spinner/Spinner.svelte +0 -8
- package/src/lib/components/File/FileIcon.svelte +0 -49
- package/src/lib/components/File/FileInfo.svelte +0 -14
- package/src/lib/components/File/FileUploader.svelte +0 -217
- package/src/lib/components/Spinner/Spinner.svelte +0 -8
- /package/dist/components/{File → file}/FileIcon.svelte.d.ts +0 -0
- /package/dist/components/{File → file}/FileInfo.svelte.d.ts +0 -0
- /package/dist/components/{File → file}/FileUploader.svelte.d.ts +0 -0
- /package/dist/components/{Spinner → spinner}/Spinner.svelte.d.ts +0 -0
package/dist/css/core.ui.css
CHANGED
|
@@ -1,98 +1,96 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* =~= Theme Properties =~= */
|
|
3
|
-
--theme-font-family-base: system-ui;
|
|
4
|
-
--theme-font-family-heading: system-ui;
|
|
5
|
-
--theme-font-color-base:
|
|
6
|
-
--theme-font-color-dark: 255 255 255;
|
|
7
|
-
--theme-rounded-base: 4px;
|
|
8
|
-
--theme-rounded-container: 4px;
|
|
9
|
-
--theme-border-base: 1px;
|
|
10
|
-
/* =~= Theme On-X Colors =~= */
|
|
11
|
-
--on-primary: 0 0 0;
|
|
12
|
-
--on-secondary: 0 0 0;
|
|
13
|
-
--on-tertiary: 0 0 0;
|
|
14
|
-
--on-success: 0 0 0;
|
|
15
|
-
--on-warning: 255 255 255;
|
|
16
|
-
--on-error: 255 255 255;
|
|
17
|
-
--on-surface: 0 0 0;
|
|
18
|
-
/* =~= Theme Colors =~= */
|
|
19
|
-
/* primary | #45b2a1 */
|
|
20
|
-
--color-primary-50: 227 243 241; /* ⬅ #e3f3f1 */
|
|
21
|
-
--color-primary-100: 218 240 236; /* ⬅ #daf0ec */
|
|
22
|
-
--color-primary-200: 209 236 232; /* ⬅ #d1ece8 */
|
|
23
|
-
--color-primary-300: 181 224 217; /* ⬅ #b5e0d9 */
|
|
24
|
-
--color-primary-400: 125 201 189; /* ⬅ #7dc9bd */
|
|
25
|
-
--color-primary-500: 69 178 161; /* ⬅ #45b2a1 */
|
|
26
|
-
--color-primary-600: 62 160 145; /* ⬅ #3ea091 */
|
|
27
|
-
--color-primary-700: 52 134 121; /* ⬅ #348679 */
|
|
28
|
-
--color-primary-800: 41 107 97; /* ⬅ #296b61 */
|
|
29
|
-
--color-primary-900: 34 87 79; /* ⬅ #22574f */
|
|
30
|
-
/* secondary | #ff9700 */
|
|
31
|
-
--color-secondary-50: 255 239 217; /* ⬅ #ffefd9 */
|
|
32
|
-
--color-secondary-100: 255 234 204; /* ⬅ #ffeacc */
|
|
33
|
-
--color-secondary-200: 255 229 191; /* ⬅ #ffe5bf */
|
|
34
|
-
--color-secondary-300: 255 213 153; /* ⬅ #ffd599 */
|
|
35
|
-
--color-secondary-400: 255 182 77; /* ⬅ #ffb64d */
|
|
36
|
-
--color-secondary-500: 255 151 0; /* ⬅ #ff9700 */
|
|
37
|
-
--color-secondary-600: 230 136 0; /* ⬅ #e68800 */
|
|
38
|
-
--color-secondary-700: 191 113 0; /* ⬅ #bf7100 */
|
|
39
|
-
--color-secondary-800: 153 91 0; /* ⬅ #995b00 */
|
|
40
|
-
--color-secondary-900: 125 74 0; /* ⬅ #7d4a00 */
|
|
41
|
-
/* tertiary | #bee1da */
|
|
42
|
-
--color-tertiary-50: 245 251 249; /* ⬅ #f5fbf9 */
|
|
43
|
-
--color-tertiary-100: 242 249 248; /* ⬅ #f2f9f8 */
|
|
44
|
-
--color-tertiary-200: 239 248 246; /* ⬅ #eff8f6 */
|
|
45
|
-
--color-tertiary-300: 229 243 240; /* ⬅ #e5f3f0 */
|
|
46
|
-
--color-tertiary-400: 210 234 229; /* ⬅ #d2eae5 */
|
|
47
|
-
--color-tertiary-500: 190 225 218; /* ⬅ #bee1da */
|
|
48
|
-
--color-tertiary-600: 171 203 196; /* ⬅ #abcbc4 */
|
|
49
|
-
--color-tertiary-700: 143 169 164; /* ⬅ #8fa9a4 */
|
|
50
|
-
--color-tertiary-800: 114 135 131; /* ⬅ #728783 */
|
|
51
|
-
--color-tertiary-900: 93 110 107; /* ⬅ #5d6e6b */
|
|
52
|
-
/* success | #4BB543 */
|
|
53
|
-
--color-success-50: 228 244 227; /* ⬅ #e4f4e3 */
|
|
54
|
-
--color-success-100: 219 240 217; /* ⬅ #dbf0d9 */
|
|
55
|
-
--color-success-200: 210 237 208; /* ⬅ #d2edd0 */
|
|
56
|
-
--color-success-300: 183 225 180; /* ⬅ #b7e1b4 */
|
|
57
|
-
--color-success-400: 129 203 123; /* ⬅ #81cb7b */
|
|
58
|
-
--color-success-500: 75 181 67; /* ⬅ #4BB543 */
|
|
59
|
-
--color-success-600: 68 163 60; /* ⬅ #44a33c */
|
|
60
|
-
--color-success-700: 56 136 50; /* ⬅ #388832 */
|
|
61
|
-
--color-success-800: 45 109 40; /* ⬅ #2d6d28 */
|
|
62
|
-
--color-success-900: 37 89 33; /* ⬅ #255921 */
|
|
63
|
-
/* warning | #ef4444 */
|
|
64
|
-
--color-warning-50: 253 227 227; /* ⬅ #fde3e3 */
|
|
65
|
-
--color-warning-100: 252 218 218; /* ⬅ #fcdada */
|
|
66
|
-
--color-warning-200: 251 208 208; /* ⬅ #fbd0d0 */
|
|
67
|
-
--color-warning-300: 249 180 180; /* ⬅ #f9b4b4 */
|
|
68
|
-
--color-warning-400: 244 124 124; /* ⬅ #f47c7c */
|
|
69
|
-
--color-warning-500: 239 68 68; /* ⬅ #ef4444 */
|
|
70
|
-
--color-warning-600: 215 61 61; /* ⬅ #d73d3d */
|
|
71
|
-
--color-warning-700: 179 51 51; /* ⬅ #b33333 */
|
|
72
|
-
--color-warning-800: 143 41 41; /* ⬅ #8f2929 */
|
|
73
|
-
--color-warning-900: 117 33 33; /* ⬅ #752121 */
|
|
74
|
-
/* error | #FF0000 */
|
|
75
|
-
--color-error-50: 255 217 217; /* ⬅ #ffd9d9 */
|
|
76
|
-
--color-error-100: 255 204 204; /* ⬅ #ffcccc */
|
|
77
|
-
--color-error-200: 255 191 191; /* ⬅ #ffbfbf */
|
|
78
|
-
--color-error-300: 255 153 153; /* ⬅ #ff9999 */
|
|
79
|
-
--color-error-400: 255 77 77; /* ⬅ #ff4d4d */
|
|
80
|
-
--color-error-500: 255 0 0; /* ⬅ #FF0000 */
|
|
81
|
-
--color-error-600: 230 0 0; /* ⬅ #e60000 */
|
|
82
|
-
--color-error-700: 191 0 0; /* ⬅ #bf0000 */
|
|
83
|
-
--color-error-800: 153 0 0; /* ⬅ #990000 */
|
|
84
|
-
--color-error-900: 125 0 0; /* ⬅ #7d0000 */
|
|
85
|
-
/* surface | #
|
|
86
|
-
--color-surface-50:
|
|
87
|
-
--color-surface-100:
|
|
88
|
-
--color-surface-200:
|
|
89
|
-
--color-surface-300:
|
|
90
|
-
--color-surface-400:
|
|
91
|
-
--color-surface-500:
|
|
92
|
-
--color-surface-600:
|
|
93
|
-
--color-surface-700:
|
|
94
|
-
|
|
95
|
-
--color-surface-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
/* =~= Theme Properties =~= */
|
|
3
|
+
--theme-font-family-base: system-ui;
|
|
4
|
+
--theme-font-family-heading: system-ui;
|
|
5
|
+
--theme-font-color-base: var(--color-surface-900);
|
|
6
|
+
--theme-font-color-dark: 255 255 255;
|
|
7
|
+
--theme-rounded-base: 4px;
|
|
8
|
+
--theme-rounded-container: 4px;
|
|
9
|
+
--theme-border-base: 1px;
|
|
10
|
+
/* =~= Theme On-X Colors =~= */
|
|
11
|
+
--on-primary: 0 0 0;
|
|
12
|
+
--on-secondary: 0 0 0;
|
|
13
|
+
--on-tertiary: 0 0 0;
|
|
14
|
+
--on-success: 0 0 0;
|
|
15
|
+
--on-warning: 255 255 255;
|
|
16
|
+
--on-error: 255 255 255;
|
|
17
|
+
--on-surface: 0 0 0;
|
|
18
|
+
/* =~= Theme Colors =~= */
|
|
19
|
+
/* primary | #45b2a1 */
|
|
20
|
+
--color-primary-50: 227 243 241; /* ⬅ #e3f3f1 */
|
|
21
|
+
--color-primary-100: 218 240 236; /* ⬅ #daf0ec */
|
|
22
|
+
--color-primary-200: 209 236 232; /* ⬅ #d1ece8 */
|
|
23
|
+
--color-primary-300: 181 224 217; /* ⬅ #b5e0d9 */
|
|
24
|
+
--color-primary-400: 125 201 189; /* ⬅ #7dc9bd */
|
|
25
|
+
--color-primary-500: 69 178 161; /* ⬅ #45b2a1 */
|
|
26
|
+
--color-primary-600: 62 160 145; /* ⬅ #3ea091 */
|
|
27
|
+
--color-primary-700: 52 134 121; /* ⬅ #348679 */
|
|
28
|
+
--color-primary-800: 41 107 97; /* ⬅ #296b61 */
|
|
29
|
+
--color-primary-900: 34 87 79; /* ⬅ #22574f */
|
|
30
|
+
/* secondary | #ff9700 */
|
|
31
|
+
--color-secondary-50: 255 239 217; /* ⬅ #ffefd9 */
|
|
32
|
+
--color-secondary-100: 255 234 204; /* ⬅ #ffeacc */
|
|
33
|
+
--color-secondary-200: 255 229 191; /* ⬅ #ffe5bf */
|
|
34
|
+
--color-secondary-300: 255 213 153; /* ⬅ #ffd599 */
|
|
35
|
+
--color-secondary-400: 255 182 77; /* ⬅ #ffb64d */
|
|
36
|
+
--color-secondary-500: 255 151 0; /* ⬅ #ff9700 */
|
|
37
|
+
--color-secondary-600: 230 136 0; /* ⬅ #e68800 */
|
|
38
|
+
--color-secondary-700: 191 113 0; /* ⬅ #bf7100 */
|
|
39
|
+
--color-secondary-800: 153 91 0; /* ⬅ #995b00 */
|
|
40
|
+
--color-secondary-900: 125 74 0; /* ⬅ #7d4a00 */
|
|
41
|
+
/* tertiary | #bee1da */
|
|
42
|
+
--color-tertiary-50: 245 251 249; /* ⬅ #f5fbf9 */
|
|
43
|
+
--color-tertiary-100: 242 249 248; /* ⬅ #f2f9f8 */
|
|
44
|
+
--color-tertiary-200: 239 248 246; /* ⬅ #eff8f6 */
|
|
45
|
+
--color-tertiary-300: 229 243 240; /* ⬅ #e5f3f0 */
|
|
46
|
+
--color-tertiary-400: 210 234 229; /* ⬅ #d2eae5 */
|
|
47
|
+
--color-tertiary-500: 190 225 218; /* ⬅ #bee1da */
|
|
48
|
+
--color-tertiary-600: 171 203 196; /* ⬅ #abcbc4 */
|
|
49
|
+
--color-tertiary-700: 143 169 164; /* ⬅ #8fa9a4 */
|
|
50
|
+
--color-tertiary-800: 114 135 131; /* ⬅ #728783 */
|
|
51
|
+
--color-tertiary-900: 93 110 107; /* ⬅ #5d6e6b */
|
|
52
|
+
/* success | #4BB543 */
|
|
53
|
+
--color-success-50: 228 244 227; /* ⬅ #e4f4e3 */
|
|
54
|
+
--color-success-100: 219 240 217; /* ⬅ #dbf0d9 */
|
|
55
|
+
--color-success-200: 210 237 208; /* ⬅ #d2edd0 */
|
|
56
|
+
--color-success-300: 183 225 180; /* ⬅ #b7e1b4 */
|
|
57
|
+
--color-success-400: 129 203 123; /* ⬅ #81cb7b */
|
|
58
|
+
--color-success-500: 75 181 67; /* ⬅ #4BB543 */
|
|
59
|
+
--color-success-600: 68 163 60; /* ⬅ #44a33c */
|
|
60
|
+
--color-success-700: 56 136 50; /* ⬅ #388832 */
|
|
61
|
+
--color-success-800: 45 109 40; /* ⬅ #2d6d28 */
|
|
62
|
+
--color-success-900: 37 89 33; /* ⬅ #255921 */
|
|
63
|
+
/* warning | #ef4444 */
|
|
64
|
+
--color-warning-50: 253 227 227; /* ⬅ #fde3e3 */
|
|
65
|
+
--color-warning-100: 252 218 218; /* ⬅ #fcdada */
|
|
66
|
+
--color-warning-200: 251 208 208; /* ⬅ #fbd0d0 */
|
|
67
|
+
--color-warning-300: 249 180 180; /* ⬅ #f9b4b4 */
|
|
68
|
+
--color-warning-400: 244 124 124; /* ⬅ #f47c7c */
|
|
69
|
+
--color-warning-500: 239 68 68; /* ⬅ #ef4444 */
|
|
70
|
+
--color-warning-600: 215 61 61; /* ⬅ #d73d3d */
|
|
71
|
+
--color-warning-700: 179 51 51; /* ⬅ #b33333 */
|
|
72
|
+
--color-warning-800: 143 41 41; /* ⬅ #8f2929 */
|
|
73
|
+
--color-warning-900: 117 33 33; /* ⬅ #752121 */
|
|
74
|
+
/* error | #FF0000 */
|
|
75
|
+
--color-error-50: 255 217 217; /* ⬅ #ffd9d9 */
|
|
76
|
+
--color-error-100: 255 204 204; /* ⬅ #ffcccc */
|
|
77
|
+
--color-error-200: 255 191 191; /* ⬅ #ffbfbf */
|
|
78
|
+
--color-error-300: 255 153 153; /* ⬅ #ff9999 */
|
|
79
|
+
--color-error-400: 255 77 77; /* ⬅ #ff4d4d */
|
|
80
|
+
--color-error-500: 255 0 0; /* ⬅ #FF0000 */
|
|
81
|
+
--color-error-600: 230 0 0; /* ⬅ #e60000 */
|
|
82
|
+
--color-error-700: 191 0 0; /* ⬅ #bf0000 */
|
|
83
|
+
--color-error-800: 153 0 0; /* ⬅ #990000 */
|
|
84
|
+
--color-error-900: 125 0 0; /* ⬅ #7d0000 */
|
|
85
|
+
/* surface | #dddddd */
|
|
86
|
+
--color-surface-50: 250 250 250; /* ⬅ #fafafa */
|
|
87
|
+
--color-surface-100: 248 248 248; /* ⬅ #f8f8f8 */
|
|
88
|
+
--color-surface-200: 247 247 247; /* ⬅ #f7f7f7 */
|
|
89
|
+
--color-surface-300: 241 241 241; /* ⬅ #f1f1f1 */
|
|
90
|
+
--color-surface-400: 231 231 231; /* ⬅ #e7e7e7 */
|
|
91
|
+
--color-surface-500: 221 221 221; /* ⬅ #dddddd */
|
|
92
|
+
--color-surface-600: 199 199 199; /* ⬅ #c7c7c7 */
|
|
93
|
+
--color-surface-700: 166 166 166; /* ⬅ #a6a6a6 */
|
|
94
|
+
--color-surface-800: 133 133 133; /* ⬅ #858585 */
|
|
95
|
+
--color-surface-900: 108 108 108; /* ⬅ #6c6c6c */
|
|
96
|
+
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
5
|
/* =~= Theme Styles =~= */
|
|
6
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
-
'
|
|
6
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
8
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
8
9
|
--theme-font-family-heading: system-ui;
|
|
9
10
|
--theme-font-color-base: var(--color-surface-900);
|
|
10
11
|
--theme-font-color-dark: var(--color-surface-50);
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
7
|
/* =~= Hamlindigo Theme | Custom =~= */
|
|
8
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
9
|
-
'
|
|
8
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
9
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
10
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
10
11
|
--theme-font-family-heading: 'Playfair Display', serif;
|
|
11
12
|
--theme-font-color-base: 0 0 0;
|
|
12
13
|
--theme-font-color-dark: 255 255 255;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
5
|
/* =~= Theme Styles =~= */
|
|
6
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
-
'
|
|
6
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
8
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
8
9
|
--theme-font-family-heading: 'Playfair Display', serif;
|
|
9
10
|
--theme-font-color-base: var(--color-surface-900);
|
|
10
11
|
--theme-font-color-dark: var(--color-secondary-100);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import ListView from './components/ListView.svelte';
|
|
2
2
|
import TableView from './TableView.svelte';
|
|
3
|
-
import FileIcon from './components/
|
|
4
|
-
import FileInfo from './components/
|
|
5
|
-
import FileUploader from './components/
|
|
6
|
-
import Spinner from './components/
|
|
7
|
-
|
|
3
|
+
import FileIcon from './components/file/FileIcon.svelte';
|
|
4
|
+
import FileInfo from './components/file/FileInfo.svelte';
|
|
5
|
+
import FileUploader from './components/file/FileUploader.svelte';
|
|
6
|
+
import Spinner from './components/spinner/Spinner.svelte';
|
|
7
|
+
import Checkbox from './components/form/Checkbox.svelte';
|
|
8
|
+
import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
|
|
9
|
+
import CheckboxList from './components/form/CheckboxList.svelte';
|
|
10
|
+
import DateInput from './components/form/DateInput.svelte';
|
|
11
|
+
import DropdownKVP from './components/form/DropdownKvP.svelte';
|
|
12
|
+
import MultiSelect from './components/form/MultiSelect.svelte';
|
|
13
|
+
import NumberInput from './components/form/NumberInput.svelte';
|
|
14
|
+
import TextInput from './components/form/TextInput.svelte';
|
|
15
|
+
import TextArea from './components/form/TextArea.svelte';
|
|
16
|
+
export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DropdownKVP, MultiSelect, NumberInput, TextArea, TextInput };
|
|
17
|
+
export { FileInfo, FileIcon, FileUploader };
|
|
18
|
+
export { ListView, TableView, Spinner };
|
|
8
19
|
export { Api } from './services/Api.js';
|
|
9
20
|
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
|
10
21
|
export type { user, FileUploaderModel } from './models/Models.js';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
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/
|
|
5
|
-
import FileInfo from './components/
|
|
6
|
-
import FileUploader from './components/
|
|
7
|
-
import Spinner from './components/
|
|
8
|
-
|
|
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
|
+
import Spinner from './components/spinner/Spinner.svelte';
|
|
8
|
+
import Checkbox from './components/form/Checkbox.svelte';
|
|
9
|
+
import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
|
|
10
|
+
import CheckboxList from './components/form/CheckboxList.svelte';
|
|
11
|
+
import DateInput from './components/form/DateInput.svelte';
|
|
12
|
+
import DropdownKVP from './components/form/DropdownKvP.svelte';
|
|
13
|
+
import MultiSelect from './components/form/MultiSelect.svelte';
|
|
14
|
+
import NumberInput from './components/form/NumberInput.svelte';
|
|
15
|
+
import TextInput from './components/form/TextInput.svelte';
|
|
16
|
+
import TextArea from './components/form/TextArea.svelte';
|
|
17
|
+
//Form
|
|
18
|
+
export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DropdownKVP, MultiSelect, NumberInput, TextArea, TextInput };
|
|
19
|
+
//File
|
|
20
|
+
export { FileInfo, FileIcon, FileUploader };
|
|
21
|
+
//others
|
|
22
|
+
export { ListView, TableView, Spinner };
|
|
23
|
+
//Api
|
|
9
24
|
export { Api } from './services/Api.js';
|
|
10
25
|
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
package/dist/models/Models.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
|
+
import type { Writable } from 'svelte/store';
|
|
4
|
+
export interface Input {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
feedback: string[];
|
|
8
|
+
invalid: boolean;
|
|
9
|
+
valid: boolean;
|
|
10
|
+
required: boolean;
|
|
11
|
+
}
|
|
1
12
|
export interface FileInfo {
|
|
2
13
|
name: string;
|
|
3
14
|
type: string;
|
|
@@ -29,3 +40,20 @@ export interface FileObj {
|
|
|
29
40
|
type: string;
|
|
30
41
|
webkitRelativePath: string;
|
|
31
42
|
}
|
|
43
|
+
export interface Column {
|
|
44
|
+
header?: string;
|
|
45
|
+
exclude?: boolean;
|
|
46
|
+
colFilterFn?: ColumnFilterFn;
|
|
47
|
+
colFilterComponent?: typeof SvelteComponent;
|
|
48
|
+
}
|
|
49
|
+
export interface Columns {
|
|
50
|
+
[key: string]: Column;
|
|
51
|
+
}
|
|
52
|
+
export interface TableConfig<T> {
|
|
53
|
+
id: string;
|
|
54
|
+
data: Writable<T[]>;
|
|
55
|
+
columns?: Columns;
|
|
56
|
+
pageSizes?: number[];
|
|
57
|
+
defaultPageSize?: number;
|
|
58
|
+
optionsComponent?: typeof SvelteComponent;
|
|
59
|
+
}
|
package/dist/services/Api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Api.js
|
|
2
|
-
import axios from
|
|
3
|
-
import { host, username, password } from
|
|
4
|
-
console.log(
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { host, username, password } from '../stores/apistore';
|
|
4
|
+
console.log('setup axios');
|
|
5
5
|
// implement a method to execute all the request from here.
|
|
6
6
|
const apiRequest = (method, url, request) => {
|
|
7
7
|
// Create a instance of axios to use the same base url.
|
|
@@ -9,7 +9,7 @@ const apiRequest = (method, url, request) => {
|
|
|
9
9
|
baseURL: host
|
|
10
10
|
});
|
|
11
11
|
const headers = {
|
|
12
|
-
authorization: 'Basic ' + btoa(username +
|
|
12
|
+
authorization: 'Basic ' + btoa(username + ':' + password)
|
|
13
13
|
};
|
|
14
14
|
//using the axios instance to perform the request that received from each http method
|
|
15
15
|
return axiosAPI({
|
|
@@ -17,23 +17,24 @@ const apiRequest = (method, url, request) => {
|
|
|
17
17
|
url,
|
|
18
18
|
data: request,
|
|
19
19
|
headers
|
|
20
|
-
})
|
|
20
|
+
})
|
|
21
|
+
.then((res) => {
|
|
21
22
|
return Promise.resolve(res);
|
|
22
23
|
})
|
|
23
|
-
.catch(err => {
|
|
24
|
+
.catch((err) => {
|
|
24
25
|
return Promise.reject(err);
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
// function to execute the http get request
|
|
28
|
-
const get = (url, request =
|
|
29
|
+
const get = (url, request = '') => apiRequest('get', url, request);
|
|
29
30
|
// function to execute the http delete request
|
|
30
|
-
const deleteRequest = (url, request) => apiRequest(
|
|
31
|
+
const deleteRequest = (url, request) => apiRequest('delete', url, request);
|
|
31
32
|
// function to execute the http post request
|
|
32
|
-
const post = (url, request) => apiRequest(
|
|
33
|
+
const post = (url, request) => apiRequest('post', url, request);
|
|
33
34
|
// function to execute the http put request
|
|
34
|
-
const put = (url, request) => apiRequest(
|
|
35
|
+
const put = (url, request) => apiRequest('put', url, request);
|
|
35
36
|
// function to execute the http path request
|
|
36
|
-
const patch = (url, request) => apiRequest(
|
|
37
|
+
const patch = (url, request) => apiRequest('patch', url, request);
|
|
37
38
|
// expose your method to other services or actions
|
|
38
39
|
export const Api = {
|
|
39
40
|
get,
|
package/dist/stores/apistore.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
|
-
export let host =
|
|
3
|
-
export let username =
|
|
4
|
-
export let password =
|
|
5
|
-
const hostStore = writable(
|
|
6
|
-
const usernameStore = writable(
|
|
7
|
-
const passwordStore = writable(
|
|
8
|
-
hostStore.subscribe(value => {
|
|
2
|
+
export let host = 'window.location.origin';
|
|
3
|
+
export let username = '';
|
|
4
|
+
export let password = '';
|
|
5
|
+
const hostStore = writable(''); //writable(window.location.origin);
|
|
6
|
+
const usernameStore = writable('');
|
|
7
|
+
const passwordStore = writable('');
|
|
8
|
+
hostStore.subscribe((value) => {
|
|
9
9
|
host = value;
|
|
10
10
|
});
|
|
11
|
-
usernameStore.subscribe(value => {
|
|
11
|
+
usernameStore.subscribe((value) => {
|
|
12
12
|
username = value;
|
|
13
13
|
});
|
|
14
|
-
passwordStore.subscribe(value => {
|
|
14
|
+
passwordStore.subscribe((value) => {
|
|
15
15
|
password = value;
|
|
16
16
|
});
|
|
17
17
|
export function setApiConfig(_host, _user, _pw) {
|
|
18
|
-
console.log(
|
|
19
|
-
hostStore.update(h => h = _host);
|
|
20
|
-
usernameStore.update(u => u = _user);
|
|
21
|
-
passwordStore.update(p => p = _pw);
|
|
18
|
+
console.log('overwrite settings');
|
|
19
|
+
hostStore.update((h) => (h = _host));
|
|
20
|
+
usernameStore.update((u) => (u = _user));
|
|
21
|
+
passwordStore.update((p) => (p = _pw));
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,87 +1,103 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
2
|
+
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
+
"version": "0.0.25",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite dev --host",
|
|
7
|
+
"package": "svelte-package --watch",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"build package": "svelte-kit sync && svelte-package --watch",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"test": "playwright test",
|
|
12
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
13
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
14
|
+
"test:unit": "vitest",
|
|
15
|
+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
|
16
|
+
"format": "prettier --plugin-search-dir . --write .",
|
|
17
|
+
"init": "npm init --scope bexis2",
|
|
18
|
+
"link": "npm link",
|
|
19
|
+
"publish": "npm publish --access public",
|
|
20
|
+
"install bexis2-core-ui localy": "npm install ../bexis2-core-ui"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@bexis2/bexis2-core-ui": "file:../bexis2-core-ui/dist",
|
|
24
|
+
"@playwright/test": "^1.28.1",
|
|
25
|
+
"@skeletonlabs/skeleton": "^1.2.5",
|
|
26
|
+
"@sveltejs/adapter-auto": "^2.0.0",
|
|
27
|
+
"@sveltejs/adapter-static": "^2.0.2",
|
|
28
|
+
"@sveltejs/kit": "^1.5.0",
|
|
29
|
+
"@sveltejs/package": "^2.0.2",
|
|
30
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
31
|
+
"@tailwindcss/line-clamp": "^0.4.2",
|
|
32
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
34
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
35
|
+
"autoprefixer": "^10.4.14",
|
|
36
|
+
"eslint": "^8.28.0",
|
|
37
|
+
"eslint-config-prettier": "^8.5.0",
|
|
38
|
+
"eslint-plugin-svelte3": "^4.0.0",
|
|
39
|
+
"postcss": "^8.4.23",
|
|
40
|
+
"prettier": "^2.8.0",
|
|
41
|
+
"prettier-plugin-svelte": "^2.8.1",
|
|
42
|
+
"raw-loader": "^4.0.2",
|
|
43
|
+
"svelte": "^3.54.0",
|
|
44
|
+
"svelte-check": "^3.0.1",
|
|
45
|
+
"svelte-fa": "^3.0.3",
|
|
46
|
+
"svelte-headless-table": "^0.17.3",
|
|
47
|
+
"tailwindcss": "^3.3.2",
|
|
48
|
+
"tslib": "^2.4.1",
|
|
49
|
+
"typescript": "^5.0.0",
|
|
50
|
+
"vite": "^4.3.0",
|
|
51
|
+
"vitest": "^0.25.3"
|
|
52
|
+
},
|
|
53
|
+
"type": "module",
|
|
54
|
+
"module": "./src/lib/index.ts",
|
|
55
|
+
"types": "./src/lib/index.d.ts",
|
|
56
|
+
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
57
|
+
"main": "./src/lib/index.d.ts",
|
|
58
|
+
"directories": {
|
|
59
|
+
"test": "tests"
|
|
60
|
+
},
|
|
61
|
+
"files": [
|
|
62
|
+
"dist",
|
|
63
|
+
"src/lib"
|
|
64
|
+
],
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@floating-ui/dom": "^1.2.7",
|
|
67
|
+
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
68
|
+
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
69
|
+
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
70
|
+
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
71
|
+
"axios": "^1.2.1",
|
|
72
|
+
"highlight.js": "^11.8.0",
|
|
73
|
+
"highlightjs-svelte": "^1.0.6",
|
|
74
|
+
"svelte": "^3.54.0",
|
|
75
|
+
"svelte-file-dropzone": "^2.0.1",
|
|
76
|
+
"svelte-select": "^5.6.0",
|
|
77
|
+
"vest": "^4.6.11"
|
|
78
|
+
},
|
|
79
|
+
"author": "David Schöne",
|
|
80
|
+
"license": "ISC",
|
|
81
|
+
"repository": {
|
|
82
|
+
"type": "git",
|
|
83
|
+
"url": "git+https://github.com/BEXIS2/bexis2-core-ui.git"
|
|
84
|
+
},
|
|
85
|
+
"bugs": {
|
|
86
|
+
"url": "https://github.com/BEXIS2/bexis2-core-ui/issues"
|
|
87
|
+
},
|
|
88
|
+
"homepage": "https://github.com/BEXIS2/bexis2-core-ui#readme",
|
|
89
|
+
"keywords": [
|
|
90
|
+
"bexis2",
|
|
91
|
+
"libary"
|
|
92
|
+
],
|
|
93
|
+
"exports": {
|
|
94
|
+
".": {
|
|
95
|
+
"types": "./dist/index.d.ts",
|
|
96
|
+
"svelte": "./dist/index.js"
|
|
97
|
+
},
|
|
98
|
+
"./dist/index.css": {
|
|
99
|
+
"import": "./dist/index.css",
|
|
100
|
+
"require": "./dist/index.css"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
87
103
|
}
|
package/src/lib/TableView.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<h1>table</h1>
|
|
1
|
+
<h1>table</h1>
|