@castlabs/ui 4.18.2 → 4.18.3

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.
@@ -1918,7 +1918,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1918
1918
  name: 'ClUI',
1919
1919
  computed: {
1920
1920
  version: function () {
1921
- return "4.18.2" ?? 0;
1921
+ return "4.18.3" ?? 0;
1922
1922
  }
1923
1923
  }
1924
1924
  }));
@@ -4431,22 +4431,22 @@ ClModalConfirm_template.install = Vue => {
4431
4431
  Vue.component(ClModalConfirm_template.name ?? 'ClNoName', ClModalConfirm_template);
4432
4432
  };
4433
4433
  /* harmony default export */ var ClModalConfirm = (ClModalConfirm_template);
4434
- ;// ./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/modal/ClModalOk/template.vue?vue&type=template&id=0fccf694&ts=true
4434
+ ;// ./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/modal/ClModalOk/template.vue?vue&type=template&id=7f90f406&ts=true
4435
4435
 
4436
- const templatevue_type_template_id_0fccf694_ts_true_hoisted_1 = {
4436
+ const templatevue_type_template_id_7f90f406_ts_true_hoisted_1 = {
4437
4437
  key: 0,
4438
4438
  class: "fas fa-angle-left"
4439
4439
  };
4440
- const templatevue_type_template_id_0fccf694_ts_true_hoisted_2 = {
4440
+ const templatevue_type_template_id_7f90f406_ts_true_hoisted_2 = {
4441
4441
  key: 0,
4442
4442
  class: "fas fa-angle-right"
4443
4443
  };
4444
- function templatevue_type_template_id_0fccf694_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4444
+ function templatevue_type_template_id_7f90f406_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
4445
4445
  const _component_cl_modal = (0,external_vue_.resolveComponent)("cl-modal");
4446
4446
  return (0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_cl_modal, {
4447
4447
  id: _ctx.id,
4448
4448
  "on-open": _ctx.onOpen,
4449
- "on-close": _ctx.onClose
4449
+ "on-close": _ctx.onClose ?? _ctx.close
4450
4450
  }, {
4451
4451
  title: (0,external_vue_.withCtx)(() => [(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.title), 1)]),
4452
4452
  body: (0,external_vue_.withCtx)(() => [(0,external_vue_.renderSlot)(_ctx.$slots, "default"), (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.body), 1)]),
@@ -4454,8 +4454,10 @@ function templatevue_type_template_id_0fccf694_ts_true_render(_ctx, _cache, $pro
4454
4454
  key: 0,
4455
4455
  type: "button",
4456
4456
  class: "btn cl-btn-outline-text it-cancel",
4457
- onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('cancel'))
4458
- }, [_ctx.angles ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("i", templatevue_type_template_id_0fccf694_ts_true_hoisted_1)) : (0,external_vue_.createCommentVNode)("", true), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.cancel), 1)])) : (0,external_vue_.createCommentVNode)("", true)]),
4457
+ onClick: _cache[0] || (_cache[0] =
4458
+ //@ts-ignore
4459
+ (...args) => _ctx.emitCancel && _ctx.emitCancel(...args))
4460
+ }, [_ctx.angles ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("i", templatevue_type_template_id_7f90f406_ts_true_hoisted_1)) : (0,external_vue_.createCommentVNode)("", true), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.cancel), 1)])) : (0,external_vue_.createCommentVNode)("", true)]),
4459
4461
  "footer-right": (0,external_vue_.withCtx)(() => [(0,external_vue_.createElementVNode)("button", {
4460
4462
  type: "button",
4461
4463
  class: (0,external_vue_.normalizeClass)(["btn it-ok", {
@@ -4463,12 +4465,14 @@ function templatevue_type_template_id_0fccf694_ts_true_render(_ctx, _cache, $pro
4463
4465
  'cl-btn-outline-text': !_ctx.angles,
4464
4466
  'cl-btn-spinner': _ctx.spinner
4465
4467
  }]),
4466
- onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('ok'))
4467
- }, [(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.ok ?? _ctx.button), 1), _ctx.angles ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("i", templatevue_type_template_id_0fccf694_ts_true_hoisted_2)) : (0,external_vue_.createCommentVNode)("", true)], 2)]),
4468
+ onClick: _cache[1] || (_cache[1] =
4469
+ //@ts-ignore
4470
+ (...args) => _ctx.emitOk && _ctx.emitOk(...args))
4471
+ }, [(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.ok ?? _ctx.button), 1), _ctx.angles ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("i", templatevue_type_template_id_7f90f406_ts_true_hoisted_2)) : (0,external_vue_.createCommentVNode)("", true)], 2)]),
4468
4472
  _: 3
4469
4473
  }, 8, ["id", "on-open", "on-close"]);
4470
4474
  }
4471
- ;// ./src/components/modal/ClModalOk/template.vue?vue&type=template&id=0fccf694&ts=true
4475
+ ;// ./src/components/modal/ClModalOk/template.vue?vue&type=template&id=7f90f406&ts=true
4472
4476
 
4473
4477
  ;// ./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/modal/ClModalOk/template.vue?vue&type=script&lang=ts
4474
4478
 
@@ -4510,14 +4514,37 @@ function templatevue_type_template_id_0fccf694_ts_true_render(_ctx, _cache, $pro
4510
4514
  },
4511
4515
  onClose: {
4512
4516
  type: Function,
4513
- default: () => {}
4517
+ default: undefined
4514
4518
  },
4515
4519
  onOpen: {
4516
4520
  type: Function,
4517
4521
  default: () => {}
4518
4522
  }
4519
4523
  },
4520
- emits: ['ok', 'cancel']
4524
+ emits: ['ok', 'cancel'],
4525
+ data() {
4526
+ return {
4527
+ emitted: false
4528
+ };
4529
+ },
4530
+ methods: {
4531
+ emitOk: function () {
4532
+ this.$emit('ok');
4533
+ this.emitted = true;
4534
+ },
4535
+ emitCancel: function () {
4536
+ this.$emit('cancel');
4537
+ this.emitted = true;
4538
+ },
4539
+ close: function () {
4540
+ // ESC press emits 'cancel', but should not fire double
4541
+ if (!this.emitted) {
4542
+ this.$emit('cancel');
4543
+ }
4544
+ this.emitted = false;
4545
+ if (this.onClose) this.onClose();
4546
+ }
4547
+ }
4521
4548
  }));
4522
4549
  ;// ./src/components/modal/ClModalOk/template.vue?vue&type=script&lang=ts
4523
4550
 
@@ -4527,7 +4554,7 @@ function templatevue_type_template_id_0fccf694_ts_true_render(_ctx, _cache, $pro
4527
4554
 
4528
4555
 
4529
4556
  ;
4530
- const ClModalOk_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClModalOk_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_0fccf694_ts_true_render]])
4557
+ const ClModalOk_template_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ClModalOk_templatevue_type_script_lang_ts, [['render',templatevue_type_template_id_7f90f406_ts_true_render]])
4531
4558
 
4532
4559
  /* harmony default export */ var ClModalOk_template = (ClModalOk_template_exports_);
4533
4560
  ;// ./src/components/modal/ClModalOk/index.ts