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AAA,IAKL,MAGMC,EAAO,CAChB,CAAC,UAAmB,EACpB,CAAC,WALoB,EAMrB,CAAC,YALqB,IAQbC,EAAkB,kBAClBC,EAAa,aACbC,EAAmB,U,wFCvBzB,IAAKC,EAAL,CAAKA,IACRA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,OAAS,SAHDA,GAAL,CAAKA,GAAA,G","sources":["webpack://elc-service-subscriptions/./src/internal/utils/Classes.ts","webpack://elc-service-subscriptions/./src/internal/utils/KeyPressHandler.ts","webpack://elc-service-subscriptions/./src/internal/views/AutoReplenishmentInfoModalTrigger.tsx","webpack://elc-service-subscriptions/./src/internal/views/AutoReplenishmentInfoModal.tsx","webpack://elc-service-subscriptions/./src/internal/views/common/ToggleSelector.tsx","webpack://elc-service-subscriptions/./src/internal/constants/DataTestIdAttributes.ts","webpack://elc-service-subscriptions/./src/exported/auto-replenishment/AutoReplenishment.tsx","webpack://elc-service-subscriptions/./src/theme/default-theme.ts","webpack://elc-service-subscriptions/./src/internal/utils/ConfigUtils.ts","webpack://elc-service-subscriptions/./src/internal/constants/AutoReplenishment.ts","webpack://elc-service-subscriptions/./src/internal/constants/AutoReplenishmentTimingTypes.ts"],"sourcesContent":["import * as classnames from 'classnames';\n\nexport const classes = (component: string, ...classNames: (string | undefined)[]) =>\n classnames(`elc-${component}`, `js-${component}`, classNames);\n","export const handleKeyPress = (\n event: React.KeyboardEvent,\n keys: string[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any\n) => {\n event.preventDefault();\n if (keys.includes(event.key)) {\n func(params);\n }\n};\n\nexport const enum ACCEPTABLE_KEYS_PRESSED {\n ENTER = 'Enter',\n SPACEBAR = ' '\n}\n","import * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { ITranslationsCollection, translate } from '@estee/elc-service';\nimport { INFO_POPUP_TRIGGER } from '../constants/AutoReplenishment';\nimport { classes } from '../utils/Classes';\nimport { Button } from '@estee/elc-buttons';\nimport { InfoIcon } from '@estee/elc-icons';\n\nexport interface AutoReplenishInfoModalTriggerOptions {\n translations?: ITranslationsCollection;\n triggerType?: INFO_POPUP_TRIGGER;\n onClick(): void;\n}\n\nexport const AutoReplenishmentInfoModalTrigger = translate([\n 'learnMoreLabel',\n 'openLabel',\n 'closeLabel',\n 'autoReplenishMoreInformation'\n])(\n observer((props: AutoReplenishInfoModalTriggerOptions) => {\n const { translations, triggerType } = props;\n\n const openModalClassNames = classes('auto-replenish-open-modal');\n const autoReplenishModalTriggerIconClass = classes('auto-replenish-modal-trigger-icon');\n const autoReplenishModalTriggerTextClass = classes('auto-replenish-modal-trigger-text');\n\n const {\n openLabel,\n learnMoreLabel,\n autoReplenishMoreInformation\n } = translations as ITranslationsCollection;\n\n const infoModalButtonContent =\n triggerType === INFO_POPUP_TRIGGER.TEXT ? (\n {learnMoreLabel}\n ) : (\n \n );\n\n return (\n \n {infoModalButtonContent}\n \n );\n })\n);\n","import * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { observable } from 'mobx';\nimport { ITranslationsCollection, translate, ServiceView } from '@estee/elc-service';\nimport { classes } from '../utils/Classes';\nimport { RemoveIcon } from '@estee/elc-icons';\nimport { ResponsiveModal } from '@estee/elc-responsive-modal';\nimport { AutoReplenishmentInfoModalTrigger } from './AutoReplenishmentInfoModalTrigger';\nimport styled from 'styled-components';\nimport { IAutoReplenishOptions } from '../../exported/auto-replenishment/AutoReplenishment';\nimport { Button } from '@estee/elc-buttons';\nimport { CONTENT_BLOCK } from '@estee/elc-service-view-names';\nimport { serviceName, version } from '../../service-setup/packageInfo';\n\nexport interface IAutoReplenishInfoModalOptions {\n translations?: ITranslationsCollection;\n config: IAutoReplenishOptions;\n}\n\nconst AutoReplenishModalWrapper = styled.div`\n width: 100%;\n height: 100%;\n`;\n\n@translate(['closeLabel', 'autoReplenishMoreInformation'])\n@observer\nexport class AutoReplenishmentInfoModal extends React.Component {\n @observable private isAutoReplenishInfoModalOpen: boolean = false;\n\n private toggleAutoReplenishInfoModal = (\n event?: React.MouseEvent\n ) => {\n // click triggered from IframeModal so might not have an event\n if (event) {\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation();\n }\n\n this.isAutoReplenishInfoModalOpen = !this.isAutoReplenishInfoModalOpen;\n };\n\n public render() {\n const { infoPopupTriggerType, infoPopupNodeId } = this.props.config;\n\n const { closeLabel, autoReplenishMoreInformation } = this.props\n .translations as ITranslationsCollection;\n\n const autoReplenishModalClass = classes('auto-replenish-modal');\n const autoReplenishModalCloseButtonIconClass = classes(\n 'auto-replenish-modal-close-button-icon'\n );\n\n const productContentConfig = {\n nid: infoPopupNodeId as number\n };\n\n return (\n <>\n {infoPopupTriggerType && (\n \n )}\n \n \n \n {infoPopupNodeId && (\n \n \n \n )}\n \n \n \n );\n }\n}\n","import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { TOGGLE_TYPE } from '../../constants/AutoReplenishment';\nimport { CheckBox } from '@estee/elc-checkbox';\nimport { Body2 } from '@estee/elc-typography';\nimport { ITranslationsCollection } from '@estee/elc-service';\nimport { Switch } from '@estee/elc-switch';\nimport styled from 'styled-components';\nimport { SUBSCRIBE_BUTTON } from '../../constants/DataTestIdAttributes';\n\nexport interface IToggleSelector {\n toggleType?: string;\n translations?: ITranslationsCollection;\n toggleAutoReplenish(isChecked: boolean): void;\n isAutoReplenishSelected: boolean;\n setAutoReplenishSelection(isSelected: boolean): void;\n}\n\nconst SwitchWrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n`;\n\nexport const ToggleSelector = observer(function ToggleSelector(props: IToggleSelector) {\n const {\n toggleType,\n translations,\n toggleAutoReplenish,\n isAutoReplenishSelected,\n setAutoReplenishSelection\n } = props;\n\n const { subscribeLabel } = translations as ITranslationsCollection;\n\n switch (toggleType) {\n case TOGGLE_TYPE.CHECKBOX:\n return (\n \n );\n case TOGGLE_TYPE.SWITCH:\n default:\n return (\n <>\n {subscribeLabel}\n \n \n \n \n );\n }\n});\n","export const SUBSCRIBE_BUTTON = 'product_autoreplenish_subscribe_button';\nexport const PRODUCT_AUTO_REPLENISH = 'product_auto_replenish';\n","import * as React from 'react';\nimport styled from 'styled-components';\nimport { Dropdown } from '@estee/elc-dropdown';\nimport {\n addConfig,\n addContext,\n configConsumer,\n ITranslationsCollection,\n translate\n} from '@estee/elc-service';\nimport { PRODUCT_AUTO_REPLENISH } from '~constants/DataTestIdAttributes';\nimport {\n INFO_POPUP_TRIGGER,\n FREQUENCY_REGEX,\n DAYS_REGEX,\n DAYS_PLACEHOLDER,\n DAYS\n} from '~constants/AutoReplenishment';\nimport { AutoReplenishDropdownTheme } from '../../theme/default-theme';\nimport { classes } from '~utils/Classes';\nimport { handleKeyPress, ACCEPTABLE_KEYS_PRESSED } from '~utils/KeyPressHandler';\nimport { AutoReplenishmentInfoModal } from '~views/AutoReplenishmentInfoModal';\nimport { AutoReplenishmentViewController } from '~controllers/AutoReplenishmentViewController';\nimport { TIMING_TYPE } from '~constants/AutoReplenishmentTimingTypes';\nimport { observer } from 'mobx-react';\nimport { mergeConfigs } from '~utils/ConfigUtils';\nimport { ToggleSelector, IToggleSelector } from '~views/common/ToggleSelector';\n\nexport interface IAutoReplenishment {\n className?: string;\n translations?: ITranslationsCollection;\n viewController: AutoReplenishmentViewController;\n config: IAutoReplenishConfig;\n}\nexport interface IAutoReplenishConfig {\n autoReplenishment?: IAutoReplenishOptions;\n onSelect(option: number): void;\n}\n\n// TODO: eventually, all AR options should be moved here\nexport interface IAutoReplenishOptions {\n enabled?: boolean;\n intervals?: number[];\n defaultInterval?: number;\n toggleType?: string;\n timingType?: TIMING_TYPE;\n infoPopupTriggerType?: INFO_POPUP_TRIGGER;\n infoPopupNodeId?: number;\n}\nexport interface IIsAutoReplenishSelected {\n isAutoReplenishSelected: boolean;\n}\n\nexport interface IFocus {\n isFocused: boolean;\n}\n\nconst AutoReplenishWrapper = styled.div`\n width: 100%;\n`;\n\nconst SubscribeWrapper = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n`;\n\nconst SubscribeCopyWrapper = styled.div`\n display: block !important;\n`;\n\nconst AutoReplenishDropdown = styled(Dropdown)`\n opacity: ${(props: IIsAutoReplenishSelected) => (props.isAutoReplenishSelected ? 1 : 0.5)};\n transition: opacity 1s ease;\n z-index: 999;\n ${AutoReplenishDropdownTheme};\n .elc-dropdown-options {\n z-index: 999;\n }\n`;\n\nconst AutoReplenishDropdownWrapper = styled.div`\n display: block;\n`;\n\nconst AutoReplenishNonToggleableArea = styled.div`\n display: inline-block;\n`;\n\n@addContext()\n@addConfig(['subscriptionsConfig'], mergeConfigs)\n@configConsumer(['autoReplenishment', 'onSelect'])\n@translate(['autoReplenishLabel', 'selectFrequencyLabel', 'subscribeCopyLabel', 'subscribeLabel'])\n@observer\nclass AutoReplenishment extends React.Component {\n public static displayName: string;\n\n constructor(props: IAutoReplenishment) {\n super(props);\n props.viewController.initialize(props);\n }\n\n private stopClickPropagation = (event: React.MouseEvent) => {\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation();\n };\n\n private handleOnChangeDropDown = (inputName: string, val: string) => {\n this.props.viewController.setAutoReplenishOption(parseInt(val, 10));\n };\n\n private mapOptions =\n (autoReplenishLabel: string, timingType?: TIMING_TYPE) => (option: number) => {\n const label = autoReplenishLabel.toLowerCase().includes(DAYS_PLACEHOLDER)\n ? autoReplenishLabel.replace(DAYS_REGEX, option.toString())\n : autoReplenishLabel.replace(FREQUENCY_REGEX, option.toString());\n\n const value = timingType ? (option * DAYS[timingType]).toString() : option.toString();\n\n return {\n label,\n value\n };\n };\n\n private getSelectedValue = (\n selectedAutoReplenishOption: number,\n selectFrequencyLabel: string,\n autoReplenishLabel: string,\n timingType?: TIMING_TYPE\n ): string => {\n let selectedValue: string;\n\n if (selectedAutoReplenishOption === 0) {\n selectedValue = selectFrequencyLabel;\n } else if (autoReplenishLabel.toLowerCase().includes(DAYS_PLACEHOLDER)) {\n selectedValue = autoReplenishLabel.replace(\n DAYS_REGEX,\n selectedAutoReplenishOption.toString()\n );\n } else {\n selectedValue = autoReplenishLabel.replace(\n FREQUENCY_REGEX,\n timingType\n ? Math.round(selectedAutoReplenishOption / DAYS[timingType]).toString()\n : selectedAutoReplenishOption.toString()\n );\n }\n\n return selectedValue;\n };\n\n public render() {\n const { className, translations, viewController } = this.props;\n const enabled =\n viewController.data.componentConfig && viewController.data.componentConfig.enabled;\n\n if (!enabled) {\n return null;\n }\n\n const {\n data: {\n isAutoReplenishSelected,\n selectedAutoReplenishOption,\n intervals,\n toggleType,\n timingType\n },\n infoModalConfig,\n setAutoReplenishSelection,\n toggleAutoReplenishSelection\n } = viewController;\n\n const { autoReplenishLabel, selectFrequencyLabel, subscribeCopyLabel } =\n translations as ITranslationsCollection;\n\n const productAutoReplenishWrapperClassnames = classes(\n 'product-auto-replenish-wrapper',\n className\n );\n const autoReplenishSubscribeWrapperClassnames = classes('auto-replenish-subscribe-wrapper');\n const autoReplenishSubscribeCopyWrapperClassnames = classes(\n 'auto-replenish-subscribe-copy-wrapper'\n );\n const autoReplenishDropdownWrapperClassnames = classes('auto-replenish-dropdown-wrapper');\n const autoReplenishDropdownClassNames = classes('auto-replenish-dropdown');\n\n const dropdownOptions = intervals.map(this.mapOptions(autoReplenishLabel, timingType));\n\n const selectedValue = this.getSelectedValue(\n selectedAutoReplenishOption,\n selectFrequencyLabel,\n autoReplenishLabel,\n timingType\n );\n\n const toggleAutoReplenish = (isChecked: boolean) => {\n setAutoReplenishSelection(!isChecked);\n };\n\n const acceptedKeys = [ACCEPTABLE_KEYS_PRESSED.ENTER, ACCEPTABLE_KEYS_PRESSED.SPACEBAR];\n\n const toggleSelectorProps: IToggleSelector = {\n toggleType,\n translations,\n toggleAutoReplenish,\n isAutoReplenishSelected,\n setAutoReplenishSelection\n };\n\n const onKeyPressed = (keyPressed: React.KeyboardEvent) => {\n handleKeyPress(keyPressed, acceptedKeys, toggleAutoReplenishSelection);\n };\n\n return (\n \n \n \n \n \n {subscribeCopyLabel}\n \n \n \n \n \n \n \n \n );\n }\n}\n\nAutoReplenishment.displayName = 'AutoReplenishment';\n\nexport default AutoReplenishment;\n","export const AutoReplenishDropdownTheme = `\n .elc-dropdown-wrapper {\n border: 0;\n }\n\n .elc-dropdown-arrow {\n border: 0;\n }\n\n .elc-dropdown-options {\n border: 0;\n }\n`;\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const mergeConfigs = (stateConfig: any, propsConfig: any) => {\n const { subscriptionsConfig = {}, ...restOfStateConfig } = stateConfig;\n\n return {\n ...subscriptionsConfig,\n ...restOfStateConfig,\n ...propsConfig\n };\n};\n","import { TIMING_TYPE } from './AutoReplenishmentTimingTypes';\n\nexport enum TOGGLE_TYPE {\n CHECKBOX = 'checkbox',\n SWITCH = 'switch'\n}\n\nexport enum INFO_POPUP_TRIGGER {\n ICON = 'icon',\n TEXT = 'text'\n}\n\nexport const WEEK_DAYS = 7;\nexport const MONTH_DAYS = 30;\n\nexport const DAYS = {\n [TIMING_TYPE.DAYS]: 1,\n [TIMING_TYPE.WEEKS]: WEEK_DAYS,\n [TIMING_TYPE.MONTHS]: MONTH_DAYS\n};\n\nexport const FREQUENCY_REGEX = /::FREQUENCY::/gi;\nexport const DAYS_REGEX = /::DAYS::/gi;\nexport const DAYS_PLACEHOLDER = '::days::';\n","export enum TIMING_TYPE {\n WEEKS = 'weeks',\n DAYS = 'days',\n MONTHS = 'months'\n}\n"],"names":["classes","component","classNames","classnames","ACCEPTABLE_KEYS_PRESSED","AutoReplenishmentInfoModalTrigger","observer","props","translations","triggerType","openModalClassNames","autoReplenishModalTriggerIconClass","autoReplenishModalTriggerTextClass","openLabel","learnMoreLabel","autoReplenishMoreInformation","infoModalButtonContent","className","InfoIcon","Button","onClick","title","AutoReplenishModalWrapper","AutoReplenishmentInfoModal","isAutoReplenishInfoModalOpen","toggleAutoReplenishInfoModal","event","stopPropagation","nativeEvent","stopImmediatePropagation","this","render","infoPopupTriggerType","infoPopupNodeId","config","closeLabel","autoReplenishModalClass","autoReplenishModalCloseButtonIconClass","productContentConfig","nid","ResponsiveModal","isOpen","onMaskClick","value","RemoveIcon","ServiceView","name","serviceName","version","SwitchWrapper","ToggleSelector","toggleType","toggleAutoReplenish","isAutoReplenishSelected","setAutoReplenishSelection","subscribeLabel","CheckBox","label","onChange","isChecked","Switch","isSelected","onToggle","AutoReplenishWrapper","SubscribeWrapper","SubscribeCopyWrapper","AutoReplenishDropdown","Dropdown","AutoReplenishDropdownWrapper","AutoReplenishNonToggleableArea","constructor","super","stopClickPropagation","handleOnChangeDropDown","inputName","val","viewController","setAutoReplenishOption","parseInt","mapOptions","autoReplenishLabel","timingType","option","toLowerCase","includes","replace","toString","getSelectedValue","selectedAutoReplenishOption","selectFrequencyLabel","selectedValue","Math","round","initialize","data","componentConfig","enabled","intervals","infoModalConfig","toggleAutoReplenishSelection","subscribeCopyLabel","productAutoReplenishWrapperClassnames","autoReplenishSubscribeWrapperClassnames","autoReplenishSubscribeCopyWrapperClassnames","autoReplenishDropdownWrapperClassnames","autoReplenishDropdownClassNames","dropdownOptions","map","acceptedKeys","ENTER","SPACEBAR","toggleSelectorProps","onKeyPress","keyPressed","keys","func","params","preventDefault","key","options","dataTestId","isDisabled","addContext","addConfig","stateConfig","propsConfig","subscriptionsConfig","restOfStateConfig","displayName","TOGGLE_TYPE","INFO_POPUP_TRIGGER","DAYS","FREQUENCY_REGEX","DAYS_REGEX","DAYS_PLACEHOLDER","TIMING_TYPE"],"sourceRoot":""}