@rainbow-oh/yee-c 0.8.3 → 0.8.4

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.
@@ -248,6 +248,9 @@ var FormStore = class {
248
248
  return false;
249
249
  });
250
250
  }
251
+ if (trigger && mergedRules.length === 0) {
252
+ return [];
253
+ }
251
254
  const value = this.getFieldValue(name);
252
255
  for (const rule of mergedRules) {
253
256
  const result = yield (0, import_validate.default)(rule, value);
@@ -73,7 +73,7 @@ export interface SelectProps extends DataAttributeProps, Pick<SelectorProps, 'si
73
73
  /**
74
74
  * Dropdown options
75
75
  */
76
- options: Array<Option>;
76
+ options?: Array<Option>;
77
77
  /**
78
78
  * Selection mode
79
79
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-27T02:28:20.784Z
4
+ * Generated on 2026-07-27T03:27:50.585Z
5
5
  */
6
6
 
7
7
  /* ========== color.blue.css ========== */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-27T02:28:20.784Z
4
+ * Generated on 2026-07-27T03:27:50.585Z
5
5
  */
6
6
 
7
7
  /* ========== color.css ========== */
@@ -3,4 +3,4 @@ declare global {
3
3
  __yee_c_version__: string;
4
4
  }
5
5
  }
6
- export declare const version = "0.8.3";
6
+ export declare const version = "0.8.4";
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- var version = "0.8.3";
25
+ var version = "0.8.4";
26
26
  if (typeof window !== "undefined") {
27
27
  window.__yee_c_version__ = version;
28
28
  }
@@ -238,19 +238,27 @@ export var FormStore = /*#__PURE__*/function () {
238
238
  return false;
239
239
  });
240
240
  }
241
+ // If no rules match the current trigger, skip validation entirely
242
+ // to avoid clearing existing errors from a previous validation pass.
243
+ if (!(trigger && mergedRules.length === 0)) {
244
+ _context.next = 10;
245
+ break;
246
+ }
247
+ return _context.abrupt("return", []);
248
+ case 10:
241
249
  value = _this.getFieldValue(name);
242
250
  _iterator3 = _createForOfIteratorHelper(mergedRules);
243
- _context.prev = 10;
251
+ _context.prev = 12;
244
252
  _iterator3.s();
245
- case 12:
253
+ case 14:
246
254
  if ((_step3 = _iterator3.n()).done) {
247
- _context.next = 20;
255
+ _context.next = 22;
248
256
  break;
249
257
  }
250
258
  rule = _step3.value;
251
- _context.next = 16;
259
+ _context.next = 18;
252
260
  return validate(rule, value);
253
- case 16:
261
+ case 18:
254
262
  result = _context.sent;
255
263
  if (name && !result.passed) {
256
264
  err.push(_objectSpread(_objectSpread({}, rule), {}, {
@@ -260,21 +268,21 @@ export var FormStore = /*#__PURE__*/function () {
260
268
  message: (_result$message = result.message) !== null && _result$message !== void 0 ? _result$message : rule.message
261
269
  }));
262
270
  }
263
- case 18:
264
- _context.next = 12;
265
- break;
266
271
  case 20:
267
- _context.next = 25;
272
+ _context.next = 14;
268
273
  break;
269
274
  case 22:
270
- _context.prev = 22;
271
- _context.t0 = _context["catch"](10);
275
+ _context.next = 27;
276
+ break;
277
+ case 24:
278
+ _context.prev = 24;
279
+ _context.t0 = _context["catch"](12);
272
280
  _iterator3.e(_context.t0);
273
- case 25:
274
- _context.prev = 25;
281
+ case 27:
282
+ _context.prev = 27;
275
283
  _iterator3.f();
276
- return _context.finish(25);
277
- case 28:
284
+ return _context.finish(27);
285
+ case 30:
278
286
  if (err.length > 0) {
279
287
  _this.validateMessages.set(name, err);
280
288
  } else if (_this.validateMessages.has(name)) {
@@ -283,11 +291,11 @@ export var FormStore = /*#__PURE__*/function () {
283
291
  // Notify the field to re-render so async validation results surface in the UI.
284
292
  entity === null || entity === void 0 || entity.onStoreChange();
285
293
  return _context.abrupt("return", err);
286
- case 31:
294
+ case 33:
287
295
  case "end":
288
296
  return _context.stop();
289
297
  }
290
- }, _callee, null, [[10, 22, 25, 28]]);
298
+ }, _callee, null, [[12, 24, 27, 30]]);
291
299
  }));
292
300
  return function (_x, _x2) {
293
301
  return _ref4.apply(this, arguments);
@@ -73,7 +73,7 @@ export interface SelectProps extends DataAttributeProps, Pick<SelectorProps, 'si
73
73
  /**
74
74
  * Dropdown options
75
75
  */
76
- options: Array<Option>;
76
+ options?: Array<Option>;
77
77
  /**
78
78
  * Selection mode
79
79
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-27T02:28:20.784Z
4
+ * Generated on 2026-07-27T03:27:50.585Z
5
5
  */
6
6
 
7
7
  /* ========== color.blue.css ========== */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-27T02:28:20.784Z
4
+ * Generated on 2026-07-27T03:27:50.585Z
5
5
  */
6
6
 
7
7
  /* ========== color.css ========== */
@@ -3,4 +3,4 @@ declare global {
3
3
  __yee_c_version__: string;
4
4
  }
5
5
  }
6
- export declare const version = "0.8.3";
6
+ export declare const version = "0.8.4";
@@ -1,4 +1,4 @@
1
- export var version = "0.8.3";
1
+ export var version = "0.8.4";
2
2
  if (typeof window !== 'undefined') {
3
3
  window.__yee_c_version__ = version;
4
4
  }