@knime/product-features 4.1.0 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @knime/product-features
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 6c6348b: BREAKING CHANGES:
8
+
9
+ - `KdsPromptInput`: replace the `leftSubtext` prop with a `left-subtext` slot, e.g. for an "Auto approve" `KdsToggleSwitch`. Note that there aren't any consumers of `KdsPromptInput` that use the `leftSubtext` prop.
10
+
11
+ ### Minor Changes
12
+
13
+ - 3bcf7fd: Add the `pageVisitedBilling`, `limitShownBilling`, `limitShownToast`, `upgradeAttemptedBillingPlan` and `upgradeAttemptedBillingLimitBanner` cloudhome analytics events and the `LimitPayload` type.
14
+ - c18be66: - `KdsPromptInput`:
15
+ - add `secondaryButtonLabel` to the `status` prop, which renders a transparent button in the status banner and emits `statusSecondaryButtonClick` when clicked. It sits left of the action button when `buttonLabel` is set, and also renders on its own without `buttonLabel`. When both buttons are shown and the banner is narrower than 480px, they move onto their own row below the message.
16
+ - show up to 4 lines of the status message before it scrolls, instead of 2.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [2352be0]
21
+ - @knime/utils@2.0.3
22
+
23
+ ## 4.1.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [77b4981]
28
+ - @knime/kds-components@10.0.0
29
+ - @knime/kds-styles@10.0.0
30
+
3
31
  ## 4.1.0
4
32
 
5
33
  ### Minor Changes
package/dist/ai.css CHANGED
@@ -27,8 +27,9 @@
27
27
  }
28
28
 
