@corvina/web-components-library 1.0.0-beta.13 → 1.0.0-beta.14

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 CHANGED
@@ -120,6 +120,9 @@ Added:
120
120
  - `CvWeekdays` (`<cv-weekdays>`): frontend-new's active time period, a checkbox a day under its short name; the value
121
121
  is the chosen days as `Date.getDay()` numbers them (Sunday 0), in order. `dayNames` (Sunday first, English by
122
122
  default), `firstDay` (Monday by default).
123
+ - `CvQuota` (`<cv-quota>`): a quota indicator (design system COMP-19), frontend-new's `OrganizationPieRange`: how
124
+ much of a resource is used, `ratio` drawn as a 20px filled disc, or `text` with `showText`; `level`
125
+ (`CORVINA.QUOTA.LEVEL`) colours it (empty grey, warning, alert), and the tooltip has `text` and `details`.
123
126
  - `CvKeyValueField` (`<cv-key-value-field>`): frontend-new's webhook headers, a key and its value typed side by side,
124
127
  the pairs as chips `key : value` under them (`Record<string, string>`); a key already there takes the new value.
125
128
  `keyLabel`, `valueLabel`, `addLabel`, `removeLabel`.
@@ -131,16 +134,33 @@ Added:
131
134
  `dataQa`. Menu entries (`MenuPropEntry`) have `disabledReason` too. Each row has its own buttons: the `ROW_ACTIONS`
132
135
  stories leave out what the user may never do (STATE-1), disable with the reason what the row does not allow
133
136
  (STATE-2), and put View in the slot of Edit for a read-only user (STATE-4).
137
+ - `CvTable` row selection (paginated table), as frontend-new's VPN renewals: `showSelect` adds a checkbox to each row
138
+ and one to the header, which selects or clears the selectable rows of the page. `selected` holds the `itemValue`
139
+ (`id` by default) of the selected rows, those on other pages too, owned by the parent (`update:selected`,
140
+ `v-model:selected`). A row with a reason in its `propSelectDisabledReason` property cannot be selected: its
141
+ checkbox is g4 and its tooltip says why (STATE-1, STATE-2). `ROW_SELECTION` story.
134
142
  - `CvBreadcrumb` sort, as in frontend-new: `allowedSorts` (`CORVINA.BREADCRUMB.SORT_BY[]`) shows a sort dropdown
135
143
  and the direction button after the slot, `sort` (`CORVINA.BREADCRUMB.SORT`, `key` and `desc`) owned by the parent
136
144
  (`update:sort`), `sortPlaceholder`. Without `allowedSorts` there is no sort.
137
145
  - `CvBreadcrumb` `filterBy`: the `key` of the filter selected in the filter key dropdown, selected again when
138
146
  `allowedFilters` change (e.g. on another tab).
