@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,51 @@
|
|
|
1
|
+
<nav class="bg-white border-b border-gray-200">
|
|
2
|
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
3
|
+
<div class="flex justify-between items-center h-16">
|
|
4
|
+
<a routerLink="/" class="text-xl font-semibold text-gray-900"> Angular App </a>
|
|
5
|
+
<button
|
|
6
|
+
(click)="toggleMenu()"
|
|
7
|
+
class="p-2 rounded-md text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
8
|
+
aria-label="Toggle menu"
|
|
9
|
+
aria-controls="app-layout-nav-menu"
|
|
10
|
+
[attr.aria-expanded]="isOpen()"
|
|
11
|
+
>
|
|
12
|
+
<div class="w-6 h-6 flex flex-col justify-center space-y-1.5">
|
|
13
|
+
<span
|
|
14
|
+
class="block h-0.5 w-6 bg-current transition-all"
|
|
15
|
+
[class.rotate-45]="isOpen()"
|
|
16
|
+
[class.translate-y-2]="isOpen()"
|
|
17
|
+
></span>
|
|
18
|
+
<span
|
|
19
|
+
class="block h-0.5 w-6 bg-current transition-all"
|
|
20
|
+
[class.opacity-0]="isOpen()"
|
|
21
|
+
></span>
|
|
22
|
+
<span
|
|
23
|
+
class="block h-0.5 w-6 bg-current transition-all"
|
|
24
|
+
[class.-rotate-45]="isOpen()"
|
|
25
|
+
[class.-translate-y-2]="isOpen()"
|
|
26
|
+
></span>
|
|
27
|
+
</div>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
@if (isOpen()) {
|
|
31
|
+
<div id="app-layout-nav-menu" class="pb-4">
|
|
32
|
+
<ul class="flex flex-col space-y-2 list-none">
|
|
33
|
+
@for (item of navigationItems; track item.path) {
|
|
34
|
+
<li>
|
|
35
|
+
<a
|
|
36
|
+
[routerLink]="item.path"
|
|
37
|
+
routerLinkActive="bg-blue-100 text-blue-700"
|
|
38
|
+
[routerLinkActiveOptions]="{ exact: true }"
|
|
39
|
+
(click)="closeMenu()"
|
|
40
|
+
class="block px-3 py-2 rounded-md text-sm font-medium transition-colors text-gray-700 hover:bg-gray-100"
|
|
41
|
+
>
|
|
42
|
+
{{ item.label }}
|
|
43
|
+
</a>
|
|
44
|
+
</li>
|
|
45
|
+
}
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
50
|
+
</nav>
|
|
51
|
+
<router-outlet />
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { provideRouter } from '@angular/router';
|
|
3
|
+
import { AppLayoutComponent } from './app-layout';
|
|
4
|
+
|
|
5
|
+
describe('AppLayoutComponent', () => {
|
|
6
|
+
beforeEach(async () => {
|
|
7
|
+
await TestBed.configureTestingModule({
|
|
8
|
+
imports: [AppLayoutComponent],
|
|
9
|
+
providers: [provideRouter([])],
|
|
10
|
+
}).compileComponents();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should create the component', () => {
|
|
14
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
15
|
+
const component = fixture.componentInstance;
|
|
16
|
+
expect(component).toBeTruthy();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should toggle menu', () => {
|
|
20
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
21
|
+
const component = fixture.componentInstance;
|
|
22
|
+
expect(component.isOpen()).toBe(false);
|
|
23
|
+
component.toggleMenu();
|
|
24
|
+
expect(component.isOpen()).toBe(true);
|
|
25
|
+
component.toggleMenu();
|
|
26
|
+
expect(component.isOpen()).toBe(false);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should close menu', () => {
|
|
30
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
31
|
+
const component = fixture.componentInstance;
|
|
32
|
+
component.toggleMenu();
|
|
33
|
+
expect(component.isOpen()).toBe(true);
|
|
34
|
+
component.closeMenu();
|
|
35
|
+
expect(component.isOpen()).toBe(false);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('should have navigation items', () => {
|
|
39
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
40
|
+
const component = fixture.componentInstance;
|
|
41
|
+
expect(component.navigationItems.length).toBeGreaterThan(0);
|
|
42
|
+
expect(component.navigationItems[0].path).toBe('/');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('should render nav element', async () => {
|
|
46
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
47
|
+
await fixture.whenStable();
|
|
48
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
49
|
+
expect(compiled.querySelector('nav')).toBeTruthy();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('should set aria-expanded on toggle button', async () => {
|
|
53
|
+
const fixture = TestBed.createComponent(AppLayoutComponent);
|
|
54
|
+
await fixture.whenStable();
|
|
55
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
56
|
+
const button = compiled.querySelector('button');
|
|
57
|
+
expect(button?.getAttribute('aria-expanded')).toBe('false');
|
|
58
|
+
|
|
59
|
+
fixture.componentInstance.toggleMenu();
|
|
60
|
+
fixture.detectChanges();
|
|
61
|
+
expect(button?.getAttribute('aria-expanded')).toBe('true');
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
|
|
7
|
+
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-layout',
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
imports: [RouterLink, RouterLinkActive, RouterOutlet],
|
|
13
|
+
templateUrl: './app-layout.html',
|
|
14
|
+
})
|
|
15
|
+
export class AppLayoutComponent {
|
|
16
|
+
readonly isOpen = signal(false);
|
|
17
|
+
|
|
18
|
+
readonly navigationItems = [{ path: '/', label: 'Home' }];
|
|
19
|
+
|
|
20
|
+
toggleMenu(): void {
|
|
21
|
+
this.isOpen.update((v) => !v);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
closeMenu(): void {
|
|
25
|
+
this.isOpen.set(false);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@if (icon()) {
|
|
2
|
+
<ng-icon
|
|
3
|
+
[name]="icon()"
|
|
4
|
+
class="row-span-2 translate-y-0.5 size-4 text-base leading-4"
|
|
5
|
+
aria-hidden="true"
|
|
6
|
+
/>
|
|
7
|
+
}
|
|
8
|
+
<ng-content select="[icon]" />
|
|
9
|
+
|
|
10
|
+
@if (title()) {
|
|
11
|
+
<div hlmAlertTitle>{{ title() }}</div>
|
|
12
|
+
}
|
|
13
|
+
@if (description()) {
|
|
14
|
+
<div
|
|
15
|
+
hlmAlertDescription
|
|
16
|
+
[class.text-muted-foreground]="variant() === 'default'"
|
|
17
|
+
[class.text-destructive]="variant() === 'destructive'"
|
|
18
|
+
>
|
|
19
|
+
{{ description() }}
|
|
20
|
+
</div>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
<div class="text-sm empty:hidden group-has-[>ng-icon]/alert:col-start-2">
|
|
24
|
+
<ng-content />
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<ng-content select="app-alert-action" />
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
7
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
8
|
+
import {
|
|
9
|
+
HlmAlert,
|
|
10
|
+
HlmAlertAction,
|
|
11
|
+
HlmAlertDescription,
|
|
12
|
+
HlmAlertTitle,
|
|
13
|
+
} from '@spartan-ng/styles/alert';
|
|
14
|
+
import { APP_ICONS, type AppIconName } from '../icon/icon';
|
|
15
|
+
|
|
16
|
+
export type AppAlertVariant = 'default' | 'destructive';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-alert',
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
imports: [NgIcon, HlmAlertTitle, HlmAlertDescription],
|
|
22
|
+
providers: [provideIcons(APP_ICONS)],
|
|
23
|
+
hostDirectives: [{ directive: HlmAlert, inputs: ['variant'] }],
|
|
24
|
+
templateUrl: './alert.html',
|
|
25
|
+
})
|
|
26
|
+
export class AlertComponent {
|
|
27
|
+
readonly variant = input<AppAlertVariant>('default');
|
|
28
|
+
readonly title = input<string>('');
|
|
29
|
+
readonly description = input<string>('');
|
|
30
|
+
readonly icon = input<AppIconName | ''>('');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Component({
|
|
34
|
+
selector: 'app-alert-action',
|
|
35
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
+
hostDirectives: [HlmAlertAction],
|
|
37
|
+
template: '<ng-content />',
|
|
38
|
+
})
|
|
39
|
+
export class AlertActionComponent {}
|
|
40
|
+
|
|
41
|
+
export const AlertImports = [AlertComponent, AlertActionComponent] as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<button
|
|
2
|
+
hlmBtn
|
|
3
|
+
[variant]="hlmVariant()"
|
|
4
|
+
[size]="size()"
|
|
5
|
+
[disabled]="disabled() || loading()"
|
|
6
|
+
[type]="type()"
|
|
7
|
+
[attr.aria-label]="ariaLabel()"
|
|
8
|
+
[attr.aria-expanded]="ariaExpanded()"
|
|
9
|
+
[attr.aria-busy]="loading() || null"
|
|
10
|
+
[class]="classes()"
|
|
11
|
+
(click)="clicked.emit($event)"
|
|
12
|
+
>
|
|
13
|
+
@if (loading()) {
|
|
14
|
+
<app-spinner data-icon="inline-start" class="flex items-center" aria-hidden="true" />
|
|
15
|
+
@if (loadingLabel()) {
|
|
16
|
+
{{ loadingLabel() }}
|
|
17
|
+
}
|
|
18
|
+
} @else {
|
|
19
|
+
@if (icon()) {
|
|
20
|
+
<ng-icon [name]="icon()" class="size-4" aria-hidden="true" />
|
|
21
|
+
}
|
|
22
|
+
<ng-content />
|
|
23
|
+
@if (iconEnd()) {
|
|
24
|
+
<ng-icon [name]="iconEnd()" class="size-4" aria-hidden="true" />
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</button>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
ChangeDetectionStrategy,
|
|
8
|
+
Component,
|
|
9
|
+
booleanAttribute,
|
|
10
|
+
computed,
|
|
11
|
+
input,
|
|
12
|
+
output,
|
|
13
|
+
} from '@angular/core';
|
|
14
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
15
|
+
import { HlmButtonImports } from '@spartan-ng/styles/button';
|
|
16
|
+
import { APP_ICONS, type AppIconName } from '../icon/icon';
|
|
17
|
+
import { SpinnerComponent } from '../spinner/spinner';
|
|
18
|
+
|
|
19
|
+
export type AppButtonAppearance = 'filled' | 'outlined' | 'text' | 'destructive';
|
|
20
|
+
export type AppButtonSize =
|
|
21
|
+
| 'default'
|
|
22
|
+
| 'xs'
|
|
23
|
+
| 'sm'
|
|
24
|
+
| 'lg'
|
|
25
|
+
| 'icon'
|
|
26
|
+
| 'icon-xs'
|
|
27
|
+
| 'icon-sm'
|
|
28
|
+
| 'icon-lg';
|
|
29
|
+
|
|
30
|
+
const APPEARANCE_TO_VARIANT: Record<AppButtonAppearance, string> = {
|
|
31
|
+
filled: 'default',
|
|
32
|
+
outlined: 'outline',
|
|
33
|
+
text: 'ghost',
|
|
34
|
+
destructive: 'destructive',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
@Component({
|
|
38
|
+
selector: 'app-button',
|
|
39
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40
|
+
imports: [HlmButtonImports, NgIcon, SpinnerComponent],
|
|
41
|
+
providers: [provideIcons(APP_ICONS)],
|
|
42
|
+
templateUrl: './button.html',
|
|
43
|
+
})
|
|
44
|
+
export class ButtonComponent {
|
|
45
|
+
readonly appearance = input<AppButtonAppearance>('filled');
|
|
46
|
+
readonly size = input<AppButtonSize>('default');
|
|
47
|
+
readonly type = input<'button' | 'submit' | 'reset'>('button');
|
|
48
|
+
readonly disabled = input(false, { transform: booleanAttribute });
|
|
49
|
+
// While loading the button is disabled and shows a spinner; loadingLabel
|
|
50
|
+
// replaces the content (empty label => spinner only).
|
|
51
|
+
readonly loading = input(false, { transform: booleanAttribute });
|
|
52
|
+
readonly loadingLabel = input<string>('');
|
|
53
|
+
readonly ariaLabel = input<string>();
|
|
54
|
+
readonly ariaExpanded = input<boolean>();
|
|
55
|
+
readonly classes = input<string>('', { alias: 'class' });
|
|
56
|
+
readonly icon = input<AppIconName | ''>('');
|
|
57
|
+
readonly iconEnd = input<AppIconName | ''>('');
|
|
58
|
+
readonly clicked = output<MouseEvent>();
|
|
59
|
+
|
|
60
|
+
protected readonly hlmVariant = computed(
|
|
61
|
+
() =>
|
|
62
|
+
APPEARANCE_TO_VARIANT[this.appearance()] as 'default' | 'outline' | 'ghost' | 'destructive',
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const ButtonImports = [ButtonComponent] as const;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
7
|
+
import {
|
|
8
|
+
HlmCard,
|
|
9
|
+
HlmCardAction,
|
|
10
|
+
HlmCardAvatar,
|
|
11
|
+
HlmCardContent,
|
|
12
|
+
HlmCardDescription,
|
|
13
|
+
HlmCardFooter,
|
|
14
|
+
HlmCardHeader,
|
|
15
|
+
HlmCardTitle,
|
|
16
|
+
} from '@spartan-ng/styles/card';
|
|
17
|
+
|
|
18
|
+
export type AppCardSize = 'default' | 'sm';
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: 'app-card',
|
|
22
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
hostDirectives: [{ directive: HlmCard, inputs: ['size'] }],
|
|
24
|
+
host: { '[class]': 'classes()' },
|
|
25
|
+
template: '<ng-content />',
|
|
26
|
+
})
|
|
27
|
+
export class CardComponent {
|
|
28
|
+
readonly size = input<AppCardSize>('default');
|
|
29
|
+
readonly classes = input<string>('', { alias: 'class' });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Component({
|
|
33
|
+
selector: 'app-card-header',
|
|
34
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
+
hostDirectives: [HlmCardHeader],
|
|
36
|
+
host: { '[class]': 'classes()' },
|
|
37
|
+
template: '<ng-content />',
|
|
38
|
+
})
|
|
39
|
+
export class CardHeaderComponent {
|
|
40
|
+
readonly classes = input<string>('', { alias: 'class' });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@Component({
|
|
44
|
+
selector: 'app-card-title',
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
hostDirectives: [HlmCardTitle],
|
|
47
|
+
template: '<ng-content />',
|
|
48
|
+
})
|
|
49
|
+
export class CardTitleComponent {}
|
|
50
|
+
|
|
51
|
+
@Component({
|
|
52
|
+
selector: 'app-card-description',
|
|
53
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
54
|
+
hostDirectives: [HlmCardDescription],
|
|
55
|
+
template: '<ng-content />',
|
|
56
|
+
})
|
|
57
|
+
export class CardDescriptionComponent {}
|
|
58
|
+
|
|
59
|
+
@Component({
|
|
60
|
+
selector: 'app-card-avatar',
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
hostDirectives: [HlmCardAvatar],
|
|
63
|
+
template: '<ng-content />',
|
|
64
|
+
})
|
|
65
|
+
export class CardAvatarComponent {}
|
|
66
|
+
|
|
67
|
+
@Component({
|
|
68
|
+
selector: 'app-card-action',
|
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
+
hostDirectives: [HlmCardAction],
|
|
71
|
+
template: '<ng-content />',
|
|
72
|
+
})
|
|
73
|
+
export class CardActionComponent {}
|
|
74
|
+
|
|
75
|
+
@Component({
|
|
76
|
+
selector: 'app-card-content',
|
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
+
hostDirectives: [HlmCardContent],
|
|
79
|
+
template: '<ng-content />',
|
|
80
|
+
})
|
|
81
|
+
export class CardContentComponent {}
|
|
82
|
+
@Component({
|
|
83
|
+
selector: 'app-card-footer',
|
|
84
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
85
|
+
hostDirectives: [HlmCardFooter],
|
|
86
|
+
host: { class: 'gap-2' },
|
|
87
|
+
template: '<ng-content />',
|
|
88
|
+
})
|
|
89
|
+
export class CardFooterComponent {}
|
|
90
|
+
|
|
91
|
+
export const CardImports = [
|
|
92
|
+
CardComponent,
|
|
93
|
+
CardHeaderComponent,
|
|
94
|
+
CardTitleComponent,
|
|
95
|
+
CardDescriptionComponent,
|
|
96
|
+
CardAvatarComponent,
|
|
97
|
+
CardActionComponent,
|
|
98
|
+
CardContentComponent,
|
|
99
|
+
CardFooterComponent,
|
|
100
|
+
] as const;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<div
|
|
2
|
+
hlmCollapsible
|
|
3
|
+
[expanded]="open()"
|
|
4
|
+
[disabled]="disabled()"
|
|
5
|
+
(expandedChange)="open.set($event)"
|
|
6
|
+
class="rounded-[12px] bg-card shadow-md overflow-hidden"
|
|
7
|
+
>
|
|
8
|
+
<button
|
|
9
|
+
hlmCollapsibleTrigger
|
|
10
|
+
type="button"
|
|
11
|
+
class="flex w-full items-center justify-between px-6 min-h-12 font-medium transition-[min-height,background-color] duration-225 rounded-[inherit] disabled:pointer-events-none disabled:text-foreground/[0.38]"
|
|
12
|
+
[class.min-h-16]="open()"
|
|
13
|
+
[disabled]="disabled()"
|
|
14
|
+
>
|
|
15
|
+
<span class="flex flex-1 items-center overflow-hidden">
|
|
16
|
+
@if (title()) {
|
|
17
|
+
<span>{{ title() }}</span>
|
|
18
|
+
} @else {
|
|
19
|
+
<ng-content select="[collapsibleHeader]" />
|
|
20
|
+
}
|
|
21
|
+
</span>
|
|
22
|
+
<svg
|
|
23
|
+
class="size-6 shrink-0 transition-transform duration-225 fill-foreground/60"
|
|
24
|
+
[class.rotate-180]="open()"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
viewBox="0 -960 960 960"
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
focusable="false"
|
|
29
|
+
>
|
|
30
|
+
<path d="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" />
|
|
31
|
+
</svg>
|
|
32
|
+
</button>
|
|
33
|
+
<div hlmCollapsibleContent>
|
|
34
|
+
<div class="px-6 pb-4">
|
|
35
|
+
<ng-content />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, input, model } from '@angular/core';
|
|
7
|
+
import { HlmCollapsibleImports } from '@spartan-ng/styles/collapsible';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-collapsible',
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
imports: [HlmCollapsibleImports],
|
|
13
|
+
templateUrl: './collapsible.html',
|
|
14
|
+
})
|
|
15
|
+
export class CollapsibleComponent {
|
|
16
|
+
readonly open = model<boolean>(false);
|
|
17
|
+
readonly title = input<string>('');
|
|
18
|
+
readonly disabled = input(false, { transform: booleanAttribute });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const CollapsibleImports = [CollapsibleComponent] as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="w-full" [ngClass]="wrapperClasses()">
|
|
2
|
+
@if (label()) {
|
|
3
|
+
<label [for]="labelId" class="text-sm leading-none font-medium select-none mb-1.5 block">
|
|
4
|
+
{{ label() }}
|
|
5
|
+
</label>
|
|
6
|
+
}
|
|
7
|
+
<hlm-date-picker
|
|
8
|
+
[date]="value() ?? undefined"
|
|
9
|
+
(dateChange)="value.set($event)"
|
|
10
|
+
[disabled]="disabled()"
|
|
11
|
+
[minDate]="min()"
|
|
12
|
+
[maxDate]="max()"
|
|
13
|
+
>
|
|
14
|
+
<hlm-date-picker-input
|
|
15
|
+
[inputId]="labelId"
|
|
16
|
+
[placeholder]="placeholder()"
|
|
17
|
+
[readonly]="readonly()"
|
|
18
|
+
/>
|
|
19
|
+
</hlm-date-picker>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
ChangeDetectionStrategy,
|
|
8
|
+
Component,
|
|
9
|
+
booleanAttribute,
|
|
10
|
+
computed,
|
|
11
|
+
input,
|
|
12
|
+
model,
|
|
13
|
+
} from '@angular/core';
|
|
14
|
+
import { NgClass } from '@angular/common';
|
|
15
|
+
import { HlmDatePickerImports } from '@spartan-ng/styles/date-picker';
|
|
16
|
+
import type { AppFieldSize } from '../field-size';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-date-picker',
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
imports: [HlmDatePickerImports, NgClass],
|
|
22
|
+
host: { class: 'block min-w-0' },
|
|
23
|
+
templateUrl: './date-picker.html',
|
|
24
|
+
})
|
|
25
|
+
export class DatePickerComponent {
|
|
26
|
+
readonly value = model<Date | null | undefined>(undefined);
|
|
27
|
+
readonly label = input<string>('');
|
|
28
|
+
readonly placeholder = input<string>('');
|
|
29
|
+
readonly disabled = input(false, { transform: booleanAttribute });
|
|
30
|
+
readonly readonly = input(false, { transform: booleanAttribute });
|
|
31
|
+
readonly size = input<AppFieldSize>('default');
|
|
32
|
+
readonly min = input<Date | null>(null);
|
|
33
|
+
readonly max = input<Date | null>(null);
|
|
34
|
+
|
|
35
|
+
private static _uid = 0;
|
|
36
|
+
protected readonly labelId = `app-date-picker-${DatePickerComponent._uid++}`;
|
|
37
|
+
|
|
38
|
+
protected readonly wrapperClasses = computed(() => {
|
|
39
|
+
const cls: string[] = [];
|
|
40
|
+
const s = this.size();
|
|
41
|
+
if (s === 'sm')
|
|
42
|
+
cls.push('[&_[data-slot=input-group]]:h-6', '[&_[data-slot=input-group]]:text-xs');
|
|
43
|
+
if (s === 'lg')
|
|
44
|
+
cls.push('[&_[data-slot=input-group]]:h-10', '[&_[data-slot=input-group]]:text-lg');
|
|
45
|
+
return cls;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const DatePickerImports = [DatePickerComponent] as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="w-full" [ngClass]="wrapperClasses()">
|
|
2
|
+
@if (label()) {
|
|
3
|
+
<label [for]="labelId" class="text-sm leading-none font-medium select-none mb-1.5 block">
|
|
4
|
+
{{ label() }}
|
|
5
|
+
</label>
|
|
6
|
+
}
|
|
7
|
+
<hlm-date-range-picker
|
|
8
|
+
[date]="dateRange()"
|
|
9
|
+
(dateChange)="onRangeChange($event)"
|
|
10
|
+
[disabled]="disabled()"
|
|
11
|
+
[minDate]="min()"
|
|
12
|
+
[maxDate]="max()"
|
|
13
|
+
>
|
|
14
|
+
<hlm-date-range-input
|
|
15
|
+
[inputId]="labelId"
|
|
16
|
+
[placeholder]="startPlaceholder() + ' — ' + endPlaceholder()"
|
|
17
|
+
[readonly]="readonly()"
|
|
18
|
+
/>
|
|
19
|
+
</hlm-date-range-picker>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
ChangeDetectionStrategy,
|
|
8
|
+
Component,
|
|
9
|
+
booleanAttribute,
|
|
10
|
+
computed,
|
|
11
|
+
input,
|
|
12
|
+
model,
|
|
13
|
+
} from '@angular/core';
|
|
14
|
+
import { NgClass } from '@angular/common';
|
|
15
|
+
import { HlmDatePickerImports } from '@spartan-ng/styles/date-picker';
|
|
16
|
+
import type { AppFieldSize } from '../field-size';
|
|
17
|
+
|
|
18
|
+
export interface DateRange<D> {
|
|
19
|
+
start: D | null;
|
|
20
|
+
end: D | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
selector: 'app-date-range-picker',
|
|
25
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
26
|
+
imports: [HlmDatePickerImports, NgClass],
|
|
27
|
+
host: { class: 'block min-w-0' },
|
|
28
|
+
templateUrl: './date-range-picker.html',
|
|
29
|
+
})
|
|
30
|
+
export class DateRangePickerComponent {
|
|
31
|
+
readonly value = model<DateRange<Date> | null>(null);
|
|
32
|
+
readonly label = input<string>('');
|
|
33
|
+
readonly startPlaceholder = input<string>('Start');
|
|
34
|
+
readonly endPlaceholder = input<string>('End');
|
|
35
|
+
readonly disabled = input(false, { transform: booleanAttribute });
|
|
36
|
+
readonly readonly = input(false, { transform: booleanAttribute });
|
|
37
|
+
readonly size = input<AppFieldSize>('default');
|
|
38
|
+
readonly min = input<Date | null>(null);
|
|
39
|
+
readonly max = input<Date | null>(null);
|
|
40
|
+
|
|
41
|
+
private static _uid = 0;
|
|
42
|
+
protected readonly labelId = `app-date-range-picker-${DateRangePickerComponent._uid++}`;
|
|
43
|
+
|
|
44
|
+
protected readonly wrapperClasses = computed(() => {
|
|
45
|
+
const cls: string[] = [];
|
|
46
|
+
const s = this.size();
|
|
47
|
+
if (s === 'sm')
|
|
48
|
+
cls.push('[&_[data-slot=input-group]]:h-6', '[&_[data-slot=input-group]]:text-xs');
|
|
49
|
+
if (s === 'lg')
|
|
50
|
+
cls.push('[&_[data-slot=input-group]]:h-10', '[&_[data-slot=input-group]]:text-lg');
|
|
51
|
+
return cls;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
protected dateRange(): [Date, Date] | undefined {
|
|
55
|
+
const v = this.value();
|
|
56
|
+
if (v?.start && v?.end) return [v.start, v.end];
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
protected onRangeChange(range: [Date | null, Date | null] | null): void {
|
|
61
|
+
if (!range) {
|
|
62
|
+
this.value.set(null);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.value.set({ start: range[0], end: range[1] });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const DateRangePickerImports = [DateRangePickerComponent] as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<hlm-dialog
|
|
2
|
+
[state]="open() ? 'open' : 'closed'"
|
|
3
|
+
[disableClose]="!closeOnBackdrop()"
|
|
4
|
+
[aria-label]="ariaLabel()"
|
|
5
|
+
[aria-labelledby]="ariaLabelledby()"
|
|
6
|
+
(stateChanged)="onStateChanged($event)"
|
|
7
|
+
>
|
|
8
|
+
<button hlmDialogTrigger type="button" class="hidden" aria-label="Open dialog"></button>
|
|
9
|
+
<hlm-dialog-content *hlmDialogPortal>
|
|
10
|
+
<div hlmDialogHeader>
|
|
11
|
+
<ng-content select="[header]" />
|
|
12
|
+
</div>
|
|
13
|
+
<div class="text-sm">
|
|
14
|
+
<ng-content />
|
|
15
|
+
</div>
|
|
16
|
+
<div hlmDialogFooter>
|
|
17
|
+
<ng-content select="[footer]" />
|
|
18
|
+
</div>
|
|
19
|
+
</hlm-dialog-content>
|
|
20
|
+
</hlm-dialog>
|