jodit-pro-react 5.5.3 → 5.5.5
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.
|
@@ -1238,7 +1238,7 @@
|
|
|
1238
1238
|
opacity: .7;
|
|
1239
1239
|
position: absolute;
|
|
1240
1240
|
top: 0;
|
|
1241
|
-
z-index:
|
|
1241
|
+
z-index: var(--jd-z-index-tooltip);
|
|
1242
1242
|
}
|
|
1243
1243
|
.jodit-progress-bar div {
|
|
1244
1244
|
background: var(--jd-color-background-progress);
|
|
@@ -1269,6 +1269,25 @@
|
|
|
1269
1269
|
width: 20px;
|
|
1270
1270
|
clip: rect(-6px, 22px, 14px, var(--jd-padding-default));
|
|
1271
1271
|
}
|
|
1272
|
+
.jodit-progress-bar__file-animation {
|
|
1273
|
+
height: 32px;
|
|
1274
|
+
opacity: .8;
|
|
1275
|
+
pointer-events: none;
|
|
1276
|
+
position: fixed;
|
|
1277
|
+
transform: scale(1);
|
|
1278
|
+
transition:
|
|
1279
|
+
left .8s ease-in,
|
|
1280
|
+
top .8s ease-in,
|
|
1281
|
+
opacity .8s ease-in,
|
|
1282
|
+
transform .8s ease-in;
|
|
1283
|
+
width: 32px;
|
|
1284
|
+
z-index: 2147483647;
|
|
1285
|
+
}
|
|
1286
|
+
.jodit-progress-bar__file-animation svg {
|
|
1287
|
+
fill: var(--jd-color-background-progress);
|
|
1288
|
+
height: 100%;
|
|
1289
|
+
width: 100%;
|
|
1290
|
+
}
|
|
1272
1291
|
:root {
|
|
1273
1292
|
--jd-em-color-border:#b6d4fe;
|
|
1274
1293
|
--jd-em-color-bg:#cfe2ff;
|
|
@@ -5062,7 +5081,8 @@ input:focus + .jodit-switcher__slider {
|
|
|
5062
5081
|
fill: var(--jd-color-icon);
|
|
5063
5082
|
height: 14px;
|
|
5064
5083
|
overflow: visible;
|
|
5065
|
-
transform
|
|
5084
|
+
transform: scale(var(--jd-icon-transform-scale,1));
|
|
5085
|
+
transform-origin: var(--jd-icon-transform-origin);
|
|
5066
5086
|
width: 14px;
|
|
5067
5087
|
}
|
|
5068
5088
|
.jodit-icon,
|
|
@@ -8622,7 +8642,7 @@ svg.jodit-icon {
|
|
|
8622
8642
|
right: 0;
|
|
8623
8643
|
top: 0;
|
|
8624
8644
|
transition: width .3s linear;
|
|
8625
|
-
z-index:
|
|
8645
|
+
z-index: var(--jd-z-index-tooltip);
|
|
8626
8646
|
}
|
|
8627
8647
|
.jodit-ui-progress div {
|
|
8628
8648
|
background: var(--jd-color-background-progress);
|
|
@@ -8653,6 +8673,25 @@ svg.jodit-icon {
|
|
|
8653
8673
|
width: 20px;
|
|
8654
8674
|
clip: rect(-6px, 22px, 14px, var(--jd-padding-default));
|
|
8655
8675
|
}
|
|
8676
|
+
.jodit-ui-progress__file-animation {
|
|
8677
|
+
height: 32px;
|
|
8678
|
+
opacity: .8;
|
|
8679
|
+
pointer-events: none;
|
|
8680
|
+
position: fixed;
|
|
8681
|
+
transform: scale(1);
|
|
8682
|
+
transition:
|
|
8683
|
+
left .8s ease-in,
|
|
8684
|
+
top .8s ease-in,
|
|
8685
|
+
opacity .8s ease-in,
|
|
8686
|
+
transform .8s ease-in;
|
|
8687
|
+
width: 32px;
|
|
8688
|
+
z-index: 2147483647;
|
|
8689
|
+
}
|
|
8690
|
+
.jodit-ui-progress__file-animation svg {
|
|
8691
|
+
fill: var(--jd-color-background-progress);
|
|
8692
|
+
height: 100%;
|
|
8693
|
+
width: 100%;
|
|
8694
|
+
}
|
|
8656
8695
|
.jodit-ui-progress_hidden_true {
|
|
8657
8696
|
opacity: 0;
|
|
8658
8697
|
width: 0 !important;
|
|
@@ -8738,6 +8777,8 @@ svg.jodit-icon {
|
|
|
8738
8777
|
--jd-button-df-size:calc((var(--jd-button-icon-size) - 4px)*2);
|
|
8739
8778
|
--jd-button-size:calc(var(--jd-button-icon-size) + var(--jd-button-df-size) + var(--jd-margin-v)*2);
|
|
8740
8779
|
--jd-focus-input-box-shadow:0 0 0 0.05rem rgba(0,123,255,.25);
|
|
8780
|
+
--jd-icon-transform-origin:center;
|
|
8781
|
+
--jd-icon-transform-scale:1;
|
|
8741
8782
|
}
|
|
8742
8783
|
.jodit-file-browser-pro {
|
|
8743
8784
|
border: 0;
|
|
@@ -182,7 +182,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
182
182
|
var init_constants = __esm({
|
|
183
183
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
184
184
|
"use strict";
|
|
185
|
-
APP_VERSION = "4.11.
|
|
185
|
+
APP_VERSION = "4.11.6";
|
|
186
186
|
ES = "es2020";
|
|
187
187
|
IS_ES_MODERN = true;
|
|
188
188
|
IS_ES_NEXT = true;
|
|
@@ -7465,13 +7465,13 @@ var Icon = class _Icon {
|
|
|
7465
7465
|
return;
|
|
7466
7466
|
}
|
|
7467
7467
|
let iconElement;
|
|
7468
|
-
const { name, iconURL, fill } = icon;
|
|
7468
|
+
const { name, iconURL, fill, scale } = icon;
|
|
7469
7469
|
const clearName = name.replace(/[^a-zA-Z0-9]/g, "_");
|
|
7470
7470
|
let iconFromEvent;
|
|
7471
7471
|
if (!/<svg/.test(name)) {
|
|
7472
7472
|
iconFromEvent = (_b = (_a2 = jodit.o).getIcon) === null || _b === void 0 ? void 0 : _b.call(_a2, name, clearName);
|
|
7473
7473
|
}
|
|
7474
|
-
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ""}`;
|
|
7474
|
+
const cacheKey = `${name}${iconURL}${fill}${scale !== null && scale !== void 0 ? scale : ""}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ""}`;
|
|
7475
7475
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
7476
7476
|
return (_c = this.__cache.get(cacheKey)) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
|
|
7477
7477
|
}
|
|
@@ -7490,6 +7490,9 @@ var Icon = class _Icon {
|
|
|
7490
7490
|
if (iconElement) {
|
|
7491
7491
|
iconElement.classList.add("jodit-icon");
|
|
7492
7492
|
iconElement.style.fill = fill;
|
|
7493
|
+
if (scale != null) {
|
|
7494
|
+
iconElement.style.transform = `scale(${scale})`;
|
|
7495
|
+
}
|
|
7493
7496
|
jodit.o.cache && this.__cache.set(cacheKey, iconElement.cloneNode(true));
|
|
7494
7497
|
}
|
|
7495
7498
|
return iconElement;
|
|
@@ -7853,7 +7856,8 @@ var UIButtonState = () => ({
|
|
|
7853
7856
|
icon: {
|
|
7854
7857
|
name: "empty",
|
|
7855
7858
|
fill: "",
|
|
7856
|
-
iconURL: ""
|
|
7859
|
+
iconURL: "",
|
|
7860
|
+
scale: void 0
|
|
7857
7861
|
},
|
|
7858
7862
|
tooltip: "",
|
|
7859
7863
|
text: "",
|
|
@@ -9765,7 +9769,14 @@ UIList = __decorate18([
|
|
|
9765
9769
|
|
|
9766
9770
|
// node_modules/jodit/esm/core/ui/progress-bar/progress-bar.js
|
|
9767
9771
|
init_dom();
|
|
9768
|
-
|
|
9772
|
+
init_global2();
|
|
9773
|
+
init_position();
|
|
9774
|
+
init_css();
|
|
9775
|
+
var ProgressBar = class _ProgressBar extends UIElement {
|
|
9776
|
+
constructor() {
|
|
9777
|
+
super(...arguments);
|
|
9778
|
+
this.__animationElement = null;
|
|
9779
|
+
}
|
|
9769
9780
|
/** @override */
|
|
9770
9781
|
className() {
|
|
9771
9782
|
return "ProgressBar";
|
|
@@ -9790,7 +9801,50 @@ var ProgressBar = class extends UIElement {
|
|
|
9790
9801
|
this.container.style.width = percentage.toFixed(2) + "%";
|
|
9791
9802
|
return this;
|
|
9792
9803
|
}
|
|
9804
|
+
showFileUploadAnimation(from, to) {
|
|
9805
|
+
this.__cleanUpAnimation();
|
|
9806
|
+
const box = getContainer(this.j, _ProgressBar);
|
|
9807
|
+
const pos = position(this.j.container, this.j);
|
|
9808
|
+
const el = this.j.c.div(this.getFullElName("file-animation"));
|
|
9809
|
+
const iconSvg = Icon.get("file", "");
|
|
9810
|
+
if (iconSvg) {
|
|
9811
|
+
el.innerHTML = iconSvg;
|
|
9812
|
+
}
|
|
9813
|
+
const start = from !== null && from !== void 0 ? from : {
|
|
9814
|
+
x: pos.width / 2,
|
|
9815
|
+
y: 0
|
|
9816
|
+
};
|
|
9817
|
+
const end = to !== null && to !== void 0 ? to : {
|
|
9818
|
+
x: start.x + 60,
|
|
9819
|
+
y: start.y - 80
|
|
9820
|
+
};
|
|
9821
|
+
css(el, {
|
|
9822
|
+
left: pos.left + start.x,
|
|
9823
|
+
top: pos.top + start.y
|
|
9824
|
+
});
|
|
9825
|
+
box.appendChild(el);
|
|
9826
|
+
this.__animationElement = el;
|
|
9827
|
+
el.offsetWidth;
|
|
9828
|
+
css(el, {
|
|
9829
|
+
left: pos.left + end.x,
|
|
9830
|
+
top: pos.top + end.y,
|
|
9831
|
+
opacity: 0,
|
|
9832
|
+
transform: "scale(0.4)"
|
|
9833
|
+
});
|
|
9834
|
+
const onEnd = () => {
|
|
9835
|
+
el.removeEventListener("transitionend", onEnd);
|
|
9836
|
+
this.__cleanUpAnimation();
|
|
9837
|
+
};
|
|
9838
|
+
el.addEventListener("transitionend", onEnd);
|
|
9839
|
+
}
|
|
9840
|
+
__cleanUpAnimation() {
|
|
9841
|
+
if (this.__animationElement) {
|
|
9842
|
+
Dom.safeRemove(this.__animationElement);
|
|
9843
|
+
this.__animationElement = null;
|
|
9844
|
+
}
|
|
9845
|
+
}
|
|
9793
9846
|
destruct() {
|
|
9847
|
+
this.__cleanUpAnimation();
|
|
9794
9848
|
this.hide();
|
|
9795
9849
|
return super.destruct();
|
|
9796
9850
|
}
|
|
@@ -15458,29 +15512,42 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15458
15512
|
* Init constant data from control
|
|
15459
15513
|
*/
|
|
15460
15514
|
__initFromControl() {
|
|
15461
|
-
var _a2;
|
|
15462
15515
|
const { control: ctr, state } = this;
|
|
15463
15516
|
this.updateSize();
|
|
15464
15517
|
state.name = ctr.name;
|
|
15518
|
+
this.__initIconFromControl();
|
|
15519
|
+
if (ctr.tooltip) {
|
|
15520
|
+
state.tooltip = isFunction(ctr.tooltip) ? ctr.tooltip(this.j, ctr, this) : ctr.tooltip;
|
|
15521
|
+
}
|
|
15522
|
+
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
15523
|
+
}
|
|
15524
|
+
__initIconFromControl() {
|
|
15525
|
+
var _a2;
|
|
15526
|
+
const { control: ctr, state } = this;
|
|
15465
15527
|
const { textIcons } = this.j.o;
|
|
15466
15528
|
if (textIcons === true || isFunction(textIcons) && textIcons(ctr.name) || ctr.template) {
|
|
15467
15529
|
state.icon = UIButtonState().icon;
|
|
15468
15530
|
state.text = ctr.text || ctr.name;
|
|
15531
|
+
return;
|
|
15532
|
+
}
|
|
15533
|
+
if (!isString(ctr.icon) && ctr.icon != null) {
|
|
15534
|
+
state.icon = {
|
|
15535
|
+
name: ctr.icon.name || ctr.name,
|
|
15536
|
+
iconURL: ctr.icon.iconURL || "",
|
|
15537
|
+
fill: ctr.icon.fill || "",
|
|
15538
|
+
scale: ctr.icon.scale
|
|
15539
|
+
};
|
|
15540
|
+
return;
|
|
15541
|
+
}
|
|
15542
|
+
if (ctr.iconURL) {
|
|
15543
|
+
state.icon.iconURL = ctr.iconURL;
|
|
15469
15544
|
} else {
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
} else {
|
|
15473
|
-
const name = ctr.icon || ctr.name;
|
|
15474
|
-
state.icon.name = Icon.exists(name) || ((_a2 = this.j.o.extraIcons) === null || _a2 === void 0 ? void 0 : _a2[name]) ? name : "";
|
|
15475
|
-
}
|
|
15476
|
-
if (!ctr.iconURL && !state.icon.name) {
|
|
15477
|
-
state.text = ctr.text || ctr.name;
|
|
15478
|
-
}
|
|
15545
|
+
const name = ctr.icon || ctr.name;
|
|
15546
|
+
state.icon.name = Icon.exists(name) || ((_a2 = this.j.o.extraIcons) === null || _a2 === void 0 ? void 0 : _a2[name]) ? name : "";
|
|
15479
15547
|
}
|
|
15480
|
-
if (ctr.
|
|
15481
|
-
state.
|
|
15548
|
+
if (!ctr.iconURL && !state.icon.name) {
|
|
15549
|
+
state.text = ctr.text || ctr.name;
|
|
15482
15550
|
}
|
|
15483
|
-
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
15484
15551
|
}
|
|
15485
15552
|
/**
|
|
15486
15553
|
* Click on trigger button
|
package/build/esm/index.css
CHANGED
|
@@ -1238,7 +1238,7 @@
|
|
|
1238
1238
|
opacity: .7;
|
|
1239
1239
|
position: absolute;
|
|
1240
1240
|
top: 0;
|
|
1241
|
-
z-index:
|
|
1241
|
+
z-index: var(--jd-z-index-tooltip);
|
|
1242
1242
|
}
|
|
1243
1243
|
.jodit-progress-bar div {
|
|
1244
1244
|
background: var(--jd-color-background-progress);
|
|
@@ -1269,6 +1269,25 @@
|
|
|
1269
1269
|
width: 20px;
|
|
1270
1270
|
clip: rect(-6px, 22px, 14px, var(--jd-padding-default));
|
|
1271
1271
|
}
|
|
1272
|
+
.jodit-progress-bar__file-animation {
|
|
1273
|
+
height: 32px;
|
|
1274
|
+
opacity: .8;
|
|
1275
|
+
pointer-events: none;
|
|
1276
|
+
position: fixed;
|
|
1277
|
+
transform: scale(1);
|
|
1278
|
+
transition:
|
|
1279
|
+
left .8s ease-in,
|
|
1280
|
+
top .8s ease-in,
|
|
1281
|
+
opacity .8s ease-in,
|
|
1282
|
+
transform .8s ease-in;
|
|
1283
|
+
width: 32px;
|
|
1284
|
+
z-index: 2147483647;
|
|
1285
|
+
}
|
|
1286
|
+
.jodit-progress-bar__file-animation svg {
|
|
1287
|
+
fill: var(--jd-color-background-progress);
|
|
1288
|
+
height: 100%;
|
|
1289
|
+
width: 100%;
|
|
1290
|
+
}
|
|
1272
1291
|
:root {
|
|
1273
1292
|
--jd-em-color-border:#b6d4fe;
|
|
1274
1293
|
--jd-em-color-bg:#cfe2ff;
|
|
@@ -5062,7 +5081,8 @@ input:focus + .jodit-switcher__slider {
|
|
|
5062
5081
|
fill: var(--jd-color-icon);
|
|
5063
5082
|
height: 14px;
|
|
5064
5083
|
overflow: visible;
|
|
5065
|
-
transform
|
|
5084
|
+
transform: scale(var(--jd-icon-transform-scale,1));
|
|
5085
|
+
transform-origin: var(--jd-icon-transform-origin);
|
|
5066
5086
|
width: 14px;
|
|
5067
5087
|
}
|
|
5068
5088
|
.jodit-icon,
|
|
@@ -8622,7 +8642,7 @@ svg.jodit-icon {
|
|
|
8622
8642
|
right: 0;
|
|
8623
8643
|
top: 0;
|
|
8624
8644
|
transition: width .3s linear;
|
|
8625
|
-
z-index:
|
|
8645
|
+
z-index: var(--jd-z-index-tooltip);
|
|
8626
8646
|
}
|
|
8627
8647
|
.jodit-ui-progress div {
|
|
8628
8648
|
background: var(--jd-color-background-progress);
|
|
@@ -8653,6 +8673,25 @@ svg.jodit-icon {
|
|
|
8653
8673
|
width: 20px;
|
|
8654
8674
|
clip: rect(-6px, 22px, 14px, var(--jd-padding-default));
|
|
8655
8675
|
}
|
|
8676
|
+
.jodit-ui-progress__file-animation {
|
|
8677
|
+
height: 32px;
|
|
8678
|
+
opacity: .8;
|
|
8679
|
+
pointer-events: none;
|
|
8680
|
+
position: fixed;
|
|
8681
|
+
transform: scale(1);
|
|
8682
|
+
transition:
|
|
8683
|
+
left .8s ease-in,
|
|
8684
|
+
top .8s ease-in,
|
|
8685
|
+
opacity .8s ease-in,
|
|
8686
|
+
transform .8s ease-in;
|
|
8687
|
+
width: 32px;
|
|
8688
|
+
z-index: 2147483647;
|
|
8689
|
+
}
|
|
8690
|
+
.jodit-ui-progress__file-animation svg {
|
|
8691
|
+
fill: var(--jd-color-background-progress);
|
|
8692
|
+
height: 100%;
|
|
8693
|
+
width: 100%;
|
|
8694
|
+
}
|
|
8656
8695
|
.jodit-ui-progress_hidden_true {
|
|
8657
8696
|
opacity: 0;
|
|
8658
8697
|
width: 0 !important;
|
|
@@ -8738,6 +8777,8 @@ svg.jodit-icon {
|
|
|
8738
8777
|
--jd-button-df-size:calc((var(--jd-button-icon-size) - 4px)*2);
|
|
8739
8778
|
--jd-button-size:calc(var(--jd-button-icon-size) + var(--jd-button-df-size) + var(--jd-margin-v)*2);
|
|
8740
8779
|
--jd-focus-input-box-shadow:0 0 0 0.05rem rgba(0,123,255,.25);
|
|
8780
|
+
--jd-icon-transform-origin:center;
|
|
8781
|
+
--jd-icon-transform-scale:1;
|
|
8741
8782
|
}
|
|
8742
8783
|
.jodit-file-browser-pro {
|
|
8743
8784
|
border: 0;
|