@devtron-labs/devtron-fe-common-lib 0.1.7-beta-1 → 0.1.7-beta-3

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 (48) hide show
  1. package/dist/Common/CIPipeline.Types.d.ts +10 -0
  2. package/dist/Common/Constants.d.ts +0 -3
  3. package/dist/Common/Policy.Types.d.ts +0 -8
  4. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +1 -1
  5. package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +19 -1
  6. package/dist/Shared/Components/CICDHistory/DetectBottom.d.ts +4 -0
  7. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
  8. package/dist/Shared/Components/FilterChips/types.d.ts +2 -7
  9. package/dist/Shared/Components/ReactSelect/utils.d.ts +1 -5
  10. package/dist/Shared/Components/index.d.ts +0 -1
  11. package/dist/Shared/Hooks/UseDownload/UseDownload.d.ts +14 -0
  12. package/dist/Shared/Hooks/UseDownload/index.d.ts +1 -0
  13. package/dist/Shared/Hooks/UseDownload/service.d.ts +1 -0
  14. package/dist/Shared/Hooks/index.d.ts +1 -0
  15. package/dist/Shared/types.d.ts +1 -19
  16. package/dist/assets/index.css +1 -1
  17. package/dist/{cssMode-ed33ac0d.js → cssMode-42832427.js} +1 -1
  18. package/dist/{freemarker2-cf981a34.js → freemarker2-3a91cd3d.js} +1 -1
  19. package/dist/{handlebars-f991161e.js → handlebars-bde517a2.js} +1 -1
  20. package/dist/{html-c0ea81fa.js → html-e99016ba.js} +1 -1
  21. package/dist/{htmlMode-df383b6d.js → htmlMode-3b2be547.js} +1 -1
  22. package/dist/{index-bbf8145c.js → index-cbd14e6e.js} +26700 -27233
  23. package/dist/index.js +413 -426
  24. package/dist/{javascript-65db4c39.js → javascript-87b778a4.js} +1 -1
  25. package/dist/{jsonMode-5cb958f3.js → jsonMode-f35b6b83.js} +1 -1
  26. package/dist/{liquid-93a2211e.js → liquid-facbd311.js} +1 -1
  27. package/dist/{mdx-009fde9e.js → mdx-a661bc2f.js} +1 -1
  28. package/dist/{python-b0ef8f75.js → python-b54387b8.js} +1 -1
  29. package/dist/{razor-10d64bfa.js → razor-9df070ef.js} +1 -1
  30. package/dist/{tsMode-a2e192d0.js → tsMode-e7a2aabe.js} +1 -1
  31. package/dist/{typescript-60c80d44.js → typescript-a0d7ba26.js} +1 -1
  32. package/dist/{xml-2713523f.js → xml-254baa36.js} +1 -1
  33. package/dist/{yaml-0cbedfd6.js → yaml-65baa83a.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist/Shared/Components/DetectBottom/DetectBottom.component.d.ts +0 -5
  36. package/dist/Shared/Components/DetectBottom/index.d.ts +0 -1
  37. package/dist/Shared/Components/Plugin/PluginCard.d.ts +0 -4
  38. package/dist/Shared/Components/Plugin/PluginCardSkeletonList.d.ts +0 -4
  39. package/dist/Shared/Components/Plugin/PluginImageContainer.d.ts +0 -4
  40. package/dist/Shared/Components/Plugin/PluginList.d.ts +0 -4
  41. package/dist/Shared/Components/Plugin/PluginListContainer.d.ts +0 -4
  42. package/dist/Shared/Components/Plugin/PluginTagSelect.d.ts +0 -4
  43. package/dist/Shared/Components/Plugin/PluginTagsContainer.d.ts +0 -4
  44. package/dist/Shared/Components/Plugin/constants.d.ts +0 -5
  45. package/dist/Shared/Components/Plugin/index.d.ts +0 -7
  46. package/dist/Shared/Components/Plugin/service.d.ts +0 -5
  47. package/dist/Shared/Components/Plugin/types.d.ts +0 -176
  48. package/dist/Shared/Components/Plugin/utils.d.ts +0 -20
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-60c80d44.js";
1
+ import { conf as t, language as e } from "./typescript-a0d7ba26.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 Ge = Object.defineProperty;
2
2
  var Qe = (e, n, i) => n in e ? Ge(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var C = (e, n, i) => (Qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ze } from "./index-bbf8145c.js";
4
+ import { m as Ze } from "./index-cbd14e6e.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 d } from "./index-bbf8145c.js";
1
+ import { m as d } from "./index-cbd14e6e.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 d } from "./index-bbf8145c.js";
1
+ import { m as d } from "./index-cbd14e6e.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 a } from "./index-bbf8145c.js";
1
+ import { m as a } from "./index-cbd14e6e.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-bbf8145c.js";
1
+ import { m as s } from "./index-cbd14e6e.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 M = Object.defineProperty;
2
2
  var R = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var _ = (e, t, r) => (R(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { t as K, m as E } from "./index-bbf8145c.js";
4
+ import { t as K, m as E } from "./index-cbd14e6e.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 a } from "./index-bbf8145c.js";
1
+ import { m as a } from "./index-cbd14e6e.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-bbf8145c.js";
1
+ import { m } from "./index-cbd14e6e.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-bbf8145c.js";
1
+ import { m as i } from "./index-cbd14e6e.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": "0.1.7-beta-1",
3
+ "version": "0.1.7-beta-3",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,5 +0,0 @@
1
- interface DetectBottomProps {
2
- callback: () => void;
3
- }
4
- declare const DetectBottom: ({ callback }: DetectBottomProps) => JSX.Element;
5
- export default DetectBottom;
@@ -1 +0,0 @@
1
- export { default as DetectBottom } from './DetectBottom.component';
@@ -1,4 +0,0 @@
1
- import { PluginCardProps } from './types';
2
-
3
- declare const PluginCard: ({ isSelectable, pluginDataStore, handlePluginSelection, parentPluginId, isSelected, showCardBorder, }: PluginCardProps) => JSX.Element;
4
- export default PluginCard;
@@ -1,4 +0,0 @@
1
- import { PluginCardSkeletonListProps } from './types';
2
-
3
- declare const PluginCardSkeletonList: ({ count }: PluginCardSkeletonListProps) => JSX.Element;
4
- export default PluginCardSkeletonList;
@@ -1,4 +0,0 @@
1
- import { PluginImageContainerProps } from './types';
2
-
3
- declare const PluginImageContainer: ({ imageProps, fallbackImageClassName }: PluginImageContainerProps) => JSX.Element;
4
- export default PluginImageContainer;
@@ -1,4 +0,0 @@
1
- import { PluginListProps } from './types';
2
-
3
- declare const PluginList: ({ pluginDataStore, pluginList, totalCount, handleDataUpdateForPluginResponse, filters: { selectedTags, searchKey }, handlePluginSelection, selectedPluginsMap, isSelectable, handleClearFilters, showCardBorder, getPluginStoreRef, }: PluginListProps) => JSX.Element;
4
- export default PluginList;
@@ -1,4 +0,0 @@
1
- import { PluginListContainerProps } from './types';
2
-
3
- declare const PluginListContainer: ({ availableTags, handleUpdateAvailableTags, pluginDataStore, handlePluginDataStoreUpdate, handlePluginSelection, isSelectable, selectedPluginsMap, persistFilters, parentPluginList, handleParentPluginListUpdate, parentTotalCount, handleParentTotalCount, parentFilters, handleUpdateParentFilters, rootClassName, showCardBorder, }: Readonly<PluginListContainerProps>) => JSX.Element;
4
- export default PluginListContainer;
@@ -1,4 +0,0 @@
1
- import { PluginTagSelectProps } from './types';
2
-
3
- declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading, hasError, reloadTags, }: PluginTagSelectProps) => JSX.Element;
4
- export default PluginTagSelect;
@@ -1,4 +0,0 @@
1
- import { PluginTagsContainerProps } from './types';
2
-
3
- declare const PluginTagsContainer: ({ tags, rootClassName }: PluginTagsContainerProps) => JSX.Element;
4
- export default PluginTagsContainer;
@@ -1,5 +0,0 @@
1
- import { PluginDataStoreType, PluginListFiltersType } from './types';
2
-
3
- export declare const DEFAULT_PLUGIN_DATA_STORE: PluginDataStoreType;
4
- export declare const DEFAULT_PLUGIN_LIST_FILTERS: PluginListFiltersType;
5
- export declare const DEFAULT_PLUGIN_CREATED_BY = "Devtron";
@@ -1,7 +0,0 @@
1
- export * from './types';
2
- export * from './service';
3
- export * from './utils';
4
- export * from './constants';
5
- export { default as PluginListContainer } from './PluginListContainer';
6
- export { default as PluginTagsContainer } from './PluginTagsContainer';
7
- export { default as PluginImageContainer } from './PluginImageContainer';
@@ -1,5 +0,0 @@
1
- import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, PluginDetailServiceParamsType } from './types';
2
-
3
- export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
4
- export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
5
- export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
@@ -1,176 +0,0 @@
1
- import { MutableRefObject } from 'react';
2
- import { VariableType } from '../../../Common';
3
- import { BaseFilterQueryParams } from '../../types';
4
- import { ImageWithFallbackProps } from '../ImageWithFallback';
5
- import { getPluginStoreData } from './service';
6
-
7
- export declare enum PluginCreationType {
8
- SHARED = "SHARED",
9
- PRESET = "PRESET"
10
- }
11
- export interface GetPluginTagsPayloadType {
12
- appId: number;
13
- }
14
- export interface PluginTagNamesDTO {
15
- tagNames: string[];
16
- }
17
- /**
18
- * Minimal data of child plugins
19
- */
20
- interface MinimalPluginVersionDataDTO {
21
- id: number;
22
- name: string;
23
- description: string;
24
- pluginVersion: string;
25
- isLatest: boolean;
26
- }
27
- interface DetailedPluginVersionDTO extends MinimalPluginVersionDataDTO {
28
- tags: string[];
29
- inputVariables: VariableType[];
30
- outputVariables: VariableType[];
31
- /**
32
- * Present in case of shared plugin
33
- */
34
- updatedBy?: string;
35
- docLink?: string;
36
- }
37
- interface PluginVersionsDTO {
38
- detailedPluginVersionData: DetailedPluginVersionDTO[];
39
- minimalPluginVersionData: MinimalPluginVersionDataDTO[];
40
- }
41
- export interface ParentPluginDTO {
42
- id: number;
43
- name: string;
44
- description: string;
45
- type: PluginCreationType;
46
- icon: string;
47
- pluginVersions: PluginVersionsDTO;
48
- }
49
- export interface PluginDetailDTO {
50
- parentPlugins: ParentPluginDTO[];
51
- totalCount: number;
52
- }
53
- export interface PluginDetailServiceParamsType {
54
- appId: number;
55
- pluginIds?: number[];
56
- parentPluginIds?: number[];
57
- /**
58
- * @default true
59
- */
60
- shouldShowError?: boolean;
61
- }
62
- export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
63
- pluginId?: PluginDetailServiceParamsType['pluginIds'];
64
- parentPluginId?: PluginDetailServiceParamsType['parentPluginIds'];
65
- }
66
- export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
67
- selectedTags: string[];
68
- }
69
- interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'> {
70
- latestVersionId: MinimalPluginVersionDataDTO['id'];
71
- pluginVersions: MinimalPluginVersionDataDTO[];
72
- }
73
- interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'> {
74
- parentPluginId: ParentPluginType['id'];
75
- }
76
- export interface PluginDataStoreType {
77
- parentPluginStore: Record<number, ParentPluginType>;
78
- pluginVersionStore: Record<number, DetailedPluginVersionType>;
79
- }
80
- export interface PluginDetailType extends DetailedPluginVersionType {
81
- }
82
- export type PluginListItemType = Pick<PluginDetailType, 'parentPluginId'>;
83
- interface BasePluginListContainerProps {
84
- availableTags: string[];
85
- handleUpdateAvailableTags: (tags: string[]) => void;
86
- handlePluginSelection: (parentPluginId: PluginDetailType['parentPluginId']) => void;
87
- pluginDataStore: PluginDataStoreType;
88
- handlePluginDataStoreUpdate: (pluginStore: PluginDataStoreType) => void;
89
- rootClassName?: string;
90
- showCardBorder?: boolean;
91
- }
92
- type PluginListType = {
93
- persistFilters: true;
94
- parentPluginList: PluginListItemType[];
95
- handleParentPluginListUpdate: (pluginList: PluginListItemType[]) => void;
96
- parentTotalCount: number;
97
- handleParentTotalCount: (totalCount: number) => void;
98
- parentFilters: PluginListFiltersType;
99
- handleUpdateParentFilters: (filters: PluginListFiltersType) => void;
100
- } | {
101
- persistFilters: false;
102
- parentPluginList?: never;
103
- handleParentPluginListUpdate?: never;
104
- parentTotalCount?: never;
105
- handleParentTotalCount?: never;
106
- parentFilters?: never;
107
- handleUpdateParentFilters?: never;
108
- };
109
- export type PluginListContainerProps = BasePluginListContainerProps & PluginListType & ({
110
- /**
111
- * Would be used to identify the case where we are selecting plugins like mandatory plugin list
112
- */
113
- isSelectable: false;
114
- selectedPluginsMap?: never;
115
- } | {
116
- isSelectable: true;
117
- /**
118
- * Map of parentId to boolean
119
- */
120
- selectedPluginsMap: Record<number, true>;
121
- });
122
- export interface GetPluginStoreDataServiceParamsType extends Pick<PluginListFiltersType, 'searchKey' | 'selectedTags'> {
123
- signal: AbortSignal;
124
- appId: number;
125
- offset?: number;
126
- }
127
- export interface GetPluginListPayloadType extends Pick<GetPluginStoreDataServiceParamsType, 'searchKey' | 'offset' | 'appId'> {
128
- tag: PluginListFiltersType['selectedTags'];
129
- size: number;
130
- }
131
- export interface GetPluginStoreDataReturnType {
132
- totalCount: number;
133
- pluginStore: PluginDataStoreType;
134
- }
135
- export interface PluginListParamsType {
136
- appId?: string;
137
- }
138
- export interface PluginTagSelectProps extends Pick<BasePluginListContainerProps, 'availableTags'> {
139
- selectedTags: PluginListContainerProps['parentFilters']['selectedTags'];
140
- isLoading: boolean;
141
- hasError: boolean;
142
- reloadTags: () => void;
143
- handleUpdateSelectedTags: (tags: string[]) => void;
144
- }
145
- export interface PluginListProps extends Pick<PluginListContainerProps, 'pluginDataStore' | 'handlePluginSelection' | 'selectedPluginsMap' | 'isSelectable' | 'showCardBorder'> {
146
- handleDataUpdateForPluginResponse: (pluginResponse: Awaited<ReturnType<typeof getPluginStoreData>>,
147
- /**
148
- * If true, the response would be appended to the existing data
149
- * if false, the existing data would be replaced with the new data
150
- * @default false
151
- */
152
- appendResponse?: boolean) => void;
153
- handleClearFilters: () => void;
154
- pluginList: PluginListContainerProps['parentPluginList'];
155
- totalCount: PluginListContainerProps['parentTotalCount'];
156
- filters: PluginListContainerProps['parentFilters'];
157
- getPluginStoreRef: MutableRefObject<AbortController>;
158
- }
159
- export interface PluginCardProps extends Pick<PluginListProps, 'isSelectable' | 'pluginDataStore' | 'handlePluginSelection' | 'showCardBorder'> {
160
- parentPluginId: PluginDetailType['parentPluginId'];
161
- isSelected: boolean;
162
- }
163
- export interface PluginCardSkeletonListProps {
164
- /**
165
- * @default 3
166
- */
167
- count?: number;
168
- }
169
- export interface PluginTagsContainerProps {
170
- tags: string[];
171
- rootClassName?: string;
172
- }
173
- export interface PluginImageContainerProps extends Pick<ImageWithFallbackProps, 'imageProps'> {
174
- fallbackImageClassName?: string;
175
- }
176
- export {};
@@ -1,20 +0,0 @@
1
- import { ParentPluginDTO, PluginDataStoreType } from './types';
2
-
3
- export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
4
- export declare const pluginTagSelectStyles: {
5
- option: (base: any, state: any) => any;
6
- container: (base: any, state: any) => any;
7
- menuList: (base: any) => any;
8
- control: (base: any, state: any) => any;
9
- dropdownIndicator: (base: any, state: any) => any;
10
- valueContainer: (base: any) => any;
11
- loadingMessage: (base: any) => any;
12
- noOptionsMessage: (base: any) => any;
13
- placeholder: (base: any) => any;
14
- group: (base: any) => any;
15
- groupHeading: (base: any) => any;
16
- };
17
- /**
18
- * @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
19
- */
20
- export declare const getUpdatedPluginStore: (initialPluginDataStore: PluginDataStoreType, targetParentPluginStore: PluginDataStoreType['parentPluginStore'], targetPluginVersionStore: PluginDataStoreType['pluginVersionStore']) => PluginDataStoreType;