@dropins/storefront-company-switcher 1.0.0-beta5 → 1.0.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as
|
|
3
|
+
import{jsx as h}from"@dropins/tools/preact-jsx-runtime.js";import{useState as f,useCallback as p,useEffect as x,useMemo as I}from"@dropins/tools/preact-hooks.js";import{Picker as w}from"@dropins/tools/components.js";import{events as l}from"@dropins/tools/event-bus.js";import{C as S,e as H,c as g,u as K,h as k}from"../chunks/customerCompanyContext.js";import"@dropins/tools/lib.js";import"@dropins/tools/fetch-graphql.js";const G=()=>{const[c,r]=f([]),[i,a]=f({text:"",value:""}),C=p(async()=>{var e,n;try{const o=await S.getInstance().getCustomerCompanyInfo();r(o.customerCompanies),(e=o.currentCompany)!=null&&e.name&&((n=o.currentCompany)!=null&&n.id)&&a({text:o.currentCompany.name,value:o.currentCompany.id})}catch(t){console.error("Failed to load company data:",t)}},[]),u=p(async e=>{const t=e.target.value,o=c.find(v=>v.value===t);o&&a(o),H().setCompanyHeaders(t),t?sessionStorage.setItem(g.getConfig().companySessionStorageKey,t):sessionStorage.removeItem(g.getConfig().companySessionStorageKey);const d=await K();k().setGroupHeaders(d),d?sessionStorage.setItem(g.getConfig().groupSessionStorageKey,d):sessionStorage.removeItem(g.getConfig().groupSessionStorageKey),l.emit("companyContext/changed",t)},[c]),s=p(()=>{S.getInstance().resetCache(),r([]),a({text:"",value:""})},[]),y=p(e=>{e?C():s()},[C,s]),m=p(e=>{if(!e){s();return}r(n=>{const t=n.find(o=>o.value===e);return t&&a(t),n})},[s,r,a]);return x(()=>{const e=l.on("authenticated",y,{eager:!0}),n=l.on("companyContext/changed",m,{eager:!0});return()=>{var t,o;(t=e==null?void 0:e.off)==null||t.call(e),(o=n==null?void 0:n.off)==null||o.call(n)}},[y,m]),{companies:c,currentCompany:i,handleCompanyChange:u}},P=({ariaLabel:c,...r})=>{const{companies:i,currentCompany:a,handleCompanyChange:C}=G(),[u,s]=f(!0),y=I(()=>i,[i]);return x(()=>{const m=l.on("checkout/initialized",()=>{s(!1)});return()=>m==null?void 0:m.off()},[]),i.length<2||!u?null:h("div",{...r,children:h(w,{options:y,value:a.value,onChange:C,"aria-label":c||"Select company","aria-describedby":"company-switcher-description"})})};export{P as CompanySwitcher,P as default,G as useCompanyData};
|
|
4
4
|
//# sourceMappingURL=CompanySwitcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanySwitcher.js","sources":["/@dropins/storefront-company-switcher/src/containers/CompanySwitcher/useCompanyData.ts","/@dropins/storefront-company-switcher/src/containers/CompanySwitcher/CompanySwitcher.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { events } from '@adobe-commerce/event-bus';\nimport { CustomerCompanyContext, updateCustomerGroup } from '@/company-switcher/api/customerCompanyContext';\nimport type { CompanyOption, CustomerCompanyInfo, UseCompanyDataReturn } from '@/company-switcher/types/company';\nimport { config } from '@/company-switcher/api/initialize';\nimport { getGroupHeaderManager } from '@/company-switcher/api/setGroupHeaders';\nimport { getCompanyHeaderManager } from '@/company-switcher/api/setCompanyHeaders';\n\n/**\n * Custom hook that manages company data fetching and state management\n * @returns {UseCompanyDataReturn} Company data and handlers\n */\nexport const useCompanyData = (): UseCompanyDataReturn => {\n const [companies, setCompanies] = useState<CompanyOption[]>([]);\n const [currentCompany, setCurrentCompany] = useState<CompanyOption>({ text: '', value: '' });\n\n\n /**\n * Loads company information from the API and updates state\n */\n const loadCompanyData = useCallback(async (): Promise<void> => {\n try {\n const customerCompanyContext = CustomerCompanyContext.getInstance();\n const companyInfo: CustomerCompanyInfo = await customerCompanyContext.getCustomerCompanyInfo();\n setCompanies(companyInfo.customerCompanies);\n \n if (companyInfo.currentCompany?.name && companyInfo.currentCompany?.id) {\n setCurrentCompany({\n text: companyInfo.currentCompany.name, \n value: companyInfo.currentCompany.id\n });\n }\n } catch (err) {\n console.error('Failed to load company data:', err);\n }\n }, []);\n\n /**\n * Handles company selection change\n */\n const handleCompanyChange = useCallback(async (event: Event): Promise<void> => {\n const target = event.target as HTMLSelectElement;\n const companyId = target.value;\n \n // Update local state\n const selectedCompany = companies.find(c => c.value === companyId);\n if (selectedCompany) {\n setCurrentCompany(selectedCompany);\n }\n \n getCompanyHeaderManager().setCompanyHeaders(companyId);\n if (companyId) {\n sessionStorage.setItem(config.getConfig().companySessionStorageKey, companyId);\n } else {\n sessionStorage.removeItem(config.getConfig().companySessionStorageKey);\n }\n const groupId = await updateCustomerGroup();\n getGroupHeaderManager().setGroupHeaders(groupId);\n if (groupId) {\n sessionStorage.setItem(config.getConfig().groupSessionStorageKey, groupId);\n } else {\n sessionStorage.removeItem(config.getConfig().groupSessionStorageKey);\n }\n\n events.emit('companyContext/changed', companyId);\n }, [companies]);\n\n /**\n * Clears company context\n */\n const clearCompanyContext = useCallback((): void => {\n const customerCompanyContext = CustomerCompanyContext.getInstance();\n customerCompanyContext.resetCache();\n setCompanies([]);\n setCurrentCompany({ text: '', value: '' });\n }, []);\n\n /**\n * Handles authentication state changes\n */\n const handleAuthenticationChange = useCallback((authenticated: boolean) => {\n if (authenticated) {\n loadCompanyData();\n } else {\n clearCompanyContext();\n }\n }, [loadCompanyData, clearCompanyContext]);\n\n /**\n * Handles company context restoration\n */\n const handleCompanyContextRestored = useCallback((companyId: string | null) => {\n if (!companyId) {\n clearCompanyContext();\n return;\n }\n // Store the company ID to be restored when companies are loaded\n setCompanies(prevCompanies => {\n const restoredCompany = prevCompanies.find(company => company.value === companyId);\n if (restoredCompany) {\n setCurrentCompany(restoredCompany);\n }\n return prevCompanies;\n });\n }, [clearCompanyContext, setCompanies, setCurrentCompany]);\n\n // Set up event listeners\n useEffect(() => {\n const unsubscribeAuth = events.on('authenticated', handleAuthenticationChange, { eager: true });\n const unsubscribeRestore = events.on('companyContext/changed', handleCompanyContextRestored, { eager: true });\n \n return () => {\n unsubscribeAuth?.off?.();\n unsubscribeRestore?.off?.();\n };\n }, [handleAuthenticationChange, handleCompanyContextRestored]);\n\n return {\n companies,\n currentCompany,\n handleCompanyChange\n };\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n \nimport { HTMLAttributes } from 'preact/compat';\nimport { useMemo } from 'preact/hooks';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { Picker } from '@adobe-commerce/elsie/components';\nimport { useCompanyData } from './useCompanyData';\n\nexport interface CompanySwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Custom aria-label for the picker */\n ariaLabel?: string;\n}\n\n/**\n * CompanySwitcher component allows users to switch between companies they have access to.\n * It only renders when a user has access to multiple companies.\n * This is a presentational component that uses the useCompanyData hook for all business logic.\n */\nexport const CompanySwitcher: Container<CompanySwitcherProps> = ({ \n ariaLabel,\n ...props \n}) => {\n const { companies, currentCompany, handleCompanyChange } = useCompanyData();\n\n // Memoize the companies array to prevent unnecessary re-renders\n const memoizedCompanies = useMemo(() => companies, [companies]);\n\n // Only render if user has access to multiple companies\n if (companies.length < 2) {\n return null;\n }\n\n return (\n <div {...props}>\n <Picker \n options={memoizedCompanies} \n value={currentCompany.value} \n onChange={handleCompanyChange}\n aria-label={ariaLabel || 'Select company'}\n aria-describedby=\"company-switcher-description\"\n />\n </div>\n );\n};\n"],"names":["useCompanyData","companies","setCompanies","useState","currentCompany","setCurrentCompany","loadCompanyData","useCallback","companyInfo","CustomerCompanyContext","_a","_b","err","handleCompanyChange","event","companyId","selectedCompany","c","getCompanyHeaderManager","config","groupId","updateCustomerGroup","getGroupHeaderManager","events","clearCompanyContext","handleAuthenticationChange","authenticated","handleCompanyContextRestored","prevCompanies","restoredCompany","company","useEffect","unsubscribeAuth","unsubscribeRestore","CompanySwitcher","ariaLabel","props","memoizedCompanies","useMemo","jsx","Picker"],"mappings":"uaAqBO,MAAMA,EAAiB,IAA4B,CACxD,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAA0B,CAAA,CAAE,EACxD,CAACC,EAAgBC,CAAiB,EAAIF,EAAwB,CAAE,KAAM,GAAI,MAAO,GAAI,EAMrFG,EAAkBC,EAAY,SAA2B,SAC7D,GAAI,CAEF,MAAMC,EAAmC,MADVC,EAAuB,YAAA,EACgB,uBAAA,EACtEP,EAAaM,EAAY,iBAAiB,GAEtCE,EAAAF,EAAY,iBAAZ,MAAAE,EAA4B,QAAQC,EAAAH,EAAY,iBAAZ,MAAAG,EAA4B,KAClEN,EAAkB,CAChB,KAAMG,EAAY,eAAe,KACjC,MAAOA,EAAY,eAAe,EAAA,CACnC,CAEL,OAASI,EAAK,CACZ,QAAQ,MAAM,+BAAgCA,CAAG,CACnD,CACF,EAAG,CAAA,CAAE,EAKCC,EAAsBN,EAAY,MAAOO,GAAgC,CAE7E,MAAMC,EADSD,EAAM,OACI,MAGnBE,EAAkBf,EAAU,KAAKgB,GAAKA,EAAE,QAAUF,CAAS,EAC7DC,GACFX,EAAkBW,CAAe,EAGnCE,EAAA,EAA0B,kBAAkBH,CAAS,EACjDA,EACF,eAAe,QAAQI,EAAO,UAAA,EAAY,yBAA0BJ,CAAS,EAE7E,eAAe,WAAWI,EAAO,UAAA,EAAY,wBAAwB,EAEvE,MAAMC,EAAU,MAAMC,EAAA,EACtBC,EAAA,EAAwB,gBAAgBF,CAAO,EAC3CA,EACF,eAAe,QAAQD,EAAO,UAAA,EAAY,uBAAwBC,CAAO,EAEzE,eAAe,WAAWD,EAAO,UAAA,EAAY,sBAAsB,EAGrEI,EAAO,KAAK,yBAA0BR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,CAAK,GAAGH,EACP,SAAAG,EAACC,EAAA,CACC,QAASH,EACT,MAAOjC,EAAe,MACtB,SAAUS,EACV,aAAYsB,GAAa,iBACzB,mBAAiB,8BAAA,CAAA,EAErB,CAEJ"}
|
|
1
|
+
{"version":3,"file":"CompanySwitcher.js","sources":["/@dropins/storefront-company-switcher/src/containers/CompanySwitcher/useCompanyData.ts","/@dropins/storefront-company-switcher/src/containers/CompanySwitcher/CompanySwitcher.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { events } from '@adobe-commerce/event-bus';\nimport { CustomerCompanyContext, updateCustomerGroup } from '@/company-switcher/api/customerCompanyContext';\nimport type { CompanyOption, CustomerCompanyInfo, UseCompanyDataReturn } from '@/company-switcher/types/company';\nimport { config } from '@/company-switcher/api/initialize';\nimport { getGroupHeaderManager } from '@/company-switcher/api/setGroupHeaders';\nimport { getCompanyHeaderManager } from '@/company-switcher/api/setCompanyHeaders';\n\n/**\n * Custom hook that manages company data fetching and state management\n * @returns {UseCompanyDataReturn} Company data and handlers\n */\nexport const useCompanyData = (): UseCompanyDataReturn => {\n const [companies, setCompanies] = useState<CompanyOption[]>([]);\n const [currentCompany, setCurrentCompany] = useState<CompanyOption>({ text: '', value: '' });\n\n\n /**\n * Loads company information from the API and updates state\n */\n const loadCompanyData = useCallback(async (): Promise<void> => {\n try {\n const customerCompanyContext = CustomerCompanyContext.getInstance();\n const companyInfo: CustomerCompanyInfo = await customerCompanyContext.getCustomerCompanyInfo();\n setCompanies(companyInfo.customerCompanies);\n \n if (companyInfo.currentCompany?.name && companyInfo.currentCompany?.id) {\n setCurrentCompany({\n text: companyInfo.currentCompany.name, \n value: companyInfo.currentCompany.id\n });\n }\n } catch (err) {\n console.error('Failed to load company data:', err);\n }\n }, []);\n\n /**\n * Handles company selection change\n */\n const handleCompanyChange = useCallback(async (event: Event): Promise<void> => {\n const target = event.target as HTMLSelectElement;\n const companyId = target.value;\n \n // Update local state\n const selectedCompany = companies.find(c => c.value === companyId);\n if (selectedCompany) {\n setCurrentCompany(selectedCompany);\n }\n \n getCompanyHeaderManager().setCompanyHeaders(companyId);\n if (companyId) {\n sessionStorage.setItem(config.getConfig().companySessionStorageKey, companyId);\n } else {\n sessionStorage.removeItem(config.getConfig().companySessionStorageKey);\n }\n const groupId = await updateCustomerGroup();\n getGroupHeaderManager().setGroupHeaders(groupId);\n if (groupId) {\n sessionStorage.setItem(config.getConfig().groupSessionStorageKey, groupId);\n } else {\n sessionStorage.removeItem(config.getConfig().groupSessionStorageKey);\n }\n\n events.emit('companyContext/changed', companyId);\n }, [companies]);\n\n /**\n * Clears company context\n */\n const clearCompanyContext = useCallback((): void => {\n const customerCompanyContext = CustomerCompanyContext.getInstance();\n customerCompanyContext.resetCache();\n setCompanies([]);\n setCurrentCompany({ text: '', value: '' });\n }, []);\n\n /**\n * Handles authentication state changes\n */\n const handleAuthenticationChange = useCallback((authenticated: boolean) => {\n if (authenticated) {\n loadCompanyData();\n } else {\n clearCompanyContext();\n }\n }, [loadCompanyData, clearCompanyContext]);\n\n /**\n * Handles company context restoration\n */\n const handleCompanyContextRestored = useCallback((companyId: string | null) => {\n if (!companyId) {\n clearCompanyContext();\n return;\n }\n // Store the company ID to be restored when companies are loaded\n setCompanies(prevCompanies => {\n const restoredCompany = prevCompanies.find(company => company.value === companyId);\n if (restoredCompany) {\n setCurrentCompany(restoredCompany);\n }\n return prevCompanies;\n });\n }, [clearCompanyContext, setCompanies, setCurrentCompany]);\n\n // Set up event listeners\n useEffect(() => {\n const unsubscribeAuth = events.on('authenticated', handleAuthenticationChange, { eager: true });\n const unsubscribeRestore = events.on('companyContext/changed', handleCompanyContextRestored, { eager: true });\n \n return () => {\n unsubscribeAuth?.off?.();\n unsubscribeRestore?.off?.();\n };\n }, [handleAuthenticationChange, handleCompanyContextRestored]);\n\n return {\n companies,\n currentCompany,\n handleCompanyChange\n };\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n \nimport { HTMLAttributes } from 'preact/compat';\nimport { useMemo, useState, useEffect } from 'preact/hooks';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { Picker } from '@adobe-commerce/elsie/components';\nimport { events } from '@adobe-commerce/event-bus';\nimport { useCompanyData } from './useCompanyData';\n\nexport interface CompanySwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Custom aria-label for the picker */\n ariaLabel?: string;\n}\n\n/**\n * CompanySwitcher component allows users to switch between companies they have access to.\n * It only renders when a user has access to multiple companies.\n * This is a presentational component that uses the useCompanyData hook for all business logic.\n */\nexport const CompanySwitcher: Container<CompanySwitcherProps> = ({ \n ariaLabel,\n ...props \n}) => {\n const { companies, currentCompany, handleCompanyChange } = useCompanyData();\n const [isVisible, setIsVisible] = useState(true);\n\n // Memoize the companies array to prevent unnecessary re-renders\n const memoizedCompanies = useMemo(() => companies, [companies]);\n\n // Listen for checkout/initialized event to hide the picker\n useEffect(() => {\n const unsubscribe = events.on('checkout/initialized', () => {\n setIsVisible(false);\n });\n\n return () => unsubscribe?.off();\n }, []);\n\n // Only render if user has access to multiple companies and picker is visible\n if (companies.length < 2 || !isVisible) {\n return null;\n }\n\n return (\n <div {...props}>\n <Picker \n options={memoizedCompanies} \n value={currentCompany.value} \n onChange={handleCompanyChange}\n aria-label={ariaLabel || 'Select company'}\n aria-describedby=\"company-switcher-description\"\n />\n </div>\n );\n};\n"],"names":["useCompanyData","companies","setCompanies","useState","currentCompany","setCurrentCompany","loadCompanyData","useCallback","companyInfo","CustomerCompanyContext","_a","_b","err","handleCompanyChange","event","companyId","selectedCompany","c","getCompanyHeaderManager","config","groupId","updateCustomerGroup","getGroupHeaderManager","events","clearCompanyContext","handleAuthenticationChange","authenticated","handleCompanyContextRestored","prevCompanies","restoredCompany","company","useEffect","unsubscribeAuth","unsubscribeRestore","CompanySwitcher","ariaLabel","props","isVisible","setIsVisible","memoizedCompanies","useMemo","unsubscribe","jsx","Picker"],"mappings":"uaAqBO,MAAMA,EAAiB,IAA4B,CACxD,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAA0B,CAAA,CAAE,EACxD,CAACC,EAAgBC,CAAiB,EAAIF,EAAwB,CAAE,KAAM,GAAI,MAAO,GAAI,EAMrFG,EAAkBC,EAAY,SAA2B,SAC7D,GAAI,CAEF,MAAMC,EAAmC,MADVC,EAAuB,YAAA,EACgB,uBAAA,EACtEP,EAAaM,EAAY,iBAAiB,GAEtCE,EAAAF,EAAY,iBAAZ,MAAAE,EAA4B,QAAQC,EAAAH,EAAY,iBAAZ,MAAAG,EAA4B,KAClEN,EAAkB,CAChB,KAAMG,EAAY,eAAe,KACjC,MAAOA,EAAY,eAAe,EAAA,CACnC,CAEL,OAASI,EAAK,CACZ,QAAQ,MAAM,+BAAgCA,CAAG,CACnD,CACF,EAAG,CAAA,CAAE,EAKCC,EAAsBN,EAAY,MAAOO,GAAgC,CAE7E,MAAMC,EADSD,EAAM,OACI,MAGnBE,EAAkBf,EAAU,KAAKgB,GAAKA,EAAE,QAAUF,CAAS,EAC7DC,GACFX,EAAkBW,CAAe,EAGnCE,EAAA,EAA0B,kBAAkBH,CAAS,EACjDA,EACF,eAAe,QAAQI,EAAO,UAAA,EAAY,yBAA0BJ,CAAS,EAE7E,eAAe,WAAWI,EAAO,UAAA,EAAY,wBAAwB,EAEvE,MAAMC,EAAU,MAAMC,EAAA,EACtBC,EAAA,EAAwB,gBAAgBF,CAAO,EAC3CA,EACF,eAAe,QAAQD,EAAO,UAAA,EAAY,uBAAwBC,CAAO,EAEzE,eAAe,WAAWD,EAAO,UAAA,EAAY,sBAAsB,EAGrEI,EAAO,KAAK,yBAA0BR,CAAS,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B,EAAU,IAAM,CACd,MAAMU,EAAclB,EAAO,GAAG,uBAAwB,IAAM,CAC1De,EAAa,EAAK,CACpB,CAAC,EAED,MAAO,IAAMG,GAAA,YAAAA,EAAa,KAC5B,EAAG,CAAA,CAAE,EAGDxC,EAAU,OAAS,GAAK,CAACoC,EACpB,KAIPK,EAAC,MAAA,CAAK,GAAGN,EACP,SAAAM,EAACC,EAAA,CACC,QAASJ,EACT,MAAOnC,EAAe,MACtB,SAAUS,EACV,aAAYsB,GAAa,iBACzB,mBAAiB,8BAAA,CAAA,EAErB,CAEJ"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-company-switcher", "version": "1.0.0
|
|
1
|
+
{"name": "@dropins/storefront-company-switcher", "version": "1.0.0", "@dropins/tools": "^1.3.0", "license": "SEE LICENSE IN LICENSE.md"}
|