@riil-frontend/component-topology 11.0.33 → 11.0.35

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.
Files changed (217) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +4 -2
  4. package/build/index.js +52 -45
  5. package/es/components/MultiResourceDrawer/index.js +22 -26
  6. package/es/components/ResourceList/ResourceSelect.js +55 -58
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  11. package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
  12. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
  13. package/es/core/editor/components/BackgroundView/index.js +149 -178
  14. package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
  15. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
  16. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
  17. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
  18. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
  19. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  20. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  21. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  22. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
  23. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
  24. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  25. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
  26. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
  27. package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
  28. package/es/core/editor/hooks/useNewElementTheme.js +2 -2
  29. package/es/core/editor/store/background.js +8 -10
  30. package/es/core/editor/store/topoEdit.js +4 -6
  31. package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  32. package/es/core/hooks/usePolling.js +130 -142
  33. package/es/core/hooks/useResourceConfig.js +76 -100
  34. package/es/core/hooks/useTopoEdit.js +525 -623
  35. package/es/core/models/Alarm.js +319 -402
  36. package/es/core/models/AttributeMetricDisplay.js +115 -143
  37. package/es/core/models/PluginManager.js +4 -3
  38. package/es/core/models/SelectionModel.js +4 -5
  39. package/es/core/models/TopoApp.js +279 -436
  40. package/es/core/models/TopoGraphView.js +28 -41
  41. package/es/core/models/cache/CiCache.js +34 -39
  42. package/es/core/models/cache/CiTypeCache.js +47 -61
  43. package/es/core/models/cache/DictCache.js +36 -42
  44. package/es/core/models/graph/Background.js +21 -26
  45. package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
  46. package/es/core/models/tagstips/ElementTagTipConfig.js +44 -58
  47. package/es/core/models/topoData.js +73 -77
  48. package/es/core/models/utils/linkUtils.js +46 -51
  49. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  50. package/es/core/services/alarm.js +14 -16
  51. package/es/core/services/background.js +59 -67
  52. package/es/core/services/cmdb/metric.js +14 -18
  53. package/es/core/services/cmdb.js +23 -27
  54. package/es/core/services/index.js +48 -68
  55. package/es/core/services/overview.js +131 -151
  56. package/es/core/services/topo/basic.js +37 -41
  57. package/es/core/services/topo/tagtip.js +15 -19
  58. package/es/core/store/models/ciModel.js +58 -62
  59. package/es/core/store/models/customIcon.js +126 -145
  60. package/es/core/store/models/displayConfig.js +15 -19
  61. package/es/core/store/models/selection.js +4 -6
  62. package/es/core/store/models/topoAlarm.js +162 -145
  63. package/es/core/store/models/topoBaseInfoOverview.js +4 -6
  64. package/es/core/store/models/topoBizMod.js +9 -11
  65. package/es/core/store/models/topoConfig.js +215 -231
  66. package/es/core/store/models/topoGraphView.js +4 -6
  67. package/es/core/store/models/topoMod.js +373 -395
  68. package/es/core/utils/imageUtil.js +23 -27
  69. package/es/core/utils/saveSerialize.js +14 -18
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  78. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
  79. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
  80. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  81. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
  82. package/es/networkTopo/components/Link/hook.js +85 -96
  83. package/es/networkTopo/components/Link/index.js +104 -126
  84. package/es/networkTopo/components/Link/setting.js +48 -52
  85. package/es/networkTopo/getTopoData.js +73 -92
  86. package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
  87. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  88. package/es/networkTopo/models/TopoCenter.js +28 -46
  89. package/es/networkTopo/services/alert.js +18 -22
  90. package/es/networkTopo/services/authorization.js +45 -55
  91. package/es/networkTopo/services/cmdb.js +548 -696
  92. package/es/networkTopo/services/funcAuth.js +22 -24
  93. package/es/networkTopo/services/link.js +107 -117
  94. package/es/networkTopo/services/mdc.js +33 -48
  95. package/es/networkTopo/services/metric.js +38 -47
  96. package/es/networkTopo/services/model.js +616 -809
  97. package/es/networkTopo/services/risk.js +9 -11
  98. package/es/networkTopo/services/topo/auth.js +27 -33
  99. package/es/networkTopo/services/topo/basic.js +251 -289
  100. package/es/networkTopo/services/topo/blacklist.js +20 -24
  101. package/es/networkTopo/services/topo/ciInfo.js +27 -31
  102. package/es/networkTopo/services/topo/icon.js +49 -59
  103. package/es/networkTopo/services/topo/networkLink.js +32 -36
  104. package/es/networkTopo/services/topo/relation.js +9 -11
  105. package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
  106. package/es/networkTopo/store/functionAuth.js +31 -37
  107. package/es/networkTopo/store/topoCenter.js +142 -152
  108. package/es/networkTopo/store/topoLinkMod.js +4 -6
  109. package/es/networkTopo/store/topoTreeMod.js +170 -182
  110. package/es/networkTopo/utils/exportData.js +57 -61
  111. package/lib/components/MultiResourceDrawer/index.js +22 -26
  112. package/lib/components/ResourceList/ResourceSelect.js +54 -58
  113. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
  114. package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  115. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
  116. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  117. package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
  118. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
  119. package/lib/core/editor/components/BackgroundView/index.js +148 -177
  120. package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
  121. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
  122. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
  123. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
  124. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
  125. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  126. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  127. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  128. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
  129. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
  130. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  131. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
  132. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
  133. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
  134. package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
  135. package/lib/core/editor/store/background.js +8 -10
  136. package/lib/core/editor/store/topoEdit.js +4 -6
  137. package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  138. package/lib/core/hooks/usePolling.js +129 -141
  139. package/lib/core/hooks/useResourceConfig.js +76 -100
  140. package/lib/core/hooks/useTopoEdit.js +517 -615
  141. package/lib/core/models/Alarm.js +313 -396
  142. package/lib/core/models/AttributeMetricDisplay.js +118 -146
  143. package/lib/core/models/PluginManager.js +4 -3
  144. package/lib/core/models/SelectionModel.js +4 -5
  145. package/lib/core/models/TopoApp.js +279 -436
  146. package/lib/core/models/TopoGraphView.js +28 -41
  147. package/lib/core/models/cache/CiCache.js +39 -44
  148. package/lib/core/models/cache/CiTypeCache.js +48 -62
  149. package/lib/core/models/cache/DictCache.js +39 -45
  150. package/lib/core/models/graph/Background.js +22 -27
  151. package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
  152. package/lib/core/models/tagstips/ElementTagTipConfig.js +44 -58
  153. package/lib/core/models/topoData.js +73 -78
  154. package/lib/core/models/utils/linkUtils.js +45 -51
  155. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  156. package/lib/core/services/alarm.js +18 -20
  157. package/lib/core/services/background.js +70 -78
  158. package/lib/core/services/cmdb/metric.js +14 -19
  159. package/lib/core/services/cmdb.js +24 -29
  160. package/lib/core/services/index.js +53 -72
  161. package/lib/core/services/overview.js +131 -151
  162. package/lib/core/services/topo/basic.js +37 -41
  163. package/lib/core/services/topo/tagtip.js +16 -21
  164. package/lib/core/store/models/ciModel.js +66 -70
  165. package/lib/core/store/models/customIcon.js +126 -145
  166. package/lib/core/store/models/displayConfig.js +15 -19
  167. package/lib/core/store/models/selection.js +4 -6
  168. package/lib/core/store/models/topoAlarm.js +163 -145
  169. package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
  170. package/lib/core/store/models/topoBizMod.js +9 -11
  171. package/lib/core/store/models/topoConfig.js +222 -238
  172. package/lib/core/store/models/topoGraphView.js +4 -6
  173. package/lib/core/store/models/topoMod.js +375 -397
  174. package/lib/core/utils/imageUtil.js +26 -31
  175. package/lib/core/utils/saveSerialize.js +13 -18
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  183. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  184. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
  185. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
  186. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  187. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
  188. package/lib/networkTopo/components/Link/hook.js +86 -98
  189. package/lib/networkTopo/components/Link/index.js +105 -127
  190. package/lib/networkTopo/components/Link/setting.js +48 -52
  191. package/lib/networkTopo/getTopoData.js +73 -92
  192. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
  193. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  194. package/lib/networkTopo/models/TopoCenter.js +28 -46
  195. package/lib/networkTopo/services/alert.js +18 -22
  196. package/lib/networkTopo/services/authorization.js +55 -65
  197. package/lib/networkTopo/services/cmdb.js +551 -700
  198. package/lib/networkTopo/services/funcAuth.js +24 -26
  199. package/lib/networkTopo/services/link.js +108 -118
  200. package/lib/networkTopo/services/mdc.js +35 -51
  201. package/lib/networkTopo/services/metric.js +37 -47
  202. package/lib/networkTopo/services/model.js +615 -809
  203. package/lib/networkTopo/services/risk.js +11 -13
  204. package/lib/networkTopo/services/topo/auth.js +27 -33
  205. package/lib/networkTopo/services/topo/basic.js +252 -290
  206. package/lib/networkTopo/services/topo/blacklist.js +20 -24
  207. package/lib/networkTopo/services/topo/ciInfo.js +34 -38
  208. package/lib/networkTopo/services/topo/icon.js +59 -69
  209. package/lib/networkTopo/services/topo/networkLink.js +32 -36
  210. package/lib/networkTopo/services/topo/relation.js +11 -13
  211. package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
  212. package/lib/networkTopo/store/functionAuth.js +31 -37
  213. package/lib/networkTopo/store/topoCenter.js +142 -152
  214. package/lib/networkTopo/store/topoLinkMod.js +4 -6
  215. package/lib/networkTopo/store/topoTreeMod.js +166 -178
  216. package/lib/networkTopo/utils/exportData.js +63 -68
  217. package/package.json +4 -3
