@scalar/api-client 2.9.0 → 2.9.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.
Files changed (122) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/CommandPalette/CommandActionForm.vue.js +9 -9
  3. package/dist/style.css +1 -1
  4. package/dist/v2/components/code-input/CodeInput.test.d.ts +2 -0
  5. package/dist/v2/components/code-input/CodeInput.test.d.ts.map +1 -0
  6. package/dist/v2/components/code-input/CodeInput.vue.d.ts +140 -0
  7. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -0
  8. package/dist/v2/components/code-input/CodeInput.vue.js +8 -0
  9. package/dist/v2/components/code-input/CodeInput.vue2.js +202 -0
  10. package/dist/v2/components/code-input/code-variable-widget.d.ts +21 -0
  11. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -0
  12. package/dist/v2/components/code-input/code-variable-widget.js +106 -0
  13. package/dist/v2/components/code-input/code-variable-widget.test.d.ts +2 -0
  14. package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +1 -0
  15. package/dist/v2/components/code-input/index.d.ts +2 -0
  16. package/dist/v2/components/code-input/index.d.ts.map +1 -0
  17. package/dist/v2/components/code-input/index.js +4 -0
  18. package/dist/v2/components/data-table/DataTable.vue.d.ts +22 -0
  19. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -0
  20. package/dist/v2/components/data-table/DataTable.vue.js +38 -0
  21. package/dist/v2/components/data-table/DataTable.vue2.js +4 -0
  22. package/dist/v2/components/data-table/DataTableCell.vue.d.ts +19 -0
  23. package/dist/v2/components/data-table/DataTableCell.vue.d.ts.map +1 -0
  24. package/dist/v2/components/data-table/DataTableCell.vue.js +26 -0
  25. package/dist/v2/components/data-table/DataTableCell.vue2.js +4 -0
  26. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +14 -0
  27. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -0
  28. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +53 -0
  29. package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +4 -0
  30. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts +13 -0
  31. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts.map +1 -0
  32. package/dist/v2/components/data-table/DataTableHeader.vue.js +18 -0
  33. package/dist/v2/components/data-table/DataTableHeader.vue2.js +4 -0
  34. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +53 -0
  35. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -0
  36. package/dist/v2/components/data-table/DataTableInput.vue.js +7 -0
  37. package/dist/v2/components/data-table/DataTableInput.vue2.js +117 -0
  38. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +16 -0
  39. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -0
  40. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +146 -0
  41. package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +4 -0
  42. package/dist/v2/components/data-table/DataTableRow.vue.d.ts +13 -0
  43. package/dist/v2/components/data-table/DataTableRow.vue.d.ts.map +1 -0
  44. package/dist/v2/components/data-table/DataTableRow.vue.js +12 -0
  45. package/dist/v2/components/data-table/DataTableText.vue.d.ts +16 -0
  46. package/dist/v2/components/data-table/DataTableText.vue.d.ts.map +1 -0
  47. package/dist/v2/components/data-table/DataTableText.vue.js +23 -0
  48. package/dist/v2/components/data-table/DataTableText.vue2.js +4 -0
  49. package/dist/v2/components/data-table/index.d.ts +9 -0
  50. package/dist/v2/components/data-table/index.d.ts.map +1 -0
  51. package/dist/v2/components/data-table/index.js +18 -0
  52. package/dist/v2/features/app/App.test.d.ts +2 -0
  53. package/dist/v2/features/app/App.test.d.ts.map +1 -0
  54. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  55. package/dist/v2/features/app/App.vue.js +56 -41
  56. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +3 -0
  57. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  58. package/dist/v2/features/app/components/DesktopTabs.vue.js +8 -7
  59. package/dist/v2/features/app/components/DesktopTabs.vue2.js +6 -0
  60. package/dist/v2/features/app/helpers/routes.d.ts +12 -9
  61. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  62. package/dist/v2/features/app/helpers/routes.js +0 -6
  63. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  64. package/dist/v2/features/collection/DocumentCollection.vue2.js +58 -45
  65. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  66. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +12 -10
  67. package/dist/v2/features/collection/components/Environment.vue.d.ts +13 -87
  68. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  69. package/dist/v2/features/collection/components/Environment.vue2.js +20 -25
  70. package/dist/v2/features/collection/components/Overview.vue.d.ts +13 -12
  71. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  72. package/dist/v2/features/collection/components/Overview.vue.js +5 -2
  73. package/dist/v2/features/collection/components/Overview.vue2.js +64 -66
  74. package/dist/v2/features/collection/components/Tabs.vue.js +8 -8
  75. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +6 -95
  76. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  77. package/dist/v2/features/environments/EnvironmentsList.vue.js +50 -98
  78. package/dist/v2/features/environments/components/Environment.vue.d.ts +9 -63
  79. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  80. package/dist/v2/features/environments/components/Environment.vue.js +41 -92
  81. package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
  82. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +105 -81
  83. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +7 -14
  84. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  85. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +61 -39
  86. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +1 -1
  87. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  88. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +3 -3
  89. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +21 -0
  90. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -0
  91. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +109 -0
  92. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +4 -0
  93. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +7 -20
  94. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  95. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
  96. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +85 -71
  97. package/dist/v2/features/environments/index.d.ts +0 -3
  98. package/dist/v2/features/environments/index.d.ts.map +1 -1
  99. package/dist/v2/features/environments/index.js +2 -4
  100. package/dist/v2/helpers/test-utils.d.ts +4 -0
  101. package/dist/v2/helpers/test-utils.d.ts.map +1 -0
  102. package/dist/v2/hooks/use-workspace-client-events.d.ts +2 -1
  103. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  104. package/dist/v2/hooks/use-workspace-client-events.js +23 -9
  105. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  106. package/package.json +13 -13
  107. package/dist/v2/features/collection/WorkspaceCollection.test.d.ts +0 -2
  108. package/dist/v2/features/collection/WorkspaceCollection.test.d.ts.map +0 -1
  109. package/dist/v2/features/environments/Environments.test.d.ts +0 -2
  110. package/dist/v2/features/environments/Environments.test.d.ts.map +0 -1
  111. package/dist/v2/features/environments/Environments.vue.d.ts +0 -31
  112. package/dist/v2/features/environments/Environments.vue.d.ts.map +0 -1
  113. package/dist/v2/features/environments/Environments.vue.js +0 -65
  114. package/dist/v2/features/environments/Environments.vue2.js +0 -4
  115. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts +0 -20
  116. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts.map +0 -1
  117. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.js +0 -48
  118. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue2.js +0 -4
  119. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts +0 -18
  120. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts.map +0 -1
  121. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.js +0 -35
  122. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue2.js +0 -4
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ disabled?: boolean;
4
+ align?: 'left' | 'center';
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (v: boolean) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
10
+ }>, {
11
+ align: "left" | "center";
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
14
+ //# sourceMappingURL=DataTableCheckbox.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableCheckbox.vue"],"names":[],"mappings":"AA0DA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAC1B,CAAC;;;;;;WADQ,MAAM,GAAG,QAAQ;;AAoH7B,wBAQG"}
@@ -0,0 +1,53 @@
1
+ import { defineComponent as c, createBlock as n, openBlock as i, withCtx as d, createElementVNode as a, normalizeClass as t, unref as l, createVNode as u } from "vue";
2
+ import { cva as p, ScalarIcon as m } from "@scalar/components";
3
+ import b from "./DataTableCell.vue.js";
4
+ const f = ["checked", "disabled"], y = /* @__PURE__ */ c({
5
+ __name: "DataTableCheckbox",
6
+ props: {
7
+ modelValue: { type: Boolean },
8
+ disabled: { type: Boolean },
9
+ align: { default: "center" }
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(h) {
13
+ const s = p({
14
+ base: "w-8 h-8 flex items-center justify-center text-border peer-checked:text-c-1 pointer-events-none absolute",
15
+ variants: {
16
+ align: {
17
+ left: "left-0",
18
+ center: "centered"
19
+ }
20
+ }
21
+ });
22
+ return (e, o) => (i(), n(b, { class: "group/cell relative flex min-w-8" }, {
23
+ default: d(() => [
24
+ a("input", {
25
+ checked: e.modelValue,
26
+ class: "peer absolute inset-0 cursor-pointer opacity-0 disabled:cursor-default",
27
+ disabled: !!e.disabled,
28
+ type: "checkbox",
29
+ onChange: o[0] || (o[0] = (r) => e.$emit("update:modelValue", r.target.checked))
30
+ }, null, 40, f),
31
+ a("div", {
32
+ class: t(l(s)({ align: e.align }))
33
+ }, [
34
+ a("div", {
35
+ class: t([
36
+ "absolute m-auto size-3/4 rounded border-[1px] opacity-0",
37
+ !e.disabled && "group-has-[:focus-visible]/cell:border-c-accent group-hover/cell:opacity-100 group-has-[:focus-visible]/cell:opacity-100"
38
+ ])
39
+ }, null, 2),
40
+ u(l(m), {
41
+ icon: "Checkmark",
42
+ size: "xs",
43
+ thickness: "2.5"
44
+ })
45
+ ], 2)
46
+ ]),
47
+ _: 1
48
+ }));
49
+ }
50
+ });
51
+ export {
52
+ y as default
53
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableCheckbox.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_5: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_5) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
13
+ //# sourceMappingURL=DataTableHeader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"names":[],"mappings":"AA8CA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { defineComponent as o, createBlock as r, openBlock as n, mergeProps as m, unref as s, withCtx as a, renderSlot as f } from "vue";
2
+ import { useBindCx as i } from "@scalar/components";
3
+ import c from "./DataTableCell.vue.js";
4
+ const x = /* @__PURE__ */ o({
5
+ __name: "DataTableHeader",
6
+ setup(p) {
7
+ const { cx: e } = i();
8
+ return (t, u) => (n(), r(c, m({ is: "th" }, s(e)("items-center font-medium px-2 min-w-0 -outline-offset-1")), {
9
+ default: a(() => [
10
+ f(t.$slots, "default")
11
+ ]),
12
+ _: 3
13
+ }, 16));
14
+ }
15
+ });
16
+ export {
17
+ x as default
18
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableHeader.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,53 @@
1
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
2
+ import type { EnvVariable } from '../../../store/active-entities.js';
3
+ import type { VueClassProp } from '../../../types/vue';
4
+ type __VLS_Props = {
5
+ id?: string;
6
+ type?: string | undefined;
7
+ /** Class for the wrapping cell because attrs is bound to the input */
8
+ containerClass?: VueClassProp | undefined;
9
+ required?: boolean;
10
+ modelValue: string | number;
11
+ /** Allows adding a custom value to the enum dropdown, defaults to true */
12
+ canAddCustomEnumValue?: boolean;
13
+ readOnly?: boolean;
14
+ enum?: string[];
15
+ min?: number;
16
+ max?: number;
17
+ environment: Environment;
18
+ envVariables: EnvVariable[];
19
+ description?: string | undefined;
20
+ lineWrapping?: boolean;
21
+ };
22
+ declare var __VLS_5: {}, __VLS_25: {}, __VLS_27: {};
23
+ type __VLS_Slots = {} & {
24
+ default?: (props: typeof __VLS_5) => any;
25
+ } & {
26
+ warning?: (props: typeof __VLS_25) => any;
27
+ } & {
28
+ icon?: (props: typeof __VLS_27) => any;
29
+ };
30
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
31
+ selectVariable: (value: string) => any;
32
+ "update:modelValue": (v: string) => any;
33
+ inputFocus: () => any;
34
+ inputBlur: () => any;
35
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
36
+ onSelectVariable?: ((value: string) => any) | undefined;
37
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
38
+ onInputFocus?: (() => any) | undefined;
39
+ onInputBlur?: (() => any) | undefined;
40
+ }>, {
41
+ required: boolean;
42
+ readOnly: boolean;
43
+ lineWrapping: boolean;
44
+ canAddCustomEnumValue: boolean;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
53
+ //# sourceMappingURL=DataTableInput.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAIzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAwSJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cA3VN,OAAO;cAIP,OAAO;kBAOH,OAAO;2BARE,OAAO;6EAgWjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import t from "./DataTableInput.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f4b9c7c5"]]);
5
+ export {
6
+ c as default
7
+ };
@@ -0,0 +1,117 @@
1
+ import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as a, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as v, unref as m } from "vue";
2
+ import { ScalarIconButton as E } from "@scalar/components";
3
+ import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
4
+ import W from "../../../components/CodeInput/CodeInput.vue.js";
5
+ import q from "./DataTableCell.vue.js";
6
+ import F from "./DataTableInputSelect.vue.js";
7
+ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly", "type", "value"], D = {
8
+ key: 1,
9
+ class: "centered-y text-orange absolute right-7 text-xs"
10
+ }, J = /* @__PURE__ */ g({
11
+ inheritAttrs: !1,
12
+ __name: "DataTableInput",
13
+ props: {
14
+ id: {},
15
+ type: {},
16
+ containerClass: {},
17
+ required: { type: Boolean, default: !1 },
18
+ modelValue: {},
19
+ canAddCustomEnumValue: { type: Boolean, default: !0 },
20
+ readOnly: { type: Boolean, default: !1 },
21
+ enum: {},
22
+ min: {},
23
+ max: {},
24
+ environment: {},
25
+ envVariables: {},
26
+ description: {},
27
+ lineWrapping: { type: Boolean, default: !1 }
28
+ },
29
+ emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
30
+ setup(c, { emit: V }) {
31
+ const n = c, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
32
+ w.value || t("inputBlur");
33
+ }, y = B(
34
+ () => n.type === "password" ? "text" : n.type ?? "text"
35
+ ), b = () => {
36
+ !n.enum?.length && !n.readOnly && f.value?.focus();
37
+ };
38
+ return (e, l) => (a(), s(q, {
39
+ class: C(["relative flex", e.containerClass])
40
+ }, {
41
+ default: $(() => [
42
+ e.$slots.default ? (a(), i("div", {
43
+ key: 0,
44
+ class: "text-c-1 flex items-center pr-0 pl-3",
45
+ for: e.id ?? "",
46
+ onClick: b
47
+ }, [
48
+ p(e.$slots, "default", {}, void 0, !0),
49
+ l[5] || (l[5] = O(": ", -1))
50
+ ], 8, T)) : u("", !0),
51
+ I("div", N, [
52
+ n.enum && n.enum.length ? (a(), s(F, {
53
+ key: 0,
54
+ canAddCustomValue: n.canAddCustomEnumValue,
55
+ modelValue: n.modelValue,
56
+ value: n.enum,
57
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => t("update:modelValue", o))
58
+ }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (a(), i(h, { key: 1 }, [
59
+ r.value && e.type === "password" ? (a(), i("input", v({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
60
+ autocomplete: "off",
61
+ class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
62
+ "data-1p-ignore": "",
63
+ readOnly: e.readOnly,
64
+ spellcheck: "false",
65
+ type: y.value,
66
+ value: e.modelValue,
67
+ onInput: l[1] || (l[1] = (o) => t(
68
+ "update:modelValue",
69
+ o.target.value ?? ""
70
+ ))
71
+ }), null, 16, P)) : (a(), s(W, v({ key: 1 }, e.$attrs, {
72
+ id: e.id,
73
+ ref_key: "codeInput",
74
+ ref: f,
75
+ class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1", [
76
+ e.type === "password" && e.description && "pr-12",
77
+ e.description && "pr-8",
78
+ e.type === "password" && "scalar-password-input"
79
+ ]],
80
+ description: e.description,
81
+ disableCloseBrackets: "",
82
+ disableTabIndent: "",
83
+ envVariables: e.envVariables,
84
+ environment: e.environment,
85
+ lineWrapping: !!e.lineWrapping,
86
+ max: e.max,
87
+ min: e.min,
88
+ modelValue: e.modelValue ?? "",
89
+ readOnly: e.readOnly,
90
+ required: !!e.required,
91
+ spellcheck: "false",
92
+ type: y.value,
93
+ onBlur: k,
94
+ onFocus: l[2] || (l[2] = (o) => t("inputFocus")),
95
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => t("update:modelValue", o))
96
+ }), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
97
+ ], 64))
98
+ ]),
99
+ e.$slots.warning ? (a(), i("div", D, [
100
+ p(e.$slots, "warning", {}, void 0, !0)
101
+ ])) : u("", !0),
102
+ p(e.$slots, "icon", {}, void 0, !0),
103
+ e.type === "password" ? (a(), s(m(E), {
104
+ key: 2,
105
+ class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
106
+ icon: r.value ? m(S) : m(A),
107
+ label: r.value ? "Show Password" : "Hide Password",
108
+ onClick: l[4] || (l[4] = (o) => r.value = !r.value)
109
+ }, null, 8, ["icon", "label"])) : u("", !0)
110
+ ]),
111
+ _: 3
112
+ }, 8, ["class"]));
113
+ }
114
+ });
115
+ export {
116
+ J as default
117
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ modelValue: string | number;
3
+ value?: string[];
4
+ default?: string | number | undefined;
5
+ canAddCustomValue?: boolean;
6
+ type?: string | undefined;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (v: string) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
12
+ }>, {
13
+ canAddCustomValue: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
16
+ //# sourceMappingURL=DataTableInputSelect.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;AA2Z/B,wBAQG"}
@@ -0,0 +1,146 @@
1
+ import { defineComponent as T, computed as m, ref as V, watch as S, nextTick as E, createElementBlock as f, openBlock as o, createBlock as v, withDirectives as K, unref as a, withCtx as s, createVNode as n, createElementVNode as i, toDisplayString as y, withKeys as M, vModelText as R, createCommentVNode as C, Fragment as _, renderList as U, normalizeClass as $ } from "vue";
2
+ import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as D, ScalarDropdownDivider as W } from "@scalar/components";
3
+ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline" }, G = { class: "text-c-1 whitespace-nowrap" }, H = { class: "text-c-1 overflow-hidden text-ellipsis" }, J = { class: "overflow-hidden text-ellipsis" }, P = { class: "flex h-4 w-4 items-center justify-center" }, Z = /* @__PURE__ */ T({
4
+ __name: "DataTableInputSelect",
5
+ props: {
6
+ modelValue: {},
7
+ value: {},
8
+ default: {},
9
+ canAddCustomValue: { type: Boolean, default: !0 },
10
+ type: {}
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(z, { emit: B }) {
14
+ const u = z, c = B, p = m(() => u.value ?? []), d = V(!1), r = V(""), x = V(null);
15
+ S(r, (e) => {
16
+ c("update:modelValue", e);
17
+ });
18
+ const g = (e) => {
19
+ c("update:modelValue", e), d.value = !1;
20
+ }, j = () => {
21
+ r.value.trim() && g(r.value);
22
+ }, A = () => {
23
+ r.value.trim() || c("update:modelValue", ""), d.value = !1;
24
+ }, I = (e) => u.modelValue.toString() === e;
25
+ S(d, (e) => {
26
+ e && E(() => {
27
+ x.value?.focus();
28
+ });
29
+ });
30
+ const k = m(() => u.modelValue !== void 0 ? u.modelValue : u.default), w = m(() => {
31
+ const e = new Set(u.modelValue.toString().split(", "));
32
+ return p.value.filter((l) => e.has(l)).map((l) => ({ id: l, label: l, value: l }));
33
+ }), N = m(
34
+ () => p.value.map((e) => ({ id: e, label: e, value: e }))
35
+ ), O = (e) => {
36
+ const l = e.map((t) => t.value);
37
+ c("update:modelValue", l.join(", "));
38
+ };
39
+ return (e, l) => (o(), f("div", q, [
40
+ e.type === "array" ? (o(), v(a(F), {
41
+ key: 0,
42
+ modelValue: w.value,
43
+ options: N.value,
44
+ "onUpdate:modelValue": O
45
+ }, {
46
+ default: s(() => [
47
+ n(a(b), {
48
+ class: "custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none",
49
+ fullWidth: "",
50
+ variant: "ghost"
51
+ }, {
52
+ default: s(() => [
53
+ i("span", G, y(w.value.length > 0 ? w.value.map((t) => t.label).join(", ") : "Select a value"), 1),
54
+ n(a(h), {
55
+ icon: "ChevronDown",
56
+ size: "md",
57
+ class: "min-w-4"
58
+ })
59
+ ]),
60
+ _: 1
61
+ })
62
+ ]),
63
+ _: 1
64
+ }, 8, ["modelValue", "options"])) : d.value ? K((o(), f("input", {
65
+ key: 1,
66
+ ref_key: "inputRef",
67
+ ref: x,
68
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => r.value = t),
69
+ class: "text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none",
70
+ placeholder: "Value",
71
+ type: "text",
72
+ onBlur: A,
73
+ onKeyup: M(j, ["enter"])
74
+ }, null, 544)), [
75
+ [R, r.value]
76
+ ]) : (o(), v(a(L), {
77
+ key: 2,
78
+ resize: "",
79
+ value: k.value
80
+ }, {
81
+ items: s(() => [
82
+ (o(!0), f(_, null, U(p.value, (t) => (o(), v(a(D), {
83
+ key: t,
84
+ class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
85
+ value: t,
86
+ onClick: (Q) => g(t)
87
+ }, {
88
+ default: s(() => [
89
+ i("div", {
90
+ class: $([
91
+ "flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
92
+ I(t) ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
93
+ ])
94
+ }, [
95
+ n(a(h), {
96
+ class: "size-2.5",
97
+ icon: "Checkmark",
98
+ thickness: "3"
99
+ })
100
+ ], 2),
101
+ i("span", J, y(t), 1)
102
+ ]),
103
+ _: 2
104
+ }, 1032, ["value", "onClick"]))), 128)),
105
+ e.canAddCustomValue ? (o(), f(_, { key: 0 }, [
106
+ p.value.length ? (o(), v(a(W), { key: 0 })) : C("", !0),
107
+ n(a(D), {
108
+ class: "flex items-center gap-1.5",
109
+ onClick: l[1] || (l[1] = (t) => d.value = !0)
110
+ }, {
111
+ default: s(() => [
112
+ i("div", P, [
113
+ n(a(h), {
114
+ icon: "Add",
115
+ size: "sm"
116
+ })
117
+ ]),
118
+ l[2] || (l[2] = i("span", null, "Add value", -1))
119
+ ]),
120
+ _: 1
121
+ })
122
+ ], 64)) : C("", !0)
123
+ ]),
124
+ default: s(() => [
125
+ n(a(b), {
126
+ class: "size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none",
127
+ variant: "ghost"
128
+ }, {
129
+ default: s(() => [
130
+ i("span", H, y(k.value || "Select a value"), 1),
131
+ n(a(h), {
132
+ icon: "ChevronDown",
133
+ size: "md"
134
+ })
135
+ ]),
136
+ _: 1
137
+ })
138
+ ]),
139
+ _: 1
140
+ }, 8, ["value"]))
141
+ ]));
142
+ }
143
+ });
144
+ export {
145
+ Z as default
146
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableInputSelect.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
13
+ //# sourceMappingURL=DataTableRow.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableRow.vue"],"names":[],"mappings":"AAuBA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as t, openBlock as o, renderSlot as r } from "vue";
2
+ import c from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, s = { class: "group contents" };
4
+ function a(e, l) {
5
+ return o(), t("tr", s, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ c(n, [["render", a]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ text?: string | number;
3
+ };
4
+ declare var __VLS_5: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_5) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
16
+ //# sourceMappingURL=DataTableText.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableText.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableText.vue"],"names":[],"mappings":"AAkBA,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB,CAAC;AAmCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent as t, createBlock as a, openBlock as o, withCtx as r, createElementVNode as s, renderSlot as n, createTextVNode as p, toDisplayString as l } from "vue";
2
+ import c from "./DataTableCell.vue.js";
3
+ const i = { class: "flex-1 px-2 py-1.5 whitespace-nowrap" }, x = /* @__PURE__ */ t({
4
+ __name: "DataTableText",
5
+ props: {
6
+ text: {}
7
+ },
8
+ setup(_) {
9
+ return (e, f) => (o(), a(c, { class: "relative flex" }, {
10
+ default: r(() => [
11
+ s("span", i, [
12
+ n(e.$slots, "default", {}, () => [
13
+ p(l(e.text), 1)
14
+ ])
15
+ ])
16
+ ]),
17
+ _: 3
18
+ }));
19
+ }
20
+ });
21
+ export {
22
+ x as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableText.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,9 @@
1
+ export { default as DataTable } from './DataTable.vue.js';
2
+ export { default as DataTableCell } from './DataTableCell.vue.js';
3
+ export { default as DataTableCheckbox } from './DataTableCheckbox.vue.js';
4
+ export { default as DataTableHeader } from './DataTableHeader.vue.js';
5
+ export { default as DataTableInput } from './DataTableInput.vue.js';
6
+ export { default as DataTableInputSelect } from './DataTableInputSelect.vue.js';
7
+ export { default as DataTableRow } from './DataTableRow.vue.js';
8
+ export { default as DataTableText } from './DataTableText.vue.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { default as t } from "./DataTable.vue.js";
2
+ import { default as o } from "./DataTableCell.vue.js";
3
+ import { default as f } from "./DataTableCheckbox.vue.js";
4
+ import { default as u } from "./DataTableHeader.vue.js";
5
+ import { default as b } from "./DataTableInput.vue.js";
6
+ import { default as T } from "./DataTableInputSelect.vue.js";
7
+ import { default as s } from "./DataTableRow.vue.js";
8
+ import { default as c } from "./DataTableText.vue.js";
9
+ export {
10
+ t as DataTable,
11
+ o as DataTableCell,
12
+ f as DataTableCheckbox,
13
+ u as DataTableHeader,
14
+ b as DataTableInput,
15
+ T as DataTableInputSelect,
16
+ s as DataTableRow,
17
+ c as DataTableText
18
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=App.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.test.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAwIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAOrD;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;oBACtB,cAAc;;YADtB,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;oBACtB,cAAc;;AAHhC,wBA8MC"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAWpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAOrD;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;oBACtB,cAAc;;YADtB,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;oBACtB,cAAc;;AAHhC,wBAoOC"}