@talxis/base-controls 1.2604.2 → 1.2605.2-alpha

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 (248) hide show
  1. package/dist/components/DatasetControl/EditColumns/OptionText/OptionText.js +1 -2
  2. package/dist/components/DatasetControl/EditColumns/OptionText/OptionText.js.map +1 -1
  3. package/dist/components/Lookup/Lookup.js +4 -1
  4. package/dist/components/Lookup/Lookup.js.map +1 -1
  5. package/dist/components/Lookup/hooks/useLookup.d.ts +4 -0
  6. package/dist/components/Lookup/translations.d.ts +4 -0
  7. package/dist/components/Lookup/translations.js +4 -0
  8. package/dist/components/Lookup/translations.js.map +1 -1
  9. package/dist/components/TaskGrid/TaskGrid.js +3 -4
  10. package/dist/components/TaskGrid/TaskGrid.js.map +1 -1
  11. package/dist/components/TaskGrid/TaskGridDatasetControl.d.ts +16 -5
  12. package/dist/components/TaskGrid/TaskGridDatasetControl.js +32 -13
  13. package/dist/components/TaskGrid/TaskGridDatasetControl.js.map +1 -1
  14. package/dist/components/TaskGrid/TaskGridDatasetControlFactory.d.ts +3 -2
  15. package/dist/components/TaskGrid/TaskGridDatasetControlFactory.js +7 -5
  16. package/dist/components/TaskGrid/TaskGridDatasetControlFactory.js.map +1 -1
  17. package/dist/components/TaskGrid/components/grid/cell-renderers/add-task-button/AddTaskButton.js +3 -8
  18. package/dist/components/TaskGrid/components/grid/cell-renderers/add-task-button/AddTaskButton.js.map +1 -1
  19. package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.d.ts +7 -0
  20. package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.js +99 -0
  21. package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.js.map +1 -0
  22. package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/index.d.ts +1 -0
  23. package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/index.js +2 -0
  24. package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.d.ts +1 -0
  25. package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.js +2 -1
  26. package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.js.map +1 -1
  27. package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/index.js +1 -1
  28. package/dist/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.d.ts +2 -7
  29. package/dist/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.js +44 -18
  30. package/dist/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.js.map +1 -1
  31. package/dist/components/TaskGrid/components/grid/grid-drag-handler/GridDragHandler.js.map +1 -1
  32. package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.d.ts +13 -0
  33. package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.js +82 -0
  34. package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.js.map +1 -0
  35. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/ColorfulLookupMany.d.ts +5 -0
  36. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/ColorfulLookupMany.js +12 -0
  37. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/ColorfulLookupMany.js.map +1 -0
  38. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.d.ts +2 -0
  39. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.js +13 -0
  40. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.js.map +1 -0
  41. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/MultiValueContainer.d.ts +3 -0
  42. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/MultiValueContainer.js +17 -0
  43. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/MultiValueContainer.js.map +1 -0
  44. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/index.d.ts +1 -0
  45. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/index.js +2 -0
  46. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/Option.d.ts +3 -0
  47. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/Option.js +17 -0
  48. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/Option.js.map +1 -0
  49. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/index.d.ts +1 -0
  50. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/index.js +2 -0
  51. package/dist/components/TaskGrid/{data-providers/custom-columns-data-provider → components/grid/lookup-many/colorful-lookup-many/components/option}/index.js.map +1 -1
  52. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/styles.d.ts +14 -0
  53. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/styles.js +21 -0
  54. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/styles.js.map +1 -0
  55. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/context.d.ts +4 -0
  56. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/context.js +9 -0
  57. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/context.js.map +1 -0
  58. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/index.d.ts +1 -0
  59. package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/index.js +2 -0
  60. package/dist/components/TaskGrid/{data-providers/saved-query-data-provider → components/grid/lookup-many/colorful-lookup-many}/index.js.map +1 -1
  61. package/dist/components/TaskGrid/components/grid/lookup-many/components/index.d.ts +10 -0
  62. package/dist/components/TaskGrid/components/grid/lookup-many/components/index.js +15 -0
  63. package/dist/components/TaskGrid/components/grid/lookup-many/components/index.js.map +1 -0
  64. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.d.ts +3 -0
  65. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.js +15 -0
  66. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.js.map +1 -0
  67. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/index.d.ts +1 -0
  68. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/index.js +2 -0
  69. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/index.js.map +1 -0
  70. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/styles.d.ts +18 -0
  71. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/styles.js +24 -0
  72. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/styles.js.map +1 -0
  73. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/MultiValueLabel.d.ts +3 -0
  74. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/MultiValueLabel.js +21 -0
  75. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/MultiValueLabel.js.map +1 -0
  76. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/index.d.ts +1 -0
  77. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/index.js +2 -0
  78. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/index.js.map +1 -0
  79. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/styles.d.ts +15 -0
  80. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/styles.js +22 -0
  81. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/styles.js.map +1 -0
  82. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/MultiValueRemove.d.ts +3 -0
  83. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/MultiValueRemove.js +18 -0
  84. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/MultiValueRemove.js.map +1 -0
  85. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/styles.d.ts +22 -0
  86. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/styles.js +28 -0
  87. package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/styles.js.map +1 -0
  88. package/dist/components/TaskGrid/components/grid/lookup-many/context.d.ts +4 -0
  89. package/dist/components/TaskGrid/components/grid/lookup-many/context.js +9 -0
  90. package/dist/components/TaskGrid/components/grid/lookup-many/context.js.map +1 -0
  91. package/dist/components/TaskGrid/components/grid/lookup-many/index.d.ts +4 -0
  92. package/dist/components/TaskGrid/components/grid/lookup-many/index.js +5 -0
  93. package/dist/components/TaskGrid/components/grid/lookup-many/index.js.map +1 -0
  94. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.d.ts +5 -0
  95. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.js +12 -0
  96. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.js.map +1 -0
  97. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.d.ts +2 -0
  98. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.js +13 -0
  99. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.js.map +1 -0
  100. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.d.ts +3 -0
  101. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.js +17 -0
  102. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.js.map +1 -0
  103. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/index.d.ts +1 -0
  104. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/index.js +2 -0
  105. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/index.js.map +1 -0
  106. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/styles.d.ts +5 -0
  107. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/styles.js +6 -0
  108. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/styles.js.map +1 -0
  109. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/Option.d.ts +3 -0
  110. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/Option.js +16 -0
  111. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/Option.js.map +1 -0
  112. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/index.d.ts +1 -0
  113. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/index.js +2 -0
  114. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/index.js.map +1 -0
  115. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/styles.d.ts +10 -0
  116. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/styles.js +11 -0
  117. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/styles.js.map +1 -0
  118. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/context.d.ts +4 -0
  119. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/context.js +9 -0
  120. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/context.js.map +1 -0
  121. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/index.d.ts +1 -0
  122. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/index.js +2 -0
  123. package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/index.js.map +1 -0
  124. package/dist/components/TaskGrid/components/grid/multi-record-selector/MultiRecordSelector.d.ts +1 -0
  125. package/dist/components/TaskGrid/components/grid/multi-record-selector/MultiRecordSelector.js +27 -14
  126. package/dist/components/TaskGrid/components/grid/multi-record-selector/MultiRecordSelector.js.map +1 -1
  127. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/MultiValueContainer.d.ts +3 -0
  128. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/MultiValueContainer.js +13 -0
  129. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/MultiValueContainer.js.map +1 -0
  130. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/styles.d.ts +18 -0
  131. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/styles.js +24 -0
  132. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/styles.js.map +1 -0
  133. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.d.ts +3 -0
  134. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.js +19 -0
  135. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.js.map +1 -0
  136. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/styles.d.ts +12 -0
  137. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/styles.js +19 -0
  138. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/styles.js.map +1 -0
  139. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/MultiValueRemove.d.ts +3 -0
  140. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/MultiValueRemove.js +16 -0
  141. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/MultiValueRemove.js.map +1 -0
  142. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/styles.d.ts +22 -0
  143. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/styles.js +28 -0
  144. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/styles.js.map +1 -0
  145. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/option/Option.d.ts +3 -0
  146. package/dist/components/TaskGrid/components/grid/multi-record-selector/components/option/styles.d.ts +16 -0
  147. package/dist/components/TaskGrid/components/grid/multi-record-selector/styles.d.ts +3 -0
  148. package/dist/components/TaskGrid/components/grid/multi-record-selector/styles.js +15 -0
  149. package/dist/components/TaskGrid/components/grid/multi-record-selector/styles.js.map +1 -0
  150. package/dist/components/TaskGrid/components/header/Header.js +5 -4
  151. package/dist/components/TaskGrid/components/header/Header.js.map +1 -1
  152. package/dist/components/TaskGrid/components/header/edit-columns/EditColumns.js.map +1 -1
  153. package/dist/components/TaskGrid/components/header/view-switcher/create-view-dialog/CreateViewDialog.js.map +1 -1
  154. package/dist/components/TaskGrid/components/header/view-switcher/view-manager/ViewManager.js.map +1 -1
  155. package/dist/components/TaskGrid/context.d.ts +5 -4
  156. package/dist/components/TaskGrid/context.js.map +1 -1
  157. package/dist/components/TaskGrid/extensions/LexoRank.d.ts +7 -0
  158. package/dist/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.d.ts +69 -0
  159. package/dist/components/TaskGrid/{data-providers/custom-columns-data-provider/TalxisCustomColumnsDataProviderStrategy.js → extensions/dataverse/DataverseCustomColumnsStrategy.js} +35 -3
  160. package/dist/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.js.map +1 -0
  161. package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.d.ts +20 -0
  162. package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.js +42 -0
  163. package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.js.map +1 -0
  164. package/dist/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.d.ts +49 -0
  165. package/dist/components/TaskGrid/{data-providers/saved-query-data-provider/TalxisSavedQueryDataProvider.js → extensions/dataverse/DataverseSavedQueryStrategy.js} +37 -15
  166. package/dist/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.js.map +1 -0
  167. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.d.ts +100 -0
  168. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.js +145 -0
  169. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.js.map +1 -0
  170. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.d.ts +122 -0
  171. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.js +453 -0
  172. package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.js.map +1 -0
  173. package/dist/components/TaskGrid/extensions/dataverse/index.d.ts +5 -0
  174. package/dist/components/TaskGrid/extensions/dataverse/index.js +6 -0
  175. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.d.ts +49 -0
  176. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.js +145 -0
  177. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.js.map +1 -0
  178. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlDataProviderFactory.d.ts +11 -0
  179. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlDataProviderFactory.js +16 -0
  180. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlDataProviderFactory.js.map +1 -0
  181. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.d.ts +2 -0
  182. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.js +29 -0
  183. package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.js.map +1 -0
  184. package/dist/components/TaskGrid/interfaces.d.ts +30 -12
  185. package/dist/components/TaskGrid/labels.d.ts +1 -15
  186. package/dist/components/TaskGrid/labels.js +2 -16
  187. package/dist/components/TaskGrid/labels.js.map +1 -1
  188. package/dist/components/TaskGrid/{data-providers/custom-columns-data-provider → providers/custom-columns}/CustomColumnsDataProvider.d.ts +5 -1
  189. package/dist/components/TaskGrid/providers/custom-columns/CustomColumnsDataProvider.js.map +1 -0
  190. package/dist/components/TaskGrid/providers/custom-columns/index.d.ts +1 -0
  191. package/dist/components/TaskGrid/providers/custom-columns/index.js +2 -0
  192. package/dist/components/TaskGrid/providers/custom-columns/index.js.map +1 -0
  193. package/dist/components/TaskGrid/providers/index.d.ts +3 -0
  194. package/dist/components/TaskGrid/providers/index.js +4 -0
  195. package/dist/components/TaskGrid/providers/index.js.map +1 -0
  196. package/dist/components/TaskGrid/{data-providers/saved-query-data-provider → providers/saved-query}/SavedQueryDataProvider.d.ts +13 -8
  197. package/dist/components/TaskGrid/{data-providers/saved-query-data-provider → providers/saved-query}/SavedQueryDataProvider.js +87 -50
  198. package/dist/components/TaskGrid/providers/saved-query/SavedQueryDataProvider.js.map +1 -0
  199. package/dist/components/TaskGrid/providers/saved-query/index.d.ts +1 -0
  200. package/dist/components/TaskGrid/providers/saved-query/index.js +2 -0
  201. package/dist/components/TaskGrid/providers/saved-query/index.js.map +1 -0
  202. package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/TaskDataProvider.d.ts +15 -22
  203. package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/TaskDataProvider.js +35 -26
  204. package/dist/components/TaskGrid/providers/task/TaskDataProvider.js.map +1 -0
  205. package/dist/components/TaskGrid/providers/task/index.js.map +1 -0
  206. package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/RecordTree.js +2 -0
  207. package/dist/components/TaskGrid/providers/task/record-tree/RecordTree.js.map +1 -0
  208. package/dist/components/TaskGrid/providers/task/record-tree/index.js.map +1 -0
  209. package/dist/components/TaskGrid/providers/task/record-tree/patchDataBuilderPrepare.js.map +1 -0
  210. package/dist/index.d.ts +177 -165
  211. package/dist/index.js +1 -0
  212. package/dist/index.js.map +1 -1
  213. package/dist/utils/index.d.ts +1 -0
  214. package/dist/utils/index.js +1 -0
  215. package/dist/utils/index.js.map +1 -1
  216. package/dist/utils/localization/LocalizationService.d.ts +15 -0
  217. package/dist/utils/localization/LocalizationService.js +17 -0
  218. package/dist/utils/localization/LocalizationService.js.map +1 -0
  219. package/dist/utils/localization/index.d.ts +1 -0
  220. package/dist/utils/localization/index.js +2 -0
  221. package/dist/utils/localization/index.js.map +1 -0
  222. package/package.json +5 -4
  223. package/dist/components/TaskGrid/data-providers/custom-columns-data-provider/CustomColumnsDataProvider.js.map +0 -1
  224. package/dist/components/TaskGrid/data-providers/custom-columns-data-provider/TalxisCustomColumnsDataProviderStrategy.d.ts +0 -33
  225. package/dist/components/TaskGrid/data-providers/custom-columns-data-provider/TalxisCustomColumnsDataProviderStrategy.js.map +0 -1
  226. package/dist/components/TaskGrid/data-providers/custom-columns-data-provider/index.d.ts +0 -2
  227. package/dist/components/TaskGrid/data-providers/custom-columns-data-provider/index.js +0 -3
  228. package/dist/components/TaskGrid/data-providers/index.d.ts +0 -3
  229. package/dist/components/TaskGrid/data-providers/index.js +0 -6
  230. package/dist/components/TaskGrid/data-providers/saved-query-data-provider/SavedQueryDataProvider.js.map +0 -1
  231. package/dist/components/TaskGrid/data-providers/saved-query-data-provider/TalxisSavedQueryDataProvider.d.ts +0 -21
  232. package/dist/components/TaskGrid/data-providers/saved-query-data-provider/TalxisSavedQueryDataProvider.js.map +0 -1
  233. package/dist/components/TaskGrid/data-providers/saved-query-data-provider/index.d.ts +0 -2
  234. package/dist/components/TaskGrid/data-providers/saved-query-data-provider/index.js +0 -3
  235. package/dist/components/TaskGrid/data-providers/task-data-provider/TaskDataProvider.js.map +0 -1
  236. package/dist/components/TaskGrid/data-providers/task-data-provider/record-tree/RecordTree.js.map +0 -1
  237. package/dist/components/TaskGrid/data-providers/task-data-provider/record-tree/patchDataBuilderPrepare.js.map +0 -1
  238. /package/dist/components/TaskGrid/{data-providers/task-data-provider → components/grid/cell-renderers/lookup-many}/index.js.map +0 -0
  239. /package/dist/components/TaskGrid/{data-providers/task-data-provider/record-tree → components/grid/lookup-many/colorful-lookup-many/components/multi-value-container}/index.js.map +0 -0
  240. /package/dist/components/TaskGrid/{data-providers → extensions/dataverse}/index.js.map +0 -0
  241. /package/dist/components/TaskGrid/{data-providers/custom-columns-data-provider → providers/custom-columns}/CustomColumnsDataProvider.js +0 -0
  242. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/index.d.ts +0 -0
  243. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/index.js +0 -0
  244. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/RecordTree.d.ts +0 -0
  245. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/index.d.ts +0 -0
  246. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/index.js +0 -0
  247. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/patchDataBuilderPrepare.d.ts +0 -0
  248. /package/dist/components/TaskGrid/{data-providers/task-data-provider → providers/task}/record-tree/patchDataBuilderPrepare.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataverseCustomColumnsStrategy.js","sources":["../../../../../src/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.ts"],"sourcesContent":["import { Attribute, DatasetConstants, DataType, DataTypes, FieldValue, IColumn, IEventEmitter, IRawRecord, IRecord, IRecordSaveOperationResult, Sanitizer } from \"@talxis/client-libraries\";\nimport { DynamicEntityDefinition } from \"@talxis/client-metadata\";\nimport { Attribute as IAttribute } from '@talxis/client-metadata/dist/interfaces/entity/IEntityDefinition';\nimport { ICustomColumnsStrategy } from \"../../providers/custom-columns/CustomColumnsDataProvider\";\n\nexport const ATTRIBUTE_DEFINITION_ENTITY_NAME = 'talxis_attributedefinition';\nexport const ATTRIBUTE_VALUE_ENTITY_NAME = 'talxis_attributevalue';\nexport const CUSTOM_COLUMNS_REFERENED_ENTITY_NAVIGATION_NAME = 'talxis_task_talxis_attributevalue_regardingobjectid';\n\n/** Constructor parameters for {@link DataverseCustomColumnsStrategy}. */\ninterface IDataverseCustomColumnsStrategyParameters {\n /** Logical name of the entity for which dynamic attribute definitions are managed (e.g. `\"task\"`). */\n entityName: string;\n /** Optional record ID used to scope attribute definitions to a specific parent record. */\n recordId?: string;\n}\n\n/**\n * Extends {@link ICustomColumnsStrategy} with Dataverse-specific accessors needed to persist\n * custom column values through the `talxis_attributevalue` entity.\n */\nexport interface IDataverseCustomColumnsStrategy extends ICustomColumnsStrategy {\n /** Saves the dirty custom-column value on `record` to the appropriate `talxis_attributevalue` record, creating it if it doesn't exist yet. */\n saveValueToCustomColumn: (record: IRecord) => Promise<IRecordSaveOperationResult>;\n /** Reads and returns the typed value for `column` from the raw attribute-value payload embedded in `rawRecord`. */\n getValueFromRawRecord: (recordId: string, rawRecord: IRawRecord, column: IColumn) => any;\n}\n\n/**\n * Ready-to-use {@link ICustomColumnsStrategy} implementation for the Dataverse / Talxis platform.\n *\n * Dynamic (user-defined) columns are modelled as `talxis_attributedefinition` records.\n * Column values are stored as `talxis_attributevalue` records linked to the task record.\n *\n * Pass an instance to the `onCreateCustomColumnsStrategy` hook of your descriptor to enable the\n * custom-columns feature in the TaskGrid.\n */\nexport class DataverseCustomColumnsStrategy implements IDataverseCustomColumnsStrategy {\n private _entityName: string;\n private _recordId?: string;\n private _attributes: IAttribute[] = [];\n private _attributeIdsMap: Map<string, string> = new Map();\n\n /** @param parameters — see {@link IDataverseCustomColumnsStrategyParameters}. */\n constructor(parameters: IDataverseCustomColumnsStrategyParameters) {\n this._entityName = parameters.entityName;\n this._recordId = parameters.recordId;\n }\n\n /** Fetches the latest `talxis_attributedefinition` records for the entity/record scope and returns them as `IColumn[]`. */\n public async onRefresh(): Promise<IColumn[]> {\n const entityDefinition = await DynamicEntityDefinition.fetchForRecord(this._entityName, this._recordId);\n this._attributes = entityDefinition.Attributes;\n return this.onGetColumns();\n }\n\n //get all attribute values based given the \n public async onGetRawRecords(): Promise<IRawRecord[]> {\n return [];\n }\n\n public async onGetRawRecord(recordId: string): Promise<IRawRecord> {\n throw new Error('Method not implemented.');\n }\n\n /** Returns the currently cached attribute definitions as `IColumn[]` without a network fetch. */\n public onGetColumns(): IColumn[] {\n return this._attributes.map(attr => {\n const dataType = Attribute.GetDataTypeFromMetadata({ ...attr as any, attributeDescriptor: attr });\n return {\n name: `${attr.LogicalName}${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`,\n isVirtual: true,\n displayName: attr.DisplayName,\n dataType: dataType,\n visualSizeFactor: 200,\n metadata: this._getMetadataForDataType(dataType, attr) as any\n }\n })\n }\n\n /** Deletes the `talxis_attributedefinition` record backing `columnName`, then refreshes the column list. Returns the deleted column name. */\n public async onDeleteColumn(columnName: string): Promise<string | null> {\n const id = columnName.split(`${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`)[0];\n await window.Xrm.WebApi.deleteRecord(ATTRIBUTE_DEFINITION_ENTITY_NAME, id);\n await this.onRefresh();\n return columnName\n }\n\n /** Opens the `talxis_attributedefinition` entity record form in a side dialog. Returns the new column name (with the custom-column suffix) when the record is saved, or `null` when the dialog is dismissed. */\n public async onCreateColumn(): Promise<string | null> {\n const { savedEntityReference } = await window.Xrm.Navigation.navigateTo({\n entityName: ATTRIBUTE_DEFINITION_ENTITY_NAME,\n pageType: 'entityrecord',\n data: {\n 'talxis_entityname': this._entityName,\n 'talxis_recordid': this._recordId,\n }\n }, {\n target: 2,\n });\n if (savedEntityReference && savedEntityReference.length > 0) {\n const entityReference = savedEntityReference[0];\n const id = Sanitizer.Guid.removeGuidBrackets(entityReference.id);\n await this.onRefresh();\n return `${id}${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`;\n }\n else return null\n }\n\n /** Opens the existing `talxis_attributedefinition` record in a side dialog for editing, then refreshes columns. Returns `columnName` unchanged. */\n public async onUpdateColumn(columnName: string): Promise<string | null> {\n const attributeDefinitionId = columnName.split(`${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`)[0];\n await window.Xrm.Navigation.navigateTo({\n entityName: ATTRIBUTE_DEFINITION_ENTITY_NAME,\n pageType: 'entityrecord',\n entityId: attributeDefinitionId\n }, {\n target: 2,\n });\n await this.onRefresh();\n return columnName;\n }\n\n /**\n * Upserts the `talxis_attributevalue` record for the dirty custom-column field on `record`.\n * Creates a new record when no value exists yet; updates the existing one otherwise.\n * @returns A save-operation result indicating success or the encountered error.\n */\n public async saveValueToCustomColumn(record: IRecord): Promise<IRecordSaveOperationResult> {\n const dirtyField = record.getFields().find(field => field.isDirty());\n const column = dirtyField?.getColumn();\n\n if (!column?.name.endsWith(DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX)) {\n return {\n success: true,\n fields: [],\n recordId: record.getRecordId(),\n }\n }\n const attributeDefinitionId = column.name.split(`${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`)[0];\n const regardingObjectId = record.getRecordId();\n const attributeValueId = this._attributeIdsMap.get(`${regardingObjectId}_${attributeDefinitionId}`);\n const payload = {\n [this._getFieldNameForColumn(column)]: this._getValueForPayload(record.getValue(column.name), column),\n 'talxis_serialized_value': this._getSerializedValue(record.getValue(column.name)),\n }\n\n try {\n\n if (!attributeValueId) {\n const result = await window.Xrm.WebApi.createRecord(ATTRIBUTE_VALUE_ENTITY_NAME, {\n ...payload,\n 'talxis_attributedefinitionid@odata.bind': `/talxis_attributedefinitions(${attributeDefinitionId})`,\n 'talxis_regardingobjectid_task@odata.bind': `/tasks(${regardingObjectId})`,\n });\n this._attributeIdsMap.set(`${regardingObjectId}_${attributeDefinitionId}`, result.id);\n return {\n success: true,\n recordId: result.id,\n fields: [column.name]\n }\n }\n\n else {\n await window.Xrm.WebApi.updateRecord(ATTRIBUTE_VALUE_ENTITY_NAME, attributeValueId, {\n ...payload\n });\n return {\n success: true,\n recordId: attributeValueId,\n fields: [column.name]\n }\n }\n }\n catch (err: any) {\n return {\n success: false,\n recordId: attributeValueId ?? '',\n fields: [column.name],\n errors: [{\n message: err.message,\n fieldName: column.name\n }]\n }\n }\n }\n\n /**\n * Resolves the typed value for `column` from the embedded `talxis_attributevalue` collection inside `rawRecord`.\n * Also caches the `talxis_attributevalueid` for subsequent upsert calls in {@link saveValueToCustomColumn}.\n * @returns The typed column value, or `null` when no matching attribute value record is found.\n */\n public getValueFromRawRecord(recordId: string, rawRecord: IRawRecord, column: IColumn) {\n const attribute = this._getAttributeFromRawRecord(recordId, rawRecord, column);\n if (attribute == null) {\n return null;\n }\n const fieldName = this._getFieldNameForColumn(column);\n\n if (column.dataType === DataTypes.OptionSet) {\n const metadata = column.metadata as any;\n const optionSet = metadata.OptionSet as any;\n const option = optionSet.find((option: any) => option.OptionId == attribute['_talxis_choice_value_value']);\n return option ? option.Value : null;\n }\n return new FieldValue(attribute[fieldName], column.dataType).getValue();\n }\n\n private _getAttributeFromRawRecord(recordId: string, rawRecord: IRawRecord, column: IColumn) {\n const attributes: any[] = rawRecord[CUSTOM_COLUMNS_REFERENED_ENTITY_NAVIGATION_NAME] ?? [];\n if (attributes.length === 0) {\n return null;\n }\n const attributeDefinitionId = column.name.split(`${DatasetConstants.CUSTOM_COLUMN_NAME_SUFFIX}`)[0];\n const attribute = attributes.find(attr => attr['_talxis_attributedefinitionid_value'] === attributeDefinitionId);\n if (attribute) {\n this._attributeIdsMap.set(`${recordId}_${attributeDefinitionId}`, attribute['talxis_attributevalueid']);\n }\n return attribute;\n }\n\n private _getFieldNameForColumn(column: IColumn): string {\n switch (column.dataType) {\n case DataTypes.WholeNone:\n case DataTypes.WholeDuration:\n case DataTypes.WholeLanguage:\n case DataTypes.WholeTimeZone:\n return 'talxis_int_value';\n case DataTypes.Decimal:\n return 'talxis_decimal_value';\n case DataTypes.OptionSet:\n return 'talxis_choice_value@odata.bind';\n case DataTypes.TwoOptions:\n return 'talxis_bit_value';\n case DataTypes.DateAndTimeDateOnly:\n return 'talxis_date_value';\n case DataTypes.DateAndTimeDateAndTime: {\n return column.metadata?.Behavior === 3 ? 'talxis_datetime_tzi_value' : 'talxis_datetime_userlocal_value';\n }\n default:\n return 'talxis_text_value';\n }\n }\n\n private _getValueForPayload(value: any, column: IColumn): any {\n switch (column.dataType) {\n case 'TwoOptions': {\n return value == '1' ? true : false;\n }\n case 'OptionSet': {\n const attribute: IAttribute = column.metadata as any;\n const optionSet = attribute.OptionSet as any;\n const optionId = optionSet.find((option: any) => option.Value == value)?.OptionId;\n if (optionId) {\n return `/talxis_attributeoptions(${optionId})`;\n }\n return null;\n }\n case 'DateAndTime.DateAndTime':\n case 'DateAndTime.DateOnly': {\n return value;\n }\n default: {\n return value;\n }\n }\n }\n\n //this is wrong, but it has been developed as part of dynamic attributes like this\n private _getSerializedValue(value: any) {\n return JSON.stringify({\n raw: value,\n error: false,\n errorMessage: ''\n })\n }\n\n private _getMetadataForDataType(dataType: DataType, attr: IAttribute) {\n switch (dataType) {\n case DataTypes.OptionSet:\n case DataTypes.TwoOptions: {\n return {\n ...attr,\n OptionSet: attr.OptionSet?.Options.map(option => {\n return {\n Label: option.Label,\n Value: option.Value,\n Color: option.Color,\n OptionId: option.talxis_OptionId\n }\n })\n }\n }\n default: {\n return attr;\n }\n }\n }\n}"],"names":[],"mappings":";;;AAKO,MAAM,gCAAgC,GAAG,6BAA6B;AACtE,MAAM,2BAA2B,GAAG,wBAAwB;AAC5D,MAAM,+CAA+C,GAAG,sDAAsD;AAqBrH;;;;;;;;AAQG;MACU,8BAA8B,CAAA;;AAOvC,IAAA,WAAA,CAAY,UAAqD,EAAA;QAJzD,IAAW,CAAA,WAAA,GAAiB,EAAE,CAAC;AAC/B,QAAA,IAAA,CAAA,gBAAgB,GAAwB,IAAI,GAAG,EAAE,CAAC;AAItD,QAAA,IAAI,CAAC,WAAW,GAAG,UAAU,C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,KAAK;4BACnB,KAAK,EAAE,MAAM,CAAC,KAAK;4BACnB,KAAK,EAAE,MAAM,CAAC,KAAK;4BACnB,QAAQ,EAAE,MAAM,CAAC,eAAe;yBACnC,CAAA;AACL,qBAAC,CAAC;iBACL,CAAA;AACJ,aAAA;AACD,YAAA,SAAS;AACL,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;AACJ,SAAA;KACJ;AACJ;;;;"}
