@appscode/design-system 1.0.3-alpha.7 → 1.0.43-alpha.4
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 +21 -1
- package/components/_ac-input.scss +58 -2
- package/components/_ac-table.scss +47 -15
- package/components/_breadcumb.scss +1 -1
- package/components/_left-sidebar-menu.scss +3 -2
- package/components/_navbar.scss +1 -1
- package/components/_preloader.scss +1 -1
- package/components/ui-builder/_ui-builder.scss +2 -2
- package/layouts/_404.scss +158 -0
- package/layouts/_code-preview.scss +1 -0
- package/package.json +1 -1
- package/plugins/vue-toaster.js +1 -0
- package/vue-components/v2/card/CardContent.vue +5 -0
- package/vue-components/v2/card/CardHeader.vue +12 -0
- package/vue-components/v2/card/OverviewCard.vue +10 -0
- package/vue-components/v2/card/OverviewCards.vue +5 -0
- package/vue-components/v2/card/PaymentCards.vue +6 -9
- package/vue-components/v2/content/ContentHeader.vue +1 -1
- package/vue-components/v2/header/Header.vue +0 -1
- package/vue-components/v2/modal/Modal.vue +2 -3
- package/vue-components/v2/modals/JsonShowModal.vue +0 -1
- package/vue-components/v2/navbar/Appdrawer.vue +8 -6
- package/vue-components/v2/pagination/Pagination.vue +8 -1
- package/vue-components/v2/sidebar/SidebarItem.vue +1 -1
- package/vue-components/v2/table/InfoTable.vue +13 -3
- package/vue-components/v2/table/Table.vue +75 -5
- package/vue-components/v3/button/Button.vue +73 -0
- package/vue-components/v3/content/ContentHeader.vue +54 -0
- package/vue-components/v3/content/ContentTable.vue +65 -0
- package/vue-components/v3/dropdown/DropdownDivider.vue +3 -0
- package/vue-components/v3/dropdown/DropdownItem.vue +5 -0
- package/vue-components/v3/dropdown/DropdownMenu.vue +111 -0
- package/vue-components/v3/editor/Editor.vue +137 -0
- package/vue-components/v3/form-fields/Input.vue +21 -0
- package/vue-components/v3/header/Header.vue +45 -0
- package/vue-components/v3/modal/Modal.vue +126 -0
- package/vue-components/v3/modals/JsonShowModal.vue +87 -0
- package/vue-components/v3/navbar/Appdrawer.vue +58 -0
- package/vue-components/v3/navbar/User.vue +64 -0
- package/vue-components/v3/pagination/Pagination.vue +159 -0
- package/vue-components/v3/searchbars/SearchBar.vue +47 -0
- package/vue-components/v3/tab/TabItem.vue +17 -0
- package/vue-components/v3/table/FakeTableCell.vue +39 -0
- package/vue-components/v3/table/InfoTable.vue +105 -0
- package/vue-components/v3/table/Table.vue +238 -0
- package/vue-components/v3/table/TableCell.vue +28 -0
- package/vue-components/v3/table/TableRow.vue +60 -0
- package/vue-components/v3/table/table-cell/ArrayCell.vue +111 -0
- package/vue-components/v3/table/table-cell/CellValue.vue +108 -0
- package/vue-components/v3/table/table-cell/ObjectCell.vue +105 -0
- package/vue-components/v3/table/table-cell/ValueWithModal.vue +43 -0
- package/vue-components/v3/tabs/EditorTabs.vue +36 -0
- package/vue-components/v3/tag/Tag.vue +17 -0
package/package.json
CHANGED
package/plugins/vue-toaster.js
CHANGED
|
@@ -34,6 +34,7 @@ module.exports = {
|
|
|
34
34
|
message: (payload) => {
|
|
35
35
|
if (payload) {
|
|
36
36
|
if (typeof payload === "string") return payload;
|
|
37
|
+
else if (payload.response && payload.response.data && payload.response.data.message) return payload.response.data.message;
|
|
37
38
|
else if (payload.message) return payload.message;
|
|
38
39
|
else return "Something Went Wrong";
|
|
39
40
|
} else return "Something Went Wrong";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="is-flex is-justify-content-space-between pt-8 pb-8 pl-20 pr-20 b-1"
|
|
4
|
+
>
|
|
5
|
+
<div class="header-left-content">
|
|
6
|
+
<slot name="card-header-left" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="header-right-content">
|
|
9
|
+
<slot name="card-header-right" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- card start -->
|
|
3
2
|
<div class="ac-payment-card-wrapper">
|
|
4
3
|
<!-- loader start -->
|
|
5
4
|
<div v-if="isLoaderActive" class="ac-payment-card is-transparent-bg p-0">
|
|
@@ -15,10 +14,8 @@
|
|
|
15
14
|
<slot name="cards" />
|
|
16
15
|
</template>
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<slot name="add-card" />
|
|
21
|
-
</div>
|
|
17
|
+
<!-- single payment method start -->
|
|
18
|
+
<slot name="add-card" />
|
|
22
19
|
</div>
|
|
23
20
|
</template>
|
|
24
21
|
<script>
|
|
@@ -26,13 +23,13 @@ import { ContentLoader } from "vue-content-loader";
|
|
|
26
23
|
|
|
27
24
|
export default {
|
|
28
25
|
components: {
|
|
29
|
-
ContentLoader
|
|
26
|
+
ContentLoader,
|
|
30
27
|
},
|
|
31
28
|
props: {
|
|
32
29
|
isLoaderActive: {
|
|
33
30
|
type: Boolean,
|
|
34
|
-
default: false
|
|
35
|
-
}
|
|
36
|
-
}
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
37
34
|
};
|
|
38
35
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- for transition https://github.com/adamwathan/vue-tailwind-examples/blob/master/src/components/Modal.vue -->
|
|
3
|
-
<!-- modal start -->
|
|
4
2
|
<portal to="modal">
|
|
3
|
+
<!-- for transition https://github.com/adamwathan/vue-tailwind-examples/blob/master/src/components/Modal.vue -->
|
|
4
|
+
<!-- modal start -->
|
|
5
5
|
<div
|
|
6
6
|
v-if="showModal"
|
|
7
7
|
class="ac-modal is-middle-alignment"
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
</portal>
|
|
48
|
-
<!-- modal end -->
|
|
49
48
|
</template>
|
|
50
49
|
|
|
51
50
|
<script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="app-drawer-wrapper">
|
|
2
|
+
<div class="app-drawer-wrapper d-table-cell">
|
|
3
3
|
<div class="drawer-icon">
|
|
4
4
|
<svg
|
|
5
5
|
class="gb_We"
|
|
@@ -20,14 +20,16 @@
|
|
|
20
20
|
<article class="media">
|
|
21
21
|
<figure class="media-left">
|
|
22
22
|
<p class="image">
|
|
23
|
-
<img
|
|
23
|
+
<img
|
|
24
|
+
:src="app.icon_url"
|
|
25
|
+
/>
|
|
24
26
|
</p>
|
|
25
27
|
</figure>
|
|
26
28
|
<div class="media-content">
|
|
27
29
|
<div class="content">
|
|
28
30
|
<p>
|
|
29
|
-
<strong>{{
|
|
30
|
-
<span>{{
|
|
31
|
+
<strong>{{app.title}}</strong>
|
|
32
|
+
<span>{{app.sub_title}}</span>
|
|
31
33
|
</p>
|
|
32
34
|
</div>
|
|
33
35
|
</div>
|
|
@@ -44,8 +46,8 @@ export default {
|
|
|
44
46
|
props: {
|
|
45
47
|
apps: {
|
|
46
48
|
type: Array,
|
|
47
|
-
default: () => []
|
|
48
|
-
}
|
|
49
|
+
default: () => []
|
|
50
|
+
}
|
|
49
51
|
},
|
|
50
52
|
components: {
|
|
51
53
|
NavbarItemContent: () => import("./NavbarItemContent.vue"),
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
<div class="pagination-filter level-left">
|
|
4
4
|
<div
|
|
5
5
|
class="level-item"
|
|
6
|
-
v-show="
|
|
6
|
+
v-show="
|
|
7
|
+
!hideRowsPerPageSelection &&
|
|
8
|
+
totalNoOfItems > preSelectedItemsCountPerPage
|
|
9
|
+
"
|
|
7
10
|
>
|
|
8
11
|
<label>Rows per page</label>
|
|
9
12
|
<select v-model="selectedItemCountPerPage" name="page">
|
|
@@ -52,6 +55,10 @@
|
|
|
52
55
|
<script>
|
|
53
56
|
export default {
|
|
54
57
|
props: {
|
|
58
|
+
hideRowsPerPageSelection: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
55
62
|
totalNoOfItems: {
|
|
56
63
|
type: Number,
|
|
57
64
|
default: 0,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<table-container>
|
|
3
|
-
<table
|
|
3
|
+
<table
|
|
4
|
+
class="table ac-info-table is-fullwidth"
|
|
5
|
+
:class="{ 'pl-0 pr-0': removeContentPadding }"
|
|
6
|
+
>
|
|
4
7
|
<tbody v-if="isFullTableLoaderActive">
|
|
5
8
|
<!-- table loader -->
|
|
6
9
|
<table-row v-for="i in loaderCols" :key="i">
|
|
@@ -15,7 +18,10 @@
|
|
|
15
18
|
</tbody>
|
|
16
19
|
<tbody
|
|
17
20
|
v-else
|
|
18
|
-
:class="
|
|
21
|
+
:class="{
|
|
22
|
+
'no-data-available has-text-centered p-10': isTableEmpty,
|
|
23
|
+
'pl-0 pr-0': removeContentPadding
|
|
24
|
+
}"
|
|
19
25
|
>
|
|
20
26
|
<template v-if="!isTableEmpty">
|
|
21
27
|
<!-- table rows -->
|
|
@@ -60,7 +66,11 @@ export default {
|
|
|
60
66
|
},
|
|
61
67
|
tableHeaders: {
|
|
62
68
|
type: Array,
|
|
63
|
-
default: () => []
|
|
69
|
+
default: () => []
|
|
70
|
+
},
|
|
71
|
+
removeContentPadding: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false,
|
|
64
74
|
},
|
|
65
75
|
},
|
|
66
76
|
|
|
@@ -18,8 +18,17 @@
|
|
|
18
18
|
</th>
|
|
19
19
|
</table-row>
|
|
20
20
|
<table-row v-else>
|
|
21
|
-
<th
|
|
22
|
-
|
|
21
|
+
<th
|
|
22
|
+
v-for="(tableHeader, idx) in tableHeaders"
|
|
23
|
+
:key="idx"
|
|
24
|
+
:class="{
|
|
25
|
+
sorting: headerSortables[idx].enabled,
|
|
26
|
+
'sorting-desc': headerSortables[idx].mode === 'desc',
|
|
27
|
+
'sorting-asc': headerSortables[idx].mode === 'asc',
|
|
28
|
+
}"
|
|
29
|
+
@click.prevent="headerSortables[idx].enabled && emitSortEvent(idx)"
|
|
30
|
+
>
|
|
31
|
+
{{ headerLabels[idx] }}
|
|
23
32
|
</th>
|
|
24
33
|
<th
|
|
25
34
|
ref="action-section"
|
|
@@ -41,8 +50,14 @@
|
|
|
41
50
|
</th>
|
|
42
51
|
</table-row>
|
|
43
52
|
<table-row v-else>
|
|
44
|
-
<table-cell
|
|
45
|
-
|
|
53
|
+
<table-cell
|
|
54
|
+
v-for="(tableHeader, idx) in tableHeaders"
|
|
55
|
+
:key="headerLabels[idx]"
|
|
56
|
+
>
|
|
57
|
+
<cell-value
|
|
58
|
+
:is-loader-active="true"
|
|
59
|
+
:cell-title="headerLabels[idx]"
|
|
60
|
+
/>
|
|
46
61
|
</table-cell>
|
|
47
62
|
</table-row>
|
|
48
63
|
</tbody>
|
|
@@ -112,12 +127,13 @@ export default {
|
|
|
112
127
|
data() {
|
|
113
128
|
return {
|
|
114
129
|
fakeCellWidth: 0,
|
|
130
|
+
headerSortables: [],
|
|
115
131
|
};
|
|
116
132
|
},
|
|
117
133
|
|
|
118
134
|
computed: {
|
|
119
135
|
loaderCols() {
|
|
120
|
-
if (this.
|
|
136
|
+
if (this.isFullTableLoaderActive) {
|
|
121
137
|
return 5;
|
|
122
138
|
} else if (this.isLoaderActive) {
|
|
123
139
|
return Math.max(this.tableHeaders.length + 1, 5);
|
|
@@ -128,6 +144,41 @@ export default {
|
|
|
128
144
|
isFullTableLoaderActive() {
|
|
129
145
|
return !this.tableHeaders.length;
|
|
130
146
|
},
|
|
147
|
+
headerLabels() {
|
|
148
|
+
return this.tableHeaders.map((th) =>
|
|
149
|
+
typeof th === "string" ? th : th?.label || "Label"
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
watch: {
|
|
155
|
+
tableHeaders: {
|
|
156
|
+
immediate: true,
|
|
157
|
+
handler(n) {
|
|
158
|
+
if (this.headerSortables.length === n.length) {
|
|
159
|
+
n.forEach((th, idx) => {
|
|
160
|
+
if (this.headerSortables[idx].enabled !== !!th?.sortable) {
|
|
161
|
+
this.headerSortables[idx].enabled = !!th?.sortable;
|
|
162
|
+
this.headerSortables[idx].mode = "";
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
this.headerSortables = n.map((th) => {
|
|
167
|
+
if (typeof th === "string") {
|
|
168
|
+
return {
|
|
169
|
+
enabled: false,
|
|
170
|
+
mode: "",
|
|
171
|
+
};
|
|
172
|
+
} else {
|
|
173
|
+
return {
|
|
174
|
+
enabled: !!th?.sortable,
|
|
175
|
+
mode: "",
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
},
|
|
131
182
|
},
|
|
132
183
|
|
|
133
184
|
updated() {
|
|
@@ -144,6 +195,25 @@ export default {
|
|
|
144
195
|
this.fakeCellWidth = d;
|
|
145
196
|
}
|
|
146
197
|
},
|
|
198
|
+
emitSortEvent(index) {
|
|
199
|
+
const emitValue = {
|
|
200
|
+
index,
|
|
201
|
+
label: this.tableHeaders[index].label,
|
|
202
|
+
mode: "",
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
this.headerSortables.forEach((hs, idx) => {
|
|
206
|
+
if (idx !== index) hs.mode = "";
|
|
207
|
+
else {
|
|
208
|
+
if (hs.mode === "asc") hs.mode = "desc";
|
|
209
|
+
else hs.mode = "asc";
|
|
210
|
+
|
|
211
|
+
emitValue.mode = hs.mode;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
this.$emit("sort", emitValue);
|
|
216
|
+
},
|
|
147
217
|
},
|
|
148
218
|
};
|
|
149
219
|
</script>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
class="button ac-button is-extra-small"
|
|
4
|
+
:class="`${modifierClasses}${isLoaderActive ? ' is-loading' : ''}`"
|
|
5
|
+
:disabled="disabled ? true : null"
|
|
6
|
+
@click="handleClick"
|
|
7
|
+
>
|
|
8
|
+
<span v-if="iconClass || iconImage" class="icon is-small">
|
|
9
|
+
<img
|
|
10
|
+
v-if="iconImage"
|
|
11
|
+
:src="iconImage"
|
|
12
|
+
alt="close-icon"
|
|
13
|
+
:width="iconImageWidth"
|
|
14
|
+
/>
|
|
15
|
+
<i v-else :class="`fa fa-${iconClass}`" aria-hidden="true" />
|
|
16
|
+
</span>
|
|
17
|
+
<span v-if="title" :class="titleModifierClass">{{ title }}</span>
|
|
18
|
+
<slot />
|
|
19
|
+
</button>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import { defineComponent } from "vue";
|
|
24
|
+
export default defineComponent({
|
|
25
|
+
props: {
|
|
26
|
+
// button title
|
|
27
|
+
title: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "",
|
|
30
|
+
},
|
|
31
|
+
// for loader
|
|
32
|
+
isLoaderActive: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
// for disability
|
|
37
|
+
disabled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
// for icon
|
|
42
|
+
iconClass: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "",
|
|
45
|
+
},
|
|
46
|
+
iconImage: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "",
|
|
49
|
+
},
|
|
50
|
+
iconImageWidth: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: undefined,
|
|
53
|
+
},
|
|
54
|
+
// modifier class
|
|
55
|
+
modifierClasses: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "is-primary",
|
|
58
|
+
},
|
|
59
|
+
titleModifierClass: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
emits: ["click"],
|
|
66
|
+
|
|
67
|
+
methods: {
|
|
68
|
+
handleClick(e) {
|
|
69
|
+
if (!this.disabled) this.$emit("click", e);
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
</script>
|