@mikezimm/fps-library-v2 1.0.38 → 1.0.39

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 (331) hide show
  1. package/CHANGELOG.md +21 -3
  2. package/lib/banner/FPSWebPartClass/FPSBaseClass.d.ts +1 -1
  3. package/lib/banner/FPSWebPartClass/FPSBaseClass.d.ts.map +1 -1
  4. package/lib/banner/FPSWebPartClass/IThisFPSWebPartClass.d.ts +1 -1
  5. package/lib/banner/FPSWebPartClass/IThisFPSWebPartClass.d.ts.map +1 -1
  6. package/lib/banner/FPSWebPartClass/runSuperOnInit.d.ts +1 -1
  7. package/lib/banner/FPSWebPartClass/runSuperOnInit.d.ts.map +1 -1
  8. package/lib/banner/FPSWebPartClass/runSuperOnInit.js +1 -1
  9. package/lib/banner/FPSWebPartClass/runSuperOnInit.js.map +1 -1
  10. package/lib/banner/bannerX/FetchBannerX.js +1 -1
  11. package/lib/banner/bannerX/FetchBannerX.js.map +1 -1
  12. package/lib/banner/components/EasyPages/epTypes.d.ts.map +1 -1
  13. package/lib/banner/components/EasyPages/epTypes.js +1 -0
  14. package/lib/banner/components/EasyPages/epTypes.js.map +1 -1
  15. package/lib/banner/features/Expando/ExpandoPropGroup.d.ts.map +1 -1
  16. package/lib/banner/features/Expando/ExpandoPropGroup.js +2 -2
  17. package/lib/banner/features/Expando/ExpandoPropGroup.js.map +1 -1
  18. package/lib/banner/features/ImportExport/ImportFunctions.js +1 -1
  19. package/lib/banner/features/ImportExport/ImportFunctions.js.map +1 -1
  20. package/lib/banner/features/PageStyle/bannerThemes.d.ts +1 -1
  21. package/lib/banner/features/PageStyle/bannerThemes.d.ts.map +1 -1
  22. package/lib/banner/mainReact/IWebpartBannerProps.d.ts +2 -2
  23. package/lib/banner/mainReact/IWebpartBannerProps.d.ts.map +1 -1
  24. package/lib/common/PropPaneHelp/{pages/PropPaneHelp.d.ts → PropPaneHelp.d.ts} +1 -1
  25. package/lib/common/PropPaneHelp/PropPaneHelp.d.ts.map +1 -0
  26. package/lib/common/PropPaneHelp/{pages/PropPaneHelp.js → PropPaneHelp.js} +8 -8
  27. package/lib/common/PropPaneHelp/PropPaneHelp.js.map +1 -0
  28. package/lib/common/PropPaneHelp/atoms/InternalNames.d.ts +3 -0
  29. package/lib/common/PropPaneHelp/atoms/InternalNames.d.ts.map +1 -0
  30. package/lib/common/PropPaneHelp/atoms/InternalNames.js +3 -0
  31. package/lib/common/PropPaneHelp/atoms/InternalNames.js.map +1 -0
  32. package/lib/common/PropPaneHelp/atoms/JSONEdit.d.ts +2 -0
  33. package/lib/common/PropPaneHelp/atoms/JSONEdit.d.ts.map +1 -0
  34. package/lib/common/PropPaneHelp/atoms/JSONEdit.js +7 -0
  35. package/lib/common/PropPaneHelp/atoms/JSONEdit.js.map +1 -0
  36. package/lib/common/PropPaneHelp/atoms/SeeWiki.d.ts +4 -0
  37. package/lib/common/PropPaneHelp/atoms/SeeWiki.d.ts.map +1 -0
  38. package/lib/common/PropPaneHelp/atoms/SeeWiki.js +8 -0
  39. package/lib/common/PropPaneHelp/atoms/SeeWiki.js.map +1 -0
  40. package/lib/common/PropPaneHelp/atoms/ValidLanguages.d.ts +2 -0
  41. package/lib/common/PropPaneHelp/atoms/ValidLanguages.d.ts.map +1 -0
  42. package/lib/{banner/propPane/ReusableLinks.js → common/PropPaneHelp/atoms/ValidLanguages.js} +1 -6
  43. package/lib/common/PropPaneHelp/atoms/ValidLanguages.js.map +1 -0
  44. package/lib/common/PropPaneHelp/{pages → atoms}/Warnings.d.ts +0 -0
  45. package/lib/common/PropPaneHelp/{pages → atoms}/Warnings.d.ts.map +1 -1
  46. package/lib/common/PropPaneHelp/{pages → atoms}/Warnings.js +0 -0
  47. package/lib/common/PropPaneHelp/{pages → atoms}/Warnings.js.map +1 -1
  48. package/lib/common/PropPaneHelp/pages/Drilldown.d.ts +4 -0
  49. package/lib/common/PropPaneHelp/pages/Drilldown.d.ts.map +1 -0
  50. package/lib/common/PropPaneHelp/pages/Drilldown.js +22 -0
  51. package/lib/common/PropPaneHelp/pages/Drilldown.js.map +1 -0
  52. package/lib/common/PropPaneHelp/pages/ListView.d.ts +4 -0
  53. package/lib/common/PropPaneHelp/pages/ListView.d.ts.map +1 -0
  54. package/lib/common/PropPaneHelp/pages/ListView.js +22 -0
  55. package/lib/common/PropPaneHelp/pages/ListView.js.map +1 -0
  56. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy 2.d.ts +4 -0
  57. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy 2.d.ts.map +1 -0
  58. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy 2.js +18 -0
  59. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy 2.js.map +1 -0
  60. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy.d.ts +4 -0
  61. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy.d.ts.map +1 -0
  62. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy.js +18 -0
  63. package/lib/common/PropPaneHelp/pages/ReactListViewCommands copy.js.map +1 -0
  64. package/lib/common/PropPaneHelp/pages/Refiners.d.ts +4 -0
  65. package/lib/common/PropPaneHelp/pages/Refiners.d.ts.map +1 -0
  66. package/lib/common/PropPaneHelp/pages/Refiners.js +18 -0
  67. package/lib/common/PropPaneHelp/pages/Refiners.js.map +1 -0
  68. package/lib/common/PropPaneHelp/pages/listview/Commands.d.ts +4 -0
  69. package/lib/common/PropPaneHelp/pages/listview/Commands.d.ts.map +1 -0
  70. package/lib/common/PropPaneHelp/pages/listview/Commands.js +198 -0
  71. package/lib/common/PropPaneHelp/pages/listview/Commands.js.map +1 -0
  72. package/lib/common/PropPaneHelp/pages/listview/ListPerformance.d.ts +3 -0
  73. package/lib/common/PropPaneHelp/pages/listview/ListPerformance.d.ts.map +1 -0
  74. package/lib/common/PropPaneHelp/pages/listview/ListPerformance.js +55 -0
  75. package/lib/common/PropPaneHelp/pages/listview/ListPerformance.js.map +1 -0
  76. package/lib/common/PropPaneHelp/pages/listview/RefinerColumns.d.ts +3 -0
  77. package/lib/common/PropPaneHelp/pages/listview/RefinerColumns.d.ts.map +1 -0
  78. package/lib/common/PropPaneHelp/pages/listview/RefinerColumns.js +45 -0
  79. package/lib/common/PropPaneHelp/pages/listview/RefinerColumns.js.map +1 -0
  80. package/lib/common/PropPaneHelp/pages/listview/RefinerRules.d.ts +3 -0
  81. package/lib/common/PropPaneHelp/pages/listview/RefinerRules.d.ts.map +1 -0
  82. package/lib/common/PropPaneHelp/pages/listview/RefinerRules.js +46 -0
  83. package/lib/common/PropPaneHelp/pages/listview/RefinerRules.js.map +1 -0
  84. package/lib/common/PropPaneHelp/pages/listview/Stats.d.ts +4 -0
  85. package/lib/common/PropPaneHelp/pages/listview/Stats.d.ts.map +1 -0
  86. package/lib/common/PropPaneHelp/pages/listview/Stats.js +55 -0
  87. package/lib/common/PropPaneHelp/pages/listview/Stats.js.map +1 -0
  88. package/lib/common/PropPaneHelp/pages/listview/StringFunctions.d.ts +3 -0
  89. package/lib/common/PropPaneHelp/pages/listview/StringFunctions.d.ts.map +1 -0
  90. package/lib/common/PropPaneHelp/pages/listview/StringFunctions.js +53 -0
  91. package/lib/common/PropPaneHelp/pages/listview/StringFunctions.js.map +1 -0
  92. package/lib/common/PropPaneHelp/pages/listview/Users.d.ts +3 -0
  93. package/lib/common/PropPaneHelp/pages/listview/Users.d.ts.map +1 -0
  94. package/lib/common/PropPaneHelp/pages/listview/Users.js +51 -0
  95. package/lib/common/PropPaneHelp/pages/listview/Users.js.map +1 -0
  96. package/lib/common/PropPaneHelp/pages/listview/Views.d.ts +4 -0
  97. package/lib/common/PropPaneHelp/pages/listview/Views.d.ts.map +1 -0
  98. package/lib/common/PropPaneHelp/pages/listview/Views.js +155 -0
  99. package/lib/common/PropPaneHelp/pages/listview/Views.js.map +1 -0
  100. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCharts.d.ts +2 -0
  101. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCharts.d.ts.map +1 -0
  102. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCharts.js +12 -0
  103. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCharts.js.map +1 -0
  104. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCommands.d.ts +3 -0
  105. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCommands.d.ts.map +1 -0
  106. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCommands.js +35 -0
  107. package/lib/common/PropPaneHelp/pages/listview/samples/SampleCommands.js.map +1 -0
  108. package/lib/common/PropPaneHelp/pages/{Banner.d.ts → standard/Banner.d.ts} +0 -0
  109. package/lib/common/PropPaneHelp/pages/standard/Banner.d.ts.map +1 -0
  110. package/lib/common/PropPaneHelp/pages/{Banner.js → standard/Banner.js} +1 -2
  111. package/lib/common/PropPaneHelp/pages/standard/Banner.js.map +1 -0
  112. package/lib/common/PropPaneHelp/pages/{FPSBasic.d.ts → standard/FPSBasic.d.ts} +0 -0
  113. package/lib/common/PropPaneHelp/pages/standard/FPSBasic.d.ts.map +1 -0
  114. package/lib/common/PropPaneHelp/pages/{FPSBasic.js → standard/FPSBasic.js} +1 -2
  115. package/lib/common/PropPaneHelp/pages/standard/FPSBasic.js.map +1 -0
  116. package/lib/common/PropPaneHelp/pages/{FPSExpand.d.ts → standard/FPSExpand.d.ts} +0 -0
  117. package/lib/common/PropPaneHelp/pages/standard/FPSExpand.d.ts.map +1 -0
  118. package/lib/common/PropPaneHelp/pages/{FPSExpand.js → standard/FPSExpand.js} +1 -2
  119. package/lib/common/PropPaneHelp/pages/standard/FPSExpand.js.map +1 -0
  120. package/lib/common/PropPaneHelp/pages/{Import.d.ts → standard/Import.d.ts} +0 -0
  121. package/lib/common/PropPaneHelp/pages/standard/Import.d.ts.map +1 -0
  122. package/lib/common/PropPaneHelp/pages/{Import.js → standard/Import.js} +1 -2
  123. package/lib/common/PropPaneHelp/pages/standard/Import.js.map +1 -0
  124. package/lib/common/PropPaneHelp/pages/{PinMe.d.ts → standard/PinMe.d.ts} +0 -0
  125. package/lib/common/PropPaneHelp/pages/standard/PinMe.d.ts.map +1 -0
  126. package/lib/common/PropPaneHelp/pages/{PinMe.js → standard/PinMe.js} +0 -1
  127. package/lib/common/PropPaneHelp/pages/standard/PinMe.js.map +1 -0
  128. package/lib/common/PropPaneHelp/pages/{SinglePageApp.d.ts → standard/SinglePageApp.d.ts} +0 -0
  129. package/lib/common/PropPaneHelp/pages/standard/SinglePageApp.d.ts.map +1 -0
  130. package/lib/common/PropPaneHelp/pages/{SinglePageApp.js → standard/SinglePageApp.js} +0 -1
  131. package/lib/common/PropPaneHelp/pages/standard/SinglePageApp.js.map +1 -0
  132. package/lib/common/PropPaneHelp/pages/{Visitor.d.ts → standard/Visitor.d.ts} +0 -0
  133. package/lib/common/PropPaneHelp/pages/standard/Visitor.d.ts.map +1 -0
  134. package/lib/common/PropPaneHelp/pages/{Visitor.js → standard/Visitor.js} +0 -1
  135. package/lib/common/PropPaneHelp/pages/standard/Visitor.js.map +1 -0
  136. package/lib/common/PropPaneHelp/pages/zTemplate.js +3 -5
  137. package/lib/common/PropPaneHelp/pages/zTemplate.js.map +1 -1
  138. package/lib/common/PropPaneHelp/{ApplyPresets.d.ts → preconfig/ApplyPresets.d.ts} +0 -0
  139. package/lib/common/PropPaneHelp/preconfig/ApplyPresets.d.ts.map +1 -0
  140. package/lib/common/PropPaneHelp/{ApplyPresets.js → preconfig/ApplyPresets.js} +0 -0
  141. package/lib/common/PropPaneHelp/preconfig/ApplyPresets.js.map +1 -0
  142. package/lib/common/PropPaneHelp/{IPreConfig.d.ts → preconfig/IPreConfig.d.ts} +0 -0
  143. package/lib/common/PropPaneHelp/preconfig/IPreConfig.d.ts.map +1 -0
  144. package/lib/common/PropPaneHelp/{IPreConfig.js → preconfig/IPreConfig.js} +0 -0
  145. package/lib/common/PropPaneHelp/preconfig/IPreConfig.js.map +1 -0
  146. package/lib/common/PropPaneHelp/{PreConfiguredConstants.d.ts → preconfig/PreConfiguredConstants.d.ts} +0 -0
  147. package/lib/common/PropPaneHelp/preconfig/PreConfiguredConstants.d.ts.map +1 -0
  148. package/lib/common/PropPaneHelp/{PreConfiguredConstants.js → preconfig/PreConfiguredConstants.js} +2 -2
  149. package/lib/common/PropPaneHelp/preconfig/PreConfiguredConstants.js.map +1 -0
  150. package/lib/common/PropPaneHelp/{pages → preconfig}/SitePresetsInfo.d.ts +1 -1
  151. package/lib/common/PropPaneHelp/preconfig/SitePresetsInfo.d.ts.map +1 -0
  152. package/lib/common/PropPaneHelp/{pages → preconfig}/SitePresetsInfo.js +0 -0
  153. package/lib/common/PropPaneHelp/preconfig/SitePresetsInfo.js.map +1 -0
  154. package/lib/common/PropPaneHelp/{getThisSitesPreConfigProps.d.ts → preconfig/getThisSitesPreConfigProps.d.ts} +0 -0
  155. package/lib/common/PropPaneHelp/preconfig/getThisSitesPreConfigProps.d.ts.map +1 -0
  156. package/lib/common/PropPaneHelp/{getThisSitesPreConfigProps.js → preconfig/getThisSitesPreConfigProps.js} +0 -0
  157. package/lib/common/PropPaneHelp/preconfig/getThisSitesPreConfigProps.js.map +1 -0
  158. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/FieldTypes.d.ts +41 -0
  159. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/FieldTypes.d.ts.map +1 -0
  160. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/FieldTypes.js +42 -0
  161. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/FieldTypes.js.map +1 -0
  162. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/IFieldInfo.d.ts +39 -0
  163. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/IFieldInfo.d.ts.map +1 -0
  164. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/IFieldInfo.js +6 -0
  165. package/lib/common/interfaces/openSource/pnpsp/@2.14.0/IFieldInfo.js.map +1 -0
  166. package/lib/components/atoms/Elements/confirmDialog.d.ts +11 -0
  167. package/lib/components/atoms/Elements/confirmDialog.d.ts.map +1 -0
  168. package/lib/components/atoms/Elements/confirmDialog.js +34 -0
  169. package/lib/components/atoms/Elements/confirmDialog.js.map +1 -0
  170. package/lib/components/atoms/Elements/confirmDialogBig.d.ts +14 -0
  171. package/lib/components/atoms/Elements/confirmDialogBig.d.ts.map +1 -0
  172. package/lib/components/atoms/Elements/confirmDialogBig.js +30 -0
  173. package/lib/components/atoms/Elements/confirmDialogBig.js.map +1 -0
  174. package/lib/components/atoms/Elements/dialogBox.d.ts +0 -22
  175. package/lib/components/atoms/Elements/dialogBox.d.ts.map +1 -1
  176. package/lib/components/atoms/Elements/dialogBox.js +0 -56
  177. package/lib/components/atoms/Elements/dialogBox.js.map +1 -1
  178. package/lib/components/atoms/Elements/putObjectIntoJSON.d.ts +3 -0
  179. package/lib/components/atoms/Elements/putObjectIntoJSON.d.ts.map +1 -0
  180. package/lib/components/atoms/Elements/putObjectIntoJSON.js +7 -0
  181. package/lib/components/atoms/Elements/putObjectIntoJSON.js.map +1 -0
  182. package/lib/components/atoms/Links/InternalNames.d.ts +3 -0
  183. package/lib/components/atoms/Links/InternalNames.d.ts.map +1 -0
  184. package/lib/components/atoms/Links/InternalNames.js +2 -0
  185. package/lib/components/atoms/Links/InternalNames.js.map +1 -0
  186. package/lib/components/interfaces/Drilldown/IDrillItem.d.ts +35 -0
  187. package/lib/components/interfaces/Drilldown/IDrillItem.d.ts.map +1 -0
  188. package/lib/components/interfaces/Drilldown/IDrillItem.js +12 -0
  189. package/lib/components/interfaces/Drilldown/IDrillItem.js.map +1 -0
  190. package/lib/components/interfaces/Views/IListViews.d.ts +29 -0
  191. package/lib/components/interfaces/Views/IListViews.d.ts.map +1 -0
  192. package/lib/components/interfaces/Views/IListViews.js +3 -0
  193. package/lib/components/interfaces/Views/IListViews.js.map +1 -0
  194. package/lib/components/molecules/FieldPanel/components/IFieldPanelHookProps.d.ts +1 -1
  195. package/lib/components/molecules/FieldPanel/components/IFieldPanelHookProps.d.ts.map +1 -1
  196. package/lib/components/molecules/FieldPanel/components/IFieldPanelHookProps.js +1 -0
  197. package/lib/components/molecules/FieldPanel/components/IFieldPanelHookProps.js.map +1 -1
  198. package/lib/components/molecules/ReactListV1/atoms/detailsList.d.ts +2 -0
  199. package/lib/components/molecules/ReactListV1/atoms/detailsList.d.ts.map +1 -0
  200. package/lib/components/molecules/ReactListV1/atoms/detailsList.js +78 -0
  201. package/lib/components/molecules/ReactListV1/atoms/detailsList.js.map +1 -0
  202. package/lib/components/molecules/ReactListV1/atoms/noCommandsInfo.d.ts +3 -0
  203. package/lib/components/molecules/ReactListV1/atoms/noCommandsInfo.d.ts.map +1 -0
  204. package/lib/components/molecules/ReactListV1/atoms/noCommandsInfo.js +14 -0
  205. package/lib/components/molecules/ReactListV1/atoms/noCommandsInfo.js.map +1 -0
  206. package/lib/components/molecules/ReactListV1/atoms/toggleFieldBuilder.d.ts +24 -0
  207. package/lib/components/molecules/ReactListV1/atoms/toggleFieldBuilder.d.ts.map +1 -0
  208. package/lib/components/molecules/ReactListV1/atoms/toggleFieldBuilder.js +31 -0
  209. package/lib/components/molecules/ReactListV1/atoms/toggleFieldBuilder.js.map +1 -0
  210. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.d.ts +36 -0
  211. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.d.ts.map +1 -0
  212. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.js +2 -0
  213. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.js.map +1 -0
  214. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.d.ts +27 -0
  215. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.d.ts.map +1 -0
  216. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.js +2 -0
  217. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.js.map +1 -0
  218. package/lib/components/molecules/ReactListV1/component/reactListView.d.ts +137 -0
  219. package/lib/components/molecules/ReactListV1/component/reactListView.d.ts.map +1 -0
  220. package/lib/components/molecules/ReactListV1/component/reactListView.js +846 -0
  221. package/lib/components/molecules/ReactListV1/component/reactListView.js.map +1 -0
  222. package/lib/components/molecules/ReactListV1/functions/getView.d.ts +7 -0
  223. package/lib/components/molecules/ReactListV1/functions/getView.d.ts.map +1 -0
  224. package/lib/components/molecules/ReactListV1/functions/getView.js +115 -0
  225. package/lib/components/molecules/ReactListV1/functions/getView.js.map +1 -0
  226. package/lib/components/molecules/ReactListV1/functions/richHeight.d.ts +2 -0
  227. package/lib/components/molecules/ReactListV1/functions/richHeight.d.ts.map +1 -0
  228. package/lib/components/molecules/ReactListV1/functions/richHeight.js +14 -0
  229. package/lib/components/molecules/ReactListV1/functions/richHeight.js.map +1 -0
  230. package/lib/components/molecules/ReactListV1/functions/updateReactListItem.d.ts +8 -0
  231. package/lib/components/molecules/ReactListV1/functions/updateReactListItem.d.ts.map +1 -0
  232. package/lib/components/molecules/ReactListV1/functions/updateReactListItem.js +245 -0
  233. package/lib/components/molecules/ReactListV1/functions/updateReactListItem.js.map +1 -0
  234. package/lib/components/molecules/ReactListV1/interfaces/IViewFieldDD.d.ts +8 -0
  235. package/lib/components/molecules/ReactListV1/interfaces/IViewFieldDD.d.ts.map +1 -0
  236. package/lib/components/molecules/ReactListV1/interfaces/IViewFieldDD.js +3 -0
  237. package/lib/components/molecules/ReactListV1/interfaces/IViewFieldDD.js.map +1 -0
  238. package/lib/logic/Strings/drillParse/constants.d.ts +2 -0
  239. package/lib/logic/Strings/drillParse/constants.d.ts.map +1 -0
  240. package/lib/logic/Strings/drillParse/constants.js +2 -0
  241. package/lib/logic/Strings/drillParse/constants.js.map +1 -0
  242. package/lib/logic/Strings/drillParse/convertUTCTime.d.ts +3 -0
  243. package/lib/logic/Strings/drillParse/convertUTCTime.d.ts.map +1 -0
  244. package/lib/logic/Strings/drillParse/convertUTCTime.js +70 -0
  245. package/lib/logic/Strings/drillParse/convertUTCTime.js.map +1 -0
  246. package/lib/logic/Strings/drillParse/createItemFunctionProp.d.ts +23 -0
  247. package/lib/logic/Strings/drillParse/createItemFunctionProp.d.ts.map +1 -0
  248. package/lib/logic/Strings/drillParse/createItemFunctionProp.js +280 -0
  249. package/lib/logic/Strings/drillParse/createItemFunctionProp.js.map +1 -0
  250. package/lib/logic/Strings/drillParse/getWords.d.ts +46 -0
  251. package/lib/logic/Strings/drillParse/getWords.d.ts.map +1 -0
  252. package/lib/logic/Strings/drillParse/getWords.js +106 -0
  253. package/lib/logic/Strings/drillParse/getWords.js.map +1 -0
  254. package/lib/logic/Strings/drillParse/trimAfter.d.ts +17 -0
  255. package/lib/logic/Strings/drillParse/trimAfter.d.ts.map +1 -0
  256. package/lib/logic/Strings/drillParse/trimAfter.js +54 -0
  257. package/lib/logic/Strings/drillParse/trimAfter.js.map +1 -0
  258. package/lib/logic/Strings/drillParse/trimB4.d.ts +19 -0
  259. package/lib/logic/Strings/drillParse/trimB4.d.ts.map +1 -0
  260. package/lib/logic/Strings/drillParse/trimB4.js +55 -0
  261. package/lib/logic/Strings/drillParse/trimB4.js.map +1 -0
  262. package/lib/logic/Strings/{handleBars.d.ts → handleBarsContext.d.ts} +1 -1
  263. package/lib/logic/Strings/handleBarsContext.d.ts.map +1 -0
  264. package/lib/logic/Strings/{handleBars.js → handleBarsContext.js} +1 -1
  265. package/lib/logic/Strings/handleBarsContext.js.map +1 -0
  266. package/lib/logic/Strings/handleBarsSub.d.ts +3 -0
  267. package/lib/logic/Strings/handleBarsSub.d.ts.map +1 -0
  268. package/lib/logic/Strings/handleBarsSub.js +29 -0
  269. package/lib/logic/Strings/handleBarsSub.js.map +1 -0
  270. package/lib/logic/indexes/DOMSearch.d.ts +1 -1
  271. package/lib/logic/indexes/DOMSearch.d.ts.map +1 -1
  272. package/lib/logic/indexes/DOMSearch.js +2 -1
  273. package/lib/logic/indexes/DOMSearch.js.map +1 -1
  274. package/lib/logic/indexes/StringsIndex.d.ts +1 -1
  275. package/lib/logic/indexes/StringsIndex.d.ts.map +1 -1
  276. package/lib/logic/indexes/StringsIndex.js +1 -1
  277. package/lib/logic/indexes/StringsIndex.js.map +1 -1
  278. package/lib/pnpjs/Lists/getVX/IGetInterfaceV2.d.ts +6 -4
  279. package/lib/pnpjs/Lists/getVX/IGetInterfaceV2.d.ts.map +1 -1
  280. package/lib/pnpjs/Lists/getVX/IGetInterfaceV2.js +4 -3
  281. package/lib/pnpjs/Lists/getVX/IGetInterfaceV2.js.map +1 -1
  282. package/lib/pnpjs/Lists/getVX/getFuncV2.d.ts +2 -0
  283. package/lib/pnpjs/Lists/getVX/getFuncV2.d.ts.map +1 -1
  284. package/lib/pnpjs/Lists/getVX/getFuncV2.js +2 -0
  285. package/lib/pnpjs/Lists/getVX/getFuncV2.js.map +1 -1
  286. package/lib/pnpjs/Lists/getVX/getKeysLike.d.ts +3 -0
  287. package/lib/pnpjs/Lists/getVX/getKeysLike.d.ts.map +1 -1
  288. package/lib/pnpjs/Lists/getVX/getKeysLike.js +3 -0
  289. package/lib/pnpjs/Lists/getVX/getKeysLike.js.map +1 -1
  290. package/lib/pnpjs/Lists/getVX/getLinkV2.d.ts +3 -0
  291. package/lib/pnpjs/Lists/getVX/getLinkV2.d.ts.map +1 -1
  292. package/lib/pnpjs/Lists/getVX/getLinkV2.js +3 -0
  293. package/lib/pnpjs/Lists/getVX/getLinkV2.js.map +1 -1
  294. package/lib/pnpjs/Lists/getVX/getSelectV2.d.ts +3 -0
  295. package/lib/pnpjs/Lists/getVX/getSelectV2.d.ts.map +1 -1
  296. package/lib/pnpjs/Lists/getVX/getSelectV2.js +3 -0
  297. package/lib/pnpjs/Lists/getVX/getSelectV2.js.map +1 -1
  298. package/lib/pnpjs/SourceItems/Interface.d.ts +1 -0
  299. package/lib/pnpjs/SourceItems/Interface.d.ts.map +1 -1
  300. package/package.json +3 -2
  301. package/lib/banner/propPane/ReusableLinks.d.ts +0 -3
  302. package/lib/banner/propPane/ReusableLinks.d.ts.map +0 -1
  303. package/lib/banner/propPane/ReusableLinks.js.map +0 -1
  304. package/lib/common/PropPaneHelp/ApplyPresets.d.ts.map +0 -1
  305. package/lib/common/PropPaneHelp/ApplyPresets.js.map +0 -1
  306. package/lib/common/PropPaneHelp/IPreConfig.d.ts.map +0 -1
  307. package/lib/common/PropPaneHelp/IPreConfig.js.map +0 -1
  308. package/lib/common/PropPaneHelp/PreConfiguredConstants.d.ts.map +0 -1
  309. package/lib/common/PropPaneHelp/PreConfiguredConstants.js.map +0 -1
  310. package/lib/common/PropPaneHelp/getThisSitesPreConfigProps.d.ts.map +0 -1
  311. package/lib/common/PropPaneHelp/getThisSitesPreConfigProps.js.map +0 -1
  312. package/lib/common/PropPaneHelp/pages/Banner.d.ts.map +0 -1
  313. package/lib/common/PropPaneHelp/pages/Banner.js.map +0 -1
  314. package/lib/common/PropPaneHelp/pages/FPSBasic.d.ts.map +0 -1
  315. package/lib/common/PropPaneHelp/pages/FPSBasic.js.map +0 -1
  316. package/lib/common/PropPaneHelp/pages/FPSExpand.d.ts.map +0 -1
  317. package/lib/common/PropPaneHelp/pages/FPSExpand.js.map +0 -1
  318. package/lib/common/PropPaneHelp/pages/Import.d.ts.map +0 -1
  319. package/lib/common/PropPaneHelp/pages/Import.js.map +0 -1
  320. package/lib/common/PropPaneHelp/pages/PinMe.d.ts.map +0 -1
  321. package/lib/common/PropPaneHelp/pages/PinMe.js.map +0 -1
  322. package/lib/common/PropPaneHelp/pages/PropPaneHelp.d.ts.map +0 -1
  323. package/lib/common/PropPaneHelp/pages/PropPaneHelp.js.map +0 -1
  324. package/lib/common/PropPaneHelp/pages/SinglePageApp.d.ts.map +0 -1
  325. package/lib/common/PropPaneHelp/pages/SinglePageApp.js.map +0 -1
  326. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.d.ts.map +0 -1
  327. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.js.map +0 -1
  328. package/lib/common/PropPaneHelp/pages/Visitor.d.ts.map +0 -1
  329. package/lib/common/PropPaneHelp/pages/Visitor.js.map +0 -1
  330. package/lib/logic/Strings/handleBars.d.ts.map +0 -1
  331. package/lib/logic/Strings/handleBars.js.map +0 -1
