@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.
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -1137,6 +1137,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1137
1137
|
"DtCombobox": () => (/* reexport */ combobox),
|
|
1138
1138
|
"DtDropdown": () => (/* reexport */ dropdown),
|
|
1139
1139
|
"DtEmoji": () => (/* reexport */ emoji),
|
|
1140
|
+
"DtEmojiTextWrapper": () => (/* reexport */ emoji_text_wrapper),
|
|
1140
1141
|
"DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
|
|
1141
1142
|
"DtInput": () => (/* reexport */ input_input),
|
|
1142
1143
|
"DtInputGroup": () => (/* reexport */ input_group_input_group),
|
|
@@ -1208,6 +1209,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1208
1209
|
"USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
|
|
1209
1210
|
"VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
|
|
1210
1211
|
"codeToEmojiData": () => (/* reexport */ codeToEmojiData),
|
|
1212
|
+
"customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
|
|
1211
1213
|
"defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
|
|
1212
1214
|
"emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
|
|
1213
1215
|
"emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
|
|
@@ -1216,17 +1218,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1216
1218
|
"emojiJson": () => (/* reexport */ emojiJson),
|
|
1217
1219
|
"emojiVersion": () => (/* reexport */ emojiVersion),
|
|
1218
1220
|
"filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
|
|
1221
|
+
"filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
|
|
1219
1222
|
"findEmojis": () => (/* reexport */ findEmojis),
|
|
1220
1223
|
"findShortCodes": () => (/* reexport */ findShortCodes),
|
|
1221
1224
|
"formatMessages": () => (/* reexport */ formatMessages),
|
|
1225
|
+
"getEmojiData": () => (/* reexport */ getEmojiData),
|
|
1222
1226
|
"getEmojiJson": () => (/* reexport */ getEmojiJson),
|
|
1223
1227
|
"getUniqueString": () => (/* reexport */ getUniqueString),
|
|
1224
1228
|
"getValidationState": () => (/* reexport */ getValidationState),
|
|
1229
|
+
"setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
|
|
1230
|
+
"setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
|
|
1225
1231
|
"setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
|
|
1226
1232
|
"setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
|
|
1227
1233
|
"shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
|
|
1228
1234
|
"stringToUnicode": () => (/* reexport */ stringToUnicode),
|
|
1229
1235
|
"unicodeToString": () => (/* reexport */ unicodeToString),
|
|
1236
|
+
"validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
|
|
1230
1237
|
"validationMessageValidator": () => (/* reexport */ validationMessageValidator)
|
|
1231
1238
|
});
|
|
1232
1239
|
|
|
@@ -10273,10 +10280,10 @@ const dropdown_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(dropdownv
|
|
|
10273
10280
|
/* harmony default export */ const dropdown = (dropdown_exports_);
|
|
10274
10281
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
10275
10282
|
|
|
10276
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
10283
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
10277
10284
|
|
|
10278
|
-
const
|
|
10279
|
-
function
|
|
10285
|
+
const emojivue_type_template_id_85307cb0_hoisted_1 = ["aria-label", "alt", "title", "src"];
|
|
10286
|
+
function emojivue_type_template_id_85307cb0_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10280
10287
|
const _component_dt_skeleton = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-skeleton");
|
|
10281
10288
|
|
|
10282
10289
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
|
|
@@ -10303,9 +10310,9 @@ function emojivue_type_template_id_010f8b36_render(_ctx, _cache, $props, $setup,
|
|
|
10303
10310
|
onError: _cache[1] || (_cache[1] = function () {
|
|
10304
10311
|
return $options.imageErrored && $options.imageErrored(...arguments);
|
|
10305
10312
|
})
|
|
10306
|
-
}, null, 42,
|
|
10313
|
+
}, null, 42, emojivue_type_template_id_85307cb0_hoisted_1)), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, !$data.imgLoading]]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 2);
|
|
10307
10314
|
}
|
|
10308
|
-
;// CONCATENATED MODULE: ./components/emoji/emoji.vue?vue&type=template&id=
|
|
10315
|
+
;// CONCATENATED MODULE: ./components/emoji/emoji.vue?vue&type=template&id=85307cb0
|
|
10309
10316
|
|
|
10310
10317
|
;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
|
|
10311
10318
|
const EMOJI_SIZES = {
|
|
@@ -10328,7 +10335,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
|
|
|
10328
10335
|
;// CONCATENATED MODULE: ./common/emoji.js
|
|
10329
10336
|
|
|
10330
10337
|
const emojiVersion = '6.6';
|
|
10331
|
-
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
10338
|
+
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
10339
|
+
let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
|
|
10332
10340
|
|
|
10333
10341
|
let emojiImageUrlSmall = defaultEmojiAssetUrl;
|
|
10334
10342
|
let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
|
|
@@ -10340,6 +10348,9 @@ async function getEmojiJson() {
|
|
|
10340
10348
|
if (emojiJson) return;
|
|
10341
10349
|
emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
|
|
10342
10350
|
}
|
|
10351
|
+
function getEmojiData() {
|
|
10352
|
+
return emojiJson;
|
|
10353
|
+
}
|
|
10343
10354
|
function setEmojiAssetUrlSmall(url) {
|
|
10344
10355
|
let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
|
|
10345
10356
|
|
|
@@ -10359,6 +10370,69 @@ function setEmojiAssetUrlLarge(url) {
|
|
|
10359
10370
|
|
|
10360
10371
|
emojiImageUrlLarge = url;
|
|
10361
10372
|
emojiFileExtensionLarge = fileExtension;
|
|
10373
|
+
}
|
|
10374
|
+
function setCustomEmojiUrl(url) {
|
|
10375
|
+
customEmojiAssetUrl = url;
|
|
10376
|
+
}
|
|
10377
|
+
function setCustomEmojiJson(json) {
|
|
10378
|
+
validateCustomEmojiJson(json);
|
|
10379
|
+
}
|
|
10380
|
+
/**
|
|
10381
|
+
* Validate custom emoji json
|
|
10382
|
+
*/
|
|
10383
|
+
|
|
10384
|
+
async function validateCustomEmojiJson(json) {
|
|
10385
|
+
await getEmojiJson();
|
|
10386
|
+
const customEmojiProps = ['extension', 'custom'];
|
|
10387
|
+
const customEmojiRequiredProps = ['name', 'category', 'shortname', 'extension', 'custom'];
|
|
10388
|
+
/**
|
|
10389
|
+
* Update single emoji properties.
|
|
10390
|
+
* If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.
|
|
10391
|
+
* If not exists, will add the property to the emojiData object.
|
|
10392
|
+
*/
|
|
10393
|
+
|
|
10394
|
+
const _updateNativeEmojiData = (emojiData, propName, propValue) => {
|
|
10395
|
+
if (emojiData[propName] === undefined) {
|
|
10396
|
+
if (!customEmojiProps.includes(propName)) {
|
|
10397
|
+
return;
|
|
10398
|
+
} // new property to add
|
|
10399
|
+
|
|
10400
|
+
|
|
10401
|
+
emojiData[propName] = propValue;
|
|
10402
|
+
} else {
|
|
10403
|
+
if (Array.isArray(emojiData[propName])) {
|
|
10404
|
+
emojiData[propName] = emojiData[propName].concat(propValue);
|
|
10405
|
+
} else {
|
|
10406
|
+
emojiData[propName] = propValue;
|
|
10407
|
+
}
|
|
10408
|
+
}
|
|
10409
|
+
};
|
|
10410
|
+
|
|
10411
|
+
Object.entries(json).forEach(item => {
|
|
10412
|
+
const [customEmojiKey, customEmojiValue] = item;
|
|
10413
|
+
|
|
10414
|
+
if (customEmojiKey in emojiJson) {
|
|
10415
|
+
// custom emoji exists in emoji json which means to update some data in the native emoji
|
|
10416
|
+
const emojiData = emojiJson[customEmojiKey];
|
|
10417
|
+
|
|
10418
|
+
for (const customEmojiPropertyName in customEmojiValue) {
|
|
10419
|
+
const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];
|
|
10420
|
+
|
|
10421
|
+
_updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);
|
|
10422
|
+
}
|
|
10423
|
+
} else {
|
|
10424
|
+
// new custom emoji
|
|
10425
|
+
const _validateRequiredProps = () => customEmojiRequiredProps.every(val => {
|
|
10426
|
+
return customEmojiValue[val] !== undefined;
|
|
10427
|
+
});
|
|
10428
|
+
|
|
10429
|
+
if (_validateRequiredProps()) {
|
|
10430
|
+
emojiJson[customEmojiKey] = customEmojiValue;
|
|
10431
|
+
} else {
|
|
10432
|
+
console.error('The following custom emoji doesn\'t contain the required properties:', customEmojiValue);
|
|
10433
|
+
}
|
|
10434
|
+
}
|
|
10435
|
+
});
|
|
10362
10436
|
} // recursively searches the emoji data object containing data for all emojis
|
|
10363
10437
|
// and returns the object with the specified shortcode.
|
|
10364
10438
|
|
|
@@ -10383,7 +10457,7 @@ function shortcodeToEmojiData(shortcode) {
|
|
|
10383
10457
|
}
|
|
10384
10458
|
|
|
10385
10459
|
let reference;
|
|
10386
|
-
f(
|
|
10460
|
+
f(getEmojiData(), null);
|
|
10387
10461
|
return reference;
|
|
10388
10462
|
} // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
|
|
10389
10463
|
// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
|
|
@@ -10433,8 +10507,11 @@ async function codeToEmojiData(code) {
|
|
|
10433
10507
|
// @returns {string[]}
|
|
10434
10508
|
|
|
10435
10509
|
function findShortCodes(textContent) {
|
|
10436
|
-
const
|
|
10437
|
-
|
|
10510
|
+
const shortcodes = textContent.match(/:\w+:/g);
|
|
10511
|
+
return filterValidShortCodes(shortcodes);
|
|
10512
|
+
}
|
|
10513
|
+
function filterValidShortCodes(shortcodes) {
|
|
10514
|
+
const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];
|
|
10438
10515
|
return new Set(filtered);
|
|
10439
10516
|
} // Finds every emoji in slot text
|
|
10440
10517
|
// removes duplicates
|
|
@@ -10457,7 +10534,8 @@ function findEmojis(textContent) {
|
|
|
10457
10534
|
props: {
|
|
10458
10535
|
/**
|
|
10459
10536
|
* Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
|
|
10460
|
-
* See https://emojipedia.org/joypixels/ for all supported shortcode/unicode
|
|
10537
|
+
* See https://emojipedia.org/joypixels/ for all supported shortcode/unicode or the docs
|
|
10538
|
+
* for setting up custom emojis.
|
|
10461
10539
|
*/
|
|
10462
10540
|
code: {
|
|
10463
10541
|
type: String,
|
|
@@ -10510,8 +10588,15 @@ function findEmojis(textContent) {
|
|
|
10510
10588
|
},
|
|
10511
10589
|
|
|
10512
10590
|
emojiSrc() {
|
|
10591
|
+
var _this$emojiData;
|
|
10592
|
+
|
|
10513
10593
|
if (!this.emojiDataValid) {
|
|
10514
10594
|
return 'invalid';
|
|
10595
|
+
} // custom emoji
|
|
10596
|
+
|
|
10597
|
+
|
|
10598
|
+
if ((_this$emojiData = this.emojiData) !== null && _this$emojiData !== void 0 && _this$emojiData.custom) {
|
|
10599
|
+
return customEmojiAssetUrl + this.emojiData.key + this.emojiData.extension;
|
|
10515
10600
|
}
|
|
10516
10601
|
|
|
10517
10602
|
if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
|
|
@@ -10526,7 +10611,7 @@ function findEmojis(textContent) {
|
|
|
10526
10611
|
return undefined;
|
|
10527
10612
|
}
|
|
10528
10613
|
|
|
10529
|
-
return stringToUnicode(this.emojiData.unicode_output);
|
|
10614
|
+
return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
|
|
10530
10615
|
},
|
|
10531
10616
|
|
|
10532
10617
|
emojiLabel() {
|
|
@@ -10580,12 +10665,117 @@ function findEmojis(textContent) {
|
|
|
10580
10665
|
|
|
10581
10666
|
|
|
10582
10667
|
;
|
|
10583
|
-
const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_type_script_lang_js, [['render',
|
|
10668
|
+
const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_type_script_lang_js, [['render',emojivue_type_template_id_85307cb0_render]])
|
|
10584
10669
|
|
|
10585
10670
|
/* harmony default export */ const emoji = (emoji_exports_);
|
|
10586
10671
|
;// CONCATENATED MODULE: ./components/emoji/index.js
|
|
10587
10672
|
|
|
10588
10673
|
|
|
10674
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
10675
|
+
|
|
10676
|
+
|
|
10677
|
+
|
|
10678
|
+
/* harmony default export */ const emoji_text_wrappervue_type_script_lang_js = ({
|
|
10679
|
+
name: 'DtEmojiTextWrapper',
|
|
10680
|
+
components: {
|
|
10681
|
+
DtEmoji: emoji
|
|
10682
|
+
},
|
|
10683
|
+
inheritAttrs: false,
|
|
10684
|
+
props: {
|
|
10685
|
+
/**
|
|
10686
|
+
* The type of element to use for the wrapper.
|
|
10687
|
+
*/
|
|
10688
|
+
elementType: {
|
|
10689
|
+
type: String,
|
|
10690
|
+
default: 'div'
|
|
10691
|
+
}
|
|
10692
|
+
},
|
|
10693
|
+
|
|
10694
|
+
data() {
|
|
10695
|
+
return {
|
|
10696
|
+
loadingEmojiJson: true
|
|
10697
|
+
};
|
|
10698
|
+
},
|
|
10699
|
+
|
|
10700
|
+
async created() {
|
|
10701
|
+
await getEmojiJson();
|
|
10702
|
+
this.loadingEmojiJson = false;
|
|
10703
|
+
},
|
|
10704
|
+
|
|
10705
|
+
methods: {
|
|
10706
|
+
/**
|
|
10707
|
+
* Replaces the valid codes from the text content with a DtEmoji component.
|
|
10708
|
+
* @returns {Array<VNode|string>}
|
|
10709
|
+
*/
|
|
10710
|
+
replaceDtEmojis(replaceList, textContent) {
|
|
10711
|
+
const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
|
|
10712
|
+
const split = textContent.split(regexp);
|
|
10713
|
+
return split.map(item => {
|
|
10714
|
+
if (replaceList.includes(item)) {
|
|
10715
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(emoji, { ...this.$attrs,
|
|
10716
|
+
class: 'd-mx4 d-d-inline-block',
|
|
10717
|
+
code: item
|
|
10718
|
+
});
|
|
10719
|
+
}
|
|
10720
|
+
|
|
10721
|
+
return item;
|
|
10722
|
+
});
|
|
10723
|
+
},
|
|
10724
|
+
|
|
10725
|
+
/**
|
|
10726
|
+
* Recursively search the Vue virtual DOM to find text
|
|
10727
|
+
* @param VNode
|
|
10728
|
+
* @returns {VNode|*}
|
|
10729
|
+
*/
|
|
10730
|
+
searchVNodes(VNode) {
|
|
10731
|
+
var _VNode$props;
|
|
10732
|
+
|
|
10733
|
+
if (typeof VNode === 'string') return this.searchCodes(VNode);
|
|
10734
|
+
if (typeof VNode.type === 'symbol') return this.searchCodes(VNode.children);
|
|
10735
|
+
if ((_VNode$props = VNode.props) !== null && _VNode$props !== void 0 && _VNode$props.innerHTML) return this.searchVNodes(VNode.props.innerHTML);
|
|
10736
|
+
const children = Array.isArray(VNode.children) ? VNode.children : [VNode.children];
|
|
10737
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VNode.type, VNode.props, children.map(VNodeChild => this.searchVNodes(VNodeChild)));
|
|
10738
|
+
},
|
|
10739
|
+
|
|
10740
|
+
// TODO: Find a way to crawl vue components
|
|
10741
|
+
replaceVueComponentVNodeContent(VNode) {//
|
|
10742
|
+
},
|
|
10743
|
+
|
|
10744
|
+
/**
|
|
10745
|
+
* Find codes in text.
|
|
10746
|
+
* @param textContent string
|
|
10747
|
+
* @returns {Array<VNode|string>|string}
|
|
10748
|
+
*/
|
|
10749
|
+
searchCodes(textContent) {
|
|
10750
|
+
const shortcodes = findShortCodes(textContent);
|
|
10751
|
+
const emojis = findEmojis(textContent);
|
|
10752
|
+
const replaceList = [...shortcodes, ...emojis];
|
|
10753
|
+
if (replaceList.length === 0) return textContent;
|
|
10754
|
+
return this.replaceDtEmojis(replaceList, textContent);
|
|
10755
|
+
}
|
|
10756
|
+
|
|
10757
|
+
},
|
|
10758
|
+
|
|
10759
|
+
render() {
|
|
10760
|
+
const defaultSlotContent = this.$slots.default ? this.$slots.default() : [];
|
|
10761
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(this.elementType, {
|
|
10762
|
+
'data-qa': 'emoji-text-wrapper',
|
|
10763
|
+
class: this.$attrs.class
|
|
10764
|
+
}, this.loadingEmojiJson ? defaultSlotContent : defaultSlotContent.map(VNode => this.searchVNodes(VNode)));
|
|
10765
|
+
}
|
|
10766
|
+
|
|
10767
|
+
});
|
|
10768
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js
|
|
10769
|
+
|
|
10770
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue
|
|
10771
|
+
|
|
10772
|
+
|
|
10773
|
+
|
|
10774
|
+
const emoji_text_wrapper_exports_ = emoji_text_wrappervue_type_script_lang_js;
|
|
10775
|
+
|
|
10776
|
+
/* harmony default export */ const emoji_text_wrapper = (emoji_text_wrapper_exports_);
|
|
10777
|
+
;// CONCATENATED MODULE: ./components/emoji_text_wrapper/index.js
|
|
10778
|
+
|
|
10589
10779
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
10590
10780
|
|
|
10591
10781
|
const inputvue_type_template_id_1204d99d_hoisted_1 = {
|
|
@@ -15690,30 +15880,30 @@ const combobox_with_popover_exports_ = /*#__PURE__*/(0,exportHelper/* default */
|
|
|
15690
15880
|
/* harmony default export */ const combobox_with_popover = (combobox_with_popover_exports_);
|
|
15691
15881
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
|
|
15692
15882
|
|
|
15693
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
15883
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
15694
15884
|
|
|
15695
|
-
const
|
|
15885
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_1 = {
|
|
15696
15886
|
ref: "inputSlotWrapper",
|
|
15697
15887
|
class: "d-ps-relative"
|
|
15698
15888
|
};
|
|
15699
|
-
const
|
|
15889
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_2 = {
|
|
15700
15890
|
ref: "chipsWrapper",
|
|
15701
15891
|
class: "d-ps-absolute d-mx2"
|
|
15702
15892
|
};
|
|
15703
|
-
const
|
|
15893
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_3 = {
|
|
15704
15894
|
ref: "header"
|
|
15705
15895
|
};
|
|
15706
|
-
const
|
|
15896
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_4 = {
|
|
15707
15897
|
ref: "list"
|
|
15708
15898
|
};
|
|
15709
|
-
const
|
|
15899
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_5 = {
|
|
15710
15900
|
key: 1,
|
|
15711
15901
|
class: "d-ta-center d-py16"
|
|
15712
15902
|
};
|
|
15713
|
-
const
|
|
15903
|
+
const combobox_multi_selectvue_type_template_id_d29708fc_hoisted_6 = {
|
|
15714
15904
|
ref: "footer"
|
|
15715
15905
|
};
|
|
15716
|
-
function
|
|
15906
|
+
function combobox_multi_selectvue_type_template_id_d29708fc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15717
15907
|
const _component_dt_chip = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-chip");
|
|
15718
15908
|
|
|
15719
15909
|
const _component_dt_input = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-input");
|
|
@@ -15736,7 +15926,7 @@ function combobox_multi_selectvue_type_template_id_4f85e207_render(_ctx, _cache,
|
|
|
15736
15926
|
let {
|
|
15737
15927
|
onInput
|
|
15738
15928
|
} = _ref;
|
|
15739
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span",
|
|
15929
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_2, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($props.selectedItems, item => {
|
|
15740
15930
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_dt_chip, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
|
|
15741
15931
|
ref_for: true,
|
|
15742
15932
|
ref: "chips",
|
|
@@ -15771,19 +15961,19 @@ function combobox_multi_selectvue_type_template_id_4f85e207_render(_ctx, _cache,
|
|
|
15771
15961
|
"show-messages": $data.showValidationMessages
|
|
15772
15962
|
}, null, 8, ["validation-messages", "show-messages"])], 512)];
|
|
15773
15963
|
}),
|
|
15774
|
-
list: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
15964
|
+
list: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_4, [!$props.loading ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "list", {
|
|
15775
15965
|
key: 0
|
|
15776
|
-
}) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
15966
|
+
}) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_5, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.loadingMessage), 1))], 512)]),
|
|
15777
15967
|
_: 2
|
|
15778
15968
|
}, [_ctx.$slots.header ? {
|
|
15779
15969
|
name: "header",
|
|
15780
|
-
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
15970
|
+
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "header")], 512)])
|
|
15781
15971
|
} : undefined, _ctx.$slots.footer ? {
|
|
15782
15972
|
name: "footer",
|
|
15783
|
-
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
15973
|
+
fn: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", combobox_multi_selectvue_type_template_id_d29708fc_hoisted_6, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "footer")], 512)])
|
|
15784
15974
|
} : undefined]), 1032, ["show-list", "max-height", "popover-offset", "has-suggestion-list", "onSelect"]);
|
|
15785
15975
|
}
|
|
15786
|
-
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=
|
|
15976
|
+
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=d29708fc
|
|
15787
15977
|
|
|
15788
15978
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
|
|
15789
15979
|
// The item list for default story
|
|
@@ -16000,7 +16190,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16000
16190
|
},
|
|
16001
16191
|
|
|
16002
16192
|
/**
|
|
16003
|
-
* Max select message when the max selections
|
|
16193
|
+
* Max select message when the max selections is exceeded with the structure:
|
|
16004
16194
|
* `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
|
|
16005
16195
|
*/
|
|
16006
16196
|
maxSelectedMessage: {
|
|
@@ -16060,10 +16250,19 @@ const MULTI_SELECT_SIZES = {
|
|
|
16060
16250
|
return {
|
|
16061
16251
|
input: event => {
|
|
16062
16252
|
this.$emit('input', event);
|
|
16253
|
+
|
|
16254
|
+
if (this.hasSuggestionList) {
|
|
16255
|
+
this.showComboboxList();
|
|
16256
|
+
}
|
|
16063
16257
|
},
|
|
16064
16258
|
keyup: event => {
|
|
16065
16259
|
this.onInputKeyup(event);
|
|
16066
16260
|
this.$emit('keyup', event);
|
|
16261
|
+
},
|
|
16262
|
+
click: event => {
|
|
16263
|
+
if (this.hasSuggestionList) {
|
|
16264
|
+
this.showComboboxList();
|
|
16265
|
+
}
|
|
16067
16266
|
}
|
|
16068
16267
|
};
|
|
16069
16268
|
}
|
|
@@ -16121,6 +16320,22 @@ const MULTI_SELECT_SIZES = {
|
|
|
16121
16320
|
this.$emit('select', i);
|
|
16122
16321
|
},
|
|
16123
16322
|
|
|
16323
|
+
showComboboxList() {
|
|
16324
|
+
if (this.showList != null) {
|
|
16325
|
+
return;
|
|
16326
|
+
}
|
|
16327
|
+
|
|
16328
|
+
this.$refs.comboboxWithPopover.showComboboxList();
|
|
16329
|
+
},
|
|
16330
|
+
|
|
16331
|
+
closeComboboxList() {
|
|
16332
|
+
if (this.showList != null) {
|
|
16333
|
+
return;
|
|
16334
|
+
}
|
|
16335
|
+
|
|
16336
|
+
this.$refs.comboboxWithPopover.closeComboboxList();
|
|
16337
|
+
},
|
|
16338
|
+
|
|
16124
16339
|
getChipButtons() {
|
|
16125
16340
|
return this.$refs.chips && this.$refs.chips.map(chip => chip.$el.querySelector('button'));
|
|
16126
16341
|
},
|
|
@@ -16182,13 +16397,13 @@ const MULTI_SELECT_SIZES = {
|
|
|
16182
16397
|
moveFromInputToChip() {
|
|
16183
16398
|
this.getLastChipButton().focus();
|
|
16184
16399
|
this.$refs.input.blur();
|
|
16185
|
-
this
|
|
16400
|
+
this.closeComboboxList();
|
|
16186
16401
|
},
|
|
16187
16402
|
|
|
16188
16403
|
moveFromChipToInput() {
|
|
16189
16404
|
this.getLastChipButton().blur();
|
|
16190
16405
|
this.$refs.input.focus();
|
|
16191
|
-
this
|
|
16406
|
+
this.showComboboxList();
|
|
16192
16407
|
},
|
|
16193
16408
|
|
|
16194
16409
|
navigateBetweenChips(target, toLeft) {
|
|
@@ -16201,7 +16416,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16201
16416
|
|
|
16202
16417
|
this.getChipButtons()[from].blur();
|
|
16203
16418
|
this.getChipButtons()[to].focus();
|
|
16204
|
-
this
|
|
16419
|
+
this.closeComboboxList();
|
|
16205
16420
|
},
|
|
16206
16421
|
|
|
16207
16422
|
setChipsTopPosition() {
|
|
@@ -16271,7 +16486,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16271
16486
|
checkMaxSelected() {
|
|
16272
16487
|
if (this.maxSelected === 0) return;
|
|
16273
16488
|
|
|
16274
|
-
if (this.selectedItems.length
|
|
16489
|
+
if (this.selectedItems.length > this.maxSelected) {
|
|
16275
16490
|
this.showValidationMessages = true;
|
|
16276
16491
|
this.$emit('max-selected');
|
|
16277
16492
|
} else {
|
|
@@ -16289,7 +16504,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
16289
16504
|
|
|
16290
16505
|
|
|
16291
16506
|
;
|
|
16292
|
-
const combobox_multi_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(combobox_multi_selectvue_type_script_lang_js, [['render',
|
|
16507
|
+
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]])
|
|
16293
16508
|
|
|
16294
16509
|
/* harmony default export */ const combobox_multi_select = (combobox_multi_select_exports_);
|
|
16295
16510
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/index.js
|
|
@@ -16580,6 +16795,7 @@ const top_banner_info_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(to
|
|
|
16580
16795
|
|
|
16581
16796
|
|
|
16582
16797
|
|
|
16798
|
+
|
|
16583
16799
|
|
|
16584
16800
|
|
|
16585
16801
|
/// Recipes
|