@qualcomm-ui/react-swagger 1.3.37 → 1.4.1

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/index.js CHANGED
@@ -33,7 +33,7 @@ import { toString as ue } from "lodash-es";
33
33
  import { Link as de } from "@qualcomm-ui/react/link";
34
34
  import { InlineNotification as fe } from "@qualcomm-ui/react/inline-notification";
35
35
  import { Progress as pe } from "@qualcomm-ui/react/progress";
36
- //#region src/internal/json-model-viewer/stores/json-viewer-store.ts
36
+ // src/internal/json-model-viewer/stores/json-viewer-store.ts
37
37
  var DefaultKeyRenderer = () => null;
38
38
  DefaultKeyRenderer.when = () => !1;
39
39
  var createJsonViewerStore = (e) => F()((t, n) => ({
@@ -83,8 +83,7 @@ var useJsonViewerStore = (e) => {
83
83
  if (!t) throw Error("JsonModelViewer components must be wrapped in <JsonViewerProvider>");
84
84
  return L(t, e);
85
85
  };
86
- //#endregion
87
- //#region src/internal/json-model-viewer/components/internal/ref-name.tsx
86
+ // src/internal/json-model-viewer/components/internal/ref-name.tsx
88
87
  RefName.displayName = "RefName";
89
88
  function RefName({ inspect: e, isArray: t, refName: n }) {
90
89
  let r = useJsonViewerStore((e) => e.renderLink);
@@ -102,8 +101,7 @@ function RefName({ inspect: e, isArray: t, refName: n }) {
102
101
  })]
103
102
  });
104
103
  }
105
- //#endregion
106
- //#region src/internal/json-model-viewer/components/internal/utils.ts
104
+ // src/internal/json-model-viewer/components/internal/utils.ts
107
105
  function isObject(e) {
108
106
  return !!(e && typeof e == "object" && "type" in e && e.type === "object");
109
107
  }
@@ -141,8 +139,7 @@ function segmentArray(e, t) {
141
139
  for (; r < e.length;) n.push(e.slice(r, r + t)), r += t;
142
140
  return n;
143
141
  }
144
- //#endregion
145
- //#region src/internal/json-model-viewer/components/data-types/object.tsx
142
+ // src/internal/json-model-viewer/components/data-types/object.tsx
146
143
  var he = "{", ge = "[", _e = "}", ve = "]";