29
29
  .inline-status-banner {
30
- &[data-v-89e51df3] {
30
+ &[data-v-6ff09fdb] {
31
31
  display: flex;
32
+ flex-wrap: wrap;
32
33
  gap: var(--kds-spacing-container-0-37x);
33
34
  align-items: center;
34
35
 
@@ -44,40 +45,52 @@
44
45
  )
45
46
  calc(var(--kds-spacing-container-0-5x) - var(--kds-core-border-width-xs))
46
47
  calc(var(--kds-spacing-container-0-5x) + var(--kds-spacing-container-0-25x));
48
+ container-type: inline-size;
47
49
  font: var(--kds-font-base-body-small);
48
50
  color: var(--kds-color-text-and-icon-neutral);
49
51
  }
50
- .icon-wrapper[data-v-89e51df3],
51
- .action[data-v-89e51df3] {
52
+ .icon-wrapper[data-v-6ff09fdb],
53
+ .actions[data-v-6ff09fdb] {
52
54
  flex-shrink: 0;
53
55
  }
54
- .icon-wrapper[data-v-89e51df3] {
56
+ .actions[data-v-6ff09fdb] {
57
+ display: flex;
58
+ gap: var(--kds-spacing-container-0-25x);
59
+ align-items: center;
60
+ justify-content: flex-end;
61
+ }
62
+ @container (width < 480px) {
63
+ .actions.both-buttons[data-v-6ff09fdb] {
64
+ flex-basis: 100%;
65
+ }
66
+ }
67
+ .icon-wrapper[data-v-6ff09fdb] {
55
68
  display: flex;
56
69
  align-items: center;
57
70
  height: var(--kds-dimension-component-height-1-5x);
58
71
  }
59
- &.error .icon[data-v-89e51df3] {
72
+ &.error .icon[data-v-6ff09fdb] {
60
73
  color: var(--kds-color-text-and-icon-danger);
61
74
  }
62
- &.warning .icon[data-v-89e51df3] {
75
+ &.warning .icon[data-v-6ff09fdb] {
63
76
  color: var(--kds-color-text-and-icon-warning);
64
77
  }
65
- &.note .icon[data-v-89e51df3] {
78
+ &.note .icon[data-v-6ff09fdb] {
66
79
  color: var(--kds-color-text-and-icon-info);
67
80
  }
68
81
  }
69
82
  .text {
70
- &[data-v-89e51df3] {
83
+ &[data-v-6ff09fdb] {
71
84
  flex: 1 0 0;
72
85
  min-width: 0;
73
86
 
74
- /* Allow up to 2 lines, scroll beyond that. */
75
- max-height: calc(2 * 1lh);
87
+ /* Allow up to 4 lines, scroll beyond that. */
88
+ max-height: calc(4 * 1lh);
76
89
  overflow-y: auto;
77
90
  overflow-wrap: anywhere;
78
91
  scrollbar-width: thin;
79
92
  }
80
- &[data-v-89e51df3]:focus-visible {
93
+ &[data-v-6ff09fdb]:focus-visible {
81
94
  outline: var(--kds-border-action-focused);
82
95
  outline-offset: var(--kds-spacing-offset-focus);
83
96
  }
@@ -181,13 +194,13 @@
181
194
  var(--kds-spacing-container-1x);
182
195
  }
183
196
 
184
- .prompt-input[data-v-e3abc825] {
197
+ .prompt-input[data-v-b1453ba4] {
185
198
  display: flex;
186
199
  flex-direction: column;
187
200
  width: 100%;
188
201
  }
189
202
  .input-container {
190
- &[data-v-e3abc825] {
203
+ &[data-v-b1453ba4] {
191
204
  position: relative;
192
205
  display: flex;
193
206
  gap: var(--kds-spacing-container-0-5x);
@@ -201,19 +214,19 @@
201
214
  border: var(--kds-border-action-input);
202
215
  border-radius: var(--kds-border-radius-container-0-37x);
203
216
  }
204
- &[data-v-e3abc825]:has(textarea:focus:not(:disabled)) {
217
+ &[data-v-b1453ba4]:has(textarea:focus:not(:disabled)) {
205
218
  outline: var(--kds-border-action-focused);
206
219
  outline-offset: var(--kds-spacing-offset-focus);
207
220
  }
208
- &[data-v-e3abc825]:has(textarea:hover:not(:disabled, :focus)) {
221
+ &[data-v-b1453ba4]:has(textarea:hover:not(:disabled, :focus)) {
209
222
  background: var(--kds-color-background-input-hover);
210
223
  }
211
- &.disabled[data-v-e3abc825] {
224
+ &.disabled[data-v-b1453ba4] {
212
225
  cursor: default;
213
226
  border: var(--kds-border-action-disabled);
214
227
  }
215
228
  }
216
- .text-input-wrapper[data-v-e3abc825] {
229
+ .text-input-wrapper[data-v-b1453ba4] {
217
230
  display: flex;
218
231
  flex: 1 0 0;
219
232
  align-items: center;
@@ -227,7 +240,7 @@
227
240
  padding-left: var(--kds-spacing-container-0-37x);
228
241
  }
229
242
  .text-input {
230
- &[data-v-e3abc825] {
243
+ &[data-v-b1453ba4] {
231
244
  width: 100%;
232
245
  min-width: 0;
233
246
 
@@ -244,32 +257,32 @@
244
257
  background: transparent;
245
258
  border: none;
246
259
  }
247
- &[data-v-e3abc825]::placeholder {
260
+ &[data-v-b1453ba4]::placeholder {
248
261
  color: var(--kds-color-text-and-icon-subtle);
249
262
  }
250
263
  &:disabled {
251
- &[data-v-e3abc825] {
264
+ &[data-v-b1453ba4] {
252
265
  color: var(--kds-color-text-and-icon-disabled);
253
266
  cursor: default;
254
267
  }
255
- &[data-v-e3abc825]::placeholder {
268
+ &[data-v-b1453ba4]::placeholder {
256
269
  color: var(--kds-color-text-and-icon-disabled);
257
270
  }
258
271
  }
259
- &[data-v-e3abc825]::-webkit-scrollbar {
272
+ &[data-v-b1453ba4]::-webkit-scrollbar {
260
273
  display: none;
261
274
  }
262
275
  }
263
- .action[data-v-e3abc825] {
276
+ .action[data-v-b1453ba4] {
264
277
  display: flex;
265
278
  flex-shrink: 0;
266
279
  align-items: flex-end;
267
280
  }
268
- .progress-bar[data-v-e3abc825] {
281
+ .progress-bar[data-v-b1453ba4] {
269
282
  position: absolute;
270
283
  inset: -1px 0 auto;
271
284
  }
272
- .subtext[data-v-e3abc825] {
285
+ .subtext[data-v-b1453ba4] {
273
286
  display: flex;
274
287
  flex-wrap: wrap;
275
288
  gap: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-5x);
@@ -279,19 +292,12 @@
279
292
  font: var(--kds-font-base-subtext-small);
280
293
  color: var(--kds-color-text-and-icon-neutral);
281
294
  }
282
- .subtext-left[data-v-e3abc825] {
283
- /*
284
- * Take all remaining inline space so the right block is pushed to the
285
- * end. `min-width: 0` lets the ellipsis kick in when the right block
286
- * grows past the container width.
287
- */
295
+ .subtext-left[data-v-b1453ba4] {
296
+ /* Take all remaining inline space so the right block is pushed to the end. */
288
297
  flex: 1 1 0;
289
298
  min-width: 0;
290
- overflow: hidden;
291
- text-overflow: ellipsis;
292
- white-space: nowrap;
293
299
  }
294
- .subtext-right[data-v-e3abc825] {
300
+ .subtext-right[data-v-b1453ba4] {
295
301
  /*
296
302
  * On row 1 (alongside .subtext-left) the right block stays at its
297
303
  * intrinsic width — line-breaking in flex layout is decided from
package/dist/ai.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
- import { KeepAlive, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, onMounted, openBlock, reactive, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
2
+ import { KeepAlive, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, onMounted, openBlock, reactive, ref, renderSlot, toDisplayString, unref, useModel, useSlots, useTemplateRef, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
3
3
  import { KdsButton, KdsCheckbox, KdsCheckboxGroup, KdsIcon, KdsLink, KdsProgressBar, KdsRadioButtonGroup, KdsTextInput } from "@knime/kds-components";
4
4
  import './ai.css';//#endregion
5
5
  //#region src/ai/KdsPromptInput/AttachableSurface.vue
@@ -31,7 +31,7 @@ var _hoisted_3$3 = {
31
31
  var InlineStatusBanner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
32
32
  __name: "InlineStatusBanner",
33
33
  props: { status: {} },
34
- emits: ["buttonClick"],
34
+ emits: ["buttonClick", "secondaryButtonClick"],
35
35
  setup(__props, { emit: __emit }) {
36
36
  const emit = __emit;
37
37
  const statusMapper = {
@@ -52,6 +52,7 @@ var InlineStatusBanner_default = /*#__PURE__*/ _plugin_vue_export_helper_default
52
52
  }
53
53
  };
54
54
  const appearance = computed(() => statusMapper[__props.status.type]);
55
+ const hasBothButtons = computed(() => Boolean(__props.status.buttonLabel) && Boolean(__props.status.secondaryButtonLabel));
55
56
  return (_ctx, _cache) => {
56
57
  return openBlock(), createBlock(AttachableSurface_default, { tone: appearance.value.tone }, {
57
58
  default: withCtx(() => [createElementVNode("div", {
@@ -64,20 +65,28 @@ var InlineStatusBanner_default = /*#__PURE__*/ _plugin_vue_export_helper_default
64
65
  class: "icon"
65
66
  }, null, 8, ["name"])]),
66
67
  createElementVNode("span", _hoisted_3$3, toDisplayString(__props.status.message), 1),
67
- __props.status.buttonLabel ? (openBlock(), createBlock(unref(KdsButton), {
68
+ __props.status.secondaryButtonLabel || __props.status.buttonLabel ? (openBlock(), createElementBlock("div", {
68
69
  key: 0,
69
- class: "action",
70
+ class: normalizeClass(["actions", { "both-buttons": hasBothButtons.value }])
71
+ }, [__props.status.secondaryButtonLabel ? (openBlock(), createBlock(unref(KdsButton), {
72
+ key: 0,
73
+ size: "small",
74
+ variant: "transparent",
75
+ label: __props.status.secondaryButtonLabel,
76
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("secondaryButtonClick"))
77
+ }, null, 8, ["label"])) : createCommentVNode("", true), __props.status.buttonLabel ? (openBlock(), createBlock(unref(KdsButton), {
78
+ key: 1,
70
79
  size: "small",
71
80
  variant: "filled",
72
81
  label: __props.status.buttonLabel,
73
- onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick"))
74
- }, null, 8, ["label"])) : createCommentVNode("", true)
82
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("buttonClick"))
83
+ }, null, 8, ["label"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)
75
84
  ], 10, _hoisted_1$4)]),
76
85
  _: 1
77
86
  }, 8, ["tone"]);
78
87
  };
79
88
  }
80
- }), [["__scopeId", "data-v-89e51df3"]]);
89
+ }), [["__scopeId", "data-v-6ff09fdb"]]);
81
90
  //#endregion
82
91
  //#region src/ai/KdsPromptInput/inquiries/PermissionCard.vue?vue&type=script&setup=true&lang.ts
83
92
  var _hoisted_1$3 = { class: "title" };
@@ -532,7 +541,6 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
532
541
  },
533
542
  status: { default: () => void 0 },
534
543
  ariaLabel: { default: "Prompt" },
535
- leftSubtext: { default: () => void 0 },
536
544
  rightSubtext: { default: () => void 0 },
537
545
  link: { default: () => void 0 },
538
546
  permissions: { default: () => [] },
@@ -545,11 +553,13 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
545
553
  "submit",
546
554
  "stop",
547
555
  "statusButtonClick",
556
+ "statusSecondaryButtonClick",
548
557
  "respond"
549
558
  ], ["update:modelValue"]),
550
559
  setup(__props, { expose: __expose, emit: __emit }) {
551
560
  const emit = __emit;
552
561
  const modelValue = useModel(__props, "modelValue");
562
+ const slots = useSlots();
553
563
  const textareaRef = useTemplateRef("textareaRef");
554
564
  const hasInquiries = computed(() => __props.permissions.length > 0 || __props.questions.length > 0);
555
565
  const isDisabled = computed(() => __props.disabled || hasInquiries.value);
@@ -570,23 +580,24 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
570
580
  __props.status ? (openBlock(), createBlock(InlineStatusBanner_default, {
571
581
  key: 0,
572
582
  status: __props.status,
573
- onButtonClick: _cache[0] || (_cache[0] = ($event) => emit("statusButtonClick"))
583
+ onButtonClick: _cache[0] || (_cache[0] = ($event) => emit("statusButtonClick")),
584
+ onSecondaryButtonClick: _cache[1] || (_cache[1] = ($event) => emit("statusSecondaryButtonClick"))
574
585
  }, null, 8, ["status"])) : createCommentVNode("", true),
575
586
  hasInquiries.value ? (openBlock(), createBlock(unref(InquiryStack_default), {
576
587
  key: 1,
577
588
  permissions: __props.permissions,
578
589
  questions: __props.questions,
579
- onRespond: _cache[1] || (_cache[1] = ($event) => emit("respond", $event))
590
+ onRespond: _cache[2] || (_cache[2] = ($event) => emit("respond", $event))
580
591
  }, null, 8, ["permissions", "questions"])) : createCommentVNode("", true),
581
592
  createElementVNode("div", {
582
593
  class: normalizeClass(["input-container", { disabled: isDisabled.value }]),
583
- onClick: _cache[4] || (_cache[4] = ($event) => textareaRef.value?.focus())
594
+ onClick: _cache[5] || (_cache[5] = ($event) => textareaRef.value?.focus())
584
595
  }, [
585
596
  __props.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(KdsProgressBar), { indeterminate: "" })])) : createCommentVNode("", true),
586
597
  createElementVNode("div", _hoisted_3, [withDirectives(createElementVNode("textarea", {
587
598
  ref_key: "textareaRef",
588
599
  ref: textareaRef,
589
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event),
600
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => modelValue.value = $event),
590
601
  class: "text-input",
591
602
  rows: "1",
592
603
  placeholder: __props.placeholder,
@@ -600,7 +611,7 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
600
611
  "leading-icon": "stop",
601
612
  size: "medium",
602
613
  ariaLabel: "Stop",
603
- onClick: _cache[3] || (_cache[3] = withModifiers(($event) => emit("stop"), ["stop"]))
614
+ onClick: _cache[4] || (_cache[4] = withModifiers(($event) => emit("stop"), ["stop"]))
604
615
  })) : (openBlock(), createBlock(unref(KdsButton), {
605
616
  key: 1,
606
617
  variant: "filled",
@@ -611,7 +622,7 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
611
622
  onClick: withModifiers(onSubmit, ["stop"])
612
623
  }, null, 8, ["disabled"]))])
613
624
  ], 2),
614
- __props.leftSubtext || __props.rightSubtext || __props.link ? (openBlock(), createElementBlock("div", _hoisted_6, [__props.leftSubtext ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(__props.leftSubtext), 1)) : createCommentVNode("", true), __props.rightSubtext || __props.link ? (openBlock(), createElementBlock("div", _hoisted_8, [__props.rightSubtext ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(__props.rightSubtext), 1)) : createCommentVNode("", true), __props.link ? (openBlock(), createBlock(unref(KdsLink), {
625
+ slots["left-subtext"] || __props.rightSubtext || __props.link ? (openBlock(), createElementBlock("div", _hoisted_6, [slots["left-subtext"] ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "left-subtext", {}, void 0, true)])) : createCommentVNode("", true), __props.rightSubtext || __props.link ? (openBlock(), createElementBlock("div", _hoisted_8, [__props.rightSubtext ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(__props.rightSubtext), 1)) : createCommentVNode("", true), __props.link ? (openBlock(), createBlock(unref(KdsLink), {
615
626
  key: 1,
616
627
  label: __props.link.label,
617
628
  to: __props.link.to,
@@ -620,7 +631,7 @@ var KdsPromptInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
620
631
  ]);
621
632
  };
622
633
  }
623
- }), [["__scopeId", "data-v-e3abc825"]]);
634
+ }), [["__scopeId", "data-v-b1453ba4"]]);
624
635
  //#endregion
625
636
  //#region src/ai/KdsPromptInput/enums.ts
626
637
  var kdsPromptInputStatusType = {