@@ -56,19 +56,22 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
56
56
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
57
57
 
58
58
  // eslint-disable-next-line no-undef
59
- var version = typeof "11.0.33" === 'string' ? "11.0.33" : null;
59
+ var version = typeof "11.0.35" === 'string' ? "11.0.35" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
63
63
  */
64
64
 
65
65
  var Topo = /*#__PURE__*/function () {
66
- /**
67
- * @type TopoGraphView
68
- */
66
+ var _exit, _load, _clear, _updateElements, _addElements, _updateData, _open, _close, _refresh, _openViewMode, _onTopoDataLoaded, _enterEditMode, _exitEditMode, _triggerSaveEvent, _save, _exportImage, _switchToViewMode, _switchToEditMode;
67
+
69
68
  function Topo(options) {
70
69
  this.options = void 0;
71
70
  this.id = void 0;
71
+
72
+ /**
73
+ * @type TopoGraphView
74
+ */
72
75
  this.view = void 0;
73
76
  this.alarm = new _Alarm["default"]();
74
77
  this.store = void 0;
@@ -124,95 +127,69 @@ var Topo = /*#__PURE__*/function () {
124
127
  */
125
128
  ;
126
129
 
127
- _proto.exit =
128
- /*#__PURE__*/
129
- function () {
130
- var _exit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
130
+ _proto.exit = function exit() {
131
+ return (_exit = _exit || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
131
132
  var topoDispatchers;
132
133
  return _regenerator["default"].wrap(function _callee$(_context) {
133
- while (1) {
134
- switch (_context.prev = _context.next) {
135
- case 0:
136
- topoDispatchers = this.store.getModelDispatchers('topoMod');
137
- _context.next = 3;
138
- return topoDispatchers.exit();
139
-
140
- case 3:
141
- this.destroy();
142
-
143
- case 4:
144
- case "end":
145
- return _context.stop();
146
- }
134
+ while (1) switch (_context.prev = _context.next) {
135
+ case 0:
136
+ topoDispatchers = this.store.getModelDispatchers('topoMod');
137
+ _context.next = 3;
138
+ return topoDispatchers.exit();
139
+
140
+ case 3:
141
+ this.destroy();
142
+
143
+ case 4:
144
+ case "end":
145
+ return _context.stop();
147
146
  }
148
147
  }, _callee, this);
149
- }));
150
-
151
- function exit() {
152
- return _exit.apply(this, arguments);
153
- }
154
-
155
- return exit;
156
- }();
148
+ }))).apply(this, arguments);
149
+ };
157
150
 