@@ -0,0 +1,846 @@
1
+ import * as React from 'react';
2
+ import { Icon } from 'office-ui-fabric-react/lib/Icon';
3
+ // import { Icon, IIconProps } from 'office-ui-fabric-react';
4
+ import { Web, } from "@pnp/sp/presets/all";
5
+ import { Link, } from 'office-ui-fabric-react';
6
+ import { Pivot, PivotItem, } from 'office-ui-fabric-react/lib/Pivot';
7
+ import ReactJson from "react-json-view";
8
+ // import { IUser } from '../../fpsReferences';
9
+ // import { IQuickButton, IQuickCommands } from '@mikezimm/npmfunctions/dist/QuickCommands/IQuickCommands';
10
+ // import { IDrillItemInfo } from '../../fpsReferences';
11
+ // import { autoDetailsList } from '../../../../services/hoverCardService';
12
+ // import { doesObjectExistInArray } from '../../fpsReferences';
13
+ // import { findParentElementPropLikeThis } from '@mikezimm/npmfunctions/dist/Elements/functions';
14
+ // import { getHelpfullError } from '../../fpsReferences';
15
+ // import { buildConfirmDialogBig, IMyBigDialogProps } from '@mikezimm/npmfunctions/dist/Elements/dialogBox';
16
+ // import stylesL from '../ListView/listView.module.scss';
17
+ import { ListView, SelectionMode, } from "@pnp/spfx-controls-react/lib/ListView";
18
+ // import { IGroup } from 'office-ui-fabric-react/lib/components/DetailsList';
19
+ // import { mergeStyles } from 'office-ui-fabric-react/lib/Styling';
20
+ import { Stack } from 'office-ui-fabric-react';
21
+ import { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';
22
+ import { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/Button';
23
+ // import { Dialog, DialogType, DialogFooter, IDialogProps } from 'office-ui-fabric-react/lib/Dialog';
24
+ // import { Button, ButtonType, } from 'office-ui-fabric-react/lib/Button';
25
+ // import { Label } from 'office-ui-fabric-react/lib/Label';
26
+ // import { updateReactListItem } from './listFunctions';
27
+ // import { IContentsToggles, makeToggles } from '../fields/toggleFieldBuilder';
28
+ // import styles from '../Contents/listView.module.scss';
29
+ // import stylesRLV from './reactListView.module.scss';
30
+ // import stylesInfo from './InfoPane.module.scss';
31
+ import PageArrows from '../../Arrows/PageArrows';
32
+ import { NoCommandsInfo } from '../atoms/noCommandsInfo';
33
+ import { replaceHandleBarsValues } from '../../../../logic/Strings/handleBarsSub';
34
+ import { getHelpfullError } from '../../../../logic/Errors/friendly';
35
+ import { defaultBannerCommandStyles } from '../../../../common/commandStyles/defaults';
36
+ import { buildConfirmDialogBig } from '../../../atoms/Elements/confirmDialogBig';
37
+ import { makeToggles } from '../atoms/toggleFieldBuilder';
38
+ import { autoDetailsList } from '../atoms/detailsList';
39
+ import { findParentElementPropLikeThis } from '../../../../logic/DOM/Search/domSearch';
40
+ import { updateReactListItem } from '../functions/updateReactListItem';
41
+ import { doesObjectExistInArray } from '../../../../logic/Arrays/searching/objectfind';
42
+ require('./reactListView.css');
43
+ export default class ReactListItems extends React.Component {
44
+ createAttachPanel() {
45
+ return null;
46
+ }
47
+ /**
48
+ * createPanelAttachments is identical on ActionNews and Drilldown7 except panelItem interface
49
+ * @param thisId
50
+ * @param panelItem
51
+ */
52
+ async createPanelAttachments(thisId, panelItem) {
53
+ const thisListWeb = Web(this.props.webURL);
54
+ const thisListObject = thisListWeb.lists.getByTitle(this.props.listName);
55
+ let allItems = [];
56
+ let errMessage = null;
57
+ const attachments = [];
58
+ if (panelItem.Attachments && panelItem.Attachments === true) {
59
+ try {
60
+ allItems = await thisListObject.items.getById(thisId).attachmentFiles();
61
+ if (allItems.length > 0) {
62
+ attachments.push(React.createElement("h2", null,
63
+ "(",
64
+ allItems.length,
65
+ ") Attachments"));
66
+ attachments.push(React.createElement("div", { style: { paddingBottom: "10px" } },
67
+ React.createElement("b", null, "CTRL-Click"),
68
+ " to open in new window"));
69
+ allItems.map(a => {
70
+ let attachmentItem = React.createElement("div", null,
71
+ React.createElement(Link, { target: "_blank", href: a.ServerRelativeUrl },
72
+ " ",
73
+ a.FileName));
74
+ attachments.push(attachmentItem);
75
+ });
76
+ }
77
+ }
78
+ catch (e) {
79
+ errMessage = getHelpfullError(e, true, true); // eslint-disable-line @typescript-eslint/no-unused-vars
80
+ }
81
+ }
82
+ this.setState({
83
+ panelAttachments: attachments,
84
+ lastAttachId: thisId,
85
+ });
86
+ }
87
+ /**
88
+ *
89
+ * @param quickCommands
90
+ * @param item
91
+ * @param sourceUserInfo //This is just passed in in order to allow for user targeted b.showWhenEvalTrue checks
92
+ */
93
+ createPanelButtons(quickCommands, item, sourceUserInfo) {
94
+ let allButtonRows = [];
95
+ //Adjusted per: https://github.com/mikezimm/drilldown7/issues/211
96
+ if (!quickCommands || !quickCommands.buttons || quickCommands.buttons.length === 0) {
97
+ return NoCommandsInfo;
98
+ }
99
+ else {
100
+ let buildAllButtonsTest = true;
101
+ if (quickCommands.showWhenEvalTrue && quickCommands.showWhenEvalTrue.length > 0) {
102
+ //2022-01-18: Added Try catch when testing and found my typed in quick command had error.
103
+ try {
104
+ buildAllButtonsTest = eval(quickCommands.showWhenEvalTrue);
105
+ if (buildAllButtonsTest === true) {
106
+ //build all the buttons ( subject to individual button checks )
107
+ }
108
+ else {
109
+ buildAllButtonsTest = false;
110
+ }
111
+ }
112
+ catch (e) {
113
+ let errMessage = getHelpfullError(e, false, false);
114
+ console.log(`ERROR: createPanelButtons: quickCommands.showWhenEvalTrue !!!`, quickCommands.showWhenEvalTrue);
115
+ console.log(`ERROR: createPanelButtons: quickCommands.showWhenEvalTrue Error Details`, errMessage);
116
+ alert(`createPanelButtons: quickCommands.showWhenEvalTrue error !!! Check the console for details: ${quickCommands.showWhenEvalTrue}`);
117
+ }
118
+ }
119
+ if (buildAllButtonsTest === true) {
120
+ quickCommands.buttons.map((buttonRow, r) => {
121
+ if (buttonRow && buttonRow.length > 0) {
122
+ let rowResult = null;
123
+ const buttons = [];
124
+ buttonRow.map((b, i) => {
125
+ let buildThisButton = true;
126
+ /**
127
+ * showWhenEvalTrue must be run in the context of this section of code to be valid.
128
+ */
129
+ if (b.showWhenEvalTrue && b.showWhenEvalTrue.length > 0) {
130
+ //2022-01-18: Added Try catch when testing and found my typed in quick command had error.
131
+ try {
132
+ const buildButtonTest = eval(b.showWhenEvalTrue);
133
+ if (buildButtonTest === true) {
134
+ //build all the buttons
135
+ }
136
+ else {
137
+ buildThisButton = false;
138
+ }
139
+ }
140
+ catch (e) {
141
+ const errMessage = getHelpfullError(e, false, false);
142
+ console.log(`createPanelButtons: b[${i}].showWhenEvalTrue error !!!`, b.showWhenEvalTrue);
143
+ console.log(`createPanelButtons: b[${i}].showWhenEvalTrue Error Details`, errMessage);
144
+ alert(`createPanelButtons: quickCommands.showWhenEvalTrue error !!! Check the console for details: ${quickCommands.showWhenEvalTrue}`);
145
+ }
146
+ }
147
+ if (buildThisButton === true) {
148
+ const buttonStyles = b.styleButton ? b.styleButton : { minWidth: buttonRow.length === 1 ? '350px' : '', padding: '25px', marginBottom: '10px', fontSize: 'larger' };
149
+ //Tried adding
150
+ // const IconElement = b.icon ? <Icon iconName= { 'Emoji2' } style={ defaultBannerCommandStyles }/> : undefined;
151
+ const buttonID = ['ButtonID', r, i, item.Id].join(this.delim);
152
+ const buttonTitle = b.label;
153
+ // const iconName: string = b.icon;
154
+ const buttonIcon = { iconName: b.icon, style: defaultBannerCommandStyles };
155
+ const thisButton = b.primary === true ?
156
+ //Tried adding iconName into Primary Button, does not work,
157
+ //Tried adding IconElement into icon Props, can't see it.
158
+ //Tried adding Icon Element into the div next to Primary button and could see it.
159
+ //
160
+ React.createElement("div", { id: buttonID, title: buttonTitle },
161
+ React.createElement(PrimaryButton, { style: buttonStyles, iconProps: buttonIcon, text: b.label, onClick: this._panelButtonClicked.bind(this), disabled: b.disabled, checked: b.checked })) :
162
+ React.createElement("div", { id: buttonID, title: buttonTitle },
163
+ React.createElement(DefaultButton, { style: buttonStyles, iconProps: buttonIcon, text: b.label, onClick: this._panelButtonClicked.bind(this), disabled: b.disabled, checked: b.checked }));
164
+ buttons.push(thisButton);
165
+ }
166
+ }); //END buttonRow.map( (b,i) => {
167
+ const stackQuickCommands = { childrenGap: 10 };
168
+ rowResult = React.createElement(Stack, { horizontal: true, tokens: stackQuickCommands }, buttons);
169
+ const styleRows = { paddingBottom: 10 };
170
+ if (quickCommands.styleRow) {
171
+ try {
172
+ Object.keys(quickCommands.styleRow).map(k => {
173
+ styleRows[k] = quickCommands.styleRow[k];
174
+ });
175
+ }
176
+ catch (e) {
177
+ alert(`quickCommands.styleRow is not valid JSON... please fix: ${quickCommands.styleRow}`);
178
+ }
179
+ }
180
+ allButtonRows.push(React.createElement("div", { style: styleRows },
181
+ " ",
182
+ rowResult,
183
+ " "));
184
+ } //END if ( buttonRow && buttonRow.length > 0 ) {
185
+ }); //END quickCommands.buttons.map( (buttonRow, r) => {
186
+ allButtonRows.push(React.createElement(Icon, { iconName: 'Emoji2', style: { fontSize: '24px', } }));
187
+ } //END if ( buildAllButtonsTest === true ) {
188
+ }
189
+ return allButtonRows;
190
+ }
191
+ covertFieldInfoToIViewFields(parentListFieldTitles, fieldsToShow) {
192
+ /**
193
+ * This is the export format required:
194
+ export const initials : IViewField = {
195
+ name: "userInitials",
196
+ displayName: "User",
197
+ isResizable: true,
198
+ sorting: true,
199
+ minWidth: 10,
200
+ maxWidth: 30
201
+ };
202
+ */
203
+ let viewFields = [];
204
+ if (fieldsToShow.length === 0) { //Do all in order of fieldInfo
205
+ if (parentListFieldTitles.length > 0) { //Do all in order of fieldInfo
206
+ parentListFieldTitles.map(f => {
207
+ viewFields.push({
208
+ name: f[0],
209
+ displayName: f[1],
210
+ isResizable: true,
211
+ sorting: true,
212
+ minWidth: 50,
213
+ maxWidth: 100
214
+ });
215
+ });
216
+ }
217
+ }
218
+ console.log('covertFieldInfoToIViewFields - viewFields', viewFields);
219
+ return viewFields;
220
+ }
221
+ handleExpandedFieldInfoToIViewFields(viewFields) {
222
+ //Before this line was added, I think it was mutating props causing double render
223
+ viewFields = JSON.parse(JSON.stringify(viewFields));
224
+ viewFields.map(vf => {
225
+ //2022-03-18: MEMO TO SELF... SOMETHING SEEMS OFF about this replace...
226
+ vf.name = vf.name.replace(/\//g, '');
227
+ });
228
+ return viewFields;
229
+ }
230
+ createBlankDialog() {
231
+ let myDialog = {
232
+ title: '',
233
+ dialogMessage: '',
234
+ showDialog: false,
235
+ confirmButton: '',
236
+ _confirmDialog: this._confirmUpdateDialog.bind(this),
237
+ _closeDialog: this._closeDialog.bind(this),
238
+ };
239
+ return myDialog;
240
+ }
241
+ constructor(props) {
242
+ super(props);
243
+ this._componentWidth = null;
244
+ this.delim = '|||';
245
+ /***
246
+ * .o88b. .d88b. d8b db .d8888. d888888b d8888b. db db .o88b. d888888b .d88b. d8888b.
247
+ * d8P Y8 .8P Y8. 888o 88 88' YP `~~88~~' 88 `8D 88 88 d8P Y8 `~~88~~' .8P Y8. 88 `8D
248
+ * 8P 88 88 88V8o 88 `8bo. 88 88oobY' 88 88 8P 88 88 88 88oobY'
249
+ * 8b 88 88 88 V8o88 `Y8b. 88 88`8b 88 88 8b 88 88 88 88`8b
250
+ * Y8b d8 `8b d8' 88 V888 db 8D 88 88 `88. 88b d88 Y8b d8 88 `8b d8' 88 `88.
251
+ * `Y88P' `Y88P' VP V8P `8888Y' YP 88 YD ~Y8888P' `Y88P' YP `Y88P' 88 YD
252
+ *
253
+ *
254
+ */
255
+ this._ListViewFontSizes = [`default-font-size`, `larger-font-size`, `large-font-size`];
256
+ /***
257
+ * db db d8888b. d8888b. .d8b. d888888b d88888b .d8888. d888888b .d8b. d888888b d88888b
258
+ * 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88' 88' YP `~~88~~' d8' `8b `~~88~~' 88'
259
+ * 88 88 88oodD' 88 88 88ooo88 88 88ooooo `8bo. 88 88ooo88 88 88ooooo
260
+ * 88 88 88~~~ 88 88 88~~~88 88 88~~~~~ `Y8b. 88 88~~~88 88 88~~~~~
261
+ * 88b d88 88 88 .8D 88 88 88 88. db 8D 88 88 88 88 88.
262
+ * ~Y8888P' 88 Y8888D' YP YP YP Y88888P `8888Y' YP YP YP YP Y88888P
263
+ *
264
+ *
265
+ */
266
+ this._onGoToList = () => {
267
+ if (!this.props.parentListURL || this.props.parentListURL === null || this.props.parentListURL === undefined || this.props.parentListURL.length === 0) {
268
+ return; // Do nothing
269
+ }
270
+ let e = event;
271
+ let isAltClick = e.altKey;
272
+ let isShfitClick = e.shiftKey;
273
+ let isCtrlClick = e.ctrlKey;
274
+ console.log('AltClick, ShfitClick, CtrlClick:', isAltClick, isShfitClick, isCtrlClick);
275
+ window.open(`${this.props.parentListURL}?Source=${window.location.pathname}`, "_blank");
276
+ };
277
+ this._CreateNewItem = () => {
278
+ if (this.props.isLibrary === true) {
279
+ window.open(`${this.props.parentListURL}`, "_blank");
280
+ }
281
+ else {
282
+ window.open(`${this.props.parentListURL}/NewForm.aspx?Source=${window.location.pathname}&${window.location.search}`, "_blank");
283
+ }
284
+ };
285
+ /**
286
+ * Close the dialog
287
+ */
288
+ this._closeDialog = () => {
289
+ this.setState({
290
+ myDialog: this.createBlankDialog(),
291
+ });
292
+ };
293
+ this._onClosePanel = () => {
294
+ this.setState({
295
+ showPanel: false,
296
+ showAttach: false,
297
+ clickedAttach: false,
298
+ });
299
+ };
300
+ /***
301
+ * d8888b. .d8b. d8b db d88888b db d88888b .d88b. .d88b. d888888b d88888b d8888b.
302
+ * 88 `8D d8' `8b 888o 88 88' 88 88' .8P Y8. .8P Y8. `~~88~~' 88' 88 `8D
303
+ * 88oodD' 88ooo88 88V8o 88 88ooooo 88 88ooo 88 88 88 88 88 88ooooo 88oobY'
304
+ * 88~~~ 88~~~88 88 V8o88 88~~~~~ 88 88~~~ 88 88 88 88 88 88~~~~~ 88`8b
305
+ * 88 88 88 88 V888 88. 88booo. 88 `8b d8' `8b d8' 88 88. 88 `88.
306
+ * 88 YP YP VP V8P Y88888P Y88888P YP `Y88P' `Y88P' YP Y88888P 88 YD
307
+ *
308
+ *
309
+ */
310
+ /**
311
+ * This was copied from codepen example code to render a footer with buttons:
312
+ * https://fabricweb.z5.web.core.windows.net/oufr/6.50.2/#/examples/panel
313
+ *
314
+ */
315
+ this._onRenderFooterContent = () => {
316
+ return null;
317
+ return (React.createElement("div", null,
318
+ React.createElement(PrimaryButton, { onClick: this._onClosePanel, style: { marginRight: '8px' } }, "Save"),
319
+ React.createElement(DefaultButton, { onClick: this._onClosePanel }, "Cancel")));
320
+ };
321
+ console.log('listView PROPS: ', this.props);
322
+ let parentListFieldTitles = this.props.parentListFieldTitles !== undefined && this.props.parentListFieldTitles !== null ? JSON.parse(this.props.parentListFieldTitles) : '';
323
+ // console.log( 'parentListFieldTitles', parentListFieldTitles );
324
+ let viewFields = [];
325
+ if (this.props.viewFields.length > 0) {
326
+ viewFields = this.handleExpandedFieldInfoToIViewFields(this.props.viewFields);
327
+ }
328
+ else {
329
+ viewFields = this.covertFieldInfoToIViewFields(parentListFieldTitles, []);
330
+ }
331
+ let groupByFields = [];
332
+ if (this.props.groupByFields && this.props.groupByFields.length > 0) {
333
+ //Added this reparse to prevent mutating props
334
+ groupByFields = JSON.parse(JSON.stringify(this.props.groupByFields));
335
+ groupByFields.map(gF => { gF.name = gF.name.replace(/\//g, ''); });
336
+ }
337
+ this.state = {
338
+ fontSize: this._ListViewFontSizes[0],
339
+ maxChars: this.props.maxChars ? this.props.maxChars : 50,
340
+ parentListFieldTitles: parentListFieldTitles,
341
+ viewFields: viewFields,
342
+ groupByFields: groupByFields,
343
+ showPanel: false,
344
+ showAttach: false,
345
+ panelId: null,
346
+ lastPanelId: null,
347
+ panelItem: null,
348
+ panelAttachments: [],
349
+ lastAttachId: null,
350
+ clickedAttach: false,
351
+ myDialog: this.createBlankDialog(),
352
+ pickedCommand: null,
353
+ panelWidth: PanelType.medium,
354
+ firstVisible: 0,
355
+ lastVisible: this.props.itemsPerPage - 1,
356
+ };
357
+ }
358
+ componentDidMount() {
359
+ //this._getListItems();
360
+ }
361
+ /***
362
+ * d8888b. d888888b d8888b. db db d8888b. d8888b. .d8b. d888888b d88888b
363
+ * 88 `8D `88' 88 `8D 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88'
364
+ * 88 88 88 88 88 88 88 88oodD' 88 88 88ooo88 88 88ooooo
365
+ * 88 88 88 88 88 88 88 88~~~ 88 88 88~~~88 88 88~~~~~
366
+ * 88 .8D .88. 88 .8D 88b d88 88 88 .8D 88 88 88 88.
367
+ * Y8888D' Y888888P Y8888D' ~Y8888P' 88 Y8888D' YP YP YP Y88888P
368
+ *
369
+ *
370
+ */
371
+ componentDidUpdate(prevProps, prevState) {
372
+ /* eslint-disable @typescript-eslint/no-unused-vars */
373
+ let redraw = false;
374
+ let updateViewFields = false;
375
+ let resetArrows = false;
376
+ if (JSON.stringify(prevProps.viewFields) !== JSON.stringify(this.props.viewFields)) {
377
+ updateViewFields = true;
378
+ redraw = true;
379
+ }
380
+ if (JSON.stringify(prevProps.groupByFields) !== JSON.stringify(this.props.groupByFields)) {
381
+ updateViewFields = true;
382
+ redraw = true;
383
+ }
384
+ if (prevProps.resetArrows !== this.props.resetArrows) {
385
+ // updateViewFields = true;
386
+ resetArrows = true;
387
+ this.setState({
388
+ firstVisible: 0,
389
+ lastVisible: this.props.itemsPerPage - 1,
390
+ });
391
+ }
392
+ if (prevProps.richHeight !== this.props.richHeight) {
393
+ updateViewFields = true;
394
+ redraw = true;
395
+ }
396
+ // if ( prevProps.items.length !== this.props.items.length ) {
397
+ // this._setMaxRichHeight( this.props.autoRichHeight, this.props.richHeight, this.props.items );
398
+ // redraw = true; }
399
+ if (prevProps.parentListURL !== this.props.parentListURL) {
400
+ redraw = true;
401
+ }
402
+ if (prevProps.richHeight !== this.props.richHeight) {
403
+ redraw = true;
404
+ }
405
+ /* eslint-enable @typescript-eslint/no-unused-vars */
406
+ this._updateStateOnPropsChange(updateViewFields);
407
+ }
408
+ /***
409
+ * d8888b. d88888b d8b db d8888b. d88888b d8888b.
410
+ * 88 `8D 88' 888o 88 88 `8D 88' 88 `8D
411
+ * 88oobY' 88ooooo 88V8o 88 88 88 88ooooo 88oobY'
412
+ * 88`8b 88~~~~~ 88 V8o88 88 88 88~~~~~ 88`8b
413
+ * 88 `88. 88. 88 V888 88 .8D 88. 88 `88.
414
+ * 88 YD Y88888P VP V8P Y8888D' Y88888P 88 YD
415
+ *
416
+ *
417
+ */
418
+ render() {
419
+ //console.log( 'ReactListItems props & state: ', this.props, this.state );
420
+ // let thisLog = null;
421
+ let showRichHeightButton = false;
422
+ //2022-02-01: Updated this from drilldown7
423
+ if (this.props.items !== null && this.props.items.length > 0) {
424
+ let attachments = this.state.panelAttachments.length > 0 ? this.state.panelAttachments : null;
425
+ let dialog = !this.state.myDialog.showDialog ? null : buildConfirmDialogBig(this.state.myDialog);
426
+ /***
427
+ * d888888b .d88b. d888b d888b db d88888b .d8888.
428
+ * `~~88~~' .8P Y8. 88' Y8b 88' Y8b 88 88' 88' YP
429
+ * 88 88 88 88 88 88 88ooooo `8bo.
430
+ * 88 88 88 88 ooo 88 ooo 88 88~~~~~ `Y8b.
431
+ * 88 `8b d8' 88. ~8~ 88. ~8~ 88booo. 88. db 8D
432
+ * YP `Y88P' Y888P Y888P Y88888P Y88888P `8888Y'
433
+ *
434
+ *
435
+ */
436
+ let toggles = !this.state.showPanel ? null : React.createElement("div", { style: { float: 'right' } },
437
+ " ",
438
+ makeToggles(this.getPageToggles()),
439
+ " ");
440
+ const itemLink = React.createElement("div", { style: { cursor: 'pointer', fontSize: 'larger', 'fontWeight': 600, color: 'darkblue', padding: '10px 10px 10px 0px', margin: '20px 0px' }, onClick: () => { window.open(this.state.panelItem.goToPropsLink, '_blank'); } }, "Click to open item");
441
+ let fullPanel = null;
442
+ if (this.state.showPanel === true && this.state.panelId) {
443
+ fullPanel = React.createElement(Panel, { isOpen: this.state.showPanel, type: this.state.panelWidth, onDismiss: this._onClosePanel, headerText: this.state.panelId.toString(), closeButtonAriaLabel: "Close", onRenderFooterContent: this._onRenderFooterContent, isLightDismiss: true, isFooterAtBottom: true },
444
+ toggles,
445
+ React.createElement(Pivot, { "aria-label": "Basic Pivot Example", defaultSelectedIndex: 0, style: { paddingTop: '16px' } },
446
+ React.createElement(PivotItem, { headerText: "Commands", itemKey: "Commands" },
447
+ React.createElement("div", null,
448
+ itemLink,
449
+ React.createElement("div", { id: '20pxSpacer', style: { height: '20px' } }),
450
+ attachments,
451
+ this.createPanelButtons(this.props.quickCommands, this.state.panelItem, this.props.sourceUserInfo))),
452
+ React.createElement(PivotItem, { headerText: "Details", itemKey: "Details" },
453
+ itemLink,
454
+ autoDetailsList(this.state.panelItem, ["Title", "refiners"], ["search", "meta", "searchString"], true)),
455
+ React.createElement(PivotItem, { headerText: "JSON", itemKey: "JSON" },
456
+ React.createElement("div", { id: "CommandsJSONPanel", style: { paddingTop: '20px' } },
457
+ itemLink,
458
+ React.createElement(ReactJson, { src: this.state.panelItem, name: 'panelItem', collapsed: true, displayDataTypes: true, displayObjectSize: true, enableClipboard: true, style: { padding: '20px 0px' } })))));
459
+ }
460
+ /**
461
+ * 2022-02-01: This was copied/updated from drilldown7 to actionnews
462
+ */
463
+ let attachPanel = null;
464
+ if (this.state.showAttach === true && this.state.panelId) {
465
+ attachPanel = React.createElement(Panel, { isOpen: this.state.showAttach, type: this.state.panelWidth, onDismiss: this._onClosePanel, headerText: this.state.panelId.toString(), closeButtonAriaLabel: "Close", onRenderFooterContent: this._onRenderFooterContent, isLightDismiss: true, isFooterAtBottom: true }, attachments);
466
+ }
467
+ let viewFieldsBase = this.state.viewFields;
468
+ let attachField = [];
469
+ if (this.props.includeAttach) {
470
+ //Add attachments column:
471
+ let callBack = this.props.includeDetails ? null : this._onShowPanel.bind(this);
472
+ attachField.push({
473
+ name: 'Attachments',
474
+ displayName: 'Attach',
475
+ sorting: true,
476
+ minWidth: 25,
477
+ maxWidth: 35,
478
+ render: (item) => {
479
+ let cursor = item.Attachments ? "pointer" : '';
480
+ return React.createElement("div", { id: 'ButtonID' + item.Id, onClick: callBack, style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: cursor } },
481
+ React.createElement(Icon, { iconName: item.Attachments ? "Attach" : '' }));
482
+ },
483
+ });
484
+ }
485
+ let viewFields = attachField.concat(viewFieldsBase);
486
+ let filtered = [];
487
+ this.props.items.map((item, idx) => {
488
+ if (idx >= this.state.firstVisible && idx <= this.state.lastVisible) {
489
+ filtered.push(item);
490
+ }
491
+ });
492
+ const pageArrows = React.createElement(PageArrows, { itemCount: this.props.items.length, itemsPerPage: this.props.itemsPerPage, setParentStateFirstLast: this._updateFirstLastVisible.bind(this), debugMode: this.props.debugMode, fontSize: this._componentWidth && this._componentWidth > 800 ? 28 : 24, resetArrows: this.props.resetArrows, pageArrowStyles: { marginTop: '-7px' } });
493
+ viewFields.map(field => {
494
+ //This is for: https://github.com/mikezimm/drilldown7/issues/224
495
+ if (this.props.richColumns.indexOf(field.name) > -1) {
496
+ showRichHeightButton = true;
497
+ const fieldStyles = [`list-view-rt`];
498
+ // fieldStyles.push( this._RichTextRowHeight[ this.state.richHeight ] );
499
+ field.render = (item, index) => { return React.createElement("div", { style: { maxHeight: this.props.richHeight }, className: fieldStyles.join(' '), dangerouslySetInnerHTML: { __html: item[field.name] } }); };
500
+ // field.render = ( item, index ) => { this._renderRich( item, field.name ) }
501
+ }
502
+ else if (field.linkSubstitute || field.textSubstitute) {
503
+ // Testing to see if Url value is valid... has a value, is a string, and either starts with http or /sites/
504
+ // Testing to see if Url value is valid... has a value, is a string, and either starts with http or /sites/
505
+ const isValidSubLink = typeof field.linkSubstitute === "string" &&
506
+ (field.linkSubstitute.indexOf("/sites/") === 0 || field.linkSubstitute.indexOf("http") === 0) ? true : false;
507
+ // Testing to see if Url value is valid... has a value, is a string, and either starts with http or /sites/
508
+ const isValidText = typeof field.textSubstitute === "string" ? true : false;
509
+ if (isValidSubLink !== true && isValidText !== true) {
510
+ return;
511
+ }
512
+ else {
513
+ // Start on https://github.com/mikezimm/drilldown7/issues/70, https://github.com/mikezimm/drilldown7/issues/268
514
+ field.render = (item, index) => {
515
+ const linkSubstitute = isValidSubLink === true ? replaceHandleBarsValues(item, field.linkSubstitute, true) : '';
516
+ const textSubstitute = isValidText === true ? replaceHandleBarsValues(item, field.textSubstitute, field.showEmptyAsEmpty === true ? true : false) : item[field.name];
517
+ // Return element as a link if the Url passes simple validation. Else just return the displayed value as normal span
518
+ if (isValidSubLink === true && linkSubstitute) {
519
+ return React.createElement("a", { href: linkSubstitute }, textSubstitute);
520
+ }
521
+ else {
522
+ return React.createElement("span", null, textSubstitute);
523
+ }
524
+ }; // close: field.render = ( item, index ) => {
525
+ } // close if ( isValid === true ) {
526
+ } // close: } else if ( field.linkSubstitute ) {
527
+ }); // close: viewFields.map ( field => {
528
+ //=>> address: https://github.com/mikezimm/drilldown7/issues/270
529
+ const changeRichHeight = showRichHeightButton !== true ? null :
530
+ React.createElement("div", { title: `Change row height from ${this.props.richHeight}`, onClick: this.props.updateRichHeightProps, style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: 'pointer' } },
531
+ React.createElement(Icon, { iconName: 'CollapseMenu' }));
532
+ //=>> address: https://github.com/mikezimm/drilldown7/issues/169
533
+ const changeFont = React.createElement("div", { title: "Change font size", onClick: this._changeFontSize.bind(this), style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: 'pointer' } },
534
+ React.createElement(Icon, { iconName: 'FontSize' }));
535
+ let listView = React.createElement("div", { className: this.state.fontSize },
536
+ React.createElement(ListView, { items: filtered, viewFields: viewFields,
537
+ // className={ 'font-size-14' }
538
+ // listClassName={ stylesL.fontSizeLarger }
539
+ compact: true, selectionMode: this.props.includeDetails ? SelectionMode.single : SelectionMode.none, selection: this._onShowPanel.bind(this), showFilter: false,
540
+ //defaultFilter="John"
541
+ filterPlaceHolder: "Search...", groupByFields: this.props.groupByFields }));
542
+ // let logTable = itemRows === null ? <div>Nothing to show</div> : <table style={{ display: 'block'}} className={stylesInfo.infoTable}>
543
+ let barText = this.props.blueBar && this.props.blueBar != null ? this.props.blueBar : React.createElement("span", null, "Items"); // eslint-disable-line eqeqeq
544
+ let webTitle = null;
545
+ let listLink = !this.props.includeListLink ? null : React.createElement("div", { className: `info-heading`, onClick: this._onGoToList.bind(this), style: { marginRight: 30, whiteSpace: 'nowrap', paddingTop: 0, cursor: 'pointer', fontSize: 'smaller', background: 'transparent' } },
546
+ React.createElement("span", { style: { background: 'transparent' }, className: `list-link` }, "Go to list"));
547
+ let createItemLink = !this.props.createItemLink ? null : React.createElement("div", { title: "Create new item", className: `info-heading`, onClick: this._CreateNewItem.bind(this), style: { marginRight: 30, whiteSpace: 'nowrap', paddingTop: 0, cursor: 'pointer', fontSize: 'larger', background: 'transparent' } },
548
+ React.createElement("span", { style: { background: 'transparent' }, className: `list-link` },
549
+ React.createElement(Icon, { iconName: "AddTo" })));
550
+ // https://github.com/mikezimm/drilldown7/issues/249
551
+ let maxBlueBarLeft = createItemLink ? 35 : 40;
552
+ if (!listLink)
553
+ maxBlueBarLeft += 15;
554
+ if (barText !== null) {
555
+ webTitle = React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between', }, className: [`info-heading`, `inner-shadow`].join(' ') },
556
+ React.createElement("span", { className: `blue-bar-left`, style: { maxWidth: `${maxBlueBarLeft}%` }, title: this.props.blueBarTitleText },
557
+ "( ",
558
+ this.props.items.length,
559
+ " ) ",
560
+ barText),
561
+ pageArrows,
562
+ React.createElement("span", { style: { gridRow: 'nowrap', display: 'inline-flex', gridGap: '.75em', marginRight: '25px' } },
563
+ changeFont,
564
+ changeRichHeight),
565
+ React.createElement("span", { style: { whiteSpace: 'nowrap', display: 'flex', marginRight: '25px' } },
566
+ createItemLink,
567
+ listLink));
568
+ /*stylesL.reactListView*/
569
+ return (React.createElement("div", { className: '', ref: el => {
570
+ // el can be null - see https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs
571
+ if (!el)
572
+ return;
573
+ this._componentWidth = el.getBoundingClientRect().width;
574
+ // console.log('componentWidth', this._componentWidth ) ;
575
+ } },
576
+ React.createElement("div", { style: { paddingTop: 10 }, className: `info-pane-tight` },
577
+ webTitle,
578
+ fullPanel,
579
+ attachPanel,
580
+ dialog,
581
+ listView)));
582
+ }
583
+ // } else {
584
+ // <div className={ styles.container }></div>
585
+ // return (
586
+ // <div className={ styles.logListView }>
587
+ // { thisLog }
588
+ // </div>
589
+ // );
590
+ // }
591
+ } //if ( this.props.items != null && this.props.items.length > 0 ) {
592
+ } // Render
593
+ _updateStateOnPropsChange(pushViewFieldsToState) {
594
+ let viewFields = [];
595
+ let parentListFieldTitles = this.props.parentListFieldTitles !== undefined && this.props.parentListFieldTitles !== null ? JSON.parse(this.props.parentListFieldTitles) : '';
596
+ if (this.props.viewFields.length > 0) {
597
+ viewFields = this.handleExpandedFieldInfoToIViewFields(this.props.viewFields);
598
+ }
599
+ else {
600
+ viewFields = this.covertFieldInfoToIViewFields(parentListFieldTitles, []);
601
+ }
602
+ let groupByFields = [];
603
+ if (this.props.groupByFields && this.props.groupByFields.length > 0) {
604
+ groupByFields = JSON.parse(JSON.stringify(this.props.groupByFields));
605
+ groupByFields.map(gF => { gF.name = gF.name.replace(/\//g, ''); });
606
+ }
607
+ if (pushViewFieldsToState === true) {
608
+ this.setState({
609
+ viewFields: viewFields,
610
+ groupByFields: groupByFields,
611
+ });
612
+ }
613
+ }
614
+ /***
615
+ * d8888b. db db d888888b d888888b .d88b. d8b db .o88b. db d888888b .o88b. db dD
616
+ * 88 `8D 88 88 `~~88~~' `~~88~~' .8P Y8. 888o 88 d8P Y8 88 `88' d8P Y8 88 ,8P'
617
+ * 88oooY' 88 88 88 88 88 88 88V8o 88 8P 88 88 8P 88,8P
618
+ * 88~~~b. 88 88 88 88 88 88 88 V8o88 8b 88 88 8b 88`8b
619
+ * 88 8D 88b d88 88 88 `8b d8' 88 V888 Y8b d8 88booo. .88. Y8b d8 88 `88.
620
+ * Y8888P' ~Y8888P' YP YP `Y88P' VP V8P `Y88P' Y88888P Y888888P `Y88P' YP YD
621
+ *
622
+ *
623
+ */
624
+ //private async ensureTrackTimeList(myListName: string, myListDesc: string, ProjectOrTime: string): Promise<boolean> {
625
+ async _panelButtonClicked(item) {
626
+ let e = event;
627
+ let thisID = findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins');
628
+ if (!thisID) {
629
+ alert('Whoops! Can not find ID of _panelButtonClicked!');
630
+ return null;
631
+ }
632
+ else {
633
+ try {
634
+ await this.startThisQuickUpdate(thisID);
635
+ }
636
+ catch (ev) {
637
+ console.log('_panelButtonClicked error:', ev);
638
+ }
639
+ }
640
+ }
641
+ /**
642
+ * Open the dialog
643
+ */
644
+ //private _confirmUpdateDialog = () => {
645
+ async _confirmUpdateDialog(item) {
646
+ let e = event; // eslint-disable-line @typescript-eslint/no-unused-vars
647
+ let thisButtonObject = this.state.pickedCommand;
648
+ await this.completeThisQuickUpdate(this.state.panelId.toString(), thisButtonObject);
649
+ this.setState({
650
+ myDialog: this.createBlankDialog(),
651
+ });
652
+ }
653
+ //=>> address: https://github.com/mikezimm/drilldown7/issues/169
654
+ _changeFontSize() {
655
+ const oldValue = this.state.fontSize;
656
+ const oldIdx = this._ListViewFontSizes.indexOf(oldValue);
657
+ const nextIdx = oldIdx === this._ListViewFontSizes.length - 1 ? 0 : oldIdx + 1;
658
+ this.setState({ fontSize: this._ListViewFontSizes[nextIdx] });
659
+ }
660
+ async startThisQuickUpdate(thisID) {
661
+ const buttonID = thisID.split(this.delim);
662
+ //let buttonID = ['ButtonID', r, i , item.Id].join(this.delim);
663
+ const buttonRow = buttonID[1];
664
+ const buttonIndex = buttonID[2];
665
+ const itemId = buttonID[3];
666
+ const thisButtonObject = this.props.quickCommands.buttons[buttonRow][buttonIndex];
667
+ if (!thisButtonObject) {
668
+ alert('_panelButtonClicked - can not find thisButtonObject - ' + thisID);
669
+ }
670
+ else {
671
+ if (thisButtonObject.updateItem) {
672
+ let readyToUpdate = true;
673
+ if (!this.props.webURL) {
674
+ alert('Missing listWebUrl for quickCommands');
675
+ readyToUpdate = false;
676
+ }
677
+ if (!this.props.listName) {
678
+ alert('Missing listName for quickCommands');
679
+ readyToUpdate = false;
680
+ }
681
+ if (readyToUpdate === true) {
682
+ //Attempt to update item:
683
+ if (thisButtonObject.confirm && thisButtonObject.confirm.length > 0) {
684
+ let myDialog = this.createBlankDialog();
685
+ myDialog.title = "Are you sure you want to make this update?";
686
+ myDialog.dialogMessage = thisButtonObject.confirm + '';
687
+ myDialog.confirmButton = thisButtonObject.label + '';
688
+ myDialog.showDialog = true;
689
+ myDialog.maxWidth = 600;
690
+ this.setState({
691
+ pickedCommand: thisButtonObject,
692
+ myDialog: myDialog,
693
+ });
694
+ }
695
+ else {
696
+ await this.completeThisQuickUpdate(itemId, thisButtonObject);
697
+ }
698
+ }
699
+ else {
700
+ //Don't update item:
701
+ }
702
+ }
703
+ if (thisButtonObject.panelMessage) {
704
+ this.setState({
705
+ panelMessage: thisButtonObject.panelMessage,
706
+ });
707
+ }
708
+ }
709
+ }
710
+ async completeThisQuickUpdate(itemId, thisButtonObject) {
711
+ let result = await updateReactListItem(this.props.webURL, this.props.listName, parseInt(itemId), thisButtonObject, this.props.sourceUserInfo, this.state.panelItem);
712
+ //If success (result is error message and null by default )
713
+ if (result === null && this.props.quickCommands.onUpdateReload === true) {
714
+ let updates = Object.keys(thisButtonObject.updateItem).map(k => {
715
+ return k;
716
+ });
717
+ let bannerMessage = React.createElement("div", { style: { marginTop: '5px' } },
718
+ " ",
719
+ [
720
+ React.createElement("h3", { key: "h3Finished", style: { paddingTop: '10px' } },
721
+ "Finished updating item [ ",
722
+ itemId,
723
+ " ]"),
724
+ React.createElement("div", { key: "bannerIncluding" },
725
+ "Including: ",
726
+ updates.join(', '),
727
+ " ")
728
+ ]);
729
+ this.props.quickCommands.refreshCallback(bannerMessage, false);
730
+ }
731
+ else if (result !== null) {
732
+ this.props.quickCommands.refreshCallback(result, true);
733
+ }
734
+ }
735
+ /***
736
+ * .d8888. db db .d88b. db d8b db d8888b. .d8b. d8b db d88888b db
737
+ * 88' YP 88 88 .8P Y8. 88 I8I 88 88 `8D d8' `8b 888o 88 88' 88
738
+ * `8bo. 88ooo88 88 88 88 I8I 88 88oodD' 88ooo88 88V8o 88 88ooooo 88
739
+ * `Y8b. 88~~~88 88 88 Y8 I8I 88 88~~~ 88~~~88 88 V8o88 88~~~~~ 88
740
+ * db 8D 88 88 `8b d8' `8b d8'8b d8' 88 88 88 88 V888 88. 88booo.
741
+ * `8888Y' YP YP `Y88P' `8b8' `8d8' 88 YP YP VP V8P Y88888P Y88888P
742
+ *
743
+ *
744
+ */
745
+ async _onShowPanel(item) {
746
+ var _a, _b;
747
+ let e = event;
748
+ console.log('_onShowPanel: e', e);
749
+ console.log('_onShowPanel item clicked:', item);
750
+ let isLink = e && e.srcElement && e.srcElement.href && e.srcElement.href.length > 0 ? true : false;
751
+ /**
752
+ * Added to solve https://github.com/mikezimm/drilldown7/issues/159
753
+ * on /sites/ChinaSustainabilitySteeringCommittee/SitePages/Climate-Articles.aspx
754
+ * Have never seen this error before. Tried same exact config to same list on another site and do not get the error.
755
+ *
756
+ */
757
+ if (e === undefined) {
758
+ return;
759
+ }
760
+ else if (isLink === true) {
761
+ window.open(e.srcElement.href, '_blank');
762
+ }
763
+ else {
764
+ let clickedAttachIcon = ((_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.iconName) === 'Attach' ? true : false;
765
+ if (clickedAttachIcon === true || item.length > 0) {
766
+ let thisID = clickedAttachIcon === true ? findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins') : item[0].Id;
767
+ thisID = typeof thisID === 'string' ? thisID.replace('ButtonID', '') : thisID;
768
+ let panelItem = this._getItemFromId(this.props.items, 'Id', thisID);
769
+ let lastPanelId = this.state.panelId;
770
+ let clickedAttach = false;
771
+ if (e.srcElement.dataset && e.srcElement.dataset.iconName === 'Attach') {
772
+ clickedAttach = true;
773
+ }
774
+ await this.createPanelAttachments(thisID, panelItem);
775
+ let canShowAPanel = thisID === null || thisID === undefined || panelItem === null ? false : true;
776
+ let showFullPanel = canShowAPanel === true && clickedAttach !== true ? true : false;
777
+ // 2020-10-13: The last check in this row just didn't seem right... was && this.props.includeListLink === true ? true : false;
778
+ let showAttachPanel = canShowAPanel === true && clickedAttach === true && this.props.includeAttach === true ? true : false;
779
+ this.setState({
780
+ showPanel: showFullPanel,
781
+ showAttach: showAttachPanel,
782
+ clickedAttach: clickedAttach,
783
+ panelId: thisID,
784
+ panelItem: panelItem,
785
+ lastPanelId: lastPanelId,
786
+ panelAttachments: this.state.lastAttachId === thisID ? this.state.panelAttachments : [],
787
+ });
788
+ }
789
+ }
790
+ }
791
+ _getItemFromId(items, key, val) {
792
+ let panelItem = null;
793
+ let showIndex = doesObjectExistInArray(this.props.items, key, val, false);
794
+ if (showIndex !== false) {
795
+ panelItem = this.props.items[showIndex];
796
+ console.log('showPanelPropsItem', panelItem);
797
+ }
798
+ return panelItem;
799
+ }
800
+ /***
801
+ * d888888b .d88b. d888b d888b db d88888b .d8888.
802
+ * `~~88~~' .8P Y8. 88' Y8b 88' Y8b 88 88' 88' YP
803
+ * 88 88 88 88 88 88 88ooooo `8bo.
804
+ * 88 88 88 88 ooo 88 ooo 88 88~~~~~ `Y8b.
805
+ * 88 `8b d8' 88. ~8~ 88. ~8~ 88booo. 88. db 8D
806
+ * YP `Y88P' Y888P Y888P Y88888P Y88888P `8888Y'
807
+ *
808
+ *
809
+ */
810
+ getPageToggles() {
811
+ let togRefinerCounts = {
812
+ //label: <span style={{ color: 'red', fontWeight: 900}}>Rails Off!</span>,
813
+ label: React.createElement("span", null, "Panel width"),
814
+ key: 'togggleWidth',
815
+ _onChange: this.updatePanelWidth.bind(this),
816
+ checked: this.state.panelWidth === PanelType.medium ? false : true,
817
+ onText: 'Wide',
818
+ offText: 'Medium',
819
+ className: '',
820
+ styles: '',
821
+ };
822
+ let theseToggles = [];
823
+ theseToggles.push(togRefinerCounts);
824
+ let pageToggles = {
825
+ toggles: theseToggles,
826
+ childGap: 10,
827
+ vertical: false,
828
+ hAlign: 'end',
829
+ vAlign: 'start',
830
+ rootStyle: { width: 100, paddingTop: 0, paddingRight: 0, }, //This defines the styles on each toggle
831
+ };
832
+ return pageToggles;
833
+ }
834
+ updatePanelWidth() {
835
+ this.setState({
836
+ panelWidth: this.state.panelWidth === PanelType.medium ? PanelType.large : PanelType.medium,
837
+ });
838
+ }
839
+ _updateFirstLastVisible(firstVisible, lastVisible) {
840
+ this.setState({
841
+ firstVisible: firstVisible,
842
+ lastVisible: lastVisible,
843
+ });
844
+ }
845
+ }
846
+ //# sourceMappingURL=reactListView.js.map