devextreme-cli 1.6.4 → 1.6.6

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.
Files changed (37) hide show
  1. package/package.json +4 -4
  2. package/src/applications/application.vue.js +16 -67
  3. package/src/commands.json +0 -3
  4. package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss +1 -1
  5. package/src/templates/react/application/src/dx-styles.scss +17 -0
  6. package/src/templates/react/sample-pages/tasks/tasks.tsx +1 -0
  7. package/src/templates/vue-v3/application/src/components/side-nav-menu.vue +1 -1
  8. package/src/templates/vue-v3/sample-pages/tasks-page.vue +1 -0
  9. package/src/utility/latest-versions.js +3 -3
  10. package/src/templates/vue-v2/application/devextreme.json +0 -39
  11. package/src/templates/vue-v2/application/src/App.vue +0 -91
  12. package/src/templates/vue-v2/application/src/app-info.js +0 -3
  13. package/src/templates/vue-v2/application/src/app-navigation.js +0 -21
  14. package/src/templates/vue-v2/application/src/auth.js +0 -101
  15. package/src/templates/vue-v2/application/src/components/app-footer.vue +0 -21
  16. package/src/templates/vue-v2/application/src/components/header-toolbar.vue +0 -157
  17. package/src/templates/vue-v2/application/src/components/side-nav-menu.vue +0 -190
  18. package/src/templates/vue-v2/application/src/components/user-panel.vue +0 -114
  19. package/src/templates/vue-v2/application/src/dx-styles.scss +0 -65
  20. package/src/templates/vue-v2/application/src/layouts/side-nav-inner-toolbar.vue +0 -158
  21. package/src/templates/vue-v2/application/src/layouts/side-nav-outer-toolbar.vue +0 -122
  22. package/src/templates/vue-v2/application/src/layouts/single-card.vue +0 -67
  23. package/src/templates/vue-v2/application/src/main.js +0 -16
  24. package/src/templates/vue-v2/application/src/router.js +0 -149
  25. package/src/templates/vue-v2/application/src/themes/metadata.additional.json +0 -11
  26. package/src/templates/vue-v2/application/src/themes/metadata.base.json +0 -7
  27. package/src/templates/vue-v2/application/src/utils/media-query.js +0 -33
  28. package/src/templates/vue-v2/application/src/views/change-password-form.vue +0 -105
  29. package/src/templates/vue-v2/application/src/views/create-account-form.vue +0 -143
  30. package/src/templates/vue-v2/application/src/views/login-form.vue +0 -133
  31. package/src/templates/vue-v2/application/src/views/reset-password-form.vue +0 -108
  32. package/src/templates/vue-v2/application/vue.config.js +0 -1
  33. package/src/templates/vue-v2/page/page.vue +0 -13
  34. package/src/templates/vue-v2/sample-pages/home-page.vue +0 -173
  35. package/src/templates/vue-v2/sample-pages/profile-page.vue +0 -84
  36. package/src/templates/vue-v2/sample-pages/tasks-page.vue +0 -134
  37. package/src/utility/prompts/vue-version.js +0 -17
