@fusion.dev/helix-headless 0.148.0 → 0.149.0
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/custom-elements.json +6966 -1798
- package/dist/announcement/root/announcement-root.d.ts +5 -0
- package/dist/announcement/root/announcement-root.js +5 -2
- package/dist/area-chart/root/area-chart-root.d.ts +11 -0
- package/dist/area-chart/root/area-chart-root.js +20 -7
- package/dist/avatar/group/avatar-group.d.ts +10 -2
- package/dist/avatar/group/avatar-group.js +10 -5
- package/dist/badge/count.d.ts +6 -1
- package/dist/badge/count.js +3 -3
- package/dist/badge/root/badge-root.d.ts +6 -2
- package/dist/badge/root/badge-root.js +3 -3
- package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
- package/dist/bar-chart/root/bar-chart-root.js +17 -4
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
- package/dist/button/root/button-root.d.ts +10 -1
- package/dist/button/root/button-root.js +3 -2
- package/dist/button-group/root/button-group-root.d.ts +3 -0
- package/dist/button-group/root/button-group-root.js +2 -2
- package/dist/callout/root/callout-root.d.ts +16 -2
- package/dist/callout/root/callout-root.js +16 -4
- package/dist/canvas/describe.d.ts +10 -0
- package/dist/canvas/describe.js +9 -0
- package/dist/canvas/neighbor.d.ts +17 -0
- package/dist/canvas/neighbor.js +1 -0
- package/dist/canvas/node/canvas-node.js +3 -2
- package/dist/canvas/root/canvas-root.d.ts +65 -8
- package/dist/canvas/root/canvas-root.js +115 -49
- package/dist/carousel/root/carousel-root.d.ts +5 -0
- package/dist/carousel/root/carousel-root.js +16 -5
- package/dist/chat/composer/chat-composer.d.ts +5 -0
- package/dist/chat/composer/chat-composer.js +4 -1
- package/dist/chat/message/chat-message.d.ts +9 -5
- package/dist/chat/message/chat-message.js +8 -4
- package/dist/chat/naming.js +2 -2
- package/dist/chat/root/chat-root.d.ts +27 -1
- package/dist/chat/root/chat-root.js +37 -9
- package/dist/checkbox/root/checkbox-root.d.ts +11 -0
- package/dist/checkbox/root/checkbox-root.js +8 -2
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +11 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +11 -3
- package/dist/code-block/root/code-block-root.d.ts +12 -2
- package/dist/code-block/root/code-block-root.js +12 -2
- package/dist/color-input/root/color-input-root.d.ts +13 -0
- package/dist/color-input/root/color-input-root.js +18 -5
- package/dist/color-picker/root/color-picker-root.d.ts +19 -3
- package/dist/color-picker/root/color-picker-root.js +47 -13
- package/dist/combobox/root/combobox-root.d.ts +36 -7
- package/dist/combobox/root/combobox-root.js +37 -12
- package/dist/command/root/command-root.d.ts +15 -6
- package/dist/command/root/command-root.js +9 -4
- package/dist/copy-button/root/copy-button-root.d.ts +5 -0
- package/dist/copy-button/root/copy-button-root.js +7 -2
- package/dist/data-table/root/data-table-root.d.ts +171 -29
- package/dist/data-table/root/data-table-root.js +268 -118
- package/dist/date-input/root/date-input-root.d.ts +32 -9
- package/dist/date-input/root/date-input-root.js +66 -44
- package/dist/date-picker/root/date-picker-root.d.ts +38 -15
- package/dist/date-picker/root/date-picker-root.js +52 -33
- package/dist/dialog/root/dialog-root.d.ts +12 -1
- package/dist/dialog/root/dialog-root.js +11 -4
- package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
- package/dist/donut-chart/root/donut-chart-root.js +8 -5
- package/dist/drawer/root/drawer-root.d.ts +12 -1
- package/dist/drawer/root/drawer-root.js +9 -2
- package/dist/drilldown/root/drilldown-root.d.ts +5 -0
- package/dist/drilldown/root/drilldown-root.js +4 -1
- package/dist/element-events.generated.js +25 -3
- package/dist/file-input/root/file-input-root.d.ts +18 -3
- package/dist/file-input/root/file-input-root.js +34 -17
- package/dist/filter-input/chip/filter-chip.d.ts +13 -0
- package/dist/filter-input/chip/filter-chip.js +6 -1
- package/dist/filter-input/menu/filter-menu.d.ts +5 -0
- package/dist/filter-input/menu/filter-menu.js +3 -1
- package/dist/filter-input/root/filter-input-root.d.ts +20 -3
- package/dist/filter-input/root/filter-input-root.js +8 -4
- package/dist/format-date/root/format-date-root.d.ts +20 -2
- package/dist/format-date/root/format-date-root.js +5 -2
- package/dist/graph/root/graph-model.d.ts +11 -0
- package/dist/graph/root/graph-model.js +4 -0
- package/dist/graph/root/graph-root.d.ts +78 -9
- package/dist/graph/root/graph-root.js +124 -27
- package/dist/heatmap/root/heatmap-root.d.ts +25 -4
- package/dist/heatmap/root/heatmap-root.js +27 -7
- package/dist/icon-button/root/icon-button-root.d.ts +5 -0
- package/dist/icon-button/root/icon-button-root.js +1 -0
- package/dist/input/root/input-root.d.ts +5 -0
- package/dist/input/root/input-root.js +4 -1
- package/dist/lightbox/root/lightbox-root.d.ts +14 -4
- package/dist/lightbox/root/lightbox-root.js +25 -7
- package/dist/line-chart/root/line-chart-root.d.ts +5 -0
- package/dist/line-chart/root/line-chart-root.js +4 -2
- package/dist/list/item/list-item.d.ts +32 -0
- package/dist/list/item/list-item.js +34 -7
- package/dist/list/root/list-root.d.ts +87 -0
- package/dist/list/root/list-root.js +112 -2
- package/dist/listbox/reorder/index.d.ts +1 -0
- package/dist/listbox/reorder/index.js +4 -0
- package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
- package/dist/listbox/reorder/listbox-reorder.js +151 -0
- package/dist/listbox/root/listbox-root.d.ts +68 -11
- package/dist/listbox/root/listbox-root.js +41 -9
- package/dist/loader/root/loader-root.d.ts +5 -0
- package/dist/loader/root/loader-root.js +3 -1
- package/dist/map/area/map-area.d.ts +5 -0
- package/dist/map/area/map-area.js +3 -1
- package/dist/map/buildings/map-buildings.d.ts +5 -0
- package/dist/map/buildings/map-buildings.js +3 -1
- package/dist/map/contours/map-contours.d.ts +5 -0
- package/dist/map/contours/map-contours.js +3 -1
- package/dist/map/landcover/map-landcover.d.ts +5 -0
- package/dist/map/landcover/map-landcover.js +3 -1
- package/dist/map/marker/map-marker.d.ts +16 -1
- package/dist/map/marker/map-marker.js +13 -5
- package/dist/map/points/map-points.d.ts +5 -0
- package/dist/map/points/map-points.js +6 -4
- package/dist/map/position/map-position.d.ts +5 -0
- package/dist/map/position/map-position.js +3 -1
- package/dist/map/raster/map-raster.d.ts +5 -0
- package/dist/map/raster/map-raster.js +3 -1
- package/dist/map/root/map-root.d.ts +33 -14
- package/dist/map/root/map-root.js +59 -22
- package/dist/map/route/map-route.d.ts +5 -0
- package/dist/map/route/map-route.js +3 -1
- package/dist/map/terrain/map-terrain.d.ts +5 -0
- package/dist/map/terrain/map-terrain.js +3 -1
- package/dist/menu/root/menu-root.d.ts +5 -0
- package/dist/menu/root/menu-root.js +3 -1
- package/dist/meter/root/meter-root.d.ts +16 -3
- package/dist/meter/root/meter-root.js +12 -5
- package/dist/navigation/root/navigation-root.d.ts +5 -0
- package/dist/navigation/root/navigation-root.js +3 -1
- package/dist/notifications/notification/notification.d.ts +5 -0
- package/dist/notifications/notification/notification.js +3 -1
- package/dist/notifications/root/notifications-root.d.ts +8 -0
- package/dist/notifications/root/notifications-root.js +10 -2
- package/dist/number-input/root/number-input-root.d.ts +21 -8
- package/dist/number-input/root/number-input-root.js +26 -11
- package/dist/object-inspector/root/object-inspector-root.d.ts +51 -12
- package/dist/object-inspector/root/object-inspector-root.js +21 -20
- package/dist/outline/root/outline-root.d.ts +5 -0
- package/dist/outline/root/outline-root.js +3 -1
- package/dist/pagination/root/pagination-root.d.ts +7 -1
- package/dist/pagination/root/pagination-root.js +16 -7
- package/dist/pagination/size/pagination-size.d.ts +7 -3
- package/dist/pagination/size/pagination-size.js +4 -2
- package/dist/pagination/summary/pagination-summary.d.ts +8 -6
- package/dist/pagination/summary/pagination-summary.js +4 -9
- package/dist/pin-input/code.d.ts +6 -6
- package/dist/pin-input/code.js +1 -5
- package/dist/pin-input/root/pin-input-root.d.ts +9 -3
- package/dist/pin-input/root/pin-input-root.js +6 -2
- package/dist/popover/root/popover-root.d.ts +12 -2
- package/dist/popover/root/popover-root.js +10 -4
- package/dist/progress/root/progress-root.d.ts +7 -2
- package/dist/progress/root/progress-root.js +5 -2
- package/dist/qr-code/name.d.ts +3 -2
- package/dist/qr-code/name.js +2 -2
- package/dist/qr-code/root/qr-code-root.d.ts +12 -2
- package/dist/qr-code/root/qr-code-root.js +9 -2
- package/dist/radio/group/radio-group.d.ts +11 -0
- package/dist/radio/group/radio-group.js +8 -2
- package/dist/rating/root/rating-root.d.ts +12 -1
- package/dist/rating/root/rating-root.js +10 -3
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +20 -2
- package/dist/scatter-chart/root/scatter-chart-root.js +20 -5
- package/dist/select/root/select-root.d.ts +11 -0
- package/dist/select/root/select-root.js +13 -3
- package/dist/skip-link/root/skip-link-root.d.ts +5 -0
- package/dist/skip-link/root/skip-link-root.js +3 -1
- package/dist/slider/root/slider-root.d.ts +7 -2
- package/dist/slider/root/slider-root.js +11 -5
- package/dist/sparkline/readings.d.ts +15 -5
- package/dist/sparkline/readings.js +3 -3
- package/dist/sparkline/root/sparkline-root.d.ts +9 -4
- package/dist/sparkline/root/sparkline-root.js +9 -3
- package/dist/speed-dial/root/speed-dial-root.d.ts +5 -0
- package/dist/speed-dial/root/speed-dial-root.js +4 -1
- package/dist/splitter/root/splitter-root.d.ts +6 -1
- package/dist/splitter/root/splitter-root.js +9 -4
- package/dist/steps/root/steps-root.d.ts +9 -2
- package/dist/steps/root/steps-root.js +6 -3
- package/dist/steps/step/step.d.ts +12 -0
- package/dist/steps/step/step.js +11 -2
- package/dist/switch/root/switch-root.d.ts +11 -0
- package/dist/switch/root/switch-root.js +8 -2
- package/dist/table/column/table-column.d.ts +11 -4
- package/dist/table/column/table-column.js +15 -10
- package/dist/table/grid-controller.d.ts +8 -3
- package/dist/table/grid-controller.js +17 -11
- package/dist/table/root/table-root.d.ts +107 -5
- package/dist/table/root/table-root.js +122 -20
- package/dist/table/row/table-row.d.ts +42 -0
- package/dist/table/row/table-row.js +40 -1
- package/dist/tabs/root/tabs-root.d.ts +5 -0
- package/dist/tabs/root/tabs-root.js +3 -1
- package/dist/tag/group/tag-group.d.ts +5 -0
- package/dist/tag/group/tag-group.js +3 -1
- package/dist/tag/root/tag-root.d.ts +14 -1
- package/dist/tag/root/tag-root.js +11 -8
- package/dist/textarea/root/textarea-root.d.ts +5 -0
- package/dist/textarea/root/textarea-root.js +3 -1
- package/dist/time-input/root/time-input-root.d.ts +14 -7
- package/dist/time-input/root/time-input-root.js +43 -32
- package/dist/time-picker/root/time-picker-root.d.ts +15 -7
- package/dist/time-picker/root/time-picker-root.js +25 -12
- package/dist/toast/item/toast-item.d.ts +7 -0
- package/dist/toast/item/toast-item.js +1 -0
- package/dist/toast/root/toast-root.d.ts +9 -1
- package/dist/toast/root/toast-root.js +5 -4
- package/dist/toolbar/root/toolbar-root.d.ts +5 -0
- package/dist/toolbar/root/toolbar-root.js +5 -2
- package/dist/tooltip/root/tooltip-root.d.ts +27 -17
- package/dist/tour/root/tour-root.d.ts +8 -2
- package/dist/tour/root/tour-root.js +4 -2
- package/dist/tour/stop/tour-stop.d.ts +5 -0
- package/dist/tour/stop/tour-stop.js +6 -1
- package/dist/tree/grip.d.ts +5 -0
- package/dist/tree/grip.js +1 -0
- package/dist/tree/item/tree-item.d.ts +24 -0
- package/dist/tree/item/tree-item.js +27 -5
- package/dist/tree/root/tree-root.d.ts +66 -1
- package/dist/tree/root/tree-root.js +77 -5
- package/dist/trend/root/trend-root.d.ts +20 -4
- package/dist/trend/root/trend-root.js +20 -5
- package/dist/video/root/video-root.d.ts +12 -3
- package/dist/video/root/video-root.js +41 -14
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
- package/dist/video-playlist/root/video-playlist-root.js +3 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
- package/dist/virtual-list/root/virtual-list-root.js +5 -2
- package/lint.json +1 -1
- package/package.json +7 -6
- package/types/jsx.d.ts +4014 -1862
- package/types/vue.d.ts +1266 -624
- package/types/words.d.ts +3280 -0
- package/dist/toast/hotkey.d.ts +0 -22
- package/dist/toast/hotkey.js +0 -23
|
@@ -51,8 +51,8 @@ import { type Row } from '../rows.js';
|
|
|
51
51
|
* `filter` narrows the tree to the entries whose key or value holds the text,
|
|
52
52
|
* ignoring case, and the branches that lead to them, which it opens. A matched
|
|
53
53
|
* branch keeps everything under it. Each matched row carries `row-match`, and
|
|
54
|
-
* a screen reader hears how many entries matched from `
|
|
55
|
-
* `
|
|
54
|
+
* a screen reader hears how many entries matched from `results-label`.
|
|
55
|
+
* `filterable` adds a field that sets it: typing sends
|
|
56
56
|
* `helix-filter`, which you can cancel, and then `helix-filtered`, and Down
|
|
57
57
|
* moves from the field to the tree.
|
|
58
58
|
*
|
|
@@ -123,6 +123,11 @@ import { type Row } from '../rows.js';
|
|
|
123
123
|
* @cssproperty --object-inspector-level - How deep a row is, from 0 at the root, for indenting it.
|
|
124
124
|
*/
|
|
125
125
|
export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
126
|
+
/**
|
|
127
|
+
* The key this family's words are registered under, its styled tag:
|
|
128
|
+
* `registerWords('de', { 'helix-object-inspector': { copyValueLabel: 'Wert kopieren' } })`.
|
|
129
|
+
*/
|
|
130
|
+
static words: string;
|
|
126
131
|
/**
|
|
127
132
|
* The active row's path, such as `/meta/tags/0`, and the empty string for the
|
|
128
133
|
* root.
|
|
@@ -178,13 +183,33 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
|
178
183
|
* page's markup should not take the page down over a comma.
|
|
179
184
|
*/
|
|
180
185
|
for: string;
|
|
181
|
-
/**
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
/**
|
|
187
|
+
* How an array of one entry counts it, where `items-label` should not say
|
|
188
|
+
* it. `{count}` is the count.
|
|
189
|
+
*
|
|
190
|
+
* @deprecated Write every form in `items-label`, as `{count, plural, one
|
|
191
|
+
* {# item} other {# items}}`. Removed in the next major version.
|
|
192
|
+
*/
|
|
193
|
+
itemLabel?: string;
|
|
194
|
+
/**
|
|
195
|
+
* How an array counts its entries. `{count}` is the count, written in the
|
|
196
|
+
* locale, and each language writes the forms it has: `{count, plural, one
|
|
197
|
+
* {# element} few {# elementy} many {# elementów} other {# elementu}}`.
|
|
198
|
+
*/
|
|
184
199
|
itemsLabel: string;
|
|
185
|
-
/**
|
|
186
|
-
|
|
187
|
-
|
|
200
|
+
/**
|
|
201
|
+
* How an object of one key counts it, where `keys-label` should not say it.
|
|
202
|
+
* `{count}` is the count.
|
|
203
|
+
*
|
|
204
|
+
* @deprecated Write every form in `keys-label`, as `{count, plural, one
|
|
205
|
+
* {# key} other {# keys}}`. Removed in the next major version.
|
|
206
|
+
*/
|
|
207
|
+
keyLabel?: string;
|
|
208
|
+
/**
|
|
209
|
+
* How an object counts its keys. `{count}` is the count, written in the
|
|
210
|
+
* locale, and each language writes the forms it has: `{count, plural, one
|
|
211
|
+
* {# klucz} few {# klucze} many {# kluczy} other {# klucza}}`.
|
|
212
|
+
*/
|
|
188
213
|
keysLabel: string;
|
|
189
214
|
/**
|
|
190
215
|
* Accessible name for the tree, and the text of the header where there is one.
|
|
@@ -204,11 +229,19 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
|
204
229
|
* reach a value.
|
|
205
230
|
*/
|
|
206
231
|
noCopy: boolean;
|
|
207
|
-
/** What a screen reader hears when a filter matches one entry. `{count}` is the count. */
|
|
208
|
-
resultLabel: string;
|
|
209
232
|
/**
|
|
210
|
-
* What a screen reader hears when a filter matches
|
|
211
|
-
*
|
|
233
|
+
* What a screen reader hears when a filter matches one entry, where
|
|
234
|
+
* `results-label` should not say it. `{count}` is the count.
|
|
235
|
+
*
|
|
236
|
+
* @deprecated Write every form in `results-label`, as `{count, plural, one
|
|
237
|
+
* {# result} other {# results}}`. Removed in the next major version.
|
|
238
|
+
*/
|
|
239
|
+
resultLabel?: string;
|
|
240
|
+
/**
|
|
241
|
+
* What a screen reader hears when a filter matches entries. `{count}` is
|
|
242
|
+
* how many, written in the locale, and each language writes the forms it
|
|
243
|
+
* has: `{count, plural, one {# wynik} few {# wyniki} many {# wyników}
|
|
244
|
+
* other {# wyniku}}`.
|
|
212
245
|
*/
|
|
213
246
|
resultsLabel: string;
|
|
214
247
|
/**
|
|
@@ -291,6 +324,12 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
|
291
324
|
/** Opens the branches around each path, where the value has them. */
|
|
292
325
|
private openAround;
|
|
293
326
|
protected willUpdate(changed: PropertyValues): void;
|
|
327
|
+
/**
|
|
328
|
+
* A count in its plural message, `items-label`, `keys-label` or
|
|
329
|
+
* `results-label`, or in the deprecated sentence for one where a page still
|
|
330
|
+
* sets it.
|
|
331
|
+
*/
|
|
332
|
+
private counted;
|
|
294
333
|
/** Says how many entries the filter matched, and nothing for an empty one. */
|
|
295
334
|
private tell;
|
|
296
335
|
protected firstUpdated(changed: PropertyValues): void;
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var HelixHeadlessObjectInspector_1;
|
|
8
|
-
import { AriaForwardController, CopyController, countLabel, customElement, drawStatus, elementById,
|
|
8
|
+
import { AriaForwardController, CopyController, countLabel, customElement, drawStatus, elementById, formatWords, HelixActivateEvent, HelixBeforeActivateEvent, HelixBeforeCloseEvent, HelixBeforeOpenEvent, HelixElement, HelixFilterEvent, HelixFilteredEvent, inlineStep, pageRows, requestChange, StatusController, scrollItemIntoView, scrollRoom, searchableById, Typeahead, treeArrow, VirtualizeController, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
9
9
|
import { caretDown, caretRight } from '@fusion.dev/helix-icons';
|
|
10
10
|
import { html, nothing } from 'lit';
|
|
11
11
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -24,14 +24,11 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
|
|
|
24
24
|
this.filterable = false;
|
|
25
25
|
this.filterLabel = 'Filter';
|
|
26
26
|
this.for = '';
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.keyLabel = '{count} key';
|
|
30
|
-
this.keysLabel = '{count} keys';
|
|
27
|
+
this.itemsLabel = '{count, plural, one {# item} other {# items}}';
|
|
28
|
+
this.keysLabel = '{count, plural, one {# key} other {# keys}}';
|
|
31
29
|
this.label = '';
|
|
32
30
|
this.noCopy = false;
|
|
33
|
-
this.
|
|
34
|
-
this.resultsLabel = '{count} results';
|
|
31
|
+
this.resultsLabel = '{count, plural, one {# result} other {# results}}';
|
|
35
32
|
this.treeLabel = 'Value';
|
|
36
33
|
this.value = undefined;
|
|
37
34
|
this.windowed = false;
|
|
@@ -171,6 +168,7 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
|
|
|
171
168
|
};
|
|
172
169
|
}
|
|
173
170
|
static { HelixHeadlessObjectInspector_1 = this; }
|
|
171
|
+
static { this.words = 'helix-object-inspector'; }
|
|
174
172
|
get active() {
|
|
175
173
|
return this.wanted ?? this.rows[this.cursor]?.path ?? '';
|
|
176
174
|
}
|
|
@@ -239,9 +237,15 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
|
|
|
239
237
|
this.tell();
|
|
240
238
|
}
|
|
241
239
|
}
|
|
240
|
+
counted(which, count) {
|
|
241
|
+
const one = this[`${which}Label`];
|
|
242
|
+
return one
|
|
243
|
+
? countLabel(count, one, this[`${which}sLabel`], wordsLocale(this))
|
|
244
|
+
: formatWords(this, `${which}sLabel`, { count });
|
|
245
|
+
}
|
|
242
246
|
tell() {
|
|
243
247
|
if (this.found) {
|
|
244
|
-
this.status.say(
|
|
248
|
+
this.status.say(this.counted('result', this.found.size));
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
251
|
firstUpdated(changed) {
|
|
@@ -394,18 +398,8 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
|
|
|
394
398
|
if (row.branch) {
|
|
395
399
|
const count = entries(value).length;
|
|
396
400
|
const array = Array.isArray(value);
|
|
397
|
-
const one = new Intl.PluralRules(this.lang || undefined).select(count) === 'one';
|
|
398
|
-
const words = array
|
|
399
|
-
? one
|
|
400
|
-
? this.itemLabel
|
|
401
|
-
: this.itemsLabel
|
|
402
|
-
: one
|
|
403
|
-
? this.keyLabel
|
|
404
|
-
: this.keysLabel;
|
|
405
401
|
return html `<span part="summary">${array ? '[…]' : '{…}'}</span>
|
|
406
|
-
<span part="count" dir="auto"
|
|
407
|
-
>${fillTemplate(words, { count: formatNumbers(this.lang)(count) })}</span
|
|
408
|
-
>`;
|
|
402
|
+
<span part="count" dir="auto">${this.counted(array ? 'item' : 'key', count)}</span>`;
|
|
409
403
|
}
|
|
410
404
|
if (typeof value === 'string') {
|
|
411
405
|
return html `<span part="string" dir="ltr">${JSON.stringify(value)}</span>`;
|
|
@@ -463,7 +457,7 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
|
|
|
463
457
|
tooltip-arrow-left: copy-tooltip-arrow-left, tooltip-arrow-right: copy-tooltip-arrow-right,
|
|
464
458
|
tooltip-arrow-top: copy-tooltip-arrow-top, tooltip-bottom: copy-tooltip-bottom,
|
|
465
459
|
tooltip-left: copy-tooltip-left, tooltip-right: copy-tooltip-right, tooltip-top: copy-tooltip-top"
|
|
466
|
-
label=${row?.key === undefined ? this.copyValueLabel :
|
|
460
|
+
label=${row?.key === undefined ? this.copyValueLabel : formatWords(this, 'copyLabel', { name: row.key })}
|
|
467
461
|
.value=${this.copyable(row)}
|
|
468
462
|
></${this.tag('copy-button')}>`;
|
|
469
463
|
}
|
|
@@ -523,9 +517,11 @@ __decorate([
|
|
|
523
517
|
property()
|
|
524
518
|
], HelixHeadlessObjectInspector.prototype, "active", null);
|
|
525
519
|
__decorate([
|
|
520
|
+
words,
|
|
526
521
|
property({ attribute: 'copy-label' })
|
|
527
522
|
], HelixHeadlessObjectInspector.prototype, "copyLabel", void 0);
|
|
528
523
|
__decorate([
|
|
524
|
+
words,
|
|
529
525
|
property({ attribute: 'copy-value-label' })
|
|
530
526
|
], HelixHeadlessObjectInspector.prototype, "copyValueLabel", void 0);
|
|
531
527
|
__decorate([
|
|
@@ -541,6 +537,7 @@ __decorate([
|
|
|
541
537
|
property({ type: Boolean })
|
|
542
538
|
], HelixHeadlessObjectInspector.prototype, "filterable", void 0);
|
|
543
539
|
__decorate([
|
|
540
|
+
words,
|
|
544
541
|
property({ attribute: 'filter-label' })
|
|
545
542
|
], HelixHeadlessObjectInspector.prototype, "filterLabel", void 0);
|
|
546
543
|
__decorate([
|
|
@@ -550,12 +547,14 @@ __decorate([
|
|
|
550
547
|
property({ attribute: 'item-label' })
|
|
551
548
|
], HelixHeadlessObjectInspector.prototype, "itemLabel", void 0);
|
|
552
549
|
__decorate([
|
|
550
|
+
words,
|
|
553
551
|
property({ attribute: 'items-label' })
|
|
554
552
|
], HelixHeadlessObjectInspector.prototype, "itemsLabel", void 0);
|
|
555
553
|
__decorate([
|
|
556
554
|
property({ attribute: 'key-label' })
|
|
557
555
|
], HelixHeadlessObjectInspector.prototype, "keyLabel", void 0);
|
|
558
556
|
__decorate([
|
|
557
|
+
words,
|
|
559
558
|
property({ attribute: 'keys-label' })
|
|
560
559
|
], HelixHeadlessObjectInspector.prototype, "keysLabel", void 0);
|
|
561
560
|
__decorate([
|
|
@@ -568,9 +567,11 @@ __decorate([
|
|
|
568
567
|
property({ attribute: 'result-label' })
|
|
569
568
|
], HelixHeadlessObjectInspector.prototype, "resultLabel", void 0);
|
|
570
569
|
__decorate([
|
|
570
|
+
words,
|
|
571
571
|
property({ attribute: 'results-label' })
|
|
572
572
|
], HelixHeadlessObjectInspector.prototype, "resultsLabel", void 0);
|
|
573
573
|
__decorate([
|
|
574
|
+
words,
|
|
574
575
|
property({ attribute: 'tree-label' })
|
|
575
576
|
], HelixHeadlessObjectInspector.prototype, "treeLabel", void 0);
|
|
576
577
|
__decorate([
|
|
@@ -56,6 +56,11 @@ import { type Branch } from '../levels.js';
|
|
|
56
56
|
* @csspart nav - The navigation landmark.
|
|
57
57
|
*/
|
|
58
58
|
export declare class HelixHeadlessOutline extends HelixElement {
|
|
59
|
+
/**
|
|
60
|
+
* The key this family's words are registered under, its styled tag:
|
|
61
|
+
* `registerWords('de', { 'helix-outline': { label: 'Auf dieser Seite' } })`.
|
|
62
|
+
*/
|
|
63
|
+
static words: string;
|
|
59
64
|
/**
|
|
60
65
|
* Manual, so each link in a flat run can be put in a list item of its own.
|
|
61
66
|
*
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, elementById, HelixActivateEvent, HelixElement, IndicatorController, plainClick, reflectElements, scrollItemIntoView, scrollingAncestor, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, elementById, HelixActivateEvent, HelixElement, IndicatorController, plainClick, reflectElements, scrollItemIntoView, scrollingAncestor, words, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { levelOf, nest } from '../levels.js';
|
|
@@ -78,6 +78,7 @@ let HelixHeadlessOutline = class HelixHeadlessOutline extends HelixElement {
|
|
|
78
78
|
this.namedByHeading = reflectElements(this.partNamed('nav'), 'ariaLabelledByElements', slot?.assignedElements({ flatten: true }) ?? [], this.namedByHeading);
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
+
static { this.words = 'helix-outline'; }
|
|
81
82
|
static { this.shadowRootOptions = {
|
|
82
83
|
...HelixElement.shadowRootOptions,
|
|
83
84
|
slotAssignment: 'manual',
|
|
@@ -287,6 +288,7 @@ __decorate([
|
|
|
287
288
|
property({ type: Boolean })
|
|
288
289
|
], HelixHeadlessOutline.prototype, "follow", void 0);
|
|
289
290
|
__decorate([
|
|
291
|
+
words,
|
|
290
292
|
property()
|
|
291
293
|
], HelixHeadlessOutline.prototype, "label", void 0);
|
|
292
294
|
__decorate([
|
|
@@ -58,6 +58,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
58
58
|
* @cssstate empty - There is one page or none, so there is nothing to page through.
|
|
59
59
|
*/
|
|
60
60
|
export declare class HelixHeadlessPagination extends HelixElement {
|
|
61
|
+
/**
|
|
62
|
+
* The key this family's words are registered under, its styled tag:
|
|
63
|
+
* `registerWords('de', { 'helix-pagination': { nextLabel: 'Nächste Seite' } })`.
|
|
64
|
+
*/
|
|
65
|
+
static words: string;
|
|
61
66
|
/**
|
|
62
67
|
* How many pages to show at each end, whatever the current one is.
|
|
63
68
|
*/
|
|
@@ -119,7 +124,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
119
124
|
*/
|
|
120
125
|
lastLabel: string;
|
|
121
126
|
/**
|
|
122
|
-
*
|
|
127
|
+
* The locale the words and the page numbers are in, as a BCP 47 tag such as
|
|
128
|
+
* `de`. Empty reads the nearest `lang`, then the browser's language.
|
|
123
129
|
*
|
|
124
130
|
* The same property the calendar takes, doing the same job one layer down:
|
|
125
131
|
* the templates make the *words* the consumer's, and this makes the *numbers*
|
|
@@ -4,13 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, deepActiveElement, fillTemplate, formatNumbers, HelixActivateEvent, HelixElement, HelixNavigateEvent, hostAria, requestChange, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, deepActiveElement, fillTemplate, formatNumbers, formatWords, HelixActivateEvent, HelixElement, HelixNavigateEvent, hostAria, requestChange, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { caretDoubleLeft, caretDoubleRight, caretLeft, caretRight, } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
11
11
|
import { repeat } from 'lit/directives/repeat.js';
|
|
12
12
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
13
|
-
const fill = (template, page, pages
|
|
13
|
+
const fill = (template, page, pages) => fillTemplate(template, { page: String(page), pages: String(pages) });
|
|
14
14
|
let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
@@ -47,6 +47,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
+
static { this.words = 'helix-pagination'; }
|
|
50
51
|
get page() {
|
|
51
52
|
const asked = this.pageState ?? this.defaultPage;
|
|
52
53
|
return Math.min(this.count, Math.max(1, Math.floor(asked) || 1));
|
|
@@ -57,7 +58,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
57
58
|
this.requestUpdate('page', previous);
|
|
58
59
|
}
|
|
59
60
|
get numbers() {
|
|
60
|
-
return formatNumbers(this
|
|
61
|
+
return formatNumbers(wordsLocale(this));
|
|
61
62
|
}
|
|
62
63
|
get count() {
|
|
63
64
|
if (this.pages > 0) {
|
|
@@ -162,13 +163,13 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
162
163
|
}
|
|
163
164
|
if (this.announced !== this.page) {
|
|
164
165
|
this.announced = this.page;
|
|
165
|
-
this.announcement =
|
|
166
|
+
this.announcement = formatWords(this, 'pageLabel', { page: this.page, pages: this.count });
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
renderPage(page) {
|
|
169
170
|
const current = page === this.current;
|
|
170
171
|
const shown = this.numbers(page);
|
|
171
|
-
const name =
|
|
172
|
+
const name = formatWords(this, 'pageLabel', { page, pages: this.count });
|
|
172
173
|
return html `<li part="item">
|
|
173
174
|
${this.href
|
|
174
175
|
? html `<a
|
|
@@ -192,7 +193,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
192
193
|
}
|
|
193
194
|
renderGap(hidden) {
|
|
194
195
|
const to = Math.round((hidden.from + hidden.to) / 2);
|
|
195
|
-
const name =
|
|
196
|
+
const name = formatWords(this, 'gapLabel', { page: to, pages: this.count });
|
|
196
197
|
return html `<li part="item">
|
|
197
198
|
${this.href
|
|
198
199
|
? html `<a
|
|
@@ -283,7 +284,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
|
|
|
283
284
|
if (this.compact) {
|
|
284
285
|
return html `${this.ends ? this.renderFirst() : nothing}${this.renderPrevious()}
|
|
285
286
|
<span part="status"
|
|
286
|
-
>${
|
|
287
|
+
>${formatWords(this, 'statusLabel', { page: this.current, pages: this.count })}</span
|
|
287
288
|
>
|
|
288
289
|
${this.renderNext()}${this.ends ? this.renderLast() : nothing}${this.renderLive()}`;
|
|
289
290
|
}
|
|
@@ -314,30 +315,36 @@ __decorate([
|
|
|
314
315
|
property({ type: Boolean })
|
|
315
316
|
], HelixHeadlessPagination.prototype, "ends", void 0);
|
|
316
317
|
__decorate([
|
|
318
|
+
words,
|
|
317
319
|
property({ attribute: 'first-label' })
|
|
318
320
|
], HelixHeadlessPagination.prototype, "firstLabel", void 0);
|
|
319
321
|
__decorate([
|
|
322
|
+
words,
|
|
320
323
|
property({ attribute: 'gap-label' })
|
|
321
324
|
], HelixHeadlessPagination.prototype, "gapLabel", void 0);
|
|
322
325
|
__decorate([
|
|
323
326
|
property()
|
|
324
327
|
], HelixHeadlessPagination.prototype, "href", void 0);
|
|
325
328
|
__decorate([
|
|
329
|
+
words,
|
|
326
330
|
property()
|
|
327
331
|
], HelixHeadlessPagination.prototype, "label", void 0);
|
|
328
332
|
__decorate([
|
|
333
|
+
words,
|
|
329
334
|
property({ attribute: 'last-label' })
|
|
330
335
|
], HelixHeadlessPagination.prototype, "lastLabel", void 0);
|
|
331
336
|
__decorate([
|
|
332
337
|
property()
|
|
333
338
|
], HelixHeadlessPagination.prototype, "locale", void 0);
|
|
334
339
|
__decorate([
|
|
340
|
+
words,
|
|
335
341
|
property({ attribute: 'next-label' })
|
|
336
342
|
], HelixHeadlessPagination.prototype, "nextLabel", void 0);
|
|
337
343
|
__decorate([
|
|
338
344
|
property({ type: Number })
|
|
339
345
|
], HelixHeadlessPagination.prototype, "page", null);
|
|
340
346
|
__decorate([
|
|
347
|
+
words,
|
|
341
348
|
property({ attribute: 'page-label' })
|
|
342
349
|
], HelixHeadlessPagination.prototype, "pageLabel", void 0);
|
|
343
350
|
__decorate([
|
|
@@ -347,12 +354,14 @@ __decorate([
|
|
|
347
354
|
property({ attribute: 'page-size', type: Number })
|
|
348
355
|
], HelixHeadlessPagination.prototype, "pageSize", void 0);
|
|
349
356
|
__decorate([
|
|
357
|
+
words,
|
|
350
358
|
property({ attribute: 'previous-label' })
|
|
351
359
|
], HelixHeadlessPagination.prototype, "previousLabel", void 0);
|
|
352
360
|
__decorate([
|
|
353
361
|
property({ type: Number })
|
|
354
362
|
], HelixHeadlessPagination.prototype, "siblings", void 0);
|
|
355
363
|
__decorate([
|
|
364
|
+
words,
|
|
356
365
|
property({ attribute: 'status-label' })
|
|
357
366
|
], HelixHeadlessPagination.prototype, "statusLabel", void 0);
|
|
358
367
|
__decorate([
|
|
@@ -80,6 +80,11 @@ import '../../select/index.js';
|
|
|
80
80
|
* @cssstate empty - While there are no sizes to offer.
|
|
81
81
|
*/
|
|
82
82
|
export declare class HelixHeadlessPaginationSize extends HelixFormElement {
|
|
83
|
+
/**
|
|
84
|
+
* The key this part's words are registered under, its styled tag:
|
|
85
|
+
* `registerWords('de', { 'helix-pagination-size': { label: 'Pro Seite' } })`.
|
|
86
|
+
*/
|
|
87
|
+
static words: string;
|
|
83
88
|
/**
|
|
84
89
|
* The size to start on when `value` is not set.
|
|
85
90
|
*/
|
|
@@ -89,9 +94,8 @@ export declare class HelixHeadlessPaginationSize extends HelixFormElement {
|
|
|
89
94
|
*/
|
|
90
95
|
label: string;
|
|
91
96
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* Absent uses the runtime's own.
|
|
97
|
+
* The locale the words and the numbers are in, as a BCP 47 tag such as
|
|
98
|
+
* `de`. Empty reads the nearest `lang`, then the browser's language.
|
|
95
99
|
*/
|
|
96
100
|
locale: string;
|
|
97
101
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, formatNumbers, HelixBeforeChangeEvent, HelixFormElement, hostWords, requestChange, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, formatNumbers, HelixBeforeChangeEvent, HelixFormElement, hostWords, requestChange, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { html } from 'lit/static-html.js';
|
|
@@ -47,6 +47,7 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
47
47
|
event.stopPropagation();
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
+
static { this.words = 'helix-pagination-size'; }
|
|
50
51
|
get value() {
|
|
51
52
|
return this.valueState ?? this.defaultValue;
|
|
52
53
|
}
|
|
@@ -56,7 +57,7 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
|
|
|
56
57
|
this.requestUpdate('value', previous);
|
|
57
58
|
}
|
|
58
59
|
get numbers() {
|
|
59
|
-
return formatNumbers(this
|
|
60
|
+
return formatNumbers(wordsLocale(this));
|
|
60
61
|
}
|
|
61
62
|
get options() {
|
|
62
63
|
return this.sizes
|
|
@@ -129,6 +130,7 @@ __decorate([
|
|
|
129
130
|
property({ attribute: 'default-value', type: Number })
|
|
130
131
|
], HelixHeadlessPaginationSize.prototype, "defaultValue", void 0);
|
|
131
132
|
__decorate([
|
|
133
|
+
words,
|
|
132
134
|
property()
|
|
133
135
|
], HelixHeadlessPaginationSize.prototype, "label", void 0);
|
|
134
136
|
__decorate([
|
|
@@ -21,9 +21,14 @@ import { type TemplateResult } from 'lit';
|
|
|
21
21
|
* @documentation https://fusion.dev/helix/components/pagination
|
|
22
22
|
*/
|
|
23
23
|
export declare class HelixHeadlessPaginationSummary extends HelixElement {
|
|
24
|
+
/**
|
|
25
|
+
* The key this part's words are registered under, its styled tag:
|
|
26
|
+
* `registerWords('de', { 'helix-pagination-summary': { format: '{from} bis {to} von {total}' } })`.
|
|
27
|
+
*/
|
|
28
|
+
static words: string;
|
|
24
29
|
/**
|
|
25
30
|
* The text shown. `{from}`, `{to}`, and `{total}` are replaced with the first
|
|
26
|
-
* item, the last item, and the item count.
|
|
31
|
+
* item, the last item, and the item count, written in the locale.
|
|
27
32
|
*
|
|
28
33
|
* A template rather than a prefix and a suffix, because word order is not
|
|
29
34
|
* universal: `format="{total} 件中 {from}-{to} 件"` is one attribute here and
|
|
@@ -39,9 +44,8 @@ export declare class HelixHeadlessPaginationSummary extends HelixElement {
|
|
|
39
44
|
*/
|
|
40
45
|
format: string;
|
|
41
46
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Absent uses the runtime's own.
|
|
47
|
+
* The locale the words and the numbers are in, as a BCP 47 tag such as
|
|
48
|
+
* `de`. Empty reads the nearest `lang`, then the browser's language.
|
|
45
49
|
*/
|
|
46
50
|
locale: string;
|
|
47
51
|
/**
|
|
@@ -56,8 +60,6 @@ export declare class HelixHeadlessPaginationSummary extends HelixElement {
|
|
|
56
60
|
* How many items there are across every page.
|
|
57
61
|
*/
|
|
58
62
|
total: number;
|
|
59
|
-
/** Held across every component asking for the same locale. */
|
|
60
|
-
private get numbers();
|
|
61
63
|
protected render(): TemplateResult;
|
|
62
64
|
}
|
|
63
65
|
declare global {
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement,
|
|
7
|
+
import { customElement, formatWords, HelixElement, words } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extends HelixElement {
|
|
@@ -16,9 +16,7 @@ let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extend
|
|
|
16
16
|
this.pageSize = 0;
|
|
17
17
|
this.total = 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
return formatNumbers(this.locale);
|
|
21
|
-
}
|
|
19
|
+
static { this.words = 'helix-pagination-summary'; }
|
|
22
20
|
render() {
|
|
23
21
|
if (this.total <= 0 || this.pageSize <= 0) {
|
|
24
22
|
return html ``;
|
|
@@ -28,14 +26,11 @@ let HelixHeadlessPaginationSummary = class HelixHeadlessPaginationSummary extend
|
|
|
28
26
|
const page = Math.min(pages, Math.max(1, Math.floor(this.page) || 1));
|
|
29
27
|
const from = (page - 1) * size + 1;
|
|
30
28
|
const to = Math.min(this.total, from + size - 1);
|
|
31
|
-
return html `${
|
|
32
|
-
from: this.numbers(from),
|
|
33
|
-
to: this.numbers(to),
|
|
34
|
-
total: this.numbers(this.total),
|
|
35
|
-
})}`;
|
|
29
|
+
return html `${formatWords(this, 'format', { from, to, total: this.total })}`;
|
|
36
30
|
}
|
|
37
31
|
};
|
|
38
32
|
__decorate([
|
|
33
|
+
words,
|
|
39
34
|
property()
|
|
40
35
|
], HelixHeadlessPaginationSummary.prototype, "format", void 0);
|
|
41
36
|
__decorate([
|
package/dist/pin-input/code.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PickerVerdict } from '@fusion.dev/helix-core';
|
|
2
2
|
/** What a box accepts, which decides the keyboard a phone offers. */
|
|
3
3
|
export type PinType = 'alphanumeric' | 'numeric' | 'text';
|
|
4
4
|
/** How typed letters are cased: as typed, or turned upper or lower case. */
|
|
@@ -36,18 +36,18 @@ export declare const readTyped: (raw: string, caret: number, type: PinType, lett
|
|
|
36
36
|
* holding two fill from box three.
|
|
37
37
|
*/
|
|
38
38
|
export declare const overwriteCode: (code: string, at: number, text: string, count: number) => CodeEdit;
|
|
39
|
-
/** The messages a code's verdict is written with
|
|
39
|
+
/** The messages a code's verdict is written with. */
|
|
40
40
|
export interface CodeMessages {
|
|
41
41
|
/** For a code with no characters in a required field. */
|
|
42
42
|
missing?: string | undefined;
|
|
43
|
-
/** For a code with fewer characters than boxes
|
|
44
|
-
short
|
|
43
|
+
/** For a code with fewer characters than boxes, written for how many there are. */
|
|
44
|
+
short: (length: number) => string;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* What is wrong with a code, as a picker field reports it: a required field
|
|
48
48
|
* with nothing in it is missing, a code with fewer characters than boxes is
|
|
49
|
-
* too short, and anything else is fine (`''`). The platform's own words
|
|
50
|
-
* the page set none.
|
|
49
|
+
* too short, and anything else is fine (`''`). The platform's own words for a
|
|
50
|
+
* missing code where the page set none.
|
|
51
51
|
*/
|
|
52
52
|
export declare const codeVerdict: (code: string, count: number, required: boolean, messages: CodeMessages) => PickerVerdict;
|
|
53
53
|
/**
|
package/dist/pin-input/code.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fillTemplate } from '@fusion.dev/helix-core';
|
|
2
1
|
export const cleanCode = (text, type, letterCase = 'preserve') => {
|
|
3
2
|
const trimmed = text.trim();
|
|
4
3
|
const kept = type === 'numeric'
|
|
@@ -29,10 +28,7 @@ export const codeVerdict = (code, count, required, messages) => {
|
|
|
29
28
|
return ['valueMissing', messages.missing || 'Please fill in this field.'];
|
|
30
29
|
}
|
|
31
30
|
if (code !== '' && code.length < count) {
|
|
32
|
-
return [
|
|
33
|
-
'tooShort',
|
|
34
|
-
fillTemplate(messages.short || 'Please enter all {length} characters.', { length: count }),
|
|
35
|
-
];
|
|
31
|
+
return ['tooShort', messages.short(count)];
|
|
36
32
|
}
|
|
37
33
|
return '';
|
|
38
34
|
};
|
|
@@ -84,6 +84,11 @@ declare const HelixHeadlessPinInput_base: (new (...args: any[]) => import("@fusi
|
|
|
84
84
|
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
85
85
|
*/
|
|
86
86
|
export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
87
|
+
/**
|
|
88
|
+
* The key this family's words are registered under, its styled tag:
|
|
89
|
+
* `registerWords('de', { 'helix-pin-input': { tooShortMessage: '{length, plural, one {Bitte # Zeichen eingeben.} other {Bitte alle # Zeichen eingeben.}}' } })`.
|
|
90
|
+
*/
|
|
91
|
+
static words: string;
|
|
87
92
|
protected readonly aria: AriaForwardController;
|
|
88
93
|
/** Typed or pasted, so every edit is announced. See `announcesInput`. */
|
|
89
94
|
protected readonly announcesInput = true;
|
|
@@ -144,10 +149,11 @@ export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
|
|
|
144
149
|
*/
|
|
145
150
|
readOnly: boolean;
|
|
146
151
|
/**
|
|
147
|
-
* The message shown when the code is started and not finished
|
|
148
|
-
*
|
|
152
|
+
* The message shown when the code is started and not finished. `{length}`
|
|
153
|
+
* is how many characters the code has, written in the locale, and each
|
|
154
|
+
* language writes the forms it has.
|
|
149
155
|
*/
|
|
150
|
-
tooShortMessage
|
|
156
|
+
tooShortMessage: string;
|
|
151
157
|
/**
|
|
152
158
|
* The characters a box accepts, which also sets the keyboard a phone shows.
|
|
153
159
|
*
|