diff --git a/ui/core/components/exporters.ts b/ui/core/components/exporters.ts index 31a0229ca6..dacf15d7dc 100644 --- a/ui/core/components/exporters.ts +++ b/ui/core/components/exporters.ts @@ -9,18 +9,30 @@ import { IndividualSimSettings } from '../proto/ui'; import { classNames, raceNames } from '../proto_utils/names'; import { UnitStat } from '../proto_utils/stats'; import { specNames } from '../proto_utils/utils'; -import { downloadString, jsonStringifyWithFlattenedPaths } from '../utils'; +import { arrayEquals, downloadString, getEnumValues, jsonStringifyWithFlattenedPaths } from '../utils'; import { BaseModal } from './base_modal'; -import { IndividualWowheadGearPlannerImporter } from './importers'; +import { IndividualLinkImporter, IndividualWowheadGearPlannerImporter } from './importers'; import { RaidSimRequest } from '../proto/api'; +import { SimSettingCategories } from '../sim'; +import { EventID, TypedEvent } from '../typed_event'; +import { BooleanPicker } from './boolean_picker'; import * as Mechanics from '../constants/mechanics'; +declare var pako: any; + +interface ExporterOptions { + title: string, + header?: boolean, + allowDownload?: boolean, +} + export abstract class Exporter extends BaseModal { private readonly textElem: HTMLElement; + protected readonly changedEvent: TypedEvent = new TypedEvent(); - constructor(parent: HTMLElement, simUI: SimUI, title: string, allowDownload: boolean) { - super(parent, 'exporter', { title: title, footer: true }); + constructor(parent: HTMLElement, simUI: SimUI, options: ExporterOptions) { + super(parent, 'exporter', { title: options.title, header: options.header, footer: true }); this.body.innerHTML = ` @@ -30,7 +42,7 @@ export abstract class Exporter extends BaseModal { Copy to Clipboard - ${allowDownload ? ` + ${options.allowDownload ? `