🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@form-validation/plugin-bulma

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@form-validation/plugin-bulma - npm Package Compare versions

Comparing version
2.0.2
to
2.1.0
+83
lib/esm/index.js
import { utils } from '../core/index.js';
import { Framework } from '../plugin-framework/index.js';
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
/**
* FormValidation (https://formvalidation.io)
* The best validation library for JavaScript
* (c) 2013 - 2023 Nguyen Huu Phuoc <me@phuoc.ng>
*/
var classSet = utils.classSet;
var Bulma = /** @class */ (function (_super) {
__extends(Bulma, _super);
function Bulma(opts) {
// See http://bulma.io/documentation/elements/form/
return _super.call(this, Object.assign({}, {
formClass: 'fv-plugins-bulma',
messageClass: 'help is-danger',
rowInvalidClass: 'fv-has-error',
rowPattern: /^.*field.*$/,
rowSelector: '.field',
rowValidClass: 'fv-has-success',
}, opts)) || this;
}
Bulma.prototype.onIconPlaced = function (e) {
classSet(e.iconElement, {
'fv-plugins-icon': false,
});
// Wrap the icon inside a <span class="icon is-small is-right">
var span = document.createElement('span');
span.setAttribute('class', 'icon is-small is-right');
e.iconElement.parentNode.insertBefore(span, e.iconElement);
span.appendChild(e.iconElement);
var type = e.element.getAttribute('type');
var parent = e.element.parentElement;
if ('checkbox' === type || 'radio' === type) {
classSet(parent.parentElement, {
'has-icons-right': true,
});
classSet(span, {
'fv-plugins-icon-check': true,
});
parent.parentElement.insertBefore(span, parent.nextSibling);
}
else {
classSet(parent, {
'has-icons-right': true,
});
}
};
return Bulma;
}(Framework));
export { Bulma };
/**
* FormValidation (https://formvalidation.io)
* The best validation library for JavaScript
* (c) 2013 - 2023 Nguyen Huu Phuoc <me@phuoc.ng>
*
* @license https://formvalidation.io/license
* @package @form-validation/plugin-bulma
* @version 2.1.0
*/
import{utils as e}from"../core/index.min.js";import{Framework as t}from"../plugin-framework/index.min.js";var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};var r=e.classSet,o=function(e){function t(t){return e.call(this,Object.assign({},{formClass:"fv-plugins-bulma",messageClass:"help is-danger",rowInvalidClass:"fv-has-error",rowPattern:/^.*field.*$/,rowSelector:".field",rowValidClass:"fv-has-success"},t))||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.onIconPlaced=function(e){r(e.iconElement,{"fv-plugins-icon":!1});var t=document.createElement("span");t.setAttribute("class","icon is-small is-right"),e.iconElement.parentNode.insertBefore(t,e.iconElement),t.appendChild(e.iconElement);var n=e.element.getAttribute("type"),o=e.element.parentElement;"checkbox"===n||"radio"===n?(r(o.parentElement,{"has-icons-right":!0}),r(t,{"fv-plugins-icon-check":!0}),o.parentElement.insertBefore(t,o.nextSibling)):r(o,{"has-icons-right":!0})},t}(t);export{o as Bulma};
+1
-1

@@ -8,5 +8,5 @@ /**

* @package @form-validation/plugin-bulma
* @version 2.0.2
* @version 2.1.0
*/
define(["exports","@form-validation/core","@form-validation/plugin-framework"],(function(e,t,n){"use strict";var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};var r=t.utils.classSet,i=function(e){function t(t){return e.call(this,Object.assign({},{formClass:"fv-plugins-bulma",messageClass:"help is-danger",rowInvalidClass:"fv-has-error",rowPattern:/^.*field.*$/,rowSelector:".field",rowValidClass:"fv-has-success"},t))||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onIconPlaced=function(e){r(e.iconElement,{"fv-plugins-icon":!1});var t=document.createElement("span");t.setAttribute("class","icon is-small is-right"),e.iconElement.parentNode.insertBefore(t,e.iconElement),t.appendChild(e.iconElement);var n=e.element.getAttribute("type"),o=e.element.parentElement;"checkbox"===n||"radio"===n?(r(o.parentElement,{"has-icons-right":!0}),r(t,{"fv-plugins-icon-check":!0}),o.parentElement.insertBefore(t,o.nextSibling)):r(o,{"has-icons-right":!0})},t}(n.Framework);e.Bulma=i}));

@@ -8,5 +8,5 @@ /**

* @package @form-validation/plugin-bulma
* @version 2.0.2
* @version 2.1.0
*/
"use strict";var e=require("@form-validation/core"),t=require("@form-validation/plugin-framework"),n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};var r=e.utils.classSet,o=function(e){function t(t){return e.call(this,Object.assign({},{formClass:"fv-plugins-bulma",messageClass:"help is-danger",rowInvalidClass:"fv-has-error",rowPattern:/^.*field.*$/,rowSelector:".field",rowValidClass:"fv-has-success"},t))||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.onIconPlaced=function(e){r(e.iconElement,{"fv-plugins-icon":!1});var t=document.createElement("span");t.setAttribute("class","icon is-small is-right"),e.iconElement.parentNode.insertBefore(t,e.iconElement),t.appendChild(e.iconElement);var n=e.element.getAttribute("type"),o=e.element.parentElement;"checkbox"===n||"radio"===n?(r(o.parentElement,{"has-icons-right":!0}),r(t,{"fv-plugins-icon-check":!0}),o.parentElement.insertBefore(t,o.nextSibling)):r(o,{"has-icons-right":!0})},t}(t.Framework);exports.Bulma=o;

@@ -8,5 +8,5 @@ /**

* @package @form-validation/plugin-bulma
* @version 2.0.2
* @version 2.1.0
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@form-validation/core"),require("@form-validation/plugin-framework")):"function"==typeof define&&define.amd?define(["@form-validation/core","@form-validation/plugin-framework"],t):((e="undefined"!=typeof globalThis?globalThis:e||self).FormValidation=e.FormValidation||{},e.FormValidation.plugins=e.FormValidation.plugins||{},e.FormValidation.plugins.Bulma=t(e.FormValidation,e.FormValidation.plugins))}(this,(function(e,t){"use strict";var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};var o=e.utils.classSet;return function(e){function t(t){return e.call(this,Object.assign({},{formClass:"fv-plugins-bulma",messageClass:"help is-danger",rowInvalidClass:"fv-has-error",rowPattern:/^.*field.*$/,rowSelector:".field",rowValidClass:"fv-has-success"},t))||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(t,e),t.prototype.onIconPlaced=function(e){o(e.iconElement,{"fv-plugins-icon":!1});var t=document.createElement("span");t.setAttribute("class","icon is-small is-right"),e.iconElement.parentNode.insertBefore(t,e.iconElement),t.appendChild(e.iconElement);var n=e.element.getAttribute("type"),i=e.element.parentElement;"checkbox"===n||"radio"===n?(o(i.parentElement,{"has-icons-right":!0}),o(t,{"fv-plugins-icon-check":!0}),i.parentElement.insertBefore(t,i.nextSibling)):o(i,{"has-icons-right":!0})},t}(t.Framework)}));
{
"name": "@form-validation/plugin-bulma",
"version": "2.0.2",
"version": "2.1.0",
"description": "The best validation library for JavaScript",

@@ -21,2 +21,3 @@ "license": "https://formvalidation.io/license",

"lib/cjs/*.*",
"lib/esm/*.*",
"lib/styles/*.*",

@@ -31,5 +32,5 @@ "lib/umd/*.*",

"dependencies": {
"@form-validation/core": "2.0.2",
"@form-validation/plugin-framework": "2.0.2",
"@form-validation/plugin-icon": "2.0.2"
"@form-validation/core": "2.1.0",
"@form-validation/plugin-framework": "2.1.0",
"@form-validation/plugin-icon": "2.1.0"
},

@@ -36,0 +37,0 @@ "scripts": {