@slotted/angular 0.0.0-stage → 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +51 -2
- package/docs/AGENTS.snippet.md +10 -0
- package/docs/accordion.json +345 -0
- package/docs/accordion.md +207 -0
- package/docs/action-bar.json +421 -0
- package/docs/action-bar.md +364 -0
- package/docs/action-sheet.json +210 -0
- package/docs/action-sheet.md +19 -0
- package/docs/alert.json +407 -0
- package/docs/alert.md +239 -0
- package/docs/app-shell.examples.md +349 -0
- package/docs/app-shell.json +835 -0
- package/docs/app-shell.md +214 -0
- package/docs/aspect-ratio.json +159 -0
- package/docs/aspect-ratio.md +134 -0
- package/docs/attachment.json +486 -0
- package/docs/attachment.md +253 -0
- package/docs/avatar-group.json +208 -0
- package/docs/avatar-group.md +130 -0
- package/docs/avatar.json +342 -0
- package/docs/avatar.md +142 -0
- package/docs/badge.json +334 -0
- package/docs/badge.md +138 -0
- package/docs/breadcrumb.json +368 -0
- package/docs/breadcrumb.md +237 -0
- package/docs/button-group.json +158 -0
- package/docs/button-group.md +72 -0
- package/docs/button.examples.md +621 -0
- package/docs/button.json +977 -0
- package/docs/button.md +200 -0
- package/docs/calendar.json +592 -0
- package/docs/calendar.md +242 -0
- package/docs/card.json +283 -0
- package/docs/card.md +130 -0
- package/docs/carousel.json +560 -0
- package/docs/carousel.md +357 -0
- package/docs/cascader.json +933 -0
- package/docs/cascader.md +379 -0
- package/docs/chart.examples.md +582 -0
- package/docs/chart.json +1359 -0
- package/docs/chart.md +187 -0
- package/docs/checkbox-group.examples.md +612 -0
- package/docs/checkbox-group.json +395 -0
- package/docs/checkbox-group.md +106 -0
- package/docs/checkbox.examples.md +546 -0
- package/docs/checkbox.json +506 -0
- package/docs/checkbox.md +104 -0
- package/docs/code-block.json +616 -0
- package/docs/code-block.md +303 -0
- package/docs/collapsible.json +456 -0
- package/docs/collapsible.md +261 -0
- package/docs/color-picker.json +523 -0
- package/docs/color-picker.md +201 -0
- package/docs/column-manager.json +486 -0
- package/docs/column-manager.md +277 -0
- package/docs/combobox.examples.md +1732 -0
- package/docs/combobox.json +1250 -0
- package/docs/combobox.md +209 -0
- package/docs/command-palette.json +800 -0
- package/docs/command-palette.md +419 -0
- package/docs/container.json +156 -0
- package/docs/container.md +92 -0
- package/docs/context-menu.json +231 -0
- package/docs/context-menu.md +176 -0
- package/docs/currency-field.examples.md +321 -0
- package/docs/currency-field.json +649 -0
- package/docs/currency-field.md +128 -0
- package/docs/dashboard-grid.json +680 -0
- package/docs/dashboard-grid.md +265 -0
- package/docs/data-grid.examples.md +3064 -0
- package/docs/data-grid.json +1577 -0
- package/docs/data-grid.md +237 -0
- package/docs/data-grid.props.md +81 -0
- package/docs/data-list.json +685 -0
- package/docs/data-list.md +327 -0
- package/docs/date-field.json +490 -0
- package/docs/date-field.md +235 -0
- package/docs/date-picker.examples.md +1226 -0
- package/docs/date-picker.json +696 -0
- package/docs/date-picker.md +121 -0
- package/docs/date-range-picker.examples.md +1300 -0
- package/docs/date-range-picker.json +903 -0
- package/docs/date-range-picker.md +142 -0
- package/docs/datetime-field.json +665 -0
- package/docs/datetime-field.md +337 -0
- package/docs/datetime-picker.examples.md +1269 -0
- package/docs/datetime-picker.json +928 -0
- package/docs/datetime-picker.md +150 -0
- package/docs/datetime-range-picker.examples.md +225 -0
- package/docs/datetime-range-picker.json +1015 -0
- package/docs/datetime-range-picker.md +162 -0
- package/docs/description-list.json +471 -0
- package/docs/description-list.md +268 -0
- package/docs/detail-panel.json +530 -0
- package/docs/detail-panel.md +361 -0
- package/docs/dialog.examples.md +2467 -0
- package/docs/dialog.json +1141 -0
- package/docs/dialog.md +217 -0
- package/docs/dialog.props.md +63 -0
- package/docs/divider.json +148 -0
- package/docs/divider.md +83 -0
- package/docs/drawer.examples.md +1929 -0
- package/docs/drawer.json +753 -0
- package/docs/drawer.md +199 -0
- package/docs/entity-picker.json +946 -0
- package/docs/entity-picker.md +365 -0
- package/docs/event-calendar.examples.md +308 -0
- package/docs/event-calendar.json +1202 -0
- package/docs/event-calendar.md +201 -0
- package/docs/field-group.json +333 -0
- package/docs/field-group.md +181 -0
- package/docs/field.examples.md +676 -0
- package/docs/field.json +528 -0
- package/docs/field.md +127 -0
- package/docs/filter-bar.json +817 -0
- package/docs/filter-bar.md +380 -0
- package/docs/form.json +378 -0
- package/docs/form.md +235 -0
- package/docs/fullscreen.json +395 -0
- package/docs/fullscreen.md +225 -0
- package/docs/grid.json +176 -0
- package/docs/grid.md +74 -0
- package/docs/highlight.json +279 -0
- package/docs/highlight.md +210 -0
- package/docs/hover-card.json +254 -0
- package/docs/hover-card.md +213 -0
- package/docs/icon.json +173 -0
- package/docs/icon.md +101 -0
- package/docs/image.json +476 -0
- package/docs/image.md +254 -0
- package/docs/import-export-center.json +836 -0
- package/docs/import-export-center.md +345 -0
- package/docs/index.md +141 -0
- package/docs/inline-message.json +312 -0
- package/docs/inline-message.md +191 -0
- package/docs/inline.json +149 -0
- package/docs/inline.md +72 -0
- package/docs/kbd.json +350 -0
- package/docs/kbd.md +210 -0
- package/docs/link.json +264 -0
- package/docs/link.md +167 -0
- package/docs/list-item.json +463 -0
- package/docs/list-item.md +236 -0
- package/docs/list.json +321 -0
- package/docs/list.md +185 -0
- package/docs/listbox.json +807 -0
- package/docs/listbox.md +413 -0
- package/docs/loading-overlay.json +440 -0
- package/docs/loading-overlay.md +248 -0
- package/docs/markdown.json +461 -0
- package/docs/markdown.md +266 -0
- package/docs/menu.examples.md +1651 -0
- package/docs/menu.json +922 -0
- package/docs/menu.md +155 -0
- package/docs/menubar.json +292 -0
- package/docs/menubar.md +173 -0
- package/docs/message-scroller.json +401 -0
- package/docs/message-scroller.md +212 -0
- package/docs/message.json +862 -0
- package/docs/message.md +473 -0
- package/docs/multi-select.examples.md +1922 -0
- package/docs/multi-select.json +1314 -0
- package/docs/multi-select.md +213 -0
- package/docs/navigation-menu.json +529 -0
- package/docs/navigation-menu.md +329 -0
- package/docs/notification-center.json +664 -0
- package/docs/notification-center.md +372 -0
- package/docs/number-field.examples.md +1078 -0
- package/docs/number-field.json +668 -0
- package/docs/number-field.md +137 -0
- package/docs/otp-input.json +479 -0
- package/docs/otp-input.md +291 -0
- package/docs/page-header.json +574 -0
- package/docs/page-header.md +338 -0
- package/docs/page.json +332 -0
- package/docs/page.md +184 -0
- package/docs/pagination.json +434 -0
- package/docs/pagination.md +238 -0
- package/docs/popover.examples.md +1235 -0
- package/docs/popover.json +656 -0
- package/docs/popover.md +199 -0
- package/docs/progress-indicator.json +501 -0
- package/docs/progress-indicator.md +329 -0
- package/docs/prompt-composer.json +498 -0
- package/docs/prompt-composer.md +278 -0
- package/docs/prose.json +357 -0
- package/docs/prose.md +226 -0
- package/docs/radio-group.examples.md +626 -0
- package/docs/radio-group.json +541 -0
- package/docs/radio-group.md +112 -0
- package/docs/rating.json +1053 -0
- package/docs/rating.md +435 -0
- package/docs/result-state.json +376 -0
- package/docs/result-state.md +286 -0
- package/docs/saved-views.json +384 -0
- package/docs/saved-views.md +242 -0
- package/docs/scroll-area.json +120 -0
- package/docs/scroll-area.md +8 -0
- package/docs/section.json +344 -0
- package/docs/section.md +208 -0
- package/docs/segmented-control.json +429 -0
- package/docs/segmented-control.md +240 -0
- package/docs/select.examples.md +1214 -0
- package/docs/select.json +1147 -0
- package/docs/select.md +199 -0
- package/docs/side-navigation.json +632 -0
- package/docs/side-navigation.md +430 -0
- package/docs/skeleton.json +358 -0
- package/docs/skeleton.md +223 -0
- package/docs/slider.json +522 -0
- package/docs/slider.md +261 -0
- package/docs/sparkline.json +426 -0
- package/docs/sparkline.md +206 -0
- package/docs/split-button.json +361 -0
- package/docs/split-button.md +275 -0
- package/docs/splitter.json +142 -0
- package/docs/splitter.md +14 -0
- package/docs/stack.json +135 -0
- package/docs/stack.md +74 -0
- package/docs/stat-card.json +529 -0
- package/docs/stat-card.md +270 -0
- package/docs/status-indicator.json +314 -0
- package/docs/status-indicator.md +197 -0
- package/docs/stepper.json +451 -0
- package/docs/stepper.md +250 -0
- package/docs/switch.json +451 -0
- package/docs/switch.md +508 -0
- package/docs/table-of-contents.json +553 -0
- package/docs/table-of-contents.md +289 -0
- package/docs/table.examples.md +1981 -0
- package/docs/table.json +1059 -0
- package/docs/table.md +290 -0
- package/docs/tabs.examples.md +1370 -0
- package/docs/tabs.json +661 -0
- package/docs/tabs.md +211 -0
- package/docs/tag.json +813 -0
- package/docs/tag.md +241 -0
- package/docs/tags-input.json +771 -0
- package/docs/tags-input.md +361 -0
- package/docs/text-field.examples.md +821 -0
- package/docs/text-field.json +604 -0
- package/docs/text-field.md +125 -0
- package/docs/textarea.examples.md +612 -0
- package/docs/textarea.json +440 -0
- package/docs/textarea.md +98 -0
- package/docs/time-field.json +584 -0
- package/docs/time-field.md +291 -0
- package/docs/time-picker.json +679 -0
- package/docs/time-picker.md +315 -0
- package/docs/time-range-picker.examples.md +191 -0
- package/docs/time-range-picker.json +924 -0
- package/docs/time-range-picker.md +152 -0
- package/docs/timeline.json +839 -0
- package/docs/timeline.md +401 -0
- package/docs/toast.json +642 -0
- package/docs/toast.md +311 -0
- package/docs/toggle-group.json +417 -0
- package/docs/toggle-group.md +255 -0
- package/docs/toggle.json +326 -0
- package/docs/toggle.md +222 -0
- package/docs/toolbar.json +380 -0
- package/docs/toolbar.md +240 -0
- package/docs/tooltip.examples.md +664 -0
- package/docs/tooltip.json +604 -0
- package/docs/tooltip.md +146 -0
- package/docs/top-navigation.examples.md +287 -0
- package/docs/top-navigation.json +648 -0
- package/docs/top-navigation.md +138 -0
- package/docs/tour.json +759 -0
- package/docs/tour.md +337 -0
- package/docs/transfer.json +746 -0
- package/docs/transfer.md +273 -0
- package/docs/tree.json +918 -0
- package/docs/tree.md +397 -0
- package/docs/typography.json +317 -0
- package/docs/typography.md +107 -0
- package/docs/upload.examples.md +358 -0
- package/docs/upload.json +1103 -0
- package/docs/upload.md +166 -0
- package/docs/visually-hidden.json +71 -0
- package/docs/visually-hidden.md +42 -0
- package/docs/wizard.json +724 -0
- package/docs/wizard.md +295 -0
- package/fesm2022/slotted-angular-accordion.mjs +247 -0
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-bar.mjs +639 -0
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-sheet.mjs +749 -0
- package/fesm2022/slotted-angular-action-sheet.mjs.map +1 -0
- package/fesm2022/slotted-angular-alert.mjs +427 -0
- package/fesm2022/slotted-angular-alert.mjs.map +1 -0
- package/fesm2022/slotted-angular-app-shell.mjs +1334 -0
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs +63 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs.map +1 -0
- package/fesm2022/slotted-angular-attachment.mjs +595 -0
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar-group.mjs +230 -0
- package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar.mjs +330 -0
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -0
- package/fesm2022/slotted-angular-badge.mjs +255 -0
- package/fesm2022/slotted-angular-badge.mjs.map +1 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs +544 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -0
- package/fesm2022/slotted-angular-button-group.mjs +146 -0
- package/fesm2022/slotted-angular-button-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-button.mjs +692 -0
- package/fesm2022/slotted-angular-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-calendar.mjs +916 -0
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-card.mjs +225 -0
- package/fesm2022/slotted-angular-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-carousel.mjs +840 -0
- package/fesm2022/slotted-angular-carousel.mjs.map +1 -0
- package/fesm2022/slotted-angular-cascader.mjs +1839 -0
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -0
- package/fesm2022/slotted-angular-chart.mjs +974 -0
- package/fesm2022/slotted-angular-chart.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs +283 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox.mjs +468 -0
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-code-block.mjs +476 -0
- package/fesm2022/slotted-angular-code-block.mjs.map +1 -0
- package/fesm2022/slotted-angular-collapsible.mjs +479 -0
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -0
- package/fesm2022/slotted-angular-color-picker.mjs +910 -0
- package/fesm2022/slotted-angular-color-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-column-manager.mjs +1037 -0
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -0
- package/fesm2022/slotted-angular-combobox.mjs +1480 -0
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -0
- package/fesm2022/slotted-angular-command-palette.mjs +1283 -0
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -0
- package/fesm2022/slotted-angular-container.mjs +105 -0
- package/fesm2022/slotted-angular-container.mjs.map +1 -0
- package/fesm2022/slotted-angular-context-menu.mjs +221 -0
- package/fesm2022/slotted-angular-context-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-currency-field.mjs +1131 -0
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs +1928 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-grid.mjs +6697 -0
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-list.mjs +1418 -0
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-field.mjs +772 -0
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-picker.mjs +690 -0
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs +1150 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-field.mjs +1058 -0
- package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs +1362 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1872 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-description-list.mjs +545 -0
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-detail-panel.mjs +754 -0
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -0
- package/fesm2022/slotted-angular-dialog.mjs +980 -0
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -0
- package/fesm2022/slotted-angular-divider.mjs +76 -0
- package/fesm2022/slotted-angular-divider.mjs.map +1 -0
- package/fesm2022/slotted-angular-drawer.mjs +1397 -0
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -0
- package/fesm2022/slotted-angular-entity-picker.mjs +1987 -0
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-event-calendar.mjs +2934 -0
- package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-field-group.mjs +301 -0
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-field.mjs +928 -0
- package/fesm2022/slotted-angular-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-filter-bar.mjs +3107 -0
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-form.mjs +592 -0
- package/fesm2022/slotted-angular-form.mjs.map +1 -0
- package/fesm2022/slotted-angular-fullscreen.mjs +314 -0
- package/fesm2022/slotted-angular-fullscreen.mjs.map +1 -0
- package/fesm2022/slotted-angular-grid.mjs +58 -0
- package/fesm2022/slotted-angular-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-highlight.mjs +123 -0
- package/fesm2022/slotted-angular-highlight.mjs.map +1 -0
- package/fesm2022/slotted-angular-hover-card.mjs +326 -0
- package/fesm2022/slotted-angular-hover-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-i18n.mjs +75 -0
- package/fesm2022/slotted-angular-i18n.mjs.map +1 -0
- package/fesm2022/slotted-angular-icon.mjs +232 -0
- package/fesm2022/slotted-angular-icon.mjs.map +1 -0
- package/fesm2022/slotted-angular-image.mjs +442 -0
- package/fesm2022/slotted-angular-image.mjs.map +1 -0
- package/fesm2022/slotted-angular-import-export-center.mjs +1792 -0
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline-message.mjs +280 -0
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline.mjs +52 -0
- package/fesm2022/slotted-angular-inline.mjs.map +1 -0
- package/fesm2022/slotted-angular-kbd.mjs +284 -0
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -0
- package/fesm2022/slotted-angular-link.mjs +182 -0
- package/fesm2022/slotted-angular-link.mjs.map +1 -0
- package/fesm2022/slotted-angular-list-item.mjs +367 -0
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -0
- package/fesm2022/slotted-angular-list.mjs +256 -0
- package/fesm2022/slotted-angular-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-listbox.mjs +1274 -0
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs +451 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -0
- package/fesm2022/slotted-angular-markdown.mjs +914 -0
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -0
- package/fesm2022/slotted-angular-menu.mjs +1211 -0
- package/fesm2022/slotted-angular-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-menubar.mjs +230 -0
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -0
- package/fesm2022/slotted-angular-message-scroller.mjs +378 -0
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -0
- package/fesm2022/slotted-angular-message.mjs +866 -0
- package/fesm2022/slotted-angular-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-multi-select.mjs +1939 -0
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs +770 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-notification-center.mjs +1172 -0
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-number-field.mjs +966 -0
- package/fesm2022/slotted-angular-number-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-otp-input.mjs +629 -0
- package/fesm2022/slotted-angular-otp-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-page-header.mjs +788 -0
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -0
- package/fesm2022/slotted-angular-page.mjs +255 -0
- package/fesm2022/slotted-angular-page.mjs.map +1 -0
- package/fesm2022/slotted-angular-pagination.mjs +562 -0
- package/fesm2022/slotted-angular-pagination.mjs.map +1 -0
- package/fesm2022/slotted-angular-popover.mjs +799 -0
- package/fesm2022/slotted-angular-popover.mjs.map +1 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs +572 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs +596 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -0
- package/fesm2022/slotted-angular-prose.mjs +314 -0
- package/fesm2022/slotted-angular-prose.mjs.map +1 -0
- package/fesm2022/slotted-angular-radio-group.mjs +469 -0
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-rating.mjs +1174 -0
- package/fesm2022/slotted-angular-rating.mjs.map +1 -0
- package/fesm2022/slotted-angular-result-state.mjs +330 -0
- package/fesm2022/slotted-angular-result-state.mjs.map +1 -0
- package/fesm2022/slotted-angular-saved-views.mjs +877 -0
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -0
- package/fesm2022/slotted-angular-scroll-area.mjs +294 -0
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -0
- package/fesm2022/slotted-angular-section.mjs +266 -0
- package/fesm2022/slotted-angular-section.mjs.map +1 -0
- package/fesm2022/slotted-angular-segmented-control.mjs +454 -0
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/slotted-angular-select.mjs +1899 -0
- package/fesm2022/slotted-angular-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-side-navigation.mjs +1042 -0
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-skeleton.mjs +316 -0
- package/fesm2022/slotted-angular-skeleton.mjs.map +1 -0
- package/fesm2022/slotted-angular-slider.mjs +586 -0
- package/fesm2022/slotted-angular-slider.mjs.map +1 -0
- package/fesm2022/slotted-angular-sparkline.mjs +235 -0
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -0
- package/fesm2022/slotted-angular-split-button.mjs +331 -0
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-splitter.mjs +516 -0
- package/fesm2022/slotted-angular-splitter.mjs.map +1 -0
- package/fesm2022/slotted-angular-stack.mjs +48 -0
- package/fesm2022/slotted-angular-stack.mjs.map +1 -0
- package/fesm2022/slotted-angular-stat-card.mjs +478 -0
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-status-indicator.mjs +155 -0
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-stepper.mjs +536 -0
- package/fesm2022/slotted-angular-stepper.mjs.map +1 -0
- package/fesm2022/slotted-angular-switch.mjs +447 -0
- package/fesm2022/slotted-angular-switch.mjs.map +1 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs +750 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -0
- package/fesm2022/slotted-angular-table.mjs +2518 -0
- package/fesm2022/slotted-angular-table.mjs.map +1 -0
- package/fesm2022/slotted-angular-tabs.mjs +829 -0
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -0
- package/fesm2022/slotted-angular-tag.mjs +595 -0
- package/fesm2022/slotted-angular-tag.mjs.map +1 -0
- package/fesm2022/slotted-angular-tags-input.mjs +1211 -0
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-text-field.mjs +674 -0
- package/fesm2022/slotted-angular-text-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-textarea.mjs +275 -0
- package/fesm2022/slotted-angular-textarea.mjs.map +1 -0
- package/fesm2022/slotted-angular-theme.mjs +45 -0
- package/fesm2022/slotted-angular-theme.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-field.mjs +895 -0
- package/fesm2022/slotted-angular-time-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-picker.mjs +856 -0
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs +1534 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-timeline.mjs +928 -0
- package/fesm2022/slotted-angular-timeline.mjs.map +1 -0
- package/fesm2022/slotted-angular-toast.mjs +917 -0
- package/fesm2022/slotted-angular-toast.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle-group.mjs +311 -0
- package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle.mjs +162 -0
- package/fesm2022/slotted-angular-toggle.mjs.map +1 -0
- package/fesm2022/slotted-angular-toolbar.mjs +536 -0
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -0
- package/fesm2022/slotted-angular-tooltip.mjs +798 -0
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -0
- package/fesm2022/slotted-angular-top-navigation.mjs +1308 -0
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-tour.mjs +1330 -0
- package/fesm2022/slotted-angular-tour.mjs.map +1 -0
- package/fesm2022/slotted-angular-transfer.mjs +1406 -0
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -0
- package/fesm2022/slotted-angular-tree.mjs +1448 -0
- package/fesm2022/slotted-angular-tree.mjs.map +1 -0
- package/fesm2022/slotted-angular-typography.mjs +184 -0
- package/fesm2022/slotted-angular-typography.mjs.map +1 -0
- package/fesm2022/slotted-angular-upload.mjs +1523 -0
- package/fesm2022/slotted-angular-upload.mjs.map +1 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs +32 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs.map +1 -0
- package/fesm2022/slotted-angular-wizard.mjs +1715 -0
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -0
- package/fesm2022/slotted-angular.mjs +4 -0
- package/fesm2022/slotted-angular.mjs.map +1 -0
- package/package.json +537 -3
- package/types/slotted-angular-accordion.d.ts +156 -0
- package/types/slotted-angular-accordion.d.ts.map +1 -0
- package/types/slotted-angular-action-bar.d.ts +291 -0
- package/types/slotted-angular-action-bar.d.ts.map +1 -0
- package/types/slotted-angular-action-sheet.d.ts +294 -0
- package/types/slotted-angular-action-sheet.d.ts.map +1 -0
- package/types/slotted-angular-alert.d.ts +214 -0
- package/types/slotted-angular-alert.d.ts.map +1 -0
- package/types/slotted-angular-app-shell.d.ts +549 -0
- package/types/slotted-angular-app-shell.d.ts.map +1 -0
- package/types/slotted-angular-aspect-ratio.d.ts +57 -0
- package/types/slotted-angular-aspect-ratio.d.ts.map +1 -0
- package/types/slotted-angular-attachment.d.ts +294 -0
- package/types/slotted-angular-attachment.d.ts.map +1 -0
- package/types/slotted-angular-avatar-group.d.ts +119 -0
- package/types/slotted-angular-avatar-group.d.ts.map +1 -0
- package/types/slotted-angular-avatar.d.ts +202 -0
- package/types/slotted-angular-avatar.d.ts.map +1 -0
- package/types/slotted-angular-badge.d.ts +166 -0
- package/types/slotted-angular-badge.d.ts.map +1 -0
- package/types/slotted-angular-breadcrumb.d.ts +251 -0
- package/types/slotted-angular-breadcrumb.d.ts.map +1 -0
- package/types/slotted-angular-button-group.d.ts +89 -0
- package/types/slotted-angular-button-group.d.ts.map +1 -0
- package/types/slotted-angular-button.d.ts +390 -0
- package/types/slotted-angular-button.d.ts.map +1 -0
- package/types/slotted-angular-calendar.d.ts +280 -0
- package/types/slotted-angular-calendar.d.ts.map +1 -0
- package/types/slotted-angular-card.d.ts +140 -0
- package/types/slotted-angular-card.d.ts.map +1 -0
- package/types/slotted-angular-carousel.d.ts +288 -0
- package/types/slotted-angular-carousel.d.ts.map +1 -0
- package/types/slotted-angular-cascader.d.ts +351 -0
- package/types/slotted-angular-cascader.d.ts.map +1 -0
- package/types/slotted-angular-chart.d.ts +319 -0
- package/types/slotted-angular-chart.d.ts.map +1 -0
- package/types/slotted-angular-checkbox-group.d.ts +156 -0
- package/types/slotted-angular-checkbox-group.d.ts.map +1 -0
- package/types/slotted-angular-checkbox.d.ts +197 -0
- package/types/slotted-angular-checkbox.d.ts.map +1 -0
- package/types/slotted-angular-code-block.d.ts +158 -0
- package/types/slotted-angular-code-block.d.ts.map +1 -0
- package/types/slotted-angular-collapsible.d.ts +272 -0
- package/types/slotted-angular-collapsible.d.ts.map +1 -0
- package/types/slotted-angular-color-picker.d.ts +181 -0
- package/types/slotted-angular-color-picker.d.ts.map +1 -0
- package/types/slotted-angular-column-manager.d.ts +200 -0
- package/types/slotted-angular-column-manager.d.ts.map +1 -0
- package/types/slotted-angular-combobox.d.ts +449 -0
- package/types/slotted-angular-combobox.d.ts.map +1 -0
- package/types/slotted-angular-command-palette.d.ts +256 -0
- package/types/slotted-angular-command-palette.d.ts.map +1 -0
- package/types/slotted-angular-container.d.ts +84 -0
- package/types/slotted-angular-container.d.ts.map +1 -0
- package/types/slotted-angular-context-menu.d.ts +84 -0
- package/types/slotted-angular-context-menu.d.ts.map +1 -0
- package/types/slotted-angular-currency-field.d.ts +480 -0
- package/types/slotted-angular-currency-field.d.ts.map +1 -0
- package/types/slotted-angular-dashboard-grid.d.ts +341 -0
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-grid.d.ts +1077 -0
- package/types/slotted-angular-data-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-list.d.ts +272 -0
- package/types/slotted-angular-data-list.d.ts.map +1 -0
- package/types/slotted-angular-date-field.d.ts +320 -0
- package/types/slotted-angular-date-field.d.ts.map +1 -0
- package/types/slotted-angular-date-picker.d.ts +224 -0
- package/types/slotted-angular-date-picker.d.ts.map +1 -0
- package/types/slotted-angular-date-range-picker.d.ts +310 -0
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-field.d.ts +362 -0
- package/types/slotted-angular-datetime-field.d.ts.map +1 -0
- package/types/slotted-angular-datetime-picker.d.ts +370 -0
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-range-picker.d.ts +459 -0
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-description-list.d.ts +281 -0
- package/types/slotted-angular-description-list.d.ts.map +1 -0
- package/types/slotted-angular-detail-panel.d.ts +240 -0
- package/types/slotted-angular-detail-panel.d.ts.map +1 -0
- package/types/slotted-angular-dialog.d.ts +497 -0
- package/types/slotted-angular-dialog.d.ts.map +1 -0
- package/types/slotted-angular-divider.d.ts +40 -0
- package/types/slotted-angular-divider.d.ts.map +1 -0
- package/types/slotted-angular-drawer.d.ts +532 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -0
- package/types/slotted-angular-entity-picker.d.ts +338 -0
- package/types/slotted-angular-entity-picker.d.ts.map +1 -0
- package/types/slotted-angular-event-calendar.d.ts +574 -0
- package/types/slotted-angular-event-calendar.d.ts.map +1 -0
- package/types/slotted-angular-field-group.d.ts +152 -0
- package/types/slotted-angular-field-group.d.ts.map +1 -0
- package/types/slotted-angular-field.d.ts +535 -0
- package/types/slotted-angular-field.d.ts.map +1 -0
- package/types/slotted-angular-filter-bar.d.ts +573 -0
- package/types/slotted-angular-filter-bar.d.ts.map +1 -0
- package/types/slotted-angular-form.d.ts +298 -0
- package/types/slotted-angular-form.d.ts.map +1 -0
- package/types/slotted-angular-fullscreen.d.ts +145 -0
- package/types/slotted-angular-fullscreen.d.ts.map +1 -0
- package/types/slotted-angular-grid.d.ts +50 -0
- package/types/slotted-angular-grid.d.ts.map +1 -0
- package/types/slotted-angular-highlight.d.ts +93 -0
- package/types/slotted-angular-highlight.d.ts.map +1 -0
- package/types/slotted-angular-hover-card.d.ts +140 -0
- package/types/slotted-angular-hover-card.d.ts.map +1 -0
- package/types/slotted-angular-i18n.d.ts +46 -0
- package/types/slotted-angular-i18n.d.ts.map +1 -0
- package/types/slotted-angular-icon.d.ts +94 -0
- package/types/slotted-angular-icon.d.ts.map +1 -0
- package/types/slotted-angular-image.d.ts +251 -0
- package/types/slotted-angular-image.d.ts.map +1 -0
- package/types/slotted-angular-import-export-center.d.ts +351 -0
- package/types/slotted-angular-import-export-center.d.ts.map +1 -0
- package/types/slotted-angular-inline-message.d.ts +195 -0
- package/types/slotted-angular-inline-message.d.ts.map +1 -0
- package/types/slotted-angular-inline.d.ts +41 -0
- package/types/slotted-angular-inline.d.ts.map +1 -0
- package/types/slotted-angular-kbd.d.ts +174 -0
- package/types/slotted-angular-kbd.d.ts.map +1 -0
- package/types/slotted-angular-link.d.ts +94 -0
- package/types/slotted-angular-link.d.ts.map +1 -0
- package/types/slotted-angular-list-item.d.ts +210 -0
- package/types/slotted-angular-list-item.d.ts.map +1 -0
- package/types/slotted-angular-list.d.ts +176 -0
- package/types/slotted-angular-list.d.ts.map +1 -0
- package/types/slotted-angular-listbox.d.ts +470 -0
- package/types/slotted-angular-listbox.d.ts.map +1 -0
- package/types/slotted-angular-loading-overlay.d.ts +219 -0
- package/types/slotted-angular-loading-overlay.d.ts.map +1 -0
- package/types/slotted-angular-markdown.d.ts +172 -0
- package/types/slotted-angular-markdown.d.ts.map +1 -0
- package/types/slotted-angular-menu.d.ts +448 -0
- package/types/slotted-angular-menu.d.ts.map +1 -0
- package/types/slotted-angular-menubar.d.ts +90 -0
- package/types/slotted-angular-menubar.d.ts.map +1 -0
- package/types/slotted-angular-message-scroller.d.ts +151 -0
- package/types/slotted-angular-message-scroller.d.ts.map +1 -0
- package/types/slotted-angular-message.d.ts +348 -0
- package/types/slotted-angular-message.d.ts.map +1 -0
- package/types/slotted-angular-multi-select.d.ts +462 -0
- package/types/slotted-angular-multi-select.d.ts.map +1 -0
- package/types/slotted-angular-navigation-menu.d.ts +309 -0
- package/types/slotted-angular-navigation-menu.d.ts.map +1 -0
- package/types/slotted-angular-notification-center.d.ts +318 -0
- package/types/slotted-angular-notification-center.d.ts.map +1 -0
- package/types/slotted-angular-number-field.d.ts +402 -0
- package/types/slotted-angular-number-field.d.ts.map +1 -0
- package/types/slotted-angular-otp-input.d.ts +286 -0
- package/types/slotted-angular-otp-input.d.ts.map +1 -0
- package/types/slotted-angular-page-header.d.ts +334 -0
- package/types/slotted-angular-page-header.d.ts.map +1 -0
- package/types/slotted-angular-page.d.ts +141 -0
- package/types/slotted-angular-page.d.ts.map +1 -0
- package/types/slotted-angular-pagination.d.ts +213 -0
- package/types/slotted-angular-pagination.d.ts.map +1 -0
- package/types/slotted-angular-popover.d.ts +366 -0
- package/types/slotted-angular-popover.d.ts.map +1 -0
- package/types/slotted-angular-progress-indicator.d.ts +312 -0
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -0
- package/types/slotted-angular-prompt-composer.d.ts +242 -0
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -0
- package/types/slotted-angular-prose.d.ts +171 -0
- package/types/slotted-angular-prose.d.ts.map +1 -0
- package/types/slotted-angular-radio-group.d.ts +268 -0
- package/types/slotted-angular-radio-group.d.ts.map +1 -0
- package/types/slotted-angular-rating.d.ts +374 -0
- package/types/slotted-angular-rating.d.ts.map +1 -0
- package/types/slotted-angular-result-state.d.ts +217 -0
- package/types/slotted-angular-result-state.d.ts.map +1 -0
- package/types/slotted-angular-saved-views.d.ts +198 -0
- package/types/slotted-angular-saved-views.d.ts.map +1 -0
- package/types/slotted-angular-scroll-area.d.ts +186 -0
- package/types/slotted-angular-scroll-area.d.ts.map +1 -0
- package/types/slotted-angular-section.d.ts +143 -0
- package/types/slotted-angular-section.d.ts.map +1 -0
- package/types/slotted-angular-segmented-control.d.ts +251 -0
- package/types/slotted-angular-segmented-control.d.ts.map +1 -0
- package/types/slotted-angular-select.d.ts +507 -0
- package/types/slotted-angular-select.d.ts.map +1 -0
- package/types/slotted-angular-side-navigation.d.ts +373 -0
- package/types/slotted-angular-side-navigation.d.ts.map +1 -0
- package/types/slotted-angular-skeleton.d.ts +198 -0
- package/types/slotted-angular-skeleton.d.ts.map +1 -0
- package/types/slotted-angular-slider.d.ts +216 -0
- package/types/slotted-angular-slider.d.ts.map +1 -0
- package/types/slotted-angular-sparkline.d.ts +106 -0
- package/types/slotted-angular-sparkline.d.ts.map +1 -0
- package/types/slotted-angular-split-button.d.ts +180 -0
- package/types/slotted-angular-split-button.d.ts.map +1 -0
- package/types/slotted-angular-splitter.d.ts +206 -0
- package/types/slotted-angular-splitter.d.ts.map +1 -0
- package/types/slotted-angular-stack.d.ts +38 -0
- package/types/slotted-angular-stack.d.ts.map +1 -0
- package/types/slotted-angular-stat-card.d.ts +232 -0
- package/types/slotted-angular-stat-card.d.ts.map +1 -0
- package/types/slotted-angular-status-indicator.d.ts +106 -0
- package/types/slotted-angular-status-indicator.d.ts.map +1 -0
- package/types/slotted-angular-stepper.d.ts +198 -0
- package/types/slotted-angular-stepper.d.ts.map +1 -0
- package/types/slotted-angular-switch.d.ts +243 -0
- package/types/slotted-angular-switch.d.ts.map +1 -0
- package/types/slotted-angular-table-of-contents.d.ts +210 -0
- package/types/slotted-angular-table-of-contents.d.ts.map +1 -0
- package/types/slotted-angular-table.d.ts +888 -0
- package/types/slotted-angular-table.d.ts.map +1 -0
- package/types/slotted-angular-tabs.d.ts +340 -0
- package/types/slotted-angular-tabs.d.ts.map +1 -0
- package/types/slotted-angular-tag.d.ts +279 -0
- package/types/slotted-angular-tag.d.ts.map +1 -0
- package/types/slotted-angular-tags-input.d.ts +302 -0
- package/types/slotted-angular-tags-input.d.ts.map +1 -0
- package/types/slotted-angular-text-field.d.ts +334 -0
- package/types/slotted-angular-text-field.d.ts.map +1 -0
- package/types/slotted-angular-textarea.d.ts +150 -0
- package/types/slotted-angular-textarea.d.ts.map +1 -0
- package/types/slotted-angular-theme.d.ts +26 -0
- package/types/slotted-angular-theme.d.ts.map +1 -0
- package/types/slotted-angular-time-field.d.ts +300 -0
- package/types/slotted-angular-time-field.d.ts.map +1 -0
- package/types/slotted-angular-time-picker.d.ts +260 -0
- package/types/slotted-angular-time-picker.d.ts.map +1 -0
- package/types/slotted-angular-time-range-picker.d.ts +401 -0
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-timeline.d.ts +329 -0
- package/types/slotted-angular-timeline.d.ts.map +1 -0
- package/types/slotted-angular-toast.d.ts +340 -0
- package/types/slotted-angular-toast.d.ts.map +1 -0
- package/types/slotted-angular-toggle-group.d.ts +167 -0
- package/types/slotted-angular-toggle-group.d.ts.map +1 -0
- package/types/slotted-angular-toggle.d.ts +106 -0
- package/types/slotted-angular-toggle.d.ts.map +1 -0
- package/types/slotted-angular-toolbar.d.ts +252 -0
- package/types/slotted-angular-toolbar.d.ts.map +1 -0
- package/types/slotted-angular-tooltip.d.ts +388 -0
- package/types/slotted-angular-tooltip.d.ts.map +1 -0
- package/types/slotted-angular-top-navigation.d.ts +442 -0
- package/types/slotted-angular-top-navigation.d.ts.map +1 -0
- package/types/slotted-angular-tour.d.ts +440 -0
- package/types/slotted-angular-tour.d.ts.map +1 -0
- package/types/slotted-angular-transfer.d.ts +296 -0
- package/types/slotted-angular-transfer.d.ts.map +1 -0
- package/types/slotted-angular-tree.d.ts +499 -0
- package/types/slotted-angular-tree.d.ts.map +1 -0
- package/types/slotted-angular-typography.d.ts +89 -0
- package/types/slotted-angular-typography.d.ts.map +1 -0
- package/types/slotted-angular-upload.d.ts +365 -0
- package/types/slotted-angular-upload.d.ts.map +1 -0
- package/types/slotted-angular-visually-hidden.d.ts +19 -0
- package/types/slotted-angular-visually-hidden.d.ts.map +1 -0
- package/types/slotted-angular-wizard.d.ts +441 -0
- package/types/slotted-angular-wizard.d.ts.map +1 -0
- package/types/slotted-angular.d.ts +3 -0
- package/types/slotted-angular.d.ts.map +1 -0
|
@@ -0,0 +1,1577 @@
|
|
|
1
|
+
{
|
|
2
|
+
"family": "data-grid",
|
|
3
|
+
"ui": "data-grid",
|
|
4
|
+
"binding": "angular",
|
|
5
|
+
"catalog": {
|
|
6
|
+
"group": "Data display",
|
|
7
|
+
"summary": "Table that sorts, filters and selects records."
|
|
8
|
+
},
|
|
9
|
+
"axes": {
|
|
10
|
+
"variant": [
|
|
11
|
+
"plain",
|
|
12
|
+
"ruled",
|
|
13
|
+
"framed"
|
|
14
|
+
],
|
|
15
|
+
"striped": [
|
|
16
|
+
true,
|
|
17
|
+
false
|
|
18
|
+
],
|
|
19
|
+
"stickyHeader": [
|
|
20
|
+
true,
|
|
21
|
+
false
|
|
22
|
+
],
|
|
23
|
+
"stickyTo": [
|
|
24
|
+
"scroll",
|
|
25
|
+
"page"
|
|
26
|
+
],
|
|
27
|
+
"selectionMode": [
|
|
28
|
+
"none",
|
|
29
|
+
"single",
|
|
30
|
+
"multiple",
|
|
31
|
+
"range"
|
|
32
|
+
],
|
|
33
|
+
"editMode": [
|
|
34
|
+
"cell",
|
|
35
|
+
"row"
|
|
36
|
+
],
|
|
37
|
+
"mode": [
|
|
38
|
+
"client",
|
|
39
|
+
"server"
|
|
40
|
+
],
|
|
41
|
+
"filterRow": [
|
|
42
|
+
true,
|
|
43
|
+
false
|
|
44
|
+
],
|
|
45
|
+
"virtualize": [
|
|
46
|
+
"auto",
|
|
47
|
+
true,
|
|
48
|
+
false
|
|
49
|
+
],
|
|
50
|
+
"columnOverflow": [
|
|
51
|
+
"auto",
|
|
52
|
+
"popin",
|
|
53
|
+
"scroll"
|
|
54
|
+
],
|
|
55
|
+
"activatable": [
|
|
56
|
+
true,
|
|
57
|
+
false
|
|
58
|
+
],
|
|
59
|
+
"align": [
|
|
60
|
+
"start",
|
|
61
|
+
"center",
|
|
62
|
+
"end"
|
|
63
|
+
],
|
|
64
|
+
"numeric": [
|
|
65
|
+
true,
|
|
66
|
+
false
|
|
67
|
+
],
|
|
68
|
+
"text": [
|
|
69
|
+
"wrap",
|
|
70
|
+
"truncate",
|
|
71
|
+
"nowrap"
|
|
72
|
+
],
|
|
73
|
+
"density": [
|
|
74
|
+
"comfortable",
|
|
75
|
+
"compact",
|
|
76
|
+
"dense"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"members": {
|
|
80
|
+
"data-grid": {
|
|
81
|
+
"nativeElement": "div",
|
|
82
|
+
"defaults": {
|
|
83
|
+
"variant": "ruled",
|
|
84
|
+
"striped": false,
|
|
85
|
+
"stickyHeader": true,
|
|
86
|
+
"stickyTo": "scroll",
|
|
87
|
+
"selectionMode": "none",
|
|
88
|
+
"editMode": "cell",
|
|
89
|
+
"filterRow": false,
|
|
90
|
+
"virtualize": "auto",
|
|
91
|
+
"columnOverflow": "auto",
|
|
92
|
+
"activatable": false,
|
|
93
|
+
"align": "start",
|
|
94
|
+
"numeric": false,
|
|
95
|
+
"text": "truncate",
|
|
96
|
+
"loading": false,
|
|
97
|
+
"overscan": 6,
|
|
98
|
+
"skeletonRows": 8,
|
|
99
|
+
"filterDebounce": 300,
|
|
100
|
+
"loadMoreThreshold": 20,
|
|
101
|
+
"pageSizes": [
|
|
102
|
+
25,
|
|
103
|
+
50,
|
|
104
|
+
100
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"capabilities": [
|
|
108
|
+
"sort",
|
|
109
|
+
"filter",
|
|
110
|
+
"columns",
|
|
111
|
+
"selection",
|
|
112
|
+
"current",
|
|
113
|
+
"open",
|
|
114
|
+
"virtualization",
|
|
115
|
+
"overflow",
|
|
116
|
+
"appearance",
|
|
117
|
+
"arrangement",
|
|
118
|
+
"content",
|
|
119
|
+
"loading",
|
|
120
|
+
"live",
|
|
121
|
+
"wiring"
|
|
122
|
+
],
|
|
123
|
+
"states": [
|
|
124
|
+
"default",
|
|
125
|
+
"hover",
|
|
126
|
+
"active",
|
|
127
|
+
"focus-visible",
|
|
128
|
+
"selected",
|
|
129
|
+
"current",
|
|
130
|
+
"expanded",
|
|
131
|
+
"disabled",
|
|
132
|
+
"loading",
|
|
133
|
+
"invalid",
|
|
134
|
+
"readonly",
|
|
135
|
+
"dragging",
|
|
136
|
+
"drop-target",
|
|
137
|
+
"open"
|
|
138
|
+
],
|
|
139
|
+
"parts": [
|
|
140
|
+
"root",
|
|
141
|
+
"scroll",
|
|
142
|
+
"head",
|
|
143
|
+
"header-row",
|
|
144
|
+
"column-group",
|
|
145
|
+
"column-header",
|
|
146
|
+
"sort",
|
|
147
|
+
"column-description",
|
|
148
|
+
"column-actions",
|
|
149
|
+
"column-help",
|
|
150
|
+
"column-menu",
|
|
151
|
+
"column-menu-description",
|
|
152
|
+
"resizer",
|
|
153
|
+
"drop-indicator",
|
|
154
|
+
"filter-row",
|
|
155
|
+
"filter-cell",
|
|
156
|
+
"filter",
|
|
157
|
+
"filter-panel",
|
|
158
|
+
"filter-condition",
|
|
159
|
+
"filter-operator",
|
|
160
|
+
"filter-operand",
|
|
161
|
+
"filter-join",
|
|
162
|
+
"filter-actions",
|
|
163
|
+
"body",
|
|
164
|
+
"pinned-rows",
|
|
165
|
+
"row",
|
|
166
|
+
"row-header",
|
|
167
|
+
"cell",
|
|
168
|
+
"editor",
|
|
169
|
+
"selection",
|
|
170
|
+
"expander",
|
|
171
|
+
"detail",
|
|
172
|
+
"popin-header",
|
|
173
|
+
"popin",
|
|
174
|
+
"popin-field",
|
|
175
|
+
"popin-label",
|
|
176
|
+
"popin-value",
|
|
177
|
+
"group-row",
|
|
178
|
+
"group-toggle",
|
|
179
|
+
"tree-toggle",
|
|
180
|
+
"row-handle",
|
|
181
|
+
"summary",
|
|
182
|
+
"summary-cell",
|
|
183
|
+
"empty",
|
|
184
|
+
"loader",
|
|
185
|
+
"footer",
|
|
186
|
+
"actions"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"docs": {
|
|
191
|
+
"dataGrid": {
|
|
192
|
+
"imports": {
|
|
193
|
+
"source": "import {\n SlDataGrid,\n SlDataGridCellTemplate,\n SlDataGridColumnHelp,\n SlDataGridDetailTemplate,\n SlDataGridEditorTemplate,\n SlDataGridFooter,\n provideDataGridDefaults,\n} from '@slotted/angular/data-grid';\nimport type { GridColumn, GridQuery, GridColumnState } from '@slotted/core/grid';\nimport { applyQuery, emptyQuery, toGridParams, fromGridParams } from '@slotted/core/grid';",
|
|
194
|
+
"selector": "sl-data-grid",
|
|
195
|
+
"exportAs": "slDataGrid"
|
|
196
|
+
},
|
|
197
|
+
"anatomy": [
|
|
198
|
+
{
|
|
199
|
+
"part": "root",
|
|
200
|
+
"element": "sl-data-grid[role=\"grid\"], exportAs=\"slDataGrid\"",
|
|
201
|
+
"required": true,
|
|
202
|
+
"purpose": "The host, and the widget: data-ui=\"data-grid\", every axis, aria-rowcount, aria-colcount, aria-multiselectable, aria-busy, and the column template as --slotted-data-grid-template. It is the form control the selection is written to."
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"part": "scroll",
|
|
206
|
+
"element": "div",
|
|
207
|
+
"required": true,
|
|
208
|
+
"purpose": "The scroller on both axes, and the window the virtualiser measures. Carries data-overflowing, data-at-start and data-at-end while the columns overflow."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"part": "head",
|
|
212
|
+
"element": "div[role=\"rowgroup\"]",
|
|
213
|
+
"required": true,
|
|
214
|
+
"purpose": "The header rows, sticky to the top of the scroller by default."
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"part": "header-row",
|
|
218
|
+
"element": "div[role=\"row\"]",
|
|
219
|
+
"required": true,
|
|
220
|
+
"purpose": "One row of the header: the column groups, or the column names."
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"part": "column-group",
|
|
224
|
+
"element": "div[role=\"columnheader\"]",
|
|
225
|
+
"required": false,
|
|
226
|
+
"purpose": "A heading spanning the columns a group names, drawn from columnGroups."
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"part": "column-header",
|
|
230
|
+
"element": "div[role=\"columnheader\"]",
|
|
231
|
+
"required": true,
|
|
232
|
+
"purpose": "A column’s name and its controls. Carries aria-sort on the first sort key, data-sorted, data-filtered, data-pinned, data-dragging, data-drop-target and data-resizing. An ng-template[slDataGridHeader] replaces the name. The name truncates, and a name its box cuts opens a hint with the whole of it — shown rather than read, because the header already states the words."
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"part": "sort",
|
|
236
|
+
"element": "span",
|
|
237
|
+
"required": false,
|
|
238
|
+
"purpose": "The direction mark on a sorted column, with data-index when the order holds more than one key."
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"part": "column-description",
|
|
242
|
+
"element": "span",
|
|
243
|
+
"required": false,
|
|
244
|
+
"purpose": "The column’s description, visually hidden, referenced by the header’s aria-describedby and by the column menu’s; present whenever the column has a description."
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"part": "column-actions",
|
|
248
|
+
"element": "span",
|
|
249
|
+
"required": true,
|
|
250
|
+
"purpose": "The slot at the trailing edge holding the column help, the filter trigger and the column menu. F2 on the header enters it, Tab cycles it, Escape leaves it."
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"part": "column-help",
|
|
254
|
+
"element": "button[slPopoverTrigger]",
|
|
255
|
+
"required": false,
|
|
256
|
+
"purpose": "The circled question mark on a column with a description or an slDataGridColumnHelp template, always shown. Opens a popover by click, Enter or Space — never by hover — holding both."
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"part": "column-menu",
|
|
260
|
+
"element": "button[slMenuTriggerFor]",
|
|
261
|
+
"required": true,
|
|
262
|
+
"purpose": "Opens the column’s sl-menu: sort, filter, pin, fit, fit all, hide, manage."
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"part": "column-menu-description",
|
|
266
|
+
"element": "div[aria-hidden]",
|
|
267
|
+
"required": false,
|
|
268
|
+
"purpose": "The description again, as a muted caption atop the column menu; hidden from the reader, who hears it once through the menu’s aria-describedby."
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"part": "resizer",
|
|
272
|
+
"element": "div[aria-hidden]",
|
|
273
|
+
"required": false,
|
|
274
|
+
"purpose": "The pointer’s handle on the trailing edge; a double press fits the column."
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"part": "drop-indicator",
|
|
278
|
+
"element": "div",
|
|
279
|
+
"required": false,
|
|
280
|
+
"purpose": "The line between two columns while one is dragged."
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"part": "filter-row",
|
|
284
|
+
"element": "div[role=\"row\"]",
|
|
285
|
+
"required": false,
|
|
286
|
+
"purpose": "The row under the header, with filterRow, holding one operand per filterable column."
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"part": "filter-cell",
|
|
290
|
+
"element": "div[role=\"gridcell\"]",
|
|
291
|
+
"required": false,
|
|
292
|
+
"purpose": "One cell of the filter row; data-filtered while its column has a rule."
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"part": "filter",
|
|
296
|
+
"element": "button",
|
|
297
|
+
"required": false,
|
|
298
|
+
"purpose": "The funnel on a filtered column, and the shortest way back to its panel."
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"part": "filter-panel",
|
|
302
|
+
"element": "div, drawn by sl-data-grid-filter-panel",
|
|
303
|
+
"required": false,
|
|
304
|
+
"purpose": "The compact panel in a popover, carrying data-ui itself because it is rendered outside the root."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"part": "filter-condition",
|
|
308
|
+
"element": "div",
|
|
309
|
+
"required": false,
|
|
310
|
+
"purpose": "One line of the panel: the operator and its operand(s); data-operands says how many."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"part": "filter-operator",
|
|
314
|
+
"element": "div",
|
|
315
|
+
"required": false,
|
|
316
|
+
"purpose": "The operator chooser: a select in the panel, a symbol button in the row."
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"part": "filter-operand",
|
|
320
|
+
"element": "div",
|
|
321
|
+
"required": false,
|
|
322
|
+
"purpose": "The operand control(s), with data-kind and data-range for a between. An ng-template[slDataGridFilter] replaces the control."
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"part": "filter-join",
|
|
326
|
+
"element": "div",
|
|
327
|
+
"required": false,
|
|
328
|
+
"purpose": "And / Or between the two conditions of the panel."
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"part": "filter-actions",
|
|
332
|
+
"element": "div",
|
|
333
|
+
"required": false,
|
|
334
|
+
"purpose": "Clear and Apply at the end of the panel."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"part": "body",
|
|
338
|
+
"element": "div[role=\"rowgroup\"]",
|
|
339
|
+
"required": true,
|
|
340
|
+
"purpose": "The rows; carries the virtual window’s total height and start offset."
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"part": "pinned-rows",
|
|
344
|
+
"element": "div[role=\"rowgroup\"]",
|
|
345
|
+
"required": false,
|
|
346
|
+
"purpose": "Rows held under the head or over the summary, out of the query."
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"part": "row",
|
|
350
|
+
"element": "div[role=\"row\"]",
|
|
351
|
+
"required": true,
|
|
352
|
+
"purpose": "One record: aria-rowindex, aria-selected, data-selected, data-current, data-expanded, data-editing, data-disabled."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"part": "row-header",
|
|
356
|
+
"element": "div[role=\"rowheader\"]",
|
|
357
|
+
"required": false,
|
|
358
|
+
"purpose": "The cell of the column marked rowHeader, which a screen reader repeats for the record."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"part": "cell",
|
|
362
|
+
"element": "div[role=\"gridcell\"]",
|
|
363
|
+
"required": true,
|
|
364
|
+
"purpose": "One value: aria-colindex, data-align, data-numeric, data-text, data-pinned, data-current, data-in-range, data-range-edge, data-editing, data-invalid, data-loading, data-readonly. An ng-template[slDataGridCell] replaces the value."
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"part": "editor",
|
|
368
|
+
"element": "div",
|
|
369
|
+
"required": false,
|
|
370
|
+
"purpose": "The control editing a cell, plain and sm, filling it. An ng-template[slDataGridEditor] replaces the control."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"part": "selection",
|
|
374
|
+
"element": "div[role=\"gridcell\"]",
|
|
375
|
+
"required": false,
|
|
376
|
+
"purpose": "The checkbox column, always pinned to the start; in the header it selects every row the query left."
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"part": "expander",
|
|
380
|
+
"element": "button",
|
|
381
|
+
"required": false,
|
|
382
|
+
"purpose": "Opens a row’s detail; aria-expanded and aria-controls."
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"part": "detail",
|
|
386
|
+
"element": "div[role=\"row\"]",
|
|
387
|
+
"required": false,
|
|
388
|
+
"purpose": "The open detail from ng-template[slDataGridDetail]: one cell spanning every column, held to the frame’s width."
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"part": "popin-header",
|
|
392
|
+
"element": "div[role=\"columnheader\"]",
|
|
393
|
+
"required": false,
|
|
394
|
+
"purpose": "The pop-in’s column, last in the header row while columns are out of space: messages.popinHeader, visually hidden, with no track."
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"part": "popin",
|
|
398
|
+
"element": "div[role=\"gridcell\"]",
|
|
399
|
+
"required": false,
|
|
400
|
+
"purpose": "The last cell of a record’s row and of the summary while columns are out of space: the row’s second line, every track, held to the frame’s width; aria-colindex is the last."
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"part": "popin-field",
|
|
404
|
+
"element": "div",
|
|
405
|
+
"required": false,
|
|
406
|
+
"purpose": "One column in the pop-in, in the order of the columns: its label over its value."
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"part": "popin-label",
|
|
410
|
+
"element": "span",
|
|
411
|
+
"required": false,
|
|
412
|
+
"purpose": "The column’s label, in the small muted type; left out for a column with none."
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"part": "popin-value",
|
|
416
|
+
"element": "div",
|
|
417
|
+
"required": false,
|
|
418
|
+
"purpose": "The value, drawn by the column’s slDataGridCell template with the cell’s own context; an editable column is read only here."
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"part": "group-row",
|
|
422
|
+
"element": "div[role=\"row\"]",
|
|
423
|
+
"required": false,
|
|
424
|
+
"purpose": "A group heading: aria-level, aria-expanded, the value, the count, the aggregates."
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"part": "group-toggle",
|
|
428
|
+
"element": "button",
|
|
429
|
+
"required": false,
|
|
430
|
+
"purpose": "Opens and closes a group."
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"part": "tree-toggle",
|
|
434
|
+
"element": "button",
|
|
435
|
+
"required": false,
|
|
436
|
+
"purpose": "Opens and closes a tree row’s children; a leaf keeps its room empty."
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"part": "row-handle",
|
|
440
|
+
"element": "button",
|
|
441
|
+
"required": false,
|
|
442
|
+
"purpose": "The grip a row is dragged by; disabled while the query is not at rest."
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"part": "summary",
|
|
446
|
+
"element": "div[role=\"rowgroup\"]",
|
|
447
|
+
"required": false,
|
|
448
|
+
"purpose": "The aggregates of the whole query, pinned to the end."
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"part": "summary-cell",
|
|
452
|
+
"element": "div[role=\"gridcell\"]",
|
|
453
|
+
"required": false,
|
|
454
|
+
"purpose": "One aggregate."
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"part": "empty",
|
|
458
|
+
"element": "div",
|
|
459
|
+
"required": false,
|
|
460
|
+
"purpose": "The result-state for no rows, no results or an error, held to the frame’s width. An ng-template[slDataGridEmpty] replaces it."
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"part": "loader",
|
|
464
|
+
"element": "div[role=\"rowgroup\"]",
|
|
465
|
+
"required": false,
|
|
466
|
+
"purpose": "Skeleton rows on a first load."
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"part": "footer",
|
|
470
|
+
"element": "div",
|
|
471
|
+
"required": false,
|
|
472
|
+
"purpose": "The bar under the grid: the range, what the consumer projects with [slDataGridFooter], load more."
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"part": "actions",
|
|
476
|
+
"element": "div",
|
|
477
|
+
"required": false,
|
|
478
|
+
"purpose": "Row actions inside a cell of kind actions, revealed by hover and by the cursor."
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"api": [
|
|
482
|
+
{
|
|
483
|
+
"name": "rows",
|
|
484
|
+
"type": "readonly Row[]",
|
|
485
|
+
"defaultValue": "—",
|
|
486
|
+
"appliesTo": "sl-data-grid",
|
|
487
|
+
"description": "The records; the grid never mutates them. Left out when a dataSource answers for them."
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "rowKey",
|
|
491
|
+
"type": "keyof Row | (row) => string",
|
|
492
|
+
"defaultValue": "—",
|
|
493
|
+
"appliesTo": "sl-data-grid",
|
|
494
|
+
"description": "A field name or a function: the key every state model names a row by."
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "columns",
|
|
498
|
+
"type": "GridColumn<Row>[]",
|
|
499
|
+
"defaultValue": "—",
|
|
500
|
+
"appliesTo": "sl-data-grid",
|
|
501
|
+
"description": "The column model: id, label, description, kind, accessor, format, compare, width, minWidth, maxWidth, flex, priority, sortable, filterable, searchable, editable, resizable, reorderable, hideable, rowHeader, options, aggregate, validate, parse."
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "description",
|
|
505
|
+
"type": "string",
|
|
506
|
+
"defaultValue": "—",
|
|
507
|
+
"appliesTo": "GridColumn",
|
|
508
|
+
"description": "What the column is: the header’s accessible description, the caption atop its menu and the first line of its help popover."
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "priority",
|
|
512
|
+
"type": "number",
|
|
513
|
+
"defaultValue": "—",
|
|
514
|
+
"appliesTo": "GridColumn",
|
|
515
|
+
"description": "The lower, the longer the column stays when the frame is too narrow. A column without one leaves before every numbered one; the identity column and an actions column never leave."
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "popin",
|
|
519
|
+
"type": "boolean",
|
|
520
|
+
"defaultValue": "true",
|
|
521
|
+
"appliesTo": "GridColumn",
|
|
522
|
+
"description": "Whether a column with no room moves into the row’s pop-in; false hides it instead."
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"name": "density",
|
|
526
|
+
"type": "'comfortable' | 'compact' | 'dense' | null",
|
|
527
|
+
"defaultValue": "the page’s",
|
|
528
|
+
"appliesTo": "sl-data-grid",
|
|
529
|
+
"description": "This grid’s own density, written as data-slotted-density on the root; absent or null, the page’s."
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "outOfSpace",
|
|
533
|
+
"type": "Signal<GridOutOfSpace>",
|
|
534
|
+
"defaultValue": "{ popin: [], hidden: [] }",
|
|
535
|
+
"appliesTo": "sl-data-grid",
|
|
536
|
+
"description": "The columns a narrow frame took out by priority — those in the pop-in and those hidden — read through exportAs. Never part of columnState."
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "columnGroups",
|
|
540
|
+
"type": "GridColumnGroup[]",
|
|
541
|
+
"defaultValue": "—",
|
|
542
|
+
"appliesTo": "sl-data-grid",
|
|
543
|
+
"description": "Headings spanning columns, drawn as a row above the names."
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "mode",
|
|
547
|
+
"type": "'client' | 'server'",
|
|
548
|
+
"defaultValue": "inferred",
|
|
549
|
+
"appliesTo": "sl-data-grid",
|
|
550
|
+
"description": "client applies the query to rows; server draws rows as given. server when totalCount or hasMore is present."
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"name": "totalCount",
|
|
554
|
+
"type": "number",
|
|
555
|
+
"defaultValue": "—",
|
|
556
|
+
"appliesTo": "sl-data-grid",
|
|
557
|
+
"description": "The whole set’s size in server mode; aria-rowcount and the range read it."
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "hasMore",
|
|
561
|
+
"type": "boolean",
|
|
562
|
+
"defaultValue": "—",
|
|
563
|
+
"appliesTo": "sl-data-grid",
|
|
564
|
+
"description": "Whether a page past this one exists when the total is unknown; the footer offers Load more."
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "loading",
|
|
568
|
+
"type": "boolean",
|
|
569
|
+
"defaultValue": "false",
|
|
570
|
+
"appliesTo": "sl-data-grid",
|
|
571
|
+
"description": "Skeleton rows with no rows to keep; aria-busy and a dimmed body over rows already shown."
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "error",
|
|
575
|
+
"type": "string | null",
|
|
576
|
+
"defaultValue": "—",
|
|
577
|
+
"appliesTo": "sl-data-grid",
|
|
578
|
+
"description": "The message of a failed load; draws the error state with Try again, which emits retry."
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "disabledKeys",
|
|
582
|
+
"type": "string[]",
|
|
583
|
+
"defaultValue": "—",
|
|
584
|
+
"appliesTo": "sl-data-grid",
|
|
585
|
+
"description": "Rows that are neither selectable nor editable, drawn with data-disabled."
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "query",
|
|
589
|
+
"type": "model<GridQuery>",
|
|
590
|
+
"defaultValue": "emptyQuery()",
|
|
591
|
+
"appliesTo": "sl-data-grid",
|
|
592
|
+
"description": "sort, filter, search, page and group in one object, two-way. An unbound grid starts from the model’s own initial value."
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "columnState",
|
|
596
|
+
"type": "model<Partial<GridColumnState> | undefined>",
|
|
597
|
+
"defaultValue": "—",
|
|
598
|
+
"appliesTo": "sl-data-grid",
|
|
599
|
+
"description": "order, widths, hidden and pinned, two-way; normalised against columns on every read."
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "selectionMode",
|
|
603
|
+
"type": "'none' | 'single' | 'multiple' | 'range'",
|
|
604
|
+
"defaultValue": "none",
|
|
605
|
+
"appliesTo": "sl-data-grid",
|
|
606
|
+
"description": "Rows, one or many, with the checkbox column in multiple; or a rectangle of cells."
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "value",
|
|
610
|
+
"type": "model<string | readonly string[] | null>",
|
|
611
|
+
"defaultValue": "null",
|
|
612
|
+
"appliesTo": "sl-data-grid",
|
|
613
|
+
"description": "The selected row (single) or rows (multiple), two-way, and the value a form control holds through ControlValueAccessor."
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "range",
|
|
617
|
+
"type": "model<GridRange | null>",
|
|
618
|
+
"defaultValue": "null",
|
|
619
|
+
"appliesTo": "sl-data-grid",
|
|
620
|
+
"description": "The cell rectangle as anchor and focus, in range mode, two-way."
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "current",
|
|
624
|
+
"type": "model<GridCell | null>",
|
|
625
|
+
"defaultValue": "null",
|
|
626
|
+
"appliesTo": "sl-data-grid",
|
|
627
|
+
"description": "Where the cursor stands: a row key (or header, filter, summary, group:<key>) and a column id, two-way."
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "expanded",
|
|
631
|
+
"type": "model<readonly string[]>",
|
|
632
|
+
"defaultValue": "[]",
|
|
633
|
+
"appliesTo": "sl-data-grid",
|
|
634
|
+
"description": "The rows whose detail is open, two-way."
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"name": "expandedGroups",
|
|
638
|
+
"type": "model<readonly string[] | 'all'>",
|
|
639
|
+
"defaultValue": "all",
|
|
640
|
+
"appliesTo": "sl-data-grid",
|
|
641
|
+
"description": "The open groups, or all, two-way."
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "expandable",
|
|
645
|
+
"type": "boolean | (row) => boolean",
|
|
646
|
+
"defaultValue": "true with slDataGridDetail",
|
|
647
|
+
"appliesTo": "sl-data-grid",
|
|
648
|
+
"description": "Which rows have a detail."
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "editMode",
|
|
652
|
+
"type": "'cell' | 'row'",
|
|
653
|
+
"defaultValue": "cell",
|
|
654
|
+
"appliesTo": "sl-data-grid",
|
|
655
|
+
"description": "One cell at a time, or every editable cell of the row."
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "activatable",
|
|
659
|
+
"type": "boolean",
|
|
660
|
+
"defaultValue": "false",
|
|
661
|
+
"appliesTo": "sl-data-grid",
|
|
662
|
+
"description": "A double press or Enter on a text cell emits activate with the row."
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"name": "filterRow",
|
|
666
|
+
"type": "boolean",
|
|
667
|
+
"defaultValue": "false",
|
|
668
|
+
"appliesTo": "sl-data-grid",
|
|
669
|
+
"description": "The row of operands under the header."
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "manageable",
|
|
673
|
+
"type": "boolean",
|
|
674
|
+
"defaultValue": "false",
|
|
675
|
+
"appliesTo": "sl-data-grid",
|
|
676
|
+
"description": "Draws Manage columns in the column menu, for an application that answers manageColumns with its column-manager."
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "filterDebounce",
|
|
680
|
+
"type": "number",
|
|
681
|
+
"defaultValue": "300",
|
|
682
|
+
"appliesTo": "sl-data-grid",
|
|
683
|
+
"description": "Milliseconds a text or number operand in the filter row waits before it applies."
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "virtualize",
|
|
687
|
+
"type": "'auto' | boolean",
|
|
688
|
+
"defaultValue": "auto",
|
|
689
|
+
"appliesTo": "sl-data-grid",
|
|
690
|
+
"description": "auto windows rows above a hundred and middle columns above twenty."
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "rowHeight",
|
|
694
|
+
"type": "number | 'auto'",
|
|
695
|
+
"defaultValue": "density",
|
|
696
|
+
"appliesTo": "sl-data-grid",
|
|
697
|
+
"description": "Pixels per row, read once from the first row when unstated; auto measures every row, capped by --slotted-data-grid-row-max-block-size. While a pop-in is drawn every row is measured, as under auto."
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"name": "columnOverflow",
|
|
701
|
+
"type": "'auto' | 'popin' | 'scroll'",
|
|
702
|
+
"defaultValue": "auto",
|
|
703
|
+
"appliesTo": "sl-data-grid",
|
|
704
|
+
"description": "What a frame too narrow for the template does: popin moves columns into each row’s pop-in by priority; scroll keeps them and scrolls sideways; auto pops in on a frame under 600px, or under 1024px when the main pointer is coarse — a phone, a small tablet — and scrolls elsewhere, where a mouse or a trackpad scrolls and the columns keep their layout."
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "overscan",
|
|
708
|
+
"type": "number",
|
|
709
|
+
"defaultValue": "6",
|
|
710
|
+
"appliesTo": "sl-data-grid",
|
|
711
|
+
"description": "Rows mounted past each edge of the window."
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "tree",
|
|
715
|
+
"type": "{ parentKey, column?, hasChildren? }",
|
|
716
|
+
"defaultValue": "—",
|
|
717
|
+
"appliesTo": "sl-data-grid",
|
|
718
|
+
"description": "Rows as a tree, each naming its parent by key; the open branches are expanded and the root is a treegrid."
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "loadChildren",
|
|
722
|
+
"type": "{ key, row }",
|
|
723
|
+
"defaultValue": "—",
|
|
724
|
+
"appliesTo": "sl-data-grid",
|
|
725
|
+
"description": "Emitted when a branch hasChildren says has children opens and none are in rows."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "dataSource",
|
|
729
|
+
"type": "{ getRows(query, { signal }), cacheSize? }",
|
|
730
|
+
"defaultValue": "—",
|
|
731
|
+
"appliesTo": "sl-data-grid",
|
|
732
|
+
"description": "The grid asks for its own rows per query, aborting the request before, keeping answers by query; server mode with its own loading and error."
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"name": "pinnedRows",
|
|
736
|
+
"type": "{ top?: string[], bottom?: string[] }",
|
|
737
|
+
"defaultValue": "—",
|
|
738
|
+
"appliesTo": "sl-data-grid",
|
|
739
|
+
"description": "Rows held at the top or the bottom of the body, out of the query and always on screen."
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": "rowsReorderable",
|
|
743
|
+
"type": "boolean",
|
|
744
|
+
"defaultValue": "false",
|
|
745
|
+
"appliesTo": "sl-data-grid",
|
|
746
|
+
"description": "A grip per row; the pointer drags it and Alt with the vertical arrows moves it. Only while the query is at rest and without a tree."
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "rowsReorder",
|
|
750
|
+
"type": "{ key, from, to, reason, event }",
|
|
751
|
+
"defaultValue": "—",
|
|
752
|
+
"appliesTo": "sl-data-grid",
|
|
753
|
+
"description": "Where a row goes in rows: from, and the index it takes once moved. The consumer moves it."
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "highlightChanges",
|
|
757
|
+
"type": "boolean | number",
|
|
758
|
+
"defaultValue": "false",
|
|
759
|
+
"appliesTo": "sl-data-grid",
|
|
760
|
+
"description": "Marks a mounted cell whose value changed between two rows, for the stated milliseconds (true is 1200)."
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "loadMoreThreshold",
|
|
764
|
+
"type": "number",
|
|
765
|
+
"defaultValue": "20",
|
|
766
|
+
"appliesTo": "sl-data-grid",
|
|
767
|
+
"description": "Rows left below the window before loadMore is emitted."
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "skeletonRows",
|
|
771
|
+
"type": "number",
|
|
772
|
+
"defaultValue": "8",
|
|
773
|
+
"appliesTo": "sl-data-grid",
|
|
774
|
+
"description": "Rows the first load draws."
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "pageSizes",
|
|
778
|
+
"type": "number[]",
|
|
779
|
+
"defaultValue": "25,50,100",
|
|
780
|
+
"appliesTo": "sl-data-grid",
|
|
781
|
+
"description": "The sizes a page-size control in the footer offers, read through injectDataGridDefaults."
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"name": "variant",
|
|
785
|
+
"type": "'plain' | 'ruled' | 'framed'",
|
|
786
|
+
"defaultValue": "ruled",
|
|
787
|
+
"appliesTo": "sl-data-grid",
|
|
788
|
+
"description": "No rules, rules between rows, or the border and the radius."
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"name": "striped",
|
|
792
|
+
"type": "boolean",
|
|
793
|
+
"defaultValue": "false",
|
|
794
|
+
"appliesTo": "sl-data-grid",
|
|
795
|
+
"description": "Every second row tinted."
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "stickyHeader",
|
|
799
|
+
"type": "boolean",
|
|
800
|
+
"defaultValue": "true",
|
|
801
|
+
"appliesTo": "sl-data-grid",
|
|
802
|
+
"description": "The header, the filter row and the summary stay while the rows scroll."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "stickyTo",
|
|
806
|
+
"type": "'scroll' | 'page'",
|
|
807
|
+
"defaultValue": "scroll",
|
|
808
|
+
"appliesTo": "sl-data-grid",
|
|
809
|
+
"description": "What the header sticks inside: the grid’s own scroller, or the page — which gives up the grid’s own scrolling and windowing."
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "height",
|
|
813
|
+
"type": "string | number",
|
|
814
|
+
"defaultValue": "—",
|
|
815
|
+
"appliesTo": "sl-data-grid",
|
|
816
|
+
"description": "The frame’s height; without one the grid grows to its rows."
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "labelledBy",
|
|
820
|
+
"type": "string",
|
|
821
|
+
"defaultValue": "—",
|
|
822
|
+
"appliesTo": "sl-data-grid",
|
|
823
|
+
"description": "The id of the element that names the grid; a static aria-label names it directly, and with neither the grid is named by messages.grid."
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "messages",
|
|
827
|
+
"type": "Partial<DataGridMessages>",
|
|
828
|
+
"defaultValue": "—",
|
|
829
|
+
"appliesTo": "sl-data-grid",
|
|
830
|
+
"description": "Words laid over the language in force, key by key: every control, state and announcement, the grid’s name (grid), and filterYes and filterNo for a boolean cell. The operator names and symbols are the groups filterOperators and filterSymbols."
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"name": "locale",
|
|
834
|
+
"type": "string",
|
|
835
|
+
"defaultValue": "the language in force",
|
|
836
|
+
"appliesTo": "sl-data-grid",
|
|
837
|
+
"description": "BCP 47, for the collator, the number and the date formats."
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"name": "timeZone",
|
|
841
|
+
"type": "string",
|
|
842
|
+
"defaultValue": "—",
|
|
843
|
+
"appliesTo": "sl-data-grid",
|
|
844
|
+
"description": "The zone a timestamp is read in."
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"name": "showRange",
|
|
848
|
+
"type": "boolean",
|
|
849
|
+
"defaultValue": "when paged",
|
|
850
|
+
"appliesTo": "sl-data-grid",
|
|
851
|
+
"description": "Whether the footer states the range."
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"name": "slDataGridCell",
|
|
855
|
+
"type": "ng-template, string",
|
|
856
|
+
"defaultValue": "—",
|
|
857
|
+
"appliesTo": "ng-template[slDataGridCell]",
|
|
858
|
+
"description": "What a cell draws, for the column named or for every column when unnamed. The context carries row, key, column, value, text, current and selected."
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "slDataGridEditor",
|
|
862
|
+
"type": "ng-template, string",
|
|
863
|
+
"defaultValue": "—",
|
|
864
|
+
"appliesTo": "ng-template[slDataGridEditor]",
|
|
865
|
+
"description": "What a cell edits with. The context adds draft, setDraft, commit, cancel, invalid and message."
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"name": "slDataGridHeader",
|
|
869
|
+
"type": "ng-template, string",
|
|
870
|
+
"defaultValue": "—",
|
|
871
|
+
"appliesTo": "ng-template[slDataGridHeader]",
|
|
872
|
+
"description": "What a header draws in place of the label; the context carries the column, sorted, sortIndex and filtered."
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "slDataGridFilter",
|
|
876
|
+
"type": "ng-template, string",
|
|
877
|
+
"defaultValue": "—",
|
|
878
|
+
"appliesTo": "ng-template[slDataGridFilter]",
|
|
879
|
+
"description": "The operand control in the panel and the row, for a kind the grid has no field for."
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "slDataGridDetail",
|
|
883
|
+
"type": "ng-template",
|
|
884
|
+
"defaultValue": "—",
|
|
885
|
+
"appliesTo": "ng-template[slDataGridDetail]",
|
|
886
|
+
"description": "A row’s detail, handed the row; its presence draws the expander column."
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"name": "slDataGridGroup",
|
|
890
|
+
"type": "ng-template",
|
|
891
|
+
"defaultValue": "—",
|
|
892
|
+
"appliesTo": "ng-template[slDataGridGroup]",
|
|
893
|
+
"description": "What a group row draws beside its toggle; the context carries the node, its column and toggle()."
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"name": "slDataGridEmpty",
|
|
897
|
+
"type": "ng-template",
|
|
898
|
+
"defaultValue": "—",
|
|
899
|
+
"appliesTo": "ng-template[slDataGridEmpty]",
|
|
900
|
+
"description": "The empty, no-results or error state in place of the grid’s result state, handed the status."
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"name": "slDataGridFooter",
|
|
904
|
+
"type": "attribute",
|
|
905
|
+
"defaultValue": "—",
|
|
906
|
+
"appliesTo": "[slDataGridFooter]",
|
|
907
|
+
"description": "What stands in the bar under the grid, after the range: pagination, a page-size select, a count."
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "align",
|
|
911
|
+
"type": "'start' | 'center' | 'end'",
|
|
912
|
+
"defaultValue": "start",
|
|
913
|
+
"appliesTo": "GridColumn",
|
|
914
|
+
"description": "Where the value sits; a number column sits at the end unless told otherwise."
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"name": "numeric",
|
|
918
|
+
"type": "boolean",
|
|
919
|
+
"defaultValue": "false",
|
|
920
|
+
"appliesTo": "GridColumn",
|
|
921
|
+
"description": "Tabular figures and end alignment; true for kind number."
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "text",
|
|
925
|
+
"type": "'wrap' | 'truncate' | 'nowrap'",
|
|
926
|
+
"defaultValue": "truncate",
|
|
927
|
+
"appliesTo": "GridColumn",
|
|
928
|
+
"description": "What a long value does."
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
"composition": [
|
|
932
|
+
{
|
|
933
|
+
"name": "provideDataGridDefaults",
|
|
934
|
+
"type": "provider",
|
|
935
|
+
"defaultValue": "—",
|
|
936
|
+
"appliesTo": "Application",
|
|
937
|
+
"description": "Sets variant, striped, stickyHeader, stickyTo, selectionMode, editMode, filterRow, virtualize, rowHeight, columnOverflow, overscan, pageSizes, filterDebounce, loadMoreThreshold and skeletonRows once for an injector. A grid that states one itself still wins. Its words and its locale come from the language in force (provideSlotted)."
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "@slotted/core/grid",
|
|
941
|
+
"type": "module",
|
|
942
|
+
"defaultValue": "—",
|
|
943
|
+
"appliesTo": "Application",
|
|
944
|
+
"description": "applyQuery, emptyQuery, withSortPress, withColumnFilter, withSearch, withPageIndex, withGroup, toGridParams, fromGridParams, normalizeColumnState, serializeColumnState, parseColumnState: the engine the grid runs on, for a server mock, a URL and a saved view."
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"name": "slDataGridCell, slDataGridEditor, slDataGridHeader, slDataGridFilter, slDataGridColumnHelp, slDataGridDetail, slDataGridGroup, slDataGridEmpty",
|
|
948
|
+
"type": "ng-template directives",
|
|
949
|
+
"defaultValue": "—",
|
|
950
|
+
"appliesTo": "sl-data-grid",
|
|
951
|
+
"description": "Every surface a consumer replaces, projected as content; the four column-scoped ones name a column or serve every column, and slDataGridColumnHelp names one column and draws its help button. row, cell, head and body are fixed: the layout and the roles are theirs."
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "slDataGridFooter",
|
|
955
|
+
"type": "attribute",
|
|
956
|
+
"defaultValue": "—",
|
|
957
|
+
"appliesTo": "sl-data-grid",
|
|
958
|
+
"description": "Pagination, a page-size select, a count: the consumer’s own controls projected into the bar the grid draws."
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"name": "exportAs=\"slDataGrid\"",
|
|
962
|
+
"type": "template reference",
|
|
963
|
+
"defaultValue": "—",
|
|
964
|
+
"appliesTo": "sl-data-grid",
|
|
965
|
+
"description": "The imperative surface for what cannot be said declaratively: focusCell, scrollToRow, scrollToColumn, scrollToCell, startEdit, stopEdit, autofit (reason programmatic), hide, outOfSpace, getVisibleRows, toCsv, exportCsv, reload, selectAll, clearSelection, announce."
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"name": "ControlValueAccessor",
|
|
969
|
+
"type": "forms",
|
|
970
|
+
"defaultValue": "—",
|
|
971
|
+
"appliesTo": "sl-data-grid",
|
|
972
|
+
"description": "formControlName or ngModel on the host reads and writes the row selection; a disabled control neither selects nor edits."
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"name": "native attributes",
|
|
976
|
+
"type": "attributes",
|
|
977
|
+
"defaultValue": "—",
|
|
978
|
+
"appliesTo": "sl-data-grid",
|
|
979
|
+
"description": "id, class and any attribute written on the host stay on the root; a consumer’s (keydown) on the host runs before the grid’s and preventDefault stops it."
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"name": "slFilterBar, slPagination, column-manager",
|
|
983
|
+
"type": "families",
|
|
984
|
+
"defaultValue": "—",
|
|
985
|
+
"appliesTo": "Beside the grid",
|
|
986
|
+
"description": "The bar edits query.filter; pagination moves query.page in the footer; column-manager edits columnState."
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
"events": [
|
|
990
|
+
{
|
|
991
|
+
"name": "queryChange",
|
|
992
|
+
"payload": "GridQuery",
|
|
993
|
+
"when": "The two-way half of the model: the query after a sort press, a filter applied, a search, a page or a group."
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"name": "queryChangeRequest",
|
|
997
|
+
"payload": "DataGridQueryRequest",
|
|
998
|
+
"when": "Before the query moves. change says which part: sort | filter | search | page | group; the reason is pointer, keyboard, clear or programmatic; cancel() refuses it."
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"name": "columnStateChange",
|
|
1002
|
+
"payload": "GridColumnState",
|
|
1003
|
+
"when": "The arrangement after a column is resized, moved, hidden or pinned."
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "columnStateChangeRequest",
|
|
1007
|
+
"payload": "DataGridColumnStateRequest",
|
|
1008
|
+
"when": "Before the arrangement moves. change says which: order | width | hidden | pinned; the reason is pointer, keyboard or programmatic. A hide is announced; the columns in value.hidden and not in previous.hidden are what an undo shows again."
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "outOfSpaceChange",
|
|
1012
|
+
"payload": "GridOutOfSpace",
|
|
1013
|
+
"when": "After the frame is measured, whenever the columns in the pop-in or the columns hidden for room change."
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"name": "valueChange",
|
|
1017
|
+
"payload": "string | readonly string[] | null",
|
|
1018
|
+
"when": "The selected rows after a checkbox press, Shift+Space, Ctrl+A or the header checkbox."
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "valueChangeRequest",
|
|
1022
|
+
"payload": "ChangeRequest<string | readonly string[] | null>",
|
|
1023
|
+
"when": "Before the row selection moves, with pointer, keyboard, select (the header checkbox, Ctrl+A), clear or programmatic."
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "rangeChange",
|
|
1027
|
+
"payload": "GridRange | null",
|
|
1028
|
+
"when": "The cell rectangle after the keyboard or a drag moved it, or null after Escape."
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"name": "rangeChangeRequest",
|
|
1032
|
+
"payload": "ChangeRequest<GridRange | null>",
|
|
1033
|
+
"when": "Before the rectangle moves, with pointer, keyboard, clear or programmatic."
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "currentChange",
|
|
1037
|
+
"payload": "GridCell | null",
|
|
1038
|
+
"when": "The cursor after an arrow key, a press, or the grid settling it after its row left."
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "currentChangeRequest",
|
|
1042
|
+
"payload": "ChangeRequest<GridCell | null>",
|
|
1043
|
+
"when": "Before the cursor moves, with pointer, keyboard or programmatic."
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "expandedChange",
|
|
1047
|
+
"payload": "readonly string[]",
|
|
1048
|
+
"when": "The rows whose detail is open, after one opened or closed."
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"name": "expandedChangeRequest",
|
|
1052
|
+
"payload": "ChangeRequest<readonly string[]>",
|
|
1053
|
+
"when": "Before a detail opens or closes."
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"name": "expandedGroupsChange",
|
|
1057
|
+
"payload": "readonly string[] | 'all'",
|
|
1058
|
+
"when": "The open groups, after one opened or closed."
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"name": "expandedGroupsChangeRequest",
|
|
1062
|
+
"payload": "ChangeRequest<readonly string[] | 'all'>",
|
|
1063
|
+
"when": "Before a group opens or closes."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "editStart / editCommit / editCancel",
|
|
1067
|
+
"payload": "GridCell / DataGridEditCommit / GridCell",
|
|
1068
|
+
"when": "When an editor opens; when a draft is committed by Enter, Tab, F2, a press elsewhere or blur — the commit carries key, column, value, previous, row, reason, every change of the row and wait(promise); when Escape cancels it."
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "activate",
|
|
1072
|
+
"payload": "DataGridActivateEvent",
|
|
1073
|
+
"when": "A double press or Enter on a text cell, or one touch or pen press, while activatable is true."
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"name": "loadMore / retry / manageColumns",
|
|
1077
|
+
"payload": "void",
|
|
1078
|
+
"when": "The window nears the end with hasMore; the error state’s Try again; the column menu’s Manage columns."
|
|
1079
|
+
}
|
|
1080
|
+
],
|
|
1081
|
+
"accessibility": [
|
|
1082
|
+
"The host is role=\"grid\": a composite widget with one tab stop. The current cell — or the single simple widget inside it, a link, a button or a checkbox — is the only element with tabindex=\"0\"; Tab enters there and leaves the grid to the next control of the page, which is what the APG requires of a grid and what a table cannot give.",
|
|
1083
|
+
"Every row carries aria-rowindex against aria-rowcount on the root, and every cell aria-colindex against aria-colcount, always: the grid windows its rows and columns, so the DOM is never the whole set, and the counts are what let a screen reader say “row 4,812 of 9,000”.",
|
|
1084
|
+
"aria-sort is written on the first sort key’s header only — the practice says more than one is ambiguous — and the whole order is announced through the live announcer: “Sorted by Carrier ascending, Weight descending”. A resize announces the column and its width; a filter announces its sentence through describeFilter; a copy announces the count.",
|
|
1085
|
+
"A cell that does not edit while others do carries aria-readonly=\"true\"; a draft that fails carries aria-invalid and its message in the title. A selected row carries aria-selected; a cell in a range carries it too, and the root aria-multiselectable in multiple and range.",
|
|
1086
|
+
"A column with a description is described by it: the header carries aria-describedby to a visually hidden span, and the column menu points at the same span while showing the text aria-hidden, so the words are heard once. The column help is a button with a name — “About Weight” — reached by F2 on the header; Tab cycles the header’s widgets and Escape returns to the cell. Hiding a column is announced as “Carrier hidden”.",
|
|
1087
|
+
"The header checkbox names what it covers — “Select all 3,412 rows”, or the page in server mode — because a selection over a whole result set is a decision only the query can make. Every control the grid draws has a name: the column menu, the filter trigger, the expander, the group toggle, the operator symbol."
|
|
1088
|
+
]
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
"tokens": [
|
|
1092
|
+
"--slotted-border-strong",
|
|
1093
|
+
"--slotted-border-subtle",
|
|
1094
|
+
"--slotted-border-width-thick",
|
|
1095
|
+
"--slotted-border-width-thin",
|
|
1096
|
+
"--slotted-control-font-family",
|
|
1097
|
+
"--slotted-control-font-size-md",
|
|
1098
|
+
"--slotted-control-font-size-sm",
|
|
1099
|
+
"--slotted-control-gap-md",
|
|
1100
|
+
"--slotted-control-height-md",
|
|
1101
|
+
"--slotted-control-icon-size-md",
|
|
1102
|
+
"--slotted-control-inner-size-sm",
|
|
1103
|
+
"--slotted-control-invalid-edge-width",
|
|
1104
|
+
"--slotted-control-padding-inline-md",
|
|
1105
|
+
"--slotted-control-padding-inline-sm",
|
|
1106
|
+
"--slotted-control-transition-duration",
|
|
1107
|
+
"--slotted-control-transition-easing",
|
|
1108
|
+
"--slotted-data-grid-band-surface",
|
|
1109
|
+
"--slotted-data-grid-block-size",
|
|
1110
|
+
"--slotted-data-grid-border-color",
|
|
1111
|
+
"--slotted-data-grid-border-color-strong",
|
|
1112
|
+
"--slotted-data-grid-border-width",
|
|
1113
|
+
"--slotted-data-grid-cell-padding-block",
|
|
1114
|
+
"--slotted-data-grid-cell-padding-inline",
|
|
1115
|
+
"--slotted-data-grid-changed-surface",
|
|
1116
|
+
"--slotted-data-grid-color",
|
|
1117
|
+
"--slotted-data-grid-color-muted",
|
|
1118
|
+
"--slotted-data-grid-control-radius",
|
|
1119
|
+
"--slotted-data-grid-cursor-color",
|
|
1120
|
+
"--slotted-data-grid-filter-operator-size",
|
|
1121
|
+
"--slotted-data-grid-filter-panel-size",
|
|
1122
|
+
"--slotted-data-grid-filter-panel-size-date",
|
|
1123
|
+
"--slotted-data-grid-filter-panel-size-datetime",
|
|
1124
|
+
"--slotted-data-grid-font-family",
|
|
1125
|
+
"--slotted-data-grid-font-size",
|
|
1126
|
+
"--slotted-data-grid-gap",
|
|
1127
|
+
"--slotted-data-grid-head-block-size",
|
|
1128
|
+
"--slotted-data-grid-header-surface",
|
|
1129
|
+
"--slotted-data-grid-header-surface-hover",
|
|
1130
|
+
"--slotted-data-grid-icon-size",
|
|
1131
|
+
"--slotted-data-grid-indent",
|
|
1132
|
+
"--slotted-data-grid-pin-shadow-color",
|
|
1133
|
+
"--slotted-data-grid-pin-shadow-size",
|
|
1134
|
+
"--slotted-data-grid-radius",
|
|
1135
|
+
"--slotted-data-grid-range-surface",
|
|
1136
|
+
"--slotted-data-grid-row-block-size",
|
|
1137
|
+
"--slotted-data-grid-row-color-selected",
|
|
1138
|
+
"--slotted-data-grid-row-max-block-size",
|
|
1139
|
+
"--slotted-data-grid-row-surface-hover",
|
|
1140
|
+
"--slotted-data-grid-row-surface-selected",
|
|
1141
|
+
"--slotted-data-grid-row-surface-selected-hover",
|
|
1142
|
+
"--slotted-data-grid-row-surface-stripe",
|
|
1143
|
+
"--slotted-data-grid-shadow",
|
|
1144
|
+
"--slotted-data-grid-sticky-offset",
|
|
1145
|
+
"--slotted-data-grid-sticky-offset-end",
|
|
1146
|
+
"--slotted-data-grid-surface",
|
|
1147
|
+
"--slotted-disabled-foreground",
|
|
1148
|
+
"--slotted-duration-long",
|
|
1149
|
+
"--slotted-duration-loop",
|
|
1150
|
+
"--slotted-duration-short",
|
|
1151
|
+
"--slotted-easing-standard",
|
|
1152
|
+
"--slotted-focus-ring-color",
|
|
1153
|
+
"--slotted-focus-ring-color-invalid",
|
|
1154
|
+
"--slotted-focus-ring-offset",
|
|
1155
|
+
"--slotted-focus-ring-width",
|
|
1156
|
+
"--slotted-font-size-xs",
|
|
1157
|
+
"--slotted-font-weight-medium",
|
|
1158
|
+
"--slotted-font-weight-regular",
|
|
1159
|
+
"--slotted-font-weight-semibold",
|
|
1160
|
+
"--slotted-ground",
|
|
1161
|
+
"--slotted-line-height-md",
|
|
1162
|
+
"--slotted-popover-gap",
|
|
1163
|
+
"--slotted-popover-padding-block-sm",
|
|
1164
|
+
"--slotted-popover-padding-inline-sm",
|
|
1165
|
+
"--slotted-radius-md",
|
|
1166
|
+
"--slotted-radius-sm",
|
|
1167
|
+
"--slotted-scrim",
|
|
1168
|
+
"--slotted-shadow-xs",
|
|
1169
|
+
"--slotted-space-1",
|
|
1170
|
+
"--slotted-space-2",
|
|
1171
|
+
"--slotted-space-3",
|
|
1172
|
+
"--slotted-space-4",
|
|
1173
|
+
"--slotted-space-5",
|
|
1174
|
+
"--slotted-space-6",
|
|
1175
|
+
"--slotted-space-8",
|
|
1176
|
+
"--slotted-surface",
|
|
1177
|
+
"--slotted-surface-sunken",
|
|
1178
|
+
"--slotted-target-comfortable",
|
|
1179
|
+
"--slotted-target-min",
|
|
1180
|
+
"--slotted-text",
|
|
1181
|
+
"--slotted-text-muted",
|
|
1182
|
+
"--slotted-tone-accent-border",
|
|
1183
|
+
"--slotted-tone-accent-solid",
|
|
1184
|
+
"--slotted-tone-accent-subtle-hover",
|
|
1185
|
+
"--slotted-tone-accent-surface",
|
|
1186
|
+
"--slotted-tone-accent-text",
|
|
1187
|
+
"--slotted-tone-danger-border",
|
|
1188
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
1189
|
+
"--slotted-z-index-sticky"
|
|
1190
|
+
],
|
|
1191
|
+
"examples": [
|
|
1192
|
+
{
|
|
1193
|
+
"id": "playground",
|
|
1194
|
+
"title": "Playground",
|
|
1195
|
+
"note": "Every capability on one listing of shipments: sort with a press and Shift, filter from the funnel or the row, select with the checkboxes, edit a cell with Enter, pin and resize from the header. The toolbar switches scheme, density and direction.",
|
|
1196
|
+
"language": "html",
|
|
1197
|
+
"source": "<sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"100%\"\n selectionMode=\"multiple\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n/>\n",
|
|
1198
|
+
"verdict": "excerpt"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"id": "columns",
|
|
1202
|
+
"title": "Columns",
|
|
1203
|
+
"note": "Each column declares its kind, and the kind decides the comparator, the operators, the editor and the alignment: a number column sits its digits at the end in tabular figures, a date column formats the ISO day in the reader’s locale, a set column names its values.",
|
|
1204
|
+
"language": "ts",
|
|
1205
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(8);\n\n@Component({\n selector: 'app-data-grid-columns',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"22rem\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridColumns {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n}\n",
|
|
1206
|
+
"verdict": "example"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"id": "column-groups",
|
|
1210
|
+
"title": "Column groups",
|
|
1211
|
+
"note": "A second header row above the columns: each group spans the columns it names, wherever the reader has laid them out, and a column no group names spans itself.",
|
|
1212
|
+
"language": "ts",
|
|
1213
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn, GridColumnGroup } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst GROUPS: GridColumnGroup[] = [\n { id: 'shipment', label: 'Shipment', columns: ['id', 'customer', 'destination'] },\n { id: 'transport', label: 'Transport', columns: ['carrier', 'status', 'shipped'] },\n { id: 'charges', label: 'Charges', columns: ['weight', 'cost'] },\n];\n\nconst ROWS = shipments(8);\n\n@Component({\n selector: 'app-data-grid-column-groups',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"22rem\"\n [columnGroups]=\"groups\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridColumnGroups {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly groups = GROUPS;\n}\n",
|
|
1214
|
+
"verdict": "example"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"id": "sorting",
|
|
1218
|
+
"title": "Sorting",
|
|
1219
|
+
"note": "A press on a header sorts ascending, a second descending, a third removes the key; Shift with the press appends the column to the order instead, and the second and third keys carry their index beside the mark. Enter on the header does the same from the keyboard.",
|
|
1220
|
+
"language": "ts",
|
|
1221
|
+
"source": "import { Component, computed, signal } from '@angular/core';\nimport { emptyQuery, type GridColumn, type GridQuery } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlText } from '@slotted/angular/typography';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(12);\n\n@Component({\n selector: 'app-data-grid-sorting',\n imports: [SlDataGrid, SlStack, SlText],\n template: `\n <div slStack [gap]=\"3\">\n <span slText size=\"sm\" tone=\"muted\">Sorted by: {{ order() }}</span>\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"22rem\"\n [(query)]=\"query\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n </div>\n `,\n})\nexport class DataGridSorting {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly query = signal<GridQuery>({\n ...emptyQuery(),\n sort: [\n { column: 'carrier', direction: 'ascending' },\n { column: 'cost', direction: 'descending' },\n ],\n });\n readonly order = computed(\n () =>\n this.query()\n .sort.map((key) => `${key.column} ${key.direction}`)\n .join(', ') || 'none',\n );\n}\n",
|
|
1222
|
+
"verdict": "example"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"id": "filter-panel",
|
|
1226
|
+
"title": "The filter panel",
|
|
1227
|
+
"note": "Ctrl+Enter on a header or its menu opens the panel: one line per condition — operator and operand in sm — the join as two words on the second line once the first is complete, Clear and Apply at the end. Nothing reaches the query until Apply.",
|
|
1228
|
+
"language": "ts",
|
|
1229
|
+
"source": "const query = signal(\n withColumnFilter(emptyQuery(), 'customer', {\n kind: 'text',\n join: 'or',\n conditions: [\n { operator: 'contains', value: 'nord' },\n { operator: 'startsWith', value: 'B' },\n ],\n }).query,\n);\n",
|
|
1230
|
+
"verdict": "excerpt"
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"id": "filter-row",
|
|
1234
|
+
"title": "The filter row",
|
|
1235
|
+
"note": "With filterRow the row under the header holds one operand per column, plain, with the operator as a symbol at its start — press it for the names in full. Text and number apply after the debounce and on Enter; a set, a boolean and a date apply on change. The cursor walks the row.",
|
|
1236
|
+
"language": "ts",
|
|
1237
|
+
"source": "import { Component } from '@angular/core';\nimport { emptyQuery, withColumnFilter, type GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst INITIAL_QUERY = withColumnFilter(emptyQuery(), 'status', {\n kind: 'set',\n join: 'and',\n conditions: [{ operator: 'anyOf', value: ['Delayed', 'Customs'] }],\n}).query;\n\nconst ROWS = shipments(24);\n\n@Component({\n selector: 'app-data-grid-filter-row',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n filterRow\n height=\"24rem\"\n [query]=\"initialQuery\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridFilterRow {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly initialQuery = INITIAL_QUERY;\n}\n",
|
|
1238
|
+
"verdict": "example"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"id": "filter-bar",
|
|
1242
|
+
"title": "With a filter bar",
|
|
1243
|
+
"note": "One descriptor, two families: the bar above edits query.filter and the grid evaluates it, nested groups included. A rule written in a column header appears as a chip in the bar, and a chip removed in the bar clears the header’s funnel.",
|
|
1244
|
+
"language": "html",
|
|
1245
|
+
"source": "<div\n slFilterBar\n [fields]=\"fields\"\n [value]=\"query().filter\"\n (valueChange)=\"query.set(withFilter(query(), $event).query)\"\n></div>\n<sl-data-grid rowKey=\"id\" [rows]=\"shipments()\" [columns]=\"columns\" [(query)]=\"query\" />\n",
|
|
1246
|
+
"verdict": "excerpt"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"id": "search",
|
|
1250
|
+
"title": "Search",
|
|
1251
|
+
"note": "One condition that belongs to no column: query.search is matched against the text of every searchable column through the locale collator, so \"agua\" finds \"Água\". The field that writes it is the consumer’s own text-field.",
|
|
1252
|
+
"language": "ts",
|
|
1253
|
+
"source": "import { Component, signal } from '@angular/core';\nimport { emptyQuery, withSearch, type GridColumn, type GridQuery } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(24);\n\n@Component({\n selector: 'app-data-grid-search',\n imports: [SlDataGrid, SlStack, SlTextField, SlTextFieldInput],\n template: `\n <div slStack [gap]=\"3\">\n <div slTextField clearable>\n <input\n slTextFieldInput\n aria-label=\"Search shipments\"\n placeholder=\"Search shipments\"\n [value]=\"query().search\"\n (valueChange)=\"search($event.value)\"\n />\n </div>\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"22rem\"\n [(query)]=\"query\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n </div>\n `,\n})\nexport class DataGridSearch {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly query = signal<GridQuery>({ ...emptyQuery(), search: 'graz' });\n\n search(text: string): void {\n this.query.update((current) => withSearch(current, text).query);\n }\n}\n",
|
|
1254
|
+
"verdict": "example"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"id": "selection",
|
|
1258
|
+
"title": "Row selection",
|
|
1259
|
+
"note": "single chooses one row with a press; multiple draws the checkbox column, pinned to the start: Shift extends from the anchor, Shift+Space toggles the row from any cell, Ctrl+A and the header checkbox cover every row the query left and say so in their name.",
|
|
1260
|
+
"language": "ts",
|
|
1261
|
+
"source": "import { Component, computed, signal } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid, SlDataGridFooter } from '@slotted/angular/data-grid';\nimport { SlText } from '@slotted/angular/typography';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(12);\n\n@Component({\n selector: 'app-data-grid-selection',\n imports: [SlDataGrid, SlDataGridFooter, SlText],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"24rem\"\n selectionMode=\"multiple\"\n [disabledKeys]=\"disabled\"\n [(value)]=\"value\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n >\n <span slDataGridFooter slText size=\"sm\" tone=\"muted\">{{ count() }} selected</span>\n </sl-data-grid>\n `,\n})\nexport class DataGridSelection {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly disabled = ['SH-3305'];\n readonly value = signal<string | readonly string[] | null>(['SH-3302', 'SH-3303']);\n readonly count = computed(() => {\n const value = this.value();\n return Array.isArray(value) ? value.length : value === null ? 0 : 1;\n });\n}\n",
|
|
1262
|
+
"verdict": "example"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"id": "range",
|
|
1266
|
+
"title": "Cell range",
|
|
1267
|
+
"note": "range selects a rectangle of cells: Shift with the arrows extends it from the anchor, Shift with a press sets it, a drag paints it, Ctrl+Space takes the column and Shift+Space the row. Ctrl+C copies it as tab-separated text; Escape clears it.",
|
|
1268
|
+
"language": "ts",
|
|
1269
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(12);\n\n@Component({\n selector: 'app-data-grid-range',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"24rem\"\n selectionMode=\"range\"\n [current]=\"start\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridRange {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly start = { row: 'SH-3303', column: 'weight' };\n}\n",
|
|
1270
|
+
"verdict": "example"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"id": "editing",
|
|
1274
|
+
"title": "Editing a cell",
|
|
1275
|
+
"note": "Enter, F2, a double press or a typed key open the cell’s editor — the field family of its kind, plain, filling the cell. Enter commits and moves one row down, Tab commits and moves to the next editable cell, Escape cancels. The commit may hand back a promise through wait(); the cell dims until it settles.",
|
|
1276
|
+
"language": "ts",
|
|
1277
|
+
"source": "import { Component, signal } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid, type DataGridEditCommit } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst EDIT_COLUMNS: GridColumn<Shipment>[] = COLUMNS.map((column) =>\n column.id === 'weight'\n ? {\n ...column,\n editable: true,\n validate: (value: unknown) =>\n typeof value === 'number' && value <= 0 ? 'Enter a weight above zero.' : null,\n }\n : ['customer', 'destination', 'carrier'].includes(column.id)\n ? { ...column, editable: true }\n : column,\n);\n\nconst ROWS = shipments(8);\n\n@Component({\n selector: 'app-data-grid-editing',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n editMode=\"cell\"\n height=\"22rem\"\n (editCommit)=\"commit($event)\"\n [columns]=\"columns\"\n [rows]=\"edited()\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridEditing {\n readonly rows = ROWS;\n readonly columns = EDIT_COLUMNS;\n readonly edited = signal(ROWS);\n\n commit({ key, changes }: DataGridEditCommit<Shipment>): void {\n this.edited.update((current) =>\n current.map((row) => (row.id === key ? { ...row, ...changes } : row)),\n );\n }\n}\n",
|
|
1278
|
+
"verdict": "example"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"id": "editing-row",
|
|
1282
|
+
"title": "Editing a row",
|
|
1283
|
+
"note": "editMode=\"row\" opens every editable cell of the row at once: Tab moves between them, Enter commits the row with every change in one request, Escape cancels them all.",
|
|
1284
|
+
"language": "ts",
|
|
1285
|
+
"source": "import { Component, signal } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid, type DataGridEditCommit } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst EDIT_COLUMNS: GridColumn<Shipment>[] = COLUMNS.map((column) =>\n column.id === 'weight'\n ? {\n ...column,\n editable: true,\n validate: (value: unknown) =>\n typeof value === 'number' && value <= 0 ? 'Enter a weight above zero.' : null,\n }\n : ['customer', 'destination', 'carrier'].includes(column.id)\n ? { ...column, editable: true }\n : column,\n);\n\nconst ROWS = shipments(8);\n\n@Component({\n selector: 'app-data-grid-editing-row',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n editMode=\"row\"\n height=\"22rem\"\n (editCommit)=\"commit($event)\"\n [columns]=\"columns\"\n [rows]=\"edited()\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridEditingRow {\n readonly rows = ROWS;\n readonly columns = EDIT_COLUMNS;\n readonly edited = signal(ROWS);\n\n commit({ key, changes }: DataGridEditCommit<Shipment>): void {\n this.edited.update((current) =>\n current.map((row) => (row.id === key ? { ...row, ...changes } : row)),\n );\n }\n}\n",
|
|
1286
|
+
"verdict": "example"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"id": "validation",
|
|
1290
|
+
"title": "Validation, failure and conflict",
|
|
1291
|
+
"note": "A column’s validate refuses a draft with a message: the cell turns invalid and keeps what was typed. A commit whose promise rejects reopens the editor with the draft and the error. A row that changes under an open editor is a conflict, said in the same place.",
|
|
1292
|
+
"language": "ts",
|
|
1293
|
+
"source": "const columns: GridColumn<Shipment>[] = [\n {\n id: 'weight',\n label: 'Weight',\n kind: 'number',\n editable: true,\n validate: (value) =>\n typeof value === 'number' && value < 0 ? 'A weight is not negative' : null,\n },\n];\nclass ShipmentsPage {\n onCommit(commit: DataGridEditCommit<Shipment>) {\n commit.wait(Promise.reject(new Error('Offline')));\n }\n}\n",
|
|
1294
|
+
"verdict": "excerpt"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"id": "activation",
|
|
1298
|
+
"title": "Row activation",
|
|
1299
|
+
"note": "activatable turns a double press or Enter on a text cell into activate with the row’s key — opening the record is a different act from choosing it, and the two never share a key. An editable cell keeps Enter for its editor. On a touch screen or with a pen one press activates, except on a widget in the cell or a cell in edit, and the double press that follows within 500ms is ignored.",
|
|
1300
|
+
"language": "ts",
|
|
1301
|
+
"source": "import { Component, signal } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlText } from '@slotted/angular/typography';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(12);\n\n@Component({\n selector: 'app-data-grid-activation',\n imports: [SlDataGrid, SlStack, SlText],\n template: `\n <div slStack [gap]=\"3\">\n <span slText size=\"sm\" tone=\"muted\">{{\n opened() ? 'Opened ' + opened() : 'Double-click a row, or press Enter on its shipment cell.'\n }}</span>\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n activatable\n height=\"22rem\"\n (activate)=\"opened.set($event.key)\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n </div>\n `,\n})\nexport class DataGridActivation {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly opened = signal<string | null>(null);\n}\n",
|
|
1302
|
+
"verdict": "example"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"id": "pinning",
|
|
1306
|
+
"title": "Pinned columns",
|
|
1307
|
+
"note": "A column pinned to the start or the end stays while the others scroll; the checkbox column is always pinned. Pin from the column menu or the state; the last column of each zone draws the edge, darker while something is hidden under it.",
|
|
1308
|
+
"language": "html",
|
|
1309
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n [columnState]=\"{ pinned: { start: ['id'], end: ['actions'] } }\"\n/>\n",
|
|
1310
|
+
"verdict": "excerpt"
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"id": "resize",
|
|
1314
|
+
"title": "Resizing",
|
|
1315
|
+
"note": "Drag the handle on a column’s trailing edge; Escape during the drag restores the width. From the keyboard, Ctrl+Shift+ArrowRight widens by eight pixels and announces the width; Ctrl+Shift+Enter and a double press on the handle fit the column to its mounted cells.",
|
|
1316
|
+
"language": "html",
|
|
1317
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n [(columnState)]=\"state\"\n (columnStateChangeRequest)=\"$event.change === 'width' && log($event.value.widths)\"\n/>\n",
|
|
1318
|
+
"verdict": "excerpt"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"id": "reorder",
|
|
1322
|
+
"title": "Reordering",
|
|
1323
|
+
"note": "Drag a header along the row: the drop indicator shows the boundary it lands on, and a column never leaves its pin zone. Alt+ArrowLeft and Alt+ArrowRight move the column one place from the keyboard. Every move is announced.",
|
|
1324
|
+
"language": "html",
|
|
1325
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n [columnState]=\"{ order: ['customer', 'id', 'carrier'] }\"\n/>\n",
|
|
1326
|
+
"verdict": "excerpt"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"id": "column-menu",
|
|
1330
|
+
"title": "The column menu",
|
|
1331
|
+
"note": "Revealed by the pointer and by the cursor, opened with Ctrl+Enter, a secondary press on the header (at the press; Shift keeps the browser’s menu) or Shift+F10 and the Menu key (on the header cell): sort ascending, descending or remove; filter; pin to either edge or unpin; fit to content, and fit all columns in one request; hide; and manage columns, which hands over to the application’s column-manager. A fit chosen by pointer carries reason pointer, by keyboard reason keyboard; Shift with a double press on the resizer fits every column.",
|
|
1332
|
+
"language": "html",
|
|
1333
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n manageable\n (manageColumns)=\"manager.set(true)\"\n/>\n",
|
|
1334
|
+
"verdict": "excerpt"
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"id": "column-help",
|
|
1338
|
+
"title": "A column that explains itself",
|
|
1339
|
+
"note": "Weight and Cost carry a description; Status carries an slDataGridColumnHelp template. The circled question mark stays shown, because a coarse pointer has no hover; it opens a popover on a press, Enter or Space, and never sorts. The description is also the header’s accessible description and the caption atop its menu. F2 on a header reaches the button without a pointer.",
|
|
1340
|
+
"language": "html",
|
|
1341
|
+
"source": "<sl-data-grid rowKey=\"id\" [rows]=\"shipments()\" [columns]=\"columns\">\n <ng-template slDataGridColumnHelp=\"status\">\n <p>Customs means the shipment is held at a border for inspection.</p>\n </ng-template>\n</sl-data-grid>\n",
|
|
1342
|
+
"verdict": "excerpt"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"id": "undo-hide",
|
|
1346
|
+
"title": "Undoing a hidden column",
|
|
1347
|
+
"note": "Hide column announces “Carrier hidden” and asks with change: hidden. The application answers with a toast whose Undo shows that column again through withColumnHidden: a hide moves no order, width or pin, so the column returns to its place and its width, and whatever the reader changed after the hide stays. Writing back request.previous would undo those changes too.",
|
|
1348
|
+
"language": "ts",
|
|
1349
|
+
"source": "export class ShipmentsPage {\n // <ng-template #undo let-message>\n // <button slButton size=\"sm\" (click)=\"restore(message.id)\">Undo</button>\n // </ng-template>\n private readonly undo = viewChild.required<TemplateRef<unknown>>('undo');\n /** The columns each toast's Undo shows again, by the toast. */\n private readonly hidden = new Map<string, readonly string[]>();\n\n onRequest(request: DataGridColumnStateRequest) {\n if (request.change !== 'hidden') return;\n const shown = request.value.hidden.filter((id) => !request.previous.hidden.includes(id));\n const toast = this.toasts.show({ title: 'Column hidden', actions: this.undo() });\n this.hidden.set(toast, shown);\n }\n\n restore(id: string) {\n const shown = this.hidden.get(id) ?? [];\n this.hidden.delete(id);\n this.columnState.update((state) =>\n shown.reduce((next, column) => withColumnHidden(next, column, false), state),\n );\n this.toasts.dismiss(id, 'pointer');\n }\n}\n",
|
|
1350
|
+
"verdict": "excerpt"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"id": "column-state",
|
|
1354
|
+
"title": "Saving a view",
|
|
1355
|
+
"note": "A view is the column state, the query and the density as one line of text: serializeGridView writes it, parseGridView reads it back and drops a column the model no longer has. persistedGridView keeps that line under a key in localStorage (or any store with getItem, setItem and removeItem; null keeps it in memory), reads it once, writes it after every change through an effect, and resets to the defaults by removing the entry. query and columnState take the two-way bindings and density the density input. Selection, cursor and expansion are session state and are not kept.",
|
|
1356
|
+
"language": "ts",
|
|
1357
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn, GridColumnState } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(12);\n\n@Component({\n selector: 'app-data-grid-column-state',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"24rem\"\n selectionMode=\"multiple\"\n [columnState]=\"state\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridColumnState {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly state: Partial<GridColumnState> = {\n pinned: { start: ['id'], end: ['cost'] },\n widths: { customer: 240 },\n };\n}\n",
|
|
1358
|
+
"verdict": "example"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"id": "grouping",
|
|
1362
|
+
"title": "Grouping",
|
|
1363
|
+
"note": "query.group names the columns the rows are grouped by, outermost first. A group row carries its level, its count and the aggregates of its rows; ArrowLeft closes it and ArrowRight opens it. expandedGroups is the set of open groups, all by default.",
|
|
1364
|
+
"language": "ts",
|
|
1365
|
+
"source": "import { Component } from '@angular/core';\nimport { emptyQuery, type GridColumn, type GridQuery } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst INITIAL_QUERY: GridQuery = {\n ...emptyQuery(),\n group: ['carrier'],\n sort: [{ column: 'id', direction: 'ascending' }],\n};\n\nconst ROWS = shipments(20);\n\n@Component({\n selector: 'app-data-grid-grouping',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"26rem\"\n [query]=\"initialQuery\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridGrouping {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly initialQuery = INITIAL_QUERY;\n}\n",
|
|
1366
|
+
"verdict": "example"
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"id": "summary",
|
|
1370
|
+
"title": "Aggregates",
|
|
1371
|
+
"note": "A column with aggregate — sum, avg, min, max, count or a function — draws the summary row, pinned to the end of the scroller, over every row the query kept; a grouped grid draws the same aggregate on each group row.",
|
|
1372
|
+
"language": "ts",
|
|
1373
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst SUM_COLUMNS: GridColumn<Shipment>[] = COLUMNS.map((column) =>\n column.id === 'weight' || column.id === 'cost'\n ? { ...column, aggregate: 'sum' as const }\n : column,\n);\n\nconst ROWS = shipments(10);\n\n@Component({\n selector: 'app-data-grid-summary',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"24rem\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridSummary {\n readonly rows = ROWS;\n readonly columns = SUM_COLUMNS;\n}\n",
|
|
1374
|
+
"verdict": "example"
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"id": "detail",
|
|
1378
|
+
"title": "Row detail",
|
|
1379
|
+
"note": "An ng-template with slDataGridDetail gives a row a detail: the expander column appears, ArrowRight on it opens the detail under the row as one cell spanning every column and held to the frame, ArrowLeft closes it. expanded is the set of open rows.",
|
|
1380
|
+
"language": "ts",
|
|
1381
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid, SlDataGridDetailTemplate } from '@slotted/angular/data-grid';\nimport { SlText } from '@slotted/angular/typography';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(8);\n\n@Component({\n selector: 'app-data-grid-detail',\n imports: [SlDataGrid, SlDataGridDetailTemplate, SlText],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"26rem\"\n [expanded]=\"expanded\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n >\n <ng-template slDataGridDetail let-row>\n <p slText size=\"sm\">\n {{ row.carrier }} picked up {{ row.weight.toFixed(1) }} kg on {{ row.shipped }} for\n {{ row.destination }}. Charged {{ money(row.cost) }}.\n </p>\n </ng-template>\n </sl-data-grid>\n `,\n})\nexport class DataGridDetail {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly expanded = ['SH-3301'];\n readonly money = money;\n}\n",
|
|
1382
|
+
"verdict": "example"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"id": "virtualization",
|
|
1386
|
+
"title": "Ten thousand rows",
|
|
1387
|
+
"note": "Above a hundred rows the grid windows them: the body is as tall as every row and only the ones in view, plus the overscan, are in the DOM. Scroll, or jump with Ctrl+End — the last row is mounted and focused. Above twenty middle columns the same happens sideways.",
|
|
1388
|
+
"language": "ts",
|
|
1389
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(10_000);\n\n@Component({\n selector: 'app-data-grid-virtualization',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments, 10,000 rows\"\n rowKey=\"id\"\n height=\"26rem\"\n selectionMode=\"multiple\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridVirtualization {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n}\n",
|
|
1390
|
+
"verdict": "example"
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
"id": "server",
|
|
1394
|
+
"title": "Server mode",
|
|
1395
|
+
"note": "With totalCount or hasMore the grid draws the rows it is given and reports the query instead of applying it: sorting, filtering, searching and paging all arrive as one request saying what changed, and a server answers with the page.",
|
|
1396
|
+
"language": "html",
|
|
1397
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"page().rows\"\n [columns]=\"columns\"\n [totalCount]=\"page().total\"\n [loading]=\"pending()\"\n [(query)]=\"query\"\n (queryChangeRequest)=\"fetchPage($event.value, $event.change)\"\n/>\n",
|
|
1398
|
+
"verdict": "excerpt"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"id": "data-source",
|
|
1402
|
+
"title": "A data source",
|
|
1403
|
+
"note": "dataSource hands the grid its own fetching: getRows is called with the query on every change and an AbortSignal, the request before it aborted; the answer — rows, total or hasMore — is kept by the query’s text (cacheSize, default 20), so a page the reader comes back to is on screen at once. The grid is in server mode with the loading and the error states of its own: a rejection is the error state with the message thrown, Try again asks the same query, reload() drops the cache. rows, totalCount, loading, error and retry are the source’s and are not read.",
|
|
1404
|
+
"language": "html",
|
|
1405
|
+
"source": "<sl-data-grid rowKey=\"id\" [columns]=\"columns\" [dataSource]=\"shipments\" [(query)]=\"query\" />\n",
|
|
1406
|
+
"verdict": "excerpt"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"id": "pagination",
|
|
1410
|
+
"title": "Pagination",
|
|
1411
|
+
"note": "query.page carries the index and the size; the pagination family projected with slDataGridFooter moves both, in the bar a table carries: a page size, the range and the two triggers, at the inline end. The status states the range, so showRange is off. A change of filter, search or group puts the page back at the start in the same request.",
|
|
1412
|
+
"language": "html",
|
|
1413
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n [(query)]=\"query\"\n [showRange]=\"false\"\n>\n <nav\n slDataGridFooter\n slPagination\n [count]=\"total()\"\n [pageSize]=\"pageSize()\"\n [pageSizeOptions]=\"[25, 50, 100]\"\n [page]=\"pageIndex() + 1\"\n (pageChange)=\"query.set(withPageIndex(query(), $event.value - 1).query)\"\n (pageSizeChange)=\"query.set(withPageSize(query(), $event.value).query)\"\n >\n <sl-pagination-page-size></sl-pagination-page-size>\n <p slPaginationStatus></p>\n <button slPaginationPrevious></button>\n <button slPaginationNext></button>\n </nav>\n</sl-data-grid>\n",
|
|
1414
|
+
"verdict": "excerpt"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"id": "load-more",
|
|
1418
|
+
"title": "Load more",
|
|
1419
|
+
"note": "With an unknown total the footer states the range without one and offers Load more; when the grid windows its rows, loadMore is emitted on its own as the window nears the end.",
|
|
1420
|
+
"language": "html",
|
|
1421
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"rows()\"\n [columns]=\"columns\"\n [hasMore]=\"hasMore()\"\n [query]=\"{ ...emptyQuery(), page: { cursor: cursor(), size: 50 } }\"\n (loadMore)=\"fetchMore()\"\n/>\n",
|
|
1422
|
+
"verdict": "excerpt"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"id": "empty-and-loading",
|
|
1426
|
+
"title": "Empty, no results, error, loading",
|
|
1427
|
+
"note": "Three states a body can hold instead of rows, each a result-state: nothing at all; nothing after the filter, with Clear filters; and a failed load, with Try again. A first load draws skeleton rows; a refresh over rows already shown dims them and moves nothing.",
|
|
1428
|
+
"language": "html",
|
|
1429
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"rows()\"\n [columns]=\"columns\"\n [loading]=\"loading()\"\n [error]=\"error()\"\n (retry)=\"reload()\"\n/>\n",
|
|
1430
|
+
"verdict": "excerpt"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"id": "variant",
|
|
1434
|
+
"title": "Variants",
|
|
1435
|
+
"note": "plain draws no rules and no band; ruled draws a rule between rows; framed adds the border, the radius and the footer inside. striped tints every second row under every state.",
|
|
1436
|
+
"language": "html",
|
|
1437
|
+
"source": "<sl-data-grid rowKey=\"id\" variant=\"framed\" striped [rows]=\"shipments()\" [columns]=\"columns\" />\n",
|
|
1438
|
+
"verdict": "excerpt"
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"id": "text",
|
|
1442
|
+
"title": "Long values",
|
|
1443
|
+
"note": "truncate is the default — a column has a width — and keeps the whole value in the cell’s title; wrap breaks an unbroken token rather than widening the column; nowrap keeps a code on one line. A value keeps its own direction in a right-to-left grid.",
|
|
1444
|
+
"language": "ts",
|
|
1445
|
+
"source": "const columns: GridColumn<Shipment>[] = [\n { id: 'customer', label: 'Customer', text: 'wrap' },\n { id: 'hash', label: 'Hash', text: 'nowrap' },\n];\n",
|
|
1446
|
+
"verdict": "excerpt"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"id": "density",
|
|
1450
|
+
"title": "Density",
|
|
1451
|
+
"note": "The row reads the theme’s control scale: 34 pixels at comfortable, 28 at compact, 26 at dense, with the type and the inset stepping with it. Without density the grid takes the page’s, which the toolbar switches; with density it writes data-slotted-density on its own root and holds that one whatever the page says. The menu and the popovers it opens are portals and stay at the page’s density.",
|
|
1452
|
+
"language": "html",
|
|
1453
|
+
"source": "<sl-data-grid density=\"dense\" rowKey=\"id\" [rows]=\"shipments()\" [columns]=\"columns\" />\n",
|
|
1454
|
+
"verdict": "excerpt"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"id": "responsive-priority",
|
|
1458
|
+
"title": "Columns that yield to a phone",
|
|
1459
|
+
"note": "The same grid in a phone-wide room. When the frame is too narrow for the template, columns leave the row: first those without a priority, the last first, then the highest priority; the identity column — the first rowHeader — and an actions column never leave. A column that leaves moves into the row’s pop-in, its label over its value drawn by the same cell template; one with popin: false is hidden instead. The root states the pop-in’s count as data-popin, rows grow to their fields, and outOfSpaceChange reports both sets — but the column state is untouched, so nothing is persisted and a wider frame brings them back. That is columnOverflow=\"auto\", the default, under 600px, or under 1024px with a coarse pointer; wider, with a mouse, it scrolls. columnOverflow=\"popin\" pops in at every width, and \"scroll\" keeps every column and scrolls.",
|
|
1460
|
+
"language": "html",
|
|
1461
|
+
"source": "<!-- columns: tracking rowHeader; status priority 1, eta 2, carrier 3; cost popin: false -->\n<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n (outOfSpaceChange)=\"out.set($event)\"\n/>\n",
|
|
1462
|
+
"verdict": "excerpt"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"id": "content",
|
|
1466
|
+
"title": "Content the grid did not choose",
|
|
1467
|
+
"note": "A hundred-character customer name, an unbroken identifier, a right-to-left name, a disabled row, an empty cell in a numeric column and a value with a dash: each holds where the family says it holds.",
|
|
1468
|
+
"language": "ts",
|
|
1469
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlAvatar } from '@slotted/angular/avatar';\nimport { SlBadge } from '@slotted/angular/badge';\nimport { SlDataGrid, SlDataGridCellTemplate } from '@slotted/angular/data-grid';\nimport { SlInline } from '@slotted/angular/inline';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst TONE: Record<string, 'secondary' | 'success' | 'danger' | 'warning'> = {\n 'In transit': 'secondary',\n Delivered: 'success',\n Delayed: 'danger',\n Customs: 'warning',\n};\n\nconst ROWS = shipments(10);\n\n@Component({\n selector: 'app-data-grid-content',\n imports: [SlAvatar, SlBadge, SlDataGrid, SlDataGridCellTemplate, SlInline],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"24rem\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n >\n <ng-template slDataGridCell=\"customer\" let-row=\"row\">\n <div slInline align=\"center\" [gap]=\"2\">\n <span slAvatar size=\"sm\" [name]=\"row.customer\"></span>\n {{ row.customer }}\n </div>\n </ng-template>\n <ng-template slDataGridCell=\"status\" let-value=\"value\">\n <span slBadge variant=\"soft\" [tone]=\"tone[value]\">{{ value }}</span>\n </ng-template>\n </sl-data-grid>\n `,\n})\nexport class DataGridContent {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly tone = TONE;\n}\n",
|
|
1470
|
+
"verdict": "example"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"id": "media",
|
|
1474
|
+
"title": "Pictures in cells",
|
|
1475
|
+
"note": "A cell template draws anything: an avatar beside the name, a thumbnail in a custom column. A stated rowHeight is the drawn row as well as the windowed one, so ten thousand rows of 56 pixels scroll to the right place. A cell with a picture and a name is one flex row of the template’s own; the grid lays out the template’s first element as the value.",
|
|
1476
|
+
"language": "html",
|
|
1477
|
+
"source": "<sl-data-grid rowKey=\"id\" [rows]=\"shipments()\" [columns]=\"columns\" [rowHeight]=\"56\">\n <ng-template slDataGridCell=\"customer\" let-row=\"row\">\n <span class=\"customer\">\n <span slAvatar [name]=\"row.customer\" size=\"sm\"></span>\n <span>{{ row.customer }}</span>\n </span>\n </ng-template>\n <ng-template slDataGridCell=\"photo\" let-row=\"row\">\n <div slImage alt=\"\" radius=\"sm\" ratio=\"landscape\" [src]=\"row.photo\"></div>\n </ng-template>\n</sl-data-grid>\n",
|
|
1478
|
+
"verdict": "excerpt"
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"id": "realtime",
|
|
1482
|
+
"title": "Realtime",
|
|
1483
|
+
"note": "rows is compared with the rows before it, by key, on the mounted rows only: a cell whose value changed is marked for the time highlightChanges states (true is 1200 ms) and fades on the accent’s subtle ground; under reduced motion the ground stays flat and leaves with the mark. A row that arrived is not a change. Selection, cursor, expansion and scroll survive every tick because the key is the identity.",
|
|
1484
|
+
"language": "html",
|
|
1485
|
+
"source": "<sl-data-grid rowKey=\"id\" [rows]=\"feed()\" [columns]=\"columns\" highlightChanges />\n",
|
|
1486
|
+
"verdict": "excerpt"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"id": "tree",
|
|
1490
|
+
"title": "Tree data",
|
|
1491
|
+
"note": "tree names each row’s parent by key; a row whose parent is not in rows is a root. The root is a treegrid, every row carries aria-level and a branch aria-expanded. The open branches are expanded — the same state the detail uses; a branch opens its children, a leaf its detail. Filter and search keep a row that matches or has a descendant that matches, with its ancestors; sorting is among siblings; the page is a slice of the open rows; query.group is ignored. In the tree column, ArrowRight opens a closed branch, ArrowLeft closes an open one and climbs to the parent from a leaf. A row hasChildren says has children not yet in rows emits loadChildren when opened, and shows the wait until they arrive.",
|
|
1492
|
+
"language": "ts",
|
|
1493
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn, GridTree } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Location {\n id: string;\n parent: string | null;\n name: string;\n kind: string;\n units: number;\n}\n\nconst LOCATIONS: Location[] = [\n { id: 'reno', parent: null, name: 'Reno, NV', kind: 'Warehouse', units: 4210 },\n { id: 'reno-a', parent: 'reno', name: 'Zone A — dry goods', kind: 'Zone', units: 2630 },\n { id: 'reno-a-01', parent: 'reno-a', name: 'Aisle 01', kind: 'Aisle', units: 1410 },\n { id: 'reno-a-02', parent: 'reno-a', name: 'Aisle 02', kind: 'Aisle', units: 1220 },\n { id: 'reno-b', parent: 'reno', name: 'Zone B — chilled', kind: 'Zone', units: 1580 },\n { id: 'columbus', parent: null, name: 'Columbus, OH', kind: 'Warehouse', units: 3075 },\n { id: 'columbus-a', parent: 'columbus', name: 'Zone A — dry goods', kind: 'Zone', units: 3075 },\n { id: 'savannah', parent: null, name: 'Savannah, GA', kind: 'Warehouse', units: 1890 },\n { id: 'savannah-a', parent: 'savannah', name: 'Zone A — bonded', kind: 'Zone', units: 1890 },\n];\n\nconst COLUMNS: GridColumn<Location>[] = [\n { id: 'name', label: 'Location', accessor: 'name', rowHeader: true, flex: 1, minWidth: 220 },\n { id: 'kind', label: 'Type', accessor: 'kind', width: 130 },\n { id: 'units', label: 'Units on hand', accessor: 'units', kind: 'number', width: 150 },\n];\n\nconst TREE: GridTree<Location> = { parentKey: (row) => row.parent };\n\n@Component({\n selector: 'app-data-grid-tree',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Stock by location\"\n height=\"22rem\"\n rowKey=\"id\"\n [columns]=\"columns\"\n [expanded]=\"expanded\"\n [rows]=\"locations\"\n [tree]=\"tree\"\n />\n `,\n})\nexport class DataGridTree {\n readonly locations = LOCATIONS;\n readonly columns = COLUMNS;\n readonly tree = TREE;\n readonly expanded = ['reno', 'reno-a'];\n}\n",
|
|
1494
|
+
"verdict": "example"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"id": "pinned-rows",
|
|
1498
|
+
"title": "Pinned rows",
|
|
1499
|
+
"note": "pinnedRows holds rows at the top or the bottom of the body, by key, in the stated order. A held row leaves the query — never sorted, filtered or paged — and stays on screen, under the head and over the summary, at the heights the grid measures for each. It is a row like any other: the cursor walks through it, it selects, edits and exports with the rest, and it counts in aria-rowcount.",
|
|
1500
|
+
"language": "html",
|
|
1501
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"rows()\"\n [columns]=\"columns\"\n [pinnedRows]=\"{ top: ['SHP-20487'], bottom: ['SHP-20481'] }\"\n/>\n",
|
|
1502
|
+
"verdict": "excerpt"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"id": "reorder-rows",
|
|
1506
|
+
"title": "Reordering rows",
|
|
1507
|
+
"note": "rowsReorderable draws a grip per row in a reserved column. The pointer drags from the grip and drops in a gap, with the same guide a column shows; Alt with the vertical arrows moves the row from any of its cells, and the move is announced. The grid keeps no order of its own: rowsReorder says where the row goes in rows (from and to, the index it takes once moved) and the consumer moves it. Only while the query is at rest — no sort, filter, search or group — and without a tree, because elsewhere the position on screen is not the position in rows; the grip is disabled otherwise.",
|
|
1508
|
+
"language": "html",
|
|
1509
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"rows()\"\n [columns]=\"columns\"\n rowsReorderable\n (rowsReorder)=\"move($event)\"\n/>\n",
|
|
1510
|
+
"verdict": "excerpt"
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"id": "export",
|
|
1514
|
+
"title": "Export and print",
|
|
1515
|
+
"note": "exportCsv() on the grid (exportAs slDataGrid) builds the file by toCsv — RFC 4180, each cell as the grid draws it — from the rows the query left (every page in client mode) and the columns not hidden in the reader’s order, or the selected rows and every column on request, and hands it to the browser as a download; toCsv() returns the text for a consumer who sends it elsewhere. In print, the frame grows to its rows, nothing scrolls or sticks, and the pointer’s controls are not on paper; a windowed grid prints the rows it has mounted, so a consumer who prints ten thousand turns the window off first. Excel is the consumer’s: SheetJS reads the same text.",
|
|
1516
|
+
"language": "html",
|
|
1517
|
+
"source": "<sl-data-grid #grid=\"slDataGrid\" rowKey=\"id\" [rows]=\"shipments()\" [columns]=\"columns\" />\n<button slButton (click)=\"grid.exportCsv({ filename: 'shipments.csv' })\">CSV</button>\n<button slButton (click)=\"grid.exportCsv({ rows: 'selected', bom: true })\">\n Selected, for Excel\n</button>\n<button slButton (click)=\"print()\">Print</button>\n",
|
|
1518
|
+
"verdict": "excerpt"
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"id": "keyboard",
|
|
1522
|
+
"title": "Keyboard",
|
|
1523
|
+
"note": "Tab enters on the current cell and leaves the grid. The arrows move one cell, Home and End along the row, Ctrl+Home and Ctrl+End to the corners, PageUp and PageDown a view. Enter and F2 enter a cell, Escape leaves it. On a header: Enter sorts, Shift+Enter appends, Ctrl+Enter, Shift+F10 and the Menu key open the menu, Ctrl+Shift+arrows resize, Alt+arrows move. The pop-in is the last cell of a row.",
|
|
1524
|
+
"language": "html",
|
|
1525
|
+
"source": "<sl-data-grid\n rowKey=\"id\"\n [rows]=\"shipments()\"\n [columns]=\"columns\"\n [(current)]=\"cell\"\n (currentChangeRequest)=\"log($event.value, $event.reason)\"\n/>\n",
|
|
1526
|
+
"verdict": "excerpt"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"id": "accessibility",
|
|
1530
|
+
"title": "What a reader hears",
|
|
1531
|
+
"note": "A grid named by aria-label; every row with its index in the whole set and every cell with its column index; aria-sort on the first key and the rest announced; the selection’s size in the header checkbox’s name; a resize as a width; a filter as its sentence. Inspect the tree with a screen reader.",
|
|
1532
|
+
"language": "ts",
|
|
1533
|
+
"source": "@Component({\n template: `<sl-data-grid aria-label=\"Shipments\" [messages]=\"messages\" />`,\n})\nclass Shipments {\n readonly messages: PartialMessages<DataGridMessages> = {\n selectAllFiltered:\n '{count, plural, one {Select the # shipment} other {Select all # shipments}}',\n };\n}\n",
|
|
1534
|
+
"verdict": "excerpt"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"id": "basic",
|
|
1538
|
+
"title": "basic.ts",
|
|
1539
|
+
"note": null,
|
|
1540
|
+
"language": "ts",
|
|
1541
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlBadge } from '@slotted/angular/badge';\nimport { SlDataGrid, SlDataGridCellTemplate } from '@slotted/angular/data-grid';\n\ninterface Order {\n id: string;\n customer: string;\n warehouse: string;\n status: string;\n placed: string;\n total: number;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst WAREHOUSES = ['Reno', 'Columbus', 'Savannah'];\nconst STATUSES = ['Processing', 'Shipped', 'On hold', 'Delivered'];\n\nconst ORDERS: Order[] = Array.from({ length: 24 }, (_, index) => ({\n id: `SO-${10421 + index}`,\n customer: CUSTOMERS[(index * 5) % CUSTOMERS.length]!,\n warehouse: WAREHOUSES[index % WAREHOUSES.length]!,\n status: STATUSES[(index * 3) % STATUSES.length]!,\n placed: `2026-09-${String(1 + (index % 28)).padStart(2, '0')}`,\n total: 140 + ((index * 733) % 4100),\n}));\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\n\nconst TONE: Record<string, 'accent' | 'secondary' | 'success' | 'warning'> = {\n Delivered: 'success',\n 'On hold': 'warning',\n Processing: 'accent',\n Shipped: 'secondary',\n};\n\nconst COLUMNS: GridColumn<Order>[] = [\n { id: 'id', label: 'Order', accessor: 'id', rowHeader: true, width: 120, sortable: true },\n {\n id: 'customer',\n label: 'Customer',\n accessor: 'customer',\n flex: 1,\n minWidth: 180,\n sortable: true,\n },\n { id: 'warehouse', label: 'Warehouse', accessor: 'warehouse', width: 130, sortable: true },\n { id: 'status', label: 'Status', accessor: 'status', width: 130, sortable: true },\n { id: 'placed', label: 'Placed', accessor: 'placed', kind: 'date', width: 130, sortable: true },\n {\n id: 'total',\n label: 'Total',\n accessor: 'total',\n numeric: true,\n width: 130,\n sortable: true,\n format: (value) => USD.format(value as number),\n },\n];\n\n@Component({\n selector: 'app-data-grid-basic',\n imports: [SlBadge, SlDataGrid, SlDataGridCellTemplate],\n template: `\n <sl-data-grid\n aria-label=\"Orders\"\n height=\"24rem\"\n rowKey=\"id\"\n selectionMode=\"multiple\"\n [columns]=\"columns\"\n [rows]=\"orders\"\n >\n <ng-template slDataGridCell=\"status\" let-value=\"value\">\n <span slBadge variant=\"soft\" [tone]=\"tone[value]\">{{ value }}</span>\n </ng-template>\n </sl-data-grid>\n `,\n})\nexport class DataGridBasic {\n readonly orders = ORDERS;\n readonly columns = COLUMNS;\n readonly tone = TONE;\n}\n",
|
|
1542
|
+
"verdict": "example"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"id": "empty",
|
|
1546
|
+
"title": "empty.ts",
|
|
1547
|
+
"note": null,
|
|
1548
|
+
"language": "ts",
|
|
1549
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = [] as Shipment[];\n\n@Component({\n selector: 'app-data-grid-empty',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"18rem\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridEmpty {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n}\n",
|
|
1550
|
+
"verdict": "example"
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"id": "error",
|
|
1554
|
+
"title": "error.ts",
|
|
1555
|
+
"note": null,
|
|
1556
|
+
"language": "ts",
|
|
1557
|
+
"source": "import { Component, signal } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = [] as Shipment[];\n\n@Component({\n selector: 'app-data-grid-error',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n error=\"The shipments service did not answer within 30 seconds.\"\n height=\"18rem\"\n (retry)=\"attempts.set(attempts() + 1)\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridError {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly attempts = signal(0);\n}\n",
|
|
1558
|
+
"verdict": "example"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"id": "loading",
|
|
1562
|
+
"title": "loading.ts",
|
|
1563
|
+
"note": null,
|
|
1564
|
+
"language": "ts",
|
|
1565
|
+
"source": "import { Component } from '@angular/core';\nimport type { GridColumn } from '@slotted/core/grid';\nimport { SlDataGrid } from '@slotted/angular/data-grid';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = [] as Shipment[];\n\n@Component({\n selector: 'app-data-grid-loading',\n imports: [SlDataGrid],\n template: `\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"18rem\"\n loading\n [columns]=\"columns\"\n [rows]=\"rows\"\n ></sl-data-grid>\n `,\n})\nexport class DataGridLoading {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n}\n",
|
|
1566
|
+
"verdict": "example"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"id": "shipments-workspace",
|
|
1570
|
+
"title": "shipments-workspace.ts",
|
|
1571
|
+
"note": null,
|
|
1572
|
+
"language": "ts",
|
|
1573
|
+
"source": "import { Component, computed, signal } from '@angular/core';\nimport { emptyQuery, withSearch, type GridColumn, type GridQuery } from '@slotted/core/grid';\nimport { SlButton } from '@slotted/angular/button';\nimport { SlDataGrid, SlDataGridFooter } from '@slotted/angular/data-grid';\nimport { SlInline } from '@slotted/angular/inline';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';\nimport { SlText } from '@slotted/angular/typography';\n\ninterface Shipment {\n id: string;\n customer: string;\n destination: string;\n carrier: string;\n status: string;\n shipped: string;\n weight: number;\n cost: number;\n priority: boolean;\n}\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst DESTINATIONS = [\n 'Berlin, DE',\n 'Marseille, FR',\n 'Graz, AT',\n 'Bräcke, SE',\n 'Rio de Janeiro, BR',\n 'Cowes, UK',\n 'Boise, US',\n 'Oulu, FI',\n];\nconst CARRIERS = ['UPS', 'FedEx', 'DHL', 'USPS'];\nconst STATUSES = ['In transit', 'Delivered', 'Delayed', 'Customs'];\n\nfunction shipments(count: number): Shipment[] {\n let seed = 7;\n const next = () => (seed = (seed * 1664525 + 1013904223) % 4294967296) / 4294967296;\n const pick = <T>(list: readonly T[]) => list[Math.floor(next() * list.length)]!;\n return Array.from({ length: count }, (_, index) => {\n const weight = Math.round(next() * 9000) / 10;\n return {\n id: `SH-${3301 + index}`,\n customer: pick(CUSTOMERS),\n destination: pick(DESTINATIONS),\n carrier: pick(CARRIERS),\n status: pick(STATUSES),\n shipped: `2026-09-${String(1 + Math.floor(next() * 28)).padStart(2, '0')}`,\n weight,\n cost: Math.round(weight * (2 + next() * 3) * 100) / 100,\n priority: next() < 0.3,\n };\n });\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\nconst money = (value: unknown) => (typeof value === 'number' ? USD.format(value) : '');\nconst kilograms = (value: unknown) => (typeof value === 'number' ? `${value.toFixed(1)} kg` : '');\n\nconst COLUMNS: GridColumn<Shipment>[] = [\n { id: 'id', label: 'Shipment', accessor: 'id', rowHeader: true, width: 120, text: 'nowrap' },\n { id: 'customer', label: 'Customer', accessor: 'customer', flex: 1, minWidth: 180 },\n { id: 'destination', label: 'Destination', accessor: 'destination', width: 170 },\n {\n id: 'carrier',\n label: 'Carrier',\n accessor: 'carrier',\n kind: 'set',\n width: 110,\n options: CARRIERS.map((value) => ({ value, label: value })),\n },\n {\n id: 'status',\n label: 'Status',\n accessor: 'status',\n kind: 'set',\n width: 120,\n options: STATUSES.map((value) => ({ value, label: value })),\n },\n { id: 'shipped', label: 'Shipped', accessor: 'shipped', kind: 'date', width: 130 },\n {\n id: 'weight',\n label: 'Weight',\n accessor: 'weight',\n kind: 'number',\n width: 110,\n format: kilograms,\n },\n { id: 'cost', label: 'Cost', accessor: 'cost', kind: 'number', width: 120, format: money },\n];\n\nconst ROWS = shipments(60);\n\n@Component({\n selector: 'app-data-grid-shipments-workspace',\n imports: [\n SlButton,\n SlDataGrid,\n SlDataGridFooter,\n SlInline,\n SlStack,\n SlText,\n SlTextField,\n SlTextFieldInput,\n ],\n template: `\n <div slStack [gap]=\"3\">\n <div slTextField clearable>\n <input\n slTextFieldInput\n aria-label=\"Search shipments\"\n placeholder=\"Search by shipment, customer or destination\"\n [value]=\"query().search\"\n (valueChange)=\"search($event.value)\"\n />\n </div>\n <sl-data-grid\n aria-label=\"Shipments\"\n rowKey=\"id\"\n height=\"26rem\"\n selectionMode=\"multiple\"\n [(query)]=\"query\"\n [(value)]=\"value\"\n [columns]=\"columns\"\n [rows]=\"rows\"\n >\n <div slDataGridFooter slInline align=\"center\" [gap]=\"3\">\n <span slText size=\"sm\" tone=\"muted\">{{ count() }} selected</span>\n <button slButton type=\"button\" size=\"sm\" variant=\"outline\" [disabled]=\"count() === 0\">\n Print labels\n </button>\n </div>\n </sl-data-grid>\n </div>\n `,\n})\nexport class DataGridShipmentsWorkspace {\n readonly rows = ROWS;\n readonly columns = COLUMNS;\n readonly query = signal<GridQuery>(emptyQuery());\n readonly value = signal<string | readonly string[] | null>([]);\n readonly count = computed(() => {\n const value = this.value();\n return Array.isArray(value) ? value.length : 0;\n });\n\n search(text: string): void {\n this.query.update((current) => withSearch(current, text).query);\n }\n}\n",
|
|
1574
|
+
"verdict": "example"
|
|
1575
|
+
}
|
|
1576
|
+
]
|
|
1577
|
+
}
|