@@ -0,0 +1,20 @@
1
+ import { ColDef, IGridCustomizer, IGridCustomizerStrategy } from "../../components/grid";
2
+ /**
3
+ * Ready-to-use {@link IGridCustomizerStrategy} for the Dataverse / Talxis platform.
4
+ *
5
+ * Automatically applies custom cell renderers to lookup-many columns (columns whose name
6
+ * ends with the lookup-many suffix). Returned by {@link DataverseTaskGridDescriptor} by default.
7
+ *
8
+ * Extend or replace this class via `onCreateGridCustomizerStrategy` on your descriptor when
9
+ * you need additional AG Grid column, editor, or row-class customizations.
10
+ */
11
+ export declare class DataverseGridCustomizerStrategy implements IGridCustomizerStrategy {
12
+ private _customizer;
13
+ private _provider?;
14
+ private _gridApi;
15
+ /** Stores references to the customizer, task data provider, and grid API. Called once by the internal `GridCustomizer` after the AG Grid instance is ready. */
16
+ onInitialize(customizer: IGridCustomizer): void;
17
+ /** Injects the lookup-many {@link CellRenderer} and sets `autoHeight`/non-editable flags for any column whose name ends with the lookup-many suffix. */
18
+ onGetColumnDefinitions(colDefs: ColDef[]): ColDef[];
19
+ private _getProvider;
20
+ }
@@ -0,0 +1,42 @@
1
+ import { FetchXmlLookupManyCellRenderer } from './lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.js';
2
+ import { LOOKUP_MANY_COLUMN_NAME_SUFFIX } from './lookup-many/LookupManyHandler.js';
3
+
4
+ /**
5
+ * Ready-to-use {@link IGridCustomizerStrategy} for the Dataverse / Talxis platform.
6
+ *
7
+ * Automatically applies custom cell renderers to lookup-many columns (columns whose name
8
+ * ends with the lookup-many suffix). Returned by {@link DataverseTaskGridDescriptor} by default.
9
+ *
10
+ * Extend or replace this class via `onCreateGridCustomizerStrategy` on your descriptor when
11
+ * you need additional AG Grid column, editor, or row-class customizations.
12
+ */
13
+ class DataverseGridCustomizerStrategy {
14
+ /** Stores references to the customizer, task data provider, and grid API. Called once by the internal `GridCustomizer` after the AG Grid instance is ready. */
15
+ onInitialize(customizer) {
16
+ this._customizer = customizer;
17
+ this._provider = customizer.getTaskDataProvider();
18
+ this._gridApi = customizer.getGridApi();
19
+ }
20
+ /** Injects the lookup-many {@link CellRenderer} and sets `autoHeight`/non-editable flags for any column whose name ends with the lookup-many suffix. */
21
+ onGetColumnDefinitions(colDefs) {
22
+ for (const colDef of colDefs) {
23
+ const column = this._getProvider().getColumnsMap()[colDef.field];
24
+ if (column?.name.endsWith(LOOKUP_MANY_COLUMN_NAME_SUFFIX)) {
25
+ colDef.cellRenderer = FetchXmlLookupManyCellRenderer;
26
+ colDef.autoHeight = true;
27
+ colDef.editable = false;
28
+ colDef.suppressKeyboardEvent = () => true;
29
+ }
30
+ }
31
+ return colDefs;
32
+ }
33
+ _getProvider() {
34
+ if (!this._provider) {
35
+ throw new Error('TaskDataProvider is not available in GridCustomizerStrategy. Have you called onInitialize?');
36
+ }
37
+ return this._provider;
38
+ }
39
+ }
40
+
41
+ export { DataverseGridCustomizerStrategy };
42
+ //# sourceMappingURL=DataverseGridCustomizerStrategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataverseGridCustomizerStrategy.js","sources":["../../../../../src/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.ts"],"sourcesContent":["import { ColDef, GridApi, IGridCustomizer, IGridCustomizerStrategy } from \"../../components/grid\";\nimport { ITaskDataProvider } from \"../../providers\";\nimport { FetchXmlLookupManyCellRenderer } from \"./lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer\";\nimport { LOOKUP_MANY_COLUMN_NAME_SUFFIX } from \"./lookup-many/LookupManyHandler\";\n\n/**\n * Ready-to-use {@link IGridCustomizerStrategy} for the Dataverse / Talxis platform.\n *\n * Automatically applies custom cell renderers to lookup-many columns (columns whose name\n * ends with the lookup-many suffix). Returned by {@link DataverseTaskGridDescriptor} by default.\n *\n * Extend or replace this class via `onCreateGridCustomizerStrategy` on your descriptor when\n * you need additional AG Grid column, editor, or row-class customizations.\n */\nexport class DataverseGridCustomizerStrategy implements IGridCustomizerStrategy {\n private _customizer!: IGridCustomizer;\n private _provider?: ITaskDataProvider;\n private _gridApi!: GridApi;\n\n /** Stores references to the customizer, task data provider, and grid API. Called once by the internal `GridCustomizer` after the AG Grid instance is ready. */\n public onInitialize(customizer: IGridCustomizer): void {\n this._customizer = customizer;\n this._provider = customizer.getTaskDataProvider();\n this._gridApi = customizer.getGridApi();\n }\n\n /** Injects the lookup-many {@link CellRenderer} and sets `autoHeight`/non-editable flags for any column whose name ends with the lookup-many suffix. */\n public onGetColumnDefinitions(colDefs: ColDef[]): ColDef[] {\n for (const colDef of colDefs) {\n const column = this._getProvider().getColumnsMap()[colDef.field!];\n if (column?.name.endsWith(LOOKUP_MANY_COLUMN_NAME_SUFFIX)) {\n colDef.cellRenderer = FetchXmlLookupManyCellRenderer;\n colDef.autoHeight = true;\n colDef.editable = false;\n colDef.suppressKeyboardEvent = () => true;\n }\n }\n return colDefs;\n }\n\n private _getProvider(): ITaskDataProvider {\n if (!this._provider) {\n throw new Error('TaskDataProvider is not available in GridCustomizerStrategy. Have you called onInitialize?');\n }\n return this._provider;\n }\n\n}"],"names":[],"mappings":";;;AAKA;;;;;;;;AAQG;MACU,+BAA+B,CAAA;;AAMjC,IAAA,YAAY,CAAC,UAA2B,EAAA;AAC3C,QAAA,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,mBAAmB,EAAE,CAAC;AAClD,QAAA,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;KAC3C;;AAGM,IAAA,sBAAsB,CAAC,OAAiB,EAAA;AAC3C,QAAA,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;AAC1B,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,KAAM,CAAC,CAAC;YAClE,IAAI,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,8BAA8B,CAAC,EAAE;AACvD,gBAAA,MAAM,CAAC,YAAY,GAAG,8BAA8B,CAAC;AACrD,gBAAA,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;AACzB,gBAAA,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC;AACxB,gBAAA,MAAM,CAAC,qBAAqB,GAAG,MAAM,IAAI,CAAC;AAC7C,aAAA;AACJ,SAAA;AACD,QAAA,OAAO,OAAO,CAAC;KAClB;IAEO,YAAY,GAAA;AAChB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACjB,YAAA,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;AACjH,SAAA;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;KACzB;AAEJ;;;;"}
@@ -0,0 +1,49 @@
1
+ import { FetchXmlDataProvider } from "@talxis/client-libraries";
2
+ import { IDeletedUserQueriesResult, ISavedQuery, ISavedQueryStrategy } from "../../providers/saved-query/SavedQueryDataProvider";
3
+ /**
4
+ * Parameters for constructing a {@link DataverseSavedQueryStrategy}.
5
+ */
6
+ interface IDataverseSavedQueryStrategyParameters {
7
+ /** Callback that retrieves the system (shared) saved queries. */
8
+ onGetSystemQueries: () => Promise<ISavedQuery[]>;
9
+ /** Logical name of the entity whose queries are managed (used as `talxis_returnedtypecode`). */
10
+ entityName: string;
11
+ /** Optional record ID used to scope queries to a specific record (`talxis_recordid`). When omitted, only queries with a null `talxis_recordid` are returned. */
12
+ recordId?: string;
13
+ /** Optional owner ID used to filter queries by owner (`ownerid`). */
14
+ ownerId?: string;
15
+ }
16
+ /**
17
+ * Ready-to-use {@link ISavedQueryStrategy} implementation for the Dataverse / Talxis platform.
18
+ *
19
+ * Persists user-defined saved views as `talxis_userquery` records, optionally scoped to a
20
+ * specific parent record (`talxis_recordid`) and/or owner (`ownerid`).
21
+ * System queries are supplied via the `onGetSystemQueries` callback and are never persisted.
22
+ *
23
+ * Also acts as an `IDataProvider` (extends `FetchXmlDataProvider`) so it can be passed directly
24
+ * to the user-query creation dialog.
25
+ */
26
+ export declare class DataverseSavedQueryStrategy extends FetchXmlDataProvider implements ISavedQueryStrategy {
27
+ private _recordId?;
28
+ private _parentEntityName;
29
+ private _onGetSystemQueries;
30
+ constructor(parameters: IDataverseSavedQueryStrategyParameters);
31
+ /** Fetches all `talxis_userquery` records matching the configured entity/record/owner scope and maps them to {@link ISavedQuery}. */
32
+ onGetUserQueries(): Promise<ISavedQuery[]>;
33
+ /** Delegates to the `onGetSystemQueries` callback supplied at construction time. */
34
+ onGetSystemQueries(): Promise<ISavedQuery[]>;
35
+ /** Deletes the specified `talxis_userquery` records and returns a per-query success/failure result. */
36
+ onDeleteUserQueries(queryIds: string[]): Promise<IDeletedUserQueriesResult>;
37
+ /** Serialises the current query metadata (columns, filters, sorting, …) to `talxis_layoutjson` and saves the record. Returns the query ID on success. */
38
+ onUpdateUserQuery(currentQuery: ISavedQuery): Promise<string | null>;
39
+ /**
40
+ * Creates a new `talxis_userquery` record that captures the current grid state (columns, filters, sorting, …).
41
+ * A deterministic ID is generated with a `00001111` prefix so it sorts predictably alongside Dataverse-native GUIDs.
42
+ * @returns The new record ID on success.
43
+ */
44
+ onCreateUserQuery(newQuery: {
45
+ name: string;
46
+ description?: string;
47
+ }, currentQuery: ISavedQuery): Promise<string | null>;
48
+ }
49
+ export {};
@@ -12,27 +12,41 @@ const FETCH_XML = `
12
12
  </entity>
13
13
  </fetch>
14
14
  `;