158
- _proto.load = /*#__PURE__*/function () {
159
- var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data, options) {
151
+ _proto.load = function load(_x, _x2) {
152
+ return (_load = _load || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data, options) {
160
153
  var _data$groups, groups, _data$nodes, nodes, links, lines, topoDispatchers;
161
154
 
162
155
  return _regenerator["default"].wrap(function _callee2$(_context2) {
163
- while (1) {
164
- switch (_context2.prev = _context2.next) {
165
- case 0:
166
- if (options === void 0) {
167
- options = {};
168
- }
169
-
170
- _data$groups = data.groups, groups = _data$groups === void 0 ? [] : _data$groups, _data$nodes = data.nodes, nodes = _data$nodes === void 0 ? [] : _data$nodes, links = data.links, lines = data.lines;
171
- topoDispatchers = this.store.getModelDispatchers('topoMod');
172
- _context2.next = 5;
173
- return topoDispatchers.openTopoPage((0, _extends2["default"])({
174
- data: (0, _extends2["default"])({}, data, {
175
- groups: groups,
176
- nodes: nodes,
177
- links: links || lines || [],
178
- linkGroups: data.linkGroups || data.lineGroups || []
179
- })
180
- }, options));
181
-
182
- case 5:
183
- case "end":
184
- return _context2.stop();
185
- }
156
+ while (1) switch (_context2.prev = _context2.next) {
157
+ case 0:
158
+ if (options === void 0) {
159
+ options = {};
160
+ }
161
+
162
+ _data$groups = data.groups, groups = _data$groups === void 0 ? [] : _data$groups, _data$nodes = data.nodes, nodes = _data$nodes === void 0 ? [] : _data$nodes, links = data.links, lines = data.lines;
163
+ topoDispatchers = this.store.getModelDispatchers('topoMod');
164
+ _context2.next = 5;
165
+ return topoDispatchers.openTopoPage((0, _extends2["default"])({
166
+ data: (0, _extends2["default"])({}, data, {
167
+ groups: groups,
168
+ nodes: nodes,
169
+ links: links || lines || [],
170
+ linkGroups: data.linkGroups || data.lineGroups || []
171
+ })
172
+ }, options));
173
+
174
+ case 5:
175
+ case "end":
176
+ return _context2.stop();
186
177
  }
187
178
  }, _callee2, this);
188
- }));
189
-
190
- function load(_x, _x2) {
191
- return _load.apply(this, arguments);
192
- }
193
-
194
- return load;
195
- }();
179
+ }))).apply(this, arguments);
180
+ };
196
181
 
