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,157 +0,0 @@
1
- <template>
2
- <header class="header-component">
3
- <dx-toolbar class="header-toolbar">
4
- <dx-item
5
- :visible="menuToggleEnabled"
6
- location="before"
7
- css-class="menu-button"
8
- >
9
- <template #default>
10
- <dx-button
11
- icon="menu"
12
- styling-mode="text"
13
- @click="toggleMenuFunc"
14
- />
15
- </template>
16
- </dx-item>
17
-
18
- <dx-item
19
- v-if="title"
20
- location="before"
21
- css-class="header-title dx-toolbar-label"
22
- >
23
- <template>
24
- <div>{{ title }}</div>
25
- </template>
26
- </dx-item>
27
-
28
- <dx-item
29
- location="after"
30
- locate-in-menu="auto"
31
- menu-item-template="menuUserItem"
32
- >
33
- <template #default>
34
- <div>
35
- <dx-button
36
- class="user-button authorization"
37
- :width="210"
38
- height="100%"
39
- styling-mode="text"
40
- >
41
- <user-panel :user="user" :menu-items="userMenuItems" menu-mode="context" />
42
- </dx-button>
43
- </div>
44
- </template>
45
- </dx-item>
46
- <template #menuUserItem>
47
- <user-panel
48
- :user="user"
49
- :menu-items="userMenuItems"
50
- menu-mode="list"
51
- />
52
- </template>
53
- </dx-toolbar>
54
- </header>
55
- </template>
56
-
57
- <script>
58
- import DxButton from "devextreme-vue/button";
59
- import DxToolbar, { DxItem } from "devextreme-vue/toolbar";
60
- import auth from "../auth";
61
-
62
- import UserPanel from "./user-panel";
63
-
64
- export default {
65
- props: {
66
- menuToggleEnabled: Boolean,
67
- title: String,
68
- toggleMenuFunc: Function,
69
- logOutFunc: Function
70
- },
71
- created() {
72
- auth.getUser().then((e) => this.user = e.data);
73
- },
74
- data() {
75
- return {
76
- user: { },
77
- userMenuItems: [
78
- {
79
- text: "Profile",
80
- icon: "user",
81
- onClick: this.onProfileClick
82
- },
83
- {
84
- text: "Logout",
85
- icon: "runner",
86
- onClick: this.onLogoutClick
87
- }
88
- ]
89
- };
90
- },
91
- methods: {
92
- onLogoutClick() {
93
- auth.logOut();
94
- this.$router.push({
95
- path: "/login-form",
96
- query: { redirect: this.$route.path }
97
- });
98
- },
99
- onProfileClick() {
100
- this.$router.push({
101
- path: "/profile",
102
- query: { redirect: this.$route.path }
103
- });
104
- }
105
- },
106
- components: {
107
- DxButton,
108
- DxToolbar,
109
- DxItem,
110
- UserPanel
111
- }
112
- };
113
- </script>
114
-
115
- <style lang="scss">
116
- @import "../themes/generated/variables.base.scss";
117
- @import "../dx-styles.scss";
118
-
119
- .header-component {
120
- flex: 0 0 auto;
121
- z-index: 1;
122
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
123
-
124
- .dx-toolbar .dx-toolbar-item.menu-button > .dx-toolbar-item-content .dx-icon {
125
- color: $base-accent;
126
- }
127
- }
128
-
129
- .dx-toolbar.header-toolbar .dx-toolbar-items-container .dx-toolbar-after {
130
- padding: 0 40px;
131
-
132
- .screen-x-small & {
133
- padding: 0 20px;
134
- }
135
- }
136
-
137
- .dx-toolbar .dx-toolbar-item.dx-toolbar-button.menu-button {
138
- width: $side-panel-min-width;
139
- text-align: center;
140
- padding: 0;
141
- }
142
-
143
- .header-title .dx-item-content {
144
- padding: 0;
145
- margin: 0;
146
- }
147
-
148
- .dx-theme-generic {
149
- .dx-toolbar {
150
- padding: 10px 0;
151
- }
152
-
153
- .user-button > .dx-button-content {
154
- padding: 3px;
155
- }
156
- }
157
- </style>
@@ -1,190 +0,0 @@
1
- <template>
2
- <div
3
- class="dx-swatch-additional side-navigation-menu"
4
- @click="forwardClick"
5
- >
6
- <slot />
7
- <div class="menu-container">
8
- <dx-tree-view
9
- :ref="treeViewRef"
10
- :items="items"
11
- key-expr="path"
12
- selection-mode="single"
13
- :focus-state-enabled="false"
14
- expand-event="click"
15
- @item-click="handleItemClick"
16
- width="100%"
17
- />
18
- </div>
19
- </div>
20
- </template>
21
-
22
- <script>
23
- import DxTreeView from 'devextreme-vue/tree-view';
24
- import { sizes } from '../utils/media-query';
25
- import navigation from '../app-navigation';
26
-
27
- const treeViewRef = "treeViewRef";
28
- const isLargeScreen = sizes()['screen-large'];
29
- const items = navigation.map((item) => {
30
- if(item.path && !(/^\//.test(item.path))){
31
- item.path = `/${item.path}`;
32
- }
33
- return {...item, expanded: isLargeScreen}
34
- });
35
-
36
- export default {
37
- props: {
38
- compactMode: Boolean
39
- },
40
- data() {
41
- return {
42
- treeViewRef,
43
- items
44
- };
45
- },
46
- methods: {
47
- forwardClick(...args) {
48
- this.$emit("click", args);
49
- },
50
-
51
- handleItemClick(e) {
52
- if (!e.itemData.path || this.compactMode) {
53
- return;
54
- }
55
-
56
- this.$router.push(e.itemData.path);
57
-
58
- const pointerEvent = e.event;
59
- pointerEvent.stopPropagation();
60
- },
61
-
62
- updateSelection() {
63
- if (!this.treeView) {
64
- return;
65
- }
66
-
67
- this.treeView.selectItem(this.$route.path);
68
- this.treeView.expandItem(this.$route.path);
69
- }
70
- },
71
- mounted() {
72
- this.treeView = this.$refs[treeViewRef] && this.$refs[treeViewRef].instance;
73
- this.updateSelection();
74
- if (this.compactMode) {
75
- this.treeView.collapseAll();
76
- }
77
- },
78
- watch: {
79
- $route() {
80
- this.updateSelection();
81
- },
82
- compactMode() {
83
- if (this.compactMode) {
84
- this.treeView.collapseAll();
85
- } else {
86
- this.updateSelection();
87
- }
88
- }
89
- },
90
- components: {
91
- DxTreeView
92
- }
93
- };
94
- </script>
95
-
96
- <style lang="scss">
97
- @import "../dx-styles.scss";
98
- @import "../themes/generated/variables.additional.scss";
99
-
100
- .side-navigation-menu {
101
- display: flex;
102
- flex-direction: column;
103
- min-height: 100%;
104
- height: 100%;
105
- width: 250px !important;
106
-
107
- .menu-container {
108
- min-height: 100%;
109
- display: flex;
110
- flex: 1;
111
-
112
- .dx-treeview {
113
- // ## Long text positioning
114
- white-space: nowrap;
115
- // ##
116
-
117
- // ## Icon width customization
118
- .dx-treeview-item {
119
- padding-left: 0;
120
- padding-right: 0;
121
-
122
- .dx-icon {
123
- width: $side-panel-min-width !important;
124
- margin: 0 !important;
125
- }
126
- }
127
- // ##
128
-
129
- // ## Arrow customization
130
- .dx-treeview-node {
131
- padding: 0 0 !important;
132
- }
133
-
134
- .dx-treeview-toggle-item-visibility {
135
- right: 10px;
136
- left: auto;
137
- }
138
-
139
- .dx-rtl .dx-treeview-toggle-item-visibility {
140
- left: 10px;
141
- right: auto;
142
- }
143
- // ##
144
-
145
- // ## Item levels customization
146
- .dx-treeview-node {
147
- &[aria-level="1"] {
148
- font-weight: bold;
149
- border-bottom: 1px solid $base-border-color;
150
- }
151
-
152
- &[aria-level="2"] .dx-treeview-item-content {
153
- font-weight: normal;
154
- padding: 0 $side-panel-min-width;
155
- }
156
- }
157
- // ##
158
- }
159
-
160
- // ## Selected & Focuced items customization
161
- .dx-treeview {
162
- .dx-treeview-node-container {
163
- .dx-treeview-node {
164
- &.dx-state-selected:not(.dx-state-focused) > .dx-treeview-item {
165
- background: transparent;
166
- }
167
-
168
- &.dx-state-selected > .dx-treeview-item * {
169
- color: $base-accent;
170
- }
171
-
172
- &:not(.dx-state-focused) > .dx-treeview-item.dx-state-hover {
173
- background-color: lighten($base-bg, 4);
174
- }
175
- }
176
- }
177
- }
178
-
179
- .dx-theme-generic .dx-treeview {
180
- .dx-treeview-node-container
181
- .dx-treeview-node.dx-state-selected.dx-state-focused
182
- > .dx-treeview-item
183
- * {
184
- color: inherit;
185
- }
186
- }
187
- // ##
188
- }
189
- }
190
- </style>
@@ -1,114 +0,0 @@
1
- <template>
2
- <div class="user-panel">
3
- <div class="user-info">
4
- <div class="image-container">
5
- <div class="user-image" />
6
- </div>
7
- <div class="user-name">{{user.email}}</div>
8
- </div>
9
-
10
- <dx-context-menu
11
- v-if="menuMode === 'context'"
12
- target=".user-button"
13
- :items="menuItems"
14
- :width="210"
15
- show-event="dxclick"
16
- css-class="user-menu"
17
- >
18
- <dx-position my="top center" at="bottom center" />
19
- </dx-context-menu>
20
-
21
- <dx-list
22
- v-if="menuMode === 'list'"
23
- class="dx-toolbar-menu-action"
24
- :items="menuItems"
25
- />
26
- </div>
27
- </template>
28
-
29
- <script>
30
- import DxContextMenu, { DxPosition } from "devextreme-vue/context-menu";
31
- import DxList from "devextreme-vue/list";
32
-
33
- export default {
34
- props: {
35
- menuMode: String,
36
- menuItems: Array,
37
- user: Object
38
- },
39
- components: {
40
- DxContextMenu,
41
- DxPosition,
42
- DxList
43
- }
44
- };
45
- </script>
46
-
47
- <style lang="scss">
48
- @import "../themes/generated/variables.base.scss";
49
-
50
- .user-info {
51
- display: flex;
52
- align-items: center;
53
-
54
- .dx-toolbar-menu-section & {
55
- padding: 10px 6px;
56
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
57
- }
58
-
59
- .image-container {
60
- overflow: hidden;
61
- border-radius: 50%;
62
- height: 30px;
63
- width: 30px;
64
- margin: 0 4px;
65
- border: 1px solid rgba(0, 0, 0, 0.1);
66
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
67
-
68
- .user-image {
69
- width: 100%;
70
- height: 100%;
71
- background: url("https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png")
72
- no-repeat #fff;
73
- background-size: cover;
74
- }
75
- }
76
-
77
- .user-name {
78
- font-size: 14px;
79
- color: $base-text-color;
80
- margin: 0 9px;
81
- }
82
- }
83
-
84
- .user-panel {
85
- .dx-list-item .dx-icon {
86
- vertical-align: middle;
87
- color: $base-text-color;
88
- margin-right: 16px;
89
- }
90
- .dx-rtl .dx-list-item .dx-icon {
91
- margin-right: 0;
92
- margin-left: 16px;
93
- }
94
- }
95
-
96
- .dx-context-menu.user-menu.dx-menu-base {
97
- &.dx-rtl {
98
- .dx-submenu .dx-menu-items-container .dx-icon {
99
- margin-left: 16px;
100
- }
101
- }
102
- .dx-submenu .dx-menu-items-container .dx-icon {
103
- margin-right: 16px;
104
- }
105
- .dx-menu-item .dx-menu-item-content {
106
- padding: 3px 15px 4px;
107
- }
108
- }
109
-
110
- .dx-theme-generic .user-menu .dx-menu-item-content .dx-menu-item-text {
111
- padding-left: 4px;
112
- padding-right: 4px;
113
- }
114
- </style>
@@ -1,65 +0,0 @@
1
- .content {
2
- line-height: 1.5;
3
- flex-grow: 1;
4
-
5
- h2 {
6
- font-size: 30px;
7
- margin-top: 20px;
8
- margin-bottom: 20px;
9
- }
10
- }
11
-
12
- .container {
13
- height: 100%;
14
- flex-direction: column;
15
- display: flex;
16
- }
17
-
18
- .layout-body {
19
- flex: 1;
20
- min-height: 0;
21
- }
22
-
23
- .side-nav-outer-toolbar .dx-drawer {
24
- height: calc(100% - 56px)
25
- }
26
-
27
- .content-block {
28
- margin-left: 40px;
29
- margin-right: 40px;
30
- margin-top: 20px;
31
-
32
- .screen-x-small & {
33
- margin-left: 20px;
34
- margin-right: 20px;
35
- }
36
- }
37
-
38
- .responsive-paddings {
39
- padding: 20px;
40
-
41
- .screen-large & {
42
- padding: 40px;
43
- }
44
- }
45
-
46
- .dx-card.wide-card {
47
- border-radius: 0;
48
- margin-left: 0;
49
- margin-right: 0;
50
- border-right: 0;
51
- border-left: 0;
52
- }
53
-
54
- .with-footer > .dx-scrollable-wrapper >
55
- .dx-scrollable-container > .dx-scrollable-content {
56
- height: 100%;
57
-
58
- & > .dx-scrollview-content {
59
- display: flex;
60
- flex-direction: column;
61
- min-height: 100%;
62
- }
63
- }
64
-
65
- $side-panel-min-width: 60px;
@@ -1,158 +0,0 @@
1
- <template>
2
- <div class="side-nav-inner-toolbar">
3
- <dx-drawer
4
- class="drawer"
5
- position="before"
6
- template="menu"
7
- :opened.sync="menuOpened"
8
- :opened-state-mode="drawerOptions.menuMode"
9
- :reveal-mode="drawerOptions.menuRevealMode"
10
- :min-size="drawerOptions.minMenuSize"
11
- :shading="drawerOptions.shaderEnabled"
12
- :close-on-outside-click="drawerOptions.closeOnOutsideClick"
13
- >
14
- <div class="container">
15
- <header-toolbar
16
- :menu-toggle-enabled="headerMenuTogglerEnabled"
17
- :toggle-menu-func="toggleMenu"
18
- />
19
- <dx-scroll-view ref="scrollViewRef" class="layout-body with-footer">
20
- <slot />
21
- <slot name="footer" />
22
- </dx-scroll-view>
23
- </div>
24
- <template #menu>
25
- <side-nav-menu
26
- :compact-mode="!menuOpened"
27
- @click="handleSideBarClick"
28
- >
29
- <dx-toolbar id="navigation-header">
30
- <dx-item v-if="!isXSmall" location="before" css-class="menu-button">
31
- <template #default>
32
- <dx-button
33
- icon="menu"
34
- styling-mode="text"
35
- @click="toggleMenu"
36
- />
37
- </template>
38
- </dx-item>
39
- <dx-item location="before" css-class="header-title dx-toolbar-label">
40
- <template #default>
41
- <div>
42
- <div>{{ title }}</div>
43
- </div>
44
- </template>
45
- </dx-item>
46
- </dx-toolbar>
47
- </side-nav-menu>
48
- </template>
49
- </dx-drawer>
50
- </div>
51
- </template>
52
-
53
- <script>
54
- import DxButton from "devextreme-vue/button";
55
- import DxDrawer from "devextreme-vue/drawer";
56
- import DxScrollView from "devextreme-vue/scroll-view";
57
- import DxToolbar, { DxItem } from "devextreme-vue/toolbar";
58
-
59
- import HeaderToolbar from "../components/header-toolbar";
60
- import SideNavMenu from "../components/side-nav-menu";
61
- import menuItems from "../app-navigation";
62
-
63
- export default {
64
- props: {
65
- title: String,
66
- isXSmall: Boolean,
67
- isLarge: Boolean
68
- },
69
- methods: {
70
- toggleMenu(e) {
71
- const pointerEvent = e.event;
72
- pointerEvent.stopPropagation();
73
- if (this.menuOpened) {
74
- this.menuTemporaryOpened = false;
75
- }
76
- this.menuOpened = !this.menuOpened;
77
- },
78
- handleSideBarClick() {
79
- if (this.menuOpened === false) this.menuTemporaryOpened = true;
80
- this.menuOpened = true;
81
- }
82
- },
83
- data() {
84
- return {
85
- menuOpened: this.isLarge,
86
- menuTemporaryOpened: false,
87
- menuItems
88
- };
89
- },
90
- computed: {
91
- drawerOptions() {
92
- const shaderEnabled = !this.isLarge;
93
- return {
94
- menuMode: this.isLarge ? "shrink" : "overlap",
95
- menuRevealMode: this.isXSmall ? "slide" : "expand",
96
- minMenuSize: this.isXSmall ? 0 : 60,
97
- menuOpened: this.isLarge,
98
- closeOnOutsideClick: shaderEnabled,
99
- shaderEnabled
100
- };
101
- },
102
- headerMenuTogglerEnabled() {
103
- return this.isXSmall;
104
- },
105
- scrollView() {
106
- return this.$refs["scrollViewRef"].instance;
107
- }
108
- },
109
- watch: {
110
- isLarge() {
111
- if (!this.menuTemporaryOpened) {
112
- this.menuOpened = this.isLarge;
113
- }
114
- },
115
- $route() {
116
- if (this.menuTemporaryOpened || !this.isLarge) {
117
- this.menuOpened = false;
118
- this.menuTemporaryOpened = false;
119
- }
120
- this.scrollView.scrollTo(0);
121
- }
122
- },
123
- components: {
124
- DxButton,
125
- DxDrawer,
126
- DxScrollView,
127
- DxToolbar,
128
- DxItem,
129
- HeaderToolbar,
130
- SideNavMenu
131
- }
132
- };
133
- </script>
134
-
135
- <style lang="scss">
136
- .side-nav-inner-toolbar {
137
- width: 100%;
138
- }
139
-
140
- #navigation-header {
141
- @import "../themes/generated/variables.additional.scss";
142
- background-color: $base-accent;
143
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
144
-
145
- .menu-button .dx-icon {
146
- color: $base-text-color;
147
- }
148
-
149
- .screen-x-small & {
150
- padding-left: 20px;
151
- }
152
-
153
- .dx-theme-generic & {
154
- padding-top: 10px;
155
- padding-bottom: 10px;
156
- }
157
- }
158
- </style>