aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json64
-rw-r--r--package.json2
-rw-r--r--src/client/views/nodes/FontIconBox/FontIconBox.tsx11
3 files changed, 41 insertions, 36 deletions
diff --git a/package-lock.json b/package-lock.json
index 1d334cbeb..7be724df1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6507,9 +6507,9 @@
}
},
"browndash-components": {
- "version": "0.0.93",
- "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.93.tgz",
- "integrity": "sha512-JL9Hi7Nq+zHZtjLCQSuGhID0Hd7X6sARutyJqbECfsLWACsIC/JfeEQZdUeH5CqO+R7pJKeoWM82AIkWGtN2Xw==",
+ "version": "0.0.95",
+ "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.95.tgz",
+ "integrity": "sha512-1sTyIyzngLSMWqit7bysNH3Xb24QEXsctlm1u14RBK8826Q8ALlK1YxbFMYjzFMNK1WggC0TQ31VdKA3iuTamQ==",
"requires": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
@@ -6627,14 +6627,14 @@
"integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="
},
"@mui/base": {
- "version": "5.0.0-beta.10",
- "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.10.tgz",
- "integrity": "sha512-moTAhGwFfQffj7hsu61FnqcGqVcd53A1CrOhnskM9TF0Uh2rnLDMCuar4JRUWWpaJofAfQEbQBBFPadFQLI4PA==",
+ "version": "5.0.0-beta.11",
+ "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.11.tgz",
+ "integrity": "sha512-FdKZGPd8qmC3ZNke7CNhzcEgToc02M6WYZc9hcBsNQ17bgAd3s9F//1bDDYgMVBYxDM71V0sv/hBHlOY4I1ZVA==",
"requires": {
"@babel/runtime": "^7.22.6",
"@emotion/is-prop-valid": "^1.2.1",
"@mui/types": "^7.2.4",
- "@mui/utils": "^5.14.4",
+ "@mui/utils": "^5.14.5",
"@popperjs/core": "^2.11.8",
"clsx": "^2.0.0",
"prop-types": "^15.8.1",
@@ -6652,21 +6652,21 @@
}
},
"@mui/core-downloads-tracker": {
- "version": "5.14.4",
- "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.4.tgz",
- "integrity": "sha512-pW2XghSi3hpYKX57Wu0SCWMTSpzvXZmmucj3TcOJWaCiFt4xr05w2gcwBZi36dAp9uvd9//9N51qbblmnD+GPg=="
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.5.tgz",
+ "integrity": "sha512-+wpGH1USwPcKMFPMvXqYPC6fEvhxM3FzxC8lyDiNK/imLyyJ6y2DPb1Oue7OGIKJWBmYBqrWWtfovrxd1aJHTA=="
},
"@mui/material": {
- "version": "5.14.4",
- "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.4.tgz",
- "integrity": "sha512-2XUV3KyRC07BQPPzEgd+ss3x/ezXtHeKtOGCMCNmx3MauZojPYUpSwFkE0fYgYCD9dMQMVG4DY/VF38P0KShsg==",
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.5.tgz",
+ "integrity": "sha512-4qa4GMfuZH0Ai3mttk5ccXP8a3sf7aPlAJwyMrUSz6h9hPri6BPou94zeu3rENhhmKLby9S/W1y+pmficy8JKA==",
"requires": {
"@babel/runtime": "^7.22.6",
- "@mui/base": "5.0.0-beta.10",
- "@mui/core-downloads-tracker": "^5.14.4",
- "@mui/system": "^5.14.4",
+ "@mui/base": "5.0.0-beta.11",
+ "@mui/core-downloads-tracker": "^5.14.5",
+ "@mui/system": "^5.14.5",
"@mui/types": "^7.2.4",
- "@mui/utils": "^5.14.4",
+ "@mui/utils": "^5.14.5",
"@types/react-transition-group": "^4.4.6",
"clsx": "^2.0.0",
"csstype": "^3.1.2",
@@ -6686,12 +6686,12 @@
}
},
"@mui/private-theming": {
- "version": "5.14.4",
- "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.4.tgz",
- "integrity": "sha512-ISXsHDiQ3z1XA4IuKn+iXDWvDjcz/UcQBiFZqtdoIsEBt8CB7wgdQf3LwcwqO81dl5ofg/vNQBEnXuKfZHrnYA==",
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.5.tgz",
+ "integrity": "sha512-cC4C5RrpXpDaaZyH9QwmPhRLgz+f2SYbOty3cPkk4qPSOSfif2ZEcDD9HTENKDDd9deB+xkPKzzZhi8cxIx8Ig==",
"requires": {
"@babel/runtime": "^7.22.6",
- "@mui/utils": "^5.14.4",
+ "@mui/utils": "^5.14.5",
"prop-types": "^15.8.1"
},
"dependencies": {
@@ -6727,15 +6727,15 @@
}
},
"@mui/system": {
- "version": "5.14.4",
- "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.4.tgz",
- "integrity": "sha512-oPgfWS97QNfHcDBapdkZIs4G5i85BJt69Hp6wbXF6s7vi3Evcmhdk8AbCRW6n0sX4vTj8oe0mh0RIm1G2A1KDA==",
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.5.tgz",
+ "integrity": "sha512-mextXZHDeGcR7E1kx43TRARrVXy+gI4wzpUgNv7MqZs1dvTVXQGVeAT6ydj9d6FUqHBPMNLGV/21vJOrpqsL+w==",
"requires": {
"@babel/runtime": "^7.22.6",
- "@mui/private-theming": "^5.14.4",
+ "@mui/private-theming": "^5.14.5",
"@mui/styled-engine": "^5.13.2",
"@mui/types": "^7.2.4",
- "@mui/utils": "^5.14.4",
+ "@mui/utils": "^5.14.5",
"clsx": "^2.0.0",
"csstype": "^3.1.2",
"prop-types": "^15.8.1"
@@ -6752,9 +6752,9 @@
}
},
"@mui/utils": {
- "version": "5.14.4",
- "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.4.tgz",
- "integrity": "sha512-4ANV0txPD3x0IcTCSEHKDWnsutg1K3m6Vz5IckkbLXVYu17oOZCVUdOKsb/txUmaCd0v0PmSRe5PW+Mlvns5dQ==",
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.5.tgz",
+ "integrity": "sha512-6Hzw63VR9C5xYv+CbjndoRLU6Gntal8rJ5W+GUzkyHrGWIyYPWZPa6AevnyGioySNETATe1H9oXS8f/7qgIHJA==",
"requires": {
"@babel/runtime": "^7.22.6",
"@types/prop-types": "^15.7.5",
@@ -8787,9 +8787,9 @@
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"postcss": {
- "version": "8.4.27",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
- "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
+ "version": "8.4.28",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz",
+ "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==",
"requires": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
diff --git a/package.json b/package.json
index aff438dd9..63f6a7040 100644
--- a/package.json
+++ b/package.json
@@ -178,7 +178,7 @@
"body-parser": "^1.19.2",
"bootstrap": "^4.6.1",
"brotli": "^1.3.3",
- "browndash-components": "^0.0.93",
+ "browndash-components": "^0.0.95",
"browser-assert": "^1.2.1",
"bson": "^4.6.1",
"canvas": "^2.9.3",
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
index 91eac675f..1b2209224 100644
--- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx
+++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
@@ -267,20 +267,25 @@ export class FontIconBox extends DocComponent<ButtonProps>() {
return ScriptCast(this.rootDoc.script);
}
+ colorBatch:UndoManager.Batch|undefined;
/**
* Color button
*/
@computed get colorButton() {
const color = this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.Color);
- const backgroundColor = this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.BackgroundColor);
const curColor = this.colorScript?.script.run({ this: this.layoutDoc, self: this.rootDoc, value: undefined, _readOnly_: true }).result ?? 'transparent';
const tooltip: string = StrCast(this.rootDoc.toolTip);
return (
<ColorPicker
setSelectedColor={value => {
- const s = this.colorScript;
- s && undoable(() => s.script.run({ this: this.layoutDoc, self: this.rootDoc, value: value, _readOnly_: false }).result, `Set ${tooltip} to ${value}`)();
+ if (!this.colorBatch) this.colorBatch = UndoManager.StartBatch(`Set ${tooltip} color`);
+ this.colorScript?.script.run({ this: this.layoutDoc, self: this.rootDoc, value: value, _readOnly_: false });
+ }}
+ setFinalColor={value => {
+ this.colorScript?.script.run({ this: this.layoutDoc, self: this.rootDoc, value: value, _readOnly_: false });
+ this.colorBatch?.end();
+ this.colorBatch= undefined;
}}
selectedColor={curColor}
type={Type.PRIM}