@corvina/web-components-library 1.0.0-beta.3 → 1.0.0-beta.5
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/CHANGELOG.md +33 -2
- package/index.d.ts +41 -0
- package/package.json +1 -1
- package/vscode.html-custom-data.json +156 -1
- package/web-components-library.cjs.js +12 -11
- package/web-components-library.es.js +7734 -5436
- package/web-components-library.umd.js +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,11 @@ Breaking changes:
|
|
|
27
27
|
- The components use the Vuetify defaults of the app (e.g. the `variant` of fields), not the library ones.
|
|
28
28
|
- `--color-*` variables: the package CSS now has the components' palette (`--color-primary` #496177,
|
|
29
29
|
`--color-highlight` #01a3dd, ...). 0.2.4 ended with an older palette (#004688, #00b0c7, ...).
|
|
30
|
+
- `CorvinaTable` (paginated) is as tall as its rows, at most as its container, as in frontend-new: with few rows the
|
|
31
|
+
footer follows the last one, with more than fit it stays at the bottom while the rows scroll. It no longer fills
|
|
32
|
+
its container with a white area (`style="height: 100%"` on the root and on the `v-data-table-server` are gone).
|
|
33
|
+
A container that sizes the table with `height` keeps working; a flex container needs `min-height: 0` on its
|
|
34
|
+
items. With `infiniteScroll` the table still fills its container.
|
|
30
35
|
|
|
31
36
|
Added:
|
|
32
37
|
|
|
@@ -34,9 +39,35 @@ Added:
|
|
|
34
39
|
- `CorvinaTable` cell slots `item.<key>` (as in Vuetify's tables): a column's cells written in the template,
|
|
35
40
|
with `item`, `value`, `index` and `column` (`CORVINA.TABLE.CellSlotProps`). The slot replaces the content of the
|
|
36
41
|
column's `type`, now optional in `TableHeaderEntry`. Columns without a slot render as before.
|
|
42
|
+
- `CorvinaTabs` (`<corvina-tabs>`): the tabs of a page with the Corvina look, `tabs` (`CORVINA.TABS.TAB[]`) and
|
|
43
|
+
`selected` owned by the parent (`update:selected` on a click), a content for each tab in the `tab.<value>` slots
|
|
44
|
+
(only the selected one is shown; web components: `slot="tab.<value>"` children), or one in the default slot, and
|
|
45
|
+
actions on the right of the bar in the `append` slot.
|
|
46
|
+
- `CorvinaDateRange` (`<corvina-date-range>`): a range of days for the breadcrumb, `model` (`CORVINA.DATE_RANGE.RANGE`,
|
|
47
|
+
ISO days) owned by the parent (`update:model` from the accept button), `presets` (`CORVINA.DATE_RANGE.PRESET[]`) and
|
|
48
|
+
the start and end calendars; highlighted while a range is set.
|
|
49
|
+
- `CorvinaHelpPanel` (`<corvina-help-panel>`): the help of a page as in frontend-new, the lower half of the window slid up
|
|
50
|
+
from the bottom, `open` owned by the parent (`update:open` from the close button), `title` and `closeLabel`, the help
|
|
51
|
+
in the default slot with the docs look (headings, lists, tables; in the web components the slotted content keeps
|
|
52
|
+
the page's styles).
|
|
53
|
+
- `CorvinaBreadcrumb` sort, as in frontend-new: `allowedSorts` (`CORVINA.BREADCRUMB.SORT_BY[]`) shows a sort dropdown
|
|
54
|
+
and the direction button after the slot, `sort` (`CORVINA.BREADCRUMB.SORT`, `key` and `desc`) owned by the parent
|
|
55
|
+
(`update:sort`), `sortPlaceholder`. Without `allowedSorts` there is no sort.
|
|
56
|
+
- `CorvinaBreadcrumb` `filterBy`: the `key` of the filter selected in the filter key dropdown, selected again when
|
|
57
|
+
`allowedFilters` change (e.g. on another tab).
|
|
37
58
|
|
|
38
59
|
Fixed:
|
|
39
60
|
|
|
61
|
+
- `CorvinaBreadcrumb`: a filter key selected in the dropdown is dropped when `allowedFilters` no longer contain it.
|
|
62
|
+
- `CorvinaBreadcrumb` looks like frontend-new's breadcrumb: full-height light dividers (`CorvinaBreadcrumbDivider` too,
|
|
63
|
+
was a 25px dark line), the filter area 860px wide and starting with a divider, the filter key dropdown 13em on the
|
|
64
|
+
g1 background without the underline, the filter value field 16px from it.
|
|
65
|
+
- `CorvinaTable` rows are highlighted on hover (Vuetify's standard `hover`), the expanded content is not, as in
|
|
66
|
+
frontend-new; the items-per-page select of the footer is underlined, with "Rows per page:" (Vuetify's
|
|
67
|
+
`dataTable.itemsPerPageText`, translated) and the selected value of its menu in the highlight color, as in
|
|
68
|
+
frontend-new.
|
|
69
|
+
- Scrollbars as in frontend-new: thin, a highlight thumb on g1, in every component (the `custom-scrollbars` class
|
|
70
|
+
on their root, also in the package CSS for the app's own containers).
|
|
40
71
|
- Type declarations: relative imports have the `.js` extension, so they resolve with TypeScript
|
|
41
72
|
`moduleResolution` `node16`/`nodenext` too (the package is now `"type": "module"`).
|
|
42
73
|
- `AutocompleteFilter` (breadcrumb and table filters) threw on focus (Vuetify 2 API): the menu now opens on focus.
|
|
@@ -46,8 +77,8 @@ Fixed:
|
|
|
46
77
|
|
|
47
78
|
### `@corvina/web-components-library` (from 0.2.4)
|
|
48
79
|
|
|
49
|
-
- Vuetify 4 and Vue 3.5 bundled (were Vuetify 3.7 and Vue 3.5). JS 1.06 → 1.
|
|
50
|
-
mostly Vuetify 4 itself.
|
|
80
|
+
- Vuetify 4 and Vue 3.5 bundled (were Vuetify 3.7 and Vue 3.5). JS 1.06 → 1.38 MB (gzip 265 → 344 KB),
|
|
81
|
+
mostly Vuetify 4 itself (its date picker for `CorvinaDateRange` included).
|
|
51
82
|
- Runs on the browsers listed above (Browsers): 0.2.4 was transpiled to ES2016.
|
|
52
83
|
- No dependencies declared: Vue, Vuetify and the other libraries are bundled (0.2.4 declared `vue` and
|
|
53
84
|
`vuetify` 3, installed without being used).
|
package/index.d.ts
CHANGED
|
@@ -73,6 +73,20 @@ export declare namespace CORVINA {
|
|
|
73
73
|
/** Text shown in the chip instead of the value: the `itemsTitleKey` property of the selected item for FILTER_BY_ENUM.AUTOCOMPLETE */
|
|
74
74
|
title?: string;
|
|
75
75
|
}
|
|
76
|
+
/** An array of this structure defines what the user can sort by. */
|
|
77
|
+
interface SORT_BY {
|
|
78
|
+
/** Unique key of the sort, `SORT.key` when selected */
|
|
79
|
+
key: string;
|
|
80
|
+
/** Title shown in the sort dropdown */
|
|
81
|
+
title: string;
|
|
82
|
+
}
|
|
83
|
+
/** The sort selected by the user. */
|
|
84
|
+
interface SORT {
|
|
85
|
+
/** Key of the selected `SORT_BY` */
|
|
86
|
+
key: string;
|
|
87
|
+
/** Descending order */
|
|
88
|
+
desc: boolean;
|
|
89
|
+
}
|
|
76
90
|
interface CUSTOM_VUE_COMPONENT {
|
|
77
91
|
/** Name of the Vue component or Vue component definition */
|
|
78
92
|
component: string | Component;
|
|
@@ -101,6 +115,33 @@ export declare namespace CORVINA {
|
|
|
101
115
|
X_LARGE = "x-large"
|
|
102
116
|
}
|
|
103
117
|
}
|
|
118
|
+
namespace TABS {
|
|
119
|
+
/** A tab of CorvinaTabs. */
|
|
120
|
+
interface TAB {
|
|
121
|
+
/** Unique value of the tab: `selected` and the `update:selected` event use it */
|
|
122
|
+
value: string | number;
|
|
123
|
+
/** Text shown in the tab */
|
|
124
|
+
title: string;
|
|
125
|
+
/** The data-qa attribute of the tab, for testing and automation */
|
|
126
|
+
dataQa?: string;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
namespace DATE_RANGE {
|
|
130
|
+
/** A range of days of CorvinaDateRange, both days included. */
|
|
131
|
+
interface RANGE {
|
|
132
|
+
/** First day, ISO `yyyy-MM-dd` */
|
|
133
|
+
start: string;
|
|
134
|
+
/** Last day, ISO `yyyy-MM-dd` */
|
|
135
|
+
end: string;
|
|
136
|
+
}
|
|
137
|
+
/** A preset of CorvinaDateRange: a button above the calendars that selects its range. */
|
|
138
|
+
interface PRESET {
|
|
139
|
+
/** Text of the button */
|
|
140
|
+
title: string;
|
|
141
|
+
/** The range it selects, `null` to clear the selection */
|
|
142
|
+
range: RANGE | null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
104
145
|
namespace TABLE {
|
|
105
146
|
/** Horizontal alignment of a column (applied as `text-*` and `justify-*` classes) */
|
|
106
147
|
enum ALIGN {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"name": "corvina-breadcrumb",
|
|
7
7
|
"description": {
|
|
8
8
|
"kind": "markdown",
|
|
9
|
-
"value": "Corvina web component `<corvina-breadcrumb>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:activeControl` — `[value: CORVINA.BREADCRUMB.ACTIVE_CONTROL]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n\n**Slots:** `default`"
|
|
9
|
+
"value": "Corvina web component `<corvina-breadcrumb>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:activeControl` — `[value: CORVINA.BREADCRUMB.ACTIVE_CONTROL]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n- `update:sort` — `[value: CORVINA.BREADCRUMB.SORT]`\n\n**Slots:** `default`"
|
|
10
10
|
},
|
|
11
11
|
"attributes": [
|
|
12
12
|
{
|
|
@@ -103,6 +103,13 @@
|
|
|
103
103
|
"value": "Property `allowedFilters`: `CORVINA.BREADCRUMB.FILTER_BY[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.allowedFilters = …`), not as an HTML attribute."
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
"name": "filter-by",
|
|
108
|
+
"description": {
|
|
109
|
+
"kind": "markdown",
|
|
110
|
+
"value": "Property `filterBy`: `string`"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
106
113
|
{
|
|
107
114
|
"name": "filters",
|
|
108
115
|
"description": {
|
|
@@ -116,6 +123,27 @@
|
|
|
116
123
|
"kind": "markdown",
|
|
117
124
|
"value": "Property `filtersCustomComponent`: `CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT`\n\n⚠️ Complex value: set it as a JavaScript property (`element.filtersCustomComponent = …`), not as an HTML attribute."
|
|
118
125
|
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "allowed-sorts",
|
|
129
|
+
"description": {
|
|
130
|
+
"kind": "markdown",
|
|
131
|
+
"value": "Property `allowedSorts`: `CORVINA.BREADCRUMB.SORT_BY[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.allowedSorts = …`), not as an HTML attribute."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "sort",
|
|
136
|
+
"description": {
|
|
137
|
+
"kind": "markdown",
|
|
138
|
+
"value": "Property `sort`: `CORVINA.BREADCRUMB.SORT | null`\n\nDefault: `null`\n\n⚠️ Complex value: set it as a JavaScript property (`element.sort = …`), not as an HTML attribute."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "sort-placeholder",
|
|
143
|
+
"description": {
|
|
144
|
+
"kind": "markdown",
|
|
145
|
+
"value": "Property `sortPlaceholder`: `string`\n\nDefault: `Sort by:`"
|
|
146
|
+
}
|
|
119
147
|
}
|
|
120
148
|
]
|
|
121
149
|
},
|
|
@@ -259,6 +287,110 @@
|
|
|
259
287
|
}
|
|
260
288
|
]
|
|
261
289
|
},
|
|
290
|
+
{
|
|
291
|
+
"name": "corvina-date-range",
|
|
292
|
+
"description": {
|
|
293
|
+
"kind": "markdown",
|
|
294
|
+
"value": "Corvina web component `<corvina-date-range>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:model` — `[value: CORVINA.DATE_RANGE.RANGE | null]`"
|
|
295
|
+
},
|
|
296
|
+
"attributes": [
|
|
297
|
+
{
|
|
298
|
+
"name": "model",
|
|
299
|
+
"description": {
|
|
300
|
+
"kind": "markdown",
|
|
301
|
+
"value": "Property `model`: `CORVINA.DATE_RANGE.RANGE | null`\n\nDefault: `null`\n\n⚠️ Complex value: set it as a JavaScript property (`element.model = …`), not as an HTML attribute."
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "presets",
|
|
306
|
+
"description": {
|
|
307
|
+
"kind": "markdown",
|
|
308
|
+
"value": "Property `presets`: `CORVINA.DATE_RANGE.PRESET[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.presets = …`), not as an HTML attribute."
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "start-label",
|
|
313
|
+
"description": {
|
|
314
|
+
"kind": "markdown",
|
|
315
|
+
"value": "Property `startLabel`: `string`\n\nDefault: `Start Date`"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "end-label",
|
|
320
|
+
"description": {
|
|
321
|
+
"kind": "markdown",
|
|
322
|
+
"value": "Property `endLabel`: `string`\n\nDefault: `End Date`"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "separator",
|
|
327
|
+
"description": {
|
|
328
|
+
"kind": "markdown",
|
|
329
|
+
"value": "Property `separator`: `string`\n\nDefault: ` to `"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "min",
|
|
334
|
+
"description": {
|
|
335
|
+
"kind": "markdown",
|
|
336
|
+
"value": "Property `min`: `string`"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "max",
|
|
341
|
+
"description": {
|
|
342
|
+
"kind": "markdown",
|
|
343
|
+
"value": "Property `max`: `string`"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "first-day-of-week",
|
|
348
|
+
"description": {
|
|
349
|
+
"kind": "markdown",
|
|
350
|
+
"value": "Property `firstDayOfWeek`: `number`\n\nDefault: `1`"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "disabled",
|
|
355
|
+
"description": {
|
|
356
|
+
"kind": "markdown",
|
|
357
|
+
"value": "Property `disabled`: `boolean`\n\nDefault: `false`"
|
|
358
|
+
},
|
|
359
|
+
"valueSet": "v"
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "corvina-help-panel",
|
|
365
|
+
"description": {
|
|
366
|
+
"kind": "markdown",
|
|
367
|
+
"value": "Corvina web component `<corvina-help-panel>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:open` — `[value: boolean]`\n\n**Slots:** `default`"
|
|
368
|
+
},
|
|
369
|
+
"attributes": [
|
|
370
|
+
{
|
|
371
|
+
"name": "open",
|
|
372
|
+
"description": {
|
|
373
|
+
"kind": "markdown",
|
|
374
|
+
"value": "Property `open`: `boolean`\n\nDefault: `false`"
|
|
375
|
+
},
|
|
376
|
+
"valueSet": "v"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "title",
|
|
380
|
+
"description": {
|
|
381
|
+
"kind": "markdown",
|
|
382
|
+
"value": "Property `title`: `string`\n\nDefault: `Need help?`"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "close-label",
|
|
387
|
+
"description": {
|
|
388
|
+
"kind": "markdown",
|
|
389
|
+
"value": "Property `closeLabel`: `string`\n\nDefault: `Close`"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
},
|
|
262
394
|
{
|
|
263
395
|
"name": "corvina-icon",
|
|
264
396
|
"description": {
|
|
@@ -598,6 +730,29 @@
|
|
|
598
730
|
}
|
|
599
731
|
}
|
|
600
732
|
]
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"name": "corvina-tabs",
|
|
736
|
+
"description": {
|
|
737
|
+
"kind": "markdown",
|
|
738
|
+
"value": "Corvina web component `<corvina-tabs>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:selected` — `[value: string | number]`\n\n**Slots:** `append`, `default`"
|
|
739
|
+
},
|
|
740
|
+
"attributes": [
|
|
741
|
+
{
|
|
742
|
+
"name": "tabs",
|
|
743
|
+
"description": {
|
|
744
|
+
"kind": "markdown",
|
|
745
|
+
"value": "Property `tabs`: `CORVINA.TABS.TAB[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.tabs = …`), not as an HTML attribute."
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "selected",
|
|
750
|
+
"description": {
|
|
751
|
+
"kind": "markdown",
|
|
752
|
+
"value": "Property `selected`: `string | number | null`\n\nDefault: `null`"
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
]
|
|
601
756
|
}
|
|
602
757
|
]
|
|
603
758
|
}
|