@salesforce/ui-bundle-template-feature-angular-search 0.0.0-stage → 12.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/README.md +75 -2
- package/dist/.forceignore +15 -0
- package/dist/.husky/pre-commit +4 -0
- package/dist/.prettierignore +11 -0
- package/dist/.prettierrc +17 -0
- package/dist/CHANGELOG.md +5375 -0
- package/dist/README.md +83 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/eslint.config.js +7 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/.forceignore +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/.graphqlrc.yml +2 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/.postcssrc.json +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/.prettierignore +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/.prettierrc +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/CHANGELOG.md +4 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/README.md +85 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/angular.json +98 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/codegen.yml +95 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/components.json +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/e2e/app.spec.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/esbuild/api-version.mjs +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/esbuild/graphql-codegen.mjs +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/eslint-plugin-angular-graphql.js +148 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/eslint.config.js +77 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/feature-angular-search.uibundle-meta.xml +7 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/middleware/html.mjs +3 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/middleware/proxy.mjs +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/package.json +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/playwright.config.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/public/favicon.ico +0 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/scripts/get-graphql-schema.mjs +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/scripts/rewrite-e2e-assets.mjs +30 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/api/data-client.service.spec.ts +184 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/api/data-client.service.ts +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/app.config.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/app.html +1 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/app.routes.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/app.spec.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/app.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/layout/app-layout/app-layout.html +51 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/layout/app-layout/app-layout.spec.ts +63 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/layout/app-layout/app-layout.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/alert/alert.html +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/alert/alert.ts +41 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/button/button.html +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/button/button.ts +59 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/card/card.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/collapsible/collapsible.html +38 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/collapsible/collapsible.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/date-picker/date-picker.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/date-picker/date-picker.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/date-range-picker/date-range-picker.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/date-range-picker/date-range-picker.ts +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/dialog/dialog.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/dialog/dialog.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/dropdown-menu/dropdown-menu.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/dropdown-menu/dropdown-menu.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/field/field.html +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/field/field.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/field-appearance.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/field-size.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/icon/icon.ts +118 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/input/input.html +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/input/input.ts +79 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/label/label.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/paginator/paginator.html +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/paginator/paginator.ts +93 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/paginator/types.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/popover/popover.html +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/popover/popover.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/select/select.html +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/select/select.ts +63 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/separator/separator.ts +31 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/skeleton/skeleton.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/components/ui/spinner/spinner.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/adapters/registry.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/adapters/sobject/index.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/adapters/sobject/parse-response.ts +57 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/adapters/sobject/query-fragment.ts +169 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/adapters/types.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/api/search-response.spec.ts +114 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/api/search-response.ts +73 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/api/search.service.spec.ts +124 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/api/search.service.ts +80 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/active-filters/active-filters.html +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/active-filters/active-filters.spec.ts +73 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/active-filters/active-filters.ts +77 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/filter-panel/default-filter-panel.html +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/filter-panel/default-filter-panel.ts +87 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/filter-panel/filter-box.html +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/filter-panel/filter-box.ts +39 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/global-search-box/global-search-box.html +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/global-search-box/global-search-box.ts +50 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/default-result-row.html +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/default-result-row.ts +91 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/merged-search-results.html +99 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/merged-search-results.ts +145 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/result-item.ts +53 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/search-results.html +10 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/search-results.ts +33 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/source-section.html +84 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/results/source-section.ts +146 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/scope/scope-selector.html +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/scope/scope-selector.ts +45 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/search/search.html +55 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/search/search.ts +118 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/search-bar/search-bar.html +10 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/search-bar/search-bar.spec.ts +65 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/search-bar/search-bar.ts +72 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/sort-control/sort-control.html +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/sort-control/sort-control.spec.ts +67 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/components/sort-control/sort-control.ts +59 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/constants.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/default-search-config.ts +83 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/directives/search-result-template/search-result-template.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/boolean-filter.html +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/boolean-filter.spec.ts +41 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/boolean-filter.ts +42 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-filter.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-filter.spec.ts +56 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-filter.ts +78 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-range-filter.html +43 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-range-filter.spec.ts +70 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/date-range-filter.ts +125 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/filter-field-wrapper.html +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/filter-field-wrapper.spec.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/filter-field-wrapper.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/filter-types.spec.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/filter-types.ts +64 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/multi-select-filter.html +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/multi-select-filter.spec.ts +42 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/multi-select-filter.ts +42 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/numeric-range-filter.html +32 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/numeric-range-filter.spec.ts +75 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/numeric-range-filter.ts +117 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/select-filter.html +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/select-filter.spec.ts +43 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/select-filter.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/text-filter.html +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/text-filter.spec.ts +54 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/filters/text-filter.ts +70 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/index.ts +55 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/query/build-search-query.spec.ts +157 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/query/build-search-query.ts +95 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/state/filter-mapping.ts +48 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/state/search-state.service.spec.ts +293 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/state/search-state.service.ts +735 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/state/search-state.types.ts +48 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/filter.types.ts +57 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/index.ts +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/scope.types.ts +10 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/search-config.types.ts +110 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/search-result.types.ts +68 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/types/sort.types.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/debounce.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/field-utils.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/filter-utils.spec.ts +335 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/filter-utils.ts +354 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/identifier.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/merge-utils.spec.ts +199 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/merge-utils.ts +177 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/scope-utils.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/sort-utils.ts +32 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/validate-config.spec.ts +48 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/features/search/utils/validate-config.ts +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/home/home.html +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/home/home.spec.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/home/home.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/not-found/not-found.html +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/not-found/not-found.spec.ts +33 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/not-found/not-found.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/search/search-page.html +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/pages/search/search-page.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/alert/hlm-alert-action.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/alert/hlm-alert-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/alert/hlm-alert-title.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/alert/hlm-alert.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/alert/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/button/hlm-button.token.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/button/hlm-button.ts +72 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/button/index.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/calendar/hlm-calendar-multi.ts +195 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/calendar/hlm-calendar-range.ts +194 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/calendar/hlm-calendar.ts +189 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/calendar/hlm-month-year-calendar.ts +119 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/calendar/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-action.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-avatar.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-footer.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-header.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card.token.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/hlm-card.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/card/index.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/collapsible/hlm-collapsible-content.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/collapsible/hlm-collapsible-trigger.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/collapsible/hlm-collapsible.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/collapsible/index.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-multi-input.ts +104 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker-anchor.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker-input.ts +118 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker-multi.token.ts +109 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker-multi.ts +220 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker-trigger.ts +104 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker.token.ts +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-picker.ts +203 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-range-input.ts +120 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-range-picker.token.ts +86 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-date-range-picker.ts +252 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-month-year-input.ts +105 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-month-year-picker.token.ts +89 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/hlm-month-year-picker.ts +196 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/date-picker/index.ts +38 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-close.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-content.ts +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-footer.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-overlay.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-title.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog.service.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/hlm-dialog.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dialog/index.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox.ts +54 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-focus-on-hover.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-item-sub-indicator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-item.ts +42 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-label.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-separator.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-shortcut.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub-trigger.ts +52 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub.ts +53 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-token.ts +26 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu-trigger.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/hlm-dropdown-menu.ts +57 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/dropdown-menu/index.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-description.ts +53 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-error.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-group.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-legend.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-separator.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-set.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field-title.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/hlm-field.ts +47 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/field/index.ts +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input/hlm-input.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/hlm-input-group-addon.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/hlm-input-group-button.ts +47 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/hlm-input-group-input.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/hlm-input-group-text.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/hlm-input-group.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/input-group/index.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/label/hlm-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/label/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/label/label.html +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-numbered-pagination-query-params.ts +191 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-numbered-pagination.ts +290 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-ellipsis.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-item.ts +7 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-link.ts +51 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-next.ts +65 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination-previous.ts +65 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/hlm-pagination.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/pagination/index.ts +31 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-content.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/hlm-popover.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/popover/index.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-content.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-item.ts +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-label.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-multiple.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-placeholder.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-scroll-down.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-scroll-up.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-separator.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-trigger.ts +59 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-value-template.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-value.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-values-content.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select-values.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/hlm-select.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/select/index.ts +52 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/separator/hlm-separator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/separator/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/skeleton/hlm-skeleton.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/skeleton/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/spinner/hlm-spinner.ts +26 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/spinner/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/utils/hlm.ts +313 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/utils/index.ts +2 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/shared/utils/provide-spartan-hlm.ts +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/app/utils/async-data.ts +99 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/index.html +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/main.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/styles.css +139 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/src/types/sf-globals.d.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/tsconfig.app.json +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/tsconfig.json +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/tsconfig.spec.json +10 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-search/ui-bundle.json +7 -0
- package/dist/jest.config.js +6 -0
- package/dist/package-lock.json +12554 -0
- package/dist/package.json +46 -0
- package/dist/scripts/apex/hello.apex +10 -0
- package/dist/scripts/gitignore-templates.json +4 -0
- package/dist/scripts/graphql-search.sh +191 -0
- package/dist/scripts/network-senders.mjs +84 -0
- package/dist/scripts/org-setup-config-schema.mjs +132 -0
- package/dist/scripts/org-setup-dev.mjs +114 -0
- package/dist/scripts/org-setup-url.mjs +108 -0
- package/dist/scripts/org-setup-utils.mjs +569 -0
- package/dist/scripts/org-setup-xml.mjs +283 -0
- package/dist/scripts/org-setup.config.json +5 -0
- package/dist/scripts/org-setup.mjs +2545 -0
- package/dist/scripts/sf-project-setup.mjs +103 -0
- package/dist/scripts/soql/account.soql +6 -0
- package/dist/scripts/validate-org-setup-config.mjs +38 -0
- package/dist/sfdx-project.json +12 -0
- package/package.json +43 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input, signal } from "@angular/core";
|
|
7
|
+
import { Router } from "@angular/router";
|
|
8
|
+
import { ButtonComponent } from "../../../../components/ui/button/button";
|
|
9
|
+
import { InputComponent } from "../../../../components/ui/input/input";
|
|
10
|
+
import { MIN_QUERY_LENGTH } from "../../constants";
|
|
11
|
+
import { GLOBAL_QUERY_KEY } from "../../utils/filter-utils";
|
|
12
|
+
|
|
13
|
+
let nextId = 0;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Launcher: an input + button that navigates to `/search?q=...` once the
|
|
17
|
+
* trimmed term reaches {@link MIN_QUERY_LENGTH}. The gate, route and query key
|
|
18
|
+
* are owned here, not by the caller.
|
|
19
|
+
*/
|
|
20
|
+
@Component({
|
|
21
|
+
selector: "app-global-search-box",
|
|
22
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
imports: [InputComponent, ButtonComponent],
|
|
24
|
+
templateUrl: "./global-search-box.html",
|
|
25
|
+
})
|
|
26
|
+
export class GlobalSearchBoxComponent {
|
|
27
|
+
private readonly router = inject(Router);
|
|
28
|
+
|
|
29
|
+
readonly placeholder = input("Search…");
|
|
30
|
+
/** Accessible name of the input. */
|
|
31
|
+
readonly label = input("Search");
|
|
32
|
+
readonly submitLabel = input("Search");
|
|
33
|
+
/** `{min}` is replaced with {@link MIN_QUERY_LENGTH}. */
|
|
34
|
+
readonly minLengthHint = input("Enter at least {min} characters to search.");
|
|
35
|
+
|
|
36
|
+
protected readonly text = signal("");
|
|
37
|
+
protected readonly hintId = `global-search-hint-${nextId++}`;
|
|
38
|
+
protected readonly canSearch = computed(() => this.text().trim().length >= MIN_QUERY_LENGTH);
|
|
39
|
+
protected readonly hint = computed(() =>
|
|
40
|
+
this.minLengthHint().replace("{min}", String(MIN_QUERY_LENGTH)),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
protected submit(event: Event): void {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
if (!this.canSearch()) return;
|
|
46
|
+
void this.router.navigate(["/search"], {
|
|
47
|
+
queryParams: { [GLOBAL_QUERY_KEY]: this.text().trim() },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@if (href(); as link) {
|
|
2
|
+
<a
|
|
3
|
+
[routerLink]="link"
|
|
4
|
+
class="block hover:bg-accent rounded-md px-3 -mx-3 py-1 transition-colors"
|
|
5
|
+
[attr.aria-label]="'View: ' + (title() ?? 'result')"
|
|
6
|
+
>
|
|
7
|
+
<span class="font-medium">{{ title() ?? '—' }}</span>
|
|
8
|
+
@if (subtitle()) {
|
|
9
|
+
<p class="text-sm text-muted-foreground">{{ subtitle() }}</p>
|
|
10
|
+
}
|
|
11
|
+
</a>
|
|
12
|
+
} @else {
|
|
13
|
+
<div class="px-3 -mx-3 py-1">
|
|
14
|
+
<span class="font-medium">{{ title() ?? '—' }}</span>
|
|
15
|
+
@if (subtitle()) {
|
|
16
|
+
<p class="text-sm text-muted-foreground">{{ subtitle() }}</p>
|
|
17
|
+
}
|
|
18
|
+
</div>
|
|
19
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
7
|
+
import { RouterLink } from "@angular/router";
|
|
8
|
+
import type { DisplayField, SourceConfig } from "../../types/search-config.types";
|
|
9
|
+
import { fieldValue } from "../../utils/field-utils";
|
|
10
|
+
|
|
11
|
+
const ROUTE_TOKEN = /:([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
12
|
+
|
|
13
|
+
function fieldName(f: DisplayField): string {
|
|
14
|
+
return typeof f === "string" ? f : f.name;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Resolves a single dot-path against a node, returning a string or null. */
|
|
18
|
+
function readPath(node: unknown, path: string): string | null {
|
|
19
|
+
if (!node || typeof node !== "object") return null;
|
|
20
|
+
const parts = path.split(".");
|
|
21
|
+
let cursor: unknown = node;
|
|
22
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
23
|
+
if (!cursor || typeof cursor !== "object") return null;
|
|
24
|
+
cursor = (cursor as Record<string, unknown>)[parts[i]];
|
|
25
|
+
}
|
|
26
|
+
const leaf = (cursor as Record<string, unknown> | null)?.[parts[parts.length - 1]];
|
|
27
|
+
if (leaf == null) return null;
|
|
28
|
+
if (typeof leaf === "object") {
|
|
29
|
+
return fieldValue(leaf as { value?: unknown; displayValue?: string | null });
|
|
30
|
+
}
|
|
31
|
+
return String(leaf);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Reads the user-facing string for a top-level display field. */
|
|
35
|
+
function readDisplayField(node: unknown, field: DisplayField): string | null {
|
|
36
|
+
if (typeof field === "string") return readPath(node, field);
|
|
37
|
+
if ("raw" in field) return readPath(node, field.name);
|
|
38
|
+
// Relationship: prefer the first scalar subfield's display value.
|
|
39
|
+
const sub = field.subfields[0];
|
|
40
|
+
if (!sub) return null;
|
|
41
|
+
return readPath(node, `${field.name}.${fieldName(sub)}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Substitutes `:fieldName` tokens in `pattern` with node values (`:id` = the id field). */
|
|
45
|
+
function resolveRoute(pattern: string, node: unknown, idField: string): string | null {
|
|
46
|
+
let failed = false;
|
|
47
|
+
const out = pattern.replace(ROUTE_TOKEN, (_, token: string) => {
|
|
48
|
+
const value = readPath(node, token === "id" ? idField : token);
|
|
49
|
+
if (value == null) {
|
|
50
|
+
failed = true;
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
return encodeURIComponent(value);
|
|
54
|
+
});
|
|
55
|
+
return failed ? null : out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Default row used when no `appSearchResult` template is supplied for a source.
|
|
60
|
+
*
|
|
61
|
+
* Title is the first `displayFields` entry, the subtitle the rest joined with
|
|
62
|
+
* " · ". With a `routePattern` the row links to the resolved route.
|
|
63
|
+
*/
|
|
64
|
+
@Component({
|
|
65
|
+
selector: "app-default-result-row",
|
|
66
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
67
|
+
imports: [RouterLink],
|
|
68
|
+
templateUrl: "./default-result-row.html",
|
|
69
|
+
})
|
|
70
|
+
export class DefaultResultRowComponent {
|
|
71
|
+
readonly node = input.required<unknown>();
|
|
72
|
+
readonly source = input.required<SourceConfig>();
|
|
73
|
+
|
|
74
|
+
protected readonly title = computed(() => {
|
|
75
|
+
const first = this.source().displayFields[0];
|
|
76
|
+
return first ? readDisplayField(this.node(), first) : null;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
protected readonly subtitle = computed(() =>
|
|
80
|
+
this.source()
|
|
81
|
+
.displayFields.slice(1)
|
|
82
|
+
.map((f) => readDisplayField(this.node(), f))
|
|
83
|
+
.filter((s): s is string => s != null && s !== "")
|
|
84
|
+
.join(" · "),
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
protected readonly href = computed(() => {
|
|
88
|
+
const pattern = this.source().routePattern;
|
|
89
|
+
return pattern ? resolveRoute(pattern, this.node(), this.source().idField ?? "Id") : null;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<div class="space-y-6">
|
|
2
|
+
<p class="sr-only" role="status" aria-live="polite">{{ liveMessage() }}</p>
|
|
3
|
+
|
|
4
|
+
@if (soleSource(); as sole) {
|
|
5
|
+
<div class="flex flex-col gap-4">
|
|
6
|
+
<app-filter-box [source]="sole.config" />
|
|
7
|
+
@if ((sole.config.sortBy?.length ?? 0) > 0 || sole.filters.length > 0) {
|
|
8
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
9
|
+
@if ((sole.config.sortBy?.length ?? 0) > 0) {
|
|
10
|
+
<app-sort-control
|
|
11
|
+
[options]="sole.config.sortBy ?? []"
|
|
12
|
+
[sort]="sole.sort ?? undefined"
|
|
13
|
+
(sortChange)="onSort(sole, $event)"
|
|
14
|
+
/>
|
|
15
|
+
} @if (sole.filters.length > 0) {
|
|
16
|
+
<app-active-filters
|
|
17
|
+
[filters]="sole.filters"
|
|
18
|
+
[configs]="sole.config.filterBy ?? []"
|
|
19
|
+
(removeFilter)="state.removeFilter(sole.config.key, $event)"
|
|
20
|
+
(clearAll)="state.clearFilters(sole.config.key)"
|
|
21
|
+
/>
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
</div>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
<!-- Page-level error: every in-scope source failed, or a whole-request failure. -->
|
|
29
|
+
@if (error(); as message) {
|
|
30
|
+
<app-alert
|
|
31
|
+
role="alert"
|
|
32
|
+
variant="destructive"
|
|
33
|
+
icon="error"
|
|
34
|
+
title="Search failed"
|
|
35
|
+
[description]="message"
|
|
36
|
+
/>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
<!-- A source that failed while a sibling succeeded does not blank the shared grid. -->
|
|
40
|
+
@for (failed of failedSources(); track failed.config.key) {
|
|
41
|
+
<app-alert
|
|
42
|
+
role="alert"
|
|
43
|
+
variant="destructive"
|
|
44
|
+
icon="error"
|
|
45
|
+
[title]="'Failed to load ' + failed.config.label"
|
|
46
|
+
[description]="failed.error ?? ''"
|
|
47
|
+
/>
|
|
48
|
+
} @if (!loading() && !error() && page().totalCount > 0) {
|
|
49
|
+
<p class="text-sm text-muted-foreground">
|
|
50
|
+
{{ page().totalCount }} {{ page().totalCount === 1 ? 'result' : 'results' }}
|
|
51
|
+
</p>
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
<div #region tabindex="-1" class="outline-none" [attr.aria-busy]="loading()">
|
|
55
|
+
@if (loading()) {
|
|
56
|
+
<div [class]="gridClass()">
|
|
57
|
+
@for (n of skeletons(); track n) {
|
|
58
|
+
<app-skeleton class="block h-48 w-full rounded-lg" />
|
|
59
|
+
}
|
|
60
|
+
</div>
|
|
61
|
+
} @else if (!error()) { @if (state.isShortQuery()) {
|
|
62
|
+
<p class="py-12 text-center text-sm text-muted-foreground">{{ shortQueryMessage() }}</p>
|
|
63
|
+
} @else if (isEmpty()) {
|
|
64
|
+
<p class="py-12 text-center text-sm text-muted-foreground">{{ emptyText() }}</p>
|
|
65
|
+
} @else {
|
|
66
|
+
<ul role="list" [class]="gridClass()">
|
|
67
|
+
@for (item of items(); track key(item, $index)) {
|
|
68
|
+
<li class="flex flex-col gap-1.5">
|
|
69
|
+
@if (showBadges()) {
|
|
70
|
+
<span
|
|
71
|
+
class="w-fit rounded-full px-2.5 py-0.5 text-xs font-medium"
|
|
72
|
+
[class]="badgeColor(item.sourceKey)"
|
|
73
|
+
>
|
|
74
|
+
{{ item.source.labelSingular ?? item.source.label }}
|
|
75
|
+
</span>
|
|
76
|
+
}
|
|
77
|
+
<app-result-item
|
|
78
|
+
class="min-h-0 flex-1"
|
|
79
|
+
[node]="item.node"
|
|
80
|
+
[source]="item.source"
|
|
81
|
+
[templates]="templates()"
|
|
82
|
+
/>
|
|
83
|
+
</li>
|
|
84
|
+
}
|
|
85
|
+
</ul>
|
|
86
|
+
} }
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
@if (page().totalCount > 0) {
|
|
90
|
+
<app-paginator
|
|
91
|
+
[length]="page().totalCount"
|
|
92
|
+
[pageIndex]="page().pageIndex"
|
|
93
|
+
[pageSize]="page().pageSize"
|
|
94
|
+
[pageSizeOptions]="state.pagination().pageSizeOptions"
|
|
95
|
+
[disabled]="loading() || !!error()"
|
|
96
|
+
(page)="onPage($event)"
|
|
97
|
+
/>
|
|
98
|
+
}
|
|
99
|
+
</div>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
ChangeDetectionStrategy,
|
|
8
|
+
Component,
|
|
9
|
+
computed,
|
|
10
|
+
ElementRef,
|
|
11
|
+
inject,
|
|
12
|
+
input,
|
|
13
|
+
viewChild,
|
|
14
|
+
} from "@angular/core";
|
|
15
|
+
import { AlertComponent } from "../../../../components/ui/alert/alert";
|
|
16
|
+
import {
|
|
17
|
+
PaginatorComponent,
|
|
18
|
+
type PageEvent,
|
|
19
|
+
} from "../../../../components/ui/paginator/paginator";
|
|
20
|
+
import { SkeletonComponent } from "../../../../components/ui/skeleton/skeleton";
|
|
21
|
+
import { ActiveFiltersComponent } from "../active-filters/active-filters";
|
|
22
|
+
import { FilterBoxComponent } from "../filter-panel/filter-box";
|
|
23
|
+
import { SortControlComponent } from "../sort-control/sort-control";
|
|
24
|
+
import { SearchStateService } from "../../state/search-state.service";
|
|
25
|
+
import type { SourceView } from "../../state/search-state.types";
|
|
26
|
+
import { ALL_SCOPE } from "../../types/scope.types";
|
|
27
|
+
import type { MergedResultItem } from "../../types/search-result.types";
|
|
28
|
+
import type { SortState } from "../../types/sort.types";
|
|
29
|
+
import { ResultItemComponent, type ResultTemplates } from "./result-item";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Badge colors for the mixed grid. A source's color is its position among the
|
|
33
|
+
* in-scope sources, wrapped around the palette, so badges stay stable and
|
|
34
|
+
* distinct with no per-source configuration.
|
|
35
|
+
*/
|
|
36
|
+
const BADGE_PALETTE = [
|
|
37
|
+
"bg-blue-100 text-blue-700",
|
|
38
|
+
"bg-amber-100 text-amber-700",
|
|
39
|
+
"bg-purple-100 text-purple-700",
|
|
40
|
+
"bg-pink-100 text-pink-700",
|
|
41
|
+
"bg-emerald-100 text-emerald-700",
|
|
42
|
+
"bg-sky-100 text-sky-700",
|
|
43
|
+
] as const;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Single combined grid across every in-scope source, driven by one global pager
|
|
47
|
+
* over the cumulative result set (the layout for `pagination.mode: "merged"`).
|
|
48
|
+
*
|
|
49
|
+
* Top to bottom: the single-source filter chrome (only when the scope is
|
|
50
|
+
* narrowed to one source), a live results count, the grid, the global pager.
|
|
51
|
+
* With 2+ sources in scope each card gets a colored source badge.
|
|
52
|
+
*/
|
|
53
|
+
@Component({
|
|
54
|
+
selector: "app-merged-search-results",
|
|
55
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
56
|
+
imports: [
|
|
57
|
+
AlertComponent,
|
|
58
|
+
SkeletonComponent,
|
|
59
|
+
ActiveFiltersComponent,
|
|
60
|
+
FilterBoxComponent,
|
|
61
|
+
PaginatorComponent,
|
|
62
|
+
SortControlComponent,
|
|
63
|
+
ResultItemComponent,
|
|
64
|
+
],
|
|
65
|
+
templateUrl: "./merged-search-results.html",
|
|
66
|
+
})
|
|
67
|
+
export class MergedSearchResultsComponent {
|
|
68
|
+
protected readonly state = inject(SearchStateService);
|
|
69
|
+
|
|
70
|
+
readonly templates = input<ResultTemplates | undefined>(undefined);
|
|
71
|
+
/** Message shown when there are no results. */
|
|
72
|
+
readonly emptyMessage = input<string | undefined>(undefined);
|
|
73
|
+
readonly shortQueryMessage = input("Start your search…");
|
|
74
|
+
/** Classes on the grid container (default: responsive 1/2/3 columns). */
|
|
75
|
+
readonly gridClass = input("grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3");
|
|
76
|
+
|
|
77
|
+
private readonly region = viewChild<ElementRef<HTMLElement>>("region");
|
|
78
|
+
|
|
79
|
+
protected readonly page = this.state.globalPagination;
|
|
80
|
+
protected readonly loading = this.state.loading;
|
|
81
|
+
protected readonly error = this.state.error;
|
|
82
|
+
|
|
83
|
+
/** Set when the scope is narrowed to one source: its chrome is shown. */
|
|
84
|
+
protected readonly soleSource = computed<SourceView | undefined>(() =>
|
|
85
|
+
this.state.scope() === ALL_SCOPE ? undefined : this.state.inScopeSources()[0],
|
|
86
|
+
);
|
|
87
|
+
protected readonly showBadges = computed(() => this.state.scope() === ALL_SCOPE);
|
|
88
|
+
|
|
89
|
+
private readonly badgeColors = computed(() => {
|
|
90
|
+
const colors: Record<string, string> = {};
|
|
91
|
+
this.state.inScopeSources().forEach((v, i) => {
|
|
92
|
+
colors[v.config.key] = BADGE_PALETTE[i % BADGE_PALETTE.length];
|
|
93
|
+
});
|
|
94
|
+
return colors;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
protected readonly items = computed(() =>
|
|
98
|
+
this.state.mergedResults().flatMap((item) => {
|
|
99
|
+
const view = this.state.sources()[item.sourceKey];
|
|
100
|
+
return view ? [{ ...item, source: view.config }] : [];
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
protected readonly failedSources = computed(() =>
|
|
105
|
+
this.error() ? [] : this.state.inScopeSources().filter((v) => !!v.error),
|
|
106
|
+
);
|
|
107
|
+
protected readonly skeletons = computed(() =>
|
|
108
|
+
Array.from({ length: Math.min(this.page().pageSize, 6) }, (_, i) => i),
|
|
109
|
+
);
|
|
110
|
+
protected readonly isEmpty = computed(() => this.items().length === 0);
|
|
111
|
+
protected readonly emptyText = computed(() => this.emptyMessage() ?? "No results found.");
|
|
112
|
+
|
|
113
|
+
protected readonly liveMessage = computed(() => {
|
|
114
|
+
const total = this.page().totalCount;
|
|
115
|
+
if (this.loading()) return "Searching…";
|
|
116
|
+
if (this.error()) return "Search failed.";
|
|
117
|
+
if (this.state.isShortQuery()) return this.shortQueryMessage();
|
|
118
|
+
if (this.isEmpty()) return this.emptyText();
|
|
119
|
+
return `${total} result${total === 1 ? "" : "s"}`;
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
protected badgeColor(sourceKey: string): string {
|
|
123
|
+
return this.badgeColors()[sourceKey] ?? BADGE_PALETTE[0];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
protected key(item: MergedResultItem, index: number): string {
|
|
127
|
+
const id =
|
|
128
|
+
item.node && typeof item.node === "object" ? (item.node as { Id?: unknown }).Id : undefined;
|
|
129
|
+
return typeof id === "string" ? `${item.sourceKey}:${id}` : `${item.sourceKey}:${index}`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
protected onSort(view: SourceView, sort: SortState | undefined): void {
|
|
133
|
+
this.state.setSort(view.config.key, sort ?? null);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
protected onPage(event: PageEvent): void {
|
|
137
|
+
if (event.pageSize !== this.page().pageSize) {
|
|
138
|
+
this.state.setPageSize(event.pageSize);
|
|
139
|
+
} else {
|
|
140
|
+
this.state.goToPage(event.pageIndex);
|
|
141
|
+
}
|
|
142
|
+
// Land screen-reader users on the new page.
|
|
143
|
+
this.region()?.nativeElement.focus();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
7
|
+
import {
|
|
8
|
+
ChangeDetectionStrategy,
|
|
9
|
+
Component,
|
|
10
|
+
computed,
|
|
11
|
+
input,
|
|
12
|
+
type TemplateRef,
|
|
13
|
+
} from "@angular/core";
|
|
14
|
+
import type { SearchResultContext } from "../../directives/search-result-template/search-result-template";
|
|
15
|
+
import type { SourceConfig } from "../../types/search-config.types";
|
|
16
|
+
import { DefaultResultRowComponent } from "./default-result-row";
|
|
17
|
+
|
|
18
|
+
/** Source key -> the `appSearchResult` template that renders its nodes. */
|
|
19
|
+
export type ResultTemplates = ReadonlyMap<string, TemplateRef<SearchResultContext>>;
|
|
20
|
+
|
|
21
|
+
/** One result node: the source's `appSearchResult` template, else the default row. */
|
|
22
|
+
@Component({
|
|
23
|
+
selector: "app-result-item",
|
|
24
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25
|
+
imports: [NgTemplateOutlet, DefaultResultRowComponent],
|
|
26
|
+
template: `
|
|
27
|
+
@if (template(); as tpl) {
|
|
28
|
+
<ng-container *ngTemplateOutlet="tpl; context: { $implicit: node(), source: source() }" />
|
|
29
|
+
} @else {
|
|
30
|
+
<app-default-result-row [node]="node()" [source]="source()" />
|
|
31
|
+
}
|
|
32
|
+
`,
|
|
33
|
+
})
|
|
34
|
+
export class ResultItemComponent {
|
|
35
|
+
readonly node = input.required<unknown>();
|
|
36
|
+
readonly source = input.required<SourceConfig>();
|
|
37
|
+
readonly templates = input<ResultTemplates | undefined>(undefined);
|
|
38
|
+
|
|
39
|
+
protected readonly template = computed(() => this.templates()?.get(this.source().key));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Stable `@for` key for a node: its id when present, else its position. */
|
|
43
|
+
export function nodeKey(
|
|
44
|
+
node: unknown,
|
|
45
|
+
idField: string | undefined,
|
|
46
|
+
fallback: number,
|
|
47
|
+
): string | number {
|
|
48
|
+
if (node && typeof node === "object") {
|
|
49
|
+
const id = (node as Record<string, unknown>)[idField ?? "Id"];
|
|
50
|
+
if (typeof id === "string" || typeof id === "number") return id;
|
|
51
|
+
}
|
|
52
|
+
return fallback;
|
|
53
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="space-y-10">
|
|
2
|
+
@for (view of state.inScopeSources(); track view.config.key) {
|
|
3
|
+
<app-source-section
|
|
4
|
+
[source]="view.config"
|
|
5
|
+
[templates]="templates()"
|
|
6
|
+
[hideFilterChrome]="filtersHidden()"
|
|
7
|
+
[emptyMessage]="emptyMessages()[view.config.key]"
|
|
8
|
+
/>
|
|
9
|
+
}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
7
|
+
import { SearchStateService } from "../../state/search-state.service";
|
|
8
|
+
import { ALL_SCOPE } from "../../types/scope.types";
|
|
9
|
+
import type { ResultTemplates } from "./result-item";
|
|
10
|
+
import { SourceSectionComponent } from "./source-section";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* One {@link SourceSectionComponent} per in-scope source, in config order.
|
|
14
|
+
*
|
|
15
|
+
* Filter chrome (box, sort, chips) is hidden under the "All" scope: per-source
|
|
16
|
+
* controls would be unreachable with every source on screen. Selections stay in
|
|
17
|
+
* state, so narrowing the scope brings them back unchanged.
|
|
18
|
+
*/
|
|
19
|
+
@Component({
|
|
20
|
+
selector: "app-search-results",
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
imports: [SourceSectionComponent],
|
|
23
|
+
templateUrl: "./search-results.html",
|
|
24
|
+
})
|
|
25
|
+
export class SearchResultsComponent {
|
|
26
|
+
protected readonly state = inject(SearchStateService);
|
|
27
|
+
|
|
28
|
+
readonly templates = input<ResultTemplates | undefined>(undefined);
|
|
29
|
+
/** Per source key: message shown when that source has no results. */
|
|
30
|
+
readonly emptyMessages = input<Readonly<Record<string, string>>>({});
|
|
31
|
+
|
|
32
|
+
protected readonly filtersHidden = computed(() => this.state.scope() === ALL_SCOPE);
|
|
33
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@if (view(); as v) {
|
|
2
|
+
<section class="flex flex-col gap-6">
|
|
3
|
+
<p class="sr-only" role="status" aria-live="polite">{{ liveMessage() }}</p>
|
|
4
|
+
|
|
5
|
+
@if (showFilters()) {
|
|
6
|
+
<app-filter-box [source]="source()" />
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
<div class="min-w-0">
|
|
10
|
+
<header class="flex flex-wrap items-baseline gap-3 mb-3">
|
|
11
|
+
<h2 class="text-lg font-semibold">{{ source().label }}</h2>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
@if (showSort() || showChips()) {
|
|
15
|
+
<div class="flex flex-wrap items-center gap-2 mb-3">
|
|
16
|
+
@if (showSort()) {
|
|
17
|
+
<app-sort-control
|
|
18
|
+
[options]="source().sortBy ?? []"
|
|
19
|
+
[sort]="v.sort ?? undefined"
|
|
20
|
+
(sortChange)="onSort($event)"
|
|
21
|
+
/>
|
|
22
|
+
} @if (showChips()) {
|
|
23
|
+
<app-active-filters
|
|
24
|
+
[filters]="v.filters"
|
|
25
|
+
[configs]="source().filterBy ?? []"
|
|
26
|
+
(removeFilter)="state.removeFilter(source().key, $event)"
|
|
27
|
+
(clearAll)="state.clearFilters(source().key)"
|
|
28
|
+
/>
|
|
29
|
+
}
|
|
30
|
+
</div>
|
|
31
|
+
} @if (!loading() && !error() && hasTotal()) {
|
|
32
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
33
|
+
{{ totalCount() }} {{ totalCount() === 1 ? 'result' : 'results' }}
|
|
34
|
+
</p>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
<div #region tabindex="-1" class="min-h-32 outline-none" [attr.aria-busy]="loading()">
|
|
38
|
+
@if (loading()) {
|
|
39
|
+
<div class="space-y-2">
|
|
40
|
+
@for (row of skeletonRows(); track row) {
|
|
41
|
+
<app-skeleton class="block h-12 w-full" />
|
|
42
|
+
}
|
|
43
|
+
</div>
|
|
44
|
+
} @if (error(); as message) {
|
|
45
|
+
<app-alert
|
|
46
|
+
role="alert"
|
|
47
|
+
variant="destructive"
|
|
48
|
+
icon="error"
|
|
49
|
+
[title]="'Failed to load ' + source().label"
|
|
50
|
+
[description]="message"
|
|
51
|
+
/>
|
|
52
|
+
} @if (showResults()) {
|
|
53
|
+
<ul class="divide-y" role="list">
|
|
54
|
+
@for (node of nodes(); track key(node, $index)) {
|
|
55
|
+
<li class="py-3">
|
|
56
|
+
<app-result-item [node]="node" [source]="source()" [templates]="templates()" />
|
|
57
|
+
</li>
|
|
58
|
+
}
|
|
59
|
+
</ul>
|
|
60
|
+
} @if (showEmpty()) {
|
|
61
|
+
<div class="flex flex-col items-center justify-center py-10 text-center">
|
|
62
|
+
<app-icon
|
|
63
|
+
[name]="state.isShortQuery() ? 'search' : 'noResults'"
|
|
64
|
+
size="2.5rem"
|
|
65
|
+
class="text-muted-foreground mb-3"
|
|
66
|
+
/>
|
|
67
|
+
<p class="text-sm text-muted-foreground">
|
|
68
|
+
{{ state.isShortQuery() ? shortQueryMessage() : emptyText() }}
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
}
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<app-paginator
|
|
75
|
+
[length]="pagerLength()"
|
|
76
|
+
[pageIndex]="v.pageIndex"
|
|
77
|
+
[pageSize]="v.pageSize"
|
|
78
|
+
[pageSizeOptions]="state.pagination().pageSizeOptions"
|
|
79
|
+
[disabled]="loading() || !!error()"
|
|
80
|
+
(page)="onPage($event)"
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
</section>
|
|
84
|
+
}
|