From 53045b22ba2531af7323f958c91c381bf8c9a9d8 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 1 Nov 2022 16:31:33 -0700 Subject: [PATCH] Migrate images to emoji --- bitbucket-pipelines.yml | 2 +- .../image-icon-tab/iconGroups.json | 52 +----- .../mindplot/assets/icons/bulb_light_off.svg | 48 ----- .../mindplot/assets/icons/bulb_light_on.svg | 70 ------- .../mindplot/assets/icons/bullet_blue.png | Bin 289 -> 0 bytes .../mindplot/assets/icons/bullet_green.png | Bin 295 -> 0 bytes .../mindplot/assets/icons/bullet_orange.png | Bin 283 -> 0 bytes .../mindplot/assets/icons/bullet_pink.png | Bin 286 -> 0 bytes .../mindplot/assets/icons/bullet_purple.png | Bin 294 -> 0 bytes packages/mindplot/assets/icons/bullet_red.png | Bin 287 -> 0 bytes .../mindplot/assets/icons/face_crying.svg | 102 ----------- packages/mindplot/assets/icons/face_plain.svg | 106 ----------- packages/mindplot/assets/icons/face_sad.svg | 106 ----------- packages/mindplot/assets/icons/face_smile.svg | 106 ----------- .../mindplot/assets/icons/face_smile_big.svg | 124 ------------- .../mindplot/assets/icons/face_surprise.svg | 109 ----------- packages/mindplot/assets/icons/face_wink.svg | 92 ---------- .../mindplot/assets/icons/funy_devilish.svg | 100 ---------- .../mindplot/assets/icons/funy_glasses.svg | 110 ----------- packages/mindplot/assets/icons/funy_grin.svg | 110 ----------- packages/mindplot/assets/icons/funy_kiss.svg | 104 ----------- .../mindplot/assets/icons/funy_monkey.svg | 137 -------------- .../mindplot/assets/icons/hard_keyboard.svg | 128 ------------- .../mindplot/assets/icons/money_pound.svg | 173 ------------------ packages/mindplot/assets/icons/money_yen.svg | 163 ----------------- packages/mindplot/assets/icons/number_1.svg | 55 ------ packages/mindplot/assets/icons/number_2.svg | 55 ------ packages/mindplot/assets/icons/number_3.svg | 55 ------ packages/mindplot/assets/icons/number_4.svg | 55 ------ packages/mindplot/assets/icons/number_5.svg | 55 ------ packages/mindplot/assets/icons/number_6.svg | 60 ------ packages/mindplot/assets/icons/number_7.svg | 55 ------ packages/mindplot/assets/icons/number_8.svg | 58 ------ packages/mindplot/assets/icons/number_9.svg | 60 ------ .../mindplot/assets/icons/object_bell.svg | 10 - .../mindplot/assets/icons/object_cake.svg | 76 -------- .../mindplot/assets/icons/object_palette.svg | 86 --------- .../mindplot/assets/icons/object_phone.svg | 7 - .../mindplot/assets/icons/object_rainbow.svg | 50 ----- .../mindplot/assets/icons/object_wizard.svg | 65 ------- .../mindplot/assets/icons/onoff_clock_red.svg | 125 ------------- .../assets/icons/sport_basketball.svg | 74 -------- .../mindplot/assets/icons/sport_football.svg | 66 ------- packages/mindplot/assets/icons/sport_golf.svg | 64 ------- .../mindplot/assets/icons/sport_raquet.svg | 52 ------ .../assets/icons/sport_shuttlecock.svg | 83 --------- .../mindplot/assets/icons/sport_soccer.svg | 76 -------- .../mindplot/assets/icons/sport_tennis.svg | 56 ------ packages/mindplot/assets/icons/task_0.svg | 8 - packages/mindplot/assets/icons/task_100.svg | 5 - packages/mindplot/assets/icons/task_25.svg | 5 - packages/mindplot/assets/icons/task_50.svg | 5 - packages/mindplot/assets/icons/task_75.svg | 5 - .../assets/icons/weather_clear-night.svg | 91 --------- .../mindplot/assets/icons/weather_clear.svg | 73 -------- .../assets/icons/weather_few-clouds-night.svg | 64 ------- .../assets/icons/weather_few-clouds.svg | 76 -------- .../assets/icons/weather_overcast.svg | 77 -------- .../assets/icons/weather_severe-alert.svg | 37 ---- .../icons/weather_showers-scattered.svg | 90 --------- .../mindplot/assets/icons/weather_showers.svg | 79 -------- .../mindplot/assets/icons/weather_snow.svg | 94 ---------- .../mindplot/assets/icons/weather_storm.svg | 90 --------- packages/mindplot/package.json | 1 + .../src/components/model/SvgIconFamily.json | 83 +-------- .../persistence/XMLSerializerTango.ts | 20 +- .../components/persistence/iconToEmoji.json | 52 ++++++ .../test/unit/export/expected/complex.wxml | 10 +- .../test/unit/export/expected/npe.wxml | 2 +- .../test/unit/export/expected/welcome.mm | 9 +- .../test/unit/export/expected/welcome.wxml | 4 +- packages/mindplot/tsconfig.json | 1 + packages/webapp/public/index.html | 1 - yarn.lock | 5 + 74 files changed, 90 insertions(+), 4237 deletions(-) delete mode 100644 packages/mindplot/assets/icons/bulb_light_off.svg delete mode 100644 packages/mindplot/assets/icons/bulb_light_on.svg delete mode 100644 packages/mindplot/assets/icons/bullet_blue.png delete mode 100644 packages/mindplot/assets/icons/bullet_green.png delete mode 100644 packages/mindplot/assets/icons/bullet_orange.png delete mode 100644 packages/mindplot/assets/icons/bullet_pink.png delete mode 100644 packages/mindplot/assets/icons/bullet_purple.png delete mode 100644 packages/mindplot/assets/icons/bullet_red.png delete mode 100644 packages/mindplot/assets/icons/face_crying.svg delete mode 100644 packages/mindplot/assets/icons/face_plain.svg delete mode 100644 packages/mindplot/assets/icons/face_sad.svg delete mode 100644 packages/mindplot/assets/icons/face_smile.svg delete mode 100644 packages/mindplot/assets/icons/face_smile_big.svg delete mode 100644 packages/mindplot/assets/icons/face_surprise.svg delete mode 100644 packages/mindplot/assets/icons/face_wink.svg delete mode 100644 packages/mindplot/assets/icons/funy_devilish.svg delete mode 100644 packages/mindplot/assets/icons/funy_glasses.svg delete mode 100644 packages/mindplot/assets/icons/funy_grin.svg delete mode 100644 packages/mindplot/assets/icons/funy_kiss.svg delete mode 100644 packages/mindplot/assets/icons/funy_monkey.svg delete mode 100644 packages/mindplot/assets/icons/hard_keyboard.svg delete mode 100644 packages/mindplot/assets/icons/money_pound.svg delete mode 100644 packages/mindplot/assets/icons/money_yen.svg delete mode 100644 packages/mindplot/assets/icons/number_1.svg delete mode 100644 packages/mindplot/assets/icons/number_2.svg delete mode 100644 packages/mindplot/assets/icons/number_3.svg delete mode 100644 packages/mindplot/assets/icons/number_4.svg delete mode 100644 packages/mindplot/assets/icons/number_5.svg delete mode 100644 packages/mindplot/assets/icons/number_6.svg delete mode 100644 packages/mindplot/assets/icons/number_7.svg delete mode 100644 packages/mindplot/assets/icons/number_8.svg delete mode 100644 packages/mindplot/assets/icons/number_9.svg delete mode 100644 packages/mindplot/assets/icons/object_bell.svg delete mode 100644 packages/mindplot/assets/icons/object_cake.svg delete mode 100644 packages/mindplot/assets/icons/object_palette.svg delete mode 100644 packages/mindplot/assets/icons/object_phone.svg delete mode 100644 packages/mindplot/assets/icons/object_rainbow.svg delete mode 100644 packages/mindplot/assets/icons/object_wizard.svg delete mode 100644 packages/mindplot/assets/icons/onoff_clock_red.svg delete mode 100644 packages/mindplot/assets/icons/sport_basketball.svg delete mode 100644 packages/mindplot/assets/icons/sport_football.svg delete mode 100644 packages/mindplot/assets/icons/sport_golf.svg delete mode 100644 packages/mindplot/assets/icons/sport_raquet.svg delete mode 100644 packages/mindplot/assets/icons/sport_shuttlecock.svg delete mode 100644 packages/mindplot/assets/icons/sport_soccer.svg delete mode 100644 packages/mindplot/assets/icons/sport_tennis.svg delete mode 100644 packages/mindplot/assets/icons/task_0.svg delete mode 100644 packages/mindplot/assets/icons/task_100.svg delete mode 100644 packages/mindplot/assets/icons/task_25.svg delete mode 100644 packages/mindplot/assets/icons/task_50.svg delete mode 100644 packages/mindplot/assets/icons/task_75.svg delete mode 100644 packages/mindplot/assets/icons/weather_clear-night.svg delete mode 100644 packages/mindplot/assets/icons/weather_clear.svg delete mode 100644 packages/mindplot/assets/icons/weather_few-clouds-night.svg delete mode 100644 packages/mindplot/assets/icons/weather_few-clouds.svg delete mode 100644 packages/mindplot/assets/icons/weather_overcast.svg delete mode 100644 packages/mindplot/assets/icons/weather_severe-alert.svg delete mode 100644 packages/mindplot/assets/icons/weather_showers-scattered.svg delete mode 100644 packages/mindplot/assets/icons/weather_showers.svg delete mode 100644 packages/mindplot/assets/icons/weather_snow.svg delete mode 100644 packages/mindplot/assets/icons/weather_storm.svg create mode 100644 packages/mindplot/src/components/persistence/iconToEmoji.json diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 6e35f393..f7c395de 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -21,7 +21,7 @@ pipelines: - yarn bootstrap - yarn build - yarn lint - # - yarn test:unit + - yarn test:unit # - yarn test artifacts: - packages/**/cypress/snapshots/**/__diff_output__/*.diff.png diff --git a/packages/editor/src/components/action-widget/pane/icon-picker/image-icon-tab/iconGroups.json b/packages/editor/src/components/action-widget/pane/icon-picker/image-icon-tab/iconGroups.json index a40d00e6..6806960c 100644 --- a/packages/editor/src/components/action-widget/pane/icon-picker/image-icon-tab/iconGroups.json +++ b/packages/editor/src/components/action-widget/pane/icon-picker/image-icon-tab/iconGroups.json @@ -2,18 +2,6 @@ { "id": "people", "icons": [ - "face_smile", - "face_plain", - "face_sad", - "face_crying", - "face_surprise", - "face_wink", - "funy_angel", - "funy_devilish", - "funy_glasses", - "funy_grin", - "funy_kiss", - "funy_monkey", "people_group", "people_male1", "people_male2", @@ -24,21 +12,11 @@ { "id": "things", "icons": [ - "sport_basketball", - "sport_football", - "sport_golf", - "sport_raquet", - "sport_shuttlecock", - "sport_soccer", - "sport_tennis", - "bulb_light_on", - "bulb_light_off", "hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", - "hard_keyboard", "hard_mouse", "hard_printer", "hard_webcam", @@ -48,21 +26,15 @@ "things_pin", "things_window-layout", "things_bubbles", - "object_bell", "object_clanbomber", "object_key", "object_pencil", - "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", - "object_wizard", "object_house", - "object_cake", - "object_camera", - "object_palette", - "object_rainbow" + "object_camera" ] }, { @@ -78,7 +50,6 @@ "tick_tick", "tick_cross", "onoff_clock", - "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", @@ -86,22 +57,11 @@ "money_money", "money_dollar", "money_euro", - "money_pound", - "money_yen", "money_coins", "money_ruby", "time_calendar", "time_clock", "time_hourglass", - "number_1", - "number_2", - "number_3", - "number_4", - "number_5", - "number_6", - "number_7", - "number_8", - "number_9", "sign_warning", "sign_info", "sign_stop", @@ -153,16 +113,6 @@ "tag_red", "tag_pink", "tag_yellow", - "weather_clear-night", - "weather_clear", - "weather_few-clouds-night", - "weather_few-clouds", - "weather_overcast", - "weather_severe-alert", - "weather_showers-scattered", - "weather_showers", - "weather_snow", - "weather_storm", "task_0", "task_25", "task_50", diff --git a/packages/mindplot/assets/icons/bulb_light_off.svg b/packages/mindplot/assets/icons/bulb_light_off.svg deleted file mode 100644 index 1cc7f75a..00000000 --- a/packages/mindplot/assets/icons/bulb_light_off.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/bulb_light_on.svg b/packages/mindplot/assets/icons/bulb_light_on.svg deleted file mode 100644 index b4c6ea29..00000000 --- a/packages/mindplot/assets/icons/bulb_light_on.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/bullet_blue.png b/packages/mindplot/assets/icons/bullet_blue.png deleted file mode 100644 index a7651ec8a0f395be021bac262783ec604abf8c47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=8_H=O!u{izqk}bDmq0G^bpRL|W zr%VbmS`g2vdN_5Xhn$gw?joL;=H(n;{ewDX@>Vt8IAj)#jg!+?Z23wnf7d! zNAH#A4i6V)y_WtvZQ1hT)TAWgjoY{t%BOsI;8VOzQvNniDZk5xCy$)UQWb1PRjRoz l1#moJy|?3|{zvx%+ef43{&%10 z`rmr0`TyJtv;LcOX%laN^>UMjsi!CYUwmcZ|JfI2{-1ED=f8fLD)C;hoM$LyFlFzu{izqk|8%^q0F(5@h6w@ zuSbE=i9QOwKvPc#-iPCap~BwXFHIr_gU^WCH%x0(Cm8h3e{9o}5`YUO%{ zPiLR-*D%CfK42<(c~V-?1q(}8{p2N#A`c~!wa4X-$LfsZ0%WH-1^Zy?%r3<3e~Rbycg=S_Egdz d?>~Yc*m~Z+JF!m3&mHJ+22WQ%mvv4FO#s^$Z2kZM diff --git a/packages/mindplot/assets/icons/bullet_pink.png b/packages/mindplot/assets/icons/bullet_pink.png deleted file mode 100644 index 0c9f73e3f58fec93410ca240016ef0522241aebe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=8@N{tuu{izqk~P;M2a(o?Ym~XI z^0KETC^sqCab0$O!=k-0z-7w?M;1Xr?oLLkMCemR4UW__o=Snfs{&byph%e z=77^@l_n}qHB|c9pq{s5_I-v&H_y*pYjU~LY5(eqL#|WUf--*EUEAAGxHvbtb|TLazB;OXk;vd$@?2>?vIZ1eyC diff --git a/packages/mindplot/assets/icons/bullet_purple.png b/packages/mindplot/assets/icons/bullet_purple.png deleted file mode 100644 index 52ba5036b95383f6c14176ae33300b859e4d27d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>p@N{tuu{izq(ta+-M44kBpIe=q zx`X8@9}gS%(w5FYFVig+ojZ_cD5YzW==f41NB?BP0gvSsuL~|cX5(?+BsuSEuz#(i z(0!iz2et`~ZLD6*`-~P&eW1fC)8o%D^YrBE+t1g1f3V_>QFkv3+p8U`|6X{$=uzRE zYb8;$Jas}77I1~H-7TjsdDijKvCOxpB#s?yRPsxju2(W^mhtCPasN(mSRK@VvcWVc q!c)dr)HS~K;xqxD$MKK)8^oXLysE8u-|YeP1B0ilpUXO@geCyg%6BgS diff --git a/packages/mindplot/assets/icons/bullet_red.png b/packages/mindplot/assets/icons/bullet_red.png deleted file mode 100644 index 0cd803115831933aa171497cfe9c1af983035f86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=8^mK6yu{izqk}mh50EX6wkMFui zZg|fh<-*g%H9O|;u|DY#DW^u;K&o-|vHe`x?xbw1zYx$2><(A#;6QU!sSfhO( ioL~suuJh6Vfb_?jd)=>7iZy|bXYh3Ob6Mw<&;$Tq>~Ep~ diff --git a/packages/mindplot/assets/icons/face_crying.svg b/packages/mindplot/assets/icons/face_crying.svg deleted file mode 100644 index 033c7454..00000000 --- a/packages/mindplot/assets/icons/face_crying.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_plain.svg b/packages/mindplot/assets/icons/face_plain.svg deleted file mode 100644 index 7b9a2c2b..00000000 --- a/packages/mindplot/assets/icons/face_plain.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_sad.svg b/packages/mindplot/assets/icons/face_sad.svg deleted file mode 100644 index 86a9135b..00000000 --- a/packages/mindplot/assets/icons/face_sad.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_smile.svg b/packages/mindplot/assets/icons/face_smile.svg deleted file mode 100644 index aefe1515..00000000 --- a/packages/mindplot/assets/icons/face_smile.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_smile_big.svg b/packages/mindplot/assets/icons/face_smile_big.svg deleted file mode 100644 index 5d0accc7..00000000 --- a/packages/mindplot/assets/icons/face_smile_big.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_surprise.svg b/packages/mindplot/assets/icons/face_surprise.svg deleted file mode 100644 index 13ef180d..00000000 --- a/packages/mindplot/assets/icons/face_surprise.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/face_wink.svg b/packages/mindplot/assets/icons/face_wink.svg deleted file mode 100644 index 4e1b84dd..00000000 --- a/packages/mindplot/assets/icons/face_wink.svg +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/funy_devilish.svg b/packages/mindplot/assets/icons/funy_devilish.svg deleted file mode 100644 index 40884744..00000000 --- a/packages/mindplot/assets/icons/funy_devilish.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/funy_glasses.svg b/packages/mindplot/assets/icons/funy_glasses.svg deleted file mode 100644 index 989345b7..00000000 --- a/packages/mindplot/assets/icons/funy_glasses.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/funy_grin.svg b/packages/mindplot/assets/icons/funy_grin.svg deleted file mode 100644 index 2603a1a3..00000000 --- a/packages/mindplot/assets/icons/funy_grin.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/funy_kiss.svg b/packages/mindplot/assets/icons/funy_kiss.svg deleted file mode 100644 index 17edca55..00000000 --- a/packages/mindplot/assets/icons/funy_kiss.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/funy_monkey.svg b/packages/mindplot/assets/icons/funy_monkey.svg deleted file mode 100644 index 415184dd..00000000 --- a/packages/mindplot/assets/icons/funy_monkey.svg +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/hard_keyboard.svg b/packages/mindplot/assets/icons/hard_keyboard.svg deleted file mode 100644 index b6e5f788..00000000 --- a/packages/mindplot/assets/icons/hard_keyboard.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/money_pound.svg b/packages/mindplot/assets/icons/money_pound.svg deleted file mode 100644 index e189eb3c..00000000 --- a/packages/mindplot/assets/icons/money_pound.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/money_yen.svg b/packages/mindplot/assets/icons/money_yen.svg deleted file mode 100644 index 8adf4383..00000000 --- a/packages/mindplot/assets/icons/money_yen.svg +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/number_1.svg b/packages/mindplot/assets/icons/number_1.svg deleted file mode 100644 index b630131c..00000000 --- a/packages/mindplot/assets/icons/number_1.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_2.svg b/packages/mindplot/assets/icons/number_2.svg deleted file mode 100644 index ff994066..00000000 --- a/packages/mindplot/assets/icons/number_2.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_3.svg b/packages/mindplot/assets/icons/number_3.svg deleted file mode 100644 index d57b1319..00000000 --- a/packages/mindplot/assets/icons/number_3.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_4.svg b/packages/mindplot/assets/icons/number_4.svg deleted file mode 100644 index eed193fb..00000000 --- a/packages/mindplot/assets/icons/number_4.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_5.svg b/packages/mindplot/assets/icons/number_5.svg deleted file mode 100644 index 2a434295..00000000 --- a/packages/mindplot/assets/icons/number_5.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_6.svg b/packages/mindplot/assets/icons/number_6.svg deleted file mode 100644 index a1371fe4..00000000 --- a/packages/mindplot/assets/icons/number_6.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - diff --git a/packages/mindplot/assets/icons/number_7.svg b/packages/mindplot/assets/icons/number_7.svg deleted file mode 100644 index 83b1eadd..00000000 --- a/packages/mindplot/assets/icons/number_7.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/number_8.svg b/packages/mindplot/assets/icons/number_8.svg deleted file mode 100644 index 8c8d9ea0..00000000 --- a/packages/mindplot/assets/icons/number_8.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - diff --git a/packages/mindplot/assets/icons/number_9.svg b/packages/mindplot/assets/icons/number_9.svg deleted file mode 100644 index c092616e..00000000 --- a/packages/mindplot/assets/icons/number_9.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_bell.svg b/packages/mindplot/assets/icons/object_bell.svg deleted file mode 100644 index c34cf6ab..00000000 --- a/packages/mindplot/assets/icons/object_bell.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_cake.svg b/packages/mindplot/assets/icons/object_cake.svg deleted file mode 100644 index 13eba1c7..00000000 --- a/packages/mindplot/assets/icons/object_cake.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_palette.svg b/packages/mindplot/assets/icons/object_palette.svg deleted file mode 100644 index 04ae5105..00000000 --- a/packages/mindplot/assets/icons/object_palette.svg +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_phone.svg b/packages/mindplot/assets/icons/object_phone.svg deleted file mode 100644 index a7affbd0..00000000 --- a/packages/mindplot/assets/icons/object_phone.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/packages/mindplot/assets/icons/object_rainbow.svg b/packages/mindplot/assets/icons/object_rainbow.svg deleted file mode 100644 index b7f0cca7..00000000 --- a/packages/mindplot/assets/icons/object_rainbow.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_wizard.svg b/packages/mindplot/assets/icons/object_wizard.svg deleted file mode 100644 index c054e1df..00000000 --- a/packages/mindplot/assets/icons/object_wizard.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/onoff_clock_red.svg b/packages/mindplot/assets/icons/onoff_clock_red.svg deleted file mode 100644 index 00076adc..00000000 --- a/packages/mindplot/assets/icons/onoff_clock_red.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_basketball.svg b/packages/mindplot/assets/icons/sport_basketball.svg deleted file mode 100644 index 7bbe066b..00000000 --- a/packages/mindplot/assets/icons/sport_basketball.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_football.svg b/packages/mindplot/assets/icons/sport_football.svg deleted file mode 100644 index a5616304..00000000 --- a/packages/mindplot/assets/icons/sport_football.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_golf.svg b/packages/mindplot/assets/icons/sport_golf.svg deleted file mode 100644 index 19455358..00000000 --- a/packages/mindplot/assets/icons/sport_golf.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_raquet.svg b/packages/mindplot/assets/icons/sport_raquet.svg deleted file mode 100644 index 424482be..00000000 --- a/packages/mindplot/assets/icons/sport_raquet.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_shuttlecock.svg b/packages/mindplot/assets/icons/sport_shuttlecock.svg deleted file mode 100644 index 75585487..00000000 --- a/packages/mindplot/assets/icons/sport_shuttlecock.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_soccer.svg b/packages/mindplot/assets/icons/sport_soccer.svg deleted file mode 100644 index 71b71e7d..00000000 --- a/packages/mindplot/assets/icons/sport_soccer.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/sport_tennis.svg b/packages/mindplot/assets/icons/sport_tennis.svg deleted file mode 100644 index 841fc1ca..00000000 --- a/packages/mindplot/assets/icons/sport_tennis.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/task_0.svg b/packages/mindplot/assets/icons/task_0.svg deleted file mode 100644 index d8356fe4..00000000 --- a/packages/mindplot/assets/icons/task_0.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - Layer 1 - - - - \ No newline at end of file diff --git a/packages/mindplot/assets/icons/task_100.svg b/packages/mindplot/assets/icons/task_100.svg deleted file mode 100644 index 129f0af8..00000000 --- a/packages/mindplot/assets/icons/task_100.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/mindplot/assets/icons/task_25.svg b/packages/mindplot/assets/icons/task_25.svg deleted file mode 100644 index 13dabee9..00000000 --- a/packages/mindplot/assets/icons/task_25.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/mindplot/assets/icons/task_50.svg b/packages/mindplot/assets/icons/task_50.svg deleted file mode 100644 index a18ceb04..00000000 --- a/packages/mindplot/assets/icons/task_50.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/mindplot/assets/icons/task_75.svg b/packages/mindplot/assets/icons/task_75.svg deleted file mode 100644 index a279e956..00000000 --- a/packages/mindplot/assets/icons/task_75.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/mindplot/assets/icons/weather_clear-night.svg b/packages/mindplot/assets/icons/weather_clear-night.svg deleted file mode 100644 index 8ea01c2f..00000000 --- a/packages/mindplot/assets/icons/weather_clear-night.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_clear.svg b/packages/mindplot/assets/icons/weather_clear.svg deleted file mode 100644 index a1c028a7..00000000 --- a/packages/mindplot/assets/icons/weather_clear.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_few-clouds-night.svg b/packages/mindplot/assets/icons/weather_few-clouds-night.svg deleted file mode 100644 index 6a74e519..00000000 --- a/packages/mindplot/assets/icons/weather_few-clouds-night.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_few-clouds.svg b/packages/mindplot/assets/icons/weather_few-clouds.svg deleted file mode 100644 index 7f8dab1d..00000000 --- a/packages/mindplot/assets/icons/weather_few-clouds.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_overcast.svg b/packages/mindplot/assets/icons/weather_overcast.svg deleted file mode 100644 index a7f6383d..00000000 --- a/packages/mindplot/assets/icons/weather_overcast.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_severe-alert.svg b/packages/mindplot/assets/icons/weather_severe-alert.svg deleted file mode 100644 index 359ddb88..00000000 --- a/packages/mindplot/assets/icons/weather_severe-alert.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_showers-scattered.svg b/packages/mindplot/assets/icons/weather_showers-scattered.svg deleted file mode 100644 index 97d2727a..00000000 --- a/packages/mindplot/assets/icons/weather_showers-scattered.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_showers.svg b/packages/mindplot/assets/icons/weather_showers.svg deleted file mode 100644 index 1118a6e3..00000000 --- a/packages/mindplot/assets/icons/weather_showers.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_snow.svg b/packages/mindplot/assets/icons/weather_snow.svg deleted file mode 100644 index 3a50096b..00000000 --- a/packages/mindplot/assets/icons/weather_snow.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/weather_storm.svg b/packages/mindplot/assets/icons/weather_storm.svg deleted file mode 100644 index 97d2727a..00000000 --- a/packages/mindplot/assets/icons/weather_storm.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/package.json b/packages/mindplot/package.json index 9775bec4..5119f2e1 100644 --- a/packages/mindplot/package.json +++ b/packages/mindplot/package.json @@ -47,6 +47,7 @@ "@babel/preset-typescript": "^7.16.5", "@babel/register": "^7.16.0", "@types/jest": "^27.0.3", + "@types/node": "^18.11.9", "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "babel-loader": "^8.2.2", diff --git a/packages/mindplot/src/components/model/SvgIconFamily.json b/packages/mindplot/src/components/model/SvgIconFamily.json index efa3ee33..0f1a89d7 100644 --- a/packages/mindplot/src/components/model/SvgIconFamily.json +++ b/packages/mindplot/src/components/model/SvgIconFamily.json @@ -1,45 +1,4 @@ [ - { - "id": "face", - "icons": [ - "face_plain", - "face_sad", - "face_crying", - "face_smile", - "face_surprise", - "face_wink" - ] - }, - { - "id": "funy", - "icons": [ - "funy_angel", - "funy_devilish", - "funy_glasses", - "funy_grin", - "funy_kiss", - "funy_monkey" - ] - }, - { - "id": "sport", - "icons": [ - "sport_basketball", - "sport_football", - "sport_golf", - "sport_raquet", - "sport_shuttlecock", - "sport_soccer", - "sport_tennis" - ] - }, - { - "id": "bulb", - "icons": [ - "", - "" - ] - }, { "id": "thumb", "icons": [ @@ -58,7 +17,6 @@ "id": "onoff", "icons": [ "onoff_clock", - "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", @@ -70,9 +28,6 @@ "icons": [ "money_money", "money_dollar", - "money_euro", - "money_pound", - "money_yen", "money_coins", "money_ruby" ] @@ -85,20 +40,6 @@ "time_hourglass" ] }, - { - "id": "number", - "icons": [ - "number_1", - "number_2", - "number_3", - "number_4", - "number_5", - "number_6", - "number_7", - "number_8", - "number_9" - ] - }, { "id": "chart", "icons": [ @@ -127,7 +68,6 @@ "hard_controller", "hard_driver_disk", "hard_ipod", - "hard_keyboard", "hard_mouse", "hard_printer", "hard_webcam", @@ -248,36 +188,15 @@ { "id": "object", "icons": [ - "object_bell", "object_clanbomber", "object_key", "object_pencil", - "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", - "object_wizard", "object_house", - "object_cake", - "object_camera", - "object_palette", - "object_rainbow" - ] - }, - { - "id": "weather", - "icons": [ - "weather_clear-night", - "weather_clear", - "weather_few-clouds-night", - "weather_few-clouds", - "weather_overcast", - "weather_severe-alert", - "weather_showers-scattered", - "weather_showers", - "weather_snow", - "weather_storm" + "object_camera" ] }, { diff --git a/packages/mindplot/src/components/persistence/XMLSerializerTango.ts b/packages/mindplot/src/components/persistence/XMLSerializerTango.ts index 7813a977..138d33b2 100644 --- a/packages/mindplot/src/components/persistence/XMLSerializerTango.ts +++ b/packages/mindplot/src/components/persistence/XMLSerializerTango.ts @@ -25,6 +25,7 @@ import NodeModel from '../model/NodeModel'; import RelationshipModel from '../model/RelationshipModel'; import XMLMindmapSerializer from './XMLMindmapSerializer'; import FeatureType from '../model/FeatureType'; +import emojiToIconMap from './iconToEmoji.json'; class XMLSerializerTango implements XMLMindmapSerializer { private static MAP_ROOT_NODE = 'map'; @@ -397,7 +398,18 @@ class XMLSerializerTango implements XMLMindmapSerializer { // Create a new element .... const featureType = elem.tagName as FeatureType; - const feature = FeatureModelFactory.createModel(featureType, attributes); + let feature = FeatureModelFactory.createModel(featureType, attributes); + + // Migrate icons to emoji ... + if (featureType === 'icon') { + const svgIcon: string = attributes.id; + const emoji = XMLSerializerTango.emojiEquivalent(svgIcon); + if (emoji) { + attributes.id = emoji; + feature = FeatureModelFactory.createModel('eicon' as FeatureType, attributes); + } + } + topic.addFeature(feature); } else if (elem.tagName === 'text') { const nodeText = XMLSerializerTango._deserializeNodeText(child); @@ -444,7 +456,11 @@ class XMLSerializerTango implements XMLMindmapSerializer { return value; } - static _deserializeNodeText(domElem: ChildNode) { + private static emojiEquivalent(icon: string): string | undefined { + return emojiToIconMap[icon]; + } + + private static _deserializeNodeText(domElem: ChildNode) { const children = domElem.childNodes; let value = null; for (let i = 0; i < children.length; i++) { diff --git a/packages/mindplot/src/components/persistence/iconToEmoji.json b/packages/mindplot/src/components/persistence/iconToEmoji.json new file mode 100644 index 00000000..3f8babc6 --- /dev/null +++ b/packages/mindplot/src/components/persistence/iconToEmoji.json @@ -0,0 +1,52 @@ +{ + "face_plain": "😐", + "face_crying": "😢", + "face_smile": "😃", + "face_surprise": "😮", + "face_wink": "👼", + "funy_angel": "👼", + "funy_devilish": "👹", + "funy_glasses": "😎", + "funy_grin": "😛", + "funy_kiss": "😘", + "funy_monkey": "🐵", + "sport_basketball": "🏀", + "sport_football": "🏈", + "sport_golf": "🏌️", + "sport_raquet": "🏸", + "sport_shuttlecock": "🏸", + "sport_soccer": "⚽", + "sport_tennis": "🎾", + "bulb_light_off": "💡", + "bulb_light_on": "💡", + "number_1": "1️⃣", + "number_2": "2️⃣", + "number_3": "3️⃣", + "number_4": "4️⃣", + "number_5": "5️⃣", + "number_6": "6️⃣", + "number_7": "7️⃣", + "number_8": "8️⃣", + "number_9": "9️⃣", + "money_pound": "💷", + "money_yen": "💴", + "hard_keyboard": "⌨️", + "weather_snow": "🌨️", + "weather_storm": "🌩️", + "onoff_clock_red": "⏰", + "weather_clear-night": "🌙", + "weather_clear": "🌞", + "weather_few-clouds-night": "🌝", + "weather_few-clouds": "🌤️", + "weather_overcast": "🌧️", + "weather_severe-alert": "⚡", + "weather_showers-scattered": "🌦️", + "weather_showers": "⛈️", + "object_rainbow": "🌈", + "object_palette": "🎨", + "object_phone": "☎️", + "object_cake": "🎂", + "object_wizard": "🪄", + "object_bell": "🔔" + +} \ No newline at end of file diff --git a/packages/mindplot/test/unit/export/expected/complex.wxml b/packages/mindplot/test/unit/export/expected/complex.wxml index bd33c618..5e5e9fcc 100644 --- a/packages/mindplot/test/unit/export/expected/complex.wxml +++ b/packages/mindplot/test/unit/export/expected/complex.wxml @@ -1,5 +1,5 @@ \ No newline at end of file + Again, decrease the learning curve.]]> \ No newline at end of file diff --git a/packages/mindplot/test/unit/export/expected/npe.wxml b/packages/mindplot/test/unit/export/expected/npe.wxml index 6d9c6bf4..26122ab6 100644 --- a/packages/mindplot/test/unit/export/expected/npe.wxml +++ b/packages/mindplot/test/unit/export/expected/npe.wxml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/mindplot/test/unit/export/expected/welcome.mm b/packages/mindplot/test/unit/export/expected/welcome.mm index e9c6cde4..474a0d96 100644 --- a/packages/mindplot/test/unit/export/expected/welcome.mm +++ b/packages/mindplot/test/unit/export/expected/welcome.mm @@ -15,7 +15,6 @@ - @@ -40,9 +39,7 @@ - - - + @@ -56,9 +53,7 @@ - - - + diff --git a/packages/mindplot/test/unit/export/expected/welcome.wxml b/packages/mindplot/test/unit/export/expected/welcome.wxml index 7808c874..0af43148 100644 --- a/packages/mindplot/test/unit/export/expected/welcome.wxml +++ b/packages/mindplot/test/unit/export/expected/welcome.wxml @@ -1,3 +1,3 @@ \ No newline at end of file +Follow the link !]]> \ No newline at end of file diff --git a/packages/mindplot/tsconfig.json b/packages/mindplot/tsconfig.json index 00457338..a4fc50d2 100644 --- a/packages/mindplot/tsconfig.json +++ b/packages/mindplot/tsconfig.json @@ -8,6 +8,7 @@ "target": "ES2020", "allowJs": true, "esModuleInterop": true, + "resolveJsonModule": true, "declaration": true, "rootDirs": [ "src", diff --git a/packages/webapp/public/index.html b/packages/webapp/public/index.html index 04de2dda..901dbd8c 100644 --- a/packages/webapp/public/index.html +++ b/packages/webapp/public/index.html @@ -24,7 +24,6 @@ - diff --git a/yarn.lock b/yarn.lock index 6312a9b7..6d726ea7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3211,6 +3211,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.31.tgz#4b873dea3122e71af4f77e65ec5841397ff254d3" integrity sha512-vQAnaReSQkEDa8uwAyQby8bYGKu84R/deEc6mg5T8fX6gzCn8QW6rziSgsti1fNvsrswKUKPnVTi7uoB+u62Mw== +"@types/node@^18.11.9": + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"