147
144
  function inspectMetadata(e) {
148
145
  let t = getValueSize(e), n = "";
@@ -287,8 +284,7 @@ var ye = {
287
284
  PostComponent: PostObjectType,
288
285
  PreComponent: PreObjectType
289
286
  };
290
- //#endregion
291
- //#region src/internal/json-model-viewer/components/data-types/array-schema.tsx
287
+ // src/internal/json-model-viewer/components/data-types/array-schema.tsx
292
288
  function PreArrayType(e) {
293
289
  let t = e.refName, n = useJsonViewerStore((e) => e.colorspace.base06), r = getArrayType(e.value);
294
290
  return /* @__PURE__ */ B("span", {
@@ -331,8 +327,7 @@ var be = {
331
327
  className: "data-type-label",
332
328
  children: e
333
329
  }) : null;
334
- //#endregion
335
- //#region src/internal/json-model-viewer/components/data-types/define-easy-type.tsx
330
+ // src/internal/json-model-viewer/components/data-types/define-easy-type.tsx
336
331
  function defineEasyType({ colorKey: e, deserialize: t, displayTypeLabel: r = !0, is: i, Renderer: a, serialize: o, type: s }) {
337
332
  let c = n(a), EasyType = (t) => {
338
333
  let n = useJsonViewerStore((e) => e.displayDataTypes), i = useJsonViewerStore((t) => t.colorspace[e]);
@@ -362,8 +357,7 @@ function defineEasyType({ colorKey: e, deserialize: t, displayTypeLabel: r = !0,
362
357
  serialize: o
363
358
  };
364
359
  }
365
- //#endregion
366
- //#region src/internal/json-model-viewer/components/data-types/boolean-schema.tsx
360
+ // src/internal/json-model-viewer/components/data-types/boolean-schema.tsx
367
361
  var xe = defineEasyType({
368
362
  colorKey: "base09",
369
363
  is: (e) => !!(e && typeof e == "object" && "type" in e && e.type === "boolean"),
@@ -489,8 +483,7 @@ var xe = defineEasyType({
489
483
  serialize: (e) => e.toString(),
490
484
  type: "bigint"
491
485
  });
492
- //#endregion
493
- //#region src/internal/json-model-viewer/components/data-types/string-enum-type.tsx
486
+ // src/internal/json-model-viewer/components/data-types/string-enum-type.tsx
494
487
  function isEnum(e) {
495
488
  return !!(e.value && typeof e.value == "object" && "enum" in e.value);
496
489
  }
@@ -559,8 +552,7 @@ var Pe = defineEasyType({
559
552
  },
560
553
  type: "undefined"
561
554
  });
562
- //#endregion
563
- //#region src/internal/json-model-viewer/stores/type-registry.tsx
555
+ // src/internal/json-model-viewer/stores/type-registry.tsx
564
556
  function memoizeDataType(e) {
565
557
  function compare(e, t) {
566
558
  return Object.is(e.value, t.value) && e.inspect && t.inspect && e.path?.join(".") === t.path?.join(".");
@@ -613,11 +605,9 @@ function useTypeComponents(e, t) {
613
605
  n
614
606
  ]);
615
607
  }
616
- //#endregion
617
- //#region src/internal/json-model-viewer/hooks/use-color.ts
608
+ // src/internal/json-model-viewer/hooks/use-color.ts
618
609
  var useTextColor = () => useJsonViewerStore((e) => e.colorspace.base07);
619
- //#endregion
620
- //#region src/internal/json-model-viewer/hooks/use-is-cycle-reference.ts
610
+ // src/internal/json-model-viewer/hooks/use-is-cycle-reference.ts
621
611
  function useIsCycleReference(e, t) {
622
612
  let n = useJsonViewerStore((e) => e.value);
623
613
  return s(() => e[e.length - 1] !== "properties" && isCycleReference(n, e, t), [
@@ -626,8 +616,7 @@ function useIsCycleReference(e, t) {
626
616
  n
627
617
  ]);
628
618
  }
629
- //#endregion
630
- //#region src/internal/json-model-viewer/hooks/use-inspect.ts
619
+ // src/internal/json-model-viewer/hooks/use-inspect.ts
631
620
  function useInspect(e, t, n) {
632
621
  let i = e.length, o = useIsCycleReference(e, t), s = useJsonViewerStore((e) => e.getInspectCache), c = useJsonViewerStore((e) => e.setInspectCache), u = useJsonViewerStore((e) => e.defaultInspectDepth), d = useJsonViewerStore((e) => e.defaultInspectControl);
633
622
  a(() => {
@@ -664,8 +653,7 @@ function useInspect(e, t, n) {
664
653
  c
665
654
  ])];
666
655
  }
667
- //#endregion
668
- //#region src/internal/json-model-viewer/components/data-key-pair.tsx
656
+ // src/internal/json-model-viewer/components/data-key-pair.tsx
669
657
  function DataKeyPair(e) {
670
658
  let { nestedIndex: t, path: n, prevValue: i, value: o } = e, { Component: u, PostComponent: h, PreComponent: g } = useTypeComponents(o, n), _ = n.length, v = n[_ - 1], y = useJsonViewerStore((e) => e.setHover), b = useJsonViewerStore((e) => e.value), [x, S] = useInspect(n, o, t), C = useTextColor(), w = useJsonViewerStore((e) => e.colorspace.base0C), T = useJsonViewerStore((e) => e.colorspace.base0A), E = useJsonViewerStore((e) => e.quotesOnKeys), D = useJsonViewerStore((e) => e.rootName), O = useJsonViewerStore((e) => e.displayNumberKeys), k = b === o, A = Number.isInteger(Number(v)), j = useJsonViewerStore((e) => e.highlightUpdates), F = s(() => !j || i === void 0 ? !1 : typeof o == typeof i ? typeof o == "number" ? isNaN(o) && isNaN(i) ? !1 : o !== i : Array.isArray(o) === Array.isArray(i) ? typeof o == "object" || typeof o == "function" ? !1 : o !== i : !0 : !0, [
671
659
  j,
@@ -788,8 +776,7 @@ function DataKeyPair(e) {
788
776
  })
789
777
  });
790
778
  }
791
- //#endregion
792
- //#region src/internal/json-model-viewer/theme/base16.ts
779
+ // src/internal/json-model-viewer/theme/base16.ts
793
780
  var Be = {
794
781
  author: "mac gainor (https://github.com/mac-s-g)",
795
782
  base0A: "#ffd500",
@@ -872,14 +859,12 @@ function JsonModelViewer(e) {
872
859
  })
873
860
  });
874
861
  }
875
- //#endregion
876
- //#region src/internal/use-theme-context.tsx
862
+ // src/internal/use-theme-context.tsx
877
863
  var He = t("dark"), Ue = He.Provider;
878
864
  function useThemeContext() {
879
865
  return i(He);
880
866
  }
881
- //#endregion
882
- //#region src/internal/array-model.tsx
867
+ // src/internal/array-model.tsx
883
868
  ArrayModel.displayName = "ArrayModel";
884
869
  function ArrayModel(e) {
885
870
  let { schema: t } = e, n = e.getComponent("RenderLink"), r = t.get("title") || e.displayName || e.name, i = r ? /* @__PURE__ */ z("button", {
@@ -905,8 +890,7 @@ function ArrayModel(e) {
905
890
  })]
906
891
  });
907
892
  }
908
- //#endregion
909
- //#region src/internal/auth/api-key-auth.tsx
893
+ // src/internal/auth/api-key-auth.tsx
910
894
  function ApiKeyAuth(e) {
911
895
  let getValue = () => {
912
896
  let { authorized: t, name: n } = e;
@@ -960,8 +944,7 @@ function ApiKeyAuth(e) {
960
944
  ]
961
945
  });
962
946
  }
