@beinformed/ui 1.12.2 → 1.13.3

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 (291) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js +3 -3
  3. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  4. package/esm/constants/LayoutHintConfig.js +9 -0
  5. package/esm/constants/LayoutHintConfig.js.map +1 -1
  6. package/esm/constants/LayoutHints.js +5 -0
  7. package/esm/constants/LayoutHints.js.map +1 -1
  8. package/esm/constants/Settings.js +2 -1
  9. package/esm/constants/Settings.js.map +1 -1
  10. package/esm/exceptions/ConfigurationException.js +2 -1
  11. package/esm/exceptions/ConfigurationException.js.map +1 -1
  12. package/esm/exceptions/FetchException.js +4 -3
  13. package/esm/exceptions/FetchException.js.map +1 -1
  14. package/esm/exceptions/IllegalArgumentException.js +2 -1
  15. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  16. package/esm/exceptions/IllegalReturnException.js +2 -1
  17. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  18. package/esm/exceptions/IllegalStateException.js +2 -1
  19. package/esm/exceptions/IllegalStateException.js.map +1 -1
  20. package/esm/exceptions/JsonParseException.js +2 -1
  21. package/esm/exceptions/JsonParseException.js.map +1 -1
  22. package/esm/exceptions/MissingPropertyException.js +2 -1
  23. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  24. package/esm/exceptions/NetworkException.js +2 -1
  25. package/esm/exceptions/NetworkException.js.map +1 -1
  26. package/esm/exceptions/NotAllowedUriException.js +2 -1
  27. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  28. package/esm/exceptions/NotFoundException.js +2 -1
  29. package/esm/exceptions/NotFoundException.js.map +1 -1
  30. package/esm/exceptions/ServerRequestException.js +2 -1
  31. package/esm/exceptions/ServerRequestException.js.map +1 -1
  32. package/esm/exceptions/ThemePropertyException.js +2 -1
  33. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  34. package/esm/exceptions/TimeoutException.js +2 -1
  35. package/esm/exceptions/TimeoutException.js.map +1 -1
  36. package/esm/exceptions/UnauthorizedException.js +2 -1
  37. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  38. package/esm/exceptions/UnsupportedOperationException.js +2 -1
  39. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  40. package/esm/hooks/useContent.js +2 -2
  41. package/esm/hooks/useContent.js.map +1 -1
  42. package/esm/hooks/useDeepCompareEffect.js +2 -1
  43. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  44. package/esm/hooks/useForm.js.map +1 -1
  45. package/esm/hooks/useModal.js +2 -2
  46. package/esm/hooks/useModal.js.map +1 -1
  47. package/esm/hooks/useModularUI.js +0 -1
  48. package/esm/hooks/useModularUI.js.map +1 -1
  49. package/esm/hooks/useProgressIndicator.js +2 -2
  50. package/esm/i18n/Locale.js +11 -4
  51. package/esm/i18n/Locale.js.map +1 -1
  52. package/esm/i18n/Locales.js +2 -2
  53. package/esm/i18n/Message.js +2 -2
  54. package/esm/i18n/languages.js +2 -1
  55. package/esm/i18n/languages.js.map +1 -1
  56. package/esm/models/attributes/AttributeCollection.js +2 -2
  57. package/esm/models/attributes/AttributeContent.js +2 -2
  58. package/esm/models/attributes/AttributeDataHelper.js +2 -2
  59. package/esm/models/attributes/BooleanAttributeModel.js +2 -2
  60. package/esm/models/attributes/ChoiceAttributeModel.js +2 -2
  61. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
  62. package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -2
  63. package/esm/models/attributes/DatetimeAttributeModel.js +7 -3
  64. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  65. package/esm/models/attributes/_createAttribute.js +2 -2
  66. package/esm/models/base/ResourceModel.js +2 -2
  67. package/esm/models/caseview/CaseViewModel.js +2 -1
  68. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  69. package/esm/models/concepts/ConceptDetailModel.js +2 -2
  70. package/esm/models/concepts/SourceReferenceModel.js +2 -2
  71. package/esm/models/content/ContentTOCModel.js +2 -2
  72. package/esm/models/filters/AssignmentFilterModel.js +2 -2
  73. package/esm/models/filters/BaseFilterModel.js +2 -2
  74. package/esm/models/filters/ConceptIndexFilterModel.js +2 -1
  75. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  76. package/esm/models/filters/FilterCollection.js +2 -2
  77. package/esm/models/filters/FilterModel.js +2 -1
  78. package/esm/models/filters/FilterModel.js.map +1 -1
  79. package/esm/models/form/FormModel.js +28 -4
  80. package/esm/models/form/FormModel.js.map +1 -1
  81. package/esm/models/form/FormObjectModel.js +2 -2
  82. package/esm/models/grouping/GroupingModel.js +2 -2
  83. package/esm/models/links/normalizeLinkJSON.js +2 -2
  84. package/esm/models/list/ListDetailModel.js +2 -2
  85. package/esm/models/list/ListItemCollection.js +38 -0
  86. package/esm/models/list/ListItemCollection.js.map +1 -1
  87. package/esm/models/list/ListItemModel.js +14 -2
  88. package/esm/models/list/ListItemModel.js.map +1 -1
  89. package/esm/models/list/ListModel.js +17 -70
  90. package/esm/models/list/ListModel.js.map +1 -1
  91. package/esm/models/lookup/LookupOptionCollection.js +2 -2
  92. package/esm/modularui/ModularUIError.js +2 -1
  93. package/esm/modularui/ModularUIError.js.map +1 -1
  94. package/esm/modularui/ModularUIRequest.js +71 -49
  95. package/esm/modularui/ModularUIRequest.js.map +1 -1
  96. package/esm/react-server/serverUtil.js +2 -2
  97. package/esm/react-theme/createTheme.js +2 -2
  98. package/esm/redux/_i18n/reducer.js +2 -2
  99. package/esm/redux/_modularui/actions.js +2 -2
  100. package/esm/redux/_modularui/connector.js +2 -2
  101. package/esm/redux/_modularui/reducer.js +2 -2
  102. package/esm/redux/_modularui/selectors.js +2 -2
  103. package/esm/redux/reducers/AuthReducer.js +2 -2
  104. package/esm/redux/reducers/ModalsReducer.js +2 -2
  105. package/esm/redux/reducers/NotificationReducer.js +2 -2
  106. package/esm/redux/reducers/PreferencesReducer.js +2 -2
  107. package/esm/redux/reducers/ProgressIndicatorReducer.js +2 -2
  108. package/esm/redux/store/configureStore.js +2 -2
  109. package/esm/utils/browser/Cookies.js +18 -32
  110. package/esm/utils/browser/Cookies.js.map +1 -1
  111. package/esm/utils/fetch/xhr.js +6 -4
  112. package/esm/utils/fetch/xhr.js.map +1 -1
  113. package/lib/builder/mergeLayoutHintConfigurations.js +3 -3
  114. package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
  115. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  116. package/lib/constants/LayoutHintConfig.js +9 -0
  117. package/lib/constants/LayoutHintConfig.js.flow +9 -0
  118. package/lib/constants/LayoutHintConfig.js.map +1 -1
  119. package/lib/constants/LayoutHints.js +8 -2
  120. package/lib/constants/LayoutHints.js.flow +4 -0
  121. package/lib/constants/LayoutHints.js.map +1 -1
  122. package/lib/constants/Settings.js +2 -1
  123. package/lib/constants/Settings.js.flow +2 -0
  124. package/lib/constants/Settings.js.map +1 -1
  125. package/lib/exceptions/ConfigurationException.js +3 -1
  126. package/lib/exceptions/ConfigurationException.js.map +1 -1
  127. package/lib/exceptions/FetchException.js +5 -3
  128. package/lib/exceptions/FetchException.js.map +1 -1
  129. package/lib/exceptions/IllegalArgumentException.js +3 -1
  130. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  131. package/lib/exceptions/IllegalReturnException.js +3 -1
  132. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  133. package/lib/exceptions/IllegalStateException.js +3 -1
  134. package/lib/exceptions/IllegalStateException.js.map +1 -1
  135. package/lib/exceptions/JsonParseException.js +3 -1
  136. package/lib/exceptions/JsonParseException.js.map +1 -1
  137. package/lib/exceptions/MissingPropertyException.js +3 -1
  138. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  139. package/lib/exceptions/NetworkException.js +3 -1
  140. package/lib/exceptions/NetworkException.js.map +1 -1
  141. package/lib/exceptions/NotAllowedUriException.js +3 -1
  142. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  143. package/lib/exceptions/NotFoundException.js +3 -1
  144. package/lib/exceptions/NotFoundException.js.map +1 -1
  145. package/lib/exceptions/ServerRequestException.js +3 -1
  146. package/lib/exceptions/ServerRequestException.js.map +1 -1
  147. package/lib/exceptions/ThemePropertyException.js +3 -1
  148. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  149. package/lib/exceptions/TimeoutException.js +3 -1
  150. package/lib/exceptions/TimeoutException.js.map +1 -1
  151. package/lib/exceptions/UnauthorizedException.js +3 -1
  152. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  153. package/lib/exceptions/UnsupportedOperationException.js +3 -1
  154. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  155. package/lib/hooks/useContent.js +2 -2
  156. package/lib/hooks/useContent.js.flow +2 -2
  157. package/lib/hooks/useContent.js.map +1 -1
  158. package/lib/hooks/useDeepCompareEffect.js +2 -1
  159. package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
  160. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  161. package/lib/hooks/useForm.js.flow +1 -2
  162. package/lib/hooks/useForm.js.map +1 -1
  163. package/lib/hooks/useModal.js +2 -2
  164. package/lib/hooks/useModal.js.flow +1 -1
  165. package/lib/hooks/useModal.js.map +1 -1
  166. package/lib/hooks/useModularUI.js +0 -1
  167. package/lib/hooks/useModularUI.js.flow +0 -2
  168. package/lib/hooks/useModularUI.js.map +1 -1
  169. package/lib/hooks/useProgressIndicator.js +2 -2
  170. package/lib/i18n/Locale.js +11 -5
  171. package/lib/i18n/Locale.js.flow +7 -0
  172. package/lib/i18n/Locale.js.map +1 -1
  173. package/lib/i18n/Locales.js +2 -2
  174. package/lib/i18n/Message.js +2 -2
  175. package/lib/i18n/__tests__/Locale.spec.js.flow +14 -0
  176. package/lib/i18n/languages.js +2 -1
  177. package/lib/i18n/languages.js.flow +1 -0
  178. package/lib/i18n/languages.js.map +1 -1
  179. package/lib/i18n/types.js.flow +1 -0
  180. package/lib/models/attributes/AttributeCollection.js +2 -2
  181. package/lib/models/attributes/AttributeContent.js +2 -2
  182. package/lib/models/attributes/AttributeDataHelper.js +2 -2
  183. package/lib/models/attributes/BooleanAttributeModel.js +2 -2
  184. package/lib/models/attributes/ChoiceAttributeModel.js +2 -2
  185. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
  186. package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -2
  187. package/lib/models/attributes/DatetimeAttributeModel.js +7 -3
  188. package/lib/models/attributes/DatetimeAttributeModel.js.flow +9 -4
  189. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  190. package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +1 -1
  191. package/lib/models/attributes/_createAttribute.js +2 -2
  192. package/lib/models/base/ResourceModel.js +2 -2
  193. package/lib/models/base/__tests__/BaseModel.spec.js.flow +5 -5
  194. package/lib/models/caseview/CaseViewModel.js +3 -1
  195. package/lib/models/caseview/CaseViewModel.js.flow +3 -1
  196. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  197. package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +38 -1
  198. package/lib/models/concepts/ConceptDetailModel.js +2 -2
  199. package/lib/models/concepts/SourceReferenceModel.js +2 -2
  200. package/lib/models/content/ContentTOCModel.js +2 -2
  201. package/lib/models/filters/AssignmentFilterModel.js +2 -2
  202. package/lib/models/filters/BaseFilterModel.js +2 -2
  203. package/lib/models/filters/ConceptIndexFilterModel.js +3 -1
  204. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  205. package/lib/models/filters/FilterCollection.js +2 -2
  206. package/lib/models/filters/FilterModel.js +3 -1
  207. package/lib/models/filters/FilterModel.js.map +1 -1
  208. package/lib/models/form/FormModel.js +28 -4
  209. package/lib/models/form/FormModel.js.flow +18 -1
  210. package/lib/models/form/FormModel.js.map +1 -1
  211. package/lib/models/form/FormObjectModel.js +2 -2
  212. package/lib/models/form/__tests__/FormModel.getters.spec.js.flow +15 -0
  213. package/lib/models/grouping/GroupingModel.js +2 -2
  214. package/lib/models/links/normalizeLinkJSON.js +2 -2
  215. package/lib/models/list/ListDetailModel.js +2 -2
  216. package/lib/models/list/ListItemCollection.js +40 -0
  217. package/lib/models/list/ListItemCollection.js.flow +38 -1
  218. package/lib/models/list/ListItemCollection.js.map +1 -1
  219. package/lib/models/list/ListItemModel.js +14 -2
  220. package/lib/models/list/ListItemModel.js.flow +15 -0
  221. package/lib/models/list/ListItemModel.js.map +1 -1
  222. package/lib/models/list/ListModel.js +16 -71
  223. package/lib/models/list/ListModel.js.flow +1 -45
  224. package/lib/models/list/ListModel.js.map +1 -1
  225. package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +22 -0
  226. package/lib/models/list/__tests__/ListModel.spec.js.flow +0 -2
  227. package/lib/models/lookup/LookupOptionCollection.js +2 -2
  228. package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +38 -21
  229. package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +11 -0
  230. package/lib/modularui/ModularUIError.js +3 -1
  231. package/lib/modularui/ModularUIError.js.map +1 -1
  232. package/lib/modularui/ModularUIRequest.js +69 -49
  233. package/lib/modularui/ModularUIRequest.js.flow +38 -22
  234. package/lib/modularui/ModularUIRequest.js.map +1 -1
  235. package/lib/react-server/serverUtil.js +2 -2
  236. package/lib/react-theme/createTheme.js +2 -2
  237. package/lib/redux/_i18n/reducer.js +2 -2
  238. package/lib/redux/_modularui/actions.js +2 -2
  239. package/lib/redux/_modularui/connector.js +2 -2
  240. package/lib/redux/_modularui/reducer.js +2 -2
  241. package/lib/redux/_modularui/selectors.js +2 -2
  242. package/lib/redux/reducers/AuthReducer.js +2 -2
  243. package/lib/redux/reducers/ModalsReducer.js +2 -2
  244. package/lib/redux/reducers/NotificationReducer.js +2 -2
  245. package/lib/redux/reducers/PreferencesReducer.js +2 -2
  246. package/lib/redux/reducers/ProgressIndicatorReducer.js +2 -2
  247. package/lib/redux/store/configureStore.js +2 -2
  248. package/lib/utils/browser/Cookies.js +18 -31
  249. package/lib/utils/browser/Cookies.js.flow +22 -28
  250. package/lib/utils/browser/Cookies.js.map +1 -1
  251. package/lib/utils/browser/__tests__/Cookies.spec.js.flow +51 -0
  252. package/lib/utils/fetch/xhr.js +7 -4
  253. package/lib/utils/fetch/xhr.js.flow +6 -2
  254. package/lib/utils/fetch/xhr.js.map +1 -1
  255. package/package.json +37 -35
  256. package/src/builder/mergeLayoutHintConfigurations.js +3 -3
  257. package/src/constants/LayoutHintConfig.js +9 -0
  258. package/src/constants/LayoutHints.js +4 -0
  259. package/src/constants/Settings.js +2 -0
  260. package/src/hooks/useContent.js +2 -2
  261. package/src/hooks/useDeepCompareEffect.js +1 -1
  262. package/src/hooks/useForm.js +1 -2
  263. package/src/hooks/useModal.js +1 -1
  264. package/src/hooks/useModularUI.js +0 -2
  265. package/src/i18n/Locale.js +7 -0
  266. package/src/i18n/__tests__/Locale.spec.js +14 -0
  267. package/src/i18n/languages.js +1 -0
  268. package/src/i18n/types.js +1 -0
  269. package/src/models/attributes/DatetimeAttributeModel.js +9 -4
  270. package/src/models/attributes/__tests__/StringAttributeModel.spec.js +1 -1
  271. package/src/models/base/__tests__/BaseModel.spec.js +5 -5
  272. package/src/models/caseview/CaseViewModel.js +3 -1
  273. package/src/models/caseview/__tests__/CaseViewModel.spec.js +38 -1
  274. package/src/models/caseview/__tests__/caseview.json +14 -3
  275. package/src/models/caseview/__tests__/caseviewContributions.json +48 -77
  276. package/src/models/caseview/__tests__/caseview_local_taskgroup.json +57 -0
  277. package/src/models/form/FormModel.js +18 -1
  278. package/src/models/form/__tests__/FormModel.getters.spec.js +15 -0
  279. package/src/models/list/ListItemCollection.js +38 -1
  280. package/src/models/list/ListItemModel.js +15 -0
  281. package/src/models/list/ListModel.js +1 -45
  282. package/src/models/list/__tests__/ListItemCollection.spec.js +22 -0
  283. package/src/models/list/__tests__/ListModel.spec.js +0 -2
  284. package/src/models/panels/__tests__/GroupingPanelModel.spec.js +38 -21
  285. package/src/models/panels/__tests__/groupingPanel.json +20 -1
  286. package/src/models/panels/__tests__/groupingPanelContributions.json +14 -1
  287. package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +11 -0
  288. package/src/modularui/ModularUIRequest.js +38 -22
  289. package/src/utils/browser/Cookies.js +22 -28
  290. package/src/utils/browser/__tests__/Cookies.spec.js +51 -0
  291. package/src/utils/fetch/xhr.js +6 -2
