@blaze-cms/react-page-builder 0.131.0-project-admin-customisations.2 → 0.131.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/CHANGELOG.md +5 -21
  2. package/lib/HOC/recreateOnNavigation.js +29 -0
  3. package/lib/HOC/recreateOnNavigation.js.map +1 -0
  4. package/lib/components/Button.js +1 -2
  5. package/lib/components/Button.js.map +1 -1
  6. package/lib/components/Card/CardsContainer.js +5 -5
  7. package/lib/components/Card/CardsContainer.js.map +1 -1
  8. package/lib/components/Card/CardsRender.js +6 -13
  9. package/lib/components/Card/CardsRender.js.map +1 -1
  10. package/lib/components/Card/helpers/index.js +0 -7
  11. package/lib/components/Card/helpers/index.js.map +1 -1
  12. package/lib/components/Code/Code.js +3 -7
  13. package/lib/components/Code/Code.js.map +1 -1
  14. package/lib/components/ContentGroupSection/ContentGroupSection.js +4 -1
  15. package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  16. package/lib/components/DataSummary/helpers/build-loop-props-content.js +1 -3
  17. package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  18. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +2 -3
  19. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
  20. package/lib/components/Layout/Layout.js +3 -2
  21. package/lib/components/Layout/Layout.js.map +1 -1
  22. package/lib/components/Layout/LayoutFactory.js +35 -0
  23. package/lib/components/Layout/LayoutFactory.js.map +1 -0
  24. package/lib/components/Layout/LayoutWithStickyTimer.js +66 -0
  25. package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -0
  26. package/lib/components/Layout/index.js +2 -2
  27. package/lib/components/Layout/index.js.map +1 -1
  28. package/lib/components/List/ListFactory.js +11 -16
  29. package/lib/components/List/ListFactory.js.map +1 -1
  30. package/lib/components/List/helpers/index.js +0 -14
  31. package/lib/components/List/helpers/index.js.map +1 -1
  32. package/lib/components/SearchContent/SearchContent.js +6 -8
  33. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  34. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +11 -17
  35. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  36. package/lib/components/SearchFilter/SearchFilterContainer.js +85 -63
  37. package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  38. package/lib/components/SearchFilter/helpers/build-filters-query.js +1 -3
  39. package/lib/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
  40. package/lib/components/SearchFilter/helpers/build-new-query.js +15 -0
  41. package/lib/components/SearchFilter/helpers/build-new-query.js.map +1 -0
  42. package/lib/components/SearchFilter/helpers/build-query.js +37 -0
  43. package/lib/components/SearchFilter/helpers/build-query.js.map +1 -0
  44. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js +43 -0
  45. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -0
  46. package/lib/components/SearchFilter/helpers/index.js +11 -18
  47. package/lib/components/SearchFilter/helpers/index.js.map +1 -1
  48. package/lib/components/SearchFilter/index.js.map +1 -1
  49. package/lib/components/SearchFilterSort/SearchFilterSort.js +11 -31
  50. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  51. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +5 -19
  52. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
  53. package/lib/components/SearchFilterSort/helpers/update-sort.js +5 -9
  54. package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
  55. package/lib/helpers/build-inherited-filters.js +0 -2
  56. package/lib/helpers/build-inherited-filters.js.map +1 -1
  57. package/lib/helpers/build-props-query.js +2 -5
  58. package/lib/helpers/build-props-query.js.map +1 -1
  59. package/lib/helpers/build-set-filters.js +1 -5
  60. package/lib/helpers/build-set-filters.js.map +1 -1
  61. package/lib/helpers/get-query-filters.js +8 -6
  62. package/lib/helpers/get-query-filters.js.map +1 -1
  63. package/lib/helpers/get-query-props.js +2 -13
  64. package/lib/helpers/get-query-props.js.map +1 -1
  65. package/lib/helpers/get-wrapped-value-with-link.js +3 -2
  66. package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
  67. package/lib/helpers/index.js +0 -14
  68. package/lib/helpers/index.js.map +1 -1
  69. package/lib/helpers/parse-props-to-display.js +8 -13
  70. package/lib/helpers/parse-props-to-display.js.map +1 -1
  71. package/lib/utils/get-class-modifiers.js +1 -1
  72. package/lib/utils/get-class-modifiers.js.map +1 -1
  73. package/lib-es/HOC/recreateOnNavigation.js +20 -0
  74. package/lib-es/HOC/recreateOnNavigation.js.map +1 -0
  75. package/lib-es/components/Button.js +1 -2
  76. package/lib-es/components/Button.js.map +1 -1
  77. package/lib-es/components/Card/CardsContainer.js +5 -5
  78. package/lib-es/components/Card/CardsContainer.js.map +1 -1
  79. package/lib-es/components/Card/CardsRender.js +7 -14
  80. package/lib-es/components/Card/CardsRender.js.map +1 -1
  81. package/lib-es/components/Card/helpers/index.js +0 -1
  82. package/lib-es/components/Card/helpers/index.js.map +1 -1
  83. package/lib-es/components/Code/Code.js +4 -8
  84. package/lib-es/components/Code/Code.js.map +1 -1
  85. package/lib-es/components/ContentGroupSection/ContentGroupSection.js +8 -4
  86. package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  87. package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +1 -3
  88. package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  89. package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -4
  90. package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
  91. package/lib-es/components/Layout/Layout.js +3 -2
  92. package/lib-es/components/Layout/Layout.js.map +1 -1
  93. package/lib-es/components/Layout/LayoutFactory.js +14 -0
  94. package/lib-es/components/Layout/LayoutFactory.js.map +1 -0
  95. package/lib-es/components/Layout/LayoutWithStickyTimer.js +42 -0
  96. package/lib-es/components/Layout/LayoutWithStickyTimer.js.map +1 -0
  97. package/lib-es/components/Layout/index.js +2 -2
  98. package/lib-es/components/Layout/index.js.map +1 -1
  99. package/lib-es/components/List/ListFactory.js +12 -16
  100. package/lib-es/components/List/ListFactory.js.map +1 -1
  101. package/lib-es/components/List/helpers/index.js +0 -2
  102. package/lib-es/components/List/helpers/index.js.map +1 -1
  103. package/lib-es/components/SearchContent/SearchContent.js +6 -8
  104. package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
  105. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +11 -18
  106. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  107. package/lib-es/components/SearchFilter/SearchFilterContainer.js +72 -47
  108. package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  109. package/lib-es/components/SearchFilter/helpers/build-filters-query.js +0 -2
  110. package/lib-es/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
  111. package/lib-es/components/SearchFilter/helpers/build-new-query.js +6 -0
  112. package/lib-es/components/SearchFilter/helpers/build-new-query.js.map +1 -0
  113. package/lib-es/components/SearchFilter/helpers/build-query.js +23 -0
  114. package/lib-es/components/SearchFilter/helpers/build-query.js.map +1 -0
  115. package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js +26 -0
  116. package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -0
  117. package/lib-es/components/SearchFilter/helpers/index.js +4 -5
  118. package/lib-es/components/SearchFilter/helpers/index.js.map +1 -1
  119. package/lib-es/components/SearchFilter/index.js +2 -2
  120. package/lib-es/components/SearchFilter/index.js.map +1 -1
  121. package/lib-es/components/SearchFilterSort/SearchFilterSort.js +10 -26
  122. package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  123. package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js +4 -21
  124. package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
  125. package/lib-es/components/SearchFilterSort/helpers/update-sort.js +4 -8
  126. package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
  127. package/lib-es/helpers/build-inherited-filters.js +0 -2
  128. package/lib-es/helpers/build-inherited-filters.js.map +1 -1
  129. package/lib-es/helpers/build-props-query.js +2 -4
  130. package/lib-es/helpers/build-props-query.js.map +1 -1
  131. package/lib-es/helpers/build-set-filters.js +1 -5
  132. package/lib-es/helpers/build-set-filters.js.map +1 -1
  133. package/lib-es/helpers/get-query-filters.js +8 -6
  134. package/lib-es/helpers/get-query-filters.js.map +1 -1
  135. package/lib-es/helpers/get-query-props.js +2 -10
  136. package/lib-es/helpers/get-query-props.js.map +1 -1
  137. package/lib-es/helpers/get-wrapped-value-with-link.js +2 -2
  138. package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
  139. package/lib-es/helpers/index.js +0 -2
  140. package/lib-es/helpers/index.js.map +1 -1
  141. package/lib-es/helpers/parse-props-to-display.js +9 -12
  142. package/lib-es/helpers/parse-props-to-display.js.map +1 -1
  143. package/lib-es/utils/get-class-modifiers.js +1 -1
  144. package/lib-es/utils/get-class-modifiers.js.map +1 -1
  145. package/package.json +10 -10
  146. package/src/HOC/recreateOnNavigation.js +21 -0
  147. package/src/components/Button.js +1 -2
  148. package/src/components/Card/CardsContainer.js +3 -3
  149. package/src/components/Card/CardsRender.js +7 -27
  150. package/src/components/Card/helpers/index.js +0 -1
  151. package/src/components/Code/Code.js +3 -7
  152. package/src/components/ContentGroupSection/ContentGroupSection.js +1 -1
  153. package/src/components/DataSummary/helpers/build-loop-props-content.js +1 -4
  154. package/src/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -6
  155. package/src/components/Layout/Layout.js +29 -32
  156. package/src/components/Layout/LayoutFactory.js +17 -0
  157. package/src/components/Layout/LayoutWithStickyTimer.js +40 -0
  158. package/src/components/Layout/index.js +2 -2
  159. package/src/components/List/ListFactory.js +15 -25
  160. package/src/components/List/helpers/index.js +0 -2
  161. package/src/components/SearchContent/SearchContent.js +6 -8
  162. package/src/components/SearchFilter/SearchFilter/SearchFilter.js +12 -21
  163. package/src/components/SearchFilter/SearchFilterContainer.js +69 -57
  164. package/src/components/SearchFilter/helpers/build-filters-query.js +1 -9
  165. package/src/components/SearchFilter/helpers/build-new-query.js +6 -0
  166. package/src/components/SearchFilter/helpers/build-query.js +26 -0
  167. package/src/components/SearchFilter/helpers/get-initial-filter-values.js +30 -0
  168. package/src/components/SearchFilter/helpers/index.js +7 -9
  169. package/src/components/SearchFilter/index.js +2 -2
  170. package/src/components/SearchFilterSort/SearchFilterSort.js +8 -18
  171. package/src/components/SearchFilterSort/helpers/handle-sort-update.js +5 -14
  172. package/src/components/SearchFilterSort/helpers/update-sort.js +3 -7
  173. package/src/helpers/build-inherited-filters.js +1 -3
  174. package/src/helpers/build-props-query.js +2 -4
  175. package/src/helpers/build-set-filters.js +1 -2
  176. package/src/helpers/get-query-filters.js +4 -4
  177. package/src/helpers/get-query-props.js +4 -12
  178. package/src/helpers/get-wrapped-value-with-link.js +3 -6
  179. package/src/helpers/index.js +0 -2
  180. package/src/helpers/parse-props-to-display.js +21 -25
  181. package/src/utils/get-class-modifiers.js +1 -1
  182. package/tests/helpers/mocks.js +5 -3
  183. package/tests/unit/src/HOC/recreateOnNavigation.test.js +28 -0
  184. package/tests/unit/src/components/Code/Code.test.js +0 -5
  185. package/tests/unit/src/components/Code/__snapshots__/Code.test.js.snap +0 -8
  186. package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +0 -9
  187. package/tests/unit/src/components/Layout/Layout.test.js +1 -1
  188. package/tests/unit/src/components/Layout/LayoutFactory.test.js +53 -0
  189. package/tests/unit/src/components/SearchFilter/__snapshots__/SearchFilterContainer.test.js.snap +7 -1
  190. package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +10 -10
  191. package/tests/unit/src/components/SearchFilter/helpers/build-query.test.js +7 -24
  192. package/tests/unit/src/components/SearchFilter/helpers/get-initial-filter-values.test.js +10 -10
  193. package/tests/unit/src/components/SearchFilterSort/SearchFilterSort.test.js +1 -4
  194. package/tests/unit/src/components/SearchFilterSort/helpers/handle-sort-update.test.js +19 -26
  195. package/tests/unit/src/components/SearchFilterSort/helpers/update-sort.test.js +1 -10
  196. package/tests/unit/src/helpers/build-props-query.test.js +0 -25
  197. package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +2 -2
  198. package/tests/unit/src/helpers/parse-props-to-display.test.js +0 -4
  199. package/lib/components/Card/helpers/get-updated-items-to-display.js +0 -55
  200. package/lib/components/Card/helpers/get-updated-items-to-display.js.map +0 -1
  201. package/lib/components/List/helpers/get-list-query.js +0 -43
  202. package/lib/components/List/helpers/get-list-query.js.map +0 -1
  203. package/lib/components/List/helpers/get-list-specific-search-filter.js +0 -21
  204. package/lib/components/List/helpers/get-list-specific-search-filter.js.map +0 -1
  205. package/lib/components/List/helpers/strip-query-key.js +0 -14
  206. package/lib/components/List/helpers/strip-query-key.js.map +0 -1
  207. package/lib/components/SearchFilter/helpers/build-new-url.js +0 -17
  208. package/lib/components/SearchFilter/helpers/build-new-url.js.map +0 -1
  209. package/lib/components/SearchFilter/helpers/build-url-query.js +0 -48
  210. package/lib/components/SearchFilter/helpers/build-url-query.js.map +0 -1
  211. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -32
  212. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +0 -1
  213. package/lib/components/SearchFilter/helpers/get-filter-values.js +0 -31
  214. package/lib/components/SearchFilter/helpers/get-filter-values.js.map +0 -1
  215. package/lib/components/SearchFilter/searchFilterReducer.js +0 -45
  216. package/lib/components/SearchFilter/searchFilterReducer.js.map +0 -1
  217. package/lib/helpers/build-query-key.js +0 -16
  218. package/lib/helpers/build-query-key.js.map +0 -1
  219. package/lib/helpers/process-data-summary-value.js +0 -56
  220. package/lib/helpers/process-data-summary-value.js.map +0 -1
  221. package/lib-es/components/Card/helpers/get-updated-items-to-display.js +0 -32
  222. package/lib-es/components/Card/helpers/get-updated-items-to-display.js.map +0 -1
  223. package/lib-es/components/List/helpers/get-list-query.js +0 -24
  224. package/lib-es/components/List/helpers/get-list-query.js.map +0 -1
  225. package/lib-es/components/List/helpers/get-list-specific-search-filter.js +0 -12
  226. package/lib-es/components/List/helpers/get-list-specific-search-filter.js.map +0 -1
  227. package/lib-es/components/List/helpers/strip-query-key.js +0 -6
  228. package/lib-es/components/List/helpers/strip-query-key.js.map +0 -1
  229. package/lib-es/components/SearchFilter/helpers/build-new-url.js +0 -8
  230. package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +0 -1
  231. package/lib-es/components/SearchFilter/helpers/build-url-query.js +0 -30
  232. package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +0 -1
  233. package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -18
  234. package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +0 -1
  235. package/lib-es/components/SearchFilter/helpers/get-filter-values.js +0 -19
  236. package/lib-es/components/SearchFilter/helpers/get-filter-values.js.map +0 -1
  237. package/lib-es/components/SearchFilter/searchFilterReducer.js +0 -28
  238. package/lib-es/components/SearchFilter/searchFilterReducer.js.map +0 -1
  239. package/lib-es/helpers/build-query-key.js +0 -7
  240. package/lib-es/helpers/build-query-key.js.map +0 -1
  241. package/lib-es/helpers/process-data-summary-value.js +0 -36
  242. package/lib-es/helpers/process-data-summary-value.js.map +0 -1
  243. package/src/components/Card/helpers/get-updated-items-to-display.js +0 -32
  244. package/src/components/List/helpers/get-list-query.js +0 -28
  245. package/src/components/List/helpers/get-list-specific-search-filter.js +0 -10
  246. package/src/components/List/helpers/strip-query-key.js +0 -6
  247. package/src/components/SearchFilter/helpers/build-new-url.js +0 -8
  248. package/src/components/SearchFilter/helpers/build-url-query.js +0 -31
  249. package/src/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -17
  250. package/src/components/SearchFilter/helpers/get-filter-values.js +0 -21
  251. package/src/components/SearchFilter/searchFilterReducer.js +0 -15
  252. package/src/helpers/build-query-key.js +0 -7
  253. package/src/helpers/process-data-summary-value.js +0 -22
  254. package/tests/unit/src/components/Card/helpers/get-updated-items-to-display.test.js +0 -72
  255. package/tests/unit/src/helpers/__snapshots__/get-wrapped-value-with-link.test.js.snap +0 -18
  256. package/tests/unit/src/helpers/prcoess-data-summary-value.test.js +0 -52
