j1-template 2024.3.13 → 2024.3.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +1 -1
- data/_includes/themes/j1/layouts/layout_resource_generator.html +1 -4
- data/_includes/themes/j1/procedures/blocks/footer/boxes/social_media_icons.proc +24 -23
- data/_includes/themes/j1/procedures/layouts/content_writer.proc +4 -3
- data/_includes/themes/j1/procedures/layouts/default_writer.proc +37 -6
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +31 -95
- data/_includes/themes/j1/procedures/layouts/resource_writer.proc +51 -29
- data/assets/data/amplitude.28.html +887 -0
- data/assets/data/amplitude.29.html +923 -0
- data/assets/data/amplitude.html +311 -46
- data/assets/data/banner.html +9 -7
- data/assets/data/masterslider.html +128 -7
- data/assets/data/panel.html +16 -65
- data/assets/theme/j1/adapter/js/amplitude.23.js +1165 -0
- data/assets/theme/j1/adapter/js/amplitude.24.js +1164 -0
- data/assets/theme/j1/adapter/js/amplitude.25.js +1268 -0
- data/assets/theme/j1/adapter/js/amplitude.js +294 -117
- data/assets/theme/j1/adapter/js/attic.js +14 -11
- data/assets/theme/j1/adapter/js/docsearch.js +2 -2
- data/assets/theme/j1/adapter/js/fab.js +2 -2
- data/assets/theme/j1/adapter/js/j1.js +8 -8
- data/assets/theme/j1/adapter/js/lazyLoader.js +60 -10
- data/assets/theme/j1/adapter/js/masonry.js +1 -1
- data/assets/theme/j1/adapter/js/masterslider.js +2 -2
- data/assets/theme/j1/adapter/js/particles.js +2 -2
- data/assets/theme/j1/adapter/js/scroller.js +2 -2
- data/assets/theme/j1/adapter/js/slick.js +2 -2
- data/assets/theme/j1/adapter/js/themes.js +1 -1
- data/assets/theme/j1/adapter/js/translator.js +2 -2
- data/assets/theme/j1/adapter/js/waves.js +1 -1
- data/assets/theme/j1/core/css/animate.css +1634 -1070
- data/assets/theme/j1/core/css/animate.css.map +1 -0
- data/assets/theme/j1/core/css/animate.min.css +2 -1
- data/assets/theme/j1/core/css/animate.min.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/fontawesome.css +3060 -1538
- data/assets/theme/j1/core/css/icon-fonts/fontawesome.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/fontawesome.min.css +2 -1
- data/assets/theme/j1/core/css/icon-fonts/fontawesome.min.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/iconify.css +2308 -1153
- data/assets/theme/j1/core/css/icon-fonts/iconify.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/iconify.min.css +2 -1
- data/assets/theme/j1/core/css/icon-fonts/iconify.min.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdi.css +16716 -8423
- data/assets/theme/j1/core/css/icon-fonts/mdi.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdi.min.css +2 -1
- data/assets/theme/j1/core/css/icon-fonts/mdi.min.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdib.css +5554 -2766
- data/assets/theme/j1/core/css/icon-fonts/mdib.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdib.min.css +2 -1
- data/assets/theme/j1/core/css/icon-fonts/mdib.min.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdil.css +742 -441
- data/assets/theme/j1/core/css/icon-fonts/mdil.css.map +1 -0
- data/assets/theme/j1/core/css/icon-fonts/mdil.min.css +2 -1
- data/assets/theme/j1/core/css/icon-fonts/mdil.min.css.map +1 -0
- data/assets/theme/j1/core/css/themes/bootstrap/bootstrap.css +6552 -3980
- data/assets/theme/j1/core/css/themes/bootstrap/bootstrap.css.map +1 -0
- data/assets/theme/j1/core/css/themes/bootstrap/bootstrap.min.css +2 -5
- data/assets/theme/j1/core/css/themes/bootstrap/bootstrap.min.css.map +1 -0
- data/assets/theme/j1/core/css/themes/unodark/bootstrap.css +6818 -4131
- data/assets/theme/j1/core/css/themes/unodark/bootstrap.css.map +1 -0
- data/assets/theme/j1/core/css/themes/unodark/bootstrap.min.css +2 -5
- data/assets/theme/j1/core/css/themes/unodark/bootstrap.min.css.map +1 -0
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +18568 -11577
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -0
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +2 -35
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -0
- data/assets/theme/j1/core/css/vendor.css +1771 -1043
- data/assets/theme/j1/core/css/vendor.css.map +1 -0
- data/assets/theme/j1/core/css/vendor.min.css +2 -1
- data/assets/theme/j1/core/css/vendor.min.css.map +1 -0
- data/assets/theme/j1/core/js/template.js +399 -447
- data/assets/theme/j1/core/js/template.min.js +7 -7
- data/assets/theme/j1/core/js/template.min.js.map +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +4 -2
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +39 -4
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +57 -17
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/icons/player/blue/pause.png +0 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.png +0 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.svg +87 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +60 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +59 -0
- data/assets/theme/j1/modules/amplitudejs/js/amplitude.js +65 -21
- data/assets/theme/j1/modules/amplitudejs/js/amplitude.min.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +113 -0
- data/assets/theme/j1/modules/iconPicker/js/universal-icon-picker.js +471 -471
- data/assets/theme/j1/modules/j1LazyLoader/LICENSE +21 -0
- data/assets/theme/j1/modules/j1LazyLoader/js/j1Lazy.js +870 -0
- data/assets/theme/j1/modules/js-cookies/js/js.cookie.js +3 -3
- data/assets/theme/j1/modules/lazyCssLoader/js/main.0.js +166 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/main.1.js +65 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/main.js +66 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/plugins/examplePlugin.js +13 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/plugins/my-plugin.js +25 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/plugins/plugin-interface.js +9 -0
- data/assets/theme/j1/modules/lazyCssLoader/js/plugins/pluginA.js +46 -0
- data/assets/theme/j1/modules/lazyLoader/js/plugins/README.md +324 -0
- data/assets/theme/j1/modules/lazyLoader/js/plugins/jquery.lazy.picture.js +188 -0
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +1 -1
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +794 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +151 -67
- data/assets/theme/j1/modules/slimSelect/js/select.js +1 -1
- data/assets/theme/j1/modules/slimSelect/js/select.min.js +3 -3
- data/assets/theme/j1/modules/themeSwitcher/js/switcher.js +2 -1
- data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.min.js +1 -1
- data/assets/theme/j1/modules/videojs/js/plugins/players/dm/icon/scalable/dailymotion.svg +62 -0
- data/assets/theme/j1/modules/videojs/js/plugins/players/yt/v3.0.0/youtube.js +832 -0
- data/assets/theme/j1/modules/videojs/js/plugins/players/yt/v3.0.0/youtube.min.js +17 -0
- data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.min.js +1 -1
- data/assets/theme/j1/modules/videojs/js/video.js +2 -2
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +577 -560
- data/lib/starter_web/_config.yml +2 -2
- data/lib/starter_web/_data/blocks/footer.yml +10 -5
- data/lib/starter_web/_data/blocks/panel.yml +2 -2
- data/lib/starter_web/_data/layouts/default.yml +14 -3
- data/lib/starter_web/_data/modules/amplitude.yml +145 -0
- data/lib/starter_web/_data/modules/defaults/amplitude.yml +29 -7
- data/lib/starter_web/_data/modules/defaults/lazyLoader.yml +2 -2
- data/lib/starter_web/_data/modules/gallery.yml +136 -0
- data/lib/starter_web/_data/modules/lazyLoader.0.yml +118 -0
- data/lib/starter_web/_data/modules/lazyLoader.yml +68 -31
- data/lib/starter_web/_data/modules/masonry.yml +4 -4
- data/lib/starter_web/_data/modules/masterslider.yml +118 -12
- data/lib/starter_web/_data/modules/navigator_menu.yml +831 -803
- data/lib/starter_web/_data/resources.yml +154 -190
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/attributes.asciidoc +1 -0
- data/lib/starter_web/_plugins/asciidoctor/amplitude-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/gallery-block.rb +4 -2
- data/lib/starter_web/_plugins/asciidoctor/masonry-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +58 -46
- data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +26 -19
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +30 -40
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/image/icons/lanus/favicon.ico +0 -0
- data/lib/starter_web/assets/image/icons/lanus/lanus-512x512.png +0 -0
- data/lib/starter_web/assets/image/icons/lanus/lanus.ico +0 -0
- data/lib/starter_web/assets/image/icons/lanus/lanus.png +0 -0
- data/lib/starter_web/assets/image/icons/lanus/scalable/lanus.svg +76 -0
- data/lib/starter_web/assets/image/icons/lanus/scalable/lanus_sw.svg +62 -0
- data/lib/starter_web/assets/image/modules/icons/social/scalable/icon-twitter-x-28 - social.svg +86 -0
- data/lib/starter_web/assets/image/modules/icons/social/scalable/icon-twitter-x-28.svg +64 -0
- data/lib/starter_web/assets/image/modules/icons/social/scalable/icon-twitter-x.svg +1 -0
- data/lib/starter_web/assets/image/modules/icons/social/twitter_x.png +0 -0
- data/lib/starter_web/package.json +7 -18
- data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +218 -0
- data/lib/starter_web/pages/public/features/template.adoc +18 -8
- data/lib/starter_web/pages/public/features/template.asciidoc +758 -0
- data/lib/starter_web/pages/public/lazy_loader_tester.adoc +402 -0
- data/lib/starter_web/pages/public/manuals/ytdl/man.adoc +3020 -0
- data/lib/starter_web/pages/public/manuals/ytdl/man.md +2378 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/attributes.asciidoc +0 -16
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/amplitudejs.large.css.asciidoc +505 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.hover.html +69 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.nested.html +75 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.textarea.html +57 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/my.content.html +112 -0
- data/lib/starter_web/pages/public/tools/previewer/preview_amplitudejs.adoc +172 -0
- data/lib/starter_web/pages/public/tour/_includes/attributes.asciidoc +2 -2
- data/lib/starter_web/pages/public/tour/_includes/documents/419_advanced_modals_demo.asciidoc +16 -16
- data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +13 -3
- data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +12 -3
- data/lib/starter_web/pages/public/tour/highlghter_rouge.adoc +13 -3
- data/lib/starter_web/pages/public/tour/icon_fonts.adoc +12 -3
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +12 -6
- data/lib/starter_web/pages/public/tour/{playback_audio.adoc → play_audio.adoc} +207 -188
- data/lib/starter_web/pages/public/tour/{playback_video.adoc → play_video.adoc} +49 -51
- data/lib/starter_web/pages/public/tour/present_images.adoc +27 -5
- data/lib/starter_web/pages/public/tour/quicksearch.adoc +13 -3
- data/lib/starter_web/pages/public/tour/responsive_tables.adoc +13 -4
- data/lib/starter_web/pages/public/tour/typography.adoc +12 -3
- metadata +90 -22
- /data/assets/theme/j1/modules/{lazyLoader → j1LazyLoader/js}/plugins/README.md +0 -0
- /data/assets/theme/j1/modules/{lazyLoader/plugins/jquery.lazy.picture.js → j1LazyLoader/js/plugins/picture.js} +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.ajax.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.ajax.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.av.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.av.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.iframe.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.iframe.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.noop.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.noop.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.picture.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.script.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.script.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.vimeo.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.vimeo.min.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.youtube.js +0 -0
- /data/assets/theme/j1/modules/lazyLoader/{plugins → js/plugins}/jquery.lazy.youtube.min.js +0 -0
@@ -18,476 +18,476 @@ const iconPickerUrl = document.currentScript.src.replace(/js\/([a-z\.-]+)$/gm, '
|
|
18
18
|
const loadedDependencies = [];
|
19
19
|
|
20
20
|
(function (root, factory) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
if (typeof define === 'function' && define.amd) {
|
22
|
+
define([], factory('UniversalIconPicker'));
|
23
|
+
} else if (typeof exports === 'object') {
|
24
|
+
module.exports = factory('UniversalIconPicker');
|
25
|
+
} else {
|
26
|
+
root['UniversalIconPicker'] = factory('UniversalIconPicker');
|
27
|
+
}
|
28
28
|
}(this, function () {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
29
|
+
"use strict";
|
30
|
+
|
31
|
+
const createDomEle = function (string) {
|
32
|
+
const ele = document.createElement('div');
|
33
|
+
ele.innerHTML = string;
|
34
|
+
return ele.firstChild;
|
35
|
+
}
|
36
|
+
|
37
|
+
const debounce = function (func, wait, immediate) {
|
38
|
+
let timeout;
|
39
|
+
return function () {
|
40
|
+
const context = this,
|
41
|
+
args = arguments;
|
42
|
+
const later = function () {
|
43
|
+
timeout = null;
|
44
|
+
if (!immediate) func.apply(context, args);
|
45
|
+
};
|
46
|
+
const callNow = immediate && !timeout;
|
47
|
+
clearTimeout(timeout);
|
48
|
+
timeout = setTimeout(later, wait);
|
49
|
+
if (callNow) func.apply(context, args);
|
50
|
+
};
|
51
|
+
};
|
52
|
+
|
53
|
+
const escapeHtml = function (text) {
|
54
|
+
const map = {
|
55
|
+
'&': '&',
|
56
|
+
'<': '<',
|
57
|
+
'>': '>',
|
58
|
+
'"': '"',
|
59
|
+
"'": '''
|
60
|
+
};
|
61
|
+
|
62
|
+
return text.replace(/[&<>"']/g, function (m) { return map[m]; });
|
63
|
+
};
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Merge defaults with user options
|
67
|
+
* @param {Object} defaults Default settings
|
68
|
+
* @param {Object} options User options
|
69
|
+
*/
|
70
|
+
const extend = function (defaults, options) {
|
71
|
+
let prop, extended = {};
|
72
|
+
for (prop in defaults) {
|
73
|
+
if (Object.prototype.hasOwnProperty.call(defaults, prop)) {
|
74
|
+
extended[prop] = defaults[prop];
|
75
|
+
}
|
76
|
+
}
|
77
|
+
for (prop in options) {
|
78
|
+
if (Object.prototype.hasOwnProperty.call(options, prop)) {
|
79
|
+
extended[prop] = options[prop];
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
return extended;
|
84
|
+
};
|
85
|
+
|
86
|
+
const getLibraryName = function (string) {
|
87
|
+
return string.replace(/([A-Z])/g, ' $1');
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Plugin Object
|
92
|
+
* @param selector The html selector to initialize
|
93
|
+
* @param {Object} options User options
|
94
|
+
* @constructor
|
95
|
+
*/
|
96
|
+
function UniversalIconPicker (selector, options) {
|
97
|
+
this.selector = selector;
|
98
|
+
|
99
|
+
let defaults = {
|
100
|
+
allowEmpty: true,
|
101
|
+
iconLibraries: null,
|
102
|
+
iconLibrariesCss: null,
|
103
|
+
mode: 'autoload', // autoload | onrequest
|
104
|
+
onBeforeOpen: null,
|
105
|
+
onReset: null,
|
106
|
+
onSelect: null,
|
107
|
+
resetSelector: null,
|
108
|
+
loadCustomCss: false
|
109
|
+
};
|
110
|
+
this.options = extend(defaults, options);
|
111
|
+
|
112
|
+
this.activeLibraryId = '';
|
113
|
+
this.filterIcon = '';
|
114
|
+
this.iconEventsLoaded = false;
|
115
|
+
this.iconLibraries = {};
|
116
|
+
this.iconLibrariesLoaded = false;
|
117
|
+
this.iconMarkup = '';
|
118
|
+
this.iconWrap = '';
|
119
|
+
this.idSuffix = '-' + this.selector.replace(/[#\s[\]="]/g, '');
|
120
|
+
this.sideBarBtn = '';
|
121
|
+
this.sideBarList = [];
|
122
|
+
|
123
|
+
this.universalWrap = '<div class="uip-modal uip-open" id="uip-modal' + this.idSuffix + '"><div class="uip-modal--content"><div class="uip-modal--header"><div class="uip-modal--header-logo-area"><span class="uip-modal--header-logo-title">Icon Picker</span></div><div class="uip-modal--header-close-btn"><img src="' + iconPickerUrl + '/images/xmark-solid.svg" width="40" height="40" alt="Close" title="Close"></div></div><div class="uip-modal--body"><div id="uip-modal--sidebar' + this.idSuffix + '" class="uip-modal--sidebar"><div class="uip-modal--sidebar-tabs"></div></div><div id="uip-modal--icon-preview-wrap' + this.idSuffix + '" class="uip-modal--icon-preview-wrap"><div class="uip-modal--icon-search"><input name="" value="" placeholder="Filter by name..."><img src="' + iconPickerUrl + '/images/magnifying-glass-solid.svg" width="20" height="16" alt="Search" title="Search"></div><div class="uip-modal--icon-preview-inner"><div id="uip-modal--icon-preview' + this.idSuffix + '" class="uip-modal--icon-preview"></div></div></div></div><div class="uip-modal--footer"><button class="uip-insert-icon-button mt-3 mb-3 mr-6">Copy to clipboard</button></div></div></div>';
|
124
|
+
|
125
|
+
this.universalDomEle = createDomEle(this.universalWrap);
|
126
|
+
this.sidebarTabs = this.universalDomEle.querySelector('.uip-modal--sidebar-tabs');
|
127
|
+
this.previewWrap = this.universalDomEle.querySelector('#uip-modal--icon-preview' + this.idSuffix);
|
128
|
+
this.searchInput = this.universalDomEle.querySelector('.uip-modal--icon-search input');
|
129
|
+
if (this.options.mode === 'autoload') {
|
130
|
+
this.init();
|
131
|
+
} else {
|
132
|
+
document.querySelector(this.selector).addEventListener('click', this.init.bind(this), { once: true });
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
|
137
|
+
// Plugin prototype
|
138
|
+
UniversalIconPicker.prototype = {
|
139
|
+
|
140
|
+
/* Public functions
|
141
|
+
------------------------------------------------------------------------ */
|
142
|
+
|
143
|
+
init: function () {
|
144
|
+
this._loadCssFiles();
|
145
|
+
if (this.options.mode !== 'autoload') {
|
146
|
+
this._onBeforeOpen().then(() => {
|
147
|
+
this.open();
|
148
|
+
});
|
149
|
+
}
|
150
|
+
document.querySelector(this.selector).addEventListener('click', () => {
|
151
|
+
this._onBeforeOpen().then(() => {
|
152
|
+
this.open();
|
153
|
+
});
|
154
|
+
});
|
155
|
+
|
156
|
+
//Remove selected icon
|
157
|
+
if (this.options.resetSelector) {
|
158
|
+
document.querySelector(this.options.resetSelector).addEventListener('click', this.options.onReset);
|
159
|
+
}
|
160
|
+
},
|
161
|
+
|
162
|
+
open: function () {
|
163
|
+
this._loadIconLibraries().then(() => {
|
164
|
+
this.iconLibrariesLoaded = true;
|
165
|
+
if (!document.getElementById('uip-modal' + this.idSuffix)) {
|
166
|
+
// push universal dom to body
|
167
|
+
document.body.appendChild(this.universalDomEle);
|
168
|
+
|
169
|
+
// jadams, 2023-05-21: disable page scrolling if modal is OPEN
|
170
|
+
document.body.classList.add('stop-scrolling');
|
171
|
+
|
172
|
+
// Icon library close by clicking close button
|
173
|
+
this.universalDomEle.querySelector('.uip-modal--header-close-btn').addEventListener('click', () => {
|
174
|
+
this.universalDomEle.classList.add('uip-close');
|
175
|
+
this.universalDomEle.classList.remove('uip-open');
|
176
|
+
// jadams, 2023-05-21: (re-)enable page scrolling if modal is CLOSED
|
177
|
+
document.body.classList.remove('stop-scrolling');
|
178
|
+
});
|
179
|
+
|
180
|
+
// Insert button
|
181
|
+
this.universalDomEle.querySelector('.uip-insert-icon-button').addEventListener('click', () => {
|
182
|
+
let selected = this.universalDomEle.querySelector('.universal-selected');
|
183
|
+
|
184
|
+
if (selected) {
|
185
|
+
let iconHtml = selected.querySelector('i').outerHTML;
|
186
|
+
let jsonOutput = {
|
187
|
+
'libraryId': selected.dataset.libraryId,
|
188
|
+
'libraryName': selected.dataset.libraryName,
|
189
|
+
'iconHtml': null,
|
190
|
+
'iconMarkup': null,
|
191
|
+
'iconClass': null,
|
192
|
+
'iconText': null
|
193
|
+
};
|
194
|
+
if (!selected.querySelector('i').classList.value.match('uip-icon-none')) {
|
195
|
+
jsonOutput.iconHtml = iconHtml;
|
196
|
+
jsonOutput.iconMarkup = escapeHtml(iconHtml);
|
197
|
+
jsonOutput.iconClass = selected.querySelector('i').classList.value;
|
198
|
+
jsonOutput.iconText = selected.querySelector('i').innerText;
|
199
|
+
}
|
200
|
+
|
201
|
+
this.options.onSelect(jsonOutput);
|
202
|
+
}
|
203
|
+
// jadams, 2023-05-21: disable modal CLOSE on a select
|
204
|
+
// this.universalDomEle.classList.add('uip-close');
|
205
|
+
// this.universalDomEle.classList.remove('uip-open');
|
206
|
+
});
|
207
|
+
} else {
|
208
|
+
// Icon library open if dom element exist
|
209
|
+
this.universalDomEle.classList.remove('uip-close');
|
210
|
+
this.universalDomEle.classList.add('uip-open');
|
211
|
+
// jadams, 2023-05-21: disable page scrolling if modal is OPEN
|
212
|
+
document.body.classList.add('stop-scrolling');
|
213
|
+
}
|
214
|
+
|
215
|
+
if (!this.iconEventsLoaded) {
|
216
|
+
// selected icon highlighted by adding class
|
217
|
+
this.universalDomEle.querySelectorAll('.uip-icon-item').forEach((item) => {
|
218
|
+
item.addEventListener('click', (evt) => {
|
219
|
+
this.iconWrap.forEach((el) => {
|
220
|
+
el.classList.remove('universal-selected');
|
221
|
+
});
|
222
|
+
evt.currentTarget.classList.toggle('universal-selected');
|
223
|
+
});
|
224
|
+
item.addEventListener('dblclick', (evt) => {
|
225
|
+
this.universalDomEle.querySelector('.uip-insert-icon-button').click();
|
226
|
+
});
|
227
|
+
});
|
228
|
+
this.iconEventsLoaded = true;
|
229
|
+
}
|
230
|
+
|
231
|
+
this.universalDomEle.querySelector('.uip-modal--icon-search input').focus();
|
232
|
+
});
|
233
|
+
},
|
234
|
+
|
235
|
+
setOptions: function (opts) {
|
236
|
+
this.options = extend(this.options, opts);
|
237
|
+
if (opts.iconLibrariesCss) {
|
238
|
+
this._loadCssFiles();
|
239
|
+
}
|
240
|
+
if (opts.iconLibraries) {
|
241
|
+
// dom icon events need to be reloaded
|
242
|
+
this.iconEventsLoaded = false;
|
243
|
+
this.iconLibrariesLoaded = false;
|
244
|
+
this._resetIconAndSidebarList();
|
245
|
+
}
|
246
|
+
},
|
247
|
+
|
248
|
+
/* Private functions
|
249
|
+
------------------------------------------------------------------------ */
|
250
|
+
|
251
|
+
_clickHandlerFunc: function (e) {
|
252
|
+
if (!e.currentTarget.classList.contains('universal-active')) {
|
253
|
+
this.sideBarBtn.forEach(function (item) {
|
254
|
+
item.classList.remove('universal-active');
|
255
|
+
});
|
256
|
+
e.currentTarget.classList.add('universal-active')
|
257
|
+
}
|
258
|
+
this._sidebarFilterFunc(e.currentTarget.dataset['libraryId']);
|
259
|
+
},
|
260
|
+
|
261
|
+
_iconItemMarkup: function (libraryName, libraryItem) {
|
262
|
+
let markup = '',
|
263
|
+
library = libraryItem['icon-style'],
|
264
|
+
prefix = libraryItem['prefix'];
|
265
|
+
|
266
|
+
if (this.options.allowEmpty) {
|
267
|
+
markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + prefix + ' uip-icon-none"> </i><div class="uip-icon-item-name" title="None">None</div></div></div>';
|
268
|
+
}
|
269
|
+
if (prefix.match(/^material-icons/)) {
|
270
|
+
libraryItem['icons'].forEach(function (item) {
|
271
|
+
markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="' + item + '" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + prefix + '">' + item + '</i><div class="uip-icon-item-name" title="' + item + '">' + item.replace("-", " ") + '</div></div></div>';
|
272
|
+
});
|
273
|
+
} else {
|
274
|
+
libraryItem['icons'].forEach(function (item) {
|
275
|
+
markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="' + item + '" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + [prefix, item].join('') + '"></i><div class="uip-icon-item-name" title="' + item + '">' + item.replace("-", " ") + '</div></div></div>';
|
276
|
+
});
|
277
|
+
}
|
278
|
+
|
279
|
+
return markup;
|
280
|
+
},
|
281
|
+
|
282
|
+
_iconItemPush: function (arrayList) {
|
283
|
+
this.previewWrap.innerHTML = '';
|
284
|
+
arrayList.forEach((item) => {
|
285
|
+
this.previewWrap.appendChild(item[1]);
|
286
|
+
});
|
287
|
+
},
|
288
|
+
|
289
|
+
_loadCssFiles: function () {
|
290
|
+
let link = document.createElement('link');
|
291
|
+
if (!loadedDependencies.includes('universal-icon-picker.min.css') & !this.options.loadCustomCss) {
|
292
|
+
link.rel = 'stylesheet';
|
293
|
+
link.type = 'text/css';
|
294
|
+
link.href = iconPickerUrl + 'css/universal-icon-picker.min.css';
|
295
|
+
link.media = 'screen';
|
296
|
+
document.head.appendChild(link);
|
297
|
+
loadedDependencies.push('universal-icon-picker.min.css');
|
298
|
+
}
|
299
|
+
if (this.options.iconLibrariesCss) {
|
300
|
+
this.options.iconLibrariesCss.forEach(cssFile => {
|
301
|
+
if (!loadedDependencies.includes(cssFile)) {
|
302
|
+
let cssFileLink = iconPickerUrl + 'css/' + cssFile;
|
303
|
+
if (cssFile.match(/^http|^\/\//)) {
|
304
|
+
cssFileLink = cssFile;
|
305
|
+
link = document.createElement('link');
|
306
|
+
link.rel = 'stylesheet';
|
307
|
+
link.type = 'text/css';
|
308
|
+
link.href = cssFileLink;
|
309
|
+
link.media = 'screen';
|
310
|
+
document.head.appendChild(link);
|
311
|
+
loadedDependencies.push(cssFile);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
});
|
315
|
+
}
|
316
|
+
},
|
317
|
+
|
318
|
+
_loadIconLibraries: async function (i = 0) {
|
319
|
+
if (!this.options.iconLibraries) {
|
320
|
+
console.error('Universal icon picker - no icon library loaded');
|
321
|
+
return false;
|
322
|
+
}
|
323
|
+
if (this.iconLibrariesLoaded) {
|
324
|
+
return true;
|
325
|
+
}
|
326
|
+
if (i === 0 && this.options.iconLibraries.length > 1) {
|
327
|
+
this.sideBarList.push({
|
328
|
+
"title": "all icons",
|
329
|
+
"list-icon": "",
|
330
|
+
"library-id": "all",
|
331
|
+
"prefix": ""
|
332
|
+
});
|
333
|
+
}
|
334
|
+
|
335
|
+
let iconLib = this.options.iconLibraries[i];
|
336
|
+
|
337
|
+
await fetch(iconPickerUrl + 'icons-libraries/' + iconLib)
|
338
|
+
.then(response => response.json())
|
339
|
+
.then(data => {
|
340
|
+
// Success!
|
341
|
+
const camelCasedIconLibrary = iconLib.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }).replace(/\.[a-z.]+$/, '');
|
342
|
+
let newLibrary = {};
|
343
|
+
newLibrary[camelCasedIconLibrary] = data;
|
344
|
+
Object.assign(this.iconLibraries, newLibrary); // new icon library merge
|
345
|
+
if (i + 1 === this.options.iconLibraries.length) {
|
346
|
+
//set icon and sidebar list
|
347
|
+
this._setIconAndSidebarList();
|
348
|
+
|
349
|
+
this.activeLibraryId = this.sideBarList[0]['library-id'];
|
350
|
+
|
351
|
+
//sidebar list markup push
|
352
|
+
this.sidebarTabs.innerHTML = this._sideBarListMarkup(this.sideBarList);
|
353
|
+
|
354
|
+
//icon markup push
|
355
|
+
this.previewWrap.innerHTML = this.iconMarkup;
|
356
|
+
|
357
|
+
// get all icon wrapper dom element
|
358
|
+
this.iconWrap = this.previewWrap.querySelectorAll('.uip-icon-item');
|
359
|
+
|
360
|
+
//set event lisner to search input
|
361
|
+
this.searchInput.addEventListener('keyup', debounce(this._searchFunc, 100).bind(this), false);
|
362
|
+
|
363
|
+
//get all sidebar list item wrapper dom element
|
364
|
+
this.sideBarBtn = this.sidebarTabs.querySelectorAll('.uip-modal--sidebar-tab-item');
|
365
|
+
|
366
|
+
//set click event lisner to sidebar list item
|
367
|
+
this.sideBarBtn.forEach((item) => {
|
368
|
+
item.addEventListener('click', this._clickHandlerFunc.bind(this), false);
|
369
|
+
});
|
370
|
+
|
371
|
+
return true;
|
372
|
+
} else {
|
373
|
+
return this._loadIconLibraries(i + 1);
|
374
|
+
}
|
375
|
+
}).catch((error) => {
|
376
|
+
console.log(error);
|
377
|
+
return error;
|
378
|
+
});
|
379
|
+
},
|
380
|
+
|
381
|
+
_onBeforeOpen: async function () {
|
382
|
+
if (typeof (this.options.onBeforeOpen) === 'function') {
|
383
|
+
return this.options.onBeforeOpen();
|
384
|
+
}
|
385
|
+
},
|
386
|
+
|
387
|
+
_resetIconAndSidebarList: function () {
|
388
|
+
this.sideBarList = [];
|
389
|
+
this.iconMarkup = '';
|
390
|
+
this.iconLibraries = {};
|
391
|
+
this.iconWrap = '';
|
392
|
+
this.filterIcon = '';
|
393
|
+
this.sideBarBtn = '';
|
394
|
+
this.activeLibraryId = '';
|
395
|
+
},
|
396
|
+
|
397
|
+
_searchFunc: function (e) {
|
398
|
+
// console.log(this.value.toLowerCase());
|
399
|
+
|
400
|
+
const searchText = e.target.value.toLowerCase();
|
401
|
+
this._searchFilterFunc(searchText, 'filter');
|
402
|
+
|
403
|
+
},
|
404
|
+
|
405
|
+
_searchFilterFunc: function (filterText, dataName) {
|
406
|
+
this.filterIcon = Object.entries(this.iconWrap).filter((item) => {
|
407
|
+
if (-1 == item[1].dataset[dataName].indexOf(filterText) || (this.activeLibraryId !== 'all' && item[1].dataset['libraryId'] !== this.activeLibraryId)) {
|
408
|
+
return false;
|
409
|
+
}
|
410
|
+
return true;
|
411
|
+
});
|
412
|
+
|
413
|
+
this._iconItemPush(this.filterIcon);
|
414
|
+
|
415
|
+
},
|
416
|
+
|
417
|
+
_setIconAndSidebarList: function () {
|
418
|
+
for (const [libraryName, libraryContent] of Object.entries(this.iconLibraries)) {
|
419
|
+
this._setSideBarList(getLibraryName(libraryName), libraryContent);
|
420
|
+
this._setIconMarkup(libraryName, libraryContent);
|
421
|
+
}
|
422
|
+
},
|
423
|
+
|
424
|
+
_setIconMarkup: function (libraryName, libraryContent) {
|
425
|
+
if (libraryContent.icons !== undefined) {
|
426
|
+
this.iconMarkup += this._iconItemMarkup(libraryName, libraryContent)
|
427
|
+
} else {
|
428
|
+
Object.entries(libraryContent).forEach((item) => {
|
429
|
+
this.iconMarkup += this._iconItemMarkup(libraryName, item[1])
|
430
|
+
});
|
431
|
+
}
|
432
|
+
},
|
433
|
+
|
434
|
+
_sidebarFilterFunc: function (filterText) {
|
435
|
+
this.activeLibraryId = filterText;
|
436
|
+
this.filterIcon = Object.entries(this.iconWrap).filter(function (item) {
|
437
|
+
if ('all' === filterText || filterText === item[1].dataset['libraryId']) {
|
438
|
+
return true;
|
439
|
+
}
|
440
|
+
return false;
|
441
|
+
});
|
442
|
+
|
443
|
+
this._iconItemPush(this.filterIcon);
|
444
|
+
|
445
|
+
},
|
446
|
+
|
447
|
+
_setSideBarList: function (libraryName, libraryContent) {
|
448
|
+
let listItem;
|
449
|
+
if (libraryContent.icons !== undefined) {
|
450
|
+
listItem = {
|
451
|
+
'title': libraryName,
|
452
|
+
'prefix': libraryContent['prefix'] !== undefined ? libraryContent['prefix'] : '',
|
453
|
+
'list-icon': libraryContent['list-icon'] !== undefined ? libraryContent['list-icon'] : '',
|
454
|
+
'library-id': libraryContent['icon-style'] !== undefined ? libraryContent['icon-style'] : 'all',
|
455
|
+
};
|
456
|
+
this.sideBarList.push(listItem);
|
457
|
+
} else {
|
458
|
+
Object.entries(libraryContent).forEach(item => {
|
459
|
+
listItem = {
|
460
|
+
"title": libraryName + ' - ' + item[0],
|
461
|
+
"prefix": item[1]['prefix'] !== undefined ? item[1]['prefix'] : '',
|
462
|
+
"list-icon": item[1]['list-icon'] !== undefined ? item[1]['list-icon'] : "",
|
463
|
+
"library-id": item[1]['icon-style'] !== undefined ? item[1]['icon-style'] : "all",
|
464
|
+
};
|
465
|
+
this.sideBarList.push(listItem)
|
466
|
+
});
|
467
|
+
}
|
468
|
+
},
|
469
|
+
|
470
|
+
_sideBarListMarkup: function (sideBarList) {
|
471
|
+
let markup = '';
|
472
|
+
sideBarList.forEach((item) => {
|
473
|
+
let activeClazz = '';
|
474
|
+
if (item['library-id'] === this.activeLibraryId) {
|
475
|
+
activeClazz = ' universal-active';
|
476
|
+
}
|
477
|
+
if ('all' !== item['library-id']) {
|
478
|
+
let iconTag = '<i class="' + item['list-icon'] + '"></i>';
|
479
|
+
if (item['prefix'].match(/^material-icons/)) {
|
480
|
+
iconTag = '<i class="' + item['prefix'] + '">' + item['list-icon'] + '</i>';
|
481
|
+
}
|
482
|
+
markup += '<div class="uip-modal--sidebar-tab-item' + activeClazz + '" data-library-id="' + item['library-id'] + '">' + iconTag + item['title'] + '</div>';
|
483
|
+
} else {
|
484
|
+
markup += '<div class="uip-modal--sidebar-tab-item' + activeClazz + '" data-library-id="' + item['library-id'] + '"><img src="' + iconPickerUrl + '/images/star-of-life-solid.svg" width="13.125px" height="auto" alt="All" title="All">' + item['title'] + '</div>';
|
485
|
+
}
|
486
|
+
});
|
487
|
+
|
488
|
+
return markup;
|
489
|
+
}
|
490
|
+
};
|
491
|
+
|
492
|
+
return UniversalIconPicker;
|
493
493
|
}));
|