@empathyco/x-components 3.0.0-alpha.55 → 3.0.0-alpha.56
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 +13 -0
- package/design-system/full-theme.css +22 -22
- package/docs/API-reference/api/x-components.debounce.md +4 -0
- package/js/components/decorators/debounce.decorators.js +10 -0
- package/js/components/decorators/debounce.decorators.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +1 -1
- package/types/components/decorators/debounce.decorators.d.ts +2 -0
- package/types/components/decorators/debounce.decorators.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.56](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.55...@empathyco/x-components@3.0.0-alpha.56) (2022-02-15)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **decorators:** pending `debounced` execution is cancelled when the component is destroyed
|
|
11
|
+
([27da789](https://github.com/empathyco/x/commit/27da789412804f3f768d07e8ffd846ea2df8553e)),
|
|
12
|
+
closes [EX-5215](https://searchbroker.atlassian.net/browse/EX-5215)
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
6
19
|
## [3.0.0-alpha.55](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.54...@empathyco/x-components@3.0.0-alpha.55) (2022-02-10)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @empathyco/x-components
|
|
@@ -303,6 +303,16 @@
|
|
|
303
303
|
--x-size-border-width-bottom-button-secondary: var(--x-size-border-width-button-secondary);
|
|
304
304
|
--x-size-border-width-left-button-secondary: var(--x-size-border-width-button-secondary);
|
|
305
305
|
}
|
|
306
|
+
.x-button--tertiary.x-button,
|
|
307
|
+
.x-button--tertiary .x-button {
|
|
308
|
+
--x-color-background-button-default: var(--x-color-background-button-tertiary);
|
|
309
|
+
--x-color-border-button-default: var(--x-color-border-button-tertiary);
|
|
310
|
+
--x-color-text-button-default: var(--x-color-text-button-tertiary);
|
|
311
|
+
--x-size-border-width-top-button-default: var(--x-size-border-width-top-button-tertiary);
|
|
312
|
+
--x-size-border-width-right-button-default: var(--x-size-border-width-right-button-tertiary);
|
|
313
|
+
--x-size-border-width-bottom-button-default: var(--x-size-border-width-bottom-button-tertiary);
|
|
314
|
+
--x-size-border-width-left-button-default: var(--x-size-border-width-left-button-tertiary);
|
|
315
|
+
}
|
|
306
316
|
:root {
|
|
307
317
|
--x-color-background-button-tertiary: var(--x-color-base-neutral-95);
|
|
308
318
|
--x-color-border-button-tertiary: var(--x-color-base-neutral-70);
|
|
@@ -724,19 +734,6 @@
|
|
|
724
734
|
:root {
|
|
725
735
|
--x-size-width-dropdown-xl: 282px;
|
|
726
736
|
}
|
|
727
|
-
.x-facet--card.x-facet,
|
|
728
|
-
.x-facet--card .x-facet {
|
|
729
|
-
--x-size-border-radius-facet-default: var(--x-size-border-radius-facet-card);
|
|
730
|
-
--x-size-border-radius-top-left-facet-default: var(--x-size-border-radius-facet-card);
|
|
731
|
-
--x-size-border-radius-top-right-facet-default: var(--x-size-border-radius-facet-card);
|
|
732
|
-
--x-size-border-radius-bottom-right-facet-default: var(--x-size-border-radius-facet-card);
|
|
733
|
-
--x-size-border-radius-bottom-left-facet-default: var(--x-size-border-radius-facet-card);
|
|
734
|
-
--x-size-padding-facet-header-default: var(--x-size-padding-facet-header-card);
|
|
735
|
-
--x-size-padding-top-facet-header-default: var(--x-size-padding-top-facet-header-card);
|
|
736
|
-
--x-size-padding-right-facet-header-default: var(--x-size-padding-right-facet-header-card);
|
|
737
|
-
--x-size-padding-bottom-facet-header-default: var(--x-size-padding-bottom-facet-header-card);
|
|
738
|
-
--x-size-padding-left-facet-header-default: var(--x-size-padding-left-facet-header-card);
|
|
739
|
-
}
|
|
740
737
|
:root {
|
|
741
738
|
--x-size-border-radius-facet-card: var(--x-size-border-radius-base-s);
|
|
742
739
|
--x-size-border-radius-top-left-facet-card: var(--x-size-border-radius-facet-card);
|
|
@@ -7506,13 +7503,16 @@
|
|
|
7506
7503
|
text-transform: none;
|
|
7507
7504
|
}
|
|
7508
7505
|
|
|
7509
|
-
.x-
|
|
7510
|
-
.x-
|
|
7511
|
-
--x-
|
|
7512
|
-
--x-
|
|
7513
|
-
--x-
|
|
7514
|
-
--x-size-border-
|
|
7515
|
-
--x-size-border-
|
|
7516
|
-
--x-size-
|
|
7517
|
-
--x-size-
|
|
7506
|
+
.x-facet--card.x-facet,
|
|
7507
|
+
.x-facet--card .x-facet {
|
|
7508
|
+
--x-size-border-radius-facet-default: var(--x-size-border-radius-facet-card);
|
|
7509
|
+
--x-size-border-radius-top-left-facet-default: var(--x-size-border-radius-facet-card);
|
|
7510
|
+
--x-size-border-radius-top-right-facet-default: var(--x-size-border-radius-facet-card);
|
|
7511
|
+
--x-size-border-radius-bottom-right-facet-default: var(--x-size-border-radius-facet-card);
|
|
7512
|
+
--x-size-border-radius-bottom-left-facet-default: var(--x-size-border-radius-facet-card);
|
|
7513
|
+
--x-size-padding-facet-header-default: var(--x-size-padding-facet-header-card);
|
|
7514
|
+
--x-size-padding-top-facet-header-default: var(--x-size-padding-top-facet-header-card);
|
|
7515
|
+
--x-size-padding-right-facet-header-default: var(--x-size-padding-right-facet-header-card);
|
|
7516
|
+
--x-size-padding-bottom-facet-header-default: var(--x-size-padding-bottom-facet-header-card);
|
|
7517
|
+
--x-size-padding-left-facet-header-default: var(--x-size-padding-left-facet-header-card);
|
|
7518
7518
|
}
|
|
@@ -4,6 +4,8 @@ import { debounce } from '../../utils/debounce.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Adds debounce to the method that the decorator is applied to.
|
|
6
6
|
*
|
|
7
|
+
* @remarks Pending debounced execution is cancelled when the component is destroyed.
|
|
8
|
+
*
|
|
7
9
|
* @param debounceTimeInMs - The time of debounce in ms.
|
|
8
10
|
* @param debounceOptions - The options for the debounce strategy.
|
|
9
11
|
*
|
|
@@ -18,6 +20,14 @@ function Debounce(debounceTimeInMs, debounceOptions = {}) {
|
|
|
18
20
|
options.methods[key] = function debouncedWrapper(...args) {
|
|
19
21
|
debouncedMethod(this, args);
|
|
20
22
|
};
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
24
|
+
const originalBeforeDestroy = options.beforeDestroy;
|
|
25
|
+
Object.assign(options, {
|
|
26
|
+
beforeDestroy() {
|
|
27
|
+
originalBeforeDestroy?.apply(this);
|
|
28
|
+
debouncedMethod.cancel();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
21
31
|
});
|
|
22
32
|
}
|
|
23
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.decorators.js","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"sourcesContent":["import { createDecorator } from 'vue-class-component';\nimport { debounce } from '../../utils/debounce';\nimport { AnyFunction, DebounceOptions, DecoratorFor } from '../../utils/types';\n\n/**\n * Adds debounce to the method that the decorator is applied to.\n *\n * @param debounceTimeInMs - The time of debounce in ms.\n * @param debounceOptions - The options for the debounce strategy.\n *\n * @returns Decorator that applies debounce.\n *\n * @public\n */\nexport function Debounce(\n debounceTimeInMs: number,\n debounceOptions: DebounceOptions = {}\n): DecoratorFor<AnyFunction> {\n return createDecorator((options, key) => {\n const originalMethod = options.methods![key];\n const debouncedMethod = debounce(\n (context: Vue, args: unknown[]) => originalMethod.call(context, ...args),\n debounceTimeInMs,\n debounceOptions\n );\n\n options.methods![key] = function debouncedWrapper(...args: unknown[]) {\n debouncedMethod(this, args);\n };\n });\n}\n"],"names":[],"mappings":";;;AAIA
|
|
1
|
+
{"version":3,"file":"debounce.decorators.js","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"sourcesContent":["import { createDecorator } from 'vue-class-component';\nimport { debounce } from '../../utils/debounce';\nimport { AnyFunction, DebounceOptions, DecoratorFor } from '../../utils/types';\n\n/**\n * Adds debounce to the method that the decorator is applied to.\n *\n * @remarks Pending debounced execution is cancelled when the component is destroyed.\n *\n * @param debounceTimeInMs - The time of debounce in ms.\n * @param debounceOptions - The options for the debounce strategy.\n *\n * @returns Decorator that applies debounce.\n *\n * @public\n */\nexport function Debounce(\n debounceTimeInMs: number,\n debounceOptions: DebounceOptions = {}\n): DecoratorFor<AnyFunction> {\n return createDecorator((options, key) => {\n const originalMethod = options.methods![key];\n const debouncedMethod = debounce(\n (context: Vue, args: unknown[]) => originalMethod.call(context, ...args),\n debounceTimeInMs,\n debounceOptions\n );\n\n options.methods![key] = function debouncedWrapper(...args: unknown[]) {\n debouncedMethod(this, args);\n };\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalBeforeDestroy = options.beforeDestroy;\n Object.assign(options, {\n beforeDestroy(this: Vue) {\n originalBeforeDestroy?.apply(this);\n debouncedMethod.cancel();\n }\n });\n });\n}\n"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;SAYgB,QAAQ,CACtB,gBAAwB,EACxB,kBAAmC,EAAE;IAErC,OAAO,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG;QAClC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAQ,CAAC,GAAG,CAAC,CAAC;QAC7C,MAAM,eAAe,GAAG,QAAQ,CAC9B,CAAC,OAAY,EAAE,IAAe,KAAK,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EACxE,gBAAgB,EAChB,eAAe,CAChB,CAAC;QAEF,OAAO,CAAC,OAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,gBAAgB,CAAC,GAAG,IAAe;YAClE,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC7B,CAAC;;QAGF,MAAM,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACrB,aAAa;gBACX,qBAAqB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;gBACnC,eAAe,CAAC,MAAM,EAAE,CAAC;aAC1B;SACF,CAAC,CAAC;KACJ,CAAC,CAAC;AACL;;;;"}
|
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.56",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"access": "public",
|
|
128
128
|
"directory": "dist"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "d6f224c70ef9c8c4c7a54acf4e128ca79c002bc7"
|
|
131
131
|
}
|
|
@@ -8960,7 +8960,7 @@
|
|
|
8960
8960
|
{
|
|
8961
8961
|
"kind": "Function",
|
|
8962
8962
|
"canonicalReference": "@empathyco/x-components!Debounce:function(1)",
|
|
8963
|
-
"docComment": "/**\n * Adds debounce to the method that the decorator is applied to.\n *\n * @param debounceTimeInMs - The time of debounce in ms.\n *\n * @param debounceOptions - The options for the debounce strategy.\n *\n * @returns Decorator that applies debounce.\n *\n * @public\n */\n",
|
|
8963
|
+
"docComment": "/**\n * Adds debounce to the method that the decorator is applied to.\n *\n * @remarks\n *\n * Pending debounced execution is cancelled when the component is destroyed.\n *\n * @param debounceTimeInMs - The time of debounce in ms.\n *\n * @param debounceOptions - The options for the debounce strategy.\n *\n * @returns Decorator that applies debounce.\n *\n * @public\n */\n",
|
|
8964
8964
|
"excerptTokens": [
|
|
8965
8965
|
{
|
|
8966
8966
|
"kind": "Content",
|
|
@@ -2,6 +2,8 @@ import { AnyFunction, DebounceOptions, DecoratorFor } from '../../utils/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Adds debounce to the method that the decorator is applied to.
|
|
4
4
|
*
|
|
5
|
+
* @remarks Pending debounced execution is cancelled when the component is destroyed.
|
|
6
|
+
*
|
|
5
7
|
* @param debounceTimeInMs - The time of debounce in ms.
|
|
6
8
|
* @param debounceOptions - The options for the debounce strategy.
|
|
7
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.decorators.d.ts","sourceRoot":"","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"debounce.decorators.d.ts","sourceRoot":"","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,gBAAgB,EAAE,MAAM,EACxB,eAAe,GAAE,eAAoB,GACpC,YAAY,CAAC,WAAW,CAAC,CAsB3B"}
|