@appscode/design-system 1.0.43-alpha.19 → 1.0.43-alpha.190
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/_all.scss +6 -0
- package/base/utilities/_default.scss +269 -4
- package/base/utilities/_derived-variables.scss +0 -1
- package/base/utilities/_initial-variables.scss +17 -13
- package/base/utilities/_mixin.scss +1 -17
- package/base/utilities/_typography.scss +14 -4
- package/base/utilities/dark-theme.scss +9 -146
- package/components/_ac-accordion.scss +8 -4
- package/components/_ac-alert-box.scss +15 -7
- package/components/_ac-card.scss +33 -6
- package/components/_ac-code-highlight.scss +5 -1
- package/components/_ac-content-layout.scss +2 -2
- package/components/_ac-input.scss +63 -23
- package/components/_ac-multi-select.scss +187 -5
- package/components/_ac-options.scss +24 -9
- package/components/_ac-select-box.scss +13 -3
- package/components/_ac-table.scss +7 -5
- package/components/_ac-tabs.scss +42 -5
- package/components/_ac-terminal.scss +270 -0
- package/components/_all.scss +35 -0
- package/components/_app-drawer.scss +2 -2
- package/components/_breadcumb.scss +2 -0
- package/components/_buttons.scss +45 -36
- package/components/_card-body-wrapper.scss +2 -2
- package/components/_dashboard-header.scss +32 -0
- 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 +5 -3
- package/components/_left-sidebar-menu.scss +193 -39
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +125 -8
- package/components/_overview-info.scss +4 -4
- package/components/_pagination.scss +8 -0
- package/components/_payment-card.scss +10 -1
- package/components/_preview-modal.scss +15 -4
- package/components/_pricing-table.scss +1 -1
- package/components/_progress-bar.scss +4 -4
- package/components/_subscription-card.scss +12 -5
- package/components/_table-of-content.scss +1 -1
- package/components/_tfa.scss +69 -0
- package/components/_transitions.scss +261 -0
- package/components/_wizard.scss +16 -3
- package/components/ac-toaster/_ac-toasted.scss +1 -1
- package/components/bbum/_card-team.scss +1 -1
- package/components/bbum/_information-center.scss +15 -1
- package/components/bbum/_sign-up-notification.scss +1 -1
- package/components/bbum/_single-post-preview.scss +1 -1
- package/components/bbum/_user-profile.scss +91 -90
- package/components/ui-builder/_ui-builder.scss +43 -3
- package/components/ui-builder/_vue-open-api.scss +104 -0
- package/layouts/_all.scss +2 -0
- package/layouts/_code-preview.scss +5 -2
- package/main.scss +4 -54
- package/package.json +2 -7
- package/plugins/theme.js +4 -0
- package/plugins/time-convert.js +49 -0
- package/plugins/vue-toaster.js +3 -0
- 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/Card.vue +1 -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 +38 -5
- package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
- package/vue-components/v2/editor/MonacoEditor.vue +125 -0
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
- package/vue-components/v2/form-fields/Input.vue +1 -1
- package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
- package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
- package/vue-components/v2/modal/Modal.vue +35 -4
- package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -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 +50 -44
- package/vue-components/v2/navbar/User.vue +202 -19
- package/vue-components/v2/notification/Notification.vue +101 -0
- package/vue-components/v2/notification/NotificationItem.vue +44 -0
- 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/tab/TabItem.vue +1 -1
- package/vue-components/v2/table/Table.vue +44 -8
- package/vue-components/v2/table/TableRow.vue +12 -2
- package/vue-components/v2/table/table-cell/CellValue.vue +33 -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/content/ContentTable.vue +5 -0
- package/vue-components/v3/editor/Editor.vue +50 -30
- package/vue-components/v3/editor/FilteredFileEditor.vue +184 -0
- package/vue-components/v3/editor/MonacoEditor.vue +131 -0
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
- package/vue-components/v3/form/Form.vue +63 -0
- package/vue-components/v3/form-fields/Input.vue +10 -10
- package/vue-components/v3/header/HeaderItem.vue +5 -0
- package/vue-components/v3/header/HeaderItems.vue +5 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
- package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
- package/vue-components/v3/modal/Modal.vue +40 -16
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +83 -0
- package/vue-components/v3/modals/JsonShowModal.vue +25 -16
- package/vue-components/v3/modals/LongRunningTasksModal.vue +337 -0
- package/vue-components/v3/navbar/Appdrawer.vue +12 -7
- package/vue-components/v3/navbar/ThemeMode.vue +49 -47
- package/vue-components/v3/navbar/User.vue +190 -16
- package/vue-components/v3/notification/Notification.vue +98 -0
- package/vue-components/v3/notification/NotificationItem.vue +52 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
- package/vue-components/v3/table/MultiInfoTable.vue +143 -0
- package/vue-components/v3/table/Table.vue +35 -12
- package/vue-components/v3/table/TableContainer.vue +34 -0
- package/vue-components/v3/table/TableRow.vue +10 -2
- 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/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
.key-value-save {
|
|
25
25
|
display: grid;
|
|
26
|
-
grid-template-columns: 1fr 1fr auto;
|
|
26
|
+
grid-template-columns: 1fr 1fr auto auto;
|
|
27
27
|
grid-gap: 15px;
|
|
28
28
|
}
|
|
29
29
|
.value-list-save {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
position: absolute;
|
|
62
62
|
content: "";
|
|
63
63
|
left: 27px;
|
|
64
|
-
top:
|
|
64
|
+
top: 10px;
|
|
65
65
|
width: 1px;
|
|
66
66
|
height: calc(100% - 20px);
|
|
67
67
|
border: 1px dashed $ac-white-light;
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
cursor: pointer;
|
|
102
102
|
background-color: $ac-white;
|
|
103
103
|
color: $ac-color-value;
|
|
104
|
+
&.is-disabled {
|
|
105
|
+
cursor: not-allowed;
|
|
106
|
+
}
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
}
|
|
@@ -109,6 +112,12 @@
|
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
|
|
115
|
+
.is-visibility-hidden {
|
|
116
|
+
visibility: hidden !important;
|
|
117
|
+
height: 0 !important;
|
|
118
|
+
opacity: 0 !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
112
121
|
// nested elements end
|
|
113
122
|
|
|
114
123
|
.table-wrapper {
|
|
@@ -155,7 +164,12 @@
|
|
|
155
164
|
border-radius: 4px;
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
|
-
|
|
167
|
+
.is-collapsed {
|
|
168
|
+
&.ac-nested-elements::before,
|
|
169
|
+
&.ac-nested-elements::after {
|
|
170
|
+
display: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
159
173
|
// details with checkradio
|
|
160
174
|
.details-with-checkradio-wrapper {
|
|
161
175
|
display: grid;
|
|
@@ -163,6 +177,32 @@
|
|
|
163
177
|
grid-gap: 15px;
|
|
164
178
|
}
|
|
165
179
|
|
|
180
|
+
// dark theme start
|
|
181
|
+
.is-dark-theme {
|
|
182
|
+
.nested-body {
|
|
183
|
+
code {
|
|
184
|
+
background-color: var(--dark-bg-light);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//For resource input from
|
|
190
|
+
.resource-input {
|
|
191
|
+
display: grid;
|
|
192
|
+
grid-template-columns: 60px 1fr 1fr;
|
|
193
|
+
grid-gap: 15px;
|
|
194
|
+
align-items: center;
|
|
195
|
+
margin-bottom: 15px;
|
|
196
|
+
.label-text {
|
|
197
|
+
font-weight: 300;
|
|
198
|
+
}
|
|
199
|
+
.ac-single-input {
|
|
200
|
+
margin: 0;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
// dark theme end
|
|
166
206
|
/****************************************
|
|
167
207
|
Responsive Classes
|
|
168
208
|
*****************************************/
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
.vue-schema-form-array {
|
|
2
|
+
.nested-body {
|
|
3
|
+
// margin-bottom: 15px;
|
|
4
|
+
display: flex;
|
|
5
|
+
|
|
6
|
+
.form-left-item {
|
|
7
|
+
margin-right: 10px;
|
|
8
|
+
width: calc(100% - 92px);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.nested-header {
|
|
14
|
+
.tabs.ac-tabs {
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
visibility: hidden;
|
|
18
|
+
transition: 0.3s ease-in-out;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
.tabs.ac-tabs {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
visibility: visible;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.vue-openapi-form {
|
|
30
|
+
margin-left: -20px;
|
|
31
|
+
.is-warning {
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
color: #ea3d2f;
|
|
34
|
+
padding-left: 10px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ac-nested-elements {
|
|
38
|
+
&:first-child {
|
|
39
|
+
margin-left: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nested-body {
|
|
43
|
+
padding-left: 0px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.nested-header {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ac-single-switch {
|
|
52
|
+
margin-left: -15px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ac-single-input {
|
|
56
|
+
margin-left: 25px;
|
|
57
|
+
|
|
58
|
+
&:last-child {
|
|
59
|
+
margin-bottom: 15px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.vue-form-scema-body {
|
|
65
|
+
.left-content {
|
|
66
|
+
width: 650px;
|
|
67
|
+
background-color: $ac-white-lighter;
|
|
68
|
+
padding: 30px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.right-content {
|
|
72
|
+
width: 100%;
|
|
73
|
+
margin-top: 30px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.v-tooltip-open {
|
|
78
|
+
background-color: $ac-white;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ac-nested-elements::after {
|
|
82
|
+
top: 25px;
|
|
83
|
+
width: 1px;
|
|
84
|
+
height: calc(100% - 50px);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ac-nested-elements::before {
|
|
88
|
+
bottom: 12px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.is-collapsed {
|
|
92
|
+
&.ac-nested-elements::before,
|
|
93
|
+
&.ac-nested-elements::after {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ui-builders-wrapper {
|
|
99
|
+
.ac-nested-elements::before {
|
|
100
|
+
bottom: 6px !important;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// for vue-tooltip
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.component-wrapper {
|
|
2
2
|
.component-inner {
|
|
3
|
-
margin
|
|
3
|
+
margin: 20px;
|
|
4
4
|
border: 1px solid $ac-white-light;
|
|
5
5
|
border-radius: 4px;
|
|
6
6
|
display: flex;
|
|
@@ -109,10 +109,13 @@
|
|
|
109
109
|
|
|
110
110
|
// new code preview
|
|
111
111
|
.ac-components {
|
|
112
|
+
margin: 20px;
|
|
112
113
|
.single-component {
|
|
113
|
-
box-shadow: $ac-shadow-1;
|
|
114
|
+
// box-shadow: $ac-shadow-1;
|
|
115
|
+
border: 1px solid $ac-white-light;
|
|
114
116
|
border-radius: 4px;
|
|
115
117
|
margin-bottom: 25px;
|
|
118
|
+
overflow: hidden;
|
|
116
119
|
|
|
117
120
|
.component-header {
|
|
118
121
|
display: flex;
|
package/main.scss
CHANGED
|
@@ -3,64 +3,14 @@
|
|
|
3
3
|
@import "~bulma-checkradio";
|
|
4
4
|
@import "~bulma-switch";
|
|
5
5
|
@import "~bulma-tooltip";
|
|
6
|
+
@import url("https://fonts.googleapis.com/css2?family=Material+Icons&display=swap");
|
|
6
7
|
@import "vue-multiselect/dist/vue-multiselect.min.css";
|
|
7
8
|
|
|
8
9
|
// BASE
|
|
9
|
-
@import "~assets/design-system/base/utilities/
|
|
10
|
-
@import "~assets/design-system/base/utilities/dark-theme";
|
|
11
|
-
@import "~assets/design-system/base/utilities/derived-variables";
|
|
12
|
-
@import "~assets/design-system/base/utilities/typography";
|
|
13
|
-
@import "~assets/design-system/base/utilities/default";
|
|
14
|
-
@import "~assets/design-system/base/utilities/mixin";
|
|
10
|
+
@import "~assets/design-system/base/utilities/all";
|
|
15
11
|
|
|
16
12
|
// LAYOUTS
|
|
17
|
-
@import "~assets/design-system/layouts/
|
|
13
|
+
@import "~assets/design-system/layouts/all";
|
|
18
14
|
|
|
19
15
|
// COMPONENTS
|
|
20
|
-
@import "~assets/design-system/components/
|
|
21
|
-
@import "~assets/design-system/components/ac-select-box";
|
|
22
|
-
@import "~assets/design-system/components/ac-multi-select";
|
|
23
|
-
@import "~assets/design-system/components/ac-code-highlight";
|
|
24
|
-
@import "~assets/design-system/components/navbar";
|
|
25
|
-
@import "~assets/design-system/components/breadcumb";
|
|
26
|
-
@import "~assets/design-system/components/card-body-wrapper";
|
|
27
|
-
@import "~assets/design-system/components/ac-options";
|
|
28
|
-
@import "~assets/design-system/components/left-sidebar-menu";
|
|
29
|
-
@import "~assets/design-system/components/dashboard-header";
|
|
30
|
-
@import "~assets/design-system/components/widget-menu";
|
|
31
|
-
@import "~assets/design-system/components/buttons";
|
|
32
|
-
@import "~assets/design-system/components/ac-input";
|
|
33
|
-
@import "~assets/design-system/components/ac-content-layout";
|
|
34
|
-
@import "~assets/design-system/components/ac-table";
|
|
35
|
-
@import "~assets/design-system/components/progress-bar";
|
|
36
|
-
@import "~assets/design-system/components/go-to-top";
|
|
37
|
-
@import "~assets/design-system/components/image-upload";
|
|
38
|
-
@import "~assets/design-system/components/ac-modal";
|
|
39
|
-
@import "~assets/design-system/components/ac-drag";
|
|
40
|
-
@import "~assets/design-system/components/ac-tabs";
|
|
41
|
-
@import "~assets/design-system/components/payment-card";
|
|
42
|
-
@import "~assets/design-system/components/ac-accordion";
|
|
43
|
-
@import "~assets/design-system/components/ac-card";
|
|
44
|
-
@import "~assets/design-system/components/add-card";
|
|
45
|
-
@import "~assets/design-system/components/subscription-card";
|
|
46
|
-
@import "~assets/design-system/components/ac-calendar";
|
|
47
|
-
@import "~assets/design-system/components/ac-tags";
|
|
48
|
-
@import "~assets/design-system/components/nested-list";
|
|
49
|
-
@import "~assets/design-system/components/overview-info";
|
|
50
|
-
@import "~assets/design-system/components/pricing-table";
|
|
51
|
-
@import "~assets/design-system/components/table-of-content";
|
|
52
|
-
@import "~assets/design-system/components/preview-modal";
|
|
53
|
-
@import "~assets/design-system/components/wizard";
|
|
54
|
-
@import "~assets/design-system/components/preloader";
|
|
55
|
-
@import "~assets/design-system/components/pagination";
|
|
56
|
-
@import "~assets/design-system/components/ui-builder/ui-builder";
|
|
57
|
-
@import "~assets/design-system/components/ac-toaster/ac-toasted";
|
|
58
|
-
@import "~assets/design-system/components/bbum/post";
|
|
59
|
-
@import "~assets/design-system/components/bbum/single-post-preview";
|
|
60
|
-
@import "~assets/design-system/components/bbum/user-profile";
|
|
61
|
-
@import "~assets/design-system/components/bbum/sign-up-notification";
|
|
62
|
-
@import "~assets/design-system/components/bbum/activities-header";
|
|
63
|
-
@import "~assets/design-system/components/bbum/card-team";
|
|
64
|
-
@import "~assets/design-system/components/bbum/information-center";
|
|
65
|
-
@import "~assets/design-system/components/bbum/left-sidebar";
|
|
66
|
-
@import "~assets/design-system/components/bbum/mobile-desktop";
|
|
16
|
+
@import "~assets/design-system/components/all";
|
package/package.json
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appscode/design-system",
|
|
3
|
-
"version": "1.0.43-alpha.
|
|
3
|
+
"version": "1.0.43-alpha.190",
|
|
4
4
|
"description": "A design system for Appscode websites and dashboards made using Bulma",
|
|
5
5
|
"main": "main.scss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@appscode/design-system-images": "0.0.13"
|
|
11
|
-
"bulma-checkradio": "^1.1.1",
|
|
12
|
-
"bulma-switch": "^2.0.0",
|
|
13
|
-
"bulma-tooltip": "^3.0.2",
|
|
14
|
-
"v-calendar": "^1.0.6",
|
|
15
|
-
"vue-multiselect": "^2.1.6"
|
|
10
|
+
"@appscode/design-system-images": "0.0.13"
|
|
16
11
|
},
|
|
17
12
|
"repository": {
|
|
18
13
|
"type": "git",
|
package/plugins/theme.js
CHANGED
|
@@ -136,3 +136,7 @@ export function getFontHSL() {
|
|
|
136
136
|
lightness,
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
export const loaderLightThemePrimaryColor = "#f5f7f9";
|
|
140
|
+
export const loaderDarkThemePrimaryColor = "#2e323c";
|
|
141
|
+
export const loaderLightThemeSecondaryColor = "#ecebeb";
|
|
142
|
+
export const loaderDarkThemeSecondaryColor = "#21272e";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import { useNow, useThrottleFn } from "@vueuse/core";
|
|
3
|
+
|
|
4
|
+
const getTime = option => {
|
|
5
|
+
if (parseInt(option.time, 10) < 0 || !option.time) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
let time = option.time;
|
|
9
|
+
|
|
10
|
+
// moment(option.time).valueOf('x') needs to convert pharmer's api date to epoch time
|
|
11
|
+
time = moment(option.time).valueOf("x")
|
|
12
|
+
? moment(option.time).valueOf("x")
|
|
13
|
+
: time * 1000;
|
|
14
|
+
|
|
15
|
+
return moment(time).format("MMM DD YYYY, h:mm A");
|
|
16
|
+
};
|
|
17
|
+
const getDayDifferences = options => {
|
|
18
|
+
const past = moment(options.past).isValid()
|
|
19
|
+
? moment(options.past).valueOf("x") / 1000
|
|
20
|
+
: options.past;
|
|
21
|
+
const now = Date.now() / 1000;
|
|
22
|
+
const diff = now - past;
|
|
23
|
+
if (parseInt(options.past, 10) > 10) {
|
|
24
|
+
let ret = Math.floor(diff / 86400);
|
|
25
|
+
let unit = "";
|
|
26
|
+
if (diff < 60) {
|
|
27
|
+
ret = parseInt(diff, 10);
|
|
28
|
+
unit = " Second";
|
|
29
|
+
} else if (diff < 3600) {
|
|
30
|
+
ret = parseInt(diff / 60, 10);
|
|
31
|
+
unit = " Minute";
|
|
32
|
+
} else if (diff < 86400) {
|
|
33
|
+
ret = parseInt(diff / 3600, 10);
|
|
34
|
+
unit = " Hour";
|
|
35
|
+
} else {
|
|
36
|
+
ret = parseInt(diff / 86400, 10);
|
|
37
|
+
unit = " Day";
|
|
38
|
+
}
|
|
39
|
+
unit += ret > 1 ? "s" : "";
|
|
40
|
+
return ret + unit;
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
getTime,
|
|
47
|
+
// formatMoment,
|
|
48
|
+
getDayDifferences
|
|
49
|
+
};
|
package/plugins/vue-toaster.js
CHANGED
|
@@ -41,6 +41,7 @@ module.exports = {
|
|
|
41
41
|
},
|
|
42
42
|
options: {
|
|
43
43
|
icon: "fa-warning",
|
|
44
|
+
duration: 20000,
|
|
44
45
|
type: "error",
|
|
45
46
|
className: "ac-toast is-error",
|
|
46
47
|
},
|
|
@@ -56,6 +57,7 @@ module.exports = {
|
|
|
56
57
|
},
|
|
57
58
|
options: {
|
|
58
59
|
icon: "fa-info",
|
|
60
|
+
duration: 20000,
|
|
59
61
|
type: "info",
|
|
60
62
|
className: "ac-toast is-info",
|
|
61
63
|
},
|
|
@@ -73,6 +75,7 @@ module.exports = {
|
|
|
73
75
|
},
|
|
74
76
|
options: {
|
|
75
77
|
icon: "fa-warning",
|
|
78
|
+
duration: 2500,
|
|
76
79
|
type: "error",
|
|
77
80
|
className: "ac-toast is-warning",
|
|
78
81
|
},
|
|
@@ -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>
|