{"version":3,"sources":["webpack:///./src/modules/alphabet-list/alphabet-list.tsx?c2ef","webpack:///./src/modules/alphabet-list/alphabet-list.view.tsx?813d","webpack:///./src/themes/citta/views/order-history.view.tsx?a7e1","webpack:///./src/modules/citta-gift-card-balance-check/citta-gift-card-balance-check.tsx?92e5","webpack:///./src/modules/citta-gift-card-balance-check/citta-gift-card-balance-check.view.tsx?7d23","webpack:///./src/data-actions/stockists/stockists-cityorstate-data.ts?f596","webpack:///./src/data-actions/stockists/stockists-country-data.ts?e64e","webpack:///./src/data-actions/stockists/stockists-store.ts?67c2","webpack:///./src/modules/citta-stockists/citta-stockists.tsx?5b48","webpack:///./src/modules/citta-stockists/citta-stockists.view.tsx?256a"],"names":["AlphabetList","React","render","viewProps","_objectSpread","this","props","alphapetContainer","moduleProps","className","letterItems","_renderLetter","config","alphabetItemsDetails","displayTwoColumns","letterToSplitAt","renderView","console","log","_renderSplitColumn","_renderSingleColumn","_renderItem","alphabetItemDetail","_alphabetItemDetail$s","letter","subMenus","map","item","href","link","target","openInNewTab","name","leftSide","leftListNode","rightListNode","forEach","alphabetItem","push","listNode","Module","Object","assign","OrderHistoryOrderInfomation","_ref","orderInformationProps","salesId","channelName","createdDate","count","amount","channelReferenceId","processingLabel","orderIdLabel","Node","orderIdLabelText","processingLabelText","concat","_renderProcessStatus","OrderHistoryGroupDelivery","_ref2","deliveryProps","heading","processing","address","trackingInfo","OrderHistoryGroup","_ref3","groupProps","delivery","salesLinesProps","salesLines","salesLine","key","data","LineId","OrderHistoryGroups","_ref4","groupsProps","groups","group","index","OrderHistoryHeader","_ref5","headerProps","orderCountLabel","OrderHistorySalesOder","_ref6","salesOrderProps","orderInfomation","orderDetailsLink","resources","_objectWithoutProperties","_excluded","OrderHistoryList","_ref7","listProps","salesOrders","_excluded2","salesOrder","OrderHistoryView","_ref8","orderHistoryProps","header","alert","loading","emptyMessage","backToShoppingLink","list","moreButton","CittaGiftCardBalanceCheck","constructor","super","_renderLookupResult","result","state","lookupWaitText","success","balance","message","_renderSuccess","_renderFailure","_capture","event","newState","value","setState","_checkBalance","bind","_areRefsValid","cardRef","pinRef","card","pin","_mergeWithDefaults","CittaGiftCardBalanceCheckViewProps","GiftCardBalanceCheckModuleProps","classnames","GiftCardBalanceCheckCardNodeProps","GiftCardBalanceCheckCardNode","_renderCard","GiftCardBalanceCheckPinNodeProps","GiftCardBalanceCheckPinNode","_renderPin","GiftCardBalanceCheckResultNode","GiftCardBalanceCheckButtonNode","_renderCheckBalance","propsIndex","defaultConfig","keyIndex","length","keyName","cardNumberPlaceholderText","type","ref","placeholder","onChange","pinNumberPlaceholderText","submitButtonProps","disabled","onClick","buttonTextForGiftCardBalanceCheck","lookupFailureMessage","formattedBalance","context","cultureFormatter","formatCurrency","labelForSuccessfulGiftCardBalanceCheckResponse","refKeys","current","previousState","getGiftCardBalanceCheck","GiftCardBalanceCheckInput","actionContext","then","GetStockistsCityOrStateInput","countrycode","getCacheKey","getCacheObjectType","dataCacheType","async","getStockcistsCityorStateAction","input","ctx","Result","dXC_GetCityStateMasterAsync","callerContext","error","Array","isArray","createObservableDataAction","action","inputData","locale","requestContext","Error","GetStockistsCountryRegionsInput","getStockcistsCountryRegionsAction","dXC_GetCountryMasterAsync","args","GetStockistsStoreInput","cityorstate","searchstr","getStockcistsStoreAction","country","dXC_GetStockistsAsync","CittaStockists","countrySelected","stateorcitySelected","searchString","countryList","stateList","stockistList","_handleSearch","e","searchStr","_searchInputRef","countryValue","_countrySelectRef","stateValue","_stateorcitySelectRef","_getStockistsList","catch","err","_changeSearchText","_onStateorCityChange","_onCountryChange","_getStateProvinces","_getCountryList","StockistContainer","stockistTop","tag","stockistMain","stockistGrid","createCityStateDropDown","_renderCityStateDropDown","createCountryDropDown","_renderCountryDropDown","createStockistsAddress","_renderStockistsAddress","createSearchAddress","_renderSearchAddress","searchPlaceholder","autoComplete","Button","title","color","citaAndStatePlaceholder","id","selected","_renderStateorCityList","countryPlaceholder","_renderCountryList","stateorcity","CityStateMaster","stateorcityItem","_getCities","CountryMaster","countryItem","_getCountries","CountryCode","CountryName","StockistsList","stockist","Name","StreetNumber","Street","District","City","PostalCode","State","PhoneNumber","Email","response","_countryList","countryCode","_stateList","_stockistList","__decorate","observable","CittaStockistsViewProps"],"mappings":";stBAqBA,MAAMA,UAAqBC,gBAChBC,SAEH,MAAMC,EAASC,IAAA,GACPC,KAAKC,OAA+C,IACxDC,kBAAmB,CACfC,YAAaH,KAAKC,MAClBG,UAAW,gBAEfC,YAAaL,KAAKM,cAAcN,KAAKC,MAAMM,OAAOC,qBAAsBR,KAAKC,MAAMM,OAAOE,kBAAmBT,KAAKC,MAAMM,OAAOG,mBAGnI,OAAOV,KAAKC,MAAMU,WAAWb,GAGzBQ,cAAcE,EAAoDC,EAA6BC,GAEnG,OADAE,QAAQC,IAAI,oBAAqBJ,GAC7BA,EACOT,KAAKc,mBAAmBN,EAAsBE,GAGlDV,KAAKe,oBAAoBP,GAG5BQ,YAAYC,GAA6C,IAAAC,EAC7D,OACItB,gBAAA,OAAKQ,UAAU,+BACXR,gBAAA,UAAKqB,EAAmBE,QACxBvB,gBAAA,WACAA,gBAAA,OAAKQ,UAAU,0BACiB,QADOc,EAClCD,EAAmBG,gBAAQ,IAAAF,OAAA,EAA3BA,EAA6BG,IAAIC,GAE1B1B,2BAAA,KACIA,gBAAA,KAAG2B,KAAMD,EAAKE,KAAMC,OAAQH,EAAKI,aAAe,SAAW,IAAKJ,EAAKK,UASzFb,mBAAmBN,EAAoDE,GAC3E,IAAIkB,GAAW,EACf,MAAMC,EAA8B,GAC9BC,EAA+B,GAcrC,OAbAtB,WAAsBuB,QAAQC,IAEtBA,EAAab,SAAWT,IACxBkB,GAAW,GAGXA,EACAC,EAAaI,KAAKjC,KAAKgB,YAAYgB,IAEnCF,EAAcG,KAAKjC,KAAKgB,YAAYgB,MAKxCpC,gBAAA,OAAKQ,UAAU,0BACXR,gBAAA,OAAKQ,UAAU,2BAA2ByB,GAC1CjC,gBAAA,OAAKQ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,EAAiB,YAACC,EAAW,sBAACM,EAAqB,wBAACF,EAAuB,oBAACM,GAAwB1O,EAC7J,OAAIA,EAAMwO,uBAIN7O,gBAACuC,SAAMC,OAAAC,OAAA,GAAK2L,GACRpO,gBAACqD,OAAIb,OAAAC,OAAA,GAAK4L,GACLM,EACAF,EACAM,GAGL/O,gBAACqD,OAAIb,OAAAC,OAAA,GAAK8L,GACNvO,gBAACqD,OAAIb,OAAAC,OAAA,GAAK+L,GACRK,KAZH","file":"static/js/25.2d7b29d1ee82970fe11d.chunk.js","sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { IAlphabetListData } from './alphabet-list.data';\r\nimport { IAlphabetListProps, IAlphabetItemsDetailsData } from './alphabet-list.props.autogenerated';\r\n\r\nexport interface IAlphabetListViewProps extends IAlphabetListProps {\r\n alphapetContainer: IModuleProps;\r\n letterItems: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * AlphabetList component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass AlphabetList extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n\r\n const viewProps: IAlphabetListViewProps = {\r\n ...(this.props as IAlphabetListProps),\r\n alphapetContainer: {\r\n moduleProps: this.props,\r\n className: 'AlphabetList'\r\n },\r\n letterItems: this._renderLetter(this.props.config.alphabetItemsDetails, this.props.config.displayTwoColumns, this.props.config.letterToSplitAt)\r\n };\r\n\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _renderLetter(alphabetItemsDetails?: IAlphabetItemsDetailsData[], displayTwoColumns?: boolean, letterToSplitAt?: string): JSX.Element {\r\n console.log('displayTwoColumns', displayTwoColumns)\r\n if (displayTwoColumns) {\r\n return this._renderSplitColumn(alphabetItemsDetails, letterToSplitAt)\r\n }\r\n\r\n return this._renderSingleColumn(alphabetItemsDetails)\r\n }\r\n\r\n private _renderItem(alphabetItemDetail: IAlphabetItemsDetailsData): JSX.Element {\r\n return (\r\n
\r\n

{alphabetItemDetail.letter}

\r\n
\r\n
\r\n {alphabetItemDetail.subMenus?.map(item => {\r\n return (\r\n <>\r\n {item.name}\r\n \r\n )\r\n })}\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderSplitColumn(alphabetItemsDetails?: IAlphabetItemsDetailsData[], letterToSplitAt?: string): JSX.Element {\r\n let leftSide = true;\r\n const leftListNode: JSX.Element[] = [];\r\n const rightListNode: JSX.Element[] = [];\r\n alphabetItemsDetails?.forEach(alphabetItem => {\r\n\r\n if (alphabetItem.letter === letterToSplitAt) {\r\n leftSide = false\r\n }\r\n\r\n if (leftSide) {\r\n leftListNode.push(this._renderItem(alphabetItem))\r\n } else {\r\n rightListNode.push(this._renderItem(alphabetItem))\r\n }\r\n })\r\n\r\n return (\r\n
\r\n
{leftListNode}
\r\n
{rightListNode}
\r\n
\r\n )\r\n }\r\n\r\n private _renderSingleColumn(alphabetItemsDetails?: IAlphabetItemsDetailsData[]): JSX.Element {\r\n const listNode = alphabetItemsDetails?.map(alphabetItem => {\r\n return this._renderItem(alphabetItem)\r\n })\r\n\r\n return (\r\n <>\r\n {listNode}\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default AlphabetList;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { IAlphabetListViewProps } from './alphabet-list';\r\n\r\nexport default (props: IAlphabetListViewProps) => {\r\n return ( \r\n \r\n {props.letterItems}\r\n \r\n );\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport {\r\n IGroup,\r\n IGroupDelivery,\r\n IGroups,\r\n IHeader,\r\n IList,\r\n IOrderHistoryResources,\r\n IOrderHistoryViewProps,\r\n IOrderInformation,\r\n ISalesOrder\r\n} from '@msdyn365-commerce-modules/order-management';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport const OrderHistoryOrderInfomation: React.FC = ({\r\n orderInformationProps,\r\n salesId,\r\n channelName,\r\n createdDate,\r\n count,\r\n amount,\r\n channelReferenceId,\r\n processingLabel,\r\n orderIdLabel\r\n}) => (\r\n \r\n {channelName}\r\n {_renderProcessStatus(salesId, orderIdLabel!, processingLabel!)}\r\n {createdDate}\r\n {count}\r\n {amount}\r\n {channelReferenceId}\r\n \r\n);\r\n\r\nfunction _renderProcessStatus(salesId: React.ReactNode, orderIdLabelText: string, processingLabelText: string): React.ReactNode {\r\n return (\r\n \r\n {typeof salesId === 'string' ? (orderIdLabelText?.concat(' ', processingLabelText!)) : salesId}\r\n \r\n );\r\n}\r\n\r\nexport const OrderHistoryGroupDelivery: React.FC = ({\r\n deliveryProps,\r\n heading,\r\n count,\r\n processing,\r\n address,\r\n trackingInfo\r\n}) => (\r\n \r\n {heading}\r\n {count}\r\n {processing}\r\n {address}\r\n {/* {trackingInfo} */}\r\n \r\n);\r\n\r\nexport const OrderHistoryGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\r\n \r\n {delivery && }\r\n {salesLines && (\r\n \r\n {salesLines.map(salesLine => (\r\n {salesLine.salesLine}\r\n ))}\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const OrderHistoryGroups: React.FC = ({ groupsProps, groups }) => (\r\n \r\n {groups.map((group, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nexport const OrderHistoryHeader: React.FC = ({ headerProps, heading, orderCountLabel }) => (\r\n \r\n {heading}\r\n {orderCountLabel}\r\n \r\n);\r\n\r\nexport const OrderHistorySalesOder: React.FC = ({ salesOrderProps, orderInfomation, groups, orderDetailsLink, ...resources }) => (\r\n \r\n {orderInfomation && }\r\n {groups && }\r\n {orderDetailsLink}\r\n \r\n);\r\n\r\nexport const OrderHistoryList: React.FC = ({ listProps, salesOrders, ...resources }) => (\r\n \r\n {salesOrders && salesOrders.map((salesOrder, index) => )}\r\n \r\n);\r\n\r\nconst OrderHistoryView: React.FC = ({\r\n orderHistoryProps,\r\n header,\r\n alert,\r\n loading,\r\n emptyMessage,\r\n backToShoppingLink,\r\n list,\r\n moreButton,\r\n resources\r\n}) => (\r\n \r\n {header && }\r\n {loading}\r\n {alert && (\r\n <>\r\n {alert}\r\n {backToShoppingLink}\r\n \r\n )}\r\n {emptyMessage && (\r\n <>\r\n {emptyMessage}\r\n {backToShoppingLink}\r\n \r\n )}\r\n {list && }\r\n {moreButton && moreButton}\r\n \r\n);\r\n\r\nexport default OrderHistoryView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { getGiftCardBalanceCheck, GiftCardBalanceCheckInput } from '../../data-actions/gift-card/get-card-balance';\r\nimport { ICittaGiftCardBalanceCheckData, ICittaGiftCardBalanceCheckResult } from './citta-gift-card-balance-check.data';\r\nimport { ICittaGiftCardBalanceCheckProps } from './citta-gift-card-balance-check.props.autogenerated';\r\ntype CittaGiftCardBalanceCheckStateKeys = 'c' | 'p';\r\n\r\ninterface ICittaGiftCardBalanceCheckState {\r\n /**\r\n * The gift card number\r\n */\r\n card: string;\r\n /**\r\n * The gift card pin\r\n */\r\n pin: string;\r\n\r\n /**\r\n * The balance check result\r\n */\r\n result?: ICittaGiftCardBalanceCheckResult;\r\n\r\n /**\r\n * Flag to determine if we are processing a lookup request\r\n */\r\n processing: boolean;\r\n}\r\n\r\nexport interface ICittaGiftCardBalanceCheckViewProps extends ICittaGiftCardBalanceCheckProps, ICittaGiftCardBalanceCheckState {\r\n GiftCardBalanceCheckModuleProps: IModuleProps;\r\n GiftCardBalanceCheckCardNodeProps: INodeProps;\r\n GiftCardBalanceCheckCardNode: React.ReactNode;\r\n GiftCardBalanceCheckPinNodeProps: INodeProps;\r\n GiftCardBalanceCheckPinNode: React.ReactNode;\r\n GiftCardBalanceCheckResultNode: React.ReactNode;\r\n GiftCardBalanceCheckButtonNode: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * CittaGiftCardBalanceCheck component\r\n * @extends {React.PureComponent, ICittaGiftCardBalanceCheckState>}\r\n */\r\nclass CittaGiftCardBalanceCheck extends React.PureComponent, ICittaGiftCardBalanceCheckState> {\r\n private static defaultConfig: string[] = ['Card Number', 'Pin Number', 'Checking...'];\r\n private static propsIndex: string[] = ['cardNumberPlaceholderText', 'pinNumberPlaceholderText', 'lookupWaitText'];\r\n /**\r\n * Gift Card Ref\r\n */\r\n private cardRef: React.RefObject;\r\n /**\r\n * Pin for gift card Ref\r\n */\r\n private pinRef: React.RefObject;\r\n\r\n public constructor(props: ICittaGiftCardBalanceCheckProps) {\r\n super(props);\r\n\r\n // binds\r\n this._checkBalance = this._checkBalance.bind(this);\r\n this._areRefsValid = this._areRefsValid.bind(this);\r\n this._renderLookupResult = this._renderLookupResult.bind(this);\r\n this._renderFailure = this._renderFailure.bind(this);\r\n\r\n // refs\r\n this.cardRef = React.createRef();\r\n this.pinRef = React.createRef();\r\n\r\n // state init\r\n this.state = { card: '', pin: '', processing: false };\r\n }\r\n public render(): JSX.Element | null {\r\n const config = this.props.config;\r\n this._mergeWithDefaults();\r\n\r\n const CittaGiftCardBalanceCheckViewProps = {\r\n ...this.props,\r\n GiftCardBalanceCheckModuleProps: {\r\n moduleProps: this.props,\r\n className: classnames('citta-gift-card-balance-check', config.className)\r\n },\r\n GiftCardBalanceCheckCardNodeProps: {\r\n className: 'card-number-wrapper input-wrapper'\r\n },\r\n GiftCardBalanceCheckCardNode: this._renderCard(),\r\n GiftCardBalanceCheckPinNodeProps: {\r\n className: 'card-pin-wrapper input-wrapper'\r\n },\r\n GiftCardBalanceCheckPinNode: this._renderPin(),\r\n GiftCardBalanceCheckResultNode: this._renderLookupResult(),\r\n GiftCardBalanceCheckButtonNode: this._renderCheckBalance()\r\n };\r\n\r\n return this.props.renderView(CittaGiftCardBalanceCheckViewProps) as React.ReactElement;\r\n }\r\n\r\n private _mergeWithDefaults(): void {\r\n const propsIndex = CittaGiftCardBalanceCheck.propsIndex;\r\n const defaultConfig = CittaGiftCardBalanceCheck.defaultConfig;\r\n const config = this.props.config;\r\n for (let keyIndex = 0; keyIndex < propsIndex.length; keyIndex++) {\r\n const keyName = propsIndex[keyIndex];\r\n config[keyName] = config[keyName] || defaultConfig[keyIndex];\r\n }\r\n }\r\n\r\n private _renderCard(): React.ReactNode {\r\n const { cardNumberPlaceholderText } = this.props.config;\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderPin(): React.ReactNode {\r\n const { pinNumberPlaceholderText } = this.props.config;\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderCheckBalance(): React.ReactNode {\r\n const submitButtonProps: React.ButtonHTMLAttributes<{}> = {\r\n // disable if we're invalid or if we're processing a request\r\n disabled: !this._areRefsValid() || this.state.processing\r\n } as React.ButtonHTMLAttributes<{}>;\r\n return (\r\n \r\n {this.props.resources.buttonTextForGiftCardBalanceCheck || 'check balance'}\r\n \r\n );\r\n }\r\n\r\n private _renderLookupResult = (): React.ReactNode | null => {\r\n const { result } = this.state;\r\n if (!result) {\r\n return;\r\n }\r\n if (this.state.processing) {\r\n return
{this.props.config.lookupWaitText}
;\r\n }\r\n const { success, balance, message } = result;\r\n const className = success ? 'success' : 'fail';\r\n return (\r\n
\r\n {\r\n success ? this._renderSuccess(message, balance) : this._renderFailure(message)\r\n }\r\n
\r\n );\r\n }\r\n\r\n private _renderFailure(message?: string): React.ReactNode | null {\r\n return
{message || this.props.config.lookupFailureMessage}
;\r\n }\r\n\r\n private _renderSuccess(message?: string, balance?: number): React.ReactNode | null {\r\n const formattedBalance: string = this.props.context.cultureFormatter.formatCurrency(balance || '' as React.ReactText);\r\n return (\r\n <>\r\n {message &&
{message}
}\r\n
{this.props.resources.labelForSuccessfulGiftCardBalanceCheckResponse || 'Balance: '} {formattedBalance}
\r\n \r\n );\r\n }\r\n\r\n private _areRefsValid(): boolean {\r\n const refKeys = ['cardRef', 'pinRef'];\r\n for (let keyIndex = 0; keyIndex < refKeys.length; keyIndex++) {\r\n const ref: React.RefObject | undefined = this[refKeys[keyIndex]];\r\n if (!ref || !ref.current || !ref.current.value) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n private _capture = (key: CittaGiftCardBalanceCheckStateKeys) => (event: React.ChangeEvent) => {\r\n const newState = { [key]: event.target.value };\r\n // @ts-ignore -- type is valid\r\n this.setState(newState);\r\n }\r\n\r\n private _checkBalance(): void {\r\n this.setState(previousState => {\r\n return {\r\n ...previousState,\r\n processing: true\r\n };\r\n // tslint:disable-next-line:align\r\n }, () => {\r\n // tslint:disable-next-line:no-floating-promises\r\n getGiftCardBalanceCheck(new GiftCardBalanceCheckInput(this.cardRef.current!.value, this.pinRef.current!.value), this.props.context.actionContext)\r\n .then((result) => {\r\n this.cardRef && this.cardRef.current && this.cardRef.current.value ? this.cardRef.current.value = '' : null;\r\n this.pinRef && this.pinRef.current && this.pinRef.current.value ? this.pinRef.current.value = '' : null;\r\n this.setState({\r\n result,\r\n processing: false\r\n });\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default CittaGiftCardBalanceCheck;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICittaGiftCardBalanceCheckViewProps } from './citta-gift-card-balance-check';\r\nexport default (props: ICittaGiftCardBalanceCheckViewProps) => {\r\n const { GiftCardBalanceCheckModuleProps,\r\n GiftCardBalanceCheckCardNodeProps,\r\n GiftCardBalanceCheckCardNode,\r\n GiftCardBalanceCheckPinNodeProps,\r\n GiftCardBalanceCheckPinNode,\r\n GiftCardBalanceCheckResultNode,\r\n GiftCardBalanceCheckButtonNode } = props;\r\n return (\r\n \r\n \r\n {GiftCardBalanceCheckCardNode}\r\n \r\n \r\n {GiftCardBalanceCheckPinNode}\r\n \r\n {GiftCardBalanceCheckResultNode}\r\n {GiftCardBalanceCheckButtonNode}\r\n \r\n );\r\n};\r\n","import { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { dXC_GetCityStateMasterAsync } from '../generated/DataActionExtension.g';\r\nimport { IDXC_GetCityStateMasterResponse } from '../generated/DataServiceEntities.g';\r\n\r\n/**\r\n * GetStockistsCityorStateInput class\r\n */\r\nexport class GetStockistsCityOrStateInput implements IActionInput {\r\n public countrycode: string;\r\n\r\n constructor(countrycode: string) {\r\n this.countrycode = countrycode;\r\n }\r\n public getCacheKey = () =>`StockistsCityorStateRegionInfo${this.countrycode}`;\r\n public getCacheObjectType = () => 'StockistsCityorStateRegionInfo';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): GetStockistsCityOrStateInput => {\r\n const { locale } = inputData.requestContext;\r\n if (!(inputData.requestContext && locale)) {\r\n throw new Error('Unable to create country regions input. Locale is not provided.');\r\n }\r\n\r\n return new GetStockistsCityOrStateInput(locale);\r\n};\r\n\r\nexport async function getStockcistsCityorStateAction(input: GetStockistsCityOrStateInput, ctx: IActionContext): Promise {\r\n console.log(`CityorState action called`);\r\n\r\n let result: IDXC_GetCityStateMasterResponse = { Result: 'failure' };\r\n\r\n try {\r\n result = await dXC_GetCityStateMasterAsync({ callerContext: ctx }, input.countrycode);\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n return Array.isArray(result) ? result[0] : result;\r\n}\r\n\r\nexport const IGetStockcistsCityorStateAction = createObservableDataAction({\r\n action: >getStockcistsCityorStateAction,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\r\nimport { dXC_GetCountryMasterAsync } from '../generated/DataActionExtension.g';\r\nimport { IDXC_GetCountryMasterResponse } from '../generated/DataServiceEntities.g';\r\n\r\n/**\r\n * GetStockistsCountryInput class\r\n */\r\nexport class GetStockistsCountryRegionsInput implements IActionInput {\r\n\r\n public getCacheKey = () => `StockistsCountryRegionInfo`;\r\n public getCacheObjectType = () => 'StockistsCountryRegionInfo';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nconst createInput = (args: GetStockistsCountryRegionsInput): IActionInput => {\r\n return args;\r\n};\r\n\r\nexport async function getStockcistsCountryRegionsAction(input: GetStockistsCountryRegionsInput, ctx: IActionContext)\r\n : Promise {\r\n console.log(`country action called`);\r\n let result: IDXC_GetCountryMasterResponse = { Result: 'failure' };\r\n try {\r\n result = await dXC_GetCountryMasterAsync(\r\n { callerContext: ctx }\r\n );\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n return Array.isArray(result) ? result[0] : result;\r\n}\r\n\r\nexport const IGetStockcistsCountryRegionsAction = createObservableDataAction({\r\n action: >getStockcistsCountryRegionsAction,\r\n input: createInput\r\n});\r\n","import { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { dXC_GetStockistsAsync } from '../generated/DataActionExtension.g';\r\nimport { IDXC_GetStockistsServiceResponse } from '../generated/DataServiceEntities.g';\r\n\r\n/**\r\n * GetStockistsStoreInput class\r\n */\r\nexport class GetStockistsStoreInput implements IActionInput {\r\n public countrycode?: string;\r\n public cityorstate?: string;\r\n public searchstr?: string;\r\n\r\n constructor(countrycode?: string, cityorstate?: string, searchstr?: string) {\r\n this.countrycode = countrycode;\r\n this.cityorstate = cityorstate;\r\n this.searchstr = searchstr;\r\n }\r\n public getCacheKey = () =>`StockistsStoreInfo${this.countrycode}`;\r\n public getCacheObjectType = () => 'StockistsStoreInfo';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): GetStockistsStoreInput => {\r\n const { locale } = inputData.requestContext;\r\n if (!(inputData.requestContext && locale)) {\r\n throw new Error('Unable to create country regions input. Locale is not provided.');\r\n }\r\n\r\n return new GetStockistsStoreInput(locale);\r\n};\r\n\r\nexport async function getStockcistsStoreAction(input: GetStockistsStoreInput, ctx: IActionContext): Promise {\r\n console.log(`CityorState action called`);\r\n\r\n let result: IDXC_GetStockistsServiceResponse = { Result: 'failure' };\r\n const country = input.countrycode || '';\r\n const cityorstate = input.cityorstate || '';\r\n const searchstr = input.searchstr || '';\r\n try {\r\n result = await dXC_GetStockistsAsync({ callerContext: ctx }, country, cityorstate, searchstr);\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n return Array.isArray(result) ? result[0] : result;\r\n}\r\n\r\nexport const IGetStockcistsStoreAction = createObservableDataAction({\r\n action: >getStockcistsStoreAction,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Button, IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { observable } from 'mobx';\r\nimport * as React from 'react';\r\nimport { IDXC_GetCityStateMasterResponse, IDXC_GetCountryMasterResponse, IDXC_GetStockistsServiceResponse } from '../../data-actions/generated/DataServiceEntities.g';\r\nimport { getStockcistsCityorStateAction, GetStockistsCityOrStateInput } from '../../data-actions/stockists/stockists-cityorstate-data';\r\nimport { getStockcistsCountryRegionsAction, GetStockistsCountryRegionsInput } from '../../data-actions/stockists/stockists-country-data';\r\nimport { getStockcistsStoreAction, GetStockistsStoreInput } from '../../data-actions/stockists/stockists-store';\r\nimport { IDXC_CountryView, IDXC_StockistsTable } from '../../modal/stockistsListTable';\r\nimport { ICittaStockistsData } from './citta-stockists.data';\r\nimport { ICittaStockistsProps } from './citta-stockists.props.autogenerated';\r\n\r\nexport interface ICittaStockistsState {\r\n countrySelected: string;\r\n stateorcitySelected: string;\r\n searchString: string;\r\n countryList: [];\r\n stateList: [];\r\n stockistList: [];\r\n}\r\n\r\nexport interface ICittaStockistsViewProps extends ICittaStockistsProps {\r\n stockistMain: INodeProps;\r\n stockistGrid: INodeProps;\r\n StockistContainer: IModuleProps;\r\n inputWrap: INodeProps;\r\n stockistTop: INodeProps;\r\n inputThirds: INodeProps;\r\n createStockistsAddress: React.ReactNode;\r\n createCountryDropDown: React.ReactNode;\r\n createCityStateDropDown: React.ReactNode;\r\n createSearchAddress: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * CittaStockists component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CittaStockists extends React.PureComponent> {\r\n public state: ICittaStockistsState = {\r\n countrySelected: '',\r\n stateorcitySelected: '',\r\n searchString: '',\r\n countryList: [],\r\n stateList: [],\r\n stockistList: []\r\n };\r\n\r\n @observable private _countryList: IDXC_GetCountryMasterResponse | undefined;\r\n @observable private _stateList: IDXC_GetCityStateMasterResponse | undefined;\r\n @observable private _stockistList: IDXC_GetStockistsServiceResponse | undefined;\r\n\r\n private _countrySelectRef: React.RefObject;\r\n private _stateorcitySelectRef: React.RefObject;\r\n private _searchInputRef: React.RefObject;\r\n\r\n public constructor(props: ICittaStockistsProps) {\r\n super(props);\r\n this._countrySelectRef = React.createRef();\r\n this._stateorcitySelectRef = React.createRef();\r\n this._searchInputRef = React.createRef();\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n this._getCountryList().catch(err => console.log(err));\r\n this._getStateProvinces('').catch(err => console.log(err));\r\n this._getStockistsList().catch(err => console.log(err));\r\n }\r\n public render(): JSX.Element {\r\n const viewProps = {\r\n ...this.props,\r\n StockistContainer: {\r\n moduleProps: this.props,\r\n className: classnames('infoSection')\r\n },\r\n stockistTop: {\r\n tag: 'div' as NodeTag,\r\n className: classnames('stockistTop', 'inputThirds')\r\n },\r\n stockistMain: {\r\n tag: 'div' as NodeTag,\r\n className: classnames('stockistMain')\r\n },\r\n stockistGrid: {\r\n tag: 'div' as NodeTag,\r\n className: classnames('stockistGrid')\r\n },\r\n createCityStateDropDown: this._renderCityStateDropDown(),\r\n createCountryDropDown: this._renderCountryDropDown(),\r\n createStockistsAddress: this._renderStockistsAddress(),\r\n createSearchAddress: this._renderSearchAddress(),\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n private _renderSearchAddress(): React.ReactNode {\r\n const searchPlaceholder = this.props && this.props.resources && this.props.resources.searchPlaceholder ? this.props.resources.searchPlaceholder : 'Search by Address';\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n private _handleSearch = (e: React.MouseEvent | React.KeyboardEvent) => {\r\n const searchStr = (this._searchInputRef && this._searchInputRef.current && this._searchInputRef.current.value) ? this._searchInputRef.current.value : '';\r\n const countryValue = (this._countrySelectRef && this._countrySelectRef.current && this._countrySelectRef.current.value) ? this._countrySelectRef.current.value : '';\r\n const stateValue = (this._stateorcitySelectRef && this._stateorcitySelectRef.current && this._stateorcitySelectRef.current.value) ? this._stateorcitySelectRef.current.value : '';\r\n try {\r\n this._getStockistsList(countryValue, stateValue, searchStr).catch(err => console.log(err));\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n private _changeSearchText = (ref: React.RefObject) => (e: React.ChangeEvent) => {\r\n this.setState(\r\n { searchString: e.target.value }\r\n );\r\n }\r\n private _renderCityStateDropDown(): React.ReactNode {\r\n const citaAndStatePlaceholder = this.props && this.props.resources && this.props.resources.citaAndStatePlaceholder ? this.props.resources.citaAndStatePlaceholder : 'All Cities/States';\r\n return (\r\n
\r\n
\r\n \r\n \r\n {this._renderStateorCityList()}\r\n \r\n
\r\n
\r\n );\r\n }\r\n private _renderCountryDropDown(): React.ReactNode {\r\n const countryPlaceholder = this.props && this.props.resources && this.props.resources.countryPlaceholder ? this.props.resources.countryPlaceholder : 'All Country';\r\n return (\r\n
\r\n
\r\n \r\n \r\n {this._renderCountryList()}\r\n \r\n
\r\n
\r\n );\r\n }\r\n private _onStateorCityChange = (e: React.ChangeEvent) => {\r\n this.setState({ stateorcitySelected: e.target.value || '' });\r\n this._getStockistsList(this.state.countrySelected, e.target.value).catch(err => console.log(err));\r\n }\r\n private _renderStateorCityList(): JSX.Element[] | null {\r\n const stateorcity = this.state.stateList as IDXC_GetCityStateMasterResponse;\r\n if (stateorcity && stateorcity.CityStateMaster) {\r\n return stateorcity.CityStateMaster.map((stateorcityItem) =>\r\n this._getCities(stateorcityItem)\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n private _getCities(stateorcityItem: string): JSX.Element {\r\n return ;\r\n }\r\n private _renderCountryList(): JSX.Element[] | null {\r\n const country = this.state.countryList as IDXC_GetCountryMasterResponse;\r\n if (country && country.CountryMaster) {\r\n return country.CountryMaster.map((countryItem: IDXC_CountryView) =>\r\n this._getCountries(countryItem)\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n private _getCountries(countryItem: IDXC_CountryView): JSX.Element {\r\n return ;\r\n }\r\n private _onCountryChange = (e: React.ChangeEvent) => {\r\n this.setState({ countrySelected: e.target.value || '' });\r\n this._getStateProvinces(e.target.value).catch(err => console.log(err));\r\n this._getStockistsList(e.target.value).catch(err => console.log(err));\r\n }\r\n private _renderStockistsAddress(): React.ReactNode {\r\n const stockistList = this.state.stockistList as IDXC_GetStockistsServiceResponse;\r\n if (stockistList && stockistList.StockistsList) {\r\n return stockistList.StockistsList.map((stockist: IDXC_StockistsTable) =>\r\n (\r\n
\r\n

{stockist.Name}

\r\n
\r\n {stockist.StreetNumber} {stockist.Street}\r\n
\r\n {stockist.District ?
{`${stockist.District}`}
: ''}\r\n {stockist.City} {stockist.PostalCode}
\r\n {stockist.CountryCode === 'AUS' ? stockist.State : ''} {stockist.CountryName}
\r\n {stockist.PhoneNumber ? {stockist.PhoneNumber} : null}
\r\n {stockist.Email ? {stockist.Email} : null}\r\n
\r\n
\r\n
\r\n )\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private async _getCountryList(): Promise {\r\n let response: IDXC_GetCountryMasterResponse;\r\n if (this.props.context && this.props.context.actionContext) {\r\n try {\r\n const input = new GetStockistsCountryRegionsInput();\r\n response = await getStockcistsCountryRegionsAction(input, this.props.context.actionContext);\r\n this._countryList = response;\r\n if (this._countryList) {\r\n this.setState({\r\n countryList: this._countryList\r\n });\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n }\r\n\r\n private async _getStateProvinces(countryCode: string): Promise {\r\n let response: IDXC_GetCountryMasterResponse;\r\n if (this.props.context && this.props.context.actionContext) {\r\n try {\r\n const input = new GetStockistsCityOrStateInput(countryCode);\r\n response = await getStockcistsCityorStateAction(input, this.props.context.actionContext);\r\n this._stateList = response;\r\n if (this._stateList) {\r\n this.setState({\r\n stateList: this._stateList\r\n });\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n }\r\n\r\n private async _getStockistsList(countryCode?: string, cityorstate?: string, searchStr?: string): Promise {\r\n let response: IDXC_GetStockistsServiceResponse;\r\n if (this.props.context && this.props.context.actionContext) {\r\n try {\r\n const input = new GetStockistsStoreInput(countryCode, cityorstate, searchStr);\r\n response = await getStockcistsStoreAction(input, this.props.context.actionContext);\r\n this._stockistList = response;\r\n if (this._stockistList) {\r\n this.setState({\r\n stockistList: this._stockistList\r\n });\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n }\r\n}\r\nexport default CittaStockists;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport { Module,Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICittaStockistsViewProps } from './citta-stockists';\r\n\r\nconst CittaStockistsViewProps: React.FC = props => {\r\n const { createStockistsAddress,stockistMain,stockistGrid,StockistContainer,stockistTop,createCountryDropDown,createCityStateDropDown,createSearchAddress } = props;\r\n if(!props.createStockistsAddress) {\r\n return null;\r\n }\r\n return(\r\n \r\n \r\n {createCountryDropDown}\r\n {createCityStateDropDown}\r\n {createSearchAddress}\r\n \r\n\r\n \r\n \r\n { createStockistsAddress}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default CittaStockistsViewProps;\r\n"],"sourceRoot":""}