MCPcopy Create free account
hub / github.com/chhoumann/quickadd / constructor

Method constructor

src/preflight/OnePageInputModal.ts:60–89  ·  view source on GitHub ↗
(
		app: App,
		requirements: FieldRequirement[],
		initial?: Map<string, unknown>,
		computePreview?: PreviewComputer,
	)

Source from the content-addressed store, hash-verified

58 private rejectPromise!: (reason?: unknown) => void;
59
60 constructor(
61 app: App,
62 requirements: FieldRequirement[],
63 initial?: Map<string, unknown>,
64 computePreview?: PreviewComputer,
65 ) {
66 super(app);
67 this.requirements = requirements;
68 this.initialValues = new Map<string, string>();
69 this.computePreview = computePreview;
70 initial?.forEach((v, k) => {
71 if (typeof v === "string") this.initialValues.set(k, v);
72 });
73
74 this.updatePreviewDebounced = debounce(
75 this.updatePreviews.bind(this),
76 150,
77 true,
78 );
79
80 this.waitForClose = new Promise<Record<string, string>>(
81 (resolve, reject) => {
82 this.resolvePromise = resolve;
83 this.rejectPromise = reject;
84 },
85 );
86
87 this.display();
88 this.open();
89 }
90
91 private display() {
92 this.containerEl.addClass("quickAddModal", "onePageInputModal");

Callers

nothing calls this directly

Calls 4

displayMethod · 0.95
debounceFunction · 0.90
setMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected