@sme.up/ketchup 9.5.0 → 9.5.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/cjs/{f-button-033ed6d4.js → f-button-b76723c7.js} +1 -1
- package/dist/cjs/{f-cell-ef276797.js → f-cell-0238450e.js} +5 -5
- package/dist/cjs/{f-chip-d4e26a2b.js → f-chip-aad323a5.js} +2 -2
- package/dist/cjs/{f-image-33be7baf.js → f-image-a049cb94.js} +1 -1
- package/dist/cjs/{f-paginator-utils-5a18cc19.js → f-paginator-utils-3c1c8cf4.js} +2 -2
- package/dist/cjs/{f-text-field-f03e97f8.js → f-text-field-d045c000.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +125 -20
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +6 -6
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-f90f1b6d.js → kup-manager-ef4342bb.js} +493 -365
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/card.js +46 -0
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +9 -0
- package/dist/collection/components/kup-card/built-in/kup-card-openai.js +74 -0
- package/dist/collection/components/kup-card/kup-card-declarations.js +1 -0
- package/dist/collection/components/kup-card/kup-card.css +86 -0
- package/dist/collection/components/kup-card/kup-card.js +6 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +2 -3
- package/dist/collection/components/kup-dialog/kup-dialog.css +3 -3
- package/dist/collection/components/kup-dialog/kup-dialog.js +19 -5
- package/dist/collection/managers/kup-manager/kup-manager.js +6 -123
- package/dist/collection/managers/kup-openai/kup-openai-declarations.js +1 -0
- package/dist/collection/managers/kup-openai/kup-openai.js +248 -0
- package/dist/components/kup-autocomplete2.js +776 -546
- package/dist/components/kup-manager.js +493 -365
- package/dist/esm/{f-button-ccde4447.js → f-button-e5a13d96.js} +1 -1
- package/dist/esm/{f-cell-2ad41d52.js → f-cell-44737d32.js} +5 -5
- package/dist/esm/{f-chip-3df1c255.js → f-chip-4ba1fb6c.js} +2 -2
- package/dist/esm/{f-image-5434b351.js → f-image-17dd7557.js} +1 -1
- package/dist/esm/{f-paginator-utils-b90cdd2b.js → f-paginator-utils-c0925f43.js} +2 -2
- package/dist/esm/{f-text-field-f0b81f8b.js → f-text-field-97929753.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +125 -20
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +6 -6
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-e33d8d8c.js → kup-manager-21e2ce65.js} +493 -365
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00cc3d95.entry.js +1 -0
- package/dist/ketchup/{p-b104afb6.entry.js → p-04861e0f.entry.js} +1 -1
- package/dist/ketchup/{p-01aaf3e4.entry.js → p-0bdd3eb4.entry.js} +1 -1
- package/dist/ketchup/{p-1a594e06.entry.js → p-15c3d2c4.entry.js} +1 -1
- package/dist/ketchup/{p-5b3d8636.entry.js → p-265c1bac.entry.js} +1 -1
- package/dist/ketchup/{p-c0c65349.entry.js → p-3172b2d6.entry.js} +1 -1
- package/dist/ketchup/{p-788da2d9.entry.js → p-4528e07a.entry.js} +1 -1
- package/dist/ketchup/{p-58798e2d.entry.js → p-4b141cad.entry.js} +1 -1
- package/dist/ketchup/{p-f81d7218.entry.js → p-4dbcd9cf.entry.js} +1 -1
- package/dist/ketchup/{p-ddd25869.entry.js → p-62fe8b61.entry.js} +1 -1
- package/dist/ketchup/{p-6a8fcb02.entry.js → p-65984a13.entry.js} +1 -1
- package/dist/ketchup/{p-190d0bc5.entry.js → p-6e2a9054.entry.js} +1 -1
- package/dist/ketchup/p-7e1d9192.js +29 -0
- package/dist/ketchup/{p-9df95b9f.js → p-859aa987.js} +1 -1
- package/dist/ketchup/{p-a5229d3d.entry.js → p-88efeed0.entry.js} +1 -1
- package/dist/ketchup/p-89f09a1c.entry.js +9 -0
- package/dist/ketchup/{p-6f108540.entry.js → p-91180bd4.entry.js} +1 -1
- package/dist/ketchup/{p-269a1dfe.entry.js → p-9868af74.entry.js} +1 -1
- package/dist/ketchup/{p-eea1ee1b.js → p-9bdc7491.js} +1 -1
- package/dist/ketchup/{p-95b31ede.js → p-9bf00c9c.js} +1 -1
- package/dist/ketchup/{p-11e7be94.js → p-9e68a4c0.js} +1 -1
- package/dist/ketchup/{p-2940b559.entry.js → p-aecf6437.entry.js} +1 -1
- package/dist/ketchup/{p-7e5d8532.entry.js → p-bc0a2875.entry.js} +1 -1
- package/dist/ketchup/{p-1dbfcab5.entry.js → p-da3b5277.entry.js} +1 -1
- package/dist/ketchup/{p-4afe8662.js → p-de755f71.js} +1 -1
- package/dist/ketchup/{p-f0e4e190.js → p-e50650d0.js} +1 -1
- package/dist/ketchup/{p-b857aab2.entry.js → p-ec469a38.entry.js} +1 -1
- package/dist/ketchup/{p-4725191c.entry.js → p-ee382e52.entry.js} +1 -1
- package/dist/ketchup/{p-5fa089cd.entry.js → p-f8069901.entry.js} +1 -1
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +6 -0
- package/dist/types/components/kup-card/built-in/kup-card-openai.d.ts +3 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +20 -1
- package/dist/types/components.d.ts +0 -86
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +2 -14
- package/dist/types/managers/kup-manager/kup-manager.d.ts +3 -17
- package/dist/types/managers/kup-openai/kup-openai-declarations.d.ts +4 -0
- package/dist/types/managers/kup-openai/kup-openai.d.ts +29 -0
- package/package.json +1 -1
- package/dist/cjs/kup-openai-interface.cjs.entry.js +0 -146
- package/dist/collection/components/kup-openai-interface/kup-openai-interface-declarations.js +0 -11
- package/dist/collection/components/kup-openai-interface/kup-openai-interface.css +0 -64
- package/dist/collection/components/kup-openai-interface/kup-openai-interface.js +0 -340
- package/dist/components/kup-openai-interface.d.ts +0 -11
- package/dist/components/kup-openai-interface.js +0 -301
- package/dist/esm/kup-openai-interface.entry.js +0 -142
- package/dist/ketchup/p-23e4caa1.entry.js +0 -9
- package/dist/ketchup/p-2681d3a2.entry.js +0 -1
- package/dist/ketchup/p-39ba3355.js +0 -29
- package/dist/ketchup/p-645d881d.entry.js +0 -1
- package/dist/types/components/kup-openai-interface/kup-openai-interface-declarations.d.ts +0 -10
- package/dist/types/components/kup-openai-interface/kup-openai-interface.d.ts +0 -59
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
--kup_dialog_header_height: var(--kup-dialog-header-height, 2em);
|
|
3
|
-
background-color: var(--kup-background-color);
|
|
4
|
-
color: var(--kup-text-color);
|
|
5
|
-
display: block;
|
|
6
|
-
height: auto;
|
|
7
|
-
min-width: 500px;
|
|
8
|
-
width: 500px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.header {
|
|
12
|
-
background-color: var(--kup-title-background-color);
|
|
13
|
-
color: var(--kup-title-color);
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
height: var(--kup_dialog_header_height);
|
|
17
|
-
position: relative;
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
.header__title {
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
line-height: 2em;
|
|
23
|
-
padding-left: 0.5em;
|
|
24
|
-
padding-right: 2em;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
}
|
|
29
|
-
.header__close.f-image {
|
|
30
|
-
--kup-icon-color: var(--kup-title-color);
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
margin-right: 0;
|
|
33
|
-
transition: opacity 0.25s;
|
|
34
|
-
position: absolute;
|
|
35
|
-
right: 0;
|
|
36
|
-
background: var(--kup-title-background-color);
|
|
37
|
-
height: var(--kup_image_height);
|
|
38
|
-
width: var(--kup_image_width);
|
|
39
|
-
}
|
|
40
|
-
.header__close.f-image:hover {
|
|
41
|
-
opacity: 0.5;
|
|
42
|
-
}
|
|
43
|
-
.header__close.f-image .f-image__icon {
|
|
44
|
-
height: var(--kup_image_height);
|
|
45
|
-
width: var(--kup_image_width);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
kup-text-field {
|
|
49
|
-
padding-top: 12px;
|
|
50
|
-
padding-right: 3px;
|
|
51
|
-
padding-left: 3px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
kup-button {
|
|
55
|
-
padding-top: 8px;
|
|
56
|
-
padding-left: 3px;
|
|
57
|
-
padding-bottom: 2px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
kup-data-table {
|
|
61
|
-
padding-top: 8px;
|
|
62
|
-
padding-left: 3px;
|
|
63
|
-
padding-bottom: 2px;
|
|
64
|
-
}
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f)
|
|
3
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
-
};
|
|
8
|
-
var _KupOpenAiInterface_instances, _KupOpenAiInterface_openAiInteract, _KupOpenAiInterface_dataTableData;
|
|
9
|
-
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
10
|
-
import { kupManagerInstance } from "../../managers/kup-manager/kup-manager";
|
|
11
|
-
import { getProps, setProps } from "../../utils/utils";
|
|
12
|
-
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
13
|
-
import { KupOpenAiInterfaceProps } from "./kup-openai-interface-declarations";
|
|
14
|
-
import { FImage } from "../../f-components/f-image/f-image";
|
|
15
|
-
export class KupOpenAiInterface {
|
|
16
|
-
constructor() {
|
|
17
|
-
_KupOpenAiInterface_instances.add(this);
|
|
18
|
-
/*-------------------------------------------------*/
|
|
19
|
-
/* I n t e r n a l V a r i a b l e s */
|
|
20
|
-
/*-------------------------------------------------*/
|
|
21
|
-
this.dragHandler = null;
|
|
22
|
-
this.kupManager = kupManagerInstance();
|
|
23
|
-
this.textArea = null;
|
|
24
|
-
this.dataTable = null;
|
|
25
|
-
this.button = null;
|
|
26
|
-
this.messages = [];
|
|
27
|
-
this.customStyle = '';
|
|
28
|
-
this.data = null;
|
|
29
|
-
this.dialogTitle = 'Open AI integration';
|
|
30
|
-
this.label = 'Insert natural language request...';
|
|
31
|
-
}
|
|
32
|
-
/*-------------------------------------------------*/
|
|
33
|
-
/* P u b l i c M e t h o d s */
|
|
34
|
-
/*-------------------------------------------------*/
|
|
35
|
-
/**
|
|
36
|
-
* Used to retrieve component's props values.
|
|
37
|
-
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
38
|
-
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
39
|
-
*/
|
|
40
|
-
async getProps(descriptions) {
|
|
41
|
-
return getProps(this, KupOpenAiInterfaceProps, descriptions);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* This method is used to trigger a new render of the component.
|
|
45
|
-
*/
|
|
46
|
-
async refresh() {
|
|
47
|
-
forceUpdate(this);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Sets the props to the component.
|
|
51
|
-
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
52
|
-
*/
|
|
53
|
-
async setProps(props) {
|
|
54
|
-
setProps(this, KupOpenAiInterfaceProps, props);
|
|
55
|
-
}
|
|
56
|
-
/*-------------------------------------------------*/
|
|
57
|
-
/* L i f e c y c l e H o o k s */
|
|
58
|
-
/*-------------------------------------------------*/
|
|
59
|
-
componentWillLoad() {
|
|
60
|
-
this.kupManager.debug.logLoad(this, false);
|
|
61
|
-
this.kupManager.language.register(this);
|
|
62
|
-
this.kupManager.theme.register(this);
|
|
63
|
-
}
|
|
64
|
-
componentDidLoad() {
|
|
65
|
-
this.dragHandler =
|
|
66
|
-
this.rootElement.shadowRoot.querySelector('#drag-handle');
|
|
67
|
-
this.kupManager.interact.dialogify(this.rootElement, this.dragHandler);
|
|
68
|
-
this.kupReady.emit({
|
|
69
|
-
comp: this,
|
|
70
|
-
id: this.rootElement.id,
|
|
71
|
-
});
|
|
72
|
-
this.kupManager.debug.logLoad(this, true);
|
|
73
|
-
}
|
|
74
|
-
componentWillRender() {
|
|
75
|
-
this.kupManager.debug.logRender(this, false);
|
|
76
|
-
}
|
|
77
|
-
componentDidRender() {
|
|
78
|
-
this.kupManager.debug.logRender(this, true);
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
const dataTableProps = {};
|
|
82
|
-
dataTableProps.data = __classPrivateFieldGet(this, _KupOpenAiInterface_instances, "m", _KupOpenAiInterface_dataTableData).call(this);
|
|
83
|
-
const textAreaProps = {};
|
|
84
|
-
textAreaProps.textArea = true;
|
|
85
|
-
textAreaProps.label = this.label;
|
|
86
|
-
const buttonProps = {};
|
|
87
|
-
buttonProps.label = 'Confirm';
|
|
88
|
-
buttonProps.icon = 'check';
|
|
89
|
-
buttonProps.showSpinner = false;
|
|
90
|
-
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: "openai-interface-wrapper" }, h("div", { class: "actions", id: "drag-handle" }, h("div", { class: "header" }, this.dialogTitle ? (h("div", { class: "header__title" }, this.dialogTitle)) : null, h(FImage, { onClick: () => this.kupManager.hideOpenAI(), sizeX: "1.25em", sizeY: "1.25em", resource: "clear", wrapperClass: "header__close" })), h("kup-text-field", Object.assign({}, textAreaProps, { ref: (el) => (this.textArea = el) })), h("kup-button", Object.assign({}, buttonProps, { ref: (el) => (this.button = el), "onKup-button-click": () => __classPrivateFieldGet(this, _KupOpenAiInterface_instances, "m", _KupOpenAiInterface_openAiInteract).call(this) })), h("kup-data-table", Object.assign({}, dataTableProps, { ref: (el) => (this.dataTable = el) })))))));
|
|
91
|
-
}
|
|
92
|
-
disconnectedCallback() {
|
|
93
|
-
this.kupManager.language.unregister(this);
|
|
94
|
-
this.kupManager.theme.unregister(this);
|
|
95
|
-
}
|
|
96
|
-
static get is() { return "kup-openai-interface"; }
|
|
97
|
-
static get encapsulation() { return "shadow"; }
|
|
98
|
-
static get originalStyleUrls() {
|
|
99
|
-
return {
|
|
100
|
-
"$": ["kup-openai-interface.scss"]
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
static get styleUrls() {
|
|
104
|
-
return {
|
|
105
|
-
"$": ["kup-openai-interface.css"]
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
static get properties() {
|
|
109
|
-
return {
|
|
110
|
-
"customStyle": {
|
|
111
|
-
"type": "string",
|
|
112
|
-
"mutable": false,
|
|
113
|
-
"complexType": {
|
|
114
|
-
"original": "string",
|
|
115
|
-
"resolved": "string",
|
|
116
|
-
"references": {}
|
|
117
|
-
},
|
|
118
|
-
"required": false,
|
|
119
|
-
"optional": false,
|
|
120
|
-
"docs": {
|
|
121
|
-
"tags": [{
|
|
122
|
-
"name": "default",
|
|
123
|
-
"text": "\"\""
|
|
124
|
-
}, {
|
|
125
|
-
"name": "see",
|
|
126
|
-
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
127
|
-
}],
|
|
128
|
-
"text": "Custom style of the component."
|
|
129
|
-
},
|
|
130
|
-
"attribute": "custom-style",
|
|
131
|
-
"reflect": false,
|
|
132
|
-
"defaultValue": "''"
|
|
133
|
-
},
|
|
134
|
-
"data": {
|
|
135
|
-
"type": "unknown",
|
|
136
|
-
"mutable": true,
|
|
137
|
-
"complexType": {
|
|
138
|
-
"original": "KupDataDataset",
|
|
139
|
-
"resolved": "KupDataDataset",
|
|
140
|
-
"references": {
|
|
141
|
-
"KupDataDataset": {
|
|
142
|
-
"location": "import",
|
|
143
|
-
"path": "../../managers/kup-data/kup-data-declarations",
|
|
144
|
-
"id": "src/managers/kup-data/kup-data-declarations.ts::KupDataDataset"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"required": false,
|
|
149
|
-
"optional": false,
|
|
150
|
-
"docs": {
|
|
151
|
-
"tags": [{
|
|
152
|
-
"name": "default",
|
|
153
|
-
"text": "null"
|
|
154
|
-
}],
|
|
155
|
-
"text": "Sets the data that will be used for OpenAI comunication."
|
|
156
|
-
},
|
|
157
|
-
"defaultValue": "null"
|
|
158
|
-
},
|
|
159
|
-
"dialogTitle": {
|
|
160
|
-
"type": "string",
|
|
161
|
-
"mutable": false,
|
|
162
|
-
"complexType": {
|
|
163
|
-
"original": "string",
|
|
164
|
-
"resolved": "string",
|
|
165
|
-
"references": {}
|
|
166
|
-
},
|
|
167
|
-
"required": false,
|
|
168
|
-
"optional": false,
|
|
169
|
-
"docs": {
|
|
170
|
-
"tags": [{
|
|
171
|
-
"name": "default",
|
|
172
|
-
"text": "\"Open AI integration\""
|
|
173
|
-
}],
|
|
174
|
-
"text": "Sets the dialog title"
|
|
175
|
-
},
|
|
176
|
-
"attribute": "dialog-title",
|
|
177
|
-
"reflect": false,
|
|
178
|
-
"defaultValue": "'Open AI integration'"
|
|
179
|
-
},
|
|
180
|
-
"label": {
|
|
181
|
-
"type": "string",
|
|
182
|
-
"mutable": false,
|
|
183
|
-
"complexType": {
|
|
184
|
-
"original": "string",
|
|
185
|
-
"resolved": "string",
|
|
186
|
-
"references": {}
|
|
187
|
-
},
|
|
188
|
-
"required": false,
|
|
189
|
-
"optional": false,
|
|
190
|
-
"docs": {
|
|
191
|
-
"tags": [{
|
|
192
|
-
"name": "default",
|
|
193
|
-
"text": "\"Insert natural language request...\""
|
|
194
|
-
}],
|
|
195
|
-
"text": "Sets the text area label"
|
|
196
|
-
},
|
|
197
|
-
"attribute": "label",
|
|
198
|
-
"reflect": false,
|
|
199
|
-
"defaultValue": "'Insert natural language request...'"
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
static get events() {
|
|
204
|
-
return [{
|
|
205
|
-
"method": "kupReady",
|
|
206
|
-
"name": "kup-openai-interface-ready",
|
|
207
|
-
"bubbles": true,
|
|
208
|
-
"cancelable": false,
|
|
209
|
-
"composed": true,
|
|
210
|
-
"docs": {
|
|
211
|
-
"tags": [],
|
|
212
|
-
"text": ""
|
|
213
|
-
},
|
|
214
|
-
"complexType": {
|
|
215
|
-
"original": "KupEventPayload",
|
|
216
|
-
"resolved": "KupEventPayload",
|
|
217
|
-
"references": {
|
|
218
|
-
"KupEventPayload": {
|
|
219
|
-
"location": "import",
|
|
220
|
-
"path": "../../types/GenericTypes",
|
|
221
|
-
"id": "src/types/GenericTypes.ts::KupEventPayload"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}];
|
|
226
|
-
}
|
|
227
|
-
static get methods() {
|
|
228
|
-
return {
|
|
229
|
-
"getProps": {
|
|
230
|
-
"complexType": {
|
|
231
|
-
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
232
|
-
"parameters": [{
|
|
233
|
-
"tags": [{
|
|
234
|
-
"name": "param",
|
|
235
|
-
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
236
|
-
}],
|
|
237
|
-
"text": "- When provided and true, the result will be the list of props with their description."
|
|
238
|
-
}],
|
|
239
|
-
"references": {
|
|
240
|
-
"Promise": {
|
|
241
|
-
"location": "global",
|
|
242
|
-
"id": "global::Promise"
|
|
243
|
-
},
|
|
244
|
-
"GenericObject": {
|
|
245
|
-
"location": "import",
|
|
246
|
-
"path": "../../types/GenericTypes",
|
|
247
|
-
"id": "src/types/GenericTypes.ts::GenericObject"
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
"return": "Promise<GenericObject>"
|
|
251
|
-
},
|
|
252
|
-
"docs": {
|
|
253
|
-
"text": "Used to retrieve component's props values.",
|
|
254
|
-
"tags": [{
|
|
255
|
-
"name": "param",
|
|
256
|
-
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
257
|
-
}, {
|
|
258
|
-
"name": "returns",
|
|
259
|
-
"text": "List of props as object, each key will be a prop."
|
|
260
|
-
}]
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
"refresh": {
|
|
264
|
-
"complexType": {
|
|
265
|
-
"signature": "() => Promise<void>",
|
|
266
|
-
"parameters": [],
|
|
267
|
-
"references": {
|
|
268
|
-
"Promise": {
|
|
269
|
-
"location": "global",
|
|
270
|
-
"id": "global::Promise"
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"return": "Promise<void>"
|
|
274
|
-
},
|
|
275
|
-
"docs": {
|
|
276
|
-
"text": "This method is used to trigger a new render of the component.",
|
|
277
|
-
"tags": []
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
"setProps": {
|
|
281
|
-
"complexType": {
|
|
282
|
-
"signature": "(props: GenericObject) => Promise<void>",
|
|
283
|
-
"parameters": [{
|
|
284
|
-
"tags": [{
|
|
285
|
-
"name": "param",
|
|
286
|
-
"text": "props - Object containing props that will be set to the component."
|
|
287
|
-
}],
|
|
288
|
-
"text": "- Object containing props that will be set to the component."
|
|
289
|
-
}],
|
|
290
|
-
"references": {
|
|
291
|
-
"Promise": {
|
|
292
|
-
"location": "global",
|
|
293
|
-
"id": "global::Promise"
|
|
294
|
-
},
|
|
295
|
-
"GenericObject": {
|
|
296
|
-
"location": "import",
|
|
297
|
-
"path": "../../types/GenericTypes",
|
|
298
|
-
"id": "src/types/GenericTypes.ts::GenericObject"
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
"return": "Promise<void>"
|
|
302
|
-
},
|
|
303
|
-
"docs": {
|
|
304
|
-
"text": "Sets the props to the component.",
|
|
305
|
-
"tags": [{
|
|
306
|
-
"name": "param",
|
|
307
|
-
"text": "props - Object containing props that will be set to the component."
|
|
308
|
-
}]
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
static get elementRef() { return "rootElement"; }
|
|
314
|
-
}
|
|
315
|
-
_KupOpenAiInterface_instances = new WeakSet(), _KupOpenAiInterface_openAiInteract =
|
|
316
|
-
/*-------------------------------------------------*/
|
|
317
|
-
/* P r i v a t e M e t h o d s */
|
|
318
|
-
/*-------------------------------------------------*/
|
|
319
|
-
async function _KupOpenAiInterface_openAiInteract() {
|
|
320
|
-
this.button.showSpinner = true;
|
|
321
|
-
this.messages = await this.kupManager.interactOpenAI(await this.textArea.getValue());
|
|
322
|
-
this.dataTable.data = __classPrivateFieldGet(this, _KupOpenAiInterface_instances, "m", _KupOpenAiInterface_dataTableData).call(this);
|
|
323
|
-
this.button.showSpinner = false;
|
|
324
|
-
}, _KupOpenAiInterface_dataTableData = function _KupOpenAiInterface_dataTableData() {
|
|
325
|
-
const data = {};
|
|
326
|
-
data.columns = [{ name: 'mess', title: 'Message' }];
|
|
327
|
-
data.rows = [];
|
|
328
|
-
if (this.messages) {
|
|
329
|
-
for (let i = 0; i < this.messages.length; i++) {
|
|
330
|
-
const mess = this.messages[i];
|
|
331
|
-
if (mess) {
|
|
332
|
-
data.rows.push({
|
|
333
|
-
unselectable: true,
|
|
334
|
-
cells: { mess: { value: mess } },
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
return data;
|
|
340
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface KupOpenaiInterface extends Components.KupOpenaiInterface, HTMLElement {}
|
|
4
|
-
export const KupOpenaiInterface: {
|
|
5
|
-
prototype: KupOpenaiInterface;
|
|
6
|
-
new (): KupOpenaiInterface;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|