@castlabs/ui 4.18.6 → 4.19.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.
@@ -2643,7 +2643,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
2643
2643
  name: 'ClUI',
2644
2644
  computed: {
2645
2645
  version: function () {
2646
- return "4.18.6" ?? 0;
2646
+ return "4.19.0" ?? 0;
2647
2647
  }
2648
2648
  }
2649
2649
  }));
@@ -4063,15 +4063,15 @@ ClDropzone_template.install = Vue => {
4063
4063
  Vue.component(ClDropzone_template.name ?? 'ClNoName', ClDropzone_template);
4064
4064
  };
4065
4065
  /* harmony default export */ var ClDropzone = (ClDropzone_template);
4066
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClField/template.vue?vue&type=template&id=747d9c1a&ts=true
4066
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClField/template.vue?vue&type=template&id=18037b9c&ts=true
4067
4067
 
4068
- const templatevue_type_template_id_747d9c1a_ts_true_hoisted_1 = ["for"];
4069
- const templatevue_type_template_id_747d9c1a_ts_true_hoisted_2 = {
4068
+ const templatevue_type_template_id_18037b9c_ts_true_hoisted_1 = ["for"];
4069
+ const templatevue_type_template_id_18037b9c_ts_true_hoisted_2 = {
4070
4070
  key: 0,
4071
4071
  class: "required"
4072
4072
  };
4073
- const templatevue_type_template_id_747d9c1a_ts_true_hoisted_3 = ["id", "disabled", "required", "autofocus", "placeholder"];
4074
- const templatevue_type_template_id_747d9c1a_ts_true_hoisted_4 = ["id", "disabled", "required", "autofocus"];
4073
+ const templatevue_type_template_id_18037b9c_ts_true_hoisted_3 = ["id", "disabled", "required", "autofocus", "placeholder"];
4074
+ const templatevue_type_template_id_18037b9c_ts_true_hoisted_4 = ["id", "disabled", "required", "autofocus"];
4075
4075
  const _hoisted_5 = ["id", "type", "placeholder", "minlength", "maxlength", "pattern", "disabled", "required", "autofocus"];
4076
4076
  const _hoisted_6 = ["id", "for"];
4077
4077
  const _hoisted_7 = {
@@ -4081,14 +4081,14 @@ const _hoisted_8 = {
4081
4081
  key: 1,
4082
4082
  class: "valid-feedback valid-feedback-none"
4083
4083
  };
4084
- function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4084
+ function templatevue_type_template_id_18037b9c_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4085
4085
  return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, [_ctx.label ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("label", {
4086
4086
  key: 0,
4087
4087
  for: _ctx.$uid,
4088
4088
  class: (0,external_vue_.normalizeClass)(["form-label", {
4089
4089
  disabled: _ctx.disabled
4090
4090
  }])
4091
- }, [(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.label), 1), _ctx.required ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", templatevue_type_template_id_747d9c1a_ts_true_hoisted_2, "*")) : (0,external_vue_.createCommentVNode)("", true)], 10, templatevue_type_template_id_747d9c1a_ts_true_hoisted_1)) : (0,external_vue_.createCommentVNode)("", true), _ctx.type === 'textarea' ? (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("textarea", (0,external_vue_.mergeProps)({
4091
+ }, [(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.label), 1), _ctx.required ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", templatevue_type_template_id_18037b9c_ts_true_hoisted_2, "*")) : (0,external_vue_.createCommentVNode)("", true)], 10, templatevue_type_template_id_18037b9c_ts_true_hoisted_1)) : (0,external_vue_.createCommentVNode)("", true), _ctx.type === 'textarea' ? (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("textarea", (0,external_vue_.mergeProps)({
4092
4092
  key: 1,
4093
4093
  id: _ctx.$uid
4094
4094
  }, _ctx.$attrs, {
@@ -4099,29 +4099,27 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4099
4099
  required: _ctx.required,
4100
4100
  autofocus: _ctx.autofocus,
4101
4101
  placeholder: _ctx.placeholder,
4102
- onInput: _cache[1] || (_cache[1] = $event => _ctx.$emit('update:modelValue', _ctx.modelValue)),
4103
- onBlur: _cache[2] || (_cache[2] =
4104
- //@ts-ignore
4105
- (...args) => _ctx.validate && _ctx.validate(...args))
4106
- }), null, 16, templatevue_type_template_id_747d9c1a_ts_true_hoisted_3)), [[external_vue_.vModelText, _ctx.modelValue]]) : _ctx.type === 'select' ? (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("select", (0,external_vue_.mergeProps)({
4102
+ onInput: _cache[1] || (_cache[1] = $event => _ctx.validate()),
4103
+ onChange: _cache[2] || (_cache[2] = $event => _ctx.validate()),
4104
+ onBlur: _cache[3] || (_cache[3] = $event => _ctx.validate(true))
4105
+ }), null, 16, templatevue_type_template_id_18037b9c_ts_true_hoisted_3)), [[external_vue_.vModelText, _ctx.modelValue]]) : _ctx.type === 'select' ? (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("select", (0,external_vue_.mergeProps)({
4107
4106
  key: 2,
4108
4107
  id: _ctx.$uid,
4109
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.modelValue = $event),
4108
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.modelValue = $event),
4110
4109
  class: ["form-select", _ctx.clazz],
4111
4110
  disabled: _ctx.disabled,
4112
4111
  required: _ctx.required,
4113
4112
  autofocus: _ctx.autofocus
4114
4113
  }, _ctx.$attrs, {
4115
- onChange: _cache[4] || (_cache[4] = $event => _ctx.validate()),
4116
- onBlur: _cache[5] || (_cache[5] =
4117
- //@ts-ignore
4118
- (...args) => _ctx.validate && _ctx.validate(...args))
4119
- }), [(0,external_vue_.renderSlot)(_ctx.$slots, "default")], 16, templatevue_type_template_id_747d9c1a_ts_true_hoisted_4)), [[external_vue_.vModelSelect, _ctx.modelValue]]) : (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("input", (0,external_vue_.mergeProps)({
4114
+ onInput: _cache[5] || (_cache[5] = $event => _ctx.validate()),
4115
+ onChange: _cache[6] || (_cache[6] = $event => _ctx.validate()),
4116
+ onBlur: _cache[7] || (_cache[7] = $event => _ctx.validate(true))
4117
+ }), [(0,external_vue_.renderSlot)(_ctx.$slots, "default")], 16, templatevue_type_template_id_18037b9c_ts_true_hoisted_4)), [[external_vue_.vModelSelect, _ctx.modelValue]]) : (0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("input", (0,external_vue_.mergeProps)({
4120
4118
  key: 3,
4121
4119
  id: _ctx.$uid
4122
4120
  }, _ctx.$attrs, {
4123
4121
  ref: "input",
4124
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.modelValue = $event),
4122
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => _ctx.modelValue = $event),
4125
4123
  type: _ctx.type,
4126
4124
  class: _ctx.clazz,
4127
4125
  placeholder: _ctx.placeholder,
@@ -4131,11 +4129,9 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4131
4129
  disabled: _ctx.disabled,
4132
4130
  required: _ctx.required,
4133
4131
  autofocus: _ctx.autofocus,
4134
- onInput: _cache[7] || (_cache[7] = $event => _ctx.$emit('update:modelValue', _ctx.modelValue)),
4135
- onChange: _cache[8] || (_cache[8] = $event => _ctx.changed(_ctx.modelValue)),
4136
- onBlur: _cache[9] || (_cache[9] =
4137
- //@ts-ignore
4138
- (...args) => _ctx.validate && _ctx.validate(...args))
4132
+ onInput: _cache[9] || (_cache[9] = $event => _ctx.validate()),
4133
+ onChange: _cache[10] || (_cache[10] = $event => _ctx.validate()),
4134
+ onBlur: _cache[11] || (_cache[11] = $event => _ctx.validate(true))
4139
4135
  }), null, 16, _hoisted_5)), [[external_vue_.vModelDynamic, _ctx.modelValue]]), _ctx.type === 'file' ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("label", {
4140
4136
  key: 4,
4141
4137
  id: `${_ctx.$uid}-companion`,
@@ -4150,7 +4146,7 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4150
4146
  }])