963
- //#endregion
964
- //#region src/internal/auth/auth-item.tsx
947
+ // src/internal/auth/auth-item.tsx
965
948
  function AuthItem(e) {
966
949
  let { authorized: t, errSelectors: n, getComponent: r, name: i, onAuthChange: a, schema: o } = e, s = r("apiKeyAuth"), c = r("basicAuth"), l, u = o.get("type");
967
950
  switch (u) {
@@ -989,8 +972,7 @@ function AuthItem(e) {
989
972
  }
990
973
  return /* @__PURE__ */ z("div", { children: l }, `${i}-jump`);
991
974
  }
992
- //#endregion
993
- //#region src/internal/auth/authorization-popup.tsx
975
+ // src/internal/auth/authorization-popup.tsx
994
976
  function AuthorizationPopup({ authActions: e, authSelectors: t, errSelectors: n, fn: r, getComponent: i, specSelectors: a }) {
995
977
  let close = () => {
996
978
  e.showDefinitions(!1);
@@ -1022,8 +1004,7 @@ function AuthorizationPopup({ authActions: e, authSelectors: t, errSelectors: n,
1022
1004
  }) })
1023
1005
  });
1024
1006
  }
1025
- //#endregion
1026
- //#region src/internal/auth/authorize-btn.tsx
1007
+ // src/internal/auth/authorize-btn.tsx
1027
1008
  function AuthorizeBtn({ getComponent: e, isAuthorized: t, onClick: n, showPopup: r }) {
1028
1009
  let i = e("authorizationPopup", !0);
1029
1010
  return /* @__PURE__ */ B("div", {
@@ -1037,8 +1018,7 @@ function AuthorizeBtn({ getComponent: e, isAuthorized: t, onClick: n, showPopup:
1037
1018
  }), r && /* @__PURE__ */ z(i, {})]
1038
1019
  });
1039
1020
  }
1040
- //#endregion
1041
- //#region src/internal/auth/authorize-operation-btn.tsx
1021
+ // src/internal/auth/authorize-operation-btn.tsx
1042
1022
  AuthorizeOperationBtn.displayName = "AuthorizeOperationBtn";
1043
1023
  function AuthorizeOperationBtn(e) {
1044
1024
  function onClick(t) {
@@ -1053,8 +1033,7 @@ function AuthorizeOperationBtn(e) {
1053
1033
  variant: "ghost"
1054
1034
  });
1055
1035
  }
1056
- //#endregion
1057
- //#region src/internal/auth/auths.tsx
1036
+ // src/internal/auth/auths.tsx
1058
1037
  function Auths(e) {
1059
1038
  let [t, n] = l({}), onAuthChange = (e) => {
1060
1039
  let { name: r } = e;
@@ -1121,8 +1100,7 @@ function Auths(e) {
1121
1100
  }) : null]
1122
1101
  });
1123
1102
  }
