classcard-ui 0.2.304 → 0.2.308

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.304",
3
+ "version": "0.2.308",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -25,7 +25,6 @@
25
25
  "gridjs-selection": "^3.4.0",
26
26
  "gridjs-vue": "^3.4.0",
27
27
  "lodash-es": "^4.17.21",
28
- "uppload": "^3.2.1",
29
28
  "v-calendar": "^2.3.2",
30
29
  "vue": "^2.6.14",
31
30
  "vue-good-table": "^2.21.8",
@@ -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>
@@ -1,16 +1,5 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="type === 'default'">
4
- <slot></slot>
5
- <div :class="errorClasses" class="" id="c-file-area" @click.prevent="uploader.open()">
6
- <button
7
- type="white"
8
- class="pic-btn inline-flex items-center px-4 py-2 shadow-sm text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 text-gray-700 border bg-white border-gray-300 hover:bg-gray-50 focus:ring-indigo-600"
9
- >
10
- {{ buttonText }}
11
- </button>
12
- </div>
13
- </div>
14
3
  <div v-if="type === 'filestack'" :class="filestackClasses" id="filestack-uploader"></div>
15
4
  <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
16
5
  {{ errorMessage }}
@@ -20,7 +9,6 @@
20
9
 
21
10
  <script>
22
11
  import * as filestack from "filestack-js";
23
- import { Uppload, Local, xhrUploader, en, Crop, Unsplash } from "uppload";
24
12
 
25
13
  export default {
26
14
  name: "CUpload",
@@ -60,17 +48,7 @@ export default {
60
48
  },
61
49
  onUploadSuccess: {
62
50
  type: Function,
63
- },
64
- includeUnsplash: {
65
- type: Boolean,
66
- },
67
- cropImage: {
68
- type: Boolean,
69
- },
70
- aspectRatioDimensions: {
71
- type: Number,
72
- default: 23 / 45,
73
- },
51
+ }
74
52
  },
75
53
  data() {
76
54
  return {
@@ -90,33 +68,6 @@ export default {
90
68
  const picker = client.picker(options);
91
69
  picker.open();
92
70
  },
93
- initUppload() {
94
- // Uppload library
95
- this.uploader = new Uppload({
96
- lang: en,
97
- compression: 0.4,
98
- compressionToMime: "image/jpeg",
99
- maxSize: [500, 1000],
100
- uploader: xhrUploader({
101
- endpoint: `${this.url}`,
102
- fileKeyName: "image",
103
- responseFunction: (response) => {
104
- this.$emit("onUploadSuccess", response);
105
- },
106
- }),
107
- });
108
- this.uploader.use([
109
- new Local(),
110
- ...(this.includeUnsplash
111
- ? [new Unsplash("hXfo-C0svXV4IDCncBo7s-ySQpVJVeZrGuWxwwgC7qw")]
112
- : []),
113
- ...(this.cropImage ? [new Crop({ aspectRatio: this.aspectRatioDimensions })] : []),
114
- ]);
115
- // Uppload Error Handle
116
- this.uploader.on("error", (error) => {
117
- console.log("The error message is", error);
118
- });
119
- },
120
71
  },
121
72
  computed: {
122
73
  errorClasses() {
@@ -130,8 +81,6 @@ export default {
130
81
  mounted() {
131
82
  if (this.type === "filestack") {
132
83
  this.initFilestack();
133
- } else if (this.type == "default") {
134
- this.initUppload();
135
84
  }
136
85
  },
137
86
  };
package/src/icons.js CHANGED
@@ -210,5 +210,7 @@ export default {
210
210
  "user-circle":
211
211
  "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z",
212
212
  "key":
213
- "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z"
213
+ "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
214
+ "template":
215
+ "M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z",
214
216
  };
@@ -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
  };