cob-cli 2.25.0 → 2.27.1

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 (221) hide show
  1. package/bin/cob-cli.js +6 -7
  2. package/bin/handleAutoComplete.js +3 -4
  3. package/lib/commands/customize.js +216 -63
  4. package/package.json +3 -2
  5. package/.gitmodules +0 -27
  6. package/.vscode/launch.json +0 -106
  7. package/README.Development.md +0 -294
  8. package/README.publish.md +0 -10
  9. package/customizations/backend.email.js +0 -10
  10. package/customizations/backend.js +0 -14
  11. package/customizations/backend.updateField.js +0 -11
  12. package/customizations/backend.vuepress.js +0 -35
  13. package/customizations/dashboard.dash.js +0 -14
  14. package/customizations/dashboard.js +0 -14
  15. package/customizations/dashboard.simple.js +0 -12
  16. package/customizations/dashboard.vue.empty.js +0 -12
  17. package/customizations/dashboard.vue.grid.js +0 -10
  18. package/customizations/dashboard.vue.js +0 -14
  19. package/customizations/dashboard.vue.menuAndGrid.js +0 -10
  20. package/customizations/frontend.common.js +0 -16
  21. package/customizations/frontend.easy.js +0 -16
  22. package/customizations/frontend.formatList.currency.js +0 -17
  23. package/customizations/frontend.formatList.js +0 -13
  24. package/customizations/frontend.js +0 -14
  25. package/customizations/importer.js +0 -10
  26. package/customizations/keywords.audit.js +0 -18
  27. package/customizations/keywords.calc.js +0 -18
  28. package/customizations/keywords.image.js +0 -16
  29. package/customizations/keywords.js +0 -17
  30. package/customizations/keywords.kibana.js +0 -16
  31. package/customizations/keywords.log.js +0 -18
  32. package/customizations/keywords.styleResults.js +0 -18
  33. package/lib/task_lists/customize_copy.js +0 -51
  34. package/lib/task_lists/customize_mergeFiles.js +0 -42
  35. package/lib/task_lists/customize_questions.js +0 -40
  36. package/templates/backend/vuepress/integrationm/actions/getVuePressDoc.groovy +0 -74
  37. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarConfig.groovy +0 -42
  38. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy +0 -17
  39. package/templates/backend/vuepress/others/vuepress/definition_contents_v234.json +0 -619
  40. package/templates/backend/vuepress/others/vuepress/nginx/README.md +0 -28
  41. package/templates/backend/vuepress/others/vuepress/package-lock.json +0 -29656
  42. package/templates/backend/vuepress/others/vuepress/package.json +0 -24
  43. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/DescriptVideo.vue +0 -22
  44. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/Graph.vue +0 -124
  45. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/ReadingTime.vue +0 -26
  46. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/References.vue +0 -228
  47. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/RestrictedContent.vue +0 -77
  48. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.js +0 -101
  49. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.json +0 -31
  50. package/templates/backend/vuepress/others/vuepress/src/.vuepress/enhanceApp.js +0 -14
  51. package/templates/backend/vuepress/others/vuepress/src/.vuepress/nav/getNavTranslated.js +0 -52
  52. package/templates/backend/vuepress/others/vuepress/src/.vuepress/plugins/References.js +0 -96
  53. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/Logo-Cult-of-Bits-400x400-1.png +0 -0
  54. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/favicon-cob.png +0 -0
  55. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/logo.png +0 -0
  56. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/index.styl +0 -39
  57. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/palette.styl +0 -17
  58. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/LICENSE +0 -21
  59. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/README.md +0 -11
  60. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/AlgoliaSearchBox.vue +0 -172
  61. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownLink.vue +0 -252
  62. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownTransition.vue +0 -33
  63. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Home.vue +0 -134
  64. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLink.vue +0 -98
  65. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLinks.vue +0 -165
  66. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Navbar.vue +0 -140
  67. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Page.vue +0 -31
  68. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageEdit.vue +0 -119
  69. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageNav.vue +0 -163
  70. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Sidebar.vue +0 -64
  71. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarButton.vue +0 -40
  72. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarGroup.vue +0 -144
  73. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLink.vue +0 -140
  74. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLinks.vue +0 -114
  75. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/Badge.vue +0 -44
  76. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeBlock.vue +0 -41
  77. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeGroup.vue +0 -120
  78. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/index.js +0 -59
  79. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/404.vue +0 -30
  80. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/Layout.vue +0 -151
  81. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/noopModule.js +0 -1
  82. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/package.json +0 -44
  83. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/arrow.styl +0 -22
  84. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/code.styl +0 -137
  85. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/config.styl +0 -1
  86. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/custom-blocks.styl +0 -44
  87. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/index.styl +0 -202
  88. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/mobile.styl +0 -37
  89. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/toc.styl +0 -3
  90. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/wrapper.styl +0 -10
  91. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/util/index.js +0 -244
  92. package/templates/dashboards/cob-dashboard-html/demoDashboard.html +0 -18
  93. package/templates/dashboards/cob-dashboard-vue/package-lock.json +0 -25020
  94. package/templates/dashboards/cob-dashboard-vue/package.json +0 -21
  95. package/templates/dashboards/cob-dashboard-vue/src/App.vue +0 -26
  96. package/templates/dashboards/cob-dashboard-vue/src/dashboard.html +0 -31
  97. package/templates/dashboards/cob-dashboard-vue/src/main.js +0 -12
  98. package/templates/dashboards/cob-dashboard-vue/src/plugins/cobUiVueComponents.js +0 -6
  99. package/templates/dashboards/cob-dashboard-vue/src/plugins/vuetify.js +0 -9
  100. package/templates/dashboards/cob-dashboard-vue/vue.config.js +0 -104
  101. package/templates/dashboards/dash/dist/css/app.7b16c01a.css +0 -11
  102. package/templates/dashboards/dash/dist/dashboard.html +0 -25
  103. package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
  104. package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
  105. package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
  106. package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
  107. package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
  108. package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
  109. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
  110. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
  111. package/templates/dashboards/dash/dist/js/app.13b950c8.js +0 -199
  112. package/templates/dashboards/dash/dist/js/app.13b950c8.js.map +0 -1
  113. package/templates/dashboards/dash/package-lock.json +0 -22646
  114. package/templates/dashboards/dash/package.json +0 -27
  115. package/templates/dashboards/dash/src/App.vue +0 -124
  116. package/templates/dashboards/dash/src/assets/css/all.min.css +0 -6
  117. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
  118. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
  119. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
  120. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
  121. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
  122. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
  123. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
  124. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  125. package/templates/dashboards/dash/src/collector.js +0 -222
  126. package/templates/dashboards/dash/src/components/Attention.vue +0 -30
  127. package/templates/dashboards/dash/src/components/Board.vue +0 -35
  128. package/templates/dashboards/dash/src/components/Calendar.vue +0 -422
  129. package/templates/dashboards/dash/src/components/Dashboard.vue +0 -27
  130. package/templates/dashboards/dash/src/components/Filter.vue +0 -68
  131. package/templates/dashboards/dash/src/components/Kibana.vue +0 -138
  132. package/templates/dashboards/dash/src/components/Label.vue +0 -15
  133. package/templates/dashboards/dash/src/components/Menu.vue +0 -44
  134. package/templates/dashboards/dash/src/components/Totals.vue +0 -49
  135. package/templates/dashboards/dash/src/components/TotalsValue.vue +0 -59
  136. package/templates/dashboards/dash/src/components/shared/Instance.vue +0 -64
  137. package/templates/dashboards/dash/src/components/shared/Waiting.vue +0 -25
  138. package/templates/dashboards/dash/src/dashboard.html +0 -39
  139. package/templates/dashboards/dash/src/definition_dashboard_v0.json +0 -924
  140. package/templates/dashboards/dash/src/definition_dashboard_v1.json +0 -1
  141. package/templates/dashboards/dash/src/input.css +0 -9
  142. package/templates/dashboards/dash/src/main.js +0 -11
  143. package/templates/dashboards/dash/src/model/ComponentStatePersistence.js +0 -66
  144. package/templates/dashboards/dash/src/output.css +0 -314245
  145. package/templates/dashboards/dash/src/test_collector.js +0 -3719
  146. package/templates/dashboards/dash/src/utils/EsInstanceUtils.js +0 -8
  147. package/templates/dashboards/dash/tailwind.config.js +0 -12
  148. package/templates/dashboards/dash/vue.config.js +0 -104
  149. package/templates/frontend/common/templates/frontend/common/css/_dualColumn.css +0 -46
  150. package/templates/frontend/common/templates/frontend/common/css/_global.css +0 -19
  151. package/templates/frontend/common/templates/frontend/common/css/_hidden.css +0 -13
  152. package/templates/frontend/common/templates/frontend/common/css/_history.css +0 -13
  153. package/templates/frontend/common/templates/frontend/common/css/_mobile.css +0 -125
  154. package/templates/frontend/common/templates/frontend/common/css/customizations.__MERGE__.css +0 -5
  155. package/templates/frontend/common/templates/frontend/common/js/cob/_disable_save_onSubdetail.js +0 -11
  156. package/templates/frontend/common/templates/frontend/common/js/cob/_group_references.js +0 -22
  157. package/templates/frontend/common/templates/frontend/common/js/cob/_show_hidden.js +0 -35
  158. package/templates/frontend/common/templates/frontend/common/js/customizations2.__MERGE__.js +0 -3
  159. package/templates/frontend/common/templates/frontend/common/package.json +0 -3
  160. package/templates/frontend/easy/css/_easy/googlefonts.css +0 -360
  161. package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +0 -10488
  162. package/templates/frontend/easy/js/_easy/lib/axios.min.js +0 -9
  163. package/templates/frontend/easy/js/_easy/lib/marked.min.js +0 -6
  164. package/templates/frontend/easy/js/_easy/lib/vue.js +0 -11912
  165. package/templates/frontend/easy/js/_easy/lib/vue.min.js +0 -6
  166. package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +0 -6
  167. package/templates/frontend/easy/js/customizations2.__MERGE__.js +0 -22
  168. package/templates/frontend/easy/webapp/.browserslistrc +0 -2
  169. package/templates/frontend/easy/webapp/.eslintrc.js +0 -17
  170. package/templates/frontend/easy/webapp/README.md +0 -60
  171. package/templates/frontend/easy/webapp/babel.config.js +0 -5
  172. package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +0 -1
  173. package/templates/frontend/easy/webapp/dist/dashboard.html +0 -13
  174. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +0 -2
  175. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +0 -1
  176. package/templates/frontend/easy/webapp/package-lock.json +0 -32986
  177. package/templates/frontend/easy/webapp/package.json +0 -32
  178. package/templates/frontend/easy/webapp/postcss.config.js +0 -5
  179. package/templates/frontend/easy/webapp/public/dashboard.html +0 -13
  180. package/templates/frontend/easy/webapp/src/App.vue +0 -181
  181. package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
  182. package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +0 -59
  183. package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +0 -163
  184. package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +0 -225
  185. package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +0 -95
  186. package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +0 -59
  187. package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +0 -60
  188. package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +0 -73
  189. package/templates/frontend/easy/webapp/src/main.js +0 -19
  190. package/templates/frontend/easy/webapp/src/perm-templates.js +0 -189
  191. package/templates/frontend/easy/webapp/src/perms.js +0 -197
  192. package/templates/frontend/easy/webapp/vue.config.js +0 -66
  193. package/templates/frontend/formatList/currency/css/_format_currency.css +0 -11
  194. package/templates/frontend/formatList/currency/css/customizations.__MERGE__.css +0 -1
  195. package/templates/frontend/formatList/currency/js/cob/_format_currency.js +0 -11
  196. package/templates/frontend/formatList/currency/js/customizations2.__MERGE__.js +0 -1
  197. package/templates/frontend/formatList/currency/package.json +0 -3
  198. package/templates/gitignore +0 -14
  199. package/templates/keywords/audit/backend/scripts/_audit.groovy +0 -78
  200. package/templates/keywords/audit/frontend/js/cob/_audit.js +0 -24
  201. package/templates/keywords/audit/frontend/js/customizations2.__MERGE__.js +0 -1
  202. package/templates/keywords/audit/package.json +0 -3
  203. package/templates/keywords/calc/backend/scripts/_calc.groovy +0 -151
  204. package/templates/keywords/calc/frontend/js/cob/_calc.js +0 -193
  205. package/templates/keywords/calc/frontend/js/customizations2.__MERGE__.js +0 -1
  206. package/templates/keywords/calc/package.json +0 -3
  207. package/templates/keywords/image/frontend/js/cob/_image.js +0 -30
  208. package/templates/keywords/image/frontend/js/customizations2.__MERGE__.js +0 -1
  209. package/templates/keywords/image/package.json +0 -3
  210. package/templates/keywords/kibana/frontend/js/cob/_kibana.js +0 -58
  211. package/templates/keywords/kibana/frontend/js/customizations2.__MERGE__.js +0 -1
  212. package/templates/keywords/kibana/package.json +0 -3
  213. package/templates/keywords/log/backend/scripts/_log.groovy +0 -95
  214. package/templates/keywords/log/frontend/css/_log.css +0 -5
  215. package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +0 -1
  216. package/templates/keywords/log/package.json +0 -3
  217. package/templates/keywords/styleResults/frontend/css/_styleResults.css +0 -86
  218. package/templates/keywords/styleResults/frontend/css/customizations.__MERGE__.css +0 -1
  219. package/templates/keywords/styleResults/frontend/js/cob/_styleResults.js +0 -38
  220. package/templates/keywords/styleResults/frontend/js/customizations2.__MERGE__.js +0 -1
  221. package/templates/keywords/styleResults/package.json +0 -3
