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BA,EAAgBtjB,KAAmB,qBAAPA,KAAmBA,UAAKrJ,GAAoB0sB,CAAS,C","sources":["../../seasonality-adjustment-page/src/i18n-map/i18n-map.js","../../seasonality-adjustment-page/src/i18n-map/scope-types.js","../../seasonality-adjustment-page/src/i18n-map/seasonality-schema.js","../../seasonality-adjustment-page/src/i18n-map/inline-edit.js","../../seasonality-adjustment-page/src/i18n-map/column-chooser.js","../../seasonality-adjustment-page/src/i18n-map/data-exclusions-schema.js","../../seasonality-adjustment-page/src/creation-form/sample-schema.js","../../seasonality-adjustment-page/src/adjustment-type.js","../../seasonality-adjustment-page/src/creation-form/seasonality-text-input.js","../../seasonality-adjustment-page/src/creation-form/error.js","../../seasonality-adjustment-page/src/i18n-map/campaign-selector-i18n.js","../../seasonality-adjustment-page/src/creation-form/seasonality-campaign-selector.js","../../seasonality-adjustment-page/src/creation-form/seasonality-scope-choice.js","../../seasonality-adjustment-page/src/creation-form/seasonality-device-choice.js","../../seasonality-adjustment-page/src/creation-form/seasonality-adjustment-rate-input.js","../../seasonality-adjustment-page/src/creation-form/seasonality-date-time-picker.js","../../seasonality-adjustment-page/src/i18n-map/error-map.js","../../seasonality-adjustment-page/src/i18n-map/localize-api-errors.js","../../seasonality-adjustment-page/src/creation-form/seasonality-adjustment-creation-form.js","../../seasonality-adjustment-page/src/pairs-to-map.js","../../seasonality-adjustment-page/src/selection-helper.js","../../seasonality-adjustment-page/src/grid/grid-view.js","../../seasonality-adjustment-page/src/grid/columns/seasonality-adjustment-name-column.js","../../seasonality-adjustment-page/src/grid/columns/base-column.js","../../seasonality-adjustment-page/src/grid/columns/scope-column.js","../../seasonality-adjustment-page/src/grid/columns/device-type-column.js","../../seasonality-adjustment-page/src/grid/columns/conversion-rate-adjustment.js","../../seasonality-adjustment-page/src/grid/columns/datetime-converter.js","../../seasonality-adjustment-page/src/grid/columns/date-column.js","../../seasonality-adjustment-page/src/grid/columns/description-column.js","../../seasonality-adjustment-page/src/grid/columns/index.js","../../seasonality-adjustment-page/src/grid/grid-config.js","../../seasonality-adjustment-page/src/styles.js","../../seasonality-adjustment-page/src/inline-edit.js","../../seasonality-adjustment-page/src/conversion-rate-prompt.js","../../seasonality-adjustment-page/src/description.js","../../seasonality-adjustment-page/src/seasonality-adjustment-page.js","../../seasonality-adjustment-page/src/fetch-preferences.js","../../seasonality-adjustment-page/src/filter-config.js","../../seasonality-adjustment-page/src/toolbar-action.js","../../seasonality-adjustment-page/src/toolbar-config.js","../../seasonality-adjustment-page/src/grid/columns/conversion-rate-adjustment.pug","../../seasonality-adjustment-page/src/grid/columns/device-type.pug","../../seasonality-adjustment-page/src/grid/columns/link-template.pug"],"sourcesContent":["import { CampaignTypes, DeviceTypes, seasonalityCampaignTypeFromODataValue } from './scope-types';\r\nimport { SeasonalitySchema } from './seasonality-schema';\r\nimport { DataExclusionSchema } from './data-exclusions-schema';\r\nimport { InlineEdit } from './inline-edit';\r\nimport { columnChooser } from './column-chooser';\r\n\r\nexport const i18nMap = {\r\n CampaignTypes,\r\n DeviceTypes,\r\n SeasonalitySchema,\r\n InlineEdit,\r\n seasonalityCampaignTypeFromODataValue,\r\n columnChooser,\r\n DataExclusionSchema,\r\n};\r\n\r\nexport function safeGetString(i18n, map, key, defaultStmt) {\r\n const englishString = map[key];\r\n\r\n if (!englishString) {\r\n // TODO: log error to kusto\r\n if (!defaultStmt) {\r\n return key;\r\n }\r\n return i18n.getString(defaultStmt);\r\n }\r\n\r\n return i18n.getString(englishString);\r\n}\r\n","export const CampaignTypes = {\r\n Shopping: _TL_('Shopping'),\r\n Default: _TL_('Search'),\r\n PerformanceMax: _TL_('Performance Max'),\r\n Audience: _TL_('Audience'),\r\n};\r\n\r\nexport const DeviceTypes = {\r\n Computers: _TL_('Computers'),\r\n Smartphones: _TL_('Smartphones'),\r\n Tablets: _TL_('Tablets'),\r\n};\r\n\r\nexport const seasonalityCampaignTypeToBulkUpsertValue = {\r\n Search: 'Search',\r\n Shopping: 'Shopping',\r\n PerformanceMax: 'PerformanceMax',\r\n Audience: 'Audience',\r\n};\r\n\r\nexport const seasonalityCampaignTypeFromODataValue = {\r\n Default: 'Default',\r\n Shopping: 'Shopping',\r\n PerformanceMax: 'PerformanceMax',\r\n Audience: 'Audience',\r\n};\r\n","export const SeasonalitySchema = {\r\n Schema_SeasonalityAdjustment_Property_Name: _TL_('Seasonality adjustment name'),\r\n Schema_SeasonalityAdjustment_Property_CampaignName: _TL_('Campaign name'),\r\n Schema_SeasonalityAdjustment_Property_CampaignTypeFilter: _TL_('Campaign type'),\r\n Schema_SeasonalityAdjustment_Property_DeviceTypeFilter: _TL_('Device type'),\r\n Schema_SeasonalityAdjustment_Property_AdjustmentPercentage: _TL_('Adjustment percentage'),\r\n Schema_SeasonalityAdjustment_Property_StartDate: _TL_('Start time'),\r\n Schema_SeasonalityAdjustment_Property_EndDate: _TL_('End time'),\r\n};\r\n","export const InlineEdit = {\r\n Grid_Edit_Cell: _TL_('Edit cell of column {{columnName}} and row {{rowIndex}}'),\r\n Validation_Base_Field_Not_Valid: _TL_('Field is not valid'),\r\n Validation_NotEmpty_Required_Field: _TL_('Required field'),\r\n Validation_String_Max_Length: _TL_('Field should not exceed {{maxlength}} characters'),\r\n KoSchema_String_RemainingCharactersText: _TL_('{{count}} characters remaining'),\r\n KoSchema_String_ExceededCharactersText: _TL_('Exceeded by {{count}} characters'),\r\n SimpleForm_Button_Save: _TL_('Save'),\r\n SimpleForm_Button_Cancel: _TL_('Cancel'),\r\n Validation_String_Invalid_Characters: _TL_('Field contains invalid characters'),\r\n Validation_Number_Require_Numeric: _TL_('Field requires numeric value'),\r\n Validation_Number_Max_Length: _TL_('Number should not exceed max length'),\r\n Validation_Number_Range_Min: _TL_('Number should be larger than {{min}}'),\r\n Validation_Number_Range_Max: _TL_('Number should be smaller than {{max}}'),\r\n Validation_Number_Range_Between: _TL_('Number should be between {{min}} and {{max}}'),\r\n conversionAdjustment_Options: _TL_('conversion adjustment options'),\r\n conversionAdjustment_Multiplier: _TL_('conversion rate adjustment'),\r\n};\r\n","export const columnChooser = {\r\n Attributes: _TL_('Attributes'),\r\n ColumnChooser_Add: _TL_('Add'),\r\n ColumnChooser_AddAllInList: _TL_('Add all columns'),\r\n ColumnChooser_AddColumn: _TL_('Add Column {{columnName}}'),\r\n ColumnChooser_Added: _TL_('Added'),\r\n ColumnChooser_Apply: _TL_('Apply'),\r\n ColumnChooser_ApplySavedColumns: _TL_('Apply'),\r\n ColumnChooser_AvailableColumnsHeader: _TL_('Available columns'),\r\n ColumnChooser_Cancel: _TL_('Cancel'),\r\n ColumnChooser_CancelReplace: _TL_('Cancel'),\r\n ColumnChooser_ConfirmCancel: _TL_('Cancel'),\r\n ColumnChooser_ConfirmRemove: _TL_('Remove'),\r\n ColumnChooser_ColumnNameAlreadyExistsPrompt: _TL_('There is already a set of columns with this name: {0}'),\r\n ColumnChooser_CustomColumnsCategory: _TL_('Custom Columns'),\r\n ColumnChooser_Disabled: _TL_('Add'),\r\n ColumnChooser_Entry: _TL_('Columns'),\r\n ColumnChooser_Header: _TL_('Modify columns'),\r\n ColumnChooser_IfReplaceColumnName: _TL_('Do you want to replace it?'),\r\n ColumnChooser_ModifyColumns: _TL_('Modify columns'),\r\n ColumnChooser_PromptBeforeRemove: _TL_('Are you sure you want to remove saved item: {0}'),\r\n ColumnChooser_Remove: _TL_('Remove'),\r\n ColumnChooser_RemoveAllInList: _TL_('Remove all columns'),\r\n ColumnChooser_RemoveAllSelected: _TL_('Remove all selected columns'),\r\n ColumnChooser_NoSearchResult: _TL_('No results found'),\r\n ColumnChooser_RemoveColumn: _TL_('Remove Column {{columnName}}'),\r\n ColumnChooser_RemoveSavedColumns: _TL_('Remove'),\r\n ColumnChooser_SaveColumnDescription: _TL_('Save this set of columns'),\r\n ColumnChooser_Search_Column: _TL_('Search column'),\r\n ColumnChooser_SelectedColumnsHeader: _TL_('Selected columns (drag and drop to reorder)'),\r\n ColumnChooser_SelectedColumnsHeader_BottomHalf: _TL_('Selected columns'),\r\n ColumnChooser_SelectedColumnsHeader_TopHalf: _TL_('Selected rows'),\r\n ColumnChooser_SubHeader: _TL_(''),\r\n ColumnChooser_ConfirmReplace: _TL_('Replace'),\r\n ColumnsMenu_Custom: _TL_('Custom'),\r\n CustomColumn_DoesNotExist: _TL_('This custom column does not exists.'),\r\n ColumnName_Clicks: _TL_('Clicks'),\r\n ColumnName_Impressions: _TL_('Impr.'),\r\n ColumnName_Spend: _TL_('Spend'),\r\n ColumnChooser_LiftColumn: _TL_('You have lifted the {{columnName}} column in position {{positionFrom}}.'),\r\n ColumnChooser_MoveColumn: _TL_('You have moved the {{columnName}} column from position {{positionFrom}} to position {{positionTo}}.'),\r\n ColumnChooser_DropColumn: _TL_('You have dropped the {{columnName}} column. You have moved the {{columnName}} column from position {{positionFrom}} to position {{positionTo}}.'),\r\n ColumnChooser_RemovedColumns: _TL_('You have removed the {{columnNames}} columns.'),\r\n ColumnChooser_RemovedColumn: _TL_('You have removed the {{columnNames}} column.'),\r\n ColumnChooser_AddedColumns: _TL_('You have added the {{columnNames}} columns.'),\r\n ColumnChooser_AddedColumn: _TL_('You have added the {{columnNames}} column.'),\r\n};\r\n","export const DataExclusionSchema = {\r\n Schema_SeasonalityAdjustment_Property_Name: _TL_('Data exclusion name'),\r\n Schema_SeasonalityAdjustment_Property_CampaignName: _TL_('Campaign name'),\r\n Schema_SeasonalityAdjustment_Property_CampaignTypeFilter: _TL_('Campaign type'),\r\n Schema_SeasonalityAdjustment_Property_DeviceTypeFilter: _TL_('Device type'),\r\n Schema_SeasonalityAdjustment_Property_AdjustmentPercentage: _TL_('Adjustment percentage'),\r\n Schema_SeasonalityAdjustment_Property_StartDate: _TL_('Start time'),\r\n Schema_SeasonalityAdjustment_Property_EndDate: _TL_('End time'),\r\n};\r\n","export const sampleSchema = {\r\n name: 'Seasonality Schema',\r\n type: 'object',\r\n properties: {\r\n Name: {\r\n type: 'string',\r\n required: true,\r\n maxLength: 255,\r\n },\r\n Description: {\r\n type: 'string',\r\n maxLength: 1000,\r\n },\r\n AdjustmentPercentage: {\r\n // type: 'number',\r\n // seems like this is totally useless\r\n type: 'decimal',\r\n required: true,\r\n minimum: 0,\r\n maximum: 900,\r\n },\r\n },\r\n};\r\n","export const AdjustmentType = {\r\n SeasonalityAdjustment: 'SeasonalityAdjustment',\r\n DataExclusion: 'DataExclusion',\r\n};\r\n\r\nexport function isDataExclusion(adjustmentType) {\r\n return adjustmentType === AdjustmentType.DataExclusion;\r\n}","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\nimport { ValidationGroup, Input } from '@bingads-webui-react/primitive-validation';\r\nimport { sampleSchema } from './sample-schema';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nconst schema = sampleSchema;\r\n\r\nfunction getStyles() {\r\n return {\r\n textInput: {\r\n width: '50%',\r\n marginBottom: '16px',\r\n '& div[role=alert]': {\r\n paddingTop: 5,\r\n fontSize: 12,\r\n },\r\n },\r\n };\r\n}\r\n\r\nfunction SeasonalityTextInput(props) {\r\n const {\r\n classes,\r\n i18n,\r\n showValidationError,\r\n onValidate,\r\n onChangeName,\r\n onChangeDescription,\r\n name,\r\n description,\r\n adjustmentType,\r\n } = props;\r\n\r\n function onChange(result) {\r\n onValidate(result.isValid);\r\n onChangeName(result.data.Name);\r\n onChangeDescription(result.data.Description);\r\n }\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\n}\r\n\r\nSeasonalityTextInput.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onChangeName: PropTypes.func.isRequired,\r\n onChangeDescription: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n showValidationError: PropTypes.bool,\r\n name: PropTypes.string,\r\n description: PropTypes.string,\r\n};\r\n\r\nSeasonalityTextInput.defaultProps = {\r\n showValidationError: false,\r\n name: undefined,\r\n description: undefined,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n withI18nConsumer,\r\n Comp => withDefaultStyles(Comp, getStyles)\r\n)(SeasonalityTextInput);\r\n\r\nexport { Wrapped as SeasonalityTextInput };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nfunction getStyles(__, { palette = {} }) {\r\n return {\r\n errorContainer: {\r\n color: palette.redDark,\r\n fontSize: 12, // If not set, the default font size is 14px\r\n },\r\n };\r\n}\r\n\r\nfunction Error(props) {\r\n const { classes, message } = props;\r\n\r\n return (\r\n
\r\n {message}\r\n
\r\n );\r\n}\r\n\r\nError.propTypes = {\r\n classes: PropTypes.shape({}).isRequired,\r\n message: PropTypes.string,\r\n};\r\n\r\nError.defaultProps = {\r\n message: '',\r\n};\r\n\r\nconst Wrapped = withDefaultStyles(Error, getStyles);\r\n\r\nexport { Wrapped as Error };\r\n","export const i18nData = {\r\n CampaignSelector_List_Header: _TL_('Available entities: {{itemCount}}'),\r\n CampaignSelector_EmptyList_Content: _TL_('No items found'),\r\n EntitySelector_Pagination_Page: _TL_('Page: '),\r\n EntitySelector_Pagination_TotalPageCountText: _TL_(' of '),\r\n EntitySelector_Pagination_PreviousPageText: _TL_('Previous page'),\r\n EntitySelector_Pagination_NextPageText: _TL_('Next page'),\r\n EntitySelector_Search_Placeholder: _TL_('search'),\r\n CampaignSelector_SelectCampaign: _TL_('Select campaign'),\r\n CampaignSelector_SelectCampaigns: _TL_('Select campaigns'),\r\n CampaignSelector_Result_List_Header: _TL_('selected entities: {{itemCount}}'),\r\n CampaignSelector_Result_Action_Bar: _TL_('Select all on this page'),\r\n 'Remove all': _TL_('Remove all'),\r\n Done: _TL_('Done'),\r\n Cancel: _TL_('Cancel'),\r\n};\r\n\r\n","/* eslint-disable jsx-a11y/label-has-for */\r\nimport React, { useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { CampaignSelector } from '@bingads-webui-campaign-react/campaign-selector';\r\nimport { campaignMultiSelectorWithoutDropdownStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { buildMergedI18n } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { Error } from './error';\r\nimport { i18nData } from '../i18n-map/campaign-selector-i18n';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nconst PAGE_SIZE = 20;\r\n\r\nfunction getStyles(dummy, { palette = {} }) {\r\n const textOverflowStyle = {\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n };\r\n\r\n return {\r\n campaignSelector: {\r\n ...campaignMultiSelectorWithoutDropdownStyle({ palette }),\r\n '& .ba-campaign-selector .multi-selector-content > .ba-entity-selector': {\r\n minWidth: 600,\r\n },\r\n marginTop: 8,\r\n marginLeft: 30,\r\n marginBottom: 20,\r\n position: 'relative',\r\n\r\n '& .error': {\r\n marginTop: 5,\r\n },\r\n },\r\n rowItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n padding: 8,\r\n maxWidth: 'unset !important',\r\n },\r\n campaignNameColumn: {\r\n width: 300,\r\n marginRight: 10,\r\n ...textOverflowStyle,\r\n },\r\n campaignTypeColumn: {\r\n width: 130,\r\n marginRight: 10,\r\n ...textOverflowStyle,\r\n },\r\n arrowIcon: {\r\n marginLeft: '0 !important',\r\n marginRight: '0 !important',\r\n },\r\n selectionCount: {\r\n position: 'absolute',\r\n top: 36,\r\n left: 9,\r\n background: '#fff',\r\n pointerEvents: 'none',\r\n },\r\n };\r\n}\r\n\r\nfunction getErrorMessage(selectedCampaigns) {\r\n if (_.isEmpty(selectedCampaigns)) {\r\n return _TL_('Campaign is required. Select one or more campaigns.');\r\n }\r\n\r\n return _TL_('');\r\n}\r\n\r\nexport function validator(selectedCampaigns) {\r\n return _.isEmpty(getErrorMessage(selectedCampaigns));\r\n}\r\n\r\nfunction renderHeaderFactory({ classes, i18n, isSelected }) {\r\n return function renderHeader(itemCount) {\r\n return (\r\n
\r\n
\r\n \r\n {`${i18n.getString(isSelected ? _TL_('Selected campaigns:') : _TL_('Campaigns:'))} ${itemCount}`}\r\n \r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Campaign type'))}\r\n \r\n
\r\n
\r\n );\r\n };\r\n}\r\n\r\nfunction renderItemFactory({\r\n classes, i18n, isSelected, permissions,\r\n}) {\r\n return function renderItem(item, index, forwardedRef) {\r\n const { isAddedToResultList } = item;\r\n const rowItemClass = isAddedToResultList ? 'added-to-result-list' : '';\r\n const addIconClass = isAddedToResultList ? 'disabled' : 'enabled';\r\n const CampaignTypeMapping = {\r\n Default: 'Search',\r\n Shopping: 'Shopping',\r\n };\r\n if (permissions.dynamic.PerformanceMaxCampaigns) {\r\n CampaignTypeMapping.PerformanceMax = 'PerformanceMax';\r\n }\r\n if (permissions.IsDataExclusionForAudienceCampaignEnabled) {\r\n CampaignTypeMapping.Audience = 'Audience';\r\n }\r\n const campaignType = i18n.getString(_TL_(CampaignTypeMapping[item.CampaignType]));\r\n\r\n return (\r\n
\r\n
\r\n {item.name}\r\n
\r\n
\r\n {campaignType}\r\n
\r\n {isSelected ?\r\n :\r\n \r\n }\r\n
\r\n );\r\n };\r\n}\r\n\r\nfunction SeasonalityCampaignSelector(props) {\r\n const {\r\n classes,\r\n selectedCampaigns,\r\n onSelectCampaigns,\r\n showValidationError,\r\n i18n,\r\n adjustmentType,\r\n permissions,\r\n } = props;\r\n\r\n const selectorRef = useRef(null);\r\n\r\n const errorMessage = showValidationError ? i18n.getString(getErrorMessage(selectedCampaigns)) : '';\r\n\r\n const mergedI18n = buildMergedI18n({ i18n, legacyStringMap: i18nData });\r\n\r\n const campaignType = [\"Enum.CampaignType'Default'\", \"Enum.CampaignType'Shopping'\"];\r\n\r\n if (permissions.dynamic.PerformanceMaxCampaigns) {\r\n campaignType.push(\"Enum.CampaignType'PerformanceMax'\");\r\n }\r\n\r\n if (permissions.IsDataExclusionForAudienceCampaignEnabled && isDataExclusion(adjustmentType)) {\r\n campaignType.push(\"Enum.CampaignType'Audience'\");\r\n }\r\n\r\n const whereClause = {\r\n CampaignType: {\r\n $in: campaignType,\r\n },\r\n };\r\n\r\n function fetchCampaigns({\r\n pageNumber,\r\n pageSize,\r\n query,\r\n }) {\r\n const odataParams = {\r\n select: ['Id', 'Name', 'CampaignType'],\r\n limit: pageSize,\r\n offset: pageNumber * pageSize,\r\n where: whereClause,\r\n };\r\n\r\n if (query) {\r\n odataParams.where = {\r\n $and: [\r\n odataParams.where,\r\n {\r\n Name: { $contains: query },\r\n },\r\n ],\r\n };\r\n }\r\n\r\n return jsdata.Campaign.findAll(odataParams)\r\n .then((cmps) => {\r\n const { totalCount } = cmps;\r\n const items = _.map(cmps, cmp => ({\r\n Id: cmp.Id,\r\n name: cmp.Name,\r\n CampaignType: cmp.CampaignType,\r\n }));\r\n\r\n return {\r\n items,\r\n totalCount,\r\n };\r\n })\r\n .catch(() =>\r\n ({\r\n items: [],\r\n totalCount: 0,\r\n }));\r\n }\r\n\r\n function onSelectDone(items) {\r\n onSelectCampaigns(items);\r\n }\r\n\r\n function onSelectCancel() {\r\n // Nothing to do\r\n }\r\n\r\n return (\r\n
\r\n (selectedCampaigns.length > 0 ?\r\n i18n.getString(_TL_('{{count}} campaign(s) selected'), { count: selectedCampaigns.length }) : i18n.getString(_TL_('Select campaigns')))\r\n }\r\n ref={selectorRef}\r\n />\r\n \r\n
\r\n );\r\n}\r\n\r\n\r\nSeasonalityCampaignSelector.propTypes = {\r\n classes: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n onSelectCampaigns: PropTypes.func.isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n showValidationError: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaigns: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nSeasonalityCampaignSelector.defaultProps = {\r\n showValidationError: PropTypes.false,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n React.memo,\r\n Comp => withDefaultStyles(Comp, getStyles),\r\n withPermissions\r\n)(SeasonalityCampaignSelector);\r\n\r\nexport { Wrapped as SeasonalityCampaignSelector };\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ChoiceGroup, Checkbox, Label } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { SeasonalityCampaignSelector, validator as campaignSelectionValidator } from './seasonality-campaign-selector';\r\nimport { Error } from './error';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nfunction getStyles() {\r\n return {\r\n scopeChoices: {\r\n marginBottom: '10px',\r\n },\r\n scopeCheckbox: {\r\n marginLeft: '30px',\r\n '& div[role=alert]': {\r\n paddingTop: 5,\r\n },\r\n },\r\n };\r\n}\r\n\r\nconst getErrorMessage = (selectedCampaignTypes, selectedScope) => {\r\n if (selectedScope === 'type') {\r\n if (_.isEmpty(selectedCampaignTypes)) {\r\n return _TL_('Campaign type is required. Select one or more campaign types.');\r\n }\r\n }\r\n return _TL_('');\r\n};\r\n\r\nconst choiceOptionStyle = {\r\n root: {\r\n '& > div > div > label': {\r\n padding: '0',\r\n },\r\n },\r\n};\r\n\r\nexport function validateScope({ selectedScope, selectedCampaignTypes, selectedCampaigns }) {\r\n const isTypeValid = _.isEmpty(getErrorMessage(selectedCampaignTypes, selectedScope));\r\n const isCampaignSelectionValid = selectedScope === 'specific' ? campaignSelectionValidator(selectedCampaigns) : true;\r\n\r\n return isTypeValid && isCampaignSelectionValid;\r\n}\r\n\r\nfunction SeasonalityScopeChoice(props) {\r\n const {\r\n classes,\r\n i18n,\r\n selectedScope,\r\n setSelectedScope,\r\n selectedCampaignTypes,\r\n selectedCampaigns,\r\n onSelectCampaigns,\r\n onSelectedCampaignTypeChanged,\r\n showValidationError,\r\n adjustmentType,\r\n permissions,\r\n } = props;\r\n\r\n const errorMessage = useMemo(\r\n () => (showValidationError ? i18n.getString(getErrorMessage(selectedCampaignTypes, selectedScope)) : ''),\r\n [i18n, selectedCampaignTypes, selectedScope, showValidationError]\r\n );\r\n\r\n const options = useMemo(() => [\r\n {\r\n key: 'type',\r\n text: i18n.getString(_TL_('Campaign type')),\r\n onRenderLabel: () => (\r\n \r\n \r\n {i18n.getString(_TL_('Campaign type'))}\r\n \r\n \r\n \r\n ),\r\n onRenderField: (optionProps, render) => (\r\n
\r\n {optionProps && render(optionProps)}\r\n {optionProps.checked &&\r\n (\r\n
\r\n type === 'Default')}\r\n />\r\n type === 'Shopping')}\r\n />\r\n {\r\n permissions.dynamic.PerformanceMaxCampaigns &&\r\n type === 'PerformanceMax')}\r\n />\r\n }\r\n {\r\n permissions.IsDataExclusionForAudienceCampaignEnabled && isDataExclusion(adjustmentType) &&\r\n type === 'Audience')}\r\n />\r\n }\r\n \r\n
\r\n )\r\n }\r\n
\r\n ),\r\n styles: choiceOptionStyle,\r\n },\r\n {\r\n key: 'specific',\r\n text: i18n.getString(_TL_('Specific campaigns')),\r\n onRenderField: (optionProps, render) => (\r\n
\r\n {optionProps && render(optionProps)}\r\n {optionProps.checked && (\r\n \r\n )}\r\n
\r\n ),\r\n styles: choiceOptionStyle,\r\n },\r\n ], [classes.scopeCheckbox, errorMessage, i18n, onSelectCampaigns, onSelectedCampaignTypeChanged, selectedCampaignTypes, selectedCampaigns, showValidationError, adjustmentType, permissions.dynamic.PerformanceMaxCampaigns]);\r\n\r\n const onChange = (_event, option) => {\r\n setSelectedScope(option.key);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nSeasonalityScopeChoice.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n selectedCampaignTypes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n setSelectedScope: PropTypes.func.isRequired,\r\n selectedScope: PropTypes.string.isRequired,\r\n showValidationError: PropTypes.bool.isRequired,\r\n onSelectedCampaignTypeChanged: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.shape()).isRequired,\r\n onSelectCampaigns: PropTypes.func.isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaigns: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nconst Wrapped = _.compose(Comp => withDefaultStyles(Comp, getStyles), withPermissions)(SeasonalityScopeChoice);\r\n\r\nexport { Wrapped as SeasonalityScopeChoice };\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\nimport { Stack, Checkbox } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { Error } from './error';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nfunction getStyles() {\r\n return {\r\n deviceChoices: {\r\n marginBottom: '16px',\r\n '& div[role=alert]': {\r\n paddingTop: 5,\r\n },\r\n },\r\n };\r\n}\r\nconst device = {\r\n Computers: 'Computers',\r\n Smartphones: 'Smartphones',\r\n Tablets: 'Tablets',\r\n};\r\n\r\nconst getErrorMessage = (selectedDevices) => {\r\n if (_.isEmpty(selectedDevices)) return _TL_('Device is required. Select one or more devices.');\r\n return _TL_('');\r\n};\r\nconst stackTokens = { childrenGap: 40 };\r\n\r\nexport function validateDevices(selectedDevices) {\r\n return _.isEmpty(getErrorMessage(selectedDevices));\r\n}\r\nfunction SeasonalityDeviceChoice(props) {\r\n const {\r\n classes, i18n, selectedDevices, onSelectedDevicesChanged, showValidationError, adjustmentType\r\n } = props;\r\n\r\n const errorMessage = useMemo(() => (showValidationError ? i18n.getString(getErrorMessage(selectedDevices)) : ''), [i18n, selectedDevices, showValidationError]);\r\n const isComputerSelected = useMemo(() => _.contains(selectedDevices, device.Computers), [selectedDevices]);\r\n const isSmartphoneSelected = useMemo(() => _.contains(selectedDevices, device.Smartphones), [selectedDevices]);\r\n const isTabletSelected = useMemo(() => _.contains(selectedDevices, device.Tablets), [selectedDevices]);\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\n\r\nSeasonalityDeviceChoice.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n selectedDevices: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onSelectedDevicesChanged: PropTypes.func.isRequired,\r\n showValidationError: PropTypes.bool.isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n withI18nConsumer,\r\n Comp => withDefaultStyles(Comp, getStyles)\r\n)(SeasonalityDeviceChoice);\r\n\r\nexport { Wrapped as SeasonalityDeviceChoice };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\nimport { withValidation, withError } from '@bingads-webui-react/validation';\r\nimport { Stack, Dropdown, TextField } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { sampleSchema as schema } from './sample-schema';\r\nimport { Error } from './error';\r\n\r\nconst ValidatedInput = withError(withValidation(TextField));\r\n\r\nfunction getStyles() {\r\n return {\r\n adjustmentInput: {\r\n marginBottom: 10,\r\n },\r\n };\r\n}\r\n\r\nconst getErrorMessage = (selectedSymbol, adjustmentRate) => {\r\n if (!adjustmentRate) return _TL_('Conversion rate is required. Enter a percentage.');\r\n if ((adjustmentRate < 0) || isNaN(adjustmentRate) ||\r\n (selectedSymbol === 'increase' && adjustmentRate > 900) ||\r\n (selectedSymbol === 'decrease' && adjustmentRate > 90)) {\r\n return _TL_('Percentage is not valid. Enter a conversion rate between -90% and 900%.');\r\n }\r\n return _TL_('');\r\n};\r\n\r\nexport function validateConversionRate(selectedSymbol, adjustmentRate) {\r\n return _.isEmpty(getErrorMessage(selectedSymbol, adjustmentRate));\r\n}\r\n\r\nfunction SeasonalityAdjustmentRateInput(props) {\r\n const {\r\n classes, i18n, onValidate, setAdjustmentRate, setSelectedSymbol, selectedSymbol, adjustmentRate, showValidationError,\r\n } = props;\r\n\r\n function onChangePercentageInput(result) {\r\n onValidate(result.isValid);\r\n setAdjustmentRate(result.data.AdjustmentPercentage);\r\n }\r\n\r\n const onSymbolChange = (event, option) => {\r\n setSelectedSymbol(option.key);\r\n };\r\n\r\n const options = [\r\n {\r\n key: 'increase',\r\n text: i18n.getString(_TL_('Increase')),\r\n },\r\n {\r\n key: 'decrease',\r\n text: i18n.getString(_TL_('Decrease')),\r\n },\r\n ];\r\n\r\n const errorMessage = showValidationError ? i18n.getString(getErrorMessage(selectedSymbol, adjustmentRate)) : '';\r\n\r\n const stackTokens = { childrenGap: 10 };\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\nSeasonalityAdjustmentRateInput.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n setSelectedSymbol: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n setAdjustmentRate: PropTypes.func.isRequired,\r\n selectedSymbol: PropTypes.string.isRequired,\r\n adjustmentRate: PropTypes.string.isRequired,\r\n showValidationError: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n withI18nConsumer,\r\n Comp => withDefaultStyles(Comp, getStyles)\r\n)(SeasonalityAdjustmentRateInput);\r\n\r\nexport { Wrapped as SeasonalityAdjustmentRateInput };\r\n","/* istanbul ignore file */\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { DateTimePicker } from '@bingads-webui-react/date-time-picker';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { Error } from './error';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nfunction getStyles() {\r\n return {\r\n seasonalityDateTimePicker: {\r\n marginBottom: '16px',\r\n '& div[role=alert]': {\r\n paddingTop: 5,\r\n },\r\n },\r\n };\r\n}\r\n\r\nconst getDifferenceInDays = (date1, date2) => {\r\n const diffInMs = (date2 - date1);\r\n return diffInMs / (1000 * 60 * 60 * 24);\r\n};\r\n\r\n// validation\r\n// start date > end date\r\n// 0 < range < 14\r\nconst getErrorMessage = (selectedStartDate, selectedStartTime, selectedEndDate, selectedEndTime) => {\r\n if (!selectedStartDate || !selectedStartTime || !selectedEndDate || !selectedEndTime) {\r\n return _TL_('Time is required. Select a time.');\r\n }\r\n\r\n const startDateTime = new Date(selectedStartDate).setHours(selectedStartTime);\r\n const endDateTime = new Date(selectedEndDate).setHours(selectedEndTime);\r\n\r\n if (startDateTime >= endDateTime) return _TL_('Date range is not valid. End date should be after the start date.');\r\n if (getDifferenceInDays(startDateTime, endDateTime) > 14) return _TL_('Date range is not valid. Enter a date range that is 14 days or less.');\r\n\r\n return _TL_('');\r\n};\r\n\r\nexport function validateDateTimeRange(selectedStartDate, selectedStartTime, selectedEndDate, selectedEndTime) {\r\n return _.isEmpty(getErrorMessage(selectedStartDate, selectedStartTime, selectedEndDate, selectedEndTime));\r\n}\r\n\r\nfunction getDate(date) {\r\n const newDate = new Date(Date.UTC(date.year, date.month - 1, date.day, 0, 0, 0));\r\n\r\n return newDate;\r\n}\r\n\r\nfunction SeasonalityDateTimePicker(props) {\r\n const {\r\n i18n, classes, selectedStartDate, setSelectedStartDate,\r\n selectedEndDate, setSelectedEndDate, selectedStartTime,\r\n setSelectedStartTime, selectedEndTime, setSelectedEndTime,\r\n showValidationError, adjustmentType,\r\n } = props;\r\n\r\n const onStartDateChange = useCallback((date) => {\r\n setSelectedStartDate(getDate(date));\r\n }, [setSelectedStartDate]);\r\n\r\n const onEndDateChange = useCallback((date) => {\r\n setSelectedEndDate(getDate(date));\r\n }, [setSelectedEndDate]);\r\n\r\n const onStartTimeChange = useCallback(\r\n option => setSelectedStartTime(option.key),\r\n [setSelectedStartTime]\r\n );\r\n\r\n const onEndTimeChange = useCallback(\r\n option => setSelectedEndTime(option.key),\r\n [setSelectedEndTime]\r\n );\r\n\r\n const errorMessage = useMemo(\r\n () => (\r\n showValidationError ?\r\n i18n.getString(getErrorMessage(selectedStartDate, selectedStartTime, selectedEndDate, selectedEndTime)) : ''),\r\n [i18n, selectedEndDate, selectedEndTime, selectedStartDate, selectedStartTime, showValidationError]\r\n );\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\n \r\n
\r\n );\r\n}\r\n\r\nSeasonalityDateTimePicker.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n setSelectedStartDate: PropTypes.func.isRequired,\r\n selectedStartDate: PropTypes.instanceOf(Date).isRequired,\r\n setSelectedEndDate: PropTypes.func.isRequired,\r\n selectedEndDate: PropTypes.instanceOf(Date).isRequired,\r\n selectedStartTime: PropTypes.string.isRequired,\r\n selectedEndTime: PropTypes.string.isRequired,\r\n setSelectedStartTime: PropTypes.func.isRequired,\r\n setSelectedEndTime: PropTypes.func.isRequired,\r\n showValidationError: PropTypes.bool.isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n withI18nConsumer,\r\n Comp => withDefaultStyles(Comp, getStyles)\r\n)(SeasonalityDateTimePicker);\r\n\r\nexport { Wrapped as SeasonalityDateTimePicker };\r\n","const generalErrorMap = {\r\n NameExceededMaxLen: _TL_('Name exceeds the limit of 255 characters.'),\r\n DescriptionExceededMaxLen: _TL_('Description exceeds the limit of 2048 characters.'),\r\n CampaignAssociationsLimitExceeded: _TL_('Campaign association exceeds the limit of 2,000.'),\r\n InvalidDateTime: _TL_('Date range is not valid. End date should be after the start date.'),\r\n InvalidDateRange: _TL_('Date range is not valid. Enter a date range that is 14 days or less.'),\r\n DeviceTypeFilterIsNullOrEmpty: _TL_('Device is required. Select one or more devices.'),\r\n SeasonalityAdjustmentIsNull: _TL_('Conversion rate is required. Enter a percentage.'),\r\n InvalidAdjustmentPercentage: _TL_('Percentage is not valid. Enter a conversion rate between -90% and 900%.'),\r\n};\r\n\r\nexport const seasonalityErrorMap = {\r\n ...generalErrorMap,\r\n EntityDoesNotExist: _TL_('This seasonality adjustment does not exist.'),\r\n InvalidSeasonalityAdjustmentId: _TL_('This seasonality adjustment does not exist.'),\r\n NameIsNullOrEmpty: _TL_(\"Seasonality adjustment Name can't be empty.\"),\r\n InvalidCampaignAssociationsAndCampaignTypeFilterCombination: _TL_(\"Seasonality adjustment campaign associations and campaign type filter can't both be empty or both not empty.\"),\r\n};\r\n\r\nexport const dataExclusionErrorMap = {\r\n ...generalErrorMap,\r\n EntityDoesNotExist: _TL_('This data exclusion does not exist.'),\r\n InvalidSeasonalityAdjustmentId: _TL_('This data exclusion does not exist.'),\r\n NameIsNullOrEmpty: _TL_(\"Data exclusion Name can't be empty.\"),\r\n InvalidCampaignAssociationsAndCampaignTypeFilterCombination: _TL_(\"Data exclusion campaign associations and campaign type filter can't both be empty or both not empty.\"),\r\n};\r\n","import * as putil from '@bingads-webui-universal/primitive-utilities';\r\nimport { AdjustmentType } from '../adjustment-type';\r\nimport { dataExclusionErrorMap, seasonalityErrorMap } from './error-map';\r\n\r\nexport function localizeErrorCode(errorCode, i18n, adjustmentType) {\r\n if (errorCode) {\r\n const errorString = adjustmentType === AdjustmentType.SeasonalityAdjustment ?\r\n seasonalityErrorMap[errorCode] :\r\n dataExclusionErrorMap[errorCode];\r\n if (errorString) {\r\n return i18n.getString(errorString);\r\n }\r\n }\r\n return i18n.getString(_TL_(\"We've encountered an error and could not finish this task. Please try again or contact support.\"));\r\n}\r\n\r\nexport function localizeApiError(error, i18n, adjustmentType) {\r\n const firstError = putil.get(error, 'errors[0]', {});\r\n const errorCode =\r\n // for OData error\r\n firstError.Code ||\r\n // for bulk upsert error\r\n firstError.Error;\r\n\r\n return localizeErrorCode(errorCode, i18n, adjustmentType);\r\n}\r\n","import _ from 'underscore';\r\nimport React, { useContext, useState, useCallback, useEffect, Fragment } from 'react';\r\nimport { CivilDate } from 'tc39-proposal-temporal';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DefaultButton, PrimaryButton } from '@bingads-webui-react/fabric-control';\r\nimport { Separator } from '@fluentui/react';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { storeSeasonalityAdjustmentName, getSeasonalityAdjustmentName } from '@bingads-webui-campaign/seasonality-id-name-utils';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { SeasonalityTextInput } from './seasonality-text-input';\r\nimport { SeasonalityScopeChoice, validateScope } from './seasonality-scope-choice';\r\nimport { SeasonalityDeviceChoice, validateDevices } from './seasonality-device-choice';\r\nimport { SeasonalityAdjustmentRateInput, validateConversionRate } from './seasonality-adjustment-rate-input';\r\nimport { SeasonalityDateTimePicker, validateDateTimeRange } from './seasonality-date-time-picker';\r\nimport { localizeApiError } from '../i18n-map/localize-api-errors';\r\nimport { Error } from './error';\r\nimport { AdjustmentType, isDataExclusion } from '../adjustment-type';\r\n\r\nfunction getStyles() {\r\n return {\r\n saveButton: {\r\n marginRight: 8,\r\n },\r\n };\r\n}\r\n\r\nfunction SeasonalityAdjustmentCreationPanel(props) {\r\n const {\r\n onCancel,\r\n onSuccess,\r\n seasonalityId,\r\n isUpdate,\r\n scope,\r\n classes,\r\n adjustmentType,\r\n permissions,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const campaignTypes = ['Default', 'Shopping'];\r\n\r\n if (permissions.dynamic.PerformanceMaxCampaigns) {\r\n campaignTypes.push('PerformanceMax');\r\n }\r\n\r\n if (permissions.IsDataExclusionForAudienceCampaignEnabled && isDataExclusion(adjustmentType)) {\r\n campaignTypes.push('Audience');\r\n }\r\n\r\n const [seasonalityName, setSeasonalityName] = useState('');\r\n const [seasonalityDescription, setSeasonalityDescription] = useState('');\r\n const [selectedStartDate, setSelectedStartDate] = useState(undefined);\r\n const [selectedEndDate, setSelectedEndDate] = useState(undefined);\r\n const [selectedStartTime, setSelectedStartTime] = useState('');\r\n const [selectedEndTime, setSelectedEndTime] = useState('');\r\n const [selectedScope, setSelectedScope] = useState('type');\r\n const [selectedCampaigns, setSelectedCampaigns] = useState([]);\r\n const [isValidText, setIsValidText] = useState(false);\r\n const [showValidationError, setShowValidationError] = useState(false);\r\n const [selectedCampaignTypes, setSelectedCampaignTypes] = useState(campaignTypes);\r\n const [selectedDevices, setSelectedDevices] = useState(['Computers', 'Smartphones', 'Tablets']);\r\n const [selectedSymbol, setSelectedSymbol] = useState('increase');\r\n const initialAdjustmentRate = isDataExclusion(adjustmentType) ? '0' : '';\r\n const [adjustmentRate, setAdjustmentRate] = useState(initialAdjustmentRate);\r\n const [isValidRate, setIsValidRate] = useState(true);\r\n const [isLoading, setIsLoading] = useState(isUpdate);\r\n const [apiError, setApiError] = useState('');\r\n\r\n /* istanbul ignore next */\r\n useEffect(() => {\r\n if (isUpdate) {\r\n setIsLoading(true);\r\n\r\n jsdata.SeasonalityAdjustment.find(seasonalityId).then((response) => {\r\n setSeasonalityName(response.Name);\r\n setSeasonalityDescription(response.Description);\r\n setSelectedDevices(response.DeviceTypeFilter);\r\n const startDate = i18n.dateParser({\r\n raw: 'yyyy-MM-ddTHH:mm:ss',\r\n })(response.StartDate.substr(0, 19));\r\n const endDate = i18n.dateParser({\r\n raw: 'yyyy-MM-ddTHH:mm:ss',\r\n })(response.EndDate.substr(0, 19));\r\n\r\n setSelectedStartDate(new CivilDate(\r\n startDate.getFullYear(),\r\n startDate.getMonth() + 1,\r\n startDate.getDate()\r\n ));\r\n setSelectedEndDate(new CivilDate(\r\n endDate.getFullYear(),\r\n endDate.getMonth() + 1,\r\n endDate.getDate()\r\n ));\r\n\r\n setSelectedStartTime(startDate.getHours().toString());\r\n setSelectedEndTime(endDate.getHours().toString());\r\n setSelectedScope(_.isEmpty(response.CampaignTypeFilter) ? 'specific' : 'type');\r\n setSelectedCampaignTypes(response.CampaignTypeFilter);\r\n setSelectedCampaigns(_.map(response.CampaignAssociations, cmp => ({\r\n Id: cmp.CampaignId,\r\n name: cmp.CampaignName,\r\n CampaignType: cmp.CampaignType,\r\n })));\r\n setSelectedSymbol(response.AdjustmentPercentage > 0 ? 'increase' : 'decrease');\r\n setAdjustmentRate(Math.abs(response.AdjustmentPercentage).toString());\r\n }).catch((response) => {\r\n const fetchErrorMsg = localizeApiError(response, i18n, adjustmentType);\r\n notificationApi.showWarning(fetchErrorMsg);\r\n onSuccess();\r\n }).finally(() => {\r\n setIsLoading(false);\r\n });\r\n }\r\n }, [i18n, isUpdate, onSuccess, scope, seasonalityId]);\r\n\r\n const onSelectedCampaignTypeChanged = useCallback((event, item) => {\r\n setSelectedCampaignTypes(item ? [...selectedCampaignTypes, event.target.name] :\r\n _.without(selectedCampaignTypes, event.target.name));\r\n }, [selectedCampaignTypes]);\r\n\r\n const onSelectedDevicesChanged = useCallback((event, item) => {\r\n setSelectedDevices(item ? [...selectedDevices, event.target.name] :\r\n _.without(selectedDevices, event.target.name));\r\n }, [selectedDevices]);\r\n\r\n const validate = useCallback(() => {\r\n const validators = [\r\n () => isValidText,\r\n () => isValidRate,\r\n () => validateScope({ selectedScope, selectedCampaignTypes, selectedCampaigns }),\r\n () => validateDevices(selectedDevices),\r\n () => validateConversionRate(selectedSymbol, adjustmentRate),\r\n () => validateDateTimeRange(selectedStartDate, selectedStartTime, selectedEndDate, selectedEndTime),\r\n ];\r\n const validationResults = validators.map(fn => fn());\r\n const allValid = _.all(validationResults);\r\n if (!allValid) {\r\n setShowValidationError(true);\r\n }\r\n return allValid;\r\n }, [adjustmentRate, isValidRate, isValidText,\r\n selectedCampaignTypes, selectedCampaigns,\r\n selectedDevices, selectedEndDate, selectedEndTime,\r\n selectedScope, selectedStartDate, selectedStartTime, selectedSymbol]);\r\n\r\n /* istanbul ignore next */\r\n const onSubmit = useCallback(() => {\r\n if (!validate()) {\r\n return;\r\n }\r\n\r\n const startDateTime = new Date(selectedStartDate);\r\n const endDateTime = new Date(selectedEndDate);\r\n const convertedCampaigns = selectedCampaigns.map(item => ({\r\n CampaignId: item.Id,\r\n }));\r\n\r\n startDateTime.setUTCHours(selectedStartTime);\r\n endDateTime.setUTCHours(selectedEndTime);\r\n\r\n const data = {\r\n Name: seasonalityName,\r\n Description: seasonalityDescription,\r\n AdjustmentPercentage: selectedSymbol === 'increase' ? adjustmentRate : `-${adjustmentRate}`,\r\n DeviceTypeFilter: selectedDevices,\r\n StartDate: startDateTime.toISOString(),\r\n EndDate: endDateTime.toISOString(),\r\n AdjustmentType: adjustmentType,\r\n };\r\n\r\n // extend for edit\r\n if (isUpdate) {\r\n _.extend(data, {\r\n Id: seasonalityId,\r\n });\r\n }\r\n\r\n if (selectedScope === 'type') {\r\n _.extend(data, {\r\n CampaignTypeFilter: selectedCampaignTypes,\r\n });\r\n } else {\r\n _.extend(data, {\r\n CampaignAssociations: convertedCampaigns,\r\n CampaignAssociationsCount: _.size(selectedCampaigns),\r\n });\r\n }\r\n\r\n setIsLoading(true);\r\n setApiError('');\r\n\r\n const jsdataCall = jsdata.SeasonalityAdjustment.create(data);\r\n jsdataCall\r\n .then(() => {\r\n if (isUpdate) {\r\n const storedName = getSeasonalityAdjustmentName(seasonalityId);\r\n if (storedName && (storedName !== seasonalityName)) {\r\n storeSeasonalityAdjustmentName({ id: seasonalityId, name: seasonalityName });\r\n }\r\n }\r\n onSuccess();\r\n })\r\n .catch((response) => {\r\n if (!isUpdate && (Number(response.entity.Id) > 0)) {\r\n onSuccess();\r\n }\r\n setApiError(localizeApiError(response, i18n, adjustmentType));\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }, [adjustmentRate, i18n, isUpdate, onSuccess, adjustmentType,\r\n seasonalityDescription, seasonalityId,\r\n seasonalityName, selectedCampaignTypes,\r\n selectedCampaigns, selectedDevices,\r\n selectedEndDate, selectedEndTime, selectedScope,\r\n selectedStartDate, selectedStartTime, selectedSymbol, validate]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n {i18n.getString(isDataExclusion(adjustmentType) ? _TL_('Create a data exclusion') : _TL_('Create a seasonality adjustment'))}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {adjustmentType === AdjustmentType.SeasonalityAdjustment &&\r\n \r\n \r\n \r\n \r\n }\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nSeasonalityAdjustmentCreationPanel.propTypes = {\r\n onSuccess: PropTypes.func,\r\n onCancel: PropTypes.func,\r\n seasonalityId: PropTypes.number,\r\n isUpdate: PropTypes.bool,\r\n scope: PropTypes.shape(),\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]),\r\n classes: PropTypes.shape().isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaigns: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nSeasonalityAdjustmentCreationPanel.defaultProps = {\r\n onSuccess: _.noop,\r\n onCancel: _.noop,\r\n seasonalityId: undefined,\r\n isUpdate: false,\r\n scope: undefined,\r\n adjustmentType: AdjustmentType.SeasonalityAdjustment,\r\n};\r\n\r\nconst Wrapped = withPermissions(withDefaultStyles(SeasonalityAdjustmentCreationPanel, getStyles));\r\n\r\nexport { Wrapped as SeasonalityAdjustmentCreationPanel };\r\n","import _ from 'underscore';\r\n\r\n/* global Map */\r\n\r\nexport function pairsToMap(pairs) {\r\n return _.reduce(pairs, (memo, [key, value]) => {\r\n memo.set(key, value);\r\n return memo;\r\n }, new Map());\r\n}\r\n","export function clearSelection(gridView) {\r\n const selection = {\r\n ...gridView.get('selection'),\r\n selected: [],\r\n };\r\n\r\n gridView.trigger('willSelect', selection.selected);\r\n gridView.set({ selection }, () => {\r\n gridView.trigger('didSelect', selection.selected);\r\n });\r\n}\r\n\r\nexport function toggleRadioButton(e, gridView) {\r\n const radioButton = e.target;\r\n const { selected } = gridView.get('selection');\r\n const key = gridView.keyOfElement(radioButton);\r\n\r\n if (selected.includes(key)) {\r\n radioButton.checked = false;\r\n clearSelection(gridView);\r\n }\r\n}\r\n","import projectionGrid from 'projection-grid';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { columnChooserPlugin } from '@bingads-webui-campaign/projection-grid-column-chooser';\r\nimport { editablePlugin } from '@bingads-webui-campaign/projection-grid-editable';\r\nimport { projectionGridScopeNavigator } from '@bingads-webui-campaign/projection-grid-scope-navigator';\r\nimport { projectionGridScrollbarPlugin } from '@bingads-webui-campaign/projection-grid-scrollbar';\r\nimport { projectionGridFlexColumnResize } from '@bingads-webui-campaign/projection-grid-flex-column-resize';\r\nimport { jsdataRawDataPlugin } from '@bingads-webui-campaign/pgrid-js-data-raw-data';\r\nimport { toggleRadioButton } from '../selection-helper';\r\n\r\nexport class SeasonalityAdjustmentGridView extends DeterministicWrapperView {\r\n viewFactory({\r\n config,\r\n permissions,\r\n toolbarPlugin,\r\n }) {\r\n const gridFactory = projectionGrid\r\n .factory({ vnext: true })\r\n // For accurate grid init latency, PerfMarkerPlugin should be the first plugin to load.\r\n .use(perfMarkerPlugin)\r\n .use(a11yPlugin)\r\n .use(paginationPlugin)\r\n .use(placeholderPlugin)\r\n .use(uiBlockerPlugin)\r\n .use(toolbarPlugin.plugin)\r\n .use(columnChooserPlugin)\r\n .use(jsdataRawDataPlugin)\r\n .use(projectionGridScopeNavigator)\r\n .use(projectionGridScrollbarPlugin)\r\n .use(projectionGridFlexColumnResize);\r\n\r\n if (!permissions.IsReadOnlyUser) {\r\n gridFactory.use(editablePlugin);\r\n }\r\n\r\n this.grid = gridFactory.create(config);\r\n\r\n return this.grid.gridView;\r\n }\r\n\r\n get className() {\r\n return 'seasonality-adjustment-grid';\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .td[data-column=\"selection\"] input[type=\"radio\"].select-row': e => toggleRadioButton(e, this.grid.gridView),\r\n };\r\n }\r\n}\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\n\r\nexport class SeasonalityAdjustmentNameColumn extends ProjectionGridBaseColumn {\r\n constructor({\r\n i18n,\r\n inlineEditConfig: {\r\n onEditName,\r\n } = {},\r\n scope,\r\n }) {\r\n super({\r\n name: 'SeasonalityAdjustmentName',\r\n title: _TL_('Name'),\r\n i18n,\r\n property: 'Name',\r\n sortable: 'Name',\r\n group: 'freezing',\r\n });\r\n this.onEditName = onEditName;\r\n this.scope = scope;\r\n }\r\n\r\n onPrompt(...args) {\r\n return this.onEditName(...args);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\n\r\nexport class BaseColumn extends ProjectionGridBaseColumn {\r\n constructor(options) {\r\n super(options);\r\n this.i18n = options.i18n;\r\n }\r\n\r\n // Override the default 'pickProperty' to pick multi properties.\r\n pickProperty(rowData) {\r\n const keys = _.union(\r\n // this.property.key may be a string or an array, need to convert it to an array\r\n _.flatten([this.property.key]),\r\n ['$total']\r\n );\r\n return _.pick(rowData, keys);\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { BaseColumn } from './base-column';\r\nimport linkTemplate from './link-template.pug';\r\nimport { i18nMap, safeGetString } from '../../i18n-map/i18n-map';\r\nimport { isDataExclusion } from '../../adjustment-type';\r\n\r\nexport class ScopeColumn extends BaseColumn {\r\n constructor(option) {\r\n const title = _TL_('Scope');\r\n\r\n super({\r\n name: 'Scope',\r\n title,\r\n i18n: option.i18n,\r\n property: ['Name', 'CampaignAssociationsCount', 'CampaignTypeFilter', 'Id'],\r\n sortable: 'CampaignAssociationsCount',\r\n helpId: isDataExclusion(option.adjustmentType) ? 'pop_BA_DataExclusions_Scope' : 'pop_BA_SeasonalityAdjustments_Scope',\r\n helpAriaLabel: option.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: option.i18n.getString(title) }),\r\n });\r\n this.scope = option.scope;\r\n this.adjustmentType = option.adjustmentType;\r\n }\r\n\r\n template({\r\n value: {\r\n CampaignAssociationsCount,\r\n CampaignTypeFilter,\r\n Id,\r\n Name,\r\n },\r\n }) {\r\n const { uid, cid, aid } = this.scope.values;\r\n const pathname = '/campaign/vnext/campaigns';\r\n let customParams;\r\n let campaignTypeItems;\r\n\r\n const filterAlias = isDataExclusion(this.adjustmentType) ? 'filterDataExclusionId' : 'filterSeasonalityId';\r\n\r\n if (!_.isEmpty(CampaignTypeFilter)) {\r\n const campaignTypeEnum = _.map(CampaignTypeFilter, item => (`Enum.CampaignType'${item}'`));\r\n customParams = `filterAlias=filterSeasonalityCampaignType&filterArguments=${campaignTypeEnum}`;\r\n const globalizedCampaignTypes = CampaignTypeFilter.map(item => (safeGetString(this.i18n, i18nMap.CampaignTypes, item)));\r\n campaignTypeItems = globalizedCampaignTypes.join(this.i18n.getString(_TL_(', ')));\r\n } else {\r\n customParams = `filterAlias=${filterAlias}&filterArguments=${Id}, ${encodeURIComponent(Name)}`;\r\n }\r\n\r\n const href = `${pathname}?uid=${uid}&cid=${cid}&aid=${aid}&${customParams}`;\r\n const filterType = campaignTypeItems || CampaignAssociationsCount || '0';\r\n const text = `${filterType} ${this.i18n.getString(_TL_('Campaigns'))}`;\r\n\r\n return linkTemplate({\r\n pathname, customParams, href, text,\r\n });\r\n }\r\n}\r\n","import { BaseColumn } from './base-column';\r\nimport template from './device-type.pug';\r\nimport { i18nMap, safeGetString } from '../../i18n-map/i18n-map';\r\nimport { isDataExclusion } from '../../adjustment-type';\r\n\r\nexport class DeviceTypeColumn extends BaseColumn {\r\n constructor(option) {\r\n const title = _TL_('Devices');\r\n\r\n super({\r\n name: 'Devices',\r\n title,\r\n i18n: option.i18n,\r\n property: ['DeviceTypeFilter'],\r\n sortable: 'DeviceTypeSort',\r\n helpId: isDataExclusion(option.adjustmentType) ? 'pop_BA_DataExclusions_Devices' : 'pop_BA_SeasonalityAdjustments_Devices',\r\n helpAriaLabel: option.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: option.i18n.getString(title) }),\r\n });\r\n }\r\n\r\n template({\r\n value: {\r\n DeviceTypeFilter,\r\n },\r\n }) {\r\n let deviceTypeItems;\r\n if (DeviceTypeFilter) {\r\n const globalizedDeviceTypes = DeviceTypeFilter.map(item => (safeGetString(this.i18n, i18nMap.DeviceTypes, item)));\r\n deviceTypeItems = globalizedDeviceTypes.join(this.i18n.getString(_TL_(', ')));\r\n }\r\n\r\n const items = `${deviceTypeItems}`;\r\n\r\n return template({\r\n items,\r\n });\r\n }\r\n}\r\n","import { CONSTANTS, ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\nimport template from './conversion-rate-adjustment.pug';\r\n\r\nexport class ConversionRateColumn extends ProjectionGridBaseColumn {\r\n constructor({\r\n i18n,\r\n inlineEditConfig: {\r\n onEditRate,\r\n } = {},\r\n }) {\r\n const title = _TL_('Conversion rate adjustment');\r\n super({\r\n name: 'AdjustmentPercentage',\r\n title,\r\n i18n,\r\n property: 'AdjustmentPercentage',\r\n sortable: 'AdjustmentPercentage',\r\n type: CONSTANTS.COLUMN_TYPES.NUMBER,\r\n format: CONSTANTS.COLUMN_FORMATS.PERCENTAGE_VALUE,\r\n helpId: 'pop_BA_SeasonalityAdjustments_ConversionRate',\r\n helpAriaLabel: i18n.getString(_TL_('Click to learn more about {{item}}'), { item: i18n.getString(title) }),\r\n });\r\n this.onEditRate = onEditRate;\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n let multiplier = '';\r\n const formattedValue = this.formatter(Math.abs(value));\r\n if (value < 0) {\r\n multiplier = `-${formattedValue}`;\r\n } else {\r\n multiplier = `+${formattedValue}`;\r\n }\r\n return template({\r\n conversionRate: multiplier,\r\n i18n: this.i18n,\r\n });\r\n }\r\n\r\n onPrompt(...args) {\r\n /* istanbul ignore next */\r\n this.onEditRate(...args);\r\n }\r\n}\r\n\r\n","export const fromServerDateTimeToLocalized = ({\r\n i18n,\r\n serverDateTime,\r\n}) => i18n.formatDate(i18n.dateParser({\r\n raw: 'yyyy-MM-ddTHH:mm:ss',\r\n})(serverDateTime.substr(0, 19)), {\r\n datetime: 'short',\r\n});\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\nimport { fromServerDateTimeToLocalized } from './datetime-converter';\r\nimport { isDataExclusion } from '../../adjustment-type';\r\n\r\nexport class StartTimeColumn extends ProjectionGridBaseColumn {\r\n constructor(option) {\r\n const title = _TL_('Start time');\r\n\r\n super({\r\n title,\r\n name: 'StartTime',\r\n bodyClasses: ['cell-start-time'],\r\n i18n: option.i18n,\r\n property: 'StartDate',\r\n sortable: 'StartDate',\r\n helpId: isDataExclusion(option.adjustmentType) ? 'pop_BA_DataExclusions_StartTime' : 'pop_BA_SeasonalityAdjustments_StartTime',\r\n helpAriaLabel: option.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: option.i18n.getString(title) }),\r\n });\r\n }\r\n\r\n template({ value }) {\r\n if (value) {\r\n return fromServerDateTimeToLocalized({\r\n serverDateTime: value,\r\n i18n: this.config.i18n,\r\n });\r\n }\r\n return '-';\r\n }\r\n}\r\n\r\nexport class EndTimeColumn extends ProjectionGridBaseColumn {\r\n constructor(option) {\r\n const title = _TL_('End time');\r\n super({\r\n title,\r\n name: 'EndTime',\r\n bodyClasses: ['cell-end-time'],\r\n i18n: option.i18n,\r\n property: 'EndDate',\r\n sortable: 'EndDate',\r\n helpId: isDataExclusion(option.adjustmentType) ? 'pop_BA_DataExclusions_EndTime' : 'pop_BA_SeasonalityAdjustments_EndTime',\r\n helpAriaLabel: option.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: option.i18n.getString(title) }),\r\n });\r\n }\r\n\r\n template({ value }) {\r\n if (value) {\r\n return fromServerDateTimeToLocalized({\r\n serverDateTime: value,\r\n i18n: this.config.i18n,\r\n });\r\n }\r\n return '-';\r\n }\r\n}\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\nimport { isDataExclusion } from '../../adjustment-type';\r\n\r\nexport class DescriptionColumn extends ProjectionGridBaseColumn {\r\n constructor(option) {\r\n const title = _TL_('Description');\r\n super({\r\n name: 'Description',\r\n title,\r\n i18n: option.i18n,\r\n property: 'Description',\r\n sortable: 'Description',\r\n helpId: isDataExclusion(option.adjustmentType) ? 'pop_BA_DataExclusions_Description' : 'pop_BA_SeasonalityAdjustments_Description',\r\n helpAriaLabel: option.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: option.i18n.getString(title) }),\r\n });\r\n }\r\n}\r\n","\r\nimport { ColumnsConfigBuilder } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { SeasonalityAdjustmentNameColumn } from './seasonality-adjustment-name-column';\r\nimport { ScopeColumn } from './scope-column';\r\nimport { DeviceTypeColumn } from './device-type-column';\r\nimport { ConversionRateColumn } from './conversion-rate-adjustment';\r\nimport { StartTimeColumn, EndTimeColumn } from './date-column';\r\nimport { DescriptionColumn } from './description-column';\r\nimport { AdjustmentType } from '../../adjustment-type';\r\n\r\nfunction isDefined(p) { return !!p; }\r\n\r\nfunction getBuilder(adjustmentType) {\r\n const builder = new ColumnsConfigBuilder()\r\n .addCategory('Attributes', category => category.addColumns([\r\n SeasonalityAdjustmentNameColumn,\r\n ScopeColumn,\r\n DeviceTypeColumn,\r\n adjustmentType === AdjustmentType.SeasonalityAdjustment ? ConversionRateColumn : undefined,\r\n StartTimeColumn,\r\n EndTimeColumn,\r\n DescriptionColumn,\r\n ].filter(isDefined)))\r\n .setLockedColumns([\r\n SeasonalityAdjustmentNameColumn,\r\n ]).setSelectedColumns([\r\n ScopeColumn,\r\n DeviceTypeColumn,\r\n adjustmentType === AdjustmentType.SeasonalityAdjustment ? ConversionRateColumn : undefined,\r\n StartTimeColumn,\r\n EndTimeColumn,\r\n ].filter(isDefined));\r\n\r\n return builder;\r\n}\r\n\r\nexport function getColumnsAndColumnChooserConfig({\r\n i18n,\r\n columnChooserPreferences: { Columns, SelectedColumns },\r\n inlineEditConfig,\r\n scope,\r\n adjustmentType,\r\n}) {\r\n const builder = getBuilder(adjustmentType);\r\n\r\n\r\n const columnsConfig = builder.getColumnsConfig({\r\n i18n,\r\n inlineEditConfig,\r\n scope,\r\n adjustmentType,\r\n });\r\n\r\n const columnChooserConfig = builder.getColumnChooserConfig({\r\n i18n,\r\n Columns,\r\n SelectedColumns,\r\n });\r\n\r\n columnChooserConfig.customToolbarIcon = 'ba-TripleColumnSolid';\r\n\r\n return {\r\n columnsConfig,\r\n columnChooserConfig,\r\n };\r\n}\r\n","import $ from 'jquery';\r\nimport { isDataExclusion } from '../adjustment-type';\r\nimport { getColumnsAndColumnChooserConfig } from './columns';\r\n\r\nexport class SeasonalityAdjustmentGridConfig {\r\n constructor({\r\n gridName, i18n, dataSource, scope, columnChooserPreferences, preferenceService, filterService, perfMarker, globalConfig,\r\n blockerTarget, inlineEditConfig, adjustmentType,\r\n }) {\r\n const { columnsConfig, columnChooserConfig } = getColumnsAndColumnChooserConfig({\r\n i18n, columnChooserPreferences, inlineEditConfig, scope, adjustmentType,\r\n });\r\n\r\n const pluginsConfig = {\r\n perfMarker: {\r\n appConfig: globalConfig,\r\n marker: perfMarker,\r\n },\r\n a11y: { i18n },\r\n pagination: {\r\n availablePageSizes: [20, 50, 100, 200],\r\n pageNumberLabelText: i18n.getString(_TL_('Page')),\r\n pageSizeText: i18n.getString(_TL_('Show rows:')),\r\n enableRandomPage: false,\r\n },\r\n uiBlocker: {\r\n el: blockerTarget,\r\n text: i18n.getString(_TL_('Loading...')),\r\n },\r\n placeholder: {\r\n container: '.grid-noresult',\r\n text: i18n.getString(isDataExclusion(adjustmentType) ?\r\n _TL_('You have no data exclusions. Click Create to get started.')\r\n : _TL_('You have no seasonality adjustments. Click Create to get started.')),\r\n filteredEmptyText: i18n.getString(_TL_('There are no results available based on your filtered search. Please revise your search.')),\r\n },\r\n columnChooser: columnChooserConfig,\r\n editable: {\r\n i18n,\r\n },\r\n projectionGridScopeNavigator: scope,\r\n projectionGridFlexColumnResize: {\r\n gridName,\r\n preferenceService,\r\n },\r\n projectionGridScrollbar: {\r\n scrollElementSelector: '.grid-group-other',\r\n },\r\n };\r\n\r\n const tableName = i18n.getString(isDataExclusion(adjustmentType) ? _TL_('Data exclusions') : _TL_('Seasonality Adjustment'));\r\n\r\n return {\r\n name: gridName,\r\n tableClasses: ['table'],\r\n tableAttributes: { 'aria-label': tableName },\r\n layout: 'flex',\r\n i18n,\r\n columns: columnsConfig,\r\n dataSource,\r\n rows: {\r\n headRows: [\r\n 'column-header-rows',\r\n ],\r\n },\r\n selection: {\r\n single: true,\r\n },\r\n scrolling: {\r\n header: {\r\n type: 'sticky',\r\n offset: () => $('.sticky-container').height(),\r\n attributes: {\r\n 'aria-label': i18n.getString(_TL_('{{tableName}} table header'), { tableName }),\r\n role: 'rowgroup',\r\n },\r\n },\r\n virtualized: true,\r\n // backbone-virtualized-listview listens to viewport element's resize and scroll events to refresh header's position.\r\n // Search keyword `_hookUpStickyHeader` to see more details.\r\n viewport: $('.table-page-container'),\r\n },\r\n plugins: pluginsConfig,\r\n // Needed by inline download plugin\r\n // projection-grid-inline-download/src/without-dependencies.js line 21\r\n filterService,\r\n // Needed by pagination plugin\r\n // projection-grid-pagination/src/index.es line 115\r\n preferenceService,\r\n config: globalConfig,\r\n };\r\n }\r\n}\r\n","import { gridFlexStyle } from '@bingads-webui-campaign-react/grid-flex-style';\r\n\r\nexport function getStyles(_, { palette = {} }) {\r\n return {\r\n seasonalityTablePageContainer: {\r\n '& .toolbar .contextual-dropdown .btn-primary': {\r\n height: '32px',\r\n padding: '0 20px',\r\n '& .iconba-Add': {\r\n color: '#fff',\r\n },\r\n },\r\n '& .search-box': {\r\n width: '300px',\r\n },\r\n '& .popover': {\r\n maxWidth: 'fit-content',\r\n },\r\n '& .conversion-rate-adjustment-view': {\r\n '& .form-inline .form-group': {\r\n display: 'block',\r\n },\r\n '& .conversion-rate-adjustment-input-group': {\r\n marginLeft: '10px',\r\n },\r\n '& .input-group .form-control': {\r\n borderRightColor: 'transparent',\r\n },\r\n },\r\n },\r\n seasonalityGridViewContainer: {\r\n // In the first column (selection column), hide redundant radio buttons\r\n '& .tbody .tr .td[data-column=\"selection\"] > input': {\r\n '&:before': {\r\n content: 'none',\r\n },\r\n '&:after': {\r\n content: 'none',\r\n },\r\n },\r\n },\r\n '@global': {\r\n ...gridFlexStyle({ palette }),\r\n },\r\n };\r\n}\r\n","/* istanbul ignore file */\r\nimport _ from 'underscore';\r\nimport { InlineEditableColumnPrompt } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport odataSchemas from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { triggerContainerResizing } from '@bingads-webui-campaign-react/virtual-scrollbar-recalculate-trigger';\r\nimport { localizeApiError } from './i18n-map/localize-api-errors';\r\nimport { ConversionRateInlineEditableColumnPrompt } from './conversion-rate-prompt';\r\n\r\nconst schema = odataSchemas.SeasonalityAdjustment;\r\n\r\nfunction triggerScrollbarRepositionOnElementMount(selector, interval = 50) {\r\n const token = setInterval(() => {\r\n if (document.querySelector(selector)) {\r\n triggerContainerResizing();\r\n clearInterval(token);\r\n }\r\n }, interval);\r\n}\r\n\r\nfunction updateSeasonalityAdjustment({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n fieldName,\r\n adjustmentType,\r\n}) {\r\n // update\r\n jsdata.SeasonalityAdjustment.update(id, payload, {\r\n }).then(() => {\r\n editorView.trigger('save');\r\n reloadGrid();\r\n }).catch((error) => {\r\n const errorMessage = localizeApiError(error, i18n, adjustmentType);\r\n editorView.setErrors({\r\n [fieldName]: errorMessage,\r\n });\r\n })\r\n .finally(withUiBlock(getGridView().$el));\r\n}\r\n\r\nfunction updateWithAssoicatedCamapign({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n fieldName,\r\n adjustmentType,\r\n}) {\r\n // get associated campaigns if it is null\r\n jsdata.SeasonalityAdjustment.find(id, {\r\n }).then((response) => {\r\n const convertedCampaigns = response.CampaignAssociations;\r\n _.extend(payload, {\r\n CampaignAssociations: convertedCampaigns,\r\n });\r\n updateSeasonalityAdjustment({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n fieldName,\r\n }).catch((error) => {\r\n const errorMessage = localizeApiError(error, i18n, adjustmentType);\r\n editorView.setErrors({\r\n [fieldName]: errorMessage,\r\n });\r\n });\r\n });\r\n}\r\n\r\nexport function inlineEditFactory({\r\n i18n,\r\n jsdata,\r\n getGridView,\r\n reloadGrid,\r\n adjustmentType,\r\n}) {\r\n function onEditRate({ item, newPosition }) {\r\n const fieldName = 'AdjustmentPercentage';\r\n\r\n triggerScrollbarRepositionOnElementMount('.popup-editor');\r\n\r\n return ConversionRateInlineEditableColumnPrompt({\r\n item,\r\n newPosition,\r\n fieldName,\r\n i18n,\r\n saveModel: (updated, editorView) => {\r\n const id = item.Id;\r\n const payload = updated;\r\n if (payload.CampaignAssociationsCount > 0 && _.isEmpty(payload.CampaignAssociations)) {\r\n updateWithAssoicatedCamapign({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n fieldName,\r\n adjustmentType,\r\n });\r\n } else {\r\n updateSeasonalityAdjustment({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n fieldName,\r\n adjustmentType,\r\n });\r\n }\r\n },\r\n });\r\n }\r\n\r\n function onEditName({ item, newPosition: position }) {\r\n const fieldName = 'Name';\r\n\r\n triggerScrollbarRepositionOnElementMount('.popup-editor');\r\n\r\n return InlineEditableColumnPrompt({\r\n position,\r\n item,\r\n i18n,\r\n fieldName,\r\n schema,\r\n saveModel: (updated, editorView) => {\r\n const id = item.Id;\r\n const payload = updated;\r\n if (payload.CampaignAssociationsCount > 0 && _.isEmpty(payload.CampaignAssociations)) {\r\n updateWithAssoicatedCamapign({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n adjustmentType,\r\n });\r\n } else {\r\n updateSeasonalityAdjustment({\r\n id,\r\n payload,\r\n jsdata,\r\n editorView,\r\n reloadGrid,\r\n i18n,\r\n getGridView,\r\n adjustmentType,\r\n });\r\n }\r\n },\r\n });\r\n }\r\n\r\n return {\r\n onEditRate,\r\n onEditName,\r\n };\r\n}\r\n","/* istanbul ignore file */\r\nimport _ from 'underscore';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { ConversionRateAdjustmentView } from '@bingads-webui-campaign/conversion-rate-adjustment';\r\n\r\nexport function ConversionRateInlineEditableColumnPrompt({\r\n item,\r\n newPosition,\r\n i18n,\r\n fieldName,\r\n saveModel,\r\n}) {\r\n const conversionRateAdjustmentView = new ConversionRateAdjustmentView({\r\n value: item.AdjustmentPercentage,\r\n i18n,\r\n });\r\n\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: conversionRateAdjustmentView.render(),\r\n cellPosition: newPosition,\r\n tableContainer: '.bingadsgrid',\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n }).render();\r\n\r\n editorView.on('close', (model) => {\r\n const changed = model && (item.AdjustmentPercentage !== model.AdjustmentPercentage);\r\n if (changed) {\r\n const updated = _.extendOwn({}, item);\r\n updated[fieldName] = model.AdjustmentPercentage;\r\n saveModel(updated, conversionRateAdjustmentView);\r\n }\r\n });\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { underlineLinkStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { AdjustmentType } from './adjustment-type';\r\n\r\nconst getDescriptionStyle = (_, { palette = {} }) => ({\r\n description: {\r\n marginTop: 10,\r\n marginBottom: 10,\r\n paddingLeft: 32,\r\n '& span': {\r\n whiteSpace: 'nowrap',\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n },\r\n});\r\n\r\nconst DescriptionBanner = ({ classes, i18n, adjustmentType }) => (\r\n
\r\n {adjustmentType === AdjustmentType.SeasonalityAdjustment ?\r\n \r\n :\r\n \r\n }\r\n
\r\n);\r\n\r\nDescriptionBanner.propTypes = {\r\n classes: PropTypes.shape({\r\n disclaimer: PropTypes.string.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n};\r\n\r\nexport const StyledDescriptionBanner = withDefaultStyles(\r\n withI18nConsumer(DescriptionBanner),\r\n getDescriptionStyle\r\n);\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ProgressiveLoadingBlock } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { StyledTablePageContainer } from '@bingads-webui-campaign-react/table-page-container';\r\nimport { StyledGridViewWrapper } from '@bingads-webui-campaign-react/grid-view-wrapper';\r\nimport { withTablePageStateManager } from '@bingads-webui-campaign-react/table-page-state-manager';\r\nimport { getToolbarEditor } from '@bingads-webui-campaign-react/toolbar-plugin';\r\nimport { FilterViewManagerWithGlobalFilterContext } from '@bingads-webui-campaign-react/filter-view-manager';\r\nimport { withLegacyDeps } from '@bingads-webui-campaign-react/legacy-deps-context';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport { TopGridPanel } from '@bingads-webui-campaign-react/top-grid-panel';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withGlobalFilter } from '@bingads-webui-react/global-filter-context';\r\nimport { WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { buildMergedI18n } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport { i18nMap } from './i18n-map/i18n-map';\r\n/* eslint-disable */\r\nimport globalConfig from '@bingads-webui-component-legacy/config/index';\r\nimport * as columnChooserPreferences from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport { getFilters as preferenceStoreFactory } from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\n// import { DownloadView } from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport { constructSchemaI18n } from '@bingads-webui-component-legacy/schema-i18n/loader';\r\nimport { fetchPaginationConfig } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-pagination';\r\nimport { handleSortChange } from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\n/* eslint-enable */\r\nimport { getGridPreferences } from './fetch-preferences';\r\nimport { getToolbarConfig } from './toolbar-config';\r\nimport { toolbarActionFactory } from './toolbar-action';\r\nimport { clearSelection } from './selection-helper';\r\nimport { SeasonalityAdjustmentGridView } from './grid/grid-view';\r\nimport { SeasonalityAdjustmentGridConfig } from './grid/grid-config';\r\nimport { getStyles } from './styles';\r\nimport { getFilterConfig } from './filter-config';\r\nimport { inlineEditFactory } from './inline-edit';\r\nimport { StyledDescriptionBanner } from './description';\r\nimport { AdjustmentType, isDataExclusion } from './adjustment-type';\r\n\r\nconst gridName = 'SeasonalityAdjustmentGrid';\r\n\r\nclass SeasonalityAdjustmentPage extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.renderFilterViewManager = _.once(this.renderFilterViewManager);\r\n this.renderGrid = _.once(this.renderGrid);\r\n this.renderLazyGrid = _.once(this.renderLazyGrid);\r\n\r\n this.p$componentMount = new Promise((resolve) => {\r\n this.setComponentMounted = resolve;\r\n });\r\n\r\n this.p$preferenceConfig = getGridPreferences({\r\n gridName,\r\n fetchPaginationConfig,\r\n });\r\n }\r\n\r\n componentDidMount() {\r\n this.setComponentMounted();\r\n }\r\n\r\n getRawDateFilter = () => this.props[WaterfallFilterType.DateFilter];\r\n\r\n getCookedDateFilter = () => {\r\n const { serverContext } = this.props;\r\n const rawDateFilter = this.getRawDateFilter();\r\n const cookedDateFilter = waterfallDateFilterProcessor([{ filter: rawDateFilter }], serverContext);\r\n\r\n return cookedDateFilter;\r\n }\r\n\r\n getGridView = () =>\r\n putil.get(this.backboneGridView, 'grid.gridView');\r\n\r\n clearSelection = () => clearSelection(this.getGridView());\r\n\r\n reloadGrid = ({\r\n resetSelection = false,\r\n } = {}) => {\r\n const gridView = this.getGridView();\r\n if (gridView) {\r\n if (resetSelection) {\r\n this.clearSelection();\r\n }\r\n gridView.refresh(true);\r\n }\r\n }\r\n\r\n renderFilterViewManager() {\r\n const {\r\n i18n,\r\n preferenceService,\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n updateToolbar,\r\n resetToolbarVisibility,\r\n permissions,\r\n adjustmentType,\r\n } = this.props;\r\n\r\n const { getGridView } = this;\r\n\r\n const legacyStringMap = isDataExclusion(adjustmentType) ?\r\n { ...i18nMap.DataExclusionSchema } :\r\n { ...i18nMap.SeasonalitySchema };\r\n\r\n const mergedI18n = buildMergedI18n({ i18n, legacyStringMap });\r\n\r\n const filterConfig = getFilterConfig({\r\n i18n: mergedI18n,\r\n globalConfig,\r\n preferenceService,\r\n preferenceStoreFactory,\r\n getGridView,\r\n adjustmentType,\r\n });\r\n\r\n this.filterService = filterConfig.filterService;\r\n\r\n const toolbarEditor = getToolbarEditor({\r\n toolbarConfig: { toolbarSelectedConfig, toolbarUnselectedConfig },\r\n updateToolbar,\r\n });\r\n\r\n return (\r\n );\r\n }\r\n\r\n renderLazyGrid() {\r\n const LazyGrid = React.lazy(() =>\r\n Promise.all([\r\n this.p$preferenceConfig,\r\n this.p$componentMount,\r\n ]).then(([preferenceConfig]) => ({\r\n default: () => this.renderGrid(preferenceConfig),\r\n })));\r\n\r\n return ();\r\n }\r\n\r\n renderGrid(preferenceConfig) {\r\n const {\r\n i18n,\r\n scope,\r\n permissions,\r\n onGridInjected,\r\n toolbarPlugin,\r\n crossPageSelectPlugin,\r\n preferenceService,\r\n perfMarker,\r\n mockData,\r\n showTopOfGridPanel,\r\n adjustmentType,\r\n } = this.props;\r\n const { currentAccount } = getEntityFromScope(scope);\r\n const { getGridView, reloadGrid } = this;\r\n\r\n let dataSource;\r\n if (mockData) {\r\n dataSource = mockData;\r\n } else {\r\n dataSource = {\r\n type: 'jsdata',\r\n entity: jsdata.SeasonalityAdjustment,\r\n options: {\r\n entitySet: edm.currentAccount.SeasonalityAdjustments['Default.GridData'].$call({\r\n gridDataParameters: {},\r\n adjustmentType,\r\n }),\r\n usePendingFindAll: false,\r\n },\r\n };\r\n }\r\n\r\n const legacyStringMap = {\r\n ...i18nMap.InlineEdit,\r\n ...i18nMap.columnChooser,\r\n };\r\n\r\n const mergedI18n = buildMergedI18n({ i18n, legacyStringMap });\r\n const inlineEditConfig = inlineEditFactory({\r\n i18n: mergedI18n,\r\n jsdata,\r\n currentAccount,\r\n getGridView,\r\n reloadGrid,\r\n adjustmentType,\r\n });\r\n\r\n const config = new SeasonalityAdjustmentGridConfig({\r\n adjustmentType,\r\n gridName,\r\n i18n: mergedI18n,\r\n dataSource,\r\n columnChooserPreferences,\r\n inlineEditConfig,\r\n scope,\r\n permissions,\r\n preferenceService,\r\n // DownloadView,\r\n appState,\r\n filterService: this.filterService,\r\n // s$i18n,\r\n perfMarker,\r\n globalConfig,\r\n });\r\n\r\n const finalConfig = putil.merge(config, preferenceConfig);\r\n\r\n const backboneGridView = new SeasonalityAdjustmentGridView({\r\n config: finalConfig,\r\n permissions,\r\n toolbarPlugin,\r\n crossPageSelectPlugin,\r\n });\r\n\r\n _.extend(this, { backboneGridView });\r\n\r\n updateGridQuery(getGridView(), this.filterService.getCombinedFilter(), true);\r\n\r\n // Once sort changes, save to preference\r\n getGridView().on('willUpdate', (changes) => {\r\n handleSortChange(changes, getGridView(), gridName);\r\n });\r\n\r\n const toolbarAction = toolbarActionFactory({\r\n i18n,\r\n jsdata,\r\n scope,\r\n getGridView,\r\n reloadGrid,\r\n showTopOfGridPanel,\r\n adjustmentType,\r\n });\r\n\r\n onGridInjected({\r\n backboneGridView,\r\n reloadGrid,\r\n toolbarAction,\r\n deselectAll: this.clearSelection,\r\n });\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n classes,\r\n forceResetScrollFlag,\r\n showTopGridPanel,\r\n panelView,\r\n renderToolbarContainer,\r\n adjustmentType,\r\n } = this.props;\r\n\r\n const topGridPanel = showTopGridPanel ?\r\n () : null;\r\n\r\n const description = showTopGridPanel ? null : ();\r\n\r\n const topOfGridContent = (\r\n }>\r\n \r\n {topGridPanel}\r\n {description}\r\n \r\n \r\n );\r\n\r\n const stickyTopOfGridContent = (\r\n \r\n {renderToolbarContainer({ isMultiPage: false })}\r\n {this.renderFilterViewManager()}\r\n \r\n );\r\n\r\n return (\r\n }>\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nSeasonalityAdjustmentPage.propTypes = {\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n Token: PropTypes.string.isRequired,\r\n }).isRequired,\r\n legacyDeps: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n adjustmentType: PropTypes.oneOf([AdjustmentType.DataExclusion, AdjustmentType.SeasonalityAdjustment]).isRequired,\r\n // Begin: injected by withTablePageStateManager\r\n toolbarSelectedConfig: PropTypes.shape({}).isRequired,\r\n toolbarUnselectedConfig: PropTypes.shape({}).isRequired,\r\n updateToolbar: PropTypes.func.isRequired,\r\n resetToolbarVisibility: PropTypes.func.isRequired,\r\n renderToolbarContainer: PropTypes.func.isRequired,\r\n onGridInjected: PropTypes.func.isRequired,\r\n showTopGridPanel: PropTypes.bool.isRequired,\r\n panelView: PropTypes.shape({}),\r\n toolbarPlugin: PropTypes.shape({\r\n plugin: PropTypes.func.isRequired,\r\n }).isRequired,\r\n crossPageSelectPlugin: PropTypes.shape({\r\n plugin: PropTypes.func.isRequired,\r\n }).isRequired,\r\n forceResetScrollFlag: PropTypes.bool.isRequired,\r\n mockData: PropTypes.shape({}),\r\n showTopOfGridPanel: PropTypes.func.isRequired,\r\n // End: injected by withTablePageStateManager\r\n};\r\n\r\nSeasonalityAdjustmentPage.defaultProps = {\r\n panelView: null,\r\n mockData: null,\r\n};\r\n\r\nconst Wrapped = _.compose(\r\n withI18nConsumer,\r\n withLegacyDeps,\r\n withPreference,\r\n withScope,\r\n withPermissions,\r\n withServerContext,\r\n withGlobalFilter,\r\n Comp => withDefaultStyles(Comp, getStyles),\r\n withTablePageStateManager({ getToolbarConfig })\r\n)(SeasonalityAdjustmentPage);\r\n\r\nWrapped.defaultProps = {\r\n adjustmentType: AdjustmentType.SeasonalityAdjustment, // so that getToolbarConfig could get default value\r\n};\r\n\r\nexport { Wrapped as StyledSeasonalityAdjustmentPage };\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nexport function getGridPreferences({\r\n gridName,\r\n fetchPaginationConfig,\r\n}) {\r\n const services = [\r\n fetchPaginationConfig(gridName),\r\n ];\r\n\r\n return Promise.all(services)\r\n .then(([paginationConfig]) => {\r\n const { pageSize, orderbyInfo, sortableHeader } = paginationConfig;\r\n const result = {\r\n dataSource: {},\r\n plugins: {\r\n pagination: {\r\n pageSize,\r\n },\r\n },\r\n };\r\n\r\n if (orderbyInfo && orderbyInfo.length > 0) {\r\n result.dataSource.orderby = orderbyInfo;\r\n result.sortableHeader = _.pick(sortableHeader, 'name', 'directionIndex');\r\n }\r\n\r\n return result;\r\n });\r\n}\r\n","import { getCommonFilterConfig } from '@bingads-webui-campaign/common-grid-config';\r\nimport odataSchemas from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { sessionStore } from '@bingads-webui/js-data-storage';\r\nimport { FilterService } from '@bingads-webui/filter-service';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { isDataExclusion } from './adjustment-type';\r\n\r\nexport function getFilterConfig({\r\n i18n,\r\n globalConfig,\r\n preferenceService,\r\n preferenceStoreFactory,\r\n getGridView,\r\n adjustmentType,\r\n}) {\r\n const searchboxPlaceholderText = isDataExclusion(adjustmentType) ? _TL_('Data exclusion name') : _TL_('Seasonality adjustment name');\r\n const featureName = isDataExclusion(adjustmentType) ? 'DataExclusionGrid' : 'SeasonalityAdjustmentGrid';\r\n const filterConfig = getCommonFilterConfig({\r\n i18n,\r\n featureName,\r\n entitySchema: odataSchemas.SeasonalityAdjustment,\r\n globalConfig,\r\n preferenceService,\r\n preferenceStoreFactory,\r\n sessionStore,\r\n enableCampaignWaterfall: false,\r\n allowCampaignTypeWaterfall: false,\r\n updatePilot: false,\r\n searchbox: {\r\n placeholder: i18n.getString(searchboxPlaceholderText),\r\n searchProperty: 'Name',\r\n searchOperator: '$contains',\r\n },\r\n });\r\n\r\n const filterService = new FilterService(filterConfig);\r\n\r\n filterService.on('filter-state-changed', (combinedFilter /* subStatus */) => {\r\n const gridView = getGridView();\r\n if (gridView) {\r\n updateGridQuery(gridView, combinedFilter.filter, true);\r\n }\r\n });\r\n\r\n return {\r\n ...filterConfig,\r\n filterService,\r\n };\r\n}\r\n\r\n","import React from 'react';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { storeSeasonalityAdjustmentName, getSeasonalityAdjustmentName } from '@bingads-webui-campaign/seasonality-id-name-utils';\r\nimport { SeasonalityAdjustmentCreationPanel } from './creation-form/seasonality-adjustment-creation-form';\r\nimport { localizeApiError } from './i18n-map/localize-api-errors';\r\n\r\nexport function toolbarActionFactory({\r\n i18n,\r\n jsdata,\r\n scope,\r\n getGridView,\r\n reloadGrid,\r\n showTopOfGridPanel,\r\n adjustmentType,\r\n}) {\r\n function onDeleteSeasonality(seasonalityId) {\r\n jsdata.SeasonalityAdjustment.destroy(seasonalityId)\r\n .then(() => {\r\n reloadGrid({ resetSelection: true });\r\n const storedName = getSeasonalityAdjustmentName(seasonalityId);\r\n if (storedName) {\r\n storeSeasonalityAdjustmentName({ id: seasonalityId, name: i18n.getString(_TL_('(deleted)')) });\r\n }\r\n })\r\n .catch((error) => {\r\n reloadGrid({ resetSelection: true });\r\n notificationApi.showWarning(localizeApiError(error, i18n, adjustmentType));\r\n })\r\n .finally(withUiBlock(getGridView().$el));\r\n }\r\n\r\n function onEditSeasonality(seasonalityId) {\r\n const creationView = (\r\n {\r\n showTopOfGridPanel(null);\r\n reloadGrid();\r\n }}\r\n onCancel={() => {\r\n showTopOfGridPanel(null);\r\n }}\r\n seasonalityId={seasonalityId}\r\n isUpdate\r\n scope={scope}\r\n />\r\n );\r\n showTopOfGridPanel(creationView);\r\n }\r\n\r\n return {\r\n onDeleteSeasonality,\r\n onEditSeasonality,\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport { SeasonalityAdjustmentCreationPanel } from './creation-form/seasonality-adjustment-creation-form';\r\nimport { pairsToMap } from './pairs-to-map';\r\n\r\n\r\nexport function getToolbarConfig({\r\n showTopOfGridPanel,\r\n lazyInject,\r\n i18n,\r\n adjustmentType,\r\n}) {\r\n function withSelectedId(actionName) {\r\n return () => {\r\n const {\r\n toolbarAction,\r\n backboneGridView,\r\n } = lazyInject();\r\n\r\n const selectedItems = backboneGridView.grid.gridView.selectedItems();\r\n const seasonalityIds = _.pluck(selectedItems, 'Id');\r\n\r\n toolbarAction[actionName](seasonalityIds[0]);\r\n };\r\n }\r\n\r\n const toolbarSelectedConfig = pairsToMap([\r\n ['button-edit', {\r\n id: 'button-edit',\r\n type: 'dropdown',\r\n classes: ['btn-primary'],\r\n iconLeftGlyphName: 'ba-Edit',\r\n text: i18n.getString(_TL_('Edit')),\r\n menu: {\r\n items: [\r\n {\r\n id: 'button-delete',\r\n type: 'button',\r\n classes: ['seasonality-toolbar-delete-button'],\r\n iconLeftGlyphName: 'ba-Delete',\r\n text: i18n.getString(_TL_('Delete')),\r\n onClick: withSelectedId('onDeleteSeasonality'),\r\n },\r\n {\r\n type: 'dropdown-divider',\r\n },\r\n {\r\n id: 'button-update',\r\n type: 'button',\r\n classes: ['seasonality-toolbar-change-settings-button'],\r\n text: i18n.getString(_TL_('Change settings')),\r\n onClick: withSelectedId('onEditSeasonality'),\r\n },\r\n ],\r\n },\r\n }],\r\n ['expander', {\r\n type: 'expander',\r\n }],\r\n ['button-clear-selection', {\r\n id: 'button-clear-selection',\r\n type: 'button-clear-selection',\r\n }],\r\n ]);\r\n\r\n const toolbarUnselectedConfig = pairsToMap([\r\n ['button-seasonality-adjustment-create', {\r\n id: 'button-seasonality-adjustment-create',\r\n text: i18n.getString(_TL_('Create')),\r\n type: 'button',\r\n classes: ['btn-primary'],\r\n iconLeftGlyphName: 'ba-Add',\r\n noResponsive: true,\r\n onClick: () => {\r\n const creationView = (\r\n {\r\n showTopOfGridPanel(null);\r\n lazyInject().reloadGrid();\r\n }}\r\n onCancel={() => {\r\n showTopOfGridPanel(null);\r\n }}\r\n />\r\n );\r\n showTopOfGridPanel(creationView);\r\n },\r\n }],\r\n ['predicate-list', {\r\n id: 'predicate-list',\r\n type: 'custom',\r\n }],\r\n ['search-box-filter', {\r\n id: 'search-box-filter',\r\n type: 'search-box',\r\n }],\r\n ['dropdown-column-chooser', {\r\n id: 'dropdown-column-chooser',\r\n type: 'dropdown',\r\n }],\r\n ]);\r\n\r\n return {\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n };\r\n}\r\n\r\n","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (conversionRate) {pug_html = pug_html + \"\\u003Cdiv class=\\\"conversion-rate\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = conversionRate) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"conversionRate\" in locals_for_with?locals_for_with.conversionRate:typeof conversionRate!==\"undefined\"?conversionRate:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (items) {pug_html = pug_html + \"\\u003Cdiv class=\\\"device-column\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = items) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"items\" in locals_for_with?locals_for_with.items:typeof items!==\"undefined\"?items:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (customParams, href, pathname, text) {pug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"scope-navigator\\\"\"+pug.attr(\"href\", href, true, true)+pug.attr(\"data-pathname\", pathname, true, true)+pug.attr(\"data-customparams\", customParams, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";}.call(this,\"customParams\" in locals_for_with?locals_for_with.customParams:typeof customParams!==\"undefined\"?customParams:undefined,\"href\" in locals_for_with?locals_for_with.href:typeof href!==\"undefined\"?href:undefined,\"pathname\" in locals_for_with?locals_for_with.pathname:typeof pathname!==\"undefined\"?pathname:undefined,\"text\" in locals_for_with?locals_for_with.text:typeof text!==\"undefined\"?text:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["i18nMap","Shopping","_TL_","Default","PerformanceMax","Audience","Computers","Smartphones","Tablets","Schema_SeasonalityAdjustment_Property_Name","Schema_SeasonalityAdjustment_Property_CampaignName","Schema_SeasonalityAdjustment_Property_CampaignTypeFilter","Schema_SeasonalityAdjustment_Property_DeviceTypeFilter","Schema_SeasonalityAdjustment_Property_AdjustmentPercentage","Schema_SeasonalityAdjustment_Property_StartDate","Schema_SeasonalityAdjustment_Property_EndDate","Grid_Edit_Cell","Validation_Base_Field_Not_Valid","Validation_NotEmpty_Required_Field","Validation_String_Max_Length","KoSchema_String_RemainingCharactersText","KoSchema_String_ExceededCharactersText","SimpleForm_Button_Save","SimpleForm_Button_Cancel","Validation_String_Invalid_Characters","Validation_Number_Require_Numeric","Validation_Number_Max_Length","Validation_Number_Range_Min","Validation_Number_Range_Max","Validation_Number_Range_Between","conversionAdjustment_Options","conversionAdjustment_Multiplier","Attributes","ColumnChooser_Add","ColumnChooser_AddAllInList","ColumnChooser_AddColumn","ColumnChooser_Added","ColumnChooser_Apply","ColumnChooser_ApplySavedColumns","ColumnChooser_AvailableColumnsHeader","ColumnChooser_Cancel","ColumnChooser_CancelReplace","ColumnChooser_ConfirmCancel","ColumnChooser_ConfirmRemove","ColumnChooser_ColumnNameAlreadyExistsPrompt","ColumnChooser_CustomColumnsCategory","ColumnChooser_Disabled","ColumnChooser_Entry","ColumnChooser_Header","ColumnChooser_IfReplaceColumnName","ColumnChooser_ModifyColumns","ColumnChooser_PromptBeforeRemove","ColumnChooser_Remove","ColumnChooser_RemoveAllInList","ColumnChooser_RemoveAllSelected","ColumnChooser_NoSearchResult","ColumnChooser_RemoveColumn","ColumnChooser_RemoveSavedColumns","ColumnChooser_SaveColumnDescription","ColumnChooser_Search_Column","ColumnChooser_SelectedColumnsHeader","ColumnChooser_SelectedColumnsHeader_BottomHalf","ColumnChooser_SelectedColumnsHeader_TopHalf","ColumnChooser_SubHeader","ColumnChooser_ConfirmReplace","ColumnsMenu_Custom","CustomColumn_DoesNotExist","ColumnName_Clicks","ColumnName_Impressions","ColumnName_Spend","ColumnChooser_LiftColumn","ColumnChooser_MoveColumn","ColumnChooser_DropColumn","ColumnChooser_RemovedColumns","ColumnChooser_RemovedColumn","ColumnChooser_AddedColumns","ColumnChooser_AddedColumn","safeGetString","i18n","map","key","defaultStmt","englishString","getString","sampleSchema","name","type","properties","Name","required","maxLength","Description","AdjustmentPercentage","minimum","maximum","AdjustmentType","SeasonalityAdjustment","DataExclusion","isDataExclusion","adjustmentType","schema","getStyles","textInput","width","marginBottom","paddingTop","fontSize","SeasonalityTextInput","props","classes","showValidationError","onValidate","onChangeName","onChangeDescription","description","_jsxs","ValidationGroup","validationProps","result","isValid","data","children","className","concat","_jsx","Label","id","Input","field","alwaysShowError","placeholder","value","defaultProps","undefined","Wrapped","_","withI18nConsumer","Comp","withDefaultStyles","Error","message","errorContainer","role","__","_ref","_ref$palette","palette","color","redDark","i18nData","CampaignSelector_List_Header","CampaignSelector_EmptyList_Content","EntitySelector_Pagination_Page","EntitySelector_Pagination_TotalPageCountText","EntitySelector_Pagination_PreviousPageText","EntitySelector_Pagination_NextPageText","EntitySelector_Search_Placeholder","CampaignSelector_SelectCampaign","CampaignSelector_SelectCampaigns","CampaignSelector_Result_List_Header","CampaignSelector_Result_Action_Bar","Done","Cancel","dummy","textOverflowStyle","textOverflow","overflow","whiteSpace","campaignSelector","_objectSpread","campaignMultiSelectorWithoutDropdownStyle","minWidth","marginTop","marginLeft","position","rowItem","display","alignItems","padding","maxWidth","campaignNameColumn","marginRight","campaignTypeColumn","arrowIcon","selectionCount","top","left","background","pointerEvents","getErrorMessage","selectedCampaigns","renderHeaderFactory","_ref2","isSelected","itemCount","renderItemFactory","_ref3","permissions","item","index","forwardedRef","isAddedToResultList","rowItemClass","addIconClass","CampaignTypeMapping","dynamic","PerformanceMaxCampaigns","IsDataExclusionForAudienceCampaignEnabled","campaignType","CampaignType","ref","SeasonalityCampaignSelector","onSelectCampaigns","selectorRef","useRef","errorMessage","mergedI18n","buildMergedI18n","legacyStringMap","push","whereClause","$in","CampaignSelector","pageSize","fetch","_ref4","pageNumber","query","odataParams","select","limit","offset","where","$and","$contains","jsdata","Campaign","findAll","then","cmps","totalCount","items","cmp","Id","catch","isMultiMode","onSelect","onSelectDone","onSelectCancel","selectedItemsForMultiMode","originCampaignSelectorOptions","renderHeader","renderItem","resultContainerOptions","isHideSaveBar","stringKeys","listHeader","selectEntities","emptyListContent","resultHeader","actionBar","hideStatus","getCustomDropdownText","length","count","PropTypes","React","withPermissions","scopeChoices","scopeCheckbox","selectedCampaignTypes","selectedScope","choiceOptionStyle","root","validateScope","isTypeValid","isCampaignSelectionValid","campaignSelectionValidator","setSelectedScope","onSelectedCampaignTypeChanged","useMemo","options","text","onRenderLabel","HelpPopupInline","topic","ariaLabel","onRenderField","optionProps","render","checked","Checkbox","onChange","label","find","styles","ChoiceGroup","defaultSelectedKey","selectedKey","_event","option","ariaLabelledBy","deviceChoices","device","selectedDevices","stackTokens","childrenGap","onSelectedDevicesChanged","isComputerSelected","isSmartphoneSelected","isTabletSelected","Stack","horizontal","tokens","defaultChecked","ValidatedInput","withError","withValidation","TextField","adjustmentInput","selectedSymbol","adjustmentRate","isNaN","setAdjustmentRate","setSelectedSymbol","adjustmentRateSelect","Dropdown","event","suffix","seasonalityDateTimePicker","selectedStartDate","selectedStartTime","selectedEndDate","selectedEndTime","startDateTime","Date","setHours","endDateTime","getDate","date","UTC","year","month","day","setSelectedStartDate","setSelectedEndDate","setSelectedStartTime","setSelectedEndTime","onStartDateChange","useCallback","onEndDateChange","onStartTimeChange","onEndTimeChange","classNames","DateTimePicker","onDateChange","selectedDate","onTimeChange","selectedHour","hideTitle","datePickerId","timePickerId","generalErrorMap","NameExceededMaxLen","DescriptionExceededMaxLen","CampaignAssociationsLimitExceeded","InvalidDateTime","InvalidDateRange","DeviceTypeFilterIsNullOrEmpty","SeasonalityAdjustmentIsNull","InvalidAdjustmentPercentage","seasonalityErrorMap","EntityDoesNotExist","InvalidSeasonalityAdjustmentId","NameIsNullOrEmpty","InvalidCampaignAssociationsAndCampaignTypeFilterCombination","dataExclusionErrorMap","localizeApiError","error","firstError","putil","errorCode","errorString","localizeErrorCode","Code","SeasonalityAdjustmentCreationPanel","onCancel","onSuccess","seasonalityId","isUpdate","scope","useContext","I18nContext","campaignTypes","_useState","useState","_useState2","_slicedToArray","seasonalityName","setSeasonalityName","_useState3","_useState4","seasonalityDescription","setSeasonalityDescription","_useState5","_useState6","_useState7","_useState8","_useState9","_useState10","_useState11","_useState12","_useState13","_useState14","_useState15","_useState16","setSelectedCampaigns","_useState17","_useState18","isValidText","setIsValidText","_useState19","_useState20","setShowValidationError","_useState21","_useState22","setSelectedCampaignTypes","_useState23","_useState24","setSelectedDevices","_useState25","_useState26","initialAdjustmentRate","_useState27","_useState28","_useState29","_useState30","isValidRate","setIsValidRate","_useState31","_useState32","isLoading","setIsLoading","_useState33","_useState34","apiError","setApiError","useEffect","response","DeviceTypeFilter","startDate","dateParser","raw","StartDate","substr","endDate","EndDate","CivilDate","getFullYear","getMonth","getHours","toString","CampaignTypeFilter","CampaignAssociations","CampaignId","CampaignName","Math","abs","fetchErrorMsg","notificationApi","showWarning","finally","_toConsumableArray","target","validate","validators","validateDevices","validateConversionRate","validateDateTimeRange","validationResults","fn","allValid","onSubmit","convertedCampaigns","setUTCHours","toISOString","CampaignAssociationsCount","create","storedName","getSeasonalityAdjustmentName","storeSeasonalityAdjustmentName","Number","entity","UiBlocker","blocking","loadingText","blockUiContainer","blockerIndicator","SeasonalityDateTimePicker","Separator","SeasonalityScopeChoice","SeasonalityDeviceChoice","Fragment","SeasonalityAdjustmentRateInput","PrimaryButton","saveButton","disabled","onClick","DefaultButton","pairsToMap","pairs","memo","set","Map","clearSelection","gridView","selection","get","selected","trigger","SeasonalityAdjustmentGridView","_DeterministicWrapper","_classCallCheck","_callSuper","arguments","_inherits","_createClass","config","toolbarPlugin","gridFactory","projectionGrid","vnext","use","perfMarkerPlugin","a11yPlugin","paginationPlugin","placeholderPlugin","uiBlockerPlugin","plugin","columnChooserPlugin","jsdataRawDataPlugin","projectionGridScopeNavigator","projectionGridScrollbarPlugin","projectionGridFlexColumnResize","IsReadOnlyUser","editablePlugin","this","grid","_this","e","radioButton","keyOfElement","includes","toggleRadioButton","DeterministicWrapperView","SeasonalityAdjustmentNameColumn","_ProjectionGridBaseCo","_ref$inlineEditConfig","inlineEditConfig","onEditName","title","property","sortable","group","apply","ProjectionGridBaseColumn","BaseColumn","rowData","keys","ScopeColumn","_BaseColumn","helpId","helpAriaLabel","customParams","campaignTypeItems","_this2","_ref$value","_this$scope$values","values","uid","cid","aid","pathname","filterAlias","encodeURIComponent","campaignTypeEnum","join","href","linkTemplate","DeviceTypeColumn","deviceTypeItems","template","ConversionRateColumn","onEditRate","CONSTANTS","COLUMN_TYPES","NUMBER","format","COLUMN_FORMATS","PERCENTAGE_VALUE","multiplier","formattedValue","formatter","conversionRate","fromServerDateTimeToLocalized","serverDateTime","formatDate","datetime","StartTimeColumn","bodyClasses","EndTimeColumn","_ProjectionGridBaseCo2","DescriptionColumn","isDefined","p","getColumnsAndColumnChooserConfig","_ref$columnChooserPre","columnChooserPreferences","Columns","SelectedColumns","builder","ColumnsConfigBuilder","addCategory","category","addColumns","filter","setLockedColumns","setSelectedColumns","getBuilder","columnsConfig","getColumnsConfig","columnChooserConfig","getColumnChooserConfig","customToolbarIcon","SeasonalityAdjustmentGridConfig","gridName","dataSource","preferenceService","filterService","perfMarker","globalConfig","blockerTarget","_getColumnsAndColumnC","pluginsConfig","appConfig","marker","a11y","pagination","availablePageSizes","pageNumberLabelText","pageSizeText","enableRandomPage","uiBlocker","el","container","filteredEmptyText","columnChooser","editable","projectionGridScrollbar","scrollElementSelector","tableName","tableClasses","tableAttributes","layout","columns","rows","headRows","single","scrolling","header","$","height","attributes","virtualized","viewport","plugins","seasonalityTablePageContainer","borderRightColor","seasonalityGridViewContainer","content","gridFlexStyle","odataSchemas","triggerScrollbarRepositionOnElementMount","selector","token","setInterval","document","querySelector","triggerContainerResizing","clearInterval","updateSeasonalityAdjustment","payload","editorView","reloadGrid","getGridView","fieldName","update","setErrors","_defineProperty","withUiBlock","$el","updateWithAssoicatedCamapign","inlineEditFactory","newPosition","saveModel","conversionRateAdjustmentView","ConversionRateAdjustmentView","GridCustomizedPopupEditor","cellPosition","tableContainer","parentContainerSelector","on","model","updated","ConversionRateInlineEditableColumnPrompt","_ref5","InlineEditableColumnPrompt","StyledDescriptionBanner","LearnMoreLink","linkText","paddingLeft","underlineLinkStyle","SeasonalityAdjustmentPage","_React$PureComponent","getRawDateFilter","WaterfallFilterType","DateFilter","getCookedDateFilter","serverContext","rawDateFilter","waterfallDateFilterProcessor","backboneGridView","_ref$resetSelection","resetSelection","refresh","renderFilterViewManager","renderGrid","renderLazyGrid","p$componentMount","Promise","resolve","setComponentMounted","p$preferenceConfig","services","fetchPaginationConfig","paginationConfig","orderbyInfo","sortableHeader","orderby","getGridPreferences","_this$props","toolbarSelectedConfig","toolbarUnselectedConfig","updateToolbar","resetToolbarVisibility","filterConfig","preferenceStoreFactory","searchboxPlaceholderText","featureName","getCommonFilterConfig","entitySchema","sessionStore","enableCampaignWaterfall","allowCampaignTypeWaterfall","updatePilot","searchbox","searchProperty","searchOperator","FilterService","combinedFilter","updateGridQuery","getFilterConfig","toolbarEditor","getToolbarEditor","toolbarConfig","FilterViewManagerWithGlobalFilterContext","LazyGrid","all","preferenceConfig","default","_this$props2","onGridInjected","crossPageSelectPlugin","mockData","showTopOfGridPanel","currentAccount","getEntityFromScope","entitySet","edm","SeasonalityAdjustments","$call","gridDataParameters","usePendingFindAll","appState","finalConfig","getCombinedFilter","changes","handleSortChange","toolbarAction","onDeleteSeasonality","destroy","onEditSeasonality","creationView","toolbarActionFactory","deselectAll","StyledGridViewWrapper","_this$props3","forceResetScrollFlag","showTopGridPanel","panelView","renderToolbarContainer","topGridPanel","TopGridPanel","customClasses","topGridPanelCustomStyles","topOfGridContent","fallback","ProgressiveLoadingBlock","stickyTopOfGridContent","isMultiPage","StyledTablePageContainer","tablePageContainer","gridViewContainer","scrollToTop","disableFooter","shouldIncludeInlineEditPopup","withLegacyDeps","withPreference","withScope","withServerContext","withGlobalFilter","withTablePageStateManager","getToolbarConfig","lazyInject","withSelectedId","actionName","_lazyInject","selectedItems","seasonalityIds","iconLeftGlyphName","menu","noResponsive","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","escape","call","attr"],"sourceRoot":""}