UNPKG

@arcgis/coding-components

Version:

Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.

34 lines (33 loc) 1.01 kB
import { createFilterExpression as c } from "@arcgis/components-utils"; import "monaco-editor"; import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js"; import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js"; import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js"; /*! All material copyright Esri, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. v4.32.14 */ function g(r, t, n, m) { if (!t) return []; const i = Array.isArray(t) ? t : [t]; if (!i.length) return []; const e = c(n); return r.filter((a) => i.some((s) => e.test(String(a[s] ?? "")))); } function h(r) { return r ? `${r.portal.url}/home/item.html?id=${r.id}` : ""; } const l = async () => { const { editor: r } = await import("monaco-editor/esm/vs/editor/editor.api.js"); return r; }; let o = null; async function x() { return o ??= l(), await o; } export { g as f, x as i, h as p };