@knime/kds-table 0.8.1 → 2.9.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 +9 -0
- package/dist/index.js +103 -14
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @knime/kds-table
|
|
2
2
|
|
|
3
|
+
## 2.9.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
- Updated dependencies [216447a]
|
|
9
|
+
- @knime/kds-components@2.9.0
|
|
10
|
+
- @knime/kds-styles@2.9.0
|
|
11
|
+
|
|
3
12
|
## 0.8.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1566,8 +1566,8 @@ var oe = class extends b {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
};
|
|
1568
1568
|
//#endregion
|
|
1569
|
-
//#region ../../node_modules/.pnpm/dompurify@3.4.
|
|
1570
|
-
/*! @license DOMPurify 3.4.
|
|
1569
|
+
//#region ../../node_modules/.pnpm/dompurify@3.4.12/node_modules/dompurify/dist/purify.es.mjs
|
|
1570
|
+
/*! @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
1571
|
function _arrayLikeToArray(r, a) {
|
|
1572
1572
|
(null == a || a > r.length) && (a = r.length);
|
|
1573
1573
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
@@ -2206,6 +2206,7 @@ var svg = freeze([
|
|
|
2206
2206
|
"direction",
|
|
2207
2207
|
"display",
|
|
2208
2208
|
"divisor",
|
|
2209
|
+
"dominant-baseline",
|
|
2209
2210
|
"dur",
|
|
2210
2211
|
"edgemode",
|
|
2211
2212
|
"elevation",
|
|
@@ -2333,6 +2334,7 @@ var svg = freeze([
|
|
|
2333
2334
|
"transform-origin",
|
|
2334
2335
|
"text-anchor",
|
|
2335
2336
|
"text-decoration",
|
|
2337
|
+
"text-orientation",
|
|
2336
2338
|
"text-rendering",
|
|
2337
2339
|
"textlength",
|
|
2338
2340
|
"type",
|
|
@@ -2515,7 +2517,7 @@ var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options)
|
|
|
2515
2517
|
function createDOMPurify() {
|
|
2516
2518
|
let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
2517
2519
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
2518
|
-
DOMPurify.version = "3.4.
|
|
2520
|
+
DOMPurify.version = "3.4.12";
|
|
2519
2521
|
DOMPurify.removed = [];
|
|
2520
2522
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
2521
2523
|
DOMPurify.isSupported = false;
|
|
@@ -2982,6 +2984,7 @@ function createDOMPurify() {
|
|
|
2982
2984
|
* @param root the in-place root to empty
|
|
2983
2985
|
*/
|
|
2984
2986
|
const _neutralizeRoot = function _neutralizeRoot(root) {
|
|
2987
|
+
_neutralizeSubtree(root);
|
|
2985
2988
|
const childNodes = getChildNodes(root);
|
|
2986
2989
|
if (childNodes) {
|
|
2987
2990
|
const snapshot = [];
|
|
@@ -3083,6 +3086,65 @@ function createDOMPurify() {
|
|
|
3083
3086
|
}
|
|
3084
3087
|
};
|
|
3085
3088
|
/**
|
|
3089
|
+
* _neutralizePatchLinkage
|
|
3090
|
+
*
|
|
3091
|
+
* IN_PLACE entry pre-pass (declarative-partial-updates / streaming
|
|
3092
|
+
* hardening, https://github.com/WICG/declarative-partial-updates).
|
|
3093
|
+
*
|
|
3094
|
+
* The main walk strips patch linkage (`for`/`patchsrc`) and removes range
|
|
3095
|
+
* markers (PIs / markup comments) node-by-node, in document order, AS it
|
|
3096
|
+
* reaches each node. On a live in-place root that leaves a window: from the
|
|
3097
|
+
* moment the root is connected until the walk arrives at a given node, that
|
|
3098
|
+
* node's linkage is live. A patch applied on connection/stream can fire as
|
|
3099
|
+
* a microtask during the walk and inject or teleport an unsanitized DOM
|
|
3100
|
+
* range into a region the iterator has already passed and will not revisit,
|
|
3101
|
+
* so the post-return "tree is sanitized" contract is violated. Sweep the
|
|
3102
|
+
* whole tree once up front and sever every linkage before the walk begins,
|
|
3103
|
+
* closing that window.
|
|
3104
|
+
*
|
|
3105
|
+
* This CANNOT undo a patch that already fired before sanitize ran — that is
|
|
3106
|
+
* the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
|
|
3107
|
+
* but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
|
|
3108
|
+
* to group with the rest of the declarative-partial-updates handling and
|
|
3109
|
+
* stay overridable, consistent with the codebase.
|
|
3110
|
+
*
|
|
3111
|
+
* Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
|
|
3112
|
+
* clobbered root cannot defeat the sweep of its non-clobbered descendants.
|
|
3113
|
+
*
|
|
3114
|
+
* NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
|
|
3115
|
+
* .html Q1): this mirrors the existing policy of keeping `for` on
|
|
3116
|
+
* <label>/<output>. If the shipping feature can drive a patch through a
|
|
3117
|
+
* surviving `for`-on-label/output + `id` pair, this pre-pass and the
|
|
3118
|
+
* attribute check at _isBasicCustomElement's caller must additionally drop
|
|
3119
|
+
* that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
|
|
3120
|
+
*
|
|
3121
|
+
* @param root the in-place root to sweep
|
|
3122
|
+
*/
|
|
3123
|
+
const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
|
|
3124
|
+
if (!SAFE_FOR_XML) return;
|
|
3125
|
+
const stack = [root];
|
|
3126
|
+
while (stack.length > 0) {
|
|
3127
|
+
const node = stack.pop();
|
|
3128
|
+
const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
|
|
3129
|
+
if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
|
|
3130
|
+
try {
|
|
3131
|
+
remove(node);
|
|
3132
|
+
} catch (_) {}
|
|
3133
|
+
continue;
|
|
3134
|
+
}
|
|
3135
|
+
if (nodeType === NODE_TYPE.element) {
|
|
3136
|
+
const element = node;
|
|
3137
|
+
const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);
|
|
3138
|
+
try {
|
|
3139
|
+
if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
|
|
3140
|
+
if (element.hasAttribute && element.hasAttribute("for") && lcTag !== "label" && lcTag !== "output") element.removeAttribute("for");
|
|
3141
|
+
} catch (_) {}
|
|
3142
|
+
}
|
|
3143
|
+
const childNodes = getChildNodes(node);
|
|
3144
|
+
if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
|
|
3145
|
+
}
|
|
3146
|
+
};
|
|
3147
|
+
/**
|
|
3086
3148
|
* _initDocument
|
|
3087
3149
|
*
|
|
3088
3150
|
* @param dirty - a string of dirty markup
|
|
@@ -3250,9 +3312,15 @@ function createDOMPurify() {
|
|
|
3250
3312
|
/**
|
|
3251
3313
|
* Handle a node whose tag is forbidden or not allowlisted: keep
|
|
3252
3314
|
* allowed custom elements (false return exits _sanitizeElements
|
|
3253
|
-
* early - namespace
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3315
|
+
* early - the namespace and fallback-tag removal checks are
|
|
3316
|
+
* intentionally skipped for kept custom elements), else hoist
|
|
3317
|
+
* content per KEEP_CONTENT and remove.
|
|
3318
|
+
*
|
|
3319
|
+
* A kept custom element is the ONLY case in which this function
|
|
3320
|
+
* returns false, so the caller uses that return value to run the
|
|
3321
|
+
* afterSanitizeElements hook on the kept element and keep the
|
|
3322
|
+
* element-hook lifecycle consistent with normal allowlisted
|
|
3323
|
+
* elements (GHSA-c2j3-45gr-mqc4).
|
|
3256
3324
|
*
|
|
3257
3325
|
* @param currentNode the disallowed node
|
|
3258
3326
|
* @param tagName the node's transformCaseFunc'd tag name
|
|
@@ -3286,8 +3354,9 @@ function createDOMPurify() {
|
|
|
3286
3354
|
* @param currentNode to check for permission to exist
|
|
3287
3355
|
* @return true if node was killed, false if left alive
|
|
3288
3356
|
*/
|
|
3289
|
-
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
3357
|
+
const _sanitizeElements = function _sanitizeElements(currentNode, root) {
|
|
3290
3358
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
3359
|
+
if (currentNode !== root && getParentNode(currentNode) === null) return true;
|
|
3291
3360
|
if (_isClobbered(currentNode)) {
|
|
3292
3361
|
_forceRemove(currentNode);
|
|
3293
3362
|
return true;
|
|
@@ -3297,11 +3366,16 @@ function createDOMPurify() {
|
|
|
3297
3366
|
tagName,
|
|
3298
3367
|
allowedTags: ALLOWED_TAGS
|
|
3299
3368
|
});
|
|
3369
|
+
if (currentNode !== root && getParentNode(currentNode) === null) return true;
|
|
3300
3370
|
if (_isUnsafeNode(currentNode, tagName)) {
|
|
3301
3371
|
_forceRemove(currentNode);
|
|
3302
3372
|
return true;
|
|
3303
3373
|
}
|
|
3304
|
-
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName])
|
|
3374
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
3375
|
+
const removed = _sanitizeDisallowedNode(currentNode, tagName);
|
|
3376
|
+
if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
|
3377
|
+
return removed;
|
|
3378
|
+
}
|
|
3305
3379
|
if ((getNodeType ? getNodeType(currentNode) : currentNode.nodeType) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
|
|
3306
3380
|
_forceRemove(currentNode);
|
|
3307
3381
|
return true;
|
|
@@ -3330,6 +3404,8 @@ function createDOMPurify() {
|
|
|
3330
3404
|
*/
|
|
3331
3405
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
3332
3406
|
if (FORBID_ATTR[lcName]) return false;
|
|
3407
|
+
if (SAFE_FOR_XML && lcName === "patchsrc") return false;
|
|
3408
|
+
if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") return false;
|
|
3333
3409
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
|
|
3334
3410
|
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
3335
3411
|
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName));
|
|
@@ -3483,7 +3559,7 @@ function createDOMPurify() {
|
|
|
3483
3559
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
3484
3560
|
while (shadowNode = shadowIterator.nextNode()) {
|
|
3485
3561
|
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
|
3486
|
-
_sanitizeElements(shadowNode);
|
|
3562
|
+
_sanitizeElements(shadowNode, fragment);
|
|
3487
3563
|
_sanitizeAttributes(shadowNode);
|
|
3488
3564
|
if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
|
|
3489
3565
|
if ((getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType) === NODE_TYPE.element) {
|
|
@@ -3577,12 +3653,19 @@ function createDOMPurify() {
|
|
|
3577
3653
|
DOMPurify.removed = [];
|
|
3578
3654
|
const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
|
|
3579
3655
|
if (inPlace) {
|
|
3656
|
+
_neutralizePatchLinkage(dirty);
|
|
3580
3657
|
const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
|
|
3581
3658
|
if (typeof nn === "string") {
|
|
3582
3659
|
const tagName = transformCaseFunc(nn);
|
|
3583
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])
|
|
3660
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
3661
|
+
_neutralizeRoot(dirty);
|
|
3662
|
+
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
if (_isClobbered(dirty)) {
|
|
3666
|
+
_neutralizeRoot(dirty);
|
|
3667
|
+
throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
3584
3668
|
}
|
|
3585
|
-
if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
3586
3669
|
try {
|
|
3587
3670
|
_sanitizeAttachedShadowRoots(dirty);
|
|
3588
3671
|
} catch (error) {
|
|
@@ -3602,15 +3685,21 @@ function createDOMPurify() {
|
|
|
3602
3685
|
if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
|
|
3603
3686
|
}
|
|
3604
3687
|
if (body && FORCE_BODY) _forceRemove(body.firstChild);
|
|
3605
|
-
const
|
|
3688
|
+
const walkRoot = inPlace ? dirty : body;
|
|
3689
|
+
const nodeIterator = _createNodeIterator(walkRoot);
|
|
3606
3690
|
try {
|
|
3607
3691
|
while (currentNode = nodeIterator.nextNode()) {
|
|
3608
|
-
_sanitizeElements(currentNode);
|
|
3692
|
+
_sanitizeElements(currentNode, walkRoot);
|
|
3609
3693
|
_sanitizeAttributes(currentNode);
|
|
3610
3694
|
if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
|
|
3611
3695
|
}
|
|
3612
3696
|
} catch (error) {
|
|
3613
|
-
if (inPlace)
|
|
3697
|
+
if (inPlace) {
|
|
3698
|
+
_neutralizeRoot(dirty);
|
|
3699
|
+
arrayForEach(DOMPurify.removed, (entry) => {
|
|
3700
|
+
if (entry.element) _neutralizeSubtree(entry.element);
|
|
3701
|
+
});
|
|
3702
|
+
}
|
|
3614
3703
|
throw error;
|
|
3615
3704
|
}
|
|
3616
3705
|
if (inPlace) {
|