147
+ - `CvSelect` and `CvAutocomplete` `filter`: a filter of a bar (the secondary top bar's slot, a table's own bar), as
148
+ `CvBreadcrumb`'s sort dropdown looks: 40px, no label, line nor messages, 16em wide. Highlighted while it has a value
149
+ (TOPBAR-8), never selecting its only option by itself, cleared with the panels' thin X; disabled in g4 with
150
+ `disabledReason` in its tooltip (STATE-2, STATE-4). frontend-new wrote these dropdowns in each page (renewals expiry and sub-organization, consumptions
151
+ aggregation). The `CvBreadcrumb` stories' slot uses it.
152
+ - `CvRadioGroup` `cards`: each choice a bordered card, clickable all over, the chosen one's border and title in the
153
+ highlight colour (as GRID-4's selected card), as frontend-new's VPN renewal plans. `CORVINA.FIELD.ITEM` `subtitle`:
154
+ a line under the choice's title in `--color-g4` (TYPE-5), in either look. `RADIO_GROUP_CARDS` story.
139
155
 
140
156
  Fixed:
141
157
 
142
158
  - The icon buttons of `CvTable` and `CvBreadcrumb` no longer submit a form they are in (`type="button"`).
143
159
  - `CvWeekdays`: 8px between the label and the days' names, were 2px (the names looked stuck to the label).
160
+ - `CvBreadcrumb` `icon`: a Material Symbol (e.g. `balance`) is drawn in its font; the Corvina font hid it.
161
+ - `CvBreadcrumb` sort and filter key dropdowns, as frontend-new's: the placeholder ("Sort by:") in `--color-g4`, the
162
+ value and the arrow in `--color-dk`; the direction button, disabled until a sort is chosen, keeps its border and
163
+ draws the arrow in `--color-g4`. Vuetify's emphasis opacities made them almost white.
144
164
  - `CvButton`: each button has its own element reference (one was shared by all the buttons of the page).
145
165
  - `CvBreadcrumb`: a filter key selected in the dropdown is dropped when `allowedFilters` no longer contain it.
146
166
  - `CvBreadcrumb` looks like frontend-new's breadcrumb: full-height light dividers (`CvBreadcrumbDivider` too,
package/index.d.ts CHANGED
@@ -203,6 +203,8 @@ export declare namespace CORVINA {
203
203
  title: string;
204
204
  value: string | number | boolean;
205
205
  disabled?: boolean;
206
+ /** A line under the title: CvRadioGroup's (its `cards` especially). */
207
+ subtitle?: string;
206
208
  }
207
209
  /**
208
210
  * The search of a CvAutocomplete on the server: the items matching `search`, page `page` (from 0). An empty page
@@ -244,6 +246,19 @@ export declare namespace CORVINA {
244
246
  HELP = "help"
245
247
  }
246
248
  }
249
+ namespace QUOTA {
250
+ /** How full a CvQuota is, which sets its colours. */
251
+ enum LEVEL {
252
+ /** Nothing to use (the quantity is 0): all grey */
253
+ EMPTY = "empty",
254
+ /** Below the warning threshold, or without a limit */
255
+ NORMAL = "normal",
256
+ /** Close to the limit (frontend-new: 75%) */
257
+ WARNING = "warning",
258
+ /** At the limit or nearly (frontend-new: 90%) */
259
+ ALERT = "alert"
260
+ }
261
+ }
247
262
  namespace INFINITE_LOADER {
248
263
  /**
249
264
  * Argument of the `infinite` event of CvInfiniteLoader: when the page is fetched call `loaded()` (more pages may
@@ -303,6 +318,8 @@ export declare namespace CORVINA {
303
318
  VUE_COMPONENT = "VueComponent",
304
319
  /** Reserved for internal usage. Do not used for user columns */
305
320
  EXPAND = "Expand",
321
+ /** Reserved for internal usage (`showSelect`). Do not use for user columns */
322
+ SELECT = "Select",
306
323
  /** Empty column */
307
324
  EMPTY = "Empty"
308
325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvina/web-components-library",
3
- "version": "1.0.0-beta.13",
3
+ "version": "1.0.0-beta.14",
4
4
  "private": false,
5
5
  "description": "Corvina web components (custom elements)",
6
6
  "homepage": "https://docs.components.corvina.cloud/",
@@ -163,6 +163,14 @@
163
163
  "kind": "markdown",
164
164
  "value": "Property `loadingText`: `string`\n\nDefault: `Loading...`"
165
165
  }
166
+ },
167
+ {
168
+ "name": "filter",
169
+ "description": {
170
+ "kind": "markdown",
171
+ "value": "Property `filter`: `boolean`\n\nDefault: `false`"
172
+ },
173
+ "valueSet": "v"
166
174
  }
167
175
  ]
168
176
  },
@@ -1111,6 +1119,84 @@
1111
1119
  }
1112
1120
  ]
1113
1121
  },
1122
+ {
1123
+ "name": "cv-quota",
1124
+ "description": {
1125
+ "kind": "markdown",
1126
+ "value": "Corvina web component `<cv-quota>`."
1127
+ },
1128
+ "attributes": [
1129
+ {
1130
+ "name": "ratio",
1131
+ "description": {
1132
+ "kind": "markdown",
1133
+ "value": "Property `ratio`: `number`\n\nDefault: `0`"
1134
+ }
1135
+ },
1136
+ {
1137
+ "name": "level",
1138
+ "description": {
1139
+ "kind": "markdown",
1140
+ "value": "Property `level`: `CORVINA.QUOTA.LEVEL | \"empty\" | \"normal\" | \"warning\" | \"alert\"`\n\nDefault: `normal`"
1141
+ },
1142
+ "values": [
1143
+ {
1144
+ "name": "empty"
1145
+ },
1146
+ {
1147
+ "name": "normal"
1148
+ },
1149
+ {
1150
+ "name": "warning"
1151
+ },
1152
+ {
1153
+ "name": "alert"
1154
+ },
1155
+ {
1156
+ "name": "empty"
1157
+ },
1158
+ {
1159
+ "name": "normal"
1160
+ },
1161
+ {
1162
+ "name": "warning"
1163
+ },
1164
+ {
1165
+ "name": "alert"
1166
+ }
1167
+ ]
1168
+ },
1169
+ {
1170
+ "name": "text",
1171
+ "description": {
1172
+ "kind": "markdown",
1173
+ "value": "Property `text`: `string`\n\nDefault: `\"\"`"
1174
+ }
1175
+ },
1176
+ {
1177
+ "name": "details",
1178
+ "description": {
1179
+ "kind": "markdown",
1180
+ "value": "Property `details`: `string[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.details = …`), not as an HTML attribute."
1181
+ }
1182
+ },
1183
+ {
1184
+ "name": "show-text",
1185
+ "description": {
1186
+ "kind": "markdown",
1187
+ "value": "Property `showText`: `boolean`\n\nDefault: `false`"
1188
+ },
1189
+ "valueSet": "v"
1190
+ },
1191
+ {
1192
+ "name": "attach",
1193
+ "description": {
1194
+ "kind": "markdown",
1195
+ "value": "Property `attach`: `string | boolean | Element`\n\n⚠️ Complex value: set it as a JavaScript property (`element.attach = …`), not as an HTML attribute."
1196
+ }
1197
+ }
1198
+ ]
1199
+ },
1114
1200
  {
1115
1201
  "name": "cv-panel",
1116
1202
  "description": {
@@ -1318,6 +1404,14 @@
1318
1404
  },
1319
1405
  "valueSet": "v"
1320
1406
  },
