gt-react 3.1.48 → 3.1.49

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 (268) hide show
  1. package/dist/cjs/client/ClientProvider.js +1 -1
  2. package/dist/cjs/client/ClientProvider.js.map +1 -1
  3. package/dist/cjs/client/client-only/GTClientProvider.js +2 -2
  4. package/dist/cjs/client/client-only/GTClientProvider.js.map +1 -1
  5. package/dist/cjs/client/helpers/handleRender.d.ts +1 -1
  6. package/dist/cjs/client/helpers/handleRender.d.ts.map +1 -1
  7. package/dist/cjs/client/helpers/renderClientChildren.d.ts +13 -7
  8. package/dist/cjs/client/helpers/renderClientChildren.d.ts.map +1 -1
  9. package/dist/cjs/client/helpers/renderClientChildren.js +85 -42
  10. package/dist/cjs/client/helpers/renderClientChildren.js.map +1 -1
  11. package/dist/cjs/client/plural/ClientPlural.d.ts +1 -1
  12. package/dist/cjs/client/plural/ClientPlural.d.ts.map +1 -1
  13. package/dist/cjs/client/plural/ClientPlural.js +2 -2
  14. package/dist/cjs/client/plural/ClientPlural.js.map +1 -1
  15. package/dist/cjs/client/value/ClientValue.js +1 -1
  16. package/dist/cjs/client/value/ClientValue.js.map +1 -1
  17. package/dist/cjs/client/value/RenderClientVariable.js +1 -1
  18. package/dist/cjs/client/value/RenderClientVariable.js.map +1 -1
  19. package/dist/cjs/config/RemoteDictionaryManager.js +1 -1
  20. package/dist/cjs/config/RemoteDictionaryManager.js.map +1 -1
  21. package/dist/cjs/config/types/SourceTargetTypes.d.ts +17 -0
  22. package/dist/cjs/config/types/SourceTargetTypes.d.ts.map +1 -0
  23. package/dist/cjs/config/types/SourceTargetTypes.js +3 -0
  24. package/dist/cjs/config/types/SourceTargetTypes.js.map +1 -0
  25. package/dist/cjs/dictionary/cloneDictionary.js +1 -1
  26. package/dist/cjs/dictionary/cloneDictionary.js.map +1 -1
  27. package/dist/cjs/dictionary/createDictFunction.js +2 -2
  28. package/dist/cjs/dictionary/createDictFunction.js.map +1 -1
  29. package/dist/cjs/dictionary/createTFunction.js +2 -2
  30. package/dist/cjs/dictionary/createTFunction.js.map +1 -1
  31. package/dist/cjs/index/addGTIdentifier.d.ts +2 -2
  32. package/dist/cjs/index/addGTIdentifier.d.ts.map +1 -1
  33. package/dist/cjs/index/writeChildrenAsObjects.js +1 -1
  34. package/dist/cjs/index/writeChildrenAsObjects.js.map +1 -1
  35. package/dist/cjs/primitives/dictionary/getDictionaryReference.d.ts.map +1 -0
  36. package/dist/cjs/primitives/dictionary/getDictionaryReference.js.map +1 -0
  37. package/dist/cjs/primitives/rendering/getEntryMetadata.d.ts.map +1 -0
  38. package/dist/cjs/primitives/rendering/getEntryMetadata.js.map +1 -0
  39. package/dist/cjs/primitives/rendering/getEntryTranslationType.d.ts.map +1 -0
  40. package/dist/{mjs/primitives → cjs/primitives/rendering}/getEntryTranslationType.js.map +1 -1
  41. package/dist/cjs/primitives/rendering/getRenderAttributes.d.ts.map +1 -0
  42. package/dist/cjs/primitives/rendering/getRenderAttributes.js.map +1 -0
  43. package/dist/cjs/primitives/rendering/isValidReactNode.d.ts.map +1 -0
  44. package/dist/cjs/primitives/rendering/isValidReactNode.js.map +1 -0
  45. package/dist/cjs/primitives/variables/createValues.d.ts.map +1 -0
  46. package/dist/cjs/primitives/variables/createValues.js.map +1 -0
  47. package/dist/cjs/primitives/variables/defaultVariableNames.d.ts.map +1 -0
  48. package/dist/cjs/primitives/variables/defaultVariableNames.js.map +1 -0
  49. package/dist/cjs/primitives/variables/getPluralBranch.d.ts.map +1 -0
  50. package/dist/cjs/primitives/variables/getPluralBranch.js.map +1 -0
  51. package/dist/cjs/primitives/variables/isTargetVariable.d.ts +3 -0
  52. package/dist/cjs/primitives/variables/isTargetVariable.d.ts.map +1 -0
  53. package/dist/cjs/primitives/variables/isTargetVariable.js +12 -0
  54. package/dist/cjs/primitives/variables/isTargetVariable.js.map +1 -0
  55. package/dist/cjs/server/inline/T.js +1 -1
  56. package/dist/cjs/server/inline/T.js.map +1 -1
  57. package/dist/cjs/server/inline/renderChildren.d.ts +1 -6
  58. package/dist/cjs/server/inline/renderChildren.d.ts.map +1 -1
  59. package/dist/cjs/server/inline/renderChildren.js +95 -35
  60. package/dist/cjs/server/inline/renderChildren.js.map +1 -1
  61. package/dist/cjs/server/plural/InnerPlural.d.ts +1 -1
  62. package/dist/cjs/server/plural/InnerPlural.d.ts.map +1 -1
  63. package/dist/cjs/server/plural/InnerPlural.js +2 -2
  64. package/dist/cjs/server/plural/InnerPlural.js.map +1 -1
  65. package/dist/cjs/server/provider/GTProvider.js +2 -2
  66. package/dist/cjs/server/provider/GTProvider.js.map +1 -1
  67. package/dist/cjs/server/value/InnerValue.js +1 -1
  68. package/dist/cjs/server/value/InnerValue.js.map +1 -1
  69. package/dist/cjs/server/value/renderVariable.js +2 -2
  70. package/dist/cjs/server/value/renderVariable.js.map +1 -1
  71. package/dist/mjs/client/ClientProvider.js +1 -1
  72. package/dist/mjs/client/ClientProvider.js.map +1 -1
  73. package/dist/mjs/client/client-only/GTClientProvider.js +2 -2
  74. package/dist/mjs/client/client-only/GTClientProvider.js.map +1 -1
  75. package/dist/mjs/client/helpers/handleRender.d.ts +1 -1
  76. package/dist/mjs/client/helpers/handleRender.d.ts.map +1 -1
  77. package/dist/mjs/client/helpers/renderClientChildren.d.ts +13 -7
  78. package/dist/mjs/client/helpers/renderClientChildren.d.ts.map +1 -1
  79. package/dist/mjs/client/helpers/renderClientChildren.js +85 -42
  80. package/dist/mjs/client/helpers/renderClientChildren.js.map +1 -1
  81. package/dist/mjs/client/plural/ClientPlural.d.ts +1 -1
  82. package/dist/mjs/client/plural/ClientPlural.d.ts.map +1 -1
  83. package/dist/mjs/client/plural/ClientPlural.js +2 -2
  84. package/dist/mjs/client/plural/ClientPlural.js.map +1 -1
  85. package/dist/mjs/client/value/ClientValue.js +1 -1
  86. package/dist/mjs/client/value/ClientValue.js.map +1 -1
  87. package/dist/mjs/client/value/RenderClientVariable.js +1 -1
  88. package/dist/mjs/client/value/RenderClientVariable.js.map +1 -1
  89. package/dist/mjs/config/RemoteDictionaryManager.js +1 -1
  90. package/dist/mjs/config/RemoteDictionaryManager.js.map +1 -1
  91. package/dist/mjs/config/types/SourceTargetTypes.d.ts +17 -0
  92. package/dist/mjs/config/types/SourceTargetTypes.d.ts.map +1 -0
  93. package/dist/mjs/config/types/SourceTargetTypes.js +2 -0
  94. package/dist/mjs/config/types/SourceTargetTypes.js.map +1 -0
  95. package/dist/mjs/dictionary/cloneDictionary.js +1 -1
  96. package/dist/mjs/dictionary/cloneDictionary.js.map +1 -1
  97. package/dist/mjs/dictionary/createDictFunction.js +2 -2
  98. package/dist/mjs/dictionary/createDictFunction.js.map +1 -1
  99. package/dist/mjs/dictionary/createTFunction.js +2 -2
  100. package/dist/mjs/dictionary/createTFunction.js.map +1 -1
  101. package/dist/mjs/index/addGTIdentifier.d.ts +2 -2
  102. package/dist/mjs/index/addGTIdentifier.d.ts.map +1 -1
  103. package/dist/mjs/index/writeChildrenAsObjects.js +1 -1
  104. package/dist/mjs/index/writeChildrenAsObjects.js.map +1 -1
  105. package/dist/mjs/primitives/dictionary/getDictionaryReference.d.ts.map +1 -0
  106. package/dist/mjs/primitives/dictionary/getDictionaryReference.js.map +1 -0
  107. package/dist/mjs/primitives/rendering/getEntryMetadata.d.ts.map +1 -0
  108. package/dist/mjs/primitives/rendering/getEntryMetadata.js.map +1 -0
  109. package/dist/mjs/primitives/rendering/getEntryTranslationType.d.ts.map +1 -0
  110. package/dist/mjs/primitives/rendering/getEntryTranslationType.js.map +1 -0
  111. package/dist/mjs/primitives/rendering/getRenderAttributes.d.ts.map +1 -0
  112. package/dist/mjs/primitives/rendering/getRenderAttributes.js.map +1 -0
  113. package/dist/mjs/primitives/rendering/isValidReactNode.d.ts.map +1 -0
  114. package/dist/mjs/primitives/rendering/isValidReactNode.js.map +1 -0
  115. package/dist/mjs/primitives/variables/createValues.d.ts.map +1 -0
  116. package/dist/mjs/primitives/variables/createValues.js.map +1 -0
  117. package/dist/mjs/primitives/variables/defaultVariableNames.d.ts.map +1 -0
  118. package/dist/mjs/primitives/variables/defaultVariableNames.js.map +1 -0
  119. package/dist/mjs/primitives/variables/getPluralBranch.d.ts.map +1 -0
  120. package/dist/mjs/primitives/variables/getPluralBranch.js.map +1 -0
  121. package/dist/mjs/primitives/variables/isTargetVariable.d.ts +3 -0
  122. package/dist/mjs/primitives/variables/isTargetVariable.d.ts.map +1 -0
  123. package/dist/mjs/primitives/variables/isTargetVariable.js +9 -0
  124. package/dist/mjs/primitives/variables/isTargetVariable.js.map +1 -0
  125. package/dist/mjs/server/inline/T.js +1 -1
  126. package/dist/mjs/server/inline/T.js.map +1 -1
  127. package/dist/mjs/server/inline/renderChildren.d.ts +1 -6
  128. package/dist/mjs/server/inline/renderChildren.d.ts.map +1 -1
  129. package/dist/mjs/server/inline/renderChildren.js +72 -35
  130. package/dist/mjs/server/inline/renderChildren.js.map +1 -1
  131. package/dist/mjs/server/plural/InnerPlural.d.ts +1 -1
  132. package/dist/mjs/server/plural/InnerPlural.d.ts.map +1 -1
  133. package/dist/mjs/server/plural/InnerPlural.js +2 -2
  134. package/dist/mjs/server/plural/InnerPlural.js.map +1 -1
  135. package/dist/mjs/server/provider/GTProvider.js +2 -2
  136. package/dist/mjs/server/provider/GTProvider.js.map +1 -1
  137. package/dist/mjs/server/value/InnerValue.js +1 -1
  138. package/dist/mjs/server/value/InnerValue.js.map +1 -1
  139. package/dist/mjs/server/value/renderVariable.js +2 -2
  140. package/dist/mjs/server/value/renderVariable.js.map +1 -1
  141. package/package.json +1 -1
  142. package/dist/cjs/client/client-only/helpers/ClientResolver.d.ts +0 -7
  143. package/dist/cjs/client/client-only/helpers/ClientResolver.d.ts.map +0 -1
  144. package/dist/cjs/client/client-only/helpers/ClientResolver.js +0 -63
  145. package/dist/cjs/client/client-only/helpers/ClientResolver.js.map +0 -1
  146. package/dist/cjs/client/client-only/helpers/renderClientChildren.d.ts +0 -13
  147. package/dist/cjs/client/client-only/helpers/renderClientChildren.d.ts.map +0 -1
  148. package/dist/cjs/client/client-only/helpers/renderClientChildren.js +0 -132
  149. package/dist/cjs/client/client-only/helpers/renderClientChildren.js.map +0 -1
  150. package/dist/cjs/client/client-only/helpers/renderClientDictionary.d.ts +0 -2
  151. package/dist/cjs/client/client-only/helpers/renderClientDictionary.d.ts.map +0 -1
  152. package/dist/cjs/client/client-only/helpers/renderClientDictionary.js +0 -28
  153. package/dist/cjs/client/client-only/helpers/renderClientDictionary.js.map +0 -1
  154. package/dist/cjs/client/client-only/helpers/renderDictionary.d.ts +0 -14
  155. package/dist/cjs/client/client-only/helpers/renderDictionary.d.ts.map +0 -1
  156. package/dist/cjs/client/client-only/helpers/renderDictionary.js +0 -190
  157. package/dist/cjs/client/client-only/helpers/renderDictionary.js.map +0 -1
  158. package/dist/cjs/client/client-only/helpers/renderPromiseDictionary.d.ts +0 -2
  159. package/dist/cjs/client/client-only/helpers/renderPromiseDictionary.d.ts.map +0 -1
  160. package/dist/cjs/client/client-only/helpers/renderPromiseDictionary.js +0 -44
  161. package/dist/cjs/client/client-only/helpers/renderPromiseDictionary.js.map +0 -1
  162. package/dist/cjs/client/helpers/ar.d.ts +0 -2
  163. package/dist/cjs/client/helpers/ar.d.ts.map +0 -1
  164. package/dist/cjs/client/helpers/ar.js +0 -28
  165. package/dist/cjs/client/helpers/ar.js.map +0 -1
  166. package/dist/cjs/primitives/createValues.d.ts.map +0 -1
  167. package/dist/cjs/primitives/createValues.js.map +0 -1
  168. package/dist/cjs/primitives/defaultVariableNames.d.ts.map +0 -1
  169. package/dist/cjs/primitives/defaultVariableNames.js.map +0 -1
  170. package/dist/cjs/primitives/getDictionaryReference.d.ts.map +0 -1
  171. package/dist/cjs/primitives/getDictionaryReference.js.map +0 -1
  172. package/dist/cjs/primitives/getEntryMetadata.d.ts.map +0 -1
  173. package/dist/cjs/primitives/getEntryMetadata.js.map +0 -1
  174. package/dist/cjs/primitives/getEntryTranslationType.d.ts.map +0 -1
  175. package/dist/cjs/primitives/getEntryTranslationType.js.map +0 -1
  176. package/dist/cjs/primitives/getPluralBranch.d.ts.map +0 -1
  177. package/dist/cjs/primitives/getPluralBranch.js.map +0 -1
  178. package/dist/cjs/primitives/getRenderAttributes.d.ts.map +0 -1
  179. package/dist/cjs/primitives/getRenderAttributes.js.map +0 -1
  180. package/dist/cjs/primitives/getValueBranch.d.ts +0 -9
  181. package/dist/cjs/primitives/getValueBranch.d.ts.map +0 -1
  182. package/dist/cjs/primitives/getValueBranch.js +0 -67
  183. package/dist/cjs/primitives/getValueBranch.js.map +0 -1
  184. package/dist/cjs/primitives/hasTransformation.d.ts +0 -3
  185. package/dist/cjs/primitives/hasTransformation.d.ts.map +0 -1
  186. package/dist/cjs/primitives/hasTransformation.js +0 -16
  187. package/dist/cjs/primitives/hasTransformation.js.map +0 -1
  188. package/dist/cjs/primitives/isValidReactNode.d.ts.map +0 -1
  189. package/dist/cjs/primitives/isValidReactNode.js.map +0 -1
  190. package/dist/mjs/client/client-only/helpers/ClientResolver.d.ts +0 -7
  191. package/dist/mjs/client/client-only/helpers/ClientResolver.d.ts.map +0 -1
  192. package/dist/mjs/client/client-only/helpers/ClientResolver.js +0 -57
  193. package/dist/mjs/client/client-only/helpers/ClientResolver.js.map +0 -1
  194. package/dist/mjs/client/client-only/helpers/renderClientChildren.d.ts +0 -13
  195. package/dist/mjs/client/client-only/helpers/renderClientChildren.d.ts.map +0 -1
  196. package/dist/mjs/client/client-only/helpers/renderClientChildren.js +0 -126
  197. package/dist/mjs/client/client-only/helpers/renderClientChildren.js.map +0 -1
  198. package/dist/mjs/client/client-only/helpers/renderClientDictionary.d.ts +0 -2
  199. package/dist/mjs/client/client-only/helpers/renderClientDictionary.d.ts.map +0 -1
  200. package/dist/mjs/client/client-only/helpers/renderClientDictionary.js +0 -22
  201. package/dist/mjs/client/client-only/helpers/renderClientDictionary.js.map +0 -1
  202. package/dist/mjs/client/client-only/helpers/renderDictionary.d.ts +0 -14
  203. package/dist/mjs/client/client-only/helpers/renderDictionary.d.ts.map +0 -1
  204. package/dist/mjs/client/client-only/helpers/renderDictionary.js +0 -160
  205. package/dist/mjs/client/client-only/helpers/renderDictionary.js.map +0 -1
  206. package/dist/mjs/client/client-only/helpers/renderPromiseDictionary.d.ts +0 -2
  207. package/dist/mjs/client/client-only/helpers/renderPromiseDictionary.d.ts.map +0 -1
  208. package/dist/mjs/client/client-only/helpers/renderPromiseDictionary.js +0 -38
  209. package/dist/mjs/client/client-only/helpers/renderPromiseDictionary.js.map +0 -1
  210. package/dist/mjs/client/helpers/ar.d.ts +0 -2
  211. package/dist/mjs/client/helpers/ar.d.ts.map +0 -1
  212. package/dist/mjs/client/helpers/ar.js +0 -22
  213. package/dist/mjs/client/helpers/ar.js.map +0 -1
  214. package/dist/mjs/primitives/createValues.d.ts.map +0 -1
  215. package/dist/mjs/primitives/createValues.js.map +0 -1
  216. package/dist/mjs/primitives/defaultVariableNames.d.ts.map +0 -1
  217. package/dist/mjs/primitives/defaultVariableNames.js.map +0 -1
  218. package/dist/mjs/primitives/getDictionaryReference.d.ts.map +0 -1
  219. package/dist/mjs/primitives/getDictionaryReference.js.map +0 -1
  220. package/dist/mjs/primitives/getEntryMetadata.d.ts.map +0 -1
  221. package/dist/mjs/primitives/getEntryMetadata.js.map +0 -1
  222. package/dist/mjs/primitives/getEntryTranslationType.d.ts.map +0 -1
  223. package/dist/mjs/primitives/getPluralBranch.d.ts.map +0 -1
  224. package/dist/mjs/primitives/getPluralBranch.js.map +0 -1
  225. package/dist/mjs/primitives/getRenderAttributes.d.ts.map +0 -1
  226. package/dist/mjs/primitives/getRenderAttributes.js.map +0 -1
  227. package/dist/mjs/primitives/getValueBranch.d.ts +0 -9
  228. package/dist/mjs/primitives/getValueBranch.d.ts.map +0 -1
  229. package/dist/mjs/primitives/getValueBranch.js +0 -61
  230. package/dist/mjs/primitives/getValueBranch.js.map +0 -1
  231. package/dist/mjs/primitives/hasTransformation.d.ts +0 -3
  232. package/dist/mjs/primitives/hasTransformation.d.ts.map +0 -1
  233. package/dist/mjs/primitives/hasTransformation.js +0 -10
  234. package/dist/mjs/primitives/hasTransformation.js.map +0 -1
  235. package/dist/mjs/primitives/isValidReactNode.d.ts.map +0 -1
  236. package/dist/mjs/primitives/isValidReactNode.js.map +0 -1
  237. /package/dist/cjs/primitives/{getDictionaryReference.d.ts → dictionary/getDictionaryReference.d.ts} +0 -0
  238. /package/dist/cjs/primitives/{getDictionaryReference.js → dictionary/getDictionaryReference.js} +0 -0
  239. /package/dist/cjs/primitives/{getEntryMetadata.d.ts → rendering/getEntryMetadata.d.ts} +0 -0
  240. /package/dist/cjs/primitives/{getEntryMetadata.js → rendering/getEntryMetadata.js} +0 -0
  241. /package/dist/cjs/primitives/{getEntryTranslationType.d.ts → rendering/getEntryTranslationType.d.ts} +0 -0
  242. /package/dist/cjs/primitives/{getEntryTranslationType.js → rendering/getEntryTranslationType.js} +0 -0
  243. /package/dist/cjs/primitives/{getRenderAttributes.d.ts → rendering/getRenderAttributes.d.ts} +0 -0
  244. /package/dist/cjs/primitives/{getRenderAttributes.js → rendering/getRenderAttributes.js} +0 -0
  245. /package/dist/cjs/primitives/{isValidReactNode.d.ts → rendering/isValidReactNode.d.ts} +0 -0
  246. /package/dist/cjs/primitives/{isValidReactNode.js → rendering/isValidReactNode.js} +0 -0
  247. /package/dist/cjs/primitives/{createValues.d.ts → variables/createValues.d.ts} +0 -0
  248. /package/dist/cjs/primitives/{createValues.js → variables/createValues.js} +0 -0
  249. /package/dist/cjs/primitives/{defaultVariableNames.d.ts → variables/defaultVariableNames.d.ts} +0 -0
  250. /package/dist/cjs/primitives/{defaultVariableNames.js → variables/defaultVariableNames.js} +0 -0
  251. /package/dist/cjs/primitives/{getPluralBranch.d.ts → variables/getPluralBranch.d.ts} +0 -0
  252. /package/dist/cjs/primitives/{getPluralBranch.js → variables/getPluralBranch.js} +0 -0
  253. /package/dist/mjs/primitives/{getDictionaryReference.d.ts → dictionary/getDictionaryReference.d.ts} +0 -0
  254. /package/dist/mjs/primitives/{getDictionaryReference.js → dictionary/getDictionaryReference.js} +0 -0
  255. /package/dist/mjs/primitives/{getEntryMetadata.d.ts → rendering/getEntryMetadata.d.ts} +0 -0
  256. /package/dist/mjs/primitives/{getEntryMetadata.js → rendering/getEntryMetadata.js} +0 -0
  257. /package/dist/mjs/primitives/{getEntryTranslationType.d.ts → rendering/getEntryTranslationType.d.ts} +0 -0
  258. /package/dist/mjs/primitives/{getEntryTranslationType.js → rendering/getEntryTranslationType.js} +0 -0
  259. /package/dist/mjs/primitives/{getRenderAttributes.d.ts → rendering/getRenderAttributes.d.ts} +0 -0
  260. /package/dist/mjs/primitives/{getRenderAttributes.js → rendering/getRenderAttributes.js} +0 -0
  261. /package/dist/mjs/primitives/{isValidReactNode.d.ts → rendering/isValidReactNode.d.ts} +0 -0
  262. /package/dist/mjs/primitives/{isValidReactNode.js → rendering/isValidReactNode.js} +0 -0
  263. /package/dist/mjs/primitives/{createValues.d.ts → variables/createValues.d.ts} +0 -0
  264. /package/dist/mjs/primitives/{createValues.js → variables/createValues.js} +0 -0
  265. /package/dist/mjs/primitives/{defaultVariableNames.d.ts → variables/defaultVariableNames.d.ts} +0 -0
  266. /package/dist/mjs/primitives/{defaultVariableNames.js → variables/defaultVariableNames.js} +0 -0
  267. /package/dist/mjs/primitives/{getPluralBranch.d.ts → variables/getPluralBranch.d.ts} +0 -0
  268. /package/dist/mjs/primitives/{getPluralBranch.js → variables/getPluralBranch.js} +0 -0
