Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@availity/native-form

Package Overview
Dependencies
Maintainers
7
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/native-form - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

5

index.js

@@ -10,3 +10,4 @@ import flattenObject from './flattenObject';

params = {},
formAttributes = {}
formAttributes = {},
type = 'saml'
) => {

@@ -16,3 +17,3 @@ const mergedOptions = Object.assign(

method: 'post',
action: `/ms/api/availity/internal/spaces/magneto/sso/v1/saml/${spaceId}`,
action: `/ms/api/availity/internal/spc/magneto/sso/v1/${type}/${spaceId}`,
target: '_blank',

@@ -19,0 +20,0 @@ },

2

package.json
{
"name": "@availity/native-form",
"version": "2.5.0",
"version": "2.6.0",
"description": "Submit JSON data via a native form, not AJAX. Useful when you need to open a new page with a POST action.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,3 +13,3 @@ # native form

```js
nativeForm(spaceId[, params[, formAttributes]]);
nativeForm(spaceId[, params[, formAttributes][, type]]);
```

@@ -24,3 +24,4 @@

- params: Object. Additional parameters you want sent in the post.
- formAttributes: Object. Set/override the form attributes like `target`, `method`, and `action`. `method` defaults to "post", `action` will default to "\`/ms/api/availity/internal/spaces/magneto/sso/v1/saml/${spaceId}\`", and `target` will default to "_blank". Additional attributes can be defined and should be valid on an HTML form element.
- formAttributes: Object. Set/override the form attributes like `target`, `method`, and `action`. `method` defaults to "post", `action` will default to "\`/ms/api/availity/internal/spc/magneto/sso/v1/saml/${spaceId}\`", and `target` will default to "_blank". Additional attributes can be defined and should be valid on an HTML form element.
- type: String. Override the magneto integration type. Defaults to "saml"

@@ -35,2 +36,2 @@ ###

When `nativeForm` is called it wil create a native HTML form and submit it.
When `nativeForm` is called it wil create a native HTML form and submit it.

@@ -72,3 +72,3 @@ import nativeForm from '../';

expect(document.querySelector('form').getAttribute('action')).toBe(
'/ms/api/availity/internal/spaces/magneto/sso/v1/saml/spaceId123'
'/ms/api/availity/internal/spc/magneto/sso/v1/saml/spaceId123'
);

@@ -84,2 +84,9 @@ });

test('action magneto integration type should be overridable', () => {
nativeForm('spaceId123', {}, {}, 'openid');
expect(document.querySelector('form').getAttribute('action')).toBe(
'/ms/api/availity/internal/spc/magneto/sso/v1/openid/spaceId123'
);
});
test('method should be post by default', () => {

@@ -86,0 +93,0 @@ nativeForm('spaceId');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc