zmp-cli 3.15.7 → 3.15.9
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 +97 -1
- package/build/index.js +1 -1
- package/config/index.js +1 -1
- package/create/index.js +1 -1
- package/create/utils/generate-app-config.js +1 -1
- package/create/utils/generate-npm-scripts.js +1 -1
- package/create/utils/get-options.js +1 -1
- package/create/utils/npm-scripts.js +1 -1
- package/deploy/index.js +1 -1
- package/deploy/utils/get-options.js +1 -1
- package/deploy/utils/request-upload.js +1 -1
- package/deploy/utils/upload-app.js +1 -1
- package/index.js +1 -1
- package/login/index.js +1 -1
- package/login/utils/get-options.js +1 -1
- package/login/utils/zalo-login.js +1 -1
- package/migrate/icons/update-icon-v3.js +1 -1
- package/migrate/index.js +1 -1
- package/migrate/utils/get-options.js +1 -1
- package/migrate/utils/migrate-react.js +1 -1
- package/package.json +3 -2
- package/start/frame/index.html +264 -254
- package/start/index.js +1 -1
- package/sync/index-to-app-config.js +1 -1
- package/sync/index.js +1 -1
- package/utils/axios.js +1 -1
- package/utils/check-update.js +1 -1
- package/utils/constants.js +1 -1
- package/utils/env.js +1 -1
- package/utils/error.js +1 -1
- package/utils/find-files-by-ext.js +1 -1
- package/utils/find-free-port.js +1 -1
- package/utils/fs-extra.js +1 -1
- package/utils/generate-pages-map.js +1 -1
- package/utils/get-app-info.js +1 -1
- package/utils/get-current-project.js +1 -1
- package/utils/get-ip.js +1 -1
- package/utils/log.js +1 -1
- package/utils/node-blob.js +1 -1
- package/utils/resumable.d.js +1 -1
- package/utils/resumable.js +1 -1
- package/utils/spinner.js +1 -1
- package/utils/tunnel.js +1 -1
- package/create/init-zmp-ui.js +0 -1
- package/create/templates/app-parameters.js +0 -17
- package/create/templates/common/css/icons.css +0 -60
- package/create/templates/common/icons/512x512.png +0 -0
- package/create/templates/common/icons/apple-touch-icon.png +0 -0
- package/create/templates/common/icons/favicon.png +0 -0
- package/create/templates/common/postcss.config.js +0 -5
- package/create/templates/common/splash-2732x2732.png +0 -0
- package/create/templates/common/tailwind/postcss.config.js +0 -5
- package/create/templates/common/tailwind/tailwind.config.js +0 -9
- package/create/templates/common/tailwind/tailwind.css +0 -3
- package/create/templates/common/webpack/build.js +0 -3
- package/create/templates/copy-assets.js +0 -1
- package/create/templates/core/babel.config.js +0 -11
- package/create/templates/core/copy-assets.js +0 -15
- package/create/templates/core/generate-home-page.js +0 -121
- package/create/templates/core/generate-root.js +0 -248
- package/create/templates/core/generate-routes.js +0 -129
- package/create/templates/core/generate-scripts.js +0 -45
- package/create/templates/core/pages/404.html +0 -20
- package/create/templates/core/pages/about.html +0 -26
- package/create/templates/core/pages/catalog.html +0 -40
- package/create/templates/core/pages/dynamic-route.html +0 -115
- package/create/templates/core/pages/form.html +0 -258
- package/create/templates/core/pages/left-page-1.html +0 -24
- package/create/templates/core/pages/left-page-2.html +0 -23
- package/create/templates/core/pages/product.html +0 -36
- package/create/templates/core/pages/request-and-load.html +0 -35
- package/create/templates/core/pages/settings.html +0 -252
- package/create/templates/create-folders.js +0 -1
- package/create/templates/generate-config-xml.js +0 -11
- package/create/templates/generate-index.js +0 -24
- package/create/templates/generate-manifest.js +0 -1
- package/create/templates/generate-recoil.js +0 -44
- package/create/templates/generate-routes.js +0 -1
- package/create/templates/generate-scripts.js +0 -1
- package/create/templates/generate-service-worker.js +0 -120
- package/create/templates/generate-store.js +0 -77
- package/create/templates/generate-styles.js +0 -56
- package/create/templates/generate-webpack-config.js +0 -253
- package/create/templates/generate-zmp-custom.js +0 -23
- package/create/templates/react/babel.config.js +0 -12
- package/create/templates/react/components/app-items.jsx +0 -44
- package/create/templates/react/components/navbar-back.jsx +0 -25
- package/create/templates/react/components/user-card.jsx +0 -18
- package/create/templates/react/copy-assets.js +0 -1
- package/create/templates/react/generate-home-page.js +0 -81
- package/create/templates/react/generate-root.js +0 -55
- package/create/templates/react/generate-routes.js +0 -1
- package/create/templates/react/generate-scripts.js +0 -42
- package/create/templates/react/pages/404.js +0 -19
- package/create/templates/react/pages/about.js +0 -44
- package/create/templates/react/pages/catalog.js +0 -98
- package/create/templates/react/pages/dynamic-route.js +0 -72
- package/create/templates/react/pages/form.js +0 -132
- package/create/templates/react/pages/index copy.js +0 -1
- package/create/templates/react/pages/index.js +0 -1
- package/create/templates/react/pages/settings.js +0 -62
- package/create/templates/react/pages/user.js +0 -37
- package/create/templates/react/vite.config.js +0 -11
- package/create/templates/react-typescript/_tsconfig.json +0 -33
- package/create/templates/react-typescript/components/app-items.js +0 -46
- package/create/templates/react-typescript/components/index.js +0 -1
- package/create/templates/react-typescript/components/navbar-back.js +0 -33
- package/create/templates/react-typescript/components/user-card.js +0 -25
- package/create/templates/react-typescript/copy-assets.js +0 -1
- package/create/templates/react-typescript/generate-home-page.js +0 -81
- package/create/templates/react-typescript/generate-root.js +0 -50
- package/create/templates/react-typescript/generate-routes.js +0 -1
- package/create/templates/react-typescript/generate-scripts.js +0 -42
- package/create/templates/react-typescript/pages/404.js +0 -19
- package/create/templates/react-typescript/pages/about.js +0 -44
- package/create/templates/react-typescript/pages/catalog.js +0 -98
- package/create/templates/react-typescript/pages/dynamic-route.js +0 -72
- package/create/templates/react-typescript/pages/form.js +0 -132
- package/create/templates/react-typescript/pages/index.js +0 -1
- package/create/templates/react-typescript/pages/settings.js +0 -62
- package/create/templates/react-typescript/pages/user.js +0 -37
- package/create/templates/react-typescript/vite.config.js +0 -21
- package/create/templates/svelte/babel.config.js +0 -10
- package/create/templates/svelte/copy-assets.js +0 -1
- package/create/templates/svelte/generate-home-page.js +0 -122
- package/create/templates/svelte/generate-root.js +0 -177
- package/create/templates/svelte/generate-routes.js +0 -76
- package/create/templates/svelte/generate-scripts.js +0 -31
- package/create/templates/svelte/pages/404.svelte +0 -10
- package/create/templates/svelte/pages/about.svelte +0 -16
- package/create/templates/svelte/pages/catalog.svelte +0 -31
- package/create/templates/svelte/pages/dynamic-route.svelte +0 -34
- package/create/templates/svelte/pages/form.svelte +0 -175
- package/create/templates/svelte/pages/left-page-1.svelte +0 -13
- package/create/templates/svelte/pages/left-page-2.svelte +0 -12
- package/create/templates/svelte/pages/product.svelte +0 -21
- package/create/templates/svelte/pages/request-and-load.svelte +0 -21
- package/create/templates/svelte/pages/settings.svelte +0 -175
- package/create/templates/vue/babel.config.js +0 -10
- package/create/templates/vue/components/header.vue +0 -28
- package/create/templates/vue/components/sun-and-moon.vue +0 -34
- package/create/templates/vue/copy-assets.js +0 -1
- package/create/templates/vue/generate-home-page.js +0 -50
- package/create/templates/vue/generate-root.js +0 -40
- package/create/templates/vue/generate-routes.js +0 -1
- package/create/templates/vue/generate-scripts.js +0 -46
- package/create/templates/vue/global-components.d.js +0 -1
- package/create/templates/vue/global-components.d.ts +0 -121
- package/create/templates/vue/icons/moon.svg +0 -3
- package/create/templates/vue/icons/sun.svg +0 -3
- package/create/templates/vue/pages/404.vue +0 -12
- package/create/templates/vue/pages/about.vue +0 -15
- package/create/templates/vue/pages/catalog.vue +0 -39
- package/create/templates/vue/pages/dynamic-route.vue +0 -34
- package/create/templates/vue/pages/form.vue +0 -162
- package/create/templates/vue/pages/left-page-1.vue +0 -14
- package/create/templates/vue/pages/left-page-2.vue +0 -11
- package/create/templates/vue/pages/product.vue +0 -31
- package/create/templates/vue/pages/request-and-load.vue +0 -25
- package/create/templates/vue/pages/settings.vue +0 -18
- package/create/templates/vue/vite.config.js +0 -11
- package/create/templates/zaui/_tsconfig.json +0 -33
- package/create/templates/zaui/babel.config.js +0 -12
- package/create/templates/zaui/components/user-card.jsx +0 -16
- package/create/templates/zaui/copy-assets.js +0 -1
- package/create/templates/zaui/generate-home-page.js +0 -91
- package/create/templates/zaui/generate-root.js +0 -33
- package/create/templates/zaui/generate-routes.js +0 -1
- package/create/templates/zaui/generate-scripts.js +0 -25
- package/create/templates/zaui/generate-user-card.js +0 -40
- package/create/templates/zaui/pages/about.js +0 -112
- package/create/templates/zaui/pages/form.js +0 -106
- package/create/templates/zaui/pages/index.js +0 -1
- package/create/templates/zaui/pages/user.js +0 -92
- package/create/templates/zaui/vite.config.js +0 -11
- package/create/utils/colors.js +0 -1
- package/create/utils/generate-gitignore.js +0 -1
- package/create/utils/generate-package-json.js +0 -1
- package/create/utils/generate-readme.js +0 -1
- package/create/utils/indent.js +0 -1
- package/create/utils/string.js +0 -1
- package/create/utils/styles-extension.js +0 -1
- package/create/utils/template-if.js +0 -1
- package/start/generate-hr-config.js +0 -1
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
<Page name="form">
|
|
2
|
-
<Navbar title="Form" backLink="Back"></Navbar>
|
|
3
|
-
|
|
4
|
-
<BlockTitle>Form Example</BlockTitle>
|
|
5
|
-
<List noHairlinesMd>
|
|
6
|
-
<ListInput
|
|
7
|
-
label="Name"
|
|
8
|
-
type="text"
|
|
9
|
-
placeholder="Your name"
|
|
10
|
-
></ListInput>
|
|
11
|
-
|
|
12
|
-
<ListInput
|
|
13
|
-
label="E-mail"
|
|
14
|
-
type="email"
|
|
15
|
-
placeholder="E-mail"
|
|
16
|
-
></ListInput>
|
|
17
|
-
|
|
18
|
-
<ListInput
|
|
19
|
-
label="URL"
|
|
20
|
-
type="url"
|
|
21
|
-
placeholder="URL"
|
|
22
|
-
></ListInput>
|
|
23
|
-
|
|
24
|
-
<ListInput
|
|
25
|
-
label="Password"
|
|
26
|
-
type="password"
|
|
27
|
-
placeholder="Password"
|
|
28
|
-
></ListInput>
|
|
29
|
-
|
|
30
|
-
<ListInput
|
|
31
|
-
label="Phone"
|
|
32
|
-
type="tel"
|
|
33
|
-
placeholder="Phone"
|
|
34
|
-
></ListInput>
|
|
35
|
-
|
|
36
|
-
<ListInput
|
|
37
|
-
label="Gender"
|
|
38
|
-
type="select"
|
|
39
|
-
>
|
|
40
|
-
<option>Male</option>
|
|
41
|
-
<option>Female</option>
|
|
42
|
-
</ListInput>
|
|
43
|
-
|
|
44
|
-
<ListInput
|
|
45
|
-
label="Birth date"
|
|
46
|
-
type="date"
|
|
47
|
-
placeholder="Birth day"
|
|
48
|
-
value="2014-04-30"
|
|
49
|
-
></ListInput>
|
|
50
|
-
|
|
51
|
-
<ListItem
|
|
52
|
-
title="Toggle"
|
|
53
|
-
>
|
|
54
|
-
<span slot="after">
|
|
55
|
-
<Toggle />
|
|
56
|
-
</span>
|
|
57
|
-
</ListItem>
|
|
58
|
-
|
|
59
|
-
<ListInput
|
|
60
|
-
label="Range"
|
|
61
|
-
input={false}
|
|
62
|
-
>
|
|
63
|
-
<span slot="input">
|
|
64
|
-
<Range value={50} min={0} max={100} step={1} />
|
|
65
|
-
</span>
|
|
66
|
-
</ListInput>
|
|
67
|
-
|
|
68
|
-
<ListInput
|
|
69
|
-
type="textarea"
|
|
70
|
-
label="Textarea"
|
|
71
|
-
placeholder="Bio"
|
|
72
|
-
></ListInput>
|
|
73
|
-
<ListInput
|
|
74
|
-
type="textarea"
|
|
75
|
-
label="Resizable"
|
|
76
|
-
placeholder="Bio"
|
|
77
|
-
resizable
|
|
78
|
-
></ListInput>
|
|
79
|
-
</List>
|
|
80
|
-
|
|
81
|
-
<BlockTitle>Buttons</BlockTitle>
|
|
82
|
-
<Block strong>
|
|
83
|
-
<Row tag="p">
|
|
84
|
-
<Button class="col">Button</Button>
|
|
85
|
-
<Button class="col" fill>Fill</Button>
|
|
86
|
-
</Row>
|
|
87
|
-
<Row tag="p">
|
|
88
|
-
<Button class="col" raised>Raised</Button>
|
|
89
|
-
<Button class="col" raised fill>Raised Fill</Button>
|
|
90
|
-
</Row>
|
|
91
|
-
<Row tag="p">
|
|
92
|
-
<Button class="col" round>Round</Button>
|
|
93
|
-
<Button class="col" round fill>Round Fill</Button>
|
|
94
|
-
</Row>
|
|
95
|
-
<Row tag="p">
|
|
96
|
-
<Button class="col" outline>Outline</Button>
|
|
97
|
-
<Button class="col" round outline>Outline Round</Button>
|
|
98
|
-
</Row>
|
|
99
|
-
<Row tag="p">
|
|
100
|
-
<Button class="col" small outline>Small</Button>
|
|
101
|
-
<Button class="col" small round outline>Small Round</Button>
|
|
102
|
-
</Row>
|
|
103
|
-
<Row tag="p">
|
|
104
|
-
<Button class="col" small fill>Small</Button>
|
|
105
|
-
<Button class="col" small round fill>Small Round</Button>
|
|
106
|
-
</Row>
|
|
107
|
-
<Row tag="p">
|
|
108
|
-
<Button class="col" large raised>Large</Button>
|
|
109
|
-
<Button class="col" large fill raised>Large Fill</Button>
|
|
110
|
-
</Row>
|
|
111
|
-
<Row tag="p">
|
|
112
|
-
<Button class="col" large fill raised color="red">Large Red</Button>
|
|
113
|
-
<Button class="col" large fill raised color="green">Large Green</Button>
|
|
114
|
-
</Row>
|
|
115
|
-
</Block>
|
|
116
|
-
|
|
117
|
-
<BlockTitle>Checkbox group</BlockTitle>
|
|
118
|
-
<List>
|
|
119
|
-
<ListItem
|
|
120
|
-
checkbox
|
|
121
|
-
name="my-checkbox"
|
|
122
|
-
value="Books"
|
|
123
|
-
title="Books"
|
|
124
|
-
></ListItem>
|
|
125
|
-
<ListItem
|
|
126
|
-
checkbox
|
|
127
|
-
name="my-checkbox"
|
|
128
|
-
value="Movies"
|
|
129
|
-
title="Movies"
|
|
130
|
-
></ListItem>
|
|
131
|
-
<ListItem
|
|
132
|
-
checkbox
|
|
133
|
-
name="my-checkbox"
|
|
134
|
-
value="Food"
|
|
135
|
-
title="Food"
|
|
136
|
-
></ListItem>
|
|
137
|
-
</List>
|
|
138
|
-
|
|
139
|
-
<BlockTitle>Radio buttons group</BlockTitle>
|
|
140
|
-
<List>
|
|
141
|
-
<ListItem
|
|
142
|
-
radio
|
|
143
|
-
name="radio"
|
|
144
|
-
value="Books"
|
|
145
|
-
title="Books"
|
|
146
|
-
></ListItem>
|
|
147
|
-
<ListItem
|
|
148
|
-
radio
|
|
149
|
-
name="radio"
|
|
150
|
-
value="Movies"
|
|
151
|
-
title="Movies"
|
|
152
|
-
></ListItem>
|
|
153
|
-
<ListItem
|
|
154
|
-
radio
|
|
155
|
-
name="radio"
|
|
156
|
-
value="Food"
|
|
157
|
-
title="Food"
|
|
158
|
-
></ListItem>
|
|
159
|
-
</List>
|
|
160
|
-
</Page>
|
|
161
|
-
<script>
|
|
162
|
-
import {
|
|
163
|
-
Page,
|
|
164
|
-
Navbar,
|
|
165
|
-
List,
|
|
166
|
-
ListInput,
|
|
167
|
-
ListItem,
|
|
168
|
-
Toggle,
|
|
169
|
-
BlockTitle,
|
|
170
|
-
Row,
|
|
171
|
-
Button,
|
|
172
|
-
Range,
|
|
173
|
-
Block
|
|
174
|
-
} from 'zmp-svelte';
|
|
175
|
-
</script>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<Page>
|
|
2
|
-
<Navbar title="Left Page 1" backLink="Back" />
|
|
3
|
-
<Block strong>
|
|
4
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit deserunt vel accusamus voluptatem neque! Laborum, et facilis at. Est dolorem, reprehenderit, sed repellendus at cum incidunt labore vel perferendis excepturi?</p>
|
|
5
|
-
<p>Tempore accusantium quaerat officiis dolores ullam, perferendis labore assumenda. A sint quo necessitatibus temporibus ipsam adipisci et quos aliquid officiis, facilis nulla ut aperiam assumenda magnam blanditiis exercitationem facere non!</p>
|
|
6
|
-
<p>Omnis accusamus harum, vero dolores itaque, asperiores laudantium eligendi ipsa, labore dignissimos unde temporibus eius assumenda, obcaecati fuga et. Et provident at consectetur vel temporibus ea nam, veritatis excepturi obcaecati.</p>
|
|
7
|
-
<p>Aspernatur dolorum nostrum est sapiente deleniti in. Placeat itaque expedita dignissimos, suscipit tenetur necessitatibus sunt excepturi quisquam, doloremque repudiandae mollitia in. Nesciunt quo vel, dolorum magni nihil officia reprehenderit libero.</p>
|
|
8
|
-
<p>Fugit nesciunt nobis at doloribus labore, voluptatem quis, distinctio, saepe illo adipisci qui molestias fugiat ut! Quasi animi possimus temporibus repudiandae quam aspernatur, recusandae libero, reiciendis distinctio cupiditate nesciunt a.</p>
|
|
9
|
-
</Block>
|
|
10
|
-
</Page>
|
|
11
|
-
<script>
|
|
12
|
-
import { Page, Navbar, Block } from 'zmp-svelte';
|
|
13
|
-
</script>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<Page>
|
|
2
|
-
<Navbar title="Left Page 2" backLink="Back" />
|
|
3
|
-
<Block strong>
|
|
4
|
-
<p>Maxime tempore, repellendus? Sequi saepe provident quas, neque assumenda dicta odit eaque nesciunt facere mollitia totam voluptate aspernatur vel corporis repudiandae commodi ad cumque repellendus. Saepe officia iure repellat repellendus.</p>
|
|
5
|
-
<p>Ea maiores accusantium non fuga dicta, vero minus veniam! Ipsum eveniet vero voluptate veritatis aspernatur hic dicta adipisci, debitis. Sint quam aperiam repellat quis perspiciatis accusantium ipsum nulla soluta temporibus.</p>
|
|
6
|
-
<p>Necessitatibus ipsum culpa doloremque, nostrum atque totam minima itaque! Blanditiis nobis nam repudiandae, ut nostrum voluptate accusantium atque, veniam libero quaerat corporis laborum earum rem nihil unde. Vitae cum, aliquam?</p>
|
|
7
|
-
<p>Debitis aliquid nemo maxime recusandae, mollitia sed error vero. Atque molestiae rem necessitatibus nam voluptas quaerat, reiciendis, excepturi quis facilis, quod cupiditate vitae voluptate repudiandae! Unde impedit aut id ut?</p>
|
|
8
|
-
</Block>
|
|
9
|
-
</Page>
|
|
10
|
-
<script>
|
|
11
|
-
import { Page, Navbar, Block } from 'zmp-svelte';
|
|
12
|
-
</script>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<Page name="product">
|
|
2
|
-
<Navbar title={currentProduct.title} backLink="Back" />
|
|
3
|
-
<BlockTitle>About {currentProduct.title}</BlockTitle>
|
|
4
|
-
<Block strong>
|
|
5
|
-
{currentProduct.description}
|
|
6
|
-
</Block>
|
|
7
|
-
</Page>
|
|
8
|
-
<script>
|
|
9
|
-
import { Page, Navbar, BlockTitle, Block, useStore } from 'zmp-svelte';
|
|
10
|
-
|
|
11
|
-
export let zmproute;
|
|
12
|
-
|
|
13
|
-
const products = useStore('products');
|
|
14
|
-
const productId = zmproute.params.id;
|
|
15
|
-
let currentProduct;
|
|
16
|
-
products.forEach(function (product) {
|
|
17
|
-
if (product.id === productId) {
|
|
18
|
-
currentProduct = product;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<Page>
|
|
2
|
-
<Navbar title={`${user.firstName} ${user.lastName}`} backLink="Back" />
|
|
3
|
-
<Block strong>
|
|
4
|
-
{user.about}
|
|
5
|
-
</Block>
|
|
6
|
-
<List>
|
|
7
|
-
{#each user.links as link}
|
|
8
|
-
<ListItem
|
|
9
|
-
link={link.url}
|
|
10
|
-
title={link.title}
|
|
11
|
-
external
|
|
12
|
-
target="_blank"
|
|
13
|
-
/>
|
|
14
|
-
{/each}
|
|
15
|
-
</List>
|
|
16
|
-
</Page>
|
|
17
|
-
<script>
|
|
18
|
-
import { Page, Navbar, Block, List, ListItem } from 'zmp-svelte';
|
|
19
|
-
|
|
20
|
-
export let user;
|
|
21
|
-
</script>
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
<Page name="settings">
|
|
2
|
-
<Navbar title="Settings" />
|
|
3
|
-
|
|
4
|
-
<BlockTitle>Form Example</BlockTitle>
|
|
5
|
-
<List noHairlinesMd>
|
|
6
|
-
<ListInput
|
|
7
|
-
label="Name"
|
|
8
|
-
type="text"
|
|
9
|
-
placeholder="Your name"
|
|
10
|
-
></ListInput>
|
|
11
|
-
|
|
12
|
-
<ListInput
|
|
13
|
-
label="E-mail"
|
|
14
|
-
type="email"
|
|
15
|
-
placeholder="E-mail"
|
|
16
|
-
></ListInput>
|
|
17
|
-
|
|
18
|
-
<ListInput
|
|
19
|
-
label="URL"
|
|
20
|
-
type="url"
|
|
21
|
-
placeholder="URL"
|
|
22
|
-
></ListInput>
|
|
23
|
-
|
|
24
|
-
<ListInput
|
|
25
|
-
label="Password"
|
|
26
|
-
type="password"
|
|
27
|
-
placeholder="Password"
|
|
28
|
-
></ListInput>
|
|
29
|
-
|
|
30
|
-
<ListInput
|
|
31
|
-
label="Phone"
|
|
32
|
-
type="tel"
|
|
33
|
-
placeholder="Phone"
|
|
34
|
-
></ListInput>
|
|
35
|
-
|
|
36
|
-
<ListInput
|
|
37
|
-
label="Gender"
|
|
38
|
-
type="select"
|
|
39
|
-
>
|
|
40
|
-
<option>Male</option>
|
|
41
|
-
<option>Female</option>
|
|
42
|
-
</ListInput>
|
|
43
|
-
|
|
44
|
-
<ListInput
|
|
45
|
-
label="Birth date"
|
|
46
|
-
type="date"
|
|
47
|
-
placeholder="Birth day"
|
|
48
|
-
value="2014-04-30"
|
|
49
|
-
></ListInput>
|
|
50
|
-
|
|
51
|
-
<ListItem
|
|
52
|
-
title="Toggle"
|
|
53
|
-
>
|
|
54
|
-
<span slot="after">
|
|
55
|
-
<Toggle />
|
|
56
|
-
</span>
|
|
57
|
-
</ListItem>
|
|
58
|
-
|
|
59
|
-
<ListInput
|
|
60
|
-
label="Range"
|
|
61
|
-
input={false}
|
|
62
|
-
>
|
|
63
|
-
<span slot="after">
|
|
64
|
-
<Range value={50} min={0} max={100} step={1} />
|
|
65
|
-
</span>
|
|
66
|
-
</ListInput>
|
|
67
|
-
|
|
68
|
-
<ListInput
|
|
69
|
-
type="textarea"
|
|
70
|
-
label="Textarea"
|
|
71
|
-
placeholder="Bio"
|
|
72
|
-
></ListInput>
|
|
73
|
-
<ListInput
|
|
74
|
-
type="textarea"
|
|
75
|
-
label="Resizable"
|
|
76
|
-
placeholder="Bio"
|
|
77
|
-
resizable
|
|
78
|
-
></ListInput>
|
|
79
|
-
</List>
|
|
80
|
-
|
|
81
|
-
<BlockTitle>Buttons</BlockTitle>
|
|
82
|
-
<Block strong>
|
|
83
|
-
<Row tag="p">
|
|
84
|
-
<Button class="col">Button</Button>
|
|
85
|
-
<Button class="col" fill>Fill</Button>
|
|
86
|
-
</Row>
|
|
87
|
-
<Row tag="p">
|
|
88
|
-
<Button class="col" raised>Raised</Button>
|
|
89
|
-
<Button class="col" raised fill>Raised Fill</Button>
|
|
90
|
-
</Row>
|
|
91
|
-
<Row tag="p">
|
|
92
|
-
<Button class="col" round>Round</Button>
|
|
93
|
-
<Button class="col" round fill>Round Fill</Button>
|
|
94
|
-
</Row>
|
|
95
|
-
<Row tag="p">
|
|
96
|
-
<Button class="col" outline>Outline</Button>
|
|
97
|
-
<Button class="col" round outline>Outline Round</Button>
|
|
98
|
-
</Row>
|
|
99
|
-
<Row tag="p">
|
|
100
|
-
<Button class="col" small outline>Small</Button>
|
|
101
|
-
<Button class="col" small round outline>Small Round</Button>
|
|
102
|
-
</Row>
|
|
103
|
-
<Row tag="p">
|
|
104
|
-
<Button class="col" small fill>Small</Button>
|
|
105
|
-
<Button class="col" small round fill>Small Round</Button>
|
|
106
|
-
</Row>
|
|
107
|
-
<Row tag="p">
|
|
108
|
-
<Button class="col" large raised>Large</Button>
|
|
109
|
-
<Button class="col" large fill raised>Large Fill</Button>
|
|
110
|
-
</Row>
|
|
111
|
-
<Row tag="p">
|
|
112
|
-
<Button class="col" large fill raised color="red">Large Red</Button>
|
|
113
|
-
<Button class="col" large fill raised color="green">Large Green</Button>
|
|
114
|
-
</Row>
|
|
115
|
-
</Block>
|
|
116
|
-
|
|
117
|
-
<BlockTitle>Checkbox group</BlockTitle>
|
|
118
|
-
<List>
|
|
119
|
-
<ListItem
|
|
120
|
-
checkbox
|
|
121
|
-
name="my-checkbox"
|
|
122
|
-
value="Books"
|
|
123
|
-
title="Books"
|
|
124
|
-
></ListItem>
|
|
125
|
-
<ListItem
|
|
126
|
-
checkbox
|
|
127
|
-
name="my-checkbox"
|
|
128
|
-
value="Movies"
|
|
129
|
-
title="Movies"
|
|
130
|
-
></ListItem>
|
|
131
|
-
<ListItem
|
|
132
|
-
checkbox
|
|
133
|
-
name="my-checkbox"
|
|
134
|
-
value="Food"
|
|
135
|
-
title="Food"
|
|
136
|
-
></ListItem>
|
|
137
|
-
</List>
|
|
138
|
-
|
|
139
|
-
<BlockTitle>Radio buttons group</BlockTitle>
|
|
140
|
-
<List>
|
|
141
|
-
<ListItem
|
|
142
|
-
radio
|
|
143
|
-
name="radio"
|
|
144
|
-
value="Books"
|
|
145
|
-
title="Books"
|
|
146
|
-
></ListItem>
|
|
147
|
-
<ListItem
|
|
148
|
-
radio
|
|
149
|
-
name="radio"
|
|
150
|
-
value="Movies"
|
|
151
|
-
title="Movies"
|
|
152
|
-
></ListItem>
|
|
153
|
-
<ListItem
|
|
154
|
-
radio
|
|
155
|
-
name="radio"
|
|
156
|
-
value="Food"
|
|
157
|
-
title="Food"
|
|
158
|
-
></ListItem>
|
|
159
|
-
</List>
|
|
160
|
-
</Page>
|
|
161
|
-
<script>
|
|
162
|
-
import {
|
|
163
|
-
Page,
|
|
164
|
-
Navbar,
|
|
165
|
-
List,
|
|
166
|
-
ListInput,
|
|
167
|
-
ListItem,
|
|
168
|
-
Toggle,
|
|
169
|
-
BlockTitle,
|
|
170
|
-
Row,
|
|
171
|
-
Button,
|
|
172
|
-
Range,
|
|
173
|
-
Block
|
|
174
|
-
} from 'zmp-svelte';
|
|
175
|
-
</script>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<zmp-navbar>
|
|
3
|
-
<zmp-nav-left>
|
|
4
|
-
<zmp-skeleton-avatar v-if="!user.id" class="pt-2"></zmp-skeleton-avatar>
|
|
5
|
-
<zmp-avatar v-else :src="user.avatar" online />
|
|
6
|
-
</zmp-nav-left>
|
|
7
|
-
<zmp-nav-title v-if="!user.id">
|
|
8
|
-
<zmp-skeleton-text>
|
|
9
|
-
<zmp-title class="mb-0">Lorem ipsum</zmp-title>
|
|
10
|
-
</zmp-skeleton-text>
|
|
11
|
-
<zmp-skeleton-text>Lorem ipsum</zmp-skeleton-text>
|
|
12
|
-
</zmp-nav-title>
|
|
13
|
-
<zmp-nav-title v-else>
|
|
14
|
-
<zmp-title class="mb-0">{{ user.name }}</zmp-title>
|
|
15
|
-
<zmp-text class="mb-0">{{ user.id }}</zmp-text>
|
|
16
|
-
</zmp-nav-title>
|
|
17
|
-
<zmp-nav-right>
|
|
18
|
-
<sun-and-moon />
|
|
19
|
-
</zmp-nav-right>
|
|
20
|
-
</zmp-navbar>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script setup>
|
|
24
|
-
import { useStore } from "zmp-vue";
|
|
25
|
-
import SunAndMoon from "./sun-and-moon.vue";
|
|
26
|
-
|
|
27
|
-
const user = useStore('user')
|
|
28
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<zmp-button
|
|
3
|
-
small
|
|
4
|
-
class="sun-moon"
|
|
5
|
-
@click="setLayoutTheme"
|
|
6
|
-
type-name="primary"
|
|
7
|
-
round
|
|
8
|
-
:color="darkMode ? 'gray' : 'default'"
|
|
9
|
-
>
|
|
10
|
-
<img :src="icon" alt="switch-mode" />
|
|
11
|
-
</zmp-button>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup>
|
|
15
|
-
import { useStore } from 'zmp-vue';
|
|
16
|
-
import { computed } from 'vue';
|
|
17
|
-
import store from '../store';
|
|
18
|
-
import sun from '../static/icons/sun.svg';
|
|
19
|
-
import moon from '../static/icons/moon.svg';
|
|
20
|
-
|
|
21
|
-
const darkMode = useStore('darkMode');
|
|
22
|
-
|
|
23
|
-
const icon = computed(() => (darkMode.value ? moon : sun));
|
|
24
|
-
|
|
25
|
-
const setLayoutTheme = () => {
|
|
26
|
-
store.dispatch('setDarkMode', !darkMode.value);
|
|
27
|
-
};
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<style scoped>
|
|
31
|
-
.sun-moon {
|
|
32
|
-
padding: 0;
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("path"),o=require("./generate-home-page"),s=require("./generate-root"),r=require("../generate-store");module.exports=n=>{let t=n.cwd||process.cwd(),{bundler:c}=n,v=[];return["settings"].forEach(o=>{let s=e.resolve(__dirname,"pages",`${o}.vue`),r=e.resolve(t,"src","pages",`${o}.vue`);v.push({from:s,to:r})}),v.push({content:o(n),to:e.resolve(t,"src","pages","index.vue")}),v.push({content:s(n),to:e.resolve(t,"src","components","app.vue")}),v.push({content:r(n),to:e.resolve(t,"src","store.js")}),v.push({from:e.resolve(__dirname,"vite.config.js"),to:e.resolve(t,"vite.config.js")}),v.push({from:e.resolve(__dirname,"global-components.d.ts"),to:e.resolve(t,"src","global-components.d.ts")}),v.push({from:e.resolve(__dirname,"components","header.vue"),to:e.resolve(t,"src","components","header.vue")}),v.push({from:e.resolve(__dirname,"components","sun-and-moon.vue"),to:e.resolve(t,"src","components","sun-and-moon.vue")}),v.push({from:e.resolve(__dirname,"icons","sun.svg"),to:e.resolve(t,"src","static","icons","sun.svg")}),v.push({from:e.resolve(__dirname,"icons","moon.svg"),to:e.resolve(t,"src","static","icons","moon.svg")}),c&&v.push({from:e.resolve(__dirname,"babel.config.js"),to:e.resolve(t,"babel.config.js")}),v};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("../../utils/indent");module.exports=t=>{let{name:o,template:m}=t;return e(0,`
|
|
2
|
-
<template>
|
|
3
|
-
<zmp-page name="home" :theme-dark="darkMode">
|
|
4
|
-
<Header />
|
|
5
|
-
<zmp-box m="4">
|
|
6
|
-
<zmp-card inset title="Welcome to Zalo Mini App. Let's see what we have here.">
|
|
7
|
-
<p>
|
|
8
|
-
Recommended IDE Setup:
|
|
9
|
-
<a
|
|
10
|
-
href="https://code.visualstudio.com/"
|
|
11
|
-
target="_blank"
|
|
12
|
-
rel="nofollow"
|
|
13
|
-
>VSCode</a> +
|
|
14
|
-
<a
|
|
15
|
-
href="https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar"
|
|
16
|
-
target="_blank"
|
|
17
|
-
rel="nofollow"
|
|
18
|
-
>Volar</a>
|
|
19
|
-
</p>
|
|
20
|
-
<zmp-button @click="openDocs" fill responsive>Documentation</zmp-button>
|
|
21
|
-
</zmp-card>
|
|
22
|
-
</zmp-box>
|
|
23
|
-
<zmp-box m="4">
|
|
24
|
-
<zmp-card inset class="p-0">
|
|
25
|
-
<zmp-box flex justify-content="space-between" align-items="center">
|
|
26
|
-
<zmp-text bold class="mb-0">Example navigation</zmp-text>
|
|
27
|
-
<zmp-link href="/settings" transition="zmp-fade">
|
|
28
|
-
Settings
|
|
29
|
-
<zmp-icon zmp="zi-chevron-right" />
|
|
30
|
-
</zmp-link>
|
|
31
|
-
</zmp-box>
|
|
32
|
-
</zmp-card>
|
|
33
|
-
</zmp-box>
|
|
34
|
-
</zmp-page>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script setup>
|
|
38
|
-
import { useStore } from 'zmp-vue';
|
|
39
|
-
import api from 'zmp-sdk';
|
|
40
|
-
import Header from "../components/header.vue";
|
|
41
|
-
|
|
42
|
-
const openDocs = () => {
|
|
43
|
-
api.openWebview({
|
|
44
|
-
url: 'https://mini.zalo.me'
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const darkMode = useStore('darkMode');
|
|
49
|
-
</script>
|
|
50
|
-
`).trim()};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("../../utils/indent");require("../../utils/template-if");const e=require("../app-parameters");module.exports=t=>{let{template:a,type:p,theming:s,customBuild:m}=t;return r(0,`
|
|
2
|
-
<template>
|
|
3
|
-
<zmp-app v-bind="zmpparams">
|
|
4
|
-
<!-- Your main view, should have "view-main" class -->
|
|
5
|
-
<zmp-view main class="safe-areas" url="/"></zmp-view>
|
|
6
|
-
</zmp-app>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
import { onMounted } from 'vue';
|
|
10
|
-
import { zmpready } from 'zmp-vue';
|
|
11
|
-
import api from 'zmp-sdk';
|
|
12
|
-
import store from '../store';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
setup() {
|
|
16
|
-
// ZMP Parameters
|
|
17
|
-
const zmpparams = {
|
|
18
|
-
${r(6,e(t)).trim()}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
onMounted(() => {
|
|
22
|
-
zmpready(async () => {
|
|
23
|
-
// Call ZMP APIs here
|
|
24
|
-
try {
|
|
25
|
-
await api.login();
|
|
26
|
-
const { userInfo } = await api.getUserInfo();
|
|
27
|
-
store.dispatch('setUser', userInfo);
|
|
28
|
-
} catch (error) {
|
|
29
|
-
console.error(error);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
zmpparams
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
`).trim()};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=t=>{let{template:e}=t;return["settings"]};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";const p=require("../../utils/template-if"),t=require("../../utils/indent"),o=require("../../utils/styles-extension");module.exports=e=>{let{cssPreProcessor:s,theming:r,customBuild:m,includeTailwind:i}=e,n="";return(n+=t(0,`
|
|
2
|
-
// Import Vue
|
|
3
|
-
import { createApp } from 'vue';
|
|
4
|
-
|
|
5
|
-
// Import ZMP
|
|
6
|
-
import ZMP from '${m?"./zmp-custom.js":"zmp-framework/core/lite-bundle"}';
|
|
7
|
-
|
|
8
|
-
// Import ZMP-Vue Plugin
|
|
9
|
-
import ZMPVue, { registerComponents } from 'zmp-vue/bundle';${i?`
|
|
10
|
-
|
|
11
|
-
// Import tailwind styles
|
|
12
|
-
import './css/tailwind.css';`:""}
|
|
13
|
-
|
|
14
|
-
// Import ZMP Styles
|
|
15
|
-
${p(m,()=>`
|
|
16
|
-
import '../css/zmp-custom.less';
|
|
17
|
-
`,()=>`
|
|
18
|
-
import 'zmp-framework/zmp-bundle.min.css';
|
|
19
|
-
`)}
|
|
20
|
-
|
|
21
|
-
// Import Icons and App Custom Styles
|
|
22
|
-
${p(r.iconFonts,()=>`
|
|
23
|
-
import './css/icons.css';
|
|
24
|
-
`)}
|
|
25
|
-
import './css/app.${o(s)}';
|
|
26
|
-
|
|
27
|
-
// Import App Component
|
|
28
|
-
import App from './components/app.vue';
|
|
29
|
-
import appConfig from '../app-config.json';
|
|
30
|
-
|
|
31
|
-
if (!window.APP_CONFIG) {
|
|
32
|
-
window.APP_CONFIG = appConfig;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Init ZMP-Vue Plugin
|
|
36
|
-
ZMP.use(ZMPVue);
|
|
37
|
-
|
|
38
|
-
// Init App
|
|
39
|
-
const app = createApp(App);
|
|
40
|
-
|
|
41
|
-
// Register ZMP Vue components
|
|
42
|
-
registerComponents(app);
|
|
43
|
-
|
|
44
|
-
// Mount the app
|
|
45
|
-
app.mount('#app');
|
|
46
|
-
`)).trim()};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|