@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.js CHANGED
@@ -9568,7 +9568,7 @@ const CSmartPagination = vue.defineComponent({
9568
9568
  props.doubleArrows &&
9569
9569
  vue.h(CPaginationItem, {
9570
9570
  onClick: () => {
9571
- setPage(1);
9571
+ activePage.value !== 1 && setPage(1);
9572
9572
  },
9573
9573
  'aria-label': 'Go to first page',
9574
9574
  ...(activePage.value === 1 && {
@@ -9585,7 +9585,7 @@ const CSmartPagination = vue.defineComponent({
9585
9585
  props.arrows &&
9586
9586
  vue.h(CPaginationItem, {
9587
9587
  onClick: () => {
9588
- setPage(activePage.value - 1);
9588
+ activePage.value !== 1 && setPage(activePage.value - 1);
9589
9589
  },
9590
9590
  'aria-label': 'Go to previous page',
9591
9591
  ...(activePage.value === 1 && {
@@ -9625,7 +9625,7 @@ const CSmartPagination = vue.defineComponent({
9625
9625
  props.arrows &&
9626
9626
  vue.h(CPaginationItem, {
9627
9627
  onClick: () => {
9628
- setPage(activePage.value + 1);
9628
+ activePage.value !== pages.value && setPage(activePage.value + 1);
9629
9629
  },
9630
9630
  'aria-label': 'Go to next page',
9631
9631
  ...(activePage.value === pages.value && {
@@ -9642,7 +9642,7 @@ const CSmartPagination = vue.defineComponent({
9642
9642
  props.doubleArrows &&
9643
9643
  vue.h(CPaginationItem, {
9644
9644
  onClick: () => {
9645
- setPage(pages.value);
9645
+ activePage.value !== pages.value && setPage(pages.value);
9646
9646
  },
9647
9647
  'aria-label': 'Go to last page',
9648
9648
  ...(activePage.value === pages.value && {
@@ -11186,8 +11186,6 @@ const CSmartTable = vue.defineComponent({
11186
11186
  props: {
11187
11187
  /**
11188
11188
  * Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
11189
- *
11190
- * @default 1
11191
11189
  */
11192
11190
  activePage: {
11193
11191
  type: Number,
@@ -11196,7 +11194,7 @@ const CSmartTable = vue.defineComponent({
11196
11194
  },
11197
11195
  /**
11198
11196
  * When set, displays table cleaner above table, next to the table filter (or in place of table filter if `tableFilter` prop is not set)
11199
- * 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.
11197
+ * 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.
11200
11198
  *
11201
11199
  */
11202
11200
  cleaner: {
@@ -11205,8 +11203,6 @@ const CSmartTable = vue.defineComponent({
11205
11203
  },
11206
11204
  /**
11207
11205
  * Style table items as clickable.
11208
- *
11209
- * @type boolean
11210
11206
  */
11211
11207
  clickableRows: {
11212
11208
  type: Boolean,
@@ -11217,8 +11213,6 @@ const CSmartTable = vue.defineComponent({
11217
11213
  * Column filter can be customized, by passing prop as object with additional options as keys. Available options:
11218
11214
  * - external (Boolean) - Disables automatic filtering inside component.
11219
11215
  * - lazy (Boolean) - Set to true to trigger filter updates only on change event.
11220
- *
11221
- * @type boolean | ColumnFilter
11222
11216
  */
11223
11217
  columnFilter: {
11224
11218
  type: [Boolean, Object],
@@ -11227,7 +11221,6 @@ const CSmartTable = vue.defineComponent({
11227
11221
  /**
11228
11222
  * Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
11229
11223
  * { user: 'John', age: 12 }
11230
- * You can track state of this prop by setting .sync modifier.
11231
11224
  */
11232
11225
  columnFilterValue: {
11233
11226
  type: Object,
@@ -11235,17 +11228,17 @@ const CSmartTable = vue.defineComponent({
11235
11228
  required: false,
11236
11229
  },
11237
11230
  /**
11238
- * 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')
11231
+ * 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')
11239
11232
  *
11240
11233
  * In columns prop each array item represents one column. Item might be specified in two ways:
11241
11234
  * String: each item define column name equal to item value.
11242
11235
  * Object: item is object with following keys available as column configuration:
11243
11236
  * - key (required)(String) - define column name equal to item key.
11237
+ * - filter (Boolean) - removes filter from column when set to false.
11244
11238
  * - 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.
11245
- * - _classes (String/Array/Object) - adds classes to all cels in column
11246
- * - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
11247
11239
  * - sorter (Boolean) - disables sorting of the column when set to false
11248
- * - filter (Boolean) - removes filter from column when set to false.
11240
+ * - [_props](https://coreui.io/vue/docs/components/table.html#ctableheadercell) (String/Array/Object) - add props to `CTableHeaderCell`.
11241
+ * - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
11249
11242
  */
11250
11243
  columns: {
11251
11244
  type: Array,
@@ -11257,8 +11250,6 @@ const CSmartTable = vue.defineComponent({
11257
11250
  * Sorter can be customized, by passing prop as object with additional options as keys. Available options:
11258
11251
  * - external (Boolean) - Disables automatic sorting inside component.
11259
11252
  * - 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.
11260
- *
11261
- * @type boolean | Sorter
11262
11253
  */
11263
11254
  columnSorter: {
11264
11255
  type: [Boolean, Object],
@@ -11274,8 +11265,6 @@ const CSmartTable = vue.defineComponent({
11274
11265
  },
11275
11266
  /**
11276
11267
  * Set to false to remove table header.
11277
- *
11278
- * @default true
11279
11268
  */
11280
11269
  header: {
11281
11270
  type: Boolean,
@@ -11283,7 +11272,11 @@ const CSmartTable = vue.defineComponent({
11283
11272
  default: true,
11284
11273
  },
11285
11274
  /**
11286
- * 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'.
11275
+ * 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).
11276
+ *
11277
+ * Examples:
11278
+ * - `_props: { color: 'primary', align: 'middle'}`
11279
+ * - `_cellProps: { all: { class: 'fw-semibold'}, 'name': { color: 'info' }}`
11287
11280
  */
11288
11281
  items: {
11289
11282
  type: Array,
@@ -11292,8 +11285,6 @@ const CSmartTable = vue.defineComponent({
11292
11285
  },
11293
11286
  /**
11294
11287
  * Number of items per site, when pagination is enabled.
11295
- *
11296
- * @default 10
11297
11288
  */
11298
11289
  itemsPerPage: {
11299
11290
  type: Number,
@@ -11301,8 +11292,6 @@ const CSmartTable = vue.defineComponent({
11301
11292
  },
11302
11293
  /**
11303
11294
  * Label for items per page selector.
11304
- *
11305
- * @default 'Items per page:'
11306
11295
  */
11307
11296
  itemsPerPageLabel: {
11308
11297
  type: String,
@@ -11311,8 +11300,6 @@ const CSmartTable = vue.defineComponent({
11311
11300
  },
11312
11301
  /**
11313
11302
  * Items per page selector options.
11314
- *
11315
- * @default [5, 10, 20, 50]
11316
11303
  */
11317
11304
  itemsPerPageOptions: {
11318
11305
  type: Array,
@@ -11339,7 +11326,6 @@ const CSmartTable = vue.defineComponent({
11339
11326
  },
11340
11327
  /**
11341
11328
  * ReactNode or string for passing custom noItemsLabel texts.
11342
- * @default 'No items found'
11343
11329
  */
11344
11330
  noItemsLabel: {
11345
11331
  type: String,
@@ -11354,9 +11340,7 @@ const CSmartTable = vue.defineComponent({
11354
11340
  required: false,
11355
11341
  },
11356
11342
  /**
11357
- * Properties to `CSmartPagination` component.
11358
- *
11359
- * @link https://coreui.io/vue/docs/4.0/components/smart-pagination#csmartpagination
11343
+ * Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
11360
11344
  */
11361
11345
  paginationProps: {
11362
11346
  type: Object,
@@ -11368,10 +11352,8 @@ const CSmartTable = vue.defineComponent({
11368
11352
  */
11369
11353
  selectable: Boolean,
11370
11354
  /**
11371
- * State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
11355
+ * State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
11372
11356
  * { column: 'status', state: 'asc' }
11373
- *
11374
- * @type SorterValue
11375
11357
  */
11376
11358
  sorterValue: {
11377
11359
  type: Object,
@@ -11379,9 +11361,7 @@ const CSmartTable = vue.defineComponent({
11379
11361
  required: false,
11380
11362
  },
11381
11363
  /**
11382
- * Properties to `CTableBody` component.
11383
- *
11384
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablebody
11364
+ * Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
11385
11365
  */
11386
11366
  tableBodyProps: {
11387
11367
  type: Object,
@@ -11389,9 +11369,7 @@ const CSmartTable = vue.defineComponent({
11389
11369
  required: false,
11390
11370
  },
11391
11371
  /**
11392
- * Properties to `CTableFoot` component.
11393
- *
11394
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablefoot
11372
+ * Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
11395
11373
  */
11396
11374
  tableFootProps: {
11397
11375
  type: Object,
@@ -11402,8 +11380,6 @@ const CSmartTable = vue.defineComponent({
11402
11380
  * When set, displays table filter above table, allowing filtering by specific column.
11403
11381
  *
11404
11382
  * Column filter can be customized, by passing prop as object with additional options as keys. Available options:
11405
- * - placeholder (String) - Sets custom table filter placeholder.
11406
- * - label (String) - Sets custom table filter label.
11407
11383
  * - external (Boolean) - Disables automatic filtering inside component.
11408
11384
  * - lazy (Boolean) - Set to true to trigger filter updates only on change event.
11409
11385
  */
@@ -11421,8 +11397,6 @@ const CSmartTable = vue.defineComponent({
11421
11397
  },
11422
11398
  /**
11423
11399
  * Specifies a short hint that is visible in the search input.
11424
- *
11425
- * @default 'type string...'
11426
11400
  */
11427
11401
  tableFilterPlaceholder: {
11428
11402
  type: String,
@@ -11430,9 +11404,7 @@ const CSmartTable = vue.defineComponent({
11430
11404
  required: false,
11431
11405
  },
11432
11406
  /**
11433
- * Value of table filter. Set .sync modifier to track changes.
11434
- *
11435
- * @default 'Filter:'
11407
+ * Value of table filter.
11436
11408
  */
11437
11409
  tableFilterValue: {
11438
11410
  type: String,
@@ -11440,9 +11412,7 @@ const CSmartTable = vue.defineComponent({
11440
11412
  required: false,
11441
11413
  },
11442
11414
  /**
11443
- * Properties to `CTableHead` component.
11444
- *
11445
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctablehead
11415
+ * Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
11446
11416
  */
11447
11417
  tableHeadProps: {
11448
11418
  type: Object,
@@ -11450,9 +11420,7 @@ const CSmartTable = vue.defineComponent({
11450
11420
  required: false,
11451
11421
  },
11452
11422
  /**
11453
- * Properties to `CTable` component.
11454
- *
11455
- * @link https://coreui.io/vue/docs/4.0/components/table/#ctable
11423
+ * Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
11456
11424
  */
11457
11425
  tableProps: {
11458
11426
  type: Object,