@@ -1 +1 @@
1
- {"version":3,"file":"build-props-query.js","names":["_constants","require","defaultProps","ID","categoryProps","checkProps","props","Object","keys","filter","prop","CATEGORY_ID","length","buildPropsQuery","entitySchema","extraProps","arguments","undefined","cardOptions","linkProps","parsedSchema","getEntitySchema","extraPropsHaveCategory","includes","_getTypeBaseProps","getTypeBaseProps","typeBasedProps","shouldAddCategoryProps","allProps","concat","_toConsumableArray2","uniqueProps","Set","basicProps","nestedProps","forEach","push","_prop$split","split","_prop$split2","_slicedToArray2","base","nested","complexProps","buildComplexProps","join","_ref","_ref$relations","relations","_ref$dynamicPropertie","dynamicProperties","_ref$properties","properties","map","hasLink","find","linkProp","matchingProperty","matchingRelation","_ref2","localField","matchingDynamicProp","dynamicKey","jointNestedProps","isCard","_ref3","_ref3$displayCategory","displayCategory","_ref3$displayThumbnai","displayThumbnail","interfaces","isContent","hasCategory","hasPreheader","PREHEADER_PROP","apply","getCategoyProps","getContentProps","url","_ref4","HEADLINE_PROP","_default","exports"],"sources":["../../src/helpers/build-props-query.js"],"sourcesContent":["import { CATEGORY_ID, ID, PREHEADER_PROP, HEADLINE_PROP } from '../constants';\n\nconst defaultProps = [ID, 'name'];\nconst categoryProps = 'id publishedListingPage{id, url}';\n\nconst checkProps = props =>\n !!(props && Object.keys(props).filter(prop => prop === CATEGORY_ID).length);\n\nconst buildPropsQuery = (entitySchema, extraProps = [], cardOptions = null, linkProps = []) => {\n const parsedSchema = entitySchema.getEntitySchema ? entitySchema.getEntitySchema : entitySchema;\n const extraPropsHaveCategory = !!extraProps.filter(prop => prop.includes('category.')).length;\n const { typeBasedProps, shouldAddCategoryProps } = getTypeBaseProps(\n parsedSchema,\n cardOptions,\n extraPropsHaveCategory\n );\n\n const allProps = [...typeBasedProps, ...extraProps];\n const uniqueProps = [...new Set([...allProps])];\n const basicProps = [];\n const nestedProps = {};\n uniqueProps.forEach(prop => {\n if (prop) {\n if (!prop.includes('.')) {\n basicProps.push(prop);\n return;\n }\n const [base, nested] = prop.split('.');\n if (!nestedProps[base]) nestedProps[base] = [nested];\n else nestedProps[base].push(nested);\n }\n });\n\n const complexProps = buildComplexProps(\n shouldAddCategoryProps,\n nestedProps,\n parsedSchema,\n linkProps\n );\n\n return [...basicProps, ...complexProps].join(',');\n};\n\nconst buildComplexProps = (\n shouldAddCategoryProps,\n props,\n { relations = [], dynamicProperties = {}, properties = {} },\n linkProps\n) =>\n Object.keys(props).map(base => {\n const nestedProps = props[base];\n const hasLink = !!linkProps.find(linkProp => linkProp.includes(base));\n const matchingProperty = !!properties[base];\n const matchingRelation = relations.find(({ localField }) => localField === base);\n const matchingDynamicProp = Object.keys(dynamicProperties).find(\n dynamicKey => dynamicKey === base\n );\n\n if (matchingRelation && !nestedProps.includes('id')) nestedProps.push('id');\n if (hasLink && (!!matchingProperty || !!matchingRelation || !!matchingDynamicProp))\n nestedProps.push('url');\n const jointNestedProps = nestedProps.join(',');\n if (base === 'category' && shouldAddCategoryProps)\n return `${base}{${jointNestedProps}, ${categoryProps}}`;\n if (base.includes('published')) {\n return `${base}{${jointNestedProps},url}`;\n }\n return `${base}{${jointNestedProps}}`;\n });\n\nconst getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) => {\n const isCard = !!cardOptions;\n const { displayCategory = true, displayThumbnail = true } = cardOptions || {};\n\n const shouldAddCategoryProps =\n (isCard && displayCategory) || (!isCard && !extraPropsHaveCategory);\n\n if (!isCard) return { typeBasedProps: [ID], shouldAddCategoryProps };\n\n const { interfaces, properties, dynamicProperties, relations } = entitySchema;\n\n const isContent = !!interfaces.includes('content/content');\n const hasCategory = checkProps(properties) || checkProps(dynamicProperties);\n const hasPreheader = properties[PREHEADER_PROP];\n\n const typeBasedProps = [...defaultProps];\n\n typeBasedProps.push(...getCategoyProps(shouldAddCategoryProps, hasCategory, hasPreheader));\n typeBasedProps.push(...getContentProps(isContent));\n\n if (properties.url || dynamicProperties.url) typeBasedProps.push('url');\n\n if (displayThumbnail && relations.find(({ localField }) => localField === 'image')) {\n typeBasedProps.push('image.id', 'image.url', 'image.data');\n }\n\n return { typeBasedProps, shouldAddCategoryProps };\n};\n\nconst getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured'] : []);\n\nconst getCategoyProps = (shouldAddCategoryProps, hasCategory, hasPreheader) => {\n if (!shouldAddCategoryProps) return [];\n const props = [];\n if (hasCategory)\n props.push('category.name', 'category.listingPageId', 'category.listingPageEntity');\n\n if (hasPreheader) {\n props.push(`${PREHEADER_PROP}{name}`);\n props.push(HEADLINE_PROP);\n }\n\n return props;\n};\n\nexport default buildPropsQuery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAMC,YAAY,GAAG,CAACC,aAAE,EAAE,MAAM,CAAC;AACjC,IAAMC,aAAa,GAAG,kCAAkC;AAExD,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAGC,KAAK;EAAA,OACtB,CAAC,EAAEA,KAAK,IAAIC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAACG,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,KAAKC,sBAAW;EAAA,EAAC,CAACC,MAAM,CAAC;AAAA;AAE7E,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,YAAY,EAA0D;EAAA,IAAxDC,UAAU,GAAAC,SAAA,CAAAJ,MAAA,QAAAI,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAG,EAAE;EAAA,IAAEE,WAAW,GAAAF,SAAA,CAAAJ,MAAA,QAAAI,SAAA,QAAAC,SAAA,GAAAD,SAAA,MA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,CAACU,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC;EAC5D;EAEA,OAAO;IAAEV,cAAc,EAAdA,cAAc;IAAEC,sBAAsB,EAAtBA;EAAuB,CAAC;AACnD,CAAC;AAED,IAAMkD,eAAe,GAAG,SAAlBA,eAAeA,CAAGN,SAAS;EAAA,OAAKA,SAAS,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE;AAAA,CAAC;AAExF,IAAMK,eAAe,GAAG,SAAlBA,eAAeA,CAAIjD,sBAAsB,EAAE6C,WAAW,EAAEC,YAAY,EAAK;EAC7E,IAAI,CAAC9C,sBAAsB,EAAE,OAAO,EAAE;EACtC,IAAMrB,KAAK,GAAG,EAAE;EAChB,IAAIkE,WAAW,EACblE,KAAK,CAAC8B,IAAI,CAAC,eAAe,EAAE,wBAAwB,EAAE,4BAA4B,CAAC;EAErF,IAAIqC,YAAY,EAAE;IAChBnE,KAAK,CAAC8B,IAAI,IAAAP,MAAA,CAAI6C,yBAAc,WAAQ,CAAC;IACrCpE,KAAK,CAAC8B,IAAI,CAAC4C,wBAAa,CAAC;EAC3B;EAEA,OAAO1E,KAAK;AACd,CAAC;AAAC,IAAA2E,QAAA,GAEapE,eAAe;AAAAqE,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-props-query.js","names":["_constants","require","defaultProps","ID","categoryProps","checkProps","props","Object","keys","filter","prop","CATEGORY_ID","length","buildPropsQuery","entitySchema","extraProps","arguments","undefined","cardOptions","linkProps","parsedSchema","getEntitySchema","extraPropsHaveCategory","includes","_getTypeBaseProps","getTypeBaseProps","typeBasedProps","shouldAddCategoryProps","allProps","concat","_toConsumableArray2","uniqueProps","Set","basicProps","nestedProps","forEach","push","_prop$split","split","_prop$split2","_slicedToArray2","base","nested","complexProps","buildComplexProps","join","_ref","_ref$relations","relations","_ref$dynamicPropertie","dynamicProperties","map","hasLink","find","linkProp","matchingRelation","_ref2","localField","matchingDynamicProp","dynamicKey","jointNestedProps","isCard","_ref3","_ref3$displayCategory","displayCategory","_ref3$displayThumbnai","displayThumbnail","interfaces","properties","isContent","hasCategory","hasPreheader","PREHEADER_PROP","apply","getCategoyProps","getContentProps","url","_ref4","HEADLINE_PROP","_default","exports"],"sources":["../../src/helpers/build-props-query.js"],"sourcesContent":["import { CATEGORY_ID, ID, PREHEADER_PROP, HEADLINE_PROP } from '../constants';\n\nconst defaultProps = [ID, 'name'];\nconst categoryProps = 'id publishedListingPage{id, url}';\n\nconst checkProps = props =>\n !!(props && Object.keys(props).filter(prop => prop === CATEGORY_ID).length);\n\nconst buildPropsQuery = (entitySchema, extraProps = [], cardOptions = null, linkProps = []) => {\n const parsedSchema = entitySchema.getEntitySchema ? entitySchema.getEntitySchema : entitySchema;\n const extraPropsHaveCategory = !!extraProps.filter(prop => prop.includes('category.')).length;\n const { typeBasedProps, shouldAddCategoryProps } = getTypeBaseProps(\n parsedSchema,\n cardOptions,\n extraPropsHaveCategory\n );\n\n const allProps = [...typeBasedProps, ...extraProps];\n const uniqueProps = [...new Set([...allProps])];\n const basicProps = [];\n const nestedProps = {};\n uniqueProps.forEach(prop => {\n if (prop) {\n if (!prop.includes('.')) {\n basicProps.push(prop);\n return;\n }\n const [base, nested] = prop.split('.');\n if (!nestedProps[base]) nestedProps[base] = [nested];\n else nestedProps[base].push(nested);\n }\n });\n\n const complexProps = buildComplexProps(\n shouldAddCategoryProps,\n nestedProps,\n parsedSchema,\n linkProps\n );\n\n return [...basicProps, ...complexProps].join(',');\n};\n\nconst buildComplexProps = (\n shouldAddCategoryProps,\n props,\n { relations = [], dynamicProperties = {} },\n linkProps\n) =>\n Object.keys(props).map(base => {\n const nestedProps = props[base];\n const hasLink = !!linkProps.find(linkProp => linkProp.includes(base));\n const matchingRelation = relations.find(({ localField }) => localField === base);\n const matchingDynamicProp = Object.keys(dynamicProperties).find(\n dynamicKey => dynamicKey === base\n );\n\n if (matchingRelation && !nestedProps.includes('id')) nestedProps.push('id');\n if (hasLink && (!!matchingRelation || !!matchingDynamicProp)) nestedProps.push('url');\n const jointNestedProps = nestedProps.join(',');\n if (base === 'category' && shouldAddCategoryProps)\n return `${base}{${jointNestedProps}, ${categoryProps}}`;\n if (base.includes('published')) {\n return `${base}{${jointNestedProps},url}`;\n }\n return `${base}{${jointNestedProps}}`;\n });\n\nconst getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) => {\n const isCard = !!cardOptions;\n const { displayCategory = true, displayThumbnail = true } = cardOptions || {};\n\n const shouldAddCategoryProps =\n (isCard && displayCategory) || (!isCard && !extraPropsHaveCategory);\n\n if (!isCard) return { typeBasedProps: [ID], shouldAddCategoryProps };\n\n const { interfaces, properties, dynamicProperties, relations } = entitySchema;\n\n const isContent = !!interfaces.includes('content/content');\n const hasCategory = checkProps(properties) || checkProps(dynamicProperties);\n const hasPreheader = properties[PREHEADER_PROP];\n\n const typeBasedProps = [...defaultProps];\n\n typeBasedProps.push(...getCategoyProps(shouldAddCategoryProps, hasCategory, hasPreheader));\n typeBasedProps.push(...getContentProps(isContent));\n\n if (properties.url || dynamicProperties.url) typeBasedProps.push('url');\n\n if (displayThumbnail && relations.find(({ localField }) => localField === 'image')) {\n typeBasedProps.push('image.id', 'image.url', 'image.data');\n }\n\n return { typeBasedProps, shouldAddCategoryProps };\n};\n\nconst getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured'] : []);\n\nconst getCategoyProps = (shouldAddCategoryProps, hasCategory, hasPreheader) => {\n if (!shouldAddCategoryProps) return [];\n const props = [];\n if (hasCategory)\n props.push('category.name', 'category.listingPageId', 'category.listingPageEntity');\n\n if (hasPreheader) {\n props.push(`${PREHEADER_PROP}{name}`);\n props.push(HEADLINE_PROP);\n }\n\n return props;\n};\n\nexport default buildPropsQuery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAMC,YAAY,GAAG,CAACC,aAAE,EAAE,MAAM,CAAC;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ApplyFilterValues = filterBy.length && filterByProperty.length;
48
- if (!shouldApplyFilterValues) return {
49
- checkboxFilters: checkboxFilters,
50
- listFilterValues: {}
51
- };
52
- var listFilterValues = getFilterValues(filterBy);
48
+ var listFilterValues = shouldApplyFilterValues ? getFilterValues(filterBy) : {};
53
49
  return {
54
50
  checkboxFilters: checkboxFilters,
55
51
  listFilterValues: listFilterValues
@@ -1 +1 @@
1
- {"version":3,"file":"build-set-filters.js","names":["_constants","require","getCheckboxFilters","checkboxFilters","name","push","getFilterValues","filterBy","reduce","acc","filter","_filter$split","split","_filter$split2","_toArray2","fieldName","values","slice","value","join","previousValue","finalValue","concat","_toConsumableArray2","buildSetFilters","_ref","_ref$filterBy","_ref$filterByProperty","filterByProperty","filterByFeatured","filterBySponsored","FEATURED","SPONSORED","shouldApplyFilterValues","length","listFilterValues","_default","exports"],"sources":["../../src/helpers/build-set-filters.js"],"sourcesContent":["import { FEATURED, SPONSORED } from '../constants';\n\nconst getCheckboxFilters = (checkboxFilters, name) => {\n checkboxFilters.push(name);\n};\n\nconst getFilterValues = filterBy =>\n filterBy.reduce((acc, filter) => {\n const [fieldName, ...values] = filter.split('/');\n const value = values.join('/');\n const previousValue = acc[fieldName];\n const finalValue = previousValue ? [...previousValue, value] : [value];\n\n acc[fieldName] = finalValue;\n return acc;\n }, {});\n\nconst buildSetFilters = ({\n filterBy = [],\n filterByProperty = [],\n filterByFeatured,\n filterBySponsored\n}) => {\n const checkboxFilters = [];\n\n if (filterByFeatured) {\n getCheckboxFilters(checkboxFilters, FEATURED);\n }\n if (filterBySponsored) {\n getCheckboxFilters(checkboxFilters, SPONSORED);\n }\n\n const shouldApplyFilterValues = filterBy.length && filterByProperty.length;\n if (!shouldApplyFilterValues) return { checkboxFilters, listFilterValues: {} };\n\n const listFilterValues = getFilterValues(filterBy);\n return { checkboxFilters, listFilterValues };\n};\n\nexport default buildSetFilters;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA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;EAC/C;EACA,IAAID,iBAAiB,EAAE;IACrB5B,kBAAkB,CAACC,eAAe,EAAE6B,oBAAS,CAAC;EAChD;EAEA,IAAMC,uBAAuB,GAAG1B,QAAQ,CAAC2B,MAAM,IAAIN,gBAAgB,CAACM,MAAM;EAC1E,IAAI,CAACD,uBAAuB,EAAE,OAAO;IAAE9B,eAAe,EAAfA,eAAe;IAAEgC,gBAAgB,EAAE,CAAC;EAAE,CAAC;EAE9E,IAAMA,gBAAgB,GAAG7B,eAAe,CAACC,QAAQ,CAAC;EAClD,OAAO;IAAEJ,eAAe,EAAfA,eAAe;IAAEgC,gBAAgB,EAAhBA;EAAiB,CAAC;AAC9C,CAAC;AAAC,IAAAC,QAAA,GAEaZ,eAAe;AAAAa,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-set-filters.js","names":["_constants","require","getCheckboxFilters","checkboxFilters","name","push","getFilterValues","filterBy","reduce","acc","filter","_filter$split","split","_filter$split2","_toArray2","fieldName","values","slice","value","join","previousValue","finalValue","concat","_toConsumableArray2","buildSetFilters","_ref","_ref$filterBy","_ref$filterByProperty","filterByProperty","filterByFeatured","filterBySponsored","FEATURED","SPONSORED","shouldApplyFilterValues","length","listFilterValues","_default","exports"],"sources":["../../src/helpers/build-set-filters.js"],"sourcesContent":["import { FEATURED, SPONSORED } from '../constants';\n\nconst getCheckboxFilters = (checkboxFilters, name) => {\n checkboxFilters.push(name);\n};\n\nconst getFilterValues = filterBy =>\n filterBy.reduce((acc, filter) => {\n const [fieldName, ...values] = filter.split('/');\n const value = values.join('/');\n const previousValue = acc[fieldName];\n const finalValue = previousValue ? [...previousValue, value] : [value];\n\n acc[fieldName] = finalValue;\n return acc;\n }, {});\n\nconst buildSetFilters = ({\n filterBy = [],\n filterByProperty = [],\n filterByFeatured,\n filterBySponsored\n}) => {\n const checkboxFilters = [];\n\n if (filterByFeatured) {\n getCheckboxFilters(checkboxFilters, FEATURED);\n }\n if (filterBySponsored) {\n getCheckboxFilters(checkboxFilters, SPONSORED);\n }\n\n const shouldApplyFilterValues = filterBy.length && filterByProperty.length;\n const listFilterValues = shouldApplyFilterValues ? getFilterValues(filterBy) : {};\n\n return { checkboxFilters, listFilterValues };\n};\n\nexport default buildSetFilters;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,eAAe,EAAEC,IAAI,EAAK;EACpDD,eAAe,CAACE,IAAI,CAACD,IAAI,CAAC;AAC5B,CAAC;AAED,IAAME,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,QAAQ;EAAA,OAC9BA,QAAQ,CAACC,MAAM,CAAC,UAACC,GAAG,EAAEC,MAAM,EAAK;IAC/B,IAAAC,aAAA,GAA+BD,MAAM,CAACE,KAAK,CAAC,GAAG,CAAC;MAAAC,cAAA,OAAAC,SAAA,aAAAH,aAAA;MAAzCI,SAAS,GAAAF,cAAA;MAAKG,MAAM,GAAAH,cAAA,CAAAI,KAAA;IAC3B,IAAMC,KAAK,GAAGF,MAAM,CAACG,IAAI,CAAC,GAAG,CAAC;IAC9B,IAAMC,aAAa,GAAGX,GAAG,CAACM,SAAS,CAAC;IACpC,IAAMM,UAAU,GAAGD,aAAa,MAAAE,MAAA,KAAAC,mBAAA,aAAOH,aAAa,IAAEF,KAAK,KAAI,CAACA,KAAK,CAAC;IAEtET,GAAG,CAACM,SAAS,CAAC,GAAGM,UAAU;IAC3B,OAAOZ,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;AAAA;AAER,IAAMe,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAKf;EAAA,IAAAC,aAAA,GAAAD,IAAA,CAJJlB,QAAQ;IAARA,QAAQ,GAAAmB,aAAA,cAAG,EAAE,GAAAA,aAAA;IAAAC,qBAAA,GAAAF,IAAA,CACbG,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;IACrBE,gBAAgB,GAAAJ,IAAA,CAAhBI,gBAAgB;IAChBC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;EAEjB,IAAM3B,eAAe,GAAG,EAAE;EAE1B,IAAI0B,gBAAgB,EAAE;IACpB3B,kBAAkB,CAACC,eAAe,EAAE4B,mBAAQ,CAAC;EAC/C;EACA,IAAID,iBAAiB,EAAE;IACrB5B,kBAAkB,CAACC,eAAe,EAAE6B,oBAAS,CAAC;EAChD;EAEA,IAAMC,uBAAuB,GAAG1B,QAAQ,CAAC2B,MAAM,IAAIN,gBAAgB,CAACM,MAAM;EAC1E,IAAMC,gBAAgB,GAAGF,uBAAuB,GAAG3B,eAAe,CAACC,QAAQ,CAAC,GAAG,CAAC,CAAC;EAEjF,OAAO;IAAEJ,eAAe,EAAfA,eAAe;IAAEgC,gBAAgB,EAAhBA;EAAiB,CAAC;AAC9C,CAAC;AAAC,IAAAC,QAAA,GAEaZ,eAAe;AAAAa,OAAA,cAAAD,QAAA"}
@@ -12,15 +12,17 @@ require("core-js/modules/web.dom-collections.iterator.js");
12
12
  var _getSearchFilterType = _interopRequireDefault(require("./get-search-filter-type"));
13
13
  var _buildSearchValuesCheckboxSelect = _interopRequireDefault(require("./build-search-values-checkbox-select"));
14
14
  var _constants = require("../constants");
15
- var getQueryFilters = function getQueryFilters(searchFilter, query, listName) {
16
- if (!searchFilter.settings || !searchFilter.settings.filters) return {
17
- valuesAnd: [],
18
- valuesOr: []
19
- };
15
+ var getQueryFilters = function getQueryFilters(searchFilter, query) {
16
+ if (!searchFilter.settings || !searchFilter.settings.filters) {
17
+ return {
18
+ valuesAnd: [],
19
+ valuesOr: []
20
+ };
21
+ }
20
22
  var rangeFilters = (0, _getSearchFilterType["default"])(searchFilter, _constants.RANGE);
21
23
  var checkboxFilters = (0, _getSearchFilterType["default"])(searchFilter, _constants.CHECKBOX);
22
24
  var selectFilters = (0, _getSearchFilterType["default"])(searchFilter, _constants.SELECT);
23
- var _buildSearchValuesChe = (0, _buildSearchValuesCheckboxSelect["default"])(query, rangeFilters, checkboxFilters, selectFilters, listName),
25
+ var _buildSearchValuesChe = (0, _buildSearchValuesCheckboxSelect["default"])(query, rangeFilters, checkboxFilters, selectFilters),
24
26
  valuesAnd = _buildSearchValuesChe.values,
25
27
  valuesOr = _buildSearchValuesChe.valuesOr;
26
28
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"get-query-filters.js","names":["_getSearchFilterType","_interopRequireDefault","require","_buildSearchValuesCheckboxSelect","_constants","getQueryFilters","searchFilter","query","listName","settings","filters","valuesAnd","valuesOr","rangeFilters","getSearchFilterType","RANGE","checkboxFilters","CHECKBOX","selectFilters","SELECT","_buildSearchValuesChe","buildSearchValuesCheckboxSelect","values","_default","exports"],"sources":["../../src/helpers/get-query-filters.js"],"sourcesContent":["import getSearchFilterType from './get-search-filter-type';\nimport buildSearchValuesCheckboxSelect from './build-search-values-checkbox-select';\nimport { RANGE, CHECKBOX, SELECT } from '../constants';\n\nconst getQueryFilters = (searchFilter, query, listName) => {\n if (!searchFilter.settings || !searchFilter.settings.filters)\n return { valuesAnd: [], valuesOr: [] };\n\n const rangeFilters = getSearchFilterType(searchFilter, RANGE);\n const checkboxFilters = getSearchFilterType(searchFilter, CHECKBOX);\n const selectFilters = getSearchFilterType(searchFilter, SELECT);\n\n const { values: valuesAnd, valuesOr } = buildSearchValuesCheckboxSelect(\n query,\n rangeFilters,\n checkboxFilters,\n selectFilters,\n listName\n );\n return { valuesAnd, valuesOr };\n};\n\nexport default getQueryFilters;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAK;EACzD,IAAI,CAACF,YAAY,CAACG,QAAQ,IAAI,CAACH,YAAY,CAACG,QAAQ,CAACC,OAAO,EAC1D,OAAO;IAAEC,SAAS,EAAE,EAAE;IAAEC,QAAQ,EAAE;EAAG,CAAC;EAExC,IAAMC,YAAY,GAAG,IAAAC,+BAAmB,EAACR,YAAY,EAAES,gBAAK,CAAC;EAC7D,IAAMC,eAAe,GAAG,IAAAF,+BAAmB,EAACR,YAAY,EAAEW,mBAAQ,CAAC;EACnE,IAAMC,aAAa,GAAG,IAAAJ,+BAAmB,EAACR,YAAY,EAAEa,iBAAM,CAAC;EAE/D,IAAAC,qBAAA,GAAwC,IAAAC,2CAA+B,EACrEd,KAAK,EACLM,YAAY,EACZG,eAAe,EACfE,aAAa,EACbV,QACF,CAAC;IANeG,SAAS,GAAAS,qBAAA,CAAjBE,MAAM;IAAaV,QAAQ,GAAAQ,qBAAA,CAARR,QAAQ;EAOnC,OAAO;IAAED,SAAS,EAATA,SAAS;IAAEC,QAAQ,EAARA;EAAS,CAAC;AAChC,CAAC;AAAC,IAAAW,QAAA,GAEalB,eAAe;AAAAmB,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"get-query-filters.js","names":["_getSearchFilterType","_interopRequireDefault","require","_buildSearchValuesCheckboxSelect","_constants","getQueryFilters","searchFilter","query","settings","filters","valuesAnd","valuesOr","rangeFilters","getSearchFilterType","RANGE","checkboxFilters","CHECKBOX","selectFilters","SELECT","_buildSearchValuesChe","buildSearchValuesCheckboxSelect","values","_default","exports"],"sources":["../../src/helpers/get-query-filters.js"],"sourcesContent":["import getSearchFilterType from './get-search-filter-type';\nimport buildSearchValuesCheckboxSelect from './build-search-values-checkbox-select';\nimport { RANGE, CHECKBOX, SELECT } from '../constants';\n\nconst getQueryFilters = (searchFilter, query) => {\n if (!searchFilter.settings || !searchFilter.settings.filters) {\n return { valuesAnd: [], valuesOr: [] };\n }\n\n const rangeFilters = getSearchFilterType(searchFilter, RANGE);\n const checkboxFilters = getSearchFilterType(searchFilter, CHECKBOX);\n const selectFilters = getSearchFilterType(searchFilter, SELECT);\n\n const { values: valuesAnd, valuesOr } = buildSearchValuesCheckboxSelect(\n query,\n rangeFilters,\n checkboxFilters,\n selectFilters\n );\n return { valuesAnd, valuesOr };\n};\n\nexport default getQueryFilters;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,YAAY,EAAEC,KAAK,EAAK;EAC/C,IAAI,CAACD,YAAY,CAACE,QAAQ,IAAI,CAACF,YAAY,CAACE,QAAQ,CAACC,OAAO,EAAE;IAC5D,OAAO;MAAEC,SAAS,EAAE,EAAE;MAAEC,QAAQ,EAAE;IAAG,CAAC;EACxC;EAEA,IAAMC,YAAY,GAAG,IAAAC,+BAAmB,EAACP,YAAY,EAAEQ,gBAAK,CAAC;EAC7D,IAAMC,eAAe,GAAG,IAAAF,+BAAmB,EAACP,YAAY,EAAEU,mBAAQ,CAAC;EACnE,IAAMC,aAAa,GAAG,IAAAJ,+BAAmB,EAACP,YAAY,EAAEY,iBAAM,CAAC;EAE/D,IAAAC,qBAAA,GAAwC,IAAAC,2CAA+B,EACrEb,KAAK,EACLK,YAAY,EACZG,eAAe,EACfE,aACF,CAAC;IALeP,SAAS,GAAAS,qBAAA,CAAjBE,MAAM;IAAaV,QAAQ,GAAAQ,qBAAA,CAARR,QAAQ;EAMnC,OAAO;IAAED,SAAS,EAATA,SAAS;IAAEC,QAAQ,EAARA;EAAS,CAAC;AAChC,CAAC;AAAC,IAAAW,QAAA,GAEajB,eAAe;AAAAkB,OAAA,cAAAD,QAAA"}
@@ -10,17 +10,12 @@ require("core-js/modules/es.array.reduce.js");
10
10
  require("core-js/modules/es.object.to-string.js");
11
11
  require("core-js/modules/es.array.concat.js");
12
12
  require("core-js/modules/es.array.join.js");
13
- require("core-js/modules/es.array.find.js");
14
- require("core-js/modules/es.object.keys.js");
15
13
  var _isFilterEntitysId = _interopRequireDefault(require("./is-filter-entitys-id"));
16
14
  var _getFilterProps2 = _interopRequireDefault(require("./get-filter-props"));
17
15
  var _constants = require("../constants");
18
- var getQueryProps = function getQueryProps(inheritedFilters, currentSchema) {
19
- var filterEntitySchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
16
+ var getQueryProps = function getQueryProps(inheritedFilters, currentSchema, filterEntitySchema) {
20
17
  if (!currentSchema || !inheritedFilters.length) return _constants.ID;
21
- var currentEntityId = currentSchema.identifier,
22
- properties = currentSchema.properties;
23
- var filterEntityId = filterEntitySchema.identifier;
18
+ var currentEntityId = currentSchema.identifier;
24
19
  return inheritedFilters.reduce(function (acc, filter) {
25
20
  var _getFilterProps = (0, _getFilterProps2["default"])(filter, currentSchema, filterEntitySchema),
26
21
  filterName = _getFilterProps.filterName,
@@ -34,12 +29,6 @@ var getQueryProps = function getQueryProps(inheritedFilters, currentSchema) {
34
29
  if (relationForeignKeys && relationForeignKeys.length) {
35
30
  return "".concat(acc, " ").concat(relationForeignKeys.join(' '));
36
31
  }
37
- if (filterName === _constants.ID) {
38
- var queryValue = Object.keys(properties).find(function (propKey) {
39
- return properties[propKey] && properties[propKey].relation && properties[propKey].relation.entityIdentifier === filterEntityId;
40
- });
41
- if (queryValue) return "".concat(acc, " ").concat(queryValue, " ");
42
- }
43
32
  var queryProp = relationEntityName ? "".concat(relationName, " { ").concat(relationProp, " }") : filterName;
44
33
  var queryPropFinalValue = isEntityItself && (0, _isFilterEntitysId["default"])(filterName, currentEntityId) ? _constants.ID : queryProp;
45
34
  return "".concat(acc, " ").concat(queryPropFinalValue, " ");
@@ -1 +1 @@
1
- {"version":3,"file":"get-query-props.js","names":["_isFilterEntitysId","_interopRequireDefault","require","_getFilterProps2","_constants","getQueryProps","inheritedFilters","currentSchema","filterEntitySchema","arguments","length","undefined","ID","currentEntityId","identifier","properties","filterEntityId","reduce","acc","filter","_getFilterProps","getFilterProps","filterName","relationName","relationProp","relationEntityName","isEntityItself","relationForeignKeys","shouldIgnoreFilter","concat","join","queryValue","Object","keys","find","propKey","relation","entityIdentifier","queryProp","queryPropFinalValue","isFilterEntitysId","_default","exports"],"sources":["../../src/helpers/get-query-props.js"],"sourcesContent":["import isFilterEntitysId from './is-filter-entitys-id';\nimport getFilterProps from './get-filter-props';\nimport { ID } from '../constants';\n\nconst getQueryProps = (inheritedFilters, currentSchema, filterEntitySchema = {}) => {\n if (!currentSchema || !inheritedFilters.length) return ID;\n\n const { identifier: currentEntityId, properties } = currentSchema;\n const { identifier: filterEntityId } = filterEntitySchema;\n\n return inheritedFilters.reduce((acc, filter) => {\n const {\n filterName,\n relationName,\n relationProp,\n relationEntityName,\n isEntityItself,\n relationForeignKeys,\n shouldIgnoreFilter\n } = getFilterProps(filter, currentSchema, filterEntitySchema);\n if (shouldIgnoreFilter) return acc;\n if (relationForeignKeys && relationForeignKeys.length) {\n return `${acc} ${relationForeignKeys.join(' ')}`;\n }\n if (filterName === ID) {\n const queryValue = Object.keys(properties).find(\n propKey =>\n properties[propKey] &&\n properties[propKey].relation &&\n properties[propKey].relation.entityIdentifier === filterEntityId\n );\n if (queryValue) return `${acc} ${queryValue} `;\n }\n const queryProp = relationEntityName ? `${relationName} { ${relationProp} }` : filterName;\n const queryPropFinalValue =\n isEntityItself && isFilterEntitysId(filterName, currentEntityId) ? ID : queryProp;\n\n return `${acc} ${queryPropFinalValue} `;\n }, ID);\n};\n\nexport default getQueryProps;\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAMG,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,gBAAgB,EAAEC,aAAa,EAA8B;EAAA,IAA5BC,kBAAkB,GAAAC,SAAA,CAAAC,MAAA,QAA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A,CACpE,CAAC;MACD,IAAIe,UAAU,EAAE,UAAAF,MAAA,CAAUX,GAAG,OAAAW,MAAA,CAAIE,UAAU;IAC7C;IACA,IAAMO,SAAS,GAAGb,kBAAkB,MAAAI,MAAA,CAAMN,YAAY,SAAAM,MAAA,CAAML,YAAY,UAAOF,UAAU;IACzF,IAAMiB,mBAAmB,GACvBb,cAAc,IAAI,IAAAc,6BAAiB,EAAClB,UAAU,EAAET,eAAe,CAAC,GAAGD,aAAE,GAAG0B,SAAS;IAEnF,UAAAT,MAAA,CAAUX,GAAG,OAAAW,MAAA,CAAIU,mBAAmB;EACtC,CAAC,EAAE3B,aAAE,CAAC;AACR,CAAC;AAAC,IAAA6B,QAAA,GAEapC,aAAa;AAAAqC,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"get-query-props.js","names":["_isFilterEntitysId","_interopRequireDefault","require","_getFilterProps2","_constants","getQueryProps","inheritedFilters","currentSchema","filterEntitySchema","length","ID","currentEntityId","identifier","reduce","acc","filter","_getFilterProps","getFilterProps","filterName","relationName","relationProp","relationEntityName","isEntityItself","relationForeignKeys","shouldIgnoreFilter","concat","join","queryProp","queryPropFinalValue","isFilterEntitysId","_default","exports"],"sources":["../../src/helpers/get-query-props.js"],"sourcesContent":["import isFilterEntitysId from './is-filter-entitys-id';\nimport getFilterProps from './get-filter-props';\nimport { ID } from '../constants';\n\nconst getQueryProps = (inheritedFilters, currentSchema, filterEntitySchema) => {\n if (!currentSchema || !inheritedFilters.length) return ID;\n\n const { identifier: currentEntityId } = currentSchema;\n\n return inheritedFilters.reduce((acc, filter) => {\n const {\n filterName,\n relationName,\n relationProp,\n relationEntityName,\n isEntityItself,\n relationForeignKeys,\n shouldIgnoreFilter\n } = getFilterProps(filter, currentSchema, filterEntitySchema);\n\n if (shouldIgnoreFilter) return acc;\n if (relationForeignKeys && relationForeignKeys.length) {\n return `${acc} ${relationForeignKeys.join(' ')}`;\n }\n\n const queryProp = relationEntityName ? `${relationName} { ${relationProp} }` : filterName;\n const queryPropFinalValue =\n isEntityItself && isFilterEntitysId(filterName, currentEntityId) ? ID : queryProp;\n\n return `${acc} ${queryPropFinalValue} `;\n }, ID);\n};\n\nexport default getQueryProps;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAMG,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,gBAAgB,EAAEC,aAAa,EAAEC,kBAAkB,EAAK;EAC7E,IAAI,CAACD,aAAa,IAAI,CAACD,gBAAgB,CAACG,MAAM,EAAE,OAAOC,aAAE;EAEzD,IAAoBC,eAAe,GAAKJ,aAAa,CAA7CK,UAAU;EAElB,OAAON,gBAAgB,CAACO,MAAM,CAAC,UAACC,GAAG,EAAEC,MAAM,EAAK;IAC9C,IAAAC,eAAA,GAQI,IAAAC,2BAAc,EAACF,MAAM,EAAER,aAAa,EAAEC,kBAAkB,CAAC;MAP3DU,UAAU,GAAAF,eAAA,CAAVE,UAAU;MACVC,YAAY,GAAAH,eAAA,CAAZG,YAAY;MACZC,YAAY,GAAAJ,eAAA,CAAZI,YAAY;MACZC,kBAAkB,GAAAL,eAAA,CAAlBK,kBAAkB;MAClBC,cAAc,GAAAN,eAAA,CAAdM,cAAc;MACdC,mBAAmB,GAAAP,eAAA,CAAnBO,mBAAmB;MACnBC,kBAAkB,GAAAR,eAAA,CAAlBQ,kBAAkB;IAGpB,IAAIA,kBAAkB,EAAE,OAAOV,GAAG;IAClC,IAAIS,mBAAmB,IAAIA,mBAAmB,CAACd,MAAM,EAAE;MACrD,UAAAgB,MAAA,CAAUX,GAAG,OAAAW,MAAA,CAAIF,mBAAmB,CAACG,IAAI,CAAC,GAAG,CAAC;IAChD;IAEA,IAAMC,SAAS,GAAGN,kBAAkB,MAAAI,MAAA,CAAMN,YAAY,SAAAM,MAAA,CAAML,YAAY,UAAOF,UAAU;IACzF,IAAMU,mBAAmB,GACvBN,cAAc,IAAI,IAAAO,6BAAiB,EAACX,UAAU,EAAEP,eAAe,CAAC,GAAGD,aAAE,GAAGiB,SAAS;IAEnF,UAAAF,MAAA,CAAUX,GAAG,OAAAW,MAAA,CAAIG,mBAAmB;EACtC,CAAC,EAAElB,aAAE,CAAC;AACR,CAAC;AAAC,IAAAoB,QAAA,GAEazB,aAAa;AAAA0B,OAAA,cAAAD,QAAA"}
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports["default"] = void 0;
9
9
  require("core-js/modules/es.array.is-array.js");
10
10
  require("core-js/modules/es.array.map.js");
11
+ require("core-js/modules/es.array.concat.js");
11
12
  require("core-js/modules/es.array.join.js");
12
13
  var _react = _interopRequireDefault(require("react"));
13
14
  var _BlazeLink = _interopRequireDefault(require("../components/BlazeLink"));
@@ -19,11 +20,11 @@ var getWrappedValueWithLink = function getWrappedValueWithLink(value, link) {
19
20
  url = arrValue.url;
20
21
  var keyValue = arrValue[keyField];
21
22
  var isLastItem = index === value.length - 1;
22
- var keyFieldValue = isLastItem ? keyValue : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, keyValue, ", ");
23
+ var keyFieldValue = isLastItem ? keyValue : keyValue.concat(',');
23
24
  return url ? /*#__PURE__*/_react["default"].createElement(_BlazeLink["default"], {
24
25
  key: [keyPrefix, index].join('-'),
25
26
  href: url
26
- }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, keyFieldValue, " ")) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, keyFieldValue, " ");
27
+ }, "".concat(keyFieldValue, " ")) : "".concat(keyFieldValue, " ");
27
28
  });
28
29
  return arrayResults.length ? arrayResults : null;
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-wrapped-value-with-link.js","names":["_react","_interopRequireDefault","require","_BlazeLink","getWrappedValueWithLink","value","link","keyPrefix","arguments","length","undefined","Array","isArray","arrayResults","map","arrValue","index","keyField","url","keyValue","isLastItem","keyFieldValue","createElement","Fragment","key","join","href","_default","exports"],"sources":["../../src/helpers/get-wrapped-value-with-link.js"],"sourcesContent":["import React from 'react';\nimport BlazeLink from '../components/BlazeLink';\n\nconst getWrappedValueWithLink = (value, link, keyPrefix = '') => {\n if (Array.isArray(value)) {\n const arrayResults = value.map((arrValue, index) => {\n const { keyField, url } = arrValue;\n const keyValue = arrValue[keyField];\n\n const isLastItem = index === value.length - 1;\n const keyFieldValue = isLastItem ? keyValue : <>{keyValue}, </>;\n\n return url ? (\n <BlazeLink key={[keyPrefix, index].join('-')} href={url}>\n {<>{keyFieldValue} </>}\n </BlazeLink>\n ) : (\n <>{keyFieldValue} </>\n );\n });\n\n return arrayResults.length ? arrayResults : null;\n }\n\n return link ? <BlazeLink href={link}>{value}</BlazeLink> : value;\n};\n\nexport default getWrappedValueWithLink;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,KAAK,EAAEC,IAAI,EAAqB;EAAA,IAAnBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAC1D,IAAIG,KAAK,CAACC,OAAO,CAACP,KAAK,CAAC,EAAE;IACxB,IAAMQ,YAAY,GAAGR,KAAK,CAACS,GAAG,CAAC,UAACC,QAAQ,EAAEC,KAAK,EAAK;MAClD,IAAQC,QAAQ,GAAUF,QAAQ,CAA1BE,QAAQ;QAAEC,GAAG,GAAKH,QAAQ,CAAhBG,GAAG;MACrB,IAAMC,QAAQ,GAAGJ,QAAQ,CAACE,QAAQ,CAAC;MAEnC,IAAMG,UAAU,GAAGJ,KAAK,KAAKX,KAAK,CAACI,MAAM,GAAG,CAAC;MAC7C,IAAMY,aAAa,GAAGD,UAAU,GAAGD,QAAQ,gBAAGnB,MAAA,YAAAsB,aAAA,CAAAtB,MAAA,YAAAuB,QAAA,QAAGJ,QAAQ,EAAC,IAAI,CAAC;MAE/D,OAAOD,GAAG,gBACRlB,MAAA,YAAAsB,aAAA,CAACnB,UAAA,WAAS;QAACqB,GAAG,EAAE,CAACjB,SAAS,EAAES,KAAK,CAAC,CAACS,IAAI,CAAC,GAAG,CAAE;QAACC,IAAI,EAAER;MAAI,gBACrDlB,MAAA,YAAAsB,aAAA,CAAAtB,MAAA,YAAAuB,QAAA,QAAGF,aAAa,EAAC,GAAG,CACZ,CAAC,gBAEZrB,MAAA,YAAAsB,aAAA,CAAAtB,MAAA,YAAAuB,QAAA,QAAGF,aAAa,EAAC,GAAG,CACrB;IACH,CAAC,CAAC;IAEF,OAAOR,YAAY,CAACJ,MAAM,GAAGI,YAAY,GAAG,IAAI;EAClD;EAEA,OAAOP,IAAI,gBAAGN,MAAA,YAAAsB,aAAA,CAACnB,UAAA,WAAS;IAACuB,IAAI,EAAEpB;EAAK,GAAED,KAAiB,CAAC,GAAGA,KAAK;AAClE,CAAC;AAAC,IAAAsB,QAAA,GAEavB,uBAAuB;AAAAwB,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"get-wrapped-value-with-link.js","names":["_react","_interopRequireDefault","require","_BlazeLink","getWrappedValueWithLink","value","link","keyPrefix","arguments","length","undefined","Array","isArray","arrayResults","map","arrValue","index","keyField","url","keyValue","isLastItem","keyFieldValue","concat","createElement","key","join","href","_default","exports"],"sources":["../../src/helpers/get-wrapped-value-with-link.js"],"sourcesContent":["import React from 'react';\nimport BlazeLink from '../components/BlazeLink';\n\nconst getWrappedValueWithLink = (value, link, keyPrefix = '') => {\n if (Array.isArray(value)) {\n const arrayResults = value.map((arrValue, index) => {\n const { keyField, url } = arrValue;\n const keyValue = arrValue[keyField];\n const isLastItem = index === value.length - 1;\n const keyFieldValue = isLastItem ? keyValue : keyValue.concat(',');\n\n return url ? (\n <BlazeLink key={[keyPrefix, index].join('-')} href={url}>{`${keyFieldValue} `}</BlazeLink>\n ) : (\n `${keyFieldValue} `\n );\n });\n\n return arrayResults.length ? arrayResults : null;\n }\n\n return link ? <BlazeLink href={link}>{value}</BlazeLink> : value;\n};\n\nexport default getWrappedValueWithLink;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,KAAK,EAAEC,IAAI,EAAqB;EAAA,IAAnBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAC1D,IAAIG,KAAK,CAACC,OAAO,CAACP,KAAK,CAAC,EAAE;IACxB,IAAMQ,YAAY,GAAGR,KAAK,CAACS,GAAG,CAAC,UAACC,QAAQ,EAAEC,KAAK,EAAK;MAClD,IAAQC,QAAQ,GAAUF,QAAQ,CAA1BE,QAAQ;QAAEC,GAAG,GAAKH,QAAQ,CAAhBG,GAAG;MACrB,IAAMC,QAAQ,GAAGJ,QAAQ,CAACE,QAAQ,CAAC;MACnC,IAAMG,UAAU,GAAGJ,KAAK,KAAKX,KAAK,CAACI,MAAM,GAAG,CAAC;MAC7C,IAAMY,aAAa,GAAGD,UAAU,GAAGD,QAAQ,GAAGA,QAAQ,CAACG,MAAM,CAAC,GAAG,CAAC;MAElE,OAAOJ,GAAG,gBACRlB,MAAA,YAAAuB,aAAA,CAACpB,UAAA,WAAS;QAACqB,GAAG,EAAE,CAACjB,SAAS,EAAES,KAAK,CAAC,CAACS,IAAI,CAAC,GAAG,CAAE;QAACC,IAAI,EAAER;MAAI,MAAAI,MAAA,CAAKD,aAAa,MAAe,CAAC,MAAAC,MAAA,CAEvFD,aAAa,MACjB;IACH,CAAC,CAAC;IAEF,OAAOR,YAAY,CAACJ,MAAM,GAAGI,YAAY,GAAG,IAAI;EAClD;EAEA,OAAOP,IAAI,gBAAGN,MAAA,YAAAuB,aAAA,CAACpB,UAAA,WAAS;IAACuB,IAAI,EAAEpB;EAAK,GAAED,KAAiB,CAAC,GAAGA,KAAK;AAClE,CAAC;AAAC,IAAAsB,QAAA,GAEavB,uBAAuB;AAAAwB,OAAA,cAAAD,QAAA"}
@@ -41,12 +41,6 @@ Object.defineProperty(exports, "buildQueryFields", {
41
41
  return _buildQueryFields["default"];
42
42
  }
43
43
  });
44
- Object.defineProperty(exports, "buildQueryKey", {
45
- enumerable: true,
46
- get: function get() {
47
- return _buildQueryKey["default"];
48
- }
49
- });
50
44
  Object.defineProperty(exports, "buildRawQuery", {
51
45
  enumerable: true,
52
46
  get: function get() {
@@ -281,12 +275,6 @@ Object.defineProperty(exports, "parseTextBlock", {
281
275
  return _parseTextBlock["default"];
282
276
  }
283
277
  });
284
- Object.defineProperty(exports, "processDataSummaryValue", {
285
- enumerable: true,
286
- get: function get() {
287
- return _processDataSummaryValue["default"];
288
- }
289
- });
290
278
  Object.defineProperty(exports, "removeExtraItems", {
291
279
  enumerable: true,
292
280
  get: function get() {
@@ -388,6 +376,4 @@ var _getParsedPropValues = _interopRequireDefault(require("./get-parsed-prop-val
388
376
  var _getSanitizedPropValues = _interopRequireDefault(require("./get-sanitized-prop-values"));
389
377
  var _appendImages = _interopRequireDefault(require("./append-images"));
390
378
  var _parseTextBlock = _interopRequireDefault(require("./parse-TextBlock"));
391
- var _processDataSummaryValue = _interopRequireDefault(require("./process-data-summary-value"));
392
- var _buildQueryKey = _interopRequireDefault(require("./build-query-key"));
393
379
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_buildInheritedFilters","_interopRequireDefault","require","_buildLinkExtraProps","_buildPropsQuery","_buildQueryFields","_buildRawQuery","_buildRawQueryBase","_buildSearchValuesCheckboxSelect","_buildSearchValuesText","_buildSetFilters","_checkPropsToUse","_getElasticsearchOperator","_getClickWrapperOptions","_getEntitiesWithBanner","_getEntityData","_getEntityRenderProps","_getGenericProps","_getGenericRenderVariables","_getImageIds","_getInheritedFilters","_getModifiers","_getNotEqualQuery","_getPaginationIndex","_getParsedSummaryValue","_getQueryFilters","_getQueryProps","_getRequiredSchemas","_getSearchFilterType","_getUnpublishedEntityName","_getWrappedValueWithLink","_getItemsToDisplayIds","_isBrowser","_isFilterEntitysId","_isObject","_isUsingRelationImage","_parsePropsToDisplay","_renderChildren","_shouldRenderWaypoint","_shouldShowProperty","_sortResponseData","_splitChildren","_getCurrentOffset","_updateChildrensParent","_getDisplayCountData","_buildImageProperties","_getUpdatedFilterBy","_checkForError","_removeUnwantedCharacters","_hasChildren","_removeExtraItems","_getParsedPropValues","_getSanitizedPropValues","_appendImages","_parseTextBlock","_processDataSummaryValue","_buildQueryKey"],"sources":["../../src/helpers/index.js"],"sourcesContent":["export { default as buildInheritedFilters } from './build-inherited-filters';\nexport { default as buildLinkExtraProps } from './build-link-extra-props';\nexport { default as buildPropsQuery } from './build-props-query';\nexport { default as buildQueryFields } from './build-query-fields';\nexport { default as buildRawQuery } from './build-raw-query';\nexport { default as buildRawQueryBase } from './build-raw-query-base';\nexport { default as buildSearchValuesCheckboxSelect } from './build-search-values-checkbox-select';\nexport { default as buildSearchValuesText } from './build-search-values-text';\nexport { default as buildSetFilters } from './build-set-filters';\nexport { default as checkPropsToUse } from './check-props-to-use';\nexport { default as getElasticsearchOperator } from './get-elasticsearch-operator';\nexport { default as getClickWrapperOptions } from './get-click-wrapper-options';\nexport { default as getEntitiesWithBanner } from './get-entities-with-banner';\nexport { default as getEntityData } from './get-entity-data';\nexport { default as getEntityRenderProps } from './get-entity-render-props';\nexport { default as getGenericProps } from './get-generic-props';\nexport { default as getGenericRenderVariables } from './get-generic-render-variables';\nexport { default as getImageIds } from './get-image-ids';\nexport { default as getInheritedFilters } from './get-inherited-filters';\nexport { default as getModifiers } from './get-modifiers';\nexport { default as getNotEqualQuery } from './get-not-equal-query';\nexport { default as getPaginationIndex } from './get-pagination-index';\nexport { default as getParsedSummaryValue } from './get-parsed-summary-value';\nexport { default as getQueryFilters } from './get-query-filters';\nexport { default as getQueryProps } from './get-query-props';\nexport { default as getRequiredSchemas } from './get-required-schemas';\nexport { default as getSearchFilterType } from './get-search-filter-type';\nexport { default as getUnpublishedEntityName } from './get-unpublished-entity-name';\nexport { default as getWrappedValueWithLink } from './get-wrapped-value-with-link';\nexport { default as getItemsToDisplayIds } from './get-items-to-display-ids';\nexport { default as isBrowser } from './is-browser';\nexport { default as isFilterEntitysId } from './is-filter-entitys-id';\nexport { default as isObject } from './is-object';\nexport { default as isUsingRelationImage } from './is-using-relation-image';\nexport { default as parsePropsToDisplay } from './parse-props-to-display';\nexport { default as renderChildren } from './render-children';\nexport { default as shouldRenderWaypoint } from './should-render-waypoint';\nexport { default as shouldShowProperty } from './should-show-property';\nexport { default as sortResponseData } from './sort-response-data';\nexport { default as splitChildren } from './split-children';\nexport { default as getCurrentOffset } from './get-current-offset';\nexport { default as updateChildrensParent } from './update-childrens-parent';\nexport { default as getDisplayCountData } from './get-display-count-data';\nexport { default as buildImageProperties } from './build-image-properties';\nexport { default as getUpdatedFilterBy } from './get-updated-filter-by';\nexport { default as checkForError } from './check-for-error';\nexport { default as removeUnwantedCharacters } from './remove-unwanted-characters';\nexport { default as hasChildren } from './has-children';\nexport { default as removeExtraItems } from './remove-extra-items';\nexport { default as getParsedPropValues } from './get-parsed-prop-values';\nexport { default as getSanitizedPropValues } from './get-sanitized-prop-values';\nexport { default as appendImages } from './append-images';\nexport { default as parseTextBlock } from './parse-TextBlock';\nexport { default as processDataSummaryValue } from './process-data-summary-value';\nexport { default as buildQueryKey } from './build-query-key';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AACA,IAAA8C,yBAAA,GAAA/C,sBAAA,CAAAC,OAAA;AACA,IAAA+C,YAAA,GAAAhD,sBAAA,CAAAC,OAAA;AACA,IAAAgD,iBAAA,GAAAjD,sBAAA,CAAAC,OAAA;AACA,IAAAiD,oBAAA,GAAAlD,sBAAA,CAAAC,OAAA;AACA,IAAAkD,uBAAA,GAAAnD,sBAAA,CAAAC,OAAA;AACA,IAAAmD,aAAA,GAAApD,sBAAA,CAAAC,OAAA;AACA,IAAAoD,eAAA,GAAArD,sBAAA,CAAAC,OAAA;AACA,IAAAqD,wBAAA,GAAAtD,sBAAA,CAAAC,OAAA;AACA,IAAAsD,cAAA,GAAAvD,sBAAA,CAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["_buildInheritedFilters","_interopRequireDefault","require","_buildLinkExtraProps","_buildPropsQuery","_buildQueryFields","_buildRawQuery","_buildRawQueryBase","_buildSearchValuesCheckboxSelect","_buildSearchValuesText","_buildSetFilters","_checkPropsToUse","_getElasticsearchOperator","_getClickWrapperOptions","_getEntitiesWithBanner","_getEntityData","_getEntityRenderProps","_getGenericProps","_getGenericRenderVariables","_getImageIds","_getInheritedFilters","_getModifiers","_getNotEqualQuery","_getPaginationIndex","_getParsedSummaryValue","_getQueryFilters","_getQueryProps","_getRequiredSchemas","_getSearchFilterType","_getUnpublishedEntityName","_getWrappedValueWithLink","_getItemsToDisplayIds","_isBrowser","_isFilterEntitysId","_isObject","_isUsingRelationImage","_parsePropsToDisplay","_renderChildren","_shouldRenderWaypoint","_shouldShowProperty","_sortResponseData","_splitChildren","_getCurrentOffset","_updateChildrensParent","_getDisplayCountData","_buildImageProperties","_getUpdatedFilterBy","_checkForError","_removeUnwantedCharacters","_hasChildren","_removeExtraItems","_getParsedPropValues","_getSanitizedPropValues","_appendImages","_parseTextBlock"],"sources":["../../src/helpers/index.js"],"sourcesContent":["export { default as buildInheritedFilters } from './build-inherited-filters';\nexport { default as buildLinkExtraProps } from './build-link-extra-props';\nexport { default as buildPropsQuery } from './build-props-query';\nexport { default as buildQueryFields } from './build-query-fields';\nexport { default as buildRawQuery } from './build-raw-query';\nexport { default as buildRawQueryBase } from './build-raw-query-base';\nexport { default as buildSearchValuesCheckboxSelect } from './build-search-values-checkbox-select';\nexport { default as buildSearchValuesText } from './build-search-values-text';\nexport { default as buildSetFilters } from './build-set-filters';\nexport { default as checkPropsToUse } from './check-props-to-use';\nexport { default as getElasticsearchOperator } from './get-elasticsearch-operator';\nexport { default as getClickWrapperOptions } from './get-click-wrapper-options';\nexport { default as getEntitiesWithBanner } from './get-entities-with-banner';\nexport { default as getEntityData } from './get-entity-data';\nexport { default as getEntityRenderProps } from './get-entity-render-props';\nexport { default as getGenericProps } from './get-generic-props';\nexport { default as getGenericRenderVariables } from './get-generic-render-variables';\nexport { default as getImageIds } from './get-image-ids';\nexport { default as getInheritedFilters } from './get-inherited-filters';\nexport { default as getModifiers } from './get-modifiers';\nexport { default as getNotEqualQuery } from './get-not-equal-query';\nexport { default as getPaginationIndex } from './get-pagination-index';\nexport { default as getParsedSummaryValue } from './get-parsed-summary-value';\nexport { default as getQueryFilters } from './get-query-filters';\nexport { default as getQueryProps } from './get-query-props';\nexport { default as getRequiredSchemas } from './get-required-schemas';\nexport { default as getSearchFilterType } from './get-search-filter-type';\nexport { default as getUnpublishedEntityName } from './get-unpublished-entity-name';\nexport { default as getWrappedValueWithLink } from './get-wrapped-value-with-link';\nexport { default as getItemsToDisplayIds } from './get-items-to-display-ids';\nexport { default as isBrowser } from './is-browser';\nexport { default as isFilterEntitysId } from './is-filter-entitys-id';\nexport { default as isObject } from './is-object';\nexport { default as isUsingRelationImage } from './is-using-relation-image';\nexport { default as parsePropsToDisplay } from './parse-props-to-display';\nexport { default as renderChildren } from './render-children';\nexport { default as shouldRenderWaypoint } from './should-render-waypoint';\nexport { default as shouldShowProperty } from './should-show-property';\nexport { default as sortResponseData } from './sort-response-data';\nexport { default as splitChildren } from './split-children';\nexport { default as getCurrentOffset } from './get-current-offset';\nexport { default as updateChildrensParent } from './update-childrens-parent';\nexport { default as getDisplayCountData } from './get-display-count-data';\nexport { default as buildImageProperties } from './build-image-properties';\nexport { default as getUpdatedFilterBy } from './get-updated-filter-by';\nexport { default as checkForError } from './check-for-error';\nexport { default as removeUnwantedCharacters } from './remove-unwanted-characters';\nexport { default as hasChildren } from './has-children';\nexport { default as removeExtraItems } from './remove-extra-items';\nexport { default as getParsedPropValues } from './get-parsed-prop-values';\nexport { default as getSanitizedPropValues } from './get-sanitized-prop-values';\nexport { default as appendImages } from './append-images';\nexport { default as parseTextBlock } from './parse-TextBlock';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,gBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,kBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,gCAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,sBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,gBAAA,GAAAV,sBAAA,CA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mC,eAAA,GAAApC,sBAAA,CAAAC,OAAA;AACA,IAAAoC,qBAAA,GAAArC,sBAAA,CAAAC,OAAA;AACA,IAAAqC,mBAAA,GAAAtC,sBAAA,CAAAC,OAAA;AACA,IAAAsC,iBAAA,GAAAvC,sBAAA,CAAAC,OAAA;AACA,IAAAuC,cAAA,GAAAxC,sBAAA,CAAAC,OAAA;AACA,IAAAwC,iBAAA,GAAAzC,sBAAA,CAAAC,OAAA;AACA,IAAAyC,sBAAA,GAAA1C,sBAAA,CAAAC,OAAA;AACA,IAAA0C,oBAAA,GAAA3C,sBAAA,CAAAC,OAAA;AACA,IAAA2C,qBAAA,GAAA5C,sBAAA,CAAAC,OAAA;AACA,IAAA4C,mBAAA,GAAA7C,sBAAA,CAAAC,OAAA;AACA,IAAA6C,cAAA,GAAA9C,sBAAA,CAAAC,OAAA;AACA,IAAA8C,yBAAA,GAAA/C,sBAAA,CAAAC,OAAA;AACA,IAAA+C,YAAA,GAAAhD,sBAAA,CAAAC,OAAA;AACA,IAAAgD,iBAAA,GAAAjD,sBAAA,CAAAC,OAAA;AACA,IAAAiD,oBAAA,GAAAlD,sBAAA,CAAAC,OAAA;AACA,IAAAkD,uBAAA,GAAAnD,sBAAA,CAAAC,OAAA;AACA,IAAAmD,aAAA,GAAApD,sBAAA,CAAAC,OAAA;AACA,IAAAoD,eAAA,GAAArD,sBAAA,CAAAC,OAAA"}
@@ -16,14 +16,12 @@ require("core-js/modules/es.array.filter.js");
16
16
  require("core-js/modules/es.object.to-string.js");
17
17
  require("core-js/modules/es.array.map.js");
18
18
  require("core-js/modules/es.string.bold.js");
19
- require("core-js/modules/es.array.is-array.js");
20
19
  var _react = _interopRequireWildcard(require("react"));
21
20
  var _lodash = _interopRequireDefault(require("lodash.at"));
22
21
  var _isObject = _interopRequireDefault(require("./is-object"));
23
22
  var _getParsedPropValues = _interopRequireDefault(require("./get-parsed-prop-values"));
24
23
  var _getSanitizedPropValues = _interopRequireDefault(require("./get-sanitized-prop-values"));
25
24
  var _constants = require("../constants");
26
- var _processDataSummaryValue = _interopRequireDefault(require("./process-data-summary-value"));
27
25
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
27
  // TODO this helper should be removed if database is wiped clean and all elements change to new props struc
@@ -31,13 +29,13 @@ var parsePropsToDisplay = function parsePropsToDisplay() {
31
29
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
32
30
  var propsToDisplay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
33
31
  if (!(0, _isObject["default"])(propsToDisplay[0])) return (0, _lodash["default"])(props, propsToDisplay).filter(Boolean);
34
- return propsToDisplay.map(function (options, currentIndex) {
35
- var bold = options.bold,
36
- propertiesToDisplay = options.propertiesToDisplay,
37
- prefix = options.prefix,
38
- suffix = options.suffix,
39
- shouldStrip = options.shouldStrip,
40
- enableLink = options.enableLink;
32
+ return propsToDisplay.map(function (_ref, currentIndex) {
33
+ var bold = _ref.bold,
34
+ propertiesToDisplay = _ref.propertiesToDisplay,
35
+ prefix = _ref.prefix,
36
+ suffix = _ref.suffix,
37
+ shouldStrip = _ref.shouldStrip,
38
+ enableLink = _ref.enableLink;
41
39
  var Wrapper = bold ? _constants.BOLD_TAG : _react.Fragment;
42
40
  var parsedPropValues = (0, _getParsedPropValues["default"])({
43
41
  propertiesToDisplay: propertiesToDisplay,
@@ -48,10 +46,7 @@ var parsePropsToDisplay = function parsePropsToDisplay() {
48
46
  var sanitizedPropValues = (0, _getSanitizedPropValues["default"])(parsedPropValues);
49
47
  if (!sanitizedPropValues || !sanitizedPropValues.length) return null;
50
48
  var stringEndBlank = currentIndex + 1 === propsToDisplay.length ? '' : _constants.BLANK_SPACE_UNICODE_STRING;
51
- var processedValue = Array.isArray(sanitizedPropValues) ? sanitizedPropValues.map(function (value) {
52
- return (0, _processDataSummaryValue["default"])(value, options);
53
- }) : (0, _processDataSummaryValue["default"])(sanitizedPropValues, options);
54
- return /*#__PURE__*/_react["default"].createElement(Wrapper, null, prefix, " ", processedValue, " ", suffix, stringEndBlank);
49
+ return /*#__PURE__*/_react["default"].createElement(Wrapper, null, prefix, " ", sanitizedPropValues, " ", suffix, stringEndBlank);
55
50
  });
56
51
  };
57
52
  var _default = parsePropsToDisplay;
@@ -1 +1 @@
1
- {"version":3,"file":"parse-props-to-display.js","names":["_react","_interopRequireWildcard","require","_lodash","_interopRequireDefault","_isObject","_getParsedPropValues","_getSanitizedPropValues","_constants","_processDataSummaryValue","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","parsePropsToDisplay","props","arguments","length","undefined","propsToDisplay","isObject","at","filter","Boolean","map","options","currentIndex","bold","propertiesToDisplay","prefix","suffix","shouldStrip","enableLink","Wrapper","BOLD_TAG","Fragment","parsedPropValues","getParsedPropValues","sanitizedPropValues","getSanitizedPropValues","stringEndBlank","BLANK_SPACE_UNICODE_STRING","processedValue","Array","isArray","value","processDataSummaryValue","createElement","_default","exports"],"sources":["../../src/helpers/parse-props-to-display.js"],"sourcesContent":["import React, { Fragment } from 'react';\nimport at from 'lodash.at';\nimport isObject from './is-object';\nimport getParsedPropValues from './get-parsed-prop-values';\nimport getSanitizedPropValues from './get-sanitized-prop-values';\nimport { BOLD_TAG, BLANK_SPACE_UNICODE_STRING } from '../constants';\nimport processDataSummaryValue from './process-data-summary-value';\n\n// TODO this helper should be removed if database is wiped clean and all elements change to new props struc\nconst parsePropsToDisplay = (props = {}, propsToDisplay = []) => {\n if (!isObject(propsToDisplay[0])) return at(props, propsToDisplay).filter(Boolean);\n\n return propsToDisplay.map((options, currentIndex) => {\n const { bold, propertiesToDisplay, prefix, suffix, shouldStrip, enableLink } = options;\n const Wrapper = bold ? BOLD_TAG : Fragment;\n\n const parsedPropValues = getParsedPropValues({\n propertiesToDisplay,\n props,\n enableLink,\n shouldStrip\n });\n\n const sanitizedPropValues = getSanitizedPropValues(parsedPropValues);\n if (!sanitizedPropValues || !sanitizedPropValues.length) return null;\n const stringEndBlank =\n currentIndex + 1 === propsToDisplay.length ? '' : BLANK_SPACE_UNICODE_STRING;\n\n const processedValue = Array.isArray(sanitizedPropValues)\n ? sanitizedPropValues.map(value => processDataSummaryValue(value, options))\n : processDataSummaryValue(sanitizedPropValues, options);\n\n return (\n <Wrapper>\n {prefix} {processedValue} {suffix}\n {stringEndBlank}\n </Wrapper>\n );\n });\n};\n\nexport default parsePropsToDisplay;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA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B,KAAK;MAAA,OAAI,IAAAC,mCAAuB,EAACD,KAAK,EAAEpB,OAAO,CAAC;IAAA,EAAC,GACzE,IAAAqB,mCAAuB,EAACR,mBAAmB,EAAEb,OAAO,CAAC;IAEzD,oBACE3C,MAAA,YAAAiE,aAAA,CAACd,OAAO,QACLJ,MAAM,EAAC,GAAC,EAACa,cAAc,EAAC,GAAC,EAACZ,MAAM,EAChCU,cACM,CAAC;EAEd,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAQ,QAAA,GAEalC,mBAAmB;AAAAmC,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"parse-props-to-display.js","names":["_react","_interopRequireWildcard","require","_lodash","_interopRequireDefault","_isObject","_getParsedPropValues","_getSanitizedPropValues","_constants","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","parsePropsToDisplay","props","arguments","length","undefined","propsToDisplay","isObject","at","filter","Boolean","map","_ref","currentIndex","bold","propertiesToDisplay","prefix","suffix","shouldStrip","enableLink","Wrapper","BOLD_TAG","Fragment","parsedPropValues","getParsedPropValues","sanitizedPropValues","getSanitizedPropValues","stringEndBlank","BLANK_SPACE_UNICODE_STRING","createElement","_default","exports"],"sources":["../../src/helpers/parse-props-to-display.js"],"sourcesContent":["import React, { Fragment } from 'react';\nimport at from 'lodash.at';\nimport isObject from './is-object';\nimport getParsedPropValues from './get-parsed-prop-values';\nimport getSanitizedPropValues from './get-sanitized-prop-values';\nimport { BOLD_TAG, BLANK_SPACE_UNICODE_STRING } from '../constants';\n\n// TODO this helper should be removed if database is wiped clean and all elements change to new props struc\nconst parsePropsToDisplay = (props = {}, propsToDisplay = []) => {\n if (!isObject(propsToDisplay[0])) return at(props, propsToDisplay).filter(Boolean);\n\n return propsToDisplay.map(\n ({ bold, propertiesToDisplay, prefix, suffix, shouldStrip, enableLink }, currentIndex) => {\n const Wrapper = bold ? BOLD_TAG : Fragment;\n\n const parsedPropValues = getParsedPropValues({\n propertiesToDisplay,\n props,\n enableLink,\n shouldStrip\n });\n\n const sanitizedPropValues = getSanitizedPropValues(parsedPropValues);\n if (!sanitizedPropValues || !sanitizedPropValues.length) return null;\n const stringEndBlank =\n currentIndex + 1 === propsToDisplay.length ? '' : BLANK_SPACE_UNICODE_STRING;\n\n return (\n <Wrapper>\n {prefix} {sanitizedPropValues} {suffix}\n {stringEndBlank}\n </Wrapper>\n );\n }\n );\n};\n\nexport default parsePropsToDisplay;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAoE,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,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AU,GAAAP,IAAA,CAAVO,UAAU;IACnE,IAAMC,OAAO,GAAGN,IAAI,GAAGO,mBAAQ,GAAGC,eAAQ;IAE1C,IAAMC,gBAAgB,GAAG,IAAAC,+BAAmB,EAAC;MAC3CT,mBAAmB,EAAnBA,mBAAmB;MACnBb,KAAK,EAALA,KAAK;MACLiB,UAAU,EAAVA,UAAU;MACVD,WAAW,EAAXA;IACF,CAAC,CAAC;IAEF,IAAMO,mBAAmB,GAAG,IAAAC,kCAAsB,EAACH,gBAAgB,CAAC;IACpE,IAAI,CAACE,mBAAmB,IAAI,CAACA,mBAAmB,CAACrB,MAAM,EAAE,OAAO,IAAI;IACpE,IAAMuB,cAAc,GAClBd,YAAY,GAAG,CAAC,KAAKP,cAAc,CAACF,MAAM,GAAG,EAAE,GAAGwB,qCAA0B;IAE9E,oBACE1D,MAAA,YAAA2D,aAAA,CAACT,OAAO,QACLJ,MAAM,EAAC,GAAC,EAACS,mBAAmB,EAAC,GAAC,EAACR,MAAM,EACrCU,cACM,CAAC;EAEd,CACF,CAAC;AACH,CAAC;AAAC,IAAAG,QAAA,GAEa7B,mBAAmB;AAAA8B,OAAA,cAAAD,QAAA"}
@@ -49,7 +49,7 @@ var commonAttributes = {
49
49
  };
50
50
  var supportedTypes = {
51
51
  row: {
52
- props: [WIDTH].concat(responsiveProps, commonProps)
52
+ props: [WIDTH, STICKY].concat(responsiveProps, commonProps)
53
53
  },
54
54
  column: {
55
55
  props: [WIDTH, STICKY].concat(responsiveProps, commonProps)
@@ -1 +1 @@
1
- {"version":3,"file":"get-class-modifiers.js","names":["_constants","require","_componentsDefaultValues","_interopRequireDefault","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","BUTTON_TYPE","CLASS_MODIFIERS","DEFAULT","DESKTOP","GTM_CLASS_NAME","HIDE","ICON","MOBILE","MODIFIER","SIZE","STICKY","STYLE","TABLET","WIDTH","ALIGNMENT","commonProps","responsiveProps","buttonProps","concat","iconProps","commonAttributes","props","prefix","supportedTypes","row","column","button","BUTTON","icon","ICON_BUTTON","textBlock","banner","image","hero","video","list","code","CODE","getClassModifiers","type","_ref","supportedProps","defaultValues","COMPONENTS_DEFAULT_VALUES","modifiers","map","prop","propValue","stringValue","isResponsiveProp","includes","BUTTON_ICON","undefined","LINK","Boolean","unshift","join"],"sources":["../../src/utils/get-class-modifiers.js"],"sourcesContent":["import { BUTTON, BUTTON_ICON, CLASS_MODIFIERS, ICON_BUTTON, LINK, CODE } from '../constants';\nimport COMPONENTS_DEFAULT_VALUES from '../constants/componentsDefaultValues';\n\nconst {\n BUTTON_TYPE,\n DEFAULT,\n DESKTOP,\n GTM_CLASS_NAME,\n HIDE,\n ICON,\n MOBILE,\n MODIFIER,\n SIZE,\n STICKY,\n STYLE,\n TABLET,\n WIDTH,\n ALIGNMENT\n} = CLASS_MODIFIERS;\nconst commonProps = [GTM_CLASS_NAME, MODIFIER];\nconst responsiveProps = [DESKTOP, TABLET, MOBILE];\nconst buttonProps = [SIZE, BUTTON_TYPE, ICON, STYLE, ALIGNMENT, ...commonProps];\nconst iconProps = [BUTTON_TYPE, ...commonProps];\n\nconst commonAttributes = { props: commonProps, prefix: null };\n\nconst supportedTypes = {\n row: { props: [WIDTH, ...responsiveProps, ...commonProps] },\n column: { props: [WIDTH, STICKY, ...responsiveProps, ...commonProps] },\n button: {\n props: buttonProps,\n prefix: BUTTON\n },\n icon: { props: iconProps, prefix: ICON_BUTTON },\n textBlock: { ...commonAttributes },\n banner: { ...commonAttributes },\n image: { ...commonAttributes },\n hero: { ...commonAttributes },\n video: { ...commonAttributes },\n list: { ...commonAttributes },\n code: { ...commonAttributes, prefix: CODE }\n};\n\nexport default function getClassModifiers(type, props) {\n const { props: supportedProps, prefix } = supportedTypes[type] || {};\n const defaultValues = COMPONENTS_DEFAULT_VALUES[type] || {};\n if (!supportedProps) return '';\n\n const modifiers = supportedProps\n .map(prop => {\n const propValue = props[prop];\n const stringValue = typeof propValue === 'boolean' ? prop : propValue;\n const isResponsiveProp = responsiveProps.includes(prop);\n if (prop === ICON) return propValue ? BUTTON_ICON : '';\n if (prop === MODIFIER && propValue) return `${propValue}`;\n if (propValue === DEFAULT || stringValue === type) return '';\n if (isResponsiveProp) return propValue ? '' : `${HIDE}-${prop}`;\n if (propValue === null || propValue === undefined) return defaultValues[prop] || '';\n if (prop === WIDTH || prop === LINK) return `${type}--${propValue}`;\n if (prop === GTM_CLASS_NAME) return `${propValue}`;\n if (prop === STICKY) return propValue ? `${type}--${stringValue}` : '';\n\n return stringValue ? `${type}--${stringValue}` : '';\n })\n .filter(Boolean);\n if (prefix) modifiers.unshift(prefix);\n\n return modifiers.join(' ');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6E,SAAAG,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CA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,OAAO,CAAC;EAClB,IAAIhC,MAAM,EAAEsB,SAAS,CAACW,OAAO,CAACjC,MAAM,CAAC;EAErC,OAAOsB,SAAS,CAACY,IAAI,CAAC,GAAG,CAAC;AAC5B"}
1
+ {"version":3,"file":"get-class-modifiers.js","names":["_constants","require","_componentsDefaultValues","_interopRequireDefault","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","BUTTON_TYPE","CLASS_MODIFIERS","DEFAULT","DESKTOP","GTM_CLASS_NAME","HIDE","ICON","MOBILE","MODIFIER","SIZE","STICKY","STYLE","TABLET","WIDTH","ALIGNMENT","commonProps","responsiveProps","buttonProps","concat","iconProps","commonAttributes","props","prefix","supportedTypes","row","column","button","BUTTON","icon","ICON_BUTTON","textBlock","banner","image","hero","video","list","code","CODE","getClassModifiers","type","_ref","supportedProps","defaultValues","COMPONENTS_DEFAULT_VALUES","modifiers","map","prop","propValue","stringValue","isResponsiveProp","includes","BUTTON_ICON","undefined","LINK","Boolean","unshift","join"],"sources":["../../src/utils/get-class-modifiers.js"],"sourcesContent":["import { BUTTON, BUTTON_ICON, CLASS_MODIFIERS, ICON_BUTTON, LINK, CODE } from '../constants';\nimport COMPONENTS_DEFAULT_VALUES from '../constants/componentsDefaultValues';\n\nconst {\n BUTTON_TYPE,\n DEFAULT,\n DESKTOP,\n GTM_CLASS_NAME,\n HIDE,\n ICON,\n MOBILE,\n MODIFIER,\n SIZE,\n STICKY,\n STYLE,\n TABLET,\n WIDTH,\n ALIGNMENT\n} = CLASS_MODIFIERS;\nconst commonProps = [GTM_CLASS_NAME, MODIFIER];\nconst responsiveProps = [DESKTOP, TABLET, MOBILE];\nconst buttonProps = [SIZE, BUTTON_TYPE, ICON, STYLE, ALIGNMENT, ...commonProps];\nconst iconProps = [BUTTON_TYPE, ...commonProps];\n\nconst commonAttributes = { props: commonProps, prefix: null };\n\nconst supportedTypes = {\n row: { props: [WIDTH, STICKY, ...responsiveProps, ...commonProps] },\n column: { props: [WIDTH, STICKY, ...responsiveProps, ...commonProps] },\n button: {\n props: buttonProps,\n prefix: BUTTON\n },\n icon: { props: iconProps, prefix: ICON_BUTTON },\n textBlock: { ...commonAttributes },\n banner: { ...commonAttributes },\n image: { ...commonAttributes },\n hero: { ...commonAttributes },\n video: { ...commonAttributes },\n list: { ...commonAttributes },\n code: { ...commonAttributes, prefix: CODE }\n};\n\nexport default function getClassModifiers(type, props) {\n const { props: supportedProps, prefix } = supportedTypes[type] || {};\n const defaultValues = COMPONENTS_DEFAULT_VALUES[type] || {};\n if (!supportedProps) return '';\n\n const modifiers = supportedProps\n .map(prop => {\n const propValue = props[prop];\n const stringValue = typeof propValue === 'boolean' ? prop : propValue;\n const isResponsiveProp = responsiveProps.includes(prop);\n if (prop === ICON) return propValue ? BUTTON_ICON : '';\n if (prop === MODIFIER && propValue) return `${propValue}`;\n if (propValue === DEFAULT || stringValue === type) return '';\n if (isResponsiveProp) return propValue ? '' : `${HIDE}-${prop}`;\n if (propValue === null || propValue === undefined) return defaultValues[prop] || '';\n if (prop === WIDTH || prop === LINK) return `${type}--${propValue}`;\n if (prop === GTM_CLASS_NAME) return `${propValue}`;\n if (prop === STICKY) return propValue ? `${type}--${stringValue}` : '';\n\n return stringValue ? `${type}--${stringValue}` : '';\n })\n .filter(Boolean);\n if (prefix) modifiers.unshift(prefix);\n\n return modifiers.join(' ');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6E,SAAAG,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,C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AAE;IACnF,IAAIA,IAAI,KAAKjC,KAAK,IAAIiC,IAAI,KAAKO,eAAI,EAAE,UAAAnC,MAAA,CAAUqB,IAAI,QAAArB,MAAA,CAAK6B,SAAS;IACjE,IAAID,IAAI,KAAK1C,cAAc,EAAE,UAAAc,MAAA,CAAU6B,SAAS;IAChD,IAAID,IAAI,KAAKpC,MAAM,EAAE,OAAOqC,SAAS,MAAA7B,MAAA,CAAMqB,IAAI,QAAArB,MAAA,CAAK8B,WAAW,IAAK,EAAE;IAEtE,OAAOA,WAAW,MAAA9B,MAAA,CAAMqB,IAAI,QAAArB,MAAA,CAAK8B,WAAW,IAAK,EAAE;EACrD,CAAC,CAAC,CACDlE,MAAM,CAACwE,OAAO,CAAC;EAClB,IAAIhC,MAAM,EAAEsB,SAAS,CAACW,OAAO,CAACjC,MAAM,CAAC;EAErC,OAAOsB,SAAS,CAACY,IAAI,CAAC,GAAG,CAAC;AAC5B"}
@@ -0,0 +1,20 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { useRouter } from 'next/router';
4
+ const recreateOnNavigation = Component => {
5
+ const InnerComponent = props => {
6
+ const {
7
+ name
8
+ } = props;
9
+ const router = useRouter();
10
+ const key = `${router.asPath}:${name}`;
11
+ return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
12
+ key: key
13
+ }));
14
+ };
15
+ InnerComponent.WrappedComponent = Component;
16
+ InnerComponent.displayName = `recreateOnNavigation(${Component.displayName || Component.name || 'Component'})`;
17
+ return InnerComponent;
18
+ };
19
+ export default recreateOnNavigation;
20
+ //# sourceMappingURL=recreateOnNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recreateOnNavigation.js","names":["React","useRouter","recreateOnNavigation","Component","InnerComponent","props","name","router","key","asPath","createElement","_extends","WrappedComponent","displayName"],"sources":["../../src/HOC/recreateOnNavigation.js"],"sourcesContent":["import React from 'react';\nimport { useRouter } from 'next/router';\n\nconst recreateOnNavigation = Component => {\n const InnerComponent = props => {\n const { name } = props;\n const router = useRouter();\n const key = `${router.asPath}:${name}`;\n return <Component {...props} key={key} />;\n };\n\n InnerComponent.WrappedComponent = Component;\n\n InnerComponent.displayName = `recreateOnNavigation(${Component.displayName ||\n Component.name ||\n 'Component'})`;\n\n return InnerComponent;\n};\n\nexport default recreateOnNavigation;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,aAAa;AAEvC,MAAMC,oBAAoB,GAAGC,SAAS,IAAI;EACxC,MAAMC,cAAc,GAAGC,KAAK,IAAI;IAC9B,MAAM;MAAEC;IAAK,CAAC,GAAGD,KAAK;IACtB,MAAME,MAAM,GAAGN,SAAS,CAAC,CAAC;IAC1B,MAAMO,GAAG,GAAI,GAAED,MAAM,CAACE,MAAO,IAAGH,IAAK,EAAC;IACtC,oBAAON,KAAA,CAAAU,aAAA,CAACP,SAAS,EAAAQ,QAAA,KAAKN,KAAK;MAAEG,GAAG,EAAEA;IAAI,EAAE,CAAC;EAC3C,CAAC;EAEDJ,cAAc,CAACQ,gBAAgB,GAAGT,SAAS;EAE3CC,cAAc,CAACS,WAAW,GAAI,wBAAuBV,SAAS,CAACU,WAAW,IACxEV,SAAS,CAACG,IAAI,IACd,WAAY,GAAE;EAEhB,OAAOF,cAAc;AACvB,CAAC;AAED,eAAeF,oBAAoB"}
@@ -55,8 +55,7 @@ const Button = props => {
55
55
  };
56
56
  const logout = () => {
57
57
  handleLogout(client);
58
- if (hasChildren(children)) return setShowChildren(true);
59
- return url ? router.reload(urlToUse) : router.reload();
58
+ url ? router.reload(urlToUse) : router.reload();
60
59
  };
61
60
  const handleClick = () => {
62
61
  if (isLogoutButton) logout();
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["React","useState","Fragment","useEffect","useCookies","useRouter","classnames","BlazeButton","handleLogout","useApolloClient","PropTypes","bool","string","useStringTemplate","ClickWrapper","BlazeLink","withTitle","getClassModifiers","LOGOUT","renderChildren","updateChildrensParent","hasChildren","getClickWrapperOptions","Button","props","type","text","url","icon","name","style","children","clickAction","childSeoVisibility","afterClickText","parent","otherProps","_objectWithoutProperties","_excluded","client","router","isLogoutButton","cookies","blaze_auth","blazeCookie","showChildren","setShowChildren","data","textToUse","afterClickTextToUse","urlToUse","asPath","checkIfButtonShouldRender","logout","reload","handleClick","buttonType","modifiers","_objectSpread","currentProps","href","title","DynamicButton","itemId","itemEntity","renderedChildren","onClose","shouldUseClickWrapper","wrapperProps","Wrapper","contentClassName","createElement","className","_extends","onClick","propTypes","object","size","oneOfType","arrayOf","node","defaultProps"],"sources":["../../src/components/Button.js"],"sourcesContent":["import React, { useState, Fragment, useEffect } from 'react';\nimport { useCookies } from 'react-cookie';\nimport { useRouter } from 'next/router';\nimport classnames from 'classnames';\nimport BlazeButton from '@blaze-react/button';\nimport { handleLogout } from '@blaze-cms/core-auth-ui';\nimport { useApolloClient } from '@apollo/client';\nimport PropTypes, { bool, string } from 'prop-types';\nimport { useStringTemplate } from '@blaze-cms/utils-handlebars';\nimport ClickWrapper from './ClickWrapper';\nimport BlazeLink from './BlazeLink';\nimport { withTitle } from '../HOC';\nimport { getClassModifiers } from '../utils';\nimport { LOGOUT } from '../constants';\nimport {\n renderChildren,\n updateChildrensParent,\n hasChildren,\n getClickWrapperOptions\n} from '../helpers';\n\nconst Button = props => {\n const {\n type,\n text,\n url,\n icon,\n name,\n style,\n children,\n clickAction,\n childSeoVisibility,\n afterClickText,\n parent,\n ...otherProps\n } = props;\n const client = useApolloClient();\n const router = useRouter();\n const isLogoutButton = clickAction === LOGOUT;\n const [cookies] = useCookies();\n const { blaze_auth: blazeCookie } = cookies;\n const [showChildren, setShowChildren] = useState(false);\n const {\n data: [textToUse, afterClickTextToUse, urlToUse]\n } = useStringTemplate(parent, [text, afterClickText, url]);\n\n useEffect(\n () => {\n setShowChildren(false);\n },\n [router.asPath]\n );\n\n const checkIfButtonShouldRender = () => {\n if (isLogoutButton) return !!blazeCookie;\n if (!text && !icon) return false;\n return !!(url || hasChildren(children));\n };\n\n const logout = () => {\n handleLogout(client);\n if (hasChildren(children)) return setShowChildren(true);\n return url ? router.reload(urlToUse) : router.reload();\n };\n\n const handleClick = () => {\n if (isLogoutButton) logout();\n if (!url && !isLogoutButton) setShowChildren(!showChildren);\n };\n\n if (!checkIfButtonShouldRender()) return null;\n\n const buttonType = !text && icon ? 'icon' : type;\n const modifiers = getClassModifiers(buttonType, { icon, style, ...otherProps });\n const currentProps = url ? { href: urlToUse, title: name } : { name };\n const DynamicButton = url && !isLogoutButton ? BlazeLink : BlazeButton;\n updateChildrensParent(children, parent.itemId, parent.itemEntity);\n\n const renderedChildren = renderChildren(children, { onClose: handleClick });\n const { shouldUseClickWrapper, wrapperProps } = getClickWrapperOptions(children, props);\n const Wrapper = shouldUseClickWrapper ? ClickWrapper : Fragment;\n\n const contentClassName = classnames('button__content', {\n 'button__content--show': showChildren\n });\n\n return (\n <Wrapper {...wrapperProps}>\n {childSeoVisibility && <div className={contentClassName}>{renderedChildren}</div>}\n {!childSeoVisibility && showChildren && renderedChildren}\n <DynamicButton className={modifiers} onClick={handleClick} {...currentProps}>\n {icon && <i className={icon} />}\n {showChildren ? afterClickTextToUse : textToUse}\n </DynamicButton>\n </Wrapper>\n );\n};\n\nButton.propTypes = {\n parent: PropTypes.object,\n clickAction: PropTypes.string,\n text: PropTypes.string,\n afterClickText: string,\n name: PropTypes.string,\n type: PropTypes.string,\n url: PropTypes.string,\n size: PropTypes.string,\n icon: PropTypes.string,\n style: PropTypes.string,\n childSeoVisibility: bool,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nButton.defaultProps = {\n parent: {},\n clickAction: '',\n text: '',\n afterClickText: '',\n name: '',\n type: '',\n url: null,\n size: '',\n icon: '',\n style: '',\n children: [],\n childSeoVisibility: false\n};\n\nexport default withTitle(Button);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,QAAQ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EACtBiB,IAAI,EAAEnB,SAAS,CAACE,MAAM;EACtBa,IAAI,EAAEf,SAAS,CAACE,MAAM;EACtBe,GAAG,EAAEjB,SAAS,CAACE,MAAM;EACrBiE,IAAI,EAAEnE,SAAS,CAACE,MAAM;EACtBgB,IAAI,EAAElB,SAAS,CAACE,MAAM;EACtBkB,KAAK,EAAEpB,SAAS,CAACE,MAAM;EACvBqB,kBAAkB,EAAEtB,IAAI;EACxBoB,QAAQ,EAAErB,SAAS,CAACoE,SAAS,CAAC,CAACpE,SAAS,CAACqE,OAAO,CAACrE,SAAS,CAACsE,IAAI,CAAC,EAAEtE,SAAS,CAACsE,IAAI,CAAC;AACnF,CAAC;AAEDzD,MAAM,CAAC0D,YAAY,GAAG;EACpB9C,MAAM,EAAE,CAAC,CAAC;EACVH,WAAW,EAAE,EAAE;EACfN,IAAI,EAAE,EAAE;EACRQ,cAAc,EAAE,EAAE;EAClBL,IAAI,EAAE,EAAE;EACRJ,IAAI,EAAE,EAAE;EACRE,GAAG,EAAE,IAAI;EACTkD,IAAI,EAAE,EAAE;EACRjD,IAAI,EAAE,EAAE;EACRE,KAAK,EAAE,EAAE;EACTC,QAAQ,EAAE,EAAE;EACZE,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAejB,SAAS,CAACO,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.js","names":["React","useState","Fragment","useEffect","useCookies","useRouter","classnames","BlazeButton","handleLogout","useApolloClient","PropTypes","bool","string","useStringTemplate","ClickWrapper","BlazeLink","withTitle","getClassModifiers","LOGOUT","renderChildren","updateChildrensParent","hasChildren","getClickWrapperOptions","Button","props","type","text","url","icon","name","style","children","clickAction","childSeoVisibility","afterClickText","parent","otherProps","_objectWithoutProperties","_excluded","client","router","isLogoutButton","cookies","blaze_auth","blazeCookie","showChildren","setShowChildren","data","textToUse","afterClickTextToUse","urlToUse","asPath","checkIfButtonShouldRender","logout","reload","handleClick","buttonType","modifiers","_objectSpread","currentProps","href","title","DynamicButton","itemId","itemEntity","renderedChildren","onClose","shouldUseClickWrapper","wrapperProps","Wrapper","contentClassName","createElement","className","_extends","onClick","propTypes","object","size","oneOfType","arrayOf","node","defaultProps"],"sources":["../../src/components/Button.js"],"sourcesContent":["import React, { useState, Fragment, useEffect } from 'react';\nimport { useCookies } from 'react-cookie';\nimport { useRouter } from 'next/router';\nimport classnames from 'classnames';\nimport BlazeButton from '@blaze-react/button';\nimport { handleLogout } from '@blaze-cms/core-auth-ui';\nimport { useApolloClient } from '@apollo/client';\nimport PropTypes, { bool, string } from 'prop-types';\nimport { useStringTemplate } from '@blaze-cms/utils-handlebars';\nimport ClickWrapper from './ClickWrapper';\nimport BlazeLink from './BlazeLink';\nimport { withTitle } from '../HOC';\nimport { getClassModifiers } from '../utils';\nimport { LOGOUT } from '../constants';\nimport {\n renderChildren,\n updateChildrensParent,\n hasChildren,\n getClickWrapperOptions\n} from '../helpers';\n\nconst Button = props => {\n const {\n type,\n text,\n url,\n icon,\n name,\n style,\n children,\n clickAction,\n childSeoVisibility,\n afterClickText,\n parent,\n ...otherProps\n } = props;\n const client = useApolloClient();\n const router = useRouter();\n const isLogoutButton = clickAction === LOGOUT;\n const [cookies] = useCookies();\n const { blaze_auth: blazeCookie } = cookies;\n const [showChildren, setShowChildren] = useState(false);\n const {\n data: [textToUse, afterClickTextToUse, urlToUse]\n } = useStringTemplate(parent, [text, afterClickText, url]);\n\n useEffect(\n () => {\n setShowChildren(false);\n },\n [router.asPath]\n );\n\n const checkIfButtonShouldRender = () => {\n if (isLogoutButton) return !!blazeCookie;\n if (!text && !icon) return false;\n return !!(url || hasChildren(children));\n };\n\n const logout = () => {\n handleLogout(client);\n url ? router.reload(urlToUse) : router.reload();\n };\n\n const handleClick = () => {\n if (isLogoutButton) logout();\n if (!url && !isLogoutButton) setShowChildren(!showChildren);\n };\n\n if (!checkIfButtonShouldRender()) return null;\n\n const buttonType = !text && icon ? 'icon' : type;\n const modifiers = getClassModifiers(buttonType, { icon, style, ...otherProps });\n const currentProps = url ? { href: urlToUse, title: name } : { name };\n const DynamicButton = url && !isLogoutButton ? BlazeLink : BlazeButton;\n updateChildrensParent(children, parent.itemId, parent.itemEntity);\n\n const renderedChildren = renderChildren(children, { onClose: handleClick });\n const { shouldUseClickWrapper, wrapperProps } = getClickWrapperOptions(children, props);\n const Wrapper = shouldUseClickWrapper ? ClickWrapper : Fragment;\n\n const contentClassName = classnames('button__content', {\n 'button__content--show': showChildren\n });\n\n return (\n <Wrapper {...wrapperProps}>\n {childSeoVisibility && <div className={contentClassName}>{renderedChildren}</div>}\n {!childSeoVisibility && showChildren && renderedChildren}\n <DynamicButton className={modifiers} onClick={handleClick} {...currentProps}>\n {icon && <i className={icon} />}\n {showChildren ? afterClickTextToUse : textToUse}\n </DynamicButton>\n </Wrapper>\n );\n};\n\nButton.propTypes = {\n parent: PropTypes.object,\n clickAction: PropTypes.string,\n text: PropTypes.string,\n afterClickText: string,\n name: PropTypes.string,\n type: PropTypes.string,\n url: PropTypes.string,\n size: PropTypes.string,\n icon: PropTypes.string,\n style: PropTypes.string,\n childSeoVisibility: bool,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nButton.defaultProps = {\n parent: {},\n clickAction: '',\n text: '',\n afterClickText: '',\n name: '',\n type: '',\n url: null,\n size: '',\n icon: '',\n style: '',\n children: [],\n childSeoVisibility: false\n};\n\nexport default withTitle(Button);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC5D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,WAAW,MAAM,qBAAqB;AAC7C,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,SAAS,IAAIC,IAAI,EAAEC,MAAM,QAAQ,YAAY;AACpD,S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AAC,EAAEtE,SAAS,CAACsE,IAAI,CAAC;AACnF,CAAC;AAEDzD,MAAM,CAAC0D,YAAY,GAAG;EACpB9C,MAAM,EAAE,CAAC,CAAC;EACVH,WAAW,EAAE,EAAE;EACfN,IAAI,EAAE,EAAE;EACRQ,cAAc,EAAE,EAAE;EAClBL,IAAI,EAAE,EAAE;EACRJ,IAAI,EAAE,EAAE;EACRE,GAAG,EAAE,IAAI;EACTkD,IAAI,EAAE,EAAE;EACRjD,IAAI,EAAE,EAAE;EACRE,KAAK,EAAE,EAAE;EACTC,QAAQ,EAAE,EAAE;EACZE,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAejB,SAAS,CAACO,MAAM,CAAC"}
@@ -108,12 +108,12 @@ const CardContainer = _ref => {
108
108
  if (hasNewBannerSettings) return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, _extends({
109
109
  key: id
110
110
  }, parsedCardProps)), shouldRenderBanner && /*#__PURE__*/React.createElement(Banner, _extends({
111
- key: dynamicKey
112
- }, entityProps, bannerProps, {
113
- renderCounter: bannerIndex,
111
+ key: dynamicKey,
114
112
  entity: graphqlEntityMap[entityProps.__typename],
115
- baseAdunit: baseAdunit,
116
- modifier: modifier
113
+ baseAdunit: baseAdunit
114
+ }, entityProps, bannerProps, {
115
+ modifier: modifier,
116
+ renderCounter: bannerIndex
117
117
  })));
118
118
  return baseAdunit ? /*#__PURE__*/React.createElement(Banner, _extends({
119
119
  key: dynamicKey,