@itfin/components 2.0.4 → 2.0.6
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
|
@@ -45,6 +45,7 @@ class itfApp extends Vue {
|
|
|
45
45
|
if (typeof document === 'undefined') {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
+
console.trace();
|
|
48
49
|
return Message.error({
|
|
49
50
|
isCollapsed: false,
|
|
50
51
|
showClose: true,
|
|
@@ -74,6 +75,7 @@ class itfApp extends Vue {
|
|
|
74
75
|
try {
|
|
75
76
|
await func();
|
|
76
77
|
} catch (err) {
|
|
78
|
+
console.error(err);
|
|
77
79
|
this.showError(err.message);
|
|
78
80
|
if (errFunc) {
|
|
79
81
|
errFunc(err);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
:i="item.i"
|
|
25
25
|
:key="item.i">
|
|
26
26
|
<bento-card :enabled="enabled" @resize="(e) => onResize(item, e)" :w="item.w" :h="item.h">
|
|
27
|
-
<slot name="cell" :item="item" :index="item.i"></slot>
|
|
27
|
+
<slot name="cell" :item="item" :index="item.i" :component="getComponent(item.i)"></slot>
|
|
28
28
|
</bento-card>
|
|
29
29
|
</grid-item>
|
|
30
30
|
</grid-layout>
|
|
@@ -56,6 +56,7 @@ export default @Component({
|
|
|
56
56
|
})
|
|
57
57
|
class itfBentoGrid extends Vue {
|
|
58
58
|
@Prop() layout;
|
|
59
|
+
@Prop() components;
|
|
59
60
|
@Prop({ type: Boolean, default: true }) enabled;
|
|
60
61
|
|
|
61
62
|
onResize(item, [w, h]) {
|
|
@@ -69,11 +70,12 @@ class itfBentoGrid extends Vue {
|
|
|
69
70
|
this.$emit('update:layout', newLayout);
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
getComponent(id) {
|
|
74
|
+
return this.components[id] ?? null;
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
onUpdateLayout(layout) {
|
|
73
|
-
this.$emit('update:layout', layout
|
|
74
|
-
...l,
|
|
75
|
-
component: this.layout.find((i) => i.i === l.i).component
|
|
76
|
-
})));
|
|
78
|
+
this.$emit('update:layout', layout);
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0003 15.8337C13.222 15.8337 15.8337 13.222 15.8337 10.0003C15.8337 6.77866 13.222 4.16699 10.0003 4.16699C6.77866 4.16699 4.16699 6.77866 4.16699 10.0003C4.16699 13.222 6.77866 15.8337 10.0003 15.8337ZM7.91697 10.0003C7.91697 8.84973 8.84971 7.91699 10.0003 7.91699C11.1509 7.91699 12.0836 8.84973 12.0836 10.0003C12.0836 11.1509 11.1509 12.0837 10.0003 12.0837C8.84971 12.0837 7.91697 11.1509 7.91697 10.0003ZM10.0003 6.25032C7.92924 6.25032 6.25031 7.92925 6.25031 10.0003C6.25031 12.0714 7.92924 13.7503 10.0003 13.7503C12.0714 13.7503 13.7503 12.0714 13.7503 10.0003C13.7503 7.92925 12.0714 6.25032 10.0003 6.25032Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg" name="repeat" class="block" data-toggle="tooltip" ui-jq="tooltip" ui-options="{ 'container': 'body' }" title="" data-original-title="Повторяющаяся операция"><path d="M13.125 1.6875V3.9375H2.25001V9.9375H3.75001V5.4375H13.125V7.6875L16.125 4.6875L13.125 1.6875ZM14.25 8.625V13.125H4.875V10.875L1.875 13.875L4.875 16.875V14.625H15.75V8.625L14.25 8.625Z" fill="inherit"></path></svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="10.0003" cy="7.08333" r="2.08333" fill="currentColor"/>
|
|
3
|
+
<path d="M6.62838 15C5.80763 15 5.39726 15 5.1452 14.65C4.89314 14.3 5.00241 13.988 5.22095 13.364C5.25366 13.2706 5.2892 13.1781 5.32754 13.0866C5.5817 12.48 5.95423 11.9288 6.42386 11.4645C6.89348 11.0002 7.45101 10.6319 8.06461 10.3806C8.6782 10.1293 9.33585 10 10 10C10.6642 10 11.3218 10.1293 11.9354 10.3806C12.549 10.6319 13.1065 11.0002 13.5761 11.4645C14.0458 11.9288 14.4183 12.48 14.6725 13.0866C14.7108 13.1781 14.7463 13.2706 14.779 13.364C14.9976 13.988 15.1069 14.3 14.8548 14.65C14.6027 15 14.1924 15 13.3716 15L6.62838 15Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|