@ynput/ayon-frontend-shared 0.2.28 → 0.2.29

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 (781) hide show
  1. package/dist/DetailsPanel.cjs.js +1 -1
  2. package/dist/DetailsPanel.es.js +6 -6
  3. package/dist/Views.cjs.js.map +1 -1
  4. package/dist/Views.es.js.map +1 -1
  5. package/dist/api.cjs.js +1 -1
  6. package/dist/api.es.js +151 -153
  7. package/dist/components.cjs.js +1 -1
  8. package/dist/components.es.js +79 -86
  9. package/dist/components.es.js.map +1 -1
  10. package/dist/hooks.cjs.js +1 -1
  11. package/dist/hooks.es.js +8 -6
  12. package/dist/hooks.es.js.map +1 -1
  13. package/dist/index.cjs.js +1 -1
  14. package/dist/index.es.js +6 -6
  15. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js +2 -0
  16. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js.map +1 -0
  17. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js +63 -0
  18. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -0
  19. package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js +2 -0
  20. package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js.map +1 -0
  21. package/dist/node_modules/@ungap/structured-clone/esm/index.es.js +12 -0
  22. package/dist/node_modules/@ungap/structured-clone/esm/index.es.js.map +1 -0
  23. package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js +2 -0
  24. package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js.map +1 -0
  25. package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js +107 -0
  26. package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -0
  27. package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js +2 -0
  28. package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js.map +1 -0
  29. package/dist/node_modules/@ungap/structured-clone/esm/types.es.js +14 -0
  30. package/dist/node_modules/@ungap/structured-clone/esm/types.es.js.map +1 -0
  31. package/dist/node_modules/devlop/lib/default.cjs.js +2 -0
  32. package/dist/node_modules/devlop/lib/default.cjs.js.map +1 -0
  33. package/dist/node_modules/devlop/lib/default.es.js +6 -0
  34. package/dist/node_modules/devlop/lib/default.es.js.map +1 -0
  35. package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js +2 -0
  36. package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js.map +1 -0
  37. package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js +39 -0
  38. package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js.map +1 -0
  39. package/dist/node_modules/entities/dist/esm/decode.cjs.js +2 -0
  40. package/dist/node_modules/entities/dist/esm/decode.cjs.js.map +1 -0
  41. package/dist/node_modules/entities/dist/esm/decode.es.js +246 -0
  42. package/dist/node_modules/entities/dist/esm/decode.es.js.map +1 -0
  43. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js +2 -0
  44. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js.map +1 -0
  45. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js +8 -0
  46. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js.map +1 -0
  47. package/dist/node_modules/hast-util-raw/lib/index.cjs.js +2 -0
  48. package/dist/node_modules/hast-util-raw/lib/index.cjs.js.map +1 -0
  49. package/dist/node_modules/hast-util-raw/lib/index.es.js +218 -0
  50. package/dist/node_modules/hast-util-raw/lib/index.es.js.map +1 -0
  51. package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js +2 -0
  52. package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js.map +1 -0
  53. package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js +146 -0
  54. package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js.map +1 -0
  55. package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js +2 -0
  56. package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js.map +1 -0
  57. package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js +21 -0
  58. package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js.map +1 -0
  59. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js +2 -0
  60. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js.map +1 -0
  61. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js +113 -0
  62. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js.map +1 -0
  63. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js +2 -0
  64. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js.map +1 -0
  65. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js +9 -0
  66. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js.map +1 -0
  67. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js +2 -0
  68. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js.map +1 -0
  69. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js +45 -0
  70. package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js.map +1 -0
  71. package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js +2 -0
  72. package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js.map +1 -0
  73. package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js +26 -0
  74. package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js.map +1 -0
  75. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js +2 -0
  76. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js.map +1 -0
  77. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js +99 -0
  78. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js.map +1 -0
  79. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js +2 -0
  80. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js.map +1 -0
  81. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js +8 -0
  82. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js.map +1 -0
  83. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js +2 -0
  84. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js.map +1 -0
  85. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js +211 -0
  86. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js.map +1 -0
  87. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js +2 -0
  88. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js.map +1 -0
  89. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js +251 -0
  90. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js.map +1 -0
  91. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js +2 -0
  92. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js.map +1 -0
  93. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js +15 -0
  94. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js.map +1 -0
  95. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js +2 -0
  96. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js.map +1 -0
  97. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js +74 -0
  98. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js.map +1 -0
  99. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js +2 -0
  100. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js.map +1 -0
  101. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js +85 -0
  102. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js.map +1 -0
  103. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js +2 -0
  104. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js.map +1 -0
  105. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js +2272 -0
  106. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js.map +1 -0
  107. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js +2 -0
  108. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js.map +1 -0
  109. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js +241 -0
  110. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js.map +1 -0
  111. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js +2 -0
  112. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js.map +1 -0
  113. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js +3 -0
  114. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js.map +1 -0
  115. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js +2 -0
  116. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js.map +1 -0
  117. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js +1941 -0
  118. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js.map +1 -0
  119. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js +2 -0
  120. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js.map +1 -0
  121. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js +89 -0
  122. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js.map +1 -0
  123. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js +2 -0
  124. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js.map +1 -0
  125. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js +163 -0
  126. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js.map +1 -0
  127. package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js +2 -0
  128. package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js.map +1 -0
  129. package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js +13 -0
  130. package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js.map +1 -0
  131. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js +2 -0
  132. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js.map +1 -0
  133. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js +62 -0
  134. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js.map +1 -0
  135. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js +2 -0
  136. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js.map +1 -0
  137. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js +34 -0
  138. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js.map +1 -0
  139. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js +2 -0
  140. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js.map +1 -0
  141. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js +369 -0
  142. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js.map +1 -0
  143. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js +2 -0
  144. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js.map +1 -0
  145. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js +7 -0
  146. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js.map +1 -0
  147. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js +2 -0
  148. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js.map +1 -0
  149. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js +567 -0
  150. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js.map +1 -0
  151. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js +2 -0
  152. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js.map +1 -0
  153. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js +8 -0
  154. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +1 -0
  155. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js +2 -0
  156. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js.map +1 -0
  157. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js +7 -0
  158. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +1 -0
  159. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js +2 -0
  160. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js.map +1 -0
  161. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js +20 -0
  162. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js.map +1 -0
  163. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js +2 -0
  164. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js.map +1 -0
  165. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js +37 -0
  166. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js.map +1 -0
  167. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js +2 -0
  168. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js.map +1 -0
  169. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js +29 -0
  170. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js.map +1 -0
  171. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js +2 -0
  172. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js.map +1 -0
  173. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js +11 -0
  174. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js.map +1 -0
  175. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js +2 -0
  176. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js.map +1 -0
  177. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js +22 -0
  178. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js.map +1 -0
  179. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js +2 -0
  180. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js.map +1 -0
  181. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js +15 -0
  182. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js.map +1 -0
  183. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js +2 -0
  184. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js.map +1 -0
  185. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js +20 -0
  186. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js.map +1 -0
  187. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js +2 -0
  188. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js.map +1 -0
  189. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js +12 -0
  190. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js.map +1 -0
  191. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js +2 -0
  192. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js.map +1 -0
  193. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js +12 -0
  194. package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js.map +1 -0
  195. package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js +3 -0
  196. package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js.map +1 -0
  197. package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js +43 -0
  198. package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js.map +1 -0
  199. package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js +2 -0
  200. package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js.map +1 -0
  201. package/dist/node_modules/hast-util-to-parse5/lib/index.es.js +119 -0
  202. package/dist/node_modules/hast-util-to-parse5/lib/index.es.js.map +1 -0
  203. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
  204. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js.map +1 -1
  205. package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +1 -1
  206. package/dist/node_modules/rehype/node_modules/unist-util-stringify-position/lib/index.cjs.js.map +1 -0
  207. package/dist/node_modules/{vfile/node_modules/unist-util-stringify-position/lib/index.cjs.js.map → rehype/node_modules/unist-util-stringify-position/lib/index.es.js.map} +1 -1
  208. package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +2 -0
  209. package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js.map +1 -0
  210. package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/index.es.js +2 -2
  211. package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js.map +1 -0
  212. package/dist/node_modules/rehype/node_modules/vfile/lib/minpath.browser.cjs.js.map +1 -0
  213. package/dist/node_modules/rehype/node_modules/vfile/lib/minpath.browser.es.js.map +1 -0
  214. package/dist/node_modules/rehype/node_modules/vfile/lib/minproc.browser.cjs.js.map +1 -0
  215. package/dist/node_modules/rehype/node_modules/vfile/lib/minproc.browser.es.js.map +1 -0
  216. package/dist/node_modules/rehype/node_modules/vfile/lib/minurl.browser.cjs.js.map +1 -0
  217. package/dist/node_modules/rehype/node_modules/vfile/lib/minurl.browser.es.js.map +1 -0
  218. package/dist/node_modules/rehype/node_modules/vfile/lib/minurl.shared.cjs.js.map +1 -0
  219. package/dist/node_modules/rehype/node_modules/vfile/lib/minurl.shared.es.js.map +1 -0
  220. package/dist/node_modules/rehype/node_modules/vfile-message/lib/index.cjs.js.map +1 -0
  221. package/dist/node_modules/{vfile/node_modules/vfile-message/lib/index.cjs.js.map → rehype/node_modules/vfile-message/lib/index.es.js.map} +1 -1
  222. package/dist/node_modules/rehype-raw/lib/index.cjs.js +2 -0
  223. package/dist/node_modules/rehype-raw/lib/index.cjs.js.map +1 -0
  224. package/dist/node_modules/rehype-raw/lib/index.es.js +13 -0
  225. package/dist/node_modules/rehype-raw/lib/index.es.js.map +1 -0
  226. package/dist/node_modules/unist-util-is/lib/index.cjs.js +2 -0
  227. package/dist/node_modules/unist-util-is/lib/index.cjs.js.map +1 -0
  228. package/dist/node_modules/unist-util-is/lib/index.es.js +85 -0
  229. package/dist/node_modules/unist-util-is/lib/index.es.js.map +1 -0
  230. package/dist/node_modules/unist-util-position/lib/index.cjs.js +2 -0
  231. package/dist/node_modules/unist-util-position/lib/index.cjs.js.map +1 -0
  232. package/dist/node_modules/unist-util-position/lib/index.es.js +18 -0
  233. package/dist/node_modules/unist-util-position/lib/index.es.js.map +1 -0
  234. package/dist/node_modules/unist-util-visit/lib/index.cjs.js +2 -0
  235. package/dist/node_modules/unist-util-visit/lib/index.cjs.js.map +1 -0
  236. package/dist/node_modules/unist-util-visit/lib/index.es.js +17 -0
  237. package/dist/node_modules/unist-util-visit/lib/index.es.js.map +1 -0
  238. package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js +2 -0
  239. package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js.map +1 -0
  240. package/dist/node_modules/unist-util-visit-parents/lib/color.es.js +7 -0
  241. package/dist/node_modules/unist-util-visit-parents/lib/color.es.js.map +1 -0
  242. package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js +2 -0
  243. package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js.map +1 -0
  244. package/dist/node_modules/unist-util-visit-parents/lib/index.es.js +57 -0
  245. package/dist/node_modules/unist-util-visit-parents/lib/index.es.js.map +1 -0
  246. package/dist/node_modules/web-namespaces/index.cjs.js +1 -1
  247. package/dist/node_modules/web-namespaces/index.cjs.js.map +1 -1
  248. package/dist/node_modules/web-namespaces/index.es.js +8 -3
  249. package/dist/node_modules/web-namespaces/index.es.js.map +1 -1
  250. package/dist/shared/src/api/generated/entityLists.cjs.js.map +1 -1
  251. package/dist/shared/src/api/generated/entityLists.es.js.map +1 -1
  252. package/dist/shared/src/api/generated/folders.cjs.js.map +1 -1
  253. package/dist/shared/src/api/generated/folders.es.js.map +1 -1
  254. package/dist/shared/src/api/generated/graphql.cjs.js +5 -3
  255. package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
  256. package/dist/shared/src/api/generated/graphql.es.js +14 -12
  257. package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
  258. package/dist/shared/src/api/generated/views.cjs.js.map +1 -1
  259. package/dist/shared/src/api/generated/views.es.js.map +1 -1
  260. package/dist/shared/src/api/queries/entityLists/getLists.cjs.js +1 -1
  261. package/dist/shared/src/api/queries/entityLists/getLists.cjs.js.map +1 -1
  262. package/dist/shared/src/api/queries/entityLists/getLists.es.js +117 -142
  263. package/dist/shared/src/api/queries/entityLists/getLists.es.js.map +1 -1
  264. package/dist/shared/src/api/queries/entityLists/updateLists.cjs.js +1 -1
  265. package/dist/shared/src/api/queries/entityLists/updateLists.cjs.js.map +1 -1
  266. package/dist/shared/src/api/queries/entityLists/updateLists.es.js +95 -110
  267. package/dist/shared/src/api/queries/entityLists/updateLists.es.js.map +1 -1
  268. package/dist/shared/src/api/queries/links/getEntityLinks.cjs.js +1 -1
  269. package/dist/shared/src/api/queries/links/getEntityLinks.cjs.js.map +1 -1
  270. package/dist/shared/src/api/queries/links/getEntityLinks.es.js +41 -40
  271. package/dist/shared/src/api/queries/links/getEntityLinks.es.js.map +1 -1
  272. package/dist/shared/src/api/queries/links/updateLinks.cjs.js +1 -1
  273. package/dist/shared/src/api/queries/links/updateLinks.cjs.js.map +1 -1
  274. package/dist/shared/src/api/queries/links/updateLinks.es.js +164 -143
  275. package/dist/shared/src/api/queries/links/updateLinks.es.js.map +1 -1
  276. package/dist/shared/src/api/queries/users/getUsers.cjs.js +1 -1
  277. package/dist/shared/src/api/queries/users/getUsers.cjs.js.map +1 -1
  278. package/dist/shared/src/api/queries/users/getUsers.es.js +17 -21
  279. package/dist/shared/src/api/queries/users/getUsers.es.js.map +1 -1
  280. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributesEditor.cjs.js +26 -37
  281. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributesEditor.cjs.js.map +1 -1
  282. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributesEditor.es.js +100 -97
  283. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributesEditor.es.js.map +1 -1
  284. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js +6 -5
  285. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js.map +1 -1
  286. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js +169 -62
  287. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js.map +1 -1
  288. package/dist/shared/src/components/DetailsPanelDetails/BorderedSection.cjs.js +48 -0
  289. package/dist/shared/src/components/DetailsPanelDetails/BorderedSection.cjs.js.map +1 -0
  290. package/dist/shared/src/components/DetailsPanelDetails/BorderedSection.es.js +87 -0
  291. package/dist/shared/src/components/DetailsPanelDetails/BorderedSection.es.js.map +1 -0
  292. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js +2 -0
  293. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js.map +1 -0
  294. package/dist/shared/src/components/{ListAttributeForm/ListAttributeForm.es.js → DetailsPanelDetails/DescriptionSection.es.js} +117 -105
  295. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js.map +1 -0
  296. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.styles.cjs.js +385 -0
  297. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.styles.cjs.js.map +1 -0
  298. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.styles.es.js +401 -0
  299. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.styles.es.js.map +1 -0
  300. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js +12 -0
  301. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js.map +1 -0
  302. package/dist/shared/src/components/{LinksManager/LinksManagerDialog.es.js → DetailsPanelDetails/DetailsPanelDetails.es.js} +92 -91
  303. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js.map +1 -0
  304. package/dist/shared/src/components/DetailsPanelDetails/DetailsSection.cjs.js +51 -0
  305. package/dist/shared/src/components/DetailsPanelDetails/DetailsSection.cjs.js.map +1 -0
  306. package/dist/shared/src/components/DetailsPanelDetails/DetailsSection.es.js +113 -0
  307. package/dist/shared/src/components/DetailsPanelDetails/DetailsSection.es.js.map +1 -0
  308. package/dist/shared/src/components/DetailsPanelDetails/FieldLabel.cjs.js +8 -0
  309. package/dist/shared/src/components/DetailsPanelDetails/FieldLabel.cjs.js.map +1 -0
  310. package/dist/shared/src/components/DetailsPanelDetails/FieldLabel.es.js +25 -0
  311. package/dist/shared/src/components/DetailsPanelDetails/FieldLabel.es.js.map +1 -0
  312. package/dist/shared/src/components/DetailsPanelDetails/hooks/useDescriptionEditor.cjs.js +2 -0
  313. package/dist/shared/src/components/DetailsPanelDetails/hooks/useDescriptionEditor.cjs.js.map +1 -0
  314. package/dist/shared/src/components/DetailsPanelDetails/hooks/useDescriptionEditor.es.js +61 -0
  315. package/dist/shared/src/components/DetailsPanelDetails/hooks/useDescriptionEditor.es.js.map +1 -0
  316. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityData.cjs.js +2 -0
  317. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityData.cjs.js.map +1 -0
  318. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityData.es.js +95 -0
  319. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityData.es.js.map +1 -0
  320. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js +2 -0
  321. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js.map +1 -0
  322. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js +109 -0
  323. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js.map +1 -0
  324. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFields.cjs.js +2 -0
  325. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFields.cjs.js.map +1 -0
  326. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFields.es.js +131 -0
  327. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFields.es.js.map +1 -0
  328. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFormData.cjs.js +2 -0
  329. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFormData.cjs.js.map +1 -0
  330. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFormData.es.js +64 -0
  331. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityFormData.es.js.map +1 -0
  332. package/dist/shared/src/components/DetailsPanelDetails/hooks/useMentionSystem.cjs.js +2 -0
  333. package/dist/shared/src/components/DetailsPanelDetails/hooks/useMentionSystem.cjs.js.map +1 -0
  334. package/dist/shared/src/components/DetailsPanelDetails/hooks/useMentionSystem.es.js +28 -0
  335. package/dist/shared/src/components/DetailsPanelDetails/hooks/useMentionSystem.es.js.map +1 -0
  336. package/dist/shared/src/components/DetailsPanelDetails/hooks/useQuillFormats.cjs.js +2 -0
  337. package/dist/shared/src/components/DetailsPanelDetails/hooks/useQuillFormats.cjs.js.map +1 -0
  338. package/dist/shared/src/components/DetailsPanelDetails/hooks/useQuillFormats.es.js +6 -0
  339. package/dist/shared/src/components/DetailsPanelDetails/hooks/useQuillFormats.es.js.map +1 -0
  340. package/dist/shared/src/components/DetailsPanelDetails/types.cjs.js +2 -0
  341. package/dist/shared/src/components/DetailsPanelDetails/types.cjs.js.map +1 -0
  342. package/dist/shared/src/components/DetailsPanelDetails/types.es.js +37 -0
  343. package/dist/shared/src/components/DetailsPanelDetails/types.es.js.map +1 -0
  344. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js +1 -1
  345. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js.map +1 -1
  346. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js +9 -9
  347. package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js +1 -1
  348. package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js.map +1 -1
  349. package/dist/shared/src/components/LinksManager/AddNewLinks.es.js +5 -5
  350. package/dist/shared/src/components/LinksManager/CellEditingDialog.cjs.js +8 -0
  351. package/dist/shared/src/components/LinksManager/CellEditingDialog.cjs.js.map +1 -0
  352. package/dist/shared/src/components/LinksManager/CellEditingDialog.es.js +86 -0
  353. package/dist/shared/src/components/LinksManager/CellEditingDialog.es.js.map +1 -0
  354. package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js +1 -1
  355. package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js.map +1 -1
  356. package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js +29 -20
  357. package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
  358. package/dist/shared/src/components/LinksManager/LinksManager.cjs.js +1 -1
  359. package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
  360. package/dist/shared/src/components/LinksManager/LinksManager.es.js +55 -43
  361. package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
  362. package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js +42 -9
  363. package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js.map +1 -1
  364. package/dist/shared/src/components/LinksManager/LinksManager.styled.es.js +49 -16
  365. package/dist/shared/src/components/LinksManager/LinksManager.styled.es.js.map +1 -1
  366. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js +1 -1
  367. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js.map +1 -1
  368. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js +9 -9
  369. package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js +3 -3
  370. package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js.map +1 -1
  371. package/dist/shared/src/components/Powerpack/PowerpackButton.es.js +5 -5
  372. package/dist/shared/src/components/Powerpack/PowerpackButton.es.js.map +1 -1
  373. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js +1 -1
  374. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js.map +1 -1
  375. package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js +6 -6
  376. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js +2 -2
  377. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js.map +1 -1
  378. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js +26 -18
  379. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js.map +1 -1
  380. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js +1 -1
  381. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js.map +1 -1
  382. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js +27 -21
  383. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js.map +1 -1
  384. package/dist/shared/src/components/QuillListStyles/QuillListStyles.cjs.js +59 -0
  385. package/dist/shared/src/components/QuillListStyles/QuillListStyles.cjs.js.map +1 -0
  386. package/dist/shared/src/components/QuillListStyles/QuillListStyles.es.js +63 -0
  387. package/dist/shared/src/components/QuillListStyles/QuillListStyles.es.js.map +1 -0
  388. package/dist/shared/src/components/RenameForm/RenameForm.cjs.js +31 -0
  389. package/dist/shared/src/components/RenameForm/RenameForm.cjs.js.map +1 -0
  390. package/dist/shared/src/components/RenameForm/RenameForm.es.js +396 -0
  391. package/dist/shared/src/components/RenameForm/RenameForm.es.js.map +1 -0
  392. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js +1 -1
  393. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js.map +1 -1
  394. package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js +6 -6
  395. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js +1 -1
  396. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js.map +1 -1
  397. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js +6 -6
  398. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js +1 -1
  399. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js.map +1 -1
  400. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js +6 -6
  401. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js +1 -1
  402. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js.map +1 -1
  403. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js +6 -6
  404. package/dist/shared/src/components/StyledLink/StyledLink.cjs.js +14 -0
  405. package/dist/shared/src/components/StyledLink/StyledLink.cjs.js.map +1 -0
  406. package/dist/shared/src/components/StyledLink/StyledLink.es.js +19 -0
  407. package/dist/shared/src/components/StyledLink/StyledLink.es.js.map +1 -0
  408. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js +1 -1
  409. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js.map +1 -1
  410. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js +6 -6
  411. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js +1 -1
  412. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js.map +1 -1
  413. package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js +6 -6
  414. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js +1 -1
  415. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js.map +1 -1
  416. package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js +6 -6
  417. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js +1 -1
  418. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js.map +1 -1
  419. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js +193 -162
  420. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js.map +1 -1
  421. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.styled.cjs.js +1 -7
  422. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.styled.cjs.js.map +1 -1
  423. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.styled.es.js +6 -13
  424. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.styled.es.js.map +1 -1
  425. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.cjs.js +1 -1
  426. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
  427. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.es.js +6 -6
  428. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js +1 -1
  429. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
  430. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.es.js +6 -6
  431. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js +1 -1
  432. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
  433. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js +124 -114
  434. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
  435. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.styled.cjs.js +4 -3
  436. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.styled.cjs.js.map +1 -1
  437. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.styled.es.js +1 -0
  438. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.styled.es.js.map +1 -1
  439. package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.cjs.js +2 -0
  440. package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.cjs.js.map +1 -0
  441. package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.es.js +85 -0
  442. package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.es.js.map +1 -0
  443. package/dist/shared/src/containers/DetailsPanel/FeedFilters/FeedFilters.cjs.js +1 -1
  444. package/dist/shared/src/containers/DetailsPanel/FeedFilters/FeedFilters.cjs.js.map +1 -1
  445. package/dist/shared/src/containers/DetailsPanel/FeedFilters/FeedFilters.es.js +18 -18
  446. package/dist/shared/src/containers/DetailsPanel/FeedFilters/FeedFilters.es.js.map +1 -1
  447. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js +1 -1
  448. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js.map +1 -1
  449. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.es.js +6 -6
  450. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js +1 -1
  451. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js.map +1 -1
  452. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.es.js +6 -6
  453. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js +1 -1
  454. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js.map +1 -1
  455. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.es.js +6 -6
  456. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js +1 -1
  457. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js.map +1 -1
  458. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js +6 -6
  459. package/dist/shared/src/containers/Feed/components/ActivityDate.cjs.js +8 -3
  460. package/dist/shared/src/containers/Feed/components/ActivityDate.cjs.js.map +1 -1
  461. package/dist/shared/src/containers/Feed/components/ActivityDate.es.js +21 -16
  462. package/dist/shared/src/containers/Feed/components/ActivityDate.es.js.map +1 -1
  463. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js +1 -1
  464. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js.map +1 -1
  465. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js +21 -21
  466. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js.map +1 -1
  467. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.styled.cjs.js +37 -8
  468. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.styled.cjs.js.map +1 -1
  469. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.styled.es.js +44 -14
  470. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.styled.es.js.map +1 -1
  471. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js +2 -2
  472. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js.map +1 -1
  473. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js +58 -57
  474. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js.map +1 -1
  475. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.cjs.js +7 -58
  476. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.cjs.js.map +1 -1
  477. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.es.js +14 -65
  478. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.es.js.map +1 -1
  479. package/dist/shared/src/containers/Feed/components/CommentInput/modules/index.cjs.js +1 -1
  480. package/dist/shared/src/containers/Feed/components/CommentInput/modules/index.cjs.js.map +1 -1
  481. package/dist/shared/src/containers/Feed/components/CommentInput/modules/index.es.js +17 -15
  482. package/dist/shared/src/containers/Feed/components/CommentInput/modules/index.es.js.map +1 -1
  483. package/dist/shared/src/containers/Feed/components/CommentInput/quillToMarkdown.cjs.js +7 -6
  484. package/dist/shared/src/containers/Feed/components/CommentInput/quillToMarkdown.cjs.js.map +1 -1
  485. package/dist/shared/src/containers/Feed/components/CommentInput/quillToMarkdown.es.js +27 -18
  486. package/dist/shared/src/containers/Feed/components/CommentInput/quillToMarkdown.es.js.map +1 -1
  487. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +1 -1
  488. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
  489. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +53 -51
  490. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js.map +1 -1
  491. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js +1 -1
  492. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js.map +1 -1
  493. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js +280 -207
  494. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
  495. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js +1 -1
  496. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js.map +1 -1
  497. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js +6 -6
  498. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js +1 -1
  499. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js.map +1 -1
  500. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js +5 -5
  501. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +3 -3
  502. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
  503. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +212 -206
  504. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
  505. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js +1 -1
  506. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js.map +1 -1
  507. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js +41 -34
  508. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js.map +1 -1
  509. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js +1 -1
  510. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js.map +1 -1
  511. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js +5 -5
  512. package/dist/shared/src/containers/ProjectTreeTable/context/clipboard/clipboardValidation.cjs.js +1 -1
  513. package/dist/shared/src/containers/ProjectTreeTable/context/clipboard/clipboardValidation.cjs.js.map +1 -1
  514. package/dist/shared/src/containers/ProjectTreeTable/context/clipboard/clipboardValidation.es.js +130 -33
  515. package/dist/shared/src/containers/ProjectTreeTable/context/clipboard/clipboardValidation.es.js.map +1 -1
  516. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js +1 -1
  517. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js.map +1 -1
  518. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js +10 -13
  519. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js.map +1 -1
  520. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js +1 -1
  521. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js +1 -1
  522. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js +1 -1
  523. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js.map +1 -1
  524. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js +48 -45
  525. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js.map +1 -1
  526. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js +1 -1
  527. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js.map +1 -1
  528. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js +104 -93
  529. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js.map +1 -1
  530. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js +1 -1
  531. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js.map +1 -1
  532. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js +5 -5
  533. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js +1 -1
  534. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js.map +1 -1
  535. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js +5 -5
  536. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js +1 -1
  537. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js.map +1 -1
  538. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js +111 -87
  539. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js.map +1 -1
  540. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js +1 -1
  541. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js.map +1 -1
  542. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.es.js +9 -9
  543. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js +1 -1
  544. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js.map +1 -1
  545. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.es.js +9 -9
  546. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js +1 -1
  547. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js.map +1 -1
  548. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js +5 -5
  549. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js +1 -1
  550. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js.map +1 -1
  551. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js +5 -5
  552. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js +1 -1
  553. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js.map +1 -1
  554. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js +7 -7
  555. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js.map +1 -1
  556. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js +2 -2
  557. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js.map +1 -1
  558. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js +88 -74
  559. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js.map +1 -1
  560. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumWidget.cjs.js +2 -2
  561. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumWidget.cjs.js.map +1 -1
  562. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumWidget.es.js +66 -66
  563. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumWidget.es.js.map +1 -1
  564. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js +1 -1
  565. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js.map +1 -1
  566. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js +58 -61
  567. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js.map +1 -1
  568. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js +2 -0
  569. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js.map +1 -0
  570. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js +241 -0
  571. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js.map +1 -0
  572. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js +8 -3
  573. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js.map +1 -1
  574. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.es.js +82 -32
  575. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.es.js.map +1 -1
  576. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidgetInput.cjs.js +2 -2
  577. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidgetInput.cjs.js.map +1 -1
  578. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidgetInput.es.js +79 -24
  579. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidgetInput.es.js.map +1 -1
  580. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js +1 -1
  581. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js.map +1 -1
  582. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js +6 -6
  583. package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js +1 -1
  584. package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js.map +1 -1
  585. package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js +109 -121
  586. package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js.map +1 -1
  587. package/dist/shared/src/containers/SimpleTable/SimpleTable.styled.cjs.js +4 -16
  588. package/dist/shared/src/containers/SimpleTable/SimpleTable.styled.cjs.js.map +1 -1
  589. package/dist/shared/src/containers/SimpleTable/SimpleTable.styled.es.js +1 -13
  590. package/dist/shared/src/containers/SimpleTable/SimpleTable.styled.es.js.map +1 -1
  591. package/dist/shared/src/containers/SimpleTable/SimpleTableRowTemplate.cjs.js +1 -1
  592. package/dist/shared/src/containers/SimpleTable/SimpleTableRowTemplate.cjs.js.map +1 -1
  593. package/dist/shared/src/containers/SimpleTable/SimpleTableRowTemplate.es.js +50 -62
  594. package/dist/shared/src/containers/SimpleTable/SimpleTableRowTemplate.es.js.map +1 -1
  595. package/dist/shared/src/context/DetailsPanelContext.cjs.js.map +1 -1
  596. package/dist/shared/src/context/DetailsPanelContext.es.js.map +1 -1
  597. package/dist/shared/src/context/PowerpackContext.cjs.js +1 -1
  598. package/dist/shared/src/context/PowerpackContext.cjs.js.map +1 -1
  599. package/dist/shared/src/context/PowerpackContext.es.js +15 -20
  600. package/dist/shared/src/context/PowerpackContext.es.js.map +1 -1
  601. package/dist/shared/src/hooks/useActionTriggers.cjs.js +1 -1
  602. package/dist/shared/src/hooks/useActionTriggers.cjs.js.map +1 -1
  603. package/dist/shared/src/hooks/useActionTriggers.es.js +27 -32
  604. package/dist/shared/src/hooks/useActionTriggers.es.js.map +1 -1
  605. package/dist/shared/src/hooks/useTagStyling.cjs.js +2 -0
  606. package/dist/shared/src/hooks/useTagStyling.cjs.js.map +1 -0
  607. package/dist/shared/src/hooks/useTagStyling.es.js +33 -0
  608. package/dist/shared/src/hooks/useTagStyling.es.js.map +1 -0
  609. package/dist/shared/src/util/checkName.cjs.js +2 -0
  610. package/dist/shared/src/util/checkName.cjs.js.map +1 -0
  611. package/dist/shared/src/util/checkName.es.js +9 -0
  612. package/dist/shared/src/util/checkName.es.js.map +1 -0
  613. package/dist/shared/src/util/clipboardUtils.cjs.js +2 -0
  614. package/dist/shared/src/util/clipboardUtils.cjs.js.map +1 -0
  615. package/dist/shared/src/util/clipboardUtils.es.js +13 -0
  616. package/dist/shared/src/util/clipboardUtils.es.js.map +1 -0
  617. package/dist/shared/src/util/copyToClipboard.cjs.js +1 -1
  618. package/dist/shared/src/util/copyToClipboard.cjs.js.map +1 -1
  619. package/dist/shared/src/util/copyToClipboard.es.js +21 -21
  620. package/dist/shared/src/util/copyToClipboard.es.js.map +1 -1
  621. package/dist/shared/src/util/humanizeFieldName.cjs.js +2 -0
  622. package/dist/shared/src/util/humanizeFieldName.cjs.js.map +1 -0
  623. package/dist/shared/src/util/humanizeFieldName.es.js +15 -0
  624. package/dist/shared/src/util/humanizeFieldName.es.js.map +1 -0
  625. package/dist/shared/src/util/parseHtmlToPlainTextWithLinks.cjs.js +7 -0
  626. package/dist/shared/src/util/parseHtmlToPlainTextWithLinks.cjs.js.map +1 -0
  627. package/dist/shared/src/util/parseHtmlToPlainTextWithLinks.es.js +64 -0
  628. package/dist/shared/src/util/parseHtmlToPlainTextWithLinks.es.js.map +1 -0
  629. package/dist/types/api/generated/entityLists.d.ts +8 -8
  630. package/dist/types/api/generated/folders.d.ts +2 -0
  631. package/dist/types/api/generated/graphql.d.ts +20 -5
  632. package/dist/types/api/generated/index.d.ts +1 -0
  633. package/dist/types/api/generated/views.d.ts +9 -47
  634. package/dist/types/api/queries/entityLists/getLists.d.ts +0 -133
  635. package/dist/types/api/queries/entityLists/types.d.ts +1 -2
  636. package/dist/types/api/queries/permissions/getPermissions.d.ts +22 -22
  637. package/dist/types/api/queries/share/share.d.ts +1 -1
  638. package/dist/types/api/queries/users/getUsers.d.ts +0 -132
  639. package/dist/types/api/queries/users/updateUsers.d.ts +3 -3
  640. package/dist/types/components/DetailsPanelAttributes/DetailsPanelAttributesEditor.d.ts +2 -4
  641. package/dist/types/components/DetailsPanelAttributes/components/RenderFieldWidget.d.ts +3 -0
  642. package/dist/types/components/DetailsPanelAttributes/index.d.ts +0 -1
  643. package/dist/types/components/DetailsPanelDetails/BorderedSection.d.ts +14 -0
  644. package/dist/types/components/DetailsPanelDetails/DescriptionSection.d.ts +10 -0
  645. package/dist/types/components/DetailsPanelDetails/DescriptionSection.styles.d.ts +10 -0
  646. package/dist/types/components/DetailsPanelDetails/DetailsPanelDetails.d.ts +6 -0
  647. package/dist/types/components/DetailsPanelDetails/DetailsSection.d.ts +1 -1
  648. package/dist/types/components/DetailsPanelDetails/FieldLabel.d.ts +11 -0
  649. package/dist/types/components/DetailsPanelDetails/hooks/index.d.ts +7 -0
  650. package/dist/types/components/DetailsPanelDetails/hooks/useDescriptionEditor.d.ts +17 -0
  651. package/dist/types/components/DetailsPanelDetails/hooks/useEntityData.d.ts +12 -0
  652. package/dist/types/components/DetailsPanelDetails/hooks/useEntityEditing.d.ts +10 -0
  653. package/dist/types/components/DetailsPanelDetails/hooks/useEntityFields.d.ts +16 -0
  654. package/dist/types/components/DetailsPanelDetails/hooks/useEntityFormData.d.ts +8 -0
  655. package/dist/types/components/DetailsPanelDetails/hooks/useQuillFormats.d.ts +1 -0
  656. package/dist/types/components/DetailsPanelDetails/index.d.ts +2 -0
  657. package/dist/types/components/DetailsPanelDetails/types.d.ts +20 -0
  658. package/dist/types/components/EnumEditor/EnumEditor.styled.d.ts +1 -1
  659. package/dist/types/components/LinksManager/CellEditingDialog.d.ts +8 -0
  660. package/dist/types/components/Powerpack/index.d.ts +0 -1
  661. package/dist/types/components/QuillListStyles/QuillListStyles.d.ts +5 -0
  662. package/dist/types/components/QuillListStyles/index.d.ts +1 -0
  663. package/dist/types/components/RenameForm/RenameForm.d.ts +21 -0
  664. package/dist/types/components/RenameForm/index.d.ts +1 -0
  665. package/dist/types/components/StyledLink/StyledLink.d.ts +2 -0
  666. package/dist/types/components/StyledLink/index.d.ts +1 -0
  667. package/dist/types/components/index.d.ts +2 -4
  668. package/dist/types/containers/Actions/ActionsDropdown/ActionsDropdown.styled.d.ts +1 -1
  669. package/dist/types/containers/DetailsPanel/DetailsPanel.styled.d.ts +0 -7
  670. package/dist/types/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.styled.d.ts +4 -4
  671. package/dist/types/containers/DetailsPanel/FeedContextWrapper.d.ts +19 -0
  672. package/dist/types/containers/Feed/components/ActivityVersions/ActivityVersions.styled.d.ts +1 -0
  673. package/dist/types/containers/Feed/components/CommentInput/modules/index.d.ts +2 -1
  674. package/dist/types/containers/ProjectTreeTable/buildTreeTableColumns.d.ts +1 -1
  675. package/dist/types/containers/ProjectTreeTable/context/ProjectDataContext.d.ts +2 -0
  676. package/dist/types/containers/ProjectTreeTable/context/clipboard/clipboardValidation.d.ts +10 -0
  677. package/dist/types/containers/ProjectTreeTable/hooks/useAttributesList.d.ts +5 -4
  678. package/dist/types/containers/ProjectTreeTable/hooks/useCellContextMenu.d.ts +1 -1
  679. package/dist/types/containers/ProjectTreeTable/types/table.d.ts +6 -0
  680. package/dist/types/containers/ProjectTreeTable/widgets/BooleanWidget.d.ts +0 -1
  681. package/dist/types/containers/ProjectTreeTable/widgets/CellWidget.d.ts +2 -1
  682. package/dist/types/containers/ProjectTreeTable/widgets/LinksWidget.d.ts +1 -0
  683. package/dist/types/containers/ProjectTreeTable/widgets/NameWidget.d.ts +10 -0
  684. package/dist/types/containers/ProjectTreeTable/widgets/TextWidget.d.ts +2 -0
  685. package/dist/types/containers/ProjectTreeTable/widgets/TextWidgetInput.d.ts +2 -0
  686. package/dist/types/containers/SimpleTable/SimpleTable.d.ts +0 -3
  687. package/dist/types/containers/SimpleTable/SimpleTableRowTemplate.d.ts +1 -5
  688. package/dist/types/containers/Views/index.d.ts +1 -4
  689. package/dist/types/context/DetailsPanelContext.d.ts +1 -1
  690. package/dist/types/context/PowerpackContext.d.ts +1 -1
  691. package/dist/types/hooks/index.d.ts +1 -0
  692. package/dist/types/hooks/useActionTriggers.d.ts +1 -1
  693. package/dist/types/hooks/useTagStyling.d.ts +17 -0
  694. package/dist/types/util/checkName.d.ts +1 -0
  695. package/dist/types/util/clipboardUtils.d.ts +18 -0
  696. package/dist/types/util/copyToClipboard.d.ts +1 -1
  697. package/dist/types/util/humanizeFieldName.d.ts +1 -0
  698. package/dist/types/util/index.d.ts +3 -0
  699. package/dist/types/util/parseHtmlToPlainTextWithLinks.d.ts +6 -0
  700. package/dist/util.cjs.js +1 -1
  701. package/dist/util.es.js +38 -32
  702. package/dist/util.es.js.map +1 -1
  703. package/package.json +1 -1
  704. package/dist/node_modules/vfile/lib/index.cjs.js +0 -2
  705. package/dist/node_modules/vfile/lib/index.cjs.js.map +0 -1
  706. package/dist/node_modules/vfile/lib/index.es.js.map +0 -1
  707. package/dist/node_modules/vfile/lib/minpath.browser.cjs.js.map +0 -1
  708. package/dist/node_modules/vfile/lib/minpath.browser.es.js.map +0 -1
  709. package/dist/node_modules/vfile/lib/minproc.browser.cjs.js.map +0 -1
  710. package/dist/node_modules/vfile/lib/minproc.browser.es.js.map +0 -1
  711. package/dist/node_modules/vfile/lib/minurl.browser.cjs.js.map +0 -1
  712. package/dist/node_modules/vfile/lib/minurl.browser.es.js.map +0 -1
  713. package/dist/node_modules/vfile/lib/minurl.shared.cjs.js.map +0 -1
  714. package/dist/node_modules/vfile/lib/minurl.shared.es.js.map +0 -1
  715. package/dist/node_modules/vfile/node_modules/unist-util-stringify-position/lib/index.es.js.map +0 -1
  716. package/dist/node_modules/vfile/node_modules/vfile-message/lib/index.es.js.map +0 -1
  717. package/dist/shared/src/components/AccessUser/AccessUser.cjs.js +0 -2
  718. package/dist/shared/src/components/AccessUser/AccessUser.cjs.js.map +0 -1
  719. package/dist/shared/src/components/AccessUser/AccessUser.es.js +0 -33
  720. package/dist/shared/src/components/AccessUser/AccessUser.es.js.map +0 -1
  721. package/dist/shared/src/components/AccessUser/AccessUser.styled.cjs.js +0 -42
  722. package/dist/shared/src/components/AccessUser/AccessUser.styled.cjs.js.map +0 -1
  723. package/dist/shared/src/components/AccessUser/AccessUser.styled.es.js +0 -46
  724. package/dist/shared/src/components/AccessUser/AccessUser.styled.es.js.map +0 -1
  725. package/dist/shared/src/components/DetailsMetaData/DetailsMetaData.cjs.js +0 -34
  726. package/dist/shared/src/components/DetailsMetaData/DetailsMetaData.cjs.js.map +0 -1
  727. package/dist/shared/src/components/DetailsMetaData/DetailsMetaData.es.js +0 -46
  728. package/dist/shared/src/components/DetailsMetaData/DetailsMetaData.es.js.map +0 -1
  729. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.cjs.js +0 -2
  730. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.cjs.js.map +0 -1
  731. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.es.js +0 -287
  732. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.es.js.map +0 -1
  733. package/dist/shared/src/components/LinksManager/LinksManagerDialog.cjs.js +0 -8
  734. package/dist/shared/src/components/LinksManager/LinksManagerDialog.cjs.js.map +0 -1
  735. package/dist/shared/src/components/LinksManager/LinksManagerDialog.es.js.map +0 -1
  736. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js +0 -2
  737. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js.map +0 -1
  738. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js.map +0 -1
  739. package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js +0 -2
  740. package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js.map +0 -1
  741. package/dist/shared/src/components/ListMetaData/ListMetaData.es.js +0 -25
  742. package/dist/shared/src/components/ListMetaData/ListMetaData.es.js.map +0 -1
  743. package/dist/shared/src/components/Powerpack/RequiredPowerpackVersion.cjs.js +0 -9
  744. package/dist/shared/src/components/Powerpack/RequiredPowerpackVersion.cjs.js.map +0 -1
  745. package/dist/shared/src/components/Powerpack/RequiredPowerpackVersion.es.js +0 -25
  746. package/dist/shared/src/components/Powerpack/RequiredPowerpackVersion.es.js.map +0 -1
  747. package/dist/shared/src/components/ShareOptionIcon/ShareOptionIcon.cjs.js +0 -2
  748. package/dist/shared/src/components/ShareOptionIcon/ShareOptionIcon.cjs.js.map +0 -1
  749. package/dist/shared/src/components/ShareOptionIcon/ShareOptionIcon.es.js +0 -17
  750. package/dist/shared/src/components/ShareOptionIcon/ShareOptionIcon.es.js.map +0 -1
  751. package/dist/shared/src/hooks/useCustomProtocolCheck.cjs.js +0 -2
  752. package/dist/shared/src/hooks/useCustomProtocolCheck.cjs.js.map +0 -1
  753. package/dist/shared/src/hooks/useCustomProtocolCheck.es.js +0 -43
  754. package/dist/shared/src/hooks/useCustomProtocolCheck.es.js.map +0 -1
  755. package/dist/types/components/AccessUser/AccessUser.d.ts +0 -22
  756. package/dist/types/components/AccessUser/AccessUser.styled.d.ts +0 -1
  757. package/dist/types/components/AccessUser/index.d.ts +0 -1
  758. package/dist/types/components/DetailsMetaData/DetailsMetaData.d.ts +0 -8
  759. package/dist/types/components/DetailsMetaData/index.d.ts +0 -1
  760. package/dist/types/components/DetailsPanelAttributes/DetailsPanelAttributes.d.ts +0 -6
  761. package/dist/types/components/LinksManager/LinksManagerDialog.d.ts +0 -9
  762. package/dist/types/components/ListAttributeForm/ListAttributeForm.d.ts +0 -13
  763. package/dist/types/components/ListAttributeForm/index.d.ts +0 -1
  764. package/dist/types/components/ListMetaData/ListMetaData.d.ts +0 -8
  765. package/dist/types/components/ListMetaData/index.d.ts +0 -1
  766. package/dist/types/components/Powerpack/RequiredPowerpackVersion.d.ts +0 -5
  767. package/dist/types/components/ShareOptionIcon/ShareOptionIcon.d.ts +0 -10
  768. package/dist/types/components/ShareOptionIcon/index.d.ts +0 -2
  769. package/dist/types/hooks/useCustomProtocolCheck.d.ts +0 -10
  770. /package/dist/node_modules/{vfile → rehype}/node_modules/unist-util-stringify-position/lib/index.cjs.js +0 -0
  771. /package/dist/node_modules/{vfile → rehype}/node_modules/unist-util-stringify-position/lib/index.es.js +0 -0
  772. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minpath.browser.cjs.js +0 -0
  773. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minpath.browser.es.js +0 -0
  774. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minproc.browser.cjs.js +0 -0
  775. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minproc.browser.es.js +0 -0
  776. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minurl.browser.cjs.js +0 -0
  777. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minurl.browser.es.js +0 -0
  778. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minurl.shared.cjs.js +0 -0
  779. /package/dist/node_modules/{vfile → rehype/node_modules/vfile}/lib/minurl.shared.es.js +0 -0
  780. /package/dist/node_modules/{vfile → rehype}/node_modules/vfile-message/lib/index.cjs.js +0 -0
  781. /package/dist/node_modules/{vfile → rehype}/node_modules/vfile-message/lib/index.es.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"getEntityLinks.es.js","sources":["../../../../../../src/api/queries/links/getEntityLinks.ts"],"sourcesContent":["import { FetchBaseQueryError } from '@reduxjs/toolkit/query'\nimport {\n GetFoldersLinksQuery,\n GetTasksLinksQuery,\n GetProductsLinksQuery,\n GetVersionsLinksQuery,\n GetRepresentationsLinksQuery,\n GetWorkfilesLinksQuery,\n gqlLinksApi,\n foldersApi,\n} from '@shared/api/generated'\nimport { formatEntityLabel } from './utils/formatEntityLinks'\n\n/**\n * Custom queryFn for fetching entity links with optimized caching behavior.\n *\n * Key features:\n * 1. Single cache per project and entity type - different entityIds combinations don't create new caches\n * 2. Skips fetching entities that are already cached\n * 3. Force refetch when entityIds change\n * 4. Merges new entities into cache without duplicates\n * 5. Supports all entity types: folders, tasks, products, versions, representations, workfiles\n */\n\n// Define the arguments for the query\nexport type GetEntityLinksArgs = {\n projectName: string\n entityIds: string[]\n entityType: 'folder' | 'task' | 'product' | 'version' | 'representation' | 'workfile'\n}\n\n// Define link types for each entity\nexport type FolderLink =\n GetFoldersLinksQuery['project']['folders']['edges'][0]['node']['links']['edges'][0]\nexport type TaskLink =\n GetTasksLinksQuery['project']['tasks']['edges'][0]['node']['links']['edges'][0]\nexport type ProductLink =\n GetProductsLinksQuery['project']['products']['edges'][0]['node']['links']['edges'][0]\nexport type VersionLink =\n GetVersionsLinksQuery['project']['versions']['edges'][0]['node']['links']['edges'][0]\nexport type RepresentationLink =\n GetRepresentationsLinksQuery['project']['representations']['edges'][0]['node']['links']['edges'][0]\nexport type WorkfileLink =\n GetWorkfilesLinksQuery['project']['workfiles']['edges'][0]['node']['links']['edges'][0]\n\nexport type EntityLinkQuery =\n | FolderLink\n | TaskLink\n | ProductLink\n | VersionLink\n | RepresentationLink\n | WorkfileLink\nexport type EntityLink = Pick<EntityLinkQuery, 'direction' | 'entityType' | 'id' | 'linkType'> & {\n node: Pick<EntityLinkQuery['node'], 'name' | 'id'> & {\n label?: string | null\n parents: string[]\n subType: string | undefined\n }\n}\n\n// Define the result type for the query - simplified without edges wrapper\nexport type EntityWithLinks = {\n id: string\n links: EntityLink[]\n}\n\nexport type GetEntityLinksResult = EntityWithLinks[]\n\n// Map entity types to their corresponding GraphQL endpoints\nconst entityEndpoints = {\n folder: 'GetFoldersLinks',\n task: 'GetTasksLinks',\n product: 'GetProductsLinks',\n version: 'GetVersionsLinks',\n representation: 'GetRepresentationsLinks',\n workfile: 'GetWorkfilesLinks',\n} as const\n\n// Map entity types to their result path in the GraphQL response\nconst entityResultPaths = {\n folder: 'folders',\n task: 'tasks',\n product: 'products',\n version: 'versions',\n representation: 'representations',\n workfile: 'workfiles',\n} as const\n\nconst injectedQueries = foldersApi.injectEndpoints({\n endpoints: (build) => ({\n getEntityLinks: build.query<GetEntityLinksResult, GetEntityLinksArgs>({\n queryFn: async (\n { projectName, entityIds, entityType },\n { getState, dispatch, queryCacheKey, forced },\n ) => {\n try {\n // Get current state to access cached data\n const state = getState() as any\n const cacheKey = JSON.stringify({ projectName, entityType })\n\n // Access the cache entry for this project and entity type\n const cacheEntry =\n state.restApi?.queries?.[queryCacheKey || `getEntityLinks(${cacheKey})`]\n const cachedData = cacheEntry?.data || []\n\n // 1. When fetching new data for entityIds, we should skip entities that are already in the cache.\n const cachedEntityIds = new Set(cachedData.map((entity: EntityWithLinks) => entity.id))\n const entityIdsToFetch = entityIds.filter((id) => !cachedEntityIds?.has(id) || forced)\n\n // If all entities are already cached, return the cached data\n if (entityIdsToFetch.length === 0) {\n return { data: cachedData }\n }\n\n // Get the appropriate endpoint and parameter names\n const endpoint = entityEndpoints[entityType]\n const resultPath = entityResultPaths[entityType]\n\n // Fetch only the entities that aren't already cached\n const result = await dispatch(\n (gqlLinksApi.endpoints as any)[endpoint].initiate(\n { projectName, entityIds: entityIdsToFetch },\n { forceRefetch: true },\n ),\n ).unwrap()\n\n const newEntities =\n result.project?.[resultPath]?.edges?.map(({ node }: { node: any }) => ({\n id: node.id,\n links:\n node.links.edges?.map((linkEdge: EntityLinkQuery) => ({\n ...linkEdge,\n node: {\n id: linkEdge.node.id,\n name: linkEdge.node.name,\n label: formatEntityLabel(linkEdge.node),\n parents: linkEdge.node.parents || [],\n subType: 'subType' in linkEdge.node ? linkEdge.node.subType : undefined,\n },\n })) || [], // Flatten the edges structure\n })) || []\n\n // Return the new entities - the merge function will handle combining with existing cache\n return { data: newEntities }\n } catch (error: any) {\n console.error(`Error in getEntityLinks queryFn for ${entityType}:`, error)\n return { error: { status: 'FETCH_ERROR', error: error.message } as FetchBaseQueryError }\n }\n },\n // 2. We should not create new caches when the entityIds argument changes.\n serializeQueryArgs: ({ queryArgs }) => {\n // Use only projectName and entityType for the cache key, ignoring entityIds\n return { projectName: queryArgs.projectName, entityType: queryArgs.entityType }\n },\n // 3. We should force a refetch every time the entityIds changes.\n forceRefetch: ({ currentArg, previousArg }) => {\n // Force refetch if entityIds array is different\n if (!currentArg || !previousArg) return true\n\n // Compare arrays by converting to sets\n const currentIds = new Set(currentArg.entityIds)\n const previousIds = new Set(previousArg.entityIds)\n\n if (currentIds.size !== previousIds.size) return true\n\n // Check if any IDs are different\n for (const id of currentIds) {\n if (!previousIds.has(id)) return true\n }\n\n return false\n },\n // 4. We should merge new entities into the cache ensuring there are no duplicates.\n merge: (currentCache, newItems) => {\n if (!currentCache) return newItems\n\n const cacheMap = new Map(currentCache.map((item) => [item.id, item]))\n for (const newItem of newItems) {\n cacheMap.set(newItem.id, newItem) // Overwrite if exists, add if not\n }\n // Update currentCache in-place\n currentCache.length = 0\n currentCache.push(...cacheMap.values())\n },\n // Provide tags for potential invalidation\n providesTags: (result, error, arg) =>\n result\n ? [\n ...result.flatMap((entity) =>\n entity.links.map((link) => ({ type: 'link', id: link.node.id })),\n ),\n { type: 'link', id: `${arg.projectName}-${arg.entityType}` },\n ]\n : [{ type: 'link', id: `${arg.projectName}-${arg.entityType}` }],\n }),\n }),\n})\n\nexport const { useGetEntityLinksQuery } = injectedQueries\nexport { injectedQueries as entityLinksApi }\n"],"names":["entityEndpoints","entityResultPaths","injectedQueries","foldersApi","build","projectName","entityIds","entityType","getState","dispatch","queryCacheKey","forced","state","cacheKey","cacheEntry","_b","_a","cachedData","cachedEntityIds","entity","entityIdsToFetch","id","endpoint","resultPath","_e","_d","_c","gqlLinksApi","node","linkEdge","formatEntityLabel","error","queryArgs","currentArg","previousArg","currentIds","previousIds","currentCache","newItems","cacheMap","item","newItem","result","arg","link","useGetEntityLinksQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAW,IAAI,IAAIF,EAAa,IAAI,CAACG,MAAS,CAACA,EAAK,IAAIA,CAAI,CAAC,CAAC;AACpE,mBAAWC,KAAWH;AACX,UAAAC,EAAA,IAAIE,EAAQ,IAAIA,CAAO;AAGlC,QAAAJ,EAAa,SAAS,GACtBA,EAAa,KAAK,GAAGE,EAAS,OAAA,CAAQ;AAAA,MACxC;AAAA;AAAA,MAEA,cAAc,CAACG,GAAQX,GAAOY,MAC5BD,IACI;AAAA,QACE,GAAGA,EAAO;AAAA,UAAQ,CAACvB,MACjBA,EAAO,MAAM,IAAI,CAACyB,OAAU,EAAE,MAAM,QAAQ,IAAIA,EAAK,KAAK,KAAK;AAAA,QACjE;AAAA,QACA,EAAE,MAAM,QAAQ,IAAI,GAAGD,EAAI,WAAW,IAAIA,EAAI,UAAU,GAAG;AAAA,MAE7D,IAAA,CAAC,EAAE,MAAM,QAAQ,IAAI,GAAGA,EAAI,WAAW,IAAIA,EAAI,UAAU,GAAI,CAAA;AAAA,IACpE,CAAA;AAAA,EACH;AACF,CAAC,GAEY,EAAE,wBAAAE,OAA2B3C;"}
