@corvina/web-components-library 1.0.0-beta.5 → 1.0.0-beta.7
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 +22 -2
- package/index.d.ts +16 -0
- package/package.json +1 -1
- package/vscode.html-custom-data.json +23 -0
- package/web-components-library.cjs.js +12 -12
- package/web-components-library.es.js +14036 -14613
- package/web-components-library.umd.js +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -15,7 +15,7 @@ are kept).
|
|
|
15
15
|
Breaking changes:
|
|
16
16
|
|
|
17
17
|
- `vue` (^3.5) and `vuetify` (^4.3) are peer dependencies, provided by the app: the package no longer
|
|
18
|
-
bundles Vuetify 3 (JS 554 →
|
|
18
|
+
bundles Vuetify 3 (JS 554 → 188 KB, gzip 160 → 71 KB; the ExorFontIcon font is in it as a data URL).
|
|
19
19
|
- Modern syntax (see Browsers above): an app that targets older browsers transpiles the package with its
|
|
20
20
|
bundler (Vite does it by itself in the build).
|
|
21
21
|
- ESM only: the CommonJS and UMD builds are gone (`exports` has no `require` condition).
|
|
@@ -45,11 +45,16 @@ Added:
|
|
|
45
45
|
actions on the right of the bar in the `append` slot.
|
|
46
46
|
- `CorvinaDateRange` (`<corvina-date-range>`): a range of days for the breadcrumb, `model` (`CORVINA.DATE_RANGE.RANGE`,
|
|
47
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
|
|
48
|
+
the start and end calendars; highlighted while a range is set, underlined as frontend-new's field (highlight color
|
|
49
|
+
on hover; the text from the start of the underline, both 16px in while a range is set).
|
|
49
50
|
- `CorvinaHelpPanel` (`<corvina-help-panel>`): the help of a page as in frontend-new, the lower half of the window slid up
|
|
50
51
|
from the bottom, `open` owned by the parent (`update:open` from the close button), `title` and `closeLabel`, the help
|
|
51
52
|
in the default slot with the docs look (headings, lists, tables; in the web components the slotted content keeps
|
|
52
53
|
the page's styles).
|
|
54
|
+
- `CorvinaInfiniteLoader` (`<corvina-infinite-loader>`): the infinite scroll of the autocomplete filters, for the app's
|
|
55
|
+
own lists. It emits `infinite` (`$state`: `CORVINA.INFINITE_LOADER.StateHandler`) when it is visible in its scrolling
|
|
56
|
+
container, not again while a page loads; `loaded()`, `complete()` (stops it) and `error()` (retry button, `retryLabel`);
|
|
57
|
+
`identifier` starts it again from the first page. Slots `spinner`, `complete` and `error` (Vue: with `retry`).
|
|
53
58
|
- `CorvinaBreadcrumb` sort, as in frontend-new: `allowedSorts` (`CORVINA.BREADCRUMB.SORT_BY[]`) shows a sort dropdown
|
|
54
59
|
and the direction button after the slot, `sort` (`CORVINA.BREADCRUMB.SORT`, `key` and `desc`) owned by the parent
|
|
55
60
|
(`update:sort`), `sortPlaceholder`. Without `allowedSorts` there is no sort.
|
|
@@ -71,9 +76,22 @@ Fixed:
|
|
|
71
76
|
- Type declarations: relative imports have the `.js` extension, so they resolve with TypeScript
|
|
72
77
|
`moduleResolution` `node16`/`nodenext` too (the package is now `"type": "module"`).
|
|
73
78
|
- `AutocompleteFilter` (breadcrumb and table filters) threw on focus (Vuetify 2 API): the menu now opens on focus.
|
|
79
|
+
- Infinite scroll of the autocomplete filters (breadcrumb and table): no page is requested while one is loading. Two
|
|
80
|
+
pages requested together became one fetch (it is debounced) and a page of results was skipped. The next page is
|
|
81
|
+
requested when the end of the menu is visible, while scrolling: all the pages were requested one after the other
|
|
82
|
+
when the menu opened (the end of the list was checked against the window). The spinner has the primary color in the
|
|
83
|
+
web components too (was black).
|
|
84
|
+
- `AutocompleteFilter` imports `VCombobox` from `vuetify/components/VCombobox`, not from the `vuetify/components`
|
|
85
|
+
barrel: an app whose Vite dev server does not pre-bundle Vuetify loaded every Vuetify component (a Log page with
|
|
86
|
+
the breadcrumb: 777 → 484 module requests).
|
|
74
87
|
- Breadcrumb filter chip arrows are 25px as in the web components (the Vuetify 52px rule won before).
|
|
75
88
|
- The package only contains the files it needs (61 → 27): no type declarations of internal modules or of the web
|
|
76
89
|
components entry, no favicon and logo.
|
|
90
|
+
- No dependencies besides the peer ones: the infinite scroll of the autocomplete filters no longer uses
|
|
91
|
+
`v3-infinite-loading` (declared, and bundled too), `lodash-es` (for `debounce`) and `webfontloader` are no longer
|
|
92
|
+
bundled (JS -23 KB, gzip -7 KB).
|
|
93
|
+
- `loadFonts()` adds a `<link>` to the Google Fonts css2 API (Roboto, Material Symbols) instead of using
|
|
94
|
+
webfontloader: the `wf-loading`/`wf-active` classes are no longer set on `<html>`.
|
|
77
95
|
|
|
78
96
|
### `@corvina/web-components-library` (from 0.2.4)
|
|
79
97
|
|
|
@@ -83,6 +101,8 @@ Fixed:
|
|
|
83
101
|
- No dependencies declared: Vue, Vuetify and the other libraries are bundled (0.2.4 declared `vue` and
|
|
84
102
|
`vuetify` 3, installed without being used).
|
|
85
103
|
- The bundle runs without a bundler (`<script type="module">`): `process` is no longer referenced.
|
|
104
|
+
- `v3-infinite-loading`, `lodash-es` and `webfontloader` are no longer bundled (ES build -31 KB, gzip -8 KB): the infinite
|
|
105
|
+
scroll and `loadFonts()` changed as in the Vue package.
|
|
86
106
|
- `web-components-library.css` (the page CSS) only has the `--color-*` variables (108 KB → 0.6 KB): no Vuetify
|
|
87
107
|
reset, base or component CSS on the host page anymore (they changed e.g. the `html` font and line height,
|
|
88
108
|
`box-sizing`, buttons and inputs of the page). The palette changed as in the Vue package (#004688 → #496177, ...).
|
package/index.d.ts
CHANGED
|
@@ -142,6 +142,22 @@ export declare namespace CORVINA {
|
|
|
142
142
|
range: RANGE | null;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
+
namespace INFINITE_LOADER {
|
|
146
|
+
/**
|
|
147
|
+
* Argument of the `infinite` event of CorvinaInfiniteLoader: when the page is fetched call `loaded()` (more pages may
|
|
148
|
+
* follow), `complete()` (no more pages) or `error()` (the loader shows a retry button).
|
|
149
|
+
*/
|
|
150
|
+
interface StateHandler {
|
|
151
|
+
/** The page is loading: the loader shows the spinner (it already does before emitting `infinite`) */
|
|
152
|
+
loading: () => void;
|
|
153
|
+
/** The page was added: the loader requests the next one if it is still visible */
|
|
154
|
+
loaded: () => void;
|
|
155
|
+
/** There are no more pages: the loader stops until `identifier` changes */
|
|
156
|
+
complete: () => void;
|
|
157
|
+
/** The page could not be loaded: the loader shows the retry button */
|
|
158
|
+
error: () => void;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
145
161
|
namespace TABLE {
|
|
146
162
|
/** Horizontal alignment of a column (applied as `text-*` and `justify-*` classes) */
|
|
147
163
|
enum ALIGN {
|
package/package.json
CHANGED
|
@@ -465,6 +465,29 @@
|
|
|
465
465
|
}
|
|
466
466
|
]
|
|
467
467
|
},
|
|
468
|
+
{
|
|
469
|
+
"name": "corvina-infinite-loader",
|
|
470
|
+
"description": {
|
|
471
|
+
"kind": "markdown",
|
|
472
|
+
"value": "Corvina web component `<corvina-infinite-loader>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `infinite` — `[$state: CORVINA.INFINITE_LOADER.StateHandler]`\n\n**Slots:** `spinner`, `complete`, `error`"
|
|
473
|
+
},
|
|
474
|
+
"attributes": [
|
|
475
|
+
{
|
|
476
|
+
"name": "identifier",
|
|
477
|
+
"description": {
|
|
478
|
+
"kind": "markdown",
|
|
479
|
+
"value": "Property `identifier`: `string | number`"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "retry-label",
|
|
484
|
+
"description": {
|
|
485
|
+
"kind": "markdown",
|
|
486
|
+
"value": "Property `retryLabel`: `string`\n\nDefault: `Retry`"
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
},
|
|
468
491
|
{
|
|
469
492
|
"name": "corvina-select",
|
|
470
493
|
"description": {
|