cob-cli 2.8.1 → 2.12.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 (91) hide show
  1. package/customizations/dashboard.dash.js +11 -0
  2. package/customizations/dashboard.js +1 -0
  3. package/customizations/dashboard.simple.js +1 -1
  4. package/customizations/dashboard.vue.empty.js +1 -1
  5. package/customizations/frontend.easy.js +16 -0
  6. package/lib/task_lists/customize_copy.js +7 -6
  7. package/package.json +1 -1
  8. package/templates/{cob-dashboard-html → dashboards/cob-dashboard-html}/demoDashboard.html +0 -0
  9. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package-lock.json +0 -0
  10. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package.json +0 -0
  11. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/App.vue +0 -0
  12. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/dashboard.html +0 -0
  13. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/main.js +0 -0
  14. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/cobUiVueComponents.js +0 -0
  15. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/vuetify.js +0 -0
  16. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/vue.config.js +0 -0
  17. package/templates/dashboards/dash/dist/css/app.2ca409ad.css +8 -0
  18. package/templates/dashboards/dash/dist/dashboard.html +20 -0
  19. package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
  20. package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
  21. package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
  22. package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
  23. package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
  24. package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
  25. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
  26. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
  27. package/templates/dashboards/dash/dist/js/app.a65a4c2c.js +188 -0
  28. package/templates/dashboards/dash/dist/js/app.a65a4c2c.js.map +1 -0
  29. package/templates/dashboards/dash/package-lock.json +24340 -0
  30. package/templates/dashboards/dash/package.json +19 -0
  31. package/templates/dashboards/dash/src/App.vue +257 -0
  32. package/templates/dashboards/dash/src/Dashboard.vue +46 -0
  33. package/templates/dashboards/dash/src/assets/css/all.min.css +6 -0
  34. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
  35. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
  36. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
  37. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
  38. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
  39. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
  40. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
  41. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  42. package/templates/dashboards/dash/src/collector.js +3782 -0
  43. package/templates/dashboards/dash/src/components/Board.vue +61 -0
  44. package/templates/dashboards/dash/src/components/BoardsNav.vue +23 -0
  45. package/templates/dashboards/dash/src/components/BoardsPage.vue +36 -0
  46. package/templates/dashboards/dash/src/components/Menu.vue +19 -0
  47. package/templates/dashboards/dash/src/components/Title.vue +13 -0
  48. package/templates/dashboards/dash/src/components/Totals.vue +53 -0
  49. package/templates/dashboards/dash/src/components/TotalsBadge.vue +69 -0
  50. package/templates/dashboards/dash/src/dashboard.html +34 -0
  51. package/templates/dashboards/dash/src/definition_dashboard_v59.json +394 -0
  52. package/templates/dashboards/dash/src/input.css +9 -0
  53. package/templates/dashboards/dash/src/main.js +11 -0
  54. package/templates/dashboards/dash/src/output.css +135974 -0
  55. package/templates/dashboards/dash/tailwind.config.js +19 -0
  56. package/templates/dashboards/dash/vue.config.js +104 -0
  57. package/templates/frontend/common/css/_dashboard.css +7 -0
  58. package/templates/frontend/common/css/_global.css +3 -2
  59. package/templates/frontend/easy/css/_easy/googlefonts.css +360 -0
  60. package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +10488 -0
  61. package/templates/frontend/easy/js/_easy/lib/axios.min.js +9 -0
  62. package/templates/frontend/easy/js/_easy/lib/marked.min.js +6 -0
  63. package/templates/frontend/easy/js/_easy/lib/vue.js +11912 -0
  64. package/templates/frontend/easy/js/_easy/lib/vue.min.js +6 -0
  65. package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +6 -0
  66. package/templates/frontend/easy/js/customizations2.__MERGE__.js +22 -0
  67. package/templates/frontend/easy/webapp/.browserslistrc +2 -0
  68. package/templates/frontend/easy/webapp/.eslintrc.js +17 -0
  69. package/templates/frontend/easy/webapp/README.md +60 -0
  70. package/templates/frontend/easy/webapp/babel.config.js +5 -0
  71. package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +1 -0
  72. package/templates/frontend/easy/webapp/dist/dashboard.html +13 -0
  73. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +2 -0
  74. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +1 -0
  75. package/templates/frontend/easy/webapp/package-lock.json +32986 -0
  76. package/templates/frontend/easy/webapp/package.json +32 -0
  77. package/templates/frontend/easy/webapp/postcss.config.js +5 -0
  78. package/templates/frontend/easy/webapp/public/dashboard.html +13 -0
  79. package/templates/frontend/easy/webapp/src/App.vue +181 -0
  80. package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
  81. package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +59 -0
  82. package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +163 -0
  83. package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +225 -0
  84. package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +95 -0
  85. package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +59 -0
  86. package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +60 -0
  87. package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +73 -0
  88. package/templates/frontend/easy/webapp/src/main.js +19 -0
  89. package/templates/frontend/easy/webapp/src/perm-templates.js +189 -0
  90. package/templates/frontend/easy/webapp/src/perms.js +197 -0
  91. package/templates/frontend/easy/webapp/vue.config.js +66 -0
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <li :class="wrapperClass">
3
+ <div class="py-4 px-5 space-y-2">
4
+ <slot></slot>
5
+ </div>
6
+ </li>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ props: {
12
+ rowSpan: String,
13
+ colSpan: String,
14
+ title: String,
15
+ showTitle: Boolean
16
+ },
17
+ computed: {
18
+ wrapperClass() {
19
+ const c = "w-full bg-cobbg rounded-md border border-cobline" // hover:ring-1 ring-slate-400/50 ring-offset-1;
20
+
21
+ // Force possible dynamic classes to be loaded
22
+ const dynamicRowClasses = {
23
+ 1: "md:row-span-1",
24
+ 2: "md:row-span-2",
25
+ 3: "md:row-span-3",
26
+ 4: "md:row-span-4",
27
+ 5: "md:row-span-5",
28
+ 6: "md:row-span-6",
29
+ 7: "md:row-span-7",
30
+ 8: "md:row-span-8",
31
+ 9: "md:row-span-9",
32
+ 10: "md:row-span-10",
33
+ 11: "md:row-span-11",
34
+ 12: "md:row-span-12",
35
+ "full": "md:row-span-full"
36
+ }
37
+ const rspan = this.rowSpan ? " " + dynamicRowClasses[this.rowSpan] : "";
38
+
39
+ // Force possible dynamic classes to be loaded
40
+ const dynamicColClasses = {
41
+ 1: "md:col-span-1",
42
+ 2: "md:col-span-2",
43
+ 3: "md:col-span-3",
44
+ 4: "md:col-span-4",
45
+ 5: "md:col-span-5",
46
+ 6: "md:col-span-6",
47
+ 7: "md:col-span-7",
48
+ 8: "md:col-span-8",
49
+ 9: "md:col-span-9",
50
+ 10: "md:col-span-10",
51
+ 11: "md:col-span-11",
52
+ 12: "md:col-span-12",
53
+ "full": "md:col-span-full"
54
+ }
55
+ const cspan = this.colSpan ? " " + dynamicColClasses[this.colSpan] : "";
56
+
57
+ return c + rspan + cspan;
58
+ }
59
+ }
60
+ }
61
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <aside class="overflow-y-auto py-2 px-3 bg-white rounded-lg">
3
+ <ul class="space-y-2">
4
+ <li>
5
+ <a href="#" class="flex items-center p-2 text-gray-700 rounded-lg hover:bg-gray-100">
6
+ <svg class="w-6 h-6 text-gray-400 transition duration-75" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
7
+ <span class="ml-3">Dashboard</span>
8
+ </a>
9
+ </li>
10
+ <li>
11
+ <a href="#" class="flex items-center p-2 text-gray-700 rounded-lg hover:bg-gray-100">
12
+ <svg class="w-6 h-6 text-gray-400 transition duration-75" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
13
+ <span class="ml-3">Alternative</span>
14
+ </a>
15
+ </li>
16
+ </ul>
17
+ </aside>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ }
23
+ </script>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <ul :class="wrapperClass">
3
+ <slot></slot>
4
+ </ul>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ props: { gridCols: String },
10
+ computed: {
11
+ wrapperClass() {
12
+ const c = "grid grid-cols-1 gap-2 content-center md:grid-flow-row-dense";
13
+
14
+ // Force possible dynamic classes to be loaded
15
+ const dynamicClasses = {
16
+ 1: "md:grid-cols-1",
17
+ 2: "md:grid-cols-2",
18
+ 3: "md:grid-cols-3",
19
+ 4: "md:grid-cols-4",
20
+ 5: "md:grid-cols-5",
21
+ 6: "md:grid-cols-6",
22
+ 7: "md:grid-cols-7",
23
+ 8: "md:grid-cols-8",
24
+ 9: "md:grid-cols-9",
25
+ 10: "md:grid-cols-10",
26
+ 11: "md:grid-cols-11",
27
+ 12: "md:grid-cols-12",
28
+ none: "md:grid-cols-none"
29
+ }
30
+
31
+ const gcols = this.gridCols ? " " + dynamicClasses[this.gridCols] : "";
32
+ return c + gcols;
33
+ }
34
+ }
35
+ }
36
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <ul class="space-y-2 text-slate-700 decoration-slate-700">
3
+ <li v-for="(item, i) in componentData.items" :key="item.text + i"
4
+ :class="'transition ease-in-out duration-300 rounded-md border border-cobline border-l-2 border-l-sky-600 shadow-sm transform hover:translate-x-0.5 '
5
+ + item.text_style">
6
+ <a :href="item.link" class="flex items-center font-light py-1 px-3">
7
+ <span v-html="item.text"/>
8
+ </a>
9
+ </li>
10
+ </ul>
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ props: {
16
+ componentData: Object
17
+ }
18
+ }
19
+ </script>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <div class="text-slate-700 uppercase tracking-wider border-b border-b-cobline/50 pb-1 text-xs text-center">
3
+ <span v-html="componentData.title_text"/>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ props: {
10
+ componentData: Object
11
+ }
12
+ }
13
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <table class="w-full table-auto">
3
+ <thead v-if="headers.length > 0">
4
+ <tr class="uppercase text-xs text-slate-700 tracking-wider underline underline-offset-4">
5
+ <td :class="'py-2 ' + headers_style">{{ headers[0] }}</td>
6
+ <td v-for="header in headers.slice(1)" :key="header"
7
+ :class="'py-2 text-right ' + headers_style">{{ header }}</td>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <tr v-for="(line, i) in lines" :key="'line'+i"
12
+ class="text-slate-700">
13
+ <td :class="'py-2 ' + line.text_style">{{ line.text }}</td>
14
+ <td v-for="(badge, j) in line.values" :key="'badge'+j"
15
+ class="py-2 text-right">
16
+ <TotalsBadge :badge-data="badge" />
17
+ </td>
18
+ </tr>
19
+ </tbody>
20
+ </table>
21
+ </template>
22
+
23
+ <script>
24
+ import TotalsBadge from './TotalsBadge.vue'
25
+ export default {
26
+ components: { TotalsBadge },
27
+ props: { componentData: Object },
28
+ computed: {
29
+ valuesGridClass() {
30
+ const dynamicClasses = {
31
+ 1: "grid-cols-1",
32
+ 2: "grid-cols-2",
33
+ 3: "grid-cols-3",
34
+ 4: "grid-cols-4",
35
+ 5: "grid-cols-5",
36
+ 6: "grid-cols-6",
37
+ 7: "grid-cols-7",
38
+ 8: "grid-cols-8",
39
+ 9: "grid-cols-9",
40
+ 10: "grid-cols-10",
41
+ 11: "grid-cols-11",
42
+ 12: "grid-cols-12",
43
+ none: "grid-cols-none"
44
+ }
45
+ // Grid with cols == amount of values
46
+ return "grid " + dynamicClasses[this.lines[0].values.length]
47
+ },
48
+ headers() { return this.componentData.headers.filter(x => !!x) },
49
+ headers_style() { return this.componentData.headers_style },
50
+ lines() { return this.componentData.lines }
51
+ }
52
+ }
53
+ </script>
@@ -0,0 +1,69 @@
1
+ <template>
2
+ <div :class="{'animate-pulse':signalChange}">
3
+ <a :href="badgeData.dash_info.href" :class="valueClass" class="relative inline-flex">
4
+ <span v-html="value"/>
5
+
6
+ <svg v-if="updating" class="absolute animate-spin -top-1 -right-1 h-2 w-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
7
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
8
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
9
+ </svg>
10
+ </a>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+
16
+ export default {
17
+ props: {
18
+ badgeData: Object
19
+ },
20
+ data () {
21
+ return {
22
+ signalChange: false
23
+ }
24
+ },
25
+ watch: {
26
+ state(newState) {
27
+ if(newState == "ready") {
28
+ this.signalChange = true;
29
+ setTimeout( () => this.signalChange = false,8000)
30
+ }
31
+ }
32
+ },
33
+ computed: {
34
+ updating() {
35
+ return this.badgeData.dash_info.state == "updating" || this.badgeData.dash_info.state == "loading"
36
+ },
37
+ value() {
38
+ if(this.badgeData.dash_info.state == "loading") return "L"
39
+ if(this.badgeData.dash_info.state == "error") return "E"
40
+ if(isNaN(this.badgeData.dash_info.value)) {
41
+ return this.badgeData.dash_info.value
42
+ } else {
43
+ return new Intl.NumberFormat('en-US', {}).format(this.badgeData.dash_info.value)
44
+ }
45
+ },
46
+ state() {
47
+ return this.badgeData.dash_info.state
48
+ },
49
+ valueClass() {
50
+ let c = "relative transition ease-in-out px-2 py-1 rounded-md text-center font-mono font-semibold transition border ring-offset-1 hover:ring-2"
51
+
52
+ const lookup = {
53
+ "Info": "text-sky-600 border-sky-600 bg-sky-200/10 ring-sky-600",
54
+ "Success": "text-lime-500 border-lime-500 bg-lime-200/10 ring-lime-500",
55
+ "Warning": "text-amber-500 border-amber-500 bg-amber-200/10 ring-amber-500",
56
+ "Important": "text-rose-600 border-rose-600 bg-rose-200/10 ring-rose-600",
57
+
58
+ "Gray": "text-gray-400 border-gray-200 bg-gray-200/10 ring-gray-200",
59
+ "Fallback": "text-slate-700 ring-slate-700",
60
+ }
61
+
62
+ if(this.badgeData.dash_info.state == "loading") return c + " " + lookup["Warning"]
63
+ if(this.badgeData.dash_info.state == "error") return c + " " + lookup["Important"]
64
+
65
+ return c + " " + (this.badgeData.dash_info.value == 0 ? lookup["Gray"] : lookup[this.badgeData.style] ? lookup[this.badgeData.style] : lookup["Fallback"])
66
+ }
67
+ }
68
+ }
69
+ </script>
@@ -0,0 +1,34 @@
1
+ <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
+
9
+ <% } %>
10
+ <% for (var css in htmlWebpackPlugin.files.css) { %>
11
+ <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="preload" as="style">
12
+ <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
13
+ <% } %>
14
+ <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
15
+ <link href="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" rel="preload" as="script">
16
+ <% } %>
17
+ <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
18
+ </head>
19
+ <body>
20
+ <% } %>
21
+ <style>section.custom-resource{visibility: hidden;opacity:0;}</style>
22
+ <div id="app"></div>
23
+ <script>
24
+ // mimes: .cob-app tem estilos globais que se aplicam a elementos vuetify que mudam o aspecto previsto
25
+ let section = document.getElementsByClassName("custom-resource")[0];
26
+ section && section.classList.remove("cob-app"); //TODO: validar que isto é a melhor opção (considerar remover class na ui-all)
27
+ </script>
28
+ <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
29
+ <script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
30
+ <% } %>
31
+ <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
32
+ </body>
33
+ </html>
34
+ <% } %>