@talxis/base-controls 1.2406.15 → 1.2407.1

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 (206) hide show
  1. package/dist/Grid-7ed3dd4c.js +1 -0
  2. package/dist/components/DateTime/DateTime.js +1 -1
  3. package/dist/components/DateTime/components/Calendar.d.ts +8 -3
  4. package/dist/components/DateTime/components/Calendar.js +1 -0
  5. package/dist/components/DateTime/hooks/useDateTime.d.ts +29 -4
  6. package/dist/components/DateTime/hooks/useDateTime.js +1 -0
  7. package/dist/components/DateTime/index.d.ts +3 -0
  8. package/dist/components/DateTime/index.js +1 -0
  9. package/dist/components/DateTime/interfaces.d.ts +4 -25
  10. package/dist/components/DateTime/interfaces.js +1 -0
  11. package/dist/components/DateTime/styles.d.ts +1 -4
  12. package/dist/components/DateTime/styles.js +1 -0
  13. package/dist/components/DateTime/translations.d.ts +19 -3
  14. package/dist/components/DateTime/translations.js +1 -0
  15. package/dist/components/Decimal/Decimal.js +1 -1
  16. package/dist/components/Decimal/components/ArrowButtons.d.ts +10 -0
  17. package/dist/components/Decimal/components/ArrowButtons.js +1 -0
  18. package/dist/components/Decimal/components/styles.d.ts +20 -0
  19. package/dist/components/Decimal/components/styles.js +1 -0
  20. package/dist/components/Decimal/index.d.ts +2 -0
  21. package/dist/components/Decimal/index.js +1 -0
  22. package/dist/components/Decimal/interfaces.d.ts +5 -5
  23. package/dist/components/Decimal/interfaces.js +1 -0
  24. package/dist/components/Duration/Duration.js +1 -1
  25. package/dist/components/Duration/index.d.ts +2 -0
  26. package/dist/components/Duration/index.js +1 -0
  27. package/dist/components/Duration/interfaces.d.ts +6 -24
  28. package/dist/components/Duration/interfaces.js +1 -0
  29. package/dist/components/Duration/translations.d.ts +26 -2
  30. package/dist/components/Duration/translations.js +1 -0
  31. package/dist/components/Grid/Grid.d.ts +1 -3
  32. package/dist/components/Grid/Grid.js +1 -10
  33. package/dist/components/Grid/GridContext.d.ts +3 -0
  34. package/dist/components/Grid/GridContext.js +1 -0
  35. package/dist/components/Grid/constants.js +1 -0
  36. package/dist/components/Grid/core/components/AgGrid/AgGrid.js +1 -0
  37. package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.js +1 -0
  38. package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/styles.js +1 -0
  39. package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.js +1 -0
  40. package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/styles.js +1 -0
  41. package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.d.ts +1 -1
  42. package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.js +1 -0
  43. package/dist/components/Grid/core/components/AgGrid/model/AgGrid.d.ts +1 -1
  44. package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js +1 -0
  45. package/dist/components/Grid/core/components/AgGrid/styles.js +1 -0
  46. package/dist/components/Grid/core/components/Cell/Commands/Commands.d.ts +1 -1
  47. package/dist/components/Grid/core/components/Cell/Commands/Commands.js +1 -0
  48. package/dist/components/Grid/core/components/Cell/Commands/Icon.js +1 -0
  49. package/dist/components/Grid/core/components/Cell/Commands/styles.js +1 -0
  50. package/dist/components/Grid/core/components/Cell/Commands/useCommands.d.ts +1 -1
  51. package/dist/components/Grid/core/components/Cell/Commands/useCommands.js +1 -0
  52. package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.d.ts +1 -1
  53. package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.js +1 -0
  54. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.js +1 -0
  55. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.d.ts +1 -1
  56. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.js +1 -0
  57. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/styles.js +1 -0
  58. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.js +1 -0
  59. package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.js +1 -0
  60. package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.js +1 -0
  61. package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.js +1 -0
  62. package/dist/components/Grid/core/components/ColumnHeader/styles.js +1 -0
  63. package/dist/components/Grid/core/components/Component/Component.d.ts +2 -2
  64. package/dist/components/Grid/core/components/Component/Component.js +1 -0
  65. package/dist/components/Grid/core/components/Component/controller/useComponentController.d.ts +5 -5
  66. package/dist/components/Grid/core/components/Component/controller/useComponentController.js +1 -0
  67. package/dist/components/Grid/core/components/Component/model/Component.d.ts +3 -3
  68. package/dist/components/Grid/core/components/Component/model/Component.js +1 -0
  69. package/dist/components/Grid/core/components/Dialog/Constants.js +1 -0
  70. package/dist/components/Grid/core/components/Dialog/Styles.js +1 -0
  71. package/dist/components/Grid/core/components/Dialog/index.js +1 -0
  72. package/dist/components/Grid/core/components/Dialog/interfaces/index.d.ts +6 -0
  73. package/dist/components/Grid/core/components/Dialog/interfaces/index.js +1 -0
  74. package/dist/components/Grid/core/components/Save/Save.js +1 -0
  75. package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js +1 -0
  76. package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.js +1 -0
  77. package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.js +1 -0
  78. package/dist/components/Grid/core/components/Save/components/ChangeEditor/styles.js +1 -0
  79. package/dist/components/Grid/core/components/Save/hooks/useSave.js +1 -0
  80. package/dist/components/Grid/core/components/Save/styles.js +1 -0
  81. package/dist/components/Grid/core/controllers/useGridController.js +1 -0
  82. package/dist/components/Grid/core/enums/ConditionOperator.js +1 -0
  83. package/dist/components/Grid/core/enums/DataType.js +1 -0
  84. package/dist/components/Grid/core/hooks/useGridInstance.js +1 -0
  85. package/dist/components/Grid/core/hooks/useRefreshCallback.js +1 -0
  86. package/dist/components/Grid/core/hooks/useRerender.js +1 -0
  87. package/dist/components/Grid/core/interfaces/IGridColumn.js +1 -0
  88. package/dist/components/Grid/core/interfaces/IGridContext.js +1 -0
  89. package/dist/components/Grid/core/model/Grid.d.ts +5 -6
  90. package/dist/components/Grid/core/model/Grid.js +1 -0
  91. package/dist/components/Grid/core/model/GridDependency.d.ts +3 -3
  92. package/dist/components/Grid/core/model/GridDependency.js +1 -0
  93. package/dist/components/Grid/core/model/Metadata.d.ts +1 -1
  94. package/dist/components/Grid/core/model/Metadata.js +1 -0
  95. package/dist/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.js +1 -0
  96. package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.js +1 -0
  97. package/dist/components/Grid/filtering/components/FilterCallout/FilterCallout.js +1 -0
  98. package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.js +1 -0
  99. package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.js +1 -0
  100. package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.js +1 -0
  101. package/dist/components/Grid/filtering/components/FilterCallout/styles.js +1 -0
  102. package/dist/components/Grid/filtering/constants.js +1 -0
  103. package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.js +1 -0
  104. package/dist/components/Grid/filtering/model/Condition.d.ts +1 -1
  105. package/dist/components/Grid/filtering/model/Condition.js +1 -0
  106. package/dist/components/Grid/filtering/model/Filtering.js +1 -0
  107. package/dist/components/Grid/filtering/utils/FilteringUtilts.js +1 -0
  108. package/dist/components/Grid/index.d.ts +2 -0
  109. package/dist/components/Grid/index.js +1 -0
  110. package/dist/components/Grid/interfaces.d.ts +6 -233
  111. package/dist/components/Grid/interfaces.js +1 -0
  112. package/dist/components/Grid/paging/components/Paging/Paging.js +1 -0
  113. package/dist/components/Grid/paging/components/Paging/styles.js +1 -0
  114. package/dist/components/Grid/paging/controllers/usePagingController.js +1 -0
  115. package/dist/components/Grid/paging/model/Paging.js +1 -0
  116. package/dist/components/Grid/selection/controllers/useSelectionController.js +1 -0
  117. package/dist/components/Grid/selection/model/Selection.d.ts +1 -1
  118. package/dist/components/Grid/selection/model/Selection.js +1 -0
  119. package/dist/components/Grid/sorting/Sorting.d.ts +1 -1
  120. package/dist/components/Grid/sorting/Sorting.js +1 -0
  121. package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.js +1 -0
  122. package/dist/components/Grid/sorting/components/SortingContextualMenu/styles.js +1 -0
  123. package/dist/components/Grid/sorting/controllers/useColumnSortingController.d.ts +1 -1
  124. package/dist/components/Grid/sorting/controllers/useColumnSortingController.js +1 -0
  125. package/dist/components/Grid/translations.d.ts +306 -2
  126. package/dist/components/Grid/translations.js +1 -0
  127. package/dist/components/Grid/validation/controllers/useRecordValidationController.d.ts +1 -1
  128. package/dist/components/Grid/validation/controllers/useRecordValidationController.js +1 -0
  129. package/dist/components/Grid/validation/model/ColumnValidation.js +1 -0
  130. package/dist/components/Lookup/Lookup.js +1 -1
  131. package/dist/components/Lookup/components/RecordCreator.js +1 -0
  132. package/dist/components/Lookup/components/TargetSelector.d.ts +2 -3
  133. package/dist/components/Lookup/components/TargetSelector.js +1 -0
  134. package/dist/components/Lookup/hooks/useFetchXml.d.ts +1 -1
  135. package/dist/components/Lookup/hooks/useFetchXml.js +1 -0
  136. package/dist/components/Lookup/hooks/useLoadedEntities.js +1 -0
  137. package/dist/components/Lookup/hooks/useLookup.d.ts +35 -5
  138. package/dist/components/Lookup/hooks/useLookup.js +1 -0
  139. package/dist/components/Lookup/index.d.ts +3 -0
  140. package/dist/components/Lookup/index.js +1 -0
  141. package/dist/components/Lookup/interfaces.d.ts +5 -23
  142. package/dist/components/Lookup/interfaces.js +1 -0
  143. package/dist/components/Lookup/styles.d.ts +7 -15
  144. package/dist/components/Lookup/styles.js +1 -0
  145. package/dist/components/Lookup/translations.d.ts +30 -2
  146. package/dist/components/Lookup/translations.js +1 -0
  147. package/dist/components/MultiSelectOptionSet/MultiSelectOptionSet.js +1 -1
  148. package/dist/components/MultiSelectOptionSet/index.d.ts +2 -0
  149. package/dist/components/MultiSelectOptionSet/index.js +1 -0
  150. package/dist/components/MultiSelectOptionSet/interfaces.d.ts +5 -4
  151. package/dist/components/MultiSelectOptionSet/interfaces.js +1 -0
  152. package/dist/components/OptionSet/OptionSet.js +1 -1
  153. package/dist/components/OptionSet/index.d.ts +2 -0
  154. package/dist/components/OptionSet/index.js +1 -0
  155. package/dist/components/OptionSet/interfaces.d.ts +5 -6
  156. package/dist/components/OptionSet/interfaces.js +1 -0
  157. package/dist/components/TextField/TextField.js +1 -1
  158. package/dist/components/TextField/index.d.ts +2 -0
  159. package/dist/components/TextField/index.js +1 -0
  160. package/dist/components/TextField/interfaces.d.ts +4 -5
  161. package/dist/components/TextField/interfaces.js +1 -0
  162. package/dist/components/TwoOptions/TwoOptions.js +1 -1
  163. package/dist/components/TwoOptions/index.js +1 -0
  164. package/dist/components/TwoOptions/interfaces.d.ts +3 -4
  165. package/dist/components/TwoOptions/interfaces.js +1 -0
  166. package/dist/constants.js +1 -0
  167. package/dist/hooks/index.d.ts +6 -1
  168. package/dist/hooks/index.js +1 -1
  169. package/dist/hooks/useControl.d.ts +23 -0
  170. package/dist/hooks/useControl.js +1 -0
  171. package/dist/hooks/useControlSizing.d.ts +5 -0
  172. package/dist/hooks/useControlSizing.js +1 -0
  173. package/dist/hooks/useControlTheme.d.ts +3 -0
  174. package/dist/hooks/useControlTheme.js +1 -0
  175. package/dist/hooks/useFocusIn.d.ts +1 -1
  176. package/dist/hooks/useFocusIn.js +1 -1
  177. package/dist/hooks/{useInputBasedComponent.d.ts → useInputBasedControl.d.ts} +6 -6
  178. package/dist/hooks/useInputBasedControl.js +1 -0
  179. package/dist/index.d.ts +793 -14
  180. package/dist/index.js +1 -0
  181. package/dist/interfaces/context.d.ts +9 -7
  182. package/dist/interfaces/context.js +1 -0
  183. package/dist/interfaces/index.js +1 -0
  184. package/dist/interfaces/parameters.d.ts +6 -2
  185. package/dist/interfaces/parameters.js +1 -0
  186. package/dist/interfaces/property.d.ts +1 -1
  187. package/dist/interfaces/property.js +1 -0
  188. package/dist/interfaces/theme.d.ts +6 -0
  189. package/dist/interfaces/theme.js +1 -0
  190. package/dist/utils/Numeral.d.ts +1 -1
  191. package/dist/{Numeral-a0284afb.js → utils/Numeral.js} +1 -1
  192. package/dist/utils/Theme.d.ts +4 -0
  193. package/dist/utils/Theme.js +1 -0
  194. package/dist/utils/index.d.ts +2 -0
  195. package/dist/utils/index.js +1 -0
  196. package/package.json +25 -26
  197. package/stats.html +4842 -0
  198. package/dist/Lookup-85a4c52d.js +0 -1
  199. package/dist/components/Lookup/lib.d.ts +0 -1164
  200. package/dist/components/TextField/hooks/useTextField.d.ts +0 -1
  201. package/dist/hooks/useComponent.d.ts +0 -15
  202. package/dist/hooks/useComponent.js +0 -1
  203. package/dist/hooks/useComponentSizing.d.ts +0 -5
  204. package/dist/hooks/useComponentSizing.js +0 -1
  205. package/dist/hooks/useInputBasedComponent.js +0 -1
  206. package/dist/types/index.d.ts +0 -3
