cob-cli 2.25.0 → 2.26.0

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 (215) hide show
  1. package/bin/cob-cli.js +3 -1
  2. package/bin/handleAutoComplete.js +1 -4
  3. package/lib/commands/customize.js +213 -66
  4. package/package.json +3 -2
  5. package/.vscode/launch.json +0 -106
  6. package/customizations/backend.email.js +0 -10
  7. package/customizations/backend.js +0 -14
  8. package/customizations/backend.updateField.js +0 -11
  9. package/customizations/backend.vuepress.js +0 -35
  10. package/customizations/dashboard.dash.js +0 -14
  11. package/customizations/dashboard.js +0 -14
  12. package/customizations/dashboard.simple.js +0 -12
  13. package/customizations/dashboard.vue.empty.js +0 -12
  14. package/customizations/dashboard.vue.grid.js +0 -10
  15. package/customizations/dashboard.vue.js +0 -14
  16. package/customizations/dashboard.vue.menuAndGrid.js +0 -10
  17. package/customizations/frontend.common.js +0 -16
  18. package/customizations/frontend.easy.js +0 -16
  19. package/customizations/frontend.formatList.currency.js +0 -17
  20. package/customizations/frontend.formatList.js +0 -13
  21. package/customizations/frontend.js +0 -14
  22. package/customizations/importer.js +0 -10
  23. package/customizations/keywords.audit.js +0 -18
  24. package/customizations/keywords.calc.js +0 -18
  25. package/customizations/keywords.image.js +0 -16
  26. package/customizations/keywords.js +0 -17
  27. package/customizations/keywords.kibana.js +0 -16
  28. package/customizations/keywords.log.js +0 -18
  29. package/customizations/keywords.styleResults.js +0 -18
  30. package/templates/backend/vuepress/integrationm/actions/getVuePressDoc.groovy +0 -74
  31. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarConfig.groovy +0 -42
  32. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy +0 -17
  33. package/templates/backend/vuepress/others/vuepress/definition_contents_v234.json +0 -619
  34. package/templates/backend/vuepress/others/vuepress/nginx/README.md +0 -28
  35. package/templates/backend/vuepress/others/vuepress/package-lock.json +0 -29656
  36. package/templates/backend/vuepress/others/vuepress/package.json +0 -24
  37. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/DescriptVideo.vue +0 -22
  38. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/Graph.vue +0 -124
  39. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/ReadingTime.vue +0 -26
  40. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/References.vue +0 -228
  41. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/RestrictedContent.vue +0 -77
  42. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.js +0 -101
  43. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.json +0 -31
  44. package/templates/backend/vuepress/others/vuepress/src/.vuepress/enhanceApp.js +0 -14
  45. package/templates/backend/vuepress/others/vuepress/src/.vuepress/nav/getNavTranslated.js +0 -52
  46. package/templates/backend/vuepress/others/vuepress/src/.vuepress/plugins/References.js +0 -96
  47. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/Logo-Cult-of-Bits-400x400-1.png +0 -0
  48. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/favicon-cob.png +0 -0
  49. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/logo.png +0 -0
  50. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/index.styl +0 -39
  51. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/palette.styl +0 -17
  52. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/LICENSE +0 -21
  53. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/README.md +0 -11
  54. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/AlgoliaSearchBox.vue +0 -172
  55. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownLink.vue +0 -252
  56. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownTransition.vue +0 -33
  57. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Home.vue +0 -134
  58. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLink.vue +0 -98
  59. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLinks.vue +0 -165
  60. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Navbar.vue +0 -140
  61. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Page.vue +0 -31
  62. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageEdit.vue +0 -119
  63. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageNav.vue +0 -163
  64. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Sidebar.vue +0 -64
  65. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarButton.vue +0 -40
  66. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarGroup.vue +0 -144
  67. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLink.vue +0 -140
  68. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLinks.vue +0 -114
  69. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/Badge.vue +0 -44
  70. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeBlock.vue +0 -41
  71. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeGroup.vue +0 -120
  72. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/index.js +0 -59
  73. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/404.vue +0 -30
  74. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/Layout.vue +0 -151
  75. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/noopModule.js +0 -1
  76. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/package.json +0 -44
  77. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/arrow.styl +0 -22
  78. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/code.styl +0 -137
  79. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/config.styl +0 -1
  80. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/custom-blocks.styl +0 -44
  81. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/index.styl +0 -202
  82. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/mobile.styl +0 -37
  83. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/toc.styl +0 -3
  84. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/wrapper.styl +0 -10
  85. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/util/index.js +0 -244
  86. package/templates/dashboards/cob-dashboard-html/demoDashboard.html +0 -18
  87. package/templates/dashboards/cob-dashboard-vue/package-lock.json +0 -25020
  88. package/templates/dashboards/cob-dashboard-vue/package.json +0 -21
  89. package/templates/dashboards/cob-dashboard-vue/src/App.vue +0 -26
  90. package/templates/dashboards/cob-dashboard-vue/src/dashboard.html +0 -31
  91. package/templates/dashboards/cob-dashboard-vue/src/main.js +0 -12
  92. package/templates/dashboards/cob-dashboard-vue/src/plugins/cobUiVueComponents.js +0 -6
  93. package/templates/dashboards/cob-dashboard-vue/src/plugins/vuetify.js +0 -9
  94. package/templates/dashboards/cob-dashboard-vue/vue.config.js +0 -104
  95. package/templates/dashboards/dash/dist/css/app.7b16c01a.css +0 -11
  96. package/templates/dashboards/dash/dist/dashboard.html +0 -25
  97. package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
  98. package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
  99. package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
  100. package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
  101. package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
  102. package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
  103. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
  104. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
  105. package/templates/dashboards/dash/dist/js/app.13b950c8.js +0 -199
  106. package/templates/dashboards/dash/dist/js/app.13b950c8.js.map +0 -1
  107. package/templates/dashboards/dash/package-lock.json +0 -22646
  108. package/templates/dashboards/dash/package.json +0 -27
  109. package/templates/dashboards/dash/src/App.vue +0 -124
  110. package/templates/dashboards/dash/src/assets/css/all.min.css +0 -6
  111. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
  112. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
  113. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
  114. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
  115. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
  116. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
  117. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
  118. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  119. package/templates/dashboards/dash/src/collector.js +0 -222
  120. package/templates/dashboards/dash/src/components/Attention.vue +0 -30
  121. package/templates/dashboards/dash/src/components/Board.vue +0 -35
  122. package/templates/dashboards/dash/src/components/Calendar.vue +0 -422
  123. package/templates/dashboards/dash/src/components/Dashboard.vue +0 -27
  124. package/templates/dashboards/dash/src/components/Filter.vue +0 -68
  125. package/templates/dashboards/dash/src/components/Kibana.vue +0 -138
  126. package/templates/dashboards/dash/src/components/Label.vue +0 -15
  127. package/templates/dashboards/dash/src/components/Menu.vue +0 -44
  128. package/templates/dashboards/dash/src/components/Totals.vue +0 -49
  129. package/templates/dashboards/dash/src/components/TotalsValue.vue +0 -59
  130. package/templates/dashboards/dash/src/components/shared/Instance.vue +0 -64
  131. package/templates/dashboards/dash/src/components/shared/Waiting.vue +0 -25
  132. package/templates/dashboards/dash/src/dashboard.html +0 -39
  133. package/templates/dashboards/dash/src/definition_dashboard_v0.json +0 -924
  134. package/templates/dashboards/dash/src/definition_dashboard_v1.json +0 -1
  135. package/templates/dashboards/dash/src/input.css +0 -9
  136. package/templates/dashboards/dash/src/main.js +0 -11
  137. package/templates/dashboards/dash/src/model/ComponentStatePersistence.js +0 -66
  138. package/templates/dashboards/dash/src/output.css +0 -314245
  139. package/templates/dashboards/dash/src/test_collector.js +0 -3719
  140. package/templates/dashboards/dash/src/utils/EsInstanceUtils.js +0 -8
  141. package/templates/dashboards/dash/tailwind.config.js +0 -12
  142. package/templates/dashboards/dash/vue.config.js +0 -104
  143. package/templates/frontend/common/templates/frontend/common/css/_dualColumn.css +0 -46
  144. package/templates/frontend/common/templates/frontend/common/css/_global.css +0 -19
  145. package/templates/frontend/common/templates/frontend/common/css/_hidden.css +0 -13
  146. package/templates/frontend/common/templates/frontend/common/css/_history.css +0 -13
  147. package/templates/frontend/common/templates/frontend/common/css/_mobile.css +0 -125
  148. package/templates/frontend/common/templates/frontend/common/css/customizations.__MERGE__.css +0 -5
  149. package/templates/frontend/common/templates/frontend/common/js/cob/_disable_save_onSubdetail.js +0 -11
  150. package/templates/frontend/common/templates/frontend/common/js/cob/_group_references.js +0 -22
  151. package/templates/frontend/common/templates/frontend/common/js/cob/_show_hidden.js +0 -35
  152. package/templates/frontend/common/templates/frontend/common/js/customizations2.__MERGE__.js +0 -3
  153. package/templates/frontend/common/templates/frontend/common/package.json +0 -3
  154. package/templates/frontend/easy/css/_easy/googlefonts.css +0 -360
  155. package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +0 -10488
  156. package/templates/frontend/easy/js/_easy/lib/axios.min.js +0 -9
  157. package/templates/frontend/easy/js/_easy/lib/marked.min.js +0 -6
  158. package/templates/frontend/easy/js/_easy/lib/vue.js +0 -11912
  159. package/templates/frontend/easy/js/_easy/lib/vue.min.js +0 -6
  160. package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +0 -6
  161. package/templates/frontend/easy/js/customizations2.__MERGE__.js +0 -22
  162. package/templates/frontend/easy/webapp/.browserslistrc +0 -2
  163. package/templates/frontend/easy/webapp/.eslintrc.js +0 -17
  164. package/templates/frontend/easy/webapp/README.md +0 -60
  165. package/templates/frontend/easy/webapp/babel.config.js +0 -5
  166. package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +0 -1
  167. package/templates/frontend/easy/webapp/dist/dashboard.html +0 -13
  168. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +0 -2
  169. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +0 -1
  170. package/templates/frontend/easy/webapp/package-lock.json +0 -32986
  171. package/templates/frontend/easy/webapp/package.json +0 -32
  172. package/templates/frontend/easy/webapp/postcss.config.js +0 -5
  173. package/templates/frontend/easy/webapp/public/dashboard.html +0 -13
  174. package/templates/frontend/easy/webapp/src/App.vue +0 -181
  175. package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
  176. package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +0 -59
  177. package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +0 -163
  178. package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +0 -225
  179. package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +0 -95
  180. package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +0 -59
  181. package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +0 -60
  182. package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +0 -73
  183. package/templates/frontend/easy/webapp/src/main.js +0 -19
  184. package/templates/frontend/easy/webapp/src/perm-templates.js +0 -189
  185. package/templates/frontend/easy/webapp/src/perms.js +0 -197
  186. package/templates/frontend/easy/webapp/vue.config.js +0 -66
  187. package/templates/frontend/formatList/currency/css/_format_currency.css +0 -11
  188. package/templates/frontend/formatList/currency/css/customizations.__MERGE__.css +0 -1
  189. package/templates/frontend/formatList/currency/js/cob/_format_currency.js +0 -11
  190. package/templates/frontend/formatList/currency/js/customizations2.__MERGE__.js +0 -1
  191. package/templates/frontend/formatList/currency/package.json +0 -3
  192. package/templates/gitignore +0 -14
  193. package/templates/keywords/audit/backend/scripts/_audit.groovy +0 -78
  194. package/templates/keywords/audit/frontend/js/cob/_audit.js +0 -24
  195. package/templates/keywords/audit/frontend/js/customizations2.__MERGE__.js +0 -1
  196. package/templates/keywords/audit/package.json +0 -3
  197. package/templates/keywords/calc/backend/scripts/_calc.groovy +0 -151
  198. package/templates/keywords/calc/frontend/js/cob/_calc.js +0 -193
  199. package/templates/keywords/calc/frontend/js/customizations2.__MERGE__.js +0 -1
  200. package/templates/keywords/calc/package.json +0 -3
  201. package/templates/keywords/image/frontend/js/cob/_image.js +0 -30
  202. package/templates/keywords/image/frontend/js/customizations2.__MERGE__.js +0 -1
  203. package/templates/keywords/image/package.json +0 -3
  204. package/templates/keywords/kibana/frontend/js/cob/_kibana.js +0 -58
  205. package/templates/keywords/kibana/frontend/js/customizations2.__MERGE__.js +0 -1
  206. package/templates/keywords/kibana/package.json +0 -3
  207. package/templates/keywords/log/backend/scripts/_log.groovy +0 -95
  208. package/templates/keywords/log/frontend/css/_log.css +0 -5
  209. package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +0 -1
  210. package/templates/keywords/log/package.json +0 -3
  211. package/templates/keywords/styleResults/frontend/css/_styleResults.css +0 -86
  212. package/templates/keywords/styleResults/frontend/css/customizations.__MERGE__.css +0 -1
  213. package/templates/keywords/styleResults/frontend/js/cob/_styleResults.js +0 -38
  214. package/templates/keywords/styleResults/frontend/js/customizations2.__MERGE__.js +0 -1
  215. package/templates/keywords/styleResults/package.json +0 -3