@@ -59,9 +59,9 @@ var _ErrorCollection = _interopRequireDefault(require("../error/ErrorCollection"
59
59
 
60
60
  var _exceptions = require("../../exceptions");
61
61
 
62
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys6(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
62
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys6(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
63
63
 
64
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
64
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
65
65
 
66
66
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
67
67
 
@@ -73,6 +73,21 @@ describe("formModel getters", () => {
73
73
 
74
74
  form.tokens = ["Token"];
75
75
  expect(form.tokens).toHaveLength(1);
76
+
77
+ const formJSON = {
78
+ formresponse: {
79
+ tokens: ["form-token"],
80
+ },
81
+ };
82
+
83
+ const formData = ModularUIResponse.create({
84
+ data: formJSON,
85
+ contributions: FormContributionsJSON,
86
+ });
87
+ const formWithToken = new FormModel(formData);
88
+ expect(formWithToken.tokens).toStrictEqual(["form-token"]);
89
+ formWithToken.removeTokens();
90
+ expect(formWithToken.tokens).toHaveLength(0);
76
91
  });
77
92
 
78
93
  it("can handle last modification", () => {
@@ -29,9 +29,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
29
29
 
30
30
  var _AttributeCollection = _interopRequireDefault(require("../attributes/AttributeCollection"));
31
31
 
32
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
32
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
33
33
 
34
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
34
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
35
35
 
36
36
  /**
37
37
  * Group information model
@@ -33,9 +33,9 @@ var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stabl
33
33
 
34
34
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
35
35
 
36
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
36
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
37
 
38
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
38
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
39
39
 
40
40
  /**
41
41
  * Flatten JSON structure into a one dimensional array
@@ -61,9 +61,9 @@ var _createAttribute = _interopRequireDefault(require("../attributes/_createAttr
61
61
 
62
62
  var _CompositeAttributeModel = _interopRequireDefault(require("../attributes/CompositeAttributeModel"));
63
63
 
64
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys4(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
64
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys4(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
65
65
 
66
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
66
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
67
67
 
68
68
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
69
69
 
@@ -13,6 +13,10 @@ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable
13
13
 
14
14
  var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
15
15
 
16
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
17
+
18
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
19
+
16
20
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
17
21
 
18
22
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
@@ -29,6 +33,10 @@ var _BaseCollection2 = _interopRequireDefault(require("../base/BaseCollection"))
29
33
 
30
34
  var _ActionCollection = _interopRequireDefault(require("../actions/ActionCollection"));
31
35
 
36
+ var _ListItemModel = _interopRequireDefault(require("../list/ListItemModel"));
37
+
38
+ var _ConfigurationException = _interopRequireDefault(require("../../exceptions/ConfigurationException"));
39
+
32
40
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
33
41
 
34
42
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -82,6 +90,38 @@ var ListItemCollection = /*#__PURE__*/function (_BaseCollection) {
82
90
  });
83
91
  return actions;
84
92
  }
93
+ }], [{
94
+ key: "createFromList",
95
+ value:
96
+ /**
97
+ * Create a list item collection from the given list
98
+ */
99
+ function createFromList(list) {
100
+ var _embedded = list.getData("_embedded");
101
+
102
+ if (_embedded != null) {
103
+ var _context2;
104
+
105
+ if (Array.isArray(_embedded)) {
106
+ throw new _ConfigurationException.default("One record panel with multiple tables is not supported, place all types in one panel for the panel with key ".concat(list.key));
107
+ }
108
+
109
+ var dynamicschema = list.getData("dynamicschema");
110
+ var collection = (0, _map.default)(_context2 = _embedded.results).call(_context2, function (resultItem) {
111
+ var _Object$keys = (0, _keys.default)(resultItem),
112
+ _Object$keys2 = (0, _slicedToArray2.default)(_Object$keys, 1),
113
+ key = _Object$keys2[0];
114
+
115
+ var listitemData = resultItem[key];
116
+ listitemData.dynamicschema = dynamicschema;
117
+ var listitemContributions = list.contributions.results[key];
118
+ return _ListItemModel.default.createFromListResult(key, listitemData, listitemContributions);
119
+ });
120
+ return new ListItemCollection(collection);
121
+ }
122
+
123
+ return new ListItemCollection();
124
+ }
85
125
  }]);
86
126
  return ListItemCollection;
87
127
  }(_BaseCollection2.default);
@@ -1,13 +1,50 @@
1
1
  // @flow
2
2
  import BaseCollection from "../base/BaseCollection";
3
3
  import ActionCollection from "../actions/ActionCollection";
4
+ import ListItemModel from "../list/ListItemModel";
4
5
 
5
- import type ListItemModel from "../list/ListItemModel";
6
+ import ConfigurationException from "../../exceptions/ConfigurationException";
7
+
8
+ import type ListModel from "../list/ListModel";
6
9
 
7
10
  /**
8
11
  * Collection of list items
9
12
  */
10
13
  class ListItemCollection extends BaseCollection<ListItemModel> {
14
+ /**
15
+ * Create a list item collection from the given list
16
+ */
17
+ static createFromList(list: ListModel): ListItemCollection {
18
+ const _embedded = list.getData("_embedded");
19
+ if (_embedded != null) {
20
+ if (Array.isArray(_embedded)) {
21
+ throw new ConfigurationException(
22
+ `One record panel with multiple tables is not supported, place all types in one panel for the panel with key ${list.key}`
23
+ );
24
+ }
25
+
26
+ const dynamicschema = list.getData("dynamicschema");
27
+
28
+ const collection = _embedded.results.map((resultItem) => {
29
+ const [key] = Object.keys(resultItem);
30
+ const listitemData = resultItem[key];
31
+ listitemData.dynamicschema = dynamicschema;
32
+
33
+ const listitemContributions = list.contributions.results[key];
34
+
35
+ return ListItemModel.createFromListResult(
36
+ key,
37
+ listitemData,
38
+ listitemContributions
39
+ );
40
+ });
41
+
42
+ return new ListItemCollection(collection);
43
+ }
44
+
45
+ return new ListItemCollection();
46
+ }
47
+
11
48
  /**
12
49
  */
13
50
  get additionalDetailRoutePath(): string {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/models/list/ListItemCollection.js"],"names":["ListItemCollection","isEmpty","allRoutes","all","listItem","additionalDetailRoutePath","join","actions","ActionCollection","forEach","collection","push","actionCollection","BaseCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;;;;;AAIA;AACA;AACA;IACMA,kB;;;;;;;;;;;;;AACJ;AACF;AACE,mBAAwC;AAAA;;AACtC,UAAI,KAAKC,OAAT,EAAkB;AAChB,eAAO,wBAAP;AACD;;AAED,UAAMC,SAAS,GAAG,kCAAKC,GAAL,iBACX,UAACC,QAAD;AAAA,eAAcA,QAAQ,CAACC,yBAAvB;AAAA,OADW,EAEfC,IAFe,CAEV,GAFU,CAAlB;;AAIA,UAAI,uBAAAJ,SAAS,MAAT,CAAAA,SAAS,EAAU,GAAV,CAAb,EAA6B;AAC3B,0BAAWA,SAAX;AACD;;AAED,aAAOA,SAAP;AACD;AAED;AACF;;;;SACE,eAAyC;AACvC,UAAMK,OAAO,GAAG,IAAIC,yBAAJ,EAAhB;AAEA,WAAKL,GAAL,CAASM,OAAT,CAAiB,UAACL,QAAD,EAAc;AAAA;;AAC7B,+BAAAG,OAAO,CAACG,UAAR,EAAmBC,IAAnB,6DAA2BP,QAAQ,CAACQ,gBAAT,CAA0BT,GAArD;AACD,OAFD;AAIA,aAAOI,OAAP;AACD;;;EA7B8BM,wB;;eAgClBb,kB","sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type ListItemModel from \"../list/ListItemModel\";\n\n/**\n * Collection of list items\n */\nclass ListItemCollection extends BaseCollection<ListItemModel> {\n /**\n */\n get additionalDetailRoutePath(): string {\n if (this.isEmpty) {\n return \"__NON_EXISTING_ROUTE__\";\n }\n\n const allRoutes = this.all\n .map((listItem) => listItem.additionalDetailRoutePath)\n .join(\"|\");\n\n if (allRoutes.includes(\"|\")) {\n return `(${allRoutes})`;\n }\n\n return allRoutes;\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n const actions = new ActionCollection();\n\n this.all.forEach((listItem) => {\n actions.collection.push(...listItem.actionCollection.all);\n });\n\n return actions;\n }\n}\n\nexport default ListItemCollection;\n"],"file":"ListItemCollection.js"}