15
- const _getFetchXml = (recordId, ownerId) => {
15
+ const _getFetchXml = (entityName, recordId, ownerId) => {
16
16
  const fetch = FetchXmlBuilder.fetch.fromXml(FETCH_XML);
17
- if (recordId || ownerId) {
18
- const filter = new FetchXmlBuilder.filter("and");
19
- if (recordId) {
20
- filter.addCondition(new FetchXmlBuilder.condition("talxis_recordid", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(recordId)]));
21
- }
22
- if (ownerId) {
23
- filter.addCondition(new FetchXmlBuilder.condition("ownerid", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(ownerId)]));
24
- }
25
- fetch.entity.addFilter(filter);
17
+ const filter = new FetchXmlBuilder.filter("and");
18
+ filter.addCondition(new FetchXmlBuilder.condition("talxis_returnedtypecode", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(entityName)]));
19
+ if (ownerId) {
20
+ filter.addCondition(new FetchXmlBuilder.condition("ownerid", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(ownerId)]));
21
+ }
22
+ if (recordId) {
23
+ filter.addCondition(new FetchXmlBuilder.condition("talxis_recordid", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(recordId)]));
24
+ }
25
+ else {
26
+ filter.addCondition(new FetchXmlBuilder.condition("talxis_recordid", FetchXmlBuilder.Operator.Null));
26
27
  }
