@webitel/ui-sdk 2.1.15 → 2.1.16

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.
@@ -2208,6 +2208,76 @@ if ($defineProperty) {
2208
2208
  }
2209
2209
 
2210
2210
 
2211
+ /***/ }),
2212
+
2213
+ /***/ 6485:
2214
+ /***/ (function(module) {
2215
+
2216
+ /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2217
+ /* global DOMException */
2218
+
2219
+ module.exports = clipboardCopy
2220
+
2221
+ function makeError () {
2222
+ return new DOMException('The request is not allowed', 'NotAllowedError')
2223
+ }
2224
+
2225
+ async function copyClipboardApi (text) {
2226
+ // Use the Async Clipboard API when available. Requires a secure browsing
2227
+ // context (i.e. HTTPS)
2228
+ if (!navigator.clipboard) {
2229
+ throw makeError()
2230
+ }
2231
+ return navigator.clipboard.writeText(text)
2232
+ }
2233
+
2234
+ async function copyExecCommand (text) {
2235
+ // Put the text to copy into a <span>
2236
+ const span = document.createElement('span')
2237
+ span.textContent = text
2238
+
2239
+ // Preserve consecutive spaces and newlines
2240
+ span.style.whiteSpace = 'pre'
2241
+ span.style.webkitUserSelect = 'auto'
2242
+ span.style.userSelect = 'all'
2243
+
2244
+ // Add the <span> to the page
2245
+ document.body.appendChild(span)
2246
+
2247
+ // Make a selection object representing the range of text selected by the user
2248
+ const selection = window.getSelection()
2249
+ const range = window.document.createRange()
2250
+ selection.removeAllRanges()
2251
+ range.selectNode(span)
2252
+ selection.addRange(range)
2253
+
2254
+ // Copy text to the clipboard
2255
+ let success = false
2256
+ try {
2257
+ success = window.document.execCommand('copy')
2258
+ } finally {
2259
+ // Cleanup
2260
+ selection.removeAllRanges()
2261
+ window.document.body.removeChild(span)
2262
+ }
2263
+
2264
+ if (!success) throw makeError()
2265
+ }
2266
+
2267
+ async function clipboardCopy (text) {
2268
+ try {
2269
+ await copyClipboardApi(text)
2270
+ } catch (err) {
2271
+ // ...Otherwise, use document.execCommand() fallback
2272
+ try {
2273
+ await copyExecCommand(text)
2274
+ } catch (err2) {
2275
+ throw (err2 || err || makeError())
2276
+ }
2277
+ }
2278
+ }
2279
+
2280
+
2211
2281
  /***/ }),
2212
2282
 
2213
2283
  /***/ 5108:
@@ -22980,6 +23050,121 @@ var wt_hint_component = componentNormalizer_normalizeComponent(
22980
23050
  )
22981
23051
 
22982
23052
  /* harmony default export */ var wt_hint = (wt_hint_component.exports);
