devextreme-cli 1.6.4 → 1.6.5

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 (40) hide show
  1. package/package.json +3 -3
  2. package/src/applications/application.vue.js +16 -67
  3. package/src/commands.json +0 -3
  4. package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +86 -86
  5. package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +107 -107
  6. package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss +1 -1
  7. package/src/templates/react/application/src/dx-styles.scss +17 -0
  8. package/src/templates/react/application/src/types.tsx +55 -55
  9. package/src/templates/react/sample-pages/tasks/tasks.tsx +1 -0
  10. package/src/templates/vue-v3/application/src/components/side-nav-menu.vue +1 -1
  11. package/src/templates/vue-v3/sample-pages/tasks-page.vue +1 -0
  12. package/src/utility/latest-versions.js +3 -3
  13. package/src/templates/vue-v2/application/devextreme.json +0 -39
  14. package/src/templates/vue-v2/application/src/App.vue +0 -91
  15. package/src/templates/vue-v2/application/src/app-info.js +0 -3
  16. package/src/templates/vue-v2/application/src/app-navigation.js +0 -21
  17. package/src/templates/vue-v2/application/src/auth.js +0 -101
  18. package/src/templates/vue-v2/application/src/components/app-footer.vue +0 -21
  19. package/src/templates/vue-v2/application/src/components/header-toolbar.vue +0 -157
  20. package/src/templates/vue-v2/application/src/components/side-nav-menu.vue +0 -190
  21. package/src/templates/vue-v2/application/src/components/user-panel.vue +0 -114
  22. package/src/templates/vue-v2/application/src/dx-styles.scss +0 -65
  23. package/src/templates/vue-v2/application/src/layouts/side-nav-inner-toolbar.vue +0 -158
  24. package/src/templates/vue-v2/application/src/layouts/side-nav-outer-toolbar.vue +0 -122
  25. package/src/templates/vue-v2/application/src/layouts/single-card.vue +0 -67
  26. package/src/templates/vue-v2/application/src/main.js +0 -16
  27. package/src/templates/vue-v2/application/src/router.js +0 -149
  28. package/src/templates/vue-v2/application/src/themes/metadata.additional.json +0 -11
  29. package/src/templates/vue-v2/application/src/themes/metadata.base.json +0 -7
  30. package/src/templates/vue-v2/application/src/utils/media-query.js +0 -33
  31. package/src/templates/vue-v2/application/src/views/change-password-form.vue +0 -105
  32. package/src/templates/vue-v2/application/src/views/create-account-form.vue +0 -143
  33. package/src/templates/vue-v2/application/src/views/login-form.vue +0 -133
  34. package/src/templates/vue-v2/application/src/views/reset-password-form.vue +0 -108
  35. package/src/templates/vue-v2/application/vue.config.js +0 -1
  36. package/src/templates/vue-v2/page/page.vue +0 -13
  37. package/src/templates/vue-v2/sample-pages/home-page.vue +0 -173
  38. package/src/templates/vue-v2/sample-pages/profile-page.vue +0 -84
  39. package/src/templates/vue-v2/sample-pages/tasks-page.vue +0 -134
  40. package/src/utility/prompts/vue-version.js +0 -17
@@ -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>
@@ -1,133 +0,0 @@
1
- <template>
2
- <form class="login-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="rememberMe"
23
- editor-type="dxCheckBox"
24
- :editor-options="{ text: 'Remember me', elementAttr: { class: 'form-text' } }"
25
- >
26
- <dx-label :visible="false" />
27
- </dx-item>
28
- <dx-button-item>
29
- <dx-button-options
30
- width="100%"
31
- type="default"
32
- template="signInTemplate"
33
- :use-submit-behavior="true"
34
- >
35
- </dx-button-options>
36
- </dx-button-item>
37
- <dx-item>
38
- <template #default>
39
- <div class="link">
40
- <router-link to="/reset-password">Forgot password?</router-link>
41
- </div>
42
- </template>
43
- </dx-item>
44
- <dx-button-item>
45
- <dx-button-options
46
- text="Create an account"
47
- width="100%"
48
- :on-click="onCreateAccountClick"
49
- />
50
- </dx-button-item>
51
- <template #signInTemplate>
52
- <div>
53
- <span class="dx-button-text">
54
- <dx-load-indicator v-if="loading" width="24px" height="24px" :visible="true" />
55
- <span v-if="!loading">Sign In</span>
56
- </span>
57
- </div>
58
- </template>
59
- </dx-form>
60
- </form>
61
- </template>
62
-
63
- <script>
64
- import DxLoadIndicator from "devextreme-vue/load-indicator";
65
- import DxForm, {
66
- DxItem,
67
- DxEmailRule,
68
- DxRequiredRule,
69
- DxLabel,
70
- DxButtonItem,
71
- DxButtonOptions
72
- } from "devextreme-vue/form";
73
- import notify from 'devextreme/ui/notify';
74
-
75
- import auth from "../auth";
76
-
77
- export default {
78
- data() {
79
- return {
80
- formData: {},
81
- loading: false
82
- };
83
- },
84
- methods: {
85
- onCreateAccountClick() {
86
- this.$router.push("/create-account");
87
- },
88
- onSubmit: async function() {
89
- const { email, password } = this.formData;
90
- this.loading = true;
91
-
92
- const result = await auth.logIn(email, password);
93
- if (!result.isOk) {
94
- this.loading = false;
95
- notify(result.message, "error", 2000);
96
- } else {
97
- this.$router.push(this.$route.query.redirect || "/home");
98
- }
99
- }
100
- },
101
- components: {
102
- DxLoadIndicator,
103
- DxForm,
104
- DxEmailRule,
105
- DxRequiredRule,
106
- DxItem,
107
- DxLabel,
108
- DxButtonItem,
109
- DxButtonOptions
110
- }
111
- };
112
- </script>
113
-
114
- <style lang="scss">
115
- @import "../themes/generated/variables.base.scss";
116
-
117
- .login-form {
118
- .link {
119
- text-align: center;
120
- font-size: 16px;
121
- font-style: normal;
122
-
123
- a {
124
- text-decoration: none;
125
- }
126
- }
127
-
128
- .form-text {
129
- margin: 10px 0;
130
- color: rgba($base-text-color, alpha($base-text-color) * 0.7);
131
- }
132
- }
133
- </style>