1124
- //#endregion
1125
- //#region src/internal/auth/basic-auth.tsx
1103
+ // src/internal/auth/basic-auth.tsx
1126
1104
  function BasicAuth(e) {
1127
1105
  let [t, n] = l({
1128
1106
  name: e.name,
@@ -1173,8 +1151,7 @@ function BasicAuth(e) {
1173
1151
  m.valueSeq().map((e, t) => /* @__PURE__ */ z(u, { error: e }, t))
1174
1152
  ] });
1175
1153
  }
1176
- //#endregion
1177
- //#region src/internal/auth/utils.ts
1154
+ // src/internal/auth/utils.ts
1178
1155
  function b64toB64UrlEncoded(e) {
1179
1156
  return e.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
1180
1157
  }
@@ -1255,8 +1232,7 @@ function authorizeOauth2({ auth: e, authActions: t, authConfigs: n = {}, configs
1255
1232
  state: m
1256
1233
  });
1257
1234
  }
1258
- //#endregion
1259
- //#region src/internal/auth/oauth2.tsx
1235
+ // src/internal/auth/oauth2.tsx
1260
1236
  Oauth2.displayName = "Oauth2";
1261
1237
  function Oauth2(e) {
1262
1238
  let { authorized: t, authSelectors: n, errSelectors: r, getComponent: i, name: a, schema: o, specSelectors: s } = e, c = t && t.get(a), u = n.getConfigs() || {}, d = c && c.get("username") || "", f = c && c.get("clientId") || u.clientId || "", p = c && c.get("clientSecret") || u.clientSecret || "", m = c && c.get("passwordType") || "basic", h = c && c.get("scopes") || u.scopes || [];
@@ -1504,8 +1480,7 @@ function Oauth2(e) {
1504
1480
  ]
1505
1481
  });
1506
1482
  }
1507
- //#endregion
1508
- //#region src/internal/clear.tsx
1483
+ // src/internal/clear.tsx
1509
1484
  function Clear(e) {
1510
1485
  return /* @__PURE__ */ z(j, {
1511
1486
  endIcon: k,
@@ -1517,8 +1492,7 @@ function Clear(e) {
1517
1492
  children: "Clear"
1518
1493
  });
1519
1494
  }
1520
- //#endregion
1521
- //#region src/internal/content-type.tsx
1495
+ // src/internal/content-type.tsx
1522
1496
  function ContentType({ ariaControls: e, ariaLabel: t, contentTypes: n, label: r, onChange: i, value: o = null }) {
1523
1497
  let c = s(() => q.fromJS(n), [n]), l = s(() => !c || !c.size ? null : W({ items: c.toArray() }), [c]);
1524
1498
  return te(() => {
@@ -1546,8 +1520,7 @@ function ContentType({ ariaControls: e, ariaLabel: t, contentTypes: n, label: r,
1546
1520
  value: o ? [o] : []
1547
1521
  });
1548
1522
  }
1549
- //#endregion
1550
- //#region src/internal/enum-model.tsx
1523
+ // src/internal/enum-model.tsx
1551
1524
  EnumModel.displayName = "EnumModel";
1552
1525
  var KeyRenderer = () => null;
1553
1526
  KeyRenderer.when = () => !0;
@@ -1567,8 +1540,7 @@ function EnumModel({ getComponent: e, value: t }) {
1567
1540
  value: t.toJSON()
1568
1541
  });
1569
1542
  }
1570
- //#endregion
1571
- //#region src/internal/execute.tsx
1543
+ // src/internal/execute.tsx
1572
1544
  function Execute(e) {
1573
1545
  let handleValidateParameters = () => {
1574
1546
  let { method: t, path: n, specActions: r, specSelectors: i } = e;
@@ -1629,8 +1601,7 @@ function Execute(e) {
1629
1601
  children: "Execute"
1630
1602
  });
1631
1603
  }
1632
- //#endregion
1633
- //#region src/code-mirror/docs-code-mirror.tsx
1604
+ // src/code-mirror/docs-code-mirror.tsx
1634
1605
  DocsCodeMirror.displayName = "DocsCodeMirror";
1635
1606
  function DocsCodeMirror({ basicSetup: e, copyable: t, downloadable: n, handleDownload: r, language: i = "json", theme: a = "dark", value: o, ...c }) {
1636
1607
  let l = typeof e == "object" ? e : {}, u = s(() => {
@@ -1674,8 +1645,7 @@ function DocsCodeMirror({ basicSetup: e, copyable: t, downloadable: n, handleDow
1674
1645
  }) : null]
1675
1646
  });
1676
1647
  }
