@webitel/ui-sdk 2.1.14 → 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.
- package/dist/ui-sdk.common.js +197 -10
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +197 -10
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +6 -4
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +2 -1
- package/src/components/index.js +2 -0
- package/src/components/molecules/wt-copy-action/__tests__/WtCopyAction.spec.js +14 -0
- package/src/components/molecules/wt-copy-action/wt-copy-action.vue +63 -0
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +1 -1
- package/src/locale/en/en.js +4 -0
- package/src/locale/ru/ru.js +4 -0
- package/src/locale/ua/ua.js +4 -0
package/dist/ui-sdk.common.js
CHANGED
|
@@ -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:
|
|
@@ -22050,12 +22120,12 @@ var wt_tabs_component = componentNormalizer_normalizeComponent(
|
|
|
22050
22120
|
)
|
|
22051
22121
|
|
|
22052
22122
|
/* harmony default export */ var wt_tabs = (wt_tabs_component.exports);
|
|
22053
|
-
;// 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-tags-input/wt-tags-input.vue?vue&type=template&id=
|
|
22054
|
-
var
|
|
22123
|
+
;// 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-tags-input/wt-tags-input.vue?vue&type=template&id=80d88288&scoped=true&
|
|
22124
|
+
var wt_tags_inputvue_type_template_id_80d88288_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"wt-tags-input",class:{
|
|
22055
22125
|
'wt-tags-input--disabled': _vm.disabled,
|
|
22056
22126
|
'wt-tags-input--invalid': _vm.invalid,
|
|
22057
22127
|
'wt-tags-input--loading': _vm.isLoading,
|
|
22058
|
-
}},[(_vm.hasLabel)?_c('wt-label',_vm._b({staticClass:"wt-tags-input__label",attrs:{"disabled":_vm.disabled,"invalid":_vm.invalid}},'wt-label',_vm.labelProps,false),[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.requiredLabel))]},null,{ label: _vm.label })],2):_vm._e(),_c('vue-multiselect',_vm._g(_vm._b({ref:"vue-multiselect",staticClass:"wt-tags-input__select",attrs:{"close-on-select":false,"disabled":_vm.disabled,"internal-search":!_vm.searchMethod,"label":_vm.trackBy ? _vm.optionLabel : null,"loading":false,"options":_vm.selectOptions,"placeholder":_vm.placeholder || _vm.label,"taggable":_vm.taggable,"track-by":_vm.trackBy,"value":_vm.selectValue,"multiple":""},scopedSlots:_vm._u([{key:"tag",fn:function(ref){
|
|
22128
|
+
}},[(_vm.hasLabel)?_c('wt-label',_vm._b({staticClass:"wt-tags-input__label",attrs:{"disabled":_vm.disabled,"invalid":_vm.invalid}},'wt-label',_vm.labelProps,false),[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.requiredLabel))]},null,{ label: _vm.label })],2):_vm._e(),_c('vue-multiselect',_vm._g(_vm._b({ref:"vue-multiselect",staticClass:"wt-tags-input__select",attrs:{"close-on-select":false,"disabled":_vm.disabled,"internal-search":!_vm.searchMethod,"label":_vm.trackBy ? (_vm.optionLabel || _vm.trackBy) : null,"loading":false,"options":_vm.selectOptions,"placeholder":_vm.placeholder || _vm.label,"taggable":_vm.taggable,"track-by":_vm.trackBy,"value":_vm.selectValue,"multiple":""},scopedSlots:_vm._u([{key:"tag",fn:function(ref){
|
|
22059
22129
|
var option = ref.option;
|
|
22060
22130
|
var remove = ref.remove;
|
|
22061
22131
|
return [_c('wt-chip',{staticClass:"multiselect__custom-tag"},[_vm._v(" "+_vm._s(_vm.getTagOptionLabel({ option: option, optionLabel: _vm.optionLabel }))+" "),_c('wt-icon-btn',{attrs:{"icon":"close--filled","size":"sm"},on:{"click":function($event){return remove(option)}}})],1)]}},{key:"option",fn:function(ref){
|
|
@@ -22063,7 +22133,7 @@ return [_c('wt-chip',{staticClass:"multiselect__custom-tag"},[_vm._v(" "+_vm._s(
|
|
|
22063
22133
|
return [_vm._t("option",function(){return [_vm._v(" "+_vm._s(_vm.getTagOptionLabel({ option: option, optionLabel: _vm.optionLabel }))+" ")]},null,{ option: option, optionLabel: _vm.optionLabel })]}},{key:"caret",fn:function(ref){
|
|
22064
22134
|
var toggle = ref.toggle;
|
|
22065
22135
|
return [_c('wt-icon-btn',{staticClass:"multiselect__select",attrs:{"disabled":_vm.disabled,"color":"active","icon":"arrow-down"},nativeOn:{"mousedown":function($event){$event.preventDefault();$event.stopPropagation();return toggle.apply(null, arguments)}}})]}},{key:"beforeList",fn:function(){return [_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isLoading),expression:"isLoading"}],staticClass:"multiselect__loading-wrapper"},[_c('wt-loader',{attrs:{"size":"sm"}})],1)]},proxy:true},(_vm.showIntersectionObserver)?{key:"afterList",fn:function(){return [_c('div',{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:(_vm.handleAfterListIntersect),expression:"handleAfterListIntersect"}]})]},proxy:true}:null],null,true)},'vue-multiselect',_vm.$attrs,false),_vm.listeners)),(_vm.isValidation)?_c('wt-input-info',{attrs:{"invalid":_vm.invalid}},[_vm._v(_vm._s(_vm.validationText)+" ")]):_vm._e()],1)}
|
|
22066
|
-
var
|
|
22136
|
+
var wt_tags_inputvue_type_template_id_80d88288_scoped_true_staticRenderFns = []
|
|
22067
22137
|
|
|
22068
22138
|
|
|
22069
22139
|
;// 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-tags-input/wt-tags-input.vue?vue&type=script&lang=js&
|
|
@@ -22228,10 +22298,10 @@ var wt_tags_inputvue_type_template_id_0d9325ba_scoped_true_staticRenderFns = []
|
|
|
22228
22298
|
});
|
|
22229
22299
|
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=script&lang=js&
|
|
22230
22300
|
/* harmony default export */ var wt_tags_input_wt_tags_inputvue_type_script_lang_js_ = (wt_tags_inputvue_type_script_lang_js_);
|
|
22231
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=
|
|
22301
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=80d88288&lang=scss&scoped=true&
|
|
22232
22302
|
// extracted by mini-css-extract-plugin
|
|
22233
22303
|
|
|
22234
|
-
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=
|
|
22304
|
+
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=80d88288&lang=scss&scoped=true&
|
|
22235
22305
|
|
|
22236
22306
|
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue
|
|
22237
22307
|
|
|
@@ -22244,11 +22314,11 @@ var wt_tags_inputvue_type_template_id_0d9325ba_scoped_true_staticRenderFns = []
|
|
|
22244
22314
|
|
|
22245
22315
|
var wt_tags_input_component = componentNormalizer_normalizeComponent(
|
|
22246
22316
|
wt_tags_input_wt_tags_inputvue_type_script_lang_js_,
|
|
22247
|
-
|
|
22248
|
-
|
|
22317
|
+
wt_tags_inputvue_type_template_id_80d88288_scoped_true_render,
|
|
22318
|
+
wt_tags_inputvue_type_template_id_80d88288_scoped_true_staticRenderFns,
|
|
22249
22319
|
false,
|
|
22250
22320
|
null,
|
|
22251
|
-
"
|
|
22321
|
+
"80d88288",
|
|
22252
22322
|
null
|
|
22253
22323
|
|
|
22254
22324
|
)
|
|
@@ -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]);
|