@dialpad/dialtone-vue 3.7.0 → 3.8.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.
|
@@ -1119,6 +1119,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1119
1119
|
"DtCombobox": () => (/* reexport */ combobox),
|
|
1120
1120
|
"DtDropdown": () => (/* reexport */ dropdown),
|
|
1121
1121
|
"DtEmoji": () => (/* reexport */ emoji),
|
|
1122
|
+
"DtEmojiTextWrapper": () => (/* reexport */ emoji_text_wrapper),
|
|
1122
1123
|
"DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
|
|
1123
1124
|
"DtInput": () => (/* reexport */ input_input),
|
|
1124
1125
|
"DtInputGroup": () => (/* reexport */ input_group_input_group),
|
|
@@ -1190,6 +1191,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1190
1191
|
"USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
|
|
1191
1192
|
"VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
|
|
1192
1193
|
"codeToEmojiData": () => (/* reexport */ codeToEmojiData),
|
|
1194
|
+
"customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
|
|
1193
1195
|
"defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
|
|
1194
1196
|
"emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
|
|
1195
1197
|
"emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
|
|
@@ -1198,17 +1200,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1198
1200
|
"emojiJson": () => (/* reexport */ emojiJson),
|
|
1199
1201
|
"emojiVersion": () => (/* reexport */ emojiVersion),
|
|
1200
1202
|
"filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
|
|
1203
|
+
"filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
|
|
1201
1204
|
"findEmojis": () => (/* reexport */ findEmojis),
|
|
1202
1205
|
"findShortCodes": () => (/* reexport */ findShortCodes),
|
|
1203
1206
|
"formatMessages": () => (/* reexport */ formatMessages),
|
|
1207
|
+
"getEmojiData": () => (/* reexport */ getEmojiData),
|
|
1204
1208
|
"getEmojiJson": () => (/* reexport */ getEmojiJson),
|
|
1205
1209
|
"getUniqueString": () => (/* reexport */ getUniqueString),
|
|
1206
1210
|
"getValidationState": () => (/* reexport */ getValidationState),
|
|
1211
|
+
"setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
|
|
1212
|
+
"setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
|
|
1207
1213
|
"setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
|
|
1208
1214
|
"setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
|
|
1209
1215
|
"shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
|
|
1210
1216
|
"stringToUnicode": () => (/* reexport */ stringToUnicode),
|
|
1211
1217
|
"unicodeToString": () => (/* reexport */ unicodeToString),
|
|
1218
|
+
"validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
|
|
1212
1219
|
"validationMessageValidator": () => (/* reexport */ validationMessageValidator)
|
|
1213
1220
|
});
|
|
1214
1221
|
|
|
@@ -10255,10 +10262,10 @@ const dropdown_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(dropdownv
|
|
|
10255
10262
|
/* harmony default export */ const dropdown = (dropdown_exports_);
|
|
10256
10263
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
10257
10264
|
|
|
10258
|
-
;// 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/emoji/emoji.vue?vue&type=template&id=
|
|
10265
|
+
;// 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/emoji/emoji.vue?vue&type=template&id=85307cb0
|
|
10259
10266
|
|
|
10260
|
-
const
|
|
10261
|
-
function
|
|
10267
|
+
const emojivue_type_template_id_85307cb0_hoisted_1 = ["aria-label", "alt", "title", "src"];
|
|
10268
|
+
function emojivue_type_template_id_85307cb0_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10262
10269
|
const _component_dt_skeleton = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-skeleton");
|
|
10263
10270
|
|
|
10264
10271
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("span", {
|
|
@@ -10285,9 +10292,9 @@ function emojivue_type_template_id_010f8b36_render(_ctx, _cache, $props, $setup,
|
|
|
10285
10292
|
onError: _cache[1] || (_cache[1] = function () {
|
|
10286
10293
|
return $options.imageErrored && $options.imageErrored(...arguments);
|
|
10287
10294
|
})
|
|
10288
|
-
}, null, 42,
|
|
10295
|
+
}, null, 42, emojivue_type_template_id_85307cb0_hoisted_1)), [[external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.vShow, !$data.imgLoading]]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 2);
|
|
10289
10296
|
}
|
|
10290
|
-
;// CONCATENATED MODULE: ./components/emoji/emoji.vue?vue&type=template&id=
|
|
10297
|
+
;// CONCATENATED MODULE: ./components/emoji/emoji.vue?vue&type=template&id=85307cb0
|
|
10291
10298
|
|
|
10292
10299
|
;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
|
|
10293
10300
|
const EMOJI_SIZES = {
|
|
@@ -10310,7 +10317,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
|
|
|
10310
10317
|
;// CONCATENATED MODULE: ./common/emoji.js
|
|
10311
10318
|
|
|
10312
10319
|
const emojiVersion = '6.6';
|
|
10313
|
-
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
10320
|
+
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
10321
|
+
let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
|
|
10314
10322
|
|
|
10315
10323
|
let emojiImageUrlSmall = defaultEmojiAssetUrl;
|
|
10316
10324
|
let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
|
|
@@ -10322,6 +10330,9 @@ async function getEmojiJson() {
|
|
|
10322
10330
|
if (emojiJson) return;
|
|
10323
10331
|
emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
|
|
10324
10332
|
}
|
|
10333
|
+
function getEmojiData() {
|
|
10334
|
+
return emojiJson;
|
|
10335
|
+
}
|
|
10325
10336
|
function setEmojiAssetUrlSmall(url) {
|
|
10326
10337
|
let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
|
|
10327
10338
|
|
|
@@ -10341,6 +10352,69 @@ function setEmojiAssetUrlLarge(url) {
|
|
|
10341
10352
|
|
|
10342
10353
|
emojiImageUrlLarge = url;
|
|
10343
10354
|
emojiFileExtensionLarge = fileExtension;
|
|
10355
|
+
}
|
|
10356
|
+
function setCustomEmojiUrl(url) {
|
|
10357
|
+
customEmojiAssetUrl = url;
|
|
10358
|
+
}
|
|
10359
|
+
function setCustomEmojiJson(json) {
|
|
10360
|
+
validateCustomEmojiJson(json);
|
|
10361
|
+
}
|
|
10362
|
+
/**
|
|
10363
|
+
* Validate custom emoji json
|
|
10364
|
+
*/
|
|
10365
|
+
|
|
10366
|
+
async function validateCustomEmojiJson(json) {
|
|
10367
|
+
await getEmojiJson();
|
|
10368
|
+
const customEmojiProps = ['extension', 'custom'];
|
|
10369
|
+
const customEmojiRequiredProps = ['name', 'category', 'shortname', 'extension', 'custom'];
|
|
10370
|
+
/**
|
|
10371
|
+
* Update single emoji properties.
|
|
10372
|
+
* If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.
|
|
10373
|
+
* If not exists, will add the property to the emojiData object.
|
|
10374
|
+
*/
|
|
10375
|
+
|
|
10376
|
+
const _updateNativeEmojiData = (emojiData, propName, propValue) => {
|
|
10377
|
+
if (emojiData[propName] === undefined) {
|
|
10378
|
+
if (!customEmojiProps.includes(propName)) {
|
|
10379
|
+
return;
|
|
10380
|
+
} // new property to add
|
|
10381
|
+
|
|
10382
|
+
|
|
10383
|
+
emojiData[propName] = propValue;
|
|
10384
|
+
} else {
|
|
10385
|
+
if (Array.isArray(emojiData[propName])) {
|
|
10386
|
+
emojiData[propName] = emojiData[propName].concat(propValue);
|
|
10387
|
+
} else {
|
|
10388
|
+
emojiData[propName] = propValue;
|
|
10389
|
+
}
|
|
10390
|
+
}
|
|
10391
|
+
};
|
|
10392
|
+
|
|
10393
|
+
Object.entries(json).forEach(item => {
|
|
10394
|
+
const [customEmojiKey, customEmojiValue] = item;
|
|
10395
|
+
|
|
10396
|
+
if (customEmojiKey in emojiJson) {
|
|
10397
|
+
// custom emoji exists in emoji json which means to update some data in the native emoji
|
|
10398
|
+
const emojiData = emojiJson[customEmojiKey];
|
|
10399
|
+
|
|
10400
|
+
for (const customEmojiPropertyName in customEmojiValue) {
|
|
10401
|
+
const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];
|
|
10402
|
+
|
|
10403
|
+
_updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);
|
|
10404
|
+
}
|
|
10405
|
+
} else {
|
|
10406
|
+
// new custom emoji
|
|
10407
|
+
const _validateRequiredProps = () => customEmojiRequiredProps.every(val => {
|
|
10408
|
+
return customEmojiValue[val] !== undefined;
|
|
10409
|
+
});
|
|
10410
|
+
|
|
10411
|
+
if (_validateRequiredProps()) {
|
|
10412
|
+
emojiJson[customEmojiKey] = customEmojiValue;
|
|
10413
|
+
} else {
|
|
10414
|
+
console.error('The following custom emoji doesn\'t contain the required properties:', customEmojiValue);
|
|
10415
|
+
}
|
|
10416
|
+
}
|
|
10417
|
+
});
|
|
10344
10418
|
} // recursively searches the emoji data object containing data for all emojis
|
|
10345
10419
|
// and returns the object with the specified shortcode.
|
|
10346
10420
|
|
|
@@ -10365,7 +10439,7 @@ function shortcodeToEmojiData(shortcode) {
|
|
|
10365
10439
|
}
|
|
10366
10440
|
|
|
10367
10441
|
let reference;
|
|
10368
|
-
f(
|
|
10442
|
+
f(getEmojiData(), null);
|
|
10369
10443
|
return reference;
|
|
10370
10444
|
} // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
|
|
10371
10445
|
// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
|
|
@@ -10415,8 +10489,11 @@ async function codeToEmojiData(code) {
|
|
|
10415
10489
|
// @returns {string[]}
|
|
10416
10490
|
|
|
10417
10491
|
function findShortCodes(textContent) {
|
|
10418
|
-
const
|
|
10419
|
-
|
|
10492
|
+
const shortcodes = textContent.match(/:\w+:/g);
|
|
10493
|
+
return filterValidShortCodes(shortcodes);
|
|
10494
|
+
}
|
|
10495
|
+
function filterValidShortCodes(shortcodes) {
|
|
10496
|
+
const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];
|
|
10420
10497
|
return new Set(filtered);
|
|
10421
10498
|
} // Finds every emoji in slot text
|
|
10422
10499
|
// removes duplicates
|
|
@@ -10439,7 +10516,8 @@ function findEmojis(textContent) {
|
|
|
10439
10516
|
props: {
|
|
10440
10517
|
/**
|
|
10441
10518
|
* Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
|
|
10442
|
-
* See https://emojipedia.org/joypixels/ for all supported shortcode/unicode
|
|
10519
|
+
* See https://emojipedia.org/joypixels/ for all supported shortcode/unicode or the docs
|
|
10520
|
+
* for setting up custom emojis.
|
|
10443
10521
|
*/
|
|
10444
10522
|
code: {
|
|
10445
10523
|
type: String,
|
|
@@ -10492,8 +10570,15 @@ function findEmojis(textContent) {
|
|
|
10492
10570
|
},
|
|
10493
10571
|
|
|
10494
10572
|
emojiSrc() {
|
|
10573
|
+
var _this$emojiData;
|
|
10574
|
+
|
|
10495
10575
|
if (!this.emojiDataValid) {
|
|
10496
10576
|
return 'invalid';
|
|
10577
|
+
} // custom emoji
|
|
10578
|
+
|
|
10579
|
+
|
|
10580
|
+
if ((_this$emojiData = this.emojiData) !== null && _this$emojiData !== void 0 && _this$emojiData.custom) {
|
|
10581
|
+
return customEmojiAssetUrl + this.emojiData.key + this.emojiData.extension;
|
|
10497
10582
|
}
|
|
10498
10583
|
|
|
10499
10584
|
if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
|
|
@@ -10508,7 +10593,7 @@ function findEmojis(textContent) {
|
|
|
10508
10593
|
return undefined;
|
|
10509
10594
|
}
|
|
10510
10595
|
|
|
10511
|
-
return stringToUnicode(this.emojiData.unicode_output);
|
|
10596
|
+
return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
|
|
10512
10597
|
},
|
|
10513
10598
|
|
|
10514
10599
|
emojiLabel() {
|
|
@@ -10562,12 +10647,117 @@ function findEmojis(textContent) {
|
|
|
10562
10647
|
|
|
10563
10648
|
|
|
10564
10649
|
;
|
|
10565
|
-
const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_type_script_lang_js, [['render',
|
|
10650
|
+
const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_type_script_lang_js, [['render',emojivue_type_template_id_85307cb0_render]])
|
|
10566
10651
|
|
|
10567
10652
|
/* harmony default export */ const emoji = (emoji_exports_);
|
|
10568
10653
|
;// CONCATENATED MODULE: ./components/emoji/index.js
|
|
10569
10654
|
|
|
10570
10655
|
|
|
10656
|
+
;// 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/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js
|
|
10657
|
+
|
|
10658
|
+
|
|
10659
|
+
|
|
10660
|
+
/* harmony default export */ const emoji_text_wrappervue_type_script_lang_js = ({
|
|
10661
|
+
name: 'DtEmojiTextWrapper',
|
|
10662
|
+
components: {
|
|
10663
|
+
DtEmoji: emoji
|
|
10664
|
+
},
|
|
10665
|
+
inheritAttrs: false,
|
|
10666
|
+
props: {
|
|
10667
|
+
/**
|
|
10668
|
+
* The type of element to use for the wrapper.
|
|
10669
|
+
*/
|
|
10670
|
+
elementType: {
|
|
10671
|
+
type: String,
|
|
10672
|
+
default: 'div'
|
|
10673
|
+
}
|
|
10674
|
+
},
|
|
10675
|
+
|
|
10676
|
+
data() {
|
|
10677
|
+
return {
|
|
10678
|
+
loadingEmojiJson: true
|
|
10679
|
+
};
|
|
10680
|
+
},
|
|
10681
|
+
|
|
10682
|
+
async created() {
|
|
10683
|
+
await getEmojiJson();
|
|
10684
|
+
this.loadingEmojiJson = false;
|
|
10685
|
+
},
|
|
10686
|
+
|
|
10687
|
+
methods: {
|
|
10688
|
+
/**
|
|
10689
|
+
* Replaces the valid codes from the text content with a DtEmoji component.
|
|
10690
|
+
* @returns {Array<VNode|string>}
|
|
10691
|
+
*/
|
|
10692
|
+
replaceDtEmojis(replaceList, textContent) {
|
|
10693
|
+
const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
|
|
10694
|
+
const split = textContent.split(regexp);
|
|
10695
|
+
return split.map(item => {
|
|
10696
|
+
if (replaceList.includes(item)) {
|
|
10697
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.h)(emoji, { ...this.$attrs,
|
|
10698
|
+
class: 'd-mx4 d-d-inline-block',
|
|
10699
|
+
code: item
|
|
10700
|
+
});
|
|
10701
|
+
}
|
|
10702
|
+
|
|
10703
|
+
return item;
|
|
10704
|
+
});
|
|
10705
|
+
},
|
|
10706
|
+
|
|
10707
|
+
/**
|
|
10708
|
+
* Recursively search the Vue virtual DOM to find text
|
|
10709
|
+
* @param VNode
|
|
10710
|
+
* @returns {VNode|*}
|
|
10711
|
+
*/
|
|
10712
|
+
searchVNodes(VNode) {
|
|
10713
|
+
var _VNode$props;
|
|
10714
|
+
|
|
10715
|
+
if (typeof VNode === 'string') return this.searchCodes(VNode);
|
|
10716
|
+
if (typeof VNode.type === 'symbol') return this.searchCodes(VNode.children);
|
|
10717
|
+
if ((_VNode$props = VNode.props) !== null && _VNode$props !== void 0 && _VNode$props.innerHTML) return this.searchVNodes(VNode.props.innerHTML);
|
|
10718
|
+
const children = Array.isArray(VNode.children) ? VNode.children : [VNode.children];
|
|
10719
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.h)(VNode.type, VNode.props, children.map(VNodeChild => this.searchVNodes(VNodeChild)));
|
|
10720
|
+
},
|
|
10721
|
+
|
|
10722
|
+
// TODO: Find a way to crawl vue components
|
|
10723
|
+
replaceVueComponentVNodeContent(VNode) {//
|
|
10724
|
+
},
|
|
10725
|
+
|
|
10726
|
+
/**
|
|
10727
|
+
* Find codes in text.
|
|
10728
|
+
* @param textContent string
|
|
10729
|
+
* @returns {Array<VNode|string>|string}
|
|
10730
|
+
*/
|
|
10731
|
+
searchCodes(textContent) {
|
|
10732
|
+
const shortcodes = findShortCodes(textContent);
|
|
10733
|
+
const emojis = findEmojis(textContent);
|
|
10734
|
+
const replaceList = [...shortcodes, ...emojis];
|
|
10735
|
+
if (replaceList.length === 0) return textContent;
|
|
10736
|
+
return this.replaceDtEmojis(replaceList, textContent);
|
|
10737
|
+
}
|
|
10738
|
+
|
|
10739
|
+
},
|
|
10740
|
+
|
|
10741
|
+
render() {
|
|
10742
|
+
const defaultSlotContent = this.$slots.default ? this.$slots.default() : [];
|
|
10743
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.h)(this.elementType, {
|
|
10744
|
+
'data-qa': 'emoji-text-wrapper',
|
|
10745
|
+
class: this.$attrs.class
|
|
10746
|
+
}, this.loadingEmojiJson ? defaultSlotContent : defaultSlotContent.map(VNode => this.searchVNodes(VNode)));
|
|
10747
|
+
}
|
|
10748
|
+
|
|
10749
|
+
});
|
|
10750
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js
|
|
10751
|
+
|
|
10752
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue
|
|
10753
|
+
|
|
10754
|
+
|
|
10755
|
+
|
|
10756
|
+
const emoji_text_wrapper_exports_ = emoji_text_wrappervue_type_script_lang_js;
|
|
10757
|
+
|
|
10758
|
+
/* harmony default export */ const emoji_text_wrapper = (emoji_text_wrapper_exports_);
|
|
10759
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/index.js
|
|
10760
|
+
|
|
10571
10761
|
;// 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=1204d99d
|
|
10572
10762
|
|
|
10573
10763
|
const inputvue_type_template_id_1204d99d_hoisted_1 = {
|
|
@@ -15672,30 +15862,30 @@ const combobox_with_popover_exports_ = /*#__PURE__*/(0,exportHelper/* default */
|
|
|
15672
15862
|
/* harmony default export */ const combobox_with_popover = (combobox_with_popover_exports_);
|
|
15673
15863
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
|
|
15674
15864
|
|
|
15675
|
-
;// 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]!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=
|
|
15865
|
+
;// 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]!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=d29708fc
|
|
15676
15866
|
|
|
15677
|
-
const
|
|
15867
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_1 = {
|
|
15678
15868
|
ref: "inputSlotWrapper",
|
|
15679
15869
|
class: "d-ps-relative"
|
|
15680
15870
|
};
|
|
15681
|
-
const
|
|
15871
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_2 = {
|
|
15682
15872
|
ref: "chipsWrapper",
|
|
15683
15873
|
class: "d-ps-absolute d-mx2"
|
|
15684
15874
|
};
|
|
15685
|
-
const
|
|
15875
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_3 = {
|
|
15686
15876
|
ref: "header"
|
|
15687
15877
|
};
|
|
15688
|
-
const
|
|
15878
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_4 = {
|
|
15689
15879
|
ref: "list"
|
|
15690
15880
|
};
|
|
15691
|
-
const
|
|
15881
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_5 = {
|
|
15692
15882
|
key: 1,
|
|
15693
15883
|
class: "d-ta-center d-py16"
|
|
15694
15884
|
};
|
|
15695
|
-
const
|
|
15885
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_6 = {
|
|
15696
15886
|
ref: "footer"
|
|
15697
15887
|
};
|
|
15698
|
-
function
|
|
15888
|
+
function combobox_multi_selectvue_type_template_id_d29708fc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15699
15889
|
const _component_dt_chip = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-chip");
|
|
15700
15890
|
|
|
15701
15891
|
const _component_dt_input = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("dt-input");
|
|
@@ -15718,7 +15908,7 @@ function combobox_multi_selectvue_type_template_id_4f85e207_render(_ctx, _cache,
|
|
|
15718
15908
|
let {
|
|
15719
15909
|
onInput
|
|
15720
15910
|
} = _ref;
|
|
15721
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span",
|
|
15911
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_2, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)($props.selectedItems, item => {
|
|
15722
15912
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_dt_chip, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
15723
15913
|
ref_for: true,
|
|
15724
15914
|
ref: "chips",
|
|
@@ -15753,19 +15943,19 @@ function combobox_multi_selectvue_type_template_id_4f85e207_render(_ctx, _cache,
|
|
|
15753
15943
|
"show-messages": $data.showValidationMessages
|
|
15754
15944
|
}, null, 8, ["validation-messages", "show-messages"])], 512)];
|
|
15755
15945
|
}),
|
|
15756
|
-
list: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
15946
|
+
list: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_4, [!$props.loading ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "list", {
|
|
15757
15947
|
key: 0
|
|
15758
|
-
}) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
15948
|
+
}) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_5, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)($props.loadingMessage), 1))], 512)]),
|
|
15759
15949
|
_: 2
|
|
15760
15950
|
}, [_ctx.$slots.header ? {
|
|
15761
15951
|
name: "header",
|
|
15762
|
-
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
15952
|
+
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "header")], 512)])
|
|
15763
15953
|
} : undefined, _ctx.$slots.footer ? {
|
|
15764
15954
|
name: "footer",
|
|
15765
|
-
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
15955
|
+
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_6, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "footer")], 512)])
|
|
15766
15956
|
} : undefined]), 1032, ["show-list", "max-height", "popover-offset", "has-suggestion-list", "onSelect"]);
|
|
15767
15957
|
}
|
|
15768
|
-
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=
|
|
15958
|
+
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=d29708fc
|
|
15769
15959
|
|
|
15770
15960
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
|
|
15771
15961
|
// The item list for default story
|
|
@@ -15982,7 +16172,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
15982
16172
|
},
|
|
15983
16173
|
|
|
15984
16174
|
/**
|
|
15985
|
-
* Max select message when the max selections
|
|
16175
|
+
* Max select message when the max selections is exceeded with the structure:
|
|
15986
16176
|
* `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
|
|
15987
16177
|
*/
|
|
15988
16178
|
maxSelectedMessage: {
|
|
@@ -16042,10 +16232,19 @@ const MULTI_SELECT_SIZES = {
|
|
|
16042
16232
|
return {
|
|
16043
16233
|
input: event => {
|
|
16044
16234
|
this.$emit('input', event);
|
|
16235
|
+
|
|
16236
|
+
if (this.hasSuggestionList) {
|
|
16237
|
+
this.showComboboxList();
|
|
16238
|
+
}
|
|
16045
16239
|
},
|
|
16046
16240
|
keyup: event => {
|
|
16047
16241
|
this.onInputKeyup(event);
|
|
16048
16242
|
this.$emit('keyup', event);
|
|
16243
|
+
},
|
|
16244
|
+
click: event => {
|
|
16245
|
+
if (this.hasSuggestionList) {
|
|
16246
|
+
this.showComboboxList();
|
|
16247
|
+
}
|
|
16049
16248
|
}
|
|
16050
16249
|
};
|
|
16051
16250
|
}
|
|
@@ -16103,6 +16302,22 @@ const MULTI_SELECT_SIZES = {
|
|
|
16103
16302
|
this.$emit('select', i);
|
|
16104
16303
|
},
|
|
16105
16304
|
|
|
16305
|
+
showComboboxList() {
|
|
16306
|
+
if (this.showList != null) {
|
|
16307
|
+
return;
|
|
16308
|
+
}
|
|
16309
|
+
|
|
16310
|
+
this.$refs.comboboxWithPopover.showComboboxList();
|
|
16311
|
+
},
|
|
16312
|
+
|
|
16313
|
+
closeComboboxList() {
|
|
16314
|
+
if (this.showList != null) {
|
|
16315
|
+
return;
|
|
16316
|
+
}
|
|
16317
|
+
|
|
16318
|
+
this.$refs.comboboxWithPopover.closeComboboxList();
|
|
16319
|
+
},
|
|
16320
|
+
|
|
16106
16321
|
getChipButtons() {
|
|
16107
16322
|
return this.$refs.chips && this.$refs.chips.map(chip => chip.$el.querySelector('button'));
|
|
16108
16323
|
},
|
|
@@ -16164,13 +16379,13 @@ const MULTI_SELECT_SIZES = {
|
|
|
16164
16379
|
moveFromInputToChip() {
|
|
16165
16380
|
this.getLastChipButton().focus();
|
|
16166
16381
|
this.$refs.input.blur();
|
|
16167
|
-
this
|
|
16382
|
+
this.closeComboboxList();
|
|
16168
16383
|
},
|
|
16169
16384
|
|
|
16170
16385
|
moveFromChipToInput() {
|
|
16171
16386
|
this.getLastChipButton().blur();
|
|
16172
16387
|
this.$refs.input.focus();
|
|
16173
|
-
this
|
|
16388
|
+
this.showComboboxList();
|
|
16174
16389
|
},
|
|
16175
16390
|
|
|
16176
16391
|
navigateBetweenChips(target, toLeft) {
|
|
@@ -16183,7 +16398,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16183
16398
|
|
|
16184
16399
|
this.getChipButtons()[from].blur();
|
|
16185
16400
|
this.getChipButtons()[to].focus();
|
|
16186
|
-
this
|
|
16401
|
+
this.closeComboboxList();
|
|
16187
16402
|
},
|
|
16188
16403
|
|
|
16189
16404
|
setChipsTopPosition() {
|
|
@@ -16253,7 +16468,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16253
16468
|
checkMaxSelected() {
|
|
16254
16469
|
if (this.maxSelected === 0) return;
|
|
16255
16470
|
|
|
16256
|
-
if (this.selectedItems.length
|
|
16471
|
+
if (this.selectedItems.length > this.maxSelected) {
|
|
16257
16472
|
this.showValidationMessages = true;
|
|
16258
16473
|
this.$emit('max-selected');
|
|
16259
16474
|
} else {
|
|
@@ -16271,7 +16486,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16271
16486
|
|
|
16272
16487
|
|
|
16273
16488
|
;
|
|
16274
|
-
const combobox_multi_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(combobox_multi_selectvue_type_script_lang_js, [['render',
|
|
16489
|
+
const combobox_multi_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(combobox_multi_selectvue_type_script_lang_js, [['render',combobox_multi_selectvue_type_template_id_d29708fc_render]])
|
|
16275
16490
|
|
|
16276
16491
|
/* harmony default export */ const combobox_multi_select = (combobox_multi_select_exports_);
|
|
16277
16492
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/index.js
|
|
@@ -16562,6 +16777,7 @@ const top_banner_info_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(to
|
|
|
16562
16777
|
|
|
16563
16778
|
|
|
16564
16779
|
|
|
16780
|
+
|
|
16565
16781
|
|
|
16566
16782
|
|
|
16567
16783
|
/// Recipes
|