@dbmx/toasts 0.0.46 → 0.0.48

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 (199) hide show
  1. package/cjs/_virtual/_commonjsHelpers.cjs +33 -0
  2. package/cjs/_virtual/artefacts.cjs +5 -0
  3. package/cjs/_virtual/core.cjs +5 -0
  4. package/cjs/_virtual/dependencyResolver.cjs +5 -0
  5. package/cjs/_virtual/index.esm.cjs +8 -0
  6. package/cjs/_virtual/items.cjs +5 -0
  7. package/cjs/_virtual/sdmx.cjs +5 -0
  8. package/cjs/components/SdmxDatagrid/index.cjs +1 -1
  9. package/cjs/components/SdmxDatagrid/utils/index.cjs +9 -7
  10. package/cjs/node_modules/@dbmx/sdmx/cjs/core.cjs +940 -0
  11. package/cjs/node_modules/@dbmx/sdmx/cjs/data.cjs +140 -0
  12. package/cjs/node_modules/@dbmx/sdmx/cjs/dependencyResolver.cjs +73 -0
  13. package/cjs/node_modules/@dbmx/sdmx/cjs/items.cjs +100 -0
  14. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/assoc.cjs +38 -0
  15. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/assocPath.cjs +55 -0
  16. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/bind.cjs +41 -0
  17. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/compose.cjs +43 -0
  18. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/concat.cjs +69 -0
  19. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/curryN.cjs +66 -0
  20. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/defaultTo.cjs +38 -0
  21. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/dissoc.cjs +33 -0
  22. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/dissocPath.cjs +79 -0
  23. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/equals.cjs +42 -0
  24. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/filter.cjs +63 -0
  25. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/forEach.cjs +58 -0
  26. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/identity.cjs +34 -0
  27. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arity.cjs +56 -0
  28. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arrayFromIterator.cjs +13 -0
  29. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arrayReduce.cjs +14 -0
  30. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_assoc.cjs +37 -0
  31. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_checkForMethod.cjs +30 -0
  32. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_complement.cjs +10 -0
  33. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_createReduce.cjs +32 -0
  34. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry1.cjs +27 -0
  35. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry2.cjs +38 -0
  36. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry3.cjs +56 -0
  37. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curryN.cjs +48 -0
  38. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_dispatchable.cjs +49 -0
  39. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_dissoc.cjs +36 -0
  40. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_equals.cjs +143 -0
  41. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_filter.cjs +17 -0
  42. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_functionName.cjs +10 -0
  43. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_has.cjs +8 -0
  44. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_identity.cjs +8 -0
  45. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includes.cjs +11 -0
  46. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includesWith.cjs +16 -0
  47. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_indexOf.cjs +61 -0
  48. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArguments.cjs +18 -0
  49. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArray.cjs +20 -0
  50. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArrayLike.cjs +55 -0
  51. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isFunction.cjs +9 -0
  52. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isInteger.cjs +16 -0
  53. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isObject.cjs +8 -0
  54. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isPlaceholder.cjs +8 -0
  55. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isString.cjs +8 -0
  56. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isTransformer.cjs +8 -0
  57. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_map.cjs +15 -0
  58. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_objectIs.cjs +18 -0
  59. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_pipe.cjs +10 -0
  60. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_quote.cjs +10 -0
  61. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toISOString.cjs +17 -0
  62. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toString.cjs +62 -0
  63. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xArrayReduce.cjs +18 -0
  64. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xReduce.cjs +30 -0
  65. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xfBase.cjs +13 -0
  66. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xfilter.cjs +26 -0
  67. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xmap.cjs +27 -0
  68. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xwrap.cjs +24 -0
  69. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/is.cjs +39 -0
  70. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/isNil.cjs +32 -0
  71. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/keys.cjs +80 -0
  72. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/map.cjs +75 -0
  73. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/nth.cjs +44 -0
  74. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/path.cjs +41 -0
  75. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pathOr.cjs +38 -0
  76. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/paths.cjs +50 -0
  77. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pick.cjs +41 -0
  78. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pipe.cjs +46 -0
  79. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/prop.cjs +43 -0
  80. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/propOr.cjs +46 -0
  81. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reduce.cjs +71 -0
  82. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reject.cjs +43 -0
  83. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/remove.cjs +37 -0
  84. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reverse.cjs +41 -0
  85. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/slice.cjs +42 -0
  86. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/tail.cjs +46 -0
  87. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/times.cjs +49 -0
  88. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/toString.cjs +53 -0
  89. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/type.cjs +41 -0
  90. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/values.cjs +42 -0
  91. package/cjs/node_modules/@dbmx/sdmx/cjs/types/artefacts.cjs +40 -0
  92. package/cjs/node_modules/@dbmx/sdmx/cjs/types/categorisation.cjs +32 -0
  93. package/cjs/node_modules/@dbmx/sdmx/cjs/types/categoryscheme.cjs +16 -0
  94. package/cjs/node_modules/@dbmx/sdmx/cjs/types/codelist.cjs +31 -0
  95. package/cjs/node_modules/@dbmx/sdmx/cjs/types/conceptscheme.cjs +41 -0
  96. package/cjs/node_modules/@dbmx/sdmx/cjs/types/contentconstraint.cjs +40 -0
  97. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataconstraint.cjs +39 -0
  98. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataflow.cjs +32 -0
  99. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataproviderscheme.cjs +16 -0
  100. package/cjs/node_modules/@dbmx/sdmx/cjs/types/datastructure.cjs +73 -0
  101. package/cjs/node_modules/@dbmx/sdmx/cjs/types/hierarchicalcodelist.cjs +38 -0
  102. package/cjs/node_modules/@dbmx/sdmx/cjs/types/metadatastructure.cjs +62 -0
  103. package/cjs/node_modules/@dbmx/sdmx/cjs/types/provisionagreement.cjs +32 -0
  104. package/cjs/node_modules/@dbmx/sdmx/cjs/types/sdmx.cjs +71 -0
  105. package/cjs/node_modules/@dbmx/sdmx/cjs/utils/url-regexp.cjs +30 -0
  106. package/cjs/node_modules/@dbmx/sdmx/esm/_virtual/_commonjsHelpers.cjs +10 -0
  107. package/cjs/node_modules/@dbmx/sdmx/esm/_virtual/url-join.cjs +5 -0
  108. package/cjs/node_modules/@dbmx/sdmx/esm/core.cjs +554 -0
  109. package/cjs/node_modules/@dbmx/sdmx/esm/datastructures.cjs +73 -0
  110. package/cjs/node_modules/@dbmx/sdmx/esm/dependencyResolver.cjs +65 -0
  111. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/bind.cjs +39 -0
  112. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/compose.cjs +40 -0
  113. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/curryN.cjs +63 -0
  114. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/defaultTo.cjs +37 -0
  115. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/forEach.cjs +59 -0
  116. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/identity.cjs +32 -0
  117. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_arity.cjs +66 -0
  118. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_arrayReduce.cjs +15 -0
  119. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_checkForMethod.cjs +29 -0
  120. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_createReduce.cjs +36 -0
  121. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry1.cjs +24 -0
  122. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry2.cjs +36 -0
  123. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry3.cjs +54 -0
  124. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curryN.cjs +50 -0
  125. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_dispatchable.cjs +51 -0
  126. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_has.cjs +7 -0
  127. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_identity.cjs +7 -0
  128. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArguments.cjs +19 -0
  129. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArray.cjs +19 -0
  130. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArrayLike.cjs +58 -0
  131. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isInteger.cjs +15 -0
  132. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isPlaceholder.cjs +7 -0
  133. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isString.cjs +7 -0
  134. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isTransformer.cjs +7 -0
  135. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_map.cjs +16 -0
  136. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_pipe.cjs +9 -0
  137. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xArrayReduce.cjs +21 -0
  138. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xReduce.cjs +34 -0
  139. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xfBase.cjs +12 -0
  140. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xmap.cjs +31 -0
  141. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xwrap.cjs +29 -0
  142. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/is.cjs +38 -0
  143. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/keys.cjs +94 -0
  144. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/map.cjs +71 -0
  145. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/nth.cjs +42 -0
  146. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/path.cjs +39 -0
  147. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pathOr.cjs +35 -0
  148. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/paths.cjs +50 -0
  149. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pick.cjs +43 -0
  150. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pipe.cjs +41 -0
  151. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/prop.cjs +41 -0
  152. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/propOr.cjs +43 -0
  153. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/reduce.cjs +68 -0
  154. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/reverse.cjs +39 -0
  155. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/slice.cjs +41 -0
  156. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/tail.cjs +45 -0
  157. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/values.cjs +42 -0
  158. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/url-join/lib/url-join.cjs +89 -0
  159. package/cjs/node_modules/@dbmx/sdmx/esm/query.cjs +85 -0
  160. package/cjs/node_modules/@dbmx/sdmx/esm/types/artefacts.cjs +31 -0
  161. package/cjs/node_modules/@dbmx/sdmx/esm/types/categorisation.cjs +19 -0
  162. package/cjs/node_modules/@dbmx/sdmx/esm/types/categoryscheme.cjs +13 -0
  163. package/cjs/node_modules/@dbmx/sdmx/esm/types/codelist.cjs +19 -0
  164. package/cjs/node_modules/@dbmx/sdmx/esm/types/conceptscheme.cjs +29 -0
  165. package/cjs/node_modules/@dbmx/sdmx/esm/types/contentconstraint.cjs +23 -0
  166. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataconstraint.cjs +22 -0
  167. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataflow.cjs +20 -0
  168. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataproviderscheme.cjs +13 -0
  169. package/cjs/node_modules/@dbmx/sdmx/esm/types/datastructure.cjs +74 -0
  170. package/cjs/node_modules/@dbmx/sdmx/esm/types/hierarchicalcodelist.cjs +22 -0
  171. package/cjs/node_modules/@dbmx/sdmx/esm/types/metadatastructure.cjs +58 -0
  172. package/cjs/node_modules/@dbmx/sdmx/esm/types/provisionagreement.cjs +19 -0
  173. package/cjs/node_modules/@dbmx/sdmx/esm/types/sdmx.cjs +51 -0
  174. package/cjs/node_modules/@dbmx/semver/dist/index.esm.cjs +584 -0
  175. package/cjs/node_modules/lru-cache/index.cjs +281 -0
  176. package/cjs/node_modules/yallist/iterator.cjs +20 -0
  177. package/cjs/node_modules/yallist/yallist.cjs +370 -0
  178. package/esm/index-FCPRKLj2.js +720 -0
  179. package/esm/index-FCPRKLj2.js.map +1 -0
  180. package/esm/index-Mh78z9aW.js +562 -0
  181. package/esm/index-Mh78z9aW.js.map +1 -0
  182. package/esm/index-T2bcfyHI.js +8510 -0
  183. package/esm/index-T2bcfyHI.js.map +1 -0
  184. package/esm/index-W7MLRHBf.js +87 -0
  185. package/esm/index-W7MLRHBf.js.map +1 -0
  186. package/esm/index-gBe37Ynf.js +8438 -0
  187. package/esm/index-gBe37Ynf.js.map +1 -0
  188. package/esm/index-ndYjFD6I.js +8438 -0
  189. package/esm/index-ndYjFD6I.js.map +1 -0
  190. package/esm/index.js +1 -1
  191. package/package.json +3 -3
  192. package/cjs/fake-ZW05emqw.js +0 -35
  193. package/cjs/fake-ZW05emqw.js.map +0 -1
  194. package/cjs/index.cjs.map +0 -1
  195. package/esm/fake-JHdVf8lQ.js +0 -14
  196. package/esm/fake-JHdVf8lQ.js.map +0 -1
  197. package/esm/index-lo-MKsEb.js +0 -556
  198. package/esm/index-lo-MKsEb.js.map +0 -1
  199. package/yarn-error.log +0 -7136
