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ACjB,IAAIX,EAAiBW,EAAUrN,QAS7BsN,EAA8BlN,MAAOiH,EAAyBtJ,KACvE,MAAM,OAAEiC,GAAWqH,EACbkG,EAAiC,GACnCvN,EAAO4C,cACP5C,EAAO4C,aAAahD,KAAKqN,GAAuCM,EAAQlD,KAAK,CAAEmD,OAAQP,EAAgBC,WAE3G,MAAMO,EAA6C,GAC7CC,GAAYC,EAAAA,EAAAA,IAAa5P,EAAQE,gBASvC,IARA2P,EAAAA,EAAAA,mBAAkBF,GAElBD,EAAoBI,QAAU,CAC1BC,UAAW/P,EAAQE,eAAeuJ,YAAYuG,UAC9CC,UAAWN,GAEfD,EAAoBQ,mBAAoB,EACxCR,EAAoBS,QAAUX,GACzBvN,EAAO4C,eAAiBmK,EAAAA,gBAAgBC,YAAYhN,EAAO4C,cAC5D,MAAM,IAAI0I,MAAM,6DAGpB,aAAa6C,EAAAA,oBAAAA,sBAA0C,CAAEC,cAAerQ,GAAW0P,IAS1EY,GAAmBC,EAAAA,EAAAA,IAA2B,CACvD7C,GAAI,oEACJ8C,OAAQjB,EACRjG,MAAO+F,IAGX,WC5GAoB,EAAOC,QAAUlR,cCAjBiR,EAAOC,QAAUC","sources":["webpack://Dobbies.Commerce/./src/modules/dobbies-store-based-notifications/dobbies-store-based-notifications.props.autogenerated.ts?025a","webpack://Dobbies.Commerce/./src/modules/dobbies-store-based-notifications/dobbies-store-based-notifications.tsx?e714","webpack://Dobbies.Commerce/./src/modules/dobbies-store-based-notifications/dobbies-store-based-notifications.view.tsx?0a60","webpack://Dobbies.Commerce/./lib/dobbies-store-based-notifications/module-registration.js?1202","webpack://Dobbies.Commerce/./src/modules/actions/get-active-image-products.ts?0501","webpack://Dobbies.Commerce/external var \"React\"?0d3b","webpack://Dobbies.Commerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IDobbiesStoreBasedNotifications contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nexport const enum searchRadiusUnit {\r\n miles = 'miles',\r\n kilometers = 'kilometers'\r\n}\r\n\r\nexport interface IDobbiesStoreBasedNotificationsConfig extends Msdyn365.IModuleConfig {\r\n shouldShowYouMightAlsoLike?: boolean;\r\n discountAppliedInCartMessage?: string;\r\n productBundlesOrderSummaryText?: string;\r\n storeBasedNotifications?: IStoreBasedNotificationsData[];\r\n lookupRadius: number;\r\n searchRadiusUnit?: searchRadiusUnit;\r\n latitude?: number;\r\n longitude?: number;\r\n}\r\n\r\nexport interface IDobbiesStoreBasedNotificationsResources {\r\n resourceKey: string;\r\n}\r\n\r\nexport const enum StoreBasedNotificationsNotificationType {\r\n event = 'event',\r\n products = 'products'\r\n}\r\n\r\nexport interface IStoreBasedNotificationsData {\r\n storeName: string;\r\n notificationBannerImage: string;\r\n notificationBannerHeading?: string;\r\n notificationBannerSubHeading?: string;\r\n notificationHeading: string;\r\n notificationType?: StoreBasedNotificationsNotificationType;\r\n activePoints?: IActivePointsData[];\r\n notificationContent: Msdyn365.RichText;\r\n notificationFooter: Msdyn365.RichText;\r\n notificationStartDate?: string;\r\n notificationShowEndDate?: string;\r\n}\r\n\r\nexport interface IActivePointsData {\r\n xPosition?: number;\r\n yPosition?: number;\r\n radius?: number;\r\n itemId?: string;\r\n}\r\n\r\nexport interface IDobbiesStoreBasedNotificationsProps extends Msdyn365.IModule {\r\n resources: IDobbiesStoreBasedNotificationsResources;\r\n config: IDobbiesStoreBasedNotificationsConfig;\r\n slots: {\r\n notificationProductsSlot: React.ReactNode[];\r\n };\r\n}\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\n\r\nimport { IDobbiesStoreBasedNotificationsData } from './dobbies-store-based-notifications.data';\r\nimport {\r\n IDobbiesStoreBasedNotificationsProps,\r\n IStoreBasedNotificationsData,\r\n searchRadiusUnit\r\n} from './dobbies-store-based-notifications.props.autogenerated';\r\nimport { AttributeDefinition, CustomerAttribute } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport {\r\n getOrgUnitLocationsByArea,\r\n GetOrgUnitLocationsByAreaInput,\r\n updateCustomerAttributes,\r\n updateCustomerAttributesInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Modal, ModalBody, ModalHeader, Button } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\n// import * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface IDobbiesStoreBasedNotificationsViewProps\r\n extends IDobbiesStoreBasedNotificationsProps {\r\n notificationModal?: JSX.Element;\r\n storeLocationsModal?: JSX.Element;\r\n state: IDobbiesStoreBasedNotificationsState;\r\n}\r\n\r\n/**\r\n *\r\n * DobbiesStoreBasedNotifications component\r\n * @extends {React.PureComponent>}\r\n */\r\n\r\n// interface INotification {\r\n// storeName: string;\r\n// notificationBannerImage: string;\r\n// notificationHeading: string;\r\n// notificationType: string;\r\n// notificationContent: Msdyn365.RichText;\r\n// notificationFooter: Msdyn365.RichText;\r\n// notificationStartDate?: string;\r\n// notificationShowEndDate?: string;\r\n// }\r\nexport interface IDobbiesStoreBasedNotificationsState {\r\n notificationData: IStoreBasedNotificationsData;\r\n isLocationDisabled: boolean;\r\n isNotificationModal: boolean;\r\n localStore: object | any;\r\n isStoreLocationModalOpen: boolean;\r\n}\r\n\r\nclass DobbiesStoreBasedNotifications extends React.PureComponent<\r\n IDobbiesStoreBasedNotificationsProps,\r\n IDobbiesStoreBasedNotificationsState\r\n> {\r\n constructor(props: IDobbiesStoreBasedNotificationsProps) {\r\n super(props);\r\n this.state = {\r\n isLocationDisabled: false,\r\n notificationData: {\r\n storeName: '',\r\n notificationBannerImage: '',\r\n notificationHeading: '',\r\n notificationType: '' || undefined,\r\n notificationFooter: '',\r\n notificationStartDate: '',\r\n notificationShowEndDate: '',\r\n notificationContent: ''\r\n },\r\n isNotificationModal: false,\r\n localStore: {},\r\n isStoreLocationModalOpen: false\r\n };\r\n\r\n this.authenticateUser();\r\n }\r\n\r\n private authenticateUser = () => {\r\n const {\r\n data: {\r\n customerInformation: { result }\r\n },\r\n context: {\r\n actionContext: {\r\n requestContext: { cookies }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const isLoggedIn = result && result.Name ? true : false;\r\n if (isLoggedIn === false) {\r\n cookies.remove('store_location_popup');\r\n cookies.get('notification_popup').value === 'signedin' && cookies.remove('notification_popup');\r\n } else {\r\n cookies.get('notification_popup').value === 'signedout' && cookies.remove('notification_popup');\r\n }\r\n };\r\n\r\n // Render dropdown options for localstore attribute\r\n private renderLocalStores = () => {\r\n const localStoreAttr = this.props.data?.attributeDefinitions?.result?.find(\r\n x => x.AttributeTypeName?.toLowerCase() === 'local store'\r\n );\r\n const localStores = localStoreAttr?.EnumerationDetails?.sort((a, b) => a.EnumerationValue!.localeCompare(b.EnumerationValue!));\r\n // Move none value to the start of array\r\n const noneVal =\r\n localStores &&\r\n localStores.find(store => {\r\n return store.EnumerationValue && store.EnumerationValue.toLowerCase() === 'none';\r\n });\r\n localStores?.sort((x, y) => {\r\n return x.EnumerationValue === noneVal?.EnumerationValue ? -1 : y === noneVal?.EnumerationValue ? 1 : 0;\r\n });\r\n return localStores?.map(e => {\r\n return (\r\n \r\n );\r\n });\r\n };\r\n private geoBasedNotification = () => {\r\n const { config } = this.props;\r\n if (navigator && navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(\r\n async position => {\r\n this.setState({ isLocationDisabled: false });\r\n if (config.latitude !== 0 && config.longitude !== 0) {\r\n await this._updateLocations(config.latitude, config.longitude);\r\n } else {\r\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\r\n }\r\n },\r\n async error => {\r\n // If the location setting is turned off\r\n this.preferredStoreNotification();\r\n console.log('Error', error);\r\n // if (error.PERMISSION_DENIED) {\r\n // this.setState({ isLocationDisabled: true });\r\n // await this._updateLocations();\r\n // }\r\n },\r\n {\r\n timeout: 5000\r\n }\r\n );\r\n }\r\n };\r\n\r\n private _updateLocations = async (latitude?: number, longitude?: number): Promise => {\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: { cookies }\r\n }\r\n }\r\n } = this.props;\r\n const { storeBasedNotifications, lookupRadius } = this.props.config;\r\n const calRadius = lookupRadius ? lookupRadius : 0;\r\n const distanceUnitValue = this.props.config.searchRadiusUnit === searchRadiusUnit.kilometers ? 1 : 0;\r\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\r\n latitude,\r\n longitude,\r\n calRadius,\r\n distanceUnitValue,\r\n this.state.isLocationDisabled\r\n );\r\n\r\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, this.props.context.actionContext);\r\n if (orgUnitLocations && orgUnitLocations?.length > 0) {\r\n const tempSortedLocations = orgUnitLocations.sort(\r\n (a, b) => a.OrgUnitAvailability!.OrgUnitLocation!.Distance! - b.OrgUnitAvailability!.OrgUnitLocation!.Distance!\r\n );\r\n const cookienotificationValue = cookies.get('notification_popup');\r\n if (tempSortedLocations.length > 0 && storeBasedNotifications!.length > 0) {\r\n const { OrgUnitAvailability } = tempSortedLocations[0];\r\n storeBasedNotifications?.map((notify: IStoreBasedNotificationsData) => {\r\n const { storeName, notificationStartDate, notificationShowEndDate } = notify;\r\n if (\r\n cookienotificationValue.value === undefined &&\r\n storeName.toLocaleLowerCase().trim() === OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName?.toLocaleLowerCase() &&\r\n this.checkNotificationTime(notificationStartDate, notificationShowEndDate)\r\n ) {\r\n if (notify?.activePoints && notify?.activePoints?.length > 0) {\r\n this.setCookie('notification_products', JSON.stringify(notify?.activePoints), 1);\r\n }\r\n this.setState({ notificationData: notify, isNotificationModal: true });\r\n }\r\n });\r\n\r\n // show stores selection popup if now nearest store found\r\n const isEdinburghStoreExist = storeBasedNotifications?.some(\r\n notification => notification.storeName === OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName?.toLocaleLowerCase()\r\n );\r\n if (!this.state.isNotificationModal && cookienotificationValue.value === undefined && !isEdinburghStoreExist) {\r\n this.preferredStoreNotification();\r\n }\r\n }\r\n } else {\r\n this.preferredStoreNotification();\r\n }\r\n };\r\n\r\n private preferredStoreNotification = () => {\r\n const {\r\n data: { attributeDefinitions, customerInformation },\r\n context: {\r\n actionContext: {\r\n requestContext: { cookies }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const customer = customerInformation.result!;\r\n const attributeDefinition: AttributeDefinition[] = (attributeDefinitions && attributeDefinitions.result) || [];\r\n const foundObject = customer.Attributes?.find(item => item.Name === 'Local Store');\r\n const foundAttrInDef = attributeDefinition?.find(item => item.Name === 'Local Store');\r\n const cookieStoreValue = cookies.get('store_location_popup');\r\n if (\r\n !foundObject ||\r\n (foundObject &&\r\n foundObject.AttributeValue?.StringValue === 'None' &&\r\n foundAttrInDef &&\r\n cookieStoreValue &&\r\n cookieStoreValue.value === undefined)\r\n ) {\r\n this.setState({ localStore: this.setAttributeValue(foundAttrInDef?.DefaultValue?.StringValue, foundAttrInDef, false) });\r\n this.setState({ isStoreLocationModalOpen: true });\r\n }\r\n\r\n // store based notifications\r\n const cookienotificationValue = cookies.get('notification_popup');\r\n const storeBasedNotifications = this.props.config.storeBasedNotifications;\r\n if (\r\n !this.state.isStoreLocationModalOpen &&\r\n storeBasedNotifications &&\r\n storeBasedNotifications.length > 0 &&\r\n foundObject &&\r\n foundObject.AttributeValue?.StringValue !== 'None'\r\n ) {\r\n storeBasedNotifications.map((str: IStoreBasedNotificationsData) => {\r\n const { storeName, notificationStartDate, notificationShowEndDate } = str;\r\n if (\r\n cookienotificationValue.value === undefined &&\r\n storeName.toLocaleLowerCase().trim() === foundObject.AttributeValue?.StringValue?.toLocaleLowerCase() &&\r\n this.checkNotificationTime(notificationStartDate, notificationShowEndDate)\r\n ) {\r\n if (str?.activePoints && str?.activePoints?.length > 0) {\r\n this.setCookie('notification_products', JSON.stringify(str?.activePoints), 1);\r\n }\r\n this.setState({ notificationData: str, isNotificationModal: true });\r\n }\r\n });\r\n }\r\n };\r\n\r\n private setAttributeValue = (value: string | boolean | undefined, attribute: CustomerAttribute | undefined, isBoolean: boolean) => {\r\n return {\r\n Attribute: 0,\r\n DataTypeValue: attribute!.DataTypeValue,\r\n KeyName: attribute!.Name,\r\n Name: attribute!.Name,\r\n RecordId: attribute!.RecordId,\r\n Units: '',\r\n AttributeValue: {\r\n StringValue: value\r\n },\r\n ExtensionProperties: [],\r\n NameTranslations: []\r\n };\r\n };\r\n\r\n private changeDateFormat = (date: string) => {\r\n // const dateTimeSplittedDate = date.split(' ');\r\n // const startDateMonth = dateTimeSplittedDate[0].split('-')[1];\r\n // const startDateDay = dateTimeSplittedDate[0].split('-')[0];\r\n // const startDateYear = dateTimeSplittedDate[0].split('-')[2];\r\n\r\n // const startDateHour = dateTimeSplittedDate[1].split(':')[0];\r\n // const startDateMinutes = dateTimeSplittedDate[1].split(':')[1];\r\n\r\n // const notificationShowingDate = new Date(\r\n // `${startDateMonth}-${startDateDay}-${startDateYear} ${startDateHour}:${startDateMinutes}:00`\r\n // );\r\n const notificationShowingDate = new Date(date);\r\n return notificationShowingDate;\r\n };\r\n private checkNotificationTime = (start: string | undefined, end: string | undefined) => {\r\n const currentDate = new Date();\r\n const changedStartDateFormat = start !== undefined && start !== '' ? this.changeDateFormat(start) : '';\r\n const changedEndDateFormat = end !== undefined && end !== '' ? this.changeDateFormat(end) : '';\r\n if (!changedStartDateFormat && !changedEndDateFormat) {\r\n // Show notification continuously\r\n return true;\r\n } else if (changedStartDateFormat && !changedEndDateFormat) {\r\n // Show notification from start date\r\n const startDate = new Date(changedStartDateFormat);\r\n return currentDate >= startDate;\r\n } else if (!changedStartDateFormat && changedEndDateFormat) {\r\n // Show notification till end date\r\n const endDate = new Date(changedEndDateFormat);\r\n return currentDate <= endDate;\r\n } else if (changedStartDateFormat && changedEndDateFormat) {\r\n // Show notification in between start and end dates\r\n const startDate = new Date(changedStartDateFormat);\r\n const endDate = new Date(changedEndDateFormat);\r\n return currentDate >= startDate && currentDate <= endDate;\r\n }\r\n return false;\r\n };\r\n private setCookie = (name: string, value: string, deltaDaysFromToday: number) => {\r\n const { cookies } = this.props.context.request;\r\n const expirationDate = new Date(Date.now());\r\n expirationDate.setTime(expirationDate.getTime() + deltaDaysFromToday * 24 * 60 * 60 * 1000);\r\n\r\n cookies.set(name, value, {\r\n expires: deltaDaysFromToday ? expirationDate : null,\r\n isEssential: true\r\n } as {});\r\n };\r\n private onCloseNotificatioModal = () => {\r\n const notifiCheck = this.props.context.request.user.isAuthenticated ? 'signedin' : 'signedout';\r\n this.setCookie('notification_popup', notifiCheck, 1);\r\n this.props.context.request.cookies.remove('notification_added_products');\r\n this.props.context.request.cookies.remove('notification_products_prices');\r\n this.setState({ isNotificationModal: false });\r\n };\r\n\r\n private onCloseStoreLocationModal = () => {\r\n interface customerIn {\r\n customerAccountNumber?: string;\r\n store: false;\r\n }\r\n const customer: customerIn = {\r\n customerAccountNumber: this.props.context.actionContext.requestContext.user.customerAccountNumber,\r\n store: false\r\n };\r\n this.setCookie('store_location_popup', JSON.stringify(customer), 1);\r\n this.setState({ isStoreLocationModalOpen: false });\r\n };\r\n private updateLocalStore = (event: React.ChangeEvent): void => {\r\n const selectedLocalStore = event.target.value;\r\n this.setState({ localStore: this.setAttributeValue(selectedLocalStore, this.state.localStore, false) });\r\n };\r\n private updateStoreAttr = async () => {\r\n const {\r\n data: { customerInformation }\r\n } = this.props;\r\n const customer = customerInformation.result!;\r\n const updatedAttr = this.updateOrAddObject(this.state.localStore, customer.Attributes || []);\r\n\r\n if (this.state.localStore.AttributeValue.StringValue !== 'None') {\r\n const input = new updateCustomerAttributesInput(\r\n customer.AccountNumber,\r\n updatedAttr || [],\r\n this.props.context.request.apiSettings\r\n );\r\n const cancelResponse = await updateCustomerAttributes(input, this.props.context.actionContext).catch();\r\n if (\r\n cancelResponse &&\r\n cancelResponse.Attributes?.filter(attr => attr.Name === 'Local Store')[0].AttributeValue!.StringValue !== 'None'\r\n ) {\r\n this.setState({ isStoreLocationModalOpen: false });\r\n }\r\n }\r\n };\r\n private updateOrAddObject(newObject: CustomerAttribute, dataArray: CustomerAttribute[]) {\r\n const existingObject = dataArray.find((item: any) => item.Name === newObject.Name);\r\n if (existingObject) {\r\n Object.assign(existingObject, newObject);\r\n } else {\r\n dataArray.push(newObject);\r\n }\r\n return dataArray;\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: { cookies }\r\n }\r\n }\r\n } = this.props;\r\n cookies.remove('notification_added_products');\r\n cookies.remove('notification_products_prices');\r\n this.geoBasedNotification();\r\n }\r\n\r\n public componentDidUpdate(prevProps: any, prevState: { isStoreLocationModalOpen: boolean }) {\r\n if (prevState.isStoreLocationModalOpen !== this.state.isStoreLocationModalOpen) {\r\n this.preferredStoreNotification();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const notificationsProps = {\r\n ...this.props,\r\n state: this.state,\r\n notificationModal: this.renderNotificationModal(),\r\n storeLocationsModal: this.renderStoreLocationModal()\r\n };\r\n return this.props.renderView(notificationsProps) as React.ReactElement;\r\n }\r\n\r\n private renderNotificationModal = (): JSX.Element => {\r\n // Modal Added showing Notifications\r\n const { notificationData } = this.state;\r\n if (this.state.isNotificationModal) {\r\n return (\r\n \r\n \r\n {\r\n \r\n }\r\n \r\n \r\n <>\r\n {this.props.slots.notificationProductsSlot && this.props.slots.notificationProductsSlot[0] && (\r\n <>\r\n
\r\n
\r\n

