@appscode/design-system 1.0.43-alpha.124 → 1.0.43-alpha.127

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "1.0.43-alpha.124",
3
+ "version": "1.0.43-alpha.127",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="sign-up-notification mb-20">
3
3
  <div class="notification-inner has-text-centered">
4
- <h3><slot name="banner-title" /></h3>
5
- <slot />
4
+ <h3><slot name="banner-title">Error!</slot></h3>
5
+ <slot><p>Oops!! There was an error while loading!</p></slot>
6
6
  </div>
7
7
  </div>
8
8
  </template>
@@ -15,12 +15,12 @@
15
15
  :language="language"
16
16
  :options="{
17
17
  minimap: {
18
- enabled: calcShowMinimap
18
+ enabled: calcShowMinimap,
19
19
  },
20
20
  theme: theme,
21
21
  readOnly: readOnly,
22
22
  wordWrap: wordWrap,
23
- scrollBeyondLastLine: false
23
+ scrollBeyondLastLine: false,
24
24
  }"
25
25
  />
26
26
  <monaco-editor
@@ -31,12 +31,12 @@
31
31
  :language="language"
32
32
  :options="{
33
33
  minimap: {
34
- enabled: calcShowMinimap
34
+ enabled: calcShowMinimap,
35
35
  },
36
36
  theme: theme,
37
37
  readOnly: true,
38
38
  wordWrap: wordWrap,
39
- scrollBeyondLastLine: false
39
+ scrollBeyondLastLine: false,
40
40
  }"
41
41
  :original="originalEditorContent"
42
42
  :diff-editor="true"
@@ -45,51 +45,59 @@
45
45
  </template>
46
46
 
47
47
  <script>
48
+ import Preloader from "../preloader/Preloader.vue";
49
+ import Banner from "../banner/Banner.vue";
48
50
  export default {
49
51
  props: {
50
52
  value: {
51
53
  type: String,
52
- default: ""
54
+ default: "",
53
55
  },
54
56
  originalValue: {
55
57
  type: String,
56
- default: ""
58
+ default: "",
57
59
  },
58
60
  readOnly: {
59
61
  type: Boolean,
60
- default: false
62
+ default: false,
61
63
  },
62
64
  language: {
63
65
  type: String,
64
- default: "yaml"
66
+ default: "yaml",
65
67
  },
66
68
  showMinimap: {
67
69
  type: Boolean,
68
- default: true
70
+ default: true,
69
71
  },
70
72
  editorHeight: {
71
73
  type: Number,
72
- default: 40
74
+ default: 40,
73
75
  },
74
76
  editorTheme: {
75
77
  type: String,
76
- default: ""
78
+ default: "",
77
79
  },
78
80
  wordWrap: {
79
81
  type: String,
80
- default: "off"
82
+ default: "off",
81
83
  },
82
84
  },
83
85
  components: {
84
86
  EditorTabs: () => import("../tabs/EditorTabs.vue"),
85
- MonacoEditor: () => import("vue-monaco")
87
+ MonacoEditor: () => ({
88
+ component: import("vue-monaco"),
89
+ loading: Preloader,
90
+ delay: 200,
91
+ error: Banner,
92
+ timeout: 20000,
93
+ }),
86
94
  },
87
95
 
88
96
  data() {
89
97
  return {
90
98
  activeTab: "edit",
91
99
  editorContent: "",
92
- originalEditorContent: ""
100
+ originalEditorContent: "",
93
101
  };
94
102
  },
95
103
 
@@ -105,7 +113,7 @@ export default {
105
113
  ? "vs-dark"
106
114
  : "vs")
107
115
  );
108
- }
116
+ },
109
117
  },
110
118
 
111
119
  watch: {
@@ -115,7 +123,7 @@ export default {
115
123
  if (this.editorContent !== n) {
116
124
  this.editorContent = n;
117
125
  }
118
- }
126
+ },
119
127
  },
