@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,74 @@
|
|
|
1
|
+
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import type { ComponentType } from '@angular/cdk/portal';
|
|
3
|
+
import { NgComponentOutlet } from '@angular/common';
|
|
4
|
+
import {
|
|
5
|
+
booleanAttribute,
|
|
6
|
+
ChangeDetectionStrategy,
|
|
7
|
+
Component,
|
|
8
|
+
computed,
|
|
9
|
+
inject,
|
|
10
|
+
input,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
13
|
+
import { lucideX } from '@ng-icons/lucide';
|
|
14
|
+
import { BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/brain/dialog';
|
|
15
|
+
import { HlmButton } from '@spartan-ng/styles/button';
|
|
16
|
+
|
|
17
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
18
|
+
import { HlmDialogClose } from './hlm-dialog-close';
|
|
19
|
+
|
|
20
|
+
type HlmDialogContentContext = {
|
|
21
|
+
$component?: ComponentType<unknown>;
|
|
22
|
+
$dynamicComponentClass?: string;
|
|
23
|
+
$showCloseButton?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'hlm-dialog-content',
|
|
28
|
+
imports: [NgComponentOutlet, HlmButton, HlmDialogClose, NgIcon],
|
|
29
|
+
providers: [provideIcons({ lucideX })],
|
|
30
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
+
host: {
|
|
32
|
+
'data-slot': 'dialog-content',
|
|
33
|
+
'[attr.data-state]': 'state()',
|
|
34
|
+
},
|
|
35
|
+
template: `
|
|
36
|
+
@if (component) {
|
|
37
|
+
<ng-container [ngComponentOutlet]="component" />
|
|
38
|
+
} @else {
|
|
39
|
+
<ng-content />
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if (showCloseButton()) {
|
|
43
|
+
<button hlmBtn variant="ghost" size="icon-sm" class="absolute end-2 top-2" hlmDialogClose>
|
|
44
|
+
<span class="sr-only">close</span>
|
|
45
|
+
<ng-icon name="lucideX" />
|
|
46
|
+
</button>
|
|
47
|
+
}
|
|
48
|
+
`,
|
|
49
|
+
})
|
|
50
|
+
export class HlmDialogContent {
|
|
51
|
+
private readonly _dialogRef = inject(BrnDialogRef);
|
|
52
|
+
private readonly _dialogContext = injectBrnDialogContext<HlmDialogContentContext | null>({
|
|
53
|
+
optional: true,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
public readonly showCloseButton = input<boolean, BooleanInput>(
|
|
57
|
+
this._dialogContext?.$showCloseButton ?? true,
|
|
58
|
+
{
|
|
59
|
+
transform: booleanAttribute,
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
public readonly state = computed(() => this._dialogRef?.state() ?? 'closed');
|
|
64
|
+
|
|
65
|
+
public readonly component = this._dialogContext?.$component;
|
|
66
|
+
private readonly _dynamicComponentClass = this._dialogContext?.$dynamicComponentClass;
|
|
67
|
+
|
|
68
|
+
constructor() {
|
|
69
|
+
classes(() => [
|
|
70
|
+
'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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm relative mx-auto w-full outline-none sm:mx-0',
|
|
71
|
+
this._dynamicComponentClass,
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnDialogDescription } from '@spartan-ng/brain/dialog';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmDialogDescription]',
|
|
7
|
+
hostDirectives: [BrnDialogDescription],
|
|
8
|
+
host: { 'data-slot': 'dialog-description' },
|
|
9
|
+
})
|
|
10
|
+
export class HlmDialogDescription {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(
|
|
13
|
+
() =>
|
|
14
|
+
'text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3',
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmDialogFooter],hlm-dialog-footer',
|
|
6
|
+
host: { 'data-slot': 'dialog-footer' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmDialogFooter {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(
|
|
11
|
+
() =>
|
|
12
|
+
'bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmDialogHeader],hlm-dialog-header',
|
|
6
|
+
host: { 'data-slot': 'dialog-header' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmDialogHeader {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'gap-2 flex flex-col');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { computed, Directive, effect, input, untracked } from '@angular/core';
|
|
2
|
+
import { injectCustomClassSettable } from '@spartan-ng/brain/core';
|
|
3
|
+
import { BrnDialogOverlay } from '@spartan-ng/brain/dialog';
|
|
4
|
+
import { hlm } from '@spartan-ng/styles/utils';
|
|
5
|
+
import type { ClassValue } from 'clsx';
|
|
6
|
+
|
|
7
|
+
export const hlmDialogOverlayClass = hlm(
|
|
8
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 isolate bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs',
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
@Directive({
|
|
12
|
+
selector: '[hlmDialogOverlay],hlm-dialog-overlay',
|
|
13
|
+
hostDirectives: [BrnDialogOverlay],
|
|
14
|
+
})
|
|
15
|
+
export class HlmDialogOverlay {
|
|
16
|
+
private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });
|
|
17
|
+
|
|
18
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
19
|
+
protected readonly _computedClass = computed(() => hlm(hlmDialogOverlayClass, this.userClass()));
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
effect(() => {
|
|
23
|
+
const newClass = this._computedClass();
|
|
24
|
+
untracked(() => this._classSettable?.setClassToCustomElement(newClass));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnDialogContent } from '@spartan-ng/brain/dialog';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmDialogPortal]',
|
|
6
|
+
hostDirectives: [{ directive: BrnDialogContent, inputs: ['context', 'class'] }],
|
|
7
|
+
})
|
|
8
|
+
export class HlmDialogPortal {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnDialogTitle } from '@spartan-ng/brain/dialog';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmDialogTitle]',
|
|
7
|
+
hostDirectives: [BrnDialogTitle],
|
|
8
|
+
host: { 'data-slot': 'dialog-title' },
|
|
9
|
+
})
|
|
10
|
+
export class HlmDialogTitle {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'text-base leading-none font-medium');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnDialogTrigger } from '@spartan-ng/brain/dialog';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'button[hlmDialogTrigger],button[hlmDialogTriggerFor]',
|
|
6
|
+
hostDirectives: [
|
|
7
|
+
{
|
|
8
|
+
directive: BrnDialogTrigger,
|
|
9
|
+
inputs: ['id', 'brnDialogTriggerFor: hlmDialogTriggerFor', 'type'],
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
host: { 'data-slot': 'dialog-trigger' },
|
|
13
|
+
})
|
|
14
|
+
export class HlmDialogTrigger {}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentType } from '@angular/cdk/portal';
|
|
2
|
+
import { inject, Injectable, type TemplateRef } from '@angular/core';
|
|
3
|
+
import {
|
|
4
|
+
type BrnDialogOptions,
|
|
5
|
+
type BrnDialogRef,
|
|
6
|
+
BrnDialogService,
|
|
7
|
+
cssClassesToArray,
|
|
8
|
+
} from '@spartan-ng/brain/dialog';
|
|
9
|
+
import { HlmDialogContent } from './hlm-dialog-content';
|
|
10
|
+
import { hlmDialogOverlayClass } from './hlm-dialog-overlay';
|
|
11
|
+
|
|
12
|
+
export type HlmDialogOptions<DialogContext = unknown> = BrnDialogOptions & {
|
|
13
|
+
contentClass?: string;
|
|
14
|
+
showCloseButton?: boolean;
|
|
15
|
+
context?: DialogContext;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
@Injectable({
|
|
19
|
+
providedIn: 'root',
|
|
20
|
+
})
|
|
21
|
+
export class HlmDialogService {
|
|
22
|
+
private readonly _brnDialogService = inject(BrnDialogService);
|
|
23
|
+
|
|
24
|
+
public open<TResult = unknown, TContext = unknown>(
|
|
25
|
+
component: ComponentType<unknown> | TemplateRef<unknown>,
|
|
26
|
+
options?: Partial<HlmDialogOptions<TContext>>,
|
|
27
|
+
): BrnDialogRef<TResult> {
|
|
28
|
+
const mergedOptions = {
|
|
29
|
+
...(options ?? {}),
|
|
30
|
+
backdropClass: cssClassesToArray(`${hlmDialogOverlayClass} ${options?.backdropClass ?? ''}`),
|
|
31
|
+
context: {
|
|
32
|
+
...(options?.context && typeof options.context === 'object' ? options.context : {}),
|
|
33
|
+
$component: component,
|
|
34
|
+
$dynamicComponentClass: options?.contentClass,
|
|
35
|
+
$showCloseButton: options?.showCloseButton,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return this._brnDialogService.open<unknown, TResult>(
|
|
40
|
+
HlmDialogContent,
|
|
41
|
+
undefined,
|
|
42
|
+
mergedOptions.context,
|
|
43
|
+
mergedOptions,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';
|
|
3
|
+
import { HlmDialogOverlay } from './hlm-dialog-overlay';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'hlm-dialog',
|
|
7
|
+
exportAs: 'hlmDialog',
|
|
8
|
+
imports: [HlmDialogOverlay],
|
|
9
|
+
providers: [
|
|
10
|
+
{
|
|
11
|
+
provide: BrnDialog,
|
|
12
|
+
useExisting: forwardRef(() => HlmDialog),
|
|
13
|
+
},
|
|
14
|
+
provideBrnDialogDefaultOptions({
|
|
15
|
+
// add custom options here
|
|
16
|
+
}),
|
|
17
|
+
],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
template: `
|
|
20
|
+
<hlm-dialog-overlay />
|
|
21
|
+
<ng-content />
|
|
22
|
+
`,
|
|
23
|
+
})
|
|
24
|
+
export class HlmDialog extends BrnDialog {}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HlmDialog } from './hlm-dialog';
|
|
2
|
+
import { HlmDialogClose } from './hlm-dialog-close';
|
|
3
|
+
import { HlmDialogContent } from './hlm-dialog-content';
|
|
4
|
+
import { HlmDialogDescription } from './hlm-dialog-description';
|
|
5
|
+
import { HlmDialogFooter } from './hlm-dialog-footer';
|
|
6
|
+
import { HlmDialogHeader } from './hlm-dialog-header';
|
|
7
|
+
import { HlmDialogOverlay } from './hlm-dialog-overlay';
|
|
8
|
+
import { HlmDialogPortal } from './hlm-dialog-portal';
|
|
9
|
+
import { HlmDialogTitle } from './hlm-dialog-title';
|
|
10
|
+
import { HlmDialogTrigger } from './hlm-dialog-trigger';
|
|
11
|
+
|
|
12
|
+
export * from './hlm-dialog';
|
|
13
|
+
export * from './hlm-dialog-close';
|
|
14
|
+
export * from './hlm-dialog-content';
|
|
15
|
+
export * from './hlm-dialog-description';
|
|
16
|
+
export * from './hlm-dialog-footer';
|
|
17
|
+
export * from './hlm-dialog-header';
|
|
18
|
+
export * from './hlm-dialog-overlay';
|
|
19
|
+
export * from './hlm-dialog-portal';
|
|
20
|
+
export * from './hlm-dialog-title';
|
|
21
|
+
export * from './hlm-dialog-trigger';
|
|
22
|
+
export * from './hlm-dialog.service';
|
|
23
|
+
|
|
24
|
+
export const HlmDialogImports = [
|
|
25
|
+
HlmDialog,
|
|
26
|
+
HlmDialogContent,
|
|
27
|
+
HlmDialogDescription,
|
|
28
|
+
HlmDialogFooter,
|
|
29
|
+
HlmDialogHeader,
|
|
30
|
+
HlmDialogOverlay,
|
|
31
|
+
HlmDialogPortal,
|
|
32
|
+
HlmDialogTitle,
|
|
33
|
+
HlmDialogTrigger,
|
|
34
|
+
HlmDialogClose,
|
|
35
|
+
] as const;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
|
+
import { lucideCheck } from '@ng-icons/lucide';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'hlm-dropdown-menu-checkbox-indicator',
|
|
8
|
+
imports: [NgIcon],
|
|
9
|
+
providers: [provideIcons({ lucideCheck })],
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
host: { 'data-slot': 'dropdown-menu-checkbox-item-indicator' },
|
|
12
|
+
template: ` <ng-icon name="lucideCheck" /> `,
|
|
13
|
+
})
|
|
14
|
+
export class HlmDropdownMenuCheckboxIndicator {
|
|
15
|
+
constructor() {
|
|
16
|
+
classes(
|
|
17
|
+
() =>
|
|
18
|
+
'absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-checkbox:opacity-100',
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemSelectable } from '@angular/cdk/menu';
|
|
3
|
+
import { Directive, booleanAttribute, inject, input } from '@angular/core';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
import { HlmDropdownMenuFocusOnHover } from './hlm-dropdown-menu-focus-on-hover';
|
|
6
|
+
|
|
7
|
+
/** @internal. Use HlmDropdownMenuCheckbox instead. */
|
|
8
|
+
@Directive({
|
|
9
|
+
selector: '[hlmDropdownMenuCheckboxCdk]',
|
|
10
|
+
providers: [
|
|
11
|
+
{ provide: CdkMenuItemCheckbox, useExisting: HlmDropdownMenuCheckboxCdk },
|
|
12
|
+
{ provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuCheckboxCdk },
|
|
13
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class HlmDropdownMenuCheckboxCdk extends CdkMenuItemCheckbox {
|
|
17
|
+
public readonly keepOpen = input<boolean, BooleanInput>(true, { transform: booleanAttribute });
|
|
18
|
+
|
|
19
|
+
public override trigger(options?: { keepOpen: boolean }) {
|
|
20
|
+
super.trigger({ ...options, keepOpen: this.keepOpen() });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Directive({
|
|
25
|
+
selector: '[hlmDropdownMenuCheckbox],[hlmDropdownMenuCheckboxItem]',
|
|
26
|
+
hostDirectives: [
|
|
27
|
+
{
|
|
28
|
+
directive: HlmDropdownMenuCheckboxCdk,
|
|
29
|
+
inputs: ['cdkMenuItemDisabled: disabled', 'cdkMenuItemChecked: checked', 'keepOpen'],
|
|
30
|
+
outputs: ['cdkMenuItemTriggered: triggered'],
|
|
31
|
+
},
|
|
32
|
+
HlmDropdownMenuFocusOnHover,
|
|
33
|
+
],
|
|
34
|
+
host: {
|
|
35
|
+
'data-slot': 'dropdown-menu-checkbox-item',
|
|
36
|
+
'[attr.data-disabled]': '_cdkMenuItem.disabled ? "" : null',
|
|
37
|
+
'[attr.data-checked]': '_cdkMenuItem.checked ? "" : null',
|
|
38
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
export class HlmDropdownMenuCheckbox {
|
|
42
|
+
protected readonly _cdkMenuItem = inject(HlmDropdownMenuCheckboxCdk);
|
|
43
|
+
|
|
44
|
+
public readonly inset = input<boolean, BooleanInput>(false, {
|
|
45
|
+
transform: booleanAttribute,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
constructor() {
|
|
49
|
+
classes(
|
|
50
|
+
() =>
|
|
51
|
+
"hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm data-inset:ps-8 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-checkbox relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { InputModalityDetector } from '@angular/cdk/a11y';
|
|
2
|
+
import { CdkMenu, CdkMenuItem } from '@angular/cdk/menu';
|
|
3
|
+
import { Directive, inject } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* Moves DOM focus to the hovered menu item. CDK menus only move focus with the keyboard, so on a pointer
|
|
8
|
+
* the highlight would otherwise stay on the last keyboard-focused item (leaving two rows highlighted) and,
|
|
9
|
+
* when a submenu closes, focus would fall to <body>, the menu stack would report no focus, and the whole
|
|
10
|
+
* dropdown would collapse. Following the pointer with focus (Radix/shadcn behaviour) keeps a single
|
|
11
|
+
* highlight and keeps focus inside the menu stack. setActiveMenuItem also syncs the key manager so keyboard
|
|
12
|
+
* navigation continues from the hovered item.
|
|
13
|
+
*
|
|
14
|
+
* Applied as a host directive on every dropdown item type (item, checkbox, radio, sub-trigger).
|
|
15
|
+
*/
|
|
16
|
+
@Directive({
|
|
17
|
+
selector: '[hlmDropdownMenuFocusOnHover]',
|
|
18
|
+
host: {
|
|
19
|
+
'(mouseenter)': '_focusOnHover()',
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
export class HlmDropdownMenuFocusOnHover {
|
|
23
|
+
private readonly _cdkMenuItem = inject(CdkMenuItem, { self: true });
|
|
24
|
+
private readonly _parentMenu = inject(CdkMenu, { optional: true });
|
|
25
|
+
private readonly _inputModality = inject(InputModalityDetector);
|
|
26
|
+
|
|
27
|
+
protected _focusOnHover(): void {
|
|
28
|
+
// Only skip synthetic hovers from touch taps; every real hover (mouse, or keyboard-then-hover,
|
|
29
|
+
// which leaves the modality as 'keyboard') should move focus to keep a single highlight.
|
|
30
|
+
if (this._inputModality.mostRecentModality === 'touch' || this._cdkMenuItem.disabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this._parentMenu?.setActiveMenuItem(this._cdkMenuItem);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CdkMenuGroup } from '@angular/cdk/menu';
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmDropdownMenuGroup],hlm-dropdown-menu-group',
|
|
7
|
+
hostDirectives: [CdkMenuGroup],
|
|
8
|
+
host: { 'data-slot': 'dropdown-menu-group' },
|
|
9
|
+
})
|
|
10
|
+
export class HlmDropdownMenuGroup {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'block');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
|
+
import { lucideChevronRight } from '@ng-icons/lucide';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'hlm-dropdown-menu-item-sub-indicator',
|
|
8
|
+
imports: [NgIcon],
|
|
9
|
+
providers: [provideIcons({ lucideChevronRight })],
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
template: `
|
|
12
|
+
<ng-icon name="lucideChevronRight" class="text-[length:--spacing(4)] rtl:rotate-180" />
|
|
13
|
+
`,
|
|
14
|
+
})
|
|
15
|
+
export class HlmDropdownMenuItemSubIndicator {
|
|
16
|
+
constructor() {
|
|
17
|
+
classes(() => 'ms-auto flex items-center justify-center');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { CdkMenuItem } from '@angular/cdk/menu';
|
|
3
|
+
import { booleanAttribute, Directive, HOST_TAG_NAME, inject, input } from '@angular/core';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
import { HlmDropdownMenuFocusOnHover } from './hlm-dropdown-menu-focus-on-hover';
|
|
6
|
+
|
|
7
|
+
@Directive({
|
|
8
|
+
selector: '[hlmDropdownMenuItem],hlm-dropdown-menu-item',
|
|
9
|
+
hostDirectives: [
|
|
10
|
+
{
|
|
11
|
+
directive: CdkMenuItem,
|
|
12
|
+
inputs: ['cdkMenuItemDisabled: disabled'],
|
|
13
|
+
outputs: ['cdkMenuItemTriggered: triggered'],
|
|
14
|
+
},
|
|
15
|
+
HlmDropdownMenuFocusOnHover,
|
|
16
|
+
],
|
|
17
|
+
host: {
|
|
18
|
+
'data-slot': 'dropdown-menu-item',
|
|
19
|
+
'[attr.disabled]': '_isButton && disabled() ? "" : null',
|
|
20
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
21
|
+
'[attr.data-variant]': 'variant()',
|
|
22
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
export class HlmDropdownMenuItem {
|
|
26
|
+
protected readonly _isButton = inject(HOST_TAG_NAME) === 'button';
|
|
27
|
+
|
|
28
|
+
public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
29
|
+
|
|
30
|
+
public readonly variant = input<'default' | 'destructive'>('default');
|
|
31
|
+
|
|
32
|
+
public readonly inset = input<boolean, BooleanInput>(false, {
|
|
33
|
+
transform: booleanAttribute,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
constructor() {
|
|
37
|
+
classes(
|
|
38
|
+
() =>
|
|
39
|
+
"hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[ng-icon]:text-destructive not-data-[variant=destructive]:hover:**:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:ps-8 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-item relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { booleanAttribute, Directive, input } from '@angular/core';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmDropdownMenuLabel],hlm-dropdown-menu-label',
|
|
7
|
+
host: {
|
|
8
|
+
'data-slot': 'dropdown-menu-label',
|
|
9
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
export class HlmDropdownMenuLabel {
|
|
13
|
+
public readonly inset = input<boolean, BooleanInput>(false, {
|
|
14
|
+
transform: booleanAttribute,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
classes(() => 'text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:ps-8 block');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
|
+
import { lucideCheck } from '@ng-icons/lucide';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'hlm-dropdown-menu-radio-indicator',
|
|
8
|
+
imports: [NgIcon],
|
|
9
|
+
providers: [provideIcons({ lucideCheck })],
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
host: { 'data-slot': 'dropdown-menu-radio-item-indicator' },
|
|
12
|
+
template: ` <ng-icon name="lucideCheck" /> `,
|
|
13
|
+
})
|
|
14
|
+
export class HlmDropdownMenuRadioIndicator {
|
|
15
|
+
constructor() {
|
|
16
|
+
classes(
|
|
17
|
+
() =>
|
|
18
|
+
'absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-radio:opacity-100',
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { CdkMenuItem, CdkMenuItemRadio, CdkMenuItemSelectable } from '@angular/cdk/menu';
|
|
3
|
+
import { Directive, booleanAttribute, inject, input } from '@angular/core';
|
|
4
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
5
|
+
import { HlmDropdownMenuFocusOnHover } from './hlm-dropdown-menu-focus-on-hover';
|
|
6
|
+
|
|
7
|
+
/** @internal. Use HlmDropdownMenuRadio instead. */
|
|
8
|
+
@Directive({
|
|
9
|
+
selector: '[hlmDropdownMenuRadioCdk]',
|
|
10
|
+
providers: [
|
|
11
|
+
{ provide: CdkMenuItemRadio, useExisting: HlmDropdownMenuRadioCdk },
|
|
12
|
+
{ provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuRadioCdk },
|
|
13
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class HlmDropdownMenuRadioCdk extends CdkMenuItemRadio {
|
|
17
|
+
public readonly keepOpen = input<boolean, BooleanInput>(true, { transform: booleanAttribute });
|
|
18
|
+
|
|
19
|
+
public override trigger(options?: { keepOpen: boolean }) {
|
|
20
|
+
super.trigger({ ...options, keepOpen: this.keepOpen() });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Directive({
|
|
25
|
+
selector: '[hlmDropdownMenuRadio]',
|
|
26
|
+
hostDirectives: [
|
|
27
|
+
{
|
|
28
|
+
directive: HlmDropdownMenuRadioCdk,
|
|
29
|
+
inputs: ['cdkMenuItemDisabled: disabled', 'cdkMenuItemChecked: checked', 'keepOpen'],
|
|
30
|
+
outputs: ['cdkMenuItemTriggered: triggered'],
|
|
31
|
+
},
|
|
32
|
+
HlmDropdownMenuFocusOnHover,
|
|
33
|
+
],
|
|
34
|
+
host: {
|
|
35
|
+
'data-slot': 'dropdown-menu-radio-item',
|
|
36
|
+
'[attr.data-disabled]': '_cdkMenuItem.disabled ? "" : null',
|
|
37
|
+
'[attr.data-checked]': '_cdkMenuItem.checked ? "" : null',
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
export class HlmDropdownMenuRadio {
|
|
41
|
+
protected readonly _cdkMenuItem = inject(HlmDropdownMenuRadioCdk);
|
|
42
|
+
|
|
43
|
+
constructor() {
|
|
44
|
+
classes(
|
|
45
|
+
() =>
|
|
46
|
+
"hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm data-inset:ps-8 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-radio relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator',
|
|
6
|
+
host: { 'data-slot': 'dropdown-menu-separator' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmDropdownMenuSeparator {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'bg-border -mx-1 my-1 h-px block');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmDropdownMenuShortcut],hlm-dropdown-menu-shortcut',
|
|
6
|
+
host: { 'data-slot': 'dropdown-menu-shortcut' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmDropdownMenuShortcut {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(
|
|
11
|
+
() =>
|
|
12
|
+
'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|