@salesforce/ui-bundle-template-feature-angular-language-switcher 12.5.4
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 +193 -0
- 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 +5238 -0
- package/dist/README.md +77 -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-language-switcher/.forceignore +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/.graphqlrc.yml +2 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/.postcssrc.json +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/.prettierignore +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/.prettierrc +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/CHANGELOG.md +4 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/README.md +85 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/angular.json +98 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/codegen.yml +95 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/components.json +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/e2e/app.spec.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/esbuild/api-version.mjs +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/esbuild/graphql-codegen.mjs +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/eslint-plugin-angular-graphql.js +148 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/eslint.config.js +76 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/feature-angular-language-switcher.uibundle-meta.xml +7 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/middleware/html.mjs +3 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/middleware/proxy.mjs +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/package.json +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/playwright.config.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/public/favicon.ico +0 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/scripts/get-graphql-schema.mjs +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/scripts/rewrite-e2e-assets.mjs +30 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/api/data-client.service.spec.ts +184 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/api/data-client.service.ts +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/app.config.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/app.html +1 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/app.routes.ts +26 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/app.spec.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/app.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/layout/app-layout/app-layout.html +51 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/layout/app-layout/app-layout.spec.ts +63 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/layout/app-layout/app-layout.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/alert/alert.html +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/alert/alert.ts +41 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/button/button.html +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/button/button.ts +66 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/card/card.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/collapsible/collapsible.html +38 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/collapsible/collapsible.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/date-picker/date-picker.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/date-picker/date-picker.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/date-range-picker/date-range-picker.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/date-range-picker/date-range-picker.ts +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/dialog/dialog.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/dialog/dialog.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/dropdown-menu/dropdown-menu.html +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/dropdown-menu/dropdown-menu.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/field/field.html +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/field/field.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/field-appearance.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/field-size.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/icon/icon.ts +68 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/input/input.html +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/input/input.ts +79 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/label/label.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/paginator/paginator.html +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/paginator/paginator.ts +93 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/paginator/types.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/popover/popover.html +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/popover/popover.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/select/select.html +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/select/select.ts +63 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/separator/separator.ts +31 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/skeleton/skeleton.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/spinner/spinner.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/__examples__/html-middleware-site-example.ts +41 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/__examples__/language-switcher-example.ts +41 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/build-language-url.ts +158 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/index.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/language-switcher.html +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/language-switcher.ts +110 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/features/language-switcher/languages.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/home/home.html +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/home/home.spec.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/home/home.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/not-found/not-found.html +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/not-found/not-found.spec.ts +33 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/pages/not-found/not-found.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/alert/hlm-alert-action.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/alert/hlm-alert-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/alert/hlm-alert-title.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/alert/hlm-alert.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/alert/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/button/hlm-button.token.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/button/hlm-button.ts +72 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/button/index.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/calendar/hlm-calendar-multi.ts +195 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/calendar/hlm-calendar-range.ts +194 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/calendar/hlm-calendar.ts +189 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/calendar/hlm-month-year-calendar.ts +119 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/calendar/index.ts +16 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-action.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-avatar.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-footer.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-header.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card.token.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/hlm-card.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/card/index.ts +28 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/collapsible/hlm-collapsible-content.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/collapsible/hlm-collapsible-trigger.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/collapsible/hlm-collapsible.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/collapsible/index.ts +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-multi-input.ts +104 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker-anchor.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker-input.ts +118 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker-multi.token.ts +109 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker-multi.ts +220 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker-trigger.ts +104 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker.token.ts +69 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-picker.ts +203 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-range-input.ts +120 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-range-picker.token.ts +86 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-date-range-picker.ts +252 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-month-year-input.ts +105 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-month-year-picker.token.ts +89 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/hlm-month-year-picker.ts +196 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/date-picker/index.ts +38 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-close.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-content.ts +74 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-description.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-footer.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-overlay.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-title.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog.service.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/hlm-dialog.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dialog/index.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox.ts +54 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-focus-on-hover.ts +35 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-item-sub-indicator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-item.ts +42 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-label.ts +20 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio-indicator.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-separator.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-shortcut.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub-trigger.ts +52 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub.ts +53 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-token.ts +26 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu-trigger.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/hlm-dropdown-menu.ts +57 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/dropdown-menu/index.ts +49 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-description.ts +53 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-error.ts +100 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-group.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-legend.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-separator.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-set.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field-title.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/hlm-field.ts +47 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/field/index.ts +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input/hlm-input.ts +21 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/hlm-input-group-addon.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/hlm-input-group-button.ts +47 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/hlm-input-group-input.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/hlm-input-group-text.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/hlm-input-group.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/input-group/index.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/label/hlm-label.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/label/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/label/label.html +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-numbered-pagination-query-params.ts +191 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-numbered-pagination.ts +290 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-content.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-ellipsis.ts +27 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-item.ts +7 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-link.ts +51 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-next.ts +65 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination-previous.ts +65 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/hlm-pagination.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/pagination/index.ts +31 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-content.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-description.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-header.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-title.ts +12 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover-trigger.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/hlm-popover.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/popover/index.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-content.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-group.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-item.ts +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-label.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-multiple.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-placeholder.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-portal.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-scroll-down.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-scroll-up.ts +22 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-separator.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-trigger.ts +59 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-value-template.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-value.ts +18 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-values-content.ts +9 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select-values.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/hlm-select.ts +37 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/select/index.ts +52 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/separator/hlm-separator.ts +19 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/separator/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/skeleton/hlm-skeleton.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/skeleton/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/spinner/hlm-spinner.ts +26 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/spinner/index.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/utils/hlm.ts +313 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/utils/index.ts +2 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/shared/utils/provide-spartan-hlm.ts +34 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/utils/async-data.ts +99 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/index.html +13 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/main.ts +5 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/styles.css +139 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/types/sf-globals.d.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/tsconfig.app.json +11 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/tsconfig.json +36 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/tsconfig.spec.json +10 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/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/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 +278 -0
- package/dist/scripts/org-setup.config.json +5 -0
- package/dist/scripts/org-setup.mjs +2537 -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 +46 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import type { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
booleanAttribute,
|
|
6
|
+
computed,
|
|
7
|
+
input,
|
|
8
|
+
model,
|
|
9
|
+
numberAttribute,
|
|
10
|
+
untracked,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { HlmSelectImports } from '@spartan-ng/styles/select';
|
|
13
|
+
import { HlmPagination } from './hlm-pagination';
|
|
14
|
+
import { HlmPaginationContent } from './hlm-pagination-content';
|
|
15
|
+
import { HlmPaginationEllipsis } from './hlm-pagination-ellipsis';
|
|
16
|
+
import { HlmPaginationItem } from './hlm-pagination-item';
|
|
17
|
+
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
18
|
+
import { HlmPaginationNext } from './hlm-pagination-next';
|
|
19
|
+
import { HlmPaginationPrevious } from './hlm-pagination-previous';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'hlm-numbered-pagination',
|
|
23
|
+
imports: [
|
|
24
|
+
HlmPagination,
|
|
25
|
+
HlmPaginationContent,
|
|
26
|
+
HlmPaginationItem,
|
|
27
|
+
HlmPaginationPrevious,
|
|
28
|
+
HlmPaginationNext,
|
|
29
|
+
HlmPaginationLink,
|
|
30
|
+
HlmPaginationEllipsis,
|
|
31
|
+
HlmSelectImports,
|
|
32
|
+
],
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
template: `
|
|
35
|
+
<div class="flex items-center justify-between gap-2 px-4 py-2">
|
|
36
|
+
<div class="flex items-center gap-1 text-sm text-nowrap text-gray-600">
|
|
37
|
+
<b>{{ totalItems() }}</b>
|
|
38
|
+
total items |
|
|
39
|
+
<b>{{ _lastPageNumber() }}</b>
|
|
40
|
+
pages
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<nav hlmPagination>
|
|
44
|
+
<ul hlmPaginationContent>
|
|
45
|
+
@if (showEdges() && !_isFirstPageActive()) {
|
|
46
|
+
<li hlmPaginationItem (click)="goToPrevious()">
|
|
47
|
+
<hlm-pagination-previous />
|
|
48
|
+
</li>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@for (page of _pages(); track page) {
|
|
52
|
+
<li hlmPaginationItem>
|
|
53
|
+
@if (page === '...') {
|
|
54
|
+
<hlm-pagination-ellipsis />
|
|
55
|
+
} @else {
|
|
56
|
+
<a
|
|
57
|
+
hlmPaginationLink
|
|
58
|
+
[isActive]="currentPage() === page"
|
|
59
|
+
(click)="currentPage.set(page)"
|
|
60
|
+
>
|
|
61
|
+
{{ page }}
|
|
62
|
+
</a>
|
|
63
|
+
}
|
|
64
|
+
</li>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@if (showEdges() && !_isLastPageActive()) {
|
|
68
|
+
<li hlmPaginationItem (click)="goToNext()">
|
|
69
|
+
<hlm-pagination-next />
|
|
70
|
+
</li>
|
|
71
|
+
}
|
|
72
|
+
</ul>
|
|
73
|
+
</nav>
|
|
74
|
+
|
|
75
|
+
<!-- Show Page Size selector -->
|
|
76
|
+
<hlm-select [(value)]="itemsPerPage" class="ml-auto">
|
|
77
|
+
<hlm-select-trigger class="w-fit">
|
|
78
|
+
<hlm-select-value />
|
|
79
|
+
</hlm-select-trigger>
|
|
80
|
+
<hlm-select-content *hlmSelectPortal>
|
|
81
|
+
<hlm-select-group>
|
|
82
|
+
@for (pageSize of _pageSizesWithCurrent(); track pageSize) {
|
|
83
|
+
<hlm-select-item [value]="pageSize">{{ pageSize }}</hlm-select-item>
|
|
84
|
+
}
|
|
85
|
+
</hlm-select-group>
|
|
86
|
+
</hlm-select-content>
|
|
87
|
+
</hlm-select>
|
|
88
|
+
</div>
|
|
89
|
+
`,
|
|
90
|
+
})
|
|
91
|
+
export class HlmNumberedPagination {
|
|
92
|
+
/**
|
|
93
|
+
* The current (active) page.
|
|
94
|
+
*/
|
|
95
|
+
public readonly currentPage = model.required<number>();
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The number of items per paginated page.
|
|
99
|
+
*/
|
|
100
|
+
public readonly itemsPerPage = model.required<number>();
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The total number of items in the collection. Only useful when
|
|
104
|
+
* doing server-side paging, where the collection size is limited
|
|
105
|
+
* to a single page returned by the server API.
|
|
106
|
+
*/
|
|
107
|
+
public readonly totalItems = input.required<number, NumberInput>({
|
|
108
|
+
transform: numberAttribute,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The number of page links to show.
|
|
113
|
+
*/
|
|
114
|
+
public readonly maxSize = input<number, NumberInput>(7, {
|
|
115
|
+
transform: numberAttribute,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Show the first and last page buttons.
|
|
120
|
+
*/
|
|
121
|
+
public readonly showEdges = input<boolean, BooleanInput>(true, {
|
|
122
|
+
transform: booleanAttribute,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The page sizes to show.
|
|
127
|
+
* Defaults to [10, 20, 50, 100]
|
|
128
|
+
*/
|
|
129
|
+
public readonly pageSizes = input<number[]>([10, 20, 50, 100]);
|
|
130
|
+
|
|
131
|
+
protected readonly _pageSizesWithCurrent = computed(() => {
|
|
132
|
+
const pageSizes = this.pageSizes();
|
|
133
|
+
return pageSizes.includes(this.itemsPerPage())
|
|
134
|
+
? pageSizes // if current page size is included, return the same array
|
|
135
|
+
: [...pageSizes, this.itemsPerPage()].sort((a, b) => a - b); // otherwise, add current page size and sort the array
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
protected readonly _isFirstPageActive = computed(() => this.currentPage() === 1);
|
|
139
|
+
protected readonly _isLastPageActive = computed(
|
|
140
|
+
() => this.currentPage() === this._lastPageNumber(),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
protected readonly _lastPageNumber = computed(() => {
|
|
144
|
+
if (this.totalItems() < 1) {
|
|
145
|
+
// when there are 0 or fewer (an error case) items, there are no "pages" as such,
|
|
146
|
+
// but it makes sense to consider a single, empty page as the last page.
|
|
147
|
+
return 1;
|
|
148
|
+
}
|
|
149
|
+
return Math.ceil(this.totalItems() / this.itemsPerPage());
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
protected readonly _pages = computed(() => {
|
|
153
|
+
const correctedCurrentPage = outOfBoundCorrection(
|
|
154
|
+
this.totalItems(),
|
|
155
|
+
this.itemsPerPage(),
|
|
156
|
+
this.currentPage(),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
if (correctedCurrentPage !== this.currentPage()) {
|
|
160
|
+
// update the current page
|
|
161
|
+
untracked(() => this.currentPage.set(correctedCurrentPage));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return createPageArray(
|
|
165
|
+
correctedCurrentPage,
|
|
166
|
+
this.itemsPerPage(),
|
|
167
|
+
this.totalItems(),
|
|
168
|
+
this.maxSize(),
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
protected goToPrevious(): void {
|
|
173
|
+
this.currentPage.set(this.currentPage() - 1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
protected goToNext(): void {
|
|
177
|
+
this.currentPage.set(this.currentPage() + 1);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
protected goToFirst(): void {
|
|
181
|
+
this.currentPage.set(1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
protected goToLast(): void {
|
|
185
|
+
this.currentPage.set(this._lastPageNumber());
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
type Page = number | '...';
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Checks that the instance.currentPage property is within bounds for the current page range.
|
|
193
|
+
* If not, return a correct value for currentPage, or the current value if OK.
|
|
194
|
+
*
|
|
195
|
+
* Copied from 'ngx-pagination' package
|
|
196
|
+
*/
|
|
197
|
+
export function outOfBoundCorrection(
|
|
198
|
+
totalItems: number,
|
|
199
|
+
itemsPerPage: number,
|
|
200
|
+
currentPage: number,
|
|
201
|
+
): number {
|
|
202
|
+
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
203
|
+
if (totalPages < currentPage && 0 < totalPages) {
|
|
204
|
+
return totalPages;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (currentPage < 1) {
|
|
208
|
+
return 1;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return currentPage;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Returns an array of Page objects to use in the pagination controls.
|
|
216
|
+
*
|
|
217
|
+
* Copied from 'ngx-pagination' package
|
|
218
|
+
*/
|
|
219
|
+
export function createPageArray(
|
|
220
|
+
currentPage: number,
|
|
221
|
+
itemsPerPage: number,
|
|
222
|
+
totalItems: number,
|
|
223
|
+
paginationRange: number,
|
|
224
|
+
): Page[] {
|
|
225
|
+
// paginationRange could be a string if passed from attribute, so cast to number.
|
|
226
|
+
paginationRange = +paginationRange;
|
|
227
|
+
const pages: Page[] = [];
|
|
228
|
+
|
|
229
|
+
// Return 1 as default page number
|
|
230
|
+
// Make sense to show 1 instead of empty when there are no items
|
|
231
|
+
const totalPages = Math.max(Math.ceil(totalItems / itemsPerPage), 1);
|
|
232
|
+
const halfWay = Math.ceil(paginationRange / 2);
|
|
233
|
+
|
|
234
|
+
const isStart = currentPage <= halfWay;
|
|
235
|
+
const isEnd = totalPages - halfWay < currentPage;
|
|
236
|
+
const isMiddle = !isStart && !isEnd;
|
|
237
|
+
|
|
238
|
+
const ellipsesNeeded = paginationRange < totalPages;
|
|
239
|
+
let i = 1;
|
|
240
|
+
|
|
241
|
+
while (i <= totalPages && i <= paginationRange) {
|
|
242
|
+
let label: number | '...';
|
|
243
|
+
const pageNumber = calculatePageNumber(i, currentPage, paginationRange, totalPages);
|
|
244
|
+
const openingEllipsesNeeded = i === 2 && (isMiddle || isEnd);
|
|
245
|
+
const closingEllipsesNeeded = i === paginationRange - 1 && (isMiddle || isStart);
|
|
246
|
+
if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {
|
|
247
|
+
label = '...';
|
|
248
|
+
} else {
|
|
249
|
+
label = pageNumber;
|
|
250
|
+
}
|
|
251
|
+
pages.push(label);
|
|
252
|
+
i++;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return pages;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Given the position in the sequence of pagination links [i],
|
|
260
|
+
* figure out what page number corresponds to that position.
|
|
261
|
+
*
|
|
262
|
+
* Copied from 'ngx-pagination' package
|
|
263
|
+
*/
|
|
264
|
+
function calculatePageNumber(
|
|
265
|
+
i: number,
|
|
266
|
+
currentPage: number,
|
|
267
|
+
paginationRange: number,
|
|
268
|
+
totalPages: number,
|
|
269
|
+
) {
|
|
270
|
+
const halfWay = Math.ceil(paginationRange / 2);
|
|
271
|
+
if (i === paginationRange) {
|
|
272
|
+
return totalPages;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (i === 1) {
|
|
276
|
+
return i;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (paginationRange < totalPages) {
|
|
280
|
+
if (totalPages - halfWay < currentPage) {
|
|
281
|
+
return totalPages - paginationRange + i;
|
|
282
|
+
}
|
|
283
|
+
if (halfWay < currentPage) {
|
|
284
|
+
return currentPage - halfWay + i;
|
|
285
|
+
}
|
|
286
|
+
return i;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return i;
|
|
290
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'ul[hlmPaginationContent]',
|
|
6
|
+
host: { 'data-slot': 'pagination-content' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmPaginationContent {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'gap-0.5 flex items-center');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
|
+
import { lucideEllipsis } from '@ng-icons/lucide';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'hlm-pagination-ellipsis',
|
|
8
|
+
imports: [NgIcon],
|
|
9
|
+
providers: [provideIcons({ lucideEllipsis })],
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
host: { 'data-slot': 'pagination-ellipsis' },
|
|
12
|
+
template: `
|
|
13
|
+
<ng-icon name="lucideEllipsis" />
|
|
14
|
+
<span class="sr-only">{{ srOnlyText() }}</span>
|
|
15
|
+
`,
|
|
16
|
+
})
|
|
17
|
+
export class HlmPaginationEllipsis {
|
|
18
|
+
/** Screen reader only text for the ellipsis */
|
|
19
|
+
public readonly srOnlyText = input<string>('More pages');
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
classes(
|
|
23
|
+
() =>
|
|
24
|
+
"size-8 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex items-center justify-center",
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { Directive, booleanAttribute, input } from '@angular/core';
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
import { buttonVariants, type ButtonVariants } from '@spartan-ng/styles/button';
|
|
5
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
6
|
+
|
|
7
|
+
@Directive({
|
|
8
|
+
selector: '[hlmPaginationLink]',
|
|
9
|
+
hostDirectives: [
|
|
10
|
+
{
|
|
11
|
+
directive: RouterLink,
|
|
12
|
+
inputs: [
|
|
13
|
+
'target',
|
|
14
|
+
'queryParams',
|
|
15
|
+
'fragment',
|
|
16
|
+
'queryParamsHandling',
|
|
17
|
+
'state',
|
|
18
|
+
'info',
|
|
19
|
+
'relativeTo',
|
|
20
|
+
'preserveFragment',
|
|
21
|
+
'skipLocationChange',
|
|
22
|
+
'replaceUrl',
|
|
23
|
+
'routerLink: link',
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
host: {
|
|
28
|
+
'data-slot': 'pagination-link',
|
|
29
|
+
'[attr.data-active]': 'isActive() ? "true" : null',
|
|
30
|
+
'[attr.aria-current]': 'isActive() ? "page" : null',
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
export class HlmPaginationLink {
|
|
34
|
+
/** Whether the link is active (i.e., the current page). */
|
|
35
|
+
public readonly isActive = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
36
|
+
/** The size of the button. */
|
|
37
|
+
public readonly size = input<ButtonVariants['size']>('icon');
|
|
38
|
+
/** The link to navigate to the page. */
|
|
39
|
+
public readonly link = input<RouterLink['routerLink']>();
|
|
40
|
+
|
|
41
|
+
constructor() {
|
|
42
|
+
classes(() => [
|
|
43
|
+
'relative',
|
|
44
|
+
buttonVariants({
|
|
45
|
+
variant: this.isActive() ? 'outline' : 'ghost',
|
|
46
|
+
size: this.size(),
|
|
47
|
+
}),
|
|
48
|
+
this.link() === undefined && 'cursor-pointer',
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import {
|
|
3
|
+
booleanAttribute,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
Component,
|
|
6
|
+
computed,
|
|
7
|
+
input,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import type { RouterLink } from '@angular/router';
|
|
10
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
11
|
+
import { lucideChevronRight } from '@ng-icons/lucide';
|
|
12
|
+
import type { ButtonVariants } from '@spartan-ng/styles/button';
|
|
13
|
+
import { hlm } from '@spartan-ng/styles/utils';
|
|
14
|
+
import type { ClassValue } from 'clsx';
|
|
15
|
+
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'hlm-pagination-next',
|
|
19
|
+
imports: [HlmPaginationLink, NgIcon],
|
|
20
|
+
providers: [provideIcons({ lucideChevronRight })],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
template: `
|
|
23
|
+
<a
|
|
24
|
+
hlmPaginationLink
|
|
25
|
+
[class]="_computedClass()"
|
|
26
|
+
[link]="link()"
|
|
27
|
+
[queryParams]="queryParams()"
|
|
28
|
+
[queryParamsHandling]="queryParamsHandling()"
|
|
29
|
+
[size]="_size()"
|
|
30
|
+
[attr.aria-label]="ariaLabel()"
|
|
31
|
+
>
|
|
32
|
+
<span [class]="_labelClass()">{{ text() }}</span>
|
|
33
|
+
<ng-icon name="lucideChevronRight" class="rtl:rotate-180" />
|
|
34
|
+
</a>
|
|
35
|
+
`,
|
|
36
|
+
})
|
|
37
|
+
export class HlmPaginationNext {
|
|
38
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
39
|
+
/** The link to navigate to the next page. */
|
|
40
|
+
public readonly link = input<RouterLink['routerLink']>();
|
|
41
|
+
/** The query parameters to pass to the next page. */
|
|
42
|
+
public readonly queryParams = input<RouterLink['queryParams']>();
|
|
43
|
+
/** How to handle query parameters when navigating to the next page. */
|
|
44
|
+
public readonly queryParamsHandling = input<RouterLink['queryParamsHandling']>();
|
|
45
|
+
|
|
46
|
+
/** The aria-label for the next page link. */
|
|
47
|
+
public readonly ariaLabel = input<string>('Go to next page', { alias: 'aria-label' });
|
|
48
|
+
/** The text to display for the next page link. */
|
|
49
|
+
public readonly text = input<string>('Next');
|
|
50
|
+
/** Whether the button should only display the icon. */
|
|
51
|
+
public readonly iconOnly = input<boolean, BooleanInput>(false, {
|
|
52
|
+
transform: booleanAttribute,
|
|
53
|
+
});
|
|
54
|
+
protected readonly _labelClass = computed(() =>
|
|
55
|
+
this.iconOnly() ? 'sr-only' : 'hidden sm:block',
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
protected readonly _size = computed<ButtonVariants['size']>(() =>
|
|
59
|
+
this.iconOnly() ? 'icon' : 'default',
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
protected readonly _computedClass = computed(() =>
|
|
63
|
+
hlm(!this.iconOnly() && 'pe-1.5!', this.userClass()),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import {
|
|
3
|
+
booleanAttribute,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
Component,
|
|
6
|
+
computed,
|
|
7
|
+
input,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import type { RouterLink } from '@angular/router';
|
|
10
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
11
|
+
import { lucideChevronLeft } from '@ng-icons/lucide';
|
|
12
|
+
import type { ButtonVariants } from '@spartan-ng/styles/button';
|
|
13
|
+
import { hlm } from '@spartan-ng/styles/utils';
|
|
14
|
+
import type { ClassValue } from 'clsx';
|
|
15
|
+
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'hlm-pagination-previous',
|
|
19
|
+
imports: [HlmPaginationLink, NgIcon],
|
|
20
|
+
providers: [provideIcons({ lucideChevronLeft })],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
template: `
|
|
23
|
+
<a
|
|
24
|
+
hlmPaginationLink
|
|
25
|
+
[class]="_computedClass()"
|
|
26
|
+
[link]="link()"
|
|
27
|
+
[queryParams]="queryParams()"
|
|
28
|
+
[queryParamsHandling]="queryParamsHandling()"
|
|
29
|
+
[size]="_size()"
|
|
30
|
+
[attr.aria-label]="ariaLabel()"
|
|
31
|
+
>
|
|
32
|
+
<ng-icon name="lucideChevronLeft" class="rtl:rotate-180" />
|
|
33
|
+
<span [class]="_labelClass()">{{ text() }}</span>
|
|
34
|
+
</a>
|
|
35
|
+
`,
|
|
36
|
+
})
|
|
37
|
+
export class HlmPaginationPrevious {
|
|
38
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
39
|
+
/** The link to navigate to the previous page. */
|
|
40
|
+
public readonly link = input<RouterLink['routerLink']>();
|
|
41
|
+
/** The query parameters to pass to the previous page. */
|
|
42
|
+
public readonly queryParams = input<RouterLink['queryParams']>();
|
|
43
|
+
/** How to handle query parameters when navigating to the previous page. */
|
|
44
|
+
public readonly queryParamsHandling = input<RouterLink['queryParamsHandling']>();
|
|
45
|
+
|
|
46
|
+
/** The aria-label for the previous page link. */
|
|
47
|
+
public readonly ariaLabel = input<string>('Go to previous page', { alias: 'aria-label' });
|
|
48
|
+
/** The text to display for the previous page link. */
|
|
49
|
+
public readonly text = input<string>('Previous');
|
|
50
|
+
/** Whether the button should only display the icon. */
|
|
51
|
+
public readonly iconOnly = input<boolean, BooleanInput>(false, {
|
|
52
|
+
transform: booleanAttribute,
|
|
53
|
+
});
|
|
54
|
+
protected readonly _labelClass = computed(() =>
|
|
55
|
+
hlm(this.iconOnly() ? 'sr-only' : 'hidden sm:block'),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
protected readonly _size = computed<ButtonVariants['size']>(() =>
|
|
59
|
+
this.iconOnly() ? 'icon' : 'default',
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
protected readonly _computedClass = computed(() =>
|
|
63
|
+
hlm(!this.iconOnly() && 'ps-1.5!', this.userClass()),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Directive, input } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPagination],hlm-pagination',
|
|
6
|
+
host: {
|
|
7
|
+
'data-slot': 'pagination',
|
|
8
|
+
role: 'navigation',
|
|
9
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
export class HlmPagination {
|
|
13
|
+
/** The aria-label for the pagination component. */
|
|
14
|
+
public readonly ariaLabel = input<string>('pagination', { alias: 'aria-label' });
|
|
15
|
+
|
|
16
|
+
constructor() {
|
|
17
|
+
classes(() => 'mx-auto flex w-full justify-center');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HlmNumberedPagination } from './hlm-numbered-pagination';
|
|
2
|
+
import { HlmNumberedPaginationQueryParams } from './hlm-numbered-pagination-query-params';
|
|
3
|
+
import { HlmPagination } from './hlm-pagination';
|
|
4
|
+
import { HlmPaginationContent } from './hlm-pagination-content';
|
|
5
|
+
import { HlmPaginationEllipsis } from './hlm-pagination-ellipsis';
|
|
6
|
+
import { HlmPaginationItem } from './hlm-pagination-item';
|
|
7
|
+
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
8
|
+
import { HlmPaginationNext } from './hlm-pagination-next';
|
|
9
|
+
import { HlmPaginationPrevious } from './hlm-pagination-previous';
|
|
10
|
+
|
|
11
|
+
export * from './hlm-numbered-pagination';
|
|
12
|
+
export * from './hlm-numbered-pagination-query-params';
|
|
13
|
+
export * from './hlm-pagination';
|
|
14
|
+
export * from './hlm-pagination-content';
|
|
15
|
+
export * from './hlm-pagination-ellipsis';
|
|
16
|
+
export * from './hlm-pagination-item';
|
|
17
|
+
export * from './hlm-pagination-link';
|
|
18
|
+
export * from './hlm-pagination-next';
|
|
19
|
+
export * from './hlm-pagination-previous';
|
|
20
|
+
|
|
21
|
+
export const HlmPaginationImports = [
|
|
22
|
+
HlmPagination,
|
|
23
|
+
HlmPaginationContent,
|
|
24
|
+
HlmPaginationItem,
|
|
25
|
+
HlmPaginationLink,
|
|
26
|
+
HlmPaginationPrevious,
|
|
27
|
+
HlmPaginationNext,
|
|
28
|
+
HlmPaginationEllipsis,
|
|
29
|
+
HlmNumberedPagination,
|
|
30
|
+
HlmNumberedPaginationQueryParams,
|
|
31
|
+
] as const;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Directive, ElementRef, Renderer2, effect, inject, signal } from '@angular/core';
|
|
2
|
+
import { injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmPopoverContent],hlm-popover-content',
|
|
7
|
+
host: { 'data-slot': 'popover-content' },
|
|
8
|
+
})
|
|
9
|
+
export class HlmPopoverContent {
|
|
10
|
+
private readonly _stateProvider = injectExposesStateProvider({ host: true });
|
|
11
|
+
public state = this._stateProvider.state ?? signal('closed');
|
|
12
|
+
private readonly _renderer = inject(Renderer2);
|
|
13
|
+
private readonly _element = inject(ElementRef);
|
|
14
|
+
|
|
15
|
+
constructor() {
|
|
16
|
+
effect(() => {
|
|
17
|
+
this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
classes(
|
|
21
|
+
() =>
|
|
22
|
+
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 relative flex w-72 flex-col outline-none',
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPopoverDescription]',
|
|
6
|
+
host: { 'data-slot': 'popover-description' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmPopoverDescription {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'text-muted-foreground');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPopoverHeader],hlm-popover-header',
|
|
6
|
+
host: { 'data-slot': 'popover-header' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmPopoverHeader {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'flex flex-col gap-0.5 text-sm');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnPopoverContent } from '@spartan-ng/brain/popover';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPopoverPortal]',
|
|
6
|
+
hostDirectives: [{ directive: BrnPopoverContent, inputs: ['context', 'class'] }],
|
|
7
|
+
})
|
|
8
|
+
export class HlmPopoverPortal {}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPopoverTitle]',
|
|
6
|
+
host: { 'data-slot': 'popover-title' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmPopoverTitle {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'font-medium');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnPopoverTrigger } from '@spartan-ng/brain/popover';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'button[hlmPopoverTrigger],button[hlmPopoverTriggerFor]',
|
|
6
|
+
hostDirectives: [
|
|
7
|
+
{
|
|
8
|
+
directive: BrnPopoverTrigger,
|
|
9
|
+
inputs: ['id', 'brnPopoverTriggerFor: hlmPopoverTriggerFor', 'type'],
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
host: { 'data-slot': 'popover-trigger' },
|
|
13
|
+
})
|
|
14
|
+
export class HlmPopoverTrigger {}
|