4151
4147
  }, (0,external_vue_.toDisplayString)(_ctx.help), 3)) : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("p", _hoisted_8))], 64)) : (0,external_vue_.createCommentVNode)("", true)], 64);
4152
4148
  }
4153
- ;// ./src/components/form/ClField/template.vue?vue&type=template&id=747d9c1a&ts=true
4149
+ ;// ./src/components/form/ClField/template.vue?vue&type=template&id=18037b9c&ts=true
4154
4150
 
4155
4151
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClField/template.vue?vue&type=script&lang=ts
4156
4152
 
@@ -4223,13 +4219,13 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4223
4219
  default: undefined
4224
4220
  }
4225
4221
  },
4226
- emits: ['update:valid', 'update:modelValue'],
4222
+ emits: ['valid', 'invalid', 'changed', 'update:modelValue'],
4227
4223
  data() {
4228
4224
  return {
4229
4225
  valid: true,
4230
- modelValue: this.value || '',
4231
- invalidMessage: this.error || 'Input invalid.',
4232
- filePlaceholder: this.placeholder || 'Please select ...'
4226
+ modelValue: this.value ?? '',
4227
+ invalidMessage: this.error ?? 'Input invalid.',
4228
+ filePlaceholder: this.placeholder ?? 'Please select ...'
4233
4229
  };
4234
4230
  },