197
- _proto.clear = /*#__PURE__*/function () {
198
- var _clear = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
182
+ _proto.clear = function clear() {
183
+ return (_clear = _clear || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
199
184
  return _regenerator["default"].wrap(function _callee3$(_context3) {
200
- while (1) {
201
- switch (_context3.prev = _context3.next) {
202
- case 0:
203
- case "end":
204
- return _context3.stop();
205
- }
185
+ while (1) switch (_context3.prev = _context3.next) {
186
+ case 0:
187
+ case "end":
188
+ return _context3.stop();
206
189
  }
207
190
  }, _callee3);
208
- }));
209
-
210
- function clear() {
211
- return _clear.apply(this, arguments);
212
- }
213
-
214
- return clear;
215
- }();
191
+ }))).apply(this, arguments);
192
+ };
216
193
 
217
194
  _proto.getId = function getId() {
218
195
  return this.id;
@@ -264,47 +241,37 @@ var Topo = /*#__PURE__*/function () {
264
241
  */
265
242
  ;
266
243
 
267
- _proto.updateElements =
268
- /*#__PURE__*/
269
- function () {
270
- var _updateElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
244
+ _proto.updateElements = function updateElements(_x3) {
245
+ return (_updateElements = _updateElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
271
246
  var _data$groups2, groups, _data$nodes2, nodes, links, lines;
272
247
 
273
248
  return _regenerator["default"].wrap(function _callee4$(_context4) {
274
- while (1) {
275
- switch (_context4.prev = _context4.next) {
276
- case 0:
277
- _data$groups2 = data.groups, groups = _data$groups2 === void 0 ? [] : _data$groups2, _data$nodes2 = data.nodes, nodes = _data$nodes2 === void 0 ? [] : _data$nodes2, links = data.links, lines = data.lines;
278
- this.view.topoClient.updateElements((0, _lodash.cloneDeep)({
279
- groups: (0, _topoData.formatGroups)(groups),
280
- nodes: nodes.map(function (node) {
281
- return (0, _extends2["default"])({}, node, {
282
- type: 'node',
283
- dtype: 'device'
284
- });
285
- }),
286
- links: (links || lines || []).map(function (link) {
287
- return (0, _extends2["default"])({}, link, {
288
- type: 'link',
289
- dtype: 'link'
290
- });
291
- })
292
- })); // TODO 更新store,触发属性、指标模型加载,更新指标
293
-
294
- case 2:
295
- case "end":
296
- return _context4.stop();
297
- }
249
+ while (1) switch (_context4.prev = _context4.next) {
250
+ case 0:
251
+ _data$groups2 = data.groups, groups = _data$groups2 === void 0 ? [] : _data$groups2, _data$nodes2 = data.nodes, nodes = _data$nodes2 === void 0 ? [] : _data$nodes2, links = data.links, lines = data.lines;
252
+ this.view.topoClient.updateElements((0, _lodash.cloneDeep)({
253
+ groups: (0, _topoData.formatGroups)(groups),
254
+ nodes: nodes.map(function (node) {
255
+ return (0, _extends2["default"])({}, node, {
256
+ type: 'node',
257
+ dtype: 'device'
258
+ });
259
+ }),
260
+ links: (links || lines || []).map(function (link) {
261
+ return (0, _extends2["default"])({}, link, {
262
+ type: 'link',
263
+ dtype: 'link'
264
+ });
265
+ })
266
+ })); // TODO 更新store,触发属性、指标模型加载,更新指标
267
+
268
+ case 2:
269
+ case "end":
270
+ return _context4.stop();
298
271
  }
299
272
  }, _callee4, this);
300
- }));
301
-
302
- function updateElements(_x3) {
303
- return _updateElements.apply(this, arguments);
304
- }
305
-
306
- return updateElements;
307
- }()
273
+ }))).apply(this, arguments);
274
+ }
308
275
  /**
309
276
  * 追加元素
310
277
  *
@@ -312,36 +279,26 @@ var Topo = /*#__PURE__*/function () {
312
279
  */
313
280
  ;
314
281
 
315
- _proto.addElements =
316
- /*#__PURE__*/
317
- function () {
318
- var _addElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
282
+ _proto.addElements = function addElements(_x4) {
283
+ return (_addElements = _addElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
319
284
  var data;
320
285
  return _regenerator["default"].wrap(function _callee5$(_context5) {
321
- while (1) {
322
- switch (_context5.prev = _context5.next) {
323
- case 0:
324
- data = {
325
- groups: [].concat(this.getGroups(), elements.groups || []),
326
- nodes: [].concat(this.getNodes(), elements.nodes || []),
327
- lines: [].concat(this.getLines(), elements.lines || [])
328
- };
329
- this.updateElements(data); // TODO 更新store,触发属性、指标模型加载,更新指标
330
-
331
- case 2:
332
- case "end":
333
- return _context5.stop();
334
- }
286
+ while (1) switch (_context5.prev = _context5.next) {
287
+ case 0:
288
+ data = {
289
+ groups: [].concat(this.getGroups(), elements.groups || []),
290
+ nodes: [].concat(this.getNodes(), elements.nodes || []),
291
+ lines: [].concat(this.getLines(), elements.lines || [])
292
+ };
293
+ this.updateElements(data); // TODO 更新store,触发属性、指标模型加载,更新指标
294
+
295
+ case 2:
296
+ case "end":
297
+ return _context5.stop();
335
298
  }
336
299
  }, _callee5, this);
337
- }));
338
-
339
- function addElements(_x4) {
340
- return _addElements.apply(this, arguments);
341
- }
342
-
343
- return addElements;
344
- }()
300
+ }))).apply(this, arguments);
301
+ }
345
302
  /**
346
303
  * 全量更新数据
347
304
  *
@@ -349,30 +306,20 @@ var Topo = /*#__PURE__*/function () {
349
306
  */
350
307
  ;
351
308
 
352
- _proto.updateData =
353
- /*#__PURE__*/
354
- function () {
355
- var _updateData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
309
+ _proto.updateData = function updateData(_x5) {
310
+ return (_updateData = _updateData || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
356
311
  return _regenerator["default"].wrap(function _callee6$(_context6) {
357
- while (1) {
358
- switch (_context6.prev = _context6.next) {
359
- case 0:
360
- this.updateElements(data);
361
-
362
- case 1:
363
- case "end":
364
- return _context6.stop();
365
- }
312
+ while (1) switch (_context6.prev = _context6.next) {
313
+ case 0:
314
+ this.updateElements(data);
315
+
316
+ case 1:
317
+ case "end":
318
+ return _context6.stop();
366
319
  }
367
320
  }, _callee6, this);
368
- }));
369
-
370
- function updateData(_x5) {
371
- return _updateData.apply(this, arguments);
372
- }
373
-
374
- return updateData;
375
- }();
321
+ }))).apply(this, arguments);
322
+ };
376
323
 
