@everchron/ec-shards 7.3.13 → 7.3.14

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.
@@ -19934,12 +19934,12 @@ var data_list_item_component = normalizeComponent(
19934
19934
  )
19935
19935
 
19936
19936
  /* harmony default export */ var data_list_item = (data_list_item_component.exports);
19937
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f78c9e12-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/dialog.vue?vue&type=template&id=b02876ba&
19938
- var dialogvue_type_template_id_b02876ba_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.lazyLoad)?_c('dialog',{ref:"dialog",staticClass:"ecs-dialog",class:'ecs-dialog-' + _vm.size},[_c('div',{staticClass:"ecs-dialog-body scrollbar scrollbar-sml"},[_vm._t("default")],2),(_vm.$slots.actions)?_c('div',{staticClass:"ecs-dialog-footer",class:[_vm.stackedFooter ? 'ecs-dialog-footer-stacked' : '']},[_vm._t("actions")],2):_vm._e()]):_vm._e()}
19939
- var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19937
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f78c9e12-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/dialog.vue?vue&type=template&id=4a14fcfa&
19938
+ var dialogvue_type_template_id_4a14fcfa_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.lazyLoad)?_c('dialog',{ref:"dialog",staticClass:"ecs-dialog",class:'ecs-dialog-' + _vm.size,on:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleEnterKey.apply(null, arguments)}}},[_c('div',{staticClass:"ecs-dialog-body scrollbar scrollbar-sml"},[_vm._t("default")],2),(_vm.$slots.actions)?_c('div',{staticClass:"ecs-dialog-footer",class:[_vm.stackedFooter ? 'ecs-dialog-footer-stacked' : '']},[_vm._t("actions")],2):_vm._e()]):_vm._e()}
19939
+ var dialogvue_type_template_id_4a14fcfa_staticRenderFns = []
19940
19940
 
19941
19941
 
19942
- // CONCATENATED MODULE: ./src/components/dialog/dialog.vue?vue&type=template&id=b02876ba&
19942
+ // CONCATENATED MODULE: ./src/components/dialog/dialog.vue?vue&type=template&id=4a14fcfa&
19943
19943
 
19944
19944
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/dialog.vue?vue&type=script&lang=js&
19945
19945
 
@@ -19964,12 +19964,6 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19964
19964
  default: false
19965
19965
  },
19966
19966
 
19967
- /** If set `true`, the dialog element will render where it's placed inside the DOM. This can be useful for dialogs that should not "escape" their parent elements, e.g. when a dialog is launched within a larger modal. **Note:** dialogs shown in place have no backdrop element and need to be positioned manually via CSS. */
19968
- showInPlace: {
19969
- type: Boolean,
19970
- default: false
19971
- },
19972
-
19973
19967
  /** Determines the size of the dialog. */
19974
19968
  size: {
19975
19969
  type: String,
@@ -19997,6 +19991,19 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19997
19991
  /** Emitted when the dialog show state changes. */
19998
19992
 
19999
19993
  this.$emit('toggled', this.id, this.isShown);
19994
+ },
19995
+ handleEnterKey: function handleEnterKey(event) {
19996
+ // If the user presses enter, we want to trigger the last button (always confirm) in the footer.
19997
+ if (event.key === 'Enter') {
19998
+ var buttons = this.$el.querySelectorAll('.ecs-dialog-footer button');
19999
+ var lastButton = buttons[buttons.length - 1];
20000
+ var activeElement = document.activeElement;
20001
+
20002
+ if (activeElement.tagName !== 'BUTTON' || !activeElement.closest('.ecs-dialog-footer')) {
20003
+ event.preventDefault();
20004
+ lastButton.click();
20005
+ }
20006
+ }
20000
20007
  }
20001
20008
  },
20002
20009
  watch: {
@@ -20008,8 +20015,11 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
20008
20015
  if (this.isShown) {
20009
20016
  this.lazyLoad = true;
20010
20017
  this.$nextTick(function () {
20011
- if (_this.showInPlace) _this.$refs.dialog.show();else _this.$refs.dialog.showModal();
20018
+ _this.$refs.dialog.showModal();
20019
+
20012
20020
  document.addEventListener('keyup', _this.keyUpHandler);
20021
+
20022
+ _this.$refs.dialog.focus();
20013
20023
  });
20014
20024
  } else {
20015
20025
  this.$refs.dialog.close();
@@ -20059,8 +20069,8 @@ var dialogvue_type_style_index_0_lang_scss_ = __webpack_require__("642e");
20059
20069
 
20060
20070
  var dialog_component = normalizeComponent(
20061
20071
  dialog_dialogvue_type_script_lang_js_,
20062
- dialogvue_type_template_id_b02876ba_render,
20063
- dialogvue_type_template_id_b02876ba_staticRenderFns,
20072
+ dialogvue_type_template_id_4a14fcfa_render,
20073
+ dialogvue_type_template_id_4a14fcfa_staticRenderFns,
20064
20074
  false,
20065
20075
  null,
20066
20076
  null,