classcard-ui 0.2.799 → 0.2.801

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.799",
3
+ "version": "0.2.801",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -26,6 +26,7 @@
26
26
  "gridjs-selection": "^3.4.0",
27
27
  "gridjs-vue": "^3.4.0",
28
28
  "lodash-es": "^4.17.21",
29
+ "skeleton-loader-vue": "^1.0.10",
29
30
  "v-calendar": "^2.3.2",
30
31
  "v-scroll-lock": "^1.3.1",
31
32
  "vue": "^2.6.14",
@@ -166,13 +166,10 @@
166
166
  }`"
167
167
  mode="remote"
168
168
  ref="my-table"
169
- :styleClass="
170
- showLoader ? 'vgt-table opacity-50 pointer-events-none' : 'vgt-table'
171
- "
169
+ styleClass="vgt-table"
172
170
  :row-style-class="rowStyleClassFn"
173
171
  min-height="400px"
174
172
  :globalSearch="true"
175
- :isLoading="showLoader"
176
173
  :totalRows="totalRecords"
177
174
  :columns="cols"
178
175
  :rows="rows"
@@ -235,6 +232,19 @@
235
232
  {{ props.column.label }}
236
233
  </span>
237
234
  </template>
235
+ <div slot="emptystate">
236
+ <vue-skeleton-loader
237
+ v-for="(item, index) in 10"
238
+ :key="index"
239
+ type="table-tbody: table-row-divider@6"
240
+ animation="fade"
241
+ :width="1220"
242
+ :rounded="true"
243
+ :radius="6"
244
+ class="skeleton mt-2"
245
+ :height="50"
246
+ ></vue-skeleton-loader>
247
+ </div>
238
248
  <template slot="table-row" slot-scope="props">
239
249
  <!-- renders if drag and drop is present in table -->
240
250
  <span v-if="props.column.field == 'drag'">
@@ -264,30 +274,6 @@
264
274
  @setNextPage="setNextPageRecords"
265
275
  ></c-pagination>
266
276
  </template>
267
- <!-- Custom loader for table -->
268
- <template slot="loadingContent">
269
- <svg
270
- class="ml-auto mr-auto h-7 w-7 animate-spin text-white"
271
- xmlns="http://www.w3.org/2000/svg"
272
- fill="none"
273
- viewBox="0 0 24 24"
274
- >
275
- <circle
276
- class="opacity-25"
277
- cx="12"
278
- cy="12"
279
- r="10"
280
- stroke="currentColor"
281
- stroke-width="4"
282
- ></circle>
283
- <path
284
- class="opacity-75"
285
- fill="currentColor"
286
- d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
287
- ></path>
288
- </svg>
289
- </template>
290
- <!-- <div slot="emptystate"></div> -->
291
277
  </vue-good-table>
292
278
  </div>
293
279
  </template>
@@ -302,6 +288,7 @@ import { VueGoodTable } from "vue-good-table";
302
288
  import Sortable from "@shopify/draggable/lib/es5/sortable.js";
303
289
  import CInput from "../CInput/CInput.vue";
304
290
  import { debounce, isEqual } from "lodash-es";
291
+ import VueSkeletonLoader from "skeleton-loader-vue";
305
292
 
306
293
  export default {
307
294
  name: "CTable",
@@ -312,6 +299,7 @@ export default {
312
299
  CPagination,
313
300
  CButtonIcon,
314
301
  CInput,
302
+ VueSkeletonLoader,
315
303
  },
316
304
  props: {
317
305
  // To show or hide pagination section
@@ -338,10 +326,6 @@ export default {
338
326
  type: Boolean,
339
327
  default: true,
340
328
  },
341
- // To show and hide loader on table
342
- isLoading: {
343
- type: Boolean,
344
- },
345
329
  // All the buttons displayed on top right side of table
346
330
  tableActions: {
347
331
  type: Boolean,
@@ -449,11 +433,14 @@ export default {
449
433
  return {
450
434
  toggleDropdown: false,
451
435
  toggleDownloadDropdown: false,
452
- showLoader: this.isLoading,
453
436
  searchTerm: this.searchQuery ? this.searchQuery : "",
454
437
  paginationRecords: this.paginationData,
455
438
  reorderedArray: [...this.rows],
456
439
  controlClick: false,
440
+ attrs: {
441
+ boilerplate: true,
442
+ elevation: 2,
443
+ },
457
444
  };
458
445
  },
459
446
  methods: {
@@ -544,9 +531,6 @@ export default {
544
531
  },
545
532
  },
546
533
  watch: {
547
- isLoading() {
548
- this.showLoader = this.isLoading;
549
- },
550
534
  paginationData(newValue, oldValue) {
551
535
  if (!isEqual(newValue, oldValue)) {
552
536
  this.paginationRecords = newValue;
@@ -22,7 +22,8 @@ export default {
22
22
  const Template = (args, { argTypes }) => ({
23
23
  props: Object.keys(argTypes),
24
24
  components: { CTable },
25
- template: '<c-table @hideCols="hideCols" @showCheckbox="showCheckbox" @reordered="handleReorder" v-bind="$props" />',
25
+ template:
26
+ '<c-table @hideCols="hideCols" @showCheckbox="showCheckbox" @reordered="handleReorder" v-bind="$props" />',
26
27
  });
27
28
 
28
29
  export const Default = Template.bind({});
@@ -35,8 +36,8 @@ Default.args = {
35
36
  field: "menuOptions",
36
37
  hidden: false,
37
38
  customizeColumn: true,
38
- width: "60px"
39
- }
39
+ width: "60px",
40
+ },
40
41
  ],
41
42
  showHideColumnList: [
42
43
  { label: "", field: "drag", hidden: false },
@@ -45,9 +46,100 @@ Default.args = {
45
46
  field: "mode",
46
47
  hidden: false,
47
48
  sortable: true,
48
- }
49
+ },
50
+ ],
51
+ rows: [
52
+ {
53
+ id: 5,
54
+ mode: "ATM Machine 1",
55
+ sort_order: 2,
56
+ status: 1,
57
+ rcInstitutionID: 82,
58
+ created_at: "2020-09-02T12:53:09.000000Z",
59
+ updated_at: "2021-11-25T13:13:56.000000Z",
60
+ },
61
+ {
62
+ id: 11,
63
+ mode: "QA 1",
64
+ sort_order: 3,
65
+ status: 1,
66
+ rcInstitutionID: 82,
67
+ created_at: "2020-09-04T09:57:47.000000Z",
68
+ updated_at: "2021-11-25T13:13:56.000000Z",
69
+ },
70
+ {
71
+ id: 7,
72
+ mode: "ATM Machine 2",
73
+ sort_order: 4,
74
+ status: 1,
75
+ rcInstitutionID: 82,
76
+ created_at: "2020-09-04T09:45:47.000000Z",
77
+ updated_at: "2021-11-25T13:13:56.000000Z",
78
+ },
79
+ {
80
+ id: 18,
81
+ mode: "QA 3",
82
+ sort_order: 8,
83
+ status: 1,
84
+ rcInstitutionID: 82,
85
+ created_at: "2020-09-04T10:05:15.000000Z",
86
+ updated_at: "2021-11-25T13:13:56.000000Z",
87
+ },
88
+ {
89
+ id: 12,
90
+ mode: "QA 2",
91
+ sort_order: 21,
92
+ status: 1,
93
+ rcInstitutionID: 82,
94
+ created_at: "2020-09-04T09:57:55.000000Z",
95
+ updated_at: "2021-11-25T13:13:56.000000Z",
96
+ },
97
+ {
98
+ id: 15,
99
+ mode: "QA 4",
100
+ sort_order: 22,
101
+ status: 1,
102
+ rcInstitutionID: 82,
103
+ created_at: "2020-09-04T10:00:23.000000Z",
104
+ updated_at: "2021-11-25T13:13:56.000000Z",
105
+ },
106
+ {
107
+ id: 162,
108
+ mode: "Yes bank",
109
+ sort_order: 62,
110
+ status: 1,
111
+ rcInstitutionID: 82,
112
+ created_at: "2020-11-18T09:22:43.000000Z",
113
+ updated_at: "2021-11-25T13:13:56.000000Z",
114
+ },
115
+ {
116
+ id: 163,
117
+ mode: "SBI bank",
118
+ sort_order: 63,
119
+ status: 1,
120
+ rcInstitutionID: 82,
121
+ created_at: "2020-11-18T09:33:17.000000Z",
122
+ updated_at: "2021-11-25T13:13:56.000000Z",
123
+ },
124
+ {
125
+ id: 164,
126
+ mode: "BOB bank",
127
+ sort_order: 64,
128
+ status: 1,
129
+ rcInstitutionID: 82,
130
+ created_at: "2020-11-18T09:35:12.000000Z",
131
+ updated_at: "2021-11-25T13:13:56.000000Z",
132
+ },
133
+ {
134
+ id: 165,
135
+ mode: "PNB bank",
136
+ sort_order: 65,
137
+ status: 1,
138
+ rcInstitutionID: 82,
139
+ created_at: "2020-11-18T09:55:16.000000Z",
140
+ updated_at: "2021-11-25T13:13:56.000000Z",
141
+ },
49
142
  ],
50
- rows: [{"id":5,"mode":"ATM Machine 1","sort_order":2,"status":1,"rcInstitutionID":82,"created_at":"2020-09-02T12:53:09.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":11,"mode":"QA 1","sort_order":3,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":7,"mode":"ATM Machine 2","sort_order":4,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:45:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":18,"mode":"QA 3","sort_order":8,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:05:15.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":12,"mode":"QA 2","sort_order":21,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:55.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":15,"mode":"QA 4","sort_order":22,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:00:23.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":162,"mode":"Yes bank","sort_order":62,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:22:43.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":163,"mode":"SBI bank","sort_order":63,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:33:17.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":164,"mode":"BOB bank","sort_order":64,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:35:12.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":165,"mode":"PNB bank","sort_order":65,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:55:16.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"}],
51
143
  pagination: true,
52
144
  sorting: false,
53
145
  searching: true,
@@ -70,8 +162,8 @@ Default.args = {
70
162
  },
71
163
  handleReorder(val) {
72
164
  Default.args.rows = val;
73
- val.forEach((item, index) => {
165
+ val.forEach((item) => {
74
166
  console.log(item);
75
167
  });
76
- }
168
+ },
77
169
  };