/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Imported for side-effects. import { html } from "lit.all.mjs"; // eslint-disable-next-line import/no-unassigned-import import "toolkit-widgets/panel-list.js"; // eslint-disable-next-line import/no-unassigned-import import "browser/components/migration/content/migration-wizard.mjs"; import { MigrationWizardConstants } from "chrome://browser/content/migration/migration-wizard-constants.mjs"; // Imported for side-effects. // eslint-disable-next-line import/no-unassigned-import import "toolkit-widgets/named-deck.js"; export default { title: "Domain-specific UI Widgets/Migration Wizard", component: "migration-wizard", }; const FAKE_MIGRATOR_LIST = [ { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "chrome", displayName: "Chrome", resourceTypes: [ "HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS", "PAYMENT_METHODS", ], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/chrome.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "chrome", displayName: "Chrome", resourceTypes: [ "HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS", "PAYMENT_METHODS", ], profile: { id: "person-2", name: "Person 2" }, brandImage: "chrome://browser/content/migration/brands/chrome.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "ie", displayName: "Microsoft Internet Explorer", resourceTypes: ["HISTORY", "BOOKMARKS"], profile: null, brandImage: "chrome://browser/content/migration/brands/ie.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "edge", displayName: "Microsoft Edge Legacy", resourceTypes: ["HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS"], profile: null, }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "chromium-edge", displayName: "Microsoft Edge", resourceTypes: [ "HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS", "PAYMENT_METHODS", ], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/edge.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "brave", displayName: "Brave", resourceTypes: [ "HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS", "PAYMENT_METHODS", ], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/brave.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "internal-testing", displayName: "Internal Testing Migrator", resourceTypes: ["HISTORY", "PASSWORDS", "BOOKMARKS"], profile: null, }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "safari", displayName: "Safari", resourceTypes: ["HISTORY", "PASSWORDS", "BOOKMARKS"], profile: null, brandImage: "chrome://browser/content/migration/brands/safari.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "opera", displayName: "Opera", resourceTypes: ["HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS"], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/opera.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "opera-gx", displayName: "Opera GX", resourceTypes: ["HISTORY", "FORMDATA", "PASSWORDS", "BOOKMARKS"], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/operagx.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "vivaldi", displayName: "Vivaldi", resourceTypes: ["HISTORY"], profile: { id: "Default", name: "Default" }, brandImage: "chrome://browser/content/migration/brands/vivaldi.png", }, { type: MigrationWizardConstants.MIGRATOR_TYPES.BROWSER, key: "no-resources-browser", displayName: "Browser with no resources", resourceTypes: [], profile: { id: "Default", name: "Default" }, }, { type: MigrationWizardConstants.MIGRATOR_TYPES.FILE, key: "file-password-csv", displayName: "Passwords from CSV file", brandImage: "chrome://branding/content/document.ico", resourceTypes: [], }, { type: MigrationWizardConstants.MIGRATOR_TYPES.FILE, key: "file-bookmarks", displayName: "Bookmarks from file", brandImage: "chrome://branding/content/document.ico", resourceTypes: [], }, ]; const Template = ({ state, dialogMode }) => html`