@acorex-platform/framework-shared 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/acorex-platform-framework-shared-0.0.1.tgz +0 -0
  2. package/core/src/index.d.ts +2 -0
  3. package/core/src/index.d.ts.map +1 -0
  4. package/core/src/index.js +5 -0
  5. package/core/src/index.js.map +1 -0
  6. package/core/src/lib/core/actions.types.d.ts +724 -0
  7. package/core/src/lib/core/actions.types.d.ts.map +1 -0
  8. package/core/src/lib/core/actions.types.js +851 -0
  9. package/core/src/lib/core/actions.types.js.map +1 -0
  10. package/core/src/lib/core/context.types.d.ts +23 -0
  11. package/core/src/lib/core/context.types.d.ts.map +1 -0
  12. package/core/src/lib/core/context.types.js +9 -0
  13. package/core/src/lib/core/context.types.js.map +1 -0
  14. package/core/src/lib/core/core.types.d.ts +193 -0
  15. package/core/src/lib/core/core.types.d.ts.map +1 -0
  16. package/core/src/lib/core/core.types.js +90 -0
  17. package/core/src/lib/core/core.types.js.map +1 -0
  18. package/core/src/lib/core/index.d.ts +8 -0
  19. package/core/src/lib/core/index.d.ts.map +1 -0
  20. package/core/src/lib/core/index.js +13 -0
  21. package/core/src/lib/core/index.js.map +1 -0
  22. package/core/src/lib/core/logo.types.d.ts +13 -0
  23. package/core/src/lib/core/logo.types.d.ts.map +1 -0
  24. package/core/src/lib/core/logo.types.js +5 -0
  25. package/core/src/lib/core/logo.types.js.map +1 -0
  26. package/core/src/lib/core/response.types.d.ts +10 -0
  27. package/core/src/lib/core/response.types.d.ts.map +1 -0
  28. package/core/src/lib/core/response.types.js +5 -0
  29. package/core/src/lib/core/response.types.js.map +1 -0
  30. package/core/src/lib/core/scope.types.d.ts +9 -0
  31. package/core/src/lib/core/scope.types.d.ts.map +1 -0
  32. package/core/src/lib/core/scope.types.js +32 -0
  33. package/core/src/lib/core/scope.types.js.map +1 -0
  34. package/core/src/lib/core/shims.types.d.ts +20 -0
  35. package/core/src/lib/core/shims.types.d.ts.map +1 -0
  36. package/core/src/lib/core/shims.types.js +5 -0
  37. package/core/src/lib/core/shims.types.js.map +1 -0
  38. package/core/src/lib/data/column.types.d.ts +6 -0
  39. package/core/src/lib/data/column.types.d.ts.map +1 -0
  40. package/core/src/lib/data/column.types.js +5 -0
  41. package/core/src/lib/data/column.types.js.map +1 -0
  42. package/core/src/lib/data/data.types.d.ts +40 -0
  43. package/core/src/lib/data/data.types.d.ts.map +1 -0
  44. package/core/src/lib/data/data.types.js +5 -0
  45. package/core/src/lib/data/data.types.js.map +1 -0
  46. package/core/src/lib/data/export.types.d.ts +64 -0
  47. package/core/src/lib/data/export.types.d.ts.map +1 -0
  48. package/core/src/lib/data/export.types.js +14 -0
  49. package/core/src/lib/data/export.types.js.map +1 -0
  50. package/core/src/lib/data/filter.types.d.ts +42 -0
  51. package/core/src/lib/data/filter.types.d.ts.map +1 -0
  52. package/core/src/lib/data/filter.types.js +5 -0
  53. package/core/src/lib/data/filter.types.js.map +1 -0
  54. package/core/src/lib/data/index.d.ts +7 -0
  55. package/core/src/lib/data/index.d.ts.map +1 -0
  56. package/core/src/lib/data/index.js +12 -0
  57. package/core/src/lib/data/index.js.map +1 -0
  58. package/core/src/lib/data/multi-source.types.d.ts +8 -0
  59. package/core/src/lib/data/multi-source.types.d.ts.map +1 -0
  60. package/core/src/lib/data/multi-source.types.js +5 -0
  61. package/core/src/lib/data/multi-source.types.js.map +1 -0
  62. package/core/src/lib/data/sort.types.d.ts +8 -0
  63. package/core/src/lib/data/sort.types.d.ts.map +1 -0
  64. package/core/src/lib/data/sort.types.js +5 -0
  65. package/core/src/lib/data/sort.types.js.map +1 -0
  66. package/core/src/lib/domain/address.types.d.ts +38 -0
  67. package/core/src/lib/domain/address.types.d.ts.map +1 -0
  68. package/core/src/lib/domain/address.types.js +5 -0
  69. package/core/src/lib/domain/address.types.js.map +1 -0
  70. package/core/src/lib/domain/ai-output.types.d.ts +5 -0
  71. package/core/src/lib/domain/ai-output.types.d.ts.map +1 -0
  72. package/core/src/lib/domain/ai-output.types.js +5 -0
  73. package/core/src/lib/domain/ai-output.types.js.map +1 -0
  74. package/core/src/lib/domain/file-storage.types.d.ts +203 -0
  75. package/core/src/lib/domain/file-storage.types.d.ts.map +1 -0
  76. package/core/src/lib/domain/file-storage.types.js +12 -0
  77. package/core/src/lib/domain/file-storage.types.js.map +1 -0
  78. package/core/src/lib/domain/index.d.ts +6 -0
  79. package/core/src/lib/domain/index.d.ts.map +1 -0
  80. package/core/src/lib/domain/index.js +11 -0
  81. package/core/src/lib/domain/index.js.map +1 -0
  82. package/core/src/lib/domain/metadata.types.d.ts +25 -0
  83. package/core/src/lib/domain/metadata.types.d.ts.map +1 -0
  84. package/core/src/lib/domain/metadata.types.js +3 -0
  85. package/core/src/lib/domain/metadata.types.js.map +1 -0
  86. package/core/src/lib/domain/spreadsheet.types.d.ts +4 -0
  87. package/core/src/lib/domain/spreadsheet.types.d.ts.map +1 -0
  88. package/core/src/lib/domain/spreadsheet.types.js +5 -0
  89. package/core/src/lib/domain/spreadsheet.types.js.map +1 -0
  90. package/core/src/lib/index.d.ts +14 -0
  91. package/core/src/lib/index.d.ts.map +1 -0
  92. package/core/src/lib/index.js +19 -0
  93. package/core/src/lib/index.js.map +1 -0
  94. package/core/src/lib/integration/index.d.ts +4 -0
  95. package/core/src/lib/integration/index.d.ts.map +1 -0
  96. package/core/src/lib/integration/index.js +9 -0
  97. package/core/src/lib/integration/index.js.map +1 -0
  98. package/core/src/lib/integration/integration-connection.safe-types.d.ts +54 -0
  99. package/core/src/lib/integration/integration-connection.safe-types.d.ts.map +1 -0
  100. package/core/src/lib/integration/integration-connection.safe-types.js +4 -0
  101. package/core/src/lib/integration/integration-connection.safe-types.js.map +1 -0
  102. package/core/src/lib/integration/integration-status.constants.d.ts +49 -0
  103. package/core/src/lib/integration/integration-status.constants.d.ts.map +1 -0
  104. package/core/src/lib/integration/integration-status.constants.js +57 -0
  105. package/core/src/lib/integration/integration-status.constants.js.map +1 -0
  106. package/core/src/lib/integration/integration.types.d.ts +120 -0
  107. package/core/src/lib/integration/integration.types.d.ts.map +1 -0
  108. package/core/src/lib/integration/integration.types.js +33 -0
  109. package/core/src/lib/integration/integration.types.js.map +1 -0
  110. package/core/src/lib/interaction/index.d.ts +4 -0
  111. package/core/src/lib/interaction/index.d.ts.map +1 -0
  112. package/core/src/lib/interaction/index.js +9 -0
  113. package/core/src/lib/interaction/index.js.map +1 -0
  114. package/core/src/lib/interaction/interactive.types.d.ts +65 -0
  115. package/core/src/lib/interaction/interactive.types.d.ts.map +1 -0
  116. package/core/src/lib/interaction/interactive.types.js +5 -0
  117. package/core/src/lib/interaction/interactive.types.js.map +1 -0
  118. package/core/src/lib/interaction/view-query.types.d.ts +11 -0
  119. package/core/src/lib/interaction/view-query.types.d.ts.map +1 -0
  120. package/core/src/lib/interaction/view-query.types.js +5 -0
  121. package/core/src/lib/interaction/view-query.types.js.map +1 -0
  122. package/core/src/lib/interaction/view.types.d.ts +34 -0
  123. package/core/src/lib/interaction/view.types.d.ts.map +1 -0
  124. package/core/src/lib/interaction/view.types.js +5 -0
  125. package/core/src/lib/interaction/view.types.js.map +1 -0
  126. package/core/src/lib/keys/index.d.ts +4 -0
  127. package/core/src/lib/keys/index.d.ts.map +1 -0
  128. package/core/src/lib/keys/index.js +9 -0
  129. package/core/src/lib/keys/index.js.map +1 -0
  130. package/core/src/lib/keys/platform-core-datasource.keys.d.ts +6 -0
  131. package/core/src/lib/keys/platform-core-datasource.keys.d.ts.map +1 -0
  132. package/core/src/lib/keys/platform-core-datasource.keys.js +11 -0
  133. package/core/src/lib/keys/platform-core-datasource.keys.js.map +1 -0
  134. package/core/src/lib/keys/preview-widget-field.command.key.d.ts +3 -0
  135. package/core/src/lib/keys/preview-widget-field.command.key.d.ts.map +1 -0
  136. package/core/src/lib/keys/preview-widget-field.command.key.js +6 -0
  137. package/core/src/lib/keys/preview-widget-field.command.key.js.map +1 -0
  138. package/core/src/lib/keys/regional-settings.keys.d.ts +31 -0
  139. package/core/src/lib/keys/regional-settings.keys.d.ts.map +1 -0
  140. package/core/src/lib/keys/regional-settings.keys.js +37 -0
  141. package/core/src/lib/keys/regional-settings.keys.js.map +1 -0
  142. package/core/src/lib/mock/index.d.ts +2 -0
  143. package/core/src/lib/mock/index.d.ts.map +1 -0
  144. package/core/src/lib/mock/index.js +7 -0
  145. package/core/src/lib/mock/index.js.map +1 -0
  146. package/core/src/lib/mock/mock-data.shims.d.ts +39 -0
  147. package/core/src/lib/mock/mock-data.shims.d.ts.map +1 -0
  148. package/core/src/lib/mock/mock-data.shims.js +191 -0
  149. package/core/src/lib/mock/mock-data.shims.js.map +1 -0
  150. package/core/src/lib/multi-language-string/compare-axp-multi-language-string.d.ts +16 -0
  151. package/core/src/lib/multi-language-string/compare-axp-multi-language-string.d.ts.map +1 -0
  152. package/core/src/lib/multi-language-string/compare-axp-multi-language-string.js +39 -0
  153. package/core/src/lib/multi-language-string/compare-axp-multi-language-string.js.map +1 -0
  154. package/core/src/lib/multi-language-string/index.d.ts +4 -0
  155. package/core/src/lib/multi-language-string/index.d.ts.map +1 -0
  156. package/core/src/lib/multi-language-string/index.js +9 -0
  157. package/core/src/lib/multi-language-string/index.js.map +1 -0
  158. package/core/src/lib/multi-language-string/locale-map-value.util.d.ts +10 -0
  159. package/core/src/lib/multi-language-string/locale-map-value.util.d.ts.map +1 -0
  160. package/core/src/lib/multi-language-string/locale-map-value.util.js +41 -0
  161. package/core/src/lib/multi-language-string/locale-map-value.util.js.map +1 -0
  162. package/core/src/lib/multi-language-string/resolve-multi-language-string.util.d.ts +6 -0
  163. package/core/src/lib/multi-language-string/resolve-multi-language-string.util.d.ts.map +1 -0
  164. package/core/src/lib/multi-language-string/resolve-multi-language-string.util.js +33 -0
  165. package/core/src/lib/multi-language-string/resolve-multi-language-string.util.js.map +1 -0
  166. package/core/src/lib/property/element.types.d.ts +2 -0
  167. package/core/src/lib/property/element.types.d.ts.map +1 -0
  168. package/core/src/lib/property/element.types.js +5 -0
  169. package/core/src/lib/property/element.types.js.map +1 -0
  170. package/core/src/lib/property/file.types.d.ts +2 -0
  171. package/core/src/lib/property/file.types.d.ts.map +1 -0
  172. package/core/src/lib/property/file.types.js +5 -0
  173. package/core/src/lib/property/file.types.js.map +1 -0
  174. package/core/src/lib/property/index.d.ts +5 -0
  175. package/core/src/lib/property/index.d.ts.map +1 -0
  176. package/core/src/lib/property/index.js +10 -0
  177. package/core/src/lib/property/index.js.map +1 -0
  178. package/core/src/lib/property/property.types.d.ts +24 -0
  179. package/core/src/lib/property/property.types.d.ts.map +1 -0
  180. package/core/src/lib/property/property.types.js +5 -0
  181. package/core/src/lib/property/property.types.js.map +1 -0
  182. package/core/src/lib/property/validation.types.d.ts +31 -0
  183. package/core/src/lib/property/validation.types.d.ts.map +1 -0
  184. package/core/src/lib/property/validation.types.js +5 -0
  185. package/core/src/lib/property/validation.types.js.map +1 -0
  186. package/core/src/lib/status/index.d.ts +4 -0
  187. package/core/src/lib/status/index.d.ts.map +1 -0
  188. package/core/src/lib/status/index.js +9 -0
  189. package/core/src/lib/status/index.js.map +1 -0
  190. package/core/src/lib/status/status-definition.types.d.ts +110 -0
  191. package/core/src/lib/status/status-definition.types.d.ts.map +1 -0
  192. package/core/src/lib/status/status-definition.types.js +16 -0
  193. package/core/src/lib/status/status-definition.types.js.map +1 -0
  194. package/core/src/lib/status/status.types.d.ts +28 -0
  195. package/core/src/lib/status/status.types.d.ts.map +1 -0
  196. package/core/src/lib/status/status.types.js +34 -0
  197. package/core/src/lib/status/status.types.js.map +1 -0
  198. package/core/src/lib/status/statuses.types.d.ts +279 -0
  199. package/core/src/lib/status/statuses.types.d.ts.map +1 -0
  200. package/core/src/lib/status/statuses.types.js +320 -0
  201. package/core/src/lib/status/statuses.types.js.map +1 -0
  202. package/core/src/lib/utils/index.d.ts +4 -0
  203. package/core/src/lib/utils/index.d.ts.map +1 -0
  204. package/core/src/lib/utils/index.js +9 -0
  205. package/core/src/lib/utils/index.js.map +1 -0
  206. package/core/src/lib/utils/object-util.d.ts +57 -0
  207. package/core/src/lib/utils/object-util.d.ts.map +1 -0
  208. package/core/src/lib/utils/object-util.js +679 -0
  209. package/core/src/lib/utils/object-util.js.map +1 -0
  210. package/core/src/lib/utils/scalar-coercion.d.ts +17 -0
  211. package/core/src/lib/utils/scalar-coercion.d.ts.map +1 -0
  212. package/core/src/lib/utils/scalar-coercion.js +95 -0
  213. package/core/src/lib/utils/scalar-coercion.js.map +1 -0
  214. package/core/src/lib/utils/string.util.d.ts +11 -0
  215. package/core/src/lib/utils/string.util.d.ts.map +1 -0
  216. package/core/src/lib/utils/string.util.js +37 -0
  217. package/core/src/lib/utils/string.util.js.map +1 -0
  218. package/core/src/lib/widgets/index.d.ts +4 -0
  219. package/core/src/lib/widgets/index.d.ts.map +1 -0
  220. package/core/src/lib/widgets/index.js +9 -0
  221. package/core/src/lib/widgets/index.js.map +1 -0
  222. package/core/src/lib/widgets/widget-node.types.d.ts +16 -0
  223. package/core/src/lib/widgets/widget-node.types.d.ts.map +1 -0
  224. package/core/src/lib/widgets/widget-node.types.js +5 -0
  225. package/core/src/lib/widgets/widget-node.types.js.map +1 -0
  226. package/core/src/lib/widgets/widgets-catalog.d.ts +100 -0
  227. package/core/src/lib/widgets/widgets-catalog.d.ts.map +1 -0
  228. package/core/src/lib/widgets/widgets-catalog.js +105 -0
  229. package/core/src/lib/widgets/widgets-catalog.js.map +1 -0
  230. package/core/src/lib/widgets/widgets-list.d.ts +116 -0
  231. package/core/src/lib/widgets/widgets-list.d.ts.map +1 -0
  232. package/core/src/lib/widgets/widgets-list.js +154 -0
  233. package/core/src/lib/widgets/widgets-list.js.map +1 -0
  234. package/core/src/lib/workflow/activity.types.d.ts +133 -0
  235. package/core/src/lib/workflow/activity.types.d.ts.map +1 -0
  236. package/core/src/lib/workflow/activity.types.js +8 -0
  237. package/core/src/lib/workflow/activity.types.js.map +1 -0
  238. package/core/src/lib/workflow/index.d.ts +4 -0
  239. package/core/src/lib/workflow/index.d.ts.map +1 -0
  240. package/core/src/lib/workflow/index.js +9 -0
  241. package/core/src/lib/workflow/index.js.map +1 -0
  242. package/core/src/lib/workflow/workflow-definition.types.d.ts +182 -0
  243. package/core/src/lib/workflow/workflow-definition.types.d.ts.map +1 -0
  244. package/core/src/lib/workflow/workflow-definition.types.js +4 -0
  245. package/core/src/lib/workflow/workflow-definition.types.js.map +1 -0
  246. package/core/src/lib/workflow/workflow-instance.types.d.ts +375 -0
  247. package/core/src/lib/workflow/workflow-instance.types.d.ts.map +1 -0
  248. package/core/src/lib/workflow/workflow-instance.types.js +8 -0
  249. package/core/src/lib/workflow/workflow-instance.types.js.map +1 -0
  250. package/domain/src/index.d.ts +2 -0
  251. package/domain/src/index.d.ts.map +1 -0
  252. package/domain/src/index.js +5 -0
  253. package/domain/src/index.js.map +1 -0
  254. package/domain/src/lib/definitions/aggregate-definition.types.d.ts +18 -0
  255. package/domain/src/lib/definitions/aggregate-definition.types.d.ts.map +1 -0
  256. package/domain/src/lib/definitions/aggregate-definition.types.js +4 -0
  257. package/domain/src/lib/definitions/aggregate-definition.types.js.map +1 -0
  258. package/domain/src/lib/definitions/base.types.d.ts +36 -0
  259. package/domain/src/lib/definitions/base.types.d.ts.map +1 -0
  260. package/domain/src/lib/definitions/base.types.js +17 -0
  261. package/domain/src/lib/definitions/base.types.js.map +1 -0
  262. package/domain/src/lib/definitions/command-registry.types.d.ts +34 -0
  263. package/domain/src/lib/definitions/command-registry.types.d.ts.map +1 -0
  264. package/domain/src/lib/definitions/command-registry.types.js +4 -0
  265. package/domain/src/lib/definitions/command-registry.types.js.map +1 -0
  266. package/domain/src/lib/definitions/entity-definition.types.d.ts +50 -0
  267. package/domain/src/lib/definitions/entity-definition.types.d.ts.map +1 -0
  268. package/domain/src/lib/definitions/entity-definition.types.js +10 -0
  269. package/domain/src/lib/definitions/entity-definition.types.js.map +1 -0
  270. package/domain/src/lib/definitions/interface-definition.types.d.ts +31 -0
  271. package/domain/src/lib/definitions/interface-definition.types.d.ts.map +1 -0
  272. package/domain/src/lib/definitions/interface-definition.types.js +3 -0
  273. package/domain/src/lib/definitions/interface-definition.types.js.map +1 -0
  274. package/domain/src/lib/definitions/menu-definition.types.d.ts +57 -0
  275. package/domain/src/lib/definitions/menu-definition.types.d.ts.map +1 -0
  276. package/domain/src/lib/definitions/menu-definition.types.js +5 -0
  277. package/domain/src/lib/definitions/menu-definition.types.js.map +1 -0
  278. package/domain/src/lib/definitions/module-definition.types.d.ts +7 -0
  279. package/domain/src/lib/definitions/module-definition.types.d.ts.map +1 -0
  280. package/domain/src/lib/definitions/module-definition.types.js +3 -0
  281. package/domain/src/lib/definitions/module-definition.types.js.map +1 -0
  282. package/domain/src/lib/definitions/permission-definition.types.d.ts +41 -0
  283. package/domain/src/lib/definitions/permission-definition.types.d.ts.map +1 -0
  284. package/domain/src/lib/definitions/permission-definition.types.js +5 -0
  285. package/domain/src/lib/definitions/permission-definition.types.js.map +1 -0
  286. package/domain/src/lib/definitions/plugin-definition.types.d.ts +23 -0
  287. package/domain/src/lib/definitions/plugin-definition.types.d.ts.map +1 -0
  288. package/domain/src/lib/definitions/plugin-definition.types.js +3 -0
  289. package/domain/src/lib/definitions/plugin-definition.types.js.map +1 -0
  290. package/domain/src/lib/definitions/property-definition.types.d.ts +33 -0
  291. package/domain/src/lib/definitions/property-definition.types.d.ts.map +1 -0
  292. package/domain/src/lib/definitions/property-definition.types.js +3 -0
  293. package/domain/src/lib/definitions/property-definition.types.js.map +1 -0
  294. package/domain/src/lib/definitions/query-registry.types.d.ts +32 -0
  295. package/domain/src/lib/definitions/query-registry.types.d.ts.map +1 -0
  296. package/domain/src/lib/definitions/query-registry.types.js +4 -0
  297. package/domain/src/lib/definitions/query-registry.types.js.map +1 -0
  298. package/domain/src/lib/definitions/relation-definition.types.d.ts +31 -0
  299. package/domain/src/lib/definitions/relation-definition.types.d.ts.map +1 -0
  300. package/domain/src/lib/definitions/relation-definition.types.js +16 -0
  301. package/domain/src/lib/definitions/relation-definition.types.js.map +1 -0
  302. package/domain/src/lib/definitions/validation-definition.types.d.ts +29 -0
  303. package/domain/src/lib/definitions/validation-definition.types.d.ts.map +1 -0
  304. package/domain/src/lib/definitions/validation-definition.types.js +3 -0
  305. package/domain/src/lib/definitions/validation-definition.types.js.map +1 -0
  306. package/domain/src/lib/definitions/widget-catalog.types.d.ts +14 -0
  307. package/domain/src/lib/definitions/widget-catalog.types.d.ts.map +1 -0
  308. package/domain/src/lib/definitions/widget-catalog.types.js +5 -0
  309. package/domain/src/lib/definitions/widget-catalog.types.js.map +1 -0
  310. package/domain/src/lib/index.d.ts +15 -0
  311. package/domain/src/lib/index.d.ts.map +1 -0
  312. package/domain/src/lib/index.js +20 -0
  313. package/domain/src/lib/index.js.map +1 -0
  314. package/entity/src/index.d.ts +2 -0
  315. package/entity/src/index.d.ts.map +1 -0
  316. package/entity/src/index.js +5 -0
  317. package/entity/src/index.js.map +1 -0
  318. package/entity/src/lib/constants/entity-datasource.keys.d.ts +5 -0
  319. package/entity/src/lib/constants/entity-datasource.keys.d.ts.map +1 -0
  320. package/entity/src/lib/constants/entity-datasource.keys.js +10 -0
  321. package/entity/src/lib/constants/entity-datasource.keys.js.map +1 -0
  322. package/entity/src/lib/constants/entity-display.constants.d.ts +7 -0
  323. package/entity/src/lib/constants/entity-display.constants.d.ts.map +1 -0
  324. package/entity/src/lib/constants/entity-display.constants.js +12 -0
  325. package/entity/src/lib/constants/entity-display.constants.js.map +1 -0
  326. package/entity/src/lib/constants/entity-events.keys.d.ts +5 -0
  327. package/entity/src/lib/constants/entity-events.keys.d.ts.map +1 -0
  328. package/entity/src/lib/constants/entity-events.keys.js +10 -0
  329. package/entity/src/lib/constants/entity-events.keys.js.map +1 -0
  330. package/entity/src/lib/constants/index.d.ts +4 -0
  331. package/entity/src/lib/constants/index.d.ts.map +1 -0
  332. package/entity/src/lib/constants/index.js +9 -0
  333. package/entity/src/lib/constants/index.js.map +1 -0
  334. package/entity/src/lib/helpers/entity-action.helpers.d.ts +31 -0
  335. package/entity/src/lib/helpers/entity-action.helpers.d.ts.map +1 -0
  336. package/entity/src/lib/helpers/entity-action.helpers.js +270 -0
  337. package/entity/src/lib/helpers/entity-action.helpers.js.map +1 -0
  338. package/entity/src/lib/helpers/index.d.ts +2 -0
  339. package/entity/src/lib/helpers/index.d.ts.map +1 -0
  340. package/entity/src/lib/helpers/index.js +7 -0
  341. package/entity/src/lib/helpers/index.js.map +1 -0
  342. package/entity/src/lib/index.d.ts +5 -0
  343. package/entity/src/lib/index.d.ts.map +1 -0
  344. package/entity/src/lib/index.js +10 -0
  345. package/entity/src/lib/index.js.map +1 -0
  346. package/entity/src/lib/types/entity-action.types.d.ts +69 -0
  347. package/entity/src/lib/types/entity-action.types.d.ts.map +1 -0
  348. package/entity/src/lib/types/entity-action.types.js +18 -0
  349. package/entity/src/lib/types/entity-action.types.js.map +1 -0
  350. package/entity/src/lib/types/entity-card-field.types.d.ts +38 -0
  351. package/entity/src/lib/types/entity-card-field.types.d.ts.map +1 -0
  352. package/entity/src/lib/types/entity-card-field.types.js +25 -0
  353. package/entity/src/lib/types/entity-card-field.types.js.map +1 -0
  354. package/entity/src/lib/types/entity-definition.types.d.ts +182 -0
  355. package/entity/src/lib/types/entity-definition.types.d.ts.map +1 -0
  356. package/entity/src/lib/types/entity-definition.types.js +44 -0
  357. package/entity/src/lib/types/entity-definition.types.js.map +1 -0
  358. package/entity/src/lib/types/entity-detail-list.types.d.ts +9 -0
  359. package/entity/src/lib/types/entity-detail-list.types.d.ts.map +1 -0
  360. package/entity/src/lib/types/entity-detail-list.types.js +5 -0
  361. package/entity/src/lib/types/entity-detail-list.types.js.map +1 -0
  362. package/entity/src/lib/types/entity-display-field.types.d.ts +35 -0
  363. package/entity/src/lib/types/entity-display-field.types.d.ts.map +1 -0
  364. package/entity/src/lib/types/entity-display-field.types.js +5 -0
  365. package/entity/src/lib/types/entity-display-field.types.js.map +1 -0
  366. package/entity/src/lib/types/entity-formats.types.d.ts +12 -0
  367. package/entity/src/lib/types/entity-formats.types.d.ts.map +1 -0
  368. package/entity/src/lib/types/entity-formats.types.js +5 -0
  369. package/entity/src/lib/types/entity-formats.types.js.map +1 -0
  370. package/entity/src/lib/types/entity-layout-view.types.d.ts +34 -0
  371. package/entity/src/lib/types/entity-layout-view.types.d.ts.map +1 -0
  372. package/entity/src/lib/types/entity-layout-view.types.js +5 -0
  373. package/entity/src/lib/types/entity-layout-view.types.js.map +1 -0
  374. package/entity/src/lib/types/entity-list-filter.types.d.ts +27 -0
  375. package/entity/src/lib/types/entity-list-filter.types.d.ts.map +1 -0
  376. package/entity/src/lib/types/entity-list-filter.types.js +39 -0
  377. package/entity/src/lib/types/entity-list-filter.types.js.map +1 -0
  378. package/entity/src/lib/types/entity-master-list.types.d.ts +44 -0
  379. package/entity/src/lib/types/entity-master-list.types.d.ts.map +1 -0
  380. package/entity/src/lib/types/entity-master-list.types.js +26 -0
  381. package/entity/src/lib/types/entity-master-list.types.js.map +1 -0
  382. package/entity/src/lib/types/entity-model.types.d.ts +52 -0
  383. package/entity/src/lib/types/entity-model.types.d.ts.map +1 -0
  384. package/entity/src/lib/types/entity-model.types.js +5 -0
  385. package/entity/src/lib/types/entity-model.types.js.map +1 -0
  386. package/entity/src/lib/types/entity-property-list.types.d.ts +21 -0
  387. package/entity/src/lib/types/entity-property-list.types.d.ts.map +1 -0
  388. package/entity/src/lib/types/entity-property-list.types.js +5 -0
  389. package/entity/src/lib/types/entity-property-list.types.js.map +1 -0
  390. package/entity/src/lib/types/entity-property.types.d.ts +67 -0
  391. package/entity/src/lib/types/entity-property.types.d.ts.map +1 -0
  392. package/entity/src/lib/types/entity-property.types.js +5 -0
  393. package/entity/src/lib/types/entity-property.types.js.map +1 -0
  394. package/entity/src/lib/types/entity-query-view.types.d.ts +32 -0
  395. package/entity/src/lib/types/entity-query-view.types.d.ts.map +1 -0
  396. package/entity/src/lib/types/entity-query-view.types.js +36 -0
  397. package/entity/src/lib/types/entity-query-view.types.js.map +1 -0
  398. package/entity/src/lib/types/entity-related-layout.types.d.ts +65 -0
  399. package/entity/src/lib/types/entity-related-layout.types.d.ts.map +1 -0
  400. package/entity/src/lib/types/entity-related-layout.types.js +5 -0
  401. package/entity/src/lib/types/entity-related-layout.types.js.map +1 -0
  402. package/entity/src/lib/types/entity-storage.types.d.ts +43 -0
  403. package/entity/src/lib/types/entity-storage.types.d.ts.map +1 -0
  404. package/entity/src/lib/types/entity-storage.types.js +4 -0
  405. package/entity/src/lib/types/entity-storage.types.js.map +1 -0
  406. package/entity/src/lib/types/index.d.ts +17 -0
  407. package/entity/src/lib/types/index.d.ts.map +1 -0
  408. package/entity/src/lib/types/index.js +22 -0
  409. package/entity/src/lib/types/index.js.map +1 -0
  410. package/entity/src/lib/types/lookup-widget.types.d.ts +79 -0
  411. package/entity/src/lib/types/lookup-widget.types.d.ts.map +1 -0
  412. package/entity/src/lib/types/lookup-widget.types.js +4 -0
  413. package/entity/src/lib/types/lookup-widget.types.js.map +1 -0
  414. package/entity/src/lib/utils/entity-display-template.util.d.ts +17 -0
  415. package/entity/src/lib/utils/entity-display-template.util.d.ts.map +1 -0
  416. package/entity/src/lib/utils/entity-display-template.util.js +57 -0
  417. package/entity/src/lib/utils/entity-display-template.util.js.map +1 -0
  418. package/entity/src/lib/utils/entity-list-filter-definitions.util.d.ts +17 -0
  419. package/entity/src/lib/utils/entity-list-filter-definitions.util.d.ts.map +1 -0
  420. package/entity/src/lib/utils/entity-list-filter-definitions.util.js +144 -0
  421. package/entity/src/lib/utils/entity-list-filter-definitions.util.js.map +1 -0
  422. package/entity/src/lib/utils/entity-list-sortable-fields.util.d.ts +14 -0
  423. package/entity/src/lib/utils/entity-list-sortable-fields.util.d.ts.map +1 -0
  424. package/entity/src/lib/utils/entity-list-sortable-fields.util.js +95 -0
  425. package/entity/src/lib/utils/entity-list-sortable-fields.util.js.map +1 -0
  426. package/entity/src/lib/utils/entity-merge-detail-list-properties.util.d.ts +16 -0
  427. package/entity/src/lib/utils/entity-merge-detail-list-properties.util.d.ts.map +1 -0
  428. package/entity/src/lib/utils/entity-merge-detail-list-properties.util.js +75 -0
  429. package/entity/src/lib/utils/entity-merge-detail-list-properties.util.js.map +1 -0
  430. package/entity/src/lib/utils/entity-property-display-path.util.d.ts +36 -0
  431. package/entity/src/lib/utils/entity-property-display-path.util.d.ts.map +1 -0
  432. package/entity/src/lib/utils/entity-property-display-path.util.js +97 -0
  433. package/entity/src/lib/utils/entity-property-display-path.util.js.map +1 -0
  434. package/entity/src/lib/utils/entity-quick-search-paths.util.d.ts +19 -0
  435. package/entity/src/lib/utils/entity-quick-search-paths.util.d.ts.map +1 -0
  436. package/entity/src/lib/utils/entity-quick-search-paths.util.js +149 -0
  437. package/entity/src/lib/utils/entity-quick-search-paths.util.js.map +1 -0
  438. package/entity/src/lib/utils/entity-search-title-context.util.d.ts +21 -0
  439. package/entity/src/lib/utils/entity-search-title-context.util.d.ts.map +1 -0
  440. package/entity/src/lib/utils/entity-search-title-context.util.js +127 -0
  441. package/entity/src/lib/utils/entity-search-title-context.util.js.map +1 -0
  442. package/entity/src/lib/utils/entity-workflow-record.util.d.ts +23 -0
  443. package/entity/src/lib/utils/entity-workflow-record.util.d.ts.map +1 -0
  444. package/entity/src/lib/utils/entity-workflow-record.util.js +38 -0
  445. package/entity/src/lib/utils/entity-workflow-record.util.js.map +1 -0
  446. package/entity/src/lib/utils/index.d.ts +10 -0
  447. package/entity/src/lib/utils/index.d.ts.map +1 -0
  448. package/entity/src/lib/utils/index.js +15 -0
  449. package/entity/src/lib/utils/index.js.map +1 -0
  450. package/entity/src/lib/utils/lookup-create-options.util.d.ts +10 -0
  451. package/entity/src/lib/utils/lookup-create-options.util.d.ts.map +1 -0
  452. package/entity/src/lib/utils/lookup-create-options.util.js +27 -0
  453. package/entity/src/lib/utils/lookup-create-options.util.js.map +1 -0
  454. package/index.d.ts +3 -0
  455. package/index.d.ts.map +1 -0
  456. package/index.js +4 -0
  457. package/index.js.map +1 -0
  458. package/package.json +21 -0
