@eturnity/eturnity_reusable_components 8.37.1-EPDM-16021.1 → 8.37.1-EPDM-16633.2

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.
@@ -1,64 +1,25 @@
1
- function makeMap(str, expectsLowerCase) {
2
- const map = /* @__PURE__ */ Object.create(null);
3
- const list = str.split(",");
4
- for (let i = 0; i < list.length; i++) {
5
- map[list[i]] = true;
1
+ let supported;
2
+ let perf;
3
+ function isPerformanceSupported() {
4
+ var _a;
5
+ if (supported !== void 0) {
6
+ return supported;
6
7
  }
7
- return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
8
+ if (typeof window !== "undefined" && window.performance) {
9
+ supported = true;
10
+ perf = window.performance;
11
+ } else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
12
+ supported = true;
13
+ perf = globalThis.perf_hooks.performance;
14
+ } else {
15
+ supported = false;
16
+ }
17
+ return supported;
18
+ }
19
+ function now() {
20
+ return isPerformanceSupported() ? perf.now() : Date.now();
8
21
  }
9
- !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
10
- !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
11
- const NOOP = () => {
12
- };
13
- const extend = Object.assign;
14
- const hasOwnProperty = Object.prototype.hasOwnProperty;
15
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
16
- const isArray = Array.isArray;
17
- const isMap = (val) => toTypeString(val) === "[object Map]";
18
- const isFunction = (val) => typeof val === "function";
19
- const isString = (val) => typeof val === "string";
20
- const isSymbol = (val) => typeof val === "symbol";
21
- const isObject = (val) => val !== null && typeof val === "object";
22
- const objectToString = Object.prototype.toString;
23
- const toTypeString = (value) => objectToString.call(value);
24
- const toRawType = (value) => {
25
- return toTypeString(value).slice(8, -1);
26
- };
27
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
28
- const cacheStringFunction = (fn) => {
29
- const cache = /* @__PURE__ */ Object.create(null);
30
- return (str) => {
31
- const hit = cache[str];
32
- return hit || (cache[str] = fn(str));
33
- };
34
- };
35
- const capitalize = cacheStringFunction(
36
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
37
- );
38
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
39
- const def = (obj, key, value) => {
40
- Object.defineProperty(obj, key, {
41
- configurable: true,
42
- enumerable: false,
43
- value
44
- });
45
- };
46
22
  export {
47
- NOOP,
48
- capitalize,
49
- def,
50
- extend,
51
- hasChanged,
52
- hasOwn,
53
- isArray,
54
- isFunction,
55
- isIntegerKey,
56
- isMap,
57
- isObject,
58
- isString,
59
- isSymbol,
60
- makeMap,
61
- objectToString,
62
- toRawType,
63
- toTypeString
23
+ isPerformanceSupported,
24
+ now
64
25
  };
@@ -1,25 +1,64 @@
1
- let supported;
2
- let perf;
3
- function isPerformanceSupported() {
4
- var _a;
5
- if (supported !== void 0) {
6
- return supported;
1
+ function makeMap(str, expectsLowerCase) {
2
+ const map = /* @__PURE__ */ Object.create(null);
3
+ const list = str.split(",");
4
+ for (let i = 0; i < list.length; i++) {
5
+ map[list[i]] = true;
7
6
  }
8
- if (typeof window !== "undefined" && window.performance) {
9
- supported = true;
10
- perf = window.performance;
11
- } else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
12
- supported = true;
13
- perf = globalThis.perf_hooks.performance;
14
- } else {
15
- supported = false;
16
- }
17
- return supported;
18
- }
19
- function now() {
20
- return isPerformanceSupported() ? perf.now() : Date.now();
7
+ return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
21
8
  }
9
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
10
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
11
+ const NOOP = () => {
12
+ };
13
+ const extend = Object.assign;
14
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
15
+ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
16
+ const isArray = Array.isArray;
17
+ const isMap = (val) => toTypeString(val) === "[object Map]";
18
+ const isFunction = (val) => typeof val === "function";
19
+ const isString = (val) => typeof val === "string";
20
+ const isSymbol = (val) => typeof val === "symbol";
21
+ const isObject = (val) => val !== null && typeof val === "object";
22
+ const objectToString = Object.prototype.toString;
23
+ const toTypeString = (value) => objectToString.call(value);
24
+ const toRawType = (value) => {
25
+ return toTypeString(value).slice(8, -1);
26
+ };
27
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
28
+ const cacheStringFunction = (fn) => {
29
+ const cache = /* @__PURE__ */ Object.create(null);
30
+ return (str) => {
31
+ const hit = cache[str];
32
+ return hit || (cache[str] = fn(str));
33
+ };
34
+ };
35
+ const capitalize = cacheStringFunction(
36
+ (str) => str.charAt(0).toUpperCase() + str.slice(1)
37
+ );
38
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
39
+ const def = (obj, key, value) => {
40
+ Object.defineProperty(obj, key, {
41
+ configurable: true,
42
+ enumerable: false,
43
+ value
44
+ });
45
+ };
22
46
  export {
23
- isPerformanceSupported,
24
- now
47
+ NOOP,
48
+ capitalize,
49
+ def,
50
+ extend,
51
+ hasChanged,
52
+ hasOwn,
53
+ isArray,
54
+ isFunction,
55
+ isIntegerKey,
56
+ isMap,
57
+ isObject,
58
+ isString,
59
+ isSymbol,
60
+ makeMap,
61
+ objectToString,
62
+ toRawType,
63
+ toTypeString
25
64
  };
package/dist/main.es9.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import styled from "./main.es7.js";
2
- import _sfc_main$1 from "./main.es15.js";
2
+ import _sfc_main$1 from "./main.es17.js";
3
3
  import theme from "./main.es8.js";
4
4
  import "./main.es3.js";
5
5
  import _export_sfc from "./main.es11.js";
@@ -7,16 +7,16 @@ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createT
7
7
  import { toDisplayString } from "./main.es16.js";
8
8
  const TagContainer = styled.div`
9
9
  display: inline-flex;
10
- align-items: center;
10
+ align-items: baseline;
11
11
  justify-content: center;
12
12
  gap: 4px;
13
13
  border-radius: 4px;
14
- padding: 2px 4px;
14
+ padding: 4px;
15
15
  background-color: ${(props) => props.theme.semanticColors.yellow[200]};
16
16
  cursor: pointer;
17
17
  `;
18
18
  const TextContainer = styled.div`
19
- font-size: 10px;
19
+ font-size: 12px;
20
20
  font-weight: 700;
21
21
  color: ${(props) => props.theme.semanticColors.teal[800]};
22
22
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.37.1-EPDM-16021.1",
3
+ "version": "8.37.1-EPDM-16633.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -23,17 +23,13 @@
23
23
  <Icon
24
24
  :color="
25
25
  iconColor ||
26
- (isDisabled
27
- ? theme.mainButton[appTheme][type][variant].disabled.textColor
28
- : theme.mainButton[appTheme][type][variant].default.textColor)
26
+ theme.mainButton[appTheme][type][variant].default.textColor
29
27
  "
30
28
  :disable-hover="disableIconHover"
31
29
  :fill-type="fillType"
32
30
  :hovered-color="
33
31
  iconColor ||
34
- (isDisabled
35
- ? theme.mainButton[appTheme][type][variant].disabled.textColor
36
- : theme.mainButton[appTheme][type][variant].default.textColor)
32
+ theme.mainButton[appTheme][type][variant].default.textColor
37
33
  "
38
34
  :name="iconName"
39
35
  size="14px"
@@ -49,17 +45,13 @@
49
45
  v-if="showCaret"
50
46
  :color="
51
47
  iconColor ||
52
- (isDisabled
53
- ? theme.mainButton[appTheme][type][variant].disabled.textColor
54
- : theme.mainButton[appTheme][type][variant].default.textColor)
48
+ theme.mainButton[appTheme][type][variant].default.textColor
55
49
  "
56
50
  data-test-id="button-icon-caret"
57
51
  :disable-hover="disableIconHover"
58
52
  :hovered-color="
59
53
  iconColor ||
60
- (isDisabled
61
- ? theme.mainButton[appTheme][type][variant].disabled.textColor
62
- : theme.mainButton[appTheme][type][variant].default.textColor)
54
+ theme.mainButton[appTheme][type][variant].default.textColor
63
55
  "
64
56
  name="arrow_down"
65
57
  size="8px"
@@ -3,6 +3,7 @@
3
3
  <ParentDropdown
4
4
  :dropdown-text="dropdownText ? dropdownText : 'Default view'"
5
5
  :is-open="isDropdownOpen"
6
+ :number-of-filters-applied="numberOfFiltersApplied"
6
7
  @on-toggle="onToggleDropdown()"
7
8
  />
8
9
  <FilterSettings
@@ -74,6 +75,11 @@
74
75
  closeDropdown: {
75
76
  required: false,
76
77
  },
78
+ activeFilterView: {
79
+ type: Object,
80
+ default: null,
81
+ required: false,
82
+ },
77
83
  },
78
84
  data() {
79
85
  return {
@@ -82,6 +88,14 @@
82
88
  preventOutsideClick: false,
83
89
  }
84
90
  },
91
+ computed: {
92
+ numberOfFiltersApplied() {
93
+ const filterColumns = this.activeFilterView?.columns?.filter(
94
+ (column) => column.custom_view_filter !== null
95
+ )
96
+ return filterColumns?.length > 0 ? filterColumns.length : 0
97
+ },
98
+ },
85
99
  watch: {
86
100
  closeDropdown(newVal) {
87
101
  if (newVal) {
@@ -6,6 +6,9 @@
6
6
  <TitleWrapper :is-open="isOpen">
7
7
  <TitleText>
8
8
  {{ dropdownText }}
9
+ <Counter v-if="numberOfFiltersApplied">
10
+ {{ numberOfFiltersApplied }}
11
+ </Counter>
9
12
  </TitleText>
10
13
  <ArrowWrapper>
11
14
  <Icon
@@ -43,18 +46,32 @@
43
46
  grid-template-columns: auto auto;
44
47
  align-items: center;
45
48
  justify-items: center;
46
- grid-gap: 10px;
49
+ grid-gap: 8px;
47
50
  border: 1px solid ${(props) => props.theme.colors.grey4};
48
51
  background-color: ${(props) =>
49
52
  props.isOpen ? props.theme.colors.grey5 : props.theme.colors.white};
50
53
  border-left: none;
51
54
  border-radius: 0px 4px 4px 0px;
52
- padding: 6px 14px;
55
+ padding: 6px 10px;
53
56
  user-select: none;
54
57
  `
55
58
 
56
59
  const TitleText = styled.div`
57
60
  font-size: 13px;
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 8px;
64
+ `
65
+
66
+ const Counter = styled.div`
67
+ line-height: 18px;
68
+ border-radius: 8px;
69
+ padding: 0 8px;
70
+ background: ${(props) => props.theme.semanticColors.purple['100']};
71
+ color: ${(props) => props.theme.colors.primary};
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
58
75
  `
59
76
 
60
77
  const ArrowWrapper = styled.div`
@@ -75,6 +92,7 @@
75
92
  IconWrapper,
76
93
  TitleWrapper,
77
94
  TitleText,
95
+ Counter,
78
96
  ArrowWrapper,
79
97
  },
80
98
  props: {
@@ -86,6 +104,11 @@
86
104
  required: true,
87
105
  default: 'View',
88
106
  },
107
+ numberOfFiltersApplied: {
108
+ required: false,
109
+ default: 0,
110
+ type: Number,
111
+ },
89
112
  },
90
113
  }
91
114
  </script>
@@ -16,17 +16,17 @@
16
16
 
17
17
  const TagContainer = styled.div`
18
18
  display: inline-flex;
19
- align-items: center;
19
+ align-items: baseline;
20
20
  justify-content: center;
21
21
  gap: 4px;
22
22
  border-radius: 4px;
23
- padding: 2px 4px;
23
+ padding: 4px;
24
24
  background-color: ${(props) => props.theme.semanticColors.yellow[200]};
25
25
  cursor: pointer;
26
26
  `
27
27
 
28
28
  const TextContainer = styled.div`
29
- font-size: 10px;
29
+ font-size: 12px;
30
30
  font-weight: 700;
31
31
  color: ${(props) => props.theme.semanticColors.teal[800]};
32
32
  `