@salesforce/ui-bundle-template-app-angular-template-b2x 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/angularextapp/angular.json +2 -7
- package/dist/force-app/main/default/uiBundles/angularextapp/components.json +6 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/eslint.config.js +9 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/package.json +16 -11
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/app.config.ts +4 -6
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/app.routes.ts +2 -2
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/alert/alert.html +9 -13
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/alert/alert.ts +16 -28
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/button/button.html +19 -10
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/button/button.ts +34 -25
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/card/card.ts +40 -50
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/collapsible/collapsible.html +38 -10
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/collapsible/collapsible.ts +6 -11
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-picker/date-picker.html +17 -22
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-picker/date-picker.ts +29 -21
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-range-picker/date-range-picker.html +16 -30
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-range-picker/date-range-picker.ts +39 -36
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/dialog/dialog.html +13 -30
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/dialog/dialog.ts +6 -21
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/dropdown-menu/dropdown-menu.html +20 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/dropdown-menu/dropdown-menu.ts +100 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/field/field.html +5 -11
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/field/field.ts +10 -18
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/field-appearance.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/icon/icon.ts +62 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/input/input.html +32 -17
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/input/input.ts +57 -14
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/label/label.ts +8 -4
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/paginator/paginator.html +74 -10
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/paginator/paginator.ts +74 -18
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/paginator/types.ts +13 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/popover/popover.html +10 -38
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/popover/popover.ts +12 -15
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/select/select.html +34 -22
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/select/select.ts +25 -34
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/separator/separator.ts +11 -36
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/skeleton/skeleton.ts +5 -9
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/spinner/spinner.ts +14 -21
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/auth-form/auth-form.html +2 -3
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/menu/auth-menu/auth-menu.html +31 -21
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/menu/auth-menu/auth-menu.ts +6 -18
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/session/session.html +2 -2
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/submit-button/submit-button.html +8 -4
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/submit-button/submit-button.ts +4 -16
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/breadcrumb/breadcrumb.html +4 -24
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/breadcrumb/breadcrumb.ts +3 -16
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/date-filter.ts +1 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/date-range-filter.html +2 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/date-range-filter.ts +6 -15
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/filter-field-wrapper.html +2 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/filter-field-wrapper.ts +2 -17
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/multi-select-filter.html +2 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/numeric-range-filter.ts +3 -21
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/search-filter.html +3 -3
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/search-filter.ts +9 -13
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/select-filter.html +2 -5
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/select-filter.ts +1 -15
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/text-filter.html +2 -5
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/filters/text-filter.ts +3 -17
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/pagination/pagination.ts +4 -20
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/search-bar/search-bar.html +10 -59
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/search-bar/search-bar.ts +13 -93
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/sort-control/sort-control.html +3 -29
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/object-search/sort-control/sort-control.ts +5 -12
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/account-detail/account-detail-page.html +1 -23
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/account-detail/account-detail-page.ts +3 -23
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/account-search/account-search-page.html +1 -19
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/account-search/account-search-page.ts +8 -36
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/home/home.html +15 -4
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/home/home.spec.ts +8 -6
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/home/home.ts +56 -4
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/alert/hlm-alert-action.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/alert/hlm-alert-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/alert/hlm-alert-title.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/alert/hlm-alert.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/alert/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/button/hlm-button.token.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/button/hlm-button.ts +72 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/button/index.ts +6 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/calendar/hlm-calendar-multi.ts +195 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/calendar/hlm-calendar-range.ts +194 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/calendar/hlm-calendar.ts +189 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/calendar/hlm-month-year-calendar.ts +119 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/calendar/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-action.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-avatar.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-footer.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-header.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card.token.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/hlm-card.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/card/index.ts +28 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/collapsible/hlm-collapsible-content.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/collapsible/hlm-collapsible-trigger.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/collapsible/hlm-collapsible.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/collapsible/index.ts +13 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-multi-input.ts +104 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker-anchor.ts +23 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker-input.ts +118 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker-multi.token.ts +109 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker-multi.ts +220 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker-trigger.ts +104 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker.token.ts +69 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-picker.ts +203 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-range-input.ts +120 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-range-picker.token.ts +86 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-date-range-picker.ts +252 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-month-year-input.ts +105 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-month-year-picker.token.ts +89 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/hlm-month-year-picker.ts +196 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/date-picker/index.ts +38 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-close.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-content.ts +74 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-footer.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-overlay.ts +27 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-title.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog.service.ts +46 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/hlm-dialog.ts +24 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dialog/index.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox.ts +54 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-focus-on-hover.ts +35 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-item-sub-indicator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-item.ts +42 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-label.ts +20 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio.ts +49 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-separator.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-shortcut.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub-trigger.ts +52 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub.ts +53 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-token.ts +26 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu-trigger.ts +46 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/hlm-dropdown-menu.ts +57 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/dropdown-menu/index.ts +49 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-description.ts +53 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-error.ts +100 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-group.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-legend.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-separator.ts +24 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-set.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field-title.ts +15 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/hlm-field.ts +47 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/field/index.ts +34 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input/hlm-input.ts +21 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/hlm-input-group-addon.ts +40 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/hlm-input-group-button.ts +47 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/hlm-input-group-input.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/hlm-input-group-text.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/hlm-input-group.ts +18 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/input-group/index.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/label/hlm-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/label/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/label/label.html +11 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-numbered-pagination-query-params.ts +191 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-numbered-pagination.ts +290 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-ellipsis.ts +27 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-item.ts +7 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-link.ts +51 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-next.ts +65 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination-previous.ts +65 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/hlm-pagination.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/pagination/index.ts +31 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-content.ts +25 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/hlm-popover.ts +23 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/popover/index.ts +25 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-content.ts +44 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-item.ts +36 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-label.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-multiple.ts +37 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-placeholder.ts +17 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-scroll-down.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-scroll-up.ts +22 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-separator.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-trigger.ts +59 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-value-template.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-value.ts +18 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-values-content.ts +9 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select-values.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/hlm-select.ts +37 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/select/index.ts +52 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/separator/hlm-separator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/separator/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/skeleton/hlm-skeleton.ts +14 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/skeleton/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/spinner/hlm-spinner.ts +26 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/spinner/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/utils/hlm.ts +313 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/utils/index.ts +2 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/shared/utils/provide-spartan-hlm.ts +34 -0
- package/dist/force-app/main/default/uiBundles/angularextapp/src/index.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/{styles.scss → styles.css} +7 -38
- package/dist/force-app/main/default/uiBundles/angularextapp/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/angularextapp/src/app/components/ui/_field-size.scss +0 -42
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/button/button.scss +0 -112
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/card/card.scss +0 -34
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-picker/date-picker.scss +0 -36
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/date-range-picker/date-range-picker.scss +0 -33
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/input/input.scss +0 -35
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/label/label.html +0 -3
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/select/select.scss +0 -35
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/separator/separator.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/separator/separator.scss +0 -23
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/skeleton/skeleton.html +0 -1
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/components/ui/skeleton/skeleton.scss +0 -28
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/features/authentication/submit-button/submit-button.scss +0 -17
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/account-detail/account-detail-page.scss +0 -7
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/home/home-page.html +0 -18
- package/dist/force-app/main/default/uiBundles/angularextapp/src/app/pages/home/home-page.ts +0 -47
- package/dist/force-app/main/default/uiBundles/angularextapp/src/theme.scss +0 -39
|
@@ -7,16 +7,13 @@ import { ChangeDetectionStrategy, Component, computed, inject, signal } from "@a
|
|
|
7
7
|
import { ActivatedRoute, Router } from "@angular/router";
|
|
8
8
|
import { toSignal } from "@angular/core/rxjs-interop";
|
|
9
9
|
import { map } from "rxjs/operators";
|
|
10
|
-
// Base-app UI wrappers, inherited (not recreated) by this feature. Post-compose
|
|
11
|
-
// they land at uiBundles/<target>/src/app/components/ui/..., three levels up from this
|
|
12
|
-
// page folder (app/features/account-search/ -> app/components/ui/).
|
|
13
10
|
import { AlertComponent } from "../../components/ui/alert/alert";
|
|
11
|
+
import { IconComponent } from "../../components/ui/icon/icon";
|
|
14
12
|
import { ButtonComponent } from "../../components/ui/button/button";
|
|
15
13
|
import { CardComponent, CardContentComponent } from "../../components/ui/card/card";
|
|
16
14
|
import { CollapsibleComponent } from "../../components/ui/collapsible/collapsible";
|
|
17
15
|
import { SeparatorComponent } from "../../components/ui/separator/separator";
|
|
18
16
|
import { SkeletonComponent } from "../../components/ui/skeleton/skeleton";
|
|
19
|
-
// Object-search feature building blocks (Waves 1-2), two levels up.
|
|
20
17
|
import { ObjectBreadcrumbComponent } from "../../features/object-search/breadcrumb/breadcrumb";
|
|
21
18
|
import { createAsyncData } from "../../utils/async-data";
|
|
22
19
|
import {
|
|
@@ -26,13 +23,11 @@ import {
|
|
|
26
23
|
} from "../../features/object-search/utils/field-utils";
|
|
27
24
|
import { AccountSearchService } from "../../api/account/account-search.service";
|
|
28
25
|
|
|
29
|
-
/** `Intl` options for the created / last-modified timestamps (matches React). */
|
|
30
26
|
const DATE_TIME_OPTIONS: Intl.DateTimeFormatOptions = {
|
|
31
27
|
dateStyle: "medium",
|
|
32
28
|
timeStyle: "short",
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
/** A `{ label, value }` pair rendered in a field grid. */
|
|
36
31
|
interface Field {
|
|
37
32
|
label: string;
|
|
38
33
|
value: string | null;
|
|
@@ -40,21 +35,12 @@ interface Field {
|
|
|
40
35
|
telephone?: boolean;
|
|
41
36
|
}
|
|
42
37
|
|
|
43
|
-
/**
|
|
44
|
-
* Account detail page. The Angular analogue of the React
|
|
45
|
-
* `AccountObjectDetailPage`: a breadcrumb plus a card of collapsible sections
|
|
46
|
-
* (top fields, Additional / Address / System information), with loading,
|
|
47
|
-
* error, and not-found states.
|
|
48
|
-
*
|
|
49
|
-
* The record id comes from the `:recordId` route param (reactively, so a
|
|
50
|
-
* client-side nav between two detail routes refetches). Data flows through
|
|
51
|
-
* {@link createAsyncData} for latest-wins fetching.
|
|
52
|
-
*/
|
|
53
38
|
@Component({
|
|
54
39
|
selector: "app-account-detail-page",
|
|
55
40
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
56
41
|
imports: [
|
|
57
42
|
AlertComponent,
|
|
43
|
+
IconComponent,
|
|
58
44
|
ButtonComponent,
|
|
59
45
|
CardComponent,
|
|
60
46
|
CardContentComponent,
|
|
@@ -64,14 +50,13 @@ interface Field {
|
|
|
64
50
|
ObjectBreadcrumbComponent,
|
|
65
51
|
],
|
|
66
52
|
templateUrl: "./account-detail-page.html",
|
|
67
|
-
styleUrl: "./account-detail-page.scss",
|
|
68
53
|
})
|
|
69
54
|
export class AccountDetailPageComponent {
|
|
70
55
|
private readonly service = inject(AccountSearchService);
|
|
71
56
|
private readonly route = inject(ActivatedRoute);
|
|
72
57
|
private readonly router = inject(Router);
|
|
73
58
|
|
|
74
|
-
|
|
59
|
+
// Reactive param so a client-side nav between two detail routes refetches.
|
|
75
60
|
private readonly recordId = toSignal(
|
|
76
61
|
this.route.paramMap.pipe(map((p) => p.get("recordId") ?? "")),
|
|
77
62
|
{ initialValue: this.route.snapshot.paramMap.get("recordId") ?? "" },
|
|
@@ -84,15 +69,12 @@ export class AccountDetailPageComponent {
|
|
|
84
69
|
protected readonly account = this.result.data;
|
|
85
70
|
protected readonly loading = this.result.loading;
|
|
86
71
|
protected readonly error = this.result.error;
|
|
87
|
-
/** True once a resolved fetch returned no record (distinct from loading). */
|
|
88
72
|
protected readonly notFound = computed(() => !this.loading() && !this.error() && !this.account());
|
|
89
73
|
|
|
90
|
-
/** Per-section collapsible open state (all default open, matching React). */
|
|
91
74
|
protected readonly additionalOpen = signal<boolean>(true);
|
|
92
75
|
protected readonly addressOpen = signal<boolean>(true);
|
|
93
76
|
protected readonly systemOpen = signal<boolean>(true);
|
|
94
77
|
|
|
95
|
-
/** Placeholder rows for skeleton field grids. */
|
|
96
78
|
protected readonly skeletonRows = [0, 1, 2];
|
|
97
79
|
|
|
98
80
|
// -- Breadcrumb leaf label -------------------------------------------------
|
|
@@ -184,12 +166,10 @@ export class AccountDetailPageComponent {
|
|
|
184
166
|
return [fieldValue(name ?? null), formatted].filter(Boolean).join(" ") || null;
|
|
185
167
|
}
|
|
186
168
|
|
|
187
|
-
/** Navigate back to the previous view (mirrors the React `navigate(-1)`). */
|
|
188
169
|
protected goBack(): void {
|
|
189
170
|
void this.router.navigate(["/accounts"]);
|
|
190
171
|
}
|
|
191
172
|
|
|
192
|
-
/** Full page reload retry, matching the React "Retry" affordance. */
|
|
193
173
|
protected reload(): void {
|
|
194
174
|
window.location.reload();
|
|
195
175
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
<h1 class="text-2xl font-bold mb-4">Search Accounts</h1>
|
|
5
5
|
|
|
6
6
|
<div class="flex flex-col lg:flex-row gap-6">
|
|
7
|
-
<!-- Sidebar — Filter Panel -->
|
|
8
7
|
<aside class="w-full lg:w-80 shrink-0">
|
|
9
8
|
<app-collapsible title="Filters" [(open)]="filtersOpen">
|
|
10
9
|
<div class="space-y-1">
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
</app-collapsible>
|
|
20
19
|
</aside>
|
|
21
20
|
|
|
22
|
-
<!-- Main area — Sort + Results -->
|
|
23
21
|
<div class="flex-1 min-w-0">
|
|
24
22
|
<div class="flex flex-wrap items-center gap-2 mb-4">
|
|
25
23
|
<app-sort-control [sortFields]="sortConfigs" />
|
|
@@ -74,22 +72,7 @@
|
|
|
74
72
|
</ul>
|
|
75
73
|
} @else {
|
|
76
74
|
<div class="flex flex-col items-center justify-center py-16 text-center">
|
|
77
|
-
<
|
|
78
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
79
|
-
class="size-12 text-muted-foreground mb-4"
|
|
80
|
-
viewBox="0 0 24 24"
|
|
81
|
-
fill="none"
|
|
82
|
-
stroke="currentColor"
|
|
83
|
-
stroke-width="2"
|
|
84
|
-
stroke-linecap="round"
|
|
85
|
-
stroke-linejoin="round"
|
|
86
|
-
aria-hidden="true"
|
|
87
|
-
>
|
|
88
|
-
<path d="m13.5 8.5-5 5" />
|
|
89
|
-
<path d="m8.5 8.5 5 5" />
|
|
90
|
-
<circle cx="11" cy="11" r="8" />
|
|
91
|
-
<path d="m21 21-4.3-4.3" />
|
|
92
|
-
</svg>
|
|
75
|
+
<app-icon name="noResults" size="3rem" class="text-muted-foreground mb-4" />
|
|
93
76
|
<h2 class="text-lg font-semibold mb-1">No accounts found</h2>
|
|
94
77
|
<p class="text-sm text-muted-foreground">
|
|
95
78
|
Try adjusting your filters or search criteria.
|
|
@@ -98,7 +81,6 @@
|
|
|
98
81
|
}
|
|
99
82
|
</div>
|
|
100
83
|
|
|
101
|
-
<!-- Pagination — always visible, disabled while loading or on error -->
|
|
102
84
|
<app-pagination-controls
|
|
103
85
|
[totalCount]="totalCount()"
|
|
104
86
|
[hasNextPage]="hasNextPage()"
|
|
@@ -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/angularextapp/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/angularextapp/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/angularextapp/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
|
+
}
|