ish-ui 1.2.8 → 1.3.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.
Files changed (46) hide show
  1. package/dist/appBar/AppBarHelpMenu.js +1 -1
  2. package/dist/colorPicker/ColorPicker.js +2 -2
  3. package/dist/dialog/BrowserWarning.js +1 -1
  4. package/dist/dialog/message/Message.js +21 -15
  5. package/dist/dynamicSizeList/DynamicSizeList.d.ts +21 -12
  6. package/dist/dynamicSizeList/DynamicSizeList.js +30 -157
  7. package/dist/fieldMessage/styles.d.ts +2 -2
  8. package/dist/fileUploader/FileUploaderDialog.js +8 -1
  9. package/dist/formFields/AutosizeInput.d.ts +14 -0
  10. package/dist/formFields/AutosizeInput.js +156 -0
  11. package/dist/formFields/CheckboxField.d.ts +4 -2
  12. package/dist/formFields/ColoredCheckBox.js +5 -2
  13. package/dist/formFields/EditInPlaceDateTimeField.js +35 -36
  14. package/dist/formFields/EditInPlaceField.js +8 -9
  15. package/dist/formFields/EditInPlaceFieldBase.d.ts +2 -3
  16. package/dist/formFields/EditInPlaceFieldBase.js +7 -14
  17. package/dist/formFields/EditInPlaceFileField.js +10 -2
  18. package/dist/formFields/EditInPlaceMoneyField.js +2 -2
  19. package/dist/formFields/EditInPlacePhoneField.js +13 -3
  20. package/dist/formFields/EditInPlaceSearchSelect.js +6 -3
  21. package/dist/formFields/SelectCustomComponents.d.ts +18 -4
  22. package/dist/formFields/SelectCustomComponents.js +36 -20
  23. package/dist/formFields/Switch.d.ts +3 -1
  24. package/dist/markdownEditor/WysiwygEditor.js +14 -16
  25. package/dist/markdownEditor/utils/index.d.ts +1 -1
  26. package/dist/model/Fields.d.ts +1 -6
  27. package/dist/styles/makeStyles.d.ts +8 -25
  28. package/dist/styles/makeStyles.js +9 -3
  29. package/dist/tagsInput/AddTagMenu.d.ts +2 -2
  30. package/dist/tagsInput/AddTagMenu.js +8 -5
  31. package/dist/tagsInput/AddTagMenuItem.d.ts +2 -2
  32. package/dist/tagsInput/AddTagMenuItem.js +1 -1
  33. package/dist/tagsInput/TagInputList.js +102 -155
  34. package/dist/themes/ishTheme.js +13 -3
  35. package/dist/utils/DOM/index.d.ts +0 -1
  36. package/dist/utils/DOM/index.js +0 -1
  37. package/dist/utils/dates/formatTimezone.js +3 -3
  38. package/dist/utils/formatting/index.d.ts +1 -1
  39. package/dist/utils/hooks/index.d.ts +16 -0
  40. package/dist/utils/hooks/index.js +31 -1
  41. package/dist/utils/tags/index.d.ts +1 -1
  42. package/dist/utils/tags/index.js +1 -1
  43. package/package.json +81 -71
  44. package/tsconfig.prod.json +3 -0
  45. package/dist/utils/DOM/getCaretCoordinates.d.ts +0 -6
  46. package/dist/utils/DOM/getCaretCoordinates.js +0 -109
