@devtron-labs/devtron-fe-common-lib 0.6.1-beta-3 → 0.6.1-beta-4

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.
Files changed (25) hide show
  1. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +17 -1
  2. package/dist/Common/SortableTableHeaderCell/index.d.ts +1 -0
  3. package/dist/Common/SortableTableHeaderCell/types.d.ts +43 -17
  4. package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +9 -0
  5. package/dist/Shared/Components/CICDHistory/StatusFilterButtonComponent.d.ts +1 -1
  6. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -1
  7. package/dist/Shared/constants.d.ts +0 -1
  8. package/dist/{cssMode-DDKhiEyg.js → cssMode-CsRIJX92.js} +1 -1
  9. package/dist/{freemarker2-BvaHXpuj.js → freemarker2-BSNmNEHb.js} +1 -1
  10. package/dist/{handlebars-sZ9dU6Pp.js → handlebars-HU_uGGHl.js} +1 -1
  11. package/dist/{html-Da_EkHO6.js → html-DKjMoTrp.js} +1 -1
  12. package/dist/{htmlMode-CtjQw5Cy.js → htmlMode-CHqStKJs.js} +1 -1
  13. package/dist/{index-C2BzhTRV.js → index-IHe7CaI4.js} +17804 -17710
  14. package/dist/index.js +568 -568
  15. package/dist/{javascript-CUIPn67V.js → javascript-CF2FgAZT.js} +1 -1
  16. package/dist/{jsonMode-DtcyifUs.js → jsonMode-B3N2Y2UK.js} +1 -1
  17. package/dist/{liquid-CQ-_O-4y.js → liquid-CpJg0so0.js} +1 -1
  18. package/dist/{mdx-BoUOsgHQ.js → mdx-BK0LxAp8.js} +1 -1
  19. package/dist/{python-CwiGJeI2.js → python-BAz39kZJ.js} +1 -1
  20. package/dist/{razor-BknAITcz.js → razor-Doo6Brq-.js} +1 -1
  21. package/dist/{tsMode-B4I3zbhx.js → tsMode-C5Vaesjn.js} +1 -1
  22. package/dist/{typescript-DAzd6KWy.js → typescript-B6uQZLDZ.js} +1 -1
  23. package/dist/{xml-BvPjUa4P.js → xml-CDEZF8gN.js} +1 -1
  24. package/dist/{yaml-Cv7FsVZl.js → yaml-CbaGVg6D.js} +1 -1
  25. package/package.json +1 -1
@@ -12,6 +12,22 @@ import { SortableTableHeaderCellProps } from './types';
12
12
  * disabled={isDisabled}
13
13
  * />
