@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,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
+
"version": "12.5.4",
|
|
4
|
+
"description": "Base SFDX project template",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"sf-project-setup": "node scripts/sf-project-setup.mjs",
|
|
11
|
+
"build": "echo 'No build required for base-sfdx-project'",
|
|
12
|
+
"clean": "echo 'No clean required for base-sfdx-project'",
|
|
13
|
+
"lint": "eslint --no-error-on-unmatched-pattern **/{aura,lwc}/**/*.js",
|
|
14
|
+
"validate:org-setup-config": "node scripts/validate-org-setup-config.mjs",
|
|
15
|
+
"test": "npm run test:unit",
|
|
16
|
+
"test:coverage": "npm run test",
|
|
17
|
+
"test:unit": "sfdx-lwc-jest -- --passWithNoTests",
|
|
18
|
+
"test:unit:watch": "sfdx-lwc-jest --watch",
|
|
19
|
+
"test:unit:debug": "sfdx-lwc-jest --debug",
|
|
20
|
+
"test:unit:coverage": "sfdx-lwc-jest --coverage",
|
|
21
|
+
"prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
|
|
22
|
+
"prettier:verify": "prettier --check \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
|
|
23
|
+
"precommit": "lint-staged",
|
|
24
|
+
"setup": "node scripts/org-setup.mjs",
|
|
25
|
+
"dev:preview": "node scripts/org-setup-dev.mjs"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"fast-xml-parser": "^5.9.3",
|
|
29
|
+
"zod": "^3.24.1"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@lwc/eslint-plugin-lwc": "^3.3.0",
|
|
33
|
+
"@prettier/plugin-xml": "^3.2.2",
|
|
34
|
+
"@salesforce/eslint-config-lwc": "^4.1.0",
|
|
35
|
+
"@salesforce/eslint-plugin-aura": "^3.0.0",
|
|
36
|
+
"@salesforce/eslint-plugin-lightning": "^2.0.0",
|
|
37
|
+
"@salesforce/sfdx-lwc-jest": "^7.0.1",
|
|
38
|
+
"eslint": "^9.39.0",
|
|
39
|
+
"eslint-plugin-import": "^2.25.4",
|
|
40
|
+
"eslint-plugin-jest": "^28.8.1",
|
|
41
|
+
"husky": "^9.1.5",
|
|
42
|
+
"lint-staged": "^15.1.0",
|
|
43
|
+
"prettier": "^3.1.0",
|
|
44
|
+
"prettier-plugin-apex": "^2.0.1"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Use .apex files to store anonymous Apex.
|
|
2
|
+
// You can execute anonymous Apex in VS Code by selecting the
|
|
3
|
+
// apex text and running the command:
|
|
4
|
+
// SFDX: Execute Anonymous Apex with Currently Selected Text
|
|
5
|
+
// You can also execute the entire file by running the command:
|
|
6
|
+
// SFDX: Execute Anonymous Apex with Editor Contents
|
|
7
|
+
|
|
8
|
+
string tempvar = 'Enter_your_name_here';
|
|
9
|
+
System.debug('Hello World!');
|
|
10
|
+
System.debug('My name is ' + tempvar);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sfdx": "# This file is used for Git repositories to specify intentionally untracked files that Git should ignore. \n# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore\n# For useful gitignore templates see: https://github.com/github/gitignore\n\n# Salesforce cache\n.sf/\n.sfdx/\n.localdevserver/\ndeploy-options.json\n\n# LWC VSCode autocomplete\n**/lwc/jsconfig.json\n\n# LWC Jest coverage reports\ncoverage/\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Dependency directories\nnode_modules/\n\n# Eslint cache\n.eslintcache\n\n# MacOS system files\n.DS_Store\n\n# Windows system files\nThumbs.db\nehthumbs.db\n[Dd]esktop.ini\n$RECYCLE.BIN/\n\n# Local environment variables\n.env\n\n# Python Salesforce Functions\n**/__pycache__/\n**/.venv/\n**/venv/\n",
|
|
3
|
+
"webapp": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\npackage-lock.json\n\n# Playwright\n/test-results/\n/playwright-report/\n/blob-report/\n/playwright/.cache/\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
|
|
4
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail # exit on error (-e), undefined vars (-u), and propagate pipeline failures (-o pipefail)
|
|
3
|
+
# graphql-search.sh — Look up one or more Salesforce entities in schema.graphql.
|
|
4
|
+
#
|
|
5
|
+
# Run from the SFDX project root (where schema.graphql lives):
|
|
6
|
+
# bash scripts/graphql-search.sh Account
|
|
7
|
+
# bash scripts/graphql-search.sh Account Contact Opportunity
|
|
8
|
+
#
|
|
9
|
+
# Pass a custom schema path with -s / --schema:
|
|
10
|
+
# bash scripts/graphql-search.sh -s /path/to/schema.graphql Account
|
|
11
|
+
# bash scripts/graphql-search.sh --schema ./other/schema.graphql Account Contact
|
|
12
|
+
#
|
|
13
|
+
# Output sections per entity:
|
|
14
|
+
# 1. Type definition — all fields and relationships
|
|
15
|
+
# 2. Filter options — <Entity>_Filter input (for `where:`)
|
|
16
|
+
# 3. Sort options — <Entity>_OrderBy input (for `orderBy:`)
|
|
17
|
+
# 4. Create mutation wrapper — <Entity>CreateInput
|
|
18
|
+
# 5. Create mutation fields — <Entity>CreateRepresentation (for create mutations)
|
|
19
|
+
# 6. Update mutation wrapper — <Entity>UpdateInput
|
|
20
|
+
# 7. Update mutation fields — <Entity>UpdateRepresentation (for update mutations)
|
|
21
|
+
|
|
22
|
+
SCHEMA="./schema.graphql"
|
|
23
|
+
|
|
24
|
+
# ── Argument parsing ─────────────────────────────────────────────────────────
|
|
25
|
+
|
|
26
|
+
while [[ $# -gt 0 ]]; do
|
|
27
|
+
case "$1" in
|
|
28
|
+
-s|--schema)
|
|
29
|
+
if [[ -z "${2-}" || "$2" == -* ]]; then
|
|
30
|
+
echo "ERROR: --schema requires a file path argument"
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
SCHEMA="$2"
|
|
34
|
+
shift 2
|
|
35
|
+
;;
|
|
36
|
+
--)
|
|
37
|
+
shift
|
|
38
|
+
break
|
|
39
|
+
;;
|
|
40
|
+
-*)
|
|
41
|
+
echo "ERROR: Unknown option: $1"
|
|
42
|
+
echo "Usage: bash $0 [-s <schema-path>] <EntityName> [EntityName2 ...]"
|
|
43
|
+
exit 1
|
|
44
|
+
;;
|
|
45
|
+
*)
|
|
46
|
+
break
|
|
47
|
+
;;
|
|
48
|
+
esac
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
if [ $# -eq 0 ]; then
|
|
52
|
+
echo "Usage: bash $0 [-s <schema-path>] <EntityName> [EntityName2 ...]"
|
|
53
|
+
echo "Example: bash $0 Account"
|
|
54
|
+
echo "Example: bash $0 Account Contact Opportunity"
|
|
55
|
+
echo "Example: bash $0 --schema /path/to/schema.graphql Account"
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
if [ ! -f "$SCHEMA" ]; then
|
|
60
|
+
echo "ERROR: schema.graphql not found at $SCHEMA"
|
|
61
|
+
echo " Make sure you are running from the SFDX project root, or pass the path explicitly:"
|
|
62
|
+
echo " bash $0 --schema <path/to/schema.graphql> <EntityName>"
|
|
63
|
+
echo " If the file is missing entirely, generate it from the ui-bundle dir:"
|
|
64
|
+
echo " cd force-app/main/default/uiBundles/<app-name> && npm run graphql:schema"
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
if [ ! -r "$SCHEMA" ]; then
|
|
69
|
+
echo "ERROR: schema.graphql is not readable at $SCHEMA"
|
|
70
|
+
echo " Check file permissions: ls -la $SCHEMA"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
if [ ! -s "$SCHEMA" ]; then
|
|
75
|
+
echo "ERROR: schema.graphql is empty at $SCHEMA"
|
|
76
|
+
echo " Regenerate it from the ui-bundle dir:"
|
|
77
|
+
echo " cd force-app/main/default/uiBundles/<app-name> && npm run graphql:schema"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# ── Helper: extract lines from a grep match through the closing brace ────────
|
|
82
|
+
# Prints up to MAX_LINES lines after (and including) the first match of PATTERN.
|
|
83
|
+
# Uses a generous line count — blocks are always closed by a "}" line.
|
|
84
|
+
|
|
85
|
+
extract_block() {
|
|
86
|
+
local label="$1"
|
|
87
|
+
local pattern="$2"
|
|
88
|
+
local max_lines="$3"
|
|
89
|
+
|
|
90
|
+
local match
|
|
91
|
+
local grep_exit=0
|
|
92
|
+
match=$(grep -nE "$pattern" "$SCHEMA" | head -1) || grep_exit=$?
|
|
93
|
+
|
|
94
|
+
if [ "$grep_exit" -eq 2 ]; then
|
|
95
|
+
echo " ERROR: grep failed on pattern: $pattern" >&2
|
|
96
|
+
return 1
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
if [ -z "$match" ]; then
|
|
100
|
+
echo " (not found: $pattern)"
|
|
101
|
+
return 3
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
echo "### $label"
|
|
105
|
+
grep -E "$pattern" "$SCHEMA" -A "$max_lines" | \
|
|
106
|
+
awk '/^\}$/{print; exit} {print}' | \
|
|
107
|
+
head -n "$max_lines" || true
|
|
108
|
+
echo ""
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# ── Main loop ────────────────────────────────────────────────────────────────
|
|
112
|
+
|
|
113
|
+
for ENTITY in "$@"; do
|
|
114
|
+
# Validate entity name: must be a valid PascalCase identifier (letters, digits, underscores)
|
|
115
|
+
if [[ ! "$ENTITY" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]]; then
|
|
116
|
+
echo "ERROR: Invalid entity name: '$ENTITY'"
|
|
117
|
+
echo " Entity names must start with a letter or underscore, followed by letters, digits, or underscores."
|
|
118
|
+
echo " Examples: Account, My_Custom_Object__c"
|
|
119
|
+
continue
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
echo ""
|
|
123
|
+
echo "======================================================================"
|
|
124
|
+
echo " SCHEMA LOOKUP: $ENTITY"
|
|
125
|
+
echo "======================================================================"
|
|
126
|
+
echo ""
|
|
127
|
+
|
|
128
|
+
found=0
|
|
129
|
+
|
|
130
|
+
# Helper: call extract_block, track matches, surface errors
|
|
131
|
+
try_extract() {
|
|
132
|
+
local rc=0
|
|
133
|
+
extract_block "$@" || rc=$?
|
|
134
|
+
if [ "$rc" -eq 0 ]; then
|
|
135
|
+
found=$((found + 1))
|
|
136
|
+
elif [ "$rc" -eq 1 ]; then
|
|
137
|
+
echo " Aborting lookup for '$ENTITY' due to grep error" >&2
|
|
138
|
+
fi
|
|
139
|
+
# rc=3 is not-found — continue silently (already printed by extract_block)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
# 1. Type definition — all fields and relationships
|
|
143
|
+
try_extract \
|
|
144
|
+
"Type definition — fields and relationships" \
|
|
145
|
+
"^type ${ENTITY} implements Record" \
|
|
146
|
+
200
|
|
147
|
+
|
|
148
|
+
# 2. Filter input — used in `where:` arguments
|
|
149
|
+
try_extract \
|
|
150
|
+
"Filter options — use in where: { ... }" \
|
|
151
|
+
"^input ${ENTITY}_Filter" \
|
|
152
|
+
100
|
|
153
|
+
|
|
154
|
+
# 3. OrderBy input — used in `orderBy:` arguments
|
|
155
|
+
try_extract \
|
|
156
|
+
"Sort options — use in orderBy: { ... }" \
|
|
157
|
+
"^input ${ENTITY}_OrderBy" \
|
|
158
|
+
60
|
|
159
|
+
|
|
160
|
+
# 4. Create mutation wrapper
|
|
161
|
+
try_extract \
|
|
162
|
+
"Create mutation wrapper — ${ENTITY}CreateInput" \
|
|
163
|
+
"^input ${ENTITY}CreateInput" \
|
|
164
|
+
10
|
|
165
|
+
|
|
166
|
+
# 5. Create mutation fields
|
|
167
|
+
try_extract \
|
|
168
|
+
"Create mutation fields — ${ENTITY}CreateRepresentation" \
|
|
169
|
+
"^input ${ENTITY}CreateRepresentation" \
|
|
170
|
+
100
|
|
171
|
+
|
|
172
|
+
# 6. Update mutation wrapper
|
|
173
|
+
try_extract \
|
|
174
|
+
"Update mutation wrapper — ${ENTITY}UpdateInput" \
|
|
175
|
+
"^input ${ENTITY}UpdateInput" \
|
|
176
|
+
10
|
|
177
|
+
|
|
178
|
+
# 7. Update mutation fields
|
|
179
|
+
try_extract \
|
|
180
|
+
"Update mutation fields — ${ENTITY}UpdateRepresentation" \
|
|
181
|
+
"^input ${ENTITY}UpdateRepresentation" \
|
|
182
|
+
100
|
|
183
|
+
|
|
184
|
+
if [ "$found" -eq 0 ]; then
|
|
185
|
+
echo "WARNING: No schema entries found for '$ENTITY'."
|
|
186
|
+
echo " - Names are PascalCase (e.g., 'Account' not 'account')"
|
|
187
|
+
echo " - Custom objects may need deployment first"
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
echo ""
|
|
191
|
+
done
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared schema + validator for org-setup.config.json (W-23043729).
|
|
3
|
+
*
|
|
4
|
+
* Authored ONCE, used at TWO moments:
|
|
5
|
+
* (a) build / CI time — `scripts/validate-org-setup-config.mjs` validates every
|
|
6
|
+
* org-setup.config.json this repo ships, failing the build on any violation.
|
|
7
|
+
* (b) setup runtime — `org-setup.mjs` calls `validateConfig` once in main(),
|
|
8
|
+
* before any step runs, to catch the developer's local post-scaffold edits.
|
|
9
|
+
*
|
|
10
|
+
* `validateConfig` is pure: it parses + validates and RETURNS a result. Each call
|
|
11
|
+
* site owns its own print/exit, so the build gate can report every bad file and
|
|
12
|
+
* the runtime can exit immediately — and the validator stays unit-testable.
|
|
13
|
+
*
|
|
14
|
+
* The zod schema uses `.strict()` at every level so unknown keys (e.g. the
|
|
15
|
+
* `permsetAssignment` singular typo) are rejected rather than silently ignored.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
|
|
20
|
+
/** Closed set of assignee values — no arbitrary usernames. */
|
|
21
|
+
const Assignee = z.enum(['currentUser', 'guestUser', 'skip']);
|
|
22
|
+
|
|
23
|
+
// No siteName: for guestUser the site is derived from the single
|
|
24
|
+
// networks/<siteName>.network-meta.xml the app ships (see spec §5.2).
|
|
25
|
+
const Assignment = z
|
|
26
|
+
.object({
|
|
27
|
+
assignee: Assignee,
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
30
|
+
|
|
31
|
+
export const ConfigSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
permsetAssignments: z
|
|
34
|
+
.object({
|
|
35
|
+
// guestUser is valid here — siteName is derived, not per-assignment.
|
|
36
|
+
defaultAssignee: Assignee.default('skip'),
|
|
37
|
+
assignments: z.record(z.string(), Assignment).default({}),
|
|
38
|
+
})
|
|
39
|
+
.strict()
|
|
40
|
+
.optional(),
|
|
41
|
+
role: z
|
|
42
|
+
.object({
|
|
43
|
+
assignee: z.literal('currentUser'), // only value the role code honors
|
|
44
|
+
roleName: z.string().min(1),
|
|
45
|
+
})
|
|
46
|
+
.strict()
|
|
47
|
+
.optional(),
|
|
48
|
+
selfRegistration: z
|
|
49
|
+
.object({
|
|
50
|
+
// No siteName: the site is derived from the single
|
|
51
|
+
// networks/<siteName>.network-meta.xml the app ships (see spec §5.2),
|
|
52
|
+
// exactly like the guestUser permset path.
|
|
53
|
+
//
|
|
54
|
+
// selfRegProfile also drives the M1 license pre-check (W-23043735):
|
|
55
|
+
// setup derives the required UserLicense from this profile
|
|
56
|
+
// (Profile.UserLicense, matched on the stable LicenseDefinitionKey) and
|
|
57
|
+
// warns + skips self-registration when the org lacks it or has no seats.
|
|
58
|
+
// No separate license field is declared — the requirement can't drift
|
|
59
|
+
// from the profile the flow actually assigns.
|
|
60
|
+
selfRegProfile: z.string().min(1),
|
|
61
|
+
accountName: z.string().min(1),
|
|
62
|
+
})
|
|
63
|
+
.strict()
|
|
64
|
+
.optional(),
|
|
65
|
+
socialLogin: z
|
|
66
|
+
.object({
|
|
67
|
+
// Profile to add to NetworkMemberGroup so SSO-registered users can access
|
|
68
|
+
// the community (e.g. "Customer Community User"). Also enables the
|
|
69
|
+
// "Allow standard external profiles" org setting.
|
|
70
|
+
communityMemberProfile: z.string().min(1),
|
|
71
|
+
// DeveloperName of AuthProvider (OAuth) or SamlSsoConfig (SAML) records to link to the site's AuthConfig.
|
|
72
|
+
// Required because React (Site Container) sites hide SSO config in Admin UI.
|
|
73
|
+
authProviderNames: z.array(z.string().min(1)).min(1),
|
|
74
|
+
// Permission set to assign to community users created via SSO.
|
|
75
|
+
// Required because getCurrentUser() calls UI API GraphQL (uiapi.currentUser)
|
|
76
|
+
// which needs API access (PermissionsApiEnabled) that the community profile lacks.
|
|
77
|
+
// Typically the app's "*_Guest_User_Api_Access" permset.
|
|
78
|
+
communityUserPermset: z.string().min(1).optional(),
|
|
79
|
+
})
|
|
80
|
+
.strict()
|
|
81
|
+
.optional(),
|
|
82
|
+
// URL members are redirected to after logging out, written to the site's
|
|
83
|
+
// <logoutUrl> network metadata (a post-deploy step). Steers logout back to THIS
|
|
84
|
+
// site so members aren't dropped on the org default-site login (which, in an
|
|
85
|
+
// org hosting multiple sites, can be a different community). Prefer a
|
|
86
|
+
// site-relative path (e.g. "/myapp/"): it is domain-independent, so the same
|
|
87
|
+
// shipped value is valid on every org. The platform REQUIRES an absolute logout
|
|
88
|
+
// URL, so org-setup resolves a relative path against the site's Experience Cloud
|
|
89
|
+
// origin (discovered from the org at deploy time) before writing it; an
|
|
90
|
+
// already-absolute value is used as-is. Kept a permissive non-empty string (not
|
|
91
|
+
// z.string().url()) so relative paths are valid; character-safety for raw XML
|
|
92
|
+
// interpolation is enforced at write time.
|
|
93
|
+
logoutUrl: z.string().min(1).optional(),
|
|
94
|
+
})
|
|
95
|
+
.strict();
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Render a single zod issue as a "path: message" line. Empty path (a root-level
|
|
99
|
+
* problem) renders as "<root>: message".
|
|
100
|
+
*/
|
|
101
|
+
function formatIssue(issue) {
|
|
102
|
+
const path = issue.path.length > 0 ? issue.path.join('.') : '<root>';
|
|
103
|
+
return `${path}: ${issue.message}`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Parse + validate a raw org-setup.config.json string.
|
|
108
|
+
*
|
|
109
|
+
* @param {string} rawText raw file contents (not yet JSON-parsed)
|
|
110
|
+
* @param {string} [configPath] path used only for error messages
|
|
111
|
+
* @returns {{ ok: true, data: object } | { ok: false, errors: string[] }}
|
|
112
|
+
* On success, `data` is the parsed + defaulted config. On failure, `errors`
|
|
113
|
+
* is a non-empty list of human-readable messages (JSON parse error or zod
|
|
114
|
+
* issues). The caller decides whether to print/exit.
|
|
115
|
+
*/
|
|
116
|
+
export function validateConfig(rawText, configPath) {
|
|
117
|
+
const where = configPath ? ` (${configPath})` : '';
|
|
118
|
+
|
|
119
|
+
let parsed;
|
|
120
|
+
try {
|
|
121
|
+
parsed = JSON.parse(rawText);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
return { ok: false, errors: [`malformed JSON${where}: ${err.message}`] };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const result = ConfigSchema.safeParse(parsed);
|
|
127
|
+
if (!result.success) {
|
|
128
|
+
return { ok: false, errors: result.error.issues.map(formatIssue) };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return { ok: true, data: result.data };
|
|
132
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Dev preview: refresh the GraphQL schema/types against a target org, then launch
|
|
4
|
+
* the Vite dev server (spec §5.5, M4). This is the step that used to be the final
|
|
5
|
+
* `dev` stage of org-setup.mjs — extracted here so `npm run setup` terminates
|
|
6
|
+
* cleanly after graphql, and the long-lived dev server is an explicit, separate
|
|
7
|
+
* `npm run dev:preview`.
|
|
8
|
+
*
|
|
9
|
+
* Unlike setup, this does NOT log in or deploy — it assumes the org is already
|
|
10
|
+
* set up. It shares org/bundle resolution and the process runner with org-setup
|
|
11
|
+
* via org-setup-utils.mjs.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* npm run dev:preview # prompt to pick an org + bundle
|
|
15
|
+
* npm run dev:preview -- --target-org myorg
|
|
16
|
+
* npm run dev:preview -- --target-org myorg --ui-bundle-name my-app
|
|
17
|
+
*
|
|
18
|
+
* Flow (in order):
|
|
19
|
+
* 1. resolve target org (explicit --target-org, else prompt / default org)
|
|
20
|
+
* 2. resolve UI bundle (explicit --ui-bundle-name, else picker / warning)
|
|
21
|
+
* 3. npm install (in the UI bundle)
|
|
22
|
+
* 4. npm run graphql:schema (SF_TARGET_ORG=<org>) — introspect the live schema
|
|
23
|
+
* 5. npm run graphql:codegen — regenerate typed operations
|
|
24
|
+
* 6. npm run dev (blocking, Ctrl+C to stop)
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { resolve, dirname } from 'node:path';
|
|
28
|
+
import { fileURLToPath } from 'node:url';
|
|
29
|
+
|
|
30
|
+
import { run, resolveSfdxSource, discoverUIBundleDir, resolveTargetOrg } from './org-setup-utils.mjs';
|
|
31
|
+
|
|
32
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
33
|
+
const ROOT = resolve(__dirname, '..');
|
|
34
|
+
|
|
35
|
+
function parseArgs() {
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
let targetOrg = null;
|
|
38
|
+
let uiBundleName = null;
|
|
39
|
+
for (let i = 0; i < args.length; i++) {
|
|
40
|
+
if (args[i] === '--target-org' && args[i + 1]) {
|
|
41
|
+
targetOrg = args[++i];
|
|
42
|
+
} else if (args[i] === '--ui-bundle-name' && args[i + 1]) {
|
|
43
|
+
uiBundleName = args[++i];
|
|
44
|
+
} else if (args[i] === '--help' || args[i] === '-h') {
|
|
45
|
+
console.log(`
|
|
46
|
+
Dev preview — refresh GraphQL types then launch the Vite dev server
|
|
47
|
+
|
|
48
|
+
Usage:
|
|
49
|
+
npm run dev:preview -- [--target-org <alias>] [--ui-bundle-name <name>]
|
|
50
|
+
|
|
51
|
+
Options:
|
|
52
|
+
--target-org <alias> Target Salesforce org alias. If omitted, you are prompted
|
|
53
|
+
to pick from authenticated orgs (or the default org is used).
|
|
54
|
+
--ui-bundle-name <name> UI bundle folder under uiBundles/ (default: auto-detect / prompt)
|
|
55
|
+
-h, --help Show this help
|
|
56
|
+
`);
|
|
57
|
+
process.exit(0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return { targetOrg, uiBundleName };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Print a heads-up about auth surfaces that only work on the deployed Experience
|
|
65
|
+
* site. In local preview, `sdk.fetch` is proxied to the org outside the site's
|
|
66
|
+
* guest/community context, so social login and password/MFA login cannot be
|
|
67
|
+
* exercised on localhost. This mirrors the "Local preview limitations" sections
|
|
68
|
+
* in the feature-react-authentication / feature-react-mfa READMEs — surfaced here
|
|
69
|
+
* so it is seen even when the READMEs are not.
|
|
70
|
+
*/
|
|
71
|
+
function printLocalPreviewWarning() {
|
|
72
|
+
console.log(
|
|
73
|
+
[
|
|
74
|
+
'',
|
|
75
|
+
'⚠️ Local preview limitation — some auth surfaces only work on the DEPLOYED site',
|
|
76
|
+
' Local preview proxies sdk.fetch to the org outside the Experience site guest',
|
|
77
|
+
' context (Site.getBaseUrl() is blank, no site session), so on localhost:',
|
|
78
|
+
' • Social Login buttons do not render (/auth/social-login-config returns no providers)',
|
|
79
|
+
' • Password / MFA login fails with "Your login attempt has failed…" (Site.login() cannot',
|
|
80
|
+
' establish the site session)',
|
|
81
|
+
' This is expected, not a misconfiguration. Test social login and MFA on the published',
|
|
82
|
+
' site login page: https://<domain>.site.com/<site-path>/login',
|
|
83
|
+
'',
|
|
84
|
+
].join('\n'),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async function main() {
|
|
89
|
+
const parsed = parseArgs();
|
|
90
|
+
|
|
91
|
+
const targetOrg = await resolveTargetOrg(parsed);
|
|
92
|
+
const uiBundlesDir = resolve(resolveSfdxSource(ROOT), 'uiBundles');
|
|
93
|
+
const uiBundleDir = await discoverUIBundleDir(uiBundlesDir, parsed.uiBundleName);
|
|
94
|
+
|
|
95
|
+
console.log('Dev preview — target org:', targetOrg, '| UI bundle:', uiBundleDir);
|
|
96
|
+
|
|
97
|
+
run('UI Bundle npm install', 'npm', ['install'], { cwd: uiBundleDir });
|
|
98
|
+
run('GraphQL schema (introspect)', 'npm', ['run', 'graphql:schema'], {
|
|
99
|
+
cwd: uiBundleDir,
|
|
100
|
+
env: { ...process.env, SF_TARGET_ORG: targetOrg },
|
|
101
|
+
});
|
|
102
|
+
run('GraphQL codegen', 'npm', ['run', 'graphql:codegen'], { cwd: uiBundleDir });
|
|
103
|
+
|
|
104
|
+
printLocalPreviewWarning();
|
|
105
|
+
|
|
106
|
+
console.log('\n--- Launching dev server (Ctrl+C to stop) ---\n');
|
|
107
|
+
const devResult = run('Dev server', 'npm', ['run', 'dev'], { cwd: uiBundleDir, optional: true });
|
|
108
|
+
process.exit(devResult.status ?? 0);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
main().catch((err) => {
|
|
112
|
+
console.error(err);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure URL helpers for org-setup.mjs logout-URL productization.
|
|
3
|
+
*
|
|
4
|
+
* The platform requires an ABSOLUTE logout URL on Network metadata — a relative
|
|
5
|
+
* value is rejected at deploy time ("The logout page URL must be an absolute
|
|
6
|
+
* URL."). Apps ship a domain-INDEPENDENT, site-relative path in
|
|
7
|
+
* org-setup.config.json (so the same value is valid on every org the app deploys
|
|
8
|
+
* to); these helpers resolve it to an absolute URL at deploy time, against the
|
|
9
|
+
* site's Experience Cloud origin discovered from the target org's communities.
|
|
10
|
+
*
|
|
11
|
+
* Pure (no fs / no process / no network): org-setup.mjs fetches the community list
|
|
12
|
+
* (Connect API) and owns the fail modes; these helpers only classify + resolve
|
|
13
|
+
* strings, so they carry automated coverage in the consuming test package
|
|
14
|
+
* (org-setup-tests/test/org-setup-url.spec.ts). Companion to org-setup-xml.mjs.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** True when `value` is an absolute http(s) URL — already deployable as-is. */
|
|
18
|
+
export function isAbsoluteLogoutUrl(value) {
|
|
19
|
+
return /^https?:\/\//i.test(String(value).trim());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Leading path segment of a URL or path:
|
|
24
|
+
* "/propertyrentalapp/" -> "propertyrentalapp"
|
|
25
|
+
* "https://h.site.com/propertyrentalapp" -> "propertyrentalapp"
|
|
26
|
+
* "/" -> ""
|
|
27
|
+
*/
|
|
28
|
+
export function firstPathSegment(pathOrUrl) {
|
|
29
|
+
let pathname;
|
|
30
|
+
try {
|
|
31
|
+
pathname = new URL(pathOrUrl).pathname; // absolute URL
|
|
32
|
+
} catch {
|
|
33
|
+
pathname = String(pathOrUrl).split(/[?#]/)[0]; // relative path
|
|
34
|
+
}
|
|
35
|
+
return pathname.replace(/^\/+/, '').split('/')[0];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Choose the Experience Cloud community whose site URL should anchor a relative
|
|
40
|
+
* logout path, and return its siteUrl (or null when none matches).
|
|
41
|
+
*
|
|
42
|
+
* Matches on the community's siteUrl PATH first — robust even when a community's
|
|
43
|
+
* `urlPathPrefix` differs from its public path (e.g. a React "site container" site
|
|
44
|
+
* whose companion ChatterNetwork carries a "…vforcesite" prefix), and correct on
|
|
45
|
+
* custom domains where each site can have its own origin. Falls back to a
|
|
46
|
+
* community whose `name` equals the derived site name. Does NOT fall back to an
|
|
47
|
+
* arbitrary community: resolving against the wrong origin would silently produce a
|
|
48
|
+
* valid-but-wrong absolute URL, so an unmatched relative path is left for the
|
|
49
|
+
* caller to surface loudly.
|
|
50
|
+
*
|
|
51
|
+
* @param {Array<{name?: string, siteUrl?: string}>} communities
|
|
52
|
+
* @param {string} configLogoutUrl the site-relative path being resolved
|
|
53
|
+
* @param {string} [siteName]
|
|
54
|
+
* @returns {string|null} the matched community siteUrl
|
|
55
|
+
*/
|
|
56
|
+
export function pickCommunityBaseUrl(communities, configLogoutUrl, siteName) {
|
|
57
|
+
const list = Array.isArray(communities) ? communities.filter((c) => c && c.siteUrl) : [];
|
|
58
|
+
const seg = firstPathSegment(configLogoutUrl);
|
|
59
|
+
|
|
60
|
+
if (seg) {
|
|
61
|
+
const byPath = list.find((c) => firstPathSegment(c.siteUrl) === seg);
|
|
62
|
+
if (byPath) return byPath.siteUrl;
|
|
63
|
+
}
|
|
64
|
+
if (siteName) {
|
|
65
|
+
const byName = list.find((c) => c.name === siteName);
|
|
66
|
+
if (byName) return byName.siteUrl;
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Resolve a shipped logout-URL config value to an absolute URL.
|
|
73
|
+
* - already absolute -> returned unchanged (trimmed).
|
|
74
|
+
* - site-relative path -> resolved against `baseUrl` (a community siteUrl).
|
|
75
|
+
* Because the config path is root-relative ("/app/"), only baseUrl's ORIGIN is
|
|
76
|
+
* used, so any siteUrl on the same Experience Cloud domain yields the same
|
|
77
|
+
* result.
|
|
78
|
+
*
|
|
79
|
+
* Throws when a relative value has no baseUrl to resolve against, or when
|
|
80
|
+
* resolution fails to produce an absolute http(s) URL.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} configLogoutUrl
|
|
83
|
+
* @param {string|null} baseUrl
|
|
84
|
+
* @returns {string} an absolute URL
|
|
85
|
+
*/
|
|
86
|
+
export function resolveLogoutUrl(configLogoutUrl, baseUrl) {
|
|
87
|
+
const value = String(configLogoutUrl).trim();
|
|
88
|
+
if (isAbsoluteLogoutUrl(value)) return value;
|
|
89
|
+
|
|
90
|
+
if (!baseUrl) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`logout URL "${configLogoutUrl}" is site-relative but no Experience Cloud ` +
|
|
93
|
+
`community site URL was found to resolve it into an absolute URL`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
let resolved;
|
|
97
|
+
try {
|
|
98
|
+
resolved = new URL(value, baseUrl).href;
|
|
99
|
+
} catch (e) {
|
|
100
|
+
throw new Error(
|
|
101
|
+
`could not resolve logout URL "${configLogoutUrl}" against "${baseUrl}": ${e.message}`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
if (!isAbsoluteLogoutUrl(resolved)) {
|
|
105
|
+
throw new Error(`resolved logout URL "${resolved}" is not an absolute http(s) URL`);
|
|
106
|
+
}
|
|
107
|
+
return resolved;
|
|
108
|
+
}
|