mumuki-emojis 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-emojis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Scarpa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,8 +67,6 @@ extra_rdoc_files: []
|
|
67
67
|
files:
|
68
68
|
- README.md
|
69
69
|
- Rakefile
|
70
|
-
- app/assets/javascripts/mumuki-emojis-availables.js
|
71
|
-
- app/assets/javascripts/mumuki-emojis-categories.js
|
72
70
|
- app/assets/javascripts/mumuki-emojis.js
|
73
71
|
- app/assets/json/mumuki-emojis-shortnames.json
|
74
72
|
- app/assets/stylesheets/mumuki-emojis.css
|
@@ -1,31 +0,0 @@
|
|
1
|
-
(function (window) {
|
2
|
-
|
3
|
-
window.muEmojis = window.muEmojis || {};
|
4
|
-
|
5
|
-
window.muEmojis.object = {};
|
6
|
-
|
7
|
-
function compareEmojis(a, b) {
|
8
|
-
return a.order < b.order ? -1 : (a.order == b.order ? 0 : 1);
|
9
|
-
}
|
10
|
-
|
11
|
-
function fullEmoji(emoji) {
|
12
|
-
return {
|
13
|
-
name: emoji.n,
|
14
|
-
category: emoji.ca,
|
15
|
-
sprite_category: emoji.sc,
|
16
|
-
order: emoji.o,
|
17
|
-
shortname: emoji.s,
|
18
|
-
shortname_alternates: emoji.ss,
|
19
|
-
diversity: emoji.d,
|
20
|
-
diversities: emoji.ds,
|
21
|
-
keywords: emoji.k,
|
22
|
-
code_points: {
|
23
|
-
base: emoji.co
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
window.muEmojis.fullEmoji = fullEmoji;
|
29
|
-
window.muEmojis.list = Object.values(window.muEmojis.object).map(fullEmoji).sort(compareEmojis);
|
30
|
-
|
31
|
-
})(window);
|
@@ -1,137 +0,0 @@
|
|
1
|
-
(function (window) {
|
2
|
-
|
3
|
-
window.muEmojis = window.muEmojis || {};
|
4
|
-
|
5
|
-
var availableLanguages = ['en', 'es', 'pt'];
|
6
|
-
|
7
|
-
function currentLanguage() {
|
8
|
-
var _language = window.navigator.languages && window.navigator.languages[0] ||
|
9
|
-
window.navigator.language ||
|
10
|
-
window.navigator.browserLanguage ||
|
11
|
-
window.navigator.systemLanguage ||
|
12
|
-
window.navigator.userLanguage;
|
13
|
-
|
14
|
-
var language = _language.split("-")[0];
|
15
|
-
|
16
|
-
return availableLanguages.indexOf(language) >= 0 ? language : "en";
|
17
|
-
}
|
18
|
-
|
19
|
-
window.muEmojis._inputPlaceholder_ = {
|
20
|
-
en: "Search emojis",
|
21
|
-
es: "Buscar emoticón",
|
22
|
-
pt: "Emoticon de busca",
|
23
|
-
}
|
24
|
-
|
25
|
-
window.muEmojis._categories_ = [
|
26
|
-
{
|
27
|
-
name: "people",
|
28
|
-
icon_class: "fa fa-fw fa-smile-o",
|
29
|
-
caption: {
|
30
|
-
en: "Smileys & People",
|
31
|
-
es: "Sonrisas y gente",
|
32
|
-
pt: "Sorrisos e pessoas",
|
33
|
-
}
|
34
|
-
},
|
35
|
-
{
|
36
|
-
name: "nature",
|
37
|
-
icon_class: "fa fa-fw fa-leaf",
|
38
|
-
caption: {
|
39
|
-
en: "Animals & Nature",
|
40
|
-
es: "Animales y naturaleza",
|
41
|
-
pt: "Animais e natureza",
|
42
|
-
}
|
43
|
-
},
|
44
|
-
{
|
45
|
-
name: "food",
|
46
|
-
icon_class: "fa fa-fw fa-cutlery",
|
47
|
-
caption: {
|
48
|
-
en: "Food & Drink",
|
49
|
-
es: "Comida y bebida",
|
50
|
-
pt: "Comida e bebida",
|
51
|
-
}
|
52
|
-
},
|
53
|
-
{
|
54
|
-
name: "activity",
|
55
|
-
icon_class: "fa fa-fw fa-futbol-o",
|
56
|
-
caption: {
|
57
|
-
en: "Activity",
|
58
|
-
es: "Actividad",
|
59
|
-
pt: "Atividade",
|
60
|
-
}
|
61
|
-
},
|
62
|
-
{
|
63
|
-
name: "travel",
|
64
|
-
icon_class: "fa fa-fw fa-plane",
|
65
|
-
caption: {
|
66
|
-
en: "Travel & Places",
|
67
|
-
es: "Viajes y lugares",
|
68
|
-
pt: "Viagens e lugares",
|
69
|
-
}
|
70
|
-
},
|
71
|
-
{
|
72
|
-
name: "objects",
|
73
|
-
icon_class: "fa fa-fw fa-wrench",
|
74
|
-
caption: {
|
75
|
-
en: "Objects",
|
76
|
-
es: "Objetos",
|
77
|
-
pt: "Objetos",
|
78
|
-
}
|
79
|
-
},
|
80
|
-
{
|
81
|
-
name: "symbols",
|
82
|
-
icon_class: "fa fa-fw fa-hashtag",
|
83
|
-
caption: {
|
84
|
-
en: "Symbols",
|
85
|
-
es: "Símbolos",
|
86
|
-
pt: "Símbolos",
|
87
|
-
}
|
88
|
-
},
|
89
|
-
{
|
90
|
-
name: "flags",
|
91
|
-
icon_class: "fa fa-fw fa-flag-o",
|
92
|
-
caption: {
|
93
|
-
en: "Flags",
|
94
|
-
es: "Banderas",
|
95
|
-
pt: "Bandeiras",
|
96
|
-
}
|
97
|
-
}
|
98
|
-
]
|
99
|
-
|
100
|
-
window._searchEmojiPlaceholder = {
|
101
|
-
en: 'Search emoji',
|
102
|
-
es: 'Buscar emoticón',
|
103
|
-
pt: 'Pesquisar emoji',
|
104
|
-
}
|
105
|
-
|
106
|
-
function compareEmojis(a, b) {
|
107
|
-
return a.order < b.order ? -1 : (a.order == b.order ? 0 : 1);
|
108
|
-
}
|
109
|
-
|
110
|
-
function fromCategory(category, jsCriteria, emoji) {
|
111
|
-
return emoji.category === category.name && jsCriteria(emoji);
|
112
|
-
}
|
113
|
-
|
114
|
-
function filterEmojisBy(category, jsCriteria) {
|
115
|
-
return window.muEmojis.list.filter(fromCategory.bind(window.muEmojis, category, jsCriteria));
|
116
|
-
}
|
117
|
-
|
118
|
-
function alwaysTrue(_emoji) {
|
119
|
-
return true;
|
120
|
-
}
|
121
|
-
|
122
|
-
window.muEmojis.filterEmojisBy = filterEmojisBy;
|
123
|
-
|
124
|
-
window.muEmojis.categories = window.muEmojis._categories_.map(function (category, index) {
|
125
|
-
return {
|
126
|
-
name: category.name,
|
127
|
-
icon_class: category.icon_class,
|
128
|
-
order: index + 1,
|
129
|
-
caption: category.caption[currentLanguage()],
|
130
|
-
list: filterEmojisBy(category, alwaysTrue),
|
131
|
-
};
|
132
|
-
})
|
133
|
-
|
134
|
-
window.muEmojis.inputPlaceholder = window.muEmojis._inputPlaceholder_[currentLanguage()];
|
135
|
-
window.searchEmojiPlaceholder = window._searchEmojiPlaceholder[currentLanguage()];
|
136
|
-
|
137
|
-
})(window);
|