@hulkapps/app-manager-vue 2.0.9 → 2.1.2
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/dist/app-manager-vue.esm.js +1597 -961
- package/dist/app-manager-vue.min.js +4 -4
- package/dist/app-manager-vue.ssr.js +1655 -993
- package/dist/hulkapps-app-manager.css +1 -1
- package/dist/hulkapps-app-manager.min.css +1 -1
- package/package.json +1 -1
- package/src/components/Plans/AppManagerGroupPlan.vue +177 -91
- package/src/components/Plans/AppManagerSliderPlan.vue +267 -74
- package/src/components/polaris-vue/src/components/PSkeletonBodyText/PSkeletonBodyText.vue +27 -0
- package/src/components/polaris-vue/src/components/PSkeletonDisplayText/PSkeletonDisplayText.vue +38 -0
- package/src/components/polaris-vue/src/components/PSkeletonPage/PSkeletonPage.vue +149 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="className"
|
|
4
|
+
role="status"
|
|
5
|
+
aria-label="Page loading"
|
|
6
|
+
>
|
|
7
|
+
<div class="Polaris-SkeletonPage__Header">
|
|
8
|
+
<div
|
|
9
|
+
v-if="breadcrumbs"
|
|
10
|
+
class="Polaris-SkeletonPage__BreadcrumbAction"
|
|
11
|
+
style="width: 60px;"
|
|
12
|
+
>
|
|
13
|
+
<PSkeletonBodyText :lines="1"/>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="Polaris-SkeletonPage__TitleAndPrimaryAction">
|
|
16
|
+
<div class="Polaris-SkeletonPage__TitleWrapper">
|
|
17
|
+
<h1 v-if="title !== null" class="Polaris-SkeletonPage__Title">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</h1>
|
|
20
|
+
<div v-else class="Polaris-SkeletonPage__SkeletonTitle" />
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
v-if="primaryAction"
|
|
24
|
+
class="Polaris-SkeletonPage__PrimaryAction"
|
|
25
|
+
>
|
|
26
|
+
<PSkeletonDisplayText size="large"/>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
v-if="secondaryActions !== 0"
|
|
31
|
+
class="Polaris-SkeletonPage__Actions"
|
|
32
|
+
>
|
|
33
|
+
<div
|
|
34
|
+
v-for="renderSecondaryAction in renderSecondaryActions(secondaryActions)"
|
|
35
|
+
:key="renderSecondaryAction.key"
|
|
36
|
+
class="Polaris-SkeletonPage__Action"
|
|
37
|
+
:style="renderSecondaryAction.width"
|
|
38
|
+
>
|
|
39
|
+
<PSkeletonBodyText :lines="1"/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="Polaris-SkeletonPage__Content">
|
|
44
|
+
<!-- @slot The child elements to render in the skeleton page -->
|
|
45
|
+
<slot/>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import { classNames } from '../../utilities/css';
|
|
52
|
+
import { PSkeletonBodyText } from '../../components/PSkeletonBodyText';
|
|
53
|
+
import { PSkeletonDisplayText } from '../../components/PSkeletonDisplayText';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* <br/>
|
|
57
|
+
* <h4 style="font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue,
|
|
58
|
+
* sans-serif;">Skeleton page is used with other skeleton loading components to provide a low fidelity representation
|
|
59
|
+
* of the user interface (UI) before content appears on the page. It improves load times perceived by merchants.</h4>
|
|
60
|
+
*/
|
|
61
|
+
export default {
|
|
62
|
+
name: 'PSkeletonPage',
|
|
63
|
+
components: {
|
|
64
|
+
PSkeletonBodyText, PSkeletonDisplayText,
|
|
65
|
+
},
|
|
66
|
+
props: {
|
|
67
|
+
/**
|
|
68
|
+
* Page title, in large type
|
|
69
|
+
*/
|
|
70
|
+
title: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: null
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Remove the normal max-width on the page
|
|
77
|
+
*/
|
|
78
|
+
fullWidth: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Decreases the maximum layout width. Intended for single-column layouts
|
|
85
|
+
*/
|
|
86
|
+
narrowWidth: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Shows a skeleton over the primary action
|
|
93
|
+
*/
|
|
94
|
+
primaryAction: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Number of secondary page-level actions to display
|
|
101
|
+
*/
|
|
102
|
+
secondaryActions: {
|
|
103
|
+
type: Number,
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Shows a skeleton over the breadcrumb
|
|
108
|
+
*/
|
|
109
|
+
breadcrumbs: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
className() {
|
|
116
|
+
return classNames(
|
|
117
|
+
'Polaris-SkeletonPage__Page',
|
|
118
|
+
this.fullWidth && 'Polaris-SkeletonPage--fullWidth',
|
|
119
|
+
this.narrowWidth && 'Polaris-SkeletonPage--narrowWidth',
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
methods: {
|
|
124
|
+
renderSecondaryActions(actionCount) {
|
|
125
|
+
if(typeof actionCount === 'number') {
|
|
126
|
+
const actions = [];
|
|
127
|
+
for (let i = 0; i < actionCount; i++) {
|
|
128
|
+
const width = Math.round(Math.random() * 40 + 60);
|
|
129
|
+
actions.push(
|
|
130
|
+
{
|
|
131
|
+
width: {
|
|
132
|
+
/* tslint:disable-next-line */
|
|
133
|
+
'width': `${width}px`,
|
|
134
|
+
},
|
|
135
|
+
key: i,
|
|
136
|
+
},
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return actions;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style scoped>
|
|
148
|
+
|
|
149
|
+
</style>
|