* The same behavior as `component.getReferringComponents`.
(ecModel, finderInput, opt)
| 7749 | */ |
| 7750 | |
| 7751 | function parseFinder(ecModel, finderInput, opt) { |
| 7752 | var _a = preParseFinder(finderInput, opt), |
| 7753 | mainTypeSpecified = _a.mainTypeSpecified, |
| 7754 | queryOptionMap = _a.queryOptionMap, |
| 7755 | others = _a.others; |
| 7756 | |
| 7757 | var result = others; |
| 7758 | var defaultMainType = opt ? opt.defaultMainType : null; |
| 7759 | |
| 7760 | if (!mainTypeSpecified && defaultMainType) { |
| 7761 | queryOptionMap.set(defaultMainType, {}); |
| 7762 | } |
| 7763 | |
| 7764 | queryOptionMap.each(function (queryOption, mainType) { |
| 7765 | var queryResult = queryReferringComponents(ecModel, mainType, queryOption, { |
| 7766 | useDefault: defaultMainType === mainType, |
| 7767 | enableAll: opt && opt.enableAll != null ? opt.enableAll : true, |
| 7768 | enableNone: opt && opt.enableNone != null ? opt.enableNone : true |
| 7769 | }); |
| 7770 | result[mainType + 'Models'] = queryResult.models; |
| 7771 | result[mainType + 'Model'] = queryResult.models[0]; |
| 7772 | }); |
| 7773 | return result; |
| 7774 | } |
| 7775 | function preParseFinder(finderInput, opt) { |
| 7776 | var finder; |
| 7777 |
no test coverage detected
searching dependent graphs…