${msg("A crawl will start immediately on save.")}
` : ""} ${this.scheduleInterval ? html`${msg( html`Scheduled crawl will run ${this.formattededNextCrawlDate}.` )}
` : ""}import { state, property } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import cronParser from "cron-parser";
import type { AuthState } from "../../utils/AuthService";
import LiteElement, { html } from "../../utils/LiteElement";
import { getLocaleTimeZone } from "../../utils/localization";
import type { CrawlTemplate } from "./types";
const initialValues = {
name: "",
runNow: true,
schedule: "@weekly",
config: {
seeds: [],
scopeType: "prefix",
limit: 0,
},
};
const initialSeedsJson = JSON.stringify(initialValues.config, null, 2);
const hours = Array.from({ length: 12 }).map((x, i) => ({
value: i + 1,
label: `${i + 1}`,
}));
const minutes = Array.from({ length: 60 }).map((x, i) => ({
value: i,
label: `${i}`.padStart(2, "0"),
}));
/**
* Usage:
* ```ts
*
${msg( "Configure a new crawl template. You can choose to run a crawl immediately upon saving this template." )}
${msg("A crawl will start immediately on save.")}
` : ""} ${this.scheduleInterval ? html`${msg( html`Scheduled crawl will run ${this.formattededNextCrawlDate}.` )}
` : ""}
${msg(
html`See
Browsertrix Crawler docs