package/package.json CHANGED
@@ -1,105 +1,115 @@
1
1
  {
2
2
  "name": "ish-ui",
3
3
  "sideEffects": false,
4
- "version": "1.2.8",
4
+ "version": "1.3.0",
5
5
  "description": "UI elements for onCourse and other ish apps",
6
6
  "main": "main.ts",
7
7
  "devDependencies": {
8
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
9
- "@types/node": "^22.7.2",
10
- "@types/react": "^18.3.9",
11
- "@types/react-color": "^3.0.12",
12
- "@types/react-dom": "^18.3.0",
13
- "@types/react-window": "^1.8.8",
14
- "@types/react-window-infinite-loader": "^1.0.9",
8
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
9
+ "@swc/core": "^1.15.47",
10
+ "@types/node": "^26.2.0",
11
+ "@types/react": "^19.2.18",
12
+ "@types/react-color": "^3.0.13",
13
+ "@types/react-dom": "^19.2.4",
14
+ "@types/react-window": "^2.0.0",
15
+ "@types/react-window-infinite-loader": "^2.0.0",
15
16
  "@types/redux": "^3.6.0",
16
- "@types/webpack-env": "^1.18.5",
17
- "@typescript-eslint/eslint-plugin": "^8.7.0",
18
- "@typescript-eslint/parser": "^8.7.0",
19
- "css-loader": "^7.1.2",
20
- "eslint": "^8.26.0",
21
- "eslint-import-resolver-alias": "^1.1.2",
22
- "eslint-plugin-import": "^2.30.0",
23
- "eslint-plugin-react": "^7.36.1",
17
+ "@types/webpack-env": "^1.18.8",
18
+ "ckeditor5": "48.4.0",
19
+ "css-loader": "^7.1.4",
24
20
  "file-loader": "^6.2.0",
25
- "fork-ts-checker-webpack-plugin": "^9.0.2",
26
- "html-webpack-plugin": "^5.6.0",
27
- "jest": "^29.7.0",
28
- "less-loader": "12.2.0",
29
- "mini-css-extract-plugin": "^2.9.1",
30
- "react-refresh": "^0.14.2",
31
- "sass-loader": "^16.0.2",
21
+ "html-webpack-plugin": "^5.6.8",
22
+ "jest": "^30.4.2",
23
+ "less-loader": "13.0.0",
24
+ "mini-css-extract-plugin": "^2.10.2",
25
+ "oxlint": "^1.78.0",
26
+ "oxlint-tsgolint": "^7.0.2001",
27
+ "react-refresh": "^0.18.0",
28
+ "sass-loader": "^17.0.0",
32
29
  "style-loader": "^4.0.0",
33
- "terser-webpack-plugin": "^5.3.10",
34
- "ts-loader": "^9.5.1",
35
- "tsc-alias": "^1.8.10",
36
- "typescript": "^5.6.2",
37
- "webpack": "^5.95.0",
38
- "webpack-bundle-analyzer": "^4.10.2",
39
- "webpack-cli": "^5.1.4",
40
- "webpack-dev-server": "^5.1.0"
30
+ "swc-loader": "^0.2.7",
31
+ "terser-webpack-plugin": "^5.6.1",
32
+ "tsc-alias": "^1.9.1",
33
+ "typescript": "^7.0.2",
34
+ "webpack": "^5.109.2",
35
+ "webpack-bundle-analyzer": "^5.3.1",
36
+ "webpack-cli": "^7.2.2",
37
+ "webpack-dev-server": "^5.2.6"
41
38
  },
42
39
  "dependencies": {
43
- "@atlaskit/tree": "^9.0.0",
44
- "@ckeditor/ckeditor5-autoformat": "43.1.1",
45
- "@ckeditor/ckeditor5-basic-styles": "43.1.1",
46
- "@ckeditor/ckeditor5-dev-utils": "^42.1.0",
47
- "@ckeditor/ckeditor5-editor-classic": "43.1.1",
48
- "@ckeditor/ckeditor5-essentials": "43.1.1",
49
- "@ckeditor/ckeditor5-heading": "43.1.1",
50
- "@ckeditor/ckeditor5-image": "43.1.1",
51
- "@ckeditor/ckeditor5-link": "43.1.1",
52
- "@ckeditor/ckeditor5-list": "43.1.1",
53
- "@ckeditor/ckeditor5-markdown-gfm": "43.1.1",
54
- "@ckeditor/ckeditor5-paragraph": "43.1.1",
55
- "@ckeditor/ckeditor5-react": "9.3.0",
56
- "@ckeditor/ckeditor5-source-editing": "43.1.1",
57
- "@ckeditor/ckeditor5-table": "43.1.1",
58
- "@ckeditor/ckeditor5-theme-lark": "43.1.1",
59
- "@emotion/cache": "11.13.1",
60
- "@emotion/react": "11.13.3",
61
- "@emotion/styled": "11.13.0",
40
+ "@atlaskit/tree": "^9.0.1",
41
+ "@ckeditor/ckeditor5-autoformat": "48.4.0",
42
+ "@ckeditor/ckeditor5-basic-styles": "48.4.0",
43
+ "@ckeditor/ckeditor5-editor-classic": "48.4.0",
44
+ "@ckeditor/ckeditor5-essentials": "48.4.0",
45
+ "@ckeditor/ckeditor5-heading": "48.4.0",
46
+ "@ckeditor/ckeditor5-image": "48.4.0",
47
+ "@ckeditor/ckeditor5-link": "48.4.0",
48
+ "@ckeditor/ckeditor5-list": "48.4.0",
49
+ "@ckeditor/ckeditor5-markdown-gfm": "48.4.0",
50
+ "@ckeditor/ckeditor5-paragraph": "48.4.0",
51
+ "@ckeditor/ckeditor5-react": "11.2.0",
52
+ "@ckeditor/ckeditor5-source-editing": "48.4.0",
53
+ "@ckeditor/ckeditor5-table": "48.4.0",
54
+ "@emotion/cache": "11.14.0",
55
+ "@emotion/react": "11.14.0",
56
+ "@emotion/styled": "11.14.1",
62
57
  "@fortawesome/fontawesome-svg-core": "latest",
63
58
  "@fortawesome/free-regular-svg-icons": "latest",
64
59
  "@fortawesome/free-solid-svg-icons": "latest",
65
60
  "@fortawesome/react-fontawesome": "latest",
66
- "@mui/icons-material": "^6.1.1",
67
- "@mui/lab": "^6.0.0-beta.10",
68
- "@mui/material": "^6.1.1",
69
- "@mui/system": "^6.1.1",
70
- "@mui/x-date-pickers": "^7.18.0",
61
+ "@mui/icons-material": "^9.3.1",
62
+ "@mui/lab": "^9.0.0-beta.8",
63
+ "@mui/material": "^9.3.1",
64
+ "@mui/system": "^9.3.0",
65
+ "@mui/x-date-pickers": "^9.11.0",
71
66
  "autosuggest-highlight": "^3.3.4",
72
- "date-fns": "^2.30.0",
73
- "date-fns-tz": "^2.0.0",
67
+ "date-fns": "^4.4.0",
68
+ "date-fns-tz": "^3.2.0",
74
69
  "decimal.js-light": "^2.5.1",
75
70
  "lodash.debounce": "^4.0.8",
76
71
  "lodash.isempty": "^4.4.0",
77
- "re-resizable": "^6.10.0",
78
- "react": "^18.3.1",
79
- "react-ace": "^12.0.0",
72
+ "re-resizable": "^6.11.2",
73
+ "react": "^19.2.8",
74
+ "react-ace": "^15.0.0",
75
+ "react-beautiful-dnd-next": "^11.0.5",
80
76
  "react-color": "^2.19.3",
81
- "react-dom": "^18.3.1",
82
- "react-dropzone": "^14.2.3",
83
- "react-number-format": "4.9.4",
84
- "react-window": "^1.8.10",
85
- "react-window-infinite-loader": "^1.0.9",
77
+ "react-dom": "^19.2.8",
78
+ "react-dropzone": "^20.1.0",
79
+ "react-number-format": "5.4.5",
80
+ "react-window": "^2.3.0",
81
+ "react-window-infinite-loader": "^2.0.1",
86
82
  "redux": "^5.0.1",
87
- "tss-react": "^4.9.13"
83
+ "tss-react": "^4.9.21"
88
84
  },
89
85
  "scripts": {
90
86
  "test": "exit 0",
91
87
  "start": "webpack serve --env production --config tools/webpack/webpack.config.dev.js",
92
88
  "start:prod": "webpack serve --env development --config tools/webpack/webpack.config.prod.js",
93
- "build": "tsc -p tsconfig.prod.json && tsc-alias",
94
- "lint": "eslint --ext .js,.jsx,.ts,.tsx src/"
89
+ "build": "tsc -p tsconfig.prod.json && tsc-alias -p tsconfig.prod.json",
90
+ "lint": "oxlint src/",
91
+ "typecheck": "tsc --noEmit -p tsconfig.prod.json"
92
+ },
93
+ "publishConfig": {
94
+ "access": "public"
95
95
  },
96
96
  "repository": {
97
97
  "type": "git",
98
- "url": "git+https://github.com/ishgroup/ish-ui.git"
98
+ "url": "https://github.com/ishgroup/ish-ui.git"
99
99
  },
100
100
  "author": "ishgroup",
101
101
  "bugs": {
102
102
  "url": "https://github.com/ishgroup/ish-ui/issues"
103
103
  },
104
- "homepage": "https://github.com/ishgroup/ish-ui#readme"
105
- }
104
+ "homepage": "https://github.com/ishgroup/ish-ui#readme",
105
+ "overrides": {
106
+ "@atlaskit/tree": {
107
+ "react": "$react",
108
+ "react-dom": "$react-dom"
109
+ },
110
+ "react-beautiful-dnd-next": {
111
+ "react": "$react",
112
+ "react-dom": "$react-dom"
113
+ }
114
+ }
115
+ }
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "extends": "./tsconfig",
3
+ "compilerOptions": {
4
+ "rootDir": "./src"
5
+ },
3
6
  "exclude": [
4
7
  "./dev"
5
8
  ]
