@appscode/design-system 1.0.43-alpha.126 → 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.126",
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": {
@@ -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
  },
@@ -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
  ),