14
14
  * ```
15
+ *
16
+ * @example Non-sortable cell
17
+ * ```tsx
18
+ * <SortableTableHeaderCell
19
+ * isSortable={false}
20
+ * title="Header Cell"
21
+ * />
22
+ * ```
23
+ *
24
+ * * @example Resizable cell
25
+ * ```tsx
26
+ * <SortableTableHeaderCell
27
+ * isSortable={false}
28
+ * title="Header Cell"
29
+ * />
30
+ * ```
15
31
  */
16
- declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
32
+ declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, id, handleResize, }: SortableTableHeaderCellProps) => JSX.Element;
17
33
  export default SortableTableHeaderCell;
@@ -1,2 +1,3 @@
1
1
  export { default as SortableTableHeaderCell } from './SortableTableHeaderCell';
2
+ export { default as useResizableTableConfig } from './useResizableTableConfig';
2
3
  export type { SortableTableHeaderCellProps } from './types';
@@ -1,35 +1,61 @@
1
1
  import { SortingOrder } from '../Constants';
2
- export interface SortableTableHeaderCellProps {
2
+ export type SortableTableHeaderCellProps = {
3
3
  /**
4
- * If true, the cell is sorted
4
+ * Label for the cell
5
5
  */
6
- isSorted: boolean;
6
+ title: string;
7
7
  /**
8
- * Callback for handling the sorting of the cell
8
+ * If true, the tippy is shown on Sortable header if text is truncated
9
+ * @default false
9
10
  */
10
- triggerSorting: () => void;
11
+ showTippyOnTruncate?: boolean;
12
+ } & ({
11
13
  /**
12
- * Current sort order
13
- *
14
- * Note: On click, the sort order should be updated as required
14
+ * Unique identifier for the column
15
15
  */
16
- sortOrder: SortingOrder;
16
+ id: string | number;
17
17
  /**
18
- * Label for the cell
18
+ * Resize handler for the table
19
19
  */
20
- title: string;
20
+ handleResize: (id: string | number, deltaChange: number) => void;
21
+ } | {
22
+ id?: never;
23
+ handleResize?: never;
24
+ }) & ({
25
+ /**
26
+ * If false, the cell acts like normal table header cell
27
+ * @default true
28
+ */
29
+ isSortable?: boolean | undefined;
21
30
  /**
22
31
  * If true, the cell is disabled
23
32
  */
24
33
  disabled: boolean;
25
34
  /**
26
- * If false, the cell acts like normal table header cell
27
- * @default true
35
+ * If true, the cell is sorted
28
36
  */
29
- isSortable?: boolean;
37
+ isSorted: boolean;
30
38
  /**
31
- * If true, the tippy is shown on Sortable header if text is truncated
32
- * @default false
39
+ * Callback for handling the sorting of the cell
33
40
  */
34
- showTippyOnTruncate?: boolean;
41
+ triggerSorting: () => void;
42
+ /**
43
+ * Current sort order
44
+ *
45
+ * Note: On click, the sort order should be updated as required
46
+ */
47
+ sortOrder: SortingOrder;
48
+ } | {
49
+ isSortable: false;
50
+ disabled?: never;
51
+ isSorted?: never;
52
+ triggerSorting?: never;
53
+ sortOrder?: never;
54
+ });
55
+ export interface UseResizableTableConfigProps {
56
+ headersConfig: (Pick<SortableTableHeaderCellProps, 'id'> & {
57
+ width: number | string;
58
+ maxWidth?: number;
59
+ minWidth?: number;
60
+ })[];
35
61
  }
@@ -0,0 +1,9 @@
1
+ import { UseResizableTableConfigProps } from './types';
2
+ declare const useResizableTableConfig: ({ headersConfig }: UseResizableTableConfigProps) => {
3
+ gridTemplateColumns: string;
4
+ handleResize: (headerCellId: UseResizableTableConfigProps["headersConfig"][number]["id"], deltaChange: number) => void;
5
+ register: (headerCellId: UseResizableTableConfigProps["headersConfig"][number]["id"]) => {
6
+ id: string | number;
7
+ };
8
+ };
9
+ export default useResizableTableConfig;
@@ -1,2 +1,2 @@
1
1
  import { StatusFilterButtonType } from './types';
2
- export declare const StatusFilterButtonComponent: ({ nodes, selectedTab, handleFilterClick }: StatusFilterButtonType) => JSX.Element;
2
+ export declare const StatusFilterButtonComponent: ({ nodes, handleFilterClick }: StatusFilterButtonType) => JSX.Element;
@@ -425,7 +425,6 @@ export interface AppStatusDetailsChartType {
425
425
  }
426
426
  export interface StatusFilterButtonType {
427
427
  nodes: Array<Node>;
428
- selectedTab: string;
429
428
  handleFilterClick?: (selectedFilter: string) => void;
430
429
  }
431
430
  export declare enum NodeStatus {
@@ -413,4 +413,3 @@ export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType,
413
413
  export declare const TRIGGER_STATUS_PROGRESSING: string[];
414
414
  export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
415
415
  export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
416
- export declare const ALL_RESOURCE_KIND_FILTER = "all";
@@ -1,7 +1,7 @@
1
1
  var Fe = Object.defineProperty;
2
2
  var Le = (e, n, i) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => Le(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as je } from "./index-C2BzhTRV.js";
4
+ import { m as je } from "./index-IHe7CaI4.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as f } from "./index-C2BzhTRV.js";
1
+ import { m as f } from "./index-IHe7CaI4.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-C2BzhTRV.js";
1
+ import { m as l } from "./index-IHe7CaI4.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-C2BzhTRV.js";
1
+ import { m as s } from "./index-IHe7CaI4.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var Be = Object.defineProperty;
2
2
  var $e = (e, n, i) => n in e ? Be(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => $e(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as qe } from "./index-C2BzhTRV.js";
4
+ import { m as qe } from "./index-IHe7CaI4.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)