28
+ fetch.entity.addFilter(filter);
27
29
  return fetch.toXml();
28
30
  };
29
- class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
31
+ /**
32
+ * Ready-to-use {@link ISavedQueryStrategy} implementation for the Dataverse / Talxis platform.
33
+ *
34
+ * Persists user-defined saved views as `talxis_userquery` records, optionally scoped to a
35
+ * specific parent record (`talxis_recordid`) and/or owner (`ownerid`).
36
+ * System queries are supplied via the `onGetSystemQueries` callback and are never persisted.
37
+ *
38
+ * Also acts as an `IDataProvider` (extends `FetchXmlDataProvider`) so it can be passed directly
39
+ * to the user-query creation dialog.
40
+ */
41
+ class DataverseSavedQueryStrategy extends FetchXmlDataProvider {
30
42
  constructor(parameters) {
31
- const fetchXml = _getFetchXml(parameters.recordId, parameters.ownerId);
43
+ const fetchXml = _getFetchXml(parameters.entityName, parameters.recordId, parameters.ownerId);
32
44
  super({ fetchXml });
45
+ this._parentEntityName = parameters.entityName;
33
46
  this._recordId = parameters.recordId;
34
47
  this._onGetSystemQueries = parameters.onGetSystemQueries;
35
48
  }
49
+ /** Fetches all `talxis_userquery` records matching the configured entity/record/owner scope and maps them to {@link ISavedQuery}. */
36
50
  async onGetUserQueries() {
37
51
  const result = await this.refresh();
38
52
  return result.map(r => {
@@ -44,9 +58,11 @@ class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
44
58
  };
45
59
  });
46
60
  }
