apexgantt 3.6.0 → 3.6.1
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/README.md +14 -0
- package/apexgantt.es.min.js +108 -106
- package/apexgantt.min.js +2 -2
- package/lib/util/ganttExport.d.ts +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -46,6 +46,20 @@ const gantt = new ApexGantt(document.getElementById('gantt-container'), ganttOpt
|
|
|
46
46
|
gantt.render();
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
## Setting the License
|
|
50
|
+
|
|
51
|
+
To use ApexGantt with a commercial license, set your license key before creating any chart instances:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import ApexGantt from 'apexgantt';
|
|
55
|
+
|
|
56
|
+
// set license key before creating any charts
|
|
57
|
+
ApexGantt.setLicense('your-license-key');
|
|
58
|
+
|
|
59
|
+
const gantt = new ApexGantt(document.getElementById('gantt-container'), ganttOptions);
|
|
60
|
+
gantt.render();
|
|
61
|
+
```
|
|
62
|
+
|
|
49
63
|
## ApexGantt Options
|
|
50
64
|
|
|
51
65
|
The layout can be configured by either setting the properties in the table below by passing a second arg to ApexGantt with these properties set. The latter takes precedence.
|
package/apexgantt.es.min.js
CHANGED
|
@@ -5919,6 +5919,109 @@ registerMorphableType([
|
|
|
5919
5919
|
Point
|
|
5920
5920
|
]);
|
|
5921
5921
|
makeMorphable();
|
|
5922
|
+
const ToolbarStyle = `
|
|
5923
|
+
#toolbar {
|
|
5924
|
+
display: flex;
|
|
5925
|
+
gap: 5px;
|
|
5926
|
+
position: absolute;
|
|
5927
|
+
right: 10px;
|
|
5928
|
+
top: 10px;
|
|
5929
|
+
z-index: 100;
|
|
5930
|
+
}
|
|
5931
|
+
|
|
5932
|
+
.toolbar-item {
|
|
5933
|
+
align-items: center;
|
|
5934
|
+
background-color: var(--toolbar-bg-color, #FFFFFF);
|
|
5935
|
+
border: 1px solid var(--toolbar-border-color, #BCBCBC);
|
|
5936
|
+
cursor: pointer;
|
|
5937
|
+
display: flex;
|
|
5938
|
+
height: 30px;
|
|
5939
|
+
justify-content: center;
|
|
5940
|
+
width: 30px;
|
|
5941
|
+
border-radius: 3px;
|
|
5942
|
+
transition: all 0.2s ease;
|
|
5943
|
+
position: relative;
|
|
5944
|
+
}
|
|
5945
|
+
|
|
5946
|
+
.toolbar-item:hover {
|
|
5947
|
+
background-color: var(--toolbar-hover-bg-color, #f8f9fa);
|
|
5948
|
+
border-color: var(--toolbar-border-color, #999);
|
|
5949
|
+
transform: translateY(-1px);
|
|
5950
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
5951
|
+
}
|
|
5952
|
+
|
|
5953
|
+
.toolbar-item:active {
|
|
5954
|
+
transform: translateY(0);
|
|
5955
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
5956
|
+
}
|
|
5957
|
+
|
|
5958
|
+
.toolbar-item:focus {
|
|
5959
|
+
outline: none;
|
|
5960
|
+
border-color: var(--button-bg-color, #0066cc);
|
|
5961
|
+
box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
|
|
5962
|
+
}
|
|
5963
|
+
|
|
5964
|
+
.toolbar-item img {
|
|
5965
|
+
width: 16px;
|
|
5966
|
+
height: 16px;
|
|
5967
|
+
pointer-events: none;
|
|
5968
|
+
filter: var(--toolbar-icon-filter, none);
|
|
5969
|
+
}
|
|
5970
|
+
|
|
5971
|
+
.toolbar-item[disabled] {
|
|
5972
|
+
opacity: 0.5;
|
|
5973
|
+
cursor: not-allowed;
|
|
5974
|
+
pointer-events: none;
|
|
5975
|
+
}
|
|
5976
|
+
|
|
5977
|
+
/* Tooltip styles */
|
|
5978
|
+
.toolbar-item::after {
|
|
5979
|
+
content: attr(data-tooltip);
|
|
5980
|
+
position: absolute;
|
|
5981
|
+
bottom: -35px;
|
|
5982
|
+
left: 50%;
|
|
5983
|
+
transform: translateX(-50%);
|
|
5984
|
+
background: var(--tooltip-bg-color, #333);
|
|
5985
|
+
color: var(--tooltip-text-color, white);
|
|
5986
|
+
padding: 4px 8px;
|
|
5987
|
+
border-radius: 4px;
|
|
5988
|
+
font-size: 12px;
|
|
5989
|
+
white-space: nowrap;
|
|
5990
|
+
opacity: 0;
|
|
5991
|
+
pointer-events: none;
|
|
5992
|
+
transition: opacity 0.2s ease;
|
|
5993
|
+
z-index: 1000;
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
.toolbar-item::before {
|
|
5997
|
+
content: '';
|
|
5998
|
+
position: absolute;
|
|
5999
|
+
bottom: -25px;
|
|
6000
|
+
left: 50%;
|
|
6001
|
+
transform: translateX(-50%);
|
|
6002
|
+
border: 5px solid transparent;
|
|
6003
|
+
border-bottom-color: var(--tooltip-bg-color, #333);
|
|
6004
|
+
opacity: 0;
|
|
6005
|
+
pointer-events: none;
|
|
6006
|
+
transition: opacity 0.2s ease;
|
|
6007
|
+
z-index: 1000;
|
|
6008
|
+
}
|
|
6009
|
+
|
|
6010
|
+
.toolbar-item:hover::after,
|
|
6011
|
+
.toolbar-item:hover::before {
|
|
6012
|
+
opacity: 1;
|
|
6013
|
+
}
|
|
6014
|
+
|
|
6015
|
+
/* Shadow DOM specific adjustments */
|
|
6016
|
+
:host #toolbar {
|
|
6017
|
+
display: flex;
|
|
6018
|
+
gap: 5px;
|
|
6019
|
+
position: absolute;
|
|
6020
|
+
right: 10px;
|
|
6021
|
+
top: 10px;
|
|
6022
|
+
z-index: 100;
|
|
6023
|
+
}
|
|
6024
|
+
`;
|
|
5922
6025
|
const _Watermark = class _Watermark {
|
|
5923
6026
|
/**
|
|
5924
6027
|
* Add watermark to a container element
|
|
@@ -6465,14 +6568,12 @@ const getCursorFollowingTooltipStyles = ({
|
|
|
6465
6568
|
fontFamily,
|
|
6466
6569
|
fontSize,
|
|
6467
6570
|
fontWeight,
|
|
6468
|
-
maxWidth
|
|
6571
|
+
maxWidth,
|
|
6469
6572
|
padding,
|
|
6470
6573
|
x: x2,
|
|
6471
6574
|
y: y2
|
|
6472
6575
|
}) => {
|
|
6473
6576
|
const styles = ["position: absolute;", "z-index: 1000;", "pointer-events: none;"];
|
|
6474
|
-
styles.push(`width: ${maxWidth}px;`);
|
|
6475
|
-
styles.push(`max-width: ${maxWidth}px;`);
|
|
6476
6577
|
styles.push("box-sizing: border-box;");
|
|
6477
6578
|
styles.push("word-wrap: break-word;");
|
|
6478
6579
|
styles.push("overflow-wrap: break-word;");
|
|
@@ -6481,6 +6582,10 @@ const getCursorFollowingTooltipStyles = ({
|
|
|
6481
6582
|
if (borderColor) {
|
|
6482
6583
|
styles.push(`border: 1px solid ${borderColor};`);
|
|
6483
6584
|
}
|
|
6585
|
+
if (maxWidth) {
|
|
6586
|
+
styles.push(`width: ${maxWidth}px;`);
|
|
6587
|
+
styles.push(`max-width: ${maxWidth}px;`);
|
|
6588
|
+
}
|
|
6484
6589
|
styles.push("border-radius: 6px;");
|
|
6485
6590
|
styles.push("box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);");
|
|
6486
6591
|
styles.push("transition: opacity 0.2s ease;");
|
|
@@ -15883,109 +15988,6 @@ const TooltipStyle = `
|
|
|
15883
15988
|
margin-bottom: 0;
|
|
15884
15989
|
}
|
|
15885
15990
|
`;
|
|
15886
|
-
const ToolbarStyle = `
|
|
15887
|
-
#toolbar {
|
|
15888
|
-
display: flex;
|
|
15889
|
-
gap: 5px;
|
|
15890
|
-
position: absolute;
|
|
15891
|
-
right: 10px;
|
|
15892
|
-
top: 10px;
|
|
15893
|
-
z-index: 100;
|
|
15894
|
-
}
|
|
15895
|
-
|
|
15896
|
-
.toolbar-item {
|
|
15897
|
-
align-items: center;
|
|
15898
|
-
background-color: var(--toolbar-bg-color, #FFFFFF);
|
|
15899
|
-
border: 1px solid var(--toolbar-border-color, #BCBCBC);
|
|
15900
|
-
cursor: pointer;
|
|
15901
|
-
display: flex;
|
|
15902
|
-
height: 30px;
|
|
15903
|
-
justify-content: center;
|
|
15904
|
-
width: 30px;
|
|
15905
|
-
border-radius: 3px;
|
|
15906
|
-
transition: all 0.2s ease;
|
|
15907
|
-
position: relative;
|
|
15908
|
-
}
|
|
15909
|
-
|
|
15910
|
-
.toolbar-item:hover {
|
|
15911
|
-
background-color: var(--toolbar-hover-bg-color, #f8f9fa);
|
|
15912
|
-
border-color: var(--toolbar-border-color, #999);
|
|
15913
|
-
transform: translateY(-1px);
|
|
15914
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
15915
|
-
}
|
|
15916
|
-
|
|
15917
|
-
.toolbar-item:active {
|
|
15918
|
-
transform: translateY(0);
|
|
15919
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
15920
|
-
}
|
|
15921
|
-
|
|
15922
|
-
.toolbar-item:focus {
|
|
15923
|
-
outline: none;
|
|
15924
|
-
border-color: var(--button-bg-color, #0066cc);
|
|
15925
|
-
box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
|
|
15926
|
-
}
|
|
15927
|
-
|
|
15928
|
-
.toolbar-item img {
|
|
15929
|
-
width: 16px;
|
|
15930
|
-
height: 16px;
|
|
15931
|
-
pointer-events: none;
|
|
15932
|
-
filter: var(--toolbar-icon-filter, none);
|
|
15933
|
-
}
|
|
15934
|
-
|
|
15935
|
-
.toolbar-item[disabled] {
|
|
15936
|
-
opacity: 0.5;
|
|
15937
|
-
cursor: not-allowed;
|
|
15938
|
-
pointer-events: none;
|
|
15939
|
-
}
|
|
15940
|
-
|
|
15941
|
-
/* Tooltip styles */
|
|
15942
|
-
.toolbar-item::after {
|
|
15943
|
-
content: attr(data-tooltip);
|
|
15944
|
-
position: absolute;
|
|
15945
|
-
bottom: -35px;
|
|
15946
|
-
left: 50%;
|
|
15947
|
-
transform: translateX(-50%);
|
|
15948
|
-
background: var(--tooltip-bg-color, #333);
|
|
15949
|
-
color: var(--tooltip-text-color, white);
|
|
15950
|
-
padding: 4px 8px;
|
|
15951
|
-
border-radius: 4px;
|
|
15952
|
-
font-size: 12px;
|
|
15953
|
-
white-space: nowrap;
|
|
15954
|
-
opacity: 0;
|
|
15955
|
-
pointer-events: none;
|
|
15956
|
-
transition: opacity 0.2s ease;
|
|
15957
|
-
z-index: 1000;
|
|
15958
|
-
}
|
|
15959
|
-
|
|
15960
|
-
.toolbar-item::before {
|
|
15961
|
-
content: '';
|
|
15962
|
-
position: absolute;
|
|
15963
|
-
bottom: -25px;
|
|
15964
|
-
left: 50%;
|
|
15965
|
-
transform: translateX(-50%);
|
|
15966
|
-
border: 5px solid transparent;
|
|
15967
|
-
border-bottom-color: var(--tooltip-bg-color, #333);
|
|
15968
|
-
opacity: 0;
|
|
15969
|
-
pointer-events: none;
|
|
15970
|
-
transition: opacity 0.2s ease;
|
|
15971
|
-
z-index: 1000;
|
|
15972
|
-
}
|
|
15973
|
-
|
|
15974
|
-
.toolbar-item:hover::after,
|
|
15975
|
-
.toolbar-item:hover::before {
|
|
15976
|
-
opacity: 1;
|
|
15977
|
-
}
|
|
15978
|
-
|
|
15979
|
-
/* Shadow DOM specific adjustments */
|
|
15980
|
-
:host #toolbar {
|
|
15981
|
-
display: flex;
|
|
15982
|
-
gap: 5px;
|
|
15983
|
-
position: absolute;
|
|
15984
|
-
right: 10px;
|
|
15985
|
-
top: 10px;
|
|
15986
|
-
z-index: 100;
|
|
15987
|
-
}
|
|
15988
|
-
`;
|
|
15989
15991
|
const DefaultOptions = {
|
|
15990
15992
|
paddingX: 20,
|
|
15991
15993
|
paddingY: 15
|