120
128
  originalValue: {
121
129
  immediate: true,
@@ -123,8 +131,8 @@ export default {
123
131
  if (this.originalEditorContent !== n) {
124
132
  this.originalEditorContent = n;
125
133
  }
126
- }
127
- }
134
+ },
135
+ },
128
136
  },
129
137
 
130
138
  methods: {
@@ -134,7 +142,7 @@ export default {
134
142
  editor.onDidBlurEditorText(() => {
135
143
  this.$emit("input", this.editorContent);
136
144
  });
137
- }
138
- }
145
+ },
146
+ },
139
147
  };
140
148
  </script>
@@ -48,70 +48,78 @@
48
48
  </div>
49
49
  </template>
50
50
  <script>
51
+ import Preloader from "../preloader/Preloader.vue";
52
+ import Banner from "../banner/Banner.vue";
51
53
  export default {
52
54
  components: {
53
- Editor: () => import("./Editor.vue"),
55
+ Editor: {
56
+ component: () => import("./Editor.vue"),
57
+ loading: Preloader,
58
+ delay: 200,
59
+ error: Banner,
60
+ timeout: 20000,
61
+ },
54
62
  ResourceLoader: () => import("./../loaders/ResourceLoader.vue"),
55
- SidebarLoader: () => import("./../loaders/SidebarLoader.vue")
63
+ SidebarLoader: () => import("./../loaders/SidebarLoader.vue"),
56
64
  },
57
65
  props: {
58
66
  searchText: {
59
67
  type: String,
60
- default: ""
68
+ default: "",
61
69
  },
62
70
  toggleHideValue: {
63
71
  type: Boolean,
64
- default: true
72
+ default: true,
65
73
  },
66
74
  isPreviewLoading: {
67
75
  type: Boolean,
68
- default: false
76
+ default: false,
69
77
  },
70
78
  isEditorReadOnly: {
71
79
  type: Boolean,
72
- default: false
80
+ default: false,
73
81
  },
74
82
  previewYamls: {
75
83
  type: Array,
76
84
  default: () => {
77
85
  [];
78
- }
86
+ },
79
87
  },
80
88
  showMinimap: {
81
89
  type: Boolean,
82
- default: false
90
+ default: false,
83
91
  },
84
92
  editorHeight: {
85
93
  type: Number,
86
- default: 60
87
- }
94
+ default: 60,
95
+ },
88
96
  },
89
97
  data() {
90
98
  return {
91
99
  activeKey: "",
92
- hideValue: ""
100
+ hideValue: "",
93
101
  };
94
102
  },
95
103
  computed: {
96
104
  activeFile() {
97
105
  const activeFile = this.filteredYamls.find(
98
- element => element.uid === this.activeKey
106
+ (element) => element.uid === this.activeKey
99
107
  );
100
108
  return activeFile || { content: "", format: "yaml" };
101
109
  },
102
110
  filteredYamls() {
103
111
  if (this.searchText) {
104
112
  return this.previewYamls.filter(
105
- element => JSON.stringify(element).search(this.searchText) > -1
113
+ (element) => JSON.stringify(element).search(this.searchText) > -1
106
114
  );
107
115
  } else return this.previewYamls;
108
116
  },
109
117
  isKeyAvailable() {
110
- const val = this.previewYamls.find(element => {
118
+ const val = this.previewYamls.find((element) => {
111
119
  return element.uid === this.activeKey;
112
120
  });
113
121
  return val === undefined ? false : true;
114
- }
122
+ },
115
123
  },
116
124
  methods: {
117
125
  initActivePreview() {
@@ -125,7 +133,7 @@ export default {
125
133
  this.activeKey = uid;
126
134
  this.hideValue = this.activeFile.isSecret;
127
135
  this.$emit("setActiveKey", this.activeKey);
128
- }
136
+ },
129
137
  },
130
138
  watch: {
131
139
  previewYamls: {
@@ -135,11 +143,11 @@ export default {
135
143
  if (n.length) {
136
144
  this.initActivePreview();
137
145
  }
138
- }
146
+ },
139
147
  },
140
148
  toggleHideValue(n) {
141
149
  this.hideValue = n;
142
- }
143
- }
150
+ },
151
+ },
144
152
  };
