@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.
- package/LICENSE.md +128 -0
- package/api/checkIsCompanyEnabled/checkIsCompanyEnabled.d.ts +4 -0
- package/api/checkIsCompanyEnabled/index.d.ts +18 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +24 -0
- package/api/fetch-graphql/index.d.ts +18 -0
- package/api/getCompany/getCompany.d.ts +5 -0
- package/api/getCompany/graphql/getCustomerRole.graphql.d.ts +18 -0
- package/api/getCompany/index.d.ts +18 -0
- package/api/getCountries/getCountries.d.ts +9 -0
- package/api/getCountries/graphql/getCountries.graphql.d.ts +18 -0
- package/api/getCountries/index.d.ts +18 -0
- package/api/graphql/CompanyFragment.graphql.d.ts +22 -0
- package/api/index.d.ts +24 -0
- package/api/initialize/index.d.ts +18 -0
- package/api/initialize/initialize.d.ts +25 -0
- package/api/updateCompany/graphql/updateCompany.graphql.d.ts +2 -0
- package/api/updateCompany/index.d.ts +18 -0
- package/api/updateCompany/updateCompany.d.ts +5 -0
- package/api/validateCompanyEmail/graphql/validateCompanyEmail.graphql.d.ts +18 -0
- package/api/validateCompanyEmail/index.d.ts +18 -0
- package/api/validateCompanyEmail/validateCompanyEmail.d.ts +4 -0
- package/api.d.ts +1 -0
- package/api.js +4 -0
- package/api.js.map +1 -0
- package/chunks/getCountries.js +135 -0
- package/chunks/getCountries.js.map +1 -0
- package/components/CompanyLoaders/CompanyLoaders.d.ts +6 -0
- package/components/CompanyLoaders/index.d.ts +18 -0
- package/components/CompanyProfileCard/CompanyProfileCard.d.ts +5 -0
- package/components/CompanyProfileCard/index.d.ts +19 -0
- package/components/EditCompanyProfile/CompanyAccountFields.d.ts +23 -0
- package/components/EditCompanyProfile/EditCompanyProfile.d.ts +5 -0
- package/components/EditCompanyProfile/LegalAddressFields.d.ts +50 -0
- package/components/EditCompanyProfile/index.d.ts +19 -0
- package/components/index.d.ts +20 -0
- package/containers/CompanyProfile/CompanyProfile.d.ts +5 -0
- package/containers/CompanyProfile/index.d.ts +19 -0
- package/containers/CompanyProfile.d.ts +3 -0
- package/containers/CompanyProfile.js +4 -0
- package/containers/CompanyProfile.js.map +1 -0
- package/containers/index.d.ts +18 -0
- package/data/models/company-address.d.ts +29 -0
- package/data/models/company.d.ts +65 -0
- package/data/models/country.d.ts +26 -0
- package/data/models/index.d.ts +20 -0
- package/data/transforms/index.d.ts +19 -0
- package/data/transforms/transform-company.d.ts +6 -0
- package/data/transforms/transform-countries.d.ts +10 -0
- package/hooks/containers/index.d.ts +18 -0
- package/hooks/containers/useCompanyProfile.d.ts +25 -0
- package/hooks/index.d.ts +19 -0
- package/hooks/useCountries.d.ts +15 -0
- package/hooks/useInLineAlert.d.ts +20 -0
- package/i18n/en_US.json.d.ts +96 -0
- package/lib/acdl.d.ts +43 -0
- package/lib/convertCase.d.ts +20 -0
- package/lib/convertToBoolean.d.ts +18 -0
- package/lib/convertToInputDateFormat.d.ts +18 -0
- package/lib/cookies.d.ts +18 -0
- package/lib/fetch-error.d.ts +21 -0
- package/lib/index.d.ts +25 -0
- package/lib/network-error.d.ts +6 -0
- package/lib/validationFields.d.ts +33 -0
- package/package.json +1 -0
- package/render/Provider.d.ts +8 -0
- package/render/index.d.ts +18 -0
- package/render/render.d.ts +4 -0
- package/render.d.ts +1 -0
- package/render.js +5 -0
- package/render.js.map +1 -0
- package/types/api/checkIsCompanyEnabled.types.d.ts +21 -0
- package/types/api/getCompany.types.d.ts +83 -0
- package/types/api/getCountries.types.d.ts +37 -0
- package/types/api/updateCompany.types.d.ts +73 -0
- package/types/api/validateCompanyEmail.types.d.ts +26 -0
- package/types/index.d.ts +23 -0
package/lib/acdl.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
declare global {
|
|
18
|
+
interface Window {
|
|
19
|
+
adobeDataLayer: any[];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
declare enum EventsList {
|
|
23
|
+
EDIT_COMPANY_EVENT = "edit-company"
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sets a context in the Adobe Client Data Layer (ACDL)
|
|
27
|
+
* @param context - The context object to set
|
|
28
|
+
*/
|
|
29
|
+
declare const setContext: (context: Record<string, any>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Pushes an event to the Adobe Client Data Layer (ACDL)
|
|
32
|
+
* @param event - The event object to push
|
|
33
|
+
*/
|
|
34
|
+
declare const pushEvent: (event: Record<string, any>) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Publishes events to the Adobe Client Data Layer (ACDL)
|
|
37
|
+
* @param eventType - The type of event to publish
|
|
38
|
+
* @param eventParams - Parameters associated with the event
|
|
39
|
+
* @returns null if the event type is not recognized
|
|
40
|
+
*/
|
|
41
|
+
declare const publishEvents: (eventType: string, eventParams: any) => null | undefined;
|
|
42
|
+
export { EventsList, publishEvents, pushEvent, setContext };
|
|
43
|
+
//# sourceMappingURL=acdl.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 declare const convertToCamelCase: (key: string) => string;
|
|
18
|
+
export declare const convertToSnakeCase: (key: string) => string;
|
|
19
|
+
export declare const convertKeysCase: (data: any, type: 'snakeCase' | 'camelCase', dictionary?: Record<string, string>) => any;
|
|
20
|
+
//# sourceMappingURL=convertCase.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 declare const convertToBoolean: (element: string | number) => boolean;
|
|
18
|
+
//# sourceMappingURL=convertToBoolean.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 declare const convertToInputDateFormat: (dateTimeString: string) => string;
|
|
18
|
+
//# sourceMappingURL=convertToInputDateFormat.d.ts.map
|
package/lib/cookies.d.ts
ADDED
|
@@ -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 declare function getCookie(cookieName: string): string | null;
|
|
18
|
+
//# sourceMappingURL=cookies.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/** Actions */
|
|
18
|
+
export declare const handleFetchError: (errors: Array<{
|
|
19
|
+
message: string;
|
|
20
|
+
}>) => never;
|
|
21
|
+
//# sourceMappingURL=fetch-error.d.ts.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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 './acdl';
|
|
18
|
+
export * from './convertCase';
|
|
19
|
+
export * from './convertToBoolean';
|
|
20
|
+
export * from './convertToInputDateFormat';
|
|
21
|
+
export * from './cookies';
|
|
22
|
+
export * from './fetch-error';
|
|
23
|
+
export * from './network-error';
|
|
24
|
+
export * from './validationFields';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type TranslationList = Record<string, string>;
|
|
2
|
+
type ErrorsList = Record<string, string>;
|
|
3
|
+
export type ValidationFieldsConfig = {
|
|
4
|
+
validateRules: Record<string, string>[];
|
|
5
|
+
code?: string;
|
|
6
|
+
customUpperCode: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare enum InputValidation {
|
|
10
|
+
Numeric = "numeric",
|
|
11
|
+
AlphanumWithSpaces = "alphanum-with-spaces",
|
|
12
|
+
Alphanumeric = "alphanumeric",
|
|
13
|
+
Alpha = "alpha",
|
|
14
|
+
Email = "email",
|
|
15
|
+
Length = "length",
|
|
16
|
+
Date = "date",
|
|
17
|
+
Url = "url"
|
|
18
|
+
}
|
|
19
|
+
export declare const validateNumeric: (value: string) => boolean;
|
|
20
|
+
export declare const validateAlphanumWithSpaces: (value: string) => boolean;
|
|
21
|
+
export declare const validateAlphanumeric: (value: string) => boolean;
|
|
22
|
+
export declare const validateAlpha: (value: string) => boolean;
|
|
23
|
+
export declare const validateEmail: (value: string) => boolean;
|
|
24
|
+
export declare const validateDate: (value: string) => boolean;
|
|
25
|
+
export declare const isDateWithinRange: (date: string, minTimestamp?: number, maxTimestamp?: number) => boolean;
|
|
26
|
+
export declare const convertTimestampToDate: (timestamp: string | null | undefined) => string;
|
|
27
|
+
export declare const validateUrl: (url: string) => boolean;
|
|
28
|
+
export declare const validateLength: (value: string, minLength: number, maxLength: number) => boolean;
|
|
29
|
+
export declare const validationFields: (value: string, configs: ValidationFieldsConfig, translations: TranslationList, errorsList: ErrorsList) => {
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=validationFields.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "@dropins/storefront-company-management", "version": "1.0.0-beta2", "@dropins/tools": "^1.3.0", "license": "SEE LICENSE IN LICENSE.md"}
|
|
@@ -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 './render';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
package/render.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './render/index'
|
package/render.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
(function(c,t){try{if(typeof document<"u"){const o=document.createElement("style"),e=t.styleId;for(const a in t.attributes)o.setAttribute(a,t.attributes[a]);o.setAttribute("data-dropin",e),o.appendChild(document.createTextNode(c));const n=document.querySelector('style[data-dropin="sdk"]');if(n)n.after(o);else{const a=document.querySelector('link[rel="stylesheet"], style');a?a.before(o):document.head.append(o)}}}catch(o){console.error("dropin-styles (injectCodeFunction)",o)}})(".company-profile__title{margin-bottom:var(--spacing-medium)}.account-company-profile-card-short{margin-bottom:var(--spacing-small)}.account-company-profile-card .dropin-card__content{gap:0}.account-company-profile-card__wrapper{display:grid;grid-template-columns:1fr;align-items:start;gap:var(--grid-1-gutters) 0}.account-company-profile-card .account-company-profile-card__actions{margin-left:auto;display:flex;justify-content:space-between;align-items:center;gap:0 var(--grid-2-gutters)}@media (max-width: 300px){.account-company-profile-card .account-company-profile-card__actions{align-items:self-end;flex-direction:column-reverse}}.account-company-profile-card .account-company-profile-card__actions button{cursor:pointer;margin:0;padding:0}.account-company-profile-card__content p{font:var(--type-body-1-default-font);margin:0 var(--spacing-xsmall) 0 0;line-height:var(--spacing-xbig);padding:0}.account-company-profile-card__content p:nth-child(1),.account-company-profile-card__content p:nth-child(2){font:var(--type-body-1-strong-font);font-weight:500;margin:0 var(--spacing-xsmall) var(--spacing-xsmall) 0}.account-company-profile-card__content .company-legal-address{margin-top:var(--spacing-medium)}.account-company-profile-card__content .company-legal-address p{margin-bottom:var(--spacing-xsmall)}.account-company-profile-card__content .company-legal-address p:first-child{font:var(--type-body-1-strong-font);font-weight:500;margin-bottom:var(--spacing-small)}.account-company-profile-card__no-data{text-align:center;color:var(--color-neutral-600);font:var(--type-body-2-default-font);padding:var(--spacing-medium)}.account-company-profile-card__content .company-contacts{margin-top:var(--spacing-medium);padding-top:var(--spacing-medium);border-top:1px solid var(--color-neutral-200)}.account-company-profile-card__content .company-contacts>p:first-child{font:var(--type-body-1-strong-font);font-weight:500;margin-bottom:var(--spacing-small)}.account-company-profile-card__content .company-contact{margin-bottom:var(--spacing-medium);padding:var(--spacing-small);background-color:var(--color-neutral-50);border-radius:var(--shape-border-radius-1)}.account-company-profile-card__content .company-contact p{margin-bottom:var(--spacing-xsmall)}.account-company-profile-card__content .company-contact p:first-child{font-weight:500;color:var(--color-neutral-700)}.account-company-profile-card__content .company-payment-methods{margin-top:var(--spacing-medium);padding-top:var(--spacing-medium);border-top:1px solid var(--color-neutral-200)}.account-company-profile-card__content .company-payment-methods>p:first-child,.account-company-profile-card__content .company-payment-methods>p:nth-child(2){font:var(--type-body-1-strong-font);font-weight:500;margin-bottom:var(--spacing-small)}.account-company-profile-card__content .company-payment-methods p{margin-bottom:var(--spacing-xsmall)}.account-edit-company-profile__title{margin-bottom:var(--spacing-medium)}.account-edit-company-profile .dropin-card__content{gap:0}.account-edit-company-profile .account-edit-company-profile__notification{margin-bottom:var(--spacing-medium)}.account-edit-company-profile .account-edit-company-profile-form__field:nth-child(n+3){grid-column:span 2}.account-edit-company-profile .account-edit-company-profile__actions{display:flex;justify-content:end;align-items:center;gap:0 var(--grid-2-gutters);grid-column:span 2;margin-top:var(--spacing-medium)}.account-edit-company-profile .account-edit-company-profile__actions button{min-width:144px}.account-edit-company-profile-form{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium) var(--grid-2-gutters)}@media (max-width: 768px){.account-edit-company-profile-form{grid-template-columns:1fr}.account-edit-company-profile .account-edit-company-profile-form__field:nth-child(n+3){grid-column:span 1}.account-edit-company-profile .account-edit-company-profile__actions{grid-column:span 1;flex-direction:column;gap:var(--spacing-small)}.account-edit-company-profile .account-edit-company-profile__actions button{width:100%}}.account-edit-company-profile-form__section{grid-column:span 2;margin-top:var(--spacing-large);padding-top:var(--spacing-medium);border-top:1px solid var(--color-neutral-200)}.account-edit-company-profile-form__section-title{font:var(--type-headline-2-default-font);color:var(--color-neutral-800);margin-bottom:var(--spacing-medium);padding-bottom:var(--spacing-xsmall)}@media (max-width: 768px){.account-edit-company-profile-form__section{grid-column:span 1}}.account-edit-company-profile__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:#ffffffe6;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--spacing-medium);z-index:10;border-radius:var(--border-radius-medium)}.account-edit-company-profile__loading-text{font:var(--type-body-1-default-font);color:var(--color-neutral-700);font-weight:500}.account-edit-company-profile{position:relative}.company-company-loaders--card-loader{margin-bottom:var(--spacing-small)}.company-company-loaders--picker-loader div:first-child{max-width:200px}.company-company-loaders--picker-loader div:nth-child(3){max-width:400px}",{styleId:"company-management"});
|
|
4
|
+
import{jsx as a}from"@dropins/tools/preact-jsx-runtime.js";import{Render as i}from"@dropins/tools/lib.js";import{useState as s,useEffect as l}from"@dropins/tools/preact-hooks.js";import{UIProvider as d}from"@dropins/tools/components.js";import{events as m}from"@dropins/tools/event-bus.js";const p={shared:{fields:{companyName:"Company Name",email:"Email",legalName:"Legal Name",vatTaxId:"VAT/Tax ID",resellerId:"Reseller ID",legalAddress:"Legal Address",streetAddress:"Street Address",city:"City",country:"Country",stateProvince:"State/Province",zipPostalCode:"ZIP/Postal Code",phoneNumber:"Phone Number",status:"Status",region:"Region",postalCode:"Postal Code"},buttons:{edit:"Edit",cancel:"Cancel",save:"Save Changes",saving:"Saving...",close:"Close",confirm:"Confirm"},validation:{required:"This field is required",invalidEmail:"Please enter a valid email address",companyNameRequired:"Company name is required",emailRequired:"Email is required",emailNotAvailable:"This email is already used by another company",phoneInvalid:"Please enter a valid phone number",postalCodeInvalid:"Please enter a valid postal code"},messages:{loading:"Loading...",noData:"No data available",error:"An error occurred",success:"Operation completed successfully"},ariaLabels:{editButton:"Edit company profile",cancelButton:"Cancel editing",saveButton:"Save company profile changes",closeButton:"Close dialog"}},CompanyProfile:{containerTitle:"Company Profile",editCompanyProfile:{containerTitle:"Edit Company Profile",companySuccess:"Company profile updated successfully",companyError:"Failed to update company profile",buttonSecondary:"Cancel",buttonPrimary:"Save Changes"},companyProfileCard:{noDataMessage:"Company profile not available. Please contact your administrator.",contacts:"Contacts",companyAdministrator:"Company Administrator",salesRepresentative:"Sales Representative",paymentInformation:"Payment Information",availablePaymentMethods:"Available Payment Methods",shippingInformation:"Shipping Information",availableShippingMethods:"Available Shipping Methods",noPaymentMethods:"This company has no payment methods. Please contact store administrator.",noShippingMethods:"This company has no shipping methods. Please contact store administrator.",companyDetails:"Company Details",addressInformation:"Address Information"},messages:{loadError:"Failed to load company profile",updateError:"Failed to update company profile",loadingProfile:"Loading company profile...",savingProfile:"Saving company profile..."}},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",phoneError:"Please enter a valid phone number.",postalCodeError:"Please enter a valid postal code.",lengthTextError:"Text length must be between {min} and {max} characters.",companyNameLengthError:"Company name must be between {min} and {max} characters."}},c={Company:p},y={default:c},u=({children:o})=>{const[r,n]=s("en_US");return l(()=>{const e=m.on("locale",t=>{n(t)},{eager:!0});return()=>{e==null||e.off()}},[]),a(d,{lang:r,langDefinitions:y,children:o})},P=new i(a(u,{}));export{P as render};
|
|
5
|
+
//# sourceMappingURL=render.js.map
|
package/render.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sources":["/@dropins/storefront-company-management/src/render/Provider.tsx","/@dropins/storefront-company-management/src/render/render.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 *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport { UIProvider } from '@adobe-commerce/elsie/components';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { events } from '@adobe-commerce/event-bus';\n\nimport en_US from '../i18n/en_US.json';\n\n// Langs\nconst langDefinitions = {\n default: en_US,\n};\n\ninterface CompanyProviderProps {\n children?: any;\n}\n\nexport const Provider: FunctionComponent<CompanyProviderProps> = ({\n children,\n}) => {\n const [lang, setLang] = useState<Lang>('en_US');\n\n // Events\n useEffect(() => {\n const localeEvent = events.on(\n 'locale',\n (locale: string) => {\n setLang(locale as Lang);\n },\n { eager: true }\n );\n return () => {\n localeEvent?.off();\n };\n }, []);\n\n return (\n <UIProvider lang={lang} langDefinitions={langDefinitions}>\n {children}\n </UIProvider>\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 *******************************************************************/\n\nimport { Render } from '@adobe-commerce/elsie/lib';\nimport { Provider } from './Provider';\n\nexport const render = new Render(<Provider />);\n"],"names":["langDefinitions","en_US","Provider","children","lang","setLang","useState","useEffect","localeEvent","events","locale","jsx","UIProvider","render","Render"],"mappings":"ujGA0BMA,EAAkB,CACtB,QAASC,CACX,EAMaC,EAAoD,CAAC,CAChE,SAAAC,CACF,IAAM,CACJ,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAe,OAAO,EAG9C,OAAAC,EAAU,IAAM,CACd,MAAMC,EAAcC,EAAO,GACzB,SACCC,GAAmB,CAClBL,EAAQK,CAAc,CACxB,EACA,CAAE,MAAO,EAAA,CAAK,EAEhB,MAAO,IAAM,CACXF,GAAA,MAAAA,EAAa,KACf,CACF,EAAG,CAAA,CAAE,EAGHG,EAACC,EAAA,CAAW,KAAAR,EAAY,gBAAAJ,EACrB,SAAAG,CAAA,CACH,CAEJ,ECtCaU,EAAS,IAAIC,EAAOH,EAACT,IAAS,CAAE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 CheckIsCompanyEnabledResponse {
|
|
18
|
+
companyEnabled: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=checkIsCompanyEnabled.types.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
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 getCompanyResponse {
|
|
18
|
+
data: {
|
|
19
|
+
company: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
email: string;
|
|
23
|
+
legal_name?: string;
|
|
24
|
+
vat_tax_id?: string;
|
|
25
|
+
reseller_id?: string;
|
|
26
|
+
legal_address?: {
|
|
27
|
+
street: string[];
|
|
28
|
+
city: string;
|
|
29
|
+
region: {
|
|
30
|
+
region: string;
|
|
31
|
+
region_code: string;
|
|
32
|
+
region_id: number;
|
|
33
|
+
};
|
|
34
|
+
country_code: string;
|
|
35
|
+
postcode: string;
|
|
36
|
+
telephone?: string;
|
|
37
|
+
};
|
|
38
|
+
company_admin?: {
|
|
39
|
+
id: string;
|
|
40
|
+
firstname: string;
|
|
41
|
+
lastname: string;
|
|
42
|
+
email: string;
|
|
43
|
+
job_title?: string;
|
|
44
|
+
};
|
|
45
|
+
sales_representative?: {
|
|
46
|
+
firstname: string;
|
|
47
|
+
lastname: string;
|
|
48
|
+
email: string;
|
|
49
|
+
};
|
|
50
|
+
available_payment_methods?: {
|
|
51
|
+
code: string;
|
|
52
|
+
title: string;
|
|
53
|
+
}[];
|
|
54
|
+
available_shipping_methods?: {
|
|
55
|
+
code: string;
|
|
56
|
+
title: string;
|
|
57
|
+
}[];
|
|
58
|
+
};
|
|
59
|
+
customer?: {
|
|
60
|
+
role?: {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
permissions: {
|
|
64
|
+
id: string;
|
|
65
|
+
text: string;
|
|
66
|
+
children?: {
|
|
67
|
+
id: string;
|
|
68
|
+
text: string;
|
|
69
|
+
children?: {
|
|
70
|
+
id: string;
|
|
71
|
+
text: string;
|
|
72
|
+
}[];
|
|
73
|
+
}[];
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
status?: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
errors?: {
|
|
80
|
+
message: string;
|
|
81
|
+
}[];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=getCompany.types.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
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 CountriesFormResponse {
|
|
18
|
+
data: {
|
|
19
|
+
storeConfig: {
|
|
20
|
+
countries_with_required_region: string;
|
|
21
|
+
optional_zip_countries: string;
|
|
22
|
+
};
|
|
23
|
+
countries: {
|
|
24
|
+
two_letter_abbreviation: string;
|
|
25
|
+
full_name_locale: string;
|
|
26
|
+
available_regions: {
|
|
27
|
+
id: number;
|
|
28
|
+
code: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}[] | null;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
errors?: {
|
|
34
|
+
message: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=getCountries.types.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
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 updateCompanyResponse {
|
|
18
|
+
data: {
|
|
19
|
+
updateCompany: {
|
|
20
|
+
company: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
email: string;
|
|
24
|
+
legal_name?: string;
|
|
25
|
+
vat_tax_id?: string;
|
|
26
|
+
reseller_id?: string;
|
|
27
|
+
legal_address?: {
|
|
28
|
+
street: string[];
|
|
29
|
+
city: string;
|
|
30
|
+
region: {
|
|
31
|
+
region: string;
|
|
32
|
+
region_code: string;
|
|
33
|
+
region_id: number;
|
|
34
|
+
};
|
|
35
|
+
country_code: string;
|
|
36
|
+
postcode: string;
|
|
37
|
+
telephone?: string;
|
|
38
|
+
};
|
|
39
|
+
company_admin?: {
|
|
40
|
+
id: string;
|
|
41
|
+
firstname: string;
|
|
42
|
+
lastname: string;
|
|
43
|
+
email: string;
|
|
44
|
+
job_title?: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
errors?: {
|
|
50
|
+
message: string;
|
|
51
|
+
}[];
|
|
52
|
+
}
|
|
53
|
+
export type UpdateCompanyDto = Partial<{
|
|
54
|
+
name: string;
|
|
55
|
+
email: string;
|
|
56
|
+
legalName: string;
|
|
57
|
+
vatTaxId: string;
|
|
58
|
+
resellerId: string;
|
|
59
|
+
legalAddress: {
|
|
60
|
+
street: string[] | string;
|
|
61
|
+
street2?: string;
|
|
62
|
+
city: string;
|
|
63
|
+
region?: {
|
|
64
|
+
region: string;
|
|
65
|
+
regionCode: string;
|
|
66
|
+
} | string;
|
|
67
|
+
regionCode?: string;
|
|
68
|
+
countryCode: string;
|
|
69
|
+
postcode: string;
|
|
70
|
+
telephone?: string;
|
|
71
|
+
};
|
|
72
|
+
}>;
|
|
73
|
+
//# sourceMappingURL=updateCompany.types.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 interface ValidateCompanyEmailQuery {
|
|
18
|
+
isCompanyEmailAvailable: {
|
|
19
|
+
is_email_available: boolean;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ValidateCompanyEmailResponse {
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=validateCompanyEmail.types.d.ts.map
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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.types';
|
|
18
|
+
export * from './api/checkIsCompanyEnabled.types';
|
|
19
|
+
export * from './api/getCompany.types';
|
|
20
|
+
export * from './api/updateCompany.types';
|
|
21
|
+
export * from './api/getCountries.types';
|
|
22
|
+
export * from './api/validateCompanyEmail.types';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|