igniteui-dockmanager 1.14.3 → 1.15.0-alpha.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/cjs/igc-button-component_20.cjs.entry.js +185 -64
- package/dist/cjs/igc-button-component_20.cjs.entry.js.map +1 -1
- package/dist/cjs/igniteui-dockmanager.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-b4351087.js → locale-d92f1ee8.js} +7 -1
- package/dist/cjs/locale-d92f1ee8.js.map +1 -0
- package/dist/collection/components/dockmanager/dockmanager-component.css +6 -3
- package/dist/collection/components/dockmanager/dockmanager-component.js +6 -5
- package/dist/collection/components/dockmanager/dockmanager-component.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js +6 -0
- package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.service.js +13 -3
- package/dist/collection/components/dockmanager/dockmanager.service.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/content-pane-component.js +1 -1
- package/dist/collection/components/dockmanager/panes/content-pane-component.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/split-pane-component.js +28 -4
- package/dist/collection/components/dockmanager/panes/split-pane-component.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/splitter-component.js +8 -9
- package/dist/collection/components/dockmanager/panes/splitter-component.js.map +1 -1
- package/dist/collection/components/sample-component/sample-component.css +39 -4
- package/dist/collection/components/sample-component/sample-component.js +146 -31
- package/dist/collection/components/sample-component/sample-component.js.map +1 -1
- package/dist/esm/igc-button-component_20.entry.js +179 -58
- package/dist/esm/igc-button-component_20.entry.js.map +1 -1
- package/dist/esm/igniteui-dockmanager.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-fc84f6af.js → locale-52bb921e.js} +7 -1
- package/dist/esm/locale-52bb921e.js.map +1 -0
- package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
- package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js.map +1 -1
- package/dist/igniteui-dockmanager/index.esm.js +1 -1
- package/dist/igniteui-dockmanager/{p-9841232d.js → p-715443ea.js} +1 -1
- package/dist/igniteui-dockmanager/p-715443ea.js.map +1 -0
- package/dist/igniteui-dockmanager/p-bc5bf8ff.entry.js +2 -0
- package/dist/igniteui-dockmanager/p-bc5bf8ff.entry.js.map +1 -0
- package/dist/types/components/dockmanager/dockmanager-component.d.ts +1 -0
- package/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts +4 -0
- package/dist/types/components/dockmanager/panes/split-pane-component.d.ts +1 -0
- package/dist/types/components/sample-component/sample-component.d.ts +2 -19
- package/dist/types/components.d.ts +2 -0
- package/loader/cdn.js +2 -2
- package/loader/index.cjs.js +2 -2
- package/package.json +1 -1
- package/dist/cjs/locale-b4351087.js.map +0 -1
- package/dist/esm/locale-fc84f6af.js.map +0 -1
- package/dist/igniteui-dockmanager/p-0cff103e.entry.js +0 -2
- package/dist/igniteui-dockmanager/p-0cff103e.entry.js.map +0 -1
- package/dist/igniteui-dockmanager/p-9841232d.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-050356a8.js');
|
|
6
|
-
const locale = require('./locale-
|
|
6
|
+
const locale = require('./locale-d92f1ee8.js');
|
|
7
7
|
|
|
8
8
|
const buttonComponentCss = "button{position:static;display:inline-flex;align-items:center;justify-content:center;width:auto;height:100%;min-width:10px;padding:2px 4px;border-radius:2px;color:var(--igc-button-text, rgba(0, 0, 0, 0.72));cursor:pointer;outline-style:none;font-size:14px;font-family:inherit;background:transparent;border:none;-webkit-tap-highlight-color:transparent;opacity:0.7;transition:background 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out}:host([disabled]){pointer-events:none}:host{display:flex}button{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}button:hover{opacity:1}button:focus{background:var(--igc-accent-color, #fff);box-shadow:inset 0 0 0 1px var(--igc-active-color, cornflowerblue);opacity:1}button[disabled]{opacity:0.54}";
|
|
9
9
|
|
|
@@ -152,7 +152,7 @@ const IgcContentPaneComponent = class {
|
|
|
152
152
|
'single-floating': this.isSingleFloating
|
|
153
153
|
});
|
|
154
154
|
return (index.h(index.Host, { role: "group", "aria-label": this.header, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, style: {
|
|
155
|
-
flex: this.isFlyout ? `0 1 ${unpinnedSize}px` :
|
|
155
|
+
flex: this.isFlyout ? `0 1 ${unpinnedSize}px` : `0 0 ${size}px`
|
|
156
156
|
}, part: parts }, index.h("slot", { name: "header" }), index.h("slot", null)));
|
|
157
157
|
}
|
|
158
158
|
};
|
|
@@ -714,7 +714,7 @@ class IgcDockManagerService {
|
|
|
714
714
|
}
|
|
715
715
|
getLastMaximizedPane() {
|
|
716
716
|
const keys = Array.from(this.paneParentMap.keys());
|
|
717
|
-
const maximizedPane = keys.filter(this.hasMaximizedProp).filter(i => i.isMaximized)[0];
|
|
717
|
+
const maximizedPane = keys.filter(this.hasMaximizedProp).filter(i => i.isMaximized && i.type !== locale.IgcDockManagerPaneType.splitPane)[0];
|
|
718
718
|
return maximizedPane;
|
|
719
719
|
}
|
|
720
720
|
processLayout() {
|
|
@@ -789,15 +789,20 @@ class IgcDockManagerService {
|
|
|
789
789
|
const sizeSum = paneSizes.reduce((p, c) => c + p, 0);
|
|
790
790
|
const calcDelta = deltaPercentage * sizeSum;
|
|
791
791
|
childPanes[paneIndex - 1].size = paneSizes[paneIndex - 1] + calcDelta;
|
|
792
|
-
childPanes[paneIndex].size = paneSizes[paneIndex] - calcDelta;
|
|
792
|
+
// childPanes[paneIndex].size = paneSizes[paneIndex] - calcDelta;
|
|
793
793
|
this.updateLayout();
|
|
794
794
|
}
|
|
795
795
|
togglePin(pane, pinBehavior = IgcPinBehavior.allPanes) {
|
|
796
796
|
const newValue = !this.getActualIsPinned(pane);
|
|
797
797
|
const parent = this.paneParentMap.get(pane);
|
|
798
|
-
const
|
|
798
|
+
const isTabGroup = parent.type === locale.IgcDockManagerPaneType.tabGroupPane;
|
|
799
|
+
const panes = isTabGroup && pinBehavior === IgcPinBehavior.allPanes ?
|
|
799
800
|
parent.panes.filter(p => p.allowPinning !== false) :
|
|
800
801
|
[pane];
|
|
802
|
+
const isTabGroupPinning = isTabGroup && pinBehavior === IgcPinBehavior.selectedPane;
|
|
803
|
+
if (isTabGroupPinning && parent.selectedIndex >= parent.panes.filter(p => p.isPinned).length) {
|
|
804
|
+
parent.selectedIndex = 0;
|
|
805
|
+
}
|
|
801
806
|
const location = this.resolvePaneUnpinLocation(pane);
|
|
802
807
|
const args = {
|
|
803
808
|
sourcePane: pane,
|
|
@@ -883,6 +888,11 @@ class IgcDockManagerService {
|
|
|
883
888
|
else {
|
|
884
889
|
targetPane.isMaximized = false;
|
|
885
890
|
}
|
|
891
|
+
if (targetPane.type == locale.IgcDockManagerPaneType.contentPane)
|
|
892
|
+
return;
|
|
893
|
+
for (const cp of this.getChildContentPanes(targetPane).filter(this.hasMaximizedProp)) {
|
|
894
|
+
cp.isMaximized = targetPane.isMaximized;
|
|
895
|
+
}
|
|
886
896
|
}
|
|
887
897
|
moveFloatingPane(pane, location) {
|
|
888
898
|
pane.floatingLocation = location;
|
|
@@ -1933,7 +1943,7 @@ class IgcDockManagerKeyboardService {
|
|
|
1933
1943
|
}
|
|
1934
1944
|
}
|
|
1935
1945
|
|
|
1936
|
-
const dockmanagerComponentCss = ":host{position:relative;display:flex;overflow:hidden;box-sizing:border-box;height:100%;background:var(--igc-dock-background, var(--igc-background-color, #E5E7E9));color:var(--igc-dock-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));font-family:var(--igc-font-family, \"Titillium Web\", \"Roboto\", \"Helvetica Neue\", sans-serif);outline-style:none;--unpinned-tab-area-size:30px}:host igc-icon-component svg{width:17px;height:17px}.pane-container--vertical,.pane-container--horizontal,.pane-container{display:flex;flex-grow:1;height:
|
|
1946
|
+
const dockmanagerComponentCss = ":host{position:relative;display:flex;overflow:hidden;box-sizing:border-box;height:100%;background:var(--igc-dock-background, var(--igc-background-color, #E5E7E9));color:var(--igc-dock-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));font-family:var(--igc-font-family, \"Titillium Web\", \"Roboto\", \"Helvetica Neue\", sans-serif);outline-style:none;--unpinned-tab-area-size:30px}:host igc-icon-component svg{width:17px;height:17px}.pane-container--vertical,.pane-container--horizontal,.pane-container{display:flex;flex-grow:1;max-height:100vh;max-width:100wh}.pane-container--horizontal{overflow-x:auto}.pane-container--vertical{flex-direction:column;overflow-y:auto}.unpinned-tab-area{display:flex;flex-direction:column;width:var(--unpinned-tab-area-size);height:auto}.unpinned-tab-area--left{padding:8px 8px 8px 0}.unpinned-tab-area--right{padding:8px 0 8px 8px}.unpinned-tab-area--bottom{padding-top:8px}.unpinned-tab-area--horizontal{flex-direction:row;width:auto;height:var(--unpinned-tab-area-size)}.unpinned-tab-area--hidden{display:none}.flyout-pane{display:flex;flex-direction:column;position:absolute;width:100%;height:100%;pointer-events:none;z-index:2}.flyout-pane igc-content-pane-component{box-shadow:0 12px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--right{flex-direction:row-reverse}.flyout-pane--right igc-content-pane-component{box-shadow:-12px 0px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--bottom{flex-direction:column-reverse}.flyout-pane--bottom igc-content-pane-component{box-shadow:0 -12px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--left{flex-direction:row}.flyout-pane--left igc-content-pane-component{box-shadow:12px 0px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.floating-panes{position:fixed;top:0;left:0;bottom:0;right:0;pointer-events:none;z-index:10000}.docking-indicators-container{position:absolute;display:flex;flex-direction:column;width:100%;height:100%;pointer-events:none;z-index:10004}.content{overflow:auto;height:100%;flex-grow:1;color:var(--igc-pane-content-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));position:relative}.maximized{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10002}.drop-shadow{background-color:var(--igc-drop-shadow-background, rgba(100, 149, 237, 0.2));position:fixed;z-index:10003;display:block;pointer-events:none}.hidden{height:0;opacity:0;padding:0;pointer-events:none;min-height:0 !important;transition:opacity 0.5s ease;position:absolute}.transitioned{overflow:hidden;transition:opacity 0.5s ease;position:absolute;z-index:999;width:100%}";
|
|
1937
1947
|
|
|
1938
1948
|
var ActionReason;
|
|
1939
1949
|
(function (ActionReason) {
|
|
@@ -2074,6 +2084,7 @@ const IgcDockManager = class {
|
|
|
2074
2084
|
targetPart: 'splitter-handle'
|
|
2075
2085
|
},
|
|
2076
2086
|
];
|
|
2087
|
+
this.ignoreResizeConstraints = true;
|
|
2077
2088
|
this.updateTemplates = () => {
|
|
2078
2089
|
if (this.templates.size > 0) {
|
|
2079
2090
|
return;
|
|
@@ -2528,7 +2539,7 @@ const IgcDockManager = class {
|
|
|
2528
2539
|
maxSize = parseFloat(getComputedStyle(pane).maxHeight);
|
|
2529
2540
|
}
|
|
2530
2541
|
if (position === 'previous') {
|
|
2531
|
-
return offset < 0 ? ((size + offset) >= minSize || isNaN(minSize)) : ((size + offset) <= maxSize || isNaN(maxSize));
|
|
2542
|
+
return offset < 0 ? ((size + offset) >= minSize || isNaN(minSize) || minSize === 0) : ((size + offset) <= maxSize || isNaN(maxSize));
|
|
2532
2543
|
}
|
|
2533
2544
|
return offset > 0 ? ((size - offset) >= minSize || isNaN(minSize)) : ((size - offset) <= maxSize || isNaN(maxSize));
|
|
2534
2545
|
}
|
|
@@ -2578,7 +2589,7 @@ const IgcDockManager = class {
|
|
|
2578
2589
|
const sizeProperty = parentPane.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'offsetWidth' : 'offsetHeight';
|
|
2579
2590
|
const sizeSum = paneComponents.reduce((s, p) => p[sizeProperty] + s, 0);
|
|
2580
2591
|
// If the new size is smaller or bigger that the size constraints, do not resize
|
|
2581
|
-
const offset = this.isPaneSizeWithinConstraints(previousPane, event.detail, parentPane.orientation, 'previous') && this.isPaneSizeWithinConstraints(nextPane, event.detail, parentPane.orientation) ? event.detail : 0;
|
|
2592
|
+
const offset = this.ignoreResizeConstraints || this.isPaneSizeWithinConstraints(previousPane, event.detail, parentPane.orientation, 'previous') && this.isPaneSizeWithinConstraints(nextPane, event.detail, parentPane.orientation) ? event.detail : 0;
|
|
2582
2593
|
let offsetPercentage = this.splitterOffset * offset / sizeSum;
|
|
2583
2594
|
let rtl = false;
|
|
2584
2595
|
if (this.element.dir !== '') {
|
|
@@ -3320,9 +3331,9 @@ const IgcDockManager = class {
|
|
|
3320
3331
|
index.h("slot", { name: pane.tabHeaderId }) :
|
|
3321
3332
|
index.h("span", { part: "header-title", title: pane.header }, pane.header)));
|
|
3322
3333
|
}
|
|
3323
|
-
renderSplitPane(splitPane, isFloating, isInDocumentHost) {
|
|
3334
|
+
renderSplitPane(splitPane, isFloating, isInDocumentHost, isRootPane = false) {
|
|
3324
3335
|
const panes = this.service.getSplitPaneVisibleChildren(splitPane);
|
|
3325
|
-
return (splitPane.allowEmpty || panes.length > 0) && (index.h("igc-split-pane-component", { key: splitPane.id, orientation: splitPane.orientation, size: splitPane.size, onRendered: this.handleSplitPaneRendered.bind(this, panes), ref: el => {
|
|
3336
|
+
return (splitPane.allowEmpty || panes.length > 0) && (index.h("igc-split-pane-component", { key: splitPane.id, orientation: splitPane.orientation, size: splitPane.size, shouldFillParent: this.ignoreResizeConstraints ? isRootPane : false, onRendered: this.handleSplitPaneRendered.bind(this, panes), ref: el => {
|
|
3326
3337
|
if (el) {
|
|
3327
3338
|
this.panesElementMap.set(splitPane, el);
|
|
3328
3339
|
}
|
|
@@ -3462,7 +3473,7 @@ const IgcDockManager = class {
|
|
|
3462
3473
|
this.tabHeadersMap = new Map();
|
|
3463
3474
|
this.unpinnedHeadersMap = new Map();
|
|
3464
3475
|
this.contentPanesElementMap = new Map();
|
|
3465
|
-
return (index.h(index.Host, { tabindex: "0", role: "group" }, this.renderButtonsTemplates(), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.left), index.h("div", { class: "pane-container--vertical", style: { position: this.maximizedPane ? 'absolute' : 'relative' } }, this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.top), index.h("div", { ref: el => this.dockedPanesContainer = el, class: "pane-container--horizontal", style: { position: this.maximizedPane ? 'absolute' : 'relative' } }, ((_a = this.layout) === null || _a === void 0 ? void 0 : _a.rootPane) && this.renderSplitPane(this.layout.rootPane, false, false), this.renderFlyoutPane(), this.renderDockingIndicators()), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.bottom)), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.right), this.renderFloatingPanes(), this.renderContextMenu(), this.renderPaneNavigator(), index.h("igc-trial-watermark", { text: "Trial version of Ignite UI", style: { 'z-index': '10005' } }), this.renderDropShadow()));
|
|
3476
|
+
return (index.h(index.Host, { tabindex: "0", role: "group" }, this.renderButtonsTemplates(), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.left), index.h("div", { class: "pane-container--vertical", style: { position: this.maximizedPane ? 'absolute' : 'relative' } }, this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.top), index.h("div", { ref: el => this.dockedPanesContainer = el, class: "pane-container--horizontal", style: { position: this.maximizedPane ? 'absolute' : 'relative' } }, ((_a = this.layout) === null || _a === void 0 ? void 0 : _a.rootPane) && this.renderSplitPane(this.layout.rootPane, false, false, true), this.renderFlyoutPane(), this.renderDockingIndicators()), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.bottom)), this.renderUnpinnedTabArea(locale.IgcUnpinnedLocation.right), this.renderFloatingPanes(), this.renderContextMenu(), this.renderPaneNavigator(), index.h("igc-trial-watermark", { text: "Trial version of Ignite UI", style: { 'z-index': '10005' } }), this.renderDropShadow()));
|
|
3466
3477
|
}
|
|
3467
3478
|
get element() { return index.getElement(this); }
|
|
3468
3479
|
static get watchers() { return {
|
|
@@ -4288,16 +4299,22 @@ const IgcSplitPaneComponent = class {
|
|
|
4288
4299
|
this.rendered = index.createEvent(this, "rendered", 7);
|
|
4289
4300
|
this.orientation = undefined;
|
|
4290
4301
|
this.size = undefined;
|
|
4302
|
+
this.shouldFillParent = false;
|
|
4291
4303
|
}
|
|
4292
4304
|
componentDidRender() {
|
|
4293
4305
|
this.rendered.emit();
|
|
4294
4306
|
}
|
|
4295
4307
|
render() {
|
|
4296
4308
|
const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
|
|
4297
|
-
return (index.h(index.Host, { role: "group", style:
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4309
|
+
return (index.h(index.Host, { role: "group", style: this.shouldFillParent
|
|
4310
|
+
? {
|
|
4311
|
+
width: `100%`,
|
|
4312
|
+
height: `100%`
|
|
4313
|
+
}
|
|
4314
|
+
: {
|
|
4315
|
+
flexDirection: this.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'row' : 'column',
|
|
4316
|
+
flex: `0 0 ${size}px`
|
|
4317
|
+
}, part: "split-pane" }));
|
|
4301
4318
|
}
|
|
4302
4319
|
};
|
|
4303
4320
|
IgcSplitPaneComponent.style = splitPaneComponentCss;
|
|
@@ -4472,17 +4489,6 @@ const IgcSplitterComponent = class {
|
|
|
4472
4489
|
this.dragOffset = 0;
|
|
4473
4490
|
}
|
|
4474
4491
|
}
|
|
4475
|
-
else {
|
|
4476
|
-
const referencePaneSize = !rtl || isVertical ? this.paneSizes[1] : this.paneSizes[0];
|
|
4477
|
-
if (referencePaneSize > IGC_RESIZING_MIN_SIZE) {
|
|
4478
|
-
if (referencePaneSize - this.dragOffset < IGC_RESIZING_MIN_SIZE) {
|
|
4479
|
-
this.dragOffset = referencePaneSize - IGC_RESIZING_MIN_SIZE;
|
|
4480
|
-
}
|
|
4481
|
-
}
|
|
4482
|
-
else {
|
|
4483
|
-
this.dragOffset = 0;
|
|
4484
|
-
}
|
|
4485
|
-
}
|
|
4486
4492
|
}
|
|
4487
4493
|
closestElement(selector, el) {
|
|
4488
4494
|
return ((el && el.closest(selector)) ||
|
|
@@ -4994,7 +5000,7 @@ const IgcUnpinnedPaneHeaderComponent = class {
|
|
|
4994
5000
|
};
|
|
4995
5001
|
IgcUnpinnedPaneHeaderComponent.style = unpinnedPaneHeaderComponentCss;
|
|
4996
5002
|
|
|
4997
|
-
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}";
|
|
5003
|
+
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}igc-dockmanager.sc-sample-component{margin:10px;border:1px solid black}";
|
|
4998
5004
|
|
|
4999
5005
|
/**
|
|
5000
5006
|
* @hidden
|
|
@@ -5317,98 +5323,212 @@ const SampleComponent = class {
|
|
|
5317
5323
|
}
|
|
5318
5324
|
]
|
|
5319
5325
|
};
|
|
5320
|
-
this.
|
|
5326
|
+
this.layout3 = {
|
|
5327
|
+
rootPane: {
|
|
5328
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5329
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5330
|
+
panes: [
|
|
5331
|
+
{
|
|
5332
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5333
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5334
|
+
size: 300,
|
|
5335
|
+
panes: [
|
|
5336
|
+
{
|
|
5337
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5338
|
+
contentId: 'content1',
|
|
5339
|
+
header: 'Content Pane 1',
|
|
5340
|
+
size: 500 // PIXELS
|
|
5341
|
+
},
|
|
5342
|
+
{
|
|
5343
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5344
|
+
contentId: 'content2',
|
|
5345
|
+
header: 'Content Pane 2',
|
|
5346
|
+
size: 300 // PIXELS
|
|
5347
|
+
},
|
|
5348
|
+
{
|
|
5349
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5350
|
+
contentId: 'content3',
|
|
5351
|
+
header: 'NOT USED',
|
|
5352
|
+
allowClose: false,
|
|
5353
|
+
allowMaximize: false,
|
|
5354
|
+
allowPinning: false
|
|
5355
|
+
}
|
|
5356
|
+
]
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5360
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5361
|
+
size: 450,
|
|
5362
|
+
panes: [
|
|
5363
|
+
{
|
|
5364
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5365
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5366
|
+
size: 450,
|
|
5367
|
+
panes: [
|
|
5368
|
+
{
|
|
5369
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5370
|
+
contentId: 'content4',
|
|
5371
|
+
header: 'Content Pane 4',
|
|
5372
|
+
size: 400 // PIXELS
|
|
5373
|
+
},
|
|
5374
|
+
{
|
|
5375
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5376
|
+
contentId: 'content5',
|
|
5377
|
+
header: 'Content Pane 5',
|
|
5378
|
+
size: 200 // PIXELS
|
|
5379
|
+
},
|
|
5380
|
+
{
|
|
5381
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5382
|
+
contentId: 'content6',
|
|
5383
|
+
header: 'NOT USED',
|
|
5384
|
+
allowClose: false,
|
|
5385
|
+
allowMaximize: false,
|
|
5386
|
+
allowPinning: false
|
|
5387
|
+
}
|
|
5388
|
+
]
|
|
5389
|
+
},
|
|
5390
|
+
{
|
|
5391
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5392
|
+
contentId: 'content7',
|
|
5393
|
+
header: 'Content Pane 7',
|
|
5394
|
+
size: 200 // PIXELS
|
|
5395
|
+
},
|
|
5396
|
+
{
|
|
5397
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5398
|
+
contentId: 'content8',
|
|
5399
|
+
header: 'NOT USED',
|
|
5400
|
+
allowClose: false,
|
|
5401
|
+
allowMaximize: false,
|
|
5402
|
+
allowPinning: false
|
|
5403
|
+
}
|
|
5404
|
+
]
|
|
5405
|
+
}
|
|
5406
|
+
]
|
|
5407
|
+
},
|
|
5408
|
+
floatingPanes: []
|
|
5409
|
+
};
|
|
5410
|
+
this.layout = this.layout3;
|
|
5321
5411
|
this.logEnabled = false;
|
|
5322
|
-
this.id = 100;
|
|
5323
|
-
this.foundElem = [];
|
|
5324
5412
|
this.hiddenPanes = [];
|
|
5325
5413
|
}
|
|
5326
|
-
|
|
5414
|
+
/*
|
|
5415
|
+
private hiddenPanesSelect: HTMLSelectElement;
|
|
5416
|
+
private savedLayout: string;
|
|
5417
|
+
|
|
5418
|
+
private saveLayout() {
|
|
5327
5419
|
this.savedLayout = JSON.stringify(this.dockManager.layout);
|
|
5328
5420
|
}
|
|
5329
|
-
|
|
5421
|
+
|
|
5422
|
+
private loadLayout() {
|
|
5330
5423
|
this.dockManager.layout = JSON.parse(this.savedLayout);
|
|
5331
5424
|
}
|
|
5332
|
-
|
|
5425
|
+
|
|
5426
|
+
private setActivePane() {
|
|
5333
5427
|
// this.dockManager.activePane = this.teamExplorerPane;
|
|
5334
5428
|
this.dockManager.activePane = this.unpinnedToolboxPane;
|
|
5335
5429
|
}
|
|
5336
|
-
|
|
5430
|
+
|
|
5431
|
+
private id = 100;
|
|
5432
|
+
private newId: string;
|
|
5433
|
+
|
|
5434
|
+
private addPane() {
|
|
5337
5435
|
this.newId = `content${this.id++}`;
|
|
5338
5436
|
const newDiv = this.createElement(this.newId, 'input');
|
|
5339
5437
|
this.dockManager.appendChild(newDiv);
|
|
5438
|
+
|
|
5340
5439
|
this.layout.floatingPanes[1].panes.push({
|
|
5341
|
-
type:
|
|
5440
|
+
type: IgcDockManagerPaneType.contentPane,
|
|
5342
5441
|
header: 'NewPane',
|
|
5343
5442
|
contentId: this.newId
|
|
5344
5443
|
});
|
|
5345
|
-
|
|
5444
|
+
|
|
5445
|
+
this.dockManager.layout = { ...this.layout };
|
|
5346
5446
|
}
|
|
5347
|
-
|
|
5348
|
-
|
|
5447
|
+
|
|
5448
|
+
private addTab() {
|
|
5449
|
+
this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
|
|
5450
|
+
|
|
5349
5451
|
this.newId = `content${this.id++}`;
|
|
5350
5452
|
const newDiv = this.createElement(this.newId, 'button');
|
|
5351
5453
|
this.dockManager.appendChild(newDiv);
|
|
5352
|
-
|
|
5454
|
+
|
|
5455
|
+
const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
|
|
5353
5456
|
tabGroupPane.panes.push({
|
|
5354
|
-
type:
|
|
5457
|
+
type: IgcDockManagerPaneType.contentPane,
|
|
5355
5458
|
header: 'NewTab',
|
|
5356
5459
|
contentId: this.newId
|
|
5357
5460
|
});
|
|
5358
|
-
|
|
5461
|
+
|
|
5462
|
+
this.dockManager.layout = { ...this.layout };
|
|
5359
5463
|
}
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5464
|
+
|
|
5465
|
+
private disableContentPane() {
|
|
5466
|
+
this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
|
|
5467
|
+
|
|
5468
|
+
const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
|
|
5363
5469
|
tabGroupPane.panes[0].disabled = true;
|
|
5364
|
-
this.dockManager.layout =
|
|
5470
|
+
this.dockManager.layout = { ...this.layout };
|
|
5365
5471
|
}
|
|
5366
|
-
|
|
5472
|
+
|
|
5473
|
+
private toggleProximityDock() {
|
|
5367
5474
|
this.dockManager.proximityDock = !this.dockManager.proximityDock;
|
|
5368
5475
|
}
|
|
5369
|
-
|
|
5476
|
+
|
|
5477
|
+
private focusPane() {
|
|
5370
5478
|
this.dockManager.focusPane('content12');
|
|
5371
5479
|
}
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
}
|
|
5480
|
+
|
|
5481
|
+
private foundElem: IgcDockManagerPane[] = [];
|
|
5482
|
+
private findElement(pane: IgcDockManagerPane, type: IgcDockManagerPaneType) {
|
|
5483
|
+
if (!pane) { return; }
|
|
5484
|
+
|
|
5376
5485
|
if (pane.type === type) {
|
|
5377
5486
|
this.foundElem.push(pane);
|
|
5378
5487
|
}
|
|
5379
|
-
|
|
5488
|
+
|
|
5489
|
+
if (pane.type === IgcDockManagerPaneType.tabGroupPane || pane.type === IgcDockManagerPaneType.splitPane) {
|
|
5380
5490
|
for (const c of pane.panes) {
|
|
5381
5491
|
this.findElement(c, type);
|
|
5382
5492
|
}
|
|
5383
5493
|
}
|
|
5384
|
-
|
|
5494
|
+
|
|
5495
|
+
if (pane.type === IgcDockManagerPaneType.documentHost) {
|
|
5385
5496
|
this.findElement(pane.rootPane, type);
|
|
5386
5497
|
}
|
|
5387
5498
|
}
|
|
5388
|
-
|
|
5499
|
+
|
|
5500
|
+
private showPane() {
|
|
5389
5501
|
const index = this.hiddenPanesSelect.selectedIndex;
|
|
5502
|
+
|
|
5390
5503
|
if (index >= 0) {
|
|
5391
5504
|
this.hiddenPanes[index].hidden = false;
|
|
5392
5505
|
this.hiddenPanes.splice(index, 1);
|
|
5393
5506
|
this.hiddenPanes = [...this.hiddenPanes];
|
|
5394
|
-
this.dockManager.layout =
|
|
5507
|
+
this.dockManager.layout = { ...this.dockManager.layout };
|
|
5395
5508
|
}
|
|
5396
5509
|
}
|
|
5397
|
-
|
|
5510
|
+
|
|
5511
|
+
private showAllPanes() {
|
|
5398
5512
|
if (this.hiddenPanes.length > 0) {
|
|
5399
5513
|
for (const pane of this.hiddenPanes) {
|
|
5400
5514
|
pane.hidden = false;
|
|
5401
5515
|
}
|
|
5402
5516
|
this.hiddenPanes = [];
|
|
5403
|
-
this.dockManager.layout =
|
|
5517
|
+
this.dockManager.layout = { ...this.dockManager.layout };
|
|
5404
5518
|
}
|
|
5405
5519
|
}
|
|
5406
|
-
|
|
5520
|
+
|
|
5521
|
+
private toggleInBoundaries() {
|
|
5407
5522
|
this.dockManager.containedInBoundaries = !this.dockManager.containedInBoundaries;
|
|
5408
5523
|
}
|
|
5409
|
-
|
|
5524
|
+
|
|
5525
|
+
// private toggleIgnoreResizeConstraints() {
|
|
5526
|
+
// this.dockManager.ignoreResizeConstraints = !this.dockManager.ignoreResizeConstraints;
|
|
5527
|
+
// }
|
|
5528
|
+
|
|
5529
|
+
private createElement(content: string, typeOfElement: string): HTMLElement {
|
|
5410
5530
|
const someContent = document.createTextNode(content);
|
|
5411
|
-
let elem;
|
|
5531
|
+
let elem: HTMLElement;
|
|
5412
5532
|
switch (typeOfElement) {
|
|
5413
5533
|
case ('button'):
|
|
5414
5534
|
elem = document.createElement('button');
|
|
@@ -5418,12 +5538,15 @@ const SampleComponent = class {
|
|
|
5418
5538
|
elem = document.createElement('input');
|
|
5419
5539
|
break;
|
|
5420
5540
|
}
|
|
5541
|
+
|
|
5421
5542
|
const divContent = document.createElement('div');
|
|
5422
5543
|
divContent.appendChild(elem ? elem : someContent);
|
|
5423
5544
|
divContent.setAttribute('slot', content);
|
|
5424
5545
|
divContent.setAttribute('style', 'width: 100%; height: 100%;');
|
|
5546
|
+
|
|
5425
5547
|
return divContent;
|
|
5426
5548
|
}
|
|
5549
|
+
*/
|
|
5427
5550
|
handlePaneClose(event) {
|
|
5428
5551
|
this.log(event);
|
|
5429
5552
|
if (this.hideOnCloseCheckbox.checked) {
|
|
@@ -5515,13 +5638,11 @@ const SampleComponent = class {
|
|
|
5515
5638
|
}
|
|
5516
5639
|
}
|
|
5517
5640
|
render() {
|
|
5518
|
-
return (index.h(index.Host, null, index.h("
|
|
5519
|
-
return (index.h("option", { value: p.id }, p.header));
|
|
5520
|
-
})), index.h("button", { onClick: () => this.showPane() }, "Show Pane"), index.h("button", { onClick: () => this.showAllPanes() }, "Show All Panes"), index.h("button", { onClick: () => this.toggleInBoundaries() }, "Toggle In Boundaries")), index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.bind(this), onPaneScroll: this.handlePaneScroll.bind(this), onPanePinnedToggle: this.handlePinnedToggle.bind(this), onActivePaneChanged: this.handleActivePaneChanged.bind(this), onPaneDragStart: this.handleDragStart.bind(this), onPaneDragOver: this.handleDragOver.bind(this), onPaneDragEnd: this.handleDragEnd.bind(this), onSplitterResizeStart: this.handleSplitterResizeStart.bind(this), onSplitterResizeEnd: this.handleSplitterResizeEnd.bind(this), onFloatingPaneResizeStart: this.handleFloatingPaneResizeStart.bind(this), onFloatingPaneResizeMove: this.handleFloatingPaneResizeMove.bind(this), onFloatingPaneResizeEnd: this.handleFloatingPaneResizeEnd.bind(this), onLayoutChange: this.handleLayoutChange.bind(this),
|
|
5641
|
+
return (index.h(index.Host, null, index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.bind(this), onPaneScroll: this.handlePaneScroll.bind(this), onPanePinnedToggle: this.handlePinnedToggle.bind(this), onActivePaneChanged: this.handleActivePaneChanged.bind(this), onPaneDragStart: this.handleDragStart.bind(this), onPaneDragOver: this.handleDragOver.bind(this), onPaneDragEnd: this.handleDragEnd.bind(this), onSplitterResizeStart: this.handleSplitterResizeStart.bind(this), onSplitterResizeEnd: this.handleSplitterResizeEnd.bind(this), onFloatingPaneResizeStart: this.handleFloatingPaneResizeStart.bind(this), onFloatingPaneResizeMove: this.handleFloatingPaneResizeMove.bind(this), onFloatingPaneResizeEnd: this.handleFloatingPaneResizeEnd.bind(this), onLayoutChange: this.handleLayoutChange.bind(this),
|
|
5521
5642
|
// resourceStrings={this.getCustomResourceStrings()}
|
|
5522
5643
|
ref: el => this.dockManager = el,
|
|
5523
5644
|
// allowFloatingPanesResize={false}
|
|
5524
|
-
showHeaderIconOnHover: 'closeOnly' }, index.h("div", { slot: "header1" }, index.h("span", { style: { color: 'red' } }, "Solution Explorer"), index.h("button", null, "H")), index.h("div", { slot: "tabHeader1" }, index.h("span", { style: { color: 'orange' } }, "Solution Explorer"), index.h("button", null, "T")), index.h("div", { slot: "unpinnedHeader1" }, index.h("span", { style: { color: 'blue' } }, "Solution Explorer"), index.h("button", null, "U")), index.h("button", { style: { background: 'pink' }, slot: "tabHeaderCloseButton" }, "Y"), index.h("div", { slot: "content1", style: { width: '100%', height: '100%' } }, "Content 1"), index.h("div", { slot: "content2", style: { width: '100%', height: '100%' } }, index.h("button", null, "Tests")), index.h("div", { slot: "content3", style: { width: '100%', height: '100%' } }
|
|
5645
|
+
showHeaderIconOnHover: 'closeOnly' }, index.h("div", { slot: "header1" }, index.h("span", { style: { color: 'red' } }, "Solution Explorer"), index.h("button", null, "H")), index.h("div", { slot: "tabHeader1" }, index.h("span", { style: { color: 'orange' } }, "Solution Explorer"), index.h("button", null, "T")), index.h("div", { slot: "unpinnedHeader1" }, index.h("span", { style: { color: 'blue' } }, "Solution Explorer"), index.h("button", null, "U")), index.h("button", { style: { background: 'pink' }, slot: "tabHeaderCloseButton" }, "Y"), index.h("div", { slot: "content1", style: { width: '100%', height: '100%' } }, "Content 1"), index.h("div", { slot: "content2", style: { width: '100%', height: '100%' } }, index.h("button", null, "Tests")), index.h("div", { slot: "content3", style: { width: '100%', height: '100%' } }), index.h("div", { slot: "content4" }, "Content 4"), index.h("div", { slot: "content5", style: { width: '100%', height: '100%' } }, "Content 5"), index.h("div", { slot: "content6", style: { width: '100%', height: '100%' } }, "Content 6"), index.h("div", { slot: "content7", style: { width: '100%', height: '100%' } }, "Content 7"), index.h("div", { slot: "content8" }, "Content 8"), index.h("div", { slot: "content9", style: { width: '100%', height: '100%' } }, "Content 9"), index.h("div", { slot: "content10", style: { width: '100%', height: '100%' } }, index.h("button", null, "Test")), index.h("div", { slot: "content11", style: { width: '100%', height: '100%' } }, index.h("input", null)), index.h("div", { slot: "content12", style: { width: '100%', height: '100%' } }, index.h("p", null, "Content 12 "), index.h("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ")), index.h("div", { slot: "content13", style: { width: '100%', height: '100%' } }, "Content 13"), index.h("div", { slot: "content14", style: { width: '100%', height: '100%' } }, "Content 14"), index.h("div", { slot: "toolboxHeader" }, index.h("span", null, "[U] Toolbox")), index.h("div", { slot: "teamExplorerHeader" }, index.h("span", null, "[U] Team Explorer")))));
|
|
5525
5646
|
}
|
|
5526
5647
|
};
|
|
5527
5648
|
SampleComponent.style = sampleComponentCss;
|