@@ -1 +0,0 @@
1
- import{jsxs as t,jsx as e,Fragment as i}from"react/jsx-runtime";import{useRef as r,useState as s,useEffect as n}from"react";import{useComponent as l}from"./hooks/useComponent.js";import{mergeStyleSets as a,useTheme as o,Link as u,ContextualMenuItemType as h}from"@fluentui/react";import{TagPicker as c}from"@talxis/react-components/dist/components/TagPicker";import{Text as d}from"@fluentui/react/lib/Text";import{useMouseOver as m}from"./hooks/useMouseOver.js";import{CommandBarButton as g}from"@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton";import{useFocusIn as f}from"./hooks/useFocusIn.js";import{useComponentSizing as y}from"./hooks/useComponentSizing.js";function p(t,e,i,r){var s,n=arguments.length,l=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l}function b(t,e,i,r){return new(i||(i=Promise))((function(s,n){function l(t){try{o(r.next(t))}catch(t){n(t)}}function a(t){try{o(r.throw(t))}catch(t){n(t)}}function o(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(l,a)}o((r=r.apply(t,e||[])).next())}))}const v={search:{1033:"Search",1029:"Vyhledejte"},newRecord:{1033:"New record",1029:"Nový záznam"},searching:{1033:"Searching...",1029:"Hledám..."},noRecordsFound:{1033:"No records found",1029:"Nebyly nalezeny žádné záznamy"},resultsFrom:{1033:"Results from:",1029:"Výsledky z:"},noName:{1033:"(No Name)",1029:"(Bez názvu)"}};var k;function F(t){Object.seal(t),Object.seal(t.prototype)}function X(t){Object.freeze(t),Object.freeze(t.prototype)}!function(t){!function(e){var i,r,s,n,l;let a=i=class attribute{constructor(t){if(this._build=null,this._addedBy=null,this._alias=null,this._aggregate=null,this._groupBy=null,this._dateGrouping=null,this._userTimeZone=null,!(this instanceof i))return new i(t);this.name=t}get name(){return this._name}set name(t){if(!Util.isString(t))throw new Error("Sdk.FetchXml.attribute name property must be an string.");this._name=t}get build(){return this._build}set build(t){if(!Util.isEnumMemberOrNull(b,t))throw new Error("Sdk.FetchXml.attribute build property must be an Sdk.FetchXml.Build value or null.");this._build=t}get addedBy(){return this._addedBy}set addedBy(t){if(!Util.isStringOrNull(t))throw new Error("Sdk.FetchXml.attribute addedBy property must be an string value or null.");this._addedBy=t}get alias(){return this._alias}set alias(t){if(!Util.isStringOrNull(t))throw new Error("Sdk.FetchXml.attribute alias property must be an string value or null.");this._alias=t}get aggregate(){return this._aggregate}set aggregate(t){if(!Util.isEnumMemberOrNull(v,t))throw new Error("Sdk.FetchXml.attribute aggregate property must be an Sdk.FetchXml.Aggregate value or null.");this._aggregate=t}get groupBy(){return this._groupBy}set groupBy(t){if(!Util.isBooleanOrNull(t))throw new Error("Sdk.FetchXml.attribute groupBy property must be an boolean value or null.");this._groupBy=t}get dateGrouping(){return this._dateGrouping}set dateGrouping(t){if(!Util.isEnumMemberOrNull(w,t))throw new Error("Sdk.FetchXml.attribute dateGrouping property must be an Sdk.FetchXml.DateGrouping value or null.");this._dateGrouping=t}get userTimeZone(){return this._userTimeZone}set userTimeZone(t){if(!Util.isBooleanOrNull(t))throw new Error("Sdk.FetchXml.attribute userTimeZone property must be an boolean value or null.");this._userTimeZone=t}setName(t){return this.name=t,this}setBuild(t){return this.build=t||null,this}setAddedBy(t){return this.addedBy=t||null,this}setAlias(t){return this.alias=t||null,this}setAggregate(t){return this.aggregate=t||null,this}setGroupBy(t){return t?this.groupBy=t:t=null,this}setDateGrouping(t){return this.dateGrouping=t||null,this}setUserTimeZone(t){return this.userTimeZone=t||null,this}toXml(t){var e=t.createElement("attribute");return e.setAttribute("name",this.name),this.build&&e.setAttribute("build",this.build),this.addedBy&&e.setAttribute("addedby",this.addedBy),this.alias&&e.setAttribute("alias",this.alias),this.aggregate&&e.setAttribute("aggregate",this.aggregate),Util.isBoolean(this.groupBy)&&e.setAttribute("groupby",this.groupBy?"true":"false"),this.dateGrouping&&e.setAttribute("dategrouping",this.dateGrouping),Util.isBoolean(this.userTimeZone)&&e.setAttribute("usertimezone",this.userTimeZone?"true":"false"),e}static attributeFromXml(t){var e=new i(t.attributes.getNamedItem("name").nodeValue);return Util.parseAttributes(t,e,((t,e,i)=>{switch(e){case"build":case"alias":case"aggregate":t[e]=i;break;case"addedby":t.addedBy=i;break;case"dategrouping":t.dateGrouping=i;break;case"groupby":t.groupBy=Util.convertFetchBoolType(i);case"usertimezone":t.userTimeZone=Util.convertFetchBoolType(i)}})),e}};a=i=p([F],a),e.attribute=a;let o=class condition{constructor(e,i,r){if(this._aggregate=null,this._alias=null,this._attribute=null,this._column=null,this._entityname=null,this._operator=null,this._rowAggregate=null,this._uihidden=null,this._uiname=null,this._uitype=null,this._values=[],!(this instanceof t.FetchXml.condition))return new t.FetchXml.condition(e,i,r);if(!e||!i)throw new Error("Sdk.FetchXml.condition constructor parameters attribute and operator are required.");this.attribute=e,this.operator=i,r&&(this.values=r)}get aggregate(){return this._aggregate}set aggregate(t){this._aggregate=t}get alias(){return this._alias}set alias(t){this._alias=t}get attribute(){return this._attribute}set attribute(t){this._attribute=t}get column(){return this._column}set column(t){this._column=t}get entityname(){return this._entityname}set entityname(t){this._entityname=t}get operator(){return this._operator}set operator(t){this._operator=t}get rowAggregate(){return this._rowAggregate}set rowAggregate(t){this._rowAggregate=t}get uihidden(){return this._uihidden}set uihidden(t){this._uihidden=t}get uiname(){return this._uiname}set uiname(t){this._uiname=t}get uitype(){return this._uitype}set uitype(t){this._uitype=t}get values(){return this._values}set values(e){if(!t.FetchXml.Util.isValueArrayOrNull(e))throw new Error("Sdk.FetchXml.condition.values must be an array of Sdk.FetchXml.value or null.");this._values=null==e?[]:e}get hash(){return this._attribute.concat(this._operator,this._aggregate?this._aggregate:"",this._alias?this._alias:"",this._column?this._column:"",this._entityname?this._entityname:"",this._rowAggregate?this._rowAggregate:"",t.FetchXml.Util.isNullOrUndefined(this._uihidden)?"":this._uihidden.toString(),this._uiname?this._uiname:"",this._uitype?this._uitype:"",t.FetchXml.Util.getCollectionHash(this._values)).hashCode()}setAttribute(t){return this.attribute=t,this}setOperator(t){return this.operator=t,this}setValues(t){return this.values=t,this}addValue(e){return t.FetchXml.Util.isValue(e)?this.values.push(e):this.values.push(new t.FetchXml.value(e)),this}removeValueByRef(e){if(!t.FetchXml.Util.isValue(e))throw new Error("Sdk.FetchXml.condition removeValueByRef method value parameter must be an Sdk.FetchXml.value.");return t.FetchXml.Util.removeCollectionValueByRef(this.values,e),this}removeValue(e){if(!t.FetchXml.Util.isValue(e))throw new Error("Sdk.FetchXml.condition removeValue method value parameter must be an Sdk.FetchXml.value.");return t.FetchXml.Util.removeCollectionValue(this.values,e),this}removeValueByValue(e){return t.FetchXml.Util.removeCollectionValueByProperty(this.values,"value",e),this}setAggregate(t){return this.aggregate=t,this}setAlias(t){return this.alias=t,this}setColumn(t){return this.column=t,this}setEntityname(t){return this.entityname=t,this}setRowAggregate(t){return this.rowAggregate=t,this}setUIhidden(t){return this.uihidden=t,this}setUIname(t){return this.uiname=t,this}setUItype(t){return this.uitype=t,this}toXml(e){var i=e.createElement("condition");switch(this.aggregate&&i.setAttribute("aggregate",this.aggregate),this.alias&&i.setAttribute("alias",this.alias),this.attribute&&i.setAttribute("attribute",this.attribute),this.column&&i.setAttribute("column",this.column),this.entityname&&i.setAttribute("entityname",this.entityname),this.operator&&i.setAttribute("operator",this.operator),this.rowAggregate&&i.setAttribute("rowAggregate",this.rowAggregate),t.FetchXml.Util.isBoolean(this.uihidden)&&i.setAttribute("uihidden",this.uihidden.toString()),this.uiname&&i.setAttribute("uiname",this.uiname),this.uitype&&i.setAttribute("uitype",this.uitype),this.operator){case"begins-with":case"ends-with":case"eq":case"ge":case"gt":case"last-x-days":case"last-x-fiscal-periods":case"last-x-fiscal-years":case"last-x-hours":case"last-x-months":case"last-x-weeks":case"last-x-years":case"last-year":case"le":case"like":case"lt":case"ne":case"neq":case"next-x-days":case"next-x-fiscal-periods":case"next-x-fiscal-years":case"next-x-hours":case"next-x-months":case"next-x-weeks":case"next-x-years":case"not-begin-with":case"not-end-with":case"not-like":case"olderthan-x-days":case"olderthan-x-hours":case"olderthan-x-minutes":case"olderthan-x-months":case"olderthan-x-weeks":case"olderthan-x-years":case"on":case"on-or-after":case"on-or-before":case"in-fiscal-period":case"in-fiscal-year":if(1!=this.values.length){var r=t.FetchXml.Util.getEnumNameFromValue(t.FetchXml.Operator,this.operator);throw new Error("Sdk.FetchXml.condition values property must contain single value when the Sdk.FetchXml.Operator."+r+" operator is used.")}i.setAttribute("value",this.values[0].value);break;case"between":case"in":case"not-between":case"not-in":case"in-fiscal-period-and-year":case"in-or-after-fiscal-period-and-year":case"in-or-before-fiscal-period-and-year":if(!(this.values.length>1)){r=t.FetchXml.Util.getEnumNameFromValue(t.FetchXml.Operator,this.operator);throw new Error("Sdk.FetchXml.condition values property must contain multiple values when the Sdk.FetchXml.Operator."+r+" operator is used.")}this.values.forEach((function(t){i.appendChild(t.toXml(e))}));break;case"above":case"eq-businessid":case"eq-or-above":case"eq-or-under":case"eq-userid":case"eq-userlanguage":case"eq-useroruserhierarchy":case"eq-useroruserhierarchyandteams":case"eq-useroruserteams":case"eq-userteams":case"last-fiscal-period":case"last-fiscal-year":case"last-month":case"last-seven-days":case"last-week":case"ne-businessid":case"ne-userid":case"next-fiscal-period":case"next-fiscal-year":case"next-month":case"next-seven-days":case"next-week":case"next-year":case"not-null":case"not-under":case"null":case"this-fiscal-period":case"this-fiscal-year":case"this-month":case"this-week":case"this-year":case"today":case"tomorrow":case"under":case"yesterday":if(this.values.length>0){r=t.FetchXml.Util.getEnumNameFromValue(t.FetchXml.Operator,this.operator);console.log("Sdk.FetchXml.condition doesn't require values when the Sdk.FetchXml.Operator.%s operator is used. The values passed were ignored.",r)}break;default:throw new Error(this.operator+" is an unexpected Sdk.FetchXml.Operator value.")}return i}static conditionFromXml(e){var i=e.attributes.getNamedItem("attribute").nodeValue,r=e.attributes.getNamedItem("operator").nodeValue,s=new t.FetchXml.condition(i,r);t.FetchXml.Util.parseAttributes(e,s,((t,e,i)=>{switch(e){case"column":case"entityname":case"aggregate":case"alias":case"uiname":case"uitype":t[e]=i;break;case"rowaggregate":t.rowAggregate=i;break;case"uihidden":t.uihidden=Util.convertFetchBoolType(i);break;case"value":t.addValue(i)}}));for(var n=0;n<e.childNodes.length;n++)"value"==e.childNodes[n].nodeName&&s.addValue(g.valueFromXml(e.childNodes[n]));return s}};o=p([F],o),e.condition=o;let u=class entity{constructor(e,i,r,s){if(this._allAttributes=null,this._attributes=[],this._orders=[],this._linkEntities=[],this._filters=[],!(this instanceof t.FetchXml.entity))return new t.FetchXml.entity(e,i,r,s);this.name=e,i&&(this.attributes=i),r&&(this.orders=r),s&&(this.filters=s)}get allAttributes(){return this._allAttributes}set allAttributes(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.entity.allAttributes must be a boolean value or null.");this._allAttributes=e}get attributes(){return this._attributes}set attributes(e){if(!t.FetchXml.Util.isAttributeArrayOrNull(e))throw new Error("Sdk.FetchXml.entity.attributes must be an array of Sdk.FetchXml.attribute or null.");this._attributes=null==e?[]:e}get orders(){return this._orders}set orders(e){if(!t.FetchXml.Util.isOrderArrayOrNull(e))throw new Error("Sdk.FetchXml.entity.orders must be an array of Sdk.FetchXml.order or null.");this._orders=null==e?[]:e}get linkEntities(){return this._linkEntities}set linkEntities(e){if(!t.FetchXml.Util.isLinkEntityArrayOrNull(e))throw new Error("Sdk.FetchXml.entity.linkEntities must be an array of Sdk.FetchXml.linkEntity or null.");this._linkEntities=null==e?[]:e}get filters(){return this._filters}set filters(e){if(!t.FetchXml.Util.isFilterArrayOrNull(e))throw new Error("Sdk.FetchXml.entity.filters must be an array of Sdk.FetchXml.filter or null.");this._filters=null==e?[]:e}get name(){return this._name}set name(e){if(!t.FetchXml.Util.isString(e))throw new Error("Sdk.FetchXml.entity.name must be a string.");this._name=e}addAttribute(e){if(t.FetchXml.Util.isString(e)){var i=!1;return this.attributes.forEach((function(t){t.name==e&&(i=!0)})),i||this.attributes.push(new t.FetchXml.attribute(e)),this}if(!t.FetchXml.Util.isAttribute(e))throw new Error("Sdk.FetchXml.entity addAttribute method attributeOrAttributeName parameter must be an Sdk.FetchXml.attribute or a string value.");i=!1;return this.attributes.forEach((function(t){t.name==e.name&&(i=!0)})),i||this.attributes.push(e),this}removeAttributeByName(e){t.FetchXml.Util.removeCollectionValueByProperty(this.attributes,"name",e)}removeAttributeByRef(e){t.FetchXml.Util.removeCollectionValueByRef(this.attributes,e)}removeAttribute(e){t.FetchXml.Util.removeCollectionValue(this.attributes,e)}addOrder(e,i,r){if(t.FetchXml.Util.isOrder(e))return this.orders.push(e),this;if(!t.FetchXml.Util.isString(e))throw new Error("Sdk.FetchXml.entity addOrder method orderOrAttribute parameter must be a Sdk.FetchXml.order value or a string.");return this.orders.push(new t.FetchXml.order(e,i,r)),this}removeOrderByRef(e){if(!t.FetchXml.Util.isOrder(e))throw new Error("Sdk.FetchXml.entity removeOrderByRef method order parameter must be an Sdk.FetchXml.order.");return t.FetchXml.Util.removeCollectionValueByRef(this.orders,e),this}removeOrder(e){if(!t.FetchXml.Util.isOrder(e))throw new Error("Sdk.FetchXml.entity removeOrder method order parameter must be an Sdk.FetchXml.order.");return t.FetchXml.Util.removeCollectionValue(this.orders,e),this}setName(t){return this.name=t,this}setAllAttributes(e){if(t.FetchXml.Util.isBoolean(e))this.allAttributes=e;else{if(!t.FetchXml.Util.isNullOrUndefined(e))throw new Error("Sdk.FetchXml.entity setAllAttributes method allAttributes parameter must be a boolean value or null.");this.allAttributes=!0}return this}addLinkEntity(e){if(t.FetchXml.Util.isLinkEntity(e))return this.linkEntities.push(e),this;throw new Error("Sdk.FetchXml.entity addLinkEntity method linkEntity parameter must be a Sdk.FetchXml.linkEntity value.")}removeLinkEntityByRef(e){if(!t.FetchXml.Util.isLinkEntity(e))throw new Error("Sdk.FetchXml.entity removeLinkEntityByRef method linkEntity parameter must be an Sdk.FetchXml.linkEntity.");return t.FetchXml.Util.removeCollectionValueByRef(this.linkEntities,e),this}removeLinkEntity(e){if(!t.FetchXml.Util.isLinkEntity(e))throw new Error("Sdk.FetchXml.entity removeLinkEntity method linkEntity parameter must be an Sdk.FetchXml.linkEntity.");return t.FetchXml.Util.removeCollectionValue(this.linkEntities,e),this}addFilter(e){if(t.FetchXml.Util.isFilter(e))return this.filters.push(e),this;throw new Error("Sdk.FetchXml.entity addFilter method filter parameter must be a Sdk.FetchXml.filter value.")}removeFilterByRef(e){if(!t.FetchXml.Util.isFilter(e))throw new Error("Sdk.FetchXml.entity removeFilterByRef method filter parameter must be an Sdk.FetchXml.filter.");return t.FetchXml.Util.removeCollectionValueByRef(this.filters,e),this}removeFilter(e){if(!t.FetchXml.Util.isFilter(e))throw new Error("Sdk.FetchXml.entity removeFilter method filter parameter must be an Sdk.FetchXml.filter.");return t.FetchXml.Util.removeCollectionValue(this.filters,e),this}toXml(t){var e=t.createElement("entity");return this.allAttributes?e.appendChild(t.createElement("all-attributes")):this.attributes.forEach((function(i,r){e.appendChild(i.toXml(t))})),this.orders.forEach((function(i,r){e.appendChild(i.toXml(t))})),this.linkEntities.forEach((function(i,r){e.appendChild(i.toXml(t))})),this.filters.forEach((function(i,r){e.appendChild(i.toXml(t))})),e.setAttribute("name",this.name),e}static entityFromXml(e){var i=new t.FetchXml.entity(e.attributes.getNamedItem("name").nodeValue);i.allAttributes=1==e.getElementsByTagName("all-attributes").length;for(var r=0;r<e.childNodes.length;r++)"attribute"==e.childNodes[r].nodeName&&i.addAttribute(a.attributeFromXml(e.childNodes[r])),"order"==e.childNodes[r].nodeName&&i.addOrder(m.orderFromXml(e.childNodes[r])),"link-entity"==e.childNodes[r].nodeName&&i.addLinkEntity(d.linkEntityFromXml(e.childNodes[r])),"filter"==e.childNodes[r].nodeName&&i.addFilter(c.filterFromXml(e.childNodes[r]));return i}};u=p([F],u),e.entity=u;let h=class fetch{constructor(e){if(this._aggregate=null,this._count=null,this._distinct=null,this._mapping=null,this._minActiveRowVersion=null,this._noLock=null,this._order=null,this._outputFormat=null,this._page=null,this._pagingCookie=null,this._returnTotalRecordCount=null,this._top=null,this._utcOffset=null,this._version=null,!(this instanceof t.FetchXml.fetch))return new t.FetchXml.fetch(e);e&&(this.entity=e)}get aggregate(){return this._aggregate}set aggregate(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.fetch.aggregate must be a boolean value or null.");this._aggregate=e}get count(){return this._count}set count(e){if(!t.FetchXml.Util.isNumberOrNull(e))throw new Error("Sdk.FetchXml.fetch.count must be a number value or null.");this._count=e}get distinct(){return this._distinct}set distinct(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.fetch.distinct must be a boolean value or null.");this._distinct=e}get entity(){return this._entity}set entity(e){if(!t.FetchXml.Util.isEntity(e))throw new Error("Sdk.FetchXml.fetch.entity must be a Sdk.FetchXml.entity value.");this._entity=e}get mapping(){return this._mapping}set mapping(e){if(!t.FetchXml.Util.isEnumMemberOrNull(t.FetchXml.Mapping,e))throw new Error("Sdk.FetchXml.fetch.mapping must be a Sdk.FetchXml.Mapping value or null.");this._mapping=e}get minActiveRowVersion(){return this._minActiveRowVersion}set minActiveRowVersion(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.fetch.minActiveRowVersion must be a boolean value or null.");this._minActiveRowVersion=e}get noLock(){return this._noLock}set noLock(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.fetch.noLock must be a boolean value or null.");this._noLock=e}get order(){return this._order}set order(e){if(!t.FetchXml.Util.isOrderOrNull(e))throw new Error("Sdk.FetchXml.fetch.order must be a Sdk.FetchXml.order value or null.");this._order=e}get outputFormat(){return this._outputFormat}set outputFormat(e){if(!t.FetchXml.Util.isEnumMemberOrNull(t.FetchXml.OutputFormat,e))throw new Error("Sdk.FetchXml.fetch.outputFormat must be a Sdk.FetchXml.OutputFormat value or null.");this._outputFormat=e}get page(){return this._page}set page(e){if(!t.FetchXml.Util.isNumberOrNull(e))throw new Error("Sdk.FetchXml.fetch.page must be a number value or null.");this._page=e}get pagingCookie(){return this._pagingCookie}set pagingCookie(e){if(!t.FetchXml.Util.isStringOrNull(e))throw new Error("Sdk.FetchXml.fetch.pagingCookie must be a string value or null.");this._pagingCookie=e}get returnTotalRecordCount(){return this._returnTotalRecordCount}set returnTotalRecordCount(e){if(!t.FetchXml.Util.isBooleanOrNull(e))throw new Error("Sdk.FetchXml.fetch.returnTotalRecordCount must be a boolean value or null.");this._returnTotalRecordCount=e}get top(){return this._top}set top(e){if(!t.FetchXml.Util.isNumberOrNull(e))throw new Error("Sdk.FetchXml.fetch.top must be a number value or null.");this._top=e}get utcOffset(){return this._utcOffset}set utcOffset(e){if(!t.FetchXml.Util.isNumberOrNull(e))throw new Error("Sdk.FetchXml.fetch.utcOffset must be a number value or null.");this._utcOffset=e}get version(){return this._version}set version(e){if(!t.FetchXml.Util.isStringOrNull(e))throw new Error("Sdk.FetchXml.fetch.version must be a string value or null.");this._version=e}setAggregate(t){return this.aggregate=t||null,this}setCount(t){return this.count=t||null,this}setDistinct(t){return this.distinct=t||null,this}setEntity(t){return this.entity=t,this}setMapping(t){return this.mapping=t||null,this}setMinActiveRowVersion(t){return this.minActiveRowVersion=t||null,this}setNoLock(t=null){return this.noLock=t,this}setOrder(t=null){return this.order=t,this}setOutputFormat(t){return this.outputFormat=t||null,this}setPage(t){return this.page=t||null,this}setPagingCookie(t=null){return this.pagingCookie=t,this}setReturnTotalRecordCount(t){return this.returnTotalRecordCount=t||null,this}setTop(t){return this.top=t||null,this}setUtcOffset(t){return this.utcOffset=t||null,this}setVersion(t){return this.version=t||null,this}toXml(){var t=(new DOMParser).parseFromString("<fetch />","text/xml");return this.version&&t.documentElement.setAttribute("version",this.version),this.outputFormat&&t.documentElement.setAttribute("output-format",this.outputFormat),this.mapping&&t.documentElement.setAttribute("mapping",this.mapping),this.aggregate&&t.documentElement.setAttribute("aggregate",this.aggregate?"true":"false"),this.count&&t.documentElement.setAttribute("count",this.count.toString()),this.distinct&&t.documentElement.setAttribute("distinct",this.distinct?"true":"false"),this.entity&&t.documentElement.appendChild(this.entity.toXml(t)),this.minActiveRowVersion&&t.documentElement.setAttribute("min-active-row-version",this.minActiveRowVersion?"true":"false"),this.noLock&&t.documentElement.setAttribute("no-lock",this.noLock?"true":"false"),this.order&&t.documentElement.appendChild(this.order.toXml(t)),this.page&&t.documentElement.setAttribute("page",this.page.toString()),this.pagingCookie&&t.documentElement.setAttribute("paging-cookie",this.pagingCookie),this.returnTotalRecordCount&&t.documentElement.setAttribute("returntotalrecordcount",this.returnTotalRecordCount?"true":"false"),this.top&&t.documentElement.setAttribute("top",this.top.toString()),this.utcOffset&&t.documentElement.setAttribute("utc-offset",this.utcOffset.toString()),(new XMLSerializer).serializeToString(t)}static fromXml(e){var i=(new DOMParser).parseFromString(e,"text/xml"),r=new t.FetchXml.fetch;if("fetch"!=i.documentElement.localName)throw new Error("The XML string is not a valid fetchXML document");t.FetchXml.Util.parseAttributes(i.documentElement,r,((t,e,i)=>{switch(e){case"count":case"top":case"page":t[e]=parseInt(i,10);break;case"utc-offset":isNaN(i)?t.utcOffset=null:t.utcOffset=parseInt(i,10);break;case"paging-cookie":t.pagingCookie=i;break;case"min-active-row-version":t.minActiveRowVersion="true"==i;break;case"output-format":t.outputFormat=i;break;case"returntotalrecordcount":t.returnTotalRecordCount="true"==i;break;case"no-lock":t.noLock="true"==i;break;case"aggregate":case"distinct":t[e]="true"==i;break;default:t[e]=i}}));for(var s=0;s<i.documentElement.childNodes.length;s++)"entity"==i.documentElement.childNodes[s].nodeName&&(r.entity=t.FetchXml.entity.entityFromXml(i.documentElement.childNodes[s])),"order"==i.documentElement.childNodes[s].nodeName&&(r.order=t.FetchXml.order.orderFromXml(i.documentElement.childNodes[s]));return r}};h=p([F],h),e.fetch=h;let c=r=class filter{constructor(t,e,i){if(this._conditions=[],this._filters=[],this._type=null,this._isQuickFindFields=null,!(this instanceof r))return new r(t,e,i);t&&(this.type=t),e&&(this.conditions=e),i&&(this.filters=i)}get conditions(){return this._conditions}set conditions(t){if(!Util.isFilterArrayOrNull(t))throw new Error("Sdk.FetchXml.filter.conditions must be an array of Sdk.FetchXml.condition or null.");this._conditions=null==t?[]:t}get filters(){return this._filters}set filters(t){if(!Util.isFilterArrayOrNull(t))throw new Error("Sdk.FetchXml.filter.filters must be an array of Sdk.FetchXml.filter or null.");this._filters=null==t?[]:t}get type(){return this._type}set type(t){this._type=t}get isQuickFindFields(){return this._isQuickFindFields}set isQuickFindFields(t){this._isQuickFindFields=t}addCondition(t,e,i){return Util.isCondition(t)?this.conditions.push(t):this.conditions.push(new o(t,e,i)),this}removeConditionByRef(t){if(!Util.isCondition(t))throw new Error("Sdk.FetchXml.filter removeConditionByRef method condition parameter must be an Sdk.FetchXml.condition.");return Util.removeCollectionValueByRef(this.conditions,t),this}removeCondition(t){if(!Util.isCondition(t))throw new Error("Sdk.FetchXml.filter removeCondition method condition parameter must be an Sdk.FetchXml.condition.");return Util.removeCollectionValue(this.conditions,t),this}addFilter(t){if(!Util.isFilter(t))throw new Error("Sdk.FetchXml.filter addFilter method filter parameter must be a Sdk.FetchXml.filter value.");return this.filters.push(t),this}removeFilterByRef(t){if(!Util.isFilter(t))throw new Error("Sdk.FetchXml.filter removeFilterByRef method filter parameter must be an Sdk.FetchXml.filter.");return Util.removeCollectionValueByRef(this.filters,t),this}removeFilter(t){if(!Util.isFilter(t))throw new Error("Sdk.FetchXml.filter removeFilter method filter parameter must be an Sdk.FetchXml.filter.");return Util.removeCollectionValue(this.filters,t),this}setIsQuickFindFields(t){return this.isQuickFindFields=t,this}setType(t){return this.type=t,this}toXml(t){var e=t.createElement("filter");return this.type&&e.setAttribute("type",this.type),Util.isBoolean(this.isQuickFindFields)&&e.setAttribute("isquickfindfields",this.isQuickFindFields.toString()),this.conditions.forEach((function(i){e.appendChild(i.toXml(t))})),this.filters.forEach((function(i){e.appendChild(i.toXml(t))})),e}static filterFromXml(t){var e=new r;Util.parseAttributes(t,e,((t,e,i)=>{switch(e){case"type":t.type=i;break;case"isquickfindfields":t.isQuickFindFields="true"==i||"1"==i}}));for(var i=0;i<t.childNodes.length;i++)"condition"==t.childNodes[i].nodeName&&e.addCondition(o.conditionFromXml(t.childNodes[i])),"filter"==t.childNodes[i].nodeName&&e.addFilter(r.filterFromXml(t.childNodes[i]));return e}};c=r=p([F],c),e.filter=c;let d=s=class linkEntity{constructor(t,e,i,r,n){if(this._name=null,this._alias=null,this._from=null,this._intersect=null,this._linktype=null,this._to=null,this._visible=null,this._allAttributes=null,this._attributes=[],this._orders=[],this._linkEntities=[],this._filters=[],!(this instanceof s))return new s(t,e,i,r,n);this.name=t,e&&(this.from=e),i&&(this.to=i),r&&(this.linktype=r),n&&(this.alias=n)}get name(){return this._name}set name(t){this._name=t}get alias(){return this._alias}set alias(t){this._alias=t}get from(){return this._from}set from(t){this._from=t}get intersect(){return this._intersect}set intersect(t){this._intersect=t}get linktype(){return this._linktype}set linktype(t){this._linktype=t}get to(){return this._to}set to(t){this._to=t}get visible(){return this._visible}set visible(t){this._visible=t}get allAttributes(){return this._allAttributes}set allAttributes(t){this._allAttributes=t}get attributes(){return this._attributes}set attributes(t){if(!Util.isAttributeArrayOrNull(t))throw new Error("Sdk.FetchXml.linkEntity.attributes must be an array of Sdk.FetchXml.attribute or null.");this._attributes=null==t?[]:t}get orders(){return this._orders}set orders(t){if(!Util.isOrderArrayOrNull(t))throw new Error("Sdk.FetchXml.linkEntity.orders must be an array of Sdk.FetchXml.order or null.");this._orders=null==t?[]:t}get linkEntities(){return this._linkEntities}set linkEntities(t){if(!Util.isLinkEntityArrayOrNull(t))throw new Error("Sdk.FetchXml.linkEntity.linkEntities must be an array of Sdk.FetchXml.linkEntity or null.");this._linkEntities=null==t?[]:t}get filters(){return this._filters}set filters(t){if(!Util.isFilterArrayOrNull(t))throw new Error("Sdk.FetchXml.linkEntity.filters must be an array of Sdk.FetchXml.filter or null.");this._filters=null==t?[]:t}get hash(){return this._name.concat(this._alias?this._alias:"",this._from?this._from:"",Util.isNullOrUndefined(this._intersect)?"":this._intersect.toString(),this._linktype?this._linktype:"",this._to?this._to:"",Util.isNullOrUndefined(this._visible)?"":this._visible.toString(),Util.isNullOrUndefined(this._allAttributes)?"":this._allAttributes.toString(),Util.getCollectionHash(this._attributes),Util.getCollectionHash(this._orders),Util.getCollectionHash(this._linkEntities),Util.getCollectionHash(this._filters)).hashCode()}setAlias(t){return this.alias=t,this}setFrom(t){return this.from=t,this}setIntersect(t){return this.intersect=t,this}setName(t){return this.name=t,this}setTo(t){return this.to=t,this}setVisible(t){return this.visible=t,this}setAllAttributes(t){return this.allAttributes=t,this}addLinkEntity(t){if(Util.isLinkEntity(t))return this.linkEntities.push(t),this;throw new Error("Sdk.FetchXml.linkEntity addLinkEntity method linkEntity parameter must be a Sdk.FetchXml.linkEntity value.")}removeLinkEntityByRef(t){if(!Util.isLinkEntity(t))throw new Error("Sdk.FetchXml.linkEntity removeLinkEntityByRef method linkEntity parameter must be an Sdk.FetchXml.linkEntity.");return Util.removeCollectionValueByRef(this.linkEntities,t),this}removeLinkEntity(t){if(!Util.isLinkEntity(t))throw new Error("Sdk.FetchXml.linkEntity removeLinkEntity method linkEntity parameter must be an Sdk.FetchXml.linkEntity.");return Util.removeCollectionValue(this.linkEntities,t),this}addAttribute(t){if(Util.isAttribute(t))return this.attributes.push(t),this;if(Util.isString(t))return this.attributes.push(new t(t)),this;throw new Error("Sdk.FetchXml.linkEntity addAttribute method attribute parameter must be a Sdk.FetchXml.attribute value or a string.")}removeAttributeByRef(t){if(!Util.isAttribute(t))throw new Error("Sdk.FetchXml.linkEntity removeAttributeByRef method attribute parameter must be an Sdk.FetchXml.attribute.");return Util.removeCollectionValueByRef(this.attributes,t),this}removeAttribute(t){if(!Util.isAttribute(t))throw new Error("Sdk.FetchXml.linkEntity removeAttribute method attribute parameter must be an Sdk.FetchXml.attribute.");return Util.removeCollectionValue(this.attributes,t),this}removeAttributeByName(t){if(!Util.isString(t))throw new Error("Sdk.FetchXml.linkEntity removeAttributeByName method attributeName parameter must be a string.");return Util.removeCollectionValueByProperty(this.attributes,"name",t),this}addOrder(t,e,i){if(Util.isOrder(t))return this.orders.push(t),this;if(Util.isString(t))return this.orders.push(new m(t,e,i)),this;throw new Error("Sdk.FetchXml.linkEntity addOrder method orderOrAttribute parameter must be a Sdk.FetchXml.order value or a string.")}removeOrderByRef(t){if(!Util.isOrder(t))throw new Error("Sdk.FetchXml.linkEntity removeOrderByRef method order parameter must be an Sdk.FetchXml.order.");return Util.removeCollectionValueByRef(this.orders,t),this}removeOrder(t){if(!Util.isOrder(t))throw new Error("Sdk.FetchXml.linkEntity removeOrder method order parameter must be an Sdk.FetchXml.order.");return Util.removeCollectionValue(this.orders,t),this}addFilter(t){if(Util.isFilter(t))return this.filters.push(t),this;throw new Error("Sdk.FetchXml.linkEntity addFilter method filter parameter must be a Sdk.FetchXml.filter value.")}removeFilterByRef(t){if(!Util.isFilter(t))throw new Error("Sdk.FetchXml.linkEntity removeFilterByRef method filter parameter must be an Sdk.FetchXml.filter.");return Util.removeCollectionValueByRef(this.filters,t),this}removeFilter(t){if(!Util.isFilter(t))throw new Error("Sdk.FetchXml.linkEntity removeFilter method filter parameter must be an Sdk.FetchXml.filter.");return Util.removeCollectionValue(this.filters,t),this}toXml(t){var e=t.createElement("link-entity");return this.alias&&e.setAttribute("alias",this.alias),this.allAttributes&&e.appendChild(t.createElement("all-attributes")),this.from&&e.setAttribute("from",this.from),Util.isBoolean(this.intersect)&&e.setAttribute("intersect",this.intersect.toString()),this.linktype&&e.setAttribute("link-type",this.linktype),this.name&&e.setAttribute("name",this.name),this.to&&e.setAttribute("to",this.to),Util.isBoolean(this.visible)&&e.setAttribute("visible",this.visible.toString()),this.attributes.forEach((function(i){e.appendChild(i.toXml(t))})),this.orders.forEach((function(i){e.appendChild(i.toXml(t))})),this.linkEntities.forEach((function(i){e.appendChild(i.toXml(t))})),this.filters.forEach((function(i){e.appendChild(i.toXml(t))})),e}static linkEntityFromXml(t){var e=t.attributes.getNamedItem("name").nodeValue,i=new s(e);i.allAttributes=1==t.getElementsByTagName("all-attributes").length,Util.parseAttributes(t,i,((t,e,i)=>{switch(e){case"to":case"from":case"alias":t[e]=i;break;case"link-type":t.linktype=i;break;case"visible":case"intersect":t[e]="true"==i}}));for(var r=0;r<t.childNodes.length;r++)"attribute"==t.childNodes[r].nodeName&&i.addAttribute(a.attributeFromXml(t.childNodes[r])),"order"==t.childNodes[r].nodeName&&i.addOrder(m.orderFromXml(t.childNodes[r])),"filter"==t.childNodes[r].nodeName&&i.addFilter(c.filterFromXml(t.childNodes[r])),"link-entity"==t.childNodes[r].nodeName&&i.addLinkEntity(s.linkEntityFromXml(t.childNodes[r]));return i}};d=s=p([F],d),e.linkEntity=d;let m=n=class order{constructor(t,e,i){if(this._attribute=null,this._descending=null,this._alias=null,!(this instanceof n))return new n(t,e,i);t&&(this.attribute=t),e&&(this.descending=e),i&&(this.alias=i)}get attribute(){return this._attribute}set attribute(t){this._attribute=t}get descending(){return this._descending}set descending(t){this._descending=t}get alias(){return this._alias}set alias(t){this._alias=t}get hash(){return"".concat(this._attribute?this._attribute:"",this._alias?this._alias:"",this._descending.toString()).hashCode()}setAttribute(t){return this.attribute=t,this}setAlias(t){return this.alias=t,this}setDescending(t){return this.descending=t,this}toXml(t){var e=t.createElement("order");return this.attribute&&e.setAttribute("attribute",this.attribute),this.alias&&e.setAttribute("alias",this.alias),Util.isNullOrUndefined(this.descending)||e.setAttribute("descending",this.descending.toString()),e}static orderFromXml(t){var e=new n;return Util.parseAttributes(t,e,((t,e,i)=>{switch(e){case"attribute":t.attribute=i;break;case"alias":t.alias=i;break;case"descending":t.descending="true"==i}})),e}};m=n=p([F],m),e.order=m;let g=l=class value{constructor(e,i,r){if(this._value=null,this._uiname=null,this._uitype=null,!(this instanceof t.FetchXml.value))return new e(e,i,r);e&&(this.value=e),i&&(this.uiname=i),r&&(this.uitype=r)}get value(){return this._value}set value(t){this._value=t}get uiname(){return this._uiname}set uiname(t){this._uiname=t}get uitype(){return this._uitype}set uitype(t){this._uitype=t}setValue(t){return this.value=t,this}setUIname(t){return this.uiname=t,this}setUItype(t){return this.uitype=t,this}toXml(t){var e=t.createElement("value");return this.uitype&&e.setAttribute("uitype",this.uitype),this.uiname&&e.setAttribute("uiname",this.uiname),e.appendChild(t.createTextNode(this.value)),e}static valueFromXml(t){var e=new l(t.textContent);return Util.parseAttributes(t,e,((t,e,i)=>{switch(e){case"uiname":case"uitype":t[e]=i}})),e}};g=l=p([F],g),e.value=g;class Util{static isBoolean(t){return"boolean"==typeof t}static isBooleanOrNull(t){return Util.isNull(t)||Util.isBoolean(t)}static isNumber(t){return"number"==typeof t}static isNumberOrNull(t){return Util.isNull(t)||Util.isNumber(t)}static isNull(t){return null===t}static isNullOrUndefined(t){return null==t}static isEnumMember(t,e){for(var i in t)if(e===t[i])return!0;return!1}static isEnumMemberOrNull(t,e){return Util.isNull(e)||Util.isEnumMember(t,e)}static isString(t){return"string"==typeof t}static isStringOrNull(t){return Util.isNull(t)||Util.isString(t)}static isOrder(t){return t instanceof m}static isOrderOrNull(t){return Util.isNull(t)||Util.isOrder(t)}static isOrderArray(t){return!!Array.isArray(t)&&(t.forEach((function(t){if(!Util.isOrder(t))return!1})),!0)}static isOrderArrayOrNull(t){return Util.isNull(t)||Util.isOrderArray(t)}static isEntity(t){return t instanceof u}static isAttribute(t){return t instanceof a}static isAttributeArray(t){return!!Array.isArray(t)&&(t.forEach((function(t){if(!Util.isAttribute(t))return!1})),!0)}static isAttributeArrayOrNull(t){return Util.isNull(t)||Util.isAttributeArray(t)}static isLinkEntity(t){return t instanceof d}static isLinkEntityOrNull(t){return Util.isNull(t)||Util.isLinkEntity(t)}static isLinkEntityArray(t){return!!Array.isArray(t)&&(t.forEach((function(t){if(!Util.isLinkEntity(t))return!1})),!0)}static isLinkEntityArrayOrNull(t){return Util.isNull(t)||Util.isLinkEntityArray(t)}static isFilter(t){return t instanceof c}static isFilterOrNull(t){return Util.isNull(t)||Util.isFilter(t)}static isFilterArray(t){return!!Array.isArray(t)&&(t.forEach((function(t){if(!Util.isFilter(t))return!1})),!0)}static isFilterArrayOrNull(t){return Util.isNull(t)||Util.isFilterArray(t)}static isCondition(t){return t instanceof o}static isConditionOrNull(t){return Util.isNull(t)||Util.isCondition(t)}static isConditionArray(t){return!!Array.isArray(t)&&(t.forEach((function(t){if(!Util.isCondition(t))return!1})),!0)}static isConditionArrayOrNull(t){return Util.isNull(t)||Util.isConditionArray(t)}static isValue(t){return t instanceof g}static isValueOrNull(t){return Util.isNull(t)||Util.isValue(t)}static isValueArray(t){if(Array.isArray(t)){var e=!0;return t.forEach((function(t){Util.isValue(t)||(e=!1)})),e}return!1}static isValueArrayOrNull(t){return Util.isNull(t)||Util.isValueArray(t)}static getEnumNameFromValue(t,e){for(var i in t)if(t[i]==e)return i}static getCollectionHash(t){var e=[];return t.forEach((function(t){e.push(t.hash)})),e.join()}static removeCollectionValue(t,e){Util.removeCollectionValueByProperty(t,"hash",e)}static removeCollectionValueByProperty(t,e,i){var r=[];t.forEach((function(t,s){t[e]==i[e]&&r.push(t)})),r.forEach((function(e){Util.removeCollectionValueByRef(t,e)}))}static removeCollectionValueByRef(t,e){var i=[];if(t.forEach((function(t,r){t===e&&i.push(r)})),i.length>0)for(var r=i.length-1;r>=0;r--)t.splice(i[r],1)}static convertFetchBoolType(t){switch(t){case"true":case"1":return!0;case"false":case"0":return!1;default:throw new Error("Unexpected FetchBoolType value")}}static parseAttributes(t,e,i){for(var r=t.attributes,s=0;s<r.length;s++){i(e,r[s].nodeName,r[s].nodeValue)}}}e.Util=Util;let f=class Mapping{};f.Internal="internal",f.Logical="logical",f=p([X],f),e.Mapping=f;let y=class OutputFormat{};y.Ado="xml-ado",y.Auto="xml-auto",y.Elements="xml-elements",y.Raw="xml-raw",y.Platform="xml-platform",y=p([X],y),e.OutputFormat=y;let b=class Build{};b.OnePoint504021="1.504021",b.OnePoint003017="1.003017",b=p([X],b),e.Build=b;let v=class Aggregate{};v.Count="count",v.CountColumn="countcolumn",v.Sum="sum",v.Avg="avg",v.Min="min",v.Max="max",v=p([X],v),e.Aggregate=v;let k=class RowAggregate{};k.Countchildren="countchildren",k=p([X],k),e.RowAggregate=k;let w=class DateGrouping{};w.Day="day",w.Week="week",w.Month="month",w.Quarter="quarter",w.Year="year",w.FiscalPeriod="fiscal-period",w.FiscalYear="fiscal-year",w=p([X],w),e.DateGrouping=w;let E=class Operator{};E.Above="above",E.BeginsWith="begins-with",E.Between="between",E.EndsWith="ends-with",E.Equal="eq",E.EqualBusinessId="eq-businessid",E.EqualOrAbove="eq-or-above",E.EqualOrUnder="eq-or-under",E.EqualUserId="eq-userid",E.EqualUserLanguage="eq-userlanguage",E.EqualUserOrUserHierarchy="eq-useroruserhierarchy",E.EqualUserOrUserHierarchyAndTeams="eq-useroruserhierarchyandteams",E.EqualUserOrUserTeams="eq-useroruserteams",E.EqualUserTeams="eq-userteams",E.GreaterOrEqual="ge",E.GreaterThan="gt",E.In="in",E.InFiscalPeriod="in-fiscal-period",E.InFiscalPeriodAndYear="in-fiscal-period-and-year",E.InFiscalYear="in-fiscal-year",E.InOrAfterFiscalPeriodAndYear="in-or-after-fiscal-period-and-year",E.InOrBeforeFiscalPeriodAndYear="in-or-before-fiscal-period-and-year",E.LastFiscalPeriod="last-fiscal-period",E.LastFiscalYear="last-fiscal-year",E.LastMonth="last-month",E.LastSevenDays="last-seven-days",E.LastWeek="last-week",E.LastXDays="last-x-days",E.LastXFiscalPeriods="last-x-fiscal-periods",E.LastXFiscalYears="last-x-fiscal-years",E.LastXHours="last-x-hours",E.LastXMonths="last-x-months",E.LastXWeeks="last-x-weeks",E.LastXYears="last-x-years",E.LastYear="last-year",E.LessOrEqual="le",E.Like="like",E.LessThan="lt",E.NotEqual="ne",E.NotEqualBusinessId="ne-businessid",E.NotEqualUserId="ne-userid",E.Neq="neq",E.NextFiscalPeriod="next-fiscal-period",E.NextFiscalYear="next-fiscal-year",E.NextMonth="next-month",E.NextSevenDays="next-seven-days",E.NextWeek="next-week",E.NextXDays="next-x-days",E.NextXFiscalPeriods="next-x-fiscal-periods",E.NextXFiscalYears="next-x-fiscal-years",E.NextXHours="next-x-hours",E.NextXMonths="next-x-months",E.NextXWeeks="next-x-weeks",E.NextXYears="next-x-years",E.NextYear="next-year",E.NotBeginWith="not-begin-with",E.NotBetween="not-between",E.NotEndWith="not-end-with",E.NotIn="not-in",E.NotLike="not-like",E.NotNull="not-null",E.NotUnder="not-under",E.Null="null",E.OlderThanXDays="olderthan-x-days",E.OlderThanXHours="olderthan-x-hours",E.OlderThanXMinutes="olderthan-x-minutes",E.OlderThanXMonths="olderthan-x-months",E.OlderThanXWeeks="olderthan-x-weeks",E.OlderThanXYears="olderthan-x-years",E.On="on",E.OnOrAfter="on-or-after",E.OnOrBefore="on-or-before",E.ThisFiscalPeriod="this-fiscal-period",E.ThisFiscalYear="this-fiscal-year",E.ThisMonth="this-month",E.ThisWeek="this-week",E.ThisYear="this-year",E.Today="today",E.Tomorrow="tomorrow",E.Under="under",E.Yesterday="yesterday",E=p([X],E),e.Operator=E;let _=class FilterType{};_.And="and",_.Or="or",_=p([X],_),e.FilterType=_}(t.FetchXml||(t.FetchXml={}))}(k||(k={})),String.prototype.hashCode=function(){let t=0;if(0==this.length)return t.toString();for(let e=0;e<this.length;e++){t=(t<<5)-t+this.charCodeAt(e),t&=t}return t.toString()};const w=t=>{const e=t.parameters.value.attributes.Targets,i=t.parameters.value.raw,n=t.context,{labels:a,onNotifyOutputChanged:o}=l("Lookup",t,v),[u,h]=(t=>{const e=r({});return[i=>b(void 0,void 0,void 0,(function*(){return e.current[i]||(e.current[i]=t.webAPI.retrieveRecord("savedquery",i,"?$select=fetchxml")),(yield e.current[i]).fetchxml})),(t,e,i)=>b(void 0,void 0,void 0,(function*(){if(!i)return e;const r=yield t.metadata,s=k.FetchXml.fetch.fromXml(e);return s.entity.addFilter(new k.FetchXml.filter(k.FetchXml.FilterType.Or,[new k.FetchXml.condition(r.PrimaryNameAttribute,k.FetchXml.Operator.Like,[new k.FetchXml.value(`%${i}%`)])])),s.toXml()}))]})(n),[c,d]=s((()=>e.map((i=>({entityName:i,selected:1===e.length,metadata:t.context.utils.getEntityMetadata(i,[])}))))),m=c.find((t=>t.selected)),g=(e,i)=>b(void 0,void 0,void 0,(function*(){const r=(yield t.parameters.value.getAllViews(e)).find((t=>t.isDefault));if(!(null==r?void 0:r.viewId))throw new Error(`Entity ${e} does not have a default view id!`);let s=null==r?void 0:r.fetchXml;return s||(s=yield u(r.viewId)),h(c.find((t=>t.entityName===e)),s,i)}));return[i,c,a,{create:t=>b(void 0,void 0,void 0,(function*(){const e=yield n.navigation.openForm({entityName:t,useQuickCreateForm:!0});e.savedEntityReference&&o({value:e.savedEntityReference})})),deselect:t=>{const e=new Map(i.map((t=>[t.id,t])));e.delete(t.id),o({value:[...e.values()]})},select:t=>{o({value:t})}},t=>{d([...c].map((e=>({entityName:e.entityName,metadata:e.metadata,selected:e.entityName===t}))))},i=>b(void 0,void 0,void 0,(function*(){if(t.onSearch)return t.onSearch(m?[null==m?void 0:m.entityName]:e,i);const r=new Map;if(m)r.set(m.entityName,g(m.entityName,i));else for(const t of e)r.set(t,g(t,i));yield Promise.all(r.values());const s=new Map;for(const[t,e]of r)s.set(t,n.webAPI.retrieveMultipleRecords(t,`?$top=25&fetchXml=${encodeURIComponent(yield e)}`));yield Promise.all(s.values());const l=[];for(const[t,e]of s)for(const i of(yield e).entities){const e=yield c.find((e=>e.entityName===t)).metadata;l.push({entityType:t,id:i[e.PrimaryIdAttribute],name:i[e.PrimaryNameAttribute]})}return l}))]},E=(t,e,i)=>{const r=(t=>{if(-1!==t&&0!==t)return t})(i);return a({root:{'[class*="TALXIS__tag-picker__search-btn"][class*="TALXIS__tag-picker__search-btn"]':{top:0,bottom:0,margin:"auto 0",right:5},'[data-navigation-enabled="true"]':{"> span > div > span":{color:t.semanticColors.link,cursor:"pointer"},":hover":{textDecoration:"underline",cursor:"pointer !important"}},".ms-BasePicker-itemsWrapper .ms-CommandBar":{height:r&&e?r-6:void 0},".ms-BasePicker-text":{minHeight:null!=r?r:36,height:"min-content",paddingRight:e?void 0:36,alignItems:"baseline",input:{alignSelf:"center"},".hover-only":{animationName:"none"},"::after":{inset:"0px !important"}}},suggestions:{".ms-Suggestions-title":{padding:0,display:"flex",flexDirection:"column"}},createRecordBtn:{height:38,width:"100%",".ms-Button-menuIcon":{display:"none"},">.ms-Button-flexContainer.ms-Button-flexContainer":{justifyContent:"flex-start"},".ms-Button-textContainer":{flexGrow:"initial",">span":{fontWeight:600}}}})},_=t=>{const[e,i]=s(null);return n((()=>{b(void 0,void 0,void 0,(function*(){i(yield Promise.all(t.map((t=>b(void 0,void 0,void 0,(function*(){return{entityName:t.entityName,selected:t.selected,metadata:yield t.metadata}}))))))}))}),[t]),[e]},N=r=>{const{labels:s,entities:n,onEntitySelected:l}=Object.assign({},r),[h]=_(n),c=(t=>a({targetSelector:{display:"flex",paddingLeft:8,paddingRight:8,paddingBottom:8,gap:8,paddingTop:8,">span":{lineHeight:15,minWidth:"fit-content",color:t.semanticColors.listText,fontWeight:600}},targetSelectorLinks:{display:"flex",gap:5,flexWrap:"wrap"},targetSelectorLink:{color:t.palette.blackTranslucent40,'&[data-selected="true"]':{color:t.semanticColors.link,fontWeight:600}}}))(o());return t("div",Object.assign({className:c.targetSelector},{children:[t(d,Object.assign({variant:"small"},{children:[s.resultsFrom()," "]})),t("div",Object.assign({className:c.targetSelectorLinks},{children:[e(u,Object.assign({onClick:()=>l(null),className:c.targetSelectorLink,"data-selected":!n.find((t=>t.selected))},{children:"All"})),h&&e(i,{children:h.map((t=>e(u,Object.assign({className:c.targetSelectorLink,"data-selected":t.selected,onClick:()=>l(t.entityName)},{children:t.metadata.DisplayName}))))})]}))]}))},A=t=>{const{labels:i,entities:r,onCreateRecord:s}=Object.assign({},t),[n]=_(r),l=o(),a=E(l,0),u=r.find((t=>t.selected));return e(g,{className:a.createRecordBtn,iconProps:{iconName:"Add"},onClick:u?()=>s(u.entityName):void 0,menuProps:u?void 0:{calloutProps:{coverTarget:!1},isBeakVisible:!0,items:n?[{key:"header",itemType:h.Header,text:"Vyberte tabulku"},...n.map((t=>({key:t.entityName,text:t.metadata.DisplayName,onClick:()=>s(t.entityName)})))]:[]},text:i.newRecord()})},U=s=>{var l,a;const u=s.context,h=r(null),d=r(null),g=!0===(null===(l=s.parameters.MultipleEnabled)||void 0===l?void 0:l.raw)?1/0:1,p=o(),{height:v}=y(s.context.mode),k=E(p,1===g,v),[F,X,_,U,S,O]=w(s),x=m(h),C=f(h),B=r(!0),R=r(!1);n((()=>{B.current?B.current=!1:d.current.state.suggestionsVisible&&T()}),[X]),n((()=>{const t=t=>{var e;if("Backspace"===t.key){const t=null===(e=h.current)||void 0===e?void 0:e.querySelector('[class*="TALXIS__tag-picker__root"]');document.activeElement===t&&1===F.length&&(U.select(void 0),setTimeout((()=>{var t;null===(t=d.current)||void 0===t||t.focusInput()}),200))}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[F]),n((()=>{var t;!0===(null===(t=s.parameters.AutoFocus)||void 0===t?void 0:t.raw)&&V()}),[]);const V=()=>{var t,e,i,r;(null===(e=null===(t=d.current)||void 0===t?void 0:t.items)||void 0===e?void 0:e.length)!==g?null===(r=d.current)||void 0===r||r.focusInput():null===(i=h.current)||void 0===i||i.querySelector('[class*="TALXIS__tag-picker__root"]').focus()},T=()=>b(void 0,void 0,void 0,(function*(){d.current.suggestionStore.updateSuggestions([]),d.current.setState({suggestionsVisible:!0,suggestionsLoading:!0});const t=yield q(d.current.input.current.value);d.current.updateSuggestionsList(t),d.current.setState({isMostRecentlyUsedVisible:!1,suggestionsVisible:!0,moreSuggestionsAvailable:!1})})),L=()=>x||C,q=(t,e)=>b(void 0,void 0,void 0,(function*(){var i;const r=yield O(t),s=[];for(const t of r){if(null==e?void 0:e.find((e=>e.key===t.id)))continue;const r=yield null===(i=X.find((e=>e.entityName===t.entityType)))||void 0===i?void 0:i.metadata;s.push({key:t.id,text:t.name||_.noName(),secondaryText:null==r?void 0:r.DisplayName,"data-entity":t.entityType})}return s}));return e("div",Object.assign({className:k.root,ref:h},{children:e(c,{componentRef:d,resolveDelay:200,stackItems:1===g,errorMessage:s.parameters.value.errorMessage,pickerCalloutProps:{className:k.suggestions},pickerSuggestionsProps:{loadingText:_.searching(),noResultsFoundText:_.noRecordsFound(),suggestionsHeaderText:t(i,{children:[!1!==(null===(a=s.parameters.IsInlineNewEnabled)||void 0===a?void 0:a.raw)&&e(A,{labels:_,entities:X,onCreateRecord:U.create}),s.parameters.value.attributes.Targets.length>1&&e(N,{labels:_,entities:X,onEntitySelected:t=>{S(t)}})]})},transparent:!L()&&1===g,onChange:t=>{U.select(null==t?void 0:t.map((t=>({entityType:t["data-entity"],id:t.key,name:t.text}))))},searchBtnProps:{iconProps:{iconName:"Search"}},selectedItems:F.map((t=>{var e;return{key:t.id,text:t.name||_.noName(),"data-entity":t.entityType,"data-navigation-enabled":!1!==(null===(e=s.parameters.EnableNavigation)||void 0===e?void 0:e.raw),onClick:()=>{var e;!1!==(null===(e=s.parameters.EnableNavigation)||void 0===e?void 0:e.raw)&&u.navigation.openForm({entityName:t.entityType,entityId:t.id})},deleteButtonProps:L()||g>1?{key:"delete",iconProps:{iconName:"ChromeClose",styles:{root:{fontSize:12,width:16,color:`${p.palette.black} !important`}}},onClick:()=>{R.current=!1,U.deselect(t),setTimeout((()=>{V()}),200)}}:void 0}})),itemLimit:g,onResolveSuggestions:q})}))};export{U as L,b as _};