UNPKG

swagger-editor

Version:

- [Anonymized analytics](#anonymized-analytics) - [Getting started](#getting-started) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Usage](#usage) - [Development](#development) - [Prerequisites](#prerequisites) - [Setting

50 lines (49 loc) 1.83 kB
import e from "../util/index.js"; import "react"; import t from "prop-types"; import { jsx as n } from "react/jsx-runtime"; //#region src/plugins/swagger-ui-adapter/extensions/spec/wrap-actions.js var r = (e, t) => (n) => { let { editorActions: r } = t; e(n), r.detectContentType(n, t); }, i = (e, r) => { let i = ({ getComponent: t, editorSelectors: i }) => { let a = t("EditorPreviewAsyncAPI", !0), o = t("EditorPreviewAPIDesignSystems", !0); return i.selectIsContentTypeDetectionInProgress() ? /* @__PURE__ */ n("div", { className: "swagger-ui swagger-container", children: /* @__PURE__ */ n("div", { className: "swagger-ui", children: /* @__PURE__ */ n("div", { className: "info", children: /* @__PURE__ */ n("div", { className: "loading-container", children: /* @__PURE__ */ n("div", { className: "loading" }) }) }) }) }) : i.selectIsContentTypeAsyncAPI() && a ? /* @__PURE__ */ n(a, {}) : i.selectIsContentTypeAPIDesignSystems() && o ? /* @__PURE__ */ n(o, {}) : /* @__PURE__ */ n(e, { ...r }); }; return i.propTypes = { getComponent: t.func.isRequired, editorSelectors: t.shape({ selectIsContentTypeDetectionInProgress: t.func.isRequired, selectIsContentTypeAsyncAPI: t.func.isRequired, selectIsContentTypeAPIDesignSystems: t.func.isRequired }).isRequired }, i; }, a = (e) => { let r = (t) => { let { editorSelectors: r } = t; return r.selectIsContentTypeOpenAPI() ? /* @__PURE__ */ n(e, { ...t }) : null; }; return r.propTypes = { editorSelectors: t.shape({ selectIsContentTypeOpenAPI: t.func.isRequired }).isRequired }, r; }, o = () => [{ wrapComponents: { BaseLayout: i, onlineValidatorBadge: a }, statePlugins: { spec: { wrapActions: { updateSpec: r } } } }, e]; //#endregion export { o as default }; //# sourceMappingURL=index.js.map