@sme.up/ketchup 9.5.0 → 9.5.2

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 (132) hide show
  1. package/dist/cjs/{f-button-033ed6d4.js → f-button-357a3dff.js} +1 -1
  2. package/dist/cjs/{f-cell-ef276797.js → f-cell-1de0ea69.js} +5 -5
  3. package/dist/cjs/{f-chip-d4e26a2b.js → f-chip-bd5882a0.js} +2 -2
  4. package/dist/cjs/{f-image-33be7baf.js → f-image-30531fd0.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-5a18cc19.js → f-paginator-utils-ad8a4635.js} +2 -2
  6. package/dist/cjs/{f-text-field-f03e97f8.js → f-text-field-be758970.js} +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/ketchup.cjs.js +1 -1
  9. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  10. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +125 -20
  11. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  12. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  13. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  16. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  19. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
  22. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  24. package/dist/cjs/{kup-manager-f90f1b6d.js → kup-manager-cefb1999.js} +492 -365
  25. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  30. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  32. package/dist/cjs/loader.cjs.js +1 -1
  33. package/dist/collection/assets/card.js +46 -0
  34. package/dist/collection/collection-manifest.json +0 -1
  35. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +9 -0
  36. package/dist/collection/components/kup-card/built-in/kup-card-openai.js +74 -0
  37. package/dist/collection/components/kup-card/kup-card-declarations.js +1 -0
  38. package/dist/collection/components/kup-card/kup-card.css +86 -0
  39. package/dist/collection/components/kup-card/kup-card.js +6 -0
  40. package/dist/collection/components/kup-data-table/kup-data-table.js +2 -3
  41. package/dist/collection/components/kup-dialog/kup-dialog.css +3 -3
  42. package/dist/collection/components/kup-dialog/kup-dialog.js +19 -5
  43. package/dist/collection/managers/kup-manager/kup-manager.js +6 -123
  44. package/dist/collection/managers/kup-openai/kup-openai-declarations.js +1 -0
  45. package/dist/collection/managers/kup-openai/kup-openai.js +247 -0
  46. package/dist/components/kup-autocomplete2.js +776 -546
  47. package/dist/components/kup-manager.js +492 -365
  48. package/dist/esm/{f-button-ccde4447.js → f-button-856a189a.js} +1 -1
  49. package/dist/esm/{f-cell-2ad41d52.js → f-cell-6324d838.js} +5 -5
  50. package/dist/esm/{f-chip-3df1c255.js → f-chip-e15fba8a.js} +2 -2
  51. package/dist/esm/{f-image-5434b351.js → f-image-26b1bc14.js} +1 -1
  52. package/dist/esm/{f-paginator-utils-b90cdd2b.js → f-paginator-utils-e8f62783.js} +2 -2
  53. package/dist/esm/{f-text-field-f0b81f8b.js → f-text-field-bbe1f236.js} +1 -1
  54. package/dist/esm/index.js +1 -1
  55. package/dist/esm/ketchup.js +1 -1
  56. package/dist/esm/kup-accordion.entry.js +2 -2
  57. package/dist/esm/kup-autocomplete_27.entry.js +125 -20
  58. package/dist/esm/kup-box.entry.js +7 -7
  59. package/dist/esm/kup-calendar.entry.js +4 -4
  60. package/dist/esm/kup-card-list.entry.js +1 -1
  61. package/dist/esm/kup-cell.entry.js +6 -6
  62. package/dist/esm/kup-dashboard.entry.js +4 -4
  63. package/dist/esm/kup-drawer.entry.js +1 -1
  64. package/dist/esm/kup-echart.entry.js +1 -1
  65. package/dist/esm/kup-family-tree.entry.js +3 -3
  66. package/dist/esm/kup-grid.entry.js +1 -1
  67. package/dist/esm/kup-iframe.entry.js +1 -1
  68. package/dist/esm/kup-image-list.entry.js +6 -6
  69. package/dist/esm/kup-lazy.entry.js +1 -1
  70. package/dist/esm/kup-magic-box.entry.js +2 -2
  71. package/dist/esm/{kup-manager-e33d8d8c.js → kup-manager-8d1df189.js} +492 -365
  72. package/dist/esm/kup-nav-bar.entry.js +1 -1
  73. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  74. package/dist/esm/kup-photo-frame.entry.js +1 -1
  75. package/dist/esm/kup-planner.entry.js +2 -2
  76. package/dist/esm/kup-probe.entry.js +1 -1
  77. package/dist/esm/kup-qlik.entry.js +1 -1
  78. package/dist/esm/kup-snackbar.entry.js +3 -3
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/ketchup/index.esm.js +1 -1
  81. package/dist/ketchup/ketchup.esm.js +1 -1
  82. package/dist/ketchup/{p-f81d7218.entry.js → p-07bed934.entry.js} +1 -1
  83. package/dist/ketchup/{p-5b3d8636.entry.js → p-0c124f99.entry.js} +1 -1
  84. package/dist/ketchup/{p-58798e2d.entry.js → p-0f6cb6e4.entry.js} +1 -1
  85. package/dist/ketchup/p-177f8008.entry.js +9 -0
  86. package/dist/ketchup/{p-f0e4e190.js → p-269a9af8.js} +1 -1
  87. package/dist/ketchup/p-2ab02da0.entry.js +1 -0
  88. package/dist/ketchup/{p-1a594e06.entry.js → p-3f028a71.entry.js} +1 -1
  89. package/dist/ketchup/{p-6a8fcb02.entry.js → p-4a18db68.entry.js} +1 -1
  90. package/dist/ketchup/{p-01aaf3e4.entry.js → p-4eb6d4e8.entry.js} +1 -1
  91. package/dist/ketchup/{p-eea1ee1b.js → p-63031c77.js} +1 -1
  92. package/dist/ketchup/{p-4725191c.entry.js → p-753f30d8.entry.js} +1 -1
  93. package/dist/ketchup/{p-a5229d3d.entry.js → p-8042dcd5.entry.js} +1 -1
  94. package/dist/ketchup/{p-1dbfcab5.entry.js → p-81c1d557.entry.js} +1 -1
  95. package/dist/ketchup/p-937a322f.js +29 -0
  96. package/dist/ketchup/{p-4afe8662.js → p-9ba8f169.js} +1 -1
  97. package/dist/ketchup/{p-645d881d.entry.js → p-a2d3aec9.entry.js} +1 -1
  98. package/dist/ketchup/{p-2940b559.entry.js → p-b115e1ec.entry.js} +1 -1
  99. package/dist/ketchup/{p-11e7be94.js → p-b396d0f8.js} +1 -1
  100. package/dist/ketchup/{p-7e5d8532.entry.js → p-c12a9759.entry.js} +1 -1
  101. package/dist/ketchup/{p-190d0bc5.entry.js → p-cadeb53d.entry.js} +1 -1
  102. package/dist/ketchup/{p-9df95b9f.js → p-caeed3c3.js} +1 -1
  103. package/dist/ketchup/{p-b104afb6.entry.js → p-d300948a.entry.js} +1 -1
  104. package/dist/ketchup/{p-95b31ede.js → p-d76cd8d6.js} +1 -1
  105. package/dist/ketchup/{p-b857aab2.entry.js → p-d9a1e5a4.entry.js} +1 -1
  106. package/dist/ketchup/{p-788da2d9.entry.js → p-dc370227.entry.js} +1 -1
  107. package/dist/ketchup/{p-5fa089cd.entry.js → p-f1cae1e1.entry.js} +1 -1
  108. package/dist/ketchup/{p-269a1dfe.entry.js → p-f417e794.entry.js} +1 -1
  109. package/dist/ketchup/{p-c0c65349.entry.js → p-f753c13f.entry.js} +1 -1
  110. package/dist/ketchup/{p-ddd25869.entry.js → p-f7980061.entry.js} +1 -1
  111. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +6 -0
  112. package/dist/types/components/kup-card/built-in/kup-card-openai.d.ts +3 -0
  113. package/dist/types/components/kup-card/kup-card-declarations.d.ts +20 -1
  114. package/dist/types/components.d.ts +0 -86
  115. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +2 -14
  116. package/dist/types/managers/kup-manager/kup-manager.d.ts +3 -17
  117. package/dist/types/managers/kup-openai/kup-openai-declarations.d.ts +4 -0
  118. package/dist/types/managers/kup-openai/kup-openai.d.ts +29 -0
  119. package/package.json +1 -1
  120. package/dist/cjs/kup-openai-interface.cjs.entry.js +0 -146
  121. package/dist/collection/components/kup-openai-interface/kup-openai-interface-declarations.js +0 -11
  122. package/dist/collection/components/kup-openai-interface/kup-openai-interface.css +0 -64
  123. package/dist/collection/components/kup-openai-interface/kup-openai-interface.js +0 -340
  124. package/dist/components/kup-openai-interface.d.ts +0 -11
  125. package/dist/components/kup-openai-interface.js +0 -301
  126. package/dist/esm/kup-openai-interface.entry.js +0 -142
  127. package/dist/ketchup/p-23e4caa1.entry.js +0 -9
  128. package/dist/ketchup/p-2681d3a2.entry.js +0 -1
  129. package/dist/ketchup/p-39ba3355.js +0 -29
  130. package/dist/ketchup/p-6f108540.entry.js +0 -1
  131. package/dist/types/components/kup-openai-interface/kup-openai-interface-declarations.d.ts +0 -10
  132. package/dist/types/components/kup-openai-interface/kup-openai-interface.d.ts +0 -59
@@ -1,142 +0,0 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-59f83f91.js';
2
- import { k as kupManagerInstance, g as getProps, s as setProps } from './kup-manager-e33d8d8c.js';
3
- import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
4
- import { F as FImage } from './f-image-5434b351.js';
5
- import './kup-dates-15f89ea2.js';
6
-
7
- /**
8
- * Props of the kup-openai-interface component.
9
- * Used to export every prop in an object.
10
- */
11
- var KupOpenAiInterfaceProps;
12
- (function (KupOpenAiInterfaceProps) {
13
- KupOpenAiInterfaceProps["customStyle"] = "Custom style of the component.";
14
- KupOpenAiInterfaceProps["data"] = "Sets the data that will be used for OpenAI comunication.";
15
- KupOpenAiInterfaceProps["dialogTitle"] = "Sets the dialog title";
16
- KupOpenAiInterfaceProps["label"] = "Sets the text area label";
17
- })(KupOpenAiInterfaceProps || (KupOpenAiInterfaceProps = {}));
18
-
19
- const kupOpenaiInterfaceCss = ":host{--kup_dialog_header_height:var(--kup-dialog-header-height, 2em);background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:auto;min-width:500px;width:500px}.header{background-color:var(--kup-title-background-color);color:var(--kup-title-color);display:flex;flex-direction:row;height:var(--kup_dialog_header_height);position:relative;width:100%}.header__title{font-weight:bold;line-height:2em;padding-left:0.5em;padding-right:2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__close.f-image{--kup-icon-color:var(--kup-title-color);cursor:pointer;margin-right:0;transition:opacity 0.25s;position:absolute;right:0;background:var(--kup-title-background-color);height:var(--kup_image_height);width:var(--kup_image_width)}.header__close.f-image:hover{opacity:0.5}.header__close.f-image .f-image__icon{height:var(--kup_image_height);width:var(--kup_image_width)}kup-text-field{padding-top:12px;padding-right:3px;padding-left:3px}kup-button{padding-top:8px;padding-left:3px;padding-bottom:2px}kup-data-table{padding-top:8px;padding-left:3px;padding-bottom:2px}";
20
-
21
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
22
- if (kind === "a" && !f)
23
- throw new TypeError("Private accessor was defined without a getter");
24
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
25
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
26
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
27
- };
28
- var _KupOpenAiInterface_instances, _KupOpenAiInterface_openAiInteract, _KupOpenAiInterface_dataTableData;
29
- const KupOpenAiInterface = class {
30
- constructor(hostRef) {
31
- registerInstance(this, hostRef);
32
- this.kupReady = createEvent(this, "kup-openai-interface-ready", 6);
33
- _KupOpenAiInterface_instances.add(this);
34
- /*-------------------------------------------------*/
35
- /* I n t e r n a l V a r i a b l e s */
36
- /*-------------------------------------------------*/
37
- this.dragHandler = null;
38
- this.kupManager = kupManagerInstance();
39
- this.textArea = null;
40
- this.dataTable = null;
41
- this.button = null;
42
- this.messages = [];
43
- this.customStyle = '';
44
- this.data = null;
45
- this.dialogTitle = 'Open AI integration';
46
- this.label = 'Insert natural language request...';
47
- }
48
- /*-------------------------------------------------*/
49
- /* P u b l i c M e t h o d s */
50
- /*-------------------------------------------------*/
51
- /**
52
- * Used to retrieve component's props values.
53
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
54
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
55
- */
56
- async getProps(descriptions) {
57
- return getProps(this, KupOpenAiInterfaceProps, descriptions);
58
- }
59
- /**
60
- * This method is used to trigger a new render of the component.
61
- */
62
- async refresh() {
63
- forceUpdate(this);
64
- }
65
- /**
66
- * Sets the props to the component.
67
- * @param {GenericObject} props - Object containing props that will be set to the component.
68
- */
69
- async setProps(props) {
70
- setProps(this, KupOpenAiInterfaceProps, props);
71
- }
72
- /*-------------------------------------------------*/
73
- /* L i f e c y c l e H o o k s */
74
- /*-------------------------------------------------*/
75
- componentWillLoad() {
76
- this.kupManager.debug.logLoad(this, false);
77
- this.kupManager.language.register(this);
78
- this.kupManager.theme.register(this);
79
- }
80
- componentDidLoad() {
81
- this.dragHandler =
82
- this.rootElement.shadowRoot.querySelector('#drag-handle');
83
- this.kupManager.interact.dialogify(this.rootElement, this.dragHandler);
84
- this.kupReady.emit({
85
- comp: this,
86
- id: this.rootElement.id,
87
- });
88
- this.kupManager.debug.logLoad(this, true);
89
- }
90
- componentWillRender() {
91
- this.kupManager.debug.logRender(this, false);
92
- }
93
- componentDidRender() {
94
- this.kupManager.debug.logRender(this, true);
95
- }
96
- render() {
97
- const dataTableProps = {};
98
- dataTableProps.data = __classPrivateFieldGet(this, _KupOpenAiInterface_instances, "m", _KupOpenAiInterface_dataTableData).call(this);
99
- const textAreaProps = {};
100
- textAreaProps.textArea = true;
101
- textAreaProps.label = this.label;
102
- const buttonProps = {};
103
- buttonProps.label = 'Confirm';
104
- buttonProps.icon = 'check';
105
- buttonProps.showSpinner = false;
106
- 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) })))))));
107
- }
108
- disconnectedCallback() {
109
- this.kupManager.language.unregister(this);
110
- this.kupManager.theme.unregister(this);
111
- }
112
- get rootElement() { return getElement(this); }
113
- };
114
- _KupOpenAiInterface_instances = new WeakSet(), _KupOpenAiInterface_openAiInteract =
115
- /*-------------------------------------------------*/
116
- /* P r i v a t e M e t h o d s */
117
- /*-------------------------------------------------*/
118
- async function _KupOpenAiInterface_openAiInteract() {
119
- this.button.showSpinner = true;
120
- this.messages = await this.kupManager.interactOpenAI(await this.textArea.getValue());
121
- this.dataTable.data = __classPrivateFieldGet(this, _KupOpenAiInterface_instances, "m", _KupOpenAiInterface_dataTableData).call(this);
122
- this.button.showSpinner = false;
123
- }, _KupOpenAiInterface_dataTableData = function _KupOpenAiInterface_dataTableData() {
124
- const data = {};
125
- data.columns = [{ name: 'mess', title: 'Message' }];
126
- data.rows = [];
127
- if (this.messages) {
128
- for (let i = 0; i < this.messages.length; i++) {
129
- const mess = this.messages[i];
130
- if (mess) {
131
- data.rows.push({
132
- unselectable: true,
133
- cells: { mess: { value: mess } },
134
- });
135
- }
136
- }
137
- }
138
- return data;
139
- };
140
- KupOpenAiInterface.style = kupOpenaiInterfaceCss;
141
-
142
- export { KupOpenAiInterface as kup_openai_interface };