@itfin/components 1.5.0 → 1.5.1
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 +1 -1
- package/src/assets/scss/_css_variables.scss +7 -2
- package/src/assets/scss/_dark-theme.scss +12 -2
- package/src/assets/scss/_variables.scss +9 -34
- package/src/assets/scss/components/_button.scss +10 -29
- package/src/assets/scss/components/_checkbox.scss +0 -9
- package/src/assets/scss/components/_datepicker.scss +3 -3
- package/src/assets/scss/components/_pagination.scss +1 -4
- package/src/assets/scss/components/_popover.scss +0 -22
- package/src/assets/scss/components/_segmeneted-control.scss +8 -19
- package/src/assets/scss/components/_select.scss +8 -6
- package/src/assets/scss/components/_text-field.scss +7 -9
- package/src/assets/scss/components/select/_dropdown-menu.scss +0 -1
- package/src/assets/scss/components/select/_dropdown-toggle.scss +1 -0
- package/src/assets/scss/directives/tooltip.scss +5 -10
- package/src/assets/scss/main.scss +0 -48
- package/src/components/editor/plugins.js +1012 -0
- package/src/components/icon/components/nomi-budget.vue +4 -0
- package/src/components/icon/components/nomi-delta.vue +7 -0
- package/src/components/icon/new-icons/delta.svg +6 -0
- package/src/components/panels/PanelList.vue +3 -2
- package/src/components/panels/helpers.ts +14 -4
- package/src/components/view/View.vue +8 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.0059 9.66699L18.0273 12.0977C18.3384 12.4736 18.5786 12.8947 18.7471 13.3613C18.9155 13.8279 19 14.3073 19 14.7998C19 15.9799 18.5919 16.9753 17.7754 17.7852C16.9587 18.5951 15.9665 19 14.7998 19H9.2002C8.02113 19.0005 7.02625 18.5955 6.21582 17.7852C5.40538 16.9747 5 15.9794 5 14.7998C5.00002 14.3073 5.08447 13.8279 5.25293 13.3613C5.42144 12.8947 5.66156 12.4736 5.97266 12.0977L7.99414 9.66699H16.0059ZM12 12C11.5733 12.001 11.2068 12.1532 10.9014 12.457C10.596 12.7609 10.4438 13.1274 10.4443 13.5557C10.4449 13.9838 10.5972 14.35 10.9014 14.6543C11.2057 14.9587 11.5722 15.1113 12 15.1113C12.4298 15.1134 12.7958 14.9607 13.0986 14.6543C13.4014 14.3479 13.5541 13.9818 13.5557 13.5557C13.5572 13.1294 13.4046 12.763 13.0986 12.457C12.7928 12.1513 12.4266 11.999 12 12ZM15.8887 5C16.1863 5 16.4102 5.12292 16.5596 5.36914C16.7089 5.61544 16.7185 5.86867 16.5889 6.12793L15.5977 8.11133H8.40234L7.41113 6.12793C7.28202 5.86867 7.29161 5.61544 7.44043 5.36914C7.58924 5.12292 7.81323 5 8.11133 5H15.8887Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
4
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template><svg width="24" height="24" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path stroke-width="1.5"
|
|
3
|
+
stroke="currentColor" d="M8.00016 5.17996L12.2602 12H3.74016L8.00016 5.17996Z"
|
|
4
|
+
fill="none"
|
|
5
|
+
fill-opacity="currentColor"></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -222,6 +222,7 @@ export default class PanelList extends Vue {
|
|
|
222
222
|
@Prop() panels: Record<string, Component>;
|
|
223
223
|
@Prop({ default: () => {} }) searchPanel: (type: string) => boolean;
|
|
224
224
|
@Prop({ type: String, default: 'path' }) routeType: string;
|
|
225
|
+
@Prop({ type: String, default: '' }) routePrefix: string;
|
|
225
226
|
|
|
226
227
|
panelsStack:IPanel[] = [];
|
|
227
228
|
|
|
@@ -503,7 +504,7 @@ export default class PanelList extends Vue {
|
|
|
503
504
|
}
|
|
504
505
|
|
|
505
506
|
setPanelHash() {
|
|
506
|
-
const hash = stackToHash(this.panelsStack, this.
|
|
507
|
+
const hash = stackToHash(this.panelsStack, this.routePrefix).replace(/^#/, '');
|
|
507
508
|
if (this.routeType === 'path') {
|
|
508
509
|
this.$router.push({ path: `${hash}` });
|
|
509
510
|
} else {
|
|
@@ -515,7 +516,7 @@ export default class PanelList extends Vue {
|
|
|
515
516
|
async parsePanelHash() {
|
|
516
517
|
const hash = this.routeType === 'path' ? location.pathname : location.hash;
|
|
517
518
|
if (hash) {
|
|
518
|
-
const panels = hashToStack(hash, this.
|
|
519
|
+
const panels = hashToStack(hash, this.routePrefix);
|
|
519
520
|
const newStack = [];
|
|
520
521
|
this.panelsStack = [];
|
|
521
522
|
for (const panelIndex in panels) {
|
|
@@ -10,19 +10,29 @@ export interface IPanel {
|
|
|
10
10
|
const COLLAPSE_SYMBOL = '~'
|
|
11
11
|
const PARAMS_SYMBOL = ';'
|
|
12
12
|
|
|
13
|
-
export function stackToHash(stack: IPanel[]) {
|
|
13
|
+
export function stackToHash(stack: IPanel[], routePrefix: string = '') {
|
|
14
14
|
const hash = stack.map(panel => {
|
|
15
15
|
let json = JSON5.stringify(panel.payload || {});
|
|
16
16
|
json = json.substring(1, json.length - 1); // Remove the outer {}
|
|
17
17
|
return `${panel.type}${panel.isCollapsed ? COLLAPSE_SYMBOL : ''}${json ? PARAMS_SYMBOL : ''}${json}`;
|
|
18
18
|
}).join(isPathType() ? '/' : '&');
|
|
19
|
-
|
|
19
|
+
let url = hash;
|
|
20
|
+
if (routePrefix) {
|
|
21
|
+
url = `${routePrefix}/` + url;
|
|
22
|
+
}
|
|
23
|
+
return isPathType() ? `/${url}` : `#${url}`;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
|
|
23
|
-
export function hashToStack(hash: string|undefined): IPanel[] {
|
|
27
|
+
export function hashToStack(hash: string|undefined, routePrefix: string = ''): IPanel[] {
|
|
24
28
|
let stack:IPanel[] = [];
|
|
25
|
-
|
|
29
|
+
let str = hash.replace(isPathType() ? /^\// : /^#/, '');
|
|
30
|
+
if (routePrefix) {
|
|
31
|
+
const prefix = isPathType() ? `${routePrefix}/` : `${routePrefix}`;
|
|
32
|
+
if (str.startsWith(prefix)) {
|
|
33
|
+
str = str.substring(prefix.length);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
26
36
|
if (str) {
|
|
27
37
|
stack = str.split(isPathType() ? '/' : '&').map(item => {
|
|
28
38
|
if (!item.includes(PARAMS_SYMBOL)) {
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
column-resizing
|
|
58
58
|
:indicator-type="indicatorType"
|
|
59
59
|
class="permanent-checkboxes"
|
|
60
|
+
divider-property="hasDivider"
|
|
61
|
+
subrows-property="children"
|
|
60
62
|
:state-name="stateName"
|
|
61
63
|
id-property="id"
|
|
62
64
|
:rows="preparedItems"
|
|
@@ -64,6 +66,7 @@
|
|
|
64
66
|
:sorting="sorting"
|
|
65
67
|
:active="activeIds"
|
|
66
68
|
:show-actions="showActions"
|
|
69
|
+
:expanded-ids.sync="expandedIds"
|
|
67
70
|
v-model="selectedIds"
|
|
68
71
|
@row-click="$emit('open', $event)"
|
|
69
72
|
@update:sorting="updateSorting($event)"
|
|
@@ -150,6 +153,7 @@ class itfView extends Vue {
|
|
|
150
153
|
filter = {};
|
|
151
154
|
loadingData = false;
|
|
152
155
|
activeIds = [];
|
|
156
|
+
expandedIds = [];
|
|
153
157
|
|
|
154
158
|
get preparedItems() {
|
|
155
159
|
const disabledIdsSet = new Set(this.disabledIds);
|
|
@@ -199,6 +203,10 @@ class itfView extends Vue {
|
|
|
199
203
|
this.page = res.meta.page;
|
|
200
204
|
this.total = res.meta.total;
|
|
201
205
|
this.size = res.meta.size;
|
|
206
|
+
if (res.columns) {
|
|
207
|
+
this.$emit('columns-loaded', res.columns);
|
|
208
|
+
}
|
|
209
|
+
|
|
202
210
|
this.$emit('update:items', this.items);
|
|
203
211
|
this.loadingData = false;
|
|
204
212
|
}, () => {
|