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

@availity/native-form

Package Overview
Dependencies
Maintainers
12
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.8.2 to 2.8.3

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.8.3](https://github.com/Availity/sdk-js/compare/@availity/native-form@2.8.2...@availity/native-form@2.8.3) (2019-09-27)
**Note:** Version bump only for package @availity/native-form
## [2.8.2](https://github.com/Availity/sdk-js/compare/@availity/native-form@2.8.1...@availity/native-form@2.8.2) (2019-02-20)

@@ -8,0 +16,0 @@

14

index.js

@@ -13,10 +13,8 @@ import flattenObject from './flattenObject';

) => {
const mergedOptions = Object.assign(
{
method: 'post',
action: `/ms/api/availity/internal/spc/magneto/sso/v1/${type}/${spaceId}`,
target: '_blank',
},
formAttributes
);
const mergedOptions = {
method: 'post',
action: `/ms/api/availity/internal/spc/magneto/sso/v1/${type}/${spaceId}`,
target: '_blank',
...formAttributes,
};
const form = document.createElement('form');

@@ -23,0 +21,0 @@ Object.keys(mergedOptions).forEach(key => {

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

@@ -20,3 +20,3 @@ "main": "index.js",

},
"gitHead": "8af17c98df2fc4e3bf0b9d73ebc50f1a9c0fd1d9"
"gitHead": "861ec87ed21a02680c7bf4ff616a2bb3e8dea906"
}
# native form
> Submit JSON data via a native form, not AJAX. Useful when you need to open a new page with a POST action.
[![Version](https://img.shields.io/npm/v/@availity/native-form.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/native-form)
## Install

@@ -10,26 +13,2 @@

## Usage
```js
nativeForm(spaceId[, params[, formAttributes][, type]]);
```
### Required params
- spaceId: String
### Optional params
- 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/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"
###
```js
import nativeForm from '@availity/native-form';
nativeForm('12312312312', {myExtraParam: 'myExtraParamValue'}, {target: '_top'});
```
When `nativeForm` is called it wil create a native HTML form and submit it.
## [Documentation](https://availity.github.io/sdk-js/features/native-form)
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