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erce/./src/modules/hei-store-hours/hei-store-hours.view.tsx?df3f","webpack://henrys-ecommerce/./src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?3934","webpack://henrys-ecommerce/./lib/hei-store-hours/module-registration.js?7320","webpack://henrys-ecommerce/external var \"React\"?0d3b"],"sourcesContent":["import { OrgUnitLocation, StoreHours, OrgUnitsDataActions } from '@msdyn365-commerce/retail-proxy';\r\nimport { IHeiStoreHoursData } from './hei-store-hours.data';\r\nimport { IHeiStoreHoursProps, IHeiStoreHoursResources } from './hei-store-hours.props.autogenerated';\r\nimport { IStoreSelectorLocationLineItemResources } from '../store-selector/components/store-selector-location-line-item';\r\nimport { useEffect, useState } from 'react';\r\n\r\nexport type IHeiStoreHoursViewProps = IHeiStoreHoursProps & {\r\n storeInfo: {\r\n storeHours: StoreHours | undefined;\r\n location: OrgUnitLocation;\r\n resources: IStoreSelectorLocationLineItemResources;\r\n };\r\n};\r\n\r\nconst HeiStoreHours = (props: IHeiStoreHoursProps) => {\r\n const {\r\n resources,\r\n context,\r\n config: { orgUnitNumber }\r\n } = props;\r\n\r\n const [storeHours, setStoreHours] = useState();\r\n const [orgUnitLocation, setOrgUnitLocation] = useState();\r\n const [storeHoursLoaded, setStoreHoursLoaded] = useState(false);\r\n\r\n useEffect(() => {\r\n const ctx = { callerContext: context.actionContext };\r\n\r\n if (storeHoursLoaded) {\r\n return;\r\n }\r\n\r\n setStoreHoursLoaded(true);\r\n\r\n void (async () => {\r\n try {\r\n const hours = await OrgUnitsDataActions.getStoreHoursAsync(ctx, orgUnitNumber);\r\n const allStores = await OrgUnitsDataActions.searchOrgUnitLocationsAsync(ctx, {\r\n OrgUnitNumber: orgUnitNumber\r\n });\r\n\r\n const store = allStores?.find(s => s.OrgUnitNumber === orgUnitNumber);\r\n\r\n if (hours && store) {\r\n setStoreHours(hours);\r\n setOrgUnitLocation(store);\r\n }\r\n } catch (error) {\r\n context.telemetry.exception(error as Error);\r\n }\r\n })();\r\n }, [orgUnitNumber]);\r\n\r\n if (!storeHours || !orgUnitLocation) {\r\n return null;\r\n }\r\n\r\n const viewProps: IHeiStoreHoursViewProps = {\r\n ...props,\r\n storeInfo: {\r\n storeHours: storeHours,\r\n location: orgUnitLocation,\r\n resources: mapResources(resources)\r\n }\r\n };\r\n\r\n return props.renderView(viewProps);\r\n};\r\n\r\nconst mapResources = (resources: IHeiStoreHoursResources): IStoreSelectorLocationLineItemResources => {\r\n return {\r\n contactInfoHeader: resources.contactText,\r\n storeHoursHeader: resources.timeText,\r\n availabilityInfoHeader: resources.availabilityText,\r\n\r\n closedText: resources.storeHoursClosedText,\r\n outOfStock: resources.outOfStockText,\r\n inStock: resources.inStockText,\r\n\r\n currentLocation: resources.selectedStoreLocationText,\r\n selectLocation: resources.selectStoreText,\r\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\r\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\r\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\r\n preferredStoreText: resources.preferredStoreText,\r\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\r\n\r\n days: {\r\n monday: resources.storeHoursMondayText,\r\n tuesday: resources.storeHoursTuesdayText,\r\n wednesday: resources.storeHoursWednesdayText,\r\n thursday: resources.storeHoursThursdayText,\r\n friday: resources.storeHoursFridayText,\r\n saturday: resources.storeHoursSaturdayText,\r\n sunday: resources.storeHoursSundayText,\r\n mondayFull: resources.storeHoursMondayFullText,\r\n tuesdayFull: resources.storeHoursTuesdayFullText,\r\n wednesdayFull: resources.storeHoursWednesdayFullText,\r\n thursdayFull: resources.storeHoursThursdayFullText,\r\n fridayFull: resources.storeHoursFridayFullText,\r\n saturdayFull: resources.storeHoursSaturdayFullText,\r\n sundayFull: resources.storeHoursSundayFullText\r\n }\r\n };\r\n};\r\n\r\nexport default HeiStoreHours;\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 { IHeiStoreHoursViewProps } from './hei-store-hours';\r\nimport { OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport classnames from 'classnames';\r\nimport {\r\n buildStoreHours,\r\n IHoursDisplayInfo,\r\n secondsToTime\r\n} from '../store-selector/components/store-selector-location-line-item/date-time-helpers';\r\nimport { IStoreSelectorLocationLineItemResources } from '../store-selector/components/store-selector-location-line-item';\r\n\r\nconst HeiStoreHoursView = (props: IHeiStoreHoursViewProps) => {\r\n const {\r\n storeInfo: { storeHours, location, resources },\r\n config: { className }\r\n } = props;\r\n\r\n return
{renderStoreHours(storeHours, location, resources)}
;\r\n};\r\n\r\nconst renderStoreHours = (\r\n storeHours: StoreHours | undefined,\r\n location: OrgUnitLocation,\r\n resources: IStoreSelectorLocationLineItemResources\r\n): JSX.Element | null => {\r\n // First, use the store hours. This will allow listing day by day houts\r\n if (storeHours && storeHours.RegularStoreHours) {\r\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\r\n\r\n return (\r\n
\r\n {storeHoursList.map((displayTime, i) => (\r\n
\r\n {displayTime.endDayShort ? (\r\n
\r\n {displayTime.startDayShort}–\r\n {displayTime.endDayShort}\r\n
\r\n ) : (\r\n
\r\n {displayTime.startDayShort}\r\n
\r\n )}\r\n
{displayTime.timeRange}
\r\n
\r\n ))}\r\n
\r\n );\r\n } else {\r\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\r\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\r\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\r\n\r\n return (\r\n
\r\n {storeOpenFrom}-{storeOpenTo}\r\n
\r\n );\r\n }\r\n};\r\n\r\nexport default HeiStoreHoursView;\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\n/* eslint-disable no-duplicate-imports */\r\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport get from 'lodash/get';\r\n\r\nimport { IStoreSelectorLocationLineItemResources } from '.';\r\n\r\nexport interface IHoursDisplayInfo {\r\n startDayShort: string;\r\n startDayFull: string;\r\n endDayShort?: string;\r\n endDayFull?: string;\r\n timeRange: string;\r\n}\r\n\r\ninterface IHoursInfo {\r\n isClosed: boolean;\r\n openTime?: number;\r\n closeTime?: number;\r\n}\r\n\r\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\r\n\r\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\r\n if (seconds === undefined) {\r\n return undefined;\r\n }\r\n let hours = Math.floor(seconds / (60 * 60));\r\n const ampm = hours >= 12 ? 'pm' : 'am';\r\n hours %= 12;\r\n hours = hours ? hours : 12;\r\n const divisorForMinutes = seconds % (60 * 60);\r\n const minutes = Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\r\n return `${hours}:${minutes} ${ampm}`;\r\n};\r\n\r\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.monday;\r\n case 'TUE':\r\n return resources.days.tuesday;\r\n case 'WED':\r\n return resources.days.wednesday;\r\n case 'THU':\r\n return resources.days.thursday;\r\n case 'FRI':\r\n return resources.days.friday;\r\n case 'SAT':\r\n return resources.days.saturday;\r\n default:\r\n // Case 'SUN':\r\n return resources.days.sunday;\r\n }\r\n};\r\n\r\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.mondayFull;\r\n case 'TUE':\r\n return resources.days.tuesdayFull;\r\n case 'WED':\r\n return resources.days.wednesdayFull;\r\n case 'THU':\r\n return resources.days.thursdayFull;\r\n case 'FRI':\r\n return resources.days.fridayFull;\r\n case 'SAT':\r\n return resources.days.saturdayFull;\r\n default:\r\n // Case 'SUN':\r\n return resources.days.sundayFull;\r\n }\r\n};\r\n\r\nconst buildHoursDisplayInfo = (\r\n startDay: DayType,\r\n endDay: DayType,\r\n hoursInfo: string,\r\n resources: IStoreSelectorLocationLineItemResources\r\n): IHoursDisplayInfo => {\r\n return {\r\n startDayShort: getShortTimeString(startDay, resources),\r\n startDayFull: getFullTimeString(startDay, resources),\r\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\r\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\r\n timeRange: hoursInfo\r\n };\r\n};\r\n\r\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\r\n if (firstLine.isClosed && secondLine.isClosed) {\r\n return true;\r\n }\r\n\r\n if (!firstLine.isClosed && !secondLine.isClosed) {\r\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\r\n return {\r\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\r\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\r\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\r\n };\r\n};\r\n\r\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\r\n if (hoursInfo.isClosed) {\r\n return resources.closedText;\r\n }\r\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\r\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\r\n\r\n return `${openFrom}–${openTo}`;\r\n};\r\n\r\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\r\n const storeHoursList: IHoursDisplayInfo[] = [];\r\n\r\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\r\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\r\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\r\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\r\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\r\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\r\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\r\n\r\n let periodStart: DayType = 'MON';\r\n let periodEnd: DayType = 'MON';\r\n\r\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\r\n\r\n periodStart = 'TUE';\r\n }\r\n periodEnd = 'TUE';\r\n\r\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\r\n\r\n periodStart = 'WED';\r\n }\r\n periodEnd = 'WED';\r\n\r\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\r\n\r\n periodStart = 'THU';\r\n }\r\n periodEnd = 'THU';\r\n\r\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\r\n\r\n periodStart = 'FRI';\r\n }\r\n periodEnd = 'FRI';\r\n\r\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\r\n\r\n periodStart = 'SAT';\r\n }\r\n periodEnd = 'SAT';\r\n\r\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\r\n\r\n periodStart = 'SUN';\r\n }\r\n periodEnd = 'SUN';\r\n\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\r\n\r\n return storeHoursList;\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['hei-store-hours'] = {\n c: () => require('partner/modules/hei-store-hours/hei-store-hours.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'hei-store-hours',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/hei-store-hours'\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|hei-store-hours|hei-store-hours'] = {\n c: () => require('partner/modules/hei-store-hours/hei-store-hours.view.tsx'),\n cn: '__local__-__local__-hei-store-hours'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;"],"names":["mapResources","resources","contactInfoHeader","contactText","storeHoursHeader","timeText","availabilityInfoHeader","availabilityText","closedText","storeHoursClosedText","outOfStock","outOfStockText","inStock","inStockText","currentLocation","selectedStoreLocationText","selectLocation","selectStoreText","selectLocationAriaLabelFormat","selectStoreAriaFormatText","setAsPreferredStoreText","setAsPreferredStoreTextAriaLabel","preferredStoreText","preferredStoreAriaLabel","days","monday","storeHoursMondayText","tuesday","storeHoursTuesdayText","wednesday","storeHoursWednesdayText","thursday","storeHoursThursdayText","friday","storeHoursFridayText","saturday","storeHoursSaturdayText","sunday","storeHoursSundayText","mondayFull","storeHoursMondayFullText","tuesdayFull","storeHoursTuesdayFullText","wednesdayFull","storeHoursWednesdayFullText","thursdayFull","storeHoursThursdayFullText","fridayFull","storeHoursFridayFullText","saturdayFull","storeHoursSaturdayFullText","sundayFull","storeHoursSundayFullText","props","context","config","orgUnitNumber","storeHours","setStoreHours","useState","orgUnitLocation","setOrgUnitLocation","storeHoursLoaded","setStoreHoursLoaded","useEffect","ctx","callerContext","actionContext","hours","OrgUnitsDataActions","allStores","OrgUnitNumber","store","find","s","error","telemetry","exception","viewProps","_objectSpread","storeInfo","location","renderView","renderStoreHours","RegularStoreHours","storeHoursList","buildStoreHours","React","className","map","displayTime","i","key","endDayShort","title","startDayFull","startDayShort","endDayFull","timeRange","storeOpenFrom","secondsToTime","OpenFrom","storeOpenTo","OpenTo","classnames","seconds","undefined","Math","floor","ampm","divisorForMinutes","getShortTimeString","day","getFullTimeString","buildHoursDisplayInfo","startDay","endDay","hoursInfo","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","dateForLookup","get","buildStoreHoursString","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","push","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports"],"sourceRoot":""}