377
324
  _proto.replaceNode = function replaceNode(id, newNode) {
378
325
  this.view.replaceNode(id, newNode); // TODO 更新store,触发属性、指标模型加载,更新指标
@@ -389,92 +336,68 @@ var Topo = /*#__PURE__*/function () {
389
336
  this.view.fitContent(anim, padding, notZoomIn);
390
337
  };
391
338
 
392
- _proto.open = /*#__PURE__*/function () {
393
- var _open = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(id, mode) {
339
+ _proto.open = function open(_x6, _x7) {
340
+ return (_open = _open || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(id, mode) {
394
341
  var lastId;
395
342
  return _regenerator["default"].wrap(function _callee7$(_context7) {
396
- while (1) {
397
- switch (_context7.prev = _context7.next) {
398
- case 0:
399
- _rlog["default"].info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
343
+ while (1) switch (_context7.prev = _context7.next) {
344
+ case 0:
345
+ _rlog["default"].info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
400
346
 
401
347
 
402
- lastId = this.id;
403
- this.id = id;
348
+ lastId = this.id;
349
+ this.id = id;
404
350
 
405
- if (lastId && id !== lastId) {
406
- this.alarm.close();
407
- } // 加载新拓扑图
351
+ if (lastId && id !== lastId) {
352
+ this.alarm.close();
353
+ } // 加载新拓扑图
408
354
 
409
355
 
410
- case 4:
411
- case "end":
412
- return _context7.stop();
413
- }
356
+ case 4:
357
+ case "end":
358
+ return _context7.stop();
414
359
  }
415
360
  }, _callee7, this);
416
- }));
417
-
418
- function open(_x6, _x7) {
419
- return _open.apply(this, arguments);
420
- }
421
-
422
- return open;
423
- }();
361
+ }))).apply(this, arguments);
362
+ };
424
363
 
425
- _proto.close = /*#__PURE__*/function () {
426
- var _close = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
364
+ _proto.close = function close() {
365
+ return (_close = _close || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
427
366
  return _regenerator["default"].wrap(function _callee8$(_context8) {
428
- while (1) {
429
- switch (_context8.prev = _context8.next) {
430
- case 0:
431
- _rlog["default"].info('关闭拓扑图', this.id);
367
+ while (1) switch (_context8.prev = _context8.next) {
368
+ case 0:
369
+ _rlog["default"].info('关闭拓扑图', this.id);
432
370
 
433
- if (this.id) {
434
- _context8.next = 3;
435
- break;
436
- }
371
+ if (this.id) {
372
+ _context8.next = 3;
373
+ break;
374
+ }
437
375
 
438
- return _context8.abrupt("return");
376
+ return _context8.abrupt("return");
439
377
 
440
- case 3:
441
- this.alarm.close();
442
- this.id = null;
378
+ case 3:
379
+ this.alarm.close();
380
+ this.id = null;
443
381
 
444
- case 5:
445
- case "end":
446
- return _context8.stop();
447
- }
382
+ case 5:
383
+ case "end":
384
+ return _context8.stop();
448
385
  }
449
386
  }, _callee8, this);
450
- }));
451
-
452
- function close() {
453
- return _close.apply(this, arguments);
454
- }
455
-
456
- return close;
457
- }();
387
+ }))).apply(this, arguments);
388
+ };
458
389
 