1407
+ {
1408
+ "name": "cards",
1409
+ "description": {
1410
+ "kind": "markdown",
1411
+ "value": "Property `cards`: `boolean`\n\nDefault: `false`"
1412
+ },
1413
+ "valueSet": "v"
1414
+ },
1321
1415
  {
1322
1416
  "name": "help",
1323
1417
  "description": {
@@ -1512,6 +1606,14 @@
1512
1606
  "value": "Property `hideDetails`: `boolean`\n\nDefault: `false`"
1513
1607
  },
1514
1608
  "valueSet": "v"
1609
+ },
1610
+ {
1611
+ "name": "filter",
1612
+ "description": {
1613
+ "kind": "markdown",
1614
+ "value": "Property `filter`: `boolean`\n\nDefault: `false`"
1615
+ },
1616
+ "valueSet": "v"
1515
1617
  }
1516
1618
  ]
1517
1619
  },
@@ -1681,7 +1783,7 @@
1681
1783
  "name": "cv-table",
1682
1784
  "description": {
1683
1785
  "kind": "markdown",
1684
- "value": "Corvina web component `<cv-table>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n- `currentPageChanged` — `[value: number]`\n- `currentItemsPerPageChanged` — `[value: number]`\n- `handleSorting` — `[value: CORVINA.TABLE.TableHeaderEntry]`\n- `rowExpanded` — `[index: number]`\n- `loadMore` — `[cb: CORVINA.TABLE.LoadMoreCallback]`\n- `rowClicked` — `[index: number, item: any]`\n\n**Slots:** `default`"
1786
+ "value": "Corvina web component `<cv-table>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n- `currentPageChanged` — `[value: number]`\n- `currentItemsPerPageChanged` — `[value: number]`\n- `handleSorting` — `[value: CORVINA.TABLE.TableHeaderEntry]`\n- `rowExpanded` — `[index: number]`\n- `loadMore` — `[cb: CORVINA.TABLE.LoadMoreCallback]`\n- `update:selected` — `[value: unknown[]]`\n- `rowClicked` — `[index: number, item: any]`\n\n**Slots:** `default`"
1685
1787
  },
1686
1788
  "attributes": [
1687
1789
  {
@@ -1802,6 +1904,35 @@
1802
1904
  },
1803
1905
  "valueSet": "v"
1804
1906
  },
1907
+ {
1908
+ "name": "show-select",
1909
+ "description": {
1910
+ "kind": "markdown",
1911
+ "value": "Property `showSelect`: `boolean`\n\nDefault: `false`"
1912
+ },
1913
+ "valueSet": "v"
1914
+ },
1915
+ {
1916
+ "name": "selected",
1917
+ "description": {
1918
+ "kind": "markdown",
1919
+ "value": "Property `selected`: `unknown[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.selected = …`), not as an HTML attribute."
1920
+ }
1921
+ },
1922
+ {
1923
+ "name": "item-value",
1924
+ "description": {
1925
+ "kind": "markdown",
1926
+ "value": "Property `itemValue`: `string`\n\nDefault: `id`"
1927
+ }
1928
+ },
1929
+ {
1930
+ "name": "prop-select-disabled-reason",
1931
+ "description": {
1932
+ "kind": "markdown",
1933
+ "value": "Property `propSelectDisabledReason`: `string`\n\nDefault: `\"\"`"
1934
+ }
1935
+ },
1805
1936
  {
1806
1937
  "name": "show-search-bar",
1807
1938
  "description": {