@salesforce/templates 66.11.0 → 66.12.0
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/lib/generators/projectGenerator.js +4 -1
- package/lib/generators/projectGenerator.js.map +1 -1
- package/lib/templates/project/angularextapp/.forceignore +15 -0
- package/lib/templates/project/angularextapp/.husky/pre-commit +4 -0
- package/lib/templates/project/angularextapp/.prettierignore +11 -0
- package/lib/templates/project/angularextapp/.prettierrc +17 -0
- package/lib/templates/project/angularextapp/CHANGELOG.md +4086 -0
- package/lib/templates/project/angularextapp/README.md +77 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_d_/_s_/angularextapp1/angularextapp1.digitalExperience-meta.xml +11 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_d_/_s_/angularextapp1/sfdc_cms__site/angularextapp1/_meta.json +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_d_/_s_/angularextapp1/sfdc_cms__site/angularextapp1/content.json +10 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_dc_/angularextapp1.digitalExperienceConfig-meta.xml +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/.forceignore +15 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/.postcssrc.json +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/.prettierignore +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/.prettierrc +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/CHANGELOG.md +4 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/README.md +85 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/angular.json +101 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/angularextapp.uibundle-meta.xml +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/e2e/app.spec.ts +15 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/esbuild/api-version.mjs +17 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/eslint.config.js +60 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/middleware/html.mjs +3 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/middleware/proxy.mjs +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/package-lock.json +13600 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/package.json +56 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/playwright.config.ts +25 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/public/favicon.ico +0 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/scripts/rewrite-e2e-assets.mjs +30 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/account/account-search.service.ts +196 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/account/distinctAccountIndustries.ts +26 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/account/distinctAccountTypes.ts +26 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/account/getAccountDetail.ts +128 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/account/searchAccounts.ts +58 -0
- package/lib/templates/{uiBundles/angularbasic/src/app/api/graphql-client.service.spec.ts → project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/data-client.service.spec.ts} +36 -6
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/data-client.service.ts +74 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/api/user-profile.service.ts +126 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/app.config.ts +22 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/app.html +1 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/app.routes.ts +77 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/app.spec.ts +18 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/app.ts +15 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.html +53 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.spec.ts +89 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.ts +81 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/_field-size.scss +42 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/alert/alert.html +31 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/alert/alert.ts +53 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.html +18 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.scss +112 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.ts +57 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/card/card.scss +34 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/card/card.ts +110 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/collapsible/collapsible.html +10 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/collapsible/collapsible.ts +26 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.html +25 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.scss +36 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.ts +41 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.html +34 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.scss +33 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.ts +66 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/dialog/dialog.html +37 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/dialog/dialog.ts +55 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/field/field.html +21 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/field/field.ts +36 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/field-size.ts +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.html +19 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.scss +35 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.ts +36 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/label/label.html +3 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/label/label.ts +17 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/paginator/paginator.html +10 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/paginator/paginator.ts +37 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/popover/popover.html +41 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/popover/popover.ts +40 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.html +24 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.scss +35 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.ts +72 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.html +1 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.scss +23 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.ts +56 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.html +1 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.scss +28 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.ts +24 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/components/ui/spinner/spinner.ts +35 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth/auth.guard.ts +50 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth/auth.service.ts +126 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth-form/auth-form.html +34 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth-form/auth-form.ts +94 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth-layout/auth-layout.html +2 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/auth-layout/auth-layout.ts +30 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/card-layout/card-layout.html +16 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/card-layout/card-layout.ts +40 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/config/authentication.config.ts +75 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/footer-link/footer-link.html +9 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/footer-link/footer-link.ts +26 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/menu/auth-menu/auth-menu.html +26 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/menu/auth-menu/auth-menu.ts +46 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/reactive-form-page.base.ts +50 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/session/session.html +55 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/session/session.ts +205 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/status-alert/status-alert.html +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/status-alert/status-alert.ts +52 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/submit-button/submit-button.html +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/submit-button/submit-button.scss +17 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/submit-button/submit-button.ts +35 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/auth-helpers.ts +68 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/auth-validators.ts +72 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/helpers.ts +85 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/session-time-servlet.ts +130 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/session-timeout.config.ts +83 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/authentication/utils/session-timeout.service.ts +201 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/breadcrumb/breadcrumb.html +54 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/breadcrumb/breadcrumb.ts +40 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/active-filters.html +23 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/active-filters.ts +78 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-filter.html +18 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-filter.ts +137 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-range-filter.html +11 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-range-filter.ts +69 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/filter-field-wrapper.html +11 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/filter-field-wrapper.ts +36 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/multi-select-filter.html +10 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/multi-select-filter.ts +58 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/numeric-range-filter.html +22 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/numeric-range-filter.ts +146 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/search-filter.html +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/search-filter.ts +82 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/select-filter.html +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/select-filter.ts +65 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/text-filter.html +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/text-filter.ts +90 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/object-search-state.service.ts +232 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/pagination/pagination.html +8 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/pagination/pagination.ts +61 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/search-bar/search-bar.html +59 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/search-bar/search-bar.ts +108 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/sort-control/sort-control.html +50 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/sort-control/sort-control.ts +72 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/debounce.ts +31 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/field-utils.ts +54 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/filter-utils.ts +354 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/index.ts +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/sort-utils.ts +46 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.html +164 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.scss +7 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.ts +196 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/account-search/account-search-page.html +111 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/account-search/account-search-page.ts +217 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/change-password/change-password-page.html +68 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/change-password/change-password-page.ts +82 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/forgot-password/forgot-password-page.html +35 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/forgot-password/forgot-password-page.ts +87 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/home/home-page.html +18 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/home/home-page.ts +47 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.html +6 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.spec.ts +23 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.ts +13 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/login/login-page.html +47 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/login/login-page.ts +89 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.html +12 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.spec.ts +33 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.ts +15 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/profile/profile-page.html +116 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/profile/profile-page.ts +194 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/register/register-page.html +80 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/register/register-page.ts +93 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/reset-password/reset-password-page.html +60 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/pages/reset-password/reset-password-page.ts +96 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/app/utils/async-data.ts +99 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/index.html +14 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/main.ts +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/styles.scss +170 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/theme.scss +39 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/src/types/sf-globals.d.ts +9 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/tsconfig.app.json +11 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/tsconfig.json +33 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/tsconfig.spec.json +10 -0
- package/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/ui-bundle.json +7 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleAuthUtils.cls +68 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleAuthUtils.cls-meta.xml +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleChangePassword.cls +77 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleChangePassword.cls-meta.xml +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleForgotPassword.cls +71 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleForgotPassword.cls-meta.xml +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleLogin.cls +105 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleLogin.cls-meta.xml +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleRegistration.cls +162 -0
- package/lib/templates/project/angularextapp/_p_/_m_/classes/UIBundleRegistration.cls-meta.xml +5 -0
- package/lib/templates/project/angularextapp/_p_/_m_/networks/angularextapp.network-meta.xml +60 -0
- package/lib/templates/project/angularextapp/_p_/_m_/package.xml +24 -0
- package/lib/templates/project/angularextapp/_p_/_m_/permissionsets/angularextapp_Guest_User_Api_Access.permissionset-meta.xml +9 -0
- package/lib/templates/project/angularextapp/_p_/_m_/sites/angularextapp.site-meta.xml +31 -0
- package/lib/templates/project/angularextapp/config/project-scratch-def.json +13 -0
- package/lib/templates/project/angularextapp/eslint.config.js +7 -0
- package/lib/templates/project/angularextapp/jest.config.js +6 -0
- package/lib/templates/project/angularextapp/package.json +46 -0
- package/lib/templates/project/angularextapp/scripts/apex/hello.apex +10 -0
- package/lib/templates/project/angularextapp/scripts/gitignore-templates.json +4 -0
- package/lib/templates/project/angularextapp/scripts/graphql-search.sh +191 -0
- package/lib/templates/project/angularextapp/scripts/org-setup-config-schema.mjs +103 -0
- package/lib/templates/project/angularextapp/scripts/org-setup-dev.mjs +87 -0
- package/lib/templates/project/angularextapp/scripts/org-setup-utils.mjs +369 -0
- package/lib/templates/project/angularextapp/scripts/org-setup-xml.mjs +182 -0
- package/lib/templates/project/angularextapp/scripts/org-setup.config.json +9 -0
- package/lib/templates/project/angularextapp/scripts/org-setup.mjs +1702 -0
- package/lib/templates/project/angularextapp/scripts/sf-project-setup.mjs +103 -0
- package/lib/templates/project/angularextapp/scripts/soql/account.soql +6 -0
- package/lib/templates/project/angularextapp/scripts/validate-org-setup-config.mjs +38 -0
- package/lib/templates/project/angularextapp/sfdx-project.json +12 -0
- package/lib/templates/project/angularintapp/.forceignore +15 -0
- package/lib/templates/project/angularintapp/.husky/pre-commit +4 -0
- package/lib/templates/project/angularintapp/.prettierignore +11 -0
- package/lib/templates/project/angularintapp/.prettierrc +17 -0
- package/lib/templates/project/angularintapp/CHANGELOG.md +4086 -0
- package/lib/templates/project/angularintapp/README.md +77 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/.forceignore +15 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/.postcssrc.json +5 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/.prettierignore +8 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/.prettierrc +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/CHANGELOG.md +4 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/README.md +85 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/angular.json +101 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/angularintapp.uibundle-meta.xml +8 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/e2e/app.spec.ts +15 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/esbuild/api-version.mjs +17 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/eslint.config.js +60 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/middleware/html.mjs +3 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/middleware/proxy.mjs +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/package-lock.json +13619 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/package.json +57 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/playwright.config.ts +25 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/public/favicon.ico +0 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/scripts/rewrite-e2e-assets.mjs +30 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/account/account-search.service.ts +196 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/account/distinctAccountIndustries.ts +26 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/account/distinctAccountTypes.ts +26 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/account/getAccountDetail.ts +128 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/account/searchAccounts.ts +58 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/data-client.service.spec.ts +184 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/api/data-client.service.ts +74 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/app.config.ts +22 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/app.html +1 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/app.routes.ts +31 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/app.spec.ts +18 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/app.ts +15 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.html +52 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.spec.ts +90 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/layout/app-layout/app-layout.ts +67 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/_field-size.scss +42 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/alert/alert.html +31 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/alert/alert.ts +53 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.html +18 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.scss +112 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/button/button.ts +57 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/card/card.scss +34 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/card/card.ts +110 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/collapsible/collapsible.html +10 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/collapsible/collapsible.ts +26 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.html +25 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.scss +36 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-picker/date-picker.ts +41 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.html +34 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.scss +33 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/date-range-picker/date-range-picker.ts +66 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/dialog/dialog.html +37 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/dialog/dialog.ts +55 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/field/field.html +21 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/field/field.ts +36 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/field-size.ts +8 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.html +19 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.scss +35 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/input/input.ts +36 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/label/label.html +3 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/label/label.ts +17 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/paginator/paginator.html +10 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/paginator/paginator.ts +37 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/popover/popover.html +41 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/popover/popover.ts +40 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.html +24 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.scss +35 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/select/select.ts +72 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.html +1 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.scss +23 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/separator/separator.ts +56 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.html +1 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.scss +28 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/skeleton/skeleton.ts +24 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/components/ui/spinner/spinner.ts +35 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/agentforce/agentforce-embed.service.ts +177 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/agentforce/conversation.html +3 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/agentforce/conversation.ts +119 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/breadcrumb/breadcrumb.html +54 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/breadcrumb/breadcrumb.ts +40 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/active-filters.html +23 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/active-filters.ts +78 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-filter.html +18 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-filter.ts +137 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-range-filter.html +11 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/date-range-filter.ts +69 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/filter-field-wrapper.html +11 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/filter-field-wrapper.ts +36 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/multi-select-filter.html +10 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/multi-select-filter.ts +58 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/numeric-range-filter.html +22 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/numeric-range-filter.ts +146 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/search-filter.html +8 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/search-filter.ts +82 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/select-filter.html +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/select-filter.ts +65 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/text-filter.html +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/filters/text-filter.ts +90 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/object-search-state.service.ts +232 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/pagination/pagination.html +8 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/pagination/pagination.ts +61 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/search-bar/search-bar.html +59 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/search-bar/search-bar.ts +108 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/sort-control/sort-control.html +50 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/sort-control/sort-control.ts +72 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/debounce.ts +31 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/field-utils.ts +54 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/filter-utils.ts +354 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/index.ts +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/features/object-search/utils/sort-utils.ts +46 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.html +164 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.scss +7 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/account-detail/account-detail-page.ts +196 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/account-search/account-search-page.html +111 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/account-search/account-search-page.ts +217 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/home/home-page.html +18 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/home/home-page.ts +47 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.html +6 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.spec.ts +23 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/home/home.ts +13 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.html +12 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.spec.ts +33 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/pages/not-found/not-found.ts +15 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/types/conversation.ts +55 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/types/globals.d.ts +13 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/app/utils/async-data.ts +99 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/index.html +14 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/index.ts +15 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/main.ts +5 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/styles.scss +170 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/theme.scss +39 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/src/types/sf-globals.d.ts +9 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/tsconfig.app.json +11 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/tsconfig.json +33 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/tsconfig.spec.json +10 -0
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/ui-bundle.json +7 -0
- package/lib/templates/project/angularintapp/_p_/_m_/applications/angularintapp.app-meta.xml +17 -0
- package/lib/templates/project/angularintapp/_p_/_m_/permissionsets/angularintapp_Access.permissionset-meta.xml +13 -0
- package/lib/templates/project/angularintapp/config/project-scratch-def.json +13 -0
- package/lib/templates/project/angularintapp/eslint.config.js +7 -0
- package/lib/templates/project/angularintapp/jest.config.js +6 -0
- package/lib/templates/project/angularintapp/package.json +46 -0
- package/lib/templates/project/angularintapp/scripts/apex/hello.apex +10 -0
- package/lib/templates/project/angularintapp/scripts/gitignore-templates.json +4 -0
- package/lib/templates/project/angularintapp/scripts/graphql-search.sh +191 -0
- package/lib/templates/project/angularintapp/scripts/org-setup-config-schema.mjs +103 -0
- package/lib/templates/project/angularintapp/scripts/org-setup-dev.mjs +87 -0
- package/lib/templates/project/angularintapp/scripts/org-setup-utils.mjs +369 -0
- package/lib/templates/project/angularintapp/scripts/org-setup-xml.mjs +182 -0
- package/lib/templates/project/angularintapp/scripts/org-setup.config.json +9 -0
- package/lib/templates/project/angularintapp/scripts/org-setup.mjs +1702 -0
- package/lib/templates/project/angularintapp/scripts/sf-project-setup.mjs +103 -0
- package/lib/templates/project/angularintapp/scripts/soql/account.soql +6 -0
- package/lib/templates/project/angularintapp/scripts/validate-org-setup-config.mjs +38 -0
- package/lib/templates/project/angularintapp/sfdx-project.json +12 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/package-lock.json +864 -807
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/package-lock.json +857 -800
- package/lib/templates/uiBundles/angularbasic/angular.json +11 -7
- package/lib/templates/uiBundles/angularbasic/eslint.config.js +4 -0
- package/lib/templates/uiBundles/angularbasic/package-lock.json +351 -319
- package/lib/templates/uiBundles/angularbasic/package.json +4 -0
- package/lib/templates/uiBundles/angularbasic/src/app/api/data-client.service.spec.ts +184 -0
- package/lib/templates/uiBundles/angularbasic/src/app/api/data-client.service.ts +74 -0
- package/lib/templates/uiBundles/angularbasic/src/app/app.config.ts +15 -1
- package/lib/templates/uiBundles/angularbasic/src/app/app.routes.ts +6 -1
- package/lib/templates/uiBundles/angularbasic/src/app/app.ts +7 -2
- package/lib/templates/uiBundles/angularbasic/src/app/{layout → components/layout/app-layout}/app-layout.component.html +2 -1
- package/lib/templates/uiBundles/angularbasic/src/app/{layout → components/layout/app-layout}/app-layout.component.ts +9 -3
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/_field-size.scss +42 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/alert/alert.component.html +31 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/alert/alert.component.ts +53 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/button/button.component.html +18 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/button/button.component.scss +112 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/button/button.component.ts +57 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/card/card.component.scss +34 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/card/card.component.ts +110 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/collapsible/collapsible.component.html +10 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/collapsible/collapsible.component.ts +26 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-picker/date-picker.component.html +25 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-picker/date-picker.component.scss +36 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-picker/date-picker.component.ts +41 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-range-picker/date-range-picker.component.html +34 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-range-picker/date-range-picker.component.scss +33 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/date-range-picker/date-range-picker.component.ts +66 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/dialog/dialog.component.html +37 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/dialog/dialog.component.ts +55 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/field/field.component.html +21 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/field/field.component.ts +36 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/field-size.ts +8 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/input/input.component.html +19 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/input/input.component.scss +35 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/input/input.component.ts +36 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/label/label.component.html +3 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/label/label.component.ts +17 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/paginator/paginator.component.html +10 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/paginator/paginator.component.ts +37 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/popover/popover.component.html +41 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/popover/popover.component.ts +40 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/select/select.component.html +24 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/select/select.component.scss +35 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/select/select.component.ts +72 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/separator/separator.component.html +1 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/separator/separator.component.scss +23 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/separator/separator.component.ts +56 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/skeleton/skeleton.component.html +1 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/skeleton/skeleton.component.scss +28 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/skeleton/skeleton.component.ts +24 -0
- package/lib/templates/uiBundles/angularbasic/src/app/components/ui/spinner/spinner.component.ts +35 -0
- package/lib/templates/uiBundles/angularbasic/src/app/pages/home/home.component.ts +7 -1
- package/lib/templates/uiBundles/angularbasic/src/app/pages/not-found/not-found.component.ts +7 -1
- package/lib/templates/uiBundles/angularbasic/src/app/utils/async-data.ts +99 -0
- package/lib/templates/uiBundles/angularbasic/src/index.html +1 -0
- package/lib/templates/uiBundles/angularbasic/src/styles.scss +170 -0
- package/lib/templates/uiBundles/angularbasic/src/theme.scss +39 -0
- package/lib/templates/uiBundles/reactbasic/package-lock.json +857 -800
- package/lib/utils/types.d.ts +1 -1
- package/lib/utils/uiBundleTemplateUtils.js +10 -0
- package/lib/utils/uiBundleTemplateUtils.js.map +1 -1
- package/package.json +5 -3
- package/lib/templates/uiBundles/angularbasic/src/app/api/graphql-client.service.ts +0 -48
- package/lib/templates/uiBundles/angularbasic/src/app/app.css +0 -0
- package/lib/templates/uiBundles/angularbasic/src/styles.css +0 -12
- /package/lib/templates/uiBundles/angularbasic/src/app/{layout → components/layout/app-layout}/app-layout.component.spec.ts +0 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for the org-setup scripts (W-23043735, spec §5.2/§5.6/Q9).
|
|
3
|
+
*
|
|
4
|
+
* Factored out of org-setup.mjs so BOTH `org-setup.mjs` and `org-setup-dev.mjs` import the
|
|
5
|
+
* same primitives instead of duplicating them:
|
|
6
|
+
* - process runners (`run`, `runAsync`, `spawnAsync`)
|
|
7
|
+
* - SFDX path + UI-bundle discovery (`resolveSfdxSource`, `discoverAllUIBundleDirs`,
|
|
8
|
+
* `discoverUIBundleDir` — with the multi-bundle acknowledgment of §5.1 item 2)
|
|
9
|
+
* - the interactive `--target-org` fallback (`resolveTargetOrg`) and its
|
|
10
|
+
* single-select picker (`promptSelect`)
|
|
11
|
+
* - pure, unit-testable logic for the license gate, SOQL-name validation, org-list
|
|
12
|
+
* parsing, and the non-TTY multi-bundle warning
|
|
13
|
+
*
|
|
14
|
+
* IMPORTANT: this module is side-effect-free at import time — no top-level
|
|
15
|
+
* readFileSync / process.exit / CLI run — so it can be imported by tests and by
|
|
16
|
+
* org-setup-dev.mjs without triggering org-setup's main(). All I/O happens inside the
|
|
17
|
+
* exported functions, only when they are called. Errors are plain `Error`s (not
|
|
18
|
+
* org-setup's StepError) to avoid an import cycle; runStep handles both alike.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { spawnSync } from 'node:child_process';
|
|
22
|
+
import { readdirSync, existsSync, readFileSync } from 'node:fs';
|
|
23
|
+
import { resolve } from 'node:path';
|
|
24
|
+
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
// Pure logic (no I/O) — unit-testable in isolation.
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Validate that a profile name is safe to interpolate into a SOQL `WHERE Name =
|
|
31
|
+
* '<name>'` clause (spec §5.3, Q10 — validate-and-fail, NOT an escaper). The
|
|
32
|
+
* `selfRegProfile` is developer-authored config the app ships, and license /
|
|
33
|
+
* profile names are not expected to contain special characters, so a `'`, `\`,
|
|
34
|
+
* or control char is treated as a config mistake to surface loudly rather than a
|
|
35
|
+
* value to silently escape. Returns the name unchanged when valid; throws a
|
|
36
|
+
* clear config error otherwise. AC-8.
|
|
37
|
+
*/
|
|
38
|
+
export function validateProfileNameForSoql(name) {
|
|
39
|
+
const s = String(name);
|
|
40
|
+
// SOQL string delimiter (') and escape char (\) would break/inject the query;
|
|
41
|
+
// control chars (C0 + DEL) have no legitimate place in a profile name.
|
|
42
|
+
if (/['\\]/.test(s) || /[\x00-\x1f\x7f]/.test(s)) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`selfRegProfile name "${name}" contains an unsupported character ` +
|
|
45
|
+
`(quotes, backslashes, and control characters are not allowed). ` +
|
|
46
|
+
`Fix the profile name in org-setup.config.json.`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return s;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Decide whether the self-reg profile's UserLicense is satisfied, from the rows
|
|
54
|
+
* a `SELECT UserLicense.LicenseDefinitionKey, UserLicense.Name, UserLicense.Status,
|
|
55
|
+
* UserLicense.TotalLicenses, UserLicense.UsedLicenses FROM Profile WHERE Name = '…'`
|
|
56
|
+
* query returns (spec §5.3). The seat math MUST be done here in JS — SOQL cannot
|
|
57
|
+
* compare two fields (Q3, verified live). Matches/report on the stable
|
|
58
|
+
* `LicenseDefinitionKey`, never the display Name (AC-2b).
|
|
59
|
+
*
|
|
60
|
+
* satisfied ⇔ Status === 'Active' && (total === -1 [unlimited sentinel] || total - used > 0).
|
|
61
|
+
* 0 rows / null UserLicense ⇒ not satisfied, with a reason naming the profile.
|
|
62
|
+
*
|
|
63
|
+
* @returns {{ satisfied: boolean, reason: string|null, license: {key,label,status,total,used}|null }}
|
|
64
|
+
*/
|
|
65
|
+
export function evaluateLicenseRows(rows, profileName) {
|
|
66
|
+
const lic = Array.isArray(rows) ? rows[0]?.UserLicense : null;
|
|
67
|
+
if (!lic) {
|
|
68
|
+
return {
|
|
69
|
+
satisfied: false,
|
|
70
|
+
reason: `no UserLicense found for profile "${profileName}" — the profile is missing in the org or its name is misspelled`,
|
|
71
|
+
license: null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const key = lic.LicenseDefinitionKey ?? null;
|
|
75
|
+
const label = lic.Name ?? key ?? 'unknown license';
|
|
76
|
+
const total = Number(lic.TotalLicenses);
|
|
77
|
+
const used = Number(lic.UsedLicenses);
|
|
78
|
+
const license = { key, label, status: lic.Status, total, used };
|
|
79
|
+
|
|
80
|
+
if (lic.Status !== 'Active') {
|
|
81
|
+
return { satisfied: false, reason: `license ${label} (${key}) is not Active (Status=${lic.Status})`, license };
|
|
82
|
+
}
|
|
83
|
+
// Seat counts should always be integers in practice, but guard against a
|
|
84
|
+
// missing/non-numeric field so the skip reason stays legible (not "NaN/NaN").
|
|
85
|
+
if (!Number.isFinite(total) || !Number.isFinite(used)) {
|
|
86
|
+
return { satisfied: false, reason: `could not read seat counts for license ${label} (${key})`, license };
|
|
87
|
+
}
|
|
88
|
+
// -1 is the documented "unlimited" sentinel (defensive — unverified live, §5.3).
|
|
89
|
+
if (total === -1 || total - used > 0) {
|
|
90
|
+
return { satisfied: true, reason: null, license };
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
satisfied: false,
|
|
94
|
+
reason: `license ${label} (${key}) has no available seats (${used}/${total} used)`,
|
|
95
|
+
license,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Parse `sf org list --json` defensively into a flat org list + the default org
|
|
101
|
+
* (spec §5.1 item 3; mirrors isOrgConnected's try/catch tolerance). Collects
|
|
102
|
+
* every array under `result` (nonScratchOrgs, scratchOrgs, sandboxes, devHubs, …)
|
|
103
|
+
* so the picker sees all authenticated orgs; the default is the entry marked
|
|
104
|
+
* `isDefaultUsername`. Malformed / unexpected JSON ⇒ empty result (caller then
|
|
105
|
+
* falls back to the clear error).
|
|
106
|
+
*
|
|
107
|
+
* @returns {{ orgs: Array<{alias:string|null, username:string, isDefault:boolean}>, defaultOrg: string|null }}
|
|
108
|
+
*/
|
|
109
|
+
export function parseOrgList(jsonText) {
|
|
110
|
+
let parsed;
|
|
111
|
+
try {
|
|
112
|
+
parsed = JSON.parse(jsonText);
|
|
113
|
+
} catch {
|
|
114
|
+
return { orgs: [], defaultOrg: null };
|
|
115
|
+
}
|
|
116
|
+
const result = parsed?.result;
|
|
117
|
+
if (!result || typeof result !== 'object') return { orgs: [], defaultOrg: null };
|
|
118
|
+
|
|
119
|
+
const orgs = [];
|
|
120
|
+
const seen = new Set();
|
|
121
|
+
for (const val of Object.values(result)) {
|
|
122
|
+
if (!Array.isArray(val)) continue;
|
|
123
|
+
for (const entry of val) {
|
|
124
|
+
if (!entry || typeof entry !== 'object' || !entry.username) continue;
|
|
125
|
+
if (seen.has(entry.username)) continue;
|
|
126
|
+
seen.add(entry.username);
|
|
127
|
+
orgs.push({
|
|
128
|
+
alias: entry.alias ?? null,
|
|
129
|
+
username: entry.username,
|
|
130
|
+
isDefault: entry.isDefaultUsername === true,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const def = orgs.find((o) => o.isDefault);
|
|
135
|
+
return { orgs, defaultOrg: def ? (def.alias ?? def.username) : null };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Multi-line warning for the non-TTY multi-bundle case (spec §5.1 item 2, AC-4b):
|
|
140
|
+
* there is nothing to interactively acknowledge, so keep the deterministic
|
|
141
|
+
* `all[0]` pick but never do it silently — name every bundle, the chosen one, and
|
|
142
|
+
* the `--ui-bundle-name` remedy.
|
|
143
|
+
*/
|
|
144
|
+
export function buildMultiBundleWarning(allBundleNames, chosen) {
|
|
145
|
+
return [
|
|
146
|
+
`⚠ Multiple UI bundles found under uiBundles/ (${allBundleNames.length}):`,
|
|
147
|
+
...allBundleNames.map((n) => ` - ${n}${n === chosen ? ' ← using this one' : ''}`),
|
|
148
|
+
` Using "${chosen}" (first alphabetically). To deploy a different bundle, re-run with:`,
|
|
149
|
+
` --ui-bundle-name <name>`,
|
|
150
|
+
].join('\n');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ---------------------------------------------------------------------------
|
|
154
|
+
// Process runner (moved from org-setup.mjs; plain Error to avoid an import cycle).
|
|
155
|
+
// Only the synchronous `run` is shared — org-setup-dev.mjs runs its steps serially. The
|
|
156
|
+
// async spawn variants stay local to org-setup.mjs where the parallel permset
|
|
157
|
+
// path uses them, so this module exposes no caller-less surface.
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
|
|
160
|
+
export function run(name, cmd, args, opts = {}) {
|
|
161
|
+
const { cwd = process.cwd(), optional = false } = opts;
|
|
162
|
+
console.log('\n---', name, '---');
|
|
163
|
+
const result = spawnSync(cmd, args, {
|
|
164
|
+
cwd,
|
|
165
|
+
stdio: 'inherit',
|
|
166
|
+
shell: true,
|
|
167
|
+
...(opts.env && { env: opts.env }),
|
|
168
|
+
...(opts.timeout && { timeout: opts.timeout }),
|
|
169
|
+
});
|
|
170
|
+
if (result.status !== 0 && !optional) {
|
|
171
|
+
throw new Error(`${name} (exit ${result.status ?? 1})`);
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ---------------------------------------------------------------------------
|
|
177
|
+
// SFDX paths + UI-bundle discovery.
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Resolve the first package directory's source root (main/default) from
|
|
182
|
+
* sfdx-project.json under `root`. Exits non-zero with a clear message when the
|
|
183
|
+
* project file or packageDirectories path is missing. Called explicitly by each
|
|
184
|
+
* entry script (not at import) so this module stays side-effect-free.
|
|
185
|
+
*/
|
|
186
|
+
export function resolveSfdxSource(root) {
|
|
187
|
+
const sfdxPath = resolve(root, 'sfdx-project.json');
|
|
188
|
+
if (!existsSync(sfdxPath)) {
|
|
189
|
+
console.error('Error: sfdx-project.json not found at project root.');
|
|
190
|
+
process.exit(1);
|
|
191
|
+
}
|
|
192
|
+
const sfdxProject = JSON.parse(readFileSync(sfdxPath, 'utf8'));
|
|
193
|
+
const pkgDir = sfdxProject?.packageDirectories?.[0]?.path;
|
|
194
|
+
if (!pkgDir) {
|
|
195
|
+
console.error('Error: No packageDirectories[].path found in sfdx-project.json.');
|
|
196
|
+
process.exit(1);
|
|
197
|
+
}
|
|
198
|
+
return resolve(root, pkgDir, 'main', 'default');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Basename of a bundle dir path, cross-platform. */
|
|
202
|
+
function bundleName(dir) {
|
|
203
|
+
return dir.split(/[/\\]/).pop();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* All UI bundle directories under `uiBundlesDir` (alphabetical, hidden dirs
|
|
208
|
+
* excluded). When `uiBundleName` is given, returns just that one (erroring if it
|
|
209
|
+
* doesn't exist). Exits non-zero when the uiBundles dir or a named bundle is
|
|
210
|
+
* missing.
|
|
211
|
+
*/
|
|
212
|
+
export function discoverAllUIBundleDirs(uiBundlesDir, uiBundleName) {
|
|
213
|
+
if (!existsSync(uiBundlesDir)) {
|
|
214
|
+
console.error(`Error: uiBundles directory not found: ${uiBundlesDir}`);
|
|
215
|
+
process.exit(1);
|
|
216
|
+
}
|
|
217
|
+
const entries = readdirSync(uiBundlesDir, { withFileTypes: true });
|
|
218
|
+
const dirs = entries.filter((e) => e.isDirectory() && !e.name.startsWith('.'));
|
|
219
|
+
if (dirs.length === 0) {
|
|
220
|
+
console.error(`Error: No UI bundle folder found under ${uiBundlesDir}`);
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
if (uiBundleName) {
|
|
224
|
+
const requested = dirs.find((d) => d.name === uiBundleName);
|
|
225
|
+
if (!requested) {
|
|
226
|
+
console.error(`Error: UI bundle directory not found: ${uiBundleName}`);
|
|
227
|
+
process.exit(1);
|
|
228
|
+
}
|
|
229
|
+
return [resolve(uiBundlesDir, requested.name)];
|
|
230
|
+
}
|
|
231
|
+
return dirs.map((d) => resolve(uiBundlesDir, d.name));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Resolve the single UI bundle to operate on, with the multi-bundle
|
|
236
|
+
* acknowledgment of spec §5.1 item 2 (Q5). When >1 bundle exists and no
|
|
237
|
+
* `--ui-bundle-name` was given:
|
|
238
|
+
* - TTY: present a single-select picker (all bundles, alphabetical all[0]
|
|
239
|
+
* preselected) — enter accepts all[0], arrows choose another (AC-4).
|
|
240
|
+
* - non-TTY: keep the deterministic all[0] pick but emit the multi-line warning
|
|
241
|
+
* (AC-4b) — never a silent pick.
|
|
242
|
+
* Explicit `--ui-bundle-name` short-circuits both (no prompt, no warning; AC-4c).
|
|
243
|
+
*/
|
|
244
|
+
export async function discoverUIBundleDir(uiBundlesDir, uiBundleName) {
|
|
245
|
+
const all = discoverAllUIBundleDirs(uiBundlesDir, uiBundleName);
|
|
246
|
+
if (all.length > 1 && !uiBundleName) {
|
|
247
|
+
const names = all.map(bundleName);
|
|
248
|
+
if (process.stdin.isTTY) {
|
|
249
|
+
const idx = await promptSelect(names, {
|
|
250
|
+
prompt: 'Multiple UI bundles found — select which one to deploy:',
|
|
251
|
+
preselectedIndex: 0,
|
|
252
|
+
});
|
|
253
|
+
return all[idx];
|
|
254
|
+
}
|
|
255
|
+
console.warn(buildMultiBundleWarning(names, names[0]));
|
|
256
|
+
}
|
|
257
|
+
return all[0];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// ---------------------------------------------------------------------------
|
|
261
|
+
// Interactive single-select picker + --target-org fallback.
|
|
262
|
+
// ---------------------------------------------------------------------------
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Interactive single-select: arrow keys navigate, enter confirms. Returns the
|
|
266
|
+
* chosen index. Falls through to `preselectedIndex` immediately when stdin is not
|
|
267
|
+
* a TTY. Built on the same raw-mode scaffolding as promptSteps (org-setup.mjs)
|
|
268
|
+
* but selects exactly one item (spec §5.1 items 2 & 3).
|
|
269
|
+
*/
|
|
270
|
+
export function promptSelect(options, { prompt = 'Select an option:', preselectedIndex = 0 } = {}) {
|
|
271
|
+
if (!process.stdin.isTTY || options.length === 0) return Promise.resolve(preselectedIndex);
|
|
272
|
+
|
|
273
|
+
let cursor = Math.min(Math.max(0, preselectedIndex), options.length - 1);
|
|
274
|
+
const RST = '\x1B[0m';
|
|
275
|
+
const CYAN = '\x1B[36m';
|
|
276
|
+
const GREEN = '\x1B[32m';
|
|
277
|
+
|
|
278
|
+
function render() {
|
|
279
|
+
return options.map((label, row) => {
|
|
280
|
+
const ptr = row === cursor ? `${CYAN}❯${RST}` : ' ';
|
|
281
|
+
const chk = row === cursor ? `${GREEN}●${RST}` : '○';
|
|
282
|
+
return `${ptr} ${chk} ${label}`;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return new Promise((resolvePromise) => {
|
|
287
|
+
process.stdin.setRawMode(true);
|
|
288
|
+
process.stdin.resume();
|
|
289
|
+
process.stdin.setEncoding('utf8');
|
|
290
|
+
process.stdout.write('\x1B[?25l');
|
|
291
|
+
console.log(`\n${prompt} (↑↓ move, enter confirm):\n`);
|
|
292
|
+
let prevRows = options.length;
|
|
293
|
+
process.stdout.write(render().join('\n') + '\n');
|
|
294
|
+
|
|
295
|
+
function redraw() {
|
|
296
|
+
process.stdout.write(`\x1B[${prevRows}A`);
|
|
297
|
+
const lines = render();
|
|
298
|
+
for (const line of lines) process.stdout.write(`\x1B[2K${line}\n`);
|
|
299
|
+
prevRows = lines.length;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
process.stdin.on('data', (key) => {
|
|
303
|
+
if (key === '\x03') {
|
|
304
|
+
process.stdout.write('\x1B[?25h\n');
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
if (key === '\r' || key === '\n') {
|
|
308
|
+
process.stdout.write('\x1B[?25h');
|
|
309
|
+
process.stdin.setRawMode(false);
|
|
310
|
+
process.stdin.pause();
|
|
311
|
+
process.stdin.removeAllListeners('data');
|
|
312
|
+
console.log();
|
|
313
|
+
resolvePromise(cursor);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
if (key === '\x1B[A' || key === 'k') {
|
|
317
|
+
cursor = Math.max(0, cursor - 1);
|
|
318
|
+
redraw();
|
|
319
|
+
} else if (key === '\x1B[B' || key === 'j') {
|
|
320
|
+
cursor = Math.min(options.length - 1, cursor + 1);
|
|
321
|
+
redraw();
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Resolve the target org (spec §5.1 item 3, §15). When `--target-org` is supplied
|
|
329
|
+
* it is returned verbatim with NO `sf org list` call (AC-7, byte-for-byte the
|
|
330
|
+
* scripted path). Otherwise discover authenticated orgs via `sf org list --json`
|
|
331
|
+
* and:
|
|
332
|
+
* - TTY: present a picker with the default org at the top and preselected
|
|
333
|
+
* (AC-5); enter selects the default.
|
|
334
|
+
* - non-TTY: use the default org if resolvable, else exit 1 with a clear
|
|
335
|
+
* message (AC-6).
|
|
336
|
+
*/
|
|
337
|
+
export async function resolveTargetOrg(parsed) {
|
|
338
|
+
if (parsed.targetOrg) return parsed.targetOrg;
|
|
339
|
+
|
|
340
|
+
const listResult = spawnSync('sf', ['org', 'list', '--json'], {
|
|
341
|
+
encoding: 'utf8',
|
|
342
|
+
shell: true,
|
|
343
|
+
});
|
|
344
|
+
const { orgs, defaultOrg } = parseOrgList(listResult.status === 0 ? listResult.stdout : '');
|
|
345
|
+
|
|
346
|
+
if (process.stdin.isTTY && orgs.length > 0) {
|
|
347
|
+
// Default org first + preselected; the rest keep sf's order.
|
|
348
|
+
const ordered = [...orgs].sort((a, b) => (b.isDefault ? 1 : 0) - (a.isDefault ? 1 : 0));
|
|
349
|
+
const labels = ordered.map((o) => {
|
|
350
|
+
const name = o.alias ?? o.username;
|
|
351
|
+
const suffix = o.alias && o.alias !== o.username ? ` (${o.username})` : '';
|
|
352
|
+
return `${name}${suffix}${o.isDefault ? ' [default]' : ''}`;
|
|
353
|
+
});
|
|
354
|
+
const idx = await promptSelect(labels, { prompt: 'Select the target org:', preselectedIndex: 0 });
|
|
355
|
+
const chosen = ordered[idx];
|
|
356
|
+
return chosen.alias ?? chosen.username;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (defaultOrg) {
|
|
360
|
+
console.log(`No --target-org given; using the default org: ${defaultOrg}`);
|
|
361
|
+
return defaultOrg;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
console.error(
|
|
365
|
+
'Error: --target-org <alias> is required. No default org is set and this is not an ' +
|
|
366
|
+
'interactive terminal. Set a default org (sf config set target-org=<alias>) or pass --target-org.',
|
|
367
|
+
);
|
|
368
|
+
process.exit(1);
|
|
369
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure, importable XML helpers for org-setup.mjs network-metadata mutation
|
|
3
|
+
* (W-23043734 — Infrastructure Hygiene).
|
|
4
|
+
*
|
|
5
|
+
* These functions replace the script's former blind-regex editing of
|
|
6
|
+
* `*.network-meta.xml`. The contract is:
|
|
7
|
+
*
|
|
8
|
+
* 1. Parse the XML with `fast-xml-parser` ONLY to assert the expected nodes
|
|
9
|
+
* exist — this kills the old silent no-op (the regex matched nothing on a
|
|
10
|
+
* reformatted file yet the file was still rewritten + success logged).
|
|
11
|
+
* 2. Decide idempotency on the parsed model (profile already a member, self-reg
|
|
12
|
+
* already enabled) so callers keep their existing skip semantics + messages.
|
|
13
|
+
* 3. Mutate via a TARGETED string edit on the original text — NOT a full
|
|
14
|
+
* re-serialize. The XML declaration, the `xmlns` on <Network>,
|
|
15
|
+
* self-closing tags, and the file's existing indentation are preserved
|
|
16
|
+
* byte-for-byte, so a configured file re-run is a true no-op and there is
|
|
17
|
+
* zero deploy-diff hazard on this org-deployed file. (XMLBuilder/prettier
|
|
18
|
+
* are intentionally NOT used — a full re-serialize would churn formatting.)
|
|
19
|
+
* Profile names are asserted free of XML-special characters and interpolated
|
|
20
|
+
* raw — we reject such names rather than entity-escape them (a special
|
|
21
|
+
* character in a config-authored profile name signals a mistake).
|
|
22
|
+
*
|
|
23
|
+
* Pure (no fs / no process): org-setup.mjs reads/writes the file and owns the
|
|
24
|
+
* per-call-site fail mode (throw StepError vs. loud console.error); these
|
|
25
|
+
* helpers only parse, assert, and return the edited text. Kept in a dedicated
|
|
26
|
+
* module so they carry automated coverage: the shipped SFDX package has no test
|
|
27
|
+
* runner, so the specs live in the consuming ui-bundle-template-cli package
|
|
28
|
+
* (patches-cli/test/unit/org-setup-xml.spec.ts) rather than bundling into every
|
|
29
|
+
* generated app's dist/scripts.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
33
|
+
|
|
34
|
+
const NETWORK_ROOT = 'Network';
|
|
35
|
+
|
|
36
|
+
/** Parser tuned to read the document faithfully: keep attributes, never coerce
|
|
37
|
+
* values (so `<selfRegistration>false</...>` stays the string "false"). */
|
|
38
|
+
const parser = new XMLParser({
|
|
39
|
+
ignoreAttributes: false,
|
|
40
|
+
parseTagValue: false,
|
|
41
|
+
parseAttributeValue: false,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Thrown when a required node is absent from the network metadata. Callers map
|
|
46
|
+
* this to the fail mode appropriate to their orchestration position: the
|
|
47
|
+
* post-deploy selfReg step rethrows it as a recorded StepError; the best-effort
|
|
48
|
+
* pre-deploy prep logs it loudly without aborting.
|
|
49
|
+
*/
|
|
50
|
+
export class NetworkXmlError extends Error {}
|
|
51
|
+
|
|
52
|
+
/** Characters that would need XML entity-escaping if interpolated into markup. */
|
|
53
|
+
const XML_SPECIAL_CHARS = /[&<>"']/;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Assert a profile name is safe to interpolate into the network metadata as-is.
|
|
57
|
+
*
|
|
58
|
+
* We deliberately do NOT entity-escape: a self-reg profile name is authored in
|
|
59
|
+
* `org-setup.config.json`, and one containing `&`, `<`, `>`, or quotes almost
|
|
60
|
+
* certainly signals a config mistake rather than a genuine name. Rather than
|
|
61
|
+
* silently rewrite it into `&`-style entities, fail loudly so the author
|
|
62
|
+
* fixes the config. Throws NetworkXmlError (mapped by callers to their fail
|
|
63
|
+
* mode) when the name contains an XML-special character.
|
|
64
|
+
*/
|
|
65
|
+
export function assertSafeProfileName(name) {
|
|
66
|
+
if (XML_SPECIAL_CHARS.test(String(name))) {
|
|
67
|
+
throw new NetworkXmlError(
|
|
68
|
+
`profile name "${name}" contains an XML-special character (& < > " '); ` +
|
|
69
|
+
`use a name without these characters in org-setup.config.json`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return String(name);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Parse + assert this is a Network metadata document. Returns the parsed
|
|
77
|
+
* `Network` object. Throws NetworkXmlError if the root is missing (e.g. a file
|
|
78
|
+
* that is not actually network metadata).
|
|
79
|
+
*/
|
|
80
|
+
export function parseNetwork(xml) {
|
|
81
|
+
let parsed;
|
|
82
|
+
try {
|
|
83
|
+
parsed = parser.parse(xml);
|
|
84
|
+
} catch (e) {
|
|
85
|
+
throw new NetworkXmlError(`network metadata is not well-formed XML: ${e.message}`);
|
|
86
|
+
}
|
|
87
|
+
const network = parsed?.[NETWORK_ROOT];
|
|
88
|
+
if (network == null || typeof network !== 'object') {
|
|
89
|
+
throw new NetworkXmlError(`expected a <${NETWORK_ROOT}> root node, but none was found`);
|
|
90
|
+
}
|
|
91
|
+
return network;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Normalize a fast-xml-parser child (absent | scalar | array) to an array. */
|
|
95
|
+
function asArray(node) {
|
|
96
|
+
if (node == null) return [];
|
|
97
|
+
return Array.isArray(node) ? node : [node];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Indentation for a new <networkMemberGroups> child, derived from the file's
|
|
102
|
+
* own formatting rather than a fixed width — so the targeted edit stays
|
|
103
|
+
* byte-faithful on reformatted (e.g. 2-space) files, not just the shipped
|
|
104
|
+
* 4-space template. Prefer an existing
|
|
105
|
+
* sibling <profile>'s exact indent; otherwise fall back to the
|
|
106
|
+
* <networkMemberGroups> indent doubled (it is always a direct child of the
|
|
107
|
+
* <Network> root, i.e. one level deep).
|
|
108
|
+
*/
|
|
109
|
+
function memberGroupChildIndent(xml) {
|
|
110
|
+
const sibling = xml.match(/\n([ \t]+)<profile>/);
|
|
111
|
+
if (sibling) return sibling[1];
|
|
112
|
+
const parent = xml.match(/\n([ \t]*)<networkMemberGroups>/);
|
|
113
|
+
const parentIndent = parent ? parent[1] : ' ';
|
|
114
|
+
return parentIndent + (parentIndent || ' ');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Ensure `selfRegProfile` is listed under <networkMemberGroups>.
|
|
119
|
+
*
|
|
120
|
+
* Asserts <networkMemberGroups> exists (throws NetworkXmlError if not). Returns
|
|
121
|
+
* `{ xml, changed }`: `changed: false` (input returned unchanged) when the
|
|
122
|
+
* profile is already a member; otherwise the profile is inserted via a targeted
|
|
123
|
+
* edit right after the opening <networkMemberGroups> tag and `changed: true`.
|
|
124
|
+
*/
|
|
125
|
+
export function addProfileToMemberGroups(xml, selfRegProfile) {
|
|
126
|
+
const network = parseNetwork(xml);
|
|
127
|
+
if (!('networkMemberGroups' in network) || network.networkMemberGroups == null) {
|
|
128
|
+
throw new NetworkXmlError(
|
|
129
|
+
'network metadata has no <networkMemberGroups> node to add the self-reg profile to',
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
const existing = asArray(network.networkMemberGroups.profile).map((p) => String(p));
|
|
133
|
+
if (existing.includes(String(selfRegProfile))) {
|
|
134
|
+
return { xml, changed: false };
|
|
135
|
+
}
|
|
136
|
+
// Reject names with XML-special characters rather than escaping them (see
|
|
137
|
+
// assertSafeProfileName) before interpolating raw.
|
|
138
|
+
const safeName = assertSafeProfileName(selfRegProfile);
|
|
139
|
+
// Targeted edit: insert after the open tag, matching the file's own member
|
|
140
|
+
// indent (preserves formatting on reformatted files).
|
|
141
|
+
const indent = memberGroupChildIndent(xml);
|
|
142
|
+
const updated = xml.replace(
|
|
143
|
+
/(<networkMemberGroups>)/,
|
|
144
|
+
`$1\n${indent}<profile>${safeName}</profile>`,
|
|
145
|
+
);
|
|
146
|
+
return { xml: updated, changed: true };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Enable self-registration: set <selfRegistration>true</selfRegistration> and
|
|
151
|
+
* add <selfRegProfile>.
|
|
152
|
+
*
|
|
153
|
+
* Asserts <selfRegistration> exists (throws NetworkXmlError if not). Returns
|
|
154
|
+
* `{ xml, changed }`: `changed: false` (input returned unchanged) when self-reg
|
|
155
|
+
* is already enabled or a selfRegProfile is already present — same skip
|
|
156
|
+
* semantics as before; otherwise applies a targeted edit and `changed: true`.
|
|
157
|
+
*/
|
|
158
|
+
export function enableSelfRegInXml(xml, selfRegProfile) {
|
|
159
|
+
const network = parseNetwork(xml);
|
|
160
|
+
if (!('selfRegistration' in network)) {
|
|
161
|
+
throw new NetworkXmlError(
|
|
162
|
+
'network metadata has no <selfRegistration> node to enable self-registration on',
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
const alreadyEnabled = String(network.selfRegistration) === 'true';
|
|
166
|
+
const alreadyHasProfile = 'selfRegProfile' in network;
|
|
167
|
+
if (alreadyEnabled || alreadyHasProfile) {
|
|
168
|
+
return { xml, changed: false };
|
|
169
|
+
}
|
|
170
|
+
// Reject names with XML-special characters rather than escaping them (see
|
|
171
|
+
// assertSafeProfileName) before interpolating raw.
|
|
172
|
+
const safeName = assertSafeProfileName(selfRegProfile);
|
|
173
|
+
let updated = xml.replace(
|
|
174
|
+
/<selfRegistration>false<\/selfRegistration>/,
|
|
175
|
+
'<selfRegistration>true</selfRegistration>',
|
|
176
|
+
);
|
|
177
|
+
updated = updated.replace(
|
|
178
|
+
/(\s*)(<selfRegistration>)/,
|
|
179
|
+
`$1<selfRegProfile>${safeName}</selfRegProfile>\n$1$2`,
|
|
180
|
+
);
|
|
181
|
+
return { xml: updated, changed: true };
|
|
182
|
+
}
|