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,24 +0,0 @@
1
- {
2
- "name": "docs",
3
- "version": "0.0.1",
4
- "main": "index.js",
5
- "scripts": {
6
- "dev": "vuepress dev src",
7
- "build": "vuepress build src"
8
- },
9
- "license": "MIT",
10
- "devDependencies": {
11
- "@vuepress/plugin-back-to-top": "^1.8.2",
12
- "@vuepress/plugin-medium-zoom": "^1.8.2",
13
- "vuepress": "^1.8.2",
14
- "vuepress-plugin-reading-time": "^0.1.1"
15
- },
16
- "dependencies": {
17
- "@cob/rest-api-wrapper": "^2.1.6",
18
- "axios": "^0.21.4",
19
- "markdown-it-prism": "^2.2.3",
20
- "tinycolor2": "^1.4.2",
21
- "vue-mermaid-string": "^2.2.6",
22
- "vuepress-bar": "^0.4.2"
23
- }
24
- }
@@ -1,22 +0,0 @@
1
- <template>
2
- <div style="text-align:center;">
3
- <iframe
4
- :src="'https://share.descript.com/embed/' + id"
5
- width="100%"
6
- height="360"
7
- frameborder="0"
8
- allowfullscreen
9
- style="max-width:640px"
10
- ></iframe>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- export default {
16
- props: {
17
- id: String,
18
- },
19
- };
20
- </script>
21
-
22
- <style></style>
@@ -1,124 +0,0 @@
1
- <template>
2
- <div id="cob-graph">
3
- <vue-mermaid-string v-if="ready" :value="diagram" />
4
- <div v-else>
5
- Loading ...
6
- </div>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- import VueMermaidString from "vue-mermaid-string";
12
- import tinycolor from "tinycolor2";
13
- import axios from 'axios'
14
-
15
- // https://www.paletton.com/#uid=73+1p0k2O++00++00++7n++be+Z
16
- let colorDefs = [
17
- { color: "#FFF" },
18
- { color: "#FFE9F0", darkenStroke: 20, saturateStroke: 0 },
19
- { color: "#F3FFE9", darkenStroke: 60, saturateStroke: -5 },
20
- { color: "#FFF9E9" },
21
- { color: "#D0FFA6", darkenStroke: 60, saturateStroke: -5 },
22
- { color: "#FF66E9", font: "#FFF" },
23
- { color: "#FF3399", font: "#FFF" },
24
- ];
25
- //Default variations:
26
- colorDefs = colorDefs.map((colorDef) => ({
27
- darkenStroke: 50,
28
- saturateStroke: 10,
29
- font: "#333",
30
- ...colorDef,
31
- }));
32
-
33
- const typeSequence = ["Tutorial","Howto","Reference","Explanation","Solution","SiteItem"]
34
-
35
- const style = (node, colorIndex) => {
36
- const colorDef = colorDefs[colorIndex];
37
- const fill = colorDef.color;
38
- const font = colorDef.font;
39
- const stroke = tinycolor(colorDef.color)
40
- .darken(colorDef.darkenStroke)
41
- .saturate(colorDef.saturateStroke)
42
- .toString();
43
- return `style ${node} color:${font}, fill:${fill}, stroke:${stroke}`;
44
- };
45
-
46
- export default {
47
- components: {
48
- VueMermaidString,
49
- },
50
-
51
- data () {
52
- return {
53
- nodes: [],
54
- ready: false
55
- }
56
- },
57
- created() {
58
- let lang = this.$localePath.match(/^\/([^\/]*)(\/)?$/)[1]
59
- let preferredLangPostfix = lang ? "-"+lang : ""
60
- axios.get('/recordm/recordm/definitions/search/66?q=-chapter -.wip.*',{params: {sort:"sortablefield", size: 310}})
61
- .then( answer => {
62
- for(let content of answer.data.hits.hits.reverse()) {
63
- for(let langPostfix of [preferredLangPostfix,"","-pt","-es"] ) {
64
- try {
65
- let path = this.$site.base + this.$localePath.substring(1) + content._source["path"][0].substring(1)
66
- let id = content._id
67
- let title
68
- let type = content._source["type"] ? content._source["type"][0] : ""
69
- if( !content._source["type"] || content._source["siteitemtype"] && content._source["siteitemtype"][0] == "directory") {
70
- title = content._source["descriptor"][0]
71
- type="dir"
72
- } else {
73
- title = content._source["name" + langPostfix][0] // Fails if it doesn't have this lang content (and will try another)
74
- }
75
- let styleIndex = typeSequence.indexOf(type)
76
-
77
- this.nodes.push( id + "[\"" + title + "\"]" )
78
- this.nodes.push( style(id,styleIndex+1) ) //If styleIndex is -1 => 0, 0 => 1, etc, etc
79
- if(type == "dir") {
80
- this.nodes.push( 'click ' + id + ' href "/recordm/#/instance/' + id + '" "' + title + '"' )
81
- } else {
82
- this.nodes.push( 'click ' + id + ' href "' + path + '" "' + title + '"' )
83
- }
84
- if(content._source["parent"]) {
85
- this.nodes.push( content._source["parent"][0] + "-->" + id )
86
- }
87
- break;
88
- } catch {}
89
- }
90
- }
91
- this.ready = true
92
- })
93
- },
94
- computed: {
95
- diagram: function() {
96
- let result = []
97
- result.push("flowchart LR ")
98
- result.push("subgraph Contents")
99
- result.push("direction LR")
100
- result.push("style Contents fill:#FFF, stroke:#ccc")
101
- result.push(...this.nodes)
102
- result.push("end")
103
- result.push("subgraph Legends")
104
- result.push("direction TB")
105
- result.push("style Legends fill:#FFF, stroke:#ccc")
106
- for( let typeIndex in typeSequence ) {
107
- result.push(typeSequence[typeIndex]+"s")
108
- result.push( style(typeSequence[typeIndex]+"s",+typeIndex+1) )
109
- }
110
- result.push("end")
111
- return result.join("\n")
112
- }
113
- }
114
- };
115
- </script>
116
-
117
- <style>
118
- #cob-graph {
119
- text-align: center;
120
- }
121
- #cob-graph svg {
122
- height:100%
123
- }
124
- </style>
@@ -1,26 +0,0 @@
1
- <template>
2
- <div class="read-time">
3
- <p>
4
- <strong>Reading time:</strong> {{ readingTime }} minute{{readingTime > 1 ? 's': ''}}<br />
5
- </p>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- export default {
11
- name: 'ReadingTime',
12
- computed: {
13
- // Full object list: //github.com/darrenjennings/vuepress-plugin-reading-time#usage
14
- readingTime() {
15
- let minutes = this.$page.readingTime.minutes
16
-
17
- if (minutes < 1) {
18
- minutes = 1
19
- } else {
20
- minutes = (minutes - Math.floor(minutes) < .5) ? Math.floor(minutes) : Math.ceil(minutes)
21
- }
22
- return minutes
23
- },
24
- }
25
- }
26
- </script>
@@ -1,228 +0,0 @@
1
- <template>
2
- <div class="outside-container">
3
- <div class="inside-container">
4
- <template v-for="(card, i) of cards">
5
- <div v-if="card.items.length" class="card-wraper" :key="card.title">
6
- <h3>
7
- <span v-if="$attrs.mainNumber">
8
- {{ i + 1 }}.
9
- </span>
10
- {{ card.title }}
11
- </h3>
12
- <div v-if="Object.keys(card.intro).length" class="meta">
13
- <div v-for="(value, name) in card.intro" :key="name">
14
- <strong>{{ name }}:</strong>
15
- <wbr>
16
- <span> {{ value }} </span>
17
- </div>
18
- </div>
19
- <div class="flexible"></div>
20
- <div v-for="(item, i) in card.items" :key="item.title" class="item" :class="{multiple:i!=0}">
21
- <!-- TODO: adicionar marcas de lido, marca de conteúdo em construção, marca de certificado, tempo de leitura -->
22
- <!-- TODO: links para edição -->
23
- <span v-if="item.isRestricted" class="icon">🔓</span>
24
- <span v-if="card.numbering" class="numbering">
25
- {{ i + 1 }}.
26
- </span>
27
- <span v-else class="no-numbering"/>
28
- <a :href="item.path">
29
- {{ item.title }}
30
- </a>
31
- </div>
32
- </div>
33
- </template>
34
- </div>
35
- </div>
36
- </template>
37
-
38
- <script>
39
- import axios from 'axios'
40
-
41
- export default {
42
- name: "References",
43
-
44
- data: () => ({
45
- cards: []
46
- }),
47
-
48
- created() {
49
- let listProp = this.$attrs.list ? this.$attrs.list : "References";
50
- this.cards = this.$page[listProp];
51
- },
52
-
53
- beforeMount() {
54
- let lang = this.$localePath.match(/^\/([^\/]*)(\/)?$/)[1]
55
- let preferredLangPostfix = lang ? "-"+lang : ""
56
-
57
- this.cards.forEach( card => {
58
- if(card.queries.length) {
59
- let initialItems = card.items
60
- this.$set(card, 'items', [])
61
- this.cardsLoaded = true
62
- card.queries.forEach( queryItem => {
63
- axios.get('/recordm/recordm/definitions/search/7?q=' + queryItem.query ,{params: {sort:"sortablefield"}})
64
- .then( answer => {
65
- for(let content of answer.data.hits.hits.reverse()) {
66
- for(let langPostfix of [preferredLangPostfix,"","-pt","-es"] ) {
67
- try {
68
- let title = content._source["name" + langPostfix][0] // Fails if it doesn't have this lang content (and will try another)
69
- let id = content._id
70
- let path = this.$site.base + this.$localePath.substring(1) + content._source["path"][0].substring(1)
71
- let type = content._source["type"][0]
72
- let target = content._source["target"] ? content._source["target"][0] : ""
73
- let format = content._source["format"] ? content._source["format"][0] : ""
74
- let isRestricted = initialItems.filter(i => i.id == id).length == 0;
75
- card.items.push( { id: id, title: title, path: path, type: type, target: target, format: format, isRestricted: isRestricted} )
76
- break;
77
- } catch {}
78
- }
79
- }
80
- })
81
- })
82
- card.queries = [] // clean queries to prevent getting them multiple times (with page back and forth)
83
- }
84
- })
85
- }
86
- };
87
- </script>
88
-
89
- <style lang="stylus">
90
- .inside-container
91
- display: flex;
92
- flex-wrap: wrap;
93
- align-content: stretch;
94
- align-items: stretch;
95
- justify-content: start;
96
- gap: 20px;
97
- @media (max-width: 768px)
98
- flex-direction column
99
- .card-wraper
100
- flex-grow: 1;
101
- flex-basis: 10%;
102
- min-width: 300px;
103
- border: solid 1px lighten($accentColor,45);
104
- border-radius: 7px;
105
- padding: 20px;
106
- @media (max-width: 768px)
107
- background-color: lighten($accentColor,55);
108
- max-width 100%
109
- h3
110
- margin-block-start: 0;
111
- margin-bottom: 0px;
112
- font-size: 1.35em;
113
- .meta
114
- padding: 4px;
115
- margin-top:5px
116
- margin-bottom:5px
117
- background-color: #fffaf0;
118
- border: solid 0.9px #ddd;
119
- border-radius: 7px;
120
- div
121
- font-size: 14px;
122
- .item
123
- display: flex
124
- align-items: flex-end
125
- .numbering
126
- font-size: 15px
127
- align-self: center
128
- min-width:19px
129
- text-align: right
130
- padding-right: 2px
131
- font-weight: 600;
132
- .no-numbering
133
- min-width: 4px
134
- a
135
- flex-grow: 1
136
- span.icon
137
- order: 1
138
- font-size: 13px
139
- min-width: 13px
140
- align-self: center
141
-
142
- .buttonCards
143
- .inside-container
144
- text-align: center
145
- font-size: 1.2em
146
- justify-content: space-around;
147
- gap: 32px;
148
- margin-left: auto
149
- margin-right: auto
150
- flex-direction inherit
151
- .card-wraper
152
- display: flex;
153
- flex-flow: column-reverse;
154
- border:none
155
- max-width: 255px;
156
- min-width: 255px;
157
- background-color: none
158
- @media (max-width: 1018px)
159
- max-width: 355px;
160
- h3
161
- display:none
162
- .flexible
163
- flex-grow: 1;
164
- .meta
165
- div
166
- strong
167
- font-weight: normal
168
- color: #888
169
- span
170
- font-size: 17px
171
- font-weight: 600
172
- color: #666
173
- &:before
174
- content: "\a";
175
- white-space: pre;
176
- a
177
- a:hover
178
- background-color: $accentColor;
179
- color: #fff;
180
- font-weight: bold;
181
- margin: 10px auto;
182
- border-radius: 8px;
183
- padding: 5px;
184
- a:hover
185
- background-color: lighten($accentColor,5);
186
- transition-duration: .2s;
187
-
188
- .justContent
189
- .inside-container
190
- .card-wraper
191
- border:none
192
- background-color: none
193
- h3
194
- display:none
195
- .flexible
196
- flex-grow: 1;
197
- .meta
198
- display:none
199
- .item
200
- margin-top: 10px
201
- .icon
202
- display:none
203
-
204
- .inlineContent
205
- display: inline
206
- margin-right: 3px;
207
- .inside-container
208
- display: inline
209
- .card-wraper
210
- border:none
211
- background-color: none
212
- display: inline
213
- padding: 0
214
- h3
215
- display:none
216
- .flexible
217
- display: none
218
- .meta
219
- display:none
220
- .item
221
- display: inline
222
- margin-right: -3px;
223
- .item.multiple
224
- span::after
225
- content: ", "
226
- .icon
227
- display:none
228
- </style>
@@ -1,77 +0,0 @@
1
- <template>
2
- <clientOnly>
3
- <div>
4
- <div v-if="loading">
5
- Loading ...
6
- </div>
7
- <div v-else>
8
- <div v-if="hasAccess" v-html="renderedMarkdown"></div>
9
-
10
- <div v-else class="warning custom-block">
11
- <p class="custom-block-title">WARNING</p>
12
- <p>Restricted Content</p>
13
- </div>
14
- </div>
15
- </div>
16
- </clientOnly>
17
- </template>
18
-
19
- <script>
20
- import axios from 'axios'
21
- import markdownIt from 'markdown-it';
22
- import emojiPlugin from 'markdown-it-emoji';
23
- import prism from 'markdown-it-prism';
24
-
25
- import "prismjs/components/prism-java"
26
- import "prismjs/components/prism-sql"
27
- import "prismjs/components/prism-groovy"
28
- import "prismjs/components/prism-jsx"
29
- import "prismjs/components/prism-json"
30
- import "prismjs/components/prism-bash"
31
- import "prismjs/components/prism-nix"
32
- import "prismjs/components/prism-nginx"
33
-
34
- export default {
35
- name: 'ConditionalContent',
36
- data: () => ({
37
- renderedMarkdown: "",
38
- hasAccess: false,
39
- loading: true,
40
- }),
41
- mounted() {
42
- let lang = this.$localePath.match(/^\/([^\/]*)(\/)?$/)[1]
43
- let preferredLangPostfix = lang ? "-"+lang : ""
44
-
45
- axios.get('/recordm/recordm/definitions/search/7?q=id:' + this.$page.frontmatter.id ,{})
46
- .then((answer) => {
47
- let md = new markdownIt({ html: true });
48
- md.use(emojiPlugin)
49
- md.use(prism)
50
- let content
51
- for(let langPostfix of [preferredLangPostfix,"","-pt","-es"] ) {
52
- try {
53
- content = answer.data.hits.hits[0]._source["content" + langPostfix][0]
54
- break;
55
- } catch {}
56
- }
57
-
58
- if(content) {
59
- this.hasAccess = true;
60
- }
61
-
62
- // if there is some frontmatter data on the content remove it before rendering it
63
- if(content && content.indexOf("---\n") == 0) {
64
- let frontmatterEval = content.split("---\n")
65
- if(frontmatterEval.length>2) {
66
- frontmatterEval.shift() // Before first ---\n (should be "")
67
- frontmatterEval.shift() // frontmattercontent
68
- content = frontmatterEval.join() //Just content
69
- }
70
- }
71
- this.renderedMarkdown = md.render(content)
72
- })
73
- .catch()
74
- .finally(() => this.loading = false)
75
- }
76
- }
77
- </script>
@@ -1,101 +0,0 @@
1
- const axios = require('axios').default
2
- const fs = require('fs');
3
- const CONF = require('./config.json')
4
-
5
-
6
- async function getSidebar(lang) {
7
- const rootElementsResponse = await axios.post('https://' + CONF.server + '/integrationm/action/getVuePressSidebarRootElements',{})
8
- const rootElements = rootElementsResponse.data
9
- let sidebar = {}
10
- let langPrefix = (lang == "en") ? "" : "/" + lang
11
- for(rootElement of rootElements) {
12
- sidebar[langPrefix + rootElement] = (await axios.post('https://' + CONF.server + '/integrationm/action/getVuePressSidebarConfig',{path:rootElement,lang:lang})).data;
13
- }
14
- return sidebar
15
- }
16
-
17
- async function getAllPages() {
18
- const content = await axios.post('https://' + CONF.server + '/integrationm/action/getVuePressDoc',{})
19
- return content.data;
20
- }
21
-
22
- async function createFilesFromServerInfo() {
23
- fs.mkdirSync("./debug/.vuepress", { recursive: true }, (err) => {
24
- if (err) throw err;
25
- });
26
-
27
- fs.writeFile('./debug/.vuepress/sidebarEN.json', JSON.stringify(await getSidebar("en")), () => {})
28
- fs.writeFile('./debug/.vuepress/sidebarPT.json', JSON.stringify(await getSidebar("pt")), () => {})
29
- fs.writeFile('./debug/.vuepress/sidebarES.json', JSON.stringify(await getSidebar("es")), () => {})
30
-
31
- const pages = await getAllPages()
32
- pages.forEach(page => {
33
- fs.mkdirSync("./debug" + page.path, { recursive: true }, (err) => {
34
- if (err) throw err;
35
- });
36
- fs.writeFile("./debug" + page.path + '/README.md', page.content, (err) => {
37
- if (err) throw err;
38
- });
39
- });
40
- }
41
-
42
- module.exports = async function() {
43
- const DEBUG = false;
44
- if(DEBUG) await createFilesFromServerInfo();
45
-
46
- return {
47
- base: "/docs/",
48
- dest: "nginx/dist",
49
- additionalPages: await getAllPages(),
50
- locales: {
51
- '/': { lang: 'en-US', title:CONF.title },
52
- '/pt/': { lang: 'pt-PT', title:CONF.titlePT },
53
- '/es/': { lang: 'es-ES', title:CONF.titleES }
54
- },
55
- themeConfig: {
56
- displayAllHeaders: false,
57
- editLinks: true,
58
- locales: {
59
- '/': {
60
- lang: 'en-US',
61
- selectText: '🇬🇧',
62
- label: 'English',
63
- selectLanguageName: 'English',
64
- nav: CONF.nav,
65
- sidebar: await getSidebar("en")
66
- },
67
- '/pt/': {
68
- lang: 'pt-PT',
69
- selectText: '🇵🇹',
70
- label: 'Português',
71
- selectLanguageName: 'Português',
72
- nav: CONF.navPT,
73
- sidebar: await getSidebar("pt")
74
- },
75
- '/es/': {
76
- lang: 'es-ES',
77
- selectText: '🇪🇸',
78
- label: 'Espanol',
79
- selectLanguageName: 'Español',
80
- nav: CONF.navES,
81
- sidebar: await getSidebar("es")
82
- }
83
- },
84
- logo: '/logo.png'
85
- },
86
- head: [
87
- ['link', { href: 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700;900&display=swap', rel: 'stylesheet' } ],
88
- ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }],
89
- ['link', { rel: 'icon', type: 'image/png', href: '/favicon.png' }],
90
- ['meta', { name: 'theme-color', content: '#d5184b' }],
91
- ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
92
- ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }]
93
- ],
94
- plugins: [
95
- require('./plugins/References.js'),
96
- 'vuepress-plugin-reading-time',
97
- '@vuepress/back-to-top',
98
- '@vuepress/medium-zoom'
99
- ]
100
- }
101
- }
@@ -1,31 +0,0 @@
1
- {
2
- "server": "learning.cultofbits.com",
3
- "contentDefinition": 66,
4
- "title": "CoB",
5
- "nav": [
6
- { "text": "Users", "link": "/site/users/" },
7
- { "text": "Admins", "link": "/site/managers/" },
8
- { "text": "Developers", "link": "/site/developers/" },
9
- { "text": "Solutions", "link": "/site/solutions/" },
10
- { "text": "Login", "link": "/recordm/index.html#/login", "ifLoggedIn": false, "target": "_self" },
11
- { "text": "Backend", "link": "/recordm/#/domain/1", "ifLoggedIn": true }
12
- ],
13
- "titlePT": "CoB",
14
- "navPT": [
15
- { "text": "Utilizadores", "link": "/site/users/" },
16
- { "text": "Administradores", "link": "/site/managers/" },
17
- { "text": "Programadores", "link": "/site/developers/" },
18
- { "text": "Soluções", "link": "/site/solutions/" },
19
- { "text": "Login", "link": "/recordm/index.html#/login", "ifLoggedIn": false, "target": "_self" },
20
- { "text": "Backend", "link": "/recordm/#/domain/1", "ifLoggedIn": true }
21
- ],
22
- "titleES": "CoB",
23
- "navES": [
24
- { "text": "Usuários", "link": "/site/users/" },
25
- { "text": "Administradores", "link": "/site/managers/" },
26
- { "text": "Desarrolladores", "link": "/site/developers/" },
27
- { "text": "Soluciones", "link": "/site/solutions/" },
28
- { "text": "Acceso", "link": "/recordm/index.html#/login", "ifLoggedIn": false, "target": "_self" },
29
- { "text": "Backend", "link": "/recordm/#/domain/1", "ifLoggedIn": true }
30
- ]
31
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Client app enhancement file.
3
- *
4
- * https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
5
- */
6
-
7
- export default ({
8
- Vue, // the version of Vue being used in the VuePress app
9
- options, // the options for the root Vue instance
10
- router, // the router instance for the app
11
- siteData // site metadata
12
- }) => {
13
- // ...apply enhancements for the site.
14
- }