zmp-cli 3.15.7 → 3.15.8
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 +37 -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
package/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x3ddb(_0x4b0520,_0x2dee16){const _0xc8824d=_0xc882();return _0x3ddb=function(_0x3ddbe6,_0x32d51b){_0x3ddbe6=_0x3ddbe6-0xa6;let _0x42f639=_0xc8824d[_0x3ddbe6];return _0x42f639;},_0x3ddb(_0x4b0520,_0x2dee16);}const _0x505bb0=_0x3ddb;(function(_0x5817ba,_0x4d00ea){const _0x1fad93=_0x3ddb,_0x4c3ec4=_0x5817ba();while(!![]){try{const _0x53e17a=parseInt(_0x1fad93(0xb6))/0x1*(-parseInt(_0x1fad93(0xb1))/0x2)+-parseInt(_0x1fad93(0xb0))/0x3+parseInt(_0x1fad93(0xb2))/0x4*(parseInt(_0x1fad93(0xae))/0x5)+-parseInt(_0x1fad93(0xb7))/0x6*(-parseInt(_0x1fad93(0xb9))/0x7)+parseInt(_0x1fad93(0xa7))/0x8*(-parseInt(_0x1fad93(0xab))/0x9)+-parseInt(_0x1fad93(0xb5))/0xa+parseInt(_0x1fad93(0xac))/0xb*(parseInt(_0x1fad93(0xaa))/0xc);if(_0x53e17a===_0x4d00ea)break;else _0x4c3ec4['push'](_0x4c3ec4['shift']());}catch(_0x371f44){_0x4c3ec4['push'](_0x4c3ec4['shift']());}}}(_0xc882,0x62a81));function _0xc882(){const _0x28de69=['8369vazFNw','19374NaSNDg','exports','1435UIfUfu','succeed','16yhggAN','instance','text','12pAdTYq','1109061gMXejO','4489529NnpHoI','ora','32245rGIIRq','fail','693351CUuvpI','106qllnGc','428UmRIRg','start','green','4348980NCAjzO'];_0xc882=function(){return _0x28de69;};return _0xc882();}const n=require(_0x505bb0(0xad)),e={'instance':null,'start'(_0x15b535){const _0x477096=_0x505bb0;e[_0x477096(0xa8)]=n({'color':_0x477096(0xb4),'text':_0x15b535})[_0x477096(0xb3)]();},'done'(_0x128c9f){const _0x488119=_0x505bb0;e[_0x488119(0xa8)]&&e[_0x488119(0xa8)][_0x488119(0xa6)](_0x128c9f);},'end'(..._0x424258){e['done'](..._0x424258);},'fail'(_0x1a5da3){const _0x340bb4=_0x505bb0;e[_0x340bb4(0xa8)]&&e[_0x340bb4(0xa8)]['fail'](_0x1a5da3);},'error'(_0x285571){const _0x4d5a70=_0x505bb0;e[_0x4d5a70(0xa8)]&&e[_0x4d5a70(0xa8)][_0x4d5a70(0xaf)](_0x285571);},'text'(_0x515b27){const _0x871c65=_0x505bb0;e[_0x871c65(0xa8)]&&(e['instance'][_0x871c65(0xa9)]=_0x515b27);}};module[_0x505bb0(0xb8)]=e;
|
package/utils/tunnel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x5333cf=_0x200e;(function(_0x543091,_0x40ec6b){const _0x24d270=_0x200e,_0x1c25b0=_0x543091();while(!![]){try{const _0x3f5732=parseInt(_0x24d270(0x115))/0x1+-parseInt(_0x24d270(0x10e))/0x2+parseInt(_0x24d270(0x10f))/0x3*(parseInt(_0x24d270(0x117))/0x4)+parseInt(_0x24d270(0x11d))/0x5*(parseInt(_0x24d270(0x112))/0x6)+parseInt(_0x24d270(0x111))/0x7+-parseInt(_0x24d270(0x118))/0x8*(-parseInt(_0x24d270(0x113))/0x9)+-parseInt(_0x24d270(0x114))/0xa*(parseInt(_0x24d270(0x11e))/0xb);if(_0x3f5732===_0x40ec6b)break;else _0x1c25b0['push'](_0x1c25b0['shift']());}catch(_0x5a60ae){_0x1c25b0['push'](_0x1c25b0['shift']());}}}(_0x1821,0xa6fdf));function _0x1821(){const _0x1776f2=['64wKfvJI','localtunnel','https://','exports','TUNNEL_SERVER_HOST','786875RsoIXf','12529Iaoatr','1024872xxxauH','48xTydVt','./constants','516530QfzoCL','42HvHxGY','172863dCXOSO','4150OykUid','164801UsIQUj','map','43812mljQGl'];_0x1821=function(){return _0x1776f2;};return _0x1821();}const t=require(_0x5333cf(0x119)),{deviceModeSetup:e}=require(_0x5333cf(0x110)),n={};async function r(_0x3f2e1e,_0x256d2d){const _0x23e4b8=_0x5333cf;let _0x15deef=await t({'port':_0x3f2e1e,'host':_0x23e4b8(0x11a)+e[_0x23e4b8(0x11c)],'subdomain':_0x256d2d});return n[_0x15deef['url']]=_0x15deef,_0x15deef['url'];}async function s(_0x1a162a){let _0x2fc9a8=n[_0x1a162a];return!!_0x2fc9a8&&(_0x2fc9a8['close'](),!0x0);}function _0x200e(_0x5c87ca,_0x327650){const _0x18210c=_0x1821();return _0x200e=function(_0x200e29,_0x395a49){_0x200e29=_0x200e29-0x10e;let _0x3fecae=_0x18210c[_0x200e29];return _0x3fecae;},_0x200e(_0x5c87ca,_0x327650);}async function u(){const _0x2d69c8=_0x5333cf;return(await Promise['all'](Object['keys'](n)[_0x2d69c8(0x116)](_0x127f1d=>s(_0x127f1d))))['reduce']((_0x304f4c,_0x57ba61)=>_0x304f4c+(_0x57ba61?0x1:0x0),0x0);}module[_0x5333cf(0x11b)]={'openTunnel':r,'closeTunnel':s,'closeAllTunnels':u};
|
package/create/init-zmp-ui.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x584257=_0x55e6;function _0x214f(){const _0x303ce7=['Error\x20creating\x20required\x20folders\x20structure','text','Generating\x20app-config.json','\x0a\x20\x20-\x20📖\x20Visit\x20documentation\x20at\x20','README.md','3846kjtmtv','../utils/fs-extra','content','(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','./utils/generate-package-json','icon','name','description','Creating\x20project\x20files','27rLtxxO','2480srQCDL','406200otkAAn','zmpConfig','all','\x0a\x20\x20-\x20📖\x20Check\x20','success','copyFileAsync','exit','\x20💪\x0a\x0a','statusStart','\x20--save-dev','gray','52323RfCmLC','Executing\x20NPM\x20Scripts','map','stderr','cwd','Error\x20installing\x20NPM\x20Dependencies','620144GJIbTf','package.json','filename','./templates/copy-assets','Done!','./templates/create-folders','exports','Error\x20executing\x20NPM\x20Scripts','info','\x0a\x20\x20','\x20&&\x20npm\x20install\x20','path','\x22\x20-\x20','join','from','bold','./utils/generate-readme','error','devDependencies','Error\x20creating\x20project\x20files','Next\x20steps:','Creating\x20required\x20folders\x20structure','../utils/log','Error\x20installing\x20NPM\x20Dev\x20Dependencies','\x20--save','cd\x20','.gitignore','newProject','\x20Run\x20\x22npm\x20run\x20','writeFileSync','chalk','2399792zHAYCO','postInstall','Installing\x20NPM\x20Dependencies','dependencies','replace','stringify','promise','398876ipdyZg','../config','statusError','https://mini.zalo.me/','28ZCIJrK','statusDone','2886224LsPIPL','npm\x20install\x20','1rUTjdH'];_0x214f=function(){return _0x303ce7;};return _0x214f();}function _0x55e6(_0x4cfce8,_0x4318e7){const _0x214fca=_0x214f();return _0x55e6=function(_0x55e6be,_0x2843f6){_0x55e6be=_0x55e6be-0x1ac;let _0x1f3029=_0x214fca[_0x55e6be];return _0x1f3029;},_0x55e6(_0x4cfce8,_0x4318e7);}(function(_0x40bd7b,_0x35ef7d){const _0x475875=_0x55e6,_0x27b464=_0x40bd7b();while(!![]){try{const _0x3d6d87=-parseInt(_0x475875(0x1eb))/0x1*(parseInt(_0x475875(0x1e3))/0x2)+parseInt(_0x475875(0x1b7))/0x3*(parseInt(_0x475875(0x1e7))/0x4)+-parseInt(_0x475875(0x1fb))/0x5*(-parseInt(_0x475875(0x1f1))/0x6)+parseInt(_0x475875(0x1bd))/0x7+-parseInt(_0x475875(0x1dc))/0x8+parseInt(_0x475875(0x1fa))/0x9*(-parseInt(_0x475875(0x1ac))/0xa)+parseInt(_0x475875(0x1e9))/0xb;if(_0x3d6d87===_0x35ef7d)break;else _0x27b464['push'](_0x27b464['shift']());}catch(_0x19455f){_0x27b464['push'](_0x27b464['shift']());}}}(_0x214f,0x296ff));const e=require('exec-sh'),t=require(_0x584257(0x1c8)),r=require(_0x584257(0x1db)),n=require('log-symbols'),s=require(_0x584257(0x1f2)),i=require(_0x584257(0x1f5)),a=require('./utils/generate-npm-scripts'),o=require('./utils/generate-app-config'),c=require(_0x584257(0x1c2)),l=require(_0x584257(0x1c0)),u=require(_0x584257(0x1cd)),p=require('./utils/generate-gitignore'),g=require(_0x584257(0x1d3)),d=require(_0x584257(0x1e4)),m=r[_0x584257(0x1b6)](_0x584257(0x1f4));module[_0x584257(0x1c3)]=async(_0x241a96={},_0x4ebdba,{exitOnError:_0x4f98b4=!0x0,iconFile:_0x2a5392=null}={})=>{const _0x25e889=_0x584257;let _0x406162=_0x241a96[_0x25e889(0x1bb)]||process['cwd'](),_0x1f695b=_0x406162===process['cwd']();function _0x4fb5aa(_0x3719ec){const _0x24786d=_0x25e889;g[_0x24786d(0x1ce)](_0x3719ec[_0x24786d(0x1ba)]||_0x3719ec),_0x4f98b4&&process[_0x24786d(0x1b2)](0x1);}_0x4ebdba||(_0x4ebdba={'statusStart'(){},'statusDone'(){},'statusError'(){},'text'(){},'error'(){}}),_0x4ebdba[_0x25e889(0x1b4)](_0x25e889(0x1ee));let _0x3ccb3a=o(_0x241a96);if(s[_0x25e889(0x1da)](t[_0x25e889(0x1ca)](_0x406162,d['filename']['appConfig']),_0x3ccb3a[_0x25e889(0x1f3)]),_0x4ebdba[_0x25e889(0x1e8)](_0x25e889(0x1ee)),!_0x241a96[_0x25e889(0x1d8)]){let _0x18059a=a(['r'])[_0x25e889(0x1b9)](_0x184b61=>_0x184b61[_0x25e889(0x1f6)]+_0x25e889(0x1d9)+_0x184b61[_0x25e889(0x1f7)]+_0x25e889(0x1c9)+_0x184b61[_0x25e889(0x1f8)]);_0x4ebdba['text'](_0x18059a[_0x25e889(0x1ca)]('\x0a')),process[_0x25e889(0x1b2)](0x0);}_0x4ebdba[_0x25e889(0x1b4)]('Generating\x20package.json');let _0x34005d=i(_0x241a96);s[_0x25e889(0x1da)](t[_0x25e889(0x1ca)](_0x406162,_0x25e889(0x1be)),_0x34005d[_0x25e889(0x1f3)]),s[_0x25e889(0x1da)](t[_0x25e889(0x1ca)](_0x406162,d[_0x25e889(0x1bf)][_0x25e889(0x1ad)]),JSON[_0x25e889(0x1e1)](_0x241a96,'',0x2)),_0x4ebdba[_0x25e889(0x1e8)]('Generating\x20package.json'),_0x4ebdba[_0x25e889(0x1b4)]('Creating\x20required\x20folders\x20structure');try{c(_0x241a96);}catch(_0x33c18d){_0x4ebdba[_0x25e889(0x1e5)](_0x25e889(0x1ec)),_0x4fb5aa(_0x33c18d);}_0x4ebdba[_0x25e889(0x1e8)](_0x25e889(0x1d2)),_0x4ebdba[_0x25e889(0x1b4)]('Installing\x20NPM\x20Dependencies\x20'+m);try{_0x1f695b?await e[_0x25e889(0x1e2)](_0x25e889(0x1ea)+_0x34005d[_0x25e889(0x1df)][_0x25e889(0x1ca)]('\x20')+_0x25e889(0x1d5),!0x0):await e[_0x25e889(0x1e2)]('cd\x20'+_0x406162[_0x25e889(0x1e0)](/ /g,'\x5c\x20')+'\x20&&\x20npm\x20install\x20'+_0x34005d[_0x25e889(0x1df)][_0x25e889(0x1ca)]('\x20')+'\x20--save',!0x0);}catch(_0x39c8e2){_0x4ebdba[_0x25e889(0x1e5)](_0x25e889(0x1bc)),_0x4fb5aa(_0x39c8e2);return;}_0x4ebdba[_0x25e889(0x1e8)](_0x25e889(0x1de)),_0x4ebdba[_0x25e889(0x1b4)]('Installing\x20NPM\x20Dev\x20Dependencies\x20'+m);try{_0x1f695b?await e[_0x25e889(0x1e2)](_0x25e889(0x1ea)+_0x34005d[_0x25e889(0x1cf)][_0x25e889(0x1ca)]('\x20')+'\x20--save-dev',!0x0):await e[_0x25e889(0x1e2)](_0x25e889(0x1d6)+_0x406162[_0x25e889(0x1e0)](/ /g,'\x5c\x20')+_0x25e889(0x1c7)+_0x34005d[_0x25e889(0x1cf)][_0x25e889(0x1ca)]('\x20')+_0x25e889(0x1b5),!0x0);}catch(_0x5aa072){_0x4ebdba[_0x25e889(0x1e5)](_0x25e889(0x1d4)),_0x4fb5aa(_0x5aa072);return;}if(_0x4ebdba['statusDone']('Installing\x20NPM\x20Dev\x20Dependencies'),_0x34005d['postInstall']&&_0x34005d[_0x25e889(0x1dd)]['length']){_0x4ebdba['statusStart'](_0x25e889(0x1b8));try{_0x1f695b?await e[_0x25e889(0x1e2)]('npm\x20run\x20postinstall',!0x0):await e[_0x25e889(0x1e2)](_0x25e889(0x1d6)+_0x406162[_0x25e889(0x1e0)](/ /g,'\x5c\x20')+'\x20&&\x20npm\x20run\x20postinstall',!0x0);}catch(_0x5d30e3){_0x4ebdba[_0x25e889(0x1e5)](_0x25e889(0x1c4)),_0x4fb5aa(_0x5d30e3);return;}_0x4ebdba[_0x25e889(0x1e8)](_0x25e889(0x1b8));}_0x4ebdba[_0x25e889(0x1b4)]('Creating\x20project\x20files');let _0x24a7ea=l(_0x241a96,_0x2a5392);try{await Promise[_0x25e889(0x1ae)](_0x24a7ea[_0x25e889(0x1b9)](_0x258225=>_0x258225[_0x25e889(0x1cb)]?s[_0x25e889(0x1b1)](_0x258225[_0x25e889(0x1cb)],_0x258225['to']):_0x258225[_0x25e889(0x1f3)]?s['writeFileAsync'](_0x258225['to'],_0x258225[_0x25e889(0x1f3)]):Promise['resolve']()));}catch(_0x4ef002){_0x4ebdba[_0x25e889(0x1e5)]('Error\x20creating\x20project\x20files'),_0x4fb5aa(_0x4ef002);return;}let _0x924b9f=u(_0x241a96);try{s[_0x25e889(0x1da)](t[_0x25e889(0x1ca)](_0x406162,_0x25e889(0x1f0)),_0x924b9f);}catch(_0x35b32d){_0x4ebdba['statusError'](_0x25e889(0x1d0)),_0x4fb5aa(_0x35b32d);return;}let _0xfc2955=p(_0x241a96);try{s[_0x25e889(0x1da)](t[_0x25e889(0x1ca)](_0x406162,_0x25e889(0x1d7)),_0xfc2955);}catch(_0x44a533){_0x4ebdba[_0x25e889(0x1e5)](_0x25e889(0x1d0)),_0x4fb5aa(_0x44a533);return;}_0x4ebdba[_0x25e889(0x1e8)](_0x25e889(0x1f9));let _0x3d70c6=a(['s','r'])[_0x25e889(0x1b9)](_0x48cc5a=>'-\x20'+_0x48cc5a[_0x25e889(0x1f6)]+'\x20Run\x20\x22npm\x20run\x20'+_0x48cc5a[_0x25e889(0x1f7)]+'\x22\x20-\x20'+_0x48cc5a[_0x25e889(0x1f8)]),_0x139175='\x0a'+r[_0x25e889(0x1cc)](n[_0x25e889(0x1b0)])+'\x20'+r[_0x25e889(0x1cc)](_0x25e889(0x1c1))+_0x25e889(0x1b3)+r[_0x25e889(0x1cc)](n[_0x25e889(0x1c5)])+'\x20'+r[_0x25e889(0x1cc)](_0x25e889(0x1d1))+_0x25e889(0x1c6)+_0x3d70c6['join'](_0x25e889(0x1c6))+_0x25e889(0x1ef)+r[_0x25e889(0x1cc)](_0x25e889(0x1e6))+_0x25e889(0x1af)+r['bold']('README.md')+'\x20in\x20project\x20root\x20folder\x20with\x20further\x20instructions\x0a\x20\x20\x20\x20';_0x4ebdba[_0x25e889(0x1ed)](_0x139175);};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("../utils/indent"),t=require("../utils/template-if");module.exports=o=>{let{framework:p,pkg:n,name:r,bundler:i,stateManagement:m}=o;return e(0,`
|
|
2
|
-
name: '${r}', // App name
|
|
3
|
-
theme: 'auto', // Automatic theme detection
|
|
4
|
-
${t("store"===m,()=>`
|
|
5
|
-
// App store
|
|
6
|
-
store: store,
|
|
7
|
-
`)}
|
|
8
|
-
${t("core"===p,()=>"el: '#app', // App root element")}
|
|
9
|
-
${t("core"===p&&i,()=>"component: App, // App main component")}
|
|
10
|
-
${t(n,()=>`id: '${n}', // App bundle ID`)}
|
|
11
|
-
${t("core"===p,()=>` on: {
|
|
12
|
-
init: function () {
|
|
13
|
-
var zmp = this;
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
`)}
|
|
17
|
-
`).trim()};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/* Material Icons Font (for MD theme) */
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: 'Material Icons';
|
|
4
|
-
font-style: normal;
|
|
5
|
-
font-weight: 400;
|
|
6
|
-
src: url(//h5.zdn.vn/static/fonts/MaterialIcons-Regular.eot);
|
|
7
|
-
src: local('Material Icons'),
|
|
8
|
-
local('MaterialIcons-Regular'),
|
|
9
|
-
url(//h5.zdn.vn/static/fonts/MaterialIcons-Regular.woff2) format('woff2'),
|
|
10
|
-
url(//h5.zdn.vn/static/fonts/MaterialIcons-Regular.woff) format('woff'),
|
|
11
|
-
url(//h5.zdn.vn/static/fonts/MaterialIcons-Regular.ttf) format('truetype');
|
|
12
|
-
}
|
|
13
|
-
.material-icons {
|
|
14
|
-
font-family: 'Material Icons';
|
|
15
|
-
font-weight: normal;
|
|
16
|
-
font-style: normal;
|
|
17
|
-
font-size: 24px;
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
line-height: 1;
|
|
20
|
-
text-transform: none;
|
|
21
|
-
letter-spacing: normal;
|
|
22
|
-
word-wrap: normal;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
direction: ltr;
|
|
25
|
-
-webkit-font-smoothing: antialiased;
|
|
26
|
-
text-rendering: optimizeLegibility;
|
|
27
|
-
-moz-osx-font-smoothing: grayscale;
|
|
28
|
-
font-feature-settings: 'liga';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* ZMP Icons Font (for iOS theme) */
|
|
32
|
-
@font-face {
|
|
33
|
-
font-family: 'ZMP Icons';
|
|
34
|
-
font-style: normal;
|
|
35
|
-
font-weight: 400;
|
|
36
|
-
src: url("//h5.zdn.vn/static/fonts/ZMPIcons-Regular-v2.woff2") format("woff2"),
|
|
37
|
-
url("//h5.zdn.vn/static/fonts/ZMPIcons-Regular-v2.woff") format("woff"),
|
|
38
|
-
url("//h5.zdn.vn/static/fonts/ZMPIcons-Regular-v2.ttf") format("truetype");
|
|
39
|
-
}
|
|
40
|
-
.zmp-icons {
|
|
41
|
-
font-family: 'ZMP Icons';
|
|
42
|
-
font-weight: normal;
|
|
43
|
-
font-style: normal;
|
|
44
|
-
font-size: 28px;
|
|
45
|
-
line-height: 1;
|
|
46
|
-
letter-spacing: normal;
|
|
47
|
-
text-transform: none;
|
|
48
|
-
display: inline-flex;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
word-wrap: normal;
|
|
51
|
-
direction: ltr;
|
|
52
|
-
-webkit-font-smoothing: antialiased;
|
|
53
|
-
text-rendering: optimizeLegibility;
|
|
54
|
-
-moz-osx-font-smoothing: grayscale;
|
|
55
|
-
-webkit-font-feature-settings: "liga";
|
|
56
|
-
-moz-font-feature-settings: "liga=1";
|
|
57
|
-
-moz-font-feature-settings: "liga";
|
|
58
|
-
font-feature-settings: "liga";
|
|
59
|
-
text-align: center;
|
|
60
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("webpack"),r=require("ora"),o=require("rimraf"),s=require("chalk"),i=require("./webpack.config.js"),c=process.env.NODE_ENV||"development";process.env.TARGET;const n=r("production"===c?"building for production...":"building development version...");n.start(),o("./www/",r=>{if(r)throw r;e(i,(e,r)=>{if(e)throw e;n.stop(),process.stdout.write(`${r.toString({colors:!0,modules:!1,children:!1,chunks:!1,chunkModules:!1})}
|
|
2
|
-
|
|
3
|
-
`),r.hasErrors()&&(console.log(s.red("Build failed with errors.\n")),process.exit(1)),console.log(s.cyan("Build complete.\n"))})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("path"),e=require("../../utils/fs-extra"),o=require("../utils/styles-extension"),r=require("./vue/copy-assets"),t=require("./react/copy-assets"),c=require("./react-typescript/copy-assets"),n=require("./generate-index"),i=require("./generate-styles"),p=require("./generate-scripts"),l=require("./generate-zmp-custom"),a=require("./zaui/copy-assets"),{projectFramework:m}=require("../../utils/constants");module.exports=(u,v)=>{let d=u.cwd||process.cwd(),{framework:_,theming:f,cssPreProcessor:h,customBuild:g,includeTailwind:w}=u,q=[];"zmp-ui"!==u.package?(_===m.VUE&&q.push(...r(u)),_===m.REACT&&q.push(...t(u)),_===m.REACT_TYPESCRIPT&&q.push(...c(u))):q.push(...a(u)),f.iconFonts&&q.push({from:s.resolve(__dirname,"common","css","icons.css"),to:s.resolve(d,"src","css","icons.css")}),w&&q.push({from:s.resolve(__dirname,"common","tailwind","tailwind.css"),to:s.resolve(d,"src","css","tailwind.css")},{from:s.resolve(__dirname,"common","tailwind","tailwind.config.js"),to:s.resolve(d,"tailwind.config.js")},{from:s.resolve(__dirname,"common","tailwind","postcss.config.js"),to:s.resolve(d,"postcss.config.js")});let y="app.js";if("react-typescript"===_&&(y="app.ts"),q.push({content:n(u),to:s.resolve(d,"index.html")},{content:i(u),to:s.resolve(d,"src","css",`app.${o(h)}`)},{content:p(u),to:s.resolve(d,"src",y)}),g){let e=l(u);q.push({content:e.styles,to:s.resolve(d,"src","css","zmp-custom.less")},{content:e.scripts,to:s.resolve(d,"src","js","zmp-custom.js")})}return w||q.push({from:s.resolve(__dirname,"common","postcss.config.js"),to:s.resolve(d,"postcss.config.js")}),e.readdirSync(s.resolve(__dirname,"common","icons")).forEach(e=>{0!==e.indexOf(".")&&q.push({from:s.resolve(__dirname,"common","icons",e),to:s.resolve(d,"src","static","icons",e)})}),v?(e.writeFileSync(s.resolve(d,"assets-src","web-icon.png"),v),e.writeFileSync(s.resolve(d,"assets-src","apple-touch-icon.png"),v)):(q.push({from:s.resolve(__dirname,"common","icons","512x512.png"),to:s.resolve(d,"assets-src","web-icon.png")}),q.push({from:s.resolve(__dirname,"common","icons","apple-touch-icon.png"),to:s.resolve(d,"assets-src","apple-touch-icon.png")})),q};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("path"),r=require("../../../utils/fs-extra"),t=require("./generate-home-page"),o=require("./generate-root"),s=require("../generate-store"),l=require("../../utils/indent");module.exports=p=>{let a=p.cwd||process.cwd(),{template:m,bundler:i}=p,n=[],u=i?"src":"www";return[..."blank"!==m?["404","about","dynamic-route","form"]:[],..."tabs"===m?["catalog","product","settings"]:[],..."split-view"===m?["left-page-1","left-page-2"]:[]].forEach(t=>{let o=e.resolve(__dirname,"pages",`${t}.html`),s=e.resolve(a,u,"pages");if("webpack"!==i)n.push({from:o,to:e.resolve(s,`${t}.html`)});else{let l=r.readFileSync(o);0!==l.trim().indexOf("<template")&&(l=`<template>
|
|
2
|
-
${l.trim()}
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
export default () => {
|
|
6
|
-
return $render;
|
|
7
|
-
};
|
|
8
|
-
</script>`),n.push({content:l,to:e.resolve(s,`${t}.zmp.html`)})}}),n.push({content:s(p),to:e.resolve(a,u,"store.js")}),i?(n.push({content:`<template>
|
|
9
|
-
${l(2,t(p).trim())}
|
|
10
|
-
</template>
|
|
11
|
-
<script>
|
|
12
|
-
export default () => {
|
|
13
|
-
return $render;
|
|
14
|
-
}
|
|
15
|
-
</script>`,to:e.resolve(a,u,"pages","home.zmp.html")}),n.push({content:o(p),to:e.resolve(a,u,"app.zmp.html")}),n.push({from:e.resolve(__dirname,"babel.config.js"),to:e.resolve(a,"babel.config.js")})):(n.push(),r.readdirSync(e.resolve(a,"node_modules","zmp-framework/core")).filter(e=>e.indexOf(".js")>=0||e.indexOf(".css")>=0||e.indexOf(".map")>=0).forEach(r=>{n.push({from:e.resolve(a,"node_modules","zmp-framework/core",r),to:e.resolve(a,u,"zmp-framework/core",r)})})),n};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("../../utils/indent");module.exports=a=>{let t;let{name:l,template:e}=a;return("single-view"===e||"blank"===e)&&(t=`
|
|
2
|
-
<p>Here is your blank ZMP app. Let's see what we have here.</p>
|
|
3
|
-
`),"split-view"===e&&(t=`
|
|
4
|
-
<p>This is an example of split view application layout, commonly used on tablets. The main approach of such kind of layout is that you can see different views at the same time.</p>
|
|
5
|
-
|
|
6
|
-
<p>Each view may have different layout, different navbar type (dynamic, fixed or static) or without navbar.</p>
|
|
7
|
-
|
|
8
|
-
<p>The fun thing is that you can easily control one view from another without any line of JavaScript just using "data-view" attribute on links.</p>
|
|
9
|
-
`),"tabs"===e&&(t=`
|
|
10
|
-
<p>This is an example of tabs-layout application. The main point of such tabbed layout is that each tab contains independent view with its own routing and navigation.</p>
|
|
11
|
-
|
|
12
|
-
<p>Each tab/view may have different layout, different navbar type (dynamic, fixed or static) or without navbar like this tab.</p>
|
|
13
|
-
`),i(0,`
|
|
14
|
-
<div class="page" data-name="home">
|
|
15
|
-
<!-- Top Navbar -->
|
|
16
|
-
${"blank"===e?`
|
|
17
|
-
<div class="navbar navbar-large">
|
|
18
|
-
<div class="navbar-bg"></div>
|
|
19
|
-
<div class="navbar-inner sliding">
|
|
20
|
-
<div class="title">${l}</div>
|
|
21
|
-
<div class="title-large">
|
|
22
|
-
<div class="title-large-text">${l}</div>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
`.trim():`
|
|
27
|
-
<div class="navbar navbar-large">
|
|
28
|
-
<div class="navbar-bg"></div>
|
|
29
|
-
<div class="navbar-inner">
|
|
30
|
-
<div class="left">
|
|
31
|
-
<a href="#" class="link icon-only panel-open" data-panel="left">
|
|
32
|
-
<i class="icon zmp-icons if-not-md">menu</i>
|
|
33
|
-
<i class="icon material-icons if-md">menu</i>
|
|
34
|
-
</a>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="title sliding">${l}</div>
|
|
37
|
-
<div class="right">
|
|
38
|
-
<a href="#" class="link icon-only panel-open" data-panel="right">
|
|
39
|
-
<i class="icon zmp-icons if-not-md">menu</i>
|
|
40
|
-
<i class="icon material-icons if-md">menu</i>
|
|
41
|
-
</a>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="title-large">
|
|
44
|
-
<div class="title-large-text">${l}</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
`.trim()}
|
|
49
|
-
${"tabs"!==e?`
|
|
50
|
-
<!-- Toolbar-->
|
|
51
|
-
<div class="toolbar toolbar-bottom">
|
|
52
|
-
<div class="toolbar-inner">
|
|
53
|
-
<a href="#" class="link">Left Link</a>
|
|
54
|
-
<a href="#" class="link">Right Link</a>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
`.trim():""}
|
|
58
|
-
<!-- Scrollable page content-->
|
|
59
|
-
<div class="page-content">
|
|
60
|
-
<div class="block block-strong">
|
|
61
|
-
${t.trim()}
|
|
62
|
-
</div>
|
|
63
|
-
${"blank"===e?"":`
|
|
64
|
-
<div class="block-title">Navigation</div>
|
|
65
|
-
<div class="list">
|
|
66
|
-
<ul>
|
|
67
|
-
<li>
|
|
68
|
-
<a href="/about/" class="item-content item-link">
|
|
69
|
-
<div class="item-inner">
|
|
70
|
-
<div class="item-title">About</div>
|
|
71
|
-
</div>
|
|
72
|
-
</a>
|
|
73
|
-
</li>
|
|
74
|
-
<li>
|
|
75
|
-
<a href="/form/" class="item-content item-link">
|
|
76
|
-
<div class="item-inner">
|
|
77
|
-
<div class="item-title">Form</div>
|
|
78
|
-
</div>
|
|
79
|
-
</a>
|
|
80
|
-
</li>
|
|
81
|
-
</ul>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div class="block-title">Modals</div>
|
|
85
|
-
<div class="block block-strong">
|
|
86
|
-
<div class="row">
|
|
87
|
-
<div class="col-50">
|
|
88
|
-
<a href="#" class="button button-raised button-fill popup-open" data-popup="#my-popup">Popup</a>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="col-50">
|
|
91
|
-
<a href="#" class="button button-raised button-fill login-screen-open" data-login-screen="#my-login-screen">Login Screen</a>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div class="block-title">Panels</div>
|
|
97
|
-
<div class="block block-strong">
|
|
98
|
-
<div class="row">
|
|
99
|
-
<div class="col-50">
|
|
100
|
-
<a href="#" class="button button-raised button-fill panel-open" data-panel="left">Left Panel</a>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="col-50">
|
|
103
|
-
<a href="#" class="button button-raised button-fill panel-open" data-panel="right">Right Panel</a>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div class="list links-list">
|
|
109
|
-
<ul>
|
|
110
|
-
<li>
|
|
111
|
-
<a href="/dynamic-route/blog/45/post/125/?foo=bar#about">Dynamic (Component) Route</a>
|
|
112
|
-
</li>
|
|
113
|
-
<li>
|
|
114
|
-
<a href="/load-something-that-doesnt-exist/">Default Route (404)</a>
|
|
115
|
-
</li>
|
|
116
|
-
</ul>
|
|
117
|
-
</div>
|
|
118
|
-
`.trim()}
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
`).trim()};
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./generate-home-page"),a=require("../../utils/indent"),e=require("../../utils/template-if");module.exports=s=>{let{template:l,bundler:t}=s,n=`
|
|
2
|
-
<!-- Left panel with cover effect-->
|
|
3
|
-
<div class="panel panel-left panel-cover theme-dark panel-init">
|
|
4
|
-
<div class="view">
|
|
5
|
-
<div class="page">
|
|
6
|
-
<div class="navbar">
|
|
7
|
-
<div class="navbar-bg"></div>
|
|
8
|
-
<div class="navbar-inner">
|
|
9
|
-
<div class="title">Left Panel</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="page-content">
|
|
13
|
-
<div class="block">Left panel content goes here</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
`.trim(),v=`
|
|
19
|
-
<!-- Left panel with cover effect -->
|
|
20
|
-
<div class="panel panel-left panel-cover theme-dark panel-init" data-visible-breakpoint="960">
|
|
21
|
-
<div class="view view-init" data-name="left">
|
|
22
|
-
<div class="page">
|
|
23
|
-
<div class="navbar">
|
|
24
|
-
<div class="navbar-bg"></div>
|
|
25
|
-
<div class="navbar-inner sliding">
|
|
26
|
-
<div class="title">Left Panel</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="page-content">
|
|
30
|
-
<div class="block-title">Left View Navigation</div>
|
|
31
|
-
<div class="list links-list">
|
|
32
|
-
<ul>
|
|
33
|
-
<li><a href="/left-page-1/">Left Page 1</a></li>
|
|
34
|
-
<li><a href="/left-page-2/">Left Page 2</a></li>
|
|
35
|
-
</ul>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="block-title">Control Main View</div>
|
|
38
|
-
<div class="list links-list">
|
|
39
|
-
<ul>
|
|
40
|
-
<li>
|
|
41
|
-
<a href="/about/" data-view=".view-main" class="panel-close">About</a>
|
|
42
|
-
</li>
|
|
43
|
-
<li>
|
|
44
|
-
<a href="/form/" data-view=".view-main" class="panel-close">Form</a>
|
|
45
|
-
</li>
|
|
46
|
-
<li>
|
|
47
|
-
<a href="#" data-view=".view-main" class="back panel-close">Back in history</a>
|
|
48
|
-
</li>
|
|
49
|
-
</ul>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
`,d=`
|
|
56
|
-
<!-- Right panel with reveal effect-->
|
|
57
|
-
<div class="panel panel-right panel-reveal theme-dark">
|
|
58
|
-
<div class="view">
|
|
59
|
-
<div class="page">
|
|
60
|
-
<div class="navbar">
|
|
61
|
-
<div class="navbar-bg"></div>
|
|
62
|
-
<div class="navbar-inner">
|
|
63
|
-
<div class="title">Right Panel</div>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="page-content">
|
|
67
|
-
<div class="block">Right panel content goes here</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
`.trim(),c="";("single-view"===l||"split-view"===l||"blank"===l)&&(c=a(4,`
|
|
73
|
-
<!-- Your main view, should have "view-main" class -->
|
|
74
|
-
${e("webpack"===t,()=>`
|
|
75
|
-
<div class="view view-main view-init safe-areas" data-url="/"></div>
|
|
76
|
-
`,()=>`
|
|
77
|
-
<div class="view view-main view-init safe-areas">
|
|
78
|
-
${a(8,i(s)).trim()}
|
|
79
|
-
</div>
|
|
80
|
-
`)}
|
|
81
|
-
`)),"tabs"===l&&(c=a(4,`
|
|
82
|
-
<!-- Views/Tabs container -->
|
|
83
|
-
<div class="views tabs safe-areas">
|
|
84
|
-
<!-- Tabbar for switching views-tabs -->
|
|
85
|
-
<div class="toolbar toolbar-bottom tabbar-labels">
|
|
86
|
-
<div class="toolbar-inner">
|
|
87
|
-
<a href="#view-home" class="tab-link tab-link-active">
|
|
88
|
-
<i class="icon zmp-icons if-not-md">house_fill</i>
|
|
89
|
-
<i class="icon material-icons if-md">home</i>
|
|
90
|
-
<span class="tabbar-label">Home</span>
|
|
91
|
-
</a>
|
|
92
|
-
<a href="#view-catalog" class="tab-link">
|
|
93
|
-
<i class="icon zmp-icons if-not-md">square_list_fill</i>
|
|
94
|
-
<i class="icon material-icons if-md">view_list</i>
|
|
95
|
-
<span class="tabbar-label">Catalog</span>
|
|
96
|
-
</a>
|
|
97
|
-
<a href="#view-settings" class="tab-link">
|
|
98
|
-
<i class="icon zmp-icons if-not-md">gear</i>
|
|
99
|
-
<i class="icon material-icons if-md">settings</i>
|
|
100
|
-
<span class="tabbar-label">Settings</span>
|
|
101
|
-
</a>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<!-- Your main view/tab, should have "view-main" class. It also has "tab-active" class -->
|
|
106
|
-
${e("webpack"===t,()=>`
|
|
107
|
-
<div id="view-home" class="view view-main view-init tab tab-active" data-url="/">
|
|
108
|
-
<!-- Home page will be loaded here dynamically from / route -->
|
|
109
|
-
</div>
|
|
110
|
-
`,()=>`
|
|
111
|
-
<div id="view-home" class="view view-main view-init tab tab-active">
|
|
112
|
-
${a(8,i(s)).trim()}
|
|
113
|
-
</div>
|
|
114
|
-
`)}
|
|
115
|
-
|
|
116
|
-
<!-- Catalog View -->
|
|
117
|
-
<div id="view-catalog" class="view view-init tab" data-name="catalog" data-url="/catalog/">
|
|
118
|
-
<!-- Catalog page will be loaded here dynamically from /catalog/ route -->
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
<!-- Settings View -->
|
|
122
|
-
<div id="view-settings" class="view view-init tab" data-name="settings" data-url="/settings/">
|
|
123
|
-
<!-- Settings page will be loaded here dynamically from /settings/ route -->
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
`));let r="blank"===l?`
|
|
127
|
-
${c}
|
|
128
|
-
`:`
|
|
129
|
-
${"split-view"===l?v:n}
|
|
130
|
-
${d}
|
|
131
|
-
${c}
|
|
132
|
-
|
|
133
|
-
<!-- Popup -->
|
|
134
|
-
<div class="popup" id="my-popup">
|
|
135
|
-
<div class="view">
|
|
136
|
-
<div class="page">
|
|
137
|
-
<div class="navbar">
|
|
138
|
-
<div class="navbar-bg"></div>
|
|
139
|
-
<div class="navbar-inner">
|
|
140
|
-
<div class="title">Popup</div>
|
|
141
|
-
<div class="right">
|
|
142
|
-
<a href="#" class="link popup-close">Close</a>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
<div class="page-content">
|
|
147
|
-
<div class="block">
|
|
148
|
-
<p>Popup content goes here.</p>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
<!-- Login Screen -->
|
|
156
|
-
<div class="login-screen" id="my-login-screen">
|
|
157
|
-
<div class="view">
|
|
158
|
-
<div class="page">
|
|
159
|
-
<div class="page-content login-screen-content">
|
|
160
|
-
<div class="login-screen-title">Login</div>
|
|
161
|
-
<div class="list">
|
|
162
|
-
<ul>
|
|
163
|
-
<li class="item-content item-input">
|
|
164
|
-
<div class="item-inner">
|
|
165
|
-
<div class="item-title item-label">Username</div>
|
|
166
|
-
<div class="item-input-wrap">
|
|
167
|
-
${e(t,()=>`
|
|
168
|
-
<input type="text" name="username" placeholder="Your username" value="\${username}" @input="\${updateUsername}"/>
|
|
169
|
-
`)}
|
|
170
|
-
${e(!t,()=>`
|
|
171
|
-
<input type="text" name="username" placeholder="Your username"/>
|
|
172
|
-
`)}
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
</li>
|
|
176
|
-
<li class="item-content item-input">
|
|
177
|
-
<div class="item-inner">
|
|
178
|
-
<div class="item-title item-label">Password</div>
|
|
179
|
-
<div class="item-input-wrap">
|
|
180
|
-
${e(t,()=>`
|
|
181
|
-
<input type="password" name="password" placeholder="Your password" value="\${password}" @input="\${updatePassword}"/>
|
|
182
|
-
`)}
|
|
183
|
-
${e(!t,()=>`
|
|
184
|
-
<input type="password" name="password" placeholder="Your password"/>
|
|
185
|
-
`)}
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</li>
|
|
189
|
-
</ul>
|
|
190
|
-
</div>
|
|
191
|
-
<div class="list">
|
|
192
|
-
<ul>
|
|
193
|
-
<li>
|
|
194
|
-
${e(t,()=>`
|
|
195
|
-
<a href="#" class="item-link list-button login-button" @click="\${alertLoginData}">Sign In</a>
|
|
196
|
-
`)}
|
|
197
|
-
${e(!t,()=>`
|
|
198
|
-
<a href="#" class="item-link list-button login-button">Sign In</a>
|
|
199
|
-
`)}
|
|
200
|
-
</li>
|
|
201
|
-
</ul>
|
|
202
|
-
<div class="block-footer">Some text about login information.<br/>Click "Sign In" to close Login Screen</div>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
`;return"webpack"===t?"blank"===l?a(0,`
|
|
209
|
-
<template>
|
|
210
|
-
<div id="app">
|
|
211
|
-
${a(10,c)}
|
|
212
|
-
</div>
|
|
213
|
-
</template>
|
|
214
|
-
<script>
|
|
215
|
-
export default () => {
|
|
216
|
-
return $render;
|
|
217
|
-
}
|
|
218
|
-
</script>
|
|
219
|
-
`):a(0,`
|
|
220
|
-
<template>
|
|
221
|
-
<div id="app">
|
|
222
|
-
${a(10,r)}
|
|
223
|
-
</div>
|
|
224
|
-
</template>
|
|
225
|
-
<script>
|
|
226
|
-
export default (props, { $zmp, $update }) => {
|
|
227
|
-
// Login screen demo data
|
|
228
|
-
let username = '';
|
|
229
|
-
let password = '';
|
|
230
|
-
|
|
231
|
-
const updateUsername = (e) => {
|
|
232
|
-
username = e.target.value;
|
|
233
|
-
$update();
|
|
234
|
-
}
|
|
235
|
-
const updatePassword = (e) => {
|
|
236
|
-
password = e.target.value;
|
|
237
|
-
$update();
|
|
238
|
-
}
|
|
239
|
-
const alertLoginData = () => {
|
|
240
|
-
$zmp.dialog.alert('Username: ' + username + '<br/>Password: ' + password, () => {
|
|
241
|
-
$zmp.loginScreen.close();
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return $render;
|
|
246
|
-
}
|
|
247
|
-
</script>
|
|
248
|
-
`):r};
|