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

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.123",
3
+ "version": "1.0.43-alpha.124",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -10,7 +10,9 @@
10
10
  <ac-button
11
11
  modifier-classes="is-square is-primary"
12
12
  icon-class="copy"
13
- v-clipboard:copy="`${editorTitle}: &quot;${editorContent}&quot;`"
13
+ v-clipboard:copy="
14
+ `${editorTitle}: ${JSON.stringify(parsedContent, null, 4)}`
15
+ "
14
16
  v-clipboard:success="onCopy"
15
17
  v-clipboard:error="onError"
16
18
  />
@@ -7,7 +7,7 @@
7
7
  :secondaryColor="secondaryColor"
8
8
  />
9
9
  </div>
10
- <div v-else class="haha" ref="cellDiv">
10
+ <div v-else ref="cellDiv">
11
11
  <object-cell
12
12
  v-if="valueType === 'object'"
13
13
  :obj="value"
@@ -65,7 +65,8 @@ export default {
65
65
  computed: {
66
66
  valueType() {
67
67
  if (typeof this.value === "object") {
68
- if (Array.isArray(this.value)) return "array";
68
+ if (this.value === null) return "null";
69
+ else if (Array.isArray(this.value)) return "array";
69
70
  else return "object";
70
71
  } else return typeof this.value;
71
72
  },
@@ -68,7 +68,10 @@ export default {
68
68
  },
69
69
  printableStringObjs() {
70
70
  return this.objKeys.map((key) => {
71
- const value = this.obj[key];
71
+ let value = this.obj[key];
72
+ if (typeof value === "object" && value !== null) {
73
+ value = JSON.stringify(value);
74
+ }
72
75
  const keyValue = `${key}: ${value}`;
73
76
  const exceededLength = keyValue.length > 30;
74
77
  const print = exceededLength ? key : keyValue;
@@ -10,7 +10,9 @@
10
10
  <ac-button
11
11
  modifier-classes="is-square is-primary"
12
12
  icon-class="copy"
13
- v-clipboard:copy="`${editorTitle}: &quot;${editorContent}&quot;`"
13
+ v-clipboard:copy="
14
+ `${editorTitle}: ${JSON.stringify(parsedContent, null, 4)}`
15
+ "
14
16
  v-clipboard:success="onCopy"
15
17
  v-clipboard:error="onError"
16
18
  />
@@ -8,7 +8,7 @@
8
8
  :secondaryColor="secondaryColor"
9
9
  />
10
10
  </div>
11
- <div v-else class="haha" ref="cellDiv">
11
+ <div v-else ref="cellDiv">
12
12
  <object-cell
13
13
  v-if="valueType === 'object'"
14
14
  :obj="value"
@@ -72,7 +72,8 @@ export default defineComponent({
72
72
  computed: {
73
73
  valueType() {
74
74
  if (typeof this.value === "object") {
75
- if (Array.isArray(this.value)) return "array";
75
+ if (this.value === null) return "null";
76
+ else if (Array.isArray(this.value)) return "array";
76
77
  else return "object";
77
78
  } else return typeof this.value;
78
79
  },
@@ -79,7 +79,10 @@ export default defineComponent({
79
79
  },
80
80
  printableStringObjs() {
81
81
  return this.objKeys.map((key) => {
82
- const value = this.obj[key];
82
+ let value = this.obj[key];
83
+ if (typeof value === "object" && value !== null) {
84
+ value = JSON.stringify(value);
85
+ }
83
86
  const keyValue = `${key}: ${value}`;
84
87
  const exceededLength = keyValue.length > 30;
85
88
  const print = exceededLength ? key : keyValue;
@@ -103,3 +106,4 @@ export default defineComponent({
103
106
  },
104
107
  });
105
108
  </script>
109
+