vue-laravel-crud 2.0.4 → 2.0.6

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.
@@ -1,4 +1,5 @@
1
1
  <script>
2
+ import Vue from 'vue';
2
3
  import CrudHeader from "./components/CrudHeader.vue";
3
4
  import CrudTable from "./components/CrudTable.vue";
4
5
  import CrudCards from "./components/CrudCards.vue";
@@ -45,6 +46,7 @@ export default /*#__PURE__*/ {
45
46
  vuexLocalforage: this.vuexLocalforage,
46
47
  columns: this.columns,
47
48
  filter: this.filter,
49
+ customFilters: this.customFilters,
48
50
  enableFilters: this.enableFilters,
49
51
  infiniteScroll: this.infiniteScroll,
50
52
  sortable: this.sortable,
@@ -65,7 +67,7 @@ export default /*#__PURE__*/ {
65
67
  showHeader: this.showHeader,
66
68
  showTitle: this.showTitle,
67
69
  limit: this.limit,
68
- displayMode: this.displayMode,
70
+ displayMode: this.displayModeReactive,
69
71
  displayModeToggler: this.displayModeToggler,
70
72
  colXs: this.colXs,
71
73
  colSm: this.colSm,
@@ -114,6 +116,8 @@ export default /*#__PURE__*/ {
114
116
  moment: this.moment,
115
117
  loading: this.loading,
116
118
  firstLoad: this.firstLoad,
119
+ // Proporcionar item como función getter para reactividad
120
+ getItem: () => this.item,
117
121
  item: this.item,
118
122
  items: this.items,
119
123
  selectedItems: this.selectedItems,
@@ -180,12 +184,15 @@ export default /*#__PURE__*/ {
180
184
  toggleFilters: this.toggleFilters,
181
185
  resetFilters: this.resetFilters,
182
186
  isColumnHasFilter: this.isColumnHasFilter,
187
+ isCustomFilterEnabled: this.isCustomFilterEnabled,
183
188
  setFilter: this.setFilter,
184
189
  onChangeFilter: this.onChangeFilter,
185
190
  togglePrincipalSort: this.togglePrincipalSort,
186
191
  loadOptions: this.loadOptions,
187
192
  getArrayValue: this.getArrayValue,
188
193
  getStateValue: this.getStateValue,
194
+ getStateOptions: this.getStateOptions,
195
+ getStateBadgeVariant: this.getStateBadgeVariant,
189
196
  onRowHover: this.onRowHover,
190
197
  onRowClick: this.onRowClick,
191
198
  onSort: this.onSort,
@@ -254,6 +261,10 @@ export default /*#__PURE__*/ {
254
261
  type: Array,
255
262
  default: () => [],
256
263
  },
264
+ customFilters: {
265
+ type: Array,
266
+ default: () => [],
267
+ },
257
268
  enableFilters: {
258
269
  type: Boolean,
259
270
  default: false,
@@ -530,9 +541,21 @@ export default /*#__PURE__*/ {
530
541
  <div class="crud">
531
542
  <CrudHeader />
532
543
 
533
- <CrudTable />
534
- <CrudCards />
535
- <CrudKanban />
544
+ <CrudTable>
545
+ <template v-for="(slot, name) in $scopedSlots" v-slot:[name]="slotProps">
546
+ <slot :name="name" v-bind="slotProps" />
547
+ </template>
548
+ </CrudTable>
549
+ <CrudCards>
550
+ <template v-for="(slot, name) in $scopedSlots" v-slot:[name]="slotProps">
551
+ <slot :name="name" v-bind="slotProps" />
552
+ </template>
553
+ </CrudCards>
554
+ <CrudKanban>
555
+ <template v-for="(slot, name) in $scopedSlots" v-slot:[name]="slotProps">
556
+ <slot :name="name" v-bind="slotProps" />
557
+ </template>
558
+ </CrudKanban>
536
559
  <CrudCustom />
537
560
 
538
561
  <b-overlay :show="loading" rounded="sm"></b-overlay>