@empathyco/x-components 3.0.0-alpha.355 → 3.0.0-alpha.356
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 +12 -0
- package/core/index.js.map +1 -1
- package/design-system/full-theme.css +3 -3
- package/facets/index.js +1 -0
- package/js/index.js +1 -0
- package/js/index.js.map +1 -1
- package/js/x-modules/facets/entities/sticky.modifier.js +35 -0
- package/js/x-modules/facets/entities/sticky.modifier.js.map +1 -0
- package/package.json +2 -2
- package/report/x-components.api.md +8 -0
- package/types/x-modules/facets/entities/index.d.ts +1 -0
- package/types/x-modules/facets/entities/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.0-alpha.356](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.355...@empathyco/x-components@3.0.0-alpha.356) (2023-04-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- export sticky modifier (#1151)
|
|
11
|
+
([8bbd1ab](https://github.com/empathyco/x/commit/8bbd1ab6b0b595c94386bdc0f37d7061df072127))
|
|
12
|
+
|
|
13
|
+
# Change Log
|
|
14
|
+
|
|
15
|
+
All notable changes to this project will be documented in this file. See
|
|
16
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
17
|
+
|
|
6
18
|
## [3.0.0-alpha.355](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.354...@empathyco/x-components@3.0.0-alpha.355) (2023-04-19)
|
|
7
19
|
|
|
8
20
|
### ⚠ BREAKING CHANGES
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -442,15 +442,15 @@
|
|
|
442
442
|
.x-dropdown.x-dropdown--s {
|
|
443
443
|
--x-size-width-dropdown-toggle-default: var(--x-size-width-dropdown-s);
|
|
444
444
|
}
|
|
445
|
-
:root {
|
|
446
|
-
--x-size-width-dropdown-s: 74px;
|
|
447
|
-
}
|
|
448
445
|
.x-dropdown.x-dropdown--xl {
|
|
449
446
|
--x-size-width-dropdown-toggle-default: var(--x-size-width-dropdown-xl);
|
|
450
447
|
}
|
|
451
448
|
:root {
|
|
452
449
|
--x-size-width-dropdown-xl: 282px;
|
|
453
450
|
}
|
|
451
|
+
:root {
|
|
452
|
+
--x-size-width-dropdown-s: 74px;
|
|
453
|
+
}
|
|
454
454
|
.x-facet--card.x-facet,
|
|
455
455
|
.x-facet--card .x-facet {
|
|
456
456
|
--x-size-border-radius-facet-default: var(--x-size-border-radius-facet-card);
|
package/facets/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { NumberRangeFilterEntity } from '../js/x-modules/facets/entities/number-
|
|
|
13
13
|
export { RawFilterEntity } from '../js/x-modules/facets/entities/raw-filter.entity.js';
|
|
14
14
|
export { SimpleFilterEntity } from '../js/x-modules/facets/entities/simple-filter.entity.js';
|
|
15
15
|
export { SingleSelectModifier } from '../js/x-modules/facets/entities/single-select.modifier.js';
|
|
16
|
+
export { StickyModifier } from '../js/x-modules/facets/entities/sticky.modifier.js';
|
|
16
17
|
export { BaseFilterEntityModifier } from '../js/x-modules/facets/entities/types.js';
|
|
17
18
|
export { default as Facets } from '../js/x-modules/facets/components/facets/facets.vue.js';
|
|
18
19
|
export { default as FacetsProvider } from '../js/x-modules/facets/components/facets/facets-provider.vue.js';
|
package/js/index.js
CHANGED
|
@@ -218,6 +218,7 @@ export { NumberRangeFilterEntity } from './x-modules/facets/entities/number-rang
|
|
|
218
218
|
export { RawFilterEntity } from './x-modules/facets/entities/raw-filter.entity.js';
|
|
219
219
|
export { SimpleFilterEntity } from './x-modules/facets/entities/simple-filter.entity.js';
|
|
220
220
|
export { SingleSelectModifier } from './x-modules/facets/entities/single-select.modifier.js';
|
|
221
|
+
export { StickyModifier } from './x-modules/facets/entities/sticky.modifier.js';
|
|
221
222
|
export { BaseFilterEntityModifier } from './x-modules/facets/entities/types.js';
|
|
222
223
|
export { default as Facets } from './x-modules/facets/components/facets/facets.vue.js';
|
|
223
224
|
export { default as FacetsProvider } from './x-modules/facets/components/facets/facets-provider.vue.js';
|
package/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseFilterEntityModifier } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Allows to persist a filter between different queries.
|
|
5
|
+
*
|
|
6
|
+
* @remarks when using this modifier along with others, make sure this is the first one defined.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
class StickyModifier extends BaseFilterEntityModifier {
|
|
11
|
+
/**
|
|
12
|
+
* Deselects the passed filter unless the metadata has the `keepSticky` flag enabled.
|
|
13
|
+
*
|
|
14
|
+
* @param filter - The filter to deselect.
|
|
15
|
+
* @param metadata - Additional information to prevent a filter from being deselected.
|
|
16
|
+
*/
|
|
17
|
+
deselect(filter, metadata) {
|
|
18
|
+
if (!metadata?.keepSticky) {
|
|
19
|
+
super.deselect(filter, metadata);
|
|
20
|
+
this.store.commit('x/facets/removeStickyFilter', filter);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Selects the passed filter and stores it as sticky.
|
|
25
|
+
*
|
|
26
|
+
* @param filter - The filter to select.
|
|
27
|
+
*/
|
|
28
|
+
select(filter) {
|
|
29
|
+
super.select(filter);
|
|
30
|
+
this.store.commit('x/facets/setStickyFilter', filter);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { StickyModifier };
|
|
35
|
+
//# sourceMappingURL=sticky.modifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sticky.modifier.js","sources":["../../../../../src/x-modules/facets/entities/sticky.modifier.ts"],"sourcesContent":["import { Filter } from '@empathyco/x-types';\nimport { BaseFilterEntityModifier } from './types';\n\n/**\n * A dictionary with information about whether to keep or remove sticky filters.\n */\ninterface Metadata {\n keepSticky: boolean;\n}\n\n/**\n * Allows to persist a filter between different queries.\n *\n * @remarks when using this modifier along with others, make sure this is the first one defined.\n *\n * @internal\n */\nexport class StickyModifier extends BaseFilterEntityModifier<Metadata> {\n /**\n * Deselects the passed filter unless the metadata has the `keepSticky` flag enabled.\n *\n * @param filter - The filter to deselect.\n * @param metadata - Additional information to prevent a filter from being deselected.\n */\n deselect(filter: Filter, metadata?: Metadata): void {\n if (!metadata?.keepSticky) {\n super.deselect(filter, metadata);\n this.store.commit('x/facets/removeStickyFilter', filter);\n }\n }\n\n /**\n * Selects the passed filter and stores it as sticky.\n *\n * @param filter - The filter to select.\n */\n select(filter: Filter): void {\n super.select(filter);\n this.store.commit('x/facets/setStickyFilter', filter);\n }\n}\n"],"names":[],"mappings":";;AAUA;;;;;;AAMG;AACG,MAAO,cAAe,SAAQ,wBAAkC,CAAA;AACpE;;;;;AAKG;IACH,QAAQ,CAAC,MAAc,EAAE,QAAmB,EAAA;AAC1C,QAAA,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE;AACzB,YAAA,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;AAC1D,SAAA;KACF;AAED;;;;AAIG;AACH,IAAA,MAAM,CAAC,MAAc,EAAA;AACnB,QAAA,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;KACvD;AACF;;;;"}
|
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.356",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"access": "public",
|
|
144
144
|
"directory": "dist"
|
|
145
145
|
},
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "fb160f8c2ad830991779a6731b4b6c632238293e"
|
|
147
147
|
}
|
|
@@ -4986,6 +4986,14 @@ export interface StatusState {
|
|
|
4986
4986
|
status: RequestStatus;
|
|
4987
4987
|
}
|
|
4988
4988
|
|
|
4989
|
+
// Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
|
|
4990
|
+
//
|
|
4991
|
+
// @internal
|
|
4992
|
+
export class StickyModifier extends BaseFilterEntityModifier<Metadata> {
|
|
4993
|
+
deselect(filter: Filter, metadata?: Metadata): void;
|
|
4994
|
+
select(filter: Filter): void;
|
|
4995
|
+
}
|
|
4996
|
+
|
|
4989
4997
|
// @public
|
|
4990
4998
|
export const storageKey: HistoryQueriesXStoreModule['getters']['storageKey'];
|
|
4991
4999
|
|
|
@@ -5,5 +5,6 @@ export * from './number-range-filter.entity';
|
|
|
5
5
|
export * from './raw-filter.entity';
|
|
6
6
|
export * from './simple-filter.entity';
|
|
7
7
|
export * from './single-select.modifier';
|
|
8
|
+
export * from './sticky.modifier';
|
|
8
9
|
export * from './types';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|