Skip to content

Commit

Permalink
fix color modal subscription, update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadpnc committed Dec 3, 2021
1 parent fed27ff commit 50706f3
Show file tree
Hide file tree
Showing 7 changed files with 1,374 additions and 1,730 deletions.
771 changes: 356 additions & 415 deletions dist/index.dev.js

Large diffs are not rendered by default.

773 changes: 357 additions & 416 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js

Large diffs are not rendered by default.

1,533 changes: 648 additions & 885 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@
"license": "MIT",
"homepage": "https://nenadpnc.github.io/cl-editor/",
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/core": "^7.16.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.7.0",
"babel-runtime": "^6.26.0",
"browser-env": "^3.3.0",
"bundlesize": "^0.18.1",
"chai": "^4.3.4",
"concurrently": "^6.2.0",
"concurrently": "^6.4.0",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"install": "^0.13.0",
"live-server": "^1.2.1",
"mocha": "^8.2.1",
"rollup": "^2.52.6",
"mocha": "^9.1.3",
"rollup": "^2.60.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"sinon": "^11.1.1",
"svelte": "^3.38.3",
"typescript": "^4.3.5"
"sinon": "^12.0.1",
"svelte": "^3.44.2",
"typescript": "^4.5.2"
},
"main": "./dist/index.js",
"svelte": "./src/Editor.svelte",
Expand Down
7 changes: 3 additions & 4 deletions src/helpers/EditorModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
let refs = {}
const inputType = (e) => {
e.type = event === 'colorHref' ? 'color' : 'text';
e.type = event.includes('Color') ? 'color' : 'text';
};
$:{
if(show){
if (show) {
setTimeout(() => {
refs.text.focus();
});
Expand All @@ -49,7 +49,6 @@
function confirm() {
if (text) {
console.log('dispatcher',text,event)
dispatcher(event,text);
cancel();
} else {
Expand Down Expand Up @@ -135,7 +134,7 @@
position: absolute;
top: 0;
right: 0;
height: 29px;
height: 27px;
line-height: 25px;
border: 1px solid #DEDEDE;
background: #fff;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ const showColorPicker = function(cmd) {
if (item.modal) {
refs.modal.$set({
show: true,
event: "colorHref",
event: `${cmd}Changed`,
title: "Text color",
label:
cmd === "foreColor" ? "Text color" : "Background color"
});
const command = cmd;
if (!get(this.helper)[`${command}Modal`]) {
get(this.helper)[`${command}Modal`] = true;
refs.modal.$on("colorHref", event => {
refs.modal.$on(`${command}Changed`, event => {
let color = event.detail;
restoreRange(refs.editor);
exec(command, color);
Expand Down

0 comments on commit 50706f3

Please sign in to comment.