@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.
@@ -19925,12 +19925,12 @@ var data_list_item_component = normalizeComponent(
19925
19925
  )
19926
19926
 
19927
19927
  /* harmony default export */ var data_list_item = (data_list_item_component.exports);
19928
- // 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&
19929
- 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()}
19930
- var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19928
+ // 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&
19929
+ 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()}
19930
+ var dialogvue_type_template_id_4a14fcfa_staticRenderFns = []
19931
19931
 
19932
19932
 
19933
- // CONCATENATED MODULE: ./src/components/dialog/dialog.vue?vue&type=template&id=b02876ba&
19933
+ // CONCATENATED MODULE: ./src/components/dialog/dialog.vue?vue&type=template&id=4a14fcfa&
19934
19934
 
19935
19935
  // 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&
19936
19936
 
@@ -19955,12 +19955,6 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19955
19955
  default: false
19956
19956
  },
19957
19957
 
19958
- /** 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. */
19959
- showInPlace: {
19960
- type: Boolean,
19961
- default: false
19962
- },
19963
-
19964
19958
  /** Determines the size of the dialog. */
19965
19959
  size: {
19966
19960
  type: String,
@@ -19988,6 +19982,19 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19988
19982
  /** Emitted when the dialog show state changes. */
19989
19983
 
19990
19984
  this.$emit('toggled', this.id, this.isShown);
19985
+ },
19986
+ handleEnterKey: function handleEnterKey(event) {
19987
+ // If the user presses enter, we want to trigger the last button (always confirm) in the footer.
19988
+ if (event.key === 'Enter') {
19989
+ var buttons = this.$el.querySelectorAll('.ecs-dialog-footer button');
19990
+ var lastButton = buttons[buttons.length - 1];
19991
+ var activeElement = document.activeElement;
19992
+
19993
+ if (activeElement.tagName !== 'BUTTON' || !activeElement.closest('.ecs-dialog-footer')) {
19994
+ event.preventDefault();
19995
+ lastButton.click();
19996
+ }
19997
+ }
19991
19998
  }
19992
19999
  },
19993
20000
  watch: {
@@ -19999,8 +20006,11 @@ var dialogvue_type_template_id_b02876ba_staticRenderFns = []
19999
20006
  if (this.isShown) {
20000
20007
  this.lazyLoad = true;
20001
20008
  this.$nextTick(function () {
20002
- if (_this.showInPlace) _this.$refs.dialog.show();else _this.$refs.dialog.showModal();
20009
+ _this.$refs.dialog.showModal();
20010
+
20003
20011
  document.addEventListener('keyup', _this.keyUpHandler);
20012
+
20013
+ _this.$refs.dialog.focus();
20004
20014
  });
20005
20015
  } else {
20006
20016
  this.$refs.dialog.close();
@@ -20050,8 +20060,8 @@ var dialogvue_type_style_index_0_lang_scss_ = __webpack_require__("642e");
20050
20060
 
20051
20061
  var dialog_component = normalizeComponent(
20052
20062
  dialog_dialogvue_type_script_lang_js_,
20053
- dialogvue_type_template_id_b02876ba_render,
20054
- dialogvue_type_template_id_b02876ba_staticRenderFns,
20063
+ dialogvue_type_template_id_4a14fcfa_render,
20064
+ dialogvue_type_template_id_4a14fcfa_staticRenderFns,
20055
20065
  false,
20056
20066
  null,
20057
20067
  null,