@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,313 @@
|
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
DestroyRef,
|
|
4
|
+
effect,
|
|
5
|
+
ElementRef,
|
|
6
|
+
HostAttributeToken,
|
|
7
|
+
inject,
|
|
8
|
+
Injector,
|
|
9
|
+
PLATFORM_ID,
|
|
10
|
+
runInInjectionContext,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { type ClassValue, clsx } from 'clsx';
|
|
13
|
+
import { twMerge } from 'tailwind-merge';
|
|
14
|
+
|
|
15
|
+
export function hlm(...inputs: ClassValue[]) {
|
|
16
|
+
return twMerge(clsx(inputs));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Global map to track class managers per element
|
|
20
|
+
const elementClassManagers = new WeakMap<HTMLElement, ElementClassManager>();
|
|
21
|
+
// Global mutation observer for all elements
|
|
22
|
+
let globalObserver: MutationObserver | null = null;
|
|
23
|
+
const observedElements = new Set<HTMLElement>();
|
|
24
|
+
|
|
25
|
+
interface ElementClassManager {
|
|
26
|
+
element: HTMLElement;
|
|
27
|
+
sources: Map<number, { classes: Set<string>; order: number }>;
|
|
28
|
+
baseClasses: Set<string>;
|
|
29
|
+
isUpdating: boolean;
|
|
30
|
+
nextOrder: number;
|
|
31
|
+
hasInitialized: boolean;
|
|
32
|
+
restoreRafId: number | null;
|
|
33
|
+
/** Transitions are suppressed until the first effect writes correct classes */
|
|
34
|
+
transitionsSuppressed: boolean;
|
|
35
|
+
/** Original inline transition value to restore after suppression (empty string = none was set) */
|
|
36
|
+
previousTransition: string;
|
|
37
|
+
/** Original inline transition priority to preserve !important when restoring */
|
|
38
|
+
previousTransitionPriority: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let sourceCounter = 0;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* This function dynamically adds and removes classes for a given element without requiring
|
|
45
|
+
* the a class binding (e.g. `[class]="..."`) which may interfere with other class bindings.
|
|
46
|
+
*
|
|
47
|
+
* 1. This will merge the existing classes on the element with the new classes.
|
|
48
|
+
* 2. It will also remove any classes that were previously added by this function but are no longer present in the new classes.
|
|
49
|
+
* 3. Multiple calls to this function on the same element will be merged efficiently.
|
|
50
|
+
*/
|
|
51
|
+
export function classes(computed: () => ClassValue[] | string, options: ClassesOptions = {}) {
|
|
52
|
+
runInInjectionContext(options.injector ?? inject(Injector), () => {
|
|
53
|
+
const elementRef = options.elementRef ?? inject(ElementRef);
|
|
54
|
+
const platformId = inject(PLATFORM_ID);
|
|
55
|
+
const destroyRef = inject(DestroyRef);
|
|
56
|
+
const baseClasses = inject(new HostAttributeToken('class'), { optional: true });
|
|
57
|
+
|
|
58
|
+
const element = elementRef.nativeElement;
|
|
59
|
+
|
|
60
|
+
// Create unique identifier for this source
|
|
61
|
+
const sourceId = sourceCounter++;
|
|
62
|
+
|
|
63
|
+
// Get or create the class manager for this element
|
|
64
|
+
let manager = elementClassManagers.get(element);
|
|
65
|
+
|
|
66
|
+
if (!manager) {
|
|
67
|
+
// Initialize base classes from variation (host attribute 'class')
|
|
68
|
+
const initialBaseClasses = new Set<string>();
|
|
69
|
+
|
|
70
|
+
if (baseClasses) {
|
|
71
|
+
toClassList(baseClasses).forEach((cls) => initialBaseClasses.add(cls));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
manager = {
|
|
75
|
+
element,
|
|
76
|
+
sources: new Map(),
|
|
77
|
+
baseClasses: initialBaseClasses,
|
|
78
|
+
isUpdating: false,
|
|
79
|
+
nextOrder: 0,
|
|
80
|
+
hasInitialized: false,
|
|
81
|
+
restoreRafId: null,
|
|
82
|
+
transitionsSuppressed: false,
|
|
83
|
+
previousTransition: '',
|
|
84
|
+
previousTransitionPriority: '',
|
|
85
|
+
};
|
|
86
|
+
elementClassManagers.set(element, manager);
|
|
87
|
+
|
|
88
|
+
// Setup global observer if needed and register this element
|
|
89
|
+
setupGlobalObserver(platformId);
|
|
90
|
+
observedElements.add(element);
|
|
91
|
+
|
|
92
|
+
// Suppress transitions until the first effect writes correct classes and
|
|
93
|
+
// the browser has painted them. This prevents CSS transition animations
|
|
94
|
+
// during hydration when classes change from SSR state to client state.
|
|
95
|
+
if (isPlatformBrowser(platformId)) {
|
|
96
|
+
manager.previousTransition = element.style.getPropertyValue('transition');
|
|
97
|
+
manager.previousTransitionPriority = element.style.getPropertyPriority('transition');
|
|
98
|
+
element.style.setProperty('transition', 'none', 'important');
|
|
99
|
+
manager.transitionsSuppressed = true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Assign order once at registration time
|
|
104
|
+
const sourceOrder = manager.nextOrder++;
|
|
105
|
+
|
|
106
|
+
function updateClasses(): void {
|
|
107
|
+
// Get the new classes from the computed function
|
|
108
|
+
const newClasses = toClassList(computed());
|
|
109
|
+
|
|
110
|
+
// Update this source's classes, keeping the original order
|
|
111
|
+
manager!.sources.set(sourceId, {
|
|
112
|
+
classes: new Set(newClasses),
|
|
113
|
+
order: sourceOrder,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Update the element
|
|
117
|
+
updateElement(manager!);
|
|
118
|
+
|
|
119
|
+
// Re-enable transitions after the first effect writes correct classes.
|
|
120
|
+
// Deferred to next animation frame so the browser paints the class change
|
|
121
|
+
// with transitions disabled first, then re-enables them.
|
|
122
|
+
if (manager!.transitionsSuppressed) {
|
|
123
|
+
manager!.transitionsSuppressed = false;
|
|
124
|
+
manager!.restoreRafId = requestAnimationFrame(() => {
|
|
125
|
+
manager!.restoreRafId = null;
|
|
126
|
+
restoreTransitionSuppression(manager!);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Register cleanup with DestroyRef
|
|
132
|
+
destroyRef.onDestroy(() => {
|
|
133
|
+
if (manager!.restoreRafId !== null) {
|
|
134
|
+
cancelAnimationFrame(manager!.restoreRafId);
|
|
135
|
+
manager!.restoreRafId = null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (manager!.transitionsSuppressed) {
|
|
139
|
+
manager!.transitionsSuppressed = false;
|
|
140
|
+
restoreTransitionSuppression(manager!);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Remove this source from the manager
|
|
144
|
+
manager!.sources.delete(sourceId);
|
|
145
|
+
|
|
146
|
+
// If no more sources, clean up the manager
|
|
147
|
+
if (manager!.sources.size === 0) {
|
|
148
|
+
cleanupManager(element);
|
|
149
|
+
} else {
|
|
150
|
+
// Update element without this source's classes
|
|
151
|
+
updateElement(manager!);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* We need this effect to track changes to the computed classes. Ideally, we would use
|
|
157
|
+
* afterRenderEffect here, but that doesn't run in SSR contexts, so we use a standard
|
|
158
|
+
* effect which works in both browser and SSR.
|
|
159
|
+
*/
|
|
160
|
+
effect(updateClasses);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function restoreTransitionSuppression(manager: ElementClassManager): void {
|
|
165
|
+
const prev = manager.previousTransition;
|
|
166
|
+
if (prev) {
|
|
167
|
+
manager.element.style.setProperty(
|
|
168
|
+
'transition',
|
|
169
|
+
prev,
|
|
170
|
+
manager.previousTransitionPriority || undefined,
|
|
171
|
+
);
|
|
172
|
+
} else {
|
|
173
|
+
manager.element.style.removeProperty('transition');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
178
|
+
function setupGlobalObserver(platformId: Object): void {
|
|
179
|
+
if (isPlatformBrowser(platformId) && !globalObserver) {
|
|
180
|
+
// Create single global observer that watches the entire document
|
|
181
|
+
globalObserver = new MutationObserver((mutations) => {
|
|
182
|
+
for (const mutation of mutations) {
|
|
183
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
184
|
+
const element = mutation.target as HTMLElement;
|
|
185
|
+
const manager = elementClassManagers.get(element);
|
|
186
|
+
|
|
187
|
+
// Only process elements we're managing
|
|
188
|
+
if (manager && observedElements.has(element)) {
|
|
189
|
+
if (manager.isUpdating) continue; // Ignore changes we're making
|
|
190
|
+
|
|
191
|
+
// Update base classes to include any externally added classes
|
|
192
|
+
const currentClasses = toClassList(element.className);
|
|
193
|
+
const allSourceClasses = new Set<string>();
|
|
194
|
+
|
|
195
|
+
// Collect all classes from all sources
|
|
196
|
+
for (const source of manager.sources.values()) {
|
|
197
|
+
for (const className of source.classes) {
|
|
198
|
+
allSourceClasses.add(className);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Any classes not from sources become new base classes
|
|
203
|
+
manager.baseClasses.clear();
|
|
204
|
+
|
|
205
|
+
for (const className of currentClasses) {
|
|
206
|
+
if (!allSourceClasses.has(className)) {
|
|
207
|
+
manager.baseClasses.add(className);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
updateElement(manager);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
// Start observing the entire document for class attribute changes
|
|
218
|
+
globalObserver.observe(document, {
|
|
219
|
+
attributes: true,
|
|
220
|
+
attributeFilter: ['class'],
|
|
221
|
+
subtree: true, // Watch all descendants
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function updateElement(manager: ElementClassManager): void {
|
|
227
|
+
if (manager.isUpdating) return; // Prevent recursive updates
|
|
228
|
+
|
|
229
|
+
manager.isUpdating = true;
|
|
230
|
+
|
|
231
|
+
// Handle initialization: capture base classes after first source registration
|
|
232
|
+
if (!manager.hasInitialized && manager.sources.size > 0) {
|
|
233
|
+
// Get current classes on element (may include SSR classes)
|
|
234
|
+
const currentClasses = toClassList(manager.element.className);
|
|
235
|
+
|
|
236
|
+
// Get all classes that will be applied by sources
|
|
237
|
+
const allSourceClasses = new Set<string>();
|
|
238
|
+
for (const source of manager.sources.values()) {
|
|
239
|
+
source.classes.forEach((className) => allSourceClasses.add(className));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Only consider classes as "base" if they're not produced by any source
|
|
243
|
+
// This prevents SSR-rendered classes from being preserved as base classes
|
|
244
|
+
currentClasses.forEach((className) => {
|
|
245
|
+
if (!allSourceClasses.has(className)) {
|
|
246
|
+
manager.baseClasses.add(className);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
manager.hasInitialized = true;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Get classes from all sources, sorted by registration order (later takes precedence)
|
|
254
|
+
const sortedSources = Array.from(manager.sources.entries()).sort(
|
|
255
|
+
([, a], [, b]) => a.order - b.order,
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
const allSourceClasses: string[] = [];
|
|
259
|
+
for (const [, source] of sortedSources) {
|
|
260
|
+
allSourceClasses.push(...source.classes);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Combine base classes with all source classes, ensuring base classes take precedence
|
|
264
|
+
const classesToApply =
|
|
265
|
+
allSourceClasses.length > 0 || manager.baseClasses.size > 0
|
|
266
|
+
? hlm([...allSourceClasses, ...manager.baseClasses])
|
|
267
|
+
: '';
|
|
268
|
+
|
|
269
|
+
// Apply the classes to the element
|
|
270
|
+
if (manager.element.className !== classesToApply) {
|
|
271
|
+
manager.element.className = classesToApply;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
manager.isUpdating = false;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function cleanupManager(element: HTMLElement): void {
|
|
278
|
+
// Remove from global tracking
|
|
279
|
+
observedElements.delete(element);
|
|
280
|
+
elementClassManagers.delete(element);
|
|
281
|
+
|
|
282
|
+
// If no more elements being tracked, cleanup global observer
|
|
283
|
+
if (observedElements.size === 0 && globalObserver) {
|
|
284
|
+
globalObserver.disconnect();
|
|
285
|
+
globalObserver = null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
interface ClassesOptions {
|
|
290
|
+
elementRef?: ElementRef<HTMLElement>;
|
|
291
|
+
injector?: Injector;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Cache for parsed class lists to avoid repeated string operations
|
|
295
|
+
const classListCache = new Map<string, string[]>();
|
|
296
|
+
|
|
297
|
+
function toClassList(className: string | ClassValue[]): string[] {
|
|
298
|
+
// For simple string inputs, use cache to avoid repeated parsing
|
|
299
|
+
if (typeof className === 'string' && classListCache.has(className)) {
|
|
300
|
+
return classListCache.get(className)!;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const result = clsx(className)
|
|
304
|
+
.split(' ')
|
|
305
|
+
.filter((c) => c.length > 0);
|
|
306
|
+
|
|
307
|
+
// Cache string results, but limit cache size to prevent memory growth
|
|
308
|
+
if (typeof className === 'string' && classListCache.size < 1000) {
|
|
309
|
+
classListCache.set(className, result);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return result;
|
|
313
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OVERLAY_DEFAULT_CONFIG } from '@angular/cdk/overlay';
|
|
2
|
+
import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Provides default configuration for Spartan Helm components.
|
|
6
|
+
*
|
|
7
|
+
* This utility configures the Angular CDK overlay to disable the `usePopover`
|
|
8
|
+
* behavior introduced in Angular 21, which causes CDK overlay-based components
|
|
9
|
+
* (sheets, dialogs, tooltips, etc.) to render above `position: fixed` elements
|
|
10
|
+
* like `<hlm-toaster>`.
|
|
11
|
+
*
|
|
12
|
+
* @returns {EnvironmentProviders} Environment providers to be added to the application config.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // app.config.ts
|
|
17
|
+
* import { provideSpartanHlm } from '@spartan-ng/styles/utils';
|
|
18
|
+
*
|
|
19
|
+
* export const appConfig: ApplicationConfig = {
|
|
20
|
+
* providers: [
|
|
21
|
+
* provideSpartanHlm(),
|
|
22
|
+
* // ... other providers
|
|
23
|
+
* ],
|
|
24
|
+
* };
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function provideSpartanHlm(): EnvironmentProviders {
|
|
28
|
+
return makeEnvironmentProviders([
|
|
29
|
+
{
|
|
30
|
+
provide: OVERLAY_DEFAULT_CONFIG,
|
|
31
|
+
useValue: { usePopover: false },
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { effect, Injector, signal, type Signal } from '@angular/core';
|
|
7
|
+
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
8
|
+
import { from, of, switchMap } from 'rxjs';
|
|
9
|
+
import { catchError, map, tap } from 'rxjs/operators';
|
|
10
|
+
|
|
11
|
+
/** Reactive async-data snapshot: current data, loading, and error. */
|
|
12
|
+
export interface AsyncData<T> {
|
|
13
|
+
/** Latest successful result. Kept visible during a refetch. */
|
|
14
|
+
readonly data: Signal<T | null>;
|
|
15
|
+
/** True while a fetch for the current args is in flight. */
|
|
16
|
+
readonly loading: Signal<boolean>;
|
|
17
|
+
/** Error message from the most recent failed fetch, else null. */
|
|
18
|
+
readonly error: Signal<string | null>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The Angular analogue of the React `useAsyncData` hook.
|
|
23
|
+
*
|
|
24
|
+
* Re-runs `fetcher(args)` whenever the `args` signal changes, using RxJS
|
|
25
|
+
* `switchMap` so an in-flight request is cancelled (ignored) when newer args
|
|
26
|
+
* arrive — the latest-wins guarantee, matching the React hook's cleanup flag.
|
|
27
|
+
*
|
|
28
|
+
* Behavioural parity notes:
|
|
29
|
+
* - `loading` flips true the instant args change and false when the matching
|
|
30
|
+
* response resolves.
|
|
31
|
+
* - `data` retains the previous result while a refetch is in flight (avoids a
|
|
32
|
+
* flash of empty state); it only resets to `null` on error.
|
|
33
|
+
* - Errors are surfaced as a message string and logged, mirroring the hook.
|
|
34
|
+
*
|
|
35
|
+
* Must be called within an injection context (component/service constructor or
|
|
36
|
+
* field initializer) unless an `injector` is supplied.
|
|
37
|
+
*
|
|
38
|
+
* @param argsSignal - Reactive inputs; a change triggers a refetch.
|
|
39
|
+
* @param fetcher - Async function producing the result for the given args.
|
|
40
|
+
* @param injector - Optional injector when called outside an injection context.
|
|
41
|
+
*/
|
|
42
|
+
export function createAsyncData<TArgs, T>(
|
|
43
|
+
argsSignal: Signal<TArgs>,
|
|
44
|
+
fetcher: (args: TArgs) => Promise<T>,
|
|
45
|
+
injector?: Injector,
|
|
46
|
+
): AsyncData<T> {
|
|
47
|
+
const data = signal<T | null>(null);
|
|
48
|
+
const error = signal<string | null>(null);
|
|
49
|
+
// A fetch is pending from the moment args change until its response lands.
|
|
50
|
+
const pending = signal(true);
|
|
51
|
+
|
|
52
|
+
const args$ = toObservable(argsSignal, injector ? { injector } : undefined);
|
|
53
|
+
|
|
54
|
+
const result = toSignal(
|
|
55
|
+
args$.pipe(
|
|
56
|
+
// Mark loading + clear stale error synchronously as new args arrive.
|
|
57
|
+
tap(() => {
|
|
58
|
+
pending.set(true);
|
|
59
|
+
error.set(null);
|
|
60
|
+
}),
|
|
61
|
+
switchMap((args) =>
|
|
62
|
+
from(fetcher(args)).pipe(
|
|
63
|
+
map((value) => ({ value, err: null as string | null })),
|
|
64
|
+
catchError((err: unknown) => {
|
|
65
|
+
console.error(err);
|
|
66
|
+
return of({
|
|
67
|
+
value: null as T | null,
|
|
68
|
+
err: err instanceof Error ? err.message : 'An error occurred',
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
),
|
|
73
|
+
tap((outcome) => {
|
|
74
|
+
if (outcome.err !== null) {
|
|
75
|
+
error.set(outcome.err);
|
|
76
|
+
data.set(null);
|
|
77
|
+
} else {
|
|
78
|
+
data.set(outcome.value);
|
|
79
|
+
}
|
|
80
|
+
pending.set(false);
|
|
81
|
+
}),
|
|
82
|
+
),
|
|
83
|
+
{ initialValue: null, ...(injector ? { injector } : {}) },
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
// Keep `result` subscribed so the pipeline runs even if no template reads it.
|
|
87
|
+
effect(
|
|
88
|
+
() => {
|
|
89
|
+
result();
|
|
90
|
+
},
|
|
91
|
+
injector ? { injector } : undefined,
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
data: data.asReadonly(),
|
|
96
|
+
loading: pending.asReadonly(),
|
|
97
|
+
error: error.asReadonly(),
|
|
98
|
+
};
|
|
99
|
+
}
|
package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>MyAngularApp</title>
|
|
6
|
+
<base href="/" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<app-root></app-root>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/styles.css
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;
|
|
2
|
+
@import 'tailwindcss/theme.css' layer(theme);
|
|
3
|
+
@import 'tailwindcss/preflight.css' layer(base);
|
|
4
|
+
@import 'tailwindcss/utilities.css';
|
|
5
|
+
@import '@spartan-ng/brain/hlm-tailwind-preset.css';
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
html,
|
|
9
|
+
body {
|
|
10
|
+
@apply min-h-screen;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body {
|
|
14
|
+
@apply antialiased bg-white;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@custom-variant dark (&:is(.dark *));
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* shadcn design tokens — identical to the React base app's global.css.
|
|
22
|
+
* Spartan/UI helm components read these CSS variables directly.
|
|
23
|
+
*/
|
|
24
|
+
@theme inline {
|
|
25
|
+
--color-background: var(--background);
|
|
26
|
+
--color-foreground: var(--foreground);
|
|
27
|
+
--color-card: var(--card);
|
|
28
|
+
--color-card-foreground: var(--card-foreground);
|
|
29
|
+
--color-popover: var(--popover);
|
|
30
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
31
|
+
--color-primary: var(--primary);
|
|
32
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
33
|
+
--color-secondary: var(--secondary);
|
|
34
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
35
|
+
--color-muted: var(--muted);
|
|
36
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
37
|
+
--color-accent: var(--accent);
|
|
38
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
39
|
+
--color-destructive: var(--destructive);
|
|
40
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
41
|
+
--color-border: var(--border);
|
|
42
|
+
--color-input: var(--input);
|
|
43
|
+
--color-ring: var(--ring);
|
|
44
|
+
--color-chart-1: var(--chart-1);
|
|
45
|
+
--color-chart-2: var(--chart-2);
|
|
46
|
+
--color-chart-3: var(--chart-3);
|
|
47
|
+
--color-chart-4: var(--chart-4);
|
|
48
|
+
--color-chart-5: var(--chart-5);
|
|
49
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
50
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
51
|
+
--radius-lg: var(--radius);
|
|
52
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
53
|
+
--color-sidebar: var(--sidebar);
|
|
54
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
55
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
56
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
57
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
58
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
59
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
60
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:root {
|
|
64
|
+
--radius: 0.625rem;
|
|
65
|
+
--background: oklch(1 0 0);
|
|
66
|
+
--foreground: oklch(0.145 0 0);
|
|
67
|
+
--card: oklch(1 0 0);
|
|
68
|
+
--card-foreground: oklch(0.145 0 0);
|
|
69
|
+
--popover: oklch(1 0 0);
|
|
70
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
71
|
+
--primary: oklch(0.205 0 0);
|
|
72
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
73
|
+
--secondary: oklch(0.97 0 0);
|
|
74
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
75
|
+
--muted: oklch(0.97 0 0);
|
|
76
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
77
|
+
--accent: oklch(0.97 0 0);
|
|
78
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
79
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
80
|
+
--border: oklch(0.922 0 0);
|
|
81
|
+
--input: oklch(0.922 0 0);
|
|
82
|
+
--ring: oklch(0.708 0 0);
|
|
83
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
84
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
85
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
86
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
87
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
88
|
+
--sidebar: oklch(0.985 0 0);
|
|
89
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
90
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
91
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
93
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
94
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
95
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.dark {
|
|
99
|
+
--background: oklch(0.145 0 0);
|
|
100
|
+
--foreground: oklch(0.985 0 0);
|
|
101
|
+
--card: oklch(0.205 0 0);
|
|
102
|
+
--card-foreground: oklch(0.985 0 0);
|
|
103
|
+
--popover: oklch(0.205 0 0);
|
|
104
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
105
|
+
--primary: oklch(0.922 0 0);
|
|
106
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
107
|
+
--secondary: oklch(0.269 0 0);
|
|
108
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
109
|
+
--muted: oklch(0.269 0 0);
|
|
110
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
111
|
+
--accent: oklch(0.269 0 0);
|
|
112
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
113
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
114
|
+
--border: oklch(1 0 0 / 10%);
|
|
115
|
+
--input: oklch(1 0 0 / 15%);
|
|
116
|
+
--ring: oklch(0.556 0 0);
|
|
117
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
118
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
119
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
120
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
121
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
122
|
+
--sidebar: oklch(0.205 0 0);
|
|
123
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
124
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
125
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
126
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
127
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
128
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
129
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@layer base {
|
|
133
|
+
* {
|
|
134
|
+
@apply border-border outline-ring/50;
|
|
135
|
+
}
|
|
136
|
+
body {
|
|
137
|
+
@apply bg-background text-foreground;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-time constants injected via esbuild `define`. Substituted by
|
|
3
|
+
* @salesforce/angular-plugin-ui-bundle during build (see esbuild/api-version.mjs
|
|
4
|
+
* and angular.json plugins[]).
|
|
5
|
+
*
|
|
6
|
+
* Without substitution, `@salesforce/platform-sdk` and `@salesforce/ui-bundle`
|
|
7
|
+
* fall back to "65.0" — the published packages contain the literal token.
|
|
8
|
+
*/
|
|
9
|
+
declare const __SF_API_VERSION__: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Ambient augmentation: adds `language` to the platform's `SfdcEnv`.
|
|
13
|
+
*
|
|
14
|
+
* The language switcher reads the active language from `SFDC_ENV.language`.
|
|
15
|
+
* Because declared interfaces merge, this ADDS the field without redeclaring
|
|
16
|
+
* the platform-owned fields (`basePath`, `orgUrl`, etc.).
|
|
17
|
+
*
|
|
18
|
+
* Expected value: the page locale in hyphenated form, e.g. `"en-US"`.
|
|
19
|
+
*/
|
|
20
|
+
interface SfdcEnv {
|
|
21
|
+
/** Current page language in hyphenated form, e.g. "en-US". */
|
|
22
|
+
language?: string;
|
|
23
|
+
}
|
package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/tsconfig.app.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/app",
|
|
7
|
+
"types": []
|
|
8
|
+
},
|
|
9
|
+
"include": ["src/**/*.ts"],
|
|
10
|
+
"exclude": ["src/**/*.spec.ts"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"compileOnSave": false,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitOverride": true,
|
|
8
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noFallthroughCasesInSwitch": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"importHelpers": true,
|
|
15
|
+
"target": "ES2022",
|
|
16
|
+
"module": "preserve",
|
|
17
|
+
"paths": {
|
|
18
|
+
"@spartan-ng/styles/*": ["./src/app/shared/*/index.ts"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"angularCompilerOptions": {
|
|
22
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
23
|
+
"strictInjectionParameters": true,
|
|
24
|
+
"strictInputAccessModifiers": true,
|
|
25
|
+
"strictTemplates": true
|
|
26
|
+
},
|
|
27
|
+
"files": [],
|
|
28
|
+
"references": [
|
|
29
|
+
{
|
|
30
|
+
"path": "./tsconfig.app.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "./tsconfig.spec.json"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/tsconfig.spec.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/spec",
|
|
7
|
+
"types": ["vitest/globals"]
|
|
8
|
+
},
|
|
9
|
+
"include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
|
|
10
|
+
}
|