@webitel/ui-sdk 2.1.15 → 2.1.17
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.umd.js
CHANGED
|
@@ -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:
|
|
@@ -22068,12 +22138,12 @@ var wt_tabs_component = componentNormalizer_normalizeComponent(
|
|
|
22068
22138
|
)
|
|
22069
22139
|
|
|
22070
22140
|
/* harmony default export */ var wt_tabs = (wt_tabs_component.exports);
|
|
22071
|
-
;// 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=
|
|
22072
|
-
var
|
|
22141
|
+
;// 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=0d9325ba&scoped=true&
|
|
22142
|
+
var wt_tags_inputvue_type_template_id_0d9325ba_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:{
|
|
22073
22143
|
'wt-tags-input--disabled': _vm.disabled,
|
|
22074
22144
|
'wt-tags-input--invalid': _vm.invalid,
|
|
22075
22145
|
'wt-tags-input--loading': _vm.isLoading,
|
|
22076
|
-
}},[(_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 ?
|
|
22146
|
+
}},[(_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){
|
|
22077
22147
|
var option = ref.option;
|
|
22078
22148
|
var remove = ref.remove;
|
|
22079
22149
|
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){
|
|
@@ -22081,7 +22151,7 @@ return [_c('wt-chip',{staticClass:"multiselect__custom-tag"},[_vm._v(" "+_vm._s(
|
|
|
22081
22151
|
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){
|
|
22082
22152
|
var toggle = ref.toggle;
|
|
22083
22153
|
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)}
|
|
22084
|
-
var
|
|
22154
|
+
var wt_tags_inputvue_type_template_id_0d9325ba_scoped_true_staticRenderFns = []
|
|
22085
22155
|
|
|
22086
22156
|
|
|
22087
22157
|
;// 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-tags-input/wt-tags-input.vue?vue&type=script&lang=js&
|
|
@@ -22246,10 +22316,10 @@ var wt_tags_inputvue_type_template_id_80d88288_scoped_true_staticRenderFns = []
|
|
|
22246
22316
|
});
|
|
22247
22317
|
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=script&lang=js&
|
|
22248
22318
|
/* harmony default export */ var wt_tags_input_wt_tags_inputvue_type_script_lang_js_ = (wt_tags_inputvue_type_script_lang_js_);
|
|
22249
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63[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=
|
|
22319
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63[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=0d9325ba&lang=scss&scoped=true&
|
|
22250
22320
|
// extracted by mini-css-extract-plugin
|
|
22251
22321
|
|
|
22252
|
-
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=
|
|
22322
|
+
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue?vue&type=style&index=0&id=0d9325ba&lang=scss&scoped=true&
|
|
22253
22323
|
|
|
22254
22324
|
;// CONCATENATED MODULE: ./src/components/molecules/wt-tags-input/wt-tags-input.vue
|
|
22255
22325
|
|
|
@@ -22262,11 +22332,11 @@ var wt_tags_inputvue_type_template_id_80d88288_scoped_true_staticRenderFns = []
|
|
|
22262
22332
|
|
|
22263
22333
|
var wt_tags_input_component = componentNormalizer_normalizeComponent(
|
|
22264
22334
|
wt_tags_input_wt_tags_inputvue_type_script_lang_js_,
|
|
22265
|
-
|
|
22266
|
-
|
|
22335
|
+
wt_tags_inputvue_type_template_id_0d9325ba_scoped_true_render,
|
|
22336
|
+
wt_tags_inputvue_type_template_id_0d9325ba_scoped_true_staticRenderFns,
|
|
22267
22337
|
false,
|
|
22268
22338
|
null,
|
|
22269
|
-
"
|
|
22339
|
+
"0d9325ba",
|
|
22270
22340
|
null
|
|
22271
22341
|
|
|
22272
22342
|
)
|
|
@@ -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]);
|