23053
+ ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/molecules/wt-copy-action/wt-copy-action.vue?vue&type=template&id=56abdfcf&scoped=true&
23054
+ var wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('wt-tooltip',{staticClass:"wt-copy-action",scopedSlots:_vm._u([{key:"activator",fn:function(){return [_c('wt-icon-btn',_vm._b({staticClass:"copy-action",attrs:{"icon":_vm.copied ? 'done' : 'copy'},on:{"click":_vm.copy}},'wt-icon-btn',_vm.$attrs,false))]},proxy:true}])},[_vm._v(" "+_vm._s(_vm.copied ? _vm.copiedTooltip : _vm.copyTooltip)+" ")])}
23055
+ var wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_staticRenderFns = []
23056
+
23057
+
23058
+ // EXTERNAL MODULE: ./node_modules/clipboard-copy/index.js
23059
+ var clipboard_copy = __webpack_require__(6485);
23060
+ var clipboard_copy_default = /*#__PURE__*/__webpack_require__.n(clipboard_copy);
23061
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/molecules/wt-copy-action/wt-copy-action.vue?vue&type=script&lang=js&
23062
+
23063
+
23064
+ //
23065
+ //
23066
+ //
23067
+ //
23068
+ //
23069
+ //
23070
+ //
23071
+ //
23072
+ //
23073
+ //
23074
+ //
23075
+ //
23076
+ //
23077
+ //
23078
+
23079
+ var copiedIdTimeout = null;
23080
+ /* harmony default export */ var wt_copy_actionvue_type_script_lang_js_ = ({
23081
+ name: 'wt-copy-action',
23082
+ data: function data() {
23083
+ return {
23084
+ copied: false
23085
+ };
23086
+ },
23087
+ props: {
23088
+ value: {
23089
+ type: String
23090
+ },
23091
+ tooltips: {
23092
+ type: Object,
23093
+ default: function _default() {
23094
+ return {
23095
+ copy: '',
23096
+ copied: ''
23097
+ };
23098
+ }
23099
+ }
23100
+ },
23101
+ computed: {
23102
+ copyTooltip: function copyTooltip() {
23103
+ return this.tooltips.copy || this.$t('webitelUI.copyAction.copy');
23104
+ },
23105
+ copiedTooltip: function copiedTooltip() {
23106
+ return this.tooltips.copied || this.$t('webitelUI.copyAction.copied');
23107
+ }
23108
+ },
23109
+ methods: {
23110
+ copy: function copy() {
23111
+ var _this = this;
23112
+
23113
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
23114
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
23115
+ while (1) {
23116
+ switch (_context.prev = _context.next) {
23117
+ case 0:
23118
+ _context.prev = 0;
23119
+ _context.next = 3;
23120
+ return clipboard_copy_default()(_this.value);
23121
+
23122
+ case 3:
23123
+ _this.copied = _this.value;
23124
+ if (copiedIdTimeout) window.clearTimeout(copiedIdTimeout);
23125
+ copiedIdTimeout = setTimeout(function () {
23126
+ _this.copied = null;
23127
+ }, 1500);
23128
+ _context.next = 11;
23129
+ break;
23130
+
23131
+ case 8:
23132
+ _context.prev = 8;
23133
+ _context.t0 = _context["catch"](0);
23134
+ throw _context.t0;
23135
+
23136
+ case 11:
23137
+ case "end":
23138
+ return _context.stop();
23139
+ }
23140
+ }
23141
+ }, _callee, null, [[0, 8]]);
23142
+ }))();
23143
+ }
23144
+ }
23145
+ });
23146
+ ;// CONCATENATED MODULE: ./src/components/molecules/wt-copy-action/wt-copy-action.vue?vue&type=script&lang=js&
23147
+ /* harmony default export */ var wt_copy_action_wt_copy_actionvue_type_script_lang_js_ = (wt_copy_actionvue_type_script_lang_js_);
23148
+ ;// CONCATENATED MODULE: ./src/components/molecules/wt-copy-action/wt-copy-action.vue
23149
+
23150
+
23151
+
23152
+
23153
+
23154
+ /* normalize component */
23155
+ ;
23156
+ var wt_copy_action_component = componentNormalizer_normalizeComponent(
23157
+ wt_copy_action_wt_copy_actionvue_type_script_lang_js_,
23158
+ wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_render,
23159
+ wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_staticRenderFns,
23160
+ false,
23161
+ null,
23162
+ "56abdfcf",
23163
+ null
23164
+
23165
+ )
23166
+
23167
+ /* harmony default export */ var wt_copy_action = (wt_copy_action_component.exports);
22983
23168
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/organisms/wt-app-header/wt-app-header.vue?vue&type=template&id=747a7a52&scoped=true&
22984
23169
  var wt_app_headervue_type_template_id_747a7a52_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"wt-app-header"},[_vm._t("default")],2)}
22985
23170
  var wt_app_headervue_type_template_id_747a7a52_scoped_true_staticRenderFns = []
@@ -25254,6 +25439,7 @@ var wt_table_column_select_component = componentNormalizer_normalizeComponent(
25254
25439
 
25255
25440
 
25256
25441
 
25442
+
25257
25443
 
25258
25444
 
25259
25445
  var Components = {
@@ -25305,7 +25491,8 @@ var Components = {
25305
25491
  WtTableActions: wt_table_actions,
25306
25492
  WtTableColumnSelect: wt_table_column_select,
25307
25493
  WtButtonSelect: wt_button_select,
25308
- WtContextMenu: wt_context_menu
25494
+ WtContextMenu: wt_context_menu,
25495
+ WtCopyAction: wt_copy_action
25309
25496
  };
25310
25497
  Object.keys(Components).forEach(function (name) {
25311
25498
  external_commonjs_vue_commonjs2_vue_root_Vue_default().component(name, Components[name]);