@@ -1,52 +0,0 @@
1
- function langIndex(lang) {
2
- switch (lang) {
3
- case "en": return 0
4
- case "pt": return 1
5
- case "es": return 2
6
- }
7
- }
8
-
9
- const translations = {
10
- // 'Explanations': [,"Explicações","Explicaciones"],
11
- // "Tutorials": [,"Tutoriais", "Tutoriales"],
12
- // "Howtos": [,"Guias", "Guías"],
13
- // 'References': [,"Referências","Referencias"],
14
- // "Showcases": [,"Mostruário","Escaparate"],
15
- // "Examples": [,"Exemplos", "Ejemplos"],
16
- // 'Updates': [,"Actualizações","Actualizaciones"],
17
- 'Users': [,"Utilizadores","Usuários"],
18
- 'Admins': [,"Administradores","Administradores"],
19
- 'Developers': [,"Programadores","Desarrolladores"],
20
- 'Solutions': [,"Soluções","Soluciones"],
21
-
22
- 'Login': [,"Login","Acceso"],
23
- 'Backend': [,"Back-end","Back-end"]
24
- }
25
-
26
- function translate(name,lang) {
27
- let i = langIndex(lang)
28
- if(i) {
29
- return translations[name][i]
30
- } else {
31
- return name
32
- }
33
- }
34
-
35
- module.exports = function getNavTranslated(lang) {
36
- let prefix = ["","/pt","/es"][langIndex(lang)]
37
- return [
38
- { text: translate('Users',lang), link: prefix + '/site/users/' },
39
- { text: translate('Admins',lang), link: prefix + '/site/managers/' },
40
- { text: translate('Developers',lang), link: prefix + '/site/developers/' },
41
- { text: translate('Solutions',lang), link: prefix + '/site/solutions/' },
42
- { text: translate('Login',lang),
43
- link: '/recordm/index.html#/cob.custom-resource/redirect/go-to-docs.html',
44
- target: "_self",
45
- ifLoggedIn: false
46
- },
47
- { text: translate('Backend',lang),
48
- link: '/recordm/#/domain/2',
49
- ifLoggedIn: true
50
- }
51
- ]
52
- }
@@ -1,96 +0,0 @@
1
- const axios = require('axios')
2
- const CONF = require('../config.json')
3
-
4
- async function replaceQueries(yamlReferences,preferedLangPostfix) {
5
- let References = [];
6
-
7
- for( yamlCard of yamlReferences ) {
8
- //TODO: add try/catch and allow diferent positions/omition on spec of intro+items
9
- let cardTitle = Object.keys(yamlCard)[0]; // Assumption: $frontmatter.References is an arrays of cards where the KEY is the TITLE of the card
10
- let cardContent = Object.values(yamlCard)[0];
11
-
12
- let cardKeys = cardContent.map( i => Object.keys(i)[0])
13
- let introIndex = cardKeys.indexOf('intro')
14
- let cardIntro = introIndex >= 0 ? cardContent[introIndex].intro : [];
15
- let itemsIndex = cardKeys.indexOf('items')
16
- let cardItems = itemsIndex >= 0 ? cardContent[itemsIndex].items : [];
17
- let numberingIndex = cardKeys.indexOf('numbering')
18
- let cardNumbering = numberingIndex >= 0 ? cardContent[numberingIndex].numbering : false;
19
-
20
- let cardQueries = [];
21
- let card = {
22
- title: cardTitle,
23
- numbering: cardNumbering,
24
- intro: cardIntro.reduce((obj, introItem) => Object.assign(obj, { [Object.keys(introItem)[0]]: Object.values(introItem)[0] }), {}), // convert array of only one itm with object into object with the key:value for each object
25
- items: cardItems.map(async (yamlItem) => {
26
- // each item is a object with key = title and value = path
27
- let title = Object.keys(yamlItem)[0];
28
- let path = Object.values(yamlItem)[0]
29
- if(title !== "query") {
30
- return { title: title, path: path }
31
- } else {
32
- // if key == 'query' then we get the specified content (specified in 'path')
33
- //Get all public children for this 'id' (since restricted content will not be visible to anonymous user)
34
- let definitions = await axios.get('https://' + CONF.server + '/recordm/recordm/definitions')
35
- let answer = await axios.get('https://' + CONF.server + '/recordm/recordm/definitions/search/' + CONF.contentDefinition + '?q=' + path ,{params: {sort:"sortablefield"}})
36
-
37
- let items = []
38
- for(let content of answer.data.hits.hits.reverse()) {
39
- let item = {}
40
- for(let langPostfix of [preferedLangPostfix,"","-pt","-es"] ) {
41
- if(item.title) continue; //Stop trying as soon as it has a 'title'
42
- try {
43
- item.id = content._id;
44
- item.title = content._source["name" + langPostfix][0]
45
- item.path = content._source["path"][0]
46
- item.type = content._source["type"][0]
47
- item.target = content._source["target"][0]
48
- item.format = content._source["format"][0]
49
- } catch {}
50
- }
51
- items.push(item)
52
- }
53
- cardQueries.push({
54
- // query: !items.length ? path : path + " AND -id:(" + items.map(i => i.id).join(" OR ") + ")"
55
- query: path
56
- })
57
- return items
58
- }
59
- })
60
- }
61
- card.queries = cardQueries
62
- card.items = (await Promise.all(card.items)).flat()
63
- // card.items = card.items.flat() // to remove arrays with query responses
64
- References.push(card)
65
- };
66
-
67
- return References
68
- }
69
-
70
- module.exports = (options = {}) => ({
71
- async extendPageData ($page) {
72
- const {
73
- path,
74
- frontmatter,
75
- _strippedContent
76
- } = $page
77
-
78
- if (_strippedContent && _strippedContent.indexOf("<References") != -1){
79
- let langPostfix = path.indexOf("/pt/") == 0 ? "-pt" : path.indexOf("/es/") == 0 ? "-es" : ""
80
- let indexCardRegex = /(<References[^>]*>)+/g
81
- for(indexCard of _strippedContent.match(indexCardRegex)) {
82
- let listArgRegex = /list="([^"]+)"/g
83
- let match = listArgRegex.exec(indexCard)
84
- let listArg = (match && match[1]) ? match[1] : "References" // default listArg is var 'References' of frontmatter
85
- try {
86
- $page[listArg] = await replaceQueries(frontmatter[listArg], langPostfix)
87
- }
88
- catch(e) {
89
- console.error(">>" + indexCard + ">>>" + e)
90
- debugger;
91
- }
92
- }
93
- }
94
- return $page
95
- }
96
- })
@@ -1,39 +0,0 @@
1
- /**
2
- * Custom Styles here.
3
- *
4
- * ref:https://v1.vuepress.vuejs.org/config/#index-styl
5
- */
6
-
7
- body
8
- font-family: "Source Sans Pro", "Helvetica Neue", "Arial", "sans-serif";
9
- font-size 1.2em
10
- padding-bottom: 2em;
11
-
12
- .sidebar-heading,
13
- .active sidebar-link
14
- font-size 1.2em
15
-
16
- h1
17
- color #3a87ad
18
-
19
- .home .hero img
20
- max-width 450px!important
21
-
22
- .site-name.can-hide
23
- display: none
24
-
25
- span.title,
26
- .navbar span,
27
- .nav-link
28
- font-size 1.2em
29
- font-weight 600
30
-
31
- .theme-container.custom-page-class {
32
- background: black;
33
- .theme-default-content {
34
- color: white
35
- }
36
- img {
37
- align: "center"
38
- }
39
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Custom palette here.
3
- *
4
- * ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl
5
- */
6
-
7
- // colors
8
- $accentColor = #e20042
9
- $textColor = #2c3e50
10
- $borderColor = #eaecef
11
- $codeBgColor = #282c34
12
- $arrowBgColor = #ccc
13
- $badgeTipColor = #282c34
14
- $badgeWarningColor = darken(#ffe564, 35%)
15
- $badgeErrorColor = #DA5961
16
-
17
- $contentWidth = 50em
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018-present, Yuxi (Evan) You
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,11 +0,0 @@
1
- # @vuepress/theme-default
2
-
3
- > theme-default for VuePress
4
-
5
- ## Plugins
6
-
7
- The default theme has the following plugin built in:
8
-
9
- - [@vuepress/plugin-active-header-links](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-active-header-links)
10
- - [@vuepress/plugin-google-analytics](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-google-analytics)
11
- - [@vuepress/plugin-search](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-search)
@@ -1,172 +0,0 @@
1
- <template>
2
- <form
3
- id="search-form"
4
- class="algolia-search-wrapper search-box"
5
- role="search"
6
- >
7
- <input
8
- id="algolia-search-input"
9
- class="search-query"
10
- :placeholder="placeholder"
11
- >
12
- </form>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: 'AlgoliaSearchBox',
18
-
19
- props: ['options'],
20
-
21
- data () {
22
- return {
23
- placeholder: undefined
24
- }
25
- },
26
-
27
- watch: {
28
- $lang (newValue) {
29
- this.update(this.options, newValue)
30
- },
31
-
32
- options (newValue) {
33
- this.update(newValue, this.$lang)
34
- }
35
- },
36
-
37
- mounted () {
38
- this.initialize(this.options, this.$lang)
39
- this.placeholder = this.$site.themeConfig.searchPlaceholder || ''
40
- },
41
-
42
- methods: {
43
- initialize (userOptions, lang) {
44
- Promise.all([
45
- import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.js'),
46
- import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.css')
47
- ]).then(([docsearch]) => {
48
- docsearch = docsearch.default
49
- const { algoliaOptions = {}} = userOptions
50
- docsearch(Object.assign(
51
- {},
52
- userOptions,
53
- {
54
- inputSelector: '#algolia-search-input',
55
- // #697 Make docsearch work well at i18n mode.
56
- algoliaOptions: {
57
- ...algoliaOptions,
58
- facetFilters: [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
59
- },
60
- handleSelected: (input, event, suggestion) => {
61
- const { pathname, hash } = new URL(suggestion.url)
62
- const routepath = pathname.replace(this.$site.base, '/')
63
- const _hash = decodeURIComponent(hash)
64
- this.$router.push(`${routepath}${_hash}`)
65
- }
66
- }
67
- ))
68
- })
69
- },
70
-
71
- update (options, lang) {
72
- this.$el.innerHTML = '<input id="algolia-search-input" class="search-query">'
73
- this.initialize(options, lang)
74
- }
75
- }
76
- }
77
- </script>
78
-
79
- <style lang="stylus">
80
- .algolia-search-wrapper
81
- & > span
82
- vertical-align middle
83
- .algolia-autocomplete
84
- line-height normal
85
- .ds-dropdown-menu
86
- background-color #fff
87
- border 1px solid #999
88
- border-radius 4px
89
- font-size 16px
90
- margin 6px 0 0
91
- padding 4px
92
- text-align left
93
- &:before
94
- border-color #999
95
- [class*=ds-dataset-]
96
- border none
97
- padding 0
98
- .ds-suggestions
99
- margin-top 0
100
- .ds-suggestion
101
- border-bottom 1px solid $borderColor
102
- .algolia-docsearch-suggestion--highlight
103
- color #2c815b
104
- .algolia-docsearch-suggestion
105
- border-color $borderColor
106
- padding 0
107
- .algolia-docsearch-suggestion--category-header
108
- padding 5px 10px
109
- margin-top 0
110
- background $accentColor
111
- color #fff
112
- font-weight 600
113
- .algolia-docsearch-suggestion--highlight
114
- background rgba(255, 255, 255, 0.6)
115
- .algolia-docsearch-suggestion--wrapper
116
- padding 0
117
- .algolia-docsearch-suggestion--title
118
- font-weight 600
119
- margin-bottom 0
120
- color $textColor
121
- .algolia-docsearch-suggestion--subcategory-column
122
- vertical-align top
123
- padding 5px 7px 5px 5px
124
- border-color $borderColor
125
- background #f1f3f5
126
- &:after
127
- display none
128
- .algolia-docsearch-suggestion--subcategory-column-text
129
- color #555
130
- .algolia-docsearch-footer
131
- border-color $borderColor
132
- .ds-cursor .algolia-docsearch-suggestion--content
133
- background-color #e7edf3 !important
134
- color $textColor
135
-
136
- @media (min-width: $MQMobile)
137
- .algolia-search-wrapper
138
- .algolia-autocomplete
139
- .algolia-docsearch-suggestion
140
- .algolia-docsearch-suggestion--subcategory-column
141
- float none
142
- width 150px
143
- min-width 150px
144
- display table-cell
145
- .algolia-docsearch-suggestion--content
146
- float none
147
- display table-cell
148
- width 100%
149
- vertical-align top
150
- .ds-dropdown-menu
151
- min-width 515px !important
152
-
153
- @media (max-width: $MQMobile)
154
- .algolia-search-wrapper
155
- .ds-dropdown-menu
156
- min-width calc(100vw - 4rem) !important
157
- max-width calc(100vw - 4rem) !important
158
- .algolia-docsearch-suggestion--wrapper
159
- padding 5px 7px 5px 5px !important
160
- .algolia-docsearch-suggestion--subcategory-column
161
- padding 0 !important
162
- background white !important
163
- .algolia-docsearch-suggestion--subcategory-column-text:after
164
- content " > "
165
- font-size 10px
166
- line-height 14.4px
167
- display inline-block
168
- width 5px
169
- margin -3px 3px 0
170
- vertical-align middle
171
-
172
- </style>
@@ -1,252 +0,0 @@
1
- <template>
2
- <div
3
- class="dropdown-wrapper"
4
- :class="{ open }"
5
- >
6
- <button
7
- class="dropdown-title"
8
- type="button"
9
- :aria-label="dropdownAriaLabel"
10
- @click="handleDropdown"
11
- >
12
- <span class="title">{{ item.text }}</span>
13
- <span
14
- class="arrow down"
15
- />
16
- </button>
17
- <button
18
- class="mobile-dropdown-title"
19
- type="button"
20
- :aria-label="dropdownAriaLabel"
21
- @click="setOpen(!open)"
22
- >
23
- <span class="title">{{ item.text }}</span>
24
- <span
25
- class="arrow"
26
- :class="open ? 'down' : 'right'"
27
- />
28
- </button>
29
-
30
- <DropdownTransition>
31
- <ul
32
- v-show="open"
33
- class="nav-dropdown"
34
- >
35
- <li
36
- v-for="(subItem, index) in item.items"
37
- :key="subItem.link || index"
38
- class="dropdown-item"
39
- >
40
- <h4 v-if="subItem.type === 'links'">
41
- {{ subItem.text }}
42
- </h4>
43
-
44
- <ul
45
- v-if="subItem.type === 'links'"
46
- class="dropdown-subitem-wrapper"
47
- >
48
- <li
49
- v-for="childSubItem in subItem.items"
50
- :key="childSubItem.link"
51
- class="dropdown-subitem"
52
- >
53
- <NavLink
54
- :item="childSubItem"
55
- @focusout="
56
- isLastItemOfArray(childSubItem, subItem.items) &&
57
- isLastItemOfArray(subItem, item.items) &&
58
- setOpen(false)
59
- "
60
- />
61
- </li>
62
- </ul>
63
-
64
- <NavLink
65
- v-else
66
- :item="subItem"
67
- @focusout="isLastItemOfArray(subItem, item.items) && setOpen(false)"
68
- />
69
- </li>
70
- </ul>
71
- </DropdownTransition>
72
- </div>
73
- </template>
74
-
75
- <script>
76
- import NavLink from '@theme/components/NavLink.vue'
77
- import DropdownTransition from '@theme/components/DropdownTransition.vue'
78
- import last from 'lodash/last'
79
-
80
- export default {
81
- name: 'DropdownLink',
82
-
83
- components: {
84
- NavLink,
85
- DropdownTransition
86
- },
87
-
88
- props: {
89
- item: {
90
- required: true
91
- }
92
- },
93
-
94
- data () {
95
- return {
96
- open: false
97
- }
98
- },
99
-
100
- computed: {
101
- dropdownAriaLabel () {
102
- return this.item.ariaLabel || this.item.text
103
- }
104
- },
105
-
106
- watch: {
107
- $route () {
108
- this.open = false
109
- }
110
- },
111
-
112
- methods: {
113
- setOpen (value) {
114
- this.open = value
115
- },
116
-
117
- isLastItemOfArray (item, array) {
118
- return last(array) === item
119
- },
120
-
121
- /**
122
- * Open the dropdown when user tab and click from keyboard.
123
- *
124
- * Use event.detail to detect tab and click from keyboard. Ref: https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
125
- * The Tab + Click is UIEvent > KeyboardEvent, so the detail is 0.
126
- */
127
- handleDropdown () {
128
- const isTriggerByTab = event.detail === 0
129
- if (isTriggerByTab) this.setOpen(!this.open)
130
- }
131
- }
132
- }
133
- </script>
134
-
135
- <style lang="stylus">
136
- .dropdown-wrapper
137
- cursor pointer
138
- .dropdown-title
139
- display block
140
- font-size 0.9rem
141
- font-family inherit
142
- cursor inherit
143
- padding inherit
144
- line-height 1.4rem
145
- background transparent
146
- border none
147
- font-weight 500
148
- color $textColor
149
- &:hover
150
- border-color transparent
151
- .arrow
152
- vertical-align middle
153
- margin-top -1px
154
- margin-left 0.4rem
155
- .mobile-dropdown-title
156
- @extends .dropdown-title
157
- display none
158
- font-weight 600
159
- font-size inherit
160
- &:hover
161
- color $accentColor
162
- .nav-dropdown
163
- .dropdown-item
164
- color inherit
165
- line-height 1.7rem
166
- h4
167
- margin 0.45rem 0 0
168
- border-top 1px solid #eee
169
- padding 1rem 1.5rem 0.45rem 1.25rem
170
- .dropdown-subitem-wrapper
171
- padding 0
172
- list-style none
173
- .dropdown-subitem
174
- font-size 0.9em
175
- a
176
- display block
177
- line-height 1.7rem
178
- position relative
179
- border-bottom none
180
- font-weight 400
181
- margin-bottom 0
182
- padding 0 1.5rem 0 1.25rem
183
- &:hover
184
- color $accentColor
185
- &.router-link-active
186
- color $accentColor
187
- &::after
188
- content ""
189
- width 0
190
- height 0
191
- border-left 5px solid $accentColor
192
- border-top 3px solid transparent
193
- border-bottom 3px solid transparent
194
- position absolute
195
- top calc(50% - 2px)
196
- left 9px
197
- &:first-child h4
198
- margin-top 0
199
- padding-top 0
200
- border-top 0
201
-
202
- @media (max-width: $MQMobile)
203
- .dropdown-wrapper
204
- &.open .dropdown-title
205
- margin-bottom 0.5rem
206
- .dropdown-title
207
- display: none
208
- .mobile-dropdown-title
209
- display: block
210
- .nav-dropdown
211
- transition height .1s ease-out
212
- overflow hidden
213
- .dropdown-item
214
- h4
215
- border-top 0
216
- margin-top 0
217
- padding-top 0
218
- h4, & > a
219
- font-size 15px
220
- line-height 2rem
221
- .dropdown-subitem
222
- font-size 14px
223
- padding-left 1rem
224
-
225
- @media (min-width: $MQMobile)
226
- .dropdown-wrapper
227
- height 1.8rem
228
- &:hover .nav-dropdown,
229
- &.open .nav-dropdown
230
- // override the inline style.
231
- display block !important
232
- &.open:blur
233
- display none
234
- .nav-dropdown
235
- display none
236
- // Avoid height shaked by clicking
237
- height auto !important
238
- box-sizing border-box;
239
- max-height calc(100vh - 2.7rem)
240
- overflow-y auto
241
- position absolute
242
- top 100%
243
- right 0
244
- background-color #fff
245
- padding 0.6rem 0
246
- border 1px solid #ddd
247
- border-bottom-color #ccc
248
- text-align left
249
- border-radius 0.25rem
250
- white-space nowrap
251
- margin 0
252
- </style>