@@ -1,122 +0,0 @@
1
- <template>
2
- <div class="side-nav-outer-toolbar">
3
- <header-toolbar
4
- class="layout-header"
5
- :menu-toggle-enabled="true"
6
- :toggle-menu-func="toggleMenu"
7
- :title="title"
8
- />
9
- <dx-drawer
10
- class="layout-body"
11
- position="before"
12
- template="menu"
13
- :opened.sync="menuOpened"
14
- :opened-state-mode="drawerOptions.menuMode"
15
- :reveal-mode="drawerOptions.menuRevealMode"
16
- :min-size="drawerOptions.minMenuSize"
17
- :shading="drawerOptions.shaderEnabled"
18
- :close-on-outside-click="drawerOptions.closeOnOutsideClick"
19
- >
20
- <dx-scroll-view ref="scrollViewRef" class="with-footer">
21
- <slot />
22
- <slot name="footer" />
23
- </dx-scroll-view>
24
- <template #menu>
25
- <side-nav-menu
26
- :compact-mode="!menuOpened"
27
- @click="handleSideBarClick"
28
- />
29
- </template>
30
- </dx-drawer>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import DxDrawer from "devextreme-vue/drawer";
36
- import DxScrollView from "devextreme-vue/scroll-view";
37
-
38
- import menuItems from "../app-navigation";
39
- import HeaderToolbar from "../components/header-toolbar";
40
- import SideNavMenu from "../components/side-nav-menu";
41
-
42
- export default {
43
- props: {
44
- title: String,
45
- isXSmall: Boolean,
46
- isLarge: Boolean
47
- },
48
- methods: {
49
- toggleMenu(e) {
50
- const pointerEvent = e.event;
51
- pointerEvent.stopPropagation();
52
- if (this.menuOpened) {
53
- this.menuTemporaryOpened = false;
54
- }
55
- this.menuOpened = !this.menuOpened;
56
- },
57
- handleSideBarClick() {
58
- if (this.menuOpened === false) this.menuTemporaryOpened = true;
59
- this.menuOpened = true;
60
- }
61
- },
62
- data() {
63
- return {
64
- menuOpened: this.isLarge,
65
- menuTemporaryOpened: false,
66
- menuItems
67
- };
68
- },
69
- computed: {
70
- drawerOptions() {
71
- const shaderEnabled = !this.isLarge;
72
- return {
73
- menuMode: this.isLarge ? "shrink" : "overlap",
74
- menuRevealMode: this.isXSmall ? "slide" : "expand",
75
- minMenuSize: this.isXSmall ? 0 : 60,
76
- menuOpened: this.isLarge,
77
- closeOnOutsideClick: shaderEnabled,
78
- shaderEnabled
79
- };
80
- },
81
- headerMenuTogglerEnabled() {
82
- return this.isXSmall;
83
- },
84
- scrollView() {
85
- return this.$refs["scrollViewRef"].instance;
86
- }
87
- },
88
- watch: {
89
- isLarge() {
90
- if (!this.menuTemporaryOpened) {
91
- this.menuOpened = this.isLarge;
92
- }
93
- },
94
- $route() {
95
- if (this.menuTemporaryOpened || !this.isLarge) {
96
- this.menuOpened = false;
97
- this.menuTemporaryOpened = false;
98
- }
99
- this.scrollView.scrollTo(0);
100
- }
101
- },
102
- components: {
103
- DxDrawer,
104
- DxScrollView,
105
- HeaderToolbar,
106
- SideNavMenu
107
- }
108
- };
109
- </script>
110
-
111
- <style lang="scss">
112
- .side-nav-outer-toolbar {
113
- flex-direction: column;
114
- display: flex;
115
- height: 100%;
116
- width: 100%;
117
- }
118
-
119
- .layout-header {
120
- z-index: 1501;
121
- }
122
- </style>
@@ -1,67 +0,0 @@
1
- <template>
2
- <dx-scroll-view height="100%" width="100%" class="with-footer single-card">
3
- <div class="dx-card content">
4
- <div class="header">
5
- <div class="title">{{title}}</div>
6
- <div class="description">{{description}}</div>
7
- </div>
8
- <slot />
9
- </div>
10
- </dx-scroll-view>
11
- </template>
12
-
13
- <script>
14
- import DxScrollView from "devextreme-vue/scroll-view";
15
-
16
- export default {
17
- components: {
18
- DxScrollView
19
- },
20
- props: {
21
- title: String,
22
- description: String
23
- }
24
- };
25
- </script>
26
-
27
- <style lang="scss">
28
- @import "../themes/generated/variables.base.scss";
29
-
30
- .single-card {
31
- width: 100%;
32
- height: 100%;
33
-
34
- .dx-card {
35
- width: 330px;
36
- margin: auto auto;
37
- padding: 40px;
38
- flex-grow: 0;
39
-
40
- .screen-x-small & {
41
- width: 100%;
42
- height: 100%;
43
- border-radius: 0;
44
- box-shadow: none;
45
- margin: 0;
46
- border: 0;
47
- flex-grow: 1;
48
- }
49
-
50
- .header {
51
- margin-bottom: 30px;
52
-
53
- .title {
54
- color: $base-text-color;
55
- line-height: 28px;
56
- font-weight: 500;
57
- font-size: 24px;
58
- }
59
-
60
- .description {
61
- color: rgba($base-text-color, alpha($base-text-color) * 0.7);
62
- line-height: 18px;
63
- }
64
- }
65
- }
66
- }
67
- </style>
@@ -1,16 +0,0 @@
1
- import Vue from "vue";
2
- import themes from "devextreme/ui/themes";
3
-
4
- import App from "./App";
5
- import router from "./router";
6
- import appInfo from "./app-info";
7
-
8
- Vue.config.productionTip = false;
9
- Vue.prototype.$appInfo = appInfo;
10
-
11
- themes.initialized(() => {
12
- new Vue({
13
- router,
14
- render: h => h(App)
15
- }).$mount("#app");
16
- });
@@ -1,149 +0,0 @@
1
- import Vue from "vue";
2
- import Router from "vue-router";
3
-
4
- import auth from "./auth";
5
-
6
- <%=^empty%>import Home from "./views/home-page";
7
- import Profile from "./views/profile-page";
8
- import Tasks from "./views/tasks-page";
9
- <%=/empty%>import defaultLayout from "./layouts/<%=layout%>";
10
- import simpleLayout from "./layouts/single-card";
11
-
12
- Vue.use(Router);
13
-
14
- const router = new Router({
15
- routes: [<%=#empty%>
16
- {
17
- path: "/",
18
- components: {
19
- layout: defaultLayout
20
- }
21
- },<%=/empty%><%=^empty%>
22
- {
23
- path: "/home",
24
- name: "home",
25
- meta: { requiresAuth: true },
26
- components: {
27
- layout: defaultLayout,
28
- content: Home
29
- }
30
- },
31
- {
32
- path: "/profile",
33
- name: "profile",
34
- meta: { requiresAuth: true },
35
- components: {
36
- layout: defaultLayout,
37
- content: Profile
38
- }
39
- },
40
- {
41
- path: "/tasks",
42
- name: "tasks",
43
- meta: { requiresAuth: true },
44
- components: {
45
- layout: defaultLayout,
46
- content: Tasks
47
- }
48
- },<%=/empty%>
49
- {
50
- path: "/login-form",
51
- name: "login-form",
52
- meta: { requiresAuth: false },
53
- components: {
54
- layout: simpleLayout,
55
- content: () =>
56
- import(/* webpackChunkName: "login" */ "./views/login-form")
57
- },
58
- props: {
59
- layout: {
60
- title: "Sign In"
61
- }
62
- }
63
- },
64
- {
65
- path: "/reset-password",
66
- name: "reset-password",
67
- meta: { requiresAuth: false },
68
- components: {
69
- layout: simpleLayout,
70
- content: () =>
71
- import(/* webpackChunkName: "login" */ "./views/reset-password-form")
72
- },
73
- props: {
74
- layout: {
75
- title: "Reset Password",
76
- description: "Please enter the email address that you used to register, and we will send you a link to reset your password via Email."
77
- }
78
- }
79
- },
80
- {
81
- path: "/create-account",
82
- name: "create-account",
83
- meta: { requiresAuth: false },
84
- components: {
85
- layout: simpleLayout,
86
- content: () =>
87
- import(/* webpackChunkName: "login" */ "./views/create-account-form")
88
- },
89
- props: {
90
- layout: {
91
- title: "Sign Up"
92
- }
93
- }
94
- },
95
- {
96
- path: "/change-password/:recoveryCode",
97
- name: "change-password",
98
- meta: { requiresAuth: false },
99
- components: {
100
- layout: simpleLayout,
101
- content: () =>
102
- import(/* webpackChunkName: "login" */ "./views/change-password-form")
103
- },
104
- props: {
105
- layout: {
106
- title: "Change Password"
107
- }
108
- }
109
- },<%=^empty%>
110
- {
111
- path: "/",
112
- redirect: "/home"
113
- },
114
- {
115
- path: "/recovery",
116
- redirect: "/home"
117
- },
118
- {
119
- path: "*",
120
- redirect: "/home"
121
- }<%=/empty%><%=#empty%>
122
- {
123
- path: "*",
124
- redirect: "/"
125
- }<%=/empty%>
126
- ]
127
- });
128
-
129
- router.beforeEach((to, from, next) => {
130
-
131
- if (to.name === "login-form" && auth.loggedIn()) {
132
- next({ name: "home" });
133
- }
134
-
135
- if (to.matched.some(record => record.meta.requiresAuth)) {
136
- if (!auth.loggedIn()) {
137
- next({
138
- name: "login-form",
139
- query: { redirect: to.fullPath }
140
- });
141
- } else {
142
- next();
143
- }
144
- } else {
145
- next();
146
- }
147
- });
148
-
149
- export default router;
@@ -1,11 +0,0 @@
1
- {
2
- "items": [],
3
- "baseTheme": "material.orange.dark",
4
- "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
- "outputColorScheme": "additional",
6
- "makeSwatch": true,
7
- "base": true,
8
- "widgets": [
9
- "treeview"
10
- ]
11
- }
@@ -1,7 +0,0 @@
1
- {
2
- "items": [],
3
- "baseTheme": "material.orange.light",
4
- "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
- "outputColorScheme": "base",
6
- "base": true
7
- }
@@ -1,33 +0,0 @@
1
- const Breakpoints = {
2
- XSmall: "(max-width: 599.99px)",
3
- Small: "(min-width: 600px) and (max-width: 959.99px)",
4
- Medium: "(min-width: 960px) and (max-width: 1279.99px)",
5
- Large: "(min-width: 1280px)"
6
- };
7
-
8
- let handlers = [];
9
- const xSmallMedia = window.matchMedia(Breakpoints.XSmall);
10
- const smallMedia = window.matchMedia(Breakpoints.Small);
11
- const mediumMedia = window.matchMedia(Breakpoints.Medium);
12
- const largeMedia = window.matchMedia(Breakpoints.Large);
13
-
14
- [xSmallMedia, smallMedia, mediumMedia, largeMedia].forEach(media => {
15
- media.addListener(() => {
16
- handlers.forEach(handler => handler());
17
- });
18
- });
19
-
20
- export const sizes = () => {
21
- return {
22
- "screen-x-small": xSmallMedia.matches,
23
- "screen-small": smallMedia.matches,
24
- "screen-medium": mediumMedia.matches,
25
- "screen-large": largeMedia.matches
26
- };
27
- };
28
-
29
- export const subscribe = handler => handlers.push(handler);
30
-
31
- export const unsubscribe = handler => {
32
- handlers = handlers.filter(item => item !== handler);
33
- };
@@ -1,105 +0,0 @@
1
- <template>
2
- <form @submit.prevent="onSubmit">
3
- <dx-form :form-data="formData" :disabled="loading">
4
- <dx-item
5
- data-field="password"
6
- editor-type="dxTextBox"
7
- :editor-options="{ stylingMode: 'filled', placeholder: 'Password', mode: 'password' }"
8
- >
9
- <dx-required-rule message="Password is required" />
10
- <dx-label :visible="false" />
11
- </dx-item>
12
- <dx-item
13
- data-field="confirmedPassword"
14
- editor-type="dxTextBox"
15
- :editor-options="{ stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' }"
16
- >
17
- <dx-required-rule message="Password is required" />
18
- <dx-custom-rule
19
- message="Passwords do not match"
20
- :validation-callback="confirmPassword"
21
- />
22
- <dx-label :visible="false" />
23
- </dx-item>
24
- <dx-button-item>
25
- <dx-button-options
26
- width="100%"
27
- type="default"
28
- template="changePassword"
29
- :use-submit-behavior="true"
30
- >
31
- </dx-button-options>
32
- </dx-button-item>
33
-
34
- <template #changePassword>
35
- <div>
36
- <span class="dx-button-text">
37
- <dx-loadIndicator v-if="loading" width="24px" height="24px" :visible="true" />
38
- <span v-if="!loading">Continue</span>
39
- </span>
40
- </div>
41
- </template>
42
- </dx-form>
43
- </form>
44
- </template>
45
-
46
- <script>
47
- import DxForm, {
48
- DxItem,
49
- DxLabel,
50
- DxButtonItem,
51
- DxButtonOptions,
52
- DxCustomRule,
53
- DxRequiredRule
54
- } from 'devextreme-vue/form';
55
- import DxLoadIndicator from 'devextreme-vue/load-indicator';
56
- import notify from 'devextreme/ui/notify';
57
-
58
- import auth from "../auth";
59
-
60
- export default {
61
- components: {
62
- DxForm,
63
- DxItem,
64
- DxLabel,
65
- DxButtonItem,
66
- DxButtonOptions,
67
- DxRequiredRule,
68
- DxCustomRule,
69
- DxLoadIndicator
70
- },
71
- created() {
72
- this.recoveryCode = this.$route.params.recoveryCode;
73
- },
74
- data() {
75
- return {
76
- formData: {},
77
- loading: false,
78
- recoveryCode: ""
79
- }
80
- },
81
- /* eslint-disable no-debugger */
82
- methods: {
83
- onSubmit: async function() {
84
- const { password } = this.formData;
85
- this.loading = true;
86
-
87
- const result = await auth.changePassword(password, this.recoveryCode);
88
- this.loading = false;
89
-
90
- if (result.isOk) {
91
- this.$router.push("/login-form");
92
- } else {
93
- notify(result.message, 'error', 2000);
94
- }
95
- },
96
- confirmPassword(e) {
97
- return e.value === this.formData.password;
98
- }
99
- }
100
- }
101
- </script>
102
-
103
- <style>
104
-
105
- </style>
@@ -1,143 +0,0 @@
1
- <template>
2
- <form class="create-account-form" @submit.prevent="onSubmit">
3
- <dx-form :form-data="formData" :disabled="loading">
4
- <dx-item
5
- data-field="email"
6
- editor-type="dxTextBox"
7
- :editor-options="{ stylingMode: 'filled', placeholder: 'Email', mode: 'email' }"
8
- >
9
- <dx-required-rule message="Email is required" />
10
- <dx-email-rule message="Email is invalid" />
11
- <dx-label :visible="false" />
12
- </dx-item>
13
- <dx-item
14
- data-field="password"
15
- editor-type="dxTextBox"
16
- :editor-options="{ stylingMode: 'filled', placeholder: 'Password', mode: 'password' }"
17
- >
18
- <dx-required-rule message="Password is required" />
19
- <dx-label :visible="false" />
20
- </dx-item>
21
- <dx-item
22
- data-field="confirmedPassword"
23
- editor-type="dxTextBox"
24
- :editor-options="{ stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' }"
25
- >
26
- <dx-required-rule message="Password is required" />
27
- <dx-custom-rule
28
- message="Passwords do not match"
29
- :validation-callback="confirmPassword"
30
- />
31
- <dx-label :visible="false" />
32
- </dx-item>
33
- <dx-item>
34
- <template #default>
35
- <div class='policy-info'>
36
- By creating an account, you agree to the <router-link to="#">Terms of Service</router-link> and <router-link to="#">Privacy Policy</router-link>
37
- </div>
38
- </template>
39
- </dx-item>
40
- <dx-button-item>
41
- <dx-button-options
42
- width="100%"
43
- type="default"
44
- template="createAccount"
45
- :use-submit-behavior="true"
46
- >
47
- </dx-button-options>
48
- </dx-button-item>
49
- <dx-item>
50
- <template #default>
51
- <div class="login-link">
52
- Have an account? <router-link to="/login">Sign In</router-link>
53
- </div>
54
- </template>
55
- </dx-item>
56
- <template #createAccount>
57
- <div>
58
- <span class="dx-button-text">
59
- <dx-loadIndicator v-if="loading" width="24px" height="24px" :visible="true" />
60
- <span v-if="!loading">Create a new account</span>
61
- </span>
62
- </div>
63
- </template>
64
- </dx-form>
65
- </form>
66
- </template>
67
-
68
- <script>
69
- import DxForm, {
70
- DxItem,
71
- DxLabel,
72
- DxButtonItem,
73
- DxButtonOptions,
74
- DxCustomRule,
75
- DxRequiredRule,
76
- DxEmailRule
77
- } from 'devextreme-vue/form';
78
- import DxLoadIndicator from 'devextreme-vue/load-indicator';
79
- import notify from 'devextreme/ui/notify';
80
-
81
- import auth from "../auth";
82
-
83
- export default {
84
- components: {
85
- DxForm,
86
- DxItem,
87
- DxLabel,
88
- DxButtonItem,
89
- DxButtonOptions,
90
- DxRequiredRule,
91
- DxCustomRule,
92
- DxEmailRule,
93
- DxLoadIndicator
94
- },
95
- data() {
96
- return {
97
- formData: {},
98
- loading: false
99
- }
100
- },
101
- methods: {
102
- onSubmit: async function() {
103
- const { email, password } = this.formData;
104
- this.loading = true;
105
-
106
- const result = await auth.createAccount(email, password);
107
- this.loading = false;
108
-
109
- if (result.isOk) {
110
- this.$router.push("/login-form");
111
- } else {
112
- notify(result.message, 'error', 2000);
113
- }
114
- },
115
- confirmPassword(e) {
116
- return e.value === this.formData.password;
117
- }
118
- }
119
- }
120
- </script>
121
-
122
- <style lang="scss">
123
- @import "../themes/generated/variables.base.scss";
124
-
125
- .create-account-form {
126
- .policy-info {
127
- margin: 10px 0;
128
- color: rgba($base-text-color, alpha($base-text-color) * 0.7);
129
- font-size: 14px;
130
- font-style: normal;
131
-
132
- a {
133
- color: rgba($base-text-color, alpha($base-text-color) * 0.7);
134
- }
135
- }
136
-
137
- .login-link {
138
- color: $base-accent;
139
- font-size: 16px;
140
- text-align: center;
141
- }
142
- }
143
- </style>