@empathyco/x-components 3.0.0-alpha.39 → 3.0.0-alpha.43
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 +79 -0
- package/core/index.js +6 -2
- package/core/index.js.map +1 -1
- package/design-system/base.css +2 -1
- package/design-system/default-theme.css +98 -35
- package/design-system/full-theme.css +324 -45
- package/design-system/grid-default.css +6 -0
- package/design-system/input-group-default.css +16 -7
- package/design-system/list-default.css +0 -5
- package/design-system/option-list-bottom.css +76 -10
- package/design-system/option-list-default.css +39 -2
- package/design-system/result-default.css +1 -1
- package/design-system/sliding-panel-default.css +15 -17
- package/design-system/sliding-panel-default.token.css +0 -2
- package/design-system/typography-default.css +1 -0
- package/design-system/utilities-background-color.css +3 -0
- package/design-system/utilities-border-color.css +3 -0
- package/design-system/utilities-flex.css +32 -0
- package/design-system/utilities-font-color.css +3 -0
- package/design-system/utilities-font-size.css +79 -0
- package/design-system/utilities-line-height.css +17 -0
- package/design-system/utilities-text-decoration.css +15 -0
- package/design-system/utilities-text-transform.css +11 -0
- package/docs/API-reference/api/x-adapter.empathynextquery.md +1 -0
- package/docs/API-reference/api/x-adapter.empathynextquery.source.md +11 -0
- package/docs/API-reference/api/{x-components.resetpage.md → x-components.arrowdownicon.md} +3 -5
- package/docs/API-reference/api/{x-components.resetsort.md → x-components.arrowlefticon.md} +3 -5
- package/docs/API-reference/api/{x-components.resetfacets.md → x-components.arrowrighticon.md} +3 -5
- package/docs/API-reference/api/{x-components.arrowicon.md → x-components.arrowupicon.md} +2 -2
- package/docs/API-reference/api/x-components.cancelfetchandsavesearchresponsewire.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavesearchresponsewire.md +1 -1
- package/docs/API-reference/api/x-components.getnewandupdatedkeys.md +27 -0
- package/docs/API-reference/api/x-components.grid2rowsicon.md +11 -0
- package/docs/API-reference/api/x-components.increasepageappendingresults.md +1 -1
- package/docs/API-reference/api/x-components.md +12 -7
- package/docs/API-reference/api/x-components.nextqueries.highlightcurated.md +13 -0
- package/docs/API-reference/api/x-components.nextquery.highlightcurated.md +13 -0
- package/docs/API-reference/api/x-components.nextquery.md +1 -0
- package/docs/API-reference/api/x-components.resetappending.md +1 -1
- package/docs/API-reference/api/x-components.resetspellcheckquery.md +1 -1
- package/docs/API-reference/api/x-components.resetstatewire.md +13 -0
- package/docs/API-reference/api/x-components.saveoriginwire.md +1 -1
- package/docs/API-reference/api/x-components.scroll.md +1 -3
- package/docs/API-reference/api/x-components.scrollmixin.md +1 -0
- package/docs/API-reference/api/x-components.scrollmixin.reseton.md +13 -0
- package/docs/API-reference/api/x-components.searchactions.md +1 -0
- package/docs/API-reference/api/x-components.searchactions.resetstate.md +24 -0
- package/docs/API-reference/api/x-components.searchxevents.md +1 -0
- package/docs/API-reference/api/x-components.searchxevents.searchrequestupdated.md +13 -0
- package/docs/API-reference/api/x-components.setpagesize.md +1 -1
- package/docs/API-reference/api/x-components.setquerytagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.setrelatedtags.md +1 -1
- package/docs/API-reference/api/x-components.setsearchextraparams.md +1 -1
- package/docs/API-reference/api/x-components.setsearchpage.md +1 -1
- package/docs/API-reference/api/x-components.setsearchquery.md +1 -1
- package/docs/API-reference/api/x-components.setselectedfilters.md +1 -1
- package/docs/API-reference/api/x-components.setsort.md +1 -1
- package/docs/API-reference/api/x-components.seturlparams.md +1 -1
- package/docs/API-reference/api/x-components.slidingpanel.md +2 -12
- package/docs/API-reference/api/x-components.slidingpanel.resetoncontentchange.md +13 -0
- package/docs/API-reference/api/x-components.slidingpanel.scrollfactor.md +1 -1
- package/docs/API-reference/api/x-components.slidingpanel.showbuttons.md +1 -1
- package/docs/API-reference/api/x-components.taggingmutations.md +1 -0
- package/docs/API-reference/api/x-components.taggingmutations.setquerytagginginfo.md +24 -0
- package/docs/API-reference/api/x-components.taggingstate.md +1 -0
- package/docs/API-reference/api/x-components.taggingstate.querytagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.md +1 -0
- package/docs/API-reference/api/x-components.taggingxevents.searchtaggingreceived.md +13 -0
- package/docs/API-reference/api/x-components.trackquerywire.md +1 -1
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.md +21 -0
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.newrequest.md +11 -0
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.oldrequest.md +11 -0
- package/docs/API-reference/api/x-components.wiremetadata.md +1 -0
- package/docs/API-reference/api/x-components.wiremetadata.oldvalue.md +13 -0
- package/docs/API-reference/api/x-types.nextquery.iscurated.md +13 -0
- package/docs/API-reference/api/x-types.nextquery.md +6 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-down.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-left.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-right.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-up.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.grid-2-rows.md +7 -0
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +52 -33
- package/docs/API-reference/components/common/x-components.sliding-panel.md +192 -33
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -11
- package/docs/API-reference/components/next-queries/x-components.next-query.md +16 -7
- package/docs/API-reference/components/scroll/x-components.scroll.md +5 -8
- package/js/components/icons/arrow-down.vue.js +61 -0
- package/js/components/icons/arrow-down.vue.js.map +1 -0
- package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/{arrow.vue.js → arrow-left.vue.js} +2 -2
- package/js/components/icons/arrow-left.vue.js.map +1 -0
- package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow-right.vue.js +61 -0
- package/js/components/icons/arrow-right.vue.js.map +1 -0
- package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow-up.vue.js +61 -0
- package/js/components/icons/arrow-up.vue.js.map +1 -0
- package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/grid-2-rows.vue.js +65 -0
- package/js/components/icons/grid-2-rows.vue.js.map +1 -0
- package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/tag.vue.js +1 -1
- package/js/components/icons/tag.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +2 -2
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/scroll/scroll.mixin.js +12 -6
- package/js/components/scroll/scroll.mixin.js.map +1 -1
- package/js/components/sliding-panel.vue.js +2 -2
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js +56 -40
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/index.js +8 -4
- package/js/index.js.map +1 -1
- package/js/plugins/x-emitters.js +3 -3
- package/js/plugins/x-emitters.js.map +1 -1
- package/js/utils/object.js +17 -1
- package/js/utils/object.js.map +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/wiring.js +3 -0
- package/js/x-modules/facets/wiring.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +15 -4
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +3 -0
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +6 -1
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +18 -0
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/related-tags/wiring.js +3 -0
- package/js/x-modules/related-tags/wiring.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue.js +14 -13
- package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +2 -9
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort.mixin.js +5 -1
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +5 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/store/actions/increase-page-apending-results.action.js +1 -1
- package/js/x-modules/search/store/actions/increase-page-apending-results.action.js.map +1 -1
- package/js/x-modules/search/store/actions/reset-state.action.js +32 -0
- package/js/x-modules/search/store/actions/reset-state.action.js.map +1 -0
- package/js/x-modules/search/store/emitters.js +6 -0
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search/store/module.js +2 -0
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +15 -32
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/tagging/store/emitters.js +2 -4
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +5 -1
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +15 -6
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter.api.json +26 -0
- package/report/x-components.api.json +589 -292
- package/report/x-components.api.md +68 -35
- package/report/x-types.api.json +28 -1
- package/search/index.js +1 -1
- package/tagging/index.js +1 -1
- package/types/components/icons/arrow-down.vue.d.ts +3 -0
- package/types/components/icons/arrow-down.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-left.vue.d.ts +3 -0
- package/types/components/icons/arrow-left.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-right.vue.d.ts +3 -0
- package/types/components/icons/arrow-right.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-up.vue.d.ts +3 -0
- package/types/components/icons/arrow-up.vue.d.ts.map +1 -0
- package/types/components/icons/grid-2-rows.vue.d.ts +3 -0
- package/types/components/icons/grid-2-rows.vue.d.ts.map +1 -0
- package/types/components/icons/index.d.ts +5 -1
- package/types/components/icons/index.d.ts.map +1 -1
- package/types/components/scroll/scroll.mixin.d.ts +7 -0
- package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
- package/types/components/sliding-panel.vue.d.ts +35 -18
- package/types/components/sliding-panel.vue.d.ts.map +1 -1
- package/types/utils/object.d.ts +11 -0
- package/types/utils/object.d.ts.map +1 -1
- package/types/wiring/wiring.types.d.ts +2 -0
- package/types/wiring/wiring.types.d.ts.map +1 -1
- package/types/x-modules/facets/wiring.d.ts +3 -0
- package/types/x-modules/facets/wiring.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts +6 -0
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-query.vue.d.ts +14 -0
- package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
- package/types/x-modules/related-tags/wiring.d.ts +3 -0
- package/types/x-modules/related-tags/wiring.d.ts.map +1 -1
- package/types/x-modules/scroll/components/scroll.vue.d.ts +2 -17
- package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +5 -0
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/reset-state.action.d.ts +11 -0
- package/types/x-modules/search/store/actions/reset-state.action.d.ts.map +1 -0
- package/types/x-modules/search/store/emitters.d.ts +4 -0
- package/types/x-modules/search/store/emitters.d.ts.map +1 -1
- package/types/x-modules/search/store/module.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +7 -1
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search/types.d.ts +10 -0
- package/types/x-modules/search/types.d.ts.map +1 -1
- package/types/x-modules/search/wiring.d.ts +37 -59
- package/types/x-modules/search/wiring.d.ts.map +1 -1
- package/types/x-modules/tagging/events.types.d.ts +6 -0
- package/types/x-modules/tagging/events.types.d.ts.map +1 -1
- package/types/x-modules/tagging/store/emitters.d.ts +1 -0
- package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
- package/types/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/x-modules/tagging/store/types.d.ts +10 -0
- package/types/x-modules/tagging/store/types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +14 -5
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.scroll.distancetobottom.md +0 -13
- package/docs/API-reference/api/x-components.scroll.throttlems.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel._refs.md +0 -15
- package/docs/API-reference/api/x-components.slidingpanel.beforedestroy.md +0 -15
- package/docs/API-reference/api/x-components.slidingpanel.isscrollatend.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel.isscrollatstart.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel.mounted.md +0 -15
- package/docs/API-reference/api/x-components.slidingpanel.scrollobserver.md +0 -13
- package/docs/API-reference/components/common/icons/x-components.arrow.md +0 -7
- package/js/components/icons/arrow.vue.js.map +0 -1
- package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js +0 -4
- package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js.map +0 -1
- package/types/components/icons/arrow.vue.d.ts +0 -3
- package/types/components/icons/arrow.vue.d.ts.map +0 -1
|
@@ -107,29 +107,23 @@ var increasePageAppendingResults = wireDispatchWithoutPayload('increasePageAppen
|
|
|
107
107
|
*/
|
|
108
108
|
var setPageSize = wireCommit('setPageSize');
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
var resetPage = wireCommit('setPage', 1);
|
|
115
|
-
/**
|
|
116
|
-
* Sets empty value to the search state `sort`.
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
var resetSort = wireCommit('setSort', '');
|
|
121
|
-
/**
|
|
122
|
-
* Sets empty value to the search state `facets`.
|
|
110
|
+
* Resets the search state `isAppendingResults`.
|
|
123
111
|
*
|
|
124
112
|
* @public
|
|
125
113
|
*/
|
|
126
|
-
var
|
|
114
|
+
var resetAppending = wireCommit('setIsAppendResults', false);
|
|
127
115
|
/**
|
|
128
|
-
*
|
|
116
|
+
* Batches state resets after {@link SearchGetters.request} parameters update.
|
|
129
117
|
*
|
|
130
118
|
* @public
|
|
131
119
|
*/
|
|
132
|
-
var
|
|
120
|
+
var resetStateWire = wireDispatch('resetState', function (_a) {
|
|
121
|
+
var newRequest = _a.eventPayload, oldValue = _a.metadata.oldValue;
|
|
122
|
+
return ({
|
|
123
|
+
newRequest: newRequest,
|
|
124
|
+
oldRequest: oldValue
|
|
125
|
+
});
|
|
126
|
+
});
|
|
133
127
|
/**
|
|
134
128
|
* Search wiring.
|
|
135
129
|
*
|
|
@@ -137,35 +131,21 @@ var resetAppending = wireCommit('setIsAppendResults', false);
|
|
|
137
131
|
*/
|
|
138
132
|
var searchWiring = createWiring({
|
|
139
133
|
UserAcceptedAQuery: {
|
|
140
|
-
resetPage: resetPage,
|
|
141
|
-
resetSort: resetSort,
|
|
142
134
|
setSearchQuery: setSearchQuery,
|
|
143
135
|
saveOriginWire: saveOriginWire
|
|
144
136
|
},
|
|
145
137
|
UserAcceptedSpellcheckQuery: {
|
|
146
|
-
resetPage: resetPage,
|
|
147
138
|
resetSpellcheckQuery: resetSpellcheckQuery
|
|
148
139
|
},
|
|
149
140
|
UserClearedQuery: {
|
|
150
|
-
resetPage: resetPage,
|
|
151
141
|
setSearchQuery: setSearchQuery,
|
|
152
142
|
cancelFetchAndSaveSearchResponseWire: cancelFetchAndSaveSearchResponseWire
|
|
153
143
|
},
|
|
154
|
-
UserClickedAFilter: {
|
|
155
|
-
resetPage: resetPage
|
|
156
|
-
},
|
|
157
144
|
UserClickedASort: {
|
|
158
|
-
resetPage: resetPage,
|
|
159
145
|
setSort: setSort
|
|
160
146
|
},
|
|
161
147
|
UserPickedARelatedTag: {
|
|
162
|
-
saveOriginWire: saveOriginWire
|
|
163
|
-
resetPage: resetPage
|
|
164
|
-
},
|
|
165
|
-
UserChangedExtraParams: {
|
|
166
|
-
resetPage: resetPage,
|
|
167
|
-
resetSort: resetSort,
|
|
168
|
-
resetFacets: resetFacets
|
|
148
|
+
saveOriginWire: saveOriginWire
|
|
169
149
|
},
|
|
170
150
|
UserReachedResultsListEnd: {
|
|
171
151
|
increasePageAppendingResults: increasePageAppendingResults
|
|
@@ -173,6 +153,9 @@ var searchWiring = createWiring({
|
|
|
173
153
|
SearchRequestChanged: {
|
|
174
154
|
fetchAndSaveSearchResponseWire: fetchAndSaveSearchResponseWire
|
|
175
155
|
},
|
|
156
|
+
SearchRequestUpdated: {
|
|
157
|
+
resetStateWire: resetStateWire
|
|
158
|
+
},
|
|
176
159
|
SelectedRelatedTagsChanged: {
|
|
177
160
|
setRelatedTags: setRelatedTags
|
|
178
161
|
},
|
|
@@ -194,5 +177,5 @@ var searchWiring = createWiring({
|
|
|
194
177
|
}
|
|
195
178
|
});
|
|
196
179
|
|
|
197
|
-
export { cancelFetchAndSaveSearchResponseWire, fetchAndSaveSearchResponseWire, increasePageAppendingResults, resetAppending,
|
|
180
|
+
export { cancelFetchAndSaveSearchResponseWire, fetchAndSaveSearchResponseWire, increasePageAppendingResults, resetAppending, resetSpellcheckQuery, resetStateWire, saveOriginWire, searchWiring, setPageSize, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams };
|
|
198
181
|
//# sourceMappingURL=wiring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `search` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'search';\n/**\n * WireCommit for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * WireDispatchWithoutPayload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Cancels the {@link SearchActions.fetchAndSaveSearchResponse} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSearchResponseWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSearchResponse'\n);\n\n/**\n * Sets the search state `origin`.\n *\n * @public\n */\nexport const saveOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);\n\n/**\n * Requests and stores the search response.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponseWire = wireDispatch('fetchAndSaveSearchResponse');\n\n/**\n * Resets the search state `spellcheckedQuery` to its initial value, an empty string.\n *\n * @public\n */\nexport const resetSpellcheckQuery = wireCommit('setSpellcheck', '');\n\n/**\n * Sets the search state `relatedTags`.\n *\n * @public\n */\nexport const setRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setSearchQuery = wireCommit('setQuery');\n\n/**\n * Sets the search state `selectedFilters`.\n *\n * @public\n */\nexport const setSelectedFilters = wireCommit('setSelectedFilters');\n\n/**\n * Sets the search state `sort`.\n *\n * @public\n */\nexport const setSort = wireCommit('setSort');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the search state `page`.\n *\n * @public\n */\nexport const setSearchPage = wireCommit('setPage');\n\n/**\n * Sets the search state `params`.\n *\n * @public\n */\nexport const setSearchExtraParams = wireCommit('setParams');\n\n/**\n * Increases the current search state `page` by one.\n *\n * @public\n */\nexport const increasePageAppendingResults = wireDispatchWithoutPayload(\n 'increasePageAppendingResults'\n);\n\n/**\n * Sets the search state `pageSize`.\n *\n * @public\n */\nexport const setPageSize = wireCommit('setPageSize');\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { WirePayload } from '../../wiring/wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { InternalSearchRequest } from './types';\n\n/**\n * `search` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'search';\n/**\n * WireCommit for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * WireDispatchWithoutPayload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Cancels the {@link SearchActions.fetchAndSaveSearchResponse} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSearchResponseWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSearchResponse'\n);\n\n/**\n * Sets the search state `origin`.\n *\n * @public\n */\nexport const saveOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);\n\n/**\n * Requests and stores the search response.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponseWire = wireDispatch('fetchAndSaveSearchResponse');\n\n/**\n * Resets the search state `spellcheckedQuery` to its initial value, an empty string.\n *\n * @public\n */\nexport const resetSpellcheckQuery = wireCommit('setSpellcheck', '');\n\n/**\n * Sets the search state `relatedTags`.\n *\n * @public\n */\nexport const setRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setSearchQuery = wireCommit('setQuery');\n\n/**\n * Sets the search state `selectedFilters`.\n *\n * @public\n */\nexport const setSelectedFilters = wireCommit('setSelectedFilters');\n\n/**\n * Sets the search state `sort`.\n *\n * @public\n */\nexport const setSort = wireCommit('setSort');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the search state `page`.\n *\n * @public\n */\nexport const setSearchPage = wireCommit('setPage');\n\n/**\n * Sets the search state `params`.\n *\n * @public\n */\nexport const setSearchExtraParams = wireCommit('setParams');\n\n/**\n * Increases the current search state `page` by one.\n *\n * @public\n */\nexport const increasePageAppendingResults = wireDispatchWithoutPayload(\n 'increasePageAppendingResults'\n);\n\n/**\n * Sets the search state `pageSize`.\n *\n * @public\n */\nexport const setPageSize = wireCommit('setPageSize');\n\n/**\n * Resets the search state `isAppendingResults`.\n *\n * @public\n */\nexport const resetAppending = wireCommit('setIsAppendResults', false);\n\n/**\n * Batches state resets after {@link SearchGetters.request} parameters update.\n *\n * @public\n */\nexport const resetStateWire = wireDispatch(\n 'resetState',\n ({ eventPayload: newRequest, metadata: { oldValue } }: WirePayload<InternalSearchRequest>) => ({\n newRequest,\n oldRequest: oldValue as InternalSearchRequest\n })\n);\n\n/**\n * Search wiring.\n *\n * @internal\n */\nexport const searchWiring = createWiring({\n UserAcceptedAQuery: {\n setSearchQuery,\n saveOriginWire\n },\n UserAcceptedSpellcheckQuery: {\n resetSpellcheckQuery\n },\n UserClearedQuery: {\n setSearchQuery,\n cancelFetchAndSaveSearchResponseWire\n },\n UserClickedASort: {\n setSort\n },\n UserPickedARelatedTag: {\n saveOriginWire\n },\n UserReachedResultsListEnd: {\n increasePageAppendingResults\n },\n SearchRequestChanged: {\n fetchAndSaveSearchResponseWire\n },\n SearchRequestUpdated: {\n resetStateWire\n },\n SelectedRelatedTagsChanged: {\n setRelatedTags\n },\n SelectedFiltersChanged: {\n setSelectedFilters\n },\n ResultsChanged: {\n resetAppending\n },\n SelectedSortProvided: {\n setSort\n },\n ExtraParamsChanged: {\n setSearchExtraParams\n },\n ParamsLoadedFromUrl: {\n setUrlParams,\n saveOriginWire\n }\n});\n"],"names":[],"mappings":";;;AASA;;;;;AAKA,IAAM,UAAU,GAAG,QAAQ,CAAC;AAC5B;;;;;AAKA,IAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;;AAKA,IAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;;;AAKA,IAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC,CAAC;AAEpF;;;;;IAKa,oCAAoC,GAAG,0BAA0B,CAC5E,kCAAkC,EAClC;AAEF;;;;;IAKa,cAAc,GAAG,YAAY,CAAC,YAAY,EAAE,UAAC,EAAY;QAAV,QAAQ,cAAA;IAAO,OAAA,QAAQ;AAAR,CAAQ,EAAE;AAErF;;;;;IAKa,8BAA8B,GAAG,YAAY,CAAC,4BAA4B,EAAE;AAEzF;;;;;IAKa,oBAAoB,GAAG,UAAU,CAAC,eAAe,EAAE,EAAE,EAAE;AAEpE;;;;;IAKa,cAAc,GAAG,UAAU,CAAC,gBAAgB,EAAE;AAE3D;;;;;IAKa,cAAc,GAAG,UAAU,CAAC,UAAU,EAAE;AAErD;;;;;IAKa,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,EAAE;AAEnE;;;;;IAKa,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE;AAE7C;;;;;IAKa,YAAY,GAAG,YAAY,CAAC,cAAc,EAAE;AAEzD;;;;;IAKa,aAAa,GAAG,UAAU,CAAC,SAAS,EAAE;AAEnD;;;;;IAKa,oBAAoB,GAAG,UAAU,CAAC,WAAW,EAAE;AAE5D;;;;;IAKa,4BAA4B,GAAG,0BAA0B,CACpE,8BAA8B,EAC9B;AAEF;;;;;IAKa,WAAW,GAAG,UAAU,CAAC,aAAa,EAAE;AAErD;;;;;IAKa,cAAc,GAAG,UAAU,CAAC,oBAAoB,EAAE,KAAK,EAAE;AAEtE;;;;;IAKa,cAAc,GAAG,YAAY,CACxC,YAAY,EACZ,UAAC,EAAwF;QAAxE,UAAU,kBAAA,EAAc,QAAQ,uBAAA;IAA6C,QAAC;QAC7F,UAAU,YAAA;QACV,UAAU,EAAE,QAAiC;KAC9C;AAH6F,CAG5F,EACF;AAEF;;;;;IAKa,YAAY,GAAG,YAAY,CAAC;IACvC,kBAAkB,EAAE;QAClB,cAAc,gBAAA;QACd,cAAc,gBAAA;KACf;IACD,2BAA2B,EAAE;QAC3B,oBAAoB,sBAAA;KACrB;IACD,gBAAgB,EAAE;QAChB,cAAc,gBAAA;QACd,oCAAoC,sCAAA;KACrC;IACD,gBAAgB,EAAE;QAChB,OAAO,SAAA;KACR;IACD,qBAAqB,EAAE;QACrB,cAAc,gBAAA;KACf;IACD,yBAAyB,EAAE;QACzB,4BAA4B,8BAAA;KAC7B;IACD,oBAAoB,EAAE;QACpB,8BAA8B,gCAAA;KAC/B;IACD,oBAAoB,EAAE;QACpB,cAAc,gBAAA;KACf;IACD,0BAA0B,EAAE;QAC1B,cAAc,gBAAA;KACf;IACD,sBAAsB,EAAE;QACtB,kBAAkB,oBAAA;KACnB;IACD,cAAc,EAAE;QACd,cAAc,gBAAA;KACf;IACD,oBAAoB,EAAE;QACpB,OAAO,SAAA;KACR;IACD,kBAAkB,EAAE;QAClB,oBAAoB,sBAAA;KACrB;IACD,mBAAmB,EAAE;QACnB,YAAY,cAAA;QACZ,cAAc,gBAAA;KACf;CACF;;;;"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import '../../../store/x.module.js';
|
|
2
|
-
import '../../../store/utils/fetch-and-save-action.utils.js';
|
|
3
|
-
import '../../../store/utils/status-store.utils.js';
|
|
4
1
|
import { createStoreEmitters } from '../../../store/utils/store-emitters.utils.js';
|
|
5
2
|
import { taggingXStoreModule } from './module.js';
|
|
6
3
|
|
|
@@ -10,7 +7,8 @@ import { taggingXStoreModule } from './module.js';
|
|
|
10
7
|
* @internal
|
|
11
8
|
*/
|
|
12
9
|
var taggingEmitters = createStoreEmitters(taggingXStoreModule, {
|
|
13
|
-
ConsentChanged: function (state) { return state.consent; }
|
|
10
|
+
ConsentChanged: function (state) { return state.consent; },
|
|
11
|
+
SearchTaggingReceived: function (state) { return state.queryTaggingInfo; }
|
|
14
12
|
});
|
|
15
13
|
|
|
16
14
|
export { taggingEmitters };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/tagging/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { taggingXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the tagging module.\n *\n * @internal\n */\nexport const taggingEmitters = createStoreEmitters(taggingXStoreModule, {\n ConsentChanged: state => state.consent!\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/tagging/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store/utils/store-emitters.utils';\nimport { taggingXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the tagging module.\n *\n * @internal\n */\nexport const taggingEmitters = createStoreEmitters(taggingXStoreModule, {\n ConsentChanged: state => state.consent!,\n SearchTaggingReceived: state => state.queryTaggingInfo!\n});\n"],"names":[],"mappings":";;;AAGA;;;;;IAKa,eAAe,GAAG,mBAAmB,CAAC,mBAAmB,EAAE;IACtE,cAAc,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAQ,GAAA;IACvC,qBAAqB,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,gBAAiB,GAAA;CACxD;;;;"}
|
|
@@ -11,7 +11,8 @@ var taggingXStoreModule = {
|
|
|
11
11
|
sessionTTLMs: 30 * 60 * 1000,
|
|
12
12
|
queryTaggingDebounceMs: 2000
|
|
13
13
|
},
|
|
14
|
-
consent: null
|
|
14
|
+
consent: null,
|
|
15
|
+
queryTaggingInfo: null
|
|
15
16
|
}); },
|
|
16
17
|
getters: {},
|
|
17
18
|
mutations: {
|
|
@@ -23,6 +24,9 @@ var taggingXStoreModule = {
|
|
|
23
24
|
},
|
|
24
25
|
setConsent: function (state, consent) {
|
|
25
26
|
state.consent = consent;
|
|
27
|
+
},
|
|
28
|
+
setQueryTaggingInfo: function (state, queryTaggingInfo) {
|
|
29
|
+
state.queryTaggingInfo = queryTaggingInfo;
|
|
26
30
|
}
|
|
27
31
|
},
|
|
28
32
|
actions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/tagging/store/module.ts"],"sourcesContent":["import { track } from './actions/track.action';\nimport { TaggingXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the tagging module.\n *\n * @internal\n */\nexport const taggingXStoreModule: TaggingXStoreModule = {\n state: () => ({\n config: {\n sessionTTLMs: 30 * 60 * 1000,\n queryTaggingDebounceMs: 2000\n },\n consent: null\n }),\n getters: {},\n mutations: {\n setSessionDuration(state, sessionTTLMs) {\n state.config.sessionTTLMs = sessionTTLMs;\n },\n setQueryTaggingDebounce(state, queryTaggingDebounceMs) {\n state.config.queryTaggingDebounceMs = queryTaggingDebounceMs;\n },\n setConsent(state, consent) {\n state.consent = consent;\n }\n },\n actions: {\n track\n }\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/tagging/store/module.ts"],"sourcesContent":["import { TaggingInfo } from '@empathyco/x-types';\nimport { track } from './actions/track.action';\nimport { TaggingXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the tagging module.\n *\n * @internal\n */\nexport const taggingXStoreModule: TaggingXStoreModule = {\n state: () => ({\n config: {\n sessionTTLMs: 30 * 60 * 1000,\n queryTaggingDebounceMs: 2000\n },\n consent: null,\n queryTaggingInfo: null\n }),\n getters: {},\n mutations: {\n setSessionDuration(state, sessionTTLMs) {\n state.config.sessionTTLMs = sessionTTLMs;\n },\n setQueryTaggingDebounce(state, queryTaggingDebounceMs) {\n state.config.queryTaggingDebounceMs = queryTaggingDebounceMs;\n },\n setConsent(state, consent) {\n state.consent = consent;\n },\n setQueryTaggingInfo(state, queryTaggingInfo: TaggingInfo) {\n state.queryTaggingInfo = queryTaggingInfo;\n }\n },\n actions: {\n track\n }\n};\n"],"names":[],"mappings":";;AAIA;;;;;IAKa,mBAAmB,GAAwB;IACtD,KAAK,EAAE,cAAM,QAAC;QACZ,MAAM,EAAE;YACN,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;YAC5B,sBAAsB,EAAE,IAAI;SAC7B;QACD,OAAO,EAAE,IAAI;QACb,gBAAgB,EAAE,IAAI;KACvB,IAAC;IACF,OAAO,EAAE,EAAE;IACX,SAAS,EAAE;QACT,kBAAkB,YAAC,KAAK,EAAE,YAAY;YACpC,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;SAC1C;QACD,uBAAuB,YAAC,KAAK,EAAE,sBAAsB;YACnD,KAAK,CAAC,MAAM,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;SAC9D;QACD,UAAU,YAAC,KAAK,EAAE,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;SACzB;QACD,mBAAmB,EAAnB,UAAoB,KAAK,EAAE,gBAA6B;YACtD,KAAK,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;SAC3C;KACF;IACD,OAAO,EAAE;QACP,KAAK,OAAA;KACN;;;;;"}
|
|
@@ -59,12 +59,18 @@ var setQueryTaggingDebounce = wireCommit('setQueryTaggingDebounce');
|
|
|
59
59
|
*/
|
|
60
60
|
var setSessionDuration = wireCommit('setSessionDuration');
|
|
61
61
|
/**
|
|
62
|
-
* Tracks the tagging of the query
|
|
62
|
+
* Tracks the tagging of the query.
|
|
63
|
+
*
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
var trackQueryWire = wireDispatch('track');
|
|
67
|
+
/**
|
|
68
|
+
* Sets the tagging state of the query tagging info using a debounce which ends if the user
|
|
63
69
|
* accepts a query.
|
|
64
70
|
*
|
|
65
71
|
* @public
|
|
66
72
|
*/
|
|
67
|
-
var
|
|
73
|
+
var setQueryTaggingInfo = moduleDebounce(wireCommit('setQueryTaggingInfo'), function (_a) {
|
|
68
74
|
var state = _a.state;
|
|
69
75
|
return state.config.queryTaggingDebounceMs;
|
|
70
76
|
}, {
|
|
@@ -120,15 +126,18 @@ var taggingWiring = createWiring({
|
|
|
120
126
|
ConsentChanged: {
|
|
121
127
|
clearSessionWire: clearSessionWire
|
|
122
128
|
},
|
|
123
|
-
SessionDurationProvided: {
|
|
124
|
-
setSessionDuration: setSessionDuration
|
|
125
|
-
},
|
|
126
129
|
QueryTaggingDebounceProvided: {
|
|
127
130
|
setQueryTaggingDebounce: setQueryTaggingDebounce
|
|
128
131
|
},
|
|
129
132
|
SearchTaggingChanged: {
|
|
133
|
+
setQueryTaggingInfo: setQueryTaggingInfo
|
|
134
|
+
},
|
|
135
|
+
SearchTaggingReceived: {
|
|
130
136
|
trackQueryWire: trackQueryWire
|
|
131
137
|
},
|
|
138
|
+
SessionDurationProvided: {
|
|
139
|
+
setSessionDuration: setSessionDuration
|
|
140
|
+
},
|
|
132
141
|
UserClickedAResult: {
|
|
133
142
|
trackResultClickedWire: trackResultClickedWire
|
|
134
143
|
},
|
|
@@ -137,5 +146,5 @@ var taggingWiring = createWiring({
|
|
|
137
146
|
}
|
|
138
147
|
});
|
|
139
148
|
|
|
140
|
-
export { setConsent, setQueryTaggingDebounce, setSessionDuration, taggingWiring, trackAddToCartWire, trackQueryWire, trackResultClickedWire };
|
|
149
|
+
export { setConsent, setQueryTaggingDebounce, setQueryTaggingInfo, setSessionDuration, taggingWiring, trackAddToCartWire, trackQueryWire, trackResultClickedWire };
|
|
141
150
|
//# sourceMappingURL=wiring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import { Result, TaggingInfo } from '@empathyco/x-types';\nimport {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators';\nimport { wireServiceWithoutPayload } from '../../wiring/wires.factory';\nimport { filter } from '../../wiring/wires.operators';\nimport { Wire } from '../../wiring/wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { DefaultSessionService } from './service/session.service';\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging';\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName);\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance);\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent\n);\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent');\n\n/**\n * Sets the tagging state config `queryTaggingDebounceMs`.\n *\n * @public\n */\nexport const setQueryTaggingDebounce = wireCommit('setQueryTaggingDebounce');\n\n/**\n * Sets the tagging state `sessionTTLMs`.\n *\n * @public\n */\nexport const setSessionDuration = wireCommit('setSessionDuration');\n\n/**\n * Tracks the tagging of the query using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import { Result, TaggingInfo } from '@empathyco/x-types';\nimport {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators';\nimport { wireServiceWithoutPayload } from '../../wiring/wires.factory';\nimport { filter } from '../../wiring/wires.operators';\nimport { Wire } from '../../wiring/wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { DefaultSessionService } from './service/session.service';\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging';\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName);\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance);\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent\n);\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent');\n\n/**\n * Sets the tagging state config `queryTaggingDebounceMs`.\n *\n * @public\n */\nexport const setQueryTaggingDebounce = wireCommit('setQueryTaggingDebounce');\n\n/**\n * Sets the tagging state `sessionTTLMs`.\n *\n * @public\n */\nexport const setSessionDuration = wireCommit('setSessionDuration');\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = wireDispatch('track');\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd'\n ]\n }\n);\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackResultWire('click');\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackResultWire('add2cart');\n\n/**\n * Factory helper to create a wire for the track of a result.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the result tagging.\n *\n * @internal\n */\nfunction createTrackResultWire(property: keyof Result['tagging']): Wire<Result> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingInfo = tagging[property];\n taggingInfo.params.location = location as string;\n return taggingInfo;\n }),\n ({ eventPayload: { tagging } }) => !!tagging?.[property]\n );\n}\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent\n },\n ConsentChanged: {\n clearSessionWire\n },\n QueryTaggingDebounceProvided: {\n setQueryTaggingDebounce\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo\n },\n SearchTaggingReceived: {\n trackQueryWire\n },\n SessionDurationProvided: {\n setSessionDuration\n },\n UserClickedAResult: {\n trackResultClickedWire\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire\n }\n});\n"],"names":[],"mappings":";;;;;;;AAYA;;;;;AAKA,IAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;;AAGA,IAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;;AAKA,IAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;;AAKA,IAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;AAGA,IAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEnG;;;;;AAKA,IAAM,gBAAgB,GAAG,MAAM,CAC7B,gCAAgC,CAAC,gBAAgB,CAAC,EAClD,UAAC,EAAyB;QAAT,OAAO,kBAAA;IAAO,OAAA,CAAC,OAAO;AAAR,CAAQ,CACxC,CAAC;AAEF;;;;;IAKa,UAAU,GAAG,UAAU,CAAC,YAAY,EAAE;AAEnD;;;;;IAKa,uBAAuB,GAAG,UAAU,CAAC,yBAAyB,EAAE;AAE7E;;;;;IAKa,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,EAAE;AAEnE;;;;;IAKa,cAAc,GAAG,YAAY,CAAC,OAAO,EAAE;AAEpD;;;;;;IAMa,mBAAmB,GAAG,cAAc,CAC/C,UAAU,CAAC,qBAAqB,CAAC,EACjC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,MAAM,CAAC,sBAAsB;AAAnC,CAAmC,EAClD;IACE,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE;QACP,oBAAoB;QACpB,sBAAsB;QACtB,oBAAoB;QACpB,yBAAyB;QACzB,2BAA2B;KAC5B;CACF,EACD;AAEF;;;;;IAKa,sBAAsB,GAAG,qBAAqB,CAAC,OAAO,EAAE;AAErE;;;;;IAKa,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,EAAE;AAEpE;;;;;;;;AAQA,SAAS,qBAAqB,CAAC,QAAiC;IAC9D,OAAO,MAAM,CACX,YAAY,CAAC,OAAO,EAAE,UAAC,EAAqD;YAAnC,OAAO,0BAAA,EAAgB,QAAQ,uBAAA;QACtE,IAAM,WAAW,GAAgB,OAAO,CAAC,QAAQ,CAAC,CAAC;QACnD,WAAW,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAkB,CAAC;QACjD,OAAO,WAAW,CAAC;KACpB,CAAC,EACF,UAAC,EAA6B;YAAX,OAAO,0BAAA;QAAS,OAAA,CAAC,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,QAAQ,CAAC,CAAA;KAAA,CACzD,CAAC;AACJ,CAAC;AAED;;;;;IAKa,aAAa,GAAG,YAAY,CAAC;IACxC,eAAe,EAAE;QACf,UAAU,YAAA;KACX;IACD,cAAc,EAAE;QACd,gBAAgB,kBAAA;KACjB;IACD,4BAA4B,EAAE;QAC5B,uBAAuB,yBAAA;KACxB;IACD,oBAAoB,EAAE;QACpB,mBAAmB,qBAAA;KACpB;IACD,qBAAqB,EAAE;QACrB,cAAc,gBAAA;KACf;IACD,uBAAuB,EAAE;QACvB,kBAAkB,oBAAA;KACnB;IACD,kBAAkB,EAAE;QAClB,sBAAsB,wBAAA;KACvB;IACD,0BAA0B,EAAE;QAC1B,kBAAkB,oBAAA;KACnB;CACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.43",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"release:alpha": "standard-version --no-verify --prerelease alpha"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@empathyco/x-adapter": "^7.0.0-alpha.
|
|
63
|
+
"@empathyco/x-adapter": "^7.0.0-alpha.9",
|
|
64
64
|
"@empathyco/x-deep-merge": "^1.3.0-alpha.1",
|
|
65
65
|
"@empathyco/x-logger": "^1.2.0-alpha.1",
|
|
66
66
|
"@empathyco/x-storage-service": "^2.0.0-alpha.0",
|
|
67
|
-
"@empathyco/x-types": "^10.0.0-alpha.
|
|
67
|
+
"@empathyco/x-types": "^10.0.0-alpha.14",
|
|
68
68
|
"@types/resize-observer-browser": "~0.1.5",
|
|
69
69
|
"magic-string": "~0.25.7",
|
|
70
70
|
"nanoid": "~3.1.30",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"access": "public",
|
|
132
132
|
"directory": "dist"
|
|
133
133
|
},
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "007d58ff8e3ea9c0c07ebde1f71c94764c701331"
|
|
135
135
|
}
|
|
@@ -8060,6 +8060,32 @@
|
|
|
8060
8060
|
"startIndex": 1,
|
|
8061
8061
|
"endIndex": 2
|
|
8062
8062
|
}
|
|
8063
|
+
},
|
|
8064
|
+
{
|
|
8065
|
+
"kind": "PropertySignature",
|
|
8066
|
+
"canonicalReference": "@empathyco/x-adapter!EmpathyNextQuery#source:member",
|
|
8067
|
+
"docComment": "",
|
|
8068
|
+
"excerptTokens": [
|
|
8069
|
+
{
|
|
8070
|
+
"kind": "Content",
|
|
8071
|
+
"text": "source?: "
|
|
8072
|
+
},
|
|
8073
|
+
{
|
|
8074
|
+
"kind": "Content",
|
|
8075
|
+
"text": "'CURATED' | 'ORGANIC' | 'ENRICHED'"
|
|
8076
|
+
},
|
|
8077
|
+
{
|
|
8078
|
+
"kind": "Content",
|
|
8079
|
+
"text": ";"
|
|
8080
|
+
}
|
|
8081
|
+
],
|
|
8082
|
+
"isOptional": true,
|
|
8083
|
+
"releaseTag": "Public",
|
|
8084
|
+
"name": "source",
|
|
8085
|
+
"propertyTypeTokenRange": {
|
|
8086
|
+
"startIndex": 1,
|
|
8087
|
+
"endIndex": 2
|
|
8088
|
+
}
|
|
8063
8089
|
}
|
|
8064
8090
|
],
|
|
8065
8091
|
"extendsTokenRanges": []
|