igniteui-dockmanager 1.7.0-beta.3 → 1.7.0-beta.4
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/CHANGELOG.md +4 -2
- package/dist/cjs/igc-button-component_20.cjs.entry.js +160 -96
- package/dist/cjs/igniteui-dockmanager.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/context-menu/context-menu-component.css +9 -4
- package/dist/collection/components/context-menu/context-menu-component.js +18 -6
- package/dist/collection/components/dockmanager/dockmanager-component.js +24 -5
- package/dist/collection/components/dockmanager/dockmanager.service.js +2 -2
- package/dist/collection/components/dockmanager/keyboard/keyboard.service.js +3 -0
- package/dist/collection/components/dockmanager/pane-navigator/pane-navigator-component.css +6 -2
- package/dist/collection/components/dockmanager/pane-navigator/pane-navigator-component.js +37 -14
- package/dist/collection/components/dockmanager/panes/content-pane-component.css +5 -0
- package/dist/collection/components/dockmanager/panes/content-pane-component.js +48 -2
- package/dist/collection/components/dockmanager/panes/pane-header-component.css +7 -2
- package/dist/collection/components/dockmanager/panes/pane-header-component.js +21 -4
- package/dist/collection/components/dockmanager/panes/unpinned-pane-header-component.css +8 -3
- package/dist/collection/components/dockmanager/panes/unpinned-pane-header-component.js +29 -4
- package/dist/collection/components/sample-component/sample-component.js +7 -0
- package/dist/collection/components/tabs/tab-header-component.css +10 -5
- package/dist/collection/components/tabs/tab-header-component.js +23 -8
- package/dist/collection/components/tabs/tab-panel-component.css +5 -0
- package/dist/collection/components/tabs/tab-panel-component.js +26 -1
- package/dist/collection/components/tabs/tabs-component.js +13 -6
- package/dist/collection/styles/igc.themes.css +4 -2
- package/dist/collection/utils/test-utils.js +1 -0
- package/dist/esm/igc-button-component_20.entry.js +160 -96
- package/dist/esm/igniteui-dockmanager.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/igc-button-component_20.entry.js +1 -1
- package/dist/esm-es5/igniteui-dockmanager.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
- package/dist/igniteui-dockmanager/p-39b8c082.entry.js +1 -0
- package/dist/igniteui-dockmanager/p-6efd2e0c.system.js +1 -1
- package/dist/igniteui-dockmanager/p-b37e8d03.system.entry.js +1 -0
- package/dist/igniteui-dockmanager/styles/igc.themes.css +4 -2
- package/dist/types/components/context-menu/context-menu-component.d.ts +1 -0
- package/dist/types/components/dockmanager/dockmanager-component.d.ts +1 -0
- package/dist/types/components/dockmanager/dockmanager.interfaces.d.ts +2 -0
- package/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts +12 -4
- package/dist/types/components/dockmanager/pane-navigator/pane-navigator-component.d.ts +2 -4
- package/dist/types/components/dockmanager/panes/content-pane-component.d.ts +2 -0
- package/dist/types/components/dockmanager/panes/pane-header-component.d.ts +1 -0
- package/dist/types/components/dockmanager/panes/unpinned-pane-header-component.d.ts +1 -0
- package/dist/types/components/sample-component/sample-component.d.ts +1 -0
- package/dist/types/components/tabs/tab-header-component.d.ts +1 -0
- package/dist/types/components/tabs/tab-panel-component.d.ts +1 -0
- package/dist/types/components.d.ts +14 -0
- package/dist/types/utils/test-utils.d.ts +1 -0
- package/loader/cdn.js +2 -2
- package/loader/index.cjs.js +2 -2
- package/package.json +1 -1
- package/dist/igniteui-dockmanager/p-e4f72d14.system.entry.js +0 -1
- package/dist/igniteui-dockmanager/p-e8ad91c2.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,10 @@ All notable changes for each version of this project will be documented in this
|
|
|
6
6
|
|
|
7
7
|
### New features
|
|
8
8
|
- Customizable floating pane header
|
|
9
|
-
-
|
|
10
|
-
- `
|
|
9
|
+
- `disabled` property per pane [#23](https://github.com/IgniteUI/igniteui-dockmanager/issues/23)
|
|
10
|
+
- `documentOnly` property which allows content pane to be docked only inside a document host
|
|
11
|
+
- `allowEmpty` property for split and tab group panes which allows displaying empty areas [#18](https://github.com/IgniteUI/igniteui-dockmanager/issues/18)
|
|
12
|
+
- `disableKeyboardNavigation` property on the dock manager [#22](https://github.com/IgniteUI/igniteui-dockmanager/issues/22)
|
|
11
13
|
|
|
12
14
|
### Bug fixes
|
|
13
15
|
- Docking indicators appear over the currently dragged floating pane
|
|
@@ -17,6 +17,44 @@ let IgcButtonComponent = class {
|
|
|
17
17
|
};
|
|
18
18
|
IgcButtonComponent.style = buttonComponentCss;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
class Utils {
|
|
24
|
+
static isDockingIndicatorVertical(position) {
|
|
25
|
+
return position === locale.IgcDockingIndicatorPosition.top ||
|
|
26
|
+
position === locale.IgcDockingIndicatorPosition.bottom ||
|
|
27
|
+
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
28
|
+
position === locale.IgcDockingIndicatorPosition.outerBottom;
|
|
29
|
+
}
|
|
30
|
+
static isDockingIndicatorBefore(position) {
|
|
31
|
+
return position === locale.IgcDockingIndicatorPosition.top ||
|
|
32
|
+
position === locale.IgcDockingIndicatorPosition.left ||
|
|
33
|
+
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
34
|
+
position === locale.IgcDockingIndicatorPosition.outerLeft;
|
|
35
|
+
}
|
|
36
|
+
static isDockingIndicatorOuter(position) {
|
|
37
|
+
return position === locale.IgcDockingIndicatorPosition.outerLeft ||
|
|
38
|
+
position === locale.IgcDockingIndicatorPosition.outerRight ||
|
|
39
|
+
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
40
|
+
position === locale.IgcDockingIndicatorPosition.outerBottom;
|
|
41
|
+
}
|
|
42
|
+
static isSplitPaneVertical(splitPane) {
|
|
43
|
+
return splitPane.orientation === locale.IgcSplitPaneOrientation.vertical;
|
|
44
|
+
}
|
|
45
|
+
static isAltPressed(event) {
|
|
46
|
+
return event.altKey || event.getModifierState('Alt') || event.getModifierState('AltGraph');
|
|
47
|
+
}
|
|
48
|
+
static isControlOrMetaPressed(event) {
|
|
49
|
+
return event.ctrlKey || event.metaKey || event.getModifierState('Meta') || event.getModifierState('OS');
|
|
50
|
+
}
|
|
51
|
+
static partNameMap(partNameInfo, delimiter = ' ') {
|
|
52
|
+
return Object.keys(partNameInfo)
|
|
53
|
+
.filter(key => partNameInfo[key])
|
|
54
|
+
.join(delimiter);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
20
58
|
/**
|
|
21
59
|
* @hidden
|
|
22
60
|
*/
|
|
@@ -62,23 +100,30 @@ var IgcPinBehavior;
|
|
|
62
100
|
IgcPinBehavior["selectedPane"] = "selectedPane";
|
|
63
101
|
})(IgcPinBehavior || (IgcPinBehavior = {}));
|
|
64
102
|
|
|
65
|
-
const contentPaneComponentCss = ":host{--min-pane-size:0px;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;width:100%;height:100%;min-width:var(--min-pane-size);min-height:var(--min-pane-size);-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:all}:host(:focus){outline-style:none}";
|
|
103
|
+
const contentPaneComponentCss = ":host{--min-pane-size:0px;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;width:100%;height:100%;min-width:var(--min-pane-size);min-height:var(--min-pane-size);-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:all}:host(:focus){outline-style:none}:host([part~=disabled]:not([part~=single-floating])),:host([part~=disabled])>slot:not([name]){pointer-events:none}";
|
|
66
104
|
|
|
67
105
|
let IgcContentPaneComponent = class {
|
|
68
106
|
constructor(hostRef) {
|
|
69
107
|
index.registerInstance(this, hostRef);
|
|
108
|
+
this.disabled = false;
|
|
109
|
+
this.isSingleFloating = false;
|
|
70
110
|
}
|
|
71
111
|
render() {
|
|
72
112
|
const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
|
|
73
113
|
const unpinnedSize = this.unpinnedSize ? this.unpinnedSize : IGC_DEFAULT_UNPIN_PANE_SIZE;
|
|
74
|
-
|
|
114
|
+
const parts = Utils.partNameMap({
|
|
115
|
+
'content-pane': true,
|
|
116
|
+
disabled: this.disabled,
|
|
117
|
+
'single-floating': this.isSingleFloating
|
|
118
|
+
});
|
|
119
|
+
return (index.h(index.Host, { role: "group", "aria-label": this.header, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, style: {
|
|
75
120
|
flex: this.isFlyout ? `0 1 ${unpinnedSize}px` : `${size} 1 ${size}px`
|
|
76
|
-
}, part:
|
|
121
|
+
}, part: parts }, index.h("slot", { name: "header" }), index.h("slot", null)));
|
|
77
122
|
}
|
|
78
123
|
};
|
|
79
124
|
IgcContentPaneComponent.style = contentPaneComponentCss;
|
|
80
125
|
|
|
81
|
-
const contextMenuComponentCss = ":host{position:absolute;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;bottom:0;right:0;z-index:10002;pointer-events:none}:host igc-icon-component svg{width:17px;height:17px}:host igc-icon-component{margin-left:8px}
|
|
126
|
+
const contextMenuComponentCss = ":host{position:absolute;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;bottom:0;right:0;z-index:10002;pointer-events:none}:host igc-icon-component svg{width:17px;height:17px}:host igc-icon-component{margin-left:8px}[part=menu-content]{position:absolute;visibility:hidden;color:var(--igc-context-menu-color, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-context-menu-background, var(--igc-accent-color, #fff));border:1px solid var(--igc-context-menu-background, var(--igc-accent-color, #fff));font-size:0.75em;line-height:1.7;pointer-events:all;-webkit-box-shadow:0 5px 22px rgba(0, 0, 0, 0.08), 0 12px 17px 2px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.26);box-shadow:0 5px 22px rgba(0, 0, 0, 0.08), 0 12px 17px 2px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.26)}[part~=menu-item]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:6px 8px;cursor:pointer;-webkit-transition:background 0.25s ease-out, color 0.25s ease-out;transition:background 0.25s ease-out, color 0.25s ease-out;outline-style:none}[part~=menu-item]:hover{background:var(--igc-context-menu-background-active, var(--igc-border-color, #F3F5F7));color:var(--igc-context-menu-color-active, #000)}[part~=menu-item]:focus{background:var(--igc-context-menu-background-active, var(--igc-border-color, #F3F5F7));color:var(--igc-context-menu-color-active, #000)}[part~=disabled]{pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
82
127
|
|
|
83
128
|
let IgcContextMenuComponent = class {
|
|
84
129
|
constructor(hostRef) {
|
|
@@ -124,11 +169,12 @@ let IgcContextMenuComponent = class {
|
|
|
124
169
|
this.focusItemAndSetActiveIndex();
|
|
125
170
|
}
|
|
126
171
|
focusItemAndSetActiveIndex() {
|
|
127
|
-
|
|
128
|
-
firstMenuItem.
|
|
172
|
+
var _a;
|
|
173
|
+
const firstMenuItem = this.menuItemsDiv.querySelector('div[part="menu-item"]');
|
|
174
|
+
(_a = firstMenuItem) === null || _a === void 0 ? void 0 : _a.focus();
|
|
129
175
|
}
|
|
130
176
|
handleKeyboardEvents(item, ev) {
|
|
131
|
-
const menuItemChildren = this.menuItemsDiv.
|
|
177
|
+
const menuItemChildren = this.menuItemsDiv.querySelectorAll('div[part="menu-item"]');
|
|
132
178
|
if (ev.key === 'ArrowDown') {
|
|
133
179
|
if (this.activeIndex < menuItemChildren.length - 1) {
|
|
134
180
|
this.activeIndex++;
|
|
@@ -149,9 +195,19 @@ let IgcContextMenuComponent = class {
|
|
|
149
195
|
this.emitMenuClosed();
|
|
150
196
|
}
|
|
151
197
|
}
|
|
198
|
+
handleMenuItemClick(item) {
|
|
199
|
+
item.clickHandler();
|
|
200
|
+
this.emitMenuClosed();
|
|
201
|
+
}
|
|
152
202
|
render() {
|
|
153
|
-
return (index.h(index.Host, {
|
|
154
|
-
|
|
203
|
+
return (index.h(index.Host, { exportparts: "menu-content: context-menu, menu-item: context-menu-item" }, index.h("div", { role: "menu", part: "menu-content", ref: el => this.menuItemsDiv = el, onMouseDown: ev => {
|
|
204
|
+
ev.preventDefault();
|
|
205
|
+
} }, this.items.map(item => {
|
|
206
|
+
const parts = Utils.partNameMap({
|
|
207
|
+
'menu-item': true,
|
|
208
|
+
disabled: item.disabled
|
|
209
|
+
});
|
|
210
|
+
return (index.h("div", { role: "menuitem", part: parts, tabindex: "-1", onKeyDown: this.handleKeyboardEvents.bind(this, item), onClick: this.handleMenuItemClick.bind(this, item) }, index.h("span", { style: {
|
|
155
211
|
flexGrow: '1',
|
|
156
212
|
userSelect: 'none',
|
|
157
213
|
} }, item.displayText), item.iconName !== null &&
|
|
@@ -195,44 +251,6 @@ class TwoWayMap {
|
|
|
195
251
|
}
|
|
196
252
|
}
|
|
197
253
|
|
|
198
|
-
/**
|
|
199
|
-
* @hidden
|
|
200
|
-
*/
|
|
201
|
-
class Utils {
|
|
202
|
-
static isDockingIndicatorVertical(position) {
|
|
203
|
-
return position === locale.IgcDockingIndicatorPosition.top ||
|
|
204
|
-
position === locale.IgcDockingIndicatorPosition.bottom ||
|
|
205
|
-
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
206
|
-
position === locale.IgcDockingIndicatorPosition.outerBottom;
|
|
207
|
-
}
|
|
208
|
-
static isDockingIndicatorBefore(position) {
|
|
209
|
-
return position === locale.IgcDockingIndicatorPosition.top ||
|
|
210
|
-
position === locale.IgcDockingIndicatorPosition.left ||
|
|
211
|
-
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
212
|
-
position === locale.IgcDockingIndicatorPosition.outerLeft;
|
|
213
|
-
}
|
|
214
|
-
static isDockingIndicatorOuter(position) {
|
|
215
|
-
return position === locale.IgcDockingIndicatorPosition.outerLeft ||
|
|
216
|
-
position === locale.IgcDockingIndicatorPosition.outerRight ||
|
|
217
|
-
position === locale.IgcDockingIndicatorPosition.outerTop ||
|
|
218
|
-
position === locale.IgcDockingIndicatorPosition.outerBottom;
|
|
219
|
-
}
|
|
220
|
-
static isSplitPaneVertical(splitPane) {
|
|
221
|
-
return splitPane.orientation === locale.IgcSplitPaneOrientation.vertical;
|
|
222
|
-
}
|
|
223
|
-
static isAltPressed(event) {
|
|
224
|
-
return event.altKey || event.getModifierState('Alt') || event.getModifierState('AltGraph');
|
|
225
|
-
}
|
|
226
|
-
static isControlOrMetaPressed(event) {
|
|
227
|
-
return event.ctrlKey || event.metaKey || event.getModifierState('Meta') || event.getModifierState('OS');
|
|
228
|
-
}
|
|
229
|
-
static partNameMap(partNameInfo, delimiter = ' ') {
|
|
230
|
-
return Object.keys(partNameInfo)
|
|
231
|
-
.filter(key => partNameInfo[key])
|
|
232
|
-
.join(delimiter);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
254
|
/**
|
|
237
255
|
* @hidden
|
|
238
256
|
*/
|
|
@@ -1528,10 +1546,10 @@ class IgcDockManagerService {
|
|
|
1528
1546
|
this.forceDragTabHeader = pane;
|
|
1529
1547
|
}
|
|
1530
1548
|
cacheDocumentsOrder() {
|
|
1531
|
-
this.documentsCache =
|
|
1549
|
+
this.documentsCache = this.visibleDocuments.filter(c => !c.disabled);
|
|
1532
1550
|
}
|
|
1533
1551
|
cacheContentPanesOrder() {
|
|
1534
|
-
this.contentPanesCache =
|
|
1552
|
+
this.contentPanesCache = this.visibleContentPanes.filter(c => !c.disabled);
|
|
1535
1553
|
}
|
|
1536
1554
|
focusPrevContentPane(isInDocHost) {
|
|
1537
1555
|
const contentPanesCache = isInDocHost ? this.documentsCache : this.contentPanesCache;
|
|
@@ -1561,6 +1579,9 @@ class IgcDockManagerKeyboardService {
|
|
|
1561
1579
|
this.service = service;
|
|
1562
1580
|
}
|
|
1563
1581
|
handleKeydown(event) {
|
|
1582
|
+
if (this.service.dockManager.disableKeyboardNavigation) {
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1564
1585
|
const activePane = this.service.dockManager.activePane;
|
|
1565
1586
|
const ctrlOrMetaKey = Utils.isControlOrMetaPressed(event);
|
|
1566
1587
|
const altKey = Utils.isAltPressed(event);
|
|
@@ -1722,6 +1743,7 @@ let IgcDockManager = class {
|
|
|
1722
1743
|
this.floatingPaneZIndicesMap = new Map();
|
|
1723
1744
|
this.allowMaximize = true;
|
|
1724
1745
|
this.allowFloatingPanesResize = true;
|
|
1746
|
+
this.disableKeyboardNavigation = false;
|
|
1725
1747
|
this.activePane = null;
|
|
1726
1748
|
this.handleCustomContentFocusIn = (eventArgs) => {
|
|
1727
1749
|
const parent = eventArgs.currentTarget;
|
|
@@ -2328,14 +2350,14 @@ let IgcDockManager = class {
|
|
|
2328
2350
|
const maximized = this.maximizedPane === pane ||
|
|
2329
2351
|
(parentPane.type === locale.IgcDockManagerPaneType.tabGroupPane && this.maximizedPane === parentPane) ||
|
|
2330
2352
|
isFloating && isSingleFloatingContentPane && floatingPane === this.maximizedPane;
|
|
2331
|
-
return (index.h("igc-content-pane-component", { key: pane.id, size: pane.size, isFlyout: isFlyout, unpinnedSize: pane.unpinnedSize, ref: el => {
|
|
2353
|
+
return (index.h("igc-content-pane-component", { key: pane.id, size: pane.size, isFlyout: isFlyout, unpinnedSize: pane.unpinnedSize, disabled: pane.disabled, isSingleFloating: isSingleFloatingContentPane, ref: el => {
|
|
2332
2354
|
if (el) {
|
|
2333
2355
|
this.panesElementMap.set(pane, el);
|
|
2334
2356
|
this.contentPanesElementMap.set(pane, el);
|
|
2335
2357
|
}
|
|
2336
2358
|
}, class: {
|
|
2337
2359
|
'maximized': this.maximizedPane === pane
|
|
2338
|
-
}, header: pane.header, onFocusin: this.handleContentPaneFocus.bind(this, pane) }, index.h("igc-pane-header-component", { slot: "header", pane: pane, isActive: pane === this.activePane, pinned: this.service.getActualIsPinned(pane), allowMaximize: this.resolveAllowMaximize(pane), maximized: maximized, allowClose: this.service.getActualAllowClose(pane), allowPinning: pane.allowPinning !== false, isFloating: isFloating, forcedDrag: forceDrag, resourceStrings: this.resourceStrings, onPinToggle: this.handlePinToggle.bind(this, pane), onMaximize: this.handleMaximize.bind(this, pane), onDragMoved: this.handlePaneDragMove.bind(this), onDragStarted: this.handlePaneDragStart.bind(this, isSingleFloatingContentPane ? floatingPane : pane), onDragEnded: this.handlePaneDragEnd.bind(this), onClose: this.handlePaneClose.bind(this, pane), onElementConnected: this.emitPaneHeaderConnected.bind(this, pane), onElementDisconnected: this.emitPaneHeaderDisconnected.bind(this, pane), onMouseDown: this.handlePaneHeaderMouseDown.bind(this, pane) }, (isFloating && pane.floatingHeaderId) ? index.h("slot", { name: pane.floatingHeaderId }) :
|
|
2360
|
+
}, header: pane.header, onFocusin: this.handleContentPaneFocus.bind(this, pane) }, index.h("igc-pane-header-component", { slot: "header", pane: pane, isActive: pane === this.activePane, disabled: pane.disabled && !isSingleFloatingContentPane, pinned: this.service.getActualIsPinned(pane), allowMaximize: this.resolveAllowMaximize(pane), maximized: maximized, allowClose: this.service.getActualAllowClose(pane), allowPinning: pane.allowPinning !== false, isFloating: isFloating, forcedDrag: forceDrag, resourceStrings: this.resourceStrings, onPinToggle: this.handlePinToggle.bind(this, pane), onMaximize: this.handleMaximize.bind(this, pane), onDragMoved: this.handlePaneDragMove.bind(this), onDragStarted: this.handlePaneDragStart.bind(this, isSingleFloatingContentPane ? floatingPane : pane), onDragEnded: this.handlePaneDragEnd.bind(this), onClose: this.handlePaneClose.bind(this, pane), onElementConnected: this.emitPaneHeaderConnected.bind(this, pane), onElementDisconnected: this.emitPaneHeaderDisconnected.bind(this, pane), onMouseDown: this.handlePaneHeaderMouseDown.bind(this, pane) }, (isFloating && pane.floatingHeaderId) ? index.h("slot", { name: pane.floatingHeaderId }) :
|
|
2339
2361
|
pane.headerId ? index.h("slot", { name: pane.headerId }) :
|
|
2340
2362
|
pane.header), index.h("div", { class: "content", onMouseDown: this.handlePaneContentMouseDown.bind(this, pane) }, index.h("slot", { name: pane.contentId }))));
|
|
2341
2363
|
}
|
|
@@ -2375,7 +2397,7 @@ let IgcDockManager = class {
|
|
|
2375
2397
|
index.h("igc-button-component", { slot: "tabHeaderIcon", onClick: this.handleMaximize.bind(this, pane), onFocus: this.clearActivePane.bind(this) }, index.h("igc-icon-component", { name: this.maximizedPane === pane ? 'minimize' : 'maximize', "aria-label": this.maximizedPane ? this.resourceStrings.minimize : this.resourceStrings.maximize, title: this.maximizedPane ? this.resourceStrings.minimize : this.resourceStrings.maximize }))));
|
|
2376
2398
|
}
|
|
2377
2399
|
renderTabPanel(pane, isInDocumentHost, isFloating) {
|
|
2378
|
-
return (index.h("igc-tab-panel-component", { key: pane.id, onMouseDown: isInDocumentHost ? this.handlePaneContentMouseDown.bind(this, pane) : null, onSelectedChanged: this.handleTabSelectedChanged.bind(this, pane) }, isInDocumentHost ?
|
|
2400
|
+
return (index.h("igc-tab-panel-component", { key: pane.id, disabled: pane.disabled, onMouseDown: isInDocumentHost ? this.handlePaneContentMouseDown.bind(this, pane) : null, onSelectedChanged: this.handleTabSelectedChanged.bind(this, pane) }, isInDocumentHost ?
|
|
2379
2401
|
index.h("slot", { name: pane.contentId }) :
|
|
2380
2402
|
this.renderContentPane(pane, isFloating, false)));
|
|
2381
2403
|
}
|
|
@@ -2392,7 +2414,7 @@ let IgcDockManager = class {
|
|
|
2392
2414
|
this.service.forceDragTabHeader = null;
|
|
2393
2415
|
forceDrag = true;
|
|
2394
2416
|
}
|
|
2395
|
-
return (index.h("igc-tab-header-component", { key: pane.id, slot: "tabHeader", isActive: pane === this.activePane, header: pane.header, resourceStrings: this.resourceStrings, onDragStarted: this.handleTabHeaderDragStart.bind(this, pane), onDragMoved: this.handleTabHeaderDragMove.bind(this, pane), onDragEnded: this.handleTabHeaderDragEnd.bind(this, pane), onMouseDown: this.handleTabHeaderMouseDown.bind(this, pane), onIconKeyDown: this.handleTabIconKeyDown.bind(this, iconName, pane), position: position, onIconClicked: this.handleTabIconClick.bind(this, pane, position, isFloating), iconName: iconName, forcedDrag: forceDrag, onElementConnected: this.emitTabHeaderConnected.bind(this, pane), onElementDisconnected: this.emitTabHeaderDisconnected.bind(this, pane), ref: el => {
|
|
2417
|
+
return (index.h("igc-tab-header-component", { key: pane.id, slot: "tabHeader", isActive: pane === this.activePane, disabled: pane.disabled, header: pane.header, resourceStrings: this.resourceStrings, onDragStarted: this.handleTabHeaderDragStart.bind(this, pane), onDragMoved: this.handleTabHeaderDragMove.bind(this, pane), onDragEnded: this.handleTabHeaderDragEnd.bind(this, pane), onMouseDown: this.handleTabHeaderMouseDown.bind(this, pane), onIconKeyDown: this.handleTabIconKeyDown.bind(this, iconName, pane), position: position, onIconClicked: this.handleTabIconClick.bind(this, pane, position, isFloating), iconName: iconName, forcedDrag: forceDrag, onElementConnected: this.emitTabHeaderConnected.bind(this, pane), onElementDisconnected: this.emitTabHeaderDisconnected.bind(this, pane), ref: el => {
|
|
2396
2418
|
if (el) {
|
|
2397
2419
|
this.tabHeadersMap.set(pane, el);
|
|
2398
2420
|
}
|
|
@@ -2446,7 +2468,7 @@ let IgcDockManager = class {
|
|
|
2446
2468
|
'unpinned-tab-area--horizontal': isHorizontal,
|
|
2447
2469
|
'unpinned-tab-area--hidden': panes.length === 0
|
|
2448
2470
|
};
|
|
2449
|
-
return (index.h("div", { class: tabAreaClasses, role: "tablist", "aria-orientation": isHorizontal ? 'horizontal' : 'vertical' }, panes.map(p => (index.h("igc-unpinned-pane-header-component", { location: location, isActive: p === this.activePane, onMouseDown: this.handleUnpinnedTabMouseDown.bind(this, p), onKeyDown: this.handleUnpinnedTabKeyDown.bind(this, p), onFocus: this.handleUnpinnedHeaderFocus.bind(this, p), ref: el => {
|
|
2471
|
+
return (index.h("div", { class: tabAreaClasses, role: "tablist", "aria-orientation": isHorizontal ? 'horizontal' : 'vertical' }, panes.map(p => (index.h("igc-unpinned-pane-header-component", { location: location, isActive: p === this.activePane, disabled: p.disabled, onMouseDown: this.handleUnpinnedTabMouseDown.bind(this, p), onKeyDown: this.handleUnpinnedTabKeyDown.bind(this, p), onFocus: this.handleUnpinnedHeaderFocus.bind(this, p), ref: el => {
|
|
2450
2472
|
if (el) {
|
|
2451
2473
|
this.unpinnedHeadersMap.set(p, el);
|
|
2452
2474
|
}
|
|
@@ -2982,7 +3004,7 @@ class IgcDragService {
|
|
|
2982
3004
|
}
|
|
2983
3005
|
}
|
|
2984
3006
|
|
|
2985
|
-
const paneHeaderComponentCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:4px 8px;font-size:14px;font-weight:400;color:var(--igc-pane-header-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pane-header-background, var(--igc-background-color, #E5E7E9));min-height:40px}:host igc-icon-component svg{width:17px;height:17px}:host(
|
|
3007
|
+
const paneHeaderComponentCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:4px 8px;font-size:14px;font-weight:400;color:var(--igc-pane-header-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pane-header-background, var(--igc-background-color, #E5E7E9));min-height:40px}:host igc-icon-component svg{width:17px;height:17px}:host([part~=window]){border-bottom:1px solid var(--igc-border-color, #F3F5F7);min-height:auto}.header-text{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1 1 100%;flex:1 1 100%;line-height:2.3}.header-actions{display:-ms-flexbox;display:flex}.header-actions igc-button-component+igc-button-component{margin-left:4px}:host([part~=active]){-webkit-box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue);box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue);color:var(--igc-active-color, cornflowerblue)}:host([part~=disabled]){pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
2986
3008
|
|
|
2987
3009
|
let IgcPaneHeaderComponent = class {
|
|
2988
3010
|
constructor(hostRef) {
|
|
@@ -2998,6 +3020,7 @@ let IgcPaneHeaderComponent = class {
|
|
|
2998
3020
|
this.allowClose = true;
|
|
2999
3021
|
this.allowMaximize = true;
|
|
3000
3022
|
this.allowPinning = true;
|
|
3023
|
+
this.disabled = false;
|
|
3001
3024
|
this.pinButtonClick = () => {
|
|
3002
3025
|
this.pinToggle.emit();
|
|
3003
3026
|
};
|
|
@@ -3040,6 +3063,7 @@ let IgcPaneHeaderComponent = class {
|
|
|
3040
3063
|
render() {
|
|
3041
3064
|
const commonParts = {
|
|
3042
3065
|
active: this.isActive,
|
|
3066
|
+
disabled: this.disabled,
|
|
3043
3067
|
floating: this.isFloating,
|
|
3044
3068
|
window: this.isFloatingPaneHeader,
|
|
3045
3069
|
};
|
|
@@ -3047,10 +3071,7 @@ let IgcPaneHeaderComponent = class {
|
|
|
3047
3071
|
const paneHeaderContentParts = Utils.partNameMap(Object.assign({ 'pane-header-content': true }, commonParts));
|
|
3048
3072
|
const paneHeaderActionsParts = Utils.partNameMap(Object.assign({ 'pane-header-actions': true }, commonParts));
|
|
3049
3073
|
const exportParts = Utils.partNameMap(Object.assign({ 'pane-header-actions': true, 'pane-header-content': true }, commonParts), ',');
|
|
3050
|
-
return (index.h(index.Host, { class: {
|
|
3051
|
-
'floating-pane-header': this.isFloatingPaneHeader,
|
|
3052
|
-
'active': this.isActive
|
|
3053
|
-
}, part: paneHeaderParts, exportparts: exportParts }, index.h("div", { part: paneHeaderContentParts, class: "header-text" }, index.h("slot", null)), index.h("div", { part: paneHeaderActionsParts, class: "header-actions" }, this.allowPinning &&
|
|
3074
|
+
return (index.h(index.Host, { part: paneHeaderParts, exportparts: exportParts }, index.h("div", { part: paneHeaderContentParts, class: "header-text" }, index.h("slot", null)), index.h("div", { part: paneHeaderActionsParts, class: "header-actions" }, this.allowPinning &&
|
|
3054
3075
|
index.h("igc-button-component", { onClick: this.pinButtonClick, style: { display: this.isFloating ? 'none' : 'flex' } }, index.h("igc-icon-component", { name: this.pinned ? 'unpin' : 'pin', "aria-label": this.pinned ? this.resourceStrings.unpin : this.resourceStrings.pin, title: this.pinned ? this.resourceStrings.unpin : this.resourceStrings.pin })), this.allowMaximize &&
|
|
3055
3076
|
index.h("igc-button-component", { name: "maximize", onClick: this.maximizeButtonClick }, index.h("igc-icon-component", { name: this.maximized ? 'minimize' : 'maximize', "aria-label": this.maximized ? this.resourceStrings.minimize : this.resourceStrings.maximize, title: this.maximized ? this.resourceStrings.minimize : this.resourceStrings.maximize })), this.allowClose &&
|
|
3056
3077
|
index.h("igc-button-component", { onClick: this.closeButtonClick }, index.h("igc-icon-component", { name: "close", "aria-label": this.resourceStrings.close, title: this.resourceStrings.close })))));
|
|
@@ -3062,7 +3083,7 @@ let IgcPaneHeaderComponent = class {
|
|
|
3062
3083
|
};
|
|
3063
3084
|
IgcPaneHeaderComponent.style = paneHeaderComponentCss;
|
|
3064
3085
|
|
|
3065
|
-
const paneNavigatorComponentCss = ":host,:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;height:100%;z-index:10002}.pane-navigator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));width:350px;height:auto;max-height:336px;overflow:hidden;line-height:24px;z-index:10002;-webkit-box-shadow:0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.26);box-shadow:0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.26)}.pane-navigator:focus{outline-style:none}header{background:var(--igc-background-color, #E5E7E9);min-height:40px;height:40px}header h3{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:unset;font-size:0.875em;padding:8px}.body{display:-ms-flexbox;display:flex;overflow:auto}.group{display:-ms-flexbox;display:flex;-ms-flex:1 0 50%;flex:1 0 50%;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:16px}.title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:-webkit-sticky;position:sticky;top:0;background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));font-size:0.875em;margin:unset;-ms-flex-negative:0;flex-shrink:0}.items{overflow:auto;scrollbar-width:none}.items::-webkit-scrollbar{display:none}
|
|
3086
|
+
const paneNavigatorComponentCss = ":host,:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;height:100%;z-index:10002}.pane-navigator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));width:350px;height:auto;max-height:336px;overflow:hidden;line-height:24px;z-index:10002;-webkit-box-shadow:0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.26);box-shadow:0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.26)}.pane-navigator:focus{outline-style:none}header{background:var(--igc-background-color, #E5E7E9);min-height:40px;height:40px}header h3{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:unset;font-size:0.875em;padding:8px}.body{display:-ms-flexbox;display:flex;overflow:auto}.group{display:-ms-flexbox;display:flex;-ms-flex:1 0 50%;flex:1 0 50%;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:16px}.title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:-webkit-sticky;position:sticky;top:0;background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));font-size:0.875em;margin:unset;-ms-flex-negative:0;flex-shrink:0}.items{overflow:auto;scrollbar-width:none}.items::-webkit-scrollbar{display:none}[part~=item]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;font-size:16px;padding:8px 0}[part~=item][part~=selected]{color:var(--igc-active-color, cornflowerblue)}[part~=item][part~=disabled]{pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
3066
3087
|
|
|
3067
3088
|
let IgcPaneNavigatorComponent = class {
|
|
3068
3089
|
constructor(hostRef) {
|
|
@@ -3104,11 +3125,11 @@ let IgcPaneNavigatorComponent = class {
|
|
|
3104
3125
|
}
|
|
3105
3126
|
if (this.selectedIndex >= 0 && this.selectedIndex < this.activePanes.length) {
|
|
3106
3127
|
index = this.selectedIndex + this.activePanes.length;
|
|
3107
|
-
this.
|
|
3128
|
+
this.navigateToIndex(index >= this.allItems.length ? this.allItems.length - 1 : index, 'next');
|
|
3108
3129
|
}
|
|
3109
3130
|
else if (this.selectedIndex >= this.activePanes.length && this.selectedIndex < this.allItems.length) {
|
|
3110
3131
|
index = this.selectedIndex - this.activePanes.length;
|
|
3111
|
-
this.
|
|
3132
|
+
this.navigateToIndex(index > this.activePanes.length - 1 ? this.activePanes.length - 1 : index, 'previous');
|
|
3112
3133
|
}
|
|
3113
3134
|
}
|
|
3114
3135
|
}
|
|
@@ -3123,39 +3144,62 @@ let IgcPaneNavigatorComponent = class {
|
|
|
3123
3144
|
}
|
|
3124
3145
|
this.scrollItemToView();
|
|
3125
3146
|
}
|
|
3147
|
+
navigateToIndex(index, direction) {
|
|
3148
|
+
if (index === -1) {
|
|
3149
|
+
index = this.allItems.length - 1;
|
|
3150
|
+
}
|
|
3151
|
+
else if (index === this.allItems.length) {
|
|
3152
|
+
index = 0;
|
|
3153
|
+
}
|
|
3154
|
+
let counter = 0;
|
|
3155
|
+
while (this.allItems[index].disabled && counter <= this.allItems.length) {
|
|
3156
|
+
counter++;
|
|
3157
|
+
index = index + (direction === 'next' ? 1 : -1);
|
|
3158
|
+
if (index === -1) {
|
|
3159
|
+
index = this.allItems.length - 1;
|
|
3160
|
+
}
|
|
3161
|
+
else if (index === this.allItems.length) {
|
|
3162
|
+
index = 0;
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
this.selectedIndex = index;
|
|
3166
|
+
}
|
|
3126
3167
|
increaseSelectedIndex(amount = 1) {
|
|
3127
3168
|
const newValue = this.selectedIndex + amount;
|
|
3128
|
-
this.
|
|
3169
|
+
this.navigateToIndex(newValue, 'next');
|
|
3129
3170
|
}
|
|
3130
3171
|
decreaseSelectedIndex(amount = 1) {
|
|
3131
3172
|
const newValue = this.selectedIndex - amount;
|
|
3132
|
-
this.
|
|
3173
|
+
this.navigateToIndex(newValue, 'previous');
|
|
3133
3174
|
}
|
|
3134
3175
|
connectedCallback() {
|
|
3135
3176
|
this.allItems = [...this.activePanes, ...this.activeDocuments];
|
|
3136
3177
|
}
|
|
3137
3178
|
componentDidLoad() {
|
|
3138
3179
|
this.paneNav.focus();
|
|
3139
|
-
this.allItemsElement = Array.from(this.paneNav.querySelectorAll('
|
|
3180
|
+
this.allItemsElement = Array.from(this.paneNav.querySelectorAll('[part~=item]'));
|
|
3181
|
+
this.navigateToIndex(this.selectedIndex, 'next');
|
|
3140
3182
|
this.scrollItemToView();
|
|
3141
3183
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3184
|
+
resolveItemPart(item, index, isDocHost) {
|
|
3185
|
+
const part = Utils.partNameMap({
|
|
3186
|
+
item: true,
|
|
3187
|
+
selected: isDocHost ? index === this.selectedIndex - this.activePanes.length : index === this.selectedIndex,
|
|
3188
|
+
disabled: item.disabled
|
|
3189
|
+
});
|
|
3190
|
+
return part;
|
|
3147
3191
|
}
|
|
3148
3192
|
selectItem(index, isDocHost) {
|
|
3149
3193
|
this.selectedIndex = !isDocHost ? index : this.activePanes.length + index;
|
|
3150
3194
|
}
|
|
3151
3195
|
renderItems(title, items, isDocHost) {
|
|
3152
|
-
return (index.h("article", { part: "
|
|
3153
|
-
return (index.h("div", { part:
|
|
3196
|
+
return (index.h("article", { part: "group", class: "group" }, index.h("h4", { part: "title", class: "title" }, title), index.h("section", { class: "items" }, items === null || items === void 0 ? void 0 : items.map((item, index$1) => {
|
|
3197
|
+
return (index.h("div", { part: this.resolveItemPart(item, index$1, isDocHost), onMouseDown: () => this.selectItem(index$1, isDocHost), onMouseUp: () => this.closed.emit(this.allItems[this.selectedIndex]) }, item.header));
|
|
3154
3198
|
}))));
|
|
3155
3199
|
}
|
|
3156
3200
|
render() {
|
|
3157
3201
|
var _a;
|
|
3158
|
-
return (index.h(index.Host, { onClick: () => this.closed.emit(this.allItems[this.previousActivePaneIndex]), exportparts: "base: pane-navigator, header: pane-navigator-header, body: pane-navigator-body,\r\n
|
|
3202
|
+
return (index.h(index.Host, { onClick: () => this.closed.emit(this.allItems[this.previousActivePaneIndex]), exportparts: "base: pane-navigator, header: pane-navigator-header, body: pane-navigator-body,\r\n group: pane-navigator-items-group, title: pane-navigator-items-group-title, item: pane-navigator-item, selected, disabled" }, index.h("article", { part: "base", class: "pane-navigator", ref: el => this.paneNav = el, tabIndex: 0, onClick: ev => ev.stopPropagation() }, index.h("header", { part: "header" }, index.h("h3", null, (_a = this.allItems[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.header)), index.h("section", { part: "body", class: "body" }, this.renderItems(this.resourceStrings.panes, this.activePanes, false), this.renderItems(this.resourceStrings.documents, this.activeDocuments, true)))));
|
|
3159
3203
|
}
|
|
3160
3204
|
};
|
|
3161
3205
|
IgcPaneNavigatorComponent.style = paneNavigatorComponentCss;
|
|
@@ -3426,7 +3470,7 @@ let IgcSplitterComponent = class {
|
|
|
3426
3470
|
};
|
|
3427
3471
|
IgcSplitterComponent.style = splitterComponentCss;
|
|
3428
3472
|
|
|
3429
|
-
const tabHeaderComponentCss = ":host{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;padding:0.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--igc-tab-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-tab-background, var(--igc-background-color, #E5E7E9));border-style:solid;border-color:var(--igc-tab-border-color, var(--igc-border-color, #F3F5F7));border-top-width:1px;border-left-width:1px;border-bottom-width:0;border-right-width:1px;font-size:0.75em;line-height:2;outline-style:none}:host igc-icon-component svg{width:17px;height:17px}:host *+igc-button-component{margin-left:0.5em}:host(
|
|
3473
|
+
const tabHeaderComponentCss = ":host{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;padding:0.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--igc-tab-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-tab-background, var(--igc-background-color, #E5E7E9));border-style:solid;border-color:var(--igc-tab-border-color, var(--igc-border-color, #F3F5F7));border-top-width:1px;border-left-width:1px;border-bottom-width:0;border-right-width:1px;font-size:0.75em;line-height:2;outline-style:none}:host igc-icon-component svg{width:17px;height:17px}:host *+igc-button-component{margin-left:0.5em}:host([part~=selected]){color:var(--igc-tab-text-active, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-tab-background-active, var(--igc-border-color, #F3F5F7));border-color:var(--igc-tab-border-color-active, var(--igc-border-color, #F3F5F7))}:host([part~=bottom]){border-top-width:0;border-bottom-width:1px}:host([part~=bottom]):first-of-type{border-left:none}:host([part~=active]){-webkit-box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue);box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue);color:var(--igc-active-color, cornflowerblue)}:host([part~=active]) igc-icon-component{color:var(--igc-active-color, cornflowerblue)}:host([part~=disabled]){pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
3430
3474
|
|
|
3431
3475
|
let IgcTabHeaderComponent = class {
|
|
3432
3476
|
constructor(hostRef) {
|
|
@@ -3441,6 +3485,7 @@ let IgcTabHeaderComponent = class {
|
|
|
3441
3485
|
this.elementDisconnected = index.createEvent(this, "elementDisconnected", 7);
|
|
3442
3486
|
this.selected = false;
|
|
3443
3487
|
this.position = IgcTabHeadersPosition.top;
|
|
3488
|
+
this.disabled = false;
|
|
3444
3489
|
this.iconClick = (ev) => {
|
|
3445
3490
|
this.iconClicked.emit(ev);
|
|
3446
3491
|
};
|
|
@@ -3480,22 +3525,18 @@ let IgcTabHeaderComponent = class {
|
|
|
3480
3525
|
}
|
|
3481
3526
|
}
|
|
3482
3527
|
render() {
|
|
3483
|
-
const tabClasses = {
|
|
3484
|
-
'active': this.isActive,
|
|
3485
|
-
'selected': this.selected,
|
|
3486
|
-
'bottom': this.position === IgcTabHeadersPosition.bottom
|
|
3487
|
-
};
|
|
3488
3528
|
const parts = Utils.partNameMap({
|
|
3489
|
-
'tab-header':
|
|
3529
|
+
'tab-header': true,
|
|
3490
3530
|
top: this.position === IgcTabHeadersPosition.top,
|
|
3491
3531
|
active: this.isActive,
|
|
3492
3532
|
selected: this.selected,
|
|
3533
|
+
disabled: this.disabled,
|
|
3493
3534
|
bottom: this.position === IgcTabHeadersPosition.bottom,
|
|
3494
3535
|
});
|
|
3495
|
-
return (index.h(index.Host, { role: "tab", part: parts, "aria-label": this.header, "aria-selected": this.selected ? 'true' : 'false',
|
|
3536
|
+
return (index.h(index.Host, { role: "tab", part: parts, "aria-label": this.header, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabIndex: !this.selected || this.disabled ? -1 : 0 }, index.h("slot", null), this.iconName &&
|
|
3496
3537
|
index.h("igc-button-component", { style: {
|
|
3497
3538
|
visibility: this.selected ? 'visible' : 'hidden',
|
|
3498
|
-
pointerEvents: this.selected ? 'all' : 'none'
|
|
3539
|
+
pointerEvents: this.selected && !this.disabled ? 'all' : 'none'
|
|
3499
3540
|
}, onClick: this.iconClick, onKeyDown: this.keyDown }, index.h("igc-icon-component", { name: this.iconName, "aria-label": this.iconName === 'close' ? this.resourceStrings.close : this.resourceStrings.moreOptions, title: this.iconName === 'close' ? this.resourceStrings.close : this.resourceStrings.moreOptions }))));
|
|
3500
3541
|
}
|
|
3501
3542
|
get element() { return index.getElement(this); }
|
|
@@ -3505,7 +3546,7 @@ let IgcTabHeaderComponent = class {
|
|
|
3505
3546
|
};
|
|
3506
3547
|
IgcTabHeaderComponent.style = tabHeaderComponentCss;
|
|
3507
3548
|
|
|
3508
|
-
const tabPanelComponentCss = ":host{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;-ms-flex-positive:1;flex-grow:1;height:100%;color:var(--igc-pane-content-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background-color:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7))}";
|
|
3549
|
+
const tabPanelComponentCss = ":host{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;-ms-flex-positive:1;flex-grow:1;height:100%;color:var(--igc-pane-content-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background-color:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7))}:host([part~=disabled]){pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
3509
3550
|
|
|
3510
3551
|
let IgcTabPanelComponent = class {
|
|
3511
3552
|
constructor(hostRef) {
|
|
@@ -3513,6 +3554,7 @@ let IgcTabPanelComponent = class {
|
|
|
3513
3554
|
this.selectedChanged = index.createEvent(this, "selectedChanged", 7);
|
|
3514
3555
|
this.emitSelectedChanged = false;
|
|
3515
3556
|
this.selected = false;
|
|
3557
|
+
this.disabled = false;
|
|
3516
3558
|
}
|
|
3517
3559
|
selectedPropChange() {
|
|
3518
3560
|
this.emitSelectedChanged = true;
|
|
@@ -3524,7 +3566,12 @@ let IgcTabPanelComponent = class {
|
|
|
3524
3566
|
}
|
|
3525
3567
|
}
|
|
3526
3568
|
render() {
|
|
3527
|
-
|
|
3569
|
+
const parts = Utils.partNameMap({
|
|
3570
|
+
'tab-panel': true,
|
|
3571
|
+
selected: this.selected,
|
|
3572
|
+
disabled: this.disabled
|
|
3573
|
+
});
|
|
3574
|
+
return (index.h(index.Host, { role: "tabpanel", part: parts, style: {
|
|
3528
3575
|
display: this.selected ? 'block' : 'none'
|
|
3529
3576
|
} }, index.h("slot", null)));
|
|
3530
3577
|
}
|
|
@@ -3564,15 +3611,21 @@ let IgcTabsComponent = class {
|
|
|
3564
3611
|
return;
|
|
3565
3612
|
}
|
|
3566
3613
|
if (ev.key === 'ArrowRight') {
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3614
|
+
for (let i = this.selectedIndex; i < tabHeaders.length - this.hiddenTabHeaders.length - 1; i++) {
|
|
3615
|
+
if (!tabHeaders[i + 1].disabled) {
|
|
3616
|
+
this.selectedIndex = i + 1;
|
|
3617
|
+
tabHeaders[i + 1].focus();
|
|
3618
|
+
return;
|
|
3619
|
+
}
|
|
3570
3620
|
}
|
|
3571
3621
|
}
|
|
3572
3622
|
else if (ev.key === 'ArrowLeft') {
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3623
|
+
for (let i = this.selectedIndex; i > 0; i--) {
|
|
3624
|
+
if (!tabHeaders[i - 1].disabled) {
|
|
3625
|
+
this.selectedIndex = i - 1;
|
|
3626
|
+
tabHeaders[i - 1].focus();
|
|
3627
|
+
return;
|
|
3628
|
+
}
|
|
3576
3629
|
}
|
|
3577
3630
|
}
|
|
3578
3631
|
};
|
|
@@ -3677,6 +3730,7 @@ let IgcTabsComponent = class {
|
|
|
3677
3730
|
const button = ev.currentTarget;
|
|
3678
3731
|
const items = this.hiddenTabHeaders.map(header => ({
|
|
3679
3732
|
displayText: header.header,
|
|
3733
|
+
disabled: header.disabled,
|
|
3680
3734
|
iconName: null,
|
|
3681
3735
|
clickHandler: () => {
|
|
3682
3736
|
const index = this.tabHeaders.indexOf(header);
|
|
@@ -3734,18 +3788,22 @@ let IgcTabsComponent = class {
|
|
|
3734
3788
|
};
|
|
3735
3789
|
IgcTabsComponent.style = tabsComponentCss;
|
|
3736
3790
|
|
|
3737
|
-
const unpinnedPaneHeaderComponentCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:12px;padding:4px;margin-right:4px;color:var(--igc-pinned-header-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pinned-header-background, var(--igc-accent-color, #fff));cursor:pointer;outline-style:none}:host(
|
|
3791
|
+
const unpinnedPaneHeaderComponentCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:12px;padding:4px;margin-right:4px;color:var(--igc-pinned-header-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pinned-header-background, var(--igc-accent-color, #fff));cursor:pointer;outline-style:none}:host([part~=vertical]){-webkit-writing-mode:tb-rl;-ms-writing-mode:tb-rl;writing-mode:tb-rl;margin-right:unset;margin-bottom:4px}:host([part~=active]){color:var(--igc-active-color, cornflowerblue);-webkit-box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue);box-shadow:inset 0 -2px 0 0 var(--igc-active-color, cornflowerblue)}:host([part~=vertical][part~=active]){-webkit-box-shadow:inset 2px 0 0 0 var(--igc-active-color, cornflowerblue);box-shadow:inset 2px 0 0 0 var(--igc-active-color, cornflowerblue)}:host([part~=disabled]){pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}";
|
|
3738
3792
|
|
|
3739
3793
|
let IgcUnpinnedPaneHeaderComponent = class {
|
|
3740
3794
|
constructor(hostRef) {
|
|
3741
3795
|
index.registerInstance(this, hostRef);
|
|
3796
|
+
this.disabled = false;
|
|
3742
3797
|
}
|
|
3743
3798
|
render() {
|
|
3744
3799
|
const isHorizontal = this.location === locale.IgcUnpinnedLocation.top || this.location === locale.IgcUnpinnedLocation.bottom;
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3800
|
+
const parts = Utils.partNameMap({
|
|
3801
|
+
'unpinned-pane-header': true,
|
|
3802
|
+
vertical: !isHorizontal,
|
|
3803
|
+
active: this.isActive,
|
|
3804
|
+
disabled: this.disabled,
|
|
3805
|
+
});
|
|
3806
|
+
return (index.h(index.Host, { part: parts, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0 }, index.h("slot", null)));
|
|
3749
3807
|
}
|
|
3750
3808
|
};
|
|
3751
3809
|
IgcUnpinnedPaneHeaderComponent.style = unpinnedPaneHeaderComponentCss;
|
|
@@ -4101,6 +4159,12 @@ let SampleComponent = class {
|
|
|
4101
4159
|
});
|
|
4102
4160
|
this.dockManager.layout = Object.assign({}, this.layout);
|
|
4103
4161
|
}
|
|
4162
|
+
disableContentPane() {
|
|
4163
|
+
this.findElement(this.layout.rootPane, locale.IgcDockManagerPaneType.tabGroupPane);
|
|
4164
|
+
const tabGroupPane = this.foundElem[0];
|
|
4165
|
+
tabGroupPane.panes[0].disabled = true;
|
|
4166
|
+
this.dockManager.layout = Object.assign({}, this.layout);
|
|
4167
|
+
}
|
|
4104
4168
|
findElement(pane, type) {
|
|
4105
4169
|
if (!pane) {
|
|
4106
4170
|
return;
|
|
@@ -4218,7 +4282,7 @@ let SampleComponent = class {
|
|
|
4218
4282
|
// return customResourceStrings;
|
|
4219
4283
|
// }
|
|
4220
4284
|
render() {
|
|
4221
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("button", { onClick: () => this.saveLayout() }, "Save Layout"), index.h("button", { onClick: () => this.loadLayout() }, "Load Layout"), index.h("button", { onClick: () => this.setActivePane() }, "Set Active Pane"), index.h("button", { onClick: () => this.addPane() }, "Add Floating Pane"), index.h("button", { onClick: () => this.addTab() }, "Add Tab Pane"), index.h("input", { id: "hideOnClose", type: "checkbox", style: { marginLeft: '20px' }, ref: el => this.hideOnCloseCheckbox = el }), index.h("label", { htmlFor: "hideOnClose" }, "Hide on close"), index.h("span", { style: { marginLeft: '20px' } }, "Hidden Panes:"), index.h("select", { style: { width: '150px' }, ref: el => this.hiddenPanesSelect = el }, this.hiddenPanes.map(p => {
|
|
4285
|
+
return (index.h(index.Host, null, index.h("div", null, index.h("button", { onClick: () => this.saveLayout() }, "Save Layout"), index.h("button", { onClick: () => this.loadLayout() }, "Load Layout"), index.h("button", { onClick: () => this.setActivePane() }, "Set Active Pane"), index.h("button", { onClick: () => this.addPane() }, "Add Floating Pane"), index.h("button", { onClick: () => this.addTab() }, "Add Tab Pane"), index.h("button", { onClick: () => this.disableContentPane() }, "Disable Tab Pane"), index.h("input", { id: "hideOnClose", type: "checkbox", style: { marginLeft: '20px' }, ref: el => this.hideOnCloseCheckbox = el }), index.h("label", { htmlFor: "hideOnClose" }, "Hide on close"), index.h("span", { style: { marginLeft: '20px' } }, "Hidden Panes:"), index.h("select", { style: { width: '150px' }, ref: el => this.hiddenPanesSelect = el }, this.hiddenPanes.map(p => {
|
|
4222
4286
|
return (index.h("option", { value: p.id }, p.header));
|
|
4223
4287
|
})), index.h("button", { onClick: () => this.showPane() }, "Show Pane"), index.h("button", { onClick: () => this.showAllPanes() }, "Show All Panes")), index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.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), onFloatingPaneResizeStart: this.handleFloatingPaneResizeStart.bind(this), onFloatingPaneResizeMove: this.handleFloatingPaneResizeMove.bind(this), onFloatingPaneResizeEnd: this.handleFloatingPaneResizeEnd.bind(this),
|
|
4224
4288
|
// resourceStrings={this.getCustomResourceStrings()}
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"dropPane":[64],"removePane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"]]],[1,"igc-tabs-component",{"size":[2],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"]},[[1,"mousedown","handleMouseDown"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[2,"igc-splitter-component",{"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"showDragGhost":[32],"dragOffset":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"]}],[1,"igc-context-menu-component",{"orientation":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"disableKeyboardNavigation":[4,"disable-keyboard-navigation"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"dropPane":[64],"removePane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"]]],[1,"igc-tabs-component",{"size":[2],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"disabled":[4],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"],"disabled":[4]},[[1,"mousedown","handleMouseDown"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1],"disabled":[4],"isSingleFloating":[4,"is-single-floating"]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[2,"igc-splitter-component",{"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"showDragGhost":[32],"dragOffset":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4],"disabled":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"],"disabled":[4]}],[1,"igc-context-menu-component",{"orientation":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
|
|
19
19
|
});
|