4235
4231
  computed: {
@@ -4252,72 +4248,69 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4252
4248
  if (this.prevalidate) this.validate();
4253
4249
  },
4254
4250
  methods: {
4255
- runAutotrim: function (value) {
4251
+ runAutotrim: function () {
4256
4252
  if (this.autotrim) {
4257
4253
  const input = this.$refs.input;
4258
- input.value = (value ?? input.value).trim();
4254
+ input.value = input.value.trim();
4259
4255
  this.modelValue = input.value;
4260
- this.$emit('update:modelValue', this.modelValue);
4261
- }
4262
- },
4263
- changed: function (value) {
4264
- this.runAutotrim(value);
4265
- if (this.type === 'file') {
4266
- this.filePlaceholder = value.replace(/.*[/\\]/, '');
4267
- this.validate();
4268
4256
  }
4269
4257
  },
4270
4258
  focus: function () {
4271
4259
  this.$nextTick(() => {
4272
4260
  ;
4273
- this.$refs.input.focus();
4261
+ this.$refs.input?.focus();
4274
4262
  });
4275
4263
  },
4276
- validate: function () {
4277
- this.runAutotrim();
4264
+ validate: function (trim = false) {
4265
+ this.valid = true;
4266
+ if (trim && this.autotrim) this.runAutotrim();
4267
+ if (this.type === 'file') {
4268
+ this.filePlaceholder = this.modelValue.replace(/.*[/\\]/, '');
4269
+ }
4278
4270
  if (this.required && (this.modelValue?.length ?? 0) <= 0) {
4279
- this.invalidMessage = 'This field may not be blank.';
4280
- this.valid = false;
4271
+ this.setInvalid('This field may not be blank.');
4281
4272
  } else {
4282
4273
  switch (this.type) {
4283
4274
  case 'email':
4284
- this.valid = this.validateEMail();
4275
+ this.validateEMail();
4285
4276
  break;
4286
4277
  default:
4287
- this.valid = this.validateText();
4278
+ this.validateText();
4288
4279
  }
4289
4280
  }
4290
- this.$emit('update:valid', this.valid);
4291
- this.$emit('update:modelValue', this.modelValue);
4281
+ if (this.valid) this.setValid(this.modelValue);
4292
4282
  },
4293
4283
  validateText: function () {
4294
- if (this.minlength && (this.modelValue?.length ?? 0) < Number(this.minlength)) {
4295
- this.invalidMessage = this.error || `Please enter at least ${this.minlength} characters.`;
4296
- return false;
4284
+ const minlength = Number(this.minlength);
4285
+ const maxlength = Number(this.maxlength);
4286
+ if (this.minlength && (this.modelValue?.length ?? 0) < minlength) {
4287
+ this.setInvalid(this.error ?? `Please enter at least ${minlength} character` + (minlength > 1 ? 's.' : '.'));
4297
4288
  }
4298
- if (this.maxlength && (this.modelValue?.length ?? 0) > Number(this.maxlength)) {
4299
- this.invalidMessage = this.error || `Please enter at most ${this.minlength} characters.`;
4300
- return false;
4289
+ if (this.maxlength && (this.modelValue?.length ?? 0) > maxlength) {
4290
+ this.setInvalid(this.error ?? `Please enter at most ${maxlength} character` + (minlength > 1 ? 's.' : '.'));
4301
4291
  }
4302
4292
  if (this.pattern && !new RegExp(this.pattern, 'g').test(this.modelValue)) {
4303
- this.invalidMessage = this.error || 'Input invalid.';
4304
- return false;
4293
+ this.setInvalid(this.error);
4305
4294
  }
4306
- return true;
4307
4295
  },
4308
4296
  validateEMail: function () {
4309
- this.invalidMessage = 'Please enter a valid email address.';
4310
- return /^[^\s@]+@[^\s@]+\.[^\s@]+[^\s@.]$/.test(this.modelValue);
4297
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+[^\s@.]$/.test(this.modelValue)) {
4298
+ this.setInvalid('Please enter a valid email address.');
4299
+ }
4311
4300
  },
4312
4301
  setValid: function (value = '') {
4313
4302
  this.valid = true;
4314
4303
  this.modelValue = value;
4315
- this.$emit('update:valid', this.valid);
4304
+ this.$emit('update:modelValue', this.modelValue);
4305
+ this.$emit('valid', this.help ?? '');
4306
+ this.$emit('changed', this.modelValue);
4316
4307
  },
4317
4308
  setInvalid: function (message) {
4318
4309
  this.valid = false;
4319
- this.invalidMessage = message;
4320
- this.$emit('update:valid', this.valid);
4310
+ this.invalidMessage = message ?? 'Input invalid.';
4311
+ this.$emit('update:modelValue', this.modelValue);
4312
+ this.$emit('invalid', this.invalidMessage);
4313
+ this.$emit('changed', this.modelValue);
4321
4314
  }
4322
4315
  }
4323
4316
  }));
