client_side_validations-simple_form 18.0.0 → 19.0.0
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 662fef6ec361706a1b503c70d3e05b070fe04ce1e22be8f5484c8acdde51174f
|
|
4
|
+
data.tar.gz: b1928166b3647f0148e4e1756b4ac5098c4a8bcc3e03e449d07929447735a14b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac910ea4f4b494125948129d0559445f125b5f5ed2d226f1cf6158c7693d1718a1c2ffe80d326616e45c86f36bb789b938b3d916ff8ae3ef62189d33d7b80514
|
|
7
|
+
data.tar.gz: 45320bd2eaa7d6ac414bc7d6c5bec419019315a9ada203d615cfdcc6628f404df7ed7e1adb1f9e531997442277d2a6657776b0e7568dd213b856a349b06b2b40
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 19.0.0 / 2026-07-05
|
|
4
|
+
|
|
5
|
+
* [FEATURE] Breaking change: Replace Rollup with Rolldown v1 for bundling (10–30× faster builds)
|
|
6
|
+
* [FEATURE] Breaking change: Replace ESLint + neostandard with Oxlint v1 for linting (50–100× faster)
|
|
7
|
+
* [FEATURE] Breaking change: Drop Babel — transpilation handled by Rolldown's built-in Oxc transforms (minimum browser targets are unchanged: Chrome 60+, Firefox 60+, iOS 12+, Safari 12+)
|
|
8
|
+
* [FEATURE] Breaking change: Drop CSV < 25 compatibility
|
|
9
|
+
* [ENHANCEMENT] Remove 9 unused npm devDependencies (smaller install footprint)
|
|
10
|
+
|
|
3
11
|
## 18.0.0 / 2026-04-19
|
|
4
12
|
|
|
5
13
|
* [FEATURE] Breaking change: Align the Simple Form JavaScript hooks with the DOM-first `ClientSideValidations` runtime
|
data/README.md
CHANGED
|
@@ -46,10 +46,10 @@ pack:
|
|
|
46
46
|
|
|
47
47
|
```js
|
|
48
48
|
// No framework / Generic frameworks / Bootstrap 3 with `import` syntax
|
|
49
|
-
import '@client-side-validations/simple-form
|
|
49
|
+
import '@client-side-validations/simple-form'
|
|
50
50
|
|
|
51
51
|
// Bootstrap 4+ with `import` syntax
|
|
52
|
-
import '@client-side-validations/simple-form/
|
|
52
|
+
import '@client-side-validations/simple-form/dist/simple-form.bootstrap4.esm'
|
|
53
53
|
|
|
54
54
|
// No framework / Generic frameworks / Bootstrap 3 with `require` syntax
|
|
55
55
|
require('@client-side-validations/simple-form')
|
|
@@ -1,67 +1,77 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Client Side Validations Simple Form JS (Bootstrap 4+) -
|
|
2
|
+
* Client Side Validations Simple Form JS (Bootstrap 4+) - v19.0.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
|
|
3
3
|
* Copyright (c) 2026 Geremia Taglialatela, Brian Cardarella
|
|
4
4
|
* Licensed under MIT (https://opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
(function (global, factory)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
6
|
+
(function(global, factory) {
|
|
7
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(require("@client-side-validations/client-side-validations")) : typeof define === "function" && define.amd ? define(["@client-side-validations/client-side-validations"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.ClientSideValidations));
|
|
8
|
+
})(this, function(_client_side_validations_client_side_validations) {
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
//#endregion
|
|
31
|
+
_client_side_validations_client_side_validations = __toESM(_client_side_validations_client_side_validations);
|
|
32
|
+
//#region src/utils.js
|
|
33
|
+
const addClass = (element, customClass) => {
|
|
34
|
+
if (customClass) element.classList.add(...customClass.split(" "));
|
|
35
|
+
};
|
|
36
|
+
const removeClass = (element, customClass) => {
|
|
37
|
+
if (customClass) element.classList.remove(...customClass.split(" "));
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/index.bootstrap4.js
|
|
41
|
+
_client_side_validations_client_side_validations.default.formBuilders["SimpleForm::FormBuilder"] = {
|
|
42
|
+
add: function(element, settings, message) {
|
|
43
|
+
this.wrapper(settings.wrapper).add.call(this, element, settings, message);
|
|
44
|
+
},
|
|
45
|
+
remove: function(element, settings) {
|
|
46
|
+
this.wrapper(settings.wrapper).remove.call(this, element, settings);
|
|
47
|
+
},
|
|
48
|
+
wrapper: function(name) {
|
|
49
|
+
return this.wrappers[name] || this.wrappers.default;
|
|
50
|
+
},
|
|
51
|
+
wrappers: { default: {
|
|
52
|
+
add(element, settings, message) {
|
|
53
|
+
const wrapperElement = element.parentElement;
|
|
54
|
+
let errorElement = wrapperElement.querySelector(`${settings.error_tag}.invalid-feedback`);
|
|
55
|
+
if (!errorElement) {
|
|
56
|
+
const formTextElement = wrapperElement.querySelector(".form-text");
|
|
57
|
+
errorElement = document.createElement(settings.error_tag);
|
|
58
|
+
addClass(errorElement, "invalid-feedback");
|
|
59
|
+
errorElement.textContent = message;
|
|
60
|
+
if (formTextElement) formTextElement.before(errorElement);
|
|
61
|
+
else wrapperElement.appendChild(errorElement);
|
|
62
|
+
}
|
|
63
|
+
addClass(wrapperElement, settings.wrapper_error_class);
|
|
64
|
+
addClass(element, "is-invalid");
|
|
65
|
+
errorElement.textContent = message;
|
|
66
|
+
},
|
|
67
|
+
remove(element, settings) {
|
|
68
|
+
const wrapperElement = element.parentElement;
|
|
69
|
+
const errorElement = wrapperElement.querySelector(`${settings.error_tag}.invalid-feedback`);
|
|
70
|
+
removeClass(wrapperElement, settings.wrapper_error_class);
|
|
71
|
+
removeClass(element, "is-invalid");
|
|
72
|
+
if (errorElement) errorElement.remove();
|
|
73
|
+
}
|
|
74
|
+
} }
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
});
|
|
@@ -1,60 +1,73 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Client Side Validations Simple Form JS (Default) -
|
|
2
|
+
* Client Side Validations Simple Form JS (Default) - v19.0.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
|
|
3
3
|
* Copyright (c) 2026 Geremia Taglialatela, Brian Cardarella
|
|
4
4
|
* Licensed under MIT (https://opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
(function (global, factory)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
6
|
+
(function(global, factory) {
|
|
7
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(require("@client-side-validations/client-side-validations")) : typeof define === "function" && define.amd ? define(["@client-side-validations/client-side-validations"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.ClientSideValidations));
|
|
8
|
+
})(this, function(_client_side_validations_client_side_validations) {
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
//#endregion
|
|
31
|
+
_client_side_validations_client_side_validations = __toESM(_client_side_validations_client_side_validations);
|
|
32
|
+
//#region src/utils.js
|
|
33
|
+
const addClass = (element, customClass) => {
|
|
34
|
+
if (customClass) element.classList.add(...customClass.split(" "));
|
|
35
|
+
};
|
|
36
|
+
const removeClass = (element, customClass) => {
|
|
37
|
+
if (customClass) element.classList.remove(...customClass.split(" "));
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/index.js
|
|
41
|
+
_client_side_validations_client_side_validations.default.formBuilders["SimpleForm::FormBuilder"] = {
|
|
42
|
+
add: function(element, settings, message) {
|
|
43
|
+
this.wrapper(settings.wrapper).add.call(this, element, settings, message);
|
|
44
|
+
},
|
|
45
|
+
remove: function(element, settings) {
|
|
46
|
+
this.wrapper(settings.wrapper).remove.call(this, element, settings);
|
|
47
|
+
},
|
|
48
|
+
wrapper: function(name) {
|
|
49
|
+
return this.wrappers[name] || this.wrappers.default;
|
|
50
|
+
},
|
|
51
|
+
wrappers: { default: {
|
|
52
|
+
add(element, settings, message) {
|
|
53
|
+
const wrapperElement = element.closest(`${settings.wrapper_tag}.${settings.wrapper_class.replace(/ /g, ".")}`);
|
|
54
|
+
let errorElement = wrapperElement.querySelector(`${settings.error_tag}.${settings.error_class.replace(/ /g, ".")}`);
|
|
55
|
+
if (!errorElement) {
|
|
56
|
+
errorElement = document.createElement(settings.error_tag);
|
|
57
|
+
addClass(errorElement, settings.error_class);
|
|
58
|
+
errorElement.textContent = message;
|
|
59
|
+
wrapperElement.appendChild(errorElement);
|
|
60
|
+
}
|
|
61
|
+
addClass(wrapperElement, settings.wrapper_error_class);
|
|
62
|
+
errorElement.textContent = message;
|
|
63
|
+
},
|
|
64
|
+
remove(element, settings) {
|
|
65
|
+
const wrapperElement = element.closest(`${settings.wrapper_tag}.${settings.wrapper_class.replace(/ /g, ".")}`);
|
|
66
|
+
const errorElement = wrapperElement.querySelector(`${settings.error_tag}.${settings.error_class.replace(/ /g, ".")}`);
|
|
67
|
+
removeClass(wrapperElement, settings.wrapper_error_class);
|
|
68
|
+
if (errorElement) errorElement.remove();
|
|
69
|
+
}
|
|
70
|
+
} }
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
});
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: client_side_validations-simple_form
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 19.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geremia Taglialatela
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '25.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '25.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: simple_form
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
79
|
version: '0'
|
|
80
80
|
requirements: []
|
|
81
|
-
rubygems_version: 4.0.
|
|
81
|
+
rubygems_version: 4.0.14
|
|
82
82
|
specification_version: 4
|
|
83
83
|
summary: ClientSideValidations SimpleForm
|
|
84
84
|
test_files: []
|