toggle-components-library 1.25.1 → 1.25.2
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/toggle-components-library.common.js +432 -835
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +432 -835
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +6 -6
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package-lock.json +20762 -0
- package/package.json +1 -1
- package/src/components/forms/ToggleInputText.vue +6 -6
- package/src/components/json/char_list.json +2233 -0
- package/src/components/mixins/mixins.js +18 -1
- package/src/.DS_Store +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import styleInfo from '../../../src/sass/includes/_as_variables.scss';
|
|
2
|
+
import jsonCharCodesData from '../json/char_list.json';
|
|
2
3
|
|
|
3
4
|
export const mixins = {
|
|
4
5
|
data(){
|
|
5
|
-
return {
|
|
6
|
+
return {
|
|
7
|
+
jsonCharCodes: jsonCharCodesData
|
|
8
|
+
}
|
|
6
9
|
},
|
|
7
10
|
methods:{
|
|
8
11
|
|
|
@@ -59,6 +62,20 @@ export const mixins = {
|
|
|
59
62
|
|
|
60
63
|
//converts a character into an HTML entity
|
|
61
64
|
const char2Html = (char) => {
|
|
65
|
+
// Check for special characters first
|
|
66
|
+
let codepointVals = Object.values(this.jsonCharCodes).map(value => value.codepoints[0]);
|
|
67
|
+
|
|
68
|
+
let codesArray = Object.entries(this.jsonCharCodes)
|
|
69
|
+
|
|
70
|
+
if (codepointVals.includes(char.codePointAt())) {
|
|
71
|
+
|
|
72
|
+
let namedChar = codesArray.filter(nestedArr => {
|
|
73
|
+
return nestedArr[1].codepoints[0] == char.codePointAt()
|
|
74
|
+
})
|
|
75
|
+
// If it's a special character return now
|
|
76
|
+
return `${namedChar[0][0]}`
|
|
77
|
+
}
|
|
78
|
+
|
|
62
79
|
let item = `${char}`;
|
|
63
80
|
|
|
64
81
|
//spread operator can detect emoji surrogate pairs
|
package/src/.DS_Store
DELETED
|
Binary file
|