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EJ,EAAAA,EAAAA,KAACuB,EAAAA,SAAc,CAAAxB,UACbC,EAAAA,EAAAA,KAACoyB,GAA8BjkB,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACzB7N,KAAKpB,OAAK,IACd4vB,sBAAuBxuB,KAAKwuB,sBAC5BxC,sBAAuBhsB,KAAKgsB,sBAC5BiH,mBA7DiB,iDA8DjBJ,iBAAkB7yB,KAAK6yB,qBAI/B,IAAC,CAlC8B,CAAS5xB,EAAAA,eAmD7BiyB,GAAuBh0B,IAAAA,QAClC6mB,EAAAA,iBACAoN,EAAAA,GACAC,EAAAA,UACAC,EAAAA,qBACA,SAAAC,GAAa,OAAIC,EAAAA,EAAAA,mBAAkBD,EAAeE,EAAAA,aAAa1D,IAAK,gCAAgC,GALlE5wB,CAMlCozB,G","sources":["../../../../feeds/packages/feed-and-attribute-selector/src/feed-selector.js","../../../../feeds/packages/feed-and-attribute-selector/src/feed-attribute-selector.js","../../../../feeds/packages/feed-and-attribute-selector/src/help-icon.js","../../../../feeds/packages/feed-and-attribute-selector/src/default-text-editor.js","../../../../feeds/packages/feed-and-attribute-selector/src/feed-syntax.js","../../../../feeds/packages/feed-and-attribute-selector/src/feed-and-attribute-selector.js","../../../../fluctuation/packages/fluctuation-common/src/metric-counter.js","../../../../fluctuation/packages/fluctuation-common/src/description-container.js","../../../../fluctuation/packages/fluctuation-common/src/constants.js","../../../../fluctuation/packages/fluctuation-common/src/components/callout.js","../../../../fluctuation/packages/fluctuation-common/src/components/fluctuation-action-button.js","../../../../fluctuation/packages/fluctuation-common/src/utils.js","../../../../fluctuation/packages/fluctuation-common/src/components/insight-action-forms.js","../../../../fluctuation/packages/fluctuation-common/src/insight-action.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-instr-schema.js","../../../../fluctuation/packages/fluctuation-popup/src/common/constants.js","../../../../fluctuation/packages/fluctuation-popup/src/common/pagination.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-url-service.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-log-service.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-action/DetailContainer.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-action/ActionContainer.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-action/ViewAllContainer.js","../../../../fluctuation/packages/fluctuation-popup/src/common/utils.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-popup.js","../../../../fluctuation/packages/fluctuation-popup/src/fluctuation-factory.js","../../../../fluctuation/packages/fluctuation-service/src/index.js","../../fallback-page/src/fallback-page.js","../../fallback-page/src/styles/fallback-page-styles.js","../../fallback-page/src/with-fallback-page.js","../../import-center-main-menu/src/components/styles/menu-item-styles.js","../../import-center-main-menu/src/components/styles/common-styles.js","../../import-center-main-menu/src/components/menu-item/import-type-item.js","../../import-center-main-menu/src/components/menu-item/import-type-item-list.js","../../import-center-main-menu/src/components/menu-item/connection-item.js","../../import-center-main-menu/src/components/menu-item/connection-item-list.js","../../import-center-main-menu/src/mock-data/connections-data.js","../../import-center-main-menu/src/import-center-main-menu-view.js","../../import-center-main-menu/src/styles/main-menu-styles.js","../../import-center-main-menu/src/import-center-main-menu.js"],"sourcesContent":["import _ from 'underscore';\r\nimport React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ListSelector } from '@bingads-webui-react/list-selector';\r\n\r\nexport class FeedSelectorView extends Component {\r\n static defaultProps = {\r\n feeds: [],\r\n };\r\n\r\n renderItem = (item) => {\r\n const { i18n } = this.props;\r\n const { Name, AttributeNames, Description } = item;\r\n let attributeDescription = '';\r\n\r\n if (Description && Description.length > 0) {\r\n attributeDescription = Description;\r\n } else {\r\n const processAttributeNames = _.first(AttributeNames, 3);\r\n\r\n if (AttributeNames.length > 3) {\r\n processAttributeNames.push('...');\r\n }\r\n const attributeDescriptionPre = i18n.getString('Feeds_FeedItemsPage_Attributes_Description');\r\n attributeDescription = `${attributeDescriptionPre}${processAttributeNames.join(', ')}`;\r\n }\r\n\r\n return (\r\n
\r\n

{Name}

\r\n
{attributeDescription}
\r\n
);\r\n }\r\n\r\n render() {\r\n const { feeds, onSelect } = this.props;\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nFeedSelectorView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n feeds: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n AttributeNames: PropTypes.arrayOf(PropTypes.string),\r\n Id: PropTypes.number,\r\n })),\r\n onSelect: PropTypes.func.isRequired,\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport 'jquery';\r\nimport { ListSelector } from '@bingads-webui-react/list-selector';\r\n\r\nexport class FeedAttributeSelectorView extends Component {\r\n static defaultProps = {\r\n attributeNames: [],\r\n }\r\n\r\n renderItem = name => (\r\n
{name}
\r\n )\r\n\r\n render() {\r\n const { attributeNames, onSelect } = this.props;\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nFeedAttributeSelectorView.propTypes = {\r\n attributeNames: PropTypes.arrayOf(PropTypes.string),\r\n onSelect: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport class HelpIcon extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.element = React.createRef();\r\n }\r\n\r\n onClick = () => {\r\n // eslint-disable-next-line no-undef\r\n PopupController.PopupJsClick(this.element.current);\r\n }\r\n render() {\r\n const { topic, ariaLabel } = this.props;\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nHelpIcon.propTypes = {\r\n topic: PropTypes.string.isRequired,\r\n ariaLabel: PropTypes.string,\r\n};\r\nHelpIcon.defaultProps = {\r\n ariaLabel: '',\r\n};\r\n","import React, { Component } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport 'jquery';\r\nimport { TextInput } from '@bingads-webui-react/text-input';\r\nimport { HelpIcon } from './help-icon';\r\n\r\nconst DEFAULT_MAX_LENGTH = 90;\r\nexport class DefaultTextEditorView extends Component {\r\n static defaultProps = {\r\n maxLength: DEFAULT_MAX_LENGTH,\r\n enableCancel: true,\r\n defaultText: '',\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n const { defaultText } = props;\r\n this.state = {\r\n data: defaultText,\r\n errorMessage: this.onValidate(defaultText),\r\n prevPropsDefaultText: defaultText,\r\n onValidate: this.onValidate.bind(this),\r\n };\r\n }\r\n\r\n // update state when props update\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n if (nextProps.defaultText !== prevState.prevPropsDefaultText) {\r\n return {\r\n data: nextProps.defaultText,\r\n errorMessage: prevState.onValidate(nextProps.defaultText),\r\n prevPropsDefaultText: nextProps.defaultText,\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n onSaveOrOnCancel = (isCancel, event) => {\r\n this.props.onSaveOrOnCancel(isCancel ? '' : this.state.data, event);\r\n }\r\n\r\n onCancelClicked = (event) => {\r\n this.onSaveOrOnCancel(true, event);\r\n }\r\n\r\n onSaveClicked = (event) => {\r\n this.onSaveOrOnCancel(false, event);\r\n }\r\n\r\n onValidate = (model) => {\r\n const { maxLength, i18n, enableCancel } = this.props;\r\n // max length check\r\n if (model && maxLength && maxLength > 0 && model.length > maxLength) {\r\n return i18n.getString('DefaultText_Max_length_validation', { count: maxLength });\r\n }\r\n\r\n // min length check for disable cancel\r\n if (!enableCancel && ((!model) || model.length === 0)) {\r\n return i18n.getString('DefaultText_Required_validation');\r\n }\r\n return null;\r\n }\r\n\r\n onChange = (e) => {\r\n const data = e.target.value;\r\n const model = data.trim();\r\n const errorMessage = this.onValidate(model);\r\n\r\n this.setState({ data, errorMessage });\r\n }\r\n\r\n getErrorMessage = () => (this.state.errorMessage ? (\r\n
\r\n {this.state.errorMessage}\r\n
\r\n ) : null)\r\n\r\n render() {\r\n const { i18n, enableCancel } = this.props;\r\n const inputId = 'default_text_input';\r\n\r\n /* eslint-disable jsx-a11y/label-has-for */\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n {this.getErrorMessage()}\r\n
\r\n
\r\n \r\n {enableCancel ? : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nDefaultTextEditorView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n defaultText: PropTypes.string,\r\n maxLength: PropTypes.number,\r\n onSaveOrOnCancel: PropTypes.func.isRequired,\r\n enableCancel: PropTypes.bool,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpIcon } from './help-icon';\r\n\r\nexport class FeedSyntaxView extends React.PureComponent {\r\n static defaultProps = {\r\n selectedFeed: false,\r\n selectedAttribute: false,\r\n };\r\n\r\n render() {\r\n const {\r\n i18n, selectedFeed, selectedAttribute,\r\n } = this.props;\r\n const renderPart = (text, isBold) => (\r\n isBold ? {text} : {text}\r\n );\r\n\r\n return (\r\n
\r\n
\r\n \r\n {renderPart(i18n.getString('AdCustomizer_Syntax_Syntax'), false)}\r\n {renderPart(': {=', false)}\r\n {renderPart(i18n.getString('AdCustomizer_Syntax_FeedName'), !selectedFeed)}\r\n {renderPart('.', false)}\r\n {renderPart(\r\n i18n.getString('AdCustomizer_Syntax_AttributeName'),\r\n selectedFeed && !selectedAttribute\r\n )}\r\n {renderPart(':', false)}\r\n {renderPart(\r\n i18n.getString('DefaultText_Label'),\r\n selectedFeed && selectedAttribute\r\n )}\r\n {renderPart('}', false)}\r\n \r\n \r\n
\r\n
);\r\n }\r\n}\r\n\r\nFeedSyntaxView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n selectedFeed: PropTypes.bool,\r\n selectedAttribute: PropTypes.bool,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FeedSelectorView } from './feed-selector';\r\nimport { FeedAttributeSelectorView } from './feed-attribute-selector';\r\nimport { DefaultTextEditorView } from './default-text-editor';\r\nimport { FeedSyntaxView } from './feed-syntax';\r\n\r\nexport class FeedAndAttributeSelectorView extends React.Component {\r\n static defaultProps = {\r\n feeds: [],\r\n selectedFeed: null,\r\n selectedAttribute: null,\r\n canIgnoreDefaultText: true,\r\n defaultText: '',\r\n showSyntax: true,\r\n maxLength: 0,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedFeed: this.props.selectedFeed,\r\n selectedAttribute: this.props.selectedAttribute,\r\n defaultText: this.props.defaultText,\r\n maxLength: this.props.maxLength,\r\n prevProps: this.props,\r\n };\r\n }\r\n\r\n // update state when props update\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n if (nextProps !== prevState.prevProps) {\r\n return {\r\n selectedFeed: nextProps.selectedFeed,\r\n selectedAttribute: nextProps.selectedAttribute,\r\n defaultText: nextProps.defaultText,\r\n maxLength: nextProps.maxLength,\r\n prevProps: nextProps,\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n onFeedSelected = (selectedFeed, _index, event) => {\r\n if (!selectedFeed.noNextLevel) {\r\n this.setState({\r\n selectedFeed,\r\n });\r\n }\r\n const { onUserSelectionUpdated } = this.props;\r\n onUserSelectionUpdated({\r\n Id: selectedFeed.Id,\r\n selectedFeedName: selectedFeed.Name,\r\n selectedAttributeName: '',\r\n }, event);\r\n }\r\n\r\n onDefaultTextInputDone = (defaultText, event) => {\r\n const { onUserActionCompleted } = this.props;\r\n\r\n onUserActionCompleted({\r\n Id: this.state.selectedFeed.Id,\r\n selectedFeedName: this.state.selectedFeed.Name,\r\n selectedAttributeName: this.state.selectedAttribute,\r\n defaultText,\r\n }, event);\r\n }\r\n\r\n onFeedAttributeSelected = (selectedAttribute, _index, event) => {\r\n this.setState({\r\n selectedAttribute,\r\n });\r\n\r\n const { onUserSelectionUpdated } = this.props;\r\n onUserSelectionUpdated({\r\n Id: this.state.selectedFeed.Id,\r\n selectedFeedName: this.state.selectedFeed.Name,\r\n selectedAttributeName: selectedAttribute,\r\n }, event);\r\n }\r\n\r\n renderSelectorView() {\r\n const {\r\n i18n, feeds, canIgnoreDefaultText,\r\n } = this.props;\r\n if (this.state.selectedFeed && this.state.selectedAttribute) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (this.state.selectedFeed && !this.state.selectedAttribute) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const { showSyntax, i18n } = this.props;\r\n const selectorView = this.renderSelectorView();\r\n const { selectedFeed, selectedAttribute } = this.state;\r\n const syntaxView = showSyntax ? () : null;\r\n return (\r\n
\r\n {syntaxView}\r\n
\r\n {selectorView}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nFeedAndAttributeSelectorView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n feeds: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n AttributeNames: PropTypes.arrayOf(PropTypes.string),\r\n Id: PropTypes.number,\r\n })),\r\n selectedFeed: PropTypes.shape({\r\n Name: PropTypes.string,\r\n AttributeNames: PropTypes.arrayOf(PropTypes.string),\r\n Id: PropTypes.number,\r\n }),\r\n maxLength: PropTypes.number,\r\n selectedAttribute: PropTypes.string,\r\n defaultText: PropTypes.string,\r\n onUserSelectionUpdated: PropTypes.func.isRequired,\r\n onUserActionCompleted: PropTypes.func.isRequired,\r\n canIgnoreDefaultText: PropTypes.bool,\r\n showSyntax: PropTypes.bool,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport class MetricCounter extends React.PureComponent {\r\n getMetricLine(metric) {\r\n return metric.line;\r\n }\r\n\r\n getText(metric) {\r\n const styles = {\r\n color: metric.color,\r\n };\r\n\r\n return (\r\n
\r\n
{metric.name}
\r\n
{metric.value}
\r\n
);\r\n }\r\n\r\n render() {\r\n const metricList = this.props.metrics.map(metric => (\r\n
\r\n
\r\n {this.getText(metric)}\r\n
));\r\n return (\r\n
\r\n {metricList}\r\n
\r\n );\r\n }\r\n}\r\n\r\nMetricCounter.propTypes = {\r\n metrics: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n value: PropTypes.string,\r\n line: PropTypes.string,\r\n })).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\n\r\nexport const DescriptionContainer = ({\r\n description,\r\n}) => (\r\n
\r\n
\r\n \r\n
\r\n
{description}
\r\n
\r\n);\r\n\r\nDescriptionContainer.propTypes = {\r\n description: PropTypes.node.isRequired,\r\n};\r\n","export const FLUCTUATION_CALLOUT_CLASSNAME = 'bingads-fluctuation-callout';\r\n\r\nexport const ActionSubPanel = {\r\n None: 'none',\r\n FeedbackPanel: 'feedback',\r\n DismissPanel: 'dismiss',\r\n /**\r\n * The state for feedback submitted. Not a real sub panel.\r\n */\r\n FeedbackComplete: 'feedback-complete',\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nimport { FLUCTUATION_CALLOUT_CLASSNAME } from '../constants';\r\n\r\nconst CALLOUT_HORIZONTAL_SPACE = 500;\r\n\r\nexport function CalloutWithAutoPlacement({\r\n target, onDismiss, children, calloutKey, className,\r\n}) {\r\n const [autoFixPlacement, setAutoFixPlacement] = useState('right');\r\n\r\n /* istanbul ignore next */\r\n useEffect(() => {\r\n let fixedPlacement = autoFixPlacement;\r\n const { left, right } = target.getBoundingClientRect();\r\n switch (autoFixPlacement) {\r\n case 'right':\r\n fixedPlacement = right + CALLOUT_HORIZONTAL_SPACE > window.innerWidth ? 'left' : 'right'; break;\r\n case 'left':\r\n fixedPlacement = left - CALLOUT_HORIZONTAL_SPACE < 0 ? 'right' : 'left'; break;\r\n default:\r\n break;\r\n }\r\n setAutoFixPlacement(fixedPlacement);\r\n }, [autoFixPlacement, target]);\r\n\r\n return (\r\n onDismiss(e, target)}\r\n placement={autoFixPlacement}\r\n />\r\n );\r\n}\r\n\r\nCalloutWithAutoPlacement.propTypes = {\r\n target: PropTypes.instanceOf(Element).isRequired,\r\n onDismiss: PropTypes.func,\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n calloutKey: PropTypes.string,\r\n className: PropTypes.string,\r\n};\r\n\r\nCalloutWithAutoPlacement.defaultProps = {\r\n onDismiss: _.noop,\r\n calloutKey: '',\r\n className: FLUCTUATION_CALLOUT_CLASSNAME,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Link } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const FluctuationActionButton = ({\r\n i18n,\r\n actionType,\r\n onClick,\r\n}) => (\r\n \r\n |\r\n {// eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n \r\n {i18n.getString(`Fluctuation_Option_${actionType}`)}\r\n }\r\n );\r\n\r\nFluctuationActionButton.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n actionType: PropTypes.string.isRequired,\r\n onClick: PropTypes.func.isRequired,\r\n};\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport ReactDOM from 'react-dom';\r\n\r\nfunction replaceToken(pattern, val, str) {\r\n const regexp = new RegExp(pattern);\r\n let finalString = str;\r\n while (regexp.test(finalString)) {\r\n finalString = finalString.replace(pattern, val);\r\n }\r\n\r\n return finalString;\r\n}\r\n\r\nexport function replaceCurly(str, ctx, args) {\r\n const cidpattern = /{cid}/;\r\n const uidpattern = /{uid}/;\r\n const aidpattern = /{aid}/;\r\n const cmpidpattern = /{cmpid}/;\r\n const adgidpattern = /{adgid}/;\r\n let finalStr = str;\r\n let argCounter = 0;\r\n let params = args;\r\n\r\n if (!str) {\r\n return null;\r\n }\r\n\r\n if (!Array.isArray(args)) {\r\n params = [args];\r\n }\r\n\r\n if (ctx) {\r\n const userId = ctx.CurrentUser ? ctx.CurrentUser.Id : ctx.UserId;\r\n\r\n finalStr = replaceToken(cidpattern, ctx.CustomerId, finalStr);\r\n finalStr = replaceToken(uidpattern, userId, finalStr);\r\n finalStr = replaceToken(aidpattern, ctx.AccountId, finalStr);\r\n if (ctx.CampaignId) {\r\n finalStr = replaceToken(cmpidpattern, ctx.CampaignId, finalStr);\r\n }\r\n if (ctx.AdGroupId) {\r\n finalStr = replaceToken(adgidpattern, ctx.AdGroupId, finalStr);\r\n }\r\n }\r\n\r\n while (finalStr.indexOf(`{${argCounter}}`) > -1 && argCounter < args.length) {\r\n if (typeof (params[argCounter]) === 'string') {\r\n finalStr = finalStr.replace(`{${argCounter}}`, params[argCounter]);\r\n }\r\n argCounter += 1;\r\n }\r\n return finalStr;\r\n}\r\n\r\nexport const insightPopupContainerId = 'insight-popup-placeholder';\r\n\r\n// Insert a placeholder for popover when rendering popup in Backbone view.\r\nexport const insertPopoverContainer = (placeHolderId = insightPopupContainerId) => {\r\n // insert a static div for rendering element\r\n if ($(`#${placeHolderId}`).length === 0) {\r\n $('
').attr('id', placeHolderId).appendTo(document.body);\r\n }\r\n};\r\n\r\nexport const getDefaultFeedbackOptions = i18n => [\r\n {\r\n key: '0',\r\n text: i18n.getString('Fluctuation_Feedback1'),\r\n name: 'feedback1',\r\n }, {\r\n key: '1',\r\n text: i18n.getString('Fluctuation_Feedback2'),\r\n name: 'feedback2',\r\n }, {\r\n key: '2',\r\n text: i18n.getString('Fluctuation_Feedback3'),\r\n name: 'feedback3',\r\n }];\r\n\r\nexport const getDefaultDismissOptions = i18n => [\r\n {\r\n key: '0',\r\n text: i18n.getString('Fluctuation_Dismiss_Feedback1'),\r\n name: 'dismiss1',\r\n }, {\r\n key: '1',\r\n text: i18n.getString('Fluctuation_Dismiss_Feedback2'),\r\n name: 'dismiss2',\r\n }, {\r\n key: '2',\r\n text: i18n.getString('Fluctuation_Dismiss_Feedback3'),\r\n name: 'dismiss3',\r\n }];\r\n\r\nexport function dismissPopupIfExist(popupContainers, popupClassName = 'bingads-fluctuation-wrapper') {\r\n /* istanbul ignore next */\r\n const showPopup = document.getElementsByClassName(popupClassName).length > 0;\r\n /* istanbul ignore next */\r\n if (showPopup && popupContainers.length) {\r\n _.each(popupContainers, container => container && ReactDOM.unmountComponentAtNode(container));\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton, PrimaryButton, Checkbox, TextField } from '@bingads-webui-react/fabric-control';\r\n\r\nconst Checkboxes = ({ checkboxOption, toggleCheckbox }) => (\r\n
\r\n {checkboxOption.map(entry => (\r\n ))\r\n }\r\n
);\r\n\r\nconst checkboxesPropType = {\r\n checkboxOption: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n name: PropTypes.string,\r\n })).isRequired,\r\n toggleCheckbox: PropTypes.func.isRequired,\r\n};\r\n\r\nCheckboxes.propTypes = checkboxesPropType;\r\n\r\nconst CommentContainer = ({\r\n i18n,\r\n onChange,\r\n}) => (\r\n
\r\n \r\n
\r\n);\r\n\r\nCommentContainer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const DismissForm = ({\r\n i18n,\r\n checkboxOption,\r\n toggleCheckbox,\r\n handleCommentChange,\r\n onSubmit,\r\n onCancel,\r\n}) => (\r\n
\r\n
\r\n \r\n \r\n
{i18n.getString('Fluctuation_Dismiss_Explanation')}
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n);\r\n\r\nconst commonProptypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ...checkboxesPropType,\r\n handleCommentChange: PropTypes.func.isRequired,\r\n onSubmit: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n};\r\n\r\nDismissForm.propTypes = commonProptypes;\r\n\r\nexport const FeedbackForm = ({\r\n i18n,\r\n checkboxOption,\r\n toggleCheckbox,\r\n handleCommentChange,\r\n onSubmit,\r\n onCancel,\r\n selectedCheckboxes,\r\n comment,\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\nFeedbackForm.propTypes = {\r\n ...commonProptypes,\r\n selectedCheckboxes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n comment: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { FluctuationActionButton } from './components/fluctuation-action-button';\r\nimport { ActionSubPanel } from './constants';\r\nimport { getDefaultDismissOptions, getDefaultFeedbackOptions } from './utils';\r\nimport { DismissForm, FeedbackForm } from './components/insight-action-forms';\r\n\r\nexport class InsightAction extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n const { i18n } = this.props.deps;\r\n this.feedbackOptions = this.props.feedbackOptions || getDefaultFeedbackOptions(i18n);\r\n this.dismissFeedbackOptions = this.props.dismissOptions || getDefaultDismissOptions(i18n);\r\n\r\n this.state = {\r\n comment: '',\r\n selectedCheckboxes: [],\r\n };\r\n }\r\n\r\n showPanel = (panel) => {\r\n const newPanel = panel === this.props.activeSubPanel ? ActionSubPanel.None : panel;\r\n this.setState(\r\n {\r\n selectedCheckboxes: [],\r\n comment: '',\r\n },\r\n this.props.onCurrentSubPanelChange(newPanel)\r\n );\r\n };\r\n\r\n toggleCheckbox = ({ target }, checked) => {\r\n const { id } = target;\r\n this.setState({\r\n selectedCheckboxes: checked ? this.state.selectedCheckboxes.concat(id) :\r\n _.without(this.state.selectedCheckboxes, id),\r\n });\r\n };\r\n\r\n cancelAction = (event) => {\r\n event.stopPropagation();\r\n this.props.onCurrentSubPanelChange(ActionSubPanel.None);\r\n };\r\n\r\n submitActionFeedback = (event) => {\r\n event.stopPropagation();\r\n const feedbackObj = {\r\n feedbacks: this.state.selectedCheckboxes,\r\n comment: this.state.comment,\r\n type: this.props.activeSubPanel,\r\n };\r\n const newSubPanel = this.showFeedbackForm ?\r\n ActionSubPanel.FeedbackComplete : ActionSubPanel.None;\r\n this.props.onCurrentSubPanelChange(newSubPanel);\r\n this.props.onSubmit(feedbackObj);\r\n };\r\n\r\n handleCommentChange = ({ target }) => {\r\n this.setState({ comment: target.value });\r\n };\r\n\r\n render() {\r\n const { deps: { i18n } } = this.props;\r\n this.showFeedbackForm = this.props.activeSubPanel === ActionSubPanel.FeedbackPanel;\r\n this.showDismissForm = this.props.activeSubPanel === ActionSubPanel.DismissPanel;\r\n this.feedbackSubmitted = this.props.activeSubPanel === ActionSubPanel.FeedbackComplete;\r\n\r\n const actionFormCommonProps = {\r\n i18n,\r\n CommentContainer: this.commentContainer,\r\n onSubmit: this.submitActionFeedback,\r\n onCancel: this.cancelAction,\r\n toggleCheckbox: this.toggleCheckbox,\r\n handleCommentChange: this.handleCommentChange,\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n {_.map(this.props.subPanels, panel => (\r\n this.showPanel(panel)}\r\n key={panel}\r\n />))}\r\n
\r\n {this.showFeedbackForm &&\r\n }\r\n {this.showDismissForm &&\r\n }\r\n {this.feedbackSubmitted &&\r\n
\r\n {this.props.deps.i18n.getString('Fluctuation_feedback_complete')}\r\n
}\r\n
\r\n );\r\n }\r\n}\r\n\r\nInsightAction.propTypes = {\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n }).isRequired,\r\n onSubmit: PropTypes.func.isRequired,\r\n onCurrentSubPanelChange: PropTypes.func.isRequired,\r\n activeSubPanel: PropTypes.string.isRequired,\r\n feedbackOptions: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n name: PropTypes.string,\r\n })),\r\n dismissOptions: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n name: PropTypes.string,\r\n })),\r\n learnMoreLinkTopic: PropTypes.string,\r\n subPanels: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nInsightAction.defaultProps = {\r\n feedbackOptions: undefined,\r\n dismissOptions: undefined,\r\n learnMoreLinkTopic: 'app54666',\r\n subPanels: [ActionSubPanel.FeedbackPanel, ActionSubPanel.DismissPanel],\r\n};\r\n","export const instrumentationSchema = {\r\n scenario: [{\r\n name: 'fluctuation',\r\n value: 'fluctuation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'fluctuationInstr',\r\n value: 'fluctuationInstr',\r\n },\r\n {\r\n name: 'fluctuationFeedback',\r\n value: 'fluctuationFeedback',\r\n },\r\n {\r\n name: 'userAction',\r\n value: 'userAction',\r\n },\r\n {\r\n name: 'fluctuationDismiss',\r\n value: 'fluctuationDismiss',\r\n },\r\n ],\r\n }],\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const MinFluctuationsCountToShowAllInsightsButton = 8;\r\n\r\nexport const FluctuationGranularity = {\r\n Day: 'Day',\r\n};\r\n\r\nexport const FluctuationDateFormat = 'MM-dd-yyyy';\r\n\r\n// Microsoft.Advertiser.AdInsight.Fluctuation.Schema\r\nexport const FluctuationType = {\r\n 1: 'Impression',\r\n 2: 'Click',\r\n 3: 'Spend',\r\n 4: 'Conversion',\r\n};\r\n\r\nexport const FluctuationTypeKey = _.chain(FluctuationType)\r\n .invert()\r\n .mapObject(value => parseInt(value, 10))\r\n .value();\r\n\r\nexport const MaxFluctuationsPaginationCount = 7;\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MaxFluctuationsPaginationCount } from './constants';\r\n\r\nexport class Pagination extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n currentPage: props.currentPage,\r\n };\r\n }\r\n\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n if (nextProps.currentPage !== prevState.currentPage) {\r\n return { currentPage: nextProps.currentPage };\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n const { totalPages, onClickHandler } = this.props;\r\n const { currentPage } = this.state;\r\n const totalPageSize = Math.min(MaxFluctuationsPaginationCount, totalPages);\r\n const totalPageArr = _.range(totalPageSize);\r\n const paginations = totalPageArr.map(number =>\r\n ( onClickHandler(number)}\r\n />));\r\n /* istanbul ignore next */\r\n const carousel = (\r\n // TODO: Setup card-holder__wrapper to try to reuse existed styles, remove after set up styles\r\n
\r\n currentPage > 0 && onClickHandler(currentPage - 1)}\r\n onKeyPress={() => currentPage > 0 && onClickHandler(currentPage - 1)}\r\n role=\"button\"\r\n tabIndex={0}\r\n >\r\n
\r\n left\r\n
\r\n
\r\n currentPage < totalPageSize - 1 && onClickHandler(currentPage + 1)}\r\n onKeyPress={() => currentPage < totalPageSize - 1 && onClickHandler(currentPage + 1)}\r\n role=\"button\"\r\n tabIndex={0}\r\n >\r\n
\r\n right\r\n
\r\n
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n
\r\n {paginations}\r\n
\r\n {carousel}\r\n
\r\n );\r\n }\r\n}\r\n\r\nPagination.propTypes = {\r\n totalPages: PropTypes.number.isRequired,\r\n currentPage: PropTypes.number.isRequired,\r\n onClickHandler: PropTypes.func.isRequired,\r\n};\r\n","const urlMap = {\r\n AdGroupTab: {\r\n urlVNext: 'campaign/vnext/adgroups?cid={cid}&uid={uid}&aid={aid}&campaignId={0}',\r\n isOriginRequired: true,\r\n },\r\n Opportunity: {\r\n urlVNext: 'campaign/vnext/recommendations/All?aid={aid}&cid={cid}&uid={uid}&recommendationType={0}&src=inlineopportunity&recsrc=PerformanceFluctuations',\r\n isOriginRequired: true,\r\n },\r\n CompetitionOpportunity: {\r\n urlVNext: 'campaign/vnext/competitionrecommendations?aid={aid}&cid={cid}&uid={uid}&recommendationType={0}&src=inlineopportunity&recsrc=PerformanceFluctuations',\r\n isOriginRequired: true,\r\n },\r\n FixConversionGoalSettingsOpportunity: {\r\n urlVNext: 'campaign/vnext/recommendations/All?aid={aid}&cid={cid}&recommendationType=FixConversionGoalSettingsOpportunity&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n WebsiteReport: {\r\n urlVNext: 'campaign/vnext/dimensions/publisherwebsite?cid={cid}&uid={uid}&aid={aid}',\r\n isOriginRequired: true,\r\n },\r\n AdGroupSettingsTab: {\r\n urlVNext: 'campaign/vnext/settings?adGroupId={adgid}&cid={cid}&uid={uid}&aid={aid}&campaignId={cmpid}',\r\n isOriginRequired: true,\r\n },\r\n CampaignSettingsTab: {\r\n urlVNext: 'campaign/vnext/settings?cid={cid}&uid={uid}&aid={aid}&campaignId={cmpid}',\r\n isOriginRequired: true,\r\n },\r\n KeywordTab: {\r\n urlVNext: 'campaign/vnext/keywords?adGroupId={adgid}&aid={aid}&campaignId={cmpid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n CampaignTab: {\r\n urlVNext: 'campaign/vnext/campaigns?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AdGroupAcctLevelTab: {\r\n urlVNext: 'campaign/vnext/adgroups?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AdGroupCampaignLevelTab: {\r\n urlVNext: 'campaign/vnext/adgroups?aid={aid}&cid={cid}&uid={uid}&campaignId={cmpid}',\r\n isOriginRequired: true,\r\n },\r\n KeywordCampaignLevelTab: {\r\n urlVNext: 'campaign/vnext/keywords?aid={aid}&campaignId={cmpid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n KeywordAcctLevelTab: {\r\n urlVNext: 'campaign/vnext/keywords?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AdTab: {\r\n urlVNext: 'campaign/vnext/ads?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AdCampaignLevelTab: {\r\n urlVNext: 'campaign/vnext/ads?aid={aid}&campaignId={cmpid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AdAcctLevelTab: {\r\n urlVNext: 'campaign/vnext/ads?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n ChangeHistory: {\r\n urlVNext: 'campaign/vnext/changehistory?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n AuctionInsight: {\r\n urlVNext: 'campaign/vnext/keywordsauction?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n SearchTerm: {\r\n urlVNext: 'campaign/vnext/dimensions/searchtermsdimensions?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n InvoiceAccountPausedActionURLId: {\r\n urlVNext: '/cc/InsertionOrder?aid={aid}&cid={cid}&uid={uid}',\r\n isOriginRequired: true,\r\n },\r\n InvoiceAccountOnHoldActionURLId: {\r\n urlVNext: '/cc/CreditHold/Dashboard?cid={cid}&uid={uid}&rurl=fluctuation',\r\n isOriginRequired: true,\r\n },\r\n PrepayAccountPausedActionURLId: {\r\n urlVNext: '/cc/Payment/Prepay?aid={aid}&cid={cid}&uid={uid}&returnUrl=fluctuation',\r\n isOriginRequired: true,\r\n },\r\n ThresholdAccountOnHoldActionURLId: {\r\n urlVNext: '/cc/CreditHold/Dashboard?cid={cid}&uid={uid}&rurl=fluctuation',\r\n isOriginRequired: true,\r\n },\r\n learnmoreLink: {\r\n urlVNext: 'https://help.bingads.microsoft.com/#apex/3/en/{0}/1/en-US/#ext:campaigns_load',\r\n isOriginRequired: false,\r\n },\r\n FixConversionGoalSettingLearnMore: {\r\n urlVNext: 'https://help.bingads.microsoft.com/#apex/ads/en/60029/1/en-US/#ext:recommendations_All',\r\n isOriginRequired: false,\r\n },\r\n CreatedNewConversionGoalLearnMore: {\r\n urlVNext: 'https://help.bingads.microsoft.com/#apex/ads/en/60029/1/en-US/#ext:recommendations_All',\r\n isOriginRequired: false,\r\n },\r\n InvoiceAccountPausedActionHelperId: {\r\n urlVNext: 'app50035',\r\n isOriginRequired: false,\r\n },\r\n InvoiceAccountOnHoldActionHelperId: {\r\n url: 'app50043',\r\n urlVNext: 'app50043',\r\n isOriginRequired: false,\r\n },\r\n PrepayAccountPausedActionHelperId: {\r\n urlVNext: 'app50053',\r\n isOriginRequired: false,\r\n },\r\n ThresholdAccountOnHoldActionHelperId: {\r\n urlVNext: 'app50043',\r\n isOriginRequired: false,\r\n },\r\n};\r\n\r\nexport class FluctuationUrlService {\r\n getUrl(urlId) {\r\n if (!urlMap[urlId] || !urlMap[urlId].urlVNext) {\r\n return null;\r\n }\r\n\r\n // urlMap[urlId].urlVNext hasn't slash and urlMap[urlId].url has\r\n // should confirm only both have only one slash\r\n const { urlVNext, isOriginRequired } = urlMap[urlId];\r\n const addSlashPrefix = u => (u.startsWith('/') || u.startsWith('https') ? u : `/${u}`);\r\n const urlWithSlash = addSlashPrefix(urlVNext);\r\n\r\n return `${isOriginRequired ? window.location.origin : ''}${urlWithSlash}`;\r\n }\r\n\r\n get allCampaignsUrl() {\r\n return this.getUrl('CampaignTab');\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport class FluctuationLogService {\r\n constructor(fromScenario) {\r\n /*\r\n This is to help identify from which scenario the action happened. Currently it's only used\r\n for MCC performance fluctuation. We can enrich the scenarios if needed.\r\n */\r\n this.fromScenario = _.isEmpty(fromScenario) ? '' : `_${fromScenario}`;\r\n }\r\n\r\n logContext(fluctuation, fluxDate, eventType, userId, isInternal, activity, action, note) {\r\n const logObject = {\r\n fluxId: fluctuation.UniqueId,\r\n eventType,\r\n fluxContent: {\r\n actions: _.chain(fluctuation.Actions)\r\n .pluck('Messages')\r\n .flatten().pluck('MessageId')\r\n .value(),\r\n rootCauses: _.chain(fluctuation.RootCauses)\r\n .pluck('Message')\r\n .flatten().pluck('MessageId')\r\n .value(),\r\n description: fluctuation.Description.MessageId,\r\n },\r\n fluxDate,\r\n fluxKpi: fluctuation.FluctuationType,\r\n userId,\r\n isInternal,\r\n customerId: fluctuation.CustomerId,\r\n accountId: fluctuation.AccountId,\r\n campaignId: fluctuation.CampaignId,\r\n note,\r\n };\r\n activity\r\n .trace(\r\n `Fluctuationlog: ${JSON.stringify(logObject)}`,\r\n `${action}${this.fromScenario}`\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { replaceCurly } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { FluctuationUrlService } from '../fluctuation-url-service';\r\n\r\nexport class DetailContainer extends React.PureComponent {\r\n getUrl = (detail) => {\r\n const urlService = new FluctuationUrlService(this.props.deps.azure);\r\n const nestUrlCapableIds = ['KeywordTab', 'AdGroupSettingsTab', 'CampaignSettingsTab'];\r\n const context = _.contains(nestUrlCapableIds, detail.UrlId) ?\r\n _.extend(this.props.context, {\r\n CampaignId: detail.Values[0],\r\n AdGroupId: detail.Values[1],\r\n UserId: this.props.deps.context.CurrentUser.Id,\r\n }) :\r\n this.props.context;\r\n return replaceCurly(\r\n urlService.getUrl(this.props.details[0].UrlId),\r\n context,\r\n detail.Values\r\n );\r\n };\r\n\r\n render() {\r\n const detailsDom = this.props.details.map((detail, index) => {\r\n const nestUrlCapableIds = ['AdGroupTab', 'KeywordTab', 'AdGroupSettingsTab', 'CampaignSettingsTab'];\r\n if (_.contains(nestUrlCapableIds, detail.UrlId)) {\r\n const linkUrl = this.getUrl(detail);\r\n const onClickObj = _.extend(detail, {\r\n linkUrl,\r\n });\r\n const localizedDisplayName = this.props.deps.i18n.getString(detail.DisplayName) ||\r\n detail.DisplayName;\r\n /* eslint-disable jsx-a11y/click-events-have-key-events,\r\n jsx-a11y/no-static-element-interactions */\r\n /* eslint-disable react/no-array-index-key */\r\n return (\r\n { this.props.onLinkClicked(onClickObj); }}\r\n >\r\n {localizedDisplayName}\r\n \r\n );\r\n }\r\n /* eslint-disable react/no-array-index-key */\r\n return
{detail.Values[0]}
;\r\n });\r\n return (\r\n
\r\n
\r\n {`${this.props.expandedEntityName}:`}\r\n
\r\n
\r\n {detailsDom}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nDetailContainer.propTypes = {\r\n deps: PropTypes.shape({\r\n context: PropTypes.shape({\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n userActionActivity: PropTypes.shape({\r\n trace: PropTypes.func,\r\n }).isRequired,\r\n azure: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n onLinkClicked: PropTypes.func.isRequired,\r\n cause: PropTypes.shape({\r\n Message: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n }).isRequired,\r\n }).isRequired,\r\n context: PropTypes.shape({\r\n CustomerId: PropTypes.number,\r\n AccountId: PropTypes.number,\r\n CampaignId: PropTypes.number,\r\n AdGroupId: PropTypes.number,\r\n }).isRequired,\r\n details: PropTypes.arrayOf(PropTypes.shape({\r\n RootCauseId: PropTypes.number,\r\n UrlId: PropTypes.string,\r\n Type: PropTypes.string,\r\n Message: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }),\r\n })).isRequired,\r\n expandedEntityName: PropTypes.string.isRequired,\r\n};\r\n","/* eslint-disable react/no-danger */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { replaceCurly } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { FluctuationUrlService } from '../fluctuation-url-service';\r\nimport { FluctuationLogService } from '../fluctuation-log-service';\r\nimport { DetailContainer } from './DetailContainer';\r\n\r\nexport class ActionContainer extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n const { expandedEntityName = '', entityDetails = [] } = props.defaultEntityDetails || {};\r\n this.state = {\r\n entityDetails,\r\n expandedEntityName,\r\n };\r\n this.logService = new FluctuationLogService(props.fromScenario);\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.page !== this.props.page) {\r\n this.resetDetails();\r\n }\r\n }\r\n\r\n resetDetails = () => {\r\n this.setState({\r\n entityDetails: [],\r\n expandedEntityName: '',\r\n }, () => {\r\n this.props.onDetailContainerShow({\r\n expandedEntityName: '',\r\n entityDetails: [],\r\n });\r\n });\r\n };\r\n\r\n replaceAll = (str, search, replacement) => str.replace(new RegExp(search, 'g'), replacement);\r\n\r\n generateHtmlUrl = (param, isHtml) => {\r\n const urlService = new FluctuationUrlService(this.props.deps);\r\n let url = urlService.getUrl(param.UrlId);\r\n\r\n if (!url) {\r\n this.props.deps.userActionActivity.error(`Url Map Not registered! UrlId: ${param.UrlId}`, 'FluctuationError');\r\n return null;\r\n }\r\n\r\n url = this.replaceAll(url, '{aid}', this.props.context.AccountId);\r\n url = this.replaceAll(url, '{cid}', this.props.context.CustomerId);\r\n url = this.replaceAll(url, '{uid}', this.props.deps.context.CurrentUser.Id);\r\n url = this.replaceAll(url, '{cmpid}', this.props.context.CampaignId);\r\n url = this.replaceAll(url, '{adgid}', this.props.context.AdGroupId);\r\n\r\n let completeUrl;\r\n const helpLinksActions = ['InvoiceAccountPausedActionHelperId', 'InvoiceAccountOnHoldActionHelperId',\r\n 'PrepayAccountPausedActionHelperId', 'ThresholdAccountOnHoldActionHelperId'];\r\n\r\n // learnmore links handle in the if statement\r\n if (helpLinksActions.indexOf(param.UrlId) > -1) {\r\n const learnmoreLink = urlService.getUrl('learnmoreLink');\r\n completeUrl = replaceCurly(\r\n learnmoreLink,\r\n this.props.deps.context,\r\n urlService.getUrl(param.UrlId)\r\n );\r\n } else {\r\n completeUrl = replaceCurly(url, this.props.deps.context, param.Values);\r\n }\r\n\r\n this.props.deps.userActionActivity.trace(`Url generated: ${url}: ${JSON.stringify(this.props.fluctuation.UniqueId)}`, 'FluctuationAction');\r\n\r\n if (_.isArray(param.EntityScope) && _.size(param.EntityScope) === 2) {\r\n if (param.EntityScope[0] === 'Campaign') {\r\n completeUrl = `${completeUrl}&campaignId=${param.EntityScope[1]}`;\r\n }\r\n }\r\n\r\n const localizedDisplayName = this.props.deps.i18n.getString(param.DisplayName) ||\r\n param.DisplayName;\r\n return isHtml ? completeUrl : `${localizedDisplayName}`;\r\n };\r\n\r\n generateHtmlString = (message) => {\r\n const msgStr = this.props.deps.i18n.getString(message.MessageId);\r\n const substitutes = [];\r\n message.Parameters.forEach((param) => {\r\n if (param.Type === 'Url') {\r\n substitutes.push(this.generateHtmlUrl(param, msgStr.indexOf('href') > -1));\r\n }\r\n });\r\n\r\n return replaceCurly(msgStr, null, substitutes);\r\n };\r\n\r\n flatMap = (arr, fn) => {\r\n let result = [];\r\n arr.forEach((item) => {\r\n const mapping = fn(item);\r\n result = result.concat(mapping);\r\n });\r\n return result;\r\n };\r\n\r\n generateCause = (cause) => {\r\n const messageId = cause.Message.Parameters.length > 0 &&\r\n cause.Message.Parameters[0].Type === 'String' &&\r\n cause.Message.Parameters[0].Values[0] === '1' ?\r\n `${cause.Message.MessageId}Singular` :\r\n cause.Message.MessageId;\r\n\r\n // fall back to original message id in case singular string does not exist\r\n const tempMessage = this.props.deps.i18n.getString(messageId) ||\r\n this.props.deps.i18n.getString(cause.Message.MessageId);\r\n if (tempMessage.indexOf('{0}') > -1) {\r\n const paramArray = _.map(cause.Message.Parameters, (param, index) => {\r\n if (param.Type === 'String') {\r\n const nextParam = cause.Message.Parameters[index + 1];\r\n return nextParam && nextParam.Type === 'NestUrl' ? '' : param.Values[0];\r\n }\r\n if (param.Type === 'Url') {\r\n return this.generateHtmlUrl(param);\r\n }\r\n if (param.Type === 'NestUrl') {\r\n return this.generateEntityCause({ ...param, messageId: cause.Message.MessageId, key: index });\r\n }\r\n return null;\r\n });\r\n\r\n const finalStr = replaceCurly(\r\n tempMessage,\r\n null,\r\n paramArray\r\n );\r\n const pattern = /{\\d+}/;\r\n const regexp = new RegExp(pattern);\r\n\r\n // This if path is only for entity collapsing/expanding root cause\r\n if (regexp.test(finalStr)) {\r\n // 1. find object type from param array\r\n const domIndex = _.findIndex(paramArray, par => typeof (par) === 'object');\r\n const flattenedFinalStr = this.flatMap(finalStr.split(pattern), part =>\r\n [part, this.generateEntityCause({\r\n ...cause.Message.Parameters[domIndex],\r\n messageId: cause.Message.MessageId,\r\n key: part,\r\n })]);\r\n flattenedFinalStr.pop();\r\n return flattenedFinalStr;\r\n }\r\n return finalStr;\r\n }\r\n return tempMessage;\r\n };\r\n\r\n generateEntityCause = param =>\r\n (\r\n
\r\n {this.generateSingleEntity(param)}\r\n
\r\n );\r\n\r\n generateSingleEntity = entity => (\r\n {\r\n this.setState({\r\n entityDetails: this.state.entityDetails.length > 0 ? [] : entity.SubParameters,\r\n expandedEntityName: this.props.deps.i18n.getString(entity.Count === 1 ?\r\n entity.DisplayNameId :\r\n `${entity.DisplayNameId}Plural`),\r\n }, () => {\r\n this.props.onDetailContainerShow({\r\n expandedEntityName: this.state.expandedEntityName,\r\n entityDetails: this.state.entityDetails,\r\n });\r\n\r\n if (this.state.entityDetails.length > 0) {\r\n this.logService.logContext(\r\n this.props.fluctuation,\r\n this.props.date,\r\n 'FluxAction',\r\n this.props.deps.context.CurrentUser.Id,\r\n this.props.deps.context.CurrentUser.IsInternal,\r\n this.props.deps.userActionActivity,\r\n 'FluctuationAction',\r\n {\r\n cause: entity.messageId,\r\n expandedEntityName: this.state.expandedEntityName,\r\n details: this.state.entityDetails,\r\n }\r\n );\r\n const action = `FluctuationAction${_.isEmpty(this.props.fromScenario) ? '' : `_${this.props.fromScenario}`}`;\r\n this.props.deps.userActionActivity.trace(\r\n JSON.stringify(`Expanded entity name: ${this.state.expandedEntityName},\r\n Expanded entities: ${JSON.stringify(this.state.entityDetails)}`),\r\n action\r\n );\r\n }\r\n });\r\n }}\r\n >\r\n {`${entity.Count} ${this.props.deps.i18n.getString(entity.Count === 1 ?\r\n entity.DisplayNameId :\r\n `${entity.DisplayNameId}Plural`)\r\n }`}\r\n \r\n );\r\n\r\n generateDetailContainer = (cause) => {\r\n if (this.state.entityDetails && this.state.entityDetails.length > 0) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n logUserAction = (action) => {\r\n /* istanbul ignore else */\r\n if (action) {\r\n this.logService.logContext(\r\n this.props.fluctuation,\r\n this.props.date,\r\n 'FluxAction',\r\n this.props.deps.context.CurrentUser.Id,\r\n this.props.deps.context.CurrentUser.IsInternal,\r\n this.props.deps.userActionActivity,\r\n 'FluctuationAction',\r\n {\r\n action,\r\n }\r\n );\r\n }\r\n };\r\n\r\n renderActionItem = action => (action.Message.MessageId ? (\r\n /* eslint-disable jsx-a11y/click-events-have-key-events,\r\n jsx-a11y/no-static-element-interactions */\r\n { this.logUserAction(action); }}\r\n dangerouslySetInnerHTML={\r\n {\r\n __html: this.generateHtmlString(action.Message),\r\n }\r\n }\r\n />\r\n ) : null);\r\n\r\n render() {\r\n const causesList = this.props.fluctuation.RootCauses.map((cause) => {\r\n const formattedCause = this.generateCause(cause);\r\n if (Array.isArray(formattedCause)) {\r\n const formattedDom = formattedCause.map((c) => {\r\n if (typeof (c) === 'string') {\r\n /* eslint-disable jsx-a11y/click-events-have-key-events,\r\n jsx-a11y/no-static-element-interactions */\r\n return ( { this.logUserAction(cause); }}\r\n dangerouslySetInnerHTML={\r\n {\r\n __html: c,\r\n }\r\n }\r\n />);\r\n }\r\n return (
{ c }
);\r\n });\r\n\r\n return (\r\n \r\n {formattedDom}\r\n {this.generateDetailContainer(cause)}\r\n \r\n );\r\n }\r\n return ( { this.logUserAction(cause); }}\r\n dangerouslySetInnerHTML={\r\n {\r\n __html: this.generateCause(cause),\r\n }\r\n }\r\n />);\r\n });\r\n\r\n let actionsList = this.props.fluctuation.Actions.map((action) => {\r\n const actionBundle = _.chain(action.Messages)\r\n .map(message => this.renderActionItem({ Message: message }))\r\n .compact()\r\n .value();\r\n\r\n if (!_.isEmpty(actionBundle)) {\r\n return actionBundle;\r\n }\r\n\r\n if (!_.isEmpty(action.Message) && !_.isEmpty(action.Message.MessageId)) {\r\n return this.renderActionItem(action);\r\n }\r\n return null;\r\n });\r\n\r\n actionsList = _.compact(_.flatten(actionsList));\r\n\r\n const causeContainer = this.props.fluctuation.RootCauses.length > 0 ? (\r\n
\r\n {this.props.deps.i18n.getString('Fluctuation_RootCause')}\r\n
) : null;\r\n\r\n const actionContainer = _.isEmpty(actionsList) ? null : (\r\n
\r\n {this.props.deps.i18n.getString('Fluctuation_Actions')}\r\n
);\r\n\r\n // setting inner html as part of payload is coming in as html string\r\n return (\r\n
\r\n {causeContainer}\r\n {causesList}\r\n {actionContainer}\r\n {actionsList}\r\n
\r\n );\r\n }\r\n}\r\n\r\nActionContainer.propTypes = {\r\n page: PropTypes.number.isRequired,\r\n fluctuation: PropTypes.shape({\r\n UniqueId: PropTypes.string,\r\n RootCauses: PropTypes.arrayOf(PropTypes.shape({\r\n RootCauseId: PropTypes.number,\r\n Message: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n Parameters: PropTypes.arrayOf(PropTypes.shape({\r\n DisplayName: PropTypes.string,\r\n DisplayNameId: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n Type: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n SubParameters: PropTypes.arrayOf(PropTypes.shape({\r\n DisplayName: PropTypes.string,\r\n DisplayNameId: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n Type: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n })),\r\n }),\r\n })).isRequired,\r\n Actions: PropTypes.arrayOf(PropTypes.shape({\r\n ActionId: PropTypes.number,\r\n Message: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n Parameters: PropTypes.arrayOf(PropTypes.shape({\r\n Type: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n DisplayName: PropTypes.string,\r\n DisplayNameId: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }),\r\n })).isRequired,\r\n }).isRequired,\r\n context: PropTypes.shape({\r\n CustomerId: PropTypes.number,\r\n AccountId: PropTypes.number,\r\n CampaignId: PropTypes.number,\r\n AdGroupId: PropTypes.number,\r\n }).isRequired,\r\n date: PropTypes.string.isRequired,\r\n deps: PropTypes.shape({\r\n userActionActivity: PropTypes.shape({\r\n trace: PropTypes.func,\r\n error: PropTypes.func,\r\n }),\r\n context: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n }).isRequired,\r\n defaultEntityDetails: PropTypes.shape({\r\n expandedEntityName: PropTypes.string,\r\n entityDetails: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n onDetailContainerShow: PropTypes.func,\r\n fromScenario: PropTypes.string,\r\n};\r\n\r\nActionContainer.defaultProps = {\r\n onDetailContainerShow: _.noop,\r\n defaultEntityDetails: {},\r\n fromScenario: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { replaceCurly } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { FluctuationUrlService } from '../fluctuation-url-service';\r\n\r\nexport const ViewAllContainer = (props) => {\r\n const { deps } = props;\r\n const urlService = new FluctuationUrlService(deps);\r\n const allCampaignsUrl = replaceCurly(\r\n urlService.allCampaignsUrl,\r\n {\r\n CustomerId: deps.context.CurrentCustomer.Id,\r\n AccountId: deps.context.CurrentAccount.Id,\r\n ...deps.context,\r\n }\r\n );\r\n const onButtonClick = () => deps.context.scope.save(allCampaignsUrl);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nViewAllContainer.propTypes = {\r\n deps: PropTypes.shape({\r\n context: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n scope: PropTypes.shape({\r\n save: PropTypes.func,\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { replaceCurly } from '@bingads-webui-campaign/fluctuation-common';\r\n\r\nexport const generateDescription = ({ description, deps }) => {\r\n const { context, i18n } = deps;\r\n const tempMessage = i18n.getString(description.MessageId);\r\n if (tempMessage.indexOf('{0}') > -1) {\r\n return replaceCurly(\r\n i18n.getString(description.MessageId),\r\n context,\r\n description.Parameters[0].Values[0]\r\n );\r\n }\r\n return tempMessage;\r\n};\r\n\r\n// Flatten [{ Date, FluctuationsPerDate[] }...] to [{ Date, Fluctuation }...]\r\nexport const flattenFluctuationsDict = (dateFluxMap) => {\r\n let flattenedDateFlux = [];\r\n\r\n const descSortedDateFluxMap = _.sortBy(\r\n dateFluxMap,\r\n unsortedDateFluxMap =>\r\n unsortedDateFluxMap.Date && (new Date(unsortedDateFluxMap.Date)).getTime()\r\n ).reverse();\r\n\r\n descSortedDateFluxMap.forEach((dateFluxPair) => {\r\n const { Date, FluctuationsPerDate = [] } = dateFluxPair || {};\r\n FluctuationsPerDate.forEach((Fluctuation) => {\r\n flattenedDateFlux = [\r\n ...flattenedDateFlux,\r\n {\r\n Date,\r\n Fluctuation,\r\n },\r\n ];\r\n });\r\n });\r\n\r\n return flattenedDateFlux;\r\n};\r\n\r\nexport const getFluctuationMetricUtil = (flucType) => {\r\n switch (flucType) {\r\n case 1:\r\n // Impressions\r\n return 5;\r\n case 2:\r\n // Clicks\r\n return 1;\r\n case 3:\r\n // Spent\r\n return 6;\r\n case 4:\r\n // Conv\r\n return 3;\r\n default:\r\n return null;\r\n }\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Popover } from '@bingads-webui-react/popover';\r\nimport { FluctuationService } from '@bingads-webui-campaign/fluctuation-service';\r\nimport { ExpLoggerFactory } from '@bingads-webui/experiment-logger';\r\nimport { Loading } from '@bingads-webui-react/loading';\r\nimport { MetricCounter, DescriptionContainer, CalloutWithAutoPlacement, InsightAction, ActionSubPanel } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\nimport { instrumentationSchema } from './fluctuation-instr-schema';\r\nimport { Pagination } from './common/pagination';\r\nimport { ActionContainer } from './fluctuation-action/ActionContainer';\r\nimport { FluctuationLogService } from './fluctuation-log-service';\r\nimport { MinFluctuationsCountToShowAllInsightsButton, FluctuationGranularity, FluctuationType } from './common/constants';\r\nimport { ViewAllContainer } from './fluctuation-action/ViewAllContainer';\r\nimport { generateDescription, flattenFluctuationsDict, getFluctuationMetricUtil } from './common/utils';\r\n\r\nconst AB_TEST_NAME = 'AB_FluctuationBulb';\r\n\r\nexport class FluctuationPopup extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n const {\r\n deps, page, fluctuation: dateFluxMap, fromScenario, perfMarker,\r\n } = this.props;\r\n\r\n if (perfMarker) {\r\n this.perfMarker = perfMarker.createChild('Fluctuation_Popup');\r\n this.perfMarker.willInit();\r\n }\r\n\r\n const isDateRange = _.isArray(dateFluxMap);\r\n const flattenedDateFlux = isDateRange ?\r\n flattenFluctuationsDict(dateFluxMap) :\r\n flattenFluctuationsDict([dateFluxMap]);\r\n\r\n this.state = {\r\n showFluctuation: true,\r\n page: flattenedDateFlux[page] ? page : 0,\r\n dateFluctuations: flattenedDateFlux,\r\n totalPages: flattenedDateFlux.length,\r\n isLoading: _.isEmpty(flattenedDateFlux),\r\n currentSubPanel: ActionSubPanel.None,\r\n expandedEntityName: '',\r\n entityDetails: [],\r\n popupOpened: false,\r\n };\r\n this.initializeInstrumentation();\r\n this.logService = new FluctuationLogService(fromScenario);\r\n this.fromScenario = fromScenario;\r\n this.expLogger = ExpLoggerFactory.createLogger(AB_TEST_NAME);\r\n this.bulbColor = 'Yellow';\r\n this.token = deps.token || deps.context.Token;\r\n }\r\n\r\n componentDidMount() {\r\n const { withoutOpporCheck } = this.props;\r\n const { isLoading } = this.state;\r\n\r\n if (isLoading && !withoutOpporCheck) {\r\n this.fetchData();\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { withoutOpporCheck, fluctuation } = this.props;\r\n\r\n if (withoutOpporCheck && this.state.popupOpened && !prevState.popupOpened) {\r\n this.fetchData();\r\n }\r\n\r\n if (_.isEmpty(prevProps.fluctuation) && !_.isEmpty(fluctuation)) {\r\n // eslint-disable-next-line react/no-did-update-set-state\r\n this.setState({\r\n dateFluctuations: flattenFluctuationsDict([fluctuation]),\r\n isLoading: false,\r\n });\r\n }\r\n if (this.perfMarker) {\r\n this.perfMarker.done();\r\n }\r\n }\r\n\r\n getFluctuation = () => this.state.dateFluctuations[this.state.page].Fluctuation;\r\n\r\n getDate = page => this.state.dateFluctuations[page].Date;\r\n\r\n getFluctuationMetric = (flucType) => {\r\n const metric = getFluctuationMetricUtil(flucType);\r\n if (metric === null) {\r\n this.activities.userActionActivity\r\n .error(\r\n `Invalid Fluctuation Type: ${flucType}`,\r\n 'FluctuationError'\r\n );\r\n }\r\n return metric;\r\n };\r\n\r\n fetchData() {\r\n if (this.perfMarker) this.perfMarker.willFetchData();\r\n const {\r\n deps: { context, appConfig },\r\n asyncLoadFluctuationConfig: { dateRange, fluctuationTypeIds },\r\n updateFlucData,\r\n updateLoadingStatus,\r\n } = this.props;\r\n if (updateLoadingStatus) {\r\n updateLoadingStatus(true);\r\n }\r\n const flucServiceIns = new FluctuationService({\r\n token: this.token,\r\n options: {\r\n userId: context.CurrentUser.Id,\r\n customerId: context.CurrentCustomer.Id,\r\n campaignId: context.CurrentCampaign &&\r\n context.CurrentCampaign.Id,\r\n accountId: context.CurrentAccount.Id,\r\n granularity: FluctuationGranularity.Day,\r\n startDate: this.formatDateString(dateRange.startDate),\r\n endDate: this.formatDateString(dateRange.endDate),\r\n surfacingChannelId: context.CurrentTabId === 'Campaigns' ? 1 : '',\r\n // TODO: confirm whether isFluctuationsExperiementEnabled is GAed\r\n isFluctuationsExperiementEnabled: context.isFluctuationsExperiementEnabled,\r\n host: appConfig && appConfig.get ? appConfig.get('BingAdsAdInsightWebApiUri') : undefined,\r\n },\r\n });\r\n flucServiceIns.findAll()\r\n .then((successResponse) => {\r\n if (updateFlucData) {\r\n updateFlucData(successResponse);\r\n\r\n if (updateLoadingStatus) {\r\n updateLoadingStatus(false);\r\n }\r\n } else {\r\n const unfilteredDateFlux = flattenFluctuationsDict(successResponse);\r\n const filteredDateFlux = _.filter(\r\n unfilteredDateFlux,\r\n dateFlux => _.contains(\r\n fluctuationTypeIds,\r\n FluctuationType[dateFlux.Fluctuation.FluctuationType]\r\n )\r\n );\r\n\r\n /* istanbul ignore else */\r\n if (_.isEmpty(filteredDateFlux)) {\r\n this.activities.userActionActivity\r\n .error(\r\n `Load empty fluctuaion: cid: ${context.CurrentCustomer.Id}, aid: ${context.CurrentAccount.Id}, campaignId: ${context.CurrentCampaign &&\r\n context.CurrentCampaign.Id}, fluc type: ${fluctuationTypeIds.toString()}`,\r\n 'LoadFluctuationError'\r\n );\r\n }\r\n\r\n this.setState({\r\n dateFluctuations: filteredDateFlux,\r\n totalPages: filteredDateFlux.length,\r\n isLoading: false,\r\n });\r\n }\r\n }, (errorResponse) => {\r\n this.activities.userActionActivity\r\n .error(\r\n `Fail to load Fluctuations: ${JSON.stringify(errorResponse)}`,\r\n 'LoadFluctuationError'\r\n );\r\n this.setState({ isLoading: false });\r\n });\r\n }\r\n\r\n triggerOnOpen = (page) => {\r\n if (!_.isEmpty(this.state.dateFluctuations)) {\r\n const action = `[date] ${this.getDate(page)} [action] Open ${this.bulbColor}`;\r\n this.expLogger.log(action, this.flight);\r\n\r\n if (this.props.onFlucOpen) {\r\n const currentFluctuationType = this.getFluctuation().FluctuationType;\r\n this.props.onFlucOpen(\r\n this.getFluctuationMetric(currentFluctuationType),\r\n this.getFluctuation().UniqueId\r\n );\r\n }\r\n }\r\n };\r\n\r\n resetState = () => {\r\n this.setState({\r\n page: 0,\r\n showFluctuation: true,\r\n popupOpened: true,\r\n });\r\n this.triggerOnOpen(0);\r\n if (!_.isEmpty(this.state.dateFluctuations)) {\r\n this.logService.logContext(\r\n this.getFluctuation(),\r\n this.getDate(this.state.page),\r\n 'FluxClick',\r\n this.props.deps.context.CurrentUser.Id,\r\n this.props.deps.context.CurrentUser.IsInternal,\r\n this.activities.userActionActivity,\r\n 'FluctuationAction'\r\n );\r\n this.activities.userActionActivity\r\n .trace(\r\n `Fluctuation popup opened: Date: ${this.getDate(this.state.page)},\r\n FlucId: ${this.getFluctuation().UniqueId}`,\r\n 'FluctuationAction'\r\n );\r\n }\r\n };\r\n\r\n closeFluctuation = () => {\r\n this.setState({\r\n showFluctuation: false,\r\n });\r\n this.activities.userActionActivity\r\n .trace(\r\n `Fluctuation popup closed: Date: ${this.getDate(this.state.page)}:\r\n Fluctuation Unique ID: ${this.getFluctuation().UniqueId}`,\r\n 'FluctuationAction'\r\n );\r\n this.props.onClose();\r\n };\r\n\r\n formatDateString(dateStr) {\r\n const leftPadding = s => ((s.length === 1) ? `0${s}` : s);\r\n const dt = new Date(Date.parse(dateStr));\r\n const year = `${dt.getFullYear()}`;\r\n const month = `${dt.getMonth() + 1}`;\r\n const day = `${dt.getDate()}`;\r\n\r\n return `${year}-${leftPadding(month)}-${leftPadding(day)}`;\r\n }\r\n\r\n selectPage = (page) => {\r\n // should reset currentSubPanel and currentEntityDetails to initialize new page\r\n this.setState({\r\n page,\r\n currentSubPanel: ActionSubPanel.None,\r\n expandedEntityName: '',\r\n entityDetails: [],\r\n });\r\n this.triggerOnOpen(page);\r\n };\r\n\r\n initializeInstrumentation = () => {\r\n this.props.deps.instrumentation.addScenario(instrumentationSchema);\r\n\r\n const fluctuationScenario = this.props.deps.instrumentation.fluctuation.create();\r\n this.activities = {\r\n feedbackActivity: fluctuationScenario.fluctuationFeedback.create(),\r\n userActionActivity: fluctuationScenario.userAction.create(),\r\n dismissActivity: fluctuationScenario.fluctuationDismiss.create(),\r\n };\r\n };\r\n\r\n submitLog = (log) => {\r\n const { appConfig, context } = this.props.deps;\r\n const currentFluctuation = this.getFluctuation();\r\n const currentDate = this.getDate(this.state.page);\r\n const fluctuationData = {\r\n Comment: log.comment,\r\n Feedbacks: log.type === ActionSubPanel.FeedbackPanel && log.feedbacks ?\r\n log.feedbacks.map((item) => {\r\n if (item === '0') {\r\n return 'FluctuationIsGood';\r\n } else if (item === '1') {\r\n return 'ReasonIsIncorrect';\r\n }\r\n return 'ActionIsNotHelpful';\r\n }) : [],\r\n DismissFeedbacks: log.type === ActionSubPanel.DismissPanel && log.feedbacks ?\r\n log.feedbacks.map((item) => {\r\n if (item === '0') {\r\n return 'KnowTheCause';\r\n } else if (item === '1') {\r\n return 'FollowedUpAlready';\r\n }\r\n return 'JustWantToRemove';\r\n }) : [],\r\n };\r\n\r\n if (log.type === ActionSubPanel.DismissPanel) {\r\n this.logService.logContext(\r\n this.getFluctuation(),\r\n currentDate,\r\n 'FluxDismiss',\r\n context.CurrentUser.Id,\r\n context.CurrentUser.IsInternal,\r\n this.activities.userActionActivity,\r\n 'FluctuationDismiss',\r\n fluctuationData\r\n );\r\n\r\n // post dismiss request to MT\r\n const flucServiceIns = new FluctuationService({\r\n token: this.token,\r\n options: {\r\n userId: context.CurrentUser.Id,\r\n customerId: context.CurrentCustomer.Id,\r\n campaignId: context.CurrentCampaign &&\r\n context.CurrentCampaign.Id,\r\n accountId: context.CurrentAccount.Id,\r\n uniqueId: currentFluctuation.UniqueId,\r\n datetime: currentDate,\r\n host: appConfig && appConfig.get ? appConfig.get('BingAdsAdInsightWebApiUri') : undefined,\r\n },\r\n });\r\n\r\n const { dateFluctuations } = this.state;\r\n const actingFluctuation = dateFluctuations.slice(); // protective clone\r\n actingFluctuation.splice(this.state.page, 1);\r\n\r\n flucServiceIns.postFeedback().then(() => {\r\n this.props.onFlucDismiss({\r\n date: currentDate,\r\n fluctuation: currentFluctuation,\r\n isLastFluc: this.state.totalPages === 1,\r\n });\r\n this.setState({\r\n totalPages: this.state.totalPages - 1,\r\n dateFluctuations: actingFluctuation,\r\n page: this.state.page < actingFluctuation.length ?\r\n this.state.page :\r\n this.state.page - 1,\r\n });\r\n }, (errorResponse) => {\r\n this.activities.userActionActivity\r\n .error(\r\n `Fail to dismiss Fluctuations: ${JSON.stringify(errorResponse)}`,\r\n 'DismissFluctuationError'\r\n );\r\n });\r\n } else {\r\n this.logService.logContext(\r\n currentFluctuation,\r\n currentDate,\r\n 'FluxFeedback',\r\n context.CurrentUser.Id,\r\n context.CurrentUser.IsInternal,\r\n this.activities.userActionActivity,\r\n 'FluctuationFeedback',\r\n fluctuationData\r\n );\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n canViewAllInsights, deps, metrics,\r\n triggerButton, isOpen, onDismiss, isReactNodeTriggerButton, withoutOpporCheck, withPopoverAdapter,\r\n } = this.props;\r\n const fluxLength = this.state.dateFluctuations.length;\r\n\r\n if (!this.state.isLoading && fluxLength === 0) {\r\n return null;\r\n }\r\n const currentFluctuation = !this.state.isLoading && this.getFluctuation();\r\n const shouldShowViewAllButton = canViewAllInsights\r\n && fluxLength >= MinFluctuationsCountToShowAllInsightsButton;\r\n const closeButtonClass = 'iconba iconba-Cancel';\r\n const closeButton = isReactNodeTriggerButton && this.state.showFluctuation ? (\r\n /* eslint-disable jsx-a11y/click-events-have-key-events,\r\n jsx-a11y/no-static-element-interactions */\r\n \r\n ) :\r\n null;\r\n const viewAllContainer = shouldShowViewAllButton ? () : null;\r\n const pagination = this.state.totalPages > 1 ? () : null;\r\n const PopoverAdapter = isReactNodeTriggerButton ? Popover : CalloutWithAutoPlacement;\r\n const Wrapper = withPopoverAdapter ? PopoverAdapter : React.Fragment;\r\n\r\n if (!this.state.isLoading && this.state.showFluctuation) {\r\n const action = `[date] ${this.getDate(this.state.page)} [action] Show ${this.bulbColor}`;\r\n this.expLogger.log(action, this.flight);\r\n }\r\n\r\n const metricWithInsightAsDefault = _.map(metrics, metric => ({ line: 'iconba iconba-Insights', ...metric }));\r\n const detailEntityUniqueId = `${this.state.expandedEntityName}-${(this.state.entityDetails || []).length}`;\r\n const calloutKey = `${currentFluctuation && (currentFluctuation || {}).UniqueId}-${this.state.currentSubPanel}-${detailEntityUniqueId}`;\r\n\r\n return (\r\n to solve arrow position issue\r\n calloutKey={calloutKey}\r\n trigger=\"click\"\r\n target={triggerButton}\r\n placement=\"auto\"\r\n isOpen={isOpen}\r\n onOpen={this.resetState}\r\n onDismiss={onDismiss}\r\n customKeepOpen={({ target }) => target.className === 'link-text'}\r\n keepTargetPropagation\r\n >\r\n {\r\n (this.state.isLoading && !withoutOpporCheck) ?\r\n
:\r\n
{this.state.isLoading ? null : (\r\n \r\n
\r\n
\r\n {deps.i18n.formatDate(new Date(this.getDate(this.state.page)), { skeleton: 'yMEd' })}\r\n
\r\n \r\n {closeButton}\r\n
\r\n \r\n \r\n this.setState({ expandedEntityName, entityDetails })\r\n }\r\n fromScenario={this.fromScenario}\r\n />\r\n
\r\n this.setState({ currentSubPanel })}\r\n />\r\n
\r\n {viewAllContainer}\r\n {pagination}\r\n
)}\r\n
\r\n }\r\n \r\n );\r\n }\r\n}\r\n\r\nconst Fluctuation = PropTypes.shape({\r\n Date: PropTypes.string,\r\n FluctuationsPerDate: PropTypes.arrayOf(PropTypes.shape({\r\n Description: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n Parameters: PropTypes.arrayOf(PropTypes.shape({\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }),\r\n Actions: PropTypes.arrayOf(PropTypes.shape({\r\n ActionId: PropTypes.number,\r\n Message: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n Parameters: PropTypes.arrayOf(PropTypes.shape({\r\n Type: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n DisplayName: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }),\r\n })),\r\n RootCauses: PropTypes.arrayOf(PropTypes.shape({\r\n RootCauseId: PropTypes.number,\r\n Message: PropTypes.shape({\r\n MessageId: PropTypes.string,\r\n Parameters: PropTypes.arrayOf(PropTypes.shape({\r\n DisplayName: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n Type: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n SubParameters: PropTypes.arrayOf(PropTypes.shape({\r\n DisplayName: PropTypes.string,\r\n UrlId: PropTypes.string,\r\n Type: PropTypes.string,\r\n Values: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n })),\r\n }),\r\n })),\r\n length: PropTypes.number,\r\n })),\r\n});\r\n\r\nFluctuationPopup.propTypes = {\r\n deps: PropTypes.shape({\r\n token: PropTypes.string,\r\n imagePath: PropTypes.string,\r\n /* To get correct CI environment host name and port for FluctuationService */\r\n appConfig: PropTypes.shape({\r\n get: PropTypes.func,\r\n }),\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n fluctuation: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatDate: PropTypes.func,\r\n }).isRequired,\r\n context: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n scope: PropTypes.shape({\r\n save: PropTypes.func,\r\n }),\r\n Token: PropTypes.string,\r\n CurrentTabId: PropTypes.string,\r\n isFluctuationsExperiementEnabled: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n metrics: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n value: PropTypes.string,\r\n line: PropTypes.string,\r\n color: PropTypes.string,\r\n })).isRequired,\r\n page: PropTypes.number,\r\n isOpen: PropTypes.bool,\r\n onFlucOpen: PropTypes.func,\r\n onDismiss: PropTypes.func,\r\n onFlucDismiss: PropTypes.func,\r\n onClose: PropTypes.func,\r\n fluctuation: PropTypes.oneOfType([\r\n Fluctuation,\r\n PropTypes.arrayOf(Fluctuation),\r\n ]),\r\n isReactNodeTriggerButton: PropTypes.bool,\r\n triggerButton: PropTypes.oneOfType([\r\n PropTypes.instanceOf(Element),\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n canViewAllInsights: PropTypes.bool,\r\n asyncLoadFluctuationConfig: PropTypes.shape({\r\n dateRange: PropTypes.shape({\r\n startDate: PropTypes.instanceOf(Date).isRequired,\r\n endDate: PropTypes.instanceOf(Date).isRequired,\r\n }),\r\n fluctuationTypeIds: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n fromScenario: PropTypes.string,\r\n withoutOpporCheck: PropTypes.bool,\r\n updateFlucData: PropTypes.func,\r\n updateLoadingStatus: PropTypes.func,\r\n perfMarker: perfMarkerPropTypes.isRequired,\r\n withPopoverAdapter: PropTypes.bool,\r\n};\r\n\r\nFluctuationPopup.defaultProps = {\r\n onFlucOpen: () => { },\r\n onDismiss: () => { },\r\n onFlucDismiss: () => { },\r\n onClose: () => { },\r\n page: 0,\r\n isOpen: false,\r\n canViewAllInsights: false,\r\n isReactNodeTriggerButton: true,\r\n asyncLoadFluctuationConfig: {},\r\n fluctuation: {},\r\n fromScenario: '',\r\n withoutOpporCheck: false,\r\n updateFlucData: undefined,\r\n updateLoadingStatus: undefined,\r\n withPopoverAdapter: true,\r\n};\r\n\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withLock, keyVault } from '@bingads-webui-react/popup-manager';\r\nimport { FluctuationPopup } from './fluctuation-popup';\r\nimport { instrumentationSchema } from './fluctuation-instr-schema';\r\n\r\nexport function createElementBasedFluctuationPopupFactory(props, placeholderElement) {\r\n const {\r\n onDismiss,\r\n triggerButton,\r\n deps,\r\n asyncLoadFluctuationConfig,\r\n fromScenario,\r\n metrics,\r\n getFluctuationPopupStyles,\r\n } = props;\r\n\r\n deps.instrumentation.addScenario(instrumentationSchema);\r\n const fluctuationScenario = deps.instrumentation.fluctuation.create();\r\n const activities = {\r\n userActionActivity: fluctuationScenario.userAction.create(),\r\n };\r\n\r\n const { context } = deps;\r\n /* istanbul ignore next */\r\n const calloutKey = `${context.CurrentAccount.Id} ${context.CurrentCampaign && context.CurrentCampaign.Id} ${asyncLoadFluctuationConfig && asyncLoadFluctuationConfig.fluctuationTypeIds}`;\r\n /* istanbul ignore next */\r\n const metricsObject = Array.isArray(metrics) && metrics.length ? metrics[0] : {};\r\n\r\n /* istanbul ignore next */\r\n if (!(triggerButton instanceof Element)) {\r\n throw new Error('TriggerButton is not an element.');\r\n }\r\n\r\n /* istanbul ignore next */\r\n const onOutsideClick = (e, srcTarget) => {\r\n if (e.target !== srcTarget) {\r\n if (onDismiss) {\r\n onDismiss();\r\n }\r\n\r\n ReactDOM.unmountComponentAtNode(placeholderElement);\r\n /* istanbul ignore next */\r\n activities.userActionActivity\r\n .trace(\r\n `Fluctuation popup closed. aid: ${context.CurrentAccount.Id}, campaignId: ${context.CurrentCampaign && context.CurrentCampaign.Id}, FromScenario: ${fromScenario}, MetricsName: ${metricsObject.name || undefined}, MetricsType: ${metricsObject.type || undefined}`,\r\n 'FluctuationAction'\r\n );\r\n }\r\n };\r\n\r\n /* istanbul ignore next */\r\n activities.userActionActivity\r\n .trace(\r\n `Fluctuation popup opened. aid: ${context.CurrentAccount.Id}, campaignId: ${context.CurrentCampaign && context.CurrentCampaign.Id}, FromScenario: ${fromScenario}, MetricsName: ${metricsObject.name || undefined}, MetricsType: ${metricsObject.type || undefined}`,\r\n 'FluctuationAction'\r\n );\r\n\r\n let fluctuationPopupElement = FluctuationPopup;\r\n\r\n if (getFluctuationPopupStyles) {\r\n fluctuationPopupElement = withDefaultStyles(FluctuationPopup, getFluctuationPopupStyles);\r\n }\r\n\r\n const fluctuationPopupElementWithLock = withLock(fluctuationPopupElement, {\r\n lockKey: keyVault.clickingPopup,\r\n force: true,\r\n });\r\n\r\n ReactDOM.render(\r\n React.createElement(fluctuationPopupElementWithLock, {\r\n ...props,\r\n onDismiss: onOutsideClick,\r\n isReactNodeTriggerButton: false,\r\n key: calloutKey,\r\n }),\r\n placeholderElement\r\n );\r\n}\r\n","import Promise from 'bluebird';\r\nimport $ from 'jquery';\r\n\r\nconst BaseUrl = 'AdInsight/V2/Customers({cid})/Accounts({aid})/Fluctuation';\r\n\r\nexport class FluctuationService {\r\n constructor({\r\n token,\r\n options,\r\n }) {\r\n this.token = token;\r\n this.options = options;\r\n }\r\n\r\n getUrlParam = (queryString, param) => {\r\n const match = RegExp(`[?&]${param}=([^&]*)`).exec(queryString);\r\n const queryParamValue = match && decodeURIComponent(match[1].replace(/\\+/g, ' '));\r\n\r\n return queryParamValue ? `&${param}=${queryParamValue}` : '';\r\n }\r\n\r\n formatUrl(callType, withoutOpporCheck) {\r\n let url = '';\r\n const campaign = this.options.campaignId ? 'Campaign' : '';\r\n const campaignParam = this.options.campaignId ? '&campaignId={campaignId}' : '';\r\n const exeprimentParam = this.options.isFluctuationsExperiementEnabled ? '&$filter=true' : '';\r\n const urlParams = this.getUrlParam(window.location.search, 'internalVersion');\r\n const odataFuncPrefix = campaign ? 'Campaign' : 'Account';\r\n /* istanbul ignore next */\r\n let odataFunc = urlParams ? `Get${odataFuncPrefix}FluctuationsWithFilter` : `Get${campaign}Fluctuations`;\r\n\r\n if (withoutOpporCheck) {\r\n odataFunc = `Get${campaign}FluctuationsWithoutRecCheck`;\r\n }\r\n if (callType === 'GET') {\r\n url = `${BaseUrl}.${odataFunc}?userId={userId}${urlParams}${campaignParam}&granularity={granularity}&surfacingChannelId={surfacingChannelId}&startDate={startDate}&endDate={endDate}${exeprimentParam}`;\r\n } else {\r\n url = `${BaseUrl}.Post${campaign}FeedBack?userId={userId}${urlParams}${campaignParam}&uniqueId={uniqueId}&datetime={datetime}&feedbackType=Dismiss`;\r\n }\r\n let tempUrl = url.replace('{aid}', this.options.accountId)\r\n .replace('{userId}', this.options.userId)\r\n .replace('{cid}', this.options.customerId)\r\n .replace('{granularity}', this.options.granularity)\r\n .replace('{surfacingChannelId}', this.options.surfacingChannelId)\r\n .replace('{startDate}', this.options.startDate)\r\n .replace('{endDate}', this.options.endDate)\r\n .replace('{uniqueId}', this.options.uniqueId)\r\n .replace('{datetime}', this.options.datetime);\r\n\r\n if (this.options.campaignId) {\r\n tempUrl = tempUrl.replace('{campaignId}', this.options.campaignId);\r\n }\r\n const host = this.options.host || `${window.location.origin}/ODataApi/`;\r\n return `${host}${tempUrl}`;\r\n }\r\n\r\n /**\r\n * Gets localized list of granularities for the current daterange.\r\n * @param {string} callType - one of 'GET' or 'POST'\r\n * @param {boolean} withoutOpporCheck - one of 'account' or 'campaign'\r\n * @returns {object} option object to be used in ajax call\r\n */\r\n generateRequestOption(callType, withoutOpporCheck = false) {\r\n const option = {\r\n contentType: 'application/json',\r\n type: callType,\r\n headers: {\r\n authorization: `CCMTSmallToken ${this.token}`,\r\n },\r\n cache: callType === 'POST', // Disable cache when GET fluctuations\r\n };\r\n\r\n option.url = this.formatUrl(callType, withoutOpporCheck);\r\n\r\n return option;\r\n }\r\n\r\n findAll({\r\n withoutOpporCheck = false,\r\n } = {}) {\r\n const option = this.generateRequestOption('GET', withoutOpporCheck);\r\n\r\n return new Promise((resolve, reject) => {\r\n /* istanbul ignore next */\r\n $.ajax(option).then((rawData) => {\r\n /* istanbul ignore next */\r\n resolve(rawData.value);\r\n }, reject);\r\n });\r\n }\r\n\r\n postFeedback() {\r\n const option = this.generateRequestOption('POST');\r\n\r\n return new Promise((resolve, reject) => {\r\n /* istanbul ignore next */\r\n $.ajax(option).then(() => {\r\n /* istanbul ignore next */\r\n resolve();\r\n }, reject);\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { matchPath } from 'react-router-dom';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { FallbackContentBody, FallbackContentTitle } from '@bingads-webui-react/fallback-feature';\r\nimport {\r\n withSiteMap, siteMapPropType, findSiteMap,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getFallbackPageStyles } from './styles/fallback-page-styles';\r\n\r\nconst defaultTitle = _TL_('Not Available');\r\n\r\nexport function isRouteMatch(pathname, route, exact) {\r\n const extractPattern = new RegExp('/campaign/vnext(/.+)$', 'i');\r\n const currentLocation = _.last(pathname.match(extractPattern));\r\n\r\n if (_.isEmpty(currentLocation)) {\r\n return false;\r\n }\r\n\r\n return route\r\n ? !!matchPath(currentLocation, {\r\n path: `/${route}`,\r\n exact,\r\n })\r\n : false;\r\n}\r\n\r\nconst UnthemedFallbackPage = ({\r\n title, classes, siteMap, match, i18n,\r\n}) => {\r\n let fallbackTitle;\r\n if (title) {\r\n fallbackTitle = title;\r\n } else {\r\n let matchedRoute;\r\n if (match.params.page) {\r\n matchedRoute = findSiteMap(siteMap, x => x.route === match.params.page);\r\n } else {\r\n matchedRoute = findSiteMap(siteMap, x => isRouteMatch(match.path, x.route, true));\r\n }\r\n\r\n if (matchedRoute && matchedRoute.name) {\r\n fallbackTitle = matchedRoute.name;\r\n }\r\n }\r\n\r\n fallbackTitle = i18n.getString(fallbackTitle || defaultTitle);\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nUnthemedFallbackPage.defaultProps = {\r\n match: {\r\n params: {},\r\n },\r\n title: undefined,\r\n};\r\n\r\nUnthemedFallbackPage.propTypes = {\r\n title: PropTypes.string,\r\n match: PropTypes.shape({\r\n params: PropTypes.shape({\r\n page: PropTypes.string,\r\n }),\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n classes: PropTypes.shape({\r\n container: PropTypes.string.isRequired,\r\n bodyContainer: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const FallbackPage\r\n = withI18nConsumer(withSiteMap(withDefaultStyles(UnthemedFallbackPage, getFallbackPageStyles)));\r\n","import { audienceModalStyles } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getFallbackPageStyles = (_, { palette = {} }) => ({\r\n container: {\r\n marginLeft: '23px',\r\n marginTop: '16px',\r\n },\r\n bodyContainer: {\r\n paddingTop: '10px',\r\n width: '232px',\r\n },\r\n '@global': audienceModalStyles({ palette }),\r\n});\r\n","import React from 'react';\r\nimport { withSiteMap, siteMapPropType, findSelectedNode } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { ProgressiveLoadingBlock } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { FallbackPage } from './fallback-page';\r\n\r\nfunction isSelectedPageAvailable(siteMap) {\r\n const selectedNode = findSelectedNode(siteMap);\r\n\r\n return {\r\n needPlaceholder: !selectedNode,\r\n isAvailable: !!(selectedNode && selectedNode.selected && selectedNode.available),\r\n };\r\n}\r\n\r\nexport function withFallbackPage(Component) {\r\n const Wrapper = (props) => {\r\n const { needPlaceholder, isAvailable } = isSelectedPageAvailable(props.siteMap);\r\n\r\n // FallbackUpdaterWithDefaultLandingPage will redirect to next available page.\r\n // Showing this ProgressiveLoadingBlock as we will finally launch to an available page.\r\n if (needPlaceholder) {\r\n return ();\r\n }\r\n\r\n if (isAvailable) {\r\n return ();\r\n }\r\n\r\n return ();\r\n };\r\n\r\n Wrapper.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n };\r\n\r\n return withSiteMap(Wrapper);\r\n}\r\n","import { getButtonFocusOverrideStyle } from './common-styles';\r\n\r\nexport const getMenuItemListStyles = () => ({\r\n menuList: {\r\n '.import-type-list-wrapper &': {\r\n borderTop: 'none',\r\n },\r\n borderTop: 'solid 1px #484644',\r\n listStyle: 'none',\r\n },\r\n groupHeader: {\r\n marginLeft: 12,\r\n marginTop: 10,\r\n marginBottom: 8,\r\n },\r\n});\r\n\r\nexport const getMenuItemStyles = (menuItem, { palette = {} }) => ({\r\n baseMenuItem: {\r\n height: 36,\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 'normal',\r\n lineHeight: 'normal',\r\n display: 'flex',\r\n flexDirection: 'row',\r\n padding: '0 12px 0 0',\r\n border: 0,\r\n textDecoration: 'none',\r\n alignItems: 'center',\r\n width: '100%',\r\n textAlign: 'left',\r\n minWidth: '1px',\r\n borderRadius: 'unset',\r\n // menu item is using Button, but states' style should not act the same as Button.\r\n '&:focus': getButtonFocusOverrideStyle(palette.neutralSecondary),\r\n '&:active': {\r\n '&:focus': {\r\n '&:after': {\r\n border: 0,\r\n },\r\n },\r\n },\r\n '& a': {\r\n color: palette.white,\r\n },\r\n '& .spinner_label': {\r\n color: palette.white,\r\n },\r\n },\r\n normalMenuItem: {\r\n backgroundColor: `${palette.neutralPrimaryAlt} !important`,\r\n '&:focus': {\r\n backgroundColor: palette.mainMenuHoverBackground,\r\n },\r\n '&:hover': {\r\n backgroundColor: `${palette.mainMenuHoverBackground} !important`,\r\n },\r\n },\r\n selectedMenuItem: {\r\n fontWeight: 600,\r\n backgroundColor: '#323031 !important',\r\n },\r\n beforeIcon: {\r\n borderLeft: `4px solid ${palette.themePrimary}`,\r\n padding: 0,\r\n marginRight: -4,\r\n alignSelf: 'stretch',\r\n },\r\n iconContainer: {\r\n display: 'inline-block',\r\n marginLeft: 16,\r\n marginTop: 10,\r\n marginBottom: 10,\r\n marginRight: 12,\r\n width: 16,\r\n height: 16,\r\n fontSize: 16,\r\n color: palette.white,\r\n },\r\n // TODO:may have to change to import center connection container style\r\n connectionIconContainer: {\r\n display: 'inline-block',\r\n marginLeft: 11,\r\n marginTop: 6,\r\n marginBottom: 6,\r\n marginRight: 11,\r\n width: 24,\r\n height: 24,\r\n fontSize: 16,\r\n color: palette.neutralSecondary,\r\n },\r\n statusIconContainer: {\r\n width: 12,\r\n height: 12,\r\n marginLeft: 16,\r\n marginTop: 12,\r\n marginBottom: 12,\r\n marginRight: 16,\r\n },\r\n activeStatusIcon: {\r\n fontSize: '12px !important',\r\n color: '#22CD6E',\r\n display: 'block',\r\n top: '0 !important',\r\n margin: '0px !important',\r\n },\r\n pendingStatusIcon: {\r\n fontSize: '12px !important',\r\n color: '#BEBBB8',\r\n display: 'block',\r\n top: '0 !important',\r\n margin: '0px !important',\r\n },\r\n rejectedStatusIcon: {\r\n fontSize: '12px !important',\r\n color: '#A80000',\r\n display: 'block',\r\n top: '0 !important',\r\n margin: '0px !important',\r\n },\r\n collapsedConnectionIcon: {\r\n height: '24px',\r\n lineHeight: '24px',\r\n fontFamily: 'Full MDL2 Assets',\r\n fontSize: '10px',\r\n textAlign: 'center',\r\n color: '#FFFFFF',\r\n borderRadius: '2px',\r\n background: '#605E5C',\r\n },\r\n selectedCollapsedConnectionIcon: {\r\n height: '24px',\r\n lineHeight: '24px',\r\n fontFamily: 'Full MDL2 Assets',\r\n fontSize: '10px',\r\n textAlign: 'center',\r\n color: '#FFFFFF',\r\n borderRadius: '2px',\r\n background: '#0078D4',\r\n },\r\n textContainer: {\r\n display: 'inline-block',\r\n overflow: 'hidden',\r\n marginTop: 8,\r\n marginBottom: 9,\r\n textOverflow: 'ellipsis',\r\n flex: '1 1 1px',\r\n whiteSpace: 'nowrap',\r\n fontSize: 14,\r\n color: palette.white,\r\n },\r\n typeSelectionIcon: {\r\n fontSize: 16,\r\n display: 'block',\r\n margin: '0px !important',\r\n top: '0px !important',\r\n },\r\n placeholderTextContainer: {\r\n marginLeft: 22,\r\n },\r\n});\r\n\r\n","export const getButtonFocusOverrideStyle = outlineColor => ({\r\n outline: `1px solid ${outlineColor}`,\r\n outlineOffset: -1,\r\n '&:after': {\r\n border: 0,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { constant, mapObject } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Glyphicon, Button } from '@bingads-webui-react/primitive';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { getMenuItemStyles } from '../styles/menu-item-styles';\r\n\r\nconst GetNodeClassNames = (node, classes) => classNames([\r\n classes.baseMenuItem,\r\n node.isSelected ? [classes.selectedMenuItem, 'selected'] : classes.normalMenuItem,\r\n `menu-item-${node.Id}`,\r\n]);\r\n\r\nconst ImportTypeItem = ({\r\n classes,\r\n node,\r\n renderText,\r\n onItemClick,\r\n}) => {\r\n const cnames = classNames([GetNodeClassNames(node, classes)]);\r\n\r\n return (\r\n onItemClick(node)}\r\n aria-label={node.Name}\r\n >\r\n {node.isSelected &&
}\r\n
\r\n \r\n
\r\n {renderText && {renderText}}\r\n \r\n );\r\n};\r\n\r\nImportTypeItem.propTypes = {\r\n classes: PropTypes.shape(mapObject(\r\n getMenuItemStyles({}, {}),\r\n constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n node: PropTypes.shape({\r\n Id: PropTypes.string,\r\n Name: PropTypes.string,\r\n glyphIconName: PropTypes.string,\r\n isSelected: PropTypes.bool,\r\n }).isRequired,\r\n renderText: PropTypes.string,\r\n onItemClick: PropTypes.func.isRequired,\r\n};\r\n\r\nImportTypeItem.defaultProps = {\r\n renderText: null,\r\n};\r\n\r\nexport default withDefaultStyles(ImportTypeItem, getMenuItemStyles);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { constant, mapObject } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport ImportTypeItem from './import-type-item';\r\nimport { getMenuItemListStyles } from '../styles/menu-item-styles';\r\n\r\nclass ImportTypeItemList extends React.PureComponent {\r\n render() {\r\n const {\r\n classes,\r\n items,\r\n isExpanded,\r\n onMenuItemClick,\r\n classList,\r\n } = this.props;\r\n\r\n const cnames = classNames(['main-menu-link-list', classes.menuList, ...classList]);\r\n\r\n return (\r\n
{\r\n isExpanded &&\r\n
\r\n {items.map(item =>\r\n (\r\n \r\n ))}\r\n
\r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\nImportTypeItemList.propTypes = {\r\n classes: PropTypes.shape(mapObject(\r\n getMenuItemListStyles(),\r\n constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n classList: PropTypes.arrayOf(PropTypes.string),\r\n isExpanded: PropTypes.bool.isRequired,\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.string,\r\n Name: PropTypes.string.isRequired,\r\n })),\r\n onMenuItemClick: PropTypes.func.isRequired,\r\n};\r\n\r\nImportTypeItemList.defaultProps = {\r\n items: [],\r\n classList: [],\r\n};\r\n\r\nexport const StyledImportTypeItemList = withDefaultStyles(ImportTypeItemList, getMenuItemListStyles);\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Button, Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { getMenuItemStyles } from '../styles/menu-item-styles';\r\n\r\nconst GetNodeClassNames = (node, classes) => classNames([\r\n classes.baseMenuItem,\r\n node.isSelected ? [classes.selectedMenuItem, 'selected'] : classes.normalMenuItem,\r\n `menu-item-${node.Id}`,\r\n]);\r\n\r\nconst ConnectionItem = ({\r\n classes,\r\n node,\r\n renderText,\r\n onItemClick,\r\n isExpanded,\r\n}) => {\r\n const cnames = classNames([GetNodeClassNames(node, classes)]);\r\n\r\n const icon = 'ba-RadioBullet2';\r\n let iconStatusClassName = '';\r\n\r\n if (node.Status === 'Enabled') {\r\n iconStatusClassName = classes.activeStatusIcon;\r\n } else if (node.Status === 'Paused') {\r\n iconStatusClassName = classes.pendingStatusIcon;\r\n } else if (node.Status === 'Expired') {\r\n iconStatusClassName = classes.rejectedStatusIcon;\r\n }\r\n\r\n return (\r\n onItemClick(node)}\r\n aria-label={node.Name}\r\n >\r\n {node.isSelected &&
}\r\n {isExpanded ?\r\n
\r\n \r\n
\r\n :\r\n
\r\n
\r\n {node.Account}\r\n
\r\n
\r\n }\r\n {renderText && {renderText}}\r\n \r\n );\r\n};\r\n\r\nConnectionItem.defaultProps = {\r\n renderText: null,\r\n};\r\n\r\nConnectionItem.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getMenuItemStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n isExpanded: PropTypes.bool.isRequired,\r\n node: PropTypes.shape({\r\n Id: PropTypes.number,\r\n Name: PropTypes.string,\r\n isSelected: PropTypes.bool,\r\n Status: PropTypes.string,\r\n }).isRequired,\r\n renderText: PropTypes.string,\r\n onItemClick: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default withDefaultStyles(ConnectionItem, getMenuItemStyles);\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport ConnectionItem from './connection-item';\r\nimport { getMenuItemListStyles } from '../styles/menu-item-styles';\r\n\r\nclass ConnectionItemList extends React.PureComponent {\r\n render() {\r\n const {\r\n classes,\r\n items,\r\n onConnectionItemClick,\r\n isExpanded,\r\n } = this.props;\r\n\r\n const cnames = classNames([classes.menuList, 'connections-list']);\r\n\r\n return (\r\n isExpanded &&\r\n
\r\n {items.map(connection =>\r\n (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n\r\nConnectionItemList.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getMenuItemListStyles(),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n isExpanded: PropTypes.bool.isRequired,\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n Name: PropTypes.string.isRequired,\r\n Status: PropTypes.string.isRequired,\r\n })),\r\n onConnectionItemClick: PropTypes.func.isRequired,\r\n};\r\n\r\nConnectionItemList.defaultProps = {\r\n items: [],\r\n};\r\n\r\nexport const StyledConnectionItemList = withDefaultStyles(ConnectionItemList, getMenuItemListStyles);\r\n","import { filter, map } from 'underscore';\r\nimport $ from 'jquery';\r\nimport { IMPORT_TYPE } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\n\r\nimport * as constants from '@bingads-webui-campaign/import-center/src/constants/import-center-constants';\r\n\r\nconst IMPORT_API_TYPE = {\r\n googleimport: 'googleimport',\r\n facebookimport: 'facebookimport',\r\n amazonImport: 'amazonImport',\r\n pinterestImport: 'pinterestImport',\r\n};\r\n\r\nconst CONNECTION_CONTEXT = {\r\n [IMPORT_API_TYPE.googleimport]: 'AdWordsImportContext',\r\n [IMPORT_API_TYPE.facebookimport]: 'FacebookImportContext',\r\n [IMPORT_API_TYPE.amazonImport]: 'AmazonImportContext',\r\n [IMPORT_API_TYPE.pinterestImport]: 'PinterestImportContext',\r\n};\r\n\r\nconst IMPORT_CONNECTION_TYPE_MAP = {\r\n Import: 'Google',\r\n FacebookImport: 'Facebook',\r\n AmazonImport: 'Amazon',\r\n PinterestImport: 'Pinterest',\r\n};\r\n\r\nconst IMPORT_CONNECTION_PREFIX = {\r\n Google: 'G - ',\r\n Facebook: 'F - ',\r\n Amazon: 'A - ',\r\n Pinterest: 'P - ',\r\n};\r\n\r\n// fetch one type schedule data\r\nconst fetchScheduleData = (serverContext, queryParam, importTypeOfFilter) => {\r\n const { cid, aid } = queryParam;\r\n const urlPrefixModern = aid ?\r\n `/Customers(${cid})/Accounts(${aid})` :\r\n `/Customers(${cid})`;\r\n\r\n let apiFilter;\r\n if (aid) {\r\n apiFilter = {\r\n [IMPORT_TYPE.facebookimport]: constants.FILTER_ALL_BUT_DELETED_FACEBOOK_ITEMS,\r\n [IMPORT_TYPE.amazonImport]: constants.FILTER_ALL_BUT_DELETED_AMAZON_ITEMS,\r\n [IMPORT_TYPE.pinterestImport]: constants.FILTER_ALL_BUT_DELETED_PINTEREST_ITEMS,\r\n }[importTypeOfFilter] || constants.FILTER_ALL_BUT_DELETED;\r\n } else {\r\n apiFilter = constants.FILTER_ALL_BUT_DELETED_MULTIACCOUNT;\r\n }\r\n\r\n const urlSearchParams = new URLSearchParams({\r\n $top: 5,\r\n $count: true,\r\n $filter: apiFilter,\r\n });\r\n const url = `${urlPrefixModern}/TaskItems`;\r\n const option = {\r\n contentType: 'application/json',\r\n type: 'GET',\r\n headers: {\r\n authorization: `CCMTSmallToken ${serverContext.Token}`,\r\n },\r\n url: `${serverContext.ServicesEndpoints.CampaignAPI}Campaign/V2${url}?${urlSearchParams}`,\r\n };\r\n\r\n return $.ajax(option);\r\n};\r\n\r\n// temporaly fetch sessionId from the fetch schedule grid data api 【Account level】\r\nexport const getAdsAccountConnections = (importTypePermission, serverContext, queryParam) => {\r\n // check permissions\r\n const importTypes = filter(IMPORT_API_TYPE, type => importTypePermission[type]);\r\n const promises = map(importTypes, importType => fetchScheduleData(serverContext, queryParam, importType)\r\n .then(res => ({ data: res.value, importType })));\r\n return Promise.all(promises)\r\n .then((objs) => {\r\n const connectionSet = new Set();\r\n const connectionList = [];\r\n map(objs, (obj) => {\r\n const originalConnections = obj.data;\r\n map(originalConnections, (originalConnection) => {\r\n const connection = {\r\n Id: originalConnection[CONNECTION_CONTEXT[obj.importType]].SessionId,\r\n Account: IMPORT_CONNECTION_PREFIX[IMPORT_CONNECTION_TYPE_MAP[originalConnection.Type]] + originalConnection[CONNECTION_CONTEXT[obj.importType]].AccountName,\r\n Type: IMPORT_CONNECTION_TYPE_MAP[originalConnection.Type],\r\n Status: 'Enabled',\r\n SessionId: originalConnection[CONNECTION_CONTEXT[obj.importType]].SessionId,\r\n };\r\n if (!connectionSet.has(connection.Account)) {\r\n connectionSet.add(connection.Account);\r\n connectionList.push(connection);\r\n }\r\n });\r\n });\r\n return connectionList;\r\n });\r\n};\r\n\r\n// MCC & Smart Account connection data\r\nexport const getMCCAccountConnections = (serverContext, queryParam) => fetchScheduleData(serverContext, queryParam).then((res) => {\r\n const connectionSet = new Set();\r\n const connectionList = [];\r\n map(res.value, (item) => {\r\n const connection = {\r\n Id: item.ImportTaskItemList[0].AdWordsImportContext.SessionId,\r\n Account: `G - ${item.ImportTaskItemList[0].AdWordsImportContext.AccountName}`,\r\n Type: 'Google',\r\n Status: 'Enabled',\r\n SessionId: item.ImportTaskItemList[0].AdWordsImportContext.SessionId,\r\n };\r\n if (!connectionSet.has(connection.Account)) {\r\n connectionSet.add(connection.Account);\r\n connectionList.push(connection);\r\n }\r\n });\r\n return connectionList;\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport queryString from 'query-string';\r\nimport { constant, mapObject, map, filter, has } from 'underscore';\r\nimport { Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { StyledCollapsibleSideBar, withResponsiveMainMenu } from '@bingads-webui-campaign-react/main-menu';\r\nimport { StyledSpinnerWithLabel } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport { ImportTypeItemList, ConnectionItemList } from './components';\r\nimport { getMainMenuStyles } from './styles/main-menu-styles';\r\nimport { getAdsAccountConnections, getMCCAccountConnections } from './mock-data/connections-data';\r\n\r\nconst importTypeItems = {\r\n 'all-imports': {\r\n Id: 'all-imports',\r\n Type: 'All',\r\n glyphIconName: 'ba-ReportDocument',\r\n },\r\n 'google-imports': {\r\n Id: 'google-imports',\r\n Type: 'Google',\r\n glyphIconName: 'ba-Configuration',\r\n },\r\n 'facebook-imports': {\r\n Id: 'facebook-imports',\r\n Type: 'Facebook',\r\n glyphIconName: 'ba-FacebookLogo',\r\n },\r\n 'amazon-imports': {\r\n Id: 'amazon-imports',\r\n Type: 'Amazon',\r\n glyphIconName: 'ba-Configuration',\r\n },\r\n 'pinterest-imports': {\r\n Id: 'pinterest-imports',\r\n Type: 'Pinterest',\r\n glyphIconName: 'ba-Configuration',\r\n },\r\n 'file-imports': {\r\n Id: 'file-imports',\r\n Type: 'File',\r\n glyphIconName: 'ba-Configuration',\r\n },\r\n};\r\n\r\n\r\nclass ImportCenterMainMenuView extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.isMCC = !has(queryString.parse(props.location.search), 'aid');\r\n this.connectionPermissions = {\r\n googleimport: true,\r\n facebookimport: props.permissions.IsFacebookImportEnabled,\r\n amazonImport: props.permissions.IsAmazonImportEnabled,\r\n pinterestImport: true,\r\n };\r\n\r\n this.state = {\r\n connections: [],\r\n loadingData: true,\r\n };\r\n\r\n this.fetchConnectionData().then((connections) => {\r\n // handle\r\n const handledConnections = this.addConnectionProperty(connections);\r\n // cache all connections\r\n this.allConnections = handledConnections;\r\n\r\n // filter by route\r\n const currentType = this.props.location.pathname.split('/')[4];\r\n let finalConnections;\r\n if (currentType !== 'all') {\r\n finalConnections = filter(handledConnections, connection => connection.Type.toLowerCase() === currentType);\r\n } else {\r\n finalConnections = this.allConnections;\r\n }\r\n this.setState({\r\n loadingData: false,\r\n connections: finalConnections,\r\n });\r\n });\r\n }\r\n\r\n onImportTypeChange = (node) => {\r\n // route\r\n this.props.onImportTypeItemClick(node);\r\n\r\n // get connections\r\n let connections = this.allConnections;\r\n // filter the connection list\r\n if (node && node.Type !== 'All') {\r\n connections = filter(connections, connection => connection.Type === node.Type);\r\n }\r\n this.setState({\r\n connections,\r\n });\r\n };\r\n\r\n onConnectionChange = (node) => {\r\n // route\r\n this.props.onConnectionItemClick(node);\r\n\r\n const connections = this.addConnectionProperty(this.state.connections);\r\n this.setState({\r\n connections,\r\n });\r\n };\r\n\r\n fetchConnectionData = () => {\r\n if (this.isMCC) {\r\n return getMCCAccountConnections(\r\n this.props.serverContext,\r\n queryString.parse(this.props.location.search)\r\n );\r\n }\r\n return getAdsAccountConnections(\r\n this.connectionPermissions,\r\n this.props.serverContext,\r\n queryString.parse(this.props.location.search)\r\n );\r\n };\r\n\r\n generateStaticItems = () => {\r\n const { siteMap, i18n } = this.props;\r\n\r\n return siteMap.map(item => ({\r\n ...importTypeItems[item.id],\r\n Name: i18n.getString(item.name),\r\n routePrefix: item.routePrefix,\r\n route: item.route,\r\n isSelected: item.selected,\r\n }));\r\n };\r\n\r\n addConnectionProperty = (connections) => {\r\n const { scope } = this.props;\r\n const connectionId = scope.values.connectionId ? scope.values.connectionId : null;\r\n\r\n return map(connections, item => ({\r\n ...item,\r\n isSelected: connectionId === item.Id,\r\n }));\r\n };\r\n\r\n renderDivider() {\r\n const { classes } = this.props;\r\n return (
);\r\n }\r\n\r\n render() {\r\n const {\r\n classes,\r\n mode,\r\n i18n,\r\n onToggle,\r\n isPanelMode,\r\n } = this.props;\r\n\r\n const isExpanded = isPanelMode || mode === Mode.Expanded;\r\n\r\n const connectionViewContainerClassName = classNames([\r\n classes.mainMenuContainer,\r\n isExpanded ? 'ui-next-connection-view' : [classes.hidden, 'ui-next-hidden-connection-view'],\r\n ]);\r\n\r\n return (\r\n \r\n \r\n\r\n {this.renderDivider()}\r\n\r\n
\r\n {this.state.loadingData ?\r\n
\r\n \r\n
:\r\n }\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nImportCenterMainMenuView.propTypes = {\r\n classes: PropTypes.shape(mapObject(\r\n getMainMenuStyles({}, {}),\r\n constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string,\r\n search: PropTypes.string,\r\n }).isRequired,\r\n mode: PropTypes.string.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n onImportTypeItemClick: PropTypes.func.isRequired,\r\n onConnectionItemClick: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n IsFacebookImportEnabled: PropTypes.bool.isRequired,\r\n IsAmazonImportEnabled: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n isPanelMode: PropTypes.bool.isRequired,\r\n siteMap: PropTypes.oneOfType([\r\n PropTypes.array,\r\n PropTypes.object,\r\n ]).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n\r\nexport const StyledImportCenterMainMenuView = withRouter(withPreference(withResponsiveMainMenu(withDefaultStyles(ImportCenterMainMenuView, getMainMenuStyles))));\r\n","export const getMainMenuStyles = (mainMenu, { palette = {} }) => ({\r\n mainMenuContainer: {\r\n transition: 'width 0.2s',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100%',\r\n flex: '1 1 1px',\r\n },\r\n hidden: {\r\n display: 'none',\r\n },\r\n menuList: {\r\n listStyle: 'none',\r\n paddingTop: 8,\r\n // borderTop: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n },\r\n divider: {\r\n borderTop: `solid 1px ${palette.mainMenuHoverBackground}`,\r\n },\r\n majorComponentsContainer: {\r\n borderTop: 'none',\r\n },\r\n connectionLoading: {\r\n flex: '1 1 1px',\r\n width: '100%',\r\n display: 'flex',\r\n transition: 'width 0.2s',\r\n padding: '10px 0px 0px 15px',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { $current, QueryParam, withScope } from '@bingads-webui-react/scope-service';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport {\r\n withImportSiteMap,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nimport { StyledImportCenterMainMenuView } from './import-center-main-menu-view';\r\n\r\nconst modePreferenceName = 'WebApp.CampaignUI.New.ImportCenterManiMenuMode';\r\n\r\nconst defaultRoute = {\r\n Google: '/campaign/vnext/importcenter/google/import',\r\n Facebook: '/campaign/vnext/importcenter/facebook/import',\r\n Amazon: '/campaign/vnext/importcenter/amazon/import',\r\n Pinterest: '/campaign/vnext/importcenter/pinterest/import',\r\n};\r\n\r\nconst updateUrlOnConnectionClick = (node, scope) => {\r\n // TODO: set import type unselected\r\n const connectionId = scope.values.connectionId ? scope.values.connectionId : null;\r\n if (connectionId !== node.Id) {\r\n scope.set({\r\n cid: $current,\r\n ...scope.values.aid ? { aid: $current } : {},\r\n uid: $current,\r\n connectionId: node.Id,\r\n });\r\n } else {\r\n return;\r\n }\r\n scope.save(defaultRoute[node.Type]);\r\n};\r\n\r\nconst updateUrlOnImportTypeClick = (node, scope) => {\r\n const connectionId = scope.values.connectionId ? scope.values.connectionId : null;\r\n if (connectionId) {\r\n scope.remove('connectionId');\r\n }\r\n scope.save(node.routePrefix + node.route);\r\n};\r\nclass ImportCenterMainMenuAdapter extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.mainMenuScenario = props.instrumentation.createScenarioAndActivity({\r\n scenarioName: 'importCenterMainMenuScenario',\r\n activityName: 'toggleMainMenuActivity',\r\n }).scenario;\r\n }\r\n\r\n // click top import item will route\r\n onImportTypeItemClick = (node) => {\r\n const { scope } = this.props;\r\n updateUrlOnImportTypeClick(node, scope);\r\n }\r\n\r\n // click connection item will add connectionId in url\r\n onConnectionItemClick = (node) => {\r\n const { scope } = this.props;\r\n updateUrlOnConnectionClick(node, scope);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nImportCenterMainMenuAdapter.propTypes = {\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({\r\n createScenarioAndActivity: PropTypes.func,\r\n }).isRequired,\r\n siteMap: PropTypes.oneOfType([\r\n PropTypes.array,\r\n PropTypes.object,\r\n ]).isRequired,\r\n};\r\n\r\nexport const ImportCenterMainMenu = _.compose(\r\n withI18nConsumer,\r\n withServerContext,\r\n withScope,\r\n withInstrumentation,\r\n TempComponent => withImportSiteMap(TempComponent, processorSet.all, 'import-center/import-center/*')\r\n)(ImportCenterMainMenuAdapter);\r\n"],"names":["FeedSelectorView","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","renderItem","item","i18n","props","Name","AttributeNames","Description","attributeDescription","processAttributeNames","_","push","attributeDescriptionPre","getString","join","_jsxs","className","children","_jsx","_inherits","_createClass","key","value","_this$props","this","feeds","onSelect","ListSelector","data","Component","defaultProps","FeedAttributeSelectorView","name","attributeNames","HelpIcon","_React$PureComponent","onClick","PopupController","PopupJsClick","element","current","React","topic","ariaLabel","ref","trim","type","DefaultTextEditorView","onSaveOrOnCancel","isCancel","event","state","onCancelClicked","onSaveClicked","onValidate","model","maxLength","enableCancel","count","onChange","e","target","errorMessage","setState","getErrorMessage","role","defaultText","prevPropsDefaultText","bind","_this$props2","inputId","htmlFor","TextInput","id","classnames","disabled","nextProps","prevState","FeedSyntaxView","selectedFeed","selectedAttribute","renderPart","text","isBold","conditionTypeLabel","FeedAndAttributeSelectorView","_React$Component","onFeedSelected","_index","noNextLevel","onUserSelectionUpdated","Id","selectedFeedName","selectedAttributeName","onDefaultTextInputDone","onUserActionCompleted","onFeedAttributeSelected","prevProps","canIgnoreDefaultText","showSyntax","selectorView","renderSelectorView","_this$state","syntaxView","MetricCounter","metric","line","styles","color","style","metricList","metrics","map","getMetricLine","getText","DescriptionContainer","_ref","description","Glyphicon","glyph","ActionSubPanel","None","FeedbackPanel","DismissPanel","FeedbackComplete","CALLOUT_HORIZONTAL_SPACE","CalloutWithAutoPlacement","onDismiss","calloutKey","_useState","useState","_useState2","_slicedToArray","autoFixPlacement","setAutoFixPlacement","useEffect","fixedPlacement","_target$getBoundingCl","getBoundingClientRect","left","right","window","innerWidth","Callout","popoverId","popoverClassName","show","closeButton","focusLockContent","content","onClose","placement","FluctuationActionButton","actionType","Link","replaceToken","pattern","val","str","regexp","RegExp","finalString","test","replace","replaceCurly","ctx","finalStr","argCounter","params","isArray","userId","CurrentUser","UserId","CustomerId","AccountId","CampaignId","AdGroupId","indexOf","insightPopupContainerId","insertPopoverContainer","placeHolderId","undefined","$","attr","appendTo","document","body","dismissPopupIfExist","popupContainers","popupClassName","getElementsByClassName","container","ReactDOM","Checkboxes","checkboxOption","toggleCheckbox","entry","Checkbox","label","CommentContainer","_ref2","TextField","multiline","resizable","placeholder","DismissForm","_ref3","handleCommentChange","onSubmit","onCancel","PrimaryButton","DefaultButton","FeedbackForm","_ref4","selectedCheckboxes","comment","InsightAction","showPanel","panel","newPanel","activeSubPanel","onCurrentSubPanelChange","checked","cancelAction","stopPropagation","submitActionFeedback","feedbackObj","feedbacks","newSubPanel","showFeedbackForm","deps","feedbackOptions","getDefaultFeedbackOptions","dismissFeedbackOptions","dismissOptions","getDefaultDismissOptions","_this2","showDismissForm","feedbackSubmitted","actionFormCommonProps","commentContainer","LearnMoreLink","learnMoreLinkTopic","linkText","subPanels","_objectSpread","instrumentationSchema","scenario","setting","activity","FluctuationGranularity","FluctuationType","FluctuationTypeKey","invert","mapObject","parseInt","Pagination","currentPage","totalPages","onClickHandler","totalPageSize","Math","min","paginations","number","carousel","onKeyPress","tabIndex","urlMap","AdGroupTab","urlVNext","isOriginRequired","Opportunity","CompetitionOpportunity","FixConversionGoalSettingsOpportunity","WebsiteReport","AdGroupSettingsTab","CampaignSettingsTab","KeywordTab","CampaignTab","AdGroupAcctLevelTab","AdGroupCampaignLevelTab","KeywordCampaignLevelTab","KeywordAcctLevelTab","AdTab","AdCampaignLevelTab","AdAcctLevelTab","ChangeHistory","AuctionInsight","SearchTerm","InvoiceAccountPausedActionURLId","InvoiceAccountOnHoldActionURLId","PrepayAccountPausedActionURLId","ThresholdAccountOnHoldActionURLId","learnmoreLink","FixConversionGoalSettingLearnMore","CreatedNewConversionGoalLearnMore","InvoiceAccountPausedActionHelperId","InvoiceAccountOnHoldActionHelperId","url","PrepayAccountPausedActionHelperId","ThresholdAccountOnHoldActionHelperId","FluctuationUrlService","urlId","u","_urlMap$urlId","urlWithSlash","startsWith","location","origin","get","getUrl","FluctuationLogService","fromScenario","fluctuation","fluxDate","eventType","isInternal","action","note","logObject","fluxId","UniqueId","fluxContent","actions","Actions","pluck","flatten","rootCauses","RootCauses","MessageId","fluxKpi","customerId","accountId","campaignId","trace","JSON","stringify","DetailContainer","detail","urlService","azure","context","UrlId","Values","details","detailsDom","index","linkUrl","onClickObj","localizedDisplayName","DisplayName","onLinkClicked","href","rel","expandedEntityName","ActionContainer","resetDetails","entityDetails","onDetailContainerShow","replaceAll","search","replacement","generateHtmlUrl","param","isHtml","completeUrl","userActionActivity","error","EntityScope","generateHtmlString","message","msgStr","substitutes","Parameters","forEach","Type","flatMap","arr","fn","result","mapping","generateCause","cause","messageId","Message","tempMessage","paramArray","nextParam","generateEntityCause","domIndex","par","flattenedFinalStr","split","part","pop","generateSingleEntity","entity","SubParameters","Count","DisplayNameId","logService","logContext","date","IsInternal","generateDetailContainer","logUserAction","renderActionItem","classNames","NestLevel","dangerouslySetInnerHTML","__html","defaultEntityDetails","_ref$expandedEntityNa","_ref$entityDetails","page","causesList","formattedCause","formattedDom","c","RootCauseId","actionsList","actionBundle","Messages","compact","causeContainer","actionContainer","ViewAllContainer","allCampaignsUrl","CurrentCustomer","CurrentAccount","scope","save","generateDescription","flattenFluctuationsDict","dateFluxMap","flattenedDateFlux","unsortedDateFluxMap","Date","getTime","reverse","dateFluxPair","_ref2$FluctuationsPer","FluctuationsPerDate","Fluctuation","_toConsumableArray","FluctuationPopup","getFluctuation","dateFluctuations","getDate","getFluctuationMetric","flucType","getFluctuationMetricUtil","activities","triggerOnOpen","bulbColor","expLogger","log","flight","onFlucOpen","currentFluctuationType","resetState","showFluctuation","popupOpened","closeFluctuation","selectPage","currentSubPanel","initializeInstrumentation","instrumentation","addScenario","fluctuationScenario","create","feedbackActivity","fluctuationFeedback","userAction","dismissActivity","fluctuationDismiss","submitLog","_this$props$deps","appConfig","currentFluctuation","currentDate","fluctuationData","Comment","Feedbacks","DismissFeedbacks","flucServiceIns","FluctuationService","token","options","CurrentCampaign","uniqueId","datetime","host","actingFluctuation","slice","splice","postFeedback","then","onFlucDismiss","isLastFluc","errorResponse","perfMarker","createChild","willInit","isDateRange","isLoading","ExpLoggerFactory","createLogger","Token","withoutOpporCheck","fetchData","done","willFetchData","_this$props3","_this$props3$deps","_this$props3$asyncLoa","asyncLoadFluctuationConfig","dateRange","fluctuationTypeIds","updateFlucData","updateLoadingStatus","granularity","startDate","formatDateString","endDate","surfacingChannelId","CurrentTabId","isFluctuationsExperiementEnabled","findAll","successResponse","unfilteredDateFlux","filteredDateFlux","dateFlux","toString","dateStr","leftPadding","s","dt","parse","year","getFullYear","month","getMonth","day","_this3","_this$props4","canViewAllInsights","triggerButton","isOpen","isReactNodeTriggerButton","withPopoverAdapter","fluxLength","shouldShowViewAllButton","viewAllContainer","pagination","PopoverAdapter","Popover","Wrapper","metricWithInsightAsDefault","detailEntityUniqueId","trigger","onOpen","customKeepOpen","keepTargetPropagation","Loading","formatDate","skeleton","showAction","createElementBasedFluctuationPopupFactory","placeholderElement","getFluctuationPopupStyles","metricsObject","Element","Error","fluctuationPopupElement","withDefaultStyles","fluctuationPopupElementWithLock","withLock","lockKey","keyVault","clickingPopup","force","srcTarget","BaseUrl","getUrlParam","queryString","match","exec","queryParamValue","decodeURIComponent","callType","campaign","campaignParam","exeprimentParam","urlParams","odataFunc","tempUrl","option","contentType","headers","authorization","cache","formatUrl","_ref2$withoutOpporChe","generateRequestOption","Promise","resolve","reject","rawData","UnthemedFallbackPage","fallbackTitle","matchedRoute","title","classes","siteMap","findSiteMap","x","route","pathname","exact","extractPattern","currentLocation","matchPath","path","isRouteMatch","_TL_","FallbackContentTitle","bodyContainer","FallbackContentBody","FallbackPage","withI18nConsumer","withSiteMap","_ref$palette","palette","marginLeft","marginTop","paddingTop","width","audienceModalStyles","withFallbackPage","_isSelectedPageAvaila","selectedNode","findSelectedNode","needPlaceholder","isAvailable","selected","available","isSelectedPageAvailable","ProgressiveLoadingBlock","getMenuItemListStyles","menuList","borderTop","listStyle","groupHeader","marginBottom","getMenuItemStyles","menuItem","outlineColor","baseMenuItem","height","fontFamily","fontWeight","lineHeight","display","flexDirection","padding","border","textDecoration","alignItems","textAlign","minWidth","borderRadius","neutralSecondary","outline","outlineOffset","white","normalMenuItem","backgroundColor","neutralPrimaryAlt","mainMenuHoverBackground","selectedMenuItem","beforeIcon","borderLeft","themePrimary","marginRight","alignSelf","iconContainer","fontSize","connectionIconContainer","statusIconContainer","activeStatusIcon","top","margin","pendingStatusIcon","rejectedStatusIcon","collapsedConnectionIcon","background","selectedCollapsedConnectionIcon","textContainer","overflow","textOverflow","flex","whiteSpace","typeSelectionIcon","placeholderTextContainer","GetNodeClassNames","node","isSelected","ImportTypeItem","renderText","onItemClick","cnames","Button","btnStyle","glyphIconName","ImportTypeItemList","items","isExpanded","onMenuItemClick","classList","StyledImportTypeItemList","ConnectionItem","icon","iconStatusClassName","Status","Account","ConnectionItemList","onConnectionItemClick","connection","StyledConnectionItemList","IMPORT_API_TYPE","googleimport","facebookimport","amazonImport","pinterestImport","CONNECTION_CONTEXT","_defineProperty","IMPORT_CONNECTION_TYPE_MAP","Import","FacebookImport","AmazonImport","PinterestImport","IMPORT_CONNECTION_PREFIX","Google","Facebook","Amazon","Pinterest","fetchScheduleData","serverContext","queryParam","importTypeOfFilter","apiFilter","cid","aid","urlPrefixModern","IMPORT_TYPE","constants","urlSearchParams","URLSearchParams","$top","$count","$filter","ServicesEndpoints","CampaignAPI","importTypeItems","ImportCenterMainMenuView","onImportTypeChange","onImportTypeItemClick","connections","allConnections","filter","onConnectionChange","addConnectionProperty","fetchConnectionData","isMCC","res","connectionSet","Set","connectionList","ImportTaskItemList","AdWordsImportContext","SessionId","AccountName","has","add","importTypePermission","importTypes","promises","importType","all","objs","obj","originalConnections","originalConnection","getAdsAccountConnections","connectionPermissions","generateStaticItems","routePrefix","connectionId","values","permissions","IsFacebookImportEnabled","IsAmazonImportEnabled","loadingData","handledConnections","finalConnections","currentType","toLowerCase","divider","mode","onToggle","isPanelMode","Mode","Expanded","connectionViewContainerClassName","mainMenuContainer","hidden","StyledCollapsibleSideBar","renderDivider","connectionLoading","StyledSpinnerWithLabel","StyledImportCenterMainMenuView","withRouter","withPreference","withResponsiveMainMenu","mainMenu","transition","majorComponentsContainer","defaultRoute","ImportCenterMainMenuAdapter","remove","updateUrlOnImportTypeClick","set","$current","uid","updateUrlOnConnectionClick","mainMenuScenario","createScenarioAndActivity","scenarioName","activityName","modePreferenceName","ImportCenterMainMenu","withServerContext","withScope","withInstrumentation","TempComponent","withImportSiteMap","processorSet"],"sourceRoot":""}