@knime/utils 1.7.0 → 1.8.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,20 @@
1
1
  # @knime/utils
2
2
 
3
+ ## 1.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f2d266c: Move `icons` and `isIconExisting` from @knime/utils to @knime/components and rename to `fileTypeIcons` and `isFileTypeIconExisting` respectively.
8
+ - f2d266c: Updated node version range for support for node 22 - 24
9
+
10
+ ## 1.7.1
11
+
12
+ ### Patch Changes
13
+
14
+ - b6c2eb9: add repository link to package.json
15
+ - Updated dependencies [b6c2eb9]
16
+ - @knime/styles@1.14.3
17
+
3
18
  ## 1.7.0
4
19
 
5
20
  ### Minor Changes
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@knime/utils",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Internal utility functions and constants shared across @knime packages.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/knime/webapps-common.git",
8
+ "directory": "packages/utils"
9
+ },
5
10
  "homepage": "https://knime.github.io/webapps-common/",
6
11
  "license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
7
12
  "author": "KNIME AG, Zurich, Switzerland",
@@ -9,8 +14,7 @@
9
14
  "dependencies": {
10
15
  "date-fns": "2.30.0",
11
16
  "date-fns-tz": "2.0.0",
12
- "dompurify": "^3.2.7",
13
- "@knime/styles": "1.14.2"
17
+ "dompurify": "^3.2.7"
14
18
  },
15
19
  "peerDependencies": {
16
20
  "consola": "3.x"
@@ -40,6 +44,9 @@
40
44
  "import": "./test-utils/index.ts"
41
45
  }
42
46
  },
47
+ "engines": {
48
+ "node": ">=22 <25"
49
+ },
43
50
  "scripts": {
44
51
  "test:unit": "TZ='Europe/Berlin' vitest"
45
52
  }
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { capitalize, caseFormatter } from "./capitalize";
2
2
  import { isAfterMaxDate, isBeforeMinDate } from "./dateMinMaxCheck";
3
3
  import debounce from "./debounce";
4
- import { icons, isIconExisting } from "./fileTypeIcons";
5
4
  import { filters } from "./filters";
6
5
  import {
7
6
  formatDateString,
@@ -62,10 +61,8 @@ export {
62
61
  getLocalTimeZone,
63
62
  getWrappedAroundIndex,
64
63
  hotkeys,
65
- icons,
66
64
  isAfterMaxDate,
67
65
  isBeforeMinDate,
68
- isIconExisting,
69
66
  intervalUtils,
70
67
  navigatorUtils,
71
68
  numIntegerDigits,
@@ -1,41 +0,0 @@
1
- import csvIcon from "@knime/styles/img/icons/file-csv.svg";
2
- import docxIcon from "@knime/styles/img/icons/file-docx.svg";
3
- import htmlIcon from "@knime/styles/img/icons/file-html.svg";
4
- import mdIcon from "@knime/styles/img/icons/file-md.svg";
5
- import odpIcon from "@knime/styles/img/icons/file-odp.svg";
6
- import odsIcon from "@knime/styles/img/icons/file-ods.svg";
7
- import odtIcon from "@knime/styles/img/icons/file-odt.svg";
8
- import pdfIcon from "@knime/styles/img/icons/file-pdf.svg";
9
- import pptxIcon from "@knime/styles/img/icons/file-pptx.svg";
10
- import psIcon from "@knime/styles/img/icons/file-ps.svg";
11
- import fileIcon from "@knime/styles/img/icons/file-question.svg";
12
- import txtIcon from "@knime/styles/img/icons/file-text.svg";
13
- import xlsIcon from "@knime/styles/img/icons/file-xls.svg";
14
- import xlsxIcon from "@knime/styles/img/icons/file-xlsx.svg";
15
- import xmlIcon from "@knime/styles/img/icons/file-xml.svg";
16
- import exeIcon from "@knime/styles/img/icons/file-zip-exe.svg";
17
- import zipIcon from "@knime/styles/img/icons/file-zip.svg";
18
-
19
- export const icons = {
20
- csvIcon,
21
- docxIcon,
22
- htmlIcon,
23
- mdIcon,
24
- odpIcon,
25
- odsIcon,
26
- odtIcon,
27
- pdfIcon,
28
- pptxIcon,
29
- psIcon,
30
- xlsIcon,
31
- xlsxIcon,
32
- xmlIcon,
33
- zipIcon,
34
- exeIcon,
35
- txtIcon,
36
- fileIcon,
37
- };
38
-
39
- export const isIconExisting = function (iconName: string): boolean {
40
- return icons.hasOwnProperty(iconName);
41
- };