@@ -1,6 +0,0 @@
1
- declare const getCaretCoordinates: (element: any, position: any, options?: any) => {
2
- top: number;
3
- left: number;
4
- height: number;
5
- };
6
- export default getCaretCoordinates;
@@ -1,109 +0,0 @@
1
- /*
2
- * Copyright ish group pty ltd 2023.
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
5
- *
6
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
7
- */
8
- const properties = [
9
- 'direction',
10
- 'boxSizing',
11
- 'width',
12
- 'height',
13
- 'overflowX',
14
- 'overflowY',
15
- 'borderTopWidth',
16
- 'borderRightWidth',
17
- 'borderBottomWidth',
18
- 'borderLeftWidth',
19
- 'borderStyle',
20
- 'paddingTop',
21
- 'paddingRight',
22
- 'paddingBottom',
23
- 'paddingLeft',
24
- 'fontStyle',
25
- 'fontVariant',
26
- 'fontWeight',
27
- 'fontStretch',
28
- 'fontSize',
29
- 'fontSizeAdjust',
30
- 'lineHeight',
31
- 'fontFamily',
32
- 'textAlign',
33
- 'textTransform',
34
- 'textIndent',
35
- 'textDecoration',
36
- 'letterSpacing',
37
- 'wordSpacing',
38
- 'tabSize',
39
- 'MozTabSize'
40
- ];
41
- const getCaretCoordinates = (element, position, options) => {
42
- if (!element)
43
- return null;
44
- const debug = (options && options.debug) || false;
45
- if (debug) {
46
- const el = document.querySelector('#input-textarea-caret-position-mirror-div');
47
- if (el)
48
- el.parentNode.removeChild(el);
49
- }
50
- const div = document.createElement('div');
51
- div.id = 'input-textarea-caret-position-mirror-div';
52
- document.body.appendChild(div);
53
- const style = div.style;
54
- const computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9
55
- const isInput = element.nodeName === 'INPUT';
56
- style.whiteSpace = 'pre-wrap';
57
- if (!isInput)
58
- style.wordWrap = 'break-word';
59
- style.position = 'absolute';
60
- if (!debug)
61
- style.visibility = 'hidden';
62
- properties.forEach(function (prop) {
63
- if (isInput && prop === 'lineHeight') {
64
- if (computed.boxSizing === 'border-box') {
65
- const height = parseInt(computed.height);
66
- const outerHeight = parseInt(computed.paddingTop) +
67
- parseInt(computed.paddingBottom) +
68
- parseInt(computed.borderTopWidth) +
69
- parseInt(computed.borderBottomWidth);
70
- const targetHeight = outerHeight + parseInt(computed.lineHeight);
71
- if (height > targetHeight) {
72
- style.lineHeight = height - outerHeight + 'px';
73
- }
74
- else if (height === targetHeight) {
75
- style.lineHeight = computed.lineHeight;
76
- }
77
- else {
78
- style.lineHeight = '0';
79
- }
80
- }
81
- else {
82
- style.lineHeight = computed.height;
83
- }
84
- }
85
- else {
86
- style[prop] = computed[prop];
87
- }
88
- });
89
- style.overflow = 'hidden';
90
- div.textContent = element.value.substring(0, position);
91
- if (isInput)
92
- div.textContent = div.textContent.replace(/\s/g, '\u00a0');
93
- const span = document.createElement('span');
94
- span.textContent = element.value.substring(position) || '.';
95
- div.appendChild(span);
96
- const coordinates = {
97
- top: span.offsetTop + parseInt(computed['borderTopWidth']),
98
- left: span.offsetLeft + parseInt(computed['borderLeftWidth']),
99
- height: parseInt(computed['lineHeight'])
100
- };
101
- if (debug) {
102
- span.style.backgroundColor = '#aaa';
103
- }
104
- else {
105
- document.body.removeChild(div);
106
- }
107
- return coordinates;
108
- };
109
- export default getCaretCoordinates;