@bexis2/bexis2-core-ui 0.4.96 → 0.4.97
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 +99 -25
- package/dist/components/CodeEditor/CodeEditor.svelte +2 -2
- package/dist/components/Facets/ShowMore.svelte +4 -6
- package/dist/components/File/FileUploader.svelte +6 -3
- package/dist/components/Table/Table.svelte +26 -5
- package/dist/components/Table/TableContent.svelte +226 -27
- package/dist/components/Table/TablePaginationServer.svelte +27 -8
- package/dist/components/Table/clientDB.d.ts +22 -0
- package/dist/components/Table/clientDB.js +236 -0
- package/dist/components/Table/filter.js +5 -1
- package/dist/components/Table/tableWorker.d.ts +1 -0
- package/dist/components/Table/tableWorker.js +179 -0
- package/dist/components/Table/utils.d.ts +1 -2
- package/dist/components/Table/utils.js +45 -26
- package/dist/components/form/CheckboxKvPList.svelte +15 -15
- package/dist/components/form/CheckboxList.svelte +1 -1
- package/dist/components/form/DateInput.svelte +12 -1
- package/dist/components/form/DatePickerInput.svelte +51 -29
- package/dist/components/form/Dropdown.svelte +14 -3
- package/dist/components/form/DropdownKvP.svelte +13 -2
- package/dist/components/form/InputContainer.svelte +17 -15
- package/dist/components/form/MultiSelect.svelte +30 -29
- package/dist/components/form/NumberInput.svelte +12 -1
- package/dist/components/form/TextArea.svelte +12 -1
- package/dist/components/form/TextInput.svelte +12 -1
- package/dist/components/page/Alert.svelte +5 -1
- package/dist/components/page/BackToTop.svelte +3 -1
- package/dist/components/page/Docs.svelte +9 -2
- package/dist/components/page/GoToTop.svelte +14 -15
- package/dist/components/page/Page.svelte +50 -56
- package/dist/components/page/breadcrumb/BreadcrumbDataCaller.js +11 -15
- package/dist/components/page/menu/MenuAccountBar.svelte +1 -5
- package/dist/components/page/menu/MenuDataCaller.js +1 -1
- package/dist/components/page/menu/MenuItem.svelte +9 -7
- package/dist/components/page/menu/MenuSublist.svelte +7 -5
- package/dist/components/page/menu/SettingsBar.svelte +4 -1
- package/dist/components/toggle/Toggle.svelte +9 -9
- package/dist/css/core.ui.postcss +1 -2
- package/dist/services/Api.js +4 -4
- package/dist/services/BaseCaller.js +1 -1
- package/package.json +114 -114
- package/src/lib/components/CodeEditor/CodeEditor.svelte +4 -4
- package/src/lib/components/Facets/Facets.svelte +2 -2
- package/src/lib/components/Facets/ShowMore.svelte +4 -6
- package/src/lib/components/File/FileUploader.svelte +17 -14
- package/src/lib/components/Table/Table.svelte +31 -10
- package/src/lib/components/Table/TableContent.svelte +261 -38
- package/src/lib/components/Table/TableFilter.svelte +7 -2
- package/src/lib/components/Table/TablePagination.svelte +6 -2
- package/src/lib/components/Table/TablePaginationServer.svelte +36 -10
- package/src/lib/components/Table/clientDB.js +236 -0
- package/src/lib/components/Table/filter.ts +27 -23
- package/src/lib/components/Table/tableWorker.js +179 -0
- package/src/lib/components/Table/utils.ts +75 -56
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/CheckboxKvPList.svelte +15 -16
- package/src/lib/components/form/CheckboxList.svelte +1 -1
- package/src/lib/components/form/DateInput.svelte +13 -2
- package/src/lib/components/form/DatePickerInput.svelte +51 -29
- package/src/lib/components/form/Dropdown.svelte +14 -3
- package/src/lib/components/form/DropdownKvP.svelte +13 -2
- package/src/lib/components/form/InputContainer.svelte +18 -17
- package/src/lib/components/form/MultiSelect.svelte +30 -29
- package/src/lib/components/form/NumberInput.svelte +21 -12
- package/src/lib/components/form/TextArea.svelte +13 -2
- package/src/lib/components/form/TextInput.svelte +13 -2
- package/src/lib/components/page/Alert.svelte +5 -1
- package/src/lib/components/page/BackToTop.svelte +3 -1
- package/src/lib/components/page/Docs.svelte +9 -2
- package/src/lib/components/page/GoToTop.svelte +14 -15
- package/src/lib/components/page/Notification.svelte +1 -1
- package/src/lib/components/page/Page.svelte +67 -78
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +2 -3
- package/src/lib/components/page/breadcrumb/BreadcrumbDataCaller.js +11 -15
- package/src/lib/components/page/menu/MenuAccountBar.svelte +1 -6
- package/src/lib/components/page/menu/MenuDataCaller.js +1 -1
- package/src/lib/components/page/menu/MenuItem.svelte +10 -8
- package/src/lib/components/page/menu/MenuSublist.svelte +35 -41
- package/src/lib/components/page/menu/SettingsBar.svelte +5 -2
- package/src/lib/components/toggle/Toggle.svelte +28 -30
- package/src/lib/css/core.ui.postcss +1 -2
- package/src/lib/index.ts +1 -2
- package/src/lib/services/Api.ts +21 -20
- package/src/lib/services/BaseCaller.js +1 -1
- package/src/lib/stores/apiStores.ts +1 -5
- package/src/lib/stores/pageStores.ts +0 -2
package/README.md
CHANGED
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
# bexis-core-ui
|
|
2
2
|
|
|
3
|
+
## 0.4.97
|
|
4
|
+
- Table:
|
|
5
|
+
- handle 20 000+ rows client side
|
|
6
|
+
- fix item count server side table not shown
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
## 0.4.96
|
|
10
|
+
|
|
4
11
|
- ServerSideTable
|
|
5
12
|
- Add support for boolean
|
|
6
13
|
- Fix missing value handling
|
|
7
14
|
|
|
8
|
-
|
|
9
15
|
## 0.4.95
|
|
16
|
+
|
|
10
17
|
- Input
|
|
11
18
|
- Add focus in/out for element
|
|
12
19
|
- format date picker
|
|
13
20
|
|
|
14
|
-
|
|
15
21
|
## 0.4.94
|
|
22
|
+
|
|
16
23
|
- Input
|
|
17
24
|
- Add InputContainer to export for custom components
|
|
18
25
|
|
|
19
|
-
|
|
20
26
|
## 0.4.93
|
|
27
|
+
|
|
21
28
|
- Input
|
|
22
29
|
- Add DataPickerInput based on Svelty Picker
|
|
23
30
|
- reorder font size in menu (less layout shift with old header)
|
|
24
31
|
- trigger description event on mouse over / out
|
|
25
32
|
|
|
26
33
|
## 0.4.87
|
|
34
|
+
|
|
27
35
|
- Input
|
|
28
36
|
- add show description to all form components
|
|
29
37
|
|
|
30
38
|
## 0.4.86
|
|
39
|
+
|
|
31
40
|
- Menu
|
|
32
41
|
- set size to local storage
|
|
33
42
|
- Input
|
|
34
43
|
- expose show description
|
|
35
44
|
|
|
36
|
-
|
|
37
45
|
## 0.4.85
|
|
46
|
+
|
|
38
47
|
- Menu
|
|
39
48
|
- add increase / decrease font size
|
|
40
49
|
- add toogle dark mode in dev mode
|
|
@@ -43,55 +52,67 @@
|
|
|
43
52
|
- remove layout shift by adding a fixed space for the error message
|
|
44
53
|
|
|
45
54
|
## 0.4.84
|
|
55
|
+
|
|
46
56
|
- MultiSelect
|
|
47
57
|
- fix itemGroup was not working
|
|
48
58
|
|
|
49
59
|
## 0.4.83
|
|
60
|
+
|
|
50
61
|
- InputContainer
|
|
51
62
|
- error message position and basic styling of input fields
|
|
52
63
|
|
|
53
64
|
## 0.4.82
|
|
65
|
+
|
|
54
66
|
- Table
|
|
55
67
|
- ServerSide communication, reduce calls
|
|
56
68
|
|
|
57
69
|
## 0.4.81
|
|
70
|
+
|
|
58
71
|
- Multiselect
|
|
59
72
|
- check if groupItem is set or not, if true add groupby to output
|
|
60
|
-
|
|
73
|
+
|
|
61
74
|
## 0.4.78
|
|
75
|
+
|
|
62
76
|
- Fileuploader
|
|
63
77
|
- after submited add the responce to the event
|
|
64
78
|
|
|
65
79
|
## 0.4.76
|
|
80
|
+
|
|
66
81
|
- API
|
|
67
82
|
- Extending the API with custom headers and configuration
|
|
68
|
-
|
|
69
83
|
|
|
70
84
|
## 0.4.75
|
|
85
|
+
|
|
71
86
|
- Menu
|
|
72
87
|
- add ids
|
|
73
88
|
|
|
74
89
|
## 0.4.73
|
|
90
|
+
|
|
75
91
|
- NumberInput
|
|
76
92
|
- fix issue destroying layout with number.MinValue
|
|
77
93
|
|
|
78
94
|
## 0.4.71
|
|
95
|
+
|
|
79
96
|
- NumberInput
|
|
80
97
|
- add min and max
|
|
81
|
-
|
|
98
|
+
|
|
82
99
|
## 0.4.70
|
|
100
|
+
|
|
83
101
|
- CheckboxKVPList
|
|
84
|
-
- add vertical flag for orientation
|
|
102
|
+
- add vertical flag for orientation
|
|
85
103
|
|
|
86
104
|
## 0.4.68
|
|
105
|
+
|
|
87
106
|
- form
|
|
88
107
|
- add description to input container, only visible if description added to the component
|
|
89
108
|
|
|
90
109
|
## 0.4.67
|
|
110
|
+
|
|
91
111
|
- dropdown
|
|
92
|
-
- export dropdown
|
|
112
|
+
- export dropdown
|
|
93
113
|
|
|
94
114
|
## 0.4.66
|
|
115
|
+
|
|
95
116
|
- dropdown
|
|
96
117
|
- add dropdown with simple list and value
|
|
97
118
|
- multiselect
|
|
@@ -99,6 +120,7 @@
|
|
|
99
120
|
- fix placeholder does not work
|
|
100
121
|
|
|
101
122
|
## 0.4.59
|
|
123
|
+
|
|
102
124
|
- Table
|
|
103
125
|
- remove static title "table"
|
|
104
126
|
- shorten upload text
|
|
@@ -106,107 +128,133 @@
|
|
|
106
128
|
- remove title about sorting, if not possible
|
|
107
129
|
|
|
108
130
|
## 0.4.49 -> 0.4.53
|
|
131
|
+
|
|
109
132
|
- Api
|
|
110
|
-
- remove
|
|
133
|
+
- remove \_\_RequestVerificationToken from header
|
|
111
134
|
- change post request to 'application/x-www-form-urlencoded'
|
|
112
|
-
- add
|
|
113
|
-
|
|
135
|
+
- add \_\_RequestVerificationToken to data
|
|
136
|
+
|
|
114
137
|
## 0.4.48
|
|
138
|
+
|
|
115
139
|
- Api
|
|
116
|
-
- add
|
|
140
|
+
- add \_\_RequestVerificationToken if exist
|
|
117
141
|
|
|
118
142
|
## 0.4.47
|
|
143
|
+
|
|
119
144
|
- Menu
|
|
120
145
|
- change hover over menu items
|
|
121
|
-
|
|
146
|
+
|
|
122
147
|
## 0.4.46
|
|
148
|
+
|
|
123
149
|
- Menu
|
|
124
150
|
- Add hover to menu
|
|
125
151
|
- Fix Missing nowrap in menu
|
|
126
152
|
|
|
127
153
|
## 0.4.45
|
|
154
|
+
|
|
128
155
|
- Menu
|
|
129
156
|
- hide gear if settings array has no entry
|
|
130
157
|
|
|
131
158
|
## 0.4.44
|
|
159
|
+
|
|
132
160
|
- Page
|
|
133
161
|
- replace manual link with icon
|
|
162
|
+
|
|
134
163
|
## 0.4.43
|
|
164
|
+
|
|
135
165
|
- Table
|
|
136
166
|
- fix header names with dots breaks the table
|
|
137
167
|
|
|
138
168
|
## 0.4.42
|
|
169
|
+
|
|
139
170
|
## 0.4.41
|
|
171
|
+
|
|
140
172
|
- Multiselect
|
|
141
173
|
- remove console.logs
|
|
142
174
|
- Table
|
|
143
175
|
- fix filter error by exact match with complex object
|
|
144
176
|
|
|
145
177
|
## 0.4.40
|
|
178
|
+
|
|
146
179
|
- Multiselect
|
|
147
180
|
- add clear event, when selection is deselected
|
|
148
181
|
|
|
149
182
|
## 0.4.39
|
|
183
|
+
|
|
150
184
|
- page
|
|
151
185
|
- add option to hide Footer on Page
|
|
152
186
|
|
|
153
187
|
## 0.4.38
|
|
188
|
+
|
|
154
189
|
- table
|
|
155
190
|
- Fix server side OrderBy
|
|
156
191
|
|
|
157
192
|
## 0.4.37
|
|
193
|
+
|
|
158
194
|
- table
|
|
159
195
|
- Fix server side Pagination
|
|
160
196
|
|
|
161
197
|
## 0.4.36
|
|
198
|
+
|
|
162
199
|
- table
|
|
163
200
|
- Fix server side Pagination
|
|
164
201
|
|
|
165
202
|
## 0.4.35
|
|
166
203
|
|
|
167
204
|
- enlarge help and up to start button
|
|
168
|
-
|
|
205
|
+
|
|
169
206
|
## 0.4.33
|
|
207
|
+
|
|
170
208
|
- Menu
|
|
171
|
-
- remove alert ("log off")
|
|
209
|
+
- remove alert ("log off")
|
|
172
210
|
|
|
173
211
|
## 0.4.32
|
|
212
|
+
|
|
174
213
|
- Menu
|
|
175
214
|
- fix log off, add click event o a
|
|
176
215
|
|
|
177
216
|
## 0.4.31
|
|
217
|
+
|
|
178
218
|
- Table
|
|
179
219
|
- Adds variants for pagination buttons
|
|
180
220
|
|
|
181
221
|
## 0.4.30
|
|
222
|
+
|
|
182
223
|
- Table:
|
|
183
224
|
- Fixes issue with rounded corners on pagination button under the table
|
|
184
225
|
- Updates colors scheme for disabled buttons
|
|
185
226
|
|
|
186
227
|
## 0.4.29
|
|
228
|
+
|
|
187
229
|
- table
|
|
188
230
|
- Fixes the appearance issues related to Table paginator.
|
|
189
|
-
-
|
|
231
|
+
-
|
|
232
|
+
|
|
190
233
|
## 0.4.28
|
|
234
|
+
|
|
191
235
|
- Fixes issue with options component not displaying items correctly
|
|
192
236
|
- New pagination component
|
|
193
237
|
- Removes the option for selecting page index string type of "pages" or "items". "items" will be the default and only option to show pagination info now.
|
|
194
|
-
|
|
238
|
+
|
|
195
239
|
## 0.4.27
|
|
240
|
+
|
|
196
241
|
- Fixes the issue with updating the number of displayed items correctly.
|
|
197
242
|
- Makes "items" the default type for displaying pagination info.
|
|
198
243
|
|
|
199
244
|
## 0.4.26
|
|
245
|
+
|
|
200
246
|
- menu
|
|
201
247
|
- change submenu buttons to a link and add link menuitems to support right click menu
|
|
202
|
-
|
|
248
|
+
|
|
203
249
|
## 0.4.25
|
|
250
|
+
|
|
204
251
|
- menu
|
|
205
252
|
- add internal & target to menuItemType to support handle menuEntries open in same or other window
|
|
206
253
|
|
|
207
254
|
## 0.4.24
|
|
255
|
+
|
|
208
256
|
- Table
|
|
209
|
-
- Adds option for enabling/disabling show/hide column menu in table.
|
|
257
|
+
- Adds option for enabling/disabling show/hide column menu in table.
|
|
210
258
|
- Adds option to show number of items displayed instead of number of pages.
|
|
211
259
|
- Fixes an issue where "0" values return empty string.
|
|
212
260
|
|
|
@@ -214,6 +262,7 @@
|
|
|
214
262
|
- Fixes an issue with truncation of text in Facet headers and options.
|
|
215
263
|
|
|
216
264
|
## 0.4.23
|
|
265
|
+
|
|
217
266
|
- Table
|
|
218
267
|
- fix resizing issues after page size or page index changes
|
|
219
268
|
- Add Select All and Deselect All in columns menu
|
|
@@ -221,17 +270,20 @@
|
|
|
221
270
|
- Export as JSON to fix special characters and encoding issues
|
|
222
271
|
|
|
223
272
|
## 0.4.22
|
|
273
|
+
|
|
224
274
|
- Facets
|
|
225
275
|
- Replace column class function with more efficient solution
|
|
226
276
|
- Sort options in ShowMore alphabetically
|
|
227
|
-
Table
|
|
277
|
+
Table
|
|
228
278
|
- Add titles for components for better accessibility
|
|
229
279
|
- Remove z-index from pagination buttons
|
|
230
280
|
|
|
231
281
|
## 0.4.21
|
|
282
|
+
|
|
232
283
|
- change footer position in page component
|
|
233
284
|
|
|
234
285
|
## 0.4.20
|
|
286
|
+
|
|
235
287
|
- Add aria-label to Table and other components
|
|
236
288
|
- Facets
|
|
237
289
|
- Add aria-label to Facets component
|
|
@@ -239,24 +291,29 @@ Table
|
|
|
239
291
|
- Search
|
|
240
292
|
- Add aria-label to Search component
|
|
241
293
|
- Table: add column
|
|
294
|
+
|
|
242
295
|
## 0.4.19
|
|
243
296
|
|
|
244
297
|
## 0.4.18
|
|
298
|
+
|
|
245
299
|
- Updates indicator text for current page and possible number of pages in a Table
|
|
246
300
|
- Fixes client-side search on Table
|
|
247
301
|
- Adds "No rows available" text in Table if search or filter returns no rows.
|
|
248
302
|
|
|
249
303
|
## 0.4.16
|
|
304
|
+
|
|
250
305
|
- Facets
|
|
251
306
|
- Replaces groups array with a writable store to re-render component on data manipulation.
|
|
252
307
|
- Adds selected attribute to the type so that Facets can be initialized with some selected values.
|
|
253
308
|
|
|
254
309
|
## 0.4.15
|
|
310
|
+
|
|
255
311
|
- Update Facets with new params and add onChange action
|
|
256
312
|
- Changes structure of Facets data
|
|
257
313
|
- Adds on:change action
|
|
258
314
|
|
|
259
315
|
## 0.4.14
|
|
316
|
+
|
|
260
317
|
- Table
|
|
261
318
|
- fixes rendering issues with Table filters and different components
|
|
262
319
|
|
|
@@ -264,18 +321,22 @@ Table
|
|
|
264
321
|
- Exports Facets component
|
|
265
322
|
|
|
266
323
|
## 0.4.13
|
|
324
|
+
|
|
267
325
|
- menu
|
|
268
326
|
- fix code isses
|
|
269
327
|
|
|
270
328
|
## 0.4.11
|
|
329
|
+
|
|
271
330
|
- Table
|
|
272
331
|
- fix lib issue
|
|
273
332
|
|
|
274
333
|
## 0.4.11
|
|
334
|
+
|
|
275
335
|
- Menu
|
|
276
336
|
- fix log off
|
|
277
337
|
|
|
278
338
|
## 0.4.10
|
|
339
|
+
|
|
279
340
|
- Table:
|
|
280
341
|
- Fixes issue with sticky Tables not rendering the filters correctly.
|
|
281
342
|
- Fixes issues related to date picker in Tables with date filters.
|
|
@@ -288,36 +349,44 @@ Table
|
|
|
288
349
|
- Adds Facets component.
|
|
289
350
|
|
|
290
351
|
## 0.4.8
|
|
352
|
+
|
|
291
353
|
- page
|
|
292
354
|
- add notification if api call to backend faild
|
|
293
355
|
|
|
294
356
|
## 0.4.7
|
|
357
|
+
|
|
295
358
|
- menu
|
|
296
359
|
- remove capitalization from menu item
|
|
297
360
|
|
|
298
361
|
## 0.4.6
|
|
362
|
+
|
|
299
363
|
- table
|
|
300
364
|
- Adds config for enabling and disabling Search field on Table.
|
|
301
365
|
- Adds action dispatcher as prop for the renderComponent.
|
|
302
366
|
- Adds unique IDs for Search reset and submit buttons.
|
|
303
367
|
|
|
304
368
|
## 0.4.5
|
|
369
|
+
|
|
305
370
|
- table
|
|
306
371
|
- adds searching for missing values in the filters #744
|
|
307
372
|
- missing values for every data type
|
|
308
373
|
- display patterns for date/time/datetime types
|
|
309
374
|
|
|
310
375
|
## 0.4.4
|
|
376
|
+
|
|
311
377
|
- update libs
|
|
312
378
|
- remove eslint-plugin-svelte3
|
|
313
379
|
- update svelte, sveltekit, typescript, tailwind ...
|
|
314
380
|
|
|
315
381
|
## 0.4.3
|
|
382
|
+
|
|
316
383
|
- table
|
|
317
384
|
- Enable searching on server-side
|
|
318
385
|
|
|
319
386
|
## 0.4.2
|
|
387
|
+
|
|
320
388
|
## 0.4.1
|
|
389
|
+
|
|
321
390
|
- table
|
|
322
391
|
- Server-side searching
|
|
323
392
|
- Case-insensitive filtering of missing values
|
|
@@ -325,13 +394,16 @@ Table
|
|
|
325
394
|
- Handle missing values regardless of the data type
|
|
326
395
|
|
|
327
396
|
## 0.4.0
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
397
|
+
|
|
398
|
+
- update dependency libaries
|
|
399
|
+
- svelte
|
|
400
|
+
- sveltekit
|
|
401
|
+
- vite
|
|
332
402
|
|
|
333
403
|
## 0.3.13
|
|
404
|
+
|
|
334
405
|
## 0.3.12
|
|
406
|
+
|
|
335
407
|
- table
|
|
336
408
|
- Server-side data fetching
|
|
337
409
|
- Server-side filtering
|
|
@@ -341,9 +413,11 @@ Table
|
|
|
341
413
|
- New pagination component
|
|
342
414
|
|
|
343
415
|
## 0.3.11
|
|
416
|
+
|
|
344
417
|
- add on:change passthrough to TextInput, TextArea, DateInput, NumberInput, CheckBox
|
|
345
418
|
|
|
346
419
|
## 0.3.10
|
|
420
|
+
|
|
347
421
|
- multi select
|
|
348
422
|
- update svelte-select libary
|
|
349
423
|
- refactor filterFn (new order - > exact, start, includes)
|
|
@@ -68,8 +68,8 @@ $: isValid = language === "json" ? isValidJSON(value) : language === "js" ? isVa
|
|
|
68
68
|
lang={language === 'html'
|
|
69
69
|
? html({ selfClosingTags: true })
|
|
70
70
|
: language === 'js'
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
? javascript()
|
|
72
|
+
: json()}
|
|
73
73
|
theme={dark ? oneDark : null}
|
|
74
74
|
class="flex w-full"
|
|
75
75
|
{styles}
|
|
@@ -29,15 +29,13 @@ const onCancel = () => {
|
|
|
29
29
|
<h2 class="text-xl font-semibold">{group.displayName}</h2>
|
|
30
30
|
|
|
31
31
|
<!-- Items -->
|
|
32
|
-
<div
|
|
32
|
+
<div
|
|
33
|
+
class="gap-x-10 space-y-2 py-6 px-[2px] max-h-[500px] columns-[192px] overflow-auto min-h"
|
|
34
|
+
>
|
|
33
35
|
{#each Object.keys(selected) as key}
|
|
34
36
|
<label class="flex gap-3 items-center">
|
|
35
37
|
<input type="checkbox" class="checkbox" bind:checked={selected[key].selected} />
|
|
36
|
-
<span
|
|
37
|
-
title={selected[key].displayName}
|
|
38
|
-
class=""
|
|
39
|
-
>{selected[key].displayName}</span
|
|
40
|
-
>
|
|
38
|
+
<span title={selected[key].displayName} class="">{selected[key].displayName}</span>
|
|
41
39
|
</label>
|
|
42
40
|
{/each}
|
|
43
41
|
</div>
|
|
@@ -120,17 +120,20 @@ async function handleSubmit() {
|
|
|
120
120
|
<p>
|
|
121
121
|
{#if model.accept}
|
|
122
122
|
{#each model.accept as ext, i}
|
|
123
|
-
{ext}{#if i < model.accept.length - 1},
|
|
123
|
+
{ext}{#if i < model.accept.length - 1},
|
|
124
|
+
{/if}
|
|
124
125
|
{/each}
|
|
125
126
|
{/if}
|
|
126
127
|
</p>
|
|
127
128
|
</Dropzone>
|
|
128
129
|
{#if isUploading}
|
|
129
|
-
|
|
130
|
+
<ProgressBar value={undefined} />
|
|
130
131
|
{/if}
|
|
131
132
|
</div>
|
|
132
133
|
|
|
133
|
-
<button title="Submit" id={submitBt} color="primary" style="display:none"
|
|
134
|
+
<button title="Submit" id={submitBt} color="primary" style="display:none"
|
|
135
|
+
><Fa icon={faSave} /></button
|
|
136
|
+
>
|
|
134
137
|
{:else}
|
|
135
138
|
<!-- while data is not loaded show a loading information -->
|
|
136
139
|
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
<script>import Table from "./TableContent.svelte";
|
|
2
2
|
export let config;
|
|
3
|
-
let
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
let remountKey = 0;
|
|
4
|
+
let didInitialColumnsRemount = false;
|
|
5
|
+
const normalizeColumns = (cols) => {
|
|
6
|
+
if (!cols || typeof cols !== "object") return "";
|
|
7
|
+
const c = cols;
|
|
8
|
+
const keys = Object.keys(c).sort();
|
|
9
|
+
return JSON.stringify(keys.map((k) => [k, c[k]]));
|
|
10
|
+
};
|
|
11
|
+
const onFetch = (event) => {
|
|
12
|
+
const payload = event.detail;
|
|
13
|
+
const nextColumns = payload?.columns ?? payload;
|
|
14
|
+
const nextCount = Number(payload?.count ?? 0);
|
|
15
|
+
const before = normalizeColumns(config?.columns);
|
|
16
|
+
const after = normalizeColumns(nextColumns);
|
|
17
|
+
config = {
|
|
18
|
+
...config,
|
|
19
|
+
columns: nextColumns,
|
|
20
|
+
...nextCount > 0 ? { __initialServerCount: nextCount } : {}
|
|
21
|
+
};
|
|
22
|
+
if (!didInitialColumnsRemount && before === "" && after !== "") {
|
|
23
|
+
remountKey += 1;
|
|
24
|
+
didInitialColumnsRemount = true;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
6
27
|
if (typeof BigInt !== "undefined" && !BigInt.prototype.toJSON) {
|
|
7
28
|
BigInt.prototype.toJSON = function() {
|
|
8
29
|
return this.toString();
|
|
@@ -10,10 +31,10 @@ if (typeof BigInt !== "undefined" && !BigInt.prototype.toJSON) {
|
|
|
10
31
|
}
|
|
11
32
|
</script>
|
|
12
33
|
|
|
13
|
-
{#key
|
|
34
|
+
{#key remountKey}
|
|
14
35
|
<Table
|
|
15
36
|
{config}
|
|
16
|
-
on:fetch={
|
|
37
|
+
on:fetch={onFetch}
|
|
17
38
|
on:action
|
|
18
39
|
/>
|
|
19
40
|
{/key}
|