1677
- //#endregion
1678
- //#region src/internal/utils.ts
1648
+ // src/internal/utils.ts
1679
1649
  function sanitizeUrl$1(e) {
1680
1650
  return typeof e != "string" || e === "" ? "" : se(e);
1681
1651
  }
@@ -1726,8 +1696,7 @@ function getList(e, t) {
1726
1696
  return q.List.isList(n) ? n : q.List();
1727
1697
  }
1728
1698
  var getExtensions = (e) => e.filter((e, t) => t.startsWith("x-"));
1729
- //#endregion
1730
- //#region src/internal/highlight-code.tsx
1699
+ // src/internal/highlight-code.tsx
1731
1700
  function HighlightCode({ canCopy: e, children: t, downloadable: n, fileName: r = "response.txt", language: i }) {
1732
1701
  let handleDownload = () => {
1733
1702
  jsFileDownload(t, r);
@@ -1745,8 +1714,7 @@ function HighlightCode({ canCopy: e, children: t, downloadable: n, fileName: r =
1745
1714
  })
1746
1715
  });
1747
1716
  }
1748
- //#endregion
1749
- //#region src/internal/json-schema-array-item-file.tsx
1717
+ // src/internal/json-schema-array-item-file.tsx
1750
1718
  JsonSchemaArrayItemFile.displayName = "JsonSchemaArrayItemFile";
1751
1719
  function JsonSchemaArrayItemFile(e) {
1752
1720
  let onFileChange = (t) => {
@@ -1761,8 +1729,7 @@ function JsonSchemaArrayItemFile(e) {
1761
1729
  type: "file"
1762
1730
  });
1763
1731
  }
1764
- //#endregion
1765
- //#region src/internal/json-schema-array-item-text.tsx
1732
+ // src/internal/json-schema-array-item-text.tsx
1766
1733
  JsonSchemaArrayItemText.displayName = "JsonSchemaArrayItemText";
1767
1734
  function JsonSchemaArrayItemText(e) {
1768
1735
  let { description: t, disabled: n, errors: r, keyName: i = "", onChange: onChangeProp = () => {}, value: a = "" } = e, onChange = (e) => {
@@ -1779,8 +1746,7 @@ function JsonSchemaArrayItemText(e) {
1779
1746
  value: s
1780
1747
  });
1781
1748
  }
1782
- //#endregion
1783
- //#region src/internal/json-schema-array.tsx
1749
+ // src/internal/json-schema-array.tsx
1784
1750
  JsonSchemaArray.displayName = "JsonSchemaArray";
1785
1751
  function valueOrEmptyList(e) {
1786
1752
  return q.List.isList(e) ? e : Array.isArray(e) ? q.fromJS(e) : q.List();
@@ -1872,8 +1838,7 @@ function JsonSchemaArray(e) {
1872
1838
  })]
1873
1839
  });
1874
1840
  }
1875
- //#endregion
1876
- //#region src/internal/json-schema-object.tsx
1841
+ // src/internal/json-schema-object.tsx
1877
1842
  JsonSchemaObject.displayName = "JsonSchemaObject";
1878
1843
  function JsonSchemaObject(e) {
1879
1844
  let onChange = (t) => {
@@ -1894,8 +1859,7 @@ function JsonSchemaObject(e) {
1894
1859
  value: stringify(n)
1895
1860
  }) });
1896
1861
  }
1897
- //#endregion
1898
- //#region src/internal/json-schema-string.tsx
1862
+ // src/internal/json-schema-string.tsx
1899
1863
  JsonSchemaString.displayName = "JsonSchemaString";