@@ -4329,7 +4322,7 @@ function templatevue_type_template_id_747d9c1a_ts_true_render(_ctx, _cache, $pro
4329
4322
 
4330
4323
 
4331
4324
  ;
4332
- const ClField_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClField_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_747d9c1a_ts_true_render]])
4325
+ const ClField_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClField_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_18037b9c_ts_true_render]])
4333
4326
 
4334
4327
  /* harmony default export */ var ClField_template = (ClField_template_exports_);
4335
4328
  ;// ./src/components/form/ClField/index.ts
@@ -4442,31 +4435,31 @@ ClFieldCheck_template.install = Vue => {
4442
4435
  Vue.component(ClFieldCheck_template.name ?? 'ClNoName', ClFieldCheck_template);
4443
4436
  };
4444
4437
  /* harmony default export */ var ClFieldCheck = (ClFieldCheck_template);
4445
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClFieldGroup/template.vue?vue&type=template&id=9e079810&ts=true
4438
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClFieldGroup/template.vue?vue&type=template&id=576088e6&ts=true
4446
4439
 
4447
- const templatevue_type_template_id_9e079810_ts_true_hoisted_1 = {
4440
+ const templatevue_type_template_id_576088e6_ts_true_hoisted_1 = {
4448
4441
  key: 0,
4449
4442
  class: "form-label"
4450
4443
  };
4451
- const templatevue_type_template_id_9e079810_ts_true_hoisted_2 = {
4444
+ const templatevue_type_template_id_576088e6_ts_true_hoisted_2 = {
4452
4445
  key: 0,
4453
4446
  class: "required"
4454
4447
  };
4455
- const templatevue_type_template_id_9e079810_ts_true_hoisted_3 = {
4448
+ const templatevue_type_template_id_576088e6_ts_true_hoisted_3 = {
4456
4449
  class: "invalid-feedback"
4457
4450
  };
4458
- const templatevue_type_template_id_9e079810_ts_true_hoisted_4 = {
4451
+ const templatevue_type_template_id_576088e6_ts_true_hoisted_4 = {
4459
4452
  key: 1,
4460
4453
  class: "valid-feedback"
4461
4454
  };
4462
- function templatevue_type_template_id_9e079810_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4463
- return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, [_ctx.label ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("label", templatevue_type_template_id_9e079810_ts_true_hoisted_1, [(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.label), 1), _ctx.required ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", templatevue_type_template_id_9e079810_ts_true_hoisted_2, "*")) : (0,external_vue_.createCommentVNode)("", true)])) : (0,external_vue_.createCommentVNode)("", true), (0,external_vue_.createElementVNode)("div", {
4455
+ function templatevue_type_template_id_576088e6_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4456
+ return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, [_ctx.label ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("label", templatevue_type_template_id_576088e6_ts_true_hoisted_1, [(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.label), 1), _ctx.required ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", templatevue_type_template_id_576088e6_ts_true_hoisted_2, "*")) : (0,external_vue_.createCommentVNode)("", true)])) : (0,external_vue_.createCommentVNode)("", true), (0,external_vue_.createElementVNode)("div", {
4464
4457
  class: (0,external_vue_.normalizeClass)(["input-group", {
4465
4458
  invalid: !_ctx.valid
4466
4459
  }])
4467
- }, [(0,external_vue_.renderSlot)(_ctx.$slots, "default")], 2), (0,external_vue_.createElementVNode)("p", templatevue_type_template_id_9e079810_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.invalidMessage), 1), _ctx.help ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("p", templatevue_type_template_id_9e079810_ts_true_hoisted_4, (0,external_vue_.toDisplayString)(_ctx.help), 1)) : (0,external_vue_.createCommentVNode)("", true)], 64);
4460
+ }, [(0,external_vue_.renderSlot)(_ctx.$slots, "default")], 2), (0,external_vue_.createElementVNode)("p", templatevue_type_template_id_576088e6_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.invalidMessage), 1), _ctx.help ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("p", templatevue_type_template_id_576088e6_ts_true_hoisted_4, (0,external_vue_.toDisplayString)(_ctx.help), 1)) : (0,external_vue_.createCommentVNode)("", true)], 64);
4468
4461
  }
