@dialpad/dialtone-vue 3.54.0 → 3.55.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.
- package/CHANGELOG.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/dialtone-vue.common.js +219 -0
- package/dist/dialtone-vue.umd.js +219 -0
- package/dist/dialtone-vue.umd.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.55.0](https://github.com/dialpad/dialtone-vue/compare/v3.54.0...v3.55.0) (2023-03-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **Image Viewer:** create dtImageViewer ([#860](https://github.com/dialpad/dialtone-vue/issues/860)) ([20bfd61](https://github.com/dialpad/dialtone-vue/commit/20bfd619a1a9749b658ac35c7e5cd6fee8391875))
|
|
7
|
+
|
|
1
8
|
# [3.54.0](https://github.com/dialpad/dialtone-vue/compare/v3.53.3...v3.54.0) (2023-03-27)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1171,6 +1171,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1171
1171
|
"DtDropdownSeparator": () => (/* reexport */ dropdown_separator),
|
|
1172
1172
|
"DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
|
|
1173
1173
|
"DtIcon": () => (/* reexport */ icon),
|
|
1174
|
+
"DtImageViewer": () => (/* reexport */ image_viewer),
|
|
1174
1175
|
"DtInput": () => (/* reexport */ input_input),
|
|
1175
1176
|
"DtInputGroup": () => (/* reexport */ input_group_input_group),
|
|
1176
1177
|
"DtInputGroupMixin": () => (/* reexport */ InputGroupMixin),
|
|
@@ -12760,6 +12761,223 @@ const dropdown_separator_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)
|
|
|
12760
12761
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
12761
12762
|
|
|
12762
12763
|
|
|
12764
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/image_viewer/image_viewer.vue?vue&type=template&id=2229fad0
|
|
12765
|
+
|
|
12766
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_1 = ["src", "alt"];
|
|
12767
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_2 = ["aria-hidden"];
|
|
12768
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_3 = {
|
|
12769
|
+
"data-qa": "dt-image-viewer-full",
|
|
12770
|
+
class: "d-p0 d-bar0 d-wmx80p d-hmx80p",
|
|
12771
|
+
role: "dialog",
|
|
12772
|
+
"aria-modal": "true"
|
|
12773
|
+
};
|
|
12774
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_4 = ["src", "alt"];
|
|
12775
|
+
function image_viewervue_type_template_id_2229fad0_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12776
|
+
const _component_dt_button = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-button");
|
|
12777
|
+
|
|
12778
|
+
const _component_dt_icon = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-icon");
|
|
12779
|
+
|
|
12780
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", null, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_dt_button, {
|
|
12781
|
+
"data-qa": "dt-image-viewer-preview",
|
|
12782
|
+
"aria-label": $props.ariaLabel,
|
|
12783
|
+
importance: "clear",
|
|
12784
|
+
onClick: $options.open
|
|
12785
|
+
}, {
|
|
12786
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
|
|
12787
|
+
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)($props.imageButtonClass),
|
|
12788
|
+
src: $props.imageSrc,
|
|
12789
|
+
alt: $props.imageAlt
|
|
12790
|
+
}, null, 10, image_viewervue_type_template_id_2229fad0_hoisted_1)]),
|
|
12791
|
+
_: 1
|
|
12792
|
+
}, 8, ["aria-label", "onClick"]), $data.show ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Teleport, {
|
|
12793
|
+
key: 0,
|
|
12794
|
+
to: "body"
|
|
12795
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
12796
|
+
"aria-hidden": $options.isOpen,
|
|
12797
|
+
class: "d-modal",
|
|
12798
|
+
"data-qa": "dt-modal"
|
|
12799
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toHandlers)($options.modalListeners, true), {
|
|
12800
|
+
onMouseover: _cache[0] || (_cache[0] = $event => $data.showCloseButton = true),
|
|
12801
|
+
onMouseleave: _cache[1] || (_cache[1] = $event => $data.showCloseButton = false),
|
|
12802
|
+
onFocusin: _cache[2] || (_cache[2] = $event => $data.showCloseButton = true),
|
|
12803
|
+
onFocusout: _cache[3] || (_cache[3] = $event => $data.showCloseButton = false)
|
|
12804
|
+
}), [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", image_viewervue_type_template_id_2229fad0_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
|
|
12805
|
+
class: "d-wmx100p d-hmx100p",
|
|
12806
|
+
src: $props.imageSrc,
|
|
12807
|
+
alt: $props.imageAlt
|
|
12808
|
+
}, null, 8, image_viewervue_type_template_id_2229fad0_hoisted_4)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Transition, {
|
|
12809
|
+
name: "fade"
|
|
12810
|
+
}, {
|
|
12811
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [$data.showCloseButton ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_dt_button, {
|
|
12812
|
+
key: 0,
|
|
12813
|
+
ref: "closeImage",
|
|
12814
|
+
"data-qa": "dt-image-viewer-close-btn",
|
|
12815
|
+
class: "d-modal__close",
|
|
12816
|
+
circle: "",
|
|
12817
|
+
size: "lg",
|
|
12818
|
+
importance: "clear",
|
|
12819
|
+
kind: "inverted",
|
|
12820
|
+
"aria-label": $props.closeAriaLabel,
|
|
12821
|
+
onClick: $options.close
|
|
12822
|
+
}, {
|
|
12823
|
+
icon: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_dt_icon, {
|
|
12824
|
+
name: "close",
|
|
12825
|
+
size: "400"
|
|
12826
|
+
})]),
|
|
12827
|
+
_: 1
|
|
12828
|
+
}, 8, ["aria-label", "onClick"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]),
|
|
12829
|
+
_: 1
|
|
12830
|
+
})], 16, image_viewervue_type_template_id_2229fad0_hoisted_2)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]);
|
|
12831
|
+
}
|
|
12832
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue?vue&type=template&id=2229fad0
|
|
12833
|
+
|
|
12834
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/image_viewer/image_viewer.vue?vue&type=script&lang=js
|
|
12835
|
+
|
|
12836
|
+
|
|
12837
|
+
|
|
12838
|
+
|
|
12839
|
+
/* harmony default export */ const image_viewervue_type_script_lang_js = ({
|
|
12840
|
+
name: 'DtImageViewer',
|
|
12841
|
+
components: {
|
|
12842
|
+
DtButton: button_button,
|
|
12843
|
+
DtIcon: icon
|
|
12844
|
+
},
|
|
12845
|
+
mixins: [modal],
|
|
12846
|
+
props: {
|
|
12847
|
+
/**
|
|
12848
|
+
* URL of the image to be shown
|
|
12849
|
+
*/
|
|
12850
|
+
imageSrc: {
|
|
12851
|
+
type: String,
|
|
12852
|
+
required: true
|
|
12853
|
+
},
|
|
12854
|
+
|
|
12855
|
+
/**
|
|
12856
|
+
* Alt text of image
|
|
12857
|
+
*/
|
|
12858
|
+
imageAlt: {
|
|
12859
|
+
type: String,
|
|
12860
|
+
required: true
|
|
12861
|
+
},
|
|
12862
|
+
|
|
12863
|
+
/**
|
|
12864
|
+
* Image Class
|
|
12865
|
+
*/
|
|
12866
|
+
imageButtonClass: {
|
|
12867
|
+
type: String,
|
|
12868
|
+
required: false,
|
|
12869
|
+
default: ''
|
|
12870
|
+
},
|
|
12871
|
+
|
|
12872
|
+
/**
|
|
12873
|
+
* Aria label
|
|
12874
|
+
*/
|
|
12875
|
+
ariaLabel: {
|
|
12876
|
+
type: String,
|
|
12877
|
+
required: true
|
|
12878
|
+
},
|
|
12879
|
+
|
|
12880
|
+
/**
|
|
12881
|
+
* Aria label for close button
|
|
12882
|
+
*/
|
|
12883
|
+
closeAriaLabel: {
|
|
12884
|
+
type: String,
|
|
12885
|
+
required: true
|
|
12886
|
+
}
|
|
12887
|
+
},
|
|
12888
|
+
|
|
12889
|
+
data() {
|
|
12890
|
+
return {
|
|
12891
|
+
show: false,
|
|
12892
|
+
showCloseButton: true
|
|
12893
|
+
};
|
|
12894
|
+
},
|
|
12895
|
+
|
|
12896
|
+
computed: {
|
|
12897
|
+
isOpen() {
|
|
12898
|
+
return `${!this.show}`;
|
|
12899
|
+
},
|
|
12900
|
+
|
|
12901
|
+
modalListeners() {
|
|
12902
|
+
return {
|
|
12903
|
+
click: event => {
|
|
12904
|
+
event.target === event.currentTarget && this.close();
|
|
12905
|
+
},
|
|
12906
|
+
keydown: event => {
|
|
12907
|
+
switch (event.code) {
|
|
12908
|
+
case EVENT_KEYNAMES.esc:
|
|
12909
|
+
case EVENT_KEYNAMES.escape:
|
|
12910
|
+
this.close();
|
|
12911
|
+
break;
|
|
12912
|
+
|
|
12913
|
+
case EVENT_KEYNAMES.tab:
|
|
12914
|
+
this.trapFocus(event);
|
|
12915
|
+
break;
|
|
12916
|
+
}
|
|
12917
|
+
}
|
|
12918
|
+
};
|
|
12919
|
+
}
|
|
12920
|
+
|
|
12921
|
+
},
|
|
12922
|
+
watch: {
|
|
12923
|
+
show: {
|
|
12924
|
+
immediate: true,
|
|
12925
|
+
|
|
12926
|
+
handler(isShowing) {
|
|
12927
|
+
if (isShowing) {
|
|
12928
|
+
// Set a reference to the previously-active element, to which we'll return focus on modal close.
|
|
12929
|
+
this.previousActiveElement = document.activeElement;
|
|
12930
|
+
} else {
|
|
12931
|
+
var _this$previousActiveE;
|
|
12932
|
+
|
|
12933
|
+
// Modal is being hidden, so return focus to the previously active element before clearing the reference.
|
|
12934
|
+
(_this$previousActiveE = this.previousActiveElement) === null || _this$previousActiveE === void 0 ? void 0 : _this$previousActiveE.focus();
|
|
12935
|
+
this.previousActiveElement = null;
|
|
12936
|
+
}
|
|
12937
|
+
}
|
|
12938
|
+
|
|
12939
|
+
}
|
|
12940
|
+
},
|
|
12941
|
+
methods: {
|
|
12942
|
+
open() {
|
|
12943
|
+
this.show = true;
|
|
12944
|
+
this.showCloseButton = true;
|
|
12945
|
+
setTimeout(() => {
|
|
12946
|
+
this.focusAfterOpen();
|
|
12947
|
+
});
|
|
12948
|
+
},
|
|
12949
|
+
|
|
12950
|
+
close() {
|
|
12951
|
+
this.show = false;
|
|
12952
|
+
},
|
|
12953
|
+
|
|
12954
|
+
focusAfterOpen() {
|
|
12955
|
+
var _this$$refs$closeImag;
|
|
12956
|
+
|
|
12957
|
+
(_this$$refs$closeImag = this.$refs.closeImage) === null || _this$$refs$closeImag === void 0 ? void 0 : _this$$refs$closeImag.$el.focus();
|
|
12958
|
+
},
|
|
12959
|
+
|
|
12960
|
+
trapFocus(e) {
|
|
12961
|
+
if (this.show) {
|
|
12962
|
+
this.focusTrappedTabPress(e);
|
|
12963
|
+
}
|
|
12964
|
+
}
|
|
12965
|
+
|
|
12966
|
+
}
|
|
12967
|
+
});
|
|
12968
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue?vue&type=script&lang=js
|
|
12969
|
+
|
|
12970
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue
|
|
12971
|
+
|
|
12972
|
+
|
|
12973
|
+
|
|
12974
|
+
|
|
12975
|
+
;
|
|
12976
|
+
const image_viewer_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(image_viewervue_type_script_lang_js, [['render',image_viewervue_type_template_id_2229fad0_render]])
|
|
12977
|
+
|
|
12978
|
+
/* harmony default export */ const image_viewer = (image_viewer_exports_);
|
|
12979
|
+
;// CONCATENATED MODULE: ./components/image_viewer/index.js
|
|
12980
|
+
|
|
12763
12981
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/input/input.vue?vue&type=template&id=2ab65018
|
|
12764
12982
|
|
|
12765
12983
|
const inputvue_type_template_id_2ab65018_hoisted_1 = {
|
|
@@ -23780,6 +23998,7 @@ const contact_row_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(contac
|
|
|
23780
23998
|
|
|
23781
23999
|
|
|
23782
24000
|
|
|
24001
|
+
|
|
23783
24002
|
|
|
23784
24003
|
|
|
23785
24004
|
/// Recipes
|
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -1181,6 +1181,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1181
1181
|
"DtDropdownSeparator": () => (/* reexport */ dropdown_separator),
|
|
1182
1182
|
"DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
|
|
1183
1183
|
"DtIcon": () => (/* reexport */ icon),
|
|
1184
|
+
"DtImageViewer": () => (/* reexport */ image_viewer),
|
|
1184
1185
|
"DtInput": () => (/* reexport */ input_input),
|
|
1185
1186
|
"DtInputGroup": () => (/* reexport */ input_group_input_group),
|
|
1186
1187
|
"DtInputGroupMixin": () => (/* reexport */ InputGroupMixin),
|
|
@@ -12770,6 +12771,223 @@ const dropdown_separator_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)
|
|
|
12770
12771
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
12771
12772
|
|
|
12772
12773
|
|
|
12774
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/image_viewer/image_viewer.vue?vue&type=template&id=2229fad0
|
|
12775
|
+
|
|
12776
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_1 = ["src", "alt"];
|
|
12777
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_2 = ["aria-hidden"];
|
|
12778
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_3 = {
|
|
12779
|
+
"data-qa": "dt-image-viewer-full",
|
|
12780
|
+
class: "d-p0 d-bar0 d-wmx80p d-hmx80p",
|
|
12781
|
+
role: "dialog",
|
|
12782
|
+
"aria-modal": "true"
|
|
12783
|
+
};
|
|
12784
|
+
const image_viewervue_type_template_id_2229fad0_hoisted_4 = ["src", "alt"];
|
|
12785
|
+
function image_viewervue_type_template_id_2229fad0_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12786
|
+
const _component_dt_button = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-button");
|
|
12787
|
+
|
|
12788
|
+
const _component_dt_icon = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-icon");
|
|
12789
|
+
|
|
12790
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", null, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_dt_button, {
|
|
12791
|
+
"data-qa": "dt-image-viewer-preview",
|
|
12792
|
+
"aria-label": $props.ariaLabel,
|
|
12793
|
+
importance: "clear",
|
|
12794
|
+
onClick: $options.open
|
|
12795
|
+
}, {
|
|
12796
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
|
|
12797
|
+
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)($props.imageButtonClass),
|
|
12798
|
+
src: $props.imageSrc,
|
|
12799
|
+
alt: $props.imageAlt
|
|
12800
|
+
}, null, 10, image_viewervue_type_template_id_2229fad0_hoisted_1)]),
|
|
12801
|
+
_: 1
|
|
12802
|
+
}, 8, ["aria-label", "onClick"]), $data.show ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Teleport, {
|
|
12803
|
+
key: 0,
|
|
12804
|
+
to: "body"
|
|
12805
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
12806
|
+
"aria-hidden": $options.isOpen,
|
|
12807
|
+
class: "d-modal",
|
|
12808
|
+
"data-qa": "dt-modal"
|
|
12809
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toHandlers)($options.modalListeners, true), {
|
|
12810
|
+
onMouseover: _cache[0] || (_cache[0] = $event => $data.showCloseButton = true),
|
|
12811
|
+
onMouseleave: _cache[1] || (_cache[1] = $event => $data.showCloseButton = false),
|
|
12812
|
+
onFocusin: _cache[2] || (_cache[2] = $event => $data.showCloseButton = true),
|
|
12813
|
+
onFocusout: _cache[3] || (_cache[3] = $event => $data.showCloseButton = false)
|
|
12814
|
+
}), [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", image_viewervue_type_template_id_2229fad0_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
|
|
12815
|
+
class: "d-wmx100p d-hmx100p",
|
|
12816
|
+
src: $props.imageSrc,
|
|
12817
|
+
alt: $props.imageAlt
|
|
12818
|
+
}, null, 8, image_viewervue_type_template_id_2229fad0_hoisted_4)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Transition, {
|
|
12819
|
+
name: "fade"
|
|
12820
|
+
}, {
|
|
12821
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [$data.showCloseButton ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_dt_button, {
|
|
12822
|
+
key: 0,
|
|
12823
|
+
ref: "closeImage",
|
|
12824
|
+
"data-qa": "dt-image-viewer-close-btn",
|
|
12825
|
+
class: "d-modal__close",
|
|
12826
|
+
circle: "",
|
|
12827
|
+
size: "lg",
|
|
12828
|
+
importance: "clear",
|
|
12829
|
+
kind: "inverted",
|
|
12830
|
+
"aria-label": $props.closeAriaLabel,
|
|
12831
|
+
onClick: $options.close
|
|
12832
|
+
}, {
|
|
12833
|
+
icon: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_dt_icon, {
|
|
12834
|
+
name: "close",
|
|
12835
|
+
size: "400"
|
|
12836
|
+
})]),
|
|
12837
|
+
_: 1
|
|
12838
|
+
}, 8, ["aria-label", "onClick"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]),
|
|
12839
|
+
_: 1
|
|
12840
|
+
})], 16, image_viewervue_type_template_id_2229fad0_hoisted_2)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]);
|
|
12841
|
+
}
|
|
12842
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue?vue&type=template&id=2229fad0
|
|
12843
|
+
|
|
12844
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/image_viewer/image_viewer.vue?vue&type=script&lang=js
|
|
12845
|
+
|
|
12846
|
+
|
|
12847
|
+
|
|
12848
|
+
|
|
12849
|
+
/* harmony default export */ const image_viewervue_type_script_lang_js = ({
|
|
12850
|
+
name: 'DtImageViewer',
|
|
12851
|
+
components: {
|
|
12852
|
+
DtButton: button_button,
|
|
12853
|
+
DtIcon: icon
|
|
12854
|
+
},
|
|
12855
|
+
mixins: [modal],
|
|
12856
|
+
props: {
|
|
12857
|
+
/**
|
|
12858
|
+
* URL of the image to be shown
|
|
12859
|
+
*/
|
|
12860
|
+
imageSrc: {
|
|
12861
|
+
type: String,
|
|
12862
|
+
required: true
|
|
12863
|
+
},
|
|
12864
|
+
|
|
12865
|
+
/**
|
|
12866
|
+
* Alt text of image
|
|
12867
|
+
*/
|
|
12868
|
+
imageAlt: {
|
|
12869
|
+
type: String,
|
|
12870
|
+
required: true
|
|
12871
|
+
},
|
|
12872
|
+
|
|
12873
|
+
/**
|
|
12874
|
+
* Image Class
|
|
12875
|
+
*/
|
|
12876
|
+
imageButtonClass: {
|
|
12877
|
+
type: String,
|
|
12878
|
+
required: false,
|
|
12879
|
+
default: ''
|
|
12880
|
+
},
|
|
12881
|
+
|
|
12882
|
+
/**
|
|
12883
|
+
* Aria label
|
|
12884
|
+
*/
|
|
12885
|
+
ariaLabel: {
|
|
12886
|
+
type: String,
|
|
12887
|
+
required: true
|
|
12888
|
+
},
|
|
12889
|
+
|
|
12890
|
+
/**
|
|
12891
|
+
* Aria label for close button
|
|
12892
|
+
*/
|
|
12893
|
+
closeAriaLabel: {
|
|
12894
|
+
type: String,
|
|
12895
|
+
required: true
|
|
12896
|
+
}
|
|
12897
|
+
},
|
|
12898
|
+
|
|
12899
|
+
data() {
|
|
12900
|
+
return {
|
|
12901
|
+
show: false,
|
|
12902
|
+
showCloseButton: true
|
|
12903
|
+
};
|
|
12904
|
+
},
|
|
12905
|
+
|
|
12906
|
+
computed: {
|
|
12907
|
+
isOpen() {
|
|
12908
|
+
return `${!this.show}`;
|
|
12909
|
+
},
|
|
12910
|
+
|
|
12911
|
+
modalListeners() {
|
|
12912
|
+
return {
|
|
12913
|
+
click: event => {
|
|
12914
|
+
event.target === event.currentTarget && this.close();
|
|
12915
|
+
},
|
|
12916
|
+
keydown: event => {
|
|
12917
|
+
switch (event.code) {
|
|
12918
|
+
case EVENT_KEYNAMES.esc:
|
|
12919
|
+
case EVENT_KEYNAMES.escape:
|
|
12920
|
+
this.close();
|
|
12921
|
+
break;
|
|
12922
|
+
|
|
12923
|
+
case EVENT_KEYNAMES.tab:
|
|
12924
|
+
this.trapFocus(event);
|
|
12925
|
+
break;
|
|
12926
|
+
}
|
|
12927
|
+
}
|
|
12928
|
+
};
|
|
12929
|
+
}
|
|
12930
|
+
|
|
12931
|
+
},
|
|
12932
|
+
watch: {
|
|
12933
|
+
show: {
|
|
12934
|
+
immediate: true,
|
|
12935
|
+
|
|
12936
|
+
handler(isShowing) {
|
|
12937
|
+
if (isShowing) {
|
|
12938
|
+
// Set a reference to the previously-active element, to which we'll return focus on modal close.
|
|
12939
|
+
this.previousActiveElement = document.activeElement;
|
|
12940
|
+
} else {
|
|
12941
|
+
var _this$previousActiveE;
|
|
12942
|
+
|
|
12943
|
+
// Modal is being hidden, so return focus to the previously active element before clearing the reference.
|
|
12944
|
+
(_this$previousActiveE = this.previousActiveElement) === null || _this$previousActiveE === void 0 ? void 0 : _this$previousActiveE.focus();
|
|
12945
|
+
this.previousActiveElement = null;
|
|
12946
|
+
}
|
|
12947
|
+
}
|
|
12948
|
+
|
|
12949
|
+
}
|
|
12950
|
+
},
|
|
12951
|
+
methods: {
|
|
12952
|
+
open() {
|
|
12953
|
+
this.show = true;
|
|
12954
|
+
this.showCloseButton = true;
|
|
12955
|
+
setTimeout(() => {
|
|
12956
|
+
this.focusAfterOpen();
|
|
12957
|
+
});
|
|
12958
|
+
},
|
|
12959
|
+
|
|
12960
|
+
close() {
|
|
12961
|
+
this.show = false;
|
|
12962
|
+
},
|
|
12963
|
+
|
|
12964
|
+
focusAfterOpen() {
|
|
12965
|
+
var _this$$refs$closeImag;
|
|
12966
|
+
|
|
12967
|
+
(_this$$refs$closeImag = this.$refs.closeImage) === null || _this$$refs$closeImag === void 0 ? void 0 : _this$$refs$closeImag.$el.focus();
|
|
12968
|
+
},
|
|
12969
|
+
|
|
12970
|
+
trapFocus(e) {
|
|
12971
|
+
if (this.show) {
|
|
12972
|
+
this.focusTrappedTabPress(e);
|
|
12973
|
+
}
|
|
12974
|
+
}
|
|
12975
|
+
|
|
12976
|
+
}
|
|
12977
|
+
});
|
|
12978
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue?vue&type=script&lang=js
|
|
12979
|
+
|
|
12980
|
+
;// CONCATENATED MODULE: ./components/image_viewer/image_viewer.vue
|
|
12981
|
+
|
|
12982
|
+
|
|
12983
|
+
|
|
12984
|
+
|
|
12985
|
+
;
|
|
12986
|
+
const image_viewer_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(image_viewervue_type_script_lang_js, [['render',image_viewervue_type_template_id_2229fad0_render]])
|
|
12987
|
+
|
|
12988
|
+
/* harmony default export */ const image_viewer = (image_viewer_exports_);
|
|
12989
|
+
;// CONCATENATED MODULE: ./components/image_viewer/index.js
|
|
12990
|
+
|
|
12773
12991
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/input/input.vue?vue&type=template&id=2ab65018
|
|
12774
12992
|
|
|
12775
12993
|
const inputvue_type_template_id_2ab65018_hoisted_1 = {
|
|
@@ -23790,6 +24008,7 @@ const contact_row_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(contac
|
|
|
23790
24008
|
|
|
23791
24009
|
|
|
23792
24010
|
|
|
24011
|
+
|
|
23793
24012
|
|
|
23794
24013
|
|
|
23795
24014
|
/// Recipes
|