1900
1864
  function JsonSchemaString({ description: e, disabled: t, errors: n, keyName: r, onChange: i, required: a, schema: o, value: c }) {
1901
1865
  let onFileChange = (e) => {
@@ -1928,16 +1892,14 @@ function JsonSchemaString({ description: e, disabled: t, errors: n, keyName: r,
1928
1892
  value: p
1929
1893
  });
1930
1894
  }
1931
- //#endregion
1932
- //#region src/internal/use-swagger-context.tsx
1895
+ // src/internal/use-swagger-context.tsx
1933
1896
  var We = t(null), Ge = We.Provider;
1934
1897
  function useSwaggerContext() {
1935
1898
  let e = i(We);
1936
1899
  if (!e) throw Error("QUI Swagger must be wrapped by a <SwaggerContextProvider>");
1937
1900
  return e;
1938
1901
  }
1939
- //#endregion
1940
- //#region src/internal/layout.tsx
1902
+ // src/internal/layout.tsx
1941
1903
  Layout.displayName = "Layout";
1942
1904
  function Layout({ errSelectors: e, getComponent: t, specSelectors: n }) {
1943
1905
  let r = t("SvgAssets"), i = t("InfoContainer", !0), a = t("VersionPragmaFilter"), o = t("operations", !0), s = t("Models", !0), c = t("Webhooks", !0), l = t("Row"), u = t("Col"), f = t("errors", !0), p = t("ServersContainer", !0), m = t("SchemesContainer", !0), h = t("AuthorizeBtnContainer", !0), g = t("FilterContainer", !0), _ = n.isSwagger2(), v = n.isOAS3(), y = n.isOAS31(), b = !n.specStr(), x = n.loadingStatus(), { hideTitleSection: S } = useSwaggerContext(), C = null;
@@ -2025,8 +1987,7 @@ function Layout({ errSelectors: e, getComponent: t, specSelectors: n }) {
2025
1987
  })]
2026
1988
  });
2027
1989
  }
2028
- //#endregion
2029
- //#region src/internal/model-collapse.tsx
1990
+ // src/internal/model-collapse.tsx
2030
1991
  ModelCollapse.displayName = "ModelCollapse";
2031
1992
  function ModelCollapse({ children: e, classes: t, collapsedContent: n = "{...}", expanded: i = !0, hideSelfOnExpand: s = !1, modelId: u, modelName: d, onToggle: f, title: p }) {
2032
1993
  let [m, h] = l(i), g = c(!1);
@@ -2078,8 +2039,7 @@ function ModelCollapse({ children: e, classes: t, collapsedContent: n = "{...}",
2078
2039
  })
2079
2040
  }) });
2080
2041
  }
2081
- //#endregion
2082
- //#region src/internal/model-example.tsx
2042
+ // src/internal/model-example.tsx
2083
2043
  var usePrevious = (e) => {
2084
2044
  let t = c(void 0);
2085
2045
  return a(() => {
@@ -2164,8 +2124,7 @@ function ModelExample({ example: e, getComponent: t, getConfigs: n, includeReadO
2164
2124
  })
2165
2125
  });
2166
2126
  }
2167
- //#endregion
2168
- //#region src/internal/model-wrapper.tsx
2127
+ // src/internal/model-wrapper.tsx
2169
2128
  function ModelWrapper(e) {
2170
2129
  let { expandDepth: t, fullPath: n, getComponent: r, getConfigs: i, layoutActions: a, layoutSelectors: o } = e, onToggle = (e, t) => {
2171
2130
  a && a.show(n, t);
@@ -2182,8 +2141,7 @@ function ModelWrapper(e) {
2182
2141
  })
2183
2142
  });
2184
2143
  }
2185
- //#endregion
2186
- //#region src/internal/use-jump-to-hash.tsx
2144
+ // src/internal/use-jump-to-hash.tsx
2187
2145
  function useJumpToHash(e, t, n) {
2188
2146
  let r = e?.(), i = c(!1);
2189
2147
  a(() => {
@@ -2198,8 +2156,7 @@ function useJumpToHash(e, t, n) {
2198
2156
  n
2199
2157
  ]);
2200
2158
  }
2201
- //#endregion
2202
- //#region src/internal/models.tsx
2159
+ // src/internal/models.tsx
2203
2160
  Models.displayName = "Models";
2204
2161
  function Models(e) {
2205
2162
  let getSchemaBasePath = () => e.specSelectors.isOAS3() ? ["components", "schemas"] : ["definitions"], handleToggle = (t, n) => {
@@ -2289,8 +2246,7 @@ function Models(e) {
2289
2246
  })]
2290
2247
  });
2291
2248
  }
2292
- //#endregion
2293
- //#region src/internal/object-model.tsx
2249
+ // src/internal/object-model.tsx
2294
2250
  ObjectModel.displayName = "ObjectModelOriginal";
2295
2251
  function ObjectModel(e) {
2296
2252
  let { displayName: t, isRef: n, schema: r } = e, i = useThemeContext(), o = c(!1);
@@ -2325,8 +2281,7 @@ function ObjectModel(e) {
2325
2281
  })]
2326
2282
  });
2327
2283
  }
2328
- //#endregion
2329
- //#region src/internal/operation-summary-method.tsx
2284
+ // src/internal/operation-summary-method.tsx
2330
2285
  OperationSummaryMethod.displayName = "OperationSummaryMethod";
