igniteui-dockmanager 1.14.4 → 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.
Files changed (49) hide show
  1. package/dist/cjs/igc-button-component_20.cjs.entry.js +172 -61
  2. package/dist/cjs/igc-button-component_20.cjs.entry.js.map +1 -1
  3. package/dist/cjs/igniteui-dockmanager.cjs.js +1 -1
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{locale-1ad1c5f3.js → locale-d92f1ee8.js} +7 -7
  7. package/dist/cjs/locale-d92f1ee8.js.map +1 -0
  8. package/dist/collection/components/dockmanager/dockmanager-component.css +6 -3
  9. package/dist/collection/components/dockmanager/dockmanager-component.js +5 -4
  10. package/dist/collection/components/dockmanager/dockmanager-component.js.map +1 -1
  11. package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js +6 -6
  12. package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js.map +1 -1
  13. package/dist/collection/components/dockmanager/dockmanager.service.js +1 -1
  14. package/dist/collection/components/dockmanager/dockmanager.service.js.map +1 -1
  15. package/dist/collection/components/dockmanager/panes/content-pane-component.js +1 -1
  16. package/dist/collection/components/dockmanager/panes/content-pane-component.js.map +1 -1
  17. package/dist/collection/components/dockmanager/panes/split-pane-component.js +28 -4
  18. package/dist/collection/components/dockmanager/panes/split-pane-component.js.map +1 -1
  19. package/dist/collection/components/dockmanager/panes/splitter-component.js +8 -9
  20. package/dist/collection/components/dockmanager/panes/splitter-component.js.map +1 -1
  21. package/dist/collection/components/sample-component/sample-component.css +39 -4
  22. package/dist/collection/components/sample-component/sample-component.js +146 -31
  23. package/dist/collection/components/sample-component/sample-component.js.map +1 -1
  24. package/dist/esm/igc-button-component_20.entry.js +166 -55
  25. package/dist/esm/igc-button-component_20.entry.js.map +1 -1
  26. package/dist/esm/igniteui-dockmanager.js +1 -1
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/{locale-8f3ada11.js → locale-52bb921e.js} +7 -7
  30. package/dist/esm/locale-52bb921e.js.map +1 -0
  31. package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
  32. package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js.map +1 -1
  33. package/dist/igniteui-dockmanager/index.esm.js +1 -1
  34. package/dist/igniteui-dockmanager/{p-1053856d.js → p-715443ea.js} +1 -1
  35. package/dist/igniteui-dockmanager/p-715443ea.js.map +1 -0
  36. package/dist/igniteui-dockmanager/p-bc5bf8ff.entry.js +2 -0
  37. package/dist/igniteui-dockmanager/p-bc5bf8ff.entry.js.map +1 -0
  38. package/dist/types/components/dockmanager/dockmanager-component.d.ts +1 -0
  39. package/dist/types/components/dockmanager/panes/split-pane-component.d.ts +1 -0
  40. package/dist/types/components/sample-component/sample-component.d.ts +2 -19
  41. package/dist/types/components.d.ts +2 -0
  42. package/loader/cdn.js +2 -2
  43. package/loader/index.cjs.js +2 -2
  44. package/package.json +1 -1
  45. package/dist/cjs/locale-1ad1c5f3.js.map +0 -1
  46. package/dist/esm/locale-8f3ada11.js.map +0 -1
  47. package/dist/igniteui-dockmanager/p-1053856d.js.map +0 -1
  48. package/dist/igniteui-dockmanager/p-e0dc1687.entry.js +0 -2
  49. package/dist/igniteui-dockmanager/p-e0dc1687.entry.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-1ad1c5f3.js');
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` : `${size} 1 ${size}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
  };
@@ -789,7 +789,7 @@ 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) {
@@ -1943,7 +1943,7 @@ class IgcDockManagerKeyboardService {
1943
1943
  }
1944
1944
  }
1945
1945
 
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;height:100%;width:100%;overflow:hidden}.pane-container--vertical{flex-direction:column}.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%}";
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%}";
1947
1947
 
1948
1948
  var ActionReason;
