@dropins/storefront-company-management 1.0.0-beta2

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.
Files changed (76) hide show
  1. package/LICENSE.md +128 -0
  2. package/api/checkIsCompanyEnabled/checkIsCompanyEnabled.d.ts +4 -0
  3. package/api/checkIsCompanyEnabled/index.d.ts +18 -0
  4. package/api/fetch-graphql/fetch-graphql.d.ts +24 -0
  5. package/api/fetch-graphql/index.d.ts +18 -0
  6. package/api/getCompany/getCompany.d.ts +5 -0
  7. package/api/getCompany/graphql/getCustomerRole.graphql.d.ts +18 -0
  8. package/api/getCompany/index.d.ts +18 -0
  9. package/api/getCountries/getCountries.d.ts +9 -0
  10. package/api/getCountries/graphql/getCountries.graphql.d.ts +18 -0
  11. package/api/getCountries/index.d.ts +18 -0
  12. package/api/graphql/CompanyFragment.graphql.d.ts +22 -0
  13. package/api/index.d.ts +24 -0
  14. package/api/initialize/index.d.ts +18 -0
  15. package/api/initialize/initialize.d.ts +25 -0
  16. package/api/updateCompany/graphql/updateCompany.graphql.d.ts +2 -0
  17. package/api/updateCompany/index.d.ts +18 -0
  18. package/api/updateCompany/updateCompany.d.ts +5 -0
  19. package/api/validateCompanyEmail/graphql/validateCompanyEmail.graphql.d.ts +18 -0
  20. package/api/validateCompanyEmail/index.d.ts +18 -0
  21. package/api/validateCompanyEmail/validateCompanyEmail.d.ts +4 -0
  22. package/api.d.ts +1 -0
  23. package/api.js +4 -0
  24. package/api.js.map +1 -0
  25. package/chunks/getCountries.js +135 -0
  26. package/chunks/getCountries.js.map +1 -0
  27. package/components/CompanyLoaders/CompanyLoaders.d.ts +6 -0
  28. package/components/CompanyLoaders/index.d.ts +18 -0
  29. package/components/CompanyProfileCard/CompanyProfileCard.d.ts +5 -0
  30. package/components/CompanyProfileCard/index.d.ts +19 -0
  31. package/components/EditCompanyProfile/CompanyAccountFields.d.ts +23 -0
  32. package/components/EditCompanyProfile/EditCompanyProfile.d.ts +5 -0
  33. package/components/EditCompanyProfile/LegalAddressFields.d.ts +50 -0
  34. package/components/EditCompanyProfile/index.d.ts +19 -0
  35. package/components/index.d.ts +20 -0
  36. package/containers/CompanyProfile/CompanyProfile.d.ts +5 -0
  37. package/containers/CompanyProfile/index.d.ts +19 -0
  38. package/containers/CompanyProfile.d.ts +3 -0
  39. package/containers/CompanyProfile.js +4 -0
  40. package/containers/CompanyProfile.js.map +1 -0
  41. package/containers/index.d.ts +18 -0
  42. package/data/models/company-address.d.ts +29 -0
  43. package/data/models/company.d.ts +65 -0
  44. package/data/models/country.d.ts +26 -0
  45. package/data/models/index.d.ts +20 -0
  46. package/data/transforms/index.d.ts +19 -0
  47. package/data/transforms/transform-company.d.ts +6 -0
  48. package/data/transforms/transform-countries.d.ts +10 -0
  49. package/hooks/containers/index.d.ts +18 -0
  50. package/hooks/containers/useCompanyProfile.d.ts +25 -0
  51. package/hooks/index.d.ts +19 -0
  52. package/hooks/useCountries.d.ts +15 -0
  53. package/hooks/useInLineAlert.d.ts +20 -0
  54. package/i18n/en_US.json.d.ts +96 -0
  55. package/lib/acdl.d.ts +43 -0
  56. package/lib/convertCase.d.ts +20 -0
  57. package/lib/convertToBoolean.d.ts +18 -0
  58. package/lib/convertToInputDateFormat.d.ts +18 -0
  59. package/lib/cookies.d.ts +18 -0
  60. package/lib/fetch-error.d.ts +21 -0
  61. package/lib/index.d.ts +25 -0
  62. package/lib/network-error.d.ts +6 -0
  63. package/lib/validationFields.d.ts +33 -0
  64. package/package.json +1 -0
  65. package/render/Provider.d.ts +8 -0
  66. package/render/index.d.ts +18 -0
  67. package/render/render.d.ts +4 -0
  68. package/render.d.ts +1 -0
  69. package/render.js +5 -0
  70. package/render.js.map +1 -0
  71. package/types/api/checkIsCompanyEnabled.types.d.ts +21 -0
  72. package/types/api/getCompany.types.d.ts +83 -0
  73. package/types/api/getCountries.types.d.ts +37 -0
  74. package/types/api/updateCompany.types.d.ts +73 -0
  75. package/types/api/validateCompanyEmail.types.d.ts +26 -0
  76. package/types/index.d.ts +23 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompanyProfile.js","sources":["/@dropins/storefront-company-management/src/components/CompanyProfileCard/CompanyProfileCard.tsx","/@dropins/storefront-company-management/src/hooks/useCountries.ts","/@dropins/storefront-company-management/src/components/EditCompanyProfile/CompanyAccountFields.tsx","/@dropins/storefront-company-management/src/components/EditCompanyProfile/LegalAddressFields.tsx","/@dropins/storefront-company-management/src/components/EditCompanyProfile/EditCompanyProfile.tsx","/@dropins/storefront-company-management/src/components/CompanyLoaders/CompanyLoaders.tsx","/@dropins/storefront-company-management/src/lib/acdl.ts","/@dropins/storefront-company-management/src/hooks/containers/useCompanyProfile.tsx","../../node_modules/@adobe-commerce/elsie/src/icons/Warning.svg","../../node_modules/@adobe-commerce/elsie/src/icons/CheckWithCircle.svg","../../node_modules/@adobe-commerce/elsie/src/icons/WarningWithCircle.svg","/@dropins/storefront-company-management/src/hooks/useInLineAlert.tsx","/@dropins/storefront-company-management/src/containers/CompanyProfile/CompanyProfile.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Card, Button } from '@adobe-commerce/elsie/components';\nimport { classes, Slot } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { CompanyProfileCardProps } from '../../types/companyProfile.types';\nimport './CompanyProfileCard.css';\n\nexport const CompanyProfileCard: FunctionComponent<CompanyProfileCardProps> = ({\n company,\n slots,\n showEditForm,\n handleShowEditForm,\n}) => {\n const translations = useText({\n editButton: 'Company.shared.buttons.edit',\n noDataMessage: 'Company.CompanyProfile.companyProfileCard.noDataMessage',\n companyName: 'Company.shared.fields.companyName',\n email: 'Company.shared.fields.email',\n legalName: 'Company.shared.fields.legalName',\n vatTaxId: 'Company.shared.fields.vatTaxId',\n resellerId: 'Company.shared.fields.resellerId',\n legalAddress: 'Company.shared.fields.legalAddress',\n contacts: 'Company.CompanyProfile.companyProfileCard.contacts',\n companyAdministrator: 'Company.CompanyProfile.companyProfileCard.companyAdministrator',\n salesRepresentative: 'Company.CompanyProfile.companyProfileCard.salesRepresentative',\n paymentInformation: 'Company.CompanyProfile.companyProfileCard.paymentInformation',\n shippingInformation: 'Company.CompanyProfile.companyProfileCard.shippingInformation',\n availablePaymentMethods: 'Company.CompanyProfile.companyProfileCard.availablePaymentMethods',\n availableShippingMethods: 'Company.CompanyProfile.companyProfileCard.availableShippingMethods',\n noPaymentMethods: 'Company.CompanyProfile.companyProfileCard.noPaymentMethods',\n noShippingMethods: 'Company.CompanyProfile.companyProfileCard.noShippingMethods',\n });\n \n if (!company) {\n return (\n <Card variant=\"secondary\" className=\"account-company-profile-card\">\n <div className=\"account-company-profile-card__wrapper\">\n <div className=\"account-company-profile-card__content\">\n <div className=\"account-company-profile-card__no-data\">\n <p>{translations.noDataMessage}</p>\n </div>\n </div>\n </div>\n </Card>\n );\n }\n\n const perms = company.permissionsFlags || {\n canViewAccount: true,\n canEditAccount: false,\n canViewAddress: true,\n canEditAddress: false,\n canViewContacts: true,\n canViewPaymentInformation: true,\n canViewShippingInformation: true,\n };\n\n const companyData = [\n perms.canViewAccount ? { name: 'name', label: translations.companyName, value: company.name || '' } : null,\n perms.canViewAccount ? { name: 'email', label: translations.email, value: company.email || '' } : null,\n perms.canViewAccount ? { name: 'legalName', label: translations.legalName, value: company.legalName || '' } : null,\n perms.canViewAccount ? { name: 'vatTaxId', label: translations.vatTaxId, value: company.vatTaxId || '' } : null,\n perms.canViewAccount ? { name: 'resellerId', label: translations.resellerId, value: company.resellerId || '' } : null,\n ].filter(Boolean) as { name: string; label: string; value: string }[];\n\n return (\n <Card\n variant=\"secondary\"\n className={classes([\n 'account-company-profile-card',\n [\n 'account-company-profile-card-short',\n showEditForm,\n ],\n ])}\n >\n <div className=\"account-company-profile-card__wrapper\">\n <div className=\"account-company-profile-card__actions\">\n {(company.canEditAccount || company.canEditAddress) && (\n <Button\n // @ts-ignore\n type=\"button\"\n variant=\"tertiary\"\n onClick={handleShowEditForm}\n >\n {translations.editButton}\n </Button>\n )}\n </div>\n <div className=\"account-company-profile-card__content\">\n {(() => {\n const Default = (\n <>\n {companyData.map((el, index) => {\n if (!el.value) return null;\n const value = !el.label\n ? el.value\n : `${el.label}: ${el.value}`;\n\n return (\n <p\n key={`${el.name}_${index}`}\n data-testid={`${el.name}_${index}`}\n >\n {value}\n </p>\n );\n })}\n\n {perms.canViewAddress && company.legalAddress && (\n <div className=\"company-legal-address\">\n <p><strong>{translations.legalAddress}:</strong></p>\n {company.legalAddress.street?.map((line: string, i: number) => (\n <p key={i}>{line}</p>\n ))}\n <p>\n {company.legalAddress.city}, {company.legalAddress.region?.region} {company.legalAddress.postcode}\n </p>\n <p>{company.legalAddress.countryCode}</p>\n {company.legalAddress.telephone && (\n <p>Phone: {company.legalAddress.telephone}</p>\n )}\n </div>\n )}\n\n {perms.canViewContacts && (company.companyAdmin || company.salesRepresentative) && (\n <div className=\"company-contacts\">\n <p><strong>{translations.contacts}:</strong></p>\n \n {company.companyAdmin && (\n <div className=\"company-contact\">\n <p><strong>{translations.companyAdministrator}:</strong></p>\n <p>{company.companyAdmin.firstname} {company.companyAdmin.lastname}</p>\n {company.companyAdmin.jobTitle && <p>{company.companyAdmin.jobTitle}</p>}\n <p>{company.companyAdmin.email}</p>\n </div>\n )}\n\n {company.salesRepresentative && (\n <div className=\"company-contact\">\n <p><strong>{translations.salesRepresentative}:</strong></p>\n <p>{company.salesRepresentative.firstname} {company.salesRepresentative.lastname}</p>\n <p>{company.salesRepresentative.email}</p>\n </div>\n )}\n </div>\n )}\n\n {perms.canViewPaymentInformation && (\n <div className=\"company-payment-methods\">\n <p><strong>{translations.paymentInformation}:</strong></p>\n {company.availablePaymentMethods && company.availablePaymentMethods.length > 0 ? (\n <>\n <p><strong>{translations.availablePaymentMethods}:</strong></p>\n <ul className=\"payment-methods-list\">\n {company.availablePaymentMethods.map((m, index) => (\n <li key={`payment_${index}`}>{m.title}</li>\n ))}\n </ul>\n </>\n ) : (\n <div className=\"message message-notice notice\">\n <div>{translations.noPaymentMethods}</div>\n </div>\n )}\n </div>\n )}\n\n {perms.canViewShippingInformation && (\n <div className=\"company-shipping-methods\">\n <p><strong>{translations.shippingInformation}:</strong></p>\n {company.availableShippingMethods && company.availableShippingMethods.length > 0 ? (\n <>\n <p><strong>{translations.availableShippingMethods}:</strong></p>\n <ul className=\"shipping-methods-list\">\n {company.availableShippingMethods.map((m, index) => (\n <li key={`shipping_${index}`}>{m.title}</li>\n ))}\n </ul>\n </>\n ) : (\n <div className=\"message message-notice notice\">\n <div>{translations.noShippingMethods}</div>\n </div>\n )}\n </div>\n )}\n </>\n );\n if (slots?.CompanyData) {\n return (\n <Slot name=\"CompanyData\" slot={slots.CompanyData} context={{ companyData, Default }} />\n );\n }\n return Default;\n })()}\n </div>\n </div>\n </Card>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { useEffect, useMemo, useState } from 'preact/hooks';\nimport { getCountries } from '../api';\nimport type { Country } from '../data/models';\n\ninterface UseCountriesResult {\n countryOptions: Country[];\n regionOptions: { text: string; value: string }[];\n isRegionRequired: boolean;\n hasRegionOptions: boolean;\n loadingCountries: boolean;\n}\n\nexport const useCountries = (selectedCountryCode: string | undefined): UseCountriesResult => {\n const [countriesData, setCountriesData] = useState<{\n availableCountries: Country[];\n countriesWithRequiredRegion: string[];\n optionalZipCountries: string[];\n } | null>(null);\n const [loadingCountries, setLoadingCountries] = useState<boolean>(true);\n\n useEffect(() => {\n let isMounted = true;\n getCountries()\n .then(({ availableCountries, countriesWithRequiredRegion, optionalZipCountries }) => {\n if (!isMounted) return;\n setCountriesData({ availableCountries, countriesWithRequiredRegion, optionalZipCountries });\n setLoadingCountries(false);\n })\n .catch(() => {\n if (!isMounted) return;\n setLoadingCountries(false);\n });\n return () => {\n isMounted = false;\n };\n }, []);\n\n const countryOptions = useMemo(() => {\n return countriesData?.availableCountries || [];\n }, [countriesData]);\n\n const regionOptions = useMemo(() => {\n if (!selectedCountryCode || !countriesData) return [] as { text: string; value: string }[];\n const selectedCountry = countriesData.availableCountries.find((country) => country.value === selectedCountryCode);\n if (!selectedCountry?.availableRegions || selectedCountry.availableRegions.length === 0) return [];\n return selectedCountry.availableRegions.map((region) => ({ text: region.name, value: `${region.code},${region.id}` }));\n }, [selectedCountryCode, countriesData]);\n\n const isRegionRequired = useMemo(() => {\n if (!selectedCountryCode || !countriesData) return false;\n return countriesData.countriesWithRequiredRegion.includes(selectedCountryCode);\n }, [selectedCountryCode, countriesData]);\n\n const hasRegionOptions = useMemo(() => regionOptions.length > 0, [regionOptions]);\n\n return {\n countryOptions,\n regionOptions,\n isRegionRequired,\n hasRegionOptions,\n loadingCountries,\n };\n};\n\n\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Field, Input } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\ninterface CompanyAccountFieldsProps {\n loading?: boolean;\n value: {\n name: string;\n email: string;\n legalName: string;\n vatTaxId: string;\n resellerId: string;\n };\n errors: Record<string, string>;\n touched: Record<string, boolean>;\n onChange: (field: string) => (value: string) => void;\n onBlur: (field: string) => void;\n /** Optional input name prefix for DOM names (defaults to none) */\n namePrefix?: string;\n /** Optional field path prefix used for change/blur handlers (defaults to none) */\n fieldPathPrefix?: string;\n}\n\nexport const CompanyAccountFields: FunctionComponent<CompanyAccountFieldsProps> = ({\n loading,\n value,\n errors,\n touched,\n onChange,\n onBlur,\n namePrefix = '',\n fieldPathPrefix = '',\n}) => {\n const translations = useText({\n companyName: 'Company.shared.fields.companyName',\n email: 'Company.shared.fields.email',\n legalName: 'Company.shared.fields.legalName',\n vatTaxId: 'Company.shared.fields.vatTaxId',\n resellerId: 'Company.shared.fields.resellerId',\n });\n const prefix = namePrefix ? `${namePrefix}_` : '';\n const path = (f: string) => (fieldPathPrefix ? `${fieldPathPrefix}.${f}` : f);\n return (\n <div className=\"account-edit-company-profile-form__group\">\n <Field \n label={translations.companyName} \n required\n className=\"account-edit-company-profile-form__field\"\n error={touched.name && errors.name ? errors.name : undefined}\n >\n <Input\n name={`${prefix}name`}\n type=\"text\"\n value={value.name}\n onValue={onChange(path('name'))}\n onBlur={() => onBlur(path('name'))}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field \n label={translations.email} \n required\n className=\"account-edit-company-profile-form__field\"\n error={touched.email && errors.email ? errors.email : undefined}\n >\n <Input\n name={`${prefix}email`}\n type=\"email\"\n value={value.email}\n onValue={onChange(path('email'))}\n onBlur={() => onBlur(path('email'))}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field label={translations.legalName} className=\"account-edit-company-profile-form__field\">\n <Input\n name={`${prefix}legalName`}\n type=\"text\"\n value={value.legalName}\n onValue={onChange(path('legalName'))}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field label={translations.vatTaxId} className=\"account-edit-company-profile-form__field\">\n <Input\n name={`${prefix}vatTaxId`}\n type=\"text\"\n value={value.vatTaxId}\n onValue={onChange(path('vatTaxId'))}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field label={translations.resellerId} className=\"account-edit-company-profile-form__field\">\n <Input\n name={`${prefix}resellerId`}\n type=\"text\"\n value={value.resellerId}\n onValue={onChange(path('resellerId'))}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n </div>\n );\n};\n\nexport default CompanyAccountFields;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Field, Input, Picker } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\ninterface LegalAddressFieldsProps {\n loading?: boolean;\n loadingCountries: boolean;\n value: {\n street: string;\n street2: string;\n city: string;\n region: string;\n regionCode: string;\n countryCode: string;\n postcode: string;\n telephone: string;\n };\n errors: Record<string, string>;\n touched: Record<string, boolean>;\n onChange: (field: string) => (value: string) => void;\n onBlur: (field: string) => void;\n countryOptions: { text: string; value: string }[];\n regionOptions: { text: string; value: string }[];\n isRegionRequired: boolean;\n hasRegionOptions: boolean;\n /**\n * Optional input name prefix for DOM names (defaults to 'legal_address')\n */\n namePrefix?: string;\n /**\n * Optional field path prefix used for change/blur handlers (defaults to 'legal_address')\n */\n fieldPathPrefix?: string;\n /**\n * Optional per-field required overrides for non-edit flows\n */\n requiredConfig?: Partial<{\n street: boolean;\n city: boolean;\n postcode: boolean;\n telephone: boolean;\n }>;\n}\n\nexport const LegalAddressFields: FunctionComponent<LegalAddressFieldsProps> = ({\n loading,\n loadingCountries,\n value,\n errors,\n touched,\n onChange,\n onBlur,\n countryOptions,\n regionOptions,\n isRegionRequired,\n hasRegionOptions,\n namePrefix = 'legalAddress',\n fieldPathPrefix = 'legalAddress',\n requiredConfig,\n}) => {\n const translations = useText({\n legalAddress: 'Company.shared.fields.legalAddress',\n streetAddress: 'Company.shared.fields.streetAddress',\n city: 'Company.shared.fields.city',\n country: 'Company.shared.fields.country',\n stateProvince: 'Company.shared.fields.stateProvince',\n zipPostalCode: 'Company.shared.fields.zipPostalCode',\n phoneNumber: 'Company.shared.fields.phoneNumber',\n });\n const names = {\n street: `${namePrefix}_street`,\n street2: `${namePrefix}_street2`,\n city: `${namePrefix}_city`,\n countryCode: `${namePrefix}_countryCode`,\n region: `${namePrefix}_region`,\n postcode: `${namePrefix}_postcode`,\n telephone: `${namePrefix}_telephone`,\n } as const;\n\n const paths = {\n street: `${fieldPathPrefix}.street`,\n street2: `${fieldPathPrefix}.street2`,\n city: `${fieldPathPrefix}.city`,\n countryCode: `${fieldPathPrefix}.countryCode`,\n region: `${fieldPathPrefix}.region`,\n regionCode: `${fieldPathPrefix}.regionCode`,\n postcode: `${fieldPathPrefix}.postcode`,\n telephone: `${fieldPathPrefix}.telephone`,\n } as const;\n\n const isRequired = {\n street: requiredConfig?.street ?? true,\n city: requiredConfig?.city ?? true,\n postcode: requiredConfig?.postcode ?? true,\n telephone: requiredConfig?.telephone ?? true,\n } as const;\n\n return (\n <div className=\"account-edit-company-profile-form__section\">\n <h3 className=\"account-edit-company-profile-form__section-title\">{translations.legalAddress}</h3>\n\n <Field \n label={translations.streetAddress} \n required={isRequired.street}\n className=\"account-edit-company-profile-form__field\"\n error={touched[paths.street] && errors[paths.street] ? errors[paths.street] : undefined}\n >\n <Input\n name={names.street}\n type=\"text\"\n value={value.street}\n onValue={onChange(paths.street)}\n onBlur={() => onBlur(paths.street)}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field \n label={`${translations.streetAddress} 2`} \n className=\"account-edit-company-profile-form__field\"\n >\n <Input\n name={names.street2}\n type=\"text\"\n value={value.street2}\n onValue={onChange(paths.street2)}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field \n label={translations.city} \n required={isRequired.city}\n className=\"account-edit-company-profile-form__field\"\n error={touched[paths.city] && errors[paths.city] ? errors[paths.city] : undefined}\n >\n <Input\n name={names.city}\n type=\"text\"\n value={value.city}\n onValue={onChange(paths.city)}\n onBlur={() => onBlur(paths.city)}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field \n label={translations.country} \n required\n className=\"account-edit-company-profile-form__field\"\n error={touched[paths.countryCode] && errors[paths.countryCode] ? errors[paths.countryCode] : undefined}\n >\n <Picker\n name={names.countryCode}\n floatingLabel={`${translations.country} *`}\n placeholder={translations.country}\n options={countryOptions}\n value={value.countryCode}\n handleSelect={(event: Event) => {\n const target = event.target as HTMLSelectElement;\n onChange(paths.countryCode)(target.value);\n }}\n onBlur={() => onBlur(paths.countryCode)}\n disabled={!!loading || loadingCountries}\n />\n </Field>\n\n <Field \n label={translations.stateProvince} \n required={isRegionRequired}\n className=\"account-edit-company-profile-form__field\"\n error={touched['legalAddress.region'] && errors['legalAddress.region'] ? errors['legalAddress.region'] : undefined}\n >\n {hasRegionOptions ? (\n <Picker\n key={`region_picker_${value.countryCode}`}\n name=\"legalAddress_region\"\n floatingLabel={`${translations.stateProvince} ${isRegionRequired ? '*' : ''}`}\n placeholder={translations.stateProvince}\n options={regionOptions}\n value={value.regionCode ? (regionOptions.find(r => r.value.split(',')[0] === value.regionCode)?.value || '') : ''}\n handleSelect={(event: Event) => {\n const target = event.target as HTMLSelectElement;\n const [regionCode] = target.value.split(',');\n const regionName = regionOptions.find(r => r.value === target.value)?.text || '';\n onChange(paths.region)(regionName);\n onChange(paths.regionCode)(regionCode);\n }}\n onBlur={() => onBlur(paths.region)}\n disabled={!!loading || loadingCountries}\n />\n ) : (\n <Input\n key={`region_input_${value.countryCode}`}\n name={names.region}\n type=\"text\"\n value={value.region}\n onValue={onChange(paths.region)}\n onBlur={() => onBlur(paths.region)}\n disabled={!!loading || loadingCountries}\n variant=\"primary\"\n size=\"medium\"\n />\n )}\n </Field>\n\n <Field \n label={translations.zipPostalCode} \n required={isRequired.postcode}\n className=\"account-edit-company-profile-form__field\"\n error={touched[paths.postcode] && errors[paths.postcode] ? errors[paths.postcode] : undefined}\n >\n <Input\n name={names.postcode}\n type=\"text\"\n value={value.postcode}\n onValue={onChange(paths.postcode)}\n onBlur={() => onBlur(paths.postcode)}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n\n <Field \n label={translations.phoneNumber} \n required={isRequired.telephone}\n className=\"account-edit-company-profile-form__field\"\n error={touched[paths.telephone] && errors[paths.telephone] ? errors[paths.telephone] : undefined}\n >\n <Input\n name={names.telephone}\n type=\"tel\"\n value={value.telephone}\n onValue={onChange(paths.telephone)}\n onBlur={() => onBlur(paths.telephone)}\n disabled={!!loading}\n variant=\"primary\"\n size=\"medium\"\n />\n </Field>\n </div>\n );\n};\n\nexport default LegalAddressFields;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { useState } from 'preact/hooks';\nimport {\n Button,\n Card,\n Header,\n InLineAlert,\n ProgressSpinner,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { validateCompanyEmail } from '../../api';\nimport { EditCompanyProfileProps } from '../../types/companyProfile.types';\nimport './EditCompanyProfile.css';\nimport { useCountries } from '../../hooks/useCountries';\nimport { CompanyAccountFields } from './CompanyAccountFields';\nimport { LegalAddressFields } from './LegalAddressFields';\n\nexport const EditCompanyProfile: FunctionComponent<EditCompanyProfileProps> = ({\n inLineAlertProps,\n company,\n loading = false,\n onSubmit,\n onCancel,\n}) => {\n const translations = useText({\n title: 'Company.EditCompanyProfile.title',\n cancel: 'Company.shared.buttons.cancel',\n save: 'Company.shared.buttons.save',\n saving: 'Company.shared.buttons.saving',\n required: 'Company.shared.validation.required',\n invalidEmail: 'Company.shared.validation.invalidEmail',\n companyNameRequired: 'Company.shared.validation.companyNameRequired',\n emailRequired: 'Company.shared.validation.emailRequired',\n emailNotAvailable: 'Company.shared.validation.emailNotAvailable',\n });\n \n const [formData, setFormData] = useState({\n name: company?.name || '',\n email: company?.email || '',\n legalName: company?.legalName || '',\n vatTaxId: company?.vatTaxId || '',\n resellerId: company?.resellerId || '',\n legalAddress: {\n street: company?.legalAddress?.street?.[0] || '',\n street2: company?.legalAddress?.street?.[1] || '',\n city: company?.legalAddress?.city || '',\n region: company?.legalAddress?.region?.region || '',\n regionCode: company?.legalAddress?.region?.regionCode || '',\n countryCode: company?.legalAddress?.countryCode || '',\n postcode: company?.legalAddress?.postcode || '',\n telephone: company?.legalAddress?.telephone || '',\n },\n });\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n const [touched, setTouched] = useState<Record<string, boolean>>({});\n\n // Permission flags for editing\n // Strictly gate by granular permissions; do not fallback to overall canEdit here\n const canEditAccount = company?.permissionsFlags?.canEditAccount === true;\n const canEditAddress = company?.permissionsFlags?.canEditAddress === true;\n \n // Country and region data via hook\n const {\n countryOptions,\n regionOptions,\n isRegionRequired,\n hasRegionOptions,\n loadingCountries,\n } = useCountries(formData.legalAddress.countryCode);\n\n // Validation functions\n const validateField = (name: string, value: string): string | null => {\n if (name === 'name') {\n if (!value.trim()) return translations.companyNameRequired;\n return null;\n }\n if (name === 'email') {\n if (!value.trim()) return translations.emailRequired;\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(value)) return translations.invalidEmail;\n return null;\n }\n if (\n name === 'legalAddress.street' ||\n name === 'legalAddress.city' ||\n name === 'legalAddress.postcode' ||\n name === 'legalAddress.telephone' ||\n name === 'legalAddress.countryCode'\n ) {\n if (!value.trim()) return translations.required;\n return null;\n }\n if (name === 'legalAddress.region') {\n if (isRegionRequired && !value.trim()) return translations.required;\n return null;\n }\n return null;\n };\n\n const validateForm = (): boolean => {\n const newErrors: Record<string, string> = {};\n let isValid = true;\n\n // Determine permissions for editing\n const canEditAccount = company?.permissionsFlags?.canEditAccount === true;\n const canEditAddress = company?.permissionsFlags?.canEditAddress === true;\n\n // Validate required account fields only if editing account is allowed\n if (canEditAccount) {\n const nameError = validateField('name', formData.name);\n if (nameError) {\n newErrors.name = nameError;\n isValid = false;\n }\n\n const emailError = validateField('email', formData.email);\n if (emailError) {\n newErrors.email = emailError;\n isValid = false;\n }\n }\n\n // Validate required address fields only if editing address is allowed\n if (canEditAddress) {\n const streetError = validateField('legalAddress.street', formData.legalAddress.street);\n if (streetError) {\n newErrors['legalAddress.street'] = streetError;\n isValid = false;\n }\n\n const cityError = validateField('legalAddress.city', formData.legalAddress.city);\n if (cityError) {\n newErrors['legalAddress.city'] = cityError;\n isValid = false;\n }\n\n const postcodeError = validateField('legalAddress.postcode', formData.legalAddress.postcode);\n if (postcodeError) {\n newErrors['legalAddress.postcode'] = postcodeError;\n isValid = false;\n }\n\n const telephoneError = validateField('legalAddress.telephone', formData.legalAddress.telephone);\n if (telephoneError) {\n newErrors['legalAddress.telephone'] = telephoneError;\n isValid = false;\n }\n\n const countryError = validateField('legalAddress.countryCode', formData.legalAddress.countryCode);\n if (countryError) {\n newErrors['legalAddress.countryCode'] = countryError;\n isValid = false;\n }\n\n // Validate region field\n const regionError = validateField('legalAddress.region', formData.legalAddress.region);\n if (regionError) {\n newErrors['legalAddress.region'] = regionError;\n isValid = false;\n }\n }\n\n setErrors(newErrors);\n return isValid;\n };\n\n const handleSubmit = async (event: Event) => {\n event.preventDefault();\n \n // Mark only editable fields as touched\n // Use granular permission flags defined for this session\n const canEditAccount = company?.permissionsFlags?.canEditAccount === true;\n const canEditAddress = company?.permissionsFlags?.canEditAddress === true;\n const touchedFields: Record<string, boolean> = {};\n if (canEditAccount) {\n touchedFields.name = true;\n touchedFields.email = true;\n touchedFields.legalName = true;\n touchedFields.vatTaxId = true;\n touchedFields.resellerId = true;\n }\n if (canEditAddress) {\n touchedFields['legalAddress.street'] = true;\n touchedFields['legalAddress.street2'] = true;\n touchedFields['legalAddress.city'] = true;\n touchedFields['legalAddress.region'] = true;\n touchedFields['legalAddress.regionCode'] = true;\n touchedFields['legalAddress.countryCode'] = true;\n touchedFields['legalAddress.postcode'] = true;\n touchedFields['legalAddress.telephone'] = true;\n }\n setTouched(touchedFields);\n\n if (!validateForm()) {\n return;\n }\n\n // Check if email has changed and validate availability (only if allowed to edit account)\n if (canEditAccount && formData.email !== company?.email) {\n const emailValidation = await validateCompanyEmail(formData.email);\n if (!emailValidation.isValid) {\n setErrors(prev => ({\n ...prev,\n email: emailValidation.error || translations.emailNotAvailable,\n }));\n return;\n }\n }\n\n if (onSubmit) {\n // Transform form data to match API expectations\n const transformedData: any = {};\n if (canEditAccount) {\n transformedData.name = formData.name;\n transformedData.email = formData.email;\n transformedData.legalName = formData.legalName;\n transformedData.vatTaxId = formData.vatTaxId;\n transformedData.resellerId = formData.resellerId;\n }\n if (canEditAddress) {\n transformedData.legalAddress = {\n street: [formData.legalAddress.street, formData.legalAddress.street2].filter(Boolean),\n city: formData.legalAddress.city,\n region: {\n region: formData.legalAddress.region,\n regionCode: formData.legalAddress.regionCode,\n },\n countryCode: formData.legalAddress.countryCode,\n postcode: formData.legalAddress.postcode,\n telephone: formData.legalAddress.telephone,\n };\n }\n await onSubmit(transformedData);\n }\n };\n\n const handleInputChange = (field: string) => (value: string) => {\n // Permission guard: block changes to forbidden fields even if events fire\n const accountFields = new Set(['name', 'email', 'legalName', 'vatTaxId', 'resellerId']);\n const isAddress = field.startsWith('legalAddress.');\n const isAccount = accountFields.has(field);\n if ((isAccount && !canEditAccount) || (isAddress && !canEditAddress)) {\n return;\n }\n if (field.startsWith('legalAddress.')) {\n const addressField = field.split('.')[1];\n \n // Special handling for country change - reset region when country changes\n if (addressField === 'countryCode') {\n setFormData(prev => ({\n ...prev,\n legalAddress: {\n ...prev.legalAddress,\n [addressField]: value,\n region: '', // Reset region text\n regionCode: '', // Reset region code\n },\n }));\n \n // Clear region errors when country changes\n setErrors(prev => {\n const newErrors = { ...prev };\n delete newErrors['legalAddress.region'];\n delete newErrors['legalAddress.regionCode'];\n return newErrors;\n });\n \n // Clear region touched state when country changes\n setTouched(prev => {\n const newTouched = { ...prev };\n delete newTouched['legalAddress.region'];\n delete newTouched['legalAddress.regionCode'];\n return newTouched;\n });\n } else if (addressField === 'region') {\n // Handle region field (both text input and dropdown use this)\n setFormData(prev => ({\n ...prev,\n legalAddress: {\n ...prev.legalAddress,\n region: value,\n // For text input regions, use the same value for regionCode\n // For dropdown regions, this gets overridden in the handleSelect\n regionCode: hasRegionOptions ? prev.legalAddress.regionCode : value,\n },\n }));\n } else {\n setFormData(prev => ({\n ...prev,\n legalAddress: {\n ...prev.legalAddress,\n [addressField]: value,\n },\n }));\n }\n } else {\n setFormData(prev => ({ ...prev, [field]: value }));\n }\n \n // Clear error when user starts typing\n if (errors[field]) {\n setErrors(prev => {\n const newErrors = { ...prev };\n delete newErrors[field];\n return newErrors;\n });\n }\n };\n\n const handleBlur = (field: string) => {\n // Prevent marking forbidden fields as touched\n const accountFields = new Set(['name', 'email', 'legalName', 'vatTaxId', 'resellerId']);\n const isAddress = field.startsWith('legalAddress.');\n const isAccount = accountFields.has(field);\n if ((isAccount && !canEditAccount) || (isAddress && !canEditAddress)) {\n return;\n }\n setTouched(prev => ({ ...prev, [field]: true }));\n \n let value = '';\n if (field.startsWith('legalAddress.')) {\n const addressField = field.split('.')[1];\n const addressValue = formData.legalAddress[addressField as keyof typeof formData.legalAddress];\n value = typeof addressValue === 'string' ? addressValue : '';\n } else {\n const fieldValue = formData[field as keyof typeof formData];\n value = typeof fieldValue === 'string' ? fieldValue : '';\n }\n \n const error = validateField(field, value);\n \n if (error) {\n setErrors(prev => ({ ...prev, [field]: error }));\n }\n };\n\n return (\n <Card variant=\"secondary\" className={'account-edit-company-profile'}>\n <Header\n title={translations.title}\n divider={false}\n className={'account-edit-company-profile__title'}\n />\n {inLineAlertProps?.text ? (\n <InLineAlert\n className=\"account-edit-company-profile__notification\"\n type={inLineAlertProps.type}\n variant=\"secondary\"\n heading={inLineAlertProps.text}\n icon={inLineAlertProps.icon}\n data-testid=\"editCompanyInLineAlert\"\n />\n ) : null}\n <form\n className=\"account-edit-company-profile-form\"\n onSubmit={handleSubmit}\n >\n {canEditAccount && (\n <CompanyAccountFields\n loading={loading}\n value={{\n name: formData.name,\n email: formData.email,\n legalName: formData.legalName,\n vatTaxId: formData.vatTaxId,\n resellerId: formData.resellerId,\n }}\n errors={errors}\n touched={touched}\n onChange={handleInputChange}\n onBlur={handleBlur}\n />\n )}\n\n {/* Legal Address Section */}\n {canEditAddress && (\n <LegalAddressFields\n loading={loading}\n loadingCountries={loadingCountries}\n value={formData.legalAddress}\n errors={errors}\n touched={touched}\n onChange={handleInputChange}\n onBlur={handleBlur}\n countryOptions={countryOptions}\n regionOptions={regionOptions}\n isRegionRequired={isRegionRequired}\n hasRegionOptions={hasRegionOptions}\n />\n )}\n\n <div className=\"account-edit-company-profile__actions\">\n <Button\n disabled={loading}\n // @ts-ignore\n type=\"button\"\n variant=\"secondary\"\n onClick={() => onCancel?.()}\n >\n {translations.cancel}\n </Button>\n <Button disabled={loading || (!canEditAccount && !canEditAddress)} type=\"submit\" variant=\"primary\">\n {translations.save}\n </Button>\n </div>\n </form>\n \n {/* Loading overlay that covers the entire form */}\n {loading && (\n <div \n className=\"account-edit-company-profile__loading-overlay\"\n data-testid=\"editCompanyLoadingOverlay\"\n >\n <ProgressSpinner size=\"large\" />\n <div className=\"account-edit-company-profile__loading-text\">\n {translations.saving}\n </div>\n </div>\n )}\n </Card>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { Skeleton, SkeletonRow, Card } from '@adobe-commerce/elsie/components';\nimport './CompanyLoaders.css';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nexport const CompanyCardLoader = ({\n testId,\n withCard = true,\n}: {\n testId?: string;\n withCard?: boolean;\n}) => {\n const defaultSkeleton = (\n <Skeleton data-testid={testId || 'companySkeletonLoader'}>\n <SkeletonRow\n variant=\"heading\"\n size=\"xlarge\"\n fullWidth={false}\n lines={1}\n />\n <SkeletonRow variant=\"heading\" size=\"xlarge\" fullWidth={true} lines={1} />\n <SkeletonRow variant=\"heading\" size=\"xlarge\" fullWidth={true} lines={1} />\n </Skeleton>\n );\n\n if (withCard) {\n return defaultSkeleton;\n }\n\n return (\n <Card\n variant=\"secondary\"\n className={classes([\n 'company-company-loaders',\n 'company-company-loaders--card-loader',\n ])}\n >\n {defaultSkeleton}\n </Card>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\ndeclare global {\n interface Window {\n adobeDataLayer: any[];\n }\n}\n\nenum EventsList {\n EDIT_COMPANY_EVENT = 'edit-company',\n}\n\nconst EVENTS_MAPPING = {\n EDIT_COMPANY_EVENT: EventsList.EDIT_COMPANY_EVENT,\n};\n\n/**\n * Set and return the Adobe Client Data Layer (ACDL)\n * @returns ACDL instance or an empty array if it doesn't exist\n */\nconst getAdobeDataLayer = () => {\n if (!window.adobeDataLayer) {\n window.adobeDataLayer = [];\n }\n return window.adobeDataLayer;\n};\n\n/**\n * Sets a context in the Adobe Client Data Layer (ACDL)\n * @param context - The context object to set\n */\nconst setContext = (context: Record<string, any>) => {\n const adobeDataLayer = getAdobeDataLayer();\n adobeDataLayer.push({\n context,\n });\n};\n\n/**\n * Pushes an event to the Adobe Client Data Layer (ACDL)\n * @param event - The event object to push\n */\nconst pushEvent = (event: Record<string, any>) => {\n const adobeDataLayer = getAdobeDataLayer();\n \n adobeDataLayer.push((acdl: any) => {\n const state = acdl.getState ? acdl.getState() : {};\n \n acdl.push({\n event,\n context: state,\n });\n });\n};\n\n/**\n * Publishes events to the Adobe Client Data Layer (ACDL)\n * @param eventType - The type of event to publish\n * @param eventParams - Parameters associated with the event\n * @returns null if the event type is not recognized\n */\nconst publishEvents = (eventType: string, eventParams: any) => {\n if (!EVENTS_MAPPING[eventType as keyof typeof EVENTS_MAPPING]) {\n return null;\n }\n\n switch (eventType) {\n case EventsList.EDIT_COMPANY_EVENT:\n pushEvent({\n type: 'company',\n eventType: 'edit',\n companyData: eventParams,\n });\n break;\n default:\n return null;\n }\n};\n\nexport { EventsList, publishEvents, pushEvent, setContext };","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { getCompany, updateCompany, getCountries, resetCompanyCache } from '../../api';\nimport { CompanyModel } from '../../data/models';\nimport { Country } from '../../data/models/country';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { EventsList, publishEvents } from '../../lib/acdl';\n\nexport interface UseCompanyProfileProps {\n handleSetInLineAlert?: (alert?: { type: 'success' | 'error'; text: string }) => void;\n}\n\nexport const useCompanyProfile = ({ \n handleSetInLineAlert \n}: UseCompanyProfileProps) => {\n const translations = useText({\n companySuccess: 'Company.CompanyProfile.editCompanyProfile.companySuccess',\n companyError: 'Company.CompanyProfile.editCompanyProfile.companyError',\n loadError: 'Company.CompanyProfile.messages.loadError',\n updateError: 'Company.CompanyProfile.messages.updateError',\n });\n const { companySuccess, companyError, loadError, updateError } = translations;\n\n const [company, setCompany] = useState<CompanyModel | null>(null);\n const [loading, setLoading] = useState<boolean>(true);\n const [submitLoading, setSubmitLoading] = useState<boolean>(false);\n const [showEditForm, setShowEditForm] = useState<boolean>(false);\n const [countries, setCountries] = useState<Country[]>([]);\n const [inputChange, setInputChange] = useState<Record<string, string | number | boolean>>({});\n const [createdAt, setCreatedAt] = useState<string>('');\n\n // Keep stable references to avoid re-creating callbacks/effects and double fetch\n const alertFnRef = useRef<UseCompanyProfileProps['handleSetInLineAlert']>(handleSetInLineAlert);\n const inFlightRef = useRef<boolean>(false);\n const didInitialFetchRef = useRef<boolean>(false);\n useEffect(() => {\n alertFnRef.current = handleSetInLineAlert;\n }, [handleSetInLineAlert]);\n\n const handleInputChange = useCallback(\n (value: Record<string, string | number | boolean>) => {\n setInputChange(value);\n },\n []\n );\n\n const renderAlertMessage = useCallback(\n (type: 'success' | 'error', message?: string) => {\n if (!handleSetInLineAlert) return;\n\n if (type === 'success') {\n handleSetInLineAlert({\n type: 'success',\n text: message ?? companySuccess,\n });\n } else if (type === 'error') {\n handleSetInLineAlert({\n type: 'error',\n text: message ?? companyError,\n });\n } else {\n handleSetInLineAlert();\n }\n\n setSubmitLoading(false);\n },\n [handleSetInLineAlert, companySuccess, companyError]\n );\n\n const fetchCompany = useCallback(() => {\n if (inFlightRef.current) {\n return;\n }\n inFlightRef.current = true;\n setLoading(true);\n \n getCompany(true)\n .then((companyData: CompanyModel | null) => {\n if (companyData) {\n setCompany(companyData);\n setCreatedAt('');\n }\n setLoading(false);\n })\n .catch((error) => {\n console.error('Failed to load company:', error);\n setLoading(false);\n // Use stable ref to avoid changing dependencies\n if (alertFnRef.current) {\n alertFnRef.current({ type: 'error', text: loadError });\n }\n })\n .finally(() => {\n inFlightRef.current = false;\n });\n }, [loadError]);\n\n useEffect(() => {\n if (!didInitialFetchRef.current) {\n didInitialFetchRef.current = true;\n fetchCompany();\n }\n // Intentionally depend only on loadError through fetchCompany to avoid re-fetching on alert changes\n }, [fetchCompany]);\n\n useEffect(() => {\n getCountries().then((countriesResponse) => {\n setCountries(countriesResponse.availableCountries);\n }).catch((error) => {\n console.error('Failed to load countries:', error);\n });\n }, []);\n\n const handleShowEditForm = useCallback(() => {\n setShowEditForm(true);\n renderAlertMessage('success', ''); // Clear any existing alerts\n setInputChange({});\n }, [renderAlertMessage]);\n\n const handleHideEditForm = useCallback((clearStates?: () => void) => {\n clearStates?.();\n setShowEditForm(false);\n setInputChange({});\n }, []);\n\n const handleUpdateCompany = useCallback(async (data: Partial<CompanyModel>) => {\n try {\n setSubmitLoading(true);\n \n if (!data) {\n renderAlertMessage('error', 'No data to update');\n return;\n }\n \n const updatedCompany = await updateCompany(data as any);\n \n // Preserve permissions from current company data since update response doesn't include them\n if (company) {\n updatedCompany.canEditAccount = company.canEditAccount;\n updatedCompany.canEditAddress = company.canEditAddress;\n updatedCompany.customerRole = company.customerRole;\n updatedCompany.customerStatus = company.customerStatus;\n }\n \n setCompany(updatedCompany);\n setShowEditForm(false);\n setInputChange({});\n \n renderAlertMessage('success');\n \n // Publish analytics event\n publishEvents(EventsList.EDIT_COMPANY_EVENT, {\n ...data,\n companyId: company?.id,\n });\n \n // Refresh company data to ensure consistency\n // Clear cache to force re-fetch\n resetCompanyCache();\n fetchCompany();\n \n } catch (error: any) {\n console.error('Failed to update company:', error);\n renderAlertMessage('error', error.message || updateError);\n } finally {\n setSubmitLoading(false);\n }\n }, [company, renderAlertMessage, fetchCompany, updateError]);\n\n return {\n // Core data\n company,\n countries,\n createdAt,\n \n // Loading states\n loading,\n submitLoading,\n \n // UI states\n showEditForm,\n \n // Form data\n inputChange,\n \n // Actions\n handleShowEditForm,\n handleHideEditForm,\n handleUpdateCompany,\n handleInputChange,\n renderAlertMessage,\n \n // Legacy support (deprecated - use submitLoading instead)\n saving: submitLoading,\n };\n};\n","import * as React from \"react\";\nconst SvgWarning = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Warning_Base\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_841_1324)\" }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_841_1324\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 24, height: 21, fill: \"white\", transform: \"translate(0 1.5)\" }))));\nexport default SvgWarning;\n","import * as React from \"react\";\nconst SvgCheckWithCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M6.75 12.762L10.2385 15.75L17.25 9\", stroke: \"currentColor\" }));\nexport default SvgCheckWithCircle;\n","import * as React from \"react\";\nconst SvgWarningWithCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z\", stroke: \"currentColor\" }));\nexport default SvgWarningWithCircle;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { InLineAlertProps } from '../types/companyProfile.types';\nimport {\n CheckWithCircle as Success,\n Warning,\n WarningWithCircle as Error,\n} from '@adobe-commerce/elsie/icons';\n\nexport type AlertType = 'success' | 'warning' | 'error';\n\nexport interface AlertOptions {\n type: AlertType;\n text: string;\n autoHide?: boolean;\n autoHideDelay?: number;\n}\n\nexport interface UseInLineAlertReturn {\n inLineAlertProps: InLineAlertProps;\n handleSetInLineAlert: (notification?: AlertOptions) => void;\n clearAlert: () => void;\n showSuccess: (text: string, autoHide?: boolean) => void;\n showWarning: (text: string, autoHide?: boolean) => void;\n showError: (text: string, autoHide?: boolean) => void;\n}\n\nconst iconsList = {\n success: <Success />,\n warning: <Warning />,\n error: <Error />,\n};\n\nexport const useInLineAlert = (): UseInLineAlertReturn => {\n const [inLineAlertProps, setInLineAlertProps] = useState<InLineAlertProps>({});\n const [autoHideTimer, setAutoHideTimer] = useState<ReturnType<typeof setTimeout> | null>(null);\n\n const clearAlert = useCallback(() => {\n setInLineAlertProps({});\n if (autoHideTimer) {\n clearTimeout(autoHideTimer);\n setAutoHideTimer(null);\n }\n }, [autoHideTimer]);\n\n const handleSetInLineAlert = useCallback(\n (notification?: AlertOptions) => {\n // Clear existing timer\n if (autoHideTimer) {\n clearTimeout(autoHideTimer);\n setAutoHideTimer(null);\n }\n\n if (!notification?.type) {\n setInLineAlertProps({});\n return;\n }\n\n const icon = iconsList[notification.type];\n\n setInLineAlertProps({\n type: notification.type,\n text: notification.text,\n icon,\n });\n\n // Auto-hide if requested\n if (notification.autoHide !== false) {\n const delay = notification.autoHideDelay || (notification.type === 'success' ? 3000 : 5000);\n const timer = setTimeout(() => {\n setInLineAlertProps({});\n setAutoHideTimer(null);\n }, delay);\n setAutoHideTimer(timer);\n }\n },\n [autoHideTimer]\n );\n\n const showSuccess = useCallback(\n (text: string, autoHide: boolean = true) => {\n handleSetInLineAlert({ type: 'success', text, autoHide });\n },\n [handleSetInLineAlert]\n );\n\n const showWarning = useCallback(\n (text: string, autoHide: boolean = false) => {\n handleSetInLineAlert({ type: 'warning', text, autoHide });\n },\n [handleSetInLineAlert]\n );\n\n const showError = useCallback(\n (text: string, autoHide: boolean = false) => {\n handleSetInLineAlert({ type: 'error', text, autoHide });\n },\n [handleSetInLineAlert]\n );\n\n // Cleanup timer on unmount\n useEffect(() => {\n return () => {\n if (autoHideTimer) {\n clearTimeout(autoHideTimer);\n }\n };\n }, [autoHideTimer]);\n\n return {\n inLineAlertProps,\n handleSetInLineAlert,\n clearAlert,\n showSuccess,\n showWarning,\n showError,\n };\n};\n\nexport default useInLineAlert;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { classes, Container } from '@adobe-commerce/elsie/lib';\nimport { Header } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { CompanyProfileCard } from '../../components/CompanyProfileCard';\nimport { EditCompanyProfile } from '../../components/EditCompanyProfile';\nimport { CompanyCardLoader } from '../../components/CompanyLoaders';\nimport { useCompanyProfile } from '../../hooks/containers/useCompanyProfile';\nimport { useInLineAlert } from '../../hooks/useInLineAlert';\nimport { CompanyProfileProps } from '../../types/companyProfile.types';\n\nexport const CompanyProfile: Container<CompanyProfileProps> = ({\n className,\n withHeader = true,\n slots,\n}) => {\n const translations = useText({\n containerTitle: 'Company.CompanyProfile.containerTitle',\n });\n const { inLineAlertProps, handleSetInLineAlert } = useInLineAlert();\n const {\n company,\n loading,\n saving,\n showEditForm,\n handleShowEditForm,\n handleHideEditForm,\n handleUpdateCompany,\n } = useCompanyProfile({ handleSetInLineAlert });\n\n if (loading)\n return (\n <div data-testid=\"companyProfileLoader\">\n <CompanyCardLoader withCard />\n </div>\n );\n\n return (\n <div className={classes(['account-company-profile', className])}>\n {withHeader ? (\n <Header\n title={translations.containerTitle}\n divider={false}\n className={'company-profile__title'}\n />\n ) : null}\n <CompanyProfileCard\n company={company}\n slots={slots}\n showEditForm={showEditForm}\n handleShowEditForm={handleShowEditForm}\n />\n {showEditForm ? (\n <EditCompanyProfile\n inLineAlertProps={inLineAlertProps}\n company={company}\n loading={saving}\n onSubmit={handleUpdateCompany}\n onCancel={handleHideEditForm}\n />\n ) : null}\n </div>\n );\n};\n"],"names":["CompanyProfileCard","company","slots","showEditForm","handleShowEditForm","translations","useText","jsx","Card","perms","companyData","classes","jsxs","Button","Default","Fragment","el","index","value","_a","line","i","_b","m","Slot","useCountries","selectedCountryCode","countriesData","setCountriesData","useState","loadingCountries","setLoadingCountries","useEffect","isMounted","getCountries","availableCountries","countriesWithRequiredRegion","optionalZipCountries","countryOptions","useMemo","regionOptions","selectedCountry","country","region","isRegionRequired","hasRegionOptions","CompanyAccountFields","loading","errors","touched","onChange","onBlur","namePrefix","fieldPathPrefix","prefix","path","f","Field","Input","LegalAddressFields","requiredConfig","names","paths","isRequired","Picker","event","target","r","regionCode","regionName","EditCompanyProfile","inLineAlertProps","onSubmit","onCancel","formData","setFormData","_d","_c","_e","_g","_f","_i","_h","_j","_k","_l","setErrors","setTouched","canEditAccount","_m","canEditAddress","_n","validateField","name","validateForm","newErrors","isValid","nameError","emailError","streetError","cityError","postcodeError","telephoneError","countryError","regionError","handleSubmit","touchedFields","emailValidation","validateCompanyEmail","prev","transformedData","handleInputChange","field","accountFields","isAddress","addressField","newTouched","handleBlur","addressValue","fieldValue","error","Header","InLineAlert","ProgressSpinner","CompanyCardLoader","testId","withCard","defaultSkeleton","Skeleton","SkeletonRow","EventsList","EVENTS_MAPPING","getAdobeDataLayer","pushEvent","acdl","state","publishEvents","eventType","eventParams","useCompanyProfile","handleSetInLineAlert","companySuccess","companyError","loadError","updateError","setCompany","setLoading","submitLoading","setSubmitLoading","setShowEditForm","countries","setCountries","inputChange","setInputChange","createdAt","setCreatedAt","alertFnRef","useRef","inFlightRef","didInitialFetchRef","useCallback","renderAlertMessage","type","message","fetchCompany","getCompany","countriesResponse","handleHideEditForm","clearStates","handleUpdateCompany","data","updatedCompany","updateCompany","resetCompanyCache","SvgWarning","props","React","SvgCheckWithCircle","SvgWarningWithCircle","iconsList","Success","Warning","Error","useInLineAlert","setInLineAlertProps","autoHideTimer","setAutoHideTimer","clearAlert","notification","icon","delay","timer","showSuccess","text","autoHide","showWarning","showError","CompanyProfile","className","withHeader","saving"],"mappings":"wrBAuBO,MAAMA,GAAiE,CAAC,CAC7E,QAAAC,EACA,MAAAC,EACA,aAAAC,EACA,mBAAAC,CACF,IAAM,CACJ,MAAMC,EAAeC,EAAQ,CAC3B,WAAY,8BACZ,cAAe,0DACf,YAAa,oCACb,MAAO,8BACP,UAAW,kCACX,SAAU,iCACV,WAAY,mCACZ,aAAc,qCACd,SAAU,qDACV,qBAAsB,iEACtB,oBAAqB,gEACrB,mBAAoB,+DACpB,oBAAqB,gEACrB,wBAAyB,oEACzB,yBAA0B,qEAC1B,iBAAkB,6DAClB,kBAAmB,6DAAA,CACpB,EAED,GAAI,CAACL,EACH,OACEM,EAACC,EAAA,CAAK,QAAQ,YAAY,UAAU,+BAClC,SAAAD,EAAC,MAAA,CAAI,UAAU,wCACb,SAAAA,EAAC,MAAA,CAAI,UAAU,wCACb,SAAAA,EAAC,MAAA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V,IAAA,EACN,CAEJ","x_google_ignoreList":[8,9,10]}
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './CompanyProfile';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,29 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export interface CompanyLegalAddressModel {
18
+ street?: string[];
19
+ city?: string;
20
+ region?: {
21
+ region?: string;
22
+ regionCode?: string;
23
+ regionId?: number;
24
+ };
25
+ countryCode?: string;
26
+ postcode?: string;
27
+ telephone?: string;
28
+ }
29
+ //# sourceMappingURL=company-address.d.ts.map
@@ -0,0 +1,65 @@
1
+ import { CompanyLegalAddressModel } from './company-address';
2
+
3
+ export interface CompanyRole {
4
+ id: string;
5
+ name: string;
6
+ permissions?: {
7
+ id: string;
8
+ text: string;
9
+ children?: {
10
+ id: string;
11
+ text: string;
12
+ children?: {
13
+ id: string;
14
+ text: string;
15
+ }[];
16
+ }[];
17
+ }[];
18
+ }
19
+ export interface CompanyContact {
20
+ id: string;
21
+ firstname: string;
22
+ lastname: string;
23
+ email: string;
24
+ jobTitle?: string;
25
+ }
26
+ export interface CompanySalesRepresentative {
27
+ firstname: string;
28
+ lastname: string;
29
+ email: string;
30
+ }
31
+ export interface Company {
32
+ id: string;
33
+ name: string;
34
+ email: string;
35
+ legalName?: string;
36
+ vatTaxId?: string;
37
+ resellerId?: string;
38
+ legalAddress?: CompanyLegalAddressModel;
39
+ companyAdmin?: CompanyContact;
40
+ salesRepresentative?: CompanySalesRepresentative;
41
+ availablePaymentMethods?: {
42
+ code: string;
43
+ title: string;
44
+ }[];
45
+ availableShippingMethods?: {
46
+ code: string;
47
+ title: string;
48
+ }[];
49
+ }
50
+ export interface CompanyModel extends Company {
51
+ canEditAccount: boolean;
52
+ canEditAddress: boolean;
53
+ customerRole?: CompanyRole;
54
+ customerStatus?: string;
55
+ permissionsFlags: {
56
+ canViewAccount: boolean;
57
+ canEditAccount: boolean;
58
+ canViewAddress: boolean;
59
+ canEditAddress: boolean;
60
+ canViewContacts: boolean;
61
+ canViewPaymentInformation: boolean;
62
+ canViewShippingInformation: boolean;
63
+ };
64
+ }
65
+ //# sourceMappingURL=company.d.ts.map
@@ -0,0 +1,26 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export type Country = {
18
+ value: string;
19
+ text: string;
20
+ availableRegions?: {
21
+ id: number;
22
+ code: string;
23
+ name: string;
24
+ }[];
25
+ };
26
+ //# sourceMappingURL=country.d.ts.map
@@ -0,0 +1,20 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './company';
18
+ export * from './company-address';
19
+ export * from './country';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './transform-company';
18
+ export * from './transform-countries';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { getCompanyResponse } from '../../types/api/getCompany.types';
2
+ import { updateCompanyResponse } from '../../types/api/updateCompany.types';
3
+ import { CompanyModel } from '../models/company';
4
+
5
+ export declare const transformCompany: (response: getCompanyResponse | updateCompanyResponse) => CompanyModel;
6
+ //# sourceMappingURL=transform-company.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { CountriesFormResponse } from '../../types/api/getCountries.types';
2
+ import { Country } from '../models/country';
3
+
4
+ export declare const transformCountries: (response: CountriesFormResponse) => {
5
+ availableCountries: Country[] | [
6
+ ];
7
+ countriesWithRequiredRegion: string[];
8
+ optionalZipCountries: string[];
9
+ };
10
+ //# sourceMappingURL=transform-countries.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './useCompanyProfile';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { CompanyModel } from '../../data/models';
2
+ import { Country } from '../../data/models/country';
3
+
4
+ export interface UseCompanyProfileProps {
5
+ handleSetInLineAlert?: (alert?: {
6
+ type: 'success' | 'error';
7
+ text: string;
8
+ }) => void;
9
+ }
10
+ export declare const useCompanyProfile: ({ handleSetInLineAlert }: UseCompanyProfileProps) => {
11
+ company: CompanyModel | null;
12
+ countries: Country[];
13
+ createdAt: string;
14
+ loading: boolean;
15
+ submitLoading: boolean;
16
+ showEditForm: boolean;
17
+ inputChange: Record<string, string | number | boolean>;
18
+ handleShowEditForm: () => void;
19
+ handleHideEditForm: (clearStates?: () => void) => void;
20
+ handleUpdateCompany: (data: Partial<CompanyModel>) => Promise<void>;
21
+ handleInputChange: (value: Record<string, string | number | boolean>) => void;
22
+ renderAlertMessage: (type: 'success' | 'error', message?: string) => void;
23
+ saving: boolean;
24
+ };
25
+ //# sourceMappingURL=useCompanyProfile.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './containers';
18
+ export * from './useInLineAlert';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { Country } from '../data/models';
2
+
3
+ interface UseCountriesResult {
4
+ countryOptions: Country[];
5
+ regionOptions: {
6
+ text: string;
7
+ value: string;
8
+ }[];
9
+ isRegionRequired: boolean;
10
+ hasRegionOptions: boolean;
11
+ loadingCountries: boolean;
12
+ }
13
+ export declare const useCountries: (selectedCountryCode: string | undefined) => UseCountriesResult;
14
+ export {};
15
+ //# sourceMappingURL=useCountries.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { InLineAlertProps } from '../types/companyProfile.types';
2
+
3
+ export type AlertType = 'success' | 'warning' | 'error';
4
+ export interface AlertOptions {
5
+ type: AlertType;
6
+ text: string;
7
+ autoHide?: boolean;
8
+ autoHideDelay?: number;
9
+ }
10
+ export interface UseInLineAlertReturn {
11
+ inLineAlertProps: InLineAlertProps;
12
+ handleSetInLineAlert: (notification?: AlertOptions) => void;
13
+ clearAlert: () => void;
14
+ showSuccess: (text: string, autoHide?: boolean) => void;
15
+ showWarning: (text: string, autoHide?: boolean) => void;
16
+ showError: (text: string, autoHide?: boolean) => void;
17
+ }
18
+ export declare const useInLineAlert: () => UseInLineAlertReturn;
19
+ export default useInLineAlert;
20
+ //# sourceMappingURL=useInLineAlert.d.ts.map
@@ -0,0 +1,96 @@
1
+ declare const _default: {
2
+ "Company": {
3
+ "shared": {
4
+ "fields": {
5
+ "companyName": "Company Name",
6
+ "email": "Email",
7
+ "legalName": "Legal Name",
8
+ "vatTaxId": "VAT/Tax ID",
9
+ "resellerId": "Reseller ID",
10
+ "legalAddress": "Legal Address",
11
+ "streetAddress": "Street Address",
12
+ "city": "City",
13
+ "country": "Country",
14
+ "stateProvince": "State/Province",
15
+ "zipPostalCode": "ZIP/Postal Code",
16
+ "phoneNumber": "Phone Number",
17
+ "status": "Status",
18
+ "region": "Region",
19
+ "postalCode": "Postal Code"
20
+ },
21
+ "buttons": {
22
+ "edit": "Edit",
23
+ "cancel": "Cancel",
24
+ "save": "Save Changes",
25
+ "saving": "Saving...",
26
+ "close": "Close",
27
+ "confirm": "Confirm"
28
+ },
29
+ "validation": {
30
+ "required": "This field is required",
31
+ "invalidEmail": "Please enter a valid email address",
32
+ "companyNameRequired": "Company name is required",
33
+ "emailRequired": "Email is required",
34
+ "emailNotAvailable": "This email is already used by another company",
35
+ "phoneInvalid": "Please enter a valid phone number",
36
+ "postalCodeInvalid": "Please enter a valid postal code"
37
+ },
38
+ "messages": {
39
+ "loading": "Loading...",
40
+ "noData": "No data available",
41
+ "error": "An error occurred",
42
+ "success": "Operation completed successfully"
43
+ },
44
+ "ariaLabels": {
45
+ "editButton": "Edit company profile",
46
+ "cancelButton": "Cancel editing",
47
+ "saveButton": "Save company profile changes",
48
+ "closeButton": "Close dialog"
49
+ }
50
+ },
51
+ "CompanyProfile": {
52
+ "containerTitle": "Company Profile",
53
+ "editCompanyProfile": {
54
+ "containerTitle": "Edit Company Profile",
55
+ "companySuccess": "Company profile updated successfully",
56
+ "companyError": "Failed to update company profile",
57
+ "buttonSecondary": "Cancel",
58
+ "buttonPrimary": "Save Changes"
59
+ },
60
+ "companyProfileCard": {
61
+ "noDataMessage": "Company profile not available. Please contact your administrator.",
62
+ "contacts": "Contacts",
63
+ "companyAdministrator": "Company Administrator",
64
+ "salesRepresentative": "Sales Representative",
65
+ "paymentInformation": "Payment Information",
66
+ "availablePaymentMethods": "Available Payment Methods",
67
+ "shippingInformation": "Shipping Information",
68
+ "availableShippingMethods": "Available Shipping Methods",
69
+ "noPaymentMethods": "This company has no payment methods. Please contact store administrator.",
70
+ "noShippingMethods": "This company has no shipping methods. Please contact store administrator.",
71
+ "companyDetails": "Company Details",
72
+ "addressInformation": "Address Information"
73
+ },
74
+ "messages": {
75
+ "loadError": "Failed to load company profile",
76
+ "updateError": "Failed to update company profile",
77
+ "loadingProfile": "Loading company profile...",
78
+ "savingProfile": "Saving company profile..."
79
+ }
80
+ },
81
+ "FormText": {
82
+ "requiredFieldError": "This is a required field.",
83
+ "numericError": "Only numeric values are allowed.",
84
+ "alphaNumWithSpacesError": "Only alphanumeric characters and spaces are allowed.",
85
+ "alphaNumericError": "Only alphanumeric characters are allowed.",
86
+ "alphaError": "Only alphabetic characters are allowed.",
87
+ "emailError": "Please enter a valid email address.",
88
+ "phoneError": "Please enter a valid phone number.",
89
+ "postalCodeError": "Please enter a valid postal code.",
90
+ "lengthTextError": "Text length must be between {min} and {max} characters.",
91
+ "companyNameLengthError": "Company name must be between {min} and {max} characters."
92
+ }
93
+ }
94
+ };
95
+
96
+ export default _default;