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EADAqU,EAAIvC,EAAWqB,EAAUlB,EAAgBG,EAAYkB,EAAGY,GAAKZ,GAEjE,GACQ,OAANe,IACCrU,EAAIkS,EAAIN,EAASuB,EAASiB,WAAanC,EAAgBiC,EAAI,IAAKZ,EAAExR,WAAaiJ,EAEhFmJ,EAAIvC,EAAmB2B,EAAGY,EAAGP,OACxB,CAEL,GADAtI,EAAK8I,EAAG/B,EAAYkB,EAAGvI,EAAGmJ,IACtBC,EAAErS,SAAWmS,EAAK,OAAOE,EAC7B,IAAK,IAAIG,EAAI,EAAGA,GAAKD,EAAEvS,OAAS,EAAGwS,IAEjC,GADAjJ,EAAK8I,EAAGE,EAAEC,IACNH,EAAErS,SAAWmS,EAAK,OAAOE,EAE/BD,EAAInJ,EAAI/K,GAIZ,OADAqL,EAAK8I,EAAG/B,EAAYkB,EAAGvI,IAChBoJ,MAGVxB,IAAUN,EAAmCJ","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/./src/themes/dobbies/utilities/formatDate.ts?ae4d","webpack://Dobbies.Commerce/./src/themes/dobbies/utilities/os.ts?f1e0","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","webpack://Dobbies.Commerce/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.split.js?f72f"],"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\nimport { getDateObjFromString } from '../../themes/dobbies/utilities/formatDate';\r\nimport { getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\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 this.getProductsListWithKitProductsHandled(notify?.activePoints.map(ap => Number(ap.itemId)))\r\n .then(prodIds => {\r\n const handledProdIds = prodIds.map(pid => {\r\n return { itemId: pid };\r\n });\r\n this.setCookie('notification_products_for_summary', JSON.stringify(handledProdIds), 1);\r\n })\r\n .catch(e => {});\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 this.getProductsListWithKitProductsHandled(str?.activePoints.map(ap => Number(ap.itemId)))\r\n .then(prodIds => {\r\n const handledProdIds = prodIds.map(pid => {\r\n return { itemId: pid };\r\n });\r\n this.setCookie('notification_products_for_summary', JSON.stringify(handledProdIds), 1);\r\n })\r\n .catch(e => {});\r\n }\r\n this.setState({ notificationData: str, isNotificationModal: true });\r\n }\r\n });\r\n }\r\n };\r\n\r\n private async getProductsListWithKitProductsHandled(products: number[]): Promise {\r\n // const kitProductIds = products.map(prod => {\r\n // if (prod.IsMasterProduct) {\r\n // return prod.RecordId;\r\n // }\r\n // return undefined;\r\n // });\r\n const finalProducts: number[] = [];\r\n if (products && products.length) {\r\n for (const p of products) {\r\n if (p) {\r\n const variants = await getVariantsByDimensionValuesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n p,\r\n this.props.context.request.apiSettings.channelId,\r\n []\r\n );\r\n if (variants && variants.length === 1) {\r\n // products = products.filter(p => p.RecordId !== p.RecordId);\r\n finalProducts.push(variants[0].RecordId);\r\n } else {\r\n finalProducts.push(p);\r\n }\r\n }\r\n }\r\n }\r\n return finalProducts;\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(getDateObjFromString(date, date.includes('-') ? '-' : '/', date.includes(':')));\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","import { getMobileOperatingSystem } from './os';\r\n\r\nexport function setDateFormat(originalDate:string){\r\n if (!originalDate) {\r\n return;\r\n }\r\n var dateComponents = originalDate.split('/');\r\n const day = dateComponents[0];\r\n const month = dateComponents[1];\r\n const year = dateComponents[2].slice(-2);\r\n const formattedDate = `${day}/${month}/${year}`;\r\n \r\n return formattedDate;\r\n }\r\n\r\n export function getDateObjFromString(dateString: string, dateDelimiter: string, hasTime: boolean) {\r\n const os = getMobileOperatingSystem();\r\n if (os !== 'iOS') {\r\n return new Date(dateString);\r\n }\r\n try {\r\n const dateTimeSplitted = dateString.split(' ');\r\n const dateMonth = dateTimeSplitted[0].split(dateDelimiter)[0];\r\n const dateDay = dateTimeSplitted[0].split(dateDelimiter)[1];\r\n const dateYear = dateTimeSplitted[0].split(dateDelimiter)[2];\r\n const dateHour = dateTimeSplitted[1].split(':')[0];\r\n const dateMinutes = dateTimeSplitted[1].split(':')[1];\r\n\r\n if (dateString.includes('GMT')) {\r\n // \"2024/04/01 01:00:00 GMT+1\" iOS supported Format\r\n const GMTStr = dateTimeSplitted[dateTimeSplitted.length - 1].includes('GMT') ? dateTimeSplitted[dateTimeSplitted.length - 1] : '';\r\n const d = new Date(`${dateYear.startsWith('20') ? dateYear : `20${dateYear}`}/${dateMonth}/${dateDay} ${dateHour}:${dateMinutes}:00 ${GMTStr}`);\r\n return d;\r\n }\r\n\r\n return new Date(\r\n parseInt(dateYear.startsWith('20') ? dateYear : `20${dateYear}`, 10),\r\n parseInt(dateMonth, 10) - 1,\r\n parseInt(dateDay, 10),\r\n parseInt(dateHour, 10),\r\n parseInt(dateMinutes, 10),\r\n 0\r\n );\r\n } catch(error) {\r\n \r\n }\r\n return new Date(dateString);\r\n }","export const getMobileOperatingSystem = (): string => {\r\n // Get the user agent string\r\n const userAgent: string = navigator.userAgent || navigator.vendor || (window as any).opera;\r\n\r\n // Check for Windows Phone first because its user agent string may contain \"Android\"\r\n if (/windows phone/i.test(userAgent)) {\r\n return 'Windows Phone';\r\n }\r\n\r\n // Check for Android devices\r\n if (/android/i.test(userAgent)) {\r\n return 'Android';\r\n }\r\n\r\n // Check for iOS devices (iPad, iPhone, iPod)\r\n // The condition !window.MSStream ensures that it's not a Windows device\r\n if ((/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream) || userAgent.indexOf('Mac OS X') > 0) {\r\n return 'iOS';\r\n }\r\n\r\n // If no matches, return 'unknown'\r\n return 'unknown';\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 if (process.env.NODE_ENV === 'development' && process.env.ENABLE_CLOUD_SEARCH?.toLowerCase() !== 'true') {\n searchCriteriaInput.IncludeAttributes = false;\n } else {\n searchCriteriaInput.IncludeAttributes = true;\n }\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;","'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar push = uncurryThis([].push);\nvar stringSlice = uncurryThis(''.slice);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nvar BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length !== 4 ||\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length;\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n } : nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? call(splitter, separator, O, limit)\n : call(internalSplit, toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (!BUGGY) {\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n }\n\n var C = speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n push(A, stringSlice(S, p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n push(A, z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n push(A, stringSlice(S, p));\n return A;\n }\n ];\n}, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n"],"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","getProductsListWithKitProductsHandled","ap","Number","itemId","then","prodIds","handledProdIds","pid","catch","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","getDateObjFromString","includes","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","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","products","finalProducts","p","variants","getVariantsByDimensionValuesAsync","callerContext","queryResultSettings","channelId","push","newObject","dataArray","existingObject","Object","assign","componentDidUpdate","prevProps","prevState","render","notificationsProps","_objectSpread","notificationModal","storeLocationsModal","renderView","setDateFormat","originalDate","dateComponents","split","slice","dateString","dateDelimiter","hasTime","getMobileOperatingSystem","userAgent","vendor","window","opera","test","MSStream","indexOf","dateTimeSplitted","dateMonth","dateDay","dateYear","dateHour","dateMinutes","GMTStr","startsWith","parseInt","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","path","runOn","iNM","ns","n","pdp","md","__bindings__","viewDictionary","cn","ActiveImageInput","_cacheKey","getCacheObjectType","getCacheKey","dataCacheType","ArrayExtensions","hasElements","activePointData","toString","createInput","inputData","getActiveImageproductAction","itemIds","ItemId","searchCriteriaInput","catalogId","getCatalogId","validateCatalogId","Context","ChannelId","CatalogId","IncludeAttributes","ItemIds","ProductsDataActions","actionDataAction","createObservableDataAction","action","module","exports","ReactDOM","call","uncurryThis","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","requireObjectCoercible","speciesConstructor","advanceStringIndex","toLength","getMethod","regExpExec","stickyHelpers","fails","UNSUPPORTED_Y","min","Math","stringSlice","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","re","originalExec","exec","apply","arguments","BUGGY","SPLIT","nativeSplit","maybeCallNative","internalSplit","separator","limit","O","splitter","string","rx","S","res","done","C","RegExp","unicodeMatching","unicode","flags","ignoreCase","multiline","source","lim","q","A","lastIndex","z","i"],"sourceRoot":""}