459
- _proto.refresh = /*#__PURE__*/function () {
460
- var _refresh = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
390
+ _proto.refresh = function refresh() {
391
+ return (_refresh = _refresh || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
461
392
  return _regenerator["default"].wrap(function _callee9$(_context9) {
462
- while (1) {
463
- switch (_context9.prev = _context9.next) {
464
- case 0:
465
- case "end":
466
- return _context9.stop();
467
- }
393
+ while (1) switch (_context9.prev = _context9.next) {
394
+ case 0:
395
+ case "end":
396
+ return _context9.stop();
468
397
  }
469
398
  }, _callee9);
470
- }));
471
-
472
- function refresh() {
473
- return _refresh.apply(this, arguments);
474
- }
475
-
476
- return refresh;
477
- }();
399
+ }))).apply(this, arguments);
400
+ };
478
401
 
479
402
  _proto.getGraphView = function getGraphView() {
480
403
  return this.view.topoClient.getGraphView();
@@ -501,25 +424,17 @@ var Topo = /*#__PURE__*/function () {
501
424
  this.view.topoClient.searchElements(filterType, value);
502
425
  };
503
426
 
504
- _proto.openViewMode = /*#__PURE__*/function () {
505
- var _openViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(id) {
427
+ _proto.openViewMode = function openViewMode(_x8) {
428
+ return (_openViewMode = _openViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(id) {
506
429
  return _regenerator["default"].wrap(function _callee10$(_context10) {
507
- while (1) {
508
- switch (_context10.prev = _context10.next) {
509
- case 0:
510
- case "end":
511
- return _context10.stop();
512
- }
430
+ while (1) switch (_context10.prev = _context10.next) {
431
+ case 0:
432
+ case "end":
433
+ return _context10.stop();
513
434
  }
514
435
  }, _callee10);
515
- }));
516
-
517
- function openViewMode(_x8) {
518
- return _openViewMode.apply(this, arguments);
519
- }
520
-
521
- return openViewMode;
522
- }();
436
+ }))).apply(this, arguments);
437
+ };
523
438
 
524
439
  _proto.isViewMode = function isViewMode() {
525
440
  return !this.isEditMode();
@@ -533,193 +448,147 @@ var Topo = /*#__PURE__*/function () {
533
448
  return this.store.getModelState('topoMod').graphLoaded;
534
449
  };
535
450
 
536
- _proto.onTopoDataLoaded = /*#__PURE__*/function () {
537
- var _onTopoDataLoaded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(topoData) {
451
+ _proto.onTopoDataLoaded = function onTopoDataLoaded(_x9) {
452
+ return (_onTopoDataLoaded = _onTopoDataLoaded || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(topoData) {
538
453
  return _regenerator["default"].wrap(function _callee11$(_context11) {
539
- while (1) {
540
- switch (_context11.prev = _context11.next) {
541
- case 0:
542
- this.pluginManager.onTopoDataLoaded(topoData);
543
-
544
- case 1:
545
- case "end":
546
- return _context11.stop();
547
- }
454
+ while (1) switch (_context11.prev = _context11.next) {
455
+ case 0:
456
+ this.pluginManager.onTopoDataLoaded(topoData);
457
+
458
+ case 1:
459
+ case "end":
460
+ return _context11.stop();
548
461
  }
549
462
  }, _callee11, this);
550
- }));
551
-
552
- function onTopoDataLoaded(_x9) {
553
- return _onTopoDataLoaded.apply(this, arguments);
554
- }
555
-
556
- return onTopoDataLoaded;
557
- }()
463
+ }))).apply(this, arguments);
464
+ }
558
465
  /**
559
466
  * 进入编辑模式
560
467
  */
561
468
  ;
562
469
 
