@salesforce/ui-bundle-template-app-angular-template-b2e 11.60.0 → 11.62.1
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/dist/CHANGELOG.md +24 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/angular.json +2 -7
- package/dist/force-app/main/default/uiBundles/angularintapp/components.json +6 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/eslint.config.js +9 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/package.json +16 -11
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/app.config.ts +4 -6
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/app.routes.ts +3 -2
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/alert/alert.html +9 -13
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/alert/alert.ts +16 -28
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/button/button.html +19 -10
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/button/button.ts +34 -25
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/card/card.ts +40 -50
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/collapsible/collapsible.html +38 -10
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/collapsible/collapsible.ts +6 -11
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-picker/date-picker.html +17 -22
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-picker/date-picker.ts +29 -21
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-range-picker/date-range-picker.html +16 -30
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-range-picker/date-range-picker.ts +39 -36
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/dialog/dialog.html +13 -30
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/dialog/dialog.ts +6 -21
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/dropdown-menu/dropdown-menu.html +20 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/dropdown-menu/dropdown-menu.ts +100 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/field/field.html +5 -11
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/field/field.ts +10 -18
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/field-appearance.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/icon/icon.ts +62 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/input/input.html +32 -17
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/input/input.ts +57 -14
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/label/label.ts +8 -4
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/paginator/paginator.html +74 -10
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/paginator/paginator.ts +74 -18
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/paginator/types.ts +13 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/popover/popover.html +10 -38
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/popover/popover.ts +12 -15
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/select/select.html +34 -22
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/select/select.ts +25 -34
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/separator/separator.ts +11 -36
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/skeleton/skeleton.ts +5 -9
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/spinner/spinner.ts +14 -21
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/agentforce/conversation.html +1 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/agentforce/conversation.ts +0 -3
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/breadcrumb/breadcrumb.html +4 -24
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/breadcrumb/breadcrumb.ts +3 -16
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/date-filter.ts +1 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/date-range-filter.html +2 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/date-range-filter.ts +6 -15
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/filter-field-wrapper.html +2 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/filter-field-wrapper.ts +2 -17
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/multi-select-filter.html +2 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/numeric-range-filter.ts +3 -21
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/search-filter.html +3 -3
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/search-filter.ts +9 -13
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/select-filter.html +2 -5
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/select-filter.ts +1 -15
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/text-filter.html +2 -5
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/filters/text-filter.ts +3 -17
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/pagination/pagination.ts +4 -20
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/search-bar/search-bar.html +10 -59
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/search-bar/search-bar.ts +13 -93
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/sort-control/sort-control.html +3 -29
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/features/object-search/sort-control/sort-control.ts +5 -12
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/account-detail/account-detail-page.html +1 -23
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/account-detail/account-detail-page.ts +3 -23
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/account-search/account-search-page.html +1 -19
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/account-search/account-search-page.ts +8 -36
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/home/home.html +15 -4
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/home/home.spec.ts +8 -6
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/home/home.ts +56 -4
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert-action.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert-title.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/button/hlm-button.token.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/button/hlm-button.ts +72 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/button/index.ts +6 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/calendar/hlm-calendar-multi.ts +195 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/calendar/hlm-calendar-range.ts +194 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/calendar/hlm-calendar.ts +189 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/calendar/hlm-month-year-calendar.ts +119 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/calendar/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-action.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-avatar.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-footer.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-header.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card.token.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/hlm-card.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/card/index.ts +28 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/collapsible/hlm-collapsible-content.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/collapsible/hlm-collapsible-trigger.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/collapsible/hlm-collapsible.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/collapsible/index.ts +13 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-multi-input.ts +104 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker-anchor.ts +23 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker-input.ts +118 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker-multi.token.ts +109 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker-multi.ts +220 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker-trigger.ts +104 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker.token.ts +69 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-picker.ts +203 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-range-input.ts +120 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-range-picker.token.ts +86 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-date-range-picker.ts +252 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-month-year-input.ts +105 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-month-year-picker.token.ts +89 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/hlm-month-year-picker.ts +196 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/date-picker/index.ts +38 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-close.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-content.ts +74 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-footer.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-overlay.ts +27 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-title.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog.service.ts +46 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/hlm-dialog.ts +24 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dialog/index.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox.ts +54 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-focus-on-hover.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-item-sub-indicator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-item.ts +42 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-label.ts +20 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio.ts +49 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-separator.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-shortcut.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub-trigger.ts +52 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub.ts +53 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-token.ts +26 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-trigger.ts +46 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/hlm-dropdown-menu.ts +57 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/dropdown-menu/index.ts +49 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-description.ts +53 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-error.ts +100 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-group.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-legend.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-separator.ts +24 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-set.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field-title.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/hlm-field.ts +47 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/field/index.ts +34 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input/hlm-input.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/hlm-input-group-addon.ts +40 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/hlm-input-group-button.ts +47 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/hlm-input-group-input.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/hlm-input-group-text.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/hlm-input-group.ts +18 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/input-group/index.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/label/hlm-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/label/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/label/label.html +11 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-numbered-pagination-query-params.ts +191 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-numbered-pagination.ts +290 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-ellipsis.ts +27 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-item.ts +7 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-link.ts +51 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-next.ts +65 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination-previous.ts +65 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/hlm-pagination.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/pagination/index.ts +31 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-content.ts +25 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/hlm-popover.ts +23 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/popover/index.ts +25 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-content.ts +44 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-item.ts +36 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-label.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-multiple.ts +37 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-placeholder.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-scroll-down.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-scroll-up.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-separator.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-trigger.ts +59 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-value-template.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-value.ts +18 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-values-content.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select-values.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/hlm-select.ts +37 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/select/index.ts +52 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/separator/hlm-separator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/separator/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/skeleton/hlm-skeleton.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/skeleton/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/spinner/hlm-spinner.ts +26 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/spinner/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/utils/hlm.ts +313 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/utils/index.ts +2 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/utils/provide-spartan-hlm.ts +34 -0
- package/dist/force-app/main/default/uiBundles/angularintapp/src/index.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/{styles.scss → styles.css} +7 -38
- package/dist/force-app/main/default/uiBundles/angularintapp/tsconfig.json +4 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/_field-size.scss +0 -42
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/button/button.scss +0 -112
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/card/card.scss +0 -34
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-picker/date-picker.scss +0 -36
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/date-range-picker/date-range-picker.scss +0 -33
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/input/input.scss +0 -35
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/label/label.html +0 -3
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/select/select.scss +0 -35
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/separator/separator.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/separator/separator.scss +0 -23
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/skeleton/skeleton.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/components/ui/skeleton/skeleton.scss +0 -28
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/account-detail/account-detail-page.scss +0 -7
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/home/home-page.html +0 -18
- package/dist/force-app/main/default/uiBundles/angularintapp/src/app/pages/home/home-page.ts +0 -47
- package/dist/force-app/main/default/uiBundles/angularintapp/src/theme.scss +0 -39
|
@@ -5,13 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ChangeDetectionStrategy, Component, computed, inject, signal } from "@angular/core";
|
|
7
7
|
import { RouterLink } from "@angular/router";
|
|
8
|
-
// Base-app UI wrappers, inherited (not recreated) by this feature. Post-compose
|
|
9
|
-
// they land at uiBundles/<target>/src/app/components/ui/..., three levels up from this
|
|
10
|
-
// page folder (app/features/account-search/ -> app/components/ui/).
|
|
11
8
|
import { AlertComponent } from "../../components/ui/alert/alert";
|
|
9
|
+
import { IconComponent } from "../../components/ui/icon/icon";
|
|
12
10
|
import { CollapsibleComponent } from "../../components/ui/collapsible/collapsible";
|
|
13
11
|
import { SkeletonComponent } from "../../components/ui/skeleton/skeleton";
|
|
14
|
-
// Object-search feature building blocks (Waves 1-2), two levels up.
|
|
15
12
|
import { ObjectBreadcrumbComponent } from "../../features/object-search/breadcrumb/breadcrumb";
|
|
16
13
|
import { SortControlComponent } from "../../features/object-search/sort-control/sort-control";
|
|
17
14
|
import { ActiveFiltersComponent } from "../../features/object-search/filters/active-filters";
|
|
@@ -37,18 +34,14 @@ import {
|
|
|
37
34
|
type AccountSearchOptions,
|
|
38
35
|
} from "../../api/account/account-search.service";
|
|
39
36
|
|
|
40
|
-
/** Cursor-pagination config for the account search (mirrors the React reference). */
|
|
41
37
|
const PAGINATION_CONFIG: PaginationConfig = {
|
|
42
38
|
defaultPageSize: 7,
|
|
43
39
|
validPageSizes: [7, 14, 28, 42],
|
|
44
40
|
};
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* are filled in at runtime (see the component's computed configs) from the
|
|
50
|
-
* distinct-value aggregate queries.
|
|
51
|
-
*/
|
|
42
|
+
// Single source of truth for URL (de)serialization and GraphQL `where`
|
|
43
|
+
// building. Picklist options for Industry / Type are filled in at runtime
|
|
44
|
+
// (see the component's computed configs) from the distinct-value queries.
|
|
52
45
|
const FILTER_CONFIGS: FilterFieldConfig[] = [
|
|
53
46
|
{
|
|
54
47
|
field: "search",
|
|
@@ -70,7 +63,6 @@ const FILTER_CONFIGS: FilterFieldConfig[] = [
|
|
|
70
63
|
},
|
|
71
64
|
];
|
|
72
65
|
|
|
73
|
-
/** Sortable fields exposed by the sort control (mirrors the React reference). */
|
|
74
66
|
const ACCOUNT_SORT_CONFIGS: SortFieldConfig[] = [
|
|
75
67
|
{ field: "Name", label: "Name" },
|
|
76
68
|
{ field: "AnnualRevenue", label: "Annual Revenue" },
|
|
@@ -78,20 +70,9 @@ const ACCOUNT_SORT_CONFIGS: SortFieldConfig[] = [
|
|
|
78
70
|
{ field: "CreatedDate", label: "Created Date" },
|
|
79
71
|
];
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
* area with sort control, active-filter chips, a results list, and cursor
|
|
85
|
-
* pagination.
|
|
86
|
-
*
|
|
87
|
-
* State lives in a page-scoped {@link ObjectSearchStateService} (provided here,
|
|
88
|
-
* NOT in root) so each search page owns its own filters / sort / cursor stack.
|
|
89
|
-
* The filter components projected into the sidebar inject that same instance.
|
|
90
|
-
*
|
|
91
|
-
* Data flows through {@link createAsyncData}: whenever the derived query args
|
|
92
|
-
* (where / orderBy / pageSize / afterCursor) change, the search re-runs with
|
|
93
|
-
* latest-wins semantics.
|
|
94
|
-
*/
|
|
73
|
+
// State lives in a page-scoped ObjectSearchStateService (provided here, NOT
|
|
74
|
+
// in root) so each search page owns its own filters / sort / cursor stack;
|
|
75
|
+
// the filter components projected into the sidebar inject that same instance.
|
|
95
76
|
@Component({
|
|
96
77
|
selector: "app-account-search-page",
|
|
97
78
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -99,6 +80,7 @@ const ACCOUNT_SORT_CONFIGS: SortFieldConfig[] = [
|
|
|
99
80
|
imports: [
|
|
100
81
|
RouterLink,
|
|
101
82
|
AlertComponent,
|
|
83
|
+
IconComponent,
|
|
102
84
|
CollapsibleComponent,
|
|
103
85
|
SkeletonComponent,
|
|
104
86
|
ObjectBreadcrumbComponent,
|
|
@@ -119,21 +101,16 @@ export class AccountSearchPageComponent {
|
|
|
119
101
|
private readonly service = inject(AccountSearchService);
|
|
120
102
|
private readonly state = inject(ObjectSearchStateService);
|
|
121
103
|
|
|
122
|
-
/** Sortable field configs surfaced to the sort control. */
|
|
123
104
|
protected readonly sortConfigs = ACCOUNT_SORT_CONFIGS;
|
|
124
|
-
/** Allowed page sizes forwarded to the pagination controls. */
|
|
125
105
|
protected readonly pageSizeOptions = PAGINATION_CONFIG.validPageSizes;
|
|
126
106
|
|
|
127
|
-
/** Collapsible open state for the sidebar filter panel. */
|
|
128
107
|
protected readonly filtersOpen = signal<boolean>(true);
|
|
129
108
|
|
|
130
|
-
/** Derived, API-ready `where` / `orderBy` signals from the shared state. */
|
|
131
109
|
private readonly query = this.state.init<
|
|
132
110
|
AccountSearchOptions["where"],
|
|
133
111
|
AccountSearchOptions["orderBy"]
|
|
134
112
|
>(FILTER_CONFIGS, PAGINATION_CONFIG);
|
|
135
113
|
|
|
136
|
-
/** Live page-size / cursor signals from the shared state. */
|
|
137
114
|
protected readonly pageSize = this.state.pageSize;
|
|
138
115
|
protected readonly hasPreviousPage = this.state.hasPreviousPage;
|
|
139
116
|
|
|
@@ -177,7 +154,6 @@ export class AccountSearchPageComponent {
|
|
|
177
154
|
protected readonly hasNextPage = computed(() => this.pageInfo()?.hasNextPage ?? false);
|
|
178
155
|
protected readonly endCursor = computed(() => this.pageInfo()?.endCursor ?? undefined);
|
|
179
156
|
|
|
180
|
-
/** Non-null account nodes from the current page's edges. */
|
|
181
157
|
protected readonly nodes = computed<AccountSearchNode[]>(() => {
|
|
182
158
|
const edges = this.result.data()?.edges ?? [];
|
|
183
159
|
const out: AccountSearchNode[] = [];
|
|
@@ -187,15 +163,12 @@ export class AccountSearchPageComponent {
|
|
|
187
163
|
return out;
|
|
188
164
|
});
|
|
189
165
|
|
|
190
|
-
/** Pagination controls (and the results list) are inert while fetching/errored. */
|
|
191
166
|
protected readonly controlsDisabled = computed(() => this.loading() || !!this.error());
|
|
192
167
|
|
|
193
|
-
/** Placeholder rows for the loading skeleton — one per requested page size. */
|
|
194
168
|
protected readonly skeletonRows = computed(() =>
|
|
195
169
|
Array.from({ length: this.pageSize() }, (_, i) => i),
|
|
196
170
|
);
|
|
197
171
|
|
|
198
|
-
/** Result-count copy above the list, matching the React reference wording. */
|
|
199
172
|
protected readonly resultCountLabel = computed(() => {
|
|
200
173
|
const total = this.totalCount();
|
|
201
174
|
const shown = this.nodes().length;
|
|
@@ -205,7 +178,6 @@ export class AccountSearchPageComponent {
|
|
|
205
178
|
return `Showing ${shown} account${shown !== 1 ? "s" : ""}`;
|
|
206
179
|
});
|
|
207
180
|
|
|
208
|
-
/** Display helpers for the results list (mirrors `fieldValue` in the template). */
|
|
209
181
|
protected name(node: AccountSearchNode): string {
|
|
210
182
|
return fieldValue(node.Name) ?? "—";
|
|
211
183
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
<main class="max-w-
|
|
2
|
-
<div class="
|
|
3
|
-
<h1 class="text-
|
|
4
|
-
<
|
|
1
|
+
<main class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
|
2
|
+
<div class="flex items-center gap-6 mb-6">
|
|
3
|
+
<h1 class="text-2xl font-bold">Account Search</h1>
|
|
4
|
+
<app-button appearance="outlined" size="sm" (clicked)="browseAll()"
|
|
5
|
+
>Browse All Accounts</app-button
|
|
6
|
+
>
|
|
5
7
|
</div>
|
|
8
|
+
<form class="flex gap-2 items-end" (submit)="onSubmit($event)">
|
|
9
|
+
<app-search-bar
|
|
10
|
+
class="flex-1"
|
|
11
|
+
placeholder="Search by name, phone, or industry..."
|
|
12
|
+
ariaLabel="Search accounts"
|
|
13
|
+
[(value)]="term"
|
|
14
|
+
/>
|
|
15
|
+
<app-button type="submit" [disabled]="!canSearch()">Search</app-button>
|
|
16
|
+
</form>
|
|
6
17
|
</main>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { TestBed } from
|
|
2
|
-
import {
|
|
1
|
+
import { TestBed } from "@angular/core/testing";
|
|
2
|
+
import { provideRouter } from "@angular/router";
|
|
3
|
+
import { HomeComponent } from "./home";
|
|
3
4
|
|
|
4
|
-
describe(
|
|
5
|
+
describe("HomeComponent", () => {
|
|
5
6
|
beforeEach(async () => {
|
|
6
7
|
await TestBed.configureTestingModule({
|
|
7
8
|
imports: [HomeComponent],
|
|
9
|
+
providers: [provideRouter([])],
|
|
8
10
|
}).compileComponents();
|
|
9
11
|
});
|
|
10
12
|
|
|
11
|
-
it(
|
|
13
|
+
it("should create the component", () => {
|
|
12
14
|
const fixture = TestBed.createComponent(HomeComponent);
|
|
13
15
|
const component = fixture.componentInstance;
|
|
14
16
|
expect(component).toBeTruthy();
|
|
15
17
|
});
|
|
16
18
|
|
|
17
|
-
it(
|
|
19
|
+
it("should render main landmark", async () => {
|
|
18
20
|
const fixture = TestBed.createComponent(HomeComponent);
|
|
19
21
|
await fixture.whenStable();
|
|
20
22
|
const compiled = fixture.nativeElement as HTMLElement;
|
|
21
|
-
expect(compiled.querySelector(
|
|
23
|
+
expect(compiled.querySelector("main")).toBeTruthy();
|
|
22
24
|
});
|
|
23
25
|
});
|
|
@@ -3,11 +3,63 @@
|
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
|
-
import { ChangeDetectionStrategy, Component } from
|
|
6
|
+
import { ChangeDetectionStrategy, Component, computed, inject, signal } from "@angular/core";
|
|
7
|
+
import { Router } from "@angular/router";
|
|
8
|
+
// Base-app UI wrappers, inherited (not recreated) by this feature. Post-compose
|
|
9
|
+
// they land at uiBundles/<target>/src/app/components/ui/{button,input}/..., three levels
|
|
10
|
+
// up from this page folder (app/pages/home/ -> app/components/ui/).
|
|
11
|
+
import { ButtonComponent } from "../../components/ui/button/button";
|
|
12
|
+
import { SearchBarComponent } from "../../features/object-search/search-bar/search-bar";
|
|
7
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Account-search landing page. Mirrors the React `Home` page: a single search
|
|
16
|
+
* box plus a "Browse All Accounts" shortcut. Submitting navigates to the
|
|
17
|
+
* `accounts` list, carrying the typed term as the `q` query param so the search
|
|
18
|
+
* page's {@link ObjectSearchStateService} seeds the multi-field search filter.
|
|
19
|
+
*
|
|
20
|
+
* Named `HomeComponent` (selector `app-home`) so it overwrites the base app's
|
|
21
|
+
* placeholder home at compose, leaving the composed app with a single `home`
|
|
22
|
+
* component.
|
|
23
|
+
*
|
|
24
|
+
* Uses the presentational `app-search-bar` (icon + input) with its own local
|
|
25
|
+
* `term` signal and submit-to-navigate flow — Home has no shared search state;
|
|
26
|
+
* it just seeds `?q=` and routes into the search page.
|
|
27
|
+
*/
|
|
8
28
|
@Component({
|
|
9
|
-
selector:
|
|
29
|
+
selector: "app-home",
|
|
10
30
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
-
|
|
31
|
+
imports: [ButtonComponent, SearchBarComponent],
|
|
32
|
+
templateUrl: "./home.html",
|
|
12
33
|
})
|
|
13
|
-
export class HomeComponent {
|
|
34
|
+
export class HomeComponent {
|
|
35
|
+
private readonly router = inject(Router);
|
|
36
|
+
|
|
37
|
+
/** Minimum characters required before a search can be submitted. */
|
|
38
|
+
private static readonly MIN_SEARCH_LENGTH = 3;
|
|
39
|
+
|
|
40
|
+
/** Bound to the search input; forwarded as `?q=` on submit. */
|
|
41
|
+
protected readonly term = signal<string>("");
|
|
42
|
+
|
|
43
|
+
/** True once the trimmed term meets the minimum length — gates the Search button. */
|
|
44
|
+
protected readonly canSearch = computed(
|
|
45
|
+
() => this.term().trim().length >= HomeComponent.MIN_SEARCH_LENGTH,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Navigate to the search page, seeding the search term. No-op unless the
|
|
50
|
+
* trimmed term meets the minimum length (covers both the button click and the
|
|
51
|
+
* Enter/submit path).
|
|
52
|
+
*/
|
|
53
|
+
protected onSubmit(event: Event): void {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
if (!this.canSearch()) return;
|
|
56
|
+
this.browseAll(this.term().trim());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Go to the accounts list, optionally with a seeded search term. */
|
|
60
|
+
protected browseAll(q?: string): void {
|
|
61
|
+
void this.router.navigate(["/accounts"], {
|
|
62
|
+
queryParams: q ? { q } : {},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert-action.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmAlertAction]',
|
|
6
|
+
host: {
|
|
7
|
+
'data-slot': 'alert-action',
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
export class HlmAlertAction {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'absolute end-2 top-2');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmAlertDescription]',
|
|
6
|
+
host: {
|
|
7
|
+
'data-slot': 'alert-description',
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
export class HlmAlertDescription {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(
|
|
13
|
+
() =>
|
|
14
|
+
'text-sm text-balance md:text-pretty group-has-[>ng-icon]/alert:col-start-2 [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/alert/hlm-alert-title.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmAlertTitle]',
|
|
6
|
+
host: {
|
|
7
|
+
'data-slot': 'alert-title',
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
export class HlmAlertTitle {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(
|
|
13
|
+
() =>
|
|
14
|
+
'font-medium group-has-[>ng-icon]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Directive, input } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
const alertVariants = cva(
|
|
6
|
+
'relative w-full grid gap-0.5 items-start rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:pe-18 has-[>ng-icon]:grid-cols-[auto_1fr] has-[>ng-icon]:gap-x-2 *:[ng-icon]:row-span-2 *:[ng-icon]:translate-y-0.5 *:[ng-icon]:text-current *:[ng-icon:not([class*=text-])]:text-[length:--spacing(4)] group/alert',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: 'bg-card text-card-foreground',
|
|
11
|
+
destructive: 'bg-card text-destructive',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: 'default',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export type AlertVariants = VariantProps<typeof alertVariants>;
|
|
21
|
+
|
|
22
|
+
@Directive({
|
|
23
|
+
selector: 'hlm-alert,[hlmAlert]',
|
|
24
|
+
host: {
|
|
25
|
+
'data-slot': 'alert',
|
|
26
|
+
role: 'alert',
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
export class HlmAlert {
|
|
30
|
+
public readonly variant = input<AlertVariants['variant']>('default');
|
|
31
|
+
|
|
32
|
+
constructor() {
|
|
33
|
+
classes(() => alertVariants({ variant: this.variant() }));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HlmAlert } from './hlm-alert';
|
|
2
|
+
import { HlmAlertAction } from './hlm-alert-action';
|
|
3
|
+
import { HlmAlertDescription } from './hlm-alert-description';
|
|
4
|
+
import { HlmAlertTitle } from './hlm-alert-title';
|
|
5
|
+
|
|
6
|
+
export * from './hlm-alert';
|
|
7
|
+
export * from './hlm-alert-action';
|
|
8
|
+
export * from './hlm-alert-description';
|
|
9
|
+
export * from './hlm-alert-title';
|
|
10
|
+
|
|
11
|
+
export const HlmAlertImports = [
|
|
12
|
+
HlmAlert,
|
|
13
|
+
HlmAlertAction,
|
|
14
|
+
HlmAlertDescription,
|
|
15
|
+
HlmAlertTitle,
|
|
16
|
+
] as const;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InjectionToken, type ValueProvider, inject } from '@angular/core';
|
|
2
|
+
import type { ButtonVariants } from './hlm-button';
|
|
3
|
+
|
|
4
|
+
export interface BrnButtonConfig {
|
|
5
|
+
variant: ButtonVariants['variant'];
|
|
6
|
+
size: ButtonVariants['size'];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const defaultConfig: BrnButtonConfig = {
|
|
10
|
+
variant: 'default',
|
|
11
|
+
size: 'default',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const BrnButtonConfigToken = new InjectionToken<BrnButtonConfig>('BrnButtonConfig');
|
|
15
|
+
|
|
16
|
+
export function provideBrnButtonConfig(config: Partial<BrnButtonConfig>): ValueProvider {
|
|
17
|
+
return { provide: BrnButtonConfigToken, useValue: { ...defaultConfig, ...config } };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function injectBrnButtonConfig(): BrnButtonConfig {
|
|
21
|
+
return inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;
|
|
22
|
+
}
|
package/dist/force-app/main/default/uiBundles/angularintapp/src/app/shared/button/hlm-button.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Directive, input, signal } from '@angular/core';
|
|
2
|
+
import { BrnButton } from '@spartan-ng/brain/button';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
|
+
import type { ClassValue } from 'clsx';
|
|
6
|
+
import { injectBrnButtonConfig } from './hlm-button.token';
|
|
7
|
+
|
|
8
|
+
export const buttonVariants = cva(
|
|
9
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px data-[matches-spartan-invalid=true]:ring-3 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
|
|
14
|
+
outline:
|
|
15
|
+
'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',
|
|
16
|
+
secondary:
|
|
17
|
+
'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
|
|
18
|
+
ghost:
|
|
19
|
+
'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
|
|
20
|
+
destructive:
|
|
21
|
+
'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',
|
|
22
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default:
|
|
26
|
+
'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
|
|
27
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
|
|
28
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]",
|
|
29
|
+
lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3',
|
|
30
|
+
icon: 'size-8',
|
|
31
|
+
'icon-xs':
|
|
32
|
+
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
|
|
33
|
+
'icon-sm':
|
|
34
|
+
'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
|
|
35
|
+
'icon-lg': 'size-9',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: 'default',
|
|
40
|
+
size: 'default',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
46
|
+
|
|
47
|
+
@Directive({
|
|
48
|
+
selector: 'button[hlmBtn], a[hlmBtn]',
|
|
49
|
+
exportAs: 'hlmBtn',
|
|
50
|
+
hostDirectives: [{ directive: BrnButton, inputs: ['disabled'] }],
|
|
51
|
+
host: { 'data-slot': 'button' },
|
|
52
|
+
})
|
|
53
|
+
export class HlmButton {
|
|
54
|
+
private readonly _config = injectBrnButtonConfig();
|
|
55
|
+
|
|
56
|
+
private readonly _additionalClasses = signal<ClassValue>('');
|
|
57
|
+
|
|
58
|
+
public readonly variant = input<ButtonVariants['variant']>(this._config.variant);
|
|
59
|
+
|
|
60
|
+
public readonly size = input<ButtonVariants['size']>(this._config.size);
|
|
61
|
+
|
|
62
|
+
constructor() {
|
|
63
|
+
classes(() => [
|
|
64
|
+
buttonVariants({ variant: this.variant(), size: this.size() }),
|
|
65
|
+
this._additionalClasses(),
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setClass(classes: string): void {
|
|
70
|
+
this._additionalClasses.set(classes);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
|
3
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
4
|
+
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
5
|
+
import {
|
|
6
|
+
BrnCalendarImports,
|
|
7
|
+
BrnCalendarMulti,
|
|
8
|
+
injectBrnCalendarI18n,
|
|
9
|
+
} from '@spartan-ng/brain/calendar';
|
|
10
|
+
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
11
|
+
import { buttonVariants, HlmButtonImports } from '@spartan-ng/styles/button';
|
|
12
|
+
import { HlmSelectImports } from '@spartan-ng/styles/select';
|
|
13
|
+
import { classes, hlm } from '@spartan-ng/styles/utils';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'hlm-calendar-multi',
|
|
17
|
+
imports: [BrnCalendarImports, NgIcon, NgTemplateOutlet, HlmSelectImports, HlmButtonImports],
|
|
18
|
+
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
hostDirectives: [
|
|
21
|
+
{
|
|
22
|
+
directive: BrnCalendarMulti,
|
|
23
|
+
inputs: [
|
|
24
|
+
'min',
|
|
25
|
+
'max',
|
|
26
|
+
'minSelection',
|
|
27
|
+
'maxSelection',
|
|
28
|
+
'disabled',
|
|
29
|
+
'date',
|
|
30
|
+
'dateDisabled',
|
|
31
|
+
'weekStartsOn',
|
|
32
|
+
'highlightDays',
|
|
33
|
+
'defaultFocusedDate',
|
|
34
|
+
],
|
|
35
|
+
outputs: ['dateChange'],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
host: { 'data-slot': 'calendar' },
|
|
39
|
+
template: `
|
|
40
|
+
<div class="inline-flex flex-col space-y-4">
|
|
41
|
+
<!-- Header -->
|
|
42
|
+
<div class="flex w-full items-center justify-between gap-1.5">
|
|
43
|
+
<ng-template #month>
|
|
44
|
+
<hlm-select brnCalendarMonthSelect class="order-1">
|
|
45
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
46
|
+
<hlm-select-value />
|
|
47
|
+
</hlm-select-trigger>
|
|
48
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
49
|
+
<hlm-select-group>
|
|
50
|
+
@for (month of _i18n.config().months(); track month) {
|
|
51
|
+
<hlm-select-item [value]="month">{{ month }}</hlm-select-item>
|
|
52
|
+
}
|
|
53
|
+
</hlm-select-group>
|
|
54
|
+
</hlm-select-content>
|
|
55
|
+
</hlm-select>
|
|
56
|
+
</ng-template>
|
|
57
|
+
<ng-template #year>
|
|
58
|
+
<hlm-select brnCalendarYearSelect class="order-3">
|
|
59
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
60
|
+
<hlm-select-value />
|
|
61
|
+
</hlm-select-trigger>
|
|
62
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
63
|
+
<hlm-select-group>
|
|
64
|
+
@for (year of _i18n.config().years(); track year) {
|
|
65
|
+
<hlm-select-item [value]="year">{{ year }}</hlm-select-item>
|
|
66
|
+
}
|
|
67
|
+
</hlm-select-group>
|
|
68
|
+
</hlm-select-content>
|
|
69
|
+
</hlm-select>
|
|
70
|
+
</ng-template>
|
|
71
|
+
@let heading = _heading();
|
|
72
|
+
|
|
73
|
+
<button
|
|
74
|
+
brnCalendarPreviousButton
|
|
75
|
+
variant="ghost"
|
|
76
|
+
hlmBtn
|
|
77
|
+
class="order-first size-(--cell-size) p-0 select-none aria-disabled:opacity-50"
|
|
78
|
+
>
|
|
79
|
+
<ng-icon name="lucideChevronLeft" class="rtl:rotate-180" />
|
|
80
|
+
</button>
|
|
81
|
+
|
|
82
|
+
@switch (captionLayout()) {
|
|
83
|
+
@case ('dropdown') {
|
|
84
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
85
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
86
|
+
}
|
|
87
|
+
@case ('dropdown-months') {
|
|
88
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
89
|
+
<div brnCalendarHeader class="order-4 text-sm font-medium">{{ heading.year }}</div>
|
|
90
|
+
}
|
|
91
|
+
@case ('dropdown-years') {
|
|
92
|
+
<div brnCalendarHeader class="order-2 text-sm font-medium">{{ heading.month }}</div>
|
|
93
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
94
|
+
}
|
|
95
|
+
@case ('label') {
|
|
96
|
+
<div brnCalendarHeader class="order-5 text-sm font-medium">{{ heading.header }}</div>
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
<button
|
|
101
|
+
brnCalendarNextButton
|
|
102
|
+
hlmBtn
|
|
103
|
+
variant="ghost"
|
|
104
|
+
class="order-last size-(--cell-size) p-0 select-none aria-disabled:opacity-50"
|
|
105
|
+
>
|
|
106
|
+
<ng-icon name="lucideChevronRight" class="rtl:rotate-180" />
|
|
107
|
+
</button>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<table class="w-full border-collapse" brnCalendarGrid>
|
|
111
|
+
<thead aria-hidden="true">
|
|
112
|
+
<tr class="flex">
|
|
113
|
+
<th
|
|
114
|
+
*brnCalendarWeekday="let weekday"
|
|
115
|
+
scope="col"
|
|
116
|
+
class="text-muted-foreground flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal select-none"
|
|
117
|
+
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
118
|
+
>
|
|
119
|
+
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
120
|
+
</th>
|
|
121
|
+
</tr>
|
|
122
|
+
</thead>
|
|
123
|
+
|
|
124
|
+
<tbody role="rowgroup">
|
|
125
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
126
|
+
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
127
|
+
<td
|
|
128
|
+
brnCalendarCell
|
|
129
|
+
class="group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius) [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)"
|
|
130
|
+
>
|
|
131
|
+
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
132
|
+
{{ _dateAdapter.getDate(date) }}
|
|
133
|
+
</button>
|
|
134
|
+
</td>
|
|
135
|
+
}
|
|
136
|
+
</tr>
|
|
137
|
+
</tbody>
|
|
138
|
+
</table>
|
|
139
|
+
</div>
|
|
140
|
+
`,
|
|
141
|
+
})
|
|
142
|
+
export class HlmCalendarMulti<T> {
|
|
143
|
+
/** Show dropdowns to navigate between months or years. */
|
|
144
|
+
public readonly captionLayout = input<
|
|
145
|
+
'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'
|
|
146
|
+
>('label');
|
|
147
|
+
|
|
148
|
+
/** Access the calendar i18n */
|
|
149
|
+
protected readonly _i18n = injectBrnCalendarI18n();
|
|
150
|
+
|
|
151
|
+
/** Access the date time adapter */
|
|
152
|
+
protected readonly _dateAdapter = injectDateAdapter<T>();
|
|
153
|
+
|
|
154
|
+
/** Access the calendar directive */
|
|
155
|
+
private readonly _calendar = inject(BrnCalendarMulti);
|
|
156
|
+
|
|
157
|
+
/** Get the heading for the current month and year */
|
|
158
|
+
protected readonly _heading = computed(() => {
|
|
159
|
+
const config = this._i18n.config();
|
|
160
|
+
const date = this._calendar.focusedDate();
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
header: config.formatHeader(
|
|
164
|
+
this._dateAdapter.getMonth(date),
|
|
165
|
+
this._dateAdapter.getYear(date),
|
|
166
|
+
),
|
|
167
|
+
month: config.formatMonth(this._dateAdapter.getMonth(date)),
|
|
168
|
+
year: config.formatYear(this._dateAdapter.getYear(date)),
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
protected readonly _btnClass = hlm(
|
|
173
|
+
buttonVariants({ variant: 'ghost', size: 'icon' }),
|
|
174
|
+
'data-[today=true]:bg-muted group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:bg-muted/50 dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70',
|
|
175
|
+
'data-[outside=true]:opacity-50',
|
|
176
|
+
"data-[highlighted]:before:content-['']",
|
|
177
|
+
'data-[highlighted]:before:absolute',
|
|
178
|
+
'data-[highlighted]:before:bottom-1',
|
|
179
|
+
'data-[highlighted]:before:start-1/2',
|
|
180
|
+
'data-[highlighted]:before:h-1',
|
|
181
|
+
'data-[highlighted]:before:w-1',
|
|
182
|
+
'data-[highlighted]:before:-translate-x-1/2',
|
|
183
|
+
'data-[highlighted]:before:rounded-full',
|
|
184
|
+
'data-[highlighted]:before:bg-destructive',
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
protected readonly _selectClass = 'gap-0 px-1.5 py-2 [&>ng-icon]:ms-1';
|
|
188
|
+
|
|
189
|
+
constructor() {
|
|
190
|
+
classes(
|
|
191
|
+
() =>
|
|
192
|
+
'p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] group/calendar bg-background block in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
}
|