@@ -1,13 +0,0 @@
1
- import { ReactNode } from "react";
2
- type TargetElement = Record<string, any>;
3
- type TargetChild = TargetElement | string | number | boolean | object;
4
- type Target = TargetChild | TargetChild[];
5
- type SourceChild = ReactNode | Record<string, any>;
6
- type Source = SourceChild | SourceChild[];
7
- export default function renderClientChildren({ source, target, ...metadata }: {
8
- source: Source;
9
- target?: Target;
10
- [key: string]: any;
11
- }): any;
12
- export {};
13
- //# sourceMappingURL=renderClientChildren.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderClientChildren.d.ts","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderClientChildren.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAgC,SAAS,EAAY,MAAM,OAAO,CAAC;AAajF,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACzC,KAAK,WAAW,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACtE,KAAK,MAAM,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC;AAE1C,KAAK,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACnD,KAAK,MAAM,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC;AAqB1C,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EACzC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAC9B,EAAE;IACC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,OAoGA"}
@@ -1,132 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- var __rest = (this && this.__rest) || function (s, e) {
4
- var t = {};
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
6
- t[p] = s[p];
7
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
8
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10
- t[p[i]] = s[p[i]];
11
- }
12
- return t;
13
- };
14
- var __importDefault = (this && this.__importDefault) || function (mod) {
15
- return (mod && mod.__esModule) ? mod : { "default": mod };
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.default = renderClientChildren;
19
- const jsx_runtime_1 = require("react/jsx-runtime");
20
- const react_1 = __importDefault(require("react"));
21
- const isValidReactNode_1 = __importDefault(require("../../../primitives/isValidReactNode"));
22
- const defaultVariableNames_1 = __importDefault(require("../../../primitives/defaultVariableNames"));
23
- const ClientNum_1 = __importDefault(require("../../variables/ClientNum"));
24
- const ClientDateTime_1 = __importDefault(require("../../variables/ClientDateTime"));
25
- const ClientCurrency_1 = __importDefault(require("../../variables/ClientCurrency"));
26
- const ClientVar_1 = __importDefault(require("../../variables/ClientVar"));
27
- const renderClientElement = (_a) => {
28
- var _b;
29
- var { sourceElement, targetElement } = _a, metadata = __rest(_a, ["sourceElement", "targetElement"]);
30
- const { props } = sourceElement;
31
- if (props.children) {
32
- return react_1.default.cloneElement(sourceElement, Object.assign(Object.assign(Object.assign({}, props), metadata.renderAttributes), { children: renderClientChildren(Object.assign({ source: props.children, target: (_b = targetElement === null || targetElement === void 0 ? void 0 : targetElement.props) === null || _b === void 0 ? void 0 : _b.children }, metadata)) }));
33
- }
34
- return react_1.default.cloneElement(sourceElement, Object.assign(Object.assign({}, metadata.renderAttributes), sourceElement === null || sourceElement === void 0 ? void 0 : sourceElement.props));
35
- };
36
- function renderClientChildren(_a) {
37
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
38
- var { source, target } = _a, metadata = __rest(_a, ["source", "target"]);
39
- console.log(react_1.default.isValidElement(source));
40
- // Most straightforward case, return a valid React node
41
- if ((target === null || typeof target === 'undefined') && (0, isValidReactNode_1.default)(source))
42
- return source;
43
- // Extremely important due to GTProvider and t() discrepancy on whether to use async intl()
44
- if (typeof target !== null && typeof target !== 'undefined' && (0, isValidReactNode_1.default)(target))
45
- return target;
46
- // If target and source are both arrays of children
47
- if (Array.isArray(source) && Array.isArray(target)) {
48
- // Filter for variables and valid source children
49
- let validSourceElements = [];
50
- for (const sourceChild of source) {
51
- if (((_c = (_b = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _b === void 0 ? void 0 : _b['data-generaltranslation']) === null || _c === void 0 ? void 0 : _c.transformation) === "variable") {
52
- const variableName = sourceChild.props.name || defaultVariableNames_1.default[(_e = (_d = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _d === void 0 ? void 0 : _d['data-generaltranslation']) === null || _e === void 0 ? void 0 : _e.variableType];
53
- const variableValue = sourceChild.props.defaultValue || sourceChild.props.children;
54
- if (variableName && variableValue && typeof ((_f = metadata === null || metadata === void 0 ? void 0 : metadata.variables) === null || _f === void 0 ? void 0 : _f[variableName]) === 'undefined') {
55
- metadata.variables = Object.assign(Object.assign({}, metadata.variables), { [variableName]: variableValue });
56
- }
57
- const variableType = ((_h = (_g = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _g === void 0 ? void 0 : _g['data-generaltranslation']) === null || _h === void 0 ? void 0 : _h.variableType) || "variable";
58
- if (variableType === "number" || variableType === "currency" || variableType === "date") {
59
- const variableOptions = (_j = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _j === void 0 ? void 0 : _j.options;
60
- if (variableOptions)
61
- metadata.variableOptions = Object.assign(Object.assign({}, metadata.variableOptions), { [variableName]: Object.assign({}, variableOptions) });
62
- }
63
- if (variableType === "currency") {
64
- const variableCurrency = (_k = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _k === void 0 ? void 0 : _k.currency;
65
- if (variableCurrency)
66
- metadata.variableOptions = Object.assign(Object.assign({}, metadata.variableOptions), { [variableName]: Object.assign({ currency: variableCurrency }, (_l = metadata.variableOptions) === null || _l === void 0 ? void 0 : _l[variableName]) });
67
- }
68
- }
69
- else if (react_1.default.isValidElement(sourceChild)) {
70
- validSourceElements.push(sourceChild);
71
- }
72
- }
73
- // Find matching source elements based on ID
74
- const findMatchingSource = (targetElement) => {
75
- return validSourceElements.find(sourceChild => {
76
- var _a, _b, _c;
77
- const { props } = sourceChild;
78
- if (typeof ((_a = props === null || props === void 0 ? void 0 : props['data-generaltranslation']) === null || _a === void 0 ? void 0 : _a.id) !== 'undefined') {
79
- const sourceID = props['data-generaltranslation'].id;
80
- const targetID = (_c = (_b = targetElement === null || targetElement === void 0 ? void 0 : targetElement.props) === null || _b === void 0 ? void 0 : _b['data-generaltranslation']) === null || _c === void 0 ? void 0 : _c.id;
81
- return sourceID === targetID;
82
- }
83
- return false;
84
- });
85
- };
86
- // Return targets
87
- return target.map((targetChild, index) => {
88
- var _a, _b, _c, _d, _e;
89
- // Most straightforward case, return a valid React node
90
- if ((0, isValidReactNode_1.default)(targetChild)) {
91
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: targetChild }, `string_${index}`);
92
- }
93
- // If target is a variable
94
- if ((targetChild === null || targetChild === void 0 ? void 0 : targetChild.variable) && typeof targetChild.key === 'string') {
95
- const key = targetChild.key;
96
- let value;
97
- if (metadata.variables && (typeof metadata.variables[key] !== null && typeof metadata.variables[key] !== 'undefined')) {
98
- value = metadata.variables[key];
99
- }
100
- if (targetChild.variable === "number") {
101
- return (0, jsx_runtime_1.jsx)(ClientNum_1.default, { defaultValue: value, name: key, options: Object.assign({}, (_a = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _a === void 0 ? void 0 : _a[key]) }, `var_${index}`);
102
- }
103
- if (targetChild.variable === "date") {
104
- return (0, jsx_runtime_1.jsx)(ClientDateTime_1.default, { defaultValue: value, name: key, options: Object.assign({}, (_b = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _b === void 0 ? void 0 : _b[key]) }, `var_${index}`);
105
- }
106
- if (targetChild.variable === "currency") {
107
- return (0, jsx_runtime_1.jsx)(ClientCurrency_1.default, { defaultValue: value, name: key, currency: ((_d = (_c = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _c === void 0 ? void 0 : _c[key]) === null || _d === void 0 ? void 0 : _d.currency) || undefined, options: Object.assign({}, (_e = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _e === void 0 ? void 0 : _e[key]) }, `var_${index}`);
108
- }
109
- return (0, jsx_runtime_1.jsx)(ClientVar_1.default, { defaultValue: (0, isValidReactNode_1.default)(value) ? value : undefined, name: key }, `var_${index}`);
110
- }
111
- // If target is a normal ReactElement
112
- const matchingSource = findMatchingSource(targetChild);
113
- if (react_1.default.isValidElement(matchingSource)) {
114
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: renderClientElement(Object.assign({ sourceElement: matchingSource, targetElement: targetChild }, metadata)) }, `element_${index}`);
115
- }
116
- });
117
- }
118
- // Target is a single object, could be a component or a variable
119
- if (typeof target === 'object') {
120
- if (react_1.default.isValidElement(source)) {
121
- return renderClientElement(Object.assign({ sourceElement: source, targetElement: target }, metadata));
122
- }
123
- if ((target === null || target === void 0 ? void 0 : target.variable) && (target === null || target === void 0 ? void 0 : target.keys) && typeof source === 'object' && source !== null) {
124
- for (const key of target.keys) {
125
- if (source.hasOwnProperty(key)) {
126
- return source[key];
127
- }
128
- }
129
- }
130
- }
131
- }
132
- //# sourceMappingURL=renderClientChildren.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderClientChildren.js","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderClientChildren.tsx"],"names":[],"mappings":";AACA,YAAY,CAAA;;;;;;;;;;;;;;;;AAyCZ,uCA0GC;;AAjJD,kDAAiF;AAIjF,4FAAoE;AAEpE,oGAA4E;AAC5E,0EAAkD;AAClD,oFAA4D;AAC5D,oFAA4D;AAC5D,0EAAkD;AAUlD,MAAM,mBAAmB,GAAG,CAAC,EAI5B,EAAgB,EAAE;;QAJU,EAAE,aAAa,EAAE,aAAa,OAI1D,EAJ+D,QAAQ,cAA3C,kCAA6C,CAAF;IAMpE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;IAEhC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,eAAK,CAAC,YAAY,CAAC,aAAa,gDAChC,KAAK,GACL,QAAQ,CAAC,gBAAgB,KAC5B,QAAQ,EAAE,oBAAoB,iB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 result, dictionary, locales }: any): any;
2
- //# sourceMappingURL=renderClientDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderClientDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderClientDictionary.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC3C,MAAM,EAAE,UAAU,EAAE,OAAO,EAC9B,EAAE,GAAG,GAAG,GAAG,CAeX"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = renderClientDictionary;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const addGTIdentifier_1 = __importDefault(require("../../../index/addGTIdentifier"));
9
- const getEntryMetadata_1 = __importDefault(require("../../../primitives/getEntryMetadata"));
10
- const getRenderAttributes_1 = __importDefault(require("../../../primitives/getRenderAttributes"));
11
- const renderClientChildren_1 = __importDefault(require("./renderClientChildren"));
12
- function renderClientDictionary({ result, dictionary, locales }) {
13
- const renderAttributes = (0, getRenderAttributes_1.default)(locales[0]);
14
- let translatedDictionary = {};
15
- for (const id of Object.keys(dictionary)) {
16
- if (result[id]) {
17
- let { entry, metadata } = (0, getEntryMetadata_1.default)(dictionary[id]);
18
- metadata = Object.assign({ locales, renderAttributes }, metadata);
19
- translatedDictionary[id] = (0, renderClientChildren_1.default)({
20
- source: (0, addGTIdentifier_1.default)((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: entry })), // fragment wrapper so that it is consistent with the server-side
21
- target: result[id].t,
22
- metadata
23
- });
24
- }
25
- }
26
- return translatedDictionary;
27
- }
28
- //# sourceMappingURL=renderClientDictionary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderClientDictionary.js","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderClientDictionary.tsx"],"names":[],"mappings":";;;;;AAKA,yCAiBC;;AAtBD,qFAA6D;AAC7D,4FAAoE;AACpE,kGAA0E;AAC1E,kFAA0D;AAE1D,SAAwB,sBAAsB,CAAC,EAC3C,MAAM,EAAE,UAAU,EAAE,OAAO,EACzB;IACF,MAAM,gBAAgB,GAAG,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,IAAI,oBAAoB,GAAwB,EAAE,CAAC;IACnD,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACb,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAA,0BAAgB,EAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3D,QAAQ,mBAAK,OAAO,EAAE,gBAAgB,IAAK,QAAQ,CAAE,CAAC;YACtD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAA,8BAAoB,EAAC;gBAC5C,MAAM,EAAE,IAAA,yBAAe,EAAC,2DAAG,KAAK,GAAI,CAAC,EAAE,iEAAiE;gBACxG,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpB,QAAQ;aACX,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IACD,OAAO,oBAAoB,CAAC;AAChC,CAAC"}
@@ -1,14 +0,0 @@
1
- import { ReactNode } from "react";
2
- type TargetElement = Record<string, any>;
3
- type TargetChild = TargetElement | string | number | boolean | object;
4
- type Target = TargetChild | TargetChild[];
5
- type SourceChild = ReactNode | Record<string, any>;
6
- type Source = SourceChild | SourceChild[];
7
- export declare function renderClientChildren({ source, target, ...metadata }: {
8
- source: Source;
9
- target?: Target;
10
- [key: string]: any;
11
- }): any;
12
- export default function renderDictionary({ result, dictionary, locales }: any): any;
13
- export {};
14
- //# sourceMappingURL=renderDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderDictionary.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAgC,SAAS,EAAY,MAAM,OAAO,CAAC;AAajF,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACzC,KAAK,WAAW,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACtE,KAAK,MAAM,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC;AAE1C,KAAK,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACnD,KAAK,MAAM,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC;AAqB1C,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAC9B,EAAE;IACC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,OAkGA;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACrC,MAAM,EAAE,UAAU,EAAE,OAAO,EAC9B,EAAE,GAAG,GAAG,GAAG,CAwCX"}
@@ -1,190 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
- var __rest = (this && this.__rest) || function (s, e) {
27
- var t = {};
28
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
29
- t[p] = s[p];
30
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
31
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
33
- t[p[i]] = s[p[i]];
34
- }
35
- return t;
36
- };
37
- var __importDefault = (this && this.__importDefault) || function (mod) {
38
- return (mod && mod.__esModule) ? mod : { "default": mod };
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.renderClientChildren = renderClientChildren;
42
- exports.default = renderDictionary;
43
- const jsx_runtime_1 = require("react/jsx-runtime");
44
- const react_1 = __importStar(require("react"));
45
- const getEntryMetadata_1 = __importDefault(require("../../../primitives/getEntryMetadata"));
46
- const addGTIdentifier_1 = __importDefault(require("../../../index/addGTIdentifier"));
47
- const isValidReactNode_1 = __importDefault(require("../../../primitives/isValidReactNode"));
48
- const getRenderAttributes_1 = __importDefault(require("../../../primitives/getRenderAttributes"));
49
- const defaultVariableNames_1 = __importDefault(require("../../../primitives/defaultVariableNames"));
50
- const ClientNum_1 = __importDefault(require("../../variables/ClientNum"));
51
- const ClientDateTime_1 = __importDefault(require("../../variables/ClientDateTime"));
52
- const ClientCurrency_1 = __importDefault(require("../../variables/ClientCurrency"));
53
- const ClientVar_1 = __importDefault(require("../../variables/ClientVar"));
54
- const ClientResolver_1 = __importDefault(require("./ClientResolver"));
55
- const renderClientElement = (_a) => {
56
- var _b;
57
- var { sourceElement, targetElement } = _a, metadata = __rest(_a, ["sourceElement", "targetElement"]);
58
- const { props } = sourceElement;
59
- if (props.children) {
60
- return react_1.default.cloneElement(sourceElement, Object.assign(Object.assign(Object.assign({}, props), metadata.renderAttributes), { children: renderClientChildren(Object.assign({ source: props.children, target: (_b = targetElement === null || targetElement === void 0 ? void 0 : targetElement.props) === null || _b === void 0 ? void 0 : _b.children }, metadata)) }));
61
- }
62
- return react_1.default.cloneElement(sourceElement, Object.assign(Object.assign({}, metadata.renderAttributes), sourceElement === null || sourceElement === void 0 ? void 0 : sourceElement.props));
63
- };
64
- function renderClientChildren(_a) {
65
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
66
- var { source, target } = _a, metadata = __rest(_a, ["source", "target"]);
67
- // Most straightforward case, return a valid React node
68
- if ((target === null || typeof target === 'undefined') && (0, isValidReactNode_1.default)(source))
69
- return source;
70
- // Extremely important due to GTProvider and t() discrepancy on whether to use async intl()
71
- if (typeof target !== null && typeof target !== 'undefined' && (0, isValidReactNode_1.default)(target))
72
- return target;
73
- // If target and source are both arrays of children
74
- if (Array.isArray(source) && Array.isArray(target)) {
75
- // Filter for variables and valid source children
76
- let validSourceElements = [];
77
- for (const sourceChild of source) {
78
- if (((_c = (_b = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _b === void 0 ? void 0 : _b['data-generaltranslation']) === null || _c === void 0 ? void 0 : _c.transformation) === "variable") {
79
- const variableName = sourceChild.props.name || defaultVariableNames_1.default[(_e = (_d = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _d === void 0 ? void 0 : _d['data-generaltranslation']) === null || _e === void 0 ? void 0 : _e.variableType];
80
- const variableValue = sourceChild.props.defaultValue || sourceChild.props.children;
81
- if (variableName && variableValue && typeof ((_f = metadata === null || metadata === void 0 ? void 0 : metadata.variables) === null || _f === void 0 ? void 0 : _f[variableName]) === 'undefined') {
82
- metadata.variables = Object.assign(Object.assign({}, metadata.variables), { [variableName]: variableValue });
83
- }
84
- const variableType = ((_h = (_g = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _g === void 0 ? void 0 : _g['data-generaltranslation']) === null || _h === void 0 ? void 0 : _h.variableType) || "variable";
85
- if (variableType === "number" || variableType === "currency" || variableType === "date") {
86
- const variableOptions = (_j = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _j === void 0 ? void 0 : _j.options;
87
- if (variableOptions)
88
- metadata.variableOptions = Object.assign(Object.assign({}, metadata.variableOptions), { [variableName]: Object.assign({}, variableOptions) });
89
- }
90
- if (variableType === "currency") {
91
- const variableCurrency = (_k = sourceChild === null || sourceChild === void 0 ? void 0 : sourceChild.props) === null || _k === void 0 ? void 0 : _k.currency;
92
- if (variableCurrency)
93
- metadata.variableOptions = Object.assign(Object.assign({}, metadata.variableOptions), { [variableName]: Object.assign({ currency: variableCurrency }, (_l = metadata.variableOptions) === null || _l === void 0 ? void 0 : _l[variableName]) });
94
- }
95
- }
96
- else if (react_1.default.isValidElement(sourceChild)) {
97
- validSourceElements.push(sourceChild);
98
- }
99
- }
100
- // Find matching source elements based on ID
101
- const findMatchingSource = (targetElement) => {
102
- return validSourceElements.find(sourceChild => {
103
- var _a, _b, _c;
104
- const { props } = sourceChild;
105
- if (typeof ((_a = props === null || props === void 0 ? void 0 : props['data-generaltranslation']) === null || _a === void 0 ? void 0 : _a.id) !== 'undefined') {
106
- const sourceID = props['data-generaltranslation'].id;
107
- const targetID = (_c = (_b = targetElement === null || targetElement === void 0 ? void 0 : targetElement.props) === null || _b === void 0 ? void 0 : _b['data-generaltranslation']) === null || _c === void 0 ? void 0 : _c.id;
108
- return sourceID === targetID;
109
- }
110
- return false;
111
- });
112
- };
113
- // Return targets
114
- return target.map((targetChild, index) => {
115
- var _a, _b, _c, _d, _e;
116
- // Most straightforward case, return a valid React node
117
- if ((0, isValidReactNode_1.default)(targetChild)) {
118
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: targetChild }, `string_${index}`);
119
- }
120
- // If target is a variable
121
- if ((targetChild === null || targetChild === void 0 ? void 0 : targetChild.variable) && typeof targetChild.key === 'string') {
122
- const key = targetChild.key;
123
- let value;
124
- if (metadata.variables && (typeof metadata.variables[key] !== null && typeof metadata.variables[key] !== 'undefined')) {
125
- value = metadata.variables[key];
126
- }
127
- if (targetChild.variable === "number") {
128
- return (0, jsx_runtime_1.jsx)(ClientNum_1.default, { defaultValue: value, name: key, options: Object.assign({}, (_a = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _a === void 0 ? void 0 : _a[key]) }, `var_${index}`);
129
- }
130
- if (targetChild.variable === "date") {
131
- return (0, jsx_runtime_1.jsx)(ClientDateTime_1.default, { defaultValue: value, name: key, options: Object.assign({}, (_b = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _b === void 0 ? void 0 : _b[key]) }, `var_${index}`);
132
- }
133
- if (targetChild.variable === "currency") {
134
- return (0, jsx_runtime_1.jsx)(ClientCurrency_1.default, { defaultValue: value, name: key, currency: ((_d = (_c = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _c === void 0 ? void 0 : _c[key]) === null || _d === void 0 ? void 0 : _d.currency) || undefined, options: Object.assign({}, (_e = metadata === null || metadata === void 0 ? void 0 : metadata.variableOptions) === null || _e === void 0 ? void 0 : _e[key]) }, `var_${index}`);
135
- }
136
- return (0, jsx_runtime_1.jsx)(ClientVar_1.default, { defaultValue: (0, isValidReactNode_1.default)(value) ? value : undefined, name: key }, `var_${index}`);
137
- }
138
- // If target is a normal ReactElement
139
- const matchingSource = findMatchingSource(targetChild);
140
- if (react_1.default.isValidElement(matchingSource)) {
141
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: renderClientElement(Object.assign({ sourceElement: matchingSource, targetElement: targetChild }, metadata)) }, `element_${index}`);
142
- }
143
- });
144
- }
145
- // Target is a single object, could be a component or a variable
146
- if (typeof target === 'object') {
147
- if (react_1.default.isValidElement(source)) {
148
- return renderClientElement(Object.assign({ sourceElement: source, targetElement: target }, metadata));
149
- }
150
- if ((target === null || target === void 0 ? void 0 : target.variable) && (target === null || target === void 0 ? void 0 : target.keys) && typeof source === 'object' && source !== null) {
151
- for (const key of target.keys) {
152
- if (source.hasOwnProperty(key)) {
153
- return source[key];
154
- }
155
- }
156
- }
157
- }
158
- }
159
- function renderDictionary({ result, dictionary, locales }) {
160
- const renderAttributes = (0, getRenderAttributes_1.default)(locales[0]);
161
- let translatedDictionary = {};
162
- for (const id of Object.keys(dictionary)) {
163
- if (result[id]) {
164
- let { entry, metadata } = (0, getEntryMetadata_1.default)(dictionary[id]);
165
- metadata = Object.assign({ locales, renderAttributes }, metadata);
166
- let { entry: translation, metadata: fallbacks } = (0, getEntryMetadata_1.default)(result[id]);
167
- if (typeof entry === 'string' && typeof translation === 'string') { // i.e., intl()
168
- translatedDictionary[id] = translation;
169
- continue;
170
- }
171
- entry = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: entry }); // fragment wrapper so that it is consistent with the server-side
172
- if (isTranslationPromise(translation)) {
173
- if (fallbacks) {
174
- translatedDictionary[id] = ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: fallbacks.loadingFallback, children: (0, jsx_runtime_1.jsx)(ClientResolver_1.default, { promise: translation, entry: entry, fallback: fallbacks.errorFallback }) }));
175
- continue;
176
- }
177
- }
178
- translatedDictionary[id] = renderClientChildren({
179
- source: (0, addGTIdentifier_1.default)(entry),
180
- target: translation.t,
181
- metadata
182
- });
183
- }
184
- }
185
- return translatedDictionary;
186
- }
187
- function isTranslationPromise(obj) {
188
- return !!obj && typeof obj.then === 'function' && typeof obj.catch === 'function';
189
- }
190
- //# sourceMappingURL=renderDictionary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDictionary.js","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderDictionary.tsx"],"names":[],"mappings":";AACA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;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KAAK,GAAG,2DAAG,KAAK,GAAI,CAAC,CAAC,iEAAiE;YAEvF,IAAI,oBAAoB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,IAAI,SAAS,EAAE,CAAC;oBACZ,oBAAoB,CAAC,EAAE,CAAC,GAAG,CACvB,uBAAC,gBAAQ,IAAC,QAAQ,EAAE,SAAS,CAAC,eAAe,YACzC,uBAAC,wBAAc,IACX,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,SAAS,CAAC,aAAa,GACnC,GACK,CACd,CAAA;oBACD,SAAS;gBACb,CAAC;YACL,CAAC;YAED,oBAAoB,CAAC,EAAE,CAAC,GAAG,oBAAoB,CAAC;gBAC5C,MAAM,EAAE,IAAA,yBAAe,EAAC,KAAK,CAAC;gBAC9B,MAAM,EAAE,WAAW,CAAC,CAAC;gBACrB,QAAQ;aACX,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IACD,OAAO,oBAAoB,CAAC;AAChC,CAAC;AAGD,SAAS,oBAAoB,CAAC,GAAQ;IAClC,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU,CAAC;AACtF,CAAC"}
@@ -1,2 +0,0 @@
1
- export default function renderPromiseDictionary({ result, dictionary, locales }: any): any;
2
- //# sourceMappingURL=renderPromiseDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderPromiseDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderPromiseDictionary.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC5C,MAAM,EAAE,UAAU,EAAE,OAAO,EAC9B,EAAE,GAAG,GAAG,GAAG,CAsCX"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.default = renderPromiseDictionary;
8
- const jsx_runtime_1 = require("react/jsx-runtime");
9
- const react_1 = require("react");
10
- const getEntryMetadata_1 = __importDefault(require("../../../primitives/getEntryMetadata"));
11
- const getRenderAttributes_1 = __importDefault(require("../../../primitives/getRenderAttributes"));
12
- const ClientResolver_1 = __importDefault(require("./ClientResolver"));
13
- const renderClientChildren_1 = __importDefault(require("./renderClientChildren"));
14
- function renderPromiseDictionary({ result, dictionary, locales }) {
15
- const renderAttributes = (0, getRenderAttributes_1.default)(locales[0]);
16
- let translatedDictionary = {};
17
- for (const id of Object.keys(dictionary)) {
18
- if (result[id]) {
19
- let { entry, metadata } = (0, getEntryMetadata_1.default)(dictionary[id]);
20
- metadata = Object.assign({ locales, renderAttributes }, metadata);
21
- let { entry: translation, metadata: fallbacks } = (0, getEntryMetadata_1.default)(result[id]);
22
- if (typeof entry === 'string' && typeof translation === 'string') { // i.e., intl()
23
- translatedDictionary[id] = translation;
24
- continue;
25
- }
26
- if (isTranslationPromise(translation)) {
27
- if (fallbacks) {
28
- translatedDictionary[id] = ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: fallbacks.loadingFallbackTarget, children: (0, jsx_runtime_1.jsx)(ClientResolver_1.default, { promise: translation, entry: entry, fallback: fallbacks.errorFallbackTarget }) }));
29
- continue;
30
- }
31
- }
32
- translatedDictionary[id] = (0, renderClientChildren_1.default)({
33
- source: entry,
34
- target: translation.t,
35
- metadata
36
- });
37
- }
38
- }
39
- return translatedDictionary;
40
- }
41
- function isTranslationPromise(obj) {
42
- return !!obj && typeof obj.then === 'function' && typeof obj.catch === 'function';
43
- }
44
- //# sourceMappingURL=renderPromiseDictionary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderPromiseDictionary.js","sourceRoot":"","sources":["../../../../../src/client/client-only/helpers/renderPromiseDictionary.tsx"],"names":[],"mappings":";AACA,YAAY,CAAA;;;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CAAC;YAED,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAA,8BAAoB,EAAC;gBAC5C,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,WAAW,CAAC,CAAC;gBACrB,QAAQ;aACX,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IACD,OAAO,oBAAoB,CAAC;AAChC,CAAC;AAGD,SAAS,oBAAoB,CAAC,GAAQ;IAClC,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU,CAAC;AACtF,CAAC"}
@@ -1,2 +0,0 @@
1
- export default function renderClientDictionary({ result, dictionary, locales }: any): any;
2
- //# sourceMappingURL=ar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/client/helpers/ar.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC3C,MAAM,EAAE,UAAU,EAAE,OAAO,EAC9B,EAAE,GAAG,GAAG,GAAG,CAeX"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = renderClientDictionary;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const addGTIdentifier_1 = __importDefault(require("../../index/addGTIdentifier"));
9
- const getEntryMetadata_1 = __importDefault(require("../../primitives/getEntryMetadata"));
10
- const getRenderAttributes_1 = __importDefault(require("../../primitives/getRenderAttributes"));
11
- const renderClientChildren_1 = __importDefault(require("./renderClientChildren"));
12
- function renderClientDictionary({ result, dictionary, locales }) {
13
- const renderAttributes = (0, getRenderAttributes_1.default)(locales[0]);
14
- let translatedDictionary = {};
15
- for (const id of Object.keys(dictionary)) {
16
- if (result[id]) {
17
- let { entry, metadata } = (0, getEntryMetadata_1.default)(dictionary[id]);
18
- metadata = Object.assign({ locales, renderAttributes }, metadata);
19
- translatedDictionary[id] = (0, renderClientChildren_1.default)({
20
- source: (0, addGTIdentifier_1.default)((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: entry })), // fragment wrapper so that it is consistent with the server-side
21
- target: result[id].t,
22
- metadata
23
- });
24
- }
25
- }
26
- return translatedDictionary;
27
- }
28
- //# sourceMappingURL=ar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ar.js","sourceRoot":"","sources":["../../../../src/client/helpers/ar.tsx"],"names":[],"mappings":";;;;;AAKA,yCAiBC;;AAtBD,kFAA0D;AAC1D,yFAAiE;AACjE,+FAAuE;AACvE,kFAA0D;AAE1D,SAAwB,sBAAsB,CAAC,EAC3C,MAAM,EAAE,UAAU,EAAE,OAAO,EACzB;IACF,MAAM,gBAAgB,GAAG,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,IAAI,oBAAoB,GAAwB,EAAE,CAAC;IACnD,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACb,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAA,0BAAgB,EAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3D,QAAQ,mBAAK,OAAO,EAAE,gBAAgB,IAAK,QAAQ,CAAE,CAAC;YACtD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAA,8BAAoB,EAAC;gBAC5C,MAAM,EAAE,IAAA,yBAAe,EAAC,2DAAG,KAAK,GAAI,CAAC,EAAE,iEAAiE;gBACxG,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpB,QAAQ;aACX,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IACD,OAAO,oBAAoB,CAAC;AAChC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createValues.d.ts","sourceRoot":"","sources":["../../../src/primitives/createValues.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;cAW5E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createValues.js","sourceRoot":"","sources":["../../../src/primitives/createValues.ts"],"names":[],"mappings":";;AAAA,+BAWC;AAXD,SAAwB,YAAY,CAAC,CAAU,EAAE,MAA4B;IACzE,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACxB,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxC,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,yBAAY,MAAM,EAAG;IACzB,CAAC;IACD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACvC,uCAAY,MAAM,KAAE,CAAC,IAAG;IAC5B,CAAC;IACD,OAAO,EAAE,CAAC,EAAE,CAAC;AACjB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultVariableNames.d.ts","sourceRoot":"","sources":["../../../src/primitives/defaultVariableNames.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKhD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultVariableNames.js","sourceRoot":"","sources":["../../../src/primitives/defaultVariableNames.ts"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAA2B;IACjD,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,MAAM;CACrB,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDictionaryReference.d.ts","sourceRoot":"","sources":["../../../src/primitives/getDictionaryReference.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAE7F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDictionaryReference.js","sourceRoot":"","sources":["../../../src/primitives/getDictionaryReference.ts"],"names":[],"mappings":";;AAMA,yCAEC;AARD;;;;;GAKG;AACH,SAAwB,sBAAsB,CAAC,MAAc,EAAE,cAAsB;IACjF,OAAO,GAAG,kBAAkB,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;AACjF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryMetadata.d.ts","sourceRoot":"","sources":["../../../src/primitives/getEntryMetadata.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG;IAClD,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACjC,CAaA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryMetadata.js","sourceRoot":"","sources":["../../../src/primitives/getEntryMetadata.ts"],"names":[],"mappings":";;AAGA,mCAgBC;AAjBD,8DAA8D;AAC9D,SAAwB,gBAAgB,CAAC,KAAU;IAI/C,IAAI,OAAO,CAAC;IACZ,IAAI,QAAQ,CAAC;IACb,IAAI,KAAK,EAAE,CAAC;QACR,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACvB,IAAI,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAA,KAAK,QAAQ,EAAE,CAAC;gBACjC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC;YACD,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;IACL,CAAC;IACD,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,KAAK,CAAC;IAC9B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACxC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryTranslationType.d.ts","sourceRoot":"","sources":["../../../src/primitives/getEntryTranslationType.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,QAAQ,GAAG,MAAM,CAmBnF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryTranslationType.js","sourceRoot":"","sources":["../../../src/primitives/getEntryTranslationType.ts"],"names":[],"mappings":";;;;;AAGA,0CAmBC;AArBD,0EAAkD;AAElD,SAAwB,uBAAuB,CAAC,KAAU;IACtD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAA,0BAAgB,EAAC,KAAK,CAAC,CAAC;IAC7D,IAAI,QAAQ,EAAE,CAAC;QACX,IACG,QAAQ,CAAC,QAAQ;eACd,QAAQ,CAAC,MAAM;eACf,QAAQ,CAAC,IAAI;eACb,QAAQ,CAAC,IAAI;eACb,QAAQ,CAAC,GAAG;eACZ,QAAQ,CAAC,GAAG;eACZ,QAAQ,CAAC,GAAG;eACZ,QAAQ,CAAC,IAAI;eACb,QAAQ,CAAC,KAAK;YAClB,OAAO,QAAQ,CAAC;IACtB,CAAC;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAA;IACjB,CAAC;IACD,OAAO,GAAG,CAAA;AACd,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getPluralBranch.d.ts","sourceRoot":"","sources":["../../../src/primitives/getPluralBranch.ts"],"names":[],"mappings":"AAsCA,MAAM,MAAM,KA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AAO,KAAK,CAAC,QAAQ,CAAC;IAChE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;;;GAMG;AACH,SAAwB,eAAe,CAAC,CAAS,EAAE,OAAiB,EAAE,QAAa;IAC/E,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,OAAO,CAAC,KAAK,QAAQ,KAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA;QAAE,MAAM,GAAG,mBAAmB,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChG,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,MAAM,IAAI,QAAQ;QAAE,UAAU,GAAG,uBAAuB,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7G,IAAI,UAAU,IAAI,CAAC,MAAM;QAAE,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRenderAttributes.d.ts","sourceRoot":"","sources":["../../../src/primitives/getRenderAttributes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAC,MAAM,EAAE,GAAG,OAAO,EAAC,EAAE;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,OAKA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRenderAttributes.js","sourceRoot":"","sources":["../../../src/primitives/getRenderAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,sCAQC;AAVD,2DAA0D;AAE1D,SAAwB,mBAAmB,CAAC,EAG3C;QAH2C,EAAC,MAAM,OAGlD,EAHuD,OAAO,cAAnB,UAAoB,CAAD;IAI3D,IAAI,gBAAgB,GAAQ,EAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,IAAA,yCAAoB,EAAC,MAAM,CAAC,CAAC;IACzC,IAAI,GAAG,KAAK,KAAK;QAAE,gBAAgB,mCAAQ,gBAAgB,KAAE,GAAG,GAAE,CAAA;IAClE,OAAO,gBAAgB,CAAC;AAC5B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Recursively navigates through a branch object based on the provided values and returns the matched React node.
3
- *
4
- * @param {Record<string, any>} values - An object containing key-value pairs used to navigate through the branches.
5
- * @param {Record<string, any>} branches - An object representing the branches to be navigated based on the values.
6
- * @returns {any} - Returns the matched React node or undefined if no match is found.
7
- */
8
- export default function getValueBranch(values: Record<string, any>, branches: Record<string, any>): any;
9
- //# sourceMappingURL=getValueBranch.d.ts.map