| 62090 | } |
| 62091 | } |
| 62092 | class Errors extends Re.Component { |
| 62093 | render() { |
| 62094 | let { |
| 62095 | editorActions: s, |
| 62096 | errSelectors: o, |
| 62097 | layoutSelectors: i, |
| 62098 | layoutActions: a, |
| 62099 | getComponent: u, |
| 62100 | } = this.props |
| 62101 | const _ = u('Collapse') |
| 62102 | if (s && s.jumpToLine) var w = s.jumpToLine |
| 62103 | let x = o |
| 62104 | .allErrors() |
| 62105 | .filter((s) => 'thrown' === s.get('type') || 'error' === s.get('level')) |
| 62106 | if (!x || x.count() < 1) return null |
| 62107 | let C = i.isShown(['errorPane'], !0), |
| 62108 | j = x.sortBy((s) => s.get('line')) |
| 62109 | return Re.createElement( |
| 62110 | 'pre', |
| 62111 | { className: 'errors-wrapper' }, |
| 62112 | Re.createElement( |
| 62113 | 'hgroup', |
| 62114 | { className: 'error' }, |
| 62115 | Re.createElement('h4', { className: 'errors__title' }, 'Errors'), |
| 62116 | Re.createElement( |
| 62117 | 'button', |
| 62118 | { className: 'btn errors__clear-btn', onClick: () => a.show(['errorPane'], !C) }, |
| 62119 | C ? 'Hide' : 'Show' |
| 62120 | ) |
| 62121 | ), |
| 62122 | Re.createElement( |
| 62123 | _, |
| 62124 | { isOpened: C, animated: !0 }, |
| 62125 | Re.createElement( |
| 62126 | 'div', |
| 62127 | { className: 'errors' }, |
| 62128 | j.map((s, o) => { |
| 62129 | let i = s.get('type') |
| 62130 | return 'thrown' === i || 'auth' === i |
| 62131 | ? Re.createElement(ThrownErrorItem, { |
| 62132 | key: o, |
| 62133 | error: s.get('error') || s, |
| 62134 | jumpToLine: w, |
| 62135 | }) |
| 62136 | : 'spec' === i |
| 62137 | ? Re.createElement(SpecErrorItem, { key: o, error: s, jumpToLine: w }) |
| 62138 | : void 0 |
| 62139 | }) |
| 62140 | ) |
| 62141 | ) |
| 62142 | ) |
| 62143 | } |
| 62144 | } |
| 62145 | const ThrownErrorItem = ({ error: s, jumpToLine: o }) => { |