@kong-ui-public/spec-renderer 0.1.0
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/LICENSE +201 -0
- package/README.md +72 -0
- package/dist/spec-renderer.es.js +44256 -0
- package/dist/spec-renderer.es.js.map +1 -0
- package/dist/spec-renderer.umd.js +215 -0
- package/dist/spec-renderer.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/SpecDetails.vue.d.ts +81 -0
- package/dist/types/components/SpecDetails.vue.d.ts.map +1 -0
- package/dist/types/components/SpecOperationsList.vue.d.ts +72 -0
- package/dist/types/components/SpecOperationsList.vue.d.ts.map +1 -0
- package/dist/types/components/SpecRenderer.vue.d.ts +62 -0
- package/dist/types/components/SpecRenderer.vue.d.ts.map +1 -0
- package/dist/types/components/operations-list/OperationsListItem.vue.d.ts +29 -0
- package/dist/types/components/operations-list/OperationsListItem.vue.d.ts.map +1 -0
- package/dist/types/components/operations-list/OperationsListSectionHeader.vue.d.ts +41 -0
- package/dist/types/components/operations-list/OperationsListSectionHeader.vue.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/spec-renderer.d.ts +39 -0
- package/dist/types/types/spec-renderer.d.ts.map +1 -0
- package/package.json +69 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kong-portal-spec-details[data-v-45fa15c0]{color:#000;color:var(--kong-portal-spec-details-text-color, #000);font-family:Roboto,Helvetica,sans-serif;font-family:var(--kong-portal-spec-details-font-family-default, Roboto, Helvetica, sans-serif);font-size:16px;font-size:var(--kong-portal-spec-details-font-size, 16px)}.item[data-v-c64420b1]{appearance:none;background:transparent;border:1px solid #f1f1f5;border:1px solid var(--kong-ui-spec-renderer-operations-list-item-border-color, var(--grey-200, #f1f1f5));cursor:pointer;display:block;padding:8px 16px;padding:var(--kong-ui-spec-renderer-operations-list-item-padding, 8px 16px);position:relative;text-align:left;width:100%}.item[data-v-c64420b1]:hover{background:#f2f6fe;background:var(--kong-ui-spec-renderer-operations-list-item-background-hover, var(--blue-100, #f2f6fe))}.item[data-v-c64420b1]:last-of-type{border-bottom-left-radius:4px;border-bottom-left-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px)}.item--selected[data-v-c64420b1]{background:#f2f6fe;background:var(--kong-ui-spec-renderer-operations-list-item-background-selected, var(--blue-100, #f2f6fe))}.item--selected[data-v-c64420b1]:before{background:#1155cb;background:var(--kong-ui-spec-renderer-operations-list-item-selected-bar-background, var(--blue-500, #1155cb));bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:4px;width:var(--kong-ui-spec-renderer-operations-list-item-selected-bar-width, 4px)}.item--method-get[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-get, var(--blue-500, #1155cb));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-get, var(--blue-100, #f2f6fe))}.item--method-post[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-post, var(--green-700, #13755e));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-post, var(--green-100, #e8f8f5))}.item--method-put[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-put, var(--yellow-600, #a05604));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-put, var(--yellow-100, #fff3d8))}.item--method-patch[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-patch, var(--teal-500, #006e9d));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-patch, var(--teal-100, #cdf1fe))}.item--method-delete[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-delete, var(--red-700, #922021));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-delete, var(--red-100, #ffdede))}.item--method-options[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-options, var(--steel-700, #273c61));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-options, var(--steel-100, #f0f4fa))}.item--method-head[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-head, var(--yellow-600, #a05604));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-head, var(--yellow-100, #fff3d8))}.item--method-connect[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-connect, var(--purple-400, #473cfb));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-connect, var(--purple-100, #eaf4fb))}.item--method-trace[data-v-c64420b1]{--kong-ui-spec-renderer-operations-list-item-method-color: var(--kong-ui-spec-renderer-method-color-trace, var(--steel-500, #5c7299));--kong-ui-spec-renderer-operations-list-item-method-background: var(--kong-ui-spec-renderer-method-background-trace, var(--steel-100, #f0f4fa))}.summary[data-v-c64420b1]{color:#3c4557;color:var(--kong-ui-spec-renderer-operations-list-item-summary-text-color, var(--black-400, #3C4557));font-family:inherit;font-size:13px;font-weight:700;margin:0 0 4px}.item--selected .summary[data-v-c64420b1]{color:#0b172d;color:var(--kong-ui-spec-renderer-operations-list-item-summary-text-color-selected, var(--black-500, #0B172D))}.details[data-v-c64420b1]{display:flex}.truncate[data-v-c64420b1]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.method-badge[data-v-c64420b1]{font-size:11px;margin-right:8px}.path[data-v-c64420b1]{align-self:center;color:var(--grey-600);font-family:monospace;font-family:var(--kong-ui-spec-renderer-operations-list-item-path-font-family, var(--kong-ui-spec-renderer-font-family-monospace, monospace));font-size:13px}.header[data-v-27fb9cfe]{align-items:center;appearance:none;background:transparent;background:var(--kong-ui-spec-renderer-operations-list-section-background, transparent);border:1px solid #f1f1f5;border:1px solid var(--kong-ui-spec-renderer-operations-list-section-border-color, var(--grey-200, #f1f1f5));border-top-left-radius:4px;border-top-left-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px);border-top-right-radius:4px;border-top-right-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px);color:currentColor;cursor:pointer;display:flex;padding:8px;padding:var(--kong-ui-spec-renderer-operations-list-section-padding, 8px);width:100%}.header--collapsed[data-v-27fb9cfe]{border-bottom-left-radius:4px;border-bottom-left-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--kong-ui-spec-renderer-operations-list-section-border-radius, 4px)}.label[data-v-27fb9cfe]{color:currentColor;color:var(--kong-ui-spec-renderer-operations-list-section-label-text-color, currentColor);font-family:inherit;font-size:15px;font-size:var(--kong-ui-spec-renderer-operations-list-section-label-font-size, 15px);font-weight:600;line-height:1;margin:0 8px 0 0}.label[data-v-27fb9cfe]:first-letter{text-transform:capitalize}.header--collapsed .label[data-v-27fb9cfe]{color:#3c4557;color:var(--kong-ui-spec-renderer-operations-list-section-label-text-color-collapsed, var(--black-400, #3C4557))}.description[data-v-27fb9cfe]{font-family:monospace;font-family:var(--kong-ui-spec-renderer-operations-list-section-description-font-family, var(--kong-ui-spec-renderer-font-monospace, monospace));line-height:1;margin-left:auto;max-width:65%}.icon-wrapper[data-v-27fb9cfe]{height:18px;margin-right:8px}.truncate[data-v-27fb9cfe]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-spec-operations-list[data-v-ef02e074]{color:#0b172d;color:var(--kong-ui-kong-spec-renderer-operations-list-text-color, var(--kong-ui-spec-renderer-text-color, var(--black-500, #0B172D)));font-family:Roboto,Helvetica,sans-serif;font-family:var(--kong-ui-spec-renderer-operations-list-font-family, var(--kong-ui-spec-renderer-font-family, Roboto, Helvetica, sans-serif));font-size:16px;font-size:var(--kong-ui-spec-renderer-operations-list-font-size, var(--kong-ui-spec-renderer-font-size, 16px))}.kong-ui-public-spec-operations-list .filter-wrapper[data-v-ef02e074]{margin-bottom:8px;position:relative}.kong-ui-public-spec-operations-list .filter-input[data-v-ef02e074]{width:100%}.kong-ui-public-spec-operations-list .filter-input[data-v-ef02e074] .k-input{padding-left:34px}.kong-ui-public-spec-operations-list .filter-icon[data-v-ef02e074]{left:10px;position:absolute;top:calc(50% - 8px)}.kong-ui-public-spec-operations-list .section-wrapper[data-v-ef02e074]{margin-bottom:8px}.kong-ui-public-spec-operations-list .section-wrapper[data-v-ef02e074]:last-of-type{margin-bottom:0}.kong-ui-public-spec-operations-list .center[data-v-ef02e074]{text-align:center}.kong-ui-public-spec-operations-list[data-v-ef02e074] .k-collapse .k-collapse-heading{margin:0!important}.kong-ui-public-spec-renderer .spec-container[data-v-a9cbca31]{display:flex}.kong-ui-public-spec-renderer .spec-renderer-details[data-v-a9cbca31]{position:relative;width:100%}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import '@kong-ui-public/swagger-ui-web-component';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { SpecDocument, OperationListItem } from '../types';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
document: {
|
|
6
|
+
type: PropType<SpecDocument>;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
url: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
hasSidebar: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
relativeSidebar: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
essentialsOnly: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
activeOperation: {
|
|
26
|
+
type: PropType<OperationListItem>;
|
|
27
|
+
default: null;
|
|
28
|
+
};
|
|
29
|
+
applicationRegistrationEnabled: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
currentVersion: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: () => undefined;
|
|
36
|
+
};
|
|
37
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
document: {
|
|
39
|
+
type: PropType<SpecDocument>;
|
|
40
|
+
default: null;
|
|
41
|
+
};
|
|
42
|
+
url: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
hasSidebar: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
relativeSidebar: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
essentialsOnly: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
activeOperation: {
|
|
59
|
+
type: PropType<OperationListItem>;
|
|
60
|
+
default: null;
|
|
61
|
+
};
|
|
62
|
+
applicationRegistrationEnabled: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
currentVersion: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: () => undefined;
|
|
69
|
+
};
|
|
70
|
+
}>>, {
|
|
71
|
+
url: string;
|
|
72
|
+
document: SpecDocument;
|
|
73
|
+
hasSidebar: boolean;
|
|
74
|
+
relativeSidebar: boolean;
|
|
75
|
+
essentialsOnly: boolean;
|
|
76
|
+
activeOperation: OperationListItem;
|
|
77
|
+
applicationRegistrationEnabled: boolean;
|
|
78
|
+
currentVersion: string;
|
|
79
|
+
}>;
|
|
80
|
+
export default _default;
|
|
81
|
+
//# sourceMappingURL=SpecDetails.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecDetails.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecDetails.vue.ts"],"names":[],"mappings":"AACA,OAAO,0CAA0C,CAAA;AAEjD,OAAO,EAAE,QAAQ,EAAmC,MAAM,KAAK,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1D,wBAsKc"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { OperationListFilterFunction, Operation, OperationListItem, Tag } from '../types';
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
+
operations: {
|
|
5
|
+
type: PropType<Operation[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
validator: (items: Operation[]) => boolean;
|
|
8
|
+
};
|
|
9
|
+
tags: {
|
|
10
|
+
type: PropType<Tag[]>;
|
|
11
|
+
default: () => never[];
|
|
12
|
+
validator: (items: Tag[]) => boolean;
|
|
13
|
+
};
|
|
14
|
+
isFilterable: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
width: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
filterFunction: {
|
|
23
|
+
type: PropType<OperationListFilterFunction>;
|
|
24
|
+
default: OperationListFilterFunction;
|
|
25
|
+
validator: (maybeFunc: unknown) => boolean;
|
|
26
|
+
};
|
|
27
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "selected"[], "selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
operations: {
|
|
29
|
+
type: PropType<Operation[]>;
|
|
30
|
+
required: true;
|
|
31
|
+
validator: (items: Operation[]) => boolean;
|
|
32
|
+
};
|
|
33
|
+
tags: {
|
|
34
|
+
type: PropType<Tag[]>;
|
|
35
|
+
default: () => never[];
|
|
36
|
+
validator: (items: Tag[]) => boolean;
|
|
37
|
+
};
|
|
38
|
+
isFilterable: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
filterFunction: {
|
|
47
|
+
type: PropType<OperationListFilterFunction>;
|
|
48
|
+
default: OperationListFilterFunction;
|
|
49
|
+
validator: (maybeFunc: unknown) => boolean;
|
|
50
|
+
};
|
|
51
|
+
}>> & {
|
|
52
|
+
onSelected?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
width: string;
|
|
55
|
+
tags: Tag[];
|
|
56
|
+
isFilterable: boolean;
|
|
57
|
+
filterFunction: OperationListFilterFunction;
|
|
58
|
+
}>, {
|
|
59
|
+
item: (_: {
|
|
60
|
+
item: OperationListItem;
|
|
61
|
+
select: () => void;
|
|
62
|
+
}) => any;
|
|
63
|
+
'empty-state': (_: {}) => any;
|
|
64
|
+
'error-state': (_: {}) => any;
|
|
65
|
+
}>;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=SpecOperationsList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecOperationsList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecOperationsList.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAmC,MAAM,KAAK,CAAA;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;;;;;2BAuKvE,SAAS,EAAE,KAAG,OAAO;;;;;2BAKrB,GAAG,EAAE,KAAG,OAAO;;;;;;;;;;;;;;;;;;;2BALf,SAAS,EAAE,KAAG,OAAO;;;;;2BAKrB,GAAG,EAAE,KAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;UAsPR,GAAG;8BACM,GAAG;8BACH,GAAG;;AA1Y1C,wBAmac;AACd,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAAE,MAAM,EAAE,CAAC,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { SpecDocument, Operation, Tag } from '../types';
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
+
spec: {
|
|
5
|
+
type: PropType<SpecDocument>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
essentialsOnly: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
operationsList: {
|
|
13
|
+
type: PropType<Operation[]>;
|
|
14
|
+
required: true;
|
|
15
|
+
validator: (items: Operation[]) => boolean;
|
|
16
|
+
};
|
|
17
|
+
tags: {
|
|
18
|
+
type: PropType<Tag[]>;
|
|
19
|
+
default: () => never[];
|
|
20
|
+
validator: (items: Tag[]) => boolean;
|
|
21
|
+
};
|
|
22
|
+
navWidth: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
spec: {
|
|
28
|
+
type: PropType<SpecDocument>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
essentialsOnly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
operationsList: {
|
|
36
|
+
type: PropType<Operation[]>;
|
|
37
|
+
required: true;
|
|
38
|
+
validator: (items: Operation[]) => boolean;
|
|
39
|
+
};
|
|
40
|
+
tags: {
|
|
41
|
+
type: PropType<Tag[]>;
|
|
42
|
+
default: () => never[];
|
|
43
|
+
validator: (items: Tag[]) => boolean;
|
|
44
|
+
};
|
|
45
|
+
navWidth: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
}>>, {
|
|
50
|
+
tags: Tag[];
|
|
51
|
+
essentialsOnly: boolean;
|
|
52
|
+
navWidth: string;
|
|
53
|
+
}>, {
|
|
54
|
+
'error-state': (_: {}) => any;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=SpecRenderer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecRenderer.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAiB,MAAM,KAAK,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAqB,GAAG,EAAE,MAAM,UAAU,CAAA;;;;;;;;;;;;;2BA0ExD,SAAS,EAAE,KAAG,OAAO;;;;;2BAKrB,GAAG,EAAE,KAAG,OAAO;;;;;;;;;;;;;;;;;;2BALf,SAAS,EAAE,KAAG,OAAO;;;;;2BAKrB,GAAG,EAAE,KAAG,OAAO;;;;;;;;;;;8BAyFC,GAAG;;AA/I1C,wBAiKc;AACd,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAAE,MAAM,EAAE,CAAC,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { OperationListItem } from '../../types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
item: {
|
|
5
|
+
type: PropType<OperationListItem>;
|
|
6
|
+
required: true;
|
|
7
|
+
validator: (item: Record<string, unknown>) => boolean;
|
|
8
|
+
};
|
|
9
|
+
isSelected: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
item: {
|
|
15
|
+
type: PropType<OperationListItem>;
|
|
16
|
+
required: true;
|
|
17
|
+
validator: (item: Record<string, unknown>) => boolean;
|
|
18
|
+
};
|
|
19
|
+
isSelected: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
}>> & {
|
|
24
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
isSelected: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=OperationsListItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationsListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/operations-list/OperationsListItem.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;;;;;0BA4B9B,OAAO,MAAM,EAAE,OAAO,CAAC,KAAG,OAAO;;;;;;;;;;0BAAjC,OAAO,MAAM,EAAE,OAAO,CAAC,KAAG,OAAO;;;;;;;;;;;AA1BvD,wBAuJc"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
isCollapsed: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
name: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
description: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
contentElementId: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle"[], "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
isCollapsed: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
name: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
description: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
contentElementId: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
}>> & {
|
|
36
|
+
onToggle?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
description: string;
|
|
39
|
+
}>;
|
|
40
|
+
export default _default;
|
|
41
|
+
//# sourceMappingURL=OperationsListSectionHeader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationsListSectionHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/operations-list/OperationsListSectionHeader.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wBAgJc"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import SpecRenderer from './components/SpecRenderer.vue';
|
|
2
|
+
import SpecDetails from './components/SpecDetails.vue';
|
|
3
|
+
import SpecOperationsList from './components/SpecOperationsList.vue';
|
|
4
|
+
export { SpecRenderer, SpecDetails, SpecOperationsList, };
|
|
5
|
+
export * from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,kBAAkB,MAAM,qCAAqC,CAAA;AAEpE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,GACnB,CAAA;AAED,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAKA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OpenAPI } from 'openapi-types';
|
|
2
|
+
/**
|
|
3
|
+
* OpenAPI specification document supporting OpenAPI v2 and v3 formats
|
|
4
|
+
*/
|
|
5
|
+
export type SpecDocument = OpenAPI.Document;
|
|
6
|
+
/**
|
|
7
|
+
* HTTP Method string
|
|
8
|
+
*/
|
|
9
|
+
export type MethodString = 'get' | 'put' | 'post' | 'delete' | 'patch' | 'options' | 'head' | 'connect' | 'trace';
|
|
10
|
+
export interface Operation {
|
|
11
|
+
path: string;
|
|
12
|
+
method: MethodString;
|
|
13
|
+
operationId: string | null;
|
|
14
|
+
summary: string | null;
|
|
15
|
+
deprecated: boolean;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Operation details object.
|
|
20
|
+
*/
|
|
21
|
+
export interface OperationListItem extends Omit<Operation, 'tags'> {
|
|
22
|
+
tag: string | null;
|
|
23
|
+
}
|
|
24
|
+
interface ExternalDocumentation {
|
|
25
|
+
description?: string;
|
|
26
|
+
url: string;
|
|
27
|
+
}
|
|
28
|
+
export interface Tag {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
externalDocs?: ExternalDocumentation;
|
|
32
|
+
}
|
|
33
|
+
export interface OperationListFilterFunctionParams {
|
|
34
|
+
items: OperationListItem[];
|
|
35
|
+
query: string;
|
|
36
|
+
}
|
|
37
|
+
export type OperationListFilterFunction = (params: OperationListFilterFunctionParams) => OperationListItem[];
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=spec-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-renderer.d.ts","sourceRoot":"","sources":["../../../src/types/spec-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAA;AAE3C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IAChE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CACnB;AAED,UAAU,qBAAqB;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,qBAAqB,CAAA;CACrC;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,iBAAiB,EAAE,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,iCAAiC,KAAK,iBAAiB,EAAE,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kong-ui-public/spec-renderer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/spec-renderer.umd.js",
|
|
6
|
+
"module": "./dist/spec-renderer.es.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/spec-renderer.es.js",
|
|
14
|
+
"require": "./dist/spec-renderer.umd.js"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json",
|
|
17
|
+
"./dist/*": "./dist/*"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@kong/kongponents": "^8.22.0",
|
|
24
|
+
"vue": "^3.2.45"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@kong/kongponents": "^8.22.0",
|
|
28
|
+
"@modyfi/vite-plugin-yaml": "^1.0.4",
|
|
29
|
+
"@types/lodash.clonedeep": "^4.5.7",
|
|
30
|
+
"openapi-types": "^12.1.0",
|
|
31
|
+
"vue": "^3.2.45"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@kong-ui-public/swagger-ui-web-component": "^0.3.0",
|
|
35
|
+
"lodash.clonedeep": "^4.5.0"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/Kong/public-ui-components.git",
|
|
40
|
+
"directory": "packages/portal/spec-renderer"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/portal/spec-renderer",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/Kong/public-ui-components/issues"
|
|
45
|
+
},
|
|
46
|
+
"author": "Kong, Inc.",
|
|
47
|
+
"license": "Apache-2.0",
|
|
48
|
+
"volta": {
|
|
49
|
+
"extends": "../../../package.json"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"dev": "cross-env USE_SANDBOX=true vite",
|
|
53
|
+
"build": "run-s typecheck build:package build:types",
|
|
54
|
+
"build:package": "vite build",
|
|
55
|
+
"build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly",
|
|
56
|
+
"build:visualize": "BUILD_VISUALIZER='portal/spec-renderer' vite build -m production",
|
|
57
|
+
"preview:package": "vite preview --port 4173",
|
|
58
|
+
"preview": "cross-env USE_SANDBOX=true PREVIEW_SANDBOX=true run-s build:package preview:package",
|
|
59
|
+
"lint": "eslint '**/*.{js,jsx,ts,tsx,vue}' --ignore-path '../../../.eslintignore'",
|
|
60
|
+
"lint:fix": "eslint '**/*.{js,jsx,ts,tsx,vue}' --ignore-path '../../../.eslintignore' --fix",
|
|
61
|
+
"stylelint": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,less,styl,vue}'",
|
|
62
|
+
"stylelint:fix": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,less,styl,vue}' --fix",
|
|
63
|
+
"typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit",
|
|
64
|
+
"test:component": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress run --component -b chrome --spec './src/**/*.cy.ts' --project '../../../.'",
|
|
65
|
+
"test:component:open": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress open --component -b chrome --project '../../../.'",
|
|
66
|
+
"test:unit": "cross-env FORCE_COLOR=1 vitest run",
|
|
67
|
+
"test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
|
|
68
|
+
}
|
|
69
|
+
}
|