4469
- ;// ./src/components/form/ClFieldGroup/template.vue?vue&type=template&id=9e079810&ts=true
4462
+ ;// ./src/components/form/ClFieldGroup/template.vue?vue&type=template&id=576088e6&ts=true
4470
4463
 
4471
4464
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/form/ClFieldGroup/template.vue?vue&type=script&lang=ts
4472
4465
 
@@ -4491,22 +4484,20 @@ function templatevue_type_template_id_9e079810_ts_true_render(_ctx, _cache, $pro
4491
4484
  default: false
4492
4485
  }
4493
4486
  },
4494
- emits: ['update:valid'],
4495
4487
  data() {
4496
4488
  return {
4497
4489
  valid: true,
4498
- invalidMessage: this.error || 'Input invalid.'
4490
+ invalidMessage: this.error ?? 'Input invalid.'
4499
4491
  };
4500
4492
  },
4501
4493
  methods: {
4502
4494
  setValid: function () {
4503
4495
  this.valid = true;
4504
- this.$emit('update:valid', this.valid);
4496
+ this.invalidMessage = 'Input invalid.';
4505
4497
  },
4506
4498
  setInvalid: function (message) {
4507
4499
  this.valid = false;
4508
- this.invalidMessage = message;
4509
- this.$emit('update:valid', this.valid);
4500
+ this.invalidMessage = message ?? 'Input invalid.';
4510
4501
  }
4511
4502
  }
4512
4503
  }));
@@ -4518,7 +4509,7 @@ function templatevue_type_template_id_9e079810_ts_true_render(_ctx, _cache, $pro
4518
4509
 
4519
4510
 
4520
4511
  ;
4521
- const ClFieldGroup_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClFieldGroup_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_9e079810_ts_true_render]])
4512
+ const ClFieldGroup_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClFieldGroup_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_576088e6_ts_true_render]])
4522
4513
 
4523
4514
  /* harmony default export */ var ClFieldGroup_template = (ClFieldGroup_template_exports_);
4524
4515
  ;// ./src/components/form/ClFieldGroup/index.ts