@devtron-labs/devtron-fe-common-lib 1.1.5-beta-3 → 1.1.5

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 (34) hide show
  1. package/dist/Common/CustomTagSelector/Types.d.ts +0 -12
  2. package/dist/Shared/Components/SelectPicker/type.d.ts +4 -5
  3. package/dist/Shared/Components/index.d.ts +0 -2
  4. package/dist/assets/index.css +1 -1
  5. package/dist/{cssMode-BxOVHzM2.js → cssMode-BsTjp5T1.js} +1 -1
  6. package/dist/{freemarker2-DS1LR6MW.js → freemarker2-DJtqwgcS.js} +1 -1
  7. package/dist/{handlebars-B2L8M52b.js → handlebars-A27t-Ka7.js} +1 -1
  8. package/dist/{html-DHoLKSrN.js → html-oZx5D2e1.js} +1 -1
  9. package/dist/{htmlMode-B2hOX8_y.js → htmlMode-BbYfuAfq.js} +1 -1
  10. package/dist/{index-B2h-ZMsa.js → index-Bqp36Zxu.js} +23368 -23808
  11. package/dist/index.js +498 -502
  12. package/dist/{javascript-Dw4Jsy24.js → javascript-7Ns1hZ1u.js} +1 -1
  13. package/dist/{jsonMode-wLrkS-Z9.js → jsonMode-CSHwDjDg.js} +1 -1
  14. package/dist/{liquid-C9VsC0Vg.js → liquid-CJAHXY0w.js} +1 -1
  15. package/dist/{mdx-O0XLlnb1.js → mdx-vt9h9Xpz.js} +1 -1
  16. package/dist/{python-DqxvlRGN.js → python-CnibeM_K.js} +1 -1
  17. package/dist/{razor-PPyZi1Jl.js → razor-BWWjrM8Q.js} +1 -1
  18. package/dist/{tsMode-roOBiYPY.js → tsMode-Ddl20Rd2.js} +1 -1
  19. package/dist/{typescript-CJ2Qfbv0.js → typescript-DJik4e7z.js} +1 -1
  20. package/dist/{xml-Ytg5lgZm.js → xml-D3mR990w.js} +1 -1
  21. package/dist/{yaml-CTrzUIo2.js → yaml-IjO78BY4.js} +1 -1
  22. package/package.json +1 -1
  23. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +0 -2
  24. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +0 -2
  25. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +0 -2
  26. package/dist/Shared/Components/DynamicDataTable/index.d.ts +0 -2
  27. package/dist/Shared/Components/DynamicDataTable/types.d.ts +0 -161
  28. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +0 -5
  29. package/dist/Shared/Components/MultipleResizableTextArea/MultipleResizableTextArea.d.ts +0 -2
  30. package/dist/Shared/Components/MultipleResizableTextArea/index.d.ts +0 -2
  31. package/dist/Shared/Components/MultipleResizableTextArea/types.d.ts +0 -9
  32. package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +0 -2
  33. package/dist/Shared/Components/SelectTextArea/index.d.ts +0 -2
  34. package/dist/Shared/Components/SelectTextArea/types.d.ts +0 -12
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-CJ2Qfbv0.js";
1
+ import { conf as t, language as e } from "./typescript-DJik4e7z.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 $e = Object.defineProperty;
2
2
  var Ge = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var C = (e, n, i) => Ge(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as Qe } from "./index-B2h-ZMsa.js";
4
+ import { m as Qe } from "./index-Bqp36Zxu.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 l } from "./index-B2h-ZMsa.js";
1
+ import { m as l } from "./index-Bqp36Zxu.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-B2h-ZMsa.js";
1
+ import { m as s } from "./index-Bqp36Zxu.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 i } from "./index-B2h-ZMsa.js";
1
+ import { m as i } from "./index-Bqp36Zxu.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 } from "./index-B2h-ZMsa.js";
1
+ import { m } from "./index-Bqp36Zxu.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 N = Object.defineProperty;
2
2
  var M = (e, t, r) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var _ = (e, t, r) => M(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as R, m as K } from "./index-B2h-ZMsa.js";
