@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.
@@ -2218,6 +2218,76 @@ if ($defineProperty) {
2218
2218
  }
2219
2219
 
2220
2220
 
2221
+ /***/ }),
2222
+
2223
+ /***/ 6485:
2224
+ /***/ (function(module) {
2225
+
2226
+ /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2227
+ /* global DOMException */
2228
+
2229
+ module.exports = clipboardCopy
2230
+
2231
+ function makeError () {
2232
+ return new DOMException('The request is not allowed', 'NotAllowedError')
2233
+ }
2234
+
2235
+ async function copyClipboardApi (text) {
2236
+ // Use the Async Clipboard API when available. Requires a secure browsing
2237
+ // context (i.e. HTTPS)
2238
+ if (!navigator.clipboard) {
2239
+ throw makeError()
2240
+ }
2241
+ return navigator.clipboard.writeText(text)
2242
+ }
2243
+
2244
+ async function copyExecCommand (text) {
2245
+ // Put the text to copy into a <span>
2246
+ const span = document.createElement('span')
2247
+ span.textContent = text
2248
+
2249
+ // Preserve consecutive spaces and newlines
2250
+ span.style.whiteSpace = 'pre'
2251
+ span.style.webkitUserSelect = 'auto'
2252
+ span.style.userSelect = 'all'
2253
+
2254
+ // Add the <span> to the page
2255
+ document.body.appendChild(span)
2256
+
2257
+ // Make a selection object representing the range of text selected by the user
2258
+ const selection = window.getSelection()
2259
+ const range = window.document.createRange()
2260
+ selection.removeAllRanges()
2261
+ range.selectNode(span)
2262
+ selection.addRange(range)
2263
+
2264
+ // Copy text to the clipboard
2265
+ let success = false
2266
+ try {
2267
+ success = window.document.execCommand('copy')
2268
+ } finally {
2269
+ // Cleanup
2270
+ selection.removeAllRanges()
2271
+ window.document.body.removeChild(span)
2272
+ }
2273
+
2274
+ if (!success) throw makeError()
2275
+ }
2276
+
2277
+ async function clipboardCopy (text) {
2278
+ try {
2279
+ await copyClipboardApi(text)
2280
+ } catch (err) {
2281
+ // ...Otherwise, use document.execCommand() fallback
2282
+ try {
2283
+ await copyExecCommand(text)
2284
+ } catch (err2) {
2285
+ throw (err2 || err || makeError())
2286
+ }
2287
+ }
2288
+ }
2289
+
2290
+
2221
2291
  /***/ }),
2222
2292
 
2223
2293
  /***/ 5108:
@@ -22998,6 +23068,121 @@ var wt_hint_component = componentNormalizer_normalizeComponent(
22998
23068
  )
22999
23069
 
23000
23070
  /* harmony default export */ var wt_hint = (wt_hint_component.exports);
