@blaze-cms/react-page-builder 0.130.0 → 0.131.0-admin-updates.0
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.
- package/CHANGELOG.md +28 -0
- package/lib/components/Card/CardsRender.js +13 -6
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/Card/helpers/get-updated-items-to-display.js +55 -0
- package/lib/components/Card/helpers/get-updated-items-to-display.js.map +1 -0
- package/lib/components/Card/helpers/index.js +7 -0
- package/lib/components/Card/helpers/index.js.map +1 -1
- package/lib/components/Code/Code.js +7 -3
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js +3 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -2
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib/components/List/ListFactory.js +16 -11
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/helpers/get-list-query.js +43 -0
- package/lib/components/List/helpers/get-list-query.js.map +1 -0
- package/lib/components/List/helpers/get-list-specific-search-filter.js +21 -0
- package/lib/components/List/helpers/get-list-specific-search-filter.js.map +1 -0
- package/lib/components/List/helpers/index.js +14 -0
- package/lib/components/List/helpers/index.js.map +1 -1
- package/lib/components/List/helpers/strip-query-key.js +14 -0
- package/lib/components/List/helpers/strip-query-key.js.map +1 -0
- package/lib/components/SearchContent/SearchContent.js +8 -6
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchContent/SearchContentItems.js +1 -1
- package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +17 -11
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +63 -85
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-filters-query.js +3 -1
- package/lib/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-new-url.js +17 -0
- package/lib/components/SearchFilter/helpers/build-new-url.js.map +1 -0
- package/lib/components/SearchFilter/helpers/build-url-query.js +48 -0
- package/lib/components/SearchFilter/helpers/build-url-query.js.map +1 -0
- package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +32 -0
- package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -0
- package/lib/components/SearchFilter/helpers/get-filter-values.js +31 -0
- package/lib/components/SearchFilter/helpers/get-filter-values.js.map +1 -0
- package/lib/components/SearchFilter/helpers/index.js +18 -11
- package/lib/components/SearchFilter/helpers/index.js.map +1 -1
- package/lib/components/SearchFilter/index.js.map +1 -1
- package/lib/components/SearchFilter/searchFilterReducer.js +45 -0
- package/lib/components/SearchFilter/searchFilterReducer.js.map +1 -0
- package/lib/components/SearchFilterSort/SearchFilterSort.js +31 -11
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +19 -5
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/update-sort.js +9 -5
- package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib/helpers/build-inherited-filters.js +2 -0
- package/lib/helpers/build-inherited-filters.js.map +1 -1
- package/lib/helpers/build-props-query.js +5 -2
- package/lib/helpers/build-props-query.js.map +1 -1
- package/lib/helpers/build-query-key.js +16 -0
- package/lib/helpers/build-query-key.js.map +1 -0
- package/lib/helpers/build-set-filters.js +5 -1
- package/lib/helpers/build-set-filters.js.map +1 -1
- package/lib/helpers/get-query-filters.js +6 -8
- package/lib/helpers/get-query-filters.js.map +1 -1
- package/lib/helpers/get-query-props.js +13 -2
- package/lib/helpers/get-query-props.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +2 -3
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/index.js +14 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js +13 -8
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/process-data-summary-value.js +56 -0
- package/lib/helpers/process-data-summary-value.js.map +1 -0
- package/lib-es/components/Card/CardsRender.js +14 -7
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/Card/helpers/get-updated-items-to-display.js +32 -0
- package/lib-es/components/Card/helpers/get-updated-items-to-display.js.map +1 -0
- package/lib-es/components/Card/helpers/index.js +1 -0
- package/lib-es/components/Card/helpers/index.js.map +1 -1
- package/lib-es/components/Code/Code.js +8 -4
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +3 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js +4 -3
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib-es/components/List/ListFactory.js +16 -12
- package/lib-es/components/List/ListFactory.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-query.js +24 -0
- package/lib-es/components/List/helpers/get-list-query.js.map +1 -0
- package/lib-es/components/List/helpers/get-list-specific-search-filter.js +12 -0
- package/lib-es/components/List/helpers/get-list-specific-search-filter.js.map +1 -0
- package/lib-es/components/List/helpers/index.js +2 -0
- package/lib-es/components/List/helpers/index.js.map +1 -1
- package/lib-es/components/List/helpers/strip-query-key.js +6 -0
- package/lib-es/components/List/helpers/strip-query-key.js.map +1 -0
- package/lib-es/components/SearchContent/SearchContent.js +8 -6
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +18 -11
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilterContainer.js +47 -72
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-filters-query.js +2 -0
- package/lib-es/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-new-url.js +8 -0
- package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/build-url-query.js +30 -0
- package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +18 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-values.js +19 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-values.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/index.js +5 -4
- package/lib-es/components/SearchFilter/helpers/index.js.map +1 -1
- package/lib-es/components/SearchFilter/index.js +2 -2
- package/lib-es/components/SearchFilter/index.js.map +1 -1
- package/lib-es/components/SearchFilter/searchFilterReducer.js +28 -0
- package/lib-es/components/SearchFilter/searchFilterReducer.js.map +1 -0
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js +26 -10
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js +21 -4
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js +8 -4
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib-es/helpers/build-inherited-filters.js +2 -0
- package/lib-es/helpers/build-inherited-filters.js.map +1 -1
- package/lib-es/helpers/build-props-query.js +4 -2
- package/lib-es/helpers/build-props-query.js.map +1 -1
- package/lib-es/helpers/build-query-key.js +7 -0
- package/lib-es/helpers/build-query-key.js.map +1 -0
- package/lib-es/helpers/build-set-filters.js +5 -1
- package/lib-es/helpers/build-set-filters.js.map +1 -1
- package/lib-es/helpers/get-query-filters.js +6 -8
- package/lib-es/helpers/get-query-filters.js.map +1 -1
- package/lib-es/helpers/get-query-props.js +10 -2
- package/lib-es/helpers/get-query-props.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.js +2 -2
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib-es/helpers/index.js +2 -0
- package/lib-es/helpers/index.js.map +1 -1
- package/lib-es/helpers/parse-props-to-display.js +12 -9
- package/lib-es/helpers/parse-props-to-display.js.map +1 -1
- package/lib-es/helpers/process-data-summary-value.js +36 -0
- package/lib-es/helpers/process-data-summary-value.js.map +1 -0
- package/package.json +10 -10
- package/src/components/Card/CardsRender.js +27 -7
- package/src/components/Card/helpers/get-updated-items-to-display.js +32 -0
- package/src/components/Card/helpers/index.js +1 -0
- package/src/components/Code/Code.js +7 -3
- package/src/components/DataSummary/helpers/build-loop-props-content.js +4 -1
- package/src/components/DataSummary/helpers/build-props-to-display-with-content.js +6 -3
- package/src/components/List/ListFactory.js +25 -15
- package/src/components/List/helpers/get-list-query.js +28 -0
- package/src/components/List/helpers/get-list-specific-search-filter.js +10 -0
- package/src/components/List/helpers/index.js +2 -0
- package/src/components/List/helpers/strip-query-key.js +6 -0
- package/src/components/SearchContent/SearchContent.js +8 -6
- package/src/components/SearchFilter/SearchFilter/SearchFilter.js +21 -12
- package/src/components/SearchFilter/SearchFilterContainer.js +57 -69
- package/src/components/SearchFilter/helpers/build-filters-query.js +9 -1
- package/src/components/SearchFilter/helpers/build-new-url.js +8 -0
- package/src/components/SearchFilter/helpers/build-url-query.js +31 -0
- package/src/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +17 -0
- package/src/components/SearchFilter/helpers/get-filter-values.js +21 -0
- package/src/components/SearchFilter/helpers/index.js +9 -7
- package/src/components/SearchFilter/index.js +2 -2
- package/src/components/SearchFilter/searchFilterReducer.js +15 -0
- package/src/components/SearchFilterSort/SearchFilterSort.js +18 -8
- package/src/components/SearchFilterSort/helpers/handle-sort-update.js +14 -5
- package/src/components/SearchFilterSort/helpers/update-sort.js +7 -3
- package/src/helpers/build-inherited-filters.js +3 -1
- package/src/helpers/build-props-query.js +4 -2
- package/src/helpers/build-query-key.js +7 -0
- package/src/helpers/build-set-filters.js +2 -1
- package/src/helpers/get-query-filters.js +4 -4
- package/src/helpers/get-query-props.js +12 -4
- package/src/helpers/get-wrapped-value-with-link.js +6 -3
- package/src/helpers/index.js +2 -0
- package/src/helpers/parse-props-to-display.js +25 -21
- package/src/helpers/process-data-summary-value.js +22 -0
- package/tests/helpers/mocks.js +3 -5
- package/tests/unit/src/components/Card/helpers/get-updated-items-to-display.test.js +72 -0
- package/tests/unit/src/components/Code/Code.test.js +5 -0
- package/tests/unit/src/components/Code/__snapshots__/Code.test.js.snap +8 -0
- package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +9 -0
- package/tests/unit/src/components/SearchFilter/__snapshots__/SearchFilterContainer.test.js.snap +1 -7
- package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +10 -10
- package/tests/unit/src/components/SearchFilter/helpers/build-query.test.js +24 -7
- package/tests/unit/src/components/SearchFilter/helpers/get-initial-filter-values.test.js +10 -10
- package/tests/unit/src/components/SearchFilterSort/SearchFilterSort.test.js +4 -1
- package/tests/unit/src/components/SearchFilterSort/helpers/handle-sort-update.test.js +26 -19
- package/tests/unit/src/components/SearchFilterSort/helpers/update-sort.test.js +10 -1
- package/tests/unit/src/helpers/__snapshots__/get-wrapped-value-with-link.test.js.snap +18 -0
- package/tests/unit/src/helpers/build-props-query.test.js +25 -0
- package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +2 -2
- package/tests/unit/src/helpers/parse-props-to-display.test.js +4 -0
- package/tests/unit/src/helpers/prcoess-data-summary-value.test.js +52 -0
- package/lib/components/SearchFilter/helpers/build-new-query.js +0 -15
- package/lib/components/SearchFilter/helpers/build-new-query.js.map +0 -1
- package/lib/components/SearchFilter/helpers/build-query.js +0 -37
- package/lib/components/SearchFilter/helpers/build-query.js.map +0 -1
- package/lib/components/SearchFilter/helpers/get-initial-filter-values.js +0 -43
- package/lib/components/SearchFilter/helpers/get-initial-filter-values.js.map +0 -1
- package/lib-es/components/SearchFilter/helpers/build-new-query.js +0 -6
- package/lib-es/components/SearchFilter/helpers/build-new-query.js.map +0 -1
- package/lib-es/components/SearchFilter/helpers/build-query.js +0 -23
- package/lib-es/components/SearchFilter/helpers/build-query.js.map +0 -1
- package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js +0 -26
- package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js.map +0 -1
- package/src/components/SearchFilter/helpers/build-new-query.js +0 -6
- package/src/components/SearchFilter/helpers/build-query.js +0 -26
- package/src/components/SearchFilter/helpers/get-initial-filter-values.js +0 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","buildInheritedFilters","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":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","buildInheritedFilters","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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"}
|
|
@@ -4,18 +4,20 @@ import isObject from './is-object';
|
|
|
4
4
|
import getParsedPropValues from './get-parsed-prop-values';
|
|
5
5
|
import getSanitizedPropValues from './get-sanitized-prop-values';
|
|
6
6
|
import { BOLD_TAG, BLANK_SPACE_UNICODE_STRING } from '../constants';
|
|
7
|
+
import processDataSummaryValue from './process-data-summary-value';
|
|
7
8
|
|
|
8
9
|
// TODO this helper should be removed if database is wiped clean and all elements change to new props struc
|
|
9
10
|
const parsePropsToDisplay = (props = {}, propsToDisplay = []) => {
|
|
10
11
|
if (!isObject(propsToDisplay[0])) return at(props, propsToDisplay).filter(Boolean);
|
|
11
|
-
return propsToDisplay.map(({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
return propsToDisplay.map((options, currentIndex) => {
|
|
13
|
+
const {
|
|
14
|
+
bold,
|
|
15
|
+
propertiesToDisplay,
|
|
16
|
+
prefix,
|
|
17
|
+
suffix,
|
|
18
|
+
shouldStrip,
|
|
19
|
+
enableLink
|
|
20
|
+
} = options;
|
|
19
21
|
const Wrapper = bold ? BOLD_TAG : Fragment;
|
|
20
22
|
const parsedPropValues = getParsedPropValues({
|
|
21
23
|
propertiesToDisplay,
|
|
@@ -26,7 +28,8 @@ const parsePropsToDisplay = (props = {}, propsToDisplay = []) => {
|
|
|
26
28
|
const sanitizedPropValues = getSanitizedPropValues(parsedPropValues);
|
|
27
29
|
if (!sanitizedPropValues || !sanitizedPropValues.length) return null;
|
|
28
30
|
const stringEndBlank = currentIndex + 1 === propsToDisplay.length ? '' : BLANK_SPACE_UNICODE_STRING;
|
|
29
|
-
|
|
31
|
+
const processedValue = Array.isArray(sanitizedPropValues) ? sanitizedPropValues.map(value => processDataSummaryValue(value, options)) : processDataSummaryValue(sanitizedPropValues, options);
|
|
32
|
+
return /*#__PURE__*/React.createElement(Wrapper, null, prefix, " ", processedValue, " ", suffix, stringEndBlank);
|
|
30
33
|
});
|
|
31
34
|
};
|
|
32
35
|
export default parsePropsToDisplay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-props-to-display.js","names":["React","Fragment","at","isObject","getParsedPropValues","getSanitizedPropValues","BOLD_TAG","BLANK_SPACE_UNICODE_STRING","parsePropsToDisplay","props","propsToDisplay","filter","Boolean","map","bold","propertiesToDisplay","prefix","suffix","shouldStrip","enableLink","
|
|
1
|
+
{"version":3,"file":"parse-props-to-display.js","names":["React","Fragment","at","isObject","getParsedPropValues","getSanitizedPropValues","BOLD_TAG","BLANK_SPACE_UNICODE_STRING","processDataSummaryValue","parsePropsToDisplay","props","propsToDisplay","filter","Boolean","map","options","currentIndex","bold","propertiesToDisplay","prefix","suffix","shouldStrip","enableLink","Wrapper","parsedPropValues","sanitizedPropValues","length","stringEndBlank","processedValue","Array","isArray","value","createElement"],"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,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,SAASC,QAAQ,EAAEC,0BAA0B,QAAQ,cAAc;AACnE,OAAOC,uBAAuB,MAAM,8BAA8B;;AAElE;AACA,MAAMC,mBAAmB,GAAGA,CAACC,KAAK,GAAG,CAAC,CAAC,EAAEC,cAAc,GAAG,EAAE,KAAK;EAC/D,IAAI,CAACR,QAAQ,CAACQ,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,OAAOT,EAAE,CAACQ,KAAK,EAAEC,cAAc,CAAC,CAACC,MAAM,CAACC,OAAO,CAAC;EAElF,OAAOF,cAAc,CAACG,GAAG,CAAC,CAACC,OAAO,EAAEC,YAAY,KAAK;IACnD,MAAM;MAAEC,IAAI;MAAEC,mBAAmB;MAAEC,MAAM;MAAEC,MAAM;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAGP,OAAO;IACtF,MAAMQ,OAAO,GAAGN,IAAI,GAAGX,QAAQ,GAAGL,QAAQ;IAE1C,MAAMuB,gBAAgB,GAAGpB,mBAAmB,CAAC;MAC3Cc,mBAAmB;MACnBR,KAAK;MACLY,UAAU;MACVD;IACF,CAAC,CAAC;IAEF,MAAMI,mBAAmB,GAAGpB,sBAAsB,CAACmB,gBAAgB,CAAC;IACpE,IAAI,CAACC,mBAAmB,IAAI,CAACA,mBAAmB,CAACC,MAAM,EAAE,OAAO,IAAI;IACpE,MAAMC,cAAc,GAClBX,YAAY,GAAG,CAAC,KAAKL,cAAc,CAACe,MAAM,GAAG,EAAE,GAAGnB,0BAA0B;IAE9E,MAAMqB,cAAc,GAAGC,KAAK,CAACC,OAAO,CAACL,mBAAmB,CAAC,GACrDA,mBAAmB,CAACX,GAAG,CAACiB,KAAK,IAAIvB,uBAAuB,CAACuB,KAAK,EAAEhB,OAAO,CAAC,CAAC,GACzEP,uBAAuB,CAACiB,mBAAmB,EAAEV,OAAO,CAAC;IAEzD,oBACEf,KAAA,CAAAgC,aAAA,CAACT,OAAO,QACLJ,MAAM,EAAC,GAAC,EAACS,cAAc,EAAC,GAAC,EAACR,MAAM,EAChCO,cACM,CAAC;EAEd,CAAC,CAAC;AACJ,CAAC;AAED,eAAelB,mBAAmB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import components from '../components';
|
|
9
|
+
const {
|
|
10
|
+
code: Code
|
|
11
|
+
} = components;
|
|
12
|
+
const renderCode = value => /*#__PURE__*/React.createElement(Code, {
|
|
13
|
+
code: value,
|
|
14
|
+
disableWrapper: true
|
|
15
|
+
});
|
|
16
|
+
const processDataSummaryValue = (objPropValue, {
|
|
17
|
+
isHtml
|
|
18
|
+
}) => {
|
|
19
|
+
let pValue = objPropValue;
|
|
20
|
+
if (isHtml) {
|
|
21
|
+
pValue = Array.isArray(objPropValue) ? objPropValue.map(_ref => {
|
|
22
|
+
let {
|
|
23
|
+
keyField,
|
|
24
|
+
[keyField]: value
|
|
25
|
+
} = _ref,
|
|
26
|
+
otherProps = _objectWithoutProperties(_ref, ["keyField", keyField].map(_toPropertyKey));
|
|
27
|
+
return _objectSpread({
|
|
28
|
+
[keyField]: renderCode(value),
|
|
29
|
+
keyField
|
|
30
|
+
}, otherProps);
|
|
31
|
+
}) : renderCode(objPropValue);
|
|
32
|
+
}
|
|
33
|
+
return pValue;
|
|
34
|
+
};
|
|
35
|
+
export default processDataSummaryValue;
|
|
36
|
+
//# sourceMappingURL=process-data-summary-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-data-summary-value.js","names":["React","components","code","Code","renderCode","value","createElement","disableWrapper","processDataSummaryValue","objPropValue","isHtml","pValue","Array","isArray","map","_ref","keyField","otherProps","_objectWithoutProperties","_toPropertyKey","_objectSpread"],"sources":["../../src/helpers/process-data-summary-value.js"],"sourcesContent":["import React from 'react';\nimport components from '../components';\n\nconst { code: Code } = components;\n\nconst renderCode = value => <Code code={value} disableWrapper />;\n\nconst processDataSummaryValue = (objPropValue, { isHtml }) => {\n let pValue = objPropValue;\n if (isHtml) {\n pValue = Array.isArray(objPropValue)\n ? objPropValue.map(({ keyField, [keyField]: value, ...otherProps }) => ({\n [keyField]: renderCode(value),\n keyField,\n ...otherProps\n }))\n : renderCode(objPropValue);\n }\n return pValue;\n};\n\nexport default processDataSummaryValue;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,eAAe;AAEtC,MAAM;EAAEC,IAAI,EAAEC;AAAK,CAAC,GAAGF,UAAU;AAEjC,MAAMG,UAAU,GAAGC,KAAK,iBAAIL,KAAA,CAAAM,aAAA,CAACH,IAAI;EAACD,IAAI,EAAEG,KAAM;EAACE,cAAc;AAAA,CAAE,CAAC;AAEhE,MAAMC,uBAAuB,GAAGA,CAACC,YAAY,EAAE;EAAEC;AAAO,CAAC,KAAK;EAC5D,IAAIC,MAAM,GAAGF,YAAY;EACzB,IAAIC,MAAM,EAAE;IACVC,MAAM,GAAGC,KAAK,CAACC,OAAO,CAACJ,YAAY,CAAC,GAChCA,YAAY,CAACK,GAAG,CAACC,IAAA;MAAA,IAAC;UAAEC,QAAQ;UAAE,CAACA,QAAQ,GAAGX;QAAqB,CAAC,GAAAU,IAAA;QAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,eAA/BC,QAAQ,EAAAF,GAAA,CAAAK,cAAA;MAAA,OAAAC,aAAA;QACrC,CAACJ,QAAQ,GAAGZ,UAAU,CAACC,KAAK,CAAC;QAC7BW;MAAQ,GACLC,UAAU;IAAA,CACb,CAAC,GACHb,UAAU,CAACK,YAAY,CAAC;EAC9B;EACA,OAAOE,MAAM;AACf,CAAC;AAED,eAAeH,uBAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/react-page-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0-admin-updates.0",
|
|
4
4
|
"description": "Blaze react page builder",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/core-auth-ui": "
|
|
31
|
-
"@blaze-cms/core-errors": "
|
|
32
|
-
"@blaze-cms/core-errors-ui": "
|
|
30
|
+
"@blaze-cms/core-auth-ui": "0.131.0-admin-updates.0",
|
|
31
|
+
"@blaze-cms/core-errors": "0.131.0-admin-updates.0",
|
|
32
|
+
"@blaze-cms/core-errors-ui": "0.131.0-admin-updates.0",
|
|
33
33
|
"@blaze-cms/image-cdn-react": "0.3.0-alpha.5",
|
|
34
|
-
"@blaze-cms/nextjs-components": "
|
|
35
|
-
"@blaze-cms/plugin-search-ui": "
|
|
36
|
-
"@blaze-cms/setup-ui": "
|
|
37
|
-
"@blaze-cms/utils": "
|
|
38
|
-
"@blaze-cms/utils-handlebars": "
|
|
34
|
+
"@blaze-cms/nextjs-components": "0.131.0-admin-updates.0",
|
|
35
|
+
"@blaze-cms/plugin-search-ui": "0.131.0-admin-updates.0",
|
|
36
|
+
"@blaze-cms/setup-ui": "0.131.0-admin-updates.0",
|
|
37
|
+
"@blaze-cms/utils": "0.131.0-admin-updates.0",
|
|
38
|
+
"@blaze-cms/utils-handlebars": "0.131.0-admin-updates.0",
|
|
39
39
|
"@blaze-react/breadcrumb": "0.8.0-alpha.60",
|
|
40
40
|
"@blaze-react/button": "0.5.19",
|
|
41
41
|
"@blaze-react/checkboxes": "0.5.31",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"lib/*",
|
|
90
90
|
"lib-es/*"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "e09b4e7a48c39d6dd98f21491e94cc483e791f4a"
|
|
93
93
|
}
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
filterQuerySetup,
|
|
23
23
|
shouldSkipSingleQuery,
|
|
24
24
|
shouldReturn,
|
|
25
|
-
getUpdatedSortProperties
|
|
25
|
+
getUpdatedSortProperties,
|
|
26
|
+
getUpdatedItemsToDisplay
|
|
26
27
|
} from './helpers';
|
|
27
28
|
|
|
28
29
|
const CardsContainer = dynamic(() => import('./CardsContainer'));
|
|
@@ -95,6 +96,7 @@ const CardsRender = ({
|
|
|
95
96
|
isPreview,
|
|
96
97
|
itemEntityUpdated: unpublishedParentEntityName
|
|
97
98
|
});
|
|
99
|
+
|
|
98
100
|
const {
|
|
99
101
|
data: { entityData: parentEntityData = {} } = {},
|
|
100
102
|
error: _err,
|
|
@@ -122,6 +124,13 @@ const CardsRender = ({
|
|
|
122
124
|
variableProps
|
|
123
125
|
);
|
|
124
126
|
|
|
127
|
+
const updatedItemsToDisplay = getUpdatedItemsToDisplay({
|
|
128
|
+
itemsToDisplay,
|
|
129
|
+
inheritedFilters,
|
|
130
|
+
parentSchema,
|
|
131
|
+
parentEntityData
|
|
132
|
+
});
|
|
133
|
+
|
|
125
134
|
const { limit, variables } = filterQuerySetup({
|
|
126
135
|
getEntitySchemas: Object.values(requiredSchema),
|
|
127
136
|
entity: primaryEntityToUse,
|
|
@@ -130,22 +139,33 @@ const CardsRender = ({
|
|
|
130
139
|
docType: docTypes,
|
|
131
140
|
filterOperator,
|
|
132
141
|
filterEntityRelations,
|
|
133
|
-
itemsToDisplay,
|
|
142
|
+
itemsToDisplay: updatedItemsToDisplay,
|
|
134
143
|
entitySameAsCurrentItemEntity,
|
|
135
144
|
useRandomSort
|
|
136
145
|
});
|
|
146
|
+
|
|
147
|
+
const hasNoFiltersOrItemsToDisplay = !updatedItemsToDisplay.length && !updatedFilterBy;
|
|
148
|
+
|
|
137
149
|
const { data: cardData, error: cardsError, loading: cardsLoading } = useQuery(action, {
|
|
138
150
|
variables,
|
|
139
151
|
fetchPolicy: useRandomSort ? 'cache-and-network' : 'cache-first',
|
|
140
|
-
skip: shouldReturn(
|
|
152
|
+
skip: shouldReturn(
|
|
153
|
+
hasNoFiltersOrItemsToDisplay,
|
|
154
|
+
_loading,
|
|
155
|
+
_load,
|
|
156
|
+
schemaLoading,
|
|
157
|
+
_error,
|
|
158
|
+
_err,
|
|
159
|
+
schemaError
|
|
160
|
+
)
|
|
141
161
|
});
|
|
142
162
|
|
|
143
|
-
const imageIds =
|
|
163
|
+
const imageIds = updatedItemsToDisplay.map(({ imageId }) => imageId).filter(Boolean);
|
|
144
164
|
const { data: imagesData, loading: imagesLoading } = useGetImages(imageIds, true);
|
|
145
165
|
const isLoading = shouldReturn(_loading, _load, schemaLoading, cardsLoading, imagesLoading);
|
|
146
166
|
const hasError = shouldReturn(_error, _err, schemaError);
|
|
147
167
|
|
|
148
|
-
if (
|
|
168
|
+
if (hasNoFiltersOrItemsToDisplay) return null;
|
|
149
169
|
if (isLoading) return null;
|
|
150
170
|
if (hasError) return null;
|
|
151
171
|
if (cardsError) return cardsError.message;
|
|
@@ -160,7 +180,7 @@ const CardsRender = ({
|
|
|
160
180
|
|
|
161
181
|
const orderedData = useRandomSort
|
|
162
182
|
? cardDataResults
|
|
163
|
-
: sortResponseData(cardDataResults,
|
|
183
|
+
: sortResponseData(cardDataResults, updatedItemsToDisplay);
|
|
164
184
|
const { regularChildren, gtmChildren } = splitChildren(
|
|
165
185
|
children,
|
|
166
186
|
cardDataResults,
|
|
@@ -169,7 +189,7 @@ const CardsRender = ({
|
|
|
169
189
|
name: variableProps.name
|
|
170
190
|
}
|
|
171
191
|
);
|
|
172
|
-
const updatedCards = appendImages(imagesData, orderedData,
|
|
192
|
+
const updatedCards = appendImages(imagesData, orderedData, updatedItemsToDisplay);
|
|
173
193
|
|
|
174
194
|
return (
|
|
175
195
|
<>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const getUpdatedItemsToDisplay = ({
|
|
2
|
+
parentSchema,
|
|
3
|
+
parentEntityData,
|
|
4
|
+
itemsToDisplay = [],
|
|
5
|
+
inheritedFilters = []
|
|
6
|
+
}) => {
|
|
7
|
+
const idProp = inheritedFilters.find(filter => filter.indexOf('id/') === 0);
|
|
8
|
+
|
|
9
|
+
if (!idProp || !parentSchema || !parentEntityData) return itemsToDisplay;
|
|
10
|
+
const { properties } = parentSchema;
|
|
11
|
+
const [, entityKey] = idProp.split('/');
|
|
12
|
+
if (!properties || !entityKey) return itemsToDisplay;
|
|
13
|
+
const queryValue = Object.keys(properties).find(
|
|
14
|
+
propKey =>
|
|
15
|
+
properties[propKey] &&
|
|
16
|
+
properties[propKey].relation &&
|
|
17
|
+
properties[propKey].relation.entityIdentifier === entityKey
|
|
18
|
+
);
|
|
19
|
+
const parentValues = parentEntityData[queryValue];
|
|
20
|
+
if (!parentValues) return itemsToDisplay;
|
|
21
|
+
const updatedItemsToDisplay = [...itemsToDisplay];
|
|
22
|
+
if (Array.isArray(parentValues)) {
|
|
23
|
+
parentValues.forEach(value => {
|
|
24
|
+
updatedItemsToDisplay.push({ displayItems: [value] });
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
updatedItemsToDisplay.push({ displayItems: [parentValues] });
|
|
28
|
+
}
|
|
29
|
+
return updatedItemsToDisplay;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default getUpdatedItemsToDisplay;
|
|
@@ -6,3 +6,4 @@ export { default as filterQuerySetup } from './filter-query-setup';
|
|
|
6
6
|
export { default as shouldReturn } from './should-return';
|
|
7
7
|
export { default as shouldSkipSingleQuery } from './should-skip-single-query';
|
|
8
8
|
export { default as getUpdatedSortProperties } from './get-updated-sort-properties';
|
|
9
|
+
export { default as getUpdatedItemsToDisplay } from './get-updated-items-to-display';
|
|
@@ -7,26 +7,30 @@ import { getClassModifiers } from '../../utils';
|
|
|
7
7
|
import { CODE } from '../../constants';
|
|
8
8
|
import { wrapScriptTags } from './helpers';
|
|
9
9
|
|
|
10
|
-
const Code = memo(({ code: embedCode, parserOptions, ...otherProps }) => {
|
|
10
|
+
const Code = memo(({ code: embedCode, parserOptions, disableWrapper, ...otherProps }) => {
|
|
11
11
|
if (!embedCode) return null;
|
|
12
12
|
|
|
13
13
|
const parsedCode = parseHTML(embedCode, parserOptions);
|
|
14
14
|
const wrappedCode = wrapScriptTags(parsedCode);
|
|
15
15
|
const modifiers = getClassModifiers(CODE, { ...otherProps });
|
|
16
16
|
|
|
17
|
+
if (disableWrapper) return wrappedCode;
|
|
18
|
+
|
|
17
19
|
return <Wrapper modifiers={modifiers}>{wrappedCode}</Wrapper>;
|
|
18
20
|
});
|
|
19
21
|
|
|
20
22
|
Code.propTypes = {
|
|
21
23
|
code: PropTypes.string,
|
|
22
24
|
modifier: PropTypes.string,
|
|
23
|
-
parserOptions: PropTypes.object
|
|
25
|
+
parserOptions: PropTypes.object,
|
|
26
|
+
disableWrapper: PropTypes.bool
|
|
24
27
|
};
|
|
25
28
|
|
|
26
29
|
Code.defaultProps = {
|
|
27
30
|
code: '',
|
|
28
31
|
modifier: '',
|
|
29
|
-
parserOptions: {}
|
|
32
|
+
parserOptions: {},
|
|
33
|
+
disableWrapper: false
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
export default withTitle(Code);
|
|
@@ -3,6 +3,7 @@ import flatten from 'lodash.flatten';
|
|
|
3
3
|
import getLinkToPublishedContent from './get-link-to-published-content';
|
|
4
4
|
import getLoopPropsLimit from './get-loop-props-limit';
|
|
5
5
|
import getPropValue from './get-prop-value';
|
|
6
|
+
import { processDataSummaryValue } from '../../../helpers';
|
|
6
7
|
|
|
7
8
|
const getLoopValue = value => {
|
|
8
9
|
const { keyField } = value;
|
|
@@ -46,8 +47,10 @@ const buildLoopPropsContent = (loopProps = [], propsToDisplay = [], limit = 0, d
|
|
|
46
47
|
const loopValue = loopValues[key];
|
|
47
48
|
const propValue = loopValue ? getLoopValue(loopValue[i]) : regularValues[key];
|
|
48
49
|
if (!propValue) return null;
|
|
50
|
+
|
|
51
|
+
const processedValue = processDataSummaryValue(propValue, options);
|
|
49
52
|
const linkToPublishedContent = getLinkToPublishedContent(key, data);
|
|
50
|
-
return [upperFirst(label),
|
|
53
|
+
return [upperFirst(label), processedValue, linkToPublishedContent, modifier];
|
|
51
54
|
});
|
|
52
55
|
})
|
|
53
56
|
).filter(Boolean);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import upperFirst from 'lodash.upperfirst';
|
|
2
2
|
import flatten from 'lodash.flatten';
|
|
3
|
-
import { isObject } from '../../../helpers';
|
|
3
|
+
import { isObject, processDataSummaryValue } from '../../../helpers';
|
|
4
4
|
import getLinkToPublishedContent from './get-link-to-published-content';
|
|
5
5
|
import getPropValue from './get-prop-value';
|
|
6
6
|
import getLinkBasedOnValue from './get-link-based-on-value';
|
|
@@ -27,15 +27,18 @@ const buildPropsToDisplayWithContent = (props, propsToDisplay = []) => {
|
|
|
27
27
|
const objPropValue = getPropValue(key, props, options);
|
|
28
28
|
if (!objPropValue) return null;
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const processedValue = processDataSummaryValue(objPropValue, options);
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
const link = getLink(enableLink, key, props, processedValue);
|
|
33
|
+
|
|
34
|
+
return [upperFirst(label), processedValue, link, modifier];
|
|
33
35
|
});
|
|
34
36
|
})
|
|
35
37
|
).filter(Boolean);
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
export default buildPropsToDisplayWithContent;
|
|
41
|
+
|
|
39
42
|
function getLink(enableLink, key, props, objPropValue) {
|
|
40
43
|
let link = '';
|
|
41
44
|
if (enableLink) {
|
|
@@ -7,7 +7,13 @@ import { MainContext } from '@blaze-cms/nextjs-components';
|
|
|
7
7
|
import { generateSingleItemQuery, getItemList } from '../../application/query';
|
|
8
8
|
import ListBuilder from './ListBuilder';
|
|
9
9
|
import { AZ_LIST_TYPE } from './constants';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getAzQueryFilter,
|
|
12
|
+
getSortProps,
|
|
13
|
+
hasRequiredItemListDetails,
|
|
14
|
+
getListSpecificSearchFilter,
|
|
15
|
+
getListQuery
|
|
16
|
+
} from './helpers';
|
|
11
17
|
import {
|
|
12
18
|
getGenericProps,
|
|
13
19
|
getRequiredSchemas,
|
|
@@ -37,7 +43,7 @@ const ListFactory = props => {
|
|
|
37
43
|
type,
|
|
38
44
|
sortby: defaultSortBy,
|
|
39
45
|
sort: defaultSort,
|
|
40
|
-
|
|
46
|
+
allSearchFilters,
|
|
41
47
|
operator: filterOperator,
|
|
42
48
|
sortProperties,
|
|
43
49
|
itemListName
|
|
@@ -46,11 +52,13 @@ const ListFactory = props => {
|
|
|
46
52
|
const router = useRouter();
|
|
47
53
|
const { asPath } = router;
|
|
48
54
|
const parsedQuery = asPath.replace(/%5D/g, ']').replace(/%5B/g, '[');
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = parseUrl(parsedQuery);
|
|
55
|
+
const [searchFilter, hasListSpecificFilters] = getListSpecificSearchFilter(
|
|
56
|
+
allSearchFilters,
|
|
57
|
+
name
|
|
58
|
+
);
|
|
59
|
+
const { query, url, query: { itemListId: queryItemListId } = {} } = parseUrl(parsedQuery);
|
|
60
|
+
const updatedQuery = getListQuery(query, hasListSpecificFilters, name);
|
|
61
|
+
const { sort: querySort, sortby: querySortBy } = updatedQuery;
|
|
54
62
|
const { sortbyFilters, updatedSortProperties } = getSortProps({
|
|
55
63
|
querySort,
|
|
56
64
|
sortProperties,
|
|
@@ -62,8 +70,8 @@ const ListFactory = props => {
|
|
|
62
70
|
const itemListId = getItemListId(itemListName, queryItemListId);
|
|
63
71
|
const { itemEntity: parentEntity, itemId: parentId } = parent;
|
|
64
72
|
const updatedParentEntity = getUnpublishedEntityName(parentEntity);
|
|
65
|
-
const paginationIndex = getPaginationIndex(
|
|
66
|
-
const azFilter = getAzQueryFilter(
|
|
73
|
+
const paginationIndex = getPaginationIndex(updatedQuery, name);
|
|
74
|
+
const azFilter = getAzQueryFilter(updatedQuery, name);
|
|
67
75
|
|
|
68
76
|
const entitiesToUse = entities && entities.length ? entities : [legacyEntity];
|
|
69
77
|
const [filterEntity] = entitiesToUse;
|
|
@@ -123,10 +131,12 @@ const ListFactory = props => {
|
|
|
123
131
|
const [textFilter] = getSearchFilterType(searchFilter, TEXT_SEARCH);
|
|
124
132
|
const shouldApplyTextFilter = textFilter && textFilter.propsToDisplay.length;
|
|
125
133
|
const operator = shouldApplyTextFilter ? getElasticsearchOperator(textFilter) : AND_OPERATOR;
|
|
126
|
-
const valuesText = shouldApplyTextFilter
|
|
127
|
-
|
|
134
|
+
const valuesText = shouldApplyTextFilter
|
|
135
|
+
? buildSearchValuesText(textFilter, updatedQuery, name)
|
|
136
|
+
: [];
|
|
137
|
+
const { valuesAnd, valuesOr } = getQueryFilters(searchFilter, updatedQuery, name);
|
|
128
138
|
const isTextSearchFilterApplied = !!(
|
|
129
|
-
|
|
139
|
+
updatedQuery.search_term &&
|
|
130
140
|
searchFilter &&
|
|
131
141
|
getSearchFilterType(searchFilter, TEXT_SEARCH).length
|
|
132
142
|
);
|
|
@@ -139,7 +149,7 @@ const ListFactory = props => {
|
|
|
139
149
|
const listProps = {
|
|
140
150
|
...props,
|
|
141
151
|
...genericProps,
|
|
142
|
-
query,
|
|
152
|
+
query: updatedQuery,
|
|
143
153
|
url,
|
|
144
154
|
isCard,
|
|
145
155
|
isAZ,
|
|
@@ -179,7 +189,7 @@ ListFactory.propTypes = {
|
|
|
179
189
|
name: PropTypes.string,
|
|
180
190
|
sortby: PropTypes.array,
|
|
181
191
|
sort: PropTypes.string,
|
|
182
|
-
|
|
192
|
+
allSearchFilters: PropTypes.array,
|
|
183
193
|
sortProperties: PropTypes.array,
|
|
184
194
|
itemListName: PropTypes.string
|
|
185
195
|
};
|
|
@@ -195,7 +205,7 @@ ListFactory.defaultProps = {
|
|
|
195
205
|
sortProperties: [],
|
|
196
206
|
sort: '',
|
|
197
207
|
operator: AND,
|
|
198
|
-
|
|
208
|
+
allSearchFilters: [],
|
|
199
209
|
itemListName: ''
|
|
200
210
|
};
|
|
201
211
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import stripQueryKey from './strip-query-key';
|
|
2
|
+
|
|
3
|
+
const getListQuery = (query, hasListSpecificFilters, name) => {
|
|
4
|
+
const updatedQuery = {};
|
|
5
|
+
const listKey = `pb[${name}]`;
|
|
6
|
+
const paginationKey = `${listKey}[page]`;
|
|
7
|
+
const sortKey = `${listKey}[sort]`;
|
|
8
|
+
const sortByKey = `${listKey}[sortby]`;
|
|
9
|
+
|
|
10
|
+
Object.keys(query).forEach(queryKey => {
|
|
11
|
+
const isListKey = queryKey.indexOf(`${listKey}`) !== -1;
|
|
12
|
+
const decodedQueryValue = Array.isArray(query[queryKey])
|
|
13
|
+
? query[queryKey].map(value => decodeURIComponent(value))
|
|
14
|
+
: decodeURIComponent(query[queryKey]);
|
|
15
|
+
if (hasListSpecificFilters) {
|
|
16
|
+
const strippedKey = stripQueryKey(queryKey, listKey, paginationKey);
|
|
17
|
+
if (isListKey) updatedQuery[strippedKey] = decodedQueryValue;
|
|
18
|
+
} else {
|
|
19
|
+
if (queryKey.indexOf('pb[') === -1) updatedQuery[queryKey] = decodedQueryValue;
|
|
20
|
+
if (queryKey.indexOf(paginationKey) !== -1) updatedQuery[queryKey] = decodedQueryValue;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
updatedQuery.sort = query[sortKey] || query.sort;
|
|
24
|
+
updatedQuery.sortby = query[sortByKey] || query.sortby;
|
|
25
|
+
return updatedQuery;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default getListQuery;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const getListSpecificSearchFilter = (searchFilters, listName) => {
|
|
2
|
+
const searchFilterMatch = searchFilters.find(
|
|
3
|
+
({ settings: { listComponentName } }) => listComponentName === listName
|
|
4
|
+
);
|
|
5
|
+
const hasListSpecificFilters = !!searchFilterMatch;
|
|
6
|
+
const searchFilterToUse = searchFilterMatch || searchFilters[0];
|
|
7
|
+
return [searchFilterToUse, hasListSpecificFilters];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default getListSpecificSearchFilter;
|
|
@@ -7,3 +7,5 @@ export { default as getItemsPerPageToUse } from './get-items-per-page-to-use';
|
|
|
7
7
|
export { default as getSortProps } from './get-sort-props';
|
|
8
8
|
export { default as hasRequiredItemListDetails } from './has-required-item-list-details';
|
|
9
9
|
export { default as getListComponent } from './get-list-component';
|
|
10
|
+
export { default as getListQuery } from './get-list-query';
|
|
11
|
+
export { default as getListSpecificSearchFilter } from './get-list-specific-search-filter';
|
|
@@ -10,12 +10,12 @@ const SearchContent = ({
|
|
|
10
10
|
searchInputAlignment,
|
|
11
11
|
searchInputWrapperMobile,
|
|
12
12
|
searchInputWrapperDesktop,
|
|
13
|
-
collapsible,
|
|
14
13
|
isMobile,
|
|
15
14
|
placeholder,
|
|
16
|
-
modifier
|
|
15
|
+
modifier,
|
|
16
|
+
collapsedSearch
|
|
17
17
|
}) => {
|
|
18
|
-
const [collapsed, setCollapsed] = useState(
|
|
18
|
+
const [collapsed, setCollapsed] = useState(collapsedSearch);
|
|
19
19
|
const router = useRouter();
|
|
20
20
|
|
|
21
21
|
const { results, searchTerm, setSearchTerm, debouncedSearchTerm } = useDebounceSearch({
|
|
@@ -50,7 +50,7 @@ const SearchContent = ({
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
const handleOnBlur = () => {
|
|
53
|
-
if (!
|
|
53
|
+
if (!collapsedSearch) return;
|
|
54
54
|
if (!debouncedSearchTerm || debouncedSearchTerm === '') setCollapsed(true);
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -120,7 +120,8 @@ SearchContent.propTypes = {
|
|
|
120
120
|
isMobile: PropTypes.bool,
|
|
121
121
|
collapsible: PropTypes.bool,
|
|
122
122
|
entities: PropTypes.array.isRequired,
|
|
123
|
-
modifier: PropTypes.string
|
|
123
|
+
modifier: PropTypes.string,
|
|
124
|
+
collapsedSearch: PropTypes.bool
|
|
124
125
|
};
|
|
125
126
|
|
|
126
127
|
SearchContent.defaultProps = {
|
|
@@ -130,7 +131,8 @@ SearchContent.defaultProps = {
|
|
|
130
131
|
placeholder: '',
|
|
131
132
|
isMobile: false,
|
|
132
133
|
collapsible: false,
|
|
133
|
-
modifier: ''
|
|
134
|
+
modifier: '',
|
|
135
|
+
collapsedSearch: false
|
|
134
136
|
};
|
|
135
137
|
|
|
136
138
|
export default SearchContent;
|