1
+ {"version":3,"sources":["../../../src/models/list/ListItemCollection.js"],"names":["ListItemCollection","isEmpty","allRoutes","all","listItem","additionalDetailRoutePath","join","actions","ActionCollection","forEach","collection","push","actionCollection","list","_embedded","getData","Array","isArray","ConfigurationException","key","dynamicschema","results","resultItem","listitemData","listitemContributions","contributions","ListItemModel","createFromListResult","BaseCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA;AACA;AACA;IACMA,kB;;;;;;;;;;;;;AAmCJ;AACF;AACE,mBAAwC;AAAA;;AACtC,UAAI,KAAKC,OAAT,EAAkB;AAChB,eAAO,wBAAP;AACD;;AAED,UAAMC,SAAS,GAAG,kCAAKC,GAAL,iBACX,UAACC,QAAD;AAAA,eAAcA,QAAQ,CAACC,yBAAvB;AAAA,OADW,EAEfC,IAFe,CAEV,GAFU,CAAlB;;AAIA,UAAI,uBAAAJ,SAAS,MAAT,CAAAA,SAAS,EAAU,GAAV,CAAb,EAA6B;AAC3B,0BAAWA,SAAX;AACD;;AAED,aAAOA,SAAP;AACD;AAED;AACF;;;;SACE,eAAyC;AACvC,UAAMK,OAAO,GAAG,IAAIC,yBAAJ,EAAhB;AAEA,WAAKL,GAAL,CAASM,OAAT,CAAiB,UAACL,QAAD,EAAc;AAAA;;AAC7B,+BAAAG,OAAO,CAACG,UAAR,EAAmBC,IAAnB,6DAA2BP,QAAQ,CAACQ,gBAAT,CAA0BT,GAArD;AACD,OAFD;AAIA,aAAOI,OAAP;AACD;;;;AA9DD;AACF;AACA;AACE,4BAAsBM,IAAtB,EAA2D;AACzD,UAAMC,SAAS,GAAGD,IAAI,CAACE,OAAL,CAAa,WAAb,CAAlB;;AACA,UAAID,SAAS,IAAI,IAAjB,EAAuB;AAAA;;AACrB,YAAIE,KAAK,CAACC,OAAN,CAAcH,SAAd,CAAJ,EAA8B;AAC5B,gBAAM,IAAII,+BAAJ,uHAC2GL,IAAI,CAACM,GADhH,EAAN;AAGD;;AAED,YAAMC,aAAa,GAAGP,IAAI,CAACE,OAAL,CAAa,eAAb,CAAtB;AAEA,YAAML,UAAU,GAAG,8BAAAI,SAAS,CAACO,OAAV,kBAAsB,UAACC,UAAD,EAAgB;AACvD,6BAAc,mBAAYA,UAAZ,CAAd;AAAA;AAAA,cAAOH,GAAP;;AACA,cAAMI,YAAY,GAAGD,UAAU,CAACH,GAAD,CAA/B;AACAI,UAAAA,YAAY,CAACH,aAAb,GAA6BA,aAA7B;AAEA,cAAMI,qBAAqB,GAAGX,IAAI,CAACY,aAAL,CAAmBJ,OAAnB,CAA2BF,GAA3B,CAA9B;AAEA,iBAAOO,uBAAcC,oBAAd,CACLR,GADK,EAELI,YAFK,EAGLC,qBAHK,CAAP;AAKD,SAZkB,CAAnB;AAcA,eAAO,IAAIxB,kBAAJ,CAAuBU,UAAvB,CAAP;AACD;;AAED,aAAO,IAAIV,kBAAJ,EAAP;AACD;;;EAjC8B4B,wB;;eAkElB5B,kB","sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ListItemModel from \"../list/ListItemModel\";\n\nimport ConfigurationException from \"../../exceptions/ConfigurationException\";\n\nimport type ListModel from \"../list/ListModel\";\n\n/**\n * Collection of list items\n */\nclass ListItemCollection extends BaseCollection<ListItemModel> {\n /**\n * Create a list item collection from the given list\n */\n static createFromList(list: ListModel): ListItemCollection {\n const _embedded = list.getData(\"_embedded\");\n if (_embedded != null) {\n if (Array.isArray(_embedded)) {\n throw new ConfigurationException(\n `One record panel with multiple tables is not supported, place all types in one panel for the panel with key ${list.key}`\n );\n }\n\n const dynamicschema = list.getData(\"dynamicschema\");\n\n const collection = _embedded.results.map((resultItem) => {\n const [key] = Object.keys(resultItem);\n const listitemData = resultItem[key];\n listitemData.dynamicschema = dynamicschema;\n\n const listitemContributions = list.contributions.results[key];\n\n return ListItemModel.createFromListResult(\n key,\n listitemData,\n listitemContributions\n );\n });\n\n return new ListItemCollection(collection);\n }\n\n return new ListItemCollection();\n }\n\n /**\n */\n get additionalDetailRoutePath(): string {\n if (this.isEmpty) {\n return \"__NON_EXISTING_ROUTE__\";\n }\n\n const allRoutes = this.all\n .map((listItem) => listItem.additionalDetailRoutePath)\n .join(\"|\");\n\n if (allRoutes.includes(\"|\")) {\n return `(${allRoutes})`;\n }\n\n return allRoutes;\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n const actions = new ActionCollection();\n\n this.all.forEach((listItem) => {\n actions.collection.push(...listItem.actionCollection.all);\n });\n\n return actions;\n }\n}\n\nexport default ListItemCollection;\n"],"file":"ListItemCollection.js"}
@@ -123,11 +123,23 @@ var ListItemModel = /*#__PURE__*/function (_DetailModel) {
123
123
  }).join("|");