1949
1949
  (function (ActionReason) {
@@ -2084,6 +2084,7 @@ const IgcDockManager = class {
2084
2084
  targetPart: 'splitter-handle'
2085
2085
  },
2086
2086
  ];
2087
+ this.ignoreResizeConstraints = true;
2087
2088
  this.updateTemplates = () => {
2088
2089
  if (this.templates.size > 0) {
2089
2090
  return;
@@ -2588,7 +2589,7 @@ const IgcDockManager = class {
2588
2589
  const sizeProperty = parentPane.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'offsetWidth' : 'offsetHeight';
2589
2590
  const sizeSum = paneComponents.reduce((s, p) => p[sizeProperty] + s, 0);
2590
2591
  // If the new size is smaller or bigger that the size constraints, do not resize
2591
- 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;
2592
2593
  let offsetPercentage = this.splitterOffset * offset / sizeSum;
2593
2594
  let rtl = false;
2594
2595
  if (this.element.dir !== '') {
@@ -3330,9 +3331,9 @@ const IgcDockManager = class {
3330
3331
  index.h("slot", { name: pane.tabHeaderId }) :
3331
3332
  index.h("span", { part: "header-title", title: pane.header }, pane.header)));
3332
3333
  }
3333
- renderSplitPane(splitPane, isFloating, isInDocumentHost) {
3334
+ renderSplitPane(splitPane, isFloating, isInDocumentHost, isRootPane = false) {
3334
3335
  const panes = this.service.getSplitPaneVisibleChildren(splitPane);
3335
- 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 => {
3336
3337
  if (el) {
3337
3338
  this.panesElementMap.set(splitPane, el);
3338
3339
  }
@@ -3472,7 +3473,7 @@ const IgcDockManager = class {
3472
3473
  this.tabHeadersMap = new Map();
3473
3474
  this.unpinnedHeadersMap = new Map();
3474
3475
  this.contentPanesElementMap = new Map();
3475
- 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()));
3476
3477
  }
3477
3478
  get element() { return index.getElement(this); }
3478
3479
  static get watchers() { return {
@@ -4298,16 +4299,22 @@ const IgcSplitPaneComponent = class {
4298
4299
  this.rendered = index.createEvent(this, "rendered", 7);
4299
4300
  this.orientation = undefined;
4300
4301
  this.size = undefined;
4302
+ this.shouldFillParent = false;
4301
4303
  }
4302
4304
  componentDidRender() {
4303
4305
  this.rendered.emit();
4304
4306
  }
4305
4307
  render() {
4306
4308
  const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
4307
- return (index.h(index.Host, { role: "group", style: {
4308
- flexDirection: this.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'row' : 'column',
4309
- flex: `${size} 1 ${size}px`
4310
- }, part: "split-pane" }));
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" }));
4311
4318
  }
4312
4319
  };
4313
4320
  IgcSplitPaneComponent.style = splitPaneComponentCss;
@@ -4482,17 +4489,6 @@ const IgcSplitterComponent = class {
4482
4489
  this.dragOffset = 0;
4483
4490
  }
4484
4491
  }
4485
- else {
4486
- const referencePaneSize = !rtl || isVertical ? this.paneSizes[1] : this.paneSizes[0];
4487
- if (referencePaneSize > IGC_RESIZING_MIN_SIZE) {
4488
- if (referencePaneSize - this.dragOffset < IGC_RESIZING_MIN_SIZE) {
4489
- this.dragOffset = referencePaneSize - IGC_RESIZING_MIN_SIZE;
4490
- }
4491
- }
4492
- else {
4493
- this.dragOffset = 0;
4494
- }
4495
- }
4496
4492
  }
4497
4493
  closestElement(selector, el) {
4498
4494
  return ((el && el.closest(selector)) ||
@@ -5004,7 +5000,7 @@ const IgcUnpinnedPaneHeaderComponent = class {
5004
5000
  };
5005
5001
  IgcUnpinnedPaneHeaderComponent.style = unpinnedPaneHeaderComponentCss;
5006
5002
 
5007
- 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}";
5008
5004
 
5009
5005
  /**
5010
5006
  * @hidden
@@ -5327,98 +5323,212 @@ const SampleComponent = class {
5327
5323
  }
5328
5324
  ]
5329
5325
  };
5330
- this.layout = this.layout1;
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;
5331
5411
  this.logEnabled = false;
5332
- this.id = 100;
5333
- this.foundElem = [];
5334
5412
  this.hiddenPanes = [];
5335
5413
  }
5336
- saveLayout() {
5414
+ /*
5415
+ private hiddenPanesSelect: HTMLSelectElement;
5416
+ private savedLayout: string;
5417
+
5418
+ private saveLayout() {
5337
5419
  this.savedLayout = JSON.stringify(this.dockManager.layout);
5338
5420
  }
5339
- loadLayout() {
5421
+
5422
+ private loadLayout() {
5340
5423
  this.dockManager.layout = JSON.parse(this.savedLayout);
5341
5424
  }
5342
- setActivePane() {
5425
+
5426
+ private setActivePane() {
5343
5427
  // this.dockManager.activePane = this.teamExplorerPane;
5344
5428
  this.dockManager.activePane = this.unpinnedToolboxPane;
5345
5429
  }
5346
- addPane() {
5430
+
5431
+ private id = 100;
5432
+ private newId: string;
5433
+
5434
+ private addPane() {
5347
5435
  this.newId = `content${this.id++}`;
5348
5436
  const newDiv = this.createElement(this.newId, 'input');
5349
5437
  this.dockManager.appendChild(newDiv);
5438
+
5350
5439
  this.layout.floatingPanes[1].panes.push({
5351
- type: locale.IgcDockManagerPaneType.contentPane,
5440
+ type: IgcDockManagerPaneType.contentPane,
5352
5441
  header: 'NewPane',
5353
5442
  contentId: this.newId
5354
5443
  });
5355
- this.dockManager.layout = Object.assign({}, this.layout);
5444
+
5445
+ this.dockManager.layout = { ...this.layout };
5356
5446
  }
5357
- addTab() {
5358
- this.findElement(this.layout.rootPane, locale.IgcDockManagerPaneType.tabGroupPane);
5447
+
5448
+ private addTab() {
5449
+ this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
5450
+
5359
5451
  this.newId = `content${this.id++}`;
5360
5452
  const newDiv = this.createElement(this.newId, 'button');
5361
5453
  this.dockManager.appendChild(newDiv);
5362
- const tabGroupPane = this.foundElem[0];
5454
+
5455
+ const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
5363
5456
  tabGroupPane.panes.push({
5364
- type: locale.IgcDockManagerPaneType.contentPane,
5457
+ type: IgcDockManagerPaneType.contentPane,
5365
5458
  header: 'NewTab',
5366
5459
  contentId: this.newId
5367
5460
  });
5368
- this.dockManager.layout = Object.assign({}, this.layout);
5461
+
5462
+ this.dockManager.layout = { ...this.layout };
5369
5463
  }
5370
- disableContentPane() {
5371
- this.findElement(this.layout.rootPane, locale.IgcDockManagerPaneType.tabGroupPane);
5372
- const tabGroupPane = this.foundElem[0];
5464
+
5465
+ private disableContentPane() {
5466
+ this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
5467
+
5468
+ const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
5373
5469
  tabGroupPane.panes[0].disabled = true;
5374
- this.dockManager.layout = Object.assign({}, this.layout);
5470
+ this.dockManager.layout = { ...this.layout };
5375
5471
  }
5376
- toggleProximityDock() {
5472
+
5473
+ private toggleProximityDock() {
5377
5474
  this.dockManager.proximityDock = !this.dockManager.proximityDock;
5378
5475
  }
5379
- focusPane() {
5476
+
5477
+ private focusPane() {
5380
5478
  this.dockManager.focusPane('content12');
5381
5479
  }
5382
- findElement(pane, type) {
5383
- if (!pane) {
5384
- return;
5385
- }
5480
+
5481
+ private foundElem: IgcDockManagerPane[] = [];
5482
+ private findElement(pane: IgcDockManagerPane, type: IgcDockManagerPaneType) {
5483
+ if (!pane) { return; }
5484
+
5386
5485
  if (pane.type === type) {
5387
5486
  this.foundElem.push(pane);
5388
5487
  }
5389
- if (pane.type === locale.IgcDockManagerPaneType.tabGroupPane || pane.type === locale.IgcDockManagerPaneType.splitPane) {
5488
+
5489
+ if (pane.type === IgcDockManagerPaneType.tabGroupPane || pane.type === IgcDockManagerPaneType.splitPane) {
5390
5490
  for (const c of pane.panes) {
5391
5491
  this.findElement(c, type);
5392
5492
  }
5393
5493
  }
5394
- if (pane.type === locale.IgcDockManagerPaneType.documentHost) {
5494
+
5495
+ if (pane.type === IgcDockManagerPaneType.documentHost) {
5395
5496
  this.findElement(pane.rootPane, type);
5396
5497
  }
5397
5498
  }
5398
- showPane() {
5499
+
5500
+ private showPane() {
5399
5501
  const index = this.hiddenPanesSelect.selectedIndex;
5502
+
5400
5503
  if (index >= 0) {
5401
5504
  this.hiddenPanes[index].hidden = false;
5402
5505
  this.hiddenPanes.splice(index, 1);
5403
5506
  this.hiddenPanes = [...this.hiddenPanes];
5404
- this.dockManager.layout = Object.assign({}, this.dockManager.layout);
5507
+ this.dockManager.layout = { ...this.dockManager.layout };
5405
5508
  }
5406
5509
  }
5407
- showAllPanes() {
5510
+
5511
+ private showAllPanes() {
5408
5512
  if (this.hiddenPanes.length > 0) {
5409
5513
  for (const pane of this.hiddenPanes) {
5410
5514
  pane.hidden = false;
5411
5515
  }
5412
5516
  this.hiddenPanes = [];
5413
- this.dockManager.layout = Object.assign({}, this.dockManager.layout);
5517
+ this.dockManager.layout = { ...this.dockManager.layout };
5414
5518
  }
5415
5519
  }
5416
- toggleInBoundaries() {
5520
+
5521
+ private toggleInBoundaries() {
5417
5522
  this.dockManager.containedInBoundaries = !this.dockManager.containedInBoundaries;
5418
5523
  }
5419
- createElement(content, typeOfElement) {
5524
+
5525
+ // private toggleIgnoreResizeConstraints() {
5526
+ // this.dockManager.ignoreResizeConstraints = !this.dockManager.ignoreResizeConstraints;
5527
+ // }
5528
+
5529
+ private createElement(content: string, typeOfElement: string): HTMLElement {
5420
5530
  const someContent = document.createTextNode(content);
5421
- let elem;
5531
+ let elem: HTMLElement;
5422
5532
  switch (typeOfElement) {
5423
5533
  case ('button'):
5424
5534
  elem = document.createElement('button');
@@ -5428,12 +5538,15 @@ const SampleComponent = class {
5428
5538
  elem = document.createElement('input');
5429
5539
  break;
5430
5540
  }
5541
+
5431
5542
  const divContent = document.createElement('div');
5432
5543
  divContent.appendChild(elem ? elem : someContent);
5433
5544
  divContent.setAttribute('slot', content);
5434
5545
  divContent.setAttribute('style', 'width: 100%; height: 100%;');
5546
+
5435
5547
  return divContent;
5436
5548
  }
5549
+ */
5437
5550
  handlePaneClose(event) {
5438
5551
  this.log(event);
5439
5552
  if (this.hideOnCloseCheckbox.checked) {
@@ -5525,13 +5638,11 @@ const SampleComponent = class {
5525
5638
  }
5526
5639
  }
5527
5640
  render() {
5528
- 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("button", { onClick: () => this.focusPane() }, "Focus Pane"), index.h("button", { onClick: () => this.toggleProximityDock() }, "Toggle Proximity Dock"), 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 => {
5529
- return (index.h("option", { value: p.id }, p.header));
5530
- })), 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),
5531
5642
  // resourceStrings={this.getCustomResourceStrings()}
5532
5643
  ref: el => this.dockManager = el,
5533
5644
  // allowFloatingPanesResize={false}
5534
- 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%' } }, "Content 3"), 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")))));
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")))));
5535
5646
  }
5536
5647
  };
5537
5648
  SampleComponent.style = sampleComponentCss;