1
+ {"version":3,"file":"getEntityLinks.es.js","sources":["../../../../../../src/api/queries/links/getEntityLinks.ts"],"sourcesContent":["import { FetchBaseQueryError } from '@reduxjs/toolkit/query'\nimport {\n GetFoldersLinksQuery,\n GetTasksLinksQuery,\n GetProductsLinksQuery,\n GetVersionsLinksQuery,\n GetRepresentationsLinksQuery,\n GetWorkfilesLinksQuery,\n gqlLinksApi,\n foldersApi,\n} from '@shared/api/generated'\nimport { formatEntityLabel } from './utils/formatEntityLinks'\nimport { toast } from 'react-toastify'\n\n/**\n * Custom queryFn for fetching entity links with optimized caching behavior.\n *\n * Key features:\n * 1. Single cache per project and entity type - different entityIds combinations don't create new caches\n * 2. Skips fetching entities that are already cached\n * 3. Force refetch when entityIds change\n * 4. Merges new entities into cache without duplicates\n * 5. Supports all entity types: folders, tasks, products, versions, representations, workfiles\n */\n\n// Define the arguments for the query\nexport type GetEntityLinksArgs = {\n projectName: string\n entityIds: string[]\n entityType: 'folder' | 'task' | 'product' | 'version' | 'representation' | 'workfile'\n}\n\n// Define link types for each entity\nexport type FolderLink =\n GetFoldersLinksQuery['project']['folders']['edges'][0]['node']['links']['edges'][0]\nexport type TaskLink =\n GetTasksLinksQuery['project']['tasks']['edges'][0]['node']['links']['edges'][0]\nexport type ProductLink =\n GetProductsLinksQuery['project']['products']['edges'][0]['node']['links']['edges'][0]\nexport type VersionLink =\n GetVersionsLinksQuery['project']['versions']['edges'][0]['node']['links']['edges'][0]\nexport type RepresentationLink =\n GetRepresentationsLinksQuery['project']['representations']['edges'][0]['node']['links']['edges'][0]\nexport type WorkfileLink =\n GetWorkfilesLinksQuery['project']['workfiles']['edges'][0]['node']['links']['edges'][0]\n\nexport type EntityLinkQuery =\n | FolderLink\n | TaskLink\n | ProductLink\n | VersionLink\n | RepresentationLink\n | WorkfileLink\nexport type EntityLink = Pick<EntityLinkQuery, 'direction' | 'entityType' | 'id' | 'linkType'> & {\n node: Pick<EntityLinkQuery['node'], 'name' | 'id'> & {\n label?: string | null\n parents: string[]\n subType: string | undefined\n }\n}\n\n// Define the result type for the query - simplified without edges wrapper\nexport type EntityWithLinks = {\n id: string\n links: EntityLink[]\n}\n\nexport type GetEntityLinksResult = EntityWithLinks[]\n\n// Map entity types to their corresponding GraphQL endpoints\nconst entityEndpoints = {\n folder: 'GetFoldersLinks',\n task: 'GetTasksLinks',\n product: 'GetProductsLinks',\n version: 'GetVersionsLinks',\n representation: 'GetRepresentationsLinks',\n workfile: 'GetWorkfilesLinks',\n} as const\n\n// Map entity types to their result path in the GraphQL response\nconst entityResultPaths = {\n folder: 'folders',\n task: 'tasks',\n product: 'products',\n version: 'versions',\n representation: 'representations',\n workfile: 'workfiles',\n} as const\n\nconst injectedQueries = foldersApi.injectEndpoints({\n endpoints: (build) => ({\n getEntityLinks: build.query<GetEntityLinksResult, GetEntityLinksArgs>({\n queryFn: async (\n { projectName, entityIds, entityType },\n { getState, dispatch, queryCacheKey, forced },\n ) => {\n try {\n // Get current state to access cached data\n const state = getState() as any\n const cacheKey = JSON.stringify({ projectName, entityType })\n\n // Access the cache entry for this project and entity type\n const cacheEntry =\n state.restApi?.queries?.[queryCacheKey || `getEntityLinks(${cacheKey})`]\n const cachedData = cacheEntry?.data || []\n\n // 1. When fetching new data for entityIds, we should skip entities that are already in the cache.\n const cachedEntityIds = new Set(cachedData.map((entity: EntityWithLinks) => entity.id))\n const entityIdsToFetch = entityIds.filter((id) => !cachedEntityIds?.has(id) || forced)\n\n // If all entities are already cached, return the cached data\n if (entityIdsToFetch.length === 0) {\n return { data: cachedData }\n }\n\n // Get the appropriate endpoint and parameter names\n const endpoint = entityEndpoints[entityType]\n const resultPath = entityResultPaths[entityType]\n\n // Fetch only the entities that aren't already cached\n const result = await dispatch(\n (gqlLinksApi.endpoints as any)[endpoint].initiate(\n { projectName, entityIds: entityIdsToFetch },\n { forceRefetch: true },\n ),\n ).unwrap()\n\n const newEntities =\n result.project?.[resultPath]?.edges?.map(({ node }: { node: any }) => ({\n id: node.id,\n links:\n node.links.edges\n ?.filter((e: EntityLinkQuery | null) => !!e?.node)\n ?.map((linkEdge: EntityLinkQuery) => ({\n ...linkEdge,\n node: {\n id: linkEdge.node.id,\n name: linkEdge.node.name,\n label: formatEntityLabel(linkEdge.node),\n parents: linkEdge.node.parents || [],\n subType: 'subType' in linkEdge.node ? linkEdge.node.subType : undefined,\n },\n })) || [], // Flatten the edges structure\n })) || []\n\n // Return the new entities - the merge function will handle combining with existing cache\n return { data: newEntities }\n } catch (error: any) {\n console.error(`Error in getEntityLinks queryFn for ${entityType}:`, error)\n toast.error(`Error fetching ${entityType} links`)\n return { error: { status: 'FETCH_ERROR', error: error.message } as FetchBaseQueryError }\n }\n },\n // 2. We should not create new caches when the entityIds argument changes.\n serializeQueryArgs: ({ queryArgs }) => {\n // Use only projectName and entityType for the cache key, ignoring entityIds\n return { projectName: queryArgs.projectName, entityType: queryArgs.entityType }\n },\n // 3. We should force a refetch every time the entityIds changes.\n forceRefetch: ({ currentArg, previousArg }) => {\n // Force refetch if entityIds array is different\n if (!currentArg || !previousArg) return true\n\n // Compare arrays by converting to sets\n const currentIds = new Set(currentArg.entityIds)\n const previousIds = new Set(previousArg.entityIds)\n\n if (currentIds.size !== previousIds.size) return true\n\n // Check if any IDs are different\n for (const id of currentIds) {\n if (!previousIds.has(id)) return true\n }\n\n return false\n },\n // 4. We should merge new entities into the cache ensuring there are no duplicates.\n merge: (currentCache, newItems) => {\n if (!currentCache) return newItems\n\n const cacheMap = new Map(currentCache.map((item) => [item.id, item]))\n for (const newItem of newItems) {\n cacheMap.set(newItem.id, newItem) // Overwrite if exists, add if not\n }\n // Update currentCache in-place\n currentCache.length = 0\n currentCache.push(...cacheMap.values())\n },\n // Provide tags for potential invalidation\n providesTags: (result, error, arg) =>\n result\n ? [\n ...result.flatMap((entity) =>\n entity.links.map((link) => ({ type: 'link', id: link.node.id })),\n ),\n { type: 'link', id: `${arg.projectName}-${arg.entityType}` },\n ]\n : [{ type: 'link', id: `${arg.projectName}-${arg.entityType}` }],\n }),\n }),\n})\n\nexport const { useGetEntityLinksQuery } = injectedQueries\nexport { injectedQueries as entityLinksApi }\n"],"names":["entityEndpoints","entityResultPaths","injectedQueries","foldersApi","build","projectName","entityIds","entityType","getState","dispatch","queryCacheKey","forced","state","cacheKey","cacheEntry","_b","_a","cachedData","cachedEntityIds","entity","entityIdsToFetch","id","endpoint","resultPath","_e","_d","_c","gqlLinksApi","node","e","linkEdge","formatEntityLabel","error","toast","queryArgs","currentArg","previousArg","currentIds","previousIds","currentCache","newItems","cacheMap","item","newItem","result","arg","link","useGetEntityLinksQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,MAAMA,IAAkB;AAAA,EACtB,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,UA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W,IAAI,IAAIF,EAAa,IAAI,CAACG,MAAS,CAACA,EAAK,IAAIA,CAAI,CAAC,CAAC;AACpE,mBAAWC,KAAWH;AACX,UAAAC,EAAA,IAAIE,EAAQ,IAAIA,CAAO;AAGlC,QAAAJ,EAAa,SAAS,GACtBA,EAAa,KAAK,GAAGE,EAAS,OAAA,CAAQ;AAAA,MACxC;AAAA;AAAA,MAEA,cAAc,CAACG,GAAQZ,GAAOa,MAC5BD,IACI;AAAA,QACE,GAAGA,EAAO;AAAA,UAAQ,CAACzB,MACjBA,EAAO,MAAM,IAAI,CAAC2B,OAAU,EAAE,MAAM,QAAQ,IAAIA,EAAK,KAAK,KAAK;AAAA,QACjE;AAAA,QACA,EAAE,MAAM,QAAQ,IAAI,GAAGD,EAAI,WAAW,IAAIA,EAAI,UAAU,GAAG;AAAA,MAE7D,IAAA,CAAC,EAAE,MAAM,QAAQ,IAAI,GAAGA,EAAI,WAAW,IAAIA,EAAI,UAAU,GAAI,CAAA;AAAA,IACpE,CAAA;AAAA,EACH;AACF,CAAC,GAEY,EAAE,wBAAAE,OAA2B7C;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../base/client.cjs.js");require("../../generated/graphql.cjs.js");const f=require("../../generated/graphqlLinks.cjs.js");require("../../generated/access.cjs.js");require("../../generated/actions.cjs.js");require("../../generated/activityFeed.cjs.js");require("../../generated/addons.cjs.js");require("../../generated/anatomy.cjs.js");require("../../generated/attributes.cjs.js");require("../../generated/authentication.cjs.js");require("../../generated/bundles.cjs.js");require("../../generated/configuration.cjs.js");require("../../generated/desktop.cjs.js");require("../../generated/entityLists.cjs.js");require("../../generated/events.cjs.js");require("../../generated/files.cjs.js");require("../../generated/folders.cjs.js");require("../../generated/inbox.cjs.js");const A=require("../../generated/links.cjs.js");require("../../generated/market.cjs.js");require("../../generated/onboarding.cjs.js");require("../../generated/operations.cjs.js");require("../../generated/products.cjs.js");require("../../generated/projectDashboard.cjs.js");require("../../generated/projects.cjs.js");require("../../generated/reviewables.cjs.js");require("../../generated/services.cjs.js");require("../../generated/system.cjs.js");require("../../generated/tasks.cjs.js");require("../../generated/teams.cjs.js");require("../../generated/thumbnails.cjs.js");require("../../generated/uRIs.cjs.js");require("../../generated/users.cjs.js");require("../../generated/versions.cjs.js");require("../../generated/workfiles.cjs.js");require("../../generated/ynputCloud.cjs.js");require("../../generated/grouping.cjs.js");require("../../generated/views.cjs.js");const G=require("@reduxjs/toolkit"),v=require("./getEntityLinks.cjs.js"),$=async(s,t,e,i)=>{switch(s){case"task":{const n=await i(f.api.endpoints.GetTaskLinkData.initiate({projectName:e,taskId:t})).unwrap();return n==null?void 0:n.project.task}case"folder":{const n=await i(f.api.endpoints.GetFolderLinkData.initiate({projectName:e,folderId:t})).unwrap();return n==null?void 0:n.project.folder}case"product":{const n=await i(f.api.endpoints.GetProductLinkData.initiate({projectName:e,productId:t})).unwrap();return n==null?void 0:n.project.product}case"version":{const n=await i(f.api.endpoints.GetVersionLinkData.initiate({projectName:e,versionId:t})).unwrap();return n==null?void 0:n.project.version}case"representation":{const n=await i(f.api.endpoints.GetRepresentationLinkData.initiate({projectName:e,representationId:t})).unwrap();return n==null?void 0:n.project.representation}case"workfile":{const n=await i(f.api.endpoints.GetWorkfileLinkData.initiate({projectName:e,workfileId:t})).unwrap();return n==null?void 0:n.project.workfile}default:throw new Error(`Unknown entity type: ${s}`)}},S=({projectName:s,sourceEntity:t,targetEntity:e,linkId:i,linkType:n,direction:p,isDelete:c=!1},{state:d,dispatch:q},k=[])=>{const u=(a,r,b)=>{const E=[{type:"link",id:`${s}-${a.entityType}`}],D=v.entityLinksApi.util.selectInvalidatedBy(d,E);for(const g of D)if(g.endpointName==="getEntityLinks"){console.log(`Patching ${a.entityType} links cache`,g);const L=q(v.entityLinksApi.util.updateQueryData("getEntityLinks",g.originalArgs,T=>{console.log(`Patching ${a.entityType} links cache`);const l=T.find(o=>o.id===a.entityId);if(!l){console.warn(`${a.entityType} ${a.entityId} not found in cache`);return}if(c)l.links=l.links.filter(o=>o.id!==i);else{console.log(`Adding new link to ${a.entityType}`);const o={id:i,direction:b,linkType:n,entityType:r.entityType,node:{id:r.entityId,name:r.name,label:r.label,parents:r.parents,subType:r.subType}},y=l.links.findIndex(I=>I.id===i);y!==-1?l.links[y]=o:(console.log(`Adding new link to ${a.entityType} links cache`,o,G.current(l)),l.links.push(o))}}));k.push(L)}};u(t,e,p),u(e,t,p==="in"?"out":"in")},M=A.api.enhanceEndpoints({endpoints:{deleteEntityLink:{transformErrorResponse:s=>{var t;return((t=s.data)==null?void 0:t.detail)||""},async onQueryStarted({linkId:s,projectName:t,patch:e},{dispatch:i,getState:n,queryFulfilled:p}){const c=n();let d=[];const q=e==null?void 0:e.source,k=e==null?void 0:e.target,u=(e==null?void 0:e.linkType)||"",w=(e==null?void 0:e.direction)||"out";if(q&&k)try{S({projectName:t,sourceEntity:q,targetEntity:k,linkId:s,linkType:u,direction:w,isDelete:!0},{state:c,dispatch:i},d),await p}catch(a){console.error("Error patching entities during link deletion:",a);for(const r of d)r.undo()}else console.warn("Source or target entity not provided for link deletion")}},createEntityLink:{transformErrorResponse:s=>{var t;return((t=s.data)==null?void 0:t.detail)||""},async onQueryStarted({projectName:s,createLinkRequestModel:t,patch:e},{dispatch:i,getState:n,queryFulfilled:p}){const{linkType:c,id:d}=t,q=n();let k=[];const u=e==null?void 0:e.source,w=u==null?void 0:u.entityType,a=u==null?void 0:u.entityId,r=e==null?void 0:e.target,b=r==null?void 0:r.entityType,E=r==null?void 0:r.entityId,D=(e==null?void 0:e.direction)||"out",g=c==null?void 0:c.split("|")[0];try{if(u.entityType&&r){const L=$(w,a,s,i),T=$(b,E,s,i),l=await Promise.all([L,T]),o=l[0],y=l[1];if(!o||!y)throw new Error("Source or target entity data not found");if(!d)throw new Error("Link ID not found in cache entry");const I={entityType:w,entityId:a,name:o.name,label:"label"in o?o.label:void 0,parents:o.parents||[],subType:"subType"in o?o.subType:void 0},m={entityType:b,entityId:E,name:y.name,label:"label"in y?y.label:void 0,parents:y.parents||[],subType:"subType"in y?y.subType:void 0};S({projectName:s,sourceEntity:I,targetEntity:m,linkId:d,linkType:g,direction:D,isDelete:!1},{state:q,dispatch:i},k),await p}else throw console.warn("Source entity type not provided, falling back to task query"),new Error("Source entity type not provided")}catch(L){console.error(L);for(const T of k)T.undo()}}}}}),{useDeleteEntityLinkMutation:C,useCreateEntityLinkMutation:x}=M;exports.useCreateEntityLinkMutation=x;exports.useDeleteEntityLinkMutation=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../base/client.cjs.js");require("../../generated/graphql.cjs.js");const g=require("../../generated/graphqlLinks.cjs.js");require("../../generated/access.cjs.js");require("../../generated/actions.cjs.js");require("../../generated/activityFeed.cjs.js");require("../../generated/addons.cjs.js");require("../../generated/anatomy.cjs.js");require("../../generated/attributes.cjs.js");require("../../generated/authentication.cjs.js");require("../../generated/bundles.cjs.js");require("../../generated/configuration.cjs.js");require("../../generated/desktop.cjs.js");require("../../generated/entityLists.cjs.js");require("../../generated/events.cjs.js");require("../../generated/files.cjs.js");require("../../generated/folders.cjs.js");require("../../generated/inbox.cjs.js");const C=require("../../generated/links.cjs.js");require("../../generated/market.cjs.js");require("../../generated/onboarding.cjs.js");require("../../generated/operations.cjs.js");require("../../generated/products.cjs.js");require("../../generated/projectDashboard.cjs.js");require("../../generated/projects.cjs.js");require("../../generated/reviewables.cjs.js");require("../../generated/services.cjs.js");require("../../generated/system.cjs.js");require("../../generated/tasks.cjs.js");require("../../generated/teams.cjs.js");require("../../generated/thumbnails.cjs.js");require("../../generated/uRIs.cjs.js");require("../../generated/users.cjs.js");require("../../generated/versions.cjs.js");require("../../generated/workfiles.cjs.js");require("../../generated/ynputCloud.cjs.js");require("../../generated/grouping.cjs.js");require("../../generated/views.cjs.js");const G=require("@reduxjs/toolkit"),L=require("./getEntityLinks.cjs.js"),A=async(s,i,e,t)=>{switch(s){case"task":{const n=await t(g.api.endpoints.GetTaskLinkData.initiate({projectName:e,taskId:i})).unwrap();return n==null?void 0:n.project.task}case"folder":{const n=await t(g.api.endpoints.GetFolderLinkData.initiate({projectName:e,folderId:i})).unwrap();return n==null?void 0:n.project.folder}case"product":{const n=await t(g.api.endpoints.GetProductLinkData.initiate({projectName:e,productId:i})).unwrap();return n==null?void 0:n.project.product}case"version":{const n=await t(g.api.endpoints.GetVersionLinkData.initiate({projectName:e,versionId:i})).unwrap();return n==null?void 0:n.project.version}case"representation":{const n=await t(g.api.endpoints.GetRepresentationLinkData.initiate({projectName:e,representationId:i})).unwrap();return n==null?void 0:n.project.representation}case"workfile":{const n=await t(g.api.endpoints.GetWorkfileLinkData.initiate({projectName:e,workfileId:i})).unwrap();return n==null?void 0:n.project.workfile}default:throw new Error(`Unknown entity type: ${s}`)}},S=({projectName:s,sourceEntity:i,targetEntity:e,linkId:t,linkType:n,direction:f,isDelete:p=!1},{state:k,dispatch:y},d=[])=>{const l=(r,o,T)=>{const v=L.entityLinksApi.util.selectCachedArgsForQuery(k,"getEntityLinks").filter(c=>c.projectName===s&&c.entityType===r.entityType);let b=!1;for(const c of v)try{const q=y(L.entityLinksApi.util.updateQueryData("getEntityLinks",c,$=>{const a=$.find(u=>u.id===r.entityId);if(a)if(b=!0,console.log(`Found and patching ${r.entityType} ${r.entityId} in cache`),p)a.links=a.links.filter(u=>u.id!==t);else{console.log(`Adding new link to ${r.entityType}`);const u={id:t,direction:T,linkType:n,entityType:o.entityType,node:{id:o.entityId,name:o.name,label:o.label,parents:o.parents,subType:o.subType}},E=a.links.findIndex(D=>D.id===t);E!==-1?a.links[E]=u:(console.log(`Adding new link to ${r.entityType} links cache`,u,G.current(a)),a.links.push(u))}}));d.push(q)}catch(q){console.error(`Error patching cache for ${r.entityType}:`,q)}b||(r.entityId===i.entityId?(console.warn(`Source ${r.entityType} ${r.entityId} not in cache - invalidating to refresh UI`),y(L.entityLinksApi.util.invalidateTags([{type:"link",id:`${s}-${r.entityType}`}]))):console.log(`Target ${r.entityType} ${r.entityId} not in cache - skipping patch (entity not currently visible)`))};l(i,e,f),l(e,i,f==="in"?"out":"in")},M=C.api.enhanceEndpoints({endpoints:{deleteEntityLink:{transformErrorResponse:s=>{var i;return((i=s.data)==null?void 0:i.detail)||""},async onQueryStarted({linkId:s,projectName:i,patch:e},{dispatch:t,getState:n,queryFulfilled:f}){const p=n();let k=[];const y=e==null?void 0:e.source,d=e==null?void 0:e.target,l=(e==null?void 0:e.linkType)||"",w=(e==null?void 0:e.direction)||"out";if(y&&d)try{S({projectName:i,sourceEntity:y,targetEntity:d,linkId:s,linkType:l,direction:w,isDelete:!0},{state:p,dispatch:t},k),await f}catch(r){console.error("Error patching entities during link deletion:",r);for(const o of k)o.undo();t(L.entityLinksApi.util.invalidateTags([{type:"link",id:`${i}-${y.entityType}`},{type:"link",id:`${i}-${d.entityType}`}]))}else console.warn("Source or target entity not provided for link deletion")}},createEntityLink:{transformErrorResponse:s=>{var i;return((i=s.data)==null?void 0:i.detail)||""},async onQueryStarted({projectName:s,createLinkRequestModel:i,patch:e},{dispatch:t,getState:n,queryFulfilled:f}){const{linkType:p,id:k}=i,y=n();let d=[];const l=e==null?void 0:e.source,w=l==null?void 0:l.entityType,r=l==null?void 0:l.entityId,o=e==null?void 0:e.target,T=o==null?void 0:o.entityType,I=o==null?void 0:o.entityId,v=(e==null?void 0:e.direction)||"out",b=p==null?void 0:p.split("|")[0];try{if(l.entityType&&o){const c=A(w,r,s,t),q=A(T,I,s,t),$=await Promise.all([c,q]),a=$[0],u=$[1];if(!a||!u)throw new Error("Source or target entity data not found");if(!k)throw new Error("Link ID not found in cache entry");const E={entityType:w,entityId:r,name:a.name,label:"label"in a?a.label:void 0,parents:a.parents||[],subType:"subType"in a?a.subType:void 0},D={entityType:T,entityId:I,name:u.name,label:"label"in u?u.label:void 0,parents:u.parents||[],subType:"subType"in u?u.subType:void 0};S({projectName:s,sourceEntity:E,targetEntity:D,linkId:k,linkType:b,direction:v,isDelete:!1},{state:y,dispatch:t},d),await f}else throw console.warn("Source entity type not provided, falling back to task query"),new Error("Source entity type not provided")}catch(c){console.error(c);for(const q of d)q.undo();l&&o&&t(L.entityLinksApi.util.invalidateTags([{type:"link",id:`${s}-${l.entityType}`},{type:"link",id:`${s}-${o.entityType}`}]))}}}}}),{useDeleteEntityLinkMutation:Q,useCreateEntityLinkMutation:x}=M;exports.useCreateEntityLinkMutation=x;exports.useDeleteEntityLinkMutation=Q;
2
2
  //# sourceMappingURL=updateLinks.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateLinks.cjs.js","sources":["../../../../../../src/api/queries/links/updateLinks.ts"],"sourcesContent":["import { gqlLinksApi, linksApi } from '@shared/api/generated'\nimport { RootState } from '@reduxjs/toolkit/query'\nimport { current, ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'\nimport { EntityLink, EntityWithLinks, entityLinksApi } from './getEntityLinks'\n\ntype Entity = {\n entityType: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile'\n entityId: string\n name: string\n label?: string | null\n parents: string[]\n subType: string | undefined // Optional subtype for folders, products, versions\n}\n\n// Helper function to get entity data by type\nconst getEntityDataByType = async (\n entityType: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile',\n entityId: string,\n projectName: string,\n dispatch: ThunkDispatch<any, any, UnknownAction>,\n) => {\n switch (entityType) {\n case 'task': {\n const resTask = await dispatch(\n gqlLinksApi.endpoints.GetTaskLinkData.initiate({\n projectName,\n taskId: entityId,\n }),\n ).unwrap()\n return resTask?.project.task\n }\n case 'folder': {\n const resFolder = await dispatch(\n gqlLinksApi.endpoints.GetFolderLinkData.initiate({\n projectName,\n folderId: entityId,\n }),\n ).unwrap()\n return resFolder?.project.folder\n }\n case 'product': {\n const resProduct = await dispatch(\n gqlLinksApi.endpoints.GetProductLinkData.initiate({\n projectName,\n productId: entityId,\n }),\n ).unwrap()\n return resProduct?.project.product\n }\n case 'version': {\n const resVersion = await dispatch(\n gqlLinksApi.endpoints.GetVersionLinkData.initiate({\n projectName,\n versionId: entityId,\n }),\n ).unwrap()\n return resVersion?.project.version\n }\n case 'representation': {\n const resRepresentation = await dispatch(\n gqlLinksApi.endpoints.GetRepresentationLinkData.initiate({\n projectName,\n representationId: entityId,\n }),\n ).unwrap()\n return resRepresentation?.project.representation\n }\n case 'workfile': {\n const resWorkfile = await dispatch(\n gqlLinksApi.endpoints.GetWorkfileLinkData.initiate({\n projectName,\n workfileId: entityId,\n }),\n ).unwrap()\n return resWorkfile?.project.workfile\n }\n default:\n throw new Error(`Unknown entity type: ${entityType}`)\n }\n}\n\n// Helper function to patch entity links cache for all entity types\nconst patchEntityLinksCache = (\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType,\n direction,\n isDelete = false,\n }: {\n projectName: string\n sourceEntity: Entity\n targetEntity: Entity\n linkId: string\n linkType: string\n direction: 'in' | 'out'\n isDelete?: boolean\n },\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches: any[] = [],\n) => {\n // Helper function to patch a single entity's links\n const patchEntityLinks = (\n entityToPatch: Entity,\n otherEntity: Entity,\n linkDirection: 'in' | 'out',\n ) => {\n // Get the entity links cache entries for this project and entity type\n const tags = [{ type: 'link', id: `${projectName}-${entityToPatch.entityType}` }]\n const entries = entityLinksApi.util.selectInvalidatedBy(state, tags)\n\n for (const entry of entries) {\n if (entry.endpointName === 'getEntityLinks') {\n console.log(`Patching ${entityToPatch.entityType} links cache`, entry)\n const patch = dispatch(\n entityLinksApi.util.updateQueryData(\n 'getEntityLinks',\n entry.originalArgs,\n (draft: EntityWithLinks[]) => {\n console.log(`Patching ${entityToPatch.entityType} links cache`)\n // Find the entity in the cache\n const entityInCache = draft.find((entity) => entity.id === entityToPatch.entityId)\n if (!entityInCache) {\n console.warn(\n `${entityToPatch.entityType} ${entityToPatch.entityId} not found in cache`,\n )\n return\n }\n if (isDelete) {\n // Remove the link from the entity\n entityInCache.links = entityInCache.links.filter((link) => link.id !== linkId)\n } else {\n console.log(`Adding new link to ${entityToPatch.entityType}`)\n // Add the new link to the entity\n const newLink: EntityLink = {\n id: linkId,\n direction: linkDirection,\n linkType,\n entityType: otherEntity.entityType,\n node: {\n id: otherEntity.entityId,\n name: otherEntity.name,\n label: otherEntity.label,\n parents: otherEntity.parents,\n subType: otherEntity.subType,\n },\n }\n\n // Check if link already exists and update it, or add new one\n const existingLinkIndex = entityInCache.links.findIndex(\n (link) => link.id === linkId,\n )\n\n if (existingLinkIndex !== -1) {\n entityInCache.links[existingLinkIndex] = newLink\n } else {\n console.log(\n `Adding new link to ${entityToPatch.entityType} links cache`,\n newLink,\n current(entityInCache),\n )\n entityInCache.links.push(newLink)\n }\n }\n },\n ),\n )\n\n patches.push(patch)\n }\n }\n }\n\n // Patch the source entity with the link\n patchEntityLinks(sourceEntity, targetEntity, direction)\n\n // Patch the target entity with the link (flip direction)\n const targetDirection = direction === 'in' ? 'out' : 'in'\n patchEntityLinks(targetEntity, sourceEntity, targetDirection)\n}\n\nconst enhancedApi = linksApi.enhanceEndpoints({\n endpoints: {\n deleteEntityLink: {\n transformErrorResponse: (error: any) => error.data?.detail || '',\n async onQueryStarted(\n // @ts-ignore - patch is purely used for patching the entities\n { linkId, projectName, patch },\n { dispatch, getState, queryFulfilled },\n ) {\n const state = getState()\n let patches: any[] = []\n\n const sourceEntity = patch?.source\n const targetEntity = patch?.target\n const linkType = patch?.linkType || ''\n const direction = patch?.direction || 'out'\n\n if (sourceEntity && targetEntity) {\n try {\n // Update entity links cache for both entities\n patchEntityLinksCache(\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType,\n direction,\n isDelete: true,\n },\n { state, dispatch },\n patches,\n )\n\n // Wait for the mutation to finish\n await queryFulfilled\n } catch (error) {\n console.error('Error patching entities during link deletion:', error)\n // Undo patches if there's an error\n for (const patch of patches) {\n patch.undo()\n }\n }\n } else {\n console.warn('Source or target entity not provided for link deletion')\n }\n },\n },\n createEntityLink: {\n transformErrorResponse: (error: any) => error.data?.detail || '',\n async onQueryStarted(\n // @ts-ignore - patch is purely used for patching the entities\n { projectName, createLinkRequestModel, patch },\n { dispatch, getState, queryFulfilled },\n ) {\n const { linkType, id: linkId } = createLinkRequestModel\n const state = getState()\n\n let patches: any[] = []\n\n const sourceEntity = patch?.source\n const sourceEntityType = sourceEntity?.entityType\n const sourceEntityId = sourceEntity?.entityId\n const targetEntity = patch?.target\n const targetEntityType = targetEntity?.entityType\n const targetEntityId = targetEntity?.entityId\n const direction = patch?.direction || ('out' as 'in' | 'out')\n const linkTypeName = linkType?.split('|')[0] as string\n\n try {\n if (sourceEntity.entityType && targetEntity) {\n // Get the source entity data based on its type\n const sourcePromise = getEntityDataByType(\n sourceEntityType,\n sourceEntityId,\n projectName,\n dispatch,\n )\n\n const targetPromise = getEntityDataByType(\n targetEntityType,\n targetEntityId,\n projectName,\n dispatch,\n )\n\n // Wait for both cache data and source entity data to be loaded\n const res = await Promise.all([sourcePromise, targetPromise])\n const sourceEntityData = res[0]\n const targetEntityData = res[1]\n\n if (!sourceEntityData || !targetEntityData) {\n throw new Error('Source or target entity data not found')\n }\n\n if (!linkId) {\n throw new Error('Link ID not found in cache entry')\n }\n\n const sourceEntity: Entity = {\n entityType: sourceEntityType,\n entityId: sourceEntityId,\n name: sourceEntityData.name,\n label: 'label' in sourceEntityData ? sourceEntityData.label : undefined,\n parents: sourceEntityData.parents || [],\n subType: 'subType' in sourceEntityData ? sourceEntityData.subType : undefined,\n }\n\n const targetEntity: Entity = {\n entityType: targetEntityType,\n entityId: targetEntityId,\n name: targetEntityData.name,\n label: 'label' in targetEntityData ? targetEntityData.label : undefined,\n parents: targetEntityData.parents || [],\n subType: 'subType' in targetEntityData ? targetEntityData.subType : undefined,\n }\n\n // Update entity links cache for both entities\n patchEntityLinksCache(\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType: linkTypeName,\n direction,\n isDelete: false,\n },\n { state, dispatch },\n patches,\n )\n\n // Wait for the mutation to finish (undo patches if it fails)\n await queryFulfilled\n } else {\n console.warn('Source entity type not provided, falling back to task query')\n throw new Error('Source entity type not provided')\n }\n } catch (error) {\n console.error(error)\n\n // Undo patches if the mutation fails\n for (const patch of patches) {\n patch.undo()\n }\n }\n },\n },\n },\n})\n\nexport const { useDeleteEntityLinkMutation, useCreateEntityLinkMutation } = enhancedApi\n"],"names":["getEntityDataByType","entityType","entityId","projectName","dispatch","resTask","gqlLinksApi","resFolder","resProduct","resVersion","resRepresentation","resWorkfile","patchEntityLinksCache","sourceEntity","targetEntity","linkId","linkType","direction","isDelete","state","patches","patchEntityLinks","entityToPatch","otherEntity","linkDirection","tags","entries","entityLinksApi","entry","patch","draft","entityInCache","entity","link","newLink","existingLinkIndex","current","enhancedApi","linksApi","error","_a","getState","queryFulfilled","createLinkRequestModel","sourceEntityType","sourceEntityId","targetEntityType","targetEntityId","linkTypeName","sourcePromise","targetPromise","res","sourceEntityData","targetEntityData","useDeleteEntityLinkMutation","useCreateEntityLinkMutation"],"mappings":"uwDAeMA,EAAsB,MAC1BC,EACAC,EACAC,EACAC,IACG,CACH,OAAQH,EAAY,CAClB,IAAK,OAAQ,CACX,MAAMI,EAAU,MAAMD,EACpBE,MAAY,UAAU,gBAAgB,SAAS,CAC7C,YAAAH,EACA,OAAQD,CACT,CAAA,GACD,OAAO,EACT,OAAOG,GAAA,YAAAA,EAAS,QAAQ,IAAA,CAE1B,IAAK,SAAU,CACb,MAAME,EAAY,MAAMH,EACtBE,MAAY,UAAU,kBAAkB,SAAS,CAC/C,YAAAH,EACA,SAAUD,CACX,CAAA,GACD,OAAO,EACT,OAAOK,GAAA,YAAAA,EAAW,QAAQ,MAAA,CAE5B,IAAK,UAAW,CACd,MAAMC,EAAa,MAAMJ,EACvBE,MAAY,UAAU,mBAAmB,SAAS,CAChD,YAAAH,EACA,UAAWD,CACZ,CAAA,GACD,OAAO,EACT,OAAOM,GA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AAM,QAAQ,IAAI,CAACF,EAAeC,CAAa,CAAC,EACtDE,EAAmBD,EAAI,CAAC,EACxBE,EAAmBF,EAAI,CAAC,EAE1B,GAAA,CAACC,GAAoB,CAACC,EAClB,MAAA,IAAI,MAAM,wCAAwC,EAG1D,GAAI,CAACtC,EACG,MAAA,IAAI,MAAM,kCAAkC,EAGpD,MAAMF,EAAuB,CAC3B,WAAY+B,EACZ,SAAUC,EACV,KAAMO,EAAiB,KACvB,MAAO,UAAWA,EAAmBA,EAAiB,MAAQ,OAC9D,QAASA,EAAiB,SAAW,CAAC,EACtC,QAAS,YAAaA,EAAmBA,EAAiB,QAAU,MACtE,EAEMtC,EAAuB,CAC3B,WAAYgC,EACZ,SAAUC,EACV,KAAMM,EAAiB,KACvB,MAAO,UAAWA,EAAmBA,EAAiB,MAAQ,OAC9D,QAASA,EAAiB,SAAW,CAAC,EACtC,QAAS,YAAaA,EAAmBA,EAAiB,QAAU,MACtE,EAGAzC,EACE,CACE,YAAAT,EACA,aAAAU,EACA,aAAAC,EACA,OAAAC,EACA,SAAUiC,EACV,UAAA/B,EACA,SAAU,EACZ,EACA,CAAE,MAAAE,EAAO,SAAAf,CAAS,EAClBgB,CACF,EAGM,MAAAsB,CAAA,KAEN,eAAQ,KAAK,6DAA6D,EACpE,IAAI,MAAM,iCAAiC,QAE5CH,EAAO,CACd,QAAQ,MAAMA,CAAK,EAGnB,UAAWV,KAAST,EAClBS,EAAM,KAAK,CACb,CACF,CACF,CACF,CAEJ,CAAC,EAEY,CAAE,4BAAAyB,EAA6B,4BAAAC,GAAgClB"}
1
+ {"version":3,"file":"updateLinks.cjs.js","sources":["../../../../../../src/api/queries/links/updateLinks.ts"],"sourcesContent":["import { gqlLinksApi, linksApi } from '@shared/api/generated'\nimport { RootState } from '@reduxjs/toolkit/query'\nimport { current, ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'\nimport { EntityLink, EntityWithLinks, entityLinksApi } from './getEntityLinks'\n\ntype Entity = {\n entityType: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile'\n entityId: string\n name: string\n label?: string | null\n parents: string[]\n subType: string | undefined // Optional subtype for folders, products, versions\n}\n\n// Helper function to get entity data by type\nconst getEntityDataByType = async (\n entityType: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile',\n entityId: string,\n projectName: string,\n dispatch: ThunkDispatch<any, any, UnknownAction>,\n) => {\n switch (entityType) {\n case 'task': {\n const resTask = await dispatch(\n gqlLinksApi.endpoints.GetTaskLinkData.initiate({\n projectName,\n taskId: entityId,\n }),\n ).unwrap()\n return resTask?.project.task\n }\n case 'folder': {\n const resFolder = await dispatch(\n gqlLinksApi.endpoints.GetFolderLinkData.initiate({\n projectName,\n folderId: entityId,\n }),\n ).unwrap()\n return resFolder?.project.folder\n }\n case 'product': {\n const resProduct = await dispatch(\n gqlLinksApi.endpoints.GetProductLinkData.initiate({\n projectName,\n productId: entityId,\n }),\n ).unwrap()\n return resProduct?.project.product\n }\n case 'version': {\n const resVersion = await dispatch(\n gqlLinksApi.endpoints.GetVersionLinkData.initiate({\n projectName,\n versionId: entityId,\n }),\n ).unwrap()\n return resVersion?.project.version\n }\n case 'representation': {\n const resRepresentation = await dispatch(\n gqlLinksApi.endpoints.GetRepresentationLinkData.initiate({\n projectName,\n representationId: entityId,\n }),\n ).unwrap()\n return resRepresentation?.project.representation\n }\n case 'workfile': {\n const resWorkfile = await dispatch(\n gqlLinksApi.endpoints.GetWorkfileLinkData.initiate({\n projectName,\n workfileId: entityId,\n }),\n ).unwrap()\n return resWorkfile?.project.workfile\n }\n default:\n throw new Error(`Unknown entity type: ${entityType}`)\n }\n}\n\n// Helper function to patch entity links cache for all entity types\nconst patchEntityLinksCache = (\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType,\n direction,\n isDelete = false,\n }: {\n projectName: string\n sourceEntity: Entity\n targetEntity: Entity\n linkId: string\n linkType: string\n direction: 'in' | 'out'\n isDelete?: boolean\n },\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches: any[] = [],\n) => {\n // Helper function to patch a single entity's links\n const patchEntityLinks = (\n entityToPatch: Entity,\n otherEntity: Entity,\n linkDirection: 'in' | 'out',\n ) => {\n // Get all cached query arguments for the getEntityLinks endpoint\n const cachedArgs = entityLinksApi.util.selectCachedArgsForQuery(state, 'getEntityLinks')\n\n // Filter for queries that match our project and entity type\n const relevantArgs = cachedArgs.filter(\n (args) => args.projectName === projectName && args.entityType === entityToPatch.entityType,\n )\n\n let entityFoundInAnyCache = false\n\n for (const args of relevantArgs) {\n try {\n const patch = dispatch(\n entityLinksApi.util.updateQueryData(\n 'getEntityLinks',\n args,\n (draft: EntityWithLinks[]) => {\n // Find the entity in the cache\n const entityInCache = draft.find((entity) => entity.id === entityToPatch.entityId)\n if (!entityInCache) {\n // Entity not in this specific cache, continue to next one\n return\n }\n\n entityFoundInAnyCache = true\n console.log(\n `Found and patching ${entityToPatch.entityType} ${entityToPatch.entityId} in cache`,\n )\n\n if (isDelete) {\n // Remove the link from the entity\n entityInCache.links = entityInCache.links.filter((link) => link.id !== linkId)\n } else {\n console.log(`Adding new link to ${entityToPatch.entityType}`)\n // Add the new link to the entity\n const newLink: EntityLink = {\n id: linkId,\n direction: linkDirection,\n linkType,\n entityType: otherEntity.entityType,\n node: {\n id: otherEntity.entityId,\n name: otherEntity.name,\n label: otherEntity.label,\n parents: otherEntity.parents,\n subType: otherEntity.subType,\n },\n }\n\n // Check if link already exists and update it, or add new one\n const existingLinkIndex = entityInCache.links.findIndex(\n (link) => link.id === linkId,\n )\n\n if (existingLinkIndex !== -1) {\n entityInCache.links[existingLinkIndex] = newLink\n } else {\n console.log(\n `Adding new link to ${entityToPatch.entityType} links cache`,\n newLink,\n current(entityInCache),\n )\n entityInCache.links.push(newLink)\n }\n }\n },\n ),\n )\n\n patches.push(patch)\n } catch (error) {\n console.error(`Error patching cache for ${entityToPatch.entityType}:`, error)\n }\n }\n\n // If entity was not found in any cache, handle based on context\n if (!entityFoundInAnyCache) {\n // For source entities (where user is creating the link from), we need to invalidate\n // to ensure the user sees the new link appear in the UI\n if (entityToPatch.entityId === sourceEntity.entityId) {\n console.warn(\n `Source ${entityToPatch.entityType} ${entityToPatch.entityId} not in cache - invalidating to refresh UI`,\n )\n dispatch(\n entityLinksApi.util.invalidateTags([\n { type: 'link', id: `${projectName}-${entityToPatch.entityType}` },\n ]),\n )\n } else {\n // For target entities, we can skip since they're not currently visible\n console.log(\n `Target ${entityToPatch.entityType} ${entityToPatch.entityId} not in cache - skipping patch (entity not currently visible)`,\n )\n // No action needed - when the entity is eventually loaded, it will have the correct links from the server\n }\n }\n }\n\n // Patch the source entity with the link\n patchEntityLinks(sourceEntity, targetEntity, direction)\n\n // Patch the target entity with the link (flip direction)\n const targetDirection = direction === 'in' ? 'out' : 'in'\n patchEntityLinks(targetEntity, sourceEntity, targetDirection)\n}\n\nconst enhancedApi = linksApi.enhanceEndpoints({\n endpoints: {\n deleteEntityLink: {\n transformErrorResponse: (error: any) => error.data?.detail || '',\n async onQueryStarted(\n // @ts-ignore - patch is purely used for patching the entities\n { linkId, projectName, patch },\n { dispatch, getState, queryFulfilled },\n ) {\n const state = getState()\n let patches: any[] = []\n\n const sourceEntity = patch?.source\n const targetEntity = patch?.target\n const linkType = patch?.linkType || ''\n const direction = patch?.direction || 'out'\n\n if (sourceEntity && targetEntity) {\n try {\n // Update entity links cache for both entities\n patchEntityLinksCache(\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType,\n direction,\n isDelete: true,\n },\n { state, dispatch },\n patches,\n )\n\n // Wait for the mutation to finish\n await queryFulfilled\n } catch (error) {\n console.error('Error patching entities during link deletion:', error)\n // Undo patches if there's an error\n for (const patch of patches) {\n patch.undo()\n }\n\n // Invalidate entity links queries as fallback\n dispatch(\n entityLinksApi.util.invalidateTags([\n { type: 'link', id: `${projectName}-${sourceEntity.entityType}` },\n { type: 'link', id: `${projectName}-${targetEntity.entityType}` },\n ]),\n )\n }\n } else {\n console.warn('Source or target entity not provided for link deletion')\n }\n },\n },\n createEntityLink: {\n transformErrorResponse: (error: any) => error.data?.detail || '',\n async onQueryStarted(\n // @ts-ignore - patch is purely used for patching the entities\n { projectName, createLinkRequestModel, patch },\n { dispatch, getState, queryFulfilled },\n ) {\n const { linkType, id: linkId } = createLinkRequestModel\n const state = getState()\n\n let patches: any[] = []\n\n const sourceEntity = patch?.source\n const sourceEntityType = sourceEntity?.entityType\n const sourceEntityId = sourceEntity?.entityId\n const targetEntity = patch?.target\n const targetEntityType = targetEntity?.entityType\n const targetEntityId = targetEntity?.entityId\n const direction = patch?.direction || ('out' as 'in' | 'out')\n const linkTypeName = linkType?.split('|')[0] as string\n\n try {\n if (sourceEntity.entityType && targetEntity) {\n // Get the source entity data based on its type\n const sourcePromise = getEntityDataByType(\n sourceEntityType,\n sourceEntityId,\n projectName,\n dispatch,\n )\n\n const targetPromise = getEntityDataByType(\n targetEntityType,\n targetEntityId,\n projectName,\n dispatch,\n )\n\n // Wait for both cache data and source entity data to be loaded\n const res = await Promise.all([sourcePromise, targetPromise])\n const sourceEntityData = res[0]\n const targetEntityData = res[1]\n\n if (!sourceEntityData || !targetEntityData) {\n throw new Error('Source or target entity data not found')\n }\n\n if (!linkId) {\n throw new Error('Link ID not found in cache entry')\n }\n\n const sourceEntity: Entity = {\n entityType: sourceEntityType,\n entityId: sourceEntityId,\n name: sourceEntityData.name,\n label: 'label' in sourceEntityData ? sourceEntityData.label : undefined,\n parents: sourceEntityData.parents || [],\n subType: 'subType' in sourceEntityData ? sourceEntityData.subType : undefined,\n }\n\n const targetEntity: Entity = {\n entityType: targetEntityType,\n entityId: targetEntityId,\n name: targetEntityData.name,\n label: 'label' in targetEntityData ? targetEntityData.label : undefined,\n parents: targetEntityData.parents || [],\n subType: 'subType' in targetEntityData ? targetEntityData.subType : undefined,\n }\n\n // Update entity links cache for both entities\n patchEntityLinksCache(\n {\n projectName,\n sourceEntity,\n targetEntity,\n linkId,\n linkType: linkTypeName,\n direction,\n isDelete: false,\n },\n { state, dispatch },\n patches,\n )\n\n // Wait for the mutation to finish (undo patches if it fails)\n await queryFulfilled\n } else {\n console.warn('Source entity type not provided, falling back to task query')\n throw new Error('Source entity type not provided')\n }\n } catch (error) {\n console.error(error)\n\n // Undo patches if the mutation fails\n for (const patch of patches) {\n patch.undo()\n }\n\n // Invalidate entity links queries as fallback\n if (sourceEntity && targetEntity) {\n dispatch(\n entityLinksApi.util.invalidateTags([\n { type: 'link', id: `${projectName}-${sourceEntity.entityType}` },\n { type: 'link', id: `${projectName}-${targetEntity.entityType}` },\n ]),\n )\n }\n }\n },\n },\n },\n})\n\nexport const { useDeleteEntityLinkMutation, useCreateEntityLinkMutation } = enhancedApi\n"],"names":["getEntityDataByType","entityType","entityId","projectName","dispatch","resTask","gqlLinksApi","resFolder","resProduct","resVersion","resRepresentation","resWorkfile","patchEntityLinksCache","sourceEntity","targetEntity","linkId","linkType","direction","isDelete","state","patches","patchEntityLinks","entityToPatch","otherEntity","linkDirection","relevantArgs","entityLinksApi","args","entityFoundInAnyCache","patch","draft","entityInCache","entity","link","newLink","existingLinkIndex","current","error","enhancedApi","linksApi","_a","getState","queryFulfilled","createLinkRequestModel","sourceEntityType","sourceEntityId","targetEntityType","targetEntityId","linkTypeName","sourcePromise","targetPromise","res","sourceEntityData","targetEntityData","useDeleteEntityLinkMutation","useCreateEntityLinkMutation"],"mappings":"uwDAeMA,EAAsB,MAC1BC,EACAC,EACAC,EACAC,IACG,CACH,OAAQH,EAAY,CAClB,IAAK,OAAQ,CACX,MAAMI,EAAU,MAAMD,EACpBE,MAAY,UAAU,gBAAgB,SAAS,CAC7C,YAAAH,EACA,OAAQD,CACT,CAAA,GACD,OAAO,EACT,OAAOG,GAAA,YAAAA,EAAS,QAAQ,IAAA,CAE1B,IAAK,SAAU,CACb,MAAME,EAAY,MAAMH,EACtBE,MAAY,UAAU,kBAAkB,SAAS,C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,EAAiB,QAAU,MACtE,EAGAzC,EACE,CACE,YAAAT,EACA,aAAAU,EACA,aAAAC,EACA,OAAAC,EACA,SAAUiC,EACV,UAAA/B,EACA,SAAU,EACZ,EACA,CAAE,MAAAE,EAAO,SAAAf,CAAS,EAClBgB,CACF,EAGM,MAAAsB,CAAA,KAEN,eAAQ,KAAK,6DAA6D,EACpE,IAAI,MAAM,iCAAiC,QAE5CL,EAAO,CACd,QAAQ,MAAMA,CAAK,EAGnB,UAAWR,KAAST,EAClBS,EAAM,KAAK,EAIThB,GAAgBC,GAClBV,EACEsB,EAAA,eAAe,KAAK,eAAe,CACjC,CAAE,KAAM,OAAQ,GAAI,GAAGvB,CAAW,IAAIU,EAAa,UAAU,EAAG,EAChE,CAAE,KAAM,OAAQ,GAAI,GAAGV,CAAW,IAAIW,EAAa,UAAU,EAAG,CACjE,CAAA,CACH,CACF,CACF,CACF,CACF,CAEJ,CAAC,EAEY,CAAE,4BAAAwC,EAA6B,4BAAAC,GAAgCjB"}
@@ -1,6 +1,6 @@
1
1
  import "../../base/client.es.js";
2
2
  import "../../generated/graphql.es.js";
3
- import { api as f } from "../../generated/graphqlLinks.es.js";
3
+ import { api as g } from "../../generated/graphqlLinks.es.js";
4
4
  import "../../generated/access.es.js";
5
5
  import "../../generated/actions.es.js";
6
6
  import "../../generated/activityFeed.es.js";
@@ -16,7 +16,7 @@ import "../../generated/events.es.js";
16
16
  import "../../generated/files.es.js";
17
17
  import "../../generated/folders.es.js";
18
18
  import "../../generated/inbox.es.js";
19
- import { api as S } from "../../generated/links.es.js";
19
+ import { api as G } from "../../generated/links.es.js";
20
20
  import "../../generated/market.es.js";
21
21
  import "../../generated/onboarding.es.js";
22
22
  import "../../generated/operations.es.js";
@@ -36,159 +36,174 @@ import "../../generated/workfiles.es.js";
36
36
  import "../../generated/ynputCloud.es.js";
37
37
  import "../../generated/grouping.es.js";
38
38
  import "../../generated/views.es.js";
39
- import { current as x } from "@reduxjs/toolkit";
40
- import { entityLinksApi as v } from "./getEntityLinks.es.js";
41
- const $ = async (s, e, t, i) => {
39
+ import { current as C } from "@reduxjs/toolkit";
40
+ import { entityLinksApi as T } from "./getEntityLinks.es.js";
41
+ const A = async (s, n, t, i) => {
42
42
  switch (s) {
43
43
  case "task": {
44
- const n = await i(
45
- f.endpoints.GetTaskLinkData.initiate({
44
+ const e = await i(
45
+ g.endpoints.GetTaskLinkData.initiate({
46
46
  projectName: t,
47
- taskId: e
47
+ taskId: n
48
48
  })
49
49
  ).unwrap();
50
- return n == null ? void 0 : n.project.task;
50
+ return e == null ? void 0 : e.project.task;
51
51
  }
52
52
  case "folder": {
53
- const n = await i(
54
- f.endpoints.GetFolderLinkData.initiate({
53
+ const e = await i(
54
+ g.endpoints.GetFolderLinkData.initiate({
55
55
  projectName: t,
56
- folderId: e
56
+ folderId: n
57
57
  })
58
58
  ).unwrap();
59
- return n == null ? void 0 : n.project.folder;
59
+ return e == null ? void 0 : e.project.folder;
60
60
  }
61
61
  case "product": {
62
- const n = await i(
63
- f.endpoints.GetProductLinkData.initiate({
62
+ const e = await i(
63
+ g.endpoints.GetProductLinkData.initiate({
64
64
  projectName: t,
65
- productId: e
65
+ productId: n
66
66
  })
67
67
  ).unwrap();
68
- return n == null ? void 0 : n.project.product;
68
+ return e == null ? void 0 : e.project.product;
69
69
  }
70
70
  case "version": {
71
- const n = await i(
72
- f.endpoints.GetVersionLinkData.initiate({
71
+ const e = await i(
72
+ g.endpoints.GetVersionLinkData.initiate({
73
73
  projectName: t,
74
- versionId: e
74
+ versionId: n
75
75
  })
76
76
  ).unwrap();
77
- return n == null ? void 0 : n.project.version;
77
+ return e == null ? void 0 : e.project.version;
78
78
  }
79
79
  case "representation": {
80
- const n = await i(
81
- f.endpoints.GetRepresentationLinkData.initiate({
80
+ const e = await i(
81
+ g.endpoints.GetRepresentationLinkData.initiate({
82
82
  projectName: t,
83
- representationId: e
83
+ representationId: n
84
84
  })
85
85
  ).unwrap();
86
- return n == null ? void 0 : n.project.representation;
86
+ return e == null ? void 0 : e.project.representation;
87
87
  }
88
88
  case "workfile": {
89
- const n = await i(
90
- f.endpoints.GetWorkfileLinkData.initiate({
89
+ const e = await i(
90
+ g.endpoints.GetWorkfileLinkData.initiate({
91
91
  projectName: t,
92
- workfileId: e
92
+ workfileId: n
93
93
  })
94
94
  ).unwrap();
95
- return n == null ? void 0 : n.project.workfile;
95
+ return e == null ? void 0 : e.project.workfile;
96
96
  }
97
97
  default:
98
98
  throw new Error(`Unknown entity type: ${s}`);
99
99
  }
100
- }, A = ({
100
+ }, S = ({
101
101
  projectName: s,
102
- sourceEntity: e,
102
+ sourceEntity: n,
103
103
  targetEntity: t,
104
104
  linkId: i,
105
- linkType: n,
106
- direction: m,
107
- isDelete: c = !1
105
+ linkType: e,
106
+ direction: f,
107
+ isDelete: u = !1
108
108
  }, {
109
- state: y,
110
- dispatch: k
111
- }, u = []) => {
112
- const p = (a, o, b) => {
113
- const D = [{ type: "link", id: `${s}-${a.entityType}` }], E = v.util.selectInvalidatedBy(y, D);
114
- for (const g of E)
115
- if (g.endpointName === "getEntityLinks") {
116
- console.log(`Patching ${a.entityType} links cache`, g);
117
- const T = k(
118
- v.util.updateQueryData(
109
+ state: k,
110
+ dispatch: y
111
+ }, d = []) => {
112
+ const p = (o, r, $) => {
113
+ const D = T.util.selectCachedArgsForQuery(k, "getEntityLinks").filter(
114
+ (c) => c.projectName === s && c.entityType === o.entityType
115
+ );
116
+ let I = !1;
117
+ for (const c of D)
118
+ try {
119
+ const m = y(
120
+ T.util.updateQueryData(
119
121
  "getEntityLinks",
120
- g.originalArgs,
121
- (L) => {
122
- console.log(`Patching ${a.entityType} links cache`);
123
- const l = L.find((r) => r.id === a.entityId);
124
- if (!l) {
125
- console.warn(
126
- `${a.entityType} ${a.entityId} not found in cache`
127
- );
128
- return;
129
- }
130
- if (c)
131
- l.links = l.links.filter((r) => r.id !== i);
132
- else {
133
- console.log(`Adding new link to ${a.entityType}`);
134
- const r = {
135
- id: i,
136
- direction: b,
137
- linkType: n,
138
- entityType: o.entityType,
139
- node: {
140
- id: o.entityId,
141
- name: o.name,
142
- label: o.label,
143
- parents: o.parents,
144
- subType: o.subType
145
- }
146
- }, d = l.links.findIndex(
147
- (I) => I.id === i
148
- );
149
- d !== -1 ? l.links[d] = r : (console.log(
150
- `Adding new link to ${a.entityType} links cache`,
151
- r,
152
- x(l)
153
- ), l.links.push(r));
154
- }
122
+ c,
123
+ (b) => {
124
+ const a = b.find((l) => l.id === o.entityId);
125
+ if (a)
126
+ if (I = !0, console.log(
127
+ `Found and patching ${o.entityType} ${o.entityId} in cache`
128
+ ), u)
129
+ a.links = a.links.filter((l) => l.id !== i);
130
+ else {
131
+ console.log(`Adding new link to ${o.entityType}`);
132
+ const l = {
133
+ id: i,
134
+ direction: $,
135
+ linkType: e,
136
+ entityType: r.entityType,
137
+ node: {
138
+ id: r.entityId,
139
+ name: r.name,
140
+ label: r.label,
141
+ parents: r.parents,
142
+ subType: r.subType
143
+ }
144
+ }, L = a.links.findIndex(
145
+ (E) => E.id === i
146
+ );
147
+ L !== -1 ? a.links[L] = l : (console.log(
148
+ `Adding new link to ${o.entityType} links cache`,
149
+ l,
150
+ C(a)
151
+ ), a.links.push(l));
152
+ }
155
153
  }
156
154
  )
157
155
  );
158
- u.push(T);
156
+ d.push(m);
157
+ } catch (m) {
158
+ console.error(`Error patching cache for ${o.entityType}:`, m);
159
159
  }
160
+ I || (o.entityId === n.entityId ? (console.warn(
161
+ `Source ${o.entityType} ${o.entityId} not in cache - invalidating to refresh UI`
162
+ ), y(
163
+ T.util.invalidateTags([
164
+ { type: "link", id: `${s}-${o.entityType}` }
165
+ ])
166
+ )) : console.log(
167
+ `Target ${o.entityType} ${o.entityId} not in cache - skipping patch (entity not currently visible)`
168
+ ));
160
169
  };
161
- p(e, t, m), p(t, e, m === "in" ? "out" : "in");
162
- }, Q = S.enhanceEndpoints({
170
+ p(n, t, f), p(t, n, f === "in" ? "out" : "in");
171
+ }, Q = G.enhanceEndpoints({
163
172
  endpoints: {
164
173
  deleteEntityLink: {
165
174
  transformErrorResponse: (s) => {
166
- var e;
167
- return ((e = s.data) == null ? void 0 : e.detail) || "";
175
+ var n;
176
+ return ((n = s.data) == null ? void 0 : n.detail) || "";
168
177
  },
169
- async onQueryStarted({ linkId: s, projectName: e, patch: t }, { dispatch: i, getState: n, queryFulfilled: m }) {
170
- const c = n();
171
- let y = [];
172
- const k = t == null ? void 0 : t.source, u = t == null ? void 0 : t.target, p = (t == null ? void 0 : t.linkType) || "", w = (t == null ? void 0 : t.direction) || "out";
173
- if (k && u)
178
+ async onQueryStarted({ linkId: s, projectName: n, patch: t }, { dispatch: i, getState: e, queryFulfilled: f }) {
179
+ const u = e();
180
+ let k = [];
181
+ const y = t == null ? void 0 : t.source, d = t == null ? void 0 : t.target, p = (t == null ? void 0 : t.linkType) || "", w = (t == null ? void 0 : t.direction) || "out";
182
+ if (y && d)
174
183
  try {
175
- A(
184
+ S(
176
185
  {
177
- projectName: e,
178
- sourceEntity: k,
179
- targetEntity: u,
186
+ projectName: n,
187
+ sourceEntity: y,
188
+ targetEntity: d,
180
189
  linkId: s,
181
190
  linkType: p,
182
191
  direction: w,
183
192
  isDelete: !0
184
193
  },
185
- { state: c, dispatch: i },
186
- y
187
- ), await m;
188
- } catch (a) {
189
- console.error("Error patching entities during link deletion:", a);
190
- for (const o of y)
191
- o.undo();
194
+ { state: u, dispatch: i },
195
+ k
196
+ ), await f;
197
+ } catch (o) {
198
+ console.error("Error patching entities during link deletion:", o);
199
+ for (const r of k)
200
+ r.undo();
201
+ i(
202
+ T.util.invalidateTags([
203
+ { type: "link", id: `${n}-${y.entityType}` },
204
+ { type: "link", id: `${n}-${d.entityType}` }
205
+ ])
206
+ );
192
207
  }
193
208
  else
194
209
  console.warn("Source or target entity not provided for link deletion");
@@ -196,71 +211,77 @@ const $ = async (s, e, t, i) => {
196
211
  },
197
212
  createEntityLink: {
198
213
  transformErrorResponse: (s) => {
199
- var e;
200
- return ((e = s.data) == null ? void 0 : e.detail) || "";
214
+ var n;
215
+ return ((n = s.data) == null ? void 0 : n.detail) || "";
201
216
  },
202
- async onQueryStarted({ projectName: s, createLinkRequestModel: e, patch: t }, { dispatch: i, getState: n, queryFulfilled: m }) {
203
- const { linkType: c, id: y } = e, k = n();
204
- let u = [];
205
- const p = t == null ? void 0 : t.source, w = p == null ? void 0 : p.entityType, a = p == null ? void 0 : p.entityId, o = t == null ? void 0 : t.target, b = o == null ? void 0 : o.entityType, D = o == null ? void 0 : o.entityId, E = (t == null ? void 0 : t.direction) || "out", g = c == null ? void 0 : c.split("|")[0];
217
+ async onQueryStarted({ projectName: s, createLinkRequestModel: n, patch: t }, { dispatch: i, getState: e, queryFulfilled: f }) {
218
+ const { linkType: u, id: k } = n, y = e();
219
+ let d = [];
220
+ const p = t == null ? void 0 : t.source, w = p == null ? void 0 : p.entityType, o = p == null ? void 0 : p.entityId, r = t == null ? void 0 : t.target, $ = r == null ? void 0 : r.entityType, v = r == null ? void 0 : r.entityId, D = (t == null ? void 0 : t.direction) || "out", I = u == null ? void 0 : u.split("|")[0];
206
221
  try {
207
- if (p.entityType && o) {
208
- const T = $(
222
+ if (p.entityType && r) {
223
+ const c = A(
209
224
  w,
210
- a,
225
+ o,
211
226
  s,
212
227
  i
213
- ), L = $(
214
- b,
215
- D,
228
+ ), m = A(
229
+ $,
230
+ v,
216
231
  s,
217
232
  i
218
- ), l = await Promise.all([T, L]), r = l[0], d = l[1];
219
- if (!r || !d)
233
+ ), b = await Promise.all([c, m]), a = b[0], l = b[1];
234
+ if (!a || !l)
220
235
  throw new Error("Source or target entity data not found");
221
- if (!y)
236
+ if (!k)
222
237
  throw new Error("Link ID not found in cache entry");
223
- const I = {
238
+ const L = {
224
239
  entityType: w,
225
- entityId: a,
226
- name: r.name,
227
- label: "label" in r ? r.label : void 0,
228
- parents: r.parents || [],
229
- subType: "subType" in r ? r.subType : void 0
230
- }, G = {
231
- entityType: b,
232
- entityId: D,
233
- name: d.name,
234
- label: "label" in d ? d.label : void 0,
235
- parents: d.parents || [],
236
- subType: "subType" in d ? d.subType : void 0
240
+ entityId: o,
241
+ name: a.name,
242
+ label: "label" in a ? a.label : void 0,
243
+ parents: a.parents || [],
244
+ subType: "subType" in a ? a.subType : void 0
245
+ }, E = {
246
+ entityType: $,
247
+ entityId: v,
248
+ name: l.name,
249
+ label: "label" in l ? l.label : void 0,
250
+ parents: l.parents || [],
251
+ subType: "subType" in l ? l.subType : void 0
237
252
  };
238
- A(
253
+ S(
239
254
  {
240
255
  projectName: s,
241
- sourceEntity: I,
242
- targetEntity: G,
243
- linkId: y,
244
- linkType: g,
245
- direction: E,
256
+ sourceEntity: L,
257
+ targetEntity: E,
258
+ linkId: k,
259
+ linkType: I,
260
+ direction: D,
246
261
  isDelete: !1
247
262
  },
248
- { state: k, dispatch: i },
249
- u
250
- ), await m;
263
+ { state: y, dispatch: i },
264
+ d
265
+ ), await f;
251
266
  } else
252
267
  throw console.warn("Source entity type not provided, falling back to task query"), new Error("Source entity type not provided");
253
- } catch (T) {
254
- console.error(T);
255
- for (const L of u)
256
- L.undo();
268
+ } catch (c) {
269
+ console.error(c);
270
+ for (const m of d)
271
+ m.undo();
272
+ p && r && i(
273
+ T.util.invalidateTags([
274
+ { type: "link", id: `${s}-${p.entityType}` },
275
+ { type: "link", id: `${s}-${r.entityType}` }
276
+ ])
277
+ );
257
278
  }
258
279
  }
259
280
  }
260
281
  }
261
- }), { useDeleteEntityLinkMutation: gt, useCreateEntityLinkMutation: Tt } = Q;
282
+ }), { useDeleteEntityLinkMutation: wt, useCreateEntityLinkMutation: Tt } = Q;
262
283
  export {
263
284
  Tt as useCreateEntityLinkMutation,
264
- gt as useDeleteEntityLinkMutation
285
+ wt as useDeleteEntityLinkMutation
265
286
  };
266
287
  //# sourceMappingURL=updateLinks.es.js.map