@devtron-labs/devtron-fe-common-lib 0.0.39-beta-2 → 0.0.40

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 (63) hide show
  1. package/dist/Common/Common.service.d.ts +2 -2
  2. package/dist/Common/Constants.d.ts +1 -0
  3. package/dist/Common/Types.d.ts +36 -2
  4. package/dist/Common/index.d.ts +0 -1
  5. package/dist/index.js +339 -441
  6. package/package.json +1 -4
  7. package/src/Common/Common.service.ts +223 -76
  8. package/src/Common/Constants.ts +1 -0
  9. package/src/Common/ImageTags.tsx +11 -2
  10. package/src/Common/Types.ts +44 -2
  11. package/src/Common/index.ts +0 -1
  12. package/dist/Common/RJSF/Form.d.ts +0 -4
  13. package/dist/Common/RJSF/common/FieldRow.d.ts +0 -3
  14. package/dist/Common/RJSF/common/types.d.ts +0 -8
  15. package/dist/Common/RJSF/config.d.ts +0 -4
  16. package/dist/Common/RJSF/constants.d.ts +0 -5
  17. package/dist/Common/RJSF/index.d.ts +0 -2
  18. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +0 -3
  19. package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +0 -3
  20. package/dist/Common/RJSF/templates/BaseInput.d.ts +0 -3
  21. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +0 -3
  22. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +0 -3
  23. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +0 -3
  24. package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +0 -3
  25. package/dist/Common/RJSF/templates/Description.d.ts +0 -3
  26. package/dist/Common/RJSF/templates/Field.d.ts +0 -3
  27. package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +0 -3
  28. package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +0 -3
  29. package/dist/Common/RJSF/templates/TitleField.d.ts +0 -3
  30. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +0 -3
  31. package/dist/Common/RJSF/templates/index.d.ts +0 -10
  32. package/dist/Common/RJSF/types.d.ts +0 -3
  33. package/dist/Common/RJSF/utils.d.ts +0 -14
  34. package/dist/Common/RJSF/widgets/Checkbox.d.ts +0 -3
  35. package/dist/Common/RJSF/widgets/Select.d.ts +0 -3
  36. package/dist/Common/RJSF/widgets/index.d.ts +0 -2
  37. package/src/Assets/Icon/ic-chevron-down.svg +0 -5
  38. package/src/Common/RJSF/Form.tsx +0 -29
  39. package/src/Common/RJSF/common/FieldRow.tsx +0 -31
  40. package/src/Common/RJSF/common/types.ts +0 -9
  41. package/src/Common/RJSF/config.ts +0 -37
  42. package/src/Common/RJSF/constants.ts +0 -5
  43. package/src/Common/RJSF/index.ts +0 -2
  44. package/src/Common/RJSF/rjsfForm.scss +0 -17
  45. package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +0 -33
  46. package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +0 -77
  47. package/src/Common/RJSF/templates/BaseInput.tsx +0 -16
  48. package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +0 -18
  49. package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +0 -10
  50. package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +0 -18
  51. package/src/Common/RJSF/templates/ButtonTemplates/index.ts +0 -3
  52. package/src/Common/RJSF/templates/Description.tsx +0 -12
  53. package/src/Common/RJSF/templates/Field.tsx +0 -30
  54. package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +0 -25
  55. package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +0 -96
  56. package/src/Common/RJSF/templates/TitleField.tsx +0 -9
  57. package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +0 -51
  58. package/src/Common/RJSF/templates/index.ts +0 -10
  59. package/src/Common/RJSF/types.ts +0 -4
  60. package/src/Common/RJSF/utils.ts +0 -59
  61. package/src/Common/RJSF/widgets/Checkbox.tsx +0 -44
  62. package/src/Common/RJSF/widgets/Select.tsx +0 -72
  63. package/src/Common/RJSF/widgets/index.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.39-beta-2",
3
+ "version": "0.0.40",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -41,9 +41,6 @@
41
41
  "@sentry/browser": "^7.31.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@rjsf/core": "^5.13.3",
45
- "@rjsf/utils": "^5.13.3",
46
- "@rjsf/validator-ajv8": "^5.13.3",
47
44
  "react": "^17.0.2",
48
45
  "react-dom": "^17.0.2",
