@knime/utils 1.0.2 → 1.0.3
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 +6 -0
- package/package.json +1 -1
- package/src/index.ts +0 -4
- package/src/svgWithTitle.js +0 -31
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Internal utility functions and constants shared across @knime packages.",
|
|
5
5
|
"homepage": "https://knime.github.io/webapps-common/",
|
|
6
6
|
"license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
|
package/src/index.ts
CHANGED
|
@@ -6,9 +6,6 @@ import getWrappedAroundIndex from "./getWrappedAroundIndex";
|
|
|
6
6
|
import sleep from "./sleep";
|
|
7
7
|
import { icons, isIconExisting } from "./fileTypeIcons";
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line import/extensions
|
|
10
|
-
import svgWithTitle from "./svgWithTitle.js";
|
|
11
|
-
|
|
12
9
|
import updateDate from "./updateDate";
|
|
13
10
|
import { isAfterMaxDate, isBeforeMinDate } from "./dateMinMaxCheck";
|
|
14
11
|
import {
|
|
@@ -51,7 +48,6 @@ export {
|
|
|
51
48
|
sleep,
|
|
52
49
|
icons,
|
|
53
50
|
isIconExisting,
|
|
54
|
-
svgWithTitle,
|
|
55
51
|
formatDateString,
|
|
56
52
|
formatDateTimeString,
|
|
57
53
|
formatLocalDateTimeString,
|
package/src/svgWithTitle.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { h as createElement } from "vue";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Higher order component that decorates a SVG component (loaded with vue-svg-loader) with a `<title>` element
|
|
5
|
-
* Note that `title` attributes have no effect on `<svg>` elements, so we need to inject a DOM element.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
*
|
|
9
|
-
* import MyIcon from '~/icons/foo.svg';
|
|
10
|
-
* import svgWithTitle from '…';
|
|
11
|
-
* export default {
|
|
12
|
-
* components: {
|
|
13
|
-
* MyIcon: svgWithTitle(MyIcon, 'My Title')
|
|
14
|
-
* }
|
|
15
|
-
* };
|
|
16
|
-
*
|
|
17
|
-
* @param { Vue.component } SvgComponent The component to decorate
|
|
18
|
-
* @param { String } title The title to insert
|
|
19
|
-
* @returns { Vue.component } The component with a title inserted as the first child of `<svg>`
|
|
20
|
-
*/
|
|
21
|
-
export default (SvgComponent, title) => ({
|
|
22
|
-
render() {
|
|
23
|
-
const renderedComponent = SvgComponent.render.apply(this, createElement);
|
|
24
|
-
|
|
25
|
-
const titleEl = createElement("title", title);
|
|
26
|
-
titleEl.ns = "svg";
|
|
27
|
-
|
|
28
|
-
renderedComponent.children.unshift(titleEl);
|
|
29
|
-
return renderedComponent;
|
|
30
|
-
},
|
|
31
|
-
});
|