@@ -0,0 +1,140 @@
1
+ 'use strict';
2
+
3
+ var core = require('./core.cjs');
4
+ var slice$1 = require('./node_modules/ramda/es/slice.cjs');
5
+ var times$1 = require('./node_modules/ramda/es/times.cjs');
6
+ var concat$1 = require('./node_modules/ramda/es/concat.cjs');
7
+ var isNil$1 = require('./node_modules/ramda/es/isNil.cjs');
8
+
9
+ core.__require();
10
+ var slice = slice$1.slice_1;
11
+ var times = times$1.times_1;
12
+ var concat = concat$1.concat_1;
13
+ var isNil = isNil$1.isNil_1;
14
+ const fillSlice = (start, size, input = [], value = null) => {
15
+ const d1 = slice(start, size, input);
16
+ if (size - d1.length < 0) return d1;
17
+ const d2 = times(() => value, size - d1.length);
18
+ return concat(d1, d2);
19
+ };
20
+ const getDefaultCompValue = comp => comp.default;
21
+ const getdSetDimensions = structure => {
22
+ const dimensions = structure?.dimensions?.dataSet || [];
23
+ const res = {};
24
+ for (const dimension of dimensions) {
25
+ if (!dimension.values) continue;
26
+ res[dimension.id] = dimension.values[0];
27
+ }
28
+ return res;
29
+ };
30
+ const getdSetAttributes = structure => {
31
+ const attributes = structure?.attributes?.dataSet || [];
32
+ const res = {};
33
+ for (const attribute of attributes) {
34
+ if (!attribute.values) continue;
35
+ res[attribute.id] = attribute.values[0];
36
+ }
37
+ return res;
38
+ };
39
+ const unpackDimensions = key => key.split(':');
40
+ const getObsDimensions = (structure, key) => {
41
+ const dimensions = structure?.dimensions?.observation || [];
42
+ const res = {};
43
+ for (const [idx, idxValue] of unpackDimensions(key).entries()) {
44
+ const dimension = dimensions[idx];
45
+ if (!dimension) throw new Error(`Cannot get dimension idx ${idx}!`);
46
+ const value = dimension.values[idxValue];
47
+ if (!value) throw new Error(`Cannot get value ${idxValue} for dimension ${dimension.id}!`);
48
+ res[dimension.id] = value;
49
+ }
50
+ return res;
51
+ };
52
+ const getDataObsAttributes = (structure, values) => {
53
+ const measures = structure?.measures?.observation || [];
54
+ const attributes = structure?.attributes?.observation || [];
55
+ const attributeValues = fillSlice(measures.length, attributes.length, values);
56
+ return getObsAttributes(structure, attributeValues);
57
+ };
58
+ const getObsAttributes = (structure, values) => {
59
+ const attributes = structure?.attributes?.observation || [];
60
+ const res = {};
61
+ for (const [idx, idxValue] of values.entries()) {
62
+ const attribute = attributes[idx];
63
+ if (!attribute) throw new Error(`Cannot get attribute idx ${idx}!`);
64
+ if (attribute.values) {
65
+ if (idxValue === null) {
66
+ const defaultValue = getDefaultCompValue(attribute);
67
+ if (!isNil(defaultValue)) res[attribute.id] = {
68
+ value: defaultValue
69
+ };
70
+ } else {
71
+ const value = attribute.values[idxValue];
72
+ if (value !== null) {
73
+ if (!value) throw new Error(`Cannot get value ${idxValue} for attribute ${attribute.id}!`);
74
+ res[attribute.id] = value;
75
+ }
76
+ }
77
+ } else {
78
+ if (idxValue !== null) res[attribute.id] = {
79
+ value: idxValue
80
+ };
81
+ }
82
+ }
83
+ return res;
84
+ };
85
+ const getKeyAttributes = (structure, key) => {
86
+ return {
87
+ ...getdSetAttributes(structure),
88
+ ...getDataObsAttributes(structure, key)
89
+ };
90
+ };
91
+ const getKeyMeasures = (structure, values) => {
92
+ const measures = structure?.measures?.observation || [];
93
+ const measureValues = fillSlice(0, measures.length, values);
94
+ return getMeasures(structure, measureValues);
95
+ };
96
+ const getMeasures = (structure, values) => {
97
+ const measures = structure?.measures?.observation || [];
98
+ const res = {};
99
+ for (const [idx, idxValue] of values.entries()) {
100
+ const measure = measures[idx];
101
+ if (!measure) throw new Error(`Cannot get measure idx ${idx}!`);
102
+ if (idxValue === null) continue;else if (!measure.values) {
103
+ res[measure.id] = {
104
+ value: idxValue
105
+ };
106
+ } else {
107
+ const value = measure.values[idxValue];
108
+ if (!value) throw new Error(`Cannot get value ${idxValue} for measure ${measure.id}!`);
109
+ res[measure.id] = value;
110
+ }
111
+ }
112
+ return res;
113
+ };
114
+ const getDimensions = (structure, key) => {
115
+ return {
116
+ ...getdSetDimensions(structure),
117
+ ...getObsDimensions(structure, key)
118
+ };
119
+ };
120
+ function* getObservations(dataStructure, {
121
+ dSet = 0
122
+ } = {}) {
123
+ const dataSet = dataStructure?.data?.dataSets?.[dSet];
124
+ if (!dataSet) throw new Error(`Wrong input dataStructure: cannot get targeted dataSet!`);
125
+ const structure = dataStructure.data?.structures?.[dataSet.structure];
126
+ if (!structure) throw new Error(`Wrong input dataStructure: cannot get targeted structure!`);
127
+ const observations = dataSet.observations;
128
+ if (!observations) return;
129
+ for (const key of Object.keys(observations)) {
130
+ const obs = {
131
+ ...getDimensions(structure, key),
132
+ ...getKeyMeasures(structure, observations[key]),
133
+ ...getKeyAttributes(structure, observations[key])
134
+ };
135
+ yield obs;
136
+ }
137
+ }
138
+ var getObservations_1 = getObservations;
139
+
140
+ exports.getObservations = getObservations_1;
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ var dependencyResolver = require('../../../../_virtual/dependencyResolver.cjs');
4
+ var index_esm = require('../../../../_virtual/index.esm.cjs');
5
+
6
+ var semver = index_esm;
7
+
8
+ // TODO: remove resourceType from comparaison
9
+ const matchRefVersionLess = (ref, resource) => (ref.resourceType && resource.resourceType && ref.resourceType === resource.resourceType || !ref.resourceType || !resource.resourceType) && ref.id === resource.id && ref.agencyID === resource.agencyID;
10
+ const getOne = (ref, range, resources) => {
11
+ for (const resource of resources) {
12
+ if (matchRefVersionLess(ref, resource) && range.test(resource.version)) return resource;
13
+ }
14
+ };
15
+ const getLatest = (ref, range, resources) => {
16
+ let res = [];
17
+ if (resources.length === 1 && range.raw === '~') return resources[0];
18
+ for (const resource of resources) {
19
+ if (!matchRefVersionLess(ref, resource)) continue;
20
+ const semver$1 = semver.SemVer(resource.version);
21
+ if (semver$1.isNonVersioned()) continue;
22
+ if (range.test(semver$1)) {
23
+ if (!res[0]) res = [resource, semver$1];else if (semver$1.compare(res[1]) === 1) res = [resource, semver$1];
24
+ }
25
+ }
26
+ return res[0];
27
+ };
28
+
29
+ /**
30
+ * Returns an external resource from the input
31
+ *
32
+ * @function resolveDependency
33
+ * @tag dependency
34
+ * @param {array} - all possible resources
35
+ * @param {object} - source of the dependency
36
+ * @param {object} - target version
37
+ *
38
+ * @example
39
+ *
40
+ * const resources = [
41
+ * { agencyID: 'A', id: 'ID1', version: '1.0.0' },
42
+ * { agencyID: 'A', id: 'ID2', version: '1.0.1' },
43
+ * { agencyID: 'A', id: 'ID3', version: '1.1.1' },
44
+ * ]
45
+ * const ref = resolveDependency(resources, { version: 1.0.0 }, { resourceType, agencyID, id, version: '1.1+.0' }
46
+ * expect(ref.id}.toEqual('ID3')
47
+ */
48
+
49
+ const resolveDependency = (resources, source, ref, {
50
+ noError
51
+ } = {}) => {
52
+ try {
53
+ const range = semver.Dependency(source, ref.version).range;
54
+ if (range.type === semver.RANGE_TYPE.LATEST) return getLatest(ref, range, resources);
55
+ return getOne(ref, range, resources);
56
+ } catch (err) {
57
+ if (noError) return;
58
+ throw err;
59
+ }
60
+ };
61
+ const resolveDataTarget = (resources, ref) => {
62
+ try {
63
+ const range = semver.Range(ref.version);
64
+ if (range.type === semver.RANGE_TYPE.LATEST) return getLatest(ref, range, resources);
65
+ return getOne(ref, range, resources);
66
+ } catch (err) {
67
+ return;
68
+ }
69
+ };
70
+ dependencyResolver.__exports.resolveDataTarget = resolveDataTarget;
71
+ dependencyResolver.__exports.resolveDependency = resolveDependency;
72
+
73
+ module.exports = dependencyResolver.__exports;
@@ -0,0 +1,100 @@
1
+ 'use strict';
2
+
3
+ var items = require('../../../../_virtual/items.cjs');
4
+ var core = require('./core.cjs');
5
+
6
+ var hasRequiredItems;
7
+
8
+ function requireItems () {
9
+ if (hasRequiredItems) return items.__exports;
10
+ hasRequiredItems = 1;
11
+
12
+ var core$1 = core.__require();
13
+
14
+ /**
15
+ * Returns fully qualified items for parent and categories relations
16
+ *
17
+ * @function getFullyQualifiedItems
18
+ * @tag items
19
+ * @tag structure
20
+ * @param {array} - items
21
+ * @param {object} - options [flatten: bool: get flatten array of items ]
22
+ *
23
+ * @example
24
+ *
25
+ * const source = {}
26
+ * const codes = [
27
+ * { id: 'A' },
28
+ * { id: 'E' },
29
+ * { id: 'F', parent: 'E' },
30
+ * { id: 'B', parent: 'A' },
31
+ * { id: 'C', parent: 'A' },
32
+ * { id: 'D', parent: 'B' },
33
+ * ]
34
+ *
35
+ * const res = new Set(getFullyQualifiedItems(codes).map(code => code.fullId))
36
+ * expect(res).toEqual(new Set(['A', 'E', 'E.F', 'A.B', 'A.C', 'A.B.D']))
37
+ */
38
+
39
+ const getFullyQualifiedItems = (items = [], options = {}) => {
40
+ const roots = {};
41
+ const nodes = {};
42
+ const parentIds = {};
43
+ const childrendIds = {};
44
+ const getLabel = options.getLabel ?? ((parentName, itemName) => `${parentName} > ${itemName}`);
45
+ const fullId = item => {
46
+ const parentId = parentIds[item.id];
47
+ if (!parentId) return item.id;
48
+ const parent = nodes[parentId];
49
+ if (!parent) throw new Error(`Invalid code: ${parentId} code does not exist`);
50
+ return `${parent.fullId}.${item.id}`;
51
+ };
52
+ const fullName = (locale, item) => {
53
+ const parentId = parentIds[item.id];
54
+ const name = core$1.getName(locale, item) ?? item.id;
55
+ if (!parentId) return name;
56
+ const parent = nodes[parentId];
57
+ if (!parent) throw new Error(`Invalid code: ${parentId} code does not exist`);
58
+ return getLabel(parent.fullName(locale), name);
59
+ };
60
+ const scan = (items, parent) => {
61
+ for (const item of items) {
62
+ if (!nodes[item.id]) {
63
+ nodes[item.id] = {
64
+ ...item,
65
+ fullName(locale) {
66
+ return fullName(locale, item);
67
+ },
68
+ get fullId() {
69
+ return fullId(item);
70
+ },
71
+ get children() {
72
+ return childrendIds[item.id]?.map(id => nodes[id]) ?? [];
73
+ }
74
+ };
75
+ if (item.parent) {
76
+ parentIds[item.id] = item.parent;
77
+ if (!childrendIds[item.parent]) childrendIds[item.parent] = [item.id];else childrendIds[item.parent].push(item.id);
78
+ } else if (parent) {
79
+ parentIds[item.id] = parent.id;
80
+ if (!childrendIds[parent.id]) childrendIds[parent.id] = [item.id];else childrendIds[parent.id].push(item.id);
81
+ }
82
+ if (!parent && !item.parent) roots[item.id] = nodes[item.id];
83
+ if (item.categories) scan(item.categories, item);
84
+ }
85
+ }
86
+ };
87
+ scan(items);
88
+ return options.flatten ? Object.values(nodes) : Object.values(roots);
89
+ };
90
+ const getItems = (resourceType, values) => {
91
+ const resource = core$1.getArtefactByType(resourceType);
92
+ if (!resource?.isItemScheme) throw new Error(`Invalid resourceType: "${resourceType}"`);
93
+ return values?.[resource.itemsName] || [];
94
+ };
95
+ items.__exports.getFullyQualifiedItems = getFullyQualifiedItems;
96
+ items.__exports.getItems = getItems;
97
+ return items.__exports;
98
+ }
99
+
100
+ exports.__require = requireItems;
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var _curry3$1 = require('./internal/_curry3.cjs');
4
+ var assocPath$1 = require('./assocPath.cjs');
5
+
6
+ var _curry3 = _curry3$1._curry3_1;
7
+ var assocPath = assocPath$1.assocPath_1;
8
+
9
+ /**
10
+ * Makes a shallow clone of an object, setting or overriding the specified
11
+ * property with the given value. Note that this copies and flattens prototype
12
+ * properties onto the new object as well. All non-primitive properties are
13
+ * copied by reference.
14
+ *
15
+ * @func
16
+ * @memberOf R
17
+ * @since v0.8.0
18
+ * @category Object
19
+ * @typedefn Idx = String | Int
20
+ * @sig Idx -> a -> {k: v} -> {k: v}
21
+ * @param {String|Number} prop The property name to set
22
+ * @param {*} val The new value
23
+ * @param {Object} obj The object to clone
24
+ * @return {Object} A new object equivalent to the original except for the changed property.
25
+ * @see R.dissoc, R.pick
26
+ * @example
27
+ *
28
+ * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
29
+ */
30
+
31
+ var assoc = /*#__PURE__*/
32
+ _curry3(function assoc(prop, val, obj) {
33
+ return assocPath([prop], val, obj);
34
+ });
35
+ var assoc$1 = assoc;
36
+ var assoc_1 = assoc$1;
37
+
38
+ exports.assoc_1 = assoc_1;
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ var _curry3$1 = require('./internal/_curry3.cjs');
4
+ var _has$1 = require('./internal/_has.cjs');
5
+ var _isInteger$1 = require('./internal/_isInteger.cjs');
6
+ var _assoc$1 = require('./internal/_assoc.cjs');
7
+ var isNil$1 = require('./isNil.cjs');
8
+
9
+ var _curry3 = _curry3$1._curry3_1;
10
+ var _has = _has$1._has_1;
11
+ var _isInteger = _isInteger$1._isInteger_1;
12
+ var _assoc = _assoc$1._assoc_1;
13
+ var isNil = isNil$1.isNil_1;
14
+
15
+ /**
16
+ * Makes a shallow clone of an object, setting or overriding the nodes required
17
+ * to create the given path, and placing the specific value at the tail end of
18
+ * that path. Note that this copies and flattens prototype properties onto the
19
+ * new object as well. All non-primitive properties are copied by reference.
20
+ *
21
+ * @func
22
+ * @memberOf R
23
+ * @since v0.8.0
24
+ * @category Object
25
+ * @typedefn Idx = String | Int | Symbol
26
+ * @sig [Idx] -> a -> {a} -> {a}
27
+ * @param {Array} path the path to set
28
+ * @param {*} val The new value
29
+ * @param {Object} obj The object to clone
30
+ * @return {Object} A new object equivalent to the original except along the specified path.
31
+ * @see R.dissocPath
32
+ * @example
33
+ *
34
+ * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}
35
+ *
36
+ * // Any missing or non-object keys in path will be overridden
37
+ * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}
38
+ */
39
+
40
+ var assocPath = /*#__PURE__*/
41
+ _curry3(function assocPath(path, val, obj) {
42
+ if (path.length === 0) {
43
+ return val;
44
+ }
45
+ var idx = path[0];
46
+ if (path.length > 1) {
47
+ var nextObj = !isNil(obj) && _has(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : _isInteger(path[1]) ? [] : {};
48
+ val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);
49
+ }
50
+ return _assoc(idx, val, obj);
51
+ });
52
+ var assocPath$1 = assocPath;
53
+ var assocPath_1 = assocPath$1;
54
+
55
+ exports.assocPath_1 = assocPath_1;
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var _arity$1 = require('./internal/_arity.cjs');
4
+ var _curry2$1 = require('./internal/_curry2.cjs');
5
+
6
+ var _arity = _arity$1._arity_1;
7
+ var _curry2 = _curry2$1._curry2_1;
8
+
9
+ /**
10
+ * Creates a function that is bound to a context.
11
+ * Note: `R.bind` does not provide the additional argument-binding capabilities of
12
+ * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
13
+ *
14
+ * @func
15
+ * @memberOf R
16
+ * @since v0.6.0
17
+ * @category Function
18
+ * @category Object
19
+ * @sig (* -> *) -> {*} -> (* -> *)
20
+ * @param {Function} fn The function to bind to context
21
+ * @param {Object} thisObj The context to bind `fn` to
22
+ * @return {Function} A function that will execute in the context of `thisObj`.
23
+ * @see R.partial
24
+ * @example
25
+ *
26
+ * const log = R.bind(console.log, console);
27
+ * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}
28
+ * // logs {a: 2}
29
+ * @symb R.bind(f, o)(a, b) = f.call(o, a, b)
30
+ */
31
+
32
+ var bind = /*#__PURE__*/
33
+ _curry2(function bind(fn, thisObj) {
34
+ return _arity(fn.length, function () {
35
+ return fn.apply(thisObj, arguments);
36
+ });
37
+ });
38
+ var bind$1 = bind;
39
+ var bind_1 = bind$1;
40
+
41
+ exports.bind_1 = bind_1;
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var pipe$1 = require('./pipe.cjs');
4
+ var reverse$1 = require('./reverse.cjs');
5
+
6
+ var pipe = pipe$1.pipe_1;
7
+ var reverse = reverse$1.reverse_1;
8
+
9
+ /**
10
+ * Performs right-to-left function composition. The last argument may have
11
+ * any arity; the remaining arguments must be unary.
12
+ *
13
+ * **Note:** The result of compose is not automatically curried.
14
+ *
15
+ * @func
16
+ * @memberOf R
17
+ * @since v0.1.0
18
+ * @category Function
19
+ * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
20
+ * @param {...Function} ...functions The functions to compose
21
+ * @return {Function}
22
+ * @see R.pipe
23
+ * @example
24
+ *
25
+ * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
26
+ * const yellGreeting = R.compose(R.toUpper, classyGreeting);
27
+ * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
28
+ *
29
+ * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
30
+ *
31
+ * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
32
+ * @symb R.compose(f, g, h)(a)(b) = f(g(h(a)))(b)
33
+ */
34
+
35
+ function compose() {
36
+ if (arguments.length === 0) {
37
+ throw new Error('compose requires at least one argument');
38
+ }
39
+ return pipe.apply(this, reverse(arguments));
40
+ }
41
+ var compose_1 = compose;
42
+
43
+ exports.compose_1 = compose_1;
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ var _curry2$1 = require('./internal/_curry2.cjs');
4
+ var _isArray$1 = require('./internal/_isArray.cjs');
5
+ var _isFunction$1 = require('./internal/_isFunction.cjs');
6
+ var _isString$1 = require('./internal/_isString.cjs');
7
+ var toString$1 = require('./toString.cjs');
8
+
9
+ var _curry2 = _curry2$1._curry2_1;
10
+ var _isArray = _isArray$1._isArray_1;
11
+ var _isFunction = _isFunction$1._isFunction_1;
12
+ var _isString = _isString$1._isString_1;
13
+ var toString = toString$1.toString_1;
14
+
15
+ /**
16
+ * Returns the result of concatenating the given lists or strings.
17
+ *
18
+ * Note: `R.concat` expects both arguments to be of the same type,
19
+ * unlike the native `Array.prototype.concat` method. It will throw
20
+ * an error if you `concat` an Array with a non-Array value.
21
+ *
22
+ * Dispatches to the `concat` method of the first argument, if present.
23
+ * Can also concatenate two members of a [fantasy-land
24
+ * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).
25
+ *
26
+ * @func
27
+ * @memberOf R
28
+ * @since v0.1.0
29
+ * @category List
30
+ * @sig [a] -> [a] -> [a]
31
+ * @sig String -> String -> String
32
+ * @param {Array|String} firstList The first list
33
+ * @param {Array|String} secondList The second list
34
+ * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of
35
+ * `secondList`.
36
+ *
37
+ * @example
38
+ *
39
+ * R.concat('ABC', 'DEF'); // 'ABCDEF'
40
+ * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]
41
+ * R.concat([], []); //=> []
42
+ */
43
+
44
+ var concat = /*#__PURE__*/
45
+ _curry2(function concat(a, b) {
46
+ if (_isArray(a)) {
47
+ if (_isArray(b)) {
48
+ return a.concat(b);
49
+ }
50
+ throw new TypeError(toString(b) + ' is not an array');
51
+ }
52
+ if (_isString(a)) {
53
+ if (_isString(b)) {
54
+ return a + b;
55
+ }
56
+ throw new TypeError(toString(b) + ' is not a string');
57
+ }
58
+ if (a != null && _isFunction(a['fantasy-land/concat'])) {
59
+ return a['fantasy-land/concat'](b);
60
+ }
61
+ if (a != null && _isFunction(a.concat)) {
62
+ return a.concat(b);
63
+ }
64
+ throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"');
65
+ });
66
+ var concat$1 = concat;
67
+ var concat_1 = concat$1;
68
+
69
+ exports.concat_1 = concat_1;
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ var _arity$1 = require('./internal/_arity.cjs');
4
+ var _curry1$1 = require('./internal/_curry1.cjs');
5
+ var _curry2$1 = require('./internal/_curry2.cjs');
6
+ var _curryN$1 = require('./internal/_curryN.cjs');
7
+
8
+ var _arity = _arity$1._arity_1;
9
+ var _curry1 = _curry1$1._curry1_1;
10
+ var _curry2 = _curry2$1._curry2_1;
11
+ var _curryN = _curryN$1._curryN_1;
12
+
13
+ /**
14
+ * Returns a curried equivalent of the provided function, with the specified
15
+ * arity. The curried function has two unusual capabilities. First, its
16
+ * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
17
+ * following are equivalent:
18
+ *
19
+ * - `g(1)(2)(3)`
20
+ * - `g(1)(2, 3)`
21
+ * - `g(1, 2)(3)`
22
+ * - `g(1, 2, 3)`
23
+ *
24
+ * Secondly, the special placeholder value [`R.__`](#__) may be used to specify
25
+ * "gaps", allowing partial application of any combination of arguments,
26
+ * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
27
+ * the following are equivalent:
28
+ *
29
+ * - `g(1, 2, 3)`
30
+ * - `g(_, 2, 3)(1)`
31
+ * - `g(_, _, 3)(1)(2)`
32
+ * - `g(_, _, 3)(1, 2)`
33
+ * - `g(_, 2)(1)(3)`
34
+ * - `g(_, 2)(1, 3)`
35
+ * - `g(_, 2)(_, 3)(1)`
36
+ *
37
+ * @func
38
+ * @memberOf R
39
+ * @since v0.5.0
40
+ * @category Function
41
+ * @sig Number -> (* -> a) -> (* -> a)
42
+ * @param {Number} length The arity for the returned function.
43
+ * @param {Function} fn The function to curry.
44
+ * @return {Function} A new, curried function.
45
+ * @see R.curry
46
+ * @example
47
+ *
48
+ * const sumArgs = (...args) => R.sum(args);
49
+ *
50
+ * const curriedAddFourNumbers = R.curryN(4, sumArgs);
51
+ * const f = curriedAddFourNumbers(1, 2);
52
+ * const g = f(3);
53
+ * g(4); //=> 10
54
+ */
55
+
56
+ var curryN = /*#__PURE__*/
57
+ _curry2(function curryN(length, fn) {
58
+ if (length === 1) {
59
+ return _curry1(fn);
60
+ }
61
+ return _arity(length, _curryN(length, [], fn));
62
+ });
63
+ var curryN$1 = curryN;
64
+ var curryN_1 = curryN$1;
65
+
66
+ exports.curryN_1 = curryN_1;
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var _curry2$1 = require('./internal/_curry2.cjs');
4
+
5
+ var _curry2 = _curry2$1._curry2_1;
6
+
7
+ /**
8
+ * Returns the second argument if it is not `null`, `undefined` or `NaN`;
9
+ * otherwise the first argument is returned.
10
+ *
11
+ * @func
12
+ * @memberOf R
13
+ * @since v0.10.0
14
+ * @category Logic
15
+ * @sig a -> b -> a | b
16
+ * @param {a} default The default value.
17
+ * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`.
18
+ * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value
19
+ * @example
20
+ *
21
+ * const defaultTo42 = R.defaultTo(42);
22
+ *
23
+ * defaultTo42(null); //=> 42
24
+ * defaultTo42(undefined); //=> 42
25
+ * defaultTo42(false); //=> false
26
+ * defaultTo42('Ramda'); //=> 'Ramda'
27
+ * // parseInt('string') results in NaN
28
+ * defaultTo42(parseInt('string')); //=> 42
29
+ */
30
+
31
+ var defaultTo = /*#__PURE__*/
32
+ _curry2(function defaultTo(d, v) {
33
+ return v == null || v !== v ? d : v;
34
+ });
35
+ var defaultTo$1 = defaultTo;
36
+ var defaultTo_1 = defaultTo$1;
37
+
38
+ exports.defaultTo_1 = defaultTo_1;