@coreui/vue-pro 4.3.0-beta.0 → 4.3.0-beta.1

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/dist/index.es.js CHANGED
@@ -9564,7 +9564,7 @@ const CSmartPagination = defineComponent({
9564
9564
  props.doubleArrows &&
9565
9565
  h$1(CPaginationItem, {
9566
9566
  onClick: () => {
9567
- setPage(1);
9567
+ activePage.value !== 1 && setPage(1);
9568
9568
  },
9569
9569
  'aria-label': 'Go to first page',
9570
9570
  ...(activePage.value === 1 && {
@@ -9581,7 +9581,7 @@ const CSmartPagination = defineComponent({
9581
9581
  props.arrows &&
9582
9582
  h$1(CPaginationItem, {
9583
9583
  onClick: () => {
9584
- setPage(activePage.value - 1);
9584
+ activePage.value !== 1 && setPage(activePage.value - 1);
9585
9585
  },
9586
9586
  'aria-label': 'Go to previous page',
9587
9587
  ...(activePage.value === 1 && {
@@ -9621,7 +9621,7 @@ const CSmartPagination = defineComponent({
9621
9621
  props.arrows &&
9622
9622
  h$1(CPaginationItem, {
9623
9623
  onClick: () => {
9624
- setPage(activePage.value + 1);
9624
+ activePage.value !== pages.value && setPage(activePage.value + 1);
9625
9625
  },
9626
9626
  'aria-label': 'Go to next page',
9627
9627
  ...(activePage.value === pages.value && {
@@ -9638,7 +9638,7 @@ const CSmartPagination = defineComponent({
9638
9638
  props.doubleArrows &&
9639
9639
  h$1(CPaginationItem, {
9640
9640
  onClick: () => {
9641
- setPage(pages.value);
9641
+ activePage.value !== pages.value && setPage(pages.value);
9642
9642
  },
9643
9643
  'aria-label': 'Go to last page',
9644
9644
  ...(activePage.value === pages.value && {
@@ -11182,8 +11182,6 @@ const CSmartTable = defineComponent({
11182
11182
  props: {
11183
11183
  /**
11184
11184
  * Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
11185
- *
11186
- * @default 1
11187
11185
  */
11188
11186
  activePage: {
11189
11187
  type: Number,
@@ -11192,7 +11190,7 @@ const CSmartTable = defineComponent({
11192
11190
  },
11193
11191
  /**
11194
11192
  * When set, displays table cleaner above table, next to the table filter (or in place of table filter if `tableFilter` prop is not set)
11195
- * Cleaner resets `tableFilterValue`, `columnFilterValue`, `sorterValue`. If clean is possible it is clickable (`tabIndex="0"` `role="button"`, `color="danger"`), otherwise it is not clickable and transparent. Cleaner can be customized through the `cleaner` slot.
11193
+ * Cleaner resets `tableFilterValue`, `columnFilterValue`, `sorterValue`. If clean is possible it is clickable (`tabIndex="0"` `role="button"`, `color="danger"`), otherwise it is not clickable and transparent. Cleaner can be customized through the `cleanerIcon` slot.
11196
11194
  *
11197
11195
  */
11198
11196
  cleaner: {
@@ -11201,8 +11199,6 @@ const CSmartTable = defineComponent({
11201
11199
  },
11202
11200
  /**
11203
11201
  * Style table items as clickable.
11204
- *
11205
- * @type boolean
11206
11202
  */
11207
11203
  clickableRows: {
11208
11204
  type: Boolean,
@@ -11213,8 +11209,6 @@ const CSmartTable = defineComponent({
11213
11209
  * Column filter can be customized, by passing prop as object with additional options as keys. Available options:
11214
11210
  * - external (Boolean) - Disables automatic filtering inside component.
11215
11211
  * - lazy (Boolean) - Set to true to trigger filter updates only on change event.
11216
- *
11217
- * @type boolean | ColumnFilter
11218
11212
  */
11219
11213
  columnFilter: {
11220
11214
  type: [Boolean, Object],
@@ -11223,7 +11217,6 @@ const CSmartTable = defineComponent({
11223
11217
  /**
11224
11218
  * Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
11225
11219
  * { user: 'John', age: 12 }
11226
- * You can track state of this prop by setting .sync modifier.
11227
11220
  */
11228
11221
  columnFilterValue: {
11229
11222
  type: Object,
@@ -11231,17 +11224,17 @@ const CSmartTable = defineComponent({
11231
11224
  required: false,
11232
11225
  },
11233
11226
  /**
11234
- * Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_classes')
11227
+ * Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')
11235
11228
  *
11236
11229
  * In columns prop each array item represents one column. Item might be specified in two ways:
11237
11230
  * String: each item define column name equal to item value.
11238
11231
  * Object: item is object with following keys available as column configuration:
11239
11232
  * - key (required)(String) - define column name equal to item key.
11233
+ * - filter (Boolean) - removes filter from column when set to false.
11240
11234
  * - label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
11241
- * - _classes (String/Array/Object) - adds classes to all cels in column
11242
- * - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
11243
11235
  * - sorter (Boolean) - disables sorting of the column when set to false
11244
- * - filter (Boolean) - removes filter from column when set to false.
11236
+ * - [_props](https://coreui.io/vue/docs/components/table.html#ctableheadercell) (String/Array/Object) - add props to `CTableHeaderCell`.
11237
+ * - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
11245
11238
  */
11246
11239
  columns: {
11247
11240
  type: Array,
@@ -11253,8 +11246,6 @@ const CSmartTable = defineComponent({
11253
11246
  * Sorter can be customized, by passing prop as object with additional options as keys. Available options:
11254
11247
  * - external (Boolean) - Disables automatic sorting inside component.
11255
11248
  * - resetable (Boolean) - If set to true clicking on sorter have three states: ascending, descending and null. That means that third click on sorter will reset sorting, and restore table to original order.
11256
- *
11257
- * @type boolean | Sorter
11258
11249
  */
11259
11250
  columnSorter: {
11260
11251
  type: [Boolean, Object],
@@ -11270,8 +11261,6 @@ const CSmartTable = defineComponent({
11270
11261
  },
11271
11262
  /**
11272
11263
  * Set to false to remove table header.
11273
- *
11274
- * @default true
11275
11264
  */
11276
11265
  header: {
11277
11266
  type: Boolean,
@@ -11279,7 +11268,11 @@ const CSmartTable = defineComponent({
11279
11268
  default: true,
11280
11269
  },
11281
11270
  /**
11282
- * Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_classes' key and to single cell by '_cellClasses'.
11271
+ * Array of objects, where each object represents one item - row in table. Additionally, you can customize each row by passing them by [_props](http://coreui.io/vue/docs/components/table.html#ctablerow) key and single cell by [_cellProps](http://coreui.io/vue/docs/components/table.html#ctabledatacell).
11272
+ *
11273
+ * Examples:
11274
+ * - `_props: { color: 'primary', align: 'middle'}`
11275
+ * - `_cellProps: { all: { class: 'fw-semibold'}, 'name': { color: 'info' }}`
11283
11276
  */
11284
11277
  items: {
11285
11278
  type: Array,
@@ -11288,8 +11281,6 @@ const CSmartTable = defineComponent({
11288
11281
  },
11289
11282
  /**
11290
11283
  * Number of items per site, when pagination is enabled.
11291
- *
11292
- * @default 10
11293
11284
  */
11294
11285
  itemsPerPage: {
11295
11286
  type: Number,
@@ -11297,8 +11288,6 @@ const CSmartTable = defineComponent({
11297
11288
  },
11298
11289
  /**
11299
11290
  * Label for items per page selector.
11300
- *
11301
- * @default 'Items per page:'
11302
11291
  */
11303
11292
  itemsPerPageLabel: {
11304
11293
  type: String,
@@ -11307,8 +11296,6 @@ const CSmartTable = defineComponent({
11307
11296
  },
11308
11297
  /**
11309
11298
  * Items per page selector options.
11310
- *
11311
- * @default [5, 10, 20, 50]
11312
11299
  */
11313
11300
  itemsPerPageOptions: {
11314
11301
  type: Array,
@@ -11335,7 +11322,6 @@ const CSmartTable = defineComponent({
11335
11322
  },
11336
11323
  /**
11337
11324
  * ReactNode or string for passing custom noItemsLabel texts.
11338
- * @default 'No items found'
11339
11325
  */
11340
11326
  noItemsLabel: {
11341
11327
  type: String,
@@ -11350,9 +11336,7 @@ const CSmartTable = defineComponent({
11350
11336
  required: false,
11351
11337
  },
11352
11338
  /**
11353
- * Properties to `CSmartPagination` component.
11354
- *
11355
- * @link https://coreui.io/vue/docs/4.0/components/smart-pagination#csmartpagination
11339
+ * Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
11356
11340
  */
11357
11341
  paginationProps: {
11358
11342
  type: Object,
@@ -11364,10 +11348,8 @@ const CSmartTable = defineComponent({
11364
11348
  */
11365
11349
  selectable: Boolean,
11366
11350
  /**
11367
- * State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
11351
+ * State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
11368
11352
  * { column: 'status', state: 'asc' }
11369
- *
11370
- * @type SorterValue
11371
11353
  */
11372
11354
  sorterValue: {
11373
11355
  type: Object,
@@ -11375,9 +11357,7 @@ const CSmartTable = defineComponent({
11375
11357
  required: false,
11376
11358
  },
11377
11359
  /**
11378
- * Properties to `CTableBody` component.
11379
- *
11380
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablebody
11360
+ * Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
11381
11361
  */
11382
11362
  tableBodyProps: {
11383
11363
  type: Object,
@@ -11385,9 +11365,7 @@ const CSmartTable = defineComponent({
11385
11365
  required: false,
11386
11366
  },
11387
11367
  /**
11388
- * Properties to `CTableFoot` component.
11389
- *
11390
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablefoot
11368
+ * Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
11391
11369
  */
11392
11370
  tableFootProps: {
11393
11371
  type: Object,
@@ -11398,8 +11376,6 @@ const CSmartTable = defineComponent({
11398
11376
  * When set, displays table filter above table, allowing filtering by specific column.
11399
11377
  *
11400
11378
  * Column filter can be customized, by passing prop as object with additional options as keys. Available options:
11401
- * - placeholder (String) - Sets custom table filter placeholder.
11402
- * - label (String) - Sets custom table filter label.
11403
11379
  * - external (Boolean) - Disables automatic filtering inside component.
11404
11380
  * - lazy (Boolean) - Set to true to trigger filter updates only on change event.
11405
11381
  */
@@ -11417,8 +11393,6 @@ const CSmartTable = defineComponent({
11417
11393
  },
11418
11394
  /**
11419
11395
  * Specifies a short hint that is visible in the search input.
11420
- *
11421
- * @default 'type string...'
11422
11396
  */
11423
11397
  tableFilterPlaceholder: {
11424
11398
  type: String,
@@ -11426,9 +11400,7 @@ const CSmartTable = defineComponent({
11426
11400
  required: false,
11427
11401
  },
11428
11402
  /**
11429
- * Value of table filter. Set .sync modifier to track changes.
11430
- *
11431
- * @default 'Filter:'
11403
+ * Value of table filter.
11432
11404
  */
11433
11405
  tableFilterValue: {
11434
11406
  type: String,
@@ -11436,9 +11408,7 @@ const CSmartTable = defineComponent({
11436
11408
  required: false,
11437
11409
  },
11438
11410
  /**
11439
- * Properties to `CTableHead` component.
11440
- *
11441
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablehead
11411
+ * Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
11442
11412
  */
11443
11413
  tableHeadProps: {
11444
11414
  type: Object,
@@ -11446,9 +11416,7 @@ const CSmartTable = defineComponent({
11446
11416
  required: false,
11447
11417
  },
11448
11418
  /**
11449
- * Properties to `CTable` component.
11450
- *
11451
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctable
11419
+ * Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
11452
11420
  */
11453
11421
  tableProps: {
11454
11422
  type: Object,