4
+ import { t as R, m as K } from "./index-Bqp36Zxu.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 s } from "./index-B2h-ZMsa.js";
1
+ import { m as s } from "./index-Bqp36Zxu.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 r } from "./index-B2h-ZMsa.js";
1
+ import { m as r } from "./index-Bqp36Zxu.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-B2h-ZMsa.js";
1
+ import { m as l } from "./index-Bqp36Zxu.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.1.5-beta-3",
3
+ "version": "1.1.5",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,2 +0,0 @@
1
- import { DynamicDataTableProps } from './types';
2
- export declare const DynamicDataTable: <K extends string>({ headers, ...props }: DynamicDataTableProps<K>) => JSX.Element;
@@ -1,2 +0,0 @@
1
- import { DynamicDataTableHeaderProps } from './types';
2
- export declare const DynamicDataTableHeader: <K extends string>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K>) => JSX.Element;
@@ -1,2 +0,0 @@
1
- import { DynamicDataTableRowProps } from './types';
2
- export declare const DynamicDataTableRow: <K extends string>({ rows, headers, maskValue, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, validationSchema, showError, errorMessages, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, }: DynamicDataTableRowProps<K>) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './DynamicDataTable';
2
- export * from './types';
@@ -1,161 +0,0 @@
1
- import { DetailedHTMLProps, ReactNode } from 'react';
2
- import { SortingOrder } from '../../../Common/Constants';
3
- import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
4
- import { MultipleResizableTextAreaProps } from '../MultipleResizableTextArea';
5
- import { SelectTextAreaProps } from '../SelectTextArea';
6
- /**
7
- * Interface representing a key-value header.
8
- * @template K - A string representing the key type.
9
- */
10
- export type DynamicDataTableHeaderType<K extends string> = {
11
- /** The label of the header. */
12
- label: string;
13
- /** The key associated with the header. */
14
- key: K;
15
- /** */
16
- width: string;
17
- /** An optional boolean indicating if the column is sortable. */
18
- isSortable?: boolean;
19
- /** An optional boolean to hide the column */
20
- isHidden?: boolean;
21
- };
22
- export declare enum DynamicDataTableRowDataType {
23
- TEXT = "text",
24
- DROPDOWN = "dropdown",
25
- SELECT_TEXT = "select-text",
26
- BUTTON = "button"
27
- }
28
- /**
29
- * Type representing a key-value row.
30
- * @template K - A string representing the key type.
31
- */
32
- export type DynamicDataTableRowType<K extends string> = {
33
- data: {
34
- [key in K]: {
35
- value: string;
36
- disabled?: boolean;
37
- /** An optional boolean indicating if an asterisk should be shown. */
38
- required?: boolean;
39
- } & ({
40
- type?: DynamicDataTableRowDataType.TEXT;
41
- props?: Omit<MultipleResizableTextAreaProps, 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRefs'>;
42
- } | {
43
- type?: DynamicDataTableRowDataType.DROPDOWN;
44
- props?: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
45
- } | {
46
- type?: DynamicDataTableRowDataType.SELECT_TEXT;
47
- props?: Omit<SelectTextAreaProps, 'value' | 'onChange' | 'inputId' | 'isDisabled' | 'dependentRefs' | 'refVar' | 'textAreaProps'> & {
48
- textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
49
- };
50
- } | ({
51
- type?: DynamicDataTableRowDataType.BUTTON;
52
- props: Pick<DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'onClick'> & {
53
- icon?: ReactNode;
54
- text: ReactNode;
55
- };
56
- } & ({
57
- wrap: true;
58
- wrapRenderer: (props: {
59
- children: JSX.Element;
60
- customState?: Record<string, any>;
61
- }) => JSX.Element;
62
- } | {
63
- wrap?: false;
64
- wrapRenderer?: never;
65
- })));
66
- };
67
- id: string | number;
68
- /** */
69
- customState?: Record<string, any>;
70
- };
71
- /**
72
- * Type representing a mask for key-value pairs.
73
- * @template K - A string representing the key type.
74
- */
75
- type DynamicDataTableMask<K extends string> = {
76
- [key in K]?: boolean;
77
- };
78
- type DynamicDataTableCellIcon<K extends string> = {
79
- [key in K]?: (rowId: string | number) => ReactNode;
80
- };
81
- /**
82
- * Interface representing the properties for a key-value table component.
83
- * @template K - A string representing the key type.
84
- */
85
- export type DynamicDataTableProps<K extends string> = {
86
- /** An array containing two key-value headers. */
87
- headers: DynamicDataTableHeaderType<K>[];
88
- /** An array of key-value rows. */
89
- rows: DynamicDataTableRowType<K>[];
90
- /** */
91
- sortingConfig?: {
92
- sortBy: K;
93
- sortOrder: SortingOrder;
94
- handleSorting: () => void;
95
- };
96
- /** An optional mask for the key-value pairs. */
97
- maskValue?: DynamicDataTableMask<K>;
98
- /** */
99
- leadingCellIcon?: DynamicDataTableCellIcon<K>;
100
- /** */
101
- trailingCellIcon?: DynamicDataTableCellIcon<K>;
102
- /** An optional React node for a custom header component. */
103
- headerComponent?: ReactNode;
104
- /** When true, data addition field will not be shown. */
105
- isAdditionNotAllowed?: boolean;
106
- /** When true, data addition field will not be shown. */
107
- isDeletionNotAllowed?: boolean;
108
- /** When true, data add or update is disabled. */
109
- readOnly?: boolean;
110
- /** */
111
- onRowAdd: () => void;
112
- /**
113
- * Function to handle changes in the table rows.
114
- * @param row - The row that changed.
115
- * @param headerKey - The key of the header that changed.
116
- * @param value - The value of the cell.
117
- */
118
- onRowEdit: (row: DynamicDataTableRowType<K>, headerKey: K, value: string, extraData: {
119
- selectedValue?: SelectPickerOptionType<string>;
120
- }) => void;
121
- /**
122
- * Function to handle row deletions.
123
- * @param row - The row that was deleted.
124
- */
125
- onRowDelete: (row: DynamicDataTableRowType<K>) => void;
126
- /** */
127
- actionButtonConfig?: {
128
- renderer: (row: DynamicDataTableRowType<K>) => ReactNode;
129
- key?: K;
130
- /**
131
- * @default '32px'
132
- */
133
- width?: string;
134
- /**
135
- * @default 'start'
136
- */
137
- position?: 'start' | 'end';
138
- };
139
- /**
140
- * Indicates whether to show errors.
141
- */
142
- showError?: boolean;
143
- /**
144
- * An array of error messages to be displayed in the cell error tooltip.
145
- */
146
- errorMessages?: string[];
147
- /**
148
- * The function to use to validate the value of the cell.
149
- * @param value - The value to validate.
150
- * @param key - The row key of the value.
151
- * @param rowId - The id of the row.
152
- * @returns Return true if the value is valid, otherwise false
153
- * and set `showError` to `true` and provide errorMessages array to show error message.
154
- */
155
- validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
156
- };
157
- export interface DynamicDataTableHeaderProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
158
- }
159
- export interface DynamicDataTableRowProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'rows' | 'headers' | 'maskValue' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'errorMessages' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon'> {
160
- }
161
- export {};
@@ -1,5 +0,0 @@
1
- import { DynamicDataTableHeaderType, DynamicDataTableProps, DynamicDataTableRowDataType } from './types';
2
- export declare const getActionButtonPosition: <K extends string>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K>, "headers" | "actionButtonConfig">) => number;
3
- export declare const getHeaderGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
- export declare const getRowGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
5
- export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -1,2 +0,0 @@
1
- import { MultipleResizableTextAreaProps } from './types';
2
- export declare const MultipleResizableTextArea: ({ value, minHeight, maxHeight, dataTestId, onChange, onBlur, onFocus, refVar, dependentRefs, className, disableOnBlurResizeToMinHeight, ...resProps }: MultipleResizableTextAreaProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './MultipleResizableTextArea';
2
- export * from './types';
@@ -1,9 +0,0 @@
1
- import { DetailedHTMLProps, MutableRefObject, TextareaHTMLAttributes } from 'react';
2
- export interface MultipleResizableTextAreaProps extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
3
- minHeight?: number;
4
- maxHeight?: number;
5
- dataTestId?: string;
6
- refVar?: MutableRefObject<HTMLTextAreaElement>;
7
- dependentRefs?: Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
8
- disableOnBlurResizeToMinHeight?: boolean;
9
- }
@@ -1,2 +0,0 @@
1
- import { SelectTextAreaProps } from './types';
2
- export declare const SelectTextArea: ({ value, selectedOptionIcon: Icon, onChange, options, inputId, placeholder, refVar, dependentRefs, disabled, selectPickerProps, textAreaProps, }: SelectTextAreaProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './SelectTextArea';
2
- export * from './types';
@@ -1,12 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
3
- import { MultipleResizableTextAreaProps } from '../MultipleResizableTextArea';
4
- export type SelectTextAreaProps = Pick<SelectPickerProps<string, false>, 'inputId' | 'options'> & Pick<MultipleResizableTextAreaProps, 'refVar' | 'dependentRefs'> & {
5
- value: string;
6
- selectedOptionIcon?: ReactElement;
7
- onChange?: (selectedValue: SelectPickerOptionType<string>) => void;
8
- disabled?: boolean;
9
- placeholder?: string;
10
- textAreaProps?: Omit<MultipleResizableTextAreaProps, 'refVar' | 'dependentRefs' | 'id' | 'value' | 'onChange' | 'placeholder' | 'disabled'>;
11
- selectPickerProps?: Omit<SelectPickerProps<string, false>, 'inputId' | 'options' | 'isDisabled' | 'onChange' | 'variant' | 'isCreatable' | 'value' | 'placeholder' | 'fullWidth' | 'selectRef' | 'onCreateOption' | 'isMulti'>;
12
- };