ish-ui 1.2.9 → 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.
- package/dist/appBar/AppBarHelpMenu.js +1 -1
- package/dist/colorPicker/ColorPicker.js +2 -2
- package/dist/dialog/BrowserWarning.js +1 -1
- package/dist/dialog/message/Message.js +21 -15
- package/dist/dynamicSizeList/DynamicSizeList.d.ts +21 -12
- package/dist/dynamicSizeList/DynamicSizeList.js +30 -157
- package/dist/fieldMessage/styles.d.ts +2 -2
- package/dist/fileUploader/FileUploaderDialog.js +8 -1
- package/dist/formFields/AutosizeInput.d.ts +14 -0
- package/dist/formFields/AutosizeInput.js +156 -0
- package/dist/formFields/CheckboxField.d.ts +4 -2
- package/dist/formFields/ColoredCheckBox.js +5 -2
- package/dist/formFields/EditInPlaceDateTimeField.js +35 -36
- package/dist/formFields/EditInPlaceField.js +8 -9
- package/dist/formFields/EditInPlaceFieldBase.d.ts +2 -3
- package/dist/formFields/EditInPlaceFieldBase.js +7 -14
- package/dist/formFields/EditInPlaceFileField.js +2 -2
- package/dist/formFields/EditInPlaceMoneyField.js +2 -2
- package/dist/formFields/EditInPlacePhoneField.js +13 -3
- package/dist/formFields/EditInPlaceSearchSelect.js +6 -3
- package/dist/formFields/SelectCustomComponents.d.ts +18 -4
- package/dist/formFields/SelectCustomComponents.js +36 -20
- package/dist/formFields/Switch.d.ts +3 -1
- package/dist/markdownEditor/WysiwygEditor.js +14 -16
- package/dist/markdownEditor/utils/index.d.ts +1 -1
- package/dist/model/Fields.d.ts +1 -6
- package/dist/styles/makeStyles.d.ts +8 -25
- package/dist/styles/makeStyles.js +9 -3
- package/dist/tagsInput/AddTagMenu.d.ts +2 -2
- package/dist/tagsInput/AddTagMenu.js +8 -5
- package/dist/tagsInput/AddTagMenuItem.d.ts +2 -2
- package/dist/tagsInput/AddTagMenuItem.js +1 -1
- package/dist/tagsInput/TagInputList.js +102 -155
- package/dist/themes/ishTheme.js +13 -3
- package/dist/utils/DOM/index.d.ts +0 -1
- package/dist/utils/DOM/index.js +0 -1
- package/dist/utils/dates/formatTimezone.js +3 -3
- package/dist/utils/formatting/index.d.ts +1 -1
- package/dist/utils/hooks/index.d.ts +16 -0
- package/dist/utils/hooks/index.js +31 -1
- package/dist/utils/tags/index.d.ts +1 -1
- package/dist/utils/tags/index.js +1 -1
- package/package.json +81 -71
- package/tsconfig.prod.json +3 -0
- package/dist/utils/DOM/getCaretCoordinates.d.ts +0 -6
- 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.
|
|
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.
|
|
9
|
-
"@
|
|
10
|
-
"@types/
|
|
11
|
-
"@types/react
|
|
12
|
-
"@types/react-
|
|
13
|
-
"@types/react-
|
|
14
|
-
"@types/react-window
|
|
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.
|
|
17
|
-
"
|
|
18
|
-
"
|
|
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
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
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
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"tsc-alias": "^1.
|
|
36
|
-
"typescript": "^
|
|
37
|
-
"webpack": "^5.
|
|
38
|
-
"webpack-bundle-analyzer": "^
|
|
39
|
-
"webpack-cli": "^
|
|
40
|
-
"webpack-dev-server": "^5.
|
|
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.
|
|
44
|
-
"@ckeditor/ckeditor5-autoformat": "
|
|
45
|
-
"@ckeditor/ckeditor5-basic-styles": "
|
|
46
|
-
"@ckeditor/ckeditor5-
|
|
47
|
-
"@ckeditor/ckeditor5-
|
|
48
|
-
"@ckeditor/ckeditor5-
|
|
49
|
-
"@ckeditor/ckeditor5-
|
|
50
|
-
"@ckeditor/ckeditor5-
|
|
51
|
-
"@ckeditor/ckeditor5-
|
|
52
|
-
"@ckeditor/ckeditor5-
|
|
53
|
-
"@ckeditor/ckeditor5-
|
|
54
|
-
"@ckeditor/ckeditor5-
|
|
55
|
-
"@ckeditor/ckeditor5-
|
|
56
|
-
"@ckeditor/ckeditor5-
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@emotion/
|
|
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": "^
|
|
67
|
-
"@mui/lab": "^
|
|
68
|
-
"@mui/material": "^
|
|
69
|
-
"@mui/system": "^
|
|
70
|
-
"@mui/x-date-pickers": "^
|
|
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": "^
|
|
73
|
-
"date-fns-tz": "^2.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.
|
|
78
|
-
"react": "^
|
|
79
|
-
"react-ace": "^
|
|
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": "^
|
|
82
|
-
"react-dropzone": "^
|
|
83
|
-
"react-number-format": "4.
|
|
84
|
-
"react-window": "^
|
|
85
|
-
"react-window-infinite-loader": "^
|
|
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.
|
|
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": "
|
|
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": "
|
|
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
|
+
}
|
package/tsconfig.prod.json
CHANGED
|
@@ -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;
|