classcard-ui 0.2.565 → 0.2.570

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.565",
3
+ "version": "0.2.570",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -18,7 +18,24 @@
18
18
  type="solid"
19
19
  class="mt-3 mr-3 h-5 w-5 shrink-0 text-gray-900"
20
20
  ></c-icon>
21
+
22
+ <div v-if="isIcon">
23
+ <c-avatar
24
+ v-if="items.image"
25
+ :size="items.size"
26
+ :rounded="items.rounded"
27
+ :image="items.image"
28
+ class="shrink-0"
29
+ ></c-avatar>
30
+ <c-icon
31
+ v-else
32
+ :name="icon.name"
33
+ :type="icon.type"
34
+ :class="icon.class"
35
+ ></c-icon>
36
+ </div>
21
37
  <c-avatar
38
+ v-else
22
39
  :size="items.size"
23
40
  :rounded="items.rounded"
24
41
  :image="items.image"
@@ -79,6 +96,13 @@ export default {
79
96
  type: Boolean,
80
97
  default: true,
81
98
  },
99
+ isIcon: {
100
+ type: Boolean,
101
+ default: false,
102
+ },
103
+ icon: {
104
+ type: Object,
105
+ },
82
106
  },
83
107
  data() {
84
108
  return {
@@ -1,10 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <div
4
- slot="table-actions"
5
- v-if="tableActions"
6
- class="mb-4 rounded-lg bg-gray-50 p-3"
7
- >
3
+ <div slot="table-actions" v-if="tableActions" class="mb-4 rounded-lg bg-gray-50 p-3">
8
4
  <div class="flex justify-between">
9
5
  <div v-if="searching">
10
6
  <c-input
@@ -17,20 +13,17 @@
17
13
  </div>
18
14
  <div class="flex">
19
15
  <!-- dropdown icon on top right of table -->
16
+ <slot name="customTableActions"></slot>
20
17
  <div class="relative inline-block text-left" v-if="enableVisibility">
21
18
  <!-- button to show list of columns to show hide in table -->
22
19
  <div>
23
20
  <button
24
21
  @click="handleToggle"
25
- class="inline-flex w-full justify-center rounded-md border border-gray-200 bg-white px-2 py-2 text-sm font-medium shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"
22
+ class="focus:outline-none inline-flex w-full justify-center rounded-md border border-gray-200 bg-white px-2 py-2 text-sm font-medium shadow-sm hover:bg-gray-50 focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"
26
23
  aria-haspopup="true"
27
24
  aria-expanded="true"
28
25
  >
29
- <c-icon
30
- name="view-board"
31
- type="solid"
32
- class="h-5 w-5 text-gray-400"
33
- ></c-icon>
26
+ <c-icon name="view-board" type="solid" class="h-5 w-5 text-gray-400"></c-icon>
34
27
  <c-icon
35
28
  name="chevron-down"
36
29
  type="solid"
@@ -95,9 +88,7 @@
95
88
  }`"
96
89
  mode="remote"
97
90
  ref="my-table"
98
- :styleClass="
99
- showLoader ? 'vgt-table opacity-50 pointer-events-none' : 'vgt-table'
100
- "
91
+ :styleClass="showLoader ? 'vgt-table opacity-50 pointer-events-none' : 'vgt-table'"
101
92
  :row-style-class="rowStyleClassFn"
102
93
  min-height="400px"
103
94
  :globalSearch="true"
@@ -374,12 +365,8 @@ export default {
374
365
  },
375
366
  // array of rows after drag and drop
376
367
  rearrange(oldIndex, newIndex) {
377
- const movedItem = this.reorderedArray.find(
378
- (item, index) => index === oldIndex
379
- );
380
- const remainingItems = this.reorderedArray.filter(
381
- (item, index) => index !== oldIndex
382
- );
368
+ const movedItem = this.reorderedArray.find((item, index) => index === oldIndex);
369
+ const remainingItems = this.reorderedArray.filter((item, index) => index !== oldIndex);
383
370
  const reorderedItems = [
384
371
  ...remainingItems.slice(0, newIndex),
385
372
  movedItem,