@knime/kds-table 0.8.1 → 3.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,27 @@
1
1
  # @knime/kds-table
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 2037f86: KDS-962: Remove table border-top
8
+ - Updated dependencies [13cbb42]
9
+ - Updated dependencies [356af93]
10
+ - Updated dependencies [356af93]
11
+ - Updated dependencies [e366f77]
12
+ - Updated dependencies [e26e15d]
13
+ - @knime/kds-styles@3.0.0
14
+ - @knime/kds-components@3.0.0
15
+
16
+ ## 2.9.0
17
+
18
+ ### Patch Changes
19
+
20
+ - f1a63fb: `@knime/kds-table` now versions in lockstep with the other `@knime/kds-*` packages (fixed version group): its version jumps from 0.x to match theirs, and every release of the design system ships a matching `@knime/kds-table` release. Update your dependency range (e.g. `^0.8.1` → `^2.8.2`) to keep receiving releases.
21
+ - Updated dependencies [216447a]
22
+ - @knime/kds-components@2.9.0
23
+ - @knime/kds-styles@2.9.0
24
+
3
25
  ## 0.8.1
4
26
 
5
27
  ### Patch Changes
package/dist/index.css CHANGED
@@ -186,33 +186,33 @@ tr {
186
186
  }
187
187
 
