Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9fe806

Browse files
committed
chore: cl, version, build
1 parentac4675e commita9fe806

14 files changed

+208
-149
lines changed

‎CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
[//]:#(Don't use <tags>)
22

3+
##v1.12.11
4+
5+
>`2025-07-17`
6+
7+
###🎉 Feature
8+
- Added`ht`,`so`,`vi` locales (thanks@giovramirez 🙏)
9+
10+
###🐞 Bug Fixes
11+
- Be able to localize custom rule messages
12+
-`gt`,`gte`,`lt`,`lte` rules that point to another elemegit pount should take into account numeric types#466
13+
314
##v1.12.10
415

516
>`2025-06-09`

‎dist/bootstrap.mjs

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

‎dist/bootstrap.vue2.mjs

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

‎dist/core.mjs

Lines changed: 68 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vueform v1.12.10 (https://github.com/vueform/vueform)
2+
* Vueform v1.12.11 (https://github.com/vueform/vueform)
33
* Copyright (c) 2025 Adam Berecz <adam@vueform.com>
44
* Licensed under the MIT License
55
*/
@@ -9383,6 +9383,14 @@ function trim(string, chars, guard) {
93839383

93849384
var trim_1 = trim;
93859385

9386+
function localize(object, $config, form$) {
9387+
var locale = form$.locale$ || $config.i18n.locale;
9388+
if (!locale) {
9389+
return object;
9390+
}
9391+
return object && typeof object === 'object' ? (object === null || object === void 0 ? void 0 : object[locale]) || (object === null || object === void 0 ? void 0 : object[locale.toUpperCase()]) || (object === null || object === void 0 ? void 0 : object[$config.i18n.fallbackLocale]) || (object === null || object === void 0 ? void 0 : object[$config.i18n.fallbackLocale.toUpperCase()]) || (object === null || object === void 0 ? void 0 : object[Object.keys(object)[0]]) || '' : object;
9392+
}
9393+
93869394
var Validator = class {
93879395
constructor(rule, props) {
93889396
var _props$element$;
@@ -9392,6 +9400,7 @@ var Validator = class {
93929400
this.dependents = rule.dependents || [];
93939401
this.element$ = props.element$;
93949402
this.form$ = ((_props$element$ = props.element$) === null || _props$element$ === void 0 ? void 0 : _props$element$.form$) || {};
9403+
this.config$ = props.config$;
93959404
this.numeric = props.numeric || false;
93969405
this.elementMessages = props.element$.messages;
93979406
this.invalid = false;
@@ -9448,9 +9457,9 @@ var Validator = class {
94489457
if (this.msg) {
94499458
message = this.msg;
94509459
} else if (this.elementMessages[this.name]) {
9451-
message = this.elementMessages[this.name];
9460+
message =localize(this.elementMessages[this.name], this.config$.value, this.form$);
94529461
} else if (this.form$.options.messages[this.name]) {
9453-
message = this.form$.options.messages[this.name];
9462+
message =localize(this.form$.options.messages[this.name], this.config$.value, this.form$);
94549463
} else if (this.name !== '_class' && ((_this$form$$translati = this.form$.translations.validation) === null || _this$form$$translati === void 0 ? void 0 : _this$form$$translati[this.name]) !== undefined) {
94559464
message = this.form$.translations.validation[this.name];
94569465
if (isPlainObject_1(message)) {
@@ -9625,8 +9634,15 @@ var Validator = class {
96259634
});
96269635
});
96279636
}
9628-
size(value) {
9629-
if (this.isNumeric) {
9637+
isOtherNumeric(other$) {
9638+
return some_1(other$.Validators, {
9639+
name: 'numeric'
9640+
}) || some_1(other$.Validators, {
9641+
name: 'integer'
9642+
});
9643+
}
9644+
size(value, other$) {
9645+
if (other$ && this.isOtherNumeric(other$) || !other$ && this.isNumeric) {
96309646
if (!isNaN(value)) {
96319647
var num = parseFloat(value);
96329648
if (Number.isInteger(num)) {
@@ -10146,7 +10162,7 @@ function shouldApplyPlugin (name, plugin) {
1014610162
}
1014710163

1014810164
var name = "@vueform/vueform";
10149-
var version$1 = "1.12.10";
10165+
var version$1 = "1.12.11";
1015010166
var description = "Open-Source Form Framework for Vue";
1015110167
var homepage = "https://vueform.com";
1015210168
var license = "MIT";
@@ -10847,9 +10863,10 @@ function compare (actual, operator, expected, el$, form$) {
1084710863
}
1084810864

1084910865
var Factory = class {
10850-
constructor(path, form$) {
10866+
constructor(path, form$, config$) {
1085110867
this.form$ = form$;
1085210868
this.element$ = form$.el$(path);
10869+
this.config$ = config$;
1085310870
}
1085410871
get rules() {
1085510872
var rules = Object.assign({}, this.form$.$vueform.services.validation.rules, this.form$.$vueform.rules);
@@ -10876,7 +10893,8 @@ var Factory = class {
1087610893
name: "custom_rule_".concat(Math.floor(Math.random() * 9000000) + 1000000),
1087710894
attributes: Array.isArray(rule) && rule[1] ? rule[1] : []
1087810895
}, {
10879-
element$: this.element$
10896+
element$: this.element$,
10897+
config$: this.config$
1088010898
});
1088110899
}
1088210900
parseRules(rules) {
@@ -12895,9 +12913,13 @@ class filled extends Validator {
1289512913

1289612914
class gt extends Validator {
1289712915
get messageParams() {
12916+
var value = this.other$.value != null ? this.size(this.other$.value, this.other$) : 0;
12917+
if (isNaN(value) || value < 0) {
12918+
value = 0;
12919+
}
1289812920
return {
1289912921
attribute: this.attributeName,
12900-
value: this.other$.value != null ? this.size(this.other$.value) : 0
12922+
value
1290112923
};
1290212924
}
1290312925
get otherPath() {
@@ -12914,14 +12936,14 @@ class gt extends Validator {
1291412936
return this.compare(value, otherValue);
1291512937
}
1291612938
compare(value, otherValue) {
12917-
var otherSize = this.size(otherValue);
12939+
var otherSize = this.size(otherValue, this.other$);
1291812940
return otherSize == 0 || this.size(value) > otherSize;
1291912941
}
1292012942
}
1292112943

1292212944
class gte extends gt {
1292312945
compare(value, otherValue) {
12924-
var otherSize = this.size(otherValue);
12946+
var otherSize = this.size(otherValue, this.other$);
1292512947
return otherSize == 0 || this.size(value) >= otherSize;
1292612948
}
1292712949
}
@@ -13025,15 +13047,15 @@ class json extends Validator {
1302513047
class lt extends gt {
1302613048
compare(value, otherValue) {
1302713049
var size = this.size(value);
13028-
var otherSize = this.size(otherValue);
13050+
var otherSize = this.size(otherValue, this.other$);
1302913051
return otherSize == 0 && size == 0 || this.size(value) < otherSize;
1303013052
}
1303113053
}
1303213054

1303313055
class lte extends gt {
1303413056
compare(value, otherValue) {
1303513057
var size = this.size(value);
13036-
var otherSize = this.size(otherValue);
13058+
var otherSize = this.size(otherValue, this.other$);
1303713059
return otherSize == 0 && size == 0 || this.size(value) <= otherSize;
1303813060
}
1303913061
}
@@ -13921,7 +13943,7 @@ class Columns {
1392113943
}
1392213944
}
1392313945

13924-
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
13946+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
1392513947

1392613948
const {
1392713949
entries,
@@ -13981,6 +14003,9 @@ const typeErrorCreate = unconstruct(TypeError);
1398114003
*/
1398214004
function unapply(func) {
1398314005
return function (thisArg) {
14006+
if (thisArg instanceof RegExp) {
14007+
thisArg.lastIndex = 0;
14008+
}
1398414009
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1398514010
args[_key - 1] = arguments[_key];
1398614011
}
@@ -14122,7 +14147,7 @@ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
1412214147
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
1412314148
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
1412414149
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
14125-
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
14150+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
1412614151
);
1412714152
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
1412814153
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
@@ -14219,7 +14244,7 @@ const _createHooksMap = function _createHooksMap() {
1421914244
function createDOMPurify() {
1422014245
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
1422114246
const DOMPurify = root => createDOMPurify(root);
14222-
DOMPurify.version = '3.2.4';
14247+
DOMPurify.version = '3.2.6';
1422314248
DOMPurify.removed = [];
1422414249
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
1422514250
// Not running in a browser, provide a factory function
@@ -14458,8 +14483,8 @@ function createDOMPurify() {
1445814483
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone$2(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
1445914484
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone$2(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
1446014485
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
14461-
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) :{};
14462-
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) :{};
14486+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) :clone$2({});
14487+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) :clone$2({});
1446314488
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
1446414489
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
1446514490
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
@@ -14824,7 +14849,7 @@ function createDOMPurify() {
1482414849
allowedTags: ALLOWED_TAGS
1482514850
});
1482614851
/* Detect mXSS attempts abusing namespace confusion */
14827-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
14852+
if (SAFE_FOR_XML &&currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
1482814853
_forceRemove(currentNode);
1482914854
return true;
1483014855
}
@@ -14976,7 +15001,8 @@ function createDOMPurify() {
1497615001
value: attrValue
1497715002
} = attr;
1497815003
const lcName = transformCaseFunc(name);
14979-
let value = name === 'value' ? attrValue : stringTrim(attrValue);
15004+
const initValue = attrValue;
15005+
let value = name === 'value' ? initValue : stringTrim(initValue);
1498015006
/* Execute a hook if present */
1498115007
hookEvent.attrName = lcName;
1498215008
hookEvent.attrValue = value;
@@ -15002,10 +15028,9 @@ function createDOMPurify() {
1500215028
if (hookEvent.forceKeepAttr) {
1500315029
continue;
1500415030
}
15005-
/* Remove attribute */
15006-
_removeAttribute(name, currentNode);
1500715031
/* Did the hooks approve of the attribute? */
1500815032
if (!hookEvent.keepAttr) {
15033+
_removeAttribute(name, currentNode);
1500915034
continue;
1501015035
}
1501115036
/* Work around a security issue in jQuery 3.0 */
@@ -15022,6 +15047,7 @@ function createDOMPurify() {
1502215047
/* Is `value` valid for this attribute? */
1502315048
const lcTag = transformCaseFunc(currentNode.nodeName);
1502415049
if (!_isValidAttribute(lcTag, lcName, value)) {
15050+
_removeAttribute(name, currentNode);
1502515051
continue;
1502615052
}
1502715053
/* Handle attributes that require Trusted Types */
@@ -15042,19 +15068,23 @@ function createDOMPurify() {
1504215068
}
1504315069
}
1504415070
/* Handle invalid data-* attribute set by try-catching it */
15045-
try {
15046-
if (namespaceURI) {
15047-
currentNode.setAttributeNS(namespaceURI, name, value);
15048-
} else {
15049-
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
15050-
currentNode.setAttribute(name, value);
15051-
}
15052-
if (_isClobbered(currentNode)) {
15053-
_forceRemove(currentNode);
15054-
} else {
15055-
arrayPop(DOMPurify.removed);
15071+
if (value !== initValue) {
15072+
try {
15073+
if (namespaceURI) {
15074+
currentNode.setAttributeNS(namespaceURI, name, value);
15075+
} else {
15076+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
15077+
currentNode.setAttribute(name, value);
15078+
}
15079+
if (_isClobbered(currentNode)) {
15080+
_forceRemove(currentNode);
15081+
} else {
15082+
arrayPop(DOMPurify.removed);
15083+
}
15084+
} catch (_) {
15085+
_removeAttribute(name, currentNode);
1505615086
}
15057-
} catch (_) {}
15087+
}
1505815088
}
1505915089
/* Execute a hook if present */
1506015090
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
@@ -16971,14 +17001,6 @@ function isVueComponent(value) {
1697117001
return isPlainObject_1(value) && (isNonEmptyString(value.template) || isFunction(value.render) || isNonEmptyString(value.el) || isElement(value.el) || isVueComponent(value.extends) || isNonEmptyArray(value.mixins) && value.mixins.some(val => isVueComponent(val))) || typeof value === 'function' && value.prototype && value.prototype.constructor.name === 'VueComponent';
1697217002
}
1697317003

16974-
function localize(object, $config, form$) {
16975-
var locale = form$.locale$ || $config.i18n.locale;
16976-
if (!locale) {
16977-
return object;
16978-
}
16979-
return object && typeof object === 'object' ? (object === null || object === void 0 ? void 0 : object[locale]) || (object === null || object === void 0 ? void 0 : object[locale.toUpperCase()]) || (object === null || object === void 0 ? void 0 : object[$config.i18n.fallbackLocale]) || (object === null || object === void 0 ? void 0 : object[$config.i18n.fallbackLocale.toUpperCase()]) || (object === null || object === void 0 ? void 0 : object[Object.keys(object)[0]]) || '' : object;
16980-
}
16981-
1698217004
var base$19 = function base(props, context, dependencies) {
1698317005
// ============ DEPENDENCIES ============
1698417006

@@ -27385,6 +27407,7 @@ var base$I = function base(props, context, dependencies) {
2738527407
var {
2738627408
rules
2738727409
} = toRefs(props);
27410+
var config$ = inject('config$');
2738827411

2738927412
// ============ DEPENDENCIES ============
2739027413

@@ -27694,7 +27717,7 @@ var base$I = function base(props, context, dependencies) {
2769427717
// If the element has rules it does not
2769527718
// qualify as validated by default
2769627719
state.value.validated = false;
27697-
validatorFactory.value = new form$.value.$vueform.services.validation.factory(path.value, form$.value);
27720+
validatorFactory.value = new form$.value.$vueform.services.validation.factory(path.value, form$.value, config$.value);
2769827721
Validators.value = [];
2769927722
each(validatorFactory.value.makeAll(validationRules.value), Validator => {
2770027723
Validators.value.push(Validator);
@@ -28191,6 +28214,7 @@ var multilingual$3 = function multilingual(props, context, dependencies) {
2819128214
var {
2819228215
rules
2819328216
} = toRefs(props);
28217+
var config$ = inject('config$');
2819428218

2819528219
// ============ DEPENDENCIES ============
2819628220

@@ -28482,7 +28506,7 @@ var multilingual$3 = function multilingual(props, context, dependencies) {
2848228506
each(validationRules.value, (r, lang) => {
2848328507
state.value.validated[lang] = r !== null && r.length > 0 ? false : true;
2848428508
});
28485-
var factory = new form$.value.$vueform.services.validation.factory(path.value, form$.value);
28509+
var factory = new form$.value.$vueform.services.validation.factory(path.value, form$.value, config$.value);
2848628510
Validators.value = {};
2848728511
each(validationRules.value, (languageRules, lang) => {
2848828512
if (languageRules === null) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp