@fkui/vue-labs 6.39.0 → 6.41.0

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.
@@ -5,6 +5,7 @@ import { ComponentProvideOptions } from 'vue';
5
5
  import { DefineComponent } from 'vue';
6
6
  import { ExtractPropTypes } from 'vue';
7
7
  import { FormatFunction } from '@fkui/vue';
8
+ import { HTMLAttributes } from 'vue';
8
9
  import { IPopupErrorData } from '@fkui/vue';
9
10
  import { MaybeRef } from 'vue';
10
11
  import { ParseFunction } from '@fkui/vue';
@@ -27,6 +28,10 @@ declare const __VLS_export: <T, KeyAttribute extends keyof T = keyof T, Expandab
27
28
  rows: T[];
28
29
  keyAttribute?: KeyAttribute;
29
30
  expandableAttribute?: ExpandableAttribute;
31
+ /**
32
+ * Optional callback for setting classes on table rows (`<tr>` element).
33
+ */
34
+ rowClass?: (row: T) => HTMLAttributes["class"];
30
35
  striped?: boolean;
31
36
  disableDividers?: boolean;
32
37
  selectable?: "single" | "multi";
@@ -602,7 +607,7 @@ declare type __VLS_WithSlots<T, S> = T & {
602
607
  /**
603
608
  * @public
604
609
  */
605
- export declare const baseTypes: readonly ["anchor", "button", "checkbox", "radio", "render", "rowheader", "select"];
610
+ export declare const baseTypes: readonly ["anchor", "button", "checkbox", "render", "rowheader", "select"];
606
611
 
607
612
  /**
608
613
  * @public
@@ -651,6 +656,15 @@ export declare interface FTableCellApi {
651
656
  tabstopEl: Readonly<ShallowRef<HTMLElement | null>>;
652
657
  }
653
658
 
659
+ /**
660
+ * Get sortable attributes for use with `FSortFilterDataset`.
661
+ *
662
+ * @public
663
+ * @since v6.41.0
664
+ * @param columns - Table columns to get sortable attributes from.
665
+ */
666
+ export declare function getTableSortableAttributes(columns: MaybeSortableTableColumn[]): Record<PropertyKey, string | Readonly<Ref<string>>>;
667
+
654
668
  /**
655
669
  * @public
656
670
  */
@@ -706,6 +720,16 @@ export declare type InputTypeText = (typeof textTypes)[number];
706
720
  */
707
721
  export declare function matchPropertyValue<T, K extends keyof T = keyof T>(property: K): (item: T, value: T[K] | null) => boolean;
708
722
 
723
+ /**
724
+ * @public
725
+ * @since v6.41.0
726
+ */
727
+ export declare interface MaybeSortableTableColumn {
728
+ key?: PropertyKey;
729
+ header: string | Readonly<Ref<string>>;
730
+ sort?: boolean;
731
+ }
732
+
709
733
  /**
710
734
  * Helper for converting AgeTimeTextField values into hours. For convienence,
711
735
  * it is possible to provide multiple values and get their sum. The actual
@@ -783,7 +807,7 @@ export declare function splitHoursMinutes(valueString: string, extraForgiving?:
783
807
  /**
784
808
  * @public
785
809
  */
786
- export declare type TableColumn<T, K extends keyof T = keyof T> = TableColumnSimple<T, K> | TableColumnCheckbox<T, K> | TableColumnRadio<T, K> | TableColumnRowHeader<T, K> | TableColumnText<T, K> | TableColumnNumber<T, K> | TableColumnAnchor<T, K> | TableColumnButton<T, K> | TableColumnRender<T, K> | TableColumnSelect<T, K> | TableColumnMenu<T>;
810
+ export declare type TableColumn<T, K extends keyof T = keyof T> = TableColumnSimple<T, K> | TableColumnCheckbox<T, K> | TableColumnRowHeader<T, K> | TableColumnText<T, K> | TableColumnNumber<T, K> | TableColumnAnchor<T, K> | TableColumnButton<T, K> | TableColumnRender<T, K> | TableColumnSelect<T, K> | TableColumnMenu<T>;
787
811
 
788
812
  /**
789
813
  * @public
@@ -804,6 +828,7 @@ export declare interface TableColumnBase {
804
828
  header: string | Readonly<Ref<string>>;
805
829
  description?: string | Readonly<Ref<string | null>>;
806
830
  size?: TableColumnSize | Readonly<Ref<TableColumnSize | null>>;
831
+ sort?: boolean;
807
832
  enabled?: MaybeRef<boolean>;
808
833
  }
809
834
 
@@ -831,7 +856,6 @@ export declare interface TableColumnCheckbox<T, K extends keyof T> extends Table
831
856
  label?(this: void, row: T): string;
832
857
  checked?(this: void, row: T): boolean;
833
858
  update?(this: void, row: T, newValue: boolean, oldValue: boolean): void;
834
- editable?: boolean | ((this: void, row: T) => boolean);
835
859
  }
836
860
 
837
861
  /**
@@ -866,17 +890,6 @@ export declare interface TableColumnNumber<T, K extends keyof T> extends TableCo
866
890
  formatter?(this: void, value: number | string): string | undefined;
867
891
  }
868
892
 
869
- /**
870
- * @public
871
- */
872
- export declare interface TableColumnRadio<T, K extends keyof T> extends TableColumnBase {
873
- type: "radio";
874
- key?: K;
875
- label?(this: void, row: T): string;
876
- checked?(this: void, row: T): boolean;
877
- update?(this: void, row: T, newValue: boolean, oldValue: boolean): void;
878
- }
879
-
880
893
  /**
881
894
  * @public
882
895
  */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.6"
8
+ "packageVersion": "7.57.7"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fkui/vue-labs",
3
- "version": "6.39.0",
3
+ "version": "6.41.0",
4
4
  "description": "Experimental and unstable FKUI components",
5
5
  "keywords": [
6
6
  "fkui",
@@ -19,13 +19,13 @@
19
19
  "exports": {
20
20
  ".": {
21
21
  "types": "./dist/types/index.d.ts",
22
- "require": "./dist/cjs/index.cjs.js",
23
- "import": "./dist/esm/index.esm.js"
22
+ "import": "./dist/esm/index.esm.js",
23
+ "require": "./dist/cjs/index.cjs.js"
24
24
  },
25
25
  "./cypress": {
26
26
  "types": "./dist/types/cypress.d.ts",
27
- "require": "./dist/cjs/cypress.cjs.js",
28
- "import": "./dist/esm/cypress.esm.js"
27
+ "import": "./dist/esm/cypress.esm.js",
28
+ "require": "./dist/cjs/cypress.cjs.js"
29
29
  },
30
30
  "./style.css": "./dummy.css",
31
31
  "./htmlvalidate": "./htmlvalidate/index.cjs"
@@ -59,10 +59,10 @@
59
59
  "unit:watch": "jest --watch"
60
60
  },
61
61
  "peerDependencies": {
62
- "@fkui/date": "^6.39.0",
63
- "@fkui/design": "^6.39.0",
64
- "@fkui/logic": "^6.39.0",
65
- "@fkui/vue": "^6.39.0",
62
+ "@fkui/date": "^6.41.0",
63
+ "@fkui/design": "^6.41.0",
64
+ "@fkui/logic": "^6.41.0",
65
+ "@fkui/vue": "^6.41.0",
66
66
  "html-validate": ">= 7.9.0",
67
67
  "vue": "^3.5.0"
68
68
  },
@@ -75,5 +75,5 @@
75
75
  "node": ">= 20",
76
76
  "npm": ">= 7"
77
77
  },
78
- "gitHead": "dcb4ae0482dae1d80806b45900c8b80771de7372"
78
+ "gitHead": "b5a8d5801dff4745cf7007b9209a9bc5a8bbe40c"
79
79
  }