\r\n {notificationData.notificationBannerHeading}{' '}\r\n {notificationData.notificationBannerSubHeading}\r\n

\r\n \r\n
\r\n
\r\n

{notificationData.notificationHeading}

\r\n
\r\n\r\n {notificationData.notificationType?.toLowerCase() === 'event' ? (\r\n \r\n ) : (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {this.props.slots.notificationProductsSlot &&\r\n this.props.slots.notificationProductsSlot[0]}\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 \r\n );\r\n }\r\n return <>;\r\n };\r\n private renderStoreLocationModal = (): JSX.Element => {\r\n // Modal Added showing Stores\r\n if (this.state.isStoreLocationModalOpen) {\r\n return (\r\n \r\n \r\n <>Select Store Location\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
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {/* \r\n \r\n */}\r\n \r\n );\r\n }\r\n return <>;\r\n };\r\n}\r\n\r\nexport default DobbiesStoreBasedNotifications;\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 { IDobbiesStoreBasedNotificationsViewProps } from './dobbies-store-based-notifications';\r\n\r\nexport default (props: IDobbiesStoreBasedNotificationsViewProps) => {\r\n return (\r\n
\r\n {props.notificationModal}\r\n {props.storeLocationsModal}\r\n
\r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['dobbies-store-based-notifications'] = {\n c: () => require('partner/modules/dobbies-store-based-notifications/dobbies-store-based-notifications.tsx'),\n $type: 'contentModule',\n da: [{name:'attributeDefinitions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-attribute-definitions', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'products', path:'@msdyn365-commerce-modules/active-image/dist/lib/modules/actions/get-active-image-products', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'dobbies-store-based-notifications',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/dobbies-store-based-notifications'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/active-image/dist/lib/modules/actions/get-active-image-products';\n let dataAction = require('@msdyn365-commerce-modules/active-image/dist/lib/modules/actions/get-active-image-products');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-attribute-definitions';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-attribute-definitions');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|dobbies-store-based-notifications|dobbies-store-based-notifications'] = {\n c: () => require('partner/modules/dobbies-store-based-notifications/dobbies-store-based-notifications.view.tsx'),\n cn: '__local__-__local__-dobbies-store-based-notifications'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { ProductLookupClause, ProductsDataActions, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IActiveImageConfig, IActivePointsData } from '../active-image';\n\n/**\n * ActiveImageInput.\n */\nexport class ActiveImageInput implements IActionInput {\n public config: IActiveImageConfig;\n\n private readonly _cacheKey: string = 'ActiveImage';\n\n public constructor(config: IActiveImageConfig) {\n this.config = config;\n\n if (this.config.activePoints && ArrayExtensions.hasElements(this.config.activePoints)) {\n for (const activePointData of this.config.activePoints) {\n if (activePointData.itemId) {\n this._cacheKey = `${this._cacheKey}-${activePointData.itemId.toString()}`;\n }\n }\n }\n }\n\n /**\n * GetCacheObjectType.\n * @returns - Returns string.\n */\n public getCacheObjectType = (): string => 'ActiveImageFullProductSearchResult';\n\n /**\n * GetCacheKey.\n * @returns - Returns string.\n */\n public getCacheKey = (): string => this._cacheKey;\n\n /**\n * DataCacheType.\n * @returns - CacheType string.\n */\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * CreateInput.\n * @param inputData - IActionContext.\n * @returns - IActionInput.\n */\nexport const createInput = (inputData: ICreateActionContext): IActionInput => {\n return new ActiveImageInput(inputData.config as IActiveImageConfig);\n};\n\n/**\n * Action.\n * @param input - ActiveImageInput.\n * @param context - IActionContext.\n * @returns - ProductSearchResult[].\n */\nexport const getActiveImageproductAction = async (input: ActiveImageInput, context: IActionContext): Promise => {\n const { config } = input;\n const itemIds: ProductLookupClause[] = [];\n if (config.activePoints) {\n config.activePoints.map((activePointData: IActivePointsData) => itemIds.push({ ItemId: activePointData.itemId }));\n }\n const searchCriteriaInput: ProductSearchCriteria = {};\n const catalogId = getCatalogId(context.requestContext);\n validateCatalogId(catalogId);\n\n searchCriteriaInput.Context = {\n ChannelId: context.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n };\n searchCriteriaInput.IncludeAttributes = true;\n searchCriteriaInput.ItemIds = itemIds;\n if (!config.activePoints || !ArrayExtensions.hasElements(config.activePoints)) {\n throw new Error('Fail to call ActiveImage API no active points configured.');\n }\n // eslint-disable-next-line no-return-await -- Disable because we want to return the promise.\n return await ProductsDataActions.searchByCriteriaAsync({ callerContext: context }, searchCriteriaInput);\n};\n\n/**\n * Action.\n * @param id - Id.\n * @param action - Action.\n * @returns - Results.\n */\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/active-image/get-active-image-products',\n action: getActiveImageproductAction as IAction,\n input: createInput\n});\n\nexport default actionDataAction;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["searchRadiusUnit","StoreBasedNotificationsNotificationType","DobbiesStoreBasedNotifications","React","constructor","props","super","authenticateUser","data","customerInformation","result","context","actionContext","requestContext","cookies","this","Name","remove","get","value","renderLocalStores","_this$props$data","_localStoreAttr$Enume","localStoreAttr","attributeDefinitions","find","x","_x$AttributeTypeName","AttributeTypeName","toLowerCase","localStores","EnumerationDetails","sort","a","b","EnumerationValue","localeCompare","noneVal","store","y","map","e","key","geoBasedNotification","config","navigator","geolocation","getCurrentPosition","async","setState","isLocationDisabled","latitude","longitude","_updateLocations","position","coords","preferredStoreNotification","console","log","error","timeout","storeBasedNotifications","lookupRadius","calRadius","distanceUnitValue","kilometers","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","state","orgUnitLocations","getOrgUnitLocationsByArea","length","tempSortedLocations","OrgUnitAvailability","OrgUnitLocation","Distance","cookienotificationValue","notify","_OrgUnitAvailability$","storeName","notificationStartDate","notificationShowEndDate","_notify$activePoints","undefined","toLocaleLowerCase","trim","OrgUnitName","checkNotificationTime","activePoints","setCookie","JSON","stringify","notificationData","isNotificationModal","isEdinburghStoreExist","some","notification","_OrgUnitAvailability$2","_customer$Attributes","_foundObject$Attribut","_foundObject$Attribut2","customer","attributeDefinition","foundObject","Attributes","item","foundAttrInDef","cookieStoreValue","_foundAttrInDef$Defau","AttributeValue","StringValue","localStore","setAttributeValue","DefaultValue","isStoreLocationModalOpen","str","_foundObject$Attribut3","_str$activePoints","attribute","isBoolean","Attribute","DataTypeValue","KeyName","RecordId","Units","ExtensionProperties","NameTranslations","changeDateFormat","date","Date","start","end","currentDate","changedStartDateFormat","changedEndDateFormat","startDate","endDate","name","deltaDaysFromToday","request","expirationDate","now","setTime","getTime","set","expires","isEssential","onCloseNotificatioModal","notifiCheck","user","isAuthenticated","onCloseStoreLocationModal","customerAccountNumber","updateLocalStore","event","selectedLocalStore","target","updateStoreAttr","updatedAttr","updateOrAddObject","_cancelResponse$Attri","input","updateCustomerAttributesInput","AccountNumber","apiSettings","cancelResponse","updateCustomerAttributes","catch","filter","attr","renderNotificationModal","_notificationData$not","_notificationData$not2","Modal","autoFocus","fade","isOpen","applicationNode","horizontalPosition","verticalPosition","zIndex","modalClassName","notificationType","className","ModalHeader","type","onClick","ModalBody","slots","notificationProductsSlot","notificationBannerHeading","notificationBannerSubHeading","alt","src","notificationBannerImage","title","notificationHeading","RichTextComponent","text","notificationContent","notificationFooter","renderStoreLocationModal","onChange","Button","newObject","dataArray","existingObject","Object","assign","push","componentDidUpdate","prevProps","prevState","render","notificationsProps","_objectSpread","notificationModal","storeLocationsModal","renderView","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","ActiveImageInput","_cacheKey","getCacheObjectType","getCacheKey","dataCacheType","ArrayExtensions","hasElements","activePointData","itemId","toString","createInput","inputData","getActiveImageproductAction","itemIds","ItemId","searchCriteriaInput","catalogId","getCatalogId","validateCatalogId","Context","ChannelId","channelId","CatalogId","IncludeAttributes","ItemIds","ProductsDataActions","callerContext","actionDataAction","createObservableDataAction","action","module","exports","ReactDOM"],"sourceRoot":""}