2331
2286
  var Ke = {
2332
2287
  delete: { emphasis: "danger" },
@@ -2368,8 +2323,7 @@ function OperationSummaryMethod({ method: e }) {
2368
2323
  children: e.toUpperCase()
2369
2324
  });
2370
2325
  }
2371
- //#endregion
2372
- //#region src/internal/operation-summary-path.tsx
2326
+ // src/internal/operation-summary-path.tsx
2373
2327
  OperationSummaryPath.displayName = "OperationSummaryPath";
2374
2328
  function OperationSummaryPath({ operationProps: t }) {
2375
2329
  let { deprecated: n, path: r } = t.toJS(), i = r.split(/(?=\/)/g);
@@ -2380,8 +2334,7 @@ function OperationSummaryPath({ operationProps: t }) {
2380
2334
  children: i.map((t, n) => /* @__PURE__ */ z(e, { children: t }, n))
2381
2335
  });
2382
2336
  }
2383
- //#endregion
2384
- //#region src/internal/operation-summary.tsx
2337
+ // src/internal/operation-summary.tsx
2385
2338
  OperationSummary.displayName = "OperationSummary";
2386
2339
  function OperationSummary({ authActions: e, authSelectors: t, fn: n, getComponent: r, isShown: i, operationProps: a, specPath: o, toggleShown: s }) {
2387
2340
  let { displayOperationId: c, isAuthorized: l, method: u, op: f, operationId: p, originalOperationId: m, showSummary: g, summary: _ } = a.toJS(), { summary: v } = f, y = a.get("security"), b = r("authorizeOperationBtn", !0), S = r("OperationSummaryMethod"), C = r("OperationSummaryPath"), w = y && !!y.count(), T = w && y.size === 1 && y.first().isEmpty(), E = !w || T, D = `${p}-1`, O = r("RenderLink");
@@ -2442,8 +2395,7 @@ function OperationSummary({ authActions: e, authSelectors: t, fn: n, getComponen
2442
2395
  ]
2443
2396
  });
2444
2397
  }
2445
- //#endregion
2446
- //#region src/internal/operation-tag.tsx
2398
+ // src/internal/operation-tag.tsx
2447
2399
  function OperationTag(e) {
2448
2400
  let { children: t, getComponent: n, getConfigs: r, layoutActions: i, layoutSelectors: a, oas3Selectors: o, specUrl: s, tag: c, tagObj: l } = e, { deepLinking: u, docExpansion: f } = r(), p = n("Markdown", !0), m = n("DeepLink"), g = l.getIn(["tagDetails", "description"], null), _ = l.getIn([
2449
2401
  "tagDetails",
@@ -2498,8 +2450,7 @@ function OperationTag(e) {
2498
2450
  })]
2499
2451
  });
2500
2452
  }
2501
- //#endregion
2502
- //#region src/internal/operation.tsx
2453
+ // src/internal/operation.tsx
2503
2454
  function Operation({ authActions: e, authSelectors: t, fn: n, getComponent: r, getConfigs: i, oas3Actions: o, oas3Selectors: s, onCancelClick: c, onExecute: u, onResetClick: d, onTryoutClick: f, operation: p, request: m, response: h, specActions: g, specPath: _ = q.List(), specSelectors: v, toggleShown: y }) {
2504
2455
  let { allowTryItOut: b, deprecated: x, displayRequestDuration: S, executeInProgress: C, isShown: w, method: T, op: E, operationId: D, path: O, tag: k, tryItOutEnabled: A } = p.toJS(), { description: j, externalDocs: M, schemes: N } = E, F = M ? safeBuildUrl(M.url, v.url(), { selectedServer: s.selectedServer() }) : "", I = p.getIn(["op"]), L = I.get("responses"), R = getList(I, ["parameters"]), V = v.operationScheme(O, T), H = [
2505
2456
  "operations",
@@ -2666,8 +2617,7 @@ function Operation({ authActions: e, authSelectors: t, fn: n, getComponent: r, g
2666
2617
  })]
2667
2618
  });
2668
2619
  }
2669
- //#endregion
2670
- //#region src/internal/param-body.tsx
2620
+ // src/internal/param-body.tsx
2671
2621
  ParamBody.displayName = "ParamBody";
