@digi-frontend/dgate-api-documentation 1.0.31 → 1.0.32

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 (104) hide show
  1. package/.editorconfig +12 -12
  2. package/.prettierignore +7 -7
  3. package/.prettierrc +15 -15
  4. package/dist/{2e10bbdb265df50e.svg → 43595976d1fdccbf.svg} +4 -4
  5. package/dist/{8789eb84283ea95b.svg → 56dc416b683db280.svg} +5 -5
  6. package/dist/{bb8b87cace25e052.svg → 64efc2716808c4a4.svg} +3 -3
  7. package/dist/{d32ce84bbd78babd.svg → 72db3b05a96dd600.svg} +3 -3
  8. package/dist/{d501922060662842.svg → 844eba3f2e42a9eb.svg} +3 -3
  9. package/dist/_virtual/index3.js +1 -1
  10. package/dist/_virtual/index4.js +1 -1
  11. package/dist/_virtual/index5.js +1 -1
  12. package/dist/_virtual/index6.js +1 -1
  13. package/dist/{070dc6ecd197bc80.svg → a7568b270e175038.svg} +8 -8
  14. package/dist/{9bdff13f8d8fa48a.svg → af16a554be8c4d69.svg} +3 -3
  15. package/dist/{7f54eeb0bb2d1150.svg → b82c7612e73342f3.svg} +3 -3
  16. package/dist/node_modules/toposort/index.js +1 -1
  17. package/dist/node_modules/yup/index.esm.js +1 -1
  18. package/dist/src/assets/icons/AddRow.svg.js +1 -1
  19. package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
  20. package/dist/src/assets/icons/CheckMarkSquare.svg.js +1 -1
  21. package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +1 -1
  22. package/dist/src/assets/icons/CloseIcon.svg.js +1 -1
  23. package/dist/src/assets/icons/CloseIcon.svg.js.map +1 -1
  24. package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
  25. package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
  26. package/dist/src/assets/icons/DownArrow.svg.js +1 -1
  27. package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
  28. package/dist/src/assets/icons/EditIcon.svg.js +1 -1
  29. package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
  30. package/dist/src/assets/icons/UpArrow.svg.js +1 -1
  31. package/dist/src/assets/icons/UpArrow.svg.js.map +1 -1
  32. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +1 -1
  33. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +1 -1
  34. package/dist/src/components/Chips/Chips.js.map +1 -1
  35. package/dist/src/components/InfoForm/InfoForm.js +1 -1
  36. package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
  37. package/dist/src/components/JsonInput/JsonInput.js.map +1 -1
  38. package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
  39. package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
  40. package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
  41. package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
  42. package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
  43. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  44. package/dist/src/components/dialog/index.js.map +1 -1
  45. package/dist/src/components/table/table.js.map +1 -1
  46. package/dist/src/components/table/tags-table.js +1 -1
  47. package/dist/src/components/table/tags-table.js.map +1 -1
  48. package/dist/src/constants/index.js.map +1 -1
  49. package/dist/src/constants/regex.js +1 -1
  50. package/dist/src/constants/regex.js.map +1 -1
  51. package/dist/src/helpers/layout.helper.js.map +1 -1
  52. package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
  53. package/dist/src/layout/layout.js.map +1 -1
  54. package/dist/src/validator/form.scheme.js.map +1 -1
  55. package/dist/styles.css +335 -335
  56. package/package.json +43 -43
  57. package/rollup.config.js +35 -35
  58. package/src/assets/icons/AddRow.svg +3 -3
  59. package/src/assets/icons/CheckMarkSquare.svg +5 -5
  60. package/src/assets/icons/CloseIcon.svg +4 -4
  61. package/src/assets/icons/DeleteIcon.svg +3 -3
  62. package/src/assets/icons/DownArrow.svg +3 -3
  63. package/src/assets/icons/EditIcon.svg +3 -3
  64. package/src/assets/icons/UpArrow.svg +3 -3
  65. package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
  66. package/src/assets/icons/index.ts +8 -8
  67. package/src/components/Chips/Chips.tsx +87 -87
  68. package/src/components/Chips/style.scss +147 -147
  69. package/src/components/InfoForm/InfoForm.module.scss +165 -165
  70. package/src/components/InfoForm/InfoForm.tsx +424 -426
  71. package/src/components/JsonInput/JsonInput.tsx +149 -149
  72. package/src/components/JsonInput/style.module.scss +133 -133
  73. package/src/components/LivePreview/LivePreview.module.scss +24 -24
  74. package/src/components/LivePreview/LivePreview.tsx +184 -184
  75. package/src/components/MethodAccordion/MethodAccordion.module.scss +338 -338
  76. package/src/components/MethodAccordion/MethodAccordion.tsx +515 -515
  77. package/src/components/SVGLoader/SVGLoader.tsx +94 -94
  78. package/src/components/SectionHead/SectionHead.scss +29 -29
  79. package/src/components/SectionHead/SectionHead.tsx +22 -22
  80. package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
  81. package/src/components/SimpleLabelValue/index.ts +1 -1
  82. package/src/components/SimpleLabelValue/style.scss +30 -30
  83. package/src/components/Tooltip/Tooltip.scss +133 -133
  84. package/src/components/Tooltip/Tooltip.tsx +85 -85
  85. package/src/components/_global.scss +337 -337
  86. package/src/components/dialog/dialog.ts +54 -54
  87. package/src/components/dialog/index.tsx +85 -85
  88. package/src/components/dialog/style.scss +104 -104
  89. package/src/components/table/style.scss +190 -190
  90. package/src/components/table/table.tsx +327 -327
  91. package/src/components/table/tags-table.tsx +348 -348
  92. package/src/constants/index.ts +93 -93
  93. package/src/constants/regex.ts +7 -7
  94. package/src/global.d.ts +13 -13
  95. package/src/helpers/layout.helper.ts +162 -162
  96. package/src/helpers/methodAccordion.helper.ts +19 -19
  97. package/src/index.ts +1 -1
  98. package/src/layout/layout.module.css +61 -61
  99. package/src/layout/layout.tsx +150 -150
  100. package/src/types/layout.type.ts +30 -30
  101. package/src/types/openApi.ts +108 -108
  102. package/src/types/transformedOpenApi.ts +52 -52
  103. package/src/validator/form.scheme.ts +70 -70
  104. package/tsconfig.json +33 -33
@@ -1,54 +1,54 @@
1
- export type DialogStatus = 'error' | 'info' | 'warning'
2
- export type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
3
- export type ButtonType = 'text' | 'submit' | 'reset'
4
- export type ButtonVariant = 'outlined' | 'contained' | 'text' | 'link'
5
- export type ButtonColor =
6
- | 'inherit'
7
- | 'primary'
8
- | 'secondary'
9
- | 'success'
10
- | 'error'
11
- | 'info'
12
- | 'warning'
13
- | 'action'
14
- | 'normal'
15
- export type ButtonSize = 'small' | 'medium' | 'large'
16
-
17
- export interface BaseActionButtonProps {
18
- text: string
19
- color?: ButtonColor
20
- variant?: ButtonVariant
21
- type?: ButtonType
22
- size?: ButtonSize
23
- id?: string
24
- className?: string
25
- disabled?: boolean
26
- startIcon?: JSX.Element
27
- endIcon?: JSX.Element
28
- dataId?: string
29
- loading?: boolean
30
- fullWidth?: boolean
31
- active?: boolean
32
- onKeyDown?: () => void
33
- }
34
-
35
- export interface SubmitButtonProps extends BaseActionButtonProps {
36
- onClick: () => void // Required for submit
37
- }
38
-
39
- export interface CancelButtonProps extends BaseActionButtonProps {
40
- onClick?: () => void // Optional for cancel
41
- }
42
-
43
- export interface CommonDialogProps {
44
- status?: DialogStatus
45
- content?: React.ReactElement
46
- onSubmit?: SubmitButtonProps
47
- onCancel?: CancelButtonProps
48
- onClose: () => void
49
- open?: boolean
50
- icon?: JSX.Element | boolean
51
- size?: DialogSize
52
- children?: React.ReactElement
53
- statusTitle?: boolean
54
- }
1
+ export type DialogStatus = 'error' | 'info' | 'warning'
2
+ export type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
3
+ export type ButtonType = 'text' | 'submit' | 'reset'
4
+ export type ButtonVariant = 'outlined' | 'contained' | 'text' | 'link'
5
+ export type ButtonColor =
6
+ | 'inherit'
7
+ | 'primary'
8
+ | 'secondary'
9
+ | 'success'
10
+ | 'error'
11
+ | 'info'
12
+ | 'warning'
13
+ | 'action'
14
+ | 'normal'
15
+ export type ButtonSize = 'small' | 'medium' | 'large'
16
+
17
+ export interface BaseActionButtonProps {
18
+ text: string
19
+ color?: ButtonColor
20
+ variant?: ButtonVariant
21
+ type?: ButtonType
22
+ size?: ButtonSize
23
+ id?: string
24
+ className?: string
25
+ disabled?: boolean
26
+ startIcon?: JSX.Element
27
+ endIcon?: JSX.Element
28
+ dataId?: string
29
+ loading?: boolean
30
+ fullWidth?: boolean
31
+ active?: boolean
32
+ onKeyDown?: () => void
33
+ }
34
+
35
+ export interface SubmitButtonProps extends BaseActionButtonProps {
36
+ onClick: () => void // Required for submit
37
+ }
38
+
39
+ export interface CancelButtonProps extends BaseActionButtonProps {
40
+ onClick?: () => void // Optional for cancel
41
+ }
42
+
43
+ export interface CommonDialogProps {
44
+ status?: DialogStatus
45
+ content?: React.ReactElement
46
+ onSubmit?: SubmitButtonProps
47
+ onCancel?: CancelButtonProps
48
+ onClose: () => void
49
+ open?: boolean
50
+ icon?: JSX.Element | boolean
51
+ size?: DialogSize
52
+ children?: React.ReactElement
53
+ statusTitle?: boolean
54
+ }
@@ -1,85 +1,85 @@
1
- import React from 'react'
2
- // @ts-ignore
3
- import { Dialog, Button, CloseIcon, infoIcon } from '@digi-frontend/dgate-ui'
4
- import SVGLoader from '../SVGLoader/SVGLoader'
5
- import './style.scss'
6
- import { CommonDialogProps } from './dialog'
7
-
8
- const CommonDialog = ({
9
- status = 'info',
10
- content,
11
- onSubmit,
12
- onCancel,
13
- onClose,
14
- open,
15
- size = 'xs',
16
- icon = (
17
- <>
18
- <SVGLoader src={infoIcon} width="4.0625rem" height="4.0625rem" />
19
- </>
20
- ),
21
- }: CommonDialogProps) => {
22
- const handleClose = () => {
23
- onClose() // Always close the dialog first
24
-
25
- if (onCancel && onCancel.onClick) {
26
- onCancel.onClick() // If onCancel.onClick is provided, invoke it after closing the dialog
27
- }
28
- }
29
-
30
- const body = (
31
- <div className="common-dialog">
32
- {icon && (
33
- <div className="confirmation-dialog-header">
34
- <div className={`icon ${status}`}>{icon}</div>
35
- </div>
36
- )}
37
- <SVGLoader
38
- src={CloseIcon}
39
- width={'1.5rem'}
40
- height={'1.5rem'}
41
- onClick={handleClose}
42
- className="close-icon"
43
- />
44
-
45
- {content}
46
- <div
47
- className="confirmation-dialog-footer"
48
- style={{ marginBottom: onCancel || onSubmit ? '1.5rem' : '1rem' }}
49
- >
50
- {onCancel && (
51
- <Button
52
- {...onCancel}
53
- onClick={handleClose}
54
- variant={onCancel.variant || 'outlined'}
55
- color={onCancel.color || 'normal'}
56
- >
57
- {onCancel.text}
58
- </Button>
59
- )}
60
- {onSubmit && (
61
- <Button
62
- {...onSubmit}
63
- variant={onSubmit.variant || 'contained'}
64
- color={onSubmit.color || 'secondary'}
65
- >
66
- {onSubmit.text}
67
- </Button>
68
- )}
69
- </div>
70
- </div>
71
- )
72
-
73
- return (
74
- <Dialog
75
- open={open}
76
- onClose={handleClose}
77
- content={body}
78
- fullWidth={false}
79
- size={size}
80
- id="common-dialog"
81
- />
82
- )
83
- }
84
-
85
- export default CommonDialog
1
+ import React from 'react'
2
+ // @ts-ignore
3
+ import { Dialog, Button, CloseIcon, infoIcon } from '@digi-frontend/dgate-ui'
4
+ import SVGLoader from '../SVGLoader/SVGLoader'
5
+ import './style.scss'
6
+ import { CommonDialogProps } from './dialog'
7
+
8
+ const CommonDialog = ({
9
+ status = 'info',
10
+ content,
11
+ onSubmit,
12
+ onCancel,
13
+ onClose,
14
+ open,
15
+ size = 'xs',
16
+ icon = (
17
+ <>
18
+ <SVGLoader src={infoIcon} width="4.0625rem" height="4.0625rem" />
19
+ </>
20
+ ),
21
+ }: CommonDialogProps) => {
22
+ const handleClose = () => {
23
+ onClose() // Always close the dialog first
24
+
25
+ if (onCancel && onCancel.onClick) {
26
+ onCancel.onClick() // If onCancel.onClick is provided, invoke it after closing the dialog
27
+ }
28
+ }
29
+
30
+ const body = (
31
+ <div className="common-dialog">
32
+ {icon && (
33
+ <div className="confirmation-dialog-header">
34
+ <div className={`icon ${status}`}>{icon}</div>
35
+ </div>
36
+ )}
37
+ <SVGLoader
38
+ src={CloseIcon}
39
+ width={'1.5rem'}
40
+ height={'1.5rem'}
41
+ onClick={handleClose}
42
+ className="close-icon"
43
+ />
44
+
45
+ {content}
46
+ <div
47
+ className="confirmation-dialog-footer"
48
+ style={{ marginBottom: onCancel || onSubmit ? '1.5rem' : '1rem' }}
49
+ >
50
+ {onCancel && (
51
+ <Button
52
+ {...onCancel}
53
+ onClick={handleClose}
54
+ variant={onCancel.variant || 'outlined'}
55
+ color={onCancel.color || 'normal'}
56
+ >
57
+ {onCancel.text}
58
+ </Button>
59
+ )}
60
+ {onSubmit && (
61
+ <Button
62
+ {...onSubmit}
63
+ variant={onSubmit.variant || 'contained'}
64
+ color={onSubmit.color || 'secondary'}
65
+ >
66
+ {onSubmit.text}
67
+ </Button>
68
+ )}
69
+ </div>
70
+ </div>
71
+ )
72
+
73
+ return (
74
+ <Dialog
75
+ open={open}
76
+ onClose={handleClose}
77
+ content={body}
78
+ fullWidth={false}
79
+ size={size}
80
+ id="common-dialog"
81
+ />
82
+ )
83
+ }
84
+
85
+ export default CommonDialog
@@ -1,104 +1,104 @@
1
- #common-dialog {
2
- &.dialog-content-wrapper {
3
- overflow: visible !important;
4
- max-height: 100%;
5
- width: 22.1875rem;
6
-
7
- .dialog-content-root {
8
- overflow: visible !important;
9
- border-radius: 0.625rem;
10
- max-height: 100%;
11
-
12
- .dialog-content {
13
- padding: 0 1.875rem !important;
14
- overflow: visible !important;
15
- max-height: 100%;
16
-
17
- .common-dialog {
18
- position: relative;
19
-
20
- .close-icon {
21
- position: absolute;
22
- z-index: 1;
23
- top: 1.5rem;
24
- right: 0;
25
- transform: translate(0.625rem, -0.625rem);
26
- cursor: pointer;
27
- }
28
-
29
- .confirmation-dialog-header {
30
- display: flex;
31
- padding-top: 0.5rem;
32
- position: relative;
33
-
34
- .icon {
35
- margin-top: 1rem;
36
- margin-bottom: 1.5rem;
37
- margin-inline: auto;
38
-
39
- &.info {
40
- path {
41
- stroke: #12131a;
42
- }
43
-
44
- line {
45
- stroke: #12131a;
46
-
47
- & + path {
48
- fill: #12131a;
49
- }
50
- }
51
- }
52
-
53
- &.warning {
54
- path {
55
- stroke: #faad14;
56
- }
57
-
58
- line {
59
- stroke: #faad14;
60
- }
61
- }
62
-
63
- &.error {
64
- path {
65
- stroke: #da3f3f;
66
- }
67
-
68
- line {
69
- stroke: #da3f3f;
70
-
71
- & + path {
72
- fill: #da3f3f;
73
- }
74
- }
75
- }
76
- }
77
- }
78
-
79
- .confirmation-title {
80
- font-size: 1.5rem;
81
- font-weight: 500;
82
- line-height: 1.875rem;
83
- text-align: center;
84
- margin-bottom: 0.625rem;
85
-
86
- &.error-title {
87
- color: #da3f3f;
88
- }
89
-
90
- &.warning-title {
91
- color: #faad14;
92
- }
93
- }
94
-
95
- .confirmation-dialog-footer {
96
- display: flex;
97
- gap: 1.25rem;
98
- margin-top: 1.875rem;
99
- }
100
- }
101
- }
102
- }
103
- }
104
- }
1
+ #common-dialog {
2
+ &.dialog-content-wrapper {
3
+ overflow: visible !important;
4
+ max-height: 100%;
5
+ width: 22.1875rem;
6
+
7
+ .dialog-content-root {
8
+ overflow: visible !important;
9
+ border-radius: 0.625rem;
10
+ max-height: 100%;
11
+
12
+ .dialog-content {
13
+ padding: 0 1.875rem !important;
14
+ overflow: visible !important;
15
+ max-height: 100%;
16
+
17
+ .common-dialog {
18
+ position: relative;
19
+
20
+ .close-icon {
21
+ position: absolute;
22
+ z-index: 1;
23
+ top: 1.5rem;
24
+ right: 0;
25
+ transform: translate(0.625rem, -0.625rem);
26
+ cursor: pointer;
27
+ }
28
+
29
+ .confirmation-dialog-header {
30
+ display: flex;
31
+ padding-top: 0.5rem;
32
+ position: relative;
33
+
34
+ .icon {
35
+ margin-top: 1rem;
36
+ margin-bottom: 1.5rem;
37
+ margin-inline: auto;
38
+
39
+ &.info {
40
+ path {
41
+ stroke: #12131a;
42
+ }
43
+
44
+ line {
45
+ stroke: #12131a;
46
+
47
+ & + path {
48
+ fill: #12131a;
49
+ }
50
+ }
51
+ }
52
+
53
+ &.warning {
54
+ path {
55
+ stroke: #faad14;
56
+ }
57
+
58
+ line {
59
+ stroke: #faad14;
60
+ }
61
+ }
62
+
63
+ &.error {
64
+ path {
65
+ stroke: #da3f3f;
66
+ }
67
+
68
+ line {
69
+ stroke: #da3f3f;
70
+
71
+ & + path {
72
+ fill: #da3f3f;
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ .confirmation-title {
80
+ font-size: 1.5rem;
81
+ font-weight: 500;
82
+ line-height: 1.875rem;
83
+ text-align: center;
84
+ margin-bottom: 0.625rem;
85
+
86
+ &.error-title {
87
+ color: #da3f3f;
88
+ }
89
+
90
+ &.warning-title {
91
+ color: #faad14;
92
+ }
93
+ }
94
+
95
+ .confirmation-dialog-footer {
96
+ display: flex;
97
+ gap: 1.25rem;
98
+ margin-top: 1.875rem;
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }