classcard-ui 0.2.306 → 0.2.310

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": "classcard-ui",
3
- "version": "0.2.306",
3
+ "version": "0.2.310",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -56,6 +56,8 @@
56
56
  @action="$emit('action-two')"
57
57
  :type="actionTwoType"
58
58
  :label="actionTwoLabel"
59
+ :isLoading="loadButton"
60
+ :disabled="loadButton"
59
61
  ></c-button>
60
62
  </div>
61
63
  </div>
@@ -99,6 +101,10 @@ export default {
99
101
  type: String,
100
102
  default: "secondary-gray",
101
103
  },
104
+ loadButton: {
105
+ type: Boolean,
106
+ default: false,
107
+ },
102
108
  },
103
109
  };
104
110
  </script>
@@ -49,15 +49,9 @@ export default {
49
49
  onUploadSuccess: {
50
50
  type: Function,
51
51
  },
52
- includeUnsplash: {
53
- type: Boolean,
54
- },
55
- cropImage: {
56
- type: Boolean,
57
- },
58
- aspectRatioDimensions: {
52
+ aspectRatio: {
59
53
  type: Number,
60
- default: 23 / 45,
54
+ default: null,
61
55
  },
62
56
  },
63
57
  data() {
@@ -74,6 +68,16 @@ export default {
74
68
  uploadInBackground: false,
75
69
  maxFiles: this.maxFiles,
76
70
  onUploadDone: (res) => this.$emit("filestack-uploaded", res),
71
+ fromSources: [
72
+ 'local_file_system',
73
+ 'unsplash'
74
+ ],
75
+ transformations: {
76
+ crop: {
77
+ aspectRatio: this.aspectRatio ? this.aspectRatio : 1/1,
78
+ force: this.aspectRatio ? true : false
79
+ }
80
+ }
77
81
  };
78
82
  const picker = client.picker(options);
79
83
  picker.open();
@@ -91,8 +95,6 @@ export default {
91
95
  mounted() {
92
96
  if (this.type === "filestack") {
93
97
  this.initFilestack();
94
- } else if (this.type == "default") {
95
- this.initUppload();
96
98
  }
97
99
  },
98
100
  };
@@ -55,4 +55,5 @@ Default.args = {
55
55
  actionTwoLabel: "Confirm",
56
56
  actionOneType: "secondary-gray",
57
57
  actionTwoType: "secondary-gray",
58
+ loadButton: "false"
58
59
  };