@@ -1,114 +0,0 @@
1
- <template>
2
- <ul
3
- v-if="items.length"
4
- class="sidebar-links"
5
- >
6
- <li
7
- v-for="(item, i) in items"
8
- :key="i"
9
- >
10
- <SidebarGroup
11
- v-if="item.type === 'group'"
12
- :item="item"
13
- :open="isActivePath(item.path)"
14
- :collapsable="item.collapsable || item.collapsible"
15
- :depth="depth"
16
- @toggle="toggleGroup(i)"
17
- />
18
- <SidebarLink
19
- v-else
20
- :sidebar-depth="sidebarDepth"
21
- :item="item"
22
- :hide="i==0"
23
- />
24
- </li>
25
- </ul>
26
- </template>
27
-
28
- <script>
29
- import SidebarGroup from '@theme/components/SidebarGroup.vue'
30
- import SidebarLink from '@theme/components/SidebarLink.vue'
31
- import { isActive, normalize } from '../util'
32
-
33
- export default {
34
- name: 'SidebarLinks',
35
-
36
- components: { SidebarGroup, SidebarLink },
37
-
38
- props: [
39
- 'items',
40
- 'depth', // depth of current sidebar links
41
- 'sidebarDepth', // depth of headers to be extracted
42
- 'initialOpenGroupIndex'
43
- ],
44
-
45
- data () {
46
- return {
47
- openGroupIndex: this.initialOpenGroupIndex || 0
48
- }
49
- },
50
-
51
- watch: {
52
- '$route' () {
53
- this.refreshIndex()
54
- }
55
- },
56
-
57
- created () {
58
- this.refreshIndex()
59
- },
60
-
61
- methods: {
62
- isActivePath(path) {
63
- // basead on isActive() from theme-default/util/index.js
64
- const route = this.$route
65
- const routePath = normalize(route.path)
66
- const pagePath = normalize(path)
67
- return routePath.indexOf(pagePath) == 0
68
- },
69
- refreshIndex () {
70
- const index = resolveOpenGroupIndex(
71
- this.$route,
72
- this.items
73
- )
74
- if (index > -1) {
75
- this.openGroupIndex = index
76
- }
77
- },
78
-
79
- toggleGroup (index) {
80
- this.openGroupIndex = index === this.openGroupIndex ? -1 : index
81
- },
82
-
83
- isActive (page) {
84
- return isActive(this.$route, page.regularPath)
85
- }
86
- }
87
- }
88
-
89
- function resolveOpenGroupIndex (route, items) {
90
- for (let i = 0; i < items.length; i++) {
91
- const item = items[i]
92
- if (descendantIsActive(route, item)) {
93
- return i
94
- }
95
- }
96
- return -1
97
- }
98
-
99
- function descendantIsActive (route, item) {
100
- if (item.type === 'group') {
101
- const childIsActive = item.path && isActive(route, item.path)
102
- const grandChildIsActive = item.children.some(child => {
103
- if (child.type === 'group') {
104
- return descendantIsActive(route, child)
105
- } else {
106
- return child.type === 'page' && isActive(route, child.path)
107
- }
108
- })
109
-
110
- return childIsActive || grandChildIsActive
111
- }
112
- return false
113
- }
114
- </script>
@@ -1,44 +0,0 @@
1
- <script>
2
- export default {
3
- functional: true,
4
- props: {
5
- type: {
6
- type: String,
7
- default: 'tip'
8
- },
9
- text: String,
10
- vertical: {
11
- type: String,
12
- default: 'top'
13
- }
14
- },
15
- render (h, { props, slots }) {
16
- return h('span', {
17
- class: ['badge', props.type],
18
- style: {
19
- verticalAlign: props.vertical
20
- }
21
- }, props.text || slots().default)
22
- }
23
- }
24
- </script>
25
-
26
- <style lang="stylus" scoped>
27
- .badge
28
- display inline-block
29
- font-size 14px
30
- height 18px
31
- line-height 18px
32
- border-radius 3px
33
- padding 0 6px
34
- color white
35
- background-color #42b983
36
- &.tip, &.green
37
- background-color $badgeTipColor
38
- &.error
39
- background-color $badgeErrorColor
40
- &.warning, &.warn, &.yellow
41
- background-color $badgeWarningColor
42
- & + &
43
- margin-left 5px
44
- </style>
@@ -1,41 +0,0 @@
1
- <template>
2
- <div
3
- class="theme-code-block"
4
- :class="{ 'theme-code-block__active': active }"
5
- >
6
- <slot />
7
- </div>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- name: 'CodeBlock',
13
- props: {
14
- title: {
15
- type: String,
16
- required: true
17
- },
18
- active: {
19
- type: Boolean,
20
- default: false
21
- }
22
- },
23
- mounted () {
24
- if (this.$parent && this.$parent.loadTabs) {
25
- this.$parent.loadTabs()
26
- }
27
- }
28
- }
29
- </script>
30
-
31
- <style scoped>
32
- .theme-code-block {
33
- display: none;
34
- }
35
- .theme-code-block__active {
36
- display: block;
37
- }
38
- .theme-code-block > pre {
39
- background-color: orange;
40
- }
41
- </style>
@@ -1,120 +0,0 @@
1
- <template>
2
- <ClientOnly>
3
- <div class="theme-code-group">
4
- <div class="theme-code-group__nav">
5
- <ul class="theme-code-group__ul">
6
- <li
7
- v-for="(tab, i) in codeTabs"
8
- :key="tab.title"
9
- class="theme-code-group__li"
10
- >
11
- <button
12
- class="theme-code-group__nav-tab"
13
- :class="{
14
- 'theme-code-group__nav-tab-active': i === activeCodeTabIndex,
15
- }"
16
- @click="changeCodeTab(i)"
17
- >
18
- {{ tab.title }}
19
- </button>
20
- </li>
21
- </ul>
22
- </div>
23
- <slot />
24
- <pre
25
- v-if="codeTabs.length < 1"
26
- class="pre-blank"
27
- >// Make sure to add code blocks to your code group</pre>
28
- </div>
29
- </ClientOnly>
30
- </template>
31
-
32
- <script>
33
- export default {
34
- name: 'CodeGroup',
35
- data () {
36
- return {
37
- codeTabs: [],
38
- activeCodeTabIndex: -1
39
- }
40
- },
41
- watch: {
42
- activeCodeTabIndex (index) {
43
- this.activateCodeTab(index)
44
- }
45
- },
46
- mounted () {
47
- this.loadTabs()
48
- },
49
- methods: {
50
- changeCodeTab (index) {
51
- this.activeCodeTabIndex = index
52
- },
53
- loadTabs () {
54
- this.codeTabs = (this.$slots.default || []).filter(slot => Boolean(slot.componentOptions)).map((slot, index) => {
55
- if (slot.componentOptions.propsData.active === '') {
56
- this.activeCodeTabIndex = index
57
- }
58
-
59
- return {
60
- title: slot.componentOptions.propsData.title,
61
- elm: slot.elm
62
- }
63
- })
64
-
65
- if (this.activeCodeTabIndex === -1 && this.codeTabs.length > 0) {
66
- this.activeCodeTabIndex = 0
67
- }
68
-
69
- this.activateCodeTab(0)
70
- },
71
- activateCodeTab (index) {
72
- this.codeTabs.forEach(tab => {
73
- if (tab.elm) {
74
- tab.elm.classList.remove('theme-code-block__active')
75
- }
76
- })
77
-
78
- if (this.codeTabs[index].elm) {
79
- this.codeTabs[index].elm.classList.add('theme-code-block__active')
80
- }
81
- }
82
- }
83
- }
84
- </script>
85
-
86
- <style lang="stylus" scoped>
87
- .theme-code-group {}
88
- .theme-code-group__nav {
89
- margin-bottom: -35px;
90
- background-color: $codeBgColor;
91
- padding-bottom: 22px;
92
- border-top-left-radius: 6px;
93
- border-top-right-radius: 6px;
94
- padding-left: 10px;
95
- padding-top: 10px;
96
- }
97
- .theme-code-group__ul {
98
- margin: auto 0;
99
- padding-left: 0;
100
- display: inline-flex;
101
- list-style: none;
102
- }
103
- .theme-code-group__li {}
104
- .theme-code-group__nav-tab {
105
- border: 0;
106
- padding: 5px;
107
- cursor: pointer;
108
- background-color: transparent;
109
- font-size: 0.85em;
110
- line-height: 1.4;
111
- color: rgba(255, 255, 255, 0.9);
112
- font-weight: 600;
113
- }
114
- .theme-code-group__nav-tab-active {
115
- border-bottom: #42b983 1px solid;
116
- }
117
- .pre-blank {
118
- color: #42b983;
119
- }
120
- </style>
@@ -1,59 +0,0 @@
1
- const path = require('path')
2
-
3
- // Theme API.
4
- module.exports = (options, ctx) => {
5
- const { themeConfig, siteConfig } = ctx
6
-
7
- // resolve algolia
8
- const isAlgoliaSearch = (
9
- themeConfig.algolia
10
- || Object
11
- .keys(siteConfig.locales && themeConfig.locales || {})
12
- .some(base => themeConfig.locales[base].algolia)
13
- )
14
-
15
- const enableSmoothScroll = themeConfig.smoothScroll === true
16
-
17
- return {
18
- alias () {
19
- return {
20
- '@AlgoliaSearchBox': isAlgoliaSearch
21
- ? path.resolve(__dirname, 'components/AlgoliaSearchBox.vue')
22
- : path.resolve(__dirname, 'noopModule.js')
23
- }
24
- },
25
-
26
- plugins: [
27
- ['@vuepress/active-header-links', options.activeHeaderLinks],
28
- '@vuepress/search',
29
- '@vuepress/plugin-nprogress',
30
- ['container', {
31
- type: 'tip',
32
- defaultTitle: {
33
- '/': 'TIP',
34
- '/zh/': '提示'
35
- }
36
- }],
37
- ['container', {
38
- type: 'warning',
39
- defaultTitle: {
40
- '/': 'WARNING',
41
- '/zh/': '注意'
42
- }
43
- }],
44
- ['container', {
45
- type: 'danger',
46
- defaultTitle: {
47
- '/': 'WARNING',
48
- '/zh/': '警告'
49
- }
50
- }],
51
- ['container', {
52
- type: 'details',
53
- before: info => `<details class="custom-block details">${info ? `<summary>${info}</summary>` : ''}\n`,
54
- after: () => '</details>\n'
55
- }],
56
- ['smooth-scroll', enableSmoothScroll]
57
- ]
58
- }
59
- }
@@ -1,30 +0,0 @@
1
- <template>
2
- <div class="theme-container">
3
- <div class="theme-default-content">
4
- <h1>404</h1>
5
-
6
- <blockquote>{{ getMsg() }}</blockquote>
7
-
8
- <RouterLink to="/">
9
- Take me home.
10
- </RouterLink>
11
- </div>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- const msgs = [
17
- `There's nothing here.`,
18
- `How did we get here?`,
19
- `That's a Four-Oh-Four.`,
20
- `Looks like we've got some broken links.`
21
- ]
22
-
23
- export default {
24
- methods: {
25
- getMsg () {
26
- return msgs[Math.floor(Math.random() * msgs.length)]
27
- }
28
- }
29
- }
30
- </script>
@@ -1,151 +0,0 @@
1
- <template>
2
- <div
3
- class="theme-container"
4
- :class="pageClasses"
5
- @touchstart="onTouchStart"
6
- @touchend="onTouchEnd"
7
- >
8
- <Navbar
9
- v-if="shouldShowNavbar"
10
- @toggle-sidebar="toggleSidebar"
11
- />
12
-
13
- <div
14
- class="sidebar-mask"
15
- @click="toggleSidebar(false)"
16
- />
17
-
18
- <Sidebar
19
- :items="sidebarItems"
20
- @toggle-sidebar="toggleSidebar"
21
- >
22
- <template #top>
23
- <slot name="sidebar-top" />
24
- </template>
25
- <template #bottom>
26
- <slot name="sidebar-bottom" />
27
- </template>
28
- </Sidebar>
29
-
30
- <Home v-if="$page.frontmatter.home" />
31
-
32
- <Page
33
- v-else
34
- :sidebar-items="sidebarItems"
35
- >
36
- <template #top>
37
- <slot name="page-top" />
38
- </template>
39
- <template #bottom>
40
- <slot name="page-bottom" />
41
- </template>
42
- </Page>
43
- </div>
44
- </template>
45
-
46
- <script>
47
- import Home from '@theme/components/Home.vue'
48
- import Navbar from '@theme/components/Navbar.vue'
49
- import Page from '@theme/components/Page.vue'
50
- import Sidebar from '@theme/components/Sidebar.vue'
51
- import { resolveSidebarItems } from '../util'
52
-
53
- export default {
54
- name: 'Layout',
55
-
56
- components: {
57
- Home,
58
- Page,
59
- Sidebar,
60
- Navbar
61
- },
62
-
63
- data () {
64
- return {
65
- isSidebarOpen: false
66
- }
67
- },
68
-
69
- computed: {
70
- shouldShowNavbar () {
71
- const { themeConfig } = this.$site
72
- const { frontmatter } = this.$page
73
- if (
74
- frontmatter.navbar === false
75
- || themeConfig.navbar === false) {
76
- return false
77
- }
78
- return (
79
- this.$title
80
- || themeConfig.logo
81
- || themeConfig.repo
82
- || themeConfig.nav
83
- || this.$themeLocaleConfig.nav
84
- )
85
- },
86
-
87
- shouldShowSidebar () {
88
- const { frontmatter } = this.$page
89
- return (
90
- !frontmatter.home
91
- && frontmatter.sidebar !== false
92
- && this.sidebarItems.length
93
- )
94
- },
95
-
96
- sidebarItems () {
97
- return resolveSidebarItems(
98
- this.$page,
99
- this.$page.regularPath,
100
- this.$site,
101
- this.$localePath
102
- )
103
- },
104
-
105
- pageClasses () {
106
- const userPageClass = this.$page.frontmatter.pageClass
107
- return [
108
- {
109
- 'no-navbar': !this.shouldShowNavbar,
110
- 'sidebar-open': this.isSidebarOpen,
111
- 'no-sidebar': !this.shouldShowSidebar
112
- },
113
- userPageClass
114
- ]
115
- }
116
- },
117
-
118
- mounted () {
119
- this.$router.afterEach(() => {
120
- this.isSidebarOpen = false
121
- })
122
- },
123
-
124
- methods: {
125
- toggleSidebar (to) {
126
- this.isSidebarOpen = typeof to === 'boolean' ? to : !this.isSidebarOpen
127
- this.$emit('toggle-sidebar', this.isSidebarOpen)
128
- },
129
-
130
- // side swipe
131
- onTouchStart (e) {
132
- this.touchStart = {
133
- x: e.changedTouches[0].clientX,
134
- y: e.changedTouches[0].clientY
135
- }
136
- },
137
-
138
- onTouchEnd (e) {
139
- const dx = e.changedTouches[0].clientX - this.touchStart.x
140
- const dy = e.changedTouches[0].clientY - this.touchStart.y
141
- if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 40) {
142
- if (dx > 0 && this.touchStart.x <= 80) {
143
- this.toggleSidebar(true)
144
- } else {
145
- this.toggleSidebar(false)
146
- }
147
- }
148
- }
149
- }
150
- }
151
- </script>
@@ -1,44 +0,0 @@
1
- {
2
- "name": "@vuepress/theme-default",
3
- "version": "1.8.2",
4
- "description": "Default theme for VuePress",
5
- "keywords": [
6
- "documentation",
7
- "generator",
8
- "vue",
9
- "vuepress"
10
- ],
11
- "homepage": "https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/theme-default#readme",
12
- "bugs": {
13
- "url": "https://github.com/vuejs/vuepress/issues"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/vuejs/vuepress.git",
18
- "directory": "packages/@vuepress/theme-default"
19
- },
20
- "license": "MIT",
21
- "author": "Evan You",
22
- "main": "index.js",
23
- "dependencies": {
24
- "@vuepress/plugin-active-header-links": "1.8.2",
25
- "@vuepress/plugin-nprogress": "1.8.2",
26
- "@vuepress/plugin-search": "1.8.2",
27
- "docsearch.js": "^2.5.2",
28
- "lodash": "^4.17.15",
29
- "stylus": "^0.54.8",
30
- "stylus-loader": "^3.0.2",
31
- "vuepress-plugin-container": "^2.0.2",
32
- "vuepress-plugin-smooth-scroll": "^0.0.3"
33
- },
34
- "publishConfig": {
35
- "access": "public"
36
- },
37
- "maintainers": [
38
- {
39
- "name": "ULIVZ",
40
- "email": "chl814@foxmail.com"
41
- }
42
- ],
43
- "gitHead": "11eed0f0f105b97a7324cfa8e59d7d27bb966842"
44
- }
@@ -1,22 +0,0 @@
1
- @require './config'
2
-
3
- .arrow
4
- display inline-block
5
- width 0
6
- height 0
7
- &.up
8
- border-left 4px solid transparent
9
- border-right 4px solid transparent
10
- border-bottom 6px solid $arrowBgColor
11
- &.down
12
- border-left 4px solid transparent
13
- border-right 4px solid transparent
14
- border-top 6px solid $arrowBgColor
15
- &.right
16
- border-top 4px solid transparent
17
- border-bottom 4px solid transparent
18
- border-left 6px solid $arrowBgColor
19
- &.left
20
- border-top 4px solid transparent
21
- border-bottom 4px solid transparent
22
- border-right 6px solid $arrowBgColor