@digi-frontend/dgate-api-documentation 1.0.26 → 1.0.28

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.
package/dist/styles.css CHANGED
@@ -271,6 +271,83 @@
271
271
  }
272
272
  .methodAccordion.readOnly .methodSummaryContainer .methodExpandArrowContainer {
273
273
  background-color: #ebecf2;
274
+ }#common-dialog.dialog-content-wrapper {
275
+ overflow: visible !important;
276
+ max-height: 100%;
277
+ width: 22.1875rem;
278
+ }
279
+ #common-dialog.dialog-content-wrapper .dialog-content-root {
280
+ overflow: visible !important;
281
+ border-radius: 0.625rem;
282
+ max-height: 100%;
283
+ }
284
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content {
285
+ padding: 0 1.875rem !important;
286
+ overflow: visible !important;
287
+ max-height: 100%;
288
+ }
289
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog {
290
+ position: relative;
291
+ }
292
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .close-icon {
293
+ position: absolute;
294
+ z-index: 1;
295
+ top: 1.5rem;
296
+ right: 0;
297
+ transform: translate(0.625rem, -0.625rem);
298
+ cursor: pointer;
299
+ }
300
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header {
301
+ display: flex;
302
+ padding-top: 0.5rem;
303
+ position: relative;
304
+ }
305
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon {
306
+ margin-top: 1rem;
307
+ margin-bottom: 1.5rem;
308
+ margin-inline: auto;
309
+ }
310
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info path {
311
+ stroke: #12131a;
312
+ }
313
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info line {
314
+ stroke: #12131a;
315
+ }
316
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info line + path {
317
+ fill: #12131a;
318
+ }
319
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.warning path {
320
+ stroke: #faad14;
321
+ }
322
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.warning line {
323
+ stroke: #faad14;
324
+ }
325
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error path {
326
+ stroke: #da3f3f;
327
+ }
328
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error line {
329
+ stroke: #da3f3f;
330
+ }
331
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error line + path {
332
+ fill: #da3f3f;
333
+ }
334
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title {
335
+ font-size: 1.5rem;
336
+ font-weight: 500;
337
+ line-height: 1.875rem;
338
+ text-align: center;
339
+ margin-bottom: 0.625rem;
340
+ }
341
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.error-title {
342
+ color: #da3f3f;
343
+ }
344
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.warning-title {
345
+ color: #faad14;
346
+ }
347
+ #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-footer {
348
+ display: flex;
349
+ gap: 1.25rem;
350
+ margin-top: 1.875rem;
274
351
  }.apiInfoForm {
275
352
  display: grid;
276
353
  padding: 1.25rem 1.875rem;
@@ -389,6 +466,48 @@
389
466
  content: "*";
390
467
  color: red;
391
468
  transform: translateX(0.125rem);
469
+ }.livePreviewContainer .titleContainer {
470
+ display: flex;
471
+ justify-content: space-between;
472
+ align-items: center;
473
+ flex-wrap: wrap;
474
+ max-width: 100%;
475
+ gap: 1.25rem;
476
+ }
477
+ .livePreviewContainer .titleContainer p.apiName {
478
+ font-size: 40px;
479
+ line-height: 30px;
480
+ font-weight: 500;
481
+ word-wrap: break-word;
482
+ overflow-wrap: break-word;
483
+ word-break: break-all;
484
+ }
485
+ .livePreviewContainer .titleContainer .livePreviewChip {
486
+ background-color: #ebecf2;
487
+ color: #12131a;
488
+ }.containerTitleDrawer {
489
+ height: 64px;
490
+ min-height: 64px;
491
+ display: flex;
492
+ flex-direction: row;
493
+ justify-content: space-between;
494
+ align-items: center;
495
+ background-color: #f1f2f6;
496
+ padding: 0 30px 0 30px;
497
+ width: 100%;
498
+ }
499
+ .containerTitleDrawer span {
500
+ color: #12131a;
501
+ font-weight: 600;
502
+ font-size: 18px;
503
+ line-height: 25px;
504
+ letter-spacing: 0em;
505
+ }
506
+ .containerTitleDrawer svg path {
507
+ stroke: #000 !important;
508
+ }
509
+ .containerTitleDrawer .closeIcon {
510
+ cursor: pointer;
392
511
  }.json-editor-container {
393
512
  overflow: hidden;
394
513
  border-bottom-right-radius: 0.3125rem;
@@ -500,83 +619,6 @@
500
619
  .json-editor-container.disabled .json-editor textarea {
501
620
  background-color: white;
502
621
  color: #12131a;
503
- }#common-dialog.dialog-content-wrapper {
504
- overflow: visible !important;
505
- max-height: 100%;
506
- width: 22.1875rem;
507
- }
508
- #common-dialog.dialog-content-wrapper .dialog-content-root {
509
- overflow: visible !important;
510
- border-radius: 0.625rem;
511
- max-height: 100%;
512
- }
513
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content {
514
- padding: 0 1.875rem !important;
515
- overflow: visible !important;
516
- max-height: 100%;
517
- }
518
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog {
519
- position: relative;
520
- }
521
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .close-icon {
522
- position: absolute;
523
- z-index: 1;
524
- top: 1.5rem;
525
- right: 0;
526
- transform: translate(0.625rem, -0.625rem);
527
- cursor: pointer;
528
- }
529
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header {
530
- display: flex;
531
- padding-top: 0.5rem;
532
- position: relative;
533
- }
534
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon {
535
- margin-top: 1rem;
536
- margin-bottom: 1.5rem;
537
- margin-inline: auto;
538
- }
539
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info path {
540
- stroke: #12131a;
541
- }
542
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info line {
543
- stroke: #12131a;
544
- }
545
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.info line + path {
546
- fill: #12131a;
547
- }
548
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.warning path {
549
- stroke: #faad14;
550
- }
551
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.warning line {
552
- stroke: #faad14;
553
- }
554
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error path {
555
- stroke: #da3f3f;
556
- }
557
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error line {
558
- stroke: #da3f3f;
559
- }
560
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-header .icon.error line + path {
561
- fill: #da3f3f;
562
- }
563
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title {
564
- font-size: 1.5rem;
565
- font-weight: 500;
566
- line-height: 1.875rem;
567
- text-align: center;
568
- margin-bottom: 0.625rem;
569
- }
570
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.error-title {
571
- color: #da3f3f;
572
- }
573
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.warning-title {
574
- color: #faad14;
575
- }
576
- #common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-footer {
577
- display: flex;
578
- gap: 1.25rem;
579
- margin-top: 1.875rem;
580
622
  }.tooltip-custom-wrapper {
581
623
  display: flex;
582
624
  }
@@ -672,19 +714,111 @@
672
714
  z-index: 2;
673
715
  top: -0.45rem;
674
716
  transform-origin: center !important;
675
- }.livePreviewContainer .titleContainer {
717
+ }:root {
718
+ --white: #fff;
719
+ --Gray-5: #f1f2f6;
720
+ --Gray-10: #ebecf2;
721
+ --Gray-20: #d8dae5;
722
+ --Gray-30: #babdcc;
723
+ --Gray-40: #9a9eb2;
724
+ --Gray-50: #828699;
725
+ --Gray-60: #696c80;
726
+ --Gray-100: #12131a;
727
+ --black: #000;
728
+ --primary-static: #4d75d8;
729
+ --primary-hover: #7c9bea;
730
+ --primary-active: #2c4fa4;
731
+ --primary-disabled: #9a9eb2;
732
+ --secondary-static: #40e0d0;
733
+ --secondary-hover: #9efcf2;
734
+ --secondary-active: #2fa599;
735
+ --error-static: #da3f3f;
736
+ --error-hover: #e75d5d;
737
+ --error-active: #bb3232;
738
+ --success-static: #3aaa35;
739
+ --success-hover: #5cda56;
740
+ --success-active: #2a8a25;
741
+ --info-static: #c6c6c6;
742
+ --info-hover: #e4e4e4;
743
+ --info-active: #979797;
744
+ --warning-static: #faad14;
745
+ --warning-hover: #f9be4a;
746
+ --warning-active: #db9711;
747
+ --action-static: #142452;
748
+ --action-hover: #21387d;
749
+ --action-active: #000000;
750
+ --color-info-primary: #3a6cd1;
751
+ --primary-font-color: #142452;
752
+ --placeholder-font-color: #babdcc;
753
+ --warning-font-color: #ce2828;
754
+ --alert-error: #da3f3f;
755
+ --alert-light-error: #f4c5c5;
756
+ --alert-success: #3aaa35;
757
+ --alert-light-success: #c4e5c2;
758
+ --alert-info: #8eaaf1;
759
+ --alert-light-info: #c4d3f1;
760
+ --alert-warning: #faad14;
761
+ --alert-light-warning: #fde6b8;
762
+ --border-focus: #3a6cd1;
763
+ --tooltip-background-color: #202f5b;
764
+ --text-color-primary: #142452;
765
+ --text-color-secondary: #ffff;
766
+ --text-color-neutral: #828699;
767
+ --text-color-tertiary: #808080;
768
+ --text-color-note: #242424;
769
+ --text-color-quaternary: #142452;
770
+ --text-color-disabled: #ffff;
771
+ --background-color-white-primary: #fff;
772
+ --background-color-light-primary: #8eaaf1;
773
+ --background-color-white-secondary: #fff;
774
+ --background-color-primary-dark: #142452;
775
+ --background-color-gray-5: #f1f2f6;
776
+ --background-color-gray-30: #ebecf2;
777
+ --background-color-tertiary-light: #2c4fa4;
778
+ --background-color-gray-10: #f1f2f6;
779
+ --background-color-gray-40: #ebecf2;
780
+ --background-color-light-blue: #dfe7f8;
781
+ --border-color-primary: #babdcc;
782
+ --border-color-secondary: #d8dae5;
783
+ --border-color-neutral: #ebecf2;
784
+ --border-color-tertiary: #ebecf2;
785
+ --border-color-gray: #ebecf2;
786
+ --border-color-hover: #142452;
787
+ --border-color-active: #3a6cd1;
788
+ --icon-color-main: #142452;
789
+ --icon-color-secondary: #000;
790
+ --icon-color-quaternary: #babdcc;
791
+ --icon-color-disabled: #9a9eb2;
792
+ --link-btn-primary-color: #3a6cd1;
793
+ --button-color-static: #4d75d8;
794
+ --button-color-hover: #7c9bea;
795
+ --button-color-active: #2c4fa4;
796
+ --alert-natural: #c4d3f1;
797
+ }
798
+
799
+ .drawerItemContainer {
676
800
  display: flex;
677
- justify-content: space-between;
678
- align-items: center;
801
+ flex-direction: column;
679
802
  }
680
- .livePreviewContainer .titleContainer p.apiName {
681
- font-size: 40px;
682
- line-height: 30px;
683
- font-weight: 500;
803
+ .drawerItemContainer .title {
804
+ color: #000;
805
+ font-weight: 600;
806
+ font-size: 24px;
807
+ line-height: 35px;
808
+ margin-bottom: 3px;
809
+ margin-top: 1.5rem;
684
810
  }
685
- .livePreviewContainer .titleContainer .livePreviewChip {
686
- background-color: #ebecf2;
687
- color: #12131a;
811
+ .drawerItemContainer .text {
812
+ color: #000;
813
+ font-weight: 400;
814
+ font-size: 24px;
815
+ line-height: 25px;
816
+ }
817
+ .drawerItemContainer .color-green {
818
+ color: var(--color-success);
819
+ }
820
+ .drawerItemContainer .color-red {
821
+ color: var(--color-error);
688
822
  }:root {
689
823
  --white: #fff;
690
824
  --Gray-5: #f1f2f6;
@@ -920,132 +1054,4 @@
920
1054
  .tableSectionContainer .descArrow path,
921
1055
  .tableSectionContainer .defaultSortArrow path {
922
1056
  fill: var(--Gray-50);
923
- }.containerTitleDrawer {
924
- height: 64px;
925
- min-height: 64px;
926
- display: flex;
927
- flex-direction: row;
928
- justify-content: space-between;
929
- align-items: center;
930
- background-color: #f1f2f6;
931
- padding: 0 30px 0 30px;
932
- width: 100%;
933
- }
934
- .containerTitleDrawer span {
935
- color: #12131a;
936
- font-weight: 600;
937
- font-size: 18px;
938
- line-height: 25px;
939
- letter-spacing: 0em;
940
- }
941
- .containerTitleDrawer svg path {
942
- stroke: #000 !important;
943
- }
944
- .containerTitleDrawer .closeIcon {
945
- cursor: pointer;
946
- }:root {
947
- --white: #fff;
948
- --Gray-5: #f1f2f6;
949
- --Gray-10: #ebecf2;
950
- --Gray-20: #d8dae5;
951
- --Gray-30: #babdcc;
952
- --Gray-40: #9a9eb2;
953
- --Gray-50: #828699;
954
- --Gray-60: #696c80;
955
- --Gray-100: #12131a;
956
- --black: #000;
957
- --primary-static: #4d75d8;
958
- --primary-hover: #7c9bea;
959
- --primary-active: #2c4fa4;
960
- --primary-disabled: #9a9eb2;
961
- --secondary-static: #40e0d0;
962
- --secondary-hover: #9efcf2;
963
- --secondary-active: #2fa599;
964
- --error-static: #da3f3f;
965
- --error-hover: #e75d5d;
966
- --error-active: #bb3232;
967
- --success-static: #3aaa35;
968
- --success-hover: #5cda56;
969
- --success-active: #2a8a25;
970
- --info-static: #c6c6c6;
971
- --info-hover: #e4e4e4;
972
- --info-active: #979797;
973
- --warning-static: #faad14;
974
- --warning-hover: #f9be4a;
975
- --warning-active: #db9711;
976
- --action-static: #142452;
977
- --action-hover: #21387d;
978
- --action-active: #000000;
979
- --color-info-primary: #3a6cd1;
980
- --primary-font-color: #142452;
981
- --placeholder-font-color: #babdcc;
982
- --warning-font-color: #ce2828;
983
- --alert-error: #da3f3f;
984
- --alert-light-error: #f4c5c5;
985
- --alert-success: #3aaa35;
986
- --alert-light-success: #c4e5c2;
987
- --alert-info: #8eaaf1;
988
- --alert-light-info: #c4d3f1;
989
- --alert-warning: #faad14;
990
- --alert-light-warning: #fde6b8;
991
- --border-focus: #3a6cd1;
992
- --tooltip-background-color: #202f5b;
993
- --text-color-primary: #142452;
994
- --text-color-secondary: #ffff;
995
- --text-color-neutral: #828699;
996
- --text-color-tertiary: #808080;
997
- --text-color-note: #242424;
998
- --text-color-quaternary: #142452;
999
- --text-color-disabled: #ffff;
1000
- --background-color-white-primary: #fff;
1001
- --background-color-light-primary: #8eaaf1;
1002
- --background-color-white-secondary: #fff;
1003
- --background-color-primary-dark: #142452;
1004
- --background-color-gray-5: #f1f2f6;
1005
- --background-color-gray-30: #ebecf2;
1006
- --background-color-tertiary-light: #2c4fa4;
1007
- --background-color-gray-10: #f1f2f6;
1008
- --background-color-gray-40: #ebecf2;
1009
- --background-color-light-blue: #dfe7f8;
1010
- --border-color-primary: #babdcc;
1011
- --border-color-secondary: #d8dae5;
1012
- --border-color-neutral: #ebecf2;
1013
- --border-color-tertiary: #ebecf2;
1014
- --border-color-gray: #ebecf2;
1015
- --border-color-hover: #142452;
1016
- --border-color-active: #3a6cd1;
1017
- --icon-color-main: #142452;
1018
- --icon-color-secondary: #000;
1019
- --icon-color-quaternary: #babdcc;
1020
- --icon-color-disabled: #9a9eb2;
1021
- --link-btn-primary-color: #3a6cd1;
1022
- --button-color-static: #4d75d8;
1023
- --button-color-hover: #7c9bea;
1024
- --button-color-active: #2c4fa4;
1025
- --alert-natural: #c4d3f1;
1026
- }
1027
-
1028
- .drawerItemContainer {
1029
- display: flex;
1030
- flex-direction: column;
1031
- }
1032
- .drawerItemContainer .title {
1033
- color: #000;
1034
- font-weight: 600;
1035
- font-size: 24px;
1036
- line-height: 35px;
1037
- margin-bottom: 3px;
1038
- margin-top: 1.5rem;
1039
- }
1040
- .drawerItemContainer .text {
1041
- color: #000;
1042
- font-weight: 400;
1043
- font-size: 24px;
1044
- line-height: 25px;
1045
- }
1046
- .drawerItemContainer .color-green {
1047
- color: var(--color-success);
1048
- }
1049
- .drawerItemContainer .color-red {
1050
- color: var(--color-error);
1051
1057
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digi-frontend/dgate-api-documentation",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "main": "dist/src/index.js",
5
5
  "module": "dist/src/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -182,24 +182,27 @@ const InfoForm = ({ readOnly }: { readOnly?: boolean }) => {
182
182
  ),
183
183
  externalDocs: (
184
184
  <div className={styles.paramDescContainer}>
185
- <a
186
- className={styles.externalDocsLink}
187
- href={values.tags[index].externalDocs?.url}
188
- target="_blank"
189
- style={
190
- !values.tags[index].externalDocs?.description
191
- ? { textDecoration: 'none', pointerEvents: 'none' }
192
- : {}
193
- }
194
- >
195
- {values.tags[index].externalDocs?.description
196
- ? values.tags[index].externalDocs?.description?.substring(0, 12)
197
- : '-'}
198
- {values.tags[index].externalDocs?.description &&
199
- values.tags[index].externalDocs?.description?.length > 12
200
- ? '...'
201
- : ''}
202
- </a>
185
+ {values.tags[index].externalDocs?.description && values.tags[index].externalDocs?.url && (
186
+ <a
187
+ className={styles.externalDocsLink}
188
+ href={values.tags[index].externalDocs?.url}
189
+ target="_blank"
190
+ style={
191
+ !values.tags[index].externalDocs?.description
192
+ ? { textDecoration: 'none', pointerEvents: 'none' }
193
+ : {}
194
+ }
195
+ >
196
+ {values.tags[index].externalDocs?.description
197
+ ? values.tags[index].externalDocs?.description?.substring(0, 12)
198
+ : readOnly && '-'}
199
+ {values.tags[index].externalDocs?.description &&
200
+ values.tags[index].externalDocs?.description?.length > 12
201
+ ? '...'
202
+ : ''}
203
+ </a>
204
+ )}
205
+
203
206
  <Tooltip
204
207
  arrowWithBorder
205
208
  placement="bottom-end"
@@ -258,7 +261,15 @@ const InfoForm = ({ readOnly }: { readOnly?: boolean }) => {
258
261
  setURL('')
259
262
  externalTooltipRefs[index]?.hide()
260
263
  }}
261
- disabled={!description?.trim() || !url?.trim() || !regex.urlRegex.test(url)}
264
+ disabled={
265
+ !(
266
+ (values.tags[index].externalDocs?.description &&
267
+ values.tags[index].externalDocs?.url &&
268
+ !description?.trim() &&
269
+ !url?.trim()) ||
270
+ (description?.trim() && url?.trim() && regex.urlRegex.test(url))
271
+ )
272
+ }
262
273
  >
263
274
  Apply
264
275
  </Button>
@@ -291,7 +302,9 @@ const InfoForm = ({ readOnly }: { readOnly?: boolean }) => {
291
302
  }}
292
303
  >
293
304
  {readOnly ||
294
- (item.externalDocs && (item.externalDocs?.url || item.externalDocs?.description))
305
+ (values.tags[index]?.externalDocs &&
306
+ (values.tags[index]?.externalDocs?.url ||
307
+ values.tags[index].externalDocs?.description))
295
308
  ? 'View '
296
309
  : 'Add '}{' '}
297
310
  External Docs Link
@@ -358,7 +371,7 @@ const InfoForm = ({ readOnly }: { readOnly?: boolean }) => {
358
371
  onClear={() => {
359
372
  setFieldValue('info.description', '')
360
373
  }}
361
- errorMessage={errors?.info?.description}
374
+ errorMsg={errors?.info?.description}
362
375
  />
363
376
  <div className={styles.paramsTable}>
364
377
  <TagsTable
@@ -3,11 +3,17 @@
3
3
  display: flex;
4
4
  justify-content: space-between;
5
5
  align-items: center;
6
+ flex-wrap: wrap;
7
+ max-width: 100%;
8
+ gap: 1.25rem;
6
9
 
7
10
  p.apiName {
8
11
  font-size: 40px;
9
12
  line-height: 30px;
10
13
  font-weight: 500;
14
+ word-wrap: break-word;
15
+ overflow-wrap: break-word;
16
+ word-break: break-all;
11
17
  }
12
18
 
13
19
  .livePreviewChip {
@@ -149,6 +149,7 @@ const MethodsAccordion = ({
149
149
  placeholder="Describe parameter..."
150
150
  value={item.description}
151
151
  disabled={readOnly}
152
+ maxLength={120}
152
153
  onChange={(value) => {
153
154
  if (value === '' || regex.ASCII.test(value))
154
155
  onTableChange('description', value, index)
@@ -247,7 +248,7 @@ const MethodsAccordion = ({
247
248
 
248
249
  useEffect(() => {
249
250
  // prepare tags selection list
250
- if (method?.tags.length || tags.length) {
251
+ if (method?.tags.length || tags?.length) {
251
252
  const convertedStringArray = (method?.tags || [])?.map((item) => ({
252
253
  label: capitalize(item),
253
254
  value: item,
@@ -322,6 +323,7 @@ const MethodsAccordion = ({
322
323
  className={styles.methodDesc}
323
324
  label="Description"
324
325
  placeholder="Describe the method's purpose and functionality..."
326
+ maxLength={120}
325
327
  value={method?.description}
326
328
  onChange={(value) => {
327
329
  if (value === '' || regex.ASCII.test(value)) setFieldValue('description', value)
@@ -22,6 +22,10 @@ export const transformOpenApiObject = (openApiJson: OpenAPIFile): TransformedOpe
22
22
  }
23
23
  }
24
24
 
25
+ if (!openApiJson.tags) {
26
+ openApiJson.tags = []
27
+ }
28
+
25
29
  return {
26
30
  ...openApiJson,
27
31
  paths: transformPathsToArray(openApiJson.paths),
@@ -105,6 +109,7 @@ export const transformPathsToArray = (paths: OpenAPIFile['paths']): TransformedP
105
109
  return obj
106
110
  }),
107
111
  }))
112
+
108
113
  return transformedPaths
109
114
  }
110
115
 
@@ -55,7 +55,8 @@
55
55
  }
56
56
  }
57
57
 
58
- :global(.textArea .inputField) {
58
+ :global(.textArea .inputField),
59
+ :global(.inputContainer .inputWrapper .innerInputContainer .input) {
59
60
  padding-inline-end: 2.5rem;
60
61
  }
61
62
  }
@@ -37,18 +37,19 @@ const Layout = ({ openApiJson, handleSave, setIsFormDirty }: ILayoutProps): JSX.
37
37
  validateForm(values)
38
38
  },
39
39
  })
40
+ const { dirty, isValid, isSubmitting, values, setFieldValue, handleSubmit } = formik
40
41
  const [isPublishDialogOpen, setIsPublishDialogOpen] = useState(false)
41
42
  const [openMethodIndex, setOpenMethodIndex] = useState<number | null>(null)
42
43
 
43
44
  useEffect(() => {
44
45
  if (setIsFormDirty) {
45
- setIsFormDirty(formik.dirty)
46
+ setIsFormDirty(dirty)
46
47
  }
47
- }, [formik.dirty])
48
+ }, [dirty])
48
49
 
49
50
  return (
50
51
  <div className={styles.docsLayout}>
51
- {formik.dirty && (
52
+ {dirty && (
52
53
  <Alert className={styles.apiDocAlert} color="warning" severity="warning">
53
54
  There are changes you made may not be saved
54
55
  </Alert>
@@ -68,7 +69,7 @@ const Layout = ({ openApiJson, handleSave, setIsFormDirty }: ILayoutProps): JSX.
68
69
  variant="contained"
69
70
  color="primary"
70
71
  onClick={() => setIsPublishDialogOpen(true)}
71
- disabled={!formik.isValid || formik.isSubmitting}
72
+ disabled={!isValid || isSubmitting || !dirty}
72
73
  >
73
74
  Save
74
75
  </Button>
@@ -80,7 +81,7 @@ const Layout = ({ openApiJson, handleSave, setIsFormDirty }: ILayoutProps): JSX.
80
81
  </FormikProvider>
81
82
  <SectionHead className={styles.editorSectionHead} text="Endpoints" />
82
83
  <FormikProvider value={formik}>
83
- {formik.values.paths.map((path, pathIndex) => (
84
+ {values.paths.map((path, pathIndex) => (
84
85
  <>
85
86
  {path.methods
86
87
  .sort(
@@ -88,12 +89,12 @@ const Layout = ({ openApiJson, handleSave, setIsFormDirty }: ILayoutProps): JSX.
88
89
  )
89
90
  .map((method, methodIndex) => (
90
91
  <MethodsAccordion
91
- tags={formik.values.tags}
92
+ tags={values.tags}
92
93
  method={method}
93
94
  path={path.path}
94
95
  setFieldValue={(key, value) => {
95
96
  const h = `paths[${pathIndex}].methods[${methodIndex}].${key}`
96
- formik.setFieldValue(h, value)
97
+ setFieldValue(h, value)
97
98
  }}
98
99
  isOpen={openMethodIndex === methodIndex}
99
100
  setIsOpen={(open) => setOpenMethodIndex(open ? methodIndex : null)}
@@ -127,7 +128,7 @@ const Layout = ({ openApiJson, handleSave, setIsFormDirty }: ILayoutProps): JSX.
127
128
  }
128
129
  onSubmit={{
129
130
  onClick: () => {
130
- formik.handleSubmit()
131
+ handleSubmit()
131
132
  setIsPublishDialogOpen(false)
132
133
  },
133
134
  text: 'Publish',