563
- _proto.enterEditMode =
564
- /*#__PURE__*/
565
- function () {
566
- var _enterEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
470
+ _proto.enterEditMode = function enterEditMode() {
471
+ return (_enterEditMode = _enterEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
567
472
  var topoDispatchers, iconManageDispatchers;
568
473
  return _regenerator["default"].wrap(function _callee12$(_context12) {
569
- while (1) {
570
- switch (_context12.prev = _context12.next) {
571
- case 0:
572
- _rlog["default"].info('TopoApp.enterEditMode');
573
-
574
- if (!this.options.onSwitchToEditModeBegin) {
575
- _context12.next = 4;
576
- break;
577
- }
474
+ while (1) switch (_context12.prev = _context12.next) {
475
+ case 0:
476
+ _rlog["default"].info('TopoApp.enterEditMode');
578
477
 
478
+ if (!this.options.onSwitchToEditModeBegin) {
579
479
  _context12.next = 4;
580
- return this.options.onSwitchToEditModeBegin(this);
480
+ break;
481
+ }
581
482
 
582
- case 4:
583
- topoDispatchers = this.store.getModelDispatchers('topoMod');
584
- _context12.next = 7;
585
- return topoDispatchers.update({
586
- viewState: 'edit'
587
- });
483
+ _context12.next = 4;
484
+ return this.options.onSwitchToEditModeBegin(this);
588
485
 
589
- case 7:
590
- _context12.next = 9;
591
- return this.view.switchToEditMode();
486
+ case 4:
487
+ topoDispatchers = this.store.getModelDispatchers('topoMod');
488
+ _context12.next = 7;
489
+ return topoDispatchers.update({
490
+ viewState: 'edit'
491
+ });
592
492
 
593
- case 9:
594
- (0, _edgeUtil.updateEdgeExpanded)(this);
493
+ case 7:
494
+ _context12.next = 9;
495
+ return this.view.switchToEditMode();
595
496
 
596
- if (!this.options.onSwitchToEditMode) {
597
- _context12.next = 13;
598
- break;
599
- }
497
+ case 9:
498
+ (0, _edgeUtil.updateEdgeExpanded)(this);
600
499
 
500
+ if (!this.options.onSwitchToEditMode) {
601
501
  _context12.next = 13;
602
- return this.options.onSwitchToEditMode(this);
502
+ break;
503
+ }
504
+
505
+ _context12.next = 13;
506
+ return this.options.onSwitchToEditMode(this);
603
507
 
604
- case 13:
605
- if (this.getDataModel()) {
606
- // 更新节点名称显示隐藏
607
- this.attributeMetricDisplay.updateNodesNameVisible();
608
- } // 加载自定义上传的图标
508
+ case 13:
509
+ if (this.getDataModel()) {
510
+ // 更新节点名称显示隐藏
511
+ this.attributeMetricDisplay.updateNodesNameVisible();
512
+ } // 加载自定义上传的图标
609
513
 
610
514
 
611
- iconManageDispatchers = this.store.getModelDispatchers('customIcon');
612
- iconManageDispatchers.loadEditorIcons();
515
+ iconManageDispatchers = this.store.getModelDispatchers('customIcon');
516
+ iconManageDispatchers.loadEditorIcons();
613
517
 
614
- case 16:
615
- case "end":
616
- return _context12.stop();
617
- }
518
+ case 16:
519
+ case "end":
520
+ return _context12.stop();
618
521
  }
619
522
  }, _callee12, this);
620
- }));
621
-
622
- function enterEditMode() {
623
- return _enterEditMode.apply(this, arguments);
624
- }
625
-
626
- return enterEditMode;
627
- }();
523
+ }))).apply(this, arguments);
524
+ };
628
525
 
629
- _proto.exitEditMode = /*#__PURE__*/function () {
630
- var _exitEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
526
+ _proto.exitEditMode = function exitEditMode() {
527
+ return (_exitEditMode = _exitEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
631
528
  var editDispatchers;
632
529
  return _regenerator["default"].wrap(function _callee13$(_context13) {
633
- while (1) {
634
- switch (_context13.prev = _context13.next) {
635
- case 0:
636
- _context13.next = 2;
637
- return this.view.switchToViewMode();
638
-
639
- case 2:
640
- editDispatchers = this.store.getModelDispatchers('topoConfig');
641
- editDispatchers.switchToViewMode(this.id);
530
+ while (1) switch (_context13.prev = _context13.next) {
531
+ case 0:
532
+ _context13.next = 2;
533
+ return this.view.switchToViewMode();
642
534
 
643
- if (!this.options.onSwitchToViewMode) {
644
- _context13.next = 7;
645
- break;
646
- }
535
+ case 2:
536
+ editDispatchers = this.store.getModelDispatchers('topoConfig');
537
+ editDispatchers.switchToViewMode(this.id);
647
538
 
539
+ if (!this.options.onSwitchToViewMode) {
648
540
  _context13.next = 7;
649
- return this.options.onSwitchToViewMode(this);
541
+ break;
542
+ }
543
+
544
+ _context13.next = 7;
545
+ return this.options.onSwitchToViewMode(this);
650
546
 
651
- case 7:
652
- case "end":
653
- return _context13.stop();
654
- }
547
+ case 7:
548
+ case "end":
549
+ return _context13.stop();
655
550
  }
656
551
  }, _callee13, this);
657
- }));
658
-
659
- function exitEditMode() {
660
- return _exitEditMode.apply(this, arguments);
661
- }
662
-
663
- return exitEditMode;
664
- }()
552
+ }))).apply(this, arguments);
553
+ }
665
554
  /**
666
555
  * 后续待优化,移除该接口,由ht提供原子接口获取相关数据
667
556
  */
668
557
  ;
669
558
 
670
- _proto.triggerSaveEvent =
671
- /*#__PURE__*/
672
- function () {
673
- var _triggerSaveEvent = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
559
+ _proto.triggerSaveEvent = function triggerSaveEvent() {
560
+ return (_triggerSaveEvent = _triggerSaveEvent || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
674
561
  return _regenerator["default"].wrap(function _callee14$(_context14) {
675
- while (1) {
676
- switch (_context14.prev = _context14.next) {
677
- case 0:
678
- this.view.topoClient.saveExternal();
679
-
680
- case 1:
681
- case "end":
682
- return _context14.stop();
683
- }
562
+ while (1) switch (_context14.prev = _context14.next) {
563
+ case 0:
564
+ this.view.topoClient.saveExternal();
565
+
566
+ case 1:
567
+ case "end":
568
+ return _context14.stop();
684
569
  }
685
570
  }, _callee14, this);
686
- }));
687
-
688
- function triggerSaveEvent() {
689
- return _triggerSaveEvent.apply(this, arguments);
690
- }
691
-
692
- return triggerSaveEvent;
693
- }()
571
+ }))).apply(this, arguments);
572
+ }
694
573
  /**
695
574
  * FIXME 待优化,移除该接口,由ht提供原子接口获取相关数据
696
575
  */
697
576
  ;
698
577
 
699
- _proto.save =
700
- /*#__PURE__*/
701
- function () {
702
- var _save = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
578
+ _proto.save = function save() {
579
+ return (_save = _save || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
703
580
  return _regenerator["default"].wrap(function _callee15$(_context15) {
704
- while (1) {
705
- switch (_context15.prev = _context15.next) {
706
- case 0:
707
- this.triggerSaveEvent();
708
-
709
- case 1:
710
- case "end":
711
- return _context15.stop();
712
- }
581
+ while (1) switch (_context15.prev = _context15.next) {
582
+ case 0:
583
+ this.triggerSaveEvent();
584
+
585
+ case 1:
586
+ case "end":
587
+ return _context15.stop();
713
588
  }
714
589
  }, _callee15, this);
715
- }));
716
-
717
- function save() {
718
- return _save.apply(this, arguments);
719
- }
720
-
721
- return save;
722
- }()
590
+ }))).apply(this, arguments);
591
+ }
723
592
  /**
724
593
  * 导出为图片
725
594
  *
@@ -727,36 +596,26 @@ var Topo = /*#__PURE__*/function () {
727
596
  */
728
597
  ;
729
598
 
730
- _proto.exportImage =
731
- /*#__PURE__*/
732
- function () {
733
- var _exportImage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
599
+ _proto.exportImage = function exportImage(_x10) {
600
+ return (_exportImage = _exportImage || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
734
601
  var fileName;
735
602
  return _regenerator["default"].wrap(function _callee16$(_context16) {
736
- while (1) {
737
- switch (_context16.prev = _context16.next) {
738
- case 0:
739
- fileName = name;
603
+ while (1) switch (_context16.prev = _context16.next) {
604
+ case 0:
605
+ fileName = name;
740
606
 
741
- if (!name) {// TODO 获取拓扑名称,避免改名重绘拓扑图
742
- }
607
+ if (!name) {// TODO 获取拓扑名称,避免改名重绘拓扑图
608
+ }
743
609
 
744
- this.view.topoClient.exportImage(fileName);
610
+ this.view.topoClient.exportImage(fileName);
745
611
 
746
- case 3:
747
- case "end":
748
- return _context16.stop();
749
- }
612
+ case 3:
613
+ case "end":
614
+ return _context16.stop();
750
615
  }
751
616
  }, _callee16, this);
752
- }));
753
-
754
- function exportImage(_x10) {
755
- return _exportImage.apply(this, arguments);
756
- }
757
-
758
- return exportImage;
759
- }();
617
+ }))).apply(this, arguments);
618
+ };
760
619
 
761
620
  _proto.loadAlarm = function loadAlarm(alarmList) {
762
621
  this.alarm.updateState({
@@ -764,45 +623,29 @@ var Topo = /*#__PURE__*/function () {
764
623
  });
765
624
  };
766
625
 
767
- _proto.switchToViewMode = /*#__PURE__*/function () {
768
- var _switchToViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
626
+ _proto.switchToViewMode = function switchToViewMode() {
627
+ return (_switchToViewMode = _switchToViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
769
628
  return _regenerator["default"].wrap(function _callee17$(_context17) {
770
- while (1) {
771
- switch (_context17.prev = _context17.next) {
772
- case 0:
773
- case "end":
774
- return _context17.stop();
775
- }
629
+ while (1) switch (_context17.prev = _context17.next) {
630
+ case 0:
631
+ case "end":
632
+ return _context17.stop();
776
633
  }
777
634
  }, _callee17);
778
- }));
779
-
780
- function switchToViewMode() {
781
- return _switchToViewMode.apply(this, arguments);
782
- }
783
-
784
- return switchToViewMode;
785
- }();
635
+ }))).apply(this, arguments);
636
+ };
786
637
 
787
- _proto.switchToEditMode = /*#__PURE__*/function () {
788
- var _switchToEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
638
+ _proto.switchToEditMode = function switchToEditMode() {
639
+ return (_switchToEditMode = _switchToEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
789
640
  return _regenerator["default"].wrap(function _callee18$(_context18) {
790
- while (1) {
791
- switch (_context18.prev = _context18.next) {
792
- case 0:
793
- case "end":
794
- return _context18.stop();
795
- }
641
+ while (1) switch (_context18.prev = _context18.next) {
642
+ case 0:
643
+ case "end":
644
+ return _context18.stop();
796
645
  }
797
646
  }, _callee18);
798
- }));
799
-
800
- function switchToEditMode() {
801
- return _switchToEditMode.apply(this, arguments);
802
- }
803
-
804
- return switchToEditMode;
805
- }();
647
+ }))).apply(this, arguments);
648
+ };
806
649
 
807
650
  _proto.initStore = function initStore() {
808
651
  var store = (0, _createStore["default"])(this, this.options.storeModels || {});