@@ -0,0 +1,679 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractNestedFieldsWildcard = extractNestedFieldsWildcard;
4
+ exports.setSmart = setSmart;
5
+ exports.getSmart = getSmart;
6
+ exports.extractValue = extractValue;
7
+ exports.cleanDeep = cleanDeep;
8
+ exports.getChangedPaths = getChangedPaths;
9
+ exports.getDetailedChanges = getDetailedChanges;
10
+ exports.getEnumValues = getEnumValues;
11
+ exports.shouldRestoreSavedMultiLanguageShape = shouldRestoreSavedMultiLanguageShape;
12
+ exports.isSelectionValueEqual = isSelectionValueEqual;
13
+ exports.isFormValueEqual = isFormValueEqual;
14
+ exports.isFormContextDirty = isFormContextDirty;
15
+ exports.summarizeFormContextDirtyDiff = summarizeFormContextDirtyDiff;
16
+ exports.captureFormContextBaseline = captureFormContextBaseline;
17
+ const lodash_es_1 = require("lodash-es");
18
+ const locale_map_value_util_1 = require("../multi-language-string/locale-map-value.util");
19
+ function extractNestedFieldsWildcard(obj, basePath, fields) {
20
+ const result = {};
21
+ if (fields.length === 1 && fields[0] === '*') {
22
+ const fullObj = (0, lodash_es_1.get)(obj, basePath);
23
+ return (0, lodash_es_1.isPlainObject)(fullObj) ? fullObj : {};
24
+ }
25
+ for (const field of fields) {
26
+ const fullPath = basePath ? `${basePath}.${field}` : field;
27
+ const value = (0, lodash_es_1.get)(obj, fullPath);
28
+ (0, lodash_es_1.set)(result, field, value);
29
+ }
30
+ return result;
31
+ }
32
+ function setSmart(obj, smartPath, value) {
33
+ var _a, _b;
34
+ const pathParts = smartPath.split('.');
35
+ const lastPart = pathParts[pathParts.length - 1];
36
+ const fieldMatch = lastPart.match(/^\{(.+)\}$/);
37
+ if (!fieldMatch) {
38
+ // Fix: If value is undefined and we're setting a nested property,
39
+ // check if the parent object exists and if setting this would result in
40
+ // all properties being undefined. If so, set the parent to null instead.
41
+ if ((0, lodash_es_1.isNil)(value) && pathParts.length > 1) {
42
+ const parentPath = pathParts.slice(0, -1).join('.');
43
+ const parentObj = (0, lodash_es_1.get)(obj, parentPath);
44
+ // If parent is already null/undefined, don't recreate the object structure
45
+ if ((0, lodash_es_1.isNil)(parentObj)) {
46
+ return obj;
47
+ }
48
+ // Check if parent is a plain object (not array, not null)
49
+ if ((0, lodash_es_1.isPlainObject)(parentObj)) {
50
+ const existingKeys = Object.keys(parentObj);
51
+ // Check if all existing properties are null/undefined using lodash
52
+ const allNil = (0, lodash_es_1.isEmpty)(existingKeys) || existingKeys.every((key) => (0, lodash_es_1.isNil)(parentObj[key]));
53
+ if (allNil) {
54
+ // Set parent to null instead of creating/keeping an object with all undefined properties
55
+ (0, lodash_es_1.set)(obj, parentPath, null);
56
+ return obj;
57
+ }
58
+ }
59
+ }
60
+ (0, lodash_es_1.set)(obj, smartPath, value);
61
+ // After setting, check again if parent should be null using lodash
62
+ if ((0, lodash_es_1.isNil)(value) && pathParts.length > 1) {
63
+ const parentPath = pathParts.slice(0, -1).join('.');
64
+ const parentObj = (0, lodash_es_1.get)(obj, parentPath);
65
+ if ((0, lodash_es_1.isPlainObject)(parentObj)) {
66
+ // Use lodash to check if all properties are null/undefined
67
+ const allNil = Object.keys(parentObj).every((key) => (0, lodash_es_1.isNil)(parentObj[key]));
68
+ if (allNil) {
69
+ (0, lodash_es_1.set)(obj, parentPath, null);
70
+ }
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+ const fields = fieldMatch[1].split(',').map((f) => f.trim());
76
+ const basePath = pathParts.slice(0, -1).join('.');
77
+ const [arrayKey, ...restPath] = basePath.split('.');
78
+ // Make sure the array exists
79
+ if (!obj[arrayKey])
80
+ obj[arrayKey] = [];
81
+ // 🟡 Case A: value is array (normal set)
82
+ if ((0, lodash_es_1.isArray)(value)) {
83
+ for (let i = 0; i < value.length; i++) {
84
+ const item = value[i];
85
+ const targetItem = (_a = obj[arrayKey][i]) !== null && _a !== void 0 ? _a : {};
86
+ const nested = {};
87
+ if (restPath.length > 0) {
88
+ const picked = extractNestedFieldsWildcard(item, restPath.join('.'), fields);
89
+ (0, lodash_es_1.set)(nested, restPath.join('.'), picked);
90
+ }
91
+ else {
92
+ const picked = extractNestedFieldsWildcard(item, '', fields);
93
+ Object.assign(nested, picked);
94
+ }
95
+ obj[arrayKey][i] = (0, lodash_es_1.merge)({}, targetItem, nested);
96
+ }
97
+ }
98
+ // 🟢 Case B: value is a single value → broadcast
99
+ else {
100
+ for (let i = 0; i < obj[arrayKey].length; i++) {
101
+ const targetItem = (_b = obj[arrayKey][i]) !== null && _b !== void 0 ? _b : {};
102
+ const nested = {};
103
+ if (restPath.length > 0) {
104
+ for (const field of fields) {
105
+ (0, lodash_es_1.set)(nested, `${restPath.join('.')}.${field}`, value);
106
+ }
107
+ }
108
+ else {
109
+ for (const field of fields) {
110
+ (0, lodash_es_1.set)(nested, field, value);
111
+ }
112
+ }
113
+ obj[arrayKey][i] = (0, lodash_es_1.merge)({}, targetItem, nested);
114
+ }
115
+ }
116
+ return obj;
117
+ }
118
+ function extractFieldsFromPath(obj, basePath, fields) {
119
+ if (fields.length === 1 && fields[0] === '*') {
120
+ const fullObj = basePath ? (0, lodash_es_1.get)(obj, basePath) : obj;
121
+ return (0, lodash_es_1.isPlainObject)(fullObj) ? fullObj : {};
122
+ }
123
+ const result = {};
124
+ for (const field of fields) {
125
+ const fullPath = basePath ? `${basePath}.${field}` : field;
126
+ const val = (0, lodash_es_1.get)(obj, fullPath);
127
+ if (val !== undefined) {
128
+ result[field] = val;
129
+ }
130
+ }
131
+ return result;
132
+ }
133
+ function getSmart(obj, smartPath) {
134
+ const pathParts = smartPath.split('.');
135
+ const lastPart = pathParts[pathParts.length - 1];
136
+ const fieldMatch = lastPart.match(/^\{(.+)\}$/);
137
+ // Simple get (no fields)
138
+ if (!fieldMatch) {
139
+ return (0, lodash_es_1.get)(obj, smartPath);
140
+ }
141
+ const fields = fieldMatch[1].split(',').map((f) => f.trim());
142
+ const basePath = pathParts.slice(0, -1).join('.');
143
+ const items = (0, lodash_es_1.get)(obj, basePath);
144
+ if (!(0, lodash_es_1.isArray)(items))
145
+ return [];
146
+ const nestedPath = basePath.includes('.') ? basePath.split('.').slice(1).join('.') : '';
147
+ return items.map((item) => {
148
+ return extractFieldsFromPath(item, nestedPath, fields);
149
+ });
150
+ }
151
+ function extractValue(value, key = 'id') {
152
+ if ((0, lodash_es_1.isNil)(value)) {
153
+ return null;
154
+ }
155
+ return (0, lodash_es_1.isObjectLike)(value) ? (0, lodash_es_1.get)(value, key) : value;
156
+ }
157
+ function cleanDeep(obj) {
158
+ return (0, lodash_es_1.transform)(obj, (result, value, key) => {
159
+ if ((0, lodash_es_1.isObjectLike)(value)) {
160
+ const cleaned = cleanDeep(value);
161
+ if (!(0, lodash_es_1.isEmpty)(cleaned)) {
162
+ result[key] = cleaned;
163
+ }
164
+ }
165
+ else if (!(0, lodash_es_1.isNil)(value) && // not null or undefined
166
+ !(typeof value === 'string' && value.trim() === '') && // not empty string
167
+ !(Array.isArray(value) && value.length === 0) // not empty array
168
+ ) {
169
+ result[key] = value;
170
+ }
171
+ });
172
+ }
173
+ function getDeepChanges(obj1, obj2) {
174
+ const changes = [];
175
+ function walk(o1, o2, currentPath = []) {
176
+ // If both values are deeply equal, skip
177
+ if ((0, lodash_es_1.isEqual)(o1, o2))
178
+ return;
179
+ const isObj1Nil = o1 === null || o1 === undefined;
180
+ const isObj2Nil = o2 === null || o2 === undefined;
181
+ // If obj1 is null/undefined and obj2 is not, treat entire obj2 as added
182
+ if (isObj1Nil && !isObj2Nil) {
183
+ if ((0, lodash_es_1.isPlainObject)(o2)) {
184
+ for (const key of Object.keys(o2)) {
185
+ walk(undefined, o2[key], [...currentPath, key]);
186
+ }
187
+ }
188
+ else if (Array.isArray(o2)) {
189
+ changes.push({
190
+ path: currentPath.join('.'),
191
+ oldValue: undefined,
192
+ newValue: o2,
193
+ arrayDiff: {
194
+ added: o2,
195
+ removed: [],
196
+ },
197
+ });
198
+ }
199
+ else {
200
+ changes.push({
201
+ path: currentPath.join('.'),
202
+ oldValue: undefined,
203
+ newValue: o2,
204
+ });
205
+ }
206
+ return;
207
+ }
208
+ // If obj2 is null/undefined and obj1 is not, treat entire obj1 as removed
209
+ if (!isObj1Nil && isObj2Nil) {
210
+ if ((0, lodash_es_1.isPlainObject)(o1)) {
211
+ for (const key of Object.keys(o1)) {
212
+ walk(o1[key], undefined, [...currentPath, key]);
213
+ }
214
+ }
215
+ else if (Array.isArray(o1)) {
216
+ changes.push({
217
+ path: currentPath.join('.'),
218
+ oldValue: o1,
219
+ newValue: undefined,
220
+ arrayDiff: {
221
+ added: [],
222
+ removed: o1,
223
+ },
224
+ });
225
+ }
226
+ else {
227
+ changes.push({
228
+ path: currentPath.join('.'),
229
+ oldValue: o1,
230
+ newValue: undefined,
231
+ });
232
+ }
233
+ return;
234
+ }
235
+ // If both are arrays, compare items
236
+ if (Array.isArray(o1) && Array.isArray(o2)) {
237
+ if (!(0, lodash_es_1.isEqual)(o1, o2)) {
238
+ const added = (0, lodash_es_1.differenceWith)(o2, o1, lodash_es_1.isEqual);
239
+ const removed = (0, lodash_es_1.differenceWith)(o1, o2, lodash_es_1.isEqual);
240
+ changes.push({
241
+ path: currentPath.join('.'),
242
+ oldValue: o1,
243
+ newValue: o2,
244
+ arrayDiff: {
245
+ added,
246
+ removed,
247
+ },
248
+ });
249
+ }
250
+ return;
251
+ }
252
+ // If both are plain objects, walk each key
253
+ if ((0, lodash_es_1.isPlainObject)(o1) && (0, lodash_es_1.isPlainObject)(o2)) {
254
+ const allKeys = (0, lodash_es_1.union)(Object.keys(o1), Object.keys(o2));
255
+ for (const key of allKeys) {
256
+ walk(o1[key], o2[key], [...currentPath, key]);
257
+ }
258
+ return;
259
+ }
260
+ // Primitive values or mismatched types
261
+ changes.push({
262
+ path: currentPath.join('.'),
263
+ oldValue: o1,
264
+ newValue: o2,
265
+ });
266
+ }
267
+ walk(obj1, obj2);
268
+ return changes;
269
+ }
270
+ // Method 1: Returns only changed paths
271
+ function getChangedPaths(obj1, obj2) {
272
+ return getDeepChanges(obj1, obj2).map((change) => change.path);
273
+ }
274
+ // Method 2: Returns full change entries
275
+ function getDetailedChanges(obj1, obj2) {
276
+ return getDeepChanges(obj1, obj2);
277
+ }
278
+ function getEnumValues(enumType) {
279
+ return Object.entries(enumType).map(([key, value]) => ({ id: value, title: key }));
280
+ }
281
+ //#region ---- Form value equality (dirty / baseline) ----
282
+ /** Whether a value uses the multi-language text widget shape (string or locale map). */
283
+ function isMultiLanguageFormShape(value) {
284
+ if (value === null || value === undefined) {
285
+ return true;
286
+ }
287
+ if (typeof value === 'string') {
288
+ return true;
289
+ }
290
+ return (0, locale_map_value_util_1.isLocaleStringMap)(value);
291
+ }
292
+ /** Drops empty/whitespace locale entries from a multi-language map. */
293
+ function normalizeLocaleStringMap(value) {
294
+ const normalized = {};
295
+ for (const [key, entry] of Object.entries(value)) {
296
+ if (typeof entry !== 'string') {
297
+ continue;
298
+ }
299
+ const trimmed = entry.trim();
300
+ if (trimmed !== '') {
301
+ normalized[key] = trimmed;
302
+ }
303
+ }
304
+ return Object.keys(normalized).length === 0 ? null : normalized;
305
+ }
306
+ function compareMultiLanguageLocaleStrings(a, b) {
307
+ const htmlEqual = compareHtmlFormValues(a, b);
308
+ if (htmlEqual !== null) {
309
+ return htmlEqual;
310
+ }
311
+ return a === b;
312
+ }
313
+ /**
314
+ * Compares multi-language field values (plain string vs locale map) for dirty/baseline checks.
315
+ * Returns `null` when either side is not a multi-language shape (caller uses generic normalization).
316
+ */
317
+ function compareMultiLanguageFormValues(a, b) {
318
+ if (!isMultiLanguageFormShape(a) || !isMultiLanguageFormShape(b)) {
319
+ return null;
320
+ }
321
+ const normalizeScalar = (value) => {
322
+ if (value === null || value === undefined) {
323
+ return null;
324
+ }
325
+ if (typeof value === 'string') {
326
+ const trimmed = value.trim();
327
+ return trimmed === '' ? null : trimmed;
328
+ }
329
+ if ((0, locale_map_value_util_1.isLocaleStringMap)(value)) {
330
+ return normalizeLocaleStringMap(value);
331
+ }
332
+ return null;
333
+ };
334
+ const left = normalizeScalar(a);
335
+ const right = normalizeScalar(b);
336
+ if (left === null && right === null) {
337
+ return true;
338
+ }
339
+ if (left === null || right === null) {
340
+ return false;
341
+ }
342
+ if (typeof left === 'string' && typeof right === 'string') {
343
+ return compareMultiLanguageLocaleStrings(left, right);
344
+ }
345
+ if (typeof left === 'string' && typeof right === 'object') {
346
+ return Object.values(right).some((text) => typeof text === 'string' && compareMultiLanguageLocaleStrings(left, text));
347
+ }
348
+ if (typeof right === 'string' && typeof left === 'object') {
349
+ return Object.values(left).some((text) => typeof text === 'string' && compareMultiLanguageLocaleStrings(right, text));
350
+ }
351
+ if (typeof left !== 'object' || typeof right !== 'object') {
352
+ return false;
353
+ }
354
+ const leftMap = left;
355
+ const rightMap = right;
356
+ const leftKeys = Object.keys(leftMap).sort();
357
+ const rightKeys = Object.keys(rightMap).sort();
358
+ if (leftKeys.length !== rightKeys.length) {
359
+ return false;
360
+ }
361
+ return leftKeys.every((key) => compareMultiLanguageLocaleStrings(leftMap[key], rightMap[key]));
362
+ }
363
+ /**
364
+ * Lookup/select expose may write a resolved MLS string while the baseline keeps the locale map.
365
+ * Restore baseline shape when the string matches any locale entry.
366
+ */
367
+ function shouldRestoreSavedMultiLanguageShape(value, savedAtPath) {
368
+ if (typeof value !== 'string' || !(0, locale_map_value_util_1.isLocaleStringMap)(savedAtPath)) {
369
+ return false;
370
+ }
371
+ const trimmed = value.trim();
372
+ if (trimmed === '') {
373
+ return false;
374
+ }
375
+ return Object.values(savedAtPath).some((entry) => typeof entry === 'string' && entry.trim() === trimmed);
376
+ }
377
+ /** Decode common HTML entities for rich-text baseline compare. */
378
+ function decodeHtmlEntities(value) {
379
+ return value
380
+ .replace(/&#x([0-9a-f]+);/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)))
381
+ .replace(/&#(\d+);/g, (_, dec) => String.fromCharCode(parseInt(dec, 10)))
382
+ .replace(/&amp;/g, '&')
383
+ .replace(/&lt;/g, '<')
384
+ .replace(/&gt;/g, '>')
385
+ .replace(/&quot;/g, '"');
386
+ }
387
+ function looksLikeHtmlFormValue(value) {
388
+ return /<[a-z][\s\S]*>/i.test(value.trim());
389
+ }
390
+ /** Normalizes rich-text HTML for semantic dirty/baseline compare (e.g. Quill `p`/`br` drift). */
391
+ function normalizeRichTextHtmlForCompare(value) {
392
+ var _a;
393
+ const html = decodeHtmlEntities(value.trim());
394
+ if (typeof document === 'undefined') {
395
+ return html.replace(/\s+/g, ' ').trim();
396
+ }
397
+ const doc = new DOMParser().parseFromString(html, 'text/html');
398
+ return ((_a = doc.body.textContent) !== null && _a !== void 0 ? _a : '').replace(/\s+/g, ' ').trim();
399
+ }
400
+ /**
401
+ * Compares rich-text HTML strings by visible text (ignores `p` vs `br` structure drift).
402
+ * Returns `null` when either side is not HTML markup.
403
+ */
404
+ function compareHtmlFormValues(a, b) {
405
+ if (typeof a !== 'string' || typeof b !== 'string') {
406
+ return null;
407
+ }
408
+ if (!looksLikeHtmlFormValue(a) || !looksLikeHtmlFormValue(b)) {
409
+ return null;
410
+ }
411
+ return normalizeRichTextHtmlForCompare(a) === normalizeRichTextHtmlForCompare(b);
412
+ }
413
+ /** Lookup/select filter-mode payload: `{ value, displayText?, operation }`. */
414
+ function isFilterFormShape(value) {
415
+ if (!(0, lodash_es_1.isPlainObject)(value)) {
416
+ return false;
417
+ }
418
+ const record = value;
419
+ return 'value' in record && 'operation' in record;
420
+ }
421
+ /**
422
+ * Compares filter-mode widget values by selection identity; ignores derived `displayText`.
423
+ */
424
+ function compareFilterFormValues(a, b) {
425
+ if (!isFilterFormShape(a) || !isFilterFormShape(b)) {
426
+ return null;
427
+ }
428
+ const left = a;
429
+ const right = b;
430
+ if (!isFormValueEqual(left['value'], right['value'])) {
431
+ return false;
432
+ }
433
+ const opLeft = (0, lodash_es_1.get)(left, 'operation.type');
434
+ const opRight = (0, lodash_es_1.get)(right, 'operation.type');
435
+ if (opLeft !== undefined || opRight !== undefined) {
436
+ return opLeft === opRight;
437
+ }
438
+ return true;
439
+ }
440
+ function isReferenceScalar(value) {
441
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
442
+ }
443
+ /** Scalar id or `{ id }` identity used by lookup/select widgets. */
444
+ function getReferenceId(value) {
445
+ if ((0, lodash_es_1.isNil)(value)) {
446
+ return undefined;
447
+ }
448
+ if (isReferenceScalar(value)) {
449
+ return value;
450
+ }
451
+ if ((0, lodash_es_1.isPlainObject)(value)) {
452
+ const id = (0, lodash_es_1.get)(value, 'id');
453
+ if (!(0, lodash_es_1.isNil)(id)) {
454
+ return id;
455
+ }
456
+ }
457
+ return undefined;
458
+ }
459
+ /**
460
+ * Compares scalar selection ids to full lookup/select items (`5` vs `{ id: 5, ... }`).
461
+ * Does not apply when both sides are objects — those use structural compare so field edits stay dirty.
462
+ */
463
+ function compareReferenceFormValues(a, b) {
464
+ const refA = getReferenceId(a);
465
+ const refB = getReferenceId(b);
466
+ if (refA === undefined || refB === undefined) {
467
+ return null;
468
+ }
469
+ const aIsScalar = isReferenceScalar(a);
470
+ const bIsScalar = isReferenceScalar(b);
471
+ if (!aIsScalar && !bIsScalar) {
472
+ return null;
473
+ }
474
+ return (0, lodash_es_1.isEqual)(normalizeFormValue(refA), normalizeFormValue(refB));
475
+ }
476
+ /**
477
+ * Semantic equality for lookup/select values when restoring saved baseline shape.
478
+ * Compares by selection identity (id), including two full items with the same id.
479
+ */
480
+ function isSelectionValueEqual(a, b) {
481
+ const filterEqual = compareFilterFormValues(a, b);
482
+ if (filterEqual !== null) {
483
+ return filterEqual;
484
+ }
485
+ const refA = getReferenceId(a);
486
+ const refB = getReferenceId(b);
487
+ if (refA !== undefined && refB !== undefined) {
488
+ return (0, lodash_es_1.isEqual)(normalizeFormValue(refA), normalizeFormValue(refB));
489
+ }
490
+ return isFormValueEqual(a, b);
491
+ }
492
+ /**
493
+ * Stable sort key for order-insensitive array comparison (after normalization).
494
+ */
495
+ function formValueSortKey(value) {
496
+ if (value === null) {
497
+ return '\0';
498
+ }
499
+ if (typeof value === 'number') {
500
+ return `n:${value}`;
501
+ }
502
+ if (typeof value === 'boolean') {
503
+ return `b:${value}`;
504
+ }
505
+ if (typeof value === 'string') {
506
+ return `s:${value}`;
507
+ }
508
+ try {
509
+ return `j:${JSON.stringify(value)}`;
510
+ }
511
+ catch (_a) {
512
+ return `u:${String(value)}`;
513
+ }
514
+ }
515
+ /**
516
+ * Sorts normalized array items so order does not affect dirty checks.
517
+ */
518
+ function sortNormalizedArrayItems(items) {
519
+ return [...items].sort((a, b) => formValueSortKey(a).localeCompare(formValueSortKey(b)));
520
+ }
521
+ /**
522
+ * Normalizes a form/context value for semantic baseline comparison.
523
+ *
524
+ * Rules:
525
+ * - `null`, `undefined`, whitespace-only strings, and empty arrays → `null` (empty)
526
+ * - Numeric strings → numbers (`"5"` and `5` match)
527
+ * - Arrays → elements normalized; empty/all-empty → `null`; otherwise sorted (order ignored)
528
+ * - Plain objects → keys sorted; `null`/empty nested values omitted
529
+ * - `Date` → epoch milliseconds
530
+ */
531
+ function normalizeFormValue(value) {
532
+ if (value === undefined || value === null) {
533
+ return null;
534
+ }
535
+ if (typeof value === 'string') {
536
+ const trimmed = value.trim();
537
+ if (trimmed === '') {
538
+ return null;
539
+ }
540
+ if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
541
+ const num = Number(trimmed);
542
+ if (!Number.isNaN(num)) {
543
+ return num;
544
+ }
545
+ }
546
+ return trimmed;
547
+ }
548
+ if (typeof value === 'number') {
549
+ return Number.isNaN(value) ? null : value;
550
+ }
551
+ if (typeof value === 'boolean') {
552
+ return value;
553
+ }
554
+ if (value instanceof Date) {
555
+ return value.getTime();
556
+ }
557
+ if ((0, lodash_es_1.isArray)(value)) {
558
+ const normalizedItems = value
559
+ .map((item) => normalizeFormValue(item))
560
+ .filter((item) => item !== null);
561
+ if (normalizedItems.length === 0) {
562
+ return null;
563
+ }
564
+ return sortNormalizedArrayItems(normalizedItems);
565
+ }
566
+ if ((0, lodash_es_1.isPlainObject)(value)) {
567
+ const record = value;
568
+ if ((0, locale_map_value_util_1.isLocaleStringMap)(record)) {
569
+ return normalizeLocaleStringMap(record);
570
+ }
571
+ const normalized = {};
572
+ for (const key of Object.keys(record).sort()) {
573
+ const next = normalizeFormValue(record[key]);
574
+ if (next !== null) {
575
+ normalized[key] = next;
576
+ }
577
+ }
578
+ return normalized;
579
+ }
580
+ return value;
581
+ }
582
+ /**
583
+ * Semantic equality for dirty-state and baseline checks.
584
+ * Prefer over lodash `isEqual` when comparing user-edited form/context data to a saved baseline.
585
+ *
586
+ * Arrays: `[]`, `null`, and all-empty lists are equivalent; non-empty arrays compare as multisets (order ignored).
587
+ */
588
+ function isFormValueEqual(a, b) {
589
+ const multiLanguageEqual = compareMultiLanguageFormValues(a, b);
590
+ if (multiLanguageEqual !== null) {
591
+ return multiLanguageEqual;
592
+ }
593
+ const filterEqual = compareFilterFormValues(a, b);
594
+ if (filterEqual !== null) {
595
+ return filterEqual;
596
+ }
597
+ const referenceEqual = compareReferenceFormValues(a, b);
598
+ if (referenceEqual !== null) {
599
+ return referenceEqual;
600
+ }
601
+ if ((0, lodash_es_1.isArray)(a) && (0, lodash_es_1.isArray)(b)) {
602
+ // Empty repeater rows normalize away; raw length must differ before multiset compare.
603
+ if (a.length !== b.length) {
604
+ return false;
605
+ }
606
+ return (0, lodash_es_1.isEqual)(normalizeFormValue(a), normalizeFormValue(b));
607
+ }
608
+ if ((0, lodash_es_1.isPlainObject)(a) && (0, lodash_es_1.isPlainObject)(b)) {
609
+ const left = a;
610
+ const right = b;
611
+ const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
612
+ for (const key of keys) {
613
+ if (!isFormValueEqual(left[key], right[key])) {
614
+ return false;
615
+ }
616
+ }
617
+ return true;
618
+ }
619
+ if (typeof a === 'string' && typeof b === 'string') {
620
+ const htmlEqual = compareHtmlFormValues(a, b);
621
+ if (htmlEqual !== null) {
622
+ return htmlEqual;
623
+ }
624
+ }
625
+ return (0, lodash_es_1.isEqual)(normalizeFormValue(a), normalizeFormValue(b));
626
+ }
627
+ /**
628
+ * Returns whether `current` differs from the saved/clean `baseline` snapshot.
629
+ */
630
+ function isFormContextDirty(current, baseline) {
631
+ return !isFormValueEqual(current, baseline);
632
+ }
633
+ /**
634
+ * Lists paths where live context differs from baseline (for dirty-state trace logs).
635
+ */
636
+ function summarizeFormContextDirtyDiff(current, baseline, maxEntries = 12) {
637
+ const diffs = [];
638
+ const walk = (path, currentValue, baselineValue) => {
639
+ if (diffs.length >= maxEntries) {
640
+ return;
641
+ }
642
+ if (isFormValueEqual(currentValue, baselineValue)) {
643
+ return;
644
+ }
645
+ const bothPlainObjects = (0, lodash_es_1.isPlainObject)(currentValue) &&
646
+ (0, lodash_es_1.isPlainObject)(baselineValue) &&
647
+ !(0, lodash_es_1.isArray)(currentValue) &&
648
+ !(0, lodash_es_1.isArray)(baselineValue);
649
+ if (bothPlainObjects) {
650
+ const left = currentValue;
651
+ const right = baselineValue;
652
+ const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
653
+ for (const key of keys) {
654
+ if (diffs.length >= maxEntries) {
655
+ return;
656
+ }
657
+ const nextPath = path ? `${path}.${key}` : key;
658
+ walk(nextPath, left[key], right[key]);
659
+ }
660
+ return;
661
+ }
662
+ diffs.push({
663
+ path: path || '(root)',
664
+ current: currentValue,
665
+ baseline: baselineValue,
666
+ selectionEqual: isSelectionValueEqual(currentValue, baselineValue),
667
+ });
668
+ };
669
+ walk('', current, baseline);
670
+ return diffs;
671
+ }
672
+ /**
673
+ * Clones a context object for use as a dirty-tracking baseline.
674
+ */
675
+ function captureFormContextBaseline(context) {
676
+ return (0, lodash_es_1.cloneDeep)(context);
677
+ }
678
+ //#endregion
679
+ //# sourceMappingURL=object-util.js.map