@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,52 @@
|
|
|
1
|
+
import { CdkMenuTrigger } from '@angular/cdk/menu';
|
|
2
|
+
import { computed, Directive, effect, forwardRef, inject, input } from '@angular/core';
|
|
3
|
+
import {
|
|
4
|
+
createMenuPosition,
|
|
5
|
+
MENU_SIDE,
|
|
6
|
+
type MenuAlign,
|
|
7
|
+
type MenuSide,
|
|
8
|
+
} from '@spartan-ng/brain/core';
|
|
9
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
10
|
+
import { injectHlmDropdownMenuConfig } from './hlm-dropdown-menu-token';
|
|
11
|
+
|
|
12
|
+
@Directive({
|
|
13
|
+
selector: '[hlmDropdownMenuSubTrigger]',
|
|
14
|
+
providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuSubTrigger) }],
|
|
15
|
+
hostDirectives: [
|
|
16
|
+
{
|
|
17
|
+
directive: CdkMenuTrigger,
|
|
18
|
+
inputs: [
|
|
19
|
+
'cdkMenuTriggerFor: hlmDropdownMenuSubTrigger',
|
|
20
|
+
'cdkMenuTriggerData: hlmDropdownMenuTriggerData',
|
|
21
|
+
],
|
|
22
|
+
outputs: [
|
|
23
|
+
'cdkMenuOpened: hlmDropdownMenuSubOpened',
|
|
24
|
+
'cdkMenuClosed: hlmDropdownMenuSubClosed',
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
host: { 'data-slot': 'dropdown-menu-sub-trigger' },
|
|
29
|
+
})
|
|
30
|
+
export class HlmDropdownMenuSubTrigger {
|
|
31
|
+
private readonly _cdkTrigger = inject(CdkMenuTrigger, { host: true });
|
|
32
|
+
private readonly _config = injectHlmDropdownMenuConfig();
|
|
33
|
+
|
|
34
|
+
public readonly align = input<MenuAlign>(this._config.align);
|
|
35
|
+
public readonly side = input<MenuSide>(this._config.side);
|
|
36
|
+
|
|
37
|
+
private readonly _menuPosition = computed(() => createMenuPosition(this.align(), this.side()));
|
|
38
|
+
|
|
39
|
+
constructor() {
|
|
40
|
+
// CDK sets transform-origin on the submenu content from the resolved position; the content reads it
|
|
41
|
+
// to animate from the anchored corner and to derive its data-side. Cast tolerates @angular/cdk < 21.2
|
|
42
|
+
// (we still support >=21.0), where the property is absent and the assignment is a harmless no-op.
|
|
43
|
+
(this._cdkTrigger as { transformOriginSelector?: string }).transformOriginSelector =
|
|
44
|
+
'[data-slot="dropdown-menu-sub"]';
|
|
45
|
+
|
|
46
|
+
effect(() => {
|
|
47
|
+
this._cdkTrigger.menuPosition = this._menuPosition();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
classes(() => 'aria-expanded:bg-accent aria-expanded:text-accent-foreground');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CdkMenu } from '@angular/cdk/menu';
|
|
2
|
+
import { Directive, ElementRef, inject, signal } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import {
|
|
5
|
+
deriveMenuSideFromTransformOrigin,
|
|
6
|
+
MENU_SIDE,
|
|
7
|
+
type MenuSide,
|
|
8
|
+
} from '@spartan-ng/brain/core';
|
|
9
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
10
|
+
|
|
11
|
+
@Directive({
|
|
12
|
+
selector: '[hlmDropdownMenuSub],hlm-dropdown-menu-sub',
|
|
13
|
+
hostDirectives: [CdkMenu],
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'dropdown-menu-sub',
|
|
16
|
+
'[attr.data-state]': '_state()',
|
|
17
|
+
'[attr.data-side]': '_side()',
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
export class HlmDropdownMenuSub {
|
|
21
|
+
private readonly _host = inject(CdkMenu);
|
|
22
|
+
private readonly _elementRef = inject(ElementRef<HTMLElement>);
|
|
23
|
+
// The sub-trigger provides its configured side; CDK parents this content's injector under it.
|
|
24
|
+
private readonly _menuSide = inject(MENU_SIDE, { optional: true });
|
|
25
|
+
|
|
26
|
+
protected readonly _state = signal('open');
|
|
27
|
+
protected readonly _side = signal<MenuSide>(this._menuSide?.side() ?? 'right');
|
|
28
|
+
|
|
29
|
+
constructor() {
|
|
30
|
+
this.setSideFromTransformOrigin();
|
|
31
|
+
// this is a best effort, but does not seem to work currently
|
|
32
|
+
// TODO: figure out a way for us to know the host is about to be closed. might not be possible with CDK
|
|
33
|
+
this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set('closed'));
|
|
34
|
+
|
|
35
|
+
classes(
|
|
36
|
+
() =>
|
|
37
|
+
'motion-safe:data-open:animate-in motion-safe: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 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 w-auto',
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private setSideFromTransformOrigin() {
|
|
42
|
+
const side = this._menuSide?.side() ?? 'right';
|
|
43
|
+
// CDK sets transform-origin on this element synchronously on attach; read it next tick and derive side
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
this._side.set(
|
|
46
|
+
deriveMenuSideFromTransformOrigin(
|
|
47
|
+
this._elementRef.nativeElement.style.transformOrigin,
|
|
48
|
+
side,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InjectionToken, type ValueProvider, inject } from '@angular/core';
|
|
2
|
+
import { type MenuAlign, type MenuSide } from '@spartan-ng/brain/core';
|
|
3
|
+
|
|
4
|
+
export interface HlmDropdownMenuConfig {
|
|
5
|
+
align: MenuAlign;
|
|
6
|
+
side: MenuSide;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const defaultConfig: HlmDropdownMenuConfig = {
|
|
10
|
+
align: 'start',
|
|
11
|
+
side: 'bottom',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const HlmDropdownMenuConfigToken = new InjectionToken<HlmDropdownMenuConfig>(
|
|
15
|
+
'HlmDropdownMenuConfig',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export function provideHlmDropdownMenuConfig(
|
|
19
|
+
config: Partial<HlmDropdownMenuConfig>,
|
|
20
|
+
): ValueProvider {
|
|
21
|
+
return { provide: HlmDropdownMenuConfigToken, useValue: { ...defaultConfig, ...config } };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function injectHlmDropdownMenuConfig(): HlmDropdownMenuConfig {
|
|
25
|
+
return inject(HlmDropdownMenuConfigToken, { optional: true }) ?? defaultConfig;
|
|
26
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CdkMenuTrigger } from '@angular/cdk/menu';
|
|
2
|
+
import { computed, Directive, effect, forwardRef, inject, input } from '@angular/core';
|
|
3
|
+
import {
|
|
4
|
+
createMenuPosition,
|
|
5
|
+
MENU_SIDE,
|
|
6
|
+
type MenuAlign,
|
|
7
|
+
type MenuSide,
|
|
8
|
+
} from '@spartan-ng/brain/core';
|
|
9
|
+
import { injectHlmDropdownMenuConfig } from './hlm-dropdown-menu-token';
|
|
10
|
+
|
|
11
|
+
@Directive({
|
|
12
|
+
selector: '[hlmDropdownMenuTrigger]',
|
|
13
|
+
providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuTrigger) }],
|
|
14
|
+
hostDirectives: [
|
|
15
|
+
{
|
|
16
|
+
directive: CdkMenuTrigger,
|
|
17
|
+
inputs: [
|
|
18
|
+
'cdkMenuTriggerFor: hlmDropdownMenuTrigger',
|
|
19
|
+
'cdkMenuTriggerData: hlmDropdownMenuTriggerData',
|
|
20
|
+
],
|
|
21
|
+
outputs: ['cdkMenuOpened: hlmDropdownMenuOpened', 'cdkMenuClosed: hlmDropdownMenuClosed'],
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
host: { 'data-slot': 'dropdown-menu-trigger' },
|
|
25
|
+
})
|
|
26
|
+
export class HlmDropdownMenuTrigger {
|
|
27
|
+
private readonly _cdkTrigger = inject(CdkMenuTrigger, { host: true });
|
|
28
|
+
private readonly _config = injectHlmDropdownMenuConfig();
|
|
29
|
+
|
|
30
|
+
public readonly align = input<MenuAlign>(this._config.align);
|
|
31
|
+
public readonly side = input<MenuSide>(this._config.side);
|
|
32
|
+
|
|
33
|
+
private readonly _menuPosition = computed(() => createMenuPosition(this.align(), this.side()));
|
|
34
|
+
|
|
35
|
+
constructor() {
|
|
36
|
+
// CDK sets transform-origin on the menu content from the resolved position; the content reads it to
|
|
37
|
+
// animate from the anchored corner and to derive its data-side. Cast tolerates @angular/cdk < 21.2
|
|
38
|
+
// (we still support >=21.0), where the property is absent and the assignment is a harmless no-op.
|
|
39
|
+
(this._cdkTrigger as { transformOriginSelector?: string }).transformOriginSelector =
|
|
40
|
+
'[data-slot="dropdown-menu"]';
|
|
41
|
+
|
|
42
|
+
effect(() => {
|
|
43
|
+
this._cdkTrigger.menuPosition = this._menuPosition();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { CdkMenu } from '@angular/cdk/menu';
|
|
3
|
+
import { Directive, ElementRef, inject, input, numberAttribute, signal } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import {
|
|
6
|
+
deriveMenuSideFromTransformOrigin,
|
|
7
|
+
MENU_SIDE,
|
|
8
|
+
type MenuSide,
|
|
9
|
+
} from '@spartan-ng/brain/core';
|
|
10
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
11
|
+
|
|
12
|
+
@Directive({
|
|
13
|
+
selector: '[hlmDropdownMenu],hlm-dropdown-menu',
|
|
14
|
+
hostDirectives: [CdkMenu],
|
|
15
|
+
host: {
|
|
16
|
+
'data-slot': 'dropdown-menu',
|
|
17
|
+
'[attr.data-state]': '_state()',
|
|
18
|
+
'[attr.data-side]': '_side()',
|
|
19
|
+
'[style.--side-offset]': 'sideOffset()',
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
export class HlmDropdownMenu {
|
|
23
|
+
private readonly _host = inject(CdkMenu);
|
|
24
|
+
private readonly _elementRef = inject(ElementRef<HTMLElement>);
|
|
25
|
+
// The trigger provides its configured side; CDK parents this content's injector under the trigger's.
|
|
26
|
+
private readonly _menuSide = inject(MENU_SIDE, { optional: true });
|
|
27
|
+
|
|
28
|
+
protected readonly _state = signal('open');
|
|
29
|
+
protected readonly _side = signal<MenuSide>(this._menuSide?.side() ?? 'bottom');
|
|
30
|
+
|
|
31
|
+
public readonly sideOffset = input<number, NumberInput>(1, { transform: numberAttribute });
|
|
32
|
+
|
|
33
|
+
constructor() {
|
|
34
|
+
classes(
|
|
35
|
+
() =>
|
|
36
|
+
'motion-safe:data-open:animate-in motion-safe: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 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100 my-[--spacing(var(--side-offset))] overflow-x-hidden overflow-y-auto outline-none',
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
this.setSideFromTransformOrigin();
|
|
40
|
+
// this is a best effort, but does not seem to work currently
|
|
41
|
+
// TODO: figure out a way for us to know the host is about to be closed. might not be possible with CDK
|
|
42
|
+
this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set('closed'));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private setSideFromTransformOrigin() {
|
|
46
|
+
const side = this._menuSide?.side() ?? 'bottom';
|
|
47
|
+
// CDK sets transform-origin on this element synchronously on attach; read it next tick and derive side
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
this._side.set(
|
|
50
|
+
deriveMenuSideFromTransformOrigin(
|
|
51
|
+
this._elementRef.nativeElement.style.transformOrigin,
|
|
52
|
+
side,
|
|
53
|
+
),
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HlmDropdownMenu } from './hlm-dropdown-menu';
|
|
2
|
+
import { HlmDropdownMenuCheckbox } from './hlm-dropdown-menu-checkbox';
|
|
3
|
+
import { HlmDropdownMenuCheckboxIndicator } from './hlm-dropdown-menu-checkbox-indicator';
|
|
4
|
+
import { HlmDropdownMenuGroup } from './hlm-dropdown-menu-group';
|
|
5
|
+
import { HlmDropdownMenuItem } from './hlm-dropdown-menu-item';
|
|
6
|
+
import { HlmDropdownMenuItemSubIndicator } from './hlm-dropdown-menu-item-sub-indicator';
|
|
7
|
+
import { HlmDropdownMenuLabel } from './hlm-dropdown-menu-label';
|
|
8
|
+
import { HlmDropdownMenuRadio } from './hlm-dropdown-menu-radio';
|
|
9
|
+
import { HlmDropdownMenuRadioIndicator } from './hlm-dropdown-menu-radio-indicator';
|
|
10
|
+
import { HlmDropdownMenuSeparator } from './hlm-dropdown-menu-separator';
|
|
11
|
+
import { HlmDropdownMenuShortcut } from './hlm-dropdown-menu-shortcut';
|
|
12
|
+
import { HlmDropdownMenuSub } from './hlm-dropdown-menu-sub';
|
|
13
|
+
import { HlmDropdownMenuSubTrigger } from './hlm-dropdown-menu-sub-trigger';
|
|
14
|
+
|
|
15
|
+
import { HlmDropdownMenuTrigger } from './hlm-dropdown-menu-trigger';
|
|
16
|
+
|
|
17
|
+
export * from './hlm-dropdown-menu';
|
|
18
|
+
export * from './hlm-dropdown-menu-checkbox';
|
|
19
|
+
export * from './hlm-dropdown-menu-checkbox-indicator';
|
|
20
|
+
export * from './hlm-dropdown-menu-focus-on-hover';
|
|
21
|
+
export * from './hlm-dropdown-menu-group';
|
|
22
|
+
export * from './hlm-dropdown-menu-item';
|
|
23
|
+
export * from './hlm-dropdown-menu-item-sub-indicator';
|
|
24
|
+
export * from './hlm-dropdown-menu-label';
|
|
25
|
+
export * from './hlm-dropdown-menu-radio';
|
|
26
|
+
export * from './hlm-dropdown-menu-radio-indicator';
|
|
27
|
+
export * from './hlm-dropdown-menu-separator';
|
|
28
|
+
export * from './hlm-dropdown-menu-shortcut';
|
|
29
|
+
export * from './hlm-dropdown-menu-sub';
|
|
30
|
+
export * from './hlm-dropdown-menu-sub-trigger';
|
|
31
|
+
export * from './hlm-dropdown-menu-token';
|
|
32
|
+
export * from './hlm-dropdown-menu-trigger';
|
|
33
|
+
|
|
34
|
+
export const HlmDropdownMenuImports = [
|
|
35
|
+
HlmDropdownMenu,
|
|
36
|
+
HlmDropdownMenuCheckbox,
|
|
37
|
+
HlmDropdownMenuCheckboxIndicator,
|
|
38
|
+
HlmDropdownMenuGroup,
|
|
39
|
+
HlmDropdownMenuItem,
|
|
40
|
+
HlmDropdownMenuItemSubIndicator,
|
|
41
|
+
HlmDropdownMenuLabel,
|
|
42
|
+
HlmDropdownMenuRadio,
|
|
43
|
+
HlmDropdownMenuRadioIndicator,
|
|
44
|
+
HlmDropdownMenuSeparator,
|
|
45
|
+
HlmDropdownMenuShortcut,
|
|
46
|
+
HlmDropdownMenuSub,
|
|
47
|
+
HlmDropdownMenuSubTrigger,
|
|
48
|
+
HlmDropdownMenuTrigger,
|
|
49
|
+
] as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmFieldContent],hlm-field-content',
|
|
6
|
+
host: { 'data-slot': 'field-content' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmFieldContent {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(() => 'gap-0.5 group/field-content flex flex-1 flex-col leading-snug');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Directive, effect, EffectRef, inject, input, OnDestroy } from '@angular/core';
|
|
2
|
+
import { BrnFieldA11yService } from '@spartan-ng/brain/field';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmFieldDescription],hlm-field-description',
|
|
7
|
+
host: {
|
|
8
|
+
'data-slot': 'field-description',
|
|
9
|
+
'[attr.id]': 'id()',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
export class HlmFieldDescription implements OnDestroy {
|
|
13
|
+
private static _id = 0;
|
|
14
|
+
|
|
15
|
+
private readonly _a11y = inject(BrnFieldA11yService, { optional: true, host: true });
|
|
16
|
+
|
|
17
|
+
public readonly id = input<string>(`hlm-field-description-${HlmFieldDescription._id++}`);
|
|
18
|
+
|
|
19
|
+
private _registeredId?: string;
|
|
20
|
+
|
|
21
|
+
private readonly _cleanup: EffectRef | null = this._a11y
|
|
22
|
+
? effect(() => {
|
|
23
|
+
const a11y = this._a11y;
|
|
24
|
+
if (!a11y) return;
|
|
25
|
+
|
|
26
|
+
const id = this.id();
|
|
27
|
+
if (this._registeredId && this._registeredId !== id) {
|
|
28
|
+
a11y.unregisterDescription(this._registeredId);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (this._registeredId !== id) {
|
|
32
|
+
a11y.registerDescription(id);
|
|
33
|
+
this._registeredId = id;
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
: null;
|
|
37
|
+
|
|
38
|
+
constructor() {
|
|
39
|
+
classes(() => [
|
|
40
|
+
'text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',
|
|
41
|
+
'last:mt-0 nth-last-2:-mt-1',
|
|
42
|
+
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ngOnDestroy() {
|
|
47
|
+
this._cleanup?.destroy();
|
|
48
|
+
|
|
49
|
+
if (this._registeredId) {
|
|
50
|
+
this._a11y?.unregisterDescription(this._registeredId);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import {
|
|
3
|
+
booleanAttribute,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
Component,
|
|
6
|
+
computed,
|
|
7
|
+
effect,
|
|
8
|
+
EffectRef,
|
|
9
|
+
inject,
|
|
10
|
+
input,
|
|
11
|
+
OnDestroy,
|
|
12
|
+
} from '@angular/core';
|
|
13
|
+
import { BrnField, BrnFieldA11yService } from '@spartan-ng/brain/field';
|
|
14
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'hlm-field-error',
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
host: {
|
|
20
|
+
role: 'alert',
|
|
21
|
+
'data-slot': 'field-error',
|
|
22
|
+
'[attr.id]': 'id()',
|
|
23
|
+
'[hidden]': '!_display()',
|
|
24
|
+
},
|
|
25
|
+
template: `
|
|
26
|
+
@if (_display()) {
|
|
27
|
+
<ng-content />
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
})
|
|
31
|
+
export class HlmFieldError implements OnDestroy {
|
|
32
|
+
private static _id = 0;
|
|
33
|
+
|
|
34
|
+
private readonly _field = inject(BrnField, { optional: true });
|
|
35
|
+
private readonly _a11y = inject(BrnFieldA11yService, { optional: true, host: true });
|
|
36
|
+
|
|
37
|
+
private _registeredId?: string | undefined;
|
|
38
|
+
|
|
39
|
+
private readonly _hasParentField = !!this._field;
|
|
40
|
+
|
|
41
|
+
/** The unique ID for the field error. If none is supplied, it will be auto-generated. */
|
|
42
|
+
public readonly id = input<string>(`hlm-field-error-${HlmFieldError._id++}`);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The name of the specific validator error key to match (e.g. 'required').
|
|
46
|
+
* When omitted, the error is shown if any validation error is present.
|
|
47
|
+
*/
|
|
48
|
+
public readonly validator = input<string>();
|
|
49
|
+
|
|
50
|
+
/** Forces the error message to be visible regardless of the control's validation state. */
|
|
51
|
+
public readonly forceShow = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
52
|
+
|
|
53
|
+
protected readonly _display = computed(
|
|
54
|
+
() => !this._hasParentField || this.forceShow() || this._hasError(),
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
protected readonly _hasError = computed(() => {
|
|
58
|
+
const errors = this._field?.errors();
|
|
59
|
+
if (!errors) return false;
|
|
60
|
+
|
|
61
|
+
const validator = this.validator();
|
|
62
|
+
const spartanInvalid = this._field?.controlState()?.spartanInvalid;
|
|
63
|
+
|
|
64
|
+
if (!spartanInvalid) return false;
|
|
65
|
+
|
|
66
|
+
return validator ? validator in errors : Object.keys(errors).length > 0;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
private readonly _cleanup: EffectRef | null = this._a11y
|
|
70
|
+
? effect(() => {
|
|
71
|
+
const a11y = this._a11y;
|
|
72
|
+
if (!a11y) return;
|
|
73
|
+
|
|
74
|
+
const id = this.id();
|
|
75
|
+
const hasError = this._hasError();
|
|
76
|
+
|
|
77
|
+
if (this._registeredId && (this._registeredId !== id || !hasError)) {
|
|
78
|
+
a11y.unregisterError(this._registeredId);
|
|
79
|
+
this._registeredId = undefined;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (hasError && this._registeredId !== id) {
|
|
83
|
+
a11y.registerError(id);
|
|
84
|
+
this._registeredId = id;
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
: null;
|
|
88
|
+
|
|
89
|
+
constructor() {
|
|
90
|
+
classes(() => 'text-destructive text-sm font-normal');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ngOnDestroy() {
|
|
94
|
+
this._cleanup?.destroy();
|
|
95
|
+
|
|
96
|
+
if (this._registeredId) {
|
|
97
|
+
this._a11y?.unregisterError(this._registeredId);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmFieldGroup],hlm-field-group',
|
|
6
|
+
host: { 'data-slot': 'field-group' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmFieldGroup {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(
|
|
11
|
+
() =>
|
|
12
|
+
'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { HlmLabel } from '@spartan-ng/styles/label';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmFieldLabel],hlm-field-label',
|
|
7
|
+
hostDirectives: [HlmLabel],
|
|
8
|
+
host: { 'data-slot': 'field-label' },
|
|
9
|
+
})
|
|
10
|
+
export class HlmFieldLabel {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => [
|
|
13
|
+
'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit',
|
|
14
|
+
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
|
|
15
|
+
]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Directive, input } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'legend[hlmFieldLegend]',
|
|
6
|
+
host: {
|
|
7
|
+
'data-slot': 'field-legend',
|
|
8
|
+
'[attr.data-variant]': 'variant()',
|
|
9
|
+
},
|
|
10
|
+
})
|
|
11
|
+
export class HlmFieldLegend {
|
|
12
|
+
public readonly variant = input<'label' | 'legend'>('legend');
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
classes(
|
|
16
|
+
() => 'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { HlmSeparator } from '@spartan-ng/styles/separator';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'hlm-field-separator',
|
|
7
|
+
imports: [HlmSeparator],
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
host: { 'data-slot': 'field-separator' },
|
|
10
|
+
template: `
|
|
11
|
+
<hlm-separator class="absolute inset-0 top-1/2" />
|
|
12
|
+
<span
|
|
13
|
+
data-slot="field-separator-content"
|
|
14
|
+
class="text-muted-foreground px-2 bg-background relative mx-auto block w-fit"
|
|
15
|
+
>
|
|
16
|
+
<ng-content />
|
|
17
|
+
</span>
|
|
18
|
+
`,
|
|
19
|
+
})
|
|
20
|
+
export class HlmFieldSeparator {
|
|
21
|
+
constructor() {
|
|
22
|
+
classes(() => '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'fieldset[hlmFieldSet]',
|
|
6
|
+
host: { 'data-slot': 'field-set' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmFieldSet {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(
|
|
11
|
+
() =>
|
|
12
|
+
'gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col',
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmFieldTitle],hlm-field-title',
|
|
6
|
+
host: { 'data-slot': 'field-label' },
|
|
7
|
+
})
|
|
8
|
+
export class HlmFieldTitle {
|
|
9
|
+
constructor() {
|
|
10
|
+
classes(
|
|
11
|
+
() =>
|
|
12
|
+
'gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center',
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Directive, input } from '@angular/core';
|
|
2
|
+
import { BrnField } from '@spartan-ng/brain/field';
|
|
3
|
+
import { classes } from '@spartan-ng/styles/utils';
|
|
4
|
+
import { cva, VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
const fieldVariants = cva(
|
|
7
|
+
'data-[matches-spartan-invalid=true]:text-destructive gap-1.5 group/field flex',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
vertical: 'flex-col [&>.sr-only]:w-auto',
|
|
12
|
+
horizontal: [
|
|
13
|
+
'flex-row items-center',
|
|
14
|
+
'*:data-[slot=field-label]:flex-auto',
|
|
15
|
+
'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
16
|
+
],
|
|
17
|
+
responsive: [
|
|
18
|
+
'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto [&>.sr-only]:w-auto',
|
|
19
|
+
'@md/field-group:*:data-[slot=field-label]:flex-auto',
|
|
20
|
+
'@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
orientation: 'vertical',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export type FieldVariants = VariantProps<typeof fieldVariants>;
|
|
31
|
+
|
|
32
|
+
@Directive({
|
|
33
|
+
selector: '[hlmField],hlm-field',
|
|
34
|
+
hostDirectives: [{ directive: BrnField, inputs: ['data-invalid', 'forceInvalid'] }],
|
|
35
|
+
host: {
|
|
36
|
+
role: 'group',
|
|
37
|
+
'data-slot': 'field',
|
|
38
|
+
'[attr.data-orientation]': 'orientation()',
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
export class HlmField {
|
|
42
|
+
public readonly orientation = input<FieldVariants['orientation']>('vertical');
|
|
43
|
+
|
|
44
|
+
constructor() {
|
|
45
|
+
classes(() => fieldVariants({ orientation: this.orientation() }));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HlmField } from './hlm-field';
|
|
2
|
+
import { HlmFieldContent } from './hlm-field-content';
|
|
3
|
+
import { HlmFieldDescription } from './hlm-field-description';
|
|
4
|
+
import { HlmFieldError } from './hlm-field-error';
|
|
5
|
+
import { HlmFieldGroup } from './hlm-field-group';
|
|
6
|
+
import { HlmFieldLabel } from './hlm-field-label';
|
|
7
|
+
import { HlmFieldLegend } from './hlm-field-legend';
|
|
8
|
+
import { HlmFieldSeparator } from './hlm-field-separator';
|
|
9
|
+
import { HlmFieldSet } from './hlm-field-set';
|
|
10
|
+
import { HlmFieldTitle } from './hlm-field-title';
|
|
11
|
+
|
|
12
|
+
export * from './hlm-field';
|
|
13
|
+
export * from './hlm-field-content';
|
|
14
|
+
export * from './hlm-field-description';
|
|
15
|
+
export * from './hlm-field-error';
|
|
16
|
+
export * from './hlm-field-group';
|
|
17
|
+
export * from './hlm-field-label';
|
|
18
|
+
export * from './hlm-field-legend';
|
|
19
|
+
export * from './hlm-field-separator';
|
|
20
|
+
export * from './hlm-field-set';
|
|
21
|
+
export * from './hlm-field-title';
|
|
22
|
+
|
|
23
|
+
export const HlmFieldImports = [
|
|
24
|
+
HlmField,
|
|
25
|
+
HlmFieldContent,
|
|
26
|
+
HlmFieldDescription,
|
|
27
|
+
HlmFieldError,
|
|
28
|
+
HlmFieldGroup,
|
|
29
|
+
HlmFieldLabel,
|
|
30
|
+
HlmFieldLegend,
|
|
31
|
+
HlmFieldSeparator,
|
|
32
|
+
HlmFieldSet,
|
|
33
|
+
HlmFieldTitle,
|
|
34
|
+
] as const;
|