188
188
  .kds-table-action-bar {
189
- &[data-v-a70d7b02] {
189
+ &[data-v-6538127c] {
190
190
  display: flex;
191
191
  align-items: center;
192
192
  justify-content: space-between;
193
193
  min-height: var(--kds-dimension-component-height-2-5x);
194
194
  padding-right: var(--kds-spacing-container-0-25x);
195
195
  padding-left: var(--kds-spacing-container-0-5x);
196
- border-top: var(--kds-border-base-subtle);
196
+ border-bottom: var(--kds-border-base-subtle);
197
197
  }
198
- &.temporary-view[data-v-a70d7b02] {
198
+ &.temporary-view[data-v-6538127c] {
199
199
  background-color: var(--kds-color-background-static-info-muted);
200
200
  }
201
201
  & .left {
202
- &[data-v-a70d7b02] {
202
+ &[data-v-6538127c] {
203
203
  display: flex;
204
204
  flex: 1 0 0;
205
205
  gap: var(--kds-spacing-container-0-5x);
206
206
  align-items: center;
207
207
  padding: var(--kds-spacing-container-0-12x) 0;
208
208
  }
209
- & .dimension[data-v-a70d7b02] {
209
+ & .dimension[data-v-6538127c] {
210
210
  font: var(--kds-font-base-title-small);
211
211
  color: var(--kds-color-text-and-icon-muted);
212
212
  white-space: pre;
213
213
  }
214
214
  }
215
- & .right[data-v-a70d7b02] {
215
+ & .right[data-v-6538127c] {
216
216
  display: flex;
217
217
  gap: var(--kds-spacing-container-0-25x);
218
218
  align-items: center;
@@ -332,15 +332,14 @@ tr {
332
332
  }
333
333
 
334
334
  thead {
335
- &[data-v-a97dc625] {
335
+ &[data-v-5ec89e0d] {
336
336
  /* TODO SLEEK-376 handle background color */
337
337
  /* stylelint-disable-next-line no-unknown-custom-properties */
338
338
  background-color: var(--knime-white);
339
- border-top: var(--kds-border-base-subtle);
340
339
  border-bottom: var(--kds-border-base-subtle);
341
340
  }
342
341
  & tr {
343
- &[data-v-a97dc625] {
342
+ &[data-v-5ec89e0d] {
344
343
  display: flex;
345
344
  height: 100%;
346
345
  transition:
@@ -348,51 +347,51 @@ thead {
348
347
  box-shadow 0.15s;
349
348
  }
350
349
  & th {
351
- &[data-v-a97dc625] {
350
+ &[data-v-5ec89e0d] {
352
351
  min-height: var(--kds-dimension-component-height-2-5x);
353
352
  max-height: var(--kds-dimension-component-height-5x);
354
353
  text-align: left;
355
354
  white-space: nowrap;
356
355
  }
357
- &.deletion-cell-spacer[data-v-a97dc625] {
356
+ &.deletion-cell-spacer[data-v-5ec89e0d] {
358
357
  width: var(--kds-dimension-component-width-2x);
359
358
  }
360
359
  &.select-cell {
361
- &[data-v-a97dc625] {
360
+ &[data-v-5ec89e0d] {
362
361
  display: flex;
363
362
  justify-content: center;
364
363
  width: var(--kds-dimension-component-width-2x);
365
364
  padding: var(--kds-spacing-container-0-75x);
366
365
  }
367
- & .select-checkbox[data-v-a97dc625] {
366
+ & .select-checkbox[data-v-5ec89e0d] {
368
367
  /* With this added padding the checkbox appears centered initially */
369
368
  padding: var(--kds-spacing-container-0-10x);
370
369
  }
371
370
  }
372
- &.new-column-head[data-v-a97dc625] {
371
+ &.new-column-head[data-v-5ec89e0d] {
373
372
  display: flex;
374
373
  flex-direction: column;
375
374
  justify-content: center;
376
375
  padding: var(--kds-spacing-container-0-5x);
377
376
  }
378
377
  }
379
- &[data-v-a97dc625]:hover {
378
+ &[data-v-5ec89e0d]:hover {
380
379
  outline: none;
381
380
  }
382
381
  }
383
- &.sub-menu-active tr[data-v-a97dc625] {
382
+ &.sub-menu-active tr[data-v-5ec89e0d] {
384
383
  padding-right: var(--kds-dimension-component-width-2x);
385
384
  }
386
385
  }
387
386
  .header-selection-overlay {
388
- &[data-v-a97dc625] {
387
+ &[data-v-5ec89e0d] {
389
388
  position: absolute;
390
389
  top: 0;
391
390
  height: 100%;
392
391
  pointer-events: none;
393
392
  border: var(--kds-border-action-selected-accent);
394
393
  }
395
- &.header-focused[data-v-a97dc625] {
394
+ &.header-focused[data-v-5ec89e0d] {
396
395
  border: var(--kds-border-action-focused);
397
396
  }
398
397
  }
package/dist/index.js CHANGED
@@ -1121,14 +1121,32 @@ var dimension = {
1121
1121
  */
1122
1122
  var spacing = {
1123
1123
  container: {
1124
- negative: { "0.25x": {
1125
- value: -4,
1126
- unit: "px",
1127
- css: {
1128
- value: "-4px",
1129
- variable: "var(--kds-spacing-container-negative-0-25x)"
1124
+ negative: {
1125
+ "0.25x": {
1126
+ value: -4,
1127
+ unit: "px",
1128
+ css: {
1129
+ value: "-4px",
1130
+ variable: "var(--kds-spacing-container-negative-0-25x)"
1131
+ }
1132
+ },
1133
+ "0.375x": {
1134
+ value: -6,
1135
+ unit: "px",
1136
+ css: {
1137
+ value: "-6px",
1138
+ variable: "var(--kds-spacing-container-negative-0-375x)"
1139
+ }
1140
+ },
1141
+ "0.5x": {
1142
+ value: -8,
1143
+ unit: "px",
1144
+ css: {
1145
+ value: "-8px",
1146
+ variable: "var(--kds-spacing-container-negative-0-5x)"
1147
+ }
1130
1148
  }
1131
- } },
1149
+ },
1132
1150
  none: {
1133
1151
  value: 0,
1134
1152
  unit: "px",
@@ -1566,8 +1584,8 @@ var oe = class extends b {
1566
1584
  }
1567
1585
  };
1568
1586
  //#endregion
1569
- //#region ../../node_modules/.pnpm/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.mjs
1570
- /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
1587
+ //#region ../../node_modules/.pnpm/dompurify@3.4.12/node_modules/dompurify/dist/purify.es.mjs
1588
+ /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
1571
1589
  function _arrayLikeToArray(r, a) {
1572
1590
  (null == a || a > r.length) && (a = r.length);
1573
1591
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -2206,6 +2224,7 @@ var svg = freeze([
2206
2224
  "direction",
2207
2225
  "display",
2208
2226
  "divisor",
2227
+ "dominant-baseline",
2209
2228
  "dur",
2210
2229
  "edgemode",
2211
2230
  "elevation",
@@ -2333,6 +2352,7 @@ var svg = freeze([
2333
2352
  "transform-origin",
2334
2353
  "text-anchor",
2335
2354
  "text-decoration",
2355
+ "text-orientation",
2336
2356
  "text-rendering",
2337
2357
  "textlength",
2338
2358
  "type",
@@ -2515,7 +2535,7 @@ var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options)
2515
2535
  function createDOMPurify() {
2516
2536
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
2517
2537
  const DOMPurify = (root) => createDOMPurify(root);
2518
- DOMPurify.version = "3.4.11";
2538
+ DOMPurify.version = "3.4.12";
2519
2539
  DOMPurify.removed = [];
2520
2540
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
2521
2541
  DOMPurify.isSupported = false;
@@ -2982,6 +3002,7 @@ function createDOMPurify() {
2982
3002
  * @param root the in-place root to empty
2983
3003
  */
2984
3004
  const _neutralizeRoot = function _neutralizeRoot(root) {
3005
+ _neutralizeSubtree(root);
2985
3006
  const childNodes = getChildNodes(root);
2986
3007
  if (childNodes) {
2987
3008
  const snapshot = [];
@@ -3083,6 +3104,65 @@ function createDOMPurify() {
3083
3104
  }
3084
3105
  };
3085
3106
  /**
3107
+ * _neutralizePatchLinkage
3108
+ *
3109
+ * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
3110
+ * hardening, https://github.com/WICG/declarative-partial-updates).
3111
+ *
3112
+ * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
3113
+ * markers (PIs / markup comments) node-by-node, in document order, AS it
3114
+ * reaches each node. On a live in-place root that leaves a window: from the
3115
+ * moment the root is connected until the walk arrives at a given node, that
3116
+ * node's linkage is live. A patch applied on connection/stream can fire as
3117
+ * a microtask during the walk and inject or teleport an unsanitized DOM
3118
+ * range into a region the iterator has already passed and will not revisit,
3119
+ * so the post-return "tree is sanitized" contract is violated. Sweep the
3120
+ * whole tree once up front and sever every linkage before the walk begins,
3121
+ * closing that window.
3122
+ *
3123
+ * This CANNOT undo a patch that already fired before sanitize ran — that is
3124
+ * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
3125
+ * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
3126
+ * to group with the rest of the declarative-partial-updates handling and
3127
+ * stay overridable, consistent with the codebase.
3128
+ *
3129
+ * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
3130
+ * clobbered root cannot defeat the sweep of its non-clobbered descendants.
3131
+ *
3132
+ * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
3133
+ * .html Q1): this mirrors the existing policy of keeping `for` on
3134
+ * <label>/<output>. If the shipping feature can drive a patch through a
3135
+ * surviving `for`-on-label/output + `id` pair, this pre-pass and the
3136
+ * attribute check at _isBasicCustomElement's caller must additionally drop
3137
+ * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
3138
+ *
3139
+ * @param root the in-place root to sweep
3140
+ */
3141
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
3142
+ if (!SAFE_FOR_XML) return;
3143
+ const stack = [root];
3144
+ while (stack.length > 0) {
3145
+ const node = stack.pop();
3146
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
3147
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
3148
+ try {
3149
+ remove(node);
3150
+ } catch (_) {}
3151
+ continue;
3152
+ }
3153
+ if (nodeType === NODE_TYPE.element) {
3154
+ const element = node;
3155
+ const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);
3156
+ try {
3157
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
3158
+ if (element.hasAttribute && element.hasAttribute("for") && lcTag !== "label" && lcTag !== "output") element.removeAttribute("for");
3159
+ } catch (_) {}
3160
+ }
3161
+ const childNodes = getChildNodes(node);
3162
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
3163
+ }
3164
+ };
3165
+ /**
3086
3166
  * _initDocument
3087
3167
  *
3088
3168
  * @param dirty - a string of dirty markup
@@ -3250,9 +3330,15 @@ function createDOMPurify() {
3250
3330
  /**
3251
3331
  * Handle a node whose tag is forbidden or not allowlisted: keep
3252
3332
  * allowed custom elements (false return exits _sanitizeElements
3253
- * early - namespace/fallback checks and the afterSanitizeElements
3254
- * hook are intentionally skipped for kept custom elements), else
3255
- * hoist content per KEEP_CONTENT and remove.
3333
+ * early - the namespace and fallback-tag removal checks are
3334
+ * intentionally skipped for kept custom elements), else hoist
3335
+ * content per KEEP_CONTENT and remove.
3336
+ *
3337
+ * A kept custom element is the ONLY case in which this function
3338
+ * returns false, so the caller uses that return value to run the
3339
+ * afterSanitizeElements hook on the kept element and keep the
3340
+ * element-hook lifecycle consistent with normal allowlisted
3341
+ * elements (GHSA-c2j3-45gr-mqc4).
3256
3342
  *
3257
3343
  * @param currentNode the disallowed node
3258
3344
  * @param tagName the node's transformCaseFunc'd tag name
@@ -3286,8 +3372,9 @@ function createDOMPurify() {
3286
3372
  * @param currentNode to check for permission to exist
3287
3373
  * @return true if node was killed, false if left alive
3288
3374
  */
3289
- const _sanitizeElements = function _sanitizeElements(currentNode) {
3375
+ const _sanitizeElements = function _sanitizeElements(currentNode, root) {
3290
3376
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
3377
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
3291
3378
  if (_isClobbered(currentNode)) {
3292
3379
  _forceRemove(currentNode);
3293
3380
  return true;
@@ -3297,11 +3384,16 @@ function createDOMPurify() {
3297
3384
  tagName,
3298
3385
  allowedTags: ALLOWED_TAGS
3299
3386
  });
3387
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
3300
3388
  if (_isUnsafeNode(currentNode, tagName)) {
3301
3389
  _forceRemove(currentNode);
3302
3390
  return true;
3303
3391
  }
3304
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) return _sanitizeDisallowedNode(currentNode, tagName);
3392
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
3393
+ const removed = _sanitizeDisallowedNode(currentNode, tagName);
3394
+ if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
3395
+ return removed;
3396
+ }
3305
3397
  if ((getNodeType ? getNodeType(currentNode) : currentNode.nodeType) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
3306
3398
  _forceRemove(currentNode);
3307
3399
  return true;
@@ -3330,6 +3422,8 @@ function createDOMPurify() {
3330
3422
  */
3331
3423
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
3332
3424
  if (FORBID_ATTR[lcName]) return false;
3425
+ if (SAFE_FOR_XML && lcName === "patchsrc") return false;
3426
+ if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") return false;
3333
3427
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
3334
3428
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
3335
3429
  if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName));
@@ -3483,7 +3577,7 @@ function createDOMPurify() {
3483
3577
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
3484
3578
  while (shadowNode = shadowIterator.nextNode()) {
3485
3579
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
3486
- _sanitizeElements(shadowNode);
3580
+ _sanitizeElements(shadowNode, fragment);
3487
3581
  _sanitizeAttributes(shadowNode);
3488
3582
  if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
3489
3583
  if ((getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType) === NODE_TYPE.element) {
@@ -3577,12 +3671,19 @@ function createDOMPurify() {
3577
3671
  DOMPurify.removed = [];
3578
3672
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
3579
3673
  if (inPlace) {
3674
+ _neutralizePatchLinkage(dirty);
3580
3675
  const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
3581
3676
  if (typeof nn === "string") {
3582
3677
  const tagName = transformCaseFunc(nn);
3583
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
3678
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
3679
+ _neutralizeRoot(dirty);
3680
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
3681
+ }
3682
+ }
3683
+ if (_isClobbered(dirty)) {
3684
+ _neutralizeRoot(dirty);
3685
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
3584
3686
  }
3585
- if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
3586
3687
  try {
3587
3688
  _sanitizeAttachedShadowRoots(dirty);
3588
3689
  } catch (error) {
@@ -3602,15 +3703,21 @@ function createDOMPurify() {
3602
3703
  if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
3603
3704
  }
3604
3705
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
3605
- const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
3706
+ const walkRoot = inPlace ? dirty : body;
3707
+ const nodeIterator = _createNodeIterator(walkRoot);
3606
3708
  try {
3607
3709
  while (currentNode = nodeIterator.nextNode()) {
3608
- _sanitizeElements(currentNode);
3710
+ _sanitizeElements(currentNode, walkRoot);
3609
3711
  _sanitizeAttributes(currentNode);
3610
3712
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
3611
3713
  }
3612
3714
  } catch (error) {
3613
- if (inPlace) _neutralizeRoot(dirty);
3715
+ if (inPlace) {
3716
+ _neutralizeRoot(dirty);
3717
+ arrayForEach(DOMPurify.removed, (entry) => {
3718
+ if (entry.element) _neutralizeSubtree(entry.element);
3719
+ });
3720
+ }
3614
3721
  throw error;
3615
3722
  }
3616
3723
  if (inPlace) {
@@ -5359,7 +5466,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5359
5466
  ])], 2)) : createCommentVNode("", true);
5360
5467
  };
5361
5468
  }
5362
- }), [["__scopeId", "data-v-a70d7b02"]]);
5469
+ }), [["__scopeId", "data-v-6538127c"]]);
5363
5470
  //#endregion
5364
5471
  //#region src/components/composables/useHeaderMenuItems.ts
5365
5472
  var useHeaderMenuItems = ({ enableSorting, sortDirection, sortTexts, additionalMenuItems, onColumnSort }) => {
@@ -6102,7 +6209,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6102
6209
  style: normalizeStyle($options.headerSelectionOverlayStyle)
6103
6210
  }, null, 6)) : createCommentVNode("", true)]);
6104
6211
  }
6105
- var Header_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Header_vue_vue_type_script_lang_default, [["render", _sfc_render$2], ["__scopeId", "data-v-a97dc625"]]);
6212
+ var Header_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Header_vue_vue_type_script_lang_default, [["render", _sfc_render$2], ["__scopeId", "data-v-5ec89e0d"]]);
6106
6213
  //#endregion
6107
6214
  //#region src/components/layout/NewRowButton.vue?vue&type=script&setup=true&lang.ts
6108
6215
  var _hoisted_1$3 = { class: "sticky-container" };