classcard-ui 0.2.799 → 0.2.800

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.800",
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",
@@ -235,6 +235,19 @@
235
235
  {{ props.column.label }}
236
236
  </span>
237
237
  </template>
238
+ <div slot="emptystate">
239
+ <vue-skeleton-loader
240
+ v-for="(item, index) in 10"
241
+ :key="index"
242
+ type="table-tbody: table-row-divider@6"
243
+ animation="fade"
244
+ :width="1220"
245
+ :rounded="true"
246
+ :radius="6"
247
+ class="skeleton mt-2"
248
+ :height="50"
249
+ ></vue-skeleton-loader>
250
+ </div>
238
251
  <template slot="table-row" slot-scope="props">
239
252
  <!-- renders if drag and drop is present in table -->
240
253
  <span v-if="props.column.field == 'drag'">
@@ -302,6 +315,7 @@ import { VueGoodTable } from "vue-good-table";
302
315
  import Sortable from "@shopify/draggable/lib/es5/sortable.js";
303
316
  import CInput from "../CInput/CInput.vue";
304
317
  import { debounce, isEqual } from "lodash-es";
318
+ import VueSkeletonLoader from "skeleton-loader-vue";
305
319
 
306
320
  export default {
307
321
  name: "CTable",
@@ -312,6 +326,7 @@ export default {
312
326
  CPagination,
313
327
  CButtonIcon,
314
328
  CInput,
329
+ VueSkeletonLoader,
315
330
  },
316
331
  props: {
317
332
  // To show or hide pagination section
@@ -454,6 +469,10 @@ export default {
454
469
  paginationRecords: this.paginationData,
455
470
  reorderedArray: [...this.rows],
456
471
  controlClick: false,
472
+ attrs: {
473
+ boilerplate: true,
474
+ elevation: 2,
475
+ },
457
476
  };
458
477
  },
459
478
  methods: {
@@ -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
  };