@appscode/design-system 1.0.43-alpha.13 → 1.0.43-alpha.132
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/base/utilities/_default.scss +283 -21
- package/base/utilities/_derived-variables.scss +0 -13
- package/base/utilities/_initial-variables.scss +78 -56
- package/base/utilities/_mixin.scss +10 -17
- package/base/utilities/_typography.scss +23 -7
- package/base/utilities/dark-theme.scss +25 -0
- package/components/_ac-accordion.scss +1 -0
- package/components/_ac-alert-box.scss +18 -10
- package/components/_ac-card.scss +55 -20
- package/components/_ac-code-highlight.scss +7 -1
- package/components/_ac-content-layout.scss +4 -4
- package/components/_ac-drag.scss +6 -6
- package/components/_ac-input.scss +74 -40
- package/components/_ac-modal.scss +5 -4
- package/components/_ac-multi-select.scss +195 -13
- package/components/_ac-options.scss +31 -16
- package/components/_ac-select-box.scss +15 -5
- package/components/_ac-table.scss +42 -36
- package/components/_ac-tabs.scss +72 -23
- package/components/_ac-tags.scss +2 -2
- package/components/_ac-terminal.scss +272 -0
- package/components/_app-drawer.scss +6 -6
- package/components/_breadcumb.scss +7 -2
- package/components/_buttons.scss +60 -27
- package/components/_card-body-wrapper.scss +3 -3
- package/components/_dashboard-header.scss +33 -1
- package/components/_direct-deploy.scss +69 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_graph.scss +45 -0
- package/components/_image-upload.scss +6 -4
- package/components/_left-sidebar-menu.scss +200 -46
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +129 -26
- package/components/_overview-info.scss +4 -4
- package/components/_overview-page.scss +1 -2
- package/components/_pagination.scss +10 -2
- package/components/_payment-card.scss +28 -12
- package/components/_preview-modal.scss +19 -8
- package/components/_pricing-table.scss +1 -1
- package/components/_progress-bar.scss +5 -5
- package/components/_subscription-card.scss +15 -8
- package/components/_table-of-content.scss +1 -1
- package/components/_tfa.scss +69 -0
- package/components/_transitions.scss +261 -0
- package/components/_widget-menu.scss +9 -9
- package/components/_wizard.scss +31 -19
- package/components/ac-toaster/_ac-toasted.scss +5 -5
- package/components/bbum/_card-team.scss +18 -10
- package/components/bbum/_information-center.scss +17 -3
- package/components/bbum/_mobile-desktop.scss +6 -6
- package/components/bbum/_post.scss +5 -4
- package/components/bbum/_sign-up-notification.scss +6 -6
- package/components/bbum/_single-post-preview.scss +9 -9
- package/components/bbum/_user-profile.scss +97 -90
- package/components/ui-builder/_ui-builder.scss +29 -10
- package/components/ui-builder/_vue-open-api.scss +98 -0
- package/layouts/_404.scss +2 -1
- package/layouts/_code-preview.scss +14 -7
- package/main.scss +4 -0
- package/package.json +2 -7
- package/plugins/theme.js +130 -128
- package/vue-components/v2/banner/Banner.vue +2 -2
- package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
- package/vue-components/v2/button/Button.vue +5 -0
- package/vue-components/v2/button/DownloadBtn.vue +45 -0
- package/vue-components/v2/card/PaymentCards.vue +11 -2
- package/vue-components/v2/content/ContentTable.vue +12 -7
- package/vue-components/v2/editor/Editor.vue +29 -1
- package/vue-components/v2/editor/FilteredFileEditor.vue +153 -0
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +196 -0
- package/vue-components/v2/loaders/ResourceLoader.vue +90 -0
- package/vue-components/v2/loaders/SidebarLoader.vue +32 -0
- package/vue-components/v2/modal/Modal.vue +33 -12
- package/vue-components/v2/modals/DeleteConfirmationModal.vue +77 -0
- package/vue-components/v2/modals/JsonShowModal.vue +12 -2
- package/vue-components/v2/navbar/Appdrawer.vue +10 -9
- package/vue-components/v2/navbar/ThemeMode.vue +120 -0
- package/vue-components/v2/navbar/User.vue +154 -12
- package/vue-components/v2/preloader/Preloader.vue +5 -5
- package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
- package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
- package/vue-components/v2/table/Table.vue +43 -8
- package/vue-components/v2/table/TableRow.vue +17 -8
- package/vue-components/v2/table/table-cell/CellValue.vue +31 -4
- package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
- package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
- package/vue-components/v2/tabs/EditorTabs.vue +1 -1
- package/vue-components/v3/button/Button.vue +5 -0
- package/vue-components/v3/dropdown/DropdownMenu.vue +1 -1
- package/vue-components/v3/editor/Editor.vue +32 -11
- package/vue-components/v3/modal/Modal.vue +10 -1
- package/vue-components/v3/modals/JsonShowModal.vue +13 -4
- package/vue-components/v3/navbar/Appdrawer.vue +12 -7
- package/vue-components/v3/navbar/ThemeMode.vue +128 -0
- package/vue-components/v3/navbar/User.vue +154 -12
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
- package/vue-components/v3/table/Table.vue +27 -5
- package/vue-components/v3/table/TableRow.vue +1 -1
- package/vue-components/v3/table/table-cell/CellValue.vue +26 -3
- package/vue-components/v3/table/table-cell/GenericCell.vue +62 -0
- package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -1
- package/vue-components/v3/tabs/EditorTabs.vue +1 -1
package/plugins/theme.js
CHANGED
|
@@ -1,140 +1,142 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
l /= 100;
|
|
1
|
+
export function HSLToHex(h, s, l) {
|
|
2
|
+
s /= 100;
|
|
3
|
+
l /= 100;
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const c = (1 - Math.abs(2 * l - 1)) * s,
|
|
6
|
+
x = c * (1 - Math.abs(((h / 60) % 2) - 1)),
|
|
7
|
+
m = l - c / 2;
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
let r = 0,
|
|
10
|
+
g = 0,
|
|
11
|
+
b = 0;
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
if (0 <= h && h < 60) {
|
|
14
|
+
r = c;
|
|
15
|
+
g = x;
|
|
16
|
+
b = 0;
|
|
17
|
+
} else if (60 <= h && h < 120) {
|
|
18
|
+
r = x;
|
|
19
|
+
g = c;
|
|
20
|
+
b = 0;
|
|
21
|
+
} else if (120 <= h && h < 180) {
|
|
22
|
+
r = 0;
|
|
23
|
+
g = c;
|
|
24
|
+
b = x;
|
|
25
|
+
} else if (180 <= h && h < 240) {
|
|
26
|
+
r = 0;
|
|
27
|
+
g = x;
|
|
28
|
+
b = c;
|
|
29
|
+
} else if (240 <= h && h < 300) {
|
|
30
|
+
r = x;
|
|
31
|
+
g = 0;
|
|
32
|
+
b = c;
|
|
33
|
+
} else if (300 <= h && h < 360) {
|
|
34
|
+
r = c;
|
|
35
|
+
g = 0;
|
|
36
|
+
b = x;
|
|
37
|
+
}
|
|
38
|
+
// Having obtained RGB, convert channels to hex
|
|
39
|
+
r = Math.round((r + m) * 255).toString(16);
|
|
40
|
+
g = Math.round((g + m) * 255).toString(16);
|
|
41
|
+
b = Math.round((b + m) * 255).toString(16);
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
// Prepend 0s, if necessary
|
|
44
|
+
if (r.length == 1) r = "0" + r;
|
|
45
|
+
if (g.length == 1) g = "0" + g;
|
|
46
|
+
if (b.length == 1) b = "0" + b;
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
48
|
+
return "#" + r + g + b;
|
|
49
|
+
}
|
|
50
|
+
export function HexToHSL(H) {
|
|
51
|
+
// Convert hex to RGB first
|
|
52
|
+
let r = 0,
|
|
53
|
+
g = 0,
|
|
54
|
+
b = 0;
|
|
55
|
+
if (H.length == 4) {
|
|
56
|
+
r = parseInt("0x" + H[1] + H[1]);
|
|
57
|
+
g = parseInt("0x" + H[2] + H[2]);
|
|
58
|
+
b = parseInt("0x" + H[3] + H[3]);
|
|
59
|
+
} else if (H.length == 7) {
|
|
60
|
+
r = parseInt("0x" + H[1] + H[2]);
|
|
61
|
+
g = parseInt("0x" + H[3] + H[4]);
|
|
62
|
+
b = parseInt("0x" + H[5] + H[6]);
|
|
63
|
+
}
|
|
64
|
+
// Then to HSL
|
|
65
|
+
r /= 255;
|
|
66
|
+
g /= 255;
|
|
67
|
+
b /= 255;
|
|
68
|
+
const cmin = Math.min(r, g, b),
|
|
69
|
+
cmax = Math.max(r, g, b),
|
|
70
|
+
delta = cmax - cmin;
|
|
71
|
+
let h = 0,
|
|
72
|
+
s = 0,
|
|
73
|
+
l = 0;
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
if (delta == 0) h = 0;
|
|
76
|
+
else if (cmax == r) h = ((g - b) / delta) % 6;
|
|
77
|
+
else if (cmax == g) h = (b - r) / delta + 2;
|
|
78
|
+
else h = (r - g) / delta + 4;
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
h = Math.round(h * 60);
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
if (h < 0) h += 360;
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
l = (cmax + cmin) / 2;
|
|
85
|
+
s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
86
|
+
s = +(s * 100).toFixed(1);
|
|
87
|
+
l = +(l * 100).toFixed(1);
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
89
|
+
return {
|
|
90
|
+
hue: `${h}`,
|
|
91
|
+
saturation: `${s}%`,
|
|
92
|
+
lightness: `${l}%`,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export function getThemeHSL() {
|
|
96
|
+
const hue = getComputedStyle(document.documentElement).getPropertyValue(
|
|
97
|
+
"--hsl-hue"
|
|
98
|
+
);
|
|
99
|
+
const saturation = getComputedStyle(
|
|
100
|
+
document.documentElement
|
|
101
|
+
).getPropertyValue("--hsl-saturation");
|
|
102
|
+
const lightness = getComputedStyle(
|
|
103
|
+
document.documentElement
|
|
104
|
+
).getPropertyValue("--hsl-lightness");
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
106
|
+
return {
|
|
107
|
+
hue,
|
|
108
|
+
saturation,
|
|
109
|
+
lightness,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export function setThemeHSL(h, s, l) {
|
|
113
|
+
document.documentElement.style.setProperty("--hsl-hue", h);
|
|
114
|
+
document.documentElement.style.setProperty("--hsl-saturation", s);
|
|
115
|
+
document.documentElement.style.setProperty("--hsl-lightness", l);
|
|
116
|
+
}
|
|
117
|
+
export function setFontHSL(h, s, l) {
|
|
118
|
+
document.documentElement.style.setProperty("--font-hsl-hue", h);
|
|
119
|
+
document.documentElement.style.setProperty("--font-hsl-saturation", s);
|
|
120
|
+
document.documentElement.style.setProperty("--font-hsl-lightness", l);
|
|
121
|
+
}
|
|
122
|
+
export function getFontHSL() {
|
|
123
|
+
const hue = getComputedStyle(document.documentElement).getPropertyValue(
|
|
124
|
+
"--font-hsl-hue"
|
|
125
|
+
);
|
|
126
|
+
const saturation = getComputedStyle(
|
|
127
|
+
document.documentElement
|
|
128
|
+
).getPropertyValue("--font-hsl-saturation");
|
|
129
|
+
const lightness = getComputedStyle(
|
|
130
|
+
document.documentElement
|
|
131
|
+
).getPropertyValue("--font-hsl-lightness");
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
return {
|
|
134
|
+
hue,
|
|
135
|
+
saturation,
|
|
136
|
+
lightness,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export const loaderLightThemePrimaryColor = "#f5f7f9";
|
|
140
|
+
export const loaderDarkThemePrimaryColor = "#2e323c";
|
|
141
|
+
export const loaderLightThemeSecondaryColor = "#ecebeb";
|
|
142
|
+
export const loaderDarkThemeSecondaryColor = "#21272e";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="sign-up-notification mb-20">
|
|
3
3
|
<div class="notification-inner has-text-centered">
|
|
4
|
-
<h3><slot name="banner-title"
|
|
5
|
-
<slot
|
|
4
|
+
<h3><slot name="banner-title">Error!</slot></h3>
|
|
5
|
+
<slot><p>Oops!! There was an error while loading!</p></slot>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ac-breadcrumb">
|
|
3
|
+
<nav aria-label="breadcrumbs" class="breadcrumb">
|
|
4
|
+
<ul>
|
|
5
|
+
<li
|
|
6
|
+
v-for="(item, idx) in list"
|
|
7
|
+
:key="idx"
|
|
8
|
+
:class="{ 'is-active': idx === list.length - 1 }"
|
|
9
|
+
>
|
|
10
|
+
<router-link
|
|
11
|
+
class="router-link-active"
|
|
12
|
+
:class="{ 'is-active': idx === list.length - 1 }"
|
|
13
|
+
:to="item.path"
|
|
14
|
+
>{{ item.name }}
|
|
15
|
+
</router-link>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</nav>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
list: []
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
createBreadcrumbs(n) {
|
|
30
|
+
//Adding dynamic path to the route
|
|
31
|
+
const listPaths = this.$route.matched.map(element =>
|
|
32
|
+
this.pathReplaceWithParam(element.path)
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
//Removing the last duplicate value from the listpaths array
|
|
36
|
+
listPaths.pop();
|
|
37
|
+
|
|
38
|
+
//Createing the breadcrumb name
|
|
39
|
+
const listName = this.createList(listPaths);
|
|
40
|
+
|
|
41
|
+
//Set the new breadcrumb name and path value to list
|
|
42
|
+
this.list = listName.map((element, index) => {
|
|
43
|
+
return {
|
|
44
|
+
name: element,
|
|
45
|
+
path: listPaths[index]
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
pathReplaceWithParam(path) {
|
|
50
|
+
//Split the path and remove the first and last empty block
|
|
51
|
+
let splitPath = path.split("/").filter(element => element !== "");
|
|
52
|
+
|
|
53
|
+
//Replace all element with query params where the element start with ":"
|
|
54
|
+
// Then again add them wthi "/" and return the path value
|
|
55
|
+
return splitPath.reduce((pval, cval) => {
|
|
56
|
+
if (cval[0] === ":") {
|
|
57
|
+
const cutIndex =
|
|
58
|
+
cval.indexOf("?") !== -1 ? cval.indexOf("?") : cval.length;
|
|
59
|
+
return (pval += this.$route.params[cval.slice(1, cutIndex)] + "/");
|
|
60
|
+
} else return (pval += cval + "/");
|
|
61
|
+
}, "/");
|
|
62
|
+
},
|
|
63
|
+
createList(paths) {
|
|
64
|
+
//Split all the path and remove all empty block
|
|
65
|
+
let spath = paths.map(element => {
|
|
66
|
+
return element.split("/").filter(word => word !== "");
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Convert all the path arry in one arry where each element is the different fo previous element
|
|
70
|
+
return spath.reduce((prev, curr, currentIdx) => {
|
|
71
|
+
if (currentIdx === 0) return prev.concat([this.createVal(0, curr)]);
|
|
72
|
+
else
|
|
73
|
+
return prev.concat([
|
|
74
|
+
this.createVal(spath[currentIdx - 1].length, curr)
|
|
75
|
+
]);
|
|
76
|
+
}, []);
|
|
77
|
+
},
|
|
78
|
+
createVal(startIdx, paths) {
|
|
79
|
+
return paths.reduce((prev, curr, idx) => {
|
|
80
|
+
if (idx >= startIdx) {
|
|
81
|
+
if (idx + 1 === paths.length) return (prev += curr);
|
|
82
|
+
else return (prev += curr + " / ");
|
|
83
|
+
} else return prev + "";
|
|
84
|
+
}, "");
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
"$route.path": {
|
|
89
|
+
deep: true,
|
|
90
|
+
immediate: true,
|
|
91
|
+
handler(n) {
|
|
92
|
+
this.createBreadcrumbs(n);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
</script>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:class="`${modifierClasses}${isLoaderActive ? ' is-loading' : ''}`"
|
|
5
5
|
:disabled="disabled"
|
|
6
6
|
@click="handleClick"
|
|
7
|
+
:title="tooltip"
|
|
7
8
|
>
|
|
8
9
|
<span v-if="iconClass || iconImage" class="icon is-small">
|
|
9
10
|
<img
|
|
@@ -27,6 +28,10 @@ export default {
|
|
|
27
28
|
type: String,
|
|
28
29
|
default: "",
|
|
29
30
|
},
|
|
31
|
+
tooltip: {
|
|
32
|
+
type: String,
|
|
33
|
+
defualt: undefined
|
|
34
|
+
},
|
|
30
35
|
// for loader
|
|
31
36
|
isLoaderActive: {
|
|
32
37
|
type: Boolean,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ac-button
|
|
3
|
+
modifier-classes="is-primary is-square"
|
|
4
|
+
icon-class="download"
|
|
5
|
+
:is-loader-active="isFetching"
|
|
6
|
+
@click="download()"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import downloadFunc from "downloadjs";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
components: {
|
|
15
|
+
AcButton: () => import("./../button/Button.vue")
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
fileData: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
fileName: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
isFetching: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
downloadIcon: "fa fa-cloud-download"
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
component: {
|
|
37
|
+
downloadFunc
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
download() {
|
|
41
|
+
downloadFunc(this.fileData, this.fileName);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<content-loader
|
|
6
6
|
:height="235"
|
|
7
7
|
:speed="2"
|
|
8
|
-
:
|
|
9
|
-
:
|
|
8
|
+
:primaryColor="primaryColor"
|
|
9
|
+
:secondaryColor="secondaryColor"
|
|
10
10
|
/>
|
|
11
11
|
</div>
|
|
12
12
|
<!-- loader end -->
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
<script>
|
|
22
22
|
import { ContentLoader } from "vue-content-loader";
|
|
23
|
+
import {loaderLightThemePrimaryColor, loaderDarkThemePrimaryColor, loaderLightThemeSecondaryColor, loaderDarkThemeSecondaryColor} from "@appscode/design-system/plugins/theme";
|
|
23
24
|
|
|
24
25
|
export default {
|
|
25
26
|
components: {
|
|
@@ -31,5 +32,13 @@ export default {
|
|
|
31
32
|
default: false,
|
|
32
33
|
},
|
|
33
34
|
},
|
|
35
|
+
computed: {
|
|
36
|
+
primaryColor() {
|
|
37
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemePrimaryColor : loaderLightThemePrimaryColor;
|
|
38
|
+
},
|
|
39
|
+
secondaryColor() {
|
|
40
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemeSecondaryColor : loaderLightThemeSecondaryColor;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
34
43
|
};
|
|
35
44
|
</script>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<content-layout>
|
|
3
3
|
<template #content-header>
|
|
4
4
|
<content-header
|
|
5
|
+
v-if="!hideHeader"
|
|
5
6
|
:header-title="tableTitle"
|
|
6
7
|
:header-sub-title="tableSubTitle"
|
|
7
8
|
:class="{ 'pl-0 pr-0': removeTableHeaderPadding }"
|
|
@@ -21,32 +22,36 @@ export default {
|
|
|
21
22
|
props: {
|
|
22
23
|
removeTableHeaderPadding: {
|
|
23
24
|
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
+
default: false
|
|
25
26
|
},
|
|
26
27
|
tableTitle: {
|
|
27
28
|
type: String,
|
|
28
|
-
default: "Table"
|
|
29
|
+
default: "Table"
|
|
29
30
|
},
|
|
30
31
|
tableSubTitle: {
|
|
31
32
|
type: String,
|
|
32
|
-
default: ""
|
|
33
|
+
default: ""
|
|
33
34
|
},
|
|
34
35
|
searchable: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: true
|
|
37
|
+
default: true
|
|
37
38
|
},
|
|
39
|
+
hideHeader: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
}
|
|
38
43
|
},
|
|
39
44
|
components: {
|
|
40
45
|
ContentLayout: () => import("./ContentLayout.vue"),
|
|
41
46
|
ContentHeader: () => import("./ContentHeader.vue"),
|
|
42
47
|
HeaderItem: () => import("../header/HeaderItem.vue"),
|
|
43
|
-
SearchBar: () => import("../searchbars/SearchBar.vue")
|
|
48
|
+
SearchBar: () => import("../searchbars/SearchBar.vue")
|
|
44
49
|
},
|
|
45
50
|
|
|
46
51
|
data() {
|
|
47
52
|
return {
|
|
48
|
-
searchText: ""
|
|
53
|
+
searchText: ""
|
|
49
54
|
};
|
|
50
|
-
}
|
|
55
|
+
}
|
|
51
56
|
};
|
|
52
57
|
</script>
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
minimap: {
|
|
18
18
|
enabled: calcShowMinimap,
|
|
19
19
|
},
|
|
20
|
+
theme: theme,
|
|
20
21
|
readOnly: readOnly,
|
|
22
|
+
wordWrap: wordWrap,
|
|
21
23
|
scrollBeyondLastLine: false,
|
|
22
24
|
}"
|
|
23
25
|
/>
|
|
@@ -31,7 +33,9 @@
|
|
|
31
33
|
minimap: {
|
|
32
34
|
enabled: calcShowMinimap,
|
|
33
35
|
},
|
|
36
|
+
theme: theme,
|
|
34
37
|
readOnly: true,
|
|
38
|
+
wordWrap: wordWrap,
|
|
35
39
|
scrollBeyondLastLine: false,
|
|
36
40
|
}"
|
|
37
41
|
:original="originalEditorContent"
|
|
@@ -41,6 +45,8 @@
|
|
|
41
45
|
</template>
|
|
42
46
|
|
|
43
47
|
<script>
|
|
48
|
+
import Preloader from "../preloader/Preloader.vue";
|
|
49
|
+
import Banner from "../banner/Banner.vue";
|
|
44
50
|
export default {
|
|
45
51
|
props: {
|
|
46
52
|
value: {
|
|
@@ -67,10 +73,24 @@ export default {
|
|
|
67
73
|
type: Number,
|
|
68
74
|
default: 40,
|
|
69
75
|
},
|
|
76
|
+
editorTheme: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "",
|
|
79
|
+
},
|
|
80
|
+
wordWrap: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "off",
|
|
83
|
+
},
|
|
70
84
|
},
|
|
71
85
|
components: {
|
|
72
86
|
EditorTabs: () => import("../tabs/EditorTabs.vue"),
|
|
73
|
-
MonacoEditor: () =>
|
|
87
|
+
MonacoEditor: () => ({
|
|
88
|
+
component: import("vue-monaco"),
|
|
89
|
+
loading: Preloader,
|
|
90
|
+
delay: 200,
|
|
91
|
+
error: Banner,
|
|
92
|
+
timeout: 20000,
|
|
93
|
+
}),
|
|
74
94
|
},
|
|
75
95
|
|
|
76
96
|
data() {
|
|
@@ -86,6 +106,14 @@ export default {
|
|
|
86
106
|
const noOfLines = this.editorContent.split("\n").length;
|
|
87
107
|
return this.showMinimap && noOfLines * 2 > this.editorHeight;
|
|
88
108
|
},
|
|
109
|
+
theme() {
|
|
110
|
+
return (
|
|
111
|
+
this.editorTheme ||
|
|
112
|
+
(document.documentElement.classList.contains("is-dark-theme")
|
|
113
|
+
? "vs-dark"
|
|
114
|
+
: "vs")
|
|
115
|
+
);
|
|
116
|
+
},
|
|
89
117
|
},
|
|
90
118
|
|
|
91
119
|
watch: {
|