2672
2622
  function ParamBody({ consumes: e, consumesValue: t, fn: n, getComponent: i, isExecute: o, language: s, onChange: c, onChangeConsumes: u, param: d = q.fromJS({}), pathMethod: f, specSelectors: p }) {
2673
2623
  let [m, h] = l({
@@ -2757,8 +2707,7 @@ function ParamBody({ consumes: e, consumesValue: t, fn: n, getComponent: i, isEx
2757
2707
  function createHtmlReadyId(e, t = "_") {
2758
2708
  return e.replace(/[^\w-]/g, t);
2759
2709
  }
2760
- //#endregion
2761
- //#region src/internal/request-body-editor.tsx
2710
+ // src/internal/request-body-editor.tsx
2762
2711
  RequestBodyEditor.displayName = "RequestBodyEditor";
2763
2712
  function RequestBodyEditor(e) {
2764
2713
  let [t, n] = l(stringify(e.value || e.defaultValue));
@@ -2776,8 +2725,7 @@ function RequestBodyEditor(e) {
2776
2725
  value: t
2777
2726
  });
2778
2727
  }
2779
- //#endregion
2780
- //#region src/internal/schemes.tsx
2728
+ // src/internal/schemes.tsx
2781
2729
  Schemes.displayName = "Schemes";
2782
2730
  function Schemes(e) {
2783
2731
  let { currentScheme: t, method: n, path: i, schemes: o, specActions: c } = e, l = r((e) => {
@@ -2788,7 +2736,7 @@ function Schemes(e) {
2788
2736
  c
2789
2737
  ]), u = s(() => W({ items: o.valueSeq().toArray() }), [o]);
2790
2738
  return a(() => {
2791
- (!t || !o.includes(t)) && l(o.first());
2739
+ t && o.includes(t) || l(o.first());
2792
2740
  }, [
2793
2741
  t,
2794
2742
  o,
@@ -2803,8 +2751,7 @@ function Schemes(e) {
2803
2751
  value: t ? [t] : []
2804
2752
  });
2805
2753
  }
2806
- //#endregion
2807
- //#region src/internal/servers.tsx
2754
+ // src/internal/servers.tsx
2808
2755
  function Servers({ currentServer: e, getEffectiveServerValue: t, getServerVariable: n, servers: i, setSelectedServer: o, setServerVariableValue: c }) {
2809
2756
  let l = (i.find((t) => t.get("url") === e) || q.OrderedMap()).get("variables") || q.OrderedMap(), u = l.size !== 0;
2810
2757
  a(() => {
@@ -2866,8 +2813,7 @@ function Servers({ currentServer: e, getEffectiveServerValue: t, getServerVariab
2866
2813
  ] })]
2867
2814
  });
2868
2815
  }
2869
- //#endregion
2870
- //#region src/internal/syntax-highlighter.tsx
2816
+ // src/internal/syntax-highlighter.tsx
2871
2817
  SyntaxHighlighter.displayName = "SyntaxHighlighter";
2872
2818
  function SyntaxHighlighter({ children: e, ...t }) {
2873
2819
  let n = useThemeContext();
@@ -2877,8 +2823,7 @@ function SyntaxHighlighter({ children: e, ...t }) {
2877
2823
  value: e
2878
2824
  });
2879
2825
  }
2880
- //#endregion
2881
- //#region src/internal/try-it-out-button.tsx
2826
+ // src/internal/try-it-out-button.tsx
2882
2827
  TryItOutButton.displayName = "TryItOutButton";
2883
2828
  function TryItOutButton({ enabled: e, hasUserEditedBody: t, isOAS3: n, onCancelClick: r, onResetClick: i, onTryoutClick: a }) {
2884
2829
  let o = n && t;
@@ -2905,8 +2850,7 @@ function TryItOutButton({ enabled: e, hasUserEditedBody: t, isOAS3: n, onCancelC
2905
2850
  })]
2906
2851
  });
2907
2852
  }
2908
- //#endregion
2909
- //#region src/swagger.tsx
2853
+ // src/swagger.tsx
2910
2854
  var quiSwaggerPlugin = () => ({ components: {
2911
2855
  apiKeyAuth: ApiKeyAuth,
2912
2856
  ArrayModel,
@@ -2974,7 +2918,6 @@ function Swagger({ getHash: e, hideTitleSection: t, plugins: n, renderLink: r, t
2974
2918
  })
2975
2919
  });
2976
2920
  }
2977
- //#endregion
2978
2921
  export { Swagger };
2979
2922
 
2980
2923
  //# sourceMappingURL=index.js.map