swagger-editor 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/plugins/splash-screen/index.js +1 -1
- package/dist/esm/plugins/splash-screen/index.js.map +1 -1
- package/dist/esm/swagger-editor.js +0 -1
- package/dist/esm/swagger-editor.js.map +1 -1
- package/dist/umd/apidom.worker.js +1 -1
- package/dist/umd/swagger-editor.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger-editor.js","names":[],"sources":["../../src/App.tsx"],"sourcesContent":["// @ts-strict-ignore\nimport React, { useMemo } from 'react';\nimport isPlainObject from 'lodash/isPlainObject.js';\nimport SwaggerUI, { SwaggerUIProps } from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n/**\n * Plugins\n */\nimport LayoutPlugin from 'plugins/layout/index.js';\nimport SplashScreenPlugin from 'plugins/splash-screen/index.js';\nimport TopBarPlugin from 'plugins/top-bar/index.js';\nimport ModalsPlugin from 'plugins/modals/index.js';\nimport DialogsPlugin from 'plugins/dialogs/index.js';\nimport DropdownMenuPlugin from 'plugins/dropdown-menu/index.js';\nimport DropzonePlugin from 'plugins/dropzone/index.js';\nimport VersionsPlugin from 'plugins/versions/index.js';\nimport EditorTextareaPlugin from 'plugins/editor-textarea/index.js';\nimport EditorMonacoPlugin from 'plugins/editor-monaco/index.js';\nimport EditorMonacoLanguageApiDOMPlugin from 'plugins/editor-monaco-language-apidom/index.js';\nimport EditorMonacoYamlPastePlugin from 'plugins/editor-monaco-yaml-paste/index.js';\nimport EditorPreviewPlugin from 'plugins/editor-preview/index.js';\nimport EditorPreviewSwaggerUIPlugin from 'plugins/editor-preview-swagger-ui/index.js';\nimport EditorPreviewAsyncAPIPlugin from 'plugins/editor-preview-asyncapi/index.js';\nimport EditorPreviewApiDesignSystemsPlugin from 'plugins/editor-preview-api-design-systems/index.js';\nimport EditorContentReadOnlyPlugin from 'plugins/editor-content-read-only/index.js';\nimport EditorContentOriginPlugin from 'plugins/editor-content-origin/index.js';\nimport EditorContentTypePlugin from 'plugins/editor-content-type/index.js';\nimport EditorContentPersistencePlugin from 'plugins/editor-content-persistence/index.js';\nimport EditorContentFixturesPlugin from 'plugins/editor-content-fixtures/index.js';\nimport EditorContentFromFilePlugin from 'plugins/editor-content-from-file/index.js';\nimport EditorSafeRenderPlugin from 'plugins/editor-safe-render/index.js';\nimport SwaggerUIAdapterPlugin from 'plugins/swagger-ui-adapter/index.js';\nimport PropsChangeWatcherPlugin from 'plugins/props-change-watcher/index';\nimport UtilPlugin from 'plugins/util/index.js';\n/**\n * Presets\n */\nimport TextareaPreset from 'presets/textarea/index.js';\nimport MonacoPreset from 'presets/monaco/index.js';\n/**\n * Types\n */\nimport { SwaggerEditorType } from 'types/swagger-editor';\n\nimport './styles/main.scss';\n\nconst SwaggerEditor: SwaggerEditorType = React.memo(\n ({\n spec = SwaggerUI.config.defaults.spec,\n url = SwaggerUI.config.defaults.url,\n layout = 'SwaggerEditorLayout',\n requestInterceptor = SwaggerUI.config.defaults.requestInterceptor,\n responseInterceptor = SwaggerUI.config.defaults.responseInterceptor,\n supportedSubmitMethods = SwaggerUI.config.defaults.supportedSubmitMethods,\n queryConfigEnabled = SwaggerUI.config.defaults.queryConfigEnabled,\n plugins = [...SwaggerUI.config.defaults.plugins],\n displayOperationId = SwaggerUI.config.defaults.displayOperationId,\n showMutatedRequest = SwaggerUI.config.defaults.showMutatedRequest,\n docExpansion = SwaggerUI.config.defaults.docExpansion,\n defaultModelExpandDepth = SwaggerUI.config.defaults.defaultModelExpandDepth,\n defaultModelsExpandDepth = SwaggerUI.config.defaults.defaultModelsExpandDepth,\n defaultModelRendering = SwaggerUI.config.defaults.defaultModelRendering,\n presets = SwaggerEditor.presets?.default ? [SwaggerEditor.presets.default] : [],\n deepLinking = SwaggerUI.config.defaults.deepLinking,\n showExtensions = true,\n showCommonExtensions = SwaggerUI.config.defaults.showCommonExtensions,\n filter = SwaggerUI.config.defaults.filter,\n requestSnippetsEnabled = SwaggerUI.config.defaults.requestSnippetsEnabled,\n requestSnippets = SwaggerUI.config.defaults.requestSnippets,\n tryItOutEnabled = SwaggerUI.config.defaults.tryItOutEnabled,\n displayRequestDuration = SwaggerUI.config.defaults.displayRequestDuration,\n withCredentials = SwaggerUI.config.defaults.withCredentials,\n persistAuthorization = SwaggerUI.config.defaults.persistAuthorization,\n oauth2RedirectUrl = SwaggerUI.config.defaults.oauth2RedirectUrl,\n initialState = SwaggerUI.config.defaults.initialState,\n onComplete = null,\n }: SwaggerUIProps) => {\n const { plugin: propsChangeWatcherPlugin, getSystem } =\n PropsChangeWatcherPlugin.useMountPlugin();\n const specStr = useMemo(() => {\n if (spec !== SwaggerUI.config.defaults.spec && isPlainObject(spec)) {\n return JSON.stringify(spec, null, 2);\n }\n return spec;\n }, [spec]);\n\n PropsChangeWatcherPlugin.usePropChange(spec, (newValue, oldValue) => {\n getSystem()?.editorActions?.propChanged('spec', newValue, oldValue);\n });\n PropsChangeWatcherPlugin.usePropChange(url, (newValue, oldValue) => {\n getSystem()?.editorActions?.propChanged('url', newValue, oldValue);\n });\n\n return (\n <div className=\"swagger-editor\">\n <SwaggerUI\n spec={specStr}\n url={url}\n layout={layout}\n requestInterceptor={requestInterceptor}\n responseInterceptor={responseInterceptor}\n supportedSubmitMethods={supportedSubmitMethods}\n queryConfigEnabled={queryConfigEnabled}\n plugins={[propsChangeWatcherPlugin, ...plugins]}\n displayOperationId={displayOperationId}\n showMutatedRequest={showMutatedRequest}\n docExpansion={docExpansion}\n defaultModelExpandDepth={defaultModelExpandDepth}\n defaultModelsExpandDepth={defaultModelsExpandDepth}\n defaultModelRendering={defaultModelRendering}\n presets={presets}\n deepLinking={deepLinking}\n showExtensions={showExtensions}\n showCommonExtensions={showCommonExtensions}\n filter={filter}\n requestSnippetsEnabled={requestSnippetsEnabled}\n requestSnippets={requestSnippets}\n tryItOutEnabled={tryItOutEnabled}\n displayRequestDuration={displayRequestDuration}\n withCredentials={withCredentials}\n persistAuthorization={persistAuthorization}\n oauth2RedirectUrl={oauth2RedirectUrl}\n initialState={initialState}\n onComplete={onComplete}\n />\n </div>\n );\n }\n);\n\nSwaggerEditor.plugins = {\n Util: UtilPlugin,\n Modals: ModalsPlugin,\n Dialogs: DialogsPlugin,\n DropdownMenu: DropdownMenuPlugin,\n Dropzone: DropzonePlugin,\n Versions: VersionsPlugin,\n EditorTextarea: EditorTextareaPlugin,\n EditorMonaco: EditorMonacoPlugin,\n EditorMonacoLanguageApiDOM: EditorMonacoLanguageApiDOMPlugin,\n EditorMonacoYamlPaste: EditorMonacoYamlPastePlugin,\n EditorContentReadOnly: EditorContentReadOnlyPlugin,\n EditorContentOrigin: EditorContentOriginPlugin,\n EditorContentType: EditorContentTypePlugin,\n EditorContentPersistence: EditorContentPersistencePlugin,\n EditorContentFixtures: EditorContentFixturesPlugin,\n EditorContentFromFile: EditorContentFromFilePlugin,\n EditorPreview: EditorPreviewPlugin,\n EditorPreviewSwaggerUI: EditorPreviewSwaggerUIPlugin,\n EditorPreviewAsyncAPI: EditorPreviewAsyncAPIPlugin,\n EditorPreviewApiDesignSystems: EditorPreviewApiDesignSystemsPlugin,\n EditorSafeRender: EditorSafeRenderPlugin,\n TopBar: TopBarPlugin,\n SplashScreenPlugin,\n Layout: LayoutPlugin,\n SwaggerUIAdapter: SwaggerUIAdapterPlugin,\n};\n\nSwaggerEditor.presets = {\n textarea: TextareaPreset,\n monaco: MonacoPreset,\n default: MonacoPreset,\n};\n\nexport default SwaggerEditor;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"swagger-editor.js","names":[],"sources":["../../src/App.tsx"],"sourcesContent":["// @ts-strict-ignore\nimport React, { useMemo } from 'react';\nimport isPlainObject from 'lodash/isPlainObject.js';\nimport SwaggerUI, { SwaggerUIProps } from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n/**\n * Plugins\n */\nimport LayoutPlugin from 'plugins/layout/index.js';\nimport SplashScreenPlugin from 'plugins/splash-screen/index.js';\nimport TopBarPlugin from 'plugins/top-bar/index.js';\nimport ModalsPlugin from 'plugins/modals/index.js';\nimport DialogsPlugin from 'plugins/dialogs/index.js';\nimport DropdownMenuPlugin from 'plugins/dropdown-menu/index.js';\nimport DropzonePlugin from 'plugins/dropzone/index.js';\nimport VersionsPlugin from 'plugins/versions/index.js';\nimport EditorTextareaPlugin from 'plugins/editor-textarea/index.js';\nimport EditorMonacoPlugin from 'plugins/editor-monaco/index.js';\nimport EditorMonacoLanguageApiDOMPlugin from 'plugins/editor-monaco-language-apidom/index.js';\nimport EditorMonacoYamlPastePlugin from 'plugins/editor-monaco-yaml-paste/index.js';\nimport EditorPreviewPlugin from 'plugins/editor-preview/index.js';\nimport EditorPreviewSwaggerUIPlugin from 'plugins/editor-preview-swagger-ui/index.js';\nimport EditorPreviewAsyncAPIPlugin from 'plugins/editor-preview-asyncapi/index.js';\nimport EditorPreviewApiDesignSystemsPlugin from 'plugins/editor-preview-api-design-systems/index.js';\nimport EditorContentReadOnlyPlugin from 'plugins/editor-content-read-only/index.js';\nimport EditorContentOriginPlugin from 'plugins/editor-content-origin/index.js';\nimport EditorContentTypePlugin from 'plugins/editor-content-type/index.js';\nimport EditorContentPersistencePlugin from 'plugins/editor-content-persistence/index.js';\nimport EditorContentFixturesPlugin from 'plugins/editor-content-fixtures/index.js';\nimport EditorContentFromFilePlugin from 'plugins/editor-content-from-file/index.js';\nimport EditorSafeRenderPlugin from 'plugins/editor-safe-render/index.js';\nimport SwaggerUIAdapterPlugin from 'plugins/swagger-ui-adapter/index.js';\nimport PropsChangeWatcherPlugin from 'plugins/props-change-watcher/index';\nimport UtilPlugin from 'plugins/util/index.js';\n/**\n * Presets\n */\nimport TextareaPreset from 'presets/textarea/index.js';\nimport MonacoPreset from 'presets/monaco/index.js';\n/**\n * Types\n */\nimport { SwaggerEditorType } from 'types/swagger-editor';\n\nimport './styles/main.scss';\n\nconst SwaggerEditor: SwaggerEditorType = React.memo(\n ({\n spec = SwaggerUI.config.defaults.spec,\n url = SwaggerUI.config.defaults.url,\n layout = 'SwaggerEditorLayout',\n requestInterceptor = SwaggerUI.config.defaults.requestInterceptor,\n responseInterceptor = SwaggerUI.config.defaults.responseInterceptor,\n supportedSubmitMethods = SwaggerUI.config.defaults.supportedSubmitMethods,\n queryConfigEnabled = SwaggerUI.config.defaults.queryConfigEnabled,\n plugins = [...SwaggerUI.config.defaults.plugins],\n displayOperationId = SwaggerUI.config.defaults.displayOperationId,\n showMutatedRequest = SwaggerUI.config.defaults.showMutatedRequest,\n docExpansion = SwaggerUI.config.defaults.docExpansion,\n defaultModelExpandDepth = SwaggerUI.config.defaults.defaultModelExpandDepth,\n defaultModelsExpandDepth = SwaggerUI.config.defaults.defaultModelsExpandDepth,\n defaultModelRendering = SwaggerUI.config.defaults.defaultModelRendering,\n presets = SwaggerEditor.presets?.default ? [SwaggerEditor.presets.default] : [],\n deepLinking = SwaggerUI.config.defaults.deepLinking,\n showExtensions = true,\n showCommonExtensions = SwaggerUI.config.defaults.showCommonExtensions,\n filter = SwaggerUI.config.defaults.filter,\n requestSnippetsEnabled = SwaggerUI.config.defaults.requestSnippetsEnabled,\n requestSnippets = SwaggerUI.config.defaults.requestSnippets,\n tryItOutEnabled = SwaggerUI.config.defaults.tryItOutEnabled,\n displayRequestDuration = SwaggerUI.config.defaults.displayRequestDuration,\n withCredentials = SwaggerUI.config.defaults.withCredentials,\n persistAuthorization = SwaggerUI.config.defaults.persistAuthorization,\n oauth2RedirectUrl = SwaggerUI.config.defaults.oauth2RedirectUrl,\n initialState = SwaggerUI.config.defaults.initialState,\n onComplete = null,\n }: SwaggerUIProps) => {\n const { plugin: propsChangeWatcherPlugin, getSystem } =\n PropsChangeWatcherPlugin.useMountPlugin();\n const specStr = useMemo(() => {\n if (spec !== SwaggerUI.config.defaults.spec && isPlainObject(spec)) {\n return JSON.stringify(spec, null, 2);\n }\n return spec;\n }, [spec]);\n\n PropsChangeWatcherPlugin.usePropChange(spec, (newValue, oldValue) => {\n getSystem()?.editorActions?.propChanged('spec', newValue, oldValue);\n });\n PropsChangeWatcherPlugin.usePropChange(url, (newValue, oldValue) => {\n getSystem()?.editorActions?.propChanged('url', newValue, oldValue);\n });\n\n return (\n <div className=\"swagger-editor\">\n <SwaggerUI\n spec={specStr}\n url={url}\n layout={layout}\n requestInterceptor={requestInterceptor}\n responseInterceptor={responseInterceptor}\n supportedSubmitMethods={supportedSubmitMethods}\n queryConfigEnabled={queryConfigEnabled}\n plugins={[propsChangeWatcherPlugin, ...plugins]}\n displayOperationId={displayOperationId}\n showMutatedRequest={showMutatedRequest}\n docExpansion={docExpansion}\n defaultModelExpandDepth={defaultModelExpandDepth}\n defaultModelsExpandDepth={defaultModelsExpandDepth}\n defaultModelRendering={defaultModelRendering}\n presets={presets}\n deepLinking={deepLinking}\n showExtensions={showExtensions}\n showCommonExtensions={showCommonExtensions}\n filter={filter}\n requestSnippetsEnabled={requestSnippetsEnabled}\n requestSnippets={requestSnippets}\n tryItOutEnabled={tryItOutEnabled}\n displayRequestDuration={displayRequestDuration}\n withCredentials={withCredentials}\n persistAuthorization={persistAuthorization}\n oauth2RedirectUrl={oauth2RedirectUrl}\n initialState={initialState}\n onComplete={onComplete}\n />\n </div>\n );\n }\n);\n\nSwaggerEditor.plugins = {\n Util: UtilPlugin,\n Modals: ModalsPlugin,\n Dialogs: DialogsPlugin,\n DropdownMenu: DropdownMenuPlugin,\n Dropzone: DropzonePlugin,\n Versions: VersionsPlugin,\n EditorTextarea: EditorTextareaPlugin,\n EditorMonaco: EditorMonacoPlugin,\n EditorMonacoLanguageApiDOM: EditorMonacoLanguageApiDOMPlugin,\n EditorMonacoYamlPaste: EditorMonacoYamlPastePlugin,\n EditorContentReadOnly: EditorContentReadOnlyPlugin,\n EditorContentOrigin: EditorContentOriginPlugin,\n EditorContentType: EditorContentTypePlugin,\n EditorContentPersistence: EditorContentPersistencePlugin,\n EditorContentFixtures: EditorContentFixturesPlugin,\n EditorContentFromFile: EditorContentFromFilePlugin,\n EditorPreview: EditorPreviewPlugin,\n EditorPreviewSwaggerUI: EditorPreviewSwaggerUIPlugin,\n EditorPreviewAsyncAPI: EditorPreviewAsyncAPIPlugin,\n EditorPreviewApiDesignSystems: EditorPreviewApiDesignSystemsPlugin,\n EditorSafeRender: EditorSafeRenderPlugin,\n TopBar: TopBarPlugin,\n SplashScreenPlugin,\n Layout: LayoutPlugin,\n SwaggerUIAdapter: SwaggerUIAdapterPlugin,\n};\n\nSwaggerEditor.presets = {\n textarea: TextareaPreset,\n monaco: MonacoPreset,\n default: MonacoPreset,\n};\n\nexport default SwaggerEditor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAM,IAAmC,EAAM,MAC5C,EACC,UAAO,EAAU,OAAO,SAAS,MACjC,SAAM,EAAU,OAAO,SAAS,KAChC,YAAS,uBACT,wBAAqB,EAAU,OAAO,SAAS,oBAC/C,yBAAsB,EAAU,OAAO,SAAS,qBAChD,4BAAyB,EAAU,OAAO,SAAS,wBACnD,wBAAqB,EAAU,OAAO,SAAS,oBAC/C,aAAU,CAAC,GAAG,EAAU,OAAO,SAAS,OAAO,GAC/C,wBAAqB,EAAU,OAAO,SAAS,oBAC/C,wBAAqB,EAAU,OAAO,SAAS,oBAC/C,kBAAe,EAAU,OAAO,SAAS,cACzC,6BAA0B,EAAU,OAAO,SAAS,yBACpD,8BAA2B,EAAU,OAAO,SAAS,0BACrD,2BAAwB,EAAU,OAAO,SAAS,uBAClD,aAAU,EAAc,SAAS,UAAU,CAAC,EAAc,QAAQ,OAAO,IAAI,CAAC,GAC9E,iBAAc,EAAU,OAAO,SAAS,aACxC,oBAAiB,IACjB,0BAAuB,EAAU,OAAO,SAAS,sBACjD,YAAS,EAAU,OAAO,SAAS,QACnC,4BAAyB,EAAU,OAAO,SAAS,wBACnD,qBAAkB,EAAU,OAAO,SAAS,iBAC5C,qBAAkB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