@things-factory/component-ui 4.3.47 → 4.3.62
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.
|
@@ -42,7 +42,8 @@ class QuickFindContent extends LitElement {
|
|
|
42
42
|
data: Object,
|
|
43
43
|
currentTabKey: String,
|
|
44
44
|
contentRenderer: Object,
|
|
45
|
-
item: Object
|
|
45
|
+
item: Object,
|
|
46
|
+
disabledKey: Object
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -50,11 +51,13 @@ class QuickFindContent extends LitElement {
|
|
|
50
51
|
const data = this.data || {}
|
|
51
52
|
const currentTabKey = data[this.currentTabKey] ? this.currentTabKey : Object.keys(data)[0]
|
|
52
53
|
let content = this.data[currentTabKey]
|
|
54
|
+
const disabledKey = this.disabledKey
|
|
53
55
|
|
|
54
56
|
return html`
|
|
55
57
|
<quick-find-tabs
|
|
56
58
|
.currentTabKey="${currentTabKey}"
|
|
57
59
|
.data="${data}"
|
|
60
|
+
.disabledKey="${disabledKey}"
|
|
58
61
|
@tabChanged="${e => {
|
|
59
62
|
this.currentTabKey = e.detail.currentTabKey
|
|
60
63
|
}}"
|
|
@@ -25,11 +25,15 @@ class QuickFindTabs extends localize(i18next)(LitElement) {
|
|
|
25
25
|
opacity: 1;
|
|
26
26
|
font-weight: bold;
|
|
27
27
|
}
|
|
28
|
+
.tab[disabledTab] {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
28
31
|
.tab span,
|
|
29
32
|
.tab span[activate] {
|
|
30
33
|
font-weight: normal;
|
|
31
34
|
font-size: var(--fontsize-default);
|
|
32
35
|
}
|
|
36
|
+
|
|
33
37
|
@media screen and (max-width: 480px) {
|
|
34
38
|
:host {
|
|
35
39
|
width: 25px;
|
|
@@ -41,6 +45,9 @@ class QuickFindTabs extends localize(i18next)(LitElement) {
|
|
|
41
45
|
padding: var(--padding-narrow) var(--padding-default);
|
|
42
46
|
text-align: center;
|
|
43
47
|
}
|
|
48
|
+
.tab[disabledTab] {
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
44
51
|
.tab span,
|
|
45
52
|
.tab span[activate] {
|
|
46
53
|
font-size: var(--fontsize-default);
|
|
@@ -54,7 +61,8 @@ class QuickFindTabs extends localize(i18next)(LitElement) {
|
|
|
54
61
|
static get properties() {
|
|
55
62
|
return {
|
|
56
63
|
data: Object,
|
|
57
|
-
currentTabKey: String
|
|
64
|
+
currentTabKey: String,
|
|
65
|
+
disabledKey: Object
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
|
|
@@ -67,10 +75,15 @@ class QuickFindTabs extends localize(i18next)(LitElement) {
|
|
|
67
75
|
${tabKeys?.length > 1
|
|
68
76
|
? html`
|
|
69
77
|
<div class="tabs">
|
|
70
|
-
${tabKeys.map(key => {
|
|
78
|
+
${tabKeys.map((key, idx) => {
|
|
71
79
|
const items = data[key]
|
|
72
80
|
return html`
|
|
73
|
-
<div
|
|
81
|
+
<div
|
|
82
|
+
class="tab"
|
|
83
|
+
?activate="${key === currentTabKey}"
|
|
84
|
+
?disabledTab="${Object.keys(this.disabledKey || {}).includes(key) ? !this.disabledKey[key] : false}"
|
|
85
|
+
@click="${() => (this.currentTabKey = key)}"
|
|
86
|
+
>
|
|
74
87
|
${key} ${items?.length > 0 ? html`<span>(${items.length})</span>` : ''}
|
|
75
88
|
</div>
|
|
76
89
|
`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/component-ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.62",
|
|
4
4
|
"browser": "client/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@things-factory/styles": "^4.3.47"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "013096f8c0dd7bda146fd9370bf0de70da0e7bf2"
|
|
22
22
|
}
|