23071
+ ;// 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&
23072
+ 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)+" ")])}
23073
+ var wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_staticRenderFns = []
23074
+
23075
+
23076
+ // EXTERNAL MODULE: ./node_modules/clipboard-copy/index.js
23077
+ var clipboard_copy = __webpack_require__(6485);
23078
+ var clipboard_copy_default = /*#__PURE__*/__webpack_require__.n(clipboard_copy);
23079
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81[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&
23080
+
23081
+
23082
+ //
23083
+ //
23084
+ //
23085
+ //
23086
+ //
23087
+ //
23088
+ //
23089
+ //
23090
+ //
23091
+ //
23092
+ //
23093
+ //
23094
+ //
23095
+ //
23096
+
23097
+ var copiedIdTimeout = null;
23098
+ /* harmony default export */ var wt_copy_actionvue_type_script_lang_js_ = ({
23099
+ name: 'wt-copy-action',
23100
+ data: function data() {
23101
+ return {
23102
+ copied: false
23103
+ };
23104
+ },
23105
+ props: {
23106
+ value: {
23107
+ type: String
23108
+ },
23109
+ tooltips: {
23110
+ type: Object,
23111
+ default: function _default() {
23112
+ return {
23113
+ copy: '',
23114
+ copied: ''
23115
+ };
23116
+ }
23117
+ }
23118
+ },
23119
+ computed: {
23120
+ copyTooltip: function copyTooltip() {
23121
+ return this.tooltips.copy || this.$t('webitelUI.copyAction.copy');
23122
+ },
23123
+ copiedTooltip: function copiedTooltip() {
23124
+ return this.tooltips.copied || this.$t('webitelUI.copyAction.copied');
23125
+ }
23126
+ },
23127
+ methods: {
23128
+ copy: function copy() {
23129
+ var _this = this;
23130
+
23131
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
23132
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
23133
+ while (1) {
23134
+ switch (_context.prev = _context.next) {
23135
+ case 0:
23136
+ _context.prev = 0;
23137
+ _context.next = 3;
23138
+ return clipboard_copy_default()(_this.value);
23139
+
23140
+ case 3:
23141
+ _this.copied = _this.value;
23142
+ if (copiedIdTimeout) window.clearTimeout(copiedIdTimeout);
23143
+ copiedIdTimeout = setTimeout(function () {
23144
+ _this.copied = null;
23145
+ }, 1500);
23146
+ _context.next = 11;
23147
+ break;
23148
+
23149
+ case 8:
23150
+ _context.prev = 8;
23151
+ _context.t0 = _context["catch"](0);
23152
+ throw _context.t0;
23153
+
23154
+ case 11:
23155
+ case "end":
23156
+ return _context.stop();
23157
+ }
23158
+ }
23159
+ }, _callee, null, [[0, 8]]);
23160
+ }))();
23161
+ }
23162
+ }
23163
+ });
23164
+ ;// CONCATENATED MODULE: ./src/components/molecules/wt-copy-action/wt-copy-action.vue?vue&type=script&lang=js&
23165
+ /* harmony default export */ var wt_copy_action_wt_copy_actionvue_type_script_lang_js_ = (wt_copy_actionvue_type_script_lang_js_);
23166
+ ;// CONCATENATED MODULE: ./src/components/molecules/wt-copy-action/wt-copy-action.vue
23167
+
23168
+
23169
+
23170
+
23171
+
23172
+ /* normalize component */
23173
+ ;
23174
+ var wt_copy_action_component = componentNormalizer_normalizeComponent(
23175
+ wt_copy_action_wt_copy_actionvue_type_script_lang_js_,
23176
+ wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_render,
23177
+ wt_copy_actionvue_type_template_id_56abdfcf_scoped_true_staticRenderFns,
23178
+ false,
23179
+ null,
23180
+ "56abdfcf",
23181
+ null
23182
+
23183
+ )
23184
+
23185
+ /* harmony default export */ var wt_copy_action = (wt_copy_action_component.exports);
23001
23186
  ;// 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&
23002
23187
  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)}
23003
23188
  var wt_app_headervue_type_template_id_747a7a52_scoped_true_staticRenderFns = []
@@ -25272,6 +25457,7 @@ var wt_table_column_select_component = componentNormalizer_normalizeComponent(
25272
25457
 
25273
25458
 
25274
25459
 
25460
+
25275
25461
 
25276
25462
 
25277
25463
  var Components = {
@@ -25323,7 +25509,8 @@ var Components = {
25323
25509
  WtTableActions: wt_table_actions,
25324
25510
  WtTableColumnSelect: wt_table_column_select,
25325
25511
  WtButtonSelect: wt_button_select,
25326
- WtContextMenu: wt_context_menu
25512
+ WtContextMenu: wt_context_menu,
25513
+ WtCopyAction: wt_copy_action
25327
25514
  };
25328
25515
  Object.keys(Components).forEach(function (name) {
25329
25516
  external_commonjs_vue_commonjs2_vue_root_Vue_default().component(name, Components[name]);