@itfin/components 1.3.53 → 1.3.54
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/package.json
CHANGED
|
@@ -114,6 +114,9 @@ interface IPanel {
|
|
|
114
114
|
once: (eventName: string, func: (event: string, ...args: any[]) => any) => void;
|
|
115
115
|
emit: (event: string, ...args: any[]) => void;
|
|
116
116
|
isMultiple: () => boolean;
|
|
117
|
+
fullsize: () => void;
|
|
118
|
+
getPayload: () => any;
|
|
119
|
+
setPayload: (value: any) => void;
|
|
117
120
|
__events: Record<string, ((event: string, ...args: any[]) => any)[]>;
|
|
118
121
|
}
|
|
119
122
|
|
|
@@ -182,7 +185,7 @@ export default class PanelList extends Vue {
|
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
openPanel(title: string, icon: string, type: string, payload: any, openIndex?: number) {
|
|
185
|
-
const newPanel:
|
|
188
|
+
const newPanel:any = {
|
|
186
189
|
id: this.nextId++,
|
|
187
190
|
title,
|
|
188
191
|
icon,
|
|
@@ -190,7 +193,7 @@ export default class PanelList extends Vue {
|
|
|
190
193
|
payload,
|
|
191
194
|
isCollapsed: false,
|
|
192
195
|
isCloseable: true,
|
|
193
|
-
__events: {}
|
|
196
|
+
__events: {},
|
|
194
197
|
};
|
|
195
198
|
if (!this.panelsStack.length) {
|
|
196
199
|
newPanel.isCloseable = false;
|
|
@@ -218,16 +221,16 @@ export default class PanelList extends Vue {
|
|
|
218
221
|
}
|
|
219
222
|
};
|
|
220
223
|
newPanel.once = (eventName, func: (event: string, ...args: any[]) => any) => {
|
|
221
|
-
const wrapper = (...args) => {
|
|
222
|
-
func(...args);
|
|
224
|
+
const wrapper = (...args: any[]) => {
|
|
225
|
+
func(eventName, ...args);
|
|
223
226
|
newPanel.off(eventName, wrapper);
|
|
224
227
|
};
|
|
225
228
|
newPanel.on(eventName, wrapper);
|
|
226
229
|
};
|
|
227
230
|
newPanel.isMultiple = () => this.isOpenMultiple;
|
|
231
|
+
newPanel.fullsize = () => this.fullsizePanel(newPanel);
|
|
228
232
|
newPanel.getPayload = () => newPanel.payload;
|
|
229
233
|
newPanel.setPayload = (value: any) => {
|
|
230
|
-
console.info(value);
|
|
231
234
|
newPanel.payload = value;
|
|
232
235
|
}
|
|
233
236
|
newStack.push(newPanel);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</div-->
|
|
8
8
|
|
|
9
9
|
<div data-test="table-group-wrapper" class="table-group-wrapper flex-grow-1 w-100 d-block"
|
|
10
|
-
:style="`--row-count: ${isShowTable ? rows.length : 0}`"
|
|
10
|
+
:style="`--row-count: ${isShowTable ? rows.length : 0}`">
|
|
11
11
|
<div data-test="table-group" class="position-relative">
|
|
12
12
|
<div :class="stickyId" class="sticky-group">
|
|
13
13
|
<div v-if="title" group="tablegroups" class="draggable-item"
|
|
@@ -132,13 +132,6 @@
|
|
|
132
132
|
</template>
|
|
133
133
|
<style lang="scss">
|
|
134
134
|
.itf-table-group {
|
|
135
|
-
--group-title-height: 40px;
|
|
136
|
-
--table-row-height: 36px;
|
|
137
|
-
--table-small-row-size: var(--table-row-height);
|
|
138
|
-
--shadow-area-width: 12px;
|
|
139
|
-
--indicator-area-width: 38px;
|
|
140
|
-
--hover-bg: var(--bs-tertiary-bg);
|
|
141
|
-
|
|
142
135
|
flex-direction: column;
|
|
143
136
|
min-width: 100%;
|
|
144
137
|
display: flex;
|
|
@@ -268,6 +261,11 @@
|
|
|
268
261
|
}
|
|
269
262
|
}
|
|
270
263
|
|
|
264
|
+
.sticky-group {
|
|
265
|
+
position: sticky;
|
|
266
|
+
top: 0;
|
|
267
|
+
z-index: 10;
|
|
268
|
+
}
|
|
271
269
|
.table-summary {
|
|
272
270
|
.shadow-area {
|
|
273
271
|
border-right: 0;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--itf-table-border-color: #e1e1e1;
|
|
3
|
+
--itf-table-header-bg: #f8f8f8;
|
|
4
|
+
--itf-table-selected-bg: #f0f0f0;
|
|
2
5
|
--itf-table-border-color: #dbddd1;
|
|
3
6
|
--itf-table-header-bg: #f9faf5;
|
|
4
7
|
--itf-table-hover-header-bg: var(--bs-tertiary-bg);
|
|
@@ -11,17 +14,24 @@
|
|
|
11
14
|
--itf-table-header-subtitle-color: #aeafaa;
|
|
12
15
|
--itf-table-summary-text: var(--bs-tertiary-color);
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
--group-title-height: 40px;
|
|
18
|
+
--table-row-height: 36px;
|
|
19
|
+
--table-small-row-size: var(--table-row-height);
|
|
20
|
+
--shadow-area-width: 12px;
|
|
21
|
+
--indicator-area-width: 38px;
|
|
22
|
+
--hover-bg: var(--bs-tertiary-bg);
|
|
23
|
+
}
|
|
24
|
+
// dark
|
|
25
|
+
body[data-theme="dark"] {
|
|
26
|
+
--itf-table-hover-bg: #393b41;
|
|
27
|
+
--itf-table-header-bg: #0f0f0f;
|
|
28
|
+
--itf-table-hover-header-bg: #252525;
|
|
29
|
+
--itf-table-border-color: var(--bs-card-border-color);
|
|
30
|
+
--itf-table-input-focus-border-color: #252525;
|
|
31
|
+
--itf-table-selected-bg: #011534;
|
|
32
|
+
--itf-table-summary-text: #82909d80;
|
|
33
|
+
}
|
|
34
|
+
.itf-table2 {
|
|
25
35
|
&.scrollable {
|
|
26
36
|
-webkit-overflow-scrolling: touch;
|
|
27
37
|
overflow: hidden scroll;
|
|
@@ -42,24 +42,24 @@ describe('Validators', () => {
|
|
|
42
42
|
expect(dateBeforeValidation()(null, $t)).toEqual(true);
|
|
43
43
|
expect(dateBeforeValidation()(undefined, $t)).toEqual(true);
|
|
44
44
|
expect(dateBeforeValidation('2020-01-02')('2020-01-01', $t)).toEqual(true);
|
|
45
|
-
expect(dateBeforeValidation('2020-01-01')('2020-01-02', $t)).toEqual('
|
|
46
|
-
expect(dateBeforeValidation('2020-01-01')('2020-01-01', $t)).toEqual('
|
|
45
|
+
expect(dateBeforeValidation('2020-01-01')('2020-01-02', $t)).toEqual('components.dateBefore');
|
|
46
|
+
expect(dateBeforeValidation('2020-01-01')('2020-01-01', $t)).toEqual('components.dateBefore');
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
test('dateAfterValidation', () => {
|
|
50
50
|
expect(dateAfterValidation()(0, $t)).toEqual(true);
|
|
51
51
|
expect(dateAfterValidation()(null, $t)).toEqual(true);
|
|
52
52
|
expect(dateAfterValidation()(undefined, $t)).toEqual(true);
|
|
53
|
-
expect(dateAfterValidation('2020-01-02')('2020-01-01', $t)).toEqual('
|
|
53
|
+
expect(dateAfterValidation('2020-01-02')('2020-01-01', $t)).toEqual('components.dateAfter');
|
|
54
54
|
expect(dateAfterValidation('2020-01-01')('2020-01-02', $t)).toEqual(true);
|
|
55
|
-
expect(dateAfterValidation('2020-01-01')('2020-01-01', $t)).toEqual('
|
|
55
|
+
expect(dateAfterValidation('2020-01-01')('2020-01-01', $t)).toEqual('components.dateAfter');
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
test('dateSameOrAfterValidation', () => {
|
|
59
59
|
expect(dateSameOrAfterValidation()(0, $t)).toEqual(true);
|
|
60
60
|
expect(dateSameOrAfterValidation()(null, $t)).toEqual(true);
|
|
61
61
|
expect(dateSameOrAfterValidation()(undefined, $t)).toEqual(true);
|
|
62
|
-
expect(dateSameOrAfterValidation('2020-01-02')('2020-01-01', $t)).toEqual('
|
|
62
|
+
expect(dateSameOrAfterValidation('2020-01-02')('2020-01-01', $t)).toEqual('components.dateSameOrAfter');
|
|
63
63
|
expect(dateSameOrAfterValidation('2020-01-01')('2020-01-02', $t)).toEqual(true);
|
|
64
64
|
expect(dateSameOrAfterValidation('2020-01-01')('2020-01-01', $t)).toEqual(true);
|
|
65
65
|
});
|
|
@@ -69,7 +69,7 @@ describe('Validators', () => {
|
|
|
69
69
|
expect(dateSameOrBeforeValidation()(null, $t)).toEqual(true);
|
|
70
70
|
expect(dateSameOrBeforeValidation()(undefined, $t)).toEqual(true);
|
|
71
71
|
expect(dateSameOrBeforeValidation('2020-01-02')('2020-01-01', $t)).toEqual(true);
|
|
72
|
-
expect(dateSameOrBeforeValidation('2020-01-01')('2020-01-02', $t)).toEqual('
|
|
72
|
+
expect(dateSameOrBeforeValidation('2020-01-01')('2020-01-02', $t)).toEqual('components.dateSameOrBefore');
|
|
73
73
|
expect(dateSameOrBeforeValidation('2020-01-01')('2020-01-01', $t)).toEqual(true);
|
|
74
74
|
});
|
|
75
75
|
|