@api-client/ui 0.0.4 → 0.0.7
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/demo/elements/http/http-assertions.html +3 -0
- package/demo/elements/http/http-assertions.ts +1 -1
- package/demo/elements/http/http-flows.html +23 -0
- package/demo/elements/http/http-flows.ts +92 -0
- package/demo/elements/http/index.html +3 -0
- package/demo/pages/http-project/main.ts +5 -6
- package/dist/amf/lib/AmfParameters.js +0 -4
- package/dist/amf/lib/AmfParameters.js.map +1 -1
- package/dist/amf/lib/navigation-layout/EndpointsTree.js +0 -2
- package/dist/amf/lib/navigation-layout/EndpointsTree.js.map +1 -1
- package/dist/amf/lib/navigation-layout/NaturalTree.js +0 -2
- package/dist/amf/lib/navigation-layout/NaturalTree.js.map +1 -1
- package/dist/amf/store/AmfGraphStore.js +0 -2
- package/dist/amf/store/AmfGraphStore.js.map +1 -1
- package/dist/amf/store/AmfStore.js +0 -7
- package/dist/amf/store/AmfStore.js.map +1 -1
- package/dist/bindings/base/HttpClientStoreBindings.js +4 -1
- package/dist/bindings/base/HttpClientStoreBindings.js.map +1 -1
- package/dist/bindings/base/PlatformBindings.js +6 -10
- package/dist/bindings/base/PlatformBindings.js.map +1 -1
- package/dist/bindings/base/ProxyBindings.js +9 -6
- package/dist/bindings/base/ProxyBindings.js.map +1 -1
- package/dist/bindings/base/SharedWorkerThread.js +4 -1
- package/dist/bindings/base/SharedWorkerThread.js.map +1 -1
- package/dist/bindings/base/StoreBindings.js +162 -170
- package/dist/bindings/base/StoreBindings.js.map +1 -1
- package/dist/bindings/web/WebConfigurationBindings.js +22 -24
- package/dist/bindings/web/WebConfigurationBindings.js.map +1 -1
- package/dist/bindings/web/WebFileBindings.js +7 -4
- package/dist/bindings/web/WebFileBindings.js.map +1 -1
- package/dist/bindings/web/WebHttpClientStoreBindings.js +19 -21
- package/dist/bindings/web/WebHttpClientStoreBindings.js.map +1 -1
- package/dist/bindings/web/WebNavigationBindings.js +4 -1
- package/dist/bindings/web/WebNavigationBindings.js.map +1 -1
- package/dist/bindings/web/WebProxyBindings.js +5 -6
- package/dist/bindings/web/WebProxyBindings.js.map +1 -1
- package/dist/bindings/web/WebStoreBindings.js +39 -44
- package/dist/bindings/web/WebStoreBindings.js.map +1 -1
- package/dist/contextual-menu/ContextualMenu.js +10 -19
- package/dist/contextual-menu/ContextualMenu.js.map +1 -1
- package/dist/contextual-menu/ContextualMenuElement.js +4 -32
- package/dist/contextual-menu/ContextualMenuElement.js.map +1 -1
- package/dist/contextual-menu/MenuItem.js +0 -12
- package/dist/contextual-menu/MenuItem.js.map +1 -1
- package/dist/define/amf/api-annotation-document.js +1 -1
- package/dist/define/amf/api-annotation-document.js.map +1 -1
- package/dist/define/amf/api-authorization-editor.js +1 -1
- package/dist/define/amf/api-authorization-editor.js.map +1 -1
- package/dist/define/amf/api-channel-document.js +1 -1
- package/dist/define/amf/api-channel-document.js.map +1 -1
- package/dist/define/amf/api-documentation-document.js +1 -1
- package/dist/define/amf/api-documentation-document.js.map +1 -1
- package/dist/define/amf/api-documentation.js +1 -1
- package/dist/define/amf/api-documentation.js.map +1 -1
- package/dist/define/amf/api-navigation.js +1 -1
- package/dist/define/amf/api-navigation.js.map +1 -1
- package/dist/define/amf/api-operation-document.js +1 -1
- package/dist/define/amf/api-operation-document.js.map +1 -1
- package/dist/define/amf/api-parameter-document.js +1 -1
- package/dist/define/amf/api-parameter-document.js.map +1 -1
- package/dist/define/amf/api-parametrized-security-scheme.js +1 -1
- package/dist/define/amf/api-parametrized-security-scheme.js.map +1 -1
- package/dist/define/amf/api-payload-document.js +1 -1
- package/dist/define/amf/api-payload-document.js.map +1 -1
- package/dist/define/amf/api-request-document.js +1 -1
- package/dist/define/amf/api-request-document.js.map +1 -1
- package/dist/define/amf/api-request-editor.js +1 -1
- package/dist/define/amf/api-request-editor.js.map +1 -1
- package/dist/define/amf/api-request.js +1 -1
- package/dist/define/amf/api-request.js.map +1 -1
- package/dist/define/amf/api-resource-document.js +1 -1
- package/dist/define/amf/api-resource-document.js.map +1 -1
- package/dist/define/amf/api-response-document.js +1 -1
- package/dist/define/amf/api-response-document.js.map +1 -1
- package/dist/define/amf/api-schema-document.js +1 -1
- package/dist/define/amf/api-schema-document.js.map +1 -1
- package/dist/define/amf/api-security-document.js +1 -1
- package/dist/define/amf/api-security-document.js.map +1 -1
- package/dist/define/amf/api-security-requirement-document.js +1 -1
- package/dist/define/amf/api-security-requirement-document.js.map +1 -1
- package/dist/define/amf/api-server-picker.js +1 -1
- package/dist/define/amf/api-server-picker.js.map +1 -1
- package/dist/define/amf/api-summary.js +1 -1
- package/dist/define/amf/api-summary.js.map +1 -1
- package/dist/define/amf/authorization/amf-apikey-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-apikey-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-basic-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-basic-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-bearer-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-bearer-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-oauth2-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-oauth2-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-oidc-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-oidc-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-passthrough-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-passthrough-authorization.js.map +1 -1
- package/dist/define/amf/authorization/amf-ramlcustom-authorization.js +1 -1
- package/dist/define/amf/authorization/amf-ramlcustom-authorization.js.map +1 -1
- package/dist/define/authorization/apikey-authorization.js +1 -1
- package/dist/define/authorization/apikey-authorization.js.map +1 -1
- package/dist/define/authorization/basic-authorization.js +1 -1
- package/dist/define/authorization/basic-authorization.js.map +1 -1
- package/dist/define/authorization/bearer-authorization.js +1 -1
- package/dist/define/authorization/bearer-authorization.js.map +1 -1
- package/dist/define/authorization/cc-authorization.js +1 -1
- package/dist/define/authorization/cc-authorization.js.map +1 -1
- package/dist/define/authorization/ntlm-authorization.js +1 -1
- package/dist/define/authorization/ntlm-authorization.js.map +1 -1
- package/dist/define/authorization/oauth2-authorization.js +1 -1
- package/dist/define/authorization/oauth2-authorization.js.map +1 -1
- package/dist/define/authorization/oidc-authorization.js +1 -1
- package/dist/define/authorization/oidc-authorization.js.map +1 -1
- package/dist/define/contextual-menu/contextual-menu.js +1 -1
- package/dist/define/contextual-menu/contextual-menu.js.map +1 -1
- package/dist/define/dialog/confirm-delete-dialog.js +1 -1
- package/dist/define/dialog/confirm-delete-dialog.js.map +1 -1
- package/dist/define/dialog/delete-cookie-action-dialog.d.ts +10 -0
- package/dist/define/dialog/delete-cookie-action-dialog.d.ts.map +1 -0
- package/dist/define/dialog/delete-cookie-action-dialog.js +14 -0
- package/dist/define/dialog/delete-cookie-action-dialog.js.map +1 -0
- package/dist/define/dialog/rename-dialog.js +1 -1
- package/dist/define/dialog/rename-dialog.js.map +1 -1
- package/dist/define/dialog/set-cookie-action-dialog.d.ts +10 -0
- package/dist/define/dialog/set-cookie-action-dialog.d.ts.map +1 -0
- package/dist/define/dialog/set-cookie-action-dialog.js +14 -0
- package/dist/define/dialog/set-cookie-action-dialog.js.map +1 -0
- package/dist/define/files/share-file.js +1 -1
- package/dist/define/files/share-file.js.map +1 -1
- package/dist/define/har/har-viewer.js +1 -1
- package/dist/define/har/har-viewer.js.map +1 -1
- package/dist/define/highlight/marked-highlight.js +1 -1
- package/dist/define/highlight/marked-highlight.js.map +1 -1
- package/dist/define/highlight/prism-highlight.js +1 -1
- package/dist/define/highlight/prism-highlight.js.map +1 -1
- package/dist/define/http/http-assertions.d.ts +1 -1
- package/dist/define/http/http-assertions.d.ts.map +1 -1
- package/dist/define/http/http-assertions.js +3 -3
- package/dist/define/http/http-assertions.js.map +1 -1
- package/dist/define/http/http-body-editor.js +1 -1
- package/dist/define/http/http-body-editor.js.map +1 -1
- package/dist/define/http/http-body-multipart-editor.js +1 -1
- package/dist/define/http/http-body-multipart-editor.js.map +1 -1
- package/dist/define/http/http-body-text-editor.js +1 -1
- package/dist/define/http/http-body-text-editor.js.map +1 -1
- package/dist/define/http/http-body-urlencoded-editor.js +1 -1
- package/dist/define/http/http-body-urlencoded-editor.js.map +1 -1
- package/dist/define/http/http-flows.d.ts +10 -0
- package/dist/define/http/http-flows.d.ts.map +1 -0
- package/dist/define/http/http-flows.js +13 -0
- package/dist/define/http/http-flows.js.map +1 -0
- package/dist/define/http/http-headers-form.js +1 -1
- package/dist/define/http/http-headers-form.js.map +1 -1
- package/dist/define/http/http-log-body.js +1 -1
- package/dist/define/http/http-log-body.js.map +1 -1
- package/dist/define/http/http-log-headers.js +1 -1
- package/dist/define/http/http-log-headers.js.map +1 -1
- package/dist/define/http/http-log-timings.js +1 -1
- package/dist/define/http/http-log-timings.js.map +1 -1
- package/dist/define/http/http-request-config.js +1 -1
- package/dist/define/http/http-request-config.js.map +1 -1
- package/dist/define/http/http-request-editor.js +1 -1
- package/dist/define/http/http-request-editor.js.map +1 -1
- package/dist/define/http/http-request-log.js +1 -1
- package/dist/define/http/http-request-log.js.map +1 -1
- package/dist/define/http/http-snippets.js +1 -1
- package/dist/define/http/http-snippets.js.map +1 -1
- package/dist/define/http/http-url-input.js +1 -1
- package/dist/define/http/http-url-input.js.map +1 -1
- package/dist/define/http/http-url-params-form.js +1 -1
- package/dist/define/http/http-url-params-form.js.map +1 -1
- package/dist/define/http-project/http-project-request-history.js +1 -1
- package/dist/define/http-project/http-project-request-history.js.map +1 -1
- package/dist/define/http-project/http-project-request.js +2 -2
- package/dist/define/http-project/http-project-request.js.map +1 -1
- package/dist/define/http-project/project-navigation.js +1 -1
- package/dist/define/http-project/project-navigation.js.map +1 -1
- package/dist/define/http-project/project-run-report.js +1 -1
- package/dist/define/http-project/project-run-report.js.map +1 -1
- package/dist/define/http-project/project-runner.js +2 -2
- package/dist/define/http-project/project-runner.js.map +1 -1
- package/dist/define/layout/split-view.js +1 -1
- package/dist/define/layout/split-view.js.map +1 -1
- package/dist/define/schema-design/schema-design-navigation.js +1 -1
- package/dist/define/schema-design/schema-design-navigation.js.map +1 -1
- package/dist/define/schema-design/schema-namespace-selector.js +1 -1
- package/dist/define/schema-design/schema-namespace-selector.js.map +1 -1
- package/dist/define/ui/ui-button.js +1 -1
- package/dist/define/ui/ui-button.js.map +1 -1
- package/dist/define/ui/ui-chip.js +1 -1
- package/dist/define/ui/ui-chip.js.map +1 -1
- package/dist/define/ui/ui-collapse.js +1 -1
- package/dist/define/ui/ui-collapse.js.map +1 -1
- package/dist/define/ui/ui-dialog.js +1 -1
- package/dist/define/ui/ui-dialog.js.map +1 -1
- package/dist/define/ui/ui-divider.d.ts +4 -1
- package/dist/define/ui/ui-divider.d.ts.map +1 -1
- package/dist/define/ui/ui-divider.js +11 -2
- package/dist/define/ui/ui-divider.js.map +1 -1
- package/dist/define/ui/ui-dropdown-list.js +1 -1
- package/dist/define/ui/ui-dropdown-list.js.map +1 -1
- package/dist/define/ui/ui-icon-button.js +1 -1
- package/dist/define/ui/ui-icon-button.js.map +1 -1
- package/dist/define/ui/ui-icon.js +1 -1
- package/dist/define/ui/ui-icon.js.map +1 -1
- package/dist/define/ui/ui-list-item.js +1 -1
- package/dist/define/ui/ui-list-item.js.map +1 -1
- package/dist/define/ui/ui-list.js +1 -1
- package/dist/define/ui/ui-list.js.map +1 -1
- package/dist/define/ui/ui-listbox.js +1 -1
- package/dist/define/ui/ui-listbox.js.map +1 -1
- package/dist/define/ui/ui-progress.js +1 -1
- package/dist/define/ui/ui-progress.js.map +1 -1
- package/dist/define/ui/ui-segmented-button-set.js +1 -1
- package/dist/define/ui/ui-segmented-button-set.js.map +1 -1
- package/dist/define/ui/ui-segmented-button.js +1 -1
- package/dist/define/ui/ui-segmented-button.js.map +1 -1
- package/dist/define/ui/ui-snackbar.js +1 -1
- package/dist/define/ui/ui-snackbar.js.map +1 -1
- package/dist/define/ui/ui-tab.js +1 -1
- package/dist/define/ui/ui-tab.js.map +1 -1
- package/dist/define/ui/ui-tabs.js +1 -1
- package/dist/define/ui/ui-tabs.js.map +1 -1
- package/dist/directives/data-attr.js +0 -1
- package/dist/directives/data-attr.js.map +1 -1
- package/dist/elements/ApiElement.d.ts +4 -0
- package/dist/elements/ApiElement.d.ts.map +1 -1
- package/dist/elements/ApiElement.js +6 -7
- package/dist/elements/ApiElement.js.map +1 -1
- package/dist/elements/amf/ApiAnnotationDocument.element.js +0 -2
- package/dist/elements/amf/ApiAnnotationDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiAuthorizationEditor.element.js +1 -33
- package/dist/elements/amf/ApiAuthorizationEditor.element.js.map +1 -1
- package/dist/elements/amf/ApiDocumentation.element.js +0 -91
- package/dist/elements/amf/ApiDocumentation.element.js.map +1 -1
- package/dist/elements/amf/ApiDocumentationBase.js +0 -9
- package/dist/elements/amf/ApiDocumentationBase.js.map +1 -1
- package/dist/elements/amf/ApiDocumentationDocument.element.js +0 -1
- package/dist/elements/amf/ApiDocumentationDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiNavigation.element.js +0 -97
- package/dist/elements/amf/ApiNavigation.element.js.map +1 -1
- package/dist/elements/amf/ApiOperationDocument.element.d.ts.map +1 -1
- package/dist/elements/amf/ApiOperationDocument.element.js +2 -77
- package/dist/elements/amf/ApiOperationDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiParameterDocument.element.js +0 -3
- package/dist/elements/amf/ApiParameterDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiParametrizedSecurityScheme.element.js +0 -1
- package/dist/elements/amf/ApiParametrizedSecurityScheme.element.js.map +1 -1
- package/dist/elements/amf/ApiPayloadDocument.element.js +0 -1
- package/dist/elements/amf/ApiPayloadDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiRequest.element.js +1 -79
- package/dist/elements/amf/ApiRequest.element.js.map +1 -1
- package/dist/elements/amf/ApiRequestDocument.element.js +0 -38
- package/dist/elements/amf/ApiRequestDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiRequestEditor.element.d.ts +0 -1
- package/dist/elements/amf/ApiRequestEditor.element.d.ts.map +1 -1
- package/dist/elements/amf/ApiRequestEditor.element.js +0 -121
- package/dist/elements/amf/ApiRequestEditor.element.js.map +1 -1
- package/dist/elements/amf/ApiResourceDocument.element.js +0 -75
- package/dist/elements/amf/ApiResourceDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiResponseDocument.element.js +0 -17
- package/dist/elements/amf/ApiResponseDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiSchemaDocument.element.js +0 -28
- package/dist/elements/amf/ApiSchemaDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiSecurityDocument.element.js +0 -28
- package/dist/elements/amf/ApiSecurityDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiSecurityRequirementDocument.element.js +0 -1
- package/dist/elements/amf/ApiSecurityRequirementDocument.element.js.map +1 -1
- package/dist/elements/amf/ApiServerPicker.element.js +2 -65
- package/dist/elements/amf/ApiServerPicker.element.js.map +1 -1
- package/dist/elements/amf/ApiSummary.element.js +0 -26
- package/dist/elements/amf/ApiSummary.element.js.map +1 -1
- package/dist/elements/amf/authorization/AmfApiKey.js +0 -5
- package/dist/elements/amf/authorization/AmfApiKey.js.map +1 -1
- package/dist/elements/amf/authorization/AmfBasic.js +0 -4
- package/dist/elements/amf/authorization/AmfBasic.js.map +1 -1
- package/dist/elements/amf/authorization/AmfBearer.js +0 -4
- package/dist/elements/amf/authorization/AmfBearer.js.map +1 -1
- package/dist/elements/amf/authorization/AmfOauth2.js +0 -13
- package/dist/elements/amf/authorization/AmfOauth2.js.map +1 -1
- package/dist/elements/amf/authorization/AmfOidc.js +0 -4
- package/dist/elements/amf/authorization/AmfOidc.js.map +1 -1
- package/dist/elements/amf/authorization/AmfPassThrough.js +0 -6
- package/dist/elements/amf/authorization/AmfPassThrough.js.map +1 -1
- package/dist/elements/amf/authorization/AmfRamlCustom.js +0 -6
- package/dist/elements/amf/authorization/AmfRamlCustom.js.map +1 -1
- package/dist/elements/authorization/OAuth2Authorize.js +0 -14
- package/dist/elements/authorization/OAuth2Authorize.js.map +1 -1
- package/dist/elements/authorization/OidcAuthorize.js +0 -14
- package/dist/elements/authorization/OidcAuthorize.js.map +1 -1
- package/dist/elements/authorization/ui/ApiKeyAuthorization.js +0 -2
- package/dist/elements/authorization/ui/ApiKeyAuthorization.js.map +1 -1
- package/dist/elements/authorization/ui/Authorization.d.ts +2 -1
- package/dist/elements/authorization/ui/Authorization.d.ts.map +1 -1
- package/dist/elements/authorization/ui/Authorization.js +18 -35
- package/dist/elements/authorization/ui/Authorization.js.map +1 -1
- package/dist/elements/authorization/ui/CcAuthorization.js +1 -3
- package/dist/elements/authorization/ui/CcAuthorization.js.map +1 -1
- package/dist/elements/authorization/ui/OAuth2Authorization.js +21 -50
- package/dist/elements/authorization/ui/OAuth2Authorization.js.map +1 -1
- package/dist/elements/authorization/ui/OidcAuthorization.js +4 -6
- package/dist/elements/authorization/ui/OidcAuthorization.js.map +1 -1
- package/dist/elements/code/HttpSnippets.js +9 -8
- package/dist/elements/code/HttpSnippets.js.map +1 -1
- package/dist/elements/dialog/ConfirmDelete.js +0 -12
- package/dist/elements/dialog/ConfirmDelete.js.map +1 -1
- package/dist/elements/dialog/DeleteCookieAction.element.d.ts +20 -0
- package/dist/elements/dialog/DeleteCookieAction.element.d.ts.map +1 -0
- package/dist/elements/dialog/DeleteCookieAction.element.js +93 -0
- package/dist/elements/dialog/DeleteCookieAction.element.js.map +1 -0
- package/dist/elements/dialog/DeleteCookieAction.styles.d.ts +3 -0
- package/dist/elements/dialog/DeleteCookieAction.styles.d.ts.map +1 -0
- package/dist/elements/dialog/DeleteCookieAction.styles.js +13 -0
- package/dist/elements/dialog/DeleteCookieAction.styles.js.map +1 -0
- package/dist/elements/dialog/Rename.d.ts +7 -6
- package/dist/elements/dialog/Rename.d.ts.map +1 -1
- package/dist/elements/dialog/Rename.js +7 -12
- package/dist/elements/dialog/Rename.js.map +1 -1
- package/dist/elements/dialog/SetCookieAction.element.d.ts +22 -0
- package/dist/elements/dialog/SetCookieAction.element.d.ts.map +1 -0
- package/dist/elements/dialog/SetCookieAction.element.js +173 -0
- package/dist/elements/dialog/SetCookieAction.element.js.map +1 -0
- package/dist/elements/environment/EnvironmentEditor.d.ts +24 -3
- package/dist/elements/environment/EnvironmentEditor.d.ts.map +1 -1
- package/dist/elements/environment/EnvironmentEditor.js +73 -30
- package/dist/elements/environment/EnvironmentEditor.js.map +1 -1
- package/dist/elements/environment/EnvironmentEditor.styles.d.ts.map +1 -1
- package/dist/elements/environment/EnvironmentEditor.styles.js +5 -0
- package/dist/elements/environment/EnvironmentEditor.styles.js.map +1 -1
- package/dist/elements/environment/ServerEditor.d.ts +3 -3
- package/dist/elements/environment/ServerEditor.d.ts.map +1 -1
- package/dist/elements/environment/ServerEditor.js +10 -51
- package/dist/elements/environment/ServerEditor.js.map +1 -1
- package/dist/elements/environment/VariablesEditor.d.ts +0 -1
- package/dist/elements/environment/VariablesEditor.d.ts.map +1 -1
- package/dist/elements/environment/VariablesEditor.js +10 -18
- package/dist/elements/environment/VariablesEditor.js.map +1 -1
- package/dist/elements/files/ShareFile.js +19 -57
- package/dist/elements/files/ShareFile.js.map +1 -1
- package/dist/elements/har/HarViewer.js +6 -7
- package/dist/elements/har/HarViewer.js.map +1 -1
- package/dist/elements/highlight/MarkedHighlight.js +4 -56
- package/dist/elements/highlight/MarkedHighlight.js.map +1 -1
- package/dist/elements/highlight/Prism.styles.d.ts.map +1 -1
- package/dist/elements/highlight/Prism.styles.js +12 -5
- package/dist/elements/highlight/Prism.styles.js.map +1 -1
- package/dist/elements/highlight/PrismHighlight.js +9 -18
- package/dist/elements/highlight/PrismHighlight.js.map +1 -1
- package/dist/elements/highlight/PrismHighlighter.js +4 -6
- package/dist/elements/highlight/PrismHighlighter.js.map +1 -1
- package/dist/elements/http/BodyEditor.d.ts +0 -4
- package/dist/elements/http/BodyEditor.d.ts.map +1 -1
- package/dist/elements/http/BodyEditor.js +31 -49
- package/dist/elements/http/BodyEditor.js.map +1 -1
- package/dist/elements/http/BodyMultipartEditor.d.ts +3 -16
- package/dist/elements/http/BodyMultipartEditor.d.ts.map +1 -1
- package/dist/elements/http/BodyMultipartEditor.js +20 -37
- package/dist/elements/http/BodyMultipartEditor.js.map +1 -1
- package/dist/elements/http/BodyTextEditor.d.ts +0 -1
- package/dist/elements/http/BodyTextEditor.d.ts.map +1 -1
- package/dist/elements/http/BodyTextEditor.js +2 -18
- package/dist/elements/http/BodyTextEditor.js.map +1 -1
- package/dist/elements/http/BodyUrlEncodedEditor.d.ts +3 -3
- package/dist/elements/http/BodyUrlEncodedEditor.d.ts.map +1 -1
- package/dist/elements/http/BodyUrlEncodedEditor.js +23 -26
- package/dist/elements/http/BodyUrlEncodedEditor.js.map +1 -1
- package/dist/elements/http/HeadersForm.d.ts +0 -4
- package/dist/elements/http/HeadersForm.d.ts.map +1 -1
- package/dist/elements/http/HeadersForm.js +16 -23
- package/dist/elements/http/HeadersForm.js.map +1 -1
- package/dist/elements/http/HttpAssertions.element.d.ts +55 -0
- package/dist/elements/http/HttpAssertions.element.d.ts.map +1 -0
- package/dist/elements/http/HttpAssertions.element.js +264 -0
- package/dist/elements/http/HttpAssertions.element.js.map +1 -0
- package/dist/elements/http/HttpAssertions.styles.d.ts.map +1 -1
- package/dist/elements/http/HttpAssertions.styles.js +7 -156
- package/dist/elements/http/HttpAssertions.styles.js.map +1 -1
- package/dist/elements/http/HttpFlows.common.d.ts +3 -0
- package/dist/elements/http/HttpFlows.common.d.ts.map +1 -0
- package/dist/elements/http/HttpFlows.common.js +181 -0
- package/dist/elements/http/HttpFlows.common.js.map +1 -0
- package/dist/elements/http/HttpFlows.element.d.ts +97 -0
- package/dist/elements/http/HttpFlows.element.d.ts.map +1 -0
- package/dist/elements/http/HttpFlows.element.js +684 -0
- package/dist/elements/http/HttpFlows.element.js.map +1 -0
- package/dist/elements/http/HttpFlows.styles.d.ts +3 -0
- package/dist/elements/http/HttpFlows.styles.d.ts.map +1 -0
- package/dist/elements/http/HttpFlows.styles.js +28 -0
- package/dist/elements/http/HttpFlows.styles.js.map +1 -0
- package/dist/elements/http/HttpFlowsUi.d.ts +172 -0
- package/dist/elements/http/HttpFlowsUi.d.ts.map +1 -0
- package/dist/elements/http/HttpFlowsUi.js +1256 -0
- package/dist/elements/http/HttpFlowsUi.js.map +1 -0
- package/dist/elements/http/LogBody.js +10 -21
- package/dist/elements/http/LogBody.js.map +1 -1
- package/dist/elements/http/LogHeaders.js +4 -23
- package/dist/elements/http/LogHeaders.js.map +1 -1
- package/dist/elements/http/LogTimings.js +11 -13
- package/dist/elements/http/LogTimings.js.map +1 -1
- package/dist/elements/http/RequestConfigElement.d.ts +0 -1
- package/dist/elements/http/RequestConfigElement.d.ts.map +1 -1
- package/dist/elements/http/RequestConfigElement.js +15 -15
- package/dist/elements/http/RequestConfigElement.js.map +1 -1
- package/dist/elements/http/RequestEditor.d.ts +10 -10
- package/dist/elements/http/RequestEditor.d.ts.map +1 -1
- package/dist/elements/http/RequestEditor.js +116 -111
- package/dist/elements/http/RequestEditor.js.map +1 -1
- package/dist/elements/http/RequestLog.js +9 -14
- package/dist/elements/http/RequestLog.js.map +1 -1
- package/dist/elements/http/UrlInput.d.ts +3 -3
- package/dist/elements/http/UrlInput.d.ts.map +1 -1
- package/dist/elements/http/UrlInput.js +17 -27
- package/dist/elements/http/UrlInput.js.map +1 -1
- package/dist/elements/http/UrlParamsForm.d.ts +0 -1
- package/dist/elements/http/UrlParamsForm.d.ts.map +1 -1
- package/dist/elements/http/UrlParamsForm.js +16 -16
- package/dist/elements/http/UrlParamsForm.js.map +1 -1
- package/dist/elements/layout/LayoutManager.js +16 -24
- package/dist/elements/layout/LayoutManager.js.map +1 -1
- package/dist/elements/layout/LayoutPanelElement.js +17 -23
- package/dist/elements/layout/LayoutPanelElement.js.map +1 -1
- package/dist/elements/layout/SplitItem.js +4 -12
- package/dist/elements/layout/SplitItem.js.map +1 -1
- package/dist/elements/layout/SplitLayout.js +18 -24
- package/dist/elements/layout/SplitLayout.js.map +1 -1
- package/dist/elements/layout/SplitPanel.js +10 -16
- package/dist/elements/layout/SplitPanel.js.map +1 -1
- package/dist/elements/layout/SplitView.js +17 -26
- package/dist/elements/layout/SplitView.js.map +1 -1
- package/dist/elements/layout/SplitView.styles.d.ts.map +1 -1
- package/dist/elements/layout/SplitView.styles.js +1 -0
- package/dist/elements/layout/SplitView.styles.js.map +1 -1
- package/dist/elements/navigation/AppNavigationElement.js +8 -47
- package/dist/elements/navigation/AppNavigationElement.js.map +1 -1
- package/dist/elements/navigation/AppNavigationItem.styles.d.ts.map +1 -1
- package/dist/elements/navigation/AppNavigationItem.styles.js +2 -0
- package/dist/elements/navigation/AppNavigationItem.styles.js.map +1 -1
- package/dist/elements/navigation/AppNavigationItemElement.js +19 -24
- package/dist/elements/navigation/AppNavigationItemElement.js.map +1 -1
- package/dist/elements/project/HttpProjectRequest.d.ts +2 -1
- package/dist/elements/project/HttpProjectRequest.d.ts.map +1 -1
- package/dist/elements/project/HttpProjectRequest.js +14 -43
- package/dist/elements/project/HttpProjectRequest.js.map +1 -1
- package/dist/elements/project/HttpProjectRequestHistory.js +9 -35
- package/dist/elements/project/HttpProjectRequestHistory.js.map +1 -1
- package/dist/elements/project/ProjectNavigation.js +0 -4
- package/dist/elements/project/ProjectNavigation.js.map +1 -1
- package/dist/elements/project/ProjectRunReport.js +4 -15
- package/dist/elements/project/ProjectRunReport.js.map +1 -1
- package/dist/elements/project/ProjectRunner.d.ts +0 -1
- package/dist/elements/project/ProjectRunner.d.ts.map +1 -1
- package/dist/elements/project/ProjectRunner.js +3 -51
- package/dist/elements/project/ProjectRunner.js.map +1 -1
- package/dist/elements/schema-design/AssociationFormElement.d.ts +0 -1
- package/dist/elements/schema-design/AssociationFormElement.d.ts.map +1 -1
- package/dist/elements/schema-design/AssociationFormElement.js +2 -18
- package/dist/elements/schema-design/AssociationFormElement.js.map +1 -1
- package/dist/elements/schema-design/DataEntityEditorElement.d.ts +2 -2
- package/dist/elements/schema-design/DataEntityEditorElement.d.ts.map +1 -1
- package/dist/elements/schema-design/DataEntityEditorElement.js +5 -27
- package/dist/elements/schema-design/DataEntityEditorElement.js.map +1 -1
- package/dist/elements/schema-design/DataModelVisualizationElement.js +0 -16
- package/dist/elements/schema-design/DataModelVisualizationElement.js.map +1 -1
- package/dist/elements/schema-design/DataSchemaDocument.d.ts +0 -1
- package/dist/elements/schema-design/DataSchemaDocument.d.ts.map +1 -1
- package/dist/elements/schema-design/DataSchemaDocument.js +4 -43
- package/dist/elements/schema-design/DataSchemaDocument.js.map +1 -1
- package/dist/elements/schema-design/EntityFormElement.d.ts +0 -1
- package/dist/elements/schema-design/EntityFormElement.d.ts.map +1 -1
- package/dist/elements/schema-design/EntityFormElement.js +4 -25
- package/dist/elements/schema-design/EntityFormElement.js.map +1 -1
- package/dist/elements/schema-design/PropertyFormElement.d.ts +1 -2
- package/dist/elements/schema-design/PropertyFormElement.d.ts.map +1 -1
- package/dist/elements/schema-design/PropertyFormElement.js +8 -23
- package/dist/elements/schema-design/PropertyFormElement.js.map +1 -1
- package/dist/elements/schema-design/SchemaDesignNavigation.js +0 -9
- package/dist/elements/schema-design/SchemaDesignNavigation.js.map +1 -1
- package/dist/elements/schema-design/SchemaNamespaceSelector.js +0 -9
- package/dist/elements/schema-design/SchemaNamespaceSelector.js.map +1 -1
- package/dist/elements/user/UserAvatarElement.js +0 -9
- package/dist/elements/user/UserAvatarElement.js.map +1 -1
- package/dist/events/http-client/models/CertificatesEvents.js +2 -2
- package/dist/events/http-client/models/CertificatesEvents.js.map +1 -1
- package/dist/http-client/idb/Base.js +5 -10
- package/dist/http-client/idb/Base.js.map +1 -1
- package/dist/http-client/idb/LegacyMockedStore.js +0 -1
- package/dist/http-client/idb/LegacyMockedStore.js.map +1 -1
- package/dist/http-client/idb/MockedStore.js +3 -1
- package/dist/http-client/idb/MockedStore.js.map +1 -1
- package/dist/http-client/store/DataImportProcessor.js +0 -3
- package/dist/http-client/store/DataImportProcessor.js.map +1 -1
- package/dist/http-client/store/HttpClientIdbDatabase.js +8 -7
- package/dist/http-client/store/HttpClientIdbDatabase.js.map +1 -1
- package/dist/http-client/store/IdbThread.js +23 -20
- package/dist/http-client/store/IdbThread.js.map +1 -1
- package/dist/http-client/store/idb/IdbProjectUi.js +4 -1
- package/dist/http-client/store/idb/IdbProjectUi.js.map +1 -1
- package/dist/http-client/store/idb/IdbStore.js +0 -2
- package/dist/http-client/store/idb/IdbStore.js.map +1 -1
- package/dist/http-client/store/idb/IdbUrlHistory.js +4 -1
- package/dist/http-client/store/idb/IdbUrlHistory.js.map +1 -1
- package/dist/http-client/store/idb/IdbWsHistory.js +4 -1
- package/dist/http-client/store/idb/IdbWsHistory.js.map +1 -1
- package/dist/lib/chart/HttpHistoryChart.js +7 -8
- package/dist/lib/chart/HttpHistoryChart.js.map +1 -1
- package/dist/mixins/FileDropMixin.js +0 -1
- package/dist/mixins/FileDropMixin.js.map +1 -1
- package/dist/mixins/RenderableMixin.js +11 -15
- package/dist/mixins/RenderableMixin.js.map +1 -1
- package/dist/pages/ApplicationScreen.d.ts +1 -1
- package/dist/pages/ApplicationScreen.d.ts.map +1 -1
- package/dist/pages/ApplicationScreen.js +35 -56
- package/dist/pages/ApplicationScreen.js.map +1 -1
- package/dist/pages/api-client/ApiClient.screen.js +11 -20
- package/dist/pages/api-client/ApiClient.screen.js.map +1 -1
- package/dist/pages/api-client/ApiClient.styles.d.ts.map +1 -1
- package/dist/pages/api-client/ApiClient.styles.js +22 -3
- package/dist/pages/api-client/ApiClient.styles.js.map +1 -1
- package/dist/pages/api-client/Authenticate.screen.d.ts +2 -0
- package/dist/pages/api-client/Authenticate.screen.d.ts.map +1 -1
- package/dist/pages/api-client/Authenticate.screen.js +23 -9
- package/dist/pages/api-client/Authenticate.screen.js.map +1 -1
- package/dist/pages/api-client/StoreConfig.screen.d.ts.map +1 -1
- package/dist/pages/api-client/StoreConfig.screen.js +25 -39
- package/dist/pages/api-client/StoreConfig.screen.js.map +1 -1
- package/dist/pages/api-client/StoreConfig.styles.d.ts.map +1 -1
- package/dist/pages/api-client/StoreConfig.styles.js +5 -0
- package/dist/pages/api-client/StoreConfig.styles.js.map +1 -1
- package/dist/pages/api-client/Telemetry.screen.js +1 -2
- package/dist/pages/api-client/Telemetry.screen.js.map +1 -1
- package/dist/pages/api-client/pages/Files.page.d.ts +1 -0
- package/dist/pages/api-client/pages/Files.page.d.ts.map +1 -1
- package/dist/pages/api-client/pages/Files.page.js +8 -28
- package/dist/pages/api-client/pages/Files.page.js.map +1 -1
- package/dist/pages/api-client/pages/Settings.page.js +2 -4
- package/dist/pages/api-client/pages/Settings.page.js.map +1 -1
- package/dist/pages/api-client/pages/Trash.page.js +2 -13
- package/dist/pages/api-client/pages/Trash.page.js.map +1 -1
- package/dist/pages/demo/DemoPage.js +13 -13
- package/dist/pages/demo/DemoPage.js.map +1 -1
- package/dist/pages/http-project/HttpProject.screen.d.ts +0 -8
- package/dist/pages/http-project/HttpProject.screen.d.ts.map +1 -1
- package/dist/pages/http-project/HttpProject.screen.js +39 -50
- package/dist/pages/http-project/HttpProject.screen.js.map +1 -1
- package/dist/pages/http-project/types.d.ts +8 -6
- package/dist/pages/http-project/types.d.ts.map +1 -1
- package/dist/pages/http-project/types.js.map +1 -1
- package/dist/pages/schema-design/SchemaDesigner.screen.js +14 -27
- package/dist/pages/schema-design/SchemaDesigner.screen.js.map +1 -1
- package/dist/store/HttpStore.js +0 -3
- package/dist/store/HttpStore.js.map +1 -1
- package/dist/store/UserCache.js +5 -5
- package/dist/store/UserCache.js.map +1 -1
- package/dist/styles/m3/surface.module.d.ts.map +1 -1
- package/dist/styles/m3/surface.module.js +11 -27
- package/dist/styles/m3/surface.module.js.map +1 -1
- package/dist/ui/UiElement.d.ts +4 -0
- package/dist/ui/UiElement.d.ts.map +1 -1
- package/dist/ui/UiElement.js +10 -5
- package/dist/ui/UiElement.js.map +1 -1
- package/dist/ui/button/SegmentedButton.js +9 -11
- package/dist/ui/button/SegmentedButton.js.map +1 -1
- package/dist/ui/button/SegmentedButton.styles.d.ts.map +1 -1
- package/dist/ui/button/SegmentedButton.styles.js +3 -1
- package/dist/ui/button/SegmentedButton.styles.js.map +1 -1
- package/dist/ui/button/SegmentedButtonsSet.js +6 -7
- package/dist/ui/button/SegmentedButtonsSet.js.map +1 -1
- package/dist/ui/button/UiButton.js +17 -39
- package/dist/ui/button/UiButton.js.map +1 -1
- package/dist/ui/button/UiIconButton.js +9 -35
- package/dist/ui/button/UiIconButton.js.map +1 -1
- package/dist/ui/chip/UiChip.js +9 -49
- package/dist/ui/chip/UiChip.js.map +1 -1
- package/dist/ui/collapse/UiCollapse.js +15 -20
- package/dist/ui/collapse/UiCollapse.js.map +1 -1
- package/dist/ui/controllers/ActionController.js +143 -144
- package/dist/ui/controllers/ActionController.js.map +1 -1
- package/dist/ui/controllers/RadioSelectionController.js +0 -1
- package/dist/ui/controllers/RadioSelectionController.js.map +1 -1
- package/dist/ui/date/DateTime.js +3 -3
- package/dist/ui/date/DateTime.js.map +1 -1
- package/dist/ui/dialog/UiDialog.d.ts +3 -0
- package/dist/ui/dialog/UiDialog.d.ts.map +1 -1
- package/dist/ui/dialog/UiDialog.js +17 -38
- package/dist/ui/dialog/UiDialog.js.map +1 -1
- package/dist/ui/effects/ripple.d.ts.map +1 -1
- package/dist/ui/effects/ripple.js +25 -19
- package/dist/ui/effects/ripple.js.map +1 -1
- package/dist/ui/effects/rippleDirective.js +6 -7
- package/dist/ui/effects/rippleDirective.js.map +1 -1
- package/dist/ui/icons/Icons.d.ts +3 -2
- package/dist/ui/icons/Icons.d.ts.map +1 -1
- package/dist/ui/icons/Icons.js +2 -1
- package/dist/ui/icons/Icons.js.map +1 -1
- package/dist/ui/icons/UiIcon.js +4 -3
- package/dist/ui/icons/UiIcon.js.map +1 -1
- package/dist/ui/input/CheckboxElement.js +12 -10
- package/dist/ui/input/CheckboxElement.js.map +1 -1
- package/dist/ui/input/CheckedElement.d.ts +1 -1
- package/dist/ui/input/CheckedElement.d.ts.map +1 -1
- package/dist/ui/input/CheckedElement.js +5 -16
- package/dist/ui/input/CheckedElement.js.map +1 -1
- package/dist/ui/input/Input.js +170 -235
- package/dist/ui/input/Input.js.map +1 -1
- package/dist/ui/input/RadioElement.js +13 -11
- package/dist/ui/input/RadioElement.js.map +1 -1
- package/dist/ui/input/SwitchElement.js +0 -18
- package/dist/ui/input/SwitchElement.js.map +1 -1
- package/dist/ui/input/TextAreaElement.js +0 -15
- package/dist/ui/input/TextAreaElement.js.map +1 -1
- package/dist/ui/list/{DividerElement.d.ts → UiDivider.element.d.ts} +6 -6
- package/dist/ui/list/UiDivider.element.d.ts.map +1 -0
- package/dist/ui/list/UiDivider.element.js +39 -0
- package/dist/ui/list/UiDivider.element.js.map +1 -0
- package/dist/ui/list/UiDivider.styles.d.ts +3 -0
- package/dist/ui/list/UiDivider.styles.d.ts.map +1 -0
- package/dist/ui/list/UiDivider.styles.js +49 -0
- package/dist/ui/list/UiDivider.styles.js.map +1 -0
- package/dist/ui/list/UiDropdownList.js +7 -48
- package/dist/ui/list/UiDropdownList.js.map +1 -1
- package/dist/ui/list/UiList.js +3 -15
- package/dist/ui/list/UiList.js.map +1 -1
- package/dist/ui/list/UiListItem.js +4 -17
- package/dist/ui/list/UiListItem.js.map +1 -1
- package/dist/ui/list/UiListbox.js +0 -1
- package/dist/ui/list/UiListbox.js.map +1 -1
- package/dist/ui/notification/SnackNotifications.js +1 -2
- package/dist/ui/notification/SnackNotifications.js.map +1 -1
- package/dist/ui/notification/Snackbar.js +27 -51
- package/dist/ui/notification/Snackbar.js.map +1 -1
- package/dist/ui/progress/Range.js +24 -23
- package/dist/ui/progress/Range.js.map +1 -1
- package/dist/ui/progress/UiProgress.js +0 -11
- package/dist/ui/progress/UiProgress.js.map +1 -1
- package/dist/ui/table/DataTable.js +7 -12
- package/dist/ui/table/DataTable.js.map +1 -1
- package/dist/ui/tabs/UiTab.js +24 -25
- package/dist/ui/tabs/UiTab.js.map +1 -1
- package/dist/ui/tabs/UiTabs.d.ts +13 -1
- package/dist/ui/tabs/UiTabs.d.ts.map +1 -1
- package/dist/ui/tabs/UiTabs.js +62 -47
- package/dist/ui/tabs/UiTabs.js.map +1 -1
- package/dist/visualization/elements/VizWorkspaceElement.js +12 -21
- package/dist/visualization/elements/VizWorkspaceElement.js.map +1 -1
- package/dist/visualization/lib/AssociationAnchors.js +16 -28
- package/dist/visualization/lib/AssociationAnchors.js.map +1 -1
- package/dist/visualization/lib/Point.js +0 -2
- package/dist/visualization/lib/Point.js.map +1 -1
- package/dist/visualization/lib/SelectionManager.js +10 -11
- package/dist/visualization/lib/SelectionManager.js.map +1 -1
- package/dist/visualization/lib/WorkspaceAlignment.js +0 -1
- package/dist/visualization/lib/WorkspaceAlignment.js.map +1 -1
- package/dist/visualization/lib/WorkspaceDebugging.js +5 -8
- package/dist/visualization/lib/WorkspaceDebugging.js.map +1 -1
- package/dist/visualization/lib/WorkspaceEdges.js +17 -19
- package/dist/visualization/lib/WorkspaceEdges.js.map +1 -1
- package/dist/visualization/lib/WorkspaceGestures.js +0 -3
- package/dist/visualization/lib/WorkspaceGestures.js.map +1 -1
- package/dist/visualization/lib/WorkspaceSizing.js +4 -6
- package/dist/visualization/lib/WorkspaceSizing.js.map +1 -1
- package/dist/visualization/lib/lines/RectilinearLine.js +8 -34
- package/dist/visualization/lib/lines/RectilinearLine.js.map +1 -1
- package/dist/visualization/lib/tips/RectilinearTip.js +0 -1
- package/dist/visualization/lib/tips/RectilinearTip.js.map +1 -1
- package/dist/visualization/lib/tips/TipArtist.js +0 -3
- package/dist/visualization/lib/tips/TipArtist.js.map +1 -1
- package/dist/visualization/plugin/dnd/DragAndDropPlugin.js +3 -5
- package/dist/visualization/plugin/dnd/DragAndDropPlugin.js.map +1 -1
- package/dist/visualization/plugin/group-selection/GroupSelection.js +19 -19
- package/dist/visualization/plugin/group-selection/GroupSelection.js.map +1 -1
- package/dist/visualization/plugin/positioning/WorkspaceLayout.js +21 -38
- package/dist/visualization/plugin/positioning/WorkspaceLayout.js.map +1 -1
- package/package.json +3 -2
- package/src/define/dialog/delete-cookie-action-dialog.ts +16 -0
- package/src/define/dialog/set-cookie-action-dialog.ts +16 -0
- package/src/define/http/http-assertions.ts +3 -3
- package/src/define/http/http-flows.ts +15 -0
- package/src/define/ui/ui-divider.ts +7 -2
- package/src/elements/ApiElement.ts +7 -0
- package/src/elements/amf/ApiAuthorizationEditor.element.ts +1 -1
- package/src/elements/amf/ApiOperationDocument.element.ts +2 -1
- package/src/elements/amf/ApiRequest.element.ts +1 -1
- package/src/elements/amf/ApiRequestEditor.element.ts +0 -4
- package/src/elements/authorization/ui/Authorization.ts +3 -5
- package/src/elements/dialog/DeleteCookieAction.element.ts +100 -0
- package/src/elements/dialog/DeleteCookieAction.styles.ts +14 -0
- package/src/elements/dialog/Rename.ts +8 -7
- package/src/elements/dialog/SetCookieAction.element.ts +183 -0
- package/src/elements/environment/EnvironmentEditor.styles.ts +5 -0
- package/src/elements/environment/EnvironmentEditor.ts +81 -22
- package/src/elements/environment/ServerEditor.ts +4 -8
- package/src/elements/environment/VariablesEditor.ts +3 -7
- package/src/elements/highlight/Prism.styles.ts +12 -5
- package/src/elements/http/BodyEditor.ts +10 -17
- package/src/elements/http/BodyMultipartEditor.ts +3 -20
- package/src/elements/http/BodyTextEditor.ts +0 -4
- package/src/elements/http/BodyUrlEncodedEditor.ts +5 -8
- package/src/elements/http/HeadersForm.ts +2 -9
- package/src/elements/http/HttpAssertions.element.ts +286 -0
- package/src/elements/http/HttpAssertions.styles.ts +7 -156
- package/src/elements/http/HttpFlows.common.ts +181 -0
- package/src/elements/http/HttpFlows.element.ts +722 -0
- package/src/elements/http/HttpFlows.styles.ts +29 -0
- package/src/elements/http/HttpFlowsUi.ts +1327 -0
- package/src/elements/http/RequestConfigElement.ts +10 -14
- package/src/elements/http/RequestEditor.ts +77 -35
- package/src/elements/http/UrlInput.ts +6 -6
- package/src/elements/http/UrlParamsForm.ts +2 -6
- package/src/elements/layout/SplitView.styles.ts +1 -0
- package/src/elements/navigation/AppNavigationItem.styles.ts +2 -0
- package/src/elements/project/HttpProjectRequest.ts +16 -5
- package/src/elements/project/ProjectRunner.ts +3 -7
- package/src/elements/schema-design/AssociationFormElement.ts +4 -8
- package/src/elements/schema-design/DataEntityEditorElement.ts +8 -8
- package/src/elements/schema-design/DataSchemaDocument.ts +5 -9
- package/src/elements/schema-design/EntityFormElement.ts +6 -10
- package/src/elements/schema-design/PropertyFormElement.ts +11 -15
- package/src/pages/ApplicationScreen.ts +1 -1
- package/src/pages/api-client/ApiClient.styles.ts +22 -3
- package/src/pages/api-client/Authenticate.screen.ts +19 -3
- package/src/pages/api-client/StoreConfig.screen.ts +4 -2
- package/src/pages/api-client/StoreConfig.styles.ts +5 -0
- package/src/pages/api-client/pages/Files.page.ts +2 -1
- package/src/pages/http-project/HttpProject.screen.ts +14 -26
- package/src/pages/http-project/types.ts +8 -6
- package/src/styles/m3/surface.module.ts +11 -27
- package/src/styles/m3/theme.css +36 -0
- package/src/styles/m3/tokens.css +11 -0
- package/src/ui/UiElement.ts +7 -0
- package/src/ui/button/SegmentedButton.styles.ts +3 -1
- package/src/ui/dialog/UiDialog.ts +3 -0
- package/src/ui/effects/ripple.ts +6 -1
- package/src/ui/icons/Icons.ts +3 -2
- package/src/ui/input/CheckedElement.ts +3 -3
- package/src/ui/input/Input.ts +1 -1
- package/src/ui/list/UiDivider.element.ts +41 -0
- package/src/ui/list/UiDivider.styles.ts +49 -0
- package/src/ui/tabs/UiTabs.ts +55 -13
- package/test/amf/authorization/OAuth2Method.test.ts +1 -1
- package/test/elements/http/HttpAssertions.test.ts +5 -6
- package/test/elements/http/HttpFlows.test.ts +485 -0
- package/tsconfig.json +2 -2
- package/dist/elements/http/HttpAssertions.d.ts +0 -114
- package/dist/elements/http/HttpAssertions.d.ts.map +0 -1
- package/dist/elements/http/HttpAssertions.js +0 -1144
- package/dist/elements/http/HttpAssertions.js.map +0 -1
- package/dist/elements/http/internals.d.ts +0 -150
- package/dist/elements/http/internals.d.ts.map +0 -1
- package/dist/elements/http/internals.js +0 -150
- package/dist/elements/http/internals.js.map +0 -1
- package/dist/ui/list/DividerElement.d.ts.map +0 -1
- package/dist/ui/list/DividerElement.js +0 -87
- package/dist/ui/list/DividerElement.js.map +0 -1
- package/src/elements/http/HttpAssertions.ts +0 -1187
- package/src/elements/http/internals.ts +0 -151
- package/src/http-client/docs/Files.md +0 -28
- package/src/ui/list/DividerElement.ts +0 -84
|
@@ -1,1144 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { DataSteps, FlowSourceEnum, FlowRequestDataEnum, FlowResponseDataEnum, TransformationSteps, HttpAssertions as CoreAssertions, AmfNamespace } from "@api-client/core/build/browser.js";
|
|
3
|
-
import { html, nothing } from "lit";
|
|
4
|
-
import { property } from "lit/decorators.js";
|
|
5
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
6
|
-
import { live } from "lit/directives/live.js";
|
|
7
|
-
import ApiElement from "../ApiElement.js";
|
|
8
|
-
import '../../define/ui/ui-button.js';
|
|
9
|
-
import '../../define/ui/ui-icon-button.js';
|
|
10
|
-
import '../../define/ui/ui-switch.js';
|
|
11
|
-
import '../../define/ui/ui-icon.js';
|
|
12
|
-
import '../../define/ui/ui-text-field.js';
|
|
13
|
-
import '../../define/ui/ui-chip.js';
|
|
14
|
-
import '../../define/ui/ui-dialog.js';
|
|
15
|
-
/**
|
|
16
|
-
* @fires change When the model change
|
|
17
|
-
*/
|
|
18
|
-
export default class HttpAssertions extends ApiElement {
|
|
19
|
-
/**
|
|
20
|
-
* The list of assertions.
|
|
21
|
-
* This is a live list. All changes are propagated in the model.
|
|
22
|
-
*/
|
|
23
|
-
model = [];
|
|
24
|
-
/**
|
|
25
|
-
* Adds a new empty assertion to the model.
|
|
26
|
-
* Note, this function won't notify the parent element
|
|
27
|
-
* about the change as empty rules can be discarded.
|
|
28
|
-
*/
|
|
29
|
-
addAssertion() {
|
|
30
|
-
const { model } = this;
|
|
31
|
-
model.push({
|
|
32
|
-
enabled: true,
|
|
33
|
-
steps: [],
|
|
34
|
-
});
|
|
35
|
-
this.requestUpdate();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Removes an assertion at specified index.
|
|
39
|
-
* @param index The index of the assertion in the `model` to remove.
|
|
40
|
-
*/
|
|
41
|
-
removeAssertion(index) {
|
|
42
|
-
const { model } = this;
|
|
43
|
-
if (!model[index]) {
|
|
44
|
-
throw new RangeError(`Invalid index: ${index}`);
|
|
45
|
-
}
|
|
46
|
-
model.splice(index, 1);
|
|
47
|
-
this.requestUpdate();
|
|
48
|
-
this.notifyChange();
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Toggles the enabled state of the assertion.
|
|
52
|
-
* @param index The index of the assertion on the `model` array
|
|
53
|
-
* @param value The `enabled` value.
|
|
54
|
-
*/
|
|
55
|
-
toggleAssertion(index, value) {
|
|
56
|
-
const { model } = this;
|
|
57
|
-
if (!model[index]) {
|
|
58
|
-
throw new RangeError(`Invalid index: ${index}`);
|
|
59
|
-
}
|
|
60
|
-
model[index].enabled = value;
|
|
61
|
-
this.requestUpdate();
|
|
62
|
-
this.notifyChange();
|
|
63
|
-
}
|
|
64
|
-
notifyChange() {
|
|
65
|
-
this.dispatchEvent(new Event('change'));
|
|
66
|
-
}
|
|
67
|
-
handleAdd() {
|
|
68
|
-
this.addAssertion();
|
|
69
|
-
}
|
|
70
|
-
handleRemove(e) {
|
|
71
|
-
const node = e.currentTarget;
|
|
72
|
-
const index = Number(node.dataset.index);
|
|
73
|
-
if (Number.isNaN(index)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
this.removeAssertion(index);
|
|
77
|
-
}
|
|
78
|
-
handleToggle(e) {
|
|
79
|
-
const node = e.currentTarget;
|
|
80
|
-
const index = Number(node.dataset.index);
|
|
81
|
-
if (Number.isNaN(index)) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
this.toggleAssertion(index, node.checked);
|
|
85
|
-
}
|
|
86
|
-
handleRemoveStep(e) {
|
|
87
|
-
const target = e.currentTarget;
|
|
88
|
-
const assertionIndex = Number(target.dataset.index);
|
|
89
|
-
const stepIndex = Number(target.dataset.stepIndex);
|
|
90
|
-
if (Number.isNaN(assertionIndex) || Number.isNaN(stepIndex)) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const assertion = this.model[assertionIndex];
|
|
94
|
-
if (!assertion) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
assertion.steps.splice(stepIndex, 1);
|
|
98
|
-
this.notifyChange();
|
|
99
|
-
this.requestUpdate();
|
|
100
|
-
}
|
|
101
|
-
draggedChip;
|
|
102
|
-
isValidDropTarget(dataTransfer) {
|
|
103
|
-
if (!dataTransfer) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
const { types } = dataTransfer;
|
|
107
|
-
return types.includes('assertion/group') && types.includes('assertion/kind');
|
|
108
|
-
}
|
|
109
|
-
handleDragStart(e) {
|
|
110
|
-
const { dataTransfer } = e;
|
|
111
|
-
if (!dataTransfer) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const chip = e.target;
|
|
115
|
-
const { group, kind, source, data, variant } = chip.dataset;
|
|
116
|
-
if (!group || !kind) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const copy = chip.cloneNode(true);
|
|
120
|
-
copy.style.position = 'absolute';
|
|
121
|
-
copy.style.top = `-100px`;
|
|
122
|
-
this.draggedChip = copy;
|
|
123
|
-
document.body.appendChild(copy);
|
|
124
|
-
dataTransfer.setDragImage(copy, 0, 0);
|
|
125
|
-
dataTransfer.setData('assertion/group', group);
|
|
126
|
-
dataTransfer.setData('assertion/kind', kind);
|
|
127
|
-
if (source) {
|
|
128
|
-
dataTransfer.setData('assertion/source', source);
|
|
129
|
-
}
|
|
130
|
-
if (data) {
|
|
131
|
-
dataTransfer.setData('assertion/data', data);
|
|
132
|
-
}
|
|
133
|
-
if (variant) {
|
|
134
|
-
dataTransfer.setData('assertion/variant', variant);
|
|
135
|
-
}
|
|
136
|
-
chip.blur();
|
|
137
|
-
}
|
|
138
|
-
handleDragEnd(e) {
|
|
139
|
-
const { draggedChip } = this;
|
|
140
|
-
if (!draggedChip) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
e.preventDefault();
|
|
144
|
-
draggedChip.parentElement?.removeChild(draggedChip);
|
|
145
|
-
}
|
|
146
|
-
handleTargetDragOver(e) {
|
|
147
|
-
const { draggedChip } = this;
|
|
148
|
-
if (!draggedChip || e.defaultPrevented || !this.isValidDropTarget(e.dataTransfer)) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
e.preventDefault();
|
|
152
|
-
const target = e.currentTarget;
|
|
153
|
-
target.classList.add('dragover');
|
|
154
|
-
}
|
|
155
|
-
handleTargetDragLeave(e) {
|
|
156
|
-
if (e.defaultPrevented || !this.isValidDropTarget(e.dataTransfer)) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
const target = e.currentTarget;
|
|
160
|
-
target.classList.remove('dragover');
|
|
161
|
-
}
|
|
162
|
-
handleDrop(e) {
|
|
163
|
-
const { dataTransfer } = e;
|
|
164
|
-
if (!dataTransfer || e.defaultPrevented || !this.isValidDropTarget(dataTransfer)) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
e.preventDefault();
|
|
168
|
-
this.resetDragIndices();
|
|
169
|
-
const { index, stepIndex } = e.target.dataset;
|
|
170
|
-
const typedAssertionIndex = Number(index);
|
|
171
|
-
if (Number.isNaN(typedAssertionIndex)) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
let typedStepIndex;
|
|
175
|
-
if (stepIndex) {
|
|
176
|
-
const tmp = Number(stepIndex);
|
|
177
|
-
if (!Number.isNaN(tmp)) {
|
|
178
|
-
typedStepIndex = tmp;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
this.processDrop(dataTransfer, typedAssertionIndex, typedStepIndex);
|
|
182
|
-
}
|
|
183
|
-
resetDragIndices() {
|
|
184
|
-
const nodes = this.shadowRoot.querySelectorAll('.dragover');
|
|
185
|
-
Array.from(nodes).forEach(n => n.classList.remove('dragover'));
|
|
186
|
-
}
|
|
187
|
-
processDrop(dataTransfer, assertionIndex, stepIndex) {
|
|
188
|
-
const group = dataTransfer.getData('assertion/group');
|
|
189
|
-
if (!group) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (group === 'data-source') {
|
|
193
|
-
this.processDataSourceDrop(dataTransfer, assertionIndex, stepIndex);
|
|
194
|
-
}
|
|
195
|
-
else if (group === 'transformation') {
|
|
196
|
-
this.processTransformationDrop(dataTransfer, assertionIndex, stepIndex);
|
|
197
|
-
}
|
|
198
|
-
else if (group === 'assertion') {
|
|
199
|
-
this.processAssertionDrop(dataTransfer, assertionIndex, stepIndex);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
processDataSourceDrop(dataTransfer, assertionIndex, stepIndex) {
|
|
203
|
-
const item = this.model[assertionIndex];
|
|
204
|
-
if (!item) {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
const source = dataTransfer.getData('assertion/source');
|
|
208
|
-
const data = dataTransfer.getData('assertion/data');
|
|
209
|
-
const step = new DataSteps.ReadDataSourceStep(source, data).toJSON();
|
|
210
|
-
if (stepIndex === undefined) {
|
|
211
|
-
item.steps.push(step);
|
|
212
|
-
}
|
|
213
|
-
else if (stepIndex === -1) {
|
|
214
|
-
item.steps.unshift(step);
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
item.steps.splice(stepIndex, 0, step);
|
|
218
|
-
}
|
|
219
|
-
this.requestUpdate();
|
|
220
|
-
this.notifyChange();
|
|
221
|
-
}
|
|
222
|
-
processTransformationDrop(dataTransfer, assertionIndex, stepIndex) {
|
|
223
|
-
const item = this.model[assertionIndex];
|
|
224
|
-
if (!item) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
let step;
|
|
228
|
-
const kind = dataTransfer.getData('assertion/kind');
|
|
229
|
-
if (kind === DataSteps.ReadValueStepKind) {
|
|
230
|
-
step = new DataSteps.ReadValueStep().toJSON();
|
|
231
|
-
}
|
|
232
|
-
else if (kind === TransformationSteps.AsNumberStepKind) {
|
|
233
|
-
step = new TransformationSteps.AsNumberStep().toJSON();
|
|
234
|
-
}
|
|
235
|
-
else if (kind === TransformationSteps.RoundStepKind) {
|
|
236
|
-
step = new TransformationSteps.RoundStep().toJSON();
|
|
237
|
-
}
|
|
238
|
-
else if (kind === TransformationSteps.AsLowerCaseStepKind) {
|
|
239
|
-
step = new TransformationSteps.AsLowerCaseStep().toJSON();
|
|
240
|
-
}
|
|
241
|
-
else if (kind === TransformationSteps.AsUpperCaseStepKind) {
|
|
242
|
-
step = new TransformationSteps.AsUpperCaseStep().toJSON();
|
|
243
|
-
}
|
|
244
|
-
else if (kind === TransformationSteps.TrimStepKind) {
|
|
245
|
-
step = new TransformationSteps.TrimStep().toJSON();
|
|
246
|
-
}
|
|
247
|
-
else if (kind === TransformationSteps.SubstringStepKind) {
|
|
248
|
-
step = new TransformationSteps.SubstringStep().toJSON();
|
|
249
|
-
}
|
|
250
|
-
if (!step) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (stepIndex === undefined) {
|
|
254
|
-
item.steps.push(step);
|
|
255
|
-
}
|
|
256
|
-
else if (stepIndex === -1) {
|
|
257
|
-
item.steps.unshift(step);
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
item.steps.splice(stepIndex, 0, step);
|
|
261
|
-
}
|
|
262
|
-
this.requestUpdate();
|
|
263
|
-
this.notifyChange();
|
|
264
|
-
}
|
|
265
|
-
processAssertionDrop(dataTransfer, assertionIndex, stepIndex) {
|
|
266
|
-
const item = this.model[assertionIndex];
|
|
267
|
-
if (!item) {
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
let step;
|
|
271
|
-
const kind = dataTransfer.getData('assertion/kind');
|
|
272
|
-
if (kind === CoreAssertions.EqualAssertionKind) {
|
|
273
|
-
step = new CoreAssertions.EqualAssertion().toJSON();
|
|
274
|
-
}
|
|
275
|
-
else if (kind === CoreAssertions.NotEqualAssertionKind) {
|
|
276
|
-
step = new CoreAssertions.NotEqualAssertion().toJSON();
|
|
277
|
-
}
|
|
278
|
-
else if (kind === CoreAssertions.GreaterThanAssertionKind) {
|
|
279
|
-
const instance = new CoreAssertions.GreaterThanAssertion();
|
|
280
|
-
if (dataTransfer.getData('assertion/variant') === 'equal') {
|
|
281
|
-
instance.equal = true;
|
|
282
|
-
}
|
|
283
|
-
step = instance.toJSON();
|
|
284
|
-
}
|
|
285
|
-
else if (kind === CoreAssertions.LessThanAssertionKind) {
|
|
286
|
-
const instance = new CoreAssertions.LessThanAssertion();
|
|
287
|
-
if (dataTransfer.getData('assertion/variant') === 'equal') {
|
|
288
|
-
instance.equal = true;
|
|
289
|
-
}
|
|
290
|
-
step = instance.toJSON();
|
|
291
|
-
}
|
|
292
|
-
else if (kind === CoreAssertions.IncludesAssertionKind) {
|
|
293
|
-
step = new CoreAssertions.IncludesAssertion().toJSON();
|
|
294
|
-
}
|
|
295
|
-
else if (kind === CoreAssertions.NotIncludesAssertionKind) {
|
|
296
|
-
step = new CoreAssertions.NotIncludesAssertion().toJSON();
|
|
297
|
-
}
|
|
298
|
-
else if (kind === CoreAssertions.MatchesAssertionKind) {
|
|
299
|
-
step = new CoreAssertions.MatchesAssertion().toJSON();
|
|
300
|
-
}
|
|
301
|
-
else if (kind === CoreAssertions.OkAssertionKind) {
|
|
302
|
-
step = new CoreAssertions.OkAssertion().toJSON();
|
|
303
|
-
}
|
|
304
|
-
else if (kind === CoreAssertions.NotOkAssertionKind) {
|
|
305
|
-
step = new CoreAssertions.NotOkAssertion().toJSON();
|
|
306
|
-
}
|
|
307
|
-
else if (kind === CoreAssertions.ToBeAssertionKind) {
|
|
308
|
-
step = new CoreAssertions.ToBeAssertion().toJSON();
|
|
309
|
-
}
|
|
310
|
-
else if (kind === CoreAssertions.NotToBeAssertionKind) {
|
|
311
|
-
step = new CoreAssertions.NotToBeAssertion().toJSON();
|
|
312
|
-
}
|
|
313
|
-
if (!step) {
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
if (stepIndex === undefined) {
|
|
317
|
-
item.steps.push(step);
|
|
318
|
-
}
|
|
319
|
-
else if (stepIndex === -1) {
|
|
320
|
-
item.steps.unshift(step);
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
item.steps.splice(stepIndex, 0, step);
|
|
324
|
-
}
|
|
325
|
-
this.requestUpdate();
|
|
326
|
-
this.notifyChange();
|
|
327
|
-
}
|
|
328
|
-
handleReadValueStepChange(e) {
|
|
329
|
-
const step = this.stepFromChangeEvent(e);
|
|
330
|
-
if (!step) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
const input = e.target;
|
|
334
|
-
input.checkValidity();
|
|
335
|
-
step.path = input.value;
|
|
336
|
-
this.requestUpdate();
|
|
337
|
-
this.notifyChange();
|
|
338
|
-
}
|
|
339
|
-
handleRoundPrecisionChange(e) {
|
|
340
|
-
const step = this.stepFromChangeEvent(e);
|
|
341
|
-
if (!step) {
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
const input = e.target;
|
|
345
|
-
input.checkValidity();
|
|
346
|
-
step.precision = input.valueAsNumber;
|
|
347
|
-
this.requestUpdate();
|
|
348
|
-
this.notifyChange();
|
|
349
|
-
}
|
|
350
|
-
handleSubstringStartChange(e) {
|
|
351
|
-
const step = this.stepFromChangeEvent(e);
|
|
352
|
-
if (!step) {
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
const input = e.target;
|
|
356
|
-
input.checkValidity();
|
|
357
|
-
step.start = input.valueAsNumber;
|
|
358
|
-
this.requestUpdate();
|
|
359
|
-
this.notifyChange();
|
|
360
|
-
}
|
|
361
|
-
handleSubstringEndChange(e) {
|
|
362
|
-
const step = this.stepFromChangeEvent(e);
|
|
363
|
-
if (!step) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
const input = e.target;
|
|
367
|
-
input.checkValidity();
|
|
368
|
-
step.end = input.valueAsNumber;
|
|
369
|
-
this.requestUpdate();
|
|
370
|
-
this.notifyChange();
|
|
371
|
-
}
|
|
372
|
-
handleEqualAssertionValueChange(e) {
|
|
373
|
-
const input = e.target;
|
|
374
|
-
input.checkValidity();
|
|
375
|
-
const assertionIndex = Number(input.dataset.assertionIndex);
|
|
376
|
-
const stepIndex = Number(input.dataset.stepIndex);
|
|
377
|
-
if (Number.isNaN(assertionIndex) || Number.isNaN(stepIndex)) {
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
const assertion = this.model[assertionIndex];
|
|
381
|
-
if (!assertion) {
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
const step = assertion.steps[stepIndex];
|
|
385
|
-
if (!step) {
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
step.value = input.value;
|
|
389
|
-
step.dataType = this.detectInputDataType(assertion.steps.slice(0, stepIndex));
|
|
390
|
-
this.requestUpdate();
|
|
391
|
-
this.notifyChange();
|
|
392
|
-
}
|
|
393
|
-
handleGreaterThanAssertionValueChange(e) {
|
|
394
|
-
const step = this.stepFromChangeEvent(e);
|
|
395
|
-
if (!step) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
const input = e.target;
|
|
399
|
-
input.checkValidity();
|
|
400
|
-
step.value = Number(input.value);
|
|
401
|
-
this.requestUpdate();
|
|
402
|
-
this.notifyChange();
|
|
403
|
-
}
|
|
404
|
-
handleLessThanAssertionValueChange(e) {
|
|
405
|
-
const step = this.stepFromChangeEvent(e);
|
|
406
|
-
if (!step) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
const input = e.target;
|
|
410
|
-
input.checkValidity();
|
|
411
|
-
step.value = Number(input.value);
|
|
412
|
-
this.requestUpdate();
|
|
413
|
-
this.notifyChange();
|
|
414
|
-
}
|
|
415
|
-
handleIncludesAssertionValueChange(e) {
|
|
416
|
-
const step = this.stepFromChangeEvent(e);
|
|
417
|
-
if (!step) {
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
const input = e.target;
|
|
421
|
-
input.checkValidity();
|
|
422
|
-
step.value = input.value;
|
|
423
|
-
this.requestUpdate();
|
|
424
|
-
this.notifyChange();
|
|
425
|
-
}
|
|
426
|
-
handleMatchesAssertionValueChange(e) {
|
|
427
|
-
const step = this.stepFromChangeEvent(e);
|
|
428
|
-
if (!step) {
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
const input = e.target;
|
|
432
|
-
step.value = input.value;
|
|
433
|
-
this.requestUpdate();
|
|
434
|
-
this.notifyChange();
|
|
435
|
-
}
|
|
436
|
-
validateRegexPattern(e) {
|
|
437
|
-
const input = e.target;
|
|
438
|
-
try {
|
|
439
|
-
RegExp(input.value);
|
|
440
|
-
input.setCustomValidity('');
|
|
441
|
-
}
|
|
442
|
-
catch (_) {
|
|
443
|
-
input.setCustomValidity('Pattern is invalid');
|
|
444
|
-
}
|
|
445
|
-
input.reportValidity();
|
|
446
|
-
}
|
|
447
|
-
stepFromChangeEvent(e) {
|
|
448
|
-
const input = e.target;
|
|
449
|
-
input.checkValidity();
|
|
450
|
-
const assertionIndex = Number(input.dataset.assertionIndex);
|
|
451
|
-
const stepIndex = Number(input.dataset.stepIndex);
|
|
452
|
-
if (Number.isNaN(assertionIndex) || Number.isNaN(stepIndex)) {
|
|
453
|
-
return undefined;
|
|
454
|
-
}
|
|
455
|
-
const assertion = this.model[assertionIndex];
|
|
456
|
-
if (!assertion) {
|
|
457
|
-
return undefined;
|
|
458
|
-
}
|
|
459
|
-
return assertion.steps[stepIndex];
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* Detects the correct data type for the step value based on previous steps.
|
|
463
|
-
*
|
|
464
|
-
* @param steps The steps before the current step
|
|
465
|
-
* @returns The data type for the step in the AMF namespace.
|
|
466
|
-
*/
|
|
467
|
-
detectInputDataType(steps) {
|
|
468
|
-
// we reverse the list so we move from the last step.
|
|
469
|
-
const reversed = [...steps].reverse();
|
|
470
|
-
for (const step of reversed) {
|
|
471
|
-
if (step.kind === TransformationSteps.AsNumberStepKind) {
|
|
472
|
-
return AmfNamespace.aml.vocabularies.shapes.number;
|
|
473
|
-
}
|
|
474
|
-
if (step.kind === DataSteps.ReadDataSourceStepKind) {
|
|
475
|
-
const typed = step;
|
|
476
|
-
if (typed.data === FlowResponseDataEnum.status) {
|
|
477
|
-
return AmfNamespace.aml.vocabularies.shapes.number;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
return AmfNamespace.w3.xmlSchema.string;
|
|
482
|
-
}
|
|
483
|
-
handleRenameAssertion(e) {
|
|
484
|
-
const target = e.currentTarget;
|
|
485
|
-
const assertionIndex = Number(target.dataset.assertionIndex);
|
|
486
|
-
if (Number.isNaN(assertionIndex)) {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
const assertion = this.model[assertionIndex];
|
|
490
|
-
if (!assertion) {
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
const { description } = assertion;
|
|
494
|
-
const dialog = this.shadowRoot?.querySelector('.rename-dialog');
|
|
495
|
-
if (!dialog) {
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
const input = dialog.querySelector('ui-text-field');
|
|
499
|
-
input.value = description || '';
|
|
500
|
-
dialog.open = true;
|
|
501
|
-
dialog.dataset.assertionIndex = target.dataset.assertionIndex;
|
|
502
|
-
}
|
|
503
|
-
handleRenameDialogResult(e) {
|
|
504
|
-
if (e.detail.cancelled) {
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
const dialog = e.currentTarget;
|
|
508
|
-
const assertionIndex = Number(dialog.dataset.assertionIndex);
|
|
509
|
-
if (Number.isNaN(assertionIndex)) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const assertion = this.model[assertionIndex];
|
|
513
|
-
if (!assertion) {
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
const input = dialog.querySelector('ui-text-field');
|
|
517
|
-
assertion.description = input.value;
|
|
518
|
-
this.requestUpdate();
|
|
519
|
-
this.notifyChange();
|
|
520
|
-
input.value = '';
|
|
521
|
-
delete dialog.dataset.assertionIndex;
|
|
522
|
-
}
|
|
523
|
-
render() {
|
|
524
|
-
return html `
|
|
525
|
-
${this.renderActionButtons()}
|
|
526
|
-
<div class="container">
|
|
527
|
-
${this.renderEditor()}
|
|
528
|
-
${this.renderAssertions()}
|
|
529
|
-
</div>
|
|
530
|
-
${this.renderRenameAssertionDialog()}
|
|
531
|
-
`;
|
|
532
|
-
}
|
|
533
|
-
renderActionButtons() {
|
|
534
|
-
return html `
|
|
535
|
-
<div class="editor-actions">
|
|
536
|
-
<ui-button type="tonal" @click="${this.handleAdd}" class="add-button">Add</ui-button>
|
|
537
|
-
</div>
|
|
538
|
-
`;
|
|
539
|
-
}
|
|
540
|
-
renderAssertions() {
|
|
541
|
-
return html `
|
|
542
|
-
<section aria-label="Assertion options" class="options">
|
|
543
|
-
${this.renderDataSourceOptions()}
|
|
544
|
-
${this.renderTransformationOptions()}
|
|
545
|
-
${this.renderAssertionOptions()}
|
|
546
|
-
</section>
|
|
547
|
-
`;
|
|
548
|
-
}
|
|
549
|
-
renderStepChip(label, group, kind, variant) {
|
|
550
|
-
return html `
|
|
551
|
-
<ui-chip
|
|
552
|
-
draggable="true"
|
|
553
|
-
data-group="${group}"
|
|
554
|
-
data-kind="${kind}"
|
|
555
|
-
data-variant="${ifDefined(variant)}"
|
|
556
|
-
@dragstart="${this.handleDragStart}"
|
|
557
|
-
@dragend="${this.handleDragEnd}"
|
|
558
|
-
>${label}</ui-chip>
|
|
559
|
-
`;
|
|
560
|
-
}
|
|
561
|
-
renderDataSourceChip(label, group, kind, source, data) {
|
|
562
|
-
return html `
|
|
563
|
-
<ui-chip
|
|
564
|
-
draggable="true"
|
|
565
|
-
data-group="${group}"
|
|
566
|
-
data-kind="${kind}"
|
|
567
|
-
data-source="${source}"
|
|
568
|
-
data-data="${data}"
|
|
569
|
-
@dragstart="${this.handleDragStart}"
|
|
570
|
-
@dragend="${this.handleDragEnd}"
|
|
571
|
-
>${label}</ui-chip>
|
|
572
|
-
`;
|
|
573
|
-
}
|
|
574
|
-
renderDataSourceOptions() {
|
|
575
|
-
return html `
|
|
576
|
-
<details class="assertion-group" open>
|
|
577
|
-
<summary>Data source</summary>
|
|
578
|
-
<div class="group-content">
|
|
579
|
-
${this.renderDataSourceChip('Status code', 'data-source', DataSteps.ReadDataSourceStepKind, FlowSourceEnum.response, FlowResponseDataEnum.status)}
|
|
580
|
-
${this.renderDataSourceChip('Response headers', 'data-source', DataSteps.ReadDataSourceStepKind, FlowSourceEnum.response, FlowResponseDataEnum.headers)}
|
|
581
|
-
${this.renderDataSourceChip('Response body', 'data-source', DataSteps.ReadDataSourceStepKind, FlowSourceEnum.response, FlowResponseDataEnum.body)}
|
|
582
|
-
${this.renderDataSourceChip('Status message', 'data-source', DataSteps.ReadDataSourceStepKind, FlowSourceEnum.response, FlowResponseDataEnum.statusText)}
|
|
583
|
-
</div>
|
|
584
|
-
</details>
|
|
585
|
-
`;
|
|
586
|
-
}
|
|
587
|
-
renderTransformationOptions() {
|
|
588
|
-
return html `
|
|
589
|
-
<details class="assertion-group" open>
|
|
590
|
-
<summary>Transformation</summary>
|
|
591
|
-
<div class="group-content">
|
|
592
|
-
${this.renderStepChip('Read value', 'transformation', DataSteps.ReadValueStepKind)}
|
|
593
|
-
${this.renderStepChip('As number', 'transformation', TransformationSteps.AsNumberStepKind)}
|
|
594
|
-
${this.renderStepChip('Round', 'transformation', TransformationSteps.RoundStepKind)}
|
|
595
|
-
${this.renderStepChip('To lower case', 'transformation', TransformationSteps.AsLowerCaseStepKind)}
|
|
596
|
-
${this.renderStepChip('To upper case', 'transformation', TransformationSteps.AsUpperCaseStepKind)}
|
|
597
|
-
${this.renderStepChip('Trim', 'transformation', TransformationSteps.TrimStepKind)}
|
|
598
|
-
${this.renderStepChip('Substring', 'transformation', TransformationSteps.SubstringStepKind)}
|
|
599
|
-
</div>
|
|
600
|
-
</details>
|
|
601
|
-
`;
|
|
602
|
-
}
|
|
603
|
-
renderAssertionOptions() {
|
|
604
|
-
return html `
|
|
605
|
-
<details class="assertion-group" open>
|
|
606
|
-
<summary>Assertions</summary>
|
|
607
|
-
<div class="group-content">
|
|
608
|
-
${this.renderStepChip('Equal', 'assertion', CoreAssertions.EqualAssertionKind)}
|
|
609
|
-
${this.renderStepChip('Not equal', 'assertion', CoreAssertions.NotEqualAssertionKind)}
|
|
610
|
-
${this.renderStepChip('Greater than', 'assertion', CoreAssertions.GreaterThanAssertionKind)}
|
|
611
|
-
${this.renderStepChip('Greater than equal', 'assertion', CoreAssertions.GreaterThanAssertionKind, 'equal')}
|
|
612
|
-
${this.renderStepChip('Less than', 'assertion', CoreAssertions.LessThanAssertionKind)}
|
|
613
|
-
${this.renderStepChip('Less than equal', 'assertion', CoreAssertions.LessThanAssertionKind, 'equal')}
|
|
614
|
-
${this.renderStepChip('Includes', 'assertion', CoreAssertions.IncludesAssertionKind)}
|
|
615
|
-
${this.renderStepChip('Not includes', 'assertion', CoreAssertions.NotIncludesAssertionKind)}
|
|
616
|
-
${this.renderStepChip('Matches', 'assertion', CoreAssertions.MatchesAssertionKind)}
|
|
617
|
-
${this.renderStepChip('OK', 'assertion', CoreAssertions.OkAssertionKind)}
|
|
618
|
-
${this.renderStepChip('Not OK', 'assertion', CoreAssertions.NotOkAssertionKind)}
|
|
619
|
-
${this.renderStepChip('To be...', 'assertion', CoreAssertions.ToBeAssertionKind)}
|
|
620
|
-
${this.renderStepChip('Not to be...', 'assertion', CoreAssertions.NotToBeAssertionKind)}
|
|
621
|
-
</div>
|
|
622
|
-
</details>
|
|
623
|
-
`;
|
|
624
|
-
}
|
|
625
|
-
renderEditor() {
|
|
626
|
-
const { model } = this;
|
|
627
|
-
const content = Array.isArray(model) && !!model.length ? this.renderList(model) : this.renderEmptyMessage();
|
|
628
|
-
return html `
|
|
629
|
-
<section aria-label="Assertions editor" class="editor">${content}</section>
|
|
630
|
-
`;
|
|
631
|
-
}
|
|
632
|
-
renderEmptyMessage() {
|
|
633
|
-
return html `
|
|
634
|
-
<div class="empty-message">No assertions added</div>
|
|
635
|
-
`;
|
|
636
|
-
}
|
|
637
|
-
renderList(model) {
|
|
638
|
-
return html `
|
|
639
|
-
${model.map((item, index) => this.renderAssertion(item, index))}
|
|
640
|
-
`;
|
|
641
|
-
}
|
|
642
|
-
renderAssertion(item, index) {
|
|
643
|
-
return html `
|
|
644
|
-
${this.renderAssertionDescription(item)}
|
|
645
|
-
<div class="param-row">
|
|
646
|
-
${this.renderToggleButton(item, index)}
|
|
647
|
-
${this.renderSteps(item, index)}
|
|
648
|
-
<div class="assertion-actions">
|
|
649
|
-
${this.renderRenameAssertion(index)}
|
|
650
|
-
${this.renderDeleteAssertion(index)}
|
|
651
|
-
</div>
|
|
652
|
-
</div>
|
|
653
|
-
`;
|
|
654
|
-
}
|
|
655
|
-
renderAssertionDescription(item) {
|
|
656
|
-
const { description } = item;
|
|
657
|
-
if (!description) {
|
|
658
|
-
return nothing;
|
|
659
|
-
}
|
|
660
|
-
return html `
|
|
661
|
-
<div class="assertion-description label-medium">${description}</div>
|
|
662
|
-
`;
|
|
663
|
-
}
|
|
664
|
-
renderToggleButton(item, assertionIndex) {
|
|
665
|
-
return html `
|
|
666
|
-
<ui-switch
|
|
667
|
-
.checked="${!!item.enabled}"
|
|
668
|
-
@change="${this.handleToggle}"
|
|
669
|
-
aria-label="Toggle this assertion"
|
|
670
|
-
data-index="${assertionIndex}"
|
|
671
|
-
class="toggle-button"
|
|
672
|
-
></ui-switch>
|
|
673
|
-
`;
|
|
674
|
-
}
|
|
675
|
-
renderRenameAssertion(assertionIndex) {
|
|
676
|
-
return html `
|
|
677
|
-
<ui-icon-button
|
|
678
|
-
aria-label="Rename this assertion"
|
|
679
|
-
title="Rename this assertion"
|
|
680
|
-
data-assertion-index="${assertionIndex}"
|
|
681
|
-
@click="${this.handleRenameAssertion}"
|
|
682
|
-
class="rename-button"
|
|
683
|
-
>
|
|
684
|
-
<ui-icon icon="rename" role="presentation"></ui-icon>
|
|
685
|
-
</ui-icon-button>
|
|
686
|
-
`;
|
|
687
|
-
}
|
|
688
|
-
renderDeleteAssertion(assertionIndex) {
|
|
689
|
-
return html `
|
|
690
|
-
<ui-icon-button
|
|
691
|
-
aria-label="Delete this assertion"
|
|
692
|
-
title="Delete this assertion"
|
|
693
|
-
data-index="${assertionIndex}"
|
|
694
|
-
@click="${this.handleRemove}"
|
|
695
|
-
class="delete-button"
|
|
696
|
-
>
|
|
697
|
-
<ui-icon icon="deleteOutline" role="presentation"></ui-icon>
|
|
698
|
-
</ui-icon-button>
|
|
699
|
-
`;
|
|
700
|
-
}
|
|
701
|
-
renderSteps(item, assertionIndex) {
|
|
702
|
-
const content = Array.isArray(item.steps) && !!item.steps.length ? this.renderStepsList(item.steps, assertionIndex) : this.renderEmptyStep(assertionIndex);
|
|
703
|
-
return html `
|
|
704
|
-
<div
|
|
705
|
-
class="steps"
|
|
706
|
-
data-index="${assertionIndex}"
|
|
707
|
-
@drop="${this.handleDrop}"
|
|
708
|
-
@dragover="${this.handleTargetDragOver}"
|
|
709
|
-
@dragleave="${this.handleTargetDragLeave}"
|
|
710
|
-
>${content}</div>
|
|
711
|
-
`;
|
|
712
|
-
}
|
|
713
|
-
renderEmptyStep(assertionIndex) {
|
|
714
|
-
return html `
|
|
715
|
-
<span class="step-pill empty drop-target space-step-left" data-index="${assertionIndex}" @drop="${this.handleDrop}" @dragover="${this.handleTargetDragOver}">Empty slot</span>
|
|
716
|
-
<span class="drop-info drop-target space-step-left" data-index="${assertionIndex}" @drop="${this.handleDrop}" @dragover="${this.handleTargetDragOver}">Drop an action here</span>
|
|
717
|
-
`;
|
|
718
|
-
}
|
|
719
|
-
renderStepsList(steps, assertionIndex) {
|
|
720
|
-
const items = [];
|
|
721
|
-
steps.forEach((item, stepIndex) => {
|
|
722
|
-
const content = this.renderStep(item, assertionIndex, stepIndex);
|
|
723
|
-
if (content) {
|
|
724
|
-
items.push(html `
|
|
725
|
-
<div class="step-unit">
|
|
726
|
-
${this.renderDropSpacer(assertionIndex, stepIndex)}
|
|
727
|
-
${content}
|
|
728
|
-
</div>
|
|
729
|
-
`);
|
|
730
|
-
}
|
|
731
|
-
});
|
|
732
|
-
return items;
|
|
733
|
-
}
|
|
734
|
-
renderStep(item, assertionIndex, stepIndex) {
|
|
735
|
-
const { kind } = item;
|
|
736
|
-
switch (kind) {
|
|
737
|
-
case DataSteps.ReadDataSourceStepKind: return this.renderReadDataSourceStep(item, assertionIndex, stepIndex);
|
|
738
|
-
case DataSteps.ReadValueStepKind: return this.renderReadValueStep(item, assertionIndex, stepIndex);
|
|
739
|
-
// transformations
|
|
740
|
-
case TransformationSteps.AsNumberStepKind: return this.renderStepPill('As number', assertionIndex, stepIndex);
|
|
741
|
-
case TransformationSteps.AsLowerCaseStepKind: return this.renderStepPill('To lower case', assertionIndex, stepIndex);
|
|
742
|
-
case TransformationSteps.AsUpperCaseStepKind: return this.renderStepPill('To upper case', assertionIndex, stepIndex);
|
|
743
|
-
case TransformationSteps.TrimStepKind: return this.renderStepPill('Trim', assertionIndex, stepIndex);
|
|
744
|
-
case TransformationSteps.RoundStepKind: return this.renderRoundStep(item, assertionIndex, stepIndex);
|
|
745
|
-
case TransformationSteps.SubstringStepKind: return this.renderSubstringStep(item, assertionIndex, stepIndex);
|
|
746
|
-
// assertions
|
|
747
|
-
case CoreAssertions.EqualAssertionKind: return this.renderEqualAssertion(item, assertionIndex, stepIndex);
|
|
748
|
-
case CoreAssertions.NotEqualAssertionKind: return this.renderNotEqualAssertion(item, assertionIndex, stepIndex);
|
|
749
|
-
case CoreAssertions.GreaterThanAssertionKind: return this.renderGreaterThanAssertion(item, assertionIndex, stepIndex);
|
|
750
|
-
case CoreAssertions.LessThanAssertionKind: return this.renderLessThanAssertion(item, assertionIndex, stepIndex);
|
|
751
|
-
case CoreAssertions.IncludesAssertionKind: return this.renderIncludesAssertion(item, assertionIndex, stepIndex);
|
|
752
|
-
case CoreAssertions.NotIncludesAssertionKind: return this.renderNotIncludesAssertion(item, assertionIndex, stepIndex);
|
|
753
|
-
case CoreAssertions.MatchesAssertionKind: return this.renderMatchesAssertion(item, assertionIndex, stepIndex);
|
|
754
|
-
case CoreAssertions.OkAssertionKind: return this.renderStepPill('Is OK', assertionIndex, stepIndex);
|
|
755
|
-
case CoreAssertions.NotOkAssertionKind: return this.renderStepPill('Is not OK', assertionIndex, stepIndex);
|
|
756
|
-
case CoreAssertions.ToBeAssertionKind: return this.renderToBeAssertion(item, assertionIndex, stepIndex);
|
|
757
|
-
case CoreAssertions.NotToBeAssertionKind: return this.renderNotToBeAssertion(item, assertionIndex, stepIndex);
|
|
758
|
-
default: return undefined;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
renderDropSpacer(assertionIndex, stepIndex) {
|
|
762
|
-
return html `<div class="drop-target spacer"
|
|
763
|
-
data-index="${assertionIndex}"
|
|
764
|
-
data-step-index="${stepIndex}"
|
|
765
|
-
@drop="${this.handleDrop}"
|
|
766
|
-
@dragover="${this.handleTargetDragOver}"
|
|
767
|
-
@dragleave="${this.handleTargetDragLeave}"
|
|
768
|
-
> </div>`;
|
|
769
|
-
}
|
|
770
|
-
renderStepPill(label, assertionIndex, stepIndex) {
|
|
771
|
-
return html `
|
|
772
|
-
<span class="step-pill with-icon">
|
|
773
|
-
${label}
|
|
774
|
-
<ui-icon-button
|
|
775
|
-
title="Remove"
|
|
776
|
-
aria-label="Deletes this step"
|
|
777
|
-
@click="${this.handleRemoveStep}"
|
|
778
|
-
data-index="${assertionIndex}"
|
|
779
|
-
data-step-index="${stepIndex}"
|
|
780
|
-
><ui-icon icon="close"></ui-icon></ui-icon-button>
|
|
781
|
-
</span>
|
|
782
|
-
`;
|
|
783
|
-
}
|
|
784
|
-
renderReadDataSourceStep(item, assertionIndex, stepIndex) {
|
|
785
|
-
const { data, source } = item;
|
|
786
|
-
if (!data || !source) {
|
|
787
|
-
// invalid configuration
|
|
788
|
-
return undefined;
|
|
789
|
-
}
|
|
790
|
-
let label;
|
|
791
|
-
if (source === FlowSourceEnum.response) {
|
|
792
|
-
if (data === FlowResponseDataEnum.url) {
|
|
793
|
-
label = 'Response URL';
|
|
794
|
-
}
|
|
795
|
-
else if (data === FlowResponseDataEnum.headers) {
|
|
796
|
-
label = 'Response headers';
|
|
797
|
-
}
|
|
798
|
-
else if (data === FlowResponseDataEnum.status) {
|
|
799
|
-
label = 'Status code';
|
|
800
|
-
}
|
|
801
|
-
else if (data === FlowResponseDataEnum.statusText) {
|
|
802
|
-
label = 'Status message';
|
|
803
|
-
}
|
|
804
|
-
else if (data === FlowResponseDataEnum.body) {
|
|
805
|
-
label = 'Response body';
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
else if (source === FlowSourceEnum.request) {
|
|
809
|
-
if (data === FlowRequestDataEnum.url) {
|
|
810
|
-
label = 'Request URL';
|
|
811
|
-
}
|
|
812
|
-
else if (data === FlowRequestDataEnum.headers) {
|
|
813
|
-
label = 'Request headers';
|
|
814
|
-
}
|
|
815
|
-
else if (data === FlowRequestDataEnum.body) {
|
|
816
|
-
label = 'Request body';
|
|
817
|
-
}
|
|
818
|
-
else if (data === FlowRequestDataEnum.method) {
|
|
819
|
-
label = 'Request method';
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (!label) {
|
|
823
|
-
return undefined;
|
|
824
|
-
}
|
|
825
|
-
return this.renderStepPill(label, assertionIndex, stepIndex);
|
|
826
|
-
}
|
|
827
|
-
renderReadValueStep(item, assertionIndex, stepIndex) {
|
|
828
|
-
return html `
|
|
829
|
-
<ui-text-field
|
|
830
|
-
name="value.${assertionIndex}.${stepIndex}"
|
|
831
|
-
data-assertion-index="${assertionIndex}"
|
|
832
|
-
data-step-index="${stepIndex}"
|
|
833
|
-
label="Read value"
|
|
834
|
-
required
|
|
835
|
-
.value="${live(item.path || '')}"
|
|
836
|
-
@change="${this.handleReadValueStepChange}"
|
|
837
|
-
></ui-text-field>
|
|
838
|
-
`;
|
|
839
|
-
}
|
|
840
|
-
renderRoundStep(item, assertionIndex, stepIndex) {
|
|
841
|
-
const pill = this.renderStepPill('Round', assertionIndex, stepIndex);
|
|
842
|
-
const { precision = 0 } = item;
|
|
843
|
-
return html `
|
|
844
|
-
${pill}
|
|
845
|
-
<ui-text-field
|
|
846
|
-
name="precision.${assertionIndex}.${stepIndex}"
|
|
847
|
-
data-assertion-index="${assertionIndex}"
|
|
848
|
-
data-step-index="${stepIndex}"
|
|
849
|
-
label="Precision"
|
|
850
|
-
required
|
|
851
|
-
.value="${live(String(precision))}"
|
|
852
|
-
@change="${this.handleRoundPrecisionChange}"
|
|
853
|
-
class="space-step-left number-input"
|
|
854
|
-
type="number"
|
|
855
|
-
min="0"
|
|
856
|
-
max="100"
|
|
857
|
-
step="1"
|
|
858
|
-
title="The number of digits to appear after the decimal point. Should be a value between 0 and 100, inclusive."
|
|
859
|
-
></ui-text-field>
|
|
860
|
-
`;
|
|
861
|
-
}
|
|
862
|
-
renderSubstringStep(item, assertionIndex, stepIndex) {
|
|
863
|
-
const pill = this.renderStepPill('Substring', assertionIndex, stepIndex);
|
|
864
|
-
const { start = 0, end } = item;
|
|
865
|
-
return html `
|
|
866
|
-
${pill}
|
|
867
|
-
<ui-text-field
|
|
868
|
-
name="start.${assertionIndex}.${stepIndex}"
|
|
869
|
-
data-assertion-index="${assertionIndex}"
|
|
870
|
-
data-step-index="${stepIndex}"
|
|
871
|
-
label="Start"
|
|
872
|
-
required
|
|
873
|
-
.value="${live(String(start))}"
|
|
874
|
-
@change="${this.handleSubstringStartChange}"
|
|
875
|
-
class="space-step-left number-input"
|
|
876
|
-
type="number"
|
|
877
|
-
step="1"
|
|
878
|
-
title="The index of the first character to include in the returned substring."
|
|
879
|
-
></ui-text-field>
|
|
880
|
-
|
|
881
|
-
<ui-text-field
|
|
882
|
-
name="end.${assertionIndex}.${stepIndex}"
|
|
883
|
-
data-assertion-index="${assertionIndex}"
|
|
884
|
-
data-step-index="${stepIndex}"
|
|
885
|
-
label="End"
|
|
886
|
-
.value="${live(end ? String(end) : '')}"
|
|
887
|
-
@change="${this.handleSubstringEndChange}"
|
|
888
|
-
class="space-step-left number-input"
|
|
889
|
-
type="number"
|
|
890
|
-
step="1"
|
|
891
|
-
title="The index of the first character to exclude from the returned substring."
|
|
892
|
-
></ui-text-field>
|
|
893
|
-
`;
|
|
894
|
-
}
|
|
895
|
-
renderEqualAssertion(item, assertionIndex, stepIndex) {
|
|
896
|
-
return html `
|
|
897
|
-
<ui-text-field
|
|
898
|
-
name="equal.${assertionIndex}.${stepIndex}"
|
|
899
|
-
data-assertion-index="${assertionIndex}"
|
|
900
|
-
data-step-index="${stepIndex}"
|
|
901
|
-
data-kind="${CoreAssertions.EqualAssertionKind}"
|
|
902
|
-
label="Equal to"
|
|
903
|
-
required
|
|
904
|
-
.value="${live(item.value || '')}"
|
|
905
|
-
@change="${this.handleEqualAssertionValueChange}"
|
|
906
|
-
>
|
|
907
|
-
<ui-icon-button
|
|
908
|
-
slot="suffix"
|
|
909
|
-
title="Remove assertion"
|
|
910
|
-
aria-label="Deletes this assertion"
|
|
911
|
-
@click="${this.handleRemoveStep}"
|
|
912
|
-
data-index="${assertionIndex}"
|
|
913
|
-
data-step-index="${stepIndex}"
|
|
914
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
915
|
-
</ui-text-field>
|
|
916
|
-
`;
|
|
917
|
-
}
|
|
918
|
-
renderNotEqualAssertion(item, assertionIndex, stepIndex) {
|
|
919
|
-
return html `
|
|
920
|
-
<ui-text-field
|
|
921
|
-
name="not-equal.${assertionIndex}.${stepIndex}"
|
|
922
|
-
data-assertion-index="${assertionIndex}"
|
|
923
|
-
data-step-index="${stepIndex}"
|
|
924
|
-
data-kind="${CoreAssertions.NotEqualAssertionKind}"
|
|
925
|
-
label="Not equal to"
|
|
926
|
-
required
|
|
927
|
-
.value="${live(item.value || '')}"
|
|
928
|
-
@change="${this.handleEqualAssertionValueChange}"
|
|
929
|
-
>
|
|
930
|
-
<ui-icon-button
|
|
931
|
-
slot="suffix"
|
|
932
|
-
title="Remove assertion"
|
|
933
|
-
aria-label="Deletes this assertion"
|
|
934
|
-
@click="${this.handleRemoveStep}"
|
|
935
|
-
data-index="${assertionIndex}"
|
|
936
|
-
data-step-index="${stepIndex}"
|
|
937
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
938
|
-
</ui-text-field>
|
|
939
|
-
`;
|
|
940
|
-
}
|
|
941
|
-
renderGreaterThanAssertion(item, assertionIndex, stepIndex) {
|
|
942
|
-
const { equal, value } = item;
|
|
943
|
-
const label = equal ? 'Greater than equal' : 'Greater than';
|
|
944
|
-
const effectiveValue = typeof value === 'number' ? String(value) : '';
|
|
945
|
-
return html `
|
|
946
|
-
<ui-text-field
|
|
947
|
-
name="value.${assertionIndex}.${stepIndex}"
|
|
948
|
-
data-assertion-index="${assertionIndex}"
|
|
949
|
-
data-step-index="${stepIndex}"
|
|
950
|
-
data-kind="${CoreAssertions.GreaterThanAssertionKind}"
|
|
951
|
-
data-variant="${equal ? 'equal' : ''}"
|
|
952
|
-
label="${label}"
|
|
953
|
-
required
|
|
954
|
-
.value="${live(effectiveValue)}"
|
|
955
|
-
@change="${this.handleGreaterThanAssertionValueChange}"
|
|
956
|
-
inputMode="numeric"
|
|
957
|
-
>
|
|
958
|
-
<ui-icon-button
|
|
959
|
-
slot="suffix"
|
|
960
|
-
title="Remove assertion"
|
|
961
|
-
aria-label="Deletes this assertion"
|
|
962
|
-
@click="${this.handleRemoveStep}"
|
|
963
|
-
data-index="${assertionIndex}"
|
|
964
|
-
data-step-index="${stepIndex}"
|
|
965
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
966
|
-
</ui-text-field>
|
|
967
|
-
`;
|
|
968
|
-
}
|
|
969
|
-
renderLessThanAssertion(item, assertionIndex, stepIndex) {
|
|
970
|
-
const { equal, value } = item;
|
|
971
|
-
const label = equal ? 'Less than equal' : 'Less than';
|
|
972
|
-
const effectiveValue = typeof value === 'number' ? String(value) : '';
|
|
973
|
-
return html `
|
|
974
|
-
<ui-text-field
|
|
975
|
-
name="value.${assertionIndex}.${stepIndex}"
|
|
976
|
-
data-assertion-index="${assertionIndex}"
|
|
977
|
-
data-step-index="${stepIndex}"
|
|
978
|
-
data-kind="${CoreAssertions.LessThanAssertionKind}"
|
|
979
|
-
data-variant="${equal ? 'equal' : ''}"
|
|
980
|
-
label="${label}"
|
|
981
|
-
required
|
|
982
|
-
.value="${live(effectiveValue)}"
|
|
983
|
-
@change="${this.handleLessThanAssertionValueChange}"
|
|
984
|
-
inputMode="numeric"
|
|
985
|
-
>
|
|
986
|
-
<ui-icon-button
|
|
987
|
-
slot="suffix"
|
|
988
|
-
title="Remove assertion"
|
|
989
|
-
aria-label="Deletes this assertion"
|
|
990
|
-
@click="${this.handleRemoveStep}"
|
|
991
|
-
data-index="${assertionIndex}"
|
|
992
|
-
data-step-index="${stepIndex}"
|
|
993
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
994
|
-
</ui-text-field>
|
|
995
|
-
`;
|
|
996
|
-
}
|
|
997
|
-
renderIncludesAssertion(item, assertionIndex, stepIndex) {
|
|
998
|
-
const { value } = item;
|
|
999
|
-
return html `
|
|
1000
|
-
<ui-text-field
|
|
1001
|
-
name="includes.${assertionIndex}.${stepIndex}"
|
|
1002
|
-
data-assertion-index="${assertionIndex}"
|
|
1003
|
-
data-step-index="${stepIndex}"
|
|
1004
|
-
data-kind="${CoreAssertions.IncludesAssertionKind}"
|
|
1005
|
-
label="Includes value"
|
|
1006
|
-
required
|
|
1007
|
-
.value="${live(value || '')}"
|
|
1008
|
-
@change="${this.handleIncludesAssertionValueChange}"
|
|
1009
|
-
>
|
|
1010
|
-
<ui-icon-button
|
|
1011
|
-
slot="suffix"
|
|
1012
|
-
title="Remove assertion"
|
|
1013
|
-
aria-label="Deletes this assertion"
|
|
1014
|
-
@click="${this.handleRemoveStep}"
|
|
1015
|
-
data-index="${assertionIndex}"
|
|
1016
|
-
data-step-index="${stepIndex}"
|
|
1017
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
1018
|
-
</ui-text-field>
|
|
1019
|
-
`;
|
|
1020
|
-
}
|
|
1021
|
-
renderNotIncludesAssertion(item, assertionIndex, stepIndex) {
|
|
1022
|
-
const { value } = item;
|
|
1023
|
-
return html `
|
|
1024
|
-
<ui-text-field
|
|
1025
|
-
name="not-includes.${assertionIndex}.${stepIndex}"
|
|
1026
|
-
data-assertion-index="${assertionIndex}"
|
|
1027
|
-
data-step-index="${stepIndex}"
|
|
1028
|
-
data-kind="${CoreAssertions.NotIncludesAssertionKind}"
|
|
1029
|
-
label="Not includes value"
|
|
1030
|
-
required
|
|
1031
|
-
.value="${live(value || '')}"
|
|
1032
|
-
@change="${this.handleIncludesAssertionValueChange}"
|
|
1033
|
-
>
|
|
1034
|
-
<ui-icon-button
|
|
1035
|
-
slot="suffix"
|
|
1036
|
-
title="Remove assertion"
|
|
1037
|
-
aria-label="Deletes this assertion"
|
|
1038
|
-
@click="${this.handleRemoveStep}"
|
|
1039
|
-
data-index="${assertionIndex}"
|
|
1040
|
-
data-step-index="${stepIndex}"
|
|
1041
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
1042
|
-
</ui-text-field>
|
|
1043
|
-
`;
|
|
1044
|
-
}
|
|
1045
|
-
renderMatchesAssertion(item, assertionIndex, stepIndex) {
|
|
1046
|
-
const { value } = item;
|
|
1047
|
-
return html `
|
|
1048
|
-
<ui-text-field
|
|
1049
|
-
name="matches.${assertionIndex}.${stepIndex}"
|
|
1050
|
-
data-assertion-index="${assertionIndex}"
|
|
1051
|
-
data-step-index="${stepIndex}"
|
|
1052
|
-
data-kind="${CoreAssertions.MatchesAssertionKind}"
|
|
1053
|
-
label="Matches regex"
|
|
1054
|
-
required
|
|
1055
|
-
.value="${live(value || '')}"
|
|
1056
|
-
@change="${this.handleMatchesAssertionValueChange}"
|
|
1057
|
-
@input="${this.validateRegexPattern}"
|
|
1058
|
-
invalidText="Pattern is invalid"
|
|
1059
|
-
>
|
|
1060
|
-
<ui-icon-button
|
|
1061
|
-
slot="suffix"
|
|
1062
|
-
title="Remove assertion"
|
|
1063
|
-
aria-label="Deletes this assertion"
|
|
1064
|
-
@click="${this.handleRemoveStep}"
|
|
1065
|
-
data-index="${assertionIndex}"
|
|
1066
|
-
data-step-index="${stepIndex}"
|
|
1067
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
1068
|
-
</ui-text-field>
|
|
1069
|
-
`;
|
|
1070
|
-
}
|
|
1071
|
-
renderToBeAssertion(item, assertionIndex, stepIndex) {
|
|
1072
|
-
const { value } = item;
|
|
1073
|
-
const types = Object.values(CoreAssertions.ToBeTypes);
|
|
1074
|
-
return html `
|
|
1075
|
-
<ui-text-field
|
|
1076
|
-
name="to-be.${assertionIndex}.${stepIndex}"
|
|
1077
|
-
data-assertion-index="${assertionIndex}"
|
|
1078
|
-
data-step-index="${stepIndex}"
|
|
1079
|
-
data-kind="${CoreAssertions.ToBeAssertionKind}"
|
|
1080
|
-
label="To be..."
|
|
1081
|
-
required
|
|
1082
|
-
.value="${live(value || '')}"
|
|
1083
|
-
@change="${this.handleMatchesAssertionValueChange}"
|
|
1084
|
-
.list="${types}"
|
|
1085
|
-
>
|
|
1086
|
-
<ui-icon-button
|
|
1087
|
-
slot="suffix"
|
|
1088
|
-
title="Remove assertion"
|
|
1089
|
-
aria-label="Deletes this assertion"
|
|
1090
|
-
@click="${this.handleRemoveStep}"
|
|
1091
|
-
data-index="${assertionIndex}"
|
|
1092
|
-
data-step-index="${stepIndex}"
|
|
1093
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
1094
|
-
</ui-text-field>
|
|
1095
|
-
`;
|
|
1096
|
-
}
|
|
1097
|
-
renderNotToBeAssertion(item, assertionIndex, stepIndex) {
|
|
1098
|
-
const { value } = item;
|
|
1099
|
-
const types = Object.values(CoreAssertions.ToBeTypes);
|
|
1100
|
-
return html `
|
|
1101
|
-
<ui-text-field
|
|
1102
|
-
name="not-to-be.${assertionIndex}.${stepIndex}"
|
|
1103
|
-
data-assertion-index="${assertionIndex}"
|
|
1104
|
-
data-step-index="${stepIndex}"
|
|
1105
|
-
data-kind="${CoreAssertions.NotToBeAssertionKind}"
|
|
1106
|
-
label="Not to be..."
|
|
1107
|
-
required
|
|
1108
|
-
.value="${live(value || '')}"
|
|
1109
|
-
@change="${this.handleMatchesAssertionValueChange}"
|
|
1110
|
-
.list="${types}"
|
|
1111
|
-
>
|
|
1112
|
-
<ui-icon-button
|
|
1113
|
-
slot="suffix"
|
|
1114
|
-
title="Remove assertion"
|
|
1115
|
-
aria-label="Deletes this assertion"
|
|
1116
|
-
@click="${this.handleRemoveStep}"
|
|
1117
|
-
data-index="${assertionIndex}"
|
|
1118
|
-
data-step-index="${stepIndex}"
|
|
1119
|
-
><ui-icon icon="close" role="presentation"></ui-icon></ui-icon-button>
|
|
1120
|
-
</ui-text-field>
|
|
1121
|
-
`;
|
|
1122
|
-
}
|
|
1123
|
-
renderRenameAssertionDialog() {
|
|
1124
|
-
return html `
|
|
1125
|
-
<ui-dialog modal class="rename-dialog" @close="${this.handleRenameDialogResult}">
|
|
1126
|
-
<ui-icon slot="icon" icon="rename"></ui-icon>
|
|
1127
|
-
<span slot="title">Rename assertion</span>
|
|
1128
|
-
|
|
1129
|
-
<ui-text-field
|
|
1130
|
-
name="rename"
|
|
1131
|
-
label="Assertion description"
|
|
1132
|
-
required
|
|
1133
|
-
></ui-text-field>
|
|
1134
|
-
|
|
1135
|
-
<ui-button slot="button" value="dismiss" type="text">Cancel</ui-button>
|
|
1136
|
-
<ui-button slot="button" value="confirm" type="text">Accept</ui-button>
|
|
1137
|
-
</ui-dialog>
|
|
1138
|
-
`;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
__decorate([
|
|
1142
|
-
property({ type: Array })
|
|
1143
|
-
], HttpAssertions.prototype, "model", void 0);
|
|
1144
|
-
//# sourceMappingURL=HttpAssertions.js.map
|