@appscode/design-system 1.0.43-alpha.189 → 1.0.43-alpha.190

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.189",
3
+ "version": "1.0.43-alpha.190",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -13,6 +13,7 @@
13
13
  v-for="(previewYaml, idx) in filteredYamls"
14
14
  :key="previewYaml.name + idx"
15
15
  :class="{ 'is-active': activeKey === previewYaml.uid }"
16
+ data-testid="filtered-file-editor-file-name"
16
17
  >
17
18
  <a @click.prevent="setActivePreview(previewYaml.uid)">
18
19
  <span>
@@ -32,7 +33,7 @@
32
33
  />
33
34
  </div>
34
35
  </div>
35
- <div class="right-content">
36
+ <div class="right-content" data-testid="filtered-file-editor-content">
36
37
  <div class="right-content">
37
38
  <resource-loader
38
39
  v-if="isPreviewLoading"
@@ -67,69 +68,69 @@ export default {
67
68
  loading: Preloader,
68
69
  delay: 200,
69
70
  error: Banner,
70
- timeout: 100000
71
+ timeout: 100000,
71
72
  }),
72
73
  ResourceLoader: () => import("./../loaders/ResourceLoader.vue"),
73
- SidebarLoader: () => import("./../loaders/SidebarLoader.vue")
74
+ SidebarLoader: () => import("./../loaders/SidebarLoader.vue"),
74
75
  },
75
76
  props: {
76
77
  searchText: {
77
78
  type: String,
78
- default: ""
79
+ default: "",
79
80
  },
80
81
  toggleHideValue: {
81
82
  type: Boolean,
82
- default: true
83
+ default: true,
83
84
  },
84
85
  isPreviewLoading: {
85
86
  type: Boolean,
86
- default: false
87
+ default: false,
87
88
  },
88
89
  isEditorReadOnly: {
89
90
  type: Boolean,
90
- default: false
91
+ default: false,
91
92
  },
92
93
  previewYamls: {
93
94
  type: Array,
94
95
  default: () => {
95
96
  [];
96
- }
97
+ },
97
98
  },
98
99
  showMinimap: {
99
100
  type: Boolean,
100
- default: false
101
+ default: false,
101
102
  },
102
103
  editorHeight: {
103
104
  type: Number,
104
- default: 60
105
+ default: 60,
105
106
  },
106
107
  loaderColor: {
107
108
  type: Object,
108
109
  default: () => {
109
110
  return {};
110
- }
111
+ },
111
112
  },
112
113
  theme: {
113
114
  type: String,
114
- default: "light"
115
- }
115
+ default: "light",
116
+ },
116
117
  },
117
118
  data() {
118
119
  return {
119
120
  activeKey: "",
120
- hideValue: ""
121
+ hideValue: "",
121
122
  };
122
123
  },
123
124
  computed: {
124
125
  activeFile() {
125
126
  const activeFile = this.filteredYamls.find(
126
- element => element.uid === this.activeKey
127
+ (element) => element.uid === this.activeKey
127
128
  );
128
129
  return activeFile || { content: "", format: "yaml" };
129
130
  },
130
131
  originalValue() {
131
132
  const activeFile = this.filteredYamls.find(
132
- element => element.uid === this.activeKey
133
+ (element) => element.uid === this.activeKey
133
134
  );
134
135
  return (activeFile && activeFile.initContent) || "";
135
136
  },
@@ -145,16 +146,16 @@ export default {
145
146
  filteredYamls() {
146
147
  if (this.searchText) {
147
148
  return this.previewYamls.filter(
148
- element => JSON.stringify(element).search(this.searchText) > -1
149
+ (element) => JSON.stringify(element).search(this.searchText) > -1
149
150
  );
150
151
  } else return this.previewYamls;
151
152
  },
152
153
  isKeyAvailable() {
153
- const val = this.previewYamls.find(element => {
154
+ const val = this.previewYamls.find((element) => {
154
155
  return element.uid === this.activeKey;
155
156
  });
156
157
  return val === undefined ? false : true;
157
- }
158
+ },
158
159
  },
159
160
  methods: {
160
161
  initActivePreview() {
@@ -168,7 +169,7 @@ export default {
168
169
  this.activeKey = uid;
169
170
  this.hideValue = this.activeFile.isSecret;
170
171
  this.$emit("setActiveKey", this.activeKey);
171
- }
172
+ },
172
173
  },
173
174
  watch: {
174
175
  previewYamls: {
@@ -178,11 +179,11 @@ export default {
178
179
  if (n.length) {
179
180
  this.initActivePreview();
180
181
  }
181
- }
182
+ },
182
183
  },
183
184
  toggleHideValue(n) {
184
185
  this.hideValue = n;
185
- }
186
- }
186
+ },
187
+ },
187
188
  };
188
189
  </script>