@hulkapps/app-manager-vue 1.0.1 → 2.0.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/README.md +32 -0
- package/dist/app-manager-vue.esm.js +38978 -15111
- package/dist/app-manager-vue.min.js +9 -2
- package/dist/app-manager-vue.ssr.js +37401 -14919
- package/dist/hulkapps-app-manager.css +13284 -0
- package/dist/hulkapps-app-manager.min.css +1 -0
- package/package.json +9 -4
- package/src/components/Marketing/Banners.vue +44 -44
- package/src/components/Plans/AppManagerPlan.vue +492 -0
- package/src/components/Plans/PlanBanners.vue +50 -0
- package/src/components/Plans/YearlyPlanPromotion.vue +37 -0
- package/src/components/polaris-vue/src/components/PActionList/PActionList.vue +68 -0
- package/src/components/polaris-vue/src/components/PActionList/components/PActionListItem/PActionListItem.vue +91 -0
- package/src/components/polaris-vue/src/components/PActionList/components/PActionListSection/PActionListSection.vue +68 -0
- package/src/components/polaris-vue/src/components/PActionMenu/PActionMenu.vue +54 -0
- package/src/components/polaris-vue/src/components/PActionMenu/components/PActionMenuActions/PActionMenuActions.vue +197 -0
- package/src/components/polaris-vue/src/components/PActionMenu/components/PActionMenuMenuAction/PActionMenuMenuAction.vue +97 -0
- package/src/components/polaris-vue/src/components/PActionMenu/components/PActionMenuMenuGroup/PActionMenuMenuGroup.vue +54 -0
- package/src/components/polaris-vue/src/components/PActionMenu/components/PActionMenuRollupActions/PActionMenuRollupActions.vue +43 -0
- package/src/components/polaris-vue/src/components/PAvatar/PAvatar.vue +104 -0
- package/src/components/polaris-vue/src/components/PBadge/PBadge.vue +86 -0
- package/src/components/polaris-vue/src/components/PBanner/PBanner.vue +132 -0
- package/src/components/polaris-vue/src/components/PBreadcrumbs/PBreadcrumbs.vue +99 -0
- package/src/components/polaris-vue/src/components/PButton/PButton.vue +396 -0
- package/src/components/polaris-vue/src/components/PButton/components/PButtonsFrom/PButtonsFrom.vue +47 -0
- package/src/components/polaris-vue/src/components/PButton/components/PUnstyledButton/PUnstyledButton.vue +340 -0
- package/src/components/polaris-vue/src/components/PButtonGroup/PButtonGroup.vue +76 -0
- package/src/components/polaris-vue/src/components/PButtonGroup/components/PButtonGroupItem/PButtonGroupItem.vue +11 -0
- package/src/components/polaris-vue/src/components/PCaption/PCaption.vue +29 -0
- package/src/components/polaris-vue/src/components/PCard/PCard.vue +118 -0
- package/src/components/polaris-vue/src/components/PCard/components/PCardFooter/PCardFooter.vue +11 -0
- package/src/components/polaris-vue/src/components/PCard/components/PCardHeader/PCardHeader.vue +69 -0
- package/src/components/polaris-vue/src/components/PCard/components/PCardSection/PCardSection.vue +54 -0
- package/src/components/polaris-vue/src/components/PCard/components/PCardSubsection/PCardSubsection.vue +12 -0
- package/src/components/polaris-vue/src/components/PConnected/PConnected.vue +44 -0
- package/src/components/polaris-vue/src/components/PConnected/components/PConnectedItem/PConnectedItem.vue +41 -0
- package/src/components/polaris-vue/src/components/PDataTable/PDataTable.vue +541 -0
- package/src/components/polaris-vue/src/components/PDataTable/components/PDataTableCell/PDataTableCell.vue +213 -0
- package/src/components/polaris-vue/src/components/PDataTable/components/PDataTableCellNew/PDataTableCellNew.vue +162 -0
- package/src/components/polaris-vue/src/components/PDataTable/components/PDataTableCol/PDataTableCol.vue +75 -0
- package/src/components/polaris-vue/src/components/PDataTable/components/PDataTableRow/PDataTableRow.vue +15 -0
- package/src/components/polaris-vue/src/components/PDisplayText/PDisplayText.vue +56 -0
- package/src/components/polaris-vue/src/components/PEmptyState/PEmptyState.vue +154 -0
- package/src/components/polaris-vue/src/components/PFieldError/PFieldError.vue +41 -0
- package/src/components/polaris-vue/src/components/PFilter/PFilter.vue +252 -0
- package/src/components/polaris-vue/src/components/PFilter/components/PFilterItem/PFilterItem.vue +11 -0
- package/src/components/polaris-vue/src/components/PFilter/components/PFilterItemWrapper/PFilterItemWrapper.vue +32 -0
- package/src/components/polaris-vue/src/components/PHeading/PHeading.vue +33 -0
- package/src/components/polaris-vue/src/components/PIcon/PIcon.vue +121 -0
- package/src/components/polaris-vue/src/components/PIcon/ShopifyIcons.vue +217 -0
- package/src/components/polaris-vue/src/components/PImage/PImage.vue +49 -0
- package/src/components/polaris-vue/src/components/PLayout/PLayout.vue +42 -0
- package/src/components/polaris-vue/src/components/PLayout/components/PLayoutSection/PLayoutSection.vue +55 -0
- package/src/components/polaris-vue/src/components/PLink/PLink.vue +90 -0
- package/src/components/polaris-vue/src/components/POptionalTag/POptionalTag.vue +23 -0
- package/src/components/polaris-vue/src/components/PPage/PPage.vue +136 -0
- package/src/components/polaris-vue/src/components/PPage/components/PPageHeader/PPageHeader.vue +191 -0
- package/src/components/polaris-vue/src/components/PPage/components/PPageHeaderTitle/PPageHeaderTitle.vue +63 -0
- package/src/components/polaris-vue/src/components/PPagination/PPagination.vue +119 -0
- package/src/components/polaris-vue/src/components/PPopover/PPopover.vue +298 -0
- package/src/components/polaris-vue/src/components/PPopover/components/PPopoverOverlay/PPopoverOverlay.vue +66 -0
- package/src/components/polaris-vue/src/components/PPopover/components/PPositionedOverlay/PPositionedOverlay.vue +289 -0
- package/src/components/polaris-vue/src/components/PSpinner/PSpinner.vue +60 -0
- package/src/components/polaris-vue/src/components/PStack/PStack.vue +84 -0
- package/src/components/polaris-vue/src/components/PStack/components/PStackItem/PStackItem.vue +49 -0
- package/src/components/polaris-vue/src/components/PSubheading/PSubheading.vue +36 -0
- package/src/components/polaris-vue/src/components/PTag/PTag.vue +89 -0
- package/src/components/polaris-vue/src/components/PTextContainer/PTextContainer.vue +41 -0
- package/src/components/polaris-vue/src/components/PTextField/PTextField.vue +229 -0
- package/src/components/polaris-vue/src/components/PTextField/components/PFieldResizer/PFieldResizer.vue +79 -0
- package/src/components/polaris-vue/src/components/PTextField/components/PInput/PInput.vue +473 -0
- package/src/components/polaris-vue/src/components/PTextField/components/PSpinner/PSpinner.vue +47 -0
- package/src/components/polaris-vue/src/components/PTextStyle/PTextStyle.vue +60 -0
- package/src/components/polaris-vue/src/components/PThumbnail/PThumbnail.vue +71 -0
- package/src/components/polaris-vue/src/components/PToggle/PToggle.vue +81 -0
- package/src/components/polaris-vue/src/components/PUnstyledLink/PUnstyledLink.vue +67 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="className">
|
|
3
|
+
<!-- @slot The content to render in the text container. -->
|
|
4
|
+
<slot/>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { classNames, variationName } from '../../utilities/css';
|
|
10
|
+
import StringValidator from '../../utilities/validators/StringValidator';
|
|
11
|
+
|
|
12
|
+
const Spacing = ['tight', 'loose', null];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* <br/>
|
|
16
|
+
* <h4 style="font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue,
|
|
17
|
+
* sans-serif;">A text container is used to wrap text elements such as paragraphs, headings, and lists to give them
|
|
18
|
+
* vertical spacing.</h4>
|
|
19
|
+
*/
|
|
20
|
+
export default {
|
|
21
|
+
name: 'PTextContainer',
|
|
22
|
+
props: {
|
|
23
|
+
/**
|
|
24
|
+
* The amount of vertical spacing children will get between them.
|
|
25
|
+
*/
|
|
26
|
+
spacing: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: null,
|
|
29
|
+
...StringValidator('spacing', Spacing)
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
className() {
|
|
34
|
+
return classNames(
|
|
35
|
+
'Polaris-TextContainer',
|
|
36
|
+
this.spacing && `Polaris-TextContainer--${variationName('spacing', this.spacing)}`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="className">
|
|
3
|
+
<div
|
|
4
|
+
v-if="!floatingLabel && (label || emptyLabel || $slots.hasOwnProperty('label'))"
|
|
5
|
+
class="Polaris-Labelled__LabelWrapper"
|
|
6
|
+
:class="labelClass"
|
|
7
|
+
>
|
|
8
|
+
<!-- @slot Field label -->
|
|
9
|
+
<slot name="label">
|
|
10
|
+
<div class="Polaris-Label">
|
|
11
|
+
<label :id="`${id}Label`" :for="id" class="Polaris-Label__Text" v-html="emptyLabel?' ':label"/>
|
|
12
|
+
</div>
|
|
13
|
+
</slot>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<PConnected v-if="connected">
|
|
17
|
+
<template v-if="$slots.hasOwnProperty('connectedLeft')" slot="left">
|
|
18
|
+
<!-- @slot An element connected to the left of the input -->
|
|
19
|
+
<slot name="connectedLeft">{{ connectedLeft }}</slot>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<template slot="right" v-if="$slots.hasOwnProperty('connectedRight')">
|
|
23
|
+
<!-- @slot An element connected to the right of the input -->
|
|
24
|
+
<slot name="connectedRight">{{ connectedRight }}</slot>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<PInput v-bind="[$attrs, $props]" v-on="$listeners" :hasError="!!error" :id="id">
|
|
28
|
+
<!-- @slot Field prefix -->
|
|
29
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
30
|
+
<!-- @slot Field suffix -->
|
|
31
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
32
|
+
</PInput>
|
|
33
|
+
</PConnected>
|
|
34
|
+
|
|
35
|
+
<PInput
|
|
36
|
+
v-else
|
|
37
|
+
v-bind="[$attrs, $props]"
|
|
38
|
+
v-on="$listeners"
|
|
39
|
+
:hasError="!!error"
|
|
40
|
+
:id="id"
|
|
41
|
+
:floatingLabel="floatingLabel"
|
|
42
|
+
:label="label"
|
|
43
|
+
>
|
|
44
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
45
|
+
<slot name="label" slot="label"></slot>
|
|
46
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
47
|
+
</PInput>
|
|
48
|
+
<div class="Polaris-Labelled__HelpText" v-if="helpText">{{ helpText }}</div>
|
|
49
|
+
<!-- @slot Customize Error -->
|
|
50
|
+
<slot name="error">
|
|
51
|
+
<PFieldError v-if="error" :error="error"/>
|
|
52
|
+
</slot>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
import { classNames } from '../../utilities/css';
|
|
58
|
+
import { PInput } from '../../components/PTextField/components/PInput';
|
|
59
|
+
import { PConnected } from '../../components/PConnected';
|
|
60
|
+
import { PFieldError } from '../../components/PFieldError';
|
|
61
|
+
import StringValidator from "../../utilities/validators/StringValidator";
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* <br/>
|
|
65
|
+
* <h4 style="font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue,
|
|
66
|
+
* sans-serif;">A text field is an input field that merchants can type into. It has a range of options and supports
|
|
67
|
+
* several text formats including numbers.</h4>
|
|
68
|
+
*/
|
|
69
|
+
export default {
|
|
70
|
+
name: 'PTextField',
|
|
71
|
+
components: {
|
|
72
|
+
PInput, PConnected, PFieldError,
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
/**
|
|
76
|
+
* Text field label
|
|
77
|
+
*/
|
|
78
|
+
label: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: null,
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Text field id
|
|
84
|
+
*/
|
|
85
|
+
id: {
|
|
86
|
+
type: [String, Number],
|
|
87
|
+
default: `PolarisTextField${new Date().getUTCMilliseconds()}`,
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* Text field label class
|
|
91
|
+
*/
|
|
92
|
+
labelClass: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: null,
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Text field help text
|
|
98
|
+
*/
|
|
99
|
+
helpText: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: null,
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Text field connected to left
|
|
105
|
+
*/
|
|
106
|
+
connectedLeft: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: null,
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* Text field connected to right
|
|
112
|
+
*/
|
|
113
|
+
connectedRight: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: null,
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* Text field is connected
|
|
119
|
+
*/
|
|
120
|
+
connected: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false,
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Text field has error
|
|
126
|
+
*/
|
|
127
|
+
error: {
|
|
128
|
+
type: String,
|
|
129
|
+
default: null,
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Visually hide the label
|
|
133
|
+
*/
|
|
134
|
+
labelHidden: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: false,
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* Visually hide the label
|
|
140
|
+
*/
|
|
141
|
+
emptyLabel: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Enable rich text editor
|
|
147
|
+
*/
|
|
148
|
+
richEditor: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: false,
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Show a clear text button in the input
|
|
154
|
+
*/
|
|
155
|
+
clearable: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
default: false,
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* **For input type:- file**
|
|
161
|
+
*
|
|
162
|
+
* A Boolean which, if present, indicates that the user may choose more than one file
|
|
163
|
+
*/
|
|
164
|
+
multiple: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
default: false,
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* **For input type:- file**
|
|
170
|
+
*
|
|
171
|
+
* One or more unique file type specifiers describing file types to allow
|
|
172
|
+
*/
|
|
173
|
+
accept: {
|
|
174
|
+
type: String,
|
|
175
|
+
default: null,
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
* Determine type of input
|
|
179
|
+
*/
|
|
180
|
+
type: {
|
|
181
|
+
type: String,
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* Create beautifully simple form labels that float over your input fields
|
|
185
|
+
*/
|
|
186
|
+
floatingLabel: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: false,
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Disable editing of the input
|
|
192
|
+
*/
|
|
193
|
+
readOnly: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
computed: {
|
|
198
|
+
className() {
|
|
199
|
+
return classNames(
|
|
200
|
+
this.computedLabelHidden && 'Polaris-Labelled--hidden',
|
|
201
|
+
(this.floatingLabel && (!this.richEditor && this.type !== 'file')) && 'Polaris-Floating',
|
|
202
|
+
);
|
|
203
|
+
},
|
|
204
|
+
labelClassName() {
|
|
205
|
+
return classNames(
|
|
206
|
+
!this.floatingLabel && `Polaris-Labelled__LabelWrapper`,
|
|
207
|
+
);
|
|
208
|
+
},
|
|
209
|
+
computedLabelHidden() {
|
|
210
|
+
return this.floatingLabel || this.labelHidden;
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
methods: {
|
|
214
|
+
handleInput(value) {
|
|
215
|
+
/**
|
|
216
|
+
* Get inserted data
|
|
217
|
+
*/
|
|
218
|
+
this.$emit('input', value);
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
}
|
|
222
|
+
</script>
|
|
223
|
+
|
|
224
|
+
<style>
|
|
225
|
+
.ck.ck-editor {
|
|
226
|
+
position: relative;
|
|
227
|
+
width: 100%;
|
|
228
|
+
}
|
|
229
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div aria-hidden class="Polaris-TextField__Resizer">
|
|
3
|
+
<div ref="dummyInput"
|
|
4
|
+
class="Polaris-TextField__DummyInput"
|
|
5
|
+
v-html="finalContents">
|
|
6
|
+
</div>
|
|
7
|
+
<div v-if="minimumLines"
|
|
8
|
+
class="Polaris-TextField__DummyInput"
|
|
9
|
+
v-html="minimumLinesContent">
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
const ENTITIES_TO_REPLACE = {
|
|
16
|
+
'&': '&',
|
|
17
|
+
'<': '<',
|
|
18
|
+
'>': '>',
|
|
19
|
+
'\n': '<br>',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const REPLACE_REGEX = /[\n&<>]/g;
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
name: 'PFieldResizer',
|
|
26
|
+
props: {
|
|
27
|
+
contents: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
currentHeight: {
|
|
31
|
+
type: Number,
|
|
32
|
+
},
|
|
33
|
+
minimumLines: {
|
|
34
|
+
type: Number,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
finalContents() {
|
|
39
|
+
return this.contents ? this.contents.replace(REPLACE_REGEX, this.replaceEntity) + '<br>' : '<br>';
|
|
40
|
+
},
|
|
41
|
+
minimumLinesContent() {
|
|
42
|
+
let content = '';
|
|
43
|
+
for (let line = 0; line < this.minimumLines; line++) {
|
|
44
|
+
content += '<br>';
|
|
45
|
+
}
|
|
46
|
+
return content;
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
handleHeightCheck() {
|
|
51
|
+
if (this.$refs.dummyInput === null || this.$refs.minimumLines === null) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const dummyInput = this.$refs.dummyInput;
|
|
56
|
+
const minimumLines = this.$refs.minimumLines;
|
|
57
|
+
|
|
58
|
+
const contentHeight = dummyInput.offsetHeight;
|
|
59
|
+
const minimumHeight = minimumLines ? minimumLines.offsetHeight : 0;
|
|
60
|
+
const newHeight = Math.max(contentHeight, minimumHeight);
|
|
61
|
+
|
|
62
|
+
if (this.currentHeight !== newHeight) {
|
|
63
|
+
this.$emit('heightchange', newHeight);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
replaceEntity(entity) {
|
|
67
|
+
return ENTITIES_TO_REPLACE[entity] || entity;
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
mounted() {
|
|
71
|
+
this.handleHeightCheck();
|
|
72
|
+
},
|
|
73
|
+
watch: {
|
|
74
|
+
finalContents(value, oldValue) {
|
|
75
|
+
this.handleHeightCheck();
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
</script>
|