From bf04a9d2b8e64d6cddc39e7b3690a37fd5fac02c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 19 Nov 2022 13:09:29 -0800 Subject: [PATCH] Remove icons. --- .../image-icon-tab/iconGroups.json | 8 +-- packages/editor/src/components/index.tsx | 14 +++- packages/editor/src/index.tsx | 3 + packages/mindplot/assets/icons/money_euro.svg | 50 --------------- .../mindplot/assets/icons/object_clip.svg | 6 -- .../mindplot/assets/icons/object_house.svg | 17 ----- packages/mindplot/assets/icons/object_key.svg | 15 ----- .../assets/icons/object_magnifier.svg | 9 --- .../mindplot/assets/icons/time_hourglass.svg | 64 ------------------- .../src/components/model/SvgIconFamily.json | 8 +-- .../components/persistence/iconToEmoji.json | 8 ++- .../test/unit/export/expected/complex.wxml | 2 +- .../test/unit/export/expected/npe.wxml | 2 +- 13 files changed, 26 insertions(+), 180 deletions(-) delete mode 100644 packages/mindplot/assets/icons/money_euro.svg delete mode 100644 packages/mindplot/assets/icons/object_clip.svg delete mode 100644 packages/mindplot/assets/icons/object_house.svg delete mode 100644 packages/mindplot/assets/icons/object_key.svg delete mode 100644 packages/mindplot/assets/icons/object_magnifier.svg delete mode 100644 packages/mindplot/assets/icons/time_hourglass.svg 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 071f7330..39d69cde 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 @@ -27,13 +27,9 @@ "things_pin", "things_window-layout", "things_bubbles", - "object_key", "object_pencil", - "object_magnifier", - "object_clip", "object_music", - "object_star", - "object_house" + "object_star" ] }, { @@ -48,12 +44,10 @@ "onoff_status_offline", "onoff_status_online", "money_dollar", - "money_euro", "money_coins", "money_ruby", "time_calendar", "time_clock", - "time_hourglass", "sign_warning", "sign_info", "sign_help", diff --git a/packages/editor/src/components/index.tsx b/packages/editor/src/components/index.tsx index 8dadf9ac..f4463209 100644 --- a/packages/editor/src/components/index.tsx +++ b/packages/editor/src/components/index.tsx @@ -82,9 +82,17 @@ const Editor = ({ const model = new Model(component); // Force refresh after map load ... - model.loadMindmap(mapInfo.getId(), persistenceManager, widgetManager).then(() => { - setCanvasUpdate(Date.now()); - }); + model + .loadMindmap(mapInfo.getId(), persistenceManager, widgetManager) + .then(() => { + setCanvasUpdate(Date.now()); + }) + .catch((e) => { + console.error(e); + window.newrelic?.noticeError( + new Error(`Unexpected error loading map ${mapInfo.getId()} = ${JSON.stringify(e)}`), + ); + }); setModel(model); }, []); diff --git a/packages/editor/src/index.tsx b/packages/editor/src/index.tsx index e363d33b..84b21c2c 100644 --- a/packages/editor/src/index.tsx +++ b/packages/editor/src/index.tsx @@ -53,6 +53,9 @@ declare global { ['mindplot-component']: MindplotWebComponentInterface; } } + interface Window { + newrelic: { noticeError: (Error) => void }; + } } export { diff --git a/packages/mindplot/assets/icons/money_euro.svg b/packages/mindplot/assets/icons/money_euro.svg deleted file mode 100644 index 072135f1..00000000 --- a/packages/mindplot/assets/icons/money_euro.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_clip.svg b/packages/mindplot/assets/icons/object_clip.svg deleted file mode 100644 index 23b6bcae..00000000 --- a/packages/mindplot/assets/icons/object_clip.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/packages/mindplot/assets/icons/object_house.svg b/packages/mindplot/assets/icons/object_house.svg deleted file mode 100644 index a60fa332..00000000 --- a/packages/mindplot/assets/icons/object_house.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_key.svg b/packages/mindplot/assets/icons/object_key.svg deleted file mode 100644 index d9f49926..00000000 --- a/packages/mindplot/assets/icons/object_key.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/packages/mindplot/assets/icons/object_magnifier.svg b/packages/mindplot/assets/icons/object_magnifier.svg deleted file mode 100644 index 47ed17a6..00000000 --- a/packages/mindplot/assets/icons/object_magnifier.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/packages/mindplot/assets/icons/time_hourglass.svg b/packages/mindplot/assets/icons/time_hourglass.svg deleted file mode 100644 index 4c263156..00000000 --- a/packages/mindplot/assets/icons/time_hourglass.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mindplot/src/components/model/SvgIconFamily.json b/packages/mindplot/src/components/model/SvgIconFamily.json index e0963cb8..4b8eb257 100644 --- a/packages/mindplot/src/components/model/SvgIconFamily.json +++ b/packages/mindplot/src/components/model/SvgIconFamily.json @@ -20,8 +20,7 @@ "id": "time", "icons": [ "time_calendar", - "time_clock", - "time_hourglass" + "time_clock" ] }, { @@ -124,13 +123,10 @@ { "id": "object", "icons": [ - "object_key", "object_pencil", - "object_magnifier", "object_clip", "object_music", - "object_star", - "object_house" + "object_star" ] }, { diff --git a/packages/mindplot/src/components/persistence/iconToEmoji.json b/packages/mindplot/src/components/persistence/iconToEmoji.json index faa6ee2b..70167ceb 100644 --- a/packages/mindplot/src/components/persistence/iconToEmoji.json +++ b/packages/mindplot/src/components/persistence/iconToEmoji.json @@ -84,5 +84,11 @@ "hard_driver_disk": "💾", "hard_printer": "🖨️", "hard_webcam": "📷", - "hard_microphone": "🎤" + "hard_microphone": "🎤", + "object_house": "🏠", + "object_magnifier": "🔍", + "object_key": "🔑", + "time_hourglass": "⌛", + "object_clip": "📎", + "money_euro": "💶" } \ 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 1ca9f5bc..722b017d 100644 --- a/packages/mindplot/test/unit/export/expected/complex.wxml +++ b/packages/mindplot/test/unit/export/expected/complex.wxml @@ -42,7 +42,7 @@ Attached below a sample of such screening questions]]> \ No newline at end of file + \ No newline at end of file