49
46
  "react-router": "^5.3.0",
@@ -2,7 +2,19 @@ import moment from 'moment';
2
2
  import {get, post} from './Api';
3
3
  import { ROUTES } from './Constants'
4
4
  import { sortCallback } from './Helper';
5
- import { TeamList ,ResponseType, DeploymentNodeType, CDModalTab, FilterStates } from './Types';
5
+ import {
6
+ TeamList,
7
+ ResponseType,
8
+ DeploymentNodeType,
9
+ CDModalTab,
10
+ FilterStates,
11
+ CDMaterialServiceEnum,
12
+ CDMaterialServiceQueryParams,
13
+ CDMaterialResponseType,
14
+ CDMaterialsMetaInfo,
15
+ CDMaterialsApprovalInfo,
16
+ CDMaterialFilterQuery,
17
+ } from './Types'
6
18
 
7
19
  export const getTeamListMin = (): Promise<TeamList> => {
8
20
  // ignore active field
@@ -30,7 +42,7 @@ interface UserRole extends ResponseType {
30
42
  }
31
43
  }
32
44
 
33
- let stageMap = {
45
+ const stageMap = {
34
46
  PRECD: 'PRE',
35
47
  CD: 'DEPLOY',
36
48
  POSTCD: 'POST',
@@ -51,83 +63,218 @@ export function setImageTags(request, pipelineId: number, artifactId: number){
51
63
  return post(`${ROUTES.IMAGE_TAGGING}/${pipelineId}/${artifactId}`,request )
52
64
  }
53
65
 
54
- // FIXME: This is only returning materials to cater the case of search in approval but it should be a common function service coming from dashboard.
55
- export const getCDMaterials = (
56
- cdMaterialId,
57
- stageType: DeploymentNodeType,
58
- abortSignal: AbortSignal,
59
- isApprovalNode?: boolean,
60
- imageTag?: string): Promise<any> => {
61
- const URL = (!imageTag) ? `app/cd-pipeline/${cdMaterialId}/material?stage=${stageMap[stageType]}` : `app/cd-pipeline/${cdMaterialId}/material?stage=${stageMap[stageType]}&search=${imageTag}`
62
-
63
- return get(URL, {
64
- signal: abortSignal,
65
- }).then((response) => {
66
- let artifacts = response.result.ci_artifacts ?? []
67
- if (!response.result) {
68
- return {
69
- materials: [],
66
+ const processURL = (url: string, params: object) => {
67
+ const validParams = Object.keys(params).filter((key) => {
68
+ return params[key] != null
69
+ })
70
+
71
+ if (!validParams.length) {
72
+ return url
73
+ }
74
+
75
+ const queryString = validParams
76
+ .map((key) => {
77
+ if (Array.isArray(params[key])) {
78
+ return `${key}=${params[key].join(',')}`
70
79
  }
80
+ return `${key}=${params[key]}`
81
+ })
82
+ .join('&')
83
+
84
+ return `${url}?${queryString}`
85
+ }
86
+
87
+ const cdMaterialListModal = (artifacts: any[], offset: number, artifactId?: number, artifactStatus?: string) => {
88
+ if (!artifacts || !artifacts.length) return []
89
+
90
+ const markFirstSelected = offset === 0
91
+ const startIndex = offset
92
+ let isImageMarked = false
93
+
94
+ const materials = artifacts.map((material, index) => {
95
+ let artifactStatusValue = ''
96
+ const filterState = material.filterState ?? FilterStates.ALLOWED
97
+
98
+ if (artifactId && artifactStatus && material.id === artifactId) {
99
+ artifactStatusValue = artifactStatus
71
100
  }
72
- else {
73
- const materials = artifacts.map((material, index) => {
74
- let artifactStatusValue = ''
75
- const filterState = material.filterState ?? FilterStates.ALLOWED
76
-
77
- return {
78
- index,
79
- id: material.id,
80
- deployedTime: material.deployed_time
81
- ? moment(material.deployed_time).format('ddd, DD MMM YYYY, hh:mm A')
82
- : 'Not Deployed',
83
- deployedBy: material.deployedBy,
84
- wfrId: material.wfrId,
85
- image: extractImage(material.image),
86
- showChanges: false,
87
- vulnerabilities: [],
88
- buildTime: material.build_time || '',
89
- tab: CDModalTab.Changes,
90
- showSourceInfo: false,
91
- deployed: material.deployed || false,
92
- latest: material.latest || false,
93
- vulnerabilitiesLoading: true,
94
- scanned: material.scanned,
95
- scanEnabled: material.scanEnabled,
96
- isSelected: !material.vulnerable && filterState === FilterStates.ALLOWED && index === 0,
97
- vulnerable: material.vulnerable,
98
- runningOnParentCd: material.runningOnParentCd,
99
- artifactStatus: artifactStatusValue,
100
- userApprovalMetadata: material.userApprovalMetadata,
101
- triggeredBy: material.triggeredBy,
102
- isVirtualEnvironment: material.isVirtualEnvironment,
103
- imageComment: material.imageComment,
104
- imageReleaseTags: material.imageReleaseTags,
105
- materialInfo: material.material_info
106
- ? material.material_info.map((mat) => {
107
- return {
108
- modifiedTime: mat.modifiedTime ? moment(mat.modifiedTime).format("ddd, DD MMM YYYY, hh:mm A") : '',
109
- commitLink: createGitCommitUrl(mat.url, mat.revision),
110
- author: mat.author || '',
111
- message: mat.message || '',
112
- revision: mat.revision || '',
113
- tag: mat.tag || '',
114
- webhookData: mat.webhookData || '',
115
- url: mat.url || '',
116
- branch:
117
- (material.ciConfigureSourceType === SourceTypeMap.WEBHOOK
118
- ? material.ciConfigureSourceValue
119
- : mat.branch) || '',
120
- type: material.ciConfigureSourceType || '',
121
- }
122
- })
123
- : [],
124
- filterState,
125
- }
126
- })
127
- return {
128
- materials: materials
129
- }
101
+
102
+ const selectImage =
103
+ !isImageMarked && markFirstSelected && filterState === FilterStates.ALLOWED ? !material.vulnerable : false
104
+ if (selectImage) {
105
+ isImageMarked = true
106
+ }
107
+
108
+ return {
109
+ index: startIndex + index,
110
+ id: material.id,
111
+ deployedTime: material.deployed_time
112
+ ? moment(material.deployed_time).format('ddd, DD MMM YYYY, hh:mm A')
113
+ : 'Not Deployed',
114
+ deployedBy: material.deployedBy,
115
+ wfrId: material.wfrId,
116
+ tab: CDModalTab.Changes,
117
+ image: extractImage(material.image),
118
+ showChanges: false,
119
+ vulnerabilities: [],
120
+ buildTime: material.build_time || '',
121
+ isSelected: selectImage,
122
+ showSourceInfo: false,
123
+ deployed: material.deployed || false,
124
+ latest: material.latest || false,
125
+ vulnerabilitiesLoading: true,
126
+ scanned: material.scanned,
127
+ scanEnabled: material.scanEnabled,
128
+ vulnerable: material.vulnerable,
129
+ runningOnParentCd: material.runningOnParentCd,
130
+ artifactStatus: artifactStatusValue,
131
+ userApprovalMetadata: material.userApprovalMetadata,
132
+ triggeredBy: material.triggeredBy,
133
+ isVirtualEnvironment: material.isVirtualEnvironment,
134
+ imageComment: material.imageComment,
135
+ imageReleaseTags: material.imageReleaseTags,
136
+ // It is going to be null but required in type so can't remove
137
+ lastExecution: material.lastExecution,
138
+ materialInfo: material.material_info
139
+ ? material.material_info.map((mat) => {
140
+ return {
141
+ modifiedTime: mat.modifiedTime
142
+ ? moment(mat.modifiedTime).format('ddd, DD MMM YYYY, hh:mm A')
143
+ : '',
144
+ commitLink: createGitCommitUrl(mat.url, mat.revision),
145
+ author: mat.author || '',
146
+ message: mat.message || '',
147
+ revision: mat.revision || '',
148
+ tag: mat.tag || '',
149
+ webhookData: mat.webhookData || '',
150
+ url: mat.url || '',
151
+ branch:
152
+ (material.ciConfigureSourceType === SourceTypeMap.WEBHOOK
153
+ ? material.ciConfigureSourceValue
154
+ : mat.branch) || '',
155
+ type: material.ciConfigureSourceType || '',
156
+ }
157
+ })
158
+ : [],
159
+ filterState,
160
+ appliedFiltersTimestamp: material.appliedFiltersTimestamp ?? '',
161
+ appliedFilters: material.appliedFilters ?? [],
162
+ appliedFiltersState: material.appliedFiltersState ?? FilterStates.ALLOWED,
163
+ createdTime: material.createdTime ?? '',
164
+ dataSource: material.data_source ?? '',
165
+ }
166
+ })
167
+ return materials
168
+ }
169
+
170
+ const processCDMaterialsApprovalInfo = (enableApproval: boolean, cdMaterialsResult): CDMaterialsApprovalInfo => {
171
+ if (!enableApproval) {
172
+ return {
173
+ approvalUsers: [],
174
+ userApprovalConfig: null,
175
+ requestedUserId: 0,
176
+ }
177
+ }
178
+
179
+ return {
180
+ approvalUsers: cdMaterialsResult.approvalUsers,
181
+ userApprovalConfig: cdMaterialsResult.userApprovalConfig,
182
+ requestedUserId: cdMaterialsResult.requestedUserId,
183
+ }
184
+ }
185
+
186
+ const processCDMaterialsMetaInfo = (cdMaterialsResult): CDMaterialsMetaInfo => {
187
+ if (!cdMaterialsResult) {
188
+ return {
189
+ tagsEditable: false,
190
+ appReleaseTagNames: [],
191
+ hideImageTaggingHardDelete: false,
192
+ resourceFilters: [],
193
+ totalCount: 0,
194
+ canApproverDeploy: cdMaterialsResult.canApproverDeploy ?? false,
130
195
  }
196
+ }
197
+
198
+ return {
199
+ appReleaseTagNames: cdMaterialsResult.appReleaseTagNames,
200
+ tagsEditable: cdMaterialsResult.tagsEditable,
201
+ hideImageTaggingHardDelete: cdMaterialsResult.hideImageTaggingHardDelete,
202
+ resourceFilters: cdMaterialsResult.resourceFilters ?? [],
203
+ totalCount: cdMaterialsResult.totalCount ?? 0,
204
+ canApproverDeploy: cdMaterialsResult.canApproverDeploy ?? false,
205
+ }
206
+ }
207
+
208
+ const processCDMaterialServiceResponse = (
209
+ cdMaterialsResult,
210
+ stage: DeploymentNodeType,
211
+ offset: number,
212
+ filter: CDMaterialFilterQuery,
213
+ ): CDMaterialResponseType => {
214
+ if (!cdMaterialsResult) {
215
+ return {
216
+ materials: [],
217
+ ...processCDMaterialsMetaInfo(cdMaterialsResult),
218
+ ...processCDMaterialsApprovalInfo(false, cdMaterialsResult),
219
+ }
220
+ }
221
+
222
+ const materials = cdMaterialListModal(
223
+ cdMaterialsResult.ci_artifacts,
224
+ offset ?? 0,
225
+ cdMaterialsResult.latest_wf_artifact_id,
226
+ cdMaterialsResult.latest_wf_artifact_status,
227
+ )
228
+ const approvalInfo = processCDMaterialsApprovalInfo(
229
+ stage === DeploymentNodeType.CD || stage === DeploymentNodeType.APPROVAL,
230
+ cdMaterialsResult,
231
+ )
232
+ const metaInfo = processCDMaterialsMetaInfo(cdMaterialsResult)
233
+
234
+ // TODO: On update of service would remove from here
235
+ const filteredMaterials =
236
+ filter && filter === CDMaterialFilterQuery.RESOURCE
237
+ ? materials.filter((material) => {
238
+ return material.filterState === FilterStates.ALLOWED
239
+ })
240
+ : materials
241
+
242
+ return {
243
+ materials: filteredMaterials,
244
+ ...approvalInfo,
245
+ ...metaInfo,
246
+ }
247
+ }
248
+
249
+ const getSanitizedQueryParams = (queryParams: CDMaterialServiceQueryParams): CDMaterialServiceQueryParams => {
250
+ const { filter, ...rest } = queryParams
251
+ return rest
252
+ }
253
+
254
+ export const genericCDMaterialsService = (
255
+ serviceType: CDMaterialServiceEnum,
256
+ cdMaterialID: number,
257
+ stage: DeploymentNodeType,
258
+ signal: AbortSignal,
259
+ queryParams: CDMaterialServiceQueryParams = {},
260
+ ): Promise<CDMaterialResponseType> => {
261
+ // TODO: On update of service would remove from here
262
+ const manipulatedParams = getSanitizedQueryParams(queryParams)
263
+
264
+ let URL
265
+ switch (serviceType) {
266
+ case CDMaterialServiceEnum.ROLLBACK:
267
+ URL = processURL(`${ROUTES.CD_MATERIAL_GET}/${cdMaterialID}/material/rollback`, manipulatedParams)
268
+ break
269
+
270
+ // Meant for handling getCDMaterialList
271
+ default:
272
+ URL = processURL(`${ROUTES.CD_MATERIAL_GET}/${cdMaterialID}/material`, { ...manipulatedParams, stage: stageMap[stage] })
273
+ break
274
+ }
275
+
276
+ return get(URL, { signal }).then((response) => {
277
+ return processCDMaterialServiceResponse(response.result, stage, queryParams.offset, queryParams.filter)
131
278
  })
132
279
  }
133
280
 
@@ -24,6 +24,7 @@ export const ROUTES = {
24
24
  PROJECT_LIST_MIN: 'team/autocomplete',
25
25
  USER_CHECK_ROLE: 'user/check/roles',
26
26
  IMAGE_TAGGING:'app/image-tagging',
27
+ CD_MATERIAL_GET: 'app/cd-pipeline'
27
28
  }
28
29
 
29
30
  export enum KEY_VALUE {
@@ -18,8 +18,10 @@ import { showError, stopPropagation } from './Helper'
18
18
  import { TippyCustomized } from './TippyCustomized'
19
19
  import { setImageTags } from './Common.service'
20
20
  import Tippy from '@tippyjs/react'
21
+ import { Progressing } from './Progressing'
21
22
 
22
23
  export const ImageTagsContainer = ({
24
+ // Setting it to zero in case of external pipeline
23
25
  ciPipelineId,
24
26
  artifactId,
25
27
  imageComment,
@@ -47,6 +49,7 @@ export const ImageTagsContainer = ({
47
49
  const [hardDeleteTags, setHardDeleteTags] = useState<ReleaseTag[]>([])
48
50
  const [descriptionValidationMessage, setDescriptionValidationMessage] = useState<string>('')
49
51
  const [textInput, setTextInput] = useState<string>('')
52
+ const [loading, setLoading] = useState<boolean>(false)
50
53
 
51
54
 
52
55
  useEffect(() => {
@@ -213,7 +216,8 @@ export const ImageTagsContainer = ({
213
216
  }
214
217
 
215
218
  // set loading state true
216
- setImageTags(payload, ciPipelineId, artifactId)
219
+ setLoading(true)
220
+ setImageTags(payload, ciPipelineId ?? 0, artifactId)
217
221
  .then((res) => {
218
222
  const tags = res.result?.imageReleaseTags?.map((tag) => ({
219
223
  id: tag.id,
@@ -249,6 +253,9 @@ export const ImageTagsContainer = ({
249
253
  showError(err)
250
254
  }
251
255
  })
256
+ .finally(()=>{
257
+ setLoading(false)
258
+ })
252
259
  }
253
260
 
254
261
  const renderInfoCard = (): JSX.Element => {
@@ -425,6 +432,7 @@ export const ImageTagsContainer = ({
425
432
  stopPropagation(e)
426
433
  handleCancel()
427
434
  }}
435
+ disabled={loading}
428
436
  >
429
437
  Cancel
430
438
  </button>
@@ -436,8 +444,9 @@ export const ImageTagsContainer = ({
436
444
  stopPropagation(e)
437
445
  onClickSave()
438
446
  }}
447
+ disabled={loading}
439
448
  >
440
- Save
449
+ {loading ? <Progressing /> : 'Save'}
441
450
  </button>
442
451
  </div>
443
452
  </div>
@@ -226,6 +226,10 @@ export enum FilterStates {
226
226
  ERROR = 2,
227
227
  }
228
228
 
229
+ export enum MaterialDataSource {
230
+ EXTERNAL = "ext"
231
+ }
232
+
229
233
  export interface CDMaterialType {
230
234
  index: number
231
235
  id: string
@@ -252,6 +256,36 @@ export interface CDMaterialType {
252
256
  imageReleaseTags?: ReleaseTag[]
253
257
  artifactStatus?: string
254
258
  filterState: FilterStates
259
+ // Not even coming from API but required in CDMaterials for Security which makes its own api call but stores data in CDMaterials
260
+ scanToolId?: number
261
+ appliedFiltersTimestamp?: string
262
+ appliedFilters?: FilterConditionsListType[]
263
+ appliedFiltersState?: FilterStates
264
+ createdTime?: string
265
+ deployed?: boolean
266
+ dataSource?: MaterialDataSource
267
+ }
268
+
269
+ export enum CDMaterialServiceEnum {
270
+ ROLLBACK = 'rollback',
271
+ CD_MATERIALS = 'cd-materials',
272
+ }
273
+
274
+ export enum CDMaterialResourceQuery {
275
+ PENDING_APPROVAL = 'PENDING_APPROVAL'
276
+ }
277
+
278
+ export enum CDMaterialFilterQuery {
279
+ RESOURCE = 'ELIGIBLE_RESOURCES',
280
+ ALL = 'ALL_RESOURCES'
281
+ }
282
+
283
+ export interface CDMaterialServiceQueryParams {
284
+ search?: string
285
+ offset?: number
286
+ size?: number
287
+ resource?: CDMaterialResourceQuery
288
+ filter?: CDMaterialFilterQuery
255
289
  }
256
290
 
257
291
  export interface CommonNodeAttr {
@@ -367,15 +401,23 @@ export interface FilterConditionsListType {
367
401
  conditions: FilterConditionsInfo[]
368
402
  }
369
403
 
370
- export interface CDMaterialResponseType {
404
+ export interface CDMaterialsApprovalInfo {
371
405
  approvalUsers: string[]
372
- materials: any[]
373
406
  userApprovalConfig: UserApprovalConfigType
374
407
  requestedUserId: number
408
+ }
409
+
410
+ export interface CDMaterialsMetaInfo {
375
411
  tagsEditable: boolean
376
412
  appReleaseTagNames: string[]
377
413
  hideImageTaggingHardDelete: boolean
378
414
  resourceFilters?: FilterConditionsListType[]
415
+ totalCount: number
416
+ canApproverDeploy: boolean
417
+ }
418
+
419
+ export interface CDMaterialResponseType extends CDMaterialsMetaInfo, CDMaterialsApprovalInfo {
420
+ materials: CDMaterialType[]
379
421
  }
380
422
 
381
423
  export interface InputDetailType {
@@ -40,4 +40,3 @@ export { default as Grid } from './Grid/Grid'
40
40
  export { default as ClipboardButton } from './ClipboardButton/ClipboardButton'
41
41
  export * from './Hooks'
42
42
  export { AppStatus } from './AppStatus'
43
- export * from './RJSF'
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormProps } from './types';
3
- import './rjsfForm.scss';
4
- export declare const RJSFForm: (props: FormProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldRowProps } from './types';
3
- export declare const FieldRowWithLabel: ({ showLabel, label, required, children, id, shouldAlignCenter, }: FieldRowProps) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import { FieldTemplateProps } from '@rjsf/utils';
2
- export interface FieldRowProps extends Pick<FieldTemplateProps, 'children' | 'label' | 'required' | 'id'> {
3
- showLabel?: boolean;
4
- /**
5
- * @default true
6
- */
7
- shouldAlignCenter?: boolean;
8
- }
@@ -1,4 +0,0 @@
1
- import { RegistryWidgetsType } from '@rjsf/utils';
2
- import { FormProps } from './types';
3
- export declare const widgets: RegistryWidgetsType;
4
- export declare const templates: FormProps['templates'];
@@ -1,5 +0,0 @@
1
- export declare const PLACEHOLDERS: {
2
- SELECT: string;
3
- INPUT: string;
4
- OBJECT_KEY: string;
5
- };
@@ -1,2 +0,0 @@
1
- export { RJSFForm } from './Form';
2
- export * from './types';
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ArrayFieldTemplateItemType } from '@rjsf/utils';
3
- export declare const ArrayFieldItemTemplate: ({ children, className, disabled, hasToolbar, hasRemove, index, onDropIndexClick, readonly, registry, uiSchema, }: ArrayFieldTemplateItemType) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ArrayFieldTemplateProps } from '@rjsf/utils';
3
- export declare const ArrayFieldTemplate: ({ canAdd, className, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, title, }: ArrayFieldTemplateProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { BaseInputTemplateProps } from '@rjsf/utils';
3
- export declare const BaseInput: ({ placeholder, ...props }: BaseInputTemplateProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IconButtonProps } from '@rjsf/utils';
3
- export declare const AddButton: ({ icon, iconType, registry, uiSchema, ...props }: IconButtonProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IconButtonProps } from '@rjsf/utils';
3
- export declare const RemoveButton: ({ icon, iconType, registry, uiSchema, ...props }: IconButtonProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { SubmitButtonProps } from '@rjsf/utils';
3
- export declare const SubmitButton: ({ uiSchema }: SubmitButtonProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- export { AddButton } from './AddButton';
2
- export { RemoveButton } from './RemoveButton';
3
- export { SubmitButton } from './SubmitButton';
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { DescriptionFieldProps } from '@rjsf/utils';
3
- export declare const Description: ({ id, description }: DescriptionFieldProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldTemplateProps } from '@rjsf/utils';
3
- export declare const Field: (props: FieldTemplateProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldErrorProps } from '@rjsf/utils';
3
- export declare const FieldErrorTemplate: ({ errors, idSchema }: FieldErrorProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ObjectFieldTemplateProps } from '@rjsf/utils';
3
- export declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { TitleFieldProps } from '@rjsf/utils';
3
- export declare const TitleField: ({ id, title, required }: TitleFieldProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { WrapIfAdditionalTemplateProps } from '@rjsf/utils';
3
- export declare const WrapIfAdditionalTemplate: ({ id, disabled, label, onKeyChange, onDropPropertyClick, readonly, schema, children, uiSchema, registry, }: WrapIfAdditionalTemplateProps) => JSX.Element;
@@ -1,10 +0,0 @@
1
- export { ArrayFieldTemplate } from './ArrayFieldTemplate';
2
- export { ArrayFieldItemTemplate } from './ArrayFieldItemTemplate';
3
- export { BaseInput as BaseInputTemplate } from './BaseInput';
4
- export * from './ButtonTemplates';
5
- export { Description as DescriptionFieldTemplate } from './Description';
6
- export { Field as FieldTemplate } from './Field';
7
- export { FieldErrorTemplate } from './FieldErrorTemplate';
8
- export { ObjectFieldTemplate } from './ObjectFieldTemplate';
9
- export { TitleField as TitleFieldTemplate } from './TitleField';
10
- export { WrapIfAdditionalTemplate } from './WrapIfAdditionalTemplate';
@@ -1,3 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- import RJSFForm from '@rjsf/core';
3
- export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
@@ -1,14 +0,0 @@
1
- import { TranslatableString } from '@rjsf/utils';
2
- /**
3
- * Override for the TranslatableString from RJSF
4
- */
5
- export declare const translateString: (stringToTranslate: TranslatableString, params?: string[]) => string;
6
- export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
7
- menuList: (base: any) => any;
8
- control: (base: any, state: any) => any;
9
- option: (base: any, state: any) => any;
10
- dropdownIndicator: (base: any, state: any) => any;
11
- valueContainer: (base: any) => any;
12
- loadingMessage: (base: any) => any;
13
- noOptionsMessage: (base: any) => any;
14
- };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { WidgetProps } from '@rjsf/utils';
3
- export declare const Checkbox: ({ id, onChange, value, required, disabled, readonly, autofocus, onBlur, onFocus, }: WidgetProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { WidgetProps } from '@rjsf/utils';
3
- export declare const Select: (props: WidgetProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export { Checkbox as CheckboxWidget } from './Checkbox';
2
- export { Select as SelectWidget } from './Select';
@@ -1,5 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
- <g fill="none" fill-rule="evenodd">
3
- <path fill="#999" class="fill-color" fill-rule="nonzero" d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/>
4
- </g>
5
- </svg>