@salesforce/templates 66.3.0 → 66.3.2
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/templates/flexipage/RecordPage/_flexipage.flexipage-meta.xml +0 -24
- package/lib/templates/project/reactb2e/.a4drules/{graphql.md → features/feature-graphql-graphql-data-access-rule.md} +186 -125
- package/lib/templates/project/reactb2e/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +32 -0
- package/lib/templates/project/reactb2e/.a4drules/features/feature-react-chart-analytics-charts-rule.md +27 -0
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/SKILL.md +155 -0
- package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/explore-schema.md} +58 -29
- package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md} +52 -42
- package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md} +32 -22
- package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/schemas/shared.graphqls → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls} +1 -1
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-micro-frontend-micro-frontend/SKILL.md +137 -0
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/SKILL.md +108 -0
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/docs/embed-examples.md +182 -0
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-chart-analytics-charts/SKILL.md +41 -0
- package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +4 -0
- package/lib/templates/project/reactb2e/.a4drules/webapp-code-quality.md +136 -0
- package/lib/templates/project/reactb2e/.a4drules/{images.md → webapp-images.md} +6 -4
- package/lib/templates/project/reactb2e/.a4drules/webapp-no-node-e.md +3 -2
- package/lib/templates/project/reactb2e/.a4drules/webapp-react.md +149 -0
- package/lib/templates/project/reactb2e/.a4drules/{typescript.md → webapp-typescript.md} +10 -29
- package/lib/templates/project/reactb2e/.a4drules/webapp.md +60 -45
- package/lib/templates/project/reactb2e/AGENT.md +1 -1
- package/lib/templates/project/reactb2e/CHANGELOG.md +377 -0
- package/lib/templates/project/reactb2e/README.md +38 -4
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/CHANGELOG.md +10 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/README.md +35 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package.json +17 -7
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +76 -10
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/__inherit_AgentforceConversationClient.tsx +3 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/alerts/status-alert.tsx +49 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layouts/card-layout.tsx +29 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/alert.tsx +76 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/button.tsx +67 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/card.tsx +103 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/dialog.tsx +162 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/field.tsx +237 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/index.ts +84 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/input.tsx +19 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/label.tsx +22 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/pagination.tsx +132 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/select.tsx +193 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/separator.tsx +26 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/skeleton.tsx +14 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/spinner.tsx +16 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/table.tsx +114 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/tabs.tsx +88 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components.json +18 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/constants.ts +39 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/index.ts +19 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectDetailService.ts +125 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectInfoGraphQLService.ts +194 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectInfoService.ts +199 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/recordListGraphQLService.ts +365 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailFields.tsx +55 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailForm.tsx +146 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailHeader.tsx +34 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailLayoutSections.tsx +80 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/Section.tsx +108 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/SectionRow.tsx +20 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/UiApiDetailForm.tsx +140 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FieldValueDisplay.tsx +73 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedAddress.tsx +29 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedEmail.tsx +17 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedPhone.tsx +24 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedText.tsx +11 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedUrl.tsx +29 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/index.ts +6 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterField.tsx +54 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterInput.tsx +55 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterSelect.tsx +72 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FiltersPanel.tsx +380 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/forms/filters-form.tsx +114 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/forms/submit-button.tsx +47 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/GlobalSearchInput.tsx +114 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/ResultCardFields.tsx +71 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchHeader.tsx +31 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchPagination.tsx +144 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchResultCard.tsx +136 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchResultsPanel.tsx +197 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/shared/LoadingFallback.tsx +61 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/filters/FilterInput.tsx +55 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/filters/FilterSelect.tsx +72 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/form.tsx +209 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/index.ts +22 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useObjectInfoBatch.ts +65 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useObjectSearchData.ts +395 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useRecordDetailLayout.ts +156 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useRecordListGraphQL.ts +135 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/pages/DetailPage.tsx +109 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/pages/GlobalSearch.tsx +229 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/filters/filters.ts +120 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/filters/picklist.ts +32 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/index.ts +4 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/objectInfo/objectInfo.ts +166 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/recordDetail/recordDetail.ts +61 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/search/searchResults.ts +229 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/apiUtils.ts +125 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/cacheUtils.ts +76 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/debounce.ts +89 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/fieldUtils.ts +354 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/fieldValueExtractor.ts +67 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/filterUtils.ts +32 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/formDataTransformUtils.ts +260 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/formUtils.ts +142 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLNodeFieldUtils.ts +186 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLObjectInfoAdapter.ts +319 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLRecordAdapter.ts +90 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/index.ts +59 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/layoutTransformUtils.ts +236 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/linkUtils.ts +14 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/paginationUtils.ts +49 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/recordUtils.ts +159 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/sanitizationUtils.ts +49 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/lib/utils.ts +6 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +11 -10
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/TestAccPage.tsx +19 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +28 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +122 -0
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +2 -1
- package/lib/templates/project/reactb2e/package.json +1 -1
- package/lib/templates/project/reactb2x/.a4drules/{graphql.md → features/feature-graphql-graphql-data-access-rule.md} +186 -125
- package/lib/templates/project/reactb2x/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +32 -0
- package/lib/templates/project/reactb2x/.a4drules/features/feature-react-chart-analytics-charts-rule.md +27 -0
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/SKILL.md +155 -0
- package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/explore-schema.md} +58 -29
- package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md} +52 -42
- package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md} +32 -22
- package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/schemas/shared.graphqls → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls} +1 -1
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-micro-frontend-micro-frontend/SKILL.md +137 -0
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/SKILL.md +108 -0
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/docs/embed-examples.md +182 -0
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-chart-analytics-charts/SKILL.md +41 -0
- package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +4 -0
- package/lib/templates/project/reactb2x/.a4drules/webapp-code-quality.md +136 -0
- package/lib/templates/project/reactb2x/.a4drules/{images.md → webapp-images.md} +6 -4
- package/lib/templates/project/reactb2x/.a4drules/webapp-no-node-e.md +3 -2
- package/lib/templates/project/reactb2x/.a4drules/webapp-react.md +149 -0
- package/lib/templates/project/reactb2x/.a4drules/{typescript.md → webapp-typescript.md} +10 -29
- package/lib/templates/project/reactb2x/.a4drules/webapp.md +60 -45
- package/lib/templates/project/reactb2x/AGENT.md +1 -1
- package/lib/templates/project/reactb2x/CHANGELOG.md +377 -0
- package/lib/templates/project/reactb2x/README.md +58 -4
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/CHANGELOG.md +10 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/README.md +35 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package.json +8 -7
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +75 -3
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +36 -32
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layouts/card-layout.tsx +29 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +61 -54
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +57 -57
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +86 -75
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +129 -110
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +208 -193
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +65 -53
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +14 -14
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +17 -14
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +108 -88
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +156 -146
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +19 -19
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +10 -10
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +12 -11
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +96 -69
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +71 -61
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +1 -1
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/constants.ts +39 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{context → features/authentication/context}/AuthContext.tsx +1 -1
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/footers/footer-link.tsx +1 -1
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/forms/auth-form.tsx +4 -4
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/forms/submit-button.tsx +4 -4
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/form.tsx +13 -9
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/layout/card-skeleton.tsx +2 -2
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/layout/centered-page-layout.tsx +2 -3
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{layouts → features/authentication/layouts}/AuthAppLayout.tsx +2 -2
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication/layouts}/authenticationRouteLayout.tsx +2 -2
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication/layouts}/privateRouteLayout.tsx +2 -2
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ChangePassword.tsx +6 -6
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ForgotPassword.tsx +5 -5
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Login.tsx +6 -6
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Profile.tsx +22 -13
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Register.tsx +6 -11
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ResetPassword.tsx +8 -8
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/SessionTimeoutValidator.tsx +6 -6
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/index.ts +19 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectDetailService.ts +125 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectInfoGraphQLService.ts +194 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectInfoService.ts +199 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/recordListGraphQLService.ts +365 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailFields.tsx +55 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailForm.tsx +146 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailHeader.tsx +34 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailLayoutSections.tsx +80 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/Section.tsx +108 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/SectionRow.tsx +20 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/UiApiDetailForm.tsx +140 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FieldValueDisplay.tsx +73 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedAddress.tsx +29 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedEmail.tsx +17 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedPhone.tsx +24 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedText.tsx +11 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedUrl.tsx +29 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/index.ts +6 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterField.tsx +54 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterInput.tsx +55 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterSelect.tsx +72 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FiltersPanel.tsx +380 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/forms/filters-form.tsx +114 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/forms/submit-button.tsx +47 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/GlobalSearchInput.tsx +114 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/ResultCardFields.tsx +71 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchHeader.tsx +31 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchPagination.tsx +144 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchResultCard.tsx +136 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchResultsPanel.tsx +197 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/shared/LoadingFallback.tsx +61 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/filters/FilterInput.tsx +55 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/filters/FilterSelect.tsx +72 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/form.tsx +209 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/index.ts +22 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useObjectInfoBatch.ts +65 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useObjectSearchData.ts +395 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useRecordDetailLayout.ts +156 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useRecordListGraphQL.ts +135 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/pages/DetailPage.tsx +109 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/pages/GlobalSearch.tsx +229 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/filters/filters.ts +120 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/filters/picklist.ts +32 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/index.ts +4 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/objectInfo/objectInfo.ts +166 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/recordDetail/recordDetail.ts +61 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/search/searchResults.ts +229 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/apiUtils.ts +125 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/cacheUtils.ts +76 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/debounce.ts +89 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/fieldUtils.ts +354 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/fieldValueExtractor.ts +67 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/filterUtils.ts +32 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/formDataTransformUtils.ts +260 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/formUtils.ts +142 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLNodeFieldUtils.ts +186 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLObjectInfoAdapter.ts +319 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLRecordAdapter.ts +90 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/index.ts +59 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/layoutTransformUtils.ts +236 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/linkUtils.ts +14 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/paginationUtils.ts +49 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/recordUtils.ts +159 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/sanitizationUtils.ts +49 -0
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +3 -3
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +11 -10
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +33 -11
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +107 -107
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +2 -1
- package/lib/templates/project/reactb2x/package.json +1 -1
- package/lib/templates/webapplication/reactbasic/CHANGELOG.md +10 -0
- package/lib/templates/webapplication/reactbasic/README.md +75 -0
- package/lib/templates/webapplication/reactbasic/package.json +13 -5
- package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +75 -3
- package/lib/templates/webapplication/reactbasic/src/components/alerts/status-alert.tsx +49 -0
- package/lib/templates/webapplication/reactbasic/src/components/layouts/card-layout.tsx +29 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/alert.tsx +76 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/button.tsx +67 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/card.tsx +103 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/dialog.tsx +162 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/field.tsx +237 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/index.ts +84 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/input.tsx +19 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/label.tsx +22 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/pagination.tsx +132 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/select.tsx +193 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/separator.tsx +26 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/skeleton.tsx +14 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/spinner.tsx +16 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/table.tsx +114 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/tabs.tsx +88 -0
- package/lib/templates/webapplication/reactbasic/src/components.json +18 -0
- package/lib/templates/webapplication/reactbasic/src/lib/utils.ts +6 -0
- package/lib/templates/webapplication/reactbasic/src/styles/global.css +122 -0
- package/lib/templates/webapplication/reactbasic/vite.config.ts +2 -1
- package/lib/templates/webapplication/webappbasic/README.md +15 -0
- package/lib/utils/webappTemplateUtils.d.ts +10 -0
- package/lib/utils/webappTemplateUtils.js +55 -7
- package/lib/utils/webappTemplateUtils.js.map +1 -1
- package/package.json +5 -5
- package/lib/templates/project/reactb2e/.a4drules/README.md +0 -35
- package/lib/templates/project/reactb2e/.a4drules/a4d-webapp-generate.md +0 -27
- package/lib/templates/project/reactb2e/.a4drules/build-validation.md +0 -78
- package/lib/templates/project/reactb2e/.a4drules/code-quality.md +0 -137
- package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -205
- package/lib/templates/project/reactb2e/.a4drules/react.md +0 -387
- package/lib/templates/project/reactb2e/.a4drules/react_image_processing.md +0 -45
- package/lib/templates/project/reactb2e/.a4drules/ui-layout.md +0 -23
- package/lib/templates/project/reactb2e/.a4drules/webapp-nav-and-placeholders.md +0 -33
- package/lib/templates/project/reactb2e/.a4drules/webapp-ui-first.md +0 -32
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +0 -2
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +0 -93
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +0 -14392
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +0 -116
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +0 -33
- package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
- package/lib/templates/project/reactb2x/.a4drules/README.md +0 -35
- package/lib/templates/project/reactb2x/.a4drules/a4d-webapp-generate.md +0 -27
- package/lib/templates/project/reactb2x/.a4drules/build-validation.md +0 -78
- package/lib/templates/project/reactb2x/.a4drules/code-quality.md +0 -137
- package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -205
- package/lib/templates/project/reactb2x/.a4drules/react.md +0 -387
- package/lib/templates/project/reactb2x/.a4drules/react_image_processing.md +0 -45
- package/lib/templates/project/reactb2x/.a4drules/ui-layout.md +0 -23
- package/lib/templates/project/reactb2x/.a4drules/webapp-nav-and-placeholders.md +0 -33
- package/lib/templates/project/reactb2x/.a4drules/webapp-ui-first.md +0 -32
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +0 -2
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +0 -93
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +0 -18408
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +0 -116
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +0 -33
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +0 -23
- package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +0 -21
- package/lib/templates/webapplication/reactbasic/build/vite.config.d.ts +0 -2
- package/lib/templates/webapplication/reactbasic/build/vite.config.js +0 -93
- package/lib/templates/webapplication/reactbasic/package-lock.json +0 -14373
- package/lib/templates/webapplication/reactbasic/src/api/graphql-operations-types.ts +0 -116
- package/lib/templates/webapplication/reactbasic/src/api/utils/accounts.ts +0 -33
- package/lib/templates/webapplication/reactbasic/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/authHelpers.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/authenticationConfig.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/useCountdownTimer.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/useRetryWithBackoff.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/sessionTimeService.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/sessionTimeoutConfig.ts +0 -0
- /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{utils → features/authentication/utils}/helpers.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
3
|
+
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
function Separator({
|
|
7
|
+
className,
|
|
8
|
+
orientation = 'horizontal',
|
|
9
|
+
decorative = true,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
data-slot="separator"
|
|
15
|
+
decorative={decorative}
|
|
16
|
+
orientation={orientation}
|
|
17
|
+
className={cn(
|
|
18
|
+
'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { Separator };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
|
|
4
|
+
function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
data-slot="skeleton"
|
|
8
|
+
className={cn('bg-accent animate-pulse rounded-md', className)}
|
|
9
|
+
{...props}
|
|
10
|
+
/>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { Skeleton };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
import { Loader2Icon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
function Spinner({ className, ...props }: React.ComponentProps<'svg'>) {
|
|
6
|
+
return (
|
|
7
|
+
<Loader2Icon
|
|
8
|
+
role="status"
|
|
9
|
+
aria-label="Loading"
|
|
10
|
+
className={cn('size-4 animate-spin', className)}
|
|
11
|
+
{...(props as any)}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Spinner };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
|
|
5
|
+
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="table-container"
|
|
9
|
+
className="relative w-full overflow-x-auto"
|
|
10
|
+
>
|
|
11
|
+
<table
|
|
12
|
+
data-slot="table"
|
|
13
|
+
className={cn('w-full caption-bottom text-sm', className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {
|
|
21
|
+
return (
|
|
22
|
+
<thead
|
|
23
|
+
data-slot="table-header"
|
|
24
|
+
className={cn('[&_tr]:border-b', className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {
|
|
31
|
+
return (
|
|
32
|
+
<tbody
|
|
33
|
+
data-slot="table-body"
|
|
34
|
+
className={cn('[&_tr:last-child]:border-0', className)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {
|
|
41
|
+
return (
|
|
42
|
+
<tfoot
|
|
43
|
+
data-slot="table-footer"
|
|
44
|
+
className={cn(
|
|
45
|
+
'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {
|
|
54
|
+
return (
|
|
55
|
+
<tr
|
|
56
|
+
data-slot="table-row"
|
|
57
|
+
className={cn(
|
|
58
|
+
'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
|
|
67
|
+
return (
|
|
68
|
+
<th
|
|
69
|
+
data-slot="table-head"
|
|
70
|
+
className={cn(
|
|
71
|
+
'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0',
|
|
72
|
+
className
|
|
73
|
+
)}
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
|
|
80
|
+
return (
|
|
81
|
+
<td
|
|
82
|
+
data-slot="table-cell"
|
|
83
|
+
className={cn(
|
|
84
|
+
'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0',
|
|
85
|
+
className
|
|
86
|
+
)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function TableCaption({
|
|
93
|
+
className,
|
|
94
|
+
...props
|
|
95
|
+
}: React.ComponentProps<'caption'>) {
|
|
96
|
+
return (
|
|
97
|
+
<caption
|
|
98
|
+
data-slot="table-caption"
|
|
99
|
+
className={cn('text-muted-foreground mt-4 text-sm', className)}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
Table,
|
|
107
|
+
TableHeader,
|
|
108
|
+
TableBody,
|
|
109
|
+
TableFooter,
|
|
110
|
+
TableHead,
|
|
111
|
+
TableRow,
|
|
112
|
+
TableCell,
|
|
113
|
+
TableCaption,
|
|
114
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
function Tabs({
|
|
8
|
+
className,
|
|
9
|
+
orientation = 'horizontal',
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<TabsPrimitive.Root
|
|
14
|
+
data-slot="tabs"
|
|
15
|
+
data-orientation={orientation}
|
|
16
|
+
className={cn(
|
|
17
|
+
'gap-2 group/tabs flex data-horizontal:flex-col',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const tabsListVariants = cva(
|
|
26
|
+
'rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col',
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
variant: {
|
|
30
|
+
default: 'bg-muted',
|
|
31
|
+
line: 'gap-1 bg-transparent',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: 'default',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
function TabsList({
|
|
41
|
+
className,
|
|
42
|
+
variant = 'default',
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<typeof TabsPrimitive.List> &
|
|
45
|
+
VariantProps<typeof tabsListVariants>) {
|
|
46
|
+
return (
|
|
47
|
+
<TabsPrimitive.List
|
|
48
|
+
data-slot="tabs-list"
|
|
49
|
+
data-variant={variant}
|
|
50
|
+
className={cn(tabsListVariants({ variant }), className)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function TabsTrigger({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
60
|
+
return (
|
|
61
|
+
<TabsPrimitive.Trigger
|
|
62
|
+
data-slot="tabs-trigger"
|
|
63
|
+
className={cn(
|
|
64
|
+
"gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
65
|
+
'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent',
|
|
66
|
+
'data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground',
|
|
67
|
+
'after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100',
|
|
68
|
+
className
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function TabsContent({
|
|
76
|
+
className,
|
|
77
|
+
...props
|
|
78
|
+
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
79
|
+
return (
|
|
80
|
+
<TabsPrimitive.Content
|
|
81
|
+
data-slot="tabs-content"
|
|
82
|
+
className={cn('text-sm flex-1 outline-none', className)}
|
|
83
|
+
{...props}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"style": "new-york",
|
|
3
|
+
"rsc": true,
|
|
4
|
+
"tailwind": {
|
|
5
|
+
"config": "",
|
|
6
|
+
"css": "styles/global.css",
|
|
7
|
+
"baseColor": "neutral",
|
|
8
|
+
"cssVariables": true
|
|
9
|
+
},
|
|
10
|
+
"iconLibrary": "lucide",
|
|
11
|
+
"aliases": {
|
|
12
|
+
"components": "@/components",
|
|
13
|
+
"utils": "@/lib/utils",
|
|
14
|
+
"ui": "@/components/ui",
|
|
15
|
+
"lib": "@/lib",
|
|
16
|
+
"hooks": "@/hooks"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -11,3 +11,125 @@
|
|
|
11
11
|
@apply antialiased bg-white;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
@import 'tw-animate-css';
|
|
16
|
+
@import 'shadcn/tailwind.css';
|
|
17
|
+
|
|
18
|
+
@custom-variant dark (&:is(.dark *));
|
|
19
|
+
|
|
20
|
+
@theme inline {
|
|
21
|
+
--color-background: var(--background);
|
|
22
|
+
--color-foreground: var(--foreground);
|
|
23
|
+
--color-card: var(--card);
|
|
24
|
+
--color-card-foreground: var(--card-foreground);
|
|
25
|
+
--color-popover: var(--popover);
|
|
26
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
27
|
+
--color-primary: var(--primary);
|
|
28
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
29
|
+
--color-secondary: var(--secondary);
|
|
30
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
31
|
+
--color-muted: var(--muted);
|
|
32
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
33
|
+
--color-accent: var(--accent);
|
|
34
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
35
|
+
--color-destructive: var(--destructive);
|
|
36
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
37
|
+
--color-border: var(--border);
|
|
38
|
+
--color-input: var(--input);
|
|
39
|
+
--color-ring: var(--ring);
|
|
40
|
+
--color-chart-1: var(--chart-1);
|
|
41
|
+
--color-chart-2: var(--chart-2);
|
|
42
|
+
--color-chart-3: var(--chart-3);
|
|
43
|
+
--color-chart-4: var(--chart-4);
|
|
44
|
+
--color-chart-5: var(--chart-5);
|
|
45
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
46
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
47
|
+
--radius-lg: var(--radius);
|
|
48
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
49
|
+
--color-sidebar: var(--sidebar);
|
|
50
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
51
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
52
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
53
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
54
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
55
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
56
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:root {
|
|
60
|
+
--radius: 0.625rem;
|
|
61
|
+
--background: oklch(1 0 0);
|
|
62
|
+
--foreground: oklch(0.145 0 0);
|
|
63
|
+
--card: oklch(1 0 0);
|
|
64
|
+
--card-foreground: oklch(0.145 0 0);
|
|
65
|
+
--popover: oklch(1 0 0);
|
|
66
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
67
|
+
--primary: oklch(0.205 0 0);
|
|
68
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
69
|
+
--secondary: oklch(0.97 0 0);
|
|
70
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
71
|
+
--muted: oklch(0.97 0 0);
|
|
72
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
73
|
+
--accent: oklch(0.97 0 0);
|
|
74
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
75
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
76
|
+
--border: oklch(0.922 0 0);
|
|
77
|
+
--input: oklch(0.922 0 0);
|
|
78
|
+
--ring: oklch(0.708 0 0);
|
|
79
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
80
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
81
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
82
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
83
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
84
|
+
--sidebar: oklch(0.985 0 0);
|
|
85
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
86
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
87
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
88
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
89
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
90
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
91
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dark {
|
|
95
|
+
--background: oklch(0.145 0 0);
|
|
96
|
+
--foreground: oklch(0.985 0 0);
|
|
97
|
+
--card: oklch(0.205 0 0);
|
|
98
|
+
--card-foreground: oklch(0.985 0 0);
|
|
99
|
+
--popover: oklch(0.205 0 0);
|
|
100
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
101
|
+
--primary: oklch(0.922 0 0);
|
|
102
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
103
|
+
--secondary: oklch(0.269 0 0);
|
|
104
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
105
|
+
--muted: oklch(0.269 0 0);
|
|
106
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
107
|
+
--accent: oklch(0.269 0 0);
|
|
108
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
109
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
110
|
+
--border: oklch(1 0 0 / 10%);
|
|
111
|
+
--input: oklch(1 0 0 / 15%);
|
|
112
|
+
--ring: oklch(0.556 0 0);
|
|
113
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
114
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
115
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
116
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
117
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
118
|
+
--sidebar: oklch(0.205 0 0);
|
|
119
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
120
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
121
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
122
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
123
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
124
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
125
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@layer base {
|
|
129
|
+
* {
|
|
130
|
+
@apply border-border outline-ring/50;
|
|
131
|
+
}
|
|
132
|
+
body {
|
|
133
|
+
@apply bg-background text-foreground;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => {
|
|
|
10
10
|
return {
|
|
11
11
|
// Ensure root base for e2e/static serve; plugin may override when deployed under a path
|
|
12
12
|
base: '/',
|
|
13
|
+
// Type assertion avoids Plugin type mismatch when dist has its own node_modules (vite/rollup)
|
|
13
14
|
plugins: [
|
|
14
15
|
tailwindcss(),
|
|
15
16
|
react(),
|
|
@@ -26,7 +27,7 @@ export default defineConfig(({ mode }) => {
|
|
|
26
27
|
// Fail build if codegen errors
|
|
27
28
|
throwOnBuild: true,
|
|
28
29
|
}),
|
|
29
|
-
],
|
|
30
|
+
] as import('vite').PluginOption[],
|
|
30
31
|
|
|
31
32
|
// Build configuration for MPA
|
|
32
33
|
build: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Base Web App
|
|
2
|
+
|
|
3
|
+
Base Web App is a minimal web application template for the Salesforce platform. It provides a static HTML entry point and web application metadata so you can deploy a simple web app or use it as a starting point for a custom build. It does not include a framework; it is HTML and configuration only.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
This directory is the **web application payload**. It contains:
|
|
8
|
+
|
|
9
|
+
| Path | Description |
|
|
10
|
+
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `webapplication.json` | Web app config: `outputDir` (where the app content lives), routing, fallback. |
|
|
12
|
+
| `_webapplication.webapplication-meta.xml` | Salesforce web application metadata (label, description, version). |
|
|
13
|
+
| `src/` | **App content directory.** Matches `outputDir` in `webapplication.json`. Entry point is `src/index.html`; add other static assets (HTML, CSS, JS, images) under `src/` as needed. |
|
|
14
|
+
|
|
15
|
+
The nested `src/` is intentional: this folder holds the actual web app content (e.g. `index.html`). The platform uses `outputDir` from `webapplication.json` to know which subfolder contains the app.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively copy a directory tree from src to dest, trimming trailing
|
|
3
|
+
* whitespace from every path segment so that upstream filenames with stray
|
|
4
|
+
* spaces never leak into the output.
|
|
5
|
+
*
|
|
6
|
+
* This is a drop-in replacement for `fs.cpSync(src, dest, { recursive: true })`
|
|
7
|
+
* that is resilient to the "trailing-space filename" issue seen in
|
|
8
|
+
* `@salesforce/templates`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function copyTreeSanitized(src: string, dest: string): void;
|
|
1
11
|
/** File extensions that should be processed as EJS templates */
|
|
2
12
|
export declare const EJS_EXTENSIONS: Set<string>;
|
|
3
13
|
/** Templates that have a full folder under src/templates/project/ (populated at build time from npm) */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FULL_TEMPLATE_SKIP_DIRS = exports.FULL_TEMPLATE_DEFAULT_NAMES = exports.BUILT_IN_FULL_TEMPLATES = exports.EJS_EXTENSIONS = void 0;
|
|
4
|
+
exports.copyTreeSanitized = copyTreeSanitized;
|
|
4
5
|
exports.toAlphanumericForPath = toAlphanumericForPath;
|
|
5
6
|
exports.isLikelyText = isLikelyText;
|
|
6
7
|
exports.renderEjsFile = renderEjsFile;
|
|
@@ -16,6 +17,51 @@ const tslib_1 = require("tslib");
|
|
|
16
17
|
const fs = require("fs");
|
|
17
18
|
const promises_1 = require("node:fs/promises");
|
|
18
19
|
const path = require("path");
|
|
20
|
+
/**
|
|
21
|
+
* Trim trailing whitespace from a filename segment and warn when it differs.
|
|
22
|
+
* Upstream packages occasionally ship files whose names end with a space
|
|
23
|
+
* (e.g. "lds-guide-graphql.md "), which produces invalid OPC Part URIs
|
|
24
|
+
* when vsce builds the .vsix.
|
|
25
|
+
*/
|
|
26
|
+
function sanitizeSegment(name) {
|
|
27
|
+
const trimmed = name.trimEnd();
|
|
28
|
+
if (trimmed !== name) {
|
|
29
|
+
console.warn(`[webappTemplateUtils] Sanitised filename: "${name}" → "${trimmed}"`);
|
|
30
|
+
}
|
|
31
|
+
return trimmed;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Recursively copy a directory tree from src to dest, trimming trailing
|
|
35
|
+
* whitespace from every path segment so that upstream filenames with stray
|
|
36
|
+
* spaces never leak into the output.
|
|
37
|
+
*
|
|
38
|
+
* This is a drop-in replacement for `fs.cpSync(src, dest, { recursive: true })`
|
|
39
|
+
* that is resilient to the "trailing-space filename" issue seen in
|
|
40
|
+
* `@salesforce/templates`.
|
|
41
|
+
*/
|
|
42
|
+
function copyTreeSanitized(src, dest) {
|
|
43
|
+
const stat = fs.statSync(src);
|
|
44
|
+
if (stat.isFile()) {
|
|
45
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
46
|
+
fs.copyFileSync(src, dest);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (!stat.isDirectory()) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
53
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
54
|
+
const sanitized = sanitizeSegment(entry.name);
|
|
55
|
+
const srcChild = path.join(src, entry.name);
|
|
56
|
+
const destChild = path.join(dest, sanitized);
|
|
57
|
+
if (entry.isDirectory()) {
|
|
58
|
+
copyTreeSanitized(srcChild, destChild);
|
|
59
|
+
}
|
|
60
|
+
else if (entry.isFile()) {
|
|
61
|
+
fs.copyFileSync(srcChild, destChild);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
19
65
|
/** File extensions that should be processed as EJS templates */
|
|
20
66
|
exports.EJS_EXTENSIONS = new Set([
|
|
21
67
|
'.json',
|
|
@@ -162,12 +208,14 @@ function generateFromProjectTemplateDir(sourceDir, destDir, templateVars, option
|
|
|
162
208
|
};
|
|
163
209
|
const entries = yield (0, promises_1.readdir)(sourceDir, { withFileTypes: true });
|
|
164
210
|
for (const entry of entries) {
|
|
165
|
-
const
|
|
211
|
+
const rawName = entry.name;
|
|
212
|
+
const safeName = sanitizeSegment(rawName);
|
|
213
|
+
const sourcePath = path.join(sourceDir, rawName);
|
|
166
214
|
if (entry.isDirectory()) {
|
|
167
|
-
if (exports.FULL_TEMPLATE_SKIP_DIRS.has(
|
|
215
|
+
if (exports.FULL_TEMPLATE_SKIP_DIRS.has(safeName)) {
|
|
168
216
|
continue;
|
|
169
217
|
}
|
|
170
|
-
const destName = applyReplacements(
|
|
218
|
+
const destName = applyReplacements(safeName);
|
|
171
219
|
const destPath = path.join(destDir, destName);
|
|
172
220
|
yield (0, promises_1.mkdir)(destPath, { recursive: true });
|
|
173
221
|
yield generateFromProjectTemplateDir(sourcePath, destPath, templateVars, options);
|
|
@@ -176,12 +224,12 @@ function generateFromProjectTemplateDir(sourceDir, destDir, templateVars, option
|
|
|
176
224
|
if (!entry.isFile()) {
|
|
177
225
|
continue;
|
|
178
226
|
}
|
|
179
|
-
const destName = applyReplacements(
|
|
227
|
+
const destName = applyReplacements(safeName);
|
|
180
228
|
const destPath = path.join(destDir, destName);
|
|
181
|
-
const ext = path.extname(
|
|
229
|
+
const ext = path.extname(safeName);
|
|
182
230
|
const isEjsTemplate = exports.EJS_EXTENSIONS.has(ext) ||
|
|
183
|
-
|
|
184
|
-
|
|
231
|
+
safeName.endsWith('.config.js') ||
|
|
232
|
+
safeName.endsWith('.config.ts');
|
|
185
233
|
if (isEjsTemplate) {
|
|
186
234
|
try {
|
|
187
235
|
const rendered = yield renderEjs(sourcePath, templateVars);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webappTemplateUtils.js","sourceRoot":"","sources":["../../src/utils/webappTemplateUtils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"webappTemplateUtils.js","sourceRoot":"","sources":["../../src/utils/webappTemplateUtils.ts"],"names":[],"mappings":";;;AAmCA,8CAqBC;AAiDD,sDAEC;AAGD,oCA6BC;AAGD,sCAcC;AAsBD,kEAyCC;AAmBD,wEAuFC;;AArUD;;;;;GAKG;AACH,yBAAyB;AACzB,+CAAuE;AACvE,6BAA6B;AAE7B;;;;;GAKG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CACV,8CAA8C,IAAI,QAAQ,OAAO,GAAG,CACrE,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAAC,GAAW,EAAE,IAAY;IACzD,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxB,OAAO;IACT,CAAC;IACD,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAA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AAA,oBAAS,EAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC3C,aAAa,CAAC,QAAQ,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBACzD,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,CAAC;gBAC3C,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACjD,IAAI,MAAM,KAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,EAAE,CAAC;oBACvC,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACrC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;oBACxC,MAAM,IAAA,oBAAS,EAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAC9C,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAA,oBAAS,EAAC,QAAQ,EAAE,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrD,CAAC;gBACD,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/templates",
|
|
3
|
-
"version": "66.3.
|
|
3
|
+
"version": "66.3.2",
|
|
4
4
|
"description": "Salesforce JS library for templates",
|
|
5
5
|
"bugs": "https://github.com/forcedotcom/salesforcedx-templates/issues",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@salesforce/dev-config": "^4.3.2",
|
|
26
26
|
"@salesforce/dev-scripts": "^11.0.2",
|
|
27
|
-
"@salesforce/webapp-template-app-react-template-b2e-experimental": "^1.
|
|
28
|
-
"@salesforce/webapp-template-app-react-template-b2x-experimental": "^1.
|
|
29
|
-
"@salesforce/webapp-template-base-react-app-experimental": "^1.
|
|
30
|
-
"@salesforce/webapp-template-base-web-app-experimental": "^1.
|
|
27
|
+
"@salesforce/webapp-template-app-react-template-b2e-experimental": "^1.71.2",
|
|
28
|
+
"@salesforce/webapp-template-app-react-template-b2x-experimental": "^1.71.2",
|
|
29
|
+
"@salesforce/webapp-template-base-react-app-experimental": "^1.71.2",
|
|
30
|
+
"@salesforce/webapp-template-base-web-app-experimental": "^1.71.2",
|
|
31
31
|
"@salesforce/prettier-config": "^0.0.4",
|
|
32
32
|
"@types/chai-as-promised": "^7.1.8",
|
|
33
33
|
"@types/ejs": "^3.1.5",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# A4D Rules Index
|
|
2
|
-
|
|
3
|
-
Rules in this folder guide the agent for this SFDX project. **Knowledge** (expert content) lives in the **local-expert MCP** repo (e.g. `local-expert-mcp`); rules here reference when to call which expert.
|
|
4
|
-
|
|
5
|
-
## Always-apply rules (MUST follow)
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|------|--------|
|
|
9
|
-
| **webapp.md** | Main web app rules: invoke local-expert MCP (`webapplications-design-system` + `webapplications`), no `node -e`, React/SFDX workflow; **replace default boilerplate**; **populate home page**; **frontend aesthetics**—avoid AI slop, follow design-system expert. |
|
|
10
|
-
| **webapp-no-node-e.md** | No `node -e` for any file/config/shell work; use `replace_in_file` or `write_to_file` only. |
|
|
11
|
-
| **a4d-webapp-generate.md** | Before `sf webapp generate`: call `get_expert_knowledge` with `webapplications-design-system` and `webapplications`; then run CLI. |
|
|
12
|
-
| **webapp-ui-first.md** | Build UI (layout, components, styling) first; then implement business logic (APIs, state, handlers). |
|
|
13
|
-
| **webapp-nav-and-placeholders.md** | **Build navigation into the app layout** (`appLayout.tsx`). Always update nav menu (app-specific items/labels) and placeholder name/design (header/nav/footer/title). Often missed—mandatory. |
|
|
14
|
-
|
|
15
|
-
## Context-specific rules (by file pattern or topic)
|
|
16
|
-
|
|
17
|
-
| File | Purpose |
|
|
18
|
-
|------|--------|
|
|
19
|
-
| **react.md** | React web app structure, shadcn/Tailwind, data access, security; edit `appLayout.tsx` when changing layout. |
|
|
20
|
-
| **ui-layout.md** | When changing UI/nav/header/footer/sidebar/theme, always update `appLayout.tsx`. |
|
|
21
|
-
| **code-quality.md** | ESLint, Prettier, import order, naming, lint/build before completion; no `node -e`. |
|
|
22
|
-
| **build-validation.md** | `npm run build` must succeed from web app dir before completing. |
|
|
23
|
-
| **typescript.md** | TypeScript strictness, return types, interfaces. |
|
|
24
|
-
| **images.md** | Images: Unsplash default, CSP, alt text, error handling. |
|
|
25
|
-
| **react_image_processing.md** | Image handling (Unsplash, CSP, accessibility) for React components. |
|
|
26
|
-
| **graphql/** | GraphQL tools and knowledge (schemas, LDS guides). |
|
|
27
|
-
|
|
28
|
-
## Knowledge repository (experts)
|
|
29
|
-
|
|
30
|
-
Expert knowledge is served by the **local-expert MCP** (e.g. at `local-expert-mcp`). The agent must call **`get_expert_knowledge`** with the appropriate topic:
|
|
31
|
-
|
|
32
|
-
- **webapplications-design-system** — Always use for web app UI/design work (design system, typography, color, motion).
|
|
33
|
-
- **webapplications** — Use for app generation and structure; then call sub-topics as needed (e.g. `webapplications-best-practice`, `webapplications-feature-*`).
|
|
34
|
-
|
|
35
|
-
See the MCP repo's **rule-expert-mcp.md** for full topic list and when to call which expert.
|