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T,C","sources":["../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/hooks/use-filters-reducer.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/styles/context-menu-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/filter-bar-container/new-filter-context-menu.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/filter-bar-container/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/hooks/use-filter-bar.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/styles/performance-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/hooks/use-table-columns.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/styles/chart-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/hooks/use-load-data.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/performance-page-component/hooks/use-performance-page.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/home-page-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-top-banner-component-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/asset-list-bar-carousel-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-generate-with-ai-component-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-top-banner-component.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-image-asset-cards.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-asset-cards/image-asset-card/image-asset-card.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-folder-asset-cards.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-asset-cards/folder-asset-card/folder-asset-card.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-video-asset-cards.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-asset-cards/video-asset-card/video-asset-card.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/asset-list-bar-carousel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-generate-with-ai-component.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-action-asset-cards.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-asset-cards/action-asset-cards/action-asset-cards.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/home-page-styles/component-styles/home-page-image-background-section.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/components/home-page-image-background-section/image-background-section.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/home-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/image-page-styles/image-page-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/image-page-styles/component-styles/image-top-banner-component-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/image-page-styles/component-styles/assets-entry-cards-container-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/image-page-styles/component-styles/image-empty-view-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/video-page-styles/video-page-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/video-page-styles/component-styles/video-page-top-banner-component-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/video-page-styles/component-styles/assets-entry-cards-container-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/video-page-styles/component-styles/video-empty-view-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/styles/search-result-view-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/images-page-component/components/assets-entry-cards-container.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/images-page-component/components/image-grid-view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/images-page-component/components/image-top-banner-component.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/images-page-component/components/image-page-empty-view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/images-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/reducer.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/dialogues/warning-dialogue-content.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/dialogues/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/dialogues/create-with-website-dialogue.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/file-upload/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/file-upload/constants.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/file-upload/utils.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/file-upload/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/dialogues/upload-brand-guidance-dialogue.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/dialogues/create-manually-action.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/action-cards/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/banner/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/suggestions/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/suggestions/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/taglines/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/taglines/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/fonts-selector/constants.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/fonts-selector/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/fonts-selector/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/list-panel/style.ts","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/list-panel/ListItem.tsx","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/list-panel/index.tsx","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/logo-edit-panel/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/process-image-asset-payload.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/components/image-element.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/context.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/content-panel/style.ts","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/content-panel/index.tsx","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/styles/brand-voice-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/brand-voice.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/styles/brand-kit-page-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/brand-elements.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/brand-kit-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/Banner/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/Banner/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-grid/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-grid/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-details-carousel/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-details-carousel/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-details-modal/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/components/template-details-modal/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/display-templates-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/create-display-template-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/create-display-template-page-component/use-notify.tsx","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/create-display-template-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-display-template-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-display-template-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/styles/folders-grid-cell-with-context-menu-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/folders-grid-cell-with-context-menu.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/styles/edit-folder-name-modal-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/edit-folder-name-modal.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/hooks/use-create-folder-modal.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/hooks/use-delete-confirm-dialog.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/hooks/use-rename-folder-modal.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/styles/summary-result-dialog-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/summary-result-dialog/columns.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/summary-result-dialog/dialog.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/summary-result-dialog/use-summary-result-dialog.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/styles/toolbar-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/components/toolbar.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/library-page-component/hooks/use-drag-and-drop-confirm-dialog.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/videos-page-component/components/assets-entry-cards-container.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/videos-page-component/components/video-page-top-banner-component.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/videos-page-component/components/video-page-empty-view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/videos-page-component/components/video-grid-view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/videos-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/components/template-grid/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/components/template-grid/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/components/template-details-modal/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/components/template-details-modal/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/video-templates-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-video-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-video-page-component/components/use-video-notify.tsx","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-video-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/state.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/util.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/brand-detection-confirmation/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/brand-detection-confirmation/brand-detection-confirmation.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/prompt-editor/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/prompt-editor/prompt-editor.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/prompt-editor/options.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/generated-images/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/generated-images/generated-images.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/example-image/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/example-image/example-image.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/explore-prompts/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/explore-prompts/explore-prompts.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/disclaimer.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/remaing-text.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/error.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/generate-image-page-component/view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/add-asset-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/hooks/use-source-images.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/website-image-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/stock-image-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/error/add-video-error.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/add-video-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/upload-files-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/hooks/use-upload-folder.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/upload-folder-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/mixed-image-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/hooks/use-source-videos.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/mixed-video-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/invest-image-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/add-assets-panel/invest-video-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/search-result-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/use-ad-placement.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/background-change/use-background-change.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/background-change/use-masked-image.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/utils.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/use-edit-image-state.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/use-filter-and-blur.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/image-preview-view/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/image-preview-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/image-adjust-view/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/image-adjust-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/ad-placement-list-view/styles/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/ad-placement-list-view/placement-container.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/ad-placement-list-view/ad-type-control.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/ad-placement-list-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/placement-edit-view/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/placement-edit-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/save-button-in-summary-bar/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/save-button-in-summary-bar/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/media/unselected-ad-placement-svg-icon.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/media/selected-ad-placement-svg-icon.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/navigation-view/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/navigation-view/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/object-selection/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/object-selection/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/example-image/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/example-image/example-image-list.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/example-image/example-image-cell.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/history-list/generation-history-list-styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/history-list/generation-history-list.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/prompt-control/view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/image-with-shimmer/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/image-with-shimmer/image-shimmer.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/image-with-shimmer/image-with-shimmer.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/prompt-control-state.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/model/background-change/use-object-selection.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/color-control/color-button/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/color-control/color-button/color-button.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/color-control/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/color-control/view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/color-control-state.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/state.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/background-change-disclaimer/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/background-change-view/view.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/update-confirm-dialog/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/views/update-confirm-dialog/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/edit-image-page-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/styles.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/asset-preview-base/sequential-navigator.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/asset-preview-base/asset-item-preview-base.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/image-preview.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/non-active-video-preview.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/video-preview.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/asset-panel-base/panel-base.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/asset-panel-base/info-panel-header.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/asset-panel-base/delete-asset-dialog.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/basic-info/info-item-copy-url.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/basic-info/info-item-default.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/basic-info/info-item-rename.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/basic-info/item-info-panel-content-base.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/constants.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/performance/item-external-link.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/performance/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/image-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/basic-info/info-item-video-quality.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/video-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/hooks/use-preiview-and-panel.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/components/details-page-layout.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/hooks/use-details-page-setup.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/asset-detail-component/hooks/use-asset-details-page-actions.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/background-removal-modal/background-removal-modal-style.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/background-removal-modal/library-grid.js","../../../../ads-studio/packages/ads-studio-app-components/src/page-components/background-removal-modal/index.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/utils.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/use-ad-studio-navigation.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/custom-tab.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/loading-spinner.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/leaf-tree-item.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/sub-tree-item.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/sub-tree.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/style.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/components/folders-tree-view.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/ad-studio-navigation.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/use-ad-studio-side-navigation.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/ad-studio-side-navigation.js","../../../../ads-studio/packages/ads-studio-app-components/src/navigation-component/with-ad-studio-navigation.js"],"sourcesContent":["import _ from 'underscore';\r\nimport { useCallback, useReducer, useRef } from 'react';\r\n\r\nconst ACTION_TYPE_ADD_NEW_FILTER = 100;\r\nconst ACTION_TYPE_UPDATE_FILTER = 200;\r\nconst ACTION_TYPE_REMOVE_FILTER = 300;\r\nconst ACTION_TYPE_RESET_STATE = 400;\r\nconst ACTION_TYPE_REMOVE_EMPTY_FILTERS = 500;\r\n\r\n/*\r\n state: [\r\n {\r\n type, //\r\n title, // e.g. 'Asset Type', 'Date added', localized values\r\n id,\r\n value,\r\n humanizedValue, // localized and readable values\r\n\r\n isFilterAlwaysVisible, // if the filter is aways visible, even its value is not set\r\n }\r\n ],\r\n */\r\n/* istanbul ignore next */\r\nconst filtersReducer = (state, action) => {\r\n const { actionType, ...actionData } = action;\r\n switch (actionType) {\r\n case ACTION_TYPE_ADD_NEW_FILTER:\r\n {\r\n const {\r\n type, title, id, value, humanizedValue,\r\n } = actionData;\r\n\r\n // already exists, shouldn't happen\r\n if (_.find(state, { id })) {\r\n return state;\r\n }\r\n\r\n return [...state, {\r\n type, title, id, value, humanizedValue,\r\n }];\r\n }\r\n\r\n case ACTION_TYPE_REMOVE_FILTER:\r\n {\r\n const { id } = actionData;\r\n const newState = _.filter(state, filter => filter.id !== id);\r\n if (newState.length !== state.length) {\r\n return newState;\r\n }\r\n return state;\r\n }\r\n\r\n case ACTION_TYPE_RESET_STATE:\r\n {\r\n const { initialState } = actionData;\r\n return initialState || [];\r\n }\r\n\r\n case ACTION_TYPE_UPDATE_FILTER:\r\n {\r\n const {\r\n id, newValue, newHumanizedValue,\r\n } = actionData;\r\n const index = _.findIndex(state, { id });\r\n if (index >= 0) {\r\n const filterToUpdate = state[index];\r\n if (!_.isEqual(filterToUpdate.value, newValue) || filterToUpdate.humanizedValue !== newHumanizedValue) {\r\n // remove the filter\r\n const newState = [...state];\r\n if (!newHumanizedValue && filterToUpdate.isFilterAlwaysVisible !== true) {\r\n newState.splice(index, 1);\r\n } else { // replace with the new filter\r\n newState.splice(index, 1, { ...filterToUpdate, value: newValue, humanizedValue: newHumanizedValue });\r\n }\r\n return newState;\r\n }\r\n }\r\n return state;\r\n }\r\n\r\n case ACTION_TYPE_REMOVE_EMPTY_FILTERS:\r\n {\r\n const filterWithValues = _.filter(state, ({ humanizedValue, isFilterAlwaysVisible }) => humanizedValue || isFilterAlwaysVisible);\r\n if (filterWithValues.length !== state.length) {\r\n return filterWithValues;\r\n }\r\n return state;\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\n// this is an optional reducer to manage the filter bar state, it's not required and it's possible\r\n// to use other ways to manage the state\r\n/* istanbul ignore next */\r\nexport const useAdStudioFiltersReducer = ({ supportedFilterTypes, initialState, initialId = 100 }) => {\r\n const [filters, dispatch] = useReducer(filtersReducer, initialState);\r\n\r\n // use an auto increased integer number as filter id\r\n const idGeneratorRef = useRef(initialId);\r\n const getNextId = useCallback(() => {\r\n if (idGeneratorRef.current >= Number.MAX_SAFE_INTEGER) {\r\n idGeneratorRef.current = initialId;\r\n } else {\r\n idGeneratorRef.current += 1;\r\n }\r\n return idGeneratorRef.current;\r\n }, [initialId]);\r\n\r\n const removeFilter = useCallback(({ id }) => {\r\n dispatch({ actionType: ACTION_TYPE_REMOVE_FILTER, id });\r\n }, [dispatch]);\r\n\r\n const removeAllFilters = useCallback(() => {\r\n dispatch({ actionType: ACTION_TYPE_RESET_STATE, initialState });\r\n }, [dispatch, initialState]);\r\n\r\n const overwriteFilters = useCallback((state) => {\r\n dispatch({ actionType: ACTION_TYPE_RESET_STATE, initialState: state });\r\n }, [dispatch]);\r\n\r\n const addNewFilter = useCallback(({ type, initValue, initHumanizedValue }) => {\r\n const filterTypeMeta = supportedFilterTypes[type] || { type };\r\n const newFilter = {\r\n ...filterTypeMeta,\r\n id: getNextId(),\r\n value: initValue || null,\r\n humanizedValue: initHumanizedValue || initValue || null,\r\n };\r\n dispatch({\r\n actionType: ACTION_TYPE_ADD_NEW_FILTER,\r\n ...newFilter,\r\n });\r\n return newFilter;\r\n }, [dispatch, getNextId, supportedFilterTypes]);\r\n\r\n const updateFilter = useCallback(({ id, newValue, newHumanizedValue }) => {\r\n dispatch({\r\n actionType: ACTION_TYPE_UPDATE_FILTER,\r\n id,\r\n newValue,\r\n newHumanizedValue,\r\n });\r\n }, [dispatch]);\r\n\r\n const removeEmptyFilters = useCallback(() => {\r\n dispatch({ actionType: ACTION_TYPE_REMOVE_EMPTY_FILTERS });\r\n }, [dispatch]);\r\n\r\n return {\r\n filters,\r\n addNewFilter,\r\n overwriteFilters,\r\n removeFilter,\r\n removeAllFilters,\r\n removeEmptyFilters,\r\n updateFilter,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useMenuStyle = makeStyles({\r\n menuButton: {\r\n ...shorthands.border('none'),\r\n height: '56px',\r\n fontSize: '14px',\r\n marginLeft: '4px',\r\n paddingLeft: '8px',\r\n paddingRight: '8px',\r\n backgroundColor: '#f3f2f1',\r\n fontWeight: '600',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Menu,\r\n MenuButton,\r\n MenuList,\r\n MenuPopover,\r\n MenuTrigger,\r\n MenuItemRadio,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\n\r\nimport { FilterType } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useMenuStyle } from '../styles/context-menu-style';\r\n/* istanbul ignore next */\r\nexport const NewFilterContextMenu = ({\r\n allSupportedFilters, filters, onAddNewFilter, i18n, isFocused,\r\n}) => {\r\n const classes = useMenuStyle();\r\n const buttonRef = useRef();\r\n const [checkedValues, setCheckedValues] = useState();\r\n const items = useMemo(() => _.chain(allSupportedFilters)\r\n .values()\r\n .filter(f => f.type !== FilterType.SearchText) // can't add search text filter from context menu\r\n .map(({ type, title }) => {\r\n const isFilterAlreadySet = !!_.find(filters, { type });\r\n return {\r\n key: type,\r\n name: i18n.getString(title),\r\n disabled: isFilterAlreadySet,\r\n canCheck: true,\r\n checked: isFilterAlreadySet,\r\n onClick: () => {\r\n onAddNewFilter(type);\r\n },\r\n };\r\n })\r\n .value(), [allSupportedFilters, filters, i18n, onAddNewFilter]);\r\n\r\n useEffect(() => {\r\n const checkedItems = items.filter(item => item.checked).map(item => item.name);\r\n const newCheckedValues = {};\r\n checkedItems.forEach((item) => {\r\n newCheckedValues[item] = [undefined];\r\n });\r\n setCheckedValues(newCheckedValues);\r\n }, [items]);\r\n\r\n useEffect(() => {\r\n if (isFocused) {\r\n buttonRef.current.focus();\r\n }\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n {i18n.getString('Add filter')}\r\n \r\n\r\n \r\n \r\n {\r\n items.map(item => (\r\n \r\n {item.name}\r\n \r\n ))\r\n }\r\n \r\n \r\n \r\n );\r\n};\r\n/* istanbul ignore next */\r\nNewFilterContextMenu.propTypes = {\r\n allSupportedFilters: PropTypes.shape({}).isRequired,\r\n filters: PropTypes.arrayOf(PropTypes.shape({})),\r\n target: PropTypes.shape({}),\r\n onAddNewFilter: PropTypes.func,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isFocused: PropTypes.bool,\r\n};\r\n/* istanbul ignore next */\r\nNewFilterContextMenu.defaultProps = {\r\n filters: [],\r\n target: undefined,\r\n onAddNewFilter: _.noop,\r\n isFocused: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useRef, useEffect, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n FilterType,\r\n PerformanceEditingFilterBar,\r\n PerformanceReadonlyFilterBar,\r\n PerformanceSearchTextFilterComponent,\r\n getPerformanceFilterComponents,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { NewFilterContextMenu } from './new-filter-context-menu';\r\n/* istanbul ignore next */\r\nexport const FilterBarContainerImpl = ({\r\n filters, addNewFilter, removeAllFilters, removeEmptyFilters, updateFilter, removeFilter,\r\n allSupportedFilters, isEditingFilter, setIsEditingFilter, onFilterValueChange,\r\n i18n, ianaTimeZone, dateFormat,\r\n isAdsStudioAIGCMVPEnabled,\r\n}) => {\r\n const focusedFilterRef = useRef(null);\r\n const defaultOpenFilterRef = useRef(null);\r\n\r\n useEffect(() => {\r\n if (!isEditingFilter) {\r\n focusedFilterRef.current = null;\r\n }\r\n }, [isEditingFilter]);\r\n\r\n const onClickAddFilterButton = useCallback(() => {\r\n // switch to editing mode, and show the new filter context menu\r\n focusedFilterRef.current = null;\r\n setIsEditingFilter(true);\r\n }, [setIsEditingFilter]);\r\n\r\n const onClickReadonlyFilter = useCallback((filter) => {\r\n if (filter.type !== FilterType.SearchText) {\r\n defaultOpenFilterRef.current = filter;\r\n focusedFilterRef.current = filter;\r\n setIsEditingFilter(true);\r\n }\r\n }, [setIsEditingFilter]);\r\n\r\n const onCloseEditingFilterBar = useCallback(() => {\r\n setIsEditingFilter(false);\r\n // ensure no empty filters are left\r\n removeEmptyFilters();\r\n }, [removeEmptyFilters, setIsEditingFilter]);\r\n\r\n const onResetClick = useCallback(() => {\r\n removeAllFilters();\r\n }, [removeAllFilters]);\r\n\r\n const onAddNewFilter = useCallback((type) => {\r\n const newFilter = type === FilterType.TopRatedPerformance\r\n ? addNewFilter({ type, initValue: { topRated: true }, initHumanizedValue: true })\r\n : addNewFilter({ type });\r\n focusedFilterRef.current = newFilter;\r\n }, [addNewFilter]);\r\n\r\n const onRenderNewFilterContextMenu = useCallback(() => (\r\n \r\n ), [allSupportedFilters, filters, i18n, isEditingFilter, onAddNewFilter]);\r\n\r\n const onValueChange = useCallback((curFilterState, newValue, newHumanizedValue) => {\r\n updateFilter({ ...curFilterState, newValue, newHumanizedValue });\r\n if (onFilterValueChange) {\r\n onFilterValueChange(curFilterState, newValue, newHumanizedValue);\r\n }\r\n }, [updateFilter, onFilterValueChange]);\r\n\r\n const onDropdownDismiss = useCallback((curFilterState, newValue, newHumanizedValue) => {\r\n // if now value set when dismiss the dropdown, remove the filter\r\n if (!newHumanizedValue && !curFilterState.isFilterAlwaysVisible) {\r\n removeFilter(curFilterState);\r\n }\r\n }, [removeFilter]);\r\n\r\n const onRenderReadonlyFilter = useCallback(({ filter, isLast }) => {\r\n const { type, title, humanizedValue } = filter;\r\n if (type === FilterType.SearchText) {\r\n return ;\r\n }\r\n if (type === FilterType.TopRatedPerformance) {\r\n return   {i18n.getString(title)}{!isLast && ';'};\r\n }\r\n return   {i18n.getString(title)}: {humanizedValue}{!isLast && ';'};\r\n }, [i18n, onValueChange]);\r\n\r\n const FilterComponents = useMemo(() => getPerformanceFilterComponents({ isAdsStudioAIGCMVPEnabled }), [isAdsStudioAIGCMVPEnabled]);\r\n const onRenderEditingFilter = useCallback(({ filter, focused }) => {\r\n const isDefaultOpen = defaultOpenFilterRef.current === filter;\r\n if (isDefaultOpen) {\r\n defaultOpenFilterRef.current = null;\r\n }\r\n const FilterComponent = FilterComponents[filter.type];\r\n return FilterComponent ? : null;\r\n }, [FilterComponents, dateFormat, i18n, ianaTimeZone, onDropdownDismiss, onValueChange]);\r\n\r\n return isEditingFilter ? (\r\n \r\n ) : (\r\n \r\n );\r\n};\r\n/* istanbul ignore next */\r\nFilterBarContainerImpl.propTypes = {\r\n allSupportedFilters: PropTypes.shape({}).isRequired,\r\n filters: PropTypes.arrayOf(PropTypes.shape({\r\n // type: PropTypes.string,\r\n // title: PropTypes.string,\r\n // id: PropTypes.string,\r\n // value: PropTypes.any,\r\n // humanizedValue: PropTypes.string,\r\n })).isRequired,\r\n addNewFilter: PropTypes.func,\r\n removeAllFilters: PropTypes.func,\r\n removeEmptyFilters: PropTypes.func,\r\n updateFilter: PropTypes.func,\r\n removeFilter: PropTypes.func,\r\n isEditingFilter: PropTypes.bool.isRequired,\r\n setIsEditingFilter: PropTypes.func.isRequired,\r\n onFilterValueChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n ianaTimeZone: PropTypes.string.isRequired,\r\n dateFormat: PropTypes.string.isRequired,\r\n isAdsStudioAIGCMVPEnabled: PropTypes.bool,\r\n};\r\n/* istanbul ignore next */\r\nFilterBarContainerImpl.defaultProps = {\r\n addNewFilter: _.noop,\r\n removeAllFilters: _.noop,\r\n removeEmptyFilters: _.noop,\r\n updateFilter: _.noop,\r\n removeFilter: _.noop,\r\n isAdsStudioAIGCMVPEnabled: false,\r\n};\r\n\r\nexport const FilterBarContainer = React.memo(FilterBarContainerImpl);\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useState, useEffect, useMemo } from 'react';\r\n\r\nimport {\r\n FilterType,\r\n AllSupportedFilters,\r\n CSMLTimeFrame,\r\n FolderAssetType,\r\n getDateAddedChoiceOptions,\r\n civilDateRangeEqual,\r\n ROOT_FOLDER_ID,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useAdStudioFiltersReducer } from './use-filters-reducer';\r\nimport { FilterBarContainer } from '../filter-bar-container';\r\n\r\n// always show a search text filter\r\n/* istanbul ignore next */\r\nconst PERFORMANCE_PAGE_FILTER_BAR_INIT_STATE = [{\r\n ...AllSupportedFilters[FilterType.SearchText],\r\n id: 0,\r\n value: '',\r\n humanizedValue: '',\r\n isFilterAlwaysVisible: true, // always visible even no value set\r\n}];\r\n/* istanbul ignore next */\r\nexport const useFilterBar = ({\r\n onFilterValueChange, currentFolderId, dateFormat, ianaTimeZone, i18n, initialState = PERFORMANCE_PAGE_FILTER_BAR_INIT_STATE,\r\n isAdsStudioAIGCMVPEnabled,\r\n}) => {\r\n const {\r\n filters, addNewFilter, removeFilter, updateFilter, removeAllFilters, removeEmptyFilters, overwriteFilters,\r\n } = useAdStudioFiltersReducer({ initialState, supportedFilterTypes: AllSupportedFilters });\r\n\r\n const [isEditingFilter, setIsEditingFilter] = useState(false);\r\n\r\n const isAnyFilterSet = _.some(filters, ({ value }) => {\r\n const {\r\n searchText, dateAddedFilter, minImageHeight, minImageWidth, importSource, searchLocationFilter, topRated: topRatedFilterChecked, assetSources,\r\n } = value || {};\r\n return searchText || importSource || searchLocationFilter || minImageHeight || minImageWidth\r\n || (dateAddedFilter && dateAddedFilter !== CSMLTimeFrame.Anytime) || topRatedFilterChecked || !_.isEmpty(assetSources);\r\n });\r\n\r\n const allSupportedFilters = useMemo(() => {\r\n const selectedFilters = { ...AllSupportedFilters };\r\n\r\n // for V4, only images are shown in the perf table,so hide these 2 filters\r\n delete selectedFilters[FilterType.AssetType];\r\n delete selectedFilters[FilterType.VideoDuration];\r\n\r\n if (isAdsStudioAIGCMVPEnabled) {\r\n delete selectedFilters[FilterType.ImportSource];\r\n } else {\r\n delete selectedFilters[FilterType.AssetSource];\r\n }\r\n return selectedFilters;\r\n }, [isAdsStudioAIGCMVPEnabled]);\r\n\r\n const renderFilterBar = useCallback((allFilters, isEditing) => (\r\n \r\n ), [addNewFilter, allSupportedFilters, dateFormat, i18n, ianaTimeZone, isAdsStudioAIGCMVPEnabled, onFilterValueChange, removeAllFilters, removeEmptyFilters, removeFilter, updateFilter]);\r\n\r\n const [effectiveFilters, setEffectiveFilters] = useState({});\r\n\r\n useEffect(() => {\r\n let isDateChanged = false;\r\n let filterValues = filters.reduce((acc, { type, value }) => {\r\n // transform the filters if needed\r\n if (type === FilterType.DateAdded) {\r\n const { dateAddedFilter, dateAddedFilterCustomDateRange } = value || {};\r\n let dateAddedDateRange;\r\n if (dateAddedFilter === CSMLTimeFrame.Custom) {\r\n dateAddedDateRange = dateAddedFilterCustomDateRange;\r\n } else {\r\n const dateAddedChoiceOptions = getDateAddedChoiceOptions(i18n, ianaTimeZone);\r\n const { range } = _.find(dateAddedChoiceOptions, o => o.key === dateAddedFilter) || {};\r\n dateAddedDateRange = range;\r\n }\r\n if (dateAddedDateRange && (dateAddedDateRange.start || dateAddedDateRange.end)) {\r\n return { ...acc, dateAddedDateRange };\r\n }\r\n return acc;\r\n }\r\n return value ? { ...acc, ...value } : acc;\r\n }, { isGlobalSearch: currentFolderId === ROOT_FOLDER_ID });\r\n // remove empty values\r\n filterValues = _.pick(filterValues, v => (_.isArray(v) && !_.isEmpty(v)) || v);\r\n\r\n // for V4, only show images in this page, as only images have performance data\r\n filterValues.assetTypeFilter = FolderAssetType.Image;\r\n // to show only assets with perf data, that is, PerformanceMetrics/Impressions gt 0\r\n filterValues.hasPerfData = true;\r\n if (effectiveFilters.dateAddedDateRange && filterValues.dateAddedDateRange) {\r\n isDateChanged = !civilDateRangeEqual(effectiveFilters.dateAddedDateRange, filterValues.dateAddedDateRange);\r\n }\r\n if (!_.isEqual(effectiveFilters, filterValues) || isDateChanged) {\r\n setEffectiveFilters(filterValues);\r\n }\r\n }, [currentFolderId, effectiveFilters, filters, i18n, ianaTimeZone]);\r\n\r\n // ==\r\n // == *comment out as currently no way to switch to subfolder in performance page, uncomment if needed in the future\r\n // ==\r\n // clear search location filter when navigating to a subfolder, search location filter is only applicable in root folder\r\n // useEffect(() => {\r\n // if (currentFolderId !== ROOT_FOLDER_ID) {\r\n // const filter = _.find(filters, { type: FilterType.SearchLocation }) || {};\r\n // if (filter && filter.id) {\r\n // updateFilter({ id: filter.id, value: { searchLocationFilter: null }, humanizedValue: null });\r\n // }\r\n // }\r\n // }, [currentFolderId, filters, updateFilter]);\r\n\r\n return {\r\n filterStates: filters,\r\n filters: effectiveFilters,\r\n isEditingFilter,\r\n renderFilterBar,\r\n overwriteFilters,\r\n isAnyFilterSet,\r\n };\r\n};\r\n","import { makeStyles, shorthands, makeStaticStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const usePerformancePageStaticStyles = makeStaticStyles({\r\n '.k-animation-container .k-header a[role=\"button\"]:focus': {\r\n ...shorthands.outline('1px', 'solid', tokens.colorStrokeFocus2),\r\n },\r\n});\r\n\r\nexport const usePerformancePageStyles = makeStyles({\r\n assetLibraryPerformancePageContainer: {\r\n ...shorthands.padding('0', '25px'),\r\n\r\n '& .asset-library-search': {\r\n width: '300px',\r\n },\r\n\r\n '& .asset-library-performance-grid-container': {\r\n '& .navbar .container-fluid': {\r\n paddingLeft: '0',\r\n paddingRight: '0',\r\n },\r\n '& .campaign-details-list-header': {\r\n ...shorthands.overflow('hidden'),\r\n },\r\n },\r\n\r\n '& .highlighted-text': {\r\n // backgroundColor: palette.yellowLight,\r\n },\r\n\r\n '& .inline-download-form__email-and-schedule-report a:focus::after': {\r\n ...shorthands.margin('4px'),\r\n },\r\n },\r\n subMenu: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: '#ffffff',\r\n ...shorthands.padding('16px', '0px'),\r\n },\r\n title: {\r\n fontSize: '26px',\r\n fontWeight: '800',\r\n flexGrow: '1',\r\n },\r\n inlineDownloadContainer: {},\r\n});\r\n\r\nexport const usePerfTableStyle = makeStyles({\r\n imagePreviewContainer: {\r\n width: '120px',\r\n height: '90px',\r\n },\r\n imagePreviewAndNameContainer: {\r\n '& .action-buttons-container': {\r\n display: 'flex',\r\n opacity: '0',\r\n ...shorthands.transition('opacity', '.3s', '.1s'),\r\n justifyContent: 'space-around',\r\n position: 'absolute',\r\n top: '60px',\r\n left: '24px',\r\n right: '24px',\r\n },\r\n '&:hover .action-buttons-container': {\r\n display: 'flex',\r\n opacity: '1',\r\n },\r\n },\r\n});\r\n\r\nexport const useImagePreviewRawStyles = makeStyles({\r\n hostStyles: {\r\n display: 'inline-block',\r\n },\r\n actionButtonStyles: {\r\n ...shorthands.borderRadius('50%'),\r\n backgroundColor: '#ffffff',\r\n '&:hover': {\r\n color: '#ffffff',\r\n backgroundColor: '#106ebe',\r\n },\r\n },\r\n});\r\n\r\nexport const usePerfPageToolbarStyle = makeStyles({\r\n toolbarFilterContainer: {\r\n flex: '1 !important',\r\n ...shorthands.padding('hidden'),\r\n\r\n '& .filter-list': {\r\n paddingTop: '10px',\r\n '& .asset-library-search': {\r\n display: 'inline-block',\r\n position: 'relative',\r\n top: '2px',\r\n },\r\n },\r\n\r\n '& .filter-list-editing': {\r\n '& .dropdown-filter-container': {\r\n display: 'inline-block',\r\n paddingTop: '12px',\r\n },\r\n\r\n '& .asset-library-search': {\r\n display: 'inline-block',\r\n paddingTop: '12px',\r\n },\r\n\r\n '& .top-rated-performance-filter': {\r\n alignSelf: 'center',\r\n },\r\n },\r\n },\r\n});\r\n","/* eslint-disable object-curly-newline */\r\nimport _ from 'underscore';\r\nimport React, { useMemo, useState, useCallback } from 'react';\r\nimport { Image as FluentImage, ImageFit, IconButton } from '@fluentui/react';\r\nimport { TextWithHighlight, CSMLSortBy } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { TooltipHost } from '@bingads-webui-react/fabric-control';\r\nimport { OpenRegular } from '@fluentui/react-icons';\r\nimport { usePerfTableStyle, useImagePreviewRawStyles } from '../styles/performance-styles';\r\n\r\nconst COLUMN_KEYS = {\r\n ID: 'colId',\r\n PREVIEW_AND_NAME: 'colPreviewAndName',\r\n // RATING: 'colRating',\r\n RATING_BEST: 'colRating_Best',\r\n RATING_GOOD: 'colRating_Good',\r\n RATING_LOW: 'colRating_Low',\r\n RATING_LEARNING: 'colRating_Learning',\r\n RATING_UNREATED: 'colRating_Unrated',\r\n CREATED: 'colCreated',\r\n MODIFIED: 'colModified',\r\n\r\n CLICKS: 'colClicks',\r\n CLICKS_CURRENT_PERIOD: 'colClicksCurrentPeriod',\r\n CLICKS_LAST_PERIOD: 'colClicksLastPeriod',\r\n CLICKS_CHANGE: 'colClicksChange',\r\n CLICKS_CHANGE_PERCENT: 'colClicksChangePercent',\r\n\r\n CTR: 'colCTR',\r\n CTR_CURRENT_PERIOD: 'colCTRCurrentPeriod',\r\n CTR_LAST_PERIOD: 'colCTRLastPeriod',\r\n CTR_CHANGE: 'colCTRChange',\r\n CTR_CHANGE_PERCENT: 'colCTRChangePercent',\r\n\r\n IMPRESSIONS: 'colImpressions',\r\n IMPRESSIONS_CURRENT_PERIOD: 'colImpressionsCurrentPeriod',\r\n IMPRESSIONS_LAST_PERIOD: 'colImpressionsLastPeriod',\r\n IMPRESSIONS_CHANGE: 'colImpressionsChange',\r\n IMPRESSIONS_CHANGE_PERCENT: 'colImpressionsChangePercent',\r\n\r\n SPEND: 'colSpend',\r\n SPEND_CURRENT_PERIOD: 'colSpendCurrentPeriod',\r\n SPEND_LAST_PERIOD: 'colSpendLastPeriod',\r\n SPEND_CHANGE: 'colSpendChange',\r\n SPEND_CHANGE_PERCENT: 'colSpendChangePercent',\r\n\r\n USAGE: 'colUsage',\r\n};\r\n\r\nconst columnKeyToSortBy = {\r\n [COLUMN_KEYS.ID]: { asc: CSMLSortBy.AssetIdAsc, desc: CSMLSortBy.AssetIdDesc },\r\n [COLUMN_KEYS.PREVIEW_AND_NAME]: { asc: CSMLSortBy.ImageName, desc: CSMLSortBy.ImageNameDesc },\r\n [COLUMN_KEYS.CREATED]: { asc: CSMLSortBy.LastCreatedAsc, desc: CSMLSortBy.LastCreated },\r\n [COLUMN_KEYS.MODIFIED]: { asc: CSMLSortBy.MostRecentAsc, desc: CSMLSortBy.MostRecent },\r\n\r\n [COLUMN_KEYS.CLICKS]: { asc: CSMLSortBy.ClickAsc, desc: CSMLSortBy.ClickDesc },\r\n [COLUMN_KEYS.CLICKS_CURRENT_PERIOD]: { asc: CSMLSortBy.ClickAsc, desc: CSMLSortBy.ClickDesc },\r\n [COLUMN_KEYS.CLICKS_LAST_PERIOD]: { asc: CSMLSortBy.ClickPeriodAsc, desc: CSMLSortBy.ClickPeriodDesc },\r\n [COLUMN_KEYS.CLICKS_CHANGE]: { asc: CSMLSortBy.ClickChangeAsc, desc: CSMLSortBy.ClickChangeDesc },\r\n [COLUMN_KEYS.CLICKS_CHANGE_PERCENT]: { asc: CSMLSortBy.ClickChangePercentAsc, desc: CSMLSortBy.ClickChangePercentDesc },\r\n\r\n [COLUMN_KEYS.CTR]: { asc: CSMLSortBy.CTRAsc, desc: CSMLSortBy.CTRDesc },\r\n [COLUMN_KEYS.CTR_CURRENT_PERIOD]: { asc: CSMLSortBy.CTRAsc, desc: CSMLSortBy.CTRDesc },\r\n [COLUMN_KEYS.CTR_LAST_PERIOD]: { asc: CSMLSortBy.CTRPeriodAsc, desc: CSMLSortBy.CTRPeriodDesc },\r\n [COLUMN_KEYS.CTR_CHANGE]: { asc: CSMLSortBy.CTRChangeAsc, desc: CSMLSortBy.CTRChangeDesc },\r\n [COLUMN_KEYS.CTR_CHANGE_PERCENT]: { asc: CSMLSortBy.CTRChangePercentAsc, desc: CSMLSortBy.CTRChangePercentDesc },\r\n\r\n [COLUMN_KEYS.IMPRESSIONS]: { asc: CSMLSortBy.ImpressionAsc, desc: CSMLSortBy.ImpressionDesc },\r\n [COLUMN_KEYS.IMPRESSIONS_CURRENT_PERIOD]: { asc: CSMLSortBy.ImpressionAsc, desc: CSMLSortBy.ImpressionDesc },\r\n [COLUMN_KEYS.IMPRESSIONS_LAST_PERIOD]: { asc: CSMLSortBy.ImpressionPeriodAsc, desc: CSMLSortBy.ImpressionPeriodDesc },\r\n [COLUMN_KEYS.IMPRESSIONS_CHANGE]: { asc: CSMLSortBy.ImpressionChangeAsc, desc: CSMLSortBy.ImpressionChangeDesc },\r\n [COLUMN_KEYS.IMPRESSIONS_CHANGE_PERCENT]: { asc: CSMLSortBy.ImpressionChangePercentAsc, desc: CSMLSortBy.ImpressionChangePercentDesc },\r\n\r\n [COLUMN_KEYS.SPEND]: { asc: CSMLSortBy.SpendAsc, desc: CSMLSortBy.SpendDesc },\r\n [COLUMN_KEYS.SPEND_CURRENT_PERIOD]: { asc: CSMLSortBy.SpendAsc, desc: CSMLSortBy.SpendDesc },\r\n [COLUMN_KEYS.SPEND_LAST_PERIOD]: { asc: CSMLSortBy.SpendPeriodAsc, desc: CSMLSortBy.SpendPeriodDesc },\r\n [COLUMN_KEYS.SPEND_CHANGE]: { asc: CSMLSortBy.SpendChangeAsc, desc: CSMLSortBy.SpendChangeDesc },\r\n [COLUMN_KEYS.SPEND_CHANGE_PERCENT]: { asc: CSMLSortBy.SpendChangePercentAsc, desc: CSMLSortBy.SpendChangePercentDesc },\r\n};\r\n/* istanbul ignore next */\r\nfunction formatDate(date, i18n) {\r\n return i18n.formatDate(date, { date: 'long' });\r\n}\r\n/* istanbul ignore next */\r\nconst ImagePreview = ({\r\n id, name, folderAssetType, url, thumbnailUrl,\r\n}) => {\r\n const classes = usePerfTableStyle();\r\n const previewUrl = thumbnailUrl || url;\r\n return (\r\n
\r\n {previewUrl && }\r\n
\r\n );\r\n};\r\n\r\nconst calloutProps = { gapSpace: 0 };\r\n/* istanbul ignore next */\r\nconst ActionIconButton = ({ iconName, label, onClick }) => {\r\n const iconProps = useMemo(() => ({ iconName }), [iconName]);\r\n const classes = useImagePreviewRawStyles();\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n/* istanbul ignore next */\r\nconst ImagePreviewAndName = ({\r\n id, name, highlightedText, folderAssetType, url, thumbnailUrl, i18n,\r\n onGotoDetailPage, onGotoEditPage,\r\n}) => {\r\n const classes = usePerfTableStyle();\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n onGotoEditPage(id)} />\r\n onGotoDetailPage(id)} />\r\n
\r\n
\r\n );\r\n};\r\n/* istanbul ignore next */\r\nconst AssetColumn = (i18n, onGotoDetailPage, onGotoEditPage, renderHeaderWithPopup) => ({\r\n key: COLUMN_KEYS.PREVIEW_AND_NAME,\r\n name: i18n.getString(_TL_('Asset')),\r\n ariaLabel: 'asset column',\r\n minWidth: 130,\r\n maxWidth: 130,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n onRender: item => ,\r\n helpId: 'pop_BA_AssetLibrary_Performance_Asset',\r\n odataColumnName: 'AssetUrl',\r\n});\r\n/* istanbul ignore next */\r\nconst IdColumn = (i18n, renderHeaderWithPopup) => ({\r\n key: COLUMN_KEYS.ID,\r\n name: i18n.getString(_TL_('Asset ID')),\r\n // fieldName: 'id',\r\n ariaLabel: 'id column',\r\n isRowHeader: true,\r\n minWidth: 100,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n onRender: item => ,\r\n onRenderHeader: renderHeaderWithPopup,\r\n helpId: 'pop_BA_AssetLibrary_Performance_ID',\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n odataColumnName: 'AssetId',\r\n});\r\n/* istanbul ignore next */\r\nconst CreatedColumn = (i18n, renderHeaderWithPopup) => ({\r\n key: COLUMN_KEYS.CREATED,\r\n name: i18n.getString(_TL_('Created')),\r\n // fieldName: 'createdTime',\r\n ariaLabel: 'created column',\r\n minWidth: 80,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n onRender: item => ({formatDate(item.createdTime, i18n)}),\r\n odataColumnName: 'CreatedTime',\r\n});\r\n/* istanbul ignore next */\r\nconst ModifiedColumn = (i18n, renderHeaderWithPopup) => ({\r\n key: COLUMN_KEYS.MODIFIED,\r\n name: i18n.getString(_TL_('Modified')),\r\n // fieldName: 'modifiedTime',\r\n ariaLabel: 'modified column',\r\n minWidth: 80,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n onRender: item => ({formatDate(item.modifiedTime, i18n)}),\r\n odataColumnName: 'ModifiedTime',\r\n});\r\n\r\n/* istanbul ignore next */\r\nconst ClicksColumn = ({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }) => ({\r\n key: COLUMN_KEYS.CLICKS,\r\n name: i18n.getString(_TL_('Clicks')),\r\n fieldName: 'clicks',\r\n ariaLabel: 'clicks column',\r\n minWidth: 100,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n helpId: 'pop_BA_AssetLibrary_Performance_Clicks',\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n subColumns: compareOn ? [\r\n {\r\n key: COLUMN_KEYS.CLICKS_CURRENT_PERIOD,\r\n name: currentPeriod,\r\n fieldName: 'clicks',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.CLICKS_LAST_PERIOD,\r\n name: lastPeriod,\r\n fieldName: 'periodClicks',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.CLICKS_CHANGE,\r\n name: i18n.getString(_TL_('Change')),\r\n fieldName: 'clicksChange',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n helpId: 'pop_BA_Reporting_Clarity_POPChange',\r\n },\r\n {\r\n key: COLUMN_KEYS.CLICKS_CHANGE_PERCENT,\r\n name: i18n.getString(_TL_('Change (%)')),\r\n fieldName: 'clicksChangePercentage',\r\n minWidth: 100,\r\n maxWidth: 100,\r\n helpId: 'pop_BA_Reporting_Clarity_POPChangePercent',\r\n },\r\n ] : undefined,\r\n odataColumnName: 'PerformanceMetrics/Clicks',\r\n});\r\n/* istanbul ignore next */\r\nconst CTRColumn = ({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }) => ({\r\n key: COLUMN_KEYS.CTR,\r\n name: i18n.getString(_TL_('CTR')),\r\n fieldName: 'CTR',\r\n ariaLabel: 'CTR column',\r\n minWidth: 100,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n helpId: 'pop_BA_AssetLibrary_Performance_CTR',\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n onRenderHeader: renderHeaderWithPopup,\r\n subColumns: compareOn ? [\r\n {\r\n key: COLUMN_KEYS.CTR_CURRENT_PERIOD,\r\n name: currentPeriod,\r\n fieldName: 'CTR',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.CTR_LAST_PERIOD,\r\n name: lastPeriod,\r\n fieldName: 'periodCTR',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.CTR_CHANGE,\r\n name: i18n.getString(_TL_('Change')),\r\n fieldName: 'CTRChange',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChange',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.CTR_CHANGE_PERCENT,\r\n name: i18n.getString(_TL_('Change (%)')),\r\n fieldName: 'CTRChangePercentage',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChangePercent',\r\n minWidth: 100,\r\n maxWidth: 100,\r\n },\r\n ] : undefined,\r\n odataColumnName: 'PerformanceMetrics/CTR',\r\n});\r\n/* istanbul ignore next */\r\nconst ImpressionsColumn = ({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }) => ({\r\n key: COLUMN_KEYS.IMPRESSIONS,\r\n name: i18n.getString(_TL_('Impressions')),\r\n fieldName: 'impressions',\r\n ariaLabel: 'impressions column',\r\n minWidth: 130,\r\n maxWidth: 130,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n helpId: 'pop_BA_AssetLibrary_Performance_Impression',\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n subColumns: compareOn ? [\r\n {\r\n key: COLUMN_KEYS.IMPRESSIONS_CURRENT_PERIOD,\r\n name: currentPeriod,\r\n fieldName: 'impressions',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.IMPRESSIONS_LAST_PERIOD,\r\n name: lastPeriod,\r\n fieldName: 'periodImpressions',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.IMPRESSIONS_CHANGE,\r\n name: i18n.getString(_TL_('Change')),\r\n fieldName: 'impressionsChange',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChange',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.IMPRESSIONS_CHANGE_PERCENT,\r\n name: i18n.getString(_TL_('Change (%)')),\r\n fieldName: 'impressionsChangePercentage',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChangePercent',\r\n minWidth: 100,\r\n maxWidth: 100,\r\n },\r\n ] : undefined,\r\n odataColumnName: 'PerformanceMetrics/Impressions',\r\n});\r\n/* istanbul ignore next */\r\nconst SpendColumn = ({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }) => ({\r\n key: COLUMN_KEYS.SPEND,\r\n name: i18n.getString(_TL_('Spend')),\r\n fieldName: 'spend',\r\n ariaLabel: 'spend column',\r\n minWidth: 100,\r\n maxWidth: 120,\r\n isCollapsible: false,\r\n isResizable: true,\r\n sortable: true,\r\n helpId: 'pop_BA_AssetLibrary_Performance_Spend',\r\n onRenderHeader: renderHeaderWithPopup,\r\n styles: {\r\n sortIcon: { display: 'none' },\r\n },\r\n subColumns: compareOn ? [\r\n {\r\n key: COLUMN_KEYS.SPEND_CURRENT_PERIOD,\r\n name: currentPeriod,\r\n fieldName: 'spend',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.SPEND_LAST_PERIOD,\r\n name: lastPeriod,\r\n fieldName: 'periodSpend',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.SPEND_CHANGE,\r\n name: i18n.getString(_TL_('Change')),\r\n fieldName: 'spendChange',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChange',\r\n minWidth: 80,\r\n maxWidth: 80,\r\n },\r\n {\r\n key: COLUMN_KEYS.SPEND_CHANGE_PERCENT,\r\n name: i18n.getString(_TL_('Change (%)')),\r\n fieldName: 'spendChangePercentage',\r\n helpId: 'pop_BA_Reporting_Clarity_POPChangePercent',\r\n minWidth: 100,\r\n maxWidth: 100,\r\n },\r\n ] : undefined,\r\n odataColumnName: 'PerformanceMetrics/Spend',\r\n});\r\n/* istanbul ignore next */\r\nconst UsageColumn = ({ i18n, onClick, renderHeaderWithPopup }) => ({\r\n key: COLUMN_KEYS.USAGE,\r\n name: i18n.getString(_TL_('Usage')),\r\n fieldName: 'usedByCount',\r\n ariaLabel: 'asset usage column',\r\n minWidth: 150,\r\n maxWidth: 240,\r\n isCollapsible: false,\r\n isResizable: true,\r\n helpId: 'pop_BA_AssetLibrary_Performance_Usage',\r\n onRender: item => (\r\n }\r\n style={{ textWrap: 'wrap', textAlign: 'left', fontWeight: 400, lineHeight: '14px' }}\r\n onClick={() => onClick(item)}\r\n appearance=\"transparent\"\r\n >\r\n {i18n.getString(_TL_('View all ads using this asset'))}\r\n \r\n ),\r\n // sortable: true, // no data for now\r\n onRenderHeader: renderHeaderWithPopup,\r\n});\r\n/* istanbul ignore next */\r\nconst getHeaders = (columns) => {\r\n const localizedHeaders = [];\r\n const odataColumnNames = [];\r\n columns.forEach((col) => {\r\n // use subColumns if available\r\n if (col.subColumns && col.subColumns.some(subCol => subCol.odataColumnName != null)) {\r\n col.subColumns.forEach((subCol) => {\r\n if (subCol.odataColumnName != null) {\r\n localizedHeaders.push(subCol.name);\r\n odataColumnNames.push(subCol.odataColumnName);\r\n }\r\n });\r\n } else if (col.odataColumnName != null) {\r\n localizedHeaders.push(col.name);\r\n odataColumnNames.push(col.odataColumnName);\r\n }\r\n });\r\n return {\r\n localizedHeaders,\r\n odataColumnNames,\r\n };\r\n};\r\n/* istanbul ignore next */\r\nexport const useTableColumns = ({ i18n, dateRange, onGotoDetailPage, onGotoEditPage, navigation, renderHeaderWithPopup }) => {\r\n const [sortByColumn, setSortByColumn] = useState({ key: COLUMN_KEYS.MODIFIED, isSorted: true, isSortedDescending: true });\r\n const [expandedColumns, setExpandedColumns] = useState({});\r\n\r\n const onUsageClick = useCallback(\r\n ({ folderAssetType, id }) => navigation.gotoAdsPageWithAssetIdFilter({ folderAssetType, assetId: id }),\r\n [navigation]\r\n );\r\n\r\n const columns = useMemo(() => {\r\n const compareOn = !!(dateRange && dateRange.compared);\r\n const currentPeriod = _.get(dateRange, 'RangeStartDate', i18n.getString(_TL_('Current')));\r\n const lastPeriod = _.get(dateRange, ['compared', 'formattedStart'], i18n.getString(_TL_('Last')));\r\n\r\n const cols = [\r\n // PreviewColumn(i18n),\r\n // NameColumn(i18n),\r\n AssetColumn(i18n, onGotoDetailPage, onGotoEditPage, renderHeaderWithPopup),\r\n IdColumn(i18n, renderHeaderWithPopup),\r\n // RatingColumn(i18n),\r\n ClicksColumn({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }),\r\n CTRColumn({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }),\r\n ImpressionsColumn({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }),\r\n SpendColumn({ i18n, compareOn, currentPeriod, lastPeriod, renderHeaderWithPopup }),\r\n UsageColumn({ i18n, onClick: onUsageClick, renderHeaderWithPopup }),\r\n CreatedColumn(i18n, renderHeaderWithPopup),\r\n ModifiedColumn(i18n, renderHeaderWithPopup),\r\n ].map(col => ({ ...col, isExpanded: expandedColumns[col.key] }));\r\n return cols;\r\n }, [dateRange, i18n, onGotoDetailPage, onGotoEditPage, onUsageClick, expandedColumns, renderHeaderWithPopup]);\r\n\r\n // ignore dependency on columns for preventing rerendering of download panel\r\n const getInlineDownloadColumns = useCallback(() => getHeaders(columns), []);\r\n\r\n const sortBy = useMemo(() => {\r\n const { key: sortByKey, isSortedDescending } = sortByColumn || {};\r\n const { asc, desc } = columnKeyToSortBy[sortByKey] || {};\r\n const sortByVal = isSortedDescending ? desc : asc;\r\n\r\n // default by most recent\r\n return sortByVal || CSMLSortBy.MostRecent;\r\n }, [sortByColumn]);\r\n\r\n const expandColumns = useCallback((newColumns) => {\r\n const cols = _.chain(newColumns).reduce((acc, { key, isExpanded }) => { acc[key] = isExpanded || false; return acc; }, {}).value();\r\n setExpandedColumns((prevCols) => {\r\n if (_.isEqual(prevCols, cols)) return prevCols;\r\n return cols;\r\n });\r\n }, []);\r\n\r\n return {\r\n columns, sortByColumn, setSortByColumn, sortBy, expandColumns, getInlineDownloadColumns,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\nimport CircleSolid from '../media/CircleSolid.svg';\r\nimport CircleDotted from '../media/CircleDotted.svg';\r\nimport DiamondSolid from '../media/DiamondSolid.svg';\r\nimport DiamondDotted from '../media/DiamondDotted.svg';\r\nimport Waterdrop from '../media/Waterdrop.svg';\r\n\r\nexport const useInlineChartContainerStyle = makeStyles({\r\n inlineChartContainer: {\r\n flexShrink: '0',\r\n zIndex: '400',\r\n boxShadow: 'inset 0px 0.6px 1.8px rgba(0, 0, 0, 0.108), inset 0px 3.2px 7.2px rgba(0, 0, 0, 0.132)',\r\n '& .top-grid-form': {\r\n minWidth: 'initial',\r\n maxWidth: 'initial',\r\n },\r\n '& .chart-area-wrapper': {\r\n display: 'flex',\r\n\r\n '& .react-block-ui-none, .react-block-ui': {\r\n flexGrow: '1',\r\n },\r\n\r\n '& .inline-chart-container': {\r\n flexGrow: '1',\r\n paddingTop: '16px',\r\n paddingLeft: '32px',\r\n paddingRight: '32px',\r\n paddingBottom: '22px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: 'auto !important',\r\n '& .highcharts-label-box.highcharts-tooltip-box': {\r\n opacity: '0 !important',\r\n },\r\n '& .tool-tip-value': {\r\n fontSize: '16px',\r\n paddingLeft: '20px',\r\n paddingTop: '2px',\r\n },\r\n '& .primary-daterange': {\r\n color: '#323130',\r\n fontSize: '11px',\r\n fallbacks: [\r\n {\r\n color: '#323130',\r\n },\r\n ],\r\n },\r\n '& .primary-start-date, & .comparison-start-date': {\r\n paddingLeft: '20px',\r\n display: 'inline-block',\r\n fallbacks: [\r\n {\r\n paddingLeft: '20px',\r\n },\r\n ],\r\n },\r\n '& .primary-end-date, & .comparison-end-date': {\r\n position: 'absolute',\r\n display: 'inline-block',\r\n right: '0',\r\n fallbacks: [\r\n {\r\n right: '0',\r\n },\r\n {\r\n position: 'absolute',\r\n },\r\n ],\r\n },\r\n '& .comparison-daterange': {\r\n color: '#605e5c',\r\n fontSize: '11px',\r\n fallbacks: [\r\n {\r\n color: '#605E5C',\r\n },\r\n ],\r\n },\r\n '& .flex-chart-panel': {\r\n display: 'flex',\r\n paddingBottom: '16px',\r\n alignSelf: 'flex-end',\r\n },\r\n '& .chart-panel-left': {\r\n alignItems: 'flex-start',\r\n lineHeight: '19px',\r\n paddingTop: '6px',\r\n height: '38px',\r\n },\r\n '& .chart-panel-right': {\r\n display: 'flex',\r\n ...shorthands.flex(1, 1, 'auto'),\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n '& .glyphicon-triangle-bottom': {\r\n fontSize: '12px',\r\n marginLeft: '5px',\r\n fontFamily: 'MsAds MDL2 Assets !important',\r\n float: 'right',\r\n marginRight: '0',\r\n height: '12px !important',\r\n width: '12px !important',\r\n },\r\n '& .glyphicon-triangle-bottom:before': {\r\n content: '\"\\\\E70D\" !important',\r\n },\r\n },\r\n '& .metrics-pickers': {\r\n display: 'flex',\r\n\r\n '& .metric-colors': {\r\n display: 'flex',\r\n },\r\n '& .metrics-vs': {\r\n ...shorthands.margin('0px', '16px'),\r\n paddingLeft: '0px',\r\n paddingRight: '0px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n },\r\n '& .metric-color-line': {\r\n width: '12px',\r\n height: '42px',\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n '& .show-comparison-line': {\r\n display: 'inline-block',\r\n },\r\n '& .hide-comparison-line': {\r\n display: 'none',\r\n },\r\n '& .comparison-color': {\r\n marginLeft: '4px',\r\n },\r\n '& .primary-metric .metric-color': {\r\n backgroundImage: `url(\"${CircleSolid}\")`,\r\n },\r\n '& .primary-metric .comparison-color': {\r\n backgroundImage: `url(\"${CircleDotted}\")`,\r\n },\r\n '& .secondary-metric .metric-color': {\r\n backgroundImage: `url(\"${DiamondSolid}\")`,\r\n },\r\n '& .secondary-metric .comparison-color': {\r\n backgroundImage: `url(\"${DiamondDotted}\")`,\r\n },\r\n '& .list-selector-container': {\r\n maxHeight: '400px',\r\n ...shorthands.overflow('auto'),\r\n '& .selected': {\r\n ...shorthands.outline('1px', 'auto', '#000000'),\r\n },\r\n },\r\n },\r\n '& .granularity-picker, & .primary-metric, & .secondary-metric': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignSelf: 'center',\r\n height: '100%',\r\n '& .btn': {\r\n fontSize: '14px',\r\n },\r\n '& .btn-default': {\r\n fontWeight: 'normal',\r\n },\r\n '& .dropdown-menu': {\r\n top: 'auto',\r\n position: 'absolute',\r\n minWidth: '110px',\r\n whiteSpace: 'nowrap',\r\n\r\n '& .container': {\r\n ...shorthands.padding('0'),\r\n },\r\n },\r\n '& .dropdown-toggle.btn': {\r\n ...shorthands.border('none'),\r\n ...shorthands.borderRadius('2px'),\r\n width: '100%',\r\n height: '100%',\r\n paddingLeft: '8px',\r\n paddingRight: '8px',\r\n },\r\n\r\n '& .ba-dropdown-selector': {\r\n position: 'relative',\r\n ...shorthands.border('1px', 'solid', '#605e5c'),\r\n minWidth: '132px',\r\n verticalAlign: 'baseline',\r\n marginLeft: '8px',\r\n height: '30px',\r\n ...shorthands.borderRadius('2px'),\r\n '& > button': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n\r\n '& .selectedItem-data': {\r\n display: 'inline-block',\r\n marginRight: '5px',\r\n },\r\n\r\n '& .comparison-container': {\r\n display: 'inline-block',\r\n },\r\n\r\n '& .show-selectedItem-percentage': {\r\n paddingLeft: '5px',\r\n display: 'inline-block',\r\n },\r\n\r\n '& .hide-selectedItem-percentage': {\r\n ...shorthands.padding('0px'),\r\n ...shorthands.margin('0px'),\r\n display: 'none',\r\n },\r\n\r\n '& .ba-list-selector': {\r\n ...shorthands.border('none'),\r\n '& .empty-message': {\r\n position: 'absolute',\r\n ...shorthands.padding('5px', '10px'),\r\n },\r\n '& .list-selector-item': {\r\n ...shorthands.padding('5px', '10px'),\r\n ...shorthands.margin('0px'),\r\n '&:hover': {\r\n cursor: 'pointer',\r\n backgroundColor: '#f5f5f5',\r\n },\r\n '&.selected': {\r\n backgroundColor: '#E7F0F6',\r\n },\r\n '& .item-actions': {\r\n float: 'right',\r\n },\r\n '& .inline-recommendation-grid-icon:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n display: 'inline-block',\r\n fontWeight: 'normal',\r\n fontStyle: 'normal',\r\n ...shorthands.textDecoration('ingerit'),\r\n speak: 'none',\r\n fontVariant: 'normal',\r\n textTransform: 'none',\r\n lineHeight: '1',\r\n WebkitFontSmoothing: 'antialiased',\r\n MozOsxFontSmoothing: 'grayscale',\r\n fontSize: '14px',\r\n verticalAlign: 'middle',\r\n color: '#0078D4',\r\n paddingBottom: '2px',\r\n },\r\n '& .inline-recommendation-grid-icon:hover': {\r\n cursor: 'pointer',\r\n },\r\n '& .inline-chart-option': {\r\n marginLeft: '5px',\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .granularity-picker, & .secondary-metric': {\r\n '& .dropdown-menu': {\r\n left: 'auto',\r\n right: '0',\r\n },\r\n },\r\n\r\n '& .moving-average': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '100%',\r\n fontStyle: 'normal',\r\n fontSize: '14px',\r\n fontWeight: 'normal',\r\n marginLeft: '16px',\r\n whiteSpace: 'nowrap',\r\n '& input[type=checkbox]': {\r\n height: '20px',\r\n width: '20px',\r\n },\r\n '& label': {\r\n display: 'inline-block',\r\n fontWeight: 'normal',\r\n '& input': {\r\n ...shorthands.margin('0px', '5px'),\r\n lineHeight: 'normal',\r\n verticalAlign: 'middle',\r\n },\r\n },\r\n },\r\n '& .react-highchart-wrapper': {\r\n '& > div[role=\"region\"]': {\r\n ...shorthands.overflow('visible !important'),\r\n },\r\n },\r\n '& .highcharts-container': {\r\n ...shorthands.overflow('visible !important'),\r\n '& .highcharts-root': {\r\n ...shorthands.overflow('visible !important'),\r\n },\r\n },\r\n '& .chart-container': {\r\n ...shorthands.padding('0px'),\r\n position: 'relative',\r\n },\r\n\r\n '& .balloon, & .balloonYellow, & .balloonUnknown': {\r\n position: 'absolute',\r\n top: '-20px',\r\n },\r\n '& .balloon, & .balloonYellow, & .balloonUnknown:hover': {\r\n cursor: 'pointer',\r\n },\r\n\r\n '& .fluc-image': {\r\n backgroundImage: `url(\"${Waterdrop}\")`,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPositionX: 'left',\r\n backgroundPositionY: 'center',\r\n width: '28px',\r\n height: '38px',\r\n textAlign: 'center',\r\n paddingLeft: '1px !important',\r\n paddingTop: '11px !important',\r\n\r\n '&:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n color: 'white',\r\n fontSize: '16px',\r\n },\r\n },\r\n\r\n '& .fluc-lightbulb': {\r\n '&:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n color: '#0078D4',\r\n fontSize: '16px',\r\n },\r\n },\r\n\r\n '& .chart-no-data-container': {\r\n textAlign: 'center',\r\n ...shorthands.borderLeft('0 !important'),\r\n ...shorthands.borderRight('0 !important'),\r\n height: '120px',\r\n lineHeight: 'initial',\r\n paddingTop: '22px',\r\n paddingBottom: '60px',\r\n ...shorthands.border('solid', '1px', '#e1dfdd'),\r\n marginRight: '0px',\r\n marginTop: '19px',\r\n '& .chart-no-data-label': {\r\n marginLeft: '0',\r\n ...shorthands.borderBottom('solid', '1px', '#e1dfdd'),\r\n display: 'inline-block',\r\n height: '100%',\r\n width: '100%',\r\n },\r\n },\r\n '& .spinner': {\r\n paddingTop: '50px',\r\n paddingBottom: '59px',\r\n '& .spinner-icon': {\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n },\r\n },\r\n '& .highcharts-label.highcharts-tooltip': {\r\n ...shorthands.margin('0px !important'),\r\n width: 'auto !important',\r\n minWidth: '150px !important',\r\n height: 'auto !important',\r\n minHeight: '100px !important',\r\n '& > span:nth-of-type(1)': {\r\n fontFamily: 'Segoe UI !important',\r\n ...shorthands.border('none'),\r\n },\r\n },\r\n '& .perf-graph-tool-tip': {\r\n display: 'flex',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n ...shorthands.padding('11px', '15px'),\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n '& .charts-tooltip': {\r\n color: '#323130',\r\n fontSize: '12px',\r\n fontFamily: 'Segoe UI',\r\n display: 'inline-block',\r\n\r\n '& .primary, & .primary-comparison, & .movingaverage, & .movingaverage-comparison': {\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: '12px 40px',\r\n height: '40px',\r\n '& .toolTipMetric': {\r\n height: '12px',\r\n marginRight: '8px',\r\n marginTop: '8px',\r\n paddingLeft: '20px',\r\n },\r\n },\r\n '& b': {\r\n fontWeight: 'normal',\r\n },\r\n '& .primary': {\r\n backgroundImage: `url(\"${CircleSolid}\")`,\r\n },\r\n '& .primary-comparison': {\r\n backgroundImage: `url(\"${DiamondSolid}\")`,\r\n },\r\n '& .movingaverage': {\r\n backgroundImage: `url(\"${CircleDotted}\")`,\r\n },\r\n '& .movingaverage-comparison': {\r\n backgroundImage: `url(\"${DiamondDotted}\")`,\r\n },\r\n },\r\n '& .charts-tooltip:nth-of-type(2)': {\r\n marginLeft: '16px !important',\r\n },\r\n },\r\n },\r\n },\r\n '& .bingads-popover': {\r\n zIndex: '100',\r\n },\r\n },\r\n});\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useMemo, useState, useEffect } from 'react';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport PropTypes from 'prop-types';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport classnames from 'classnames';\r\nimport { DEFAULT_PAGE_SIZE, AdsStudioPageName, AdsStudioSpinner, FolderAssetType } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { useFilterBar } from './hooks/use-filter-bar';\r\nimport { useLoadData } from './hooks/use-load-data';\r\nimport { useTableColumns } from './hooks/use-table-columns';\r\nimport { usePerformancePage } from './hooks/use-performance-page';\r\nimport { usePerformancePageStyles, usePerformancePageStaticStyles } from './styles/performance-styles';\r\nimport { useInlineChartContainerStyle } from './styles/chart-styles';\r\n\r\n/* istanbul ignore next */\r\nexport const PerformancePageComponent = (props) => {\r\n const {\r\n renderHeaderWithPopup, navigation, notificationApi, reload, renderToolbarContainer, renderDetailsList, renderInlineChart, dataService, getChartPreference, perfMetricDateRange, adsStudioUserPreferences, renderDatePicker, i18n, logger, dateFormat, ianaTimeZone, isAdsStudioAIGCMVPEnabled,\r\n useInlineDownload, createFolderFilterQuery, pagePerfMarker: performancePagePerfMarker, isAIGCRegionRestricted, setDataLoaded,\r\n } = props;\r\n usePerformancePageStaticStyles();\r\n const classes = usePerformancePageStyles();\r\n const chartClasses = useInlineChartContainerStyle();\r\n const [isChartShown, setChartShown] = useState(null);\r\n const [isPageInited, setPageInited] = useState(false);\r\n\r\n const {\r\n assets = [],\r\n totalAssetCount = 0,\r\n loadDataInDateRange,\r\n loadDataArgs,\r\n perfTimeSeriesData,\r\n loadPerfTimeSeriesData,\r\n loadMoreDataInDateRange,\r\n currentFolderId,\r\n dataOwnerPageName,\r\n renameAsset,\r\n } = dataService || {};\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load assets. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const onFilterValueChange = useCallback((curFilterState, newValue, newHumanizedValue) => {\r\n logger.logTrace('onPerfPageFilterValueChange', { ...(curFilterState || {}), newValue, newHumanizedValue });\r\n // handleRealUsedFlag(assetLibraryAccountPreferences, RealUsedFlagSuffix.App);\r\n }, [logger]);\r\n\r\n const {\r\n filterStates, filters, isEditingFilter, renderFilterBar, overwriteFilters,\r\n } = useFilterBar({\r\n onFilterValueChange, currentFolderId, dateFormat, ianaTimeZone, i18n, isAdsStudioAIGCMVPEnabled: isAdsStudioAIGCMVPEnabled && !isAIGCRegionRestricted,\r\n });\r\n\r\n const {\r\n isDownloadShown,\r\n setDownloadShown,\r\n renderInlineDownload,\r\n } = useInlineDownload({ overwriteFilters });\r\n\r\n const {\r\n loadingData,\r\n setLoadingData,\r\n loadingMoreData,\r\n loadNextPage,\r\n loadDataAsync,\r\n } = useLoadData({\r\n filters, perfMetricDateRange, onFailedToLoadData, loadMoreDataInDateRange, loadDataInDateRange, perfMarker: performancePagePerfMarker,\r\n });\r\n\r\n const onGotoDetailPage = useCallback((assetId) => {\r\n if (navigation) {\r\n navigation.gotoAssetDetails({\r\n assetId, assets, totalAssetCount, folderAssetType: FolderAssetType.Image, loadMoreData: loadNextPage, renameAsset,\r\n });\r\n }\r\n }, [assets, loadNextPage, navigation, renameAsset, totalAssetCount]);\r\n\r\n const onGotoEditPage = useCallback((assetId) => {\r\n if (navigation) {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId });\r\n }\r\n navigation.gotoEditImagePage({ imageId: assetId });\r\n }\r\n }, [logger, navigation]);\r\n\r\n const {\r\n columns, sortByColumn, setSortByColumn, sortBy, expandColumns, getInlineDownloadColumns,\r\n } = useTableColumns({\r\n i18n, dateRange: perfMetricDateRange, onGotoDetailPage, onGotoEditPage, navigation, renderHeaderWithPopup,\r\n });\r\n\r\n const {\r\n pageSize,\r\n pager,\r\n pagedItems,\r\n setPageNumber,\r\n setPageSize,\r\n } = usePerformancePage({\r\n assets, loadNextPage, adsStudioUserPreferences, totalAssetCount, highlightedText: filters.searchText,\r\n });\r\n\r\n const hasNoData = _.isEmpty(assets);\r\n const shouldShowChart = useMemo(() => isDownloadShown === false && isChartShown !== null, [isChartShown, isDownloadShown]);\r\n const isPageLoading = useMemo(() => !isPageInited || loadingData, [isPageInited, loadingData]);\r\n const toolbar = useMemo(() => {\r\n const filterBar = renderFilterBar(filterStates, isEditingFilter);\r\n return !isDownloadShown && renderToolbarContainer({\r\n i18n, filterBar, isChartShown, setChartShown, isEditingFilter, setDownloadShown,\r\n });\r\n }, [filterStates, i18n, isChartShown, isDownloadShown, isEditingFilter, renderFilterBar, renderToolbarContainer, setDownloadShown]);\r\n\r\n const onSort = useCallback((newSortByColumn) => {\r\n setPageNumber(1);\r\n setSortByColumn(newSortByColumn);\r\n adsStudioUserPreferences.setPerfTableSortBy(newSortByColumn);\r\n }, [adsStudioUserPreferences, setPageNumber, setSortByColumn]);\r\n\r\n const getInlineDownloadFilter = useCallback(() => {\r\n // ensure this callback is readonly for the enough dependency check\r\n const serializedFilter = stringifySync(filterStates);\r\n const { isGlobalSearch, ...otherFilters } = filters;\r\n const args = loadDataArgs({\r\n ...otherFilters,\r\n folderId: currentFolderId,\r\n });\r\n if (isGlobalSearch) {\r\n // remove folderId for global search\r\n delete args.folderId;\r\n } else if (!args.folderId) {\r\n // use -1 for root folder\r\n args.folderId = -1;\r\n }\r\n const filterUrlParam = createFolderFilterQuery({ ...args.filterArgs, folderId: args.folderId, hasPerfData: true });\r\n return {\r\n filterUrlParam,\r\n serializedFilter,\r\n };\r\n // todo: add loadDataArgs dependency will cause inline download view be re-rendered when date-picker changes, user input will be lost\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [filterStates, filters, currentFolderId]);\r\n\r\n // init page\r\n useEffect(() => {\r\n // restore the preference values\r\n if (!isPageInited && adsStudioUserPreferences) {\r\n const { perfTablePageSize, perfTableSortBy } = adsStudioUserPreferences;\r\n if (perfTablePageSize) {\r\n setPageSize(perfTablePageSize || DEFAULT_PAGE_SIZE);\r\n }\r\n if (perfTableSortBy) {\r\n onSort(perfTableSortBy);\r\n }\r\n setPageInited(true);\r\n }\r\n }, [adsStudioUserPreferences, isPageInited, onSort, setPageSize]);\r\n\r\n // load data for initial page load, or\r\n useEffect(() => {\r\n if (!isPageInited || loadingData) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n\r\n if (reload) { // Important! Add a trivial log so that reload will be an explicit dep.\r\n logger.logTrace('force to reload');\r\n }\r\n\r\n performancePagePerfMarker.willFetchData();\r\n\r\n setLoadingData(true);\r\n loadDataAsync(pageSize, sortBy)\r\n .tap((ret) => {\r\n const { folder } = ret || {};\r\n const { itemCount } = folder || {};\r\n const { ImageAssetsCount } = itemCount || {};\r\n logger.logTrace('Performance page data loaded, ', { totalRowCount: ImageAssetsCount || 0 });\r\n })\r\n .tapCatch(() => { // throw out so that this error will be shown in console for easy debugging\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n\r\n performancePagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n // todo: update inline chart if time series data is also included in the response\r\n });\r\n }, [i18n, isPageInited, loadDataAsync, logger, notificationApi, onFailedToLoadData, pageSize, reload, setLoadingData, sortBy]);\r\n\r\n usePageActiveTimeTracker(logger, 'Performance');\r\n\r\n useEffect(() => {\r\n if (isPageLoading) {\r\n // wait until page is loaded to prevent state race condition in folder reducer\r\n return;\r\n }\r\n getChartPreference().then((chartPreference) => {\r\n const {\r\n showChart,\r\n } = chartPreference || {};\r\n setChartShown(!!showChart);\r\n });\r\n }, [getChartPreference, isPageLoading]);\r\n\r\n useEffect(() => {\r\n if (navigation) {\r\n navigation.updateAssetDetailsParams({ assets });\r\n }\r\n }, [assets, navigation]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString('Performance')}\r\n {renderDatePicker()}\r\n
\r\n
\r\n { isDownloadShown && renderInlineDownload && renderInlineDownload({\r\n setDownloadShown, totalAssetCount, getInlineDownloadColumns, getInlineDownloadFilter,\r\n })}\r\n
\r\n
\r\n { shouldShowChart && renderInlineChart && renderInlineChart({\r\n isChartShown, perfTimeSeriesData, loadPerfTimeSeriesData, perfMetricDateRange, filters, perfMarker: performancePagePerfMarker,\r\n })}\r\n
\r\n
\r\n {pagedItems && (!dataOwnerPageName || dataOwnerPageName === AdsStudioPageName.PerfPage) &&\r\n renderDetailsList({\r\n pagedItems, onSort, toolbar, pager, columns, sortByColumn, expandColumns,\r\n })\r\n }\r\n {/* show loading indicator */}\r\n {(isPageLoading || loadingMoreData) && (\r\n \r\n \r\n \r\n )}\r\n {/* no content */}\r\n {(!isPageLoading && hasNoData) && (\r\n
{i18n.getString(_TL_(\"No assets match your search. Either you don't have any assets associated with your account or your assets don't yet have performance metrics. Please try again.\"))}
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n/* istanbul ignore next */\r\nPerformancePageComponent.propTypes = {\r\n dataService: PropTypes.shape({\r\n assets: PropTypes.arrayOf(PropTypes.shape({})),\r\n totalAssetCount: PropTypes.number,\r\n loadDataInDateRange: PropTypes.func,\r\n loadDataArgs: PropTypes.func,\r\n loadMoreDataInDateRange: PropTypes.func,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoItemDetailFromPerfPage: PropTypes.func,\r\n gotoEditImageFromPerfPage: PropTypes.func,\r\n }),\r\n ianaTimeZone: PropTypes.string,\r\n dateFormat: PropTypes.string,\r\n perfMetricDateRange: PropTypes.shape({\r\n compared: PropTypes.shape({}),\r\n }),\r\n adsStudioUserPreferences: PropTypes.shape({\r\n perfTablePageSize: PropTypes.number,\r\n perfTableSortBy: PropTypes.shape({}),\r\n setPerfTablePageSize: PropTypes.func,\r\n setPerfTableSortBy: PropTypes.func,\r\n }),\r\n assetLibraryAccountPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}), // if changed, force to reload\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n logError: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n renderInlineChart: PropTypes.func,\r\n getChartPreference: PropTypes.func,\r\n\r\n pagePerfMarker: PropTypes.shape({\r\n willFetchFile: PropTypes.func.isRequired,\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n\r\n isAdsStudioAIGCMVPEnabled: PropTypes.bool,\r\n isAIGCRegionRestricted: PropTypes.bool,\r\n};\r\n/* istanbul ignore next */\r\nPerformancePageComponent.defaultProps = {\r\n navigation: undefined,\r\n pagePerfMarker: undefined,\r\n ianaTimeZone: 'GMT',\r\n dateFormat: 'M/d/yyyy',\r\n perfMetricDateRange: undefined,\r\n adsStudioUserPreferences: undefined,\r\n assetLibraryAccountPreferences: undefined,\r\n reload: null,\r\n renderInlineChart: undefined,\r\n getChartPreference: () => Promise.resolve({}),\r\n\r\n isAdsStudioAIGCMVPEnabled: false,\r\n isAIGCRegionRestricted: false,\r\n};\r\n","import { useState, useCallback } from 'react';\r\nimport { AdsStudioPageName } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n/* istanbul ignore next */\r\nexport const useLoadData = ({\r\n filters, perfMetricDateRange, onFailedToLoadData, loadMoreDataInDateRange, loadDataInDateRange, perfMarker,\r\n}) => {\r\n const [loadingData, setLoadingData] = useState(false);\r\n const [loadingMoreData, setLoadingMoreData] = useState(false);\r\n\r\n const loadNextPage = useCallback((count) => {\r\n setLoadingMoreData(true);\r\n return loadMoreDataInDateRange({ count }).catch((err) => {\r\n onFailedToLoadData(err);\r\n }).finally(() => setLoadingMoreData(false));\r\n }, [loadMoreDataInDateRange, onFailedToLoadData]);\r\n\r\n const loadDataAsync = useCallback((count, sortBy) => {\r\n const { isGlobalSearch, ...otherFilters } = filters;\r\n\r\n return loadDataInDateRange({\r\n perfMetricDateRange,\r\n ...otherFilters,\r\n sortBy,\r\n assetsToLoadForSubfolders: 0,\r\n isGlobalSearch,\r\n includeParentHierarchy: isGlobalSearch, // include parent hierarchy when global searching\r\n includeSubfolders: false,\r\n count,\r\n pageName: AdsStudioPageName.PerfPage,\r\n perfMarker: perfMarker.createChild('performancePageLoadData'),\r\n });\r\n }, [filters, loadDataInDateRange, perfMetricDateRange]);\r\n\r\n return {\r\n loadingData,\r\n setLoadingData,\r\n loadingMoreData,\r\n loadNextPage,\r\n loadDataAsync,\r\n };\r\n};\r\n","import { useState, useCallback, useMemo } from 'react';\r\nimport { DEFAULT_PAGE_SIZE } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n/* istanbul ignore next */\r\nexport const usePerformancePage = ({\r\n assets, loadNextPage, adsStudioUserPreferences, totalAssetCount, highlightedText,\r\n}) => {\r\n const [pageNumber, setPageNumber] = useState(1);\r\n const [pageSize, setPageSize] = useState(DEFAULT_PAGE_SIZE);\r\n\r\n const onPageChange = useCallback((number) => {\r\n if (assets && assets.length >= number * pageSize) {\r\n // there are enough loaded assets\r\n setPageNumber(number);\r\n } else {\r\n loadNextPage(pageSize).then(() => {\r\n setPageNumber(number);\r\n });\r\n }\r\n }, [assets, loadNextPage, pageSize]);\r\n\r\n const onPageSizeChange = useCallback((size) => {\r\n setPageNumber(1);\r\n setPageSize(size);\r\n if (adsStudioUserPreferences) {\r\n adsStudioUserPreferences.setPerfTablePageSize(size);\r\n }\r\n }, [adsStudioUserPreferences, setPageSize]);\r\n\r\n const pager = useMemo(() => ({\r\n pageNumber,\r\n pageSize,\r\n total: totalAssetCount,\r\n onPageChange,\r\n onPageSizeChange,\r\n }), [onPageChange, onPageSizeChange, pageNumber, pageSize, totalAssetCount]);\r\n\r\n const pagedItems = useMemo(\r\n () => {\r\n if (assets) {\r\n const items = assets.slice((pageNumber - 1) * pageSize, pageNumber * pageSize);\r\n // append search text filter to items, to highligh the text\r\n return items.map(itm => ({ ...itm, highlightedText }));\r\n }\r\n return [];\r\n },\r\n [assets, highlightedText, pageNumber, pageSize]\r\n );\r\n\r\n return {\r\n pageSize,\r\n pager,\r\n pagedItems,\r\n setPageNumber,\r\n setPageSize,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useHomePageStyle = makeStyles({\r\n homePage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap('10px'),\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\nimport homepageBanner from '../../image-asset/homepageBanner.png';\r\n\r\nconst getHomePageTopBannerContainerStyle = makeStyles({\r\n topBanner: {\r\n boxSizing: 'border-box',\r\n width: '100%',\r\n display: 'flex',\r\n ...shorthands.padding('40px'),\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n ...shorthands.gap('24px'),\r\n alignSelf: 'stretch',\r\n ...shorthands.borderRadius('8px'),\r\n backgroundImage: `linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url(${homepageBanner})`,\r\n backgroundSize: 'cover',\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n texts: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n textAlign: 'center',\r\n alignItems: 'stretch',\r\n },\r\n pageName: {\r\n lineHeight: '37px',\r\n fontSize: '28px',\r\n fontWeight: 600,\r\n },\r\n searchContainer: {\r\n marginTop: '24px',\r\n },\r\n searchBoxWrapper: {\r\n position: 'relative',\r\n height: '90px',\r\n ...shorthands.borderRadius('8px'),\r\n maxWidth: '450px',\r\n ...shorthands.margin('0px', 'auto'),\r\n boxShadow: '0px 1px 2px 0px rgba(0, 0, 0, 0.08)',\r\n },\r\n searchBox: {\r\n width: '100%',\r\n height: '100%',\r\n ...shorthands.gap('8px'),\r\n ...shorthands.borderRadius('8px'),\r\n\r\n '&::after': {\r\n paddingTop: '8px',\r\n borderBottomRightRadius: '8px',\r\n borderBottomLeftRadius: '8px',\r\n },\r\n },\r\n sendIcon: {\r\n position: 'absolute',\r\n bottom: '9px',\r\n right: '9px',\r\n cursor: 'pointer',\r\n ...shorthands.padding('0px'),\r\n },\r\n});\r\n\r\nexport default getHomePageTopBannerContainerStyle;\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nconst getAssetListBarCarouselStyle = makeStyles({\r\n subHeading: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontWeight: 600,\r\n lineHeight: '26px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '20px',\r\n textAlign: 'left',\r\n marginTop: '30px',\r\n },\r\n paragraph: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: 400,\r\n lineHeight: '20px',\r\n textAlign: 'left',\r\n },\r\n itemContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n flexDirection: 'row',\r\n position: 'relative',\r\n width: '100%',\r\n },\r\n btnWrapper: {\r\n width: '32px',\r\n height: '32px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n position: 'absolute',\r\n zIndex: 1,\r\n ...shorthands.borderRadius('50%'),\r\n boxShadow: '0px 0.3px 0.9px 0px rgba(0, 0, 0, 0.10), 0px 1.6px 3.6px 0px rgba(0, 0, 0, 0.13)',\r\n backgroundColor: '#ffffff',\r\n },\r\n leftWrapper: {\r\n left: '-16px',\r\n },\r\n rightWrapper: {\r\n right: '-16px',\r\n },\r\n leftBtn: {\r\n cursor: 'pointer',\r\n color: '#0078d4',\r\n },\r\n rightBtn: {\r\n cursor: 'pointer',\r\n color: '#0078d4',\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n width: '24px',\r\n height: '230px',\r\n },\r\n leftOverlay: {\r\n left: 0,\r\n backgroundImage: 'linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)',\r\n },\r\n rightOverlay: {\r\n right: 0,\r\n backgroundImage: 'linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255) 100%)',\r\n },\r\n slider: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n scrollBehavior: 'smooth',\r\n whiteSpace: 'nowrap',\r\n flexGrow: 1,\r\n overflowX: 'hidden',\r\n pointerEvents: 'none',\r\n '&::-webkit-scrollbar': {\r\n display: 'none',\r\n },\r\n scrollbarWidth: 'none',\r\n '-ms-overflow-style': 'none',\r\n paddingBottom: '10px',\r\n paddingTop: '8px',\r\n },\r\n cardContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'nowrap',\r\n },\r\n});\r\n\r\nexport default getAssetListBarCarouselStyle;\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nconst getHomePageGenerateWithAIComponentStyle = makeStyles({\r\n footerContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'left',\r\n width: '100%',\r\n },\r\n subHeading: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontWeight: 600,\r\n lineHeight: '26px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '20px',\r\n textAlign: 'left',\r\n marginBottom: '8px',\r\n },\r\n paragraph: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: 200,\r\n lineHeight: '20px',\r\n textAlign: 'left',\r\n marginBottom: '20px',\r\n },\r\n searchBoxWrapper: {\r\n position: 'relative',\r\n width: '345px',\r\n },\r\n searchBox: {\r\n width: '100%',\r\n paddingRight: '30px',\r\n },\r\n sendIcon: {\r\n position: 'absolute',\r\n bottom: '6px',\r\n right: '6px',\r\n cursor: 'pointer',\r\n },\r\n imageRowContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'flex-start',\r\n ...shorthands.gap('16px'),\r\n marginTop: '16px',\r\n flexWrap: 'nowrap',\r\n },\r\n imageWrapper: {\r\n flexShrink: 0,\r\n position: 'relative',\r\n width: '246px',\r\n height: '200px',\r\n ...shorthands.borderRadius('8px'),\r\n '&:hover .overlay, &:focus-within .overlay': {\r\n opacity: 1,\r\n transform: 'translateY(0)',\r\n },\r\n },\r\n image: {\r\n width: '100%',\r\n height: '100%',\r\n objectFit: 'cover',\r\n ...shorthands.borderRadius('8px'),\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n bottom: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: 'rgba(0, 0, 0, 0.6)',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'flex-start',\r\n paddingLeft: '16px',\r\n color: '#fff',\r\n opacity: 0,\r\n transitionProperty: 'opacity',\r\n transitionDuration: '0.3s',\r\n transitionTimingFunction: 'ease',\r\n pointerEvents: 'none',\r\n },\r\n overlayText: {\r\n color: '#FFF',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontStyle: 'normal',\r\n lineHeight: 'normal',\r\n marginBottom: '8px',\r\n fontWeight: 400,\r\n textAlign: 'left',\r\n marginLeft: '12px',\r\n marginRight: '12px',\r\n },\r\n overlayButton: {\r\n backgroundColor: 'transparent',\r\n color: '#fff',\r\n ...shorthands.borderRadius('4px'),\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n marginLeft: '12px',\r\n pointerEvents: 'all',\r\n '&:hover': {\r\n backgroundColor: 'transparent',\r\n color: '#fff',\r\n },\r\n '&:focus': {\r\n outlineColor: '#fff',\r\n },\r\n },\r\n});\r\n\r\nexport default getHomePageGenerateWithAIComponentStyle;\r\n","import React from 'react';\r\nimport { mergeClasses, Textarea, Button } from '@fluentui/react-components';\r\nimport { Send20Regular } from '@fluentui/react-icons';\r\nimport PropTypes from 'prop-types';\r\nimport { getHomePageTopBannerContainerStyle } from '../home-page-styles';\r\n\r\nconst TopHomePageBannerComponent = ({ i18n, onSearch }) => {\r\n const [searchQuery, setSearchQuery] = React.useState('');\r\n\r\n const handleSearchChange = (event) => {\r\n setSearchQuery(event.target.value);\r\n\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n if (event.target.value.trim()) {\r\n onSearch(event.target.value);\r\n }\r\n }\r\n };\r\n\r\n const handleSearch = () => {\r\n if (searchQuery.trim()) {\r\n onSearch(searchQuery);\r\n }\r\n };\r\n\r\n const classes = getHomePageTopBannerContainerStyle();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
{i18n.getString(_TL_('What assets are you searching for today?'))}
\r\n
\r\n
\r\n
\r\n \r\n }\r\n appearance=\"transparent\"\r\n onClick={handleSearch}\r\n className={classes.sendIcon}\r\n aria-label={i18n.getString(_TL_('Search'))}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\n\r\nTopHomePageBannerComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onSearch: PropTypes.func.isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n Name: PropTypes.string,\r\n }),\r\n }),\r\n};\r\n\r\nTopHomePageBannerComponent.defaultProps = {\r\n serverContext: {},\r\n};\r\n\r\nexport default TopHomePageBannerComponent;\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useImageCardStyles = makeStyles({\r\n imageCardListItem: {\r\n marginRight: '16px',\r\n },\r\n imageCard: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n width: '194px !important',\r\n height: '220px !important',\r\n pointerEvents: 'auto',\r\n },\r\n imageCardThumbnail: {\r\n width: '194px !important',\r\n height: '160px !important',\r\n objectFit: 'cover',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n imageCardFooter: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexWrap: 'wrap',\r\n height: '60px !important',\r\n width: '194px !important',\r\n paddingLeft: '15px !important',\r\n },\r\n imageCardFooterContent: {\r\n display: 'flex',\r\n rowGap: '0px !important',\r\n paddingBottom: '2px !important',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('4px'),\r\n },\r\n imageIconAndName: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontWeight: 600,\r\n },\r\n imageName: {\r\n width: '142px',\r\n ...shorthands.overflow('hidden'),\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n imageCardCaption: {\r\n paddingBottom: '5px !important',\r\n paddingLeft: '2px !important',\r\n },\r\n});\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Body1,\r\n Caption1,\r\n Card,\r\n CardFooter,\r\n CardPreview,\r\n} from '@fluentui/react-components';\r\nimport { ListItem } from '@fluentui/react-list-preview';\r\n\r\nimport { getTimeDescription } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Image20Regular } from '@fluentui/react-icons';\r\nimport { useImageCardStyles } from '../../../home-page-styles/component-styles/home-page-image-asset-cards';\r\n\r\nexport const ImageAssetCard = ({\r\n asset, i18n, navigation, logger, ariaSetsize, ariaPosinset, onClickCard,\r\n}) => {\r\n const styles = useImageCardStyles();\r\n\r\n const assetName = useMemo(() => (asset.name ? asset.name : asset.id), [asset.id, asset.name]);\r\n\r\n const imageTimeCaption = useMemo(() => {\r\n if (asset.modifiedTime > asset.createdTime) {\r\n return getTimeDescription(asset.modifiedTime, i18n) ? `${i18n.getString(_TL_('Edited:'))} ${getTimeDescription(asset.modifiedTime, i18n)}` : '';\r\n }\r\n return getTimeDescription(asset.createdTime, i18n) ? `${i18n.getString(_TL_('Uploaded:'))} ${getTimeDescription(asset.createdTime, i18n)}` : '';\r\n }, [asset.modifiedTime, asset.createdTime, i18n]);\r\n\r\n const handleImageAssetClick = useCallback((imageAsset) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId: imageAsset.id });\r\n }\r\n navigation.gotoEditImagePage({ imageId: imageAsset.id });\r\n onClickCard();\r\n }, [logger, navigation, onClickCard]);\r\n\r\n const handleImageAssetKeyDown = useCallback((event, imageAsset) => {\r\n if (event.key === 'Enter') {\r\n handleImageAssetClick(imageAsset);\r\n event.preventDefault();\r\n }\r\n }, [handleImageAssetClick]);\r\n\r\n return (\r\n handleImageAssetClick(asset)}\r\n onKeyDown={event => handleImageAssetKeyDown(event, asset)}\r\n className={styles.imageCardListItem}\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {assetName}\r\n
\r\n
\r\n {imageTimeCaption || ''}\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nImageAssetCard.propTypes = {\r\n asset: PropTypes.shape({\r\n name: PropTypes.string,\r\n createdTime: PropTypes.instanceOf(Date),\r\n modifiedTime: PropTypes.instanceOf(Date),\r\n originalUrl: PropTypes.string,\r\n id: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoEditImagePage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useFolderCardStyles = makeStyles({\r\n folderCardListItem: {\r\n marginRight: '16px',\r\n },\r\n card: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '194px',\r\n height: '220px',\r\n boxSizing: 'border-box',\r\n ...shorthands.overflow('hidden'),\r\n pointerEvents: 'auto',\r\n },\r\n cardPreview: {\r\n width: '194px',\r\n height: '160px',\r\n objectFit: 'cover',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n footer: {\r\n width: '194px',\r\n ...shorthands.overflow('hidden'),\r\n marginLeft: '-15px',\r\n marginBottom: '-15px',\r\n paddingLeft: '15px',\r\n },\r\n footerContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: '0px',\r\n ...shorthands.gap('4px'),\r\n },\r\n iconAndName: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n folderName: {\r\n width: '142px',\r\n ...shorthands.overflow('hidden'),\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n caption: {\r\n paddingLeft: '2px',\r\n },\r\n imageGrid: {\r\n display: 'grid',\r\n width: '100%',\r\n height: '100%',\r\n justifyItems: 'center',\r\n backgroundColor: tokens.colorNeutralBackground3,\r\n },\r\n thumbnailImage: {\r\n objectFit: 'cover',\r\n width: '100%',\r\n height: '100%',\r\n },\r\n oneImage: {\r\n display: 'block',\r\n width: '100%',\r\n height: '160px', // Full height of preview section\r\n objectFit: 'cover',\r\n },\r\n twoImages: {\r\n display: 'grid',\r\n gridTemplateColumns: 'repeat(2, 1fr)', // 2 equal-width columns\r\n width: '100%',\r\n height: '160px', // Full height of preview section\r\n },\r\n threeImages: {\r\n display: 'grid',\r\n gridTemplateColumns: '1fr 1fr',\r\n gridTemplateRows: '80px 80px', // Use pixel values but fractions\r\n height: '160px', // Full height of preview section\r\n\r\n '& > :nth-child(1)': {\r\n ...shorthands.gridArea(1, 1, 2, 1), // First image takes full height of first column\r\n height: '160px',\r\n },\r\n '& > :nth-child(2)': {\r\n ...shorthands.gridArea(1, 2, 1, 2), // Second image is top in second column\r\n height: '80px',\r\n },\r\n '& > :nth-child(3)': {\r\n ...shorthands.gridArea(2, 2, 2, 2), // Third image is bottom in second column\r\n height: '80px',\r\n },\r\n },\r\n fourImages: {\r\n display: 'grid',\r\n gridTemplateColumns: 'repeat(2, 1fr)', // 2 equal columns\r\n gridTemplateRows: 'repeat(2, 1fr)', // 2 equal rows\r\n width: '100%',\r\n height: '160px', // Full height of preview section\r\n\r\n '& img': {\r\n height: '80px', // Set explicit height for each grid cell\r\n objectFit: 'cover',\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Folder20Regular } from '@fluentui/react-icons';\r\nimport {\r\n Body1,\r\n Caption1,\r\n Card,\r\n CardFooter,\r\n CardPreview,\r\n} from '@fluentui/react-components';\r\nimport { ListItem } from '@fluentui/react-list-preview';\r\nimport { getTimeDescription, FolderAssetType, VideoStatus } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useFolderCardStyles } from '../../../home-page-styles/component-styles/home-page-folder-asset-cards';\r\n\r\nexport const FolderAssetCard = ({\r\n folder, i18n, navigateIntoFolderItem, navigation, ariaSetsize, ariaPosinset, onClickCard,\r\n}) => {\r\n const styles = useFolderCardStyles();\r\n\r\n // Grab up to the first 4 assets for preview on the card\r\n const assetsToPreview = useMemo(() => {\r\n const filteredAssets = _.filter(folder && folder.assets, asset =>\r\n (asset.folderAssetType === FolderAssetType.Image ||\r\n (asset.folderAssetType === FolderAssetType.Video && asset.status === VideoStatus.Active)));\r\n if (Array.isArray(filteredAssets) && filteredAssets.length > 0) {\r\n return filteredAssets.slice(0, 4);\r\n }\r\n return [];\r\n }, [folder]);\r\n\r\n const handleFolderAssetClick = useCallback((folderAsset) => {\r\n navigation.gotoLibraryPage();\r\n navigateIntoFolderItem({ folder: folderAsset });\r\n onClickCard();\r\n }, [navigateIntoFolderItem, navigation, onClickCard]);\r\n\r\n const handleFolderAssetKeyDown = useCallback((event, folderAsset) => {\r\n if (event.key === 'Enter') {\r\n handleFolderAssetClick(folderAsset);\r\n event.preventDefault();\r\n }\r\n }, [handleFolderAssetClick]);\r\n\r\n // Set grid layout class based on the number of assets\r\n const getGridClass = useMemo(() => {\r\n if (assetsToPreview.length === 1) return styles.oneImage; // No grid for 1 image\r\n if (assetsToPreview.length === 2) return styles.twoImages; // 2 images side by side\r\n if (assetsToPreview.length === 3) return styles.threeImages; // Grid layout for 3 images\r\n if (assetsToPreview.length === 4) return styles.fourImages; // Grid layout for 4 images\r\n return styles.imageGrid; // Default grid for other cases\r\n }, [styles, assetsToPreview]);\r\n\r\n const modifiedTime = useMemo(() => {\r\n if (folder.modifiedTime) {\r\n return getTimeDescription(folder.modifiedTime, i18n);\r\n }\r\n return '';\r\n }, [folder.modifiedTime, i18n]);\r\n\r\n const modifiedTimeString = useMemo(() => (modifiedTime ? `${i18n.getString(_TL_('Accessed:'))} ${modifiedTime}` : ''), [i18n, modifiedTime]);\r\n\r\n return (\r\n handleFolderAssetClick(folder)}\r\n onKeyDown={event => handleFolderAssetKeyDown(event, folder)}\r\n className={styles.folderCardListItem}\r\n >\r\n \r\n \r\n
\r\n
\r\n {assetsToPreview && assetsToPreview.length > 0 && assetsToPreview.map(asset => (\r\n \r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n {folder.folderName}\r\n
\r\n
\r\n \r\n {modifiedTimeString}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nFolderAssetCard.propTypes = {\r\n folder: PropTypes.shape({\r\n folderName: PropTypes.string,\r\n modifiedTime: PropTypes.instanceOf(Date),\r\n folderId: PropTypes.number,\r\n assets: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n url: PropTypes.string,\r\n originalUrl: PropTypes.string,\r\n thumbnailUrl: PropTypes.string,\r\n })).isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigateIntoFolderItem: PropTypes.func.isRequired,\r\n navigation: PropTypes.shape({\r\n gotoLibraryPage: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useVideoCardStyles = makeStyles({\r\n videoCardListItem: {\r\n marginRight: '16px',\r\n },\r\n videoCard: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n width: '194px !important',\r\n height: '220px !important',\r\n pointerEvents: 'auto',\r\n },\r\n videoCardThumbnail: {\r\n width: '194px !important',\r\n height: '160px !important',\r\n objectFit: 'cover',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n videoCardPreviewPlaceholder: {\r\n width: '194px !important',\r\n height: '160px !important',\r\n backgroundColor: '#F5F5F5',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n videoCardFooter: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexWrap: 'wrap',\r\n height: '60px !important',\r\n width: '194px !important',\r\n paddingLeft: '15px !important',\r\n },\r\n videoCardFooterContent: {\r\n display: 'flex',\r\n rowGap: '0px !important',\r\n paddingBottom: '2px !important',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('4px'),\r\n },\r\n videoIconAndName: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.gap('4px'),\r\n },\r\n videoName: {\r\n width: '142px',\r\n ...shorthands.overflow('hidden'),\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n videoCardCaption: {\r\n paddingBottom: '5px !important',\r\n paddingLeft: '2px !important',\r\n },\r\n});\r\n","import React, { useCallback, useMemo, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Body1,\r\n Caption1,\r\n Card,\r\n CardFooter,\r\n CardPreview,\r\n} from '@fluentui/react-components';\r\nimport { ListItem } from '@fluentui/react-list-preview';\r\nimport { Video20Regular } from '@fluentui/react-icons';\r\nimport {\r\n getTimeDescription,\r\n VideoStatus,\r\n UnverifiedPlaceholderWithStyle,\r\n EncodingPlaceholderWithStyle,\r\n FailedPlaceholderWithStyle,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useVideoCardStyles } from '../../../home-page-styles/component-styles/home-page-video-asset-cards';\r\n\r\nexport const VideoAssetCard = ({\r\n asset, i18n, navigation, renameAsset, ariaSetsize, ariaPosinset, onClickCard,\r\n}) => {\r\n const styles = useVideoCardStyles();\r\n const currentActivedCardId = useRef();\r\n\r\n const assetName = useMemo(() => (asset.name ? asset.name : asset.id), [asset.id, asset.name]);\r\n\r\n /* istanbul ignore next */\r\n const videoTimeCaption = useMemo(() => {\r\n if (asset.modifiedTime > asset.createdTime) {\r\n return getTimeDescription(asset.modifiedTime, i18n) ? `${i18n.getString(_TL_('Edited:'))} ${getTimeDescription(asset.modifiedTime, i18n)}` : '';\r\n }\r\n return getTimeDescription(asset.createdTime, i18n) ? `${i18n.getString(_TL_('Uploaded:'))} ${getTimeDescription(asset.createdTime, i18n)}` : '';\r\n }, [asset.modifiedTime, asset.createdTime, i18n]);\r\n\r\n /* istanbul ignore next */\r\n const videoCardPreview = useMemo(() => {\r\n let defaultContent = null;\r\n // status order: unverified => draft => active/invalid\r\n if (asset.status === VideoStatus.Active) {\r\n defaultContent = (\r\n \r\n );\r\n } else if (asset.status === VideoStatus.Unverified) {\r\n defaultContent =
;\r\n } else if (asset.status === VideoStatus.Draft) {\r\n defaultContent =
;\r\n } else if (asset.status === VideoStatus.Failed) {\r\n defaultContent =
;\r\n }\r\n\r\n return defaultContent;\r\n }, [asset, assetName, i18n, styles.videoCardPreviewPlaceholder, styles.videoCardThumbnail]);\r\n\r\n const onCloseDetail = useCallback(() => {\r\n currentActivedCardId.current = null;\r\n }, []);\r\n\r\n const handleVideoAssetClick = useCallback((videoAsset) => {\r\n if (videoAsset.status !== VideoStatus.Active) {\r\n return;\r\n }\r\n onClickCard();\r\n currentActivedCardId.current = videoAsset.id;\r\n navigation.gotoAssetDetails({\r\n assetId: videoAsset.id, folderAssetType: videoAsset.folderAssetType, assets: [videoAsset], totalAssetCount: 1, renameAsset, onClose: onCloseDetail,\r\n });\r\n }, [navigation, onClickCard, onCloseDetail, renameAsset]);\r\n\r\n const handleVideoAssetKeyDown = useCallback((event, videoAsset) => {\r\n if (event.key === 'Enter') {\r\n handleVideoAssetClick(videoAsset);\r\n event.preventDefault();\r\n }\r\n }, [handleVideoAssetClick]);\r\n\r\n useEffect(() => {\r\n if (navigation && currentActivedCardId.current === asset.id) {\r\n navigation.updateAssetDetailsParams({ assets: [asset] });\r\n }\r\n }, [asset, navigation]);\r\n\r\n return (\r\n handleVideoAssetClick(asset)}\r\n onKeyDown={event => handleVideoAssetKeyDown(event, asset)}\r\n className={styles.videoCardListItem}\r\n >\r\n \r\n \r\n {videoCardPreview}\r\n \r\n
\r\n \r\n
\r\n \r\n {assetName}\r\n
\r\n
\r\n {videoTimeCaption || ''}\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nVideoAssetCard.propTypes = {\r\n asset: PropTypes.shape({\r\n name: PropTypes.string,\r\n createdTime: PropTypes.instanceOf(Date),\r\n modifiedTime: PropTypes.instanceOf(Date),\r\n id: PropTypes.string,\r\n thumbnailUrl: PropTypes.string,\r\n url: PropTypes.string,\r\n status: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoAssetDetails: PropTypes.func.isRequired,\r\n updateAssetDetailsParams: PropTypes.func.isRequired,\r\n }).isRequired,\r\n renameAsset: PropTypes.func.isRequired,\r\n};\r\n","import React, { useState, useRef, useEffect, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { ChevronRight16Regular, ChevronLeft16Regular } from '@fluentui/react-icons';\r\nimport { List } from '@fluentui/react-list-preview';\r\nimport { FolderAssetType, handleRealUsedFlag, RealUsedFlagSuffix } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ImageAssetCard } from './home-page-asset-cards/image-asset-card';\r\nimport { FolderAssetCard } from './home-page-asset-cards/folder-asset-card';\r\nimport { VideoAssetCard } from './home-page-asset-cards/video-asset-card';\r\nimport { getAssetListBarCarouselStyle } from '../home-page-styles';\r\n\r\nexport const AssetCard = ({\r\n item,\r\n i18n,\r\n navigateIntoFolderItem,\r\n navigation,\r\n logger,\r\n renameAsset,\r\n ariaSetsize,\r\n ariaPosinset,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const { folderAssetType } = item || {};\r\n\r\n const onClickCard = useCallback(() => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n }, [adsStudioAccountPreferences]);\r\n\r\n switch (folderAssetType) {\r\n case FolderAssetType.Folder:\r\n return (\r\n );\r\n case FolderAssetType.Image:\r\n return (\r\n );\r\n case FolderAssetType.Video:\r\n return (\r\n );\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nAssetCard.propTypes = {\r\n item: PropTypes.shape({\r\n folderAssetType: PropTypes.string,\r\n folderId: PropTypes.number,\r\n id: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigateIntoFolderItem: PropTypes.func.isRequired,\r\n navigation: PropTypes.shape({}).isRequired,\r\n renameAsset: PropTypes.func.isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nconst ListBarCarousel = ({\r\n assets, i18n, navigateIntoFolderItem, renameAsset, navigation, logger, adsStudioAccountPreferences,\r\n}) => {\r\n const styles = getAssetListBarCarouselStyle();\r\n const sliderRef = useRef(null);\r\n const [scrollPosition, setScrollPosition] = useState(0);\r\n const [showArrowLeft, setShowArrowLeft] = useState(false);\r\n const [showArrowRight, setShowArrowRight] = useState(true);\r\n\r\n const computeMaxScrollWidth = useCallback(() => {\r\n if (sliderRef.current) {\r\n return sliderRef.current.scrollWidth - sliderRef.current.clientWidth;\r\n }\r\n return 0;\r\n }, []);\r\n\r\n const goLeft = useCallback(() => {\r\n const newPosition = Math.max(scrollPosition - 960, 0);\r\n setScrollPosition(newPosition);\r\n }, [scrollPosition]);\r\n\r\n const goRight = useCallback(() => {\r\n const maxScroll = computeMaxScrollWidth();\r\n const newPosition = Math.min(scrollPosition + 960, maxScroll);\r\n setScrollPosition(newPosition);\r\n }, [scrollPosition, computeMaxScrollWidth]);\r\n\r\n const isHideSection = useMemo(() => {\r\n if ((!assets || !assets.length)) {\r\n return true;\r\n }\r\n return false;\r\n }, [assets]);\r\n\r\n useEffect(() => {\r\n const maxScroll = computeMaxScrollWidth();\r\n setShowArrowLeft(scrollPosition > 0);\r\n setShowArrowRight(scrollPosition < maxScroll);\r\n }, [scrollPosition, computeMaxScrollWidth]);\r\n\r\n if (isHideSection) {\r\n return <>;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {i18n.getString(_TL_('Recent'))}\r\n
\r\n
{i18n.getString(_TL_('Find recent assets'))}
\r\n
\r\n {showArrowLeft && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {assets && assets.length > 0 &&\r\n \r\n {assets.map((item, index) => (\r\n \r\n ))}\r\n \r\n }\r\n
\r\n {showArrowRight && (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n \r\n )}\r\n {showArrowLeft &&
}\r\n
\r\n \r\n );\r\n};\r\n\r\nListBarCarousel.propTypes = {\r\n assets: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n navigateIntoFolderItem: PropTypes.func.isRequired,\r\n renameAsset: PropTypes.func.isRequired,\r\n navigation: PropTypes.shape({\r\n gotoAssetDetails: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nexport default ListBarCarousel;\r\n","import React, { useCallback, useRef, useState, useEffect } from 'react';\r\nimport { debounce } from 'underscore';\r\nimport { Input, Image, Button, mergeClasses } from '@fluentui/react-components';\r\nimport { Send20Regular } from '@fluentui/react-icons';\r\nimport PropTypes from 'prop-types';\r\nimport { AIPromptExamples } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { getHomePageGenerateWithAIComponentStyle } from '../home-page-styles';\r\n\r\nconst GenerateWithAIComponent = ({ i18n, onGenerateImage, loadingStatus }) => {\r\n const classes = getHomePageGenerateWithAIComponentStyle();\r\n\r\n const wrapperRef = useRef(null);\r\n const [searchQuery, setSearchQuery] = useState('');\r\n const [exampleList, setExampleList] = useState([]);\r\n\r\n const onInputChange = useCallback((event) => {\r\n setSearchQuery(event.target.value);\r\n\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n onGenerateImage({\r\n text: event.target.value.trim(),\r\n });\r\n }\r\n }, [onGenerateImage]);\r\n\r\n const handleSearch = useCallback(() => {\r\n onGenerateImage({\r\n text: searchQuery.trim(),\r\n });\r\n }, [onGenerateImage, searchQuery]);\r\n\r\n useEffect(() => {\r\n if (!loadingStatus) {\r\n const wrapperWidth = wrapperRef.current ? wrapperRef.current.offsetWidth : 0;\r\n const maxCount = wrapperWidth > 0 ? Math.floor(wrapperWidth / 264) : 1;\r\n const newList = AIPromptExamples.slice(0, maxCount);\r\n setExampleList(newList);\r\n } else {\r\n setExampleList([]);\r\n }\r\n }, [loadingStatus]);\r\n\r\n useEffect(() => {\r\n const updateExampleList = debounce((entries) => {\r\n if (entries[0]) {\r\n const { clientWidth } = entries[0].target;\r\n\r\n if (!loadingStatus) {\r\n const maxCount = clientWidth > 0 ? Math.floor(clientWidth / 264) : 1;\r\n const newList = AIPromptExamples.slice(0, maxCount);\r\n setExampleList(newList);\r\n }\r\n }\r\n }, 250);\r\n const resizeObserver = window.ResizeObserver && new ResizeObserver(updateExampleList);\r\n if (wrapperRef.current && resizeObserver) {\r\n resizeObserver.observe(wrapperRef.current);\r\n }\r\n return () => {\r\n if (wrapperRef.current && resizeObserver) {\r\n resizeObserver.unobserve(wrapperRef.current);\r\n }\r\n };\r\n }, [loadingStatus]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Generate images with AI'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('Create images for your campaigns by providing prompts.'))}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {exampleList.length > 0 && exampleList.map(image => (\r\n
\r\n \r\n
\r\n
\r\n {i18n.getString(image.promptText)}\r\n
\r\n onGenerateImage({ url: image.imageSrc, text: i18n.getString(image.promptText) })}\r\n >\r\n {i18n.getString(_TL_('Try it now'))}\r\n \r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nGenerateWithAIComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onGenerateImage: PropTypes.func.isRequired,\r\n loadingStatus: PropTypes.bool,\r\n};\r\n\r\nGenerateWithAIComponent.defaultProps = {\r\n loadingStatus: false,\r\n};\r\n\r\nexport default GenerateWithAIComponent;\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useActionAssetCardsStyle = makeStyles({\r\n cardContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap('16px'),\r\n flexWrap: 'wrap',\r\n justifyContent: 'space-between',\r\n maxWidth: '1532px',\r\n },\r\n});\r\n","import React, { useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useJsData } from '@bingads-webui-cc-react/js-data-rest';\r\nimport {\r\n getHomePageCardData,\r\n AddAssetEntryCard,\r\n RealUsedFlagSuffix,\r\n handleRealUsedFlag,\r\n isValidXandrAccount,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useActionAssetCardsStyle } from '../../../home-page-styles/component-styles/home-page-action-asset-cards';\r\n\r\nexport const ActionAssetCards = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n navigation,\r\n logger,\r\n adsStudioAccountPreferences,\r\n permissions,\r\n}) => {\r\n const classes = useActionAssetCardsStyle();\r\n const openSystemUploadRef = useRef(null);\r\n\r\n const isXandrIntEnabled = useMemo(() => permissions.dynamic.XandrIntegrationEnabled, [permissions]);\r\n // eslint-disable-next-line no-restricted-globals\r\n const { data: account } = useJsData(jsData => (isXandrIntEnabled ? jsData.Account.find(aid) : Promise.resolve()), [aid, isXandrIntEnabled]);\r\n const isXandrIntegrationEnabled = useMemo(() => (isXandrIntEnabled ? isValidXandrAccount(account) : false), [account, isXandrIntEnabled]);\r\n\r\n const cardData = useMemo(() => getHomePageCardData({\r\n i18n,\r\n onClickUpload: () => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n openSystemUploadRef.current = {};\r\n navigation.gotoUploadFilesPanelPage({\r\n aid, cid, oDataConfig, i18n, mode: 'image', openSystemUpload: openSystemUploadRef.current,\r\n });\r\n },\r\n onClickStock: () => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from shutterstock');\r\n }\r\n navigation.gotoStockImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickInvest: () => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from invest');\r\n }\r\n navigation.gotoInvestImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickWebsite: () => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from website');\r\n }\r\n navigation.gotoWebsiteImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n isXandrIntegrationEnabled,\r\n }), [i18n, adsStudioAccountPreferences, navigation, aid, cid, oDataConfig, logger, isXandrIntegrationEnabled]);\r\n\r\n return (\r\n <>\r\n
\r\n {cardData.map(card => (\r\n \r\n ))}\r\n
\r\n \r\n );\r\n};\r\n\r\nActionAssetCards.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoWebsiteImagePanelPage: PropTypes.func,\r\n gotoStockImagePanelPage: PropTypes.func,\r\n gotoUploadFilesPanelPage: PropTypes.func,\r\n gotoInvestImagePanelPage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nActionAssetCards.defaultProps = {\r\n permissions: { dynamic: {} },\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useImageBackgroundSectionStyles = makeStyles({\r\n subHeading: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontWeight: 600,\r\n lineHeight: '26px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '20px',\r\n textAlign: 'left',\r\n marginTop: '20px',\r\n },\r\n paragraph: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: 400,\r\n lineHeight: '20px',\r\n textAlign: 'left',\r\n },\r\n backgroundCardContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'nowrap',\r\n justifyContent: 'flex-start',\r\n marginBottom: '30px',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n uploadCard: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n width: '247px',\r\n height: '247px',\r\n marginRight: '16px',\r\n ...shorthands.borderRadius('8px'),\r\n ...shorthands.border('1px', 'dashed', tokens.colorNeutralStroke1),\r\n ...shorthands.padding(0, '48px'),\r\n flexShrink: 0,\r\n },\r\n uploadIcon: {\r\n marginTop: '40px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n uploadFrame: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n uploadCaption: {\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: 400,\r\n lineHeight: '20px',\r\n textAlign: 'center',\r\n marginBottom: '10px',\r\n },\r\n uploadButton: {\r\n marginTop: 'auto',\r\n textAlign: 'center',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: 600,\r\n lineHeight: '20px',\r\n marginBottom: '20px',\r\n ...shorthands.borderRadius('4px'),\r\n ...shorthands.padding('5px', '12px'),\r\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\r\n },\r\n imageCard: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '247px',\r\n height: '247px',\r\n marginRight: '16px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n ...shorthands.borderRadius('8px'),\r\n ...shorthands.overflow('hidden'),\r\n flexShrink: 0,\r\n },\r\n image: {\r\n width: '247px',\r\n height: '247px',\r\n objectFit: 'cover',\r\n },\r\n});\r\n","import React, { useCallback, useRef, useEffect, useState } from 'react';\r\nimport { debounce } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Caption1,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n RealUsedFlagSuffix,\r\n handleRealUsedFlag,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport imageUploadIcon from './image-upload-icon.svg';\r\nimport background1 from './background1.jpg';\r\nimport background2 from './background2.jpg';\r\nimport background3 from './background3.jpg';\r\nimport background4 from './background4.jpg';\r\nimport background5 from './background5.jpg';\r\nimport background6 from './background6.jpg';\r\nimport background7 from './background7.jpg';\r\nimport background8 from './background8.jpg';\r\nimport background9 from './background9.jpg';\r\nimport background10 from './background10.jpg';\r\nimport { useImageBackgroundSectionStyles } from '../../home-page-styles/component-styles/home-page-image-background-section';\r\n\r\nconst staticBackgrounds = [\r\n background1,\r\n background2,\r\n background3,\r\n background4,\r\n background5,\r\n background6,\r\n background7,\r\n background8,\r\n background9,\r\n background10,\r\n];\r\n\r\nexport const ImageBackgroundCards = ({\r\n i18n, navigation, loadingStatus, isAIGCRegionRestricted, notificationApi, adsStudioAccountPreferences,\r\n}) => {\r\n const styles = useImageBackgroundSectionStyles();\r\n const [exampleList, setExampleList] = useState([]);\r\n\r\n const handleImageUploadClick = useCallback(() => {\r\n if (isAIGCRegionRestricted) {\r\n notificationApi.showWarning(i18n.getString(_TL_('This feature isn\\'t available in all markets.')));\r\n } else {\r\n navigation.gotoBackgroundRemovalModal();\r\n }\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n }, [isAIGCRegionRestricted, adsStudioAccountPreferences, notificationApi, i18n, navigation]);\r\n\r\n const onExampleImageKeyDown = useCallback((event) => {\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n handleImageUploadClick();\r\n }\r\n }, [handleImageUploadClick]);\r\n\r\n const wrapperRef = useRef(null);\r\n\r\n useEffect(() => {\r\n if (!loadingStatus) {\r\n const wrapperWidth = wrapperRef.current ? wrapperRef.current.offsetWidth : 0;\r\n const maxCount = wrapperWidth > 0 ? Math.floor(wrapperWidth / 264) : 1;\r\n const newList = staticBackgrounds.slice(0, maxCount - 1);\r\n setExampleList(newList);\r\n } else {\r\n setExampleList([]);\r\n }\r\n }, [loadingStatus]);\r\n\r\n useEffect(() => {\r\n const updateExampleList = debounce((entries) => {\r\n if (entries[0]) {\r\n const { clientWidth } = entries[0].target;\r\n\r\n if (!loadingStatus) {\r\n const maxCount = clientWidth > 0 ? Math.floor(clientWidth / 264) : 1;\r\n const newList = staticBackgrounds.slice(0, maxCount - 1);\r\n setExampleList(newList);\r\n }\r\n }\r\n }, 250);\r\n const resizeObserver = window.ResizeObserver && new ResizeObserver(updateExampleList);\r\n if (wrapperRef.current && resizeObserver) {\r\n resizeObserver.observe(wrapperRef.current);\r\n }\r\n return () => {\r\n if (wrapperRef.current && resizeObserver) {\r\n resizeObserver.unobserve(wrapperRef.current);\r\n }\r\n };\r\n }, [loadingStatus]);\r\n\r\n return (\r\n <>\r\n
\r\n {i18n.getString(_TL_('Try a different background'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('Try out a new background for your image'))}\r\n
\r\n\r\n
\r\n \r\n {exampleList.length > 0 && exampleList.map((background, index) => (\r\n \r\n {`Background\r\n
\r\n ))}\r\n
\r\n \r\n );\r\n};\r\n\r\nImageBackgroundCards.propTypes = {\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoUploadFilesPanelPage: PropTypes.func,\r\n }).isRequired,\r\n isAIGCRegionRestricted: PropTypes.bool.isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useEffect, useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport {\r\n AdsStudioSpinner,\r\n GenerateImageContext,\r\n CSMLSortBy,\r\n AIGCHandler,\r\n AdStudioSurveyTriggerFlag,\r\n addAdStudioSurveyTriggerFlag,\r\n RealUsedFlagSuffix,\r\n handleRealUsedFlag,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { HomePageTopBannerComponent, AssetListBarCarousel, HomePageGenerateWithAIComponent } from './components';\r\nimport { ActionAssetCards } from './components/home-page-asset-cards/action-asset-cards';\r\nimport { ImageBackgroundCards } from './components/home-page-image-background-section';\r\nimport { useHomePageStyle } from './home-page-styles';\r\n\r\nconst HomePage = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n dataService,\r\n libraryDataService,\r\n notificationApi,\r\n isAdsStudioAIGCMVPEnabled,\r\n isAIGCRegionRestricted,\r\n logger,\r\n reload,\r\n navigation,\r\n pagePerfMarker: homePagePerfMarker,\r\n setDataLoaded,\r\n permissions,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const classes = useHomePageStyle();\r\n\r\n const {\r\n loadData,\r\n assets = [],\r\n renameAsset,\r\n } = dataService;\r\n\r\n const {\r\n navigateIntoFolderItem,\r\n } = libraryDataService;\r\n\r\n const [isPageInited, setPageInited] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n\r\n const { setGenerateImageExample } = useContext(GenerateImageContext);\r\n const isAdsStudioBackgroundChangeEnabled = _.get(permissions, ['dynamic', 'AdsStudioBackgroundChange'], false);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load images. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n // init page\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n setPageInited(true);\r\n }\r\n }, [isPageInited]);\r\n\r\n usePageActiveTimeTracker(logger, 'Home');\r\n\r\n useEffect(() => {\r\n setClarityTag({ LoadAdsStudioHomePage: true });\r\n }, []);\r\n\r\n // load data for initial page load\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n\r\n // Important! Add a trivial log so that reload will be an explicit dep.\r\n if (reload) {\r\n logger.logTrace('force to reload');\r\n }\r\n\r\n homePagePerfMarker.willFetchData();\r\n setLoadingData(true);\r\n loadData({\r\n isGlobalSearch: true,\r\n assetsToLoadForSubfolders: 5,\r\n includeParentHierarchy: true,\r\n isRecentSorting: true,\r\n sortBy: CSMLSortBy.MostRecent,\r\n })\r\n .catch(() => {\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n homePagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n addAdStudioSurveyTriggerFlag(adsStudioAccountPreferences, AdStudioSurveyTriggerFlag.App, RealUsedFlagSuffix.App);\r\n });\r\n }, [isPageInited, loadData, onFailedToLoadData, reload, logger]);\r\n\r\n const isPageLoading = !isPageInited || loadingData;\r\n\r\n const onSearch = useCallback((searchQuery) => {\r\n navigation.gotoSearchResultPage({\r\n query: searchQuery,\r\n });\r\n }, [navigation]);\r\n\r\n const onGenerateImage = useCallback(({ url, text }) => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n AIGCHandler(isAdsStudioAIGCMVPEnabled, isAIGCRegionRestricted, notificationApi, i18n, () => {\r\n setGenerateImageExample({\r\n prompt: text,\r\n imageUrl: url,\r\n });\r\n navigation.gotoAIGenerationPanelPage();\r\n });\r\n }, [adsStudioAccountPreferences, i18n, isAIGCRegionRestricted, isAdsStudioAIGCMVPEnabled, navigation, notificationApi, setGenerateImageExample]);\r\n\r\n const sortedAssets = useMemo(() => (_.sortBy(assets, asset => asset.modifiedTime).reverse()), [assets]);\r\n\r\n return (\r\n
\r\n {(isPageLoading) && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n\r\n {\r\n !isPageLoading &&\r\n \r\n }\r\n\r\n {\r\n isAdsStudioBackgroundChangeEnabled &&\r\n \r\n }\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nHomePage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n dataService: PropTypes.shape({\r\n assets: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n loadData: PropTypes.func.isRequired,\r\n renameAsset: PropTypes.func.isRequired,\r\n }),\r\n libraryDataService: PropTypes.shape({\r\n navigateIntoFolderItem: PropTypes.func,\r\n }),\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func.isRequired,\r\n }),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n adsStudioAccountPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({\r\n gotoSearchResultPage: PropTypes.func.isRequired,\r\n gotoAIGenerationPanelPage: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isAIGCRegionRestricted: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nHomePage.defaultProps = {\r\n dataService: {},\r\n libraryDataService: {},\r\n notificationApi: {},\r\n adsStudioAccountPreferences: undefined,\r\n reload: null,\r\n isAIGCRegionRestricted: false,\r\n};\r\n\r\nexport const HomePageComponent = HomePage;\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useImagesPageStyle = makeStyles({\r\n imagePage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap('24px'),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useImageBannerContainerStyle = makeStyles({\r\n topBanner: {\r\n width: '100%',\r\n display: 'flex',\r\n ...shorthands.padding('36px'),\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('24px'),\r\n alignSelf: 'stretch',\r\n ...shorthands.borderRadius('8px'),\r\n backgroundImage: 'linear-gradient(97deg, #E4E2F3 7.52%, #E3EDF3 91.2%), linear-gradient(102deg, rgba(217, 204, 223, 0.25) -0.35%, rgba(231, 222, 227, 0.25) 53.37%, rgba(116, 92, 185, 0.25) 104.98%)',\r\n },\r\n texts: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n textAlign: 'left',\r\n },\r\n pageName: {\r\n lineHeight: '37px',\r\n fontSize: '28px',\r\n fontWeight: 600,\r\n },\r\n descriptions: {\r\n fontSize: '16px',\r\n lineHeight: '21px',\r\n fontWeight: 400,\r\n },\r\n entryCard: {\r\n width: '100%',\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useImageCardContainerStyle = makeStyles({\r\n cardContainer: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('8px'),\r\n flexDirection: 'row',\r\n flexWrap: 'wrap',\r\n width: '100%',\r\n },\r\n});\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useImageEmptyViewStyle = makeStyles({\r\n emptyView: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n ...shorthands.gap('8px'),\r\n },\r\n emptyIcon: {\r\n width: '256px',\r\n height: '256px',\r\n },\r\n mainText: {\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n textAlign: 'center',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n color: tokens.neutralForegroundRest,\r\n lineHeight: '22px',\r\n fontWeight: 400,\r\n },\r\n});\r\n\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useVideoPageStyle = makeStyles({\r\n videoPage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap('24px'),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\nimport videopageBanner from '../../video-page-styles/image-asset/videopageBanner.png';\r\n\r\nexport const useVideoPageTopBannerContainerStyle = makeStyles({\r\n topBanner: {\r\n boxSizing: 'border-box',\r\n width: '100%',\r\n display: 'flex',\r\n ...shorthands.padding('36px'),\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('24px'),\r\n alignSelf: 'stretch',\r\n ...shorthands.borderRadius('8px'),\r\n backgroundImage: `url(${videopageBanner})`,\r\n backgroundSize: 'cover',\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n texts: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n textAlign: 'left',\r\n },\r\n pageName: {\r\n lineHeight: '37px',\r\n fontSize: '28px',\r\n fontWeight: 600,\r\n },\r\n descriptions: {\r\n fontSize: '16px',\r\n lineHeight: '21px',\r\n fontWeight: 400,\r\n },\r\n entryCard: {\r\n width: '100%',\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useVideoCardContainerStyle = makeStyles({\r\n cardContainer: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'flex-start',\r\n alignItems: 'flex-start',\r\n ...shorthands.gap('8px'),\r\n flexDirection: 'row',\r\n maxWidth: '75%',\r\n },\r\n});\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useVideoEmptyViewStyle = makeStyles({\r\n emptyView: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n ...shorthands.gap('8px'),\r\n },\r\n emptyIcon: {\r\n width: '256px',\r\n height: '256px',\r\n },\r\n mainText: {\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n textAlign: 'center',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n color: tokens.neutralForegroundRest,\r\n lineHeight: '22px',\r\n fontWeight: 400,\r\n },\r\n});\r\n\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useSearchResultViewStyle = makeStyles({\r\n searchResultView: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.margin('32px', '36px'),\r\n ...shorthands.gap('24px'),\r\n },\r\n breadcrumbButton: {\r\n '&.fui-BreadcrumbButton': {\r\n color: '#0F6CBD',\r\n },\r\n },\r\n breadcrumbButtonCurrent: {\r\n '&.fui-BreadcrumbButton': {\r\n color: '#424242',\r\n fontWeight: 400,\r\n },\r\n },\r\n headerContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n marginTop: '24px',\r\n marginBottom: '24px',\r\n },\r\n headerTitle: {\r\n fontSize: '28px',\r\n fontWeight: 600,\r\n },\r\n defaultSearchQuery: {\r\n color: '#464FEB',\r\n fontStyle: 'italic',\r\n },\r\n});\r\n","import React, { useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { useJsData } from '@bingads-webui-cc-react/js-data-rest';\r\nimport {\r\n getEntryCardData,\r\n AddAssetEntryCard,\r\n AIGCHandler,\r\n isValidXandrAccount,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useImageCardContainerStyle } from '../../styles';\r\n\r\nexport const AssetsEntryCardContainer = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n navigation,\r\n isAdsStudioAIGCMVPEnabled,\r\n isAIGCRegionRestricted,\r\n notificationApi,\r\n logger,\r\n permissions,\r\n}) => {\r\n const classes = useImageCardContainerStyle();\r\n const openSystemUploadRef = useRef(null);\r\n\r\n const isXandrIntEnabled = useMemo(() => permissions.dynamic.XandrIntegrationEnabled, [permissions]);\r\n // eslint-disable-next-line no-restricted-globals\r\n const { data: account } = useJsData(jsData => (isXandrIntEnabled ? jsData.Account.find(aid) : Promise.resolve()), [aid, isXandrIntEnabled]);\r\n const isXandrIntegrationEnabled = useMemo(() => (isXandrIntEnabled ? isValidXandrAccount(account) : false), [account, isXandrIntEnabled]);\r\n\r\n const cardData = getEntryCardData({\r\n i18n,\r\n isImagePage: true,\r\n onClickCreate: () => {\r\n AIGCHandler(isAdsStudioAIGCMVPEnabled, isAIGCRegionRestricted, notificationApi, i18n, () => {\r\n navigation.gotoAIGenerationPanelPage();\r\n });\r\n },\r\n onClickUpload: () => {\r\n openSystemUploadRef.current = {};\r\n navigation.gotoUploadFilesPanelPage({\r\n aid, cid, oDataConfig, i18n, mode: 'image', openSystemUpload: openSystemUploadRef.current,\r\n });\r\n },\r\n onClickStock: () => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from shutterstock');\r\n }\r\n navigation.gotoStockImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickInvest: () => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from invest');\r\n }\r\n navigation.gotoInvestImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickWebsite: () => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from website');\r\n }\r\n navigation.gotoWebsiteImagePanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n isXandrIntegrationEnabled,\r\n });\r\n\r\n return (\r\n <>\r\n
\r\n {cardData.map(card => (\r\n \r\n ))}\r\n
\r\n \r\n );\r\n};\r\n\r\n\r\nAssetsEntryCardContainer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoWebsiteImagePanelPage: PropTypes.func,\r\n gotoStockImagePanelPage: PropTypes.func,\r\n gotoUploadFilesPanelPage: PropTypes.func,\r\n gotoAIGenerationPanelPage: PropTypes.func,\r\n gotoInvestImagePanelPage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n isAIGCRegionRestricted: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nAssetsEntryCardContainer.defaultProps = {\r\n permissions: { dynamic: {} },\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n AdsStudioAssetGridCell,\r\n GridSectionName,\r\n SectionTilesGrid,\r\n DEFAULT_PAGE_SIZE,\r\n TilesGridLoadingCell,\r\n AdsStudioSpinner,\r\n ManualAddedImageSource,\r\n getUpdatedAssets,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const ImageGridView = ({\r\n isSearchResultPage,\r\n i18n,\r\n dataService,\r\n logger,\r\n onFailedToLoadData,\r\n searchText,\r\n navigation,\r\n cropDataService,\r\n}) => {\r\n const {\r\n assets,\r\n totalAssetCount,\r\n totalLibraryAssetCount,\r\n loadMoreData,\r\n renameAsset,\r\n } = dataService;\r\n\r\n const [isLoadingMore, setIsLoadingMore] = useState(false);\r\n\r\n const { imageCroppingTasks } = cropDataService;\r\n\r\n const loadedAssetsList = useMemo(() => {\r\n const updatedAssets = getUpdatedAssets({\r\n assets,\r\n updates: {\r\n imageCroppingTasks,\r\n },\r\n });\r\n\r\n const updatedAssetsWithAriaLabel = _.map(updatedAssets, (asset) => {\r\n if (_.isObject(asset)) {\r\n return ({\r\n ...asset,\r\n ariaLabel: i18n.getString(_TL_('Image preview')),\r\n });\r\n }\r\n return asset;\r\n });\r\n\r\n return updatedAssetsWithAriaLabel;\r\n }, [assets, i18n, imageCroppingTasks]);\r\n\r\n const imagesGridSection = useMemo(() => ({\r\n sectionName: GridSectionName.Asset,\r\n sectionClassName: 'ads-studio-image-section',\r\n itemKey: 'id',\r\n items: loadedAssetsList,\r\n totalItemCount: totalAssetCount,\r\n config: {\r\n scrollContainer: '[role=\"main\"]',\r\n minItemHeight: 42,\r\n },\r\n }), [loadedAssetsList, totalAssetCount]);\r\n\r\n const sectionGridData = useMemo(\r\n () => ([imagesGridSection]),\r\n [imagesGridSection]\r\n );\r\n\r\n const hasLibraryAssets = useMemo(() => _.some(assets, item => item && item.manualAddedImageSourceType === ManualAddedImageSource.Library), [assets]);\r\n\r\n const libraryAssets = useMemo(() => (_.filter(assets, item =>\r\n item && (_.isUndefined(item.manualAddedImageSourceType) || item.manualAddedImageSourceType === ManualAddedImageSource.Library))), [assets]);\r\n\r\n const onRenderCell = useCallback(({ item }) => {\r\n const {\r\n _index,\r\n id,\r\n folderAssetType,\r\n manualAddedImageSourceType,\r\n url,\r\n } = item || {};\r\n\r\n const onCellDetailsClick = () => {\r\n navigation.gotoAssetDetails({\r\n assetId: id,\r\n assets: libraryAssets,\r\n totalAssetCount: hasLibraryAssets ? totalLibraryAssetCount : totalAssetCount,\r\n folderAssetType,\r\n loadMoreData,\r\n renameAsset,\r\n });\r\n };\r\n const onCellEditClick = () => {\r\n const editImageUrl = manualAddedImageSourceType === ManualAddedImageSource.ShutterStock ? url : undefined;\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId: id });\r\n }\r\n navigation.gotoEditImagePage({\r\n imageId: id,\r\n editImageUrl,\r\n query: isSearchResultPage ? searchText : undefined,\r\n });\r\n };\r\n\r\n return (\r\n \r\n );\r\n }, [hasLibraryAssets, i18n, isSearchResultPage, libraryAssets, loadMoreData, logger, navigation, renameAsset, searchText, totalAssetCount, totalLibraryAssetCount]);\r\n\r\n const loadNextPage = useCallback(() => {\r\n setIsLoadingMore(true);\r\n loadMoreData({ count: DEFAULT_PAGE_SIZE })\r\n .catch((err) => {\r\n onFailedToLoadData(err);\r\n })\r\n .finally(() => {\r\n setIsLoadingMore(false);\r\n });\r\n }, [loadMoreData, onFailedToLoadData]);\r\n\r\n const onRenderLoadingCell = useCallback(({ items, totalItemCount }) => {\r\n if ((items.length < totalItemCount) && (isSearchResultPage || items.length > 0)) {\r\n return (\r\n \r\n {isLoadingMore && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n }\r\n return null;\r\n }, [isLoadingMore, isSearchResultPage, loadNextPage]);\r\n\r\n useEffect(() => {\r\n if (navigation) {\r\n navigation.updateAssetDetailsParams({ assets: libraryAssets });\r\n }\r\n }, [libraryAssets, navigation]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageGridView.propTypes = {\r\n isSearchResultPage: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n onFailedToLoadData: PropTypes.func,\r\n searchText: PropTypes.string,\r\n navigation: PropTypes.shape({}).isRequired,\r\n cropDataService: PropTypes.shape({\r\n imageCroppingTasks: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n};\r\n\r\nImageGridView.defaultProps = {\r\n isSearchResultPage: false,\r\n dataService: {},\r\n onFailedToLoadData: _.noop,\r\n searchText: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { AssetsEntryCardContainer } from './assets-entry-cards-container';\r\nimport { useImageBannerContainerStyle } from '../../styles';\r\n\r\nexport const ImagesTopBannerComponent = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n isAdsStudioAIGCMVPEnabled,\r\n isAIGCRegionRestricted,\r\n notificationApi,\r\n navigation,\r\n logger,\r\n permissions,\r\n}) => {\r\n const classes = useImageBannerContainerStyle();\r\n return (\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('Images'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('Add new images or find existing images.'))}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nImagesTopBannerComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({}).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n isAIGCRegionRestricted: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nImagesTopBannerComponent.defaultProps = {\r\n permissions: { dynamic: {} },\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { EmptyViewIcons } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useImageEmptyViewStyle } from '../../styles';\r\n\r\nexport const ImageEmptyView = ({ i18n, isSearchResult }) => {\r\n const classes = useImageEmptyViewStyle(); // Correct placement of classes initialization\r\n\r\n return (\r\n
\r\n
\r\n \"Empty\r\n
\r\n
\r\n {isSearchResult ? i18n.getString(_TL_('No images match your search. Please try again.')) : i18n.getString(_TL_('You haven\\'t added any images yet. Choose from the options above to add images.'))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nImageEmptyView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isSearchResult: PropTypes.bool,\r\n};\r\n\r\nImageEmptyView.defaultProps = {\r\n isSearchResult: false,\r\n};\r\n","import _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport React, { useEffect, useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n FolderAssetType,\r\n AdsStudioSpinner,\r\n FilterContext,\r\n ImagesFilterBar,\r\n useAdsStudioServices,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { ImagesTopBannerComponent, ImageGridView, ImageEmptyView } from './components';\r\nimport { useImagesPageStyle } from '../styles';\r\n\r\nconst ImagesPage = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n dataService,\r\n notificationApi,\r\n logger,\r\n navigation,\r\n adsStudioUserPreferences,\r\n isAdsStudioAIGCMVPEnabled,\r\n isAIGCRegionRestricted,\r\n reload,\r\n pagePerfMarker: imagePagePerfMarker,\r\n setDataLoaded,\r\n permissions,\r\n}) => {\r\n const classes = useImagesPageStyle();\r\n\r\n const {\r\n totalAssetCount,\r\n loadData,\r\n } = dataService;\r\n\r\n const cropDataService = useAdsStudioServices();\r\n\r\n const [isPageInited, setPageInited] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n\r\n const { filterBar } = useContext(FilterContext);\r\n\r\n const {\r\n searchText = '',\r\n sortBy = null,\r\n } = useMemo(() => filterBar.getFilters(), [filterBar]);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load images. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n // init page\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n setPageInited(true);\r\n }\r\n }, [isPageInited]);\r\n\r\n usePageActiveTimeTracker(logger, 'Image');\r\n\r\n // load data for initial page load\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n\r\n if (reload) { // Important! Add a trivial log so that reload will be an explicit dep.\r\n logger.logTrace('force to reload');\r\n }\r\n imagePagePerfMarker.willFetchData();\r\n setLoadingData(true);\r\n loadData({\r\n assetTypeFilter: FolderAssetType.Image,\r\n isGlobalSearch: true,\r\n isSemanticSearch: true,\r\n searchText,\r\n sortBy,\r\n perfMarker: imagePagePerfMarker.createChild('imagePageLoadData'),\r\n })\r\n .catch(() => {\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n imagePagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n });\r\n }, [isPageInited, loadData, onFailedToLoadData, searchText, sortBy, reload, logger]);\r\n\r\n const isPageLoading = !isPageInited || loadingData;\r\n\r\n return (\r\n
\r\n {isPageLoading && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {\r\n totalAssetCount && totalAssetCount > 0 ?\r\n :\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nImagesPage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}),\r\n notificationApi: PropTypes.shape({}),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({}).isRequired,\r\n isAIGCRegionRestricted: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nImagesPage.defaultProps = {\r\n dataService: {},\r\n notificationApi: {},\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n isAIGCRegionRestricted: false,\r\n permissions: { dynamic: {} },\r\n};\r\n\r\nexport const ImagesPageComponent = ImagesPage;\r\n","export const actionTypes = {\r\n updateImages: 'UPDATE_IMAGES',\r\n updateLogos: 'UPDATE_LOGOS',\r\n updateColors: 'UPDATE_COLORS',\r\n updateFonts: 'UPDATE_FONTS',\r\n updateTaglines: 'UPDATE_TAGLINES',\r\n updateBrandVoice: 'UPDATE_BRAND_VOICE',\r\n upDateBrandTones: 'UPDATE_BRAND_TONES',\r\n setData: 'SET_BRAND_KIT_DATA',\r\n};\r\n\r\n/* istanbul ignore next */\r\nexport function reducer(state, action) {\r\n const { type, payload } = action;\r\n\r\n switch (type) {\r\n case actionTypes.updateImages:\r\n return {\r\n ...state,\r\n images: payload,\r\n };\r\n case actionTypes.updateLogos:\r\n return {\r\n ...state,\r\n logos: payload,\r\n };\r\n case actionTypes.updateColors:\r\n return {\r\n ...state,\r\n colors: payload,\r\n };\r\n case actionTypes.updateFonts:\r\n return {\r\n ...state,\r\n fonts: payload,\r\n };\r\n case actionTypes.updateTaglines:\r\n return {\r\n ...state,\r\n taglines: payload,\r\n };\r\n case actionTypes.updateBrandVoice:\r\n return {\r\n ...state,\r\n brandVoice: payload,\r\n };\r\n case actionTypes.upDateBrandTones:\r\n return {\r\n ...state,\r\n brandTones: payload,\r\n };\r\n case actionTypes.setData:\r\n return {\r\n ...state,\r\n ...payload,\r\n };\r\n default:\r\n return state;\r\n }\r\n}\r\n","import React from 'react';\r\nimport {\r\n Body1,\r\n tokens,\r\n Subtitle1,\r\n makeStyles,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { EntryCardSVGIcons } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nconst WarningDialogueContent = ({ i18n }) => {\r\n const classes = useStyles();\r\n return (\r\n
\r\n \r\n
\r\n \r\n {i18n.getString(_TL_('Creating a new brand kit will delete the old kit from the Ad Studio'))}\r\n \r\n \r\n {i18n.getString(_TL_('You can only create and save one brand kit in Ad Studio'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport { WarningDialogueContent };\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useCommonDialogueStyles = makeStyles({\r\n container: {\r\n ...typographyStyles.body1,\r\n ...shorthands.overflow('hidden'),\r\n ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalXXL),\r\n },\r\n header: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n columnGap: tokens.spacingHorizontalL,\r\n '& > div': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: tokens.spacingHorizontalS,\r\n },\r\n },\r\n horizontalDivider: {\r\n width: '100%',\r\n ...shorthands.margin(tokens.spacingVerticalS, tokens.spacingHorizontalNone),\r\n },\r\n dialogueContentContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingHorizontalNone, tokens.spacingVerticalL),\r\n },\r\n dismissIcon: {\r\n cursor: 'pointer',\r\n },\r\n searchBoxWrapper: {\r\n ...shorthands.flex(1),\r\n position: 'relative',\r\n minHeight: '90px',\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n },\r\n searchBox: {\r\n width: '100%',\r\n height: '100%',\r\n ...shorthands.gap(tokens.spacingVerticalS, tokens.spacingHorizontalS),\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n\r\n '&::after': {\r\n paddingTop: tokens.spacingVerticalS,\r\n borderBottomRightRadius: tokens.borderRadiusXLarge,\r\n borderBottomLeftRadius: tokens.borderRadiusXLarge,\r\n },\r\n },\r\n loadingText: {\r\n marginBlockEnd: '0',\r\n color: tokens.colorNeutralStroke1,\r\n marginBlockStart: tokens.spacingVerticalXXL,\r\n },\r\n loadingContainer: {\r\n position: 'absolute',\r\n bottom: '0',\r\n left: '0',\r\n right: '0',\r\n width: '100%',\r\n zIndex: '1',\r\n },\r\n footer: {\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n warningFooter: {\r\n gridColumnEnd: 'auto',\r\n gridColumnStart: 'auto',\r\n justifySelf: 'start',\r\n },\r\n});\r\n\r\nexport const useCreateWithWebsiteDialogueStyles = makeStyles({\r\n domainInputWrapper: {\r\n width: '100%',\r\n },\r\n suggestionErrorInvalid: {\r\n marginTop: tokens.spacingVerticalXS,\r\n ...typographyStyles.caption1,\r\n },\r\n});\r\n","import PropTypes, { func } from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n AddAssetEntryCard,\r\n EntryCardSVGIcons,\r\n DomainInputView,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport {\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogBody,\r\n DialogActions,\r\n DialogContent,\r\n Button,\r\n Field,\r\n Textarea,\r\n mergeClasses,\r\n ProgressBar,\r\n Subtitle2,\r\n Divider,\r\n Body2,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular, StyleGuide24Regular } from '@fluentui/react-icons';\r\nimport { isValidUrl } from '@bingads-webui/url-util';\r\nimport { WarningDialogueContent } from './warning-dialogue-content';\r\nimport {\r\n useCommonDialogueStyles,\r\n useCreateWithWebsiteDialogueStyles,\r\n} from './style';\r\n\r\nconst CreateWithWebsiteDialogueContent = ({\r\n i18n,\r\n isValidDomain,\r\n onChangeValidDomain,\r\n brandKitCreationPayload,\r\n isNewBrandCreateWarningEnabled,\r\n onChangeBrandKitCreationPayload,\r\n}) => {\r\n const commonClasses = useCommonDialogueStyles();\r\n const dialogueClasses = useCreateWithWebsiteDialogueStyles();\r\n\r\n const handleDomainChange = (domain) => {\r\n onChangeBrandKitCreationPayload({\r\n ...brandKitCreationPayload,\r\n domain,\r\n });\r\n onChangeValidDomain(isValidUrl(domain));\r\n };\r\n\r\n const handleDescriptionChange = (e) => {\r\n onChangeBrandKitCreationPayload({\r\n ...brandKitCreationPayload,\r\n description: e.target.value,\r\n });\r\n };\r\n\r\n if (isNewBrandCreateWarningEnabled) {\r\n return ;\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\nCreateWithWebsiteDialogueContent.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n isValidDomain: PropTypes.bool.isRequired,\r\n onChangeValidDomain: PropTypes.func.isRequired,\r\n brandKitCreationPayload: PropTypes.shape({\r\n domain: PropTypes.string,\r\n description: PropTypes.string,\r\n }).isRequired,\r\n onChangeBrandKitCreationPayload: PropTypes.func.isRequired,\r\n isNewBrandCreateWarningEnabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst CreateWithWebsiteDialogue = ({\r\n i18n,\r\n onCreateBrandKit,\r\n disableNewBrandKitWarning,\r\n isBrandKitCreationInProgress,\r\n}) => {\r\n const commonClasses = useCommonDialogueStyles();\r\n const [isDialogueOpen, setIsDialogueOpen] = React.useState(false);\r\n const [\r\n isNewBrandCreateWarningEnabled,\r\n setNewBrandCreateWarningEnabled,\r\n ] = React.useState(!disableNewBrandKitWarning);\r\n const [isValidDomain, setIsValidDomain] = React.useState(true);\r\n const [brandKitCreationPayload, setBrandKitCreationPayload] = React.useState({\r\n domain: '',\r\n description: '',\r\n });\r\n\r\n const handleDialogueOpenChange = (dialogueData) => {\r\n setIsDialogueOpen(dialogueData.open);\r\n if (!dialogueData.open) {\r\n setBrandKitCreationPayload({\r\n domain: '',\r\n description: '',\r\n });\r\n setNewBrandCreateWarningEnabled(true);\r\n }\r\n };\r\n\r\n const handleCreateBrandKit = () => {\r\n if (!brandKitCreationPayload.domain || !isValidDomain) {\r\n return;\r\n }\r\n onCreateBrandKit(brandKitCreationPayload);\r\n console.info('Creating brand kit with payload:', brandKitCreationPayload);\r\n };\r\n\r\n return (\r\n handleDialogueOpenChange(data)}>\r\n \r\n setIsDialogueOpen(true)}\r\n cardClassName=\"create-with-website-card\"\r\n description={i18n.getString(_TL_('Create with Website'))}\r\n title={i18n.getString(_TL_('Enter your URL'))}\r\n imageSrc={EntryCardSVGIcons.WebsiteSVGIcon}\r\n isFillWidth\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {isNewBrandCreateWarningEnabled\r\n ? i18n.getString(_TL_('Create New Brand Kit'))\r\n : i18n.getString(_TL_('Create Brand Kit with URL'))}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {isBrandKitCreationInProgress && (\r\n <>\r\n \r\n {i18n.getString(_TL_('Finding brand elements...'))}\r\n \r\n
\r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n {isNewBrandCreateWarningEnabled ? (\r\n setNewBrandCreateWarningEnabled(false)}\r\n >\r\n {i18n.getString(_TL_('Create new kit'))}\r\n \r\n ) : (\r\n \r\n {i18n.getString(_TL_('Create'))}\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\nexport { CreateWithWebsiteDialogue };\r\n\r\nCreateWithWebsiteDialogue.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n disableNewBrandKitWarning: PropTypes.bool,\r\n onCreateBrandKit: PropTypes.func.isRequired,\r\n isBrandKitCreationInProgress: PropTypes.bool,\r\n};\r\n\r\nCreateWithWebsiteDialogue.defaultProps = {\r\n disableNewBrandKitWarning: false,\r\n isBrandKitCreationInProgress: false,\r\n};\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\nimport { btnStyle } from '@bingads-webui-campaign/shared-image-experience-styles';\r\n\r\nexport const filesPerRowInPreviewGrid = '--files-per-row-in-preview-grid';\r\n\r\nexport const getFileUploadContainerStyles = (_, { palette = {} }) => ({\r\n container: {\r\n '& .file-drag-container': {\r\n '& .hidden': {\r\n display: 'none',\r\n },\r\n '& .file-upload-button': {\r\n ...shorthands.padding(\r\n tokens.spacingVerticalNone,\r\n '48px',\r\n tokens.spacingVerticalNone,\r\n tokens.spacingHorizontalXXXL\r\n ),\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n '& .file-picker-react-wrapper': {\r\n '& .file-picker-btn': {\r\n extend: btnStyle()['.btn-default'],\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n float: 'none',\r\n marginLeft: 0,\r\n maxWidth: '72px',\r\n overflow: 'hidden',\r\n ...typographyStyles.body1,\r\n\r\n '& ~ .file-text': {\r\n display: 'inline-block',\r\n border: 'none',\r\n },\r\n },\r\n },\r\n '& .file-picker-react-wrapper.disabled': {\r\n visibility: 'hidden',\r\n },\r\n '& .file-drag-wrapper': {\r\n height: 'fit-content',\r\n '& .file-dragger-wrapper': {\r\n boxSizing: 'border-box',\r\n padding: '12.5px 0',\r\n },\r\n '& .file-dragger': {\r\n padding: '12.5px 0',\r\n boxSizing: 'border-box',\r\n ...shorthands.border('1px'),\r\n ...shorthands.borderStyle('dashed'),\r\n ...shorthands.borderColor(palette.colorNeutralBackground1),\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n },\r\n '& .file-default-wrapper': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n paddingLeft: tokens.spacingHorizontalXXXL,\r\n '& .file-upload-icon': {\r\n display: 'none !important',\r\n },\r\n '& .file-upload-text': {\r\n display: 'inline-block',\r\n marginTop: '0px',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const getFileUploadButtonStyles = (_, { palette = {} }) => ({\r\n button: {\r\n display: 'flex',\r\n width: 'fit-content',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n flexDirection: 'column',\r\n boxSizing: 'border-box',\r\n position: 'relative',\r\n overflow: 'hidden',\r\n ...shorthands.border('1px'),\r\n ...shorthands.borderStyle('dashed'),\r\n ...shorthands.borderColor(palette.colorNeutralBackground1),\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n\r\n '& .file-picker-container': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n\r\n '& div': {\r\n height: '100%',\r\n },\r\n\r\n '& .hidden': {\r\n display: 'none',\r\n },\r\n '& .file-picker-btn': {\r\n height: '100%',\r\n cursor: 'pointer',\r\n opacity: '0.001',\r\n extend: btnStyle()['.btn-default'],\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n float: 'none',\r\n marginLeft: 0,\r\n maxWidth: '72px',\r\n overflow: 'hidden',\r\n ...typographyStyles.body1,\r\n\r\n '& ~ .file-text': {\r\n display: 'inline-block',\r\n border: 'none',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const useFileUploadStyles = makeStyles({\r\n filesContainer: {\r\n display: 'grid',\r\n ...shorthands.gap(tokens.spacingVerticalM, tokens.spacingHorizontalXL),\r\n gridTemplateColumns: `repeat(var(${filesPerRowInPreviewGrid}), 1fr)`,\r\n },\r\n fileContainer: {\r\n display: 'flex',\r\n maxWidth: '100%',\r\n alignItems: 'center',\r\n position: 'relative',\r\n boxShadow: tokens.shadow4,\r\n justifyContent: 'space-between',\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n ...shorthands.overflow('hidden'),\r\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\r\n ...shorthands.gap(tokens.spacingHorizontalS, tokens.spacingVerticalNone),\r\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\r\n },\r\n filePreviewImageIcon: {\r\n display: 'flex',\r\n position: 'relative',\r\n ...shorthands.flex(0),\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n\r\n '& > span': {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n zIndex: 1,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n ...shorthands.borderRadius('100%'),\r\n ...shorthands.padding(\r\n tokens.spacingVerticalXS,\r\n tokens.spacingHorizontalXS\r\n ),\r\n },\r\n },\r\n filePreviewContent: {\r\n ...shorthands.flex(1),\r\n ...shorthands.overflow('hidden'),\r\n '& > div': {\r\n ...shorthands.margin(\r\n tokens.spacingVerticalXS,\r\n tokens.spacingHorizontalNone\r\n ),\r\n },\r\n },\r\n uploadFilesButton: {\r\n display: 'flex',\r\n cursor: 'pointer',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flexDirection: 'column',\r\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\r\n\r\n '& span': {\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n },\r\n fileUploadError: {\r\n ...shorthands.padding(\r\n tokens.spacingVerticalS,\r\n tokens.spacingHorizontalNone,\r\n tokens.spacingVerticalNone,\r\n tokens.spacingHorizontalNone\r\n ),\r\n color: tokens.colorPaletteRedBackground3,\r\n },\r\n});\r\n","export const FILE_ERROR_TYPES = {\r\n FILE_SIZE: {\r\n type: 'fileSize',\r\n message: _TL_('File is either too large or too small'),\r\n },\r\n FILE_TYPE: {\r\n type: 'fileType',\r\n message: _TL_('File type is not allowed'),\r\n },\r\n FILE_COUNT: {\r\n type: 'fileCount',\r\n message: _TL_('Maximum number of files exceeded'),\r\n },\r\n UPLOAD_FAILED: {\r\n type: 'uploadFailed',\r\n message: _TL_('File upload failed'),\r\n },\r\n};\r\n\r\nexport const DEFAULT_MAX_SIZE = 1 * 1024 * 1024;\r\n\r\nexport const LegacyStringMap = {\r\n FilePicker_ButtonText_ChooseFile: _TL_('Browse'),\r\n FilePicker_ButtonText_RemoveFile: _TL_('Remove'),\r\n FilePicker_FileExtensionInvalid: _TL_('File extension is invalid'),\r\n FilePicker_FileInvalid: _TL_('File is invalid'),\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport { Promise } from 'bluebird';\r\nimport { uniqueId } from 'underscore';\r\nimport { FILE_ERROR_TYPES, DEFAULT_MAX_SIZE } from './constants';\r\n\r\nexport function validateFiles({\r\n files,\r\n minFileSize = 0,\r\n allowedTypes = [],\r\n maxFileSize = DEFAULT_MAX_SIZE,\r\n}) {\r\n return new Promise((resolve) => {\r\n const validationResult = {\r\n files: [],\r\n hasError: false,\r\n };\r\n for (let i = 0; i < files.length; i += 1) {\r\n const file = files[i];\r\n file.id = uniqueId('file-');\r\n const fileTypesToCheck = allowedTypes.map(type =>\r\n type.replace('.', '').toLowerCase());\r\n const fileType = file.type.includes('/')\r\n ? file.type.split('/')[1].toLowerCase()\r\n : file.type.toLowerCase();\r\n if (!fileTypesToCheck.includes(fileType)) {\r\n file.errorType = FILE_ERROR_TYPES.FILE_TYPE.type;\r\n file.message = FILE_ERROR_TYPES.FILE_TYPE.message;\r\n validationResult.files.push(file);\r\n validationResult.hasError = true;\r\n } else if (file.size > maxFileSize || file.size < minFileSize) {\r\n file.errorType = FILE_ERROR_TYPES.FILE_SIZE.type;\r\n file.message = FILE_ERROR_TYPES.FILE_SIZE.message;\r\n validationResult.files.push(file);\r\n validationResult.hasError = true;\r\n } else {\r\n file.message = _TL_('File is valid');\r\n validationResult.files.push(file);\r\n }\r\n }\r\n resolve(validationResult);\r\n });\r\n}\r\n\r\nfunction getLocalizedFileSizeTextsBySize(fileSize, i18n) {\r\n return [\r\n i18n.getString(_TL_('{{fileSize}} Bytes'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} KB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} MB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} GB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} TB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} PB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} EB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} ZB'), { fileSize }),\r\n i18n.getString(_TL_('{{fileSize}} YB'), { fileSize }),\r\n ];\r\n}\r\n\r\nexport function formatFileSize(bytes, decimals = 2, i18n) {\r\n if (bytes === 0) return i18n.getString(_TL_('0 Bytes'));\r\n const k = 1024;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizeUnitIndex = Math.floor(Math.log(bytes) / Math.log(k));\r\n const formattedFileSize = i18n.formatDecimal(bytes / (k ** sizeUnitIndex), {\r\n maximumFractionDigits: dm,\r\n minimumFractionDigits: 0,\r\n });\r\n const localizedFileSizeTexts = getLocalizedFileSizeTextsBySize(\r\n formattedFileSize,\r\n i18n\r\n );\r\n return localizedFileSizeTexts[sizeUnitIndex];\r\n}\r\n\r\nconst mockFileUploadAPI = () =>\r\n new Promise((resolve, reject) => {\r\n const shouldReject = Math.random() > 0.5;\r\n setTimeout(() => {\r\n if (shouldReject) {\r\n reject(new Error(_TL_('Upload Error. Failed to upload file')));\r\n } else {\r\n resolve();\r\n }\r\n }, 2000);\r\n });\r\n\r\nexport async function uploadFiles(filesToUpload) {\r\n const uploadFile = async (file) => {\r\n try {\r\n await mockFileUploadAPI(file);\r\n // eslint-disable-next-line no-param-reassign\r\n file.uploaded = true;\r\n // eslint-disable-next-line no-param-reassign\r\n file.message = _TL_('File uploaded successfully');\r\n } catch (error) {\r\n // eslint-disable-next-line no-param-reassign\r\n file.uploaded = false;\r\n // eslint-disable-next-line no-param-reassign\r\n file.errorType = FILE_ERROR_TYPES.UPLOAD_FAILED.type;\r\n // eslint-disable-next-line no-param-reassign\r\n file.message =\r\n error.message || FILE_ERROR_TYPES.UPLOAD_FAILED.message;\r\n }\r\n return file;\r\n };\r\n\r\n const updatedFiles = await Promise.all(filesToUpload.map(file => uploadFile(file)));\r\n return updatedFiles;\r\n}\r\n","/* istanbul ignore file */\r\n\r\nimport PropTypes, { func } from 'prop-types';\r\nimport React, { useCallback } from 'react';\r\n\r\nimport {\r\n Delete16Regular,\r\n AddSquare24Regular,\r\n ErrorCircle20Regular,\r\n CheckmarkCircle20Regular,\r\n} from '@fluentui/react-icons';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { FilePicker } from '@bingads-webui-campaign-react/upload-file-picker';\r\nimport {\r\n Button,\r\n ProgressBar,\r\n Text,\r\n tokens,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\nimport { EntryCardSVGIcons } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\n\r\nimport {\r\n useFileUploadStyles,\r\n filesPerRowInPreviewGrid,\r\n getFileUploadButtonStyles,\r\n getFileUploadContainerStyles,\r\n} from './style';\r\nimport { LegacyStringMap } from './constants';\r\nimport { formatFileSize, uploadFiles, validateFiles } from './utils';\r\n\r\nconst FilePreview = ({\r\n i18n,\r\n file,\r\n progress,\r\n onDeleteFile,\r\n}) => {\r\n const classes = useFileUploadStyles();\r\n const hasError = !!file.errorType;\r\n const uploadTried = typeof file.uploaded === 'boolean';\r\n\r\n return (\r\n
\r\n \r\n
\r\n \"file-icon\"\r\n \r\n {uploadTried && hasError ? (\r\n \r\n ) : null}\r\n {uploadTried && !hasError ? (\r\n \r\n ) : null}\r\n \r\n
\r\n
\r\n
\r\n \r\n {file.name}\r\n \r\n \r\n {formatFileSize(file.size, 2, i18n)}\r\n
\r\n onDeleteFile(file)}\r\n icon={}\r\n />\r\n
\r\n );\r\n};\r\n\r\nFilePreview.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n file: PropTypes.shape({\r\n id: PropTypes.string,\r\n type: PropTypes.string,\r\n name: PropTypes.string,\r\n size: PropTypes.number,\r\n uploaded: PropTypes.bool,\r\n message: PropTypes.string,\r\n errorType: PropTypes.string,\r\n }).isRequired,\r\n onDeleteFile: PropTypes.func,\r\n progress: PropTypes.number,\r\n};\r\n\r\nFilePreview.defaultProps = {\r\n progress: 0,\r\n onDeleteFile: () => {},\r\n};\r\n\r\nexport const FileUpload = ({\r\n i18n,\r\n maxFileSize,\r\n minFileSize,\r\n allowedTypes,\r\n dragOrDropTip,\r\n disableAddMore,\r\n dragOrDropLabel,\r\n onFilesUploaded,\r\n previewFilesPerRow,\r\n maxFilesCountAllowed,\r\n dragOrDropDescription,\r\n}) => {\r\n const classes = useFileUploadStyles();\r\n const fileUploadContainerClasses = useDefaultStyles(getFileUploadContainerStyles);\r\n const fileUploadButtonClasses = useDefaultStyles(getFileUploadButtonStyles);\r\n const [files, setFiles] = React.useState([]);\r\n const [uploadError, setUploadError] = React.useState('');\r\n\r\n const legacyI18n = buildLegacyI18n(i18n, [...[ValidationStringMap], ...[LegacyStringMap]]);\r\n\r\n const handleDeleteFile = useCallback(\r\n (fileToDelete) => {\r\n setFiles((prevFiles) => {\r\n const updatedFiles = prevFiles.filter(file => file.id !== fileToDelete.id);\r\n onFilesUploaded(updatedFiles);\r\n return updatedFiles;\r\n });\r\n },\r\n [onFilesUploaded]\r\n );\r\n\r\n const handleFilesUpload = useCallback(\r\n async (filesToUpload) => {\r\n try {\r\n const updatedFiles = await uploadFiles(filesToUpload);\r\n setFiles((prevFiles) => {\r\n const updatedFilesArray = [...prevFiles];\r\n updatedFiles.forEach((updatedFile) => {\r\n const fileIndex = updatedFilesArray.findIndex(file => file.id === updatedFile.id);\r\n if (fileIndex > -1) {\r\n updatedFilesArray[fileIndex] = updatedFile;\r\n } else {\r\n updatedFilesArray.push(updatedFile);\r\n }\r\n });\r\n onFilesUploaded(updatedFilesArray);\r\n return updatedFilesArray;\r\n });\r\n } catch (error) {\r\n setUploadError(error.message || _TL_('Failed to upload files'));\r\n }\r\n },\r\n [onFilesUploaded]\r\n );\r\n\r\n const onFileRead = useCallback(\r\n async (fileSources) => {\r\n try {\r\n if (!fileSources || !fileSources.length) {\r\n throw new Error(_TL_('No files selected'));\r\n }\r\n const filesToUploadCount = Math.min(\r\n maxFilesCountAllowed,\r\n fileSources.length\r\n );\r\n const fileSourcesArray = Array.from(fileSources);\r\n const filesToUpload = fileSourcesArray.slice(0, filesToUploadCount);\r\n if (\r\n typeof minFileSize === 'number' ||\r\n typeof maxFileSize === 'number'\r\n ) {\r\n const validationResult = await validateFiles({\r\n files: filesToUpload,\r\n maxFileSize,\r\n minFileSize,\r\n allowedTypes,\r\n });\r\n setFiles(prev => [...prev, ...validationResult.files]);\r\n handleFilesUpload(validationResult.files);\r\n }\r\n } catch (error) {\r\n setUploadError(error.message);\r\n }\r\n },\r\n [\r\n setUploadError,\r\n maxFilesCountAllowed,\r\n maxFileSize,\r\n minFileSize,\r\n allowedTypes,\r\n handleFilesUpload,\r\n ]\r\n );\r\n\r\n const onError = useCallback((error) => {\r\n setUploadError(error.join(', '));\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n {files.length ? (\r\n \r\n {files.map((file, index) => (\r\n \r\n ))}\r\n {maxFilesCountAllowed > 1 && !disableAddMore ? (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Add more'))}\r\n
\r\n \r\n
\r\n ) : null}\r\n
\r\n ) : (\r\n 1}\r\n fileDraggerTip={i18n.getString(dragOrDropTip)}\r\n fileDraggerLabel={i18n.getString(dragOrDropLabel)}\r\n fileDraggerDropDescription={i18n.getString(dragOrDropDescription)}\r\n />\r\n )}\r\n \r\n {uploadError ? (\r\n \r\n {i18n.getString(uploadError)}\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nFileUpload.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n maxFilesCountAllowed: PropTypes.number,\r\n minFileSize: PropTypes.number,\r\n maxFileSize: PropTypes.number,\r\n disableAddMore: PropTypes.bool,\r\n previewFilesPerRow: PropTypes.number,\r\n allowedTypes: PropTypes.arrayOf(PropTypes.string),\r\n dragOrDropLabel: PropTypes.string,\r\n dragOrDropTip: PropTypes.string,\r\n dragOrDropDescription: PropTypes.string,\r\n onFilesUploaded: PropTypes.func.isRequired,\r\n};\r\n\r\nFileUpload.defaultProps = {\r\n maxFilesCountAllowed: 1,\r\n previewFilesPerRow: 1,\r\n minFileSize: 0,\r\n maxFileSize: 10 * 1024 * 1024,\r\n dragOrDropTip: '',\r\n allowedTypes: ['*/*'],\r\n disableAddMore: false,\r\n dragOrDropDescription: _TL_('Drop your files to upload'),\r\n dragOrDropLabel: _TL_('Upload or drag and drop your files here.'),\r\n};\r\n","import React from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\n\r\nimport {\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogBody,\r\n DialogActions,\r\n DialogContent,\r\n Button,\r\n Field,\r\n Textarea,\r\n mergeClasses,\r\n ProgressBar,\r\n Divider,\r\n Subtitle2,\r\n Body2,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport {\r\n AddAssetEntryCard,\r\n EntryCardSVGIcons,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Dismiss20Regular, StyleGuide24Regular } from '@fluentui/react-icons';\r\n\r\nimport { useCommonDialogueStyles } from './style';\r\nimport { FileUpload } from '../../../file-upload';\r\nimport { WarningDialogueContent } from './warning-dialogue-content';\r\n\r\nconst UploadBrandGuideDialogueContent = ({\r\n i18n,\r\n brandKitCreationPayload,\r\n isNewBrandCreateWarningEnabled,\r\n onChangeBrandKitCreationPayload,\r\n}) => {\r\n const commonClasses = useCommonDialogueStyles();\r\n\r\n const handleDescriptionChange = (e) => {\r\n onChangeBrandKitCreationPayload({\r\n ...brandKitCreationPayload,\r\n description: e.target.value,\r\n });\r\n };\r\n\r\n const handleFilesUpload = (files) => {\r\n onChangeBrandKitCreationPayload({\r\n ...brandKitCreationPayload,\r\n files,\r\n });\r\n };\r\n\r\n if (isNewBrandCreateWarningEnabled) {\r\n return ;\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\nUploadBrandGuideDialogueContent.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n brandKitCreationPayload: PropTypes.shape({\r\n files: PropTypes.arrayOf(PropTypes.shape({})),\r\n description: PropTypes.string,\r\n }).isRequired,\r\n onChangeBrandKitCreationPayload: PropTypes.func.isRequired,\r\n isNewBrandCreateWarningEnabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst UploadBrandGuideDialogue = ({\r\n i18n,\r\n onCreateBrandKit,\r\n disableNewBrandKitWarning,\r\n isBrandKitCreationInProgress,\r\n}) => {\r\n const commonClasses = useCommonDialogueStyles();\r\n const [isDialogueOpen, setIsDialogueOpen] = React.useState(false);\r\n const [\r\n isNewBrandCreateWarningEnabled,\r\n setNewBrandCreateWarningEnabled,\r\n ] = React.useState(!disableNewBrandKitWarning);\r\n const [brandKitCreationPayload, setBrandKitCreationPayload] = React.useState({\r\n files: [],\r\n description: '',\r\n });\r\n\r\n const handleDialogueOpenChange = (dialogueData) => {\r\n setIsDialogueOpen(dialogueData.open);\r\n if (!dialogueData.open) {\r\n setBrandKitCreationPayload({\r\n files: [],\r\n description: '',\r\n });\r\n setNewBrandCreateWarningEnabled(true);\r\n }\r\n };\r\n\r\n const handleCreateBrandKit = () => {\r\n if (brandKitCreationPayload.files.length === 0) {\r\n return;\r\n }\r\n onCreateBrandKit(brandKitCreationPayload);\r\n console.info('Creating brand kit with payload:', brandKitCreationPayload);\r\n };\r\n\r\n return (\r\n handleDialogueOpenChange(data)}>\r\n \r\n setIsDialogueOpen(true)}\r\n description={i18n.getString(_TL_('Upload Brand Guidance File'))}\r\n title={i18n.getString(_TL_('Create with Brand Guide'))}\r\n imageSrc={EntryCardSVGIcons.UploadSVGIcon}\r\n isFillWidth\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {isNewBrandCreateWarningEnabled\r\n ? i18n.getString(_TL_('Create New Brand Kit'))\r\n : i18n.getString(_TL_('Create Brand Kit with Brand Documentation'))}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {isBrandKitCreationInProgress && (\r\n <>\r\n \r\n {i18n.getString(_TL_('Finding brand elements...'))}\r\n \r\n
\r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n {isNewBrandCreateWarningEnabled ? (\r\n setNewBrandCreateWarningEnabled(false)}\r\n >\r\n {i18n.getString(_TL_('Create new kit'))}\r\n \r\n ) : (\r\n \r\n {i18n.getString(_TL_('Create'))}\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\nexport { UploadBrandGuideDialogue };\r\n\r\nUploadBrandGuideDialogue.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n disableNewBrandKitWarning: PropTypes.bool,\r\n onCreateBrandKit: PropTypes.func.isRequired,\r\n isBrandKitCreationInProgress: PropTypes.bool,\r\n};\r\n\r\nUploadBrandGuideDialogue.defaultProps = {\r\n disableNewBrandKitWarning: false,\r\n isBrandKitCreationInProgress: false,\r\n};\r\n","import React from 'react';\r\nimport {\r\n AddAssetEntryCard,\r\n EntryCardSVGIcons,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst CreateManuallyAction = ({ i18n }) => (\r\n {}}\r\n />\r\n);\r\n\r\nexport { CreateManuallyAction };\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const getActionsCardsStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n maxWidth: '1532px',\r\n flexDirection: 'row',\r\n justifyContent: 'start',\r\n ...shorthands.gap(tokens.spacingHorizontalL, tokens.spacingVerticalL),\r\n },\r\n cards: {\r\n ...shorthands.flex(1),\r\n },\r\n});\r\n","import PropTypes, { func } from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n CreateManuallyAction,\r\n CreateWithWebsiteDialogue,\r\n UploadBrandGuideDialogue,\r\n} from './dialogues';\r\nimport { getActionsCardsStyles } from './styles';\r\n\r\nconst BrandActionCards = ({ i18n }) => {\r\n const classes = getActionsCardsStyles();\r\n\r\n const [\r\n isBrandKitCreationInProgress,\r\n setIsBrandKitCreationInProgress,\r\n ] = React.useState(false);\r\n\r\n const handleBrandKitCreation = (brandKitCreationPayload) => {\r\n console.log(brandKitCreationPayload);\r\n setIsBrandKitCreationInProgress(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport { BrandActionCards };\r\n\r\nBrandActionCards.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n};\r\n","import {\r\n tokens,\r\n makeStyles,\r\n shorthands,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\nimport bannerBackground from '../../image-asset/banner-background.png';\r\n\r\nexport const useBannerContainerStyles = makeStyles({\r\n bannerContainer: {\r\n width: '100%',\r\n display: 'flex',\r\n alignSelf: 'stretch',\r\n flexDirection: 'column',\r\n ...shorthands.padding('36px'),\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n ...shorthands.gap(tokens.spacingVerticalXXL, tokens.spacingHorizontalXXL),\r\n backgroundImage: `linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url(${bannerBackground})`,\r\n backgroundSize: 'cover',\r\n 'background-position': 'right center',\r\n backgroundRepeat: 'no-repeat',\r\n ...typographyStyles.body1,\r\n },\r\n heading: {\r\n marginBlockEnd: tokens.spacingVerticalS,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport { Body2, mergeClasses, Title2 } from '@fluentui/react-components';\r\n\r\nimport { BrandActionCards } from './action-cards';\r\nimport { useBannerContainerStyles } from './styles';\r\n\r\nconst Banner = ({ i18n, hideActionsMenu }) => {\r\n const classes = useBannerContainerStyles();\r\n\r\n return (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Brand kit'))}\r\n \r\n \r\n {i18n.getString(_TL_('Add and manage your brand identity for your ads, all in one place.'))}\r\n \r\n
\r\n {hideActionsMenu ? null : }\r\n
\r\n );\r\n};\r\n\r\nexport { Banner };\r\n\r\nBanner.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n hideActionsMenu: PropTypes.bool,\r\n};\r\n\r\nBanner.defaultProps = {\r\n hideActionsMenu: false,\r\n};\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useSuggestionsStyles = makeStyles({\r\n container: {\r\n width: '10%',\r\n display: 'flex',\r\n rowGap: '40px',\r\n minWidth: '295px',\r\n alignSelf: 'stretch',\r\n flexDirection: 'column',\r\n ...typographyStyles.body1,\r\n ...shorthands.overflow('hidden'),\r\n color: tokens.colorNeutralForeground1,\r\n },\r\n panel: {\r\n display: 'flex',\r\n alignItems: 'flex-start',\r\n columnGap: tokens.spacingHorizontalS,\r\n\r\n '& svg': {\r\n flexShrink: 0,\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n },\r\n panelBody: {\r\n flexWrap: 'wrap',\r\n rowGap: tokens.spacingVerticalS,\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n loadingContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: tokens.spacingVerticalS,\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport { Sparkle20Regular } from '@fluentui/react-icons';\r\nimport {\r\n mergeClasses,\r\n Skeleton,\r\n SkeletonItem,\r\n Text,\r\n} from '@fluentui/react-components';\r\nimport {\r\n InteractionTag,\r\n InteractionTagPrimary,\r\n TagGroup,\r\n} from '@fluentui/react-tags';\r\n\r\nimport { useSuggestionsStyles } from './styles';\r\n\r\nconst loadingSkeletonItemCount = 5;\r\n\r\nconst SuggestionLoadingSkeleton = () => {\r\n const classes = useSuggestionsStyles();\r\n return (\r\n \r\n {Array.from({ length: loadingSkeletonItemCount }).map((_, index) => (\r\n // eslint-disable-next-line react/no-array-index-key\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nconst SuggestionPanel = ({\r\n title,\r\n loading,\r\n className,\r\n suggestions,\r\n}) => {\r\n const classes = useSuggestionsStyles();\r\n\r\n if (!loading && (!suggestions || suggestions.length === 0)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n {title}\r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n {suggestions.map(suggestion => (\r\n \r\n {suggestion}\r\n \r\n ))}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nSuggestionPanel.propTypes = {\r\n className: PropTypes.string,\r\n loading: PropTypes.bool.isRequired,\r\n title: PropTypes.string.isRequired,\r\n suggestions: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nSuggestionPanel.defaultProps = {\r\n className: '',\r\n};\r\n\r\nexport const Suggestions = ({\r\n i18n,\r\n loading,\r\n descriptionSuggestions,\r\n shortHeadlinesSuggestions,\r\n longHeadlinesSuggestions,\r\n}) => {\r\n const classes = useSuggestionsStyles();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nSuggestions.propTypes = {\r\n loading: PropTypes.bool,\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n shortHeadlinesSuggestions: PropTypes.arrayOf(PropTypes.string),\r\n longHeadlinesSuggestions: PropTypes.arrayOf(PropTypes.string),\r\n descriptionSuggestions: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nSuggestions.defaultProps = {\r\n loading: false,\r\n shortHeadlinesSuggestions: [],\r\n longHeadlinesSuggestions: [],\r\n descriptionSuggestions: [],\r\n};\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useTaglinesStyles = makeStyles({\r\n body: {\r\n ...typographyStyles.body1,\r\n marginTop: tokens.spacingVerticalL,\r\n color: tokens.colorNeutralForeground1,\r\n },\r\n loading: {\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n loadingItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n marginBottom: tokens.spacingVerticalL,\r\n ...shorthands.gap(tokens.spacingHorizontalS, tokens.spacingHorizontalNone),\r\n },\r\n taglineItem: {\r\n display: 'flex',\r\n marginBottom: tokens.spacingVerticalL,\r\n alignItems: 'flex-start',\r\n justifyContent: 'space-between',\r\n ...shorthands.gap(tokens.spacingHorizontalS, tokens.spacingHorizontalNone),\r\n\r\n '& button:not(:disabled)': {\r\n '&:hover': {\r\n '& span': {\r\n color: `${tokens.colorPaletteRedBackground3} !important`,\r\n },\r\n },\r\n },\r\n },\r\n taglineItemInput: {\r\n display: 'flex',\r\n ...shorthands.flex(1),\r\n flexDirection: 'column',\r\n justifyContent: 'flex-end',\r\n\r\n '& span': {\r\n marginTop: tokens.spacingVerticalXXS,\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n },\r\n});\r\n","import PropTypes, { func } from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n Add20Regular,\r\n Delete24Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n Button,\r\n Input,\r\n mergeClasses,\r\n Skeleton,\r\n SkeletonItem,\r\n Text,\r\n useId,\r\n} from '@fluentui/react-components';\r\nimport { useTaglinesStyles } from './styles';\r\n\r\nconst TaglinesLoadingSkeleton = () => {\r\n const classes = useTaglinesStyles();\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\nconst TaglineItem = ({\r\n i18n,\r\n tagline,\r\n onChange,\r\n onDelete,\r\n isDeleteDisabled,\r\n maxAllowedCharacters,\r\n}) => {\r\n const classes = useTaglinesStyles();\r\n const inputId = useId('tagline-input');\r\n\r\n return (\r\n
\r\n \r\n onChange(ev.target.value)}\r\n />\r\n \r\n {i18n.getString(_TL_('{{a}} characters remaining'), {\r\n a: maxAllowedCharacters - tagline.length,\r\n })}\r\n \r\n
\r\n }\r\n disabled={isDeleteDisabled}\r\n onClick={onDelete}\r\n />\r\n \r\n );\r\n};\r\n\r\nTaglineItem.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n tagline: PropTypes.string,\r\n onChange: PropTypes.func,\r\n onDelete: PropTypes.func,\r\n isDeleteDisabled: PropTypes.bool,\r\n maxAllowedCharacters: PropTypes.number,\r\n};\r\n\r\nTaglineItem.defaultProps = {\r\n tagline: '',\r\n onChange: () => {},\r\n onDelete: () => {},\r\n isDeleteDisabled: false,\r\n maxAllowedCharacters: 30,\r\n};\r\n\r\nexport const Taglines = ({\r\n i18n,\r\n loading,\r\n taglines,\r\n onChangeTaglines,\r\n maxAllowedTaglines,\r\n maxAllowedCharactersPerTagline,\r\n}) => {\r\n const classes = useTaglinesStyles();\r\n\r\n const isAddTaglineButtonDisabled =\r\n taglines &&\r\n (taglines.some(tagline => !tagline.length) ||\r\n (maxAllowedTaglines && taglines.length >= maxAllowedTaglines));\r\n\r\n const handleAddTagline = () => {\r\n onChangeTaglines([...taglines, '']);\r\n };\r\n\r\n const handleDeleteTagline = (index) => {\r\n const newTaglines = [...taglines];\r\n newTaglines.splice(index, 1);\r\n onChangeTaglines(newTaglines);\r\n };\r\n\r\n const handleChangeTagline = (value, index) => {\r\n if (maxAllowedTaglines && taglines.length > maxAllowedTaglines) {\r\n return;\r\n }\r\n\r\n const newTaglines = [...taglines];\r\n newTaglines[index] = value.substring(0, maxAllowedCharactersPerTagline);\r\n onChangeTaglines(newTaglines);\r\n };\r\n\r\n return (\r\n
\r\n {loading ? (\r\n \r\n ) : (\r\n taglines.map((tagline, index) => (\r\n handleDeleteTagline(index)}\r\n maxAllowedCharacters={maxAllowedCharactersPerTagline}\r\n onChange={value => handleChangeTagline(value, index)}\r\n />\r\n ))\r\n )}\r\n }\r\n onClick={handleAddTagline}\r\n className=\"add-tagline-button\"\r\n disabled={loading || isAddTaglineButtonDisabled}\r\n >\r\n {i18n.getString(_TL_('Add Tagline'))}\r\n \r\n
\r\n );\r\n};\r\n\r\nTaglines.propTypes = {\r\n loading: PropTypes.bool,\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n taglines: PropTypes.arrayOf(PropTypes.string),\r\n maxAllowedTaglines: PropTypes.number,\r\n maxAllowedCharactersPerTagline: PropTypes.number,\r\n onChangeTaglines: PropTypes.func,\r\n};\r\n\r\nTaglines.defaultProps = {\r\n taglines: [''],\r\n loading: false,\r\n maxAllowedTaglines: undefined,\r\n maxAllowedCharactersPerTagline: 30,\r\n onChangeTaglines: () => {},\r\n};\r\n","export const defaultFonts = [\r\n {\r\n Label: _TL_('Long headline'),\r\n TextAssetType: 'LongHeadline',\r\n Typeface: '',\r\n Weight: '',\r\n helpTopic: 'pop_BA_Brand_LongHeadline',\r\n helpLabel: _TL_('Learn about long headlines'),\r\n },\r\n {\r\n Label: _TL_('Short headline'),\r\n TextAssetType: 'ShortHeadline',\r\n Typeface: '',\r\n Weight: '',\r\n helpTopic: 'pop_BA_Brand_ShortHeadline ',\r\n helpLabel: _TL_('Learn about short headlines'),\r\n },\r\n {\r\n Label: _TL_('Description'),\r\n TextAssetType: 'Description',\r\n Typeface: '',\r\n Weight: '',\r\n helpTopic: 'pop_BA_Brand_Description',\r\n helpLabel: _TL_('Learn about descriptions'),\r\n },\r\n {\r\n Label: _TL_('Call to action'),\r\n TextAssetType: 'CallToAction',\r\n Typeface: '',\r\n Weight: '',\r\n helpTopic: 'pop_BA_Brand_CTA',\r\n helpLabel: _TL_('Learn about calls to action'),\r\n },\r\n];\r\n\r\nexport const overrideFontWeights = [\r\n { key: 'Normal', text: _TL_('Normal') },\r\n { key: 'Bold', text: _TL_('Bold') },\r\n];\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useFontsSelectorStyles = makeStyles({\r\n sectionContainer: {\r\n marginTop: tokens.spacingVerticalL,\r\n },\r\n fontsContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: tokens.spacingVerticalXXL,\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n fontSelectContainer: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n columnGap: tokens.spacingHorizontalS,\r\n rowGap: tokens.spacingVerticalS,\r\n },\r\n fontSelect: {\r\n minWidth: '330px',\r\n },\r\n fontWeightSelect: {\r\n '& > input': {\r\n maxWidth: '100px',\r\n },\r\n },\r\n fontSelectContainerHeader: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.gap(tokens.spacingHorizontalS),\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport {\r\n Body1Strong,\r\n Body1Stronger,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport {\r\n FontsFamilySelector,\r\n FontsWeightSelector,\r\n fontFamilies,\r\n} from '@bingads-webui-campaign-react/fonts-selector';\r\n\r\nimport { defaultFonts, overrideFontWeights } from './constants';\r\nimport { useFontsSelectorStyles } from './styles';\r\n\r\nconst defaultFont = fontFamilies[0].key;\r\nconst defaultFontWeight = overrideFontWeights[0].key;\r\n\r\nconst FontSelector = ({\r\n id,\r\n i18n,\r\n font,\r\n onChangeFont,\r\n onChangeWeight,\r\n}) => {\r\n const classes = useFontsSelectorStyles();\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(font.label)}\r\n {font.helpTopic && (\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\nFontSelector.propTypes = {\r\n id: PropTypes.string,\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n font: PropTypes.shape({\r\n label: PropTypes.string,\r\n font: PropTypes.string,\r\n weight: PropTypes.string,\r\n helpTopic: PropTypes.string,\r\n helpLabel: PropTypes.string,\r\n }),\r\n onChangeFont: PropTypes.func,\r\n onChangeWeight: PropTypes.func,\r\n};\r\n\r\nFontSelector.defaultProps = {\r\n id: '',\r\n font: {\r\n label: '',\r\n font: '',\r\n weight: '',\r\n helpTopic: '',\r\n helpLabel: '',\r\n },\r\n onChangeFont: () => {},\r\n onChangeWeight: () => {},\r\n};\r\n\r\nexport const FontsSelector = ({\r\n i18n,\r\n fonts,\r\n onChangeFonts,\r\n}) => {\r\n const classes = useFontsSelectorStyles();\r\n\r\n const fontsToRender = defaultFonts.map((font) => {\r\n const foundFont = fonts.find(f => f.TextAssetType === font.TextAssetType);\r\n return foundFont\r\n ? {\r\n ...foundFont,\r\n Label: font.Label,\r\n helpTopic: font.helpTopic,\r\n helpLabel: font.helpLabel,\r\n }\r\n : font;\r\n });\r\n\r\n const handleChangeFont = (TextAssetType, selectedFont, key) => {\r\n const updatedFonts = fontsToRender.map((font) => {\r\n if (font.TextAssetType === TextAssetType) {\r\n return {\r\n ...font,\r\n Typeface: key === 'Typeface' ? selectedFont : font.Typeface || defaultFont,\r\n Weight: key === 'Weight' ? selectedFont : font.Weight || defaultFontWeight,\r\n };\r\n }\r\n return font;\r\n }).filter(font => font.Typeface && font.Weight);\r\n onChangeFonts(updatedFonts);\r\n };\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(_TL_('Choose the fonts that are associated with your brand.'))}\r\n \r\n
\r\n {fontsToRender.map(({\r\n Label,\r\n Weight,\r\n Typeface,\r\n helpTopic,\r\n helpLabel,\r\n TextAssetType,\r\n }) => (\r\n handleChangeFont(TextAssetType, font, 'Typeface')}\r\n onChangeWeight={weight => handleChangeFont(TextAssetType, weight, 'Weight')}\r\n />\r\n ))}\r\n
\r\n \r\n );\r\n};\r\n\r\nFontsSelector.propTypes = {\r\n fonts: PropTypes.shape(defaultFonts),\r\n onChangeFonts: PropTypes.func,\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n};\r\n\r\nFontsSelector.defaultProps = {\r\n fonts: defaultFonts,\r\n onChangeFonts: () => {},\r\n};\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles\r\n} from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n listPanel: {\r\n boxShadow: tokens.shadow4,\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n backgroundColor: tokens.colorNeutralBackground1,\r\n '& .card-header': {\r\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\r\n '& svg:first-child': {\r\n width: '24px',\r\n height: '24px',\r\n },\r\n },\r\n '& .card-title': {\r\n ...typographyStyles.subtitle2,\r\n },\r\n '& .list-body-header': {\r\n ...shorthands.margin('12px', 0),\r\n },\r\n },\r\n addBtn: {\r\n width: '94px',\r\n height: '94px',\r\n maxWidth: '94px',\r\n maxHeight: '94px',\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n ...shorthands.border(tokens.strokeWidthThin, 'dashed', '#C8C6C4'),\r\n },\r\n actionBtns: {\r\n display: 'flex',\r\n position: 'absolute',\r\n ...shorthands.gap('8px'),\r\n bottom: '10px',\r\n left: '50%',\r\n transform: 'translate(-50%, 0)',\r\n '& button': {\r\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\r\n backgroundColor: tokens.colorNeutralBackground1,\r\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\r\n },\r\n },\r\n list: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n ...shorthands.gap('8px'),\r\n '& .list-image': {\r\n width: 'auto',\r\n position: 'relative',\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n boxShadow: tokens.shadow4,\r\n '& img': {\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n height: '94px',\r\n },\r\n },\r\n },\r\n});\r\n\r\n\r\nexport const getSkeletonStyles = makeStyles({\r\n row: {\r\n display: 'flex',\r\n ...shorthands.gap('8px'),\r\n flexWrap: 'wrap',\r\n },\r\n item: {\r\n height: '94px',\r\n width: '94px',\r\n backgroundColor: tokens.colorNeutralStencil1,\r\n },\r\n});\r\n","import React, { useState } from 'react';\r\nimport { EditRegular, DeleteRegular } from '@fluentui/react-icons';\r\nimport { Image as FluentImage } from '@bingads-webui-react/fabric-control';\r\nimport { Button, tokens } from '@fluentui/react-components';\r\nimport { useStyles } from './style';\r\nimport { IList } from './type';\r\n\r\nexport const ListItem = React.memo(({\r\n onEdit, onRemove, imageData, index, showEditBtn,\r\n}: IList) => {\r\n const classes = useStyles();\r\n const [showActionBtn, setShowActionBtn] = useState(false);\r\n const onMouseEnter = () => {\r\n setShowActionBtn(true);\r\n };\r\n const onMouseLeave = () => {\r\n setShowActionBtn(false);\r\n };\r\n const onKeyDown = (e) => {\r\n if (e.key === 'Enter' || e.key === ' ') {\r\n onMouseEnter();\r\n }\r\n };\r\n return (\r\n \r\n \r\n {showActionBtn && (\r\n
\r\n {showEditBtn && (\r\n }\r\n data-idx={index}\r\n size=\"medium\"\r\n className=\"edit_btn\"\r\n onClick={onEdit}\r\n />\r\n )}\r\n }\r\n data-idx={index}\r\n size=\"medium\"\r\n className=\"del_btn\"\r\n onClick={onRemove}\r\n />\r\n
\r\n )}\r\n \r\n );\r\n});\r\n","/* istanbul ignore file */\r\nimport React, { useMemo } from 'react';\r\nimport {\r\n FormCardDefaultHeader,\r\n FormCardBody,\r\n FormCard,\r\n} from '@bingads-webui-fluent-component/form-cards';\r\nimport { AddRegular } from '@fluentui/react-icons';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { Button, mergeClasses, Body1Strong, Skeleton, SkeletonItem } from '@fluentui/react-components';\r\nimport { useStyles, getSkeletonStyles } from './style';\r\nimport { ListItem } from './ListItem';\r\nimport { IListPanel } from './type';\r\n\r\nconst ListSkeleton = ({ maxCount }: { maxCount: number }) => {\r\n const classes = getSkeletonStyles();\r\n return (\r\n \r\n {Array(maxCount).fill('').map(() => )}\r\n \r\n );\r\n};\r\n\r\nexport const ListPanel = React.memo(({\r\n title,\r\n subTitle,\r\n text,\r\n errorMessage = '',\r\n images = [],\r\n isLoading,\r\n maxCount,\r\n showEditBtn = false,\r\n headerProps = {},\r\n helpTopic = '',\r\n helpLabel = '',\r\n onAdd,\r\n onEdit,\r\n onRemove,\r\n}: IListPanel) => {\r\n const classes = useStyles();\r\n\r\n let displayedImages = images;\r\n if (displayedImages && maxCount && maxCount < images.length) {\r\n displayedImages = images.slice(0, maxCount);\r\n }\r\n\r\n const renderHelpBubble = useMemo(() => (\r\n <>\r\n {helpTopic && }\r\n \r\n ), [helpLabel, helpTopic]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n {subTitle}\r\n {text &&

{text}

}\r\n
\r\n {isLoading ?\r\n :\r\n
\r\n {displayedImages.map((data, idx) => (\r\n \r\n ))}\r\n {displayedImages?.length < maxCount && }\r\n key=\"add_list\"\r\n onClick={onAdd}\r\n className={mergeClasses(classes.addBtn, 'add_button')}\r\n />}\r\n
\r\n }\r\n
\r\n
\r\n );\r\n});\r\n","import PropTypes, { func } from 'prop-types';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport {\r\n Button,\r\n makeStyles,\r\n shorthands,\r\n mergeClasses,\r\n Body1,\r\n Field,\r\n RadioGroup,\r\n Radio,\r\n Checkbox,\r\n tokens,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport { AdsStudioPanelContainer, ClarityTags, useClarityTags } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ImageCropWithBoundingBox } from '@bingads-webui-campaign-react/image-crop-with-bounding-box';\r\n\r\nconst useStyles = makeStyles({\r\n buttonWrapper: {\r\n ...shorthands.padding('16px', '24px', '24px'),\r\n },\r\n button: {\r\n minWidth: 'auto',\r\n ...shorthands.padding('6px', '12px'),\r\n marginRight: '6px',\r\n },\r\n aspectRatio: {\r\n marginTop: tokens.spacingVerticalXXL,\r\n },\r\n background: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n imageEditorContainer: {\r\n display: 'flex',\r\n marginTop: tokens.spacingVerticalXXL,\r\n marginBottom: tokens.spacingVerticalXXL,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n backgroundColor: 'rgba(129, 129, 129, 0.20)',\r\n boxShadow: tokens.shadow2,\r\n\r\n '& .cropper-sub-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n spinner: {\r\n height: '400px',\r\n },\r\n});\r\n\r\nconst MaxCropHeight = 600;\r\n\r\nconst LogoFormat = {\r\n square: 'square',\r\n landscape: 'landscape',\r\n};\r\n\r\nexport const BrandKitLogoEditPanel = ({\r\n i18n,\r\n isOpen,\r\n dismiss,\r\n format,\r\n minLogoSize,\r\n lightBackground,\r\n hasLandScapeLimit,\r\n hasSquareLimit,\r\n showBackgroundSettings,\r\n darkBackground,\r\n image,\r\n cropSettings,\r\n onChange,\r\n}) => {\r\n const classes = useStyles();\r\n const [aspectRatio, setAspectRatio] = React.useState(format);\r\n const [useInLightBackground, setUseInLightBackground] = React.useState(lightBackground);\r\n const [useInDarkBackground, setUseInDarkBackground] = React.useState(darkBackground);\r\n const [currentCropSettings, setCurrentCropSettings] = React.useState(cropSettings);\r\n const MinLogoSize = minLogoSize || 128;\r\n const maxCropHeight = useMemo(() => {\r\n if (image) {\r\n return Math.min(image.Height, MaxCropHeight);\r\n }\r\n return MaxCropHeight;\r\n }, [image]);\r\n\r\n const landscapeEnabled = useMemo(() => {\r\n if (image) {\r\n return image.Width >= MinLogoSize * 4;\r\n }\r\n if (format === LogoFormat.landscape || hasLandScapeLimit) {\r\n return true;\r\n }\r\n return false;\r\n }, [MinLogoSize, format, hasLandScapeLimit, image]);\r\n\r\n const sqaureEnabled = useMemo(() => {\r\n if (format === LogoFormat.square || hasSquareLimit) {\r\n return true;\r\n }\r\n return false;\r\n }, [format, hasSquareLimit]);\r\n\r\n const isValid = useMemo(\r\n () => !showBackgroundSettings || useInLightBackground || useInDarkBackground,\r\n [showBackgroundSettings, useInLightBackground, useInDarkBackground]\r\n );\r\n\r\n const updateAspectRation = useCallback((value) => {\r\n if (value === LogoFormat.landscape) {\r\n if ((currentCropSettings.SourceX + (currentCropSettings.SourceWidth * 4)) < image.Width) {\r\n setCurrentCropSettings({\r\n ...currentCropSettings,\r\n SourceWidth: currentCropSettings.SourceHeight * 4,\r\n });\r\n } else if ((currentCropSettings.SourceWidth * 4) < image.Width) {\r\n setCurrentCropSettings({\r\n ...currentCropSettings,\r\n SourceWidth: currentCropSettings.SourceHeight * 4,\r\n SourceX: image.Width - (currentCropSettings.SourceHeight * 4),\r\n });\r\n } else {\r\n const height = Math.floor(image.Width / 4);\r\n setCurrentCropSettings({\r\n ...currentCropSettings,\r\n SourceX: 0,\r\n SourceWidth: height * 4,\r\n SourceHeight: height,\r\n });\r\n }\r\n } else {\r\n setCurrentCropSettings({\r\n ...currentCropSettings,\r\n SourceWidth: currentCropSettings.SourceHeight,\r\n });\r\n }\r\n setAspectRatio(value);\r\n }, [setAspectRatio, currentCropSettings, setCurrentCropSettings, image]);\r\n\r\n useClarityTags([\r\n ClarityTags.LaunchedAdsStudio,\r\n ClarityTags.EditBrandKitLogo,\r\n ]);\r\n\r\n const onRenderFooterContent = useCallback(() => (\r\n
\r\n onChange({\r\n cropSettings: currentCropSettings,\r\n lightBackground: useInLightBackground,\r\n darkBackground: useInDarkBackground,\r\n aspectRatio,\r\n })}\r\n >\r\n {i18n.getString(_TL_('Update logo'))}\r\n \r\n \r\n
\r\n ), [\r\n classes.buttonWrapper,\r\n classes.button,\r\n i18n,\r\n dismiss,\r\n image,\r\n isValid,\r\n onChange,\r\n currentCropSettings,\r\n useInLightBackground,\r\n useInDarkBackground,\r\n aspectRatio]);\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(_TL_('Customize how your logo looks across potential placements.'))}\r\n \r\n
\r\n \r\n updateAspectRation(data.value)}>\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {image ?\r\n \r\n : }\r\n
\r\n {showBackgroundSettings &&
\r\n \r\n {i18n.getString(_TL_('What type of backgrounds should this logo be used with?'))}\r\n \r\n setUseInLightBackground(data.checked)}\r\n label={i18n.getString(_TL_('Light background'))}\r\n />\r\n setUseInDarkBackground(data.checked)}\r\n label={i18n.getString(_TL_('Dark background'))}\r\n />\r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nBrandKitLogoEditPanel.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n dismiss: PropTypes.func.isRequired,\r\n hasLandScapeLimit: PropTypes.bool,\r\n minLogoSize: PropTypes.number,\r\n hasSquareLimit: PropTypes.bool,\r\n format: PropTypes.string.isRequired,\r\n lightBackground: PropTypes.bool.isRequired,\r\n showBackgroundSettings: PropTypes.bool,\r\n darkBackground: PropTypes.bool.isRequired,\r\n image: PropTypes.shape({ Height: PropTypes.number, Width: PropTypes.number }),\r\n cropSettings: PropTypes.shape({\r\n SourceX: PropTypes.number,\r\n SourceY: PropTypes.number,\r\n SourceWidth: PropTypes.number,\r\n SourceHeight: PropTypes.number,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n\r\nBrandKitLogoEditPanel.defaultProps = {\r\n image: null,\r\n minLogoSize: 128,\r\n hasLandScapeLimit: true,\r\n hasSquareLimit: true,\r\n showBackgroundSettings: false,\r\n};\r\n\r\n","/* istanbul ignore file */\r\nimport { getCenterCroppedSettings } from '@bingads-webui-campaign/image-experience-utils';\r\nimport _ from 'underscore';\r\n\r\nconst logoTypeLimit = 5;\r\nexport const duplicateImagesValidation = (data, elementType) => {\r\n let hasDuplicateError = false;\r\n let imageAsset = data.images;\r\n if (elementType === 'logo') {\r\n imageAsset = data.logos;\r\n }\r\n const filterImagesAsset = imageAsset.filter((imageData, index) => {\r\n const isDuplicate = imageAsset.findIndex(image => imageData.Url === image.Url) !== index;\r\n if (isDuplicate) {\r\n hasDuplicateError = true;\r\n return false;\r\n }\r\n return true;\r\n });\r\n return {\r\n hasDuplicateError,\r\n data: elementType === 'logo' ? { logos: filterImagesAsset } : { images: filterImagesAsset },\r\n };\r\n};\r\n\r\nexport const imageMinSizeValidation = (data, minSizeConfig, elementType) => {\r\n let hasError = false;\r\n let imageAsset = data.images;\r\n if (elementType === 'logo') {\r\n imageAsset = data.logos;\r\n }\r\n\r\n const filterImagesAsset = imageAsset.filter((imageData) => {\r\n const width = _.get(imageData, 'width') || _.get(imageData, 'image.width') || _.get(imageData, 'CropWidth');\r\n const height = _.get(imageData, 'height') || _.get(imageData, 'image.height') || _.get(imageData, 'CropHeight');\r\n if (Array.isArray(minSizeConfig) && ((minSizeConfig[0] && (width < minSizeConfig[0])) || (minSizeConfig[1] && (height < minSizeConfig[1])))) {\r\n hasError = true;\r\n return false;\r\n }\r\n return true;\r\n });\r\n return {\r\n hasError,\r\n data: elementType === 'logo' ? { logos: filterImagesAsset } : { images: filterImagesAsset },\r\n };\r\n};\r\n\r\nexport const processImageAssetPayload = ({ images, elementType, data }) => {\r\n if (elementType === 'logo') {\r\n // crop images to square and landscape\r\n let squareLogoCount = data.filter(logo => logo.ImageType === 'square').length;\r\n const logos = [];\r\n images.forEach((imageData) => {\r\n const squareSettings = getCenterCroppedSettings({\r\n SourceWidth: _.get(imageData, 'width') || _.get(imageData, 'image.width'),\r\n SourceHeight: _.get(imageData, 'height') || _.get(imageData, 'image.height'),\r\n SourceX: 0,\r\n SourceY: 0,\r\n }, 1);\r\n const landScapeSettings = getCenterCroppedSettings({\r\n SourceWidth: _.get(imageData, 'width') || _.get(imageData, 'image.width'),\r\n SourceHeight: _.get(imageData, 'height') || _.get(imageData, 'image.height'),\r\n SourceX: 0,\r\n SourceY: 0,\r\n }, 4);\r\n\r\n let cropSettings = squareSettings;\r\n let logoType = 'square';\r\n\r\n if ((squareLogoCount === logoTypeLimit) ||\r\n (landScapeSettings.SourceWidth * landScapeSettings.SourceHeight > squareSettings.SourceWidth * squareSettings.SourceHeight)) {\r\n logoType = 'landscape';\r\n cropSettings = landScapeSettings;\r\n } else {\r\n squareLogoCount += 1;\r\n }\r\n\r\n logos.push({\r\n Id: _.get(imageData, 'id') || _.get(imageData, 'image.id'),\r\n CropX: cropSettings.SourceX,\r\n CropY: cropSettings.SourceY,\r\n CropWidth: cropSettings.SourceWidth,\r\n CropHeight: cropSettings.SourceHeight,\r\n Name: null,\r\n Url: _.get(imageData, 'src') || _.get(imageData, 'image.src'),\r\n Type: 'ImageAsset',\r\n SubType: null,\r\n ImageType: logoType,\r\n });\r\n });\r\n\r\n return {\r\n logos: [\r\n ...data,\r\n ...logos,\r\n ],\r\n };\r\n }\r\n\r\n // we are not cropping images\r\n return {\r\n images: [\r\n ...data,\r\n ...images.map(imageData => ({\r\n Id: _.get(imageData, 'id') || _.get(imageData, 'image.id'),\r\n Url: _.get(imageData, 'src') || _.get(imageData, 'image.src'),\r\n CropX: 0,\r\n CropY: 0,\r\n CropWidth: _.get(imageData, 'width') || _.get(imageData, 'image.width'),\r\n CropHeight: _.get(imageData, 'height') || _.get(imageData, 'image.height'),\r\n Name: null,\r\n Type: 'ImageAsset',\r\n SubType: null,\r\n }))],\r\n };\r\n};\r\n","/* istanbul ignore file */\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport { getImageDetailAsync } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { useImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { UploadImage } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { CSMLAssetSource } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport PropTypes from 'prop-types';\r\nimport { ListPanel } from '../list-panel';\r\nimport { BrandKitLogoEditPanel } from '../logo-edit-panel';\r\nimport { duplicateImagesValidation, imageMinSizeValidation, processImageAssetPayload } from './process-image-asset-payload';\r\n// import { BrandKitImageEditPanel } from '../image-edit-panel';\r\n\r\nexport const ImageListElement = React.memo(({\r\n data,\r\n title,\r\n i18n,\r\n maxLimit,\r\n maxCount,\r\n isLoading,\r\n maxSquareLogosLimit,\r\n maxLandscapeLogosLimit,\r\n elementType,\r\n subTitle,\r\n text,\r\n contentBefore,\r\n preferenceService,\r\n permissions,\r\n serverContext,\r\n aid,\r\n cid,\r\n panelTitle,\r\n panelSubtitle,\r\n showEditBtn,\r\n oDataConfig,\r\n perfMarker,\r\n updateOrCreateBrandKit,\r\n helpTopic,\r\n helpLabel,\r\n}) => {\r\n const [openLogoEditPanel, setOpenLogoEditPanel] = React.useState(false);\r\n const [selectedImageIdx, setSelectedImageIdx] = React.useState(0);\r\n const [errorMessage, setErrorMessage] = React.useState('');\r\n const {\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n } = useImagePicker();\r\n const clearErrorMessage = useCallback(() => {\r\n setErrorMessage('');\r\n }, []);\r\n const minSizeConfig = constants.brandkitMinSize;\r\n const selectedImage = useMemo(() => data[selectedImageIdx] || {}, [data, selectedImageIdx]);\r\n const openImageEditPanel = useCallback((idx) => {\r\n setSelectedImageIdx(idx);\r\n if (elementType === 'logo') {\r\n setOpenLogoEditPanel(true);\r\n }\r\n clearErrorMessage();\r\n }, [clearErrorMessage, elementType]);\r\n const onEditImage = useCallback((ev) => {\r\n const { idx } = ev.currentTarget.dataset;\r\n const index = Number(idx);\r\n if (data && data[index]) {\r\n if (data[index].Width && data[index].Height) {\r\n openImageEditPanel(index);\r\n return;\r\n }\r\n const fullUrl = data[index].Url;\r\n getImageDetailAsync(fullUrl).then(({ naturalWidth, naturalHeight }) => {\r\n const newData = data;\r\n newData[index].Width = naturalWidth;\r\n newData[index].Height = naturalHeight;\r\n openImageEditPanel(index);\r\n });\r\n }\r\n }, [data, openImageEditPanel]);\r\n const onAddImage = useCallback(() => {\r\n setDisplayImagePicker(true);\r\n clearErrorMessage();\r\n }, [clearErrorMessage, setDisplayImagePicker]);\r\n const onRemoveImage = (ev) => {\r\n const { idx } = ev.currentTarget.dataset;\r\n let key = 'images';\r\n if (elementType === 'logo') {\r\n key = 'logos';\r\n }\r\n updateOrCreateBrandKit({\r\n [key]: data.filter((_, i) => i !== Number(idx)),\r\n });\r\n clearErrorMessage();\r\n };\r\n\r\n const closeLogoEditPanel = useCallback(() => {\r\n setOpenLogoEditPanel(false);\r\n }, []);\r\n const onSelectImages = useCallback((imageData) => {\r\n const payload = processImageAssetPayload({ images: imageData, elementType, data });\r\n const { hasError } = imageMinSizeValidation(payload, minSizeConfig, elementType);\r\n const { data: imageAsset, hasDuplicateError } = duplicateImagesValidation(payload, elementType);\r\n if (hasError) {\r\n setErrorMessage(_TL_('Image does not meet the minimum pixel requirements for this placement.'));\r\n } else if (hasDuplicateError) {\r\n setErrorMessage(_TL_('Image is duplicate'));\r\n } else { clearErrorMessage(); }\r\n updateOrCreateBrandKit(imageAsset);\r\n }, [clearErrorMessage, data, elementType, minSizeConfig, updateOrCreateBrandKit]);\r\n\r\n const onApplyEditLogo = useCallback((image) => {\r\n if (image && image.cropSettings) {\r\n const newData = data;\r\n newData[selectedImageIdx].CropX = image.cropSettings.SourceX;\r\n newData[selectedImageIdx].CropY = image.cropSettings.SourceY;\r\n newData[selectedImageIdx].CropWidth = image.cropSettings.SourceWidth;\r\n newData[selectedImageIdx].CropHeight = image.cropSettings.SourceHeight;\r\n newData[selectedImageIdx].ImageType = image.aspectRatio;\r\n updateOrCreateBrandKit({\r\n logos: data,\r\n });\r\n }\r\n closeLogoEditPanel();\r\n }, [closeLogoEditPanel, data, selectedImageIdx, updateOrCreateBrandKit]);\r\n\r\n const cropSettings = useMemo(() => ({\r\n SourceX: selectedImage.CropX,\r\n SourceY: selectedImage.CropY,\r\n SourceWidth: selectedImage.CropWidth,\r\n SourceHeight: selectedImage.CropHeight,\r\n }), [selectedImage]);\r\n\r\n return (\r\n <>\r\n \r\n {displayImagePicker && (\r\n \r\n )}\r\n {openLogoEditPanel && (\r\n 0}\r\n hasSquareLimit={maxSquareLogosLimit > 0}\r\n isOpen={openLogoEditPanel}\r\n dismiss={closeLogoEditPanel}\r\n image={selectedImage}\r\n format={selectedImage.ImageType}\r\n onChange={onApplyEditLogo}\r\n cropSettings={cropSettings}\r\n />\r\n )}\r\n {/* { openImageEditPanel &&\r\n \r\n } */}\r\n \r\n );\r\n});\r\n\r\n\r\nImageListElement.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})),\r\n title: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n subTitle: PropTypes.string.isRequired,\r\n text: PropTypes.string,\r\n maxLimit: PropTypes.number,\r\n panelTitle: PropTypes.string,\r\n panelSubtitle: PropTypes.string,\r\n contentBefore: PropTypes.element.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n updateOrCreateBrandKit: PropTypes.func.isRequired,\r\n elementType: PropTypes.oneOf(['logo', 'image']).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n maxSquareLogosLimit: PropTypes.number,\r\n maxLandscapeLogosLimit: PropTypes.number,\r\n cid: PropTypes.number.isRequired,\r\n maxCount: PropTypes.number.isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}),\r\n showEditBtn: PropTypes.bool,\r\n helpTopic: PropTypes.string,\r\n helpLabel: PropTypes.string,\r\n};\r\n\r\nImageListElement.defaultProps = {\r\n serverContext: {},\r\n data: [],\r\n text: '',\r\n maxSquareLogosLimit: 5,\r\n maxLandscapeLogosLimit: 5,\r\n panelTitle: '',\r\n panelSubtitle: '',\r\n maxLimit: 10,\r\n showEditBtn: true,\r\n helpTopic: '',\r\n helpLabel: '',\r\n};\r\n","import React, {\r\n createContext,\r\n useContext,\r\n} from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { reducer } from './reducer';\r\n\r\n\r\nexport const BrandKitContext = createContext(null);\r\nexport const useBrandKitContext = () => useContext(BrandKitContext);\r\n\r\nexport function BrandKitProvider({\r\n children,\r\n}) {\r\n const [state, dispatch] = React.useReducer(reducer, {\r\n });\r\n const context = {\r\n state,\r\n dispatch,\r\n };\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nBrandKitProvider.displayName = 'BrandKitProvider';\r\nBrandKitProvider.propTypes = {\r\n children: PropTypes.node.isRequired,\r\n};\r\n\r\n\r\nexport function withBrandKitContext(Component) {\r\n return props => (\r\n \r\n \r\n \r\n );\r\n}\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles\r\n} from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n contentPanel: {\r\n minHeight: '75px',\r\n boxShadow: tokens.shadow4,\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n backgroundColor: tokens.colorNeutralBackground1,\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .card-header': {\r\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\r\n '& svg:first-child': {\r\n width: '24px',\r\n height: '24px',\r\n },\r\n },\r\n '& h3': {\r\n ...typographyStyles.body1Strong,\r\n marginTop: tokens.spacingVerticalXL,\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n '& p': {\r\n ...typographyStyles.body1,\r\n marginTop: '0px',\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n },\r\n contentPanelTitle: {\r\n ...typographyStyles.body1Strong,\r\n marginTop: tokens.spacingVerticalXL,\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n contentPanelSubtitle: {\r\n ...typographyStyles.body1,\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n contentPanelHeader: {\r\n lineHeight: tokens.lineHeightBase300,\r\n marginTop: tokens.spacingVerticalXL,\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n contentPanelSubheader: {\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n});\r\n\r\nexport const getSkeletonStyles = makeStyles({\r\n row: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginTop: tokens.spacingVerticalL,\r\n ...shorthands.gap(tokens.spacingVerticalS),\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport {\r\n FormCardDefaultHeader,\r\n FormCardBody,\r\n FormCard,\r\n} from '@bingads-webui-fluent-component/form-cards';\r\nimport { mergeClasses, Skeleton, SkeletonItem } from '@fluentui/react-components';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { useStyles, getSkeletonStyles } from './style';\r\nimport { IContentPanel } from './type';\r\n\r\nconst SegmentSkeleton = ({ lineCount }: { lineCount: number }) => {\r\n const classes = getSkeletonStyles();\r\n\r\n return (\r\n \r\n {Array(lineCount).fill('').map(() => )}\r\n \r\n );\r\n};\r\n\r\nexport const ContentPanel = React.memo(({\r\n title,\r\n bodyContent,\r\n isLoading,\r\n lineCount = 3,\r\n error,\r\n headerProps = {},\r\n helpTopic = '',\r\n helpLabel = '',\r\n}: IContentPanel) => {\r\n const classes = useStyles();\r\n\r\n const renderHelpBubble = useMemo(() => (\r\n <>\r\n {helpTopic && }\r\n \r\n ), [helpLabel, helpTopic]);\r\n\r\n return (\r\n \r\n \r\n \r\n {isLoading ?\r\n :\r\n <>\r\n {bodyContent}\r\n \r\n }\r\n \r\n \r\n );\r\n});\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n brandVoiceSegment: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n brandPersonalityTextarea: {\r\n background: 'salmon',\r\n width: '100%',\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n paddingBottom: '6px',\r\n paddingTop: '6px',\r\n ...shorthands.overflow('hidden'),\r\n '& textarea': {\r\n minHeight: '100px',\r\n },\r\n },\r\n brandToneInput: {\r\n maxWidth: '400px',\r\n },\r\n brandToneCaption: {\r\n marginTop: tokens.spacingVerticalXS,\r\n },\r\n brandPersonalityTagGroup: {\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n brandToneAccordion: {\r\n marginTop: tokens.spacingVerticalMNudge,\r\n },\r\n});\r\n","/* istanbul ignore file */\r\nimport React, { useCallback, useContext } from 'react';\r\nimport {\r\n Accordion,\r\n AccordionItem,\r\n AccordionHeader,\r\n AccordionPanel,\r\n Button,\r\n Caption1,\r\n Text,\r\n Textarea,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\nimport { Tag, TagGroup } from '@fluentui/react-tags';\r\nimport {\r\n TagPicker,\r\n TagPickerControl,\r\n TagPickerInput,\r\n TagPickerList,\r\n TagPickerOption,\r\n} from '@fluentui/react-tag-picker';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n AddRegular,\r\n AddSquareRegular,\r\n ArrowClockwiseRegular,\r\n InfoRegular,\r\n MicSparkleRegular,\r\n TextFontRegular,\r\n} from '@fluentui/react-icons';\r\nimport { Taglines } from './components';\r\nimport { BrandKitContext } from './context';\r\nimport { ContentPanel } from './content-panel/index';\r\nimport { useStyles } from './styles/brand-voice-styles';\r\nimport { actionTypes } from './reducer';\r\n\r\nexport const BrandVoice = () => {\r\n const classes = useStyles();\r\n const i18n = useContext(I18nContext);\r\n const { state, dispatch } = useContext(BrandKitContext);\r\n\r\n const {\r\n taglines,\r\n } = state || {};\r\n\r\n const [brandVoice, setBrandVoice] = React.useState('');\r\n const [selectedOptions, setSelectedOptions] = React.useState([]);\r\n const [inputValue, setInputValue] = React.useState('');\r\n const [mockCopilotSuggestionIndexes, setMockCopilotSuggestionIndexes] = React.useState([1, 2, 3]);\r\n\r\n const handleUpdateTaglines = useCallback((updatedTaglines) => {\r\n dispatch({\r\n type: actionTypes.updateTaglines,\r\n payload: updatedTaglines,\r\n });\r\n }, [dispatch]);\r\n\r\n const handleSetBrandVoice = e => setBrandVoice(e.target.value);\r\n\r\n const handleAddSelectedOptions = useCallback((e) => {\r\n if (e.key === 'Enter') {\r\n return;\r\n }\r\n setSelectedOptions(options => [...new Set([...options, e.target.innerText])]);\r\n }, []);\r\n\r\n const handleRemoveSelectedOption = (e, { value }) => {\r\n setSelectedOptions(options => [...options].filter(tag => tag !== value));\r\n };\r\n\r\n const handleChange = e => setInputValue(e.currentTarget.value);\r\n\r\n const handleKeyDown = useCallback((e) => {\r\n if (e.key === 'Enter' && inputValue) {\r\n setSelectedOptions(options => [...new Set([...options, inputValue.trim()])]);\r\n setInputValue('');\r\n }\r\n }, [inputValue]);\r\n\r\n // TODO: Temporary, replace with real Copilot suggestions\r\n const mockCopilotToneSuggestions = [\r\n 'Empathetic',\r\n 'Inclusive',\r\n 'Hopeful',\r\n 'Professional',\r\n 'Mindful',\r\n 'Collaborative',\r\n 'Considerate',\r\n 'Positive',\r\n ];\r\n\r\n // TODO: Temporary, remove and replace, this was just a fun way to get some random mock suggestions\r\n const refreshMockCopilotSuggestions = () => {\r\n const numbers = [];\r\n while (numbers.length < 3) {\r\n const randomNumber = Math.floor(Math.random() * mockCopilotToneSuggestions.length);\r\n if (!numbers.includes(randomNumber)) {\r\n numbers.push(randomNumber);\r\n }\r\n }\r\n setMockCopilotSuggestionIndexes(numbers);\r\n };\r\n\r\n const brandPersonalityPlaceholder = i18n.getString(_TL_('Cara is a compassionate organization, deeply caring and empathetic, driven by a mission to improve healthcare for underserved communities. As a trustworthy Medical NGO, Cara is dependable and transparent, fostering trust through action and accountability'));\r\n\r\n const brandVoiceBody = () => (\r\n
\r\n
\r\n {i18n.getString(_TL_('Brand Personality'))}\r\n {i18n.getString(_TL_(\"How would you describe your brand's personality?\"))}\r\n \r\n
\r\n
\r\n {i18n.getString(_TL_('Brand Tone'))}\r\n {i18n.getString(_TL_('How would you describe your brand voice in keywords?'))}\r\n {selectedOptions.length > 0 && (\r\n
\r\n \r\n {\r\n selectedOptions.length > 0 &&\r\n selectedOptions.map(option => (\r\n \r\n {option}\r\n \r\n ))\r\n }\r\n \r\n
\r\n )}\r\n \r\n }>\r\n \r\n \r\n \r\n {mockCopilotToneSuggestions.length ? (\r\n mockCopilotToneSuggestions.map(option => (\r\n \r\n {option}\r\n \r\n ))\r\n ) : (\r\n \r\n {i18n.getString(_TL_('No options available'))}\r\n \r\n )}\r\n \r\n \r\n {i18n.getString(_TL_('Type desired tag and press enter to add'))}\r\n
\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('More tone suggestions from Copilot'))}\r\n \r\n \r\n \r\n {mockCopilotSuggestionIndexes.map(index => (\r\n }\r\n size=\"medium\"\r\n >\r\n {mockCopilotToneSuggestions[index]}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n );\r\n\r\n const taglinesBody = () => (\r\n \r\n );\r\n\r\n return (\r\n
\r\n , contentAfter: }}\r\n bodyContent={brandVoiceBody()}\r\n />\r\n , contentAfter: }}\r\n bodyContent={taglinesBody()}\r\n />\r\n
\r\n );\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useBrandKitPageStyle = makeStyles({\r\n brandKitPage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n brandElements: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n});\r\n","import React, {\r\n useCallback,\r\n useContext,\r\n} from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ImageRegular,\r\n TextFontRegular,\r\n} from '@fluentui/react-icons';\r\nimport { ColorPicker } from '@bingads-webui-campaign-react/ads-color-picker';\r\nimport { EntryCardSVGIcons } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { actionTypes } from './reducer';\r\nimport { BrandKitContext } from './context';\r\nimport { ContentPanel } from './content-panel';\r\nimport { useBrandKitPageStyle } from './styles';\r\nimport { BrandKitImageListElement, BrandKitFontsSelector } from './components';\r\n\r\nconst MAX_SQUARE_LOGOS = 5;\r\nconst MAX_LANDSCAPE_LOGOS = 5;\r\nconst MAX_IMAGES = 15;\r\nexport const BrandElements = ({\r\n i18n,\r\n preferenceService,\r\n serverContext,\r\n aid,\r\n loading,\r\n cid,\r\n oDataConfig,\r\n fetchBrandKitData,\r\n perfMarker,\r\n permissions,\r\n brandKitDataService,\r\n}) => {\r\n const { state, dispatch } = useContext(BrandKitContext);\r\n const classes = useBrandKitPageStyle();\r\n const {\r\n id,\r\n brandkitName,\r\n fonts = [],\r\n images = [],\r\n logos = [],\r\n palettes = [],\r\n squareLogosCount,\r\n landscapeLogosCount,\r\n } = state || {};\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n const updateOrCreateBrandKit = useCallback(async (brandKit) => {\r\n if (!id) {\r\n const { error } = await brandKitDataService.createBrandKits(aid, [{\r\n brandkitName: 'Brandkit',\r\n ...brandKit,\r\n },\r\n ]);\r\n if (error) {\r\n // throw new error('Error while creating brandkit');\r\n return;\r\n }\r\n fetchBrandKitData();\r\n return;\r\n }\r\n const { error } = await brandKitDataService.updateBrandKit(aid, [{\r\n id,\r\n brandkitName,\r\n ...brandKit,\r\n }]);\r\n if (error) {\r\n // throw new error('Error while updating brandkit');\r\n return;\r\n }\r\n fetchBrandKitData();\r\n }, [id, brandKitDataService, fonts, brandkitName, images, logos, palettes, fetchBrandKitData, aid]);\r\n\r\n\r\n const onUpdateColor = useCallback((colorId, colorObj) => {\r\n if (colorId === '') {\r\n // ADD\r\n palettes.push({ Name: colorObj.str, HexCode: colorObj.str, Type: '' });\r\n updateOrCreateBrandKit({ palettes });\r\n return;\r\n }\r\n // EDIT\r\n const updatePalette = palettes.map((palette) => {\r\n if (palette.Name === colorId) {\r\n return { Name: colorObj.str, HexCode: colorObj.str, Type: '' };\r\n }\r\n return palette;\r\n });\r\n updateOrCreateBrandKit({ palettes: updatePalette });\r\n }, [palettes, updateOrCreateBrandKit]);\r\n const onDeleteColor = useCallback((ev) => {\r\n const { colorid } = ev.currentTarget.dataset;\r\n if (colorid === '') {\r\n return;\r\n }\r\n const updatePalette = palettes.filter(palette => palette.Name !== colorid);\r\n updateOrCreateBrandKit({ palettes: updatePalette });\r\n }, [palettes, updateOrCreateBrandKit]);\r\n\r\n const onUpdateFonts = useCallback((updatedFonts) => {\r\n dispatch({\r\n type: actionTypes.updateFonts,\r\n payload: updatedFonts,\r\n });\r\n updateOrCreateBrandKit({ fonts: updatedFonts });\r\n }, [dispatch, updateOrCreateBrandKit]);\r\n\r\n const totalLogosCount = MAX_LANDSCAPE_LOGOS + MAX_SQUARE_LOGOS;\r\n const maxLogosLimit = logos ? totalLogosCount - logos.length : totalLogosCount;\r\n const maxImagesLimit = images ? MAX_IMAGES - images.length : MAX_IMAGES;\r\n const maxSquareLogosLimit = squareLogosCount ? MAX_SQUARE_LOGOS - squareLogosCount : MAX_SQUARE_LOGOS;\r\n const maxLandscapeLogosLimit = landscapeLogosCount ? MAX_LANDSCAPE_LOGOS - landscapeLogosCount : MAX_LANDSCAPE_LOGOS;\r\n\r\n return (\r\n \r\n }\r\n title={i18n.getString(_TL_('Logos'))}\r\n panelSubtitle={_TL_(\"You can create assets, choose assets you've already uploaded to Ads Studio, or browse to add a new file.\")}\r\n subTitle={i18n.getString(_TL_('You can add up to five logos with a 1:1 aspect ratio and five logos with a 4:1 aspect ratio.'))}\r\n maxLimit={maxLogosLimit}\r\n maxSquareLogosLimit={maxSquareLogosLimit}\r\n maxLandscapeLogosLimit={maxLandscapeLogosLimit}\r\n data={logos}\r\n i18n={i18n}\r\n maxCount={10}\r\n preferenceService={preferenceService}\r\n permissions={permissions}\r\n serverContext={serverContext}\r\n aid={aid}\r\n cid={cid}\r\n updateOrCreateBrandKit={updateOrCreateBrandKit}\r\n oDataConfig={oDataConfig}\r\n perfMarker={perfMarker}\r\n helpTopic=\"pop_BA_Brand_Logos\"\r\n helpLabel={i18n.getString(_TL_('Learn more about Logos'))}\r\n />\r\n \r\n }\r\n subTitle={i18n.getString(_TL_('Add up to 15 images associated with your brand.'))}\r\n maxLimit={maxImagesLimit}\r\n title={i18n.getString(_TL_('Images'))}\r\n data={images}\r\n i18n={i18n}\r\n maxCount={15}\r\n preferenceService={preferenceService}\r\n permissions={permissions}\r\n serverContext={serverContext}\r\n aid={aid}\r\n updateOrCreateBrandKit={updateOrCreateBrandKit}\r\n showEditBtn={false}\r\n cid={cid}\r\n oDataConfig={oDataConfig}\r\n perfMarker={perfMarker}\r\n helpTopic=\"pop_BA_Brand_Images\"\r\n helpLabel={i18n.getString(_TL_('Learn more about Images'))}\r\n />\r\n ,\r\n }}\r\n helpTopic=\"pop_BA_Brand_Font\"\r\n helpLabel={i18n.getString(_TL_('Learn more about Fonts'))}\r\n bodyContent={\r\n \r\n }\r\n />\r\n \r\n );\r\n};\r\n\r\nBrandElements.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n fetchBrandKitData: PropTypes.func.isRequired,\r\n brandKitDataService: PropTypes.shape({\r\n getBrandKits: PropTypes.func,\r\n createBrandKits: PropTypes.func,\r\n updateBrandKit: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}),\r\n};\r\n\r\nBrandElements.defaultProps = {\r\n serverContext: {},\r\n};\r\n","import React, { useEffect, useState, useCallback, useContext } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { Tab, TabList } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n// AdsStudioSpinner,\r\n ClarityTags,\r\n useClarityTags\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n// import { Overlay } from '@bingads-webui-react/fabric-control';\r\n\r\nimport { actionTypes } from './reducer';\r\nimport { BrandVoice } from './brand-voice';\r\nimport { useBrandKitPageStyle } from './styles';\r\nimport { BrandElements } from './brand-elements';\r\nimport { BrandKitPageBanner } from './components';\r\nimport { withBrandKitContext, BrandKitContext } from './context';\r\n\r\nconst TabValues = {\r\n Assets: 'assets',\r\n BrandVoice: 'brandVoice',\r\n};\r\n\r\nconst BrandKitPage = ({\r\n brandKitDataService,\r\n imageEditService,\r\n notificationApi,\r\n // brandkitApiState,\r\n logger,\r\n permissions,\r\n aid,\r\n perfMarker,\r\n pagePerfMarker: brandKitPagePerfMarker,\r\n setDataLoaded,\r\n ...rest\r\n}) => {\r\n const classes = useBrandKitPageStyle();\r\n const i18n = useContext(I18nContext);\r\n const [loading, setLoading] = useState(true);\r\n const { dispatch } = useContext(BrandKitContext);\r\n\r\n const [selectedTab, setSelectedTab] = useState(TabValues.Assets);\r\n\r\n const onTabSelect = useCallback((_e, data) => {\r\n setSelectedTab(data.value);\r\n }, []);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const fetchBrandKitData = useCallback(async () => {\r\n brandKitPagePerfMarker.willFetchData();\r\n const { response, error } = await brandKitDataService.getBrandKits(aid);\r\n if (error) {\r\n onFailedToLoadData();\r\n setLoading(false);\r\n logger.logTrace('failed to load');\r\n if (brandKitPagePerfMarker && setDataLoaded) {\r\n brandKitPagePerfMarker.willRender();\r\n setDataLoaded();\r\n }\r\n return;\r\n }\r\n dispatch({\r\n type: actionTypes.setData,\r\n payload: response[0] || {},\r\n });\r\n setLoading(false);\r\n if (brandKitPagePerfMarker && setDataLoaded) {\r\n brandKitPagePerfMarker.willRender();\r\n setDataLoaded();\r\n }\r\n }, [brandKitDataService, onFailedToLoadData, logger, dispatch, aid]);\r\n useEffect(() => {\r\n fetchBrandKitData();\r\n }, [fetchBrandKitData]);\r\n\r\n useClarityTags([\r\n ClarityTags.BrandKitPage,\r\n ClarityTags.LaunchedAdsStudio,\r\n ]);\r\n\r\n const isBrandKitUIPhase2Enabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUIPhase2;\r\n\r\n return (\r\n
\r\n \r\n {/* {(brandkitApiState && brandkitApiState.brandkitLoading) && (\r\n \r\n \r\n \r\n )} */}\r\n {isBrandKitUIPhase2Enabled && (\r\n \r\n {i18n.getString(_TL_('Assets'))}\r\n {i18n.getString(_TL_('Brand voice'))}\r\n \r\n )}\r\n {selectedTab === TabValues.Assets && }\r\n {selectedTab === TabValues.BrandVoice && }\r\n
\r\n );\r\n};\r\n\r\nBrandKitPage.propTypes = {\r\n notificationApi: PropTypes.shape({}),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n brandKitDataService: PropTypes.shape({\r\n getBrandKits: PropTypes.func,\r\n createBrandKits: PropTypes.func,\r\n updateBrandKit: PropTypes.func,\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n brandkitApiState: PropTypes.shape({\r\n brandkitResp: PropTypes.shape({}),\r\n brandkitError: PropTypes.shape({}),\r\n cache: PropTypes.shape({}),\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n imageEditService: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n BrandKitUIPhase2: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nBrandKitPage.defaultProps = {\r\n notificationApi: {\r\n showWarning: () => {},\r\n },\r\n};\r\n\r\nexport const BrandKitPageComponent = withBrandKitContext(BrandKitPage);\r\n","import {\r\n tokens,\r\n makeStyles,\r\n shorthands,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\nimport bannerBackground from '../../media/banner-background.png';\r\n\r\nexport const useBannerContainerStyles = makeStyles({\r\n bannerContainer: {\r\n width: '100%',\r\n display: 'flex',\r\n alignSelf: 'stretch',\r\n flexDirection: 'column',\r\n ...shorthands.padding('36px'),\r\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\r\n ...shorthands.gap(tokens.spacingVerticalXXL, tokens.spacingHorizontalXXL),\r\n backgroundImage: `url(${bannerBackground})`,\r\n backgroundSize: 'cover',\r\n 'background-position': 'right center',\r\n backgroundRepeat: 'no-repeat',\r\n ...typographyStyles.body1,\r\n marginBottom: '40px',\r\n },\r\n heading: {\r\n marginBlockEnd: tokens.spacingVerticalS,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport { Body2, mergeClasses, Title2 } from '@fluentui/react-components';\r\n\r\nimport { useBannerContainerStyles } from './style';\r\n\r\nexport const Banner = ({ i18n }) => {\r\n const classes = useBannerContainerStyles();\r\n\r\n return (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Display templates'))}\r\n \r\n \r\n {i18n.getString(_TL_('Create visually appealing templates for your Display ads to save time during campaign creation.'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nBanner.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n};\r\n\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useTemplateImageStyles = makeStyles({\r\n flexColumn: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n justifyContent: 'center',\r\n },\r\n templateWithCaption: {\r\n ...shorthands.gap(tokens.spacingVerticalM),\r\n },\r\n caption: {\r\n ...shorthands.gap(tokens.spacingVerticalXS),\r\n },\r\n imageCard: {\r\n width: '240px',\r\n minHeight: '180px',\r\n height: '200px',\r\n filter: 'drop-shadow(0px 0.3px 0.9px rgba(0, 0, 0, 0.1)) drop-shadow(0px 1.6px 3.6px rgba(0, 0, 0, 0.13))',\r\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalNone),\r\n ...shorthands.borderRadius('6px'),\r\n },\r\n imageCardThumbnail: {\r\n objectFit: 'cover',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n darkGrayText: {\r\n color: '3B3B4F',\r\n },\r\n grayText: {\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n});\r\n\r\nexport const useTemplateGridStyles = makeStyles({\r\n gridContainer: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'flex-start',\r\n alignItems: 'flex-start',\r\n rowGap: tokens.spacingVerticalL,\r\n columnGap: tokens.spacingHorizontalL,\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n skeletonContainer: {\r\n alignItems: 'center',\r\n display: 'grid',\r\n position: 'relative',\r\n gridTemplateColumns: 'repeat(5, 1fr)',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n filtersRow: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n flexWrap: 'wrap',\r\n ...shorthands.gap(tokens.spacingHorizontalS),\r\n },\r\n filterButton: {\r\n minWidth: 'auto',\r\n whiteSpace: 'nowrap',\r\n },\r\n});\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { List, ListItem } from '@fluentui/react-list-preview';\r\nimport { Card, ToggleButton, mergeClasses, Skeleton, SkeletonItem, Caption2, Caption1Strong } from '@fluentui/react-components';\r\nimport { useTemplateImageStyles, useTemplateGridStyles } from './style';\r\n\r\nexport const TemplateImageCard = ({\r\n templateGroupId,\r\n templateAttributes,\r\n setClickedTemplate,\r\n image,\r\n i18n,\r\n}) => {\r\n const classes = useTemplateImageStyles();\r\n\r\n const getAssetCountInfo = () => {\r\n const { logoCount, imageCount, textAreaCount } = templateAttributes.assetCounts;\r\n const result = [];\r\n if (logoCount && logoCount > 1) result.push(i18n.getString(_TL_('{{logoCount}} logos'), { logoCount }));\r\n else if (logoCount && logoCount > 0) result.push(i18n.getString(_TL_('{{logoCount}} logo'), { logoCount }));\r\n if (imageCount && imageCount > 1) result.push(i18n.getString(_TL_('{{imageCount}} images'), { imageCount }));\r\n else if (imageCount && imageCount > 0) result.push(i18n.getString(_TL_('{{imageCount}} image'), { imageCount }));\r\n if (textAreaCount && textAreaCount > 1) result.push(i18n.getString(_TL_('{{textAreaCount}} texts'), { textAreaCount }));\r\n else if (textAreaCount && textAreaCount > 0) result.push(i18n.getString(_TL_('{{textAreaCount}} text'), { textAreaCount }));\r\n return result.join('・');\r\n };\r\n\r\n const onClick = () => {\r\n setClickedTemplate(templateGroupId);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Preview\r\n \r\n \r\n
\r\n {templateAttributes.templateGroupName} \r\n {getAssetCountInfo()} \r\n
\r\n
\r\n );\r\n};\r\n\r\nTemplateImageCard.propTypes = {\r\n templateGroupId: PropTypes.string.isRequired,\r\n templateAttributes: PropTypes.shape({\r\n templateGroupName: PropTypes.string,\r\n tag: PropTypes.string,\r\n assetCounts: PropTypes.shape({}),\r\n }).isRequired,\r\n setClickedTemplate: PropTypes.func.isRequired,\r\n image: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const TemplateGrid = ({\r\n templates,\r\n templateTagOptions,\r\n templateAttributesMap,\r\n setClickedTemplate,\r\n loading,\r\n i18n,\r\n}) => {\r\n const classes = useTemplateGridStyles();\r\n const [selectedFilter, setSelectedFilter] = useState(templateTagOptions.all);\r\n const filterOptions = [templateTagOptions.all, templateTagOptions.brandAwareness, templateTagOptions.performance];\r\n\r\n return (\r\n <>\r\n
\r\n {filterOptions.map((filter, index) => (\r\n \r\n setSelectedFilter(filter)}\r\n className={mergeClasses(`filter-${index}`, classes.filterButton)}\r\n disabled={loading}\r\n checked={selectedFilter === filter}\r\n >\r\n {i18n.getString(filter)}\r\n \r\n \r\n ))}\r\n
\r\n {loading ? (\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 {templates.map(template => (\r\n (selectedFilter === templateTagOptions.all ||\r\n templateAttributesMap[template.templateGroupId].tag === selectedFilter\r\n ) && (\r\n \r\n )\r\n ))}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nTemplateGrid.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n templates: PropTypes.arrayOf(PropTypes.shape({\r\n templateGroupId: PropTypes.string.isRequired,\r\n preview: PropTypes.string.isRequired,\r\n })),\r\n templateTagOptions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n templateAttributesMap: PropTypes.objectOf(PropTypes.shape({\r\n templateGroupName: PropTypes.string,\r\n tag: PropTypes.string,\r\n assetCounts: PropTypes.shape({}),\r\n })).isRequired,\r\n setClickedTemplate: PropTypes.func.isRequired,\r\n loading: PropTypes.bool,\r\n};\r\n\r\nTemplateGrid.defaultProps = {\r\n templates: [],\r\n loading: true,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useTemplateCarouselStyles = makeStyles({\r\n carousel: {\r\n display: 'flex',\r\n width: '600px',\r\n height: '380px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n carouselItemContainer: {\r\n backgroundColor: tokens.colorNeutralBackground6,\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n ...shorthands.padding(tokens.spacingVerticalNone, '64px'),\r\n },\r\n carouselItem: {\r\n maxHeight: '100%',\r\n maxWidth: '100%',\r\n boxShadow: tokens.shadow2,\r\n },\r\n});\r\n","import React from 'react';\r\nimport {\r\n Carousel,\r\n CarouselCard,\r\n CarouselNav,\r\n CarouselNavButton,\r\n CarouselNavContainer,\r\n CarouselViewport,\r\n CarouselSlider,\r\n} from '@fluentui/react-carousel';\r\nimport { mergeClasses, Skeleton, SkeletonItem } from '@fluentui/react-components';\r\nimport PropTypes from 'prop-types';\r\nimport { useTemplateCarouselStyles } from './style';\r\n\r\nconst CarouselItem = ({ url, i18n }) => {\r\n const classes = useTemplateCarouselStyles();\r\n return (\r\n
\r\n {i18n.getString(_TL_('Template\r\n
\r\n );\r\n};\r\n\r\nCarouselItem.propTypes = {\r\n url: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nexport const TemplateDetailsCarousel = ({\r\n previews, loading, i18n,\r\n}) => {\r\n const classes = useTemplateCarouselStyles();\r\n return (\r\n <>\r\n {loading || previews === undefined || previews.length === 0 ? (\r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n { previews.map(preview => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n {index => (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\n\r\nTemplateDetailsCarousel.propTypes = {\r\n previews: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n loading: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nTemplateDetailsCarousel.defaultProps = {\r\n loading: false,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useTemplateDetailsModalStyles = makeStyles({\r\n dialog: {\r\n minWidth: '1030px',\r\n minHeight: '486px',\r\n '@media (max-width: 1030px)': {\r\n minWidth: 'max-content',\r\n minHeight: 'auto',\r\n },\r\n },\r\n dialogContentContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap(tokens.spacingHorizontalXXXL),\r\n ...shorthands.overflow('hidden', 'auto'),\r\n '@media (max-width: 1030px)': {\r\n flexDirection: 'column',\r\n minWidth: 'max-content',\r\n paddingBottom: tokens.spacingVerticalL,\r\n },\r\n },\r\n detailsContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n textGroup: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingHorizontalS),\r\n },\r\n errorMsg: {\r\n color: tokens.colorStatusDangerForeground1,\r\n },\r\n});\r\n","import React, { useMemo, useEffect, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n DialogBody,\r\n DialogSurface,\r\n DialogTitle,\r\n Button,\r\n mergeClasses,\r\n Body1,\r\n Subtitle1,\r\n Caption1,\r\n Label,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\nimport { UrlInputFluent } from '@bingads-webui-campaign-react/url-input-fluent-v2';\r\nimport { TemplateDetailsCarousel } from '../template-details-carousel';\r\nimport { useTemplateDetailsModalStyles } from './style';\r\n\r\n\r\nexport const TemplateDetailsModal = ({\r\n templateGroupId,\r\n templateGroupName,\r\n fetchDisplayAdsTemplateGroupDetails,\r\n handleFailedToLoadData,\r\n show,\r\n onShowChange,\r\n onSelectTemplate,\r\n onClose,\r\n i18n,\r\n logger,\r\n}) => {\r\n const [templateCount, setTemplateCount] = useState(0);\r\n const [templateImages, setTemplateImages] = useState([]);\r\n const [templateGroupDetails, setTemplateGroupDetails] = useState({});\r\n const [isPageLoading, setIsPageLoading] = useState(true);\r\n const [url, setUrl] = useState('');\r\n const [urlError, setUrlError] = useState('');\r\n\r\n useEffect(() => {\r\n fetchDisplayAdsTemplateGroupDetails([templateGroupId])\r\n .then(({ data }) => {\r\n const details = data.details.find(detail => detail.templateGroupId === templateGroupId);\r\n setTemplateGroupDetails(details);\r\n setTemplateImages(details.displayAdsTemplateDetails.map(template => template.displayAd.url));\r\n setTemplateCount(details.templateCount);\r\n })\r\n .catch(() => {\r\n handleFailedToLoadData();\r\n logger.logTrace('failed to load');\r\n })\r\n .finally(() => {\r\n setIsPageLoading(false);\r\n });\r\n }, [fetchDisplayAdsTemplateGroupDetails, handleFailedToLoadData, logger, templateGroupId]);\r\n\r\n\r\n const onGetStartedButton = useCallback(() => {\r\n onSelectTemplate({ templateGroupId, templateGroupDetails, url: urlError ? '' : url });\r\n }, [onSelectTemplate, templateGroupId, templateGroupDetails, url, urlError]);\r\n\r\n const DismissIcon = useMemo(() => , [onClose]);\r\n\r\n const classes = useTemplateDetailsModalStyles();\r\n\r\n return (\r\n {\r\n // it is the users responsibility to react accordingly to the open state change\r\n onShowChange(data.open);\r\n }}\r\n className={mergeClasses('template-details-dialog', classes.dialog)}\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {templateGroupName} \r\n
\r\n {i18n.getString(_TL_('{{count}} sizes'), { count: templateCount })} \r\n {i18n.getString(_TL_('All {{count}} sizes will be automatically added to your template for you to customize.'), { count: templateCount })} \r\n
\r\n
\r\n \r\n {\r\n setUrlError(urlErrors[0]);\r\n setUrl(newUrl);\r\n }}\r\n textFieldAriaLabel={i18n.getString(_TL_('Enter your URL'))}\r\n i18n={i18n}\r\n additionalProperties={{\r\n placeholder: i18n.getString(_TL_('Enter your URL')),\r\n id: 'url-input',\r\n }}\r\n />\r\n {urlError && {urlError} }\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\nTemplateDetailsModal.propTypes = {\r\n templateGroupId: PropTypes.string.isRequired,\r\n templateGroupName: PropTypes.string.isRequired,\r\n fetchDisplayAdsTemplateGroupDetails: PropTypes.func.isRequired,\r\n handleFailedToLoadData: PropTypes.func.isRequired,\r\n show: PropTypes.bool.isRequired,\r\n onShowChange: PropTypes.func.isRequired,\r\n onSelectTemplate: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useDisplayTemplatesPageStyles = makeStyles({\r\n displayTemplatePage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n});\r\n","import React, { useCallback, useEffect, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses, Subtitle1 } from '@fluentui/react-components';\r\nimport {\r\n ClarityTags,\r\n useClarityTags\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { TopBanner, TemplateGrid, TemplateDetailsModal } from './components';\r\nimport { useDisplayTemplatesPageStyles } from './style';\r\n\r\nconst names = {\r\n 'Modern minimalist': _TL_('Modern minimalist'),\r\n 'Tech-savvy': _TL_('Tech-savvy'),\r\n 'Vintage, retro': _TL_('Vintage, retro'),\r\n 'Bold and colorful': _TL_('Bold and colorful'),\r\n 'Luxury and beauty': _TL_('Luxury and beauty'),\r\n};\r\n\r\nconst templateTagOptions = {\r\n all: _TL_('All'),\r\n performance: _TL_('Performance'),\r\n brandAwareness: _TL_('Brand awareness'),\r\n};\r\n\r\nconst templateAttributesMap = {\r\n '00000000-0000-0000-0001-000000000001': {\r\n tag: templateTagOptions.performance,\r\n assetCounts: {\r\n logoCount: 1,\r\n imageCount: 1,\r\n textAreaCount: 2,\r\n },\r\n },\r\n '00000000-0000-0000-0001-000000000002': {\r\n tag: templateTagOptions.brandAwareness,\r\n assetCounts: {\r\n logoCount: 0,\r\n imageCount: 1,\r\n textAreaCount: 2,\r\n },\r\n },\r\n '00000000-0000-0000-0001-000000000003': {\r\n tag: templateTagOptions.brandAwareness,\r\n assetCounts: {\r\n logoCount: 0,\r\n imageCount: 1,\r\n textAreaCount: 2,\r\n },\r\n },\r\n '00000000-0000-0000-0001-000000000004': {\r\n tag: templateTagOptions.brandAwareness,\r\n assetCounts: {\r\n logoCount: 0,\r\n imageCount: 1,\r\n textAreaCount: 2,\r\n },\r\n },\r\n '00000000-0000-0000-0001-000000000005': {\r\n tag: templateTagOptions.performance,\r\n assetCounts: {\r\n logoCount: 1,\r\n imageCount: 1,\r\n textAreaCount: 2,\r\n },\r\n },\r\n};\r\n\r\nconst DisplayTemplatesPage = ({\r\n i18n,\r\n logger,\r\n notificationApi,\r\n displayTemplatesDataService,\r\n navigation,\r\n // permissions,\r\n // aid,\r\n // cid,\r\n // oDataConfig,\r\n // serverContext,\r\n // preferenceService,\r\n pagePerfMarker: displayTemplatePagePerfMarker,\r\n setDataLoaded,\r\n // reload,\r\n}) => {\r\n const classes = useDisplayTemplatesPageStyles();\r\n const [isPageLoading, setIsPageLoading] = useState(true);\r\n const [templates, setTemplates] = useState([]);\r\n const [selectedTemplatePreview, setSelectedTemplatePreview] = useState(null);\r\n const [openModal, setOpenModal] = useState(false);\r\n const activity = useContext(ActivityContext);\r\n const { setData } = useContext(DataContext);\r\n\r\n const handleFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n useEffect(() => {\r\n displayTemplatePagePerfMarker.willFetchData();\r\n displayTemplatesDataService\r\n .fetchDisplayAdsTemplateGroups()\r\n .then(({ data }) => {\r\n setTemplates(data.displayAdsTemplateGroup);\r\n data.displayAdsTemplateGroup.forEach((template) => {\r\n if (template.templateGroupId in templateAttributesMap) {\r\n templateAttributesMap[template.templateGroupId].templateGroupName = template.templateGroupName in names ?\r\n i18n.getString(names[template.templateGroupName]) : template.templateGroupName;\r\n }\r\n });\r\n })\r\n .catch(() => {\r\n handleFailedToLoadData();\r\n logger.logTrace('failed to load');\r\n })\r\n .finally(() => {\r\n setIsPageLoading(false);\r\n displayTemplatePagePerfMarker.willRender();\r\n setDataLoaded();\r\n });\r\n }, []);\r\n\r\n useClarityTags([\r\n ClarityTags.DisplayTemplateHomePage,\r\n ClarityTags.LaunchedAdsStudio,\r\n ]);\r\n\r\n const onViewTemplateDetails = useCallback((templateGroupId) => {\r\n const templateName = templates.find(template => template.templateGroupId === templateGroupId).templateGroupName;\r\n setSelectedTemplatePreview({\r\n templateGroupId,\r\n templateGroupName: templateName in names ? i18n.getString(names[templateName]) : templateName,\r\n });\r\n\r\n setOpenModal(true);\r\n }, [templates, i18n]);\r\n\r\n const onChooseTemplate = useCallback(({ templateGroupDetails, url }) => {\r\n setData({ templateGroupDetails, url });\r\n activity.signal(`[DisplayTemplatesPage] templateSelected:${templateGroupDetails.templateGroupId}`);\r\n if (url) {\r\n activity.signal(`[DisplayTemplatesPage] url provided: ${url}`);\r\n } else {\r\n activity.signal('[DisplayTemplatesPage] url is not provided');\r\n }\r\n navigation.gotoDisplayTemplatesCreationPage({\r\n templateGroupId: templateGroupDetails.templateGroupId,\r\n });\r\n }, [navigation, activity, setData]);\r\n\r\n const onCloseModal = useCallback(() => {\r\n setOpenModal(false);\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Get started with a template'))}\r\n \r\n \r\n {openModal && }\r\n
\r\n );\r\n};\r\n\r\nDisplayTemplatesPage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n displayTemplatesDataService: PropTypes.shape({\r\n fetchDisplayAdsTemplateGroups: PropTypes.func,\r\n fetchDisplayAdsTemplateGroupDetails: PropTypes.func,\r\n }),\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({ }).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({\r\n gotoDisplayTemplatesCreationPage: PropTypes.func,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nDisplayTemplatesPage.defaultProps = {\r\n notificationApi: {},\r\n displayTemplatesDataService: {},\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n};\r\n\r\nexport const DisplayTemplatesPageComponent = DisplayTemplatesPage;\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useCreateDisplayTemplatePageStyles = makeStyles({\r\n page: {\r\n display: 'flex',\r\n height: '100%',\r\n },\r\n editorContainer: {\r\n position: 'absolute', // workaround for the style issue from the footer\r\n top: '0',\r\n bottom: '0',\r\n width: '100%',\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useEffect } from 'react';\r\nimport {\r\n Link,\r\n ToastTrigger,\r\n Toast,\r\n ToastTitle,\r\n ToastBody,\r\n ToastFooter,\r\n useId,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\nimport { useToast } from '@bingads-webui-fluent-component/toast-provider';\r\n\r\nconst timeout = 10000;\r\n\r\nconst ToastComponent = ({\r\n i18n, count, navigation, logger, dismissToast, toastId,\r\n}) => {\r\n const buttonRef = React.createRef();\r\n\r\n useEffect(() => {\r\n if (buttonRef.current) {\r\n buttonRef.current.focus();\r\n }\r\n }, [buttonRef]);\r\n\r\n return (\r\n \r\n \r\n }\r\n title={i18n.getString(_TL_('Dismiss'))}\r\n aria-label={i18n.getString(_TL_('Dismiss'))}\r\n ref={buttonRef}\r\n />\r\n \r\n }\r\n >{i18n.getString(_TL_('Display assets saved'))}\r\n \r\n {\r\n count === 1 ?\r\n {i18n.getString(_TL_('Your template was successfully saved. Do you want to create a new campaign for Display ads?'))} :\r\n {i18n.getString(_TL_('Your template was successfully saved. All {{count}} sizes are ready for you to use. Do you want to create a new campaign for Display ads?'), {\r\n count,\r\n })}\r\n \r\n }\r\n \r\n {\r\n ev.preventDefault();\r\n navigation.gotoCampaignUIPage({ subpath: 'createcampaign/displayplusdisplay' });\r\n // manually dismiss the toast as we have prevented the default action\r\n dismissToast(toastId);\r\n if (logger) {\r\n logger.logTrace('[display template] create campaign link clicked');\r\n }\r\n }}\r\n >{i18n.getString(_TL_('Create campaign'))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport const useNotify = ({\r\n i18n,\r\n count,\r\n navigation,\r\n logger,\r\n}) => {\r\n const toastId = useId('notify-toast');\r\n const { dispatchToast, dismissToast } = useToast();\r\n\r\n const notify = useCallback(() =>\r\n dispatchToast(\r\n ,\r\n {\r\n intent: 'success', toastId, timeout, politeness: 'assertive',\r\n }\r\n ), [i18n, navigation, count, toastId, logger, dismissToast, dispatchToast]);\r\n\r\n return notify;\r\n};\r\n","import React, { useEffect, useMemo, useContext, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport queryString from 'query-string';\r\nimport { DisplayAdsEditor } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { ClarityTags, useClarityTags, AdditionalQueries } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\n\r\nimport { useCreateDisplayTemplatePageStyles } from './style';\r\nimport { useNotify } from './use-notify';\r\n\r\nconst CreateDisplayTemplatePage = ({\r\n i18n,\r\n displayTemplatesDataService,\r\n brandKitDataService,\r\n permissions,\r\n aid,\r\n cid,\r\n brandkitApiState,\r\n oDataConfig,\r\n serverContext,\r\n dataService,\r\n preferenceService,\r\n navigation,\r\n instrumentation,\r\n logger,\r\n search,\r\n pagePerfMarker: displayTemplateCreatePagePerfMarker,\r\n setDataLoaded,\r\n notificationApi,\r\n}) => {\r\n const classes = useCreateDisplayTemplatePageStyles();\r\n const [templateDetails, setTemplateGroupDetails] = useState(null);\r\n const { data: detailsData } = useContext(DataContext);\r\n const queries = queryString.parse(search);\r\n const { templateGroupId = '' } = queries || {};\r\n\r\n useEffect(() => {\r\n if (!templateDetails) {\r\n if (!detailsData && templateGroupId) {\r\n displayTemplatesDataService.fetchDisplayAdsTemplateGroupDetails([templateGroupId]).then(({ data }) => {\r\n const details = data.details.find(detail => detail.templateGroupId === templateGroupId);\r\n setTemplateGroupDetails({ templateGroupDetails: details });\r\n }).catch(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load. Please refresh the page and try again.')));\r\n });\r\n } else {\r\n setTemplateGroupDetails(detailsData);\r\n }\r\n }\r\n }, [detailsData, templateGroupId, templateDetails, displayTemplatesDataService, i18n, notificationApi]);\r\n\r\n const templateCount = useMemo(() => (templateDetails &&\r\n templateDetails.templateGroupDetails &&\r\n templateDetails.templateGroupDetails.displayAdsTemplateDetails.length\r\n ) || 0, [templateDetails]);\r\n const notify = useNotify({\r\n i18n, count: templateCount, navigation, logger,\r\n });\r\n\r\n useEffect(() => {\r\n if (!detailsData && !templateGroupId) {\r\n navigation.gotoDisplayTemplatesPage({ removeSearchQuery: [AdditionalQueries.TemplateGroupId] });\r\n }\r\n }, [detailsData, navigation, templateGroupId]);\r\n\r\n useClarityTags([\r\n ClarityTags.LaunchedAdsStudio,\r\n ClarityTags.CreateDisplayTemplate,\r\n ]);\r\n\r\n if (templateDetails === null) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {\r\n notify();\r\n dataService.reloadFolderPathTreeItem(['ROOT']);\r\n navigation.gotoImagesPage({ removeSearchQuery: [AdditionalQueries.TemplateGroupId] });\r\n }}\r\n navigation={navigation}\r\n instrumentation={instrumentation}\r\n scenarioName=\"CreateDisplayTemplate\"\r\n activityName=\"CreateDisplayTemplate\"\r\n setDataLoaded={setDataLoaded}\r\n />\r\n
\r\n \r\n );\r\n};\r\n\r\nCreateDisplayTemplatePage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({\r\n loadData: PropTypes.func,\r\n reloadFolderPathTreeItem: PropTypes.func,\r\n }),\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n brandKitDataService: PropTypes.shape({\r\n getBrandKits: PropTypes.func,\r\n createBrandKits: PropTypes.func,\r\n updateBrandKit: PropTypes.func,\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n brandkitApiState: PropTypes.shape({\r\n brandkitResp: PropTypes.shape({}),\r\n brandkitError: PropTypes.shape({}),\r\n cache: PropTypes.shape({}),\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n permissions: PropTypes.shape({ }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n pagePerfMarker: PropTypes.shape({}).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoDisplayTemplatesPage: PropTypes.func,\r\n gotoImagesPage: PropTypes.func,\r\n removeSearchQuery: PropTypes.func,\r\n }).isRequired,\r\n displayTemplatesDataService: PropTypes.shape({\r\n editDisplayAdsAssetRecommendations: PropTypes.func,\r\n fetchDisplayAdsTemplateGroupDetails: PropTypes.func,\r\n }).isRequired,\r\n setDataLoaded: PropTypes.func.isRequired,\r\n search: PropTypes.string.isRequired,\r\n};\r\n\r\nCreateDisplayTemplatePage.defaultProps = {\r\n dataService: {},\r\n notificationApi: {},\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n};\r\n\r\nexport const CreateDisplayTemplatePageComponent = CreateDisplayTemplatePage;\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useEditDisplayTemplatePageStyles = makeStyles({\r\n page: {\r\n display: 'flex',\r\n height: '100%',\r\n },\r\n editorContainer: {\r\n position: 'absolute', // workaround for the style issue from the footer\r\n top: '0',\r\n bottom: '0',\r\n width: '100%',\r\n },\r\n});\r\n","import React, { useCallback, useEffect, useState, useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport queryString from 'query-string';\r\nimport _ from 'underscore';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { DisplayAdsEditor } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { AdsStudioSpinner, ClarityTags, useClarityTags, AdditionalQueries } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useEditDisplayTemplatePageStyles } from './style';\r\nimport { useNotify } from '../create-display-template-page-component/use-notify';\r\n\r\nconst EditDisplayTemplatePage = ({\r\n logger,\r\n notificationApi,\r\n imageId,\r\n i18n,\r\n brandKitDataService,\r\n brandkitApiState,\r\n displayTemplatesDataService,\r\n dataService,\r\n permissions,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n serverContext,\r\n preferenceService,\r\n pagePerfMarker: displayTemplateEditPagePerfMarker,\r\n setDataLoaded,\r\n navigation,\r\n search,\r\n instrumentation,\r\n}) => {\r\n const classes = useEditDisplayTemplatePageStyles();\r\n const queries = queryString.parse(search);\r\n const {\r\n folderId = '',\r\n templateId = '',\r\n } = queries || {};\r\n\r\n const [templateDetails, setTemplateDetails] = useState(null);\r\n const [templateConfig, setTemplateConfig] = useState(null);\r\n const [displayAd, setDisplayAd] = useState(null);\r\n const [sourceType, setSourceType] = useState(null);\r\n const { data: imageDetails } = useContext(DataContext);\r\n const notify = useNotify({\r\n i18n, count: 1, navigation, logger,\r\n });\r\n\r\n const isPageLoading = useMemo(() => !templateDetails, [templateDetails]);\r\n\r\n const displayAdFromStorage = useMemo(() => {\r\n setSourceType(imageDetails ? imageDetails.sourceType : undefined);\r\n\r\n if (imageDetails && imageDetails.imageId === imageId &&\r\n imageDetails.metadata &&\r\n imageDetails.metadata.template &&\r\n imageDetails.metadata.template.templateId === templateId) {\r\n return {\r\n ...imageDetails.metadata,\r\n url: imageDetails.url,\r\n };\r\n }\r\n\r\n return null;\r\n }, [imageId, templateId, imageDetails]);\r\n\r\n const handleFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n useClarityTags([\r\n ClarityTags.LaunchedAdsStudio,\r\n ClarityTags.EditDisplayTemplateImage,\r\n ]);\r\n\r\n useEffect(() => {\r\n if (!displayAd) {\r\n displayTemplateEditPagePerfMarker.willFetchData();\r\n if (displayAdFromStorage) {\r\n setDisplayAd(displayAdFromStorage);\r\n } else {\r\n dataService.getImageById({ imageId }).then((image) => {\r\n if (!image.metadata || !image.metadata.template || image.metadata.template.templateId !== templateId) {\r\n navigation.gotoHomePage({ removeSearchQuery: [AdditionalQueries.TemplateId, AdditionalQueries.FolderId] });\r\n } else {\r\n setSourceType(image.sourceType);\r\n setDisplayAd({\r\n ...image.metadata,\r\n url: image.url,\r\n });\r\n }\r\n }).catch(() => {\r\n handleFailedToLoadData();\r\n logger.logTrace('failed to load');\r\n });\r\n }\r\n }\r\n }, [displayAdFromStorage, dataService, imageId, navigation, templateId, handleFailedToLoadData, logger, displayAd, displayTemplateEditPagePerfMarker]);\r\n\r\n useEffect(() => {\r\n if (!imageId || !templateId) {\r\n navigation.gotoHomePage({ removeSearchQuery: [AdditionalQueries.TemplateId, AdditionalQueries.FolderId] });\r\n }\r\n }, [imageId, templateId, navigation]);\r\n\r\n useEffect(() => {\r\n if (!templateConfig) {\r\n displayTemplateEditPagePerfMarker.willFetchData();\r\n displayTemplatesDataService\r\n .fetchDisplayAdsTemplateDefinition(templateId)\r\n .then(({ Data: templates }) => {\r\n const latestTemplate = _.max(\r\n templates.displayAdsTemplateDefinitions,\r\n templateDefinition => Number(templateDefinition.version)\r\n );\r\n setTemplateConfig(latestTemplate);\r\n })\r\n .catch(() => {\r\n handleFailedToLoadData();\r\n logger.logTrace('failed to load');\r\n });\r\n }\r\n }, [handleFailedToLoadData, logger, displayTemplatesDataService, templateId, templateConfig, displayTemplateEditPagePerfMarker]);\r\n\r\n useEffect(() => {\r\n if (!templateDetails && templateConfig && displayAd) {\r\n setTemplateDetails({\r\n displayAdsTemplateDetails: [\r\n {\r\n templateConfig,\r\n displayAd,\r\n },\r\n ],\r\n });\r\n }\r\n }, [displayAd, templateConfig, templateDetails]);\r\n\r\n return (\r\n
\r\n {isPageLoading && (\r\n \r\n \r\n \r\n )}\r\n {!isPageLoading && (\r\n {\r\n notify();\r\n navigation.gotoImagesPage({ removeSearchQuery: [AdditionalQueries.TemplateId, AdditionalQueries.FolderId] });\r\n }}\r\n navigation={navigation}\r\n instrumentation={instrumentation}\r\n scenarioName=\"EditDisplayTemplateImage\"\r\n activityName=\"EditDisplayTemplateImage\"\r\n sourceType={sourceType}\r\n setDataLoaded={setDataLoaded}\r\n folderId={folderId}\r\n />\r\n ) }\r\n
\r\n );\r\n};\r\n\r\nEditDisplayTemplatePage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n displayTemplatesDataService: PropTypes.shape({\r\n fetchDisplayAdsTemplateDefinition: PropTypes.func,\r\n }),\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({\r\n gotoHomePage: PropTypes.func,\r\n gotoImagesPage: PropTypes.func,\r\n }).isRequired,\r\n imageId: PropTypes.string.isRequired,\r\n brandKitDataService: PropTypes.shape({\r\n getBrandKits: PropTypes.func,\r\n createBrandKits: PropTypes.func,\r\n updateBrandKit: PropTypes.func,\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n brandkitApiState: PropTypes.shape({\r\n brandkitResp: PropTypes.shape({}),\r\n brandkitError: PropTypes.shape({}),\r\n cache: PropTypes.shape({}),\r\n brandkitLoading: PropTypes.bool,\r\n }).isRequired,\r\n dataService: PropTypes.shape({\r\n getImageById: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n pagePerfMarker: PropTypes.shape({\r\n willFetchData: PropTypes.func,\r\n }).isRequired,\r\n search: PropTypes.string.isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n setDataLoaded: PropTypes.func.isRequired,\r\n};\r\n\r\nEditDisplayTemplatePage.defaultProps = {\r\n displayTemplatesDataService: {},\r\n notificationApi: {},\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n};\r\n\r\nexport const EditDisplayTemplatePageComponent = EditDisplayTemplatePage;\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useFolderGridCellWithContextMenuStyle = makeStyles({\r\n folderCellContextMenuButton: {\r\n height: '100%',\r\n width: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n});\r\n","/* eslint-disable object-curly-newline */\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { MoreVertical20Regular } from '@fluentui/react-icons';\r\nimport {\r\n Menu,\r\n MenuItem,\r\n MenuList,\r\n MenuPopover,\r\n MenuTrigger,\r\n} from '@fluentui/react-components';\r\nimport { AdsStudioFoldersGridCell } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useFolderGridCellWithContextMenuStyle } from '../styles/folders-grid-cell-with-context-menu-style';\r\n\r\nfunction getMenuItems({\r\n item,\r\n isReadonly,\r\n onSelectMenuItemClick,\r\n onOpenMenuItemClick,\r\n onDeleteMenuItemClick,\r\n onRenameMenuItemClick,\r\n onViewPerformanceClick,\r\n i18n,\r\n}) {\r\n const items = _.compact([{\r\n key: 'deleteItem',\r\n text: i18n.getString(_TL_('Delete')),\r\n ariaLabel: i18n.getString(_TL_('Delete')),\r\n onClick: onDeleteMenuItemClick ? () => onDeleteMenuItemClick(item) : _.noop,\r\n disabled: !!isReadonly,\r\n },\r\n {\r\n key: 'openCell',\r\n text: i18n.getString(_TL_('Open')),\r\n ariaLabel: i18n.getString(_TL_('Open')),\r\n onClick: onOpenMenuItemClick ? () => onOpenMenuItemClick(item) : _.noop,\r\n },\r\n {\r\n key: 'renameItem',\r\n text: i18n.getString(_TL_('Rename')),\r\n ariaLabel: i18n.getString(_TL_('Rename')),\r\n onClick: onRenameMenuItemClick ? () => onRenameMenuItemClick(item) : _.noop,\r\n disabled: !!isReadonly,\r\n },\r\n {\r\n key: 'selectCell',\r\n text: i18n.getString(_TL_('Select')),\r\n ariaLabel: i18n.getString(_TL_('Select')),\r\n onClick: onSelectMenuItemClick ? () => onSelectMenuItemClick(item) : _.noop,\r\n },\r\n {\r\n key: 'viewPerformance',\r\n text: i18n.getString(_TL_('View performance')),\r\n ariaLabel: i18n.getString(_TL_('View performance')),\r\n onClick: onViewPerformanceClick ? () => onViewPerformanceClick(item) : _.noop,\r\n },\r\n ]);\r\n return items;\r\n}\r\n\r\nconst FoldersGridCellWithContextMenu = ({\r\n item,\r\n isReadonly,\r\n onSelectMenuItemClick,\r\n onOpenMenuItemClick,\r\n onDeleteMenuItemClick,\r\n onRenameMenuItemClick,\r\n onViewPerformanceClick,\r\n i18n,\r\n ...rest\r\n}) => {\r\n const classes = useFolderGridCellWithContextMenuStyle();\r\n const menuItems = useMemo(() => getMenuItems({\r\n item,\r\n isReadonly,\r\n onSelectMenuItemClick,\r\n onOpenMenuItemClick,\r\n onDeleteMenuItemClick,\r\n onRenameMenuItemClick,\r\n onViewPerformanceClick,\r\n i18n,\r\n }), [item, isReadonly, onSelectMenuItemClick, onOpenMenuItemClick, onDeleteMenuItemClick, onRenameMenuItemClick, onViewPerformanceClick, i18n]);\r\n\r\n const renderAccessory = useCallback(() => (\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n {menuItems.map(menuItem => (\r\n \r\n {menuItem.text}\r\n \r\n ))}\r\n \r\n \r\n
), [classes.folderCellContextMenuButton, menuItems]);\r\n\r\n return ();\r\n};\r\n\r\nFoldersGridCellWithContextMenu.propTypes = {\r\n item: PropTypes.shape({}).isRequired,\r\n isReadonly: PropTypes.bool,\r\n // show dropdown menu\r\n onSelectMenuItemClick: PropTypes.func,\r\n onOpenMenuItemClick: PropTypes.func,\r\n onDeleteMenuItemClick: PropTypes.func,\r\n onRenameMenuItemClick: PropTypes.func,\r\n onViewPerformanceClick: PropTypes.func,\r\n\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nFoldersGridCellWithContextMenu.defaultProps = {\r\n isReadonly: false,\r\n onSelectMenuItemClick: undefined,\r\n onOpenMenuItemClick: undefined,\r\n onDeleteMenuItemClick: undefined,\r\n onRenameMenuItemClick: undefined,\r\n onViewPerformanceClick: undefined,\r\n};\r\n\r\nexport const AdsStudioFoldersGridCellWithContextMenu = FoldersGridCellWithContextMenu;\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useModalStyle = makeStyles({\r\n nameInput: {\r\n marginTop: '40px',\r\n marginBottom: '54px',\r\n width: '100%',\r\n },\r\n error: {\r\n fontSize: '14px',\r\n color: 'rgb(168, 0, 0)',\r\n marginTop: '-40px',\r\n marginBottom: '20px',\r\n },\r\n});\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport _ from 'underscore';\r\nimport {\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogBody,\r\n DialogActions,\r\n Button,\r\n Input,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\nimport { validate } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useModalStyle } from '../styles/edit-folder-name-modal-style';\r\n\r\nconst EditFolderNameModalImp = ({\r\n i18n,\r\n show,\r\n onComplete,\r\n onCancel,\r\n errorText,\r\n setErrorText,\r\n initName,\r\n title,\r\n}) => {\r\n const classes = useModalStyle();\r\n const [name, setName] = useState('');\r\n\r\n const onChange = useCallback((event) => {\r\n const value = (event && event.target && event.target.value) || '';\r\n if (validate(value) && value.length <= 128) {\r\n setErrorText('');\r\n setName(value.trim());\r\n } else {\r\n setErrorText(i18n.getString(_TL_('You\\'ve entered one or more invalid characters in the fields. Please correct them.')));\r\n }\r\n }, [setErrorText, i18n]);\r\n\r\n const onConfirm = useCallback(() => {\r\n setName('');\r\n onComplete(name);\r\n }, [name, onComplete]);\r\n\r\n const handleCancel = useCallback(() => {\r\n setName('');\r\n onCancel();\r\n }, [onCancel]);\r\n\r\n const onKeyDown = useCallback((event) => {\r\n if (event && event.key === 'Enter') {\r\n onConfirm();\r\n }\r\n }, [onConfirm]);\r\n\r\n const isSaveButtonDisabled = useMemo(\r\n () => (initName && name === initName) || !name || errorText,\r\n [errorText, initName, name]\r\n );\r\n\r\n const DismissIcon = useMemo(() => , [handleCancel]);\r\n\r\n return (\r\n show ?\r\n \r\n \r\n \r\n {title || i18n.getString(_TL_('Create folder'))}\r\n \r\n { onChange(event); }}\r\n onKeyDown={onKeyDown}\r\n autoFocus\r\n defaultValue={initName}\r\n />\r\n { errorText &&
{errorText}
}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n : null\r\n );\r\n};\r\n\r\nEditFolderNameModalImp.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n show: PropTypes.bool.isRequired,\r\n onComplete: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n errorText: PropTypes.string,\r\n setErrorText: PropTypes.func,\r\n initName: PropTypes.string,\r\n title: PropTypes.string,\r\n};\r\n\r\nEditFolderNameModalImp.defaultProps = {\r\n errorText: '',\r\n setErrorText: _.noop,\r\n initName: '',\r\n title: undefined,\r\n};\r\n\r\nexport const EditFolderNameModal = EditFolderNameModalImp;\r\n","import React, { useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { getFoldersLimitPerAccount } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { EditFolderNameModal } from '../components/edit-folder-name-modal';\r\n\r\nconst CreateFolderModal = ({\r\n isDialogVisible,\r\n setDialogVisible,\r\n createFolderAsync,\r\n onSuccess,\r\n onError,\r\n aid,\r\n i18n,\r\n logger,\r\n}) => {\r\n const [errorMessage, setErrorMessage] = useState('');\r\n\r\n const closeDialog = useCallback(() => {\r\n setDialogVisible(false);\r\n setErrorMessage('');\r\n }, [setDialogVisible]);\r\n\r\n const onCreateFolder = useCallback((name) => {\r\n logger.logTrace('Confirm to create folder', { folderName: name });\r\n createFolderAsync({ folderName: name }).then(() => {\r\n setDialogVisible(false);\r\n onSuccess(name);\r\n logger.logTrace('Create folder successfully', { folderName: name });\r\n }).catch((alODataErr) => {\r\n const { actionable, getUXMessage } = alODataErr;\r\n if (actionable) {\r\n // prompt user to correct\r\n setErrorMessage(getUXMessage(i18n));\r\n } else {\r\n const getParams = () => ({ value: getFoldersLimitPerAccount(aid, logger) });\r\n const localizedUXMessage = getUXMessage(i18n, getParams);\r\n closeDialog();\r\n logger.logError(alODataErr, { folderName: name });\r\n onError(localizedUXMessage);\r\n }\r\n });\r\n }, [logger, createFolderAsync, setDialogVisible, onSuccess, i18n, closeDialog, onError, aid]);\r\n\r\n const onCancel = useCallback(() => {\r\n closeDialog();\r\n logger.logTrace('Cancel to create folder');\r\n }, [closeDialog, logger]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nCreateFolderModal.propTypes = {\r\n isDialogVisible: PropTypes.bool.isRequired,\r\n setDialogVisible: PropTypes.func.isRequired,\r\n createFolderAsync: PropTypes.func.isRequired,\r\n aid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n onSuccess: PropTypes.func.isRequired,\r\n onError: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n logError: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nexport const useCreateFolderModal = (aid, i18n, logger) => {\r\n const [isDialogVisible, setDialogVisible] = useState(false);\r\n\r\n const openModal = () => {\r\n setDialogVisible(true);\r\n };\r\n\r\n const render = useCallback((createFolderAsync, onSuccess, onError) => (), [aid, i18n, isDialogVisible, logger]);\r\n\r\n return {\r\n open: openModal,\r\n render,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useState, useRef, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ConfirmDialog } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst DeleteConfirmDialog = ({\r\n title,\r\n showConfirmDialog,\r\n setShowConfirmDialog,\r\n deleteApiAsync,\r\n i18n,\r\n warningMsg,\r\n}) => {\r\n const [showUIBlocker, setShowUIBlocker] = useState(false);\r\n\r\n const closeConfirmDialog = () => {\r\n setShowConfirmDialog(false);\r\n setShowUIBlocker(false);\r\n };\r\n\r\n const onDelete = () => {\r\n setShowUIBlocker(true);\r\n deleteApiAsync().finally(() => {\r\n closeConfirmDialog();\r\n });\r\n };\r\n\r\n const onCancel = () => {\r\n closeConfirmDialog();\r\n };\r\n\r\n return showConfirmDialog ? (\r\n \r\n ) : null;\r\n};\r\n\r\nDeleteConfirmDialog.propTypes = {\r\n title: PropTypes.string.isRequired,\r\n showConfirmDialog: PropTypes.bool.isRequired,\r\n setShowConfirmDialog: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n deleteApiAsync: PropTypes.func.isRequired,\r\n warningMsg: PropTypes.string,\r\n};\r\n\r\nDeleteConfirmDialog.defaultProps = {\r\n warningMsg: '',\r\n};\r\n\r\nexport const useDeleteConfirmDialog = (i18n) => {\r\n const [showConfirmDialog, setShowConfirmDialog] = useState(false);\r\n const deletedItems = useRef([]).current;\r\n\r\n const open = () => {\r\n setShowConfirmDialog(true);\r\n };\r\n\r\n const render = useCallback(({\r\n title, deleteApiAsync, onSuccess, onError, warningMsg,\r\n }) => {\r\n const onItemDeleted = (item) => {\r\n deletedItems.push(item);\r\n };\r\n\r\n const deleteApiAsyncWrapper = () => {\r\n deletedItems.length = 0;\r\n return deleteApiAsync({ onItemDeleted })\r\n .then(() => onSuccess({ deletedItems }))\r\n .catch(({ uxMessage }) => onError(i18n.getString(uxMessage)));\r\n };\r\n\r\n return ();\r\n }, [deletedItems, i18n, showConfirmDialog]);\r\n\r\n return {\r\n open,\r\n render,\r\n };\r\n};\r\n\r\nexport const useDeleteFolderConfirmDialog = (i18n, logger) => {\r\n const folderItemRef = useRef();\r\n\r\n const { open, render } = useDeleteConfirmDialog(i18n);\r\n\r\n const openConfirmDialog = (item) => {\r\n folderItemRef.current = item;\r\n open();\r\n };\r\n\r\n const renderConfirmDialog = useCallback((deleteFolderAsync, onSuccess, onError) => {\r\n const { folderId, folderName } = folderItemRef.current || {};\r\n\r\n const title = i18n.getString(_TL_('Are you sure you want to delete the \"{{folderName}}\" folder?'), { folderName });\r\n\r\n const deleteApiAsync = ({ onItemDeleted }) => {\r\n logger.logTrace('Confirm to delete folder', { folderName });\r\n return deleteFolderAsync({ folderId, folderName, onItemDeleted });\r\n };\r\n\r\n const onSuccessWrapper = ({ deletedItems: items }) => {\r\n const deletedItems = _.filter(items, itm => itm.err && !itm.err.ignorable);\r\n const hasErrors = deletedItems.length > 0;\r\n if (hasErrors) {\r\n logger.logTrace('folder is deleted with some errors', { folderName });\r\n } else {\r\n logger.logTrace('folder is deleted successfully', { folderName });\r\n }\r\n onSuccess({ folderName, folderId, deletedItems });\r\n };\r\n\r\n return render({\r\n title, i18n, deleteApiAsync, onSuccess: onSuccessWrapper, onError,\r\n });\r\n }, [i18n, render, logger]);\r\n\r\n return {\r\n open: openConfirmDialog,\r\n render: renderConfirmDialog,\r\n };\r\n};\r\n\r\nexport const useBatchDeleteConfirmDialog = (i18n, logger) => {\r\n const { open, render } = useDeleteConfirmDialog(i18n);\r\n\r\n const renderConfirmDialog = useCallback((batchDeleteAsync, onSuccess, onError, warningMsg) => {\r\n const title = i18n.getString(_TL_('Are you sure you want to delete the selected items?'));\r\n\r\n const deleteApiAsync = ({ onItemDeleted }) => {\r\n logger.logTrace('Confirm to batch delete');\r\n return batchDeleteAsync({ onItemDeleted });\r\n };\r\n\r\n const onSuccessWrapper = ({ deletedItems: items }) => {\r\n const deletedItems = _.filter(items, itm => itm.err && !itm.err.ignorable);\r\n const hasErrors = deletedItems.length > 0;\r\n if (hasErrors) {\r\n logger.logTrace('Batch deleting is done with some errors.');\r\n } else {\r\n logger.logTrace('Batch deleting is done successfully.');\r\n }\r\n const folderCount = items ? _.filter(items, itm => !!itm.folderId).length : 0;\r\n const assetCount = items ? _.filter(items, itm => !itm.folderId).length : 0;\r\n onSuccess({ deletedItems, folderCount, assetCount });\r\n };\r\n\r\n return render({\r\n title, i18n, deleteApiAsync, onSuccess: onSuccessWrapper, onError, warningMsg,\r\n });\r\n }, [i18n, logger, render]);\r\n\r\n return {\r\n open,\r\n render: renderConfirmDialog,\r\n };\r\n};\r\n","import React, { useState, useRef, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { EditFolderNameModal } from '../components/edit-folder-name-modal';\r\n\r\nconst RenameFolderModal = ({\r\n folderId,\r\n folderName,\r\n isDialogVisible,\r\n setDialogVisible,\r\n renameFolderAsync,\r\n onSuccess,\r\n onError,\r\n i18n,\r\n logger,\r\n}) => {\r\n const [errorMessage, setErrorMessage] = useState('');\r\n\r\n const closeDialog = useCallback(() => {\r\n setDialogVisible(false);\r\n setErrorMessage('');\r\n }, [setDialogVisible]);\r\n\r\n const onRenameFolder = useCallback((name) => {\r\n logger.logTrace('Confirm to rename folder', { folderName, newFolderName: name });\r\n renameFolderAsync({ folderId, folderName, newFolderName: name }).then(() => {\r\n setDialogVisible(false);\r\n onSuccess({ folderId, folderName, newFolderName: name });\r\n logger.logTrace('rename folder successfully', { folderName, newFolderName: name });\r\n }).catch((alODataErr) => {\r\n const { actionable, uxMessage } = alODataErr;\r\n if (actionable) {\r\n // prompt user to correct\r\n setErrorMessage(i18n.getString(uxMessage));\r\n } else {\r\n logger.logError(alODataErr, { folderName, newFolderName: name });\r\n closeDialog();\r\n onError(i18n.getString(uxMessage));\r\n }\r\n });\r\n }, [closeDialog, folderId, folderName, i18n, logger, onError, onSuccess, renameFolderAsync, setDialogVisible]);\r\n\r\n const onCancel = useCallback(() => {\r\n closeDialog();\r\n logger.logTrace('Cancel to rename folder');\r\n }, [closeDialog, logger]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nRenameFolderModal.propTypes = {\r\n folderId: PropTypes.number,\r\n folderName: PropTypes.string,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isDialogVisible: PropTypes.bool.isRequired,\r\n setDialogVisible: PropTypes.func.isRequired,\r\n renameFolderAsync: PropTypes.func.isRequired,\r\n onSuccess: PropTypes.func.isRequired,\r\n onError: PropTypes.func.isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n logError: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nRenameFolderModal.defaultProps = {\r\n folderId: undefined,\r\n folderName: undefined,\r\n};\r\n\r\nexport const useRenameFolderModal = (i18n, logger) => {\r\n const [isDialogVisible, setDialogVisible] = useState(false);\r\n const folderItemRef = useRef();\r\n\r\n const openModal = (item) => {\r\n folderItemRef.current = item;\r\n setDialogVisible(true);\r\n };\r\n\r\n const render = useCallback((renameFolderAsync, onSuccess, onError) => {\r\n const { folderId, folderName } = folderItemRef.current || {};\r\n return ();\r\n }, [i18n, isDialogVisible, logger]);\r\n\r\n return {\r\n open: openModal,\r\n render,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useSummaryResultDialogStyles = makeStyles({\r\n summaryMessage: {\r\n paddingBottom: '16px',\r\n },\r\n summaryListContainer: {\r\n maxHeight: '300px',\r\n overflowY: 'auto',\r\n paddingBottom: '12px',\r\n },\r\n dialog: {\r\n '&.fui-DialogSurface': {\r\n maxWidth: '778px',\r\n overflowY: 'hidden',\r\n overflowX: 'auto',\r\n '& .fui-DialogContent': {\r\n maxWidth: '724px',\r\n },\r\n '& .fui-DialogActions': {\r\n width: '724px',\r\n ...shorthands.borderTop('1px', 'solid', '#F1F1F1'),\r\n paddingTop: '16px',\r\n },\r\n },\r\n },\r\n grid: {\r\n '&.fui-DataGrid': {\r\n width: 'fit-content',\r\n },\r\n },\r\n gridCell: {\r\n '&.fui-DataGridCell': {\r\n paddingTop: '6px',\r\n paddingBottom: '6px',\r\n '& div': {\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n },\r\n gridHeaderCell: {\r\n '&.fui-DataGridHeaderCell .name': {\r\n fontWeight: 600,\r\n },\r\n },\r\n});\r\n\r\nexport const useImagePreviewStyles = makeStyles({\r\n imagePreviewContainer: {\r\n width: '92px',\r\n height: '60px',\r\n },\r\n});\r\n\r\nexport const useValueWithTooltipViewStyles = makeStyles({\r\n overflow: {\r\n display: 'block',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n overflowLeft: {\r\n display: 'block',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n textAlign: 'left',\r\n direction: 'rtl',\r\n },\r\n customToolTip: {\r\n ...shorthands.padding('0px 10px 10px 10px'),\r\n },\r\n toolTipContentHeader: {\r\n fontWeight: 600,\r\n fontSize: '20px',\r\n lineHeight: '28px',\r\n },\r\n toolTipContent: {\r\n marginTop: '10px',\r\n },\r\n});\r\n\r\nexport const useAssociationsButtonStyles = makeStyles({\r\n associationsButton: {\r\n '&.fui-Button': {\r\n ...shorthands.border('none'),\r\n fontWeight: 'normal',\r\n '&:hover': {\r\n color: '#0078d4',\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Image,\r\n Tooltip,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport { OpenRegular } from '@fluentui/react-icons';\r\n\r\nimport { useAssociationsButtonStyles, useImagePreviewStyles, useValueWithTooltipViewStyles } from '../../styles/summary-result-dialog-style';\r\n\r\nconst ValueWithTooltip = ({\r\n value, valueDescription, ellipsisOnLeft,\r\n}) => {\r\n const classes = useValueWithTooltipViewStyles();\r\n\r\n if (valueDescription) {\r\n return (\r\n \r\n
{value}
\r\n \r\n );\r\n }\r\n return (\r\n \r\n
{value}
\r\n \r\n );\r\n};\r\n\r\nValueWithTooltip.propTypes = {\r\n value: PropTypes.string,\r\n valueDescription: PropTypes.string,\r\n ellipsisOnLeft: PropTypes.bool,\r\n};\r\n\r\nValueWithTooltip.defaultProps = {\r\n value: '',\r\n valueDescription: '',\r\n ellipsisOnLeft: false,\r\n};\r\n\r\nconst Associations = ({\r\n assetId, folderAssetType, availableActions, i18n, navigation, logger,\r\n}) => {\r\n const classes = useAssociationsButtonStyles();\r\n\r\n const [isLoading, setLoading] = useState(false);\r\n const onClick = useCallback(() => {\r\n logger.logTrace('View all ads using this asset clicked');\r\n setLoading(true);\r\n return navigation.gotoAdsPageWithAssetIdFilter({ folderAssetType, assetId }, true)\r\n .finally(() => setLoading(false));\r\n }, [assetId, folderAssetType, logger, navigation]);\r\n\r\n return (\r\n
\r\n {availableActions.gotoAds ? (\r\n }\r\n onClick={onClick}\r\n disabled={isLoading}\r\n className={classes.associationsButton}\r\n >\r\n {i18n.getString(_TL_('View all ads using this asset'))}\r\n \r\n ) : (i18n.getString(_TL_('No associations')))}\r\n {isLoading && }\r\n
\r\n );\r\n};\r\n\r\nAssociations.propTypes = {\r\n assetId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n folderAssetType: PropTypes.string,\r\n availableActions: PropTypes.shape({\r\n gotoAds: PropTypes.bool,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoAdsPageWithAssetIdFilter: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nAssociations.defaultProps = {\r\n folderAssetType: '',\r\n};\r\n\r\nconst ImagePreview = ({\r\n id, name, folderAssetType, thumbnailUrl, onRenderPreview,\r\n}) => {\r\n const classes = useImagePreviewStyles();\r\n let preview = '';\r\n if (onRenderPreview) {\r\n preview = onRenderPreview();\r\n } else if (thumbnailUrl) {\r\n preview = ();\r\n }\r\n\r\n return (\r\n
\r\n {preview}\r\n
\r\n );\r\n};\r\n\r\nImagePreview.propTypes = {\r\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n name: PropTypes.string,\r\n folderAssetType: PropTypes.string,\r\n onRenderPreview: PropTypes.func,\r\n thumbnailUrl: PropTypes.string,\r\n};\r\n\r\nImagePreview.defaultProps = {\r\n id: '',\r\n name: '',\r\n folderAssetType: '',\r\n onRenderPreview: undefined,\r\n thumbnailUrl: undefined,\r\n};\r\n\r\nconst headerWithPopup = (popupId, item, helpPopup) => (\r\n <>\r\n {item.name}\r\n {helpPopup(popupId)}\r\n \r\n);\r\n\r\nexport const colPreview = (i18n, helpPopup) => ({\r\n columnId: 'colPreview',\r\n name: i18n.getString(_TL_('Preview')),\r\n onRender: item => ,\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_Preview', item, helpPopup),\r\n compare: (a, b) => a.thumbnailUrl.localeCompare(b.thumbnailUrl),\r\n});\r\n\r\nexport const colId = (i18n, helpPopup) => ({\r\n columnId: 'colId',\r\n name: i18n.getString(_TL_('ID')),\r\n onRender: item => item.id,\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_ID', item, helpPopup),\r\n compare: (a, b) => a.id.localeCompare(b.id),\r\n});\r\n\r\nexport const colName = (i18n, helpPopup) => ({\r\n columnId: 'colName',\r\n name: i18n.getString(_TL_('Name')),\r\n onRender: item => ,\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_Name', item, helpPopup),\r\n compare: (a, b) => a.name.localeCompare(b.name),\r\n});\r\n\r\nexport const colPath = (i18n, helpPopup) => ({\r\n columnId: 'colPath',\r\n name: i18n.getString(_TL_('Location')),\r\n onRender: item => ,\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_Location', item, helpPopup),\r\n compare: (a, b) => a.path.localeCompare(b.path),\r\n});\r\n\r\nexport const colType = (i18n, helpPopup) => ({\r\n columnId: 'colType',\r\n name: i18n.getString(_TL_('Type')),\r\n onRender: item => item.type,\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_AssetType', item, helpPopup),\r\n compare: (a, b) => a.type.localeCompare(b.type),\r\n});\r\n\r\nexport const colError = (i18n, popupId, helpPopup) => ({\r\n columnId: 'colError',\r\n name: i18n.getString(_TL_('Errors')),\r\n onRender: item => ,\r\n onRenderHeader: item => headerWithPopup(popupId, item, helpPopup),\r\n compare: (a, b) => a.shortErrMsg.localeCompare(b.shortErrMsg),\r\n});\r\nexport const colDeletionError = (i18n, helpPopup) => colError(i18n, 'pop_BA_AssetLibrary_DeletionError', helpPopup);\r\nexport const colMoveError = (i18n, helpPopup) => colError(i18n, 'pop_BA_AssetLibrary_MoveError', helpPopup);\r\n\r\nexport const colAssociations = (i18n, navigation, logger, helpPopup) => ({\r\n columnId: 'colAssociations',\r\n name: i18n.getString(_TL_('Associations')),\r\n onRender: ({\r\n id, folderAssetType, availableActions,\r\n }) => (\r\n \r\n ),\r\n onRenderHeader: item => headerWithPopup('pop_BA_AssetLibrary_Associations', item, helpPopup),\r\n compare: (a, b) => a.availableActions.localeCompare(b.availableActions),\r\n});\r\n\r\nexport const columnSizingOptions = {\r\n colPreview: { minWidth: 100 },\r\n colId: { minWidth: 110, maxWidth: 110 },\r\n colName: { minWidth: 100 },\r\n colPath: { minWidth: 100 },\r\n colType: { minWidth: 80 },\r\n colError: { minWidth: 170 },\r\n colAssociations: { minWidth: 240 },\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n DataGridBody,\r\n DataGridRow,\r\n DataGrid,\r\n DataGridHeader,\r\n DataGridHeaderCell,\r\n DataGridCell,\r\n Dialog,\r\n DialogActions,\r\n DialogBody,\r\n DialogContent,\r\n DialogSurface,\r\n DialogTitle,\r\n Button,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\n\r\nimport {\r\n useSummaryResultDialogStyles,\r\n} from '../../styles/summary-result-dialog-style';\r\n\r\nexport const SummaryResultModal = ({\r\n show,\r\n title,\r\n summary,\r\n items,\r\n columns,\r\n columnSizingOptions,\r\n onClose,\r\n i18n,\r\n}) => {\r\n const classes = useSummaryResultDialogStyles();\r\n\r\n return (\r\n show ?\r\n \r\n \r\n {title}\r\n \r\n \r\n
{summary}
\r\n
\r\n \r\n \r\n \r\n {\r\n item => (\r\n {item.onRenderHeader(item)}\r\n )\r\n }\r\n \r\n \r\n \r\n {\r\n ({ item, rowId }) => (\r\n \r\n {\r\n columnItem => (\r\n {columnItem.onRender(item)}\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 : null\r\n );\r\n};\r\n\r\nSummaryResultModal.propTypes = {\r\n show: PropTypes.bool.isRequired,\r\n title: PropTypes.string.isRequired,\r\n summary: PropTypes.string,\r\n items: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n columns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n columnSizingOptions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nSummaryResultModal.defaultProps = {\r\n summary: '',\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useState, useRef } from 'react';\r\n\r\nimport { FolderIcon, FolderAssetType } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport {\r\n colPreview, colId, colName, colPath, colType, colDeletionError, colMoveError, colAssociations, columnSizingOptions,\r\n} from './columns';\r\n\r\nimport { SummaryResultModal } from './dialog';\r\n\r\nconst ASSET_TYPES = {\r\n [FolderAssetType.Image]: _TL_('Image'),\r\n [FolderAssetType.Video]: _TL_('Video'),\r\n};\r\n\r\nexport const useSummaryResultModal = (i18n, logger, navigation, helpPopup) => {\r\n const [isModalVisible, setModalVisible] = useState(false);\r\n\r\n const titleRef = useRef('');\r\n const summaryRef = useRef('');\r\n const columnsRef = useRef([]);\r\n const itemsRef = useRef([]);\r\n\r\n const openDeleteSummaryResultModal = (title, deletedItems) => {\r\n const columns = [\r\n colPreview(i18n, helpPopup), colName(i18n, helpPopup), colPath(i18n, helpPopup), colType(i18n, helpPopup), colId(i18n, helpPopup),\r\n colDeletionError(i18n, helpPopup), colAssociations(i18n, navigation, logger, helpPopup),\r\n ];\r\n\r\n const items = _.chain(deletedItems)\r\n .filter(itm => itm.err)\r\n .map(({\r\n err, assetId, folderId, assetName, folderName, assetType, path, thumbnailUrl,\r\n }) => ({\r\n id: folderId || assetId,\r\n path,\r\n name: folderName || assetName,\r\n type: (folderId ? i18n.getString(_TL_('Folder')) : i18n.getString(ASSET_TYPES[assetType])) || '',\r\n errorMessage: i18n.getString(err.uxMessage),\r\n shortErrMsg: i18n.getString(err.shortMsg || _TL_('Error')),\r\n availableActions: err.availableActions || {},\r\n err,\r\n folderAssetType: assetType,\r\n thumbnailUrl,\r\n onRenderPreview: folderId ? () => () : undefined,\r\n }))\r\n .value() || [];\r\n\r\n const failedAssetCount = items ? _.filter(items, itm => itm.folderAssetType).length : 0;\r\n const failedFolderCount = items ? _.filter(items, itm => !itm.folderAssetType).length : 0;\r\n if (failedFolderCount > 0 && failedAssetCount > 0) {\r\n const strings = [\r\n _TL_(\"{{failedAssetCount}} asset and {{failedFolderCount}} folder couldn't be deleted:\"),\r\n _TL_(\"{{failedAssetCount}} asset and {{failedFolderCount}} folders couldn't be deleted:\"),\r\n _TL_(\"{{failedAssetCount}} assets and {{failedFolderCount}} folder couldn't be deleted:\"),\r\n _TL_(\"{{failedAssetCount}} assets and {{failedFolderCount}} folders couldn't be deleted:\"),\r\n ];\r\n const strIdx = (Math.min(failedAssetCount - 1, 1) * 2) + Math.min(failedFolderCount - 1, 1);\r\n summaryRef.current = i18n.getString(strings[strIdx], { failedAssetCount, failedFolderCount });\r\n } else if (failedFolderCount > 1) {\r\n summaryRef.current = i18n.getString(_TL_(\"{{failedFolderCount}} folders couldn't be deleted:\"), { failedFolderCount });\r\n } else if (failedFolderCount > 0) {\r\n summaryRef.current = i18n.getString(_TL_(\"1 folder couldn't be deleted:\"));\r\n } else if (failedAssetCount > 1) {\r\n summaryRef.current = i18n.getString(_TL_(\"{{failedAssetCount}} assets couldn't be deleted:\"), { failedAssetCount });\r\n } else {\r\n summaryRef.current = i18n.getString(_TL_(\"1 asset couldn't be deleted:\"));\r\n }\r\n titleRef.current = title;\r\n itemsRef.current = items;\r\n columnsRef.current = columns;\r\n\r\n setModalVisible(true);\r\n };\r\n\r\n const openFolderDeleteSummaryResultModal = (deletedItems) => {\r\n openDeleteSummaryResultModal(i18n.getString(_TL_('Folder deletion errors')), deletedItems);\r\n };\r\n\r\n const openBatchDeleteSummaryResultModal = (deletedItems) => {\r\n openDeleteSummaryResultModal(i18n.getString(_TL_('Bulk deletion errors')), deletedItems);\r\n };\r\n\r\n const openBatchMoveSummaryResultModal = ({ assetsSummary, foldersSummary }) => {\r\n const columns = [\r\n colPreview(i18n, helpPopup), colName(i18n, helpPopup), colType(i18n, helpPopup), colId(i18n, helpPopup), colMoveError(i18n, helpPopup), colAssociations(i18n, navigation, logger, helpPopup),\r\n ];\r\n\r\n const assetErrors = _.chain(assetsSummary).filter(itm => itm.err).map(({\r\n err, assetId: id, assetName: name, folderAssetType, url,\r\n }) => ({\r\n id,\r\n name,\r\n type: i18n.getString(ASSET_TYPES[folderAssetType]) || '',\r\n errorMessage: i18n.getString(err.uxMessage),\r\n shortErrMsg: i18n.getString(err.shortMsg || _TL_('Error')),\r\n availableActions: err.availableActions || {},\r\n err,\r\n folderAssetType,\r\n thumbnailUrl: url,\r\n })).value() || [];\r\n const folderErrors = _.chain(foldersSummary).filter(itm => itm.err).map(({\r\n err, folderId: id, folderName: name,\r\n }) => ({\r\n id,\r\n name,\r\n type: i18n.getString(_TL_('Folder')),\r\n errorMessage: i18n.getString(err.uxMessage),\r\n shortErrMsg: i18n.getString(err.shortMsg || _TL_('Error')),\r\n availableActions: err.availableActions || {},\r\n err,\r\n folderAssetType: '',\r\n onRenderPreview: () => (),\r\n })).value() || [];\r\n\r\n if (assetErrors.length > 0 && folderErrors.length > 0) {\r\n const strings = [\r\n _TL_(\"{{failedAssetCount}} asset and {{failedFolderCount}} folder couldn't be moved:\"),\r\n _TL_(\"{{failedAssetCount}} asset and {{failedFolderCount}} folders couldn't be moved:\"),\r\n _TL_(\"{{failedAssetCount}} assets and {{failedFolderCount}} folder couldn't be moved:\"),\r\n _TL_(\"{{failedAssetCount}} assets and {{failedFolderCount}} folders couldn't be moved:\"),\r\n ];\r\n const strIdx = (Math.min(assetErrors.length - 1, 1) * 2) + Math.min(folderErrors.length - 1, 1);\r\n summaryRef.current = i18n.getString(strings[strIdx], { failedAssetCount: assetErrors.length, failedFolderCount: folderErrors.length });\r\n } else if (assetErrors.length > 1) {\r\n summaryRef.current = i18n.getString(_TL_(\"{{failedAssetCount}} assets couldn't be moved:\"), { failedAssetCount: assetErrors.length });\r\n } else if (assetErrors.length > 0) {\r\n summaryRef.current = i18n.getString(_TL_(\"1 asset couldn't be moved:\"));\r\n } else if (folderErrors.length > 1) {\r\n summaryRef.current = i18n.getString(_TL_(\"{{failedFolderCount}} folders couldn't be moved:\"), { failedFolderCount: folderErrors.length });\r\n } else {\r\n summaryRef.current = i18n.getString(_TL_(\"1 folder couldn't be moved:\"));\r\n }\r\n titleRef.current = i18n.getString(_TL_('Bulk move errors'));\r\n itemsRef.current = [...assetErrors, ...folderErrors];\r\n columnsRef.current = columns;\r\n\r\n setModalVisible(true);\r\n };\r\n\r\n const closeModal = () => {\r\n setModalVisible(false);\r\n };\r\n\r\n const render = useCallback(() => (), [i18n, isModalVisible, logger]);\r\n\r\n return {\r\n openFolderDeleteSummaryResultModal,\r\n openBatchDeleteSummaryResultModal,\r\n openBatchMoveSummaryResultModal,\r\n render,\r\n };\r\n};\r\n","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useToolbarStyles = makeStyles({\r\n toolbar: {\r\n backgroundColor: tokens.colorBrandBackground,\r\n justifyContent: 'space-between',\r\n },\r\n toolbarButton: {\r\n fontWeight: 400,\r\n marginTop: '8px',\r\n marginBottom: '8px',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nimport {\r\n Toolbar,\r\n ToolbarButton,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n DeleteRegular,\r\n ArrowStepOverRegular,\r\n DismissRegular,\r\n} from '@fluentui/react-icons';\r\n\r\nimport { useToolbarStyles } from '../styles/toolbar-style';\r\n\r\nexport const LibraryPageToolbar = ({\r\n i18n,\r\n onDelete,\r\n onMoveTo,\r\n onClear,\r\n selectedCount,\r\n}) => {\r\n const classes = useToolbarStyles();\r\n\r\n return (\r\n \r\n
\r\n }\r\n onClick={onDelete}\r\n appearance=\"primary\"\r\n className={mergeClasses('toolbar-delete-button', classes.toolbarButton)}\r\n >\r\n {i18n.getString(_TL_('Delete'))}\r\n \r\n }\r\n onClick={onMoveTo}\r\n appearance=\"primary\"\r\n className={classNames('toolbar-move-button', classes.toolbarButton)}\r\n >\r\n {i18n.getString(_TL_('Move to folder'))}\r\n \r\n
\r\n }\r\n onClick={onClear}\r\n appearance=\"primary\"\r\n className={classes.toolbarButton}\r\n aria-label={i18n.getString(_TL_('Clear {{selectedCount}} selected'), { selectedCount })}\r\n >\r\n {i18n.getString(_TL_('{{selectedCount}} selected'), { selectedCount })}\r\n \r\n
\r\n );\r\n};\r\n\r\nLibraryPageToolbar.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n onMoveTo: PropTypes.func.isRequired,\r\n onClear: PropTypes.func.isRequired,\r\n selectedCount: PropTypes.number.isRequired,\r\n};\r\n","/* eslint-disable no-unused-vars */\r\n/* eslint-disable max-len */\r\nimport _ from 'underscore';\r\nimport { Promise } from 'bluebird';\r\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button } from '@fluentui/react-components';\r\n\r\n// import { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n// import {\r\n// ClarityTags, useClarityTags,\r\n// GridSectionName,\r\n// CSMLSearchLocation,\r\n// ROOT_FOLDER_ID,\r\n// RealUsedFlagSuffix,\r\n// handleRealUsedFlag,\r\n// addAssetLibrarySurveyTriggerFlag,\r\n// AssetLibrarySurveyTriggerFlag,\r\n// } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport {\r\n AdsStudioLibraryPageContent, GridSectionName, AdsStudioAssetGridCell, HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { AdsStudioFoldersGridCellWithContextMenu } from './components/folders-grid-cell-with-context-menu';\r\n\r\nimport { useCreateFolderModal } from './hooks/use-create-folder-modal';\r\nimport { useDeleteFolderConfirmDialog, useBatchDeleteConfirmDialog } from './hooks/use-delete-confirm-dialog';\r\nimport { useRenameFolderModal } from './hooks/use-rename-folder-modal';\r\nimport { useSummaryResultModal } from './components/summary-result-dialog';\r\nimport { useDragAndDropConfirmDialog } from './hooks/use-drag-and-drop-confirm-dialog';\r\n\r\n// import { AddFoldersTeachingBubble } from './add-folders-teaching-bubble';\r\n// import { AssetLibraryAssetGridCell } from './cells/asset-grid-cell';\r\n// import { AssetLibraryFoldersGridCellWithContextMenu } from './cells/folders-grid-cell-with-context-menu';\r\n// import { useAssetGridCellActions } from './cells/use-asset-grid-cell-actions';\r\n// import { CustomAddAssetsButton } from './custom-add-assets-button';\r\nimport { LibraryPageToolbar } from './components/toolbar';\r\nimport { FolderAssetType } from '../../../../ads-studio-app-shared-components/src/model';\r\n\r\nexport const LibraryPageComponent = ({\r\n dataService,\r\n navigation,\r\n i18n,\r\n dateFormat,\r\n ianaTimeZone,\r\n assetLibraryUserPreferences,\r\n adsStudioUserPreferences,\r\n assetLibraryAccountPreferences,\r\n reload,\r\n logger,\r\n isReadonly,\r\n pagePerfMarker: libraryPagePerfMarker,\r\n allowedAssetType,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n isAdsStudioAIGCMVPEnabled,\r\n isAIGCRegionRestricted,\r\n useBatchMoveModalHook,\r\n notificationApi,\r\n renderHelpPopup,\r\n targetDropFolder,\r\n resetTargetDropFolder,\r\n setDataLoaded,\r\n permissions,\r\n ...rest\r\n}) => {\r\n const [reloadingFolders, setReloadingFolders] = useState(false);\r\n\r\n const [searchLocationFilter, setSearchLocationFilter] = useState(null);\r\n\r\n const [selectedAssets, setSelectedAssets] = useState([]);\r\n const [selectedFolders, setSelectedFolders] = useState([]);\r\n const [batchDeleteWarningMsg, setBatchDeleteWarningMsg] = useState('');\r\n const singleImagePromises = useRef({});\r\n\r\n /* istanbul ignore next */\r\n const selectedItemCount = useMemo(() => (selectedAssets ? selectedAssets.length : 0)\r\n + (selectedFolders ? selectedFolders.length : 0), [selectedAssets, selectedFolders]);\r\n\r\n const createFolderModal = useCreateFolderModal(aid, i18n, logger);\r\n const renameFolderModal = useRenameFolderModal(i18n, logger);\r\n const confirmDeleteFolderDialog = useDeleteFolderConfirmDialog(i18n, logger);\r\n const confirmBatchDeleteDialog = useBatchDeleteConfirmDialog(i18n, logger);\r\n const confirmDragAndDropDialog = useDragAndDropConfirmDialog(i18n, logger);\r\n const batchMoveModal = useBatchMoveModalHook({\r\n i18n, logger, aid, cid, oDataConfig, dateFormat, notificationApi, ...rest,\r\n });\r\n const summaryResultModal = useSummaryResultModal(i18n, logger, navigation, renderHelpPopup);\r\n\r\n // reset selection state when changing folders\r\n const resetSelectionState = useCallback(() => {\r\n setSelectedFolders([]);\r\n setSelectedAssets([]);\r\n }, []);\r\n\r\n // const {\r\n // onCellEditClick, onCellDetailsClick,\r\n // } = useAssetGridCellActions({\r\n // logger, navigation, resetSelectionState, preference: assetLibraryAccountPreferences,\r\n // });\r\n\r\n const {\r\n assets,\r\n loadMoreData,\r\n totalAssetCount,\r\n createFolder,\r\n reloadFolders,\r\n navigateIntoFolder,\r\n deleteFolder,\r\n renameFolder,\r\n batchDelete,\r\n batchMove,\r\n currentFolderId,\r\n resetFolderData,\r\n folders,\r\n getImageById,\r\n reloadFolderPathTreeItem,\r\n renameAsset,\r\n } = dataService;\r\n\r\n useEffect(() => {\r\n if (navigation) {\r\n navigation.updateAssetDetailsParams({ assets });\r\n }\r\n }, [assets, navigation]);\r\n\r\n useEffect(() => () => {\r\n resetTargetDropFolder();\r\n }, [resetTargetDropFolder]);\r\n\r\n useEffect(() => {\r\n resetSelectionState();\r\n }, [currentFolderId, resetSelectionState]);\r\n\r\n usePageActiveTimeTracker(logger, 'Library');\r\n\r\n /* istanbul ignore next */\r\n const showNotificationError = useCallback((msg, options) => {\r\n const { buttonLabel, onButtonClick, autoClose = true } = options || {};\r\n let nid = null;\r\n const onClick = () => {\r\n /* istanbul ignore if */\r\n if (nid && autoClose) {\r\n notificationApi.dismiss(nid);\r\n nid = null;\r\n }\r\n onButtonClick();\r\n };\r\n /* istanbul ignore if */\r\n if (msg && buttonLabel && onButtonClick) {\r\n // eslint-disable-next-line react/no-danger\r\n nid = notificationApi.showWarning({' '});\r\n } else if (msg) {\r\n notificationApi.showWarning(msg);\r\n }\r\n }, [notificationApi]);\r\n\r\n // useClarityTags([ClarityTags.LaunchedAssetLibrary]);\r\n\r\n // reset selection when current folder changes\r\n useEffect(() => {\r\n resetSelectionState();\r\n }, [currentFolderId, resetSelectionState]);\r\n\r\n useEffect(() => {\r\n /* istanbul ignore if */\r\n if (targetDropFolder && targetDropFolder.newTargetFolder) {\r\n confirmDragAndDropDialog.open({ targetFolder: targetDropFolder.folder });\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [targetDropFolder]);\r\n\r\n const onCreateFolderClick = useCallback(() => {\r\n // create folder\r\n createFolderModal.open();\r\n }, [createFolderModal]);\r\n\r\n const renderTilesGridCell = useCallback(({\r\n item, index, searchText, sectionName, selected, selectItem,\r\n }) => {\r\n const onSelectCell = () => {\r\n selectItem(!selected);\r\n };\r\n\r\n const onDrag = () => {\r\n if (!selected) {\r\n selectItem(true);\r\n }\r\n };\r\n\r\n // render default folder cells\r\n if (sectionName === GridSectionName.Folder) {\r\n const currentListItem = document.getElementById(`list-item-${index}`);\r\n\r\n const onFolderClick = () => {\r\n const { folderId } = item || {};\r\n if (folderId) {\r\n resetSelectionState();\r\n navigateIntoFolder({ id: folderId });\r\n logger.logTrace('Navigate into folder in asset library', { folderId });\r\n }\r\n };\r\n\r\n const onSelectFolder = () => {\r\n onSelectCell();\r\n if (currentListItem) {\r\n currentListItem.focus();\r\n }\r\n };\r\n\r\n const onSelectMenuItemClick = () => {\r\n setSelectedFolders([item]);\r\n selectItem(true);\r\n if (currentListItem) {\r\n currentListItem.focus();\r\n }\r\n };\r\n\r\n const onRenameMenuItemClick = (renameItem) => {\r\n // handleRealUsedFlag(assetLibraryAccountPreferences, RealUsedFlagSuffix.App);\r\n renameFolderModal.open(renameItem);\r\n };\r\n\r\n const onDeleteMenuItemClick = (deleteItem) => {\r\n // handleRealUsedFlag(assetLibraryAccountPreferences, RealUsedFlagSuffix.App);\r\n confirmDeleteFolderDialog.open(deleteItem);\r\n };\r\n\r\n const onDrop = () => {\r\n confirmDragAndDropDialog.open({ targetFolder: item });\r\n };\r\n\r\n const onViewPerformanceClick = (subFolder) => {\r\n const { folderId, folderName } = subFolder || {};\r\n logger.logTrace(`Clicked view performance context menu item, folderId: ${folderId}, folderName: ${folderName}`);\r\n if (folderId) {\r\n resetSelectionState();\r\n resetFolderData();\r\n navigateIntoFolder({ id: folderId });\r\n navigation.gotoPerformancePage();\r\n }\r\n };\r\n\r\n const FoldersGridCell = AdsStudioFoldersGridCellWithContextMenu;\r\n\r\n return (\r\n
\r\n 0}\r\n selected={selected}\r\n allowedAssetType={allowedAssetType}\r\n onSelectMenuItemClick={onSelectMenuItemClick}\r\n onOpenMenuItemClick={onFolderClick}\r\n onRenameMenuItemClick={onRenameMenuItemClick}\r\n onDeleteMenuItemClick={onDeleteMenuItemClick}\r\n onViewPerformanceClick={onViewPerformanceClick}\r\n isReadonly={isReadonly}\r\n selectedItemCount={selectedItemCount}\r\n draggable\r\n onDrag={onDrag}\r\n droppable={!selected}\r\n onDrop={onDrop}\r\n />\r\n
\r\n );\r\n }\r\n\r\n const onCellDetailsClick = (assetItem) => {\r\n const { id, folderAssetType } = assetItem || {};\r\n resetSelectionState();\r\n navigation.gotoAssetDetails({\r\n assetId: id, assets, totalAssetCount, folderAssetType, loadMoreData, renameAsset,\r\n });\r\n };\r\n\r\n const onCellEditClick = (assetItem) => {\r\n const { id } = assetItem || {};\r\n /* istanbul ignore if */\r\n if (assetItem && assetItem.folderAssetType === FolderAssetType.Video && assetItem.id && assetItem.metaData) {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Video Details: edit video', { assetId: id });\r\n }\r\n navigation.gotoEditVideoPage({ videoId: item.id });\r\n } else if (assetItem && assetItem.folderAssetType === FolderAssetType.Image) {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId: id });\r\n }\r\n navigation.gotoEditImagePage({ imageId: id, folderId: currentFolderId });\r\n }\r\n };\r\n\r\n return (\r\n 0}\r\n permissions={permissions}\r\n />\r\n );\r\n }, [allowedAssetType, assets, confirmDeleteFolderDialog, confirmDragAndDropDialog, currentFolderId, i18n, isReadonly, loadMoreData, logger, navigateIntoFolder, navigation, renameAsset, renameFolderModal, resetFolderData, resetSelectionState, selectedItemCount, totalAssetCount, permissions]);\r\n\r\n const renderToolbar = useCallback(() => {\r\n const onDeleteClick = (item) => {\r\n // handleRealUsedFlag(assetLibraryAccountPreferences, RealUsedFlagSuffix.App);\r\n confirmBatchDeleteDialog.open(item);\r\n };\r\n\r\n const onMoveToClick = (item) => {\r\n // handleRealUsedFlag(assetLibraryAccountPreferences, RealUsedFlagSuffix.App);\r\n batchMoveModal.open(item);\r\n };\r\n\r\n return (\r\n selectedItemCount > 0 ?\r\n
\r\n \r\n
: null\r\n );\r\n }, [selectedItemCount, isReadonly, i18n, resetSelectionState, confirmBatchDeleteDialog, batchMoveModal]);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load assets. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const onSelectionChange = useCallback(({\r\n sectionName, selectedItems, item, selected,\r\n }) => {\r\n if (sectionName === GridSectionName.Folder) {\r\n setSelectedFolders([...selectedItems]);\r\n } else if (sectionName === GridSectionName.Asset) {\r\n if (selected && getImageById && item && item.metadata) {\r\n // preload image data\r\n const {\r\n id = '',\r\n } = item;\r\n singleImagePromises.current[id] = getImageById({ imageId: id, useCache: false });\r\n }\r\n setSelectedAssets([...selectedItems]);\r\n }\r\n }, [getImageById]);\r\n\r\n useEffect(() => {\r\n if (getImageById && selectedAssets.length > 0) {\r\n const checkSelectedAssetsPromise = selectedAssets.map((asset) => {\r\n if (asset && asset.metadata) {\r\n const {\r\n id = '',\r\n } = asset;\r\n const previousPromise = singleImagePromises.current[id];\r\n return previousPromise || getImageById({ imageId: id, useCache: false });\r\n }\r\n return Promise.resolve({});\r\n });\r\n\r\n Promise.all(checkSelectedAssetsPromise).then((assetsList) => {\r\n const hasVideoImage = assetsList.some(asset => asset && asset.isSceneKeyFrame);\r\n if (hasVideoImage) {\r\n setBatchDeleteWarningMsg(i18n.getString(_TL_('Deleted images will still serve in any video ads that currently use it and cannot be edited.')));\r\n } else {\r\n setBatchDeleteWarningMsg('');\r\n }\r\n });\r\n }\r\n }, [getImageById, i18n, selectedAssets]);\r\n\r\n const sectionSelectedItems = useMemo(() => ({\r\n [GridSectionName.Folder]: selectedFolders,\r\n [GridSectionName.Asset]: selectedAssets,\r\n }), [selectedAssets, selectedFolders]);\r\n\r\n const callAsyncApi = useCallback(asyncApi => (...params) => {\r\n setReloadingFolders(true);\r\n return asyncApi(...params).then((result) => {\r\n // reload grids\r\n reloadFolders().finally(() => {\r\n setReloadingFolders(false);\r\n });\r\n const destFolderId = params[0] && params[0].destFolderId;\r\n const reloadFolderPathTreeFolderIdArr = [currentFolderId];\r\n if (destFolderId) {\r\n reloadFolderPathTreeFolderIdArr.push(destFolderId);\r\n }\r\n // reload folder path tree\r\n reloadFolderPathTreeItem(reloadFolderPathTreeFolderIdArr);\r\n return result;\r\n }).tapCatch(() => {\r\n setReloadingFolders(false);\r\n }).finally(() => {\r\n resetSelectionState();\r\n });\r\n }, [currentFolderId, reloadFolderPathTreeItem, reloadFolders, resetSelectionState]);\r\n\r\n const createFolderAsync = callAsyncApi(createFolder);\r\n const renameFolderAsync = callAsyncApi(renameFolder);\r\n const deleteFolderAsync = callAsyncApi(deleteFolder);\r\n const batchDeleteAsync = callAsyncApi(({ onItemDeleted }) => batchDelete({ folders: selectedFolders, assets: selectedAssets, onItemDeleted }));\r\n const batchMoveAsync = callAsyncApi(({ destFolderId }) => batchMove({ destFolderId, folders: selectedFolders, assets: selectedAssets }));\r\n\r\n const onCreateFolderSuccess = (folderName) => {\r\n notificationApi.showInfo(i18n.getString(_TL_('Your folder {{name}} was successfully created.'), { name: folderName }));\r\n };\r\n\r\n const onRenameFolderSuccess = ({ folderName, newFolderName }) => {\r\n notificationApi.showInfo(i18n.getString(_TL_('The {{folderName}} folder was successfully renamed to {{newFolderName}}.'), { folderName, newFolderName }));\r\n };\r\n\r\n const onDeleteFolderSuccess = ({ deletedItems, folderName }) => {\r\n if (_.find(deletedItems, itm => !!itm.err)) {\r\n showNotificationError(i18n.getString(_TL_(\"The {{folderName}} folder couldn't be deleted due to errors. To review the errors, select \"), { folderName }), {\r\n buttonLabel: i18n.getString(_TL_('View details')),\r\n onButtonClick: () => {\r\n logger.logTrace('View deleting folder details result');\r\n summaryResultModal.openFolderDeleteSummaryResultModal(deletedItems);\r\n },\r\n });\r\n } else {\r\n notificationApi.showInfo(i18n.getString(_TL_('The {{folderName}} folder was successfully deleted.'), { folderName }));\r\n }\r\n };\r\n\r\n const onBatchDeleteSuccess = ({ deletedItems, folderCount, assetCount }) => {\r\n if (_.find(deletedItems, itm => !!itm.err)) {\r\n showNotificationError(i18n.getString(_TL_(\"One or more items couldn't be deleted due to errors. To review the errors, select \")), {\r\n buttonLabel: i18n.getString(_TL_('View details')),\r\n onButtonClick: () => {\r\n logger.logTrace('View batch deleting details result');\r\n summaryResultModal.openBatchDeleteSummaryResultModal(deletedItems);\r\n },\r\n });\r\n } else {\r\n notificationApi.showInfo(i18n.getString(\r\n _TL_('({{folderCount}} folders, {{assetCount}} assets) were successfully deleted.'),\r\n { folderCount, assetCount }\r\n ));\r\n }\r\n };\r\n\r\n const onBatchMoveSuccess = ({ assetsSummary, foldersSummary, hasError }) => {\r\n if (hasError) {\r\n showNotificationError(i18n.getString(_TL_(\"One or more items couldn't be moved due to errors. To review the errors, select \")), {\r\n buttonLabel: i18n.getString(_TL_('View details')),\r\n onButtonClick: () => {\r\n logger.logTrace('View batch moving details result');\r\n summaryResultModal.openBatchMoveSummaryResultModal({ assetsSummary, foldersSummary });\r\n },\r\n });\r\n } else {\r\n notificationApi.showInfo(i18n.getString(\r\n _TL_('All items ({{folderCount}} folders, {{assetCount}} assets) were successfully moved. '),\r\n { folderCount: foldersSummary.length, assetCount: assetsSummary.length }\r\n ));\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {createFolderModal.render(createFolderAsync, onCreateFolderSuccess, showNotificationError)}\r\n {renameFolderModal.render(renameFolderAsync, onRenameFolderSuccess, showNotificationError)}\r\n {confirmBatchDeleteDialog.render(batchDeleteAsync, onBatchDeleteSuccess, showNotificationError, batchDeleteWarningMsg)}\r\n {confirmDeleteFolderDialog.render(deleteFolderAsync, onDeleteFolderSuccess, showNotificationError)}\r\n {confirmDragAndDropDialog.render(batchMoveAsync, onBatchMoveSuccess, showNotificationError)}\r\n {batchMoveModal.render(false, currentFolderId, batchMoveAsync, onBatchMoveSuccess, showNotificationError)}\r\n {summaryResultModal.render()}\r\n
\r\n );\r\n};\r\n\r\nLibraryPageComponent.propTypes = {\r\n dataService: PropTypes.shape({\r\n assets: PropTypes.arrayOf(PropTypes.shape({})),\r\n folders: PropTypes.arrayOf(PropTypes.shape({})),\r\n totalAssetCount: PropTypes.number,\r\n imageCroppingTasks: PropTypes.shape({}),\r\n loadData: PropTypes.func,\r\n loadMoreData: PropTypes.func,\r\n createFolder: PropTypes.func,\r\n reloadFolders: PropTypes.func,\r\n navigateIntoFolder: PropTypes.func,\r\n deleteFolder: PropTypes.func,\r\n renameFolder: PropTypes.func,\r\n batchDelete: PropTypes.func,\r\n batchMove: PropTypes.func,\r\n resetFolderData: PropTypes.func,\r\n getImageById: PropTypes.func,\r\n currentFolderId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n reloadFolderPathTreeItem: PropTypes.func,\r\n renameAsset: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n logError: PropTypes.func,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoAddImage: PropTypes.func.isRequired,\r\n gotoEditImage: PropTypes.func.isRequired,\r\n gotoItemDetail: PropTypes.func.isRequired,\r\n gotoVideoDetail: PropTypes.func,\r\n gotoPerformancePage: PropTypes.func.isRequired,\r\n // goBack: PropTypes.func.isRequired,\r\n }).isRequired,\r\n // lcid: PropTypes.number.isRequired,\r\n ianaTimeZone: PropTypes.string.isRequired,\r\n dateFormat: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n getToday: PropTypes.func,\r\n formatCivilDate: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n cid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n assetLibraryUserPreferences: PropTypes.shape({\r\n sortBy: PropTypes.string,\r\n setSortBy: PropTypes.func,\r\n }),\r\n assetLibraryAccountPreferences: PropTypes.shape({}),\r\n isReadonly: PropTypes.bool,\r\n reload: PropTypes.shape({}), // if changed, force to reload\r\n perfMarker: PropTypes.shape({\r\n done: PropTypes.func,\r\n }).isRequired,\r\n allowedAssetType: PropTypes.string,\r\n isAssetLibraryAIGCMVPEnabled: PropTypes.bool,\r\n isAdsStudioAIGCMVPEnabled: PropTypes.bool,\r\n useBatchMoveModalHook: PropTypes.func.isRequired,\r\n renderHelpPopup: PropTypes.func.isRequired,\r\n notificationApi: PropTypes.shape({\r\n showInfo: PropTypes.func,\r\n showWarning: PropTypes.func,\r\n dismiss: PropTypes.func,\r\n }).isRequired,\r\n targetDropFolder: PropTypes.shape({}),\r\n isAIGCRegionRestricted: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nLibraryPageComponent.defaultProps = {\r\n assetLibraryUserPreferences: null,\r\n assetLibraryAccountPreferences: null,\r\n isReadonly: false,\r\n reload: null,\r\n allowedAssetType: null,\r\n isAssetLibraryAIGCMVPEnabled: false,\r\n isAdsStudioAIGCMVPEnabled: false,\r\n targetDropFolder: null,\r\n isAIGCRegionRestricted: false,\r\n permissions: { dynamic: {} },\r\n};\r\n","import React, { useState, useCallback, useRef } from 'react';\r\n\r\nimport { ConfirmDialog } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const useDragAndDropConfirmDialog = (i18n, logger) => {\r\n const [showConfirmDialog, setShowConfirmDialog] = useState(false);\r\n const [showUIBlocker, setShowUIBlocker] = useState(false);\r\n const targetFolderItemRef = useRef();\r\n\r\n const open = ({ targetFolder }) => {\r\n setShowConfirmDialog(true);\r\n targetFolderItemRef.current = targetFolder;\r\n };\r\n\r\n const render = useCallback((batchMoveApiAsync, onSuccess, onError) => {\r\n const targetFolderItem = targetFolderItemRef.current;\r\n\r\n const { folderId, folderName } = targetFolderItem || {};\r\n\r\n const title = i18n.getString(_TL_('Are you sure you want to move the selected item(s) to the folder \"{{folderName}}\"?'), { folderName });\r\n\r\n const batchMoveApiAsyncWrapper = () => {\r\n setShowUIBlocker(true);\r\n return batchMoveApiAsync({ destFolderId: folderId })\r\n .then((result) => {\r\n onSuccess(result);\r\n\r\n const { hasError } = result || {};\r\n if (hasError) {\r\n logger.logTrace('Drag and drop to move items is done with some errors');\r\n } else {\r\n logger.logTrace('Drag and drop to move items successfully');\r\n }\r\n }).catch((alODataErr) => {\r\n const { getUXMessage } = alODataErr;\r\n logger.logError(alODataErr);\r\n onError(getUXMessage(i18n));\r\n }).finally(() => {\r\n setShowUIBlocker(false);\r\n setShowConfirmDialog(false);\r\n });\r\n };\r\n\r\n const onCancel = () => {\r\n setShowConfirmDialog(false);\r\n };\r\n\r\n return ();\r\n }, [i18n, logger, showConfirmDialog, showUIBlocker]);\r\n\r\n return {\r\n open,\r\n render,\r\n };\r\n};\r\n","import React, { useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useJsData } from '@bingads-webui-cc-react/js-data-rest';\r\nimport {\r\n getEntryCardData,\r\n AddAssetEntryCard,\r\n isValidXandrAccount,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useVideoCardContainerStyle } from '../../styles';\r\n\r\nexport const AssetsEntryCardContainer = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n navigation,\r\n logger,\r\n permissions,\r\n}) => {\r\n const classes = useVideoCardContainerStyle();\r\n const openSystemUploadRef = useRef(null);\r\n const isVideoTemplateEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n const isXandrIntEnabled = useMemo(() => permissions.dynamic.XandrIntegrationEnabled, [permissions]);\r\n // eslint-disable-next-line no-restricted-globals\r\n const { data: account } = useJsData(jsData => (isXandrIntEnabled ? jsData.Account.find(aid) : Promise.resolve()), [aid, isXandrIntEnabled]);\r\n const isXandrIntegrationEnabled = useMemo(() => (isXandrIntEnabled ? isValidXandrAccount(account) : false), [account, isXandrIntEnabled]);\r\n\r\n let cardKeys = isVideoTemplateEnabled ? ['Create', 'Upload', 'Website'] : ['Upload', 'Website'];\r\n\r\n if (isXandrIntegrationEnabled) {\r\n cardKeys = [...cardKeys, 'Invest'];\r\n }\r\n\r\n const cardData = getEntryCardData({\r\n i18n,\r\n isVideoPage: true,\r\n cardKeys,\r\n onClickCreate: () => {\r\n navigation.gotoVideoTemplatePage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickUpload: () => {\r\n openSystemUploadRef.current = {};\r\n navigation.gotoUploadFilesPanelPage({\r\n aid, cid, oDataConfig, i18n, mode: 'video', openSystemUpload: openSystemUploadRef.current,\r\n });\r\n },\r\n onClickWebsite: () => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add video from URl');\r\n }\r\n navigation.gotoAddVideoPanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n onClickInvest: () => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Add asset from invest');\r\n }\r\n navigation.gotoInvestVideoPanelPage({\r\n aid, cid, oDataConfig, i18n,\r\n });\r\n },\r\n isXandrIntegrationEnabled,\r\n });\r\n\r\n return (\r\n <>\r\n
\r\n {cardData.map(card => (\r\n \r\n ))}\r\n
\r\n \r\n );\r\n};\r\n\r\n\r\nAssetsEntryCardContainer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoUploadFilesPanelPage: PropTypes.func,\r\n gotoAddVideoPanelPage: PropTypes.func,\r\n gotoInvestVideoPanelPage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n};\r\n\r\nAssetsEntryCardContainer.defaultProps = {\r\n permissions: { dynamic: {} },\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { AssetsEntryCardContainer } from './assets-entry-cards-container';\r\nimport { useVideoPageTopBannerContainerStyle } from '../../styles';\r\n\r\nconst TopVideoPageBannerComponent = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n navigation,\r\n logger,\r\n permissions,\r\n}) => {\r\n const classes = useVideoPageTopBannerContainerStyle();\r\n return (\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('Videos'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('Add new videos or search for existing ones'))}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nTopVideoPageBannerComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({}).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nexport default TopVideoPageBannerComponent;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { EmptyViewIcons } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useVideoEmptyViewStyle } from '../../styles';\r\n\r\nexport const VideoEmptyView = ({ i18n, isFilterResult }) => {\r\n const classes = useVideoEmptyViewStyle();\r\n\r\n return (\r\n
\r\n
\r\n \"Empty\r\n
\r\n
\r\n {isFilterResult ? i18n.getString(_TL_('No videos match your search. Please try again.')) : i18n.getString(_TL_('You haven\\'t added any videos yet. Choose from the options above.'))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nVideoEmptyView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isFilterResult: PropTypes.bool,\r\n};\r\n\r\nVideoEmptyView.defaultProps = {\r\n isFilterResult: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n AdsStudioAssetGridCell,\r\n GridSectionName,\r\n SectionTilesGrid,\r\n DEFAULT_PAGE_SIZE,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const VideoGridView = ({\r\n i18n,\r\n dataService,\r\n logger,\r\n onFailedToLoadData,\r\n searchText,\r\n navigation,\r\n permissions,\r\n}) => {\r\n const {\r\n assets,\r\n totalAssetCount,\r\n loadMoreData,\r\n renameAsset,\r\n } = dataService;\r\n\r\n const videosGridSection = useMemo(() => ({\r\n sectionName: GridSectionName.Asset,\r\n sectionClassName: 'ads-studio-video-section',\r\n itemKey: 'id',\r\n items: assets,\r\n totalItemCount: totalAssetCount,\r\n config: {\r\n scrollContainer: '[role=\"main\"]',\r\n minItemHeight: 42,\r\n },\r\n }), [assets, totalAssetCount]);\r\n\r\n const sectionGridData = useMemo(\r\n () => ([videosGridSection]),\r\n [videosGridSection]\r\n );\r\n\r\n const onRenderCell = useCallback(({ item }) => {\r\n const { _index, id, folderAssetType } = item;\r\n\r\n const onCellDetailsClick = () => {\r\n navigation.gotoAssetDetails({\r\n assetId: id, assets, totalAssetCount, folderAssetType, loadMoreData, renameAsset,\r\n });\r\n };\r\n\r\n /* istanbul ignore next */\r\n const onEditClick = () => {\r\n if (item && item.id && item.metaData) {\r\n navigation.gotoEditVideoPage({ videoId: item.id });\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n }, [assets, i18n, loadMoreData, logger, navigation, renameAsset, searchText, totalAssetCount]);\r\n\r\n const loadNextPage = useCallback(() => {\r\n loadMoreData({ count: DEFAULT_PAGE_SIZE }).catch((err) => {\r\n onFailedToLoadData(err);\r\n });\r\n }, [loadMoreData, onFailedToLoadData]);\r\n\r\n useEffect(() => {\r\n if (navigation) {\r\n navigation.updateAssetDetailsParams({ assets });\r\n }\r\n }, [assets, navigation]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nVideoGridView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n onFailedToLoadData: PropTypes.func,\r\n searchText: PropTypes.string,\r\n navigation: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nVideoGridView.defaultProps = {\r\n dataService: {},\r\n onFailedToLoadData: _.noop,\r\n searchText: '',\r\n};\r\n","import _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport React, { useContext, useEffect, useState, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n VideosFilterBar,\r\n FilterContext,\r\n FolderAssetType,\r\n AdsStudioSpinner,\r\n CSMLVideoDuration,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { VideoPageTopBannerComponent, VideoEmptyView, VideoGridView } from './components';\r\nimport { useVideoPageStyle } from '../styles';\r\n\r\nexport const VideosPageComponent = ({\r\n i18n,\r\n logger,\r\n adsStudioUserPreferences,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n dataService,\r\n notificationApi,\r\n navigation,\r\n reload,\r\n pagePerfMarker: videoPagePerfMarker,\r\n permissions,\r\n setDataLoaded,\r\n}) => {\r\n const classes = useVideoPageStyle();\r\n\r\n const {\r\n totalAssetCount,\r\n loadData,\r\n } = dataService;\r\n\r\n const [isPageInited, setPageInited] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n\r\n const { filterBar } = useContext(FilterContext);\r\n\r\n const {\r\n searchText,\r\n sortBy,\r\n minDurationFilter,\r\n maxDurationFilter,\r\n } = useMemo(() => filterBar.getFilters(), [filterBar]);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load videos. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n // init page\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n setPageInited(true);\r\n }\r\n }, [isPageInited]);\r\n\r\n usePageActiveTimeTracker(logger, 'Video');\r\n\r\n // load data for initial page load\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n\r\n if (reload) { // Important! Add a trivial log so that reload will be an explicit dep.\r\n logger.logTrace('force to reload');\r\n }\r\n videoPagePerfMarker.willFetchData();\r\n setLoadingData(true);\r\n loadData({\r\n assetTypeFilter: FolderAssetType.Image,\r\n isGlobalSearch: true,\r\n searchText,\r\n sortBy,\r\n perfMarker: videoPagePerfMarker.createChild('videoPageLoadData'),\r\n isVideoDurationBoundaryIncluded: true,\r\n minVideoDuration: minDurationFilter,\r\n maxVideoDuration: maxDurationFilter > CSMLVideoDuration.max ? null : maxDurationFilter, // when maxDurationFilter is over max value, remove the maxVideoDuration filter\r\n })\r\n .catch(() => {\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n videoPagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n });\r\n }, [isPageInited, loadData, onFailedToLoadData, searchText, sortBy, reload, logger, minDurationFilter, maxDurationFilter]);\r\n\r\n const isPageLoading = !isPageInited || loadingData;\r\n const isFilterResult = useMemo(() => (\r\n !_.isEmpty(searchText)\r\n || !(minDurationFilter === CSMLVideoDuration.min && maxDurationFilter === CSMLVideoDuration.unlimited)\r\n ), [maxDurationFilter, minDurationFilter, searchText]);\r\n\r\n return (\r\n
\r\n {isPageLoading && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {\r\n totalAssetCount && totalAssetCount > 0 ?\r\n :\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nVideosPageComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}),\r\n notificationApi: PropTypes.shape({}),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nVideosPageComponent.defaultProps = {\r\n dataService: {},\r\n notificationApi: {},\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useTemplateVideoStyles = makeStyles({\r\n videoCard: {\r\n width: '300px',\r\n filter: 'drop-shadow(0px 0.3px 0.9px rgba(0, 0, 0, 0.1)) drop-shadow(0px 1.6px 3.6px rgba(0, 0, 0, 0.13))',\r\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalNone),\r\n ...shorthands.borderRadius('6px'),\r\n },\r\n videoCardThumbnail: {\r\n objectFit: 'cover',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n flexColumn: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n justifyContent: 'center',\r\n },\r\n templateWithCaption: {\r\n ...shorthands.gap(tokens.spacingVerticalM),\r\n },\r\n caption: {\r\n ...shorthands.gap(tokens.spacingVerticalXS),\r\n },\r\n darkGrayText: {\r\n color: '3B3B4F',\r\n },\r\n grayText: {\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n});\r\n\r\nexport const useTemplateGridStyles = makeStyles({\r\n gridContainer: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'flex-start',\r\n alignItems: 'flex-start',\r\n rowGap: tokens.spacingVerticalL,\r\n columnGap: tokens.spacingHorizontalL,\r\n marginTop: tokens.spacingVerticalXXL,\r\n },\r\n skeletonContainer: {\r\n alignItems: 'center',\r\n display: 'grid',\r\n position: 'relative',\r\n gridTemplateColumns: 'repeat(5, 1fr)',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n templateBody: {\r\n paddingTop: '10px',\r\n },\r\n filtersRow: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n flexWrap: 'wrap',\r\n marginTop: '15px',\r\n ...shorthands.gap(tokens.spacingHorizontalS),\r\n },\r\n filterButton: {\r\n minWidth: 'auto',\r\n whiteSpace: 'nowrap',\r\n },\r\n});\r\n","import React, { useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { List, ListItem } from '@fluentui/react-list-preview';\r\n\r\nimport { Card, mergeClasses, Title2, Caption2, Caption1Strong, Body2, ToggleButton } from '@fluentui/react-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { AdsStudioSpinner } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useTemplateVideoStyles, useTemplateGridStyles } from './style';\r\n\r\nexport const VideoTemplateCard = ({\r\n template,\r\n setClickedTemplate,\r\n i18n,\r\n getAssetCountInfo,\r\n}) => {\r\n const classes = useTemplateVideoStyles();\r\n\r\n const onClick = () => {\r\n setClickedTemplate(template);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Preview\r\n \r\n \r\n
\r\n {template.LocalizedTemplateName || template.TemplateName} \r\n {getAssetCountInfo(template)} \r\n
\r\n
\r\n );\r\n};\r\n\r\nVideoTemplateCard.propTypes = {\r\n template: PropTypes.shape({\r\n TemplateId: PropTypes.string.isRequired,\r\n TemplateName: PropTypes.string.isRequired,\r\n Duration: PropTypes.number,\r\n AspectRatio: PropTypes.string,\r\n Themes: PropTypes.arrayOf(PropTypes.string),\r\n NumberOfImages: PropTypes.number,\r\n NumberOfText: PropTypes.number,\r\n TemplateThumbnailUrl: PropTypes.string.isRequired,\r\n TemplatePreviewUrl: PropTypes.string.isRequired,\r\n // NumberOfLogos: PropTypes.string.isRequired,\r\n }).isRequired,\r\n setClickedTemplate: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n getAssetCountInfo: PropTypes.func.isRequired,\r\n};\r\n\r\n\r\nexport const TemplateGrid = ({\r\n templates,\r\n setClickedTemplate,\r\n loading,\r\n i18n,\r\n logger,\r\n getAssetCountInfo,\r\n templateTagOptions,\r\n templateTagsMapping,\r\n}) => {\r\n const classes = useTemplateGridStyles();\r\n const [selectedFilter, setSelectedFilter] = useState(templateTagOptions.all);\r\n const filterOptions = [templateTagOptions.all, templateTagOptions.brandAwareness, templateTagOptions.performance, templateTagOptions.premiumStreaming, templateTagOptions.onlineVideo];\r\n\r\n const getTitleMessage = useMemo(() => (\r\n (templates && templates.length) ? i18n.getString(_TL_('Video templates')) : i18n.getString(_TL_('No templates found'))\r\n ), [templates, i18n]);\r\n\r\n return (\r\n <>\r\n {loading ? (\r\n
\r\n \r\n \r\n \r\n
\r\n ) : (\r\n
\r\n { getTitleMessage }\r\n {\r\n (templates && templates.length > 0) &&\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Create a video using a template.'))}\r\n \r\n
\r\n
\r\n {filterOptions.map((filter, index) => (\r\n \r\n setSelectedFilter(filter)}\r\n className={mergeClasses(`filter-${index}`, classes.filterButton)}\r\n disabled={loading}\r\n checked={selectedFilter === filter}\r\n >\r\n {i18n.getString(filter)}\r\n \r\n \r\n ))}\r\n
\r\n \r\n {templates.filter((template) => {\r\n const { TemplateId } = template;\r\n const templateDetails = templateTagsMapping[TemplateId];\r\n return templateDetails && (selectedFilter === templateTagOptions.all || (templateDetails && templateDetails.tags && templateDetails.tags.includes(selectedFilter)));\r\n }).map((template) => {\r\n const { TemplateId } = template;\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\nTemplateGrid.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n templates: PropTypes.arrayOf(PropTypes.shape({\r\n TemplateId: PropTypes.string.isRequired,\r\n TemplateName: PropTypes.string.isRequired,\r\n Duration: PropTypes.number,\r\n AspectRatio: PropTypes.string,\r\n Themes: PropTypes.arrayOf(PropTypes.string),\r\n NumberOfImages: PropTypes.number,\r\n NumberOfText: PropTypes.number,\r\n TemplateThumbnailUrl: PropTypes.string.isRequired,\r\n TemplatePreviewUrl: PropTypes.string.isRequired,\r\n // NumberOfLogos: PropTypes.string.isRequired,\r\n })).isRequired,\r\n setClickedTemplate: PropTypes.func.isRequired,\r\n loading: PropTypes.bool,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n getAssetCountInfo: PropTypes.func.isRequired,\r\n};\r\n\r\nTemplateGrid.defaultProps = {\r\n loading: true,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useTemplateDetailsModalStyles = makeStyles({\r\n dialog: {\r\n minWidth: '1030px',\r\n minHeight: '450px',\r\n '@media (max-width: 1030px)': {\r\n minWidth: 'max-content',\r\n minHeight: 'auto',\r\n },\r\n },\r\n dialogContentContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap(tokens.spacingHorizontalXXXL),\r\n '@media (max-width: 1030px)': {\r\n flexDirection: 'column',\r\n paddingBottom: tokens.spacingVerticalL,\r\n },\r\n },\r\n detailsContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalL),\r\n },\r\n textGroup: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingHorizontalS),\r\n },\r\n errorMsg: {\r\n color: tokens.colorStatusDangerForeground1,\r\n },\r\n});\r\n","import React, { useMemo, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n DialogBody,\r\n DialogSurface,\r\n DialogTitle,\r\n Button,\r\n mergeClasses,\r\n Subtitle1,\r\n Caption1,\r\n Label,\r\n} from '@fluentui/react-components';\r\n\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\nimport { UrlInputFluent } from '@bingads-webui-campaign-react/url-input-fluent-v2';\r\nimport { ClipchampPlayer } from '@bingads-webui-campaign-react/clipchamp-player';\r\nimport { useTemplateDetailsModalStyles } from './style';\r\n\r\nexport const TemplateDetailsModal = ({\r\n template,\r\n show,\r\n onShowChange,\r\n onSelectTemplate,\r\n setCopilotFinalUrl,\r\n onClose,\r\n i18n,\r\n getAssetCountInfo,\r\n loadClipchampPlayer,\r\n}) => {\r\n const [finalUrlError, setFinalUrlError] = useState('');\r\n const [url, setUrl] = useState('');\r\n\r\n /* istanbul ignore next */\r\n const onGetStartedButton = useCallback(() => {\r\n if (finalUrlError) {\r\n return;\r\n }\r\n\r\n if (!url) {\r\n setFinalUrlError(i18n.getString(_TL_('Please enter a valid URL.')));\r\n return;\r\n }\r\n\r\n onSelectTemplate({ template });\r\n }, [onSelectTemplate, template, setFinalUrlError, i18n, finalUrlError, url]);\r\n\r\n const DismissIcon = useMemo(() => , [onClose]);\r\n\r\n const classes = useTemplateDetailsModalStyles();\r\n\r\n return (\r\n {\r\n // it is the users responsibility to react accordingly to the open state change\r\n onShowChange(data.open);\r\n }}\r\n className={mergeClasses('template-details-dialog', classes.dialog)}\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {template.LocalizedTemplateName || template.TemplateName}\r\n
\r\n {getAssetCountInfo(template)}\r\n
\r\n
\r\n {i18n.getString(_TL_('Duration: {{seconds}} seconds'), { seconds: template.Duration })}\r\n
\r\n
\r\n
{template.LocalizedTemplateDescription || template.TemplateDescription}
\r\n \r\n {\r\n setFinalUrlError(urlErrors[0]);\r\n setCopilotFinalUrl(newUrl);\r\n setUrl(newUrl);\r\n }}\r\n textFieldAriaLabel={i18n.getString(_TL_('Enter your URL'))}\r\n i18n={i18n}\r\n additionalProperties={{\r\n placeholder: i18n.getString(_TL_('Enter your URL')),\r\n id: 'url-input',\r\n }}\r\n />\r\n {finalUrlError && {finalUrlError} }\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nTemplateDetailsModal.propTypes = {\r\n template: PropTypes.shape({\r\n TemplateId: PropTypes.string.isRequired,\r\n TemplateName: PropTypes.string.isRequired,\r\n TemplateDescription: PropTypes.string.isRequired,\r\n Duration: PropTypes.number,\r\n AspectRatio: PropTypes.string,\r\n Themes: PropTypes.arrayOf(PropTypes.string),\r\n NumberOfImages: PropTypes.number,\r\n NumberOfText: PropTypes.number,\r\n TemplateThumbnailUrl: PropTypes.string.isRequired,\r\n TemplatePreviewUrl: PropTypes.string.isRequired,\r\n NumberOfLogos: PropTypes.string.isRequired,\r\n }).isRequired,\r\n show: PropTypes.bool.isRequired,\r\n onShowChange: PropTypes.func.isRequired,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n onSelectTemplate: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n getAssetCountInfo: PropTypes.func.isRequired,\r\n loadClipchampPlayer: PropTypes.func.isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useVideoTemplatesPageStyles = makeStyles({\r\n videoTemplatePage: {\r\n display: 'flex',\r\n ...shorthands.margin('32px', '36px'),\r\n flexDirection: 'column',\r\n ...shorthands.gap('10px'),\r\n },\r\n});\r\n","import React, { useCallback, useEffect, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { CopilotRepositoryProvider, useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { useBrandKitDataService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { formatBrandkitForAPI } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { TemplateGrid, TemplateDetailsModal } from './components';\r\nimport { useVideoTemplatesPageStyles } from './style';\r\n\r\nconst VideoTemplatesPage = ({\r\n i18n,\r\n aid,\r\n logger,\r\n copilotFinalUrl,\r\n setCopilotFinalUrl,\r\n navigation,\r\n copilotDomainDataService,\r\n notificationApi,\r\n pagePerfMarker,\r\n setDataLoaded,\r\n loadClipchampPlayer,\r\n}) => {\r\n const classes = useVideoTemplatesPageStyles();\r\n const [isPageLoading, setIsPageLoading] = useState(true);\r\n const [templates, setTemplates] = useState([]);\r\n const [selectedTemplate, setSelectedTemplate] = useState(null);\r\n const [isLoadingBrandKit, setIsLoadingBrandkit] = useState(false);\r\n const [brandkit, setBrandKit] = useState(null);\r\n const [isBrandKitEmpty, setIsBrandKitEmpty] = useState(true);\r\n const [openModal, setOpenModal] = useState(false);\r\n const { setDataPromise } = useContext(DataContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const repository = useCopilotRepositoryContext();\r\n const {\r\n fetchVideoAdsAssetRecommendations,\r\n } = repository;\r\n\r\n const fetchCount = 10;\r\n\r\n const { getBrandKitDataByAccId } = useBrandKitDataService();\r\n\r\n const fetchBrandKit = useCallback(async () => {\r\n setIsLoadingBrandkit(true);\r\n const response = await getBrandKitDataByAccId({ accId: aid });\r\n setIsLoadingBrandkit(false);\r\n const isBrandKitHavingData = response && response.BrandKits && response.BrandKits[0] && (!_.isEmpty(response.BrandKits[0].Fonts) ||\r\n !_.isEmpty(response.BrandKits[0].Images) ||\r\n !_.isEmpty(response.BrandKits[0].LandscapeLogos) ||\r\n !_.isEmpty(response.BrandKits[0].Palettes) ||\r\n !_.isEmpty(response.BrandKits[0].SquareLogos));\r\n if (isBrandKitHavingData) {\r\n setIsBrandKitEmpty(false);\r\n const updatedResponse = {\r\n ...response.BrandKits[0],\r\n };\r\n setBrandKit(formatBrandkitForAPI(updatedResponse));\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n }\r\n }, [getBrandKitDataByAccId, aid, setBrandKit, setIsBrandKitEmpty]);\r\n\r\n const onFetchVideoRecommendations = useCallback(() => {\r\n if (isLoadingBrandKit) {\r\n return null;\r\n }\r\n const templateFilter = !_.isEmpty(selectedTemplate) ? { TemplateIds: [selectedTemplate.TemplateId] } : null;\r\n return fetchVideoAdsAssetRecommendations(fetchCount, false, null, templateFilter, (!isBrandKitEmpty ? brandkit : null));\r\n }, [brandkit, isLoadingBrandKit, fetchVideoAdsAssetRecommendations, fetchCount, isBrandKitEmpty, selectedTemplate]);\r\n\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const fetchVideoTemplates = useCallback(async () => {\r\n pagePerfMarker.willFetchData();\r\n const { response, error } = await copilotDomainDataService.getVideoTemplates(null, i18n);\r\n if (error) {\r\n onFailedToLoadData();\r\n setIsPageLoading(false);\r\n if (logger) {\r\n logger.logTrace('Video Templates - failed to load templates', error);\r\n }\r\n return;\r\n }\r\n if (activity && activity.signal) {\r\n activity.signal('[VideoTemplatesPage] Templates Loaded');\r\n }\r\n setTemplates((response && response.Templates) || []);\r\n setIsPageLoading(false);\r\n pagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n }, [activity, copilotDomainDataService, onFailedToLoadData, logger, pagePerfMarker, setDataLoaded, i18n]);\r\n\r\n useEffect(() => {\r\n fetchVideoTemplates();\r\n }, [fetchVideoTemplates]);\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, [fetchBrandKit]);\r\n\r\n const onViewTemplateDetails = useCallback((template) => {\r\n setSelectedTemplate(template);\r\n if (activity && activity.signal) {\r\n activity.signal(`[VideoTemplatesPage] templateSelected:${template.TemplateId}`);\r\n }\r\n setOpenModal(true);\r\n }, [activity]);\r\n\r\n const onChooseTemplate = useCallback(() => {\r\n const dataPromise = onFetchVideoRecommendations();\r\n\r\n const modifiedDataPromise = dataPromise.then(data => ({\r\n ...data,\r\n finalUrl: copilotFinalUrl,\r\n }));\r\n\r\n setDataPromise(modifiedDataPromise);\r\n setOpenModal(false);\r\n navigation.gotoCreateVideoPage();\r\n }, [navigation, setDataPromise, onFetchVideoRecommendations]);\r\n\r\n const onCloseModal = useCallback(() => {\r\n setOpenModal(false);\r\n }, []);\r\n\r\n const getAssetCountInfo = (templateItem) => {\r\n const { NumberOfLogos, NumberOfImages, NumberOfText } = templateItem;\r\n const result = [];\r\n if (NumberOfText && NumberOfText > 1) result.push(i18n.getString(_TL_('{{NumberOfText}} texts'), { NumberOfText }));\r\n else if (NumberOfText && NumberOfText > 0) result.push(i18n.getString(_TL_('{{NumberOfText}} text'), { NumberOfText }));\r\n if (NumberOfImages && NumberOfImages > 1) result.push(i18n.getString(_TL_('{{NumberOfImages}} images'), { NumberOfImages }));\r\n else if (NumberOfImages && NumberOfImages > 0) result.push(i18n.getString(_TL_('{{NumberOfImages}} image'), { NumberOfImages }));\r\n if (NumberOfLogos && NumberOfLogos > 1) result.push(i18n.getString(_TL_('{{NumberOfLogos}} logos'), { NumberOfLogos }));\r\n else if (NumberOfLogos && NumberOfLogos > 0) result.push(i18n.getString(_TL_('{{NumberOfLogos}} logo'), { NumberOfLogos }));\r\n return result.join('・');\r\n };\r\n\r\n const templateTagOptions = {\r\n all: _TL_('All'),\r\n performance: _TL_('Performance'),\r\n brandAwareness: _TL_('Brand awareness'),\r\n premiumStreaming: _TL_('Premium Streaming'),\r\n onlineVideo: _TL_('Online Video'),\r\n };\r\n\r\n const templateTagsMapping = {\r\n 'f4e5dab9-317e-5426-9999-4a1d062a8d6e': {\r\n tags: [templateTagOptions.brandAwareness, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000001': {\r\n tags: [templateTagOptions.brandAwareness, templateTagOptions.premiumStreaming],\r\n },\r\n '00000002-0000-0000-0000-000000000002': {\r\n tags: [templateTagOptions.brandAwareness, templateTagOptions.onlineVideo],\r\n },\r\n '00000002-0000-0000-0000-000000000003': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000004': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000005': {\r\n tags: [templateTagOptions.premiumStreaming, templateTagOptions.brandAwareness],\r\n },\r\n '00000002-0000-0000-0000-000000000007': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000008': {\r\n tags: [templateTagOptions.premiumStreaming, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000009': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000010': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.performance],\r\n },\r\n '00000002-0000-0000-0000-000000000011': {\r\n tags: [templateTagOptions.onlineVideo, templateTagOptions.brandAwareness],\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n {openModal && }\r\n
\r\n );\r\n};\r\n\r\nVideoTemplatesPage.propTypes = {\r\n copilotDomainDataService: PropTypes.shape({\r\n getVideoTemplates: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n adsStudioUserPreferences: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n navigation: PropTypes.shape({\r\n gotoEditVideoPage: PropTypes.func.isRequired,\r\n }).isRequired,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n setDataLoaded: PropTypes.func.isRequired,\r\n pagePerfMarker: PropTypes.shape({\r\n willFetchData: PropTypes.func,\r\n willRender: PropTypes.func,\r\n }).isRequired,\r\n loadClipchampPlayer: PropTypes.func.isRequired,\r\n};\r\n\r\nVideoTemplatesPage.defaultProps = {\r\n notificationApi: {\r\n showWarning: () => {},\r\n },\r\n adsStudioUserPreferences: undefined,\r\n reload: null,\r\n};\r\n\r\nconst VideoTemplatesPageWithContexts = ({ ...props }) => {\r\n const [copilotFinalUrl, setCopilotFinalUrl] = React.useState('');\r\n const serverContext = useContext(ServerContext);\r\n const { permissions } = props;\r\n const useClipchamp = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n return (\r\n \r\n \r\n );\r\n};\r\n\r\nVideoTemplatesPageWithContexts.propTypes = {};\r\n\r\nconst WrappedComponent = VideoTemplatesPageWithContexts;\r\n\r\nexport { WrappedComponent as VideoTemplatesPageComponent };\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useEditVideoPageStyles = makeStyles({\r\n editVideoPage: {\r\n position: 'relative',\r\n height: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('10px'),\r\n },\r\n editVideoContainer: {\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n '& .video-editor-with-add-image-wrapper': {\r\n height: '100%',\r\n },\r\n },\r\n spinnerContent: {\r\n textAlign: 'center',\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* istanbul ignore file */\r\nimport {\r\n Toast,\r\n ToastBody,\r\n ToastTitle,\r\n ToastTrigger,\r\n useId,\r\n} from '@fluentui/react-components';\r\nimport { useToast } from '@bingads-webui-fluent-component/toast-provider';\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\nimport React, { useCallback } from 'react';\r\n\r\nconst timeout = 10000;\r\n\r\nexport const useVideoNotify = ({\r\n i18n,\r\n logger,\r\n}) => {\r\n const toastId = useId('video-saved-toast');\r\n const { dispatchToast, dismissToast } = useToast();\r\n\r\n const successTitle = i18n.getString(_TL_('Published successfully'));\r\n const successBody = i18n.getString(_TL_('Congratulations! Your video has been published to Ad Studio.'));\r\n const errorTitle = i18n.getString(_TL_('Export unsuccessful'));\r\n const errorBody = i18n.getString(_TL_('We encountered an issue while trying to export your video.'));\r\n\r\n const getTitle = (isSuccess: boolean) => (isSuccess ? successTitle : errorTitle);\r\n const getBody = (isSuccess: boolean) => (isSuccess ? successBody : errorBody);\r\n\r\n const notify = useCallback((isSuccess: boolean) =>\r\n dispatchToast(\r\n \r\n \r\n \r\n \r\n }\r\n >{getTitle(isSuccess)}\r\n \r\n \r\n {getBody(isSuccess)}\r\n \r\n ,\r\n { intent: isSuccess ? 'success' : 'warning', toastId, timeout }\r\n ), [dispatchToast, i18n, dismissToast, toastId, logger]);\r\n\r\n return notify;\r\n};\r\n","import React, { useEffect, useState, useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { AdsStudioSpinner } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { VideoTemplateEditorContextWrapper } from '@bingads-webui-campaign-react/video-ads-editor';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { Overlay, MessageBar, MessageBarType } from '@bingads-webui-react/fabric-control';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { useEditVideoPageStyles } from './style';\r\nimport { useVideoNotify } from './components/use-video-notify';\r\n\r\nconst EditVideoPage = (props) => {\r\n const {\r\n i18n,\r\n permissions,\r\n isCTV,\r\n logger,\r\n loadClipchampPlayer,\r\n pagePerfMarker,\r\n setDataLoaded,\r\n videoId,\r\n dataService,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n serverContext, preferenceService, cid, aid, oDataConfig, perfMarker, navigation,\r\n } = rest;\r\n const classes = useEditVideoPageStyles();\r\n const notify = useVideoNotify({ i18n, logger });\r\n const { getVideo } = dataService || {};\r\n const { dataPromise } = useContext(DataContext);\r\n const [videoMetadata, setVideoMetadata] = useState(null);\r\n const [finalUrl, setFinalUrl] = useState(null);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [isSaving, setIsSaving] = useState(false);\r\n const [, setError] = useState();\r\n const activity = useContext(ActivityContext);\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const assetLibraryConfig = {\r\n cid,\r\n aid,\r\n oDataConfig,\r\n dateFormat: _.get(serverContext, ['CurrentUser', 'CultureDateTimeFormat', 'ShortDatePattern']),\r\n timeZone: _.get(serverContext, ['CurrentAccount', 'TimeZone']),\r\n preferencesService: preferenceService,\r\n activityLogger: activity,\r\n };\r\n\r\n const logActivity = useCallback((message) => {\r\n if (activity && activity.signal) {\r\n activity.signal(message);\r\n }\r\n }, [activity]);\r\n\r\n useEffect(() => {\r\n const fetchDataAsync = async () => {\r\n try {\r\n pagePerfMarker.willFetchData();\r\n setIsLoading(true);\r\n if (videoId) {\r\n const video = await getVideo({ id: videoId, fetchMetadata: true });\r\n if (video && video.Metadata) {\r\n const videoData = JSON.parse(video.Metadata);\r\n setVideoMetadata(videoData);\r\n const templateId = videoData && videoData.template && videoData.template.templateId;\r\n logActivity(`[VideoAdsEditorPage] - Video Edit Loaded - TemplateId:${templateId}`);\r\n }\r\n } else {\r\n const result = await dataPromise; // Wait for the promise to resolve\r\n const videoRecommendation = result && result.data && result.data.ads && result.data.ads[0];\r\n setVideoMetadata(videoRecommendation);\r\n setFinalUrl(result && result.finalUrl);\r\n const templateId = videoRecommendation && videoRecommendation.template && videoRecommendation.template.templateId;\r\n logActivity(`[VideoAdsEditorPage] - Video Recommendation Loaded - TemplateId:${templateId}`);\r\n }\r\n setIsLoading(false);\r\n } catch (err) {\r\n setError(err);\r\n setIsLoading(false);\r\n if (logger) {\r\n logger.logTrace('Video Asset Gen - AdsStudio - Error', err);\r\n }\r\n }\r\n\r\n pagePerfMarker.willRender();\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n };\r\n fetchDataAsync();\r\n }, [dataPromise, pagePerfMarker, setDataLoaded, logger, logActivity]);\r\n\r\n const onSaveVideo = useCallback(async (newMetadata) => {\r\n if (!newMetadata) {\r\n logger.logTrace('ads studio edit video page - no video data passed to save.');\r\n } else {\r\n setIsSaving(true);\r\n try {\r\n const uploadResult = await uploadVideoMetadata({\r\n videoMetadata: newMetadata,\r\n newVideoFromMTObject,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n });\r\n\r\n if (uploadResult && uploadResult.recommendationFormat === 'Clipchamp' && uploadResult.status === 'Draft') {\r\n logActivity('VideoAdsEditor - AdsStudio - Video Recommendation Saved');\r\n notify(true);\r\n navigation.gotoVideosPage();\r\n } else {\r\n notify(false);\r\n }\r\n } catch (e) {\r\n logger.logTrace('ads studio edit video page - error while adding video.', e);\r\n notify(false);\r\n }\r\n setIsSaving(false);\r\n }\r\n }, [folderRepository, imageRepository, videoRepository, logger, navigation, notify, logActivity]);\r\n\r\n const onApply = useCallback((newMetadata) => {\r\n onSaveVideo(newMetadata);\r\n }, [onSaveVideo]);\r\n\r\n return (\r\n
\r\n {(isLoading || isSaving) && (\r\n \r\n \r\n {!isSaving && (\r\n
{videoId ? i18n.getString(_TL_('Loading...')) : i18n.getString(_TL_('Generating the video for you. This may take a few minutes...'))}
\r\n )}\r\n
\r\n )}\r\n {\r\n (!isLoading) && videoMetadata && videoMetadata.template &&\r\n
\r\n {}}\r\n isCTV={isCTV}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrl}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker && perfMarker.createChild('VideoTemplateEditor')}\r\n isDialog={false}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n showVideoTemplateSummaryBarControl\r\n />\r\n
\r\n }\r\n {\r\n !isLoading && (!videoMetadata || !videoMetadata.template) &&\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('An error occured while loading the video.'))}\r\n \r\n
\r\n
\r\n }\r\n
\r\n );\r\n};\r\n\r\nEditVideoPage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n isCTV: PropTypes.bool.isRequired,\r\n setDataLoaded: PropTypes.func.isRequired,\r\n pagePerfMarker: PropTypes.shape({\r\n willFetchData: PropTypes.func,\r\n willRender: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nEditVideoPage.defaultProps = {};\r\n\r\nconst EditVideoPageWithContexts = ({ ...props }) => {\r\n const serverContext = useContext(ServerContext);\r\n const { permissions } = props;\r\n const useClipchamp = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n return (\r\n \r\n \r\n );\r\n};\r\n\r\nEditVideoPageWithContexts.propTypes = {};\r\n\r\nconst WrappedComponent = withI18nConsumer(EditVideoPageWithContexts);\r\n\r\nexport { WrappedComponent as EditVideoPageComponent };\r\n\r\n","import { useState, useReducer, useCallback, useEffect, useMemo, useRef, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n getImageAssetLimitPerAccount,\r\n GenerateImageContext,\r\n ROOT_FOLDER_ID,\r\n AIModelSource,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { detectBrandName } from './util';\r\n\r\nexport const statuses = {\r\n entry: 'entry',\r\n finished: 'finished',\r\n loading: 'loading',\r\n cancelling: 'cancelling',\r\n};\r\n\r\nexport const actions = {\r\n search: 'search',\r\n finish: 'finish',\r\n cancel: 'cancel',\r\n fail: 'fail',\r\n};\r\n\r\n/* istanbul ignore next */\r\nconst reducer = (state, action) => {\r\n // action, [search, finish, cancel, failed]\r\n /* istanbul ignore switch */\r\n switch (state.status) {\r\n case statuses.entry:\r\n case statuses.finished:\r\n switch (action.type) {\r\n case actions.search:\r\n return ({ status: statuses.loading });\r\n default:\r\n break;\r\n }\r\n return ({ status: statuses.finished });\r\n case statuses.loading:\r\n switch (action.type) {\r\n case actions.cancel:\r\n case actions.fail:\r\n return ({ status: statuses.cancelling });\r\n case actions.finish:\r\n return ({ status: statuses.finished });\r\n case actions.search:\r\n return ({ status: statuses.loading });\r\n default:\r\n break;\r\n }\r\n return ({ status: statuses.finished });\r\n case statuses.cancelling:\r\n switch (action.type) {\r\n case actions.finish:\r\n case actions.fail:\r\n return ({ status: statuses.finished });\r\n default:\r\n break;\r\n }\r\n return ({ status: statuses.finished });\r\n default:\r\n return ({ status: statuses.finished });\r\n }\r\n};\r\n\r\nexport const useGenerateImagePageState = ({\r\n dataService, i18n, logger, eventHandler, aid, notificationApi, folderId, perfMarker,\r\n}) => {\r\n const log = useCallback((...args) => {\r\n if (logger) {\r\n logger.logTrace(...args);\r\n }\r\n }, [logger]);\r\n\r\n const {\r\n generateImageExample,\r\n setGenerateImageExample,\r\n } = useContext(GenerateImageContext);\r\n\r\n const clearExample = useCallback(() => {\r\n if (setGenerateImageExample) {\r\n setGenerateImageExample({\r\n prompt: undefined,\r\n imageUrl: undefined,\r\n });\r\n }\r\n }, [setGenerateImageExample]);\r\n\r\n useEffect(() => () => {\r\n clearExample();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const [initialPrompt] = useState(generateImageExample && generateImageExample.prompt);\r\n const [prompt, setPrompt] = useState(initialPrompt || '');\r\n const [promptChanged, setPromptChanged] = useState(false);\r\n const [state, dispatch] = useReducer(reducer, { status: statuses.entry });\r\n const [images, setImages] = useState([]);\r\n const [serverError, setServerError] = useState(undefined);\r\n const [detectedBrandName, setDetectedBrandName] = useState(null);\r\n\r\n const onSelectImage = useCallback((index) => {\r\n const newImages = [...images];\r\n newImages[index].isSelected = !newImages[index].isSelected;\r\n\r\n log('AIGenerateImagesView: select image');\r\n setImages(newImages);\r\n }, [setImages, images, log]);\r\n\r\n const onStartOver = useCallback(() => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('AIgeneratedImage: start over button clicked');\r\n }\r\n setPrompt(initialPrompt || '');\r\n }, [initialPrompt, logger]);\r\n\r\n const selectedImages = useMemo(() => images.filter(x => x.isSelected), [images]);\r\n\r\n const generateImagesPromise = useRef(undefined);\r\n\r\n const getGenerateImagesByAIPromise = useCallback((skipBrandDetection) => {\r\n setImages([]);\r\n let cancelled = false;\r\n let statusPoller = null;\r\n const aiGCImagePerfMarker = perfMarker.createChild('AIGenerateImages');\r\n aiGCImagePerfMarker.willInit();\r\n const onStartPolling = (poller) => {\r\n statusPoller = poller;\r\n };\r\n const aigcCallStart = Date.now();\r\n\r\n dataService.generateImagesByAI({\r\n prompt, onStartPolling /* , onProgress */, skipBrandDetection,\r\n }).then(({\r\n images: newImages, brandNameDetected, brandNames,\r\n }) => {\r\n const aigcCallEnd = Date.now();\r\n const aigcCallDuration = aigcCallEnd - aigcCallStart;\r\n const hasRecraftImage = newImages.some(({ modelSource }) => modelSource === AIModelSource.Recraft);\r\n\r\n // use the tag \"logForExpand\" to expand the log to per image Url without expanding other logs with imageUrls\r\n log('AIGenerateImagesView: count AI generated images', {\r\n imageUrls: newImages.map(({ url }) => url).join(','),\r\n logForExpand: true,\r\n skipBrandDetection,\r\n prompt,\r\n hasRecraftImage,\r\n modelSources: newImages.map(({ modelSource }) => modelSource).join(','),\r\n duration: aigcCallDuration,\r\n }); // will expand the log to per image Url\r\n if (eventHandler && eventHandler.onReturnImages) {\r\n eventHandler.onReturnImages({ imageIds: newImages.map(({ id }) => id) });\r\n }\r\n\r\n if (!cancelled) {\r\n if (brandNameDetected) {\r\n setDetectedBrandName(brandNames);\r\n log(`AIGenerateImagesView: detected brand names: ${brandNames}, prompt: ${prompt}`);\r\n } else {\r\n setImages(newImages.map(({ url, modelSource }) => ({ thumbnailSrc: url, modelSource })));\r\n dispatch({ type: actions.finish });\r\n }\r\n }\r\n }).catch((error) => {\r\n /* istanbul ignore next */\r\n if (!cancelled) {\r\n dispatch({ type: actions.fail });\r\n log('AIGenerateImagesView: generated images falied', { error });\r\n if (error && error.uxMessage) {\r\n setServerError(i18n.getString(error.uxMessage));\r\n } else {\r\n setServerError(i18n.getString(_TL_('We\\'ve encountered an error and failed to generate images.')));\r\n }\r\n }\r\n }).finally(() => {\r\n aiGCImagePerfMarker.done();\r\n });\r\n\r\n return ({\r\n cancel: () => {\r\n cancelled = true;\r\n if (statusPoller && statusPoller.stop) {\r\n statusPoller.stop();\r\n statusPoller = null;\r\n }\r\n },\r\n });\r\n }, [perfMarker, dataService, prompt, log, eventHandler, i18n]);\r\n\r\n const getImages = useCallback((skipBrandDetection = false) => {\r\n dispatch({ type: actions.search });\r\n clearExample();\r\n setServerError(undefined);\r\n log('AIGenerateImagesView: generate image', { prompt });\r\n if (eventHandler && eventHandler.onGenerateImages) {\r\n eventHandler.onGenerateImages({ prompt });\r\n }\r\n generateImagesPromise.current = getGenerateImagesByAIPromise(skipBrandDetection);\r\n }, [clearExample, log, prompt, eventHandler, getGenerateImagesByAIPromise]);\r\n\r\n /* istanbul ignore next */\r\n const cancel = useCallback(() => {\r\n setDetectedBrandName(null);\r\n dispatch({ type: actions.cancel });\r\n log('AIGenerateImagesView: cancel');\r\n if (generateImagesPromise.current) {\r\n generateImagesPromise.current.cancel();\r\n generateImagesPromise.current = null;\r\n }\r\n }, [log]);\r\n\r\n useEffect(() => {\r\n if (state.status === statuses.cancelling) {\r\n dispatch({ type: actions.finish });\r\n }\r\n }, [state.status]);\r\n\r\n useEffect(() => {\r\n if (serverError != null) {\r\n setServerError(undefined);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [prompt]);\r\n\r\n const isValid = useMemo(() => {\r\n let containsBrand = false;\r\n if (detectedBrandName) {\r\n // multiple brand names are separated by comma\r\n // replace special characters in brand names and split by comma\r\n containsBrand = detectBrandName(detectedBrandName, prompt);\r\n }\r\n const trimmedPrompt = prompt ? prompt.trim() : '';\r\n const isValidPrompt = prompt != null && prompt.length > 0 && trimmedPrompt.length > 0 && prompt.length <= 256;\r\n return isValidPrompt && !containsBrand;\r\n }, [detectedBrandName, prompt]);\r\n\r\n const promptError = useMemo(() => {\r\n if (!promptChanged) {\r\n return undefined;\r\n }\r\n if (prompt == null) {\r\n return undefined;\r\n }\r\n if (prompt.length === 0) {\r\n return i18n.getString(_TL_('Prompt is required'));\r\n }\r\n if (prompt.length > 256) {\r\n return i18n.getString(_TL_('Prompt must be less than 256 characters'));\r\n }\r\n return undefined;\r\n }, [promptChanged, prompt, i18n]);\r\n\r\n const [savedAIGCImages, setSavedAIGCImages] = useState([]);\r\n const savedAIGCImagesRef = useRef([]);\r\n const [savingAIGCImages, setSavingAIGCImages] = useState([]);\r\n const [savedStockImages, setSavedStockImages] = useState([]);\r\n const savedStockImagesRef = useRef([]);\r\n const [savingStockImages, setSavingStockImages] = useState([]);\r\n\r\n const {\r\n assets,\r\n loadData,\r\n loadMoreData,\r\n totalAssetCount,\r\n addAIGCImage,\r\n addStockImage,\r\n } = dataService;\r\n\r\n const loadStockImages = useCallback(() => {\r\n loadData({\r\n searchText: prompt,\r\n });\r\n }, [loadData, prompt]);\r\n\r\n const loadMoreStockImages = useCallback(() => {\r\n loadMoreData();\r\n }, [loadMoreData]);\r\n\r\n /* istanbul ignore next */\r\n const handleError = useCallback((err) => {\r\n const errorCode = _.get(err, ['body', 'value', 0, 'Code'], '');\r\n if (errorCode === 'ImagesLimitExceededPerAccount') {\r\n const assetLimit = getImageAssetLimitPerAccount(aid, logger);\r\n notificationApi.showWarning(i18n.getString(_TL_('One or more images failed to upload because your account has exceeded the {{value}}-image asset limit. Please remove assets and try again.'), { value: assetLimit }));\r\n } else {\r\n const learnMoreText = i18n.getString(_TL_('Learn more about asset guidelines and accepted file types.'));\r\n const topic = 'app54863';\r\n const learnMoreLink = `Learn more`;\r\n const genericError = i18n.getString(_TL_('One or more assets failed to upload. Please try again. {{learnMoreLink}}'), { learnMoreLink });\r\n notificationApi.showWarning(genericError);\r\n }\r\n }, [aid, i18n, logger, notificationApi]);\r\n\r\n const folderIdNumber = useMemo(() => {\r\n if (folderId && folderId !== ROOT_FOLDER_ID) {\r\n return Number(folderId);\r\n }\r\n return undefined;\r\n }, [folderId]);\r\n\r\n const wrappedAddAIGCImage = useCallback((imageSrc, modelSource = null) => {\r\n const aiGCImagePerfMarker = perfMarker.createChild('AIGCImagePicker');\r\n aiGCImagePerfMarker.willInit();\r\n setSavingAIGCImages([...savingAIGCImages, imageSrc]);\r\n addAIGCImage(imageSrc, folderIdNumber, modelSource).then((res) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('AIGC image saved', {\r\n imageSrc,\r\n id: res,\r\n prompt,\r\n modelSource: modelSource || AIModelSource.Dalle,\r\n });\r\n }\r\n savedAIGCImagesRef.current = [...new Set([...savedAIGCImagesRef.current, imageSrc])];\r\n setSavedAIGCImages([...new Set([...savedAIGCImagesRef.current, ...savedAIGCImages, imageSrc])]);\r\n }).catch((error) => {\r\n handleError(error);\r\n }).finally(() => {\r\n aiGCImagePerfMarker.done();\r\n });\r\n }, [addAIGCImage, folderIdNumber, handleError, logger, perfMarker, savedAIGCImages, savingAIGCImages, prompt]);\r\n\r\n const wrappedAddStockImage = useCallback((stockImageId) => {\r\n setSavingStockImages([...savingStockImages, stockImageId]);\r\n addStockImage(stockImageId, folderIdNumber).then((res) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Stock image saved', { stockImageId, id: res, prompt });\r\n }\r\n savedStockImagesRef.current = [...new Set([...savedStockImagesRef.current, stockImageId])];\r\n setSavedStockImages([...new Set([...savedStockImagesRef.current, ...savedStockImages, stockImageId])]);\r\n }).catch((error) => {\r\n handleError(error);\r\n });\r\n }, [addStockImage, folderIdNumber, handleError, logger, savedStockImages, savingStockImages, prompt]);\r\n\r\n const wrappedSetPrompt = useCallback((newPrompt) => {\r\n if (promptChanged === false) {\r\n setPromptChanged(true);\r\n }\r\n setPrompt(newPrompt);\r\n }, [promptChanged]);\r\n\r\n return {\r\n aigcImages: images,\r\n stockImages: assets,\r\n savedAIGCImages,\r\n savedStockImages,\r\n savingAIGCImages,\r\n savingStockImages,\r\n totalStockImagesCount: totalAssetCount,\r\n addAIGCImage: wrappedAddAIGCImage,\r\n addStockImage: wrappedAddStockImage,\r\n selectedImages,\r\n isValid,\r\n getImages,\r\n onSelectImage,\r\n prompt,\r\n promptError,\r\n setPrompt: wrappedSetPrompt,\r\n state,\r\n cancel,\r\n serverError,\r\n detectedBrandName,\r\n loadStockImages,\r\n loadMoreStockImages,\r\n setDetectedBrandName,\r\n onStartOver,\r\n generateImageExample,\r\n };\r\n};\r\n","export const detectBrandName = (detectedBrandName, prompt) => {\r\n const brandNames = detectedBrandName\r\n .replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\r\n .split(',').map(s => s.trim()).join('(?=\\\\W|^|$)|(?<=\\\\W|^|$)');\r\n const brandNameRegex = new RegExp(`(?<=\\\\W|^|$)${brandNames}(?=\\\\W|^|$)`, 'i');\r\n return brandNameRegex.test(prompt);\r\n};\r\n","import { makeResetStyles, shorthands } from '@fluentui/react-components';\r\nimport {\r\n AIWarningIcon,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const useBrandDetectionConfirmationStyle = makeResetStyles({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'flex-start',\r\n alignItems: 'center',\r\n width: '100%',\r\n marginTop: '32px',\r\n ...shorthands.padding('16px', '24px'),\r\n ...shorthands.gap('16px'),\r\n ...shorthands.borderRadius(4),\r\n ...shorthands.border('1px', 'solid', '#E1DFDD'),\r\n backgroundColor: '#FFF',\r\n\r\n '& .ai-warning-icon': {\r\n width: '128px',\r\n height: '128px',\r\n flexShrink: 0,\r\n backgroundImage: `url(\"${AIWarningIcon}\")`,\r\n backgroundSize: '128px 128px',\r\n marginRight: '16px',\r\n },\r\n\r\n '& .confirmation-content': {\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n '& .confirmation-content-title': {\r\n color: '#000',\r\n fontSize: '18px',\r\n fontWeight: 600,\r\n lineHeight: '24px',\r\n },\r\n '& .confirmation-content-text': {\r\n color: '#605E5C',\r\n fontSize: '14px',\r\n fontWeight: 400,\r\n lineHeight: '20px',\r\n marginTop: '4px',\r\n marginBottom: '12px',\r\n },\r\n '& .confirmation-content-action': {\r\n display: 'flex',\r\n '& .confirmation-content-checkbox': {\r\n marginRight: '4px',\r\n alignItems: 'flex-start',\r\n '& button': {\r\n marginTop: '4px',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useEffect, useState } from 'react';\r\nimport { Checkbox } from '@fluentui/react-components';\r\nimport { useBrandDetectionConfirmationStyle } from './style';\r\n\r\nexport const BrandDetectionConfirmation = ({\r\n i18n, brandName, onConfirm, logger, renderHelpButton,\r\n}) => {\r\n const [isChecked, setIsChecked] = useState(false);\r\n const classes = useBrandDetectionConfirmationStyle();\r\n\r\n const onChange = useCallback((evt, data) => {\r\n if (data.checked && onConfirm) {\r\n logger.logTrace(`BrandDetectionConfirmation: confirmed to skip brand name: ${brandName}`);\r\n setTimeout(() => {\r\n onConfirm();\r\n }, 1000);\r\n }\r\n setIsChecked(data.checked);\r\n }, [brandName, logger, onConfirm]);\r\n\r\n useEffect(() => {\r\n logger.logTrace(`BrandDetectionConfirmation: brand name detected: ${brandName}`);\r\n }, [brandName, logger]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
{i18n.getString(_TL_('Brand detected: Image contains \"{{brandName}}\"'), { brandName })}
\r\n
{i18n.getString(_TL_('Note: Your request for the image may contain content that is subject to the intellectual property rights of third parties.'))}
\r\n
\r\n \r\n {renderHelpButton && renderHelpButton('pop_BA_AssetLibrary_BrandDetection')}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import {\r\n makeStyles,\r\n makeResetStyles,\r\n shorthands,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nexport const usePromptEditorStyles = makeStyles({\r\n selectedButton: {\r\n backgroundColor: '#F0EEEE',\r\n ...shorthands.border('1px', 'solid', tokens.colorStrokeFocus2),\r\n },\r\n toggleButton: {\r\n backgroundColor: '#FAFAFA',\r\n },\r\n textareaPlaceHolder: {\r\n width: '100%',\r\n backgroundColor: 'transparent',\r\n boxShadow: '0px 0px 2px 0px rgba(23, 26, 31, 0.12), 0px 0px 1px 0px rgba(23, 26, 31, 0.07)',\r\n '& textarea': {\r\n color: '#8F8F8F',\r\n fontSize: '24px',\r\n fontWeight: '400',\r\n lineHeight: '36px',\r\n },\r\n },\r\n textarea: {\r\n width: '100%',\r\n boxShadow: '0px 0px 2px 0px rgba(23, 26, 31, 0.12), 0px 0px 1px 0px rgba(23, 26, 31, 0.07)',\r\n backgroundColor: 'transparent',\r\n '& textarea': {\r\n color: '#000',\r\n fontSize: '24px',\r\n fontWeight: '600',\r\n lineHeight: '32px',\r\n },\r\n },\r\n autoCompleteTextarea: {\r\n position: 'absolute',\r\n backgroundColor: '#FAFAFA',\r\n width: '100%',\r\n '& textarea': {\r\n color: '#999',\r\n fontSize: '24px',\r\n fontWeight: '600',\r\n lineHeight: '32px',\r\n },\r\n },\r\n});\r\n\r\nexport const usePromptEditorBaseStyles = makeResetStyles({\r\n width: '100%',\r\n '& .prompt': {\r\n ...shorthands.borderRadius('8px', '8px', '0px', '0px'),\r\n ...shorthands.borderBottom('none'),\r\n clipPath: 'inset(-2px -2px 0 -2px)',\r\n borderBottomStyle: 'none',\r\n '&:hover, &:active, &:focus, &:focus-within': {\r\n borderBottomStyle: 'none',\r\n },\r\n '::after': {\r\n display: 'none',\r\n },\r\n height: 'calc(38% - 70px)',\r\n minHeight: '348px',\r\n paddingTop: '12px',\r\n '& textarea': {\r\n maxHeight: 'unset',\r\n height: 'unset',\r\n },\r\n },\r\n '& .words, .buttons': {\r\n backgroundColor: '#FAFAFA',\r\n width: '100%',\r\n },\r\n '& .words': {\r\n ...shorthands.borderLeft('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.borderRight('1px', 'solid', tokens.colorNeutralStroke1),\r\n boxShadow: '0px 0px 2px 0px rgba(23, 26, 31, 0.12), 0px 0px 1px 0px rgba(23, 26, 31, 0.07)',\r\n clipPath: 'inset(0px -2px 0px -2px)',\r\n paddingLeft: '12px',\r\n paddingBottom: '20px',\r\n display: 'flex',\r\n gap: '12px',\r\n alignItems: 'center',\r\n flexWrap: 'wrap',\r\n borderTopStyle: 'none',\r\n '& button': {\r\n height: '32px',\r\n ...shorthands.borderRadius('8px', '8px', '8px', '8px'),\r\n ...shorthands.border('1px', 'solid', '#B0BEFF'),\r\n backgroundColor: '#FAFAFA',\r\n fontWeight: tokens.fontWeightRegular,\r\n '&:hover': {\r\n backgroundColor: tokens.colorNeutralBackground1Hover,\r\n borderColor: tokens.colorStrokeFocus2,\r\n borderWidth: '1px',\r\n borderStyle: 'solid',\r\n },\r\n minWidth: 'unset',\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n '& .buttons': {\r\n ...shorthands.borderRadius('8px', '8px', '8px', '8px'),\r\n ...shorthands.borderTop('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.borderLeft('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.borderRight('1px', 'solid', tokens.colorNeutralStroke1),\r\n boxShadow: '0px 0px 2px 0px rgba(23, 26, 31, 0.12), 0px 0px 1px 0px rgba(23, 26, 31, 0.07)',\r\n position: 'relative',\r\n top: '-8px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n padding: '12px 12px',\r\n ...shorthands.gap('12px'),\r\n overflowX: 'hidden',\r\n '& button': {\r\n fontWeight: tokens.fontWeightRegular,\r\n height: '32.1px',\r\n ...shorthands.borderRadius('8px', '8px', '8px', '8px'),\r\n '&:hover': {\r\n backgroundColor: tokens.colorNeutralBackground1Hover,\r\n borderColor: tokens.colorStrokeFocus2,\r\n borderWidth: '1px',\r\n borderStyle: 'solid',\r\n },\r\n minWidth: 'unset',\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n});\r\n","\r\nimport React, { useState, useRef, useEffect } from 'react';\r\nimport {\r\n mergeClasses,\r\n Button,\r\n Textarea,\r\n} from '@fluentui/react-components';\r\nimport { ToggleButtons } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport {\r\n ArrowClockwise16Regular,\r\n} from '@fluentui/react-icons';\r\nimport { getOptions } from './options';\r\nimport { usePromptEditorBaseStyles, usePromptEditorStyles } from './style';\r\n\r\nconst displayCount = 5;\r\n\r\nconst sliceOptions = (options, index, usedOptions) => {\r\n const filteredOptions = options.filter(option => !usedOptions.find(usedOption => usedOption.key === option.key));\r\n const roundedIndex = index % filteredOptions.length;\r\n\r\n let slicedOptions = filteredOptions.slice(roundedIndex, roundedIndex + displayCount);\r\n\r\n\r\n if (slicedOptions.length < displayCount) {\r\n slicedOptions = [...slicedOptions, ...filteredOptions.slice(0, (Math.min(displayCount, filteredOptions.length) - slicedOptions.length))];\r\n }\r\n\r\n return slicedOptions;\r\n};\r\n\r\nexport const PromptEditor = (props) => {\r\n const {\r\n i18n,\r\n prompt,\r\n setPrompt,\r\n logger,\r\n textAreaRef: textArea,\r\n } = props;\r\n\r\n const [usedOptions, setUsedOptions] = useState([]);\r\n const options = getOptions(i18n, usedOptions);\r\n const promptEditorBaseStyles = usePromptEditorBaseStyles();\r\n const promptEditorStyles = usePromptEditorStyles();\r\n const [optionsState, setOptionsState] = useState({});\r\n const selectedOption = options.find(option => optionsState[option.key]);\r\n const [textToComplete, setTextToComplete] = useState('');\r\n const [optionsIndex, setOptionsIndex] = useState(0);\r\n\r\n const nextOption = () => {\r\n setOptionsIndex((optionsIndex + displayCount));\r\n };\r\n\r\n const slicedOptions = selectedOption && selectedOption.words.length > 0\r\n ? sliceOptions(selectedOption.words, optionsIndex, usedOptions)\r\n : [];\r\n\r\n const shadowTextArea = useRef();\r\n const wordsRef = useRef();\r\n\r\n useEffect(() => {\r\n // sync the scroll position of the shadow textarea with the main textarea\r\n if (textArea && textArea.current && shadowTextArea.current) {\r\n if (textToComplete === '') {\r\n shadowTextArea.current.style.visibility = 'hidden';\r\n shadowTextArea.current.style.overflowY = '';\r\n textArea.current.style.overflowY = '';\r\n } else if (textArea && textArea.current && textArea.current.scrollHeight > textArea.current.clientHeight) {\r\n // scrollbar of the textarea is visible\r\n shadowTextArea.current.style.overflowY = 'scroll';\r\n shadowTextArea.current.style.visibility = '';\r\n shadowTextArea.current.scrollTop = textArea.current.scrollTop;\r\n } else if (shadowTextArea.current.scrollHeight > shadowTextArea.current.clientHeight) {\r\n // scrollbar of the shadow textarea is visible\r\n shadowTextArea.current.style.visibility = '';\r\n textArea.current.style.overflowY = 'scroll';\r\n textArea.current.scrollTop = shadowTextArea.current.scrollTop;\r\n } else {\r\n shadowTextArea.current.style.overflowY = '';\r\n shadowTextArea.current.style.visibility = '';\r\n textArea.current.style.overflowY = '';\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [textArea, shadowTextArea.current, textToComplete]);\r\n\r\n return (\r\n
\r\n 0 && prompt && prompt.length > 0 ?\r\n `${prompt}${prompt[prompt.length - 1] === ' ' ? '' : ' '}${textToComplete}` : ''}\r\n />\r\n 0 ?\r\n mergeClasses('main-textarea', 'prompt', promptEditorStyles.textarea) :\r\n mergeClasses('main-textarea', 'prompt', promptEditorStyles.textareaPlaceHolder)}\r\n placeholder={i18n.getString(_TL_('What image do you want to create? Describe the subject, key elements, place, style, lighting, and/or mood.'))}\r\n value={prompt}\r\n onChange={(e, data) => setPrompt(data.value)}\r\n />\r\n
\r\n {selectedOption\r\n &&\r\n selectedOption.words.length > 0\r\n &&\r\n <>\r\n {slicedOptions.map(word => (\r\n {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('AIgeneratedImage: prompt button clicked', { word: word.word });\r\n }\r\n setPrompt(`${prompt}${((prompt === '') || (prompt && prompt.length > 0 && prompt[prompt.length - 1] === ' ')) ? '' : ' '}${word.word}`);\r\n setUsedOptions([...usedOptions, word]);\r\n setTextToComplete('');\r\n\r\n if (textArea && textArea.current) {\r\n textArea.current.focus();\r\n }\r\n }}\r\n onMouseOver={() => {\r\n if (textToComplete !== word.word) {\r\n setTextToComplete(word.word);\r\n }\r\n }}\r\n onMouseOut={() => setTextToComplete('')}\r\n >\r\n {word.word}\r\n \r\n ))}\r\n
\r\n
\r\n {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('AIgeneratedImage: toggle button clicked', { key });\r\n }\r\n setOptionsIndex(0);\r\n setOptionsState({\r\n ...(options.map(option => ({ [option.key]: false }))),\r\n [key]: !optionsState[key],\r\n });\r\n\r\n if (!optionsState[key]) {\r\n if (wordsRef && wordsRef.current) {\r\n setTimeout(() => {\r\n const suggestedWords = wordsRef.current.querySelectorAll('.suggested-word');\r\n if (suggestedWords && suggestedWords.length > 0) {\r\n suggestedWords[0].focus();\r\n }\r\n });\r\n }\r\n }\r\n }}\r\n />\r\n
\r\n
);\r\n};\r\n","import React from 'react';\r\nimport {\r\n PuzzlePiece20Regular,\r\n Color20Regular,\r\n ShapeSubtract20Regular,\r\n Lightbulb20Regular,\r\n Emoji20Regular,\r\n} from '@fluentui/react-icons';\r\n\r\nexport const getOptions = (i18n, usedOptions) => ([\r\n {\r\n key: 'keyElements',\r\n text: i18n.getString(_TL_('Key elements')),\r\n icon: ,\r\n words: ([\r\n { key: 'key_0', word: i18n.getString(_TL_('With clouds')) },\r\n { key: 'key_1', word: i18n.getString(_TL_('With mountains')) },\r\n { key: 'key_2', word: i18n.getString(_TL_('On a beach')) },\r\n { key: 'key_3', word: i18n.getString(_TL_('On the coast')) },\r\n { key: 'key_4', word: i18n.getString(_TL_('With vibrant foliage')) },\r\n { key: 'key_5', word: i18n.getString(_TL_('In a studio')) },\r\n { key: 'key_6', word: i18n.getString(_TL_('In autumn')) },\r\n { key: 'key_7', word: i18n.getString(_TL_('In winter')) },\r\n { key: 'key_8', word: i18n.getString(_TL_('In summer')) },\r\n { key: 'key_9', word: i18n.getString(_TL_('In spring')) },\r\n { key: 'key_10', word: i18n.getString(_TL_('Outdoors')) },\r\n { key: 'key_11', word: i18n.getString(_TL_('On a sleek desk')) },\r\n { key: 'key_12', word: i18n.getString(_TL_('In a vibrant market')) },\r\n { key: 'key_13', word: i18n.getString(_TL_('With indoor plants')) },\r\n { key: 'key_14', word: i18n.getString(_TL_('In a modern kitchen')) },\r\n { key: 'key_15', word: i18n.getString(_TL_('On a marble countertop')) },\r\n { key: 'key_16', word: i18n.getString(_TL_('In front of a modern building')) },\r\n { key: 'key_17', word: i18n.getString(_TL_('With a laptop')) },\r\n { key: 'key_18', word: i18n.getString(_TL_('In a boutique')) },\r\n { key: 'key_19', word: i18n.getString(_TL_('In a stylish home office')) },\r\n { key: 'key_20', word: i18n.getString(_TL_('In a park')) },\r\n { key: 'key_21', word: i18n.getString(_TL_('With tropical plants')) },\r\n { key: 'key_22', word: i18n.getString(_TL_('With balloons and confetti')) },\r\n { key: 'key_23', word: i18n.getString(_TL_('On a table')) },\r\n { key: 'key_24', word: i18n.getString(_TL_('In a sunny backyard')) },\r\n { key: 'key_25', word: i18n.getString(_TL_('With cozy decor')) },\r\n { key: 'key_26', word: i18n.getString(_TL_('In a dining room')) },\r\n { key: 'key_27', word: i18n.getString(_TL_('In a living room')) },\r\n { key: 'key_28', word: i18n.getString(_TL_('On an urban street')) },\r\n ]).filter(option => !usedOptions.find(usedOption => usedOption.key === option.key)),\r\n },\r\n {\r\n key: 'mood',\r\n text: i18n.getString(_TL_('Mood')),\r\n icon: ,\r\n words: ([\r\n { key: 'mood_key_0', word: i18n.getString(_TL_('Warm and inviting')) },\r\n { key: 'mood_key_1', word: i18n.getString(_TL_('Adventurous')) },\r\n { key: 'mood_key_2', word: i18n.getString(_TL_('Nostalgic')) },\r\n { key: 'mood_key_3', word: i18n.getString(_TL_('Energetic and playful')) },\r\n { key: 'mood_key_4', word: i18n.getString(_TL_('Elegant and sophisticated')) },\r\n { key: 'mood_key_5', word: i18n.getString(_TL_('Joyful')) },\r\n { key: 'mood_key_6', word: i18n.getString(_TL_('Serene')) },\r\n { key: 'mood_key_7', word: i18n.getString(_TL_('Romantic')) },\r\n { key: 'mood_key_8', word: i18n.getString(_TL_('Mysterious')) },\r\n { key: 'mood_key_9', word: i18n.getString(_TL_('Cozy')) },\r\n { key: 'mood_key_10', word: i18n.getString(_TL_('Bold')) },\r\n { key: 'mood_key_11', word: i18n.getString(_TL_('Peaceful')) },\r\n { key: 'mood_key_12', word: i18n.getString(_TL_('Dynamic')) },\r\n { key: 'mood_key_13', word: i18n.getString(_TL_('Dramatic')) },\r\n { key: 'mood_key_14', word: i18n.getString(_TL_('Contemplative')) },\r\n { key: 'mood_key_15', word: i18n.getString(_TL_('Futuristic')) },\r\n { key: 'mood_key_16', word: i18n.getString(_TL_('Whimsical')) },\r\n { key: 'mood_key_17', word: i18n.getString(_TL_('Calm and tranquil')) },\r\n { key: 'mood_key_18', word: i18n.getString(_TL_('Fresh and invigorating')) },\r\n { key: 'mood_key_19', word: i18n.getString(_TL_('Intimate')) },\r\n { key: 'mood_key_20', word: i18n.getString(_TL_('Bright and cheerful')) },\r\n { key: 'mood_key_21', word: i18n.getString(_TL_('Celebratory')) },\r\n ]).filter(option => !usedOptions.find(usedOption => usedOption.key === option.key)),\r\n },\r\n {\r\n key: 'style',\r\n text: i18n.getString(_TL_('Style')),\r\n icon: ,\r\n words: ([\r\n { key: 'style_key_0', word: i18n.getString(_TL_('Vintage retro')) },\r\n { key: 'style_key_1', word: i18n.getString(_TL_('Minimalist and clean')) },\r\n { key: 'style_key_2', word: i18n.getString(_TL_('Modern')) },\r\n { key: 'style_key_3', word: i18n.getString(_TL_('Candid')) },\r\n { key: 'style_key_4', word: i18n.getString(_TL_('Artistic')) },\r\n { key: 'style_key_5', word: i18n.getString(_TL_('High fashion')) },\r\n { key: 'style_key_6', word: i18n.getString(_TL_('Black and white')) },\r\n { key: 'style_key_7', word: i18n.getString(_TL_('Architectural')) },\r\n { key: 'style_key_8', word: i18n.getString(_TL_('Nature-inspired')) },\r\n { key: 'style_key_9', word: i18n.getString(_TL_('Rural and rustic')) },\r\n { key: 'style_key_10', word: i18n.getString(_TL_('Cinematic')) },\r\n { key: 'style_key_11', word: i18n.getString(_TL_('Vibrant')) },\r\n { key: 'style_key_12', word: i18n.getString(_TL_('Rugged and earthy')) },\r\n { key: 'style_key_13', word: i18n.getString(_TL_('Chic and fashionable')) },\r\n { key: 'style_key_14', word: i18n.getString(_TL_('Lush and tropical')) },\r\n { key: 'style_key_15', word: i18n.getString(_TL_('Bohemian')) },\r\n { key: 'style_key_16', word: i18n.getString(_TL_('Industrial chic')) },\r\n { key: 'style_key_17', word: i18n.getString(_TL_('Coastal cottage')) },\r\n { key: 'style_key_18', word: i18n.getString(_TL_('Art deco')) },\r\n { key: 'style_key_19', word: i18n.getString(_TL_('Urban street style')) },\r\n { key: 'style_key_20', word: i18n.getString(_TL_('Sophisticated elegance')) },\r\n { key: 'style_key_21', word: i18n.getString(_TL_('Whimsical fantasy')) },\r\n { key: 'style_key_22', word: i18n.getString(_TL_('Timeless and classic')) },\r\n { key: 'style_key_23', word: i18n.getString(_TL_('Bold and geometric')) },\r\n { key: 'style_key_24', word: i18n.getString(_TL_('Playful and colorful')) },\r\n { key: 'style_key_25', word: i18n.getString(_TL_('Dark and moody')) },\r\n { key: 'style_key_26', word: i18n.getString(_TL_('Soft pastel')) },\r\n { key: 'style_key_27', word: i18n.getString(_TL_('Grunge aesthetic')) },\r\n ]).filter(option => !usedOptions.find(usedOption => usedOption.key === option.key)),\r\n },\r\n {\r\n key: 'composition',\r\n text: i18n.getString(_TL_('Composition')),\r\n icon: ,\r\n words: ([\r\n { key: 'composition_key_0', word: i18n.getString(_TL_('Close-up view')) },\r\n { key: 'composition_key_1', word: i18n.getString(_TL_('Front view')) },\r\n { key: 'composition_key_2', word: i18n.getString(_TL_('Top-down view')) },\r\n { key: 'composition_key_3', word: i18n.getString(_TL_('Side view')) },\r\n { key: 'composition_key_4', word: i18n.getString(_TL_('Bird’s eye view')) },\r\n { key: 'composition_key_5', word: i18n.getString(_TL_('Centered and symmetrical')) },\r\n { key: 'composition_key_6', word: i18n.getString(_TL_('Asymmetrical balance')) },\r\n { key: 'composition_key_7', word: i18n.getString(_TL_('Wide shot')) },\r\n { key: 'composition_key_8', word: i18n.getString(_TL_('High shot')) },\r\n { key: 'composition_key_9', word: i18n.getString(_TL_('Medium shot')) },\r\n { key: 'composition_key_10', word: i18n.getString(_TL_('Low angle')) },\r\n { key: 'composition_key_11', word: i18n.getString(_TL_('Worm’s eye view')) },\r\n { key: 'composition_key_12', word: i18n.getString(_TL_('Tilted angle')) },\r\n { key: 'composition_key_13', word: i18n.getString(_TL_('Over-the-shoulder')) },\r\n { key: 'composition_key_14', word: i18n.getString(_TL_('Extreme close-up view')) },\r\n { key: 'composition_key_15', word: i18n.getString(_TL_('Reflected angle')) },\r\n { key: 'composition_key_16', word: i18n.getString(_TL_('Background blur')) },\r\n { key: 'composition_key_17', word: i18n.getString(_TL_('Panoramic')) },\r\n { key: 'composition_key_18', word: i18n.getString(_TL_('Extreme long shot')) },\r\n { key: 'composition_key_19', word: i18n.getString(_TL_('Framed')) },\r\n { key: 'composition_key_20', word: i18n.getString(_TL_('Leading lines')) },\r\n { key: 'composition_key_21', word: i18n.getString(_TL_('Layered textures')) },\r\n { key: 'composition_key_22', word: i18n.getString(_TL_('Reflections in water')) },\r\n { key: 'composition_key_23', word: i18n.getString(_TL_('Shadow play')) },\r\n { key: 'composition_key_24', word: i18n.getString(_TL_('Environmental portrait')) },\r\n { key: 'composition_key_25', word: i18n.getString(_TL_('Action shot')) },\r\n { key: 'composition_key_26', word: i18n.getString(_TL_('Candid moment')) },\r\n { key: 'composition_key_27', word: i18n.getString(_TL_('Silhouette against light')) },\r\n { key: 'composition_key_28', word: i18n.getString(_TL_('Grid layout')) },\r\n { key: 'composition_key_29', word: i18n.getString(_TL_('Rule of thirds')) },\r\n ]).filter(option => !usedOptions.find(usedOption => usedOption.key === option.key)),\r\n },\r\n {\r\n key: 'lighting',\r\n text: i18n.getString(_TL_('Lighting')),\r\n icon: ,\r\n words: ([\r\n { key: 'lighting_key_0', word: i18n.getString(_TL_('Natural sunlight')) },\r\n { key: 'lighting_key_1', word: i18n.getString(_TL_('Golden hour glow')) },\r\n { key: 'lighting_key_2', word: i18n.getString(_TL_('Bright studio lighting')) },\r\n { key: 'lighting_key_3', word: i18n.getString(_TL_('Backlighting')) },\r\n { key: 'lighting_key_4', word: i18n.getString(_TL_('Front lighting')) },\r\n { key: 'lighting_key_5', word: i18n.getString(_TL_('Dramatic shadows')) },\r\n { key: 'lighting_key_6', word: i18n.getString(_TL_('Harsh direct light')) },\r\n { key: 'lighting_key_7', word: i18n.getString(_TL_('Candlelight ambiance')) },\r\n { key: 'lighting_key_8', word: i18n.getString(_TL_('Neon lights')) },\r\n { key: 'lighting_key_9', word: i18n.getString(_TL_('Spotlight effect')) },\r\n { key: 'lighting_key_10', word: i18n.getString(_TL_('Dappled sunlight')) },\r\n { key: 'lighting_key_11', word: i18n.getString(_TL_('Underwater lighting')) },\r\n { key: 'lighting_key_12', word: i18n.getString(_TL_('Twilight')) },\r\n { key: 'lighting_key_13', word: i18n.getString(_TL_('Flickering fire')) },\r\n { key: 'lighting_key_14', word: i18n.getString(_TL_('High contrast')) },\r\n { key: 'lighting_key_15', word: i18n.getString(_TL_('Side lighting')) },\r\n { key: 'lighting_key_16', word: i18n.getString(_TL_('Top lighting')) },\r\n { key: 'lighting_key_17', word: i18n.getString(_TL_('Bottom lighting')) },\r\n { key: 'lighting_key_18', word: i18n.getString(_TL_('Harsh lighting')) },\r\n { key: 'lighting_key_19', word: i18n.getString(_TL_('Soft, diffused lighting')) },\r\n { key: 'lighting_key_20', word: i18n.getString(_TL_('Split lighting')) },\r\n { key: 'lighting_key_21', word: i18n.getString(_TL_('Ambient lighting')) },\r\n { key: 'lighting_key_22', word: i18n.getString(_TL_('High-key lighting')) },\r\n { key: 'lighting_key_23', word: i18n.getString(_TL_('Low-key lighting')) },\r\n { key: 'lighting_key_24', word: i18n.getString(_TL_('Warm lighting')) },\r\n { key: 'lighting_key_25', word: i18n.getString(_TL_('Cool lighting')) },\r\n { key: 'lighting_key_26', word: i18n.getString(_TL_('Muted lighting')) },\r\n { key: 'lighting_key_27', word: i18n.getString(_TL_('At sunset')) },\r\n ]).filter(option => !usedOptions.find(usedOption => usedOption.key === option.key)),\r\n },\r\n]).filter(x => x.words.length > 0);\r\n","import {\r\n makeResetStyles,\r\n shorthands\r\n} from '@fluentui/react-components';\r\n\r\nexport const useGeneratedImagesStyles = makeResetStyles({\r\n paddingLeft: '42px',\r\n paddingRight: '42px',\r\n '& .loading-section': {\r\n '& button': {\r\n marginTop: '8px',\r\n },\r\n textAlign: 'center',\r\n marginTop: '32px',\r\n marginBottom: '32px',\r\n },\r\n '& .actionBottomText': {\r\n color: '#605e5c',\r\n },\r\n '& .title': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.gap('5.8px'),\r\n '& span': {\r\n fontSize: '17.4px',\r\n fontWeight: 400,\r\n lineHeight: '23.2px',\r\n },\r\n '& svg': {\r\n width: '29px',\r\n height: '29px',\r\n },\r\n marginBottom: '20px',\r\n },\r\n '& .stock-images': {\r\n '& .title': {\r\n marginTop: '20px',\r\n },\r\n },\r\n '& .tiles-grid-cell': {\r\n overflow: 'hidden',\r\n ...shorthands.borderRadius('8px'),\r\n '&:hover, &:focus-within': {\r\n '& .action-overlay .add-button-view.notClicked': {\r\n visibility: 'visible',\r\n },\r\n },\r\n '& .action-overlay .add-button-view.notClicked': {\r\n visibility: 'hidden',\r\n },\r\n '& .info-overlay': {\r\n position: 'absolute',\r\n bottom: '10px',\r\n left: '10px',\r\n backgroundColor: 'rgba(255, 255, 255, 0.733)',\r\n height: '29px',\r\n width: '29px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n ...shorthands.borderRadius('8px'),\r\n },\r\n '& .action-overlay': {\r\n position: 'absolute',\r\n top: '10px',\r\n right: '10px',\r\n '& .add-button-view': {\r\n '& svg': {\r\n height: '24px',\r\n width: '24px',\r\n },\r\n display: 'flex',\r\n alignItems: 'center',\r\n padding: '4px',\r\n height: '32px',\r\n width: '32px',\r\n ...shorthands.overflow('hidden', 'hidden'),\r\n backdropFilter: 'blur(6px)',\r\n backgroundColor: '#FFF',\r\n ...shorthands.borderRadius('999px'),\r\n ...shorthands.gap('2px'),\r\n '& .icon': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n '& .addIcon': {\r\n marginLeft: '1px',\r\n },\r\n '& .spinnerIcon': {\r\n animationDuration: '1s',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n animationName: [{\r\n from: { transform: 'rotate(0deg)' },\r\n to: { transform: 'rotate(360deg)' },\r\n }],\r\n },\r\n },\r\n },\r\n '& img': {\r\n width: '100%',\r\n height: '100%',\r\n objectFit: 'cover',\r\n },\r\n },\r\n});\r\n\r\nexport const useLoadingViewStyles = makeResetStyles({\r\n backgroundImage: 'linear-gradient(270deg, rgba(255, 255, 255, 0.4) 0%, rgba(71, 207, 250, 0.4) 20%, rgba(180, 124, 248, 0.4) 80%, rgba(255, 255, 255, 0.4) 100%)',\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: 'rgba(233, 234, 240, 1)',\r\n opacity: '0.4',\r\n animationDuration: '3s',\r\n backgroundSize: '500%',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n animationName: [{\r\n from: { backgroundPosition: '100%' },\r\n to: { backgroundPosition: '-20%' },\r\n }],\r\n ...shorthands.borderRadius('8px', '8px', '8px', '8px'),\r\n forcedColorAdjust: 'none',\r\n});\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Tooltip,\r\n mergeClasses, Text, Button\r\n} from '@fluentui/react-components';\r\nimport {\r\n ImageSearchRegular,\r\n CheckmarkRegular,\r\n SpinnerIosRegular,\r\n AddRegular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n SectionTilesGrid,\r\n TilesGridCellImage,\r\n BlackSparkleSVGIcon,\r\n InfoSparkleSVGIcon,\r\n SquareDismissIcon,\r\n LoadingIndicator,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useGeneratedImagesStyles, useLoadingViewStyles } from './style';\r\n\r\nconst addSearchParams = (url, params = {}) =>\r\n new URL(`${url.origin}${url.pathname}?${new URLSearchParams([\r\n ...Array.from(url.searchParams.entries()),\r\n ...Object.entries(params),\r\n ])}`);\r\n\r\nconst MAXAIGCCount = 4;\r\n\r\n\r\nconst LoadingCell = () => {\r\n const classes = useLoadingViewStyles();\r\n\r\n return (\r\n
\r\n );\r\n};\r\n\r\nconst GeneratedImages = ({\r\n aigcImages,\r\n stockImages,\r\n i18n,\r\n isLoading,\r\n loadMoreStockImages,\r\n totalStockImagesCount,\r\n addAIGCImage,\r\n addStockImage,\r\n savedAIGCImages,\r\n savedStockImages,\r\n savingAIGCImages,\r\n savingStockImages,\r\n scrollContainer,\r\n cancel,\r\n logger,\r\n stopGeneratingBtnRef,\r\n}) => {\r\n const generatedImagesStyle = useGeneratedImagesStyles();\r\n\r\n const onRenderImageSpinner = useCallback(() => (\r\n \r\n ), []);\r\n\r\n const Icon = useCallback(({ isSaved, isSaving }) => {\r\n if (isSaved) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n } else if (isSaving) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }, []);\r\n\r\n const AddButton = useCallback(({\r\n addImage,\r\n onKeyDown,\r\n isSaved,\r\n isSaving,\r\n }) => {\r\n let tooltipContent = '';\r\n if (isSaved) {\r\n tooltipContent = i18n.getString(_TL_('Asset saved'));\r\n } else if (isSaving) {\r\n tooltipContent = i18n.getString(_TL_('Saving'));\r\n } else {\r\n tooltipContent = i18n.getString(_TL_('Save to my library'));\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 }, [Icon, i18n]);\r\n\r\n const onRenderAIGCCell = useCallback(({ item }) => {\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n let {\r\n thumbnailSrc: src,\r\n } = item;\r\n const { modelSource } = item;\r\n\r\n const isSaved = savedAIGCImages.includes(src);\r\n const isSaving = savingAIGCImages.includes(src);\r\n\r\n try {\r\n let srcURL = new URL(src);\r\n if (srcURL.host === 'th.bing.com') {\r\n const length = 330;\r\n srcURL = addSearchParams(srcURL, { w: length, h: length });\r\n src = srcURL.toString();\r\n }\r\n } catch (e) {\r\n // ignore\r\n }\r\n\r\n /* istanbul ignore next */\r\n const addImage = (event) => {\r\n if (isSaved || isSaving) { return; }\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Start to add aigc image');\r\n }\r\n addAIGCImage(src, modelSource);\r\n event.stopPropagation();\r\n };\r\n\r\n /* istanbul ignore next */\r\n const onKeyDown = (event) => {\r\n event.preventDefault();\r\n if (event.key === 'Enter') {\r\n addImage();\r\n }\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 }, [AddButton, addAIGCImage, i18n, isLoading, logger, onRenderImageSpinner, savedAIGCImages, savingAIGCImages]);\r\n\r\n const onRenderStockCell = useCallback(({ item }) => {\r\n const {\r\n Preview: { Url },\r\n Id,\r\n } = item;\r\n\r\n const isSaved = savedStockImages.includes(Id);\r\n const isSaving = savingStockImages.includes(Id);\r\n\r\n /* istanbul ignore next */\r\n const addImage = (event) => {\r\n if (isSaved || isSaving) { return; }\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Start to add stock image');\r\n }\r\n addStockImage(Id);\r\n event.stopPropagation();\r\n };\r\n\r\n /* istanbul ignore next */\r\n const onKeyDown = (event) => {\r\n event.preventDefault();\r\n if (event.key === 'Enter') {\r\n addImage();\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n }, [savedStockImages, savingStockImages, i18n, AddButton, logger, addStockImage]);\r\n\r\n const aigcImagesWithAction = useMemo(() => aigcImages.map((image) => {\r\n const {\r\n thumbnailSrc: src,\r\n modelSource,\r\n } = image;\r\n\r\n const isSaved = savedAIGCImages.includes(src);\r\n const isSaving = savingAIGCImages.includes(src);\r\n\r\n return ({\r\n ...image,\r\n onAction: () => {\r\n /* istanbul ignore if */\r\n if (isSaved || isSaving) { return; }\r\n /* istanbul ignore next */\r\n addAIGCImage(src, modelSource);\r\n },\r\n });\r\n }), [aigcImages, savedAIGCImages, savingAIGCImages, addAIGCImage]);\r\n\r\n const stockImagesWithAction = useMemo(() => stockImages.map((image) => {\r\n const {\r\n Id,\r\n } = image;\r\n\r\n const isSaved = savedStockImages.includes(Id);\r\n const isSaving = savingStockImages.includes(Id);\r\n\r\n return ({\r\n ...image,\r\n onAction: () => {\r\n /* istanbul ignore if */\r\n if (isSaved || isSaving) { return; }\r\n /* istanbul ignore next */\r\n addStockImage(Id);\r\n },\r\n });\r\n }), [stockImages, savedStockImages, savingStockImages, addStockImage]);\r\n\r\n const aigcImagesGridSection = useMemo(() => ({\r\n sectionName: 'AIGCImages',\r\n sectionClassName: 'aigc-image-section',\r\n itemKey: 'id',\r\n items: isLoading ? Array.from({ length: MAXAIGCCount }, (v, k) => ({ k })) : aigcImagesWithAction,\r\n totalItemCount: isLoading ? MAXAIGCCount : aigcImagesWithAction.length,\r\n config: {\r\n width: 285,\r\n height: 285,\r\n gridMode: true,\r\n maxColumns: 2,\r\n columnPadding: 16,\r\n rowPadding: 16,\r\n scrollContainer: scrollContainer !== undefined ? scrollContainer : '[role=\"main\"]',\r\n },\r\n }), [aigcImagesWithAction, isLoading, scrollContainer]);\r\n\r\n const stockImagesGridSection = useMemo(() => ({\r\n sectionName: 'StockImages',\r\n sectionClassName: 'stock-image-section',\r\n itemKey: 'id',\r\n items: stockImagesWithAction,\r\n totalItemCount: totalStockImagesCount,\r\n config: {\r\n width: 285,\r\n maxColumns: 2,\r\n columnPadding: 16,\r\n rowPadding: 16,\r\n scrollContainer: scrollContainer !== undefined ? scrollContainer : '[role=\"main\"]',\r\n },\r\n }), [scrollContainer, stockImagesWithAction, totalStockImagesCount]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('AI generated'))}\r\n \r\n
\r\n {\r\n isLoading && (\r\n
\r\n \r\n }\r\n appearance=\"subtle\"\r\n onClick={() => {\r\n cancel();\r\n }}\r\n ref={stopGeneratingBtnRef}\r\n >\r\n {i18n.getString(_TL_('Stop generating'))}\r\n \r\n
\r\n )\r\n }\r\n \r\n
\r\n {isLoading ? null : {i18n.getString(_TL_('Created with Microsoft Advertising'))}}\r\n
\r\n
\r\n {!isLoading && stockImages && stockImages.length > 0 &&\r\n (\r\n
\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Stock images'))}\r\n \r\n
\r\n \r\n
\r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nGeneratedImages.propTypes = {\r\n stockImages: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n aigcImages: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport {\r\n GeneratedImages,\r\n};\r\n","import {\r\n makeResetStyles,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useExampleImageStyles = makeResetStyles({\r\n position: 'relative',\r\n width: '100%',\r\n height: '100%',\r\n '& .example-image': {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n '& .cell-image-frame': {\r\n ...shorthands.borderRadius('6px'),\r\n overflow: 'hidden',\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport {\r\n mergeClasses\r\n} from '@fluentui/react-components';\r\nimport {\r\n TilesGridCellImage,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useExampleImageStyles } from './style';\r\n\r\nexport const ExampleImage = (props) => {\r\n const {\r\n i18n,\r\n generateImageExample,\r\n classes,\r\n } = props;\r\n const baseClasses = useExampleImageStyles();\r\n\r\n return (\r\n
\r\n
\r\n {generateImageExample && generateImageExample.imageUrl && }\r\n
\r\n
\r\n );\r\n};\r\n","import {\r\n makeResetStyles, shorthands,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useExplorePromptsStyles = makeResetStyles({\r\n '& .title': {\r\n marginBottom: '24px',\r\n '& span': {\r\n color: '#605E5C',\r\n fontSize: '16px',\r\n fontWeight: '600',\r\n lineHeight: '24px',\r\n letterSpacing: '-0.16px',\r\n },\r\n },\r\n '& .tiles-grid-cell': {\r\n '&:hover, &:focus-within': {\r\n '& .image-with-prompt .prompt-overlay': {\r\n animationName: [{\r\n '0%': { opacity: '0' },\r\n '100%': { opacity: '1' },\r\n }],\r\n animationDuration: '0.5s',\r\n animationTimingFunction: 'ease-in-out',\r\n '& .example-prompt-template': { // Need height for ellipsis calculation to work\r\n animationName: [{\r\n '0%': { transform: 'translateY(10px)' },\r\n '100%': { transform: 'translateY(0px)' },\r\n }],\r\n animationDuration: '0.5s',\r\n animationTimingFunction: 'ease-in-out',\r\n },\r\n visibility: 'visible',\r\n width: '100%',\r\n height: '100%',\r\n top: 0,\r\n left: 0,\r\n position: 'absolute',\r\n padding: '14px',\r\n fontSize: '16px',\r\n fontWeight: '600',\r\n color: '#FFF',\r\n backgroundImage: 'var(--gradient, linear-gradient(180deg, #F8ADFA -4.49%, rgba(168, 110, 221, 0.00) 13.18%), radial-gradient(166.31% 133.62% at 82.99% -9.79%, #8C48FF 6.62%, #F2598A 50%, #FFB152 89.58%))',\r\n },\r\n },\r\n '& .image-with-prompt': {\r\n width: '100%',\r\n height: '100%',\r\n position: 'relative',\r\n ...shorthands.borderRadius('8px', '8px', '8px', '8px'),\r\n ...shorthands.overflow('hidden', 'hidden'),\r\n '& img': {\r\n width: '100%',\r\n height: '100%',\r\n objectFit: 'cover',\r\n },\r\n '& .prompt-overlay': {\r\n visibility: 'hidden',\r\n width: '100%',\r\n height: '100%',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n position: 'absolute',\r\n padding: '14px',\r\n fontSize: '16px',\r\n fontWeight: '600',\r\n '& .example-prompt-template': { // Need height for ellipsis calculation to work\r\n width: '100%',\r\n height: '100%',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import React, { memo, useMemo } from 'react';\r\nimport {\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n SectionTilesGrid,\r\n AIPromptExamples as prompts\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useExplorePromptsStyles } from './style';\r\n\r\nexport const ExplorePrompts = memo((props) => {\r\n const {\r\n i18n,\r\n setPrompt,\r\n MultiLineEllipsisText,\r\n scrollContainer,\r\n logger,\r\n } = props;\r\n\r\n const explorePromptsStyles = useExplorePromptsStyles();\r\n const onRenderCell = ({ item }) => {\r\n const {\r\n promptText,\r\n imageSrc,\r\n } = item;\r\n\r\n const localizedPromptText = i18n.getString(promptText);\r\n\r\n const onClick = (event) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('AIgeneratedImage: example prompt images clicked', { promptText: localizedPromptText });\r\n }\r\n event.preventDefault();\r\n setPrompt(localizedPromptText);\r\n };\r\n\r\n // TODO: on key down not working\r\n const onKeyDown = (event) => {\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n setPrompt(localizedPromptText);\r\n }\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 const promptsWithAction = prompts.map(prompt => ({\r\n ...prompt,\r\n tabIndex: -1,\r\n onAction: (event) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n setPrompt(i18n.getString(prompt.promptText));\r\n },\r\n }));\r\n\r\n const promptsGridSection = useMemo(() => ({\r\n sectionName: 'Prompts',\r\n sectionClassName: 'prompts-with-image-section',\r\n itemKey: 'id',\r\n items: promptsWithAction,\r\n totalItemCount: promptsWithAction.length,\r\n config: {\r\n width: 216,\r\n height: 184,\r\n gridMode: true,\r\n columnPadding: 12,\r\n rowPadding: 12,\r\n scrollContainer: scrollContainer !== undefined ? scrollContainer : '[role=\"main\"]',\r\n },\r\n }), [promptsWithAction, scrollContainer]);\r\n\r\n const sectionGridData = useMemo(\r\n () => ([promptsGridSection]),\r\n [promptsGridSection]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Explore prompts'))}\r\n \r\n
\r\n \r\n
\r\n );\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Link, makeResetStyles, makeStyles, mergeClasses, shorthands, tokens, } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\n\r\nconst useAIGCDisclaimerStyles = makeStyles({\r\n marginLeft4: {\r\n marginLeft: '4px',\r\n ...shorthands.textDecoration('underline'),\r\n },\r\n});\r\n\r\nconst useAIGCDisclaimerDefaultStyles = makeResetStyles({\r\n '&:focus': {\r\n borderStyle: 'solid',\r\n borderWidth: '1px',\r\n borderColor: tokens.colorStrokeFocus2,\r\n },\r\n});\r\n\r\nexport const AIGCDisclaimer = (props) => {\r\n const {\r\n i18n,\r\n } = props;\r\n\r\n const classes = useAIGCDisclaimerStyles();\r\n const defaultClasses = useAIGCDisclaimerDefaultStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Please ensure you review any newly created images carefully. It\\'s your responsibility to ensure that the images do not infringe upon any third-party rights, including copyright or other intellectual property rights.'))}\r\n \r\n {i18n.getString(_TL_('Learn more'))}\r\n \r\n \r\n \r\n
);\r\n};\r\n\r\n\r\nAIGCDisclaimer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nAIGCDisclaimer.defaultProps = {\r\n};\r\n","import React from 'react';\r\nimport {\r\n mergeClasses, Text,\r\n} from '@fluentui/react-components';\r\n\r\nexport const RemainingText = ({\r\n i18n, className,\r\n}) => {\r\n const remainingText = i18n.getString(_TL_('Please note you have a limited number of image requests that we can generate quickly each day. After that, image generations may take longer than expected.'));\r\n return (\r\n <>\r\n
\r\n {remainingText}\r\n
\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\n\r\nexport const ErrorMessage = (props) => {\r\n const {\r\n error,\r\n } = props;\r\n\r\n if (error == null) return null;\r\n\r\n return (error && error.length > 0 &&\r\n
\r\n \r\n \r\n {error}\r\n \r\n \r\n
);\r\n};\r\n\r\n","import {\r\n makeResetStyles, shorthands,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useGenerateImagePageStyles = makeResetStyles({\r\n display: 'flex',\r\n width: '100%',\r\n height: '100%',\r\n '& .prompt-panel': {\r\n width: 'calc((100% - 69px)/2)',\r\n paddingTop: '56px',\r\n paddingLeft: '44px',\r\n paddingRight: '44px',\r\n position: 'fixed',\r\n overflowY: 'auto',\r\n '& .title': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& span': {\r\n color: '#171A1F',\r\n },\r\n },\r\n '& .remainingText': {\r\n marginTop: '4px',\r\n color: '#605e5c',\r\n marginBottom: '24px',\r\n },\r\n '& .prompt-section': {\r\n position: 'relative',\r\n },\r\n '& .message-bar': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n marginTop: '24px',\r\n width: '100%',\r\n },\r\n '& .action-bar': {\r\n display: 'flex',\r\n marginTop: '25px',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n gap: '12px',\r\n '& button': {\r\n minWidth: 'unset',\r\n whiteSpace: 'nowrap',\r\n },\r\n '& .generate-button': {\r\n '& span': {\r\n color: '#FFFFFF',\r\n },\r\n '& .sparkle-icon': {\r\n fontSize: '24px',\r\n height: '24px',\r\n width: '24px',\r\n },\r\n backgroundImage: 'linear-gradient(91deg, #185ABD 0%, #8763C2 100%)',\r\n },\r\n },\r\n },\r\n '& .image-panel': {\r\n marginLeft: 'calc((100vw - (100vw - 100%)) / 2 + (100vw - 69px - 100%) / 2)',\r\n width: '50%',\r\n paddingTop: '48px',\r\n paddingBottom: '48px',\r\n backgroundColor: '#FAFAFA',\r\n paddingLeft: '36px',\r\n paddingRight: '36px',\r\n '& .loading-view': {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useCallback, useState, useLayoutEffect, useEffect, useRef } from 'react';\r\nimport queryString from 'query-string';\r\nimport {\r\n makeStyles,\r\n mergeClasses,\r\n Subtitle1, Subtitle2, Button,\r\n} from '@fluentui/react-components';\r\nimport {\r\n ArrowReset24Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n HollowSparkleSVGIcon,\r\n HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { Mode } from '@bingads-webui-react/app-layout-container';\r\n\r\nimport { useGenerateImagePageState, statuses } from './state';\r\nimport { BrandDetectionConfirmation } from './brand-detection-confirmation';\r\nimport { PromptEditor } from './prompt-editor';\r\nimport { GeneratedImages } from './generated-images';\r\nimport { ExampleImage } from './example-image';\r\nimport { ExplorePrompts } from './explore-prompts';\r\nimport { AIGCDisclaimer } from './disclaimer';\r\nimport { RemainingText } from './remaing-text';\r\nimport { ErrorMessage } from './error';\r\nimport { useGenerateImagePageStyles } from './style';\r\n\r\nconst ActionBar = (props) => {\r\n const {\r\n i18n,\r\n startOver,\r\n generateImage,\r\n isLoading,\r\n isValid,\r\n } = props;\r\n\r\n const onStartOverKeyDown = (evt) => {\r\n if (evt.code === 'Enter' || evt.code === 'Space') {\r\n startOver(evt);\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n }\r\n };\r\n\r\n const onGenerateImageKeyDown = (evt) => {\r\n if (evt.code === 'Enter' || evt.code === 'Space') {\r\n generateImage(evt);\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n }\r\n };\r\n\r\n return (\r\n
\r\n }\r\n onClick={startOver}\r\n onKeyDown={onStartOverKeyDown}\r\n disabled={!isValid || isLoading}\r\n >\r\n \r\n {i18n.getString(_TL_('Start over'))}\r\n \r\n \r\n }\r\n onClick={generateImage}\r\n onKeyDown={onGenerateImageKeyDown}\r\n disabled={!isValid || isLoading}\r\n >\r\n \r\n {i18n.getString(_TL_('Generate'))}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nconst useTopDivMetaData = (topDiv) => {\r\n const [offset, setOffset] =\r\n useState(0);\r\n\r\n useLayoutEffect(() => {\r\n if (topDiv) {\r\n let target = topDiv;\r\n let newOffset = 0;\r\n do {\r\n newOffset += target.offsetTop;\r\n target = target.offsetParent;\r\n } while (target);\r\n\r\n if (newOffset !== offset) {\r\n setOffset(newOffset);\r\n }\r\n }\r\n }, [offset, topDiv]);\r\n\r\n return [offset];\r\n};\r\n\r\nconst PromptPanel = (props) => {\r\n const {\r\n i18n,\r\n setPrompt,\r\n prompt,\r\n startOver,\r\n generateImage,\r\n detectedBrandName,\r\n renderHelpButton,\r\n onGenerateImage,\r\n logger,\r\n isLoading,\r\n promptError,\r\n serverError,\r\n isValid,\r\n textAreaRef,\r\n } = props;\r\n\r\n const [topDiv, setTopDiv] = useState(null);\r\n const [offset] = useTopDivMetaData(topDiv);\r\n\r\n return (\r\n
setTopDiv(ref)} style={{ height: `calc(100% - 33px - ${offset}px)` }}>\r\n
\r\n {i18n.getString(_TL_('Generate image'))}\r\n
\r\n \r\n {!detectedBrandName && (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n {detectedBrandName && (\r\n onGenerateImage(true)}\r\n logger={logger}\r\n renderHelpButton={renderHelpButton}\r\n />\r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst useStyles = makeStyles({\r\n hidden: {\r\n display: 'none',\r\n },\r\n});\r\n\r\nconst ImagePanel = (props) => {\r\n const {\r\n i18n,\r\n generateImageExample,\r\n setPrompt,\r\n MultiLineEllipsisText,\r\n isLoading,\r\n stockImages,\r\n aigcImages,\r\n loadMoreStockImages,\r\n totalStockImagesCount,\r\n addAIGCImage,\r\n addStockImage,\r\n cancel,\r\n savedAIGCImages,\r\n savedStockImages,\r\n savingAIGCImages,\r\n savingStockImages,\r\n scrollContainer,\r\n logger,\r\n stopGeneratingBtnRef,\r\n } = props;\r\n\r\n const classes = useStyles();\r\n const hasAIGCImages = (aigcImages && aigcImages.length > 0);\r\n const hasAIGCImageExample = (generateImageExample && generateImageExample.imageUrl);\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\nexport const GenerateImagePageComponent = (props) => {\r\n const {\r\n i18n,\r\n dataService,\r\n logger,\r\n renderHelpButton,\r\n MultiLineEllipsisText,\r\n notificationApi,\r\n aid,\r\n search,\r\n scrollContainer,\r\n pagePerfMarker: generateImagePerfMarker,\r\n changeLayout,\r\n setDataLoaded,\r\n } = props;\r\n const textAreaRef = useRef(null);\r\n const stopGeneratingBtnRef = useRef(null);\r\n const [announcedText, setAnnouncedText] = useState('');\r\n const queries = queryString.parse(search);\r\n const {\r\n folderId = '',\r\n } = queries || {};\r\n\r\n const {\r\n prompt,\r\n setPrompt,\r\n detectedBrandName,\r\n getImages,\r\n setDetectedBrandName,\r\n state,\r\n loadStockImages,\r\n loadMoreStockImages,\r\n totalStockImagesCount,\r\n cancel,\r\n aigcImages,\r\n stockImages,\r\n addAIGCImage,\r\n addStockImage,\r\n isValid,\r\n promptError,\r\n serverError,\r\n savedAIGCImages,\r\n savedStockImages,\r\n savingAIGCImages,\r\n savingStockImages,\r\n onStartOver,\r\n generateImageExample,\r\n } = useGenerateImagePageState({\r\n logger,\r\n i18n,\r\n dataService,\r\n aid,\r\n notificationApi,\r\n folderId,\r\n perfMarker: generateImagePerfMarker,\r\n });\r\n\r\n const onGenerateImage = useCallback((skipBrandDetection) => {\r\n loadStockImages();\r\n getImages(skipBrandDetection);\r\n setDetectedBrandName(null);\r\n if (skipBrandDetection) {\r\n logger.logTrace(`AIGenerateImagesView: skipped detected brand name: ${detectedBrandName}`);\r\n }\r\n }, [detectedBrandName, getImages, loadStockImages, logger, setDetectedBrandName]);\r\n\r\n const classes = useGenerateImagePageStyles();\r\n const startOver = (event) => {\r\n onStartOver();\r\n\r\n if ((event.code === 'Enter' || event.code === 'Space') && !(generateImageExample && generateImageExample.prompt)) {\r\n // if no initial prompt, click start over button will clean the prompt text, then the start over button will be disabled, focus on the text area.\r\n if (textAreaRef && textAreaRef.current) {\r\n textAreaRef.current.focus();\r\n }\r\n }\r\n };\r\n\r\n const isLoading = useMemo(() => (state.status === statuses.cancelling\r\n || state.status === statuses.loading), [state]);\r\n\r\n const generateImage = (event) => {\r\n onGenerateImage();\r\n setAnnouncedText(i18n.getString(_TL_('Start to generate images')));\r\n\r\n if (event.code === 'Enter' || event.code === 'Space') {\r\n setTimeout(() => {\r\n if (stopGeneratingBtnRef && stopGeneratingBtnRef.current) {\r\n stopGeneratingBtnRef.current.focus();\r\n }\r\n });\r\n }\r\n };\r\n\r\n usePageActiveTimeTracker(logger, 'Generate-image');\r\n\r\n useEffect(() => {\r\n if (setDataLoaded && generateImagePerfMarker) {\r\n generateImagePerfMarker.willRender();\r\n setDataLoaded();\r\n }\r\n }, [generateImagePerfMarker, setDataLoaded]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ LoadAdsStudioImageGenerationPage: true });\r\n }, []);\r\n\r\n useLayoutEffect(() => {\r\n if (changeLayout) {\r\n changeLayout(\r\n {\r\n nav: {\r\n mode: Mode.Hidden,\r\n },\r\n },\r\n true, // isPageConfig\r\n true // isPageConfigPartialUpdate\r\n );\r\n }\r\n }, [changeLayout]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
);\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useEffect, useRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport { get, find } from 'underscore';\r\nimport { Button, makeStyles, shorthands, Spinner, mergeClasses } from '@fluentui/react-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { AdsStudioPanelContainer, ClarityTags, useClarityTags, getImageAssetLimitPerAccount } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst useButtonStyles = makeStyles({\r\n bottonWrapper: {\r\n ...shorthands.padding('16px', '24px', '24px'),\r\n },\r\n button: {\r\n minWidth: 'auto',\r\n ...shorthands.padding('6px', '12px'),\r\n marginRight: '6px',\r\n },\r\n});\r\n\r\nconst useStyles = makeStyles({\r\n helpLink: {\r\n color: '#337ab7',\r\n ...shorthands.textDecoration('underline'),\r\n fontWeight: 'normal',\r\n backgroundColor: 'transparent',\r\n ...shorthands.borderRadius('0px', '0px', '0px', '0px'),\r\n ...shorthands.border('none'),\r\n },\r\n overlay: {\r\n zIndex: 2,\r\n },\r\n spinner: {\r\n marginTop: '250px',\r\n },\r\n});\r\n\r\nexport const AdsStudioAddAssetPanel = (props) => {\r\n const {\r\n aid, i18n, isOpen, dismiss, logger, headerText, isReadonly, notificationApi, selectedAsset, onClickSelect, showBlocker, children, isMultiSelection,\r\n } = props;\r\n const classes = useStyles();\r\n const buttonClasses = useButtonStyles();\r\n const panelRef = useRef(null);\r\n\r\n useClarityTags([\r\n ClarityTags.LaunchedAdsStudio,\r\n ClarityTags.LaunchedAddImageAssetsFromAdsStudio,\r\n ]);\r\n\r\n const handleJobErrors = useCallback((jobErrors) => {\r\n if (jobErrors.length > 0) {\r\n const assetLimitError = find(jobErrors, (err) => {\r\n const errorCode = get(err, ['body', 'value', 0, 'Code'], '');\r\n return errorCode === 'ImagesLimitExceededPerAccount';\r\n });\r\n\r\n if (assetLimitError) {\r\n const assetLimit = getImageAssetLimitPerAccount(aid, logger);\r\n notificationApi.showWarning(i18n.getString(_TL_('One or more images failed to upload because your account has exceeded the {{value}}-image asset limit. Please remove assets and try again.'), { value: assetLimit }));\r\n } else {\r\n const genericError = (\r\n \r\n { i18n.getString(_TL_('One or more assets failed to upload. Please try again')) }\r\n \r\n \r\n );\r\n notificationApi.showWarning(genericError);\r\n }\r\n }\r\n }, [aid, logger, notificationApi, i18n, classes.helpLink]);\r\n\r\n const onSelectAddImages = useCallback(() => {\r\n onClickSelect(handleJobErrors);\r\n }, [handleJobErrors, onClickSelect]); // todo: implement\r\n\r\n const onRenderFooterContent = useCallback(() => (\r\n
\r\n {isMultiSelection &&\r\n \r\n {i18n.getString(_TL_('Add'))}\r\n \r\n }\r\n \r\n
\r\n ), [buttonClasses.bottonWrapper, buttonClasses.button, onSelectAddImages, isReadonly, selectedAsset, i18n, dismiss, isMultiSelection]);\r\n\r\n useEffect(() => {\r\n if (isOpen) {\r\n const firstNode = document.querySelector('.panel-close-button');\r\n const lastNode = document.querySelector('.cancel-panel-button');\r\n const handleTabKey = (event) => {\r\n if (event.key === 'Tab' && !event.shiftKey) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n firstNode.focus();\r\n }\r\n };\r\n const handleShiftTabKey = (event) => {\r\n if (event.key === 'Tab' && event.shiftKey) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n lastNode.focus();\r\n }\r\n };\r\n\r\n if (lastNode && firstNode && lastNode !== firstNode) {\r\n lastNode.addEventListener('keydown', handleTabKey);\r\n firstNode.addEventListener('keydown', handleShiftTabKey);\r\n }\r\n\r\n return () => {\r\n if (lastNode && firstNode) {\r\n lastNode.removeEventListener('keydown', handleTabKey);\r\n firstNode.removeEventListener('keydown', handleShiftTabKey);\r\n }\r\n };\r\n }\r\n return () => {};\r\n }, [isOpen]);\r\n\r\n useEffect(() => {\r\n if (panelRef.current) {\r\n const handleESCKey = (event) => {\r\n if (event.key === 'Escape') {\r\n dismiss();\r\n }\r\n };\r\n\r\n const target = panelRef.current;\r\n\r\n if (isOpen) {\r\n target.addEventListener('keydown', handleESCKey);\r\n return () => {\r\n target.removeEventListener('keydown', handleESCKey);\r\n };\r\n }\r\n }\r\n return () => {};\r\n }, [dismiss, isOpen]);\r\n\r\n return (\r\n \r\n <>\r\n {\r\n showBlocker &&\r\n \r\n \r\n \r\n }\r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nAdsStudioAddAssetPanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n dismiss: PropTypes.func.isRequired,\r\n headerText: PropTypes.string.isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n isReadonly: PropTypes.bool,\r\n aid: PropTypes.number.isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n selectedAsset: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({})), PropTypes.shape({})]),\r\n onClickSelect: PropTypes.func.isRequired,\r\n showBlocker: PropTypes.bool,\r\n isMultiSelection: PropTypes.bool,\r\n};\r\n\r\nAdsStudioAddAssetPanel.defaultProps = {\r\n isReadonly: false,\r\n showBlocker: false,\r\n selectedAsset: undefined,\r\n isMultiSelection: true,\r\n};\r\n","import { useCallback, useState, useMemo } from 'react';\r\nimport { each } from 'underscore';\r\nimport { MaxAddAssetJobInParell, CSMLAssetSource } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { runJobsInParallelWithRateLimit } from '@bingads-webui-universal/parallel-job-with-rate-limit';\r\n\r\nexport const useSourceImages = ({\r\n dataService, logger, navigation, perfMarker,\r\n}) => {\r\n const [selectedImages, setSelectedImages] = useState([]);\r\n const [showBlocker, setShowBlocker] = useState(false);\r\n const validImages = useMemo(() => (Array.isArray(selectedImages) ? selectedImages.filter(({ id }) => !!id) : []), [selectedImages]);\r\n const selectedImageUrls = useMemo(() => validImages.map(({ id }) => id), [validImages]);\r\n\r\n const onStockClickSelect = useCallback((handleJobErrors) => {\r\n const stockImagePerfMarker = perfMarker && perfMarker.createChild('stockImagePicker');\r\n if (stockImagePerfMarker) {\r\n stockImagePerfMarker.willInit();\r\n }\r\n const jobErrors = [];\r\n const handleJobError = (err) => {\r\n jobErrors.push(err);\r\n };\r\n\r\n const saveOperations = [];\r\n\r\n each(selectedImageUrls, (id) => {\r\n saveOperations.push(() => dataService.uploadStockImage({ stockImageId: id }));\r\n });\r\n setShowBlocker(true);\r\n runJobsInParallelWithRateLimit({\r\n jobsToRateLimit: saveOperations,\r\n maxJobsInParallel: MaxAddAssetJobInParell,\r\n handleJobError,\r\n }).then((values) => {\r\n const imageIds = values || [];\r\n logger.logTrace('Add Media Panel: saved stock images to folder', { imageIds: imageIds.join(','), count: imageIds.length });\r\n navigation.goBack({ reload: true });\r\n }).finally(() => {\r\n setSelectedImages([]);\r\n handleJobErrors(jobErrors);\r\n setShowBlocker(false);\r\n if (stockImagePerfMarker) {\r\n stockImagePerfMarker.done();\r\n }\r\n });\r\n }, [dataService, logger, navigation, selectedImageUrls]);\r\n\r\n const onInvestClickSelect = useCallback((handleJobErrors) => {\r\n const investImagePerfMarker = perfMarker && perfMarker.createChild('investImagePicker');\r\n if (investImagePerfMarker) {\r\n investImagePerfMarker.willInit();\r\n }\r\n const jobErrors = [];\r\n const handleJobError = (err) => {\r\n jobErrors.push(err);\r\n };\r\n\r\n const saveOperations = [];\r\n\r\n each(validImages, ({ id, url }) => {\r\n saveOperations.push(() => dataService.uploadInvestImage({ investImageId: id, imageSrc: url }));\r\n });\r\n\r\n setShowBlocker(true);\r\n runJobsInParallelWithRateLimit({\r\n jobsToRateLimit: saveOperations,\r\n maxJobsInParallel: MaxAddAssetJobInParell,\r\n handleJobError,\r\n }).then((values) => {\r\n const imageIds = values || [];\r\n logger.logTrace('Add Media Panel: saved invest images to folder', { imageIds: imageIds.join(','), count: imageIds.length });\r\n navigation.goBack({ reload: true });\r\n }).finally(() => {\r\n setSelectedImages([]);\r\n handleJobErrors(jobErrors);\r\n setShowBlocker(false);\r\n if (investImagePerfMarker) {\r\n investImagePerfMarker.done();\r\n }\r\n });\r\n }, [dataService, logger, navigation, validImages]);\r\n\r\n const onWebsiteClickSelect = useCallback((handleJobErrors) => {\r\n const jobErrors = [];\r\n const websiteImagePerfMarker = perfMarker && perfMarker.createChild('websiteImagePicker');\r\n if (websiteImagePerfMarker) {\r\n websiteImagePerfMarker.willInit();\r\n }\r\n const handleJobError = (err) => {\r\n jobErrors.push(err);\r\n };\r\n\r\n const uploadOperations = [];\r\n each(selectedImageUrls, (url) => {\r\n uploadOperations.push(() => dataService.uploadImageByUrl({ imageUrl: url, sourceType: CSMLAssetSource.Website }));\r\n });\r\n setShowBlocker(true);\r\n runJobsInParallelWithRateLimit({\r\n jobsToRateLimit: uploadOperations,\r\n maxJobsInParallel: MaxAddAssetJobInParell,\r\n handleJobError,\r\n }).then((values) => {\r\n const imageIds = values || [];\r\n logger.logTrace('Add Media Panel: saved website images to folder', { imageIds: imageIds.join(','), count: imageIds.length });\r\n navigation.goBack({ reload: true });\r\n })\r\n .finally(() => {\r\n setSelectedImages([]);\r\n handleJobErrors(jobErrors);\r\n setShowBlocker(false);\r\n if (websiteImagePerfMarker) {\r\n websiteImagePerfMarker.done();\r\n }\r\n });\r\n }, [dataService, logger, navigation, selectedImageUrls]);\r\n\r\n return {\r\n selectedImages,\r\n showBlocker,\r\n setSelectedImages,\r\n onWebsiteClickSelect,\r\n onStockClickSelect,\r\n onInvestClickSelect,\r\n };\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { WebsiteImagePanelContent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\nimport { useSourceImages } from './hooks/use-source-images';\r\n\r\nexport const WebsiteImagePanel = (props) => {\r\n const {\r\n i18n, aid, cid, oDataConfig, dataService, logger, notificationApi, navigation, open, perfMarker,\r\n } = props;\r\n const {\r\n setSelectedImages, onWebsiteClickSelect, showBlocker, selectedImages,\r\n } = useSourceImages({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nWebsiteImagePanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadImage: PropTypes.func,\r\n uploadStockImage: PropTypes.func,\r\n uploadImageByUrl: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { StockImagePanelContent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useSourceImages } from './hooks/use-source-images';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\n\r\nexport const StockImagePanel = (props) => {\r\n const {\r\n i18n,\r\n aid, cid, oDataConfig,\r\n dataService, logger, notificationApi, navigation, open, perfMarker,\r\n } = props;\r\n const {\r\n setSelectedImages, onStockClickSelect, showBlocker, selectedImages,\r\n } = useSourceImages({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nStockImagePanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadImage: PropTypes.func,\r\n uploadStockImage: PropTypes.func,\r\n uploadImageByUrl: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n","import {\r\n processVideoSizeLimitError,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const getAddVideoError = ({\r\n error,\r\n i18n,\r\n aid,\r\n logger,\r\n}) => {\r\n const { limit } = processVideoSizeLimitError({\r\n errorList: [error],\r\n aid,\r\n logger,\r\n }) || {};\r\n\r\n if (limit) {\r\n return i18n.getString(\r\n _TL_('We couldn\\'t add your video because your account has exceeded the {{value}}-video asset limit. Please remove videos and try again.'),\r\n { value: limit }\r\n );\r\n }\r\n\r\n return i18n.getString(_TL_('We couldn\\'t add your video. Please confirm that your video\\'s URL is supported or refresh the page and try again.'));\r\n};\r\n","import React, { useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AddVideoPanelContent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\nimport { getAddVideoError } from './error/add-video-error';\r\n\r\nexport const AddVideoPanel = (props) => {\r\n const {\r\n i18n, dataService, aid,\r\n logger, notificationApi, navigation, open,\r\n } = props;\r\n const [selectedVideos, setSelectedVideos] = useState([]);\r\n const [showBlocker, setShowBlocker] = useState(false);\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n const onClickSelect = useCallback(() => {\r\n const videoUrl = selectedVideos[0].url;\r\n setShowBlocker(true);\r\n dataService.uploadVideoByUrl({\r\n videoUrl,\r\n }).then((videoId) => {\r\n logger.logTrace('Add Media Panel: saved video to folder', { videoId });\r\n\r\n navigation.goBack({ reload: true });\r\n }).catch((error) => {\r\n const errorMsg = getAddVideoError({\r\n error,\r\n i18n,\r\n aid,\r\n logger,\r\n });\r\n notificationApi.showWarning(errorMsg);\r\n\r\n dismiss();\r\n }).finally(() => {\r\n setShowBlocker(false);\r\n });\r\n }, [aid, dataService, dismiss, i18n, logger, navigation, notificationApi, selectedVideos]);\r\n\r\n const onChange = useCallback((videos) => {\r\n setSelectedVideos(videos);\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\nAddVideoPanel.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadVideoByUrl: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { MessageBar, MessageBarActions, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Button, makeStyles, shorthands, mergeClasses } from '@fluentui/react-components';\r\nimport { AdsStudioPanelContainer, supportedImageExtensions, supportedVideoExtensions, FileUploadingPreview, useUploadFiles, isReachFileSizeLimit, getReachFileSizeLimitErrorMessage, } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { UploadPreviewWithCustomPreview, parseFileName } from '@bingads-webui-campaign-react/upload-file-picker';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\n\r\nconst usePanelStyles = makeStyles({\r\n buttonWrapper: {\r\n ...shorthands.padding('16px', '24px', '24px'),\r\n },\r\n button: {\r\n minWidth: 'auto',\r\n ...shorthands.padding('6px', '12px'),\r\n marginRight: '6px',\r\n },\r\n uploadButton: {\r\n width: '0px',\r\n ...shorthands.overflow('hidden !important'),\r\n },\r\n helpLink: {\r\n color: '#3073ad',\r\n ...shorthands.textDecoration('underline'),\r\n fontWeight: 'normal',\r\n backgroundColor: 'transparent',\r\n ...shorthands.borderRadius('0px', '0px', '0px', '0px'),\r\n ...shorthands.border('none'),\r\n },\r\n messageBar: {\r\n whiteSpace: 'normal',\r\n },\r\n});\r\n\r\nconst usePreviewStyles = makeStyles({\r\n imageItemBox: {\r\n paddingBottom: '5px',\r\n width: '298px',\r\n ...shorthands.overflow('hidden'),\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n marginRight: '16px',\r\n marginBottom: '16px',\r\n ...shorthands.borderRadius('4px'),\r\n backgroundColor: '#faf9f8',\r\n },\r\n});\r\n\r\nexport const UploadFilesPanel = (props) => {\r\n const {\r\n i18n, dataService, aid,\r\n logger, notificationApi, navigation, mode, openSystemUpload, globalLegacyI18n, perfMarker,\r\n isUploadImageUpscaleEnabled,\r\n } = props;\r\n const classes = usePanelStyles();\r\n const previewClasses = usePreviewStyles();\r\n const [errors, setErrors] = useState([]);\r\n const uploadInput = useRef();\r\n const globalI18n = useMemo(() => globalLegacyI18n.get('$/i18n!legacy/global'), [globalLegacyI18n]);\r\n\r\n const filePickerI18n = useMemo(() => mergeI18n(globalI18n, i18n), [globalI18n, i18n]);\r\n\r\n const dismiss = useCallback(() => {\r\n setErrors([]);\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n const onRenderFooterContent = useCallback(() => (\r\n
\r\n \r\n
\r\n ), [classes, i18n, dismiss]);\r\n\r\n const onFilesAddedCallback = useCallback(() => {\r\n setErrors([]);\r\n navigation.goBack({ reload: true });\r\n }, [navigation]);\r\n\r\n const {\r\n previewArr,\r\n onFileRead,\r\n } = useUploadFiles({\r\n dataService, logger, notificationApi, i18n, aid, onFilesAddedCallback, setErrors, filePickerI18n, perfMarker, isUploadImageUpscaleEnabled,\r\n });\r\n\r\n const isOpen = useMemo(() => (previewArr.length > 0 || errors.length > 0), [errors.length, previewArr.length]);\r\n const supportedFileExtensions = useMemo(() => {\r\n if (mode === 'image') {\r\n return supportedImageExtensions;\r\n } else if (mode === 'video') {\r\n return supportedVideoExtensions;\r\n }\r\n return [\r\n ...supportedImageExtensions,\r\n ...supportedVideoExtensions,\r\n ];\r\n }, [mode]);\r\n\r\n const clearInputFile = useCallback((event) => {\r\n if (event) {\r\n // eslint-disable-next-line no-param-reassign\r\n event.target.value = '';\r\n }\r\n }, []);\r\n\r\n const readFile = useCallback((event) => {\r\n const { files: fileObjects } = event.target;\r\n const selectedFiles = !_.isUndefined(fileObjects) && fileObjects.length > 0 && fileObjects;\r\n if (selectedFiles) {\r\n const selectedFilesCount = selectedFiles.length;\r\n let fileIndex;\r\n const errorArr = [];\r\n\r\n for (fileIndex = 0; fileIndex < selectedFilesCount; fileIndex += 1) {\r\n const fileObj = selectedFiles[fileIndex];\r\n const fileSizeMB = (fileObj.size / 1024 / 1024).toFixed(3);\r\n let reachLimit;\r\n\r\n if (isReachFileSizeLimit) {\r\n const { ext } = parseFileName(fileObj.name);\r\n reachLimit = isReachFileSizeLimit({ ext, fileSizeMB });\r\n }\r\n\r\n if (reachLimit) {\r\n errorArr.push(getReachFileSizeLimitErrorMessage({ i18n }));\r\n\r\n break;\r\n }\r\n }\r\n if (_.isEmpty(errorArr)) {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('File starts to upload', { mode });\r\n }\r\n return onFileRead(selectedFiles, () => clearInputFile(event));\r\n }\r\n clearInputFile(event);\r\n setErrors(errorArr);\r\n } // else no media picked, so do nothing\r\n\r\n return ''; // for testability\r\n }, [clearInputFile, i18n, logger, mode, onFileRead]);\r\n\r\n useEffect(() => {\r\n if (openSystemUpload) {\r\n uploadInput.current.click();\r\n }\r\n }, [openSystemUpload]);\r\n\r\n return (\r\n <>\r\n \r\n <>\r\n \r\n {\r\n errors.length > 0 &&\r\n errors.map((errMsg, index) => (\r\n \r\n \r\n {errMsg}\r\n {isUploadImageUpscaleEnabled && }\r\n \r\n setErrors([])}\r\n aria-label=\"dismiss\"\r\n appearance=\"transparent\"\r\n icon={}\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\nUploadFilesPanel.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadVideoByUrl: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n mode: PropTypes.oneOf(['image', 'video']),\r\n openSystemUpload: PropTypes.shape({}),\r\n isUploadImageUpscaleEnabled: PropTypes.bool,\r\n};\r\n\r\nUploadFilesPanel.defaultProps = {\r\n mode: null,\r\n openSystemUpload: null,\r\n isUploadImageUpscaleEnabled: false,\r\n};\r\n","import { useCallback } from 'react';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { parseFileName } from '@bingads-webui-campaign-react/upload-file-picker';\r\nimport {\r\n filterFilesByExtensions,\r\n createFolderHierarchyMap,\r\n createFoldersByHierarchy,\r\n createRateLimitedAssetUploadPromises,\r\n useReadAsset,\r\n useValidateAsset,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const NO_VALID_FILES_ERROR = 'novalidfileserror';\r\nexport const ASSET_LIMIT_EXCEEDED_ERROR = 'toomanyassets';\r\n\r\nexport const useUploadFolder = ({\r\n assetUploadLimit = 100,\r\n createFolderAsync,\r\n currentFolderId,\r\n uploadAssetAsync,\r\n supportedExtensions,\r\n getCustomizedHandlerOptions,\r\n onUploadError,\r\n onUploadStart,\r\n onUploadPartialComplete,\r\n onUploadComplete,\r\n clearInputFile,\r\n isUploadImageUpscaleEnabled,\r\n logger,\r\n}) => {\r\n const { readFileAsync } = useReadAsset();\r\n const { validateFileAsync } = useValidateAsset();\r\n\r\n const validateAssetAsync = useCallback((obj = {}) => validateFileAsync({\r\n ...obj,\r\n isUploadImageUpscaleEnabled,\r\n }).catch((e) => {\r\n if (e && e.message === 'SizeValidationError' && logger && logger.logTrace) {\r\n logger.logTrace(`Add Media from folder per file - SizeValidationError: ${stringifySync(e)}`);\r\n logger.logTrace(`Add Media from folder per file - SizeValidationError - ImageSource: ${stringifySync(obj.dataURL)}`);\r\n }\r\n throw e;\r\n }), [isUploadImageUpscaleEnabled, logger, validateFileAsync]);\r\n\r\n const onFolderRead = useCallback((event) => {\r\n const { files } = event.target;\r\n const acceptedFiles = filterFilesByExtensions({ files, supportedExtensions });\r\n const customizedFilesOptions = _.map(acceptedFiles, (file) => {\r\n const { nameWithoutExt, ext } = parseFileName(file.name);\r\n\r\n const passedOptions = getCustomizedHandlerOptions({\r\n nameWithoutExt,\r\n ext,\r\n });\r\n\r\n return passedOptions;\r\n });\r\n\r\n if (acceptedFiles.length === 0) {\r\n onUploadError(NO_VALID_FILES_ERROR);\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n if (acceptedFiles.length > assetUploadLimit) {\r\n onUploadError(ASSET_LIMIT_EXCEEDED_ERROR);\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n // should create all folders under selected folder regardless of whether or not\r\n // folder contains valid assets\r\n const foldersToCreate = createFolderHierarchyMap(files);\r\n const uploadFolderInfo = {\r\n totalSize: _.reduce(acceptedFiles, (memo, { size }) => memo + size, 0),\r\n rootFolderName: _.keys(foldersToCreate)[0],\r\n acceptedAssets: acceptedFiles,\r\n };\r\n\r\n const folderCreationErrors = [];\r\n const assetsSkippedCreationDueToFolderError = [];\r\n const assetUploadErrors = [];\r\n\r\n onUploadStart(uploadFolderInfo);\r\n return createFoldersByHierarchy({\r\n folderMap: foldersToCreate,\r\n createFolderAsync,\r\n folderCreationErrors,\r\n currentFolderId,\r\n }).then((creationPromises) => {\r\n const assetCreationPromise = createRateLimitedAssetUploadPromises({\r\n customizedFilesOptions,\r\n acceptedAssets: acceptedFiles,\r\n folderIdPromises: creationPromises,\r\n validateAssetAsync,\r\n uploadAssetAsync,\r\n assetsSkippedUpload: assetsSkippedCreationDueToFolderError,\r\n assetUploadErrors,\r\n readAssetAsync: readFileAsync,\r\n });\r\n return assetCreationPromise\r\n .then(() => {\r\n if (assetUploadErrors.length > 0 || folderCreationErrors.length > 0) {\r\n onUploadPartialComplete({\r\n assetUploadErrors,\r\n folderCreationErrors,\r\n });\r\n } else {\r\n onUploadComplete();\r\n }\r\n })\r\n .catch((e) => {\r\n onUploadError(e);\r\n });\r\n }).finally(() => {\r\n clearInputFile(event);\r\n });\r\n }, [clearInputFile, supportedExtensions, assetUploadLimit, onUploadStart, createFolderAsync, currentFolderId, getCustomizedHandlerOptions, onUploadError, validateAssetAsync, uploadAssetAsync, readFileAsync, onUploadPartialComplete, onUploadComplete]);\r\n\r\n return {\r\n onFolderRead,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { MessageBar, MessageBarActions, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Button, makeStyles, shorthands, } from '@fluentui/react-components';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\nimport { readFileAsDataURLAsync, UploadPreviewWithCustomPreview } from '@bingads-webui-campaign-react/upload-file-picker';\r\nimport { AdsStudioPanelContainer, supportedImageExtensions, supportedVideoExtensions, isRootFolderId, useUploadAsset, useCustomizedHandlerOptions, getFolderUploadError, createFolderPreviewComponent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useUploadFolder, NO_VALID_FILES_ERROR, ASSET_LIMIT_EXCEEDED_ERROR } from './hooks/use-upload-folder';\r\n\r\nconst useStyles = makeStyles({\r\n uploadButton: {\r\n width: '0px',\r\n ...shorthands.overflow('hidden !important'),\r\n },\r\n});\r\n\r\nconst usePreviewStyle = makeStyles({\r\n imageItemBox: {\r\n marginBottom: '16px',\r\n marginRight: '16px',\r\n width: '298px',\r\n ...shorthands.borderRadius('4px'),\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n ...shorthands.overflow('hidden'),\r\n height: '130px',\r\n },\r\n});\r\n\r\nconst useButtonStyles = makeStyles({\r\n bottonWrapper: {\r\n ...shorthands.padding('16px', '24px', '24px'),\r\n },\r\n button: {\r\n minWidth: 'auto',\r\n ...shorthands.padding('6px', '12px'),\r\n marginRight: '6px',\r\n },\r\n linkButton: {\r\n color: '#337ab7',\r\n fontWeight: 'normal',\r\n backgroundColor: 'transparent',\r\n ...shorthands.borderRadius('0px', '0px', '0px', '0px'),\r\n ...shorthands.border('none'),\r\n },\r\n});\r\n\r\nexport const UploadFolderPanel = (props) => {\r\n const {\r\n i18n,\r\n dataService, aid, logger, notificationApi, perfMarker,\r\n navigation, mode, openSystemUpload, globalLegacyI18n,\r\n // disable image upscale feature for upload folder to avoid high QPS\r\n // isUploadImageUpscaleEnabled,\r\n } = props;\r\n const classes = useStyles();\r\n const previewClasses = usePreviewStyle();\r\n const buttonClasses = useButtonStyles();\r\n const [uploadFolderInfo, setUploadFolderInfo] = useState(null);\r\n const [showUploadPreview, setShowUploadPreview] = useState(false);\r\n const [errors, setErrors] = useState([]);\r\n const uploadInput = useRef();\r\n const completedAssetCount = useRef(0);\r\n const isUploadRunning = useRef(false);\r\n const assetCount = useRef(0);\r\n const fileAdditionalInfoArrRef = useRef([]);\r\n const { uploadFileAsync } = useUploadAsset({ dataService, perfMarker, isUploadImageUpscaleEnabled: false });\r\n const { getCustomizedHandlerOptions } = useCustomizedHandlerOptions();\r\n const globalI18n = useMemo(() => globalLegacyI18n.get('$/i18n!legacy/global'), [globalLegacyI18n]);\r\n\r\n const filePickerI18n = useMemo(() => mergeI18n(globalI18n, i18n), [globalI18n, i18n]);\r\n\r\n const {\r\n createFolderBulk,\r\n currentFolderId,\r\n cancelPendingVideoUpload,\r\n reloadFolderPathTreeItem,\r\n } = dataService;\r\n\r\n const dismiss = useCallback(({ reload }) => {\r\n fileAdditionalInfoArrRef.current = [];\r\n setErrors([]);\r\n setShowUploadPreview(false);\r\n setUploadFolderInfo(null);\r\n cancelPendingVideoUpload();\r\n navigation.goBack({ reload });\r\n }, [cancelPendingVideoUpload, navigation]);\r\n\r\n const dismissAndRefreshLibrary = useCallback(() => {\r\n isUploadRunning.current = false;\r\n dismiss({ reload: true });\r\n }, [dismiss]);\r\n\r\n const onRenderFooterContent = useCallback(() => (\r\n
\r\n \r\n
\r\n ), [buttonClasses.bottonWrapper, buttonClasses.button, i18n, dismiss]);\r\n\r\n const onUploadError = useCallback((error) => {\r\n fileAdditionalInfoArrRef.current = [];\r\n isUploadRunning.current = false;\r\n setShowUploadPreview(false);\r\n if (error === NO_VALID_FILES_ERROR) {\r\n setErrors([i18n.getString(_TL_('Your folder doesn\\'t contain supported assets. Please try again.'))]);\r\n } else if (error === ASSET_LIMIT_EXCEEDED_ERROR) {\r\n setErrors([i18n.getString(_TL_('Your folder failed to upload because it exceeds the 100-asset limit. Please try again'))]);\r\n } else {\r\n // no other known errors should cause the whole operation to fail, so just show generic error\r\n setErrors([i18n.getString(_TL_('We\\'ve encountered an error and could not finish this task. Please try again or contact support.'))]);\r\n }\r\n logger.logError('Upload folder failed', { error });\r\n }, [i18n, logger]);\r\n\r\n const uploadAsset = useCallback(({\r\n dataURL,\r\n fileObject,\r\n nameWithoutExt,\r\n folderId,\r\n isVideo,\r\n isImageUpscaled,\r\n }) => uploadFileAsync({\r\n dataURL,\r\n fileObject,\r\n nameWithoutExt,\r\n folderId,\r\n isVideo,\r\n }).then((res) => {\r\n fileAdditionalInfoArrRef.current.push({\r\n isImageUpscaled,\r\n text: nameWithoutExt,\r\n });\r\n setUploadFolderInfo((prevState) => {\r\n if (prevState) {\r\n const rootFolder = prevState[0];\r\n completedAssetCount.current += 1;\r\n const updatedProgress = (completedAssetCount.current + 1) / assetCount.current;\r\n\r\n return [{\r\n ...rootFolder,\r\n progress: updatedProgress,\r\n }];\r\n }\r\n return prevState;\r\n });\r\n return res;\r\n }), [uploadFileAsync]);\r\n\r\n const onUploadStart = useCallback(({\r\n totalSize,\r\n rootFolderName,\r\n acceptedAssets,\r\n }) => {\r\n fileAdditionalInfoArrRef.current = [];\r\n setErrors([]);\r\n setShowUploadPreview(true);\r\n isUploadRunning.current = true;\r\n\r\n const previewImage = acceptedAssets[0];\r\n\r\n assetCount.current = acceptedAssets.length;\r\n\r\n readFileAsDataURLAsync(previewImage).then((imageData) => {\r\n setUploadFolderInfo([{\r\n name: rootFolderName,\r\n url: imageData,\r\n size: totalSize,\r\n progress: 0,\r\n numberOfAssets: assetCount.current,\r\n }]);\r\n });\r\n\r\n logger.logTrace(`Upload folder from local, assets number: ${assetCount.current}`);\r\n }, [logger]);\r\n\r\n const getErrorInfo = useCallback((folderCreationErrors, assetUploadErrors) => getFolderUploadError({\r\n folderCreationErrors,\r\n assetUploadErrors,\r\n i18n,\r\n filePickerI18n,\r\n aid,\r\n logger,\r\n }), [aid, i18n, logger, filePickerI18n]);\r\n\r\n const clearInputFile = useCallback((event) => {\r\n if (event) {\r\n // eslint-disable-next-line no-param-reassign\r\n event.target.value = '';\r\n }\r\n }, []);\r\n\r\n const onUploadPartialComplete = useCallback(({\r\n assetUploadErrors,\r\n folderCreationErrors,\r\n }) => {\r\n const warnMessage = getErrorInfo(folderCreationErrors, assetUploadErrors);\r\n logger.logTrace('Upload folder from local partial successfully');\r\n notificationApi.showWarning(warnMessage);\r\n dismissAndRefreshLibrary();\r\n reloadFolderPathTreeItem([currentFolderId]);\r\n }, [currentFolderId, dismissAndRefreshLibrary, getErrorInfo, logger, notificationApi, reloadFolderPathTreeItem]);\r\n\r\n const onUploadComplete = useCallback(() => {\r\n logger.logTrace('Upload folder from local successfully');\r\n\r\n const upscaledImagesArr = _.filter(fileAdditionalInfoArrRef.current, item => item && item.isImageUpscaled);\r\n const upscaledImagesArrCount = upscaledImagesArr.length;\r\n\r\n if (upscaledImagesArrCount > 0) {\r\n notificationApi.showInfo(i18n.getString(_TL_('Your folder was uploaded and we upscaled {{fileCount}} image(s) to meet the minimum required file size. You can always upload higher quality images if needed.'), { fileCount: upscaledImagesArrCount }));\r\n } else {\r\n notificationApi.showInfo((\r\n \r\n {i18n.getString(_TL_('Your folder was successfully uploaded.'))}\r\n \r\n \r\n ));\r\n }\r\n dismissAndRefreshLibrary();\r\n reloadFolderPathTreeItem([currentFolderId]);\r\n }, [logger, notificationApi, i18n, buttonClasses.linkButton, dismissAndRefreshLibrary, reloadFolderPathTreeItem, currentFolderId]);\r\n\r\n const FolderPreviewComponent = useMemo(() => createFolderPreviewComponent({ i18n }), [i18n]);\r\n const isOpen = useMemo(() => Boolean((showUploadPreview && uploadFolderInfo) || errors.length > 0), [errors.length, showUploadPreview, uploadFolderInfo]);\r\n const supportedFileExtensions = useMemo(() => {\r\n if (mode === 'image') {\r\n return supportedImageExtensions;\r\n } else if (mode === 'video') {\r\n return supportedVideoExtensions;\r\n }\r\n return [\r\n ...supportedImageExtensions,\r\n ...supportedVideoExtensions,\r\n ];\r\n }, [mode]);\r\n\r\n const { onFolderRead } = useUploadFolder({\r\n createFolderAsync: createFolderBulk,\r\n currentFolderId: isRootFolderId(currentFolderId) ? undefined : currentFolderId,\r\n uploadAssetAsync: uploadAsset,\r\n getCustomizedHandlerOptions,\r\n onUploadError,\r\n onUploadStart,\r\n onUploadPartialComplete,\r\n onUploadComplete,\r\n supportedExtensions: supportedFileExtensions,\r\n clearInputFile,\r\n isUploadImageUpscaleEnabled: false,\r\n logger,\r\n });\r\n\r\n useEffect(() => {\r\n if (openSystemUpload) {\r\n uploadInput.current.click();\r\n }\r\n }, [openSystemUpload]);\r\n\r\n return (\r\n <>\r\n \r\n <>\r\n {showUploadPreview && uploadFolderInfo && (\r\n \r\n )}\r\n {\r\n errors.length > 0 &&\r\n errors.map((errMsg, index) => (\r\n \r\n \r\n {errMsg}\r\n \r\n setErrors([])}\r\n aria-label=\"dismiss\"\r\n appearance=\"transparent\"\r\n icon={}\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\nUploadFolderPanel.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadVideoByUrl: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n mode: PropTypes.oneOf(['image', 'video']),\r\n openSystemUpload: PropTypes.shape({}),\r\n};\r\n\r\nUploadFolderPanel.defaultProps = {\r\n mode: null,\r\n openSystemUpload: null,\r\n};\r\n","import React, { useCallback, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TabList, Tab } from '@fluentui/react-components';\r\nimport { useJsData } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { StockImagePanelContent, WebsiteImagePanelContent, InvestImagePanelContent, isValidXandrAccount } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useSourceImages } from './hooks/use-source-images';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\n\r\nexport const MixedImagePanel = (props) => {\r\n const {\r\n i18n,\r\n aid, cid, oDataConfig,\r\n dataService, logger, notificationApi, navigation, open, perfMarker,\r\n permissions,\r\n } = props;\r\n\r\n const isXandrIntEnabled = useMemo(() => permissions.dynamic.XandrIntegrationEnabled, [permissions]);\r\n // eslint-disable-next-line no-restricted-globals\r\n const { data: account } = useJsData(jsData => (isXandrIntEnabled ? jsData.Account.find(aid) : Promise.resolve()), [aid, isXandrIntEnabled]);\r\n const isXandrIntegrationEnabled = useMemo(() => (isXandrIntEnabled ? isValidXandrAccount(account) : false), [account, isXandrIntEnabled]);\r\n\r\n const [selectedTab, setSelectedTab] = useState('stock');\r\n const {\r\n setSelectedImages, onStockClickSelect, onInvestClickSelect, onWebsiteClickSelect, showBlocker, selectedImages,\r\n } = useSourceImages({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n const onClickSelect = useCallback((handleJobErrors) => {\r\n if (selectedTab === 'stock') {\r\n onStockClickSelect(handleJobErrors);\r\n } else if (selectedTab === 'invest') {\r\n onInvestClickSelect(handleJobErrors);\r\n } else {\r\n onWebsiteClickSelect(handleJobErrors);\r\n }\r\n }, [onStockClickSelect, onInvestClickSelect, onWebsiteClickSelect, selectedTab]);\r\n\r\n const onTabSelect = useCallback((event, data) => {\r\n setSelectedImages([]);\r\n setSelectedTab(data.value);\r\n }, [setSelectedImages]);\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(_TL_('Stock images'))}\r\n {i18n.getString(_TL_('Website images'))}\r\n {isXandrIntegrationEnabled && {i18n.getString(_TL_('Microsoft Invest'))}}\r\n \r\n {selectedTab === 'stock' && }\r\n {selectedTab === 'website' && }\r\n {selectedTab === 'invest' && isXandrIntegrationEnabled && }\r\n \r\n );\r\n};\r\n\r\nMixedImagePanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadImage: PropTypes.func,\r\n uploadStockImage: PropTypes.func,\r\n uploadImageByUrl: PropTypes.func,\r\n uploadInvestImage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n XandrIntegrationEnabled: PropTypes.bool,\r\n }),\r\n }),\r\n};\r\n\r\nMixedImagePanel.defaultProps = {\r\n permissions: { dynamic: { XandrIntegrationEnabled: false } },\r\n};\r\n","import { useCallback, useState, useMemo } from 'react';\r\nimport { each } from 'underscore';\r\nimport { MaxAddAssetJobInParell } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { runJobsInParallelWithRateLimit } from '@bingads-webui-universal/parallel-job-with-rate-limit';\r\n\r\nexport const useSourceVideos = ({\r\n dataService, logger, navigation, perfMarker,\r\n}) => {\r\n const [selectedVideos, setSelectedVideos] = useState([]);\r\n const [showBlocker, setShowBlocker] = useState(false);\r\n const validInvestVideos = useMemo(() => (Array.isArray(selectedVideos) ? selectedVideos.filter(({ id }) => !!id) : []), [selectedVideos]);\r\n const validUrlVideos = useMemo(() => (Array.isArray(selectedVideos) ? selectedVideos.filter(({ url }) => !!url) : []), [selectedVideos]);\r\n\r\n const onInvestClickSelect = useCallback((handleJobErrors) => {\r\n const investVideoPerfMarker = perfMarker && perfMarker.createChild('investVideoPicker');\r\n if (investVideoPerfMarker) {\r\n investVideoPerfMarker.willInit();\r\n }\r\n const jobErrors = [];\r\n const handleJobError = (err) => {\r\n jobErrors.push(err);\r\n };\r\n\r\n const saveOperations = [];\r\n\r\n each(validInvestVideos, ({ id, url, description }) => {\r\n saveOperations.push(() => dataService.uploadInvestVideo({ investVideoId: id, videoSrc: url, description }));\r\n });\r\n\r\n setShowBlocker(true);\r\n runJobsInParallelWithRateLimit({\r\n jobsToRateLimit: saveOperations,\r\n maxJobsInParallel: MaxAddAssetJobInParell,\r\n handleJobError,\r\n }).then((values) => {\r\n const videoIds = values || [];\r\n logger.logTrace('Add Media Panel: saved invest videos to folder', { videoIds: videoIds.join(','), count: videoIds.length });\r\n navigation.goBack({ reload: true });\r\n }).finally(() => {\r\n setSelectedVideos([]);\r\n handleJobErrors(jobErrors);\r\n setShowBlocker(false);\r\n if (investVideoPerfMarker) {\r\n investVideoPerfMarker.done();\r\n }\r\n });\r\n }, [dataService, logger, navigation, validInvestVideos]);\r\n\r\n const onUrlClickSelect = useCallback((handleJobErrors) => {\r\n const addVideoUrlPerfMarker = perfMarker && perfMarker.createChild('addVideoUrl');\r\n if (addVideoUrlPerfMarker) {\r\n addVideoUrlPerfMarker.willInit();\r\n }\r\n const jobErrors = [];\r\n const handleJobError = (err) => {\r\n jobErrors.push(err);\r\n };\r\n\r\n const saveOperations = [];\r\n\r\n each(validUrlVideos, ({ url }) => {\r\n saveOperations.push(() => dataService.uploadVideoByUrl({ videoUrl: url }));\r\n });\r\n\r\n setShowBlocker(true);\r\n runJobsInParallelWithRateLimit({\r\n jobsToRateLimit: saveOperations,\r\n maxJobsInParallel: MaxAddAssetJobInParell,\r\n handleJobError,\r\n }).then((values) => {\r\n const videoIds = values || [];\r\n logger.logTrace('Add Media Panel: saved videos to folder', { videoIds: videoIds.join(','), count: videoIds.length });\r\n navigation.goBack({ reload: true });\r\n }).finally(() => {\r\n setSelectedVideos([]);\r\n handleJobErrors(jobErrors);\r\n setShowBlocker(false);\r\n if (addVideoUrlPerfMarker) {\r\n addVideoUrlPerfMarker.done();\r\n }\r\n });\r\n }, [dataService, logger, navigation, validUrlVideos]);\r\n\r\n return {\r\n selectedVideos,\r\n showBlocker,\r\n setSelectedVideos,\r\n onInvestClickSelect,\r\n onUrlClickSelect,\r\n };\r\n};\r\n","import React, { useCallback, useMemo, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { each } from 'underscore';\r\nimport { TabList, Tab } from '@fluentui/react-components';\r\nimport { useJsData } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { AddVideoPanelContent, InvestVideoPanelContent, isValidXandrAccount } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useSourceVideos } from './hooks/use-source-videos';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\nimport { getAddVideoError } from './error/add-video-error';\r\n\r\nexport const MixedVideoPanel = (props) => {\r\n const {\r\n i18n,\r\n aid, cid, oDataConfig,\r\n dataService, logger, notificationApi, navigation, open, perfMarker,\r\n permissions,\r\n } = props;\r\n const [selectedTab, setSelectedTab] = useState('url');\r\n const isMultiSelection = useMemo(() => selectedTab !== 'invest', [selectedTab]);\r\n const isXandrIntEnabled = useMemo(() => permissions.dynamic.XandrIntegrationEnabled, [permissions]);\r\n // eslint-disable-next-line no-restricted-globals\r\n const { data: account } = useJsData(jsData => (isXandrIntEnabled ? jsData.Account.find(aid) : Promise.resolve()), [aid, isXandrIntEnabled]);\r\n const isXandrIntegrationEnabled = useMemo(() => (isXandrIntEnabled ? isValidXandrAccount(account) : false), [account, isXandrIntEnabled]);\r\n\r\n const {\r\n setSelectedVideos, onUrlClickSelect, onInvestClickSelect, showBlocker, selectedVideos,\r\n } = useSourceVideos({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n const handleJobErrors = useCallback((jobErrors) => {\r\n if (jobErrors.length > 0) {\r\n each(jobErrors, (error) => {\r\n const errorMsg = getAddVideoError({\r\n error,\r\n i18n,\r\n aid,\r\n logger,\r\n });\r\n notificationApi.showWarning(errorMsg);\r\n });\r\n }\r\n }, [aid, i18n, logger, notificationApi]);\r\n\r\n const onClickSelect = useCallback(() => {\r\n if (selectedTab === 'invest') {\r\n onInvestClickSelect(handleJobErrors);\r\n } else {\r\n onUrlClickSelect(handleJobErrors);\r\n }\r\n }, [handleJobErrors, onUrlClickSelect, onInvestClickSelect, selectedTab]);\r\n\r\n const onTabSelect = useCallback((event, data) => {\r\n setSelectedVideos([]);\r\n setSelectedTab(data.value);\r\n }, [setSelectedVideos]);\r\n\r\n useEffect(() => {\r\n if (selectedTab === 'invest' && selectedVideos && selectedVideos.length === 1) {\r\n onInvestClickSelect(handleJobErrors);\r\n }\r\n }, [handleJobErrors, selectedVideos, selectedTab]);\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(_TL_('Upload'))}\r\n {isXandrIntegrationEnabled && {i18n.getString(_TL_('Microsoft Invest'))}}\r\n \r\n {selectedTab === 'url' && }\r\n {selectedTab === 'invest' && isXandrIntegrationEnabled && }\r\n \r\n );\r\n};\r\n\r\nMixedVideoPanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadVideoByUrl: PropTypes.func,\r\n uploadInvestVideo: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n XandrIntegrationEnabled: PropTypes.bool,\r\n }),\r\n }),\r\n};\r\n\r\nMixedVideoPanel.defaultProps = {\r\n permissions: { dynamic: { XandrIntegrationEnabled: false } },\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { InvestImagePanelContent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useSourceImages } from './hooks/use-source-images';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\n\r\nexport const InvestImagePanel = (props) => {\r\n const {\r\n i18n,\r\n aid, cid, oDataConfig,\r\n dataService, logger, notificationApi, navigation, open, perfMarker,\r\n } = props;\r\n const {\r\n setSelectedImages, onInvestClickSelect, showBlocker, selectedImages,\r\n } = useSourceImages({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInvestImagePanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({ gotoImagesPage: PropTypes.func }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadImage: PropTypes.func,\r\n uploadStockImage: PropTypes.func,\r\n uploadImageByUrl: PropTypes.func,\r\n uploadInvestImage: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { makeStyles, shorthands } from '@fluentui/react-components';\r\nimport { InvestVideoPanelContent } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useSourceVideos } from './hooks/use-source-videos';\r\nimport { AdsStudioAddAssetPanel } from './add-asset-panel';\r\n\r\nconst useStyles = makeStyles({\r\n helpLink: {\r\n color: '#337ab7',\r\n ...shorthands.textDecoration('underline'),\r\n fontWeight: 'normal',\r\n backgroundColor: 'transparent',\r\n ...shorthands.borderRadius('0px', '0px', '0px', '0px'),\r\n ...shorthands.border('none'),\r\n },\r\n});\r\n\r\nexport const InvestVideoPanel = (props) => {\r\n const {\r\n i18n,\r\n aid, cid, oDataConfig,\r\n dataService, logger, notificationApi, navigation, open, perfMarker,\r\n } = props;\r\n const classes = useStyles();\r\n\r\n const {\r\n setSelectedVideos, onInvestClickSelect, showBlocker, selectedVideos,\r\n } = useSourceVideos({\r\n dataService, logger, navigation, perfMarker,\r\n });\r\n\r\n const dismiss = useCallback(() => {\r\n navigation.goBack();\r\n }, [navigation]);\r\n\r\n useEffect(() => {\r\n if (selectedVideos && selectedVideos.length === 1) {\r\n const handleJobErrors = (jobErrors) => {\r\n if (jobErrors.length > 0) {\r\n const genericError = (\r\n \r\n { i18n.getString(_TL_('One or more assets failed to upload. Please try again')) }\r\n \r\n \r\n );\r\n notificationApi.showWarning(genericError);\r\n }\r\n };\r\n onInvestClickSelect(handleJobErrors);\r\n }\r\n }, [classes.helpLink, i18n, notificationApi, selectedVideos]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInvestVideoPanel.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoVideosPage: PropTypes.func,\r\n goBack: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({\r\n uploadInvestVideo: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport React, { useCallback, useMemo, useContext, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport queryString from 'query-string';\r\nimport {\r\n AdsStudioBreadcrumb,\r\n SearchResultFilterBar,\r\n FilterContext,\r\n FolderAssetType,\r\n AdsStudioSpinner,\r\n ManualAddedImageSource,\r\n useAdsStudioServices,\r\n HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { ImageGridView } from '../images-page-component/components';\r\nimport { useSearchResultViewStyle } from '../styles';\r\n\r\nconst ROOT_KEY = 'home-root';\r\nconst SEARCH_KEY = 'default-search-query';\r\n\r\nexport const SearchResultView = ({\r\n i18n,\r\n search,\r\n navigation,\r\n logger,\r\n dataService,\r\n notificationApi,\r\n reload,\r\n pagePerfMarker: searchPagePerfMarker,\r\n setDataLoaded,\r\n}) => {\r\n const classes = useSearchResultViewStyle();\r\n\r\n const {\r\n assets,\r\n loadData,\r\n } = dataService;\r\n\r\n const cropDataService = useAdsStudioServices();\r\n\r\n const [isPageInited, setPageInited] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n const [announcedText, setAnnouncedText] = useState('');\r\n\r\n const queries = queryString.parse(search);\r\n const { query: defaultSearchQuery = '' } = queries || {};\r\n const [cachedSearchText, setCachedSearchText] = useState(defaultSearchQuery);\r\n\r\n const { filterBar } = useContext(FilterContext);\r\n\r\n const {\r\n searchText = '',\r\n } = useMemo(() => filterBar.getFilters(), [filterBar]);\r\n\r\n const breadcrumbItems = useMemo(() => {\r\n const result = [{\r\n key: ROOT_KEY,\r\n text: i18n.getString(_TL_('Home')),\r\n }, {\r\n key: SEARCH_KEY,\r\n text: cachedSearchText,\r\n }];\r\n\r\n return result;\r\n }, [cachedSearchText, i18n]);\r\n\r\n const onBreadcrumbItemClick = useCallback((item) => {\r\n if (item && item.key === ROOT_KEY) {\r\n navigation.gotoHomePage();\r\n }\r\n }, [navigation]);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load images. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const newAssets = useMemo(() => (_.map(assets, (item) => {\r\n const { folderAssetType } = item || {};\r\n if (folderAssetType) {\r\n return {\r\n ...item,\r\n manualAddedImageSourceType: ManualAddedImageSource.Library,\r\n };\r\n }\r\n return {\r\n folderAssetType: FolderAssetType.Image,\r\n manualAddedImageSourceType: ManualAddedImageSource.ShutterStock,\r\n id: item.Id,\r\n url: item.Preview && item.Preview.Url,\r\n };\r\n })), [assets]);\r\n\r\n // init page\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n setPageInited(true);\r\n }\r\n }, [isPageInited]);\r\n\r\n usePageActiveTimeTracker(logger, 'Search result');\r\n\r\n useEffect(() => {\r\n setClarityTag({ LoadAdsStudioSearchResultPage: true });\r\n }, []);\r\n\r\n // load data for initial page load\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n\r\n if (reload) { // Important! Add a trivial log so that reload will be an explicit dep.\r\n logger.logTrace('force to reload');\r\n }\r\n\r\n if (_.isEmpty(searchText.trim())) {\r\n // Don't reload when search text is empty\r\n return;\r\n }\r\n\r\n setCachedSearchText(searchText);\r\n\r\n searchPagePerfMarker.willFetchData();\r\n setLoadingData(true);\r\n loadData({\r\n assetTypeFilter: FolderAssetType.Image,\r\n isGlobalSearch: true,\r\n searchText,\r\n perfMarker: searchPagePerfMarker.createChild('searchResultPageLoadData'),\r\n })\r\n .catch(() => {\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n searchPagePerfMarker.willRender();\r\n setDataLoaded();\r\n });\r\n }, [isPageInited, loadData, onFailedToLoadData, searchText, logger, reload]);\r\n\r\n const isPageLoading = !isPageInited || loadingData;\r\n\r\n useEffect(() => {\r\n if (!isPageLoading && assets && assets.length > 0) {\r\n const count = assets && assets.length;\r\n setAnnouncedText(i18n.getString(_TL_('{{Count}} results found.'), { Count: count }));\r\n } else {\r\n setAnnouncedText('');\r\n }\r\n }, [assets, i18n, isPageLoading]);\r\n\r\n return (\r\n
\r\n {isPageLoading && (\r\n \r\n \r\n \r\n )}\r\n
\r\n \r\n
\r\n
\r\n {i18n.getString(_TL_('Images'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('Images that match your search for “'))}\r\n {cachedSearchText}\r\n {i18n.getString(_TL_('”'))}\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nSearchResultView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n search: PropTypes.string.isRequired,\r\n navigation: PropTypes.shape({}).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}),\r\n notificationApi: PropTypes.shape({}),\r\n reload: PropTypes.shape({}),\r\n};\r\n\r\nSearchResultView.defaultProps = {\r\n dataService: {},\r\n notificationApi: {},\r\n reload: null,\r\n};\r\n","\r\nimport { useState, useMemo, useCallback, useEffect } from 'react';\r\nimport _ from 'underscore';\r\n\r\nimport {\r\n CSMLAdType,\r\n CSMLAssetSource,\r\n getPreviewText,\r\n getSizeErrorRatioList,\r\n getAllSizeErrorRatioList,\r\n getPlacementsToExpand,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ImageExperienceImage } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport {\r\n useAdPreviewModel,\r\n UAPPlacementTypeAlias,\r\n getCropSettingsFromRoi,\r\n} from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport GenericImage from '../media/1.91to1.jpg';\r\n\r\nconst getPlacementSetConfig = (image, getSmartCroppings, isAudienceAdSmartCropEnabled, isMMAV2Enabled, isPMaxAspectRatiosV2Enabled, isAdPreviewRefreshEnabled, getExpandedCroppingsFunc = undefined) => ([\r\n {\r\n image,\r\n placementSets: [\r\n {\r\n placementSetName: CSMLAdType.PMax,\r\n // eslint-disable-next-line no-nested-ternary\r\n placementTypes: isPMaxAspectRatiosV2Enabled ? (isAdPreviewRefreshEnabled ? UAPPlacementTypeAlias.PMaxV2.AllV2 : UAPPlacementTypeAlias.PMaxV2.All) : UAPPlacementTypeAlias.PMax.All,\r\n getDefaultPlacementsCropping: getSmartCroppings,\r\n },\r\n {\r\n placementSetName: CSMLAdType.MMA,\r\n placementTypes: UAPPlacementTypeAlias.MMA.All,\r\n getDefaultPlacementsCropping: getSmartCroppings,\r\n },\r\n {\r\n placementSetName: CSMLAdType.Audience,\r\n placementTypes: isMMAV2Enabled ? UAPPlacementTypeAlias.MSANV2.All : UAPPlacementTypeAlias.MSAN.All,\r\n // eslint-disable-next-line no-nested-ternary\r\n getDefaultPlacementsCropping: getExpandedCroppingsFunc ? getExpandedCroppingsFunc(CSMLAdType.Audience) : (isAudienceAdSmartCropEnabled ? getSmartCroppings : undefined),\r\n },\r\n {\r\n placementSetName: CSMLAdType.ImageExtension,\r\n placementTypes: isAdPreviewRefreshEnabled ? UAPPlacementTypeAlias.ImageExt.AllV2 : UAPPlacementTypeAlias.ImageExt.All,\r\n getDefaultPlacementsCropping: isAudienceAdSmartCropEnabled ? getSmartCroppings : undefined,\r\n },\r\n ],\r\n }, {\r\n image: GenericImage,\r\n placementSets: [\r\n {\r\n placementSetName: CSMLAdType.ImageExtension,\r\n placementTypes: [\r\n UAPPlacementTypeAlias.ImageExt.BingDesktopMultiImage,\r\n UAPPlacementTypeAlias.ImageExt.BingMobileMultiImage,\r\n ],\r\n },\r\n ],\r\n }]);\r\n\r\nexport const useAdPlacement = ({\r\n image,\r\n permissions,\r\n setDataLoaded,\r\n logger,\r\n i18n,\r\n getSmartCroppings,\r\n setLoadingStatus,\r\n imageCroppingTasks,\r\n isImageFittingEnabled,\r\n dataService,\r\n}) => {\r\n const isAudienceAdSmartCropEnabled = permissions && permissions.dynamic.AudienceAdSmartCrop;\r\n const [adType, setAdType] = useState(CSMLAdType.PMax);\r\n const [errorTip, setErrorTip] = useState('');\r\n const [showRequiredOnly, setShowRequiredOnly] = useState(false);\r\n const [currentImage, setCurrentImage] = useState(null);\r\n\r\n const [editingPlacementInfo, setEditingPlacementInfo] = useState(null);\r\n\r\n // useClarityTags([ClarityTags.LaunchedAssetLibrary, ClarityTags.LaunchedEditImage]);\r\n\r\n // click on a placement's edit aspect ratio button\r\n const onEditPlacement = useCallback((placementInfo) => {\r\n setEditingPlacementInfo(placementInfo);\r\n logger.logTrace('Edit Page: onEditPlacement', { imageId: currentImage.id });\r\n }, [currentImage, logger]);\r\n\r\n const onAdPreviewError = useCallback((err) => {\r\n logger.logError(`Edit Page: ad preview error, ${JSON.stringify(err)}`);\r\n }, [logger]);\r\n\r\n const {\r\n firstImage,\r\n setPlacementConfig,\r\n multiImagePlacementSets: placementSets,\r\n updatePlacementCropping,\r\n updatePlacementCroppingByImageType,\r\n hasDataChanged: hasCropSettingsChanged,\r\n changedCropSettings,\r\n } = useAdPreviewModel(null, onAdPreviewError);\r\n const { imageMeta: imageInfo, imageCropping: cropSettings } = firstImage || {};\r\n\r\n const placementList = useMemo(() => {\r\n const { placementList: pl } = _.find(placementSets, ({ placementSetName }) => placementSetName === adType) || {};\r\n return pl;\r\n }, [adType, placementSets]);\r\n\r\n const previewTexts = useMemo(\r\n () => getPreviewText(adType === CSMLAdType.ImageExtension, i18n),\r\n [adType, i18n]\r\n );\r\n\r\n usePageActiveTimeTracker(logger, 'Edit image');\r\n\r\n useEffect(() => {\r\n if (image && image.url) {\r\n if (setDataLoaded) {\r\n setDataLoaded();\r\n }\r\n setLoadingStatus(true);\r\n setCurrentImage(prev => (prev && prev.url === image.url ? prev : image));\r\n logger.logTrace('Edit Page: page loaded', { imageId: image.id });\r\n }\r\n }, [image, logger, setLoadingStatus]);\r\n\r\n const isMMAV2Enabled = useMemo(() => permissions && permissions.IsMMAV2Enabled && !(permissions.IsAmplifyEnabled && permissions.dynamic.DisplayPlusAmplify), [permissions]);\r\n const isPMaxAspectRatiosV2Enabled = useMemo(() => permissions && permissions.dynamic.PMaxNewAspectRatios && !permissions.dynamic.PMaxExcludeNewAspectRatios, [permissions]);\r\n const isAdPreviewRefreshEnabled = useMemo(() => _.get(permissions, ['dynamic', 'AdPreviewRefresh']), [permissions]);\r\n\r\n const { imageFit } = dataService;\r\n\r\n const getExpandedCroppingsInner = useCallback(adTypeInner => (argObj) => {\r\n const { imageMeta } = argObj;\r\n // we should call fitting if\r\n // 1. the image is applied filter/blur/background change, and not saved to library yet\r\n // 2. the image is stock image from search result page which is not saved to library yet\r\n setLoadingStatus(true);\r\n const placementsToExpand = getPlacementsToExpand(adTypeInner);\r\n return imageFit({\r\n imageUrl: currentImage.url,\r\n placements: placementsToExpand,\r\n skipOutpainting: currentImage.sourceType === CSMLAssetSource.Shutterstock,\r\n }).then(res => getCropSettingsFromRoi({\r\n ...argObj,\r\n imageMeta: {\r\n ...imageMeta,\r\n expandedMeta: res,\r\n },\r\n })).catch(() => {\r\n }).finally(() => {\r\n setLoadingStatus(false);\r\n });\r\n }, [currentImage, imageFit, setLoadingStatus]);\r\n useEffect(() => {\r\n let getExpandedCroppingsFunc;\r\n if (isImageFittingEnabled && currentImage && currentImage.roiInfo && currentImage.id) {\r\n getExpandedCroppingsFunc = () => getCropSettingsFromRoi;\r\n }\r\n if (isImageFittingEnabled && currentImage && !currentImage.id && !currentImage.roiInfo) {\r\n getExpandedCroppingsFunc = getExpandedCroppingsInner;\r\n }\r\n\r\n if (currentImage && currentImage.originalUrl) {\r\n const placementSetConfig = getPlacementSetConfig(currentImage, getSmartCroppings, isAudienceAdSmartCropEnabled, isMMAV2Enabled, isPMaxAspectRatiosV2Enabled, isAdPreviewRefreshEnabled, getExpandedCroppingsFunc);\r\n setPlacementConfig(placementSetConfig);\r\n } else if (currentImage && currentImage.url) {\r\n const clonedImage = { ...currentImage, originalUrl: currentImage.url };\r\n const placementSetConfig = getPlacementSetConfig(clonedImage, getSmartCroppings, isAudienceAdSmartCropEnabled, isMMAV2Enabled, isPMaxAspectRatiosV2Enabled, isAdPreviewRefreshEnabled, getExpandedCroppingsFunc);\r\n setPlacementConfig(placementSetConfig);\r\n }\r\n }, [setPlacementConfig, isAudienceAdSmartCropEnabled, currentImage, getSmartCroppings, isMMAV2Enabled, isImageFittingEnabled, getExpandedCroppingsInner, isPMaxAspectRatiosV2Enabled, isAdPreviewRefreshEnabled]);\r\n\r\n useEffect(() => {\r\n if (placementList && placementList.length) {\r\n setLoadingStatus(false);\r\n }\r\n }, [setLoadingStatus, placementList]);\r\n\r\n const maxCropBox = useMemo(() => (imageInfo ? {\r\n SourceX: 0,\r\n SourceY: 0,\r\n SourceWidth: imageInfo.originalWidth,\r\n SourceHeight: imageInfo.originalHeight,\r\n } : null), [imageInfo]);\r\n\r\n const handleInvalidCropSetting = useCallback((invalidRatioList) => {\r\n let errorInfo = '';\r\n if (invalidRatioList.length === 1) {\r\n errorInfo = i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for the following ad placement: {{ratio}} {{placement}}'),\r\n {\r\n ratio: `${invalidRatioList[0].aspectRatioAsRatio}`,\r\n placement: `${i18n.getString(invalidRatioList[0].previewTypeString)}`,\r\n }\r\n );\r\n } else if (invalidRatioList.length === 2) {\r\n errorInfo = i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for the following ad placements: {{ratio1}} {{placement1}} and {{ratio2}} {{placement2}}'),\r\n {\r\n ratio1: `${invalidRatioList[0].aspectRatioAsRatio}`,\r\n ratio2: `${invalidRatioList[1].aspectRatioAsRatio}`,\r\n placement1: `${i18n.getString(invalidRatioList[0].previewTypeString)}`,\r\n placement2: `${i18n.getString(invalidRatioList[1].previewTypeString)}`,\r\n }\r\n );\r\n }\r\n\r\n setErrorTip(errorInfo);\r\n }, [i18n]);\r\n\r\n useEffect(() => {\r\n const invalidRatioList = getSizeErrorRatioList(\r\n adType,\r\n cropSettings || maxCropBox,\r\n true,\r\n isMMAV2Enabled,\r\n isPMaxAspectRatiosV2Enabled\r\n );\r\n handleInvalidCropSetting(invalidRatioList);\r\n }, [adType, cropSettings, handleInvalidCropSetting, isMMAV2Enabled, isPMaxAspectRatiosV2Enabled, maxCropBox]);\r\n\r\n const saveCropPlacement = useCallback((placement, newCropping) => {\r\n const { placementMeta } = placement || {};\r\n const { placementType, imageType } = placementMeta || {};\r\n if (adType === CSMLAdType.ImageExtension || adType === CSMLAdType.PMax) {\r\n // for image extension placements, all placements with same image type should be updated together\r\n updatePlacementCroppingByImageType({ placementSetName: adType, imageType, newPlacementCropping: newCropping });\r\n } else {\r\n updatePlacementCropping({ placementSetName: adType, placementType, newPlacementCropping: newCropping });\r\n }\r\n setEditingPlacementInfo(null);\r\n logger.logTrace('Edit page: save crop placement', {\r\n imageId: currentImage.id,\r\n adType,\r\n placementType: imageType,\r\n cropSettings: JSON.stringify(newCropping),\r\n });\r\n }, [adType, currentImage, logger, updatePlacementCropping, updatePlacementCroppingByImageType]);\r\n\r\n const cancelCropPlacement = useCallback(() => {\r\n setEditingPlacementInfo(null);\r\n logger.logTrace('Edit page: cancel edit placement', { imageId: currentImage.id });\r\n }, [currentImage, logger]);\r\n\r\n const switchAdType = useCallback((type) => {\r\n logger.logTrace('Edit Page: switchAdType', { imageId: currentImage.id, adType: type });\r\n setAdType(type);\r\n }, [currentImage, logger]);\r\n\r\n const switchShowRequiredOnly = useCallback((checked) => {\r\n setShowRequiredOnly(checked);\r\n logger.logTrace('Edit page: show required only', { imageId: currentImage.id, showRequiredOnly: checked });\r\n }, [currentImage, logger]);\r\n\r\n const updateImage = useCallback((newImage) => {\r\n if (!_.isEqual(newImage, currentImage)) {\r\n setCurrentImage(newImage);\r\n }\r\n }, [currentImage]);\r\n\r\n const previewImage = useMemo(() => (imageInfo ?\r\n new ImageExperienceImage({\r\n src: imageInfo.originalUrl,\r\n width: imageInfo.originalWidth,\r\n height: imageInfo.originalHeight,\r\n })\r\n : null), [imageInfo]);\r\n\r\n const hasCroppingTask = useMemo(() => {\r\n if (currentImage && currentImage.id) {\r\n const onGoingTask = imageCroppingTasks && imageCroppingTasks[currentImage.id];\r\n\r\n return !!onGoingTask;\r\n }\r\n return false;\r\n }, [currentImage, imageCroppingTasks]);\r\n\r\n const cropSettingsToUpdate = useMemo(() => _.first(changedCropSettings), [changedCropSettings]);\r\n\r\n const allSizeInvalidRatioList = useMemo(() => getAllSizeErrorRatioList(cropSettings || maxCropBox, false, isMMAV2Enabled), [cropSettings, isMMAV2Enabled, maxCropBox]);\r\n\r\n const requiredSizeInvalidRatioList = useMemo(() => getAllSizeErrorRatioList(cropSettings || maxCropBox, true, isMMAV2Enabled), [cropSettings, isMMAV2Enabled, maxCropBox]);\r\n\r\n const allViewErrorTip = useMemo(() => {\r\n let errorInfo = '';\r\n if (requiredSizeInvalidRatioList.length === 1) {\r\n errorInfo = i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for {{ratio}} {{placement}} ads.'),\r\n {\r\n ratio: requiredSizeInvalidRatioList[0].aspectRatioAsRatio,\r\n placement: i18n.getString(requiredSizeInvalidRatioList[0].previewTypeString),\r\n }\r\n );\r\n } else if (requiredSizeInvalidRatioList.length === 2) {\r\n errorInfo = i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for {{ratio1}} {{previewName1}} and {{ratio2}} {{previewName2}} ads.'),\r\n {\r\n ratio1: requiredSizeInvalidRatioList[0].aspectRatioAsRatio,\r\n ratio2: requiredSizeInvalidRatioList[1].aspectRatioAsRatio,\r\n previewName1: i18n.getString(requiredSizeInvalidRatioList[0].previewTypeString),\r\n previewName2: i18n.getString(requiredSizeInvalidRatioList[1].previewTypeString),\r\n }\r\n );\r\n }\r\n\r\n return errorInfo;\r\n }, [i18n, requiredSizeInvalidRatioList]);\r\n\r\n return {\r\n adType,\r\n currentViewErrorTip: errorTip,\r\n allViewErrorTip,\r\n showRequiredOnly,\r\n editingPlacementInfo,\r\n placementList,\r\n firstImage,\r\n previewTexts,\r\n maxCropBox,\r\n previewImage,\r\n hasCroppingTask,\r\n cropSettingsToUpdate,\r\n hasCropSettingsChanged,\r\n onEditPlacement,\r\n saveCropPlacement,\r\n cancelCropPlacement,\r\n switchAdType,\r\n switchShowRequiredOnly,\r\n updateImage,\r\n allSizeInvalidRatioList,\r\n requiredSizeInvalidRatioList,\r\n };\r\n};\r\n","import { useCallback, useState, useEffect, useMemo } from 'react';\r\nimport { Promise } from 'bluebird';\r\nimport { createColorBackground, fetchImgPromise, parseMaskResultPromise } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useMaskedImage } from './use-masked-image';\r\n\r\nexport const useBackgroundChange = ({\r\n dataService,\r\n perfMarker,\r\n logger,\r\n}) => {\r\n const [fetchSegmentationError, setFetchSegmentationError] = useState('');\r\n const [isFetchingSegmentations, setIsFetchingSegmentations] = useState(false);\r\n\r\n const {\r\n getImageSegmentations,\r\n generateImageBackground,\r\n } = dataService;\r\n\r\n const {\r\n alphaArray,\r\n imageUrlWithoutBackground,\r\n setImageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n imageUrlWithColoredBackground,\r\n setImageUrlWithColoredBackground,\r\n segmentationMasks,\r\n setSegmentationMasks,\r\n getMaskValueAtPoint,\r\n selectedMasks,\r\n setSelectedMasks,\r\n selectedImageSrc,\r\n setSelectedImageSrc,\r\n maskSetsBase64,\r\n setMaskSetsBase64,\r\n resetStates,\r\n maskValues,\r\n } = useMaskedImage();\r\n\r\n const drawColorBackground = useCallback((color, imageWidth, imageHeight) => {\r\n if ((selectedImageSrc || imageUrlWithoutBackground) && segmentationMasks) {\r\n return fetchImgPromise(selectedImageSrc || imageUrlWithoutBackground).then((image) => {\r\n const coloredBackground = createColorBackground(image, imageWidth, imageHeight, color, segmentationMasks, selectedMasks, alphaArray);\r\n setImageUrlWithColoredBackground(coloredBackground);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }, [selectedImageSrc, imageUrlWithoutBackground, segmentationMasks, selectedMasks, alphaArray, setImageUrlWithColoredBackground]);\r\n\r\n const getSegmentations = useCallback(({\r\n imageUrl, imageWidth, imageHeight,\r\n }) => {\r\n const imageSegmentationPerfMarker = perfMarker.createChild('ImageSegmentations');\r\n imageSegmentationPerfMarker.willInit();\r\n setIsFetchingSegmentations(true);\r\n resetStates();\r\n const ret = getImageSegmentations(imageUrl).then(result => (\r\n parseMaskResultPromise({\r\n result,\r\n imageUrl,\r\n imageWidth,\r\n imageHeight,\r\n })\r\n )).then((parsedResult) => {\r\n const {\r\n rawMaskSetsBase64String: rawMaskSetsBase64,\r\n maskSetsArray,\r\n selectedMasksArray,\r\n alphaArray: newAlphaArray,\r\n imageUrlWithoutBackground: selfDrawnImageUrl,\r\n } = parsedResult || {};\r\n setImageUrlWithoutBackground(selfDrawnImageUrl);\r\n setSegmentationMasks({ maskSetsArray, selectedMasksArray, newAlphaArray });\r\n setMaskSetsBase64(rawMaskSetsBase64);\r\n logger.logTrace('Copilot change image background - get image segmentations successfully', { originalUrl: imageUrl });\r\n }).catch((err) => {\r\n setFetchSegmentationError(err.uxMessage);\r\n })\r\n .finally(() => {\r\n setIsFetchingSegmentations(false);\r\n imageSegmentationPerfMarker.done();\r\n });\r\n return ret;\r\n }, [resetStates, perfMarker,\r\n getImageSegmentations, setImageUrlWithoutBackground, setSegmentationMasks, setMaskSetsBase64, logger]);\r\n\r\n const generateBackground = useCallback(({\r\n prompt, imageUrl, imageWidth, imageHeight,\r\n }) => {\r\n const backgroundGenerationPerfMarker = perfMarker.createChild('ImageBackgroundGeneration');\r\n backgroundGenerationPerfMarker.willInit();\r\n const ret = generateImageBackground({\r\n prompt,\r\n imageUrl,\r\n selectedMasks,\r\n maskSetsBase64,\r\n outputImageWidth: imageWidth,\r\n outputImageHeight: imageHeight,\r\n }).then((res) => {\r\n const { imageUrl: newImageUrl } = res || {};\r\n logger.logTrace('Copilot change image background - generate image background successfully', { generatedUrl: newImageUrl, prompt });\r\n setImageUrlWithGeneratedBackground(newImageUrl);\r\n return newImageUrl;\r\n }).finally(() => {\r\n backgroundGenerationPerfMarker.done();\r\n });\r\n return ret;\r\n }, [selectedMasks, perfMarker,\r\n generateImageBackground, maskSetsBase64, logger, setImageUrlWithGeneratedBackground]);\r\n\r\n useEffect(() => {\r\n logger.logTrace('Copilot change image background - user entered the page');\r\n }, [logger]);\r\n\r\n const resultImage = useMemo(() => (imageUrlWithGeneratedBackground && {\r\n url: imageUrlWithGeneratedBackground,\r\n }), [imageUrlWithGeneratedBackground]);\r\n\r\n return {\r\n // APIs\r\n getSegmentations,\r\n isFetchingSegmentations,\r\n generateBackground,\r\n drawColorBackground,\r\n\r\n // image states\r\n imageUrlWithoutBackground, // the image url without background\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n imageUrlWithColoredBackground,\r\n resultImage,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc, // the image after user selected objects\r\n selectedMasks,\r\n setSelectedMasks,\r\n maskValues,\r\n fetchSegmentationError,\r\n };\r\n};\r\n","import { useCallback, useState, useMemo } from 'react';\r\nimport { getMaskValueAtPointFunc } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const useMaskedImage = () => {\r\n const [imageUrlWithoutBackground, setImageUrlWithoutBackground] = useState(null);\r\n const [imageUrlWithGeneratedBackground, setImageUrlWithGeneratedBackground] = useState(null);\r\n const [imageUrlWithColoredBackground, setImageUrlWithColoredBackground] = useState(null);\r\n const [segmentationMasks, setSegmentationMaskInternal] = useState(null);\r\n const [selectedMasks, setSelectedMasks] = useState([]);\r\n const [selectedImageSrc, setSelectedImageSrc] = useState(null);\r\n const [maskSetsBase64, setMaskSetsBase64] = useState(null);\r\n const [alphaArray, setAlphaArray] = useState([]);\r\n\r\n // mask is encoded in base64 format, decode it here\r\n const setSegmentationMasks = useCallback(({ maskSetsArray, selectedMasksArray, newAlphaArray }) => {\r\n setSegmentationMaskInternal(maskSetsArray);\r\n setSelectedMasks(selectedMasksArray);\r\n setAlphaArray(newAlphaArray);\r\n }, []);\r\n\r\n const resetStates = useCallback(() => {\r\n setImageUrlWithoutBackground(null);\r\n setSegmentationMaskInternal(null);\r\n setSelectedMasks([]);\r\n setSelectedImageSrc(null);\r\n setMaskSetsBase64(null);\r\n }, []);\r\n\r\n const maskValues = useMemo(() => Array.from(new Set(segmentationMasks)).filter(x => x > 0), [segmentationMasks]);\r\n\r\n const getMaskValueAtPoint = useCallback((x, y, originalImageWidth) =>\r\n getMaskValueAtPointFunc(x, y, originalImageWidth, segmentationMasks), [segmentationMasks]);\r\n\r\n return {\r\n imageUrlWithoutBackground,\r\n setImageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n imageUrlWithColoredBackground,\r\n setImageUrlWithColoredBackground,\r\n\r\n // mask\r\n alphaArray,\r\n segmentationMasks,\r\n setSegmentationMasks,\r\n getMaskValueAtPoint,\r\n selectedMasks,\r\n setSelectedMasks,\r\n selectedImageSrc,\r\n setSelectedImageSrc,\r\n maskSetsBase64,\r\n maskValues,\r\n setMaskSetsBase64,\r\n resetStates,\r\n };\r\n};\r\n","import { buildImageAssetMetadataToSave, extractInfoForDeserialization } from '@bingads-webui-campaign/media-metadata-model';\r\nimport _ from 'underscore';\r\n\r\nexport const ViewName = {\r\n PlacementListView: 'placementListView',\r\n PlacementEditView: 'placementEditView',\r\n ImageAdjustView: 'imageAdjustView',\r\n BackgroundChangeView: 'backgroundChangeView',\r\n};\r\n\r\nexport const convertMetaData = (resultFilterAndBlurImage) => {\r\n const combinedEffect = [];\r\n if (resultFilterAndBlurImage.filter) {\r\n const filterEffect = buildImageAssetMetadataToSave({\r\n effectSettings: {\r\n effectKey: 'DesignerEffects',\r\n effectOptions: {\r\n designerEffect: resultFilterAndBlurImage.filter,\r\n },\r\n },\r\n });\r\n combinedEffect.push(filterEffect);\r\n }\r\n if (resultFilterAndBlurImage.blur) {\r\n const blurEffect = buildImageAssetMetadataToSave({\r\n effectSettings: {\r\n effectKey: 'BackgroundBlur',\r\n effectOptions: {\r\n backgroundBlur: resultFilterAndBlurImage.blur,\r\n },\r\n },\r\n });\r\n combinedEffect.push(blurEffect);\r\n }\r\n if (combinedEffect.length > 0) {\r\n return {\r\n effect: combinedEffect[0].effect,\r\n combinedEffect,\r\n };\r\n }\r\n return null;\r\n};\r\n\r\nconst revertMetaDataInner = (metaData) => {\r\n const combinedEffectArray = _.isArray(metaData.combinedEffect) ? metaData.combinedEffect : _.keys(metaData.combinedEffect).map(key => metaData.combinedEffect[key]);\r\n if (combinedEffectArray.length > 0) {\r\n const filterEffect = combinedEffectArray.find(effect => effect.effect.key === 'DesignerEffects');\r\n const blurEffect = combinedEffectArray.find(effect => effect.effect.key === 'BackgroundBlur');\r\n return {\r\n filter: filterEffect ? extractInfoForDeserialization({ obj: filterEffect }) : null,\r\n blur: blurEffect ? extractInfoForDeserialization({ obj: blurEffect }) : null,\r\n };\r\n } else if (metaData.effect) {\r\n if (metaData.effect.key === 'DesignerEffects') {\r\n return {\r\n filter: extractInfoForDeserialization({ obj: metaData }),\r\n blur: null,\r\n };\r\n } else if (metaData.effect.key === 'BackgroundBlur') {\r\n return {\r\n filter: null,\r\n blur: extractInfoForDeserialization({ obj: metaData }),\r\n };\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const revertMetaData = (metaData) => {\r\n const { filter, blur } = revertMetaDataInner(metaData);\r\n const filterValue = filter ? filter.effectSettings.effectOptions.designerEffect : null;\r\n const blurValue = blur ? blur.effectSettings.effectOptions.backgroundBlur : null;\r\n return {\r\n filter: filterValue,\r\n blur: blurValue,\r\n };\r\n};\r\n","/* eslint-disable arrow-body-style */\r\nimport _ from 'underscore';\r\nimport { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Promise } from 'bluebird';\r\n\r\nimport { CSMLAssetSource, ROOT_FOLDER_ID, useAdsStudioServices, fetchImgPromise } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { DataContext } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\n\r\nimport { useFilterAndBlur } from './use-filter-and-blur';\r\nimport { useAdPlacement } from './use-ad-placement';\r\nimport { useBackgroundChange } from './background-change/use-background-change';\r\nimport { ViewName, convertMetaData, revertMetaData } from './utils';\r\n\r\nexport const useEditImageState = ({\r\n imageId,\r\n dataService,\r\n editImageUrl,\r\n perfMarker,\r\n setDataLoaded,\r\n permissions,\r\n logger,\r\n i18n,\r\n getSmartCroppings,\r\n navigation,\r\n initialCurrentView,\r\n folderId,\r\n getAssetEnhancementSettings,\r\n}) => {\r\n const [currentView, setCurrentView] = useState(ViewName.PlacementListView);\r\n const [originalImage, setOriginalImage] = useState({});\r\n const [loadingStatus, setLoadingStatus] = useState(true);\r\n const [initialAssetLoading, setInitialAssetLoading] = useState(false);\r\n const [backgroundChangedResult, setBackgroundChangedResult] = useState(null);\r\n const [savedBackgroundColorChangedImage, setSavedBackgroundColorChangedImage] = useState([]);\r\n const [filterBlurBaseImage, setFilterBlurBaseImage] = useState(null);\r\n const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);\r\n const [assetsAIEnhancementEnabled, setAssetsAIEnhancementEnabled] = useState(false);\r\n const serverContext = useContext(ServerContext);\r\n const { setData } = useContext(DataContext);\r\n const cropDataService = useAdsStudioServices();\r\n\r\n const { cropImage, imageCroppingTasks } = cropDataService;\r\n\r\n const isImageFittingEnabled = useMemo(() => _.result(permissions, ['dynamic', 'ImageFittingMVP'], false) && !_.result(permissions, ['dynamic', 'ImageFittingExlcudeMAE'], true)\r\n && _.result(permissions, ['dynamic', 'ImageFittingUnifiedImageROI'], false), [permissions]);\r\n const isBrandKitEnabled = useMemo(() => _.result(permissions, ['dynamic', 'BrandKitUI'], false), [permissions]);\r\n\r\n const finalImageFittingEnabled = useMemo(() => isImageFittingEnabled && assetsAIEnhancementEnabled, [isImageFittingEnabled, assetsAIEnhancementEnabled]);\r\n\r\n useEffect(() => {\r\n if (initialCurrentView) {\r\n setCurrentView(initialCurrentView);\r\n }\r\n }, [initialCurrentView]);\r\n\r\n useEffect(() => {\r\n // We need the image url, image width and height for the background removal\r\n if (editImageUrl) {\r\n setLoadingStatus(true);\r\n fetchImgPromise(editImageUrl).then((image) => {\r\n setOriginalImage({\r\n url: editImageUrl,\r\n width: image.naturalWidth,\r\n height: image.naturalHeight,\r\n originalWidth: image.naturalWidth,\r\n originalHeight: image.naturalHeight,\r\n sourceType: CSMLAssetSource.Shutterstock,\r\n });\r\n setLoadingStatus(false);\r\n });\r\n } else if (!originalImage.url) {\r\n setLoadingStatus(true);\r\n setInitialAssetLoading(true);\r\n perfMarker.willFetchData();\r\n getAssetEnhancementSettings().then((settings) => {\r\n const assetsAIEnhancementEnabledInner = settings.AssetAIEnhancementOptout === 'false';\r\n const promises = [\r\n dataService.getImageById({ imageId, isImageFittingEnabled: isImageFittingEnabled && assetsAIEnhancementEnabledInner }),\r\n isBrandKitEnabled ? isCopilotRegionRestricted({\r\n feature: 'displayTemplate',\r\n permissions,\r\n serverContext,\r\n }) : Promise.resolve(true),\r\n ];\r\n Promise.all(promises).then(([res, isRestricted]) => {\r\n if (res.baseId && res.metadata && (res.metadata.effect || res.metadata.combinedEffect)) {\r\n // applied smart effect, get to the base image\r\n const { filter, blur } = revertMetaData(res.metadata) || {};\r\n dataService.getImageById({ imageId: res.baseId, isImageFittingEnabled: isImageFittingEnabled && assetsAIEnhancementEnabledInner }).then((image) => {\r\n setFilterBlurBaseImage({ ...image, filter, blur });\r\n setOriginalImage(res);\r\n setLoadingStatus(false);\r\n setInitialAssetLoading(false);\r\n });\r\n } else if (isBrandKitEnabled && !isRestricted && res.metadata && res.metadata.template &&\r\n res.metadata.template.templateId &&\r\n Number(res.metadata.template.version) >= 1.2\r\n ) {\r\n // template based AIGC image, navigate to the edit display image page\r\n setData({\r\n imageId: res.id,\r\n url: res.url,\r\n metadata: res.metadata,\r\n height: res.height,\r\n width: res.width,\r\n sourceType: res.sourceType,\r\n });\r\n navigation.gotoEditDisplayImagePage({\r\n imageId,\r\n folderId,\r\n templateId: res.metadata.template.templateId,\r\n });\r\n } else {\r\n setOriginalImage(res);\r\n setLoadingStatus(false);\r\n setInitialAssetLoading(false);\r\n }\r\n });\r\n setAssetsAIEnhancementEnabled(assetsAIEnhancementEnabledInner);\r\n });\r\n }\r\n }, [dataService, editImageUrl, imageId, isImageFittingEnabled, originalImage.url, navigation, folderId, isBrandKitEnabled, permissions, serverContext]);\r\n\r\n const {\r\n filterIndex,\r\n setFilterIndex,\r\n updateImage,\r\n backgroundBlurEnabled,\r\n toggleBackgroundBlur,\r\n changeBackgroundBlurLevel,\r\n backgroundBlurLevel,\r\n resultImage: resultFilterAndBlurImage,\r\n imagesWithFilter,\r\n getImagesWithFilter,\r\n isImageUpdated: isFilterAndBlurImageUpdated,\r\n isImageChangedWhenActive: isFilterAndBlurImageChangedWhenActive,\r\n } = useFilterAndBlur({\r\n dataService,\r\n // eslint-disable-next-line no-nested-ternary\r\n originalImage: editImageUrl ? '' : (filterBlurBaseImage ? filterBlurBaseImage.url : originalImage.url), // if editImageUrl is set, it means the image is from shutter stock which is not supported by adjust\r\n setLoadingStatus,\r\n initialFilter: filterBlurBaseImage ? filterBlurBaseImage.filter : null,\r\n initialBlur: filterBlurBaseImage ? filterBlurBaseImage.blur : null,\r\n isActive: currentView === ViewName.ImageAdjustView,\r\n });\r\n\r\n const {\r\n getSegmentations,\r\n generateBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithoutBackground, // the image url without background\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc, // the image after user selected objects\r\n selectedMasks,\r\n setSelectedMasks,\r\n fetchSegmentationError,\r\n isFetchingSegmentations,\r\n maskValues,\r\n } = useBackgroundChange({\r\n dataService,\r\n perfMarker,\r\n logger,\r\n });\r\n\r\n const adPlacementResult = useAdPlacement({\r\n image: originalImage,\r\n permissions,\r\n setDataLoaded,\r\n logger,\r\n i18n,\r\n getSmartCroppings,\r\n setLoadingStatus,\r\n imageCroppingTasks,\r\n isImageFittingEnabled: finalImageFittingEnabled,\r\n dataService,\r\n });\r\n\r\n const {\r\n updateImage: updateAdPlacementImageInner,\r\n cropSettingsToUpdate,\r\n hasCropSettingsChanged,\r\n hasCroppingTask,\r\n requiredSizeInvalidRatioList,\r\n allViewErrorTip,\r\n } = adPlacementResult;\r\n\r\n const {\r\n saveImageCopy, uploadImageToFolder, saveImageWithBaseId, getImageById, uploadStockImage, saveImage, moveImageToFolder, addImageWithBaseIdToFolder,\r\n } = dataService;\r\n\r\n const folderIdNumber = useMemo(() =>\r\n (folderId && folderId !== ROOT_FOLDER_ID ? Number(folderId) : null), [folderId]);\r\n\r\n const replaceBackground = useCallback((backgroundChangedImage, needToSave) => {\r\n setLoadingStatus(true);\r\n if (needToSave) {\r\n // save the image to asset library first, since the image data is base64 which is not supported by filter and blur API\r\n uploadImageToFolder({\r\n imageData: backgroundChangedImage.url,\r\n folderId: folderIdNumber,\r\n }).then((res) => {\r\n logger.logTrace('edit image services: replace with single color background for image id', { imageId: res });\r\n getImageById({ imageId: res, isImageFittingEnabled: finalImageFittingEnabled }).then((image) => {\r\n updateImage(image).then(() => {\r\n setLoadingStatus(false);\r\n });\r\n setSavedBackgroundColorChangedImage([...savedBackgroundColorChangedImage, image.url]);\r\n setBackgroundChangedResult(image);\r\n setCurrentView(ViewName.ImageAdjustView);\r\n });\r\n });\r\n } else {\r\n logger.logTrace('edit image services: replace with generated background', { imageData: backgroundChangedImage.url });\r\n setBackgroundChangedResult(backgroundChangedImage);\r\n setCurrentView(ViewName.ImageAdjustView);\r\n updateImage(backgroundChangedImage).then(() => {\r\n setLoadingStatus(false);\r\n });\r\n }\r\n setImageUrlWithGeneratedBackground(null);\r\n }, [setImageUrlWithGeneratedBackground, uploadImageToFolder, folderIdNumber, logger, getImageById, finalImageFittingEnabled, updateImage, savedBackgroundColorChangedImage]);\r\n\r\n const isUnsavedStockImage = useMemo(() => !_.isEmpty(editImageUrl), [editImageUrl]);\r\n\r\n const isSavedStockImage = useMemo(() => _.get(originalImage, 'sourceType') === CSMLAssetSource.Shutterstock, [originalImage]);\r\n\r\n const isStockImage = useMemo(() => isUnsavedStockImage || isSavedStockImage, [isSavedStockImage, isUnsavedStockImage]);\r\n\r\n const isImageUpdated = useMemo(() => (\r\n originalImage && resultFilterAndBlurImage && (isFilterAndBlurImageUpdated || backgroundChangedResult)\r\n ), [originalImage, resultFilterAndBlurImage, isFilterAndBlurImageUpdated, backgroundChangedResult]);\r\n\r\n const cropImageAndGoBack = useCallback((id, backToLibraryPage) => {\r\n const { placementSettings } = cropSettingsToUpdate;\r\n if (hasCropSettingsChanged) {\r\n cropImage({\r\n imageId: id,\r\n placementSettings,\r\n }).then(() => {\r\n setLoadingStatus(false);\r\n if (backToLibraryPage) {\r\n navigation.gotoLibraryPage();\r\n } else {\r\n navigation.goBack();\r\n }\r\n });\r\n } else {\r\n setLoadingStatus(false);\r\n if (backToLibraryPage) {\r\n navigation.gotoLibraryPage();\r\n } else {\r\n navigation.goBack();\r\n }\r\n }\r\n }, [cropImage, cropSettingsToUpdate, hasCropSettingsChanged, navigation]);\r\n\r\n const onConfirmDialogSave = useCallback(() => {\r\n if (isImageUpdated) {\r\n // When the url is changed, need to update asset. Then save its crop changes if have.\r\n setLoadingStatus(true);\r\n saveImage({\r\n id: originalImage.id,\r\n type: originalImage.type,\r\n url: resultFilterAndBlurImage.url,\r\n })\r\n .then(() => {\r\n cropImageAndGoBack(originalImage.id);\r\n });\r\n } else {\r\n setLoadingStatus(true);\r\n cropImageAndGoBack(originalImage.id);\r\n }\r\n }, [cropImageAndGoBack, isImageUpdated, originalImage, resultFilterAndBlurImage, saveImage]);\r\n\r\n const saveImageDirectly = useCallback(() => {\r\n if (isUnsavedStockImage) {\r\n // When it's an unsaved stock image, upload it first. Then save its crop changes if have.\r\n setLoadingStatus(true);\r\n uploadStockImage({ stockImageId: imageId })\r\n .then((id) => {\r\n cropImageAndGoBack(id, true);\r\n });\r\n } else if (isImageUpdated || hasCropSettingsChanged) {\r\n setIsConfirmDialogOpen(true);\r\n } else {\r\n navigation.goBack();\r\n }\r\n }, [cropImageAndGoBack, hasCropSettingsChanged, imageId, isImageUpdated, isUnsavedStockImage, navigation, uploadStockImage]);\r\n\r\n const updateAdPlacementImage = useCallback(() => {\r\n if ((isImageUpdated || isFilterAndBlurImageChangedWhenActive) && resultFilterAndBlurImage.url !== originalImage.url) {\r\n const image = new Image();\r\n image.src = resultFilterAndBlurImage.url;\r\n image.onload = () => {\r\n updateAdPlacementImageInner({\r\n url: resultFilterAndBlurImage.url,\r\n width: image.width,\r\n height: image.height,\r\n originalWidth: image.width,\r\n originalHeight: image.height,\r\n });\r\n };\r\n } else if ((isImageUpdated || isFilterAndBlurImageChangedWhenActive) && resultFilterAndBlurImage.url === originalImage.url) {\r\n updateAdPlacementImageInner(originalImage);\r\n }\r\n }, [isImageUpdated, isFilterAndBlurImageChangedWhenActive, resultFilterAndBlurImage.url, originalImage, updateAdPlacementImageInner]);\r\n\r\n const saveBackgroundChangedResult = useCallback(() => {\r\n return new Promise((resolve) => {\r\n // image already saved in asset library, return directly\r\n if (backgroundChangedResult && savedBackgroundColorChangedImage.includes(backgroundChangedResult.url)) {\r\n logger.logTrace('edit image services: save single color background');\r\n resolve(backgroundChangedResult);\r\n // save background changed image to asset library\r\n } else if (backgroundChangedResult) {\r\n saveImageCopy({\r\n image: backgroundChangedResult,\r\n folderId: folderIdNumber,\r\n }).then((res) => {\r\n logger.logTrace('edit image services: save generated background for image id', { imageId: res, imageUrl: backgroundChangedResult.url });\r\n resolve({ id: res, url: backgroundChangedResult.url });\r\n });\r\n // no background changed image, return original image id\r\n } else {\r\n const baseImage = filterBlurBaseImage || originalImage;\r\n resolve(baseImage);\r\n }\r\n });\r\n }, [backgroundChangedResult, filterBlurBaseImage, folderIdNumber, logger, originalImage, saveImageCopy, savedBackgroundColorChangedImage]);\r\n\r\n const moveImageToFolderInner = useCallback((id) => {\r\n if (folderId && folderId !== ROOT_FOLDER_ID) {\r\n return getImageById({ imageId: id }).then((image) => {\r\n return moveImageToFolder({\r\n image,\r\n destFolderId: folderIdNumber,\r\n });\r\n });\r\n }\r\n return Promise.resolve();\r\n }, [folderId, folderIdNumber, getImageById, moveImageToFolder]);\r\n\r\n const saveAsCopy = useCallback(() => {\r\n if (isImageUpdated) {\r\n setLoadingStatus(true);\r\n // save background changed image to asset library first\r\n saveBackgroundChangedResult().then((res) => {\r\n // save the image with filter and blur\r\n if (resultFilterAndBlurImage && resultFilterAndBlurImage.url !== res.url) {\r\n const metaData = convertMetaData(resultFilterAndBlurImage);\r\n if (finalImageFittingEnabled) {\r\n addImageWithBaseIdToFolder({\r\n imageSrc: resultFilterAndBlurImage.url,\r\n baseId: Number(res.id),\r\n folderId: folderIdNumber,\r\n metaData: JSON.stringify(metaData),\r\n }).then((resInner) => {\r\n logger.logTrace('edit image services: save image as copy with baseId', { id: resInner, baseId: res.id });\r\n cropImageAndGoBack(resInner);\r\n });\r\n } else {\r\n saveImageWithBaseId({\r\n image: {\r\n url: resultFilterAndBlurImage.url,\r\n metaData,\r\n },\r\n baseId: res.id,\r\n }).then((inner) => {\r\n // currently MT doesn't support to save image with baseId to a folder, so move it to the folder\r\n logger.logTrace('edit image services: save image as copy with baseId', { id: inner, baseId: res.id });\r\n moveImageToFolderInner(inner).then(() => {\r\n // crop the image if needed\r\n cropImageAndGoBack(inner);\r\n });\r\n });\r\n }\r\n } else {\r\n const { id } = res || {};\r\n logger.logTrace('edit image services: save image as copy', { id });\r\n cropImageAndGoBack(res.id);\r\n }\r\n });\r\n } else {\r\n navigation.goBack();\r\n }\r\n }, [addImageWithBaseIdToFolder, cropImageAndGoBack, finalImageFittingEnabled, folderIdNumber, isImageUpdated, logger, moveImageToFolderInner, navigation, resultFilterAndBlurImage, saveBackgroundChangedResult, saveImageWithBaseId]);\r\n\r\n const disableSave = useMemo(() => (\r\n (!isUnsavedStockImage && !isImageUpdated && !hasCropSettingsChanged) || hasCroppingTask || (hasCropSettingsChanged && requiredSizeInvalidRatioList && requiredSizeInvalidRatioList.length > 0)\r\n ), [isUnsavedStockImage, isImageUpdated, hasCropSettingsChanged, hasCroppingTask, requiredSizeInvalidRatioList]);\r\n\r\n const saveButtonTooltip = useMemo(() => {\r\n let tooltip;\r\n if (disableSave && hasCropSettingsChanged && requiredSizeInvalidRatioList && requiredSizeInvalidRatioList.length > 0) {\r\n tooltip = allViewErrorTip;\r\n }\r\n\r\n return tooltip;\r\n }, [allViewErrorTip, disableSave, hasCropSettingsChanged, requiredSizeInvalidRatioList]);\r\n\r\n return {\r\n originalImage,\r\n resultImage: resultFilterAndBlurImage,\r\n currentView,\r\n setCurrentView,\r\n filterIndex,\r\n setFilterIndex,\r\n updateImage,\r\n backgroundBlurEnabled,\r\n toggleBackgroundBlur,\r\n changeBackgroundBlurLevel,\r\n backgroundBlurLevel,\r\n loadingStatus,\r\n initialAssetLoading,\r\n saveAsCopy,\r\n saveImageDirectly,\r\n imagesWithFilter,\r\n getImagesWithFilter,\r\n isImageUpdated,\r\n replaceBackground,\r\n isStockImage,\r\n disableSave,\r\n haveCroppingTasks: !_.isEmpty(imageCroppingTasks),\r\n isConfirmDialogOpen,\r\n setIsConfirmDialogOpen,\r\n onConfirmDialogSave,\r\n saveButtonTooltip,\r\n updateAdPlacementImage,\r\n ...adPlacementResult,\r\n\r\n // Change Background\r\n generateBackground,\r\n getSegmentations,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc, // the image after user selected objects\r\n selectedMasks,\r\n setSelectedMasks,\r\n maskValues,\r\n fetchSegmentationError,\r\n isFetchingSegmentations,\r\n };\r\n};\r\n","import { useCallback, useEffect, useMemo, useState, useRef } from 'react';\r\n\r\nexport const useFilterAndBlur = ({\r\n dataService,\r\n originalImage,\r\n setLoadingStatus,\r\n initialFilter,\r\n initialBlur,\r\n isActive,\r\n}) => {\r\n const {\r\n imagesWithFilter,\r\n imagesWithFilterAndBlur,\r\n getImagesWithFilter,\r\n getImagesWithFilterAndBlur,\r\n } = dataService;\r\n\r\n const [filterIndex, setFilterIndex] = useState(0);\r\n const [backgroundBlurEnabled, setBackgroundBlurEnabled] = useState(false);\r\n const [imagesWithFilterAndBlurCached, setImagesWithFilterAndBlurCached] = useState([]);\r\n const [backgroundBlurLevel, setBackgroundBlurLevel] = useState(50);\r\n const [currentImage, setCurrentImage] = useState('');\r\n const [initialStateApplied, setInitialStateApplied] = useState(false);\r\n\r\n const initialStatusWhenActive = useRef();\r\n\r\n useEffect(() => {\r\n if (isActive) {\r\n initialStatusWhenActive.current = {\r\n filterIndex,\r\n backgroundBlurLevel,\r\n backgroundBlurEnabled,\r\n };\r\n } else {\r\n initialStatusWhenActive.current = null;\r\n }\r\n }, [isActive, filterIndex, backgroundBlurLevel, backgroundBlurEnabled]);\r\n\r\n useEffect(() => {\r\n if (imagesWithFilter && imagesWithFilter.length > 0 && !initialStateApplied && (initialFilter || initialBlur)) {\r\n if (initialFilter) {\r\n const index = imagesWithFilter.findIndex(image => image.filter === initialFilter);\r\n if (index !== -1) {\r\n setFilterIndex(index);\r\n }\r\n }\r\n if (initialBlur) {\r\n setBackgroundBlurEnabled(true);\r\n setBackgroundBlurLevel(initialBlur);\r\n getImagesWithFilterAndBlur(originalImage, initialBlur);\r\n }\r\n setInitialStateApplied(true);\r\n }\r\n }, [getImagesWithFilterAndBlur, imagesWithFilter, imagesWithFilterAndBlur, initialBlur, initialFilter, initialStateApplied, originalImage]);\r\n\r\n // update image when image changes. e.g., background removal\r\n const updateImage = useCallback((newImage) => {\r\n setCurrentImage(newImage.url);\r\n if (backgroundBlurEnabled) {\r\n getImagesWithFilter(newImage.url);\r\n return getImagesWithFilterAndBlur(newImage.url, backgroundBlurLevel);\r\n }\r\n setImagesWithFilterAndBlurCached([]);\r\n return getImagesWithFilter(newImage.url);\r\n }, [backgroundBlurEnabled, backgroundBlurLevel, getImagesWithFilter, getImagesWithFilterAndBlur]);\r\n\r\n const resultImage = useMemo(() => {\r\n if (backgroundBlurEnabled && imagesWithFilterAndBlurCached.length) {\r\n return imagesWithFilterAndBlurCached[filterIndex];\r\n } else if (imagesWithFilter && imagesWithFilter.length) {\r\n return imagesWithFilter[filterIndex];\r\n }\r\n\r\n return ({\r\n filter: null,\r\n url: originalImage,\r\n });\r\n }, [backgroundBlurEnabled, filterIndex, imagesWithFilter, imagesWithFilterAndBlurCached, originalImage]);\r\n\r\n const getImagesWithFilterImp = useCallback((image) => {\r\n setLoadingStatus(true);\r\n getImagesWithFilter(image).finally(() => {\r\n setLoadingStatus(false);\r\n });\r\n }, [getImagesWithFilter, setLoadingStatus]);\r\n\r\n useEffect(() => {\r\n if (imagesWithFilterAndBlur) {\r\n setImagesWithFilterAndBlurCached(imagesWithFilterAndBlur);\r\n }\r\n }, [imagesWithFilterAndBlur]);\r\n\r\n useEffect(() => {\r\n if (originalImage) {\r\n setCurrentImage(originalImage);\r\n setLoadingStatus(true);\r\n getImagesWithFilter(originalImage).finally(() => {\r\n setLoadingStatus(false);\r\n });\r\n }\r\n }, [getImagesWithFilter, originalImage, setLoadingStatus]);\r\n\r\n const toggleBackgroundBlur = useCallback((enableBackgroundBlur) => {\r\n if (enableBackgroundBlur) {\r\n if (!imagesWithFilterAndBlurCached.length) {\r\n setLoadingStatus(true);\r\n getImagesWithFilterAndBlur(currentImage, backgroundBlurLevel).finally(() => {\r\n setLoadingStatus(false);\r\n });\r\n }\r\n }\r\n setBackgroundBlurEnabled(enableBackgroundBlur);\r\n }, [backgroundBlurLevel, currentImage, getImagesWithFilterAndBlur, imagesWithFilterAndBlurCached.length, setLoadingStatus]);\r\n\r\n const changeBackgroundBlurLevel = useCallback((blurLevel = 50) => {\r\n setLoadingStatus(true);\r\n setBackgroundBlurLevel(blurLevel);\r\n getImagesWithFilterAndBlur(currentImage, blurLevel).finally(() => {\r\n setLoadingStatus(false);\r\n });\r\n }, [currentImage, getImagesWithFilterAndBlur, setLoadingStatus]);\r\n\r\n const isImageUpdated = useMemo(() => {\r\n if (initialBlur && initialFilter && initialStateApplied) {\r\n return !backgroundBlurEnabled || initialBlur !== backgroundBlurLevel || initialFilter !== imagesWithFilter[filterIndex].filter;\r\n } else if (initialBlur && initialStateApplied) {\r\n return !backgroundBlurEnabled || initialBlur !== backgroundBlurLevel || filterIndex !== 0;\r\n } else if (initialFilter && initialStateApplied) {\r\n return initialFilter !== imagesWithFilter[filterIndex].filter || backgroundBlurEnabled;\r\n }\r\n return resultImage && resultImage.url !== originalImage;\r\n }, [backgroundBlurEnabled, backgroundBlurLevel, filterIndex, imagesWithFilter, initialBlur, initialFilter, initialStateApplied, originalImage, resultImage]);\r\n\r\n // check if image is changed when current view is active\r\n // maybe is same as original image but different from the one when user landed on this view\r\n const isImageChangedWhenActive = useMemo(\r\n () =>\r\n initialStatusWhenActive.current &&\r\n (initialStatusWhenActive.current.filterIndex !== filterIndex\r\n || initialStatusWhenActive.current.backgroundBlurLevel !== backgroundBlurLevel\r\n || initialStatusWhenActive.current.backgroundBlurEnabled !== backgroundBlurEnabled),\r\n [backgroundBlurEnabled, backgroundBlurLevel, filterIndex]\r\n );\r\n\r\n return {\r\n filterIndex,\r\n setFilterIndex,\r\n updateImage,\r\n backgroundBlurEnabled,\r\n toggleBackgroundBlur,\r\n changeBackgroundBlurLevel,\r\n backgroundBlurLevel,\r\n resultImage,\r\n imagesWithFilter,\r\n getImagesWithFilter: getImagesWithFilterImp,\r\n isImageUpdated,\r\n isImageChangedWhenActive,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n imagePreviewView: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n ...shorthands.margin('12px'),\r\n ...shorthands.gap('32px'),\r\n ...shorthands.flex(1),\r\n\r\n '& .image-preview-image-wrapper': {\r\n width: '598px',\r\n '& img': {\r\n width: '100%',\r\n height: 'auto',\r\n },\r\n },\r\n\r\n '& .image-preview-button-wrapper': {\r\n boxShadow: '0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14)',\r\n ...shorthands.borderRadius('6px'),\r\n\r\n '& .button-item': {\r\n ...shorthands.border('none'),\r\n ...shorthands.padding('12px'),\r\n\r\n '&.first-button-item': {\r\n borderTopLeftRadius: '6px',\r\n borderBottomLeftRadius: '6px',\r\n },\r\n\r\n '&.last-button-item': {\r\n borderTopRightRadius: '6px',\r\n borderBottomRightRadius: '6px',\r\n },\r\n },\r\n },\r\n\r\n '& .image-preview-notification-wrapper': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n backgroundColor: '#FFFFFF',\r\n boxShadow: '0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14)',\r\n ...shorthands.gap('4px'),\r\n ...shorthands.borderRadius('6px'),\r\n ...shorthands.padding('12px'),\r\n },\r\n },\r\n});\r\n","/* eslint-disable arrow-body-style */\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Image,\r\n Button,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular } from '@fluentui/react-icons';\r\n\r\nimport { useStyles } from './style';\r\n\r\nexport const ImagePreviewView = ({\r\n imageView,\r\n url,\r\n buttonsConfig,\r\n buttonsRef,\r\n notificationConfig,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const buttonNum = buttonsConfig.length;\r\n\r\n const buttonItem = useCallback(({ config, index, key }) => {\r\n const {\r\n onClick,\r\n icon: Icon,\r\n disabled,\r\n text,\r\n } = config;\r\n\r\n const isFirstButton = index === 0;\r\n const isLastButton = index === buttonNum - 1;\r\n\r\n return (\r\n }\r\n disabled={disabled}\r\n shape=\"square\"\r\n >\r\n {text}\r\n \r\n );\r\n }, [buttonNum]);\r\n\r\n const notificationContent = useMemo(() => {\r\n const {\r\n icon,\r\n content,\r\n onDismiss,\r\n dismissAriaLabel,\r\n } = notificationConfig || {};\r\n\r\n return (\r\n
\r\n {icon}\r\n {content}\r\n {\r\n _.isFunction(onDismiss) &&\r\n }\r\n appearance=\"subtle\"\r\n onClick={onDismiss}\r\n aria-label={dismissAriaLabel}\r\n />\r\n }\r\n
\r\n );\r\n }, [notificationConfig]);\r\n\r\n return (\r\n
\r\n {\r\n buttonNum > 0 &&\r\n
\r\n {\r\n buttonsConfig.map((config, index) => (\r\n buttonItem({ config, index, key: 'image-preview-button' })\r\n ))\r\n }\r\n
\r\n }\r\n
\r\n {\r\n imageView ||\r\n \r\n }\r\n
\r\n {\r\n notificationConfig && notificationContent\r\n }\r\n
\r\n );\r\n};\r\n\r\nImagePreviewView.propTypes = {\r\n imageView: PropTypes.shape({}),\r\n url: PropTypes.string,\r\n buttonsConfig: PropTypes.arrayOf(PropTypes.shape({})),\r\n buttonsRef: PropTypes.shape({}),\r\n notificationConfig: PropTypes.shape({}),\r\n};\r\n\r\nImagePreviewView.defaultProps = {\r\n imageView: undefined,\r\n url: undefined,\r\n buttonsConfig: [],\r\n buttonsRef: undefined,\r\n notificationConfig: undefined,\r\n};\r\n","import { makeResetStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeResetStyles({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n '& .filters-card': {\r\n width: '320px',\r\n '& .filters-list': {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'space-between',\r\n paddingLeft: '4px',\r\n paddingRight: '4px',\r\n paddingTop: '8px',\r\n paddingBottom: '8px',\r\n '& .filter-wrapper': {\r\n width: '80px',\r\n height: '100px',\r\n ...shorthands.border('none'),\r\n ...shorthands.padding('0'),\r\n backgroundColor: '#fff',\r\n '& img': {\r\n width: '100%',\r\n height: '80px',\r\n ...shorthands.borderRadius('8px'),\r\n objectFit: 'cover',\r\n },\r\n '&.selected': {\r\n '& img': {\r\n ...shorthands.outline('2px', 'solid', tokens.colorBrandBackground),\r\n outlineOffset: '1px',\r\n ...shorthands.borderRadius('8px'),\r\n },\r\n },\r\n '& .filter-name': {\r\n fontSize: '10px',\r\n textAlign: 'center',\r\n lineHeight: '14px',\r\n fontWeight: 600,\r\n ...shorthands.gap('4px'),\r\n },\r\n },\r\n },\r\n },\r\n '& .blur-card': {\r\n width: '320px',\r\n marginTop: '12px',\r\n '& .blur-header': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '36px',\r\n '& svg': {\r\n marginRight: '10px',\r\n marginLeft: '8px',\r\n },\r\n },\r\n '& .blur-slider': {\r\n width: '100%',\r\n '& .blur-slider-value-wrapper': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n '& .blur-slider-label': {\r\n marginLeft: '8px',\r\n },\r\n '& .blur-slider-value': {\r\n marginRight: '8px',\r\n },\r\n },\r\n },\r\n '& .blur-slider-control': {\r\n width: '100%',\r\n },\r\n '& .blur-switch': {\r\n '&.fui-Switch input': {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n },\r\n },\r\n});\r\n","/* eslint-disable arrow-body-style */\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useMemo, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport {\r\n Card,\r\n CardHeader,\r\n Slider,\r\n Switch,\r\n Text,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { VideoBackgroundEffect20Regular } from '@fluentui/react-icons';\r\n\r\nimport { ImagePreviewView } from '../image-preview-view';\r\nimport { useStyles } from './style';\r\n\r\nexport const ImageAdjustView = ({\r\n resultImage,\r\n toggleBackgroundBlur,\r\n setFilterIndex,\r\n changeBackgroundBlurLevel,\r\n imagesWithFilter,\r\n i18n,\r\n backgroundBlurEnabled,\r\n backgroundBlurLevel,\r\n goToBackgroundChangeView,\r\n filterIndex,\r\n isAIGCRegionRestricted,\r\n notificationApi,\r\n permissions,\r\n}) => {\r\n const imageAdjustViewStyles = useStyles();\r\n const isAdsStudioBackgroundChangeEnabled = _.get(permissions, ['dynamic', 'AdsStudioBackgroundChange'], false);\r\n\r\n const buttonsConfig = useMemo(() => (isAdsStudioBackgroundChangeEnabled ? [{\r\n text: i18n.getString(_TL_('Replace background')),\r\n icon: VideoBackgroundEffect20Regular,\r\n onClick: () => {\r\n if (isAIGCRegionRestricted) {\r\n notificationApi.showWarning(i18n.getString(_TL_('This feature isn\\'t available in all markets.')));\r\n } else {\r\n goToBackgroundChangeView();\r\n }\r\n },\r\n }] : []), [goToBackgroundChangeView, i18n, isAIGCRegionRestricted, notificationApi, isAdsStudioBackgroundChangeEnabled]);\r\n\r\n const timerRef = useRef(null);\r\n\r\n const handleChangeBlur = useCallback((event, data) => {\r\n if (timerRef.current) {\r\n clearTimeout(timerRef.current);\r\n }\r\n\r\n timerRef.current = setTimeout(() => {\r\n changeBackgroundBlurLevel(data.value);\r\n }, 300);\r\n }, [changeBackgroundBlurLevel]);\r\n\r\n return (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Filters'))}}\r\n />\r\n {\r\n imagesWithFilter && imagesWithFilter.length > 1 &&\r\n
\r\n {\r\n imagesWithFilter.map((image, index) => (\r\n setFilterIndex(index)}\r\n className={classnames('filter-wrapper', filterIndex === index && 'selected')}\r\n aria-selected={filterIndex === index}\r\n role=\"option\"\r\n aria-label={image.filter}\r\n >\r\n \"filter\"\r\n
{image.filter}
\r\n \r\n ))\r\n }\r\n
\r\n }\r\n {\r\n imagesWithFilter && imagesWithFilter.length === 1 &&\r\n \r\n \r\n {i18n.getString(_TL_('No filters available'))}\r\n \r\n \r\n }\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Background blur'))}\r\n
}\r\n action={ { toggleBackgroundBlur(!backgroundBlurEnabled); }}\r\n label={backgroundBlurEnabled ? i18n.getString(_TL_('On')) : i18n.getString(_TL_('Off'))}\r\n aria-label={i18n.getString(_TL_('Background blur'))}\r\n />}\r\n />\r\n {\r\n backgroundBlurEnabled &&\r\n
\r\n
\r\n
{i18n.getString(_TL_('Blur amount'))}
\r\n
{backgroundBlurLevel}
\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n {\r\n resultImage && resultImage.url &&\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nImageAdjustView.propTypes = {\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n resultImage: PropTypes.shape({\r\n url: PropTypes.string,\r\n }),\r\n toggleBackgroundBlur: PropTypes.func,\r\n setFilterIndex: PropTypes.func,\r\n changeBackgroundBlurLevel: PropTypes.func,\r\n imagesWithFilter: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n url: PropTypes.string,\r\n filter: PropTypes.string,\r\n })),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n backgroundBlurEnabled: PropTypes.bool,\r\n backgroundBlurLevel: PropTypes.number,\r\n goToBackgroundChangeView: PropTypes.func,\r\n isAIGCRegionRestricted: PropTypes.bool,\r\n notificationApi: PropTypes.shape({\r\n showWarning: PropTypes.func,\r\n }),\r\n};\r\n\r\nImageAdjustView.defaultProps = {\r\n resultImage: null,\r\n toggleBackgroundBlur: () => {},\r\n setFilterIndex: () => {},\r\n changeBackgroundBlurLevel: () => {},\r\n imagesWithFilter: [],\r\n i18n: {},\r\n backgroundBlurEnabled: false,\r\n backgroundBlurLevel: 0,\r\n goToBackgroundChangeView: () => {},\r\n isAIGCRegionRestricted: false,\r\n notificationApi: {},\r\n};\r\n","// import backgroundImg from '../media/updateBg.png';\r\nimport { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const usePlacementListStyles = makeStyles({\r\n placementListView: {\r\n marginLeft: '12px',\r\n },\r\n header: {\r\n marginTop: '4px',\r\n marginBottom: '16px',\r\n },\r\n showRequiredOnlyCheckbox: {\r\n height: '32px',\r\n },\r\n // adControl: {\r\n // display: 'flex',\r\n // alignItems: 'center',\r\n // justifyContent: 'space-between',\r\n // marginRight: '24px',\r\n // },\r\n // adTypeControl: {\r\n // display: 'flex',\r\n // alignItems: 'center',\r\n // margin: '24px 0',\r\n // },\r\n // controlBtn: {\r\n // padding: '10px 0',\r\n // fontFamily: 'Segoe UI',\r\n // fontWeight: 400,\r\n // fontSize: 14,\r\n // lineHeight: '20px',\r\n // color: palette.neutralPrimary,\r\n // background: palette.white,\r\n // border: 'none',\r\n // marginRight: 24,\r\n // },\r\n // activeBtn: {\r\n // borderBottom: `2px solid ${palette.blue}`,\r\n // fontWeight: 600,\r\n // },\r\n // errorInfoBox: {\r\n // margin: '-16px 24px 8px 0',\r\n // background: '#FDE7E9',\r\n // borderRadius: '6px',\r\n // overflow: 'hidden',\r\n // },\r\n errorIcon: {\r\n color: '#A80000',\r\n },\r\n // errorInfo: {\r\n // fontFamily: 'Segoe UI',\r\n // fontWeight: 400,\r\n // fontSize: 12,\r\n // lineHeight: '16px',\r\n // color: palette.neutralPrimary,\r\n // },\r\n // overlay: {\r\n // position: 'absolute',\r\n // top: 0,\r\n // bottom: 0,\r\n // left: 0,\r\n // right: 0,\r\n // zIndex: 1000,\r\n // },\r\n // toggleContainer: {\r\n // display: 'flex',\r\n // alignItems: 'flex-start',\r\n // },\r\n adPreviewGridLayoutContainer: {\r\n gridTemplateColumns: 'repeat(auto-fill, minmax(674px, 0.7fr))',\r\n },\r\n});\r\n\r\nexport const usePlacementContaierStyles = makeStyles({\r\n placementContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n minWidth: '650px',\r\n minHeight: '490px',\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: tokens.white,\r\n boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.14), 0px 0px 2px 0px rgba(0, 0, 0, 0.12)',\r\n ...shorthands.borderRadius('4px'),\r\n },\r\n containerHeader: {\r\n ...shorthands.padding('16px', '16px', '0px', '16px'),\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n },\r\n containerTitle: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n previewWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.padding('4px'),\r\n ...shorthands.borderRadius('4px'),\r\n backgroundColor: tokens.colorNeutralBackground5,\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '16px',\r\n },\r\n ratio: {\r\n marginLeft: '4px',\r\n },\r\n previewType: {\r\n marginLeft: '4px',\r\n },\r\n placementBox: {\r\n ...shorthands.margin('auto'),\r\n },\r\n requireBox: {\r\n marginLeft: '4px',\r\n ...shorthands.padding('4px'),\r\n ...shorthands.borderRadius('4px'),\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '16px',\r\n color: tokens.colorNeutralForeground3,\r\n backgroundColor: tokens.colorNeutralBackground5,\r\n },\r\n cropButton: {\r\n '&.fui-Button': {\r\n width: '24px',\r\n height: '24px',\r\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.borderRadius('4px'),\r\n ...shorthands.padding('0px'),\r\n minWidth: '24px',\r\n },\r\n },\r\n errorIcon: {\r\n fontSize: '16px',\r\n lineHeight: '16px',\r\n marginLeft: '10px',\r\n color: '#A80000',\r\n },\r\n // errorContainer: {\r\n // border: `1px solid ${palette.orange}`,\r\n // },\r\n // errRequireBox: {\r\n // background: palette.orange,\r\n // },\r\n // errRequireText: {\r\n // color: palette.white,\r\n // },\r\n minSize: {\r\n ...shorthands.margin('12px', 'auto'),\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 400,\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n color: '#D83B01',\r\n },\r\n adPreviewComponentContainer: {\r\n minWidth: '650px',\r\n minHeight: '490px',\r\n animationDuration: '0.3s',\r\n animationTimingFunction: 'linear',\r\n animationName: [{\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n }],\r\n boxSizing: 'border-box',\r\n marginBottom: '24px',\r\n marginRight: '24px',\r\n },\r\n});\r\n\r\nexport const getEditingModalStyles = (components, { palette = {} } = {}) => ({\r\n overlay: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n bottom: 0,\r\n right: 0,\r\n zIndex: 99,\r\n background: 'rgba(255, 255, 255, 0.4)',\r\n },\r\n container: {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n background: palette.white,\r\n borderRadius: '6px',\r\n boxShadow: '0px 4.8px 14.4px rgba(0, 0, 0, 0.18), 0px 25.6px 57.6px rgba(0, 0, 0, 0.22)',\r\n boxSizing: 'border-box',\r\n zIndex: 100,\r\n animation: 'fadeIn 0.3s linear',\r\n overflow: 'scroll',\r\n maxHeight: '100%',\r\n maxWidth: '100%',\r\n },\r\n fadeOut: {\r\n animation: 'fadeOut 0.3s linear',\r\n },\r\n hide: {\r\n opacity: 0,\r\n transition: 'all 0.3s linear',\r\n },\r\n '@global': {\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n width: 600,\r\n height: 300,\r\n },\r\n to: {\r\n opacity: 1,\r\n width: 1212,\r\n height: 650,\r\n },\r\n },\r\n '@keyframes fadeOut': {\r\n from: {\r\n opacity: 1,\r\n width: 1212,\r\n height: 650,\r\n },\r\n to: {\r\n opacity: 0,\r\n width: 600,\r\n height: 300,\r\n },\r\n },\r\n },\r\n closeIcon: {\r\n position: 'absolute',\r\n top: 16,\r\n right: 16,\r\n color: 'rgb(50, 49, 48)',\r\n },\r\n placementTitle: {\r\n marginTop: 32,\r\n marginLeft: 24,\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 600,\r\n fontSize: 20,\r\n lineHeight: '27px',\r\n color: palette.neutralPrimary,\r\n },\r\n placementDesc: {\r\n marginTop: 16,\r\n marginLeft: 24,\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 400,\r\n fontSize: 14,\r\n lineHeight: '20px',\r\n color: palette.neutralPrimary,\r\n },\r\n contentContainer: {\r\n marginTop: 7,\r\n marginLeft: 24,\r\n marginRight: 24,\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n previewContainer: {\r\n width: 650,\r\n height: 444,\r\n borderRadius: '6px',\r\n background: palette.neutralLighter,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginLeft: 54,\r\n },\r\n footContainer: {\r\n marginTop: 39,\r\n padding: '16px 32px',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n borderTop: `1px solid ${palette.neutralLight}`,\r\n },\r\n cancelButton: {\r\n marginLeft: 8,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport { ErrorCircleFilled, Crop20Regular, Image16Regular } from '@fluentui/react-icons';\r\nimport { Button, mergeClasses } from '@fluentui/react-components';\r\nimport { TooltipHost } from '@bingads-webui-react/fabric-control';\r\n\r\nimport { AdPreviewPlacementContainerBase } from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\n\r\nimport { usePlacementContaierStyles } from './styles';\r\n\r\nconst tooltipProps = {\r\n maxWidth: '200px',\r\n};\r\n\r\nexport const PlacementContainer = ({\r\n aspectRatioUIString,\r\n previewTypeString,\r\n minSize,\r\n isRequired,\r\n isValid,\r\n onCrop,\r\n children, // the preview content\r\n i18n,\r\n}) => {\r\n const classes = usePlacementContaierStyles();\r\n const onRenderHeader = () => (\r\n <>\r\n
\r\n
\r\n \r\n
{aspectRatioUIString}
\r\n
{i18n.getString(previewTypeString)}
\r\n
\r\n {\r\n isRequired &&\r\n
\r\n {i18n.getString(_TL_('Required'))}\r\n
\r\n }\r\n {\r\n !isValid &&\r\n \r\n \r\n \r\n }\r\n
\r\n \r\n \r\n \r\n \r\n );\r\n\r\n const onRenderFooter = () => !isValid && (\r\n
\r\n {i18n.getString(_TL_('Minimum: {{width}} x {{height}} pixels'), {\r\n width: minSize[0],\r\n height: minSize[1],\r\n })}\r\n
\r\n );\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nPlacementContainer.propTypes = {\r\n aspectRatioUIString: PropTypes.string.isRequired,\r\n previewTypeString: PropTypes.string.isRequired,\r\n minSize: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n isRequired: PropTypes.bool,\r\n isValid: PropTypes.bool,\r\n onCrop: PropTypes.func.isRequired,\r\n children: PropTypes.node.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nPlacementContainer.defaultProps = {\r\n isRequired: false,\r\n isValid: true,\r\n};\r\n","import React from 'react';\r\n\r\nimport {\r\n MenuButton,\r\n MenuItem,\r\n Menu,\r\n MenuList,\r\n MenuTrigger,\r\n MenuPopover,\r\n makeStyles,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\nimport { CSMLAdType } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst adTypeList = [CSMLAdType.PMax, CSMLAdType.MMA, CSMLAdType.Audience, CSMLAdType.ImageExtension];\r\nconst adTypeStrings = {\r\n [CSMLAdType.PMax]: _TL_('Performance Max'),\r\n [CSMLAdType.MMA]: _TL_('Multimedia ads'),\r\n [CSMLAdType.Audience]: _TL_('Audience ads'),\r\n [CSMLAdType.ImageExtension]: _TL_('Image extensions'),\r\n};\r\n\r\nconst useStyles = makeStyles({\r\n button: {\r\n '&.fui-Button': {\r\n ...shorthands.border('none'),\r\n },\r\n },\r\n});\r\n\r\n\r\nexport const AdTypeControl = ({ adType, onChange, i18n }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(adTypeStrings[adType])}\r\n \r\n \r\n \r\n {\r\n adTypeList.map(type => (\r\n onChange(type)}\r\n >\r\n {i18n.getString(adTypeStrings[type])}\r\n \r\n ))\r\n }\r\n \r\n \r\n \r\n );\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Checkbox, mergeClasses } from '@fluentui/react-components';\r\n\r\nimport {\r\n // ClarityTags,\r\n // useClarityTags,\r\n sizeValidForRatio,\r\n getPlacementConfig,\r\n AdsStudioSpinner,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n// import { Alert } from '@bingads-webui-react/alert';\r\n// import { HelpButton } from '@bingads-webui-react/help-popup';\r\n// import { Glyphicon } from '@bingads-webui-react/primitive';\r\n// import { notificationApi } from '@bingads-webui-campaign/notification-center';\r\n\r\nimport {\r\n AdPreviewGridLayout,\r\n} from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\n\r\nimport { PlacementContainer } from './placement-container';\r\nimport { AdTypeControl } from './ad-type-control';\r\nimport { usePlacementListStyles } from './styles';\r\n\r\n// import { PlacementEditingModal } from './placement-editing-modal';\r\n// import { AssetLibraryPlacementContainer } from './placement-container';\r\n// import { ImageCropPanel } from './image-crop-panel';\r\n// import { UpdateConfirmDialog } from './update-confim-dialog';\r\n// import { getPageStyles } from './styles';\r\n\r\nexport const AdPlacementListView = ({\r\n placementList,\r\n firstImage,\r\n onEditPlacement,\r\n adType,\r\n showRequiredOnly,\r\n previewTexts,\r\n i18n,\r\n switchAdType,\r\n switchShowRequiredOnly,\r\n}) => {\r\n const classes = usePlacementListStyles();\r\n // render a placement\r\n const onRenderPlacement = useCallback((placement, AdPlacementComponent) => {\r\n const { placementMeta } = placement || {};\r\n const { imageMeta, imageCropping } = firstImage || {};\r\n\r\n if (!placementMeta || !imageMeta) {\r\n return null;\r\n }\r\n\r\n const placementConfigList = getPlacementConfig(adType);\r\n const placementConfig = placementConfigList[placementMeta.placementType];\r\n\r\n // hide non-required placements if showRequiredOnly is true\r\n if (showRequiredOnly && !placementConfig.isRequired) {\r\n return null;\r\n }\r\n\r\n const isValid = sizeValidForRatio(placementMeta.minSize, imageCropping || {\r\n SourceX: 0, SourceY: 0, SourceWidth: imageMeta.originalWidth, SourceHeight: imageMeta.originalHeight,\r\n });\r\n\r\n return (\r\n onEditPlacement({ placement, ...placementConfig })}\r\n i18n={i18n}\r\n key={placementMeta.placementType}\r\n >\r\n \r\n \r\n );\r\n }, [adType, firstImage, i18n, onEditPlacement, previewTexts, showRequiredOnly]);\r\n\r\n return (\r\n placementList && placementList.length > 0 ?\r\n
\r\n
\r\n \r\n { switchShowRequiredOnly(data.checked); }}\r\n className={classes.showRequiredOnlyCheckbox}\r\n />\r\n
\r\n
\r\n (\r\n \r\n )}\r\n gridLayoutContainerClassName={classes.adPreviewGridLayoutContainer}\r\n />\r\n
\r\n
: null\r\n // {\r\n // showUIBlocker &&\r\n // \r\n // \r\n // \r\n // }\r\n // : null\r\n );\r\n};\r\n\r\nAdPlacementListView.propTypes = {\r\n placementList: PropTypes.arrayOf(PropTypes.shape({})),\r\n firstImage: PropTypes.shape({}),\r\n imageInfo: PropTypes.shape({}),\r\n onEditPlacement: PropTypes.func.isRequired,\r\n adType: PropTypes.string.isRequired,\r\n showRequiredOnly: PropTypes.bool.isRequired,\r\n previewTexts: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nAdPlacementListView.defaultProps = {\r\n firstImage: null,\r\n imageInfo: null,\r\n placementList: [],\r\n};\r\n","import { makeResetStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeResetStyles({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n height: '100%',\r\n width: '100%',\r\n ...shorthands.overflow('hidden'),\r\n '& .card': {\r\n height: 'fit-content',\r\n ...shorthands.padding('16px', '16px', '32px', '16px'),\r\n },\r\n '& .button': {\r\n paddingLeft: '0px',\r\n },\r\n '& .placement-preview-text-wrapper': {\r\n marginTop: '8px',\r\n marginBottom: '8px',\r\n },\r\n '& .placement-preview-text': {\r\n display: 'flex',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n fontWeight: 600,\r\n color: tokens.colorNeutralForeground1,\r\n ...shorthands.padding('4px'),\r\n ...shorthands.gap('2px'),\r\n backgroundColor: tokens.colorNeutralBackground5,\r\n ...shorthands.borderRadius('4px'),\r\n width: 'fit-content',\r\n },\r\n});\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { ArrowLeft16Regular, Image16Regular, Checkmark20Regular, Dismiss20Regular } from '@fluentui/react-icons';\r\n\r\nimport { AdPreviewSinglePlacementLayout } from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\nimport { ImageCropWithBoundingBox } from '@bingads-webui-campaign-react/image-crop-with-bounding-box';\r\n\r\nimport { ImagePreviewView } from '../image-preview-view';\r\nimport { useStyles } from './style';\r\n\r\nexport const PlacementEditView = ({\r\n placement,\r\n aspectRatioUIString,\r\n previewTypeString,\r\n adType,\r\n maxCropBox,\r\n previewImage,\r\n previewTexts,\r\n onSave,\r\n onCancel,\r\n i18n,\r\n logger,\r\n goToPlacementListView,\r\n}) => {\r\n const {\r\n placementMeta,\r\n placementCropping, // for single image placement\r\n images, // for multi-image placement\r\n } = placement || {};\r\n\r\n const [curPlacementCropping, setCurPlacementCropping]\r\n = useState(() => placementCropping || (images && images[0] && images[0].placementCropping));\r\n\r\n const handleCropSettingsChanged = useCallback((settings) => {\r\n if (!_.isEqual(settings, curPlacementCropping)) {\r\n setCurPlacementCropping(settings);\r\n logger.logTrace('edit placement: crop settings changed', {\r\n adType,\r\n placementType: placementMeta && placementMeta.imageType,\r\n cropSettings: JSON.stringify(settings),\r\n });\r\n }\r\n }, [adType, curPlacementCropping, logger, placementMeta]);\r\n\r\n const handleCancel = useCallback(() => {\r\n onCancel();\r\n goToPlacementListView();\r\n }, [goToPlacementListView, onCancel]);\r\n\r\n const handleSave = useCallback(() => {\r\n onSave(placement, curPlacementCropping);\r\n goToPlacementListView();\r\n }, [curPlacementCropping, goToPlacementListView, onSave, placement]);\r\n\r\n const onRenderPlacement = useCallback((p, AdPlacementComponent) => {\r\n if (!p || !AdPlacementComponent) {\r\n return null;\r\n }\r\n // override the cropping\r\n let newPlacement = {\r\n ...p, placementCropping: curPlacementCropping, expandedPlacementCropping: undefined, effectiveImageUrl: undefined, effectiveImageWidth: undefined, effectiveImageHeight: undefined,\r\n };\r\n if (!_.isEmpty(p.images)) {\r\n // for multi-image placement, override the placementCropping of the first image\r\n const newFirstImg = { ...p.images[0], placementCropping: curPlacementCropping };\r\n newPlacement = { ...p, images: [newFirstImg, ...p.images.slice(1)] };\r\n }\r\n\r\n return (\r\n );\r\n }, [curPlacementCropping, i18n, previewTexts]);\r\n\r\n const imageCropView = useMemo(() => (\r\n \r\n ), [curPlacementCropping, handleCropSettingsChanged, maxCropBox, placementMeta.aspectRatio, placementMeta.minSize, previewImage]);\r\n\r\n const buttonsConfig = useMemo(() => ([{\r\n onClick: handleSave,\r\n icon: Checkmark20Regular,\r\n text: i18n.getString(_TL_('Apply')),\r\n }, {\r\n onClick: handleCancel,\r\n icon: Dismiss20Regular,\r\n text: i18n.getString(_TL_('Cancel')),\r\n }]), [handleCancel, handleSave, i18n]);\r\n\r\n const placementEditView = useStyles();\r\n\r\n return (\r\n
\r\n \r\n }\r\n onClick={() => { goToPlacementListView(); }}\r\n className=\"button\"\r\n >\r\n {i18n.getString(_TL_('Edit aspect ratio'))}\r\n \r\n }\r\n />\r\n
\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('{{ratio}} {{previewType}}'), { ratio: aspectRatioUIString, previewType: i18n.getString(previewTypeString) })}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nPlacementEditView.propTypes = {\r\n placement: PropTypes.shape({}),\r\n aspectRatioUIString: PropTypes.string.isRequired,\r\n previewTypeString: PropTypes.string.isRequired,\r\n adType: PropTypes.string.isRequired,\r\n maxCropBox: PropTypes.shape({}),\r\n previewImage: PropTypes.shape({\r\n Type: PropTypes.string,\r\n Src: PropTypes.string,\r\n Width: PropTypes.number,\r\n Height: PropTypes.number,\r\n }).isRequired,\r\n previewTexts: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n goToPlacementListView: PropTypes.func.isRequired,\r\n};\r\n\r\nPlacementEditView.defaultProps = {\r\n placement: null,\r\n maxCropBox: null,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n height: '44px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.padding(0, '16px'),\r\n },\r\n\r\n baseSaveButton: {\r\n minWidth: '110px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport { createPortal } from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n SplitButton,\r\n Menu,\r\n MenuTrigger,\r\n MenuList,\r\n MenuItem,\r\n MenuPopover,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\nimport { useStyles } from './style';\r\n\r\nexport const SaveButtonInSummaryBar = ({\r\n i18n,\r\n onSaveDirectly,\r\n onSaveAsCopy,\r\n isSaveAsCopyDisabled,\r\n isSaveDisabled,\r\n haveCroppingTasks,\r\n isBaseButton,\r\n baseButtonText,\r\n onBaseButtonClick,\r\n saveButtonTooltip,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const [summaryBar, setSummaryBar] = useState(null);\r\n const [open, setOpen] = useState(false);\r\n\r\n const onOpenChange = useCallback((e, data) => {\r\n setOpen(data.open);\r\n }, []);\r\n\r\n const renderBaseSaveButton = useCallback(() => (\r\n \r\n {baseButtonText}\r\n \r\n ), [baseButtonText, classes, isSaveDisabled, onBaseButtonClick]);\r\n\r\n const baseSaveButtonWithTooltip = useMemo(() => (\r\n saveButtonTooltip ?\r\n \r\n {renderBaseSaveButton()}\r\n :\r\n renderBaseSaveButton()\r\n ), [renderBaseSaveButton, saveButtonTooltip]);\r\n\r\n const saveAsCopyMenuItem = useCallback(() => (\r\n \r\n {i18n.getString(_TL_('Save as copy'))}\r\n \r\n ), [i18n, isSaveAsCopyDisabled, onSaveAsCopy]);\r\n\r\n const splitSaveButton = useMemo(() => (\r\n \r\n \r\n {triggerProps => (\r\n \r\n {i18n.getString(_TL_('Save'))}\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {i18n.getString(_TL_('Save'))}\r\n {isSaveAsCopyDisabled ?\r\n \r\n {saveAsCopyMenuItem()}\r\n :\r\n saveAsCopyMenuItem()\r\n }\r\n \r\n \r\n \r\n ), [i18n, isSaveAsCopyDisabled, isSaveDisabled, onOpenChange, onSaveDirectly, open, saveAsCopyMenuItem]);\r\n\r\n const customizedContent = useMemo(() => (\r\n
\r\n {isBaseButton ? baseSaveButtonWithTooltip : splitSaveButton}\r\n
\r\n ), [classes.container, haveCroppingTasks, isBaseButton, baseSaveButtonWithTooltip, splitSaveButton]);\r\n\r\n useEffect(() => {\r\n const timer = setInterval(() => {\r\n try {\r\n const summaryBarCustomizeEle = document.getElementById('ad-studio-summary-bar-customize-container');\r\n if (summaryBarCustomizeEle) {\r\n setSummaryBar(summaryBarCustomizeEle);\r\n clearInterval(timer);\r\n }\r\n } catch (error) {\r\n clearInterval(timer);\r\n }\r\n }, 500);\r\n return () => clearInterval(timer);\r\n }, []);\r\n\r\n return (\r\n summaryBar ? createPortal(\r\n customizedContent,\r\n summaryBar\r\n ) : null\r\n );\r\n};\r\n\r\nSaveButtonInSummaryBar.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onSaveDirectly: PropTypes.func.isRequired,\r\n onSaveAsCopy: PropTypes.func.isRequired,\r\n isSaveAsCopyDisabled: PropTypes.bool,\r\n isSaveDisabled: PropTypes.bool,\r\n haveCroppingTasks: PropTypes.bool,\r\n isBaseButton: PropTypes.bool,\r\n baseButtonText: PropTypes.string,\r\n onBaseButtonClick: PropTypes.func,\r\n saveButtonTooltip: PropTypes.string,\r\n};\r\n\r\nSaveButtonInSummaryBar.defaultProps = {\r\n isSaveAsCopyDisabled: false,\r\n isSaveDisabled: false,\r\n haveCroppingTasks: false,\r\n isBaseButton: false,\r\n baseButtonText: undefined,\r\n onBaseButtonClick: _.noop,\r\n saveButtonTooltip: undefined,\r\n};\r\n","import React from 'react';\r\n\r\nexport const UnselectedAdPlacementSVGIcon = () => (\r\n \r\n \r\n \r\n);\r\n","import React from 'react';\r\n\r\nexport const SelectedAdPlacementSVGIcon = () => (\r\n \r\n \r\n \r\n);\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n editPageNavigation: {\r\n ...shorthands.padding('8px'),\r\n },\r\n tabList: {\r\n display: 'flex',\r\n ...shorthands.gap('12px'),\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n\r\n '& >div': {\r\n width: '100%',\r\n },\r\n },\r\n tabItemWrapper: {\r\n '&.selected': {\r\n '& .fui-Tab': {\r\n backgroundColor: 'rgba(246, 246, 246, 0.50)',\r\n ...shorthands.borderRadius('3px'),\r\n\r\n '::after': {\r\n color: '#005FB8',\r\n },\r\n\r\n '& .fui-Tab__icon, .fui-Tab__content': {\r\n color: '#005FB8',\r\n },\r\n },\r\n },\r\n },\r\n tabItem: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100%',\r\n\r\n '::after': {\r\n height: '18px',\r\n alignSelf: 'center',\r\n },\r\n\r\n '&:hover::before': {\r\n height: '18px',\r\n alignSelf: 'center',\r\n },\r\n\r\n '& .fui-Tab__content': {\r\n fontSize: '12px',\r\n '-webkit-box-orient': 'vertical',\r\n ...shorthands.overflow('hidden'),\r\n display: '-webkit-box',\r\n wordBreak: 'break-word',\r\n width: '61px',\r\n },\r\n\r\n '& .fui-Tab__content--reserved-space': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TabList, Tab, mergeClasses, Tooltip } from '@fluentui/react-components';\r\nimport { WandFilled } from '@fluentui/react-icons';\r\n\r\nimport { UnselectedAdPlacementSVGIcon } from '../../media/unselected-ad-placement-svg-icon';\r\nimport { SelectedAdPlacementSVGIcon } from '../../media/selected-ad-placement-svg-icon';\r\nimport { ViewName } from '../../model/utils';\r\nimport { useStyles } from './style';\r\n\r\nconst AdPlacementId = 'edit-page-ad-placement-view';\r\nconst AdjustId = 'edit-page-adjust-view';\r\n\r\nexport const NavigationView = ({\r\n i18n,\r\n currentView,\r\n setCurrentView,\r\n isAdjustButtonDisabled,\r\n adjustButtonTooltip,\r\n updateAdPlacementImage,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const isAdPlacementSelected = useCallback(() => (\r\n currentView === ViewName.PlacementListView || currentView === ViewName.PlacementEditView\r\n ), [currentView]);\r\n\r\n const isAdjustSelected = useCallback(() => (\r\n currentView === ViewName.ImageAdjustView || currentView === ViewName.BackgroundChangeView\r\n ), [currentView]);\r\n\r\n const selectedItemId = useMemo(() => {\r\n if (isAdPlacementSelected()) {\r\n return AdPlacementId;\r\n } else if (isAdjustSelected()) {\r\n return AdjustId;\r\n }\r\n return null;\r\n }, [isAdPlacementSelected, isAdjustSelected]);\r\n\r\n const handleAdPlacementClick = useCallback(() => {\r\n setCurrentView(ViewName.PlacementListView);\r\n updateAdPlacementImage();\r\n }, [setCurrentView, updateAdPlacementImage]);\r\n\r\n const handleAdjustClick = useCallback(() => {\r\n setCurrentView(ViewName.ImageAdjustView);\r\n }, [setCurrentView]);\r\n\r\n const items = useMemo(() => ([\r\n {\r\n id: AdPlacementId,\r\n name: _TL_('Ad placement'),\r\n onClick: handleAdPlacementClick,\r\n icon: ,\r\n selectedIcon: ,\r\n isSelected: isAdPlacementSelected(),\r\n },\r\n {\r\n id: AdjustId,\r\n name: _TL_('Adjust'),\r\n onClick: handleAdjustClick,\r\n icon: ,\r\n isSelected: isAdjustSelected(),\r\n disabled: isAdjustButtonDisabled,\r\n tooltip: adjustButtonTooltip,\r\n },\r\n ]), [adjustButtonTooltip, handleAdPlacementClick, handleAdjustClick, isAdPlacementSelected, isAdjustButtonDisabled, isAdjustSelected]);\r\n\r\n const tabItem = useCallback(item => (\r\n \r\n {i18n.getString(item.name)}\r\n \r\n ), [classes.tabItem, i18n, selectedItemId]);\r\n\r\n return (\r\n
\r\n \r\n {items.map(item => (\r\n
\r\n
\r\n {item.tooltip ?\r\n \r\n {tabItem(item)}\r\n :\r\n tabItem(item)\r\n }\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nNavigationView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n currentView: PropTypes.string.isRequired,\r\n setCurrentView: PropTypes.func.isRequired,\r\n isAdjustButtonDisabled: PropTypes.bool,\r\n adjustButtonTooltip: PropTypes.string,\r\n updateAdPlacementImage: PropTypes.func.isRequired,\r\n};\r\n\r\nNavigationView.defaultProps = {\r\n isAdjustButtonDisabled: false,\r\n adjustButtonTooltip: undefined,\r\n};\r\n","import { makeResetStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useBackgroundChangeStyles = makeResetStyles({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n height: 'calc(100% - 8px)',\r\n '& .control-section': {\r\n maxWidth: '320px',\r\n backgroundColor: tokens.colorNeutralBackground1,\r\n boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.14), 0px 0px 2px 0px rgba(0, 0, 0, 0.12)',\r\n borderRadius: '8px',\r\n width: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.padding('12px', '0px'),\r\n },\r\n '& .back-to-adjust': {\r\n ...shorthands.padding('0px', '16px'),\r\n '& button': {\r\n paddingLeft: '0px',\r\n minWidth: 'unset',\r\n },\r\n '& span': {\r\n width: '10px',\r\n height: '10px',\r\n },\r\n },\r\n '& .background-change-tabs': {\r\n ...shorthands.padding('0px', '16px'),\r\n '& [role=\"tablist\"]': {\r\n minWidth: '170px',\r\n flexWrap: 'wrap',\r\n display: 'flex',\r\n },\r\n '& [role=\"tablist\"] button:first-of-type': {\r\n paddingLeft: '0px',\r\n },\r\n },\r\n '& .image-section': {\r\n display: 'flex',\r\n ...shorthands.flex(1),\r\n position: 'relative',\r\n paddingTop: '48px',\r\n '& .target-image-wrapper': {\r\n width: '100%',\r\n backgroundImage: 'linear-gradient(45deg, #EBEBEB 25%, transparent 25%), linear-gradient(-45deg, #EBEBEB 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EBEBEB 75%), linear-gradient(-45deg, transparent 75%, #EBEBEB 75%)',\r\n backgroundSize: '40px 40px',\r\n backgroundPosition: '0px 0px, 0px 20px, 20px -20px, -20px 0px',\r\n backgroundColor: '#FAFAFA',\r\n position: 'relative',\r\n '& .loading-mask': {\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n opacity: 0.4,\r\n backgroundColor: '#E6E6E6',\r\n backgroundImage: 'linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, #47CFFA 50%, #B47CF8 100%)',\r\n top: 0,\r\n left: 0,\r\n },\r\n },\r\n '& .notification-content': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n ...shorthands.gap('4px'),\r\n },\r\n '& .dismiss-icon': {\r\n color: tokens.colorStatusDangerForeground1,\r\n },\r\n '& .check-mark-icon': {\r\n color: '#107C10',\r\n },\r\n '& .spinner-icon': {\r\n width: '16px',\r\n animationDuration: '1s',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n animationName: [{\r\n from: { transform: 'rotate(0deg)' },\r\n to: { transform: 'rotate(360deg)' },\r\n }],\r\n },\r\n },\r\n '& .prompt-control': {\r\n width: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n ...shorthands.padding('0px', '16px'),\r\n '& .loading-section': {\r\n width: '100%',\r\n marginTop: '16px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n ...shorthands.gap('8px'),\r\n color: tokens.colorNeutralForeground3Hover,\r\n },\r\n '& .prompt-example': {\r\n '& .example-image-list-label': {\r\n marginTop: '11px',\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n },\r\n '& .background-change-prompt': {\r\n marginTop: '24px',\r\n width: '100%',\r\n '& .prompt-title': {\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n marginBottom: '8px',\r\n },\r\n '& .prompt-editor': {\r\n position: 'relative',\r\n '& .prompt-textarea': {\r\n width: '100%',\r\n borderRadius: '8px',\r\n paddingBottom: '42px',\r\n paddingTop: '6px',\r\n ...shorthands.overflow('hidden'),\r\n '& textarea': {\r\n minHeight: '75px',\r\n },\r\n '&::after': {\r\n height: '4px',\r\n clipPath: 'none',\r\n backgroundColor: '#464feb',\r\n borderColor: '#464feb',\r\n },\r\n },\r\n '& .action-bar': {\r\n position: 'absolute',\r\n bottom: '12px',\r\n right: '12px',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import { makeResetStyles } from '@fluentui/react-components';\r\n\r\nexport const useObjectSelectionStyles = makeResetStyles({\r\n '& .image-wrapper': {\r\n position: 'relative',\r\n width: '100%',\r\n '& img': {\r\n width: '100%',\r\n objectFit: 'contain',\r\n },\r\n '& div': {\r\n width: '100%',\r\n },\r\n '& .original-image': {\r\n },\r\n '& .cover-original-image': {\r\n backgroundImage: 'linear-gradient(90deg, rgba(70, 79, 235, 0.75) 0%, rgba(180, 124, 248, 0.75) 100%)',\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n },\r\n '& .loading-segmentations-image': {\r\n backgroundImage: 'linear-gradient(90deg, rgba(70, 79, 235, 0.75) 0%, rgba(180, 124, 248, 0.75) 100%)',\r\n animationDuration: '3s',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n animationName: [{\r\n from: { backgroundPosition: '0%' }, // The whole background is 800% and we use only the 0-7 range\r\n to: { backgroundPosition: '100%' },\r\n }],\r\n position: 'absolute',\r\n backgroundSize: '400%',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n },\r\n '& .selected-image': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n },\r\n '& .border-image': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n },\r\n '& .highlighted-image': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n },\r\n },\r\n});\r\n\r\n","import React, { useRef, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n mergeClasses,\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogBody,\r\n DialogActions,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport {\r\n Dismiss20Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n HiddenDivForAnnounce,\r\n ObjectSelectionImageView,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useObjectSelectionStyles } from './style';\r\n\r\nconst DialogForObjectSelection = (props) => {\r\n const {\r\n i18n,\r\n open,\r\n setOpen,\r\n updateSubject,\r\n objectSelectionError,\r\n } = props;\r\n\r\n return (\r\n {\r\n // it is the users responsibility to react accordingly to the open state change\r\n setOpen(data.open);\r\n }}\r\n >\r\n \r\n \r\n } onClick={() => setOpen(false)} />}>{i18n.getString(_TL_('Save before continuing?'))}\r\n \r\n {i18n.getString(_TL_('Either save you changes or go back and keep editing'))}\r\n \r\n \r\n \r\n {\r\n updateSubject();\r\n setOpen(false);\r\n }}\r\n disabled={objectSelectionError && objectSelectionError !== ''}\r\n >\r\n {i18n.getString(_TL_('Save'))}\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\nexport const ObjectSelectionView = ({\r\n i18n,\r\n originalImageUrl,\r\n originalImageHeight,\r\n originalImageWidth,\r\n getMaskValueAtPoint,\r\n updateHighlightedImage,\r\n isFetchingSegmentations,\r\n toggleSelectedMask,\r\n buttonsRef,\r\n borderImageSrc,\r\n updateSubject,\r\n workingSelectedImageSrc,\r\n highlightedImageSrc,\r\n objectSelectionError,\r\n maskValues,\r\n logger,\r\n}) => {\r\n // get image from offscreen canvas\r\n // draw the canvas in the front\r\n const imageContainer = useRef(null);\r\n\r\n const [openEscape, setOpenEscape] = React.useState(false);\r\n\r\n const mouseOutsideHandler = useCallback((e) => {\r\n const imageWrapper = imageContainer.current && imageContainer.current.querySelector('.image-wrapper');\r\n if (imageWrapper && !imageWrapper.contains(e.target)\r\n && buttonsRef.current && !buttonsRef.current.contains(e.target)) {\r\n setOpenEscape(true);\r\n }\r\n }, [buttonsRef]);\r\n\r\n useEffect(() => {\r\n document.addEventListener('mousedown', mouseOutsideHandler);\r\n return () => {\r\n document.removeEventListener('mousedown', mouseOutsideHandler);\r\n };\r\n }, [mouseOutsideHandler]);\r\n\r\n const classes = useObjectSelectionStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\n\r\nObjectSelectionView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n originalImageUrl: PropTypes.string.isRequired,\r\n originalImageHeight: PropTypes.number.isRequired,\r\n originalImageWidth: PropTypes.number.isRequired,\r\n getMaskValueAtPoint: PropTypes.func.isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n isFetchingSegmentations: PropTypes.bool.isRequired,\r\n};\r\n\r\nObjectSelectionView.defaultProps = {\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useExampleImageListStyles = makeStyles({\r\n exampleImageList: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n width: '100%',\r\n ...shorthands.overflow('hidden'),\r\n ...shorthands.gap('6px'),\r\n },\r\n});\r\n\r\nexport const useExampleImageCellStyles = makeStyles({\r\n exampleImageCell: {\r\n width: 'calc(50% - 3px)', // 3px is half the gap between cells\r\n ...shorthands.borderRadius('6px'),\r\n ...shorthands.overflow('hidden'),\r\n position: 'relative',\r\n\r\n '& img': {\r\n width: '100%',\r\n height: '100%',\r\n objectFit: 'cover',\r\n },\r\n\r\n '&:focus .example-image-list-cell-overlay, &:hover .example-image-list-cell-overlay': {\r\n visibility: 'visible',\r\n animationDuration: '0.2s, 0.5s',\r\n animationTimingFunction: 'ease-in-out, linear',\r\n animationName: [{\r\n from: { transform: 'translateY(100%)' },\r\n to: { transform: 'translateY(0%)' },\r\n }, {\r\n from: { opacity: 0 },\r\n to: { opacity: 1 },\r\n }],\r\n },\r\n\r\n '& .example-image-list-cell-overlay': {\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n visibility: 'hidden',\r\n opacity: 0.8,\r\n\r\n '& .overlay-gradient': {\r\n ...shorthands.flex(1),\r\n alignSelf: 'stretch',\r\n backgroundImage: 'linear-gradient(180deg, rgba(49, 34, 34, 0.20) 44.79%, rgba(49, 34, 34, 0.90) 76.04%, #312222 100%);',\r\n },\r\n\r\n '& .overlay-solid': {\r\n backgroundColor: '#312222',\r\n height: '25%',\r\n flexShrink: 0,\r\n alignSelf: 'stretch',\r\n },\r\n\r\n '& .example-prompt-template': {\r\n width: '100%',\r\n height: '100%',\r\n minWidth: '100px',\r\n minHeight: '100px',\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n ...shorthands.padding('8px'),\r\n\r\n color: '#FFF',\r\n fontSize: 14,\r\n fontStyle: 'normal',\r\n fontWeight: 600,\r\n lineHeight: 'normal',\r\n '& .multi-line-hidden-text': {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n ...shorthands.padding('8px'),\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\n","import {\r\n ExampleImageListWithoutStyle,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport {\r\n withOverridableStyles,\r\n} from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { useExampleImageListStyles } from './style';\r\n\r\nexport const ExampleImageList = withOverridableStyles(ExampleImageListWithoutStyle, useExampleImageListStyles);\r\n","import {\r\n ExampleImageCellWithoutStyle,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport {\r\n withOverridableStyles,\r\n} from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { useExampleImageCellStyles } from './style';\r\n\r\nexport const ExampleImageCell = withOverridableStyles(ExampleImageCellWithoutStyle, useExampleImageCellStyles);\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const getGenerationHistoryListStyles = makeStyles({\r\n paddleBtn: {\r\n ...shorthands.borderRadius('99px'),\r\n color: tokens.colorNeutralForeground2BrandHover,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n marginRight: '2px',\r\n },\r\n paddleBtnRight: {\r\n ...shorthands.borderRadius('99px'),\r\n color: tokens.colorNeutralForeground2BrandHover,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n },\r\n historyListRoot: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n alignSelf: 'stretch',\r\n marginTop: '24px',\r\n paddingTop: '16px',\r\n ...shorthands.borderTop('1px', 'solid', '#DFDFDF'),\r\n ...shorthands.overflow('hidden'),\r\n\r\n '& .history-list-title-container': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n marginBottom: '5px',\r\n alignItems: 'center',\r\n\r\n '& .history-icon': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n width: '16px',\r\n height: '16px',\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n '& .history-title': {\r\n marginLeft: '4px',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n fontWeight: 600,\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n },\r\n\r\n '& .history-list-container': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n width: '100%',\r\n position: 'relative',\r\n '& .right-icon-hint': {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n backgroundImage: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: '20px',\r\n height: '80px',\r\n right: '32px',\r\n },\r\n\r\n '& .left-icon-hint': {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n backgroundImage: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: '30px',\r\n height: '80px',\r\n left: '34px',\r\n transform: 'rotate(-180deg)',\r\n },\r\n\r\n '& .history-list-images-container': {\r\n flexGrow: 1,\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.overflow('hidden'),\r\n width: '100%',\r\n\r\n '& .history-list-images': {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n position: 'relative',\r\n },\r\n '& .history-item-root': {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n width: '96px',\r\n height: '86px',\r\n ...shorthands.borderRadius('9px'),\r\n ...shorthands.border('2px', 'solid', 'white'),\r\n\r\n '&.selected': {\r\n ...shorthands.border('2px', 'solid', tokens.colorBrandForeground1),\r\n },\r\n\r\n '& .history-item': {\r\n width: '90px',\r\n height: '80px',\r\n ...shorthands.borderRadius('6px'),\r\n ...shorthands.overflow('hidden'),\r\n\r\n '& img': {\r\n width: '100%',\r\n height: '100%',\r\n objectFit: 'cover',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n withOverridableStyles,\r\n HistoryListImages,\r\n} from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport {\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n History20Regular,\r\n} from '@fluentui/react-icons';\r\n\r\nimport { getGenerationHistoryListStyles } from './generation-history-list-styles';\r\n\r\n\r\nconst HistoryListImpl = ({\r\n selectedIndex,\r\n historyList,\r\n onSelectHistory,\r\n i18n,\r\n classes,\r\n}) => {\r\n const onClick = useCallback((index) => {\r\n onSelectHistory(historyList[index], index);\r\n }, [historyList, onSelectHistory]);\r\n\r\n const onKeyDown = useCallback((index, ev) => {\r\n if (ev.keyCode === 'Enter') {\r\n onClick(index);\r\n }\r\n }, [onClick]);\r\n\r\n return (\r\n
\r\n
\r\n \r\n
{i18n.getString(_TL_('History'))}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nHistoryListImpl.propTypes = {\r\n selectedIndex: PropTypes.number,\r\n historyList: PropTypes.arrayOf(PropTypes.shape({})),\r\n onSelectHistory: PropTypes.func,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nHistoryListImpl.defaultProps = {\r\n selectedIndex: -1,\r\n historyList: [],\r\n onSelectHistory: () => {},\r\n};\r\n\r\nexport const GenerationHistoryList = withOverridableStyles(HistoryListImpl, getGenerationHistoryListStyles);\r\n","import React from 'react';\r\nimport { Label, Text, useId } from '@fluentui/react-components';\r\nimport {\r\n LoadingIndicator, PromptEditor, MAX_PROMPT_LENGTH,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ExampleImageList, ExampleImageCell } from '../example-image';\r\nimport { GenerationHistoryList } from '../history-list';\r\n\r\nexport const PromptControl = (props) => {\r\n const {\r\n i18n,\r\n generate,\r\n prompt,\r\n setPrompt,\r\n isGenerating,\r\n onSelectExampleImage,\r\n MultiLineEllipsisText,\r\n historyList,\r\n onSelectHistory,\r\n selectedHistoryIndex,\r\n disabled,\r\n } = props;\r\n\r\n const exampleImageId = useId('example-image-list');\r\n\r\n return (\r\n
\r\n
\r\n MAX_PROMPT_LENGTH || disabled}\r\n placeholder={i18n.getString(_TL_('Describe the background you want. You can use the examples on the below for inspiration.'))}\r\n />\r\n
\r\n {isGenerating &&\r\n
\r\n \r\n {i18n.getString(_TL_('Creating background images with AI'))}\r\n
}\r\n {!isGenerating && (\r\n
\r\n \r\n \r\n
)}\r\n {!isGenerating && historyList && historyList.length > 0 && (\r\n )}\r\n
\r\n );\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const getImageShimmerStyles = makeStyles({\r\n imageShimmerRoot: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignItems: 'center',\r\n ...shorthands.overflow('hidden'),\r\n backgroundSize: '400% 100%',\r\n animationDuration: '1.5s',\r\n animationTimingFunction: 'ease-in-out',\r\n animationDirection: 'alternate',\r\n animationIterationCount: 'infinite',\r\n animationName: [{\r\n from: { backgroundPosition: '0%' },\r\n to: { backgroundPosition: '100%' },\r\n }],\r\n },\r\n});\r\n\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n withOverridableStyles,\r\n} from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { getImageShimmerStyles } from './style';\r\n\r\nconst ImageShimmerImpl = ({ className, classes }) => (\r\n
\r\n);\r\n\r\nImageShimmerImpl.propTypes = {\r\n className: PropTypes.string,\r\n classes: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nImageShimmerImpl.defaultProps = {\r\n className: undefined,\r\n};\r\n\r\nexport const ImageShimmer = withOverridableStyles(ImageShimmerImpl, getImageShimmerStyles);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { makeStyles, mergeClasses } from '@fluentui/react-components';\r\nimport { ImageShimmer } from './image-shimmer';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n backgroundImage: 'linear-gradient(45deg, #EBEBEB 25%, transparent 25%), linear-gradient(-45deg, #EBEBEB 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EBEBEB 75%), linear-gradient(-45deg, transparent 75%, #EBEBEB 75%)',\r\n backgroundSize: '40px 40px',\r\n backgroundPositionX: '0px, 0px, 20px, -20px',\r\n backgroundPositionY: '0px, 20px, -20px, 0px',\r\n backgroundColor: '#FAFAFA',\r\n position: 'relative',\r\n lineHeight: 0,\r\n },\r\n mask: {\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n opacity: 0.4,\r\n backgroundColor: '#E6E6E6',\r\n backgroundImage: 'linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, #47CFFA 50%, #B47CF8 100%)',\r\n top: 0,\r\n left: 0,\r\n },\r\n});\r\n\r\n\r\nexport const ImageWithShimmer = ({ targetImage, showShimmer, className }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \"targetImage\"\r\n {showShimmer && }\r\n
\r\n );\r\n};\r\n\r\nImageWithShimmer.propTypes = {\r\n targetImage: PropTypes.string.isRequired,\r\n showShimmer: PropTypes.bool,\r\n className: PropTypes.string,\r\n};\r\n\r\nImageWithShimmer.defaultProps = {\r\n showShimmer: false,\r\n className: '',\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport { Text } from '@fluentui/react-components';\r\nimport {\r\n DismissCircle16Filled,\r\n Checkmark20Regular,\r\n Dismiss20Regular,\r\n ImageEdit20Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n MAX_PROMPT_LENGTH,\r\n HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { ObjectSelectionView } from './object-selection';\r\nimport { PromptControl } from './prompt-control';\r\nimport { useObjectSelection } from '../../model/background-change/use-object-selection';\r\nimport { ImageWithShimmer } from '../../../image-with-shimmer';\r\n\r\nconst HISTORY_LIST_MAX_LENGTH = 10;\r\n\r\n\r\nconst ImageToUpdate = (props) => {\r\n const {\r\n targetImage,\r\n imageUrlWithoutBackground,\r\n i18n,\r\n } = props;\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst state = {\r\n ObjectSelection: 'ObjectSelection',\r\n StaticImage: 'StaticImage',\r\n};\r\n\r\nexport const usePromptControlViewFactoryWithState = (props) => {\r\n const {\r\n i18n,\r\n image,\r\n segmentationMasks,\r\n imageUrlWithoutBackground,\r\n setSelectedImageSrc,\r\n selectedMasks,\r\n setSelectedMasks,\r\n selectedImageSrc,\r\n maskValues,\r\n buttonsRef,\r\n setNotificationConfig,\r\n getMaskValueAtPoint,\r\n logger,\r\n generateBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n fetchSegmentationError,\r\n isRemovingBackground,\r\n isFetchingSegmentations,\r\n goToImageAdjustView,\r\n MultiLineEllipsisText,\r\n applyImage,\r\n } = props;\r\n\r\n const [showLearnMore, setShowLearnMore] = useState(false);\r\n const [prompt, setPrompt] = useState(null);\r\n const [isGenerating, setIsGenerating] = useState(false);\r\n // initial error message is null, after generating, it will be set to '' or error message\r\n const [errorMessage, setErrorMessage] = useState(null);\r\n\r\n const {\r\n // mask\r\n borderImageSrc,\r\n toggleSelectedMask,\r\n highlightedImageSrc,\r\n workingSelectedImageSrc,\r\n updateHighlightedImage,\r\n updateSubject,\r\n objectSelectionError,\r\n startOver,\r\n } = useObjectSelection({\r\n originalImageUrl: image.url,\r\n originalImageWidth: image.width,\r\n originalImageHeight: image.height,\r\n segmentationMasks,\r\n imageUrlWithoutBackground,\r\n setSelectedImageSrc,\r\n selectedMasks,\r\n setSelectedMasks,\r\n i18n,\r\n });\r\n\r\n const [activeState, setActiveState] = useState(state.StaticImage);\r\n const [showRemoved, setShowRemoved] = useState(true);\r\n\r\n const dismissNotification = useCallback(() => {\r\n setNotificationConfig(null);\r\n }, [setNotificationConfig]);\r\n\r\n const goToStaticImage = useCallback(() => {\r\n dismissNotification();\r\n setActiveState(state.StaticImage);\r\n }, [dismissNotification]);\r\n\r\n const goToObjectSelection = useCallback(() => {\r\n dismissNotification();\r\n setActiveState(state.ObjectSelection);\r\n }, [dismissNotification]);\r\n\r\n const wrappedUpdateSubject = useCallback(() => {\r\n updateSubject();\r\n goToStaticImage();\r\n setShowRemoved(true);\r\n }, [goToStaticImage, updateSubject]);\r\n\r\n useEffect(() => {\r\n if (imageUrlWithGeneratedBackground) {\r\n setShowRemoved(false);\r\n }\r\n }, [imageUrlWithGeneratedBackground]);\r\n\r\n useEffect(() => {\r\n if (prompt && prompt.length > MAX_PROMPT_LENGTH) {\r\n setErrorMessage(i18n.getString(_TL_('Prompt must be less than 200 characters')));\r\n } else if (prompt) {\r\n setErrorMessage('');\r\n }\r\n }, [prompt, i18n]);\r\n\r\n const onSelectExampleImage = useCallback((promptText) => {\r\n if (promptText && promptText !== prompt) {\r\n setPrompt(promptText);\r\n logger.logTrace('Copilot change image background - static example image clicked', { promptText });\r\n }\r\n }, [logger, prompt]);\r\n\r\n const [historyList, setHistoryList] = useState({\r\n list: [],\r\n selectedHistoryIndex: -1,\r\n });\r\n\r\n const onSelectHistory = useCallback((historyData, index) => {\r\n const { promptValue: pv, imageUrl } = historyData || {};\r\n if (pv && imageUrl) {\r\n setPrompt(pv);\r\n setHistoryList({ ...historyList, selectedHistoryIndex: index });\r\n }\r\n }, [historyList]);\r\n\r\n const addNewHistory = useCallback((pPromptValue, generatedImageUrl) => {\r\n let newHistoryList = [...historyList.list];\r\n if (newHistoryList.length >= HISTORY_LIST_MAX_LENGTH) {\r\n newHistoryList = newHistoryList.slice(1);\r\n }\r\n newHistoryList.unshift({ promptValue: pPromptValue, imageUrl: generatedImageUrl });\r\n setHistoryList({\r\n list: newHistoryList,\r\n selectedHistoryIndex: 0,\r\n });\r\n }, [historyList]);\r\n\r\n const generate = useCallback(() => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('background change: generate button clicked', { prompt });\r\n }\r\n setIsGenerating(true);\r\n setErrorMessage('');\r\n setShowLearnMore(false);\r\n generateBackground({\r\n prompt,\r\n imageUrl: image.url,\r\n imageWidth: image.width,\r\n imageHeight: image.height,\r\n }).then((imgUrl) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('background change: generate success', { prompt, generatedUrl: imgUrl });\r\n }\r\n addNewHistory(prompt, imgUrl);\r\n }).catch((error) => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('background change: generate image failed', { error, prompt });\r\n }\r\n setErrorMessage(i18n.getString(error.uxMessage));\r\n if (error.availableActions && error.availableActions.gotoDisallowedContent) {\r\n setShowLearnMore(true);\r\n }\r\n }).finally(() => {\r\n setIsGenerating(false);\r\n });\r\n }, [addNewHistory, generateBackground, i18n, image.height, image.url, image.width, logger, prompt]);\r\n\r\n const curGeneratedImageUrl = useMemo(() => {\r\n const {\r\n list,\r\n selectedHistoryIndex,\r\n } = historyList;\r\n if (selectedHistoryIndex >= 0 && selectedHistoryIndex < list.length) {\r\n if (list[selectedHistoryIndex].imageUrl !== imageUrlWithGeneratedBackground) {\r\n setImageUrlWithGeneratedBackground(list[selectedHistoryIndex].imageUrl);\r\n }\r\n return list[selectedHistoryIndex].imageUrl;\r\n }\r\n return imageUrlWithGeneratedBackground;\r\n }, [historyList, imageUrlWithGeneratedBackground, setImageUrlWithGeneratedBackground]);\r\n\r\n const DisallowedContent = useMemo(() => (showLearnMore ? (\r\n \r\n \r\n {i18n.getString(_TL_('Disallowed content'))}\r\n \r\n \r\n ) : null), [i18n, showLearnMore]);\r\n\r\n const renderErrorNotificationConfig = useCallback(({\r\n message,\r\n others,\r\n }) => {\r\n const content = (\r\n
\r\n {message}\r\n {others || null}\r\n
\r\n );\r\n return ({\r\n icon: ,\r\n content,\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n // state 1: fetching segmentation\r\n if (fetchSegmentationError !== '') {\r\n setNotificationConfig(renderErrorNotificationConfig({ message: fetchSegmentationError }));\r\n }\r\n // state 2: object selection with fetched segmentation\r\n if (activeState === state.ObjectSelection) {\r\n if (objectSelectionError && objectSelectionError !== '') {\r\n setNotificationConfig(renderErrorNotificationConfig({ message: objectSelectionError }));\r\n } else if (objectSelectionError === '') {\r\n dismissNotification();\r\n }\r\n }\r\n // state 3: static image with fetched segmentation\r\n if (!isRemovingBackground && activeState === state.StaticImage && fetchSegmentationError === '') {\r\n if (errorMessage && errorMessage !== '') {\r\n setNotificationConfig(renderErrorNotificationConfig({ message: errorMessage, others: DisallowedContent }));\r\n } else if (errorMessage === '') {\r\n dismissNotification();\r\n }\r\n }\r\n }, [DisallowedContent, activeState, dismissNotification, errorMessage, fetchSegmentationError, isRemovingBackground, objectSelectionError, renderErrorNotificationConfig, setNotificationConfig]);\r\n\r\n const cancelUpdateSubject = useCallback(() => {\r\n startOver();\r\n goToStaticImage();\r\n }, [goToStaticImage, startOver]);\r\n\r\n const updateImage = useCallback(() => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('background change: apply new image', { url: imageUrlWithGeneratedBackground });\r\n }\r\n applyImage({ url: imageUrlWithGeneratedBackground });\r\n }, [applyImage, imageUrlWithGeneratedBackground, logger]);\r\n\r\n const cancelBackgroundChange = useCallback(() => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('background change: cancel');\r\n }\r\n goToImageAdjustView();\r\n }, [goToImageAdjustView, logger]);\r\n\r\n const buttonSettingConfig = {\r\n [state.ObjectSelection]: [{\r\n text: i18n.getString(_TL_('Update subject')),\r\n icon: Checkmark20Regular,\r\n onClick: wrappedUpdateSubject,\r\n disabled: objectSelectionError && objectSelectionError !== '',\r\n }, {\r\n text: i18n.getString(_TL_('Cancel')),\r\n icon: Dismiss20Regular,\r\n onClick: cancelUpdateSubject,\r\n }],\r\n [state.StaticImage]: [{\r\n text: i18n.getString(_TL_('Apply background')),\r\n icon: Checkmark20Regular,\r\n onClick: updateImage,\r\n disabled: isGenerating || isRemovingBackground || (errorMessage && errorMessage !== '') || fetchSegmentationError !== '' || !imageUrlWithGeneratedBackground,\r\n }, {\r\n text: i18n.getString(_TL_('Cancel')),\r\n icon: Dismiss20Regular,\r\n onClick: cancelBackgroundChange,\r\n }, {\r\n text: i18n.getString(_TL_('Edit subject area')),\r\n icon: ImageEdit20Regular,\r\n onClick: goToObjectSelection,\r\n disabled: isGenerating || isRemovingBackground || fetchSegmentationError !== '',\r\n }],\r\n };\r\n\r\n const targetImage = useMemo(() => {\r\n if (showRemoved) {\r\n return selectedImageSrc || imageUrlWithoutBackground || curGeneratedImageUrl || image.url;\r\n }\r\n return curGeneratedImageUrl || selectedImageSrc || imageUrlWithoutBackground || image.url;\r\n }, [curGeneratedImageUrl, image.url, imageUrlWithoutBackground, selectedImageSrc, showRemoved]);\r\n\r\n const imageSetting = {\r\n [state.ObjectSelection]: ,\r\n [state.StaticImage]: ,\r\n };\r\n\r\n const promptControlView = ();\r\n\r\n return {\r\n promptControlView,\r\n buttonsConfig: buttonSettingConfig[activeState],\r\n imageView: imageSetting[activeState],\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport { Promise } from 'bluebird';\r\nimport { useCallback, useEffect, useState } from 'react';\r\nimport {\r\n fetchImgPromise, getImagePixels, createSelectedImageSrc, createHighlightedImage,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const useObjectSelection = ({\r\n originalImageUrl,\r\n originalImageWidth,\r\n originalImageHeight,\r\n segmentationMasks,\r\n imageUrlWithoutBackground,\r\n setSelectedImageSrc,\r\n selectedMasks,\r\n setSelectedMasks,\r\n i18n,\r\n}) => {\r\n const [workingMasks, setWorkingMasks] = useState([]);\r\n const [workingSelectedImageSrc, setWorkingSelectedImageSrc] = useState(null);\r\n const [originalImagePixels, setOriginalImagePixels] = useState(null);\r\n const [initialSelectedImageSrc, setInitialSelectedImageSrc] = useState(null);\r\n const [borderImageSrc, setBorderImageSrc] = useState(null);\r\n const [initialBorderImageSrc, setInitialBorderImageSrc] = useState(null);\r\n const [highlightedImageSrc, setHighlightedImageSrc] = useState(null);\r\n\r\n // initial error message is null, after generating, it will be set to '' or error message\r\n const [objectSelectionError, setObjectSelectionError] = useState(null);\r\n\r\n useEffect(() => {\r\n // Get the original image pixels\r\n if (originalImageUrl) {\r\n fetchImgPromise(originalImageUrl).then((image) => {\r\n const pixels = getImagePixels(image, originalImageWidth, originalImageHeight);\r\n setOriginalImagePixels(pixels);\r\n });\r\n }\r\n }, [originalImageHeight, originalImageWidth, originalImageUrl]);\r\n\r\n\r\n const createSelectedImage = useCallback((selectedImageSrcProp, masks, isAdd) => {\r\n if (originalImagePixels && segmentationMasks) {\r\n return fetchImgPromise(selectedImageSrcProp || originalImageUrl)\r\n .then(image => createSelectedImageSrc(image, originalImageWidth, originalImageHeight, originalImagePixels, segmentationMasks, masks, isAdd, selectedImageSrcProp));\r\n }\r\n return Promise.resolve({\r\n borderImageSrc: null,\r\n selectedImageSrc: null,\r\n });\r\n }, [originalImagePixels, segmentationMasks, originalImageUrl, originalImageWidth, originalImageHeight]);\r\n\r\n useEffect(() => {\r\n if (imageUrlWithoutBackground && segmentationMasks) {\r\n setWorkingMasks(selectedMasks);\r\n createSelectedImage(null, selectedMasks, true).then(({\r\n borderImageSrc: newBorderImageSrc,\r\n selectedImageSrc: newImageSrc,\r\n }) => {\r\n setInitialBorderImageSrc(newBorderImageSrc);\r\n setInitialSelectedImageSrc(newImageSrc);\r\n setBorderImageSrc(newBorderImageSrc);\r\n setWorkingSelectedImageSrc(newImageSrc);\r\n });\r\n }\r\n }, [imageUrlWithoutBackground, segmentationMasks, createSelectedImage, selectedMasks]);\r\n\r\n useEffect(() => {\r\n if (imageUrlWithoutBackground && segmentationMasks) {\r\n if (_.isEmpty(workingMasks)) {\r\n setObjectSelectionError(i18n.getString(_TL_('Please select at least one subject or object you want to keep in the image.')));\r\n } else {\r\n setObjectSelectionError('');\r\n }\r\n }\r\n }, [i18n, imageUrlWithoutBackground, segmentationMasks, workingMasks]);\r\n\r\n const updateHighlightedImage = useCallback((maskValue) => {\r\n const highlightedImage = createHighlightedImage(originalImageWidth, originalImageHeight, originalImagePixels, segmentationMasks, workingMasks, maskValue);\r\n setHighlightedImageSrc(highlightedImage);\r\n }, [originalImageWidth, originalImageHeight, segmentationMasks, workingMasks, originalImagePixels]);\r\n\r\n const toggleSelectedMask = useCallback((maskId) => {\r\n let newMasks = [];\r\n const isAdd = !_.contains(workingMasks, maskId);\r\n if (!isAdd) {\r\n newMasks = _.without(workingMasks, maskId);\r\n } else {\r\n newMasks = [...workingMasks, maskId];\r\n }\r\n setWorkingMasks(_.sortBy(newMasks));\r\n createSelectedImage(workingSelectedImageSrc, [maskId], isAdd).then(({\r\n borderImageSrc: newBorderImageSrc,\r\n selectedImageSrc: newImageSrc,\r\n }) => {\r\n setBorderImageSrc(newBorderImageSrc);\r\n setWorkingSelectedImageSrc(newImageSrc);\r\n });\r\n }, [workingMasks, createSelectedImage, workingSelectedImageSrc]);\r\n\r\n const updateSubject = useCallback(() => {\r\n setSelectedMasks(workingMasks);\r\n setSelectedImageSrc(workingSelectedImageSrc);\r\n }, [setSelectedImageSrc, setSelectedMasks, workingMasks, workingSelectedImageSrc]);\r\n\r\n const startOver = useCallback(() => {\r\n setWorkingSelectedImageSrc(initialSelectedImageSrc);\r\n setBorderImageSrc(initialBorderImageSrc);\r\n setWorkingMasks(selectedMasks);\r\n }, [initialSelectedImageSrc, initialBorderImageSrc, selectedMasks]);\r\n\r\n return {\r\n borderImageSrc,\r\n toggleSelectedMask,\r\n workingSelectedImageSrc,\r\n highlightedImageSrc,\r\n startOver,\r\n updateSubject,\r\n updateHighlightedImage,\r\n objectSelectionError,\r\n workingMasks,\r\n };\r\n};\r\n","import { makeResetStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useColorButtonStyles = makeResetStyles({\r\n width: '34px',\r\n height: '34px',\r\n ...shorthands.borderRadius('9999px'),\r\n ...shorthands.border('1px', 'solid', '#D1D1D1'),\r\n cursor: 'pointer',\r\n ...shorthands.overflow('hidden'),\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport { mergeClasses, Tooltip } from '@fluentui/react-components';\r\nimport { useColorButtonStyles } from './style';\r\n\r\nfunction hexToBase64Color(hexColor) {\r\n // Create a canvas element\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 34;\r\n canvas.height = 34;\r\n\r\n // Get the 2D drawing context\r\n const ctx = canvas.getContext('2d');\r\n if (!ctx) {\r\n throw new Error('Canvas is not supported in this environment');\r\n }\r\n\r\n // Set the fill style to the provided hex color\r\n ctx.fillStyle = hexColor;\r\n\r\n // Fill the canvas with the color\r\n ctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\r\n // Convert the canvas content to a Base64 data URL\r\n const base64Image = canvas.toDataURL('image/png');\r\n\r\n return base64Image;\r\n}\r\n\r\nexport const ColorButton = (props) => {\r\n const {\r\n color,\r\n draw,\r\n ariaLabel,\r\n } = props;\r\n\r\n const colorButtonStyles = useColorButtonStyles(color);\r\n const src = useMemo(() => hexToBase64Color(color), [color]);\r\n\r\n const onKeyDown = (event) => {\r\n if (event.key === 'Enter') {\r\n draw(color, ariaLabel);\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n return (\r\n \r\n\r\n draw(color, ariaLabel)}\r\n onKeyDown={onKeyDown}\r\n tabIndex={0}\r\n aria-label={ariaLabel}\r\n >\r\n \r\n
\r\n \r\n );\r\n};\r\n","import { makeResetStyles, shorthands, tokens, } from '@fluentui/react-components';\r\n\r\nexport const useColorControlStyles = makeResetStyles({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n width: '100%',\r\n '& .eyeDropper': {\r\n width: '100%',\r\n position: 'relative',\r\n height: '148px',\r\n marginTop: '8px',\r\n marginBottom: '20px',\r\n '& .eye-dropper-button': {\r\n position: 'absolute',\r\n right: '20px',\r\n width: '40px',\r\n height: '40px',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n bottom: '20px',\r\n ...shorthands.borderRadius('4px'),\r\n backgroundColor: tokens.colorNeutralBackground1,\r\n boxShadow: '0px 4px 8px 0px rgba(0, 0, 0, 0.14), 0px 0px 2px 0px rgba(0, 0, 0, 0.12)',\r\n },\r\n },\r\n '& .design': {\r\n width: '100%',\r\n ...shorthands.padding('20px', '24px'),\r\n '& .design-title': {\r\n color: tokens.colorNeutralForeground3,\r\n fontWeight: tokens.fontWeightSemibold,\r\n },\r\n '& .design-color-chooser': {\r\n marginTop: '12px',\r\n display: 'flex',\r\n ...shorthands.gap('8px'),\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n '& .selected-color-wrapper': {\r\n width: '40px',\r\n height: '40px',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n ...shorthands.borderRadius('2px'),\r\n backgroundColor: tokens.colorNeutralBackground1Selected,\r\n },\r\n '& .add-color-button': {\r\n width: '32px',\r\n height: '32px',\r\n ...shorthands.borderRadius('9999px'),\r\n ...shorthands.border('2px', 'solid', '#616161'),\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n cursor: 'pointer',\r\n '& svg': {\r\n width: '20px',\r\n height: '20px',\r\n },\r\n },\r\n },\r\n '& .color-picker': {\r\n marginTop: '12px',\r\n '& .ms-ColorPicker-panel': {\r\n padding: 'unset',\r\n },\r\n },\r\n },\r\n '& .suggestion': {\r\n ...shorthands.padding('20px', '24px'),\r\n width: '100%',\r\n '& .suggestion-title': {\r\n color: tokens.colorNeutralForeground3,\r\n fontWeight: tokens.fontWeightSemibold,\r\n },\r\n '& .suggestion-color-chooser': {\r\n marginTop: '12px',\r\n ...shorthands.gap('8px'),\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useState, useCallback, useRef, useEffect } from 'react';\r\nimport { Text, mergeClasses, Tooltip, useId } from '@fluentui/react-components';\r\nimport { debounce } from 'underscore';\r\nimport {\r\n ColorPicker,\r\n getColorFromString,\r\n} from '@fluentui/react';\r\nimport {\r\n AddRegular,\r\n DismissRegular,\r\n Eyedropper20Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ColorButton } from './color-button';\r\nimport { useColorControlStyles } from './style';\r\n\r\nconst colors = [{\r\n color: '#000000',\r\n label: _TL_('Black'),\r\n}, {\r\n color: '#ffffff',\r\n label: _TL_('White'),\r\n}, {\r\n color: '#3a3a3a',\r\n label: _TL_('Dark gray'),\r\n}, {\r\n color: '#757575',\r\n label: _TL_('Gray'),\r\n}, {\r\n color: '#cbcbcb',\r\n label: _TL_('Light gray'),\r\n}, {\r\n color: '#e8e8e8',\r\n label: _TL_('Very light gray'),\r\n}, {\r\n color: '#f3f3f3',\r\n label: _TL_('White smoke color'),\r\n}, {\r\n color: '#d34e84',\r\n label: _TL_('Bright pink'),\r\n}, {\r\n color: '#d44d61',\r\n label: _TL_('Bright red'),\r\n}, {\r\n color: '#d56153',\r\n label: _TL_('Soft red'),\r\n}, {\r\n color: '#d48956',\r\n label: _TL_('Soft orange'),\r\n}, {\r\n color: '#d1d05e',\r\n label: _TL_('Soft yellow'),\r\n}, {\r\n color: '#8ed05d',\r\n label: _TL_('Soft green'),\r\n}, {\r\n color: '#50d15f',\r\n label: _TL_('Light green'),\r\n}, {\r\n color: '#4cd19b',\r\n label: _TL_('Bright green'),\r\n}, {\r\n color: '#47bcce',\r\n label: _TL_('Light cyan'),\r\n}, {\r\n color: '#4793cd',\r\n label: _TL_('Light blue'),\r\n}, {\r\n color: '#4c53cb',\r\n label: _TL_('Light navy'),\r\n}, {\r\n color: '#8e52ca',\r\n label: _TL_('Bright purple'),\r\n}, {\r\n color: '#d14fc8',\r\n label: _TL_('Bright pink'),\r\n}];\r\n\r\nexport const ColorControl = (props) => {\r\n const {\r\n i18n,\r\n color,\r\n lastColor,\r\n draw,\r\n logger,\r\n } = props;\r\n\r\n const colorControlStyles = useColorControlStyles();\r\n const colorPicker = useRef(null);\r\n const addColorButton = useRef(null);\r\n\r\n const [showColorPicker, setShowColorPicker] = useState(false);\r\n const [announcedText, setAnnouncedText] = useState('');\r\n const wrappedDraw = useCallback((colorValue, ariaLabel) => {\r\n draw(colorValue);\r\n setAnnouncedText(i18n.getString(_TL_('Set the color to {{colorValue}}'), { colorValue: ariaLabel || colorValue }));\r\n }, [draw, i18n]);\r\n\r\n const handleKeyDown = (event) => {\r\n if (event.key === 'Tab' && event.shiftKey) {\r\n if (addColorButton.current) {\r\n addColorButton.current.focus();\r\n }\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n const toggleColorPicker = () => {\r\n setShowColorPicker(!showColorPicker);\r\n };\r\n\r\n useEffect(() => {\r\n if (showColorPicker && colorPicker.current) {\r\n const target = colorPicker.current.querySelector('.ms-ColorPicker-colorRect');\r\n target.focus();\r\n target.addEventListener('keydown', handleKeyDown);\r\n return () => {\r\n target.removeEventListener('keydown', handleKeyDown);\r\n };\r\n }\r\n return () => {};\r\n }, [showColorPicker]);\r\n\r\n const onAddKeyDown = (event) => {\r\n if (event.key === 'Enter') {\r\n toggleColorPicker();\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n const logSetColorHelper = useCallback((message, data) => {\r\n logger.logTrace(`background change: set the color: ${message}`, data);\r\n }, [logger]);\r\n\r\n const sampleColor = async () => {\r\n if ('EyeDropper' in window) {\r\n // eslint-disable-next-line no-undef\r\n const ed = new EyeDropper();\r\n logger.logTrace('background change: open the eye dropper');\r\n setAnnouncedText(i18n.getString(_TL_('Open eye dropper component to extract color.')));\r\n const newColor = await ed.open();\r\n if (newColor) {\r\n logSetColorHelper('eye dropper color', { color: newColor.sRGBHex });\r\n wrappedDraw(newColor.sRGBHex);\r\n }\r\n }\r\n };\r\n\r\n const onEyeDropperKeyDown = async (event) => {\r\n if (event.key === 'Enter') {\r\n await sampleColor();\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n const debouncedDraw = useMemo(() => debounce(draw, 250), [draw]);\r\n const selectedColorId = useId('selected-color');\r\n const suggestedColorId = useId('suggested-color');\r\n\r\n return (\r\n
\r\n
\r\n {'EyeDropper' in window ?\r\n \r\n
\r\n \r\n
\r\n : null\r\n }\r\n
\r\n
\r\n {i18n.getString(_TL_('Colors used in the image'))}\r\n
\r\n \r\n \r\n {showColorPicker ? : }\r\n
\r\n \r\n
\r\n {\r\n wrappedDraw(colorValue, ariaLabel);\r\n logSetColorHelper('the selected color', { color: ariaLabel || colorValue });\r\n }}\r\n ariaLabel={i18n.getString(_TL_('Selected color'))}\r\n />\r\n
\r\n {\r\n wrappedDraw(colorValue, ariaLabel);\r\n logSetColorHelper('the last selected color', { color: ariaLabel || colorValue });\r\n }}\r\n ariaLabel={i18n.getString(_TL_('Last used color'))}\r\n />\r\n
\r\n {showColorPicker &&\r\n
\r\n {\r\n debouncedDraw(colorObject.str);\r\n logSetColorHelper('the color picker color', { color: colorObject.str });\r\n setAnnouncedText(i18n.getString(_TL_('Set the color to {{colorValue}}'), { colorValue: colorObject.str }));\r\n }}\r\n alphaType=\"none\"\r\n showPreview\r\n strings={{\r\n // By default, the sliders will use the text field labels as their aria labels.\r\n // Previously this example had more detailed instructions in the labels, but this is\r\n // a bad practice and not recommended. Labels should be concise, and match visible text when possible.\r\n hueAriaLabel: i18n.getString(_TL_('Hue')),\r\n alphaLabel: i18n.getString(_TL_('Alpha')),\r\n greenLabel: i18n.getString(_TL_('Green')),\r\n blueLabel: i18n.getString(_TL_('Blue')),\r\n redLabel: i18n.getString(_TL_('Red')),\r\n }}\r\n />\r\n
}\r\n
\r\n {!showColorPicker &&\r\n
\r\n {i18n.getString(_TL_('Suggestions'))}\r\n
\r\n {\r\n colors.map(item => (\r\n {\r\n wrappedDraw(colorValue, ariaLabel);\r\n logSetColorHelper('the suggested color', { color: ariaLabel || colorValue });\r\n }}\r\n ariaLabel={i18n.getString(item.label)}\r\n />\r\n ))\r\n }\r\n
\r\n
}\r\n \r\n \r\n );\r\n};\r\n","import React, { useEffect, useState, useCallback } from 'react';\r\nimport {\r\n Checkmark20Regular,\r\n Dismiss20Regular,\r\n} from '@fluentui/react-icons';\r\nimport { ColorControl } from './color-control';\r\nimport { ImageWithShimmer } from '../../../image-with-shimmer';\r\n\r\nconst ImageToUpdate = (props) => {\r\n const {\r\n targetImage,\r\n isDrawing,\r\n } = props;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport const useColorControlViewFactoryWithState = (props) => {\r\n const {\r\n selectedImageSrc,\r\n imageUrlWithoutBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n goToImageAdjustView,\r\n image,\r\n i18n,\r\n applyImage,\r\n logger,\r\n } = props;\r\n\r\n const [color, setColor] = useState('#4285f4');\r\n const [lastColor, setLastColor] = useState(color);\r\n const [isDrawing, setIsDrawing] = useState(false);\r\n\r\n const draw = (targetColor) => {\r\n setLastColor(color);\r\n setColor(targetColor);\r\n };\r\n\r\n useEffect(() => {\r\n setIsDrawing(true);\r\n drawColorBackground(color, image.width, image.height).then(() => { setIsDrawing(false); });\r\n }, [color, drawColorBackground, image.height, image.width]);\r\n\r\n const updateImage = useCallback(() => {\r\n logger.logTrace('background change: apply the color background', { color });\r\n applyImage({ url: imageUrlWithColoredBackground }, true);\r\n }, [applyImage, color, imageUrlWithColoredBackground, logger]);\r\n\r\n return {\r\n colorControlView: (\r\n \r\n ),\r\n buttonsConfig: [{\r\n text: i18n.getString(_TL_('Apply')),\r\n icon: Checkmark20Regular,\r\n onClick: updateImage,\r\n disabled: isDrawing,\r\n }, {\r\n text: i18n.getString(_TL_('Cancel')),\r\n icon: Dismiss20Regular,\r\n onClick: goToImageAdjustView,\r\n }],\r\n imageView: (),\r\n };\r\n};\r\n","import React, { useMemo, useState, useEffect, useCallback, useRef } from 'react';\r\nimport { Text } from '@fluentui/react-components';\r\nimport {\r\n CheckmarkCircle16Filled,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n SpinnerIcon,\r\n HiddenDivForAnnounce,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { usePromptControlViewFactoryWithState } from './prompt-control-state';\r\nimport { useColorControlViewFactoryWithState } from './color-control-state';\r\n\r\nexport const tabs = {\r\n AI: 'AI',\r\n SolidColor: 'SolidColor',\r\n};\r\n\r\n\r\nexport const useControlViewFactoryWithState = ({\r\n i18n,\r\n originalImage,\r\n resultImage,\r\n imageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n segmentationMasks,\r\n getSegmentations,\r\n generateBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n isFetchingSegmentations,\r\n fetchSegmentationError,\r\n goToImageAdjustView,\r\n selectedMasks,\r\n setSelectedMasks,\r\n setSelectedImageSrc,\r\n maskValues,\r\n MultiLineEllipsisText,\r\n selectedImageSrc,\r\n getMaskValueAtPoint,\r\n logger,\r\n applyImage,\r\n}) => {\r\n // Generate the image with the removed background (once when entering the page)\r\n const [isCallRemovingBackground, setIsCallRemovingBackground] = useState(true);\r\n const isRemovingBackground = useMemo(() =>\r\n isCallRemovingBackground || isFetchingSegmentations, [isCallRemovingBackground, isFetchingSegmentations]);\r\n\r\n const [notificationConfig, setNotificationConfig] = useState(null);\r\n const [selectedTab, setSelectedTab] = useState(tabs.AI);\r\n\r\n const dismissNotification = useCallback(() => {\r\n setNotificationConfig(null);\r\n }, []);\r\n\r\n const onTabSelect = useCallback((event, tab) => {\r\n dismissNotification();\r\n logger.logTrace('background change: switch the tab', { tab: tab.value });\r\n setSelectedTab(tab.value);\r\n }, [dismissNotification, logger]);\r\n\r\n const buttonsRef = useRef(null);\r\n const image = useMemo(() => ({\r\n url: originalImage.url,\r\n width: originalImage.width,\r\n height: originalImage.height,\r\n }), [originalImage]);\r\n\r\n const removingBackgroundNotificationConfig = useMemo(() => ({\r\n icon: ,\r\n content: (\r\n <>\r\n {i18n.getString(_TL_('Removing background'))}\r\n \r\n \r\n ),\r\n }), [i18n]);\r\n\r\n const backgroundRemovedNotificationConfig = useMemo(() => {\r\n const content = (\r\n
\r\n {i18n.getString(_TL_('We\\'ve removed the background. '))}\r\n {i18n.getString(_TL_('You can refine the subject area to keep or remove certain subjects and objects by selecting Edit subject area.'))}\r\n \r\n
\r\n );\r\n return ({\r\n icon: ,\r\n content,\r\n onDismiss: dismissNotification,\r\n dismissAriaLabel: i18n.getString(_TL_('Close')),\r\n });\r\n }, [dismissNotification, i18n]);\r\n\r\n // fetch the segmentation when entering the page\r\n useEffect(() => {\r\n setIsCallRemovingBackground(true);\r\n setNotificationConfig(removingBackgroundNotificationConfig);\r\n if (image.url) {\r\n getSegmentations({\r\n imageUrl: image.url,\r\n imageWidth: image.width,\r\n imageHeight: image.height,\r\n }).then(() => {\r\n setIsCallRemovingBackground(false);\r\n setNotificationConfig(backgroundRemovedNotificationConfig);\r\n });\r\n }\r\n }, [backgroundRemovedNotificationConfig, getSegmentations, i18n, image.height, image.url, image.width, removingBackgroundNotificationConfig]);\r\n\r\n\r\n const {\r\n promptControlView,\r\n buttonsConfig: promptButtonsConfig,\r\n imageView: promptImageView,\r\n } = usePromptControlViewFactoryWithState({\r\n i18n,\r\n image,\r\n segmentationMasks,\r\n imageUrlWithoutBackground,\r\n setSelectedImageSrc,\r\n selectedMasks,\r\n setSelectedMasks,\r\n selectedImageSrc,\r\n maskValues,\r\n buttonsRef,\r\n setNotificationConfig,\r\n getMaskValueAtPoint,\r\n logger,\r\n generateBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n fetchSegmentationError,\r\n isRemovingBackground,\r\n isFetchingSegmentations,\r\n resultImage,\r\n goToImageAdjustView,\r\n MultiLineEllipsisText,\r\n applyImage,\r\n });\r\n\r\n const {\r\n colorControlView,\r\n buttonsConfig: colorButtonsConfig,\r\n imageView: colorImageView,\r\n } = useColorControlViewFactoryWithState({\r\n i18n,\r\n image,\r\n logger,\r\n selectedImageSrc,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithoutBackground,\r\n goToImageAdjustView,\r\n applyImage,\r\n });\r\n\r\n const buttonsConfig = selectedTab === tabs.AI ? promptButtonsConfig : colorButtonsConfig;\r\n const imageView = selectedTab === tabs.AI ? promptImageView : colorImageView;\r\n\r\n return {\r\n promptControlView,\r\n colorControlView,\r\n buttonsConfig,\r\n imageView,\r\n notificationConfig,\r\n selectedTab,\r\n onTabSelect,\r\n buttonsRef,\r\n isRemovingBackground,\r\n };\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { makeResetStyles, mergeClasses, shorthands } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\n\r\nconst useBackgroundChangeDisclaimerStyles = makeResetStyles({\r\n position: 'absolute',\r\n top: '0',\r\n width: '100%',\r\n ...shorthands.padding('0', '8px'),\r\n});\r\n\r\nexport const BackgroundChangeDisclaimer = (props) => {\r\n const {\r\n i18n,\r\n } = props;\r\n\r\n const classes = useBackgroundChangeDisclaimerStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Note that AI-generated content may not always be accurate. Please double-check, crop, and verify AI-generated content before using it.'))}\r\n \r\n \r\n
);\r\n};\r\n\r\n\r\nBackgroundChangeDisclaimer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nBackgroundChangeDisclaimer.defaultProps = {\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport { Button, Tab,\r\n TabList, mergeClasses } from '@fluentui/react-components';\r\nimport {\r\n ArrowLeftFilled,\r\n ColorBackground20Regular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n HollowSparkleSVGIcon,\r\n} from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageActiveTimeTracker } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { ImagePreviewView } from '../image-preview-view';\r\nimport { useBackgroundChangeStyles } from './style';\r\nimport { tabs, useControlViewFactoryWithState } from './state';\r\nimport { BackgroundChangeDisclaimer } from '../../../background-change-disclaimer';\r\n\r\nexport const BackgroundChangeView = (props) => {\r\n const {\r\n i18n,\r\n MultiLineEllipsisText,\r\n goToImageAdjustView,\r\n imageUrlWithoutBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n logger,\r\n originalImage,\r\n resultImage,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc, // the image after user selected objects\r\n selectedMasks,\r\n setSelectedMasks,\r\n maskValues,\r\n fetchSegmentationError,\r\n isFetchingSegmentations,\r\n getSegmentations,\r\n generateBackground,\r\n onApplyImage,\r\n } = props;\r\n\r\n const classes = useBackgroundChangeStyles();\r\n\r\n const {\r\n colorControlView,\r\n promptControlView,\r\n buttonsConfig,\r\n imageView,\r\n notificationConfig,\r\n selectedTab,\r\n onTabSelect,\r\n buttonsRef,\r\n isRemovingBackground,\r\n } = useControlViewFactoryWithState({\r\n i18n,\r\n logger,\r\n originalImage,\r\n resultImage,\r\n goToImageAdjustView,\r\n getSegmentations,\r\n generateBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc,\r\n selectedMasks,\r\n setSelectedMasks,\r\n maskValues,\r\n fetchSegmentationError,\r\n isFetchingSegmentations,\r\n MultiLineEllipsisText,\r\n applyImage: onApplyImage,\r\n });\r\n\r\n usePageActiveTimeTracker(logger, 'background change:');\r\n\r\n useEffect(() => {\r\n setClarityTag({ LoadAdsStudioBackgroundRemovalPage: true });\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n }\r\n onClick={() => { goToImageAdjustView(); }}\r\n >\r\n {i18n.getString(_TL_('Adjust'))}\r\n \r\n
\r\n
\r\n \r\n }\r\n disabled={isRemovingBackground || fetchSegmentationError !== ''}\r\n >\r\n {i18n.getString(_TL_('Expand background'))}\r\n \r\n }\r\n >\r\n {i18n.getString(_TL_('Solid color'))}\r\n \r\n \r\n
\r\n {selectedTab === tabs.AI && (promptControlView)}\r\n {selectedTab === tabs.SolidColor && (colorControlView)}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\nimport backgroundImg from '../../media/updateBg.png';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n maxWidth: '500px',\r\n\r\n '& .dialog-body': {\r\n ...shorthands.overflow('hidden'),\r\n },\r\n\r\n '& .update-image': {\r\n width: '324px',\r\n height: '189px',\r\n backgroundSize: '100% 100%',\r\n backgroundImage: `url(\"${backgroundImg}\")`,\r\n ...shorthands.margin('4px', 'auto', '16px', 'auto'),\r\n },\r\n\r\n '& .tip-title': {\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '600',\r\n fontSize: '16px',\r\n lineHeight: '20px',\r\n },\r\n\r\n '& .tip-info': {\r\n ...shorthands.margin('12px', '0', '16px', '0'),\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '400',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: '#605E5C',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n\r\n '& .error-tip': {\r\n marginBottom: '16px',\r\n\r\n '& .alert.alert-danger': {\r\n ...shorthands.padding('8px'),\r\n },\r\n\r\n '& .alert__icon': {\r\n color: '#A80000',\r\n width: '16px',\r\n height: '16px',\r\n fontSize: '16px',\r\n lineHeight: '16px',\r\n marginRight: '8px',\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport {\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogBody,\r\n DialogActions,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss20Regular, DismissCircle20Regular } from '@fluentui/react-icons';\r\n\r\nimport { useStyles } from './style';\r\n\r\nexport const UpdateConfirmDialog = ({\r\n i18n,\r\n open,\r\n setOpen,\r\n onSave,\r\n invalidRatioList,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n // Simplify the logic for generating error info.\r\n // Currently, error info will not be empty only for multimedia ads since the minsize limitation.\r\n const errorTip = useMemo(() => {\r\n if (invalidRatioList.length === 1) {\r\n return i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for {{ratio}} {{previewName}} ads. This means that any multimedia ads using this image won\\'t serve in that ad placement'),\r\n {\r\n ratio: invalidRatioList[0].aspectRatioAsRatio,\r\n previewName: i18n.getString(invalidRatioList[0].previewTypeString),\r\n }\r\n );\r\n } else if (invalidRatioList.length === 2) {\r\n return i18n.getString(\r\n _TL_('Your image doesn\\'t meet the size requirements for {{ratio1}} {{previewName1}} and {{ratio2}} {{previewName2}} ads. This means that any multimedia ads using this image won\\'t serve in that ad placement'),\r\n {\r\n ratio1: invalidRatioList[0].aspectRatioAsRatio,\r\n previewName1: i18n.getString(invalidRatioList[0].previewTypeString),\r\n ratio2: invalidRatioList[1].aspectRatioAsRatio,\r\n previewName2: i18n.getString(invalidRatioList[1].previewTypeString),\r\n }\r\n );\r\n }\r\n\r\n return '';\r\n }, [i18n, invalidRatioList]);\r\n\r\n const closeDialog = useCallback(() => {\r\n setOpen(false);\r\n }, [setOpen]);\r\n\r\n const onUpdate = useCallback(() => {\r\n onSave();\r\n closeDialog();\r\n }, [closeDialog, onSave]);\r\n\r\n const DismissIcon = useMemo(() => (\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\nUpdateConfirmDialog.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n open: PropTypes.bool.isRequired,\r\n setOpen: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n invalidRatioList: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n editImagePage: {\r\n height: '100%',\r\n display: 'flex',\r\n },\r\n navigationView: {\r\n backgroundColor: '#FFFFFF',\r\n width: '85px',\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n bottom: '32px',\r\n },\r\n navigationPlaceholder: {\r\n position: 'absolute',\r\n left: 0,\r\n bottom: 0,\r\n width: '85px',\r\n height: '32px',\r\n backgroundColor: '#FFFFFF',\r\n zIndex: -1,\r\n },\r\n contentWrapper: {\r\n height: '100%',\r\n backgroundColor: '#F0F0F0',\r\n paddingLeft: '12px',\r\n paddingTop: '12px',\r\n marginLeft: '85px',\r\n ...shorthands.flex(1, 1, '0px'),\r\n },\r\n});\r\n","/* eslint-disable no-unused-vars */\r\nimport React, { useCallback, useMemo, useEffect, useState, useLayoutEffect } from 'react';\r\nimport queryString from 'query-string';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { AdsStudioSpinner } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { Mode } from '@bingads-webui-react/app-layout-container';\r\n\r\nimport { useEditImageState } from './model/use-edit-image-state';\r\nimport { ViewName } from './model/utils';\r\nimport { ImageAdjustView, AdPlacementListView, SaveButtonInSummaryBar, NavigationView, BackgroundChangeView, PlacementEditView, UpdateConfirmDialog } from './views';\r\nimport { useStyles } from './style';\r\n\r\nexport const EditImagePageComponent = ({\r\n dataService,\r\n imageId,\r\n search,\r\n i18n,\r\n pagePerfMarker: editPagePerfMarker,\r\n permissions,\r\n logger,\r\n getSmartCroppings,\r\n MultiLineEllipsisText,\r\n navigation,\r\n isAIGCRegionRestricted,\r\n notificationApi,\r\n getAssetEnhancementSettings,\r\n changeLayout,\r\n setDataLoaded,\r\n}) => {\r\n const classes = useStyles();\r\n const queries = queryString.parse(search);\r\n const {\r\n folderId = '', editImageUrl = '', initialCurrentView = '',\r\n } = queries || {};\r\n\r\n const {\r\n originalImage,\r\n resultImage,\r\n currentView,\r\n setCurrentView,\r\n filterIndex,\r\n setFilterIndex,\r\n backgroundBlurEnabled,\r\n toggleBackgroundBlur,\r\n changeBackgroundBlurLevel,\r\n backgroundBlurLevel,\r\n getImagesWithFilter,\r\n loadingStatus,\r\n initialAssetLoading,\r\n saveImageDirectly,\r\n imagesWithFilter,\r\n placementList,\r\n firstImage,\r\n onEditPlacement,\r\n editingPlacementInfo,\r\n adType,\r\n showRequiredOnly,\r\n previewTexts,\r\n previewImage,\r\n maxCropBox,\r\n saveCropPlacement,\r\n cancelCropPlacement,\r\n switchAdType,\r\n switchShowRequiredOnly,\r\n // Background change view states\r\n getSegmentations,\r\n generateBackground,\r\n drawColorBackground,\r\n imageUrlWithColoredBackground,\r\n imageUrlWithoutBackground,\r\n imageUrlWithGeneratedBackground,\r\n setImageUrlWithGeneratedBackground,\r\n getMaskValueAtPoint,\r\n segmentationMasks,\r\n setSelectedImageSrc,\r\n selectedImageSrc, // the image after user selected objects\r\n selectedMasks,\r\n setSelectedMasks,\r\n maskValues,\r\n fetchSegmentationError,\r\n isFetchingSegmentations,\r\n replaceBackground,\r\n saveAsCopy,\r\n isStockImage,\r\n isImageUpdated,\r\n disableSave,\r\n haveCroppingTasks,\r\n isConfirmDialogOpen,\r\n setIsConfirmDialogOpen,\r\n onConfirmDialogSave,\r\n allSizeInvalidRatioList,\r\n saveButtonTooltip,\r\n updateAdPlacementImage,\r\n } = useEditImageState({\r\n imageId,\r\n folderId,\r\n dataService,\r\n editImageUrl,\r\n i18n,\r\n perfMarker: editPagePerfMarker,\r\n permissions,\r\n logger,\r\n getSmartCroppings,\r\n navigation,\r\n initialCurrentView,\r\n getAssetEnhancementSettings,\r\n setDataLoaded,\r\n });\r\n\r\n const adjustButtonTooltip = useMemo(() => {\r\n if (isStockImage) {\r\n return i18n.getString(_TL_('You cannot adjust or edit Shutterstock images.'));\r\n }\r\n return undefined;\r\n }, [i18n, isStockImage]);\r\n\r\n const isSaveAsCopyDisabled = useMemo(() => isStockImage || !isImageUpdated, [isImageUpdated, isStockImage]);\r\n\r\n const baseButtonText = useMemo(() => {\r\n if (isImageUpdated) {\r\n return i18n.getString(_TL_('Save as copy'));\r\n }\r\n return i18n.getString(_TL_('Save'));\r\n }, [i18n, isImageUpdated]);\r\n\r\n const onBaseButtonClick = useCallback(() => {\r\n if (isImageUpdated) {\r\n saveAsCopy();\r\n } else {\r\n saveImageDirectly();\r\n }\r\n }, [isImageUpdated, saveAsCopy, saveImageDirectly]);\r\n\r\n const goToBackgroundChangeView = useCallback(() => {\r\n setCurrentView(ViewName.BackgroundChangeView);\r\n }, [setCurrentView]);\r\n\r\n const goToImageAdjustView = useCallback(() => {\r\n setCurrentView(ViewName.ImageAdjustView);\r\n setImageUrlWithGeneratedBackground(null);\r\n }, [setCurrentView, setImageUrlWithGeneratedBackground]);\r\n\r\n const gotoPlacementEditView = useCallback((placement) => {\r\n onEditPlacement(placement);\r\n setCurrentView(ViewName.PlacementEditView);\r\n }, [setCurrentView, onEditPlacement]);\r\n\r\n const goToPlacementListView = useCallback(() => {\r\n setCurrentView(ViewName.PlacementListView);\r\n }, [setCurrentView]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ LoadAdsStudioImageEditingPage: true });\r\n }, []);\r\n\r\n useLayoutEffect(() => {\r\n if (changeLayout) {\r\n changeLayout(\r\n {\r\n nav: {\r\n mode: Mode.Hidden,\r\n },\r\n },\r\n true, // isPageConfig\r\n true // isPageConfigPartialUpdate\r\n );\r\n }\r\n }, [changeLayout]);\r\n\r\n return (\r\n
\r\n \r\n {!initialAssetLoading &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n {\r\n currentView === ViewName.PlacementListView &&\r\n \r\n }\r\n {\r\n currentView === ViewName.PlacementEditView &&\r\n \r\n }\r\n {\r\n currentView === ViewName.ImageAdjustView &&\r\n \r\n }\r\n {\r\n currentView === ViewName.BackgroundChangeView &&\r\n \r\n }\r\n \r\n {\r\n loadingStatus &&\r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n );\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useLayoutStyles = makeStyles({\r\n layer: {\r\n top: '60px',\r\n zIndex: '1000',\r\n },\r\n overlay: {\r\n backgroundColor: 'rgba(0, 0, 0, 0.66)',\r\n },\r\n previewContainer: {\r\n width: '100%',\r\n height: '100%',\r\n paddingRight: '480px',\r\n cursor: 'auto',\r\n },\r\n spinner: {\r\n width: '100%',\r\n height: '100%',\r\n zIndex: '2',\r\n position: 'absolute',\r\n },\r\n});\r\n\r\nexport const usePreviewBaseStyles = makeStyles({\r\n previewContainer: {\r\n width: '100%',\r\n height: '100%',\r\n position: 'relative',\r\n },\r\n content: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n width: '100%',\r\n height: '100%',\r\n ...shorthands.padding('26px', '20px', '74px', '20px'),\r\n },\r\n fadeOut: {\r\n opacity: 0,\r\n ...shorthands.transition('all', '0.1s', 'linear'),\r\n },\r\n});\r\n\r\nexport const useSequentialNavigatorStyles = makeStyles({\r\n sequentialNavigatorContainer: {\r\n position: 'absolute',\r\n bottom: '32px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n width: '100%',\r\n height: '16px',\r\n color: 'white',\r\n },\r\n navigatorStatusContainer: {\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n fontWeight: '600',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n ...shorthands.margin('0', '12px', '0', '12px'),\r\n },\r\n iconButton: {\r\n fontFamily: 'MsAds MDL2 Assets !important',\r\n fontSize: '16px',\r\n lineHeight: '16px',\r\n backgroundColor: 'transparent',\r\n ...shorthands.border('none'),\r\n ...shorthands.padding('0px'),\r\n color: 'white',\r\n },\r\n chevronLeft: {\r\n '&:before': {\r\n content: '\"\\\\E76B\"',\r\n },\r\n },\r\n chevronRight: {\r\n '&:before': {\r\n content: '\"\\\\E76C\"',\r\n },\r\n },\r\n disabledIcon: {\r\n color: 'rgba(255, 255, 255, 0.5)',\r\n },\r\n});\r\n\r\nexport const useNonActiveVideoPreviewStyle = makeStyles({\r\n container: {\r\n height: '500px',\r\n maxWidth: '746px',\r\n width: '100%',\r\n flexGrow: '1',\r\n },\r\n failedIconContainer: {\r\n color: 'orange',\r\n },\r\n});\r\n\r\nexport const usePanelStyle = makeStyles({\r\n detailPanel: {\r\n width: '480px',\r\n top: '60px',\r\n },\r\n header: {\r\n paddingTop: '16px',\r\n },\r\n content: {\r\n ...shorthands.padding('0', '32px'),\r\n },\r\n footer: {\r\n width: '100%',\r\n ...shorthands.borderTop('1px', 'solid', '#EDEBE9'),\r\n ...shorthands.padding('8px', '24px'),\r\n },\r\n footerButton: {\r\n display: 'block',\r\n width: '60px',\r\n minWidth: '0px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n navigation: {\r\n marginLeft: '32px',\r\n },\r\n});\r\n\r\nexport const useDetailPanelStyle = makeStyles({\r\n imageUsage: {\r\n marginTop: '24px',\r\n marginLeft: '28px',\r\n },\r\n});\r\n\r\nexport const useInfoPaneHeaderStyle = makeStyles({\r\n detailHeader: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n position: 'relative',\r\n },\r\n panelTitle: {\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 600,\r\n fontSize: '20px',\r\n lineHeight: '27px',\r\n minWidth: '0px',\r\n flexGrow: 1,\r\n },\r\n buttonBox: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n // iconBox: getSharedIconBoxStyle({ palette }),\r\n editBox: {\r\n width: '75px',\r\n minWidth: '0px',\r\n marginRight: '8px',\r\n },\r\n deleteBox: {\r\n width: '92px',\r\n marginRight: '8px',\r\n minWidth: '0px',\r\n },\r\n icon: {\r\n width: '20px',\r\n height: '20px',\r\n },\r\n headerText: {\r\n width: '45px',\r\n textAlign: 'center',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '600',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n // color: palette.neutralPrimary,\r\n marginLeft: '4px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n disabledButton: {\r\n // color: `${palette.neutralTertiary} !important`,\r\n },\r\n closeButton: {\r\n width: '32px',\r\n height: '32px',\r\n },\r\n});\r\n\r\nexport const useInfoItemDefaultStyles = makeStyles({\r\n contentItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '400',\r\n fontSize: '14px',\r\n lineHeight: '19px',\r\n marginTop: '8px',\r\n },\r\n contentName: {\r\n // color: palette.neutralSecondary,\r\n marginRight: '8px',\r\n width: '97px',\r\n },\r\n contentValue: {\r\n // color: palette.neutralPrimary,\r\n maxWidth: '230px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n wordBreak: 'break-all',\r\n whiteSpace: 'nowrap',\r\n },\r\n});\r\n\r\nexport const useItemInfoContentStyles = makeStyles({\r\n contentBox: {\r\n width: '100%',\r\n paddingTop: '10px',\r\n // background: palette.neutralLighterAlt,\r\n },\r\n detailContentWrapper: {\r\n ...shorthands.overflow('hidden'),\r\n ...shorthands.borderTop('1px', 'solid', '#EDEBE9'),\r\n paddingTop: '8px',\r\n },\r\n linkContainer: {\r\n marginTop: '24px',\r\n marginLeft: '28px',\r\n },\r\n});\r\n\r\nexport const useInfoPaneItemRenameStyle = makeStyles({\r\n nameContentBox: {\r\n paddingBottom: '12px',\r\n paddingTop: '8px',\r\n position: 'relative',\r\n },\r\n addNameBox: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n addNameTitle: {\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n lineHeight: '32px',\r\n color: '#484644',\r\n },\r\n addNameIcon: {\r\n color: '#0078D4',\r\n cursor: 'pointer',\r\n marginLeft: '12px',\r\n },\r\n nameBox: {\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: '400',\r\n lineHeight: '19px',\r\n color: '#484644',\r\n maxWidth: '230px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n wordBreak: 'break-all',\r\n whiteSpace: 'nowrap',\r\n },\r\n editNameBox: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n textField: {\r\n width: '300px',\r\n marginRight: '12px',\r\n '& input[type=\"text\"]::placeholder ': {\r\n color: '#686868',\r\n },\r\n },\r\n completeIcon: {\r\n marginRight: '16px',\r\n },\r\n});\r\n\r\nexport const useItemInfoCopyUrlStyles = makeStyles({\r\n contentItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '400',\r\n fontSize: '14px',\r\n lineHeight: '19px',\r\n marginTop: '8px',\r\n },\r\n contentName: {\r\n marginRight: '8px',\r\n width: '97px',\r\n },\r\n contentValue: {\r\n maxWidth: '230px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n wordBreak: 'break-all',\r\n whiteSpace: 'nowrap',\r\n },\r\n copyUrl: {\r\n backgroundColor: 'transparent',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '400',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: '#106ebe',\r\n ...shorthands.border('none'),\r\n ...shorthands.textDecoration('underline'),\r\n },\r\n});\r\n\r\nexport const useItemInfoVideoQualityStyles = makeStyles({\r\n contentItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: '400',\r\n fontSize: '14px',\r\n lineHeight: '19px',\r\n marginTop: '8px',\r\n },\r\n contentName: {\r\n marginRight: '8px',\r\n width: '97px',\r\n },\r\n contentValue: {\r\n maxWidth: '230px',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n wordBreak: 'break-all',\r\n whiteSpace: 'nowrap',\r\n },\r\n qualityBadge: {\r\n width: '50px',\r\n paddingBottom: '1px',\r\n },\r\n});\r\n\r\nexport const usePerformanceContentStyles = makeStyles({\r\n dropdown: {\r\n minWidth: '0px',\r\n width: '160px',\r\n ...shorthands.margin('12px', '0px', '8px'),\r\n },\r\n metricBox: {\r\n height: '290px',\r\n position: 'relative',\r\n },\r\n loading: {\r\n opacity: '0.2',\r\n },\r\n spinner: {\r\n position: 'absolute',\r\n top: '0px',\r\n },\r\n});\r\n\r\nexport const useExternalLinkStyles = makeStyles({\r\n externalButton: {\r\n marginTop: '24px',\r\n display: 'flex',\r\n ...shorthands.padding('6px', '12px'),\r\n ...shorthands.border('0px'),\r\n backgroundColor: 'transparent !important',\r\n },\r\n text: {\r\n marginLeft: '4px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n lineHeight: '32px',\r\n },\r\n});\r\n\r\n","import classnames from 'classnames';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSequentialNavigatorStyles } from '../../styles';\r\n\r\nexport const SequentialNavigator = ({\r\n totalCount,\r\n currentIndex,\r\n onNext,\r\n onPrevious,\r\n i18n,\r\n}) => {\r\n const classes = useSequentialNavigatorStyles();\r\n\r\n const disableLeft = currentIndex === 0;\r\n const disableRight = currentIndex + 1 === totalCount;\r\n\r\n return (\r\n
\r\n {\r\n totalCount > 1 &&\r\n \r\n }\r\n
{`${currentIndex + 1}/${totalCount}`}
\r\n {\r\n totalCount > 1 &&\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nSequentialNavigator.propTypes = {\r\n totalCount: PropTypes.number.isRequired,\r\n currentIndex: PropTypes.number.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n onPrevious: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { usePreviewBaseStyles } from '../../styles';\r\nimport { SequentialNavigator } from './sequential-navigator';\r\n\r\nexport const AssetItemPreviewBase = ({\r\n itemData,\r\n totalCount,\r\n currentIndex,\r\n onNext,\r\n onPrevious,\r\n shouldHideContent,\r\n i18n,\r\n onRenderPreviewContent,\r\n}) => {\r\n const classes = usePreviewBaseStyles();\r\n\r\n return (\r\n
\r\n
\r\n {onRenderPreviewContent({ itemData })}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nAssetItemPreviewBase.propTypes = {\r\n itemData: PropTypes.shape({}),\r\n totalCount: PropTypes.number.isRequired,\r\n currentIndex: PropTypes.number.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n onPrevious: PropTypes.func.isRequired,\r\n shouldHideContent: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onRenderPreviewContent: PropTypes.func.isRequired,\r\n};\r\n\r\nAssetItemPreviewBase.defaultProps = {\r\n itemData: null,\r\n shouldHideContent: false,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Image } from '@fluentui/react-components';\r\nimport { AssetItemPreviewBase } from './asset-preview-base/asset-item-preview-base';\r\n\r\nexport const ImagePreview = ({\r\n itemInfo,\r\n totalCount,\r\n currentIndex,\r\n onNext,\r\n onPrevious,\r\n shouldHideContent,\r\n i18n,\r\n}) => {\r\n const { url: imageSrc } = itemInfo || {};\r\n\r\n const onRenderPreviewContent = useCallback(() => (\r\n \r\n ), [i18n, imageSrc]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImagePreview.propTypes = {\r\n totalCount: PropTypes.number.isRequired,\r\n currentIndex: PropTypes.number.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n onPrevious: PropTypes.func.isRequired,\r\n shouldHideContent: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nImagePreview.defaultProps = {\r\n shouldHideContent: false,\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { VideoStatus, ItemPlaceholderBoxView, ItemPlaceholderBoxViewFooterType, videoIcon } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useNonActiveVideoPreviewStyle } from '../styles';\r\n\r\nconst VideoStatusPreviewConfig = {\r\n [VideoStatus.Draft]: {\r\n text: {\r\n summary: _TL_('Processing.'),\r\n tip: _TL_('When processing is complete, you can preview your asset here.'),\r\n },\r\n },\r\n\r\n [VideoStatus.Transcoding]: {\r\n text: {\r\n summary: _TL_('Processing.'),\r\n tip: _TL_('When processing is complete, you can preview your asset here.'),\r\n },\r\n },\r\n\r\n [VideoStatus.Unverified]: {\r\n text: {\r\n summary: _TL_('Downloading.'),\r\n tip: _TL_('When the download is complete, you can preview your asset here.'),\r\n },\r\n },\r\n\r\n [VideoStatus.Failed]: {\r\n type: ItemPlaceholderBoxViewFooterType.warning,\r\n fabricIconName: 'Warning',\r\n fabricIconDynamicClassName: 'failedIconContainer',\r\n text: {\r\n summary: _TL_('Invalid.'),\r\n tip: _TL_('Delete the asset and try again.'),\r\n learnMoreLinkText: _TL_('Learn more about asset guidelines and accepted file types.'),\r\n },\r\n learnMoreLinkTopic: 'app54863',\r\n },\r\n};\r\n\r\nexport const NonActiveVideoPreview = ({\r\n status,\r\n i18n,\r\n}) => {\r\n const classes = useNonActiveVideoPreviewStyle();\r\n const footerProps = useMemo(() => {\r\n const mappedConfig = VideoStatusPreviewConfig[status];\r\n const localizedTextFields = _.mapObject(\r\n mappedConfig.text,\r\n text => i18n.getString(text)\r\n );\r\n\r\n return {\r\n type: mappedConfig.type,\r\n learnMoreLinkTopic: mappedConfig.learnMoreLinkTopic,\r\n fabricIconName: mappedConfig.fabricIconName,\r\n fabricIconClassName: classes[mappedConfig.fabricIconDynamicClassName],\r\n ...localizedTextFields,\r\n };\r\n }, [classes, i18n, status]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nNonActiveVideoPreview.propTypes = {\r\n status: PropTypes.oneOf(Object.keys(VideoStatus)).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { VideoStatus, VideoPlaybackView } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { AssetItemPreviewBase } from './asset-preview-base/asset-item-preview-base';\r\nimport { NonActiveVideoPreview } from './non-active-video-preview';\r\n\r\nexport const VideoPreview = ({\r\n itemInfo,\r\n totalCount,\r\n currentIndex,\r\n onNext,\r\n onPrevious,\r\n shouldHideContent,\r\n i18n,\r\n}) => {\r\n const { thumbnailUrl, url, status } = itemInfo;\r\n\r\n const onRenderPreviewContent = useCallback(() => {\r\n if (status === VideoStatus.Active) {\r\n return ();\r\n }\r\n\r\n return ();\r\n }, [thumbnailUrl, url, status, i18n]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nVideoPreview.propTypes = {\r\n videoInfo: PropTypes.shape({\r\n url: PropTypes.string,\r\n thumbnailUrl: PropTypes.string,\r\n status: PropTypes.string,\r\n }),\r\n totalCount: PropTypes.number.isRequired,\r\n currentIndex: PropTypes.number.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n onPrevious: PropTypes.func.isRequired,\r\n shouldHideContent: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nVideoPreview.defaultProps = {\r\n shouldHideContent: false,\r\n videoInfo: null,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Button, mergeClasses } from '@fluentui/react-components';\r\nimport {\r\n DrawerOverlay,\r\n DrawerHeader,\r\n DrawerHeaderTitle,\r\n DrawerBody,\r\n DrawerFooter,\r\n} from '@fluentui/react-drawer';\r\nimport { usePanelStyle } from '../../styles';\r\n\r\nexport const ItemDetailsPanelBase = ({\r\n dismiss,\r\n isOpen,\r\n onRenderHeader,\r\n i18n,\r\n children,\r\n footerKeyDownHandler,\r\n}) => {\r\n const classes = usePanelStyle();\r\n\r\n const onFooterKeyDown = useCallback((event) => {\r\n if (_.isFunction(footerKeyDownHandler)) {\r\n footerKeyDownHandler(event);\r\n }\r\n }, [footerKeyDownHandler]);\r\n\r\n const onRenderFooterContent = useCallback(\r\n () => (\r\n
\r\n \r\n
\r\n ),\r\n [classes.footer, classes.footerButton, dismiss, i18n, onFooterKeyDown]\r\n );\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n {onRenderHeader}\r\n \r\n \r\n
\r\n \r\n {children}\r\n \r\n \r\n {onRenderFooterContent}\r\n \r\n \r\n );\r\n};\r\n\r\nItemDetailsPanelBase.propTypes = {\r\n dismiss: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool,\r\n onRenderHeader: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n children: PropTypes.element,\r\n footerKeyDownHandler: PropTypes.func,\r\n};\r\n\r\nItemDetailsPanelBase.defaultProps = {\r\n isOpen: false,\r\n children: null,\r\n footerKeyDownHandler: _.noop,\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { Button, mergeClasses } from '@fluentui/react-components';\r\nimport { DeleteRegular, EditRegular, Dismiss24Regular } from '@fluentui/react-icons';\r\nimport { useInfoPaneHeaderStyle } from '../../styles';\r\n\r\nexport const InfoPaneHeader = ({\r\n isReadonly,\r\n i18n,\r\n title,\r\n onDelete,\r\n disableEdit,\r\n onEdit,\r\n dismiss,\r\n}) => {\r\n const classes = useInfoPaneHeaderStyle();\r\n\r\n return (\r\n
\r\n
{title}
\r\n
\r\n \r\n \r\n
{i18n.getString(_TL_('Delete'))}
\r\n \r\n\r\n { !disableEdit &&\r\n \r\n \r\n
{i18n.getString(_TL_('Edit'))}
\r\n \r\n }\r\n }\r\n onClick={dismiss}\r\n />\r\n
\r\n
\r\n );\r\n};\r\n\r\nInfoPaneHeader.propTypes = {\r\n onDelete: PropTypes.func.isRequired,\r\n isReadonly: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n title: PropTypes.string.isRequired,\r\n\r\n disableEdit: PropTypes.bool,\r\n onEdit: PropTypes.func,\r\n dismiss: PropTypes.func.isRequired,\r\n};\r\n\r\nInfoPaneHeader.defaultProps = {\r\n isReadonly: false,\r\n disableEdit: false,\r\n onEdit: _.noop,\r\n};\r\n","import React, { useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ConfirmDialog } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const DeleteAssetDialog = ({\r\n i18n,\r\n isDisplayed,\r\n closeDialog,\r\n onDeleteAsync,\r\n onDeleteSuccess,\r\n confirmText,\r\n errorMessageForUsedAsset,\r\n warningMsg,\r\n genericErrorMessage,\r\n notificationApi,\r\n}) => {\r\n const [showUIBlocker, setShowUIBlocker] = useState(false);\r\n const [errorText, setErrorText] = useState('');\r\n\r\n /* istanbul ignore next */\r\n const handleDelete = useCallback(() => {\r\n setShowUIBlocker(true);\r\n onDeleteAsync().then(() => {\r\n closeDialog();\r\n onDeleteSuccess();\r\n notificationApi.showInfo(i18n.getString(_TL_('Your asset was successfully deleted.')));\r\n }).catch((response = {}) => {\r\n if (response.errors && response.errors[0] && response.errors[0].Code === 'AssetIsUsed') {\r\n setErrorText(errorMessageForUsedAsset);\r\n } else {\r\n notificationApi.showWarning(genericErrorMessage);\r\n closeDialog();\r\n }\r\n })\r\n .finally(() => {\r\n setShowUIBlocker(false);\r\n });\r\n }, [closeDialog, errorMessageForUsedAsset, genericErrorMessage, i18n, notificationApi, onDeleteAsync, onDeleteSuccess]);\r\n\r\n /* istanbul ignore next */\r\n const cancelDelete = useCallback(() => {\r\n closeDialog();\r\n setErrorText('');\r\n }, [closeDialog]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nDeleteAssetDialog.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isDisplayed: PropTypes.bool,\r\n closeDialog: PropTypes.func.isRequired,\r\n onDeleteAsync: PropTypes.func.isRequired,\r\n onDeleteSuccess: PropTypes.func.isRequired,\r\n confirmText: PropTypes.string.isRequired,\r\n errorMessageForUsedAsset: PropTypes.string.isRequired,\r\n genericErrorMessage: PropTypes.string.isRequired,\r\n warningMsg: PropTypes.string,\r\n};\r\n\r\nDeleteAssetDialog.defaultProps = {\r\n isDisplayed: false,\r\n warningMsg: '',\r\n};\r\n","import React, { useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TooltipHost, DirectionalHint } from '@bingads-webui-react/fabric-control';\r\nimport { useItemInfoCopyUrlStyles } from '../../styles';\r\n\r\nconst tooltipCalloutProps = { isBeakVisible: false, gapSpace: 10 };\r\n\r\nconst CopyUrlButton = ({ onClick, i18n, classes }) => {\r\n const [isURLCopied, setIsURLCopied] = useState(false);\r\n\r\n const onCopyUrlClick = useCallback(() => {\r\n setIsURLCopied(true);\r\n onClick();\r\n }, [onClick]);\r\n\r\n const onTooltipToggle = useCallback(isVisible => (!isVisible && setIsURLCopied(false)), []);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCopyUrlButton.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n copyUrl: PropTypes.string,\r\n }).isRequired,\r\n};\r\n\r\nexport const InfoPaneItemCopyUrl = ({\r\n i18n,\r\n url,\r\n onCopy,\r\n}) => {\r\n const classes = useItemInfoCopyUrlStyles();\r\n\r\n return (\r\n
\r\n
{i18n.getString(_TL_('URL:'))}
\r\n
{url}
\r\n \r\n
\r\n );\r\n};\r\n\r\nInfoPaneItemCopyUrl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n url: PropTypes.string.isRequired,\r\n onCopy: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { useInfoItemDefaultStyles } from '../../styles';\r\n\r\nexport const InfoItemDefault = ({\r\n name,\r\n value,\r\n}) => {\r\n const classes = useInfoItemDefaultStyles();\r\n\r\n return (\r\n
\r\n
{name}
\r\n
{value}
\r\n
\r\n );\r\n};\r\n\r\nInfoItemDefault.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n};\r\n","import React, { useState, useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport { Input } from '@fluentui/react-components';\r\nimport { Edit16Regular, Dismiss16Regular, Checkmark16Regular } from '@fluentui/react-icons';\r\nimport { useInfoPaneItemRenameStyle } from '../../styles';\r\n\r\nconst spinnerStyle = ({\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n});\r\n\r\nexport const InfoItemRename = ({\r\n i18n,\r\n name,\r\n renameAsync,\r\n renderBlocker,\r\n inputPlaceholderText,\r\n renameTitleText,\r\n isReadonly,\r\n}) => {\r\n const classes = useInfoPaneItemRenameStyle();\r\n\r\n const [displayInputBox, setDisplayInputBox] = useState(false);\r\n const [inputName, setInputName] = useState('');\r\n const [showUiBlocker, setShowUiBlocker] = useState(false);\r\n\r\n useEffect(() => {\r\n setDisplayInputBox(false);\r\n setShowUiBlocker(false);\r\n setInputName(name);\r\n }, [name]);\r\n\r\n const handleRename = useCallback(() => {\r\n setShowUiBlocker(true);\r\n renameAsync(inputName).finally(() => {\r\n setShowUiBlocker(false);\r\n setDisplayInputBox(false);\r\n });\r\n }, [inputName, renameAsync]);\r\n\r\n const onEnterRename = useCallback((event) => {\r\n if (event && event.keyCode === keyCode.Enter) {\r\n handleRename();\r\n }\r\n }, [handleRename]);\r\n\r\n const handleDisplayInputBox = useCallback(() => {\r\n setInputName(name || '');\r\n setDisplayInputBox(true);\r\n }, [name]);\r\n\r\n const onEnterEditIcon = useCallback((event) => {\r\n if (event && event.keyCode === keyCode.Enter) {\r\n handleDisplayInputBox();\r\n }\r\n }, [handleDisplayInputBox]);\r\n\r\n const handleCancel = useCallback(() => {\r\n setInputName('');\r\n setDisplayInputBox(false);\r\n }, []);\r\n\r\n const onEnterCancel = useCallback((event) => {\r\n if (event && event.keyCode === keyCode.Enter) {\r\n handleCancel();\r\n }\r\n });\r\n\r\n const onEnterPress = useCallback((event) => {\r\n if (event && event.keyCode === keyCode.Enter && inputName !== name) {\r\n handleRename();\r\n }\r\n }, [handleRename, inputName, name]);\r\n\r\n const onInputChange = useCallback((ev, data) => {\r\n const { value } = data || {};\r\n setInputName(value);\r\n }, []);\r\n\r\n return (\r\n
\r\n {\r\n displayInputBox ?\r\n
\r\n \r\n \r\n \r\n
:\r\n
\r\n
\r\n
{renameTitleText}
\r\n {!isReadonly && }\r\n
\r\n
\r\n {name || '-'}\r\n
\r\n
\r\n }\r\n {\r\n showUiBlocker && renderBlocker && renderBlocker({ spinnerStyle })\r\n }\r\n
\r\n );\r\n};\r\n\r\nInfoItemRename.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n renameAsync: PropTypes.func.isRequired,\r\n renderBlocker: PropTypes.func.isRequired,\r\n inputPlaceholderText: PropTypes.string.isRequired,\r\n isReadonly: PropTypes.bool,\r\n};\r\n\r\nInfoItemRename.defaultProps = {\r\n isReadonly: false,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { InfoItemDefault } from './info-item-default';\r\nimport { InfoItemRename } from './info-item-rename';\r\nimport { useItemInfoContentStyles } from '../../styles';\r\n\r\nexport const ItemInfoContentBase = ({\r\n i18n,\r\n isReadonly,\r\n itemName,\r\n renameAsync,\r\n promptNameInputLabel,\r\n nameInputPlaceholderText,\r\n renameTitleText,\r\n itemInfos,\r\n}) => {\r\n const classes = useItemInfoContentStyles();\r\n const renderItem = useCallback(({\r\n name, value, CustomComponent, CustomComponentOptions = {},\r\n }) => {\r\n if (CustomComponent) {\r\n return ;\r\n }\r\n return ;\r\n }, []);\r\n\r\n return (\r\n
\r\n }\r\n promptInputLabel={promptNameInputLabel}\r\n inputPlaceholderText={itemName ? '' : nameInputPlaceholderText}\r\n renameTitleText={renameTitleText}\r\n />\r\n
\r\n {\r\n itemInfos.map(({\r\n key,\r\n name, value,\r\n CustomComponent, CustomComponentOptions = {},\r\n valid = true,\r\n }) => (\r\n valid &&\r\n \r\n { renderItem({\r\n name, value, CustomComponent, CustomComponentOptions,\r\n })\r\n }\r\n \r\n ))\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\nItemInfoContentBase.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isReadonly: PropTypes.bool,\r\n itemName: PropTypes.string,\r\n renameAsync: PropTypes.func.isRequired,\r\n promptNameInputLabel: PropTypes.string,\r\n nameInputPlaceholderText: PropTypes.string,\r\n itemInfos: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n value: PropTypes.string,\r\n url: PropTypes.string,\r\n copyUrl: PropTypes.func,\r\n })).isRequired,\r\n};\r\n\r\nItemInfoContentBase.defaultProps = {\r\n isReadonly: false,\r\n itemName: null,\r\n promptNameInputLabel: '',\r\n nameInputPlaceholderText: '',\r\n};\r\n","export const ImpressionsID = 5;\r\nexport const ClicksID = 1;\r\nexport const CTRID = 4;\r\nexport const OverallID = 0;\r\n\r\nexport const metricsMap = [\r\n {\r\n id: ClicksID,\r\n value: 'ColumnName_Clicks',\r\n name: 'Clicks',\r\n // formatter: this.formatToInteger,\r\n },\r\n {\r\n id: ImpressionsID,\r\n value: 'TrendAreaChart_AxisY',\r\n name: 'Impressions',\r\n // formatter: this.formatToInteger,\r\n },\r\n {\r\n id: CTRID,\r\n value: 'ColumnName_CTR',\r\n name: 'CTR',\r\n // formatter: this.formatTo2DigitsPercent,\r\n },\r\n];\r\n","import React from 'react';\r\nimport { Button, mergeClasses } from '@fluentui/react-components';\r\nimport { Open20Regular } from '@fluentui/react-icons';\r\nimport { useExternalLinkStyles } from '../../styles';\r\n\r\nexport const ItemExternalLink = (props) => {\r\n const { onClick, text } = props;\r\n const classes = useExternalLinkStyles();\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React, { useEffect, useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Dropdown, Option } from '@fluentui/react-components';\r\nimport { InlineChart } from '@bingads-webui-campaign-react/ads-studio-shared-components';\r\nimport { AdsStudioSpinner } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ImpressionsID, CTRID, ClicksID, OverallID, metricsMap } from '../../constants';\r\nimport { usePerformanceContentStyles } from '../../styles';\r\nimport { ItemExternalLink } from './item-external-link';\r\n\r\nconst defaultMetricValue = OverallID;\r\nconst defaultMetricLabel = _TL_('Overall metrics');\r\n\r\nconst metricOptions = [\r\n {\r\n label: defaultMetricLabel,\r\n value: defaultMetricValue,\r\n },\r\n {\r\n label: _TL_('CTR'),\r\n value: CTRID,\r\n },\r\n {\r\n label: _TL_('Clicks'),\r\n value: ClicksID,\r\n },\r\n {\r\n label: _TL_('Impressions'),\r\n value: ImpressionsID,\r\n },\r\n];\r\n\r\nexport const PerformanceContent = (props) => {\r\n const {\r\n onGotoAds, i18n, loadPerfTimeSeriesData, imageId, folderAssetType, getGranularityEnum, perfMetricDateRange,\r\n } = props;\r\n const classes = usePerformanceContentStyles();\r\n const [isMetricLoading, setIsMetricLoading] = useState(false);\r\n const [metricData, setMetricData] = useState([]);\r\n const [granularity, setGranularity] = useState();\r\n\r\n const loadSeriesData = useCallback((selectedMetricValues) => {\r\n let metric;\r\n if (!granularity) {\r\n return;\r\n }\r\n if (selectedMetricValues === OverallID) {\r\n metric = metricsMap.map(({ name }) => name).join(',');\r\n } else {\r\n metric = metricsMap.find(({ id }) => id === selectedMetricValues).name;\r\n }\r\n const timeSeriesParams = {\r\n metric,\r\n granularity,\r\n isMovingAverageOn: false,\r\n };\r\n const filters = {\r\n searchText: imageId,\r\n hasPerfData: true,\r\n assetTypeFilter: folderAssetType,\r\n };\r\n setIsMetricLoading(true);\r\n loadPerfTimeSeriesData(timeSeriesParams, filters).then((result) => {\r\n setMetricData(result);\r\n }).finally(() => {\r\n setIsMetricLoading(false);\r\n });\r\n }, [folderAssetType, granularity, imageId, loadPerfTimeSeriesData]);\r\n\r\n const onOptionSelect = useCallback((ev, data) => {\r\n const { optionValue } = data || {};\r\n loadSeriesData(optionValue);\r\n }, [loadSeriesData]);\r\n\r\n useEffect(() => {\r\n loadSeriesData(defaultMetricValue);\r\n }, [loadSeriesData]);\r\n\r\n useEffect(() => {\r\n getGranularityEnum(perfMetricDateRange).then((granularityEnum) => {\r\n setGranularity(granularityEnum);\r\n });\r\n }, [getGranularityEnum, perfMetricDateRange]);\r\n\r\n return (\r\n
\r\n \r\n {metricOptions.map(option => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n
\r\n {isMetricLoading && }\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nPerformanceContent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onGotoAds: PropTypes.func.isRequired,\r\n loadPerfTimeSeriesData: PropTypes.func.isRequired,\r\n imageId: PropTypes.string.isRequired,\r\n folderAssetType: PropTypes.string.isRequired,\r\n};\r\n","import React, { useState, useCallback, useEffect, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { TabList, Tab } from '@fluentui/react-components';\r\nimport { ItemDetailsPanelBase } from './asset-panel-base/panel-base';\r\nimport { InfoPaneHeader } from './asset-panel-base/info-panel-header';\r\nimport { DeleteAssetDialog } from './asset-panel-base/delete-asset-dialog';\r\nimport { InfoPaneItemCopyUrl } from './basic-info/info-item-copy-url';\r\nimport { ItemInfoContentBase } from './basic-info/item-info-panel-content-base';\r\nimport { PerformanceContent } from './performance';\r\n\r\nexport const ImageDetailsPanel = ({\r\n isOpen,\r\n assetInfo,\r\n onDismiss,\r\n isReadonly,\r\n i18n,\r\n footerKeyDownHandler,\r\n getImageById,\r\n warningMsgProp, // for unit test\r\n logger,\r\n navigation,\r\n handleDeleteAsset,\r\n handleRenameAsset,\r\n gotoAdsPageWithAssetIdFilter,\r\n copyUrl,\r\n notificationApi,\r\n getGranularityEnum,\r\n loadPerfTimeSeriesData,\r\n perfMetricDateRange,\r\n}) => {\r\n const { id: assetId, folderAssetType } = assetInfo || {};\r\n const [selectedTab, setSelectedTab] = useState('details');\r\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\r\n const [warningMsg, setWarningMsg] = useState(warningMsgProp || '');\r\n\r\n const onEditImage = useCallback(() => {\r\n logger.logTrace('Image Details: edit image', { assetId });\r\n onDismiss();\r\n navigation.gotoEditImagePage({ imageId: assetId });\r\n }, [assetId, logger, navigation, onDismiss]);\r\n\r\n const onDeleteImage = useCallback(() => {\r\n logger.logTrace('Image Details: delete image', { assetId });\r\n return handleDeleteAsset();\r\n }, [assetId, logger, handleDeleteAsset]);\r\n\r\n const onRenameImage = useCallback((newName) => {\r\n logger.logTrace('Image Details: rename image', { assetId });\r\n return handleRenameAsset(newName);\r\n }, [handleRenameAsset, assetId, logger]);\r\n\r\n const onCopyUrl = useCallback(() => {\r\n logger.logTrace('Image Details: url copied', { assetId });\r\n copyUrl(assetInfo.url);\r\n }, [logger, assetId, copyUrl, assetInfo.url]);\r\n\r\n const formatDate = useCallback(date => i18n.formatDate(date, { date: 'long' }), [i18n]);\r\n\r\n const imageInfoArr = useMemo(() => {\r\n const imageInfoList = [\r\n { name: i18n.getString(_TL_(('Image ID:'))), value: assetInfo.id },\r\n {\r\n name: i18n.getString(_TL_('Dimensions:')),\r\n value: i18n.getString(_TL_('{{width}} x {{height}}'), { width: assetInfo.width, height: assetInfo.height }),\r\n },\r\n { name: i18n.getString(_TL_('Created:')), value: formatDate(assetInfo.createdTime) },\r\n { name: i18n.getString(_TL_('Modified:')), value: formatDate(assetInfo.modifiedTime) },\r\n {\r\n CustomComponent: InfoPaneItemCopyUrl,\r\n CustomComponentOptions: {\r\n i18n,\r\n url: assetInfo.url,\r\n onCopy: onCopyUrl,\r\n },\r\n key: assetInfo.url,\r\n },\r\n ];\r\n\r\n return imageInfoList;\r\n }, [assetInfo.createdTime, assetInfo.height, assetInfo.id, assetInfo.modifiedTime, assetInfo.url, assetInfo.width, formatDate, i18n, onCopyUrl]);\r\n\r\n const onGotoAds = useCallback(() => {\r\n logger.logTrace('Image Details: go to Ads grid page', { assetId });\r\n return gotoAdsPageWithAssetIdFilter();\r\n }, [gotoAdsPageWithAssetIdFilter, assetId, logger]);\r\n\r\n useEffect(() => {\r\n if (getImageById && assetInfo && assetInfo.metadata) {\r\n const {\r\n id = '',\r\n } = assetInfo;\r\n getImageById({ imageId: id, useCache: false }).then((asset) => {\r\n if (asset && asset.isSceneKeyFrame) {\r\n setWarningMsg(i18n.getString(_TL_('Once deleted, the image will still serve in any video ads that currently use it and cannot be edited.')));\r\n } else {\r\n setWarningMsg('');\r\n }\r\n });\r\n } else if (warningMsg.length > 0) {\r\n setWarningMsg('');\r\n }\r\n }, [assetInfo, getImageById, i18n, setWarningMsg, warningMsg]);\r\n\r\n const dismiss = useCallback(() => {\r\n onDismiss();\r\n }, [onDismiss]);\r\n\r\n const onRenderHeader = useCallback(() => (\r\n { setShowDeleteConfirm(true); }}\r\n onEdit={onEditImage}\r\n dismiss={dismiss}\r\n />\r\n ), [isReadonly, i18n, onEditImage, dismiss]);\r\n\r\n const closeDialog = useCallback(() => {\r\n setShowDeleteConfirm(false);\r\n }, []);\r\n\r\n const onTabSelect = useCallback((event, data) => {\r\n setSelectedTab(data.value);\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Performance'))}\r\n {i18n.getString(_TL_('Details'))}\r\n \r\n {selectedTab === 'performance' && }\r\n {selectedTab === 'details' && (\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nImageDetailsPanel.propTypes = {\r\n assetInfo: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n metadata: PropTypes.shape({}),\r\n }).isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n isReadonly: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n footerKeyDownHandler: PropTypes.func,\r\n getImageById: PropTypes.func.isRequired,\r\n warningMsgProp: PropTypes.string,\r\n loadPerfTimeSeriesData: PropTypes.func.isRequired,\r\n};\r\n\r\nImageDetailsPanel.defaultProps = {\r\n isReadonly: false,\r\n footerKeyDownHandler: _.noop,\r\n warningMsgProp: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Badge } from '@fluentui/react-components';\r\nimport { PlacementQualityToText } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useItemInfoVideoQualityStyles } from '../../styles';\r\n\r\nexport const VideoQualityBadge = ({\r\n i18n,\r\n quality,\r\n}) => {\r\n const classes = useItemInfoVideoQualityStyles();\r\n\r\n const qualityText = PlacementQualityToText[quality];\r\n return (\r\n
\r\n
{i18n.getString(_TL_('Quality:'))}
\r\n
{qualityText}
\r\n
\r\n );\r\n};\r\n\r\nVideoQualityBadge.propTypes = {\r\n quality: PropTypes.number,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nVideoQualityBadge.defaultProps = {\r\n quality: null,\r\n};\r\n","import React, { useState, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { convertTimeDuration, getClosestAspectRatio, formatFileSize } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { ItemDetailsPanelBase } from './asset-panel-base/panel-base';\r\nimport { InfoPaneHeader } from './asset-panel-base/info-panel-header';\r\nimport { DeleteAssetDialog } from './asset-panel-base/delete-asset-dialog';\r\nimport { InfoPaneItemCopyUrl } from './basic-info/info-item-copy-url';\r\nimport { ItemInfoContentBase } from './basic-info/item-info-panel-content-base';\r\nimport { VideoQualityBadge } from './basic-info/info-item-video-quality';\r\n\r\nexport const VideoDetailsPanel = ({\r\n isOpen,\r\n assetInfo,\r\n onDismiss,\r\n isReadonly,\r\n i18n,\r\n footerKeyDownHandler,\r\n logger,\r\n handleDeleteAsset,\r\n handleRenameAsset,\r\n copyUrl,\r\n notificationApi,\r\n permissions,\r\n navigation,\r\n}) => {\r\n const { id: videoId } = assetInfo || {};\r\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\r\n\r\n const onDelete = useCallback(() => {\r\n logger.logTrace('Video Details: delete video', { videoId });\r\n return handleDeleteAsset();\r\n }, [logger, videoId, handleDeleteAsset]);\r\n\r\n const onRenameVideo = useCallback((newName) => {\r\n logger.logTrace('Video Details: rename video', { videoId });\r\n return handleRenameAsset(newName);\r\n }, [handleRenameAsset, logger, videoId]);\r\n\r\n const onEditVideo = useCallback(() => {\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Video Details: edit video', { assetId: assetInfo.id });\r\n }\r\n onDismiss();\r\n navigation.gotoEditVideoPage({ videoId: assetInfo.id });\r\n }, [onDismiss, navigation, logger]);\r\n\r\n const onCopyUrl = useCallback((url) => {\r\n logger.logTrace('Video Details: url copied', { videoId });\r\n copyUrl(url);\r\n }, [copyUrl, logger, videoId]);\r\n\r\n const formatDate = useCallback(date => i18n.formatDate(date, { date: 'long' }), [i18n]);\r\n\r\n const videoTemplateUIEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n const disableEdit = !(videoTemplateUIEnabled && assetInfo && assetInfo.id && assetInfo.metaData);\r\n\r\n const videoInfoArr = useMemo(() => {\r\n const videoInfoList = [\r\n { name: i18n.getString(_TL_(('Video ID:'))), value: assetInfo.id },\r\n {\r\n name: i18n.getString(_TL_('Dimensions:')),\r\n value: `${assetInfo.width} X ${assetInfo.height}`,\r\n valid: assetInfo.height && assetInfo.height > 0 && assetInfo.width && assetInfo.width > 0,\r\n },\r\n {\r\n name: i18n.getString(_TL_('Aspect ratio:')),\r\n value: getClosestAspectRatio(assetInfo.width, assetInfo.height),\r\n valid: assetInfo.height > 0 && assetInfo.width > 0,\r\n },\r\n {\r\n name: i18n.getString(_TL_('File size:')),\r\n value: `${formatFileSize(assetInfo.fileSize)} ${i18n.getString(_TL_('MB'))}`,\r\n valid: assetInfo.fileSize > 0,\r\n },\r\n {\r\n name: i18n.getString(_TL_('Duration:')),\r\n value: convertTimeDuration(assetInfo.durationInMS),\r\n valid: assetInfo.durationInMS > 0,\r\n },\r\n { name: i18n.getString(_TL_('Modified:')), value: formatDate(assetInfo.modifiedTime) },\r\n { name: i18n.getString(_TL_('Added:')), value: formatDate(assetInfo.createdTime) },\r\n {\r\n CustomComponent: VideoQualityBadge,\r\n CustomComponentOptions: {\r\n i18n,\r\n quality: assetInfo.quality,\r\n },\r\n key: assetInfo.quality,\r\n },\r\n {\r\n CustomComponent: InfoPaneItemCopyUrl,\r\n CustomComponentOptions: {\r\n i18n,\r\n url: assetInfo.url,\r\n onCopy: () => { onCopyUrl(assetInfo.url); },\r\n },\r\n key: assetInfo.url,\r\n },\r\n ];\r\n\r\n return videoInfoList;\r\n }, [assetInfo.createdTime, assetInfo.durationInMS, assetInfo.id, assetInfo.modifiedTime, assetInfo.url, formatDate, i18n, onCopyUrl]);\r\n\r\n const dismiss = useCallback(() => {\r\n onDismiss();\r\n }, [onDismiss]);\r\n\r\n const onRenderHeader = useCallback(() => (\r\n { setShowDeleteConfirm(true); }}\r\n onEdit={onEditVideo}\r\n disableEdit={disableEdit}\r\n />\r\n ), [isReadonly, i18n, dismiss]);\r\n\r\n const closeDialog = useCallback(() => {\r\n setShowDeleteConfirm(false);\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\nVideoDetailsPanel.propTypes = {\r\n assetInfo: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n metadata: PropTypes.shape({}),\r\n }).isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n isReadonly: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n footerKeyDownHandler: PropTypes.func,\r\n};\r\n\r\nVideoDetailsPanel.defaultProps = {\r\n isReadonly: false,\r\n footerKeyDownHandler: _.noop,\r\n};\r\n","import { useMemo } from 'react';\r\nimport { FolderAssetType } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { ImagePreview } from '../components/image-preview';\r\nimport { VideoPreview } from '../components/video-preview';\r\nimport { ImageDetailsPanel } from '../components/image-panel';\r\nimport { VideoDetailsPanel } from '../components/video-panel';\r\n\r\nconst previewCompMap = {\r\n [FolderAssetType.Image]: ImagePreview,\r\n [FolderAssetType.Video]: VideoPreview,\r\n};\r\n\r\nconst panelCompMap = {\r\n [FolderAssetType.Image]: ImageDetailsPanel,\r\n [FolderAssetType.Video]: VideoDetailsPanel,\r\n};\r\n\r\n\r\nexport const usePreviewAndPanel = ({ folderAssetType }) => {\r\n const AssetPreview = useMemo(() => previewCompMap[folderAssetType], [folderAssetType]);\r\n const AssetDetailsPanel = useMemo(() => panelCompMap[folderAssetType], [folderAssetType]);\r\n\r\n return {\r\n AssetPreview,\r\n AssetDetailsPanel,\r\n };\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classnames from 'classnames';\r\nimport { DEFAULT_PAGE_SIZE, AdsStudioSpinner } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { Layer, Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { useLayoutStyles } from '../styles';\r\n\r\nexport const AssetDetailsPageLayout = ({\r\n navigation,\r\n navigateToOtherItem,\r\n // navigateToFallbackPage,\r\n itemId,\r\n loadedItems,\r\n loadMoreItemsAsync,\r\n renderItemPreview,\r\n renderItemDetails,\r\n // permissions,\r\n pageSize,\r\n reloadLandingPageRef,\r\n onClose,\r\n}) => {\r\n const [hideContent] = useState(false);\r\n const [loadMoreFlag, setLoadMoreFlag] = useState(false);\r\n\r\n const currentIndex = useMemo(\r\n () => _.findIndex(loadedItems, item => item.id === itemId),\r\n [itemId, loadedItems]\r\n );\r\n\r\n const itemInfo = useMemo(\r\n () => _.find(loadedItems, item => item.id === itemId),\r\n [loadedItems, itemId]\r\n );\r\n\r\n const redirectToOtherItem = useCallback((index) => {\r\n const { id, folderAssetType } = loadedItems[index];\r\n navigateToOtherItem({ id, folderAssetType });\r\n }, [loadedItems, navigateToOtherItem]);\r\n\r\n // in case user refresh in detail page\r\n // useEffect(() => {\r\n // if (!itemInfo) {\r\n // if (permissions && permissions.dynamic.SmartMediaGenerationPrototype) {\r\n // return;\r\n // }\r\n // navigateToFallbackPage();\r\n // }\r\n // }, [itemInfo, navigateToFallbackPage, permissions]);\r\n\r\n useEffect(() => {\r\n if (loadMoreFlag && loadedItems[currentIndex + 1]) {\r\n setLoadMoreFlag(false);\r\n redirectToOtherItem(currentIndex + 1);\r\n }\r\n }, [currentIndex, loadMoreFlag, loadedItems, redirectToOtherItem]);\r\n\r\n const dismiss = useCallback(() => {\r\n if (onClose) {\r\n onClose();\r\n }\r\n navigation.goBack({ reload: reloadLandingPageRef.current });\r\n }, [navigation, onClose, reloadLandingPageRef]);\r\n\r\n const gotoNext = useCallback(() => {\r\n const nextIndex = currentIndex + 1;\r\n if (nextIndex >= _.size(loadedItems)) {\r\n setLoadMoreFlag(true);\r\n loadMoreItemsAsync({ count: pageSize || DEFAULT_PAGE_SIZE });\r\n } else {\r\n redirectToOtherItem(nextIndex);\r\n }\r\n }, [currentIndex, loadMoreItemsAsync, loadedItems, pageSize, redirectToOtherItem]);\r\n\r\n const gotoPrevious = useCallback(() => {\r\n const previousIndex = currentIndex - 1;\r\n redirectToOtherItem(previousIndex);\r\n }, [currentIndex, redirectToOtherItem]);\r\n\r\n const itemPreviewRef = useRef();\r\n\r\n const footerKeyDownHandler = useCallback((event) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n if (event.code === 'Tab' && itemPreviewRef && itemPreviewRef.current) {\r\n itemPreviewRef.current.focus();\r\n }\r\n }, []);\r\n\r\n const classes = useLayoutStyles();\r\n\r\n return (\r\n \r\n \r\n {itemInfo && !loadMoreFlag ? (\r\n <>\r\n
\r\n {renderItemPreview({\r\n itemData: itemInfo,\r\n shouldHideContent: hideContent,\r\n currentIndex,\r\n gotoNext,\r\n gotoPrevious,\r\n })}\r\n
\r\n {renderItemDetails({\r\n itemData: itemInfo,\r\n dismiss,\r\n footerKeyDownHandler,\r\n })}\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nAssetDetailsPageLayout.propTypes = {\r\n navigation: PropTypes.shape({\r\n }).isRequired,\r\n navigateToOtherItem: PropTypes.func.isRequired,\r\n // navigateToFallbackPage: PropTypes.func.isRequired,\r\n itemId: PropTypes.string.isRequired,\r\n loadedItems: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n folderAssetType: PropTypes.string.isRequired,\r\n })),\r\n loadMoreItemsAsync: PropTypes.func.isRequired,\r\n renderItemPreview: PropTypes.func.isRequired,\r\n renderItemDetails: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n SmartMediaGenerationPrototype: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n pageSize: PropTypes.number,\r\n};\r\n\r\nAssetDetailsPageLayout.defaultProps = {\r\n loadedItems: [],\r\n pageSize: DEFAULT_PAGE_SIZE,\r\n};\r\n","import { useEffect, useCallback, useRef } from 'react';\r\n\r\nexport const useDetailsPageSetup = ({\r\n currentItemId,\r\n folderAssetType,\r\n logger,\r\n navigation,\r\n totalAssetCount,\r\n assets,\r\n loadMoreData,\r\n renameAsset,\r\n onClose,\r\n}) => {\r\n const reloadLandingPageRef = useRef(false);\r\n\r\n useEffect(() => {\r\n logger.logTrace('Item Details: page loaded', { currentItemId, folderAssetType });\r\n }, [currentItemId, folderAssetType, logger]);\r\n\r\n const navigateToFallbackPage = useCallback(() => {\r\n logger.logTrace('Item Details: no info, redirect to landing page');\r\n navigation.gotoLandingPage({ redirect: true });\r\n }, [logger, navigation]);\r\n\r\n const navigateToOtherItem = useCallback(({\r\n id: otherItemId,\r\n folderAssetType: otherItemFolderAssetType,\r\n }) => {\r\n navigation.gotoAssetDetails({\r\n assetId: otherItemId, folderAssetType: otherItemFolderAssetType, assets, totalAssetCount, loadMoreData, renameAsset, onClose,\r\n });\r\n }, [assets, loadMoreData, navigation, onClose, renameAsset, totalAssetCount]);\r\n\r\n const onDismissed = useCallback(() => {\r\n navigation.goBack({ reload: reloadLandingPageRef.current });\r\n }, [navigation]);\r\n\r\n return {\r\n navigateToFallbackPage,\r\n navigateToOtherItem,\r\n onDismissed,\r\n reloadLandingPageRef,\r\n };\r\n};\r\n","import React, { useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ClarityTags, useClarityTags, DEFAULT_PAGE_SIZE } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { usePreviewAndPanel } from './hooks/use-preiview-and-panel';\r\nimport { AssetDetailsPageLayout } from './components/details-page-layout';\r\nimport { useDetailsPageSetup } from './hooks/use-details-page-setup';\r\nimport { useAssetDetailsPageActions } from './hooks/use-asset-details-page-actions';\r\n\r\nexport const AssetDetailsPage = ({\r\n assetId, dataService, logger, permissions, pageSize, navigation, open, i18n, assets, totalAssetCount, folderAssetType, isReadonly, notificationApi, loadMoreData, renameAsset, getGranularityEnum, perfMetricDateRange, onClose,\r\n}) => {\r\n useClarityTags([ClarityTags.LaunchedAssetLibrary, ClarityTags.LaunchedImageDetails]);\r\n\r\n const { getImageById, loadPerfTimeSeriesData } = dataService || {};\r\n const { AssetPreview, AssetDetailsPanel } = usePreviewAndPanel({ folderAssetType });\r\n const {\r\n navigateToFallbackPage,\r\n navigateToOtherItem,\r\n reloadLandingPageRef,\r\n } = useDetailsPageSetup({\r\n currentItemId: assetId,\r\n folderAssetType,\r\n logger,\r\n navigation,\r\n assets,\r\n totalAssetCount,\r\n loadMoreData,\r\n renameAsset,\r\n onClose,\r\n });\r\n\r\n const {\r\n handleDeleteAsset,\r\n handleRenameAsset,\r\n gotoAdsPageWithAssetIdFilter,\r\n copyUrl,\r\n } = useAssetDetailsPageActions({\r\n dataService,\r\n navigation,\r\n assetId,\r\n folderAssetType,\r\n reloadLandingPageRef,\r\n renameAsset,\r\n });\r\n\r\n useEffect(() => {\r\n logger.logTrace('Asset Details: page loaded', { assetId });\r\n }, [assetId, logger]);\r\n\r\n const renderAssetPreview = useCallback(({\r\n itemData,\r\n shouldHideContent,\r\n currentIndex,\r\n gotoNext,\r\n gotoPrevious,\r\n }) => (\r\n \r\n ), [i18n, totalAssetCount, AssetPreview]);\r\n\r\n const renderAssetDetailsView = useCallback(({ itemData, dismiss, footerKeyDownHandler }) => (\r\n \r\n ), [AssetDetailsPanel, open, i18n, getImageById, isReadonly, logger, navigation, handleDeleteAsset, handleRenameAsset, notificationApi, copyUrl, gotoAdsPageWithAssetIdFilter, loadPerfTimeSeriesData, getGranularityEnum, perfMetricDateRange, permissions]);\r\n\r\n return (\r\n open && (\r\n \r\n )\r\n );\r\n};\r\n\r\nAssetDetailsPage.propTypes = {\r\n dataService: PropTypes.shape({}).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n navigation: PropTypes.shape({\r\n gotoEditImage: PropTypes.func.isRequired,\r\n goBack: PropTypes.func.isRequired,\r\n redirectToLandingPage: PropTypes.func.isRequired,\r\n redirectToEditImage: PropTypes.func.isRequired,\r\n redirectToItemDetail: PropTypes.func.isRequired,\r\n gotoAdsPageWithFilter: PropTypes.func.isRequired,\r\n }).isRequired,\r\n assetId: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n SmartMediaGenerationPrototype: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n pageSize: PropTypes.number,\r\n open: PropTypes.bool.isRequired,\r\n};\r\n\r\nAssetDetailsPage.defaultProps = {\r\n pageSize: DEFAULT_PAGE_SIZE,\r\n};\r\n","import { useCallback } from 'react';\r\n\r\nexport const useAssetDetailsPageActions = ({\r\n dataService,\r\n navigation,\r\n assetId,\r\n folderAssetType,\r\n reloadLandingPageRef,\r\n renameAsset,\r\n}) => {\r\n const {\r\n deleteAsset,\r\n } = dataService || {};\r\n\r\n const handleDeleteAsset = useCallback(() => deleteAsset({ assetId, folderAssetType }).then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n reloadLandingPageRef.current = true;\r\n }), [assetId, deleteAsset, folderAssetType, reloadLandingPageRef]);\r\n\r\n const handleRenameAsset = useCallback(newName => renameAsset({ assetId, name: newName, folderAssetType }).then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n reloadLandingPageRef.current = true;\r\n }), [assetId, folderAssetType, reloadLandingPageRef, renameAsset]);\r\n\r\n const gotoAdsPageWithAssetIdFilter = useCallback(() => navigation.gotoAdsPageWithAssetIdFilter({\r\n folderAssetType,\r\n assetId,\r\n }), [assetId, folderAssetType, navigation]);\r\n\r\n const copyUrl = useCallback((url) => {\r\n navigator.clipboard.writeText(url);\r\n }, []);\r\n\r\n return {\r\n handleDeleteAsset,\r\n handleRenameAsset,\r\n gotoAdsPageWithAssetIdFilter,\r\n copyUrl,\r\n };\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useBackgroundRemovalModalStyle = makeStyles({\r\n uploadContainer: {\r\n position: 'relative',\r\n },\r\n contentArea: {\r\n height: '470px',\r\n overflowY: 'auto',\r\n scrollbarWidth: 'none',\r\n },\r\n chooseImageContainer: {\r\n ...shorthands.border('1px', 'dashed', '#D1D1D1'),\r\n ...shorthands.borderRadius('8px'),\r\n ...shorthands.padding('16px', '0px', '24px'),\r\n cursor: 'pointer',\r\n width: '100%',\r\n height: '240px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'flex-start',\r\n },\r\n uploadIcon: {\r\n display: 'block',\r\n width: '128px',\r\n height: '128px',\r\n ...shorthands.margin('0px', 'auto', '4px'),\r\n },\r\n uploadTitle: {\r\n fontSize: '16px',\r\n lineHeight: '22px',\r\n color: '#1A1A1A',\r\n textAlign: 'center',\r\n },\r\n browse: {\r\n fontStyle: 'normal',\r\n marginLeft: '12px',\r\n color: '#115EA3',\r\n },\r\n uploadSubtext: {\r\n position: 'absolute',\r\n bottom: '24px',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: '#6C6C6C',\r\n textAlign: 'center',\r\n marginTop: '2px',\r\n },\r\n uploadButton: {\r\n position: 'absolute',\r\n width: '0px',\r\n },\r\n gridContainer: {\r\n marginTop: '12px',\r\n },\r\n gridTitle: {\r\n lineHeight: '20px',\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n color: 'rgba(36, 36, 36, 1)',\r\n },\r\n loadingMask: {\r\n position: 'absolute',\r\n top: '0px',\r\n left: '0px',\r\n right: '0px',\r\n bottom: '0px',\r\n ...shorthands.margin('auto'),\r\n backgroundColor: 'rgba(255, 255, 255, 0.5)',\r\n zIndex: '1',\r\n },\r\n helpLink: {\r\n color: '#337ab7',\r\n ...shorthands.textDecoration('underline'),\r\n fontWeight: 'normal',\r\n backgroundColor: 'transparent',\r\n ...shorthands.borderRadius('0px', '0px', '0px', '0px'),\r\n ...shorthands.border('none'),\r\n width: '550px',\r\n display: 'block',\r\n textAlign: 'center',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n alertError: {\r\n marginTop: '10px',\r\n },\r\n});\r\n\r\n","import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { PanelImageGrid, FolderAssetType, CSMLAssetSource } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { useBackgroundRemovalModalStyle } from './background-removal-modal-style';\r\n\r\n\r\nexport const BackgroundRemovalLibraryGrid = ({\r\n i18n, dataService, notificationApi, onSelectedImageChange, contentRef,\r\n}) => {\r\n const [isPageInited, setPageInited] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n const selectedImageIdRef = useRef([]);\r\n const classes = useBackgroundRemovalModalStyle();\r\n const {\r\n assets,\r\n loadData,\r\n loadMoreData,\r\n } = dataService;\r\n\r\n const validAssets = useMemo(() => (_.filter(assets, item => (item.sourceType !== CSMLAssetSource.Shutterstock))), [assets]);\r\n\r\n const onSelectImage = useCallback((imageId) => {\r\n if (imageId === selectedImageIdRef.current) {\r\n selectedImageIdRef.current = null;\r\n onSelectedImageChange(null);\r\n } else {\r\n const selectedImageitem = validAssets.find(item => item.id === imageId);\r\n selectedImageIdRef.current = imageId;\r\n onSelectedImageChange(selectedImageitem);\r\n }\r\n }, [validAssets, onSelectedImageChange]);\r\n\r\n const onFailedToLoadData = useCallback(() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Failed to load images. Please refresh the page and try again.')));\r\n }, [i18n, notificationApi]);\r\n\r\n const loadMoreDataWithLoading = useCallback((props) => {\r\n setLoadingData(true);\r\n loadMoreData(props).finally(() => {\r\n setLoadingData(false);\r\n });\r\n }, [loadMoreData]);\r\n\r\n // init page\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n setPageInited(true);\r\n }\r\n }, [isPageInited]);\r\n\r\n // load data for initial page load\r\n useEffect(() => {\r\n if (!isPageInited) {\r\n // wait until page is initialized\r\n return;\r\n }\r\n setLoadingData(true);\r\n loadData({\r\n assetTypeFilter: FolderAssetType.Image,\r\n isGlobalSearch: true,\r\n searchText: '',\r\n sortBy: null,\r\n })\r\n .catch(() => {\r\n onFailedToLoadData();\r\n }).finally(() => {\r\n setLoadingData(false);\r\n });\r\n }, [isPageInited, loadData, onFailedToLoadData]);\r\n\r\n const isPageLoading = !isPageInited || loadingData;\r\n\r\n return (\r\n
\r\n
{i18n.getString(_TL_('Library'))}
\r\n \r\n
\r\n );\r\n};\r\n","import React, { useCallback, useRef, useState, useMemo } from 'react';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport {\r\n Dialog,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogBody,\r\n DialogActions,\r\n Button,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarActions, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\nimport { ChooseImageIcon, supportedImageExtensions, useUploadFiles, AdsStudioSpinner, isReachFileSizeLimit, getReachFileSizeLimitErrorMessage, } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { parseFileName } from '@bingads-webui-campaign-react/upload-file-picker';\r\nimport { BackgroundRemovalLibraryGrid } from './library-grid';\r\nimport { ViewName } from '../edit-image-page-component/model/utils';\r\nimport { useBackgroundRemovalModalStyle } from './background-removal-modal-style';\r\n\r\nconst UploadArea = ({\r\n i18n, onFileRead, setErrors,\r\n}) => {\r\n const classes = useBackgroundRemovalModalStyle();\r\n const uploadInput = useRef();\r\n /* istanbul ignore next */\r\n const onClickUpload = useCallback(() => {\r\n uploadInput.current.click();\r\n }, []);\r\n\r\n const clearInputFile = useCallback((event) => {\r\n if (event) {\r\n // eslint-disable-next-line no-param-reassign\r\n event.target.value = '';\r\n }\r\n }, []);\r\n\r\n const readFile = useCallback((fileObjects, event) => {\r\n const selectedFiles = !_.isUndefined(fileObjects) && fileObjects.length > 0 && fileObjects;\r\n if (selectedFiles) {\r\n const selectedFilesCount = selectedFiles.length;\r\n let fileIndex;\r\n const errorArr = [];\r\n\r\n for (fileIndex = 0; fileIndex < selectedFilesCount; fileIndex += 1) {\r\n const fileObj = selectedFiles[fileIndex];\r\n const fileSizeMB = (fileObj.size / 1024 / 1024).toFixed(3);\r\n let reachLimit;\r\n\r\n if (isReachFileSizeLimit) {\r\n const { ext } = parseFileName(fileObj.name);\r\n reachLimit = isReachFileSizeLimit({ ext, fileSizeMB });\r\n }\r\n\r\n if (reachLimit) {\r\n errorArr.push(getReachFileSizeLimitErrorMessage({ i18n }));\r\n\r\n break;\r\n }\r\n }\r\n if (_.isEmpty(errorArr)) {\r\n return onFileRead(selectedFiles, () => clearInputFile(event));\r\n }\r\n clearInputFile(event);\r\n setErrors(errorArr);\r\n } // else no media picked, so do nothing\r\n\r\n return ''; // for testability\r\n }, [clearInputFile, i18n, onFileRead, setErrors]);\r\n\r\n const handleUploadFile = useCallback((event) => {\r\n const { files } = event.target;\r\n readFile(files, event);\r\n }, [readFile]);\r\n\r\n const handleDropFile = useCallback((event) => {\r\n event.preventDefault();\r\n const droppedFiles = event.dataTransfer.files;\r\n readFile(droppedFiles);\r\n }, [readFile]);\r\n\r\n const handleDropOver = useCallback((event) => {\r\n event.preventDefault();\r\n }, []);\r\n\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n {i18n.getString(_TL_('Minimum image size: 703 x 368 pixels.'))}\r\n \r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nconst LoadingComp = () => {\r\n const classes = useBackgroundRemovalModalStyle();\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\n\r\nconst BackgroundRemovalModal = ({\r\n navigation, i18n, dataService, logger, notificationApi, aid, globalLegacyI18n, open, isUploadImageUpscaleEnabled,\r\n}) => {\r\n const [errors, setErrors] = useState([]);\r\n const [selectedImage, setSelectedImage] = useState();\r\n const globalI18n = useMemo(() => globalLegacyI18n.get('$/i18n!legacy/global'), [globalLegacyI18n]);\r\n const classes = useBackgroundRemovalModalStyle();\r\n\r\n const filePickerI18n = useMemo(() => mergeI18n(globalI18n, i18n), [globalI18n, i18n]);\r\n /* istanbul ignore next */\r\n const onFilesAddedCallback = useCallback(() => {\r\n setErrors([]);\r\n }, []);\r\n /* istanbul ignore next */\r\n const uploadCallback = useCallback((imageId) => {\r\n if (imageId) {\r\n navigation.goBack();\r\n setSelectedImage(null);\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId: imageId });\r\n }\r\n navigation.gotoEditImagePage({\r\n imageId, initialCurrentView: ViewName.BackgroundChangeView,\r\n });\r\n }\r\n }, [logger, navigation]);\r\n\r\n const onClickCancel = useCallback(() => {\r\n navigation.goBack();\r\n setSelectedImage(null);\r\n setErrors([]);\r\n }, [navigation]);\r\n\r\n const onSelectedImageChange = useCallback((newSelectedImage) => {\r\n setSelectedImage(newSelectedImage);\r\n }, []);\r\n\r\n const onClickContinue = useCallback(() => {\r\n navigation.goBack();\r\n setSelectedImage(null);\r\n if (logger && logger.logTrace) {\r\n logger.logTrace('Image Details: edit image', { assetId: selectedImage.id });\r\n }\r\n navigation.gotoEditImagePage({\r\n imageId: selectedImage.id, initialCurrentView: ViewName.BackgroundChangeView,\r\n });\r\n }, [logger, navigation, selectedImage]);\r\n\r\n const {\r\n previewArr, onFileRead,\r\n } = useUploadFiles({\r\n dataService, logger, notificationApi, i18n, aid, onFilesAddedCallback, setErrors, filePickerI18n, uploadCallback, isUploadImageUpscaleEnabled,\r\n });\r\n\r\n const isUploadingFile = useMemo(() => !!(previewArr && previewArr.length), [previewArr]);\r\n const dialogContentRef = useRef();\r\n const isContinueButtonDisabled = useMemo(() => !selectedImage || isUploadingFile, [isUploadingFile, selectedImage]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Choose an image'))}\r\n \r\n \r\n \r\n {\r\n errors.length > 0 &&\r\n errors.map((errMsg, index) => (\r\n \r\n \r\n {errMsg}\r\n \r\n setErrors([])}\r\n aria-label=\"dismiss\"\r\n appearance=\"transparent\"\r\n icon={}\r\n />\r\n }\r\n />\r\n \r\n ))\r\n }\r\n { isUploadingFile && }\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\nexport const BackgroundRemovalModalComponent = BackgroundRemovalModal;\r\n","import {\r\n FolderRegular,\r\n ImageRegular,\r\n HomeRegular,\r\n DataTrendingRegular,\r\n StyleGuideRegular,\r\n VideoRegular,\r\n KeyboardLayoutOneHandedLeft20Regular,\r\n} from '@fluentui/react-icons';\r\nimport { getSearchQuery } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst isSubPageSelected = (pathname, subPage, rootRoute) => pathname.includes(`${rootRoute}/${subPage}`);\r\n\r\nconst isHomePageSelected = (pathname, rootRoute) => (pathname === rootRoute) || isSubPageSelected(pathname, 'home', rootRoute);\r\n\r\nconst gotoPage = (history, rootRoute, path, search) => {\r\n const currentSearch = getSearchQuery({ search });\r\n history.push(`${rootRoute}${path}${currentSearch}`);\r\n};\r\n\r\nexport const gotoLibraryPage = (history, rootRoute, search) => {\r\n const isLibraryPage = isSubPageSelected(history.location.pathname, 'library', rootRoute);\r\n if (!isLibraryPage) {\r\n gotoPage(history, rootRoute, '/library', search);\r\n }\r\n};\r\n\r\nexport const isLibraryPageSelected = (pathname, rootRoute) => isSubPageSelected(pathname, 'library', rootRoute);\r\n\r\nexport const getStaticItems = (history, rootRoute, navigateIntoFolderItem, brandKitEnabled) => {\r\n const { location } = history;\r\n const { search, pathname } = location;\r\n\r\n const isBrandKitEnabled = brandKitEnabled;\r\n\r\n return [\r\n {\r\n id: 'ad-studio-home-page',\r\n name: _TL_('Home'),\r\n route: 'adstudio/home',\r\n onClick: () => gotoPage(history, rootRoute, '/home', search),\r\n icon: HomeRegular,\r\n isSelected: isHomePageSelected(pathname, rootRoute),\r\n },\r\n {\r\n id: 'ad-studio-images-page',\r\n name: _TL_('Images'),\r\n route: 'adstudio/images',\r\n onClick: () => gotoPage(history, rootRoute, '/images', search),\r\n icon: ImageRegular,\r\n isSelected: isSubPageSelected(pathname, 'images', rootRoute),\r\n },\r\n ...isBrandKitEnabled ? [{\r\n id: 'ad-studio-display-templates-page',\r\n name: _TL_('Display templates'),\r\n route: 'adstudio/displaytemplates',\r\n onClick: () => gotoPage(history, rootRoute, '/displaytemplates', search),\r\n icon: KeyboardLayoutOneHandedLeft20Regular,\r\n isSelected: isSubPageSelected(pathname, 'displaytemplates', rootRoute),\r\n }] : [],\r\n {\r\n id: 'ad-studio-videos-page',\r\n name: _TL_('Videos'),\r\n route: 'adstudio/videos',\r\n onClick: () => gotoPage(history, rootRoute, '/videos', search),\r\n icon: VideoRegular,\r\n isSelected: isSubPageSelected(pathname, 'videos', rootRoute),\r\n },\r\n {\r\n id: 'ad-studio-performance-page',\r\n name: _TL_('Performance'),\r\n route: 'adstudio/performance',\r\n onClick: () => gotoPage(history, rootRoute, '/performance', search),\r\n icon: DataTrendingRegular,\r\n isSelected: isSubPageSelected(pathname, 'performance', rootRoute),\r\n },\r\n ...isBrandKitEnabled ? [{\r\n id: 'ad-studio-brand-kit-page',\r\n name: _TL_('Brand kit'),\r\n route: 'adstudio/brandkit',\r\n onClick: () => gotoPage(history, rootRoute, '/brandkit', search),\r\n icon: StyleGuideRegular,\r\n isSelected: isSubPageSelected(pathname, 'brandkit', rootRoute),\r\n }] : [],\r\n {\r\n id: 'ad-studio-library-page',\r\n name: _TL_('Library'),\r\n route: 'adstudio/library',\r\n onClick: () => {\r\n gotoPage(history, rootRoute, '/library', search);\r\n navigateIntoFolderItem({ folder: {} });\r\n },\r\n icon: FolderRegular,\r\n isSelected: isSubPageSelected(pathname, 'library', rootRoute),\r\n showDivider: true,\r\n },\r\n ];\r\n};\r\n\r\nexport const getGroupedItems = (history, rootRoute, navigateIntoFolderItem, brandKitEnabled) => {\r\n const { location } = history;\r\n const { search, pathname } = location;\r\n\r\n const isBrandKitEnabled = brandKitEnabled;\r\n\r\n return [\r\n [\r\n {\r\n id: 'ad-studio-home-page',\r\n name: _TL_('Home'),\r\n route: 'adstudio/home',\r\n onClick: () => gotoPage(history, rootRoute, '/home', search),\r\n icon: HomeRegular,\r\n isSelected: isHomePageSelected(pathname, rootRoute),\r\n },\r\n {\r\n id: 'ad-studio-images-page',\r\n name: _TL_('Images'),\r\n route: 'adstudio/images',\r\n onClick: () => gotoPage(history, rootRoute, '/images', search),\r\n icon: ImageRegular,\r\n isSelected: isSubPageSelected(pathname, 'images', rootRoute),\r\n },\r\n ...isBrandKitEnabled ? [{\r\n id: 'ad-studio-display-templates-page',\r\n name: _TL_('Display templates'),\r\n route: 'adstudio/displaytemplates',\r\n onClick: () => gotoPage(history, rootRoute, '/displaytemplates', search),\r\n icon: KeyboardLayoutOneHandedLeft20Regular,\r\n isSelected: isSubPageSelected(pathname, 'displaytemplates', rootRoute),\r\n }] : [],\r\n {\r\n id: 'ad-studio-videos-page',\r\n name: _TL_('Videos'),\r\n route: 'adstudio/videos',\r\n onClick: () => gotoPage(history, rootRoute, '/videos', search),\r\n icon: VideoRegular,\r\n isSelected: isSubPageSelected(pathname, 'videos', rootRoute),\r\n },\r\n {\r\n id: 'ad-studio-performance-page',\r\n name: _TL_('Performance'),\r\n route: 'adstudio/performance',\r\n onClick: () => gotoPage(history, rootRoute, '/performance', search),\r\n icon: DataTrendingRegular,\r\n isSelected: isSubPageSelected(pathname, 'performance', rootRoute),\r\n },\r\n ...isBrandKitEnabled ? [{\r\n id: 'ad-studio-brand-kit-page',\r\n name: _TL_('Brand kit'),\r\n route: 'adstudio/brandkit',\r\n onClick: () => gotoPage(history, rootRoute, '/brandkit', search),\r\n icon: StyleGuideRegular,\r\n isSelected: isSubPageSelected(pathname, 'brandkit', rootRoute),\r\n }] : [],\r\n ],\r\n [\r\n {\r\n id: 'ad-studio-library-page',\r\n name: _TL_('Library'),\r\n route: 'adstudio/library',\r\n onClick: () => {\r\n gotoPage(history, rootRoute, '/library', search);\r\n navigateIntoFolderItem({ folder: {} });\r\n },\r\n icon: FolderRegular,\r\n isSelected: isSubPageSelected(pathname, 'library', rootRoute),\r\n showDivider: true,\r\n },\r\n {\r\n id: 'folder-path-tree',\r\n },\r\n ],\r\n ];\r\n};\r\n\r\nexport const LOADING_CELL = {};\r\n\r\nexport const MaxFolderLevel = 6;\r\n","import { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\n\r\nimport { ROOT_FOLDER_ID, handleRealUsedFlag, RealUsedFlagSuffix } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nimport { getStaticItems, gotoLibraryPage, isLibraryPageSelected } from './utils';\r\n\r\nexport const useAdStudioNavigation = ({\r\n history,\r\n rootRoute,\r\n dataService,\r\n onDropToFolder: onDropToFolderProp,\r\n permissions,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const [selectedItemId, setSelectedItemId] = useState(null);\r\n const [selectedFolderId, setSelectedFolderId] = useState(null);\r\n const [isCopilotEnabled, setIsCopilotEnabled] = useState(false);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const {\r\n folderPathTree,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n initializeFolderPathTree,\r\n navigateIntoFolderItem,\r\n navigateIntoRootFolder,\r\n currentFolder,\r\n } = dataService;\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const staticItems = useMemo(() => getStaticItems(history, rootRoute, navigateIntoFolderItem, isCopilotEnabled), [history.location.pathname, rootRoute, navigateIntoFolderItem, isCopilotEnabled]);\r\n\r\n const handleFolderItemClicked = useCallback((folder) => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n const { folderId } = folder;\r\n setSelectedItemId(folderId);\r\n setSelectedFolderId(folderId);\r\n gotoLibraryPage(history, rootRoute, history.location.search);\r\n navigateIntoFolderItem({ folder });\r\n }, [adsStudioAccountPreferences, history, navigateIntoFolderItem, rootRoute]);\r\n\r\n const onDropToFolder = useCallback((folder) => {\r\n onDropToFolderProp(folder);\r\n }, [onDropToFolderProp]);\r\n\r\n useEffect(() => {\r\n if (staticItems.length > 0) {\r\n const selectedItem = staticItems.find(item => item.isSelected);\r\n if (selectedItem) {\r\n if (selectedFolderId && isLibraryPageSelected(history.location.pathname, rootRoute)) {\r\n // if select folder, then the folder should have selected status instead of the library item\r\n setSelectedItemId(selectedFolderId);\r\n } else {\r\n setSelectedItemId(selectedItem.id);\r\n }\r\n }\r\n }\r\n }, [staticItems, history, selectedFolderId, rootRoute]);\r\n\r\n useEffect(() => {\r\n if (!selectedItemId) {\r\n initializeFolderPathTree();\r\n }\r\n }, [initializeFolderPathTree, selectedItemId]);\r\n\r\n useEffect(() => {\r\n if (currentFolder && currentFolder.folderId !== ROOT_FOLDER_ID && isLibraryPageSelected(history.location.pathname, rootRoute)) {\r\n setSelectedFolderId(currentFolder.folderId);\r\n setSelectedItemId(currentFolder.folderId);\r\n } else if (currentFolder && currentFolder.folderId === ROOT_FOLDER_ID) {\r\n setSelectedFolderId(null);\r\n const selectedItem = staticItems.find(item => item.isSelected);\r\n if (selectedItem) {\r\n setSelectedItemId(selectedItem.id);\r\n }\r\n }\r\n }, [currentFolder, history.location.pathname, rootRoute, staticItems]);\r\n\r\n useEffect(() => {\r\n if (isBrandKitEnabled) {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(isRestricted => setIsCopilotEnabled(!isRestricted));\r\n } else {\r\n setIsCopilotEnabled(false);\r\n }\r\n }, [isBrandKitEnabled, permissions, serverContext]);\r\n\r\n return {\r\n staticItems,\r\n selectedItemId,\r\n setSelectedItemId,\r\n selectedFolderId,\r\n setSelectedFolderId,\r\n folderPathTree: folderPathTree[0],\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n handleFolderItemClicked,\r\n onDropToFolder,\r\n navigateIntoRootFolder,\r\n };\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Tab, mergeClasses } from '@fluentui/react-components';\r\n\r\nexport const CustomTab = ({\r\n value,\r\n classes,\r\n isSelected,\r\n children,\r\n}) => (\r\n
\r\n \r\n {children}\r\n \r\n
\r\n);\r\n\r\nCustomTab.propTypes = {\r\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n classes: PropTypes.shape({\r\n tabItemWrapper: PropTypes.string,\r\n selected: PropTypes.string,\r\n }).isRequired,\r\n isSelected: PropTypes.bool.isRequired,\r\n children: PropTypes.node.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { TilesGridLoadingCell } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nexport const LoadingSpinner = ({\r\n onLoading,\r\n}) => (\r\n \r\n \r\n \r\n);\r\n\r\nLoadingSpinner.propTypes = {\r\n onLoading: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { TreeItem, TreeItemLayout, mergeClasses } from '@fluentui/react-components';\r\nimport { TooltipHost, TooltipOverflowMode } from '@bingads-webui-react/fabric-control';\r\nimport { TilesGridCellDropDecorator } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { CustomTab } from './custom-tab';\r\n\r\nexport const LeafTreeItem = ({\r\n value,\r\n level,\r\n setSize,\r\n posinset,\r\n onClick,\r\n classes,\r\n isSelected,\r\n content,\r\n parentValue,\r\n onDrop,\r\n}) => (\r\n \r\n \r\n \r\n \r\n \r\n {content}\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nLeafTreeItem.propTypes = {\r\n value: PropTypes.number.isRequired,\r\n level: PropTypes.number.isRequired,\r\n setSize: PropTypes.number.isRequired,\r\n posinset: PropTypes.number.isRequired,\r\n onClick: PropTypes.func.isRequired,\r\n classes: PropTypes.shape({\r\n treeItemLayout: PropTypes.string,\r\n treeSelected: PropTypes.string,\r\n customDropDecorator: PropTypes.string,\r\n }).isRequired,\r\n isSelected: PropTypes.bool.isRequired,\r\n content: PropTypes.string.isRequired,\r\n parentValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n onDrop: PropTypes.func.isRequired,\r\n};\r\n\r\nLeafTreeItem.defaultProps = {\r\n parentValue: null,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { LoadingSpinner } from './loading-spinner';\r\nimport { LeafTreeItem } from './leaf-tree-item';\r\nimport { LOADING_CELL } from '../utils';\r\n\r\nexport const SubTreeItem = ({\r\n folderItem,\r\n level,\r\n setSize,\r\n posinset,\r\n classes,\r\n selectedItemId,\r\n onRenderSubTree,\r\n onLeafTreeItemClicked,\r\n loadMoreFolderPathTreeItem,\r\n parentFolder,\r\n onDrop,\r\n}) => {\r\n const loadMore = useCallback(() => {\r\n loadMoreFolderPathTreeItem(parentFolder.folderId, parentFolder.subFolders.length);\r\n }, [loadMoreFolderPathTreeItem, parentFolder.folderId, parentFolder.subFolders.length]);\r\n\r\n if (folderItem === LOADING_CELL) {\r\n return ;\r\n }\r\n if (folderItem.subFoldersCount > 0) {\r\n return onRenderSubTree(folderItem);\r\n }\r\n return (\r\n \r\n );\r\n};\r\n\r\nSubTreeItem.propTypes = {\r\n folderItem: PropTypes.shape({\r\n folderId: PropTypes.number,\r\n folderName: PropTypes.string,\r\n subFoldersCount: PropTypes.number,\r\n }).isRequired,\r\n level: PropTypes.number.isRequired,\r\n setSize: PropTypes.number.isRequired,\r\n posinset: PropTypes.number.isRequired,\r\n classes: PropTypes.shape({\r\n treeItemLayout: PropTypes.string,\r\n treeSelected: PropTypes.string,\r\n }).isRequired,\r\n onRenderSubTree: PropTypes.func.isRequired,\r\n onLeafTreeItemClicked: PropTypes.func.isRequired,\r\n loadMoreFolderPathTreeItem: PropTypes.func.isRequired,\r\n parentFolder: PropTypes.shape({\r\n folderId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n subFolders: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n selectedItemId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n onDrop: PropTypes.func.isRequired,\r\n};\r\n\r\nSubTreeItem.defaultProps = {\r\n selectedItemId: null,\r\n};\r\n","import React, { useState, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n TreeItem,\r\n TreeItemLayout,\r\n Spinner,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n ChevronRightRegular,\r\n ChevronDownRegular,\r\n ChevronRightFilled,\r\n ChevronDownFilled,\r\n} from '@fluentui/react-icons';\r\nimport { TooltipHost, TooltipOverflowMode } from '@bingads-webui-react/fabric-control';\r\n\r\nimport { TilesGridCellDropDecorator } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { CustomTab } from './custom-tab';\r\nimport { SubTreeItem } from './sub-tree-item';\r\nimport { LOADING_CELL, MaxFolderLevel } from '../utils';\r\n\r\nexport const SubTree = ({\r\n folderItem,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n i18n,\r\n level,\r\n setSize,\r\n index,\r\n parentFolderId,\r\n classes,\r\n selectedItemId,\r\n onItemSelected,\r\n logger,\r\n onDrop,\r\n}) => {\r\n const [open, setOpen] = useState({});\r\n const [loading, setLoading] = useState({});\r\n\r\n const stopPropagation = useCallback(e => e.stopPropagation(), []);\r\n\r\n const handleOpenChange = useCallback((e, openInner, folderId) => {\r\n stopPropagation(e);\r\n if (level >= MaxFolderLevel) {\r\n return;\r\n }\r\n if (openInner && folderItem.subFolders.length === 0) {\r\n setLoading(prevLoadingStatus => ({ ...prevLoadingStatus, [folderId]: true }));\r\n loadFolderPathTreeItem(folderItem.folderId).finally(() => {\r\n setLoading(prevLoadingStatus => ({ ...prevLoadingStatus, [folderId]: false }));\r\n });\r\n }\r\n logger.logTrace(`AdStudioNavigation: folder item ${openInner ? 'expanded' : 'collapsed'}`, { navigationItem: folderId });\r\n setOpen(prevOpenStatus => ({ ...prevOpenStatus, [folderId]: openInner }));\r\n }, [folderItem.folderId, folderItem.subFolders.length, level, loadFolderPathTreeItem, logger, stopPropagation]);\r\n\r\n const handleTreeItemClicked = useCallback((e, folder) => {\r\n stopPropagation(e);\r\n onItemSelected(folder);\r\n logger.logTrace('AdStudioNavigation: folder item clicked', { navigationItem: folder.folderId });\r\n }, [logger, onItemSelected, stopPropagation]);\r\n\r\n const expandIcon = useMemo(() => {\r\n if (loading[folderItem.folderId]) {\r\n return ;\r\n }\r\n if (open[folderItem.folderId] && folderItem.subFolders.length > 0) {\r\n const ChevronDown = selectedItemId === folderItem.folderId ? ChevronDownFilled : ChevronDownRegular;\r\n return handleOpenChange(e, false, folderItem.folderId)} />;\r\n }\r\n const ChevronRight = selectedItemId === folderItem.folderId ? ChevronRightFilled : ChevronRightRegular;\r\n return handleOpenChange(e, true, folderItem.folderId)} />;\r\n }, [folderItem, handleOpenChange, loading, open, selectedItemId]);\r\n\r\n const checkFolderSelected = useCallback((folderId, subFloders, selectedId) => {\r\n if (selectedId === folderId) {\r\n return true;\r\n }\r\n if (!open[folderId]) {\r\n // if current folder is collapsed, need to check if any of its subfolders are selected\r\n let subFolderSelected = subFloders.some(subFolder => subFolder.folderId === selectedId);\r\n if (subFolderSelected) {\r\n return true;\r\n }\r\n subFloders.forEach((subFolder) => {\r\n if (subFolder.subFolders.length > 0) {\r\n subFolderSelected = checkFolderSelected(subFolder.folderId, subFolder.subFolders, selectedId);\r\n }\r\n });\r\n return subFolderSelected;\r\n }\r\n return false;\r\n }, [open]);\r\n\r\n const isCurrentFolderSelected = useMemo(\r\n () => checkFolderSelected(folderItem.folderId, folderItem.subFolders, selectedItemId),\r\n [checkFolderSelected, folderItem.folderId, folderItem.subFolders, selectedItemId]\r\n );\r\n\r\n const treeItems = useMemo(() => {\r\n const items = [...folderItem.subFolders];\r\n if (folderItem.subFolders.length > 0 && folderItem.subFolders.length < folderItem.subFoldersCount) {\r\n items.push(LOADING_CELL);\r\n }\r\n return items;\r\n }, [folderItem.subFolders, folderItem.subFoldersCount]);\r\n\r\n if (level > MaxFolderLevel) {\r\n return null;\r\n }\r\n\r\n return (\r\n handleTreeItemClicked(e, folderItem)}\r\n aria-level={level}\r\n aria-setsize={setSize}\r\n aria-posinset={index}\r\n parentValue={parentFolderId}\r\n >\r\n { onDrop(folderItem); }}\r\n customClassName={classes.customDropDecorator}\r\n >\r\n \r\n \r\n \r\n {folderItem.folderName}\r\n \r\n \r\n \r\n \r\n {\r\n open[folderItem.folderId] && treeItems.length > 0 && treeItems.map((subFolder, i) =>\r\n (\r\n (\r\n \r\n )}\r\n onLeafTreeItemClicked={(e) => {\r\n stopPropagation(e);\r\n onItemSelected(subFolder);\r\n }}\r\n loadMoreFolderPathTreeItem={loadMoreFolderPathTreeItem}\r\n key={subFolder.folderId}\r\n parentFolder={folderItem}\r\n onDrop={() => { onDrop(subFolder); }}\r\n />\r\n ))\r\n }\r\n \r\n );\r\n};\r\n\r\nSubTree.propTypes = {\r\n folderItem: PropTypes.shape({\r\n folderId: PropTypes.number,\r\n folderName: PropTypes.string,\r\n subFolders: PropTypes.arrayOf(PropTypes.shape({})),\r\n subFoldersCount: PropTypes.number,\r\n }).isRequired,\r\n loadFolderPathTreeItem: PropTypes.func.isRequired,\r\n loadMoreFolderPathTreeItem: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n level: PropTypes.number.isRequired,\r\n setSize: PropTypes.number.isRequired,\r\n index: PropTypes.number.isRequired,\r\n parentFolderId: PropTypes.number,\r\n classes: PropTypes.shape({\r\n treeItemLayout: PropTypes.string,\r\n treeSelected: PropTypes.string,\r\n customDropDecorator: PropTypes.string,\r\n }).isRequired,\r\n onItemSelected: PropTypes.func.isRequired,\r\n selectedItemId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n onDrop: PropTypes.func.isRequired,\r\n};\r\n\r\nSubTree.defaultProps = {\r\n parentFolderId: null,\r\n selectedItemId: null,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useAdStudioNavigationStyle = makeStyles({\r\n customTabItem: {\r\n width: '100%',\r\n },\r\n tabItemWrapper: {\r\n paddingTop: '4px',\r\n paddingBottom: '4px',\r\n paddingLeft: '6px',\r\n paddingRight: '6px',\r\n '&.selected': {\r\n backgroundColor: '#ebebeb',\r\n ...shorthands.borderRadius('8px'),\r\n },\r\n },\r\n adStudioNavigation: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n bottom: '32px',\r\n width: '266px',\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n ...shorthands.padding('8px', '8px', '24px', '8px'),\r\n overflowY: 'auto',\r\n zIndex: 1,\r\n '& .side-navigation-more-button': {\r\n display: 'none',\r\n },\r\n },\r\n placeholder: {\r\n position: 'absolute',\r\n bottom: 0,\r\n width: '266px',\r\n height: '32px',\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n zIndex: -1,\r\n },\r\n divider: {\r\n marginTop: '6px',\r\n marginBottom: '6px',\r\n marginLeft: '8px',\r\n marginRight: '8px',\r\n },\r\n dividerContent: {\r\n '&::before': {\r\n content: '\"\"',\r\n display: 'flex',\r\n flexGrow: 1,\r\n minWidth: '8px',\r\n ...shorthands.borderTop('1px', 'solid', '#E0E0E0'),\r\n },\r\n },\r\n});\r\n\r\nexport const useFoldersTreeViewStyle = makeStyles({\r\n flatTree: {\r\n '&.fui-FlatTree': {\r\n rowGap: 0,\r\n },\r\n },\r\n tabItemWrapper: {\r\n '& button': {\r\n width: '100%',\r\n },\r\n },\r\n treeItemLayout: {\r\n '&.fui-TreeItemLayout': {\r\n lineHeight: '20px',\r\n minHeight: '20px',\r\n '&:active': {\r\n backgroundColor: '#e0e0e0 !important',\r\n },\r\n },\r\n '& .fui-TreeItemLayout__main': {\r\n overflowX: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n tooltipHost: {\r\n display: 'inline-block',\r\n width: '100%',\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n treeSelected: {\r\n fontWeight: 'bold',\r\n },\r\n customDropDecorator: {\r\n outlineOffset: '-2px',\r\n outlineStyle: 'dashed',\r\n outlineWidth: '2px',\r\n outlineColor: tokens.colorBrandBackground,\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n FlatTree,\r\n} from '@fluentui/react-components';\r\n\r\nimport { SubTree } from './sub-tree';\r\nimport { useFoldersTreeViewStyle } from '../style';\r\nimport { SubTreeItem } from './sub-tree-item';\r\nimport { LOADING_CELL } from '../utils';\r\n\r\nexport const FolderPathTreeView = ({\r\n folderPathTree,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n i18n,\r\n selectedItemId,\r\n onItemSelected,\r\n logger,\r\n onDrop,\r\n}) => {\r\n const classes = useFoldersTreeViewStyle();\r\n\r\n const { subFolders, subFoldersCount } = folderPathTree;\r\n\r\n const treeItems = useMemo(() => {\r\n if (subFolders && subFolders.length > 0) {\r\n const items = [...subFolders];\r\n if (subFolders.length < subFoldersCount) {\r\n items.push(LOADING_CELL);\r\n }\r\n return items;\r\n }\r\n return [];\r\n }, [subFolders, subFoldersCount]);\r\n\r\n const rootFolder = useMemo(() => ({\r\n folderId: 'ROOT',\r\n subFolders,\r\n subFoldersCount,\r\n }), [subFolders, subFoldersCount]);\r\n\r\n return (\r\n \r\n {\r\n treeItems && treeItems.map((folder, index) =>\r\n (\r\n (\r\n \r\n )}\r\n onLeafTreeItemClicked={(e) => {\r\n e.stopPropagation();\r\n onItemSelected(folder);\r\n }}\r\n loadMoreFolderPathTreeItem={loadMoreFolderPathTreeItem}\r\n parentFolder={rootFolder}\r\n onDrop={() => { onDrop(folder); }}\r\n />\r\n ))\r\n }\r\n \r\n );\r\n};\r\n\r\nFolderPathTreeView.propTypes = {\r\n folderPathTree: PropTypes.shape({\r\n subFolders: PropTypes.arrayOf(PropTypes.shape({})),\r\n subFoldersCount: PropTypes.number,\r\n }),\r\n loadFolderPathTreeItem: PropTypes.func.isRequired,\r\n loadMoreFolderPathTreeItem: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onItemSelected: PropTypes.func.isRequired,\r\n selectedItemId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n logger: PropTypes.shape({}).isRequired,\r\n onDrop: PropTypes.func.isRequired,\r\n};\r\n\r\nFolderPathTreeView.defaultProps = {\r\n folderPathTree: {},\r\n selectedItemId: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TabList, mergeClasses } from '@fluentui/react-components';\r\nimport { SideNavigationItem } from '@bingads-webui-fluent-component/navigation';\r\nimport { handleRealUsedFlag, RealUsedFlagSuffix } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useAdStudioNavigation } from './use-ad-studio-navigation';\r\nimport { FolderPathTreeView } from './components/folders-tree-view';\r\nimport { useAdStudioNavigationStyle } from './style';\r\n\r\nconst AdStudioNavigationImp = ({\r\n history,\r\n i18n,\r\n rootRoute,\r\n dataService,\r\n logger,\r\n permissions,\r\n onDropToFolder: onDropToFolderProp,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const {\r\n staticItems,\r\n selectedItemId,\r\n setSelectedFolderId,\r\n folderPathTree,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n handleFolderItemClicked,\r\n onDropToFolder,\r\n navigateIntoRootFolder,\r\n } = useAdStudioNavigation({\r\n history,\r\n rootRoute,\r\n dataService,\r\n onDropToFolder: onDropToFolderProp,\r\n permissions,\r\n adsStudioAccountPreferences,\r\n });\r\n\r\n const classes = useAdStudioNavigationStyle();\r\n return (\r\n <>\r\n
\r\n \r\n {staticItems.map(item => (\r\n
\r\n {\r\n item.showDivider &&\r\n
\r\n
\r\n
\r\n }\r\n {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n setSelectedFolderId(null);\r\n navigateIntoRootFolder();\r\n item.onClick();\r\n logger.logTrace('AdStudioNavigation: static item clicked', { navigationItem: item.name });\r\n },\r\n }}\r\n selectedTabId={selectedItemId}\r\n config={{}}\r\n className={classes.customTabItem}\r\n />\r\n
\r\n ))}\r\n {\r\n folderPathTree && folderPathTree.subFolders.length > 0 &&\r\n \r\n }\r\n \r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nAdStudioNavigationImp.propTypes = {\r\n history: PropTypes.shape({\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n rootRoute: PropTypes.string.isRequired,\r\n dataService: PropTypes.shape({\r\n folderPathTree: PropTypes.arrayOf(PropTypes.shape({})),\r\n loadFolderPathTreeItem: PropTypes.func,\r\n loadMoreFolderPathTreeItem: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n onDropToFolder: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const AdStudioNavigation = AdStudioNavigationImp;\r\n","import { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { ROOT_FOLDER_ID, handleRealUsedFlag, RealUsedFlagSuffix } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nimport { getGroupedItems, gotoLibraryPage, isLibraryPageSelected } from './utils';\r\n\r\nexport const useAdStudioSideNavigation = ({\r\n history,\r\n rootRoute,\r\n dataService,\r\n onDropToFolder: onDropToFolderProp,\r\n permissions,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const [selectedItemId, setSelectedItemId] = useState(null);\r\n const [selectedFolderId, setSelectedFolderId] = useState(null);\r\n const [isCopilotEnabled, setIsCopilotEnabled] = useState(false);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const {\r\n folderPathTree,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n initializeFolderPathTree,\r\n navigateIntoFolderItem,\r\n navigateIntoRootFolder,\r\n currentFolder,\r\n } = dataService;\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const groupedItems = useMemo(() => getGroupedItems(history, rootRoute, navigateIntoFolderItem, isCopilotEnabled), [history.location.pathname, rootRoute, navigateIntoFolderItem, isCopilotEnabled]);\r\n\r\n const staticItems = useMemo(() => _.flatten(groupedItems), [groupedItems]);\r\n\r\n const handleFolderItemClicked = useCallback((folder) => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n const { folderId } = folder;\r\n setSelectedItemId(folderId);\r\n setSelectedFolderId(folderId);\r\n gotoLibraryPage(history, rootRoute, history.location.search);\r\n navigateIntoFolderItem({ folder });\r\n }, [adsStudioAccountPreferences, history, navigateIntoFolderItem, rootRoute]);\r\n\r\n const onDropToFolder = useCallback((folder) => {\r\n onDropToFolderProp(folder);\r\n }, [onDropToFolderProp]);\r\n\r\n useEffect(() => {\r\n if (staticItems.length > 0) {\r\n const selectedItem = staticItems.find(item => item.isSelected);\r\n if (selectedItem) {\r\n if (selectedFolderId && isLibraryPageSelected(history.location.pathname, rootRoute)) {\r\n // if select folder, then the folder should have selected status instead of the library item\r\n setSelectedItemId(selectedFolderId);\r\n } else {\r\n setSelectedItemId(selectedItem.id);\r\n }\r\n }\r\n }\r\n }, [staticItems, history, selectedFolderId, rootRoute]);\r\n\r\n useEffect(() => {\r\n if (!selectedItemId) {\r\n initializeFolderPathTree();\r\n }\r\n }, [initializeFolderPathTree, selectedItemId]);\r\n\r\n useEffect(() => {\r\n if (currentFolder && currentFolder.folderId !== ROOT_FOLDER_ID && isLibraryPageSelected(history.location.pathname, rootRoute)) {\r\n setSelectedFolderId(currentFolder.folderId);\r\n setSelectedItemId(currentFolder.folderId);\r\n } else if (currentFolder && currentFolder.folderId === ROOT_FOLDER_ID) {\r\n setSelectedFolderId(null);\r\n const selectedItem = staticItems.find(item => item.isSelected);\r\n if (selectedItem) {\r\n setSelectedItemId(selectedItem.id);\r\n }\r\n }\r\n }, [currentFolder, history.location.pathname, rootRoute, staticItems]);\r\n\r\n useEffect(() => {\r\n if (isBrandKitEnabled) {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(isRestricted => setIsCopilotEnabled(!isRestricted));\r\n } else {\r\n setIsCopilotEnabled(false);\r\n }\r\n }, [isBrandKitEnabled, permissions, serverContext]);\r\n\r\n return {\r\n groupedItems,\r\n staticItems,\r\n selectedItemId,\r\n setSelectedItemId,\r\n selectedFolderId,\r\n setSelectedFolderId,\r\n folderPathTree: folderPathTree[0],\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n handleFolderItemClicked,\r\n onDropToFolder,\r\n navigateIntoRootFolder,\r\n };\r\n};\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { SideNavigation } from '@bingads-webui-fluent-component/navigation';\r\nimport { handleRealUsedFlag, RealUsedFlagSuffix } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nimport { useAdStudioSideNavigation } from './use-ad-studio-side-navigation';\r\nimport { FolderPathTreeView } from './components/folders-tree-view';\r\nimport { useAdStudioNavigationStyle } from './style';\r\n\r\nconst MIN_VISIBLE_TAB_COUNT = 8;\r\n\r\nconst AdStudioNavigationImp = ({\r\n history,\r\n i18n,\r\n rootRoute,\r\n dataService,\r\n logger,\r\n permissions,\r\n onDropToFolder: onDropToFolderProp,\r\n adsStudioAccountPreferences,\r\n}) => {\r\n const {\r\n groupedItems,\r\n selectedItemId,\r\n setSelectedFolderId,\r\n folderPathTree,\r\n loadFolderPathTreeItem,\r\n loadMoreFolderPathTreeItem,\r\n handleFolderItemClicked,\r\n onDropToFolder,\r\n navigateIntoRootFolder,\r\n } = useAdStudioSideNavigation({\r\n history,\r\n rootRoute,\r\n dataService,\r\n onDropToFolder: onDropToFolderProp,\r\n permissions,\r\n adsStudioAccountPreferences,\r\n });\r\n\r\n const classes = useAdStudioNavigationStyle();\r\n const renderFolderPathTree = useCallback(() => (\r\n folderPathTree && folderPathTree.subFolders.length > 0 &&\r\n \r\n ), [folderPathTree, handleFolderItemClicked, i18n, loadFolderPathTreeItem, loadMoreFolderPathTreeItem, logger, onDropToFolder, selectedItemId]);\r\n\r\n const groupedStaticItems = useMemo(() => groupedItems.map(items => items.map((item) => {\r\n if (item.id === 'folder-path-tree') {\r\n return {\r\n ...item,\r\n key: item.id,\r\n text: 'folderPathTree',\r\n renderCustomizedItem: renderFolderPathTree,\r\n };\r\n }\r\n return (\r\n {\r\n id: item.id,\r\n key: item.id,\r\n icon: item.icon,\r\n text: i18n.getString(item.name),\r\n isSelected: item.id === selectedItemId,\r\n onClick: () => {\r\n handleRealUsedFlag(adsStudioAccountPreferences, RealUsedFlagSuffix.App);\r\n setSelectedFolderId(null);\r\n navigateIntoRootFolder();\r\n item.onClick();\r\n logger.logTrace('AdStudioNavigation: static item clicked', { navigationItem: item.name });\r\n },\r\n }\r\n );\r\n })), [groupedItems, i18n, selectedItemId, renderFolderPathTree, adsStudioAccountPreferences, setSelectedFolderId, navigateIntoRootFolder, logger]);\r\n\r\n const getSelectedNavigationItemId = useCallback(() => selectedItemId, [selectedItemId]);\r\n\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nAdStudioNavigationImp.propTypes = {\r\n history: PropTypes.shape({\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n rootRoute: PropTypes.string.isRequired,\r\n dataService: PropTypes.shape({\r\n folderPathTree: PropTypes.arrayOf(PropTypes.shape({})),\r\n loadFolderPathTreeItem: PropTypes.func,\r\n loadMoreFolderPathTreeItem: PropTypes.func,\r\n }).isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func,\r\n }).isRequired,\r\n onDropToFolder: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const AdStudioSideNavigation = AdStudioNavigationImp;\r\n","import React, { useCallback, useMemo, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { makeStyles, mergeClasses } from '@fluentui/react-components';\r\nimport { useAdsStudioServices } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\nimport { LayoutSizeScale, useLayoutResizeObserver } from '@bingads-webui-fluent-component/layout-size';\r\nimport { AdStudioNavigation } from './ad-studio-navigation';\r\nimport { AdStudioSideNavigation } from './ad-studio-side-navigation';\r\n\r\nconst isSubPageSelected = (pathname, subPage, rootRoute) => pathname.includes(`${rootRoute}/`) && pathname.match(subPage);\r\nconst subPagesWithoutNavigation = [\r\n /generateimage/,\r\n /images\\/\\d+\\/edit/,\r\n /displaytemplates\\/create/,\r\n /displaytemplates\\/\\d+\\/edit/,\r\n /videotemplates/,\r\n /video\\/create/,\r\n /video\\/\\d+\\/edit/,\r\n];\r\n\r\nconst useStyles = makeStyles({\r\n hideNavigation: {\r\n '& .ad-studio-navigation, .ad-studio-navigation-placeholder ': {\r\n display: 'none',\r\n },\r\n },\r\n height100: {\r\n height: '100%',\r\n },\r\n leftMargin: {\r\n marginLeft: '266px',\r\n },\r\n});\r\n\r\nconst getModeByLayoutSize = (layoutSize) => {\r\n const result = LayoutSizeScale[layoutSize] >= LayoutSizeScale.XL;\r\n\r\n return result;\r\n};\r\n\r\nexport const withAdStudioNavigation = (Component) => {\r\n const Wrapper = (props) => {\r\n const {\r\n history, i18n, ROOT_ROUTE, logger, permissions, adsStudioAccountPreferences,\r\n } = props;\r\n\r\n const [targetDropFolder, setTargetDropFolder] = useState(null);\r\n const [layoutSize, setLayoutSize] = React.useState('XL');\r\n\r\n const dataService = useAdsStudioServices();\r\n useLayoutResizeObserver(setLayoutSize);\r\n const largeSize = useMemo(() => getModeByLayoutSize(layoutSize), [layoutSize]);\r\n\r\n const shouldNotShowNavigation = () => {\r\n if (!largeSize) {\r\n return true;\r\n }\r\n const { location } = history;\r\n const { pathname } = location;\r\n return subPagesWithoutNavigation.some(subPage => isSubPageSelected(pathname, subPage, ROOT_ROUTE));\r\n };\r\n\r\n const onDropToFolder = useCallback((folder) => {\r\n setTargetDropFolder({\r\n newTargetFolder: {}, // force to update targetDropFolder\r\n folder,\r\n });\r\n }, []);\r\n\r\n const resetTargetDropFolder = useCallback(() => {\r\n setTargetDropFolder(null);\r\n }, []);\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n {_.get(permissions, ['dynamic', 'ASNavigationSwitch']) ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n Wrapper.displayName = `withAdStudioNavigation(${getDisplayName(Component)})`;\r\n hoistNonReactStatics(Wrapper, Component);\r\n\r\n return Wrapper;\r\n};\r\n"],"names":["filtersReducer","state","action","actionType","actionData","_objectWithoutProperties","_excluded","type","title","id","value","humanizedValue","_","concat","_toConsumableArray","newState","filter","length","initialState","newValue","newHumanizedValue","index","filterToUpdate","isFilterAlwaysVisible","splice","_objectSpread","filterWithValues","_ref","useMenuStyle","makeStyles","menuButton","shorthands","border","height","fontSize","marginLeft","paddingLeft","paddingRight","backgroundColor","fontWeight","NewFilterContextMenu","allSupportedFilters","filters","onAddNewFilter","i18n","isFocused","classes","buttonRef","useRef","_useState","useState","_useState2","_slicedToArray","checkedValues","setCheckedValues","items","useMemo","values","f","FilterType","SearchText","map","_ref2","isFilterAlreadySet","key","name","getString","disabled","canCheck","checked","onClick","useEffect","checkedItems","item","newCheckedValues","forEach","undefined","current","focus","_jsxs","Menu","children","_jsx","MenuTrigger","MenuButton","ref","className","mergeClasses","MenuPopover","MenuList","MenuItemRadio","defaultProps","target","FilterBarContainerImpl","addNewFilter","removeAllFilters","removeEmptyFilters","updateFilter","removeFilter","isEditingFilter","setIsEditingFilter","onFilterValueChange","ianaTimeZone","dateFormat","isAdsStudioAIGCMVPEnabled","focusedFilterRef","defaultOpenFilterRef","onClickAddFilterButton","useCallback","onClickReadonlyFilter","onCloseEditingFilterBar","onResetClick","newFilter","TopRatedPerformance","initValue","topRated","initHumanizedValue","onRenderNewFilterContextMenu","onValueChange","curFilterState","onDropdownDismiss","onRenderReadonlyFilter","isLast","PerformanceSearchTextFilterComponent","React","FilterComponents","getPerformanceFilterComponents","onRenderEditingFilter","_ref3","focused","isDefaultOpen","FilterComponent","defaultOpen","PerformanceEditingFilterBar","focusedFilter","onRenderFilter","onCloseClick","PerformanceReadonlyFilterBar","onClickFilter","FilterBarContainer","PERFORMANCE_PAGE_FILTER_BAR_INIT_STATE","AllSupportedFilters","useFilterBar","currentFolderId","_ref$initialState","_useAdStudioFiltersRe","supportedFilterTypes","_ref2$initialId","initialId","_useReducer","useReducer","_useReducer2","dispatch","idGeneratorRef","getNextId","Number","MAX_SAFE_INTEGER","overwriteFilters","_ref4","filterTypeMeta","_ref5","useAdStudioFiltersReducer","isAnyFilterSet","searchText","dateAddedFilter","minImageHeight","minImageWidth","importSource","searchLocationFilter","topRatedFilterChecked","assetSources","CSMLTimeFrame","Anytime","selectedFilters","AssetType","VideoDuration","ImportSource","AssetSource","renderFilterBar","allFilters","isEditing","_useState3","_useState4","effectiveFilters","setEffectiveFilters","isDateChanged","filterValues","reduce","acc","DateAdded","dateAddedDateRange","dateAddedFilterCustomDateRange","Custom","dateAddedChoiceOptions","getDateAddedChoiceOptions","o","range","start","end","isGlobalSearch","ROOT_FOLDER_ID","v","assetTypeFilter","FolderAssetType","Image","hasPerfData","civilDateRangeEqual","filterStates","usePerformancePageStaticStyles","makeStaticStyles","outline","tokens","colorStrokeFocus2","usePerformancePageStyles","assetLibraryPerformancePageContainer","padding","width","overflow","margin","subMenu","display","alignItems","flexGrow","inlineDownloadContainer","usePerfTableStyle","imagePreviewContainer","imagePreviewAndNameContainer","opacity","transition","justifyContent","position","top","left","right","useImagePreviewRawStyles","hostStyles","actionButtonStyles","borderRadius","color","COLUMN_KEYS","toolbarFilterContainer","flex","paddingTop","alignSelf","columnKeyToSortBy","_columnKeyToSortBy","_defineProperty","asc","CSMLSortBy","AssetIdAsc","desc","AssetIdDesc","ImageName","ImageNameDesc","LastCreatedAsc","LastCreated","MostRecentAsc","MostRecent","ClickAsc","ClickDesc","ClickPeriodAsc","ClickPeriodDesc","ClickChangeAsc","ClickChangeDesc","ClickChangePercentAsc","ClickChangePercentDesc","CTRAsc","CTRDesc","CTRPeriodAsc","CTRPeriodDesc","CTRChangeAsc","CTRChangeDesc","CTRChangePercentAsc","CTRChangePercentDesc","ImpressionAsc","ImpressionDesc","ImpressionPeriodAsc","ImpressionPeriodDesc","ImpressionChangeAsc","ImpressionChangeDesc","ImpressionChangePercentAsc","ImpressionChangePercentDesc","SpendAsc","SpendDesc","SpendPeriodAsc","SpendPeriodDesc","SpendChangeAsc","SpendChangeDesc","SpendChangePercentAsc","SpendChangePercentDesc","formatDate","date","ImagePreview","folderAssetType","url","thumbnailUrl","previewUrl","FluentImage","imageFit","ImageFit","cover","src","alt","maximizeFrame","calloutProps","gapSpace","ActionIconButton","iconName","label","iconProps","TooltipHost","content","styles","IconButton","ImagePreviewAndName","highlightedText","onGotoDetailPage","onGotoEditPage","imageName","TextWithHighlight","text","enableTooltip","_TL_","AssetColumn","renderHeaderWithPopup","ariaLabel","minWidth","maxWidth","isCollapsible","isResizable","sortable","onRenderHeader","sortIcon","onRender","helpId","odataColumnName","IdColumn","isRowHeader","CreatedColumn","createdTime","ModifiedColumn","modifiedTime","ClicksColumn","compareOn","currentPeriod","lastPeriod","fieldName","subColumns","CTRColumn","ImpressionsColumn","_ref6","SpendColumn","_ref7","UsageColumn","_ref8","Button","icon","OpenRegular","style","textWrap","textAlign","lineHeight","appearance","useInlineChartContainerStyle","inlineChartContainer","flexShrink","zIndex","boxShadow","paddingBottom","flexDirection","fallbacks","fontFamily","float","marginRight","backgroundRepeat","backgroundImage","CircleSolid","CircleDotted","DiamondSolid","DiamondDotted","maxHeight","whiteSpace","verticalAlign","cursor","fontStyle","textDecoration","speak","fontVariant","textTransform","WebkitFontSmoothing","MozOsxFontSmoothing","Waterdrop","backgroundPositionX","backgroundPositionY","borderLeft","borderRight","marginTop","borderBottom","minHeight","backdropFilter","backgroundSize","PerformancePageComponent","props","navigation","notificationApi","reload","renderToolbarContainer","renderDetailsList","renderInlineChart","dataService","getChartPreference","perfMetricDateRange","adsStudioUserPreferences","renderDatePicker","logger","useInlineDownload","createFolderFilterQuery","performancePagePerfMarker","pagePerfMarker","isAIGCRegionRestricted","setDataLoaded","chartClasses","isChartShown","setChartShown","isPageInited","setPageInited","_ref$assets","assets","_ref$totalAssetCount","totalAssetCount","loadDataInDateRange","loadDataArgs","perfTimeSeriesData","loadPerfTimeSeriesData","loadMoreDataInDateRange","dataOwnerPageName","renameAsset","onFailedToLoadData","showWarning","logTrace","_useFilterBar","_useInlineDownload","isDownloadShown","setDownloadShown","renderInlineDownload","_useLoadData","perfMarker","loadingData","setLoadingData","loadingMoreData","setLoadingMoreData","loadNextPage","count","catch","err","finally","loadDataAsync","sortBy","otherFilters","assetsToLoadForSubfolders","includeParentHierarchy","includeSubfolders","pageName","AdsStudioPageName","PerfPage","createChild","useLoadData","assetId","gotoAssetDetails","loadMoreData","gotoEditImagePage","imageId","_useTableColumns","_ref9","dateRange","isSorted","isSortedDescending","sortByColumn","setSortByColumn","expandedColumns","setExpandedColumns","onUsageClick","_ref10","gotoAdsPageWithAssetIdFilter","columns","compared","col","isExpanded","getInlineDownloadColumns","localizedHeaders","odataColumnNames","some","subCol","push","getHeaders","_ref11","sortByKey","_ref12","expandColumns","newColumns","cols","_ref13","prevCols","useTableColumns","_usePerformancePage","pageNumber","setPageNumber","DEFAULT_PAGE_SIZE","pageSize","setPageSize","onPageChange","number","then","onPageSizeChange","size","setPerfTablePageSize","pager","total","pagedItems","slice","itm","usePerformancePage","hasNoData","shouldShowChart","isPageLoading","toolbar","filterBar","onSort","newSortByColumn","setPerfTableSortBy","getInlineDownloadFilter","serializedFilter","stringifySync","args","folderId","filterUrlParam","filterArgs","perfTablePageSize","perfTableSortBy","willFetchData","tap","ret","ImageAssetsCount","folder","itemCount","totalRowCount","tapCatch","willRender","usePageActiveTimeTracker","chartPreference","showChart","updateAssetDetailsParams","classnames","role","Overlay","AdsStudioSpinner","assetLibraryAccountPreferences","Promise","useHomePageStyle","homePage","gap","topBanner","boxSizing","homepageBanner","texts","searchContainer","searchBoxWrapper","searchBox","borderBottomRightRadius","borderBottomLeftRadius","sendIcon","bottom","subHeading","paragraph","itemContainer","btnWrapper","leftWrapper","rightWrapper","leftBtn","rightBtn","overlay","leftOverlay","rightOverlay","slider","scrollBehavior","overflowX","pointerEvents","scrollbarWidth","cardContainer","flexWrap","footerContainer","marginBottom","imageRowContainer","imageWrapper","transform","image","objectFit","transitionProperty","transitionDuration","transitionTimingFunction","overlayText","overlayButton","outlineColor","TopHomePageBannerComponent","onSearch","_React$useState","_React$useState2","searchQuery","setSearchQuery","handleSearchChange","event","preventDefault","trim","getHomePageTopBannerContainerStyle","Textarea","placeholder","onChange","onKeyDown","Send20Regular","serverContext","useImageCardStyles","imageCardListItem","imageCard","imageCardThumbnail","imageCardFooter","imageCardFooterContent","rowGap","imageIconAndName","textOverflow","imageCardCaption","ImageAssetCard","asset","ariaSetsize","ariaPosinset","onClickCard","assetName","imageTimeCaption","getTimeDescription","handleImageAssetClick","imageAsset","handleImageAssetKeyDown","ListItem","Card","CardPreview","originalUrl","CardFooter","Image20Regular","Body1","Caption1","useFolderCardStyles","folderCardListItem","card","cardPreview","footer","footerContent","iconAndName","folderName","caption","imageGrid","justifyItems","colorNeutralBackground3","thumbnailImage","oneImage","twoImages","gridTemplateColumns","threeImages","gridTemplateRows","gridArea","fourImages","FolderAssetCard","navigateIntoFolderItem","assetsToPreview","filteredAssets","Video","status","VideoStatus","Active","Array","isArray","handleFolderAssetClick","folderAsset","gotoLibraryPage","handleFolderAssetKeyDown","getGridClass","modifiedTimeString","Folder20Regular","useVideoCardStyles","videoCardListItem","videoCard","videoCardThumbnail","videoCardPreviewPlaceholder","videoCardFooter","videoCardFooterContent","videoIconAndName","videoName","videoCardCaption","VideoAssetCard","currentActivedCardId","videoTimeCaption","videoCardPreview","defaultContent","Unverified","UnverifiedPlaceholderWithStyle","placeholderContent","Draft","EncodingPlaceholderWithStyle","Failed","FailedPlaceholderWithStyle","onCloseDetail","handleVideoAssetClick","videoAsset","onClose","handleVideoAssetKeyDown","Video20Regular","AssetCard","adsStudioAccountPreferences","handleRealUsedFlag","RealUsedFlagSuffix","App","Folder","getAssetListBarCarouselStyle","sliderRef","scrollPosition","setScrollPosition","showArrowLeft","setShowArrowLeft","_useState5","_useState6","showArrowRight","setShowArrowRight","computeMaxScrollWidth","scrollWidth","clientWidth","goLeft","newPosition","Math","max","goRight","maxScroll","min","isHideSection","_Fragment","ChevronLeft16Regular","List","navigationMode","ChevronRight16Regular","GenerateWithAIComponent","onGenerateImage","loadingStatus","getHomePageGenerateWithAIComponentStyle","wrapperRef","exampleList","setExampleList","onInputChange","handleSearch","wrapperWidth","offsetWidth","maxCount","floor","newList","AIPromptExamples","updateExampleList","debounce","entries","resizeObserver","window","ResizeObserver","observe","unobserve","Input","imageSrc","promptText","useActionAssetCardsStyle","ActionAssetCards","aid","cid","oDataConfig","permissions","openSystemUploadRef","isXandrIntEnabled","dynamic","XandrIntegrationEnabled","account","useJsData","jsData","Account","find","resolve","data","isXandrIntegrationEnabled","isValidXandrAccount","cardData","getHomePageCardData","onClickUpload","gotoUploadFilesPanelPage","mode","openSystemUpload","onClickStock","gotoStockImagePanelPage","onClickInvest","gotoInvestImagePanelPage","onClickWebsite","gotoWebsiteImagePanelPage","AddAssetEntryCard","description","isFillWidth","useImageBackgroundSectionStyles","backgroundCardContainer","uploadCard","colorNeutralStroke1","uploadIcon","uploadFrame","uploadCaption","uploadButton","staticBackgrounds","background1","background2","background3","background4","background5","background6","background7","background8","background9","background10","ImageBackgroundCards","handleImageUploadClick","gotoBackgroundRemovalModal","onExampleImageKeyDown","imageUploadIcon","background","tabIndex","HomePage","libraryDataService","homePagePerfMarker","loadData","_dataService$assets","setGenerateImageExample","useContext","GenerateImageContext","isAdsStudioBackgroundChangeEnabled","setClarityTag","LoadAdsStudioHomePage","isRecentSorting","addAdStudioSurveyTriggerFlag","AdStudioSurveyTriggerFlag","gotoSearchResultPage","query","AIGCHandler","prompt","imageUrl","gotoAIGenerationPanelPage","sortedAssets","reverse","useCustomSize","customStyle","HomePageTopBannerComponent","AssetListBarCarousel","HomePageGenerateWithAIComponent","HomePageComponent","useImagesPageStyle","imagePage","useImageBannerContainerStyle","descriptions","entryCard","useImageCardContainerStyle","useImageEmptyViewStyle","emptyView","emptyIcon","mainText","neutralForegroundRest","useVideoPageStyle","videoPage","useVideoPageTopBannerContainerStyle","videopageBanner","useVideoCardContainerStyle","useVideoEmptyViewStyle","useSearchResultViewStyle","searchResultView","breadcrumbButton","breadcrumbButtonCurrent","headerContainer","headerTitle","defaultSearchQuery","AssetsEntryCardContainer","getEntryCardData","isImagePage","onClickCreate","ImageGridView","isSearchResultPage","cropDataService","totalLibraryAssetCount","isLoadingMore","setIsLoadingMore","imageCroppingTasks","loadedAssetsList","updatedAssets","getUpdatedAssets","updates","imagesGridSection","sectionName","GridSectionName","Asset","sectionClassName","itemKey","totalItemCount","config","scrollContainer","minItemHeight","sectionGridData","hasLibraryAssets","manualAddedImageSourceType","ManualAddedImageSource","Library","libraryAssets","onRenderCell","_index","AdsStudioAssetGridCell","onDetailsClick","onEditClick","editImageUrl","ShutterStock","onRenderLoadingCell","TilesGridLoadingCell","onLoading","SectionTilesGrid","sectionData","ImagesTopBannerComponent","ImageEmptyView","isSearchResult","EmptyViewIcons","ImageEmptyViewSVG","ImagesPage","imagePagePerfMarker","useAdsStudioServices","FilterContext","_useMemo","getFilters","_useMemo$searchText","_useMemo$sortBy","isSemanticSearch","ImagesFilterBar","searchboxPlaceHolder","userPreference","ImagesPageComponent","actionTypes","reducer","payload","images","logos","colors","fonts","taglines","brandVoice","brandTones","useStyles","container","WarningDialogueContent","EntryCardSVGIcons","WarningSVGIcon","Subtitle1","block","useCommonDialogueStyles","typographyStyles","body1","spacingVerticalL","spacingHorizontalXXL","header","columnGap","spacingHorizontalL","spacingHorizontalS","horizontalDivider","spacingVerticalS","spacingHorizontalNone","dialogueContentContainer","dismissIcon","borderRadiusXLarge","loadingText","marginBlockEnd","marginBlockStart","spacingVerticalXXL","loadingContainer","warningFooter","gridColumnEnd","gridColumnStart","justifySelf","useCreateWithWebsiteDialogueStyles","domainInputWrapper","suggestionErrorInvalid","spacingVerticalXS","caption1","CreateWithWebsiteDialogueContent","isValidDomain","onChangeValidDomain","brandKitCreationPayload","isNewBrandCreateWarningEnabled","onChangeBrandKitCreationPayload","commonClasses","dialogueClasses","Field","weight","DomainInputView","isDomainInvalid","onDomainChange","domain","isValidUrl","domainInputWrapperClassName","errorMessageClassName","errorMessage","e","CreateWithWebsiteDialogue","onCreateBrandKit","disableNewBrandKitWarning","isBrandKitCreationInProgress","isDialogueOpen","setIsDialogueOpen","_React$useState3","_React$useState4","setNewBrandCreateWarningEnabled","_React$useState5","_React$useState6","setIsValidDomain","_React$useState7","_React$useState8","setBrandKitCreationPayload","Dialog","open","onOpenChange","_e","dialogueData","DialogTrigger","disableButtonEnhancement","cardClassName","WebsiteSVGIcon","DialogSurface","DialogBody","DialogTitle","StyleGuide24Regular","Subtitle2","Dismiss20Regular","Divider","DialogContent","Body2","ProgressBar","thickness","DialogActions","console","info","filesPerRowInPreviewGrid","getFileUploadContainerStyles","_ref$palette","palette","spacingVerticalNone","spacingHorizontalXXXL","extend","btnStyle","visibility","borderStyle","borderColor","colorNeutralBackground1","getFileUploadButtonStyles","_ref2$palette","button","useFileUploadStyles","filesContainer","spacingVerticalM","spacingHorizontalXL","fileContainer","shadow4","colorNeutralBackground2","borderRadiusMedium","filePreviewImageIcon","spacingHorizontalXS","filePreviewContent","uploadFilesButton","fileUploadError","colorPaletteRedBackground3","FILE_ERROR_TYPES","message","LegacyStringMap","FilePicker_ButtonText_ChooseFile","FilePicker_ButtonText_RemoveFile","FilePicker_FileExtensionInvalid","FilePicker_FileInvalid","validateFiles","files","_ref$minFileSize","minFileSize","_ref$allowedTypes","allowedTypes","_ref$maxFileSize","maxFileSize","validationResult","hasError","i","file","uniqueId","fileTypesToCheck","replace","toLowerCase","fileType","includes","split","errorType","formatFileSize","bytes","decimals","arguments","dm","sizeUnitIndex","log","fileSize","getLocalizedFileSizeTextsBySize","formatDecimal","pow","maximumFractionDigits","minimumFractionDigits","uploadFiles","_x","_uploadFiles","apply","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","filesToUpload","uploadFile","updatedFiles","wrap","_context2","prev","next","_callee","_context","reject","shouldReject","random","setTimeout","Error","uploaded","t0","abrupt","stop","_x2","all","sent","FilePreview","progress","onDeleteFile","uploadTried","Tooltip","PdfSVGIcon","ErrorCircle20Regular","colorPaletteDarkOrangeBackground3","CheckmarkCircle20Regular","colorPaletteGreenBackground3","Text","truncate","Delete16Regular","FileUpload","dragOrDropTip","disableAddMore","dragOrDropLabel","onFilesUploaded","previewFilesPerRow","maxFilesCountAllowed","dragOrDropDescription","fileUploadContainerClasses","useDefaultStyles","fileUploadButtonClasses","setFiles","uploadError","setUploadError","legacyI18n","buildLegacyI18n","ValidationStringMap","handleDeleteFile","fileToDelete","prevFiles","handleFilesUpload","updatedFilesArray","updatedFile","fileIndex","findIndex","onFileRead","fileSources","filesToUploadCount","fileSourcesArray","from","onError","error","join","Stack","Item","grow","AddSquare24Regular","FilePicker","useButton","enableMultiple","hideDescription","enableDrag","showErrors","allowedFileExtensions","fileDraggerTip","fileDraggerLabel","fileDraggerDropDescription","variant","UploadBrandGuideDialogueContent","UploadBrandGuideDialogue","UploadSVGIcon","CreateManuallyAction","CreateManualBrandKitSVGIcon","getActionsCardsStyles","cards","BrandActionCards","setIsBrandKitCreationInProgress","handleBrandKitCreation","useBannerContainerStyles","bannerContainer","bannerBackground","heading","Banner","hideActionsMenu","Title2","useSuggestionsStyles","colorNeutralForeground1","panel","panelBody","SuggestionLoadingSkeleton","Skeleton","animation","SkeletonItem","SuggestionPanel","loading","suggestions","Sparkle20Regular","TagGroup","suggestion","InteractionTag","InteractionTagPrimary","useTaglinesStyles","body","loadingItem","taglineItem","taglineItemInput","spacingVerticalXXS","colorNeutralForeground3","TaglinesLoadingSkeleton","shape","TaglineItem","tagline","onDelete","isDeleteDisabled","maxAllowedCharacters","inputId","useId","autoFocus","ev","align","a","Delete24Regular","Taglines","onChangeTaglines","maxAllowedTaglines","maxAllowedCharactersPerTagline","isAddTaglineButtonDisabled","newTaglines","handleDeleteTagline","substring","handleChangeTagline","Add20Regular","defaultFonts","Label","TextAssetType","Typeface","Weight","helpTopic","helpLabel","overrideFontWeights","useFontsSelectorStyles","sectionContainer","fontsContainer","fontSelectContainer","fontSelect","fontWeightSelect","fontSelectContainerHeader","defaultFont","fontFamilies","defaultFontWeight","FontSelector","font","onChangeFont","onChangeWeight","Body1Stronger","HelpButton","topic","FontsFamilySelector","FontsWeightSelector","selectClassName","FontsSelector","onChangeFonts","fontsToRender","foundFont","handleChangeFont","selectedFont","updatedFonts","Body1Strong","listPanel","borderRadiusLarge","strokeWidthThin","colorNeutralStroke2","subtitle2","addBtn","actionBtns","borderRadiusSmall","list","getSkeletonStyles","row","colorNeutralStencil1","onEdit","onRemove","imageData","showEditBtn","showActionBtn","setShowActionBtn","onMouseEnter","onMouseLeave","ThumbnailUrl","ListSkeleton","fill","ListPanel","subTitle","isLoading","headerProps","onAdd","displayedImages","renderHelpBubble","FormCard","FormCardDefaultHeader","contentAfter","FormCardBody","idx","Id","buttonWrapper","aspectRatio","imageEditorContainer","shadow2","spinner","LogoFormat","BrandKitLogoEditPanel","isOpen","dismiss","format","minLogoSize","lightBackground","hasLandScapeLimit","hasSquareLimit","showBackgroundSettings","darkBackground","cropSettings","setAspectRatio","useInLightBackground","setUseInLightBackground","useInDarkBackground","setUseInDarkBackground","currentCropSettings","setCurrentCropSettings","MinLogoSize","maxCropHeight","Height","landscapeEnabled","Width","sqaureEnabled","isValid","updateAspectRation","SourceX","SourceWidth","SourceHeight","useClarityTags","ClarityTags","LaunchedAdsStudio","EditBrandKitLogo","onRenderFooterContent","AdsStudioPanelContainer","headerText","RadioGroup","Radio","ImageCropWithBoundingBox","baseImage","onCropSettingsChanged","minCropSize","Spinner","Checkbox","ImageListElement","maxLimit","maxSquareLogosLimit","maxLandscapeLogosLimit","elementType","contentBefore","preferenceService","panelTitle","panelSubtitle","updateOrCreateBrandKit","openLogoEditPanel","setOpenLogoEditPanel","selectedImageIdx","setSelectedImageIdx","setErrorMessage","_useImagePicker","useImagePicker","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","clearErrorMessage","minSizeConfig","constants","brandkitMinSize","selectedImage","openImageEditPanel","onEditImage","currentTarget","dataset","fullUrl","Url","getImageDetailAsync","naturalWidth","naturalHeight","newData","onAddImage","closeLogoEditPanel","onSelectImages","squareLogoCount","logo","ImageType","squareSettings","getCenterCroppedSettings","SourceY","landScapeSettings","logoType","CropX","CropY","CropWidth","CropHeight","Name","Type","SubType","processImageAssetPayload","_imageMinSizeValidati","filterImagesAsset","imageMinSizeValidation","_duplicateImagesValid","hasDuplicateError","duplicateImagesValidation","onApplyEditLogo","UploadImage","isBrandKit","disabledAssetSources","CSMLAssetSource","Shutterstock","BrandKitContext","createContext","BrandKitProvider","_React$useReducer","_React$useReducer2","context","Provider","displayName","contentPanel","spacingVerticalMNudge","body1Strong","spacingVerticalXL","contentPanelTitle","contentPanelSubtitle","contentPanelHeader","lineHeightBase300","contentPanelSubheader","SegmentSkeleton","lineCount","ContentPanel","bodyContent","brandVoiceSegment","brandPersonalityTextarea","brandToneInput","brandToneCaption","brandPersonalityTagGroup","brandToneAccordion","BrandVoice","I18nContext","_useContext","setBrandVoice","selectedOptions","setSelectedOptions","inputValue","setInputValue","mockCopilotSuggestionIndexes","setMockCopilotSuggestionIndexes","handleUpdateTaglines","updatedTaglines","handleSetBrandVoice","handleAddSelectedOptions","options","Set","innerText","handleRemoveSelectedOption","tag","handleChange","handleKeyDown","mockCopilotToneSuggestions","refreshMockCopilotSuggestions","numbers","randomNumber","brandPersonalityPlaceholder","MicSparkleRegular","InfoRegular","as","onDismiss","option","Tag","dismissible","TagPicker","onOptionSelect","TagPickerControl","expandIcon","AddSquareRegular","TagPickerInput","TagPickerList","TagPickerOption","Accordion","collapsible","AccordionItem","AccordionHeader","expandIconPosition","AccordionPanel","AddRegular","relationship","ArrowClockwiseRegular","TextFontRegular","useBrandKitPageStyle","brandKitPage","brandElements","BrandElements","fetchBrandKitData","brandKitDataService","brandkitName","_ref2$fonts","_ref2$images","_ref2$logos","_ref2$palettes","palettes","squareLogosCount","landscapeLogosCount","brandKit","_yield$brandKitDataSe","_yield$brandKitDataSe2","createBrandKits","updateBrandKit","onUpdateColor","colorId","colorObj","str","HexCode","updatePalette","onDeleteColor","colorid","onUpdateFonts","maxLogosLimit","MAX_LANDSCAPE_LOGOS","maxImagesLimit","classNames","BrandKitImageListElement","BrandKitLogoIconSVG","ColorPicker","maxColors","onUpdate","paletteData","ImageRegular","BrandKitFontsSelector","TabValues","BrandKitPage","imageEditService","brandKitPagePerfMarker","rest","setLoading","selectedTab","setSelectedTab","onTabSelect","response","getBrandKits","isBrandKitUIPhase2Enabled","BrandKitUIPhase2","BrandKitPageBanner","TabList","selectedValue","Tab","Component","BrandKitPageComponent","useTemplateImageStyles","flexColumn","templateWithCaption","darkGrayText","grayText","useTemplateGridStyles","gridContainer","skeletonContainer","filtersRow","filterButton","TemplateImageCard","templateGroupId","templateAttributes","setClickedTemplate","onAction","Caption1Strong","templateGroupName","Caption2","_templateAttributes$a","assetCounts","logoCount","imageCount","textAreaCount","result","getAssetCountInfo","TemplateGrid","templates","templateTagOptions","templateAttributesMap","selectedFilter","setSelectedFilter","filterOptions","brandAwareness","performance","ToggleButton","template","preview","useTemplateCarouselStyles","carousel","carouselItemContainer","colorNeutralBackground6","carouselItem","CarouselItem","TemplateDetailsCarousel","previews","Carousel","groupSize","circular","CarouselViewport","CarouselSlider","CarouselCard","CarouselNavContainer","layout","CarouselNav","CarouselNavButton","useTemplateDetailsModalStyles","dialog","dialogContentContainer","detailsContainer","textGroup","errorMsg","colorStatusDangerForeground1","TemplateDetailsModal","fetchDisplayAdsTemplateGroupDetails","handleFailedToLoadData","show","onShowChange","onSelectTemplate","templateCount","setTemplateCount","templateImages","setTemplateImages","templateGroupDetails","setTemplateGroupDetails","_useState7","_useState8","setIsPageLoading","_useState9","_useState10","setUrl","_useState11","_useState12","urlError","setUrlError","details","detail","displayAdsTemplateDetails","displayAd","onGetStartedButton","DismissIcon","carouselContainer","UrlInputFluent","urlErrors","newUrl","textFieldAriaLabel","additionalProperties","useDisplayTemplatesPageStyles","displayTemplatePage","names","DisplayTemplatesPage","displayTemplatesDataService","displayTemplatePagePerfMarker","setTemplates","selectedTemplatePreview","setSelectedTemplatePreview","openModal","setOpenModal","activity","ActivityContext","setData","DataContext","fetchDisplayAdsTemplateGroups","displayAdsTemplateGroup","DisplayTemplateHomePage","onViewTemplateDetails","templateName","onChooseTemplate","signal","gotoDisplayTemplatesCreationPage","onCloseModal","TopBanner","DisplayTemplatesPageComponent","useCreateDisplayTemplatePageStyles","page","editorContainer","ToastComponent","dismissToast","toastId","Toast","ToastTitle","ToastTrigger","ToastBody","ToastFooter","Link","href","gotoCampaignUIPage","subpath","useNotify","dispatchToast","useToast","intent","timeout","politeness","CreateDisplayTemplatePage","brandkitApiState","instrumentation","search","displayTemplateCreatePagePerfMarker","templateDetails","detailsData","_ref2$templateGroupId","queryString","notify","gotoDisplayTemplatesPage","removeSearchQuery","AdditionalQueries","TemplateGroupId","CreateDisplayTemplate","DisplayAdsEditor","showSummaryBarControl","showRecommendationsBanner","hasFetchBrandKitData","hasUpdateBrandKitData","templateData","containerClassName","saveInNewFolder","onSaveSuccess","reloadFolderPathTreeItem","gotoImagesPage","scenarioName","activityName","CreateDisplayTemplatePageComponent","useEditDisplayTemplatePageStyles","EditDisplayTemplatePage","displayTemplateEditPagePerfMarker","_ref2$folderId","_ref2$templateId","templateId","setTemplateDetails","templateConfig","setTemplateConfig","setDisplayAd","sourceType","setSourceType","imageDetails","displayAdFromStorage","metadata","EditDisplayTemplateImage","getImageById","gotoHomePage","TemplateId","FolderId","fetchDisplayAdsTemplateDefinition","Data","latestTemplate","displayAdsTemplateDefinitions","templateDefinition","version","EditDisplayTemplatePageComponent","useFolderGridCellWithContextMenuStyle","folderCellContextMenuButton","FoldersGridCellWithContextMenu","isReadonly","onSelectMenuItemClick","onOpenMenuItemClick","onDeleteMenuItemClick","onRenameMenuItemClick","onViewPerformanceClick","menuItems","getMenuItems","renderAccessory","positioning","MoreVertical20Regular","menuItem","MenuItem","AdsStudioFoldersGridCell","AdsStudioFoldersGridCellWithContextMenu","useModalStyle","nameInput","EditFolderNameModalImp","onComplete","onCancel","errorText","setErrorText","initName","setName","validate","onConfirm","handleCancel","isSaveButtonDisabled","defaultValue","EditFolderNameModal","CreateFolderModal","isDialogVisible","setDialogVisible","createFolderAsync","onSuccess","closeDialog","onCreateFolder","alODataErr","actionable","getUXMessage","localizedUXMessage","getFoldersLimitPerAccount","logError","DeleteConfirmDialog","showConfirmDialog","setShowConfirmDialog","deleteApiAsync","warningMsg","showUIBlocker","setShowUIBlocker","closeConfirmDialog","ConfirmDialog","isDisplayed","confirmString","cancelString","onClickConfirm","onClickCancel","isUiBlocked","overflowWrap","useDeleteConfirmDialog","deletedItems","render","onItemDeleted","uxMessage","RenameFolderModal","renameFolderAsync","onRenameFolder","newFolderName","useSummaryResultDialogStyles","summaryMessage","summaryListContainer","overflowY","borderTop","grid","gridCell","gridHeaderCell","useImagePreviewStyles","useValueWithTooltipViewStyles","overflowLeft","direction","customToolTip","toolTipContentHeader","toolTipContent","useAssociationsButtonStyles","associationsButton","ValueWithTooltip","valueDescription","ellipsisOnLeft","withArrow","Associations","availableActions","gotoAds","onRenderPreview","fit","headerWithPopup","popupId","helpPopup","colPreview","columnId","compare","b","localeCompare","colId","colName","colPath","path","colType","colError","shortErrMsg","colDeletionError","colMoveError","colAssociations","columnSizingOptions","SummaryResultModal","summary","modalType","DataGrid","resizableColumns","DataGridHeader","DataGridRow","DataGridHeaderCell","DataGridBody","rowId","columnItem","DataGridCell","ASSET_TYPES","useToolbarStyles","colorBrandBackground","toolbarButton","LibraryPageToolbar","onMoveTo","onClear","selectedCount","Toolbar","ToolbarButton","DeleteRegular","ArrowStepOverRegular","DismissRegular","LibraryPageComponent","assetLibraryUserPreferences","libraryPagePerfMarker","allowedAssetType","useBatchMoveModalHook","renderHelpPopup","targetDropFolder","resetTargetDropFolder","reloadingFolders","setReloadingFolders","setSearchLocationFilter","selectedAssets","setSelectedAssets","selectedFolders","setSelectedFolders","batchDeleteWarningMsg","setBatchDeleteWarningMsg","singleImagePromises","selectedItemCount","createFolderModal","useCreateFolderModal","renameFolderModal","folderItemRef","useRenameFolderModal","confirmDeleteFolderDialog","_useDeleteConfirmDial","deleteFolderAsync","ignorable","useDeleteFolderConfirmDialog","confirmBatchDeleteDialog","_useDeleteConfirmDial2","batchDeleteAsync","folderCount","assetCount","useBatchDeleteConfirmDialog","confirmDragAndDropDialog","targetFolderItemRef","targetFolder","batchMoveApiAsync","destFolderId","useDragAndDropConfirmDialog","batchMoveModal","summaryResultModal","isModalVisible","setModalVisible","titleRef","summaryRef","columnsRef","itemsRef","openDeleteSummaryResultModal","assetType","shortMsg","FolderIcon","failedAssetCount","failedFolderCount","strIdx","closeModal","openFolderDeleteSummaryResultModal","openBatchDeleteSummaryResultModal","openBatchMoveSummaryResultModal","assetsSummary","foldersSummary","assetErrors","folderErrors","useSummaryResultModal","resetSelectionState","createFolder","reloadFolders","navigateIntoFolder","deleteFolder","renameFolder","batchDelete","batchMove","resetFolderData","folders","showNotificationError","msg","buttonLabel","onButtonClick","_ref2$autoClose","autoClose","nid","dangerouslySetInnerHTML","__html","newTargetFolder","onCreateFolderClick","renderTilesGridCell","selected","selectItem","onSelectCell","onDrag","currentListItem","document","getElementById","onFolderClick","FoldersGridCell","onSelect","selectable","renameItem","deleteItem","subFolder","gotoPerformancePage","draggable","droppable","onDrop","assetItem","metaData","gotoEditVideoPage","videoId","isMultiSelecting","renderToolbar","onSelectionChange","selectedItems","_item$id","useCache","checkSelectedAssetsPromise","_asset$id","assetsList","hasVideoImage","isSceneKeyFrame","sectionSelectedItems","callAsyncApi","asyncApi","_len","params","_key","reloadFolderPathTreeFolderIdArr","batchMoveAsync","onBatchMoveSuccess","_ref15","showInfo","AdsStudioLibraryPageContent","dropdownWidth","renderGridCell","dataLoaded","multiSelectionEnabled","searchLocationFilterState","setSearchLocationFilterState","displayFolderPath","HiddenDivForAnnounce","toAnnounce","_ref14","isAssetLibraryAIGCMVPEnabled","isVideoTemplateEnabled","VideoTemplateUI","cardKeys","isVideoPage","gotoVideoTemplatePage","gotoAddVideoPanelPage","gotoInvestVideoPanelPage","VideoEmptyView","isFilterResult","VideoEmptyViewSVG","VideoGridView","videosGridSection","VideosPageComponent","videoPagePerfMarker","minDurationFilter","maxDurationFilter","isVideoDurationBoundaryIncluded","minVideoDuration","maxVideoDuration","CSMLVideoDuration","unlimited","VideoPageTopBannerComponent","VideosFilterBar","defaultMinVideoDuration","defaultMaxVideoDuration","useTemplateVideoStyles","templateBody","VideoTemplateCard","TemplateThumbnailUrl","LocalizedTemplateName","TemplateName","templateTagsMapping","premiumStreaming","onlineVideo","getTitleMessage","tags","setCopilotFinalUrl","loadClipchampPlayer","finalUrlError","setFinalUrlError","ClipchampPlayer","videoUrl","TemplatePreviewUrl","poster","seconds","Duration","LocalizedTemplateDescription","TemplateDescription","useVideoTemplatesPageStyles","videoTemplatePage","VideoTemplatesPage","copilotFinalUrl","copilotDomainDataService","selectedTemplate","setSelectedTemplate","isLoadingBrandKit","setIsLoadingBrandkit","brandkit","setBrandKit","isBrandKitEmpty","setIsBrandKitEmpty","_useState13","_useState14","setDataPromise","fetchVideoAdsAssetRecommendations","useCopilotRepositoryContext","getBrandKitDataByAccId","useBrandKitDataService","fetchBrandKit","updatedResponse","accId","BrandKits","Fonts","Images","LandscapeLogos","Palettes","SquareLogos","formatBrandkitForAPI","onFetchVideoRecommendations","templateFilter","TemplateIds","fetchVideoTemplates","_yield$copilotDomainD","getVideoTemplates","Templates","modifiedDataPromise","finalUrl","gotoCreateVideoPage","templateItem","NumberOfLogos","NumberOfImages","NumberOfText","WrappedComponent","Object","assign","_objectDestructuringEmpty","ServerContext","useClipchamp","CopilotRepositoryProvider","campaignId","locale","CurrentLocale","recommendationType","useEditVideoPageStyles","editVideoPage","editVideoContainer","spinnerContent","useVideoNotify","successTitle","successBody","errorTitle","errorBody","isSuccess","getTitle","getBody","EditVideoPage","isCTV","getVideo","dataPromise","videoMetadata","setVideoMetadata","setFinalUrl","setIsLoading","isSaving","setIsSaving","setError","videoRepository","createVideoRepository","folderRepository","createFolderRepository","imageRepository","createImageRepository","assetLibraryConfig","timeZone","preferencesService","activityLogger","logActivity","fetchDataAsync","video","videoData","videoRecommendation","_templateId","fetchMetadata","Metadata","JSON","parse","ads","onSaveVideo","newMetadata","uploadResult","uploadVideoMetadata","newVideoFromMTObject","recommendationFormat","gotoVideosPage","onApply","root","VideoTemplateEditorContextWrapper","videoMetaData","setIsOpen","isAADUser","IsAADUser","isDialog","showVideoTemplateSummaryBarControl","MessageBar","messageBarType","MessageBarType","withI18nConsumer","statuses","actions","useGenerateImagePageState","eventHandler","generateImageExample","clearExample","initialPrompt","setPrompt","promptChanged","setPromptChanged","setImages","serverError","setServerError","detectedBrandName","setDetectedBrandName","onSelectImage","newImages","isSelected","onStartOver","selectedImages","x","generateImagesPromise","getGenerateImagesByAIPromise","skipBrandDetection","cancelled","statusPoller","aiGCImagePerfMarker","willInit","aigcCallStart","Date","now","generateImagesByAI","onStartPolling","poller","brandNameDetected","brandNames","aigcCallDuration","hasRecraftImage","modelSource","AIModelSource","Recraft","imageUrls","logForExpand","modelSources","duration","onReturnImages","imageIds","thumbnailSrc","done","cancel","getImages","onGenerateImages","containsBrand","s","RegExp","test","detectBrandName","trimmedPrompt","promptError","savedAIGCImages","setSavedAIGCImages","savedAIGCImagesRef","_useState15","_useState16","savingAIGCImages","setSavingAIGCImages","_useState17","_useState18","savedStockImages","setSavedStockImages","savedStockImagesRef","_useState19","_useState20","savingStockImages","setSavingStockImages","addAIGCImage","addStockImage","loadStockImages","loadMoreStockImages","handleError","assetLimit","getImageAssetLimitPerAccount","learnMoreText","learnMoreLink","genericError","folderIdNumber","wrappedAddAIGCImage","res","Dalle","wrappedAddStockImage","stockImageId","wrappedSetPrompt","newPrompt","aigcImages","stockImages","totalStockImagesCount","useBrandDetectionConfirmationStyle","makeResetStyles","AIWarningIcon","BrandDetectionConfirmation","brandName","renderHelpButton","isChecked","setIsChecked","evt","usePromptEditorStyles","selectedButton","toggleButton","textareaPlaceHolder","textarea","autoCompleteTextarea","usePromptEditorBaseStyles","clipPath","borderBottomStyle","borderTopStyle","fontWeightRegular","colorNeutralBackground1Hover","borderWidth","PromptEditor","textArea","textAreaRef","usedOptions","setUsedOptions","PuzzlePiece20Regular","words","word","usedOption","Emoji20Regular","Color20Regular","ShapeSubtract20Regular","Lightbulb20Regular","getOptions","promptEditorBaseStyles","promptEditorStyles","optionsState","setOptionsState","selectedOption","textToComplete","setTextToComplete","optionsIndex","setOptionsIndex","slicedOptions","filteredOptions","roundedIndex","sliceOptions","shadowTextArea","wordsRef","scrollHeight","clientHeight","scrollTop","onMouseOver","onMouseOut","ArrowClockwise16Regular","ToggleButtons","toggleSelectedOption","suggestedWords","querySelectorAll","useGeneratedImagesStyles","animationDuration","animationIterationCount","animationTimingFunction","animationName","to","useLoadingViewStyles","backgroundPosition","forcedColorAdjust","LoadingCell","GeneratedImages","stopGeneratingBtnRef","generatedImagesStyle","onRenderImageSpinner","Icon","isSaved","CheckmarkRegular","SpinnerIosRegular","AddButton","addImage","tooltipContent","onRenderAIGCCell","srcURL","URL","host","origin","pathname","URLSearchParams","searchParams","addSearchParams","w","h","toString","stopPropagation","TilesGridCellImage","showSpinner","onCustomizedSpinner","InfoSparkleSVGIcon","onRenderStockCell","Preview","aigcImagesWithAction","stockImagesWithAction","aigcImagesGridSection","k","gridMode","maxColumns","columnPadding","rowPadding","stockImagesGridSection","BlackSparkleSVGIcon","LoadingIndicator","SquareDismissIcon","ImageSearchRegular","useExampleImageStyles","ExampleImage","baseClasses","useExplorePromptsStyles","letterSpacing","ExplorePrompts","memo","MultiLineEllipsisText","explorePromptsStyles","promptsWithAction","prompts","promptsGridSection","localizedPromptText","useAIGCDisclaimerStyles","marginLeft4","useAIGCDisclaimerDefaultStyles","AIGCDisclaimer","defaultClasses","MessageBarBody","RemainingText","remainingText","ErrorMessage","useGenerateImagePageStyles","ActionBar","startOver","generateImage","ArrowReset24Regular","code","HollowSparkleSVGIcon","PromptPanel","topDiv","setTopDiv","_useTopDivMetaData","offset","setOffset","useLayoutEffect","newOffset","offsetTop","offsetParent","useTopDivMetaData","hidden","ImagePanel","hasAIGCImages","hasAIGCImageExample","GenerateImagePageComponent","generateImagePerfMarker","changeLayout","announcedText","setAnnouncedText","_useGenerateImagePage","LoadAdsStudioImageGenerationPage","nav","Mode","Hidden","useButtonStyles","bottonWrapper","helpLink","AdsStudioAddAssetPanel","selectedAsset","onClickSelect","showBlocker","isMultiSelection","buttonClasses","panelRef","LaunchedAddImageAssetsFromAdsStudio","handleJobErrors","jobErrors","get","onSelectAddImages","firstNode","querySelector","lastNode","handleTabKey","shiftKey","handleShiftTabKey","addEventListener","removeEventListener","handleESCKey","isDarkThemed","useSourceImages","setSelectedImages","setShowBlocker","validImages","selectedImageUrls","onStockClickSelect","stockImagePerfMarker","saveOperations","each","uploadStockImage","runJobsInParallelWithRateLimit","jobsToRateLimit","maxJobsInParallel","MaxAddAssetJobInParell","handleJobError","goBack","onInvestClickSelect","investImagePerfMarker","uploadInvestImage","investImageId","onWebsiteClickSelect","websiteImagePerfMarker","uploadOperations","uploadImageByUrl","Website","WebsiteImagePanel","_useSourceImages","WebsiteImagePanelContent","StockImagePanel","StockImagePanelContent","getAddVideoError","limit","processVideoSizeLimitError","errorList","AddVideoPanel","selectedVideos","setSelectedVideos","uploadVideoByUrl","videos","AddVideoPanelContent","usePanelStyles","messageBar","usePreviewStyles","imageItemBox","UploadFilesPanel","globalLegacyI18n","isUploadImageUpscaleEnabled","previewClasses","errors","setErrors","uploadInput","globalI18n","filePickerI18n","mergeI18n","onFilesAddedCallback","_useUploadFiles","useUploadFiles","previewArr","supportedFileExtensions","supportedImageExtensions","supportedVideoExtensions","clearInputFile","readFile","fileObjects","selectedFiles","selectedFilesCount","errorArr","fileObj","fileSizeMB","toFixed","reachLimit","isReachFileSizeLimit","ext","parseFileName","getReachFileSizeLimitErrorMessage","click","UploadPreviewWithCustomPreview","assetList","PreviewComponent","FileUploadingPreview","customClasses","errMsg","MessageBarActions","containerAction","multiple","accept","NO_VALID_FILES_ERROR","ASSET_LIMIT_EXCEEDED_ERROR","usePreviewStyle","linkButton","UploadFolderPanel","uploadFolderInfo","setUploadFolderInfo","showUploadPreview","setShowUploadPreview","completedAssetCount","isUploadRunning","fileAdditionalInfoArrRef","uploadFileAsync","useUploadAsset","getCustomizedHandlerOptions","useCustomizedHandlerOptions","createFolderBulk","cancelPendingVideoUpload","dismissAndRefreshLibrary","onUploadError","uploadAsset","dataURL","fileObject","nameWithoutExt","isVideo","isImageUpscaled","prevState","rootFolder","updatedProgress","onUploadStart","totalSize","rootFolderName","acceptedAssets","previewImage","readFileAsDataURLAsync","numberOfAssets","getErrorInfo","folderCreationErrors","assetUploadErrors","getFolderUploadError","onUploadPartialComplete","warnMessage","onUploadComplete","upscaledImagesArrCount","fileCount","FolderPreviewComponent","createFolderPreviewComponent","Boolean","_useUploadFolder","_ref$assetUploadLimit","assetUploadLimit","uploadAssetAsync","supportedExtensions","readFileAsync","useReadAsset","validateFileAsync","useValidateAsset","validateAssetAsync","obj","onFolderRead","acceptedFiles","filterFilesByExtensions","customizedFilesOptions","_parseFileName","foldersToCreate","createFolderHierarchyMap","assetsSkippedCreationDueToFolderError","createFoldersByHierarchy","folderMap","creationPromises","createRateLimitedAssetUploadPromises","folderIdPromises","assetsSkippedUpload","readAssetAsync","useUploadFolder","isRootFolderId","maxUploadNum","showTitle","directory","webkitdirectory","MixedImagePanel","InvestImagePanelContent","useSourceVideos","validInvestVideos","validUrlVideos","investVideoPerfMarker","uploadInvestVideo","investVideoId","videoSrc","videoIds","onUrlClickSelect","addVideoUrlPerfMarker","MixedVideoPanel","_useSourceVideos","InvestVideoPanelContent","InvestImagePanel","InvestVideoPanel","ROOT_KEY","SearchResultView","searchPagePerfMarker","_ref2$query","cachedSearchText","setCachedSearchText","breadcrumbItems","onBreadcrumbItemClick","newAssets","LoadAdsStudioSearchResultPage","Count","AdsStudioBreadcrumb","onItemClick","maxLengthOfItem","customItemStyle","headerDescriptions","SearchResultFilterBar","defaultSearchText","getPlacementSetConfig","getSmartCroppings","isAudienceAdSmartCropEnabled","isMMAV2Enabled","isPMaxAspectRatiosV2Enabled","isAdPreviewRefreshEnabled","getExpandedCroppingsFunc","placementSets","placementSetName","CSMLAdType","PMax","placementTypes","UAPPlacementTypeAlias","PMaxV2","AllV2","All","getDefaultPlacementsCropping","MMA","Audience","MSANV2","MSAN","ImageExtension","ImageExt","GenericImage","BingDesktopMultiImage","BingMobileMultiImage","useBackgroundChange","fetchSegmentationError","setFetchSegmentationError","isFetchingSegmentations","setIsFetchingSegmentations","getImageSegmentations","generateImageBackground","_useMaskedImage","imageUrlWithoutBackground","setImageUrlWithoutBackground","imageUrlWithGeneratedBackground","setImageUrlWithGeneratedBackground","imageUrlWithColoredBackground","setImageUrlWithColoredBackground","segmentationMasks","setSegmentationMaskInternal","selectedMasks","setSelectedMasks","selectedImageSrc","setSelectedImageSrc","maskSetsBase64","setMaskSetsBase64","alphaArray","setAlphaArray","setSegmentationMasks","maskSetsArray","selectedMasksArray","newAlphaArray","resetStates","maskValues","getMaskValueAtPoint","y","originalImageWidth","getMaskValueAtPointFunc","useMaskedImage","drawColorBackground","imageWidth","imageHeight","fetchImgPromise","coloredBackground","createColorBackground","getSegmentations","imageSegmentationPerfMarker","parseMaskResultPromise","parsedResult","rawMaskSetsBase64","rawMaskSetsBase64String","selfDrawnImageUrl","generateBackground","backgroundGenerationPerfMarker","outputImageWidth","outputImageHeight","newImageUrl","generatedUrl","resultImage","ViewName","revertMetaData","_revertMetaDataInner","combinedEffectArray","combinedEffect","filterEffect","effect","blurEffect","extractInfoForDeserialization","blur","revertMetaDataInner","effectSettings","effectOptions","designerEffect","backgroundBlur","useEditImageState","initialCurrentView","getAssetEnhancementSettings","currentView","setCurrentView","originalImage","setOriginalImage","setLoadingStatus","initialAssetLoading","setInitialAssetLoading","backgroundChangedResult","setBackgroundChangedResult","savedBackgroundColorChangedImage","setSavedBackgroundColorChangedImage","filterBlurBaseImage","setFilterBlurBaseImage","isConfirmDialogOpen","setIsConfirmDialogOpen","assetsAIEnhancementEnabled","setAssetsAIEnhancementEnabled","cropImage","isImageFittingEnabled","isBrandKitEnabled","finalImageFittingEnabled","originalWidth","originalHeight","settings","assetsAIEnhancementEnabledInner","AssetAIEnhancementOptout","promises","isCopilotRegionRestricted","feature","isRestricted","baseId","gotoEditDisplayImagePage","_useFilterAndBlur","initialFilter","initialBlur","isActive","imagesWithFilter","imagesWithFilterAndBlur","getImagesWithFilter","getImagesWithFilterAndBlur","filterIndex","setFilterIndex","backgroundBlurEnabled","setBackgroundBlurEnabled","imagesWithFilterAndBlurCached","setImagesWithFilterAndBlurCached","backgroundBlurLevel","setBackgroundBlurLevel","currentImage","setCurrentImage","initialStateApplied","setInitialStateApplied","initialStatusWhenActive","updateImage","newImage","getImagesWithFilterImp","toggleBackgroundBlur","enableBackgroundBlur","changeBackgroundBlurLevel","blurLevel","isImageUpdated","isImageChangedWhenActive","useFilterAndBlur","resultFilterAndBlurImage","isFilterAndBlurImageUpdated","isFilterAndBlurImageChangedWhenActive","_useBackgroundChange","adPlacementResult","AudienceAdSmartCrop","adType","setAdType","errorTip","setErrorTip","showRequiredOnly","setShowRequiredOnly","editingPlacementInfo","setEditingPlacementInfo","onEditPlacement","placementInfo","onAdPreviewError","stringify","_useAdPreviewModel","useAdPreviewModel","firstImage","setPlacementConfig","multiImagePlacementSets","updatePlacementCropping","updatePlacementCroppingByImageType","hasCropSettingsChanged","hasDataChanged","changedCropSettings","imageInfo","imageMeta","imageCropping","placementList","previewTexts","getPreviewText","IsMMAV2Enabled","IsAmplifyEnabled","DisplayPlusAmplify","PMaxNewAspectRatios","PMaxExcludeNewAspectRatios","getExpandedCroppingsInner","adTypeInner","argObj","placementsToExpand","getPlacementsToExpand","placements","skipOutpainting","getCropSettingsFromRoi","expandedMeta","roiInfo","placementSetConfig","clonedImage","maxCropBox","handleInvalidCropSetting","invalidRatioList","errorInfo","ratio","aspectRatioAsRatio","placement","previewTypeString","ratio1","ratio2","placement1","placement2","getSizeErrorRatioList","saveCropPlacement","newCropping","placementMeta","placementType","imageType","newPlacementCropping","cancelCropPlacement","switchAdType","switchShowRequiredOnly","ImageExperienceImage","hasCroppingTask","cropSettingsToUpdate","allSizeInvalidRatioList","getAllSizeErrorRatioList","requiredSizeInvalidRatioList","allViewErrorTip","previewName1","previewName2","currentViewErrorTip","useAdPlacement","updateAdPlacementImageInner","saveImageCopy","uploadImageToFolder","saveImageWithBaseId","saveImage","moveImageToFolder","addImageWithBaseIdToFolder","replaceBackground","backgroundChangedImage","needToSave","isUnsavedStockImage","isSavedStockImage","isStockImage","cropImageAndGoBack","backToLibraryPage","placementSettings","onConfirmDialogSave","saveImageDirectly","updateAdPlacementImage","onload","saveBackgroundChangedResult","moveImageToFolderInner","saveAsCopy","buildImageAssetMetadataToSave","effectKey","convertMetaData","resInner","inner","disableSave","saveButtonTooltip","tooltip","haveCroppingTasks","imagePreviewView","borderTopLeftRadius","borderTopRightRadius","ImagePreviewView","imageView","buttonsConfig","buttonsRef","notificationConfig","buttonNum","buttonItem","isFirstButton","isLastButton","notificationContent","dismissAriaLabel","outlineOffset","ImageAdjustView","goToBackgroundChangeView","imageAdjustViewStyles","VideoBackgroundEffect20Regular","timerRef","handleChangeBlur","clearTimeout","CardHeader","Switch","Slider","usePlacementListStyles","placementListView","showRequiredOnlyCheckbox","errorIcon","adPreviewGridLayoutContainer","usePlacementContaierStyles","placementContainer","white","containerHeader","containerTitle","previewWrapper","colorNeutralBackground5","previewType","placementBox","requireBox","cropButton","minSize","adPreviewComponentContainer","tooltipProps","PlacementContainer","aspectRatioUIString","isRequired","onCrop","AdPreviewPlacementContainerBase","Image16Regular","errRequireBox","ErrorCircleFilled","Crop20Regular","onRenderFooter","previewContainerClassName","adTypeList","adTypeStrings","AdTypeControl","AdPlacementListView","onRenderPlacement","AdPlacementComponent","placementConfig","getPlacementConfig","sizeValidForRatio","_createElement","isEnabled","placementData","placementListWrapper","AdPreviewGridLayout","onRenderEmptyView","gridLayoutContainerClassName","PlacementEditView","onSave","goToPlacementListView","placementCropping","curPlacementCropping","setCurPlacementCropping","handleCropSettingsChanged","handleSave","p","newPlacement","expandedPlacementCropping","effectiveImageUrl","effectiveImageWidth","effectiveImageHeight","newFirstImg","imageCropView","Checkmark20Regular","placementEditView","ArrowLeft16Regular","AdPreviewSinglePlacementLayout","baseSaveButton","SaveButtonInSummaryBar","onSaveDirectly","onSaveAsCopy","isSaveAsCopyDisabled","isSaveDisabled","isBaseButton","baseButtonText","onBaseButtonClick","summaryBar","setSummaryBar","setOpen","renderBaseSaveButton","baseSaveButtonWithTooltip","saveAsCopyMenuItem","splitSaveButton","triggerProps","SplitButton","primaryActionButton","customizedContent","timer","setInterval","summaryBarCustomizeEle","clearInterval","createPortal","UnselectedAdPlacementSVGIcon","viewBox","xmlns","d","fillOpacity","SelectedAdPlacementSVGIcon","editPageNavigation","tabList","tabItemWrapper","tabItem","wordBreak","AdPlacementId","AdjustId","NavigationView","isAdjustButtonDisabled","adjustButtonTooltip","isAdPlacementSelected","isAdjustSelected","selectedItemId","handleAdPlacementClick","handleAdjustClick","selectedIcon","WandFilled","vertical","useBackgroundChangeStyles","colorNeutralForeground3Hover","useObjectSelectionStyles","DialogForObjectSelection","updateSubject","objectSelectionError","ObjectSelectionView","originalImageUrl","originalImageHeight","updateHighlightedImage","toggleSelectedMask","borderImageSrc","workingSelectedImageSrc","highlightedImageSrc","imageContainer","openEscape","setOpenEscape","mouseOutsideHandler","contains","ObjectSelectionImageView","useExampleImageListStyles","exampleImageList","useExampleImageCellStyles","exampleImageCell","ExampleImageList","withOverridableStyles","ExampleImageListWithoutStyle","ExampleImageCell","ExampleImageCellWithoutStyle","getGenerationHistoryListStyles","paddleBtn","colorNeutralForeground2BrandHover","paddleBtnRight","historyListRoot","colorBrandForeground1","HistoryListImpl","selectedIndex","historyList","onSelectHistory","keyCode","History20Regular","HistoryListImages","GenerationHistoryList","PromptControl","generate","isGenerating","onSelectExampleImage","selectedHistoryIndex","exampleImageId","disabledText","onClickGenerateButton","disabledButton","MAX_PROMPT_LENGTH","labelId","getImageShimmerStyles","imageShimmerRoot","animationDirection","ImageShimmerImpl","ImageShimmer","mask","ImageWithShimmer","targetImage","showShimmer","ImageToUpdate","usePromptControlViewFactoryWithState","setNotificationConfig","isRemovingBackground","goToImageAdjustView","applyImage","showLearnMore","setShowLearnMore","setIsGenerating","_useObjectSelection","workingMasks","setWorkingMasks","setWorkingSelectedImageSrc","originalImagePixels","setOriginalImagePixels","initialSelectedImageSrc","setInitialSelectedImageSrc","setBorderImageSrc","initialBorderImageSrc","setInitialBorderImageSrc","setHighlightedImageSrc","setObjectSelectionError","pixels","getImagePixels","createSelectedImage","selectedImageSrcProp","masks","isAdd","createSelectedImageSrc","newBorderImageSrc","newImageSrc","maskValue","highlightedImage","createHighlightedImage","maskId","newMasks","useObjectSelection","activeState","setActiveState","showRemoved","setShowRemoved","dismissNotification","goToStaticImage","goToObjectSelection","wrappedUpdateSubject","setHistoryList","historyData","pv","promptValue","addNewHistory","pPromptValue","generatedImageUrl","newHistoryList","unshift","imgUrl","gotoDisallowedContent","curGeneratedImageUrl","DisallowedContent","renderErrorNotificationConfig","others","DismissCircle16Filled","cancelUpdateSubject","cancelBackgroundChange","buttonSettingConfig","ImageEdit20Regular","imageSetting","promptControlView","useColorButtonStyles","ColorButton","draw","colorButtonStyles","hexColor","canvas","createElement","ctx","getContext","fillStyle","fillRect","toDataURL","hexToBase64Color","useColorControlStyles","fontWeightSemibold","colorNeutralBackground1Selected","ColorControl","lastColor","colorControlStyles","colorPicker","addColorButton","showColorPicker","setShowColorPicker","wrappedDraw","colorValue","toggleColorPicker","logSetColorHelper","sampleColor","ed","newColor","EyeDropper","sRGBHex","onEyeDropperKeyDown","debouncedDraw","selectedColorId","suggestedColorId","Eyedropper20Regular","getColorFromString","colorObject","alphaType","showPreview","strings","hueAriaLabel","alphaLabel","greenLabel","blueLabel","redLabel","isDrawing","tabs","useControlViewFactoryWithState","isCallRemovingBackground","setIsCallRemovingBackground","tab","removingBackgroundNotificationConfig","SpinnerIcon","backgroundRemovedNotificationConfig","CheckmarkCircle16Filled","_usePromptControlView","promptButtonsConfig","promptImageView","_useColorControlViewF","setColor","setLastColor","setIsDrawing","colorControlView","targetColor","useColorControlViewFactoryWithState","colorButtonsConfig","colorImageView","useBackgroundChangeDisclaimerStyles","BackgroundChangeDisclaimer","BackgroundChangeView","onApplyImage","_useControlViewFactor","LoadAdsStudioBackgroundRemovalPage","ArrowLeftFilled","ColorBackground20Regular","backgroundImg","UpdateConfirmDialog","previewName","DismissCircle20Regular","editImagePage","navigationView","navigationPlaceholder","contentWrapper","EditImagePageComponent","editPagePerfMarker","_ref2$editImageUrl","_ref2$initialCurrentV","_useEditImageState","gotoPlacementEditView","LoadAdsStudioImageEditingPage","useLayoutStyles","layer","previewContainer","usePreviewBaseStyles","fadeOut","useSequentialNavigatorStyles","sequentialNavigatorContainer","navigatorStatusContainer","iconButton","chevronLeft","chevronRight","disabledIcon","useNonActiveVideoPreviewStyle","failedIconContainer","usePanelStyle","detailPanel","footerButton","useInfoPaneHeaderStyle","imageUsage","detailHeader","buttonBox","editBox","deleteBox","closeButton","useInfoItemDefaultStyles","contentItem","contentName","contentValue","useItemInfoContentStyles","contentBox","detailContentWrapper","linkContainer","useInfoPaneItemRenameStyle","nameContentBox","addNameBox","addNameTitle","addNameIcon","nameBox","editNameBox","textField","completeIcon","useItemInfoCopyUrlStyles","copyUrl","useItemInfoVideoQualityStyles","qualityBadge","usePerformanceContentStyles","dropdown","metricBox","useExternalLinkStyles","externalButton","SequentialNavigator","totalCount","currentIndex","onNext","onPrevious","disableLeft","disableRight","AssetItemPreviewBase","itemData","shouldHideContent","onRenderPreviewContent","itemInfo","shouldFadeIn","VideoStatusPreviewConfig","tip","Transcoding","ItemPlaceholderBoxViewFooterType","warning","fabricIconName","fabricIconDynamicClassName","learnMoreLinkText","learnMoreLinkTopic","NonActiveVideoPreview","footerProps","mappedConfig","localizedTextFields","fabricIconClassName","ItemPlaceholderBoxView","mainViewIcon","videoIcon","mainViewIconLabel","VideoPreview","VideoPlaybackView","videoInfo","ItemDetailsPanelBase","footerKeyDownHandler","onFooterKeyDown","DrawerOverlay","DrawerHeader","DrawerHeaderTitle","DrawerBody","DrawerFooter","InfoPaneHeader","disableEdit","iconBox","EditRegular","Dismiss24Regular","DeleteAssetDialog","onDeleteAsync","onDeleteSuccess","confirmText","errorMessageForUsedAsset","genericErrorMessage","handleDelete","Code","cancelDelete","tooltipCalloutProps","isBeakVisible","CopyUrlButton","isURLCopied","setIsURLCopied","onCopyUrlClick","onTooltipToggle","isVisible","directionalHint","DirectionalHint","bottomRightEdge","delay","closeDelay","InfoPaneItemCopyUrl","onCopy","InfoItemDefault","spinnerStyle","InfoItemRename","renameAsync","renderBlocker","inputPlaceholderText","renameTitleText","displayInputBox","setDisplayInputBox","inputName","setInputName","showUiBlocker","setShowUiBlocker","handleRename","onEnterRename","Enter","handleDisplayInputBox","onEnterEditIcon","onEnterCancel","onEnterPress","maxLength","Checkmark16Regular","Dismiss16Regular","cancelIcon","Edit16Regular","ItemInfoContentBase","itemName","promptNameInputLabel","nameInputPlaceholderText","itemInfos","renderItem","CustomComponent","_ref2$CustomComponent","CustomComponentOptions","promptInputLabel","_ref4$CustomComponent","_ref4$valid","valid","metricsMap","ItemExternalLink","Open20Regular","defaultMetricLabel","metricOptions","PerformanceContent","onGotoAds","getGranularityEnum","isMetricLoading","setIsMetricLoading","metricData","setMetricData","granularity","setGranularity","loadSeriesData","selectedMetricValues","timeSeriesParams","metric","isMovingAverageOn","optionValue","granularityEnum","Dropdown","defaultSelectedOptions","Option","InlineChart","ImageDetailsPanel","assetInfo","warningMsgProp","handleDeleteAsset","handleRenameAsset","showDeleteConfirm","setShowDeleteConfirm","setWarningMsg","onDeleteImage","onRenameImage","newName","onCopyUrl","imageInfoArr","_assetInfo$id","VideoQualityBadge","quality","qualityText","PlacementQualityToText","Badge","VideoDetailsPanel","onRenameVideo","onEditVideo","videoInfoArr","getClosestAspectRatio","convertTimeDuration","durationInMS","previewCompMap","panelCompMap","AssetDetailsPageLayout","navigateToOtherItem","itemId","loadedItems","loadMoreItemsAsync","renderItemPreview","renderItemDetails","reloadLandingPageRef","hideContent","loadMoreFlag","setLoadMoreFlag","redirectToOtherItem","_loadedItems$index","gotoNext","nextIndex","gotoPrevious","itemPreviewRef","Layer","AssetDetailsPage","LaunchedAssetLibrary","LaunchedImageDetails","_usePreviewAndPanel","AssetPreview","AssetDetailsPanel","usePreviewAndPanel","_useDetailsPageSetup","currentItemId","navigateToFallbackPage","gotoLandingPage","redirect","otherItemId","otherItemFolderAssetType","onDismissed","useDetailsPageSetup","_useAssetDetailsPageA","deleteAsset","navigator","clipboard","writeText","useAssetDetailsPageActions","renderAssetPreview","renderAssetDetailsView","useBackgroundRemovalModalStyle","uploadContainer","contentArea","chooseImageContainer","uploadTitle","browse","uploadSubtext","gridTitle","loadingMask","alertError","BackgroundRemovalLibraryGrid","onSelectedImageChange","contentRef","selectedImageIdRef","validAssets","selectedImageitem","loadMoreDataWithLoading","PanelImageGrid","isHideDescription","isMultiple","overlayBodyRef","UploadArea","handleUploadFile","handleDropFile","droppedFiles","dataTransfer","handleDropOver","onDragOver","ChooseImageIcon","LoadingComp","BackgroundRemovalModalComponent","setSelectedImage","uploadCallback","newSelectedImage","onClickContinue","isUploadingFile","dialogContentRef","isContinueButtonDisabled","isSubPageSelected","subPage","rootRoute","isHomePageSelected","gotoPage","history","currentSearch","getSearchQuery","location","isLibraryPageSelected","LOADING_CELL","useAdStudioNavigation","onDropToFolderProp","onDropToFolder","setSelectedItemId","selectedFolderId","setSelectedFolderId","isCopilotEnabled","setIsCopilotEnabled","BrandKitUI","folderPathTree","loadFolderPathTreeItem","loadMoreFolderPathTreeItem","initializeFolderPathTree","navigateIntoRootFolder","currentFolder","staticItems","brandKitEnabled","route","HomeRegular","KeyboardLayoutOneHandedLeft20Regular","VideoRegular","DataTrendingRegular","StyleGuideRegular","FolderRegular","showDivider","getStaticItems","handleFolderItemClicked","selectedItem","CustomTab","LoadingSpinner","containerClass","LeafTreeItem","level","setSize","posinset","parentValue","TreeItem","itemType","TilesGridCellDropDecorator","customClassName","customDropDecorator","TreeItemLayout","treeItemLayout","treeSelected","overflowMode","TooltipOverflowMode","Self","hostClassName","tooltipHost","SubTreeItem","folderItem","onRenderSubTree","onLeafTreeItemClicked","parentFolder","loadMore","subFolders","subFoldersCount","SubTree","parentFolderId","onItemSelected","handleOpenChange","openInner","prevLoadingStatus","navigationItem","prevOpenStatus","handleTreeItemClicked","ChevronDown","ChevronDownFilled","ChevronDownRegular","ChevronRight","ChevronRightFilled","ChevronRightRegular","checkFolderSelected","subFloders","selectedId","subFolderSelected","isCurrentFolderSelected","treeItems","_SubTree","useAdStudioNavigationStyle","customTabItem","adStudioNavigation","divider","dividerContent","useFoldersTreeViewStyle","flatTree","outlineStyle","outlineWidth","FolderPathTreeView","FlatTree","AdStudioNavigation","_useAdStudioNavigatio","SideNavigationItem","groupId","selectedTabId","useAdStudioSideNavigation","groupedItems","getGroupedItems","AdStudioSideNavigation","_useAdStudioSideNavig","renderFolderPathTree","groupedStaticItems","renderCustomizedItem","getSelectedNavigationItemId","SideNavigation","selectionMode","minimumVisibleCount","subPagesWithoutNavigation","hideNavigation","height100","leftMargin","withAdStudioNavigation","Wrapper","ROOT_ROUTE","setTargetDropFolder","layoutSize","setLayoutSize","useLayoutResizeObserver","largeSize","LayoutSizeScale","XL","getModeByLayoutSize","shouldNotShowNavigation","match","getDisplayName","hoistNonReactStatics"],"sourceRoot":""}