124
124
  }
125
125
  }], [{
126
- key: "createFromChoiceAttributeOption",
126
+ key: "createFromListResult",
127
127
  value:
128
128
  /**
129
129
  */
130
- function createFromChoiceAttributeOption(option) {
130
+ function createFromListResult(key, data, contributions) {
131
+ var listitemInput = new _ModularUIResponse.default();
132
+ listitemInput.key = key;
133
+ listitemInput.data = data;
134
+ listitemInput.contributions = contributions;
135
+ return new ListItemModel(listitemInput);
136
+ }
137
+ /**
138
+ */
139
+
140
+ }, {
141
+ key: "createFromChoiceAttributeOption",
142
+ value: function createFromChoiceAttributeOption(option) {
131
143
  var listitemInput = new _ModularUIResponse.default();
132
144
  listitemInput.key = option.code;
133
145
  var item = new ListItemModel(listitemInput);
@@ -14,6 +14,21 @@ import type LinkCollection from "../links/LinkCollection";
14
14
  * List Item
15
15
  */
16
16
  export default class ListItemModel extends DetailModel {
17
+ /**
18
+ */
19
+ static createFromListResult(
20
+ key: string,
21
+ data: Object,
22
+ contributions: Object
23
+ ): ListItemModel {
24
+ const listitemInput = new ModularUIResponse();
25
+ listitemInput.key = key;
26
+ listitemInput.data = data;
27
+ listitemInput.contributions = contributions;
28
+
29
+ return new ListItemModel(listitemInput);
30
+ }
31
+
17
32
  /**
18
33
  */
19
34
  static createFromChoiceAttributeOption(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/models/list/ListItemModel.js"],"names":["ListItemModel","selflink","links","getLinkByKey","Href","href","caseviewLinkAttribute","attributeCollection","getAttributeByLayoutHint","CASEVIEW_LINK","caseviewLinkKey","name","caseviewLink","selfhref","getLinksByGroup","panelLinks","length","actionType","actionCollection","getActionsByType","additionalDetailLinks","link","path","join","option","listitemInput","ModularUIResponse","key","code","item","DetailModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;;;;;AAMA;AACA;AACA;IACqBA,a;;;;;;;;;;;;;AAenB;AACF;AACE,mBAAqB;AACnB,UAAMC,QAAQ,GAAG,KAAKC,KAAL,CAAWC,YAAX,CAAwB,MAAxB,CAAjB;;AAEA,UAAIF,QAAQ,KAAK,IAAjB,EAAuB;AACrB,eAAO,IAAIG,aAAJ,CAAS,GAAT,CAAP;AACD;;AAED,aAAOH,QAAQ,CAACI,IAAhB;AACD;AAED;AACF;;;;SACE,eAAyB;AACvB,UAAMC,qBAAqB,GACzB,KAAKC,mBAAL,CAAyBC,wBAAzB,CAAkDC,0BAAlD,CADF;;AAEA,UAAIH,qBAAJ,EAA2B;AACzB,YAAMI,eAAe,GAAGJ,qBAAqB,CAACK,IAA9C;AACA,YAAMC,YAAY,GAAG,KAAKV,KAAL,CAAWC,YAAX,CAAwBO,eAAxB,CAArB;;AAEA,YAAIE,YAAJ,EAAkB;AAChB,iBAAOA,YAAY,CAACP,IAApB;AACD;AACF;;AAED,aAAO,KAAKQ,QAAZ;AACD;AAED;AACF;AACA;;;;SACE,eAAiC;AAC/B,aAAO,KAAKX,KAAL,CAAWY,eAAX,CAA2B,OAA3B,CAAP;AACD;AAED;AACF;AACA;;;;WACE,yBAAyB;AACvB,aAAO,KAAKC,UAAL,CAAgBC,MAAhB,GAAyB,CAAC,CAAjC;AACD;AAED;AACF;AACA;;;;WACE,0BAAiBC,UAAjB,EAAuD;AACrD,aAAO,KAAKC,gBAAL,CAAsBC,gBAAtB,CAAuCF,UAAvC,CAAP;AACD;AAED;AACF;;;;SACE,eAAwC;AACtC,UAAMG,qBAAqB,GAAG,KAAKL,UAAnC;;AAEA,UAAIK,qBAAqB,CAACJ,MAAtB,KAAiC,CAArC,EAAwC;AACtC,eAAO,wBAAP;AACD;;AAED,aAAO,kBAAAI,qBAAqB,MAArB,CAAAA,qBAAqB,EAAK,UAACC,IAAD;AAAA,eAAUA,IAAI,CAAChB,IAAL,CAAUiB,IAApB;AAAA,OAAL,CAArB,CAAoDC,IAApD,CAAyD,GAAzD,CAAP;AACD;;;;AA1ED;AACF;AACE,6CACEC,MADF,EAEiB;AACf,UAAMC,aAAa,GAAG,IAAIC,0BAAJ,EAAtB;AACAD,MAAAA,aAAa,CAACE,GAAd,GAAoBH,MAAM,CAACI,IAA3B;AAEA,UAAMC,IAAI,GAAG,IAAI7B,aAAJ,CAAkByB,aAAlB,CAAb;AACAI,MAAAA,IAAI,CAACtB,mBAAL,GAA2BiB,MAAM,CAACjB,mBAAlC;AAEA,aAAOsB,IAAP;AACD;;;EAbwCC,qB","sourcesContent":["// @flow\nimport DetailModel from \"../detail/DetailModel\";\nimport Href from \"../href/Href\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport { CASEVIEW_LINK } from \"../../constants/LayoutHints\";\n\nimport type ChoiceAttributeOptionModel from \"../attributes/ChoiceAttributeOptionModel\";\nimport type ActionCollection from \"../actions/ActionCollection\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * List Item\n */\nexport default class ListItemModel extends DetailModel {\n /**\n */\n static createFromChoiceAttributeOption(\n option: ChoiceAttributeOptionModel\n ): ListItemModel {\n const listitemInput = new ModularUIResponse();\n listitemInput.key = option.code;\n\n const item = new ListItemModel(listitemInput);\n item.attributeCollection = option.attributeCollection;\n\n return item;\n }\n\n /**\n */\n get selfhref(): Href {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n return new Href(\"#\");\n }\n\n return selflink.href;\n }\n\n /**\n */\n get caseviewHref(): Href {\n const caseviewLinkAttribute =\n this.attributeCollection.getAttributeByLayoutHint(CASEVIEW_LINK);\n if (caseviewLinkAttribute) {\n const caseviewLinkKey = caseviewLinkAttribute.name;\n const caseviewLink = this.links.getLinkByKey(caseviewLinkKey);\n\n if (caseviewLink) {\n return caseviewLink.href;\n }\n }\n\n return this.selfhref;\n }\n\n /**\n * Getting panel links\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n * Check if list item has panel links\n */\n hasPanelLinks(): boolean {\n return this.panelLinks.length > -1;\n }\n\n /**\n * Retrieve all actions by type\n */\n getActionsByType(actionType: string): ActionCollection {\n return this.actionCollection.getActionsByType(actionType);\n }\n\n /**\n */\n get additionalDetailRoutePath(): string {\n const additionalDetailLinks = this.panelLinks;\n\n if (additionalDetailLinks.length === 0) {\n return \"__NON_EXISTING_ROUTE__\";\n }\n\n return additionalDetailLinks.map((link) => link.href.path).join(\"|\");\n }\n}\n"],"file":"ListItemModel.js"}
1
+ {"version":3,"sources":["../../../src/models/list/ListItemModel.js"],"names":["ListItemModel","selflink","links","getLinkByKey","Href","href","caseviewLinkAttribute","attributeCollection","getAttributeByLayoutHint","CASEVIEW_LINK","caseviewLinkKey","name","caseviewLink","selfhref","getLinksByGroup","panelLinks","length","actionType","actionCollection","getActionsByType","additionalDetailLinks","link","path","join","key","data","contributions","listitemInput","ModularUIResponse","option","code","item","DetailModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;;;;;AAMA;AACA;AACA;IACqBA,a;;;;;;;;;;;;;AA8BnB;AACF;AACE,mBAAqB;AACnB,UAAMC,QAAQ,GAAG,KAAKC,KAAL,CAAWC,YAAX,CAAwB,MAAxB,CAAjB;;AAEA,UAAIF,QAAQ,KAAK,IAAjB,EAAuB;AACrB,eAAO,IAAIG,aAAJ,CAAS,GAAT,CAAP;AACD;;AAED,aAAOH,QAAQ,CAACI,IAAhB;AACD;AAED;AACF;;;;SACE,eAAyB;AACvB,UAAMC,qBAAqB,GACzB,KAAKC,mBAAL,CAAyBC,wBAAzB,CAAkDC,0BAAlD,CADF;;AAEA,UAAIH,qBAAJ,EAA2B;AACzB,YAAMI,eAAe,GAAGJ,qBAAqB,CAACK,IAA9C;AACA,YAAMC,YAAY,GAAG,KAAKV,KAAL,CAAWC,YAAX,CAAwBO,eAAxB,CAArB;;AAEA,YAAIE,YAAJ,EAAkB;AAChB,iBAAOA,YAAY,CAACP,IAApB;AACD;AACF;;AAED,aAAO,KAAKQ,QAAZ;AACD;AAED;AACF;AACA;;;;SACE,eAAiC;AAC/B,aAAO,KAAKX,KAAL,CAAWY,eAAX,CAA2B,OAA3B,CAAP;AACD;AAED;AACF;AACA;;;;WACE,yBAAyB;AACvB,aAAO,KAAKC,UAAL,CAAgBC,MAAhB,GAAyB,CAAC,CAAjC;AACD;AAED;AACF;AACA;;;;WACE,0BAAiBC,UAAjB,EAAuD;AACrD,aAAO,KAAKC,gBAAL,CAAsBC,gBAAtB,CAAuCF,UAAvC,CAAP;AACD;AAED;AACF;;;;SACE,eAAwC;AACtC,UAAMG,qBAAqB,GAAG,KAAKL,UAAnC;;AAEA,UAAIK,qBAAqB,CAACJ,MAAtB,KAAiC,CAArC,EAAwC;AACtC,eAAO,wBAAP;AACD;;AAED,aAAO,kBAAAI,qBAAqB,MAArB,CAAAA,qBAAqB,EAAK,UAACC,IAAD;AAAA,eAAUA,IAAI,CAAChB,IAAL,CAAUiB,IAApB;AAAA,OAAL,CAArB,CAAoDC,IAApD,CAAyD,GAAzD,CAAP;AACD;;;;AAzFD;AACF;AACE,kCACEC,GADF,EAEEC,IAFF,EAGEC,aAHF,EAIiB;AACf,UAAMC,aAAa,GAAG,IAAIC,0BAAJ,EAAtB;AACAD,MAAAA,aAAa,CAACH,GAAd,GAAoBA,GAApB;AACAG,MAAAA,aAAa,CAACF,IAAd,GAAqBA,IAArB;AACAE,MAAAA,aAAa,CAACD,aAAd,GAA8BA,aAA9B;AAEA,aAAO,IAAI1B,aAAJ,CAAkB2B,aAAlB,CAAP;AACD;AAED;AACF;;;;WACE,yCACEE,MADF,EAEiB;AACf,UAAMF,aAAa,GAAG,IAAIC,0BAAJ,EAAtB;AACAD,MAAAA,aAAa,CAACH,GAAd,GAAoBK,MAAM,CAACC,IAA3B;AAEA,UAAMC,IAAI,GAAG,IAAI/B,aAAJ,CAAkB2B,aAAlB,CAAb;AACAI,MAAAA,IAAI,CAACxB,mBAAL,GAA2BsB,MAAM,CAACtB,mBAAlC;AAEA,aAAOwB,IAAP;AACD;;;EA5BwCC,qB","sourcesContent":["// @flow\nimport DetailModel from \"../detail/DetailModel\";\nimport Href from \"../href/Href\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport { CASEVIEW_LINK } from \"../../constants/LayoutHints\";\n\nimport type ChoiceAttributeOptionModel from \"../attributes/ChoiceAttributeOptionModel\";\nimport type ActionCollection from \"../actions/ActionCollection\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * List Item\n */\nexport default class ListItemModel extends DetailModel {\n /**\n */\n static createFromListResult(\n key: string,\n data: Object,\n contributions: Object\n ): ListItemModel {\n const listitemInput = new ModularUIResponse();\n listitemInput.key = key;\n listitemInput.data = data;\n listitemInput.contributions = contributions;\n\n return new ListItemModel(listitemInput);\n }\n\n /**\n */\n static createFromChoiceAttributeOption(\n option: ChoiceAttributeOptionModel\n ): ListItemModel {\n const listitemInput = new ModularUIResponse();\n listitemInput.key = option.code;\n\n const item = new ListItemModel(listitemInput);\n item.attributeCollection = option.attributeCollection;\n\n return item;\n }\n\n /**\n */\n get selfhref(): Href {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n return new Href(\"#\");\n }\n\n return selflink.href;\n }\n\n /**\n */\n get caseviewHref(): Href {\n const caseviewLinkAttribute =\n this.attributeCollection.getAttributeByLayoutHint(CASEVIEW_LINK);\n if (caseviewLinkAttribute) {\n const caseviewLinkKey = caseviewLinkAttribute.name;\n const caseviewLink = this.links.getLinkByKey(caseviewLinkKey);\n\n if (caseviewLink) {\n return caseviewLink.href;\n }\n }\n\n return this.selfhref;\n }\n\n /**\n * Getting panel links\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n * Check if list item has panel links\n */\n hasPanelLinks(): boolean {\n return this.panelLinks.length > -1;\n }\n\n /**\n * Retrieve all actions by type\n */\n getActionsByType(actionType: string): ActionCollection {\n return this.actionCollection.getActionsByType(actionType);\n }\n\n /**\n */\n get additionalDetailRoutePath(): string {\n const additionalDetailLinks = this.panelLinks;\n\n if (additionalDetailLinks.length === 0) {\n return \"__NON_EXISTING_ROUTE__\";\n }\n\n return additionalDetailLinks.map((link) => link.href.path).join(\"|\");\n }\n}\n"],"file":"ListItemModel.js"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
4
 
5
- var _Object$keys4 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
5
+ var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
6
6
 
7
7
  var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
8
8
 
@@ -25,16 +25,14 @@ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable
25
25
 
26
26
  var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
27
27
 
28
- var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
29
-
30
28
  var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
31
29
 
30
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
31
+
32
32
  var _endsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/ends-with"));
33
33
 
34
34
  var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
35
35
 
36
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
37
-
38
36
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
39
37
 
40
38
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
@@ -49,8 +47,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
49
47
 
50
48
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
51
49
 
52
- var _exceptions = require("../../exceptions");
53
-
54
50
  var _ModularUIResponse = _interopRequireDefault(require("../../modularui/ModularUIResponse"));
55
51
 
56
52
  var _ListItemCollection = _interopRequireDefault(require("../list/ListItemCollection"));
@@ -77,9 +73,9 @@ var _SortingModel = _interopRequireDefault(require("../sorting/SortingModel"));
77
73
 
78
74
  var _LayoutHints = require("../../constants/LayoutHints");
79
75
 
80
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys4(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
76
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
81
77
 
82
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
78
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
83
79
 
84
80
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
85
81
 
@@ -188,57 +184,6 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
188
184
 
189
185
  return "";
190
186
  }
191
- /**
192
- * Create a listitem collection from the data and contributions of a list
193
- */
194
-
195
- }, {
196
- key: "createListItemCollection",
197
- value: function createListItemCollection() {
198
- var _this2 = this;
199
-
200
- var listitemCollection = new _ListItemCollection.default();
201
-
202
- var _embedded = this.getData("_embedded");
203
-
204
- if (_embedded !== null) {
205
- var _context3;
206
-
207
- if (Array.isArray(_embedded)) {
208
- throw new _exceptions.ConfigurationException("One record panel with multiple tables is not supported, place all types in one panel for the panel with key ".concat(this.key));
209
- }
210
-
211
- listitemCollection.collection = (0, _map.default)(_context3 = _embedded.results).call(_context3, function (result) {
212
- return _this2.createListItem(result);
213
- });
214
- }
215
-
216
- return listitemCollection;
217
- }
218
- /**
219
- * Create a ListItem
220
- */
221
-
222
- }, {
223
- key: "createListItem",
224
- value: function createListItem(resultItem) {
225
- var _Object$keys = (0, _keys.default)(resultItem),
226
- _Object$keys2 = (0, _slicedToArray2.default)(_Object$keys, 1),
227
- key = _Object$keys2[0];
228
-
229
- var listitemData = resultItem[key];
230
- var listitemContributions = this.contributions.results[key];
231
-
232
- if (this.data.dynamicschema) {
233
- listitemData.dynamicschema = this.data.dynamicschema;
234
- }
235
-
236
- var listitemModelInput = new _ModularUIResponse.default();
237
- listitemModelInput.key = key;
238
- listitemModelInput.data = listitemData;
239
- listitemModelInput.contributions = listitemContributions;
240
- return new _ListItemModel.default(listitemModelInput);
241
- }
242
187
  /**
243
188
  * Getting the results
244
189
  */
@@ -247,7 +192,7 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
247
192
  key: "listItemCollection",
248
193
  get: function get() {
249
194
  if (!this._listItemCollection) {
250
- this._listItemCollection = this.createListItemCollection();
195
+ this._listItemCollection = _ListItemCollection.default.createFromList(this);
251
196
  }
252
197
 
253
198
  return this._listItemCollection;
@@ -274,10 +219,10 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
274
219
  ,
275
220
  set: function set(detail) {
276
221
  if (detail instanceof _ListDetailModel.default) {
277
- var _context4;
222
+ var _context3;
278
223
 
279
224
  var listitemHref = detail.selfhref;
280
- var listitem = (0, _find.default)(_context4 = this.listItemCollection).call(_context4, function (listItem) {
225
+ var listitem = (0, _find.default)(_context3 = this.listItemCollection).call(_context3, function (listItem) {
281
226
  return listItem.selfhref.equals(listitemHref);
282
227
  });
283
228
 
@@ -345,10 +290,10 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
345
290
  }, {
346
291
  key: "getListItemById",
347
292
  value: function getListItemById(id) {
348
- var _context5;
293
+ var _context4;
349
294
 
350
295
  var decodedId = decodeURIComponent(id.toString());
351
- return (0, _find.default)(_context5 = this.listItemCollection).call(_context5, function (result) {
296
+ return (0, _find.default)(_context4 = this.listItemCollection).call(_context4, function (result) {
352
297
  return result.id.toString() === decodedId;
353
298
  });
354
299
  }
@@ -359,9 +304,9 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
359
304
  }, {
360
305
  key: "getListItemByHref",
361
306
  value: function getListItemByHref(href) {
362
- var _context6;
307
+ var _context5;
363
308
 
364
- return (0, _find.default)(_context6 = this.listItemCollection).call(_context6, function (result) {
309
+ return (0, _find.default)(_context5 = this.listItemCollection).call(_context5, function (result) {
365
310
  return result.selfhref.equals(href);
366
311
  });
367
312
  }
@@ -527,7 +472,7 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
527
472
  }, {
528
473
  key: "setHeaders",
529
474
  value: function setHeaders() {
530
- var _this3 = this;
475
+ var _this2 = this;
531
476
 
532
477
  var tempHeaders = [];
533
478
 
@@ -535,7 +480,7 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
535
480
  var results = this.contributions.results;
536
481
  (0, _keys.default)(results).forEach(function (key) {
537
482
  results[key].attributes.forEach(function (attribute) {
538
- var listHeader = new _ListHeaderModel.default(attribute, _this3.sorting);
483
+ var listHeader = new _ListHeaderModel.default(attribute, _this2.sorting);
539
484
  var exists = tempHeaders.some(function (tempHeader) {
540
485
  return tempHeader.equals(listHeader);
541
486
  });
@@ -581,9 +526,9 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
581
526
  }], [{
582
527
  key: "isApplicableModel",
583
528
  value: function isApplicableModel(data) {
584
- var _context7, _context8, _context9;
529
+ var _context6, _context7, _context8;
585
530
 
586
- return data.contributions.resourcetype && ((0, _endsWith.default)(_context7 = data.contributions.resourcetype).call(_context7, "List") || (0, _endsWith.default)(_context8 = data.contributions.resourcetype).call(_context8, "ListPanel") || (0, _includes.default)(_context9 = ["DatastoreRelatedDatastorePanel", "list-related-cases", "CaseRelatedDataStorePanel", "RecordPanel", "EventHistoryPanel", "NotePanel", "AppointmentPanel", "DocumentPanel", "AssignmentPanel"]).call(_context9, data.contributions.resourcetype));
531
+ return data.contributions.resourcetype && ((0, _endsWith.default)(_context6 = data.contributions.resourcetype).call(_context6, "List") || (0, _endsWith.default)(_context7 = data.contributions.resourcetype).call(_context7, "ListPanel") || (0, _includes.default)(_context8 = ["DatastoreRelatedDatastorePanel", "list-related-cases", "CaseRelatedDataStorePanel", "RecordPanel", "EventHistoryPanel", "NotePanel", "AppointmentPanel", "DocumentPanel", "AssignmentPanel"]).call(_context8, data.contributions.resourcetype));
587
532
  }
588
533
  }]);
589
534
  return ListModel;
@@ -1,6 +1,4 @@
1
1
  // @flow
2
- import { ConfigurationException } from "../../exceptions";
3
-
4
2
  import ModularUIResponse from "../../modularui/ModularUIResponse";
5
3
 
6
4
  import ListItemCollection from "../list/ListItemCollection";
@@ -113,54 +111,12 @@ export default class ListModel extends ResourceModel {
113
111
  return "";
114
112
  }
115
113
 
116
- /**
117
- * Create a listitem collection from the data and contributions of a list
118
- */
119
- createListItemCollection(): ListItemCollection {
120
- const listitemCollection = new ListItemCollection();
121
-
122
- const _embedded = this.getData("_embedded");
123
- if (_embedded !== null) {
124
- if (Array.isArray(_embedded)) {
125
- throw new ConfigurationException(
126
- `One record panel with multiple tables is not supported, place all types in one panel for the panel with key ${this.key}`
127
- );
128
- }
129
-
130
- listitemCollection.collection = _embedded.results.map((result) =>
131
- this.createListItem(result)
132
- );
133
- }
134
-
135
- return listitemCollection;
136
- }
137
-
138
- /**
139
- * Create a ListItem
140
- */
141
- createListItem(resultItem: Object): ListItemModel {
142
- const [key] = Object.keys(resultItem);
143
- const listitemData = resultItem[key];
144
- const listitemContributions = this.contributions.results[key];
145
-
146
- if (this.data.dynamicschema) {
147
- listitemData.dynamicschema = this.data.dynamicschema;
148
- }
149
-
150
- const listitemModelInput = new ModularUIResponse();
151
- listitemModelInput.key = key;
152
- listitemModelInput.data = listitemData;
153
- listitemModelInput.contributions = listitemContributions;
154
-
155
- return new ListItemModel(listitemModelInput);
156
- }
157
-
158
114
  /**
159
115
  * Getting the results
160
116
  */
161
117
  get listItemCollection(): ListItemCollection {
162
118
  if (!this._listItemCollection) {
163
- this._listItemCollection = this.createListItemCollection();
119
+ this._listItemCollection = ListItemCollection.createFromList(this);
164
120
  }
165
121
 
166
122
  return this._listItemCollection;