61
+ /** Delegates to the `onGetSystemQueries` callback supplied at construction time. */
47
62
  async onGetSystemQueries() {
48
63
  return this._onGetSystemQueries();
49
64
  }
65
+ /** Deletes the specified `talxis_userquery` records and returns a per-query success/failure result. */
50
66
  async onDeleteUserQueries(queryIds) {
51
67
  const result = await this.deleteRecords(queryIds);
52
68
  if (result.success) {
@@ -63,6 +79,7 @@ class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
63
79
  };
64
80
  }
65
81
  }
82
+ /** Serialises the current query metadata (columns, filters, sorting, …) to `talxis_layoutjson` and saves the record. Returns the query ID on success. */
66
83
  async onUpdateUserQuery(currentQuery) {
67
84
  const record = this.getRecordsMap()[currentQuery.id];
68
85
  if (!record) {
@@ -76,6 +93,11 @@ class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
76
93
  }
77
94
  return currentQuery.id;
78
95
  }
96
+ /**
97
+ * Creates a new `talxis_userquery` record that captures the current grid state (columns, filters, sorting, …).
98
+ * A deterministic ID is generated with a `00001111` prefix so it sorts predictably alongside Dataverse-native GUIDs.
99
+ * @returns The new record ID on success.
100
+ */
79
101
  async onCreateUserQuery(newQuery, currentQuery) {
80
102
  const userqueryid = `00001111${crypto.randomUUID().substring(8)}`;
81
103
  const { name, description } = newQuery;
@@ -85,7 +107,7 @@ class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
85
107
  'talxis_layoutjson': JSON.stringify(queryMetadata),
86
108
  'talxis_name': name,
87
109
  'talxis_description': description,
88
- 'talxis_returnedtypecode': this.getEntityName(),
110
+ 'talxis_returnedtypecode': this._parentEntityName,
89
111
  'talxis_recordid': this._recordId ?? null,
90
112
  };
91
113
  const result = await window.Xrm.WebApi.createRecord('talxis_userquery', rawData);
@@ -93,5 +115,5 @@ class TalxisSavedQueryStrategy extends FetchXmlDataProvider {
93
115
  }
94
116
  }
95
117
 
