@empathyco/x-components 3.0.0-alpha.75 → 3.0.0-alpha.76

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 CHANGED
@@ -3,6 +3,24 @@
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.76](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.75...@empathyco/x-components@3.0.0-alpha.76) (2022-04-01)
7
+
8
+ ### Code Refactoring
9
+
10
+ - move `NonPrimitive`, `Primitive` and `AnyFunction` types from `x-components` to `x-utils`
11
+ ([7efe460](https://github.com/empathyco/x/commit/7efe4605303492e2de6f42d844f1c3244e0bcef1)),
12
+ closes [EX-5792](https://searchbroker.atlassian.net/browse/EX-5792)
13
+
14
+ ### Documentation
15
+
16
+ - fix links and update repository information and development setup for `x-components` (#394)
17
+ ([64d2118](https://github.com/empathyco/x/commit/64d2118f95673048df7e1a791ec3ae26da316ec9))
18
+
19
+ # Change Log
20
+
21
+ All notable changes to this project will be documented in this file. See
22
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
23
+
6
24
  ## [3.0.0-alpha.75](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.74...@empathyco/x-components@3.0.0-alpha.75) (2022-03-31)
7
25
 
8
26
  **Note:** Version bump only for package @empathyco/x-components
package/README.md CHANGED
@@ -1,14 +1,33 @@
1
1
  # X Components
2
2
 
3
- X Components is a library based on components, it offers you the possibility to combine these components
4
- in different ways to create your own search experience. These components can be used even if
5
- you don't want to build a search experience, they can be used to build a regular application
6
- but taking advantage of the flexibility of these components.
3
+ This is a library based on components, it offers you the possibility to combine them in different
4
+ ways to create your own search experience. These components can be used even if you don't want to
5
+ build a search experience, they can be used to build a regular application but taking advantage of
6
+ their flexibility.
7
7
 
8
- A documentation about how to install and use these components can be found here:
9
- [X Components]()
8
+ ## Set up development environment
10
9
 
11
- ### Contributing
10
+ ### Local setup
11
+
12
+ To start contributing on this project you need to understand how to see the X Components up and
13
+ running.
14
+
15
+ 1. run `npm ci` at the project root
16
+ 2. set `packages/x-components` as working directory at the terminal
17
+ 3. run `npm run serve`
18
+
19
+ The app will be launch in localhost. Every view available at the top tabs is set in
20
+ `packages/x-components/src/router.ts`.
21
+
22
+ The main tab is `Home`, pressing start you will see the contents of
23
+ `packages/x-components/src/views/home/Home.vue` with most of the X Components presents on the view.
24
+
25
+ ### Use the X Components in your own project
26
+
27
+ A documentation about how to install and use X components can be found
28
+ [here](https://docs.empathy.co/develop-empathy-platform/build-search-ui/web-x-components-integration-guide.html).
29
+
30
+ ## Contributing
12
31
 
13
32
  To start contributing to project, please take a look to our
14
- [Contributing Guide](CONTRIBUTING.md).
33
+ [Contributing Guidelines](CONTRIBUTING.md) for Interface X Components.
@@ -2127,106 +2127,6 @@
2127
2127
  --x-size-line-height-suggestion-group-default: var(--x-size-line-height-suggestion-default);
2128
2128
  --x-number-font-weight-suggestion-group-default: var(--x-number-font-weight-suggestion-default);
2129
2129
  }
2130
-
2131
- [dir="ltr"] .x-suggestion-group {
2132
- padding-left: var(--x-size-padding-left-suggestion-group-default);
2133
- }
2134
-
2135
- [dir="rtl"] .x-suggestion-group {
2136
- padding-right: var(--x-size-padding-left-suggestion-group-default);
2137
- }
2138
-
2139
- [dir="ltr"] .x-suggestion-group {
2140
- padding-right: var(--x-size-padding-right-suggestion-group-default);
2141
- }
2142
-
2143
- [dir="rtl"] .x-suggestion-group {
2144
- padding-left: var(--x-size-padding-right-suggestion-group-default);
2145
- }
2146
-
2147
- [dir="ltr"] .x-suggestion-group {
2148
- border-left-width: var(--x-size-border-width-left-suggestion-group-default);
2149
- }
2150
-
2151
- [dir="rtl"] .x-suggestion-group {
2152
- border-right-width: var(--x-size-border-width-left-suggestion-group-default);
2153
- }
2154
-
2155
- [dir="ltr"] .x-suggestion-group {
2156
- border-right-width: var(--x-size-border-width-right-suggestion-group-default);
2157
- }
2158
-
2159
- [dir="rtl"] .x-suggestion-group {
2160
- border-left-width: var(--x-size-border-width-right-suggestion-group-default);
2161
- }
2162
-
2163
- .x-suggestion-group {
2164
- display: flex;
2165
- flex-flow: row nowrap;
2166
- box-sizing: border-box;
2167
- background-color: var(--x-color-background-suggestion-group-default);
2168
- color: var(--x-color-text-suggestion-group-default);
2169
- border-color: var(--x-color-border-suggestion-group-default);
2170
- font-family: var(--x-font-family-suggestion-group-default);
2171
- font-size: var(--x-size-font-suggestion-group-default);
2172
- line-height: var(--x-size-line-height-suggestion-group-default);
2173
- font-weight: var(--x-number-font-weight-suggestion-group-default);
2174
- cursor: pointer;
2175
- padding-top: var(--x-size-padding-top-suggestion-group-default);
2176
- padding-bottom: var(--x-size-padding-bottom-suggestion-group-default);
2177
- gap: var(--x-size-gap-suggestion-group-default);
2178
- border-style: solid;
2179
- border-top-width: var(--x-size-border-width-top-suggestion-group-default);
2180
- border-bottom-width: var(--x-size-border-width-bottom-suggestion-group-default);
2181
- border-radius: var(--x-size-border-radius-top-left-suggestion-group-default) var(--x-size-border-radius-top-right-suggestion-group-default) var(--x-size-border-radius-bottom-right-suggestion-group-default) var(--x-size-border-radius-bottom-left-suggestion-group-default);
2182
- }
2183
- @media not all and (min-resolution: 0.001dpcm) {
2184
- .x-suggestion-group {
2185
- gap: 0;
2186
- }
2187
- .x-suggestion-group > *:not(:last-child) {
2188
- margin-right: var(--x-size-gap-suggestion-group-default);
2189
- }
2190
- }
2191
- .x-suggestion-group .x-suggestion {
2192
- padding: 0;
2193
- flex: 1 1 auto;
2194
- border: none;
2195
- }
2196
- .x-suggestion-group .x-button {
2197
- --x-color-background-button-default: transparent;
2198
- --x-color-border-button-default: transparent;
2199
- --x-color-text-button-default: var(--x-color-text-suggestion-group-default);
2200
- --x-size-height-button-default: var(--x-size-line-height-suggestion-group-default);
2201
- --x-size-padding-right-button-default: 0;
2202
- --x-size-padding-left-button-default: 0;
2203
- border: none;
2204
- }
2205
- :root {
2206
- --x-color-text-suggestion-group-default: var(--x-color-text-suggestion-default);
2207
- --x-color-text-suggestion-group-matching-part-default: var(--x-color-text-suggestion-matching-part-default);
2208
- --x-color-background-suggestion-group-default: var(--x-color-background-suggestion-default);
2209
- --x-color-border-suggestion-group-default: var(--x-color-text-suggestion-group-default);
2210
- --x-size-padding-top-suggestion-group-default: var(--x-size-padding-top-suggestion-default);
2211
- --x-size-padding-right-suggestion-group-default: var(--x-size-padding-right-suggestion-default);
2212
- --x-size-padding-bottom-suggestion-group-default: var(--x-size-padding-bottom-suggestion-default);
2213
- --x-size-padding-left-suggestion-group-default: var(--x-size-padding-left-suggestion-default);
2214
- --x-size-gap-suggestion-group-default: var(--x-size-gap-suggestion-default);
2215
- --x-size-border-width-suggestion-group-default: 0;
2216
- --x-size-border-width-top-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2217
- --x-size-border-width-right-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2218
- --x-size-border-width-bottom-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2219
- --x-size-border-width-left-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2220
- --x-size-border-radius-suggestion-group-default: var(--x-size-border-radius-base-none);
2221
- --x-size-border-radius-top-left-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2222
- --x-size-border-radius-top-right-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2223
- --x-size-border-radius-bottom-right-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2224
- --x-size-border-radius-bottom-left-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2225
- --x-font-family-suggestion-group-default: var(--x-font-family-suggestion-default);
2226
- --x-size-font-suggestion-group-default: var(--x-size-font-suggestion-default);
2227
- --x-size-line-height-suggestion-group-default: var(--x-size-line-height-suggestion-default);
2228
- --x-number-font-weight-suggestion-group-default: var(--x-number-font-weight-suggestion-default);
2229
- }
2230
2130
  :root {
2231
2131
  --x-string-align-items-suggestion-default: center;
2232
2132
  --x-color-text-suggestion-default: var(--x-color-text-default);
@@ -2902,4 +2802,104 @@
2902
2802
  --x-size-line-height-base-s: 16px;
2903
2803
  --x-size-line-height-base-m: 24px;
2904
2804
  --x-size-line-height-base-l: 32px;
2805
+ }
2806
+ :root {
2807
+ --x-color-text-suggestion-group-default: var(--x-color-text-suggestion-default);
2808
+ --x-color-text-suggestion-group-matching-part-default: var(--x-color-text-suggestion-matching-part-default);
2809
+ --x-color-background-suggestion-group-default: var(--x-color-background-suggestion-default);
2810
+ --x-color-border-suggestion-group-default: var(--x-color-text-suggestion-group-default);
2811
+ --x-size-padding-top-suggestion-group-default: var(--x-size-padding-top-suggestion-default);
2812
+ --x-size-padding-right-suggestion-group-default: var(--x-size-padding-right-suggestion-default);
2813
+ --x-size-padding-bottom-suggestion-group-default: var(--x-size-padding-bottom-suggestion-default);
2814
+ --x-size-padding-left-suggestion-group-default: var(--x-size-padding-left-suggestion-default);
2815
+ --x-size-gap-suggestion-group-default: var(--x-size-gap-suggestion-default);
2816
+ --x-size-border-width-suggestion-group-default: 0;
2817
+ --x-size-border-width-top-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2818
+ --x-size-border-width-right-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2819
+ --x-size-border-width-bottom-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2820
+ --x-size-border-width-left-suggestion-group-default: var(--x-size-border-width-suggestion-default);
2821
+ --x-size-border-radius-suggestion-group-default: var(--x-size-border-radius-base-none);
2822
+ --x-size-border-radius-top-left-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2823
+ --x-size-border-radius-top-right-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2824
+ --x-size-border-radius-bottom-right-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2825
+ --x-size-border-radius-bottom-left-suggestion-group-default: var(--x-size-border-radius-suggestion-default);
2826
+ --x-font-family-suggestion-group-default: var(--x-font-family-suggestion-default);
2827
+ --x-size-font-suggestion-group-default: var(--x-size-font-suggestion-default);
2828
+ --x-size-line-height-suggestion-group-default: var(--x-size-line-height-suggestion-default);
2829
+ --x-number-font-weight-suggestion-group-default: var(--x-number-font-weight-suggestion-default);
2830
+ }
2831
+
2832
+ [dir="ltr"] .x-suggestion-group {
2833
+ padding-left: var(--x-size-padding-left-suggestion-group-default);
2834
+ }
2835
+
2836
+ [dir="rtl"] .x-suggestion-group {
2837
+ padding-right: var(--x-size-padding-left-suggestion-group-default);
2838
+ }
2839
+
2840
+ [dir="ltr"] .x-suggestion-group {
2841
+ padding-right: var(--x-size-padding-right-suggestion-group-default);
2842
+ }
2843
+
2844
+ [dir="rtl"] .x-suggestion-group {
2845
+ padding-left: var(--x-size-padding-right-suggestion-group-default);
2846
+ }
2847
+
2848
+ [dir="ltr"] .x-suggestion-group {
2849
+ border-left-width: var(--x-size-border-width-left-suggestion-group-default);
2850
+ }
2851
+
2852
+ [dir="rtl"] .x-suggestion-group {
2853
+ border-right-width: var(--x-size-border-width-left-suggestion-group-default);
2854
+ }
2855
+
2856
+ [dir="ltr"] .x-suggestion-group {
2857
+ border-right-width: var(--x-size-border-width-right-suggestion-group-default);
2858
+ }
2859
+
2860
+ [dir="rtl"] .x-suggestion-group {
2861
+ border-left-width: var(--x-size-border-width-right-suggestion-group-default);
2862
+ }
2863
+
2864
+ .x-suggestion-group {
2865
+ display: flex;
2866
+ flex-flow: row nowrap;
2867
+ box-sizing: border-box;
2868
+ background-color: var(--x-color-background-suggestion-group-default);
2869
+ color: var(--x-color-text-suggestion-group-default);
2870
+ border-color: var(--x-color-border-suggestion-group-default);
2871
+ font-family: var(--x-font-family-suggestion-group-default);
2872
+ font-size: var(--x-size-font-suggestion-group-default);
2873
+ line-height: var(--x-size-line-height-suggestion-group-default);
2874
+ font-weight: var(--x-number-font-weight-suggestion-group-default);
2875
+ cursor: pointer;
2876
+ padding-top: var(--x-size-padding-top-suggestion-group-default);
2877
+ padding-bottom: var(--x-size-padding-bottom-suggestion-group-default);
2878
+ gap: var(--x-size-gap-suggestion-group-default);
2879
+ border-style: solid;
2880
+ border-top-width: var(--x-size-border-width-top-suggestion-group-default);
2881
+ border-bottom-width: var(--x-size-border-width-bottom-suggestion-group-default);
2882
+ border-radius: var(--x-size-border-radius-top-left-suggestion-group-default) var(--x-size-border-radius-top-right-suggestion-group-default) var(--x-size-border-radius-bottom-right-suggestion-group-default) var(--x-size-border-radius-bottom-left-suggestion-group-default);
2883
+ }
2884
+ @media not all and (min-resolution: 0.001dpcm) {
2885
+ .x-suggestion-group {
2886
+ gap: 0;
2887
+ }
2888
+ .x-suggestion-group > *:not(:last-child) {
2889
+ margin-right: var(--x-size-gap-suggestion-group-default);
2890
+ }
2891
+ }
2892
+ .x-suggestion-group .x-suggestion {
2893
+ padding: 0;
2894
+ flex: 1 1 auto;
2895
+ border: none;
2896
+ }
2897
+ .x-suggestion-group .x-button {
2898
+ --x-color-background-button-default: transparent;
2899
+ --x-color-border-button-default: transparent;
2900
+ --x-color-text-button-default: var(--x-color-text-suggestion-group-default);
2901
+ --x-size-height-button-default: var(--x-size-line-height-suggestion-group-default);
2902
+ --x-size-padding-right-button-default: 0;
2903
+ --x-size-padding-left-button-default: 0;
2904
+ border: none;
2905
2905
  }
@@ -218,20 +218,6 @@
218
218
  --x-color-border-button-ghost: transparent;
219
219
  --x-color-text-button-ghost: var(--x-color-base-lead);
220
220
  }
221
- .x-button--pill.x-button,
222
- .x-button--pill .x-button {
223
- --x-size-border-radius-button-default: var(--x-size-border-radius-button-pill);
224
- --x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-pill);
225
- --x-size-border-radius-top-right-button-default: var(
226
- --x-size-border-radius-top-right-button-pill
227
- );
228
- --x-size-border-radius-bottom-right-button-default: var(
229
- --x-size-border-radius-bottom-right-button-pill
230
- );
231
- --x-size-border-radius-bottom-left-button-default: var(
232
- --x-size-border-radius-bottom-left-button-pill
233
- );
234
- }
235
221
  :root {
236
222
  --x-size-border-radius-button-pill: var(--x-size-border-radius-base-pill);
237
223
  --x-size-border-radius-top-left-button-pill: var(--x-size-border-radius-button-pill);
@@ -680,6 +666,40 @@
680
666
  :root {
681
667
  --x-size-width-dropdown-m: 130px;
682
668
  }
669
+ .x-dropdown--pill {
670
+ --x-size-gap-dropdown-default: var(--x-size-gap-dropdown-pill);
671
+ --x-size-border-radius-top-left-dropdown-default: calc(
672
+ var(--x-size-line-height-dropdown-default) / 2 + var(--x-size-padding-top-dropdown-item-default) +
673
+ var(--x-size-border-width-top-dropdown-toggle-default)
674
+ );
675
+ --x-size-border-radius-top-right-dropdown-default: calc(
676
+ var(--x-size-line-height-dropdown-default) / 2 + var(--x-size-padding-top-dropdown-item-default) +
677
+ var(--x-size-border-width-top-dropdown-toggle-default)
678
+ );
679
+ --x-size-border-radius-bottom-right-dropdown-default: calc(
680
+ var(--x-size-line-height-dropdown-default) / 2 +
681
+ var(--x-size-padding-bottom-dropdown-item-default) +
682
+ var(--x-size-border-width-bottom-dropdown-toggle-default)
683
+ );
684
+ --x-size-border-radius-bottom-left-dropdown-default: calc(
685
+ var(--x-size-line-height-dropdown-default) / 2 +
686
+ var(--x-size-padding-bottom-dropdown-item-default) +
687
+ var(--x-size-border-width-bottom-dropdown-toggle-default)
688
+ );
689
+ --x-size-border-width-dropdown-list-default: var(--x-size-border-width-dropdown-list-pill);
690
+ --x-size-border-width-top-dropdown-list-default: var(
691
+ --x-size-border-width-top-dropdown-list-pill
692
+ );
693
+ --x-size-border-width-right-dropdown-list-default: var(
694
+ --x-size-border-width-right-dropdown-list-pill
695
+ );
696
+ --x-size-border-width-bottom-dropdown-list-default: var(
697
+ --x-size-border-width-bottom-dropdown-list-pill
698
+ );
699
+ --x-size-border-width-left-dropdown-list-default: var(
700
+ --x-size-border-width-left-dropdown-list-pill
701
+ );
702
+ }
683
703
  :root {
684
704
  --x-size-gap-dropdown-pill: var(--x-size-base-03);
685
705
  --x-size-border-width-dropdown-list-pill: var(--x-size-border-width-base);
@@ -864,6 +884,20 @@
864
884
  --x-size-border-width-bottom-facet-header-line: var(--x-size-border-width-facet-header-line);
865
885
  --x-size-border-width-left-facet-header-line: 0;
866
886
  }
887
+ .x-facet--outlined.x-facet,
888
+ .x-facet--outlined .x-facet {
889
+ --x-color-border-facet-default: var(--x-color-border-facet-outlined);
890
+ --x-size-border-width-facet-default: var(--x-size-border-width-facet-outlined);
891
+ --x-size-border-width-top-facet-default: var(--x-size-border-width-top-facet-outlined);
892
+ --x-size-border-width-right-facet-default: var(--x-size-border-width-right-facet-outlined);
893
+ --x-size-border-width-bottom-facet-default: var(--x-size-border-width-bottom-facet-outlined);
894
+ --x-size-border-width-left-facet-default: var(--x-size-border-width-left-facet-outlined);
895
+ --x-size-padding-facet-header-default: var(--x-size-padding-facet-header-outlined);
896
+ --x-size-padding-top-facet-header-default: var(--x-size-padding-top-facet-header-outlined);
897
+ --x-size-padding-right-facet-header-default: var(--x-size-padding-right-facet-header-outlined);
898
+ --x-size-padding-bottom-facet-header-default: var(--x-size-padding-bottom-facet-header-outlined);
899
+ --x-size-padding-left-facet-header-default: var(--x-size-padding-left-facet-header-outlined);
900
+ }
867
901
  :root {
868
902
  --x-color-border-facet-outlined: var(--x-color-base-neutral-70);
869
903
  --x-size-border-width-facet-outlined: var(--x-size-border-width-base);
@@ -1034,20 +1068,6 @@
1034
1068
  .x-grid--cols-auto .x-grid__item {
1035
1069
  min-width: var(--x-size-min-width-grid-item);
1036
1070
  }
1037
- .x-facet--outlined.x-facet,
1038
- .x-facet--outlined .x-facet {
1039
- --x-color-border-facet-default: var(--x-color-border-facet-outlined);
1040
- --x-size-border-width-facet-default: var(--x-size-border-width-facet-outlined);
1041
- --x-size-border-width-top-facet-default: var(--x-size-border-width-top-facet-outlined);
1042
- --x-size-border-width-right-facet-default: var(--x-size-border-width-right-facet-outlined);
1043
- --x-size-border-width-bottom-facet-default: var(--x-size-border-width-bottom-facet-outlined);
1044
- --x-size-border-width-left-facet-default: var(--x-size-border-width-left-facet-outlined);
1045
- --x-size-padding-facet-header-default: var(--x-size-padding-facet-header-outlined);
1046
- --x-size-padding-top-facet-header-default: var(--x-size-padding-top-facet-header-outlined);
1047
- --x-size-padding-right-facet-header-default: var(--x-size-padding-right-facet-header-outlined);
1048
- --x-size-padding-bottom-facet-header-default: var(--x-size-padding-bottom-facet-header-outlined);
1049
- --x-size-padding-left-facet-header-default: var(--x-size-padding-left-facet-header-outlined);
1050
- }
1051
1071
  :root {
1052
1072
  --x-size-padding-grid: 0;
1053
1073
  --x-size-gap-grid: var(--x-size-base-03);
@@ -7533,37 +7553,17 @@
7533
7553
  text-transform: none;
7534
7554
  }
7535
7555
 
7536
- .x-dropdown--pill {
7537
- --x-size-gap-dropdown-default: var(--x-size-gap-dropdown-pill);
7538
- --x-size-border-radius-top-left-dropdown-default: calc(
7539
- var(--x-size-line-height-dropdown-default) / 2 + var(--x-size-padding-top-dropdown-item-default) +
7540
- var(--x-size-border-width-top-dropdown-toggle-default)
7541
- );
7542
- --x-size-border-radius-top-right-dropdown-default: calc(
7543
- var(--x-size-line-height-dropdown-default) / 2 + var(--x-size-padding-top-dropdown-item-default) +
7544
- var(--x-size-border-width-top-dropdown-toggle-default)
7545
- );
7546
- --x-size-border-radius-bottom-right-dropdown-default: calc(
7547
- var(--x-size-line-height-dropdown-default) / 2 +
7548
- var(--x-size-padding-bottom-dropdown-item-default) +
7549
- var(--x-size-border-width-bottom-dropdown-toggle-default)
7550
- );
7551
- --x-size-border-radius-bottom-left-dropdown-default: calc(
7552
- var(--x-size-line-height-dropdown-default) / 2 +
7553
- var(--x-size-padding-bottom-dropdown-item-default) +
7554
- var(--x-size-border-width-bottom-dropdown-toggle-default)
7555
- );
7556
- --x-size-border-width-dropdown-list-default: var(--x-size-border-width-dropdown-list-pill);
7557
- --x-size-border-width-top-dropdown-list-default: var(
7558
- --x-size-border-width-top-dropdown-list-pill
7559
- );
7560
- --x-size-border-width-right-dropdown-list-default: var(
7561
- --x-size-border-width-right-dropdown-list-pill
7556
+ .x-button--pill.x-button,
7557
+ .x-button--pill .x-button {
7558
+ --x-size-border-radius-button-default: var(--x-size-border-radius-button-pill);
7559
+ --x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-pill);
7560
+ --x-size-border-radius-top-right-button-default: var(
7561
+ --x-size-border-radius-top-right-button-pill
7562
7562
  );
7563
- --x-size-border-width-bottom-dropdown-list-default: var(
7564
- --x-size-border-width-bottom-dropdown-list-pill
7563
+ --x-size-border-radius-bottom-right-button-default: var(
7564
+ --x-size-border-radius-bottom-right-button-pill
7565
7565
  );
7566
- --x-size-border-width-left-dropdown-list-default: var(
7567
- --x-size-border-width-left-dropdown-list-pill
7566
+ --x-size-border-radius-bottom-left-button-default: var(
7567
+ --x-size-border-radius-bottom-left-button-pill
7568
7568
  );
7569
7569
  }
@@ -21,7 +21,7 @@ export declare function Debounce(debounceTimeInMs: number, debounceOptions?: Deb
21
21
 
22
22
  <b>Returns:</b>
23
23
 
24
- [DecoratorFor](./x-components.decoratorfor.md)<!-- -->&lt;[AnyFunction](./x-components.anyfunction.md)<!-- -->&gt;
24
+ [DecoratorFor](./x-components.decoratorfor.md)<!-- -->&lt;AnyFunction&gt;
25
25
 
26
26
  Decorator that applies debounce.
27
27
 
@@ -13,5 +13,5 @@ export declare type DeepPartial<T> = {
13
13
  [P in keyof T]?: T[P] extends NonPrimitive ? T[P] extends AnyFunction ? T[P] : DeepPartial<T[P]> : T[P];
14
14
  };
15
15
  ```
16
- <b>References:</b> [NonPrimitive](./x-components.nonprimitive.md)<!-- -->, [AnyFunction](./x-components.anyfunction.md)<!-- -->, [DeepPartial](./x-components.deeppartial.md)
16
+ <b>References:</b> [DeepPartial](./x-components.deeppartial.md)
17
17
 
@@ -11,5 +11,3 @@ Alias to retrieve the first parameter type of a function.
11
11
  ```typescript
12
12
  export declare type FirstParameter<SomeFunction extends AnyFunction> = Parameters<SomeFunction>[0];
13
13
  ```
14
- <b>References:</b> [AnyFunction](./x-components.anyfunction.md)
15
-
@@ -571,7 +571,6 @@ X-Components is a library usable everywhere not only for search experiences.
571
571
  | [ActionsDictionary](./x-components.actionsdictionary.md) | Util type for being used on generic constraints which will only accept an object containing actions. |
572
572
  | [ActionsTree](./x-components.actionstree.md) | Type-safe actions definition type. An object with this type is what it is needed to define [Vuex](https://vuex.vuejs.org/) actions. |
573
573
  | [AnyActionsTree](./x-components.anyactionstree.md) | Alias for any actions tree. Use only when you really don't care about the actions type. |
574
- | [AnyFunction](./x-components.anyfunction.md) | A function with 0 or more parameters of any type, which can return something or not. |
575
574
  | [AnyGettersTree](./x-components.anygetterstree.md) | Alias for any getters tree. Use only when you don't care about the type. |
576
575
  | [AnyMutationsTree](./x-components.anymutationstree.md) | Alias for any mutations tree. Use only when the concrete type does not matter. |
577
576
  | [AnySimpleStateSelector](./x-components.anysimplestateselector.md) | Alias for any simple state selector. |
@@ -635,13 +634,11 @@ X-Components is a library usable everywhere not only for search experiences.
635
634
  | [NextQueriesXModule](./x-components.nextqueriesxmodule.md) | NextQueries [XModule](./x-components.xmodule.md) alias. |
636
635
  | [NextQueriesXStoreModule](./x-components.nextqueriesxstoremodule.md) | Next queries store module. |
637
636
  | [NiladicFunction](./x-components.niladicfunction.md) | A function with no parameters that can return anything. |
638
- | [NonPrimitive](./x-components.nonprimitive.md) | TypeScript type non-primitives. Array or Record with all possible types. |
639
637
  | [Pair](./x-components.pair.md) | Represents a pair of values of the same type in an array. |
640
638
  | [PayloadFactoryData](./x-components.payloadfactorydata.md) | Type not safe which allows the access to the State, the Getters, the payload and metadata of a [XStoreModule](./x-components.xstoremodule.md)<!-- -->. |
641
639
  | [PopularSearchesActionContext](./x-components.popularsearchesactioncontext.md) | Alias type for actions context of the [PopularSearchesXStoreModule](./x-components.popularsearchesxstoremodule.md)<!-- -->. |
642
640
  | [PopularSearchesXModule](./x-components.popularsearchesxmodule.md) | PopularSearches [XModule](./x-components.xmodule.md) alias. |
643
641
  | [PopularSearchesXStoreModule](./x-components.popularsearchesxstoremodule.md) | Popular searches store module. |
644
- | [Primitive](./x-components.primitive.md) | TypeScript type primitives. Basically every type possible except objects or arrays. |
645
642
  | [PrivateXModulesOptions](./x-components.privatexmodulesoptions.md) | Options for overriding the default store module and store emitters for each [XModule](./x-components.xmodule.md)<!-- -->. |
646
643
  | [PropsWithType](./x-components.propswithtype.md) | Extracts the name of the properties of an object that match a type. |
647
644
  | [QueryFeature](./x-components.queryfeature.md) | The name of the tool that generated the query. |
@@ -13,5 +13,5 @@ export declare type Returns<T extends Dictionary<AnyFunction>> = {
13
13
  [K in keyof T]: ReturnType<T[K]>;
14
14
  };
15
15
  ```
16
- <b>References:</b> [Dictionary](./x-components.dictionary.md)<!-- -->, [AnyFunction](./x-components.anyfunction.md)
16
+ <b>References:</b> [Dictionary](./x-components.dictionary.md)
17
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"bus.decorators.js","sources":["../../../../src/components/decorators/bus.decorators.ts"],"sourcesContent":["import { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport Vue, { WatchOptions } from 'vue';\nimport { createDecorator } from 'vue-class-component';\nimport { clone } from '../../utils/clone';\nimport { AnyFunction, DecoratorFor } from '../../utils/types';\nimport { XEvent, XEventPayload } from '../../wiring/events.types';\nimport { WireMetadata } from '../../wiring/wiring.types';\n\n/**\n * Creates a subscription to an {@link XEvent}, an array of {@link XEvent} or a component property (\n * reacting to its changes via a watcher) filtering out the passed metadata, if any, and\n * un-subscribes on the beforeDestroy hook.\n *\n * @remarks\n * The decorated property needs to be public for type inference to work.\n *\n * @param xEvent - The {@link XEvent}, an array of {@link XEvent} or a component property.\n * @param metadataFilteringOptions - The {@link WireMetadata} options to filter out a callback\n * execution.\n * @returns Decorator that creates a subscription to an {@link XEvent} and un-subscribes on the\n * beforeDestroy hook.\n * @public\n */\nexport function XOn<Event extends XEvent>(\n xEvent: Event | Event[] | ((component: Vue) => Event | Event[]),\n metadataFilteringOptions: Partial<WireMetadata> = {}\n): DecoratorFor<(payload: XEventPayload<Event>, metadata: WireMetadata) => void> {\n return createDecorator((options, key) => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalCreated = options.created;\n Object.assign(options, {\n created(this: Vue) {\n originalCreated?.apply(this);\n const componentCreateSubscription = createSubscription.bind(this);\n const subscriptionMetadata: SubscriptionMetadata<Event> = {\n event: [],\n callback: (this as any)[key], // `this` isn't correctly typed here\n metadataFilteringOptions\n };\n\n let subscription: Subscription;\n if (typeof xEvent === 'function') {\n this.$watch(\n () => xEvent(this),\n newEvents => {\n subscription?.unsubscribe();\n subscriptionMetadata.event = newEvents;\n subscription = componentCreateSubscription(subscriptionMetadata);\n },\n { immediate: true }\n );\n } else {\n subscriptionMetadata.event = xEvent;\n subscription = componentCreateSubscription(subscriptionMetadata);\n }\n\n this.$on('hook:beforeDestroy', () => subscription.unsubscribe()); // Using Vue\n // bus to subscribe to the lifecycle hook 'beforeDestroy' instead of 'capturing' the\n // original component's 'beforeDestroy' method to override it plus calling\n // originalBeforeDestroy.apply(this) to preserve the existing original hook functionality\n }\n });\n });\n}\n\n/**\n * Create a subscription for the given events executing the passed callback and filtering out based\n * on the passed metadata options.\n *\n * @param this - The vue component.\n * @param subscriptionMetadata - The {@link SubscriptionMetadata}.\n * @returns A\n * {@link https://www.learnrxjs.io/learn-rxjs/concepts/rxjs-primer#subscription | subscription}.\n * @internal\n */\nfunction createSubscription<Event extends XEvent>(\n this: Vue,\n subscriptionMetadata: SubscriptionMetadata<Event>\n): Subscription {\n const { event, callback, metadataFilteringOptions } = subscriptionMetadata;\n const eventArray = Array.isArray(event) ? event : [event];\n const subscription = new Subscription();\n eventArray.forEach(xEvent => {\n subscription.add(\n this.$x\n .on(xEvent, true)\n .pipe(filter(({ metadata }) => filterMetadataOptions(metadataFilteringOptions, metadata)))\n .subscribe(({ eventPayload, metadata }) => callback(eventPayload, metadata))\n );\n });\n return subscription;\n}\n\n/**\n * Checks if the metadata options passed to the decorator match the metadata of the emitted event.\n *\n * @param filteringOptions - The decorator options.\n * @param eventOptions - The emitted event metadata.\n * @returns True if options are empty or match the metadata.\n * @internal\n */\nfunction filterMetadataOptions<WireMetadataKey extends keyof WireMetadata>(\n filteringOptions: Partial<WireMetadata>,\n eventOptions: WireMetadata\n): boolean {\n return (Object.keys(filteringOptions) as WireMetadataKey[])\n .filter(key => filteringOptions[key] !== undefined)\n .every(key => filteringOptions[key] === eventOptions[key]);\n}\n\n/**\n * The subscription metadata containing an/a list of {@link XEvent}, the callback function to\n * execute and the metadataOptions to filter out the execution of the callback.\n *\n * @internal\n */\ninterface SubscriptionMetadata<Event extends XEvent> {\n /**\n * An {@link XEvent} or a list of them.\n */\n event: Event | Event[];\n /**\n * A callback function to execute in the subscription.\n */\n callback: AnyFunction;\n /**\n * The metadataFilteringOptions to filter out the execution of the callback.\n */\n metadataFilteringOptions: Partial<WireMetadata>;\n}\n\n/**\n * Emits the provided event whenever the decorated property changes.\n *\n * @param xEvent - The event to emit.\n * @param watcherOptions - Options for Vue's watcher.\n * @returns Decorator that makes the component emit an event when the decorated property changes.\n * @public\n */\nexport function XEmit<Event extends XEvent>(\n xEvent: Event,\n { immediate = true, deep = false }: WatchOptions = {}\n): DecoratorFor<XEventPayload<Event> | undefined> {\n return createDecorator((options, key) => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalCreated = options.created;\n options.created = function (this: Vue) {\n originalCreated?.apply(this);\n if ((this as any)[key] !== undefined) {\n this.$watch(\n key,\n newValue => {\n this.$x.emit(\n xEvent,\n typeof newValue === 'object' && newValue !== null ? clone(newValue) : newValue\n );\n },\n { immediate, deep }\n );\n }\n };\n });\n}\n"],"names":[],"mappings":";;;;;AASA;;;;;;;;;;;;;;;SAegB,GAAG,CACjB,MAA+D,EAC/D,2BAAkD,EAAE;IAEpD,OAAO,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG;;QAElC,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACrB,OAAO;gBACL,eAAe,E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AACL;;;;"}
1
+ {"version":3,"file":"bus.decorators.js","sources":["../../../../src/components/decorators/bus.decorators.ts"],"sourcesContent":["import { AnyFunction } from '@empathyco/x-utils';\nimport { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport Vue, { WatchOptions } from 'vue';\nimport { createDecorator } from 'vue-class-component';\nimport { clone } from '../../utils/clone';\nimport { DecoratorFor } from '../../utils/types';\nimport { XEvent, XEventPayload } from '../../wiring/events.types';\nimport { WireMetadata } from '../../wiring/wiring.types';\n\n/**\n * Creates a subscription to an {@link XEvent}, an array of {@link XEvent} or a component property (\n * reacting to its changes via a watcher) filtering out the passed metadata, if any, and\n * un-subscribes on the beforeDestroy hook.\n *\n * @remarks\n * The decorated property needs to be public for type inference to work.\n *\n * @param xEvent - The {@link XEvent}, an array of {@link XEvent} or a component property.\n * @param metadataFilteringOptions - The {@link WireMetadata} options to filter out a callback\n * execution.\n * @returns Decorator that creates a subscription to an {@link XEvent} and un-subscribes on the\n * beforeDestroy hook.\n * @public\n */\nexport function XOn<Event extends XEvent>(\n xEvent: Event | Event[] | ((component: Vue) => Event | Event[]),\n metadataFilteringOptions: Partial<WireMetadata> = {}\n): DecoratorFor<(payload: XEventPayload<Event>, metadata: WireMetadata) => void> {\n return createDecorator((options, key) => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalCreated = options.created;\n Object.assign(options, {\n created(this: Vue) {\n originalCreated?.apply(this);\n const componentCreateSubscription = createSubscription.bind(this);\n const subscriptionMetadata: SubscriptionMetadata<Event> = {\n event: [],\n callback: (this as any)[key], // `this` isn't correctly typed here\n metadataFilteringOptions\n };\n\n let subscription: Subscription;\n if (typeof xEvent === 'function') {\n this.$watch(\n () => xEvent(this),\n newEvents => {\n subscription?.unsubscribe();\n subscriptionMetadata.event = newEvents;\n subscription = componentCreateSubscription(subscriptionMetadata);\n },\n { immediate: true }\n );\n } else {\n subscriptionMetadata.event = xEvent;\n subscription = componentCreateSubscription(subscriptionMetadata);\n }\n\n this.$on('hook:beforeDestroy', () => subscription.unsubscribe()); // Using Vue\n // bus to subscribe to the lifecycle hook 'beforeDestroy' instead of 'capturing' the\n // original component's 'beforeDestroy' method to override it plus calling\n // originalBeforeDestroy.apply(this) to preserve the existing original hook functionality\n }\n });\n });\n}\n\n/**\n * Create a subscription for the given events executing the passed callback and filtering out based\n * on the passed metadata options.\n *\n * @param this - The vue component.\n * @param subscriptionMetadata - The {@link SubscriptionMetadata}.\n * @returns A\n * {@link https://www.learnrxjs.io/learn-rxjs/concepts/rxjs-primer#subscription | subscription}.\n * @internal\n */\nfunction createSubscription<Event extends XEvent>(\n this: Vue,\n subscriptionMetadata: SubscriptionMetadata<Event>\n): Subscription {\n const { event, callback, metadataFilteringOptions } = subscriptionMetadata;\n const eventArray = Array.isArray(event) ? event : [event];\n const subscription = new Subscription();\n eventArray.forEach(xEvent => {\n subscription.add(\n this.$x\n .on(xEvent, true)\n .pipe(filter(({ metadata }) => filterMetadataOptions(metadataFilteringOptions, metadata)))\n .subscribe(({ eventPayload, metadata }) => callback(eventPayload, metadata))\n );\n });\n return subscription;\n}\n\n/**\n * Checks if the metadata options passed to the decorator match the metadata of the emitted event.\n *\n * @param filteringOptions - The decorator options.\n * @param eventOptions - The emitted event metadata.\n * @returns True if options are empty or match the metadata.\n * @internal\n */\nfunction filterMetadataOptions<WireMetadataKey extends keyof WireMetadata>(\n filteringOptions: Partial<WireMetadata>,\n eventOptions: WireMetadata\n): boolean {\n return (Object.keys(filteringOptions) as WireMetadataKey[])\n .filter(key => filteringOptions[key] !== undefined)\n .every(key => filteringOptions[key] === eventOptions[key]);\n}\n\n/**\n * The subscription metadata containing an/a list of {@link XEvent}, the callback function to\n * execute and the metadataOptions to filter out the execution of the callback.\n *\n * @internal\n */\ninterface SubscriptionMetadata<Event extends XEvent> {\n /**\n * An {@link XEvent} or a list of them.\n */\n event: Event | Event[];\n /**\n * A callback function to execute in the subscription.\n */\n callback: AnyFunction;\n /**\n * The metadataFilteringOptions to filter out the execution of the callback.\n */\n metadataFilteringOptions: Partial<WireMetadata>;\n}\n\n/**\n * Emits the provided event whenever the decorated property changes.\n *\n * @param xEvent - The event to emit.\n * @param watcherOptions - Options for Vue's watcher.\n * @returns Decorator that makes the component emit an event when the decorated property changes.\n * @public\n */\nexport function XEmit<Event extends XEvent>(\n xEvent: Event,\n { immediate = true, deep = false }: WatchOptions = {}\n): DecoratorFor<XEventPayload<Event> | undefined> {\n return createDecorator((options, key) => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalCreated = options.created;\n options.created = function (this: Vue) {\n originalCreated?.apply(this);\n if ((this as any)[key] !== undefined) {\n this.$watch(\n key,\n newValue => {\n this.$x.emit(\n xEvent,\n typeof newValue === 'object' && newValue !== null ? clone(newValue) : newValue\n );\n },\n { immediate, deep }\n );\n }\n };\n });\n}\n"],"names":[],"mappings":";;;;;AAUA;;;;;;;;;;;;;;;SAegB,GAAG,CACjB,MAA+D,EAC/D,2BAAkD,EAAE;IAEpD,OAAO,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG;;QAElC,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACrB,OAAO;gBACL,eAAe,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC7B,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClE,MAAM,oBAAoB,GAAgC;oBACxD,KAAK,EAAE,EAAE;oBACT,QAAQ,EAAG,IAAY,CAAC,GAAG,CAAC;oBAC5B,wBAAwB;iBACzB,CAAC;gBAEF,IAAI,YAA0B,CAAC;gBAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;oBAChC,IAAI,CAAC,MAAM,CACT,MAAM,MAAM,CAAC,IAAI,CAAC,EAClB,SAAS;wBACP,YAAY,EAAE,WAAW,EAAE,CAAC;wBAC5B,oBAAoB,CAAC,KAAK,GAAG,SAAS,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,GAAG,CAAC,KAAK,SAAS,CAAC;SAClD,KAAK,CAAC,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC;AAuBD;;;;;;;;SAQgB,KAAK,CACnB,MAAa,EACb,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,KAAmB,EAAE;IAErD,OAAO,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG;;QAElC,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;QACxC,OAAO,CAAC,OAAO,GAAG;YAChB,eAAe,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAK,IAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;gBACpC,IAAI,CAAC,MAAM,CACT,GAAG,EACH,QAAQ;oBACN,IAAI,CAAC,EAAE,CAAC,IAAI,CACV,MAAM,EACN,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAC/E,CAAC;iBACH,EACD,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;aACH;SACF,CAAC;KACH,CAAC,CAAC;AACL;;;;"}
@@ -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 * @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;;;;"}
1
+ {"version":3,"file":"debounce.decorators.js","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"sourcesContent":["import { AnyFunction } from '@empathyco/x-utils';\nimport { createDecorator } from 'vue-class-component';\nimport { debounce } from '../../utils/debounce';\nimport { 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":";;;AAKA;;;;;;;;;;;;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.75",
3
+ "version": "3.0.0-alpha.76",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -59,11 +59,12 @@
59
59
  "cypress:open:component": "cypress open-ct"
60
60
  },
61
61
  "dependencies": {
62
- "@empathyco/x-adapter": "^7.0.0-alpha.16",
63
- "@empathyco/x-deep-merge": "^1.3.0-alpha.4",
62
+ "@empathyco/x-adapter": "^7.0.0-alpha.17",
63
+ "@empathyco/x-deep-merge": "^1.3.0-alpha.5",
64
64
  "@empathyco/x-logger": "^1.2.0-alpha.3",
65
65
  "@empathyco/x-storage-service": "^2.0.0-alpha.2",
66
66
  "@empathyco/x-types": "^10.0.0-alpha.20",
67
+ "@empathyco/x-utils": "^0.1.0-alpha.4",
67
68
  "@types/resize-observer-browser": "~0.1.5",
68
69
  "nanoid": "~3.1.31",
69
70
  "reflect-metadata": "~0.1.13",
@@ -127,5 +128,5 @@
127
128
  "access": "public",
128
129
  "directory": "dist"
129
130
  },
130
- "gitHead": "fc23e6ad9d61be10fd1c56545902ef349de2e57c"
131
+ "gitHead": "8efe7a9f47c1aad2fdfe6fc796a46ad0e2dc987d"
131
132
  }
@@ -1017,31 +1017,6 @@
1017
1017
  "endIndex": 11
1018
1018
  }
1019
1019
  },
1020
- {
1021
- "kind": "TypeAlias",
1022
- "canonicalReference": "@empathyco/x-components!AnyFunction:type",
1023
- "docComment": "/**\n * A function with 0 or more parameters of any type, which can return something or not.\n *\n * @public\n */\n",
1024
- "excerptTokens": [
1025
- {
1026
- "kind": "Content",
1027
- "text": "export declare type AnyFunction = "
1028
- },
1029
- {
1030
- "kind": "Content",
1031
- "text": "(...args: any[]) => any"
1032
- },
1033
- {
1034
- "kind": "Content",
1035
- "text": ";"
1036
- }
1037
- ],
1038
- "releaseTag": "Public",
1039
- "name": "AnyFunction",
1040
- "typeTokenRange": {
1041
- "startIndex": 1,
1042
- "endIndex": 2
1043
- }
1044
- },
1045
1020
  {
1046
1021
  "kind": "TypeAlias",
1047
1022
  "canonicalReference": "@empathyco/x-components!AnyGettersTree:type",
@@ -8993,7 +8968,7 @@
8993
8968
  {
8994
8969
  "kind": "Reference",
8995
8970
  "text": "AnyFunction",
8996
- "canonicalReference": "@empathyco/x-components!AnyFunction:type"
8971
+ "canonicalReference": "@empathyco/x-utils!AnyFunction:type"
8997
8972
  },
8998
8973
  {
8999
8974
  "kind": "Content",
@@ -9516,7 +9491,7 @@
9516
9491
  {
9517
9492
  "kind": "Reference",
9518
9493
  "text": "NonPrimitive",
9519
- "canonicalReference": "@empathyco/x-components!NonPrimitive:type"
9494
+ "canonicalReference": "@empathyco/x-utils!NonPrimitive:type"
9520
9495
  },
9521
9496
  {
9522
9497
  "kind": "Content",
@@ -9525,7 +9500,7 @@
9525
9500
  {
9526
9501
  "kind": "Reference",
9527
9502
  "text": "AnyFunction",
9528
- "canonicalReference": "@empathyco/x-components!AnyFunction:type"
9503
+ "canonicalReference": "@empathyco/x-utils!AnyFunction:type"
9529
9504
  },
9530
9505
  {
9531
9506
  "kind": "Content",
@@ -17562,7 +17537,7 @@
17562
17537
  {
17563
17538
  "kind": "Reference",
17564
17539
  "text": "AnyFunction",
17565
- "canonicalReference": "@empathyco/x-components!AnyFunction:type"
17540
+ "canonicalReference": "@empathyco/x-utils!AnyFunction:type"
17566
17541
  },
17567
17542
  {
17568
17543
  "kind": "Content",
@@ -27342,45 +27317,6 @@
27342
27317
  "endIndex": 2
27343
27318
  }
27344
27319
  },
27345
- {
27346
- "kind": "TypeAlias",
27347
- "canonicalReference": "@empathyco/x-components!NonPrimitive:type",
27348
- "docComment": "/**\n * TypeScript type non-primitives. Array or Record with all possible types.\n *\n * @public\n */\n",
27349
- "excerptTokens": [
27350
- {
27351
- "kind": "Content",
27352
- "text": "export declare type NonPrimitive = "
27353
- },
27354
- {
27355
- "kind": "Reference",
27356
- "text": "Array",
27357
- "canonicalReference": "!Array:interface"
27358
- },
27359
- {
27360
- "kind": "Content",
27361
- "text": "<any> | "
27362
- },
27363
- {
27364
- "kind": "Reference",
27365
- "text": "Record",
27366
- "canonicalReference": "!Record:type"
27367
- },
27368
- {
27369
- "kind": "Content",
27370
- "text": "<any, any>"
27371
- },
27372
- {
27373
- "kind": "Content",
27374
- "text": ";"
27375
- }
27376
- ],
27377
- "releaseTag": "Public",
27378
- "name": "NonPrimitive",
27379
- "typeTokenRange": {
27380
- "startIndex": 1,
27381
- "endIndex": 5
27382
- }
27383
- },
27384
27320
  {
27385
27321
  "kind": "Variable",
27386
27322
  "canonicalReference": "@empathyco/x-components!normalizedQuery:var",
@@ -29307,36 +29243,6 @@
29307
29243
  "endIndex": 11
29308
29244
  }
29309
29245
  },
29310
- {
29311
- "kind": "TypeAlias",
29312
- "canonicalReference": "@empathyco/x-components!Primitive:type",
29313
- "docComment": "/**\n * TypeScript type primitives. Basically every type possible except objects or arrays.\n *\n * @public\n */\n",
29314
- "excerptTokens": [
29315
- {
29316
- "kind": "Content",
29317
- "text": "export declare type Primitive = "
29318
- },
29319
- {
29320
- "kind": "Content",
29321
- "text": "string | number | boolean | undefined | null | symbol | "
29322
- },
29323
- {
29324
- "kind": "Reference",
29325
- "text": "AnyFunction",
29326
- "canonicalReference": "@empathyco/x-components!AnyFunction:type"
29327
- },
29328
- {
29329
- "kind": "Content",
29330
- "text": ";"
29331
- }
29332
- ],
29333
- "releaseTag": "Public",
29334
- "name": "Primitive",
29335
- "typeTokenRange": {
29336
- "startIndex": 1,
29337
- "endIndex": 3
29338
- }
29339
- },
29340
29246
  {
29341
29247
  "kind": "Interface",
29342
29248
  "canonicalReference": "@empathyco/x-components!PrivateXModuleOptions:interface",
@@ -34765,7 +34671,7 @@
34765
34671
  {
34766
34672
  "kind": "Reference",
34767
34673
  "text": "AnyFunction",
34768
- "canonicalReference": "@empathyco/x-components!AnyFunction:type"
34674
+ "canonicalReference": "@empathyco/x-utils!AnyFunction:type"
34769
34675
  },
34770
34676
  {
34771
34677
  "kind": "Content",
@@ -5,12 +5,14 @@
5
5
  ```ts
6
6
 
7
7
  import { ActionContext } from 'vuex';
8
+ import { AnyFunction } from '@empathyco/x-utils';
8
9
  import { ComponentOptions } from 'vue';
9
10
  import { CreateElement } from 'vue';
10
11
  import { default as default_2 } from 'vue';
11
12
  import { DirectiveOptions } from 'vue';
12
13
  import { ExtendedVue } from 'vue/types/vue';
13
14
  import { Module } from 'vuex';
15
+ import { NonPrimitive } from '@empathyco/x-utils';
14
16
  import { Observable } from 'rxjs';
15
17
  import { PluginObject } from 'vue';
16
18
  import { StorageService } from '@empathyco/x-storage-service';
@@ -101,9 +103,6 @@ export class AnimateWidth extends Vue_2 {
101
103
  // @public
102
104
  export type AnyActionsTree = ActionsTree<Dictionary, Dictionary, MutationsDictionary<any>, ActionsDictionary<any>>;
103
105
 
104
- // @public
105
- export type AnyFunction = (...args: any[]) => any;
106
-
107
106
  // @public
108
107
  export type AnyGettersTree = GettersTree<Dictionary, Dictionary>;
109
108
 
@@ -2500,9 +2499,6 @@ export type NiladicFunction = () => any;
2500
2499
  // @internal
2501
2500
  export const NoElement: ExtendedVue<Vue_2, unknown, unknown, unknown, Record<never, any>>;
2502
2501
 
2503
- // @public
2504
- export type NonPrimitive = Array<any> | Record<any, any>;
2505
-
2506
2502
  // @internal
2507
2503
  export function noOp(): any;
2508
2504
 
@@ -2702,9 +2698,6 @@ export type PopularSearchesXStoreModule = XStoreModule<PopularSearchesState, Pop
2702
2698
  // @internal
2703
2699
  export const popularSearchesXStoreModule: PopularSearchesXStoreModule;
2704
2700
 
2705
- // @public
2706
- export type Primitive = string | number | boolean | undefined | null | symbol | AnyFunction;
2707
-
2708
2701
  // @public
2709
2702
  export interface PrivateXModuleOptions<Module extends AnyXModule> {
2710
2703
  storeEmitters?: Partial<StoreEmitters<Module['storeModule']>>;
@@ -1 +1 @@
1
- {"version":3,"file":"bus.decorators.d.ts","sourceRoot":"","sources":["../../../../src/components/decorators/bus.decorators.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAGxC,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,KAAK,SAAS,MAAM,EACtC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,KAAK,GAAG,KAAK,EAAE,CAAC,EAC/D,wBAAwB,GAAE,OAAO,CAAC,YAAY,CAAM,GACnD,YAAY,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC,CAqC/E;AAoED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,MAAM,EACxC,MAAM,EAAE,KAAK,EACb,EAAE,SAAgB,EAAE,IAAY,EAAE,GAAE,YAAiB,GACpD,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAoBhD"}
1
+ {"version":3,"file":"bus.decorators.d.ts","sourceRoot":"","sources":["../../../../src/components/decorators/bus.decorators.ts"],"names":[],"mappings":"AAGA,OAAO,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,KAAK,SAAS,MAAM,EACtC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,KAAK,GAAG,KAAK,EAAE,CAAC,EAC/D,wBAAwB,GAAE,OAAO,CAAC,YAAY,CAAM,GACnD,YAAY,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC,CAqC/E;AAoED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,MAAM,EACxC,MAAM,EAAE,KAAK,EACb,EAAE,SAAgB,EAAE,IAAY,EAAE,GAAE,YAAiB,GACpD,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAoBhD"}
@@ -1,4 +1,5 @@
1
- import { AnyFunction, DebounceOptions, DecoratorFor } from '../../utils/types';
1
+ import { AnyFunction } from '@empathyco/x-utils';
2
+ import { DebounceOptions, DecoratorFor } from '../../utils/types';
2
3
  /**
3
4
  * Adds debounce to the method that the decorator is applied to.
4
5
  *
@@ -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;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,gBAAgB,EAAE,MAAM,EACxB,eAAe,GAAE,eAAoB,GACpC,YAAY,CAAC,WAAW,CAAC,CAsB3B"}
1
+ {"version":3,"file":"debounce.decorators.d.ts","sourceRoot":"","sources":["../../../../src/components/decorators/debounce.decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,gBAAgB,EAAE,MAAM,EACxB,eAAe,GAAE,eAAoB,GACpC,YAAY,CAAC,WAAW,CAAC,CAsB3B"}
@@ -1,4 +1,5 @@
1
1
  import { Identifiable, NamedModel } from '@empathyco/x-types';
2
+ import { NonPrimitive, AnyFunction } from '@empathyco/x-utils';
2
3
  import { XEventsTypes } from '../wiring/events.types';
3
4
  import { XModuleName } from '../x-modules/x-modules.types';
4
5
  /**
@@ -56,24 +57,6 @@ export declare type PropsWithType<SomeObject, TargetItem> = keyof SomeObject & k
56
57
  export declare type DeepPartial<T> = {
57
58
  [P in keyof T]?: T[P] extends NonPrimitive ? T[P] extends AnyFunction ? T[P] : DeepPartial<T[P]> : T[P];
58
59
  };
59
- /**
60
- * TypeScript type non-primitives. Array or Record with all possible types.
61
- *
62
- * @public
63
- */
64
- export declare type NonPrimitive = Array<any> | Record<any, any>;
65
- /**
66
- * TypeScript type primitives. Basically every type possible except objects or arrays.
67
- *
68
- * @public
69
- */
70
- export declare type Primitive = string | number | boolean | undefined | null | symbol | AnyFunction;
71
- /**
72
- * A function with 0 or more parameters of any type, which can return something or not.
73
- *
74
- * @public
75
- */
76
- export declare type AnyFunction = (...args: any[]) => any;
77
60
  /**
78
61
  * A function with no parameters that can return anything.
79
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;;;;GAMG;AACH,oBAAY,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,E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,oBAAY,qBAAqB,GAAG;IAClC,MAAM,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC9C,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,uBAAuB,GAAG;KACnC,GAAG,IAAI,QAAQ,GAAG,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC;CACrD,CAAC;AAEF;;;;;;GAMG;AACH,oBAAY,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,SAAS,GAAG,EAAE;IACrD,CAAC,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,GAAG,EAAE;IACpD,CAAC,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,oBAAY,UAAU,CAAC,SAAS,IAAI,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [AnyFunction](./x-components.anyfunction.md)
4
-
5
- ## AnyFunction type
6
-
7
- A function with 0 or more parameters of any type, which can return something or not.
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export declare type AnyFunction = (...args: any[]) => any;
13
- ```
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [NonPrimitive](./x-components.nonprimitive.md)
4
-
5
- ## NonPrimitive type
6
-
7
- TypeScript type non-primitives. Array or Record with all possible types.
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export declare type NonPrimitive = Array<any> | Record<any, any>;
13
- ```
@@ -1,15 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [Primitive](./x-components.primitive.md)
4
-
5
- ## Primitive type
6
-
7
- TypeScript type primitives. Basically every type possible except objects or arrays.
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export declare type Primitive = string | number | boolean | undefined | null | symbol | AnyFunction;
13
- ```
14
- <b>References:</b> [AnyFunction](./x-components.anyfunction.md)
15
-