@salesforce/templates 66.6.2 → 66.7.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 -4
- package/lib/generators/projectGenerator.js.map +1 -1
- package/lib/generators/{webApplicationGenerator.d.ts → uiBundleGenerator.d.ts} +2 -2
- package/lib/generators/{webApplicationGenerator.js → uiBundleGenerator.js} +23 -22
- package/lib/generators/uiBundleGenerator.js.map +1 -0
- package/lib/i18n/i18n.d.ts +1 -1
- package/lib/i18n/i18n.js +1 -1
- package/lib/i18n/i18n.js.map +1 -1
- package/lib/templates/project/reactexternalapp/AGENT.md +152 -46
- package/lib/templates/project/reactexternalapp/CHANGELOG.md +366 -208
- package/lib/templates/project/reactexternalapp/README.md +16 -16
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/CHANGELOG.md +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/README.md +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/eslint.config.js +13 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/package.json +3 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/reactexternalapp.uibundle-meta.xml +8 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/scripts/get-graphql-schema.mjs +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/_ex_/pages/AccountSearch.tsx +15 -6
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/FilterContext.tsx +13 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/BooleanFilter.tsx +9 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateFilter.tsx +15 -8
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateRangeFilter.tsx +8 -7
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/FilterFieldWrapper.tsx +33 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/MultiSelectFilter.tsx +4 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/NumericRangeFilter.tsx +118 -40
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SearchFilter.tsx +24 -11
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SelectFilter.tsx +9 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/TextFilter.tsx +29 -12
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useDebouncedCallback.ts +34 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useObjectSearchParams.ts +10 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/debounce.ts +4 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +24 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/context/AuthContext.tsx +2 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/hooks/useCountdownTimer.ts +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Profile.tsx +3 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Register.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/sessionTimeout/SessionTimeoutValidator.tsx +12 -18
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/api/account/accountSearchService.ts +46 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/api/account/query/distinctAccountIndustries.graphql +19 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/api/account/query/distinctAccountTypes.graphql +19 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/api/account/query/getAccountDetail.graphql +121 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/api/account/query/searchAccounts.graphql +51 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/pages/AccountObjectDetailPage.tsx +361 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/pages/AccountSearch.tsx +305 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/pages/Home.tsx +33 -11
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/routes.tsx +3 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/vite.config.ts +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppAuthUtils.cls → UIBundleAuthUtils.cls} +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppChangePassword.cls → UIBundleChangePassword.cls} +2 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppForgotPassword.cls → UIBundleForgotPassword.cls} +2 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppLogin.cls → UIBundleLogin.cls} +6 -6
- package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppRegistration.cls → UIBundleRegistration.cls} +10 -10
- package/lib/templates/project/reactexternalapp/_p_/_m_/networks/{reactexternalapp.network → reactexternalapp.network-meta.xml} +2 -2
- package/lib/templates/project/reactexternalapp/package.json +2 -2
- package/lib/templates/project/reactexternalapp/scripts/graphql-search.sh +4 -4
- package/lib/templates/project/reactexternalapp/scripts/setup-cli.mjs +51 -51
- package/lib/templates/project/reactexternalapp/scripts/sf-project-setup.mjs +16 -16
- package/lib/templates/project/reactinternalapp/AGENT.md +152 -46
- package/lib/templates/project/reactinternalapp/CHANGELOG.md +366 -208
- package/lib/templates/project/reactinternalapp/README.md +12 -12
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/CHANGELOG.md +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/README.md +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/eslint.config.js +13 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/package.json +4 -4
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/reactinternalapp.uibundle-meta.xml +7 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/scripts/get-graphql-schema.mjs +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/_ex_/pages/AccountSearch.tsx +15 -6
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/FilterContext.tsx +13 -3
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/BooleanFilter.tsx +9 -5
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateFilter.tsx +15 -8
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateRangeFilter.tsx +8 -7
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/FilterFieldWrapper.tsx +33 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/MultiSelectFilter.tsx +4 -5
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/NumericRangeFilter.tsx +118 -40
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SearchFilter.tsx +24 -11
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SelectFilter.tsx +9 -5
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/TextFilter.tsx +29 -12
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useDebouncedCallback.ts +34 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useObjectSearchParams.ts +10 -5
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/debounce.ts +4 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +24 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/api/account/accountSearchService.ts +46 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/api/account/query/distinctAccountIndustries.graphql +19 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/api/account/query/distinctAccountTypes.graphql +19 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/api/account/query/getAccountDetail.graphql +121 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/api/account/query/searchAccounts.graphql +51 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/AgentforceConversationClient.tsx +5 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/pages/AccountObjectDetailPage.tsx +361 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/pages/AccountSearch.tsx +305 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/pages/Home.tsx +33 -11
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/routes.tsx +12 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/types/conversation.ts +2 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/vite.config.ts +1 -1
- package/lib/templates/project/reactinternalapp/package.json +2 -2
- package/lib/templates/project/reactinternalapp/scripts/graphql-search.sh +4 -4
- package/lib/templates/project/reactinternalapp/scripts/setup-cli.mjs +51 -51
- package/lib/templates/project/reactinternalapp/scripts/sf-project-setup.mjs +16 -16
- package/lib/templates/{webapplication → uiBundles}/reactbasic/CHANGELOG.md +1 -1
- package/lib/templates/{webapplication → uiBundles}/reactbasic/README.md +10 -10
- package/lib/templates/{webapplication/reactbasic/_webapplication.webapplication-meta.xml → uiBundles/reactbasic/_uibundle.uibundle-meta.xml} +3 -3
- package/lib/templates/{webapplication → uiBundles}/reactbasic/eslint.config.js +13 -2
- package/lib/templates/{webapplication → uiBundles}/reactbasic/package.json +3 -3
- package/lib/templates/{webapplication → uiBundles}/reactbasic/scripts/get-graphql-schema.mjs +1 -1
- package/lib/templates/{webapplication → uiBundles}/reactbasic/vite.config.ts +1 -1
- package/lib/templates/uiBundles/webappbasic/README.md +15 -0
- package/lib/templates/{webapplication/webappbasic/_webapplication.webapplication-meta.xml → uiBundles/webappbasic/_uibundle.uibundle-meta.xml} +3 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/constants.js +2 -1
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/template-placeholders.d.ts +1 -1
- package/lib/utils/template-placeholders.js +11 -4
- package/lib/utils/template-placeholders.js.map +1 -1
- package/lib/utils/types.d.ts +5 -5
- package/lib/utils/types.js +3 -3
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/{webappTemplateUtils.d.ts → uiBundleTemplateUtils.d.ts} +7 -5
- package/lib/utils/{webappTemplateUtils.js → uiBundleTemplateUtils.js} +15 -12
- package/lib/utils/uiBundleTemplateUtils.js.map +1 -0
- package/package.json +5 -5
- package/lib/generators/webApplicationGenerator.js.map +0 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/reactexternalapp.webapplication-meta.xml +0 -7
- package/lib/templates/project/reactexternalapp/_r_/webapp-data.md +0 -353
- package/lib/templates/project/reactexternalapp/_r_/webapp-ui.md +0 -16
- package/lib/templates/project/reactexternalapp/package-lock.json +0 -9995
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/reactinternalapp.webapplication-meta.xml +0 -7
- package/lib/templates/project/reactinternalapp/_r_/webapp-data.md +0 -353
- package/lib/templates/project/reactinternalapp/_r_/webapp-ui.md +0 -16
- package/lib/templates/project/reactinternalapp/package-lock.json +0 -9995
- package/lib/templates/webapplication/reactbasic/e2e/app.spec.ts +0 -17
- package/lib/templates/webapplication/webappbasic/README.md +0 -15
- package/lib/utils/webappTemplateUtils.js.map +0 -1
- /package/lib/templates/project/reactexternalapp/_p_/_m_/_d_/_s_/{_a1_ → reactexternalapp1}/reactexternalapp1.digitalExperience-meta.xml +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/_d_/_s_/{_a1_ → reactexternalapp1}/sfdc_cms__site/reactexternalapp1/_meta.json +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/_d_/_s_/{_a1_ → reactexternalapp1}/sfdc_cms__site/reactexternalapp1/content.json +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/{digitalExperienceConfigs/reactexternalapp1.digitalExperienceConfig → _dc_/reactexternalapp1.digitalExperienceConfig-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/{webapplication.json → ui-bundle.json} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppAuthUtils.cls-meta.xml → UIBundleAuthUtils.cls-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppChangePassword.cls-meta.xml → UIBundleChangePassword.cls-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppForgotPassword.cls-meta.xml → UIBundleForgotPassword.cls-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppLogin.cls-meta.xml → UIBundleLogin.cls-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/classes/{WebAppRegistration.cls-meta.xml → UIBundleRegistration.cls-meta.xml} +0 -0
- /package/lib/templates/project/reactexternalapp/_p_/_m_/sites/{reactexternalapp.site → reactexternalapp.site-meta.xml} +0 -0
- /package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/{webapplication.json → ui-bundle.json} +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/.forceignore +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/.graphqlrc.yml +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/.prettierignore +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/.prettierrc +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/codegen.yml +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/components.json +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/index.html +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/playwright.config.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/scripts/rewrite-e2e-assets.mjs +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/api/graphqlClient.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/app.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/appLayout.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/icons/book.svg +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/icons/copy.svg +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/icons/rocket.svg +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/icons/star.svg +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/images/codey-1.png +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/images/codey-2.png +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/images/codey-3.png +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/assets/images/vibe-codey.svg +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/alerts/status-alert.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/layouts/card-layout.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/alert.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/badge.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/breadcrumb.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/button.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/calendar.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/card.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/checkbox.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/collapsible.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/datePicker.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/dialog.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/field.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/index.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/input.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/label.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/pagination.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/popover.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/select.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/separator.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/skeleton.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/sonner.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/spinner.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/table.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/components/ui/tabs.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/lib/utils.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/navigationMenu.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/pages/Home.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/pages/NotFound.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/router-utils.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/routes.tsx +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/src/styles/global.css +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/tsconfig.json +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/tsconfig.node.json +0 -0
- /package/lib/templates/{webapplication/reactbasic/webapplication.json → uiBundles/reactbasic/ui-bundle.json} +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/vite-env.d.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/vitest-env.d.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/vitest.config.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/reactbasic/vitest.setup.ts +0 -0
- /package/lib/templates/{webapplication → uiBundles}/webappbasic/src/index.html +0 -0
- /package/lib/templates/{webapplication/webappbasic/webapplication.json → uiBundles/webappbasic/ui-bundle.json} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
|
|
3
3
|
import { SearchBar } from "../SearchBar";
|
|
4
4
|
import { useFilterField } from "../FilterContext";
|
|
5
|
+
import { FilterFieldWrapper } from "./FilterFieldWrapper";
|
|
6
|
+
import { useDebouncedCallback } from "../../hooks/useDebouncedCallback";
|
|
5
7
|
|
|
6
8
|
interface SearchFilterProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
7
9
|
field: string;
|
|
@@ -17,21 +19,32 @@ export function SearchFilter({
|
|
|
17
19
|
...props
|
|
18
20
|
}: SearchFilterProps) {
|
|
19
21
|
const { value, onChange } = useFilterField(field);
|
|
22
|
+
const [localValue, setLocalValue] = useState(value?.value ?? "");
|
|
23
|
+
|
|
24
|
+
const externalValue = value?.value ?? "";
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
setLocalValue(externalValue);
|
|
27
|
+
}, [externalValue]);
|
|
28
|
+
|
|
29
|
+
const debouncedOnChange = useDebouncedCallback((v: string) => {
|
|
30
|
+
if (v) {
|
|
31
|
+
onChange({ field, label, type: "search", value: v });
|
|
32
|
+
} else {
|
|
33
|
+
onChange(undefined);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
20
37
|
return (
|
|
21
|
-
<
|
|
22
|
-
<Label htmlFor={`filter-${field}`}>{label}</Label>
|
|
38
|
+
<FilterFieldWrapper label={label} htmlFor={`filter-${field}`} className={className} {...props}>
|
|
23
39
|
<SearchBar
|
|
24
|
-
value={
|
|
40
|
+
value={localValue}
|
|
25
41
|
handleChange={(v) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} else {
|
|
29
|
-
onChange(undefined);
|
|
30
|
-
}
|
|
42
|
+
setLocalValue(v);
|
|
43
|
+
debouncedOnChange(v);
|
|
31
44
|
}}
|
|
32
45
|
placeholder={placeholder}
|
|
33
46
|
inputProps={{ id: `filter-${field}` }}
|
|
34
47
|
/>
|
|
35
|
-
</
|
|
48
|
+
</FilterFieldWrapper>
|
|
36
49
|
);
|
|
37
50
|
}
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
SelectTrigger,
|
|
6
6
|
SelectValue,
|
|
7
7
|
} from "../../../../components/ui/select";
|
|
8
|
-
import { Label } from "../../../../components/ui/label";
|
|
9
8
|
import { cn } from "../../../../lib/utils";
|
|
10
9
|
import { useFilterField } from "../FilterContext";
|
|
10
|
+
import { FilterFieldWrapper } from "./FilterFieldWrapper";
|
|
11
11
|
import type { ActiveFilterValue } from "../../utils/filterUtils";
|
|
12
12
|
|
|
13
13
|
const ALL_VALUE = "__all__";
|
|
@@ -29,8 +29,13 @@ export function SelectFilter({
|
|
|
29
29
|
}: SelectFilterProps) {
|
|
30
30
|
const { value, onChange } = useFilterField(field);
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
33
|
-
|
|
32
|
+
<FilterFieldWrapper
|
|
33
|
+
label={label}
|
|
34
|
+
htmlFor={`filter-${field}`}
|
|
35
|
+
helpText={helpText}
|
|
36
|
+
className={className}
|
|
37
|
+
{...props}
|
|
38
|
+
>
|
|
34
39
|
<SelectFilterControl
|
|
35
40
|
field={field}
|
|
36
41
|
label={label}
|
|
@@ -38,8 +43,7 @@ export function SelectFilter({
|
|
|
38
43
|
value={value}
|
|
39
44
|
onChange={onChange}
|
|
40
45
|
/>
|
|
41
|
-
|
|
42
|
-
</div>
|
|
46
|
+
</FilterFieldWrapper>
|
|
43
47
|
);
|
|
44
48
|
}
|
|
45
49
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
1
2
|
import { Input } from "../../../../components/ui/input";
|
|
2
|
-
import { Label } from "../../../../components/ui/label";
|
|
3
3
|
import { cn } from "../../../../lib/utils";
|
|
4
4
|
import { useFilterField } from "../FilterContext";
|
|
5
|
+
import { FilterFieldWrapper } from "./FilterFieldWrapper";
|
|
6
|
+
import { useDebouncedCallback } from "../../hooks/useDebouncedCallback";
|
|
5
7
|
import type { ActiveFilterValue } from "../../utils/filterUtils";
|
|
6
8
|
|
|
7
9
|
interface TextFilterProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
@@ -21,8 +23,13 @@ export function TextFilter({
|
|
|
21
23
|
}: TextFilterProps) {
|
|
22
24
|
const { value, onChange } = useFilterField(field);
|
|
23
25
|
return (
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
+
<FilterFieldWrapper
|
|
27
|
+
label={label}
|
|
28
|
+
htmlFor={`filter-${field}`}
|
|
29
|
+
helpText={helpText}
|
|
30
|
+
className={className}
|
|
31
|
+
{...props}
|
|
32
|
+
>
|
|
26
33
|
<TextFilterInput
|
|
27
34
|
field={field}
|
|
28
35
|
label={label}
|
|
@@ -30,8 +37,7 @@ export function TextFilter({
|
|
|
30
37
|
value={value}
|
|
31
38
|
onChange={onChange}
|
|
32
39
|
/>
|
|
33
|
-
|
|
34
|
-
</div>
|
|
40
|
+
</FilterFieldWrapper>
|
|
35
41
|
);
|
|
36
42
|
}
|
|
37
43
|
|
|
@@ -53,19 +59,30 @@ export function TextFilterInput({
|
|
|
53
59
|
className,
|
|
54
60
|
...props
|
|
55
61
|
}: TextFilterInputProps) {
|
|
62
|
+
const [localValue, setLocalValue] = useState(value?.value ?? "");
|
|
63
|
+
|
|
64
|
+
const externalValue = value?.value ?? "";
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
setLocalValue(externalValue);
|
|
67
|
+
}, [externalValue]);
|
|
68
|
+
|
|
69
|
+
const debouncedOnChange = useDebouncedCallback((v: string) => {
|
|
70
|
+
if (v) {
|
|
71
|
+
onChange({ field, label, type: "text", value: v });
|
|
72
|
+
} else {
|
|
73
|
+
onChange(undefined);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
56
77
|
return (
|
|
57
78
|
<Input
|
|
58
79
|
id={`filter-${field}`}
|
|
59
80
|
type="text"
|
|
60
81
|
placeholder={props.placeholder ?? `Filter by ${label.toLowerCase()}...`}
|
|
61
|
-
value={
|
|
82
|
+
value={localValue}
|
|
62
83
|
onChange={(e) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onChange({ field, label, type: "text", value: v });
|
|
66
|
-
} else {
|
|
67
|
-
onChange(undefined);
|
|
68
|
-
}
|
|
84
|
+
setLocalValue(e.target.value);
|
|
85
|
+
debouncedOnChange(e.target.value);
|
|
69
86
|
}}
|
|
70
87
|
className={cn(className)}
|
|
71
88
|
{...props}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
+
import { debounce, FILTER_DEBOUNCE_MS } from "../utils/debounce";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns a stable debounced wrapper around the provided callback.
|
|
6
|
+
*
|
|
7
|
+
* The wrapper always invokes the *latest* version of `fn` (via a ref),
|
|
8
|
+
* so the debounce timer is never reset when `fn` changes — only when
|
|
9
|
+
* the caller invokes the returned function again.
|
|
10
|
+
*
|
|
11
|
+
* @param fn - The callback to debounce.
|
|
12
|
+
* @param delay - Debounce delay in ms. Defaults to `FILTER_DEBOUNCE_MS`.
|
|
13
|
+
*/
|
|
14
|
+
export function useDebouncedCallback<T extends (...args: any[]) => void>(
|
|
15
|
+
fn: T,
|
|
16
|
+
delay: number = FILTER_DEBOUNCE_MS,
|
|
17
|
+
): (...args: Parameters<T>) => void {
|
|
18
|
+
const fnRef = useRef(fn);
|
|
19
|
+
const debouncedRef = useRef<((...args: any[]) => void) | null>(null);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
fnRef.current = fn;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
debouncedRef.current = debounce((...args: any[]) => {
|
|
27
|
+
fnRef.current(...(args as Parameters<T>));
|
|
28
|
+
}, delay);
|
|
29
|
+
}, [delay]);
|
|
30
|
+
|
|
31
|
+
return useCallback((...args: Parameters<T>) => {
|
|
32
|
+
debouncedRef.current?.(...args);
|
|
33
|
+
}, []);
|
|
34
|
+
}
|
|
@@ -61,7 +61,10 @@ export function useObjectSearchParams<TFilter, TOrderBy>(
|
|
|
61
61
|
paginationConfig?: PaginationConfig,
|
|
62
62
|
) {
|
|
63
63
|
const defaultPageSize = paginationConfig?.defaultPageSize ?? 10;
|
|
64
|
-
const validPageSizes =
|
|
64
|
+
const validPageSizes = useMemo(
|
|
65
|
+
() => paginationConfig?.validPageSizes ?? [defaultPageSize],
|
|
66
|
+
[paginationConfig?.validPageSizes, defaultPageSize],
|
|
67
|
+
);
|
|
65
68
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
66
69
|
|
|
67
70
|
// Seed local state from URL on initial load
|
|
@@ -76,8 +79,10 @@ export function useObjectSearchParams<TFilter, TOrderBy>(
|
|
|
76
79
|
const [sort, setLocalSort] = useState<SortState | null>(initial.sort);
|
|
77
80
|
|
|
78
81
|
// Pagination — cursor-based with a stack to support "previous page" navigation.
|
|
79
|
-
const getValidPageSize = (
|
|
80
|
-
validPageSizes.includes(size) ? size : defaultPageSize
|
|
82
|
+
const getValidPageSize = useCallback(
|
|
83
|
+
(size: number) => (validPageSizes.includes(size) ? size : defaultPageSize),
|
|
84
|
+
[validPageSizes, defaultPageSize],
|
|
85
|
+
);
|
|
81
86
|
|
|
82
87
|
const [pageSize, setPageSizeState] = useState<number>(
|
|
83
88
|
getValidPageSize(initial.pageSize ?? defaultPageSize),
|
|
@@ -166,7 +171,7 @@ export function useObjectSearchParams<TFilter, TOrderBy>(
|
|
|
166
171
|
resetPagination();
|
|
167
172
|
syncToUrl([], null, defaultPageSize, 0);
|
|
168
173
|
setPageSizeState(defaultPageSize);
|
|
169
|
-
}, [syncToUrl, resetPagination]);
|
|
174
|
+
}, [syncToUrl, resetPagination, defaultPageSize]);
|
|
170
175
|
|
|
171
176
|
// -- Pagination callbacks ---------------------------------------------------
|
|
172
177
|
// Uses a cursor stack to track visited pages. "Next" pushes the current
|
|
@@ -204,7 +209,7 @@ export function useObjectSearchParams<TFilter, TOrderBy>(
|
|
|
204
209
|
resetPagination();
|
|
205
210
|
debouncedSyncRef.current(f, s, validated);
|
|
206
211
|
},
|
|
207
|
-
[resetPagination],
|
|
212
|
+
[resetPagination, getValidPageSize],
|
|
208
213
|
);
|
|
209
214
|
|
|
210
215
|
// -- Derived query objects ---------------------------------------------------
|
package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/debounce.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Default debounce delay for keystroke-driven filter inputs (search, text, numeric). */
|
|
2
|
+
export const FILTER_DEBOUNCE_MS = 300;
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Creates a debounced version of the provided function.
|
|
3
6
|
*
|
|
@@ -10,7 +13,7 @@
|
|
|
10
13
|
* @param ms - The debounce delay in milliseconds.
|
|
11
14
|
* @returns A new function with the same signature that delays execution.
|
|
12
15
|
*/
|
|
13
|
-
export function debounce<T extends (...args:
|
|
16
|
+
export function debounce<T extends (...args: any[]) => void>(
|
|
14
17
|
fn: T,
|
|
15
18
|
ms: number,
|
|
16
19
|
): (...args: Parameters<T>) => void {
|
package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts
CHANGED
|
@@ -25,6 +25,8 @@ export type FilterFieldType =
|
|
|
25
25
|
| "boolean"
|
|
26
26
|
| "date"
|
|
27
27
|
| "daterange"
|
|
28
|
+
| "datetime"
|
|
29
|
+
| "datetimerange"
|
|
28
30
|
| "multipicklist"
|
|
29
31
|
| "search";
|
|
30
32
|
|
|
@@ -337,13 +339,34 @@ function buildSingleFilter<TFilter>(
|
|
|
337
339
|
return { [field]: { in: values } } as TFilter;
|
|
338
340
|
}
|
|
339
341
|
case "date": {
|
|
342
|
+
if (!min && !max) return null;
|
|
343
|
+
const op = value ?? (min ? "gte" : "lte");
|
|
344
|
+
const dateStr = min ?? max;
|
|
345
|
+
return { [field]: { [op]: { value: dateStr } } } as TFilter;
|
|
346
|
+
}
|
|
347
|
+
case "daterange": {
|
|
348
|
+
if (!min && !max) return null;
|
|
349
|
+
const clauses: TFilter[] = [];
|
|
350
|
+
if (min) {
|
|
351
|
+
clauses.push({
|
|
352
|
+
[field]: { gte: { value: min } },
|
|
353
|
+
} as TFilter);
|
|
354
|
+
}
|
|
355
|
+
if (max) {
|
|
356
|
+
clauses.push({
|
|
357
|
+
[field]: { lte: { value: max } },
|
|
358
|
+
} as TFilter);
|
|
359
|
+
}
|
|
360
|
+
return clauses.length === 1 ? clauses[0] : ({ and: clauses } as TFilter);
|
|
361
|
+
}
|
|
362
|
+
case "datetime": {
|
|
340
363
|
if (!min && !max) return null;
|
|
341
364
|
const op = value ?? (min ? "gte" : "lte");
|
|
342
365
|
const dateStr = min ?? max;
|
|
343
366
|
const isoStr = op === "gte" || op === "gt" ? toStartOfDay(dateStr!) : toEndOfDay(dateStr!);
|
|
344
367
|
return { [field]: { [op]: { value: isoStr } } } as TFilter;
|
|
345
368
|
}
|
|
346
|
-
case "
|
|
369
|
+
case "datetimerange": {
|
|
347
370
|
if (!min && !max) return null;
|
|
348
371
|
const clauses: TFilter[] = [];
|
|
349
372
|
if (min) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import SEARCH_ACCOUNTS_QUERY from "./query/searchAccounts.graphql?raw";
|
|
2
|
+
import DISTINCT_INDUSTRIES_QUERY from "./query/distinctAccountIndustries.graphql?raw";
|
|
3
|
+
import DISTINCT_TYPES_QUERY from "./query/distinctAccountTypes.graphql?raw";
|
|
4
|
+
import {
|
|
5
|
+
searchObjects,
|
|
6
|
+
fetchDistinctValues,
|
|
7
|
+
type ObjectSearchOptions,
|
|
8
|
+
type PicklistOption,
|
|
9
|
+
} from "../../features/object-search/api/objectSearchService";
|
|
10
|
+
import type {
|
|
11
|
+
SearchAccountsQuery,
|
|
12
|
+
SearchAccountsQueryVariables,
|
|
13
|
+
DistinctAccountIndustriesQuery,
|
|
14
|
+
DistinctAccountTypesQuery,
|
|
15
|
+
} from "../graphql-operations-types";
|
|
16
|
+
|
|
17
|
+
export type AccountSearchResult = NonNullable<SearchAccountsQuery["uiapi"]["query"]["Account"]>;
|
|
18
|
+
|
|
19
|
+
export type AccountSearchOptions = ObjectSearchOptions<
|
|
20
|
+
SearchAccountsQueryVariables["where"],
|
|
21
|
+
SearchAccountsQueryVariables["orderBy"]
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export type { PicklistOption };
|
|
25
|
+
|
|
26
|
+
export async function searchAccounts(
|
|
27
|
+
options: AccountSearchOptions = {},
|
|
28
|
+
): Promise<AccountSearchResult> {
|
|
29
|
+
return searchObjects<AccountSearchResult, SearchAccountsQuery, SearchAccountsQueryVariables>(
|
|
30
|
+
SEARCH_ACCOUNTS_QUERY,
|
|
31
|
+
"Account",
|
|
32
|
+
options,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export async function fetchDistinctIndustries(): Promise<PicklistOption[]> {
|
|
37
|
+
return fetchDistinctValues<DistinctAccountIndustriesQuery>(
|
|
38
|
+
DISTINCT_INDUSTRIES_QUERY,
|
|
39
|
+
"Account",
|
|
40
|
+
"Industry",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export async function fetchDistinctTypes(): Promise<PicklistOption[]> {
|
|
45
|
+
return fetchDistinctValues<DistinctAccountTypesQuery>(DISTINCT_TYPES_QUERY, "Account", "Type");
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
query DistinctAccountIndustries {
|
|
2
|
+
uiapi {
|
|
3
|
+
aggregate {
|
|
4
|
+
Account(groupBy: { Industry: { group: true } }) {
|
|
5
|
+
edges {
|
|
6
|
+
node {
|
|
7
|
+
aggregate @optional {
|
|
8
|
+
Industry @optional {
|
|
9
|
+
value
|
|
10
|
+
displayValue
|
|
11
|
+
label
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
query GetAccountDetail($id: ID!) {
|
|
2
|
+
uiapi {
|
|
3
|
+
query {
|
|
4
|
+
Account(where: { Id: { eq: $id } }) {
|
|
5
|
+
edges {
|
|
6
|
+
node {
|
|
7
|
+
Id
|
|
8
|
+
Name @optional {
|
|
9
|
+
value
|
|
10
|
+
displayValue
|
|
11
|
+
}
|
|
12
|
+
Owner @optional {
|
|
13
|
+
Name @optional {
|
|
14
|
+
value
|
|
15
|
+
displayValue
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
Phone @optional {
|
|
19
|
+
value
|
|
20
|
+
displayValue
|
|
21
|
+
}
|
|
22
|
+
Fax @optional {
|
|
23
|
+
value
|
|
24
|
+
displayValue
|
|
25
|
+
}
|
|
26
|
+
Parent @optional {
|
|
27
|
+
Name @optional {
|
|
28
|
+
value
|
|
29
|
+
displayValue
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
Website @optional {
|
|
33
|
+
value
|
|
34
|
+
displayValue
|
|
35
|
+
}
|
|
36
|
+
Type @optional {
|
|
37
|
+
value
|
|
38
|
+
displayValue
|
|
39
|
+
}
|
|
40
|
+
NumberOfEmployees @optional {
|
|
41
|
+
value
|
|
42
|
+
displayValue
|
|
43
|
+
}
|
|
44
|
+
Industry @optional {
|
|
45
|
+
value
|
|
46
|
+
displayValue
|
|
47
|
+
}
|
|
48
|
+
AnnualRevenue @optional {
|
|
49
|
+
value
|
|
50
|
+
displayValue
|
|
51
|
+
}
|
|
52
|
+
Description @optional {
|
|
53
|
+
value
|
|
54
|
+
displayValue
|
|
55
|
+
}
|
|
56
|
+
BillingStreet @optional {
|
|
57
|
+
value
|
|
58
|
+
displayValue
|
|
59
|
+
}
|
|
60
|
+
BillingCity @optional {
|
|
61
|
+
value
|
|
62
|
+
displayValue
|
|
63
|
+
}
|
|
64
|
+
BillingState @optional {
|
|
65
|
+
value
|
|
66
|
+
displayValue
|
|
67
|
+
}
|
|
68
|
+
BillingPostalCode @optional {
|
|
69
|
+
value
|
|
70
|
+
displayValue
|
|
71
|
+
}
|
|
72
|
+
BillingCountry @optional {
|
|
73
|
+
value
|
|
74
|
+
displayValue
|
|
75
|
+
}
|
|
76
|
+
ShippingStreet @optional {
|
|
77
|
+
value
|
|
78
|
+
displayValue
|
|
79
|
+
}
|
|
80
|
+
ShippingCity @optional {
|
|
81
|
+
value
|
|
82
|
+
displayValue
|
|
83
|
+
}
|
|
84
|
+
ShippingState @optional {
|
|
85
|
+
value
|
|
86
|
+
displayValue
|
|
87
|
+
}
|
|
88
|
+
ShippingPostalCode @optional {
|
|
89
|
+
value
|
|
90
|
+
displayValue
|
|
91
|
+
}
|
|
92
|
+
ShippingCountry @optional {
|
|
93
|
+
value
|
|
94
|
+
displayValue
|
|
95
|
+
}
|
|
96
|
+
CreatedBy @optional {
|
|
97
|
+
Name @optional {
|
|
98
|
+
value
|
|
99
|
+
displayValue
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
CreatedDate @optional {
|
|
103
|
+
value
|
|
104
|
+
displayValue
|
|
105
|
+
}
|
|
106
|
+
LastModifiedBy @optional {
|
|
107
|
+
Name @optional {
|
|
108
|
+
value
|
|
109
|
+
displayValue
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
LastModifiedDate @optional {
|
|
113
|
+
value
|
|
114
|
+
displayValue
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
query SearchAccounts(
|
|
2
|
+
$first: Int
|
|
3
|
+
$after: String
|
|
4
|
+
$where: Account_Filter
|
|
5
|
+
$orderBy: Account_OrderBy
|
|
6
|
+
) {
|
|
7
|
+
uiapi {
|
|
8
|
+
query {
|
|
9
|
+
Account(first: $first, after: $after, where: $where, orderBy: $orderBy) {
|
|
10
|
+
edges {
|
|
11
|
+
node {
|
|
12
|
+
Id
|
|
13
|
+
Name @optional {
|
|
14
|
+
value
|
|
15
|
+
displayValue
|
|
16
|
+
}
|
|
17
|
+
Industry @optional {
|
|
18
|
+
value
|
|
19
|
+
displayValue
|
|
20
|
+
}
|
|
21
|
+
Type @optional {
|
|
22
|
+
value
|
|
23
|
+
displayValue
|
|
24
|
+
}
|
|
25
|
+
Phone @optional {
|
|
26
|
+
value
|
|
27
|
+
displayValue
|
|
28
|
+
}
|
|
29
|
+
Owner @optional {
|
|
30
|
+
Name @optional {
|
|
31
|
+
value
|
|
32
|
+
displayValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
AnnualRevenue @optional {
|
|
36
|
+
value
|
|
37
|
+
displayValue
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
pageInfo {
|
|
42
|
+
hasNextPage
|
|
43
|
+
hasPreviousPage
|
|
44
|
+
endCursor
|
|
45
|
+
startCursor
|
|
46
|
+
}
|
|
47
|
+
totalCount
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -57,6 +57,7 @@ export function AgentforceConversationClient({
|
|
|
57
57
|
agentId,
|
|
58
58
|
inline: inlineProp,
|
|
59
59
|
headerEnabled,
|
|
60
|
+
showHeaderIcon,
|
|
60
61
|
width,
|
|
61
62
|
height,
|
|
62
63
|
styleTokens,
|
|
@@ -68,6 +69,8 @@ export function AgentforceConversationClient({
|
|
|
68
69
|
const renderingConfig: NonNullable<AgentforceClientConfig["renderingConfig"]> = {
|
|
69
70
|
mode: inlineProp ? "inline" : "floating",
|
|
70
71
|
...(headerEnabled !== undefined && { headerEnabled }),
|
|
72
|
+
...(showHeaderIcon !== undefined && { showHeaderIcon }),
|
|
73
|
+
...{ showAvatar: false },
|
|
71
74
|
...(width !== undefined && { width }),
|
|
72
75
|
...(height !== undefined && { height }),
|
|
73
76
|
};
|
|
@@ -77,7 +80,7 @@ export function AgentforceConversationClient({
|
|
|
77
80
|
...(styleTokens !== undefined && { styleTokens }),
|
|
78
81
|
renderingConfig,
|
|
79
82
|
};
|
|
80
|
-
}, [agentId, inlineProp, headerEnabled, width, height, styleTokens]);
|
|
83
|
+
}, [agentId, inlineProp, headerEnabled, showHeaderIcon, width, height, styleTokens]);
|
|
81
84
|
|
|
82
85
|
const inline = normalizedAgentforceClientConfig?.renderingConfig?.mode === "inline";
|
|
83
86
|
|
|
@@ -85,7 +88,7 @@ export function AgentforceConversationClient({
|
|
|
85
88
|
if (!normalizedAgentforceClientConfig?.agentId) {
|
|
86
89
|
throw new Error(
|
|
87
90
|
"AgentforceConversationClient requires agentId. " +
|
|
88
|
-
"Pass flat props only (agentId, inline, headerEnabled, width, height, styleTokens).",
|
|
91
|
+
"Pass flat props only (agentId, inline, headerEnabled, showHeaderIcon, width, height, styleTokens).",
|
|
89
92
|
);
|
|
90
93
|
}
|
|
91
94
|
|