96
- export { TalxisSavedQueryStrategy };
97
- //# sourceMappingURL=TalxisSavedQueryDataProvider.js.map
118
+ export { DataverseSavedQueryStrategy };
119
+ //# sourceMappingURL=DataverseSavedQueryStrategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataverseSavedQueryStrategy.js","sources":["../../../../../src/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.ts"],"sourcesContent":["import { FetchXmlBuilder, FetchXmlDataProvider } from \"@talxis/client-libraries\";\nimport { IDeletedUserQueriesResult, ISavedQuery, ISavedQueryStrategy } from \"../../providers/saved-query/SavedQueryDataProvider\";\nimport { ErrorHelper } from \"../../../../utils/error-handling\";\n\nconst FETCH_XML = `\n<fetch count=\"5000\" page=\"1\">\n <entity name=\"talxis_userquery\">\n <attribute name=\"talxis_userqueryid\" />\n <attribute name=\"talxis_name\" />\n <attribute name=\"talxis_description\" />\n <attribute name=\"talxis_layoutjson\" />\n <order attribute=\"talxis_name\" />\n </entity>\n</fetch>\n`\n\nconst _getFetchXml = (entityName: string, recordId?: string, ownerId?: string) => {\n const fetch = FetchXmlBuilder.fetch.fromXml(FETCH_XML);\n const filter = new FetchXmlBuilder.filter(\"and\")\n filter.addCondition(new FetchXmlBuilder.condition(\"talxis_returnedtypecode\", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(entityName)]));\n if (ownerId) {\n filter.addCondition(new FetchXmlBuilder.condition(\"ownerid\", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(ownerId)]))\n }\n if (recordId) {\n filter.addCondition(new FetchXmlBuilder.condition(\"talxis_recordid\", FetchXmlBuilder.Operator.Equal, [new FetchXmlBuilder.value(recordId)]))\n }\n else {\n filter.addCondition(new FetchXmlBuilder.condition(\"talxis_recordid\", FetchXmlBuilder.Operator.Null));\n }\n fetch.entity.addFilter(filter);\n return fetch.toXml();\n}\n\n/**\n * Parameters for constructing a {@link DataverseSavedQueryStrategy}.\n */\ninterface IDataverseSavedQueryStrategyParameters {\n /** Callback that retrieves the system (shared) saved queries. */\n onGetSystemQueries: () => Promise<ISavedQuery[]>;\n /** Logical name of the entity whose queries are managed (used as `talxis_returnedtypecode`). */\n entityName: string;\n /** Optional record ID used to scope queries to a specific record (`talxis_recordid`). When omitted, only queries with a null `talxis_recordid` are returned. */\n recordId?: string;\n /** Optional owner ID used to filter queries by owner (`ownerid`). */\n ownerId?: string;\n}\n\n/**\n * Ready-to-use {@link ISavedQueryStrategy} implementation for the Dataverse / Talxis platform.\n *\n * Persists user-defined saved views as `talxis_userquery` records, optionally scoped to a\n * specific parent record (`talxis_recordid`) and/or owner (`ownerid`).\n * System queries are supplied via the `onGetSystemQueries` callback and are never persisted.\n *\n * Also acts as an `IDataProvider` (extends `FetchXmlDataProvider`) so it can be passed directly\n * to the user-query creation dialog.\n */\nexport class DataverseSavedQueryStrategy extends FetchXmlDataProvider implements ISavedQueryStrategy {\n private _recordId?: string;\n private _parentEntityName: string;\n private _onGetSystemQueries: () => Promise<ISavedQuery[]>;\n\n constructor(parameters: IDataverseSavedQueryStrategyParameters) {\n const fetchXml = _getFetchXml(parameters.entityName, parameters.recordId, parameters.ownerId);\n super({ fetchXml });\n this._parentEntityName = parameters.entityName;\n this._recordId = parameters.recordId;\n this._onGetSystemQueries = parameters.onGetSystemQueries;\n }\n\n /** Fetches all `talxis_userquery` records matching the configured entity/record/owner scope and maps them to {@link ISavedQuery}. */\n public async onGetUserQueries(): Promise<ISavedQuery[]> {\n const result = await this.refresh();\n return result.map(r => {\n return {\n id: r.getValue('talxis_userqueryid'),\n name: r.getValue('talxis_name'),\n description: r.getValue('talxis_description'),\n ...JSON.parse(r.getValue('talxis_layoutjson'))\n }\n });\n }\n\n /** Delegates to the `onGetSystemQueries` callback supplied at construction time. */\n public async onGetSystemQueries(): Promise<ISavedQuery[]> {\n return this._onGetSystemQueries();\n }\n\n /** Deletes the specified `talxis_userquery` records and returns a per-query success/failure result. */\n public async onDeleteUserQueries(queryIds: string[]): Promise<IDeletedUserQueriesResult> {\n const result = await this.deleteRecords(queryIds);\n if (result.success) {\n return {\n success: true,\n deletedQueryIds: queryIds\n }\n }\n else {\n return {\n success: false,\n deletedQueryIds: result.results.filter(r => r.success).map(r => r.recordId),\n errors: result.results.filter(r => !r.success).map(r => ({ queryId: r.recordId, error: r.errorMessage }))\n }\n }\n }\n\n /** Serialises the current query metadata (columns, filters, sorting, …) to `talxis_layoutjson` and saves the record. Returns the query ID on success. */\n public async onUpdateUserQuery(currentQuery: ISavedQuery): Promise<string | null> {\n const record = this.getRecordsMap()[currentQuery.id];\n if (!record) {\n throw new Error(`Query record with id ${currentQuery.id} not found`);\n }\n const { name, id, ...queryMetadata } = currentQuery;\n record.setValue('talxis_layoutjson', JSON.stringify(queryMetadata));\n const result = await record.save();\n if (!result.success) {\n throw new Error(`Failed to update query with id ${currentQuery.id}: ${ErrorHelper.getMessageFromError(result.errors?.map((e: any) => e.message).join('\\n'))}`);\n }\n return currentQuery.id;\n }\n\n /**\n * Creates a new `talxis_userquery` record that captures the current grid state (columns, filters, sorting, …).\n * A deterministic ID is generated with a `00001111` prefix so it sorts predictably alongside Dataverse-native GUIDs.\n * @returns The new record ID on success.\n */\n public async onCreateUserQuery(newQuery: { name: string; description?: string; }, currentQuery: ISavedQuery): Promise<string | null> {\n const userqueryid = `00001111${crypto.randomUUID().substring(8)}`;\n const { name, description } = newQuery;\n const { id, name: queryName, ...queryMetadata } = currentQuery;\n\n const rawData = {\n 'talxis_userqueryid': userqueryid,\n 'talxis_layoutjson': JSON.stringify(queryMetadata),\n 'talxis_name': name,\n 'talxis_description': description,\n 'talxis_returnedtypecode': this._parentEntityName,\n 'talxis_recordid': this._recordId ?? null,\n }\n const result = await window.Xrm.WebApi.createRecord('talxis_userquery', rawData);\n\n return result.id;\n }\n}"],"names":[],"mappings":";;;AAIA,MAAM,SAAS,GAAG,CAAA;;;;;;;;;;CAUjB,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,QAAiB,EAAE,OAAgB,KAAI;IAC7E,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAChD,MAAM,CAAC,YAAY,CAAC,IAAI,eAAe,CAAC,SAAS,CAAC,yBAAyB,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACvJ,IAAA,IAAI,OAAO,EAAE;QACT,MAAM,CAAC,YAAY,CAAC,IAAI,eAAe,CAAC,SAAS,CAAC,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AACtI,KAAA;AACD,IAAA,IAAI,QAAQ,EAAE;QACV,MAAM,CAAC,YAAY,CAAC,IAAI,eAAe,CAAC,SAAS,CAAC,iBAAiB,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAC/I,KAAA;AACI,SAAA;AACD,QAAA,MAAM,CAAC,YAAY,CAAC,IAAI,eAAe,CAAC,SAAS,CAAC,iBAAiB,EAAE,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACxG,KAAA;AACD,IAAA,KAAK,CAAC,MAA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AAA,EAAkC,YAAY,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAClK,SAAA;QACD,OAAO,YAAY,CAAC,EAAE,CAAC;KAC1B;AAED;;;;AAIG;AACI,IAAA,MAAM,iBAAiB,CAAC,QAAiD,EAAE,YAAyB,EAAA;AACvG,QAAA,MAAM,WAAW,GAAG,CAAW,QAAA,EAAA,MAAM,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;AAClE,QAAA,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;AACvC,QAAA,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,GAAG,YAAY,CAAC;AAE/D,QAAA,MAAM,OAAO,GAAG;AACZ,YAAA,oBAAoB,EAAE,WAAW;AACjC,YAAA,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;AAClD,YAAA,aAAa,EAAE,IAAI;AACnB,YAAA,oBAAoB,EAAE,WAAW;YACjC,yBAAyB,EAAE,IAAI,CAAC,iBAAiB;AACjD,YAAA,iBAAiB,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI;SAC5C,CAAA;AACD,QAAA,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAEjF,OAAO,MAAM,CAAC,EAAE,CAAC;KACpB;AACJ;;;;"}
@@ -0,0 +1,100 @@
1
+ /// <reference types="@types/powerapps-component-framework" />
2
+ import { IDataProvider } from "@talxis/client-libraries";
3
+ import { ISavedQuery, ISavedQueryStrategy, ITaskDataProviderStrategy } from "../../providers";
4
+ import { IFieldMapping as IFieldMappingBase, ITaskGridDescriptor, ITaskGridParameters, ITaskStrategyDeps } from "../../interfaces";
5
+ import { IGridCustomizerStrategy } from "../../components/grid";
6
+ /** Minimal reference to a project record. Use `name` when already known to skip a metadata fetch. */
7
+ export interface IProjectReference extends Omit<ComponentFramework.EntityReference, 'name'> {
8
+ /** Logical entity name of the project entity (e.g. `"talxis_project"`). */
9
+ etn: string;
10
+ /** Display name of the project record. When provided, the descriptor skips a `getEntityMetadata` call during `onLoadDependencies`. */
11
+ name?: string;
12
+ }
13
+ /** Dataverse-specific field mapping. Extends the base with an optional project lookup column. */
14
+ export interface IFieldMapping extends Omit<IFieldMappingBase, 'stateCode'> {
15
+ /** Logical name of the lookup attribute that points to the parent project record. Required when `project` is set on the descriptor. */
16
+ projectId?: string;
17
+ }
18
+ /** Constructor parameters for {@link DataverseTaskGridDescriptor}. */
19
+ interface IDataverseTaskGridDescriptorParams {
20
+ /** FetchXML that drives the initial data load. May use Liquid template variables (e.g. `{{ projectId }}`). */
21
+ baseFetchXml: string;
22
+ /** Maps logical entity attribute names to the roles expected by TaskGrid (e.g. `statecode` → `stateCode`). */
23
+ fieldMapping: IFieldMapping;
24
+ /** System (non-deletable) views exposed in the view switcher. At least one is required. */
25
+ systemQueries: ISavedQuery[];
26
+ /** Optional project record reference. When provided, new tasks are pre-linked to this project and `baseFetchXml` receives `{{ projectId }}`. */
27
+ project?: IProjectReference;
28
+ /** AG Grid Enterprise license key. Omit to run in community mode. */
29
+ agGridLicenseKey?: string;
30
+ /** Set to `true` to enable personal saved views (user queries) via {@link DataverseSavedQueryStrategy}. Defaults to `false`. */
31
+ enableUserQueries?: boolean;
32
+ /** Fine-grained feature flags forwarded to the grid. See {@link ITaskGridParameters}. */
33
+ gridParameters?: ITaskGridParameters;
34
+ /** When set, the hierarchy is rooted at this task ID instead of showing all top-level tasks. */
35
+ rootTaskId?: string;
36
+ /** ID of the currently logged-in user. Used to scope user queries to the current owner. */
37
+ userId?: string;
38
+ /** Form ID to open when editing a single existing task. */
39
+ editFormId?: string;
40
+ /** Form ID to open when creating a new task via the dialog flow (non-inline). */
41
+ createFormId?: string;
42
+ /** Form ID to open for bulk-editing multiple selected tasks. */
43
+ bulkEditFormId?: string;
44
+ /** Set to `true` to enable cascade delete when deleting tasks with children. Defaults to `false`. */
45
+ enableCascadeDelete?: boolean;
46
+ /** Set to `true` to allow deletion of tasks that have child tasks. When `false`, such tasks are excluded from deletion and an error is returned. Defaults to `false`. */
47
+ enableDeletingTasksWithChildren?: boolean;
48
+ }
49
+ /**
50
+ * Ready-to-use {@link ITaskGridDescriptor} implementation for the Dataverse / Talxis platform.
51
+ *
52
+ * Wires together all required strategies — task CRUD, saved queries, grid customization — from
53
+ * a single constructor parameter object. Pass an instance to `TaskGridDatasetControlFactory.createInstance`.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const descriptor = new DataverseTaskGridDescriptor({
58
+ * baseFetchXml: myFetchXml,
59
+ * fieldMapping: { parentId: 'talxis_parenttaskid', subject: 'subject', stackRank: 'talxis_stackrank' },
60
+ * systemQueries: [myDefaultView],
61
+ * });
62
+ * const control = await TaskGridDatasetControlFactory.createInstance({ taskGridDescriptor: descriptor, ... });
63
+ * ```
64
+ */
65
+ export declare class DataverseTaskGridDescriptor implements ITaskGridDescriptor {
66
+ private _fetchXml;
67
+ private _fieldMapping;
68
+ private _systemQueries;
69
+ private _taskEntityName;
70
+ private _editFormId?;
71
+ private _createFormId?;
72
+ private _bulkEditFormId?;
73
+ private _userId?;
74
+ private _rootTaskId?;
75
+ private _projectReference?;
76
+ private _params;
77
+ private _gridParameters?;
78
+ private _agGridLicenseKey?;
79
+ /** @param params — see {@link IDataverseTaskGridDescriptorParams} for full documentation of each option. */
80
+ constructor(params: IDataverseTaskGridDescriptorParams);
81
+ /** Resolves the project entity reference (fetches display name when not supplied). Called once by the factory before any strategy is created. */
82
+ onLoadDependencies(): Promise<void>;
83
+ /** Returns the field mapping with `stateCode` hard-coded to `"statecode"` (standard Dataverse attribute name). */
84
+ onGetFieldMapping(): IFieldMappingBase;
85
+ /** Returns a {@link DataverseSavedQueryStrategy} when `enableUserQueries` is `true`, otherwise a read-only stub that exposes only the system queries. */
86
+ onCreateSavedQueryStrategy(): ISavedQueryStrategy;
87
+ /** Returns a {@link DataverseTaskStrategy} configured with the descriptor's FetchXML, form IDs, and project reference. */
88
+ onCreateTaskStrategy(deps: ITaskStrategyDeps): ITaskDataProviderStrategy;
89
+ /** Returns a {@link DataverseSavedQueryStrategy} pre-configured as a data provider for the user-query creation/update dialog, with `talxis_name` and `talxis_description` columns. */
90
+ onCreateUserQueryDataProvider(): IDataProvider;
91
+ /** Returns the AG Grid Enterprise license key supplied at construction time, or `undefined` for community mode. */
92
+ onGetAgGridLicenseKey(): string | undefined;
93
+ /** Returns the feature flags supplied at construction time, or an empty object (all features enabled) when omitted. */
94
+ onGetGridParameters(): ITaskGridParameters;
95
+ /** Returns a {@link DataverseGridCustomizerStrategy} that adds lookup-many cell renderers for columns whose name ends with the lookup-many suffix. */
96
+ onCreateGridCustomizerStrategy(): IGridCustomizerStrategy;
97
+ private _getProjectReference;
98
+ private _getTaskEntityNameFromFetchXml;
99
+ }
100
+ export {};
@@ -0,0 +1,145 @@
1
+ import { FetchXmlBuilder } from '@talxis/client-libraries';
2
+ import { DataverseSavedQueryStrategy } from './DataverseSavedQueryStrategy.js';
3
+ import { DataverseTaskStrategy } from './DataverseTaskStrategy.js';
4
+ import { DataverseGridCustomizerStrategy } from './DataverseGridCustomizerStrategy.js';
5
+
6
+ /**
7
+ * Ready-to-use {@link ITaskGridDescriptor} implementation for the Dataverse / Talxis platform.
8
+ *
9
+ * Wires together all required strategies — task CRUD, saved queries, grid customization — from
10
+ * a single constructor parameter object. Pass an instance to `TaskGridDatasetControlFactory.createInstance`.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const descriptor = new DataverseTaskGridDescriptor({
15
+ * baseFetchXml: myFetchXml,
16
+ * fieldMapping: { parentId: 'talxis_parenttaskid', subject: 'subject', stackRank: 'talxis_stackrank' },
17
+ * systemQueries: [myDefaultView],
18
+ * });
19
+ * const control = await TaskGridDatasetControlFactory.createInstance({ taskGridDescriptor: descriptor, ... });
20
+ * ```
21
+ */
22
+ class DataverseTaskGridDescriptor {
23
+ /** @param params — see {@link IDataverseTaskGridDescriptorParams} for full documentation of each option. */
24
+ constructor(params) {
25
+ this._systemQueries = [];
26
+ this._params = params;
27
+ this._systemQueries = params.systemQueries;
28
+ this._fieldMapping = params.fieldMapping;
29
+ this._userId = params.userId;
30
+ this._fetchXml = params.baseFetchXml;
31
+ this._rootTaskId = params.rootTaskId;
32
+ this._editFormId = params.editFormId;
33
+ this._createFormId = params.createFormId;
34
+ this._bulkEditFormId = params.bulkEditFormId;
35
+ this._agGridLicenseKey = params.agGridLicenseKey;
36
+ this._gridParameters = params.gridParameters;
37
+ this._taskEntityName = this._getTaskEntityNameFromFetchXml(params.baseFetchXml);
38
+ }
39
+ /** Resolves the project entity reference (fetches display name when not supplied). Called once by the factory before any strategy is created. */
40
+ async onLoadDependencies() {
41
+ this._projectReference = await this._getProjectReference();
42
+ }
43
+ /** Returns the field mapping with `stateCode` hard-coded to `"statecode"` (standard Dataverse attribute name). */
44
+ onGetFieldMapping() {
45
+ return {
46
+ ...this._fieldMapping,
47
+ //dataverse uses this for all entities
48
+ stateCode: 'statecode',
49
+ };
50
+ }
51
+ /** Returns a {@link DataverseSavedQueryStrategy} when `enableUserQueries` is `true`, otherwise a read-only stub that exposes only the system queries. */
52
+ onCreateSavedQueryStrategy() {
53
+ if (this._gridParameters?.enableUserQueries) {
54
+ return new DataverseSavedQueryStrategy({
55
+ onGetSystemQueries: async () => this._systemQueries,
56
+ ownerId: this._userId,
57
+ entityName: this._taskEntityName,
58
+ recordId: this._projectReference?.id.guid
59
+ });
60
+ }
61
+ return {
62
+ onGetSystemQueries: async () => this._systemQueries,
63
+ onGetUserQueries: async () => [],
64
+ onDeleteUserQueries: function (queryIds) {
65
+ throw new Error("Function not implemented.");
66
+ },
67
+ onUpdateUserQuery: function (currentQuery) {
68
+ throw new Error("Function not implemented.");
69
+ },
70
+ onCreateUserQuery: function (newQuery, currentQuery) {
71
+ throw new Error("Function not implemented.");
72
+ }
73
+ };
74
+ }
75
+ /** Returns a {@link DataverseTaskStrategy} configured with the descriptor's FetchXML, form IDs, and project reference. */
76
+ onCreateTaskStrategy(deps) {
77
+ return new DataverseTaskStrategy({
78
+ fetchXml: this._fetchXml,
79
+ projectReference: this._projectReference,
80
+ rootTaskId: this._rootTaskId,
81
+ bulkEditFormId: this._bulkEditFormId,
82
+ createFormId: this._createFormId,
83
+ editFormId: this._editFormId,
84
+ isInlineCreateEnabled: this._gridParameters?.enableInlineCreation ?? true,
85
+ isCascadeDeleteEnabled: this._params.enableCascadeDelete ?? false,
86
+ isDeletingTasksWithChildrenEnabled: this._params.enableDeletingTasksWithChildren ?? false,
87
+ });
88
+ }
89
+ /** Returns a {@link DataverseSavedQueryStrategy} pre-configured as a data provider for the user-query creation/update dialog, with `talxis_name` and `talxis_description` columns. */
90
+ onCreateUserQueryDataProvider() {
91
+ const provider = new DataverseSavedQueryStrategy({
92
+ recordId: this._projectReference?.id.guid,
93
+ entityName: this._taskEntityName,
94
+ ownerId: this._userId,
95
+ onGetSystemQueries: async () => {
96
+ return [];
97
+ }
98
+ });
99
+ provider.setColumns([{
100
+ name: 'talxis_name',
101
+ visualSizeFactor: 200
102
+ }, {
103
+ name: 'talxis_description',
104
+ visualSizeFactor: 300
105
+ }]);
106
+ return provider;
107
+ }
108
+ /** Returns the AG Grid Enterprise license key supplied at construction time, or `undefined` for community mode. */
109
+ onGetAgGridLicenseKey() {
110
+ return this._agGridLicenseKey;
111
+ }
112
+ /** Returns the feature flags supplied at construction time, or an empty object (all features enabled) when omitted. */
113
+ onGetGridParameters() {
114
+ return this._gridParameters ?? {};
115
+ }
116
+ /** Returns a {@link DataverseGridCustomizerStrategy} that adds lookup-many cell renderers for columns whose name ends with the lookup-many suffix. */
117
+ onCreateGridCustomizerStrategy() {
118
+ return new DataverseGridCustomizerStrategy();
119
+ }
120
+ async _getProjectReference() {
121
+ if (!this._params.project)
122
+ return undefined;
123
+ if (this._params.project.name) {
124
+ return this._params.project;
125
+ }
126
+ else {
127
+ const projectId = this._params.project.id.guid;
128
+ const projectEntityName = this._params.project.etn;
129
+ const metadata = await window.Xrm.Utility.getEntityMetadata(projectEntityName);
130
+ const projectData = await window.Xrm.WebApi.retrieveRecord(projectEntityName, projectId, `?$select=${metadata.PrimaryNameAttribute}`);
131
+ return {
132
+ id: { guid: projectId },
133
+ name: projectData[metadata.PrimaryNameAttribute],
134
+ etn: projectEntityName
135
+ };
136
+ }
137
+ }
138
+ _getTaskEntityNameFromFetchXml(fetchXml) {
139
+ const fetchXmlBuilder = FetchXmlBuilder.fetch.fromXml(fetchXml);
140
+ return fetchXmlBuilder.entity.name;
141
+ }
142
+ }
143
+
144
+ export { DataverseTaskGridDescriptor };
145
+ //# sourceMappingURL=DataverseTaskGridDescriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataverseTaskGridDescriptor.js","sources":["../../../../../src/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.ts"],"sourcesContent":["import { FetchXmlBuilder, IDataProvider } from \"@talxis/client-libraries\";\nimport { IDeletedUserQueriesResult, ISavedQuery, ISavedQueryStrategy, ITaskDataProviderStrategy } from \"../../providers\";\nimport { IFieldMapping as IFieldMappingBase, ITaskGridDescriptor, ITaskGridParameters, ITaskStrategyDeps } from \"../../interfaces\";\nimport { IGridCustomizerStrategy } from \"../../components/grid\";\nimport { DataverseSavedQueryStrategy } from \"./DataverseSavedQueryStrategy\";\nimport { DataverseTaskStrategy } from \"./DataverseTaskStrategy\";\nimport { DataverseGridCustomizerStrategy } from \"./DataverseGridCustomizerStrategy\";\n\n/** Minimal reference to a project record. Use `name` when already known to skip a metadata fetch. */\nexport interface IProjectReference extends Omit<ComponentFramework.EntityReference, 'name'> {\n /** Logical entity name of the project entity (e.g. `\"talxis_project\"`). */\n etn: string;\n /** Display name of the project record. When provided, the descriptor skips a `getEntityMetadata` call during `onLoadDependencies`. */\n name?: string;\n}\n\n/** Dataverse-specific field mapping. Extends the base with an optional project lookup column. */\nexport interface IFieldMapping extends Omit<IFieldMappingBase, 'stateCode'> {\n /** Logical name of the lookup attribute that points to the parent project record. Required when `project` is set on the descriptor. */\n projectId?: string;\n}\n\n/** Constructor parameters for {@link DataverseTaskGridDescriptor}. */\ninterface IDataverseTaskGridDescriptorParams {\n /** FetchXML that drives the initial data load. May use Liquid template variables (e.g. `{{ projectId }}`). */\n baseFetchXml: string;\n /** Maps logical entity attribute names to the roles expected by TaskGrid (e.g. `statecode` → `stateCode`). */\n fieldMapping: IFieldMapping;\n /** System (non-deletable) views exposed in the view switcher. At least one is required. */\n systemQueries: ISavedQuery[];\n /** Optional project record reference. When provided, new tasks are pre-linked to this project and `baseFetchXml` receives `{{ projectId }}`. */\n project?: IProjectReference;\n /** AG Grid Enterprise license key. Omit to run in community mode. */\n agGridLicenseKey?: string;\n /** Set to `true` to enable personal saved views (user queries) via {@link DataverseSavedQueryStrategy}. Defaults to `false`. */\n enableUserQueries?: boolean;\n /** Fine-grained feature flags forwarded to the grid. See {@link ITaskGridParameters}. */\n gridParameters?: ITaskGridParameters;\n /** When set, the hierarchy is rooted at this task ID instead of showing all top-level tasks. */\n rootTaskId?: string;\n /** ID of the currently logged-in user. Used to scope user queries to the current owner. */\n userId?: string;\n /** Form ID to open when editing a single existing task. */\n editFormId?: string;\n /** Form ID to open when creating a new task via the dialog flow (non-inline). */\n createFormId?: string;\n /** Form ID to open for bulk-editing multiple selected tasks. */\n bulkEditFormId?: string;\n /** Set to `true` to enable cascade delete when deleting tasks with children. Defaults to `false`. */\n enableCascadeDelete?: boolean;\n /** Set to `true` to allow deletion of tasks that have child tasks. When `false`, such tasks are excluded from deletion and an error is returned. Defaults to `false`. */\n enableDeletingTasksWithChildren?: boolean;\n}\n\n/**\n * Ready-to-use {@link ITaskGridDescriptor} implementation for the Dataverse / Talxis platform.\n *\n * Wires together all required strategies — task CRUD, saved queries, grid customization — from\n * a single constructor parameter object. Pass an instance to `TaskGridDatasetControlFactory.createInstance`.\n *\n * @example\n * ```ts\n * const descriptor = new DataverseTaskGridDescriptor({\n * baseFetchXml: myFetchXml,\n * fieldMapping: { parentId: 'talxis_parenttaskid', subject: 'subject', stackRank: 'talxis_stackrank' },\n * systemQueries: [myDefaultView],\n * });\n * const control = await TaskGridDatasetControlFactory.createInstance({ taskGridDescriptor: descriptor, ... });\n * ```\n */\nexport class DataverseTaskGridDescriptor implements ITaskGridDescriptor {\n private _fetchXml: string;\n private _fieldMapping: IFieldMapping;\n private _systemQueries: ISavedQuery[] = [];\n private _taskEntityName: string;\n private _editFormId?: string;\n private _createFormId?: string;\n private _bulkEditFormId?: string;\n private _userId?: string;\n private _rootTaskId?: string;\n private _projectReference?: ComponentFramework.EntityReference;\n private _params: IDataverseTaskGridDescriptorParams;\n private _gridParameters?: ITaskGridParameters;\n private _agGridLicenseKey?: string;\n\n /** @param params — see {@link IDataverseTaskGridDescriptorParams} for full documentation of each option. */\n constructor(params: IDataverseTaskGridDescriptorParams) {\n this._params = params;\n this._systemQueries = params.systemQueries;\n this._fieldMapping = params.fieldMapping;\n this._userId = params.userId;\n this._fetchXml = params.baseFetchXml;\n this._rootTaskId = params.rootTaskId;\n this._editFormId = params.editFormId;\n this._createFormId = params.createFormId;\n this._bulkEditFormId = params.bulkEditFormId;\n this._agGridLicenseKey = params.agGridLicenseKey;\n this._gridParameters = params.gridParameters;\n this._taskEntityName = this._getTaskEntityNameFromFetchXml(params.baseFetchXml);\n }\n\n /** Resolves the project entity reference (fetches display name when not supplied). Called once by the factory before any strategy is created. */\n public async onLoadDependencies(): Promise<void> {\n this._projectReference = await this._getProjectReference();\n }\n\n /** Returns the field mapping with `stateCode` hard-coded to `\"statecode\"` (standard Dataverse attribute name). */\n public onGetFieldMapping(): IFieldMappingBase {\n this\n return {\n ...this._fieldMapping,\n //dataverse uses this for all entities\n stateCode: 'statecode',\n }\n }\n\n /** Returns a {@link DataverseSavedQueryStrategy} when `enableUserQueries` is `true`, otherwise a read-only stub that exposes only the system queries. */\n public onCreateSavedQueryStrategy(): ISavedQueryStrategy {\n if (this._gridParameters?.enableUserQueries) {\n return new DataverseSavedQueryStrategy({\n onGetSystemQueries: async () => this._systemQueries,\n ownerId: this._userId,\n entityName: this._taskEntityName,\n recordId: this._projectReference?.id.guid\n });\n }\n return {\n onGetSystemQueries: async () => this._systemQueries,\n onGetUserQueries: async () => [],\n onDeleteUserQueries: function (queryIds: string[]): Promise<IDeletedUserQueriesResult> {\n throw new Error(\"Function not implemented.\");\n },\n onUpdateUserQuery: function (currentQuery: ISavedQuery): Promise<string | null> {\n throw new Error(\"Function not implemented.\");\n },\n onCreateUserQuery: function (newQuery: { name: string; description?: string; }, currentQuery: ISavedQuery): Promise<string | null> {\n throw new Error(\"Function not implemented.\");\n }\n }\n }\n\n /** Returns a {@link DataverseTaskStrategy} configured with the descriptor's FetchXML, form IDs, and project reference. */\n public onCreateTaskStrategy(deps: ITaskStrategyDeps): ITaskDataProviderStrategy {\n return new DataverseTaskStrategy({\n fetchXml: this._fetchXml,\n projectReference: this._projectReference,\n rootTaskId: this._rootTaskId,\n bulkEditFormId: this._bulkEditFormId,\n createFormId: this._createFormId,\n editFormId: this._editFormId,\n isInlineCreateEnabled: this._gridParameters?.enableInlineCreation ?? true,\n isCascadeDeleteEnabled: this._params.enableCascadeDelete ?? false,\n isDeletingTasksWithChildrenEnabled: this._params.enableDeletingTasksWithChildren ?? false,\n });\n }\n /** Returns a {@link DataverseSavedQueryStrategy} pre-configured as a data provider for the user-query creation/update dialog, with `talxis_name` and `talxis_description` columns. */\n public onCreateUserQueryDataProvider(): IDataProvider {\n const provider = new DataverseSavedQueryStrategy({\n recordId: this._projectReference?.id.guid,\n entityName: this._taskEntityName,\n ownerId: this._userId,\n onGetSystemQueries: async () => {\n return []\n }\n })\n provider.setColumns([{\n name: 'talxis_name',\n visualSizeFactor: 200\n }, {\n name: 'talxis_description',\n visualSizeFactor: 300\n }]);\n return provider;\n }\n\n /** Returns the AG Grid Enterprise license key supplied at construction time, or `undefined` for community mode. */\n public onGetAgGridLicenseKey() {\n return this._agGridLicenseKey;\n }\n\n /** Returns the feature flags supplied at construction time, or an empty object (all features enabled) when omitted. */\n public onGetGridParameters(): ITaskGridParameters {\n return this._gridParameters ?? {};\n }\n\n /** Returns a {@link DataverseGridCustomizerStrategy} that adds lookup-many cell renderers for columns whose name ends with the lookup-many suffix. */\n public onCreateGridCustomizerStrategy(): IGridCustomizerStrategy {\n return new DataverseGridCustomizerStrategy();\n }\n\n private async _getProjectReference(): Promise<ComponentFramework.EntityReference | undefined> {\n if (!this._params.project) return undefined;\n if (this._params.project.name) {\n return this._params.project as ComponentFramework.EntityReference;\n }\n else {\n const projectId = this._params.project.id.guid;\n const projectEntityName = this._params.project.etn;\n const metadata = await window.Xrm.Utility.getEntityMetadata(projectEntityName);\n const projectData = await window.Xrm.WebApi.retrieveRecord(projectEntityName, projectId, `?$select=${metadata.PrimaryNameAttribute}`);\n\n return {\n id: { guid: projectId },\n name: projectData[metadata.PrimaryNameAttribute],\n etn: projectEntityName\n }\n }\n }\n\n private _getTaskEntityNameFromFetchXml(fetchXml: string): string {\n const fetchXmlBuilder = FetchXmlBuilder.fetch.fromXml(fetchXml);\n return fetchXmlBuilder.entity.name;\n }\n\n}"],"names":[],"mappings":";;;;;AAsDA;;;;;;;;;;;;;;;AAeG;MACU,2BAA2B,CAAA;;AAgBpC,IAAA,WAAA,CAAY,MAA0C,EAAA;QAb9C,IAAc,CAAA,cAAA,GAAkB,EAAE,CAAC;AAcvC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AACtB,QAAA,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;AAC3C,QAAA,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,C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