145
153
  </script>
@@ -28,6 +28,8 @@
28
28
  </template>
29
29
 
30
30
  <script>
31
+ import Preloader from "../preloader/Preloader.vue";
32
+ import Banner from "../banner/Banner.vue";
31
33
  export default {
32
34
  props: {
33
35
  open: {
@@ -45,7 +47,13 @@ export default {
45
47
  },
46
48
  components: {
47
49
  Modal: () => import("../modal/Modal.vue"),
48
- Editor: () => import("../editor/Editor.vue"),
50
+ Editor: () => ({
51
+ component: import("../editor/Editor.vue"),
52
+ loading: Preloader,
53
+ delay: 200,
54
+ error: Banner,
55
+ timeout: 20000,
56
+ }),
49
57
  AcButton: () => import("../button/Button.vue"),
50
58
  HeaderItem: () => import("../header/HeaderItem.vue"),
51
59
  },
@@ -19,7 +19,7 @@ export default {
19
19
  },
20
20
  message: {
21
21
  type: String,
22
- default: "Fetching! Please wait for sometime..."
22
+ default: "Loading ..."
23
23
  }
24
24
  }
25
25
  };
@@ -46,6 +46,8 @@
46
46
 
47
47
  <script>
48
48
  import { defineComponent, defineAsyncComponent, h } from "vue";
49
+ import Preloader from "../../v2/preloader/Preloader.vue";
50
+ import Banner from "../../v2/banner/Banner.vue";
49
51
  export default defineComponent({
50
52
  props: {
51
53
  value: {
@@ -88,9 +90,15 @@ export default defineComponent({
88
90
  EditorTabs: defineAsyncComponent(() =>
89
91
  import("../tabs/EditorTabs.vue").then((module) => module.default)
90
92
  ),
91
- MonacoEditor: defineAsyncComponent(() =>
92
- import("monaco-editor-vue3").then((module) => module.default)
93
- ),
93
+ MonacoEditor: defineAsyncComponent({
94
+ loader: () =>
95
+ import("monaco-editor-vue3").then((module) => module.default),
96
+
97
+ loadingComponent: Preloader,
98
+ delay: 200,
99
+ errorComponent: Banner,
100
+ timeout: 20000,
101
+ }),
94
102
  },
95
103
 
96
104
  data() {
@@ -30,6 +30,8 @@
30
30
  <script>
31
31
  import { defineComponent, defineAsyncComponent } from "vue";
32
32
  import { useToast } from "vue-toastification";
33
+ import Preloader from "../../v2/preloader/Preloader.vue";
34
+ import Banner from "../../v2/banner/Banner.vue";
33
35
 
34
36
  export default defineComponent({
35
37
  props: {
@@ -51,9 +53,14 @@ export default defineComponent({
51
53
  Modal: defineAsyncComponent(() =>
52
54
  import("../modal/Modal.vue").then((module) => module.default)
53
55
  ),
54
- Editor: defineAsyncComponent(() =>
55
- import("../editor/Editor.vue").then((module) => module.default)
56
- ),
56
+ Editor: defineAsyncComponent({
57
+ loader: () =>
58
+ import("../editor/Editor.vue").then((module) => module.default),
59
+ loadingComponent: Preloader,
60
+ delay: 200,
61
+ errorComponent: Banner,
62
+ timeout: 20000,
63
+ }),
57
64
  AcButton: defineAsyncComponent(() =>
58
65
  import("../button/Button.vue").then((module) => module.default)
59
66
  ),